@vitus-labs/rocketstyle 0.15.2 → 0.16.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/vitus-labs-rocketstyle.js +10 -12
- package/lib/vitus-labs-rocketstyle.js.map +1 -1
- package/lib/vitus-labs-rocketstyle.umd.js +12 -14
- package/lib/vitus-labs-rocketstyle.umd.js.map +1 -1
- package/package.json +9 -9
|
@@ -7060,7 +7060,7 @@ var drawChart = (function (exports) {
|
|
|
7060
7060
|
</script>
|
|
7061
7061
|
<script>
|
|
7062
7062
|
/*<!--*/
|
|
7063
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"
|
|
7063
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"fc47-1","name":"usePseudoState.tsx"},{"uid":"fc47-9","name":"useTheme.tsx"},{"uid":"fc47-15","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"fc47-3","name":"collection.ts"},{"uid":"fc47-5","name":"dimensions.ts"},{"uid":"fc47-7","name":"theme.ts"},{"uid":"fc47-17","name":"attrs.ts"},{"uid":"fc47-25","name":"styles.ts"}]},{"uid":"fc47-11","name":"context.tsx"},{"name":"constants","children":[{"uid":"fc47-13","name":"reservedKeys.ts"},{"uid":"fc47-29","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"fc47-19","name":"rocketstyleAttrsHoc.tsx"},{"uid":"fc47-21","name":"localContext.tsx"},{"uid":"fc47-23","name":"createProvider.tsx"}]},{"uid":"fc47-27","name":"rocketstyle.tsx"},{"uid":"fc47-31","name":"init.ts"},{"uid":"fc47-33","name":"isRocketComponent.ts"},{"uid":"fc47-35","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"fc47-1":{"renderedLength":1544,"gzipLength":371,"brotliLength":0,"mainUid":"fc47-0"},"fc47-3":{"renderedLength":738,"gzipLength":344,"brotliLength":0,"mainUid":"fc47-2"},"fc47-5":{"renderedLength":1531,"gzipLength":574,"brotliLength":0,"mainUid":"fc47-4"},"fc47-7":{"renderedLength":2476,"gzipLength":787,"brotliLength":0,"mainUid":"fc47-6"},"fc47-9":{"renderedLength":542,"gzipLength":295,"brotliLength":0,"mainUid":"fc47-8"},"fc47-11":{"renderedLength":909,"gzipLength":374,"brotliLength":0,"mainUid":"fc47-10"},"fc47-13":{"renderedLength":566,"gzipLength":296,"brotliLength":0,"mainUid":"fc47-12"},"fc47-15":{"renderedLength":399,"gzipLength":252,"brotliLength":0,"mainUid":"fc47-14"},"fc47-17":{"renderedLength":2625,"gzipLength":895,"brotliLength":0,"mainUid":"fc47-16"},"fc47-19":{"renderedLength":1043,"gzipLength":458,"brotliLength":0,"mainUid":"fc47-18"},"fc47-21":{"renderedLength":43,"gzipLength":58,"brotliLength":0,"mainUid":"fc47-20"},"fc47-23":{"renderedLength":842,"gzipLength":409,"brotliLength":0,"mainUid":"fc47-22"},"fc47-25":{"renderedLength":129,"gzipLength":112,"brotliLength":0,"mainUid":"fc47-24"},"fc47-27":{"renderedLength":10543,"gzipLength":2679,"brotliLength":0,"mainUid":"fc47-26"},"fc47-29":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"fc47-28"},"fc47-31":{"renderedLength":1576,"gzipLength":583,"brotliLength":0,"mainUid":"fc47-30"},"fc47-33":{"renderedLength":204,"gzipLength":148,"brotliLength":0,"mainUid":"fc47-32"},"fc47-35":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"fc47-34"}},"nodeMetas":{"fc47-0":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-1"},"imported":[{"uid":"fc47-37"}],"importedBy":[{"uid":"fc47-39"}]},"fc47-2":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-3"},"imported":[],"importedBy":[{"uid":"fc47-26"},{"uid":"fc47-6"}]},"fc47-4":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-5"},"imported":[{"uid":"fc47-36"}],"importedBy":[{"uid":"fc47-30"},{"uid":"fc47-6"},{"uid":"fc47-8"}]},"fc47-6":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-7"},"imported":[{"uid":"fc47-36"},{"uid":"fc47-2"},{"uid":"fc47-4"}],"importedBy":[{"uid":"fc47-26"},{"uid":"fc47-8"}]},"fc47-8":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-9"},"imported":[{"uid":"fc47-36"},{"uid":"fc47-6"},{"uid":"fc47-4"}],"importedBy":[{"uid":"fc47-39"}]},"fc47-10":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-11"},"imported":[{"uid":"fc47-37"},{"uid":"fc47-36"}],"importedBy":[{"uid":"fc47-34"},{"uid":"fc47-14"}]},"fc47-12":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-13"},"imported":[],"importedBy":[{"uid":"fc47-30"},{"uid":"fc47-26"},{"uid":"fc47-14"}]},"fc47-14":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-15"},"imported":[{"uid":"fc47-37"},{"uid":"fc47-10"},{"uid":"fc47-12"}],"importedBy":[{"uid":"fc47-39"}]},"fc47-16":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-17"},"imported":[{"uid":"fc47-36"}],"importedBy":[{"uid":"fc47-26"},{"uid":"fc47-18"}]},"fc47-18":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-19"},"imported":[{"uid":"fc47-37"},{"uid":"fc47-36"},{"uid":"fc47-16"},{"uid":"fc47-39"}],"importedBy":[{"uid":"fc47-40"}]},"fc47-20":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-21"},"imported":[{"uid":"fc47-37"}],"importedBy":[{"uid":"fc47-40"},{"uid":"fc47-22"}]},"fc47-22":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-23"},"imported":[{"uid":"fc47-37"},{"uid":"fc47-39"},{"uid":"fc47-20"}],"importedBy":[{"uid":"fc47-40"}]},"fc47-24":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-25"},"imported":[],"importedBy":[{"uid":"fc47-26"}]},"fc47-26":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-27"},"imported":[{"uid":"fc47-37"},{"uid":"fc47-38"},{"uid":"fc47-36"},{"uid":"fc47-39"},{"uid":"fc47-40"},{"uid":"fc47-6"},{"uid":"fc47-24"},{"uid":"fc47-2"},{"uid":"fc47-16"},{"uid":"fc47-12"}],"importedBy":[{"uid":"fc47-30"}]},"fc47-28":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-29"},"imported":[],"importedBy":[{"uid":"fc47-30"}]},"fc47-30":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-31"},"imported":[{"uid":"fc47-36"},{"uid":"fc47-26"},{"uid":"fc47-4"},{"uid":"fc47-12"},{"uid":"fc47-28"}],"importedBy":[{"uid":"fc47-34"}]},"fc47-32":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-33"},"imported":[],"importedBy":[{"uid":"fc47-34"}]},"fc47-34":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fc47-35"},"imported":[{"uid":"fc47-30"},{"uid":"fc47-10"},{"uid":"fc47-32"}],"importedBy":[],"isEntry":true},"fc47-36":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"fc47-30"},{"uid":"fc47-10"},{"uid":"fc47-26"},{"uid":"fc47-4"},{"uid":"fc47-6"},{"uid":"fc47-16"},{"uid":"fc47-8"},{"uid":"fc47-18"}],"isExternal":true},"fc47-37":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"fc47-10"},{"uid":"fc47-26"},{"uid":"fc47-0"},{"uid":"fc47-14"},{"uid":"fc47-18"},{"uid":"fc47-22"},{"uid":"fc47-20"}],"isExternal":true},"fc47-38":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"fc47-26"}],"isExternal":true},"fc47-39":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"fc47-0"},{"uid":"fc47-8"},{"uid":"fc47-14"}],"importedBy":[{"uid":"fc47-26"},{"uid":"fc47-18"},{"uid":"fc47-22"}]},"fc47-40":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"fc47-18"},{"uid":"fc47-22"},{"uid":"fc47-20"}],"importedBy":[{"uid":"fc47-26"}]}},"env":{"rollup":"2.60.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
7064
7064
|
|
|
7065
7065
|
const run = () => {
|
|
7066
7066
|
const width = window.innerWidth;
|
|
@@ -7060,7 +7060,7 @@ var drawChart = (function (exports) {
|
|
|
7060
7060
|
</script>
|
|
7061
7061
|
<script>
|
|
7062
7062
|
/*<!--*/
|
|
7063
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.module.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"
|
|
7063
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.module.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"fc47-42","name":"usePseudoState.tsx"},{"uid":"fc47-50","name":"useTheme.tsx"},{"uid":"fc47-56","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"fc47-44","name":"collection.ts"},{"uid":"fc47-46","name":"dimensions.ts"},{"uid":"fc47-48","name":"theme.ts"},{"uid":"fc47-58","name":"attrs.ts"},{"uid":"fc47-66","name":"styles.ts"}]},{"uid":"fc47-52","name":"context.tsx"},{"name":"constants","children":[{"uid":"fc47-54","name":"reservedKeys.ts"},{"uid":"fc47-70","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"fc47-60","name":"rocketstyleAttrsHoc.tsx"},{"uid":"fc47-62","name":"localContext.tsx"},{"uid":"fc47-64","name":"createProvider.tsx"}]},{"uid":"fc47-68","name":"rocketstyle.tsx"},{"uid":"fc47-72","name":"init.ts"},{"uid":"fc47-74","name":"isRocketComponent.ts"},{"uid":"fc47-76","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"fc47-42":{"renderedLength":1526,"gzipLength":365,"brotliLength":0,"mainUid":"fc47-41"},"fc47-44":{"renderedLength":738,"gzipLength":344,"brotliLength":0,"mainUid":"fc47-43"},"fc47-46":{"renderedLength":1516,"gzipLength":566,"brotliLength":0,"mainUid":"fc47-45"},"fc47-48":{"renderedLength":2446,"gzipLength":778,"brotliLength":0,"mainUid":"fc47-47"},"fc47-50":{"renderedLength":537,"gzipLength":292,"brotliLength":0,"mainUid":"fc47-49"},"fc47-52":{"renderedLength":815,"gzipLength":350,"brotliLength":0,"mainUid":"fc47-51"},"fc47-54":{"renderedLength":566,"gzipLength":296,"brotliLength":0,"mainUid":"fc47-53"},"fc47-56":{"renderedLength":388,"gzipLength":242,"brotliLength":0,"mainUid":"fc47-55"},"fc47-58":{"renderedLength":2620,"gzipLength":893,"brotliLength":0,"mainUid":"fc47-57"},"fc47-60":{"renderedLength":997,"gzipLength":436,"brotliLength":0,"mainUid":"fc47-59"},"fc47-62":{"renderedLength":37,"gzipLength":51,"brotliLength":0,"mainUid":"fc47-61"},"fc47-64":{"renderedLength":796,"gzipLength":387,"brotliLength":0,"mainUid":"fc47-63"},"fc47-66":{"renderedLength":129,"gzipLength":112,"brotliLength":0,"mainUid":"fc47-65"},"fc47-68":{"renderedLength":10400,"gzipLength":2642,"brotliLength":0,"mainUid":"fc47-67"},"fc47-70":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"fc47-69"},"fc47-72":{"renderedLength":1566,"gzipLength":580,"brotliLength":0,"mainUid":"fc47-71"},"fc47-74":{"renderedLength":204,"gzipLength":148,"brotliLength":0,"mainUid":"fc47-73"},"fc47-76":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"fc47-75"}},"nodeMetas":{"fc47-41":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-42"},"imported":[{"uid":"fc47-78"}],"importedBy":[{"uid":"fc47-80"}]},"fc47-43":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-44"},"imported":[],"importedBy":[{"uid":"fc47-67"},{"uid":"fc47-47"}]},"fc47-45":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-46"},"imported":[{"uid":"fc47-77"}],"importedBy":[{"uid":"fc47-71"},{"uid":"fc47-47"},{"uid":"fc47-49"}]},"fc47-47":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-48"},"imported":[{"uid":"fc47-77"},{"uid":"fc47-43"},{"uid":"fc47-45"}],"importedBy":[{"uid":"fc47-67"},{"uid":"fc47-49"}]},"fc47-49":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-50"},"imported":[{"uid":"fc47-77"},{"uid":"fc47-47"},{"uid":"fc47-45"}],"importedBy":[{"uid":"fc47-80"}]},"fc47-51":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-52"},"imported":[{"uid":"fc47-78"},{"uid":"fc47-77"}],"importedBy":[{"uid":"fc47-75"},{"uid":"fc47-55"}]},"fc47-53":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-54"},"imported":[],"importedBy":[{"uid":"fc47-71"},{"uid":"fc47-67"},{"uid":"fc47-55"}]},"fc47-55":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-56"},"imported":[{"uid":"fc47-78"},{"uid":"fc47-51"},{"uid":"fc47-53"}],"importedBy":[{"uid":"fc47-80"}]},"fc47-57":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-58"},"imported":[{"uid":"fc47-77"}],"importedBy":[{"uid":"fc47-67"},{"uid":"fc47-59"}]},"fc47-59":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-60"},"imported":[{"uid":"fc47-78"},{"uid":"fc47-77"},{"uid":"fc47-57"},{"uid":"fc47-80"}],"importedBy":[{"uid":"fc47-81"}]},"fc47-61":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-62"},"imported":[{"uid":"fc47-78"}],"importedBy":[{"uid":"fc47-81"},{"uid":"fc47-63"}]},"fc47-63":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-64"},"imported":[{"uid":"fc47-78"},{"uid":"fc47-80"},{"uid":"fc47-61"}],"importedBy":[{"uid":"fc47-81"}]},"fc47-65":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-66"},"imported":[],"importedBy":[{"uid":"fc47-67"}]},"fc47-67":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-68"},"imported":[{"uid":"fc47-78"},{"uid":"fc47-79"},{"uid":"fc47-77"},{"uid":"fc47-80"},{"uid":"fc47-81"},{"uid":"fc47-47"},{"uid":"fc47-65"},{"uid":"fc47-43"},{"uid":"fc47-57"},{"uid":"fc47-53"}],"importedBy":[{"uid":"fc47-71"}]},"fc47-69":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-70"},"imported":[],"importedBy":[{"uid":"fc47-71"}]},"fc47-71":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-72"},"imported":[{"uid":"fc47-77"},{"uid":"fc47-67"},{"uid":"fc47-45"},{"uid":"fc47-53"},{"uid":"fc47-69"}],"importedBy":[{"uid":"fc47-75"}]},"fc47-73":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-74"},"imported":[],"importedBy":[{"uid":"fc47-75"}]},"fc47-75":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fc47-76"},"imported":[{"uid":"fc47-71"},{"uid":"fc47-51"},{"uid":"fc47-73"}],"importedBy":[],"isEntry":true},"fc47-77":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"fc47-71"},{"uid":"fc47-51"},{"uid":"fc47-67"},{"uid":"fc47-45"},{"uid":"fc47-47"},{"uid":"fc47-57"},{"uid":"fc47-49"},{"uid":"fc47-59"}],"isExternal":true},"fc47-78":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"fc47-51"},{"uid":"fc47-67"},{"uid":"fc47-41"},{"uid":"fc47-55"},{"uid":"fc47-59"},{"uid":"fc47-63"},{"uid":"fc47-61"}],"isExternal":true},"fc47-79":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"fc47-67"}],"isExternal":true},"fc47-80":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"fc47-41"},{"uid":"fc47-49"},{"uid":"fc47-55"}],"importedBy":[{"uid":"fc47-67"},{"uid":"fc47-59"},{"uid":"fc47-63"}]},"fc47-81":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"fc47-59"},{"uid":"fc47-63"},{"uid":"fc47-61"}],"importedBy":[{"uid":"fc47-67"}]}},"env":{"rollup":"2.60.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
7064
7064
|
|
|
7065
7065
|
const run = () => {
|
|
7066
7066
|
const width = window.innerWidth;
|
|
@@ -7060,7 +7060,7 @@ var drawChart = (function (exports) {
|
|
|
7060
7060
|
</script>
|
|
7061
7061
|
<script>
|
|
7062
7062
|
/*<!--*/
|
|
7063
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.umd.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"
|
|
7063
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.umd.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"fc47-83","name":"usePseudoState.tsx"},{"uid":"fc47-91","name":"useTheme.tsx"},{"uid":"fc47-97","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"fc47-85","name":"collection.ts"},{"uid":"fc47-87","name":"dimensions.ts"},{"uid":"fc47-89","name":"theme.ts"},{"uid":"fc47-99","name":"attrs.ts"},{"uid":"fc47-107","name":"styles.ts"}]},{"uid":"fc47-93","name":"context.tsx"},{"name":"constants","children":[{"uid":"fc47-95","name":"reservedKeys.ts"},{"uid":"fc47-111","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"fc47-101","name":"rocketstyleAttrsHoc.tsx"},{"uid":"fc47-103","name":"localContext.tsx"},{"uid":"fc47-105","name":"createProvider.tsx"}]},{"uid":"fc47-109","name":"rocketstyle.tsx"},{"uid":"fc47-113","name":"init.ts"},{"uid":"fc47-115","name":"isRocketComponent.ts"},{"uid":"fc47-117","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"fc47-83":{"renderedLength":1666,"gzipLength":376,"brotliLength":0,"mainUid":"fc47-82"},"fc47-85":{"renderedLength":776,"gzipLength":347,"brotliLength":0,"mainUid":"fc47-84"},"fc47-87":{"renderedLength":1613,"gzipLength":577,"brotliLength":0,"mainUid":"fc47-86"},"fc47-89":{"renderedLength":2610,"gzipLength":793,"brotliLength":0,"mainUid":"fc47-88"},"fc47-91":{"renderedLength":572,"gzipLength":298,"brotliLength":0,"mainUid":"fc47-90"},"fc47-93":{"renderedLength":935,"gzipLength":376,"brotliLength":0,"mainUid":"fc47-92"},"fc47-95":{"renderedLength":618,"gzipLength":299,"brotliLength":0,"mainUid":"fc47-94"},"fc47-97":{"renderedLength":415,"gzipLength":251,"brotliLength":0,"mainUid":"fc47-96"},"fc47-99":{"renderedLength":2757,"gzipLength":901,"brotliLength":0,"mainUid":"fc47-98"},"fc47-101":{"renderedLength":1095,"gzipLength":461,"brotliLength":0,"mainUid":"fc47-100"},"fc47-103":{"renderedLength":45,"gzipLength":60,"brotliLength":0,"mainUid":"fc47-102"},"fc47-105":{"renderedLength":878,"gzipLength":412,"brotliLength":0,"mainUid":"fc47-104"},"fc47-107":{"renderedLength":139,"gzipLength":114,"brotliLength":0,"mainUid":"fc47-106"},"fc47-109":{"renderedLength":10965,"gzipLength":2692,"brotliLength":0,"mainUid":"fc47-108"},"fc47-111":{"renderedLength":196,"gzipLength":130,"brotliLength":0,"mainUid":"fc47-110"},"fc47-113":{"renderedLength":1650,"gzipLength":585,"brotliLength":0,"mainUid":"fc47-112"},"fc47-115":{"renderedLength":220,"gzipLength":151,"brotliLength":0,"mainUid":"fc47-114"},"fc47-117":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"fc47-116"}},"nodeMetas":{"fc47-82":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-83"},"imported":[{"uid":"fc47-119"}],"importedBy":[{"uid":"fc47-121"}]},"fc47-84":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-85"},"imported":[],"importedBy":[{"uid":"fc47-108"},{"uid":"fc47-88"}]},"fc47-86":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-87"},"imported":[{"uid":"fc47-118"}],"importedBy":[{"uid":"fc47-112"},{"uid":"fc47-88"},{"uid":"fc47-90"}]},"fc47-88":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-89"},"imported":[{"uid":"fc47-118"},{"uid":"fc47-84"},{"uid":"fc47-86"}],"importedBy":[{"uid":"fc47-108"},{"uid":"fc47-90"}]},"fc47-90":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-91"},"imported":[{"uid":"fc47-118"},{"uid":"fc47-88"},{"uid":"fc47-86"}],"importedBy":[{"uid":"fc47-121"}]},"fc47-92":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-93"},"imported":[{"uid":"fc47-119"},{"uid":"fc47-118"}],"importedBy":[{"uid":"fc47-116"},{"uid":"fc47-96"}]},"fc47-94":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-95"},"imported":[],"importedBy":[{"uid":"fc47-112"},{"uid":"fc47-108"},{"uid":"fc47-96"}]},"fc47-96":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-97"},"imported":[{"uid":"fc47-119"},{"uid":"fc47-92"},{"uid":"fc47-94"}],"importedBy":[{"uid":"fc47-121"}]},"fc47-98":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-99"},"imported":[{"uid":"fc47-118"}],"importedBy":[{"uid":"fc47-108"},{"uid":"fc47-100"}]},"fc47-100":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-101"},"imported":[{"uid":"fc47-119"},{"uid":"fc47-118"},{"uid":"fc47-98"},{"uid":"fc47-121"}],"importedBy":[{"uid":"fc47-122"}]},"fc47-102":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-103"},"imported":[{"uid":"fc47-119"}],"importedBy":[{"uid":"fc47-122"},{"uid":"fc47-104"}]},"fc47-104":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-105"},"imported":[{"uid":"fc47-119"},{"uid":"fc47-121"},{"uid":"fc47-102"}],"importedBy":[{"uid":"fc47-122"}]},"fc47-106":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-107"},"imported":[],"importedBy":[{"uid":"fc47-108"}]},"fc47-108":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-109"},"imported":[{"uid":"fc47-119"},{"uid":"fc47-120"},{"uid":"fc47-118"},{"uid":"fc47-121"},{"uid":"fc47-122"},{"uid":"fc47-88"},{"uid":"fc47-106"},{"uid":"fc47-84"},{"uid":"fc47-98"},{"uid":"fc47-94"}],"importedBy":[{"uid":"fc47-112"}]},"fc47-110":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-111"},"imported":[],"importedBy":[{"uid":"fc47-112"}]},"fc47-112":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-113"},"imported":[{"uid":"fc47-118"},{"uid":"fc47-108"},{"uid":"fc47-86"},{"uid":"fc47-94"},{"uid":"fc47-110"}],"importedBy":[{"uid":"fc47-116"}]},"fc47-114":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-115"},"imported":[],"importedBy":[{"uid":"fc47-116"}]},"fc47-116":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.umd.js":"fc47-117"},"imported":[{"uid":"fc47-112"},{"uid":"fc47-92"},{"uid":"fc47-114"}],"importedBy":[],"isEntry":true},"fc47-118":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"fc47-112"},{"uid":"fc47-92"},{"uid":"fc47-108"},{"uid":"fc47-86"},{"uid":"fc47-88"},{"uid":"fc47-98"},{"uid":"fc47-90"},{"uid":"fc47-100"}],"isExternal":true},"fc47-119":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"fc47-92"},{"uid":"fc47-108"},{"uid":"fc47-82"},{"uid":"fc47-96"},{"uid":"fc47-100"},{"uid":"fc47-104"},{"uid":"fc47-102"}],"isExternal":true},"fc47-120":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"fc47-108"}],"isExternal":true},"fc47-121":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"fc47-82"},{"uid":"fc47-90"},{"uid":"fc47-96"}],"importedBy":[{"uid":"fc47-108"},{"uid":"fc47-100"},{"uid":"fc47-104"}]},"fc47-122":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"fc47-100"},{"uid":"fc47-104"},{"uid":"fc47-102"}],"importedBy":[{"uid":"fc47-108"}]}},"env":{"rollup":"2.60.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
7064
7064
|
|
|
7065
7065
|
const run = () => {
|
|
7066
7066
|
const width = window.innerWidth;
|
|
@@ -7060,7 +7060,7 @@ var drawChart = (function (exports) {
|
|
|
7060
7060
|
</script>
|
|
7061
7061
|
<script>
|
|
7062
7062
|
/*<!--*/
|
|
7063
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.umd.min.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"
|
|
7063
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.umd.min.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"fc47-124","name":"usePseudoState.tsx"},{"uid":"fc47-132","name":"useTheme.tsx"},{"uid":"fc47-138","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"fc47-126","name":"collection.ts"},{"uid":"fc47-128","name":"dimensions.ts"},{"uid":"fc47-130","name":"theme.ts"},{"uid":"fc47-140","name":"attrs.ts"},{"uid":"fc47-148","name":"styles.ts"}]},{"uid":"fc47-134","name":"context.tsx"},{"name":"constants","children":[{"uid":"fc47-136","name":"reservedKeys.ts"},{"uid":"fc47-152","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"fc47-142","name":"rocketstyleAttrsHoc.tsx"},{"uid":"fc47-144","name":"localContext.tsx"},{"uid":"fc47-146","name":"createProvider.tsx"}]},{"uid":"fc47-150","name":"rocketstyle.tsx"},{"uid":"fc47-154","name":"init.ts"},{"uid":"fc47-156","name":"isRocketComponent.ts"},{"uid":"fc47-158","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"fc47-124":{"renderedLength":1666,"gzipLength":376,"brotliLength":0,"mainUid":"fc47-123"},"fc47-126":{"renderedLength":776,"gzipLength":347,"brotliLength":0,"mainUid":"fc47-125"},"fc47-128":{"renderedLength":1613,"gzipLength":577,"brotliLength":0,"mainUid":"fc47-127"},"fc47-130":{"renderedLength":2610,"gzipLength":793,"brotliLength":0,"mainUid":"fc47-129"},"fc47-132":{"renderedLength":572,"gzipLength":298,"brotliLength":0,"mainUid":"fc47-131"},"fc47-134":{"renderedLength":935,"gzipLength":376,"brotliLength":0,"mainUid":"fc47-133"},"fc47-136":{"renderedLength":592,"gzipLength":288,"brotliLength":0,"mainUid":"fc47-135"},"fc47-138":{"renderedLength":415,"gzipLength":251,"brotliLength":0,"mainUid":"fc47-137"},"fc47-140":{"renderedLength":2757,"gzipLength":901,"brotliLength":0,"mainUid":"fc47-139"},"fc47-142":{"renderedLength":1095,"gzipLength":461,"brotliLength":0,"mainUid":"fc47-141"},"fc47-144":{"renderedLength":45,"gzipLength":60,"brotliLength":0,"mainUid":"fc47-143"},"fc47-146":{"renderedLength":878,"gzipLength":412,"brotliLength":0,"mainUid":"fc47-145"},"fc47-148":{"renderedLength":139,"gzipLength":114,"brotliLength":0,"mainUid":"fc47-147"},"fc47-150":{"renderedLength":10784,"gzipLength":2617,"brotliLength":0,"mainUid":"fc47-149"},"fc47-152":{"renderedLength":196,"gzipLength":130,"brotliLength":0,"mainUid":"fc47-151"},"fc47-154":{"renderedLength":478,"gzipLength":247,"brotliLength":0,"mainUid":"fc47-153"},"fc47-156":{"renderedLength":220,"gzipLength":151,"brotliLength":0,"mainUid":"fc47-155"},"fc47-158":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"fc47-157"}},"nodeMetas":{"fc47-123":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-124"},"imported":[{"uid":"fc47-160"}],"importedBy":[{"uid":"fc47-162"}]},"fc47-125":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-126"},"imported":[],"importedBy":[{"uid":"fc47-149"},{"uid":"fc47-129"}]},"fc47-127":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-128"},"imported":[{"uid":"fc47-159"}],"importedBy":[{"uid":"fc47-153"},{"uid":"fc47-129"},{"uid":"fc47-131"}]},"fc47-129":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-130"},"imported":[{"uid":"fc47-159"},{"uid":"fc47-125"},{"uid":"fc47-127"}],"importedBy":[{"uid":"fc47-149"},{"uid":"fc47-131"}]},"fc47-131":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-132"},"imported":[{"uid":"fc47-159"},{"uid":"fc47-129"},{"uid":"fc47-127"}],"importedBy":[{"uid":"fc47-162"}]},"fc47-133":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-134"},"imported":[{"uid":"fc47-160"},{"uid":"fc47-159"}],"importedBy":[{"uid":"fc47-157"},{"uid":"fc47-137"}]},"fc47-135":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-136"},"imported":[],"importedBy":[{"uid":"fc47-153"},{"uid":"fc47-149"},{"uid":"fc47-137"}]},"fc47-137":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-138"},"imported":[{"uid":"fc47-160"},{"uid":"fc47-133"},{"uid":"fc47-135"}],"importedBy":[{"uid":"fc47-162"}]},"fc47-139":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-140"},"imported":[{"uid":"fc47-159"}],"importedBy":[{"uid":"fc47-149"},{"uid":"fc47-141"}]},"fc47-141":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-142"},"imported":[{"uid":"fc47-160"},{"uid":"fc47-159"},{"uid":"fc47-139"},{"uid":"fc47-162"}],"importedBy":[{"uid":"fc47-163"}]},"fc47-143":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-144"},"imported":[{"uid":"fc47-160"}],"importedBy":[{"uid":"fc47-163"},{"uid":"fc47-145"}]},"fc47-145":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-146"},"imported":[{"uid":"fc47-160"},{"uid":"fc47-162"},{"uid":"fc47-143"}],"importedBy":[{"uid":"fc47-163"}]},"fc47-147":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-148"},"imported":[],"importedBy":[{"uid":"fc47-149"}]},"fc47-149":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-150"},"imported":[{"uid":"fc47-160"},{"uid":"fc47-161"},{"uid":"fc47-159"},{"uid":"fc47-162"},{"uid":"fc47-163"},{"uid":"fc47-129"},{"uid":"fc47-147"},{"uid":"fc47-125"},{"uid":"fc47-139"},{"uid":"fc47-135"}],"importedBy":[{"uid":"fc47-153"}]},"fc47-151":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-152"},"imported":[],"importedBy":[{"uid":"fc47-153"}]},"fc47-153":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-154"},"imported":[{"uid":"fc47-159"},{"uid":"fc47-149"},{"uid":"fc47-127"},{"uid":"fc47-135"},{"uid":"fc47-151"}],"importedBy":[{"uid":"fc47-157"}]},"fc47-155":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-156"},"imported":[],"importedBy":[{"uid":"fc47-157"}]},"fc47-157":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.umd.min.js":"fc47-158"},"imported":[{"uid":"fc47-153"},{"uid":"fc47-133"},{"uid":"fc47-155"}],"importedBy":[],"isEntry":true},"fc47-159":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"fc47-153"},{"uid":"fc47-133"},{"uid":"fc47-149"},{"uid":"fc47-127"},{"uid":"fc47-129"},{"uid":"fc47-139"},{"uid":"fc47-131"},{"uid":"fc47-141"}],"isExternal":true},"fc47-160":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"fc47-133"},{"uid":"fc47-149"},{"uid":"fc47-123"},{"uid":"fc47-137"},{"uid":"fc47-141"},{"uid":"fc47-145"},{"uid":"fc47-143"}],"isExternal":true},"fc47-161":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"fc47-149"}],"isExternal":true},"fc47-162":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"fc47-123"},{"uid":"fc47-131"},{"uid":"fc47-137"}],"importedBy":[{"uid":"fc47-149"},{"uid":"fc47-141"},{"uid":"fc47-145"}]},"fc47-163":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"fc47-141"},{"uid":"fc47-145"},{"uid":"fc47-143"}],"importedBy":[{"uid":"fc47-149"}]}},"env":{"rollup":"2.60.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
7064
7064
|
|
|
7065
7065
|
const run = () => {
|
|
7066
7066
|
const width = window.innerWidth;
|
|
@@ -226,11 +226,11 @@ const Provider = ({ theme, mode, children, inversed, provider: RocketstyleProvid
|
|
|
226
226
|
const isDark = ctxMode === 'dark';
|
|
227
227
|
const inversedTheme = isDark ? 'light' : 'dark';
|
|
228
228
|
if (!InnerProvider)
|
|
229
|
-
return React__default[
|
|
230
|
-
return (React__default[
|
|
229
|
+
return React__default["default"].createElement(React__default["default"].Fragment, null, children);
|
|
230
|
+
return (React__default["default"].createElement(InnerProvider, { mode: inversedTheme, isDark: isDark, isLight: !isDark, ...ctx }, children));
|
|
231
231
|
}
|
|
232
232
|
const isDark = mode === 'dark';
|
|
233
|
-
return (React__default[
|
|
233
|
+
return (React__default["default"].createElement(RocketstyleProvider, { mode: mode, isDark: isDark, isLight: !isDark, theme: theme, provider: RocketstyleProvider }, children));
|
|
234
234
|
};
|
|
235
235
|
|
|
236
236
|
const PSEUDO_KEYS = ['hover', 'active', 'focus', 'pressed'];
|
|
@@ -358,7 +358,7 @@ const rocketStyleHOC = ({ inversed, attrs }) => {
|
|
|
358
358
|
isLight,
|
|
359
359
|
},
|
|
360
360
|
]);
|
|
361
|
-
return (React__default[
|
|
361
|
+
return (React__default["default"].createElement(WrappedComponent, { "$rocketstyleRef": ref, ...calculatedAttrs, ...props }));
|
|
362
362
|
});
|
|
363
363
|
return Enhanced;
|
|
364
364
|
};
|
|
@@ -380,8 +380,8 @@ const RocketStyleProviderComponent = (WrappedComponent) => React.forwardRef(({ o
|
|
|
380
380
|
...$rocketstate,
|
|
381
381
|
pseudo: { ...$rocketstate.pseudo, ...pseudo.state },
|
|
382
382
|
};
|
|
383
|
-
return (React__default[
|
|
384
|
-
React__default[
|
|
383
|
+
return (React__default["default"].createElement(localContext.Provider, { value: updatedState },
|
|
384
|
+
React__default["default"].createElement(WrappedComponent, { ...props, ...pseudo.events, ref: ref, "$rocketstate": updatedState })));
|
|
385
385
|
});
|
|
386
386
|
|
|
387
387
|
const calculateStyles = (styles, css) => {
|
|
@@ -556,7 +556,7 @@ const styleComponent = (options) => {
|
|
|
556
556
|
if (process.env.NODE_ENV !== 'production') {
|
|
557
557
|
finalProps['data-rocketstyle'] = componentName;
|
|
558
558
|
}
|
|
559
|
-
return React__default[
|
|
559
|
+
return React__default["default"].createElement(RenderComponent, { ...finalProps });
|
|
560
560
|
});
|
|
561
561
|
// ------------------------------------------------------
|
|
562
562
|
// This will hoist and generate dynamically next static methods
|
|
@@ -565,7 +565,7 @@ const styleComponent = (options) => {
|
|
|
565
565
|
const RocketComponent = core.compose(...hocsFuncs)(EnhancedComponent);
|
|
566
566
|
RocketComponent.IS_ROCKETSTYLE = true;
|
|
567
567
|
RocketComponent.displayName = componentName;
|
|
568
|
-
hoistNonReactStatics__default[
|
|
568
|
+
hoistNonReactStatics__default["default"](RocketComponent, options.component);
|
|
569
569
|
createStaticsEnhancers({
|
|
570
570
|
context: RocketComponent,
|
|
571
571
|
dimensionKeys: [...options.dimensionKeys, ...STATIC_KEYS],
|
|
@@ -664,11 +664,9 @@ const isRocketComponent = (component) => {
|
|
|
664
664
|
|
|
665
665
|
Object.defineProperty(exports, 'context', {
|
|
666
666
|
enumerable: true,
|
|
667
|
-
get: function () {
|
|
668
|
-
return core.context;
|
|
669
|
-
}
|
|
667
|
+
get: function () { return core.context; }
|
|
670
668
|
});
|
|
671
669
|
exports.Provider = Provider;
|
|
672
|
-
exports[
|
|
670
|
+
exports["default"] = rocketstyle;
|
|
673
671
|
exports.isRocketComponent = isRocketComponent;
|
|
674
672
|
//# sourceMappingURL=vitus-labs-rocketstyle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitus-labs-rocketstyle.js","sources":["../src/hooks/usePseudoState.tsx","../src/utils/collection.ts","../src/utils/dimensions.ts","../src/utils/theme.ts","../src/hooks/useTheme.tsx","../src/context.tsx","../src/constants/reservedKeys.ts","../src/hooks/useThemeOptions.tsx","../src/utils/attrs.ts","../src/internal/rocketstyleAttrsHoc.tsx","../src/internal/localContext.tsx","../src/internal/createProvider.tsx","../src/utils/styles.ts","../src/rocketstyle.tsx","../src/constants/defaultDimensions.ts","../src/init.ts","../src/isRocketComponent.ts"],"sourcesContent":["import { useState } from 'react'\nimport type { PseudoActions, PseudoState } from '~/types/pseudo'\n\ntype State = Omit<PseudoState, 'active'>\n\ntype UsePseudoState = ({\n onMouseEnter,\n onMouseLeave,\n onMouseDown,\n onMouseUp,\n onFocus,\n onBlur,\n}: Partial<PseudoActions>) => { state: State; events: PseudoActions }\n\nconst handleEvent = (e: Event) => {\n e.preventDefault()\n e.stopPropagation()\n}\n\nconst usePseudoState: UsePseudoState = (props) => {\n const [hover, setHover] = useState(false)\n const [focus, setFocus] = useState(false)\n const [pressed, setPressed] = useState(false)\n\n const onMouseEnter = (e: MouseEvent) => {\n handleEvent(e)\n setHover(true)\n if (props.onMouseEnter) props.onMouseEnter(e)\n }\n\n const onMouseLeave = (e: MouseEvent) => {\n handleEvent(e)\n setHover(false)\n setPressed(false)\n if (props.onMouseLeave) props.onMouseLeave(e)\n }\n\n const onMouseDown = (e: MouseEvent) => {\n handleEvent(e)\n setPressed(true)\n if (props.onMouseDown) props.onMouseDown(e)\n }\n\n const onMouseUp = (e: MouseEvent) => {\n handleEvent(e)\n setPressed(false)\n if (props.onMouseUp) props.onMouseUp(e)\n }\n\n const onFocus = (e: FocusEvent) => {\n handleEvent(e)\n setFocus(true)\n if (props.onFocus) props.onFocus(e)\n }\n\n const onBlur = (e: FocusEvent) => {\n handleEvent(e)\n setFocus(false)\n if (props.onBlur) props.onBlur(e)\n }\n\n return {\n state: {\n hover,\n focus,\n pressed,\n },\n events: {\n onMouseEnter,\n onMouseLeave,\n onMouseDown,\n onMouseUp,\n onFocus,\n onBlur,\n },\n }\n}\n\nexport default usePseudoState\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable import/prefer-default-export */\n\n// --------------------------------------------------------\n// chain options\n// --------------------------------------------------------\ntype ChanOptions = (\n opts: Record<string, unknown> | ((...args: any) => Record<string, unknown>),\n defaultOpts: any[]\n) => any[]\n\nexport const chainOptions: ChanOptions = (opts, defaultOpts = []) => {\n const result = [...defaultOpts]\n\n if (typeof opts === 'function') result.push(opts)\n else if (typeof opts === 'object') result.push(() => opts)\n\n return result\n}\n\n// --------------------------------------------------------\n// remove empty values\n// --------------------------------------------------------\ntype RemoveNullableValues = (obj: Record<string, any>) => Record<string, any>\nexport const removeNullableValues: RemoveNullableValues = (obj) =>\n Object.entries(obj)\n .filter(([, v]) => v != null && v !== false)\n .reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {})\n\n// --------------------------------------------------------\n// remove empty values recursively\n// --------------------------------------------------------\ntype RemoveAllEmptyValues = (obj: Record<string, any>) => Record<string, any>\nexport const removeAllEmptyValues: RemoveAllEmptyValues = (obj) =>\n Object.entries(obj)\n .filter(([, v]) => v != null)\n .reduce(\n (acc, [k, v]) => ({\n ...acc,\n [k]: typeof v === 'object' ? removeAllEmptyValues(v) : v,\n }),\n {}\n )\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { get, isEmpty, set } from '@vitus-labs/core'\nimport { Dimensions, DimensionValue, MultiKeys } from '~/types/dimensions'\n\n// --------------------------------------------------------\n// is value milti key\n// --------------------------------------------------------\ntype IsValidKey = (value: any) => boolean\nexport const isValidKey: IsValidKey = (value) =>\n value !== undefined && value !== null && value !== false\n\n// --------------------------------------------------------\n// is value milti key\n// --------------------------------------------------------\ntype IsMultiKey = (value: any) => [boolean, string]\nexport const isMultiKey: IsMultiKey = (value) => {\n if (typeof value === 'object') return [true, get(value, 'propName')]\n return [false, value]\n}\n\n// --------------------------------------------------------\n// calculate dimensions map\n// --------------------------------------------------------\ntype CalculateDimensionsMap = ({\n themes,\n useBooleans,\n}: {\n themes: Record<string, any>\n useBooleans: boolean\n}) => { keysMap: Record<string, any>; keywords: Record<string, any> }\n\nexport const calculateDimensionsMap: CalculateDimensionsMap = ({\n themes,\n useBooleans,\n}) => {\n const result = { keysMap: {}, keywords: {} }\n if (isEmpty(themes)) return result\n\n return Object.entries(themes).reduce((accumulator, [key, value]) => {\n const { keysMap, keywords } = accumulator\n keywords[key] = true\n\n Object.entries(value as any).forEach(([itemKey, itemValue]) => {\n if (!isValidKey(itemValue)) return\n\n if (useBooleans) {\n keywords[itemKey] = true\n }\n\n set(keysMap, [key, itemKey], true)\n })\n\n return accumulator\n }, result)\n}\n\n// --------------------------------------------------------\n// simple object getters\n// --------------------------------------------------------\ntype GetKeys = <T extends Record<string, unknown>>(obj: T) => Array<keyof T>\nexport const getKeys: GetKeys = (obj) => Object.keys(obj)\n\ntype GetValues = <T extends Record<string, unknown>, K extends keyof T>(\n obj: T\n) => T[K][]\nexport const getValues: GetValues = (obj) => Object.values(obj) as any\n\n// --------------------------------------------------------\n// get dimensions values array\n// --------------------------------------------------------\ntype ValueType<T> = T extends string ? T : Array<T>[0]\ntype GetDimensionsValues = <T extends Dimensions, K extends keyof T>(\n obj: T\n) => ValueType<T[K]>[]\n\nexport const getDimensionsValues: GetDimensionsValues = (obj) =>\n getValues(obj).map((item: DimensionValue) => {\n if (typeof item === 'object') {\n return item.propName as any\n }\n\n return item\n })\n\n// --------------------------------------------------------\n// get multiple dimensions map\n// --------------------------------------------------------\ntype GetMultipleDimensions = <T extends Dimensions>(obj: T) => MultiKeys<T>\n\nexport const getMultipleDimensions: GetMultipleDimensions = (obj) =>\n getValues(obj).reduce((accumulator, value: DimensionValue) => {\n if (typeof value === 'object') {\n // eslint-disable-next-line no-param-reassign\n if (value.multi === true) accumulator[value.propName] = true\n }\n\n return accumulator\n }, {})\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { config, isEmpty, merge } from '@vitus-labs/core'\nimport { removeAllEmptyValues, removeNullableValues } from './collection'\nimport { isMultiKey } from './dimensions'\nimport { ThemeMode } from '~/types/theme'\n\n// --------------------------------------------------------\n// theme mode callback\n// --------------------------------------------------------\nexport const themeModeCb: ThemeMode =\n (...params) =>\n (mode) => {\n if (!mode || mode === 'light') return params[0]\n return params[1]\n }\n\n// --------------------------------------------------------\n// calculate dimension themes\n// --------------------------------------------------------\ntype CalculateDimensionThemes = (\n theme: Record<string, any>,\n options: Record<string, any>,\n cb: any\n) => Record<string, any>\n\nexport const calculateDimensionThemes: CalculateDimensionThemes = (\n theme,\n options,\n cb\n) => {\n const result = {}\n\n if (isEmpty(options.dimensions)) return result\n\n return Object.entries(options.dimensions).reduce(\n (accumulator, [key, value]) => {\n const [, dimension] = isMultiKey(value)\n\n const helper = options[key]\n\n if (Array.isArray(helper) && helper.length > 0) {\n const finalDimensionThemes = calculateChainOptions(helper, [\n theme,\n cb,\n config.css,\n ])\n\n // eslint-disable-next-line no-param-reassign\n accumulator[dimension] = removeNullableValues(finalDimensionThemes)\n }\n\n return accumulator\n },\n result\n )\n}\n\n// --------------------------------------------------------\n// combine values\n// --------------------------------------------------------\ntype OptionFunc<A> = (...arg: Array<A>) => Record<string, unknown>\ntype CalculateChainOptions = <A>(\n options: Array<OptionFunc<A>> | undefined | null,\n args: Array<A>\n) => ReturnType<OptionFunc<A>>\n\nexport const calculateChainOptions: CalculateChainOptions = (options, args) => {\n const result = {}\n if (isEmpty(options)) return result\n\n const helper = options.reduce(\n (acc, item) => merge(acc, item(...args)),\n result\n )\n\n return removeAllEmptyValues(helper)\n}\n\n// --------------------------------------------------------\n// generate theme\n// --------------------------------------------------------\nexport type CalculateTheme = <\n P extends Record<string, unknown>,\n T extends Record<string, unknown>,\n B extends Record<string, unknown>\n>({\n rocketstate,\n themes,\n baseTheme,\n}: {\n rocketstate: P\n themes: T\n baseTheme: B\n}) => B & Record<string, unknown>\n\nexport const calculateTheme: CalculateTheme = ({\n rocketstate,\n themes,\n baseTheme,\n}) => {\n // generate final theme which will be passed to styled component\n let finalTheme = { ...baseTheme }\n\n Object.entries(rocketstate).forEach(\n ([key, value]: [string, string | Array<string>]) => {\n const keyTheme = themes[key]\n\n if (Array.isArray(value)) {\n value.forEach((item) => {\n finalTheme = merge(finalTheme, keyTheme[item])\n })\n } else {\n finalTheme = merge(finalTheme, keyTheme[value])\n }\n }\n )\n\n return finalTheme\n}\n\n// --------------------------------------------------------\n// generate theme\n// --------------------------------------------------------\nexport type CalculateThemeMode = (\n themes: Record<string, any>,\n variant: 'light' | 'dark'\n) => Partial<{\n baseTheme: Record<string, unknown>\n themes: Record<string, unknown>\n}>\n\nexport const calculateThemeMode: CalculateThemeMode = (themes, variant) => {\n const callback = themeModeCb().toString()\n\n const result = {}\n Object.entries(themes).forEach(([key, value]) => {\n if (typeof value === 'object') {\n result[key] = calculateThemeMode(value, variant)\n } else if (typeof value === 'function' && value.toString() === callback) {\n result[key] = value(variant)\n } else {\n result[key] = value\n }\n })\n\n return result\n}\n","import { config } from '@vitus-labs/core'\nimport { calculateChainOptions, calculateDimensionThemes } from '~/utils/theme'\nimport { calculateDimensionsMap } from '~/utils/dimensions'\nimport type { Configuration, __ROCKETSTYLE__ } from '~/types/configuration'\nimport type { ThemeMode } from '~/types/theme'\n\ntype UseTheme = <T extends Record<string, unknown>>({\n theme,\n options,\n cb,\n}: {\n theme: T\n options: Configuration\n cb: ThemeMode\n}) => __ROCKETSTYLE__\n\nconst useTheme: UseTheme = ({ theme, options, cb }) => {\n const themes = calculateDimensionThemes(theme, options, cb)\n const { keysMap, keywords } = calculateDimensionsMap({\n themes,\n useBooleans: options.useBooleans,\n })\n\n // eslint-disable-next-line no-underscore-dangle\n const __ROCKETSTYLE__ = {\n dimensions: keysMap,\n reservedPropNames: keywords,\n baseTheme: calculateChainOptions(options.theme, [theme, cb, config.css]),\n themes,\n }\n\n return __ROCKETSTYLE__\n}\n\nexport default useTheme\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { ReactNode, FC, useContext, ComponentType } from 'react'\nimport { Provider as CoreProvider, context } from '@vitus-labs/core'\n\ntype Theme = {\n rootSize: number\n breakpoints?: Record<string, number>\n __VITUS_LABS__?: never\n} & Record<string, unknown>\n\nexport type TProvider = {\n children: ReactNode\n theme?: Theme\n mode?: 'light' | 'dark'\n inversed?: boolean\n provider?: ComponentType<any>\n}\n\nconst Provider: FC<TProvider> = ({\n theme,\n mode,\n children,\n inversed,\n provider: RocketstyleProvider = CoreProvider,\n}) => {\n if (inversed) {\n const {\n provider: InnerProvider,\n mode: ctxMode,\n ...ctx\n } = useContext<TProvider>(context as any)\n\n const isDark = ctxMode === 'dark'\n const inversedTheme = isDark ? 'light' : 'dark'\n\n if (!InnerProvider) return <>{children}</>\n\n return (\n <InnerProvider\n mode={inversedTheme}\n isDark={isDark}\n isLight={!isDark}\n {...ctx}\n >\n {children}\n </InnerProvider>\n )\n }\n\n const isDark = mode === 'dark'\n\n return (\n <RocketstyleProvider\n mode={mode}\n isDark={isDark}\n isLight={!isDark}\n theme={theme}\n provider={RocketstyleProvider}\n >\n {children}\n </RocketstyleProvider>\n )\n}\n\nexport { context }\n\nexport default Provider\n","export const PSEUDO_KEYS = ['hover', 'active', 'focus', 'pressed'] as const\n\nexport const THEME_MODES = {\n light: true,\n dark: true,\n} as const\n\nexport const THEME_MODES_INVERSED = {\n dark: 'light',\n light: 'dark',\n} as const\n\nexport const CONFIG_KEYS = [\n 'provider',\n 'consumer',\n 'DEBUG',\n 'name',\n 'component',\n 'inversed',\n 'passProps',\n 'styled',\n] as const\n\nexport const STYLING_KEYS = ['theme', 'attrs', 'styles'] as const\nexport const STATIC_KEYS = [...STYLING_KEYS, 'compose'] as const\n\nexport const ALL_RESERVED_KEYS = [\n ...Object.keys(THEME_MODES),\n ...CONFIG_KEYS,\n ...STATIC_KEYS,\n] as const\n","import { useContext } from 'react'\nimport { context } from '~/context'\nimport { THEME_MODES_INVERSED } from '~/constants/reservedKeys'\nimport { ThemeModeKeys } from '~/types/theme'\n\ntype UseThemeOptions = ({ inversed }: { inversed?: boolean }) => {\n theme: Record<string, unknown>\n mode: ThemeModeKeys\n isDark: boolean\n isLight: boolean\n}\n\nconst useThemeOptions: UseThemeOptions = ({ inversed }) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const { theme, mode: ctxMode, isDark: ctxDark } = useContext(context) as any\n const mode = inversed ? THEME_MODES_INVERSED[ctxMode] : ctxMode\n const isDark = inversed ? !ctxDark : ctxDark\n const isLight = !isDark\n\n return { theme, mode, isDark, isLight }\n}\n\nexport default useThemeOptions\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isEmpty } from '@vitus-labs/core'\nimport { MultiKeys } from '~/types/dimensions'\n\n// --------------------------------------------------------\n// pick styled props\n// --------------------------------------------------------\ntype PickStyledProps = (\n props: Record<string, unknown>,\n keywords: Record<string, true>\n) => Partial<typeof props>\nexport const pickStyledProps: PickStyledProps = (props, keywords) => {\n const result = {} as any\n\n Object.entries(props).forEach(([key, value]) => {\n if (keywords[key]) result[key] = value\n })\n\n return result\n}\n\n// --------------------------------------------------------\n// combine values\n// --------------------------------------------------------\ntype OptionFunc<A> = (...arg: Array<A>) => Record<string, unknown>\ntype CalculateChainOptions = <A>(\n options?: Array<OptionFunc<A>>\n) => (args: Array<A>) => ReturnType<OptionFunc<A>>\n\nexport const calculateChainOptions: CalculateChainOptions =\n (options) => (args) => {\n const result = {}\n if (isEmpty(options)) return result\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return options.reduce(\n (acc, item) => Object.assign(acc, item(...args)),\n result\n )\n }\n\n// --------------------------------------------------------\n// get style attributes\n// --------------------------------------------------------\ntype CalculateStylingAttrs = ({\n useBooleans,\n multiKeys,\n}: {\n useBooleans?: boolean\n multiKeys?: MultiKeys\n}) => ({\n props,\n dimensions,\n}: {\n props: Record<string, unknown>\n dimensions: Record<string, unknown>\n}) => any\nexport const calculateStylingAttrs: CalculateStylingAttrs =\n ({ useBooleans, multiKeys }) =>\n ({ props, dimensions }) => {\n const result = {}\n\n // (1) find dimension keys values & initialize\n // object with possible options\n Object.keys(dimensions).forEach((item) => {\n const pickedProp = props[item]\n const valueTypes = ['number', 'string']\n\n // if the property is mutli key, allow assign array as well\n if (multiKeys && multiKeys[item] && Array.isArray(pickedProp)) {\n result[item] = pickedProp\n }\n // assign when it's only a string or number otherwise it's considered\n // as invalid param\n else if (valueTypes.includes(typeof pickedProp)) {\n result[item] = pickedProp\n } else {\n result[item] = undefined\n }\n })\n\n // (2) if booleans are being used let's find the rest\n if (useBooleans) {\n const propsKeys = Object.keys(props).reverse()\n\n Object.entries(result).forEach(([key, value]) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const isMultiKey = multiKeys[key]\n\n // when value in result is not assigned yet\n if (!value) {\n let newDimensionValue\n const keywords = Object.keys(dimensions[key] as any)\n\n if (isMultiKey) {\n newDimensionValue = propsKeys.filter((key) =>\n keywords.includes(key)\n )\n } else {\n // reverse props to guarantee the last one will have\n // a priority over previous ones\n newDimensionValue = propsKeys.find((key) => {\n if (keywords.includes(key) && props[key]) return key\n return false\n })\n }\n\n result[key] = newDimensionValue\n }\n })\n }\n\n return result\n }\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable no-underscore-dangle */\nimport React, {\n forwardRef,\n ForwardRefExoticComponent,\n ComponentType,\n} from 'react'\nimport { renderContent } from '@vitus-labs/core'\nimport { calculateChainOptions } from '~/utils/attrs'\nimport { useThemeOptions } from '~/hooks'\n\nimport type { OptionFunc } from '~/types/configuration'\n\nexport type RocketStyleHOC = ({\n inversed,\n attrs,\n}: {\n inversed?: boolean\n attrs?: Array<OptionFunc>\n}) => (WrappedComponent: ComponentType) => ForwardRefExoticComponent<any>\n\nconst rocketStyleHOC: RocketStyleHOC = ({ inversed, attrs }) => {\n // --------------------------------------------------\n // .attrs(...)\n // first we need to calculate final props which are\n // being returned by using `attr` chaining method\n // --------------------------------------------------\n const _calculateChainOptions = calculateChainOptions(attrs)\n\n const Enhanced = (WrappedComponent) =>\n forwardRef<any, any>((props, ref) => {\n const { theme, mode, isDark, isLight } = useThemeOptions({\n inversed,\n })\n\n const calculatedAttrs = _calculateChainOptions([\n props,\n theme,\n {\n renderContent,\n mode,\n isDark,\n isLight,\n },\n ])\n\n return (\n <WrappedComponent\n $rocketstyleRef={ref}\n {...calculatedAttrs}\n {...props}\n />\n )\n })\n\n return Enhanced\n}\n\nexport default rocketStyleHOC\n","import { createContext } from 'react'\nimport type { PseudoState } from '~/types/pseudo'\n\ntype TContext = Partial<\n {\n pseudo: PseudoState\n } & Record<string, unknown>\n>\n\nexport default createContext<TContext>({})\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { forwardRef } from 'react'\nimport { usePseudoState } from '~/hooks'\nimport LocalContext from './localContext'\n\nconst RocketStyleProviderComponent = (WrappedComponent) =>\n forwardRef<any, any>(\n (\n {\n onMouseEnter,\n onMouseLeave,\n onMouseUp,\n onMouseDown,\n onFocus,\n onBlur,\n $rocketstate,\n ...props\n },\n ref\n ) => {\n // pseudo hook to detect states hover / pressed / focus\n const pseudo = usePseudoState({\n onMouseEnter,\n onMouseLeave,\n onMouseUp,\n onMouseDown,\n onFocus,\n onBlur,\n })\n\n const updatedState = {\n ...$rocketstate,\n pseudo: { ...$rocketstate.pseudo, ...pseudo.state },\n }\n\n return (\n <LocalContext.Provider value={updatedState}>\n <WrappedComponent\n {...props}\n {...pseudo.events}\n ref={ref}\n $rocketstate={updatedState}\n />\n </LocalContext.Provider>\n )\n }\n )\n\nexport default RocketStyleProviderComponent\n","/* eslint-disable import/prefer-default-export */\nimport type { StylesCbArray, Css } from '~/types/styles'\n\n// --------------------------------------------------------\n// calculate styles\n// --------------------------------------------------------\ntype CalculateStyles = <S extends StylesCbArray | undefined, C extends Css>(\n styles: S,\n css: C\n) => Array<ReturnType<StylesCbArray[number]>>\n\nexport const calculateStyles: CalculateStyles = (styles, css) => {\n if (!styles) return []\n\n return styles.map((item) => item(css))\n}\n","/* eslint-disable no-underscore-dangle */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\n\nimport React, {\n useMemo,\n forwardRef,\n useContext,\n useImperativeHandle,\n useRef,\n} from 'react'\nimport hoistNonReactStatics from 'hoist-non-react-statics'\nimport { config, omit, pick, compose, renderContent } from '@vitus-labs/core'\nimport { useTheme, useThemeOptions } from '~/hooks'\nimport { localContext, createProvider, rocketstyleAttrsHoc } from '~/internal'\nimport { calculateTheme, calculateThemeMode, themeModeCb } from '~/utils/theme'\nimport { calculateStyles } from '~/utils/styles'\nimport { chainOptions } from '~/utils/collection'\nimport {\n pickStyledProps,\n calculateStylingAttrs,\n calculateChainOptions,\n} from '~/utils/attrs'\nimport {\n PSEUDO_KEYS,\n CONFIG_KEYS,\n STYLING_KEYS,\n STATIC_KEYS,\n} from '~/constants/reservedKeys'\n\nimport type { RocketComponent } from '~/types/rocketstyle'\nimport type { Configuration } from '~/types/configuration'\nimport type { StyleComponent } from '~/types/styleComponent'\n\n// --------------------------------------------------------\n// styledComponent helpers for chaining attributes\n// --------------------------------------------------------\ntype OrOptions = (\n keys: Readonly<Array<string>>,\n opts: Record<string, unknown>,\n defaultOpts: Record<string, unknown>\n) => Record<string, unknown>\n\nconst orOptions: OrOptions = (keys, opts, defaultOpts) =>\n keys.reduce(\n (acc, item) => ({ ...acc, [item]: opts[item] || defaultOpts[item] }),\n {}\n )\n\nconst chainReservedOptions = (keys, opts, defaultOpts) =>\n keys.reduce(\n (acc, item) => ({\n ...acc,\n [item]: chainOptions(opts[item], defaultOpts[item]),\n }),\n {}\n )\n\n// --------------------------------------------------------\n// helpers for create statics on class\n// --------------------------------------------------------\nconst createStaticsEnhancers = ({ context, dimensionKeys, func, opts }) => {\n dimensionKeys.forEach((item) => {\n // eslint-disable-next-line no-param-reassign\n context[item] = (props) => func({ [item]: props }, opts)\n })\n}\n\n// --------------------------------------------------------\n// cloneAndEnhance\n// helper function which allows function chaining\n// always returns styleComponent with static functions\n// assigned\n// --------------------------------------------------------\ntype CloneAndEnhance = <A extends Configuration, B extends Configuration>(\n opts: A,\n defaultOpts: B\n) => ReturnType<typeof styleComponent>\n\nconst cloneAndEnhance: CloneAndEnhance = (opts, defaultOpts) =>\n styleComponent({\n ...defaultOpts,\n compose: { ...defaultOpts.compose, ...opts.compose },\n ...orOptions(CONFIG_KEYS, opts, defaultOpts),\n ...chainReservedOptions(\n [...defaultOpts.dimensionKeys, ...STYLING_KEYS],\n opts,\n defaultOpts\n ),\n })\n\n// --------------------------------------------------------\n// styleComponent\n// helper function which allows function chaining\n// always returns a valid React component with static functions\n// assigned, so it can be even rendered as a valid component\n// or styles can be extended via its statics\n// --------------------------------------------------------\nconst styleComponent: StyleComponent<any> = (options) => {\n const { component, styles } = options\n const { styled } = config\n\n // const _calculateChainOptions = calculateChainOptions(options.attrs)\n const _calculateStylingAttrs = calculateStylingAttrs({\n multiKeys: options.multiKeys,\n useBooleans: options.useBooleans,\n })\n\n const componentName =\n options.name || options.component.displayName || options.component.name\n\n // create styled component with all options.styles if available\n const STYLED_COMPONENT =\n component.IS_ROCKETSTYLE || options.styled === false\n ? component\n : styled(component)`\n ${calculateStyles(styles, config.css)};\n `\n\n // --------------------------------------------------------\n // final component to be rendered\n // --------------------------------------------------------\n const RenderComponent = options.provider\n ? createProvider(STYLED_COMPONENT)\n : STYLED_COMPONENT\n\n // --------------------------------------------------------\n // hocs\n // --------------------------------------------------------\n const calculateHocsFuncs = Object.values(options.compose || {})\n .filter((item) => typeof item === 'function')\n .reverse()\n\n const hocsFuncs = [rocketstyleAttrsHoc(options), ...calculateHocsFuncs]\n\n // --------------------------------------------------------\n // ENHANCED COMPONENT (returned component)\n // --------------------------------------------------------\n // .attrs() chaining option is calculated in HOC and passed as props already\n const EnhancedComponent: RocketComponent = forwardRef(\n (\n {\n $rocketstyleRef, // it's forwarded from HOC which is always on top of hocs\n ...props\n },\n ref\n ) => {\n // --------------------------------------------------\n // handle refs\n // (1) one is passed from inner HOC - $rocketstyleRef\n // (2) second one is used to be used directly (e.g. inside hocs)\n // --------------------------------------------------\n const internalRef = useRef(null)\n\n if ($rocketstyleRef)\n useImperativeHandle($rocketstyleRef, () => internalRef.current, [\n $rocketstyleRef,\n ])\n\n if (ref) useImperativeHandle(ref, () => internalRef.current, [ref])\n\n // --------------------------------------------------\n // hover - focus - pressed state passed via context from parent component\n // --------------------------------------------------\n const rocketstyleCtx = options.consumer ? useContext(localContext) : {}\n\n // --------------------------------------------------\n // general theme and theme mode dark / light passed in context\n // --------------------------------------------------\n const { theme, mode } = useThemeOptions(options)\n\n // --------------------------------------------------\n // calculate themes for all possible styling dimensions\n // .theme(...) + defined dimensions like .states(...), .sizes(...)\n // --------------------------------------------------\n const __ROCKETSTYLE__ = useMemo(\n () =>\n useTheme<typeof theme>({\n theme,\n options,\n cb: themeModeCb,\n }),\n // recalculate this only when theme changes\n [theme]\n )\n\n const {\n reservedPropNames,\n themes: rocketThemes,\n dimensions,\n baseTheme: rocketBaseTheme,\n } = __ROCKETSTYLE__\n\n const { baseTheme, themes } = useMemo(\n () =>\n calculateThemeMode(\n { themes: rocketThemes, baseTheme: rocketBaseTheme },\n mode\n ),\n // recalculate this only when theme mode changes dark / light\n [mode]\n )\n\n // --------------------------------------------------\n // calculate reserved Keys defined in dimensions as styling keys\n // there is no need to calculate this each time - keys are based on\n // dimensions definitions\n // --------------------------------------------------\n const RESERVED_STYLING_PROPS_KEYS = useMemo(\n () => Object.keys(reservedPropNames),\n []\n )\n\n // --------------------------------------------------\n // get final props which are (latest has the highest priority):\n // (1) merged styling from context,\n // (2) `attrs` chaining method, and from\n // (3) passing them directly to component\n // --------------------------------------------------\n const { pseudo = {}, ...mergeProps }: Record<string, unknown> = {\n ...(options.consumer\n ? options.consumer((callback) => callback(rocketstyleCtx))\n : {}),\n ...props,\n }\n\n // --------------------------------------------------\n // rocketstate\n // calculate final component state including pseudo state\n // passed as $rocketstate prop\n // --------------------------------------------------\n const rocketstate: Record<string, unknown> = _calculateStylingAttrs({\n props: pickStyledProps(mergeProps, reservedPropNames),\n dimensions,\n })\n\n // --------------------------------------------------\n // pseudo state\n // calculate final component pseudo state including pseudo state\n // from props and override by pseudo props from context\n // --------------------------------------------------\n const finalPseudo = {\n ...pick(props, PSEUDO_KEYS),\n ...pseudo,\n }\n\n const finalRocketstate = { ...rocketstate, pseudo: finalPseudo }\n\n // --------------------------------------------------\n // rocketstyle\n // calculated (based on styling props) final theme which will be passed\n // to our styled component\n // passed as $rocketstyle prop\n // --------------------------------------------------\n const rocketstyle = calculateTheme({\n rocketstate,\n themes,\n baseTheme,\n })\n\n // --------------------------------------------------\n // final props\n // final props passed to WrappedComponent\n // excluding: styling props\n // including: $rocketstyle, $rocketstate\n // --------------------------------------------------\n const finalProps = {\n // this removes styling state from props and passes its state\n // under rocketstate key only\n ...omit(mergeProps, [...RESERVED_STYLING_PROPS_KEYS, ...PSEUDO_KEYS]),\n // if enforced to pass styling props, we pass them directly\n ...(options.passProps ? pick(mergeProps, options.passProps) : {}),\n ref: ref || $rocketstyleRef ? internalRef : undefined,\n // state props passed to styled component only, therefore the `$` symbol\n $rocketstyle: rocketstyle,\n $rocketstate: finalRocketstate,\n }\n\n // all the development stuff injected\n if (process.env.NODE_ENV !== 'production') {\n finalProps['data-rocketstyle'] = componentName\n }\n\n return <RenderComponent {...finalProps} />\n }\n )\n\n // ------------------------------------------------------\n // This will hoist and generate dynamically next static methods\n // for all dimensions available in configuration\n // ------------------------------------------------------\n const RocketComponent = compose(...hocsFuncs)(EnhancedComponent)\n RocketComponent.IS_ROCKETSTYLE = true\n RocketComponent.displayName = componentName\n\n hoistNonReactStatics(RocketComponent, options.component)\n createStaticsEnhancers({\n context: RocketComponent,\n dimensionKeys: [...options.dimensionKeys, ...STATIC_KEYS],\n func: cloneAndEnhance,\n opts: options,\n })\n\n // ------------------------------------------------------\n RocketComponent.IS_ROCKETSTYLE = true\n RocketComponent.displayName = componentName\n // ------------------------------------------------------\n\n RocketComponent.config = (opts = {}) => {\n const result = pick(opts, CONFIG_KEYS)\n\n return cloneAndEnhance(result as any, options) as any\n }\n\n RocketComponent.getStaticDimensions = (theme) => {\n const themes = useTheme({ theme, options, cb: themeModeCb })\n\n return {\n dimensions: themes.dimensions,\n useBooleans: options.useBooleans,\n multiKeys: options.multiKeys,\n }\n }\n\n RocketComponent.getDefaultAttrs = (props, theme, mode) => {\n const result = calculateChainOptions(options.attrs)([\n props,\n theme,\n {\n renderContent,\n mode,\n isDark: mode === 'light',\n isLight: mode === 'dark',\n },\n ])\n\n return result\n }\n\n return RocketComponent as RocketComponent\n}\n\nexport default styleComponent\n","const DEFAULT_DIMENSIONS = {\n states: 'state',\n sizes: 'size',\n variants: 'variant',\n multiple: {\n propName: 'multiple',\n multi: true,\n },\n} as const\n\nexport default DEFAULT_DIMENSIONS\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { isEmpty } from '@vitus-labs/core'\nimport styleComponent from './rocketstyle'\nimport {\n getKeys,\n getMultipleDimensions,\n getDimensionsValues,\n} from '~/utils/dimensions'\nimport { ALL_RESERVED_KEYS } from '~/constants/reservedKeys'\nimport defaultDimensions from '~/constants/defaultDimensions'\n\nimport type { ElementType } from '~/types/utils'\nimport type { Dimensions, DefaultDimensions } from '~/types/dimensions'\nimport type { StyleComponent } from '~/types/styleComponent'\n\nexport type Rocketstyle = <T = any, CT = any>() => <\n D extends Dimensions = DefaultDimensions,\n UB extends boolean = true\n>({\n dimensions,\n useBooleans,\n}?: {\n dimensions?: D\n useBooleans?: UB\n}) => <C extends ElementType>({\n name,\n component,\n}: {\n name: string\n component: C\n}) => ReturnType<StyleComponent<C, T, CT, D, UB>>\n\nconst rocketstyle: Rocketstyle =\n () =>\n ({ dimensions = defaultDimensions, useBooleans = true } = {}) =>\n ({ name, component }) => {\n // --------------------------------------------------------\n // handle ERRORS in development mode\n // --------------------------------------------------------\n if (process.env.NODE_ENV !== 'production') {\n type Errors = Partial<{\n component: string\n name: string\n dimensions: string\n invalidDimensions: string\n }>\n\n const errors: Errors = {}\n if (!component) {\n errors.component = 'Parameter `component` is missing in params!'\n }\n\n if (!name) {\n errors.name = 'Parameter `name` is missing in params!'\n }\n\n if (isEmpty(dimensions)) {\n errors.dimensions = 'Parameter `dimensions` is missing in params!'\n } else {\n const definedDimensions = getKeys(dimensions)\n const invalidDimension = ALL_RESERVED_KEYS.some((item) =>\n definedDimensions.includes(item as any)\n )\n\n if (invalidDimension) {\n errors.invalidDimensions = `Some of your \\`dimensions\\` is invalid and uses reserved static keys which are\n ${defaultDimensions.toString()}`\n }\n }\n\n if (!isEmpty(errors)) {\n throw Error(JSON.stringify(errors))\n }\n }\n\n return styleComponent({\n name,\n component,\n useBooleans,\n dimensions,\n dimensionKeys: getKeys(dimensions),\n dimensionValues: getDimensionsValues(dimensions),\n multiKeys: getMultipleDimensions(dimensions),\n })\n }\n\nexport default rocketstyle\n","/* eslint-disable @typescript-eslint/no-explicit-any */\ntype IsRocketComponent = (component: any) => boolean\n\nconst isRocketComponent: IsRocketComponent = (component) => {\n if (\n typeof component === 'object' &&\n component !== null &&\n component.IS_ROCKETSTYLE\n ) {\n return true\n }\n\n return false\n}\n\nexport default isRocketComponent\n"],"names":["useState","get","isEmpty","set","calculateChainOptions","config","merge","CoreProvider","useContext","context","React","forwardRef","renderContent","createContext","LocalContext","createProvider","rocketstyleAttrsHoc","useRef","useImperativeHandle","useMemo","pick","omit","compose","hoistNonReactStatics","defaultDimensions"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,WAAW,GAAG,CAAC,CAAQ;IAC3B,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AAc,EACxB;QACA,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,KAAK,CAAA;AACd;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"vitus-labs-rocketstyle.js","sources":["../src/hooks/usePseudoState.tsx","../src/utils/collection.ts","../src/utils/dimensions.ts","../src/utils/theme.ts","../src/hooks/useTheme.tsx","../src/context.tsx","../src/constants/reservedKeys.ts","../src/hooks/useThemeOptions.tsx","../src/utils/attrs.ts","../src/internal/rocketstyleAttrsHoc.tsx","../src/internal/localContext.tsx","../src/internal/createProvider.tsx","../src/utils/styles.ts","../src/rocketstyle.tsx","../src/constants/defaultDimensions.ts","../src/init.ts","../src/isRocketComponent.ts"],"sourcesContent":["import { useState } from 'react'\nimport type { PseudoActions, PseudoState } from '~/types/pseudo'\n\ntype State = Omit<PseudoState, 'active'>\n\ntype UsePseudoState = ({\n onMouseEnter,\n onMouseLeave,\n onMouseDown,\n onMouseUp,\n onFocus,\n onBlur,\n}: Partial<PseudoActions>) => { state: State; events: PseudoActions }\n\nconst handleEvent = (e: Event) => {\n e.preventDefault()\n e.stopPropagation()\n}\n\nconst usePseudoState: UsePseudoState = (props) => {\n const [hover, setHover] = useState(false)\n const [focus, setFocus] = useState(false)\n const [pressed, setPressed] = useState(false)\n\n const onMouseEnter = (e: MouseEvent) => {\n handleEvent(e)\n setHover(true)\n if (props.onMouseEnter) props.onMouseEnter(e)\n }\n\n const onMouseLeave = (e: MouseEvent) => {\n handleEvent(e)\n setHover(false)\n setPressed(false)\n if (props.onMouseLeave) props.onMouseLeave(e)\n }\n\n const onMouseDown = (e: MouseEvent) => {\n handleEvent(e)\n setPressed(true)\n if (props.onMouseDown) props.onMouseDown(e)\n }\n\n const onMouseUp = (e: MouseEvent) => {\n handleEvent(e)\n setPressed(false)\n if (props.onMouseUp) props.onMouseUp(e)\n }\n\n const onFocus = (e: FocusEvent) => {\n handleEvent(e)\n setFocus(true)\n if (props.onFocus) props.onFocus(e)\n }\n\n const onBlur = (e: FocusEvent) => {\n handleEvent(e)\n setFocus(false)\n if (props.onBlur) props.onBlur(e)\n }\n\n return {\n state: {\n hover,\n focus,\n pressed,\n },\n events: {\n onMouseEnter,\n onMouseLeave,\n onMouseDown,\n onMouseUp,\n onFocus,\n onBlur,\n },\n }\n}\n\nexport default usePseudoState\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable import/prefer-default-export */\n\n// --------------------------------------------------------\n// chain options\n// --------------------------------------------------------\ntype ChanOptions = (\n opts: Record<string, unknown> | ((...args: any) => Record<string, unknown>),\n defaultOpts: any[]\n) => any[]\n\nexport const chainOptions: ChanOptions = (opts, defaultOpts = []) => {\n const result = [...defaultOpts]\n\n if (typeof opts === 'function') result.push(opts)\n else if (typeof opts === 'object') result.push(() => opts)\n\n return result\n}\n\n// --------------------------------------------------------\n// remove empty values\n// --------------------------------------------------------\ntype RemoveNullableValues = (obj: Record<string, any>) => Record<string, any>\nexport const removeNullableValues: RemoveNullableValues = (obj) =>\n Object.entries(obj)\n .filter(([, v]) => v != null && v !== false)\n .reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {})\n\n// --------------------------------------------------------\n// remove empty values recursively\n// --------------------------------------------------------\ntype RemoveAllEmptyValues = (obj: Record<string, any>) => Record<string, any>\nexport const removeAllEmptyValues: RemoveAllEmptyValues = (obj) =>\n Object.entries(obj)\n .filter(([, v]) => v != null)\n .reduce(\n (acc, [k, v]) => ({\n ...acc,\n [k]: typeof v === 'object' ? removeAllEmptyValues(v) : v,\n }),\n {}\n )\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { get, isEmpty, set } from '@vitus-labs/core'\nimport { Dimensions, DimensionValue, MultiKeys } from '~/types/dimensions'\n\n// --------------------------------------------------------\n// is value milti key\n// --------------------------------------------------------\ntype IsValidKey = (value: any) => boolean\nexport const isValidKey: IsValidKey = (value) =>\n value !== undefined && value !== null && value !== false\n\n// --------------------------------------------------------\n// is value milti key\n// --------------------------------------------------------\ntype IsMultiKey = (value: any) => [boolean, string]\nexport const isMultiKey: IsMultiKey = (value) => {\n if (typeof value === 'object') return [true, get(value, 'propName')]\n return [false, value]\n}\n\n// --------------------------------------------------------\n// calculate dimensions map\n// --------------------------------------------------------\ntype CalculateDimensionsMap = ({\n themes,\n useBooleans,\n}: {\n themes: Record<string, any>\n useBooleans: boolean\n}) => { keysMap: Record<string, any>; keywords: Record<string, any> }\n\nexport const calculateDimensionsMap: CalculateDimensionsMap = ({\n themes,\n useBooleans,\n}) => {\n const result = { keysMap: {}, keywords: {} }\n if (isEmpty(themes)) return result\n\n return Object.entries(themes).reduce((accumulator, [key, value]) => {\n const { keysMap, keywords } = accumulator\n keywords[key] = true\n\n Object.entries(value as any).forEach(([itemKey, itemValue]) => {\n if (!isValidKey(itemValue)) return\n\n if (useBooleans) {\n keywords[itemKey] = true\n }\n\n set(keysMap, [key, itemKey], true)\n })\n\n return accumulator\n }, result)\n}\n\n// --------------------------------------------------------\n// simple object getters\n// --------------------------------------------------------\ntype GetKeys = <T extends Record<string, unknown>>(obj: T) => Array<keyof T>\nexport const getKeys: GetKeys = (obj) => Object.keys(obj)\n\ntype GetValues = <T extends Record<string, unknown>, K extends keyof T>(\n obj: T\n) => T[K][]\nexport const getValues: GetValues = (obj) => Object.values(obj) as any\n\n// --------------------------------------------------------\n// get dimensions values array\n// --------------------------------------------------------\ntype ValueType<T> = T extends string ? T : Array<T>[0]\ntype GetDimensionsValues = <T extends Dimensions, K extends keyof T>(\n obj: T\n) => ValueType<T[K]>[]\n\nexport const getDimensionsValues: GetDimensionsValues = (obj) =>\n getValues(obj).map((item: DimensionValue) => {\n if (typeof item === 'object') {\n return item.propName as any\n }\n\n return item\n })\n\n// --------------------------------------------------------\n// get multiple dimensions map\n// --------------------------------------------------------\ntype GetMultipleDimensions = <T extends Dimensions>(obj: T) => MultiKeys<T>\n\nexport const getMultipleDimensions: GetMultipleDimensions = (obj) =>\n getValues(obj).reduce((accumulator, value: DimensionValue) => {\n if (typeof value === 'object') {\n // eslint-disable-next-line no-param-reassign\n if (value.multi === true) accumulator[value.propName] = true\n }\n\n return accumulator\n }, {})\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { config, isEmpty, merge } from '@vitus-labs/core'\nimport { removeAllEmptyValues, removeNullableValues } from './collection'\nimport { isMultiKey } from './dimensions'\nimport { ThemeMode } from '~/types/theme'\n\n// --------------------------------------------------------\n// theme mode callback\n// --------------------------------------------------------\nexport const themeModeCb: ThemeMode =\n (...params) =>\n (mode) => {\n if (!mode || mode === 'light') return params[0]\n return params[1]\n }\n\n// --------------------------------------------------------\n// calculate dimension themes\n// --------------------------------------------------------\ntype CalculateDimensionThemes = (\n theme: Record<string, any>,\n options: Record<string, any>,\n cb: any\n) => Record<string, any>\n\nexport const calculateDimensionThemes: CalculateDimensionThemes = (\n theme,\n options,\n cb\n) => {\n const result = {}\n\n if (isEmpty(options.dimensions)) return result\n\n return Object.entries(options.dimensions).reduce(\n (accumulator, [key, value]) => {\n const [, dimension] = isMultiKey(value)\n\n const helper = options[key]\n\n if (Array.isArray(helper) && helper.length > 0) {\n const finalDimensionThemes = calculateChainOptions(helper, [\n theme,\n cb,\n config.css,\n ])\n\n // eslint-disable-next-line no-param-reassign\n accumulator[dimension] = removeNullableValues(finalDimensionThemes)\n }\n\n return accumulator\n },\n result\n )\n}\n\n// --------------------------------------------------------\n// combine values\n// --------------------------------------------------------\ntype OptionFunc<A> = (...arg: Array<A>) => Record<string, unknown>\ntype CalculateChainOptions = <A>(\n options: Array<OptionFunc<A>> | undefined | null,\n args: Array<A>\n) => ReturnType<OptionFunc<A>>\n\nexport const calculateChainOptions: CalculateChainOptions = (options, args) => {\n const result = {}\n if (isEmpty(options)) return result\n\n const helper = options.reduce(\n (acc, item) => merge(acc, item(...args)),\n result\n )\n\n return removeAllEmptyValues(helper)\n}\n\n// --------------------------------------------------------\n// generate theme\n// --------------------------------------------------------\nexport type CalculateTheme = <\n P extends Record<string, unknown>,\n T extends Record<string, unknown>,\n B extends Record<string, unknown>\n>({\n rocketstate,\n themes,\n baseTheme,\n}: {\n rocketstate: P\n themes: T\n baseTheme: B\n}) => B & Record<string, unknown>\n\nexport const calculateTheme: CalculateTheme = ({\n rocketstate,\n themes,\n baseTheme,\n}) => {\n // generate final theme which will be passed to styled component\n let finalTheme = { ...baseTheme }\n\n Object.entries(rocketstate).forEach(\n ([key, value]: [string, string | Array<string>]) => {\n const keyTheme = themes[key]\n\n if (Array.isArray(value)) {\n value.forEach((item) => {\n finalTheme = merge(finalTheme, keyTheme[item])\n })\n } else {\n finalTheme = merge(finalTheme, keyTheme[value])\n }\n }\n )\n\n return finalTheme\n}\n\n// --------------------------------------------------------\n// generate theme\n// --------------------------------------------------------\nexport type CalculateThemeMode = (\n themes: Record<string, any>,\n variant: 'light' | 'dark'\n) => Partial<{\n baseTheme: Record<string, unknown>\n themes: Record<string, unknown>\n}>\n\nexport const calculateThemeMode: CalculateThemeMode = (themes, variant) => {\n const callback = themeModeCb().toString()\n\n const result = {}\n Object.entries(themes).forEach(([key, value]) => {\n if (typeof value === 'object') {\n result[key] = calculateThemeMode(value, variant)\n } else if (typeof value === 'function' && value.toString() === callback) {\n result[key] = value(variant)\n } else {\n result[key] = value\n }\n })\n\n return result\n}\n","import { config } from '@vitus-labs/core'\nimport { calculateChainOptions, calculateDimensionThemes } from '~/utils/theme'\nimport { calculateDimensionsMap } from '~/utils/dimensions'\nimport type { Configuration, __ROCKETSTYLE__ } from '~/types/configuration'\nimport type { ThemeMode } from '~/types/theme'\n\ntype UseTheme = <T extends Record<string, unknown>>({\n theme,\n options,\n cb,\n}: {\n theme: T\n options: Configuration\n cb: ThemeMode\n}) => __ROCKETSTYLE__\n\nconst useTheme: UseTheme = ({ theme, options, cb }) => {\n const themes = calculateDimensionThemes(theme, options, cb)\n const { keysMap, keywords } = calculateDimensionsMap({\n themes,\n useBooleans: options.useBooleans,\n })\n\n // eslint-disable-next-line no-underscore-dangle\n const __ROCKETSTYLE__ = {\n dimensions: keysMap,\n reservedPropNames: keywords,\n baseTheme: calculateChainOptions(options.theme, [theme, cb, config.css]),\n themes,\n }\n\n return __ROCKETSTYLE__\n}\n\nexport default useTheme\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { ReactNode, FC, useContext, ComponentType } from 'react'\nimport { Provider as CoreProvider, context } from '@vitus-labs/core'\n\ntype Theme = {\n rootSize: number\n breakpoints?: Record<string, number>\n __VITUS_LABS__?: never\n} & Record<string, unknown>\n\nexport type TProvider = {\n children: ReactNode\n theme?: Theme\n mode?: 'light' | 'dark'\n inversed?: boolean\n provider?: ComponentType<any>\n}\n\nconst Provider: FC<TProvider> = ({\n theme,\n mode,\n children,\n inversed,\n provider: RocketstyleProvider = CoreProvider,\n}) => {\n if (inversed) {\n const {\n provider: InnerProvider,\n mode: ctxMode,\n ...ctx\n } = useContext<TProvider>(context as any)\n\n const isDark = ctxMode === 'dark'\n const inversedTheme = isDark ? 'light' : 'dark'\n\n if (!InnerProvider) return <>{children}</>\n\n return (\n <InnerProvider\n mode={inversedTheme}\n isDark={isDark}\n isLight={!isDark}\n {...ctx}\n >\n {children}\n </InnerProvider>\n )\n }\n\n const isDark = mode === 'dark'\n\n return (\n <RocketstyleProvider\n mode={mode}\n isDark={isDark}\n isLight={!isDark}\n theme={theme}\n provider={RocketstyleProvider}\n >\n {children}\n </RocketstyleProvider>\n )\n}\n\nexport { context }\n\nexport default Provider\n","export const PSEUDO_KEYS = ['hover', 'active', 'focus', 'pressed'] as const\n\nexport const THEME_MODES = {\n light: true,\n dark: true,\n} as const\n\nexport const THEME_MODES_INVERSED = {\n dark: 'light',\n light: 'dark',\n} as const\n\nexport const CONFIG_KEYS = [\n 'provider',\n 'consumer',\n 'DEBUG',\n 'name',\n 'component',\n 'inversed',\n 'passProps',\n 'styled',\n] as const\n\nexport const STYLING_KEYS = ['theme', 'attrs', 'styles'] as const\nexport const STATIC_KEYS = [...STYLING_KEYS, 'compose'] as const\n\nexport const ALL_RESERVED_KEYS = [\n ...Object.keys(THEME_MODES),\n ...CONFIG_KEYS,\n ...STATIC_KEYS,\n] as const\n","import { useContext } from 'react'\nimport { context } from '~/context'\nimport { THEME_MODES_INVERSED } from '~/constants/reservedKeys'\nimport { ThemeModeKeys } from '~/types/theme'\n\ntype UseThemeOptions = ({ inversed }: { inversed?: boolean }) => {\n theme: Record<string, unknown>\n mode: ThemeModeKeys\n isDark: boolean\n isLight: boolean\n}\n\nconst useThemeOptions: UseThemeOptions = ({ inversed }) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const { theme, mode: ctxMode, isDark: ctxDark } = useContext(context) as any\n const mode = inversed ? THEME_MODES_INVERSED[ctxMode] : ctxMode\n const isDark = inversed ? !ctxDark : ctxDark\n const isLight = !isDark\n\n return { theme, mode, isDark, isLight }\n}\n\nexport default useThemeOptions\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isEmpty } from '@vitus-labs/core'\nimport { MultiKeys } from '~/types/dimensions'\n\n// --------------------------------------------------------\n// pick styled props\n// --------------------------------------------------------\ntype PickStyledProps = (\n props: Record<string, unknown>,\n keywords: Record<string, true>\n) => Partial<typeof props>\nexport const pickStyledProps: PickStyledProps = (props, keywords) => {\n const result = {} as any\n\n Object.entries(props).forEach(([key, value]) => {\n if (keywords[key]) result[key] = value\n })\n\n return result\n}\n\n// --------------------------------------------------------\n// combine values\n// --------------------------------------------------------\ntype OptionFunc<A> = (...arg: Array<A>) => Record<string, unknown>\ntype CalculateChainOptions = <A>(\n options?: Array<OptionFunc<A>>\n) => (args: Array<A>) => ReturnType<OptionFunc<A>>\n\nexport const calculateChainOptions: CalculateChainOptions =\n (options) => (args) => {\n const result = {}\n if (isEmpty(options)) return result\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return options.reduce(\n (acc, item) => Object.assign(acc, item(...args)),\n result\n )\n }\n\n// --------------------------------------------------------\n// get style attributes\n// --------------------------------------------------------\ntype CalculateStylingAttrs = ({\n useBooleans,\n multiKeys,\n}: {\n useBooleans?: boolean\n multiKeys?: MultiKeys\n}) => ({\n props,\n dimensions,\n}: {\n props: Record<string, unknown>\n dimensions: Record<string, unknown>\n}) => any\nexport const calculateStylingAttrs: CalculateStylingAttrs =\n ({ useBooleans, multiKeys }) =>\n ({ props, dimensions }) => {\n const result = {}\n\n // (1) find dimension keys values & initialize\n // object with possible options\n Object.keys(dimensions).forEach((item) => {\n const pickedProp = props[item]\n const valueTypes = ['number', 'string']\n\n // if the property is mutli key, allow assign array as well\n if (multiKeys && multiKeys[item] && Array.isArray(pickedProp)) {\n result[item] = pickedProp\n }\n // assign when it's only a string or number otherwise it's considered\n // as invalid param\n else if (valueTypes.includes(typeof pickedProp)) {\n result[item] = pickedProp\n } else {\n result[item] = undefined\n }\n })\n\n // (2) if booleans are being used let's find the rest\n if (useBooleans) {\n const propsKeys = Object.keys(props).reverse()\n\n Object.entries(result).forEach(([key, value]) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const isMultiKey = multiKeys[key]\n\n // when value in result is not assigned yet\n if (!value) {\n let newDimensionValue\n const keywords = Object.keys(dimensions[key] as any)\n\n if (isMultiKey) {\n newDimensionValue = propsKeys.filter((key) =>\n keywords.includes(key)\n )\n } else {\n // reverse props to guarantee the last one will have\n // a priority over previous ones\n newDimensionValue = propsKeys.find((key) => {\n if (keywords.includes(key) && props[key]) return key\n return false\n })\n }\n\n result[key] = newDimensionValue\n }\n })\n }\n\n return result\n }\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable no-underscore-dangle */\nimport React, {\n forwardRef,\n ForwardRefExoticComponent,\n ComponentType,\n} from 'react'\nimport { renderContent } from '@vitus-labs/core'\nimport { calculateChainOptions } from '~/utils/attrs'\nimport { useThemeOptions } from '~/hooks'\n\nimport type { OptionFunc } from '~/types/configuration'\n\nexport type RocketStyleHOC = ({\n inversed,\n attrs,\n}: {\n inversed?: boolean\n attrs?: Array<OptionFunc>\n}) => (WrappedComponent: ComponentType) => ForwardRefExoticComponent<any>\n\nconst rocketStyleHOC: RocketStyleHOC = ({ inversed, attrs }) => {\n // --------------------------------------------------\n // .attrs(...)\n // first we need to calculate final props which are\n // being returned by using `attr` chaining method\n // --------------------------------------------------\n const _calculateChainOptions = calculateChainOptions(attrs)\n\n const Enhanced = (WrappedComponent) =>\n forwardRef<any, any>((props, ref) => {\n const { theme, mode, isDark, isLight } = useThemeOptions({\n inversed,\n })\n\n const calculatedAttrs = _calculateChainOptions([\n props,\n theme,\n {\n renderContent,\n mode,\n isDark,\n isLight,\n },\n ])\n\n return (\n <WrappedComponent\n $rocketstyleRef={ref}\n {...calculatedAttrs}\n {...props}\n />\n )\n })\n\n return Enhanced\n}\n\nexport default rocketStyleHOC\n","import { createContext } from 'react'\nimport type { PseudoState } from '~/types/pseudo'\n\ntype TContext = Partial<\n {\n pseudo: PseudoState\n } & Record<string, unknown>\n>\n\nexport default createContext<TContext>({})\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { forwardRef } from 'react'\nimport { usePseudoState } from '~/hooks'\nimport LocalContext from './localContext'\n\nconst RocketStyleProviderComponent = (WrappedComponent) =>\n forwardRef<any, any>(\n (\n {\n onMouseEnter,\n onMouseLeave,\n onMouseUp,\n onMouseDown,\n onFocus,\n onBlur,\n $rocketstate,\n ...props\n },\n ref\n ) => {\n // pseudo hook to detect states hover / pressed / focus\n const pseudo = usePseudoState({\n onMouseEnter,\n onMouseLeave,\n onMouseUp,\n onMouseDown,\n onFocus,\n onBlur,\n })\n\n const updatedState = {\n ...$rocketstate,\n pseudo: { ...$rocketstate.pseudo, ...pseudo.state },\n }\n\n return (\n <LocalContext.Provider value={updatedState}>\n <WrappedComponent\n {...props}\n {...pseudo.events}\n ref={ref}\n $rocketstate={updatedState}\n />\n </LocalContext.Provider>\n )\n }\n )\n\nexport default RocketStyleProviderComponent\n","/* eslint-disable import/prefer-default-export */\nimport type { StylesCbArray, Css } from '~/types/styles'\n\n// --------------------------------------------------------\n// calculate styles\n// --------------------------------------------------------\ntype CalculateStyles = <S extends StylesCbArray | undefined, C extends Css>(\n styles: S,\n css: C\n) => Array<ReturnType<StylesCbArray[number]>>\n\nexport const calculateStyles: CalculateStyles = (styles, css) => {\n if (!styles) return []\n\n return styles.map((item) => item(css))\n}\n","/* eslint-disable no-underscore-dangle */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\n\nimport React, {\n useMemo,\n forwardRef,\n useContext,\n useImperativeHandle,\n useRef,\n} from 'react'\nimport hoistNonReactStatics from 'hoist-non-react-statics'\nimport { config, omit, pick, compose, renderContent } from '@vitus-labs/core'\nimport { useTheme, useThemeOptions } from '~/hooks'\nimport { localContext, createProvider, rocketstyleAttrsHoc } from '~/internal'\nimport { calculateTheme, calculateThemeMode, themeModeCb } from '~/utils/theme'\nimport { calculateStyles } from '~/utils/styles'\nimport { chainOptions } from '~/utils/collection'\nimport {\n pickStyledProps,\n calculateStylingAttrs,\n calculateChainOptions,\n} from '~/utils/attrs'\nimport {\n PSEUDO_KEYS,\n CONFIG_KEYS,\n STYLING_KEYS,\n STATIC_KEYS,\n} from '~/constants/reservedKeys'\n\nimport type { RocketComponent } from '~/types/rocketstyle'\nimport type { Configuration } from '~/types/configuration'\nimport type { StyleComponent } from '~/types/styleComponent'\n\n// --------------------------------------------------------\n// styledComponent helpers for chaining attributes\n// --------------------------------------------------------\ntype OrOptions = (\n keys: Readonly<Array<string>>,\n opts: Record<string, unknown>,\n defaultOpts: Record<string, unknown>\n) => Record<string, unknown>\n\nconst orOptions: OrOptions = (keys, opts, defaultOpts) =>\n keys.reduce(\n (acc, item) => ({ ...acc, [item]: opts[item] || defaultOpts[item] }),\n {}\n )\n\nconst chainReservedOptions = (keys, opts, defaultOpts) =>\n keys.reduce(\n (acc, item) => ({\n ...acc,\n [item]: chainOptions(opts[item], defaultOpts[item]),\n }),\n {}\n )\n\n// --------------------------------------------------------\n// helpers for create statics on class\n// --------------------------------------------------------\nconst createStaticsEnhancers = ({ context, dimensionKeys, func, opts }) => {\n dimensionKeys.forEach((item) => {\n // eslint-disable-next-line no-param-reassign\n context[item] = (props) => func({ [item]: props }, opts)\n })\n}\n\n// --------------------------------------------------------\n// cloneAndEnhance\n// helper function which allows function chaining\n// always returns styleComponent with static functions\n// assigned\n// --------------------------------------------------------\ntype CloneAndEnhance = <A extends Configuration, B extends Configuration>(\n opts: A,\n defaultOpts: B\n) => ReturnType<typeof styleComponent>\n\nconst cloneAndEnhance: CloneAndEnhance = (opts, defaultOpts) =>\n styleComponent({\n ...defaultOpts,\n compose: { ...defaultOpts.compose, ...opts.compose },\n ...orOptions(CONFIG_KEYS, opts, defaultOpts),\n ...chainReservedOptions(\n [...defaultOpts.dimensionKeys, ...STYLING_KEYS],\n opts,\n defaultOpts\n ),\n })\n\n// --------------------------------------------------------\n// styleComponent\n// helper function which allows function chaining\n// always returns a valid React component with static functions\n// assigned, so it can be even rendered as a valid component\n// or styles can be extended via its statics\n// --------------------------------------------------------\nconst styleComponent: StyleComponent<any> = (options) => {\n const { component, styles } = options\n const { styled } = config\n\n // const _calculateChainOptions = calculateChainOptions(options.attrs)\n const _calculateStylingAttrs = calculateStylingAttrs({\n multiKeys: options.multiKeys,\n useBooleans: options.useBooleans,\n })\n\n const componentName =\n options.name || options.component.displayName || options.component.name\n\n // create styled component with all options.styles if available\n const STYLED_COMPONENT =\n component.IS_ROCKETSTYLE || options.styled === false\n ? component\n : styled(component)`\n ${calculateStyles(styles, config.css)};\n `\n\n // --------------------------------------------------------\n // final component to be rendered\n // --------------------------------------------------------\n const RenderComponent = options.provider\n ? createProvider(STYLED_COMPONENT)\n : STYLED_COMPONENT\n\n // --------------------------------------------------------\n // hocs\n // --------------------------------------------------------\n const calculateHocsFuncs = Object.values(options.compose || {})\n .filter((item) => typeof item === 'function')\n .reverse()\n\n const hocsFuncs = [rocketstyleAttrsHoc(options), ...calculateHocsFuncs]\n\n // --------------------------------------------------------\n // ENHANCED COMPONENT (returned component)\n // --------------------------------------------------------\n // .attrs() chaining option is calculated in HOC and passed as props already\n const EnhancedComponent: RocketComponent = forwardRef(\n (\n {\n $rocketstyleRef, // it's forwarded from HOC which is always on top of hocs\n ...props\n },\n ref\n ) => {\n // --------------------------------------------------\n // handle refs\n // (1) one is passed from inner HOC - $rocketstyleRef\n // (2) second one is used to be used directly (e.g. inside hocs)\n // --------------------------------------------------\n const internalRef = useRef(null)\n\n if ($rocketstyleRef)\n useImperativeHandle($rocketstyleRef, () => internalRef.current, [\n $rocketstyleRef,\n ])\n\n if (ref) useImperativeHandle(ref, () => internalRef.current, [ref])\n\n // --------------------------------------------------\n // hover - focus - pressed state passed via context from parent component\n // --------------------------------------------------\n const rocketstyleCtx = options.consumer ? useContext(localContext) : {}\n\n // --------------------------------------------------\n // general theme and theme mode dark / light passed in context\n // --------------------------------------------------\n const { theme, mode } = useThemeOptions(options)\n\n // --------------------------------------------------\n // calculate themes for all possible styling dimensions\n // .theme(...) + defined dimensions like .states(...), .sizes(...)\n // --------------------------------------------------\n const __ROCKETSTYLE__ = useMemo(\n () =>\n useTheme<typeof theme>({\n theme,\n options,\n cb: themeModeCb,\n }),\n // recalculate this only when theme changes\n [theme]\n )\n\n const {\n reservedPropNames,\n themes: rocketThemes,\n dimensions,\n baseTheme: rocketBaseTheme,\n } = __ROCKETSTYLE__\n\n const { baseTheme, themes } = useMemo(\n () =>\n calculateThemeMode(\n { themes: rocketThemes, baseTheme: rocketBaseTheme },\n mode\n ),\n // recalculate this only when theme mode changes dark / light\n [mode]\n )\n\n // --------------------------------------------------\n // calculate reserved Keys defined in dimensions as styling keys\n // there is no need to calculate this each time - keys are based on\n // dimensions definitions\n // --------------------------------------------------\n const RESERVED_STYLING_PROPS_KEYS = useMemo(\n () => Object.keys(reservedPropNames),\n []\n )\n\n // --------------------------------------------------\n // get final props which are (latest has the highest priority):\n // (1) merged styling from context,\n // (2) `attrs` chaining method, and from\n // (3) passing them directly to component\n // --------------------------------------------------\n const { pseudo = {}, ...mergeProps }: Record<string, unknown> = {\n ...(options.consumer\n ? options.consumer((callback) => callback(rocketstyleCtx))\n : {}),\n ...props,\n }\n\n // --------------------------------------------------\n // rocketstate\n // calculate final component state including pseudo state\n // passed as $rocketstate prop\n // --------------------------------------------------\n const rocketstate: Record<string, unknown> = _calculateStylingAttrs({\n props: pickStyledProps(mergeProps, reservedPropNames),\n dimensions,\n })\n\n // --------------------------------------------------\n // pseudo state\n // calculate final component pseudo state including pseudo state\n // from props and override by pseudo props from context\n // --------------------------------------------------\n const finalPseudo = {\n ...pick(props, PSEUDO_KEYS),\n ...pseudo,\n }\n\n const finalRocketstate = { ...rocketstate, pseudo: finalPseudo }\n\n // --------------------------------------------------\n // rocketstyle\n // calculated (based on styling props) final theme which will be passed\n // to our styled component\n // passed as $rocketstyle prop\n // --------------------------------------------------\n const rocketstyle = calculateTheme({\n rocketstate,\n themes,\n baseTheme,\n })\n\n // --------------------------------------------------\n // final props\n // final props passed to WrappedComponent\n // excluding: styling props\n // including: $rocketstyle, $rocketstate\n // --------------------------------------------------\n const finalProps = {\n // this removes styling state from props and passes its state\n // under rocketstate key only\n ...omit(mergeProps, [...RESERVED_STYLING_PROPS_KEYS, ...PSEUDO_KEYS]),\n // if enforced to pass styling props, we pass them directly\n ...(options.passProps ? pick(mergeProps, options.passProps) : {}),\n ref: ref || $rocketstyleRef ? internalRef : undefined,\n // state props passed to styled component only, therefore the `$` symbol\n $rocketstyle: rocketstyle,\n $rocketstate: finalRocketstate,\n }\n\n // all the development stuff injected\n if (process.env.NODE_ENV !== 'production') {\n finalProps['data-rocketstyle'] = componentName\n }\n\n return <RenderComponent {...finalProps} />\n }\n )\n\n // ------------------------------------------------------\n // This will hoist and generate dynamically next static methods\n // for all dimensions available in configuration\n // ------------------------------------------------------\n const RocketComponent = compose(...hocsFuncs)(EnhancedComponent)\n RocketComponent.IS_ROCKETSTYLE = true\n RocketComponent.displayName = componentName\n\n hoistNonReactStatics(RocketComponent, options.component)\n createStaticsEnhancers({\n context: RocketComponent,\n dimensionKeys: [...options.dimensionKeys, ...STATIC_KEYS],\n func: cloneAndEnhance,\n opts: options,\n })\n\n // ------------------------------------------------------\n RocketComponent.IS_ROCKETSTYLE = true\n RocketComponent.displayName = componentName\n // ------------------------------------------------------\n\n RocketComponent.config = (opts = {}) => {\n const result = pick(opts, CONFIG_KEYS)\n\n return cloneAndEnhance(result as any, options) as any\n }\n\n RocketComponent.getStaticDimensions = (theme) => {\n const themes = useTheme({ theme, options, cb: themeModeCb })\n\n return {\n dimensions: themes.dimensions,\n useBooleans: options.useBooleans,\n multiKeys: options.multiKeys,\n }\n }\n\n RocketComponent.getDefaultAttrs = (props, theme, mode) => {\n const result = calculateChainOptions(options.attrs)([\n props,\n theme,\n {\n renderContent,\n mode,\n isDark: mode === 'light',\n isLight: mode === 'dark',\n },\n ])\n\n return result\n }\n\n return RocketComponent as RocketComponent\n}\n\nexport default styleComponent\n","const DEFAULT_DIMENSIONS = {\n states: 'state',\n sizes: 'size',\n variants: 'variant',\n multiple: {\n propName: 'multiple',\n multi: true,\n },\n} as const\n\nexport default DEFAULT_DIMENSIONS\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { isEmpty } from '@vitus-labs/core'\nimport styleComponent from './rocketstyle'\nimport {\n getKeys,\n getMultipleDimensions,\n getDimensionsValues,\n} from '~/utils/dimensions'\nimport { ALL_RESERVED_KEYS } from '~/constants/reservedKeys'\nimport defaultDimensions from '~/constants/defaultDimensions'\n\nimport type { ElementType } from '~/types/utils'\nimport type { Dimensions, DefaultDimensions } from '~/types/dimensions'\nimport type { StyleComponent } from '~/types/styleComponent'\n\nexport type Rocketstyle = <T = any, CT = any>() => <\n D extends Dimensions = DefaultDimensions,\n UB extends boolean = true\n>({\n dimensions,\n useBooleans,\n}?: {\n dimensions?: D\n useBooleans?: UB\n}) => <C extends ElementType>({\n name,\n component,\n}: {\n name: string\n component: C\n}) => ReturnType<StyleComponent<C, T, CT, D, UB>>\n\nconst rocketstyle: Rocketstyle =\n () =>\n ({ dimensions = defaultDimensions, useBooleans = true } = {}) =>\n ({ name, component }) => {\n // --------------------------------------------------------\n // handle ERRORS in development mode\n // --------------------------------------------------------\n if (process.env.NODE_ENV !== 'production') {\n type Errors = Partial<{\n component: string\n name: string\n dimensions: string\n invalidDimensions: string\n }>\n\n const errors: Errors = {}\n if (!component) {\n errors.component = 'Parameter `component` is missing in params!'\n }\n\n if (!name) {\n errors.name = 'Parameter `name` is missing in params!'\n }\n\n if (isEmpty(dimensions)) {\n errors.dimensions = 'Parameter `dimensions` is missing in params!'\n } else {\n const definedDimensions = getKeys(dimensions)\n const invalidDimension = ALL_RESERVED_KEYS.some((item) =>\n definedDimensions.includes(item as any)\n )\n\n if (invalidDimension) {\n errors.invalidDimensions = `Some of your \\`dimensions\\` is invalid and uses reserved static keys which are\n ${defaultDimensions.toString()}`\n }\n }\n\n if (!isEmpty(errors)) {\n throw Error(JSON.stringify(errors))\n }\n }\n\n return styleComponent({\n name,\n component,\n useBooleans,\n dimensions,\n dimensionKeys: getKeys(dimensions),\n dimensionValues: getDimensionsValues(dimensions),\n multiKeys: getMultipleDimensions(dimensions),\n })\n }\n\nexport default rocketstyle\n","/* eslint-disable @typescript-eslint/no-explicit-any */\ntype IsRocketComponent = (component: any) => boolean\n\nconst isRocketComponent: IsRocketComponent = (component) => {\n if (\n typeof component === 'object' &&\n component !== null &&\n component.IS_ROCKETSTYLE\n ) {\n return true\n }\n\n return false\n}\n\nexport default isRocketComponent\n"],"names":["useState","get","isEmpty","set","calculateChainOptions","config","merge","CoreProvider","useContext","context","React","forwardRef","renderContent","createContext","LocalContext","createProvider","rocketstyleAttrsHoc","useRef","useImperativeHandle","useMemo","pick","omit","compose","hoistNonReactStatics","defaultDimensions"],"mappings":";;;;;;;;;;;;;AAc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7B,SAAS,KAAK,IAAI;QAClB,SAAS,CAAC,cAAc,EACxB;QACA,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,KAAK,CAAA;AACd;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@vitus-labs/core'), require('react'), require('hoist-non-react-statics')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', '@vitus-labs/core', 'react', 'hoist-non-react-statics'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.vitusLabsRocketstyle = {}, global.core, global.React, global.hoistNonReactStatics));
|
|
5
|
-
}(this, (function (exports, core, React, hoistNonReactStatics) { 'use strict';
|
|
5
|
+
})(this, (function (exports, core, React, hoistNonReactStatics) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -224,11 +224,11 @@
|
|
|
224
224
|
const isDark = ctxMode === 'dark';
|
|
225
225
|
const inversedTheme = isDark ? 'light' : 'dark';
|
|
226
226
|
if (!InnerProvider)
|
|
227
|
-
return React__default[
|
|
228
|
-
return (React__default[
|
|
227
|
+
return React__default["default"].createElement(React__default["default"].Fragment, null, children);
|
|
228
|
+
return (React__default["default"].createElement(InnerProvider, { mode: inversedTheme, isDark: isDark, isLight: !isDark, ...ctx }, children));
|
|
229
229
|
}
|
|
230
230
|
const isDark = mode === 'dark';
|
|
231
|
-
return (React__default[
|
|
231
|
+
return (React__default["default"].createElement(RocketstyleProvider, { mode: mode, isDark: isDark, isLight: !isDark, theme: theme, provider: RocketstyleProvider }, children));
|
|
232
232
|
};
|
|
233
233
|
|
|
234
234
|
const PSEUDO_KEYS = ['hover', 'active', 'focus', 'pressed'];
|
|
@@ -356,7 +356,7 @@
|
|
|
356
356
|
isLight,
|
|
357
357
|
},
|
|
358
358
|
]);
|
|
359
|
-
return (React__default[
|
|
359
|
+
return (React__default["default"].createElement(WrappedComponent, { "$rocketstyleRef": ref, ...calculatedAttrs, ...props }));
|
|
360
360
|
});
|
|
361
361
|
return Enhanced;
|
|
362
362
|
};
|
|
@@ -378,8 +378,8 @@
|
|
|
378
378
|
...$rocketstate,
|
|
379
379
|
pseudo: { ...$rocketstate.pseudo, ...pseudo.state },
|
|
380
380
|
};
|
|
381
|
-
return (React__default[
|
|
382
|
-
React__default[
|
|
381
|
+
return (React__default["default"].createElement(localContext.Provider, { value: updatedState },
|
|
382
|
+
React__default["default"].createElement(WrappedComponent, { ...props, ...pseudo.events, ref: ref, "$rocketstate": updatedState })));
|
|
383
383
|
});
|
|
384
384
|
|
|
385
385
|
const calculateStyles = (styles, css) => {
|
|
@@ -554,7 +554,7 @@
|
|
|
554
554
|
if (process.env.NODE_ENV !== 'production') {
|
|
555
555
|
finalProps['data-rocketstyle'] = componentName;
|
|
556
556
|
}
|
|
557
|
-
return React__default[
|
|
557
|
+
return React__default["default"].createElement(RenderComponent, { ...finalProps });
|
|
558
558
|
});
|
|
559
559
|
// ------------------------------------------------------
|
|
560
560
|
// This will hoist and generate dynamically next static methods
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
const RocketComponent = core.compose(...hocsFuncs)(EnhancedComponent);
|
|
564
564
|
RocketComponent.IS_ROCKETSTYLE = true;
|
|
565
565
|
RocketComponent.displayName = componentName;
|
|
566
|
-
hoistNonReactStatics__default[
|
|
566
|
+
hoistNonReactStatics__default["default"](RocketComponent, options.component);
|
|
567
567
|
createStaticsEnhancers({
|
|
568
568
|
context: RocketComponent,
|
|
569
569
|
dimensionKeys: [...options.dimensionKeys, ...STATIC_KEYS],
|
|
@@ -662,15 +662,13 @@
|
|
|
662
662
|
|
|
663
663
|
Object.defineProperty(exports, 'context', {
|
|
664
664
|
enumerable: true,
|
|
665
|
-
get: function () {
|
|
666
|
-
return core.context;
|
|
667
|
-
}
|
|
665
|
+
get: function () { return core.context; }
|
|
668
666
|
});
|
|
669
667
|
exports.Provider = Provider;
|
|
670
|
-
exports[
|
|
668
|
+
exports["default"] = rocketstyle;
|
|
671
669
|
exports.isRocketComponent = isRocketComponent;
|
|
672
670
|
|
|
673
671
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
674
672
|
|
|
675
|
-
}))
|
|
673
|
+
}));
|
|
676
674
|
//# sourceMappingURL=vitus-labs-rocketstyle.umd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitus-labs-rocketstyle.umd.js","sources":["../src/hooks/usePseudoState.tsx","../src/utils/collection.ts","../src/utils/dimensions.ts","../src/utils/theme.ts","../src/hooks/useTheme.tsx","../src/context.tsx","../src/constants/reservedKeys.ts","../src/hooks/useThemeOptions.tsx","../src/utils/attrs.ts","../src/internal/rocketstyleAttrsHoc.tsx","../src/internal/localContext.tsx","../src/internal/createProvider.tsx","../src/utils/styles.ts","../src/rocketstyle.tsx","../src/constants/defaultDimensions.ts","../src/init.ts","../src/isRocketComponent.ts"],"sourcesContent":["import { useState } from 'react'\nimport type { PseudoActions, PseudoState } from '~/types/pseudo'\n\ntype State = Omit<PseudoState, 'active'>\n\ntype UsePseudoState = ({\n onMouseEnter,\n onMouseLeave,\n onMouseDown,\n onMouseUp,\n onFocus,\n onBlur,\n}: Partial<PseudoActions>) => { state: State; events: PseudoActions }\n\nconst handleEvent = (e: Event) => {\n e.preventDefault()\n e.stopPropagation()\n}\n\nconst usePseudoState: UsePseudoState = (props) => {\n const [hover, setHover] = useState(false)\n const [focus, setFocus] = useState(false)\n const [pressed, setPressed] = useState(false)\n\n const onMouseEnter = (e: MouseEvent) => {\n handleEvent(e)\n setHover(true)\n if (props.onMouseEnter) props.onMouseEnter(e)\n }\n\n const onMouseLeave = (e: MouseEvent) => {\n handleEvent(e)\n setHover(false)\n setPressed(false)\n if (props.onMouseLeave) props.onMouseLeave(e)\n }\n\n const onMouseDown = (e: MouseEvent) => {\n handleEvent(e)\n setPressed(true)\n if (props.onMouseDown) props.onMouseDown(e)\n }\n\n const onMouseUp = (e: MouseEvent) => {\n handleEvent(e)\n setPressed(false)\n if (props.onMouseUp) props.onMouseUp(e)\n }\n\n const onFocus = (e: FocusEvent) => {\n handleEvent(e)\n setFocus(true)\n if (props.onFocus) props.onFocus(e)\n }\n\n const onBlur = (e: FocusEvent) => {\n handleEvent(e)\n setFocus(false)\n if (props.onBlur) props.onBlur(e)\n }\n\n return {\n state: {\n hover,\n focus,\n pressed,\n },\n events: {\n onMouseEnter,\n onMouseLeave,\n onMouseDown,\n onMouseUp,\n onFocus,\n onBlur,\n },\n }\n}\n\nexport default usePseudoState\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable import/prefer-default-export */\n\n// --------------------------------------------------------\n// chain options\n// --------------------------------------------------------\ntype ChanOptions = (\n opts: Record<string, unknown> | ((...args: any) => Record<string, unknown>),\n defaultOpts: any[]\n) => any[]\n\nexport const chainOptions: ChanOptions = (opts, defaultOpts = []) => {\n const result = [...defaultOpts]\n\n if (typeof opts === 'function') result.push(opts)\n else if (typeof opts === 'object') result.push(() => opts)\n\n return result\n}\n\n// --------------------------------------------------------\n// remove empty values\n// --------------------------------------------------------\ntype RemoveNullableValues = (obj: Record<string, any>) => Record<string, any>\nexport const removeNullableValues: RemoveNullableValues = (obj) =>\n Object.entries(obj)\n .filter(([, v]) => v != null && v !== false)\n .reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {})\n\n// --------------------------------------------------------\n// remove empty values recursively\n// --------------------------------------------------------\ntype RemoveAllEmptyValues = (obj: Record<string, any>) => Record<string, any>\nexport const removeAllEmptyValues: RemoveAllEmptyValues = (obj) =>\n Object.entries(obj)\n .filter(([, v]) => v != null)\n .reduce(\n (acc, [k, v]) => ({\n ...acc,\n [k]: typeof v === 'object' ? removeAllEmptyValues(v) : v,\n }),\n {}\n )\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { get, isEmpty, set } from '@vitus-labs/core'\nimport { Dimensions, DimensionValue, MultiKeys } from '~/types/dimensions'\n\n// --------------------------------------------------------\n// is value milti key\n// --------------------------------------------------------\ntype IsValidKey = (value: any) => boolean\nexport const isValidKey: IsValidKey = (value) =>\n value !== undefined && value !== null && value !== false\n\n// --------------------------------------------------------\n// is value milti key\n// --------------------------------------------------------\ntype IsMultiKey = (value: any) => [boolean, string]\nexport const isMultiKey: IsMultiKey = (value) => {\n if (typeof value === 'object') return [true, get(value, 'propName')]\n return [false, value]\n}\n\n// --------------------------------------------------------\n// calculate dimensions map\n// --------------------------------------------------------\ntype CalculateDimensionsMap = ({\n themes,\n useBooleans,\n}: {\n themes: Record<string, any>\n useBooleans: boolean\n}) => { keysMap: Record<string, any>; keywords: Record<string, any> }\n\nexport const calculateDimensionsMap: CalculateDimensionsMap = ({\n themes,\n useBooleans,\n}) => {\n const result = { keysMap: {}, keywords: {} }\n if (isEmpty(themes)) return result\n\n return Object.entries(themes).reduce((accumulator, [key, value]) => {\n const { keysMap, keywords } = accumulator\n keywords[key] = true\n\n Object.entries(value as any).forEach(([itemKey, itemValue]) => {\n if (!isValidKey(itemValue)) return\n\n if (useBooleans) {\n keywords[itemKey] = true\n }\n\n set(keysMap, [key, itemKey], true)\n })\n\n return accumulator\n }, result)\n}\n\n// --------------------------------------------------------\n// simple object getters\n// --------------------------------------------------------\ntype GetKeys = <T extends Record<string, unknown>>(obj: T) => Array<keyof T>\nexport const getKeys: GetKeys = (obj) => Object.keys(obj)\n\ntype GetValues = <T extends Record<string, unknown>, K extends keyof T>(\n obj: T\n) => T[K][]\nexport const getValues: GetValues = (obj) => Object.values(obj) as any\n\n// --------------------------------------------------------\n// get dimensions values array\n// --------------------------------------------------------\ntype ValueType<T> = T extends string ? T : Array<T>[0]\ntype GetDimensionsValues = <T extends Dimensions, K extends keyof T>(\n obj: T\n) => ValueType<T[K]>[]\n\nexport const getDimensionsValues: GetDimensionsValues = (obj) =>\n getValues(obj).map((item: DimensionValue) => {\n if (typeof item === 'object') {\n return item.propName as any\n }\n\n return item\n })\n\n// --------------------------------------------------------\n// get multiple dimensions map\n// --------------------------------------------------------\ntype GetMultipleDimensions = <T extends Dimensions>(obj: T) => MultiKeys<T>\n\nexport const getMultipleDimensions: GetMultipleDimensions = (obj) =>\n getValues(obj).reduce((accumulator, value: DimensionValue) => {\n if (typeof value === 'object') {\n // eslint-disable-next-line no-param-reassign\n if (value.multi === true) accumulator[value.propName] = true\n }\n\n return accumulator\n }, {})\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { config, isEmpty, merge } from '@vitus-labs/core'\nimport { removeAllEmptyValues, removeNullableValues } from './collection'\nimport { isMultiKey } from './dimensions'\nimport { ThemeMode } from '~/types/theme'\n\n// --------------------------------------------------------\n// theme mode callback\n// --------------------------------------------------------\nexport const themeModeCb: ThemeMode =\n (...params) =>\n (mode) => {\n if (!mode || mode === 'light') return params[0]\n return params[1]\n }\n\n// --------------------------------------------------------\n// calculate dimension themes\n// --------------------------------------------------------\ntype CalculateDimensionThemes = (\n theme: Record<string, any>,\n options: Record<string, any>,\n cb: any\n) => Record<string, any>\n\nexport const calculateDimensionThemes: CalculateDimensionThemes = (\n theme,\n options,\n cb\n) => {\n const result = {}\n\n if (isEmpty(options.dimensions)) return result\n\n return Object.entries(options.dimensions).reduce(\n (accumulator, [key, value]) => {\n const [, dimension] = isMultiKey(value)\n\n const helper = options[key]\n\n if (Array.isArray(helper) && helper.length > 0) {\n const finalDimensionThemes = calculateChainOptions(helper, [\n theme,\n cb,\n config.css,\n ])\n\n // eslint-disable-next-line no-param-reassign\n accumulator[dimension] = removeNullableValues(finalDimensionThemes)\n }\n\n return accumulator\n },\n result\n )\n}\n\n// --------------------------------------------------------\n// combine values\n// --------------------------------------------------------\ntype OptionFunc<A> = (...arg: Array<A>) => Record<string, unknown>\ntype CalculateChainOptions = <A>(\n options: Array<OptionFunc<A>> | undefined | null,\n args: Array<A>\n) => ReturnType<OptionFunc<A>>\n\nexport const calculateChainOptions: CalculateChainOptions = (options, args) => {\n const result = {}\n if (isEmpty(options)) return result\n\n const helper = options.reduce(\n (acc, item) => merge(acc, item(...args)),\n result\n )\n\n return removeAllEmptyValues(helper)\n}\n\n// --------------------------------------------------------\n// generate theme\n// --------------------------------------------------------\nexport type CalculateTheme = <\n P extends Record<string, unknown>,\n T extends Record<string, unknown>,\n B extends Record<string, unknown>\n>({\n rocketstate,\n themes,\n baseTheme,\n}: {\n rocketstate: P\n themes: T\n baseTheme: B\n}) => B & Record<string, unknown>\n\nexport const calculateTheme: CalculateTheme = ({\n rocketstate,\n themes,\n baseTheme,\n}) => {\n // generate final theme which will be passed to styled component\n let finalTheme = { ...baseTheme }\n\n Object.entries(rocketstate).forEach(\n ([key, value]: [string, string | Array<string>]) => {\n const keyTheme = themes[key]\n\n if (Array.isArray(value)) {\n value.forEach((item) => {\n finalTheme = merge(finalTheme, keyTheme[item])\n })\n } else {\n finalTheme = merge(finalTheme, keyTheme[value])\n }\n }\n )\n\n return finalTheme\n}\n\n// --------------------------------------------------------\n// generate theme\n// --------------------------------------------------------\nexport type CalculateThemeMode = (\n themes: Record<string, any>,\n variant: 'light' | 'dark'\n) => Partial<{\n baseTheme: Record<string, unknown>\n themes: Record<string, unknown>\n}>\n\nexport const calculateThemeMode: CalculateThemeMode = (themes, variant) => {\n const callback = themeModeCb().toString()\n\n const result = {}\n Object.entries(themes).forEach(([key, value]) => {\n if (typeof value === 'object') {\n result[key] = calculateThemeMode(value, variant)\n } else if (typeof value === 'function' && value.toString() === callback) {\n result[key] = value(variant)\n } else {\n result[key] = value\n }\n })\n\n return result\n}\n","import { config } from '@vitus-labs/core'\nimport { calculateChainOptions, calculateDimensionThemes } from '~/utils/theme'\nimport { calculateDimensionsMap } from '~/utils/dimensions'\nimport type { Configuration, __ROCKETSTYLE__ } from '~/types/configuration'\nimport type { ThemeMode } from '~/types/theme'\n\ntype UseTheme = <T extends Record<string, unknown>>({\n theme,\n options,\n cb,\n}: {\n theme: T\n options: Configuration\n cb: ThemeMode\n}) => __ROCKETSTYLE__\n\nconst useTheme: UseTheme = ({ theme, options, cb }) => {\n const themes = calculateDimensionThemes(theme, options, cb)\n const { keysMap, keywords } = calculateDimensionsMap({\n themes,\n useBooleans: options.useBooleans,\n })\n\n // eslint-disable-next-line no-underscore-dangle\n const __ROCKETSTYLE__ = {\n dimensions: keysMap,\n reservedPropNames: keywords,\n baseTheme: calculateChainOptions(options.theme, [theme, cb, config.css]),\n themes,\n }\n\n return __ROCKETSTYLE__\n}\n\nexport default useTheme\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { ReactNode, FC, useContext, ComponentType } from 'react'\nimport { Provider as CoreProvider, context } from '@vitus-labs/core'\n\ntype Theme = {\n rootSize: number\n breakpoints?: Record<string, number>\n __VITUS_LABS__?: never\n} & Record<string, unknown>\n\nexport type TProvider = {\n children: ReactNode\n theme?: Theme\n mode?: 'light' | 'dark'\n inversed?: boolean\n provider?: ComponentType<any>\n}\n\nconst Provider: FC<TProvider> = ({\n theme,\n mode,\n children,\n inversed,\n provider: RocketstyleProvider = CoreProvider,\n}) => {\n if (inversed) {\n const {\n provider: InnerProvider,\n mode: ctxMode,\n ...ctx\n } = useContext<TProvider>(context as any)\n\n const isDark = ctxMode === 'dark'\n const inversedTheme = isDark ? 'light' : 'dark'\n\n if (!InnerProvider) return <>{children}</>\n\n return (\n <InnerProvider\n mode={inversedTheme}\n isDark={isDark}\n isLight={!isDark}\n {...ctx}\n >\n {children}\n </InnerProvider>\n )\n }\n\n const isDark = mode === 'dark'\n\n return (\n <RocketstyleProvider\n mode={mode}\n isDark={isDark}\n isLight={!isDark}\n theme={theme}\n provider={RocketstyleProvider}\n >\n {children}\n </RocketstyleProvider>\n )\n}\n\nexport { context }\n\nexport default Provider\n","export const PSEUDO_KEYS = ['hover', 'active', 'focus', 'pressed'] as const\n\nexport const THEME_MODES = {\n light: true,\n dark: true,\n} as const\n\nexport const THEME_MODES_INVERSED = {\n dark: 'light',\n light: 'dark',\n} as const\n\nexport const CONFIG_KEYS = [\n 'provider',\n 'consumer',\n 'DEBUG',\n 'name',\n 'component',\n 'inversed',\n 'passProps',\n 'styled',\n] as const\n\nexport const STYLING_KEYS = ['theme', 'attrs', 'styles'] as const\nexport const STATIC_KEYS = [...STYLING_KEYS, 'compose'] as const\n\nexport const ALL_RESERVED_KEYS = [\n ...Object.keys(THEME_MODES),\n ...CONFIG_KEYS,\n ...STATIC_KEYS,\n] as const\n","import { useContext } from 'react'\nimport { context } from '~/context'\nimport { THEME_MODES_INVERSED } from '~/constants/reservedKeys'\nimport { ThemeModeKeys } from '~/types/theme'\n\ntype UseThemeOptions = ({ inversed }: { inversed?: boolean }) => {\n theme: Record<string, unknown>\n mode: ThemeModeKeys\n isDark: boolean\n isLight: boolean\n}\n\nconst useThemeOptions: UseThemeOptions = ({ inversed }) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const { theme, mode: ctxMode, isDark: ctxDark } = useContext(context) as any\n const mode = inversed ? THEME_MODES_INVERSED[ctxMode] : ctxMode\n const isDark = inversed ? !ctxDark : ctxDark\n const isLight = !isDark\n\n return { theme, mode, isDark, isLight }\n}\n\nexport default useThemeOptions\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isEmpty } from '@vitus-labs/core'\nimport { MultiKeys } from '~/types/dimensions'\n\n// --------------------------------------------------------\n// pick styled props\n// --------------------------------------------------------\ntype PickStyledProps = (\n props: Record<string, unknown>,\n keywords: Record<string, true>\n) => Partial<typeof props>\nexport const pickStyledProps: PickStyledProps = (props, keywords) => {\n const result = {} as any\n\n Object.entries(props).forEach(([key, value]) => {\n if (keywords[key]) result[key] = value\n })\n\n return result\n}\n\n// --------------------------------------------------------\n// combine values\n// --------------------------------------------------------\ntype OptionFunc<A> = (...arg: Array<A>) => Record<string, unknown>\ntype CalculateChainOptions = <A>(\n options?: Array<OptionFunc<A>>\n) => (args: Array<A>) => ReturnType<OptionFunc<A>>\n\nexport const calculateChainOptions: CalculateChainOptions =\n (options) => (args) => {\n const result = {}\n if (isEmpty(options)) return result\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return options.reduce(\n (acc, item) => Object.assign(acc, item(...args)),\n result\n )\n }\n\n// --------------------------------------------------------\n// get style attributes\n// --------------------------------------------------------\ntype CalculateStylingAttrs = ({\n useBooleans,\n multiKeys,\n}: {\n useBooleans?: boolean\n multiKeys?: MultiKeys\n}) => ({\n props,\n dimensions,\n}: {\n props: Record<string, unknown>\n dimensions: Record<string, unknown>\n}) => any\nexport const calculateStylingAttrs: CalculateStylingAttrs =\n ({ useBooleans, multiKeys }) =>\n ({ props, dimensions }) => {\n const result = {}\n\n // (1) find dimension keys values & initialize\n // object with possible options\n Object.keys(dimensions).forEach((item) => {\n const pickedProp = props[item]\n const valueTypes = ['number', 'string']\n\n // if the property is mutli key, allow assign array as well\n if (multiKeys && multiKeys[item] && Array.isArray(pickedProp)) {\n result[item] = pickedProp\n }\n // assign when it's only a string or number otherwise it's considered\n // as invalid param\n else if (valueTypes.includes(typeof pickedProp)) {\n result[item] = pickedProp\n } else {\n result[item] = undefined\n }\n })\n\n // (2) if booleans are being used let's find the rest\n if (useBooleans) {\n const propsKeys = Object.keys(props).reverse()\n\n Object.entries(result).forEach(([key, value]) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const isMultiKey = multiKeys[key]\n\n // when value in result is not assigned yet\n if (!value) {\n let newDimensionValue\n const keywords = Object.keys(dimensions[key] as any)\n\n if (isMultiKey) {\n newDimensionValue = propsKeys.filter((key) =>\n keywords.includes(key)\n )\n } else {\n // reverse props to guarantee the last one will have\n // a priority over previous ones\n newDimensionValue = propsKeys.find((key) => {\n if (keywords.includes(key) && props[key]) return key\n return false\n })\n }\n\n result[key] = newDimensionValue\n }\n })\n }\n\n return result\n }\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable no-underscore-dangle */\nimport React, {\n forwardRef,\n ForwardRefExoticComponent,\n ComponentType,\n} from 'react'\nimport { renderContent } from '@vitus-labs/core'\nimport { calculateChainOptions } from '~/utils/attrs'\nimport { useThemeOptions } from '~/hooks'\n\nimport type { OptionFunc } from '~/types/configuration'\n\nexport type RocketStyleHOC = ({\n inversed,\n attrs,\n}: {\n inversed?: boolean\n attrs?: Array<OptionFunc>\n}) => (WrappedComponent: ComponentType) => ForwardRefExoticComponent<any>\n\nconst rocketStyleHOC: RocketStyleHOC = ({ inversed, attrs }) => {\n // --------------------------------------------------\n // .attrs(...)\n // first we need to calculate final props which are\n // being returned by using `attr` chaining method\n // --------------------------------------------------\n const _calculateChainOptions = calculateChainOptions(attrs)\n\n const Enhanced = (WrappedComponent) =>\n forwardRef<any, any>((props, ref) => {\n const { theme, mode, isDark, isLight } = useThemeOptions({\n inversed,\n })\n\n const calculatedAttrs = _calculateChainOptions([\n props,\n theme,\n {\n renderContent,\n mode,\n isDark,\n isLight,\n },\n ])\n\n return (\n <WrappedComponent\n $rocketstyleRef={ref}\n {...calculatedAttrs}\n {...props}\n />\n )\n })\n\n return Enhanced\n}\n\nexport default rocketStyleHOC\n","import { createContext } from 'react'\nimport type { PseudoState } from '~/types/pseudo'\n\ntype TContext = Partial<\n {\n pseudo: PseudoState\n } & Record<string, unknown>\n>\n\nexport default createContext<TContext>({})\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { forwardRef } from 'react'\nimport { usePseudoState } from '~/hooks'\nimport LocalContext from './localContext'\n\nconst RocketStyleProviderComponent = (WrappedComponent) =>\n forwardRef<any, any>(\n (\n {\n onMouseEnter,\n onMouseLeave,\n onMouseUp,\n onMouseDown,\n onFocus,\n onBlur,\n $rocketstate,\n ...props\n },\n ref\n ) => {\n // pseudo hook to detect states hover / pressed / focus\n const pseudo = usePseudoState({\n onMouseEnter,\n onMouseLeave,\n onMouseUp,\n onMouseDown,\n onFocus,\n onBlur,\n })\n\n const updatedState = {\n ...$rocketstate,\n pseudo: { ...$rocketstate.pseudo, ...pseudo.state },\n }\n\n return (\n <LocalContext.Provider value={updatedState}>\n <WrappedComponent\n {...props}\n {...pseudo.events}\n ref={ref}\n $rocketstate={updatedState}\n />\n </LocalContext.Provider>\n )\n }\n )\n\nexport default RocketStyleProviderComponent\n","/* eslint-disable import/prefer-default-export */\nimport type { StylesCbArray, Css } from '~/types/styles'\n\n// --------------------------------------------------------\n// calculate styles\n// --------------------------------------------------------\ntype CalculateStyles = <S extends StylesCbArray | undefined, C extends Css>(\n styles: S,\n css: C\n) => Array<ReturnType<StylesCbArray[number]>>\n\nexport const calculateStyles: CalculateStyles = (styles, css) => {\n if (!styles) return []\n\n return styles.map((item) => item(css))\n}\n","/* eslint-disable no-underscore-dangle */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\n\nimport React, {\n useMemo,\n forwardRef,\n useContext,\n useImperativeHandle,\n useRef,\n} from 'react'\nimport hoistNonReactStatics from 'hoist-non-react-statics'\nimport { config, omit, pick, compose, renderContent } from '@vitus-labs/core'\nimport { useTheme, useThemeOptions } from '~/hooks'\nimport { localContext, createProvider, rocketstyleAttrsHoc } from '~/internal'\nimport { calculateTheme, calculateThemeMode, themeModeCb } from '~/utils/theme'\nimport { calculateStyles } from '~/utils/styles'\nimport { chainOptions } from '~/utils/collection'\nimport {\n pickStyledProps,\n calculateStylingAttrs,\n calculateChainOptions,\n} from '~/utils/attrs'\nimport {\n PSEUDO_KEYS,\n CONFIG_KEYS,\n STYLING_KEYS,\n STATIC_KEYS,\n} from '~/constants/reservedKeys'\n\nimport type { RocketComponent } from '~/types/rocketstyle'\nimport type { Configuration } from '~/types/configuration'\nimport type { StyleComponent } from '~/types/styleComponent'\n\n// --------------------------------------------------------\n// styledComponent helpers for chaining attributes\n// --------------------------------------------------------\ntype OrOptions = (\n keys: Readonly<Array<string>>,\n opts: Record<string, unknown>,\n defaultOpts: Record<string, unknown>\n) => Record<string, unknown>\n\nconst orOptions: OrOptions = (keys, opts, defaultOpts) =>\n keys.reduce(\n (acc, item) => ({ ...acc, [item]: opts[item] || defaultOpts[item] }),\n {}\n )\n\nconst chainReservedOptions = (keys, opts, defaultOpts) =>\n keys.reduce(\n (acc, item) => ({\n ...acc,\n [item]: chainOptions(opts[item], defaultOpts[item]),\n }),\n {}\n )\n\n// --------------------------------------------------------\n// helpers for create statics on class\n// --------------------------------------------------------\nconst createStaticsEnhancers = ({ context, dimensionKeys, func, opts }) => {\n dimensionKeys.forEach((item) => {\n // eslint-disable-next-line no-param-reassign\n context[item] = (props) => func({ [item]: props }, opts)\n })\n}\n\n// --------------------------------------------------------\n// cloneAndEnhance\n// helper function which allows function chaining\n// always returns styleComponent with static functions\n// assigned\n// --------------------------------------------------------\ntype CloneAndEnhance = <A extends Configuration, B extends Configuration>(\n opts: A,\n defaultOpts: B\n) => ReturnType<typeof styleComponent>\n\nconst cloneAndEnhance: CloneAndEnhance = (opts, defaultOpts) =>\n styleComponent({\n ...defaultOpts,\n compose: { ...defaultOpts.compose, ...opts.compose },\n ...orOptions(CONFIG_KEYS, opts, defaultOpts),\n ...chainReservedOptions(\n [...defaultOpts.dimensionKeys, ...STYLING_KEYS],\n opts,\n defaultOpts\n ),\n })\n\n// --------------------------------------------------------\n// styleComponent\n// helper function which allows function chaining\n// always returns a valid React component with static functions\n// assigned, so it can be even rendered as a valid component\n// or styles can be extended via its statics\n// --------------------------------------------------------\nconst styleComponent: StyleComponent<any> = (options) => {\n const { component, styles } = options\n const { styled } = config\n\n // const _calculateChainOptions = calculateChainOptions(options.attrs)\n const _calculateStylingAttrs = calculateStylingAttrs({\n multiKeys: options.multiKeys,\n useBooleans: options.useBooleans,\n })\n\n const componentName =\n options.name || options.component.displayName || options.component.name\n\n // create styled component with all options.styles if available\n const STYLED_COMPONENT =\n component.IS_ROCKETSTYLE || options.styled === false\n ? component\n : styled(component)`\n ${calculateStyles(styles, config.css)};\n `\n\n // --------------------------------------------------------\n // final component to be rendered\n // --------------------------------------------------------\n const RenderComponent = options.provider\n ? createProvider(STYLED_COMPONENT)\n : STYLED_COMPONENT\n\n // --------------------------------------------------------\n // hocs\n // --------------------------------------------------------\n const calculateHocsFuncs = Object.values(options.compose || {})\n .filter((item) => typeof item === 'function')\n .reverse()\n\n const hocsFuncs = [rocketstyleAttrsHoc(options), ...calculateHocsFuncs]\n\n // --------------------------------------------------------\n // ENHANCED COMPONENT (returned component)\n // --------------------------------------------------------\n // .attrs() chaining option is calculated in HOC and passed as props already\n const EnhancedComponent: RocketComponent = forwardRef(\n (\n {\n $rocketstyleRef, // it's forwarded from HOC which is always on top of hocs\n ...props\n },\n ref\n ) => {\n // --------------------------------------------------\n // handle refs\n // (1) one is passed from inner HOC - $rocketstyleRef\n // (2) second one is used to be used directly (e.g. inside hocs)\n // --------------------------------------------------\n const internalRef = useRef(null)\n\n if ($rocketstyleRef)\n useImperativeHandle($rocketstyleRef, () => internalRef.current, [\n $rocketstyleRef,\n ])\n\n if (ref) useImperativeHandle(ref, () => internalRef.current, [ref])\n\n // --------------------------------------------------\n // hover - focus - pressed state passed via context from parent component\n // --------------------------------------------------\n const rocketstyleCtx = options.consumer ? useContext(localContext) : {}\n\n // --------------------------------------------------\n // general theme and theme mode dark / light passed in context\n // --------------------------------------------------\n const { theme, mode } = useThemeOptions(options)\n\n // --------------------------------------------------\n // calculate themes for all possible styling dimensions\n // .theme(...) + defined dimensions like .states(...), .sizes(...)\n // --------------------------------------------------\n const __ROCKETSTYLE__ = useMemo(\n () =>\n useTheme<typeof theme>({\n theme,\n options,\n cb: themeModeCb,\n }),\n // recalculate this only when theme changes\n [theme]\n )\n\n const {\n reservedPropNames,\n themes: rocketThemes,\n dimensions,\n baseTheme: rocketBaseTheme,\n } = __ROCKETSTYLE__\n\n const { baseTheme, themes } = useMemo(\n () =>\n calculateThemeMode(\n { themes: rocketThemes, baseTheme: rocketBaseTheme },\n mode\n ),\n // recalculate this only when theme mode changes dark / light\n [mode]\n )\n\n // --------------------------------------------------\n // calculate reserved Keys defined in dimensions as styling keys\n // there is no need to calculate this each time - keys are based on\n // dimensions definitions\n // --------------------------------------------------\n const RESERVED_STYLING_PROPS_KEYS = useMemo(\n () => Object.keys(reservedPropNames),\n []\n )\n\n // --------------------------------------------------\n // get final props which are (latest has the highest priority):\n // (1) merged styling from context,\n // (2) `attrs` chaining method, and from\n // (3) passing them directly to component\n // --------------------------------------------------\n const { pseudo = {}, ...mergeProps }: Record<string, unknown> = {\n ...(options.consumer\n ? options.consumer((callback) => callback(rocketstyleCtx))\n : {}),\n ...props,\n }\n\n // --------------------------------------------------\n // rocketstate\n // calculate final component state including pseudo state\n // passed as $rocketstate prop\n // --------------------------------------------------\n const rocketstate: Record<string, unknown> = _calculateStylingAttrs({\n props: pickStyledProps(mergeProps, reservedPropNames),\n dimensions,\n })\n\n // --------------------------------------------------\n // pseudo state\n // calculate final component pseudo state including pseudo state\n // from props and override by pseudo props from context\n // --------------------------------------------------\n const finalPseudo = {\n ...pick(props, PSEUDO_KEYS),\n ...pseudo,\n }\n\n const finalRocketstate = { ...rocketstate, pseudo: finalPseudo }\n\n // --------------------------------------------------\n // rocketstyle\n // calculated (based on styling props) final theme which will be passed\n // to our styled component\n // passed as $rocketstyle prop\n // --------------------------------------------------\n const rocketstyle = calculateTheme({\n rocketstate,\n themes,\n baseTheme,\n })\n\n // --------------------------------------------------\n // final props\n // final props passed to WrappedComponent\n // excluding: styling props\n // including: $rocketstyle, $rocketstate\n // --------------------------------------------------\n const finalProps = {\n // this removes styling state from props and passes its state\n // under rocketstate key only\n ...omit(mergeProps, [...RESERVED_STYLING_PROPS_KEYS, ...PSEUDO_KEYS]),\n // if enforced to pass styling props, we pass them directly\n ...(options.passProps ? pick(mergeProps, options.passProps) : {}),\n ref: ref || $rocketstyleRef ? internalRef : undefined,\n // state props passed to styled component only, therefore the `$` symbol\n $rocketstyle: rocketstyle,\n $rocketstate: finalRocketstate,\n }\n\n // all the development stuff injected\n if (process.env.NODE_ENV !== 'production') {\n finalProps['data-rocketstyle'] = componentName\n }\n\n return <RenderComponent {...finalProps} />\n }\n )\n\n // ------------------------------------------------------\n // This will hoist and generate dynamically next static methods\n // for all dimensions available in configuration\n // ------------------------------------------------------\n const RocketComponent = compose(...hocsFuncs)(EnhancedComponent)\n RocketComponent.IS_ROCKETSTYLE = true\n RocketComponent.displayName = componentName\n\n hoistNonReactStatics(RocketComponent, options.component)\n createStaticsEnhancers({\n context: RocketComponent,\n dimensionKeys: [...options.dimensionKeys, ...STATIC_KEYS],\n func: cloneAndEnhance,\n opts: options,\n })\n\n // ------------------------------------------------------\n RocketComponent.IS_ROCKETSTYLE = true\n RocketComponent.displayName = componentName\n // ------------------------------------------------------\n\n RocketComponent.config = (opts = {}) => {\n const result = pick(opts, CONFIG_KEYS)\n\n return cloneAndEnhance(result as any, options) as any\n }\n\n RocketComponent.getStaticDimensions = (theme) => {\n const themes = useTheme({ theme, options, cb: themeModeCb })\n\n return {\n dimensions: themes.dimensions,\n useBooleans: options.useBooleans,\n multiKeys: options.multiKeys,\n }\n }\n\n RocketComponent.getDefaultAttrs = (props, theme, mode) => {\n const result = calculateChainOptions(options.attrs)([\n props,\n theme,\n {\n renderContent,\n mode,\n isDark: mode === 'light',\n isLight: mode === 'dark',\n },\n ])\n\n return result\n }\n\n return RocketComponent as RocketComponent\n}\n\nexport default styleComponent\n","const DEFAULT_DIMENSIONS = {\n states: 'state',\n sizes: 'size',\n variants: 'variant',\n multiple: {\n propName: 'multiple',\n multi: true,\n },\n} as const\n\nexport default DEFAULT_DIMENSIONS\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { isEmpty } from '@vitus-labs/core'\nimport styleComponent from './rocketstyle'\nimport {\n getKeys,\n getMultipleDimensions,\n getDimensionsValues,\n} from '~/utils/dimensions'\nimport { ALL_RESERVED_KEYS } from '~/constants/reservedKeys'\nimport defaultDimensions from '~/constants/defaultDimensions'\n\nimport type { ElementType } from '~/types/utils'\nimport type { Dimensions, DefaultDimensions } from '~/types/dimensions'\nimport type { StyleComponent } from '~/types/styleComponent'\n\nexport type Rocketstyle = <T = any, CT = any>() => <\n D extends Dimensions = DefaultDimensions,\n UB extends boolean = true\n>({\n dimensions,\n useBooleans,\n}?: {\n dimensions?: D\n useBooleans?: UB\n}) => <C extends ElementType>({\n name,\n component,\n}: {\n name: string\n component: C\n}) => ReturnType<StyleComponent<C, T, CT, D, UB>>\n\nconst rocketstyle: Rocketstyle =\n () =>\n ({ dimensions = defaultDimensions, useBooleans = true } = {}) =>\n ({ name, component }) => {\n // --------------------------------------------------------\n // handle ERRORS in development mode\n // --------------------------------------------------------\n if (process.env.NODE_ENV !== 'production') {\n type Errors = Partial<{\n component: string\n name: string\n dimensions: string\n invalidDimensions: string\n }>\n\n const errors: Errors = {}\n if (!component) {\n errors.component = 'Parameter `component` is missing in params!'\n }\n\n if (!name) {\n errors.name = 'Parameter `name` is missing in params!'\n }\n\n if (isEmpty(dimensions)) {\n errors.dimensions = 'Parameter `dimensions` is missing in params!'\n } else {\n const definedDimensions = getKeys(dimensions)\n const invalidDimension = ALL_RESERVED_KEYS.some((item) =>\n definedDimensions.includes(item as any)\n )\n\n if (invalidDimension) {\n errors.invalidDimensions = `Some of your \\`dimensions\\` is invalid and uses reserved static keys which are\n ${defaultDimensions.toString()}`\n }\n }\n\n if (!isEmpty(errors)) {\n throw Error(JSON.stringify(errors))\n }\n }\n\n return styleComponent({\n name,\n component,\n useBooleans,\n dimensions,\n dimensionKeys: getKeys(dimensions),\n dimensionValues: getDimensionsValues(dimensions),\n multiKeys: getMultipleDimensions(dimensions),\n })\n }\n\nexport default rocketstyle\n","/* eslint-disable @typescript-eslint/no-explicit-any */\ntype IsRocketComponent = (component: any) => boolean\n\nconst isRocketComponent: IsRocketComponent = (component) => {\n if (\n typeof component === 'object' &&\n component !== null &&\n component.IS_ROCKETSTYLE\n ) {\n return true\n }\n\n return false\n}\n\nexport default isRocketComponent\n"],"names":["useState","get","isEmpty","set","calculateChainOptions","config","merge","CoreProvider","useContext","context","React","forwardRef","renderContent","createContext","LocalContext","createProvider","rocketstyleAttrsHoc","useRef","useImperativeHandle","useMemo","pick","omit","compose","hoistNonReactStatics","defaultDimensions"],"mappings":";;;;;;;;;;;EAcA,MAAM,WAAW,GAAG,CAAC,CAAQ;MAC3B,CAAC,CAAC,cAAc,EAAE,CAAA;MAClB,CAAC,CAAC,eAAe,EAAE,CAAA;EACrB,CAAC,CAAA;EAED,MAAM,cAAc,GAAmB,CAAC,KAAK;MAC3C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAGA,cAAQ,CAAC,KAAK,CAAC,CAAA;MACzC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAGA,cAAQ,CAAC,KAAK,CAAC,CAAA;MACzC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAGA,cAAQ,CAAC,KAAK,CAAC,CAAA;MAE7C,MAAM,YAAY,GAAG,CAAC,CAAa;UACjC,WAAW,CAAC,CAAC,CAAC,CAAA;UACd,QAAQ,CAAC,IAAI,CAAC,CAAA;UACd,IAAI,KAAK,CAAC,YAAY;cAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;OAC9C,CAAA;MAED,MAAM,YAAY,GAAG,CAAC,CAAa;UACjC,WAAW,CAAC,CAAC,CAAC,CAAA;UACd,QAAQ,CAAC,KAAK,CAAC,CAAA;UACf,UAAU,CAAC,KAAK,CAAC,CAAA;UACjB,IAAI,KAAK,CAAC,YAAY;cAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;OAC9C,CAAA;MAED,MAAM,WAAW,GAAG,CAAC,CAAa;UAChC,WAAW,CAAC,CAAC,CAAC,CAAA;UACd,UAAU,CAAC,IAAI,CAAC,CAAA;UAChB,IAAI,KAAK,CAAC,WAAW;cAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;O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AAC,UAAU,CAAC;UAClC,eAAe,EAAE,mBAAmB,CAAC,UAAU,CAAC;UAChD,SAAS,EAAE,qBAAqB,CAAC,UAAU,CAAC;OAC7C,CAAC,CAAA;EACJ;;QCnFI,iBAAiB,GAAsB,CAAC,SAAS;MACrD,IACE,OAAO,SAAS,KAAK,QAAQ;UAC7B,SAAS,KAAK,IAAI;UAClB,SAAS,CAAC,cAAc,EACxB;UACA,OAAO,IAAI,CAAA;OACZ;MAED,OAAO,KAAK,CAAA;EACd;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"vitus-labs-rocketstyle.umd.js","sources":["../src/hooks/usePseudoState.tsx","../src/utils/collection.ts","../src/utils/dimensions.ts","../src/utils/theme.ts","../src/hooks/useTheme.tsx","../src/context.tsx","../src/constants/reservedKeys.ts","../src/hooks/useThemeOptions.tsx","../src/utils/attrs.ts","../src/internal/rocketstyleAttrsHoc.tsx","../src/internal/localContext.tsx","../src/internal/createProvider.tsx","../src/utils/styles.ts","../src/rocketstyle.tsx","../src/constants/defaultDimensions.ts","../src/init.ts","../src/isRocketComponent.ts"],"sourcesContent":["import { useState } from 'react'\nimport type { PseudoActions, PseudoState } from '~/types/pseudo'\n\ntype State = Omit<PseudoState, 'active'>\n\ntype UsePseudoState = ({\n onMouseEnter,\n onMouseLeave,\n onMouseDown,\n onMouseUp,\n onFocus,\n onBlur,\n}: Partial<PseudoActions>) => { state: State; events: PseudoActions }\n\nconst handleEvent = (e: Event) => {\n e.preventDefault()\n e.stopPropagation()\n}\n\nconst usePseudoState: UsePseudoState = (props) => {\n const [hover, setHover] = useState(false)\n const [focus, setFocus] = useState(false)\n const [pressed, setPressed] = useState(false)\n\n const onMouseEnter = (e: MouseEvent) => {\n handleEvent(e)\n setHover(true)\n if (props.onMouseEnter) props.onMouseEnter(e)\n }\n\n const onMouseLeave = (e: MouseEvent) => {\n handleEvent(e)\n setHover(false)\n setPressed(false)\n if (props.onMouseLeave) props.onMouseLeave(e)\n }\n\n const onMouseDown = (e: MouseEvent) => {\n handleEvent(e)\n setPressed(true)\n if (props.onMouseDown) props.onMouseDown(e)\n }\n\n const onMouseUp = (e: MouseEvent) => {\n handleEvent(e)\n setPressed(false)\n if (props.onMouseUp) props.onMouseUp(e)\n }\n\n const onFocus = (e: FocusEvent) => {\n handleEvent(e)\n setFocus(true)\n if (props.onFocus) props.onFocus(e)\n }\n\n const onBlur = (e: FocusEvent) => {\n handleEvent(e)\n setFocus(false)\n if (props.onBlur) props.onBlur(e)\n }\n\n return {\n state: {\n hover,\n focus,\n pressed,\n },\n events: {\n onMouseEnter,\n onMouseLeave,\n onMouseDown,\n onMouseUp,\n onFocus,\n onBlur,\n },\n }\n}\n\nexport default usePseudoState\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable import/prefer-default-export */\n\n// --------------------------------------------------------\n// chain options\n// --------------------------------------------------------\ntype ChanOptions = (\n opts: Record<string, unknown> | ((...args: any) => Record<string, unknown>),\n defaultOpts: any[]\n) => any[]\n\nexport const chainOptions: ChanOptions = (opts, defaultOpts = []) => {\n const result = [...defaultOpts]\n\n if (typeof opts === 'function') result.push(opts)\n else if (typeof opts === 'object') result.push(() => opts)\n\n return result\n}\n\n// --------------------------------------------------------\n// remove empty values\n// --------------------------------------------------------\ntype RemoveNullableValues = (obj: Record<string, any>) => Record<string, any>\nexport const removeNullableValues: RemoveNullableValues = (obj) =>\n Object.entries(obj)\n .filter(([, v]) => v != null && v !== false)\n .reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {})\n\n// --------------------------------------------------------\n// remove empty values recursively\n// --------------------------------------------------------\ntype RemoveAllEmptyValues = (obj: Record<string, any>) => Record<string, any>\nexport const removeAllEmptyValues: RemoveAllEmptyValues = (obj) =>\n Object.entries(obj)\n .filter(([, v]) => v != null)\n .reduce(\n (acc, [k, v]) => ({\n ...acc,\n [k]: typeof v === 'object' ? removeAllEmptyValues(v) : v,\n }),\n {}\n )\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { get, isEmpty, set } from '@vitus-labs/core'\nimport { Dimensions, DimensionValue, MultiKeys } from '~/types/dimensions'\n\n// --------------------------------------------------------\n// is value milti key\n// --------------------------------------------------------\ntype IsValidKey = (value: any) => boolean\nexport const isValidKey: IsValidKey = (value) =>\n value !== undefined && value !== null && value !== false\n\n// --------------------------------------------------------\n// is value milti key\n// --------------------------------------------------------\ntype IsMultiKey = (value: any) => [boolean, string]\nexport const isMultiKey: IsMultiKey = (value) => {\n if (typeof value === 'object') return [true, get(value, 'propName')]\n return [false, value]\n}\n\n// --------------------------------------------------------\n// calculate dimensions map\n// --------------------------------------------------------\ntype CalculateDimensionsMap = ({\n themes,\n useBooleans,\n}: {\n themes: Record<string, any>\n useBooleans: boolean\n}) => { keysMap: Record<string, any>; keywords: Record<string, any> }\n\nexport const calculateDimensionsMap: CalculateDimensionsMap = ({\n themes,\n useBooleans,\n}) => {\n const result = { keysMap: {}, keywords: {} }\n if (isEmpty(themes)) return result\n\n return Object.entries(themes).reduce((accumulator, [key, value]) => {\n const { keysMap, keywords } = accumulator\n keywords[key] = true\n\n Object.entries(value as any).forEach(([itemKey, itemValue]) => {\n if (!isValidKey(itemValue)) return\n\n if (useBooleans) {\n keywords[itemKey] = true\n }\n\n set(keysMap, [key, itemKey], true)\n })\n\n return accumulator\n }, result)\n}\n\n// --------------------------------------------------------\n// simple object getters\n// --------------------------------------------------------\ntype GetKeys = <T extends Record<string, unknown>>(obj: T) => Array<keyof T>\nexport const getKeys: GetKeys = (obj) => Object.keys(obj)\n\ntype GetValues = <T extends Record<string, unknown>, K extends keyof T>(\n obj: T\n) => T[K][]\nexport const getValues: GetValues = (obj) => Object.values(obj) as any\n\n// --------------------------------------------------------\n// get dimensions values array\n// --------------------------------------------------------\ntype ValueType<T> = T extends string ? T : Array<T>[0]\ntype GetDimensionsValues = <T extends Dimensions, K extends keyof T>(\n obj: T\n) => ValueType<T[K]>[]\n\nexport const getDimensionsValues: GetDimensionsValues = (obj) =>\n getValues(obj).map((item: DimensionValue) => {\n if (typeof item === 'object') {\n return item.propName as any\n }\n\n return item\n })\n\n// --------------------------------------------------------\n// get multiple dimensions map\n// --------------------------------------------------------\ntype GetMultipleDimensions = <T extends Dimensions>(obj: T) => MultiKeys<T>\n\nexport const getMultipleDimensions: GetMultipleDimensions = (obj) =>\n getValues(obj).reduce((accumulator, value: DimensionValue) => {\n if (typeof value === 'object') {\n // eslint-disable-next-line no-param-reassign\n if (value.multi === true) accumulator[value.propName] = true\n }\n\n return accumulator\n }, {})\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { config, isEmpty, merge } from '@vitus-labs/core'\nimport { removeAllEmptyValues, removeNullableValues } from './collection'\nimport { isMultiKey } from './dimensions'\nimport { ThemeMode } from '~/types/theme'\n\n// --------------------------------------------------------\n// theme mode callback\n// --------------------------------------------------------\nexport const themeModeCb: ThemeMode =\n (...params) =>\n (mode) => {\n if (!mode || mode === 'light') return params[0]\n return params[1]\n }\n\n// --------------------------------------------------------\n// calculate dimension themes\n// --------------------------------------------------------\ntype CalculateDimensionThemes = (\n theme: Record<string, any>,\n options: Record<string, any>,\n cb: any\n) => Record<string, any>\n\nexport const calculateDimensionThemes: CalculateDimensionThemes = (\n theme,\n options,\n cb\n) => {\n const result = {}\n\n if (isEmpty(options.dimensions)) return result\n\n return Object.entries(options.dimensions).reduce(\n (accumulator, [key, value]) => {\n const [, dimension] = isMultiKey(value)\n\n const helper = options[key]\n\n if (Array.isArray(helper) && helper.length > 0) {\n const finalDimensionThemes = calculateChainOptions(helper, [\n theme,\n cb,\n config.css,\n ])\n\n // eslint-disable-next-line no-param-reassign\n accumulator[dimension] = removeNullableValues(finalDimensionThemes)\n }\n\n return accumulator\n },\n result\n )\n}\n\n// --------------------------------------------------------\n// combine values\n// --------------------------------------------------------\ntype OptionFunc<A> = (...arg: Array<A>) => Record<string, unknown>\ntype CalculateChainOptions = <A>(\n options: Array<OptionFunc<A>> | undefined | null,\n args: Array<A>\n) => ReturnType<OptionFunc<A>>\n\nexport const calculateChainOptions: CalculateChainOptions = (options, args) => {\n const result = {}\n if (isEmpty(options)) return result\n\n const helper = options.reduce(\n (acc, item) => merge(acc, item(...args)),\n result\n )\n\n return removeAllEmptyValues(helper)\n}\n\n// --------------------------------------------------------\n// generate theme\n// --------------------------------------------------------\nexport type CalculateTheme = <\n P extends Record<string, unknown>,\n T extends Record<string, unknown>,\n B extends Record<string, unknown>\n>({\n rocketstate,\n themes,\n baseTheme,\n}: {\n rocketstate: P\n themes: T\n baseTheme: B\n}) => B & Record<string, unknown>\n\nexport const calculateTheme: CalculateTheme = ({\n rocketstate,\n themes,\n baseTheme,\n}) => {\n // generate final theme which will be passed to styled component\n let finalTheme = { ...baseTheme }\n\n Object.entries(rocketstate).forEach(\n ([key, value]: [string, string | Array<string>]) => {\n const keyTheme = themes[key]\n\n if (Array.isArray(value)) {\n value.forEach((item) => {\n finalTheme = merge(finalTheme, keyTheme[item])\n })\n } else {\n finalTheme = merge(finalTheme, keyTheme[value])\n }\n }\n )\n\n return finalTheme\n}\n\n// --------------------------------------------------------\n// generate theme\n// --------------------------------------------------------\nexport type CalculateThemeMode = (\n themes: Record<string, any>,\n variant: 'light' | 'dark'\n) => Partial<{\n baseTheme: Record<string, unknown>\n themes: Record<string, unknown>\n}>\n\nexport const calculateThemeMode: CalculateThemeMode = (themes, variant) => {\n const callback = themeModeCb().toString()\n\n const result = {}\n Object.entries(themes).forEach(([key, value]) => {\n if (typeof value === 'object') {\n result[key] = calculateThemeMode(value, variant)\n } else if (typeof value === 'function' && value.toString() === callback) {\n result[key] = value(variant)\n } else {\n result[key] = value\n }\n })\n\n return result\n}\n","import { config } from '@vitus-labs/core'\nimport { calculateChainOptions, calculateDimensionThemes } from '~/utils/theme'\nimport { calculateDimensionsMap } from '~/utils/dimensions'\nimport type { Configuration, __ROCKETSTYLE__ } from '~/types/configuration'\nimport type { ThemeMode } from '~/types/theme'\n\ntype UseTheme = <T extends Record<string, unknown>>({\n theme,\n options,\n cb,\n}: {\n theme: T\n options: Configuration\n cb: ThemeMode\n}) => __ROCKETSTYLE__\n\nconst useTheme: UseTheme = ({ theme, options, cb }) => {\n const themes = calculateDimensionThemes(theme, options, cb)\n const { keysMap, keywords } = calculateDimensionsMap({\n themes,\n useBooleans: options.useBooleans,\n })\n\n // eslint-disable-next-line no-underscore-dangle\n const __ROCKETSTYLE__ = {\n dimensions: keysMap,\n reservedPropNames: keywords,\n baseTheme: calculateChainOptions(options.theme, [theme, cb, config.css]),\n themes,\n }\n\n return __ROCKETSTYLE__\n}\n\nexport default useTheme\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { ReactNode, FC, useContext, ComponentType } from 'react'\nimport { Provider as CoreProvider, context } from '@vitus-labs/core'\n\ntype Theme = {\n rootSize: number\n breakpoints?: Record<string, number>\n __VITUS_LABS__?: never\n} & Record<string, unknown>\n\nexport type TProvider = {\n children: ReactNode\n theme?: Theme\n mode?: 'light' | 'dark'\n inversed?: boolean\n provider?: ComponentType<any>\n}\n\nconst Provider: FC<TProvider> = ({\n theme,\n mode,\n children,\n inversed,\n provider: RocketstyleProvider = CoreProvider,\n}) => {\n if (inversed) {\n const {\n provider: InnerProvider,\n mode: ctxMode,\n ...ctx\n } = useContext<TProvider>(context as any)\n\n const isDark = ctxMode === 'dark'\n const inversedTheme = isDark ? 'light' : 'dark'\n\n if (!InnerProvider) return <>{children}</>\n\n return (\n <InnerProvider\n mode={inversedTheme}\n isDark={isDark}\n isLight={!isDark}\n {...ctx}\n >\n {children}\n </InnerProvider>\n )\n }\n\n const isDark = mode === 'dark'\n\n return (\n <RocketstyleProvider\n mode={mode}\n isDark={isDark}\n isLight={!isDark}\n theme={theme}\n provider={RocketstyleProvider}\n >\n {children}\n </RocketstyleProvider>\n )\n}\n\nexport { context }\n\nexport default Provider\n","export const PSEUDO_KEYS = ['hover', 'active', 'focus', 'pressed'] as const\n\nexport const THEME_MODES = {\n light: true,\n dark: true,\n} as const\n\nexport const THEME_MODES_INVERSED = {\n dark: 'light',\n light: 'dark',\n} as const\n\nexport const CONFIG_KEYS = [\n 'provider',\n 'consumer',\n 'DEBUG',\n 'name',\n 'component',\n 'inversed',\n 'passProps',\n 'styled',\n] as const\n\nexport const STYLING_KEYS = ['theme', 'attrs', 'styles'] as const\nexport const STATIC_KEYS = [...STYLING_KEYS, 'compose'] as const\n\nexport const ALL_RESERVED_KEYS = [\n ...Object.keys(THEME_MODES),\n ...CONFIG_KEYS,\n ...STATIC_KEYS,\n] as const\n","import { useContext } from 'react'\nimport { context } from '~/context'\nimport { THEME_MODES_INVERSED } from '~/constants/reservedKeys'\nimport { ThemeModeKeys } from '~/types/theme'\n\ntype UseThemeOptions = ({ inversed }: { inversed?: boolean }) => {\n theme: Record<string, unknown>\n mode: ThemeModeKeys\n isDark: boolean\n isLight: boolean\n}\n\nconst useThemeOptions: UseThemeOptions = ({ inversed }) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const { theme, mode: ctxMode, isDark: ctxDark } = useContext(context) as any\n const mode = inversed ? THEME_MODES_INVERSED[ctxMode] : ctxMode\n const isDark = inversed ? !ctxDark : ctxDark\n const isLight = !isDark\n\n return { theme, mode, isDark, isLight }\n}\n\nexport default useThemeOptions\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isEmpty } from '@vitus-labs/core'\nimport { MultiKeys } from '~/types/dimensions'\n\n// --------------------------------------------------------\n// pick styled props\n// --------------------------------------------------------\ntype PickStyledProps = (\n props: Record<string, unknown>,\n keywords: Record<string, true>\n) => Partial<typeof props>\nexport const pickStyledProps: PickStyledProps = (props, keywords) => {\n const result = {} as any\n\n Object.entries(props).forEach(([key, value]) => {\n if (keywords[key]) result[key] = value\n })\n\n return result\n}\n\n// --------------------------------------------------------\n// combine values\n// --------------------------------------------------------\ntype OptionFunc<A> = (...arg: Array<A>) => Record<string, unknown>\ntype CalculateChainOptions = <A>(\n options?: Array<OptionFunc<A>>\n) => (args: Array<A>) => ReturnType<OptionFunc<A>>\n\nexport const calculateChainOptions: CalculateChainOptions =\n (options) => (args) => {\n const result = {}\n if (isEmpty(options)) return result\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return options.reduce(\n (acc, item) => Object.assign(acc, item(...args)),\n result\n )\n }\n\n// --------------------------------------------------------\n// get style attributes\n// --------------------------------------------------------\ntype CalculateStylingAttrs = ({\n useBooleans,\n multiKeys,\n}: {\n useBooleans?: boolean\n multiKeys?: MultiKeys\n}) => ({\n props,\n dimensions,\n}: {\n props: Record<string, unknown>\n dimensions: Record<string, unknown>\n}) => any\nexport const calculateStylingAttrs: CalculateStylingAttrs =\n ({ useBooleans, multiKeys }) =>\n ({ props, dimensions }) => {\n const result = {}\n\n // (1) find dimension keys values & initialize\n // object with possible options\n Object.keys(dimensions).forEach((item) => {\n const pickedProp = props[item]\n const valueTypes = ['number', 'string']\n\n // if the property is mutli key, allow assign array as well\n if (multiKeys && multiKeys[item] && Array.isArray(pickedProp)) {\n result[item] = pickedProp\n }\n // assign when it's only a string or number otherwise it's considered\n // as invalid param\n else if (valueTypes.includes(typeof pickedProp)) {\n result[item] = pickedProp\n } else {\n result[item] = undefined\n }\n })\n\n // (2) if booleans are being used let's find the rest\n if (useBooleans) {\n const propsKeys = Object.keys(props).reverse()\n\n Object.entries(result).forEach(([key, value]) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const isMultiKey = multiKeys[key]\n\n // when value in result is not assigned yet\n if (!value) {\n let newDimensionValue\n const keywords = Object.keys(dimensions[key] as any)\n\n if (isMultiKey) {\n newDimensionValue = propsKeys.filter((key) =>\n keywords.includes(key)\n )\n } else {\n // reverse props to guarantee the last one will have\n // a priority over previous ones\n newDimensionValue = propsKeys.find((key) => {\n if (keywords.includes(key) && props[key]) return key\n return false\n })\n }\n\n result[key] = newDimensionValue\n }\n })\n }\n\n return result\n }\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable no-underscore-dangle */\nimport React, {\n forwardRef,\n ForwardRefExoticComponent,\n ComponentType,\n} from 'react'\nimport { renderContent } from '@vitus-labs/core'\nimport { calculateChainOptions } from '~/utils/attrs'\nimport { useThemeOptions } from '~/hooks'\n\nimport type { OptionFunc } from '~/types/configuration'\n\nexport type RocketStyleHOC = ({\n inversed,\n attrs,\n}: {\n inversed?: boolean\n attrs?: Array<OptionFunc>\n}) => (WrappedComponent: ComponentType) => ForwardRefExoticComponent<any>\n\nconst rocketStyleHOC: RocketStyleHOC = ({ inversed, attrs }) => {\n // --------------------------------------------------\n // .attrs(...)\n // first we need to calculate final props which are\n // being returned by using `attr` chaining method\n // --------------------------------------------------\n const _calculateChainOptions = calculateChainOptions(attrs)\n\n const Enhanced = (WrappedComponent) =>\n forwardRef<any, any>((props, ref) => {\n const { theme, mode, isDark, isLight } = useThemeOptions({\n inversed,\n })\n\n const calculatedAttrs = _calculateChainOptions([\n props,\n theme,\n {\n renderContent,\n mode,\n isDark,\n isLight,\n },\n ])\n\n return (\n <WrappedComponent\n $rocketstyleRef={ref}\n {...calculatedAttrs}\n {...props}\n />\n )\n })\n\n return Enhanced\n}\n\nexport default rocketStyleHOC\n","import { createContext } from 'react'\nimport type { PseudoState } from '~/types/pseudo'\n\ntype TContext = Partial<\n {\n pseudo: PseudoState\n } & Record<string, unknown>\n>\n\nexport default createContext<TContext>({})\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { forwardRef } from 'react'\nimport { usePseudoState } from '~/hooks'\nimport LocalContext from './localContext'\n\nconst RocketStyleProviderComponent = (WrappedComponent) =>\n forwardRef<any, any>(\n (\n {\n onMouseEnter,\n onMouseLeave,\n onMouseUp,\n onMouseDown,\n onFocus,\n onBlur,\n $rocketstate,\n ...props\n },\n ref\n ) => {\n // pseudo hook to detect states hover / pressed / focus\n const pseudo = usePseudoState({\n onMouseEnter,\n onMouseLeave,\n onMouseUp,\n onMouseDown,\n onFocus,\n onBlur,\n })\n\n const updatedState = {\n ...$rocketstate,\n pseudo: { ...$rocketstate.pseudo, ...pseudo.state },\n }\n\n return (\n <LocalContext.Provider value={updatedState}>\n <WrappedComponent\n {...props}\n {...pseudo.events}\n ref={ref}\n $rocketstate={updatedState}\n />\n </LocalContext.Provider>\n )\n }\n )\n\nexport default RocketStyleProviderComponent\n","/* eslint-disable import/prefer-default-export */\nimport type { StylesCbArray, Css } from '~/types/styles'\n\n// --------------------------------------------------------\n// calculate styles\n// --------------------------------------------------------\ntype CalculateStyles = <S extends StylesCbArray | undefined, C extends Css>(\n styles: S,\n css: C\n) => Array<ReturnType<StylesCbArray[number]>>\n\nexport const calculateStyles: CalculateStyles = (styles, css) => {\n if (!styles) return []\n\n return styles.map((item) => item(css))\n}\n","/* eslint-disable no-underscore-dangle */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\n\nimport React, {\n useMemo,\n forwardRef,\n useContext,\n useImperativeHandle,\n useRef,\n} from 'react'\nimport hoistNonReactStatics from 'hoist-non-react-statics'\nimport { config, omit, pick, compose, renderContent } from '@vitus-labs/core'\nimport { useTheme, useThemeOptions } from '~/hooks'\nimport { localContext, createProvider, rocketstyleAttrsHoc } from '~/internal'\nimport { calculateTheme, calculateThemeMode, themeModeCb } from '~/utils/theme'\nimport { calculateStyles } from '~/utils/styles'\nimport { chainOptions } from '~/utils/collection'\nimport {\n pickStyledProps,\n calculateStylingAttrs,\n calculateChainOptions,\n} from '~/utils/attrs'\nimport {\n PSEUDO_KEYS,\n CONFIG_KEYS,\n STYLING_KEYS,\n STATIC_KEYS,\n} from '~/constants/reservedKeys'\n\nimport type { RocketComponent } from '~/types/rocketstyle'\nimport type { Configuration } from '~/types/configuration'\nimport type { StyleComponent } from '~/types/styleComponent'\n\n// --------------------------------------------------------\n// styledComponent helpers for chaining attributes\n// --------------------------------------------------------\ntype OrOptions = (\n keys: Readonly<Array<string>>,\n opts: Record<string, unknown>,\n defaultOpts: Record<string, unknown>\n) => Record<string, unknown>\n\nconst orOptions: OrOptions = (keys, opts, defaultOpts) =>\n keys.reduce(\n (acc, item) => ({ ...acc, [item]: opts[item] || defaultOpts[item] }),\n {}\n )\n\nconst chainReservedOptions = (keys, opts, defaultOpts) =>\n keys.reduce(\n (acc, item) => ({\n ...acc,\n [item]: chainOptions(opts[item], defaultOpts[item]),\n }),\n {}\n )\n\n// --------------------------------------------------------\n// helpers for create statics on class\n// --------------------------------------------------------\nconst createStaticsEnhancers = ({ context, dimensionKeys, func, opts }) => {\n dimensionKeys.forEach((item) => {\n // eslint-disable-next-line no-param-reassign\n context[item] = (props) => func({ [item]: props }, opts)\n })\n}\n\n// --------------------------------------------------------\n// cloneAndEnhance\n// helper function which allows function chaining\n// always returns styleComponent with static functions\n// assigned\n// --------------------------------------------------------\ntype CloneAndEnhance = <A extends Configuration, B extends Configuration>(\n opts: A,\n defaultOpts: B\n) => ReturnType<typeof styleComponent>\n\nconst cloneAndEnhance: CloneAndEnhance = (opts, defaultOpts) =>\n styleComponent({\n ...defaultOpts,\n compose: { ...defaultOpts.compose, ...opts.compose },\n ...orOptions(CONFIG_KEYS, opts, defaultOpts),\n ...chainReservedOptions(\n [...defaultOpts.dimensionKeys, ...STYLING_KEYS],\n opts,\n defaultOpts\n ),\n })\n\n// --------------------------------------------------------\n// styleComponent\n// helper function which allows function chaining\n// always returns a valid React component with static functions\n// assigned, so it can be even rendered as a valid component\n// or styles can be extended via its statics\n// --------------------------------------------------------\nconst styleComponent: StyleComponent<any> = (options) => {\n const { component, styles } = options\n const { styled } = config\n\n // const _calculateChainOptions = calculateChainOptions(options.attrs)\n const _calculateStylingAttrs = calculateStylingAttrs({\n multiKeys: options.multiKeys,\n useBooleans: options.useBooleans,\n })\n\n const componentName =\n options.name || options.component.displayName || options.component.name\n\n // create styled component with all options.styles if available\n const STYLED_COMPONENT =\n component.IS_ROCKETSTYLE || options.styled === false\n ? component\n : styled(component)`\n ${calculateStyles(styles, config.css)};\n `\n\n // --------------------------------------------------------\n // final component to be rendered\n // --------------------------------------------------------\n const RenderComponent = options.provider\n ? createProvider(STYLED_COMPONENT)\n : STYLED_COMPONENT\n\n // --------------------------------------------------------\n // hocs\n // --------------------------------------------------------\n const calculateHocsFuncs = Object.values(options.compose || {})\n .filter((item) => typeof item === 'function')\n .reverse()\n\n const hocsFuncs = [rocketstyleAttrsHoc(options), ...calculateHocsFuncs]\n\n // --------------------------------------------------------\n // ENHANCED COMPONENT (returned component)\n // --------------------------------------------------------\n // .attrs() chaining option is calculated in HOC and passed as props already\n const EnhancedComponent: RocketComponent = forwardRef(\n (\n {\n $rocketstyleRef, // it's forwarded from HOC which is always on top of hocs\n ...props\n },\n ref\n ) => {\n // --------------------------------------------------\n // handle refs\n // (1) one is passed from inner HOC - $rocketstyleRef\n // (2) second one is used to be used directly (e.g. inside hocs)\n // --------------------------------------------------\n const internalRef = useRef(null)\n\n if ($rocketstyleRef)\n useImperativeHandle($rocketstyleRef, () => internalRef.current, [\n $rocketstyleRef,\n ])\n\n if (ref) useImperativeHandle(ref, () => internalRef.current, [ref])\n\n // --------------------------------------------------\n // hover - focus - pressed state passed via context from parent component\n // --------------------------------------------------\n const rocketstyleCtx = options.consumer ? useContext(localContext) : {}\n\n // --------------------------------------------------\n // general theme and theme mode dark / light passed in context\n // --------------------------------------------------\n const { theme, mode } = useThemeOptions(options)\n\n // --------------------------------------------------\n // calculate themes for all possible styling dimensions\n // .theme(...) + defined dimensions like .states(...), .sizes(...)\n // --------------------------------------------------\n const __ROCKETSTYLE__ = useMemo(\n () =>\n useTheme<typeof theme>({\n theme,\n options,\n cb: themeModeCb,\n }),\n // recalculate this only when theme changes\n [theme]\n )\n\n const {\n reservedPropNames,\n themes: rocketThemes,\n dimensions,\n baseTheme: rocketBaseTheme,\n } = __ROCKETSTYLE__\n\n const { baseTheme, themes } = useMemo(\n () =>\n calculateThemeMode(\n { themes: rocketThemes, baseTheme: rocketBaseTheme },\n mode\n ),\n // recalculate this only when theme mode changes dark / light\n [mode]\n )\n\n // --------------------------------------------------\n // calculate reserved Keys defined in dimensions as styling keys\n // there is no need to calculate this each time - keys are based on\n // dimensions definitions\n // --------------------------------------------------\n const RESERVED_STYLING_PROPS_KEYS = useMemo(\n () => Object.keys(reservedPropNames),\n []\n )\n\n // --------------------------------------------------\n // get final props which are (latest has the highest priority):\n // (1) merged styling from context,\n // (2) `attrs` chaining method, and from\n // (3) passing them directly to component\n // --------------------------------------------------\n const { pseudo = {}, ...mergeProps }: Record<string, unknown> = {\n ...(options.consumer\n ? options.consumer((callback) => callback(rocketstyleCtx))\n : {}),\n ...props,\n }\n\n // --------------------------------------------------\n // rocketstate\n // calculate final component state including pseudo state\n // passed as $rocketstate prop\n // --------------------------------------------------\n const rocketstate: Record<string, unknown> = _calculateStylingAttrs({\n props: pickStyledProps(mergeProps, reservedPropNames),\n dimensions,\n })\n\n // --------------------------------------------------\n // pseudo state\n // calculate final component pseudo state including pseudo state\n // from props and override by pseudo props from context\n // --------------------------------------------------\n const finalPseudo = {\n ...pick(props, PSEUDO_KEYS),\n ...pseudo,\n }\n\n const finalRocketstate = { ...rocketstate, pseudo: finalPseudo }\n\n // --------------------------------------------------\n // rocketstyle\n // calculated (based on styling props) final theme which will be passed\n // to our styled component\n // passed as $rocketstyle prop\n // --------------------------------------------------\n const rocketstyle = calculateTheme({\n rocketstate,\n themes,\n baseTheme,\n })\n\n // --------------------------------------------------\n // final props\n // final props passed to WrappedComponent\n // excluding: styling props\n // including: $rocketstyle, $rocketstate\n // --------------------------------------------------\n const finalProps = {\n // this removes styling state from props and passes its state\n // under rocketstate key only\n ...omit(mergeProps, [...RESERVED_STYLING_PROPS_KEYS, ...PSEUDO_KEYS]),\n // if enforced to pass styling props, we pass them directly\n ...(options.passProps ? pick(mergeProps, options.passProps) : {}),\n ref: ref || $rocketstyleRef ? internalRef : undefined,\n // state props passed to styled component only, therefore the `$` symbol\n $rocketstyle: rocketstyle,\n $rocketstate: finalRocketstate,\n }\n\n // all the development stuff injected\n if (process.env.NODE_ENV !== 'production') {\n finalProps['data-rocketstyle'] = componentName\n }\n\n return <RenderComponent {...finalProps} />\n }\n )\n\n // ------------------------------------------------------\n // This will hoist and generate dynamically next static methods\n // for all dimensions available in configuration\n // ------------------------------------------------------\n const RocketComponent = compose(...hocsFuncs)(EnhancedComponent)\n RocketComponent.IS_ROCKETSTYLE = true\n RocketComponent.displayName = componentName\n\n hoistNonReactStatics(RocketComponent, options.component)\n createStaticsEnhancers({\n context: RocketComponent,\n dimensionKeys: [...options.dimensionKeys, ...STATIC_KEYS],\n func: cloneAndEnhance,\n opts: options,\n })\n\n // ------------------------------------------------------\n RocketComponent.IS_ROCKETSTYLE = true\n RocketComponent.displayName = componentName\n // ------------------------------------------------------\n\n RocketComponent.config = (opts = {}) => {\n const result = pick(opts, CONFIG_KEYS)\n\n return cloneAndEnhance(result as any, options) as any\n }\n\n RocketComponent.getStaticDimensions = (theme) => {\n const themes = useTheme({ theme, options, cb: themeModeCb })\n\n return {\n dimensions: themes.dimensions,\n useBooleans: options.useBooleans,\n multiKeys: options.multiKeys,\n }\n }\n\n RocketComponent.getDefaultAttrs = (props, theme, mode) => {\n const result = calculateChainOptions(options.attrs)([\n props,\n theme,\n {\n renderContent,\n mode,\n isDark: mode === 'light',\n isLight: mode === 'dark',\n },\n ])\n\n return result\n }\n\n return RocketComponent as RocketComponent\n}\n\nexport default styleComponent\n","const DEFAULT_DIMENSIONS = {\n states: 'state',\n sizes: 'size',\n variants: 'variant',\n multiple: {\n propName: 'multiple',\n multi: true,\n },\n} as const\n\nexport default DEFAULT_DIMENSIONS\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { isEmpty } from '@vitus-labs/core'\nimport styleComponent from './rocketstyle'\nimport {\n getKeys,\n getMultipleDimensions,\n getDimensionsValues,\n} from '~/utils/dimensions'\nimport { ALL_RESERVED_KEYS } from '~/constants/reservedKeys'\nimport defaultDimensions from '~/constants/defaultDimensions'\n\nimport type { ElementType } from '~/types/utils'\nimport type { Dimensions, DefaultDimensions } from '~/types/dimensions'\nimport type { StyleComponent } from '~/types/styleComponent'\n\nexport type Rocketstyle = <T = any, CT = any>() => <\n D extends Dimensions = DefaultDimensions,\n UB extends boolean = true\n>({\n dimensions,\n useBooleans,\n}?: {\n dimensions?: D\n useBooleans?: UB\n}) => <C extends ElementType>({\n name,\n component,\n}: {\n name: string\n component: C\n}) => ReturnType<StyleComponent<C, T, CT, D, UB>>\n\nconst rocketstyle: Rocketstyle =\n () =>\n ({ dimensions = defaultDimensions, useBooleans = true } = {}) =>\n ({ name, component }) => {\n // --------------------------------------------------------\n // handle ERRORS in development mode\n // --------------------------------------------------------\n if (process.env.NODE_ENV !== 'production') {\n type Errors = Partial<{\n component: string\n name: string\n dimensions: string\n invalidDimensions: string\n }>\n\n const errors: Errors = {}\n if (!component) {\n errors.component = 'Parameter `component` is missing in params!'\n }\n\n if (!name) {\n errors.name = 'Parameter `name` is missing in params!'\n }\n\n if (isEmpty(dimensions)) {\n errors.dimensions = 'Parameter `dimensions` is missing in params!'\n } else {\n const definedDimensions = getKeys(dimensions)\n const invalidDimension = ALL_RESERVED_KEYS.some((item) =>\n definedDimensions.includes(item as any)\n )\n\n if (invalidDimension) {\n errors.invalidDimensions = `Some of your \\`dimensions\\` is invalid and uses reserved static keys which are\n ${defaultDimensions.toString()}`\n }\n }\n\n if (!isEmpty(errors)) {\n throw Error(JSON.stringify(errors))\n }\n }\n\n return styleComponent({\n name,\n component,\n useBooleans,\n dimensions,\n dimensionKeys: getKeys(dimensions),\n dimensionValues: getDimensionsValues(dimensions),\n multiKeys: getMultipleDimensions(dimensions),\n })\n }\n\nexport default rocketstyle\n","/* eslint-disable @typescript-eslint/no-explicit-any */\ntype IsRocketComponent = (component: any) => boolean\n\nconst isRocketComponent: IsRocketComponent = (component) => {\n if (\n typeof component === 'object' &&\n component !== null &&\n component.IS_ROCKETSTYLE\n ) {\n return true\n }\n\n return false\n}\n\nexport default isRocketComponent\n"],"names":["useState","get","isEmpty","set","calculateChainOptions","config","merge","CoreProvider","useContext","context","React","forwardRef","renderContent","createContext","LocalContext","createProvider","rocketstyleAttrsHoc","useRef","useImperativeHandle","useMemo","pick","omit","compose","hoistNonReactStatics","defaultDimensions"],"mappings":";;;;;;;;;;;EAcA,MAAM,WAAW,GAAG,CAAC,CAAQ;MAC3B,CAAC,CAAC,cAAc,EAAE,CAAA;MAClB,CAAC,CAAC,eAAe,EAAE,CAAA;EACrB,CAAC,CAAA;EAED,MAAM,cAAc,GAAmB,CAAC,KAAK;MAC3C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAGA,cAAQ,CAAC,KAAK,CAAC,CAAA;MACzC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAGA,cAAQ,CAAC,KAAK,CAAC,CAAA;MACzC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAGA,cAAQ,CAAC,KAAK,CAAC,CAAA;MAE7C,MAAM,YAAY,GAAG,CAAC,CAAa;UACjC,WAAW,CAAC,CAAC,CAAC,CAAA;UACd,QAAQ,CAAC,IAAI,CAAC,CAAA;UACd,IAAI,KAAK,CAAC,YAAY;cAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;OAC9C,CAAA;MAED,MAAM,YAAY,GAAG,CAAC,CAAa;UACjC,WAAW,CAAC,CAAC,CAAC,CAAA;UACd,QAAQ,CAAC,KAAK,CAAC,CAAA;UACf,UAAU,CAAC,KAAK,CAAC,CAAA;UACjB,IAAI,KAAK,CAAC,YAAY;cAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;OAC9C,CAAA;MAED,MAAM,WAAW,GAAG,CAAC,CAAa;UAChC,WAAW,CAAC,CAAC,CAAC,CAAA;UACd,UAAU,CAAC,IAAI,CAAC,CAAA;UAChB,IAAI,KAAK,CAAC,WAAW;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AS;UACT,WAAW;UACX,UAAU;UACV,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC;UAClC,eAAe,EAAE,mBAAmB,CAAC,UAAU,CAAC;UAChD,SAAS,EAAE,qBAAqB,CAAC,UAAU,CAAC;OAC7C,CAAC,CAAA;EACJ;;QCnFI,iBAAiB,GAAsB,CAAC,SAAS;MACrD,IACE,OAAO,SAAS,KAAK,QAAQ;UAC7B,SAAS,KAAK,IAAI;UAClB,SAAS,CAAC,cAAc,EACxB;UACA,OAAO,IAAI,CAAA;OACZ;MAED,OAAO,KAAK,CAAA;EACd;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitus-labs/rocketstyle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.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.
|
|
72
|
-
"@vitus-labs/tools-babel": "^0.
|
|
73
|
-
"@vitus-labs/tools-rollup": "^0.
|
|
74
|
-
"@vitus-labs/tools-storybook": "^0.
|
|
75
|
-
"@vitus-labs/tools-typescript": "^0.
|
|
76
|
-
"@vitus-labs/unistyle": "^0.
|
|
70
|
+
"@vitus-labs/core": "^0.16.0",
|
|
71
|
+
"@vitus-labs/elements": "^0.16.0",
|
|
72
|
+
"@vitus-labs/tools-babel": "^0.19.0",
|
|
73
|
+
"@vitus-labs/tools-rollup": "^0.19.0",
|
|
74
|
+
"@vitus-labs/tools-storybook": "^0.19.0",
|
|
75
|
+
"@vitus-labs/tools-typescript": "^0.19.0",
|
|
76
|
+
"@vitus-labs/unistyle": "^0.16.0"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "5c2c0471f1c6d444227c70609c85075f5440c5a1"
|
|
79
79
|
}
|