tamagui 1.132.15 → 1.132.16-1754855349219

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.
@@ -1130,92 +1130,6 @@ var require_composeEventHandlers_native = __commonJS({
1130
1130
  }
1131
1131
  });
1132
1132
 
1133
- // ../../core/helpers/dist/cjs/concatClassName.native.js
1134
- var require_concatClassName_native = __commonJS({
1135
- "../../core/helpers/dist/cjs/concatClassName.native.js"(exports2, module2) {
1136
- "use strict";
1137
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
1138
- for (var name in all) __defProp2(target, name, {
1139
- get: all[name],
1140
- enumerable: !0
1141
- });
1142
- }, __copyProps2 = function(to, from, except, desc) {
1143
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
1144
- if (from && typeof from == "object" || typeof from == "function") try {
1145
- for (var _loop = function() {
1146
- var key = _step.value;
1147
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
1148
- get: function() {
1149
- return from[key];
1150
- },
1151
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
1152
- });
1153
- }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
1154
- } catch (err) {
1155
- _didIteratorError = !0, _iteratorError = err;
1156
- } finally {
1157
- try {
1158
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
1159
- } finally {
1160
- if (_didIteratorError)
1161
- throw _iteratorError;
1162
- }
1163
- }
1164
- return to;
1165
- }, __toCommonJS2 = function(mod) {
1166
- return __copyProps2(__defProp2({}, "__esModule", {
1167
- value: !0
1168
- }), mod);
1169
- }, concatClassName_exports = {};
1170
- __export2(concatClassName_exports, {
1171
- concatClassName: function() {
1172
- return concatClassName;
1173
- }
1174
- });
1175
- module2.exports = __toCommonJS2(concatClassName_exports);
1176
- function concatClassName(_cn) {
1177
- for (var args = arguments, usedPrefixes = [], final = "", len = args.length, propObjects = null, x = len; x >= 0; x--) {
1178
- var _loop = function(i2) {
1179
- var name = names[i2];
1180
- if (!name || name === " ") return "continue";
1181
- if (name[0] !== "_") return final = name + " " + final, "continue";
1182
- var splitIndex = name.indexOf("-");
1183
- if (splitIndex < 1) return final = name + " " + final, "continue";
1184
- var nextChar = name[splitIndex + 1], isMediaQuery = nextChar === "_", styleKey = name.slice(1, name.lastIndexOf("-")), mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null, uid = mediaKey ? styleKey + mediaKey : styleKey;
1185
- if (usedPrefixes.indexOf(uid) > -1) return "continue";
1186
- usedPrefixes.push(uid);
1187
- var propName = styleKey;
1188
- if (propName && propObjects && propObjects.some(function(po) {
1189
- if (mediaKey) {
1190
- var propKey = pseudoInvert[mediaKey];
1191
- return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
1192
- }
1193
- var res = po && propName in po && po[propName] !== null;
1194
- return res;
1195
- })) return "continue";
1196
- final = name + " " + final;
1197
- }, cns = args[x];
1198
- if (cns) {
1199
- if (!Array.isArray(cns) && typeof cns != "string") {
1200
- propObjects = propObjects || [], propObjects.push(cns);
1201
- continue;
1202
- }
1203
- for (var names = Array.isArray(cns) ? cns : cns.split(" "), numNames = names.length, i = numNames - 1; i >= 0; i--) _loop(i);
1204
- }
1205
- }
1206
- return final;
1207
- }
1208
- var pseudoInvert = {
1209
- hover: "hoverStyle",
1210
- focus: "focusStyle",
1211
- press: "pressStyle",
1212
- focusVisible: "focusVisibleStyle",
1213
- focusWithin: "focusWithinStyle",
1214
- disabled: "disabledStyle"
1215
- };
1216
- }
1217
- });
1218
-
1219
1133
  // ../../core/helpers/dist/cjs/types.native.js
1220
1134
  var require_types_native2 = __commonJS({
1221
1135
  "../../core/helpers/dist/cjs/types.native.js"(exports2, module2) {
@@ -1776,7 +1690,6 @@ var require_index_native7 = __commonJS({
1776
1690
  __reExport2(index_exports2, require_index_native6(), module2.exports);
1777
1691
  __reExport2(index_exports2, require_clamp_native(), module2.exports);
1778
1692
  __reExport2(index_exports2, require_composeEventHandlers_native(), module2.exports);
1779
- __reExport2(index_exports2, require_concatClassName_native(), module2.exports);
1780
1693
  __reExport2(index_exports2, require_types_native2(), module2.exports);
1781
1694
  __reExport2(index_exports2, require_shouldRenderNativePlatform_native(), module2.exports);
1782
1695
  __reExport2(index_exports2, require_validStyleProps_native(), module2.exports);
@@ -9581,7 +9494,7 @@ var require_createTamagui_native = __commonJS({
9581
9494
  var sep;
9582
9495
  if (fontDeclarations) for (var key22 in fontDeclarations) var name1, declarations1, language1, fontSelector, langSelector, selectors, specificRuleSet;
9583
9496
  }
9584
- var themesIn = configIn.themes, dedupedThemes = foundThemes ?? getThemesDeduped(themesIn), themes = (0, import_proxyThemeToParents.proxyThemesToParents)(dedupedThemes);
9497
+ var themesIn = configIn.themes, dedupedThemes = foundThemes ?? getThemesDeduped(themesIn, tokens.color), themes = (0, import_proxyThemeToParents.proxyThemesToParents)(dedupedThemes);
9585
9498
  return {
9586
9499
  themes,
9587
9500
  cssRuleSets,
@@ -9683,7 +9596,7 @@ var require_createTamagui_native = __commonJS({
9683
9596
  var _process_env_DEBUG;
9684
9597
  return config;
9685
9598
  }
9686
- function getThemesDeduped(themes) {
9599
+ function getThemesDeduped(themes, colorTokens) {
9687
9600
  var dedupedThemes = [], existing = /* @__PURE__ */ new Map();
9688
9601
  for (var themeName in themes) {
9689
9602
  var darkOrLightSpecificPrefix = themeName.startsWith("dark") ? "dark" : themeName.startsWith("light") ? "light" : "", rawTheme = themes[themeName], key = darkOrLightSpecificPrefix + JSON.stringify(rawTheme);
@@ -9695,6 +9608,7 @@ var require_createTamagui_native = __commonJS({
9695
9608
  var theme = {
9696
9609
  ...rawTheme
9697
9610
  };
9611
+ colorTokens && Object.assign(theme, colorTokens);
9698
9612
  for (var key1 in theme) (0, import_themes.ensureThemeVariable)(theme, key1);
9699
9613
  var deduped = {
9700
9614
  names: [
@@ -10933,12 +10847,13 @@ var require_FontLanguage_native = __commonJS({
10933
10847
  });
10934
10848
  module2.exports = __toCommonJS2(FontLanguage_native_exports);
10935
10849
  var import_jsx_runtime6 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), FontLanguage2 = function(param) {
10936
- var { children, ...props } = param, language = import_react3.default.useMemo(function() {
10850
+ var { children, ...props } = param, parentProps = import_react3.default.useContext(import_ComponentContext.ComponentContext), language = import_react3.default.useMemo(function() {
10937
10851
  return props;
10938
10852
  }, [
10939
10853
  JSON.stringify(props)
10940
10854
  ]);
10941
10855
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
10856
+ ...parentProps,
10942
10857
  language,
10943
10858
  children
10944
10859
  });