react-native-css 0.0.0-nightly.38ce466 → 0.0.0-nightly.5ce6396

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.
Files changed (86) hide show
  1. package/dist/commonjs/babel/index.js +6 -2
  2. package/dist/commonjs/babel/index.js.map +1 -1
  3. package/dist/commonjs/compiler/atRules.js +3 -1
  4. package/dist/commonjs/compiler/atRules.js.map +1 -1
  5. package/dist/commonjs/compiler/declarations.js +112 -31
  6. package/dist/commonjs/compiler/declarations.js.map +1 -1
  7. package/dist/commonjs/compiler/stylesheet.js +5 -0
  8. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  9. package/dist/commonjs/jest/index.js +0 -1
  10. package/dist/commonjs/jest/index.js.map +1 -1
  11. package/dist/commonjs/runtime/native/api.js +21 -2
  12. package/dist/commonjs/runtime/native/api.js.map +1 -1
  13. package/dist/commonjs/runtime/native/reactivity.js +1 -5
  14. package/dist/commonjs/runtime/native/reactivity.js.map +1 -1
  15. package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js +19 -11
  16. package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +1 -1
  17. package/dist/commonjs/runtime/native/styles/units.js +10 -8
  18. package/dist/commonjs/runtime/native/styles/units.js.map +1 -1
  19. package/dist/commonjs/runtime/web/api.js +18 -0
  20. package/dist/commonjs/runtime/web/api.js.map +1 -1
  21. package/dist/commonjs/style-collection/root.js +1 -0
  22. package/dist/commonjs/style-collection/root.js.map +1 -1
  23. package/dist/module/babel/index.js +2 -2
  24. package/dist/module/babel/index.js.map +1 -1
  25. package/dist/module/compiler/atRules.js +3 -1
  26. package/dist/module/compiler/atRules.js.map +1 -1
  27. package/dist/module/compiler/declarations.js +107 -31
  28. package/dist/module/compiler/declarations.js.map +1 -1
  29. package/dist/module/compiler/stylesheet.js +5 -0
  30. package/dist/module/compiler/stylesheet.js.map +1 -1
  31. package/dist/module/jest/index.js +1 -2
  32. package/dist/module/jest/index.js.map +1 -1
  33. package/dist/module/runtime/native/api.js +21 -3
  34. package/dist/module/runtime/native/api.js.map +1 -1
  35. package/dist/module/runtime/native/reactivity.js +0 -4
  36. package/dist/module/runtime/native/reactivity.js.map +1 -1
  37. package/dist/module/runtime/native/styles/shorthands/box-shadow.js +19 -11
  38. package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +1 -1
  39. package/dist/module/runtime/native/styles/units.js +11 -8
  40. package/dist/module/runtime/native/styles/units.js.map +1 -1
  41. package/dist/module/runtime/web/api.js +18 -1
  42. package/dist/module/runtime/web/api.js.map +1 -1
  43. package/dist/module/style-collection/root.js +1 -0
  44. package/dist/module/style-collection/root.js.map +1 -1
  45. package/dist/typescript/commonjs/src/babel/index.d.ts +3 -0
  46. package/dist/typescript/commonjs/src/babel/index.d.ts.map +1 -1
  47. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
  48. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +14 -3
  49. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  50. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  51. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  52. package/dist/typescript/commonjs/src/runtime/native/api.d.ts +13 -1
  53. package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -1
  54. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +0 -2
  55. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -1
  56. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  57. package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -1
  58. package/dist/typescript/commonjs/src/runtime/web/api.d.ts +8 -2
  59. package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -1
  60. package/dist/typescript/module/src/babel/index.d.ts +3 -0
  61. package/dist/typescript/module/src/babel/index.d.ts.map +1 -1
  62. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
  63. package/dist/typescript/module/src/compiler/declarations.d.ts +14 -3
  64. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  65. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  66. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  67. package/dist/typescript/module/src/runtime/native/api.d.ts +13 -1
  68. package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -1
  69. package/dist/typescript/module/src/runtime/native/reactivity.d.ts +0 -2
  70. package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -1
  71. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  72. package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -1
  73. package/dist/typescript/module/src/runtime/web/api.d.ts +8 -2
  74. package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -1
  75. package/package.json +3 -3
  76. package/src/babel/index.ts +2 -2
  77. package/src/compiler/atRules.ts +2 -0
  78. package/src/compiler/declarations.ts +147 -42
  79. package/src/compiler/stylesheet.ts +6 -0
  80. package/src/jest/index.ts +1 -2
  81. package/src/runtime/native/{api.ts → api.tsx} +31 -4
  82. package/src/runtime/native/reactivity.ts +0 -4
  83. package/src/runtime/native/styles/shorthands/box-shadow.ts +24 -18
  84. package/src/runtime/native/styles/units.ts +13 -8
  85. package/src/runtime/web/{api.ts → api.tsx} +28 -2
  86. package/src/style-collection/root.ts +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"stylesheet.d.ts","sourceRoot":"","sources":["../../../../../src/compiler/stylesheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAOjD,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,cAAc,EACd,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EAEf,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,cAA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,GAAG,OAAO,EACX,GAAE,eAAe,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;;;EAY9C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/jest/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAW,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAK1E,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,IAAI,CAAC;QACb,UAAU,QAAQ,CAAC,CAAC;YAClB,mBAAmB,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC;SACzC;KACF;CACF;AAED,eAAO,MAAM,MAAM,qBAAqB,CAAC;AAczC,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,eAAe,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;;;EAoBpD;AAED,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,EACX,EACE,KAAoB,EACpB,GAAG,OAAO,EACX,GAAE,eAAe,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;;;EAY9C"}
