@tamagui/web 3.0.12 → 3.0.14

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 (43) hide show
  1. package/dist/cjs/_withNativeStyle.cjs +7 -5
  2. package/dist/cjs/_withNativeStyle.native.cjs +8 -5
  3. package/dist/cjs/_withNativeStyle.native.js +8 -5
  4. package/dist/cjs/_withNativeStyle.native.js.map +1 -1
  5. package/dist/cjs/helpers/getSplitStyles.cjs +3 -2
  6. package/dist/cjs/helpers/getSplitStyles.native.cjs +5 -3
  7. package/dist/cjs/helpers/getSplitStyles.native.js +5 -3
  8. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  9. package/dist/cjs/helpers/styledDynamic.cjs +1 -4
  10. package/dist/cjs/helpers/styledDynamic.native.cjs +2 -4
  11. package/dist/cjs/helpers/styledDynamic.native.js +2 -4
  12. package/dist/cjs/helpers/styledDynamic.native.js.map +1 -1
  13. package/dist/cjs/hooks/useThemeState.cjs +12 -5
  14. package/dist/cjs/hooks/useThemeState.native.cjs +16 -5
  15. package/dist/cjs/hooks/useThemeState.native.js +16 -5
  16. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  17. package/dist/esm/_withNativeStyle.mjs +8 -6
  18. package/dist/esm/_withNativeStyle.mjs.map +1 -1
  19. package/dist/esm/_withNativeStyle.native.js +9 -6
  20. package/dist/esm/_withNativeStyle.native.js.map +1 -1
  21. package/dist/esm/helpers/getSplitStyles.mjs +3 -2
  22. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  23. package/dist/esm/helpers/getSplitStyles.native.js +5 -3
  24. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  25. package/dist/esm/helpers/styledDynamic.mjs +1 -4
  26. package/dist/esm/helpers/styledDynamic.mjs.map +1 -1
  27. package/dist/esm/helpers/styledDynamic.native.js +2 -4
  28. package/dist/esm/helpers/styledDynamic.native.js.map +1 -1
  29. package/dist/esm/hooks/useThemeState.mjs +12 -6
  30. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  31. package/dist/esm/hooks/useThemeState.native.js +16 -6
  32. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  33. package/package.json +17 -17
  34. package/src/_withNativeStyle.tsx +14 -7
  35. package/src/helpers/getSplitStyles.tsx +8 -3
  36. package/src/helpers/styledDynamic.ts +3 -5
  37. package/src/hooks/useThemeState.ts +17 -6
  38. package/types/_withNativeStyle.d.ts.map +1 -1
  39. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  40. package/types/helpers/styledDynamic.d.ts +3 -1
  41. package/types/helpers/styledDynamic.d.ts.map +1 -1
  42. package/types/hooks/useThemeState.d.ts +1 -0
  43. package/types/hooks/useThemeState.d.ts.map +1 -1
@@ -51,7 +51,7 @@ const _withNativeStyle = (Component, baseStyle, themeStyleKeys, host) => {
51
51
  ...baseStyle,
52
52
  ...typeof baseStyle.fontWeight === "number" && { fontWeight: String(baseStyle.fontWeight) }
53
53
  } : baseStyle;
