@tamagui/web 3.0.0-beta.1598.1 → 3.0.0-beta.1648.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.
Files changed (66) hide show
  1. package/dist/cjs/createTamagui.cjs +10 -8
  2. package/dist/cjs/createTamagui.native.cjs +10 -8
  3. package/dist/cjs/createTamagui.native.js +10 -8
  4. package/dist/cjs/createTamagui.native.js.map +1 -1
  5. package/dist/cjs/helpers/getSplitStyles.cjs +5 -7
  6. package/dist/cjs/helpers/getSplitStyles.native.cjs +6 -8
  7. package/dist/cjs/helpers/getSplitStyles.native.js +6 -8
  8. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  9. package/dist/cjs/helpers/proxyThemeToParents.cjs +2 -1
  10. package/dist/cjs/helpers/proxyThemeToParents.native.cjs +2 -1
  11. package/dist/cjs/helpers/proxyThemeToParents.native.js +2 -1
  12. package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
  13. package/dist/cjs/helpers/themes.cjs +19 -11
  14. package/dist/cjs/helpers/themes.native.cjs +19 -11
  15. package/dist/cjs/helpers/themes.native.js +19 -11
  16. package/dist/cjs/helpers/themes.native.js.map +1 -1
  17. package/dist/cjs/hooks/useThemeState.cjs +9 -19
  18. package/dist/cjs/hooks/useThemeState.native.cjs +16 -22
  19. package/dist/cjs/hooks/useThemeState.native.js +16 -22
  20. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  21. package/dist/cjs/internal-runtime.cjs +2 -0
  22. package/dist/cjs/internal-runtime.native.cjs +2 -0
  23. package/dist/cjs/internal-runtime.native.js +2 -0
  24. package/dist/cjs/internal-runtime.native.js.map +1 -1
  25. package/dist/esm/createTamagui.mjs +11 -9
  26. package/dist/esm/createTamagui.mjs.map +1 -1
  27. package/dist/esm/createTamagui.native.js +11 -9
  28. package/dist/esm/createTamagui.native.js.map +1 -1
  29. package/dist/esm/helpers/getSplitStyles.mjs +5 -7
  30. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  31. package/dist/esm/helpers/getSplitStyles.native.js +6 -8
  32. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  33. package/dist/esm/helpers/proxyThemeToParents.mjs +3 -1
  34. package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
  35. package/dist/esm/helpers/proxyThemeToParents.native.js +3 -1
  36. package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
  37. package/dist/esm/helpers/themes.mjs +15 -11
  38. package/dist/esm/helpers/themes.mjs.map +1 -1
  39. package/dist/esm/helpers/themes.native.js +15 -11
  40. package/dist/esm/helpers/themes.native.js.map +1 -1
  41. package/dist/esm/hooks/useThemeState.mjs +8 -20
  42. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  43. package/dist/esm/hooks/useThemeState.native.js +16 -22
  44. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  45. package/dist/esm/internal-runtime.mjs +3 -2
  46. package/dist/esm/internal-runtime.mjs.map +1 -1
  47. package/dist/esm/internal-runtime.native.js +3 -2
  48. package/dist/esm/internal-runtime.native.js.map +1 -1
  49. package/package.json +17 -17
  50. package/src/createTamagui.ts +17 -21
  51. package/src/helpers/getSplitStyles.tsx +13 -8
  52. package/src/helpers/proxyThemeToParents.ts +2 -1
  53. package/src/helpers/themes.ts +17 -11
  54. package/src/hooks/useThemeState.ts +15 -35
  55. package/src/internal-runtime.ts +6 -1
  56. package/src/types.tsx +1 -15
  57. package/types/createTamagui.d.ts.map +1 -1
  58. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  59. package/types/helpers/proxyThemeToParents.d.ts.map +1 -1
  60. package/types/helpers/themes.d.ts +2 -0
  61. package/types/helpers/themes.d.ts.map +1 -1
  62. package/types/hooks/useThemeState.d.ts.map +1 -1
  63. package/types/internal-runtime.d.ts +1 -0
  64. package/types/internal-runtime.d.ts.map +1 -1
  65. package/types/types.d.ts +1 -3
  66. package/types/types.d.ts.map +1 -1
@@ -24,6 +24,7 @@ __export(proxyThemeToParents_exports, {
24
24
  proxyThemesToParents: () => proxyThemesToParents
25
25
  });
26
26
  module.exports = __toCommonJS(proxyThemeToParents_exports);
27
+ var import_themes = require("./themes.cjs");
27
28
  const themesRaw = {};
28
29
  function proxyThemesToParents(dedupedThemes, declarationOrder) {
29
30
  for (const { names, theme } of dedupedThemes) {
@@ -57,5 +58,5 @@ function proxyThemeToParents(themeName, theme) {
57
58
  Object.assign(out, themesRaw[parent]);
58
59
  }
59
60
  Object.assign(out, theme);
60
- return out;
61
+ return (0, import_themes.copyAuthoredThemeScheme)(out, theme);
61
62
  }
@@ -26,6 +26,7 @@ __export(proxyThemeToParents_exports, {
26
26
  proxyThemesToParents: () => proxyThemesToParents
27
27
  });
28
28
  module.exports = __toCommonJS(proxyThemeToParents_exports);
29
+ var import_themes = require("./themes.native.js");
29
30
  var themesRaw = {};
30
31
  function proxyThemesToParents(dedupedThemes, declarationOrder) {
31
32
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
@@ -163,5 +164,5 @@ function proxyThemeToParents(themeName, theme) {
163
164
  }
164
165
  }
165
166
  Object.assign(out, theme);
166
- return out;
167
+ return (0, import_themes.copyAuthoredThemeScheme)(out, theme);
167
168
  }
@@ -26,6 +26,7 @@ __export(proxyThemeToParents_exports, {
26
26
  proxyThemesToParents: () => proxyThemesToParents
27
27
  });
28
28
  module.exports = __toCommonJS(proxyThemeToParents_exports);
