react-native-unistyles 3.0.0-alpha.7 → 3.0.0-alpha.8
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/specs/index.web.js +1 -1
- package/lib/commonjs/web/convert/boxShadow.js +77 -0
- package/lib/commonjs/web/convert/boxShadow.js.map +1 -0
- package/lib/commonjs/web/convert/breakpoint.js +25 -0
- package/lib/commonjs/web/convert/breakpoint.js.map +1 -0
- package/lib/commonjs/web/convert/index.js +76 -0
- package/lib/commonjs/web/convert/index.js.map +1 -0
- package/lib/commonjs/web/convert/module.d.js +2 -0
- package/lib/commonjs/web/convert/module.d.js.map +1 -0
- package/lib/commonjs/web/convert/shadow.js +68 -0
- package/lib/commonjs/web/convert/shadow.js.map +1 -0
- package/lib/commonjs/web/convert/style.js +89 -0
- package/lib/commonjs/web/convert/style.js.map +1 -0
- package/lib/commonjs/web/convert/textShadow.js +73 -0
- package/lib/commonjs/web/convert/textShadow.js.map +1 -0
- package/lib/commonjs/web/convert/transform.js +72 -0
- package/lib/commonjs/web/convert/transform.js.map +1 -0
- package/lib/commonjs/web/convert/types.js +9 -0
- package/lib/commonjs/web/convert/types.js.map +1 -0
- package/lib/commonjs/web/convert/utils.js +55 -0
- package/lib/commonjs/web/convert/utils.js.map +1 -0
- package/lib/commonjs/web/create.js +89 -0
- package/lib/commonjs/web/create.js.map +1 -0
- package/lib/commonjs/web/index.js +51 -0
- package/lib/commonjs/web/index.js.map +1 -0
- package/lib/commonjs/web/listener/index.js +13 -0
- package/lib/commonjs/web/listener/index.js.map +1 -0
- package/lib/commonjs/web/listener/listener.js +36 -0
- package/lib/commonjs/web/listener/listener.js.map +1 -0
- package/lib/commonjs/web/mock.js +37 -0
- package/lib/commonjs/web/mock.js.map +1 -0
- package/lib/commonjs/web/mq.js +23 -0
- package/lib/commonjs/web/mq.js.map +1 -0
- package/lib/commonjs/web/pseudo.js +11 -0
- package/lib/commonjs/web/pseudo.js.map +1 -0
- package/lib/commonjs/web/registry.js +37 -0
- package/lib/commonjs/web/registry.js.map +1 -0
- package/lib/commonjs/web/runtime.js +164 -0
- package/lib/commonjs/web/runtime.js.map +1 -0
- package/lib/commonjs/web/state.js +121 -0
- package/lib/commonjs/web/state.js.map +1 -0
- package/lib/commonjs/web/utils.js +78 -0
- package/lib/commonjs/web/utils.js.map +1 -0
- package/lib/commonjs/web/variants/getVariants.js +39 -0
- package/lib/commonjs/web/variants/getVariants.js.map +1 -0
- package/lib/commonjs/web/variants/index.js +28 -0
- package/lib/commonjs/web/variants/index.js.map +1 -0
- package/lib/commonjs/web/variants/useVariants.js +75 -0
- package/lib/commonjs/web/variants/useVariants.js.map +1 -0
- package/lib/module/specs/index.web.js +1 -1
- package/lib/module/specs/index.web.js.map +1 -1
- package/lib/module/web/convert/boxShadow.js +72 -0
- package/lib/module/web/convert/boxShadow.js.map +1 -0
- package/lib/module/web/convert/breakpoint.js +20 -0
- package/lib/module/web/convert/breakpoint.js.map +1 -0
- package/lib/module/web/convert/index.js +71 -0
- package/lib/module/web/convert/index.js.map +1 -0
- package/lib/module/web/convert/module.d.js +2 -0
- package/lib/module/web/convert/module.d.js.map +1 -0
- package/lib/module/web/convert/shadow.js +63 -0
- package/lib/module/web/convert/shadow.js.map +1 -0
- package/lib/module/web/convert/style.js +84 -0
- package/lib/module/web/convert/style.js.map +1 -0
- package/lib/module/web/convert/textShadow.js +68 -0
- package/lib/module/web/convert/textShadow.js.map +1 -0
- package/lib/module/web/convert/transform.js +67 -0
- package/lib/module/web/convert/transform.js.map +1 -0
- package/lib/module/web/convert/types.js +5 -0
- package/lib/module/web/convert/types.js.map +1 -0
- package/lib/module/web/convert/utils.js +43 -0
- package/lib/module/web/convert/utils.js.map +1 -0
- package/lib/module/web/create.js +84 -0
- package/lib/module/web/create.js.map +1 -0
- package/lib/module/web/index.js +24 -0
- package/lib/module/web/index.js.map +1 -0
- package/lib/module/web/listener/index.js +4 -0
- package/lib/module/web/listener/index.js.map +1 -0
- package/lib/module/web/listener/listener.js +31 -0
- package/lib/module/web/listener/listener.js.map +1 -0
- package/lib/module/web/mock.js +33 -0
- package/lib/module/web/mock.js.map +1 -0
- package/lib/module/web/mq.js +17 -0
- package/lib/module/web/mq.js.map +1 -0
- package/lib/module/web/pseudo.js +6 -0
- package/lib/module/web/pseudo.js.map +1 -0
- package/lib/module/web/registry.js +33 -0
- package/lib/module/web/registry.js.map +1 -0
- package/lib/module/web/runtime.js +160 -0
- package/lib/module/web/runtime.js.map +1 -0
- package/lib/module/web/state.js +117 -0
- package/lib/module/web/state.js.map +1 -0
- package/lib/module/web/utils.js +65 -0
- package/lib/module/web/utils.js.map +1 -0
- package/lib/module/web/variants/getVariants.js +34 -0
- package/lib/module/web/variants/getVariants.js.map +1 -0
- package/lib/module/web/variants/index.js +5 -0
- package/lib/module/web/variants/index.js.map +1 -0
- package/lib/module/web/variants/useVariants.js +70 -0
- package/lib/module/web/variants/useVariants.js.map +1 -0
- package/lib/typescript/src/specs/index.web.d.ts +1 -1
- package/lib/typescript/src/specs/index.web.d.ts.map +1 -1
- package/lib/typescript/src/types/stylesheet.d.ts +1 -1
- package/lib/typescript/src/types/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/boxShadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/breakpoint.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/convert/index.d.ts +1 -1
- package/lib/typescript/src/web/convert/index.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/shadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/style.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/textShadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/transform.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/convert/types.d.ts +1 -1
- package/lib/typescript/src/web/convert/types.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/utils.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/create.d.ts +11 -11
- package/lib/typescript/{web → src/web}/create.d.ts.map +1 -1
- package/lib/typescript/{web → src/web}/index.d.ts +12 -12
- package/lib/typescript/{web → src/web}/index.d.ts.map +1 -1
- package/lib/typescript/src/web/listener/index.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/listener/listener.d.ts +1 -1
- package/lib/typescript/src/web/listener/listener.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/mock.d.ts +2 -2
- package/lib/typescript/src/web/mock.d.ts.map +1 -0
- package/lib/typescript/src/web/mq.d.ts.map +1 -0
- package/lib/typescript/src/web/pseudo.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/registry.d.ts +1 -1
- package/lib/typescript/src/web/registry.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/runtime.d.ts +6 -6
- package/lib/typescript/src/web/runtime.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/state.d.ts +4 -4
- package/lib/typescript/src/web/state.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/utils.d.ts +5 -3
- package/lib/typescript/src/web/utils.d.ts.map +1 -0
- package/lib/typescript/src/web/variants/getVariants.d.ts +3 -0
- package/lib/typescript/src/web/variants/getVariants.d.ts.map +1 -0
- package/lib/typescript/src/web/variants/index.d.ts +3 -0
- package/lib/typescript/src/web/variants/index.d.ts.map +1 -0
- package/lib/typescript/src/web/variants/useVariants.d.ts +3 -0
- package/lib/typescript/src/web/variants/useVariants.d.ts.map +1 -0
- package/package.json +1 -1
- package/plugin/__tests__/ref.spec.js +130 -4
- package/plugin/index.js +12 -13
- package/plugin/ref.js +38 -14
- package/plugin/style.js +13 -7
- package/src/specs/index.web.ts +1 -1
- package/src/types/stylesheet.ts +1 -1
- package/{web → src/web}/convert/breakpoint.ts +1 -1
- package/{web → src/web}/convert/index.ts +1 -1
- package/{web → src/web}/convert/types.ts +1 -1
- package/{web → src/web}/create.ts +36 -33
- package/{web → src/web}/listener/listener.ts +1 -1
- package/{web → src/web}/mock.ts +2 -2
- package/{web → src/web}/registry.ts +1 -1
- package/{web → src/web}/runtime.ts +4 -4
- package/{web → src/web}/state.ts +5 -5
- package/{web → src/web}/utils.ts +5 -5
- package/src/web/variants/getVariants.ts +42 -0
- package/src/web/variants/index.ts +2 -0
- package/{web → src/web/variants}/useVariants.ts +24 -44
- package/lib/typescript/web/convert/boxShadow.d.ts.map +0 -1
- package/lib/typescript/web/convert/breakpoint.d.ts.map +0 -1
- package/lib/typescript/web/convert/index.d.ts.map +0 -1
- package/lib/typescript/web/convert/shadow.d.ts.map +0 -1
- package/lib/typescript/web/convert/style.d.ts.map +0 -1
- package/lib/typescript/web/convert/textShadow.d.ts.map +0 -1
- package/lib/typescript/web/convert/transform.d.ts.map +0 -1
- package/lib/typescript/web/convert/types.d.ts.map +0 -1
- package/lib/typescript/web/convert/utils.d.ts.map +0 -1
- package/lib/typescript/web/listener/index.d.ts.map +0 -1
- package/lib/typescript/web/listener/listener.d.ts.map +0 -1
- package/lib/typescript/web/mock.d.ts.map +0 -1
- package/lib/typescript/web/mq.d.ts.map +0 -1
- package/lib/typescript/web/pseudo.d.ts.map +0 -1
- package/lib/typescript/web/registry.d.ts.map +0 -1
- package/lib/typescript/web/runtime.d.ts.map +0 -1
- package/lib/typescript/web/state.d.ts.map +0 -1
- package/lib/typescript/web/useVariants.d.ts +0 -3
- package/lib/typescript/web/useVariants.d.ts.map +0 -1
- package/lib/typescript/web/utils.d.ts.map +0 -1
- /package/lib/typescript/{web → src/web}/convert/boxShadow.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/breakpoint.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/shadow.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/style.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/textShadow.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/transform.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/utils.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/listener/index.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/mq.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/pseudo.d.ts +0 -0
- /package/{web → src/web}/convert/boxShadow.ts +0 -0
- /package/{web → src/web}/convert/module.d.ts +0 -0
- /package/{web → src/web}/convert/shadow.ts +0 -0
- /package/{web → src/web}/convert/style.ts +0 -0
- /package/{web → src/web}/convert/textShadow.ts +0 -0
- /package/{web → src/web}/convert/transform.ts +0 -0
- /package/{web → src/web}/convert/utils.ts +0 -0
- /package/{web → src/web}/index.ts +0 -0
- /package/{web → src/web}/listener/index.ts +0 -0
- /package/{web → src/web}/mq.ts +0 -0
- /package/{web → src/web}/pseudo.ts +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { StyleSheetWithSuperPowers, StyleSheet } from '../
|
1
|
+
import type { StyleSheetWithSuperPowers, StyleSheet } from '../types/stylesheet';
|
2
2
|
export declare const create: (stylesheet: StyleSheetWithSuperPowers<StyleSheet>) => {
|
3
3
|
[x: string]: {
|
4
4
|
backfaceVisibility?: "visible" | "hidden" | {
|
@@ -1213,15 +1213,15 @@ export declare const create: (stylesheet: StyleSheetWithSuperPowers<StyleSheet>)
|
|
1213
1213
|
} | undefined;
|
1214
1214
|
variants?: {
|
1215
1215
|
[variantName: string]: {
|
1216
|
-
[variant: string]: Omit<import("../
|
1216
|
+
[variant: string]: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
1217
1217
|
};
|
1218
1218
|
} | undefined;
|
1219
1219
|
compoundVariants?: Array<{
|
1220
|
-
styles: Omit<import("../
|
1220
|
+
styles: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
1221
1221
|
}> | undefined;
|
1222
|
-
shadowOffset?: import("../
|
1223
|
-
transform?: import("../
|
1224
|
-
textShadowOffset?: import("../
|
1222
|
+
shadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
1223
|
+
transform?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").TransformStyles>[] | undefined;
|
1224
|
+
textShadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
1225
1225
|
} | ((...args: any[]) => {
|
1226
1226
|
backfaceVisibility?: "visible" | "hidden" | {
|
1227
1227
|
[x: symbol]: "visible" | "hidden" | undefined;
|
@@ -2435,15 +2435,15 @@ export declare const create: (stylesheet: StyleSheetWithSuperPowers<StyleSheet>)
|
|
2435
2435
|
} | undefined;
|
2436
2436
|
variants?: {
|
2437
2437
|
[variantName: string]: {
|
2438
|
-
[variant: string]: Omit<import("../
|
2438
|
+
[variant: string]: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
2439
2439
|
};
|
2440
2440
|
} | undefined;
|
2441
2441
|
compoundVariants?: Array<{
|
2442
|
-
styles: Omit<import("../
|
2442
|
+
styles: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
2443
2443
|
}> | undefined;
|
2444
|
-
shadowOffset?: import("../
|
2445
|
-
transform?: import("../
|
2446
|
-
textShadowOffset?: import("../
|
2444
|
+
shadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
2445
|
+
transform?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").TransformStyles>[] | undefined;
|
2446
|
+
textShadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
2447
2447
|
});
|
2448
2448
|
};
|
2449
2449
|
//# sourceMappingURL=create.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/web/create.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAkBhF,eAAO,MAAM,MAAM,eAAgB,yBAAyB,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFvE,CAAA"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export declare const StyleSheet: {
|
2
|
-
configure: (config: import("../
|
3
|
-
create: (stylesheet: import("../
|
2
|
+
configure: (config: import("../specs/StyleSheet").UnistylesConfig) => void;
|
3
|
+
create: (stylesheet: import("../types/stylesheet").StyleSheetWithSuperPowers<import("../types").StyleSheet>) => {
|
4
4
|
[x: string]: {
|
5
5
|
backfaceVisibility?: "visible" | "hidden" | {
|
6
6
|
[x: symbol]: "visible" | "hidden" | undefined;
|
@@ -1214,15 +1214,15 @@ export declare const StyleSheet: {
|
|
1214
1214
|
} | undefined;
|
1215
1215
|
variants?: {
|
1216
1216
|
[variantName: string]: {
|
1217
|
-
[variant: string]: Omit<import("../
|
1217
|
+
[variant: string]: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
1218
1218
|
};
|
1219
1219
|
} | undefined;
|
1220
1220
|
compoundVariants?: Array<{
|
1221
|
-
styles: Omit<import("../
|
1221
|
+
styles: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
1222
1222
|
}> | undefined;
|
1223
|
-
shadowOffset?: import("../
|
1224
|
-
transform?: import("../
|
1225
|
-
textShadowOffset?: import("../
|
1223
|
+
shadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
1224
|
+
transform?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").TransformStyles>[] | undefined;
|
1225
|
+
textShadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
1226
1226
|
} | ((...args: any[]) => {
|
1227
1227
|
backfaceVisibility?: "visible" | "hidden" | {
|
1228
1228
|
[x: symbol]: "visible" | "hidden" | undefined;
|
@@ -2436,15 +2436,15 @@ export declare const StyleSheet: {
|
|
2436
2436
|
} | undefined;
|
2437
2437
|
variants?: {
|
2438
2438
|
[variantName: string]: {
|
2439
|
-
[variant: string]: Omit<import("../
|
2439
|
+
[variant: string]: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
2440
2440
|
};
|
2441
2441
|
} | undefined;
|
2442
2442
|
compoundVariants?: Array<{
|
2443
|
-
styles: Omit<import("../
|
2443
|
+
styles: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
2444
2444
|
}> | undefined;
|
2445
|
-
shadowOffset?: import("../
|
2446
|
-
transform?: import("../
|
2447
|
-
textShadowOffset?: import("../
|
2445
|
+
shadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
2446
|
+
transform?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").TransformStyles>[] | undefined;
|
2447
|
+
textShadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
2448
2448
|
});
|
2449
2449
|
};
|
2450
2450
|
absoluteFill: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/web/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUN,MAAM,KAAK,MAAM;yBACT,KAAK,CAAC,MAAM,CAAC;;CAErC,CAAA;AAED,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC5C,cAAc,QAAQ,CAAA;AAEtB,eAAO,MAAM,eAAe,gGAA2C,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/web/listener/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../../../src/web/listener/listener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAG/D,qBAAa,wBAAwB;IACjC,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,SAAS,CAAoG;IAErH,UAAU,eAAgB,kBAAkB,UAE3C;IAED,aAAa,aAUZ;IAED,YAAY,iBAAkB,KAAK,CAAC,kBAAkB,CAAC,YAAY,YAAY,gBAM9E;CACJ;AAED,eAAO,MAAM,iBAAiB,0BAAiC,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { UnistylesNavigationBar as NavigationBarSpec } from '../
|
2
|
-
import type { UnistylesStatusBar as StatusBarSpec } from '../
|
1
|
+
import type { UnistylesNavigationBar as NavigationBarSpec } from '../specs/NavigtionBar';
|
2
|
+
import type { UnistylesStatusBar as StatusBarSpec } from '../specs/StatusBar';
|
3
3
|
export declare const StatusBar: StatusBarSpec;
|
4
4
|
export declare const NavigationBar: NavigationBarSpec;
|
5
5
|
export declare const UnistylesShadowRegistry: {
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../../src/web/mock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACxF,OAAO,KAAK,EAAE,kBAAkB,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAE7E,eAAO,MAAM,SAAS,EAAE,aAUvB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,iBAS3B,CAAA;AAED,eAAO,MAAM,uBAAuB;;;;;;;;CAQnC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mq.d.ts","sourceRoot":"","sources":["../../../../src/web/mq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAMrD,eAAO,MAAM,OAAO,OAAQ,MAAM,KAAG,UAUpC,CAAA;AAED,eAAO,MAAM,aAAa,OAAQ,MAAM,YAAgC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pseudo.d.ts","sourceRoot":"","sources":["../../../../src/web/pseudo.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,kDAKV,CAAA;AAEV,eAAO,MAAM,QAAQ,aAAc,MAAM,YAAyC,CAAA;AAElF,MAAM,MAAM,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TypeStyle } from 'typestyle';
|
2
|
-
import type { UnistylesValues } from '../
|
2
|
+
import type { UnistylesValues } from '../types';
|
3
3
|
declare class UnistylesRegistryBuilder {
|
4
4
|
createStyles: (stylesheet: UnistylesValues, key: string | number) => {
|
5
5
|
className: string;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/web/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,SAAS,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAI/C,cAAM,wBAAwB;IAC1B,YAAY,eAAgB,eAAe,OAAO,MAAM,GAAG,MAAM;;;MAwBhE;IAED,YAAY,cAAe,SAAS,cAAc,eAAe,aAAa,MAAM,UAKnF;CACJ;AAED,eAAO,MAAM,iBAAiB,0BAAiC,CAAA"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { ColorScheme, Orientation, type AppTheme, type AppThemeName } from '../
|
2
|
-
import type { UnistylesMiniRuntime } from '../
|
3
|
-
import { WebContentSizeCategory } from '../
|
1
|
+
import { ColorScheme, Orientation, type AppTheme, type AppThemeName } from '../specs/types';
|
2
|
+
import type { UnistylesMiniRuntime } from '../specs/UnistylesRuntime';
|
3
|
+
import { WebContentSizeCategory } from '../types';
|
4
4
|
declare class UnistylesRuntimeBuilder {
|
5
5
|
lightMedia: MediaQueryList | null;
|
6
6
|
darkMedia: MediaQueryList | null;
|
@@ -11,7 +11,7 @@ declare class UnistylesRuntimeBuilder {
|
|
11
11
|
get contentSizeCategory(): WebContentSizeCategory;
|
12
12
|
get breakpoint(): keyof import("react-native-unistyles").UnistylesBreakpoints | undefined;
|
13
13
|
get orientation(): Orientation;
|
14
|
-
get theme(): import("../
|
14
|
+
get theme(): import("../types").UnistylesTheme;
|
15
15
|
get pixelRatio(): number;
|
16
16
|
get screen(): {
|
17
17
|
width: number;
|
@@ -25,10 +25,10 @@ declare class UnistylesRuntimeBuilder {
|
|
25
25
|
right: number;
|
26
26
|
ime: number;
|
27
27
|
};
|
28
|
-
get statusBar(): import("../
|
28
|
+
get statusBar(): import("../specs/StatusBar").UnistylesStatusBar;
|
29
29
|
get rtl(): boolean;
|
30
30
|
get hasAdaptiveThemes(): boolean;
|
31
|
-
get navigationBar(): import("../
|
31
|
+
get navigationBar(): import("../specs/NavigtionBar").UnistylesNavigationBar;
|
32
32
|
get miniRuntime(): UnistylesMiniRuntime;
|
33
33
|
setTheme: (themeName: AppThemeName) => void;
|
34
34
|
setAdaptiveThemes: (isEnabled: boolean) => void;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/web/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC3F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAMjD,cAAM,uBAAuB;IACzB,UAAU,wBAAuB;IACjC,SAAS,wBAAsB;IAE/B,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,YAAY;IAYpB,IAAI,WAAW,gBASd;IAED,IAAI,SAAS,uEAEZ;IAED,IAAI,mBAAmB,2BAEtB;IAED,IAAI,UAAU,4EAEb;IAED,IAAI,WAAW,gBAMd;IAED,IAAI,KAAK,sCAYR;IAED,IAAI,UAAU,WAEb;IAED,IAAI,MAAM;;;MAYT;IAED,IAAI,SAAS,WAEZ;IAED,IAAI,MAAM;;;;;;MAQT;IAED,IAAI,SAAS,oDAEZ;IAED,IAAI,GAAG,YAEN;IAED,IAAI,iBAAiB,YAEpB;IAED,IAAI,aAAa,2DAEhB;IAED,IAAI,WAAW,IAAI,oBAAoB,CAsBtC;IAED,QAAQ,cAAe,YAAY,UAQlC;IAED,iBAAiB,cAAe,OAAO,UAQtC;IAED,0BAA0B,QAAS,MAAM,UAAU,MAAM,UAMxD;IAED,gBAAgB,aAAW;IAE3B,WAAW,cAAe,YAAY,WAAW,CAAC,YAAY,EAAE,QAAQ,KAAK,QAAQ,UAQpF;IAED,eAAe,iGAA4B;CAC9C;AAED,eAAO,MAAM,gBAAgB,yBAAgC,CAAA"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { type ReactElement } from 'react';
|
2
|
-
import type { UnistylesTheme } from '../
|
3
|
-
import type { UnistylesConfig } from '../
|
4
|
-
import type { AppBreakpoint, AppThemeName } from '../
|
5
|
-
import type { UnistylesBreakpoints } from '../
|
2
|
+
import type { UnistylesTheme } from '../types';
|
3
|
+
import type { UnistylesConfig } from '../specs/StyleSheet';
|
4
|
+
import type { AppBreakpoint, AppThemeName } from '../specs/types';
|
5
|
+
import type { UnistylesBreakpoints } from '../global';
|
6
6
|
declare class UnistylesStateBuilder {
|
7
7
|
private readonly isSSR;
|
8
8
|
readonly tags: Array<ReactElement>;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/web/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAA4B,MAAM,OAAO,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAmB,MAAM,WAAW,CAAA;AAMtE,cAAM,qBAAqB;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;IACnC,QAAQ,CAAC,IAAI,EAAS,KAAK,CAAC,YAAY,CAAC,CAAA;IAEzC,MAAM,8BAAoC;IAC1C,SAAS,CAAC,EAAE,YAAY,CAAA;IAExB,UAAU,CAAC,EAAE,aAAa,CAAA;IAC1B,WAAW,CAAC,EAAE,oBAAoB,CAAA;IAElC,iBAAiB,UAAQ;IAEzB,IAAI,WAAY,eAAe,UAU9B;IAED,OAAO,CAAC,UAAU,CAIjB;IAED,OAAO,CAAC,YAAY,CAyBnB;IAED,OAAO,CAAC,eAAe,CAmCtB;IAED,SAAS;;;CAyCZ;AAED,eAAO,MAAM,cAAc,uBAA8B,CAAA"}
|
@@ -1,9 +1,11 @@
|
|
1
|
-
import { ColorScheme, type AppThemeName } from '../
|
2
|
-
import type { UnistylesValues } from '../
|
1
|
+
import { ColorScheme, type AppThemeName } from '../specs/types';
|
2
|
+
import type { UnistylesValues } from '../types';
|
3
3
|
export declare const reduceObject: <TObj extends Record<string, any>, TReducer>(obj: TObj, reducer: (value: TObj[keyof TObj], key: keyof TObj) => TReducer) => { [K in keyof TObj]: TReducer; };
|
4
|
-
export declare const toReactNativeClassName: (className: string, values: UnistylesValues) => {
|
4
|
+
export declare const toReactNativeClassName: (className: string | null, values: UnistylesValues) => {
|
5
5
|
[x: string]: string | boolean;
|
6
6
|
$$css: boolean;
|
7
|
+
} | {
|
8
|
+
$$css?: undefined;
|
7
9
|
};
|
8
10
|
export declare const keyInObject: <T extends Record<string, any>>(obj: T, key: PropertyKey) => key is keyof T;
|
9
11
|
export declare const schemeToTheme: (scheme: ColorScheme) => AppThemeName;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/web/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,eAAO,MAAM,YAAY,GAAI,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,OAC9D,IAAI,WACA,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,IAAI,KAAK,QAAQ,KACmD,GAAG,CAAe,IAAV,MAAM,IAAI,GAAG,QAAQ,GAAE,CAAA;AAErJ,eAAO,MAAM,sBAAsB,cAAe,MAAM,GAAG,IAAI,UAAU,eAAe;;;;;CAavF,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,OAAO,WAAW,KAAG,GAAG,IAAI,MAAM,CAAe,CAAA;AAElH,eAAO,MAAM,aAAa,WAAY,WAAW,KAAG,YAQnD,CAAA;AAED,eAAO,MAAM,SAAS,QAAS,MAAM,WAAW,MAAM,WAM5B,CAAA;AAE1B,eAAO,MAAM,QAAQ,eAAsC,CAAA;AAE3D;;EAEE;AACF,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,cAAc,KAAK,CAAC,CAAC,CAAC,MAqBxF,CAAA;AAED,eAAO,MAAM,IAAI,YAAa,MAAM,SAA2D,CAAA;AAE/F,eAAO,MAAM,KAAK,GAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAqBlC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getVariants.d.ts","sourceRoot":"","sources":["../../../../../src/web/variants/getVariants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAWpE,eAAO,MAAM,WAAW,WAAY,qBAAqB,CAAC,UAAU,CAAC,oBAAoB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,+BA8B3G,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/web/variants/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useVariants.d.ts","sourceRoot":"","sources":["../../../../../src/web/variants/useVariants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKpE,eAAO,MAAM,iBAAiB,WAAY,qBAAqB,CAAC,UAAU,CAAC,uBAAuB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,SAuExI,CAAA"}
|
package/package.json
CHANGED
@@ -825,6 +825,8 @@ pluginTester({
|
|
825
825
|
<View
|
826
826
|
ref={_ref => {
|
827
827
|
myRef.current = _ref
|
828
|
+
|
829
|
+
styles.container(1, 2, _ref)
|
828
830
|
UnistylesShadowRegistry.add(_ref, styles.container, undefined)
|
829
831
|
return () => UnistylesShadowRegistry.remove(_ref, styles.container)
|
830
832
|
}}
|
@@ -885,13 +887,12 @@ pluginTester({
|
|
885
887
|
<View
|
886
888
|
ref={_ref => {
|
887
889
|
myRef.current = _ref
|
890
|
+
|
891
|
+
styles.container(1, 2, _ref)
|
888
892
|
UnistylesShadowRegistry.add(_ref, styles.container, undefined)
|
889
893
|
return () => UnistylesShadowRegistry.remove(_ref, styles.container)
|
890
894
|
}}
|
891
|
-
style={{
|
892
|
-
backgroundColor: 'red',
|
893
|
-
...styles.container(1, 2)
|
894
|
-
}}
|
895
|
+
style={{ backgroundColor: 'red', ...styles.container(1, 2) }}
|
895
896
|
>
|
896
897
|
<Text>Hello world</Text>
|
897
898
|
</View>
|
@@ -963,6 +964,7 @@ pluginTester({
|
|
963
964
|
<View
|
964
965
|
ref={_ref => {
|
965
966
|
myRef.current = _ref
|
967
|
+
uhh.dkk(_ref)
|
966
968
|
UnistylesShadowRegistry.add(_ref, uhh.dkk, __uni__variants)
|
967
969
|
return () => UnistylesShadowRegistry.remove(_ref, uhh.dkk)
|
968
970
|
}}
|
@@ -1031,6 +1033,7 @@ pluginTester({
|
|
1031
1033
|
<View
|
1032
1034
|
ref={_ref => {
|
1033
1035
|
myRef.current = _ref
|
1036
|
+
uhh.dkk(_ref)
|
1034
1037
|
UnistylesShadowRegistry.add(_ref, uhh.dkk, undefined)
|
1035
1038
|
return () => UnistylesShadowRegistry.remove(_ref, uhh.dkk)
|
1036
1039
|
}}
|
@@ -1050,6 +1053,129 @@ pluginTester({
|
|
1050
1053
|
921918562
|
1051
1054
|
)
|
1052
1055
|
`
|
1056
|
+
},
|
1057
|
+
{
|
1058
|
+
title: 'Should pass ref for dynamic functions to bind it to shadow node',
|
1059
|
+
code: `
|
1060
|
+
import { StyleSheet } from 'react-native-unistyles'
|
1061
|
+
|
1062
|
+
export const Example = () => {
|
1063
|
+
return (
|
1064
|
+
<React.Fragment>
|
1065
|
+
<View style={styles.container(1, 5)} />
|
1066
|
+
<View style={styles.container(2, 6)} />
|
1067
|
+
<View style={styles.container(5, 1)} />
|
1068
|
+
</React.Fragment>
|
1069
|
+
)
|
1070
|
+
}
|
1071
|
+
|
1072
|
+
const styles = StyleSheet.create({
|
1073
|
+
container: (flex, gap) => ({
|
1074
|
+
flex,
|
1075
|
+
gap
|
1076
|
+
})
|
1077
|
+
})
|
1078
|
+
`,
|
1079
|
+
output: `
|
1080
|
+
import { UnistylesShadowRegistry } from 'react-native-unistyles'
|
1081
|
+
import { StyleSheet } from 'react-native-unistyles'
|
1082
|
+
|
1083
|
+
export const Example = () => {
|
1084
|
+
return (
|
1085
|
+
<React.Fragment>
|
1086
|
+
<View
|
1087
|
+
style={styles.container(1, 5)}
|
1088
|
+
ref={ref => {
|
1089
|
+
styles.container(1, 5, ref)
|
1090
|
+
UnistylesShadowRegistry.add(ref, styles.container, undefined)
|
1091
|
+
return () => UnistylesShadowRegistry.remove(ref, styles.container)
|
1092
|
+
}}
|
1093
|
+
/>
|
1094
|
+
<View
|
1095
|
+
style={styles.container(2, 6)}
|
1096
|
+
ref={ref => {
|
1097
|
+
styles.container(2, 6, ref)
|
1098
|
+
UnistylesShadowRegistry.add(ref, styles.container, undefined)
|
1099
|
+
return () => UnistylesShadowRegistry.remove(ref, styles.container)
|
1100
|
+
}}
|
1101
|
+
/>
|
1102
|
+
<View
|
1103
|
+
style={styles.container(5, 1)}
|
1104
|
+
ref={ref => {
|
1105
|
+
styles.container(5, 1, ref)
|
1106
|
+
UnistylesShadowRegistry.add(ref, styles.container, undefined)
|
1107
|
+
return () => UnistylesShadowRegistry.remove(ref, styles.container)
|
1108
|
+
}}
|
1109
|
+
/>
|
1110
|
+
</React.Fragment>
|
1111
|
+
)
|
1112
|
+
}
|
1113
|
+
|
1114
|
+
const styles = StyleSheet.create(
|
1115
|
+
{
|
1116
|
+
container: (flex, gap) => ({
|
1117
|
+
flex,
|
1118
|
+
gap
|
1119
|
+
})
|
1120
|
+
},
|
1121
|
+
921918562
|
1122
|
+
)
|
1123
|
+
`
|
1124
|
+
},
|
1125
|
+
{
|
1126
|
+
title: 'Should pass refs for dynamic functions',
|
1127
|
+
code: `
|
1128
|
+
import { StyleSheet } from 'react-native-unistyles'
|
1129
|
+
|
1130
|
+
export const Example = () => {
|
1131
|
+
return (
|
1132
|
+
<React.Fragment>
|
1133
|
+
<View style={[styles.container(1, 5), styles.container2(1, 6)]} />
|
1134
|
+
</React.Fragment>
|
1135
|
+
)
|
1136
|
+
}
|
1137
|
+
|
1138
|
+
const styles = StyleSheet.create({
|
1139
|
+
container: (flex, gap) => ({
|
1140
|
+
flex,
|
1141
|
+
gap
|
1142
|
+
})
|
1143
|
+
})
|
1144
|
+
`,
|
1145
|
+
output: `
|
1146
|
+
import { UnistylesShadowRegistry } from 'react-native-unistyles'
|
1147
|
+
import { StyleSheet } from 'react-native-unistyles'
|
1148
|
+
|
1149
|
+
export const Example = () => {
|
1150
|
+
return (
|
1151
|
+
<React.Fragment>
|
1152
|
+
<View
|
1153
|
+
style={[styles.container(1, 5), styles.container2(1, 6)]}
|
1154
|
+
ref={ref => {
|
1155
|
+
styles.container(1, 5, ref)
|
1156
|
+
UnistylesShadowRegistry.add(ref, styles.container, undefined)
|
1157
|
+
styles.container2(1, 6, ref)
|
1158
|
+
UnistylesShadowRegistry.add(ref, styles.container2, undefined)
|
1159
|
+
return () => {
|
1160
|
+
;(() => UnistylesShadowRegistry.remove(ref, styles.container))()
|
1161
|
+
UnistylesShadowRegistry.remove(ref, styles.container2)
|
1162
|
+
}
|
1163
|
+
}}
|
1164
|
+
/>
|
1165
|
+
</React.Fragment>
|
1166
|
+
)
|
1167
|
+
}
|
1168
|
+
|
1169
|
+
const styles = StyleSheet.create(
|
1170
|
+
{
|
1171
|
+
container: (flex, gap) => ({
|
1172
|
+
flex,
|
1173
|
+
gap
|
1174
|
+
})
|
1175
|
+
},
|
1176
|
+
921918562
|
1177
|
+
)
|
1178
|
+
`
|
1053
1179
|
}
|
1054
1180
|
]
|
1055
1181
|
})
|
package/plugin/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
const addShadowRegistryImport = require('./import')
|
2
|
-
const {
|
2
|
+
const { getStyleMetadata, getStyleAttribute } = require('./style')
|
3
3
|
const { getRefProp, addRef, overrideRef, hasStringRef } = require('./ref')
|
4
4
|
const { isUnistylesStyleSheet, analyzeDependencies, addStyleSheetTag, getUnistyle } = require('./stylesheet')
|
5
5
|
const { isUsingVariants, extractVariants } = require('./variants')
|
@@ -46,28 +46,27 @@ module.exports = function ({ types: t }) {
|
|
46
46
|
return
|
47
47
|
}
|
48
48
|
|
49
|
-
const
|
49
|
+
const metadata = getStyleMetadata(t, styleAttr.value.expression)
|
50
50
|
|
51
51
|
// style prop is not using object expression
|
52
|
-
if (
|
52
|
+
if (metadata.length === 0) {
|
53
53
|
return
|
54
54
|
}
|
55
55
|
|
56
56
|
// to add import
|
57
57
|
state.file.hasAnyUnistyle = true
|
58
58
|
|
59
|
-
|
59
|
+
metadata.forEach(meta => {
|
60
|
+
const refProp = getRefProp(t, path)
|
60
61
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
const styleObj = stylePath[0]
|
66
|
-
const styleProp = stylePath[1]
|
62
|
+
if (!refProp && hasStringRef(t, path)) {
|
63
|
+
throw new Error("Detected string based ref which is not supported by Unistyles.")
|
64
|
+
}
|
67
65
|
|
68
|
-
|
69
|
-
|
70
|
-
|
66
|
+
refProp
|
67
|
+
? overrideRef(t, path, refProp, meta, state)
|
68
|
+
: addRef(t, path, meta, state)
|
69
|
+
})
|
71
70
|
},
|
72
71
|
CallExpression(path, state) {
|
73
72
|
if (isUsingVariants(t, path)) {
|