react-native-css 0.0.0-nightly.2c68396 → 0.0.0-nightly.30f9c5d

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.
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "SafeAreaProvider", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _reactNativeSafeAreaContext.SafeAreaProvider;
10
+ }
11
+ });
12
+ var _reactNativeSafeAreaContext = require("react-native-css/components/react-native-safe-area-context");
13
+ //# sourceMappingURL=SafeAreaProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeSafeAreaContext","require"],"sourceRoot":"../../../src","sources":["components/SafeAreaProvider.tsx"],"mappings":";;;;;;;;;;;AAAA,IAAAA,2BAAA,GAAAC,OAAA","ignoreList":[]}
@@ -11,6 +11,126 @@ var _reactivity = require("../reactivity.js");
11
11
  var _calculateProps = require("./calculate-props.js");
12
12
  /* eslint-disable */
13
13
 
14
+ /**
15
+ * Checks if the left style object has any properties that are not present in the right style object.
16
+ * This is used to determine if styles need to be preserved in an array or if right can completely override left.
17
+ *
18
+ * Note: This intentionally only checks one direction (left → right). We don't need to check if right has
19
+ * properties that left doesn't have, because right will always be applied/merged. The question we're
20
+ * answering is: "Does left have any properties that would be lost if we just used right?" If yes, we
21
+ * create a style array [left, right] to preserve both. If no, right can safely replace left entirely.
22
+ *
23
+ * @param left - The left style object to check
24
+ * @param right - The right style object to compare against
25
+ * @returns true if left has at least one property key that doesn't exist in right, false otherwise
26
+ *
27
+ * @example
28
+ * hasNonOverlappingProperties({color: 'red', fontSize: 12}, {color: 'blue'}) // true - fontSize is not in right
29
+ * hasNonOverlappingProperties({color: 'red'}, {color: 'blue', fontSize: 12}) // false - all left keys exist in right
30
+ */
31
+ function hasNonOverlappingProperties(left, right) {
32
+ // Null safety check
33
+ if (!left || !right) {
34
+ return false;
35
+ }
36
+
37
+ // Only check own properties to avoid prototype pollution
38
+ for (const key in left) {
39
+ if (Object.prototype.hasOwnProperty.call(left, key)) {
40
+ if (!Object.prototype.hasOwnProperty.call(right, key)) {
41
+ return true;
42
+ }
43
+ }
44
+ }
45
+ return false;
46
+ }
47
+
48
+ /**
49
+ * Flattens a style array into a single object when possible, with rightmost values taking precedence.
50
+ * Returns the original array if it contains any non-plain objects, arrays, or CSS variable objects.
51
+ *
52
+ * Note: This function assumes the input array has already been filtered (e.g., by filterCssVariables),
53
+ * so empty arrays should not reach this function. If they do, they will be treated as non-flattenable.
54
+ *
55
+ * @param styleArray - The style array to potentially flatten
56
+ * @returns A single merged object if all items are plain objects, otherwise the original array
57
+ */
58
+ function flattenStyleArray(styleArray) {
59
+ // Check if we can flatten to a single object (all items are plain objects)
60
+ for (const item of styleArray) {
61
+ // Use explicit null check instead of !item to allow falsy values like 0 or false
62
+ if (item == null || typeof item !== "object" || Array.isArray(item) || Object.prototype.hasOwnProperty.call(item, _reactivity.VAR_SYMBOL)) {
63
+ return styleArray;
64
+ }
65
+ }
66
+
67
+ // Use reduce to avoid spread operator performance issues with large arrays
68
+ return styleArray.reduce((acc, item) => Object.assign(acc, item), {});
69
+ }
70
+
71
+ /**
72
+ * Recursively filters out CSS variable objects (with VAR_SYMBOL) from style values.
73
+ * This prevents CSS variable runtime objects from leaking into React Native component props.
74
+ *
75
+ * @param value - The value to filter (can be any type: object, array, primitive, etc.)
76
+ * @param depth - Internal recursion depth counter to prevent stack overflow (max 100)
77
+ * @returns The filtered value with CSS variables removed, or `undefined` if the entire value
78
+ * should be filtered out (e.g., empty arrays, objects with only VAR_SYMBOL properties)
79
+ *
80
+ * Filtering behavior:
81
+ * - Objects with VAR_SYMBOL property: returns `undefined` (completely filtered)
82
+ * - Arrays: filters out VAR_SYMBOL objects, returns `undefined` if empty after filtering
83
+ * - Objects: recursively filters properties, returns `undefined` if no properties remain
84
+ * - Primitives (null, undefined, numbers, strings, booleans): returned as-is
85
+ * - Symbol properties: intentionally filtered out for React Native compatibility
86
+ *
87
+ * @example
88
+ * filterCssVariables({fontSize: 16, color: {[VAR_SYMBOL]: true}}) // {fontSize: 16}
89
+ * filterCssVariables([{margin: 10}, {[VAR_SYMBOL]: true}]) // [{margin: 10}]
90
+ * filterCssVariables({color: {[VAR_SYMBOL]: true}}) // undefined (all props filtered)
91
+ */
92
+ function filterCssVariables(value, depth = 0) {
93
+ // Prevent stack overflow on deeply nested structures
94
+ if (depth > 100) {
95
+ return value;
96
+ }
97
+ if (value === null || value === undefined) {
98
+ return value;
99
+ }
100
+ if (Array.isArray(value)) {
101
+ // Single-pass filter with map operation
102
+ const filtered = [];
103
+ for (const item of value) {
104
+ const filteredItem = filterCssVariables(item, depth + 1);
105
+ if (filteredItem !== undefined && !(typeof filteredItem === "object" && filteredItem !== null && Object.prototype.hasOwnProperty.call(filteredItem, _reactivity.VAR_SYMBOL))) {
106
+ filtered.push(filteredItem);
107
+ }
108
+ }
109
+ return filtered.length > 0 ? filtered : undefined;
110
+ }
111
+ if (typeof value === "object") {
112
+ // If the object itself has VAR_SYMBOL, filter it out (check own property only)
113
+ if (Object.prototype.hasOwnProperty.call(value, _reactivity.VAR_SYMBOL)) {
114
+ return undefined;
115
+ }
116
+
117
+ // Otherwise, filter VAR_SYMBOL properties from nested objects
118
+ const filtered = {};
119
+ let hasProperties = false;
120
+
121
+ // Use Object.keys to only iterate own string properties (not inherited, not Symbols)
122
+ // This intentionally filters out Symbol properties for React Native compatibility
123
+ for (const key of Object.keys(value)) {
124
+ const filteredValue = filterCssVariables(value[key], depth + 1);
125
+ if (filteredValue !== undefined) {
126
+ filtered[key] = filteredValue;
127
+ hasProperties = true;
128
+ }
129
+ }
130
+ return hasProperties ? filtered : undefined;
131
+ }
132
+ return value;
133
+ }
14
134
  const stylesFamily = exports.stylesFamily = (0, _reactivity.family)((hash, rules) => {
15
135
  const sortedRules = Array.from(rules).sort(_utilities.specificityCompareFn);
16
136
  const obs = (0, _reactivity.observable)(read => (0, _calculateProps.calculateProps)(read, sortedRules));
@@ -76,23 +196,67 @@ function deepMergeConfig(config, left, right, rightIsInline = false) {
76
196
  ...left,
77
197
  ...right
78
198
  };
79
- // More performant approach - check for non-overlapping properties without Sets
80
- if (left?.style && right?.style && rightIsInline) {
81
- const leftStyle = left.style;
82
- const rightStyle = right.style;
83
199
 
84
- // Quick check: do any left properties NOT exist in right?
85
- let hasNonOverlappingProperties = false;
86
- for (const key in leftStyle) {
87
- if (!(key in rightStyle)) {
88
- hasNonOverlappingProperties = true;
89
- break; // Early exit for performance
200
+ // Handle null/undefined inline styles
201
+ if (right?.style === null || right?.style === undefined) {
202
+ if (left?.style) {
203
+ result.style = left.style;
204
+ }
205
+ } else if (rightIsInline && right?.style) {
206
+ // Filter inline styles if rightIsInline is true
207
+ const filteredRightStyle = filterCssVariables(right.style);
208
+ if (left?.style) {
209
+ if (!filteredRightStyle) {
210
+ // All inline styles were CSS variables, only use left
211
+ result.style = left.style;
212
+ } else {
213
+ const leftStyle = left.style;
214
+
215
+ // For arrays or objects, check if we need to create a style array
216
+ const leftIsObject = typeof leftStyle === "object" && !Array.isArray(leftStyle);
217
+ const rightIsObject = typeof filteredRightStyle === "object" && !Array.isArray(filteredRightStyle);
218
+ if (leftIsObject && rightIsObject) {
219
+ if (hasNonOverlappingProperties(leftStyle, filteredRightStyle)) {
220
+ result.style = [leftStyle, filteredRightStyle];
221
+ } else {
222
+ // All left properties are in right, right overrides
223
+ result.style = filteredRightStyle;
224
+ }
225
+ } else {
226
+ // One or both are arrays, merge them
227
+ result.style = [leftStyle, filteredRightStyle];
228
+ }
229
+ }
230
+ } else {
231
+ // No left style, just use filtered right
232
+ if (filteredRightStyle) {
233
+ result.style = filteredRightStyle;
234
+ } else {
235
+ // All filtered out, remove style prop
236
+ delete result.style;
90
237
  }
91
238
  }
92
- if (hasNonOverlappingProperties) {
93
- result.style = [leftStyle, rightStyle];
239
+ } else if (!rightIsInline && right?.style) {
240
+ // Merging non-inline styles (e.g., important styles)
241
+ if (left?.style) {
242
+ // If left.style is an array, append right.style
243
+ if (Array.isArray(left.style)) {
244
+ const combined = [...left.style, right.style];
245
+ result.style = flattenStyleArray(combined);
246
+ } else if (typeof left.style === "object" && typeof right.style === "object") {
247
+ // Both are objects, check for overlaps
248
+ if (hasNonOverlappingProperties(left.style, right.style)) {
249
+ result.style = flattenStyleArray([left.style, right.style]);
250
+ } else {
251
+ // All left properties are overridden by right
252
+ result.style = right.style;
253
+ }
254
+ } else {
255
+ // One or both are arrays/mixed types
256
+ const combined = [left.style, right.style];
257
+ result.style = flattenStyleArray(combined);
258
+ }
94
259
  }
95
- // Otherwise, Object.assign above will handle the override correctly
96
260
  }
97
261
  } else {
98
262
  result = Object.assign({}, left, right);
@@ -129,18 +293,8 @@ function deepMergeConfig(config, left, right, rightIsInline = false) {
129
293
  let rightValue = right?.[target];
130
294
 
131
295
  // Strip any inline variables from the target
132
- if (rightIsInline && rightValue) {
133
- if (Array.isArray(rightValue)) {
134
- rightValue = rightValue.filter(v => {
135
- return typeof v !== "object" || !(v && _reactivity.VAR_SYMBOL in v);
136
- });
137
- if (rightValue.length === 0) {
138
- rightValue = undefined;
139
- }
140
- } else if (typeof rightValue === "object" && rightValue && _reactivity.VAR_SYMBOL in rightValue) {
141
- rightValue = undefined;
142
- delete result[target][_reactivity.VAR_SYMBOL];
143
- }
296
+ if (rightIsInline && rightValue !== undefined) {
297
+ rightValue = filterCssVariables(rightValue);
144
298
  }
145
299
  if (rightValue !== undefined) {
146
300
  result[target] = left && target in left ? [left[target], rightValue] : rightValue;
@@ -1 +1 @@
1
- {"version":3,"names":["_utilities","require","_interaction","_reactivity","_calculateProps","stylesFamily","exports","family","hash","rules","sortedRules","Array","from","sort","specificityCompareFn","obs","observable","read","calculateProps","Object","assign","cleanup","effect","observers","delete","size","getStyledProps","state","inline","result","styledProps","stylesObs","get","styleEffect","config","configs","deepMergeConfig","nativeStyleMapping","normal","important","hoverFamily","has","ruleEffectGetter","onHoverIn","getInteractionHandler","onHoverOut","activeFamily","onPress","onPressIn","onPressOut","focusFamily","onBlur","onFocus","containerLayoutFamily","onLayout","left","right","rightIsInline","target","isArray","length","style","leftStyle","rightStyle","hasNonOverlappingProperties","key","source","i","undefined","slice","rightValue","filter","v","VAR_SYMBOL","props","tokens","lastToken","pop","token","path","entries","styleValue","split"],"sourceRoot":"../../../../src","sources":["native/styles/index.ts"],"mappings":";;;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAWA,IAAAG,eAAA,GAAAH,OAAA;AAjBA;;AAmBO,MAAMI,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,kBAAM,EAChC,CACEC,IAAY,EACZC,KAA6D,KAC1D;EACH,MAAMC,WAAW,GAAGC,KAAK,CAACC,IAAI,CAACH,KAAK,CAAC,CAACI,IAAI,CAACC,+BAAoB,CAAC;EAEhE,MAAMC,GAAG,GAAG,IAAAC,sBAAU,EAAEC,IAAI,IAAK,IAAAC,8BAAc,EAACD,IAAI,EAAEP,WAAW,CAAC,CAAC;;EAEnE;AACJ;AACA;EACI,OAAOS,MAAM,CAACC,MAAM,CAACL,GAAG,EAAE;IACxBM,OAAO,EAAGC,MAAc,IAAK;MAC3BP,GAAG,CAACQ,SAAS,CAACC,MAAM,CAACF,MAAM,CAAC;MAC5B,IAAIP,GAAG,CAACQ,SAAS,CAACE,IAAI,KAAK,CAAC,EAAE;QAC5BpB,YAAY,CAACmB,MAAM,CAAChB,IAAI,CAAC;MAC3B;IACF;EACF,CAAC,CAAC;AACJ,CACF,CAAC;AAEM,SAASkB,cAAcA,CAC5BC,KAAqB,EACrBC,MAA8C,EAC9C;EACA,IAAIC,MAAuC;EAE3C,MAAMC,WAAW,GAAGH,KAAK,CAACI,SAAS,EAAEC,GAAG,CAACL,KAAK,CAACM,WAAW,CAAC;EAE3D,KAAK,MAAMC,MA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1
+ {"version":3,"names":["_utilities","require","_interaction","_reactivity","_calculateProps","hasNonOverlappingProperties","left","right","key","Object","prototype","hasOwnProperty","call","flattenStyleArray","styleArray","item","Array","isArray","VAR_SYMBOL","reduce","acc","assign","filterCssVariables","value","depth","undefined","filtered","filteredItem","push","length","hasProperties","keys","filteredValue","stylesFamily","exports","family","hash","rules","sortedRules","from","sort","specificityCompareFn","obs","observable","read","calculateProps","cleanup","effect","observers","delete","size","getStyledProps","state","inline","result","styledProps","stylesObs","get","styleEffect","config","configs","deepMergeConfig","nativeStyleMapping","normal","important","hoverFamily","has","ruleEffectGetter","onHoverIn","getInteractionHandler","onHoverOut","activeFamily","onPress","onPressIn","onPressOut","focusFamily","onBlur","onFocus","containerLayoutFamily","onLayout","rightIsInline","target","style","filteredRightStyle","leftStyle","leftIsObject","rightIsObject","combined","source","i","slice","rightValue","props","tokens","lastToken","pop","token","path","entries","styleValue","split"],"sourceRoot":"../../../../src","sources":["native/styles/index.ts"],"mappings":";;;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAWA,IAAAG,eAAA,GAAAH,OAAA;AAjBA;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASI,2BAA2BA,CAClCC,IAAyB,EACzBC,KAA0B,EACjB;EACT;EACA,IAAI,CAACD,IAAI,IAAI,CAACC,KAAK,EAAE;IACnB,OAAO,KAAK;EACd;;EAEA;EACA,KAAK,MAAMC,GAAG,IAAIF,IAAI,EAAE;IACtB,IAAIG,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACN,IAAI,EAAEE,GAAG,CAAC,EAAE;MACnD,IAAI,CAACC,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACL,KAAK,EAAEC,GAAG,CAAC,EAAE;QACrD,OAAO,IAAI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B,CAAC,EAAE;IACnE,MAAMqC,UAAU,GAAGX,MAAM,CAAChF,GAAG,CAAC;IAE9B,OAAOgF,MAAM,CAAChF,GAAG,CAAC;IAElB,IAAI2F,UAAU,KAAK1E,SAAS,EAAE;MAC5B;IACF;IAEA,IAAIwD,MAAM,GAAGW,KAAK;IAClB,MAAMC,MAAM,GAAGI,IAAI,CAACG,KAAK,CAAC,GAAG,CAAC;IAC9B,MAAMN,SAAS,GAAGD,MAAM,CAACE,GAAG,CAAC,CAAC;IAC9B,KAAK,MAAMC,KAAK,IAAIH,MAAM,EAAE;MAC1BZ,MAAM,CAACe,KAAK,CAAC,KAAK,CAAC,CAAC;MACpBf,MAAM,GAAGA,MAAM,CAACe,KAAK,CAAC;IACxB;IAEAf,MAAM,CAACa,SAAS,CAAE,GAAGK,UAAU;EACjC;EAEA,OAAOP,KAAK;AACd","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export { SafeAreaProvider } from "react-native-css/components/react-native-safe-area-context";
4
+ //# sourceMappingURL=SafeAreaProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SafeAreaProvider"],"sourceRoot":"../../../src","sources":["components/SafeAreaProvider.tsx"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,4DAA4D","ignoreList":[]}
@@ -6,6 +6,127 @@ import { specificityCompareFn } from "react-native-css/utilities";
6
6
  import { getInteractionHandler } from "../react/interaction.js";
7
7
  import { activeFamily, containerLayoutFamily, family, focusFamily, hoverFamily, observable, VAR_SYMBOL } from "../reactivity.js";
8
8
  import { calculateProps } from "./calculate-props.js";
9
+
10
+ /**
11
+ * Checks if the left style object has any properties that are not present in the right style object.
12
+ * This is used to determine if styles need to be preserved in an array or if right can completely override left.
13
+ *
14
+ * Note: This intentionally only checks one direction (left → right). We don't need to check if right has
15
+ * properties that left doesn't have, because right will always be applied/merged. The question we're
16
+ * answering is: "Does left have any properties that would be lost if we just used right?" If yes, we
17
+ * create a style array [left, right] to preserve both. If no, right can safely replace left entirely.
18
+ *
19
+ * @param left - The left style object to check
20
+ * @param right - The right style object to compare against
21
+ * @returns true if left has at least one property key that doesn't exist in right, false otherwise
22
+ *
23
+ * @example
24
+ * hasNonOverlappingProperties({color: 'red', fontSize: 12}, {color: 'blue'}) // true - fontSize is not in right
25
+ * hasNonOverlappingProperties({color: 'red'}, {color: 'blue', fontSize: 12}) // false - all left keys exist in right
26
+ */
27
+ function hasNonOverlappingProperties(left, right) {
28
+ // Null safety check
29
+ if (!left || !right) {
30
+ return false;
31
+ }
32
+
33
+ // Only check own properties to avoid prototype pollution
34
+ for (const key in left) {
35
+ if (Object.prototype.hasOwnProperty.call(left, key)) {
36
+ if (!Object.prototype.hasOwnProperty.call(right, key)) {
37
+ return true;
38
+ }
39
+ }
40
+ }
41
+ return false;
42
+ }
43
+
44
+ /**
45
+ * Flattens a style array into a single object when possible, with rightmost values taking precedence.
46
+ * Returns the original array if it contains any non-plain objects, arrays, or CSS variable objects.
47
+ *
48
+ * Note: This function assumes the input array has already been filtered (e.g., by filterCssVariables),
49
+ * so empty arrays should not reach this function. If they do, they will be treated as non-flattenable.
50
+ *
51
+ * @param styleArray - The style array to potentially flatten
52
+ * @returns A single merged object if all items are plain objects, otherwise the original array
53
+ */
54
+ function flattenStyleArray(styleArray) {
55
+ // Check if we can flatten to a single object (all items are plain objects)
56
+ for (const item of styleArray) {
57
+ // Use explicit null check instead of !item to allow falsy values like 0 or false
58
+ if (item == null || typeof item !== "object" || Array.isArray(item) || Object.prototype.hasOwnProperty.call(item, VAR_SYMBOL)) {
59
+ return styleArray;
60
+ }
61
+ }
62
+
63
+ // Use reduce to avoid spread operator performance issues with large arrays
64
+ return styleArray.reduce((acc, item) => Object.assign(acc, item), {});
65
+ }
66
+
67
+ /**
68
+ * Recursively filters out CSS variable objects (with VAR_SYMBOL) from style values.
69
+ * This prevents CSS variable runtime objects from leaking into React Native component props.
70
+ *
71
+ * @param value - The value to filter (can be any type: object, array, primitive, etc.)
72
+ * @param depth - Internal recursion depth counter to prevent stack overflow (max 100)
73
+ * @returns The filtered value with CSS variables removed, or `undefined` if the entire value
74
+ * should be filtered out (e.g., empty arrays, objects with only VAR_SYMBOL properties)
75
+ *
76
+ * Filtering behavior:
77
+ * - Objects with VAR_SYMBOL property: returns `undefined` (completely filtered)
78
+ * - Arrays: filters out VAR_SYMBOL objects, returns `undefined` if empty after filtering
79
+ * - Objects: recursively filters properties, returns `undefined` if no properties remain
80
+ * - Primitives (null, undefined, numbers, strings, booleans): returned as-is
81
+ * - Symbol properties: intentionally filtered out for React Native compatibility
82
+ *
83
+ * @example
84
+ * filterCssVariables({fontSize: 16, color: {[VAR_SYMBOL]: true}}) // {fontSize: 16}
85
+ * filterCssVariables([{margin: 10}, {[VAR_SYMBOL]: true}]) // [{margin: 10}]
86
+ * filterCssVariables({color: {[VAR_SYMBOL]: true}}) // undefined (all props filtered)
87
+ */
88
+ function filterCssVariables(value, depth = 0) {
89
+ // Prevent stack overflow on deeply nested structures
90
+ if (depth > 100) {
91
+ return value;
92
+ }
93
+ if (value === null || value === undefined) {
94
+ return value;
95
+ }
96
+ if (Array.isArray(value)) {
97
+ // Single-pass filter with map operation
98
+ const filtered = [];
99
+ for (const item of value) {
100
+ const filteredItem = filterCssVariables(item, depth + 1);
101
+ if (filteredItem !== undefined && !(typeof filteredItem === "object" && filteredItem !== null && Object.prototype.hasOwnProperty.call(filteredItem, VAR_SYMBOL))) {
102
+ filtered.push(filteredItem);
103
+ }
104
+ }
105
+ return filtered.length > 0 ? filtered : undefined;
106
+ }
107
+ if (typeof value === "object") {
108
+ // If the object itself has VAR_SYMBOL, filter it out (check own property only)
109
+ if (Object.prototype.hasOwnProperty.call(value, VAR_SYMBOL)) {
110
+ return undefined;
111
+ }
112
+
113
+ // Otherwise, filter VAR_SYMBOL properties from nested objects
114
+ const filtered = {};
115
+ let hasProperties = false;
116
+
117
+ // Use Object.keys to only iterate own string properties (not inherited, not Symbols)
118
+ // This intentionally filters out Symbol properties for React Native compatibility
119
+ for (const key of Object.keys(value)) {
120
+ const filteredValue = filterCssVariables(value[key], depth + 1);
121
+ if (filteredValue !== undefined) {
122
+ filtered[key] = filteredValue;
123
+ hasProperties = true;
124
+ }
125
+ }
126
+ return hasProperties ? filtered : undefined;
127
+ }
128
+ return value;
129
+ }
9
130
  export const stylesFamily = family((hash, rules) => {
10
131
  const sortedRules = Array.from(rules).sort(specificityCompareFn);
11
132
  const obs = observable(read => calculateProps(read, sortedRules));
@@ -71,23 +192,67 @@ function deepMergeConfig(config, left, right, rightIsInline = false) {
71
192
  ...left,
72
193
  ...right
73
194
  };
74
- // More performant approach - check for non-overlapping properties without Sets
75
- if (left?.style && right?.style && rightIsInline) {
76
- const leftStyle = left.style;
77
- const rightStyle = right.style;
78
-
79
- // Quick check: do any left properties NOT exist in right?
80
- let hasNonOverlappingProperties = false;
81
- for (const key in leftStyle) {
82
- if (!(key in rightStyle)) {
83
- hasNonOverlappingProperties = true;
84
- break; // Early exit for performance
195
+
196
+ // Handle null/undefined inline styles
197
+ if (right?.style === null || right?.style === undefined) {
198
+ if (left?.style) {
199
+ result.style = left.style;
200
+ }
201
+ } else if (rightIsInline && right?.style) {
202
+ // Filter inline styles if rightIsInline is true
203
+ const filteredRightStyle = filterCssVariables(right.style);
204
+ if (left?.style) {
205
+ if (!filteredRightStyle) {
206
+ // All inline styles were CSS variables, only use left
207
+ result.style = left.style;
208
+ } else {
209
+ const leftStyle = left.style;
210
+
211
+ // For arrays or objects, check if we need to create a style array
212
+ const leftIsObject = typeof leftStyle === "object" && !Array.isArray(leftStyle);
213
+ const rightIsObject = typeof filteredRightStyle === "object" && !Array.isArray(filteredRightStyle);
214
+ if (leftIsObject && rightIsObject) {
215
+ if (hasNonOverlappingProperties(leftStyle, filteredRightStyle)) {
216
+ result.style = [leftStyle, filteredRightStyle];
217
+ } else {
218
+ // All left properties are in right, right overrides
219
+ result.style = filteredRightStyle;
220
+ }
221
+ } else {
222
+ // One or both are arrays, merge them
223
+ result.style = [leftStyle, filteredRightStyle];
224
+ }
225
+ }
226
+ } else {
227
+ // No left style, just use filtered right
228
+ if (filteredRightStyle) {
229
+ result.style = filteredRightStyle;
230
+ } else {
231
+ // All filtered out, remove style prop
232
+ delete result.style;
85
233
  }
86
234
  }
87
- if (hasNonOverlappingProperties) {
88
- result.style = [leftStyle, rightStyle];
235
+ } else if (!rightIsInline && right?.style) {
236
+ // Merging non-inline styles (e.g., important styles)
237
+ if (left?.style) {
238
+ // If left.style is an array, append right.style
239
+ if (Array.isArray(left.style)) {
240
+ const combined = [...left.style, right.style];
241
+ result.style = flattenStyleArray(combined);
242
+ } else if (typeof left.style === "object" && typeof right.style === "object") {
243
+ // Both are objects, check for overlaps
244
+ if (hasNonOverlappingProperties(left.style, right.style)) {
245
+ result.style = flattenStyleArray([left.style, right.style]);
246
+ } else {
247
+ // All left properties are overridden by right
248
+ result.style = right.style;
249
+ }
250
+ } else {
251
+ // One or both are arrays/mixed types
252
+ const combined = [left.style, right.style];
253
+ result.style = flattenStyleArray(combined);
254
+ }
89
255
  }
90
- // Otherwise, Object.assign above will handle the override correctly
91
256
  }
92
257
  } else {
93
258
  result = Object.assign({}, left, right);
@@ -124,18 +289,8 @@ function deepMergeConfig(config, left, right, rightIsInline = false) {
124
289
  let rightValue = right?.[target];
125
290
 
126
291
  // Strip any inline variables from the target
127
- if (rightIsInline && rightValue) {
128
- if (Array.isArray(rightValue)) {
129
- rightValue = rightValue.filter(v => {
130
- return typeof v !== "object" || !(v && VAR_SYMBOL in v);
131
- });
132
- if (rightValue.length === 0) {
133
- rightValue = undefined;
134
- }
135
- } else if (typeof rightValue === "object" && rightValue && VAR_SYMBOL in rightValue) {
136
- rightValue = undefined;
137
- delete result[target][VAR_SYMBOL];
138
- }
292
+ if (rightIsInline && rightValue !== undefined) {
293
+ rightValue = filterCssVariables(rightValue);
139
294
  }
140
295
  if (rightValue !== undefined) {
141
296
  result[target] = left && target in left ? [left[target], rightValue] : rightValue;
@@ -1 +1 @@
1
- {"version":3,"names":["specificityCompareFn","getInteractionHandler","activeFamily","containerLayoutFamily","family","focusFamily","hoverFamily","observable","VAR_SYMBOL","calculateProps","stylesFamily","hash","rules","sortedRules","Array","from","sort","obs","read","Object","assign","cleanup","effect","observers","delete","size","getStyledProps","state","inline","result","styledProps","stylesObs","get","styleEffect","config","configs","deepMergeConfig","nativeStyleMapping","normal","important","has","ruleEffectGetter","onHoverIn","onHoverOut","onPress","onPressIn","onPressOut","onBlur","onFocus","onLayout","left","right","rightIsInline","target","isArray","length","style","leftStyle","rightStyle","hasNonOverlappingProperties","key","source","i","undefined","slice","rightValue","filter","v","props","tokens","lastToken","pop","token","path","entries","styleValue","split"],"sourceRoot":"../../../../src","sources":["native/styles/index.ts"],"mappings":";;AAAA;;AAEA,SAASA,oBAAoB,QAAQ,4BAA4B;AAEjE,SAASC,qBAAqB,QAAQ,yBAAsB;AAE5D,SACEC,YAAY,EACZC,qBAAqB,EACrBC,MAAM,EACNC,WAAW,EACXC,WAAW,EACXC,UAAU,EACVC,UAAU,QAGL,kBAAe;AACtB,SAASC,cAAc,QAAQ,sBAAmB;AAElD,OAAO,MAAMC,YAAY,GAAGN,MAAM,CAChC,CACEO,IAAY,EACZC,KAA6D,KAC1D;EACH,MAAMC,WAAW,GAAGC,KAAK,CAACC,IAAI,CAACH,KAAK,CAAC,CAACI,IAAI,CAAChB,oBAAoB,CAAC;EAEhE,MAAMiB,GAAG,GAAGV,UAAU,CAAEW,IAAI,IAAKT,cAAc,CAACS,IAAI,EAAEL,WAAW,CAAC,CAAC;;EAEnE;AACJ;AACA;EACI,OAAOM,MAAM,CAACC,MAAM,CAACH,GAAG,EAAE;IACxBI,OAAO,EAAGC,MAAc,IAAK;MAC3BL,GAAG,CAACM,SAAS,CAACC,MAAM,CAACF,MAAM,CAAC;MAC5B,IAAIL,GAAG,CAACM,SAAS,CAACE,IAAI,KAAK,CAAC,EAAE;QAC5Bf,YAAY,CAACc,MAAM,CAACb,IAAI,CA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,EAAE;MAC1BhB,MAAM,CAACmB,KAAK,CAAC,KAAK,CAAC,CAAC;MACpBnB,MAAM,GAAGA,MAAM,CAACmB,KAAK,CAAC;IACxB;IAEAnB,MAAM,CAACiB,SAAS,CAAE,GAAGK,UAAU;EACjC;EAEA,OAAOP,KAAK;AACd","ignoreList":[]}
1
+ {"version":3,"names":["specificityCompareFn","getInteractionHandler","activeFamily","containerLayoutFamily","family","focusFamily","hoverFamily","observable","VAR_SYMBOL","calculateProps","hasNonOverlappingProperties","left","right","key","Object","prototype","hasOwnProperty","call","flattenStyleArray","styleArray","item","Array","isArray","reduce","acc","assign","filterCssVariables","value","depth","undefined","filtered","filteredItem","push","length","hasProperties","keys","filteredValue","stylesFamily","hash","rules","sortedRules","from","sort","obs","read","cleanup","effect","observers","delete","size","getStyledProps","state","inline","result","styledProps","stylesObs","get","styleEffect","config","configs","deepMergeConfig","nativeStyleMapping","normal","important","has","ruleEffectGetter","onHoverIn","onHoverOut","onPress","onPressIn","onPressOut","onBlur","onFocus","onLayout","rightIsInline","target","style","filteredRightStyle","leftStyle","leftIsObject","rightIsObject","combined","source","i","slice","rightValue","props","tokens","lastToken","pop","token","path","entries","styleValue","split"],"sourceRoot":"../../../../src","sources":["native/styles/index.ts"],"mappings":";;AAAA;;AAEA,SAASA,oBAAoB,QAAQ,4BAA4B;AAEjE,SAASC,qBAAqB,QAAQ,yBAAsB;AAE5D,SACEC,YAAY,EACZC,qBAAqB,EACrBC,MAAM,EACNC,WAAW,EACXC,WAAW,EACXC,UAAU,EACVC,UAAU,QAGL,kBAAe;AACtB,SAASC,cAAc,QAAQ,sBAAmB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,2BAA2BA,CAClCC,IAAyB,EACzBC,KAA0B,EACjB;EACT;EACA,IAAI,CAACD,IAAI,IAAI,CAACC,KAAK,EAAE;IACnB,OAAO,KAAK;EACd;;EAEA;EACA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AAI,CAACN,MAAM,EAAE;IACX,OAAOI,KAAK;EACd;EAEA,KAAK,MAAM,CAACzE,GAAG,EAAE8E,IAAI,CAAC,IAAI7E,MAAM,CAAC8E,OAAO,CAAClC,MAAM,CAACG,kBAAkB,CAAC,EAAE;IACnE,MAAMgC,UAAU,GAAGX,MAAM,CAACrE,GAAG,CAAC;IAE9B,OAAOqE,MAAM,CAACrE,GAAG,CAAC;IAElB,IAAIgF,UAAU,KAAKhE,SAAS,EAAE;MAC5B;IACF;IAEA,IAAI8C,MAAM,GAAGW,KAAK;IAClB,MAAMC,MAAM,GAAGI,IAAI,CAACG,KAAK,CAAC,GAAG,CAAC;IAC9B,MAAMN,SAAS,GAAGD,MAAM,CAACE,GAAG,CAAC,CAAC;IAC9B,KAAK,MAAMC,KAAK,IAAIH,MAAM,EAAE;MAC1BZ,MAAM,CAACe,KAAK,CAAC,KAAK,CAAC,CAAC;MACpBf,MAAM,GAAGA,MAAM,CAACe,KAAK,CAAC;IACxB;IAEAf,MAAM,CAACa,SAAS,CAAE,GAAGK,UAAU;EACjC;EAEA,OAAOP,KAAK;AACd","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export { SafeAreaProvider } from "react-native-css/components/react-native-safe-area-context";
2
+ //# sourceMappingURL=SafeAreaProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SafeAreaProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/SafeAreaProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4DAA4D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/native/styles/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAI3E,OAAO,KAAK,EAAE,cAAc,EAAU,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAQL,KAAK,MAAM,EACX,KAAK,oBAAoB,EAC1B,MAAM,eAAe,CAAC;AAGvB,eAAO,MAAM,YAAY;;;;;;;;;sBAaD,MAAM;;;;CAQ7B,CAAC;AAEF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,mCAiF/C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/native/styles/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAI3E,OAAO,KAAK,EAAE,cAAc,EAAU,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAQL,KAAK,MAAM,EACX,KAAK,oBAAoB,EAC1B,MAAM,eAAe,CAAC;AAkJvB,eAAO,MAAM,YAAY;;;;;;;;;sBAaD,MAAM;;;;CAQ7B,CAAC;AAEF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,mCAiF/C"}
@@ -0,0 +1,2 @@
1
+ export { SafeAreaProvider } from "react-native-css/components/react-native-safe-area-context";
2
+ //# sourceMappingURL=SafeAreaProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SafeAreaProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/SafeAreaProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4DAA4D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/native/styles/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAI3E,OAAO,KAAK,EAAE,cAAc,EAAU,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAQL,KAAK,MAAM,EACX,KAAK,oBAAoB,EAC1B,MAAM,eAAe,CAAC;AAGvB,eAAO,MAAM,YAAY;;;;;;;;;sBAaD,MAAM;;;;CAQ7B,CAAC;AAEF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,mCAiF/C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/native/styles/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAI3E,OAAO,KAAK,EAAE,cAAc,EAAU,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAQL,KAAK,MAAM,EACX,KAAK,oBAAoB,EAC1B,MAAM,eAAe,CAAC;AAkJvB,eAAO,MAAM,YAAY;;;;;;;;;sBAaD,MAAM;;;;CAQ7B,CAAC;AAEF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,mCAiF/C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-css",
3
- "version": "0.0.0-nightly.2c68396",
3
+ "version": "0.0.0-nightly.30f9c5d",
4
4
  "description": "A CSS polyfill for React Native",
5
5
  "exports": {
6
6
  ".": {
@@ -47,6 +47,18 @@
47
47
  "types": "./dist/typescript/commonjs/src/components/index.d.ts"
48
48
  }
49
49
  },
50
+ "./components/react-native-safe-area-context": {
51
+ "source": "./src/components/react-native-safe-area-context.native.tsx",
52
+ "react-native": "./src/components/react-native-safe-area-context.native.tsx",
53
+ "import": {
54
+ "types": "./dist/typescript/module/src/components/react-native-safe-area-context.d.ts",
55
+ "default": "./dist/module/components/react-native-safe-area-context.js"
56
+ },
57
+ "require": {
58
+ "types": "./dist/typescript/commonjs/src/components/react-native-safe-area-context.d.ts",
59
+ "default": "./dist/commonjs/components/react-native-safe-area-context.js"
60
+ }
61
+ },
50
62
  "./components/*": {
51
63
  "source": "./src/components/*.tsx",
52
64
  "react-native": "./src/components/*.tsx",
@@ -0,0 +1 @@
1
+ export { SafeAreaProvider } from "react-native-css/components/react-native-safe-area-context";
@@ -17,6 +17,149 @@ import {
17
17
  } from "../reactivity";
18
18
  import { calculateProps } from "./calculate-props";
19
19
 
20
+ /**
21
+ * Checks if the left style object has any properties that are not present in the right style object.
22
+ * This is used to determine if styles need to be preserved in an array or if right can completely override left.
23
+ *
24
+ * Note: This intentionally only checks one direction (left → right). We don't need to check if right has
25
+ * properties that left doesn't have, because right will always be applied/merged. The question we're
26
+ * answering is: "Does left have any properties that would be lost if we just used right?" If yes, we
27
+ * create a style array [left, right] to preserve both. If no, right can safely replace left entirely.
28
+ *
29
+ * @param left - The left style object to check
30
+ * @param right - The right style object to compare against
31
+ * @returns true if left has at least one property key that doesn't exist in right, false otherwise
32
+ *
33
+ * @example
34
+ * hasNonOverlappingProperties({color: 'red', fontSize: 12}, {color: 'blue'}) // true - fontSize is not in right
35
+ * hasNonOverlappingProperties({color: 'red'}, {color: 'blue', fontSize: 12}) // false - all left keys exist in right
36
+ */
37
+ function hasNonOverlappingProperties(
38
+ left: Record<string, any>,
39
+ right: Record<string, any>,
40
+ ): boolean {
41
+ // Null safety check
42
+ if (!left || !right) {
43
+ return false;
44
+ }
45
+
46
+ // Only check own properties to avoid prototype pollution
47
+ for (const key in left) {
48
+ if (Object.prototype.hasOwnProperty.call(left, key)) {
49
+ if (!Object.prototype.hasOwnProperty.call(right, key)) {
50
+ return true;
51
+ }
52
+ }
53
+ }
54
+ return false;
55
+ }
56
+
57
+ /**
58
+ * Flattens a style array into a single object when possible, with rightmost values taking precedence.
59
+ * Returns the original array if it contains any non-plain objects, arrays, or CSS variable objects.
60
+ *
61
+ * Note: This function assumes the input array has already been filtered (e.g., by filterCssVariables),
62
+ * so empty arrays should not reach this function. If they do, they will be treated as non-flattenable.
63
+ *
64
+ * @param styleArray - The style array to potentially flatten
65
+ * @returns A single merged object if all items are plain objects, otherwise the original array
66
+ */
67
+ function flattenStyleArray(styleArray: any[]): any {
68
+ // Check if we can flatten to a single object (all items are plain objects)
69
+ for (const item of styleArray) {
70
+ // Use explicit null check instead of !item to allow falsy values like 0 or false
71
+ if (
72
+ item == null ||
73
+ typeof item !== "object" ||
74
+ Array.isArray(item) ||
75
+ Object.prototype.hasOwnProperty.call(item, VAR_SYMBOL)
76
+ ) {
77
+ return styleArray;
78
+ }
79
+ }
80
+
81
+ // Use reduce to avoid spread operator performance issues with large arrays
82
+ return styleArray.reduce((acc, item) => Object.assign(acc, item), {});
83
+ }
84
+
85
+ /**
86
+ * Recursively filters out CSS variable objects (with VAR_SYMBOL) from style values.
87
+ * This prevents CSS variable runtime objects from leaking into React Native component props.
88
+ *
89
+ * @param value - The value to filter (can be any type: object, array, primitive, etc.)
90
+ * @param depth - Internal recursion depth counter to prevent stack overflow (max 100)
91
+ * @returns The filtered value with CSS variables removed, or `undefined` if the entire value
92
+ * should be filtered out (e.g., empty arrays, objects with only VAR_SYMBOL properties)
93
+ *
94
+ * Filtering behavior:
95
+ * - Objects with VAR_SYMBOL property: returns `undefined` (completely filtered)
96
+ * - Arrays: filters out VAR_SYMBOL objects, returns `undefined` if empty after filtering
97
+ * - Objects: recursively filters properties, returns `undefined` if no properties remain
98
+ * - Primitives (null, undefined, numbers, strings, booleans): returned as-is
99
+ * - Symbol properties: intentionally filtered out for React Native compatibility
100
+ *
101
+ * @example
102
+ * filterCssVariables({fontSize: 16, color: {[VAR_SYMBOL]: true}}) // {fontSize: 16}
103
+ * filterCssVariables([{margin: 10}, {[VAR_SYMBOL]: true}]) // [{margin: 10}]
104
+ * filterCssVariables({color: {[VAR_SYMBOL]: true}}) // undefined (all props filtered)
105
+ */
106
+ function filterCssVariables(value: any, depth = 0): any | undefined {
107
+ // Prevent stack overflow on deeply nested structures
108
+ if (depth > 100) {
109
+ return value;
110
+ }
111
+
112
+ if (value === null || value === undefined) {
113
+ return value;
114
+ }
115
+
116
+ if (Array.isArray(value)) {
117
+ // Single-pass filter with map operation
118
+ const filtered: any[] = [];
119
+
120
+ for (const item of value) {
121
+ const filteredItem = filterCssVariables(item, depth + 1);
122
+ if (
123
+ filteredItem !== undefined &&
124
+ !(
125
+ typeof filteredItem === "object" &&
126
+ filteredItem !== null &&
127
+ Object.prototype.hasOwnProperty.call(filteredItem, VAR_SYMBOL)
128
+ )
129
+ ) {
130
+ filtered.push(filteredItem);
131
+ }
132
+ }
133
+
134
+ return filtered.length > 0 ? filtered : undefined;
135
+ }
136
+
137
+ if (typeof value === "object") {
138
+ // If the object itself has VAR_SYMBOL, filter it out (check own property only)
139
+ if (Object.prototype.hasOwnProperty.call(value, VAR_SYMBOL)) {
140
+ return undefined;
141
+ }
142
+
143
+ // Otherwise, filter VAR_SYMBOL properties from nested objects
144
+ const filtered: Record<string, any> = {};
145
+ let hasProperties = false;
146
+
147
+ // Use Object.keys to only iterate own string properties (not inherited, not Symbols)
148
+ // This intentionally filters out Symbol properties for React Native compatibility
149
+ for (const key of Object.keys(value)) {
150
+ const filteredValue = filterCssVariables(value[key], depth + 1);
151
+ if (filteredValue !== undefined) {
152
+ filtered[key] = filteredValue;
153
+ hasProperties = true;
154
+ }
155
+ }
156
+
157
+ return hasProperties ? filtered : undefined;
158
+ }
159
+
160
+ return value;
161
+ }
162
+
20
163
  export const stylesFamily = family(
21
164
  (
22
165
  hash: string,
@@ -145,24 +288,75 @@ function deepMergeConfig(
145
288
  ) {
146
289
  // Special handling for style target when we have inline styles
147
290
  result = { ...left, ...right };
148
- // More performant approach - check for non-overlapping properties without Sets
149
- if (left?.style && right?.style && rightIsInline) {
150
- const leftStyle = left.style;
151
- const rightStyle = right.style;
152
-
153
- // Quick check: do any left properties NOT exist in right?
154
- let hasNonOverlappingProperties = false;
155
- for (const key in leftStyle) {
156
- if (!(key in rightStyle)) {
157
- hasNonOverlappingProperties = true;
158
- break; // Early exit for performance
291
+
292
+ // Handle null/undefined inline styles
293
+ if (right?.style === null || right?.style === undefined) {
294
+ if (left?.style) {
295
+ result.style = left.style;
296
+ }
297
+ } else if (rightIsInline && right?.style) {
298
+ // Filter inline styles if rightIsInline is true
299
+ const filteredRightStyle = filterCssVariables(right.style);
300
+
301
+ if (left?.style) {
302
+ if (!filteredRightStyle) {
303
+ // All inline styles were CSS variables, only use left
304
+ result.style = left.style;
305
+ } else {
306
+ const leftStyle = left.style;
307
+
308
+ // For arrays or objects, check if we need to create a style array
309
+ const leftIsObject =
310
+ typeof leftStyle === "object" && !Array.isArray(leftStyle);
311
+ const rightIsObject =
312
+ typeof filteredRightStyle === "object" &&
313
+ !Array.isArray(filteredRightStyle);
314
+
315
+ if (leftIsObject && rightIsObject) {
316
+ if (hasNonOverlappingProperties(leftStyle, filteredRightStyle)) {
317
+ result.style = [leftStyle, filteredRightStyle];
318
+ } else {
319
+ // All left properties are in right, right overrides
320
+ result.style = filteredRightStyle;
321
+ }
322
+ } else {
323
+ // One or both are arrays, merge them
324
+ result.style = [leftStyle, filteredRightStyle];
325
+ }
326
+ }
327
+ } else {
328
+ // No left style, just use filtered right
329
+ if (filteredRightStyle) {
330
+ result.style = filteredRightStyle;
331
+ } else {
332
+ // All filtered out, remove style prop
333
+ delete result.style;
159
334
  }
160
335
  }
161
-
162
- if (hasNonOverlappingProperties) {
163
- result.style = [leftStyle, rightStyle];
336
+ } else if (!rightIsInline && right?.style) {
337
+ // Merging non-inline styles (e.g., important styles)
338
+ if (left?.style) {
339
+ // If left.style is an array, append right.style
340
+ if (Array.isArray(left.style)) {
341
+ const combined = [...left.style, right.style];
342
+ result.style = flattenStyleArray(combined);
343
+ } else if (
344
+ typeof left.style === "object" &&
345
+ typeof right.style === "object"
346
+ ) {
347
+ // Both are objects, check for overlaps
348
+ if (hasNonOverlappingProperties(left.style, right.style)) {
349
+ result.style = flattenStyleArray([left.style, right.style]);
350
+ } else {
351
+ // All left properties are overridden by right
352
+ result.style = right.style;
353
+ }
354
+ } else {
355
+ // One or both are arrays/mixed types
356
+ const combined = [left.style, right.style];
357
+ result.style = flattenStyleArray(combined);
358
+ }
164
359
  }
165
- // Otherwise, Object.assign above will handle the override correctly
166
360
  }
167
361
  } else {
168
362
  result = Object.assign({}, left, right);
@@ -211,23 +405,8 @@ function deepMergeConfig(
211
405
  let rightValue = right?.[target];
212
406
 
213
407
  // Strip any inline variables from the target
214
- if (rightIsInline && rightValue) {
215
- if (Array.isArray(rightValue)) {
216
- rightValue = rightValue.filter((v) => {
217
- return typeof v !== "object" || !(v && VAR_SYMBOL in v);
218
- });
219
-
220
- if (rightValue.length === 0) {
221
- rightValue = undefined;
222
- }
223
- } else if (
224
- typeof rightValue === "object" &&
225
- rightValue &&
226
- VAR_SYMBOL in rightValue
227
- ) {
228
- rightValue = undefined;
229
- delete result[target][VAR_SYMBOL];
230
- }
408
+ if (rightIsInline && rightValue !== undefined) {
409
+ rightValue = filterCssVariables(rightValue);
231
410
  }
232
411
 
233
412
  if (rightValue !== undefined) {