@vitus-labs/rocketstories 0.16.0-alpha.0 → 0.17.1
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 +14 -2
- package/lib/types/rocketstories.d.ts +4 -1
- package/lib/types/stories/dimension.d.ts +4 -2
- package/lib/types/types.d.ts +7 -0
- package/lib/vitus-labs-rocketstories.js +65 -11
- package/lib/vitus-labs-rocketstories.js.map +1 -1
- package/lib/vitus-labs-rocketstories.module.js +66 -12
- package/lib/vitus-labs-rocketstories.module.js.map +1 -1
- package/lib/vitus-labs-rocketstories.umd.js +68 -15
- 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":"68f2-1"},{"name":"src","children":[{"name":"components/NotFound.tsx","uid":"68f2-3"},{"name":"utils","children":[{"uid":"68f2-5","name":"theme.ts"},{"uid":"68f2-7","name":"code.ts"},{"name":"controls","children":[{"uid":"68f2-11","name":"attrs.ts"},{"uid":"68f2-13","name":"dimensionToControls.ts"},{"uid":"68f2-15","name":"disableControls.ts"},{"uid":"68f2-17","name":"filterDefaultValues.ts"},{"uid":"68f2-19","name":"constants.ts"},{"uid":"68f2-21","name":"makeControls.ts"},{"uid":"68f2-33","name":"valuesToControls.ts"}]},{"uid":"68f2-37","name":"dimensions.ts"}]},{"name":"constants/controls.ts","uid":"68f2-9"},{"name":"controls","children":[{"uid":"68f2-23","name":"element.ts"},{"uid":"68f2-25","name":"list.ts"},{"uid":"68f2-27","name":"overlay.ts"},{"uid":"68f2-29","name":"rocketstyle.ts"},{"uid":"68f2-31","name":"text.ts"}]},{"name":"stories","children":[{"uid":"68f2-35","name":"dimension.tsx"},{"uid":"68f2-39","name":"main.tsx"},{"uid":"68f2-41","name":"story.tsx"}]},{"name":"decorators/Theme.tsx","uid":"68f2-43"},{"uid":"68f2-45","name":"rocketstories.tsx"},{"uid":"68f2-47","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"68f2-1":{"renderedLength":1544,"gzipLength":619,"brotliLength":0,"mainUid":"68f2-0"},"68f2-3":{"renderedLength":236,"gzipLength":202,"brotliLength":0,"mainUid":"68f2-2"},"68f2-5":{"renderedLength":113,"gzipLength":129,"brotliLength":0,"mainUid":"68f2-4"},"68f2-7":{"renderedLength":5191,"gzipLength":1178,"brotliLength":0,"mainUid":"68f2-6"},"68f2-9":{"renderedLength":246,"gzipLength":141,"brotliLength":0,"mainUid":"68f2-8"},"68f2-11":{"renderedLength":537,"gzipLength":300,"brotliLength":0,"mainUid":"68f2-10"},"68f2-13":{"renderedLength":454,"gzipLength":254,"brotliLength":0,"mainUid":"68f2-12"},"68f2-15":{"renderedLength":545,"gzipLength":275,"brotliLength":0,"mainUid":"68f2-14"},"68f2-17":{"renderedLength":220,"gzipLength":170,"brotliLength":0,"mainUid":"68f2-16"},"68f2-19":{"renderedLength":685,"gzipLength":291,"brotliLength":0,"mainUid":"68f2-18"},"68f2-21":{"renderedLength":556,"gzipLength":282,"brotliLength":0,"mainUid":"68f2-20"},"68f2-23":{"renderedLength":5519,"gzipLength":1015,"brotliLength":0,"mainUid":"68f2-22"},"68f2-25":{"renderedLength":1731,"gzipLength":525,"brotliLength":0,"mainUid":"68f2-24"},"68f2-27":{"renderedLength":2567,"gzipLength":578,"brotliLength":0,"mainUid":"68f2-26"},"68f2-29":{"renderedLength":687,"gzipLength":158,"brotliLength":0,"mainUid":"68f2-28"},"68f2-31":{"renderedLength":408,"gzipLength":154,"brotliLength":0,"mainUid":"68f2-30"},"68f2-33":{"renderedLength":2589,"gzipLength":757,"brotliLength":0,"mainUid":"68f2-32"},"68f2-35":{"renderedLength":5777,"gzipLength":1278,"brotliLength":0,"mainUid":"68f2-34"},"68f2-37":{"renderedLength":339,"gzipLength":238,"brotliLength":0,"mainUid":"68f2-36"},"68f2-39":{"renderedLength":2625,"gzipLength":730,"brotliLength":0,"mainUid":"68f2-38"},"68f2-41":{"renderedLength":645,"gzipLength":293,"brotliLength":0,"mainUid":"68f2-40"},"68f2-43":{"renderedLength":269,"gzipLength":197,"brotliLength":0,"mainUid":"68f2-42"},"68f2-45":{"renderedLength":2749,"gzipLength":627,"brotliLength":0,"mainUid":"68f2-44"},"68f2-47":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"68f2-46"}},"nodeMetas":{"68f2-0":{"id":"/Users/vitbokisch/Dev/vitus-labs/ui-system/packages/rocketstyle/lib/vitus-labs-rocketstyle.module.js","moduleParts":{"vitus-labs-rocketstories.js":"68f2-1"},"imported":[{"uid":"68f2-48"},{"uid":"68f2-50"},{"uid":"68f2-51"}],"importedBy":[{"uid":"68f2-44"},{"uid":"68f2-42"}]},"68f2-2":{"id":"/src/components/NotFound.tsx","moduleParts":{"vitus-labs-rocketstories.js":"68f2-3"},"imported":[{"uid":"68f2-50"},{"uid":"68f2-48"}],"importedBy":[{"uid":"68f2-34"}]},"68f2-4":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-5"},"imported":[],"importedBy":[{"uid":"68f2-42"},{"uid":"68f2-34"},{"uid":"68f2-38"}]},"68f2-6":{"id":"/src/utils/code.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-7"},"imported":[{"uid":"68f2-48"}],"importedBy":[{"uid":"68f2-34"},{"uid":"68f2-38"}]},"68f2-8":{"id":"/src/constants/controls.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-9"},"imported":[],"importedBy":[{"uid":"68f2-10"},{"uid":"68f2-18"}]},"68f2-10":{"id":"/src/utils/controls/attrs.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-11"},"imported":[{"uid":"68f2-48"},{"uid":"68f2-8"}],"importedBy":[{"uid":"68f2-54"}]},"68f2-12":{"id":"/src/utils/controls/dimensionToControls.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-13"},"imported":[],"importedBy":[{"uid":"68f2-54"}]},"68f2-14":{"id":"/src/utils/controls/disableControls.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-15"},"imported":[],"importedBy":[{"uid":"68f2-54"}]},"68f2-16":{"id":"/src/utils/controls/filterDefaultValues.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-17"},"imported":[{"uid":"68f2-48"}],"importedBy":[{"uid":"68f2-40"},{"uid":"68f2-54"}]},"68f2-18":{"id":"/src/utils/controls/constants.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-19"},"imported":[{"uid":"68f2-48"},{"uid":"68f2-8"}],"importedBy":[{"uid":"68f2-20"}]},"68f2-20":{"id":"/src/utils/controls/makeControls.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-21"},"imported":[{"uid":"68f2-18"}],"importedBy":[{"uid":"68f2-54"}]},"68f2-22":{"id":"/src/controls/element.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-23"},"imported":[{"uid":"68f2-48"}],"importedBy":[{"uid":"68f2-55"}]},"68f2-24":{"id":"/src/controls/list.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-25"},"imported":[],"importedBy":[{"uid":"68f2-55"}]},"68f2-26":{"id":"/src/controls/overlay.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-27"},"imported":[],"importedBy":[{"uid":"68f2-55"}]},"68f2-28":{"id":"/src/controls/rocketstyle.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-29"},"imported":[],"importedBy":[{"uid":"68f2-55"}]},"68f2-30":{"id":"/src/controls/text.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-31"},"imported":[{"uid":"68f2-48"}],"importedBy":[{"uid":"68f2-55"}]},"68f2-32":{"id":"/src/utils/controls/valuesToControls.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-33"},"imported":[{"uid":"68f2-55"}],"importedBy":[{"uid":"68f2-54"}]},"68f2-34":{"id":"/src/stories/dimension.tsx","moduleParts":{"vitus-labs-rocketstories.js":"68f2-35"},"imported":[{"uid":"68f2-50"},{"uid":"68f2-48"},{"uid":"68f2-53"},{"uid":"68f2-2"},{"uid":"68f2-4"},{"uid":"68f2-6"},{"uid":"68f2-54"}],"importedBy":[{"uid":"68f2-49"}]},"68f2-36":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-37"},"imported":[],"importedBy":[{"uid":"68f2-38"}]},"68f2-38":{"id":"/src/stories/main.tsx","moduleParts":{"vitus-labs-rocketstories.js":"68f2-39"},"imported":[{"uid":"68f2-50"},{"uid":"68f2-48"},{"uid":"68f2-4"},{"uid":"68f2-6"},{"uid":"68f2-36"},{"uid":"68f2-54"}],"importedBy":[{"uid":"68f2-49"}]},"68f2-40":{"id":"/src/stories/story.tsx","moduleParts":{"vitus-labs-rocketstories.js":"68f2-41"},"imported":[{"uid":"68f2-50"},{"uid":"68f2-54"},{"uid":"68f2-16"}],"importedBy":[{"uid":"68f2-49"}]},"68f2-42":{"id":"/src/decorators/Theme.tsx","moduleParts":{"vitus-labs-rocketstories.js":"68f2-43"},"imported":[{"uid":"68f2-50"},{"uid":"68f2-0"},{"uid":"68f2-52"},{"uid":"68f2-4"}],"importedBy":[{"uid":"68f2-44"}]},"68f2-44":{"id":"/src/rocketstories.tsx","moduleParts":{"vitus-labs-rocketstories.js":"68f2-45"},"imported":[{"uid":"68f2-48"},{"uid":"68f2-0"},{"uid":"68f2-49"},{"uid":"68f2-42"}],"importedBy":[{"uid":"68f2-46"}]},"68f2-46":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstories.js":"68f2-47"},"imported":[{"uid":"68f2-44"}],"importedBy":[],"isEntry":true},"68f2-48":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-44"},{"uid":"68f2-0"},{"uid":"68f2-34"},{"uid":"68f2-38"},{"uid":"68f2-2"},{"uid":"68f2-6"},{"uid":"68f2-16"},{"uid":"68f2-10"},{"uid":"68f2-18"},{"uid":"68f2-22"},{"uid":"68f2-30"}],"isExternal":true},"68f2-49":{"id":"/src/stories/index.ts","moduleParts":{},"imported":[{"uid":"68f2-34"},{"uid":"68f2-38"},{"uid":"68f2-40"}],"importedBy":[{"uid":"68f2-44"}]},"68f2-50":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-0"},{"uid":"68f2-42"},{"uid":"68f2-34"},{"uid":"68f2-38"},{"uid":"68f2-40"},{"uid":"68f2-2"}],"isExternal":true},"68f2-51":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-0"}],"isExternal":true},"68f2-52":{"id":"@vitus-labs/unistyle","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-42"}],"isExternal":true},"68f2-53":{"id":"@vitus-labs/elements","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-34"}],"isExternal":true},"68f2-54":{"id":"/src/utils/controls/index.ts","moduleParts":{},"imported":[{"uid":"68f2-10"},{"uid":"68f2-12"},{"uid":"68f2-14"},{"uid":"68f2-16"},{"uid":"68f2-20"},{"uid":"68f2-32"}],"importedBy":[{"uid":"68f2-34"},{"uid":"68f2-38"},{"uid":"68f2-40"}]},"68f2-55":{"id":"/src/controls/index.ts","moduleParts":{},"imported":[{"uid":"68f2-22"},{"uid":"68f2-24"},{"uid":"68f2-26"},{"uid":"68f2-28"},{"uid":"68f2-30"}],"importedBy":[{"uid":"68f2-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":"68f2-57"},{"name":"src","children":[{"name":"components/NotFound.tsx","uid":"68f2-59"},{"name":"utils","children":[{"uid":"68f2-61","name":"theme.ts"},{"uid":"68f2-63","name":"code.ts"},{"name":"controls","children":[{"uid":"68f2-67","name":"attrs.ts"},{"uid":"68f2-69","name":"dimensionToControls.ts"},{"uid":"68f2-71","name":"disableControls.ts"},{"uid":"68f2-73","name":"filterDefaultValues.ts"},{"uid":"68f2-75","name":"constants.ts"},{"uid":"68f2-77","name":"makeControls.ts"},{"uid":"68f2-89","name":"valuesToControls.ts"}]},{"uid":"68f2-93","name":"dimensions.ts"}]},{"name":"constants/controls.ts","uid":"68f2-65"},{"name":"controls","children":[{"uid":"68f2-79","name":"element.ts"},{"uid":"68f2-81","name":"list.ts"},{"uid":"68f2-83","name":"overlay.ts"},{"uid":"68f2-85","name":"rocketstyle.ts"},{"uid":"68f2-87","name":"text.ts"}]},{"name":"stories","children":[{"uid":"68f2-91","name":"dimension.tsx"},{"uid":"68f2-95","name":"main.tsx"},{"uid":"68f2-97","name":"story.tsx"}]},{"name":"decorators/Theme.tsx","uid":"68f2-99"},{"uid":"68f2-101","name":"rocketstories.tsx"},{"uid":"68f2-103","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"68f2-57":{"renderedLength":1444,"gzipLength":596,"brotliLength":0,"mainUid":"68f2-56"},"68f2-59":{"renderedLength":211,"gzipLength":183,"brotliLength":0,"mainUid":"68f2-58"},"68f2-61":{"renderedLength":113,"gzipLength":129,"brotliLength":0,"mainUid":"68f2-60"},"68f2-63":{"renderedLength":5176,"gzipLength":1176,"brotliLength":0,"mainUid":"68f2-62"},"68f2-65":{"renderedLength":246,"gzipLength":141,"brotliLength":0,"mainUid":"68f2-64"},"68f2-67":{"renderedLength":532,"gzipLength":297,"brotliLength":0,"mainUid":"68f2-66"},"68f2-69":{"renderedLength":454,"gzipLength":254,"brotliLength":0,"mainUid":"68f2-68"},"68f2-71":{"renderedLength":545,"gzipLength":275,"brotliLength":0,"mainUid":"68f2-70"},"68f2-73":{"renderedLength":215,"gzipLength":167,"brotliLength":0,"mainUid":"68f2-72"},"68f2-75":{"renderedLength":680,"gzipLength":286,"brotliLength":0,"mainUid":"68f2-74"},"68f2-77":{"renderedLength":556,"gzipLength":282,"brotliLength":0,"mainUid":"68f2-76"},"68f2-79":{"renderedLength":5514,"gzipLength":1011,"brotliLength":0,"mainUid":"68f2-78"},"68f2-81":{"renderedLength":1731,"gzipLength":525,"brotliLength":0,"mainUid":"68f2-80"},"68f2-83":{"renderedLength":2567,"gzipLength":578,"brotliLength":0,"mainUid":"68f2-82"},"68f2-85":{"renderedLength":687,"gzipLength":158,"brotliLength":0,"mainUid":"68f2-84"},"68f2-87":{"renderedLength":403,"gzipLength":149,"brotliLength":0,"mainUid":"68f2-86"},"68f2-89":{"renderedLength":2589,"gzipLength":757,"brotliLength":0,"mainUid":"68f2-88"},"68f2-91":{"renderedLength":5461,"gzipLength":1250,"brotliLength":0,"mainUid":"68f2-90"},"68f2-93":{"renderedLength":339,"gzipLength":238,"brotliLength":0,"mainUid":"68f2-92"},"68f2-95":{"renderedLength":2574,"gzipLength":713,"brotliLength":0,"mainUid":"68f2-94"},"68f2-97":{"renderedLength":639,"gzipLength":288,"brotliLength":0,"mainUid":"68f2-96"},"68f2-99":{"renderedLength":222,"gzipLength":182,"brotliLength":0,"mainUid":"68f2-98"},"68f2-101":{"renderedLength":2729,"gzipLength":625,"brotliLength":0,"mainUid":"68f2-100"},"68f2-103":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"68f2-102"}},"nodeMetas":{"68f2-56":{"id":"/Users/vitbokisch/Dev/vitus-labs/ui-system/packages/rocketstyle/lib/vitus-labs-rocketstyle.module.js","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-57"},"imported":[{"uid":"68f2-104"},{"uid":"68f2-106"},{"uid":"68f2-107"}],"importedBy":[{"uid":"68f2-100"},{"uid":"68f2-98"}]},"68f2-58":{"id":"/src/components/NotFound.tsx","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-59"},"imported":[{"uid":"68f2-106"},{"uid":"68f2-104"}],"importedBy":[{"uid":"68f2-90"}]},"68f2-60":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-61"},"imported":[],"importedBy":[{"uid":"68f2-98"},{"uid":"68f2-90"},{"uid":"68f2-94"}]},"68f2-62":{"id":"/src/utils/code.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-63"},"imported":[{"uid":"68f2-104"}],"importedBy":[{"uid":"68f2-90"},{"uid":"68f2-94"}]},"68f2-64":{"id":"/src/constants/controls.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-65"},"imported":[],"importedBy":[{"uid":"68f2-66"},{"uid":"68f2-74"}]},"68f2-66":{"id":"/src/utils/controls/attrs.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-67"},"imported":[{"uid":"68f2-104"},{"uid":"68f2-64"}],"importedBy":[{"uid":"68f2-110"}]},"68f2-68":{"id":"/src/utils/controls/dimensionToControls.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-69"},"imported":[],"importedBy":[{"uid":"68f2-110"}]},"68f2-70":{"id":"/src/utils/controls/disableControls.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-71"},"imported":[],"importedBy":[{"uid":"68f2-110"}]},"68f2-72":{"id":"/src/utils/controls/filterDefaultValues.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-73"},"imported":[{"uid":"68f2-104"}],"importedBy":[{"uid":"68f2-96"},{"uid":"68f2-110"}]},"68f2-74":{"id":"/src/utils/controls/constants.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-75"},"imported":[{"uid":"68f2-104"},{"uid":"68f2-64"}],"importedBy":[{"uid":"68f2-76"}]},"68f2-76":{"id":"/src/utils/controls/makeControls.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-77"},"imported":[{"uid":"68f2-74"}],"importedBy":[{"uid":"68f2-110"}]},"68f2-78":{"id":"/src/controls/element.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-79"},"imported":[{"uid":"68f2-104"}],"importedBy":[{"uid":"68f2-111"}]},"68f2-80":{"id":"/src/controls/list.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-81"},"imported":[],"importedBy":[{"uid":"68f2-111"}]},"68f2-82":{"id":"/src/controls/overlay.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-83"},"imported":[],"importedBy":[{"uid":"68f2-111"}]},"68f2-84":{"id":"/src/controls/rocketstyle.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-85"},"imported":[],"importedBy":[{"uid":"68f2-111"}]},"68f2-86":{"id":"/src/controls/text.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-87"},"imported":[{"uid":"68f2-104"}],"importedBy":[{"uid":"68f2-111"}]},"68f2-88":{"id":"/src/utils/controls/valuesToControls.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-89"},"imported":[{"uid":"68f2-111"}],"importedBy":[{"uid":"68f2-110"}]},"68f2-90":{"id":"/src/stories/dimension.tsx","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-91"},"imported":[{"uid":"68f2-106"},{"uid":"68f2-104"},{"uid":"68f2-109"},{"uid":"68f2-58"},{"uid":"68f2-60"},{"uid":"68f2-62"},{"uid":"68f2-110"}],"importedBy":[{"uid":"68f2-105"}]},"68f2-92":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-93"},"imported":[],"importedBy":[{"uid":"68f2-94"}]},"68f2-94":{"id":"/src/stories/main.tsx","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-95"},"imported":[{"uid":"68f2-106"},{"uid":"68f2-104"},{"uid":"68f2-60"},{"uid":"68f2-62"},{"uid":"68f2-92"},{"uid":"68f2-110"}],"importedBy":[{"uid":"68f2-105"}]},"68f2-96":{"id":"/src/stories/story.tsx","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-97"},"imported":[{"uid":"68f2-106"},{"uid":"68f2-110"},{"uid":"68f2-72"}],"importedBy":[{"uid":"68f2-105"}]},"68f2-98":{"id":"/src/decorators/Theme.tsx","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-99"},"imported":[{"uid":"68f2-106"},{"uid":"68f2-56"},{"uid":"68f2-108"},{"uid":"68f2-60"}],"importedBy":[{"uid":"68f2-100"}]},"68f2-100":{"id":"/src/rocketstories.tsx","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-101"},"imported":[{"uid":"68f2-104"},{"uid":"68f2-56"},{"uid":"68f2-105"},{"uid":"68f2-98"}],"importedBy":[{"uid":"68f2-102"}]},"68f2-102":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstories.module.js":"68f2-103"},"imported":[{"uid":"68f2-100"}],"importedBy":[],"isEntry":true},"68f2-104":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-100"},{"uid":"68f2-56"},{"uid":"68f2-90"},{"uid":"68f2-94"},{"uid":"68f2-58"},{"uid":"68f2-62"},{"uid":"68f2-72"},{"uid":"68f2-66"},{"uid":"68f2-74"},{"uid":"68f2-78"},{"uid":"68f2-86"}],"isExternal":true},"68f2-105":{"id":"/src/stories/index.ts","moduleParts":{},"imported":[{"uid":"68f2-90"},{"uid":"68f2-94"},{"uid":"68f2-96"}],"importedBy":[{"uid":"68f2-100"}]},"68f2-106":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-56"},{"uid":"68f2-98"},{"uid":"68f2-90"},{"uid":"68f2-94"},{"uid":"68f2-96"},{"uid":"68f2-58"}],"isExternal":true},"68f2-107":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-56"}],"isExternal":true},"68f2-108":{"id":"@vitus-labs/unistyle","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-98"}],"isExternal":true},"68f2-109":{"id":"@vitus-labs/elements","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-90"}],"isExternal":true},"68f2-110":{"id":"/src/utils/controls/index.ts","moduleParts":{},"imported":[{"uid":"68f2-66"},{"uid":"68f2-68"},{"uid":"68f2-70"},{"uid":"68f2-72"},{"uid":"68f2-76"},{"uid":"68f2-88"}],"importedBy":[{"uid":"68f2-90"},{"uid":"68f2-94"},{"uid":"68f2-96"}]},"68f2-111":{"id":"/src/controls/index.ts","moduleParts":{},"imported":[{"uid":"68f2-78"},{"uid":"68f2-80"},{"uid":"68f2-82"},{"uid":"68f2-84"},{"uid":"68f2-86"}],"importedBy":[{"uid":"68f2-88"}]}},"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":"68f2-113"},{"name":"src","children":[{"name":"components/NotFound.tsx","uid":"68f2-115"},{"name":"utils","children":[{"uid":"68f2-117","name":"theme.ts"},{"uid":"68f2-119","name":"code.ts"},{"name":"controls","children":[{"uid":"68f2-123","name":"attrs.ts"},{"uid":"68f2-125","name":"dimensionToControls.ts"},{"uid":"68f2-127","name":"disableControls.ts"},{"uid":"68f2-129","name":"filterDefaultValues.ts"},{"uid":"68f2-131","name":"constants.ts"},{"uid":"68f2-133","name":"makeControls.ts"},{"uid":"68f2-145","name":"valuesToControls.ts"}]},{"uid":"68f2-149","name":"dimensions.ts"}]},{"name":"constants/controls.ts","uid":"68f2-121"},{"name":"controls","children":[{"uid":"68f2-135","name":"element.ts"},{"uid":"68f2-137","name":"list.ts"},{"uid":"68f2-139","name":"overlay.ts"},{"uid":"68f2-141","name":"rocketstyle.ts"},{"uid":"68f2-143","name":"text.ts"}]},{"name":"stories","children":[{"uid":"68f2-147","name":"dimension.tsx"},{"uid":"68f2-151","name":"main.tsx"},{"uid":"68f2-153","name":"story.tsx"}]},{"name":"decorators/Theme.tsx","uid":"68f2-155"},{"uid":"68f2-157","name":"rocketstories.tsx"},{"uid":"68f2-159","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"68f2-113":{"renderedLength":1716,"gzipLength":627,"brotliLength":0,"mainUid":"68f2-112"},"68f2-115":{"renderedLength":248,"gzipLength":203,"brotliLength":0,"mainUid":"68f2-114"},"68f2-117":{"renderedLength":121,"gzipLength":132,"brotliLength":0,"mainUid":"68f2-116"},"68f2-119":{"renderedLength":5807,"gzipLength":1201,"brotliLength":0,"mainUid":"68f2-118"},"68f2-121":{"renderedLength":310,"gzipLength":147,"brotliLength":0,"mainUid":"68f2-120"},"68f2-123":{"renderedLength":593,"gzipLength":307,"brotliLength":0,"mainUid":"68f2-122"},"68f2-125":{"renderedLength":498,"gzipLength":257,"brotliLength":0,"mainUid":"68f2-124"},"68f2-127":{"renderedLength":601,"gzipLength":276,"brotliLength":0,"mainUid":"68f2-126"},"68f2-129":{"renderedLength":244,"gzipLength":171,"brotliLength":0,"mainUid":"68f2-128"},"68f2-131":{"renderedLength":793,"gzipLength":296,"brotliLength":0,"mainUid":"68f2-130"},"68f2-133":{"renderedLength":620,"gzipLength":286,"brotliLength":0,"mainUid":"68f2-132"},"68f2-135":{"renderedLength":6155,"gzipLength":1029,"brotliLength":0,"mainUid":"68f2-134"},"68f2-137":{"renderedLength":1935,"gzipLength":531,"brotliLength":0,"mainUid":"68f2-136"},"68f2-139":{"renderedLength":2943,"gzipLength":588,"brotliLength":0,"mainUid":"68f2-138"},"68f2-141":{"renderedLength":831,"gzipLength":164,"brotliLength":0,"mainUid":"68f2-140"},"68f2-143":{"renderedLength":500,"gzipLength":157,"brotliLength":0,"mainUid":"68f2-142"},"68f2-145":{"renderedLength":2893,"gzipLength":767,"brotliLength":0,"mainUid":"68f2-144"},"68f2-147":{"renderedLength":6229,"gzipLength":1287,"brotliLength":0,"mainUid":"68f2-146"},"68f2-149":{"renderedLength":371,"gzipLength":242,"brotliLength":0,"mainUid":"68f2-148"},"68f2-151":{"renderedLength":2869,"gzipLength":740,"brotliLength":0,"mainUid":"68f2-150"},"68f2-153":{"renderedLength":721,"gzipLength":297,"brotliLength":0,"mainUid":"68f2-152"},"68f2-155":{"renderedLength":281,"gzipLength":200,"brotliLength":0,"mainUid":"68f2-154"},"68f2-157":{"renderedLength":3045,"gzipLength":636,"brotliLength":0,"mainUid":"68f2-156"},"68f2-159":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"68f2-158"}},"nodeMetas":{"68f2-112":{"id":"/Users/vitbokisch/Dev/vitus-labs/ui-system/packages/rocketstyle/lib/vitus-labs-rocketstyle.module.js","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-113"},"imported":[{"uid":"68f2-160"},{"uid":"68f2-162"},{"uid":"68f2-163"}],"importedBy":[{"uid":"68f2-156"},{"uid":"68f2-154"}]},"68f2-114":{"id":"/src/components/NotFound.tsx","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-115"},"imported":[{"uid":"68f2-162"},{"uid":"68f2-160"}],"importedBy":[{"uid":"68f2-146"}]},"68f2-116":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-117"},"imported":[],"importedBy":[{"uid":"68f2-154"},{"uid":"68f2-146"},{"uid":"68f2-150"}]},"68f2-118":{"id":"/src/utils/code.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-119"},"imported":[{"uid":"68f2-160"}],"importedBy":[{"uid":"68f2-146"},{"uid":"68f2-150"}]},"68f2-120":{"id":"/src/constants/controls.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-121"},"imported":[],"importedBy":[{"uid":"68f2-122"},{"uid":"68f2-130"}]},"68f2-122":{"id":"/src/utils/controls/attrs.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-123"},"imported":[{"uid":"68f2-160"},{"uid":"68f2-120"}],"importedBy":[{"uid":"68f2-166"}]},"68f2-124":{"id":"/src/utils/controls/dimensionToControls.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-125"},"imported":[],"importedBy":[{"uid":"68f2-166"}]},"68f2-126":{"id":"/src/utils/controls/disableControls.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-127"},"imported":[],"importedBy":[{"uid":"68f2-166"}]},"68f2-128":{"id":"/src/utils/controls/filterDefaultValues.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-129"},"imported":[{"uid":"68f2-160"}],"importedBy":[{"uid":"68f2-152"},{"uid":"68f2-166"}]},"68f2-130":{"id":"/src/utils/controls/constants.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-131"},"imported":[{"uid":"68f2-160"},{"uid":"68f2-120"}],"importedBy":[{"uid":"68f2-132"}]},"68f2-132":{"id":"/src/utils/controls/makeControls.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-133"},"imported":[{"uid":"68f2-130"}],"importedBy":[{"uid":"68f2-166"}]},"68f2-134":{"id":"/src/controls/element.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-135"},"imported":[{"uid":"68f2-160"}],"importedBy":[{"uid":"68f2-167"}]},"68f2-136":{"id":"/src/controls/list.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-137"},"imported":[],"importedBy":[{"uid":"68f2-167"}]},"68f2-138":{"id":"/src/controls/overlay.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-139"},"imported":[],"importedBy":[{"uid":"68f2-167"}]},"68f2-140":{"id":"/src/controls/rocketstyle.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-141"},"imported":[],"importedBy":[{"uid":"68f2-167"}]},"68f2-142":{"id":"/src/controls/text.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-143"},"imported":[{"uid":"68f2-160"}],"importedBy":[{"uid":"68f2-167"}]},"68f2-144":{"id":"/src/utils/controls/valuesToControls.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-145"},"imported":[{"uid":"68f2-167"}],"importedBy":[{"uid":"68f2-166"}]},"68f2-146":{"id":"/src/stories/dimension.tsx","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-147"},"imported":[{"uid":"68f2-162"},{"uid":"68f2-160"},{"uid":"68f2-165"},{"uid":"68f2-114"},{"uid":"68f2-116"},{"uid":"68f2-118"},{"uid":"68f2-166"}],"importedBy":[{"uid":"68f2-161"}]},"68f2-148":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-149"},"imported":[],"importedBy":[{"uid":"68f2-150"}]},"68f2-150":{"id":"/src/stories/main.tsx","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-151"},"imported":[{"uid":"68f2-162"},{"uid":"68f2-160"},{"uid":"68f2-116"},{"uid":"68f2-118"},{"uid":"68f2-148"},{"uid":"68f2-166"}],"importedBy":[{"uid":"68f2-161"}]},"68f2-152":{"id":"/src/stories/story.tsx","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-153"},"imported":[{"uid":"68f2-162"},{"uid":"68f2-166"},{"uid":"68f2-128"}],"importedBy":[{"uid":"68f2-161"}]},"68f2-154":{"id":"/src/decorators/Theme.tsx","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-155"},"imported":[{"uid":"68f2-162"},{"uid":"68f2-112"},{"uid":"68f2-164"},{"uid":"68f2-116"}],"importedBy":[{"uid":"68f2-156"}]},"68f2-156":{"id":"/src/rocketstories.tsx","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-157"},"imported":[{"uid":"68f2-160"},{"uid":"68f2-112"},{"uid":"68f2-161"},{"uid":"68f2-154"}],"importedBy":[{"uid":"68f2-158"}]},"68f2-158":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstories.umd.js":"68f2-159"},"imported":[{"uid":"68f2-156"}],"importedBy":[],"isEntry":true},"68f2-160":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-156"},{"uid":"68f2-112"},{"uid":"68f2-146"},{"uid":"68f2-150"},{"uid":"68f2-114"},{"uid":"68f2-118"},{"uid":"68f2-128"},{"uid":"68f2-122"},{"uid":"68f2-130"},{"uid":"68f2-134"},{"uid":"68f2-142"}],"isExternal":true},"68f2-161":{"id":"/src/stories/index.ts","moduleParts":{},"imported":[{"uid":"68f2-146"},{"uid":"68f2-150"},{"uid":"68f2-152"}],"importedBy":[{"uid":"68f2-156"}]},"68f2-162":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-112"},{"uid":"68f2-154"},{"uid":"68f2-146"},{"uid":"68f2-150"},{"uid":"68f2-152"},{"uid":"68f2-114"}],"isExternal":true},"68f2-163":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-112"}],"isExternal":true},"68f2-164":{"id":"@vitus-labs/unistyle","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-154"}],"isExternal":true},"68f2-165":{"id":"@vitus-labs/elements","moduleParts":{},"imported":[],"importedBy":[{"uid":"68f2-146"}],"isExternal":true},"68f2-166":{"id":"/src/utils/controls/index.ts","moduleParts":{},"imported":[{"uid":"68f2-122"},{"uid":"68f2-124"},{"uid":"68f2-126"},{"uid":"68f2-128"},{"uid":"68f2-132"},{"uid":"68f2-144"}],"importedBy":[{"uid":"68f2-146"},{"uid":"68f2-150"},{"uid":"68f2-152"}]},"68f2-167":{"id":"/src/controls/index.ts","moduleParts":{},"imported":[{"uid":"68f2-134"},{"uid":"68f2-136"},{"uid":"68f2-138"},{"uid":"68f2-140"},{"uid":"68f2-142"}],"importedBy":[{"uid":"68f2-144"}]}},"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
|
@@ -34,13 +34,22 @@ declare type Configuration<C = unknown> = {
|
|
|
34
34
|
attrs: AttrsTypes<C>;
|
|
35
35
|
name: string;
|
|
36
36
|
component: Element | RocketComponent;
|
|
37
|
+
storyOptions: Partial<{
|
|
38
|
+
direction: 'inline' | 'rows';
|
|
39
|
+
alignX: 'left' | 'center' | 'right' | 'spaceBetween';
|
|
40
|
+
alignY: 'top' | 'center' | 'bottom' | 'spaceBetween';
|
|
41
|
+
gap: number;
|
|
42
|
+
pseudo: true;
|
|
43
|
+
}>;
|
|
37
44
|
};
|
|
38
45
|
|
|
39
46
|
declare type MakeDimensionStories = ({ name, component, dimension, attrs, }: {
|
|
40
47
|
name: string;
|
|
41
48
|
component: RocketComponent;
|
|
42
49
|
dimension: string;
|
|
43
|
-
attrs:
|
|
50
|
+
attrs: Configuration['attrs'];
|
|
51
|
+
storyOptions: Configuration['storyOptions'];
|
|
52
|
+
ignore: any;
|
|
44
53
|
}) => StoryComponent;
|
|
45
54
|
declare const makeDimensionStories: MakeDimensionStories;
|
|
46
55
|
|
|
@@ -78,7 +87,10 @@ declare type CreateRocketStories<C extends RocketComponent = any> = (options: Pa
|
|
|
78
87
|
title: string;
|
|
79
88
|
};
|
|
80
89
|
main: () => ReturnType<typeof mainStory>;
|
|
81
|
-
|
|
90
|
+
storyOptions: (options: Configuration['storyOptions']) => ReturnType<CreateRocketStories<C>>;
|
|
91
|
+
dimension: <A extends ExtractDimensions<C>, B = keyof C['$$rocketstyle'][A]>(dimension: A, params?: Partial<{
|
|
92
|
+
ignore: any;
|
|
93
|
+
}>) => ReturnType<typeof makeDimensionStories>;
|
|
82
94
|
};
|
|
83
95
|
|
|
84
96
|
export { rocketstories as default };
|
|
@@ -18,6 +18,9 @@ declare type CreateRocketStories<C extends RocketComponent = any> = (options: Pa
|
|
|
18
18
|
title: string;
|
|
19
19
|
};
|
|
20
20
|
main: () => ReturnType<typeof mainStory>;
|
|
21
|
-
|
|
21
|
+
storyOptions: (options: Configuration['storyOptions']) => ReturnType<CreateRocketStories<C>>;
|
|
22
|
+
dimension: <A extends ExtractDimensions<C>, B = keyof C['$$rocketstyle'][A]>(dimension: A, params?: Partial<{
|
|
23
|
+
ignore: any;
|
|
24
|
+
}>) => ReturnType<typeof dimensionStory>;
|
|
22
25
|
};
|
|
23
26
|
export default rocketstories;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type { RocketComponent, StoryComponent } from "../types";
|
|
1
|
+
import type { RocketComponent, StoryComponent, Configuration } from "../types";
|
|
2
2
|
declare type MakeDimensionStories = ({ name, component, dimension, attrs, }: {
|
|
3
3
|
name: string;
|
|
4
4
|
component: RocketComponent;
|
|
5
5
|
dimension: string;
|
|
6
|
-
attrs:
|
|
6
|
+
attrs: Configuration['attrs'];
|
|
7
|
+
storyOptions: Configuration['storyOptions'];
|
|
8
|
+
ignore: any;
|
|
7
9
|
}) => StoryComponent;
|
|
8
10
|
declare const makeDimensionStories: MakeDimensionStories;
|
|
9
11
|
export default makeDimensionStories;
|
package/lib/types/types.d.ts
CHANGED
|
@@ -56,6 +56,13 @@ export declare type Configuration<C = unknown> = {
|
|
|
56
56
|
attrs: AttrsTypes<C>;
|
|
57
57
|
name: string;
|
|
58
58
|
component: Element | RocketComponent;
|
|
59
|
+
storyOptions: Partial<{
|
|
60
|
+
direction: 'inline' | 'rows';
|
|
61
|
+
alignX: 'left' | 'center' | 'right' | 'spaceBetween';
|
|
62
|
+
alignY: 'top' | 'center' | 'bottom' | 'spaceBetween';
|
|
63
|
+
gap: number;
|
|
64
|
+
pseudo: true;
|
|
65
|
+
}>;
|
|
59
66
|
};
|
|
60
67
|
export declare type SimpleValue = string | number | boolean;
|
|
61
68
|
export declare type Obj = Record<string, SimpleValue | Array<SimpleValue>>;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var core = require('@vitus-labs/core');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
require('hoist-non-react-statics');
|
|
8
|
+
var elements = require('@vitus-labs/elements');
|
|
8
9
|
var unistyle = require('@vitus-labs/unistyle');
|
|
9
10
|
|
|
10
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -780,7 +781,7 @@ const valuesToControls = ({ component, values, dimensionControls = {}, }) => {
|
|
|
780
781
|
|
|
781
782
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
782
783
|
// @ts-ignore
|
|
783
|
-
const makeDimensionStories = ({ name, component: component$1, dimension, attrs = {},
|
|
784
|
+
const makeDimensionStories = ({ name, component: component$1, dimension, attrs = {}, storyOptions = {}, ignore,
|
|
784
785
|
// config = { pseudo: true },
|
|
785
786
|
}) => {
|
|
786
787
|
// ------------------------------------------------------
|
|
@@ -826,10 +827,54 @@ const makeDimensionStories = ({ name, component: component$1, dimension, attrs =
|
|
|
826
827
|
// ------------------------------------------------------
|
|
827
828
|
// STORY COMPONENT
|
|
828
829
|
// ------------------------------------------------------
|
|
829
|
-
const
|
|
830
|
-
|
|
831
|
-
[
|
|
832
|
-
|
|
830
|
+
const WrapElement = core.isEmpty(storyOptions) ? React.Fragment : elements.Element;
|
|
831
|
+
const Enhanced = (props) => {
|
|
832
|
+
return (React__default["default"].createElement(WrapElement, { block: true, contentDirection: storyOptions.direction, contentAlignX: storyOptions.alignX, contentAlignY: storyOptions.alignY,
|
|
833
|
+
// @ts-ignore
|
|
834
|
+
style: { gap: storyOptions.gap } }, Object.keys(currentDimension).map((item) => {
|
|
835
|
+
const shouldBeIgnored = ignore.includes(item);
|
|
836
|
+
const key = `${dimension}-${item}`;
|
|
837
|
+
// do not render ignored dimension keys
|
|
838
|
+
if (shouldBeIgnored)
|
|
839
|
+
return null;
|
|
840
|
+
if (storyOptions.pseudo) {
|
|
841
|
+
return (React__default["default"].createElement(WrapElement, { key: key, "data-story": key, contentDirection: storyOptions.direction === 'rows' ? 'inline' : 'rows', contentAlignX: storyOptions.alignX, contentAlignY: storyOptions.alignY,
|
|
842
|
+
// @ts-ignore
|
|
843
|
+
style: { gap: storyOptions.gap / 2 } },
|
|
844
|
+
React__default["default"].createElement("div", null,
|
|
845
|
+
React__default["default"].createElement(elements.Text, { paragraph: true }, "Base"),
|
|
846
|
+
React.createElement(component$1, {
|
|
847
|
+
...props,
|
|
848
|
+
[dimension]: isMultiKey ? [item] : item,
|
|
849
|
+
})),
|
|
850
|
+
React__default["default"].createElement("div", null,
|
|
851
|
+
React__default["default"].createElement(elements.Text, { paragraph: true }, "Hover"),
|
|
852
|
+
React.createElement(component$1, {
|
|
853
|
+
...props,
|
|
854
|
+
[dimension]: isMultiKey ? [item] : item,
|
|
855
|
+
hover: true,
|
|
856
|
+
})),
|
|
857
|
+
React__default["default"].createElement("div", null,
|
|
858
|
+
React__default["default"].createElement(elements.Text, { paragraph: true }, "Pressed"),
|
|
859
|
+
React.createElement(component$1, {
|
|
860
|
+
...props,
|
|
861
|
+
[dimension]: isMultiKey ? [item] : item,
|
|
862
|
+
pressed: true,
|
|
863
|
+
})),
|
|
864
|
+
React__default["default"].createElement("div", null,
|
|
865
|
+
React__default["default"].createElement(elements.Text, { paragraph: true }, "Active"),
|
|
866
|
+
React.createElement(component$1, {
|
|
867
|
+
...props,
|
|
868
|
+
[dimension]: isMultiKey ? [item] : item,
|
|
869
|
+
active: true,
|
|
870
|
+
}))));
|
|
871
|
+
}
|
|
872
|
+
return (React__default["default"].createElement(WrapElement, { key: key, "data-story": `${dimension}-${item}`, ...storyOptions, contentDirection: "rows" }, React.createElement(component$1, {
|
|
873
|
+
...props,
|
|
874
|
+
[dimension]: isMultiKey ? [item] : item,
|
|
875
|
+
})));
|
|
876
|
+
})));
|
|
877
|
+
};
|
|
833
878
|
Enhanced.args = args;
|
|
834
879
|
Enhanced.argTypes = {
|
|
835
880
|
...storybookControls,
|
|
@@ -952,6 +997,7 @@ const rocketstories = (component) => {
|
|
|
952
997
|
component,
|
|
953
998
|
name: component.displayName || component.name,
|
|
954
999
|
attrs: {},
|
|
1000
|
+
storyOptions: { gap: 16 },
|
|
955
1001
|
}, {});
|
|
956
1002
|
}
|
|
957
1003
|
return createRocketstories({
|
|
@@ -968,6 +1014,7 @@ const createStories = (options, defaultOptions) => {
|
|
|
968
1014
|
: defaultOptions.name,
|
|
969
1015
|
component: options.component || defaultOptions.component,
|
|
970
1016
|
attrs: { ...defaultOptions.attrs, ...options.attrs },
|
|
1017
|
+
storyOptions: { ...defaultOptions.storyOptions, ...options.storyOptions },
|
|
971
1018
|
};
|
|
972
1019
|
return {
|
|
973
1020
|
attrs: (attrs) => createStories({ attrs }, result),
|
|
@@ -988,6 +1035,7 @@ const createRocketstories = (options, defaultOptions) => {
|
|
|
988
1035
|
: defaultOptions.name,
|
|
989
1036
|
component: options.component || defaultOptions.component,
|
|
990
1037
|
attrs: { ...defaultOptions.attrs, ...options.attrs },
|
|
1038
|
+
storyOptions: { ...defaultOptions.storyOptions, ...options.storyOptions },
|
|
991
1039
|
};
|
|
992
1040
|
return {
|
|
993
1041
|
attrs: (attrs) => createRocketstories({ attrs }, result),
|
|
@@ -999,13 +1047,19 @@ const createRocketstories = (options, defaultOptions) => {
|
|
|
999
1047
|
}),
|
|
1000
1048
|
// generate main story
|
|
1001
1049
|
main: () => mainStory(result),
|
|
1050
|
+
//define storyOptions
|
|
1051
|
+
storyOptions: (storyOptions) => createRocketstories({ storyOptions }, result),
|
|
1002
1052
|
// generate stories of defined dimension
|
|
1003
|
-
dimension: (dimension) =>
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1053
|
+
dimension: (dimension, params = {}) => {
|
|
1054
|
+
const { ignore = [] } = params;
|
|
1055
|
+
return makeDimensionStories({
|
|
1056
|
+
...result,
|
|
1057
|
+
ignore,
|
|
1058
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1059
|
+
// @ts-ignore
|
|
1060
|
+
dimension,
|
|
1061
|
+
});
|
|
1062
|
+
},
|
|
1009
1063
|
};
|
|
1010
1064
|
};
|
|
1011
1065
|
|