@vitus-labs/rocketstyle 0.23.0-alpha.3 → 0.25.0-alpha.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 +32 -1
- package/lib/types/index.d.ts +2 -2
- package/lib/types/types/rocketstyle.d.ts +31 -0
- package/lib/vitus-labs-rocketstyle.js +5 -12
- package/lib/vitus-labs-rocketstyle.js.map +1 -1
- package/lib/vitus-labs-rocketstyle.module.js +5 -12
- package/lib/vitus-labs-rocketstyle.module.js.map +1 -1
- package/lib/vitus-labs-rocketstyle.umd.js +5 -12
- package/lib/vitus-labs-rocketstyle.umd.js.map +1 -1
- package/lib/vitus-labs-rocketstyle.umd.min.js +2 -2
- package/lib/vitus-labs-rocketstyle.umd.min.js.map +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":"75e5-1","name":"usePseudoState.tsx"},{"uid":"75e5-9","name":"useTheme.tsx"},{"uid":"75e5-15","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"75e5-3","name":"collection.ts"},{"uid":"75e5-5","name":"dimensions.ts"},{"uid":"75e5-7","name":"theme.ts"},{"uid":"75e5-17","name":"attrs.ts"},{"uid":"75e5-25","name":"styles.ts"}]},{"uid":"75e5-11","name":"context.tsx"},{"name":"constants","children":[{"uid":"75e5-13","name":"reservedKeys.ts"},{"uid":"75e5-29","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"75e5-19","name":"rocketstyleAttrsHoc.tsx"},{"uid":"75e5-21","name":"localContext.tsx"},{"uid":"75e5-23","name":"createProvider.tsx"}]},{"uid":"75e5-27","name":"rocketstyle.tsx"},{"uid":"75e5-31","name":"init.ts"},{"uid":"75e5-33","name":"isRocketComponent.ts"},{"uid":"75e5-35","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"75e5-1":{"renderedLength":1775,"gzipLength":407,"brotliLength":0,"mainUid":"75e5-0"},"75e5-3":{"renderedLength":468,"gzipLength":280,"brotliLength":0,"mainUid":"75e5-2"},"75e5-5":{"renderedLength":1474,"gzipLength":545,"brotliLength":0,"mainUid":"75e5-4"},"75e5-7":{"renderedLength":2625,"gzipLength":845,"brotliLength":0,"mainUid":"75e5-6"},"75e5-9":{"renderedLength":542,"gzipLength":295,"brotliLength":0,"mainUid":"75e5-8"},"75e5-11":{"renderedLength":464,"gzipLength":261,"brotliLength":0,"mainUid":"75e5-10"},"75e5-13":{"renderedLength":566,"gzipLength":296,"brotliLength":0,"mainUid":"75e5-12"},"75e5-15":{"renderedLength":331,"gzipLength":206,"brotliLength":0,"mainUid":"75e5-14"},"75e5-17":{"renderedLength":2568,"gzipLength":873,"brotliLength":0,"mainUid":"75e5-16"},"75e5-19":{"renderedLength":1029,"gzipLength":445,"brotliLength":0,"mainUid":"75e5-18"},"75e5-21":{"renderedLength":43,"gzipLength":58,"brotliLength":0,"mainUid":"75e5-20"},"75e5-23":{"renderedLength":832,"gzipLength":384,"brotliLength":0,"mainUid":"75e5-22"},"75e5-25":{"renderedLength":129,"gzipLength":112,"brotliLength":0,"mainUid":"75e5-24"},"75e5-27":{"renderedLength":11491,"gzipLength":2801,"brotliLength":0,"mainUid":"75e5-26"},"75e5-29":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"75e5-28"},"75e5-31":{"renderedLength":1582,"gzipLength":585,"brotliLength":0,"mainUid":"75e5-30"},"75e5-33":{"renderedLength":204,"gzipLength":148,"brotliLength":0,"mainUid":"75e5-32"},"75e5-35":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"75e5-34"}},"nodeMetas":{"75e5-0":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-1"},"imported":[{"uid":"75e5-37"}],"importedBy":[{"uid":"75e5-39"}]},"75e5-2":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-3"},"imported":[],"importedBy":[{"uid":"75e5-26"},{"uid":"75e5-6"}]},"75e5-4":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-5"},"imported":[{"uid":"75e5-36"}],"importedBy":[{"uid":"75e5-30"},{"uid":"75e5-6"},{"uid":"75e5-8"}]},"75e5-6":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-7"},"imported":[{"uid":"75e5-36"},{"uid":"75e5-2"},{"uid":"75e5-4"}],"importedBy":[{"uid":"75e5-26"},{"uid":"75e5-8"}]},"75e5-8":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-9"},"imported":[{"uid":"75e5-36"},{"uid":"75e5-6"},{"uid":"75e5-4"}],"importedBy":[{"uid":"75e5-39"}]},"75e5-10":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-11"},"imported":[{"uid":"75e5-37"},{"uid":"75e5-36"}],"importedBy":[{"uid":"75e5-34"},{"uid":"75e5-14"}]},"75e5-12":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-13"},"imported":[],"importedBy":[{"uid":"75e5-30"},{"uid":"75e5-26"},{"uid":"75e5-14"}]},"75e5-14":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-15"},"imported":[{"uid":"75e5-37"},{"uid":"75e5-10"},{"uid":"75e5-12"}],"importedBy":[{"uid":"75e5-39"}]},"75e5-16":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-17"},"imported":[{"uid":"75e5-36"}],"importedBy":[{"uid":"75e5-26"},{"uid":"75e5-18"}]},"75e5-18":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-19"},"imported":[{"uid":"75e5-37"},{"uid":"75e5-36"},{"uid":"75e5-16"},{"uid":"75e5-39"}],"importedBy":[{"uid":"75e5-40"}]},"75e5-20":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-21"},"imported":[{"uid":"75e5-37"}],"importedBy":[{"uid":"75e5-40"},{"uid":"75e5-22"}]},"75e5-22":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-23"},"imported":[{"uid":"75e5-37"},{"uid":"75e5-39"},{"uid":"75e5-20"}],"importedBy":[{"uid":"75e5-40"}]},"75e5-24":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-25"},"imported":[],"importedBy":[{"uid":"75e5-26"}]},"75e5-26":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-27"},"imported":[{"uid":"75e5-37"},{"uid":"75e5-38"},{"uid":"75e5-36"},{"uid":"75e5-39"},{"uid":"75e5-40"},{"uid":"75e5-6"},{"uid":"75e5-24"},{"uid":"75e5-2"},{"uid":"75e5-16"},{"uid":"75e5-12"}],"importedBy":[{"uid":"75e5-30"}]},"75e5-28":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-29"},"imported":[],"importedBy":[{"uid":"75e5-30"}]},"75e5-30":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-31"},"imported":[{"uid":"75e5-36"},{"uid":"75e5-26"},{"uid":"75e5-4"},{"uid":"75e5-12"},{"uid":"75e5-28"}],"importedBy":[{"uid":"75e5-34"}]},"75e5-32":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-33"},"imported":[],"importedBy":[{"uid":"75e5-34"}]},"75e5-34":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.js":"75e5-35"},"imported":[{"uid":"75e5-30"},{"uid":"75e5-10"},{"uid":"75e5-32"}],"importedBy":[],"isEntry":true},"75e5-36":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"75e5-30"},{"uid":"75e5-10"},{"uid":"75e5-26"},{"uid":"75e5-4"},{"uid":"75e5-6"},{"uid":"75e5-16"},{"uid":"75e5-8"},{"uid":"75e5-18"}],"isExternal":true},"75e5-37":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"75e5-10"},{"uid":"75e5-26"},{"uid":"75e5-0"},{"uid":"75e5-14"},{"uid":"75e5-18"},{"uid":"75e5-22"},{"uid":"75e5-20"}],"isExternal":true},"75e5-38":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"75e5-26"}],"isExternal":true},"75e5-39":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"75e5-0"},{"uid":"75e5-8"},{"uid":"75e5-14"}],"importedBy":[{"uid":"75e5-26"},{"uid":"75e5-18"},{"uid":"75e5-22"}]},"75e5-40":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"75e5-18"},{"uid":"75e5-22"},{"uid":"75e5-20"}],"importedBy":[{"uid":"75e5-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":"75e5-42","name":"usePseudoState.tsx"},{"uid":"75e5-50","name":"useTheme.tsx"},{"uid":"75e5-56","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"75e5-44","name":"collection.ts"},{"uid":"75e5-46","name":"dimensions.ts"},{"uid":"75e5-48","name":"theme.ts"},{"uid":"75e5-58","name":"attrs.ts"},{"uid":"75e5-66","name":"styles.ts"}]},{"uid":"75e5-52","name":"context.tsx"},{"name":"constants","children":[{"uid":"75e5-54","name":"reservedKeys.ts"},{"uid":"75e5-70","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"75e5-60","name":"rocketstyleAttrsHoc.tsx"},{"uid":"75e5-62","name":"localContext.tsx"},{"uid":"75e5-64","name":"createProvider.tsx"}]},{"uid":"75e5-68","name":"rocketstyle.tsx"},{"uid":"75e5-72","name":"init.ts"},{"uid":"75e5-74","name":"isRocketComponent.ts"},{"uid":"75e5-76","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"75e5-42":{"renderedLength":1721,"gzipLength":401,"brotliLength":0,"mainUid":"75e5-41"},"75e5-44":{"renderedLength":468,"gzipLength":280,"brotliLength":0,"mainUid":"75e5-43"},"75e5-46":{"renderedLength":1459,"gzipLength":537,"brotliLength":0,"mainUid":"75e5-45"},"75e5-48":{"renderedLength":2595,"gzipLength":838,"brotliLength":0,"mainUid":"75e5-47"},"75e5-50":{"renderedLength":537,"gzipLength":292,"brotliLength":0,"mainUid":"75e5-49"},"75e5-52":{"renderedLength":430,"gzipLength":245,"brotliLength":0,"mainUid":"75e5-51"},"75e5-54":{"renderedLength":566,"gzipLength":296,"brotliLength":0,"mainUid":"75e5-53"},"75e5-56":{"renderedLength":320,"gzipLength":199,"brotliLength":0,"mainUid":"75e5-55"},"75e5-58":{"renderedLength":2563,"gzipLength":870,"brotliLength":0,"mainUid":"75e5-57"},"75e5-60":{"renderedLength":983,"gzipLength":424,"brotliLength":0,"mainUid":"75e5-59"},"75e5-62":{"renderedLength":37,"gzipLength":51,"brotliLength":0,"mainUid":"75e5-61"},"75e5-64":{"renderedLength":780,"gzipLength":365,"brotliLength":0,"mainUid":"75e5-63"},"75e5-66":{"renderedLength":129,"gzipLength":112,"brotliLength":0,"mainUid":"75e5-65"},"75e5-68":{"renderedLength":11343,"gzipLength":2762,"brotliLength":0,"mainUid":"75e5-67"},"75e5-70":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"75e5-69"},"75e5-72":{"renderedLength":1572,"gzipLength":582,"brotliLength":0,"mainUid":"75e5-71"},"75e5-74":{"renderedLength":204,"gzipLength":148,"brotliLength":0,"mainUid":"75e5-73"},"75e5-76":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"75e5-75"}},"nodeMetas":{"75e5-41":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-42"},"imported":[{"uid":"75e5-78"}],"importedBy":[{"uid":"75e5-80"}]},"75e5-43":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-44"},"imported":[],"importedBy":[{"uid":"75e5-67"},{"uid":"75e5-47"}]},"75e5-45":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-46"},"imported":[{"uid":"75e5-77"}],"importedBy":[{"uid":"75e5-71"},{"uid":"75e5-47"},{"uid":"75e5-49"}]},"75e5-47":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-48"},"imported":[{"uid":"75e5-77"},{"uid":"75e5-43"},{"uid":"75e5-45"}],"importedBy":[{"uid":"75e5-67"},{"uid":"75e5-49"}]},"75e5-49":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-50"},"imported":[{"uid":"75e5-77"},{"uid":"75e5-47"},{"uid":"75e5-45"}],"importedBy":[{"uid":"75e5-80"}]},"75e5-51":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-52"},"imported":[{"uid":"75e5-78"},{"uid":"75e5-77"}],"importedBy":[{"uid":"75e5-75"},{"uid":"75e5-55"}]},"75e5-53":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-54"},"imported":[],"importedBy":[{"uid":"75e5-71"},{"uid":"75e5-67"},{"uid":"75e5-55"}]},"75e5-55":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-56"},"imported":[{"uid":"75e5-78"},{"uid":"75e5-51"},{"uid":"75e5-53"}],"importedBy":[{"uid":"75e5-80"}]},"75e5-57":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-58"},"imported":[{"uid":"75e5-77"}],"importedBy":[{"uid":"75e5-67"},{"uid":"75e5-59"}]},"75e5-59":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-60"},"imported":[{"uid":"75e5-78"},{"uid":"75e5-77"},{"uid":"75e5-57"},{"uid":"75e5-80"}],"importedBy":[{"uid":"75e5-81"}]},"75e5-61":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-62"},"imported":[{"uid":"75e5-78"}],"importedBy":[{"uid":"75e5-81"},{"uid":"75e5-63"}]},"75e5-63":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-64"},"imported":[{"uid":"75e5-78"},{"uid":"75e5-80"},{"uid":"75e5-61"}],"importedBy":[{"uid":"75e5-81"}]},"75e5-65":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-66"},"imported":[],"importedBy":[{"uid":"75e5-67"}]},"75e5-67":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-68"},"imported":[{"uid":"75e5-78"},{"uid":"75e5-79"},{"uid":"75e5-77"},{"uid":"75e5-80"},{"uid":"75e5-81"},{"uid":"75e5-47"},{"uid":"75e5-65"},{"uid":"75e5-43"},{"uid":"75e5-57"},{"uid":"75e5-53"}],"importedBy":[{"uid":"75e5-71"}]},"75e5-69":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-70"},"imported":[],"importedBy":[{"uid":"75e5-71"}]},"75e5-71":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-72"},"imported":[{"uid":"75e5-77"},{"uid":"75e5-67"},{"uid":"75e5-45"},{"uid":"75e5-53"},{"uid":"75e5-69"}],"importedBy":[{"uid":"75e5-75"}]},"75e5-73":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-74"},"imported":[],"importedBy":[{"uid":"75e5-75"}]},"75e5-75":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"75e5-76"},"imported":[{"uid":"75e5-71"},{"uid":"75e5-51"},{"uid":"75e5-73"}],"importedBy":[],"isEntry":true},"75e5-77":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"75e5-71"},{"uid":"75e5-51"},{"uid":"75e5-67"},{"uid":"75e5-45"},{"uid":"75e5-47"},{"uid":"75e5-57"},{"uid":"75e5-49"},{"uid":"75e5-59"}],"isExternal":true},"75e5-78":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"75e5-51"},{"uid":"75e5-67"},{"uid":"75e5-41"},{"uid":"75e5-55"},{"uid":"75e5-59"},{"uid":"75e5-63"},{"uid":"75e5-61"}],"isExternal":true},"75e5-79":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"75e5-67"}],"isExternal":true},"75e5-80":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"75e5-41"},{"uid":"75e5-49"},{"uid":"75e5-55"}],"importedBy":[{"uid":"75e5-67"},{"uid":"75e5-59"},{"uid":"75e5-63"}]},"75e5-81":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"75e5-59"},{"uid":"75e5-63"},{"uid":"75e5-61"}],"importedBy":[{"uid":"75e5-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":"75e5-83","name":"usePseudoState.tsx"},{"uid":"75e5-91","name":"useTheme.tsx"},{"uid":"75e5-97","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"75e5-85","name":"collection.ts"},{"uid":"75e5-87","name":"dimensions.ts"},{"uid":"75e5-89","name":"theme.ts"},{"uid":"75e5-99","name":"attrs.ts"},{"uid":"75e5-107","name":"styles.ts"}]},{"uid":"75e5-93","name":"context.tsx"},{"name":"constants","children":[{"uid":"75e5-95","name":"reservedKeys.ts"},{"uid":"75e5-111","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"75e5-101","name":"rocketstyleAttrsHoc.tsx"},{"uid":"75e5-103","name":"localContext.tsx"},{"uid":"75e5-105","name":"createProvider.tsx"}]},{"uid":"75e5-109","name":"rocketstyle.tsx"},{"uid":"75e5-113","name":"init.ts"},{"uid":"75e5-115","name":"isRocketComponent.ts"},{"uid":"75e5-117","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"75e5-83":{"renderedLength":1897,"gzipLength":408,"brotliLength":0,"mainUid":"75e5-82"},"75e5-85":{"renderedLength":492,"gzipLength":283,"brotliLength":0,"mainUid":"75e5-84"},"75e5-87":{"renderedLength":1554,"gzipLength":546,"brotliLength":0,"mainUid":"75e5-86"},"75e5-89":{"renderedLength":2763,"gzipLength":850,"brotliLength":0,"mainUid":"75e5-88"},"75e5-91":{"renderedLength":572,"gzipLength":298,"brotliLength":0,"mainUid":"75e5-90"},"75e5-93":{"renderedLength":476,"gzipLength":262,"brotliLength":0,"mainUid":"75e5-92"},"75e5-95":{"renderedLength":618,"gzipLength":299,"brotliLength":0,"mainUid":"75e5-94"},"75e5-97":{"renderedLength":345,"gzipLength":206,"brotliLength":0,"mainUid":"75e5-96"},"75e5-99":{"renderedLength":2698,"gzipLength":876,"brotliLength":0,"mainUid":"75e5-98"},"75e5-101":{"renderedLength":1081,"gzipLength":448,"brotliLength":0,"mainUid":"75e5-100"},"75e5-103":{"renderedLength":45,"gzipLength":60,"brotliLength":0,"mainUid":"75e5-102"},"75e5-105":{"renderedLength":866,"gzipLength":387,"brotliLength":0,"mainUid":"75e5-104"},"75e5-107":{"renderedLength":139,"gzipLength":114,"brotliLength":0,"mainUid":"75e5-106"},"75e5-109":{"renderedLength":11955,"gzipLength":2812,"brotliLength":0,"mainUid":"75e5-108"},"75e5-111":{"renderedLength":196,"gzipLength":130,"brotliLength":0,"mainUid":"75e5-110"},"75e5-113":{"renderedLength":1656,"gzipLength":587,"brotliLength":0,"mainUid":"75e5-112"},"75e5-115":{"renderedLength":220,"gzipLength":151,"brotliLength":0,"mainUid":"75e5-114"},"75e5-117":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"75e5-116"}},"nodeMetas":{"75e5-82":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-83"},"imported":[{"uid":"75e5-119"}],"importedBy":[{"uid":"75e5-121"}]},"75e5-84":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-85"},"imported":[],"importedBy":[{"uid":"75e5-108"},{"uid":"75e5-88"}]},"75e5-86":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-87"},"imported":[{"uid":"75e5-118"}],"importedBy":[{"uid":"75e5-112"},{"uid":"75e5-88"},{"uid":"75e5-90"}]},"75e5-88":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-89"},"imported":[{"uid":"75e5-118"},{"uid":"75e5-84"},{"uid":"75e5-86"}],"importedBy":[{"uid":"75e5-108"},{"uid":"75e5-90"}]},"75e5-90":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-91"},"imported":[{"uid":"75e5-118"},{"uid":"75e5-88"},{"uid":"75e5-86"}],"importedBy":[{"uid":"75e5-121"}]},"75e5-92":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-93"},"imported":[{"uid":"75e5-119"},{"uid":"75e5-118"}],"importedBy":[{"uid":"75e5-116"},{"uid":"75e5-96"}]},"75e5-94":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-95"},"imported":[],"importedBy":[{"uid":"75e5-112"},{"uid":"75e5-108"},{"uid":"75e5-96"}]},"75e5-96":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-97"},"imported":[{"uid":"75e5-119"},{"uid":"75e5-92"},{"uid":"75e5-94"}],"importedBy":[{"uid":"75e5-121"}]},"75e5-98":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-99"},"imported":[{"uid":"75e5-118"}],"importedBy":[{"uid":"75e5-108"},{"uid":"75e5-100"}]},"75e5-100":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-101"},"imported":[{"uid":"75e5-119"},{"uid":"75e5-118"},{"uid":"75e5-98"},{"uid":"75e5-121"}],"importedBy":[{"uid":"75e5-122"}]},"75e5-102":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-103"},"imported":[{"uid":"75e5-119"}],"importedBy":[{"uid":"75e5-122"},{"uid":"75e5-104"}]},"75e5-104":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-105"},"imported":[{"uid":"75e5-119"},{"uid":"75e5-121"},{"uid":"75e5-102"}],"importedBy":[{"uid":"75e5-122"}]},"75e5-106":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-107"},"imported":[],"importedBy":[{"uid":"75e5-108"}]},"75e5-108":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-109"},"imported":[{"uid":"75e5-119"},{"uid":"75e5-120"},{"uid":"75e5-118"},{"uid":"75e5-121"},{"uid":"75e5-122"},{"uid":"75e5-88"},{"uid":"75e5-106"},{"uid":"75e5-84"},{"uid":"75e5-98"},{"uid":"75e5-94"}],"importedBy":[{"uid":"75e5-112"}]},"75e5-110":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-111"},"imported":[],"importedBy":[{"uid":"75e5-112"}]},"75e5-112":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-113"},"imported":[{"uid":"75e5-118"},{"uid":"75e5-108"},{"uid":"75e5-86"},{"uid":"75e5-94"},{"uid":"75e5-110"}],"importedBy":[{"uid":"75e5-116"}]},"75e5-114":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-115"},"imported":[],"importedBy":[{"uid":"75e5-116"}]},"75e5-116":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"75e5-117"},"imported":[{"uid":"75e5-112"},{"uid":"75e5-92"},{"uid":"75e5-114"}],"importedBy":[],"isEntry":true},"75e5-118":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"75e5-112"},{"uid":"75e5-92"},{"uid":"75e5-108"},{"uid":"75e5-86"},{"uid":"75e5-88"},{"uid":"75e5-98"},{"uid":"75e5-90"},{"uid":"75e5-100"}],"isExternal":true},"75e5-119":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"75e5-92"},{"uid":"75e5-108"},{"uid":"75e5-82"},{"uid":"75e5-96"},{"uid":"75e5-100"},{"uid":"75e5-104"},{"uid":"75e5-102"}],"isExternal":true},"75e5-120":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"75e5-108"}],"isExternal":true},"75e5-121":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"75e5-82"},{"uid":"75e5-90"},{"uid":"75e5-96"}],"importedBy":[{"uid":"75e5-108"},{"uid":"75e5-100"},{"uid":"75e5-104"}]},"75e5-122":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"75e5-100"},{"uid":"75e5-104"},{"uid":"75e5-102"}],"importedBy":[{"uid":"75e5-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":"75e5-124","name":"usePseudoState.tsx"},{"uid":"75e5-132","name":"useTheme.tsx"},{"uid":"75e5-138","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"75e5-126","name":"collection.ts"},{"uid":"75e5-128","name":"dimensions.ts"},{"uid":"75e5-130","name":"theme.ts"},{"uid":"75e5-140","name":"attrs.ts"},{"uid":"75e5-148","name":"styles.ts"}]},{"uid":"75e5-134","name":"context.tsx"},{"name":"constants","children":[{"uid":"75e5-136","name":"reservedKeys.ts"},{"uid":"75e5-152","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"75e5-142","name":"rocketstyleAttrsHoc.tsx"},{"uid":"75e5-144","name":"localContext.tsx"},{"uid":"75e5-146","name":"createProvider.tsx"}]},{"uid":"75e5-150","name":"rocketstyle.tsx"},{"uid":"75e5-154","name":"init.ts"},{"uid":"75e5-156","name":"isRocketComponent.ts"},{"uid":"75e5-158","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"75e5-124":{"renderedLength":1897,"gzipLength":408,"brotliLength":0,"mainUid":"75e5-123"},"75e5-126":{"renderedLength":492,"gzipLength":283,"brotliLength":0,"mainUid":"75e5-125"},"75e5-128":{"renderedLength":1554,"gzipLength":546,"brotliLength":0,"mainUid":"75e5-127"},"75e5-130":{"renderedLength":2763,"gzipLength":850,"brotliLength":0,"mainUid":"75e5-129"},"75e5-132":{"renderedLength":572,"gzipLength":298,"brotliLength":0,"mainUid":"75e5-131"},"75e5-134":{"renderedLength":476,"gzipLength":262,"brotliLength":0,"mainUid":"75e5-133"},"75e5-136":{"renderedLength":592,"gzipLength":288,"brotliLength":0,"mainUid":"75e5-135"},"75e5-138":{"renderedLength":345,"gzipLength":206,"brotliLength":0,"mainUid":"75e5-137"},"75e5-140":{"renderedLength":2698,"gzipLength":876,"brotliLength":0,"mainUid":"75e5-139"},"75e5-142":{"renderedLength":1081,"gzipLength":448,"brotliLength":0,"mainUid":"75e5-141"},"75e5-144":{"renderedLength":45,"gzipLength":60,"brotliLength":0,"mainUid":"75e5-143"},"75e5-146":{"renderedLength":866,"gzipLength":387,"brotliLength":0,"mainUid":"75e5-145"},"75e5-148":{"renderedLength":139,"gzipLength":114,"brotliLength":0,"mainUid":"75e5-147"},"75e5-150":{"renderedLength":11774,"gzipLength":2737,"brotliLength":0,"mainUid":"75e5-149"},"75e5-152":{"renderedLength":196,"gzipLength":130,"brotliLength":0,"mainUid":"75e5-151"},"75e5-154":{"renderedLength":484,"gzipLength":251,"brotliLength":0,"mainUid":"75e5-153"},"75e5-156":{"renderedLength":220,"gzipLength":151,"brotliLength":0,"mainUid":"75e5-155"},"75e5-158":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"75e5-157"}},"nodeMetas":{"75e5-123":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-124"},"imported":[{"uid":"75e5-160"}],"importedBy":[{"uid":"75e5-162"}]},"75e5-125":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-126"},"imported":[],"importedBy":[{"uid":"75e5-149"},{"uid":"75e5-129"}]},"75e5-127":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-128"},"imported":[{"uid":"75e5-159"}],"importedBy":[{"uid":"75e5-153"},{"uid":"75e5-129"},{"uid":"75e5-131"}]},"75e5-129":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-130"},"imported":[{"uid":"75e5-159"},{"uid":"75e5-125"},{"uid":"75e5-127"}],"importedBy":[{"uid":"75e5-149"},{"uid":"75e5-131"}]},"75e5-131":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-132"},"imported":[{"uid":"75e5-159"},{"uid":"75e5-129"},{"uid":"75e5-127"}],"importedBy":[{"uid":"75e5-162"}]},"75e5-133":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-134"},"imported":[{"uid":"75e5-160"},{"uid":"75e5-159"}],"importedBy":[{"uid":"75e5-157"},{"uid":"75e5-137"}]},"75e5-135":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-136"},"imported":[],"importedBy":[{"uid":"75e5-153"},{"uid":"75e5-149"},{"uid":"75e5-137"}]},"75e5-137":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-138"},"imported":[{"uid":"75e5-160"},{"uid":"75e5-133"},{"uid":"75e5-135"}],"importedBy":[{"uid":"75e5-162"}]},"75e5-139":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-140"},"imported":[{"uid":"75e5-159"}],"importedBy":[{"uid":"75e5-149"},{"uid":"75e5-141"}]},"75e5-141":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-142"},"imported":[{"uid":"75e5-160"},{"uid":"75e5-159"},{"uid":"75e5-139"},{"uid":"75e5-162"}],"importedBy":[{"uid":"75e5-163"}]},"75e5-143":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-144"},"imported":[{"uid":"75e5-160"}],"importedBy":[{"uid":"75e5-163"},{"uid":"75e5-145"}]},"75e5-145":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-146"},"imported":[{"uid":"75e5-160"},{"uid":"75e5-162"},{"uid":"75e5-143"}],"importedBy":[{"uid":"75e5-163"}]},"75e5-147":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-148"},"imported":[],"importedBy":[{"uid":"75e5-149"}]},"75e5-149":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-150"},"imported":[{"uid":"75e5-160"},{"uid":"75e5-161"},{"uid":"75e5-159"},{"uid":"75e5-162"},{"uid":"75e5-163"},{"uid":"75e5-129"},{"uid":"75e5-147"},{"uid":"75e5-125"},{"uid":"75e5-139"},{"uid":"75e5-135"}],"importedBy":[{"uid":"75e5-153"}]},"75e5-151":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-152"},"imported":[],"importedBy":[{"uid":"75e5-153"}]},"75e5-153":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-154"},"imported":[{"uid":"75e5-159"},{"uid":"75e5-149"},{"uid":"75e5-127"},{"uid":"75e5-135"},{"uid":"75e5-151"}],"importedBy":[{"uid":"75e5-157"}]},"75e5-155":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-156"},"imported":[],"importedBy":[{"uid":"75e5-157"}]},"75e5-157":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"75e5-158"},"imported":[{"uid":"75e5-153"},{"uid":"75e5-133"},{"uid":"75e5-155"}],"importedBy":[],"isEntry":true},"75e5-159":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"75e5-153"},{"uid":"75e5-133"},{"uid":"75e5-149"},{"uid":"75e5-127"},{"uid":"75e5-129"},{"uid":"75e5-139"},{"uid":"75e5-131"},{"uid":"75e5-141"}],"isExternal":true},"75e5-160":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"75e5-133"},{"uid":"75e5-149"},{"uid":"75e5-123"},{"uid":"75e5-137"},{"uid":"75e5-141"},{"uid":"75e5-145"},{"uid":"75e5-143"}],"isExternal":true},"75e5-161":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"75e5-149"}],"isExternal":true},"75e5-162":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"75e5-123"},{"uid":"75e5-131"},{"uid":"75e5-137"}],"importedBy":[{"uid":"75e5-149"},{"uid":"75e5-141"},{"uid":"75e5-145"}]},"75e5-163":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"75e5-141"},{"uid":"75e5-145"},{"uid":"75e5-143"}],"importedBy":[{"uid":"75e5-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
|
@@ -211,6 +211,37 @@ interface IRocketComponent<A extends TObj = DefaultProps, OA extends TObj = {},
|
|
|
211
211
|
readonly $$rocketstyle: DKP;
|
|
212
212
|
readonly IS_ROCKETSTYLE: true;
|
|
213
213
|
readonly displayName: string;
|
|
214
|
+
}
|
|
215
|
+
interface RocketStyleComponent<D extends Dimensions, UB extends boolean = boolean, T extends TObj | unknown = unknown, CT extends TObj | unknown = unknown, OA extends TObj = {}, A extends TObj = OA & DefaultProps, EA extends TObj = {}, DKP extends TDKP = TDKP> extends ForwardRefExoticComponent<A> {
|
|
216
|
+
config: <NC extends ElementType | unknown = unknown>({ name, component: NC, provider, consumer, DEBUG, inversed, passProps, }: ConfigAttrs<NC, DKP, UB>) => NC extends ElementType ? RocketStyleComponent<D, UB, T, CT, ExtractProps<NC>, MergeTypes<[
|
|
217
|
+
ExtractProps<NC>,
|
|
218
|
+
DefaultProps,
|
|
219
|
+
ExtractDimensionProps<D, DKP, UB>
|
|
220
|
+
]>, DKP> : RocketStyleComponent<D, UB, T, CT, OA, A, EA, DKP>;
|
|
221
|
+
/**
|
|
222
|
+
* @param A Generic _props_ params.
|
|
223
|
+
* @param OA Origin component props params.
|
|
224
|
+
* @param T Theme passed via context.
|
|
225
|
+
* @param CT Custom theme accepted by styles.
|
|
226
|
+
* @param D Dimensions to be used for defining component states.
|
|
227
|
+
* @param UB Use booleans value
|
|
228
|
+
* @param DKP Dimensions key props.
|
|
229
|
+
*/
|
|
230
|
+
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[A, P]>> | AttrsCb<MergeTypes<[A, P]>, T> : Partial<A> | AttrsCb<A, T>) => P extends TObj ? RocketStyleComponent<D, UB, T, CT, OA, MergeTypes<[OA, EA, P, ExtractDimensionProps<D, DKP, UB>]>, MergeTypes<[EA, P]>, DKP> : RocketStyleComponent<D, UB, T, CT, OA, A, EA, DKP>;
|
|
231
|
+
theme: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[CT, P]>> | ThemeCb<MergeTypes<[CT, P]>, T> : Partial<CT> | ThemeCb<CT, T>) => P extends TObj ? RocketStyleComponent<D, UB, T, MergeTypes<[CT, P]>, OA, A, EA, DKP> : RocketStyleComponent<D, UB, T, CT, OA, A, EA, DKP>;
|
|
232
|
+
styles: (param: StylesCb) => RocketStyleComponent<D, UB, T, CT, OA, A, EA, DKP>;
|
|
233
|
+
compose: (param: Record<string, GenericHoc | null | undefined | false>) => RocketStyleComponent<D, UB, T, CT, OA, A, EA, DKP>;
|
|
234
|
+
statics: (param: Record<string, any>) => RocketStyleComponent<D, UB, T, CT, OA, A, EA, DKP>;
|
|
235
|
+
is: Record<string, any>;
|
|
236
|
+
getStaticDimensions: (theme: TObj) => {
|
|
237
|
+
dimensions: TObj;
|
|
238
|
+
useBooleans: boolean;
|
|
239
|
+
multiKeys: TObj;
|
|
240
|
+
};
|
|
241
|
+
getDefaultAttrs: (props: TObj, theme: TObj, mode: ThemeModeKeys) => TObj;
|
|
242
|
+
readonly $$rocketstyle: DKP;
|
|
243
|
+
readonly IS_ROCKETSTYLE: true;
|
|
244
|
+
readonly displayName: string;
|
|
214
245
|
}
|
|
215
246
|
|
|
216
247
|
declare type StyleComponent<C extends ElementType, T extends Record<string, unknown> | unknown = unknown, CT extends OptionStyles | unknown = unknown, D extends Dimensions = DefaultDimensions, UB extends boolean = boolean> = (props: Partial<Configuration<C, D>>) => RocketComponent<MergeTypes<[
|
|
@@ -244,4 +275,4 @@ declare const Provider: FC<TProvider>;
|
|
|
244
275
|
declare type IsRocketComponent = (component: any) => boolean;
|
|
245
276
|
declare const isRocketComponent: IsRocketComponent;
|
|
246
277
|
|
|
247
|
-
export { AttrsCb, ConfigAttrs, ConsumerCb, ConsumerCtxCBValue, ConsumerCtxCb, DefaultProps, DimensionCallbackParam, DimensionProps, DimensionValue, Dimensions, ElementType, ExtractDimensionProps, ExtractProps, GenericHoc, IRocketComponent, MergeTypes, Provider, RocketComponent, RocketComponentType, RocketProviderState, Rocketstyle, StylesCb, TDKP, TObj, TProvider, ThemeCb, ThemeModeKeys, rocketstyle as default, isRocketComponent };
|
|
278
|
+
export { AttrsCb, ConfigAttrs, ConsumerCb, ConsumerCtxCBValue, ConsumerCtxCb, DefaultProps, DimensionCallbackParam, DimensionProps, DimensionValue, Dimensions, ElementType, ExtractDimensionProps, ExtractProps, GenericHoc, IRocketComponent, MergeTypes, Provider, RocketComponent, RocketComponentType, RocketProviderState, RocketStyleComponent, Rocketstyle, StylesCb, TDKP, TObj, TProvider, ThemeCb, ThemeModeKeys, rocketstyle as default, isRocketComponent };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import type { AttrsCb } from "./types/attrs";
|
|
|
9
9
|
import type { ThemeCb, ThemeModeKeys } from "./types/theme";
|
|
10
10
|
import type { GenericHoc } from "./types/hoc";
|
|
11
11
|
import type { DefaultProps } from "./types/configuration";
|
|
12
|
-
import type { RocketComponent, IRocketComponent } from "./types/rocketstyle";
|
|
13
|
-
export type { 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, };
|
|
12
|
+
import type { RocketStyleComponent, RocketComponent, IRocketComponent } from "./types/rocketstyle";
|
|
13
|
+
export type { RocketStyleComponent, 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, };
|
|
14
14
|
export { context, Provider, isRocketComponent };
|
|
15
15
|
export default rocketstyle;
|
|
@@ -54,3 +54,34 @@ export interface IRocketComponent<A extends TObj = DefaultProps, OA extends TObj
|
|
|
54
54
|
readonly IS_ROCKETSTYLE: true;
|
|
55
55
|
readonly displayName: string;
|
|
56
56
|
}
|
|
57
|
+
export interface RocketStyleComponent<D extends Dimensions, UB extends boolean = boolean, T extends TObj | unknown = unknown, CT extends TObj | unknown = unknown, OA extends TObj = {}, A extends TObj = OA & DefaultProps, EA extends TObj = {}, DKP extends TDKP = TDKP> extends ForwardRefExoticComponent<A> {
|
|
58
|
+
config: <NC extends ElementType | unknown = unknown>({ name, component: NC, provider, consumer, DEBUG, inversed, passProps, }: ConfigAttrs<NC, DKP, UB>) => NC extends ElementType ? RocketStyleComponent<D, UB, T, CT, ExtractProps<NC>, MergeTypes<[
|
|
59
|
+
ExtractProps<NC>,
|
|
60
|
+
DefaultProps,
|
|
61
|
+
ExtractDimensionProps<D, DKP, UB>
|
|
62
|
+
]>, DKP> : RocketStyleComponent<D, UB, T, CT, OA, A, EA, DKP>;
|
|
63
|
+
/**
|
|
64
|
+
* @param A Generic _props_ params.
|
|
65
|
+
* @param OA Origin component props params.
|
|
66
|
+
* @param T Theme passed via context.
|
|
67
|
+
* @param CT Custom theme accepted by styles.
|
|
68
|
+
* @param D Dimensions to be used for defining component states.
|
|
69
|
+
* @param UB Use booleans value
|
|
70
|
+
* @param DKP Dimensions key props.
|
|
71
|
+
*/
|
|
72
|
+
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[A, P]>> | AttrsCb<MergeTypes<[A, P]>, T> : Partial<A> | AttrsCb<A, T>) => P extends TObj ? RocketStyleComponent<D, UB, T, CT, OA, MergeTypes<[OA, EA, P, ExtractDimensionProps<D, DKP, UB>]>, MergeTypes<[EA, P]>, DKP> : RocketStyleComponent<D, UB, T, CT, OA, A, EA, DKP>;
|
|
73
|
+
theme: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[CT, P]>> | ThemeCb<MergeTypes<[CT, P]>, T> : Partial<CT> | ThemeCb<CT, T>) => P extends TObj ? RocketStyleComponent<D, UB, T, MergeTypes<[CT, P]>, OA, A, EA, DKP> : RocketStyleComponent<D, UB, T, CT, OA, A, EA, DKP>;
|
|
74
|
+
styles: (param: StylesCb) => RocketStyleComponent<D, UB, T, CT, OA, A, EA, DKP>;
|
|
75
|
+
compose: (param: Record<string, GenericHoc | null | undefined | false>) => RocketStyleComponent<D, UB, T, CT, OA, A, EA, DKP>;
|
|
76
|
+
statics: (param: Record<string, any>) => RocketStyleComponent<D, UB, T, CT, OA, A, EA, DKP>;
|
|
77
|
+
is: Record<string, any>;
|
|
78
|
+
getStaticDimensions: (theme: TObj) => {
|
|
79
|
+
dimensions: TObj;
|
|
80
|
+
useBooleans: boolean;
|
|
81
|
+
multiKeys: TObj;
|
|
82
|
+
};
|
|
83
|
+
getDefaultAttrs: (props: TObj, theme: TObj, mode: ThemeModeKeys) => TObj;
|
|
84
|
+
readonly $$rocketstyle: DKP;
|
|
85
|
+
readonly IS_ROCKETSTYLE: true;
|
|
86
|
+
readonly displayName: string;
|
|
87
|
+
}
|
|
@@ -213,18 +213,11 @@ const useTheme = ({ theme, options, cb }) => {
|
|
|
213
213
|
return __ROCKETSTYLE__;
|
|
214
214
|
};
|
|
215
215
|
|
|
216
|
-
const Provider = ({
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
222
|
-
if (!InnerProvider)
|
|
223
|
-
return React__default["default"].createElement(React__default["default"].Fragment, null, children);
|
|
224
|
-
return (React__default["default"].createElement(InnerProvider, { mode: inversedTheme, isDark: isDark, isLight: !isDark, ...ctx }, children));
|
|
225
|
-
}
|
|
226
|
-
const isDark = mode === 'dark';
|
|
227
|
-
return (React__default["default"].createElement(RocketstyleProvider, { mode: mode, isDark: isDark, isLight: !isDark, theme: theme, provider: RocketstyleProvider }, children));
|
|
216
|
+
const Provider = ({ provider = core.Provider, ...props }) => {
|
|
217
|
+
const ctx = React.useContext(core.context);
|
|
218
|
+
const { theme, mode, inversed, provider: RocketstyleProvider, children, } = { ...props, ...ctx, provider };
|
|
219
|
+
const isDark = inversed ? mode !== 'dark' : mode === 'dark';
|
|
220
|
+
return (React__default["default"].createElement(RocketstyleProvider, { mode: mode, isDark: isDark, isLight: !isDark, theme: theme, provider: provider }, children));
|
|
228
221
|
};
|
|
229
222
|
|
|
230
223
|
const PSEUDO_KEYS = ['hover', 'active', 'focus', 'pressed'];
|