react-native-unistyles 3.0.0-alpha.32 → 3.0.0-alpha.33
Sign up to get free protection for your applications and to get access to all the features.
- package/cxx/core/UnistylesRegistry.cpp +0 -1
- package/cxx/hybridObjects/HybridShadowRegistry.h +3 -1
- package/cxx/shadowTree/ShadowTrafficController.h +3 -8
- package/lib/commonjs/core/createUnistylesComponent.native.js +3 -2
- package/lib/commonjs/core/useBreakpoint.native.js.map +1 -2
- package/lib/commonjs/core/useTheme.js.map +2 -1
- package/lib/commonjs/core/useTheme.native.js.map +1 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mq.js +1 -4
- package/lib/commonjs/mq.js.map +2 -1
- package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js +4 -5
- package/lib/commonjs/specs/NavigtionBar/index.js.map +2 -1
- package/lib/commonjs/specs/ShadowRegistry/index.js.map +2 -1
- package/lib/commonjs/specs/StatusBar/UnistylesStatusBar.nitro.js.map +1 -1
- package/lib/commonjs/specs/StatusBar/index.js.map +2 -1
- package/lib/commonjs/specs/TurboUnistyles/index.js.map +1 -1
- package/lib/commonjs/specs/UnistylesRuntime/UnistylesRuntime.nitro.js.map +1 -1
- package/lib/commonjs/specs/index.web.js.map +2 -1
- package/lib/commonjs/specs/types.js +10 -10
- package/lib/commonjs/specs/types.js.map +1 -2
- package/lib/commonjs/types/accessibility.js +10 -10
- package/lib/commonjs/types/accessibility.js.map +1 -2
- package/lib/commonjs/types/breakpoints.js.map +1 -1
- package/lib/commonjs/types/common.js +2 -1
- package/lib/commonjs/types/common.js.map +1 -1
- package/lib/commonjs/types/core.js.map +1 -1
- package/lib/commonjs/types/index.js.map +2 -1
- package/lib/commonjs/types/stylesheet.js.map +2 -1
- package/lib/commonjs/web/convert/textShadow.js +4 -1
- package/lib/commonjs/web/index.js.map +2 -1
- package/lib/commonjs/web/runtime.js.map +2 -1
- package/lib/commonjs/web/state.js +1 -5
- package/lib/commonjs/web/utils/common.js +1 -3
- package/lib/commonjs/web/utils/common.js.map +2 -1
- package/lib/commonjs/web/utils/index.js.map +1 -1
- package/lib/commonjs/web/variants/useVariants.js +2 -1
- package/lib/commonjs/web/variants/useVariants.js.map +1 -2
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/core/useBreakpoint.native.js.map +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/NativePlatform/NativePlatform.nitro.js +6 -5
- package/lib/module/specs/NativePlatform/index.js.map +1 -1
- package/lib/module/specs/NavigtionBar/UnistylesNavigationBar.nitro.js.map +2 -1
- package/lib/module/specs/ShadowRegistry/types.js.map +1 -2
- package/lib/module/specs/StatusBar/UnistylesStatusBar.nitro.js.map +1 -2
- package/lib/module/specs/StyleSheet/index.js.map +1 -2
- package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -2
- package/lib/module/specs/UnistylesRuntime/index.js.map +1 -2
- package/lib/module/specs/index.web.js.map +2 -1
- package/lib/module/types/accessibility.js +10 -10
- package/lib/module/types/accessibility.js.map +2 -1
- package/lib/module/types/common.js +1 -3
- package/lib/module/types/common.js.map +2 -1
- package/lib/module/types/core.js.map +2 -1
- package/lib/module/types/index.js.map +2 -1
- package/lib/module/types/stylesheet.js.map +2 -1
- package/lib/module/types/variants.js.map +2 -1
- package/lib/module/web/convert/index.js +1 -7
- package/lib/module/web/convert/pseudo.js.map +1 -2
- package/lib/module/web/convert/shadow.js +1 -5
- package/lib/module/web/convert/shadow.js.map +2 -1
- package/lib/module/web/convert/transform.js.map +1 -2
- package/lib/module/web/convert/types.js.map +1 -1
- package/lib/module/web/convert/utils.js.map +2 -1
- package/lib/module/web/create.js +1 -5
- package/lib/module/web/create.js.map +2 -1
- package/lib/module/web/index.js +1 -2
- package/lib/module/web/index.js.map +2 -1
- package/lib/module/web/listener.js.map +2 -1
- package/lib/module/web/registry.js.map +1 -2
- package/lib/module/web/runtime.js.map +1 -2
- package/lib/module/web/shadowRegistry.js.map +2 -1
- package/lib/module/web/state.js +1 -5
- package/lib/module/web/state.js.map +2 -1
- package/lib/module/web/utils/index.js.map +1 -1
- package/lib/module/web/variants/getVariants.js.map +2 -1
- package/lib/module/web/variants/useVariants.js +2 -1
- package/lib/module/web/variants/useVariants.js.map +1 -2
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["UnistyleDependency"],"sourceRoot":"../../../../src","sources":["specs/NativePlatform/index.
|
1
|
+
{"version":3,"names":["UnistyleDependency"],"sourceRoot":"../../../../src","sources":["specs/NativePlatform/index.js"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,wBAAwB","ignoreList":[]}
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/NavigtionBar/UnistylesNavigationBar.nitro.
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/NavigtionBar/UnistylesNavigationBar.nitro.ts"],"mappings":"","ignoreList":[]}
|
2
|
+
":[]}
|
@@ -1,2 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/types.
|
2
|
-
":[]}
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/types.js"],"mappings":";;AAAA","ignoreList":[]}
|
@@ -1,2 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/StatusBar/UnistylesStatusBar.nitro.
|
2
|
-
":[]}
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/StatusBar/UnistylesStatusBar.nitro.js"],"mappings":";;AAAA","ignoreList":[]}
|
@@ -1,2 +1 @@
|
|
1
|
-
{"version":3,"names":["NitroModules","processColor","StyleSheet","NativeStyleSheet","HybridUnistylesStyleSheet","createHybridObject","absoluteFillObject","absoluteFill","flatten","compose","jsMethods","init"],"sourceRoot":"../../../../src","sources":["specs/StyleSheet/index.
|
2
|
-
}
|
1
|
+
{"version":3,"names":["NitroModules","processColor","StyleSheet","NativeStyleSheet","HybridUnistylesStyleSheet","createHybridObject","absoluteFillObject","absoluteFill","flatten","compose","jsMethods","init"],"sourceRoot":"../../../../src","sources":["specs/StyleSheet/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AACzD,SAASC,YAAY,EAAEC,UAAU,IAAIC,gBAAgB,QAAQ,cAAc;AAgC3E,MAAMC,yBAAyB,GAAGJ,YAAY,CACzCK,kBAAkB,CAAsB,qBAAqB,CAAC;AAEnED,yBAAyB,CAACE,kBAAkB,GAAGH,gBAAgB,CAACG,kBAAkB;AAClFF,yBAAyB,CAACG,YAAY,GAAGJ,gBAAgB,CAACI,YAAY;AACtEH,yBAAyB,CAACI,OAAO,GAAGL,gBAAgB,CAACK,OAAO;AAC5DJ,yBAAyB,CAACK,OAAO,GAAGN,gBAAgB,CAACM,OAAO;AAC5DL,yBAAyB,CAACM,SAAS,GAAG;EAClCT;AACJ,CAAC;AAEDG,yBAAyB,CAACO,IAAI,CAAC,CAAC;AAIhC,OAAO,MAAMT,UAAU,GAAGE,yBAAsE","ignoreList":[]}
|
@@ -1,2 +1 @@
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","get"],"sourceRoot":"../../../../src","sources":["specs/TurboUnistyles/NativeTurboUnistyles.
|
2
|
-
reList":[]}
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","get"],"sourceRoot":"../../../../src","sources":["specs/TurboUnistyles/NativeTurboUnistyles.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;;AAElD;AACA;;AAGAA,mBAAmB,CAACC,GAAG,CAAO,WAAW,CAAC","ignoreList":[]}
|
@@ -1,2 +1 @@
|
|
1
|
-
{"version":3,"names":["processColor","NitroModules","attachStatusBarJSMethods","attachNavigationBarJSMethods","isIOS","HybridUnistylesRuntime","createHybridObject","statusBar","createHybridStatusBar","navigationBar","createHybridNavigationBar","_setRootViewBackgroundColor","setRootViewBackgroundColor","color","parsedColor","setImmersiveMode","isEnabled","setHidden","Runtime"],"sourceRoot":"../../../../src","sources":["specs/UnistylesRuntime/index.
|
2
|
-
":[]}
|
1
|
+
{"version":3,"names":["processColor","NitroModules","attachStatusBarJSMethods","attachNavigationBarJSMethods","isIOS","HybridUnistylesRuntime","createHybridObject","statusBar","createHybridStatusBar","navigationBar","createHybridNavigationBar","_setRootViewBackgroundColor","setRootViewBackgroundColor","color","parsedColor","setImmersiveMode","isEnabled","setHidden","Runtime"],"sourceRoot":"../../../../src","sources":["specs/UnistylesRuntime/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,cAAc;AAC3C,SAASC,YAAY,QAAQ,4BAA4B;AAGzD,SAASC,wBAAwB,QAAiC,cAAc;AAChF,SAASC,4BAA4B,QAAqC,iBAAiB;AAE3F,SAASC,KAAK,QAAQ,cAAc;AAkCpC,MAAMC,sBAAsB,GAAGJ,YAAY,CACtCK,kBAAkB,CAA0B,kBAAkB,CAAC;AAEpED,sBAAsB,CAACE,SAAS,GAAGF,sBAAsB,CAACG,qBAAqB,CAAC,CAAC;AACjFH,sBAAsB,CAACI,aAAa,GAAGJ,sBAAsB,CAACK,yBAAyB,CAAC,CAAC;AACzFL,sBAAsB,CAACM,2BAA2B,GAAGN,sBAAsB,CAACO,0BAA0B;AAEtGP,sBAAsB,CAACO,0BAA0B,GAAIC,KAAc,IAAK;EACpE,MAAMC,WAAW,GAAGd,YAAY,CAACa,KAAK,CAAC,IAAI,CAAC;EAE5CR,sBAAsB,CAACM,2BAA2B,CAACG,WAAqB,CAAC;AAC7E,CAAC;AAED,IAAIV,KAAK,EAAE;EACPC,sBAAsB,CAACU,gBAAgB,GAAIC,SAAkB,IAAKX,sBAAsB,CAACE,SAAS,CAACU,SAAS,CAACD,SAAS,EAAE,MAAM,CAAC;AACnI;AAEAd,wBAAwB,CAACG,sBAAsB,CAACE,SAAS,CAAC;AAC1DJ,4BAA4B,CAACE,sBAAsB,CAACI,aAAa,CAAC;AAElE,OAAO,MAAMS,OAAO,GAAGb,sBAA0C","ignoreList":[]}
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":["getSSRUnistyles"],"sourceRoot":"../../../src","sources":["specs/index.web.
|
1
|
+
{"version":3,"names":["getSSRUnistyles"],"sourceRoot":"../../../src","sources":["specs/index.web.js"],"mappings":";;AAAA,OAAO,MAAMA,eAAe,GAAGA,CAAA,KAAM,EAAE;AACvC,cAAc,QAAQ","ignoreList":[]}
|
2
|
+
|
@@ -1,7 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
export
|
4
|
-
(function (IOSContentSizeCategory) {
|
3
|
+
export let IOSContentSizeCategory = /*#__PURE__*/function (IOSContentSizeCategory) {
|
5
4
|
IOSContentSizeCategory["AccessibilityExtraExtraExtraLarge"] = "accessibilityExtraExtraExtraLarge";
|
6
5
|
IOSContentSizeCategory["AccessibilityExtraExtraLarge"] = "accessibilityExtraExtraLarge";
|
7
6
|
IOSContentSizeCategory["AccessibilityExtraLarge"] = "accessibilityExtraLarge";
|
@@ -15,9 +14,9 @@ export var IOSContentSizeCategory;
|
|
15
14
|
IOSContentSizeCategory["Small"] = "Small";
|
16
15
|
IOSContentSizeCategory["ExtraSmall"] = "xSmall";
|
17
16
|
IOSContentSizeCategory["Unspecified"] = "unspecified";
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
return IOSContentSizeCategory;
|
18
|
+
}({});
|
19
|
+
export let AndroidContentSizeCategory = /*#__PURE__*/function (AndroidContentSizeCategory) {
|
21
20
|
AndroidContentSizeCategory["Small"] = "Small";
|
22
21
|
AndroidContentSizeCategory["Default"] = "Default";
|
23
22
|
AndroidContentSizeCategory["Large"] = "Large";
|
@@ -25,9 +24,10 @@ export var AndroidContentSizeCategory;
|
|
25
24
|
AndroidContentSizeCategory["Huge"] = "Huge";
|
26
25
|
AndroidContentSizeCategory["ExtraHuge"] = "ExtraHuge";
|
27
26
|
AndroidContentSizeCategory["ExtraExtraHuge"] = "ExtraExtraHuge";
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
return AndroidContentSizeCategory;
|
28
|
+
}({});
|
29
|
+
export let WebContentSizeCategory = /*#__PURE__*/function (WebContentSizeCategory) {
|
31
30
|
WebContentSizeCategory["Unspecified"] = "web-unspecified";
|
32
|
-
|
33
|
-
|
31
|
+
return WebContentSizeCategory;
|
32
|
+
}({});
|
33
|
+
//# sourceMappingURL=accessibility.js.mappingURL=accessibility.js.map
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":["IOSContentSizeCategory","AndroidContentSizeCategory","WebContentSizeCategory"],"sourceRoot":"../../../src","sources":["types/accessibility.
|
1
|
+
{"version":3,"names":["IOSContentSizeCategory","AndroidContentSizeCategory","WebContentSizeCategory"],"sourceRoot":"../../../src","sources":["types/accessibility.ts"],"mappings":";;AAAA,WAAYA,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA;AAgBlC,WAAYC,0BAA0B,0BAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAAA,OAA1BA,0BAA0B;AAAA;AAUtC,WAAYC,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA","ignoreList":[]}
|
2
|
+
AAO,CAAC,GAAG,OAAO;EACzCA,sBAAsB,CAAC,YAAY,CAAC,GAAG,QAAQ;EAC/CA,sBAAsB,CAAC,aAAa,CAAC,GAAG,aAAa;AACzD,CAAC,EAAEA,sBAAsB,KAAKA,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC;AAC3D,OAAO,IAAIC,0BAA0B;AACrC,CAAC,UAAUA,0BAA0B,EAAE;EACnCA,0BAA0B,CAAC,OAAO,CAAC,GAAG,OAAO;EAC7CA,0BAA0B,CAAC,SAAS,CAAC,GAAG,SAAS;EACjDA,0BAA0B,CAAC,OAAO,CAAC,GAAG,OAAO;EAC7CA,0BAA0B,CAAC,YAAY,CAAC,GAAG,YAAY;EACvDA,0BAA0B,CAAC,MAAM,CAAC,GAAG,MAAM;EAC3CA,0BAA0B,CAAC,WAAW,CAAC,GAAG,WAAW;EACrDA,0BAA0B,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;AACnE,CAAC,EAAEA,0BAA0B,KAAKA,0BAA0B,GAAG,CAAC,CAAC,CAAC,CAAC;AACnE,OAAO,IAAIC,sBAAsB;AACjC,CAAC,UAAUA,sBAAsB,EAAE;EAC/BA,sBAAsB,CAAC,aAAa,CAAC,GAAG,iBAAiB;AAC7D,CAAC,EAAEA,sBAAsB,KAAKA,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/common.
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/common.ts"],"mappings":"","ignoreList":[]}
|
2
|
+
":[]}
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/core.
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/core.ts"],"mappings":"","ignoreList":[]}
|
2
|
+
":[]}
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":["AndroidContentSizeCategory","IOSContentSizeCategory","WebContentSizeCategory"],"sourceRoot":"../../../src","sources":["types/index.
|
1
|
+
{"version":3,"names":["AndroidContentSizeCategory","IOSContentSizeCategory","WebContentSizeCategory"],"sourceRoot":"../../../src","sources":["types/index.js"],"mappings":";;AAAA,SAASA,0BAA0B,EAAEC,sBAAsB,EAAEC,sBAAsB,QAAQ,iBAAiB","ignoreList":[]}
|
2
|
+
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":["create","stylesheet"],"sourceRoot":"../../../src","sources":["types/stylesheet.
|
1
|
+
{"version":3,"names":["create","stylesheet"],"sourceRoot":"../../../src","sources":["types/stylesheet.js"],"mappings":";;AAAA,MAAMA,MAAM,GAAIC,UAAU,IAAKA,UAAU;AACzC","ignoreList":[]}
|
2
|
+
List":[]}
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/variants.
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/variants.ts"],"mappings":"","ignoreList":[]}
|
2
|
+
":[]}
|
@@ -20,7 +20,6 @@ export const convertUnistyles = value => {
|
|
20
20
|
if (['_classNames', '_web', 'variants', 'compoundVariants', 'uni__dependencies', '__unistyles-secrets__'].includes(unistylesKey) || unistylesKey.startsWith('variant-')) {
|
21
21
|
return [];
|
22
22
|
}
|
23
|
-
|
24
23
|
// Pseudo classes :hover, :before etc.
|
25
24
|
if (isPseudo(unistylesKey)) {
|
26
25
|
const flattenValues = convertUnistyles(unistylesValue);
|
@@ -28,7 +27,6 @@ export const convertUnistyles = value => {
|
|
28
27
|
[unistylesKey]: flattenValues
|
29
28
|
};
|
30
29
|
}
|
31
|
-
|
32
30
|
// Text shadow
|
33
31
|
if (isTextShadow(unistylesKey)) {
|
34
32
|
if (hasTextShadow) {
|
@@ -37,7 +35,6 @@ export const convertUnistyles = value => {
|
|
37
35
|
hasTextShadow = true;
|
38
36
|
return getTextShadowStyle(value);
|
39
37
|
}
|
40
|
-
|
41
38
|
// Box shadow
|
42
39
|
if (isBoxShadow(unistylesKey)) {
|
43
40
|
if (hasBoxShadow) {
|
@@ -46,12 +43,10 @@ export const convertUnistyles = value => {
|
|
46
43
|
hasBoxShadow = true;
|
47
44
|
return getBoxShadowStyle(value);
|
48
45
|
}
|
49
|
-
|
50
46
|
// Transforms
|
51
47
|
if (isTransform(unistylesKey, unistylesValue)) {
|
52
48
|
return getTransformStyle(unistylesValue);
|
53
49
|
}
|
54
|
-
|
55
50
|
// Breakpoints
|
56
51
|
if (typeof unistylesValue === 'object' && unistylesValue !== null) {
|
57
52
|
return Object.entries(unistylesValue).map(([breakpointKey, breakpointValue]) => {
|
@@ -60,10 +55,9 @@ export const convertUnistyles = value => {
|
|
60
55
|
};
|
61
56
|
});
|
62
57
|
}
|
63
|
-
|
64
58
|
// Regular styles
|
65
59
|
return getStyle(unistylesKey, unistylesValue);
|
66
60
|
});
|
67
61
|
return deepMergeObjects(...stylesArray);
|
68
62
|
};
|
69
|
-
//# sourceMappingURL=index.js.map
|
63
|
+
//# sourceMappingURL=index.js.mapjs.map
|
@@ -1,2 +1 @@
|
|
1
|
-
{"version":3,"names":["pseudos","isPseudo","selector","some","pseudo","startsWith"],"sourceRoot":"../../../../src","sources":["web/convert/pseudo.
|
2
|
-
|
1
|
+
{"version":3,"names":["pseudos","isPseudo","selector","some","pseudo","startsWith"],"sourceRoot":"../../../../src","sources":["web/convert/pseudo.ts"],"mappings":";;AAAA,OAAO,MAAMA,OAAO,GAAG,CACnB,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,EACf,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,SAAS,EACT,WAAW,EACX,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,OAAO,EACP,WAAW,EACX,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,SAAS,EACT,OAAO,EACP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F,QAAQ,CAACG,UAAU,CAACD,MAAM,CAAC,CAAC","ignoreList":[]}
|
@@ -12,23 +12,19 @@ export const validateShadow = (shadowProperties, styles, breakpoints) => {
|
|
12
12
|
width,
|
13
13
|
height
|
14
14
|
} = value;
|
15
|
-
|
16
15
|
// If shadowOffset.width has breakpoints
|
17
16
|
if (typeof width === 'object') {
|
18
17
|
Object.keys(width).forEach(breakpoint => breakpoints.add(breakpoint));
|
19
18
|
}
|
20
|
-
|
21
19
|
// If shadowOffset.height has breakpoints
|
22
20
|
if (typeof height === 'object') {
|
23
21
|
Object.keys(height).forEach(breakpoint => breakpoints.add(breakpoint));
|
24
22
|
}
|
25
23
|
return;
|
26
24
|
}
|
27
|
-
|
28
25
|
// Collect regular breakpoints
|
29
26
|
Object.keys(value).forEach(breakpoint => breakpoints.add(breakpoint));
|
30
27
|
});
|
31
|
-
|
32
28
|
// Validate if all breakpoints are present
|
33
29
|
shadowProperties.forEach(key => {
|
34
30
|
const value = styles[key];
|
@@ -60,4 +56,4 @@ export const validateShadow = (shadowProperties, styles, breakpoints) => {
|
|
60
56
|
}
|
61
57
|
});
|
62
58
|
};
|
63
|
-
//# sourceMappingURL=shadow.js.map
|
59
|
+
//# sourceMappingURL=shadow.js.map.map
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":["validateShadow","shadowProperties","styles","breakpoints","forEach","key","value","width","height","Object","keys","breakpoint","add","missingBreakpoints","Array","from","filter","length","join"],"sourceRoot":"../../../../src","sources":["web/convert/shadow.
|
1
|
+
{"version":3,"names":["validateShadow","shadowProperties","styles","breakpoints","forEach","key","value","width","height","Object","keys","breakpoint","add","missingBreakpoints","Array","from","filter","length","join"],"sourceRoot":"../../../../src","sources":["web/convert/shadow.js"],"mappings":";;AAAA,OAAO,MAAMA,cAAc,GAAGA,CAACC,gBAAgB,EAAEC,MAAM,EAAEC,WAAW,KAAK;EACrE;EACAF,gBAAgB,CAACG,OAAO,CAACC,GAAG,IAAI;IAC5B,MAAMC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M,0BAA0BZ,GAAG,WAAWQ,kBAAkB,CAACK,IAAI,CAAC,IAAI,CAAC,EAAE;QACjF;MACJ;MACA,IAAI,OAAOV,MAAM,KAAK,QAAQ,EAAE;QAC5B,MAAMK,kBAAkB,GAAGC,KAAK,CAACC,IAAI,CAACZ,WAAW,CAAC,CAACa,MAAM,CAACL,UAAU,IAAI,EAAEA,UAAU,IAAIH,MAAM,CAAC,CAAC;QAChG,IAAIK,kBAAkB,CAACI,MAAM,EAAE;UAC3B,MAAM,0BAA0BZ,GAAG,YAAYQ,kBAAkB,CAACK,IAAI,CAAC,IAAI,CAAC,EAAE;QAClF;MACJ;MACA;IACJ;IACA,MAAML,kBAAkB,GAAGC,KAAK,CAACC,IAAI,CAACZ,WAAW,CAAC,CAACa,MAAM,CAACL,UAAU,IAAI,EAAEA,UAAU,IAAIL,KAAK,CAAC,CAAC;IAC/F,IAAIO,kBAAkB,CAACI,MAAM,EAAE;MAC3B,MAAM,0BAA0BZ,GAAG,KAAKQ,kBAAkB,CAACK,IAAI,CAAC,IAAI,CAAC,EAAE;IAC3E;EACJ,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
2
|
+
st":[]}
|
@@ -1,2 +1 @@
|
|
1
|
-
{"version":3,"names":["deepMergeObjects","keyInObject","normalizeNumericValue","normalizeTransform","key","value","includes","createTransformValue","transforms","map","transform","Object","keys","undefined","join","filter","Boolean","getTransformStyle","breakpoints","Set","normalTransforms","forEach","property","Array","isArray","breakpoint","add","push","breakpointTransforms","from","flatMap","transformsPerBreakpoint"],"sourceRoot":"../../../../src","sources":["web/convert/transform.
|
2
|
-
]}
|
1
|
+
{"version":3,"names":["deepMergeObjects","keyInObject","normalizeNumericValue","normalizeTransform","key","value","includes","createTransformValue","transforms","map","transform","Object","keys","undefined","join","filter","Boolean","getTransformStyle","breakpoints","Set","normalTransforms","forEach","property","Array","isArray","breakpoint","add","push","breakpointTransforms","from","flatMap","transformsPerBreakpoint"],"sourceRoot":"../../../../src","sources":["web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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["TEXT_SHADOW_STYLES","BOX_SHADOW_STYLES"],"sourceRoot":"../../../../src","sources":["web/convert/types.
|
1
|
+
{"version":3,"names":["TEXT_SHADOW_STYLES","BOX_SHADOW_STYLES"],"sourceRoot":"../../../../src","sources":["web/convert/types.ts"],"mappings":";;AAKA,OAAO,MAAMA,kBAAkB,GAAG,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,CAAU;AAItG,OAAO,MAAMC,iBAAiB,GAAG,CAAC,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,CAAU","ignoreList":[]}
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":["normalizeColors","BOX_SHADOW_STYLES","TEXT_SHADOW_STYLES","isTransform","key","value","Array","isArray","isTextShadow","includes","isBoxShadow","normalizeNumericValue","normalizeColor","color","opacity","integer","hex","toString","padStart","length","r","g","b","a","split","map","x","parseInt","filter","num","isNaN","extractShadowValue","breakpoint","styles","width","height"],"sourceRoot":"../../../../src","sources":["web/convert/utils.
|
1
|
+
{"version":3,"names":["normalizeColors","BOX_SHADOW_STYLES","TEXT_SHADOW_STYLES","isTransform","key","value","Array","isArray","isTextShadow","includes","isBoxShadow","normalizeNumericValue","normalizeColor","color","opacity","integer","hex","toString","padStart","length","r","g","b","a","split","map","x","parseInt","filter","num","isNaN","extractShadowValue","breakpoint","styles","width","height"],"sourceRoot":"../../../../src","sources":["web/convert/utils.js"],"mappings":";;AAAA;AACA;AACA,OAAOA,eAAe,MAAM,gCAAgC;AAC5D,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,SAAS;AAC/D,OAAO,MAAMC,WAAW,GAAGA,CAACC,GAAG,EAAEC,KAAK,KAAKD,GAAG,KAAK,WAAW,IAAIE,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC;AACtF,OAAO,MAAMG,YAAY,GAAIJ,GAAG,IAAKF,kBAAkB,CAACO,QAAQ,CAACL,GAAG,C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AAc,EAAE;IACtD,MAAM;MAAE8B,KAAK;MAAEC;IAAO,CAAC,GAAG9B,KAAK;IAC/B,OAAO;MACH6B,KAAK,EAAE,OAAOA,KAAK,KAAK,QAAQ,GAAGA,KAAK,CAACF,UAAU,CAAC,GAAGE,KAAK;MAC5DC,MAAM,EAAE,OAAOA,MAAM,KAAK,QAAQ,GAAGA,MAAM,CAACH,UAAU,CAAC,GAAGG;IAC9D,CAAC;EACL;EACA,OAAO,OAAO9B,KAAK,KAAK,QAAQ,GAAGA,KAAK,CAAC2B,UAAU,CAAC,GAAG3B,KAAK;AAChE,CAAC","ignoreList":[]}
|
2
|
+
st":[]}
|
package/lib/module/web/create.js
CHANGED
@@ -23,21 +23,17 @@ export const create = stylesheet => {
|
|
23
23
|
[key]: result
|
24
24
|
}, copyVariants()));
|
25
25
|
const resultWithVariants = deepMergeObjects(result, variants[key] ?? {});
|
26
|
-
|
27
26
|
// Add secrets to result of dynamic styles function
|
28
27
|
return addSecrets(getStyles(resultWithVariants), key, args);
|
29
28
|
};
|
30
|
-
|
31
29
|
// Add secrets to dynamic styles function
|
32
30
|
return addSecrets(dynamicStyle, key);
|
33
31
|
}
|
34
|
-
|
35
32
|
// Add secrets to static styles
|
36
33
|
return addSecrets(getStyles(value), key);
|
37
34
|
});
|
38
|
-
|
39
35
|
// Inject useVariants hook to styles
|
40
36
|
createUseVariants(styles, newVariants => Object.entries(newVariants).forEach(([key, value]) => selectedVariants.set(key, value)));
|
41
37
|
return styles;
|
42
38
|
};
|
43
|
-
//# sourceMappingURL=create.js.map
|
39
|
+
//# sourceMappingURL=create.js.map.map
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":["assignSecrets","reduceObject","getStyles","deepMergeObjects","UnistylesRuntime","createUseVariants","getVariants","create","stylesheet","computedStylesheet","theme","miniRuntime","selectedVariants","Map","copyVariants","Object","fromEntries","entries","addSecrets","value","key","args","__uni__key","__uni__refs","Set","__uni__stylesheet","__uni__args","__uni__variants","styles","_key","String","dynamicStyle","result","variants","resultWithVariants","newVariants","forEach","set"],"sourceRoot":"../../../src","sources":["web/create.
|
1
|
+
{"version":3,"names":["assignSecrets","reduceObject","getStyles","deepMergeObjects","UnistylesRuntime","createUseVariants","getVariants","create","stylesheet","computedStylesheet","theme","miniRuntime","selectedVariants","Map","copyVariants","Object","fromEntries","entries","addSecrets","value","key","args","__uni__key","__uni__refs","Set","__uni__stylesheet","__uni__args","__uni__variants","styles","_key","String","dynamicStyle","result","variants","resultWithVariants","newVariants","forEach","set"],"sourceRoot":"../../../src","sources":["web/create.js"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,YAAY,EAAEC,SAAS,EAAEC,gBAAgB,QAAQ,SAAS;AAClF,SAASC,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,iBAAiB,EAAEC,WAAW,QAAQ,YAAY;AAC3D,OAAO,MAAMC,MAAM,GAAIC,UAAU,IAAK;EAClC,MAAMC,kBAAkB,GAAG,OAAOD,UAAU,KAAK,UAAU,GACrDA,UAAU,CAACJ,gBAAgB,CAACM,KAAK,EAAEN,gBAAgB,CAACO,WAAW,CAAC,GAChEH,UAAU;EAChB,MAAMI,gBAAgB,GAAG,IAAIC,GAAG,CAAC,CAAC;EAClC,MAAMC,YAAY,GAAGA,CAAA,KAAMC,MAAM,CAACC,WAAW,CAACJ,gBAAgB,CAACK,OAAO,CAAC,CAAC,CAAC;EACzE,MAAMC,UAAU,GAAGA,CAACC,KAAK,EAAEC,GAAG,EAAEC,IAAI,KAAKrB,aAAa,CAACmB,KAAK,EAAE;IAC1DG,UAAU,EAAEF,GAAG;IACfG,WAAW,EAAE,IAAIC,GAAG,CAAC,CAAC;IACtBC,iBAAiB,EAAEjB,UAAU;IAC7BkB,WAAW,EAAEL,IAAI;IACjBM,eAAe,EAAEb,YAAY,CAAC;EAClC,CAAC,CAAC;EACF,MAAMc,MAAM,GAAG3B,YAAY,CAACQ,kBAAkB,EAAE,CAACU,KAAK,EAAEU,IAAI,KAAK;IAC7D,MAAMT,GAAG,GAAGU,MAAM,CAACD,IAAI,CAAC;IACxB,IAAI,OAAOV,KAAK,KAAK,UAAU,EAAE;MAC7B,MAAMY,YAAY,GAAGA,CAAC,GAAGV,IAAI,KAAK;QAC9B,MAAMW,MAAM,GAAGb,KAAK,CAAC,GAAGE,IAAI,CAAC;QAC7B,MAAMY,QAAQ,GAAGlB,MAAM,CAACC,WAAW,CAACV,WAAW,CAAC;UAAE,CAACc,GAAG,GAAGY;QAAO,CAAC,EAAElB,YAAY,CAAC,CAAC,CAAC,CAAC;QACnF,MAAMoB,kBAAkB,GAAG/B,gBAAgB,CAAC6B,MAAM,EAAEC,QAAQ,CAACb,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;QACxE;QACA,OAAOF,UAAU,CAAChB,SAAS,CAACgC,kBAAkB,CAAC,EAAEd,GAAG,EAAEC,IAAI,CAAC;MAC/D,CAAC;MACD;MACA,OAAOH,UAAU,CAACa,YAAY,EAAEX,GAAG,CAAC;IACxC;IACA;IACA,OAAOF,UAAU,CAAChB,SAAS,CAACiB,KAAK,CAAC,EAAEC,GAAG,CAAC;EAC5C,CAAC,CAAC;EACF;EACAf,iBAAiB,CAACuB,MAAM,EAAEO,WAAW,IAAIpB,MAAM,CAACE,OAAO,CAACkB,WAAW,CAAC,CAACC,OAAO,CAAC,CAAC,CAAChB,GAAG,EAAED,KAAK,CAAC,KAAKP,gBAAgB,CAACyB,GAAG,CAACjB,GAAG,EAAED,KAAK,CAAC,CAAC,CAAC;EACjI,OAAOS,MAAM;AACjB,CAAC","ignoreList":[]}
|
2
|
+
List":[]}
|
package/lib/module/web/index.js
CHANGED
@@ -20,7 +20,6 @@ export const StyleSheet = {
|
|
20
20
|
export { UnistylesRuntime } from './runtime';
|
21
21
|
export { UnistylesShadowRegistry } from './shadowRegistry';
|
22
22
|
export * from './mock';
|
23
|
-
|
24
23
|
// TODO: Work on SSR
|
25
24
|
export const getSSRUnistyles = () => [];
|
26
|
-
//# sourceMappingURL=index.js.
|
25
|
+
//# sourceMappingURL=index.js.mapp
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":["create","UnistylesState","deepMergeObjects","StyleSheet","configure","init","absoluteFill","position","left","top","right","bottom","compose","a","b","flatten","styles","hairlineWidth","UnistylesRuntime","UnistylesShadowRegistry","getSSRUnistyles"],"sourceRoot":"../../../src","sources":["web/index.
|
1
|
+
{"version":3,"names":["create","UnistylesState","deepMergeObjects","StyleSheet","configure","init","absoluteFill","position","left","top","right","bottom","compose","a","b","flatten","styles","hairlineWidth","UnistylesRuntime","UnistylesShadowRegistry","getSSRUnistyles"],"sourceRoot":"../../../src","sources":["web/index.js"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,UAAU;AACjC,SAASC,cAAc,QAAQ,SAAS;AACxC,SAASC,gBAAgB,QAAQ,SAAS;AAC1C,OAAO,MAAMC,UAAU,GAAG;EACtBC,SAAS,EAAEH,cAAc,CAACI,IAAI;EAC9BL,MAAM;EACNM,YAAY,EAAE;IACVC,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE;EACZ,CAAC;EACDC,OAAO,EAAEA,CAACC,CAAC,EAAEC,CAAC,KAAKZ,gBAAgB,CAACW,CAAC,EAAEC,CAAC,CAAC;EACzCC,OAAO,EAAEA,CAAC,GAAGC,MAAM,KAAKd,gBAAgB,CAAC,GAAGc,MAAM,CAAC;EACnDC,aAAa,EAAE;AACnB,CAAC;AACD,SAASC,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,cAAc,QAAQ;AACtB;AACA,OAAO,MAAMC,eAAe,GAAGA,CAAA,KAAM,EAAE","ignoreList":[]}
|
2
|
+
}
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":["UnistyleDependency","UnistylesRuntime","UnistylesListenerBuilder","isInitialized","listeners","Array","from","length","Object","keys","Set","emitChange","dependency","forEach","listener","initListeners","darkMedia","addEventListener","ColorScheme","lightMedia","window","Orientation","Dimensions","addListeners","dependencies","add","delete","UnistylesListener"],"sourceRoot":"../../../src","sources":["web/listener.
|
1
|
+
{"version":3,"names":["UnistyleDependency","UnistylesRuntime","UnistylesListenerBuilder","isInitialized","listeners","Array","from","length","Object","keys","Set","emitChange","dependency","forEach","listener","initListeners","darkMedia","addEventListener","ColorScheme","lightMedia","window","Orientation","Dimensions","addListeners","dependencies","add","delete","UnistylesListener"],"sourceRoot":"../../../src","sources":["web/listener.js"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,gBAAgB,QAAQ,WAAW;AAC5C,MAAMC,wBAAwB,CAAC;EAC3BC,aAAa,GAAG,KAAK;EACrBC,SAAS,GAAGC,KAAK,CAACC,IAAI,CAAC;IAAEC,MAAM,EAAEC,MAAM,CAACC,IAAI,CAACT,kBAAkB,CAAC,CAACO,MAAM,GAAG;EAAE,CAAC,EAAE,MAAM,IAAIG,GAAG,CAAC,CAAC,CAAC;EAC/FC,UAAU,GAAIC,UAAU,IAAK;IACzB,IAAI,CAACR,SAAS,CAACQ,UAAU,CAAC,EAAEC,OAAO,CAACC,QAAQ,IAAIA,QAAQ,CAAC,CAAC,CAAC;EAC/D,CAAC;EACDC,aAAa,GAAGA,CAAA,KAAM;IAClB,IAAI,IAAI,CAACZ,aAAa,EAAE;MACpB;IACJ;IACA,IAAI,CAACA,aAAa,GAAG,IAAI;IACzBF,gBAAgB,CAACe,SAAS,EAAEC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAACN,UAAU,CAACX,kBAAkB,CAACkB,WAAW,CAAC,CAAC;IAC7GjB,gBAAgB,CAACkB,UAAU,EAAEF,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAACN,UAAU,CAACX,kBAAkB,CAACkB,WAAW,CAAC,CAAC;IAC9GE,MAAM,CAACH,gBAAgB,CAAC,mBAAmB,EAAE,MAAM,IAAI,CAACN,UAAU,CAACX,kBAAkB,CAACqB,WAAW,CAAC,CAAC;IACnGD,MAAM,CAACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAACN,UAAU,CAACX,kBAAkB,CAACsB,UAAU,CAAC,CAAC;EAC3F,CAAC;EACDC,YAAY,GAAGA,CAACC,YAAY,EAAEV,QAAQ,KAAK;IACvCU,YAAY,CAACX,OAAO,CAACD,UAAU,IAAI,IAAI,CAACR,SAAS,CAACQ,UAAU,CAAC,EAAEa,GAAG,CAACX,QAAQ,CAAC,CAAC;IAC7E,OAAO,MAAM;MACTU,YAAY,CAACX,OAAO,CAACD,UAAU,IAAI,IAAI,CAACR,SAAS,CAACQ,UAAU,CAAC,EAAEc,MAAM,CAACZ,QAAQ,CAAC,CAAC;IACpF,CAAC;EACL,CAAC;AACL;AACA,OAAO,MAAMa,iBAAiB,GAAG,IAAIzB,wBAAwB,CAAC,CAAC","ignoreList":[]}
|
2
|
+
]}
|
@@ -1,2 +1 @@
|
|
1
|
-
{"version":3,"names":["UnistylesRuntime","extractMediaQueryValue","keyInObject","getMediaQuery","generateHash","extractUnistyleDependencies","deepMergeObjects","UnistylesListener","convertUnistyles","getVariants","UnistylesRegistryBuilder","stylesheets","Map","stylesCounter","styleTag","disposeListenersMap","dependenciesMap","tag","newTag","document","createElement","id","head","appendChild","getComputedStylesheet","stylesheet","computedStylesheet","get","createdStylesheet","theme","miniRuntime","dependencies","Object","values","flatMap","value","addDependenciesToStylesheet","set","Set","forEach","dependency","add","dispose","addListeners","Array","from","newComputedStylesheet","key","args","variants","hash","existingCounter","size","counter","applyStyles","Promise","resolve","newComputedStyleSheet","newValue","result","variantsResult","fromEntries","resultWithVariants","styles","entries","sheet","startsWith","mediaQuery","cssRules","queryRule","find","rule","CSSMediaRule","media","item","includes","mediaQueryValue","ruleIndex","reduce","acc","ruleMediaQueryValue","conditionText","undefined","length","insertRule","mqKey","mqValue","applyRule","pseudoKey","pseudoValue","replace","CSSStyleRule","selectorText","style","remove","existingStyles","delete","findIndex","cssText","deleteRule","UnistylesRegistry"],"sourceRoot":"../../../src","sources":["web/registry.
|
2
|
-
,"ignoreList":[]}
|
1
|
+
{"version":3,"names":["UnistylesRuntime","extractMediaQueryValue","keyInObject","getMediaQuery","generateHash","extractUnistyleDependencies","deepMergeObjects","UnistylesListener","convertUnistyles","getVariants","UnistylesRegistryBuilder","stylesheets","Map","stylesCounter","styleTag","disposeListenersMap","dependenciesMap","tag","newTag","document","createElement","id","head","appendChild","getComputedStylesheet","stylesheet","computedStylesheet","get","createdStylesheet","theme","miniRuntime","dependencies","Object","values","flatMap","value","addDependenciesToStylesheet","set","Set","forEach","dependency","add","dispose","addListeners","Array","from","newComputedStylesheet","key","args","variants","hash","existingCounter","size","counter","applyStyles","Promise","resolve","newComputedStyleSheet","newValue","result","variantsResult","fromEntries","resultWithVariants","styles","entries","sheet","startsWith","mediaQuery","cssRules","queryRule","find","rule","CSSMediaRule","media","item","includes","mediaQueryValue","ruleIndex","reduce","acc","ruleMediaQueryValue","conditionText","undefined","length","insertRule","mqKey","mqValue","applyRule","pseudoKey","pseudoValue","replace","CSSStyleRule","selectorText","style","remove","existingStyles","delete","findIndex","cssText","deleteRule","UnistylesRegistry"],"sourceRoot":"../../../src","sources":["web/registry.ts"],"mappings":";;AAEA,SAASA,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,sBAAsB,EAAEC,WAAW,EAAEC,aAAa,EAAEC,YAAY,EAAEC,2BAA2B,EAAEC,gBAAgB,QAAQ,SAAS;AACzI,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,gBAAgB,QAAQ,WAAW;AAG5C,SAASC,WAAW,QAAQ,YAAY;AAmBxC,MAAMC,wBAAwB,CAAC;EACVC,WAAW,GAAG,IAAIC,GAAG,CAAoD,CAAC;EAC1EC,aAAa,GAAG,IAAID,GAAG,CAA+B,CAAC;EACxE,CAACE,QAAQ,GAA4B,IAAI;EACxBC,mBAAmB,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AQ,CAACM,IAAI,CAACT,KAAK,CAACmB,UAAU,CAAC,IAAIlC,IAAI,KAAK,CAAC,CAAC;IAC/D;IAEA,IAAI,EAAEqB,IAAI,YAAYoB,YAAY,CAAC,IAAI,CAACzF,WAAW,CAACqE,IAAI,CAACsB,KAAK,EAAE9C,GAAG,CAAC,EAAE;MAClE;IACJ;IAEAwB,IAAI,CAACsB,KAAK,CAAC9C,GAAG,CAAwC,GAAGZ,KAAK;EAClE,CAAC;EAED2D,MAAM,GAAI3D,KAAsB,IAAK;IACjC,MAAMe,IAAI,GAAG9C,YAAY,CAAC+B,KAAK,CAAC;IAChC,MAAM4D,cAAc,GAAG,IAAI,CAAClF,aAAa,CAACc,GAAG,CAACuB,IAAI,CAAC;IAEnD,IAAI,CAAC6C,cAAc,EAAE;MACjB;IACJ;IAEAA,cAAc,CAACC,MAAM,CAAC7D,KAAK,CAAC;IAE5B,IAAI4D,cAAc,CAAC3C,IAAI,KAAK,CAAC,EAAE;MAC3B,MAAMyB,SAAS,GAAGjC,KAAK,CAACC,IAAI,CAAC,IAAI,CAAC/B,QAAQ,CAACmD,KAAK,EAAEG,QAAQ,IAAI,EAAE,CAAC,CAAC6B,SAAS,CAAC1B,IAAI,IAAIA,IAAI,CAAC2B,OAAO,CAACvB,QAAQ,CAAC,IAAIzB,IAAI,EAAE,CAAC,CAAC;MAEtH,IAAI,CAACpC,QAAQ,CAACmD,KAAK,EAAEkC,UAAU,CAACtB,SAAS,CAAC;IAC9C;EACJ,CAAC;AACL;AAEA,OAAO,MAAMuB,iBAAiB,GAAG,IAAI1F,wBAAwB,CAAC,CAAC","ignoreList":[]}
|
@@ -1,2 +1 @@
|
|
1
|
-
{"version":3,"names":["UnistyleDependency","ColorScheme","Orientation","WebContentSizeCategory","UnistylesListener","NavigationBar","StatusBar","UnistylesState","hexToRGBA","isServer","schemeToTheme","UnistylesRuntimeBuilder","lightMedia","getLightMedia","darkMedia","getDarkMedia","window","matchMedia","colorScheme","matches","Light","Dark","Unspecified","themeName","contentSizeCategory","breakpoint","orientation","Portrait","screen","type","includes","Landscape","theme","getTheme","pixelRatio","devicePixelRatio","width","height","innerWidth","innerHeight","fontScale","insets","top","bottom","left","right","ime","statusBar","rtl","document","documentElement","dir","hasAdaptiveThemes","navigationBar","miniRuntime","isLandscape","isPortrait","setTheme","UnistylesRuntime","emitChange","Theme","ThemeName","setAdaptiveThemes","isEnabled","setRootViewBackgroundColor","hex","alpha","style","backgroundColor","setImmersiveMode","updateTheme","updater","oldTheme","themes","get","Error","set"],"sourceRoot":"../../../src","sources":["web/runtime.
|
2
|
-
reList":[]}
|
1
|
+
{"version":3,"names":["UnistyleDependency","ColorScheme","Orientation","WebContentSizeCategory","UnistylesListener","NavigationBar","StatusBar","UnistylesState","hexToRGBA","isServer","schemeToTheme","UnistylesRuntimeBuilder","lightMedia","getLightMedia","darkMedia","getDarkMedia","window","matchMedia","colorScheme","matches","Light","Dark","Unspecified","themeName","contentSizeCategory","breakpoint","orientation","Portrait","screen","type","includes","Landscape","theme","getTheme","pixelRatio","devicePixelRatio","width","height","innerWidth","innerHeight","fontScale","insets","top","bottom","left","right","ime","statusBar","rtl","document","documentElement","dir","hasAdaptiveThemes","navigationBar","miniRuntime","isLandscape","isPortrait","setTheme","UnistylesRuntime","emitChange","Theme","ThemeName","setAdaptiveThemes","isEnabled","setRootViewBackgroundColor","hex","alpha","style","backgroundColor","setImmersiveMode","updateTheme","updater","oldTheme","themes","get","Error","set"],"sourceRoot":"../../../src","sources":["web/runtime.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,WAAW,EAAEC,WAAW,QAA0C,gBAAgB;AAE3F,SAASC,sBAAsB,QAAQ,UAAU;AACjD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,aAAa,EAAEC,SAAS,QAAQ,QAAQ;AACjD,SAASC,cAAc,QAAQ,SAAS;AACxC,SAASC,SAAS,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,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gBAAgB,CAACxC,WAAW,CAAiB,CAAC;EAC9E,CAAC;EAED8C,0BAA0B,GAAGA,CAACC,GAAW,EAAEC,KAAc,KAAK;IAC1D,IAAIzD,QAAQ,CAAC,CAAC,EAAE;MACZ;IACJ;IAEAwC,QAAQ,CAACC,eAAe,CAACiB,KAAK,CAACC,eAAe,GAAGF,KAAK,GAAG1D,SAAS,CAACyD,GAAG,EAAEC,KAAK,CAAC,GAAGD,GAAG;EACxF,CAAC;EAEDI,gBAAgB,GAAGA,CAAA,KAAM,CAAC,CAAC;EAE3BC,WAAW,GAAGA,CAAC/C,SAAuB,EAAEgD,OAA6C,KAAK;IACtF,MAAMC,QAAQ,GAAGjE,cAAc,CAACkE,MAAM,CAACC,GAAG,CAACnD,SAAS,CAAC;IAErD,IAAI,CAACiD,QAAQ,EAAE;MACX,MAAM,IAAIG,KAAK,CAAC,aAAapD,SAAS,sBAAsB,CAAC;IACjE;IAEAhB,cAAc,CAACkE,MAAM,CAACG,GAAG,CAACrD,SAAS,EAAEgD,OAAO,CAACC,QAAQ,CAAC,CAAC;EAC3D,CAAC;EAEDvC,QAAQ,GAAGA,CAACV,SAAS,GAAG,IAAI,CAACA,SAAS,KAAK;IACvC,IAAI,CAACA,SAAS,EAAE;MACZ,MAAM,IAAIoD,KAAK,CAAC,uBAAuB,CAAC;IAC5C;IAEA,MAAM3C,KAAK,GAAGzB,cAAc,CAACkE,MAAM,CAACC,GAAG,CAACnD,SAAS,CAAC;IAElD,IAAI,CAACS,KAAK,EAAE;MACR,MAAM,IAAI2C,KAAK,CAAC,aAAa,IAAI,CAACpD,SAAS,sBAAsB,CAAC;IACtE;IAEA,OAAOS,KAAK;EAChB,CAAC;AACL;AAEA,OAAO,MAAM0B,gBAAgB,GAAG,IAAI/C,uBAAuB,CAAC,CAAC","ignoreList":[]}
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":["UnistylesRegistry","createDoubleMap","deepMergeObjects","equal","extractSecrets","extractUnistyleDependencies","isInDocument","getVariants","UnistylesShadowRegistryBuilder","name","__type","equals","toString","dispose","resultsMap","classNamesMap","add","ref","_style","_variants","_args","Array","isArray","forEach","style","Object","keys","some","key","startsWith","secrets","__uni__refs","__uni__key","oldResult","get","delete","remove","HTMLElement","secret","__uni__stylesheet","__uni__variants","__uni__args","newComputedStylesheet","getComputedStylesheet","args","variants","length","result","variantsResult","fromEntries","resultWithVariants","oldClassNames","className","classList","set","stylesheet","value","injectedClassNames","_web","_classNames","newClassNames","concat","dependencies","addDependenciesToStylesheet","UnistylesShadowRegistry"],"sourceRoot":"../../../src","sources":["web/shadowRegistry.
|
1
|
+
{"version":3,"names":["UnistylesRegistry","createDoubleMap","deepMergeObjects","equal","extractSecrets","extractUnistyleDependencies","isInDocument","getVariants","UnistylesShadowRegistryBuilder","name","__type","equals","toString","dispose","resultsMap","classNamesMap","add","ref","_style","_variants","_args","Array","isArray","forEach","style","Object","keys","some","key","startsWith","secrets","__uni__refs","__uni__key","oldResult","get","delete","remove","HTMLElement","secret","__uni__stylesheet","__uni__variants","__uni__args","newComputedStylesheet","getComputedStylesheet","args","variants","length","result","variantsResult","fromEntries","resultWithVariants","oldClassNames","className","classList","set","stylesheet","value","injectedClassNames","_web","_classNames","newClassNames","concat","dependencies","addDependenciesToStylesheet","UnistylesShadowRegistry"],"sourceRoot":"../../../src","sources":["web/shadowRegistry.js"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,eAAe,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,cAAc,EAAEC,2BAA2B,EAAEC,YAAY,QAAQ,SAAS;AAC7H,SAASC,WAAW,QAAQ,YAAY;AACxC,MAAMC,8BAA8B,CAAC;EACjC;EACAC,IAAI,GAAG,yBAAyB;EAChCC,MAAM,GAAG,KAAK;EACdC,MAAM,GAAGA,CAAA,KAAM,IAAI;EACnBC,QAAQ,GAAGA,CAAA,KAAM,yBAAyB;EAC1CC,OAAO,GAAGA,CAAA,KAAM,CAAE,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B,SAAS,IAAInC,GAAG,CAACoC,SAAS,CAACjB,MAAM,CAACgB,SAAS,CAAC,CAAC;MACpE,IAAI,CAACtC,UAAU,CAACwC,GAAG,CAACrC,GAAG,EAAEe,UAAU,EAAEkB,kBAAkB,CAAC;MACxD,MAAME,SAAS,GAAGpD,iBAAiB,CAACgB,GAAG,CAAC;QACpCY,GAAG,EAAEI,UAAU;QACfY,IAAI;QACJW,UAAU,EAAEhB,iBAAiB;QAC7BiB,KAAK,EAAEN,kBAAkB;QACzBL;MACJ,CAAC,CAAC;MACF,MAAMY,kBAAkB,GAAGP,kBAAkB,EAAEQ,IAAI,EAAEC,WAAW,IAAI,EAAE;MACtE,MAAMC,aAAa,GAAGH,kBAAkB,CAACI,MAAM,CAACT,SAAS,CAAC;MAC1D,MAAMU,YAAY,GAAGzD,2BAA2B,CAAC6C,kBAAkB,CAAC;MACpE,IAAI,OAAOX,iBAAiB,KAAK,UAAU,EAAE;QACzC;QACAvC,iBAAiB,CAAC+D,2BAA2B,CAACxB,iBAAiB,EAAEuB,YAAY,CAAC;MAClF;MACA/B,WAAW,CAACf,GAAG,CAACC,GAAG,CAAC;MACpB,IAAI,CAACF,aAAa,CAACuC,GAAG,CAACrC,GAAG,EAAEe,UAAU,EAAE4B,aAAa,CAAC;MACtD;MACA3C,GAAG,CAACoC,SAAS,CAACrC,GAAG,CAAC,GAAG4C,aAAa,CAAC;IACvC,CAAC,CAAC;EACN,CAAC;EACDxB,MAAM,GAAGA,CAAA,KAAM,CAAE,CAAC;AACtB;AACA,OAAO,MAAM4B,uBAAuB,GAAG,IAAIxD,8BAA8B,CAAC,CAAC","ignoreList":[]}
|
2
|
+
oreList":[]}
|
package/lib/module/web/state.js
CHANGED
@@ -29,24 +29,20 @@ class UnistylesStateBuilder {
|
|
29
29
|
initSettings = settings => {
|
30
30
|
this.hasAdaptiveThemes = settings?.adaptiveThemes ?? false;
|
31
31
|
const themeNames = Array.from(this.themes.keys());
|
32
|
-
|
33
32
|
// Single theme + no settings
|
34
33
|
if (!settings?.adaptiveThemes && !settings?.initialTheme && themeNames.length === 1) {
|
35
34
|
this.themeName = themeNames[0];
|
36
35
|
return;
|
37
36
|
}
|
38
|
-
|
39
37
|
// No settings
|
40
38
|
if (!settings?.adaptiveThemes && !settings?.initialTheme) {
|
41
39
|
throw new Error('🦄 You need to specify either "initialTheme" or "adaptiveThemes" in your config');
|
42
40
|
}
|
43
|
-
|
44
41
|
// Adaptive themes
|
45
42
|
if (settings.adaptiveThemes) {
|
46
43
|
this.themeName = schemeToTheme(UnistylesRuntime.colorScheme);
|
47
44
|
return;
|
48
45
|
}
|
49
|
-
|
50
46
|
// Initial theme
|
51
47
|
this.themeName = typeof settings.initialTheme === 'function' ? settings.initialTheme() : settings.initialTheme;
|
52
48
|
};
|
@@ -66,4 +62,4 @@ class UnistylesStateBuilder {
|
|
66
62
|
};
|
67
63
|
}
|
68
64
|
export const UnistylesState = new UnistylesStateBuilder();
|
69
|
-
//# sourceMappingURL=state.js.map
|
65
|
+
//# sourceMappingURL=state.js.map.map
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":["UnistylesRuntime","isServer","schemeToTheme","UnistylesListener","UnistyleDependency","UnistylesStateBuilder","themes","Map","matchingBreakpoints","breakpoint","currentBreakpoint","Array","from","reverse","find","_key","value","hasAdaptiveThemes","init","config","initThemes","initBreakpoints","breakpoints","initSettings","settings","initListeners","Object","entries","forEach","themeName","theme","set","adaptiveThemes","themeNames","keys","initialTheme","length","Error","colorScheme","sort","a","b","mediaQuery","window","matchMedia","matches","addEventListener","event","emitChange","Breakpoints","UnistylesState"],"sourceRoot":"../../../src","sources":["web/state.
|
1
|
+
{"version":3,"names":["UnistylesRuntime","isServer","schemeToTheme","UnistylesListener","UnistyleDependency","UnistylesStateBuilder","themes","Map","matchingBreakpoints","breakpoint","currentBreakpoint","Array","from","reverse","find","_key","value","hasAdaptiveThemes","init","config","initThemes","initBreakpoints","breakpoints","initSettings","settings","initListeners","Object","entries","forEach","themeName","theme","set","adaptiveThemes","themeNames","keys","initialTheme","length","Error","colorScheme","sort","a","b","mediaQuery","window","matchMedia","matches","addEventListener","event","emitChange","Breakpoints","UnistylesState"],"sourceRoot":"../../../src","sources":["web/state.js"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,QAAQ,EAAEC,aAAa,QAAQ,SAAS;AACjD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,kBAAkB,QAAQ,yBAAyB;AAC5D,MAAMC,qBAAqB,CAAC;EACxBC,MAAM,GAAG,IAAIC,GAAG,CAAC,CAAC;EAElBC,mBAAmB,GAAG,IAAID,GAAG,CAAC,CAAC;EAC/B,IAAIE,UAAUA,CAAA,EAAG;IACb,MAAM,CAACC,iBAAiB,CAAC,GAAGC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACJ,mBAAmB,CAAC,CAC3DK,OAAO,CAAC,CAAC,CACTC,IAAI,CAAC,CAAC,CAACC,IAAI,EAAEC,KAAK,CAAC,KAAKA,KAAK,CAAC,IAAI,EAAE;IACzC,OAAON,iBAAiB;EAC5B;EAEAO,iBAAiB,GAAG,KAAK;EACzBC,IAAI,GAAIC,MAAM,IAAK;IACf,IAAI,CAACC,UAAU,CAACD,MAAM,CAACb,MAAM,CAAC;IAC9B,IAAI,CAACe,eAAe,CAACF,MAAM,CAACG,WAAW,CAAC;IACxC,IAAI,CAACC,YAAY,CAACJ,MAAM,CAACK,QAAQ,CAAC;IAClC,IAAIvB,QAAQ,CAAC,CAAC,EAAE;MACZ;IACJ;IACAE,iBAAiB,CAACsB,aAAa,CAAC,CAAC;EACrC,CAAC;EACDL,UAAU,GAAGA,CAACd,MAAM,GAAG,CAAC,CAAC,KAAK;IAC1BoB,MAAM,CAACC,OAAO,CAACrB,MAAM,CAAC,CAACsB,OAAO,CAAC,CAAC,CAACC,SAAS,EAAEC,KAAK,CAAC,KAAK;MACnD,IAAI,CAACxB,MAAM,CAACyB,GAAG,CAACF,SA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GAAGC,MAAM,CAACC,UAAU,CAAC,eAAe5B,KAAK,KAAK,CAAC;MAC/D,IAAI,CAACR,mBAAmB,CAACuB,GAAG,CAACtB,UAAU,EAAEiC,UAAU,CAACG,OAAO,CAAC;MAC5DH,UAAU,CAACI,gBAAgB,CAAC,QAAQ,EAAEC,KAAK,IAAI;QAC3C,IAAI,CAACvC,mBAAmB,CAACuB,GAAG,CAACtB,UAAU,EAAEsC,KAAK,CAACF,OAAO,CAAC;QACvD1C,iBAAiB,CAAC6C,UAAU,CAAC5C,kBAAkB,CAAC6C,WAAW,CAAC;MAChE,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC;AACL;AACA,OAAO,MAAMC,cAAc,GAAG,IAAI7C,qBAAqB,CAAC,CAAC","ignoreList":[]}
|
2
|
+
noreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["web/utils/index.
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["web/utils/index.ts"],"mappings":";;AAAA,cAAc,UAAU;AACxB,cAAc,YAAY","ignoreList":[]}
|
@@ -1 +1,2 @@
|
|
1
|
-
{"version":3,"names":["deepMergeObjects","hasVariants","value","getVariants","styles","selectedVariants","Object","entries","filter","_key","variants","keys","some","variant","map","key","compoundVariants","variantStyles","flatMap","selectedVariant","selectedVariantStyles","compoundVariantStyles","compoundVariant","conditions","String","mergedVariantStyles"],"sourceRoot":"../../../../src","sources":["web/variants/getVariants.
|
1
|
+
{"version":3,"names":["deepMergeObjects","hasVariants","value","getVariants","styles","selectedVariants","Object","entries","filter","_key","variants","keys","some","variant","map","key","compoundVariants","variantStyles","flatMap","selectedVariant","selectedVariantStyles","compoundVariantStyles","compoundVariant","conditions","String","mergedVariantStyles"],"sourceRoot":"../../../../src","sources":["web/variants/getVariants.js"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,UAAU;AAC3C,MAAMC,WAAW,GAAIC,KAAK,IAAK,UAAU,IAA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BAAmB,GAAGzB,gBAAgB,CAAC,GAAGiB,aAAa,EAAE,GAAGI,qBAAqB,CAAC;IACxF,OAAO,CAACN,GAAG,EAAEU,mBAAmB,CAAC;EACrC,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
2
|
+
[]}
|
@@ -31,6 +31,7 @@ export const createUseVariants = (styles, setSelectedVariants) => {
|
|
31
31
|
enumerable: false,
|
32
32
|
configurable: true
|
33
33
|
})));
|
34
|
+
|
34
35
|
// Add __uni__variants to static styles
|
35
36
|
Object.keys(styleEntry).forEach(key => {
|
36
37
|
if (!key.startsWith('__uni__secrets__')) {
|
@@ -50,4 +51,4 @@ export const createUseVariants = (styles, setSelectedVariants) => {
|
|
50
51
|
value: useVariants
|
51
52
|
});
|
52
53
|
};
|
53
|
-
//# sourceMappingURL=useVariants.js.
|
54
|
+
//# sourceMappingURL=useVariants.js.map
|
@@ -1,2 +1 @@
|
|
1
|
-
{"version":3,"names":["useMemo","useRef","useState","equal","keyInObject","reduceObject","getVariants","createUseVariants","styles","setSelectedVariants","useVariants","selectedVariants","selectedVariantStylesMap","Map","lastSelectedVariantsRef","variantsChanged","current","combinedVariantStyles","result","forEach","key","value","set","styleEntry","selectedVariantStyles","get","Object","defineProperties","enumerable","configurable","keys","startsWith","secret","undefined","defineProperty"],"sourceRoot":"../../../../src","sources":["web/variants/useVariants.
|
2
|
-
[]}
|
1
|
+
{"version":3,"names":["useMemo","useRef","useState","equal","keyInObject","reduceObject","getVariants","createUseVariants","styles","setSelectedVariants","useVariants","selectedVariants","selectedVariantStylesMap","Map","lastSelectedVariantsRef","variantsChanged","current","combinedVariantStyles","result","forEach","key","value","set","styleEntry","selectedVariantStyles","get","Object","defineProperties","enumerable","configurable","keys","startsWith","secret","undefined","defineProperty"],"sourceRoot":"../../../../src","sources":["web/variants/useVariants.ts"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAEjD,SAASC,KAAK,EAAEC,WAAW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