29
+ var import_themes = require("./themes.native.js");
29
30
  var themesRaw = {};
30
31
  function proxyThemesToParents(dedupedThemes, declarationOrder) {
31
32
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
@@ -163,7 +164,7 @@ function proxyThemeToParents(themeName, theme) {
163
164
  }
164
165
  }
165
166
  Object.assign(out, theme);
166
- return out;
167
+ return (0, import_themes.copyAuthoredThemeScheme)(out, theme);
167
168
  }
168
169
 
169
170
  //# sourceMappingURL=proxyThemeToParents.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"proxyThemeToParents.native.js","names":[],"sources":["cjs/helpers/proxyThemeToParents.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 proxyThemeToParents_exports = {};\n__export(proxyThemeToParents_exports, {\n proxyThemeToParents: () => proxyThemeToParents,\n proxyThemesToParents: () => proxyThemesToParents\n});\nmodule.exports = __toCommonJS(proxyThemeToParents_exports);\nvar themesRaw = {};\nfunction proxyThemesToParents(dedupedThemes, declarationOrder) {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = dedupedThemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var { names, theme } = _step.value;\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = names[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var name = _step1.value;\n themesRaw[name] = theme;\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\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 var themes = {};\n var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;\n try {\n for (var _iterator2 = dedupedThemes[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var { names: names1, theme: theme1 } = _step2.value;\n var _iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = void 0;\n try {\n for (var _iterator3 = names1[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var themeName = _step3.value;\n var proxiedTheme = proxyThemeToParents(themeName, theme1);\n themes[themeName] = proxiedTheme;\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return != null) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n if (declarationOrder) {\n var ordered = {};\n var _iteratorNormalCompletion4 = true, _didIteratorError4 = false, _iteratorError4 = void 0;\n try {\n for (var _iterator4 = declarationOrder[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var k = _step4.value;\n if (k in themes) ordered[k] = themes[k];\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return != null) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n for (var k1 in themes) if (!(k1 in ordered)) ordered[k1] = themes[k1];\n return ordered;\n }\n return themes;\n}\nfunction proxyThemeToParents(themeName, theme) {\n var out = {};\n var cur = [];\n var parents = themeName.split(\"_\").slice(0, -1).map(function(part) {\n cur.push(part);\n return cur.join(\"_\");\n });\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = parents[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var parent = _step.value;\n Object.assign(out, themesRaw[parent]);\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 Object.assign(out, theme);\n return out;\n}\n//# sourceMappingURL=proxyThemeToParents.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,CAA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AC5D,WAAW,OAAO;IACpB;GACF,UAAU;IACR,IAAI,oBAAoB;KACtB,MAAM;IACR;GACF;EACF;EACA,KAAK,IAAI,MAAM,QAAQ,IAAI,EAAE,MAAM,UAAU,QAAQ,MAAM,OAAO;EAClE,OAAO;CACT;CACA,OAAO;AACT;AACA,SAAS,oBAAoB,WAAW,OAAO;CAC7C,IAAI,MAAM,CAAC;CACX,IAAI,MAAM,CAAC;CACX,IAAI,UAAU,UAAU,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,SAAS,MAAM;EACjE,IAAI,KAAK,IAAI;EACb,OAAO,IAAI,KAAK,GAAG;CACrB,CAAC;CACD,IAAI,4BAA4B,MAAM,oBAAoB,OAAO,iBAAiB,KAAK;CACvF,IAAI;EACF,KAAK,IAAI,YAAY,QAAQ,OAAO,SAAS,CAAC,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,EAAC,CAAE,OAAO,4BAA4B,MAAM;GACxJ,IAAI,SAAS,MAAM;GACnB,OAAO,OAAO,KAAK,UAAU,OAAO;EACtC;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,OAAO,OAAO,KAAK,KAAK;CACxB,OAAO;AACT"}
