@tamagui/native-registry 3.0.0-beta.719.1 → 3.0.0-beta.735.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,7 +46,7 @@ function processStyleColors(props) {
46
46
  for (const key in props) {
47
47
  if (!COLOR_PROPS.has(key)) continue;
48
48
  const value = props[key];
49
- const processed = typeof value === "string" ? (0, import_react_native.processColor)(value) : value;
49
+ const processed = typeof value === "string" || typeof value === "object" && value !== null ? (0, import_react_native.processColor)(value) : value;
50
50
  if (typeof processed === "number") {
51
51
  out ??= { ...props };
52
52
  out[key] = {
@@ -56,7 +56,7 @@ function processStyleColors(props) {
56
56
  b: (processed & 255) / 255,
57
57
  a: (processed >>> 24 & 255) / 255
58
58
  };
59
- } else if (typeof value === "string" && processed != null) {
59
+ } else if (processed != null && typeof processed === "object") {
60
60
  out ??= { ...props };
61
61
  out[key] = processed;
62
62
  }
@@ -24,6 +24,10 @@ var processStyleColors_exports = {};
24
24
  __export(processStyleColors_exports, { processStyleColors: () => processStyleColors });
25
25
  module.exports = __toCommonJS(processStyleColors_exports);
26
26
  var import_react_native = require("react-native");
27
+ function _type_of(obj) {
28
+ "@swc/helpers - typeof";
29
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
30
+ }
27
31
  var COLOR_PROPS = /* @__PURE__ */ new Set([
28
32
  "color",
29
33
  "backgroundColor",
@@ -48,7 +52,7 @@ function processStyleColors(props) {
48
52
  for (var key in props) {
49
53
  if (!COLOR_PROPS.has(key)) continue;
50
54
  var value = props[key];
51
- var processed = typeof value === "string" ? (0, import_react_native.processColor)(value) : value;
55
+ var processed = typeof value === "string" || (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && value !== null ? (0, import_react_native.processColor)(value) : value;
52
56
  if (typeof processed === "number") {
53
57
  out !== null && out !== void 0 ? out : out = { ...props };
54
58
  out[key] = {
@@ -58,7 +62,7 @@ function processStyleColors(props) {
58
62
  b: (processed & 255) / 255,
59
63
  a: (processed >>> 24 & 255) / 255
60
64
  };
61
- } else if (typeof value === "string" && processed != null) {
65
+ } else if (processed != null && (typeof processed === "undefined" ? "undefined" : _type_of(processed)) === "object") {
62
66
  out !== null && out !== void 0 ? out : out = { ...props };
63
67
  out[key] = processed;
64
68
  }
@@ -24,6 +24,10 @@ var processStyleColors_exports = {};
24
24
  __export(processStyleColors_exports, { processStyleColors: () => processStyleColors });
25
25
  module.exports = __toCommonJS(processStyleColors_exports);
26
26
  var import_react_native = require("react-native");
27
+ function _type_of(obj) {
28
+ "@swc/helpers - typeof";
29
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
30
+ }
27
31
  var COLOR_PROPS = /* @__PURE__ */ new Set([
28
32
  "color",
29
33
  "backgroundColor",
@@ -48,7 +52,7 @@ function processStyleColors(props) {
48
52
  for (var key in props) {
49
53
  if (!COLOR_PROPS.has(key)) continue;
50
54
  var value = props[key];
51
- var processed = typeof value === "string" ? (0, import_react_native.processColor)(value) : value;
55
+ var processed = typeof value === "string" || (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && value !== null ? (0, import_react_native.processColor)(value) : value;
52
56
  if (typeof processed === "number") {
53
57
  out !== null && out !== void 0 ? out : out = { ...props };
54
58
  out[key] = {
@@ -58,7 +62,7 @@ function processStyleColors(props) {
58
62
  b: (processed & 255) / 255,
59
63
  a: (processed >>> 24 & 255) / 255
60
64
  };
61
- } else if (typeof value === "string" && processed != null) {
65
+ } else if (processed != null && (typeof processed === "undefined" ? "undefined" : _type_of(processed)) === "object") {
62
66
  out !== null && out !== void 0 ? out : out = { ...props };
63
67
  out[key] = processed;
64
68
  }
@@ -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_exports = {};\n__export(processStyleColors_exports, {\n processStyleColors: () => processStyleColors\n});\nmodule.exports = __toCommonJS(processStyleColors_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\" ? (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 (typeof value === \"string\" && processed != null) {\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.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;A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;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,OAAO,UAAU,YAAY,aAAa,MAAM;GACzD,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_exports = {};\n__export(processStyleColors_exports, {\n processStyleColors: () => processStyleColors\n});\nmodule.exports = __toCommonJS(processStyleColors_exports);\nvar import_react_native = require(\"react-native\");\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\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 === \"undefined\" ? \"undefined\" : _type_of(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 === \"undefined\" ? \"undefined\" : _type_of(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.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,IAA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function processStyleColors(props) {
24
24
  for (const key in props) {
25
25
  if (!COLOR_PROPS.has(key)) continue;
26
26
  const value = props[key];
27
- const processed = typeof value === "string" ? processColor(value) : value;
27
+ const processed = typeof value === "string" || typeof value === "object" && value !== null ? processColor(value) : value;
28
28
  if (typeof processed === "number") {
29
29
  out ??= { ...props };
30
30
  out[key] = {
@@ -34,7 +34,7 @@ function processStyleColors(props) {
34
34
  b: (processed & 255) / 255,
35
35
  a: (processed >>> 24 & 255) / 255
36
36
  };
37
- } else if (typeof value === "string" && processed != null) {
37
+ } else if (processed != null && typeof processed === "object") {
38
38
  out ??= { ...props };
39
39
  out[key] = processed;
40
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"processStyleColors.js","names":[],"sources":["esm/processStyleColors.js"],"sourcesContent":["import { processColor } from \"react-native-web\";\nconst 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 let out = null;\n for (const key in props) {\n if (!COLOR_PROPS.has(key)) continue;\n const value = props[key];\n const processed = typeof value === \"string\" ? processColor(value) : value;\n if (typeof processed === \"number\") {\n out ??= { ...props };\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 (typeof value === \"string\" && processed != null) {\n out ??= { ...props };\n out[key] = processed;\n }\n }\n return out ?? props;\n}\nexport {\n processStyleColors\n};\n//# sourceMappingURL=processStyleColors.js.map\n"],"mappings":";;;AACA,MAAM,8BAA8B,IAAI,IAAI;CAC1C;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,MAAM,OAAO,OAAO;EACvB,IAAI,CAAC,YAAY,IAAI,GAAG,GAAG;EAC3B,MAAM,QAAQ,MAAM;EACpB,MAAM,YAAY,OAAO,UAAU,WAAW,aAAa,KAAK,IAAI;EACpE,IAAI,OAAO,cAAc,UAAU;GACjC,QAAQ,EAAE,GAAG,MAAM;GACnB,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,OAAO,UAAU,YAAY,aAAa,MAAM;GACzD,QAAQ,EAAE,GAAG,MAAM;GACnB,IAAI,OAAO;EACb;CACF;CACA,OAAO,OAAO;AAChB"}
1
+ {"version":3,"file":"processStyleColors.js","names":[],"sources":["esm/processStyleColors.js"],"sourcesContent":["import { processColor } from \"react-native-web\";\nconst 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 let out = null;\n for (const key in props) {\n if (!COLOR_PROPS.has(key)) continue;\n const value = props[key];\n const processed = typeof value === \"string\" || typeof value === \"object\" && value !== null ? processColor(value) : value;\n if (typeof processed === \"number\") {\n out ??= { ...props };\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 ??= { ...props };\n out[key] = processed;\n }\n }\n return out ?? props;\n}\nexport {\n processStyleColors\n};\n//# sourceMappingURL=processStyleColors.js.map\n"],"mappings":";;;AACA,MAAM,8BAA8B,IAAI,IAAI;CAC1C;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,MAAM,OAAO,OAAO;EACvB,IAAI,CAAC,YAAY,IAAI,GAAG,GAAG;EAC3B,MAAM,QAAQ,MAAM;EACpB,MAAM,YAAY,OAAO,UAAU,YAAY,OAAO,UAAU,YAAY,UAAU,OAAO,aAAa,KAAK,IAAI;EACnH,IAAI,OAAO,cAAc,UAAU;GACjC,QAAQ,EAAE,GAAG,MAAM;GACnB,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,EAAE,GAAG,MAAM;GACnB,IAAI,OAAO;EACb;CACF;CACA,OAAO,OAAO;AAChB"}
@@ -1,5 +1,9 @@
1
1
  import { processColor } from "react-native";
2
2
 
3
+ function _type_of(obj) {
4
+ "@swc/helpers - typeof";
5
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
6
+ }
3
7
  var COLOR_PROPS = /* @__PURE__ */ new Set([
4
8
  "color",
5
9
  "backgroundColor",
@@ -24,7 +28,7 @@ function processStyleColors(props) {
24
28
  for (var key in props) {
25
29
  if (!COLOR_PROPS.has(key)) continue;
26
30
  var value = props[key];
27
- var processed = typeof value === "string" ? processColor(value) : value;
31
+ var processed = typeof value === "string" || (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && value !== null ? processColor(value) : value;
28
32
  if (typeof processed === "number") {
29
33
  out !== null && out !== void 0 ? out : out = { ...props };
30
34
  out[key] = {
@@ -34,7 +38,7 @@ function processStyleColors(props) {
34
38
  b: (processed & 255) / 255,
35
39
  a: (processed >>> 24 & 255) / 255
36
40
  };
37
- } else if (typeof value === "string" && processed != null) {
41
+ } else if (processed != null && (typeof processed === "undefined" ? "undefined" : _type_of(processed)) === "object") {
38
42
  out !== null && out !== void 0 ? out : out = { ...props };
39
43
  out[key] = processed;
40
44
  }
@@ -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\" ? 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 (typeof value === \"string\" && processed != null) {\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.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,WAAW,aAAa,KAAK,IAAI;EAClE,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,OAAO,UAAU,YAAY,aAAa,MAAM;GACzD,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\";\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\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 === \"undefined\" ? \"undefined\" : _type_of(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 === \"undefined\" ? \"undefined\" : _type_of(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.js.map\n"],"mappings":";;;AACA,SAAS,SAAS,KAAK;CACrB;CACA,OAAO,OAAO,OAAO,WAAW,eAAe,IAAI,gBAAgB,SAAS,WAAW,OAAO;AAChG;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,aAAa,OAAO,UAAU,cAAc,cAAc,SAAS,KAAK,OAAO,YAAY,UAAU,OAAO,aAAa,KAAK,IAAI;EACnK,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,SAAS,OAAO,cAAc,cAAc,cAAc,SAAS,SAAS,OAAO,UAAU;GACnH,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.719.1",
3
+ "version": "3.0.0-beta.735.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,
@@ -45,7 +45,7 @@
45
45
  }
46
46
  },
47
47
  "devDependencies": {
48
- "@tamagui/build": "3.0.0-beta.719.1",
48
+ "@tamagui/build": "3.0.0-beta.735.1",
49
49
  "react": "19.2.3",
50
50
  "react-native": "0.86.2",
51
51
  "react-native-nitro-modules": "^0.36.5",
@@ -19,7 +19,7 @@
19
19
  * parser but not this one, and the throw kills the mount-item dispatch and
20
20
  * tears the whole React surface down.
21
21
  */
22
- import { processColor } from 'react-native'
22
+ import { processColor, type ColorValue } from 'react-native'
23
23
 
24
24
  const COLOR_PROPS = new Set([
25
25
  'color',
@@ -51,7 +51,10 @@ export function processStyleColors(
51
51
  // a style may already carry the packed int form RN accepts (`processColor`
52
52
  // output written straight into a style), and that form is misread the same
53
53
  // way, so it converts here too rather than only css strings
54
- const processed = typeof value === 'string' ? processColor(value) : value
54
+ const processed =
55
+ typeof value === 'string' || (typeof value === 'object' && value !== null)
56
+ ? processColor(value as ColorValue)
57
+ : value
55
58
  if (typeof processed === 'number') {
56
59
  out ??= { ...props }
57
60
  // processColor packs ARGB, and is signed on Android, hence >>>
@@ -62,9 +65,9 @@ export function processStyleColors(
62
65
  b: (processed & 0xff) / 255,
63
66
  a: ((processed >>> 24) & 0xff) / 255,
64
67
  }
65
- } else if (typeof value === 'string' && processed != null) {
66
- // a platform color resolves to an opaque object rather than a number, and
67
- // Fabric unpacks that shape itself, so it goes over untouched
68
+ } else if (processed != null && typeof processed === 'object') {
69
+ // platform and dynamic colors resolve to opaque objects. processColor
70
+ // normalizes their color branches before Fabric unpacks the shape.
68
71
  out ??= { ...props }
69
72
  out[key] = processed
70
73
  }
@@ -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 } 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 = typeof value === 'string' ? processColor(value) : 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 (typeof value === 'string' && processed != null) {\n // a platform color resolves to an opaque object rather than a number, and\n // Fabric unpacks that shape itself, so it goes over untouched\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 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"
10
10
  ]
11
11
  }