@tamagui/native-registry 3.0.0-beta.1133.1 → 3.0.0-beta.1141.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,21 +46,52 @@ var COLOR_PROPS = /* @__PURE__ */ new Set([
46
46
  function processStyleColors(props) {
47
47
  var out = null;
48
48
  for (var key in props) {
49
- if (!COLOR_PROPS.has(key)) continue;
50
49
  var value = props[key];
51
- var processed = typeof value === "string" || typeof value === "object" && value !== null ? (0, import_react_native.processColor)(value) : value;
52
- if (typeof processed === "number") {
50
+ if ((key === "boxShadow" || key === "experimental_backgroundImage" || key === "colorStops") && Array.isArray(value)) {
51
+ var changed = false;
52
+ var next = [];
53
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
54
+ try {
55
+ for (var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
56
+ var entry = _step.value;
57
+ var processed = processStyleColors(entry);
58
+ if (processed !== entry) changed = true;
59
+ next.push(processed);
60
+ }
61
+ } catch (err) {
62
+ _didIteratorError = true;
63
+ _iteratorError = err;
64
+ } finally {
65
+ try {
66
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
67
+ _iterator.return();
68
+ }
69
+ } finally {
70
+ if (_didIteratorError) {
71
+ throw _iteratorError;
72
+ }
73
+ }
74
+ }
75
+ if (changed) {
76
+ out !== null && out !== void 0 ? out : out = { ...props };
77
+ out[key] = next;
78
+ }
79
+ continue;
80
+ }
81
+ if (!COLOR_PROPS.has(key)) continue;
82
+ var processed1 = typeof value === "string" || typeof value === "object" && value !== null ? (0, import_react_native.processColor)(value) : value;
83
+ if (typeof processed1 === "number") {
53
84
  out !== null && out !== void 0 ? out : out = { ...props };
54
85
  out[key] = {
55
86
  space: "srgb",
56
- r: (processed >>> 16 & 255) / 255,
57
- g: (processed >>> 8 & 255) / 255,
58
- b: (processed & 255) / 255,
59
- a: (processed >>> 24 & 255) / 255
87
+ r: (processed1 >>> 16 & 255) / 255,
88
+ g: (processed1 >>> 8 & 255) / 255,
89
+ b: (processed1 & 255) / 255,
90
+ a: (processed1 >>> 24 & 255) / 255
60
91
  };
61
- } else if (processed != null && typeof processed === "object") {
92
+ } else if (processed1 != null && typeof processed1 === "object") {
62
93
  out !== null && out !== void 0 ? out : out = { ...props };
63
- out[key] = processed;
94
+ out[key] = processed1;
64
95
  }
65
96
  }
66
97
  return out !== null && out !== void 0 ? out : props;
@@ -46,21 +46,52 @@ var COLOR_PROPS = /* @__PURE__ */ new Set([
46
46
  function processStyleColors(props) {
47
47
  var out = null;
48
48
  for (var key in props) {
49
- if (!COLOR_PROPS.has(key)) continue;
50
49
  var value = props[key];
51
- var processed = typeof value === "string" || typeof value === "object" && value !== null ? (0, import_react_native.processColor)(value) : value;
52
- if (typeof processed === "number") {
50
+ if ((key === "boxShadow" || key === "experimental_backgroundImage" || key === "colorStops") && Array.isArray(value)) {
51
+ var changed = false;
52
+ var next = [];
53
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
54
+ try {
55
+ for (var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
56
+ var entry = _step.value;
57
+ var processed = processStyleColors(entry);
58
+ if (processed !== entry) changed = true;
59
+ next.push(processed);
60
+ }
61
+ } catch (err) {
62
+ _didIteratorError = true;
63
+ _iteratorError = err;
64
+ } finally {
65
+ try {
66
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
67
+ _iterator.return();
68
+ }
69
+ } finally {
70
+ if (_didIteratorError) {
71
+ throw _iteratorError;
72
+ }
73
+ }
74
+ }
75
+ if (changed) {
76
+ out !== null && out !== void 0 ? out : out = { ...props };
77
+ out[key] = next;
78
+ }
79
+ continue;
80
+ }
81
+ if (!COLOR_PROPS.has(key)) continue;
82
+ var processed1 = typeof value === "string" || typeof value === "object" && value !== null ? (0, import_react_native.processColor)(value) : value;
83
+ if (typeof processed1 === "number") {
53
84
  out !== null && out !== void 0 ? out : out = { ...props };
54
85
  out[key] = {
55
86
  space: "srgb",
56
- r: (processed >>> 16 & 255) / 255,
57
- g: (processed >>> 8 & 255) / 255,
58
- b: (processed & 255) / 255,
59
- a: (processed >>> 24 & 255) / 255
87
+ r: (processed1 >>> 16 & 255) / 255,
88
+ g: (processed1 >>> 8 & 255) / 255,
89
+ b: (processed1 & 255) / 255,
90
+ a: (processed1 >>> 24 & 255) / 255
60
91
  };
61
- } else if (processed != null && typeof processed === "object") {
92
+ } else if (processed1 != null && typeof processed1 === "object") {
62
93
  out !== null && out !== void 0 ? out : out = { ...props };
63
- out[key] = processed;
94
+ out[key] = processed1;
64
95
  }
65
96
  }
66
97
  return out !== null && out !== void 0 ? out : props;
@@ -1 +1 @@
1
- {"version":3,"file":"processStyleColors.native.js","names":[],"sources":["cjs/processStyleColors.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar processStyleColors_native_exports = {};\n__export(processStyleColors_native_exports, {\n processStyleColors: () => processStyleColors\n});\nmodule.exports = __toCommonJS(processStyleColors_native_exports);\nvar import_react_native = require(\"react-native\");\nvar COLOR_PROPS = /* @__PURE__ */ new Set([\n \"color\",\n \"backgroundColor\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n \"borderRightColor\",\n \"borderStartColor\",\n \"borderEndColor\",\n \"borderBlockColor\",\n \"borderBlockStartColor\",\n \"borderBlockEndColor\",\n \"shadowColor\",\n \"textShadowColor\",\n \"textDecorationColor\",\n \"tintColor\",\n \"overlayColor\"\n]);\nfunction processStyleColors(props) {\n var out = null;\n for (var key in props) {\n if (!COLOR_PROPS.has(key)) continue;\n var value = props[key];\n var processed = typeof value === \"string\" || typeof value === \"object\" && value !== null ? (0, import_react_native.processColor)(value) : value;\n if (typeof processed === \"number\") {\n out !== null && out !== void 0 ? out : out = {\n ...props\n };\n out[key] = {\n space: \"srgb\",\n r: (processed >>> 16 & 255) / 255,\n g: (processed >>> 8 & 255) / 255,\n b: (processed & 255) / 255,\n a: (processed >>> 24 & 255) / 255\n };\n } else if (processed != null && typeof processed === \"object\") {\n out !== null && out !== void 0 ? out : out = {\n ...props\n };\n out[key] = processed;\n }\n }\n return out !== null && out !== void 0 ? out : props;\n}\n//# sourceMappingURL=processStyleColors.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,oCAAoC,CAAC;AACzC,SAAS,mCAAmC,EAC1C,0BAA0B,mBAC5B,CAAC;AACD,OAAO,UAAU,aAAa,iCAAiC;AAC/D,IAAI,sBAAsB,QAAQ,cAAc;AAChD,IAAI,8BAA8B,IAAI,IAAI;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AACD,SAAS,mBAAmB,OAAO;CACjC,IAAI,MAAM;CACV,KAAK,IAAI,OAAO,OAAO;EACrB,IAAI,CAAC,YAAY,IAAI,GAAG,GAAG;EAC3B,IAAI,QAAQ,MAAM;EAClB,IAAI,YAAY,OAAO,UAAU,YAAY,OAAO,UAAU,YAAY,UAAU,QAAQ,GAAG,oBAAoB,aAAY,CAAE,KAAK,IAAI;EAC1I,IAAI,OAAO,cAAc,UAAU;GACjC,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM,MAAM,EAC3C,GAAG,MACL;GACA,IAAI,OAAO;IACT,OAAO;IACP,IAAI,cAAc,KAAK,OAAO;IAC9B,IAAI,cAAc,IAAI,OAAO;IAC7B,IAAI,YAAY,OAAO;IACvB,IAAI,cAAc,KAAK,OAAO;GAChC;EACF,OAAO,IAAI,aAAa,QAAQ,OAAO,cAAc,UAAU;GAC7D,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM,MAAM,EAC3C,GAAG,MACL;GACA,IAAI,OAAO;EACb;CACF;CACA,OAAO,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM;AAChD"}
1
+ {"version":3,"file":"processStyleColors.native.js","names":[],"sources":["cjs/processStyleColors.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar processStyleColors_native_exports = {};\n__export(processStyleColors_native_exports, {\n processStyleColors: () => processStyleColors\n});\nmodule.exports = __toCommonJS(processStyleColors_native_exports);\nvar import_react_native = require(\"react-native\");\nvar COLOR_PROPS = /* @__PURE__ */ new Set([\n \"color\",\n \"backgroundColor\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n \"borderRightColor\",\n \"borderStartColor\",\n \"borderEndColor\",\n \"borderBlockColor\",\n \"borderBlockStartColor\",\n \"borderBlockEndColor\",\n \"shadowColor\",\n \"textShadowColor\",\n \"textDecorationColor\",\n \"tintColor\",\n \"overlayColor\"\n]);\nfunction processStyleColors(props) {\n var out = null;\n for (var key in props) {\n var value = props[key];\n if ((key === \"boxShadow\" || key === \"experimental_backgroundImage\" || key === \"colorStops\") && Array.isArray(value)) {\n var changed = false;\n var next = [];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var entry = _step.value;\n var processed = processStyleColors(entry);\n if (processed !== entry) changed = true;\n next.push(processed);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (changed) {\n out !== null && out !== void 0 ? out : out = {\n ...props\n };\n out[key] = next;\n }\n continue;\n }\n if (!COLOR_PROPS.has(key)) continue;\n var processed1 = typeof value === \"string\" || typeof value === \"object\" && value !== null ? (0, import_react_native.processColor)(value) : value;\n if (typeof processed1 === \"number\") {\n out !== null && out !== void 0 ? out : out = {\n ...props\n };\n out[key] = {\n space: \"srgb\",\n r: (processed1 >>> 16 & 255) / 255,\n g: (processed1 >>> 8 & 255) / 255,\n b: (processed1 & 255) / 255,\n a: (processed1 >>> 24 & 255) / 255\n };\n } else if (processed1 != null && typeof processed1 === \"object\") {\n out !== null && out !== void 0 ? out : out = {\n ...props\n };\n out[key] = processed1;\n }\n }\n return out !== null && out !== void 0 ? out : props;\n}\n//# sourceMappingURL=processStyleColors.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,oCAAoC,CAAC;AACzC,SAAS,mCAA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AO,eAAe,UAAU;GAClC,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM,MAAM,EAC3C,GAAG,MACL;GACA,IAAI,OAAO;IACT,OAAO;IACP,IAAI,eAAe,KAAK,OAAO;IAC/B,IAAI,eAAe,IAAI,OAAO;IAC9B,IAAI,aAAa,OAAO;IACxB,IAAI,eAAe,KAAK,OAAO;GACjC;EACF,OAAO,IAAI,cAAc,QAAQ,OAAO,eAAe,UAAU;GAC/D,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM,MAAM,EAC3C,GAAG,MACL;GACA,IAAI,OAAO;EACb;CACF;CACA,OAAO,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM;AAChD"}
@@ -22,21 +22,52 @@ var COLOR_PROPS = /* @__PURE__ */ new Set([
22
22
  function processStyleColors(props) {
23
23
  var out = null;
24
24
  for (var key in props) {
25
- if (!COLOR_PROPS.has(key)) continue;
26
25
  var value = props[key];
27
- var processed = typeof value === "string" || typeof value === "object" && value !== null ? processColor(value) : value;
28
- if (typeof processed === "number") {
26
+ if ((key === "boxShadow" || key === "experimental_backgroundImage" || key === "colorStops") && Array.isArray(value)) {
27
+ var changed = false;
28
+ var next = [];
29
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
30
+ try {
31
+ for (var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
32
+ var entry = _step.value;
33
+ var processed = processStyleColors(entry);
34
+ if (processed !== entry) changed = true;
35
+ next.push(processed);
36
+ }
37
+ } catch (err) {
38
+ _didIteratorError = true;
39
+ _iteratorError = err;
40
+ } finally {
41
+ try {
42
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
43
+ _iterator.return();
44
+ }
45
+ } finally {
46
+ if (_didIteratorError) {
47
+ throw _iteratorError;
48
+ }
49
+ }
50
+ }
51
+ if (changed) {
52
+ out !== null && out !== void 0 ? out : out = { ...props };
53
+ out[key] = next;
54
+ }
55
+ continue;
56
+ }
57
+ if (!COLOR_PROPS.has(key)) continue;
58
+ var processed1 = typeof value === "string" || typeof value === "object" && value !== null ? processColor(value) : value;
59
+ if (typeof processed1 === "number") {
29
60
  out !== null && out !== void 0 ? out : out = { ...props };
30
61
  out[key] = {
31
62
  space: "srgb",
32
- r: (processed >>> 16 & 255) / 255,
33
- g: (processed >>> 8 & 255) / 255,
34
- b: (processed & 255) / 255,
35
- a: (processed >>> 24 & 255) / 255
63
+ r: (processed1 >>> 16 & 255) / 255,
64
+ g: (processed1 >>> 8 & 255) / 255,
65
+ b: (processed1 & 255) / 255,
66
+ a: (processed1 >>> 24 & 255) / 255
36
67
  };
37
- } else if (processed != null && typeof processed === "object") {
68
+ } else if (processed1 != null && typeof processed1 === "object") {
38
69
  out !== null && out !== void 0 ? out : out = { ...props };
39
- out[key] = processed;
70
+ out[key] = processed1;
40
71
  }
41
72
  }
42
73
  return out !== null && out !== void 0 ? out : props;
@@ -1 +1 @@
1
- {"version":3,"file":"processStyleColors.native.js","names":[],"sources":["esm/processStyleColors.native.js"],"sourcesContent":["import { processColor } from \"react-native\";\nvar COLOR_PROPS = /* @__PURE__ */ new Set([\n \"color\",\n \"backgroundColor\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n \"borderRightColor\",\n \"borderStartColor\",\n \"borderEndColor\",\n \"borderBlockColor\",\n \"borderBlockStartColor\",\n \"borderBlockEndColor\",\n \"shadowColor\",\n \"textShadowColor\",\n \"textDecorationColor\",\n \"tintColor\",\n \"overlayColor\"\n]);\nfunction processStyleColors(props) {\n var out = null;\n for (var key in props) {\n if (!COLOR_PROPS.has(key)) continue;\n var value = props[key];\n var processed = typeof value === \"string\" || typeof value === \"object\" && value !== null ? processColor(value) : value;\n if (typeof processed === \"number\") {\n out !== null && out !== void 0 ? out : out = {\n ...props\n };\n out[key] = {\n space: \"srgb\",\n r: (processed >>> 16 & 255) / 255,\n g: (processed >>> 8 & 255) / 255,\n b: (processed & 255) / 255,\n a: (processed >>> 24 & 255) / 255\n };\n } else if (processed != null && typeof processed === \"object\") {\n out !== null && out !== void 0 ? out : out = {\n ...props\n };\n out[key] = processed;\n }\n }\n return out !== null && out !== void 0 ? out : props;\n}\nexport {\n processStyleColors\n};\n//# sourceMappingURL=processStyleColors.native.js.map\n"],"mappings":";;;AACA,IAAI,8BAA8B,IAAI,IAAI;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AACD,SAAS,mBAAmB,OAAO;CACjC,IAAI,MAAM;CACV,KAAK,IAAI,OAAO,OAAO;EACrB,IAAI,CAAC,YAAY,IAAI,GAAG,GAAG;EAC3B,IAAI,QAAQ,MAAM;EAClB,IAAI,YAAY,OAAO,UAAU,YAAY,OAAO,UAAU,YAAY,UAAU,OAAO,aAAa,KAAK,IAAI;EACjH,IAAI,OAAO,cAAc,UAAU;GACjC,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM,MAAM,EAC3C,GAAG,MACL;GACA,IAAI,OAAO;IACT,OAAO;IACP,IAAI,cAAc,KAAK,OAAO;IAC9B,IAAI,cAAc,IAAI,OAAO;IAC7B,IAAI,YAAY,OAAO;IACvB,IAAI,cAAc,KAAK,OAAO;GAChC;EACF,OAAO,IAAI,aAAa,QAAQ,OAAO,cAAc,UAAU;GAC7D,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM,MAAM,EAC3C,GAAG,MACL;GACA,IAAI,OAAO;EACb;CACF;CACA,OAAO,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM;AAChD"}
1
+ {"version":3,"file":"processStyleColors.native.js","names":[],"sources":["esm/processStyleColors.native.js"],"sourcesContent":["import { processColor } from \"react-native\";\nvar COLOR_PROPS = /* @__PURE__ */ new Set([\n \"color\",\n \"backgroundColor\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n \"borderRightColor\",\n \"borderStartColor\",\n \"borderEndColor\",\n \"borderBlockColor\",\n \"borderBlockStartColor\",\n \"borderBlockEndColor\",\n \"shadowColor\",\n \"textShadowColor\",\n \"textDecorationColor\",\n \"tintColor\",\n \"overlayColor\"\n]);\nfunction processStyleColors(props) {\n var out = null;\n for (var key in props) {\n var value = props[key];\n if ((key === \"boxShadow\" || key === \"experimental_backgroundImage\" || key === \"colorStops\") && Array.isArray(value)) {\n var changed = false;\n var next = [];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var entry = _step.value;\n var processed = processStyleColors(entry);\n if (processed !== entry) changed = true;\n next.push(processed);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (changed) {\n out !== null && out !== void 0 ? out : out = {\n ...props\n };\n out[key] = next;\n }\n continue;\n }\n if (!COLOR_PROPS.has(key)) continue;\n var processed1 = typeof value === \"string\" || typeof value === \"object\" && value !== null ? processColor(value) : value;\n if (typeof processed1 === \"number\") {\n out !== null && out !== void 0 ? out : out = {\n ...props\n };\n out[key] = {\n space: \"srgb\",\n r: (processed1 >>> 16 & 255) / 255,\n g: (processed1 >>> 8 & 255) / 255,\n b: (processed1 & 255) / 255,\n a: (processed1 >>> 24 & 255) / 255\n };\n } else if (processed1 != null && typeof processed1 === \"object\") {\n out !== null && out !== void 0 ? out : out = {\n ...props\n };\n out[key] = processed1;\n }\n }\n return out !== null && out !== void 0 ? out : props;\n}\nexport {\n processStyleColors\n};\n//# sourceMappingURL=processStyleColors.native.js.map\n"],"mappings":";;;AACA,IAAI,8BAA8B,IAAI,IAAI;CACxC;CACA;CACA;CACA;CACA;CACA;CAC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AAa,OAAO;IACxB,IAAI,eAAe,KAAK,OAAO;GACjC;EACF,OAAO,IAAI,cAAc,QAAQ,OAAO,eAAe,UAAU;GAC/D,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM,MAAM,EAC3C,GAAG,MACL;GACA,IAAI,OAAO;EACb;CACF;CACA,OAAO,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM;AAChD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/native-registry",
3
- "version": "3.0.0-beta.1133.1",
3
+ "version": "3.0.0-beta.1141.1",
4
4
  "description": "Generic native style registry: zero-re-render style updates via Fabric ShadowTree commits",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -46,7 +46,7 @@
46
46
  }
47
47
  },
48
48
  "devDependencies": {
49
- "@tamagui/build": "3.0.0-beta.1133.1",
49
+ "@tamagui/build": "3.0.0-beta.1141.1",
50
50
  "react": "19.2.3",
51
51
  "react-native": "0.86.2",
52
52
  "react-native-nitro-modules": "^0.36.5",
@@ -46,8 +46,27 @@ export function processStyleColors(
46
46
  ): Record<string, unknown> {
47
47
  let out: Record<string, unknown> | null = null
48
48
  for (const key in props) {
49
- if (!COLOR_PROPS.has(key)) continue
50
49
  const value = props[key]
50
+ if (
51
+ (key === 'boxShadow' ||
52
+ key === 'experimental_backgroundImage' ||
53
+ key === 'colorStops') &&
54
+ Array.isArray(value)
55
+ ) {
56
+ let changed = false
57
+ const next = []
58
+ for (const entry of value) {
59
+ const processed = processStyleColors(entry)
60
+ if (processed !== entry) changed = true
61
+ next.push(processed)
62
+ }
63
+ if (changed) {
64
+ out ??= { ...props }
65
+ out[key] = next
66
+ }
67
+ continue
68
+ }
69
+ if (!COLOR_PROPS.has(key)) continue
51
70
  // a style may already carry the packed int form RN accepts (`processColor`
52
71
  // output written straight into a style), and that form is misread the same
53
72
  // way, so it converts here too rather than only css strings
@@ -6,6 +6,6 @@
6
6
  ],
7
7
  "version": 3,
8
8
  "sourcesContent": [
9
- "/**\n * Fabric's C++ prop parser cannot take colors as CSS strings, so every color\n * prop must be converted before props reach the engine. The compiler mappings\n * and runtime-mode pushes both use this exact runtime processor before props\n * cross into the engine.\n *\n * Colors go over as `{ space: 'srgb', r, g, b, a }` with each channel a float\n * in 0..1. That shape is the only one both prop parsers a themed view can reach\n * will accept:\n *\n * - C++ `fromRawValueShared` reads it through its `space` branch. The packed\n * ARGB int `processColor` returns is misread here: an opaque grey\n * `0xFFE3E3E3` rendered as `rgb(254, 229, 229)`, taking `0xFF` as red and\n * the real red as alpha, so every themed surface came out tinted pink.\n * - Android additionally mounts some of these props through Java\n * `SurfaceMountingManager.updateProps` -> `ColorPropConverter`, which takes\n * a number or a map and throws `ColorValue: the value must be a number or\n * Object` on anything else. A plain `[r, g, b, a]` array satisfies the C++\n * parser but not this one, and the throw kills the mount-item dispatch and\n * tears the whole React surface down.\n */\nimport { processColor, type ColorValue } from 'react-native'\n\nconst COLOR_PROPS = new Set([\n 'color',\n 'backgroundColor',\n 'borderColor',\n 'borderTopColor',\n 'borderBottomColor',\n 'borderLeftColor',\n 'borderRightColor',\n 'borderStartColor',\n 'borderEndColor',\n 'borderBlockColor',\n 'borderBlockStartColor',\n 'borderBlockEndColor',\n 'shadowColor',\n 'textShadowColor',\n 'textDecorationColor',\n 'tintColor',\n 'overlayColor',\n])\n\nexport function processStyleColors(\n props: Record<string, unknown>\n): Record<string, unknown> {\n let out: Record<string, unknown> | null = null\n for (const key in props) {\n if (!COLOR_PROPS.has(key)) continue\n const value = props[key]\n // a style may already carry the packed int form RN accepts (`processColor`\n // output written straight into a style), and that form is misread the same\n // way, so it converts here too rather than only css strings\n const processed =\n typeof value === 'string' || (typeof value === 'object' && value !== null)\n ? processColor(value as ColorValue)\n : value\n if (typeof processed === 'number') {\n out ??= { ...props }\n // processColor packs ARGB, and is signed on Android, hence >>>\n out[key] = {\n space: 'srgb',\n r: ((processed >>> 16) & 0xff) / 255,\n g: ((processed >>> 8) & 0xff) / 255,\n b: (processed & 0xff) / 255,\n a: ((processed >>> 24) & 0xff) / 255,\n }\n } else if (processed != null && typeof processed === 'object') {\n // platform and dynamic colors resolve to opaque objects. processColor\n // normalizes their color branches before Fabric unpacks the shape.\n out ??= { ...props }\n out[key] = processed\n }\n }\n return out ?? props\n}\n"
9
+ "/**\n * Fabric's C++ prop parser cannot take colors as CSS strings, so every color\n * prop must be converted before props reach the engine. The compiler mappings\n * and runtime-mode pushes both use this exact runtime processor before props\n * cross into the engine.\n *\n * Colors go over as `{ space: 'srgb', r, g, b, a }` with each channel a float\n * in 0..1. That shape is the only one both prop parsers a themed view can reach\n * will accept:\n *\n * - C++ `fromRawValueShared` reads it through its `space` branch. The packed\n * ARGB int `processColor` returns is misread here: an opaque grey\n * `0xFFE3E3E3` rendered as `rgb(254, 229, 229)`, taking `0xFF` as red and\n * the real red as alpha, so every themed surface came out tinted pink.\n * - Android additionally mounts some of these props through Java\n * `SurfaceMountingManager.updateProps` -> `ColorPropConverter`, which takes\n * a number or a map and throws `ColorValue: the value must be a number or\n * Object` on anything else. A plain `[r, g, b, a]` array satisfies the C++\n * parser but not this one, and the throw kills the mount-item dispatch and\n * tears the whole React surface down.\n */\nimport { processColor, type ColorValue } from 'react-native'\n\nconst COLOR_PROPS = new Set([\n 'color',\n 'backgroundColor',\n 'borderColor',\n 'borderTopColor',\n 'borderBottomColor',\n 'borderLeftColor',\n 'borderRightColor',\n 'borderStartColor',\n 'borderEndColor',\n 'borderBlockColor',\n 'borderBlockStartColor',\n 'borderBlockEndColor',\n 'shadowColor',\n 'textShadowColor',\n 'textDecorationColor',\n 'tintColor',\n 'overlayColor',\n])\n\nexport function processStyleColors(\n props: Record<string, unknown>\n): Record<string, unknown> {\n let out: Record<string, unknown> | null = null\n for (const key in props) {\n const value = props[key]\n if (\n (key === 'boxShadow' ||\n key === 'experimental_backgroundImage' ||\n key === 'colorStops') &&\n Array.isArray(value)\n ) {\n let changed = false\n const next = []\n for (const entry of value) {\n const processed = processStyleColors(entry)\n if (processed !== entry) changed = true\n next.push(processed)\n }\n if (changed) {\n out ??= { ...props }\n out[key] = next\n }\n continue\n }\n if (!COLOR_PROPS.has(key)) continue\n // a style may already carry the packed int form RN accepts (`processColor`\n // output written straight into a style), and that form is misread the same\n // way, so it converts here too rather than only css strings\n const processed =\n typeof value === 'string' || (typeof value === 'object' && value !== null)\n ? processColor(value as ColorValue)\n : value\n if (typeof processed === 'number') {\n out ??= { ...props }\n // processColor packs ARGB, and is signed on Android, hence >>>\n out[key] = {\n space: 'srgb',\n r: ((processed >>> 16) & 0xff) / 255,\n g: ((processed >>> 8) & 0xff) / 255,\n b: (processed & 0xff) / 255,\n a: ((processed >>> 24) & 0xff) / 255,\n }\n } else if (processed != null && typeof processed === 'object') {\n // platform and dynamic colors resolve to opaque objects. processColor\n // normalizes their color branches before Fabric unpacks the shape.\n out ??= { ...props }\n out[key] = processed\n }\n }\n return out ?? props\n}\n"
10
10
  ]
11
11
  }