tamagui 1.132.15 → 1.132.16-1754534218765

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.
package/dist/native.js CHANGED
@@ -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);
@@ -10145,7 +10058,7 @@ ${JSON.stringify(variable, null, 2)}`);
10145
10058
  var sep;
10146
10059
  if (fontDeclarations) for (var key22 in fontDeclarations) var name1, declarations1, language1, fontSelector, langSelector, selectors, specificRuleSet;
10147
10060
  }
10148
- var themesIn = configIn.themes, dedupedThemes = foundThemes ?? getThemesDeduped(themesIn), themes = (0, import_proxyThemeToParents.proxyThemesToParents)(dedupedThemes);
10061
+ var themesIn = configIn.themes, dedupedThemes = foundThemes ?? getThemesDeduped(themesIn, tokens.color), themes = (0, import_proxyThemeToParents.proxyThemesToParents)(dedupedThemes);
10149
10062
  return {
10150
10063
  themes,
10151
10064
  cssRuleSets,
@@ -10249,7 +10162,7 @@ ${JSON.stringify(variable, null, 2)}`);
10249
10162
  }
10250
10163
  return config;
10251
10164
  }
10252
- function getThemesDeduped(themes) {
10165
+ function getThemesDeduped(themes, colorTokens) {
10253
10166
  var dedupedThemes = [], existing = /* @__PURE__ */ new Map();
10254
10167
  for (var themeName in themes) {
10255
10168
  var darkOrLightSpecificPrefix = themeName.startsWith("dark") ? "dark" : themeName.startsWith("light") ? "light" : "", rawTheme = themes[themeName], key = darkOrLightSpecificPrefix + JSON.stringify(rawTheme);
@@ -10261,6 +10174,7 @@ ${JSON.stringify(variable, null, 2)}`);
10261
10174
  var theme = {
10262
10175
  ...rawTheme
10263
10176
  };
10177
+ colorTokens && Object.assign(theme, colorTokens);
10264
10178
  for (var key1 in theme) (0, import_themes.ensureThemeVariable)(theme, key1);
10265
10179
  var deduped = {
10266
10180
  names: [
@@ -11499,12 +11413,13 @@ var require_FontLanguage_native = __commonJS({
11499
11413
  });
11500
11414
  module2.exports = __toCommonJS2(FontLanguage_native_exports);
11501
11415
  var import_jsx_runtime6 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), FontLanguage2 = function(param) {
11502
- var { children, ...props } = param, language = import_react3.default.useMemo(function() {
11416
+ var { children, ...props } = param, parentProps = import_react3.default.useContext(import_ComponentContext.ComponentContext), language = import_react3.default.useMemo(function() {
11503
11417
  return props;
11504
11418
  }, [
11505
11419
  JSON.stringify(props)
11506
11420
  ]);
11507
11421
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
11422
+ ...parentProps,
11508
11423
  language,
11509
11424
  children
11510
11425
  });