@vitus-labs/rocketstyle 0.62.0 → 0.64.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/analysis/vitus-labs-rocketstyle.js.html +1 -1
- package/lib/analysis/vitus-labs-rocketstyle.module.js.html +1 -1
- package/lib/index.d.ts +7 -4
- package/lib/types/constants/index.d.ts +3 -3
- package/lib/types/hoc/rocketstyleAttrsHoc.d.ts +2 -5
- package/lib/types/types/configuration.d.ts +17 -2
- package/lib/types/types/rocketstyle.d.ts +4 -2
- package/lib/types/utils/attrs.d.ts +2 -0
- package/lib/types/utils/chaining.d.ts +1 -1
- package/lib/types/utils/statics.d.ts +1 -1
- package/lib/vitus-labs-rocketstyle.js +46 -15
- package/lib/vitus-labs-rocketstyle.js.map +1 -1
- package/lib/vitus-labs-rocketstyle.module.js +46 -15
- package/lib/vitus-labs-rocketstyle.module.js.map +1 -1
- package/package.json +7 -7
|
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
|
|
|
6424
6424
|
</script>
|
|
6425
6425
|
<script>
|
|
6426
6426
|
/*<!--*/
|
|
6427
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.js","children":[{"name":"src","children":[{"name":"constants","children":[{"uid":"
|
|
6427
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.js","children":[{"name":"src","children":[{"name":"constants","children":[{"uid":"2783-1","name":"index.ts"},{"uid":"2783-37","name":"defaultDimensions.ts"}]},{"name":"context","children":[{"uid":"2783-3","name":"localContext.tsx"},{"uid":"2783-9","name":"context.tsx"},{"uid":"2783-13","name":"createLocalProvider.tsx"}]},{"name":"hooks","children":[{"uid":"2783-5","name":"usePseudoState.tsx"},{"uid":"2783-7","name":"useRef.ts"},{"uid":"2783-11","name":"useTheme.tsx"}]},{"name":"cache/LocalThemeManager.ts","uid":"2783-15"},{"name":"utils","children":[{"uid":"2783-17","name":"attrs.ts"},{"uid":"2783-21","name":"statics.ts"},{"uid":"2783-23","name":"collection.ts"},{"uid":"2783-25","name":"dimensions.ts"},{"uid":"2783-27","name":"theme.ts"},{"uid":"2783-29","name":"chaining.ts"},{"uid":"2783-31","name":"compose.ts"},{"uid":"2783-33","name":"styles.ts"}]},{"name":"hoc/rocketstyleAttrsHoc.tsx","uid":"2783-19"},{"uid":"2783-35","name":"rocketstyle.tsx"},{"uid":"2783-39","name":"init.ts"},{"uid":"2783-41","name":"isRocketComponent.tsx"},{"uid":"2783-43","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"2783-1":{"renderedLength":602,"gzipLength":309,"brotliLength":0,"mainUid":"2783-0"},"2783-3":{"renderedLength":300,"gzipLength":182,"brotliLength":0,"mainUid":"2783-2"},"2783-5":{"renderedLength":1875,"gzipLength":446,"brotliLength":0,"mainUid":"2783-4"},"2783-7":{"renderedLength":271,"gzipLength":150,"brotliLength":0,"mainUid":"2783-6"},"2783-9":{"renderedLength":547,"gzipLength":315,"brotliLength":0,"mainUid":"2783-8"},"2783-11":{"renderedLength":346,"gzipLength":213,"brotliLength":0,"mainUid":"2783-10"},"2783-13":{"renderedLength":824,"gzipLength":379,"brotliLength":0,"mainUid":"2783-12"},"2783-15":{"renderedLength":235,"gzipLength":120,"brotliLength":0,"mainUid":"2783-14"},"2783-17":{"renderedLength":2799,"gzipLength":945,"brotliLength":0,"mainUid":"2783-16"},"2783-19":{"renderedLength":1591,"gzipLength":577,"brotliLength":0,"mainUid":"2783-18"},"2783-21":{"renderedLength":459,"gzipLength":269,"brotliLength":0,"mainUid":"2783-20"},"2783-23":{"renderedLength":756,"gzipLength":316,"brotliLength":0,"mainUid":"2783-22"},"2783-25":{"renderedLength":1509,"gzipLength":542,"brotliLength":0,"mainUid":"2783-24"},"2783-27":{"renderedLength":2352,"gzipLength":780,"brotliLength":0,"mainUid":"2783-26"},"2783-29":{"renderedLength":564,"gzipLength":253,"brotliLength":0,"mainUid":"2783-28"},"2783-31":{"renderedLength":135,"gzipLength":129,"brotliLength":0,"mainUid":"2783-30"},"2783-33":{"renderedLength":187,"gzipLength":157,"brotliLength":0,"mainUid":"2783-32"},"2783-35":{"renderedLength":12705,"gzipLength":2817,"brotliLength":0,"mainUid":"2783-34"},"2783-37":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"2783-36"},"2783-39":{"renderedLength":1553,"gzipLength":562,"brotliLength":0,"mainUid":"2783-38"},"2783-41":{"renderedLength":267,"gzipLength":184,"brotliLength":0,"mainUid":"2783-40"},"2783-43":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"2783-42"}},"nodeMetas":{"2783-0":{"id":"/src/constants/index.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-1"},"imported":[],"importedBy":[{"uid":"2783-38"},{"uid":"2783-8"},{"uid":"2783-34"},{"uid":"2783-20"},{"uid":"2783-10"}]},"2783-2":{"id":"/src/context/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"2783-3"},"imported":[{"uid":"2783-45"}],"importedBy":[{"uid":"2783-34"},{"uid":"2783-12"}]},"2783-4":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"2783-5"},"imported":[{"uid":"2783-45"}],"importedBy":[{"uid":"2783-48"}]},"2783-6":{"id":"/src/hooks/useRef.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-7"},"imported":[{"uid":"2783-45"}],"importedBy":[{"uid":"2783-48"}]},"2783-8":{"id":"/src/context/context.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"2783-9"},"imported":[{"uid":"2783-45"},{"uid":"2783-44"},{"uid":"2783-0"}],"importedBy":[{"uid":"2783-42"},{"uid":"2783-10"}]},"2783-10":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"2783-11"},"imported":[{"uid":"2783-45"},{"uid":"2783-8"},{"uid":"2783-0"}],"importedBy":[{"uid":"2783-48"}]},"2783-12":{"id":"/src/context/createLocalProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"2783-13"},"imported":[{"uid":"2783-45"},{"uid":"2783-48"},{"uid":"2783-2"}],"importedBy":[{"uid":"2783-34"}]},"2783-14":{"id":"/src/cache/LocalThemeManager.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-15"},"imported":[],"importedBy":[{"uid":"2783-47"}]},"2783-16":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-17"},"imported":[{"uid":"2783-44"}],"importedBy":[{"uid":"2783-34"},{"uid":"2783-18"}]},"2783-18":{"id":"/src/hoc/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"2783-19"},"imported":[{"uid":"2783-45"},{"uid":"2783-44"},{"uid":"2783-16"},{"uid":"2783-48"}],"importedBy":[{"uid":"2783-49"}]},"2783-20":{"id":"/src/utils/statics.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-21"},"imported":[{"uid":"2783-44"},{"uid":"2783-0"}],"importedBy":[{"uid":"2783-34"}]},"2783-22":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-23"},"imported":[],"importedBy":[{"uid":"2783-26"}]},"2783-24":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-25"},"imported":[{"uid":"2783-44"}],"importedBy":[{"uid":"2783-38"},{"uid":"2783-34"},{"uid":"2783-26"}]},"2783-26":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-27"},"imported":[{"uid":"2783-44"},{"uid":"2783-22"},{"uid":"2783-24"}],"importedBy":[{"uid":"2783-34"}]},"2783-28":{"id":"/src/utils/chaining.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-29"},"imported":[],"importedBy":[{"uid":"2783-34"}]},"2783-30":{"id":"/src/utils/compose.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-31"},"imported":[],"importedBy":[{"uid":"2783-34"}]},"2783-32":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-33"},"imported":[{"uid":"2783-44"}],"importedBy":[{"uid":"2783-34"}]},"2783-34":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"2783-35"},"imported":[{"uid":"2783-45"},{"uid":"2783-46"},{"uid":"2783-44"},{"uid":"2783-0"},{"uid":"2783-2"},{"uid":"2783-12"},{"uid":"2783-47"},{"uid":"2783-48"},{"uid":"2783-49"},{"uid":"2783-20"},{"uid":"2783-26"},{"uid":"2783-28"},{"uid":"2783-30"},{"uid":"2783-32"},{"uid":"2783-24"},{"uid":"2783-16"}],"importedBy":[{"uid":"2783-38"}]},"2783-36":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-37"},"imported":[],"importedBy":[{"uid":"2783-38"}]},"2783-38":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-39"},"imported":[{"uid":"2783-44"},{"uid":"2783-34"},{"uid":"2783-24"},{"uid":"2783-0"},{"uid":"2783-36"}],"importedBy":[{"uid":"2783-42"}]},"2783-40":{"id":"/src/isRocketComponent.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"2783-41"},"imported":[],"importedBy":[{"uid":"2783-42"}]},"2783-42":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.js":"2783-43"},"imported":[{"uid":"2783-38"},{"uid":"2783-8"},{"uid":"2783-40"}],"importedBy":[],"isEntry":true},"2783-44":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"2783-38"},{"uid":"2783-8"},{"uid":"2783-34"},{"uid":"2783-24"},{"uid":"2783-20"},{"uid":"2783-26"},{"uid":"2783-32"},{"uid":"2783-16"},{"uid":"2783-18"}],"isExternal":true},"2783-45":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"2783-8"},{"uid":"2783-34"},{"uid":"2783-2"},{"uid":"2783-12"},{"uid":"2783-4"},{"uid":"2783-6"},{"uid":"2783-10"},{"uid":"2783-18"}],"isExternal":true},"2783-46":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"2783-34"}],"isExternal":true},"2783-47":{"id":"/src/cache/index.ts","moduleParts":{},"imported":[{"uid":"2783-14"}],"importedBy":[{"uid":"2783-34"}]},"2783-48":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"2783-4"},{"uid":"2783-6"},{"uid":"2783-10"}],"importedBy":[{"uid":"2783-34"},{"uid":"2783-12"},{"uid":"2783-18"}]},"2783-49":{"id":"/src/hoc/index.ts","moduleParts":{},"imported":[{"uid":"2783-18"}],"importedBy":[{"uid":"2783-34"}]}},"env":{"rollup":"2.72.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
6428
6428
|
|
|
6429
6429
|
const run = () => {
|
|
6430
6430
|
const width = window.innerWidth;
|
|
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
|
|
|
6424
6424
|
</script>
|
|
6425
6425
|
<script>
|
|
6426
6426
|
/*<!--*/
|
|
6427
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.module.js","children":[{"name":"src","children":[{"name":"constants","children":[{"uid":"
|
|
6427
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.module.js","children":[{"name":"src","children":[{"name":"constants","children":[{"uid":"2783-51","name":"index.ts"},{"uid":"2783-87","name":"defaultDimensions.ts"}]},{"name":"context","children":[{"uid":"2783-53","name":"localContext.tsx"},{"uid":"2783-59","name":"context.tsx"},{"uid":"2783-63","name":"createLocalProvider.tsx"}]},{"name":"hooks","children":[{"uid":"2783-55","name":"usePseudoState.tsx"},{"uid":"2783-57","name":"useRef.ts"},{"uid":"2783-61","name":"useTheme.tsx"}]},{"name":"cache/LocalThemeManager.ts","uid":"2783-65"},{"name":"utils","children":[{"uid":"2783-67","name":"attrs.ts"},{"uid":"2783-71","name":"statics.ts"},{"uid":"2783-73","name":"collection.ts"},{"uid":"2783-75","name":"dimensions.ts"},{"uid":"2783-77","name":"theme.ts"},{"uid":"2783-79","name":"chaining.ts"},{"uid":"2783-81","name":"compose.ts"},{"uid":"2783-83","name":"styles.ts"}]},{"name":"hoc/rocketstyleAttrsHoc.tsx","uid":"2783-69"},{"uid":"2783-85","name":"rocketstyle.tsx"},{"uid":"2783-89","name":"init.ts"},{"uid":"2783-91","name":"isRocketComponent.tsx"},{"uid":"2783-93","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"2783-51":{"renderedLength":602,"gzipLength":309,"brotliLength":0,"mainUid":"2783-50"},"2783-53":{"renderedLength":288,"gzipLength":177,"brotliLength":0,"mainUid":"2783-52"},"2783-55":{"renderedLength":1821,"gzipLength":441,"brotliLength":0,"mainUid":"2783-54"},"2783-57":{"renderedLength":253,"gzipLength":146,"brotliLength":0,"mainUid":"2783-56"},"2783-59":{"renderedLength":515,"gzipLength":301,"brotliLength":0,"mainUid":"2783-58"},"2783-61":{"renderedLength":337,"gzipLength":210,"brotliLength":0,"mainUid":"2783-60"},"2783-63":{"renderedLength":772,"gzipLength":360,"brotliLength":0,"mainUid":"2783-62"},"2783-65":{"renderedLength":235,"gzipLength":120,"brotliLength":0,"mainUid":"2783-64"},"2783-67":{"renderedLength":2794,"gzipLength":944,"brotliLength":0,"mainUid":"2783-66"},"2783-69":{"renderedLength":1552,"gzipLength":558,"brotliLength":0,"mainUid":"2783-68"},"2783-71":{"renderedLength":454,"gzipLength":266,"brotliLength":0,"mainUid":"2783-70"},"2783-73":{"renderedLength":756,"gzipLength":316,"brotliLength":0,"mainUid":"2783-72"},"2783-75":{"renderedLength":1494,"gzipLength":535,"brotliLength":0,"mainUid":"2783-74"},"2783-77":{"renderedLength":2322,"gzipLength":773,"brotliLength":0,"mainUid":"2783-76"},"2783-79":{"renderedLength":564,"gzipLength":253,"brotliLength":0,"mainUid":"2783-78"},"2783-81":{"renderedLength":135,"gzipLength":129,"brotliLength":0,"mainUid":"2783-80"},"2783-83":{"renderedLength":182,"gzipLength":154,"brotliLength":0,"mainUid":"2783-82"},"2783-85":{"renderedLength":12580,"gzipLength":2779,"brotliLength":0,"mainUid":"2783-84"},"2783-87":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"2783-86"},"2783-89":{"renderedLength":1543,"gzipLength":559,"brotliLength":0,"mainUid":"2783-88"},"2783-91":{"renderedLength":267,"gzipLength":184,"brotliLength":0,"mainUid":"2783-90"},"2783-93":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"2783-92"}},"nodeMetas":{"2783-50":{"id":"/src/constants/index.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-51"},"imported":[],"importedBy":[{"uid":"2783-88"},{"uid":"2783-58"},{"uid":"2783-84"},{"uid":"2783-70"},{"uid":"2783-60"}]},"2783-52":{"id":"/src/context/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-53"},"imported":[{"uid":"2783-95"}],"importedBy":[{"uid":"2783-84"},{"uid":"2783-62"}]},"2783-54":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-55"},"imported":[{"uid":"2783-95"}],"importedBy":[{"uid":"2783-98"}]},"2783-56":{"id":"/src/hooks/useRef.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-57"},"imported":[{"uid":"2783-95"}],"importedBy":[{"uid":"2783-98"}]},"2783-58":{"id":"/src/context/context.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-59"},"imported":[{"uid":"2783-95"},{"uid":"2783-94"},{"uid":"2783-50"}],"importedBy":[{"uid":"2783-92"},{"uid":"2783-60"}]},"2783-60":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-61"},"imported":[{"uid":"2783-95"},{"uid":"2783-58"},{"uid":"2783-50"}],"importedBy":[{"uid":"2783-98"}]},"2783-62":{"id":"/src/context/createLocalProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-63"},"imported":[{"uid":"2783-95"},{"uid":"2783-98"},{"uid":"2783-52"}],"importedBy":[{"uid":"2783-84"}]},"2783-64":{"id":"/src/cache/LocalThemeManager.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-65"},"imported":[],"importedBy":[{"uid":"2783-97"}]},"2783-66":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-67"},"imported":[{"uid":"2783-94"}],"importedBy":[{"uid":"2783-84"},{"uid":"2783-68"}]},"2783-68":{"id":"/src/hoc/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-69"},"imported":[{"uid":"2783-95"},{"uid":"2783-94"},{"uid":"2783-66"},{"uid":"2783-98"}],"importedBy":[{"uid":"2783-99"}]},"2783-70":{"id":"/src/utils/statics.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-71"},"imported":[{"uid":"2783-94"},{"uid":"2783-50"}],"importedBy":[{"uid":"2783-84"}]},"2783-72":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-73"},"imported":[],"importedBy":[{"uid":"2783-76"}]},"2783-74":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-75"},"imported":[{"uid":"2783-94"}],"importedBy":[{"uid":"2783-88"},{"uid":"2783-84"},{"uid":"2783-76"}]},"2783-76":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-77"},"imported":[{"uid":"2783-94"},{"uid":"2783-72"},{"uid":"2783-74"}],"importedBy":[{"uid":"2783-84"}]},"2783-78":{"id":"/src/utils/chaining.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-79"},"imported":[],"importedBy":[{"uid":"2783-84"}]},"2783-80":{"id":"/src/utils/compose.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-81"},"imported":[],"importedBy":[{"uid":"2783-84"}]},"2783-82":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-83"},"imported":[{"uid":"2783-94"}],"importedBy":[{"uid":"2783-84"}]},"2783-84":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-85"},"imported":[{"uid":"2783-95"},{"uid":"2783-96"},{"uid":"2783-94"},{"uid":"2783-50"},{"uid":"2783-52"},{"uid":"2783-62"},{"uid":"2783-97"},{"uid":"2783-98"},{"uid":"2783-99"},{"uid":"2783-70"},{"uid":"2783-76"},{"uid":"2783-78"},{"uid":"2783-80"},{"uid":"2783-82"},{"uid":"2783-74"},{"uid":"2783-66"}],"importedBy":[{"uid":"2783-88"}]},"2783-86":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-87"},"imported":[],"importedBy":[{"uid":"2783-88"}]},"2783-88":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-89"},"imported":[{"uid":"2783-94"},{"uid":"2783-84"},{"uid":"2783-74"},{"uid":"2783-50"},{"uid":"2783-86"}],"importedBy":[{"uid":"2783-92"}]},"2783-90":{"id":"/src/isRocketComponent.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-91"},"imported":[],"importedBy":[{"uid":"2783-92"}]},"2783-92":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"2783-93"},"imported":[{"uid":"2783-88"},{"uid":"2783-58"},{"uid":"2783-90"}],"importedBy":[],"isEntry":true},"2783-94":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"2783-88"},{"uid":"2783-58"},{"uid":"2783-84"},{"uid":"2783-74"},{"uid":"2783-70"},{"uid":"2783-76"},{"uid":"2783-82"},{"uid":"2783-66"},{"uid":"2783-68"}],"isExternal":true},"2783-95":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"2783-58"},{"uid":"2783-84"},{"uid":"2783-52"},{"uid":"2783-62"},{"uid":"2783-54"},{"uid":"2783-56"},{"uid":"2783-60"},{"uid":"2783-68"}],"isExternal":true},"2783-96":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"2783-84"}],"isExternal":true},"2783-97":{"id":"/src/cache/index.ts","moduleParts":{},"imported":[{"uid":"2783-64"}],"importedBy":[{"uid":"2783-84"}]},"2783-98":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"2783-54"},{"uid":"2783-56"},{"uid":"2783-60"}],"importedBy":[{"uid":"2783-84"},{"uid":"2783-62"},{"uid":"2783-68"}]},"2783-99":{"id":"/src/hoc/index.ts","moduleParts":{},"imported":[{"uid":"2783-68"}],"importedBy":[{"uid":"2783-84"}]}},"env":{"rollup":"2.72.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
6428
6428
|
|
|
6429
6429
|
const run = () => {
|
|
6430
6430
|
const width = window.innerWidth;
|
package/lib/index.d.ts
CHANGED
|
@@ -153,8 +153,9 @@ declare type Configuration<C = ElementType | unknown, D extends Dimensions = Dim
|
|
|
153
153
|
inversed?: boolean;
|
|
154
154
|
passProps?: Array<string>;
|
|
155
155
|
styled?: boolean;
|
|
156
|
-
attrs:
|
|
157
|
-
|
|
156
|
+
attrs: OptionFunc[];
|
|
157
|
+
priorityAttrs: OptionFunc[];
|
|
158
|
+
theme: OptionFunc[];
|
|
158
159
|
styles: StylesCbArray;
|
|
159
160
|
compose: Record<string, TFn | null | undefined | false>;
|
|
160
161
|
statics: Record<string, any>;
|
|
@@ -282,7 +283,9 @@ interface IRocketStyleComponent<OA extends TObj = {}, EA extends TObj = {}, T ex
|
|
|
282
283
|
* }))
|
|
283
284
|
* ```
|
|
284
285
|
*/
|
|
285
|
-
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[DFP, P]>> | AttrsCb<MergeTypes<[DFP, P]>, Theme$1<T>> : Partial<DFP> | AttrsCb<DFP, Theme$1<T
|
|
286
|
+
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[DFP, P]>> | AttrsCb<MergeTypes<[DFP, P]>, Theme$1<T>> : Partial<DFP> | AttrsCb<DFP, Theme$1<T>>, config?: Partial<{
|
|
287
|
+
priority: boolean;
|
|
288
|
+
}>) => P extends TObj ? RocketStyleComponent<OA, MergeTypes<[EA, P]>, T, CSS, S, HOC, D, UB, DKP> : RocketStyleComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
286
289
|
/**
|
|
287
290
|
* A chaining method to define default component theme
|
|
288
291
|
* @param param Can be either _object_ or a _callback_
|
|
@@ -394,7 +397,7 @@ interface IRocketStyleComponent<OA extends TObj = {}, EA extends TObj = {}, T ex
|
|
|
394
397
|
* const newElement = base.statics({ isNewStatic: undefined })
|
|
395
398
|
* ```
|
|
396
399
|
*/
|
|
397
|
-
statics: <P extends TObj>(param: P) => P extends TObj ? RocketStyleComponent<OA, EA, T, CSS, MergeTypes<[S, P]>, HOC, D, UB, DKP> : RocketStyleComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
400
|
+
statics: <P extends TObj | unknown = unknown>(param: P) => P extends TObj ? RocketStyleComponent<OA, EA, T, CSS, MergeTypes<[S, P]>, HOC, D, UB, DKP> : RocketStyleComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
398
401
|
/**
|
|
399
402
|
* An access to all defined statics on the component.
|
|
400
403
|
*
|
|
@@ -9,6 +9,6 @@ export declare const THEME_MODES_INVERSED: {
|
|
|
9
9
|
readonly light: "dark";
|
|
10
10
|
};
|
|
11
11
|
export declare const CONFIG_KEYS: readonly ["provider", "consumer", "DEBUG", "name", "component", "inversed", "passProps", "styled"];
|
|
12
|
-
export declare const STYLING_KEYS: readonly ["theme", "
|
|
13
|
-
export declare const STATIC_KEYS: readonly ["theme", "
|
|
14
|
-
export declare const ALL_RESERVED_KEYS: readonly [...string[], "provider", "consumer", "DEBUG", "name", "component", "inversed", "passProps", "styled", "theme", "
|
|
12
|
+
export declare const STYLING_KEYS: readonly ["theme", "styles"];
|
|
13
|
+
export declare const STATIC_KEYS: readonly ["theme", "styles", "compose"];
|
|
14
|
+
export declare const ALL_RESERVED_KEYS: readonly [...string[], "provider", "consumer", "DEBUG", "name", "component", "inversed", "passProps", "styled", "theme", "styles", "compose", "attrs"];
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { ForwardRefExoticComponent, ComponentType } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
export declare type RocketStyleHOC = ({ inversed, attrs, }:
|
|
4
|
-
inversed?: boolean;
|
|
5
|
-
attrs?: Array<OptionFunc>;
|
|
6
|
-
}) => (WrappedComponent: ComponentType<any>) => ForwardRefExoticComponent<any>;
|
|
2
|
+
import type { Configuration } from "../types/configuration";
|
|
3
|
+
export declare type RocketStyleHOC = ({ inversed, attrs, priorityAttrs, }: Pick<Configuration, 'inversed' | 'attrs' | 'priorityAttrs'>) => (WrappedComponent: ComponentType<any>) => ForwardRefExoticComponent<any>;
|
|
7
4
|
declare const rocketStyleHOC: RocketStyleHOC;
|
|
8
5
|
export default rocketStyleHOC;
|
|
@@ -26,8 +26,23 @@ export declare type Configuration<C = ElementType | unknown, D extends Dimension
|
|
|
26
26
|
inversed?: boolean;
|
|
27
27
|
passProps?: Array<string>;
|
|
28
28
|
styled?: boolean;
|
|
29
|
-
attrs:
|
|
30
|
-
|
|
29
|
+
attrs: OptionFunc[];
|
|
30
|
+
priorityAttrs: OptionFunc[];
|
|
31
|
+
theme: OptionFunc[];
|
|
32
|
+
styles: StylesCbArray;
|
|
33
|
+
compose: Record<string, TFn | null | undefined | false>;
|
|
34
|
+
statics: Record<string, any>;
|
|
35
|
+
} & Record<string, any>;
|
|
36
|
+
export declare type ExtendedConfiguration<C = ElementType | unknown, D extends Dimensions = Dimensions> = InitConfiguration<C, D> & {
|
|
37
|
+
provider?: boolean;
|
|
38
|
+
consumer?: ConsumerCb<D>;
|
|
39
|
+
DEBUG?: boolean;
|
|
40
|
+
inversed?: boolean;
|
|
41
|
+
passProps?: Array<string>;
|
|
42
|
+
styled?: boolean;
|
|
43
|
+
attrs: OptionFunc;
|
|
44
|
+
priorityAttrs: OptionFunc;
|
|
45
|
+
theme: OptionFunc;
|
|
31
46
|
styles: StylesCbArray;
|
|
32
47
|
compose: Record<string, TFn | null | undefined | false>;
|
|
33
48
|
statics: Record<string, any>;
|
|
@@ -118,7 +118,9 @@ export interface IRocketStyleComponent<OA extends TObj = {}, EA extends TObj = {
|
|
|
118
118
|
* }))
|
|
119
119
|
* ```
|
|
120
120
|
*/
|
|
121
|
-
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[DFP, P]>> | AttrsCb<MergeTypes<[DFP, P]>, Theme<T>> : Partial<DFP> | AttrsCb<DFP, Theme<T
|
|
121
|
+
attrs: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[DFP, P]>> | AttrsCb<MergeTypes<[DFP, P]>, Theme<T>> : Partial<DFP> | AttrsCb<DFP, Theme<T>>, config?: Partial<{
|
|
122
|
+
priority: boolean;
|
|
123
|
+
}>) => P extends TObj ? RocketStyleComponent<OA, MergeTypes<[EA, P]>, T, CSS, S, HOC, D, UB, DKP> : RocketStyleComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
122
124
|
/**
|
|
123
125
|
* A chaining method to define default component theme
|
|
124
126
|
* @param param Can be either _object_ or a _callback_
|
|
@@ -230,7 +232,7 @@ export interface IRocketStyleComponent<OA extends TObj = {}, EA extends TObj = {
|
|
|
230
232
|
* const newElement = base.statics({ isNewStatic: undefined })
|
|
231
233
|
* ```
|
|
232
234
|
*/
|
|
233
|
-
statics: <P extends TObj>(param: P) => P extends TObj ? RocketStyleComponent<OA, EA, T, CSS, MergeTypes<[S, P]>, HOC, D, UB, DKP> : RocketStyleComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
235
|
+
statics: <P extends TObj | unknown = unknown>(param: P) => P extends TObj ? RocketStyleComponent<OA, EA, T, CSS, MergeTypes<[S, P]>, HOC, D, UB, DKP> : RocketStyleComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
234
236
|
/**
|
|
235
237
|
* An access to all defined statics on the component.
|
|
236
238
|
*
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { MultiKeys } from "../types/dimensions";
|
|
2
|
+
declare type RemoveUndefinedProps = <T extends Record<string, any>>(props: T) => Partial<T>;
|
|
3
|
+
export declare const removeUndefinedProps: RemoveUndefinedProps;
|
|
2
4
|
declare type PickStyledAttrs = <T extends Record<string, any>, K extends {
|
|
3
5
|
[I in keyof T]?: true;
|
|
4
6
|
}>(props: T, keywords: K) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare type Func = (...args: any) => Record<string, unknown>;
|
|
2
2
|
declare type Obj = Record<string, unknown>;
|
|
3
|
-
declare type ChainOptions = (opts: Obj | Func, defaultOpts: Func[]) => Func[];
|
|
3
|
+
declare type ChainOptions = (opts: Obj | Func | undefined, defaultOpts: Func[]) => Func[];
|
|
4
4
|
export declare const chainOptions: ChainOptions;
|
|
5
5
|
declare type ChainOrOptions = (keys: ReadonlyArray<string>, opts: Obj, defaultOpts: Obj) => Record<string, unknown>;
|
|
6
6
|
export declare const chainOrOptions: ChainOrOptions;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare type CreateStaticsChainingEnhancers = <O extends Record<string, any>, DK extends string[]>(props: {
|
|
2
2
|
context: Record<string, any>;
|
|
3
3
|
dimensionKeys: DK;
|
|
4
|
-
func: (
|
|
4
|
+
func: (defaultOpts: O, opts: any) => void;
|
|
5
5
|
options: O;
|
|
6
6
|
}) => void;
|
|
7
7
|
export declare const createStaticsChainingEnhancers: CreateStaticsChainingEnhancers;
|
|
@@ -31,12 +31,13 @@ const CONFIG_KEYS = [
|
|
|
31
31
|
'passProps',
|
|
32
32
|
'styled',
|
|
33
33
|
];
|
|
34
|
-
const STYLING_KEYS = ['theme', '
|
|
34
|
+
const STYLING_KEYS = ['theme', 'styles'];
|
|
35
35
|
const STATIC_KEYS = [...STYLING_KEYS, 'compose'];
|
|
36
36
|
const ALL_RESERVED_KEYS = [
|
|
37
37
|
...Object.keys(THEME_MODES),
|
|
38
38
|
...CONFIG_KEYS,
|
|
39
39
|
...STATIC_KEYS,
|
|
40
|
+
'attrs',
|
|
40
41
|
];
|
|
41
42
|
|
|
42
43
|
const context = React.createContext({});
|
|
@@ -160,6 +161,12 @@ class ThemeManager {
|
|
|
160
161
|
}
|
|
161
162
|
|
|
162
163
|
/* eslint-disable no-param-reassign */
|
|
164
|
+
const removeUndefinedProps = (props) => Object.keys(props).reduce((acc, key) => {
|
|
165
|
+
const currentValue = props[key];
|
|
166
|
+
if (currentValue !== undefined)
|
|
167
|
+
return { ...acc, [key]: currentValue };
|
|
168
|
+
return acc;
|
|
169
|
+
}, {});
|
|
163
170
|
const pickStyledAttrs = (props, keywords) => Object.keys(props).reduce((acc, key) => {
|
|
164
171
|
if (keywords[key] && props[key])
|
|
165
172
|
acc[key] = props[key];
|
|
@@ -224,28 +231,36 @@ const calculateStylingAttrs = ({ useBooleans, multiKeys }) => ({ props, dimensio
|
|
|
224
231
|
};
|
|
225
232
|
|
|
226
233
|
/* eslint-disable no-underscore-dangle */
|
|
227
|
-
const rocketStyleHOC = ({ inversed, attrs }) => {
|
|
234
|
+
const rocketStyleHOC = ({ inversed, attrs, priorityAttrs }) => {
|
|
228
235
|
// --------------------------------------------------
|
|
229
236
|
// .attrs(...)
|
|
230
237
|
// first we need to calculate final props which are
|
|
231
238
|
// being returned by using `attr` chaining method
|
|
232
239
|
// --------------------------------------------------
|
|
233
|
-
const
|
|
240
|
+
const calculateAttrs = calculateChainOptions(attrs);
|
|
241
|
+
const calculatePriorityAttrs = calculateChainOptions(priorityAttrs);
|
|
234
242
|
const Enhanced = (WrappedComponent) => React.forwardRef((props, ref) => {
|
|
235
243
|
const { theme, mode, isDark, isLight } = useThemeAttrs({
|
|
236
244
|
inversed,
|
|
237
245
|
});
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
246
|
+
const callbackParams = [theme, { render: core.render, mode, isDark, isLight }];
|
|
247
|
+
// --------------------------------------------------
|
|
248
|
+
// remove undefined props not to override potential default props
|
|
249
|
+
// only props with value (e.g. `null`) should override default props
|
|
250
|
+
// --------------------------------------------------
|
|
251
|
+
const filteredProps = removeUndefinedProps(props);
|
|
252
|
+
const priorityAttrs = calculatePriorityAttrs([
|
|
253
|
+
filteredProps,
|
|
254
|
+
...callbackParams,
|
|
255
|
+
]);
|
|
256
|
+
const finalAttrs = calculateAttrs([
|
|
241
257
|
{
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
isDark,
|
|
245
|
-
isLight,
|
|
258
|
+
...priorityAttrs,
|
|
259
|
+
...filteredProps,
|
|
246
260
|
},
|
|
261
|
+
...callbackParams,
|
|
247
262
|
]);
|
|
248
|
-
return (React__default["default"].createElement(WrappedComponent, { "$rocketstyleRef": ref, ...
|
|
263
|
+
return (React__default["default"].createElement(WrappedComponent, { "$rocketstyleRef": ref, ...finalAttrs, ...filteredProps }));
|
|
249
264
|
});
|
|
250
265
|
return Enhanced;
|
|
251
266
|
};
|
|
@@ -254,7 +269,7 @@ const createStaticsChainingEnhancers = ({ context, dimensionKeys, func, options,
|
|
|
254
269
|
const keys = [...dimensionKeys, ...STATIC_KEYS];
|
|
255
270
|
keys.forEach((item) => {
|
|
256
271
|
// eslint-disable-next-line no-param-reassign
|
|
257
|
-
context[item] = (props) => func({ [item]: props }
|
|
272
|
+
context[item] = (props) => func(options, { [item]: props });
|
|
258
273
|
});
|
|
259
274
|
};
|
|
260
275
|
const createStaticsEnhancers = ({ context, options, }) => {
|
|
@@ -416,10 +431,12 @@ const calculateStyles = (styles) => {
|
|
|
416
431
|
};
|
|
417
432
|
|
|
418
433
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
419
|
-
const cloneAndEnhance = (
|
|
434
|
+
const cloneAndEnhance = (defaultOpts, opts) =>
|
|
420
435
|
// @ts-ignore
|
|
421
436
|
rocketComponent({
|
|
422
437
|
...defaultOpts,
|
|
438
|
+
attrs: chainOptions(opts.attrs, defaultOpts.attrs),
|
|
439
|
+
priorityAttrs: chainOptions(opts.priorityAttrs, defaultOpts.priorityAttrs),
|
|
423
440
|
statics: { ...defaultOpts.statics, ...opts.statics },
|
|
424
441
|
compose: { ...defaultOpts.compose, ...opts.compose },
|
|
425
442
|
...chainOrOptions(CONFIG_KEYS, opts, defaultOpts),
|
|
@@ -640,11 +657,25 @@ const rocketComponent = (options) => {
|
|
|
640
657
|
options: options.statics,
|
|
641
658
|
});
|
|
642
659
|
// @ts-ignore
|
|
660
|
+
RocketComponent.attrs = (attrs, { priority } = {}) => {
|
|
661
|
+
if (priority) {
|
|
662
|
+
return cloneAndEnhance(options, {
|
|
663
|
+
priorityAttrs: attrs,
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
return cloneAndEnhance(options, {
|
|
667
|
+
attrs: attrs,
|
|
668
|
+
});
|
|
669
|
+
};
|
|
670
|
+
// @ts-ignore
|
|
643
671
|
RocketComponent.config = (opts = {}) => {
|
|
644
672
|
const result = core.pick(opts, CONFIG_KEYS);
|
|
645
|
-
return cloneAndEnhance(
|
|
673
|
+
return cloneAndEnhance(options, result);
|
|
646
674
|
};
|
|
647
|
-
|
|
675
|
+
// @ts-ignore
|
|
676
|
+
RocketComponent.statics = (opts) =>
|
|
677
|
+
// @ts-ignore
|
|
678
|
+
cloneAndEnhance(options, { statics: opts });
|
|
648
679
|
RocketComponent.getStaticDimensions = (theme) => {
|
|
649
680
|
const themes = getDimensionThemes(theme, options);
|
|
650
681
|
const { keysMap, keywords } = getDimensionsMap({
|