@@ -1,7 +1,9 @@
1
+ import { type PropsWithChildren } from "react";
1
2
  import type { StyleDescriptor } from "../../compiler";
2
3
  import type { ColorScheme, Props, StyledConfiguration, StyledOptions } from "../runtime.types";
3
4
  import type { ReactComponent } from "../utils";
4
5
  import { useNativeCss } from "./react/useNativeCss";
6
+ import { VAR_SYMBOL } from "./reactivity";
5
7
  export { StyleCollection } from "react-native-css/style-collection";
6
8
  export { useNativeCss };
7
9
  /**
@@ -15,5 +17,15 @@ export declare const colorScheme: ColorScheme;
15
17
  export declare const useUnstableNativeVariable: typeof useNativeVariable;
16
18
  export declare const useCssElement: <const C extends ReactComponent<any>, const M extends StyledConfiguration<C>>(component: C, incomingProps: Props, mapping: M) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").FunctionComponentElement<import("react").FragmentProps>;
17
19
  export declare function useNativeVariable(name: string): any;
18
- export declare function vars(variables: Record<string, StyleDescriptor>): Record<string, StyleDescriptor>;
20
+ /**
21
+ * @deprecated Use `<VariableContextProvider />` instead.
22
+ */
23
+ export declare function vars(variables: Record<string, StyleDescriptor>): {
24
+ [VAR_SYMBOL]: string;
25
+ } & {
26
+ [k: string]: StyleDescriptor;
27
+ };
28
+ export declare function VariableContextProvider(props: PropsWithChildren<{
29
+ value: Record<`--${string}`, StyleDescriptor>;
30
+ }>): import("react/jsx-runtime").JSX.Element;
19
31
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../../src/runtime/native/api.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,KAAK,EACV,WAAW,EACX,KAAK,EACL,mBAAmB,EACnB,aAAa,EACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAmB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAWrE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,MAAM,GACjB,KAAK,CAAC,CAAC,SAAS,cAAc,CAAC,GAAG,CAAC,EACnC,KAAK,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,CAAC,EAEtC,eAAe,CAAC,EAChB,SAAS,CAAC,EACV,UAAU,aAAa,QAoBxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAOzB,CAAC;AAEF,eAAO,MAAM,yBAAyB,0BAAoB,CAAC;AAE3D,eAAO,MAAM,aAAa,GACxB,KAAK,CAAC,CAAC,SAAS,cAAc,CAAC,GAAG,CAAC,EACnC,KAAK,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAA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S,CAAC,qKAIX,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,OAkB7C;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;;;;EAO9D;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,iBAAiB,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC,KAAK,MAAM,EAAE,EAAE,eAAe,CAAC,CAAA;CAAE,CAAC,2CAgB5E"}
@@ -33,8 +33,6 @@ export type VariableContextValue = Record<string, StyleDescriptor> & {
33
33
  [VAR_SYMBOL]: true;
34
34
  };
35
35
  export declare const VariableContext: import("react").Context<VariableContextValue>;
36
- /** Units *********************************************************************/
37
- export declare const rem: Observable<number, number>;
38
36
  /** Pseudo Classes ************************************************************/
39
37
  export declare const hoverFamily: WeakFamilyFn<WeakKey, void, Observable<boolean, boolean>>;
40
38
  export declare const activeFamily: WeakFamilyFn<WeakKey, void, Observable<boolean, boolean>>;
