@vitus-labs/rocketstyle 0.25.0-alpha.3 → 0.25.0-alpha.4
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 +11 -9
- package/lib/types/constants/defaultDimensions.d.ts +1 -0
- package/lib/types/init.d.ts +1 -3
- package/lib/types/types/configuration.d.ts +5 -5
- package/lib/types/types/dimensions.d.ts +3 -4
- package/lib/types/types/rocketstyle.d.ts +13 -13
- package/lib/types/types/styles.d.ts +1 -5
- package/lib/types/types/theme.d.ts +2 -1
- package/lib/types/types/utils.d.ts +1 -1
- package/lib/vitus-labs-rocketstyle.js.map +1 -1
- package/lib/vitus-labs-rocketstyle.module.js.map +1 -1
- package/lib/vitus-labs-rocketstyle.umd.js.map +1 -1
- 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":"cddc-1","name":"usePseudoState.tsx"},{"uid":"cddc-9","name":"useTheme.tsx"},{"uid":"cddc-15","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"cddc-3","name":"collection.ts"},{"uid":"cddc-5","name":"dimensions.ts"},{"uid":"cddc-7","name":"theme.ts"},{"uid":"cddc-17","name":"attrs.ts"},{"uid":"cddc-25","name":"styles.ts"}]},{"uid":"cddc-11","name":"context.tsx"},{"name":"constants","children":[{"uid":"cddc-13","name":"reservedKeys.ts"},{"uid":"cddc-29","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"cddc-19","name":"rocketstyleAttrsHoc.tsx"},{"uid":"cddc-21","name":"localContext.tsx"},{"uid":"cddc-23","name":"createProvider.tsx"}]},{"uid":"cddc-27","name":"rocketstyle.tsx"},{"uid":"cddc-31","name":"init.ts"},{"uid":"cddc-33","name":"isRocketComponent.ts"},{"uid":"cddc-35","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"cddc-1":{"renderedLength":1775,"gzipLength":407,"brotliLength":0,"mainUid":"cddc-0"},"cddc-3":{"renderedLength":468,"gzipLength":280,"brotliLength":0,"mainUid":"cddc-2"},"cddc-5":{"renderedLength":1474,"gzipLength":545,"brotliLength":0,"mainUid":"cddc-4"},"cddc-7":{"renderedLength":2625,"gzipLength":845,"brotliLength":0,"mainUid":"cddc-6"},"cddc-9":{"renderedLength":542,"gzipLength":295,"brotliLength":0,"mainUid":"cddc-8"},"cddc-11":{"renderedLength":464,"gzipLength":261,"brotliLength":0,"mainUid":"cddc-10"},"cddc-13":{"renderedLength":566,"gzipLength":296,"brotliLength":0,"mainUid":"cddc-12"},"cddc-15":{"renderedLength":331,"gzipLength":206,"brotliLength":0,"mainUid":"cddc-14"},"cddc-17":{"renderedLength":2568,"gzipLength":873,"brotliLength":0,"mainUid":"cddc-16"},"cddc-19":{"renderedLength":1029,"gzipLength":445,"brotliLength":0,"mainUid":"cddc-18"},"cddc-21":{"renderedLength":43,"gzipLength":58,"brotliLength":0,"mainUid":"cddc-20"},"cddc-23":{"renderedLength":832,"gzipLength":384,"brotliLength":0,"mainUid":"cddc-22"},"cddc-25":{"renderedLength":129,"gzipLength":112,"brotliLength":0,"mainUid":"cddc-24"},"cddc-27":{"renderedLength":11491,"gzipLength":2801,"brotliLength":0,"mainUid":"cddc-26"},"cddc-29":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"cddc-28"},"cddc-31":{"renderedLength":1582,"gzipLength":585,"brotliLength":0,"mainUid":"cddc-30"},"cddc-33":{"renderedLength":204,"gzipLength":148,"brotliLength":0,"mainUid":"cddc-32"},"cddc-35":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"cddc-34"}},"nodeMetas":{"cddc-0":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-1"},"imported":[{"uid":"cddc-37"}],"importedBy":[{"uid":"cddc-39"}]},"cddc-2":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-3"},"imported":[],"importedBy":[{"uid":"cddc-26"},{"uid":"cddc-6"}]},"cddc-4":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-5"},"imported":[{"uid":"cddc-36"}],"importedBy":[{"uid":"cddc-30"},{"uid":"cddc-6"},{"uid":"cddc-8"}]},"cddc-6":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-7"},"imported":[{"uid":"cddc-36"},{"uid":"cddc-2"},{"uid":"cddc-4"}],"importedBy":[{"uid":"cddc-26"},{"uid":"cddc-8"}]},"cddc-8":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-9"},"imported":[{"uid":"cddc-36"},{"uid":"cddc-6"},{"uid":"cddc-4"}],"importedBy":[{"uid":"cddc-39"}]},"cddc-10":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-11"},"imported":[{"uid":"cddc-37"},{"uid":"cddc-36"}],"importedBy":[{"uid":"cddc-34"},{"uid":"cddc-14"}]},"cddc-12":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-13"},"imported":[],"importedBy":[{"uid":"cddc-30"},{"uid":"cddc-26"},{"uid":"cddc-14"}]},"cddc-14":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-15"},"imported":[{"uid":"cddc-37"},{"uid":"cddc-10"},{"uid":"cddc-12"}],"importedBy":[{"uid":"cddc-39"}]},"cddc-16":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-17"},"imported":[{"uid":"cddc-36"}],"importedBy":[{"uid":"cddc-26"},{"uid":"cddc-18"}]},"cddc-18":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-19"},"imported":[{"uid":"cddc-37"},{"uid":"cddc-36"},{"uid":"cddc-16"},{"uid":"cddc-39"}],"importedBy":[{"uid":"cddc-40"}]},"cddc-20":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-21"},"imported":[{"uid":"cddc-37"}],"importedBy":[{"uid":"cddc-40"},{"uid":"cddc-22"}]},"cddc-22":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-23"},"imported":[{"uid":"cddc-37"},{"uid":"cddc-39"},{"uid":"cddc-20"}],"importedBy":[{"uid":"cddc-40"}]},"cddc-24":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-25"},"imported":[],"importedBy":[{"uid":"cddc-26"}]},"cddc-26":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-27"},"imported":[{"uid":"cddc-37"},{"uid":"cddc-38"},{"uid":"cddc-36"},{"uid":"cddc-39"},{"uid":"cddc-40"},{"uid":"cddc-6"},{"uid":"cddc-24"},{"uid":"cddc-2"},{"uid":"cddc-16"},{"uid":"cddc-12"}],"importedBy":[{"uid":"cddc-30"}]},"cddc-28":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-29"},"imported":[],"importedBy":[{"uid":"cddc-30"}]},"cddc-30":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-31"},"imported":[{"uid":"cddc-36"},{"uid":"cddc-26"},{"uid":"cddc-4"},{"uid":"cddc-12"},{"uid":"cddc-28"}],"importedBy":[{"uid":"cddc-34"}]},"cddc-32":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-33"},"imported":[],"importedBy":[{"uid":"cddc-34"}]},"cddc-34":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.js":"cddc-35"},"imported":[{"uid":"cddc-30"},{"uid":"cddc-10"},{"uid":"cddc-32"}],"importedBy":[],"isEntry":true},"cddc-36":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"cddc-30"},{"uid":"cddc-10"},{"uid":"cddc-26"},{"uid":"cddc-4"},{"uid":"cddc-6"},{"uid":"cddc-16"},{"uid":"cddc-8"},{"uid":"cddc-18"}],"isExternal":true},"cddc-37":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"cddc-10"},{"uid":"cddc-26"},{"uid":"cddc-0"},{"uid":"cddc-14"},{"uid":"cddc-18"},{"uid":"cddc-22"},{"uid":"cddc-20"}],"isExternal":true},"cddc-38":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"cddc-26"}],"isExternal":true},"cddc-39":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"cddc-0"},{"uid":"cddc-8"},{"uid":"cddc-14"}],"importedBy":[{"uid":"cddc-26"},{"uid":"cddc-18"},{"uid":"cddc-22"}]},"cddc-40":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"cddc-18"},{"uid":"cddc-22"},{"uid":"cddc-20"}],"importedBy":[{"uid":"cddc-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":"cddc-42","name":"usePseudoState.tsx"},{"uid":"cddc-50","name":"useTheme.tsx"},{"uid":"cddc-56","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"cddc-44","name":"collection.ts"},{"uid":"cddc-46","name":"dimensions.ts"},{"uid":"cddc-48","name":"theme.ts"},{"uid":"cddc-58","name":"attrs.ts"},{"uid":"cddc-66","name":"styles.ts"}]},{"uid":"cddc-52","name":"context.tsx"},{"name":"constants","children":[{"uid":"cddc-54","name":"reservedKeys.ts"},{"uid":"cddc-70","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"cddc-60","name":"rocketstyleAttrsHoc.tsx"},{"uid":"cddc-62","name":"localContext.tsx"},{"uid":"cddc-64","name":"createProvider.tsx"}]},{"uid":"cddc-68","name":"rocketstyle.tsx"},{"uid":"cddc-72","name":"init.ts"},{"uid":"cddc-74","name":"isRocketComponent.ts"},{"uid":"cddc-76","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"cddc-42":{"renderedLength":1721,"gzipLength":401,"brotliLength":0,"mainUid":"cddc-41"},"cddc-44":{"renderedLength":468,"gzipLength":280,"brotliLength":0,"mainUid":"cddc-43"},"cddc-46":{"renderedLength":1459,"gzipLength":537,"brotliLength":0,"mainUid":"cddc-45"},"cddc-48":{"renderedLength":2595,"gzipLength":838,"brotliLength":0,"mainUid":"cddc-47"},"cddc-50":{"renderedLength":537,"gzipLength":292,"brotliLength":0,"mainUid":"cddc-49"},"cddc-52":{"renderedLength":430,"gzipLength":245,"brotliLength":0,"mainUid":"cddc-51"},"cddc-54":{"renderedLength":566,"gzipLength":296,"brotliLength":0,"mainUid":"cddc-53"},"cddc-56":{"renderedLength":320,"gzipLength":199,"brotliLength":0,"mainUid":"cddc-55"},"cddc-58":{"renderedLength":2563,"gzipLength":870,"brotliLength":0,"mainUid":"cddc-57"},"cddc-60":{"renderedLength":983,"gzipLength":424,"brotliLength":0,"mainUid":"cddc-59"},"cddc-62":{"renderedLength":37,"gzipLength":51,"brotliLength":0,"mainUid":"cddc-61"},"cddc-64":{"renderedLength":780,"gzipLength":365,"brotliLength":0,"mainUid":"cddc-63"},"cddc-66":{"renderedLength":129,"gzipLength":112,"brotliLength":0,"mainUid":"cddc-65"},"cddc-68":{"renderedLength":11343,"gzipLength":2762,"brotliLength":0,"mainUid":"cddc-67"},"cddc-70":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"cddc-69"},"cddc-72":{"renderedLength":1572,"gzipLength":582,"brotliLength":0,"mainUid":"cddc-71"},"cddc-74":{"renderedLength":204,"gzipLength":148,"brotliLength":0,"mainUid":"cddc-73"},"cddc-76":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"cddc-75"}},"nodeMetas":{"cddc-41":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-42"},"imported":[{"uid":"cddc-78"}],"importedBy":[{"uid":"cddc-80"}]},"cddc-43":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-44"},"imported":[],"importedBy":[{"uid":"cddc-67"},{"uid":"cddc-47"}]},"cddc-45":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-46"},"imported":[{"uid":"cddc-77"}],"importedBy":[{"uid":"cddc-71"},{"uid":"cddc-47"},{"uid":"cddc-49"}]},"cddc-47":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-48"},"imported":[{"uid":"cddc-77"},{"uid":"cddc-43"},{"uid":"cddc-45"}],"importedBy":[{"uid":"cddc-67"},{"uid":"cddc-49"}]},"cddc-49":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-50"},"imported":[{"uid":"cddc-77"},{"uid":"cddc-47"},{"uid":"cddc-45"}],"importedBy":[{"uid":"cddc-80"}]},"cddc-51":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-52"},"imported":[{"uid":"cddc-78"},{"uid":"cddc-77"}],"importedBy":[{"uid":"cddc-75"},{"uid":"cddc-55"}]},"cddc-53":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-54"},"imported":[],"importedBy":[{"uid":"cddc-71"},{"uid":"cddc-67"},{"uid":"cddc-55"}]},"cddc-55":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-56"},"imported":[{"uid":"cddc-78"},{"uid":"cddc-51"},{"uid":"cddc-53"}],"importedBy":[{"uid":"cddc-80"}]},"cddc-57":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-58"},"imported":[{"uid":"cddc-77"}],"importedBy":[{"uid":"cddc-67"},{"uid":"cddc-59"}]},"cddc-59":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-60"},"imported":[{"uid":"cddc-78"},{"uid":"cddc-77"},{"uid":"cddc-57"},{"uid":"cddc-80"}],"importedBy":[{"uid":"cddc-81"}]},"cddc-61":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-62"},"imported":[{"uid":"cddc-78"}],"importedBy":[{"uid":"cddc-81"},{"uid":"cddc-63"}]},"cddc-63":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-64"},"imported":[{"uid":"cddc-78"},{"uid":"cddc-80"},{"uid":"cddc-61"}],"importedBy":[{"uid":"cddc-81"}]},"cddc-65":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-66"},"imported":[],"importedBy":[{"uid":"cddc-67"}]},"cddc-67":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-68"},"imported":[{"uid":"cddc-78"},{"uid":"cddc-79"},{"uid":"cddc-77"},{"uid":"cddc-80"},{"uid":"cddc-81"},{"uid":"cddc-47"},{"uid":"cddc-65"},{"uid":"cddc-43"},{"uid":"cddc-57"},{"uid":"cddc-53"}],"importedBy":[{"uid":"cddc-71"}]},"cddc-69":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-70"},"imported":[],"importedBy":[{"uid":"cddc-71"}]},"cddc-71":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-72"},"imported":[{"uid":"cddc-77"},{"uid":"cddc-67"},{"uid":"cddc-45"},{"uid":"cddc-53"},{"uid":"cddc-69"}],"importedBy":[{"uid":"cddc-75"}]},"cddc-73":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-74"},"imported":[],"importedBy":[{"uid":"cddc-75"}]},"cddc-75":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"cddc-76"},"imported":[{"uid":"cddc-71"},{"uid":"cddc-51"},{"uid":"cddc-73"}],"importedBy":[],"isEntry":true},"cddc-77":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"cddc-71"},{"uid":"cddc-51"},{"uid":"cddc-67"},{"uid":"cddc-45"},{"uid":"cddc-47"},{"uid":"cddc-57"},{"uid":"cddc-49"},{"uid":"cddc-59"}],"isExternal":true},"cddc-78":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"cddc-51"},{"uid":"cddc-67"},{"uid":"cddc-41"},{"uid":"cddc-55"},{"uid":"cddc-59"},{"uid":"cddc-63"},{"uid":"cddc-61"}],"isExternal":true},"cddc-79":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"cddc-67"}],"isExternal":true},"cddc-80":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"cddc-41"},{"uid":"cddc-49"},{"uid":"cddc-55"}],"importedBy":[{"uid":"cddc-67"},{"uid":"cddc-59"},{"uid":"cddc-63"}]},"cddc-81":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"cddc-59"},{"uid":"cddc-63"},{"uid":"cddc-61"}],"importedBy":[{"uid":"cddc-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":"cddc-83","name":"usePseudoState.tsx"},{"uid":"cddc-91","name":"useTheme.tsx"},{"uid":"cddc-97","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"cddc-85","name":"collection.ts"},{"uid":"cddc-87","name":"dimensions.ts"},{"uid":"cddc-89","name":"theme.ts"},{"uid":"cddc-99","name":"attrs.ts"},{"uid":"cddc-107","name":"styles.ts"}]},{"uid":"cddc-93","name":"context.tsx"},{"name":"constants","children":[{"uid":"cddc-95","name":"reservedKeys.ts"},{"uid":"cddc-111","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"cddc-101","name":"rocketstyleAttrsHoc.tsx"},{"uid":"cddc-103","name":"localContext.tsx"},{"uid":"cddc-105","name":"createProvider.tsx"}]},{"uid":"cddc-109","name":"rocketstyle.tsx"},{"uid":"cddc-113","name":"init.ts"},{"uid":"cddc-115","name":"isRocketComponent.ts"},{"uid":"cddc-117","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"cddc-83":{"renderedLength":1897,"gzipLength":408,"brotliLength":0,"mainUid":"cddc-82"},"cddc-85":{"renderedLength":492,"gzipLength":283,"brotliLength":0,"mainUid":"cddc-84"},"cddc-87":{"renderedLength":1554,"gzipLength":546,"brotliLength":0,"mainUid":"cddc-86"},"cddc-89":{"renderedLength":2763,"gzipLength":850,"brotliLength":0,"mainUid":"cddc-88"},"cddc-91":{"renderedLength":572,"gzipLength":298,"brotliLength":0,"mainUid":"cddc-90"},"cddc-93":{"renderedLength":476,"gzipLength":262,"brotliLength":0,"mainUid":"cddc-92"},"cddc-95":{"renderedLength":618,"gzipLength":299,"brotliLength":0,"mainUid":"cddc-94"},"cddc-97":{"renderedLength":345,"gzipLength":206,"brotliLength":0,"mainUid":"cddc-96"},"cddc-99":{"renderedLength":2698,"gzipLength":876,"brotliLength":0,"mainUid":"cddc-98"},"cddc-101":{"renderedLength":1081,"gzipLength":448,"brotliLength":0,"mainUid":"cddc-100"},"cddc-103":{"renderedLength":45,"gzipLength":60,"brotliLength":0,"mainUid":"cddc-102"},"cddc-105":{"renderedLength":866,"gzipLength":387,"brotliLength":0,"mainUid":"cddc-104"},"cddc-107":{"renderedLength":139,"gzipLength":114,"brotliLength":0,"mainUid":"cddc-106"},"cddc-109":{"renderedLength":11955,"gzipLength":2812,"brotliLength":0,"mainUid":"cddc-108"},"cddc-111":{"renderedLength":196,"gzipLength":130,"brotliLength":0,"mainUid":"cddc-110"},"cddc-113":{"renderedLength":1656,"gzipLength":587,"brotliLength":0,"mainUid":"cddc-112"},"cddc-115":{"renderedLength":220,"gzipLength":151,"brotliLength":0,"mainUid":"cddc-114"},"cddc-117":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"cddc-116"}},"nodeMetas":{"cddc-82":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-83"},"imported":[{"uid":"cddc-119"}],"importedBy":[{"uid":"cddc-121"}]},"cddc-84":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-85"},"imported":[],"importedBy":[{"uid":"cddc-108"},{"uid":"cddc-88"}]},"cddc-86":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-87"},"imported":[{"uid":"cddc-118"}],"importedBy":[{"uid":"cddc-112"},{"uid":"cddc-88"},{"uid":"cddc-90"}]},"cddc-88":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-89"},"imported":[{"uid":"cddc-118"},{"uid":"cddc-84"},{"uid":"cddc-86"}],"importedBy":[{"uid":"cddc-108"},{"uid":"cddc-90"}]},"cddc-90":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-91"},"imported":[{"uid":"cddc-118"},{"uid":"cddc-88"},{"uid":"cddc-86"}],"importedBy":[{"uid":"cddc-121"}]},"cddc-92":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-93"},"imported":[{"uid":"cddc-119"},{"uid":"cddc-118"}],"importedBy":[{"uid":"cddc-116"},{"uid":"cddc-96"}]},"cddc-94":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-95"},"imported":[],"importedBy":[{"uid":"cddc-112"},{"uid":"cddc-108"},{"uid":"cddc-96"}]},"cddc-96":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-97"},"imported":[{"uid":"cddc-119"},{"uid":"cddc-92"},{"uid":"cddc-94"}],"importedBy":[{"uid":"cddc-121"}]},"cddc-98":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-99"},"imported":[{"uid":"cddc-118"}],"importedBy":[{"uid":"cddc-108"},{"uid":"cddc-100"}]},"cddc-100":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-101"},"imported":[{"uid":"cddc-119"},{"uid":"cddc-118"},{"uid":"cddc-98"},{"uid":"cddc-121"}],"importedBy":[{"uid":"cddc-122"}]},"cddc-102":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-103"},"imported":[{"uid":"cddc-119"}],"importedBy":[{"uid":"cddc-122"},{"uid":"cddc-104"}]},"cddc-104":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-105"},"imported":[{"uid":"cddc-119"},{"uid":"cddc-121"},{"uid":"cddc-102"}],"importedBy":[{"uid":"cddc-122"}]},"cddc-106":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-107"},"imported":[],"importedBy":[{"uid":"cddc-108"}]},"cddc-108":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-109"},"imported":[{"uid":"cddc-119"},{"uid":"cddc-120"},{"uid":"cddc-118"},{"uid":"cddc-121"},{"uid":"cddc-122"},{"uid":"cddc-88"},{"uid":"cddc-106"},{"uid":"cddc-84"},{"uid":"cddc-98"},{"uid":"cddc-94"}],"importedBy":[{"uid":"cddc-112"}]},"cddc-110":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-111"},"imported":[],"importedBy":[{"uid":"cddc-112"}]},"cddc-112":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-113"},"imported":[{"uid":"cddc-118"},{"uid":"cddc-108"},{"uid":"cddc-86"},{"uid":"cddc-94"},{"uid":"cddc-110"}],"importedBy":[{"uid":"cddc-116"}]},"cddc-114":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-115"},"imported":[],"importedBy":[{"uid":"cddc-116"}]},"cddc-116":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"cddc-117"},"imported":[{"uid":"cddc-112"},{"uid":"cddc-92"},{"uid":"cddc-114"}],"importedBy":[],"isEntry":true},"cddc-118":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"cddc-112"},{"uid":"cddc-92"},{"uid":"cddc-108"},{"uid":"cddc-86"},{"uid":"cddc-88"},{"uid":"cddc-98"},{"uid":"cddc-90"},{"uid":"cddc-100"}],"isExternal":true},"cddc-119":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"cddc-92"},{"uid":"cddc-108"},{"uid":"cddc-82"},{"uid":"cddc-96"},{"uid":"cddc-100"},{"uid":"cddc-104"},{"uid":"cddc-102"}],"isExternal":true},"cddc-120":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"cddc-108"}],"isExternal":true},"cddc-121":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"cddc-82"},{"uid":"cddc-90"},{"uid":"cddc-96"}],"importedBy":[{"uid":"cddc-108"},{"uid":"cddc-100"},{"uid":"cddc-104"}]},"cddc-122":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"cddc-100"},{"uid":"cddc-104"},{"uid":"cddc-102"}],"importedBy":[{"uid":"cddc-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":"cddc-124","name":"usePseudoState.tsx"},{"uid":"cddc-132","name":"useTheme.tsx"},{"uid":"cddc-138","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"cddc-126","name":"collection.ts"},{"uid":"cddc-128","name":"dimensions.ts"},{"uid":"cddc-130","name":"theme.ts"},{"uid":"cddc-140","name":"attrs.ts"},{"uid":"cddc-148","name":"styles.ts"}]},{"uid":"cddc-134","name":"context.tsx"},{"name":"constants","children":[{"uid":"cddc-136","name":"reservedKeys.ts"},{"uid":"cddc-152","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"cddc-142","name":"rocketstyleAttrsHoc.tsx"},{"uid":"cddc-144","name":"localContext.tsx"},{"uid":"cddc-146","name":"createProvider.tsx"}]},{"uid":"cddc-150","name":"rocketstyle.tsx"},{"uid":"cddc-154","name":"init.ts"},{"uid":"cddc-156","name":"isRocketComponent.ts"},{"uid":"cddc-158","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"cddc-124":{"renderedLength":1897,"gzipLength":408,"brotliLength":0,"mainUid":"cddc-123"},"cddc-126":{"renderedLength":492,"gzipLength":283,"brotliLength":0,"mainUid":"cddc-125"},"cddc-128":{"renderedLength":1554,"gzipLength":546,"brotliLength":0,"mainUid":"cddc-127"},"cddc-130":{"renderedLength":2763,"gzipLength":850,"brotliLength":0,"mainUid":"cddc-129"},"cddc-132":{"renderedLength":572,"gzipLength":298,"brotliLength":0,"mainUid":"cddc-131"},"cddc-134":{"renderedLength":476,"gzipLength":262,"brotliLength":0,"mainUid":"cddc-133"},"cddc-136":{"renderedLength":592,"gzipLength":288,"brotliLength":0,"mainUid":"cddc-135"},"cddc-138":{"renderedLength":345,"gzipLength":206,"brotliLength":0,"mainUid":"cddc-137"},"cddc-140":{"renderedLength":2698,"gzipLength":876,"brotliLength":0,"mainUid":"cddc-139"},"cddc-142":{"renderedLength":1081,"gzipLength":448,"brotliLength":0,"mainUid":"cddc-141"},"cddc-144":{"renderedLength":45,"gzipLength":60,"brotliLength":0,"mainUid":"cddc-143"},"cddc-146":{"renderedLength":866,"gzipLength":387,"brotliLength":0,"mainUid":"cddc-145"},"cddc-148":{"renderedLength":139,"gzipLength":114,"brotliLength":0,"mainUid":"cddc-147"},"cddc-150":{"renderedLength":11774,"gzipLength":2737,"brotliLength":0,"mainUid":"cddc-149"},"cddc-152":{"renderedLength":196,"gzipLength":130,"brotliLength":0,"mainUid":"cddc-151"},"cddc-154":{"renderedLength":484,"gzipLength":251,"brotliLength":0,"mainUid":"cddc-153"},"cddc-156":{"renderedLength":220,"gzipLength":151,"brotliLength":0,"mainUid":"cddc-155"},"cddc-158":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"cddc-157"}},"nodeMetas":{"cddc-123":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-124"},"imported":[{"uid":"cddc-160"}],"importedBy":[{"uid":"cddc-162"}]},"cddc-125":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-126"},"imported":[],"importedBy":[{"uid":"cddc-149"},{"uid":"cddc-129"}]},"cddc-127":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-128"},"imported":[{"uid":"cddc-159"}],"importedBy":[{"uid":"cddc-153"},{"uid":"cddc-129"},{"uid":"cddc-131"}]},"cddc-129":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-130"},"imported":[{"uid":"cddc-159"},{"uid":"cddc-125"},{"uid":"cddc-127"}],"importedBy":[{"uid":"cddc-149"},{"uid":"cddc-131"}]},"cddc-131":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-132"},"imported":[{"uid":"cddc-159"},{"uid":"cddc-129"},{"uid":"cddc-127"}],"importedBy":[{"uid":"cddc-162"}]},"cddc-133":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-134"},"imported":[{"uid":"cddc-160"},{"uid":"cddc-159"}],"importedBy":[{"uid":"cddc-157"},{"uid":"cddc-137"}]},"cddc-135":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-136"},"imported":[],"importedBy":[{"uid":"cddc-153"},{"uid":"cddc-149"},{"uid":"cddc-137"}]},"cddc-137":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-138"},"imported":[{"uid":"cddc-160"},{"uid":"cddc-133"},{"uid":"cddc-135"}],"importedBy":[{"uid":"cddc-162"}]},"cddc-139":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-140"},"imported":[{"uid":"cddc-159"}],"importedBy":[{"uid":"cddc-149"},{"uid":"cddc-141"}]},"cddc-141":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-142"},"imported":[{"uid":"cddc-160"},{"uid":"cddc-159"},{"uid":"cddc-139"},{"uid":"cddc-162"}],"importedBy":[{"uid":"cddc-163"}]},"cddc-143":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-144"},"imported":[{"uid":"cddc-160"}],"importedBy":[{"uid":"cddc-163"},{"uid":"cddc-145"}]},"cddc-145":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-146"},"imported":[{"uid":"cddc-160"},{"uid":"cddc-162"},{"uid":"cddc-143"}],"importedBy":[{"uid":"cddc-163"}]},"cddc-147":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-148"},"imported":[],"importedBy":[{"uid":"cddc-149"}]},"cddc-149":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-150"},"imported":[{"uid":"cddc-160"},{"uid":"cddc-161"},{"uid":"cddc-159"},{"uid":"cddc-162"},{"uid":"cddc-163"},{"uid":"cddc-129"},{"uid":"cddc-147"},{"uid":"cddc-125"},{"uid":"cddc-139"},{"uid":"cddc-135"}],"importedBy":[{"uid":"cddc-153"}]},"cddc-151":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-152"},"imported":[],"importedBy":[{"uid":"cddc-153"}]},"cddc-153":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-154"},"imported":[{"uid":"cddc-159"},{"uid":"cddc-149"},{"uid":"cddc-127"},{"uid":"cddc-135"},{"uid":"cddc-151"}],"importedBy":[{"uid":"cddc-157"}]},"cddc-155":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-156"},"imported":[],"importedBy":[{"uid":"cddc-157"}]},"cddc-157":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"cddc-158"},"imported":[{"uid":"cddc-153"},{"uid":"cddc-133"},{"uid":"cddc-155"}],"importedBy":[],"isEntry":true},"cddc-159":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"cddc-153"},{"uid":"cddc-133"},{"uid":"cddc-149"},{"uid":"cddc-127"},{"uid":"cddc-129"},{"uid":"cddc-139"},{"uid":"cddc-131"},{"uid":"cddc-141"}],"isExternal":true},"cddc-160":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"cddc-133"},{"uid":"cddc-149"},{"uid":"cddc-123"},{"uid":"cddc-137"},{"uid":"cddc-141"},{"uid":"cddc-145"},{"uid":"cddc-143"}],"isExternal":true},"cddc-161":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"cddc-149"}],"isExternal":true},"cddc-162":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"cddc-123"},{"uid":"cddc-131"},{"uid":"cddc-137"}],"importedBy":[{"uid":"cddc-149"},{"uid":"cddc-141"},{"uid":"cddc-145"}]},"cddc-163":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"cddc-141"},{"uid":"cddc-145"},{"uid":"cddc-143"}],"importedBy":[{"uid":"cddc-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
|
@@ -36,7 +36,8 @@ declare const DEFAULT_DIMENSIONS: {
|
|
|
36
36
|
readonly propName: "multiple";
|
|
37
37
|
readonly multi: true;
|
|
38
38
|
};
|
|
39
|
-
};
|
|
39
|
+
};
|
|
40
|
+
declare type DefaultDimensions = typeof DEFAULT_DIMENSIONS;
|
|
40
41
|
|
|
41
42
|
declare const THEME_MODES: {
|
|
42
43
|
readonly light: true;
|
|
@@ -45,6 +46,7 @@ declare const THEME_MODES: {
|
|
|
45
46
|
|
|
46
47
|
interface StylesDefault {
|
|
47
48
|
}
|
|
49
|
+
declare type Styles<S> = S extends unknown ? StylesDefault : StylesDefault & S;
|
|
48
50
|
declare type Css = typeof config.css;
|
|
49
51
|
declare type OptionStyles = Array<(css: Css) => ReturnType<Css>>;
|
|
50
52
|
declare type StylesCb = (css: Css) => ReturnType<Css>;
|
|
@@ -52,11 +54,11 @@ declare type StylesCbArray = Array<StylesCb>;
|
|
|
52
54
|
|
|
53
55
|
interface ThemeDefault {
|
|
54
56
|
}
|
|
57
|
+
declare type Theme$1<T> = T extends unknown ? ThemeDefault : ThemeDefault & T;
|
|
55
58
|
declare type ThemeModeKeys = keyof typeof THEME_MODES;
|
|
56
59
|
declare type ThemeMode = <A, B>(light: A, dark: B) => A | B;
|
|
57
|
-
declare type ThemeCb<
|
|
60
|
+
declare type ThemeCb<CSS, T> = (theme: T, mode: ThemeMode, css: Css) => Partial<CSS>;
|
|
58
61
|
|
|
59
|
-
declare type DefaultDimensions = typeof DEFAULT_DIMENSIONS;
|
|
60
62
|
declare type ExtractNullableDimensionKeys<T> = {
|
|
61
63
|
[P in keyof T as T[P] extends false ? never : P]: T[P];
|
|
62
64
|
};
|
|
@@ -169,8 +171,8 @@ declare type AttrsCb<A, T> = (props: Partial<A>, theme: T, helpers: {
|
|
|
169
171
|
|
|
170
172
|
declare type GenericHoc = (component: ElementType) => ElementType;
|
|
171
173
|
|
|
172
|
-
declare type RocketComponent<A extends TObj = DefaultProps, OA extends TObj = {}, EA extends TObj = {}, T extends TObj | unknown =
|
|
173
|
-
[I in keyof D]: <K extends DimensionValue = D[I], P extends DimensionCallbackParam<T
|
|
174
|
+
declare type RocketComponent<A extends TObj = DefaultProps, OA extends TObj = {}, EA extends TObj = {}, T extends TObj | unknown = unknown, CSS extends TObj | unknown = unknown, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP> = IRocketComponent<A, OA, EA, T, CSS, D, UB, DKP> & {
|
|
175
|
+
[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<MergeTypes<[
|
|
174
176
|
OA,
|
|
175
177
|
EA,
|
|
176
178
|
ExtractDimensionProps<D, DimensionProps<K, D, P, DKP>, UB>
|
|
@@ -185,7 +187,7 @@ declare type RocketComponent<A extends TObj = DefaultProps, OA extends TObj = {}
|
|
|
185
187
|
* @param UB Use booleans value
|
|
186
188
|
* @param DKP Dimensions key props.
|
|
187
189
|
*/
|
|
188
|
-
interface IRocketComponent<A extends TObj = DefaultProps, OA extends TObj = {}, EA extends TObj = {}, T extends TObj | unknown =
|
|
190
|
+
interface IRocketComponent<A extends TObj = DefaultProps, OA extends TObj = {}, EA extends TObj = {}, T extends TObj | unknown = unknown, CSS extends TObj | unknown = unknown, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP> extends ForwardRefExoticComponent<A> {
|
|
189
191
|
config: <NC extends ElementType | unknown = unknown>({ name, component: NC, provider, consumer, DEBUG, inversed, passProps, }: ConfigAttrs<NC, DKP, UB>) => NC extends ElementType ? RocketComponent<MergeTypes<[
|
|
190
192
|
ExtractProps<NC>,
|
|
191
193
|
DefaultProps,
|
|
@@ -200,8 +202,8 @@ interface IRocketComponent<A extends TObj = DefaultProps, OA extends TObj = {},
|
|
|
200
202
|
* @param UB Use booleans value
|
|
201
203
|
* @param DKP Dimensions key props.
|
|
202
204
|
*/
|
|
203
|
-
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[A, P]>> | AttrsCb<MergeTypes<[A, P]>, T
|
|
204
|
-
theme: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[CSS
|
|
205
|
+
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[A, P]>> | AttrsCb<MergeTypes<[A, P]>, Theme$1<T>> : Partial<A> | AttrsCb<A, Theme$1<T>>) => P extends TObj ? RocketComponent<MergeTypes<[OA, EA, P, ExtractDimensionProps<D, DKP, UB>]>, OA, MergeTypes<[EA, P]>, T, CSS, D, UB, DKP> : RocketComponent<A, OA, EA, T, CSS, D, UB, DKP>;
|
|
206
|
+
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<A, OA, EA, T, MergeTypes<[CSS, P]>, D, UB, DKP> : RocketComponent<A, OA, EA, T, CSS, D, UB, DKP>;
|
|
205
207
|
styles: (param: StylesCb) => RocketComponent<A, OA, EA, T, CSS, D, UB, DKP>;
|
|
206
208
|
compose: (param: Record<string, GenericHoc | null | undefined | false>) => RocketComponent<A, OA, EA, T, CSS, D, UB, DKP>;
|
|
207
209
|
statics: (param: Record<string, any>) => RocketComponent<A, OA, EA, T, CSS, D, UB, DKP>;
|
|
@@ -222,7 +224,7 @@ declare type StyleComponent<C extends ElementType, T extends Record<string, unkn
|
|
|
222
224
|
DefaultProps
|
|
223
225
|
]>, ExtractProps<C>, DefaultProps, T, CSS, D, UB, {}>;
|
|
224
226
|
|
|
225
|
-
declare type Rocketstyle = <T =
|
|
227
|
+
declare type Rocketstyle = <T = unknown, CSS = unknown>() => <D extends Dimensions = DefaultDimensions, UB extends boolean = true>({ dimensions, useBooleans, }?: {
|
|
226
228
|
dimensions?: D;
|
|
227
229
|
useBooleans?: UB;
|
|
228
230
|
}) => <C extends ElementType>({ name, component, }: {
|
package/lib/types/init.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { ElementType } from "./types/utils";
|
|
2
2
|
import type { Dimensions, DefaultDimensions } from "./types/dimensions";
|
|
3
3
|
import type { StyleComponent } from "./types/styleComponent";
|
|
4
|
-
|
|
5
|
-
import { StylesDefault } from "./types/styles";
|
|
6
|
-
export declare type Rocketstyle = <T = ThemeDefault, CSS = StylesDefault>() => <D extends Dimensions = DefaultDimensions, UB extends boolean = true>({ dimensions, useBooleans, }?: {
|
|
4
|
+
export declare type Rocketstyle = <T = unknown, CSS = unknown>() => <D extends Dimensions = DefaultDimensions, UB extends boolean = true>({ dimensions, useBooleans, }?: {
|
|
7
5
|
dimensions?: D;
|
|
8
6
|
useBooleans?: UB;
|
|
9
7
|
}) => <C extends ElementType>({ name, component, }: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TFn, ElementType, ArrayOfValues, ArrayOfKeys } from './utils';
|
|
2
|
-
import { Dimensions, MultiKeys, ExtractDimensionKey } from './dimensions';
|
|
3
|
-
import { PseudoProps } from './pseudo';
|
|
4
|
-
import { StylesCbArray } from './styles';
|
|
5
|
-
import { ConsumerCb } from './config';
|
|
1
|
+
import type { TFn, ElementType, ArrayOfValues, ArrayOfKeys } from './utils';
|
|
2
|
+
import type { Dimensions, MultiKeys, ExtractDimensionKey } from './dimensions';
|
|
3
|
+
import type { PseudoProps } from './pseudo';
|
|
4
|
+
import type { StylesCbArray } from './styles';
|
|
5
|
+
import type { ConsumerCb } from './config';
|
|
6
6
|
export declare type __ROCKETSTYLE__ = {
|
|
7
7
|
dimensions: Record<string, string>;
|
|
8
8
|
reservedPropNames: Record<string, true>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CallBackParam, Spread, TObj, NullableKeys, ValueOf, ReturnCbParam } from './utils';
|
|
1
|
+
import { DefaultDimensions } from "../constants/defaultDimensions";
|
|
2
|
+
import type { CallBackParam, Spread, TObj, NullableKeys, ValueOf, ReturnCbParam } from './utils';
|
|
3
3
|
import { ThemeMode } from './theme';
|
|
4
4
|
import { Css } from './styles';
|
|
5
|
-
export
|
|
5
|
+
export type { DefaultDimensions };
|
|
6
6
|
export declare type ExtractNullableDimensionKeys<T> = {
|
|
7
7
|
[P in keyof T as T[P] extends false ? never : P]: T[P];
|
|
8
8
|
};
|
|
@@ -36,4 +36,3 @@ export declare type DimensionObjAttrs<D extends Dimensions, DKP extends TDKP> =
|
|
|
36
36
|
};
|
|
37
37
|
export declare type DimensionBooleanAttrs<DKP extends TDKP> = Partial<Record<ValueOf<DimensionTypesHelper<DKP>>, boolean>>;
|
|
38
38
|
export declare type ExtractDimensionProps<D extends Dimensions, DKP extends TDKP, UB extends boolean> = UB extends true ? Partial<ExtractNullableDimensionKeys<DimensionObjAttrs<D, DKP> & DimensionBooleanAttrs<DKP>>> : Partial<ExtractNullableDimensionKeys<DimensionObjAttrs<D, DKP>>>;
|
|
39
|
-
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent } from 'react';
|
|
2
|
-
import { TObj, ElementType, MergeTypes, ExtractProps } from './utils';
|
|
3
|
-
import { Dimensions, DimensionValue, DimensionCallbackParam, ExtractDimensionProps, TDKP, DimensionProps } from './dimensions';
|
|
4
|
-
import { StylesCb,
|
|
5
|
-
import { ConfigAttrs } from './config';
|
|
6
|
-
import { AttrsCb } from './attrs';
|
|
7
|
-
import { ThemeCb, ThemeModeKeys
|
|
8
|
-
import { GenericHoc } from './hoc';
|
|
9
|
-
import { DefaultProps } from './configuration';
|
|
10
|
-
export declare type RocketComponent<A extends TObj = DefaultProps, OA extends TObj = {}, EA extends TObj = {}, T extends TObj | unknown =
|
|
11
|
-
[I in keyof D]: <K extends DimensionValue = D[I], P extends DimensionCallbackParam<T
|
|
2
|
+
import type { TObj, ElementType, MergeTypes, ExtractProps } from './utils';
|
|
3
|
+
import type { Dimensions, DimensionValue, DimensionCallbackParam, ExtractDimensionProps, TDKP, DimensionProps } from './dimensions';
|
|
4
|
+
import type { StylesCb, Styles } from './styles';
|
|
5
|
+
import type { ConfigAttrs } from './config';
|
|
6
|
+
import type { AttrsCb } from './attrs';
|
|
7
|
+
import type { Theme, ThemeCb, ThemeModeKeys } from './theme';
|
|
8
|
+
import type { GenericHoc } from './hoc';
|
|
9
|
+
import type { DefaultProps } from './configuration';
|
|
10
|
+
export declare type RocketComponent<A extends TObj = DefaultProps, OA extends TObj = {}, EA extends TObj = {}, T extends TObj | unknown = unknown, CSS extends TObj | unknown = unknown, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP> = IRocketComponent<A, 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<MergeTypes<[
|
|
12
12
|
OA,
|
|
13
13
|
EA,
|
|
14
14
|
ExtractDimensionProps<D, DimensionProps<K, D, P, DKP>, UB>
|
|
@@ -23,7 +23,7 @@ export declare type RocketComponent<A extends TObj = DefaultProps, OA extends TO
|
|
|
23
23
|
* @param UB Use booleans value
|
|
24
24
|
* @param DKP Dimensions key props.
|
|
25
25
|
*/
|
|
26
|
-
export interface IRocketComponent<A extends TObj = DefaultProps, OA extends TObj = {}, EA extends TObj = {}, T extends TObj | unknown =
|
|
26
|
+
export interface IRocketComponent<A extends TObj = DefaultProps, OA extends TObj = {}, EA extends TObj = {}, T extends TObj | unknown = unknown, CSS extends TObj | unknown = unknown, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP> extends ForwardRefExoticComponent<A> {
|
|
27
27
|
config: <NC extends ElementType | unknown = unknown>({ name, component: NC, provider, consumer, DEBUG, inversed, passProps, }: ConfigAttrs<NC, DKP, UB>) => NC extends ElementType ? RocketComponent<MergeTypes<[
|
|
28
28
|
ExtractProps<NC>,
|
|
29
29
|
DefaultProps,
|
|
@@ -38,8 +38,8 @@ export interface IRocketComponent<A extends TObj = DefaultProps, OA extends TObj
|
|
|
38
38
|
* @param UB Use booleans value
|
|
39
39
|
* @param DKP Dimensions key props.
|
|
40
40
|
*/
|
|
41
|
-
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[A, P]>> | AttrsCb<MergeTypes<[A, P]>, T
|
|
42
|
-
theme: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[CSS
|
|
41
|
+
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[A, P]>> | AttrsCb<MergeTypes<[A, P]>, Theme<T>> : Partial<A> | AttrsCb<A, Theme<T>>) => P extends TObj ? RocketComponent<MergeTypes<[OA, EA, P, ExtractDimensionProps<D, DKP, UB>]>, OA, MergeTypes<[EA, P]>, T, CSS, D, UB, DKP> : RocketComponent<A, OA, EA, T, CSS, D, UB, DKP>;
|
|
42
|
+
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<A, OA, EA, T, MergeTypes<[CSS, P]>, D, UB, DKP> : RocketComponent<A, OA, EA, T, CSS, D, UB, DKP>;
|
|
43
43
|
styles: (param: StylesCb) => RocketComponent<A, OA, EA, T, CSS, D, UB, DKP>;
|
|
44
44
|
compose: (param: Record<string, GenericHoc | null | undefined | false>) => RocketComponent<A, OA, EA, T, CSS, D, UB, DKP>;
|
|
45
45
|
statics: (param: Record<string, any>) => RocketComponent<A, OA, EA, T, CSS, D, UB, DKP>;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { config } from '@vitus-labs/core';
|
|
2
2
|
export interface StylesDefault {
|
|
3
3
|
}
|
|
4
|
+
export declare type Styles<S> = S extends unknown ? StylesDefault : StylesDefault & S;
|
|
4
5
|
export declare type Css = typeof config.css;
|
|
5
6
|
export declare type Style = ReturnType<Css>;
|
|
6
7
|
export declare type OptionStyles = Array<(css: Css) => ReturnType<Css>>;
|
|
7
8
|
export declare type StylesCb = (css: Css) => ReturnType<Css>;
|
|
8
9
|
export declare type StylesCbArray = Array<StylesCb>;
|
|
9
|
-
export declare type Styles = <T>({ theme, rootSize, css, }: {
|
|
10
|
-
theme: T;
|
|
11
|
-
rootSize: number;
|
|
12
|
-
css: Css;
|
|
13
|
-
}) => typeof css;
|
|
@@ -2,6 +2,7 @@ import { THEME_MODES } from "../constants/reservedKeys";
|
|
|
2
2
|
import type { Css } from './styles';
|
|
3
3
|
export interface ThemeDefault {
|
|
4
4
|
}
|
|
5
|
+
export declare type Theme<T> = T extends unknown ? ThemeDefault : ThemeDefault & T;
|
|
5
6
|
export declare type ThemeModeKeys = keyof typeof THEME_MODES;
|
|
6
7
|
export declare type ThemeMode = <A, B>(light: A, dark: B) => A | B;
|
|
7
|
-
export declare type ThemeCb<
|
|
8
|
+
export declare type ThemeCb<CSS, T> = (theme: T, mode: ThemeMode, css: Css) => Partial<CSS>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType, ForwardRefExoticComponent, VFC } from 'react';
|
|
1
|
+
import type { ComponentType, ForwardRefExoticComponent, VFC } from 'react';
|
|
2
2
|
export declare type TObj = Record<string, unknown>;
|
|
3
3
|
export declare type TFn = (...args: any) => any;
|
|
4
4
|
export declare type CallBackParam = TObj | TFn;
|