@tamagui/native-registry 3.0.0-beta.647.1 → 3.0.0-beta.651.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.
@@ -45,20 +45,21 @@ const COLOR_PROPS = /* @__PURE__ */ new Set([
45
45
  function processStyleColors(props) {
46
46
  let out = null;
47
47
  for (const key in props) {
48
+ if (!COLOR_PROPS.has(key)) continue;
48
49
  const value = props[key];
49
- if (COLOR_PROPS.has(key) && typeof value === "string") {
50
+ const processed = typeof value === "string" ? (0, import_react_native.processColor)(value) : value;
51
+ if (typeof processed === "number") {
50
52
  out ??= { ...props };
51
- const processed = (0, import_react_native.processColor)(value);
52
- if (typeof processed === "number") {
53
- out[key] = [
54
- (processed >>> 16 & 255) / 255,
55
- (processed >>> 8 & 255) / 255,
56
- (processed & 255) / 255,
57
- (processed >>> 24 & 255) / 255
58
- ];
59
- } else if (processed != null) {
60
- out[key] = processed;
61
- }
53
+ out[key] = {
54
+ space: "srgb",
55
+ r: (processed >>> 16 & 255) / 255,
56
+ g: (processed >>> 8 & 255) / 255,
57
+ b: (processed & 255) / 255,
58
+ a: (processed >>> 24 & 255) / 255
59
+ };
60
+ } else if (typeof value === "string" && processed != null) {
61
+ out ??= { ...props };
62
+ out[key] = processed;
62
63
  }
63
64
  }
64
65
  return out ?? props;
@@ -47,20 +47,21 @@ var COLOR_PROPS = /* @__PURE__ */ new Set([
47
47
  function processStyleColors(props) {
48
48
  var out = null;
49
49
  for (var key in props) {
50
+ if (!COLOR_PROPS.has(key)) continue;
50
51
  var value = props[key];
51
- if (COLOR_PROPS.has(key) && typeof value === "string") {
52
+ var processed = typeof value === "string" ? (0, import_react_native.processColor)(value) : value;
53
+ if (typeof processed === "number") {
52
54
  out !== null && out !== void 0 ? out : out = { ...props };
53
- var processed = (0, import_react_native.processColor)(value);
54
- if (typeof processed === "number") {
55
- out[key] = [
56
- (processed >>> 16 & 255) / 255,
57
- (processed >>> 8 & 255) / 255,
58
- (processed & 255) / 255,
59
- (processed >>> 24 & 255) / 255
60
- ];
61
- } else if (processed != null) {
62
- out[key] = processed;
63
- }
55
+ out[key] = {
56
+ space: "srgb",
57
+ r: (processed >>> 16 & 255) / 255,
58
+ g: (processed >>> 8 & 255) / 255,
59
+ b: (processed & 255) / 255,
60
+ a: (processed >>> 24 & 255) / 255
61
+ };
62
+ } else if (typeof value === "string" && processed != null) {
63
+ out !== null && out !== void 0 ? out : out = { ...props };
64
+ out[key] = processed;
64
65
  }
65
66
  }
66
67
  return out !== null && out !== void 0 ? out : props;
@@ -47,20 +47,21 @@ var COLOR_PROPS = /* @__PURE__ */ new Set([
47
47
  function processStyleColors(props) {
48
48
  var out = null;
49
49
  for (var key in props) {
50
+ if (!COLOR_PROPS.has(key)) continue;
50
51
  var value = props[key];
51
- if (COLOR_PROPS.has(key) && typeof value === "string") {
52
+ var processed = typeof value === "string" ? (0, import_react_native.processColor)(value) : value;
53
+ if (typeof processed === "number") {
52
54
  out !== null && out !== void 0 ? out : out = { ...props };
53
- var processed = (0, import_react_native.processColor)(value);
54
- if (typeof processed === "number") {
55
- out[key] = [
56
- (processed >>> 16 & 255) / 255,
57
- (processed >>> 8 & 255) / 255,
58
- (processed & 255) / 255,
59
- (processed >>> 24 & 255) / 255
60
- ];
61
- } else if (processed != null) {
62
- out[key] = processed;
63
- }
55
+ out[key] = {
56
+ space: "srgb",
57
+ r: (processed >>> 16 & 255) / 255,
58
+ g: (processed >>> 8 & 255) / 255,
59
+ b: (processed & 255) / 255,
60
+ a: (processed >>> 24 & 255) / 255
61
+ };
62
+ } else if (typeof value === "string" && processed != null) {
63
+ out !== null && out !== void 0 ? out : out = { ...props };
64
+ out[key] = processed;
64
65
  }
65
66
  }
66
67
  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_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 var value = props[key];\n if (COLOR_PROPS.has(key) && typeof value === \"string\") {\n out !== null && out !== void 0 ? out : out = {\n ...props\n };\n var processed = (0, import_react_native.processColor)(value);\n if (typeof processed === \"number\") {\n out[key] = [\n (processed >>> 16 & 255) / 255,\n (processed >>> 8 & 255) / 255,\n (processed & 255) / 255,\n (processed >>> 24 & 255) / 255\n ];\n } else if (processed != null) {\n out[key] = processed;\n }\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,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,6BAA6B,CAAC;AAClC,SAAS,4BAA4B,EACnC,0BAA0B,mBAC5B,CAAC;AACD,OAAO,UAAU,aAAa,0BAA0B;AACxD,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,QAAQ,MAAM;EAClB,IAAI,YAAY,IAAI,GAAG,KAAK,OAAO,UAAU,UAAU;GACrD,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM,MAAM,EAC3C,GAAG,MACL;GACA,IAAI,aAAa,GAAG,oBAAoB,cAAc,KAAK;GAC3D,IAAI,OAAO,cAAc,UAAU;IACjC,IAAI,OAAO;MACR,cAAc,KAAK,OAAO;MAC1B,cAAc,IAAI,OAAO;MACzB,YAAY,OAAO;MACnB,cAAc,KAAK,OAAO;IAC7B;GACF,OAAO,IAAI,aAAa,MAAM;IAC5B,IAAI,OAAO;GACb;EACF;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\");\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;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,6BAA6B,CAAC;AAClC,SAAS,4BAA4B,EACnC,0BAA0B,mBAC5B,CAAC;AACD,OAAO,UAAU,aAAa,0BAA0B;AACxD,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,GAAG,oBAAoB,cAAc,KAAK,IAAI;EAC3F,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"}
@@ -22,20 +22,21 @@ const COLOR_PROPS = /* @__PURE__ */ new Set([
22
22
  function processStyleColors(props) {
23
23
  let out = null;
24
24
  for (const key in props) {
25
+ if (!COLOR_PROPS.has(key)) continue;
25
26
  const value = props[key];
26
- if (COLOR_PROPS.has(key) && typeof value === "string") {
27
+ const processed = typeof value === "string" ? processColor(value) : value;
28
+ if (typeof processed === "number") {
27
29
  out ??= { ...props };
28
- const processed = processColor(value);
29
- if (typeof processed === "number") {
30
- out[key] = [
31
- (processed >>> 16 & 255) / 255,
32
- (processed >>> 8 & 255) / 255,
33
- (processed & 255) / 255,
34
- (processed >>> 24 & 255) / 255
35
- ];
36
- } else if (processed != null) {
37
- out[key] = processed;
38
- }
30
+ out[key] = {
31
+ 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
36
+ };
37
+ } else if (typeof value === "string" && processed != null) {
38
+ out ??= { ...props };
39
+ out[key] = processed;
39
40
  }
40
41
  }
41
42
  return out ?? props;
@@ -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 const value = props[key];\n if (COLOR_PROPS.has(key) && typeof value === \"string\") {\n out ??= { ...props };\n const processed = processColor(value);\n if (typeof processed === \"number\") {\n out[key] = [\n (processed >>> 16 & 255) / 255,\n (processed >>> 8 & 255) / 255,\n (processed & 255) / 255,\n (processed >>> 24 & 255) / 255\n ];\n } else if (processed != null) {\n out[key] = processed;\n }\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,MAAM,QAAQ,MAAM;EACpB,IAAI,YAAY,IAAI,GAAG,KAAK,OAAO,UAAU,UAAU;GACrD,QAAQ,EAAE,GAAG,MAAM;GACnB,MAAM,YAAY,aAAa,KAAK;GACpC,IAAI,OAAO,cAAc,UAAU;IACjC,IAAI,OAAO;MACR,cAAc,KAAK,OAAO;MAC1B,cAAc,IAAI,OAAO;MACzB,YAAY,OAAO;MACnB,cAAc,KAAK,OAAO;IAC7B;GACF,OAAO,IAAI,aAAa,MAAM;IAC5B,IAAI,OAAO;GACb;EACF;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\" ? 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"}
@@ -22,20 +22,21 @@ 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;
25
26
  var value = props[key];
26
- if (COLOR_PROPS.has(key) && typeof value === "string") {
27
+ var processed = typeof value === "string" ? processColor(value) : value;
28
+ if (typeof processed === "number") {
27
29
  out !== null && out !== void 0 ? out : out = { ...props };
28
- var processed = processColor(value);
29
- if (typeof processed === "number") {
30
- out[key] = [
31
- (processed >>> 16 & 255) / 255,
32
- (processed >>> 8 & 255) / 255,
33
- (processed & 255) / 255,
34
- (processed >>> 24 & 255) / 255
35
- ];
36
- } else if (processed != null) {
37
- out[key] = processed;
38
- }
30
+ out[key] = {
31
+ 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
36
+ };
37
+ } else if (typeof value === "string" && processed != null) {
38
+ out !== null && out !== void 0 ? out : out = { ...props };
39
+ out[key] = processed;
39
40
  }
40
41
  }
41
42
  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 var value = props[key];\n if (COLOR_PROPS.has(key) && typeof value === \"string\") {\n out !== null && out !== void 0 ? out : out = {\n ...props\n };\n var processed = processColor(value);\n if (typeof processed === \"number\") {\n out[key] = [\n (processed >>> 16 & 255) / 255,\n (processed >>> 8 & 255) / 255,\n (processed & 255) / 255,\n (processed >>> 24 & 255) / 255\n ];\n } else if (processed != null) {\n out[key] = processed;\n }\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,QAAQ,MAAM;EAClB,IAAI,YAAY,IAAI,GAAG,KAAK,OAAO,UAAU,UAAU;GACrD,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM,MAAM,EAC3C,GAAG,MACL;GACA,IAAI,YAAY,aAAa,KAAK;GAClC,IAAI,OAAO,cAAc,UAAU;IACjC,IAAI,OAAO;MACR,cAAc,KAAK,OAAO;MAC1B,cAAc,IAAI,OAAO;MACzB,YAAY,OAAO;MACnB,cAAc,KAAK,OAAO;IAC7B;GACF,OAAO,IAAI,aAAa,MAAM;IAC5B,IAAI,OAAO;GACb;EACF;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 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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/native-registry",
3
- "version": "3.0.0-beta.647.1",
3
+ "version": "3.0.0-beta.651.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.647.1",
48
+ "@tamagui/build": "3.0.0-beta.651.1",
49
49
  "react": ">=19",
50
50
  "react-native": "0.86.2",
51
51
  "react-native-nitro-modules": "^0.36.5",
@@ -4,13 +4,20 @@
4
4
  * and runtime-mode pushes both use this exact runtime processor before props
5
5
  * cross into the engine.
6
6
  *
7
- * Colors go over as `[r, g, b, a]` floats in 0..1, not as the packed ARGB int
8
- * `processColor` returns. Both forms are accepted by Fabric
9
- * (`fromRawValueShared`), but the int form is misread through this path: an
10
- * opaque grey `0xFFE3E3E3` rendered as `rgb(254, 229, 229)`, taking `0xFF` as
11
- * red and the real red as alpha, so every themed surface in an app came out
12
- * tinted pink. The float branch carries each channel in its own array slot, so
13
- * there is no packing for the parser to disagree about.
7
+ * Colors go over as `{ space: 'srgb', r, g, b, a }` with each channel a float
8
+ * in 0..1. That shape is the only one both prop parsers a themed view can reach
9
+ * will accept:
10
+ *
11
+ * - C++ `fromRawValueShared` reads it through its `space` branch. The packed
12
+ * ARGB int `processColor` returns is misread here: an opaque grey
13
+ * `0xFFE3E3E3` rendered as `rgb(254, 229, 229)`, taking `0xFF` as red and
14
+ * the real red as alpha, so every themed surface came out tinted pink.
15
+ * - Android additionally mounts some of these props through Java
16
+ * `SurfaceMountingManager.updateProps` -> `ColorPropConverter`, which takes
17
+ * a number or a map and throws `ColorValue: the value must be a number or
18
+ * Object` on anything else. A plain `[r, g, b, a]` array satisfies the C++
19
+ * parser but not this one, and the throw kills the mount-item dispatch and
20
+ * tears the whole React surface down.
14
21
  */
15
22
  import { processColor } from 'react-native'
16
23
 
@@ -39,23 +46,27 @@ export function processStyleColors(
39
46
  ): Record<string, unknown> {
40
47
  let out: Record<string, unknown> | null = null
41
48
  for (const key in props) {
49
+ if (!COLOR_PROPS.has(key)) continue
42
50
  const value = props[key]
43
- if (COLOR_PROPS.has(key) && typeof value === 'string') {
51
+ // a style may already carry the packed int form RN accepts (`processColor`
52
+ // output written straight into a style), and that form is misread the same
53
+ // way, so it converts here too rather than only css strings
54
+ const processed = typeof value === 'string' ? processColor(value) : value
55
+ if (typeof processed === 'number') {
44
56
  out ??= { ...props }
45
- const processed = processColor(value)
57
+ // processColor packs ARGB, and is signed on Android, hence >>>
58
+ out[key] = {
59
+ space: 'srgb',
60
+ r: ((processed >>> 16) & 0xff) / 255,
61
+ g: ((processed >>> 8) & 0xff) / 255,
62
+ b: (processed & 0xff) / 255,
63
+ a: ((processed >>> 24) & 0xff) / 255,
64
+ }
65
+ } else if (typeof value === 'string' && processed != null) {
46
66
  // a platform color resolves to an opaque object rather than a number, and
47
67
  // Fabric unpacks that shape itself, so it goes over untouched
48
- if (typeof processed === 'number') {
49
- // processColor packs ARGB, and is signed on Android, hence >>>
50
- out[key] = [
51
- ((processed >>> 16) & 0xff) / 255,
52
- ((processed >>> 8) & 0xff) / 255,
53
- (processed & 0xff) / 255,
54
- ((processed >>> 24) & 0xff) / 255,
55
- ]
56
- } else if (processed != null) {
57
- out[key] = processed
58
- }
68
+ out ??= { ...props }
69
+ out[key] = processed
59
70
  }
60
71
  }
61
72
  return out ?? props
@@ -1,11 +1,11 @@
1
1
  {
2
- "mappings": "AAoCA,OAAO,iBAAS,mBACd,OAAO,0BACN",
2
+ "mappings": "AA2CA,OAAO,iBAAS,mBACd,OAAO,0BACN",
3
3
  "names": [],
4
4
  "sources": [
5
5
  "src/processStyleColors.ts"
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 `[r, g, b, a]` floats in 0..1, not as the packed ARGB int\n * `processColor` returns. Both forms are accepted by Fabric\n * (`fromRawValueShared`), but the int form is misread through this path: an\n * opaque grey `0xFFE3E3E3` rendered as `rgb(254, 229, 229)`, taking `0xFF` as\n * red and the real red as alpha, so every themed surface in an app came out\n * tinted pink. The float branch carries each channel in its own array slot, so\n * there is no packing for the parser to disagree about.\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 const value = props[key]\n if (COLOR_PROPS.has(key) && typeof value === 'string') {\n out ??= { ...props }\n const processed = processColor(value)\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 if (typeof processed === 'number') {\n // processColor packs ARGB, and is signed on Android, hence >>>\n out[key] = [\n ((processed >>> 16) & 0xff) / 255,\n ((processed >>> 8) & 0xff) / 255,\n (processed & 0xff) / 255,\n ((processed >>> 24) & 0xff) / 255,\n ]\n } else if (processed != null) {\n out[key] = processed\n }\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 } 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"
10
10
  ]
11
11
  }