@vitus-labs/rocketstyle 0.40.0 → 0.41.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-rocketstyle.js.html +1 -1
- package/lib/analysis/vitus-labs-rocketstyle.module.js.html +1 -1
- package/lib/analysis/vitus-labs-rocketstyle.umd.js.html +1 -1
- package/lib/analysis/vitus-labs-rocketstyle.umd.min.js.html +1 -1
- package/lib/index.d.ts +62 -22
- package/lib/types/index.d.ts +2 -2
- package/lib/types/types/hoc.d.ts +1 -0
- package/lib/types/types/rocketstyle.d.ts +59 -20
- package/lib/types/types/styleComponent.d.ts +1 -1
- package/package.json +5 -5
|
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
|
|
|
6424
6424
|
</script>
|
|
6425
6425
|
<script>
|
|
6426
6426
|
/*<!--*/
|
|
6427
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"
|
|
6427
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"aa56-1","name":"usePseudoState.tsx"},{"uid":"aa56-9","name":"useTheme.tsx"},{"uid":"aa56-15","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"aa56-3","name":"collection.ts"},{"uid":"aa56-5","name":"dimensions.ts"},{"uid":"aa56-7","name":"theme.ts"},{"uid":"aa56-17","name":"attrs.ts"},{"uid":"aa56-25","name":"styles.ts"}]},{"uid":"aa56-11","name":"context.tsx"},{"name":"constants","children":[{"uid":"aa56-13","name":"reservedKeys.ts"},{"uid":"aa56-29","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"aa56-19","name":"rocketstyleAttrsHoc.tsx"},{"uid":"aa56-21","name":"localContext.tsx"},{"uid":"aa56-23","name":"createProvider.tsx"}]},{"uid":"aa56-27","name":"rocketstyle.tsx"},{"uid":"aa56-31","name":"init.ts"},{"uid":"aa56-33","name":"isRocketComponent.ts"},{"uid":"aa56-35","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"aa56-1":{"renderedLength":1775,"gzipLength":407,"brotliLength":0,"mainUid":"aa56-0"},"aa56-3":{"renderedLength":468,"gzipLength":280,"brotliLength":0,"mainUid":"aa56-2"},"aa56-5":{"renderedLength":1474,"gzipLength":545,"brotliLength":0,"mainUid":"aa56-4"},"aa56-7":{"renderedLength":2625,"gzipLength":845,"brotliLength":0,"mainUid":"aa56-6"},"aa56-9":{"renderedLength":542,"gzipLength":295,"brotliLength":0,"mainUid":"aa56-8"},"aa56-11":{"renderedLength":464,"gzipLength":261,"brotliLength":0,"mainUid":"aa56-10"},"aa56-13":{"renderedLength":566,"gzipLength":296,"brotliLength":0,"mainUid":"aa56-12"},"aa56-15":{"renderedLength":331,"gzipLength":206,"brotliLength":0,"mainUid":"aa56-14"},"aa56-17":{"renderedLength":2568,"gzipLength":873,"brotliLength":0,"mainUid":"aa56-16"},"aa56-19":{"renderedLength":1029,"gzipLength":445,"brotliLength":0,"mainUid":"aa56-18"},"aa56-21":{"renderedLength":43,"gzipLength":58,"brotliLength":0,"mainUid":"aa56-20"},"aa56-23":{"renderedLength":832,"gzipLength":384,"brotliLength":0,"mainUid":"aa56-22"},"aa56-25":{"renderedLength":129,"gzipLength":112,"brotliLength":0,"mainUid":"aa56-24"},"aa56-27":{"renderedLength":11491,"gzipLength":2801,"brotliLength":0,"mainUid":"aa56-26"},"aa56-29":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"aa56-28"},"aa56-31":{"renderedLength":1570,"gzipLength":577,"brotliLength":0,"mainUid":"aa56-30"},"aa56-33":{"renderedLength":204,"gzipLength":148,"brotliLength":0,"mainUid":"aa56-32"},"aa56-35":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"aa56-34"}},"nodeMetas":{"aa56-0":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-1"},"imported":[{"uid":"aa56-37"}],"importedBy":[{"uid":"aa56-39"}]},"aa56-2":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-3"},"imported":[],"importedBy":[{"uid":"aa56-26"},{"uid":"aa56-6"}]},"aa56-4":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-5"},"imported":[{"uid":"aa56-36"}],"importedBy":[{"uid":"aa56-30"},{"uid":"aa56-6"},{"uid":"aa56-8"}]},"aa56-6":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-7"},"imported":[{"uid":"aa56-36"},{"uid":"aa56-2"},{"uid":"aa56-4"}],"importedBy":[{"uid":"aa56-26"},{"uid":"aa56-8"}]},"aa56-8":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-9"},"imported":[{"uid":"aa56-36"},{"uid":"aa56-6"},{"uid":"aa56-4"}],"importedBy":[{"uid":"aa56-39"}]},"aa56-10":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-11"},"imported":[{"uid":"aa56-37"},{"uid":"aa56-36"}],"importedBy":[{"uid":"aa56-34"},{"uid":"aa56-14"}]},"aa56-12":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-13"},"imported":[],"importedBy":[{"uid":"aa56-30"},{"uid":"aa56-26"},{"uid":"aa56-14"}]},"aa56-14":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-15"},"imported":[{"uid":"aa56-37"},{"uid":"aa56-10"},{"uid":"aa56-12"}],"importedBy":[{"uid":"aa56-39"}]},"aa56-16":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-17"},"imported":[{"uid":"aa56-36"}],"importedBy":[{"uid":"aa56-26"},{"uid":"aa56-18"}]},"aa56-18":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-19"},"imported":[{"uid":"aa56-37"},{"uid":"aa56-36"},{"uid":"aa56-16"},{"uid":"aa56-39"}],"importedBy":[{"uid":"aa56-40"}]},"aa56-20":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-21"},"imported":[{"uid":"aa56-37"}],"importedBy":[{"uid":"aa56-40"},{"uid":"aa56-22"}]},"aa56-22":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-23"},"imported":[{"uid":"aa56-37"},{"uid":"aa56-39"},{"uid":"aa56-20"}],"importedBy":[{"uid":"aa56-40"}]},"aa56-24":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-25"},"imported":[],"importedBy":[{"uid":"aa56-26"}]},"aa56-26":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-27"},"imported":[{"uid":"aa56-37"},{"uid":"aa56-38"},{"uid":"aa56-36"},{"uid":"aa56-39"},{"uid":"aa56-40"},{"uid":"aa56-6"},{"uid":"aa56-24"},{"uid":"aa56-2"},{"uid":"aa56-16"},{"uid":"aa56-12"}],"importedBy":[{"uid":"aa56-30"}]},"aa56-28":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-29"},"imported":[],"importedBy":[{"uid":"aa56-30"}]},"aa56-30":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-31"},"imported":[{"uid":"aa56-36"},{"uid":"aa56-26"},{"uid":"aa56-4"},{"uid":"aa56-12"},{"uid":"aa56-28"}],"importedBy":[{"uid":"aa56-34"}]},"aa56-32":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-33"},"imported":[],"importedBy":[{"uid":"aa56-34"}]},"aa56-34":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.js":"aa56-35"},"imported":[{"uid":"aa56-30"},{"uid":"aa56-10"},{"uid":"aa56-32"}],"importedBy":[],"isEntry":true},"aa56-36":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"aa56-30"},{"uid":"aa56-10"},{"uid":"aa56-26"},{"uid":"aa56-4"},{"uid":"aa56-6"},{"uid":"aa56-16"},{"uid":"aa56-8"},{"uid":"aa56-18"}],"isExternal":true},"aa56-37":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"aa56-10"},{"uid":"aa56-26"},{"uid":"aa56-0"},{"uid":"aa56-14"},{"uid":"aa56-18"},{"uid":"aa56-22"},{"uid":"aa56-20"}],"isExternal":true},"aa56-38":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"aa56-26"}],"isExternal":true},"aa56-39":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"aa56-0"},{"uid":"aa56-8"},{"uid":"aa56-14"}],"importedBy":[{"uid":"aa56-26"},{"uid":"aa56-18"},{"uid":"aa56-22"}]},"aa56-40":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"aa56-18"},{"uid":"aa56-22"},{"uid":"aa56-20"}],"importedBy":[{"uid":"aa56-26"}]}},"env":{"rollup":"2.67.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
6428
6428
|
|
|
6429
6429
|
const run = () => {
|
|
6430
6430
|
const width = window.innerWidth;
|
|
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
|
|
|
6424
6424
|
</script>
|
|
6425
6425
|
<script>
|
|
6426
6426
|
/*<!--*/
|
|
6427
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.module.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"
|
|
6427
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.module.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"aa56-42","name":"usePseudoState.tsx"},{"uid":"aa56-50","name":"useTheme.tsx"},{"uid":"aa56-56","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"aa56-44","name":"collection.ts"},{"uid":"aa56-46","name":"dimensions.ts"},{"uid":"aa56-48","name":"theme.ts"},{"uid":"aa56-58","name":"attrs.ts"},{"uid":"aa56-66","name":"styles.ts"}]},{"uid":"aa56-52","name":"context.tsx"},{"name":"constants","children":[{"uid":"aa56-54","name":"reservedKeys.ts"},{"uid":"aa56-70","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"aa56-60","name":"rocketstyleAttrsHoc.tsx"},{"uid":"aa56-62","name":"localContext.tsx"},{"uid":"aa56-64","name":"createProvider.tsx"}]},{"uid":"aa56-68","name":"rocketstyle.tsx"},{"uid":"aa56-72","name":"init.ts"},{"uid":"aa56-74","name":"isRocketComponent.ts"},{"uid":"aa56-76","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"aa56-42":{"renderedLength":1721,"gzipLength":401,"brotliLength":0,"mainUid":"aa56-41"},"aa56-44":{"renderedLength":468,"gzipLength":280,"brotliLength":0,"mainUid":"aa56-43"},"aa56-46":{"renderedLength":1459,"gzipLength":537,"brotliLength":0,"mainUid":"aa56-45"},"aa56-48":{"renderedLength":2595,"gzipLength":838,"brotliLength":0,"mainUid":"aa56-47"},"aa56-50":{"renderedLength":537,"gzipLength":292,"brotliLength":0,"mainUid":"aa56-49"},"aa56-52":{"renderedLength":430,"gzipLength":245,"brotliLength":0,"mainUid":"aa56-51"},"aa56-54":{"renderedLength":566,"gzipLength":296,"brotliLength":0,"mainUid":"aa56-53"},"aa56-56":{"renderedLength":320,"gzipLength":199,"brotliLength":0,"mainUid":"aa56-55"},"aa56-58":{"renderedLength":2563,"gzipLength":870,"brotliLength":0,"mainUid":"aa56-57"},"aa56-60":{"renderedLength":983,"gzipLength":424,"brotliLength":0,"mainUid":"aa56-59"},"aa56-62":{"renderedLength":37,"gzipLength":51,"brotliLength":0,"mainUid":"aa56-61"},"aa56-64":{"renderedLength":780,"gzipLength":365,"brotliLength":0,"mainUid":"aa56-63"},"aa56-66":{"renderedLength":129,"gzipLength":112,"brotliLength":0,"mainUid":"aa56-65"},"aa56-68":{"renderedLength":11343,"gzipLength":2762,"brotliLength":0,"mainUid":"aa56-67"},"aa56-70":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"aa56-69"},"aa56-72":{"renderedLength":1560,"gzipLength":573,"brotliLength":0,"mainUid":"aa56-71"},"aa56-74":{"renderedLength":204,"gzipLength":148,"brotliLength":0,"mainUid":"aa56-73"},"aa56-76":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"aa56-75"}},"nodeMetas":{"aa56-41":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-42"},"imported":[{"uid":"aa56-78"}],"importedBy":[{"uid":"aa56-80"}]},"aa56-43":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-44"},"imported":[],"importedBy":[{"uid":"aa56-67"},{"uid":"aa56-47"}]},"aa56-45":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-46"},"imported":[{"uid":"aa56-77"}],"importedBy":[{"uid":"aa56-71"},{"uid":"aa56-47"},{"uid":"aa56-49"}]},"aa56-47":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-48"},"imported":[{"uid":"aa56-77"},{"uid":"aa56-43"},{"uid":"aa56-45"}],"importedBy":[{"uid":"aa56-67"},{"uid":"aa56-49"}]},"aa56-49":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-50"},"imported":[{"uid":"aa56-77"},{"uid":"aa56-47"},{"uid":"aa56-45"}],"importedBy":[{"uid":"aa56-80"}]},"aa56-51":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-52"},"imported":[{"uid":"aa56-78"},{"uid":"aa56-77"}],"importedBy":[{"uid":"aa56-75"},{"uid":"aa56-55"}]},"aa56-53":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-54"},"imported":[],"importedBy":[{"uid":"aa56-71"},{"uid":"aa56-67"},{"uid":"aa56-55"}]},"aa56-55":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-56"},"imported":[{"uid":"aa56-78"},{"uid":"aa56-51"},{"uid":"aa56-53"}],"importedBy":[{"uid":"aa56-80"}]},"aa56-57":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-58"},"imported":[{"uid":"aa56-77"}],"importedBy":[{"uid":"aa56-67"},{"uid":"aa56-59"}]},"aa56-59":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-60"},"imported":[{"uid":"aa56-78"},{"uid":"aa56-77"},{"uid":"aa56-57"},{"uid":"aa56-80"}],"importedBy":[{"uid":"aa56-81"}]},"aa56-61":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-62"},"imported":[{"uid":"aa56-78"}],"importedBy":[{"uid":"aa56-81"},{"uid":"aa56-63"}]},"aa56-63":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-64"},"imported":[{"uid":"aa56-78"},{"uid":"aa56-80"},{"uid":"aa56-61"}],"importedBy":[{"uid":"aa56-81"}]},"aa56-65":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-66"},"imported":[],"importedBy":[{"uid":"aa56-67"}]},"aa56-67":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-68"},"imported":[{"uid":"aa56-78"},{"uid":"aa56-79"},{"uid":"aa56-77"},{"uid":"aa56-80"},{"uid":"aa56-81"},{"uid":"aa56-47"},{"uid":"aa56-65"},{"uid":"aa56-43"},{"uid":"aa56-57"},{"uid":"aa56-53"}],"importedBy":[{"uid":"aa56-71"}]},"aa56-69":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-70"},"imported":[],"importedBy":[{"uid":"aa56-71"}]},"aa56-71":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-72"},"imported":[{"uid":"aa56-77"},{"uid":"aa56-67"},{"uid":"aa56-45"},{"uid":"aa56-53"},{"uid":"aa56-69"}],"importedBy":[{"uid":"aa56-75"}]},"aa56-73":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-74"},"imported":[],"importedBy":[{"uid":"aa56-75"}]},"aa56-75":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"aa56-76"},"imported":[{"uid":"aa56-71"},{"uid":"aa56-51"},{"uid":"aa56-73"}],"importedBy":[],"isEntry":true},"aa56-77":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"aa56-71"},{"uid":"aa56-51"},{"uid":"aa56-67"},{"uid":"aa56-45"},{"uid":"aa56-47"},{"uid":"aa56-57"},{"uid":"aa56-49"},{"uid":"aa56-59"}],"isExternal":true},"aa56-78":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"aa56-51"},{"uid":"aa56-67"},{"uid":"aa56-41"},{"uid":"aa56-55"},{"uid":"aa56-59"},{"uid":"aa56-63"},{"uid":"aa56-61"}],"isExternal":true},"aa56-79":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"aa56-67"}],"isExternal":true},"aa56-80":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"aa56-41"},{"uid":"aa56-49"},{"uid":"aa56-55"}],"importedBy":[{"uid":"aa56-67"},{"uid":"aa56-59"},{"uid":"aa56-63"}]},"aa56-81":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"aa56-59"},{"uid":"aa56-63"},{"uid":"aa56-61"}],"importedBy":[{"uid":"aa56-67"}]}},"env":{"rollup":"2.67.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
6428
6428
|
|
|
6429
6429
|
const run = () => {
|
|
6430
6430
|
const width = window.innerWidth;
|
|
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
|
|
|
6424
6424
|
</script>
|
|
6425
6425
|
<script>
|
|
6426
6426
|
/*<!--*/
|
|
6427
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.umd.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"
|
|
6427
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.umd.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"aa56-83","name":"usePseudoState.tsx"},{"uid":"aa56-91","name":"useTheme.tsx"},{"uid":"aa56-97","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"aa56-85","name":"collection.ts"},{"uid":"aa56-87","name":"dimensions.ts"},{"uid":"aa56-89","name":"theme.ts"},{"uid":"aa56-99","name":"attrs.ts"},{"uid":"aa56-107","name":"styles.ts"}]},{"uid":"aa56-93","name":"context.tsx"},{"name":"constants","children":[{"uid":"aa56-95","name":"reservedKeys.ts"},{"uid":"aa56-111","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"aa56-101","name":"rocketstyleAttrsHoc.tsx"},{"uid":"aa56-103","name":"localContext.tsx"},{"uid":"aa56-105","name":"createProvider.tsx"}]},{"uid":"aa56-109","name":"rocketstyle.tsx"},{"uid":"aa56-113","name":"init.ts"},{"uid":"aa56-115","name":"isRocketComponent.ts"},{"uid":"aa56-117","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"aa56-83":{"renderedLength":1897,"gzipLength":408,"brotliLength":0,"mainUid":"aa56-82"},"aa56-85":{"renderedLength":492,"gzipLength":283,"brotliLength":0,"mainUid":"aa56-84"},"aa56-87":{"renderedLength":1554,"gzipLength":546,"brotliLength":0,"mainUid":"aa56-86"},"aa56-89":{"renderedLength":2763,"gzipLength":850,"brotliLength":0,"mainUid":"aa56-88"},"aa56-91":{"renderedLength":572,"gzipLength":298,"brotliLength":0,"mainUid":"aa56-90"},"aa56-93":{"renderedLength":476,"gzipLength":262,"brotliLength":0,"mainUid":"aa56-92"},"aa56-95":{"renderedLength":618,"gzipLength":299,"brotliLength":0,"mainUid":"aa56-94"},"aa56-97":{"renderedLength":345,"gzipLength":206,"brotliLength":0,"mainUid":"aa56-96"},"aa56-99":{"renderedLength":2698,"gzipLength":876,"brotliLength":0,"mainUid":"aa56-98"},"aa56-101":{"renderedLength":1081,"gzipLength":448,"brotliLength":0,"mainUid":"aa56-100"},"aa56-103":{"renderedLength":45,"gzipLength":60,"brotliLength":0,"mainUid":"aa56-102"},"aa56-105":{"renderedLength":866,"gzipLength":387,"brotliLength":0,"mainUid":"aa56-104"},"aa56-107":{"renderedLength":139,"gzipLength":114,"brotliLength":0,"mainUid":"aa56-106"},"aa56-109":{"renderedLength":11955,"gzipLength":2812,"brotliLength":0,"mainUid":"aa56-108"},"aa56-111":{"renderedLength":196,"gzipLength":130,"brotliLength":0,"mainUid":"aa56-110"},"aa56-113":{"renderedLength":1644,"gzipLength":579,"brotliLength":0,"mainUid":"aa56-112"},"aa56-115":{"renderedLength":220,"gzipLength":151,"brotliLength":0,"mainUid":"aa56-114"},"aa56-117":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"aa56-116"}},"nodeMetas":{"aa56-82":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-83"},"imported":[{"uid":"aa56-119"}],"importedBy":[{"uid":"aa56-121"}]},"aa56-84":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-85"},"imported":[],"importedBy":[{"uid":"aa56-108"},{"uid":"aa56-88"}]},"aa56-86":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-87"},"imported":[{"uid":"aa56-118"}],"importedBy":[{"uid":"aa56-112"},{"uid":"aa56-88"},{"uid":"aa56-90"}]},"aa56-88":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-89"},"imported":[{"uid":"aa56-118"},{"uid":"aa56-84"},{"uid":"aa56-86"}],"importedBy":[{"uid":"aa56-108"},{"uid":"aa56-90"}]},"aa56-90":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-91"},"imported":[{"uid":"aa56-118"},{"uid":"aa56-88"},{"uid":"aa56-86"}],"importedBy":[{"uid":"aa56-121"}]},"aa56-92":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-93"},"imported":[{"uid":"aa56-119"},{"uid":"aa56-118"}],"importedBy":[{"uid":"aa56-116"},{"uid":"aa56-96"}]},"aa56-94":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-95"},"imported":[],"importedBy":[{"uid":"aa56-112"},{"uid":"aa56-108"},{"uid":"aa56-96"}]},"aa56-96":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-97"},"imported":[{"uid":"aa56-119"},{"uid":"aa56-92"},{"uid":"aa56-94"}],"importedBy":[{"uid":"aa56-121"}]},"aa56-98":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-99"},"imported":[{"uid":"aa56-118"}],"importedBy":[{"uid":"aa56-108"},{"uid":"aa56-100"}]},"aa56-100":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-101"},"imported":[{"uid":"aa56-119"},{"uid":"aa56-118"},{"uid":"aa56-98"},{"uid":"aa56-121"}],"importedBy":[{"uid":"aa56-122"}]},"aa56-102":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-103"},"imported":[{"uid":"aa56-119"}],"importedBy":[{"uid":"aa56-122"},{"uid":"aa56-104"}]},"aa56-104":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-105"},"imported":[{"uid":"aa56-119"},{"uid":"aa56-121"},{"uid":"aa56-102"}],"importedBy":[{"uid":"aa56-122"}]},"aa56-106":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-107"},"imported":[],"importedBy":[{"uid":"aa56-108"}]},"aa56-108":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-109"},"imported":[{"uid":"aa56-119"},{"uid":"aa56-120"},{"uid":"aa56-118"},{"uid":"aa56-121"},{"uid":"aa56-122"},{"uid":"aa56-88"},{"uid":"aa56-106"},{"uid":"aa56-84"},{"uid":"aa56-98"},{"uid":"aa56-94"}],"importedBy":[{"uid":"aa56-112"}]},"aa56-110":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-111"},"imported":[],"importedBy":[{"uid":"aa56-112"}]},"aa56-112":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-113"},"imported":[{"uid":"aa56-118"},{"uid":"aa56-108"},{"uid":"aa56-86"},{"uid":"aa56-94"},{"uid":"aa56-110"}],"importedBy":[{"uid":"aa56-116"}]},"aa56-114":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-115"},"imported":[],"importedBy":[{"uid":"aa56-116"}]},"aa56-116":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"aa56-117"},"imported":[{"uid":"aa56-112"},{"uid":"aa56-92"},{"uid":"aa56-114"}],"importedBy":[],"isEntry":true},"aa56-118":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"aa56-112"},{"uid":"aa56-92"},{"uid":"aa56-108"},{"uid":"aa56-86"},{"uid":"aa56-88"},{"uid":"aa56-98"},{"uid":"aa56-90"},{"uid":"aa56-100"}],"isExternal":true},"aa56-119":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"aa56-92"},{"uid":"aa56-108"},{"uid":"aa56-82"},{"uid":"aa56-96"},{"uid":"aa56-100"},{"uid":"aa56-104"},{"uid":"aa56-102"}],"isExternal":true},"aa56-120":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"aa56-108"}],"isExternal":true},"aa56-121":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"aa56-82"},{"uid":"aa56-90"},{"uid":"aa56-96"}],"importedBy":[{"uid":"aa56-108"},{"uid":"aa56-100"},{"uid":"aa56-104"}]},"aa56-122":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"aa56-100"},{"uid":"aa56-104"},{"uid":"aa56-102"}],"importedBy":[{"uid":"aa56-108"}]}},"env":{"rollup":"2.67.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
6428
6428
|
|
|
6429
6429
|
const run = () => {
|
|
6430
6430
|
const width = window.innerWidth;
|
|
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
|
|
|
6424
6424
|
</script>
|
|
6425
6425
|
<script>
|
|
6426
6426
|
/*<!--*/
|
|
6427
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.umd.min.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"
|
|
6427
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.umd.min.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"aa56-124","name":"usePseudoState.tsx"},{"uid":"aa56-132","name":"useTheme.tsx"},{"uid":"aa56-138","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"aa56-126","name":"collection.ts"},{"uid":"aa56-128","name":"dimensions.ts"},{"uid":"aa56-130","name":"theme.ts"},{"uid":"aa56-140","name":"attrs.ts"},{"uid":"aa56-148","name":"styles.ts"}]},{"uid":"aa56-134","name":"context.tsx"},{"name":"constants","children":[{"uid":"aa56-136","name":"reservedKeys.ts"},{"uid":"aa56-152","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"aa56-142","name":"rocketstyleAttrsHoc.tsx"},{"uid":"aa56-144","name":"localContext.tsx"},{"uid":"aa56-146","name":"createProvider.tsx"}]},{"uid":"aa56-150","name":"rocketstyle.tsx"},{"uid":"aa56-154","name":"init.ts"},{"uid":"aa56-156","name":"isRocketComponent.ts"},{"uid":"aa56-158","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"aa56-124":{"renderedLength":1897,"gzipLength":408,"brotliLength":0,"mainUid":"aa56-123"},"aa56-126":{"renderedLength":492,"gzipLength":283,"brotliLength":0,"mainUid":"aa56-125"},"aa56-128":{"renderedLength":1554,"gzipLength":546,"brotliLength":0,"mainUid":"aa56-127"},"aa56-130":{"renderedLength":2763,"gzipLength":850,"brotliLength":0,"mainUid":"aa56-129"},"aa56-132":{"renderedLength":572,"gzipLength":298,"brotliLength":0,"mainUid":"aa56-131"},"aa56-134":{"renderedLength":476,"gzipLength":262,"brotliLength":0,"mainUid":"aa56-133"},"aa56-136":{"renderedLength":592,"gzipLength":288,"brotliLength":0,"mainUid":"aa56-135"},"aa56-138":{"renderedLength":345,"gzipLength":206,"brotliLength":0,"mainUid":"aa56-137"},"aa56-140":{"renderedLength":2698,"gzipLength":876,"brotliLength":0,"mainUid":"aa56-139"},"aa56-142":{"renderedLength":1081,"gzipLength":448,"brotliLength":0,"mainUid":"aa56-141"},"aa56-144":{"renderedLength":45,"gzipLength":60,"brotliLength":0,"mainUid":"aa56-143"},"aa56-146":{"renderedLength":866,"gzipLength":387,"brotliLength":0,"mainUid":"aa56-145"},"aa56-148":{"renderedLength":139,"gzipLength":114,"brotliLength":0,"mainUid":"aa56-147"},"aa56-150":{"renderedLength":11774,"gzipLength":2737,"brotliLength":0,"mainUid":"aa56-149"},"aa56-152":{"renderedLength":196,"gzipLength":130,"brotliLength":0,"mainUid":"aa56-151"},"aa56-154":{"renderedLength":472,"gzipLength":244,"brotliLength":0,"mainUid":"aa56-153"},"aa56-156":{"renderedLength":220,"gzipLength":151,"brotliLength":0,"mainUid":"aa56-155"},"aa56-158":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"aa56-157"}},"nodeMetas":{"aa56-123":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-124"},"imported":[{"uid":"aa56-160"}],"importedBy":[{"uid":"aa56-162"}]},"aa56-125":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-126"},"imported":[],"importedBy":[{"uid":"aa56-149"},{"uid":"aa56-129"}]},"aa56-127":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-128"},"imported":[{"uid":"aa56-159"}],"importedBy":[{"uid":"aa56-153"},{"uid":"aa56-129"},{"uid":"aa56-131"}]},"aa56-129":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-130"},"imported":[{"uid":"aa56-159"},{"uid":"aa56-125"},{"uid":"aa56-127"}],"importedBy":[{"uid":"aa56-149"},{"uid":"aa56-131"}]},"aa56-131":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-132"},"imported":[{"uid":"aa56-159"},{"uid":"aa56-129"},{"uid":"aa56-127"}],"importedBy":[{"uid":"aa56-162"}]},"aa56-133":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-134"},"imported":[{"uid":"aa56-160"},{"uid":"aa56-159"}],"importedBy":[{"uid":"aa56-157"},{"uid":"aa56-137"}]},"aa56-135":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-136"},"imported":[],"importedBy":[{"uid":"aa56-153"},{"uid":"aa56-149"},{"uid":"aa56-137"}]},"aa56-137":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-138"},"imported":[{"uid":"aa56-160"},{"uid":"aa56-133"},{"uid":"aa56-135"}],"importedBy":[{"uid":"aa56-162"}]},"aa56-139":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-140"},"imported":[{"uid":"aa56-159"}],"importedBy":[{"uid":"aa56-149"},{"uid":"aa56-141"}]},"aa56-141":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-142"},"imported":[{"uid":"aa56-160"},{"uid":"aa56-159"},{"uid":"aa56-139"},{"uid":"aa56-162"}],"importedBy":[{"uid":"aa56-163"}]},"aa56-143":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-144"},"imported":[{"uid":"aa56-160"}],"importedBy":[{"uid":"aa56-163"},{"uid":"aa56-145"}]},"aa56-145":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-146"},"imported":[{"uid":"aa56-160"},{"uid":"aa56-162"},{"uid":"aa56-143"}],"importedBy":[{"uid":"aa56-163"}]},"aa56-147":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-148"},"imported":[],"importedBy":[{"uid":"aa56-149"}]},"aa56-149":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-150"},"imported":[{"uid":"aa56-160"},{"uid":"aa56-161"},{"uid":"aa56-159"},{"uid":"aa56-162"},{"uid":"aa56-163"},{"uid":"aa56-129"},{"uid":"aa56-147"},{"uid":"aa56-125"},{"uid":"aa56-139"},{"uid":"aa56-135"}],"importedBy":[{"uid":"aa56-153"}]},"aa56-151":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-152"},"imported":[],"importedBy":[{"uid":"aa56-153"}]},"aa56-153":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-154"},"imported":[{"uid":"aa56-159"},{"uid":"aa56-149"},{"uid":"aa56-127"},{"uid":"aa56-135"},{"uid":"aa56-151"}],"importedBy":[{"uid":"aa56-157"}]},"aa56-155":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-156"},"imported":[],"importedBy":[{"uid":"aa56-157"}]},"aa56-157":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"aa56-158"},"imported":[{"uid":"aa56-153"},{"uid":"aa56-133"},{"uid":"aa56-155"}],"importedBy":[],"isEntry":true},"aa56-159":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"aa56-153"},{"uid":"aa56-133"},{"uid":"aa56-149"},{"uid":"aa56-127"},{"uid":"aa56-129"},{"uid":"aa56-139"},{"uid":"aa56-131"},{"uid":"aa56-141"}],"isExternal":true},"aa56-160":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"aa56-133"},{"uid":"aa56-149"},{"uid":"aa56-123"},{"uid":"aa56-137"},{"uid":"aa56-141"},{"uid":"aa56-145"},{"uid":"aa56-143"}],"isExternal":true},"aa56-161":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"aa56-149"}],"isExternal":true},"aa56-162":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"aa56-123"},{"uid":"aa56-131"},{"uid":"aa56-137"}],"importedBy":[{"uid":"aa56-149"},{"uid":"aa56-141"},{"uid":"aa56-145"}]},"aa56-163":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"aa56-141"},{"uid":"aa56-145"},{"uid":"aa56-143"}],"importedBy":[{"uid":"aa56-149"}]}},"env":{"rollup":"2.67.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
6428
6428
|
|
|
6429
6429
|
const run = () => {
|
|
6430
6430
|
const width = window.innerWidth;
|
package/lib/index.d.ts
CHANGED
|
@@ -165,37 +165,77 @@ declare type AttrsCb<A, T> = (props: Partial<A>, theme: T, helpers: {
|
|
|
165
165
|
createElement: typeof renderContent;
|
|
166
166
|
}) => Partial<A>;
|
|
167
167
|
|
|
168
|
-
declare type GenericHoc = (component: ElementType) => ElementType;
|
|
168
|
+
declare type GenericHoc = (component: ElementType) => ElementType;
|
|
169
|
+
declare type ComposeParam = Record<string, GenericHoc | null | undefined | false>;
|
|
169
170
|
|
|
170
|
-
declare type RocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends TObj = {}, CSS extends TObj = {}, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP> = IRocketComponent<OA, EA, T, CSS, D, UB, DKP> & {
|
|
171
|
-
[I in keyof D]: <K extends DimensionValue = D[I], P extends DimensionCallbackParam<Theme$1<T>, Styles<CSS>> = DimensionCallbackParam<Theme$1<T>, Styles<CSS>>>(param: P) => P extends DimensionCallbackParam<Theme$1<T>, Styles<CSS>> ? RocketComponent<OA, EA, T, CSS, D, UB, DimensionProps<K, D, P, DKP>> : RocketComponent<OA, EA, T, CSS, D, UB, DKP>;
|
|
171
|
+
declare type RocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends TObj = {}, CSS extends TObj = {}, S extends TObj = {}, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP> = IRocketComponent<OA, EA, T, CSS, S, D, UB, DKP> & {
|
|
172
|
+
[I in keyof D]: <K extends DimensionValue = D[I], P extends DimensionCallbackParam<Theme$1<T>, Styles<CSS>> = DimensionCallbackParam<Theme$1<T>, Styles<CSS>>>(param: P) => P extends DimensionCallbackParam<Theme$1<T>, Styles<CSS>> ? RocketComponent<OA, EA, T, CSS, S, D, UB, DimensionProps<K, D, P, DKP>> : RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
172
173
|
};
|
|
173
174
|
/**
|
|
174
|
-
* @param A Generic _props_ params.
|
|
175
175
|
* @param OA Origin component props params.
|
|
176
|
+
* @param EA Extended prop types
|
|
176
177
|
* @param T Theme passed via context.
|
|
177
|
-
* @param
|
|
178
|
+
* @param CSS Custom theme accepted by styles.
|
|
179
|
+
* @param S Defined statics
|
|
178
180
|
* @param D Dimensions to be used for defining component states.
|
|
179
181
|
* @param UB Use booleans value
|
|
180
182
|
* @param DKP Dimensions key props.
|
|
183
|
+
* @param DFP Calculated final component props
|
|
181
184
|
*/
|
|
182
|
-
interface IRocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends TObj = {}, CSS extends TObj = {}, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP, DFP = MergeTypes<[OA, EA, DefaultProps, ExtractDimensionProps<D, DKP, UB>]>> extends ForwardRefExoticComponent<DFP> {
|
|
183
|
-
config: <NC extends ElementType | unknown = unknown>({ name, component: NC, provider, consumer, DEBUG, inversed, passProps, }: ConfigAttrs<NC, DKP, UB>) => NC extends ElementType ? RocketComponent<ExtractProps<NC>, EA, T, CSS, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, D, UB, DKP>;
|
|
185
|
+
interface IRocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends TObj = {}, CSS extends TObj = {}, S extends TObj = {}, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP, DFP = MergeTypes<[OA, EA, DefaultProps, ExtractDimensionProps<D, DKP, UB>]>> extends ForwardRefExoticComponent<DFP> {
|
|
186
|
+
config: <NC extends ElementType | unknown = unknown>({ name, component: NC, provider, consumer, DEBUG, inversed, passProps, }: ConfigAttrs<NC, DKP, UB>) => NC extends ElementType ? RocketComponent<ExtractProps<NC>, EA, T, CSS, S, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
184
187
|
/**
|
|
185
|
-
*
|
|
186
|
-
* @param
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
188
|
+
* A chaining method to define default component props
|
|
189
|
+
* @param param Can be either _object_ or a _callback_
|
|
190
|
+
*
|
|
191
|
+
* #### Examples
|
|
192
|
+
*
|
|
193
|
+
* ##### Object as a parameter
|
|
194
|
+
* ```tsx
|
|
195
|
+
* const base = rocketstyleComponent
|
|
196
|
+
* const newElement = base.attrs({
|
|
197
|
+
* propA: 'value',
|
|
198
|
+
* propB: 'value,
|
|
199
|
+
* })
|
|
200
|
+
* ```
|
|
201
|
+
*
|
|
202
|
+
* ##### Callback as a parameter
|
|
203
|
+
* ```tsx
|
|
204
|
+
* const base = rocketstyleComponent
|
|
205
|
+
* const newElement = base.attrs((props, theme, helpers) => ({
|
|
206
|
+
* propA: props.disabled ? 'valueA' : 'valueB',
|
|
207
|
+
* propB: 'value,
|
|
208
|
+
* }))
|
|
209
|
+
* ```
|
|
192
210
|
*/
|
|
193
|
-
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[DFP, P]>> | AttrsCb<MergeTypes<[DFP, P]>, Theme$1<T>> : Partial<DFP> | AttrsCb<DFP, Theme$1<T>>) => P extends TObj ? RocketComponent<OA, MergeTypes<[EA, P]>, T, CSS, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, D, UB, DKP>;
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
211
|
+
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[DFP, P]>> | AttrsCb<MergeTypes<[DFP, P]>, Theme$1<T>> : Partial<DFP> | AttrsCb<DFP, Theme$1<T>>) => P extends TObj ? RocketComponent<OA, MergeTypes<[EA, P]>, T, CSS, S, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
212
|
+
/**
|
|
213
|
+
* A chaining method to define default component theme
|
|
214
|
+
* @param param Can be either _object_ or a _callback_
|
|
215
|
+
*
|
|
216
|
+
* #### Examples
|
|
217
|
+
*
|
|
218
|
+
* ##### Object as a parameter
|
|
219
|
+
* ```tsx
|
|
220
|
+
* const base = rocketstyleComponent
|
|
221
|
+
* const newElement = base.attrs({
|
|
222
|
+
* backgroundColor: 'black',
|
|
223
|
+
* })
|
|
224
|
+
* ```
|
|
225
|
+
*
|
|
226
|
+
* ##### Callback as a parameter
|
|
227
|
+
* ```tsx
|
|
228
|
+
* const base = rocketstyleComponent
|
|
229
|
+
* const newElement = base.theme((theme, css) => ({
|
|
230
|
+
* backgroundColor: t.color.black, // value from context
|
|
231
|
+
* }))
|
|
232
|
+
* ```
|
|
233
|
+
*/
|
|
234
|
+
theme: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[Styles<CSS>, P]>> | ThemeCb<MergeTypes<[Styles<CSS>, P]>, Theme$1<T>> : Partial<Styles<CSS>> | ThemeCb<Styles<CSS>, Theme$1<T>>) => P extends TObj ? RocketComponent<OA, EA, T, MergeTypes<[CSS, P]>, S, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
235
|
+
styles: (param: StylesCb) => RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
236
|
+
compose: <P extends ComposeParam>(param: P) => RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
237
|
+
statics: <P extends TObj>(param: P) => P extends TObj ? RocketComponent<OA, EA, T, CSS, MergeTypes<[S, P]>, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
238
|
+
is: S;
|
|
199
239
|
getStaticDimensions: (theme: TObj) => {
|
|
200
240
|
dimensions: TObj;
|
|
201
241
|
useBooleans: boolean;
|
|
@@ -207,7 +247,7 @@ interface IRocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends
|
|
|
207
247
|
readonly displayName: string;
|
|
208
248
|
}
|
|
209
249
|
|
|
210
|
-
declare type StyleComponent<C extends ElementType, T extends TObj = {}, CSS extends TObj = {}, D extends Dimensions = DefaultDimensions, UB extends boolean = boolean> = (props: Partial<Configuration<C, D>>) => RocketComponent<ExtractProps<C>, {}, T, CSS, D, UB, {}>;
|
|
250
|
+
declare type StyleComponent<C extends ElementType, T extends TObj = {}, CSS extends TObj = {}, D extends Dimensions = DefaultDimensions, UB extends boolean = boolean> = (props: Partial<Configuration<C, D>>) => RocketComponent<ExtractProps<C>, {}, T, CSS, {}, D, UB, {}>;
|
|
211
251
|
|
|
212
252
|
declare type Rocketstyle = <T extends TObj = {}, CSS extends TObj = {}>() => <D extends Dimensions = DefaultDimensions, UB extends boolean = true>({ dimensions, useBooleans, }?: {
|
|
213
253
|
dimensions?: D;
|
|
@@ -235,4 +275,4 @@ declare const Provider: FC<TProvider>;
|
|
|
235
275
|
declare type IsRocketComponent = (component: any) => boolean;
|
|
236
276
|
declare const isRocketComponent: IsRocketComponent;
|
|
237
277
|
|
|
238
|
-
export { AttrsCb, ConfigAttrs, ConsumerCb, ConsumerCtxCBValue, ConsumerCtxCb, DefaultProps, DimensionCallbackParam, DimensionProps, DimensionValue, Dimensions, ElementType, ExtractDimensionProps, ExtractProps, GenericHoc, IRocketComponent, MergeTypes, Provider, RocketComponent, RocketComponentType, RocketProviderState, Rocketstyle, StylesCb, StylesDefault, TDKP, TObj, TProvider, ThemeCb, ThemeDefault, ThemeModeKeys, rocketstyle as default, isRocketComponent };
|
|
278
|
+
export { AttrsCb, ComposeParam, ConfigAttrs, ConsumerCb, ConsumerCtxCBValue, ConsumerCtxCb, DefaultProps, DimensionCallbackParam, DimensionProps, DimensionValue, Dimensions, ElementType, ExtractDimensionProps, ExtractProps, GenericHoc, IRocketComponent, MergeTypes, Provider, RocketComponent, RocketComponentType, RocketProviderState, Rocketstyle, StylesCb, StylesDefault, TDKP, TObj, TProvider, ThemeCb, ThemeDefault, ThemeModeKeys, rocketstyle as default, isRocketComponent };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ import type { Dimensions, DimensionValue, DimensionCallbackParam, ExtractDimensi
|
|
|
7
7
|
import type { StylesCb, StylesDefault } from "./types/styles";
|
|
8
8
|
import type { AttrsCb } from "./types/attrs";
|
|
9
9
|
import type { ThemeCb, ThemeModeKeys, ThemeDefault } from "./types/theme";
|
|
10
|
-
import type { GenericHoc } from "./types/hoc";
|
|
10
|
+
import type { GenericHoc, ComposeParam } from "./types/hoc";
|
|
11
11
|
import type { DefaultProps } from "./types/configuration";
|
|
12
12
|
import type { RocketComponent, IRocketComponent } from "./types/rocketstyle";
|
|
13
|
-
export type { StylesDefault, ThemeDefault, RocketComponent, IRocketComponent, Rocketstyle, TProvider, RocketComponentType, RocketProviderState, ConsumerCtxCBValue, ConsumerCtxCb, ConsumerCb, TObj, ElementType, MergeTypes, ExtractProps, Dimensions, DimensionValue, DimensionCallbackParam, ExtractDimensionProps, TDKP, DimensionProps, StylesCb, ConfigAttrs, AttrsCb, ThemeCb, ThemeModeKeys, GenericHoc, DefaultProps, };
|
|
13
|
+
export type { StylesDefault, ThemeDefault, RocketComponent, IRocketComponent, Rocketstyle, TProvider, RocketComponentType, RocketProviderState, ConsumerCtxCBValue, ConsumerCtxCb, ConsumerCb, TObj, ElementType, MergeTypes, ExtractProps, Dimensions, DimensionValue, DimensionCallbackParam, ExtractDimensionProps, TDKP, DimensionProps, StylesCb, ConfigAttrs, AttrsCb, ThemeCb, ThemeModeKeys, GenericHoc, ComposeParam, DefaultProps, };
|
|
14
14
|
export { context, Provider, isRocketComponent };
|
|
15
15
|
export default rocketstyle;
|
package/lib/types/types/hoc.d.ts
CHANGED
|
@@ -5,37 +5,76 @@ import type { StylesCb, Styles } from './styles';
|
|
|
5
5
|
import type { ConfigAttrs } from './config';
|
|
6
6
|
import type { AttrsCb } from './attrs';
|
|
7
7
|
import type { Theme, ThemeCb, ThemeModeKeys } from './theme';
|
|
8
|
-
import type {
|
|
8
|
+
import type { ComposeParam } from './hoc';
|
|
9
9
|
import type { DefaultProps } from './configuration';
|
|
10
|
-
export declare type RocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends TObj = {}, CSS extends TObj = {}, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP> = IRocketComponent<OA, EA, T, CSS, D, UB, DKP> & {
|
|
11
|
-
[I in keyof D]: <K extends DimensionValue = D[I], P extends DimensionCallbackParam<Theme<T>, Styles<CSS>> = DimensionCallbackParam<Theme<T>, Styles<CSS>>>(param: P) => P extends DimensionCallbackParam<Theme<T>, Styles<CSS>> ? RocketComponent<OA, EA, T, CSS, D, UB, DimensionProps<K, D, P, DKP>> : RocketComponent<OA, EA, T, CSS, D, UB, DKP>;
|
|
10
|
+
export declare type RocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends TObj = {}, CSS extends TObj = {}, S extends TObj = {}, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP> = IRocketComponent<OA, EA, T, CSS, S, D, UB, DKP> & {
|
|
11
|
+
[I in keyof D]: <K extends DimensionValue = D[I], P extends DimensionCallbackParam<Theme<T>, Styles<CSS>> = DimensionCallbackParam<Theme<T>, Styles<CSS>>>(param: P) => P extends DimensionCallbackParam<Theme<T>, Styles<CSS>> ? RocketComponent<OA, EA, T, CSS, S, D, UB, DimensionProps<K, D, P, DKP>> : RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* @param A Generic _props_ params.
|
|
15
14
|
* @param OA Origin component props params.
|
|
15
|
+
* @param EA Extended prop types
|
|
16
16
|
* @param T Theme passed via context.
|
|
17
|
-
* @param
|
|
17
|
+
* @param CSS Custom theme accepted by styles.
|
|
18
|
+
* @param S Defined statics
|
|
18
19
|
* @param D Dimensions to be used for defining component states.
|
|
19
20
|
* @param UB Use booleans value
|
|
20
21
|
* @param DKP Dimensions key props.
|
|
22
|
+
* @param DFP Calculated final component props
|
|
21
23
|
*/
|
|
22
|
-
export interface IRocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends TObj = {}, CSS extends TObj = {}, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP, DFP = MergeTypes<[OA, EA, DefaultProps, ExtractDimensionProps<D, DKP, UB>]>> extends ForwardRefExoticComponent<DFP> {
|
|
23
|
-
config: <NC extends ElementType | unknown = unknown>({ name, component: NC, provider, consumer, DEBUG, inversed, passProps, }: ConfigAttrs<NC, DKP, UB>) => NC extends ElementType ? RocketComponent<ExtractProps<NC>, EA, T, CSS, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, D, UB, DKP>;
|
|
24
|
+
export interface IRocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends TObj = {}, CSS extends TObj = {}, S extends TObj = {}, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP, DFP = MergeTypes<[OA, EA, DefaultProps, ExtractDimensionProps<D, DKP, UB>]>> extends ForwardRefExoticComponent<DFP> {
|
|
25
|
+
config: <NC extends ElementType | unknown = unknown>({ name, component: NC, provider, consumer, DEBUG, inversed, passProps, }: ConfigAttrs<NC, DKP, UB>) => NC extends ElementType ? RocketComponent<ExtractProps<NC>, EA, T, CSS, S, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
24
26
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @param
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
27
|
+
* A chaining method to define default component props
|
|
28
|
+
* @param param Can be either _object_ or a _callback_
|
|
29
|
+
*
|
|
30
|
+
* #### Examples
|
|
31
|
+
*
|
|
32
|
+
* ##### Object as a parameter
|
|
33
|
+
* ```tsx
|
|
34
|
+
* const base = rocketstyleComponent
|
|
35
|
+
* const newElement = base.attrs({
|
|
36
|
+
* propA: 'value',
|
|
37
|
+
* propB: 'value,
|
|
38
|
+
* })
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* ##### Callback as a parameter
|
|
42
|
+
* ```tsx
|
|
43
|
+
* const base = rocketstyleComponent
|
|
44
|
+
* const newElement = base.attrs((props, theme, helpers) => ({
|
|
45
|
+
* propA: props.disabled ? 'valueA' : 'valueB',
|
|
46
|
+
* propB: 'value,
|
|
47
|
+
* }))
|
|
48
|
+
* ```
|
|
32
49
|
*/
|
|
33
|
-
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[DFP, P]>> | AttrsCb<MergeTypes<[DFP, P]>, Theme<T>> : Partial<DFP> | AttrsCb<DFP, Theme<T>>) => P extends TObj ? RocketComponent<OA, MergeTypes<[EA, P]>, T, CSS, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, D, UB, DKP>;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
50
|
+
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[DFP, P]>> | AttrsCb<MergeTypes<[DFP, P]>, Theme<T>> : Partial<DFP> | AttrsCb<DFP, Theme<T>>) => P extends TObj ? RocketComponent<OA, MergeTypes<[EA, P]>, T, CSS, S, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
51
|
+
/**
|
|
52
|
+
* A chaining method to define default component theme
|
|
53
|
+
* @param param Can be either _object_ or a _callback_
|
|
54
|
+
*
|
|
55
|
+
* #### Examples
|
|
56
|
+
*
|
|
57
|
+
* ##### Object as a parameter
|
|
58
|
+
* ```tsx
|
|
59
|
+
* const base = rocketstyleComponent
|
|
60
|
+
* const newElement = base.attrs({
|
|
61
|
+
* backgroundColor: 'black',
|
|
62
|
+
* })
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* ##### Callback as a parameter
|
|
66
|
+
* ```tsx
|
|
67
|
+
* const base = rocketstyleComponent
|
|
68
|
+
* const newElement = base.theme((theme, css) => ({
|
|
69
|
+
* backgroundColor: t.color.black, // value from context
|
|
70
|
+
* }))
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
theme: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[Styles<CSS>, P]>> | ThemeCb<MergeTypes<[Styles<CSS>, P]>, Theme<T>> : Partial<Styles<CSS>> | ThemeCb<Styles<CSS>, Theme<T>>) => P extends TObj ? RocketComponent<OA, EA, T, MergeTypes<[CSS, P]>, S, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
74
|
+
styles: (param: StylesCb) => RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
75
|
+
compose: <P extends ComposeParam>(param: P) => RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
76
|
+
statics: <P extends TObj>(param: P) => P extends TObj ? RocketComponent<OA, EA, T, CSS, MergeTypes<[S, P]>, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, D, UB, DKP>;
|
|
77
|
+
is: S;
|
|
39
78
|
getStaticDimensions: (theme: TObj) => {
|
|
40
79
|
dimensions: TObj;
|
|
41
80
|
useBooleans: boolean;
|
|
@@ -2,4 +2,4 @@ import type { ExtractProps, ElementType, TObj } from './utils';
|
|
|
2
2
|
import type { Dimensions, DefaultDimensions } from './dimensions';
|
|
3
3
|
import type { Configuration } from './configuration';
|
|
4
4
|
import type { RocketComponent } from './rocketstyle';
|
|
5
|
-
export declare type StyleComponent<C extends ElementType, T extends TObj = {}, CSS extends TObj = {}, D extends Dimensions = DefaultDimensions, UB extends boolean = boolean> = (props: Partial<Configuration<C, D>>) => RocketComponent<ExtractProps<C>, {}, T, CSS, D, UB, {}>;
|
|
5
|
+
export declare type StyleComponent<C extends ElementType, T extends TObj = {}, CSS extends TObj = {}, D extends Dimensions = DefaultDimensions, UB extends boolean = boolean> = (props: Partial<Configuration<C, D>>) => RocketComponent<ExtractProps<C>, {}, T, CSS, {}, D, UB, {}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitus-labs/rocketstyle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Vit Bokisch <vit@bokisch.cz>",
|
|
6
6
|
"maintainers": [
|
|
@@ -67,13 +67,13 @@
|
|
|
67
67
|
"hoist-non-react-statics": "^3.1.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@vitus-labs/core": "^0.
|
|
71
|
-
"@vitus-labs/elements": "^0.
|
|
70
|
+
"@vitus-labs/core": "^0.41.0",
|
|
71
|
+
"@vitus-labs/elements": "^0.41.0",
|
|
72
72
|
"@vitus-labs/tools-babel": "^0.27.0",
|
|
73
73
|
"@vitus-labs/tools-rollup": "^0.27.0",
|
|
74
74
|
"@vitus-labs/tools-storybook": "^0.27.0",
|
|
75
75
|
"@vitus-labs/tools-typescript": "^0.27.0",
|
|
76
|
-
"@vitus-labs/unistyle": "^0.
|
|
76
|
+
"@vitus-labs/unistyle": "^0.41.0"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "10856dfac2ad320299f9071ee02ad1b196eb71e3"
|
|
79
79
|
}
|