@@ -1 +1 @@
1
- {"version":3,"file":"reactivity.d.ts","sourceRoot":"","sources":["../../../../../../src/runtime/native/reactivity.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,MAAM,MAAM,GAAG;IACnB,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,GAAG,IAAI,IAAI,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI;IAC3C,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,KAAK,CAAC;IAChC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IACxB,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AE,4BAEd,CAAC;AAcF,gFAAgF;AAEhF,eAAO,MAAM,WAAW,8CAEvB,CAAC;AAGF,gFAAgF;AAEhF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC5D,eAAO,MAAM,gBAAgB,gDAA2C,CAAC;AAEzE,eAAO,MAAM,qBAAqB,2EAOhC,CAAC;AAEH,eAAO,MAAM,oBAAoB,yDAI/B,CAAC;AAEH,eAAO,MAAM,qBAAqB,yDAIhC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"box-shadow.d.ts","sourceRoot":"","sources":["../../../../../../../../src/runtime/native/styles/shorthands/box-shadow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAuBxD,eAAO,MAAM,SAAS,EAAE,qBAuCvB,CAAC"}
1
+ {"version":3,"file":"box-shadow.d.ts","sourceRoot":"","sources":["../../../../../../../../src/runtime/native/styles/shorthands/box-shadow.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AA4CxD,eAAO,MAAM,SAAS,EAAE,qBAuBvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"units.d.ts","sourceRoot":"","sources":["../../../../../../../src/runtime/native/styles/units.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD,eAAO,MAAM,EAAE,EAAE,qBAkBhB,CAAC;AAEF,eAAO,MAAM,EAAE,EAAE,qBAQhB,CAAC;AAEF,eAAO,MAAM,EAAE,EAAE,qBAQhB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,qBAQjB,CAAC"}
1
+ {"version":3,"file":"units.d.ts","sourceRoot":"","sources":["../../../../../../../src/runtime/native/styles/units.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD,eAAO,MAAM,EAAE,EAAE,qBAkBhB,CAAC;AAEF,eAAO,MAAM,EAAE,EAAE,qBAQhB,CAAC;AAEF,eAAO,MAAM,EAAE,EAAE,qBAQhB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,qBAcjB,CAAC"}
@@ -1,10 +1,16 @@
1
- import { type ComponentProps } from "react";
1
+ import { type ComponentProps, type PropsWithChildren } from "react";
2
2
  import type { ColorScheme, Props, StyledConfiguration, StyledOptions, StyledProps } from "../runtime.types";
3
3
  import type { ReactComponent } from "../utils";
4
4
  export declare const styled: <const C extends ReactComponent, const M extends StyledConfiguration<C>>(baseComponent: C, mapping: M, _options?: StyledOptions) => (props: StyledProps<ComponentProps<C>, M>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
5
- export declare const useCssElement: <const C extends ReactComponent>(component: C, incomingProps: Props, mapping: StyledConfiguration<C>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
5
+ export declare const useCssElement: <C extends ReactComponent>(component: C, incomingProps: Props, mapping: StyledConfiguration<C>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
6
6
  export declare const colorScheme: ColorScheme;
7
+ /**
8
+ * @deprecated Use `<VariableContextProvider />` instead.
9
+ */
7
10
  export declare function vars(variables: Record<string, string | number>): Record<string, string>;
11
+ export declare function VariableContextProvider(props: PropsWithChildren<{
12
+ value: Record<`--${string}`, string>;
13
+ }>): import("react/jsx-runtime").JSX.Element;
8
14
  export declare const useNativeVariable: () => never;
9
15
  export declare const useUnstableNativeVariable: () => never;
10
16
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../../src/runtime/web/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EACV,WAAW,EACX,KAAK,EACL,mBAAmB,EACnB,aAAa,EACb,WAAW,EACZ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AC,EAAE,CAAC,CAAC,2FAGjD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,cAAc,EACpD,WAAW,CAAC,EACZ,eAAe,KAAK,EACpB,SAAS,mBAAmB,CAAC,CAAC,CAAC,2FA4BhC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAOzB,CAAC;AAEF;;GAEG;AACH,wBAAgB,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,0BAW9D;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,iBAAiB,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC,KAAK,MAAM,EAAE,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC,2CAenE;AAED,eAAO,MAAM,iBAAiB,aAE7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,aAErC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-css",
3
- "version": "0.0.0-nightly.38ce466",
3
+ "version": "0.0.0-nightly.5ce6396",
4
4
  "description": "A CSS polyfill for React Native",
5
5
  "exports": {
6
6
  ".": {
@@ -188,8 +188,8 @@
188
188
  "eslint-plugin-prettier": "^5.5.1",
189
189
  "expo": "54.0.0-preview.6",
190
190
  "jest": "^29.7.0",
191
- "jest-expo": "54.0.2",
192
- "lefthook": "^1.12.2",
191
+ "jest-expo": "54.0.6",
192
+ "lefthook": "^1.12.3",
193
193
  "lightningcss": "^1.30.1",
194
194
  "metro-runtime": "^0.83.0",
195
195
  "postcss": "^8.5.6",
@@ -1,9 +1,9 @@
1
1
  /* eslint-disable */
2
- module.exports = function () {
2
+ export default function () {
3
3
  return {
4
4
  plugins: [
5
5
  require("./import-plugin").default,
6
6
  "react-native-worklets/plugin",
7
7
  ],
8
8
  };
9
- };
9
+ }
@@ -88,6 +88,8 @@ export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
88
88
  "-webkit-line-clamp": ["numberOfLines"],
89
89
  "-rn-ripple-color": ["android_ripple", "color"],
90
90
  "-rn-ripple-style": ["android_ripple", "borderless"],
91
+ "-rn-ripple-radius": ["android_ripple", "radius"],
92
+ "-rn-ripple-layer": ["android_ripple", "foreground"],
91
93
  };
92
94
 
93
95
  if (!rules) return mapping;
@@ -1,4 +1,4 @@
1
- // cSpell:ignore rcap,vmin,svmin,lvmin,dvmin,cqmin,vmax,svmax,lvmax,dvmax,cqmax,currentcolor,oklab,oklch,prophoto
1
+ // cSpell:ignore rcap,vmin,svmin,lvmin,dvmin,cqmin,vmax,svmax,lvmax,dvmax,cqmax,currentcolor,oklab,oklch,prophoto,squircle,oldstyle,nums
2
2
 
3
3
  import Color from "colorjs.io";
4
4
  import type {
@@ -91,6 +91,7 @@ const parsers: {
91
91
  "animation-play-state": addAnimationValue,
92
92
  "animation-timing-function": addAnimationValue,
93
93
  "aspect-ratio": parseAspectRatio,
94
+ "backface-visibility": parseBackfaceVisibility,
94
95
  "background-color": parseColorDeclaration,
95
96
  "background-image": parseBackgroundImage,
96
97
  "block-size": parseSizeDeclaration,
@@ -146,8 +147,9 @@ const parsers: {
146
147
  "border-top-style": parseBorderStyleDeclaration,
147
148
  "border-top-width": parseBorderSideWidthDeclaration,
148
149
  "border-width": parseBorderWidth,
149
- "bottom": parseSizeDeclaration,
150
+ "bottom": parseSizeWithAutoDeclaration,
150
151
  "box-shadow": parseBoxShadow,
152
+ "box-sizing": parseBoxSizing,
151
153
  "caret-color": parseColorOrAutoDeclaration,
152
154
  "color": parseFontColorDeclaration,
153
155
  "column-gap": parseGap,
@@ -155,10 +157,11 @@ const parsers: {
155
157
  "container-name": parseContainerName,
156
158
  "container-type": parseContainerType,
157
159
  "display": parseDisplay,
160
+ "direction": parseDirection,
158
161
  "fill": parseSVGPaint,
159
162
  "filter": parseFilter,
160
163
  "flex": parseFlex,
161
- "flex-basis": parseLengthPercentageOrAutoDeclaration,
164
+ "flex-basis": parseLengthPercentageDeclaration,
162
165
  "flex-direction": ({ value }) => value,
163
166
  "flex-flow": parseFlexFlow,
164
167
  "flex-grow": ({ value }) => value,
@@ -171,30 +174,30 @@ const parsers: {
171
174
  "font-variant-caps": parseFontVariantCapsDeclaration,
172
175
  "font-weight": parseFontWeightDeclaration,
173
176
  "gap": parseGap,
174
- "height": parseSizeDeclaration,
175
- "inline-size": parseSizeDeclaration,
177
+ "height": parseSizeWithAutoDeclaration,
178
+ "inline-size": parseSizeWithAutoDeclaration,
176
179
  "inset": parseInset,
177
180
  "inset-block": parseInsetBlock,
178
- "inset-block-end": parseLengthPercentageOrAutoDeclaration,
179
- "inset-block-start": parseLengthPercentageOrAutoDeclaration,
181
+ "inset-block-end": parseLengthPercentageDeclaration,
182
+ "inset-block-start": parseLengthPercentageDeclaration,
180
183
  "inset-inline": parseInsetInline,
181
- "inset-inline-end": parseLengthPercentageOrAutoDeclaration,
182
- "inset-inline-start": parseLengthPercentageOrAutoDeclaration,
184
+ "inset-inline-end": parseLengthPercentageDeclaration,
185
+ "inset-inline-start": parseLengthPercentageDeclaration,
183
186
  "justify-content": parseJustifyContent,
184
- "left": parseSizeDeclaration,
187
+ "left": parseSizeWithAutoDeclaration,
185
188
  "letter-spacing": parseLetterSpacing,
186
189
  "line-height": parseLineHeightDeclaration,
187
190
  "margin": parseMargin,
188
191
  "margin-block": parseMarginBlock,
189
192
  "margin-block-end": parseLengthPercentageOrAutoDeclaration,
190
193
  "margin-block-start": parseLengthPercentageOrAutoDeclaration,
191
- "margin-bottom": parseSizeDeclaration,
194
+ "margin-bottom": parseSizeWithAutoDeclaration,
192
195
  "margin-inline": parseMarginInline,
193
196
  "margin-inline-end": parseLengthPercentageOrAutoDeclaration,
194
197
  "margin-inline-start": parseLengthPercentageOrAutoDeclaration,
195
- "margin-left": parseSizeDeclaration,
196
- "margin-right": parseSizeDeclaration,
197
- "margin-top": parseSizeDeclaration,
198
+ "margin-left": parseSizeWithAutoDeclaration,
199
+ "margin-right": parseSizeWithAutoDeclaration,
200
+ "margin-top": parseSizeWithAutoDeclaration,
198
201
  "max-block-size": parseSizeDeclaration,
199
202
  "max-height": parseSizeDeclaration,
200
203
  "max-inline-size": parseSizeDeclaration,
@@ -203,21 +206,24 @@ const parsers: {
203
206
  "min-height": parseSizeDeclaration,
204
207
  "min-inline-size": parseSizeDeclaration,
205
208
  "min-width": parseSizeDeclaration,
206
- "opacity": ({ value }) => value,
209
+ "opacity": ({ value }) => round(value),
210
+ "outline-color": parseColorDeclaration,
211
+ "outline-style": parseOutlineStyle,
212
+ "outline-width": parseBorderSideWidthDeclaration,
207
213
  "overflow": parseOverflow,
208
214
  "padding": parsePadding,
209
215
  "padding-block": parsePaddingBlock,
210
- "padding-block-end": parseLengthPercentageOrAutoDeclaration,
211
- "padding-block-start": parseLengthPercentageOrAutoDeclaration,
216
+ "padding-block-end": parseLengthPercentageDeclaration,
217
+ "padding-block-start": parseLengthPercentageDeclaration,
212
218
  "padding-bottom": parseSizeDeclaration,
213
219
  "padding-inline": parsePaddingInline,
214
- "padding-inline-end": parseLengthPercentageOrAutoDeclaration,
215
- "padding-inline-start": parseLengthPercentageOrAutoDeclaration,
220
+ "padding-inline-end": parseLengthPercentageDeclaration,
221
+ "padding-inline-start": parseLengthPercentageDeclaration,
216
222
  "padding-left": parseSizeDeclaration,
217
223
  "padding-right": parseSizeDeclaration,
218
224
  "padding-top": parseSizeDeclaration,
219
225
  "position": parsePosition,
220
- "right": parseSizeDeclaration,
226
+ "right": parseSizeWithAutoDeclaration,
221
227
  "rotate": parseRotate,
222
228
  "row-gap": parseGap,
223
229
  "scale": parseScale,
@@ -230,7 +236,7 @@ const parsers: {
230
236
  "text-decoration-style": parseTextDecorationStyle,
231
237
  "text-shadow": parseTextShadow,
232
238
  "text-transform": ({ value }) => value.case,
233
- "top": parseSizeDeclaration,
239
+ "top": parseSizeWithAutoDeclaration,
234
240
  "transform": parseTransform,
235
241
  "transition": addTransitionValue,
236
242
  "transition-delay": addTransitionValue,
@@ -241,7 +247,7 @@ const parsers: {
241
247
  "user-select": parseUserSelect,
242
248
  "vertical-align": parseVerticalAlign,
243
249
  "visibility": parseVisibility,
244
- "width": parseSizeDeclaration,
250
+ "width": parseSizeWithAutoDeclaration,
245
251
  "z-index": parseZIndex,
246
252
  };
247
253
 
@@ -611,8 +617,11 @@ function parseMarginBlock(
611
617
  "margin-block-start": parseLengthPercentageOrAuto(
612
618
  value.blockStart,
613
619
  builder,
620
+ { allowAuto: true },
614
621
  ),
615
- "margin-block-end": parseLengthPercentageOrAuto(value.blockEnd, builder),
622
+ "margin-block-end": parseLengthPercentageOrAuto(value.blockEnd, builder, {
623
+ allowAuto: true,
624
+ }),
616
625
  });
617
626
  }
618
627
 
@@ -624,8 +633,11 @@ function parseMarginInline(
624
633
  "margin-inline-start": parseLengthPercentageOrAuto(
625
634
  value.inlineStart,
626
635
  builder,
636
+ { allowAuto: true },
627
637
  ),
628
- "margin-inline-end": parseLengthPercentageOrAuto(value.inlineEnd, builder),
638
+ "margin-inline-end": parseLengthPercentageOrAuto(value.inlineEnd, builder, {
639
+ allowAuto: true,
640
+ }),
629
641
  });
630
642
  }
631
643
 
@@ -971,17 +983,31 @@ export function parseCustomDeclaration(
971
983
  parseUnparsed(declaration.value.value, builder, property),
972
984
  );
973
985
  } else if (property === "-rn-ripple-style") {
974
- builder.addDescriptor(
975
- property,
976
- parseUnparsed(declaration.value.value, builder, property) ===
977
- "borderless",
978
- );
986
+ if (
987
+ parseUnparsed(declaration.value.value, builder, property) === "borderless"
988
+ ) {
989
+ builder.addDescriptor(property, true);
990
+ }
991
+ } else if (property === "-rn-ripple-layer") {
992
+ if (
993
+ parseUnparsed(declaration.value.value, builder, property) === "foreground"
994
+ ) {
995
+ builder.addDescriptor(property, true);
996
+ }
979
997
  } else if (property === "object-fit") {
980
998
  // https://github.com/parcel-bundler/lightningcss/issues/1046
981
999
  parseObjectFit(declaration.value, builder);
982
1000
  } else if (property === "object-position") {
983
1001
  // https://github.com/parcel-bundler/lightningcss/issues/1047
984
1002
  parseObjectPosition(declaration.value, builder);
1003
+ } else if (property === "outline-offset") {
1004
+ // https://github.com/parcel-bundler/lightningcss/issues/1048
1005
+ builder.addDescriptor(
1006
+ property,
1007
+ parseUnparsed(declaration.value.value, builder, property),
1008
+ );
1009
+ } else if (property === "corner-shape") {
1010
+ parseCornerShape(declaration.value, builder);
985
1011
  } else if (
986
1012
  validProperties.has(property) ||
987
1013
  property.startsWith("--") ||
@@ -1457,6 +1483,13 @@ export function parseSizeDeclaration(
1457
1483
  return parseSize(declaration.value, builder);
1458
1484
  }
1459
1485
 
1486
+ export function parseSizeWithAutoDeclaration(
1487
+ declaration: { value: Size | MaxSize },
1488
+ builder: StylesheetBuilder,
1489
+ ) {
1490
+ return parseSize(declaration.value, builder, { allowAuto: true });
1491
+ }
1492
+
1460
1493
  export function parsePointerEvents(
1461
1494
  { value }: { value: string },
1462
1495
  builder: StylesheetBuilder,
@@ -1709,13 +1742,20 @@ export function parseColor(cssColor: CssColor, builder: StylesheetBuilder) {
1709
1742
  }
1710
1743
  }
1711
1744
 
1712
- export function parseLengthPercentageOrAutoDeclaration(
1745
+ export function parseLengthPercentageDeclaration(
1713
1746
  value: { value: LengthPercentageOrAuto },
1714
1747
  builder: StylesheetBuilder,
1715
1748
  ) {
1716
1749
  return parseLengthPercentageOrAuto(value.value, builder);
1717
1750
  }
1718
1751
 
1752
+ export function parseLengthPercentageOrAutoDeclaration(
1753
+ value: { value: LengthPercentageOrAuto },
1754
+ builder: StylesheetBuilder,
1755
+ ) {
1756
+ return parseLengthPercentageOrAuto(value.value, builder, { allowAuto: true });
1757
+ }
1758
+
1719
1759
  export function parseLengthPercentageOrAuto(
1720
1760
  lengthPercentageOrAuto: LengthPercentageOrAuto,
1721
1761
  builder: StylesheetBuilder,
@@ -1788,6 +1828,7 @@ export function parseAlignContent(
1788
1828
  "stretch",
1789
1829
  "space-between",
1790
1830
  "space-around",
1831
+ "space-evenly",
1791
1832
  ]);
1792
1833
 
1793
1834
  let value: string | undefined;
@@ -2007,7 +2048,11 @@ export function parsePosition(
2007
2048
  { value }: DeclarationType<"position">,
2008
2049
  builder: StylesheetBuilder,
2009
2050
  ) {
2010
- if (value.type === "absolute" || value.type === "relative") {
2051
+ if (
2052
+ value.type === "absolute" ||
2053
+ value.type === "relative" ||
2054
+ value.type === "static"
2055
+ ) {
2011
2056
  return value.type;
2012
2057
  }
2013
2058
 
@@ -2097,16 +2142,7 @@ function parseBorderBlockStyle(
2097
2142
  }
2098
2143
 
2099
2144
  export function parseBorderSideWidthDeclaration(
2100
- declaration: DeclarationType<
2101
- | "border-block-end-width"
2102
- | "border-block-start-width"
2103
- | "border-bottom-width"
2104
- | "border-inline-end-width"
2105
- | "border-inline-start-width"
2106
- | "border-left-width"
2107
- | "border-right-width"
2108
- | "border-top-width"
2109
- >,
2145
+ declaration: Extract<Declaration, { value: BorderSideWidth }>,
2110
2146
  builder: StylesheetBuilder,
2111
2147
  ) {
2112
2148
  builder.addDescriptor(
@@ -2359,12 +2395,24 @@ export function parseBoxShadow(
2359
2395
  }
2360
2396
  }
2361
2397
 
2398
+ export function parseBoxSizing(
2399
+ declaration: DeclarationType<"box-sizing">,
2400
+ builder: StylesheetBuilder,
2401
+ ) {
2402
+ if (["border-box", "content-box"].includes(declaration.value)) {
2403
+ return declaration.value;
2404
+ }
2405
+
2406
+ builder.addWarning("value", declaration.value);
2407
+ return undefined;
2408
+ }
2409
+
2362
2410
  export function parseDisplay(
2363
2411
  { value }: DeclarationType<"display">,
2364
2412
  builder: StylesheetBuilder,
2365
2413
  ) {
2366
2414
  if (value.type === "keyword") {
2367
- if (value.value === "none") {
2415
+ if (value.value === "none" || value.value === "contents") {
2368
2416
  return value.value;
2369
2417
  } else {
2370
2418
  builder.addWarning("value", value.value);
@@ -2416,6 +2464,19 @@ export function parseDisplay(
2416
2464
  }
2417
2465
  }
2418
2466
 
2467
+ export function parseDirection(
2468
+ declaration: DeclarationType<"direction">,
2469
+ builder: StylesheetBuilder,
2470
+ ) {
2471
+ if (["ltr", "rtl"].includes(declaration.value)) {
2472
+ builder.addDescriptor("direction", declaration.value);
2473
+ builder.addDescriptor("--__rn-css-direction", declaration.value);
2474
+ }
2475
+
2476
+ builder.addWarning("value", declaration.value);
2477
+ return;
2478
+ }
2479
+
2419
2480
  export function parseAspectRatio({
2420
2481
  value,
2421
2482
  }: DeclarationType<"aspect-ratio">): StyleDescriptor {
@@ -2433,6 +2494,18 @@ export function parseAspectRatio({
2433
2494
  }
2434
2495
  }
2435
2496
 
2497
+ export function parseBackfaceVisibility(
2498
+ { value }: DeclarationType<"backface-visibility">,
2499
+ builder: StylesheetBuilder,
2500
+ ): StyleDescriptor {
2501
+ if (["visible", "hidden"].includes(value)) {
2502
+ return value;
2503
+ } else {
2504
+ builder.addWarning("value", value);
2505
+ return;
2506
+ }
2507
+ }
2508
+
2436
2509
  export function parseDimension(
2437
2510
  { unit, value }: Extract<Token, { type: "dimension" }>,
2438
2511
  builder: StylesheetBuilder,
@@ -3031,6 +3104,19 @@ function parseObjectPosition(
3031
3104
  ]);
3032
3105
  }
3033
3106
 
3107
+ function parseCornerShape(
3108
+ declaration: CustomProperty,
3109
+ builder: StylesheetBuilder,
3110
+ ) {
3111
+ const shape = parseUnparsed(declaration.value, builder, "corner-shape");
3112
+
3113
+ if (shape === "round") {
3114
+ builder.addDescriptor("borderCurve", "circular");
3115
+ } else if (shape === "squircle") {
3116
+ builder.addDescriptor("borderCurve", "continuous");
3117
+ }
3118
+ }
3119
+
3034
3120
  function parseVisibility(
3035
3121
  declaration: DeclarationType<"visibility">,
3036
3122
  builder: StylesheetBuilder,
@@ -3044,6 +3130,25 @@ function parseVisibility(
3044
3130
  }
3045
3131
  }
3046
3132
 
3133
+ function parseOutlineStyle(
3134
+ declaration: DeclarationType<"outline-style">,
3135
+ builder: StylesheetBuilder,
3136
+ ) {
3137
+ const allowed = ["solid", "dotted", "dashed"];
3138
+
3139
+ if (
3140
+ declaration.value.type !== "auto" &&
3141
+ allowed.includes(declaration.value.value)
3142
+ ) {
3143
+ builder.addDescriptor("outlineStyle", declaration.value.value);
3144
+ } else {
3145
+ builder.addWarning(
3146
+ "value",
3147
+ declaration.value.type === "auto" ? "auto" : declaration.value.value,
3148
+ );
3149
+ }
3150
+ }
3151
+
3047
3152
  function parseFilter(
3048
3153
  declaration: DeclarationType<"filter">,
3049
3154
  builder: StylesheetBuilder,
@@ -568,6 +568,12 @@ export class StylesheetBuilder {
568
568
  : [value];
569
569
  // Append extra media queries if they exist
570
570
  this.shared[type][name].push(variableValue);
571
+
572
+ if (type === "rootVariables" && name === "__rn-css-em") {
573
+ const remName = "__rn-css-rem";
574
+ this.shared[type][remName] ??= [];
575
+ this.shared[type][remName].push(variableValue);
576
+ }
571
577
  }
572
578
  }
573
579
  }
package/src/jest/index.ts CHANGED
@@ -5,7 +5,7 @@ import { inspect } from "node:util";
5
5
  import { compile, type CompilerOptions } from "react-native-css/compiler";
6
6
  import { StyleCollection } from "react-native-css/style-collection";
7
7
 
8
- import { colorScheme, dimensions, rem } from "../runtime/native/reactivity";
8
+ import { colorScheme, dimensions } from "../runtime/native/reactivity";
9
9
 
10
10
  declare global {
11
11
  /* eslint-disable @typescript-eslint/no-namespace */
@@ -21,7 +21,6 @@ export const testID = "react-native-css";
21
21
  beforeEach(() => {
22
22
  StyleCollection.styles.clear();
23
23
  dimensions.set(Dimensions.get("window"));
24
- rem.set(14);
25
24
  Appearance.setColorScheme(null);
26
25
  colorScheme.set(null);
27
26
  });
@@ -1,8 +1,8 @@
1
1
  /* eslint-disable */
2
- import { useContext, useState } from "react";
2
+ import { useContext, useMemo, useState, type PropsWithChildren } from "react";
3
3
  import { Appearance } from "react-native";
4
4
 
5
- import type { InlineVariable, StyleDescriptor } from "../../compiler";
5
+ import type { StyleDescriptor } from "../../compiler";
6
6
  import type {
7
7
  ColorScheme,
8
8
  Props,
@@ -18,6 +18,7 @@ import {
18
18
  VariableContext,
19
19
  type Effect,
20
20
  type Getter,
21
+ type VariableContextValue,
21
22
  } from "./reactivity";
22
23
  import { resolveValue } from "./styles/resolve";
23
24
 
@@ -102,7 +103,33 @@ export function useNativeVariable(name: string) {
102
103
  return resolveValue([{}, "var", [name]], effect.get, { inheritedVariables });
103
104
  }
104
105
 
106
+ /**
107
+ * @deprecated Use `<VariableContextProvider />` instead.
108
+ */
105
109
  export function vars(variables: Record<string, StyleDescriptor>) {
106
- (variables as InlineVariable)[VAR_SYMBOL] = "inline";
107
- return variables;
110
+ return Object.assign(
111
+ { [VAR_SYMBOL]: "inline" },
112
+ Object.fromEntries(
113
+ Object.entries(variables).map(([k, v]) => [k.replace(/^--/, ""), v]),
114
+ ),
115
+ );
116
+ }
117
+
118
+ export function VariableContextProvider(
119
+ props: PropsWithChildren<{ value: Record<`--${string}`, StyleDescriptor> }>,
120
+ ) {
121
+ const inheritedVariables = useContext(VariableContext);
122
+
123
+ const value: VariableContextValue = useMemo(
124
+ () => ({
125
+ ...inheritedVariables,
126
+ ...Object.fromEntries(
127
+ Object.entries(props.value).map(([k, v]) => [k.replace(/^--/, ""), v]),
128
+ ),
129
+ [VAR_SYMBOL]: true,
130
+ }),
131
+ [inheritedVariables, props.value],
132
+ );
133
+
134
+ return <VariableContext value={value}>{props.children}</VariableContext>;
108
135
  }
@@ -189,10 +189,6 @@ export const VariableContext = createContext<VariableContextValue>({
189
189
  [VAR_SYMBOL]: true,
190
190
  });
191
191
 
192
- /** Units *********************************************************************/
193
-
194
- export const rem = observable(14);
195
-
196
192
  /** Pseudo Classes ************************************************************/
197
193
 
198
194
  export const hoverFamily = weakFamily(() => observable(false));