54
- const entries = /* @__PURE__ */ new Map();
54
+ const entries = /* @__PURE__ */ new WeakMap();
55
55
  const createEntry = () => {
56
56
  const entry = {
57
57
  style: [baseStyle, null],
@@ -70,6 +70,7 @@ const _withNativeStyle = (Component, baseStyle, themeStyleKeys, host) => {
70
70
  const ScopeContext = import_useThemeState.ThemeStateContext;
71
71
  const engineOf = import_nativeStyleEngine.getNativeStyleEngine;
72
72
  const scopeState = import_useThemeState.getThemeState;
73
+ const scopeOwner = import_useThemeState.getThemeProviderScope;
73
74
  const resolve = import_nativeStyleEngine.resolveNativeStyleMapping;
74
75
  const linkState = import_nativeStyleEngine.createNativeStyleLinkState;
75
76
  const linkHost = import_nativeStyleEngine.linkNativeStyleHost;
@@ -81,8 +82,9 @@ const _withNativeStyle = (Component, baseStyle, themeStyleKeys, host) => {
81
82
  const scopeId = (0, import_react.use)(ScopeContext);
82
83
  const inText = TextAncestor ? (0, import_react.use)(TextAncestor) : false;
83
84
  const themeState = scopeId && engineOf() ? scopeState(scopeId) : void 0;
85
+ const owner = scopeOwner(scopeId);
84
86
  const resetsText = inText && host === "view";
85
- if (!themeState) {
87
+ if (!themeState || !owner) {
86
88
  return resetsText ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextAncestorProvider, {
87
89
  value: false,
88
90
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fallback, { ...props })
@@ -97,10 +99,10 @@ const _withNativeStyle = (Component, baseStyle, themeStyleKeys, host) => {
97
99
  const { name, theme } = themeState;
98
100
  const asHostText = HostText && !inText;
99
101
  const Rendered = asHostText ? HostText : Component;
100
- let entry = entries.get(scopeId);
102
+ let entry = entries.get(owner);
101
103
  if (!entry) {
102
104
  entry = createEntry();
103
- entries.set(scopeId, entry);
105
+ entries.set(owner, entry);
104
106
  }
105
107
  if (entry.stateName !== name || entry.theme !== theme) {
106
108
  const themed = resolve(themeStyleKeys, name, theme);
@@ -136,7 +138,7 @@ const _withNativeStyle = (Component, baseStyle, themeStyleKeys, host) => {
136
138
  }, key);
137
139
  };
138
140
  const NativeStyleView = (props) => render(props);
139
- NativeStyleView.inline = (element) => render(element.props, element.key);
141
+ NativeStyleView.inline = (element) => render(element.props, element.key ?? void 0);
140
142
  return NativeStyleView;
141
143
  };
142
144
  function omitRef(props) {
@@ -61,7 +61,7 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
61
61
  ...baseStyle,
62
62
  ...typeof baseStyle.fontWeight === "number" && { fontWeight: String(baseStyle.fontWeight) }
63
63
  } : baseStyle;
64
- var entries = /* @__PURE__ */ new Map();
64
+ var entries = /* @__PURE__ */ new WeakMap();
65
65
  var createEntry = function createEntry2() {
66
66
  var entry = {
67
67
  style: [baseStyle, null],
@@ -80,6 +80,7 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
80
80
  var ScopeContext = import_useThemeState.ThemeStateContext;
81
81
  var engineOf = import_nativeStyleEngine.getNativeStyleEngine;
82
82
  var scopeState = import_useThemeState.getThemeState;
83
+ var scopeOwner = import_useThemeState.getThemeProviderScope;
83
84
  var resolve = import_nativeStyleEngine.resolveNativeStyleMapping;
84
85
  var linkState = import_nativeStyleEngine.createNativeStyleLinkState;
85
86
  var linkHost = import_nativeStyleEngine.linkNativeStyleHost;
@@ -91,8 +92,9 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
91
92
  var scopeId = (0, import_react.use)(ScopeContext);
92
93
  var inText = TextAncestor ? (0, import_react.use)(TextAncestor) : false;
93
94
  var themeState = scopeId && engineOf() ? scopeState(scopeId) : void 0;
95
+ var owner = scopeOwner(scopeId);
94
96
  var resetsText = inText && host === "view";
95
- if (!themeState) {
97
+ if (!themeState || !owner) {
96
98
  return resetsText ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextAncestorProvider, {
97
99
  value: false,
98
100
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fallback, { ...props })
@@ -107,10 +109,10 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
107
109
  var { name, theme } = themeState;
108
110
  var asHostText = HostText && !inText;
109
111
  var Rendered = asHostText ? HostText : Component;
110
- var entry = entries.get(scopeId);
112
+ var entry = entries.get(owner);
111
113
  if (!entry) {
112
114
  entry = createEntry();
113
- entries.set(scopeId, entry);
115
+ entries.set(owner, entry);
114
116
  }
115
117
  if (entry.stateName !== name || entry.theme !== theme) {
116
118
  var themed = resolve(themeStyleKeys, name, theme);
@@ -149,7 +151,8 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
149
151
  return render(props);
150
152
  };
151
153
  NativeStyleView.inline = function(element) {
152
- return render(element.props, element.key);
154
+ var _element_key;
155
+ return render(element.props, (_element_key = element.key) !== null && _element_key !== void 0 ? _element_key : void 0);
153
156
  };
154
157
  return NativeStyleView;
155
158
  };
@@ -61,7 +61,7 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
61
61
  ...baseStyle,
62
62
  ...typeof baseStyle.fontWeight === "number" && { fontWeight: String(baseStyle.fontWeight) }
63
63
  } : baseStyle;
64
- var entries = /* @__PURE__ */ new Map();
64
+ var entries = /* @__PURE__ */ new WeakMap();
65
65
  var createEntry = function createEntry2() {
66
66
  var entry = {
67
67
  style: [baseStyle, null],
@@ -80,6 +80,7 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
80
80
  var ScopeContext = import_useThemeState.ThemeStateContext;
81
81
  var engineOf = import_nativeStyleEngine.getNativeStyleEngine;
82
82
  var scopeState = import_useThemeState.getThemeState;
83
+ var scopeOwner = import_useThemeState.getThemeProviderScope;
83
84
  var resolve = import_nativeStyleEngine.resolveNativeStyleMapping;
84
85
  var linkState = import_nativeStyleEngine.createNativeStyleLinkState;
85
86
  var linkHost = import_nativeStyleEngine.linkNativeStyleHost;
@@ -91,8 +92,9 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
91
92
  var scopeId = (0, import_react.use)(ScopeContext);
92
93
  var inText = TextAncestor ? (0, import_react.use)(TextAncestor) : false;
93
94
  var themeState = scopeId && engineOf() ? scopeState(scopeId) : void 0;
95
+ var owner = scopeOwner(scopeId);
94
96
  var resetsText = inText && host === "view";
95
- if (!themeState) {
97
+ if (!themeState || !owner) {
96
98
  return resetsText ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextAncestorProvider, {
97
99
  value: false,
98
100
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fallback, { ...props })
@@ -107,10 +109,10 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
107
109
  var { name, theme } = themeState;
108
110
  var asHostText = HostText && !inText;
109
111
  var Rendered = asHostText ? HostText : Component;
110
- var entry = entries.get(scopeId);
112
+ var entry = entries.get(owner);
111
113
  if (!entry) {
112
114
  entry = createEntry();
113
- entries.set(scopeId, entry);
115
+ entries.set(owner, entry);
114
116
  }
115
117
  if (entry.stateName !== name || entry.theme !== theme) {
116
118
  var themed = resolve(themeStyleKeys, name, theme);
@@ -149,7 +151,8 @@ var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeSty
149
151
  return render(props);
150
152
  };
151
153
  NativeStyleView.inline = function(element) {
152
- return render(element.props, element.key);
154
+ var _element_key;
155
+ return render(element.props, (_element_key = element.key) !== null && _element_key !== void 0 ? _element_key : void 0);
153
156
  };
154
157
  return NativeStyleView;
155
158
  };
@@ -1 +1 @@
1
- {"version":3,"file":"_withNativeStyle.native.js","names":[],"sources":["cjs/_withNativeStyle.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar withNativeStyle_exports = {};\n__export(withNativeStyle_exports, {\n _withNativeStyle: () => _withNativeStyle\n});\nmodule.exports = __toCommonJS(withNativeStyle_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_withStableStyle = require(\"./_withStableStyle\");\nvar import_nativeStyleEngine = require(\"./helpers/nativeStyleEngine\");\nvar import_useThemeState = require(\"./hooks/useThemeState\");\nvar import_setupHooks = require(\"./setupHooks\");\nvar hostTextProps = {\n accessible: import_constants.isAndroid ? false : import_constants.isIos ? true : void 0,\n allowFontScaling: true,\n ellipsizeMode: \"tail\"\n};\nvar _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeStyleKeys, host) {\n var _hooks_getBaseViews;\n var Fallback = (0, import_withStableStyle._withStableStyle)(Component, function(theme) {\n var themedStyle = {};\n for (var styleKey in themeStyleKeys) {\n var _theme_themeStyleKeys_styleKey;\n themedStyle[styleKey] = (_theme_themeStyleKeys_styleKey = theme[themeStyleKeys[styleKey]]) === null || _theme_themeStyleKeys_styleKey === void 0 ? void 0 : _theme_themeStyleKeys_styleKey.get();\n }\n return [\n baseStyle,\n themedStyle\n ];\n }, true, false);\n var baseViews = host ? (_hooks_getBaseViews = import_setupHooks.hooks.getBaseViews) === null || _hooks_getBaseViews === void 0 ? void 0 : _hooks_getBaseViews.call(import_setupHooks.hooks) : void 0;\n var TextAncestor = baseViews === null || baseViews === void 0 ? void 0 : baseViews.TextAncestor;\n var TextAncestorProvider = TextAncestor === null || TextAncestor === void 0 ? void 0 : TextAncestor.Provider;\n var HostText = host === \"text\" && !(\"userSelect\" in baseStyle) && !(\"verticalAlign\" in baseStyle) ? baseViews === null || baseViews === void 0 ? void 0 : baseViews.NativeText : void 0;\n var hostTextBase = HostText ? {\n overflow: \"hidden\",\n ...baseStyle,\n ...typeof baseStyle.fontWeight === \"number\" && {\n fontWeight: String(baseStyle.fontWeight)\n }\n } : baseStyle;\n var entries = /* @__PURE__ */ new Map();\n var createEntry = function createEntry2() {\n var entry = {\n style: [\n baseStyle,\n null\n ],\n hostTextStyle: [\n hostTextBase,\n null\n ],\n stateName: \"\",\n theme: null,\n state: null,\n ref: function ref(node) {\n if (!node) return;\n captureRoot(node);\n linkHost(node, entry.state);\n }\n };\n return entry;\n };\n var ScopeContext = import_useThemeState.ThemeStateContext;\n var engineOf = import_nativeStyleEngine.getNativeStyleEngine;\n var scopeState = import_useThemeState.getThemeState;\n var resolve = import_nativeStyleEngine.resolveNativeStyleMapping;\n var linkState = import_nativeStyleEngine.createNativeStyleLinkState;\n var linkHost = import_nativeStyleEngine.linkNativeStyleHost;\n var registerStyle = import_nativeStyleEngine.registerNativeStyle;\n var mountMode = import_nativeStyleEngine.nativeStyleMountMode;\n var captureRoot = import_nativeStyleEngine.captureNativeStyleRoot;\n var assignRef = import_compose_refs.setRef;\n var render = function render2(props, key) {\n var scopeId = (0, import_react.use)(ScopeContext);\n var inText = TextAncestor ? (0, import_react.use)(TextAncestor) : false;\n var themeState = scopeId && engineOf() ? scopeState(scopeId) : void 0;\n var resetsText = inText && host === \"view\";\n if (!themeState) {\n return resetsText ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextAncestorProvider, {\n value: false,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fallback, {\n ...props\n })\n }, key) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fallback, {\n ...props\n }, key);\n }\n var rest = props;\n if (props._expressions !== void 0) {\n var { _expressions: _ignoredExpressions, ...withoutExpressions } = props;\n rest = withoutExpressions;\n }\n var ref = props.ref;\n var { name, theme } = themeState;\n var asHostText = HostText && !inText;\n var Rendered = asHostText ? HostText : Component;\n var entry = entries.get(scopeId);\n if (!entry) {\n entry = createEntry();\n entries.set(scopeId, entry);\n }\n if (entry.stateName !== name || entry.theme !== theme) {\n var themed = resolve(themeStyleKeys, name, theme);\n entry.style = [\n baseStyle,\n themed\n ];\n entry.hostTextStyle = [\n hostTextBase,\n themed\n ];\n entry.stateName = name;\n entry.theme = theme;\n entry.state = linkState(themeStyleKeys, scopeId, name, theme);\n registerStyle(entry.style, entry.state);\n registerStyle(entry.hostTextStyle, entry.state);\n }\n var style = asHostText ? entry.hostTextStyle : entry.style;\n var wrapped = resetsText || asHostText && mayRenderText(rest.children);\n var state = entry.state;\n var discover = mountMode() === \"discover\";\n var passedRef = discover ? ref !== null && ref !== void 0 ? ref : null : ref == null ? entry.ref : function(node) {\n if (!node) return assignRef(ref, null);\n captureRoot(node);\n linkHost(node, state);\n if (typeof ref === \"function\") return ref(node);\n assignRef(ref, node);\n };\n var element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Rendered, {\n ...asHostText && hostTextProps,\n ...passedRef == null ? omitRef(rest) : rest,\n ...passedRef != null ? {\n ref: passedRef\n } : null,\n style\n }, wrapped ? void 0 : key);\n if (!wrapped) return element;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextAncestorProvider, {\n value: !resetsText,\n children: element\n }, key);\n };\n var NativeStyleView = function NativeStyleView2(props) {\n return render(props);\n };\n NativeStyleView.inline = function(element) {\n return render(element.props, element.key);\n };\n return NativeStyleView;\n};\nfunction omitRef(props) {\n if (!Object.prototype.hasOwnProperty.call(props, \"ref\")) return props;\n var { ref: _ref, ...rest } = props;\n return rest;\n}\nfunction mayRenderText(children) {\n if (children == null) return false;\n if (Array.isArray(children) && children.length <= 3) {\n return children.some(function(child) {\n return child != null && typeof child === \"object\";\n });\n }\n return typeof children === \"object\";\n}\n//# sourceMappingURL=_withNativeStyle.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,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,Q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AO;CAC7B,IAAI,MAAM,QAAQ,QAAQ,KAAK,SAAS,UAAU,GAAG;EACnD,OAAO,SAAS,KAAK,SAAS,OAAO;GACnC,OAAO,SAAS,QAAQ,OAAO,UAAU;EAC3C,CAAC;CACH;CACA,OAAO,OAAO,aAAa;AAC7B"}
1
+ {"version":3,"file":"_withNativeStyle.native.js","names":[],"sources":["cjs/_withNativeStyle.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar withNativeStyle_exports = {};\n__export(withNativeStyle_exports, {\n _withNativeStyle: () => _withNativeStyle\n});\nmodule.exports = __toCommonJS(withNativeStyle_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_withStableStyle = require(\"./_withStableStyle\");\nvar import_nativeStyleEngine = require(\"./helpers/nativeStyleEngine\");\nvar import_useThemeState = require(\"./hooks/useThemeState\");\nvar import_setupHooks = require(\"./setupHooks\");\nvar hostTextProps = {\n accessible: import_constants.isAndroid ? false : import_constants.isIos ? true : void 0,\n allowFontScaling: true,\n ellipsizeMode: \"tail\"\n};\nvar _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeStyleKeys, host) {\n var _hooks_getBaseViews;\n var Fallback = (0, import_withStableStyle._withStableStyle)(Component, function(theme) {\n var themedStyle = {};\n for (var styleKey in themeStyleKeys) {\n var _theme_themeStyleKeys_styleKey;\n themedStyle[styleKey] = (_theme_themeStyleKeys_styleKey = theme[themeStyleKeys[styleKey]]) === null || _theme_themeStyleKeys_styleKey === void 0 ? void 0 : _theme_themeStyleKeys_styleKey.get();\n }\n return [\n baseStyle,\n themedStyle\n ];\n }, true, false);\n var baseViews = host ? (_hooks_getBaseViews = import_setupHooks.hooks.getBaseViews) === null || _hooks_getBaseViews === void 0 ? void 0 : _hooks_getBaseViews.call(import_setupHooks.hooks) : void 0;\n var TextAncestor = baseViews === null || baseViews === void 0 ? void 0 : baseViews.TextAncestor;\n var TextAncestorProvider = TextAncestor === null || TextAncestor === void 0 ? void 0 : TextAncestor.Provider;\n var HostText = host === \"text\" && !(\"userSelect\" in baseStyle) && !(\"verticalAlign\" in baseStyle) ? baseViews === null || baseViews === void 0 ? void 0 : baseViews.NativeText : void 0;\n var hostTextBase = HostText ? {\n overflow: \"hidden\",\n ...baseStyle,\n ...typeof baseStyle.fontWeight === \"number\" && {\n fontWeight: String(baseStyle.fontWeight)\n }\n } : baseStyle;\n var entries = /* @__PURE__ */ new WeakMap();\n var createEntry = function createEntry2() {\n var entry = {\n style: [\n baseStyle,\n null\n ],\n hostTextStyle: [\n hostTextBase,\n null\n ],\n stateName: \"\",\n theme: null,\n state: null,\n ref: function ref(node) {\n if (!node) return;\n captureRoot(node);\n linkHost(node, entry.state);\n }\n };\n return entry;\n };\n var ScopeContext = import_useThemeState.ThemeStateContext;\n var engineOf = import_nativeStyleEngine.getNativeStyleEngine;\n var scopeState = import_useThemeState.getThemeState;\n var scopeOwner = import_useThemeState.getThemeProviderScope;\n var resolve = import_nativeStyleEngine.resolveNativeStyleMapping;\n var linkState = import_nativeStyleEngine.createNativeStyleLinkState;\n var linkHost = import_nativeStyleEngine.linkNativeStyleHost;\n var registerStyle = import_nativeStyleEngine.registerNativeStyle;\n var mountMode = import_nativeStyleEngine.nativeStyleMountMode;\n var captureRoot = import_nativeStyleEngine.captureNativeStyleRoot;\n var assignRef = import_compose_refs.setRef;\n var render = function render2(props, key) {\n var scopeId = (0, import_react.use)(ScopeContext);\n var inText = TextAncestor ? (0, import_react.use)(TextAncestor) : false;\n var themeState = scopeId && engineOf() ? scopeState(scopeId) : void 0;\n var owner = scopeOwner(scopeId);\n var resetsText = inText && host === \"view\";\n if (!themeState || !owner) {\n return resetsText ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextAncestorProvider, {\n value: false,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fallback, {\n ...props\n })\n }, key) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fallback, {\n ...props\n }, key);\n }\n var rest = props;\n if (props._expressions !== void 0) {\n var { _expressions: _ignoredExpressions, ...withoutExpressions } = props;\n rest = withoutExpressions;\n }\n var ref = props.ref;\n var { name, theme } = themeState;\n var asHostText = HostText && !inText;\n var Rendered = asHostText ? HostText : Component;\n var entry = entries.get(owner);\n if (!entry) {\n entry = createEntry();\n entries.set(owner, entry);\n }\n if (entry.stateName !== name || entry.theme !== theme) {\n var themed = resolve(themeStyleKeys, name, theme);\n entry.style = [\n baseStyle,\n themed\n ];\n entry.hostTextStyle = [\n hostTextBase,\n themed\n ];\n entry.stateName = name;\n entry.theme = theme;\n entry.state = linkState(themeStyleKeys, scopeId, name, theme);\n registerStyle(entry.style, entry.state);\n registerStyle(entry.hostTextStyle, entry.state);\n }\n var style = asHostText ? entry.hostTextStyle : entry.style;\n var wrapped = resetsText || asHostText && mayRenderText(rest.children);\n var state = entry.state;\n var discover = mountMode() === \"discover\";\n var passedRef = discover ? ref !== null && ref !== void 0 ? ref : null : ref == null ? entry.ref : function(node) {\n if (!node) return assignRef(ref, null);\n captureRoot(node);\n linkHost(node, state);\n if (typeof ref === \"function\") return ref(node);\n assignRef(ref, node);\n };\n var element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Rendered, {\n ...asHostText && hostTextProps,\n ...passedRef == null ? omitRef(rest) : rest,\n ...passedRef != null ? {\n ref: passedRef\n } : null,\n style\n }, wrapped ? void 0 : key);\n if (!wrapped) return element;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextAncestorProvider, {\n value: !resetsText,\n children: element\n }, key);\n };\n var NativeStyleView = function NativeStyleView2(props) {\n return render(props);\n };\n NativeStyleView.inline = function(element) {\n var _element_key;\n return render(element.props, (_element_key = element.key) !== null && _element_key !== void 0 ? _element_key : void 0);\n };\n return NativeStyleView;\n};\nfunction omitRef(props) {\n if (!Object.prototype.hasOwnProperty.call(props, \"ref\")) return props;\n var { ref: _ref, ...rest } = props;\n return rest;\n}\nfunction mayRenderText(children) {\n if (children == null) return false;\n if (Array.isArray(children) && children.length <= 3) {\n return children.some(function(child) {\n return child != null && typeof child === \"object\";\n });\n }\n return typeof children === \"object\";\n}\n//# sourceMappingURL=_withNativeStyle.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,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,I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AC,OAAO,UAAU,eAAe,KAAK,OAAO,KAAK,GAAG,OAAO;CAChE,IAAI,EAAE,KAAK,MAAM,GAAG,SAAS;CAC7B,OAAO;AACT;AACA,SAAS,cAAc,UAAU;CAC/B,IAAI,YAAY,MAAM,OAAO;CAC7B,IAAI,MAAM,QAAQ,QAAQ,KAAK,SAAS,UAAU,GAAG;EACnD,OAAO,SAAS,KAAK,SAAS,OAAO;GACnC,OAAO,SAAS,QAAQ,OAAO,UAAU;EAC3C,CAAC;CACH;CACA,OAAO,OAAO,aAAa;AAC7B"}
@@ -1354,10 +1354,11 @@ function configuredValue(state, property, raw, embedded = false, nativeColors) {
1354
1354
  let lookupName = name.charCodeAt(0) === 36 ? name.slice(1) : name;
1355
1355
  let value;
1356
1356
  let fromTheme = false;
1357
- if (property === "fontFamily") value = state.conf.fontsParsed[lookupName]?.family;
1357
+ const fonts = fontProperty && state.context?.language ? (0, import_styledDynamic.getDynamicEnv)(state).fonts : state.conf.fontsParsed;
1358
+ if (property === "fontFamily") value = fonts[lookupName]?.family;
1358
1359
  else {
1359
1360
  const fontKey = property === "fontSize" ? "size" : property === "fontWeight" ? "weight" : property === "lineHeight" || property === "letterSpacing" ? property : "";
1360
- if (fontKey) value = (state.conf.fontsParsed[state.fontFamily || state.conf.defaultFontToken] || state.conf.fontsParsed[state.conf.defaultFontToken])?.[fontKey]?.[lookupName];
1361
+ if (fontKey) value = (fonts[state.fontFamily || state.conf.defaultFontToken] || fonts[state.conf.defaultFontToken])?.[fontKey]?.[lookupName];
1361
1362
  else {
1362
1363
  const category = grammar.tokenCategory(property);
1363
1364
  const dot = lookupName.indexOf(".");
@@ -1401,6 +1401,7 @@ var shadowRecipeProperties = /* @__PURE__ */ new Set([
1401
1401
  var shadowRecipeKeywords = /* @__PURE__ */ new Set(["inset", "none"]);
1402
1402
  function configuredValue(state, property, raw) {
1403
1403
  var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, nativeColors = arguments.length > 4 ? arguments[4] : void 0;
1404
+ var _state_context;
1404
1405
  var grammar = (0, import_grammarConfig.getConfigRevisionState)(state.conf);
1405
1406
  var name = raw;
1406
1407
  var opacity;
@@ -1450,14 +1451,15 @@ function configuredValue(state, property, raw) {
1450
1451
  var lookupName = name.charCodeAt(0) === 36 ? name.slice(1) : name;
1451
1452
  var value;
1452
1453
  var fromTheme = false;
1454
+ var fonts = fontProperty && ((_state_context = state.context) === null || _state_context === void 0 ? void 0 : _state_context.language) ? (0, import_styledDynamic.getDynamicEnv)(state).fonts : state.conf.fontsParsed;
1453
1455
  if (property === "fontFamily") {
1454
- var _state_conf_fontsParsed_lookupName;
1455
- value = (_state_conf_fontsParsed_lookupName = state.conf.fontsParsed[lookupName]) === null || _state_conf_fontsParsed_lookupName === void 0 ? void 0 : _state_conf_fontsParsed_lookupName.family;
1456
+ var _fonts_lookupName;
1457
+ value = (_fonts_lookupName = fonts[lookupName]) === null || _fonts_lookupName === void 0 ? void 0 : _fonts_lookupName.family;
1456
1458
  } else {
1457
1459
  var fontKey = property === "fontSize" ? "size" : property === "fontWeight" ? "weight" : property === "lineHeight" || property === "letterSpacing" ? property : "";
1458
1460
  if (fontKey) {
1459
1461
  var _font_fontKey;
1460
- var font = state.conf.fontsParsed[state.fontFamily || state.conf.defaultFontToken] || state.conf.fontsParsed[state.conf.defaultFontToken];
1462
+ var font = fonts[state.fontFamily || state.conf.defaultFontToken] || fonts[state.conf.defaultFontToken];
1461
1463
  value = font === null || font === void 0 ? void 0 : (_font_fontKey = font[fontKey]) === null || _font_fontKey === void 0 ? void 0 : _font_fontKey[lookupName];
1462
1464
  } else {
1463
1465
  var _state_conf_tokensParsed_category;
@@ -1401,6 +1401,7 @@ var shadowRecipeProperties = /* @__PURE__ */ new Set([
1401
1401
  var shadowRecipeKeywords = /* @__PURE__ */ new Set(["inset", "none"]);
1402
1402
  function configuredValue(state, property, raw) {
1403
1403
  var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, nativeColors = arguments.length > 4 ? arguments[4] : void 0;
1404
+ var _state_context;
1404
1405
  var grammar = (0, import_grammarConfig.getConfigRevisionState)(state.conf);
1405
1406
  var name = raw;
1406
1407
  var opacity;
@@ -1450,14 +1451,15 @@ function configuredValue(state, property, raw) {
1450
1451
  var lookupName = name.charCodeAt(0) === 36 ? name.slice(1) : name;
1451
1452
  var value;
1452
1453
  var fromTheme = false;
1454
+ var fonts = fontProperty && ((_state_context = state.context) === null || _state_context === void 0 ? void 0 : _state_context.language) ? (0, import_styledDynamic.getDynamicEnv)(state).fonts : state.conf.fontsParsed;
1453
1455
  if (property === "fontFamily") {
1454
- var _state_conf_fontsParsed_lookupName;
1455
- value = (_state_conf_fontsParsed_lookupName = state.conf.fontsParsed[lookupName]) === null || _state_conf_fontsParsed_lookupName === void 0 ? void 0 : _state_conf_fontsParsed_lookupName.family;
1456
+ var _fonts_lookupName;
1457
+ value = (_fonts_lookupName = fonts[lookupName]) === null || _fonts_lookupName === void 0 ? void 0 : _fonts_lookupName.family;
1456
1458
  } else {
1457
1459
  var fontKey = property === "fontSize" ? "size" : property === "fontWeight" ? "weight" : property === "lineHeight" || property === "letterSpacing" ? property : "";
1458
1460
  if (fontKey) {
1459
1461
  var _font_fontKey;
1460
- var font = state.conf.fontsParsed[state.fontFamily || state.conf.defaultFontToken] || state.conf.fontsParsed[state.conf.defaultFontToken];
1462
+ var font = fonts[state.fontFamily || state.conf.defaultFontToken] || fonts[state.conf.defaultFontToken];
1461
1463
  value = font === null || font === void 0 ? void 0 : (_font_fontKey = font[fontKey]) === null || _font_fontKey === void 0 ? void 0 : _font_fontKey[lookupName];
1462
1464
  } else {
1463
1465
  var _state_conf_tokensParsed_category;