1
+ {"version":3,"file":"proxyThemeToParents.native.js","names":[],"sources":["cjs/helpers/proxyThemeToParents.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 proxyThemeToParents_exports = {};\n__export(proxyThemeToParents_exports, {\n proxyThemeToParents: () => proxyThemeToParents,\n proxyThemesToParents: () => proxyThemesToParents\n});\nmodule.exports = __toCommonJS(proxyThemeToParents_exports);\nvar import_themes = require(\"./themes\");\nvar themesRaw = {};\nfunction proxyThemesToParents(dedupedThemes, declarationOrder) {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = dedupedThemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var { names, theme } = _step.value;\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = names[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var name = _step1.value;\n themesRaw[name] = theme;\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\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 var themes = {};\n var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;\n try {\n for (var _iterator2 = dedupedThemes[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var { names: names1, theme: theme1 } = _step2.value;\n var _iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = void 0;\n try {\n for (var _iterator3 = names1[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var themeName = _step3.value;\n var proxiedTheme = proxyThemeToParents(themeName, theme1);\n themes[themeName] = proxiedTheme;\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return != null) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n if (declarationOrder) {\n var ordered = {};\n var _iteratorNormalCompletion4 = true, _didIteratorError4 = false, _iteratorError4 = void 0;\n try {\n for (var _iterator4 = declarationOrder[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var k = _step4.value;\n if (k in themes) ordered[k] = themes[k];\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return != null) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n for (var k1 in themes) if (!(k1 in ordered)) ordered[k1] = themes[k1];\n return ordered;\n }\n return themes;\n}\nfunction proxyThemeToParents(themeName, theme) {\n var out = {};\n var cur = [];\n var parents = themeName.split(\"_\").slice(0, -1).map(function(part) {\n cur.push(part);\n return cur.join(\"_\");\n });\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = parents[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var parent = _step.value;\n Object.assign(out, themesRaw[parent]);\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 Object.assign(out, theme);\n return (0, import_themes.copyAuthoredThemeScheme)(out, theme);\n}\n//# sourceMappingURL=proxyThemeToParents.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,8BAA8B,CAAC;AACnC,SAAS,6BAA6B;CACpC,2BAA2B;CAC3B,4BAA4B;AAC9B,CAAC;AACD,OAAO,UAAU,aAAa,2BAA2B;AACzD,IAAI,gBAAgB,QAAQ,oBAAU;AACtC,IAAI,YAAY,CAAC;AACjB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AoB,WAAW,OAAO;CAC7C,IAAI,MAAM,CAAC;CACX,IAAI,MAAM,CAAC;CACX,IAAI,UAAU,UAAU,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,SAAS,MAAM;EACjE,IAAI,KAAK,IAAI;EACb,OAAO,IAAI,KAAK,GAAG;CACrB,CAAC;CACD,IAAI,4BAA4B,MAAM,oBAAoB,OAAO,iBAAiB,KAAK;CACvF,IAAI;EACF,KAAK,IAAI,YAAY,QAAQ,OAAO,SAAS,CAAC,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,EAAC,CAAE,OAAO,4BAA4B,MAAM;GACxJ,IAAI,SAAS,MAAM;GACnB,OAAO,OAAO,KAAK,UAAU,OAAO;EACtC;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,OAAO,OAAO,KAAK,KAAK;CACxB,QAAQ,GAAG,cAAc,wBAAuB,CAAE,KAAK,KAAK;AAC9D"}
@@ -19,23 +19,31 @@ var __copyProps = (to, from, except, desc) => {
19
19
  };
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
  var themes_exports = {};
22
- __export(themes_exports, { ensureThemeVariable: () => ensureThemeVariable });
22
+ __export(themes_exports, {
23
+ copyAuthoredThemeScheme: () => copyAuthoredThemeScheme,
24
+ ensureThemeVariable: () => ensureThemeVariable,
25
+ getAuthoredThemeScheme: () => getAuthoredThemeScheme
26
+ });
23
27
  module.exports = __toCommonJS(themes_exports);
24
28
  var import_createVariable = require("../createVariable.cjs");
29
+ const schemeKey = /* @__PURE__ */ Symbol.for("tamagui.theme.scheme");
30
+ function getAuthoredThemeScheme(theme) {
31
+ const scheme = theme[schemeKey];
32
+ return scheme === "light" || scheme === "dark" ? scheme : void 0;
33
+ }
34
+ function copyAuthoredThemeScheme(target, source) {
35
+ const scheme = getAuthoredThemeScheme(source);
36
+ if (scheme) Object.defineProperty(target, schemeKey, { value: scheme });
37
+ return target;
38
+ }
25
39
  function ensureThemeVariable(theme, key) {
26
40
  const val = theme[key];
27
- const value = (0, import_createVariable.isVariable)(val) ? val.val : val;
28
- if (!(0, import_createVariable.isVariable)(val)) {
29
- theme[key] = (0, import_createVariable.createVariable)({
30
- key,
31
- name: key,
32
- val: value
33
- });
34
- } else if (val.name !== key) {
41
+ const variable = (0, import_createVariable.isVariable)(val);
42
+ if (!variable || val.name !== key) {
35
43
  theme[key] = (0, import_createVariable.createVariable)({
36
- key: val.name,
44
+ key: variable ? val.name : key,
37
45
  name: key,
38
- val: value
46
+ val: variable ? val.val : val
39
47
  });
40
48
  }
41
49
  }
@@ -21,23 +21,31 @@ var __copyProps = (to, from, except, desc) => {
21
21
  };
22
22
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
23
  var themes_exports = {};
24
- __export(themes_exports, { ensureThemeVariable: () => ensureThemeVariable });
24
+ __export(themes_exports, {
25
+ copyAuthoredThemeScheme: () => copyAuthoredThemeScheme,
26
+ ensureThemeVariable: () => ensureThemeVariable,
27
+ getAuthoredThemeScheme: () => getAuthoredThemeScheme
28
+ });
25
29
  module.exports = __toCommonJS(themes_exports);
26
30
  var import_createVariable = require("../createVariable.native.js");
31
+ var schemeKey = /* @__PURE__ */ Symbol.for("tamagui.theme.scheme");
32
+ function getAuthoredThemeScheme(theme) {
33
+ var scheme = theme[schemeKey];
34
+ return scheme === "light" || scheme === "dark" ? scheme : void 0;
35
+ }
36
+ function copyAuthoredThemeScheme(target, source) {
37
+ var scheme = getAuthoredThemeScheme(source);
38
+ if (scheme) Object.defineProperty(target, schemeKey, { value: scheme });
39
+ return target;
40
+ }
27
41
  function ensureThemeVariable(theme, key) {
28
42
  var val = theme[key];
29
- var value = (0, import_createVariable.isVariable)(val) ? val.val : val;
30
- if (!(0, import_createVariable.isVariable)(val)) {
31
- theme[key] = (0, import_createVariable.createVariable)({
32
- key,
33
- name: key,
34
- val: value
35
- });
36
- } else if (val.name !== key) {
43
+ var variable = (0, import_createVariable.isVariable)(val);
44
+ if (!variable || val.name !== key) {
37
45
  theme[key] = (0, import_createVariable.createVariable)({
38
- key: val.name,
46
+ key: variable ? val.name : key,
39
47
  name: key,
40
- val: value
48
+ val: variable ? val.val : val
41
49
  });
42
50
  }
43
51
  }
@@ -21,23 +21,31 @@ var __copyProps = (to, from, except, desc) => {
21
21
  };
22
22
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
23
  var themes_exports = {};
24
- __export(themes_exports, { ensureThemeVariable: () => ensureThemeVariable });
24
+ __export(themes_exports, {
25
+ copyAuthoredThemeScheme: () => copyAuthoredThemeScheme,
26
+ ensureThemeVariable: () => ensureThemeVariable,
27
+ getAuthoredThemeScheme: () => getAuthoredThemeScheme
28
+ });
25
29
  module.exports = __toCommonJS(themes_exports);
26
30
  var import_createVariable = require("../createVariable.native.js");
31
+ var schemeKey = /* @__PURE__ */ Symbol.for("tamagui.theme.scheme");
32
+ function getAuthoredThemeScheme(theme) {
33
+ var scheme = theme[schemeKey];
34
+ return scheme === "light" || scheme === "dark" ? scheme : void 0;
35
+ }
36
+ function copyAuthoredThemeScheme(target, source) {
37
+ var scheme = getAuthoredThemeScheme(source);
38
+ if (scheme) Object.defineProperty(target, schemeKey, { value: scheme });
39
+ return target;
40
+ }
27
41
  function ensureThemeVariable(theme, key) {
28
42
  var val = theme[key];
29
- var value = (0, import_createVariable.isVariable)(val) ? val.val : val;
30
- if (!(0, import_createVariable.isVariable)(val)) {
31
- theme[key] = (0, import_createVariable.createVariable)({
32
- key,
33
- name: key,
34
- val: value
35
- });
36
- } else if (val.name !== key) {
43
+ var variable = (0, import_createVariable.isVariable)(val);
44
+ if (!variable || val.name !== key) {
37
45
  theme[key] = (0, import_createVariable.createVariable)({
38
- key: val.name,
46
+ key: variable ? val.name : key,
39
47
  name: key,
40
- val: value
48
+ val: variable ? val.val : val
41
49
  });
42
50
  }
43
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"themes.native.js","names":[],"sources":["cjs/helpers/themes.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 themes_exports = {};\n__export(themes_exports, {\n ensureThemeVariable: () => ensureThemeVariable\n});\nmodule.exports = __toCommonJS(themes_exports);\nvar import_createVariable = require(\"../createVariable\");\nfunction ensureThemeVariable(theme, key) {\n var val = theme[key];\n var value = (0, import_createVariable.isVariable)(val) ? val.val : val;\n if (!(0, import_createVariable.isVariable)(val)) {\n theme[key] = (0, import_createVariable.createVariable)({\n key,\n name: key,\n val: value\n });\n } else if (val.name !== key) {\n theme[key] = (0, import_createVariable.createVariable)({\n key: val.name,\n name: key,\n val: value\n });\n }\n}\n//# sourceMappingURL=themes.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,iBAAiB,CAAC;AACtB,SAAS,gBAAgB,EACvB,2BAA2B,oBAC7B,CAAC;AACD,OAAO,UAAU,aAAa,cAAc;AAC5C,IAAI,wBAAwB,QAAQ,6BAAmB;AACvD,SAAS,oBAAoB,OAAO,KAAK;CACvC,IAAI,MAAM,MAAM;CAChB,IAAI,SAAS,GAAG,sBAAsB,WAAU,CAAE,GAAG,IAAI,IAAI,MAAM;CACnE,IAAI,EAAE,GAAG,sBAAsB,WAAU,CAAE,GAAG,GAAG;EAC/C,MAAM,QAAQ,GAAG,sBAAsB,eAAc,CAAE;GACrD;GACA,MAAM;GACN,KAAK;EACP,CAAC;CACH,OAAO,IAAI,IAAI,SAAS,KAAK;EAC3B,MAAM,QAAQ,GAAG,sBAAsB,eAAc,CAAE;GACrD,KAAK,IAAI;GACT,MAAM;GACN,KAAK;EACP,CAAC;CACH;AACF"}
1
+ {"version":3,"file":"themes.native.js","names":[],"sources":["cjs/helpers/themes.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 themes_exports = {};\n__export(themes_exports, {\n copyAuthoredThemeScheme: () => copyAuthoredThemeScheme,\n ensureThemeVariable: () => ensureThemeVariable,\n getAuthoredThemeScheme: () => getAuthoredThemeScheme\n});\nmodule.exports = __toCommonJS(themes_exports);\nvar import_createVariable = require(\"../createVariable\");\nvar schemeKey = /* @__PURE__ */ Symbol.for(\"tamagui.theme.scheme\");\nfunction getAuthoredThemeScheme(theme) {\n var scheme = theme[schemeKey];\n return scheme === \"light\" || scheme === \"dark\" ? scheme : void 0;\n}\nfunction copyAuthoredThemeScheme(target, source) {\n var scheme = getAuthoredThemeScheme(source);\n if (scheme) Object.defineProperty(target, schemeKey, {\n value: scheme\n });\n return target;\n}\nfunction ensureThemeVariable(theme, key) {\n var val = theme[key];\n var variable = (0, import_createVariable.isVariable)(val);\n if (!variable || val.name !== key) {\n theme[key] = (0, import_createVariable.createVariable)({\n key: variable ? val.name : key,\n name: key,\n val: variable ? val.val : val\n });\n }\n}\n//# sourceMappingURL=themes.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,iBAAiB,CAAC;AACtB,SAAS,gBAAgB;CACvB,+BAA+B;CAC/B,2BAA2B;CAC3B,8BAA8B;AAChC,CAAC;AACD,OAAO,UAAU,aAAa,cAAc;AAC5C,IAAI,wBAAwB,QAAQ,6BAAmB;AACvD,IAAI,YAA4B,uBAAO,IAAI,sBAAsB;AACjE,SAAS,uBAAuB,OAAO;CACrC,IAAI,SAAS,MAAM;CACnB,OAAO,WAAW,WAAW,WAAW,SAAS,SAAS,KAAK;AACjE;AACA,SAAS,wBAAwB,QAAQ,QAAQ;CAC/C,IAAI,SAAS,uBAAuB,MAAM;CAC1C,IAAI,QAAQ,OAAO,eAAe,QAAQ,WAAW,EACnD,OAAO,OACT,CAAC;CACD,OAAO;AACT;AACA,SAAS,oBAAoB,OAAO,KAAK;CACvC,IAAI,MAAM,MAAM;CAChB,IAAI,YAAY,GAAG,sBAAsB,WAAU,CAAE,GAAG;CACxD,IAAI,CAAC,YAAY,IAAI,SAAS,KAAK;EACjC,MAAM,QAAQ,GAAG,sBAAsB,eAAc,CAAE;GACrD,KAAK,WAAW,IAAI,OAAO;GAC3B,MAAM;GACN,KAAK,WAAW,IAAI,MAAM;EAC5B,CAAC;CACH;AACF"}
@@ -39,6 +39,7 @@ var import_react = require("react");
39
39
  var import_helpers = require("@tamagui/helpers");
40
40
  var import_config = require("../config.cjs");
41
41
  var import_constants2 = require("../constants/constants.cjs");
42
+ var import_themes = require("../helpers/themes.cjs");
42
43
  const ThemeStateContext = (0, import_react.createContext)("");
43
44
  const allListeners = /* @__PURE__ */ new Map();
44
45
  const listenersByParent = {};
@@ -87,17 +88,11 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
87
88
  theme: (0, import_config.getConfig)().themes.light
88
89
  };
89
90
  const id = (0, import_react.useId)();
90
- const propsKey = getPropsKey(props);
91
+ const propsKey = `${props.name || ""}${props.forceClassName || ""}${props._themeUpdate?.key || ""}`;
91
92
  if (cascadeOnChange) registerThemeProviderChain(id, parentId, props);
92
93
  const ref = (0, import_react.useRef)(null);
93
94
  const r = ref.current ||= {
94
95
  id,
95
- parentId,
96
- props,
97
- propsKey,
98
- isRoot,
99
- keys,
100
- schemeKeys,
101
96
  optimizeForFirstRender,
102
97
  renderVersion: 0
103
98
  };
@@ -105,7 +100,6 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
105
100
  r.propsKey = propsKey;
106
101
  r.isRoot = isRoot;
107
102
  r.keys = keys;
108
- r.schemeKeys = schemeKeys;
109
103
  r.parentId = parentId;
110
104
  r.renderVersion++;
111
105
  const [, forceUpdate] = (0, import_react.useReducer)(incReducer, 0);
@@ -118,7 +112,7 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
118
112
  r.state = r.lastSnap;
119
113
  }
120
114
  if (cascadeOnChange && !themeProviderParents.has(r.id)) registerThemeProviderChain(r.id, r.parentId, r.props);
121
- if (r.unsubscribe && r.subscribedTo !== r.parentId) cleanupThemeSubscription(r);
115
+ if (r.unsubscribe && r.subscribedTo !== r.parentId) r.unsubscribe?.();
122
116
  if (shouldSubscribeToTheme(r, cascadeOnChange)) {
123
117
  if (!r.unsubscribe) {
124
118
  const pid = r.parentId;
@@ -148,7 +142,7 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
148
142
  r.subscribedTo = void 0;
149
143
  };
150
144
  }
151
- } else if (r.unsubscribe) cleanupThemeSubscription(r);
145
+ } else if (r.unsubscribe) r.unsubscribe?.();
152
146
  return () => {
153
147
  if (r.renderVersion === renderVersion) cleanupThemeState(r);
154
148
  };
@@ -169,11 +163,8 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
169
163
  return state;
170
164
  };
171
165
  const shouldSubscribeToTheme = (r, cascadeOnChange) => Boolean(r.optimizeForFirstRender || r.isRoot || cascadeOnChange || hasThemeUpdatingProps(r.props) || r.keys.current?.size || r.props.needsUpdate?.());
172
- function cleanupThemeSubscription(r) {
173
- r.unsubscribe?.();
174
- }
175
166
  function cleanupThemeState(r) {
176
- if (r.unsubscribe) cleanupThemeSubscription(r);
167
+ if (r.unsubscribe) r.unsubscribe();
177
168
  else {
178
169
  r.state = void 0;
179
170
  states.delete(r.id);
@@ -183,15 +174,15 @@ function cleanupThemeState(r) {
183
174
  themeProviderParents.delete(r.id);
184
175
  }
185
176
  const getSnapshotImpl = (r) => {
186
- const { id, parentId, props, propsKey, isRoot, keys, schemeKeys, optimizeForFirstRender } = r;
177
+ const { id, parentId, props, propsKey, isRoot, keys, optimizeForFirstRender } = r;
178
+ const schemeKeys = void 0;
187
179
  let local = r.state;
188
180
  const parentState = states.get(parentId);
189
181
  if (local && !PendingUpdate.has(id)) {
190
182
  if (parentState && local._parentName === parentState.name && local._parentSchemeAuthored === parentState.schemeAuthored && local._propsKey === propsKey) return local;
191
183
  }
192
184
  const isSchemeOnlyChange = !optimizeForFirstRender && false;
193
- const allKeysSchemeOptimized = !optimizeForFirstRender && Boolean(keys.current?.size && schemeKeys?.current?.size === keys.current.size);
194
- const canSkipForSchemeChange = Boolean(isSchemeOnlyChange && allKeysSchemeOptimized);
185
+ const canSkipForSchemeChange = Boolean(isSchemeOnlyChange && keys.current?.size && schemeKeys?.current?.size === keys.current.size);
195
186
  const needsUpdate = props.passThrough ? false : optimizeForFirstRender ? true : isRoot || props.forceClassName || props.name === "light" || props.name === "dark" || props.name === null ? true : !HasRenderedOnce.get(keys) ? true : canSkipForSchemeChange ? false : keys?.current?.size ? true : props.needsUpdate?.();
196
187
  const [rerender, nextRaw] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
197
188
  let next = nextRaw;
@@ -247,7 +238,7 @@ const getNextState = (lastState, props, propsKey, isRoot = false, id, parentId,
247
238
  if (shouldRerender) return [true, { ...parentState || lastState || next }];
248
239
  return [false, next];
249
240
  }
250
- const scheme = (0, import_helpers.getThemeScheme)(resolvedName);
241
+ const scheme = (0, import_themes.getAuthoredThemeScheme)(themes[resolvedName]) || (0, import_helpers.getThemeScheme)(resolvedName);
251
242
  const parentInverses = parentState?.inverses ?? 0;
252
243
  const isInverse = Boolean(parentState && scheme !== parentState.scheme);
253
244
  const inverses = parentInverses + (isInverse ? 1 : 0);
@@ -316,5 +307,4 @@ function resolveThemeName(parentName, name, themes2, forceUpdate = false) {
316
307
  if (!forceUpdate && found === parentName && found !== "light" && found !== "dark") return null;
317
308
  return found;
318
309
  }
319
- const getPropsKey = ({ name, forceClassName, _themeUpdate }) => `${name || ""}${forceClassName || ""}${_themeUpdate?.key || ""}`;
320
310
  const hasThemeUpdatingProps = (props) => "name" in props || "forceClassName" in props || "_themeUpdate" in props;
@@ -41,6 +41,7 @@ var import_react = require("react");
41
41
  var import_helpers = require("@tamagui/helpers");
42
42
  var import_config = require("../config.native.js");
43
43
  var import_constants2 = require("../constants/constants.native.js");
44
+ var import_themes = require("../helpers/themes.native.js");
44
45
  var ThemeStateContext = (0, import_react.createContext)("");
45
46
  var allListeners = /* @__PURE__ */ new Map();
46
47
  var listenersByParent = {};
@@ -96,6 +97,7 @@ var incReducer = function(c) {
96
97
  var useThemeState = function(props) {
97
98
  "use no memo";
98
99
  var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, keys = arguments.length > 2 ? arguments[2] : void 0, schemeKeys = arguments.length > 3 ? arguments[3] : void 0, cascadeOnChange = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, optimizeForFirstRender = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
100
+ var _props__themeUpdate;
99
101
  var _ref;
100
102
  var { disable } = props;
101
103
  var parentId = (0, import_react.useContext)(ThemeStateContext);
@@ -108,16 +110,10 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
108
110
  theme: (0, import_config.getConfig)().themes.light
109
111
  };
110
112
  var id = (0, import_react.useId)();
111
- var propsKey = getPropsKey(props);
113
+ var propsKey = `${props.name || ""}${props.forceClassName || ""}${((_props__themeUpdate = props._themeUpdate) === null || _props__themeUpdate === void 0 ? void 0 : _props__themeUpdate.key) || ""}`;
112
114
  if (cascadeOnChange) registerThemeProviderChain(id, parentId, props);
113
115
  var r = (_ref = (0, import_react.useRef)(null)).current || (_ref.current = {
114
116
  id,
115
- parentId,
116
- props,
117
- propsKey,
118
- isRoot,
119
- keys,
120
- schemeKeys,
121
117
  optimizeForFirstRender,
122
118
  renderVersion: 0
123
119
  });
@@ -138,7 +134,10 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
138
134
  r.state = r.lastSnap;
139
135
  }
140
136
  if (cascadeOnChange && !themeProviderParents.has(r.id)) registerThemeProviderChain(r.id, r.parentId, r.props);
141
- if (r.unsubscribe && r.subscribedTo !== r.parentId) cleanupThemeSubscription(r);
137
+ if (r.unsubscribe && r.subscribedTo !== r.parentId) {
138
+ var _r_unsubscribe;
139
+ (_r_unsubscribe = r.unsubscribe) === null || _r_unsubscribe === void 0 || _r_unsubscribe.call(r);
140
+ }
142
141
  if (shouldSubscribeToTheme(r, cascadeOnChange)) {
143
142
  if (!r.unsubscribe) {
144
143
  var _listenersByParent, _pid;
@@ -171,7 +170,10 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
171
170
  r.subscribedTo = void 0;
172
171
  };
173
172
  }
174
- } else if (r.unsubscribe) cleanupThemeSubscription(r);
173
+ } else if (r.unsubscribe) {
174
+ var _r_unsubscribe1;
175
+ (_r_unsubscribe1 = r.unsubscribe) === null || _r_unsubscribe1 === void 0 || _r_unsubscribe1.call(r);
176
+ }
175
177
  return function() {
176
178
  if (r.renderVersion === renderVersion) cleanupThemeState(r);
177
179
  };
@@ -195,12 +197,8 @@ var shouldSubscribeToTheme = function(r, cascadeOnChange) {
195
197
  var _r_keys_current, _r_props_needsUpdate, _r_props;
196
198
  return Boolean(r.optimizeForFirstRender || r.isRoot || cascadeOnChange || hasThemeUpdatingProps(r.props) || ((_r_keys_current = r.keys.current) === null || _r_keys_current === void 0 ? void 0 : _r_keys_current.size) || ((_r_props_needsUpdate = (_r_props = r.props).needsUpdate) === null || _r_props_needsUpdate === void 0 ? void 0 : _r_props_needsUpdate.call(_r_props)));
197
199
  };
198
- function cleanupThemeSubscription(r) {
199
- var _r_unsubscribe;
200
- (_r_unsubscribe = r.unsubscribe) === null || _r_unsubscribe === void 0 || _r_unsubscribe.call(r);
201
- }
202
200
  function cleanupThemeState(r) {
203
- if (r.unsubscribe) cleanupThemeSubscription(r);
201
+ if (r.unsubscribe) r.unsubscribe();
204
202
  else {
205
203
  r.state = void 0;
206
204
  states.delete(r.id);
@@ -211,15 +209,15 @@ function cleanupThemeState(r) {
211
209
  }
212
210
  var getSnapshotImpl = function(r) {
213
211
  var _keys_current, _schemeKeys_current, _keys_current1, _props_needsUpdate;
214
- var { id, parentId, props, propsKey, isRoot, keys, schemeKeys, optimizeForFirstRender } = r;
212
+ var { id, parentId, props, propsKey, isRoot, keys, optimizeForFirstRender } = r;
213
+ var schemeKeys = r.schemeKeys;
215
214
  var local = r.state;
216
215
  var parentState = states.get(parentId);
217
216
  if (local && !PendingUpdate.has(id)) {
218
217
  if (parentState && local._parentName === parentState.name && local._parentSchemeAuthored === parentState.schemeAuthored && local._propsKey === propsKey) return local;
219
218
  }
220
219
  var isSchemeOnlyChange = !optimizeForFirstRender && import_constants.supportsDynamicColorIOS && (0, import_config.getSetting)("fastSchemeChange") && local && parentState && local.scheme !== parentState.scheme && getThemeBaseName(local.name) === getThemeBaseName(parentState.name);
221
- var allKeysSchemeOptimized = !optimizeForFirstRender && Boolean(((_keys_current = keys.current) === null || _keys_current === void 0 ? void 0 : _keys_current.size) && (schemeKeys === null || schemeKeys === void 0 ? void 0 : (_schemeKeys_current = schemeKeys.current) === null || _schemeKeys_current === void 0 ? void 0 : _schemeKeys_current.size) === keys.current.size);
222
- var canSkipForSchemeChange = Boolean(isSchemeOnlyChange && allKeysSchemeOptimized);
220
+ var canSkipForSchemeChange = Boolean(isSchemeOnlyChange && ((_keys_current = keys.current) === null || _keys_current === void 0 ? void 0 : _keys_current.size) && (schemeKeys === null || schemeKeys === void 0 ? void 0 : (_schemeKeys_current = schemeKeys.current) === null || _schemeKeys_current === void 0 ? void 0 : _schemeKeys_current.size) === keys.current.size);
223
221
  var needsUpdate = props.passThrough ? false : optimizeForFirstRender ? true : isRoot || props.forceClassName || props.name === "light" || props.name === "dark" || props.name === null ? true : !HasRenderedOnce.get(keys) ? true : canSkipForSchemeChange ? false : (keys === null || keys === void 0 ? void 0 : (_keys_current1 = keys.current) === null || _keys_current1 === void 0 ? void 0 : _keys_current1.size) ? true : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props);
224
222
  var [rerender, nextRaw] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
225
223
  var next = nextRaw;
@@ -278,7 +276,7 @@ var getNextState = function(lastState, props, propsKey) {
278
276
  if (shouldRerender) return [true, { ...parentState || lastState || next }];
279
277
  return [false, next];
280
278
  }
281
- var scheme = (0, import_helpers.getThemeScheme)(resolvedName);
279
+ var scheme = (0, import_themes.getAuthoredThemeScheme)(themes[resolvedName]) || (0, import_helpers.getThemeScheme)(resolvedName);
282
280
  var _parentState_inverses;
283
281
  var parentInverses = (_parentState_inverses = parentState === null || parentState === void 0 ? void 0 : parentState.inverses) !== null && _parentState_inverses !== void 0 ? _parentState_inverses : 0;
284
282
  var isInverse = Boolean(parentState && scheme !== parentState.scheme);
@@ -368,10 +366,6 @@ function resolveThemeName(parentName, name, themes2) {
368
366
  if (!forceUpdate && found === parentName && found !== "light" && found !== "dark") return null;
369
367
  return found;
370
368
  }
371
- var getPropsKey = function(param) {
372
- var { name, forceClassName, _themeUpdate } = param;
373
- return `${name || ""}${forceClassName || ""}${(_themeUpdate === null || _themeUpdate === void 0 ? void 0 : _themeUpdate.key) || ""}`;
374
- };
375
369
  var hasThemeUpdatingProps = function(props) {
376
370
  return "name" in props || "forceClassName" in props || "_themeUpdate" in props;
377
371
  };
@@ -41,6 +41,7 @@ var import_react = require("react");
41
41
  var import_helpers = require("@tamagui/helpers");
42
42
  var import_config = require("../config.native.js");
43
43
  var import_constants2 = require("../constants/constants.native.js");
44
+ var import_themes = require("../helpers/themes.native.js");
44
45
  var ThemeStateContext = (0, import_react.createContext)("");
45
46
  var allListeners = /* @__PURE__ */ new Map();
46
47
  var listenersByParent = {};
@@ -96,6 +97,7 @@ var incReducer = function(c) {
96
97
  var useThemeState = function(props) {
97
98
  "use no memo";
98
99
  var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, keys = arguments.length > 2 ? arguments[2] : void 0, schemeKeys = arguments.length > 3 ? arguments[3] : void 0, cascadeOnChange = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, optimizeForFirstRender = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
100
+ var _props__themeUpdate;
99
101
  var _ref;
100
102
  var { disable } = props;
101
103
  var parentId = (0, import_react.useContext)(ThemeStateContext);
@@ -108,16 +110,10 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
108
110
  theme: (0, import_config.getConfig)().themes.light
109
111
  };
110
112
  var id = (0, import_react.useId)();
111
- var propsKey = getPropsKey(props);
113
+ var propsKey = `${props.name || ""}${props.forceClassName || ""}${((_props__themeUpdate = props._themeUpdate) === null || _props__themeUpdate === void 0 ? void 0 : _props__themeUpdate.key) || ""}`;
112
114
  if (cascadeOnChange) registerThemeProviderChain(id, parentId, props);
113
115
  var r = (_ref = (0, import_react.useRef)(null)).current || (_ref.current = {
114
116
  id,
115
- parentId,
116
- props,
117
- propsKey,
118
- isRoot,
119
- keys,
120
- schemeKeys,
121
117
  optimizeForFirstRender,
122
118
  renderVersion: 0
123
119
  });
@@ -138,7 +134,10 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
138
134
  r.state = r.lastSnap;
139
135
  }
140
136
  if (cascadeOnChange && !themeProviderParents.has(r.id)) registerThemeProviderChain(r.id, r.parentId, r.props);
141
- if (r.unsubscribe && r.subscribedTo !== r.parentId) cleanupThemeSubscription(r);
137
+ if (r.unsubscribe && r.subscribedTo !== r.parentId) {
138
+ var _r_unsubscribe;
139
+ (_r_unsubscribe = r.unsubscribe) === null || _r_unsubscribe === void 0 || _r_unsubscribe.call(r);
140
+ }
142
141
  if (shouldSubscribeToTheme(r, cascadeOnChange)) {
143
142
  if (!r.unsubscribe) {
144
143
  var _listenersByParent, _pid;
@@ -171,7 +170,10 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
171
170
  r.subscribedTo = void 0;
172
171
  };
173
172
  }
174
- } else if (r.unsubscribe) cleanupThemeSubscription(r);
173
+ } else if (r.unsubscribe) {
174
+ var _r_unsubscribe1;
175
+ (_r_unsubscribe1 = r.unsubscribe) === null || _r_unsubscribe1 === void 0 || _r_unsubscribe1.call(r);
176
+ }
175
177
  return function() {
176
178
  if (r.renderVersion === renderVersion) cleanupThemeState(r);
177
179
  };
@@ -195,12 +197,8 @@ var shouldSubscribeToTheme = function(r, cascadeOnChange) {
195
197
  var _r_keys_current, _r_props_needsUpdate, _r_props;
196
198
  return Boolean(r.optimizeForFirstRender || r.isRoot || cascadeOnChange || hasThemeUpdatingProps(r.props) || ((_r_keys_current = r.keys.current) === null || _r_keys_current === void 0 ? void 0 : _r_keys_current.size) || ((_r_props_needsUpdate = (_r_props = r.props).needsUpdate) === null || _r_props_needsUpdate === void 0 ? void 0 : _r_props_needsUpdate.call(_r_props)));
197
199
  };
198
- function cleanupThemeSubscription(r) {
199
- var _r_unsubscribe;
200
- (_r_unsubscribe = r.unsubscribe) === null || _r_unsubscribe === void 0 || _r_unsubscribe.call(r);
201
- }
202
200
  function cleanupThemeState(r) {
203
- if (r.unsubscribe) cleanupThemeSubscription(r);
201
+ if (r.unsubscribe) r.unsubscribe();
204
202
  else {
205
203
  r.state = void 0;
206
204
  states.delete(r.id);
@@ -211,15 +209,15 @@ function cleanupThemeState(r) {
211
209
  }
212
210
  var getSnapshotImpl = function(r) {
213
211
  var _keys_current, _schemeKeys_current, _keys_current1, _props_needsUpdate;
214
- var { id, parentId, props, propsKey, isRoot, keys, schemeKeys, optimizeForFirstRender } = r;
212
+ var { id, parentId, props, propsKey, isRoot, keys, optimizeForFirstRender } = r;
213
+ var schemeKeys = r.schemeKeys;
215
214
  var local = r.state;
216
215
  var parentState = states.get(parentId);
217
216
  if (local && !PendingUpdate.has(id)) {
218
217
  if (parentState && local._parentName === parentState.name && local._parentSchemeAuthored === parentState.schemeAuthored && local._propsKey === propsKey) return local;
219
218
  }
220
219
  var isSchemeOnlyChange = !optimizeForFirstRender && import_constants.supportsDynamicColorIOS && (0, import_config.getSetting)("fastSchemeChange") && local && parentState && local.scheme !== parentState.scheme && getThemeBaseName(local.name) === getThemeBaseName(parentState.name);
221
- var allKeysSchemeOptimized = !optimizeForFirstRender && Boolean(((_keys_current = keys.current) === null || _keys_current === void 0 ? void 0 : _keys_current.size) && (schemeKeys === null || schemeKeys === void 0 ? void 0 : (_schemeKeys_current = schemeKeys.current) === null || _schemeKeys_current === void 0 ? void 0 : _schemeKeys_current.size) === keys.current.size);
222
- var canSkipForSchemeChange = Boolean(isSchemeOnlyChange && allKeysSchemeOptimized);
220
+ var canSkipForSchemeChange = Boolean(isSchemeOnlyChange && ((_keys_current = keys.current) === null || _keys_current === void 0 ? void 0 : _keys_current.size) && (schemeKeys === null || schemeKeys === void 0 ? void 0 : (_schemeKeys_current = schemeKeys.current) === null || _schemeKeys_current === void 0 ? void 0 : _schemeKeys_current.size) === keys.current.size);
223
221
  var needsUpdate = props.passThrough ? false : optimizeForFirstRender ? true : isRoot || props.forceClassName || props.name === "light" || props.name === "dark" || props.name === null ? true : !HasRenderedOnce.get(keys) ? true : canSkipForSchemeChange ? false : (keys === null || keys === void 0 ? void 0 : (_keys_current1 = keys.current) === null || _keys_current1 === void 0 ? void 0 : _keys_current1.size) ? true : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props);
224
222
  var [rerender, nextRaw] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
225
223
  var next = nextRaw;
@@ -278,7 +276,7 @@ var getNextState = function(lastState, props, propsKey) {
278
276
  if (shouldRerender) return [true, { ...parentState || lastState || next }];
279
277
  return [false, next];
280
278
  }
281
- var scheme = (0, import_helpers.getThemeScheme)(resolvedName);
279
+ var scheme = (0, import_themes.getAuthoredThemeScheme)(themes[resolvedName]) || (0, import_helpers.getThemeScheme)(resolvedName);
282
280
  var _parentState_inverses;
283
281
  var parentInverses = (_parentState_inverses = parentState === null || parentState === void 0 ? void 0 : parentState.inverses) !== null && _parentState_inverses !== void 0 ? _parentState_inverses : 0;
284
282
  var isInverse = Boolean(parentState && scheme !== parentState.scheme);
@@ -368,10 +366,6 @@ function resolveThemeName(parentName, name, themes2) {
368
366
  if (!forceUpdate && found === parentName && found !== "light" && found !== "dark") return null;
369
367
  return found;
370
368
  }
371
- var getPropsKey = function(param) {
372
- var { name, forceClassName, _themeUpdate } = param;
373
- return `${name || ""}${forceClassName || ""}${(_themeUpdate === null || _themeUpdate === void 0 ? void 0 : _themeUpdate.key) || ""}`;
374
- };
375
369
  var hasThemeUpdatingProps = function(props) {
376
370
  return "name" in props || "forceClassName" in props || "_themeUpdate" in props;
377
371
  };