@vitus-labs/rocketstyle 0.63.0 → 0.64.0-alpha.1
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/chaining.d.ts +1 -1
- package/lib/types/utils/statics.d.ts +1 -1
- package/lib/vitus-labs-rocketstyle.js +34 -15
- package/lib/vitus-labs-rocketstyle.js.map +1 -1
- package/lib/vitus-labs-rocketstyle.module.js +34 -15
- package/lib/vitus-labs-rocketstyle.module.js.map +1 -1
- package/package.json +5 -5
|
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
|
|
|
6424
6424
|
</script>
|
|
6425
6425
|
<script>
|
|
6426
6426
|
/*<!--*/
|
|
6427
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.js","children":[{"name":"src","children":[{"name":"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":"6014-1","name":"index.ts"},{"uid":"6014-37","name":"defaultDimensions.ts"}]},{"name":"context","children":[{"uid":"6014-3","name":"localContext.tsx"},{"uid":"6014-9","name":"context.tsx"},{"uid":"6014-13","name":"createLocalProvider.tsx"}]},{"name":"hooks","children":[{"uid":"6014-5","name":"usePseudoState.tsx"},{"uid":"6014-7","name":"useRef.ts"},{"uid":"6014-11","name":"useTheme.tsx"}]},{"name":"cache/LocalThemeManager.ts","uid":"6014-15"},{"name":"utils","children":[{"uid":"6014-17","name":"attrs.ts"},{"uid":"6014-21","name":"statics.ts"},{"uid":"6014-23","name":"collection.ts"},{"uid":"6014-25","name":"dimensions.ts"},{"uid":"6014-27","name":"theme.ts"},{"uid":"6014-29","name":"chaining.ts"},{"uid":"6014-31","name":"compose.ts"},{"uid":"6014-33","name":"styles.ts"}]},{"name":"hoc/rocketstyleAttrsHoc.tsx","uid":"6014-19"},{"uid":"6014-35","name":"rocketstyle.tsx"},{"uid":"6014-39","name":"init.ts"},{"uid":"6014-41","name":"isRocketComponent.tsx"},{"uid":"6014-43","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"6014-1":{"renderedLength":602,"gzipLength":309,"brotliLength":0,"mainUid":"6014-0"},"6014-3":{"renderedLength":300,"gzipLength":182,"brotliLength":0,"mainUid":"6014-2"},"6014-5":{"renderedLength":1875,"gzipLength":446,"brotliLength":0,"mainUid":"6014-4"},"6014-7":{"renderedLength":271,"gzipLength":150,"brotliLength":0,"mainUid":"6014-6"},"6014-9":{"renderedLength":547,"gzipLength":315,"brotliLength":0,"mainUid":"6014-8"},"6014-11":{"renderedLength":346,"gzipLength":213,"brotliLength":0,"mainUid":"6014-10"},"6014-13":{"renderedLength":824,"gzipLength":379,"brotliLength":0,"mainUid":"6014-12"},"6014-15":{"renderedLength":235,"gzipLength":120,"brotliLength":0,"mainUid":"6014-14"},"6014-17":{"renderedLength":2799,"gzipLength":945,"brotliLength":0,"mainUid":"6014-16"},"6014-19":{"renderedLength":1618,"gzipLength":585,"brotliLength":0,"mainUid":"6014-18"},"6014-21":{"renderedLength":459,"gzipLength":269,"brotliLength":0,"mainUid":"6014-20"},"6014-23":{"renderedLength":756,"gzipLength":316,"brotliLength":0,"mainUid":"6014-22"},"6014-25":{"renderedLength":1509,"gzipLength":542,"brotliLength":0,"mainUid":"6014-24"},"6014-27":{"renderedLength":2352,"gzipLength":780,"brotliLength":0,"mainUid":"6014-26"},"6014-29":{"renderedLength":564,"gzipLength":253,"brotliLength":0,"mainUid":"6014-28"},"6014-31":{"renderedLength":135,"gzipLength":129,"brotliLength":0,"mainUid":"6014-30"},"6014-33":{"renderedLength":187,"gzipLength":157,"brotliLength":0,"mainUid":"6014-32"},"6014-35":{"renderedLength":12629,"gzipLength":2808,"brotliLength":0,"mainUid":"6014-34"},"6014-37":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"6014-36"},"6014-39":{"renderedLength":1553,"gzipLength":562,"brotliLength":0,"mainUid":"6014-38"},"6014-41":{"renderedLength":267,"gzipLength":184,"brotliLength":0,"mainUid":"6014-40"},"6014-43":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"6014-42"}},"nodeMetas":{"6014-0":{"id":"/src/constants/index.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-1"},"imported":[],"importedBy":[{"uid":"6014-38"},{"uid":"6014-8"},{"uid":"6014-34"},{"uid":"6014-20"},{"uid":"6014-10"}]},"6014-2":{"id":"/src/context/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"6014-3"},"imported":[{"uid":"6014-45"}],"importedBy":[{"uid":"6014-34"},{"uid":"6014-12"}]},"6014-4":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"6014-5"},"imported":[{"uid":"6014-45"}],"importedBy":[{"uid":"6014-48"}]},"6014-6":{"id":"/src/hooks/useRef.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-7"},"imported":[{"uid":"6014-45"}],"importedBy":[{"uid":"6014-48"}]},"6014-8":{"id":"/src/context/context.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"6014-9"},"imported":[{"uid":"6014-45"},{"uid":"6014-44"},{"uid":"6014-0"}],"importedBy":[{"uid":"6014-42"},{"uid":"6014-10"}]},"6014-10":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"6014-11"},"imported":[{"uid":"6014-45"},{"uid":"6014-8"},{"uid":"6014-0"}],"importedBy":[{"uid":"6014-48"}]},"6014-12":{"id":"/src/context/createLocalProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"6014-13"},"imported":[{"uid":"6014-45"},{"uid":"6014-48"},{"uid":"6014-2"}],"importedBy":[{"uid":"6014-34"}]},"6014-14":{"id":"/src/cache/LocalThemeManager.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-15"},"imported":[],"importedBy":[{"uid":"6014-47"}]},"6014-16":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-17"},"imported":[{"uid":"6014-44"}],"importedBy":[{"uid":"6014-34"},{"uid":"6014-18"}]},"6014-18":{"id":"/src/hoc/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"6014-19"},"imported":[{"uid":"6014-45"},{"uid":"6014-44"},{"uid":"6014-16"},{"uid":"6014-48"}],"importedBy":[{"uid":"6014-49"}]},"6014-20":{"id":"/src/utils/statics.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-21"},"imported":[{"uid":"6014-44"},{"uid":"6014-0"}],"importedBy":[{"uid":"6014-34"}]},"6014-22":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-23"},"imported":[],"importedBy":[{"uid":"6014-26"}]},"6014-24":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-25"},"imported":[{"uid":"6014-44"}],"importedBy":[{"uid":"6014-38"},{"uid":"6014-34"},{"uid":"6014-26"}]},"6014-26":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-27"},"imported":[{"uid":"6014-44"},{"uid":"6014-22"},{"uid":"6014-24"}],"importedBy":[{"uid":"6014-34"}]},"6014-28":{"id":"/src/utils/chaining.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-29"},"imported":[],"importedBy":[{"uid":"6014-34"}]},"6014-30":{"id":"/src/utils/compose.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-31"},"imported":[],"importedBy":[{"uid":"6014-34"}]},"6014-32":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-33"},"imported":[{"uid":"6014-44"}],"importedBy":[{"uid":"6014-34"}]},"6014-34":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"6014-35"},"imported":[{"uid":"6014-45"},{"uid":"6014-46"},{"uid":"6014-44"},{"uid":"6014-0"},{"uid":"6014-2"},{"uid":"6014-12"},{"uid":"6014-47"},{"uid":"6014-48"},{"uid":"6014-49"},{"uid":"6014-20"},{"uid":"6014-26"},{"uid":"6014-28"},{"uid":"6014-30"},{"uid":"6014-32"},{"uid":"6014-24"},{"uid":"6014-16"}],"importedBy":[{"uid":"6014-38"}]},"6014-36":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-37"},"imported":[],"importedBy":[{"uid":"6014-38"}]},"6014-38":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-39"},"imported":[{"uid":"6014-44"},{"uid":"6014-34"},{"uid":"6014-24"},{"uid":"6014-0"},{"uid":"6014-36"}],"importedBy":[{"uid":"6014-42"}]},"6014-40":{"id":"/src/isRocketComponent.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"6014-41"},"imported":[],"importedBy":[{"uid":"6014-42"}]},"6014-42":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.js":"6014-43"},"imported":[{"uid":"6014-38"},{"uid":"6014-8"},{"uid":"6014-40"}],"importedBy":[],"isEntry":true},"6014-44":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"6014-38"},{"uid":"6014-8"},{"uid":"6014-34"},{"uid":"6014-24"},{"uid":"6014-20"},{"uid":"6014-26"},{"uid":"6014-32"},{"uid":"6014-16"},{"uid":"6014-18"}],"isExternal":true},"6014-45":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"6014-8"},{"uid":"6014-34"},{"uid":"6014-2"},{"uid":"6014-12"},{"uid":"6014-4"},{"uid":"6014-6"},{"uid":"6014-10"},{"uid":"6014-18"}],"isExternal":true},"6014-46":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"6014-34"}],"isExternal":true},"6014-47":{"id":"/src/cache/index.ts","moduleParts":{},"imported":[{"uid":"6014-14"}],"importedBy":[{"uid":"6014-34"}]},"6014-48":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"6014-4"},{"uid":"6014-6"},{"uid":"6014-10"}],"importedBy":[{"uid":"6014-34"},{"uid":"6014-12"},{"uid":"6014-18"}]},"6014-49":{"id":"/src/hoc/index.ts","moduleParts":{},"imported":[{"uid":"6014-18"}],"importedBy":[{"uid":"6014-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":"6014-51","name":"index.ts"},{"uid":"6014-87","name":"defaultDimensions.ts"}]},{"name":"context","children":[{"uid":"6014-53","name":"localContext.tsx"},{"uid":"6014-59","name":"context.tsx"},{"uid":"6014-63","name":"createLocalProvider.tsx"}]},{"name":"hooks","children":[{"uid":"6014-55","name":"usePseudoState.tsx"},{"uid":"6014-57","name":"useRef.ts"},{"uid":"6014-61","name":"useTheme.tsx"}]},{"name":"cache/LocalThemeManager.ts","uid":"6014-65"},{"name":"utils","children":[{"uid":"6014-67","name":"attrs.ts"},{"uid":"6014-71","name":"statics.ts"},{"uid":"6014-73","name":"collection.ts"},{"uid":"6014-75","name":"dimensions.ts"},{"uid":"6014-77","name":"theme.ts"},{"uid":"6014-79","name":"chaining.ts"},{"uid":"6014-81","name":"compose.ts"},{"uid":"6014-83","name":"styles.ts"}]},{"name":"hoc/rocketstyleAttrsHoc.tsx","uid":"6014-69"},{"uid":"6014-85","name":"rocketstyle.tsx"},{"uid":"6014-89","name":"init.ts"},{"uid":"6014-91","name":"isRocketComponent.tsx"},{"uid":"6014-93","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"6014-51":{"renderedLength":602,"gzipLength":309,"brotliLength":0,"mainUid":"6014-50"},"6014-53":{"renderedLength":288,"gzipLength":177,"brotliLength":0,"mainUid":"6014-52"},"6014-55":{"renderedLength":1821,"gzipLength":441,"brotliLength":0,"mainUid":"6014-54"},"6014-57":{"renderedLength":253,"gzipLength":146,"brotliLength":0,"mainUid":"6014-56"},"6014-59":{"renderedLength":515,"gzipLength":301,"brotliLength":0,"mainUid":"6014-58"},"6014-61":{"renderedLength":337,"gzipLength":210,"brotliLength":0,"mainUid":"6014-60"},"6014-63":{"renderedLength":772,"gzipLength":360,"brotliLength":0,"mainUid":"6014-62"},"6014-65":{"renderedLength":235,"gzipLength":120,"brotliLength":0,"mainUid":"6014-64"},"6014-67":{"renderedLength":2794,"gzipLength":944,"brotliLength":0,"mainUid":"6014-66"},"6014-69":{"renderedLength":1579,"gzipLength":565,"brotliLength":0,"mainUid":"6014-68"},"6014-71":{"renderedLength":454,"gzipLength":266,"brotliLength":0,"mainUid":"6014-70"},"6014-73":{"renderedLength":756,"gzipLength":316,"brotliLength":0,"mainUid":"6014-72"},"6014-75":{"renderedLength":1494,"gzipLength":535,"brotliLength":0,"mainUid":"6014-74"},"6014-77":{"renderedLength":2322,"gzipLength":773,"brotliLength":0,"mainUid":"6014-76"},"6014-79":{"renderedLength":564,"gzipLength":253,"brotliLength":0,"mainUid":"6014-78"},"6014-81":{"renderedLength":135,"gzipLength":129,"brotliLength":0,"mainUid":"6014-80"},"6014-83":{"renderedLength":182,"gzipLength":154,"brotliLength":0,"mainUid":"6014-82"},"6014-85":{"renderedLength":12504,"gzipLength":2770,"brotliLength":0,"mainUid":"6014-84"},"6014-87":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"6014-86"},"6014-89":{"renderedLength":1543,"gzipLength":559,"brotliLength":0,"mainUid":"6014-88"},"6014-91":{"renderedLength":267,"gzipLength":184,"brotliLength":0,"mainUid":"6014-90"},"6014-93":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"6014-92"}},"nodeMetas":{"6014-50":{"id":"/src/constants/index.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-51"},"imported":[],"importedBy":[{"uid":"6014-88"},{"uid":"6014-58"},{"uid":"6014-84"},{"uid":"6014-70"},{"uid":"6014-60"}]},"6014-52":{"id":"/src/context/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-53"},"imported":[{"uid":"6014-95"}],"importedBy":[{"uid":"6014-84"},{"uid":"6014-62"}]},"6014-54":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-55"},"imported":[{"uid":"6014-95"}],"importedBy":[{"uid":"6014-98"}]},"6014-56":{"id":"/src/hooks/useRef.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-57"},"imported":[{"uid":"6014-95"}],"importedBy":[{"uid":"6014-98"}]},"6014-58":{"id":"/src/context/context.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-59"},"imported":[{"uid":"6014-95"},{"uid":"6014-94"},{"uid":"6014-50"}],"importedBy":[{"uid":"6014-92"},{"uid":"6014-60"}]},"6014-60":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-61"},"imported":[{"uid":"6014-95"},{"uid":"6014-58"},{"uid":"6014-50"}],"importedBy":[{"uid":"6014-98"}]},"6014-62":{"id":"/src/context/createLocalProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-63"},"imported":[{"uid":"6014-95"},{"uid":"6014-98"},{"uid":"6014-52"}],"importedBy":[{"uid":"6014-84"}]},"6014-64":{"id":"/src/cache/LocalThemeManager.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-65"},"imported":[],"importedBy":[{"uid":"6014-97"}]},"6014-66":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-67"},"imported":[{"uid":"6014-94"}],"importedBy":[{"uid":"6014-84"},{"uid":"6014-68"}]},"6014-68":{"id":"/src/hoc/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-69"},"imported":[{"uid":"6014-95"},{"uid":"6014-94"},{"uid":"6014-66"},{"uid":"6014-98"}],"importedBy":[{"uid":"6014-99"}]},"6014-70":{"id":"/src/utils/statics.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-71"},"imported":[{"uid":"6014-94"},{"uid":"6014-50"}],"importedBy":[{"uid":"6014-84"}]},"6014-72":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-73"},"imported":[],"importedBy":[{"uid":"6014-76"}]},"6014-74":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-75"},"imported":[{"uid":"6014-94"}],"importedBy":[{"uid":"6014-88"},{"uid":"6014-84"},{"uid":"6014-76"}]},"6014-76":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-77"},"imported":[{"uid":"6014-94"},{"uid":"6014-72"},{"uid":"6014-74"}],"importedBy":[{"uid":"6014-84"}]},"6014-78":{"id":"/src/utils/chaining.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-79"},"imported":[],"importedBy":[{"uid":"6014-84"}]},"6014-80":{"id":"/src/utils/compose.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-81"},"imported":[],"importedBy":[{"uid":"6014-84"}]},"6014-82":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-83"},"imported":[{"uid":"6014-94"}],"importedBy":[{"uid":"6014-84"}]},"6014-84":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-85"},"imported":[{"uid":"6014-95"},{"uid":"6014-96"},{"uid":"6014-94"},{"uid":"6014-50"},{"uid":"6014-52"},{"uid":"6014-62"},{"uid":"6014-97"},{"uid":"6014-98"},{"uid":"6014-99"},{"uid":"6014-70"},{"uid":"6014-76"},{"uid":"6014-78"},{"uid":"6014-80"},{"uid":"6014-82"},{"uid":"6014-74"},{"uid":"6014-66"}],"importedBy":[{"uid":"6014-88"}]},"6014-86":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-87"},"imported":[],"importedBy":[{"uid":"6014-88"}]},"6014-88":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-89"},"imported":[{"uid":"6014-94"},{"uid":"6014-84"},{"uid":"6014-74"},{"uid":"6014-50"},{"uid":"6014-86"}],"importedBy":[{"uid":"6014-92"}]},"6014-90":{"id":"/src/isRocketComponent.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-91"},"imported":[],"importedBy":[{"uid":"6014-92"}]},"6014-92":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"6014-93"},"imported":[{"uid":"6014-88"},{"uid":"6014-58"},{"uid":"6014-90"}],"importedBy":[],"isEntry":true},"6014-94":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"6014-88"},{"uid":"6014-58"},{"uid":"6014-84"},{"uid":"6014-74"},{"uid":"6014-70"},{"uid":"6014-76"},{"uid":"6014-82"},{"uid":"6014-66"},{"uid":"6014-68"}],"isExternal":true},"6014-95":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"6014-58"},{"uid":"6014-84"},{"uid":"6014-52"},{"uid":"6014-62"},{"uid":"6014-54"},{"uid":"6014-56"},{"uid":"6014-60"},{"uid":"6014-68"}],"isExternal":true},"6014-96":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"6014-84"}],"isExternal":true},"6014-97":{"id":"/src/cache/index.ts","moduleParts":{},"imported":[{"uid":"6014-64"}],"importedBy":[{"uid":"6014-84"}]},"6014-98":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"6014-54"},{"uid":"6014-56"},{"uid":"6014-60"}],"importedBy":[{"uid":"6014-84"},{"uid":"6014-62"},{"uid":"6014-68"}]},"6014-99":{"id":"/src/hoc/index.ts","moduleParts":{},"imported":[{"uid":"6014-68"}],"importedBy":[{"uid":"6014-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,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({});
|
|
@@ -230,33 +231,36 @@ const calculateStylingAttrs = ({ useBooleans, multiKeys }) => ({ props, dimensio
|
|
|
230
231
|
};
|
|
231
232
|
|
|
232
233
|
/* eslint-disable no-underscore-dangle */
|
|
233
|
-
const rocketStyleHOC = ({ inversed, attrs }) => {
|
|
234
|
+
const rocketStyleHOC = ({ inversed, attrs, priorityAttrs }) => {
|
|
234
235
|
// --------------------------------------------------
|
|
235
236
|
// .attrs(...)
|
|
236
237
|
// first we need to calculate final props which are
|
|
237
238
|
// being returned by using `attr` chaining method
|
|
238
239
|
// --------------------------------------------------
|
|
239
|
-
const
|
|
240
|
+
const calculateAttrs = calculateChainOptions(attrs);
|
|
241
|
+
const calculatePriorityAttrs = calculateChainOptions(priorityAttrs);
|
|
240
242
|
const Enhanced = (WrappedComponent) => React.forwardRef((props, ref) => {
|
|
241
243
|
const { theme, mode, isDark, isLight } = useThemeAttrs({
|
|
242
244
|
inversed,
|
|
243
245
|
});
|
|
246
|
+
const callbackParams = [theme, { render: core.render, mode, isDark, isLight }];
|
|
244
247
|
// --------------------------------------------------
|
|
245
248
|
// remove undefined props not to override potential default props
|
|
246
249
|
// only props with value (e.g. `null`) should override default props
|
|
247
250
|
// --------------------------------------------------
|
|
248
251
|
const filteredProps = removeUndefinedProps(props);
|
|
249
|
-
const
|
|
252
|
+
const prioritizedAttrs = calculatePriorityAttrs([
|
|
250
253
|
filteredProps,
|
|
251
|
-
|
|
254
|
+
...callbackParams,
|
|
255
|
+
]);
|
|
256
|
+
const finalAttrs = calculateAttrs([
|
|
252
257
|
{
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
isDark,
|
|
256
|
-
isLight,
|
|
258
|
+
...prioritizedAttrs,
|
|
259
|
+
...filteredProps,
|
|
257
260
|
},
|
|
261
|
+
...callbackParams,
|
|
258
262
|
]);
|
|
259
|
-
return (React__default["default"].createElement(WrappedComponent, { "$rocketstyleRef": ref, ...
|
|
263
|
+
return (React__default["default"].createElement(WrappedComponent, { "$rocketstyleRef": ref, ...prioritizedAttrs, ...finalAttrs, ...filteredProps }));
|
|
260
264
|
});
|
|
261
265
|
return Enhanced;
|
|
262
266
|
};
|
|
@@ -265,7 +269,7 @@ const createStaticsChainingEnhancers = ({ context, dimensionKeys, func, options,
|
|
|
265
269
|
const keys = [...dimensionKeys, ...STATIC_KEYS];
|
|
266
270
|
keys.forEach((item) => {
|
|
267
271
|
// eslint-disable-next-line no-param-reassign
|
|
268
|
-
context[item] = (props) => func({ [item]: props }
|
|
272
|
+
context[item] = (props) => func(options, { [item]: props });
|
|
269
273
|
});
|
|
270
274
|
};
|
|
271
275
|
const createStaticsEnhancers = ({ context, options, }) => {
|
|
@@ -427,10 +431,12 @@ const calculateStyles = (styles) => {
|
|
|
427
431
|
};
|
|
428
432
|
|
|
429
433
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
430
|
-
const cloneAndEnhance = (
|
|
434
|
+
const cloneAndEnhance = (defaultOpts, opts) =>
|
|
431
435
|
// @ts-ignore
|
|
432
436
|
rocketComponent({
|
|
433
437
|
...defaultOpts,
|
|
438
|
+
attrs: chainOptions(opts.attrs, defaultOpts.attrs),
|
|
439
|
+
priorityAttrs: chainOptions(opts.priorityAttrs, defaultOpts.priorityAttrs),
|
|
434
440
|
statics: { ...defaultOpts.statics, ...opts.statics },
|
|
435
441
|
compose: { ...defaultOpts.compose, ...opts.compose },
|
|
436
442
|
...chainOrOptions(CONFIG_KEYS, opts, defaultOpts),
|
|
@@ -447,7 +453,6 @@ rocketComponent({
|
|
|
447
453
|
const rocketComponent = (options) => {
|
|
448
454
|
const { component, styles } = options;
|
|
449
455
|
const { styled } = core.config;
|
|
450
|
-
// const _calculateChainOptions = calculateChainOptions(options.attrs)
|
|
451
456
|
const _calculateStylingAttrs = calculateStylingAttrs({
|
|
452
457
|
multiKeys: options.multiKeys,
|
|
453
458
|
useBooleans: options.useBooleans,
|
|
@@ -651,11 +656,25 @@ const rocketComponent = (options) => {
|
|
|
651
656
|
options: options.statics,
|
|
652
657
|
});
|
|
653
658
|
// @ts-ignore
|
|
659
|
+
RocketComponent.attrs = (attrs, { priority } = {}) => {
|
|
660
|
+
if (priority) {
|
|
661
|
+
return cloneAndEnhance(options, {
|
|
662
|
+
priorityAttrs: attrs,
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
return cloneAndEnhance(options, {
|
|
666
|
+
attrs: attrs,
|
|
667
|
+
});
|
|
668
|
+
};
|
|
669
|
+
// @ts-ignore
|
|
654
670
|
RocketComponent.config = (opts = {}) => {
|
|
655
671
|
const result = core.pick(opts, CONFIG_KEYS);
|
|
656
|
-
return cloneAndEnhance(
|
|
672
|
+
return cloneAndEnhance(options, result);
|
|
657
673
|
};
|
|
658
|
-
|
|
674
|
+
// @ts-ignore
|
|
675
|
+
RocketComponent.statics = (opts) =>
|
|
676
|
+
// @ts-ignore
|
|
677
|
+
cloneAndEnhance(options, { statics: opts });
|
|
659
678
|
RocketComponent.getStaticDimensions = (theme) => {
|
|
660
679
|
const themes = getDimensionThemes(theme, options);
|
|
661
680
|
const { keysMap, keywords } = getDimensionsMap({
|