@vitus-labs/rocketstories 0.17.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/analysis/vitus-labs-rocketstories.js.html +1 -1
- package/lib/analysis/vitus-labs-rocketstories.module.js.html +1 -1
- package/lib/analysis/vitus-labs-rocketstories.umd.js.html +1 -1
- package/lib/index.d.ts +7 -3
- package/lib/types/index.d.ts +2 -1
- package/lib/types/rocketstories.d.ts +5 -1
- package/lib/types/types.d.ts +2 -1
- package/lib/vitus-labs-rocketstories.js +17 -23
- package/lib/vitus-labs-rocketstories.js.map +1 -1
- package/lib/vitus-labs-rocketstories.module.js +19 -26
- package/lib/vitus-labs-rocketstories.module.js.map +1 -1
- package/lib/vitus-labs-rocketstories.umd.js +21 -26
- package/lib/vitus-labs-rocketstories.umd.js.map +1 -1
- package/package.json +10 -10
|
@@ -7060,7 +7060,7 @@ var drawChart = (function (exports) {
|
|
|
7060
7060
|
</script>
|
|
7061
7061
|
<script>
|
|
7062
7062
|
/*<!--*/
|
|
7063
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstories.js","children":[{"name":"Users/vitbokisch/Dev/vitus-labs/ui-system/packages/rocketstyle/lib/vitus-labs-rocketstyle.module.js","uid":"
|
|
7063
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstories.js","children":[{"name":"Users/vitbokisch/Dev/vitus-labs/ui-system/packages/rocketstyle/lib/vitus-labs-rocketstyle.module.js","uid":"2fd1-1"},{"name":"src","children":[{"name":"components/NotFound.tsx","uid":"2fd1-3"},{"name":"utils","children":[{"uid":"2fd1-5","name":"theme.ts"},{"uid":"2fd1-7","name":"code.ts"},{"name":"controls","children":[{"uid":"2fd1-11","name":"attrs.ts"},{"uid":"2fd1-13","name":"dimensionToControls.ts"},{"uid":"2fd1-15","name":"disableControls.ts"},{"uid":"2fd1-17","name":"filterDefaultValues.ts"},{"uid":"2fd1-19","name":"constants.ts"},{"uid":"2fd1-21","name":"makeControls.ts"},{"uid":"2fd1-33","name":"valuesToControls.ts"}]},{"uid":"2fd1-37","name":"dimensions.ts"}]},{"name":"constants/controls.ts","uid":"2fd1-9"},{"name":"controls","children":[{"uid":"2fd1-23","name":"element.ts"},{"uid":"2fd1-25","name":"list.ts"},{"uid":"2fd1-27","name":"overlay.ts"},{"uid":"2fd1-29","name":"rocketstyle.ts"},{"uid":"2fd1-31","name":"text.ts"}]},{"name":"stories","children":[{"uid":"2fd1-35","name":"dimension.tsx"},{"uid":"2fd1-39","name":"main.tsx"},{"uid":"2fd1-41","name":"story.tsx"}]},{"uid":"2fd1-43","name":"rocketstories.tsx"},{"uid":"2fd1-45","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"2fd1-1":{"renderedLength":634,"gzipLength":340,"brotliLength":0,"mainUid":"2fd1-0"},"2fd1-3":{"renderedLength":236,"gzipLength":202,"brotliLength":0,"mainUid":"2fd1-2"},"2fd1-5":{"renderedLength":113,"gzipLength":129,"brotliLength":0,"mainUid":"2fd1-4"},"2fd1-7":{"renderedLength":5191,"gzipLength":1178,"brotliLength":0,"mainUid":"2fd1-6"},"2fd1-9":{"renderedLength":246,"gzipLength":141,"brotliLength":0,"mainUid":"2fd1-8"},"2fd1-11":{"renderedLength":537,"gzipLength":300,"brotliLength":0,"mainUid":"2fd1-10"},"2fd1-13":{"renderedLength":454,"gzipLength":254,"brotliLength":0,"mainUid":"2fd1-12"},"2fd1-15":{"renderedLength":545,"gzipLength":275,"brotliLength":0,"mainUid":"2fd1-14"},"2fd1-17":{"renderedLength":220,"gzipLength":170,"brotliLength":0,"mainUid":"2fd1-16"},"2fd1-19":{"renderedLength":685,"gzipLength":291,"brotliLength":0,"mainUid":"2fd1-18"},"2fd1-21":{"renderedLength":556,"gzipLength":282,"brotliLength":0,"mainUid":"2fd1-20"},"2fd1-23":{"renderedLength":5519,"gzipLength":1015,"brotliLength":0,"mainUid":"2fd1-22"},"2fd1-25":{"renderedLength":1731,"gzipLength":525,"brotliLength":0,"mainUid":"2fd1-24"},"2fd1-27":{"renderedLength":2567,"gzipLength":578,"brotliLength":0,"mainUid":"2fd1-26"},"2fd1-29":{"renderedLength":687,"gzipLength":158,"brotliLength":0,"mainUid":"2fd1-28"},"2fd1-31":{"renderedLength":408,"gzipLength":154,"brotliLength":0,"mainUid":"2fd1-30"},"2fd1-33":{"renderedLength":2589,"gzipLength":757,"brotliLength":0,"mainUid":"2fd1-32"},"2fd1-35":{"renderedLength":5777,"gzipLength":1278,"brotliLength":0,"mainUid":"2fd1-34"},"2fd1-37":{"renderedLength":339,"gzipLength":238,"brotliLength":0,"mainUid":"2fd1-36"},"2fd1-39":{"renderedLength":2625,"gzipLength":730,"brotliLength":0,"mainUid":"2fd1-38"},"2fd1-41":{"renderedLength":645,"gzipLength":293,"brotliLength":0,"mainUid":"2fd1-40"},"2fd1-43":{"renderedLength":3282,"gzipLength":696,"brotliLength":0,"mainUid":"2fd1-42"},"2fd1-45":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"2fd1-44"}},"nodeMetas":{"2fd1-0":{"id":"/Users/vitbokisch/Dev/vitus-labs/ui-system/packages/rocketstyle/lib/vitus-labs-rocketstyle.module.js","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-1"},"imported":[{"uid":"2fd1-46"},{"uid":"2fd1-48"},{"uid":"2fd1-49"}],"importedBy":[{"uid":"2fd1-42"}]},"2fd1-2":{"id":"/src/components/NotFound.tsx","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-3"},"imported":[{"uid":"2fd1-48"},{"uid":"2fd1-46"}],"importedBy":[{"uid":"2fd1-34"}]},"2fd1-4":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-5"},"imported":[],"importedBy":[{"uid":"2fd1-34"},{"uid":"2fd1-38"}]},"2fd1-6":{"id":"/src/utils/code.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-7"},"imported":[{"uid":"2fd1-46"}],"importedBy":[{"uid":"2fd1-34"},{"uid":"2fd1-38"}]},"2fd1-8":{"id":"/src/constants/controls.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-9"},"imported":[],"importedBy":[{"uid":"2fd1-10"},{"uid":"2fd1-18"}]},"2fd1-10":{"id":"/src/utils/controls/attrs.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-11"},"imported":[{"uid":"2fd1-46"},{"uid":"2fd1-8"}],"importedBy":[{"uid":"2fd1-51"}]},"2fd1-12":{"id":"/src/utils/controls/dimensionToControls.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-13"},"imported":[],"importedBy":[{"uid":"2fd1-51"}]},"2fd1-14":{"id":"/src/utils/controls/disableControls.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-15"},"imported":[],"importedBy":[{"uid":"2fd1-51"}]},"2fd1-16":{"id":"/src/utils/controls/filterDefaultValues.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-17"},"imported":[{"uid":"2fd1-46"}],"importedBy":[{"uid":"2fd1-40"},{"uid":"2fd1-51"}]},"2fd1-18":{"id":"/src/utils/controls/constants.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-19"},"imported":[{"uid":"2fd1-46"},{"uid":"2fd1-8"}],"importedBy":[{"uid":"2fd1-20"}]},"2fd1-20":{"id":"/src/utils/controls/makeControls.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-21"},"imported":[{"uid":"2fd1-18"}],"importedBy":[{"uid":"2fd1-51"}]},"2fd1-22":{"id":"/src/controls/element.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-23"},"imported":[{"uid":"2fd1-46"}],"importedBy":[{"uid":"2fd1-52"}]},"2fd1-24":{"id":"/src/controls/list.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-25"},"imported":[],"importedBy":[{"uid":"2fd1-52"}]},"2fd1-26":{"id":"/src/controls/overlay.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-27"},"imported":[],"importedBy":[{"uid":"2fd1-52"}]},"2fd1-28":{"id":"/src/controls/rocketstyle.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-29"},"imported":[],"importedBy":[{"uid":"2fd1-52"}]},"2fd1-30":{"id":"/src/controls/text.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-31"},"imported":[{"uid":"2fd1-46"}],"importedBy":[{"uid":"2fd1-52"}]},"2fd1-32":{"id":"/src/utils/controls/valuesToControls.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-33"},"imported":[{"uid":"2fd1-52"}],"importedBy":[{"uid":"2fd1-51"}]},"2fd1-34":{"id":"/src/stories/dimension.tsx","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-35"},"imported":[{"uid":"2fd1-48"},{"uid":"2fd1-46"},{"uid":"2fd1-50"},{"uid":"2fd1-2"},{"uid":"2fd1-4"},{"uid":"2fd1-6"},{"uid":"2fd1-51"}],"importedBy":[{"uid":"2fd1-47"}]},"2fd1-36":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-37"},"imported":[],"importedBy":[{"uid":"2fd1-38"}]},"2fd1-38":{"id":"/src/stories/main.tsx","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-39"},"imported":[{"uid":"2fd1-48"},{"uid":"2fd1-46"},{"uid":"2fd1-4"},{"uid":"2fd1-6"},{"uid":"2fd1-36"},{"uid":"2fd1-51"}],"importedBy":[{"uid":"2fd1-47"}]},"2fd1-40":{"id":"/src/stories/story.tsx","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-41"},"imported":[{"uid":"2fd1-48"},{"uid":"2fd1-51"},{"uid":"2fd1-16"}],"importedBy":[{"uid":"2fd1-47"}]},"2fd1-42":{"id":"/src/rocketstories.tsx","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-43"},"imported":[{"uid":"2fd1-46"},{"uid":"2fd1-0"},{"uid":"2fd1-47"}],"importedBy":[{"uid":"2fd1-44"}]},"2fd1-44":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstories.js":"2fd1-45"},"imported":[{"uid":"2fd1-42"}],"importedBy":[],"isEntry":true},"2fd1-46":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"2fd1-42"},{"uid":"2fd1-0"},{"uid":"2fd1-34"},{"uid":"2fd1-38"},{"uid":"2fd1-2"},{"uid":"2fd1-6"},{"uid":"2fd1-16"},{"uid":"2fd1-10"},{"uid":"2fd1-18"},{"uid":"2fd1-22"},{"uid":"2fd1-30"}],"isExternal":true},"2fd1-47":{"id":"/src/stories/index.ts","moduleParts":{},"imported":[{"uid":"2fd1-34"},{"uid":"2fd1-38"},{"uid":"2fd1-40"}],"importedBy":[{"uid":"2fd1-42"}]},"2fd1-48":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"2fd1-0"},{"uid":"2fd1-34"},{"uid":"2fd1-38"},{"uid":"2fd1-40"},{"uid":"2fd1-2"}],"isExternal":true},"2fd1-49":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"2fd1-0"}],"isExternal":true},"2fd1-50":{"id":"@vitus-labs/elements","moduleParts":{},"imported":[],"importedBy":[{"uid":"2fd1-34"}],"isExternal":true},"2fd1-51":{"id":"/src/utils/controls/index.ts","moduleParts":{},"imported":[{"uid":"2fd1-10"},{"uid":"2fd1-12"},{"uid":"2fd1-14"},{"uid":"2fd1-16"},{"uid":"2fd1-20"},{"uid":"2fd1-32"}],"importedBy":[{"uid":"2fd1-34"},{"uid":"2fd1-38"},{"uid":"2fd1-40"}]},"2fd1-52":{"id":"/src/controls/index.ts","moduleParts":{},"imported":[{"uid":"2fd1-22"},{"uid":"2fd1-24"},{"uid":"2fd1-26"},{"uid":"2fd1-28"},{"uid":"2fd1-30"}],"importedBy":[{"uid":"2fd1-32"}]}},"env":{"rollup":"2.60.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
7064
7064
|
|
|
7065
7065
|
const run = () => {
|
|
7066
7066
|
const width = window.innerWidth;
|
|
@@ -7060,7 +7060,7 @@ var drawChart = (function (exports) {
|
|
|
7060
7060
|
</script>
|
|
7061
7061
|
<script>
|
|
7062
7062
|
/*<!--*/
|
|
7063
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstories.module.js","children":[{"name":"Users/vitbokisch/Dev/vitus-labs/ui-system/packages/rocketstyle/lib/vitus-labs-rocketstyle.module.js","uid":"
|
|
7063
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstories.module.js","children":[{"name":"Users/vitbokisch/Dev/vitus-labs/ui-system/packages/rocketstyle/lib/vitus-labs-rocketstyle.module.js","uid":"2fd1-54"},{"name":"src","children":[{"name":"components/NotFound.tsx","uid":"2fd1-56"},{"name":"utils","children":[{"uid":"2fd1-58","name":"theme.ts"},{"uid":"2fd1-60","name":"code.ts"},{"name":"controls","children":[{"uid":"2fd1-64","name":"attrs.ts"},{"uid":"2fd1-66","name":"dimensionToControls.ts"},{"uid":"2fd1-68","name":"disableControls.ts"},{"uid":"2fd1-70","name":"filterDefaultValues.ts"},{"uid":"2fd1-72","name":"constants.ts"},{"uid":"2fd1-74","name":"makeControls.ts"},{"uid":"2fd1-86","name":"valuesToControls.ts"}]},{"uid":"2fd1-90","name":"dimensions.ts"}]},{"name":"constants/controls.ts","uid":"2fd1-62"},{"name":"controls","children":[{"uid":"2fd1-76","name":"element.ts"},{"uid":"2fd1-78","name":"list.ts"},{"uid":"2fd1-80","name":"overlay.ts"},{"uid":"2fd1-82","name":"rocketstyle.ts"},{"uid":"2fd1-84","name":"text.ts"}]},{"name":"stories","children":[{"uid":"2fd1-88","name":"dimension.tsx"},{"uid":"2fd1-92","name":"main.tsx"},{"uid":"2fd1-94","name":"story.tsx"}]},{"uid":"2fd1-96","name":"rocketstories.tsx"},{"uid":"2fd1-98","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"2fd1-54":{"renderedLength":628,"gzipLength":336,"brotliLength":0,"mainUid":"2fd1-53"},"2fd1-56":{"renderedLength":211,"gzipLength":183,"brotliLength":0,"mainUid":"2fd1-55"},"2fd1-58":{"renderedLength":113,"gzipLength":129,"brotliLength":0,"mainUid":"2fd1-57"},"2fd1-60":{"renderedLength":5176,"gzipLength":1176,"brotliLength":0,"mainUid":"2fd1-59"},"2fd1-62":{"renderedLength":246,"gzipLength":141,"brotliLength":0,"mainUid":"2fd1-61"},"2fd1-64":{"renderedLength":532,"gzipLength":297,"brotliLength":0,"mainUid":"2fd1-63"},"2fd1-66":{"renderedLength":454,"gzipLength":254,"brotliLength":0,"mainUid":"2fd1-65"},"2fd1-68":{"renderedLength":545,"gzipLength":275,"brotliLength":0,"mainUid":"2fd1-67"},"2fd1-70":{"renderedLength":215,"gzipLength":167,"brotliLength":0,"mainUid":"2fd1-69"},"2fd1-72":{"renderedLength":680,"gzipLength":286,"brotliLength":0,"mainUid":"2fd1-71"},"2fd1-74":{"renderedLength":556,"gzipLength":282,"brotliLength":0,"mainUid":"2fd1-73"},"2fd1-76":{"renderedLength":5514,"gzipLength":1011,"brotliLength":0,"mainUid":"2fd1-75"},"2fd1-78":{"renderedLength":1731,"gzipLength":525,"brotliLength":0,"mainUid":"2fd1-77"},"2fd1-80":{"renderedLength":2567,"gzipLength":578,"brotliLength":0,"mainUid":"2fd1-79"},"2fd1-82":{"renderedLength":687,"gzipLength":158,"brotliLength":0,"mainUid":"2fd1-81"},"2fd1-84":{"renderedLength":403,"gzipLength":149,"brotliLength":0,"mainUid":"2fd1-83"},"2fd1-86":{"renderedLength":2589,"gzipLength":757,"brotliLength":0,"mainUid":"2fd1-85"},"2fd1-88":{"renderedLength":5461,"gzipLength":1250,"brotliLength":0,"mainUid":"2fd1-87"},"2fd1-90":{"renderedLength":339,"gzipLength":238,"brotliLength":0,"mainUid":"2fd1-89"},"2fd1-92":{"renderedLength":2574,"gzipLength":713,"brotliLength":0,"mainUid":"2fd1-91"},"2fd1-94":{"renderedLength":639,"gzipLength":288,"brotliLength":0,"mainUid":"2fd1-93"},"2fd1-96":{"renderedLength":3262,"gzipLength":693,"brotliLength":0,"mainUid":"2fd1-95"},"2fd1-98":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"2fd1-97"}},"nodeMetas":{"2fd1-53":{"id":"/Users/vitbokisch/Dev/vitus-labs/ui-system/packages/rocketstyle/lib/vitus-labs-rocketstyle.module.js","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-54"},"imported":[{"uid":"2fd1-99"},{"uid":"2fd1-101"},{"uid":"2fd1-102"}],"importedBy":[{"uid":"2fd1-95"}]},"2fd1-55":{"id":"/src/components/NotFound.tsx","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-56"},"imported":[{"uid":"2fd1-101"},{"uid":"2fd1-99"}],"importedBy":[{"uid":"2fd1-87"}]},"2fd1-57":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-58"},"imported":[],"importedBy":[{"uid":"2fd1-87"},{"uid":"2fd1-91"}]},"2fd1-59":{"id":"/src/utils/code.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-60"},"imported":[{"uid":"2fd1-99"}],"importedBy":[{"uid":"2fd1-87"},{"uid":"2fd1-91"}]},"2fd1-61":{"id":"/src/constants/controls.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-62"},"imported":[],"importedBy":[{"uid":"2fd1-63"},{"uid":"2fd1-71"}]},"2fd1-63":{"id":"/src/utils/controls/attrs.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-64"},"imported":[{"uid":"2fd1-99"},{"uid":"2fd1-61"}],"importedBy":[{"uid":"2fd1-104"}]},"2fd1-65":{"id":"/src/utils/controls/dimensionToControls.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-66"},"imported":[],"importedBy":[{"uid":"2fd1-104"}]},"2fd1-67":{"id":"/src/utils/controls/disableControls.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-68"},"imported":[],"importedBy":[{"uid":"2fd1-104"}]},"2fd1-69":{"id":"/src/utils/controls/filterDefaultValues.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-70"},"imported":[{"uid":"2fd1-99"}],"importedBy":[{"uid":"2fd1-93"},{"uid":"2fd1-104"}]},"2fd1-71":{"id":"/src/utils/controls/constants.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-72"},"imported":[{"uid":"2fd1-99"},{"uid":"2fd1-61"}],"importedBy":[{"uid":"2fd1-73"}]},"2fd1-73":{"id":"/src/utils/controls/makeControls.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-74"},"imported":[{"uid":"2fd1-71"}],"importedBy":[{"uid":"2fd1-104"}]},"2fd1-75":{"id":"/src/controls/element.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-76"},"imported":[{"uid":"2fd1-99"}],"importedBy":[{"uid":"2fd1-105"}]},"2fd1-77":{"id":"/src/controls/list.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-78"},"imported":[],"importedBy":[{"uid":"2fd1-105"}]},"2fd1-79":{"id":"/src/controls/overlay.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-80"},"imported":[],"importedBy":[{"uid":"2fd1-105"}]},"2fd1-81":{"id":"/src/controls/rocketstyle.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-82"},"imported":[],"importedBy":[{"uid":"2fd1-105"}]},"2fd1-83":{"id":"/src/controls/text.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-84"},"imported":[{"uid":"2fd1-99"}],"importedBy":[{"uid":"2fd1-105"}]},"2fd1-85":{"id":"/src/utils/controls/valuesToControls.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-86"},"imported":[{"uid":"2fd1-105"}],"importedBy":[{"uid":"2fd1-104"}]},"2fd1-87":{"id":"/src/stories/dimension.tsx","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-88"},"imported":[{"uid":"2fd1-101"},{"uid":"2fd1-99"},{"uid":"2fd1-103"},{"uid":"2fd1-55"},{"uid":"2fd1-57"},{"uid":"2fd1-59"},{"uid":"2fd1-104"}],"importedBy":[{"uid":"2fd1-100"}]},"2fd1-89":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-90"},"imported":[],"importedBy":[{"uid":"2fd1-91"}]},"2fd1-91":{"id":"/src/stories/main.tsx","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-92"},"imported":[{"uid":"2fd1-101"},{"uid":"2fd1-99"},{"uid":"2fd1-57"},{"uid":"2fd1-59"},{"uid":"2fd1-89"},{"uid":"2fd1-104"}],"importedBy":[{"uid":"2fd1-100"}]},"2fd1-93":{"id":"/src/stories/story.tsx","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-94"},"imported":[{"uid":"2fd1-101"},{"uid":"2fd1-104"},{"uid":"2fd1-69"}],"importedBy":[{"uid":"2fd1-100"}]},"2fd1-95":{"id":"/src/rocketstories.tsx","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-96"},"imported":[{"uid":"2fd1-99"},{"uid":"2fd1-53"},{"uid":"2fd1-100"}],"importedBy":[{"uid":"2fd1-97"}]},"2fd1-97":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"2fd1-98"},"imported":[{"uid":"2fd1-95"}],"importedBy":[],"isEntry":true},"2fd1-99":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"2fd1-95"},{"uid":"2fd1-53"},{"uid":"2fd1-87"},{"uid":"2fd1-91"},{"uid":"2fd1-55"},{"uid":"2fd1-59"},{"uid":"2fd1-69"},{"uid":"2fd1-63"},{"uid":"2fd1-71"},{"uid":"2fd1-75"},{"uid":"2fd1-83"}],"isExternal":true},"2fd1-100":{"id":"/src/stories/index.ts","moduleParts":{},"imported":[{"uid":"2fd1-87"},{"uid":"2fd1-91"},{"uid":"2fd1-93"}],"importedBy":[{"uid":"2fd1-95"}]},"2fd1-101":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"2fd1-53"},{"uid":"2fd1-87"},{"uid":"2fd1-91"},{"uid":"2fd1-93"},{"uid":"2fd1-55"}],"isExternal":true},"2fd1-102":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"2fd1-53"}],"isExternal":true},"2fd1-103":{"id":"@vitus-labs/elements","moduleParts":{},"imported":[],"importedBy":[{"uid":"2fd1-87"}],"isExternal":true},"2fd1-104":{"id":"/src/utils/controls/index.ts","moduleParts":{},"imported":[{"uid":"2fd1-63"},{"uid":"2fd1-65"},{"uid":"2fd1-67"},{"uid":"2fd1-69"},{"uid":"2fd1-73"},{"uid":"2fd1-85"}],"importedBy":[{"uid":"2fd1-87"},{"uid":"2fd1-91"},{"uid":"2fd1-93"}]},"2fd1-105":{"id":"/src/controls/index.ts","moduleParts":{},"imported":[{"uid":"2fd1-75"},{"uid":"2fd1-77"},{"uid":"2fd1-79"},{"uid":"2fd1-81"},{"uid":"2fd1-83"}],"importedBy":[{"uid":"2fd1-85"}]}},"env":{"rollup":"2.60.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
7064
7064
|
|
|
7065
7065
|
const run = () => {
|
|
7066
7066
|
const width = window.innerWidth;
|
|
@@ -7060,7 +7060,7 @@ var drawChart = (function (exports) {
|
|
|
7060
7060
|
</script>
|
|
7061
7061
|
<script>
|
|
7062
7062
|
/*<!--*/
|
|
7063
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstories.umd.js","children":[{"name":"Users/vitbokisch/Dev/vitus-labs/ui-system/packages/rocketstyle/lib/vitus-labs-rocketstyle.module.js","uid":"
|
|
7063
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstories.umd.js","children":[{"name":"Users/vitbokisch/Dev/vitus-labs/ui-system/packages/rocketstyle/lib/vitus-labs-rocketstyle.module.js","uid":"2fd1-107"},{"name":"src","children":[{"name":"components/NotFound.tsx","uid":"2fd1-109"},{"name":"utils","children":[{"uid":"2fd1-111","name":"theme.ts"},{"uid":"2fd1-113","name":"code.ts"},{"name":"controls","children":[{"uid":"2fd1-117","name":"attrs.ts"},{"uid":"2fd1-119","name":"dimensionToControls.ts"},{"uid":"2fd1-121","name":"disableControls.ts"},{"uid":"2fd1-123","name":"filterDefaultValues.ts"},{"uid":"2fd1-125","name":"constants.ts"},{"uid":"2fd1-127","name":"makeControls.ts"},{"uid":"2fd1-139","name":"valuesToControls.ts"}]},{"uid":"2fd1-143","name":"dimensions.ts"}]},{"name":"constants/controls.ts","uid":"2fd1-115"},{"name":"controls","children":[{"uid":"2fd1-129","name":"element.ts"},{"uid":"2fd1-131","name":"list.ts"},{"uid":"2fd1-133","name":"overlay.ts"},{"uid":"2fd1-135","name":"rocketstyle.ts"},{"uid":"2fd1-137","name":"text.ts"}]},{"name":"stories","children":[{"uid":"2fd1-141","name":"dimension.tsx"},{"uid":"2fd1-145","name":"main.tsx"},{"uid":"2fd1-147","name":"story.tsx"}]},{"uid":"2fd1-149","name":"rocketstories.tsx"},{"uid":"2fd1-151","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"2fd1-107":{"renderedLength":754,"gzipLength":348,"brotliLength":0,"mainUid":"2fd1-106"},"2fd1-109":{"renderedLength":248,"gzipLength":203,"brotliLength":0,"mainUid":"2fd1-108"},"2fd1-111":{"renderedLength":121,"gzipLength":132,"brotliLength":0,"mainUid":"2fd1-110"},"2fd1-113":{"renderedLength":5807,"gzipLength":1201,"brotliLength":0,"mainUid":"2fd1-112"},"2fd1-115":{"renderedLength":310,"gzipLength":147,"brotliLength":0,"mainUid":"2fd1-114"},"2fd1-117":{"renderedLength":593,"gzipLength":307,"brotliLength":0,"mainUid":"2fd1-116"},"2fd1-119":{"renderedLength":498,"gzipLength":257,"brotliLength":0,"mainUid":"2fd1-118"},"2fd1-121":{"renderedLength":601,"gzipLength":276,"brotliLength":0,"mainUid":"2fd1-120"},"2fd1-123":{"renderedLength":244,"gzipLength":171,"brotliLength":0,"mainUid":"2fd1-122"},"2fd1-125":{"renderedLength":793,"gzipLength":296,"brotliLength":0,"mainUid":"2fd1-124"},"2fd1-127":{"renderedLength":620,"gzipLength":286,"brotliLength":0,"mainUid":"2fd1-126"},"2fd1-129":{"renderedLength":6155,"gzipLength":1029,"brotliLength":0,"mainUid":"2fd1-128"},"2fd1-131":{"renderedLength":1935,"gzipLength":531,"brotliLength":0,"mainUid":"2fd1-130"},"2fd1-133":{"renderedLength":2943,"gzipLength":588,"brotliLength":0,"mainUid":"2fd1-132"},"2fd1-135":{"renderedLength":831,"gzipLength":164,"brotliLength":0,"mainUid":"2fd1-134"},"2fd1-137":{"renderedLength":500,"gzipLength":157,"brotliLength":0,"mainUid":"2fd1-136"},"2fd1-139":{"renderedLength":2893,"gzipLength":767,"brotliLength":0,"mainUid":"2fd1-138"},"2fd1-141":{"renderedLength":6229,"gzipLength":1287,"brotliLength":0,"mainUid":"2fd1-140"},"2fd1-143":{"renderedLength":371,"gzipLength":242,"brotliLength":0,"mainUid":"2fd1-142"},"2fd1-145":{"renderedLength":2869,"gzipLength":740,"brotliLength":0,"mainUid":"2fd1-144"},"2fd1-147":{"renderedLength":721,"gzipLength":297,"brotliLength":0,"mainUid":"2fd1-146"},"2fd1-149":{"renderedLength":3622,"gzipLength":706,"brotliLength":0,"mainUid":"2fd1-148"},"2fd1-151":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"2fd1-150"}},"nodeMetas":{"2fd1-106":{"id":"/Users/vitbokisch/Dev/vitus-labs/ui-system/packages/rocketstyle/lib/vitus-labs-rocketstyle.module.js","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-107"},"imported":[{"uid":"2fd1-152"},{"uid":"2fd1-154"},{"uid":"2fd1-155"}],"importedBy":[{"uid":"2fd1-148"}]},"2fd1-108":{"id":"/src/components/NotFound.tsx","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-109"},"imported":[{"uid":"2fd1-154"},{"uid":"2fd1-152"}],"importedBy":[{"uid":"2fd1-140"}]},"2fd1-110":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-111"},"imported":[],"importedBy":[{"uid":"2fd1-140"},{"uid":"2fd1-144"}]},"2fd1-112":{"id":"/src/utils/code.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-113"},"imported":[{"uid":"2fd1-152"}],"importedBy":[{"uid":"2fd1-140"},{"uid":"2fd1-144"}]},"2fd1-114":{"id":"/src/constants/controls.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-115"},"imported":[],"importedBy":[{"uid":"2fd1-116"},{"uid":"2fd1-124"}]},"2fd1-116":{"id":"/src/utils/controls/attrs.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-117"},"imported":[{"uid":"2fd1-152"},{"uid":"2fd1-114"}],"importedBy":[{"uid":"2fd1-157"}]},"2fd1-118":{"id":"/src/utils/controls/dimensionToControls.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-119"},"imported":[],"importedBy":[{"uid":"2fd1-157"}]},"2fd1-120":{"id":"/src/utils/controls/disableControls.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-121"},"imported":[],"importedBy":[{"uid":"2fd1-157"}]},"2fd1-122":{"id":"/src/utils/controls/filterDefaultValues.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-123"},"imported":[{"uid":"2fd1-152"}],"importedBy":[{"uid":"2fd1-146"},{"uid":"2fd1-157"}]},"2fd1-124":{"id":"/src/utils/controls/constants.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-125"},"imported":[{"uid":"2fd1-152"},{"uid":"2fd1-114"}],"importedBy":[{"uid":"2fd1-126"}]},"2fd1-126":{"id":"/src/utils/controls/makeControls.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-127"},"imported":[{"uid":"2fd1-124"}],"importedBy":[{"uid":"2fd1-157"}]},"2fd1-128":{"id":"/src/controls/element.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-129"},"imported":[{"uid":"2fd1-152"}],"importedBy":[{"uid":"2fd1-158"}]},"2fd1-130":{"id":"/src/controls/list.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-131"},"imported":[],"importedBy":[{"uid":"2fd1-158"}]},"2fd1-132":{"id":"/src/controls/overlay.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-133"},"imported":[],"importedBy":[{"uid":"2fd1-158"}]},"2fd1-134":{"id":"/src/controls/rocketstyle.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-135"},"imported":[],"importedBy":[{"uid":"2fd1-158"}]},"2fd1-136":{"id":"/src/controls/text.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-137"},"imported":[{"uid":"2fd1-152"}],"importedBy":[{"uid":"2fd1-158"}]},"2fd1-138":{"id":"/src/utils/controls/valuesToControls.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-139"},"imported":[{"uid":"2fd1-158"}],"importedBy":[{"uid":"2fd1-157"}]},"2fd1-140":{"id":"/src/stories/dimension.tsx","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-141"},"imported":[{"uid":"2fd1-154"},{"uid":"2fd1-152"},{"uid":"2fd1-156"},{"uid":"2fd1-108"},{"uid":"2fd1-110"},{"uid":"2fd1-112"},{"uid":"2fd1-157"}],"importedBy":[{"uid":"2fd1-153"}]},"2fd1-142":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-143"},"imported":[],"importedBy":[{"uid":"2fd1-144"}]},"2fd1-144":{"id":"/src/stories/main.tsx","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-145"},"imported":[{"uid":"2fd1-154"},{"uid":"2fd1-152"},{"uid":"2fd1-110"},{"uid":"2fd1-112"},{"uid":"2fd1-142"},{"uid":"2fd1-157"}],"importedBy":[{"uid":"2fd1-153"}]},"2fd1-146":{"id":"/src/stories/story.tsx","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-147"},"imported":[{"uid":"2fd1-154"},{"uid":"2fd1-157"},{"uid":"2fd1-122"}],"importedBy":[{"uid":"2fd1-153"}]},"2fd1-148":{"id":"/src/rocketstories.tsx","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-149"},"imported":[{"uid":"2fd1-152"},{"uid":"2fd1-106"},{"uid":"2fd1-153"}],"importedBy":[{"uid":"2fd1-150"}]},"2fd1-150":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"2fd1-151"},"imported":[{"uid":"2fd1-148"}],"importedBy":[],"isEntry":true},"2fd1-152":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"2fd1-148"},{"uid":"2fd1-106"},{"uid":"2fd1-140"},{"uid":"2fd1-144"},{"uid":"2fd1-108"},{"uid":"2fd1-112"},{"uid":"2fd1-122"},{"uid":"2fd1-116"},{"uid":"2fd1-124"},{"uid":"2fd1-128"},{"uid":"2fd1-136"}],"isExternal":true},"2fd1-153":{"id":"/src/stories/index.ts","moduleParts":{},"imported":[{"uid":"2fd1-140"},{"uid":"2fd1-144"},{"uid":"2fd1-146"}],"importedBy":[{"uid":"2fd1-148"}]},"2fd1-154":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"2fd1-106"},{"uid":"2fd1-140"},{"uid":"2fd1-144"},{"uid":"2fd1-146"},{"uid":"2fd1-108"}],"isExternal":true},"2fd1-155":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"2fd1-106"}],"isExternal":true},"2fd1-156":{"id":"@vitus-labs/elements","moduleParts":{},"imported":[],"importedBy":[{"uid":"2fd1-140"}],"isExternal":true},"2fd1-157":{"id":"/src/utils/controls/index.ts","moduleParts":{},"imported":[{"uid":"2fd1-116"},{"uid":"2fd1-118"},{"uid":"2fd1-120"},{"uid":"2fd1-122"},{"uid":"2fd1-126"},{"uid":"2fd1-138"}],"importedBy":[{"uid":"2fd1-140"},{"uid":"2fd1-144"},{"uid":"2fd1-146"}]},"2fd1-158":{"id":"/src/controls/index.ts","moduleParts":{},"imported":[{"uid":"2fd1-128"},{"uid":"2fd1-130"},{"uid":"2fd1-132"},{"uid":"2fd1-134"},{"uid":"2fd1-136"}],"importedBy":[{"uid":"2fd1-138"}]}},"env":{"rollup":"2.60.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
7064
7064
|
|
|
7065
7065
|
const run = () => {
|
|
7066
7066
|
const width = window.innerWidth;
|
package/lib/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ declare type AttrsTypes<P, H = ExtractProps<P>> = {
|
|
|
30
30
|
disable: true;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
declare type Configuration<C =
|
|
33
|
+
declare type Configuration<C = any> = {
|
|
34
34
|
attrs: AttrsTypes<C>;
|
|
35
35
|
name: string;
|
|
36
36
|
component: Element | RocketComponent;
|
|
@@ -41,6 +41,7 @@ declare type Configuration<C = unknown> = {
|
|
|
41
41
|
gap: number;
|
|
42
42
|
pseudo: true;
|
|
43
43
|
}>;
|
|
44
|
+
decorators: any[];
|
|
44
45
|
};
|
|
45
46
|
|
|
46
47
|
declare type MakeDimensionStories = ({ name, component, dimension, attrs, }: {
|
|
@@ -69,13 +70,16 @@ declare type Story = ({ component, attrs, }: {
|
|
|
69
70
|
};
|
|
70
71
|
declare const story: Story;
|
|
71
72
|
|
|
72
|
-
declare type
|
|
73
|
+
declare type Init = ({ decorators, storyOptions, }: Partial<Pick<Configuration, 'decorators' | 'storyOptions'>>) => <T extends Element | RocketComponent = any>(component: T) => T extends RocketComponent ? ReturnType<CreateRocketStories<T>> : ReturnType<CreateStories<T>>;
|
|
74
|
+
declare const init: Init;
|
|
75
|
+
declare type Rocketstories = <T extends Element | RocketComponent = any>(component: T, { decorators, storyOptions, }?: Partial<Pick<Configuration<T>, 'storyOptions' | 'decorators'>> | any) => T extends RocketComponent ? ReturnType<CreateRocketStories<T>> : ReturnType<CreateStories<T>>;
|
|
73
76
|
declare const rocketstories: Rocketstories;
|
|
74
77
|
declare type CreateStories<C = Element> = (options: Partial<Configuration>, defaultOptions: Configuration) => {
|
|
75
78
|
attrs: (params: AttrsTypes<C>) => ReturnType<CreateStories<C>>;
|
|
76
79
|
config: () => {
|
|
77
80
|
component: Element;
|
|
78
81
|
title: string;
|
|
82
|
+
decorators?: Configuration['decorators'];
|
|
79
83
|
};
|
|
80
84
|
main: () => ReturnType<typeof story>;
|
|
81
85
|
};
|
|
@@ -93,4 +97,4 @@ declare type CreateRocketStories<C extends RocketComponent = any> = (options: Pa
|
|
|
93
97
|
}>) => ReturnType<typeof makeDimensionStories>;
|
|
94
98
|
};
|
|
95
99
|
|
|
96
|
-
export { rocketstories as default };
|
|
100
|
+
export { rocketstories as default, init };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { dimensionStory, mainStory, generalStory } from './stories';
|
|
2
2
|
import type { Element, RocketComponent, Configuration, AttrsTypes } from './types';
|
|
3
|
-
declare type
|
|
3
|
+
declare type Init = ({ decorators, storyOptions, }: Partial<Pick<Configuration, 'decorators' | 'storyOptions'>>) => <T extends Element | RocketComponent = any>(component: T) => T extends RocketComponent ? ReturnType<CreateRocketStories<T>> : ReturnType<CreateStories<T>>;
|
|
4
|
+
declare const init: Init;
|
|
5
|
+
declare type Rocketstories = <T extends Element | RocketComponent = any>(component: T, { decorators, storyOptions, }?: Partial<Pick<Configuration<T>, 'storyOptions' | 'decorators'>> | any) => T extends RocketComponent ? ReturnType<CreateRocketStories<T>> : ReturnType<CreateStories<T>>;
|
|
4
6
|
declare const rocketstories: Rocketstories;
|
|
5
7
|
declare type CreateStories<C = Element> = (options: Partial<Configuration>, defaultOptions: Configuration) => {
|
|
6
8
|
attrs: (params: AttrsTypes<C>) => ReturnType<CreateStories<C>>;
|
|
7
9
|
config: () => {
|
|
8
10
|
component: Element;
|
|
9
11
|
title: string;
|
|
12
|
+
decorators?: Configuration['decorators'];
|
|
10
13
|
};
|
|
11
14
|
main: () => ReturnType<typeof generalStory>;
|
|
12
15
|
};
|
|
@@ -23,4 +26,5 @@ declare type CreateRocketStories<C extends RocketComponent = any> = (options: Pa
|
|
|
23
26
|
ignore: any;
|
|
24
27
|
}>) => ReturnType<typeof dimensionStory>;
|
|
25
28
|
};
|
|
29
|
+
export { init };
|
|
26
30
|
export default rocketstories;
|
package/lib/types/types.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export declare type AttrsTypes<P, H = ExtractProps<P>> = {
|
|
|
52
52
|
disable: true;
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
|
-
export declare type Configuration<C =
|
|
55
|
+
export declare type Configuration<C = any> = {
|
|
56
56
|
attrs: AttrsTypes<C>;
|
|
57
57
|
name: string;
|
|
58
58
|
component: Element | RocketComponent;
|
|
@@ -63,6 +63,7 @@ export declare type Configuration<C = unknown> = {
|
|
|
63
63
|
gap: number;
|
|
64
64
|
pseudo: true;
|
|
65
65
|
}>;
|
|
66
|
+
decorators: any[];
|
|
66
67
|
};
|
|
67
68
|
export declare type SimpleValue = string | number | boolean;
|
|
68
69
|
export declare type Obj = Record<string, SimpleValue | Array<SimpleValue>>;
|
|
@@ -6,25 +6,11 @@ var core = require('@vitus-labs/core');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
require('hoist-non-react-statics');
|
|
8
8
|
var elements = require('@vitus-labs/elements');
|
|
9
|
-
var unistyle = require('@vitus-labs/unistyle');
|
|
10
9
|
|
|
11
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
11
|
|
|
13
12
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
13
|
|
|
15
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
16
|
-
const Provider = ({ theme, mode, children, inversed, provider: RocketstyleProvider = core.Provider, }) => {
|
|
17
|
-
if (inversed) {
|
|
18
|
-
const { provider: InnerProvider, mode: ctxMode, ...ctx } = React.useContext(core.context);
|
|
19
|
-
const isDark = ctxMode === 'dark';
|
|
20
|
-
const inversedTheme = isDark ? 'light' : 'dark';
|
|
21
|
-
if (!InnerProvider)
|
|
22
|
-
return React__default["default"].createElement(React__default["default"].Fragment, null, children);
|
|
23
|
-
return (React__default["default"].createElement(InnerProvider, { mode: inversedTheme, isDark: isDark, isLight: !isDark, ...ctx }, children));
|
|
24
|
-
}
|
|
25
|
-
const isDark = mode === 'dark';
|
|
26
|
-
return (React__default["default"].createElement(RocketstyleProvider, { mode: mode, isDark: isDark, isLight: !isDark, theme: theme, provider: RocketstyleProvider }, children));
|
|
27
|
-
};
|
|
28
14
|
const THEME_MODES = {
|
|
29
15
|
light: true,
|
|
30
16
|
dark: true,
|
|
@@ -984,26 +970,25 @@ const story = ({ component, attrs }) => {
|
|
|
984
970
|
return Enhanced;
|
|
985
971
|
};
|
|
986
972
|
|
|
987
|
-
|
|
988
|
-
const ThemeDecorator = (Story) => (React__default["default"].createElement(Provider, { provider: unistyle.Provider, mode: "light", theme: getTheme() },
|
|
989
|
-
React__default["default"].createElement(Story, null)));
|
|
990
|
-
|
|
991
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
973
|
+
const init = ({ decorators = [], storyOptions = {} }) => (component) => rocketstories(component, { decorators, storyOptions });
|
|
992
974
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
993
975
|
// @ts-ignore
|
|
994
|
-
const rocketstories = (component) => {
|
|
976
|
+
const rocketstories = (component, { decorators = [], storyOptions = {} } = {}) => {
|
|
995
977
|
if (!isRocketComponent(component)) {
|
|
996
978
|
return createStories({
|
|
997
979
|
component,
|
|
998
980
|
name: component.displayName || component.name,
|
|
999
981
|
attrs: {},
|
|
1000
|
-
storyOptions: { gap: 16 },
|
|
982
|
+
storyOptions: { gap: 16, direction: 'rows', ...storyOptions },
|
|
983
|
+
decorators,
|
|
1001
984
|
}, {});
|
|
1002
985
|
}
|
|
1003
986
|
return createRocketstories({
|
|
1004
987
|
component,
|
|
1005
988
|
name: component.displayName || component.name,
|
|
1006
989
|
attrs: {},
|
|
990
|
+
storyOptions: { gap: 16, direction: 'rows', ...storyOptions },
|
|
991
|
+
decorators,
|
|
1007
992
|
}, {});
|
|
1008
993
|
};
|
|
1009
994
|
const createStories = (options, defaultOptions) => {
|
|
@@ -1015,6 +1000,10 @@ const createStories = (options, defaultOptions) => {
|
|
|
1015
1000
|
component: options.component || defaultOptions.component,
|
|
1016
1001
|
attrs: { ...defaultOptions.attrs, ...options.attrs },
|
|
1017
1002
|
storyOptions: { ...defaultOptions.storyOptions, ...options.storyOptions },
|
|
1003
|
+
decorators: [
|
|
1004
|
+
...(defaultOptions.decorators || []),
|
|
1005
|
+
...(options.decorators || []),
|
|
1006
|
+
],
|
|
1018
1007
|
};
|
|
1019
1008
|
return {
|
|
1020
1009
|
attrs: (attrs) => createStories({ attrs }, result),
|
|
@@ -1022,7 +1011,7 @@ const createStories = (options, defaultOptions) => {
|
|
|
1022
1011
|
config: () => ({
|
|
1023
1012
|
component: result.component,
|
|
1024
1013
|
title: result.name,
|
|
1025
|
-
decorators:
|
|
1014
|
+
decorators: result.decorators,
|
|
1026
1015
|
}),
|
|
1027
1016
|
main: () => story(result),
|
|
1028
1017
|
};
|
|
@@ -1036,6 +1025,10 @@ const createRocketstories = (options, defaultOptions) => {
|
|
|
1036
1025
|
component: options.component || defaultOptions.component,
|
|
1037
1026
|
attrs: { ...defaultOptions.attrs, ...options.attrs },
|
|
1038
1027
|
storyOptions: { ...defaultOptions.storyOptions, ...options.storyOptions },
|
|
1028
|
+
decorators: [
|
|
1029
|
+
...(defaultOptions.decorators || []),
|
|
1030
|
+
...(options.decorators || []),
|
|
1031
|
+
],
|
|
1039
1032
|
};
|
|
1040
1033
|
return {
|
|
1041
1034
|
attrs: (attrs) => createRocketstories({ attrs }, result),
|
|
@@ -1043,7 +1036,7 @@ const createRocketstories = (options, defaultOptions) => {
|
|
|
1043
1036
|
config: () => ({
|
|
1044
1037
|
component: result.component,
|
|
1045
1038
|
title: result.name,
|
|
1046
|
-
decorators:
|
|
1039
|
+
decorators: result.decorators,
|
|
1047
1040
|
}),
|
|
1048
1041
|
// generate main story
|
|
1049
1042
|
main: () => mainStory(result),
|
|
@@ -1064,4 +1057,5 @@ const createRocketstories = (options, defaultOptions) => {
|
|
|
1064
1057
|
};
|
|
1065
1058
|
|
|
1066
1059
|
exports["default"] = rocketstories;
|
|
1060
|
+
exports.init = init;
|
|
1067
1061
|
//# sourceMappingURL=vitus-labs-rocketstories.js.map
|