@tamagui/core 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.
@@ -210,92 +210,6 @@ var require_composeEventHandlers_native = __commonJS({
210
210
  }
211
211
  });
212
212
 
213
- // ../helpers/dist/cjs/concatClassName.native.js
214
- var require_concatClassName_native = __commonJS({
215
- "../helpers/dist/cjs/concatClassName.native.js"(exports2, module2) {
216
- "use strict";
217
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
218
- for (var name in all) __defProp2(target, name, {
219
- get: all[name],
220
- enumerable: !0
221
- });
222
- }, __copyProps2 = function(to, from, except, desc) {
223
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
224
- if (from && typeof from == "object" || typeof from == "function") try {
225
- for (var _loop = function() {
226
- var key = _step.value;
227
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
228
- get: function() {
229
- return from[key];
230
- },
231
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
232
- });
233
- }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
234
- } catch (err) {
235
- _didIteratorError = !0, _iteratorError = err;
236
- } finally {
237
- try {
238
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
239
- } finally {
240
- if (_didIteratorError)
241
- throw _iteratorError;
242
- }
243
- }
244
- return to;
245
- }, __toCommonJS2 = function(mod) {
246
- return __copyProps2(__defProp2({}, "__esModule", {
247
- value: !0
248
- }), mod);
249
- }, concatClassName_exports = {};
250
- __export2(concatClassName_exports, {
251
- concatClassName: function() {
252
- return concatClassName;
253
- }
254
- });
255
- module2.exports = __toCommonJS2(concatClassName_exports);
256
- function concatClassName(_cn) {
257
- for (var args = arguments, usedPrefixes = [], final = "", len = args.length, propObjects = null, x = len; x >= 0; x--) {
258
- var _loop = function(i2) {
259
- var name = names[i2];
260
- if (!name || name === " ") return "continue";
261
- if (name[0] !== "_") return final = name + " " + final, "continue";
262
- var splitIndex = name.indexOf("-");
263
- if (splitIndex < 1) return final = name + " " + final, "continue";
264
- 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;
265
- if (usedPrefixes.indexOf(uid) > -1) return "continue";
266
- usedPrefixes.push(uid);
267
- var propName = styleKey;
268
- if (propName && propObjects && propObjects.some(function(po) {
269
- if (mediaKey) {
270
- var propKey = pseudoInvert[mediaKey];
271
- return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
272
- }
273
- var res = po && propName in po && po[propName] !== null;
274
- return res;
275
- })) return "continue";
276
- final = name + " " + final;
277
- }, cns = args[x];
278
- if (cns) {
279
- if (!Array.isArray(cns) && typeof cns != "string") {
280
- propObjects = propObjects || [], propObjects.push(cns);
281
- continue;
282
- }
283
- for (var names = Array.isArray(cns) ? cns : cns.split(" "), numNames = names.length, i = numNames - 1; i >= 0; i--) _loop(i);
284
- }
285
- }
286
- return final;
287
- }
288
- var pseudoInvert = {
289
- hover: "hoverStyle",
290
- focus: "focusStyle",
291
- press: "pressStyle",
292
- focusVisible: "focusVisibleStyle",
293
- focusWithin: "focusWithinStyle",
294
- disabled: "disabledStyle"
295
- };
296
- }
297
- });
298
-
299
213
  // ../helpers/dist/cjs/types.native.js
300
214
  var require_types_native = __commonJS({
301
215
  "../helpers/dist/cjs/types.native.js"(exports2, module2) {
@@ -1014,7 +928,6 @@ var require_index_native3 = __commonJS({
1014
928
  __reExport2(index_exports2, require_index_native(), module2.exports);
1015
929
  __reExport2(index_exports2, require_clamp_native(), module2.exports);
1016
930
  __reExport2(index_exports2, require_composeEventHandlers_native(), module2.exports);
1017
- __reExport2(index_exports2, require_concatClassName_native(), module2.exports);
1018
931
  __reExport2(index_exports2, require_types_native(), module2.exports);
1019
932
  __reExport2(index_exports2, require_shouldRenderNativePlatform_native(), module2.exports);
1020
933
  __reExport2(index_exports2, require_validStyleProps_native(), module2.exports);
@@ -8476,7 +8389,7 @@ var require_createTamagui_native = __commonJS({
8476
8389
  var sep;
8477
8390
  if (fontDeclarations) for (var key22 in fontDeclarations) var name1, declarations1, language1, fontSelector, langSelector, selectors, specificRuleSet;
8478
8391
  }
8479
- var themesIn = configIn.themes, dedupedThemes = foundThemes ?? getThemesDeduped(themesIn), themes = (0, import_proxyThemeToParents.proxyThemesToParents)(dedupedThemes);
8392
+ var themesIn = configIn.themes, dedupedThemes = foundThemes ?? getThemesDeduped(themesIn, tokens.color), themes = (0, import_proxyThemeToParents.proxyThemesToParents)(dedupedThemes);
8480
8393
  return {
8481
8394
  themes,
8482
8395
  cssRuleSets,
@@ -8578,7 +8491,7 @@ var require_createTamagui_native = __commonJS({
8578
8491
  var _process_env_DEBUG;
8579
8492
  return config;
8580
8493
  }
8581
- function getThemesDeduped(themes) {
8494
+ function getThemesDeduped(themes, colorTokens) {
8582
8495
  var dedupedThemes = [], existing = /* @__PURE__ */ new Map();
8583
8496
  for (var themeName in themes) {
8584
8497
  var darkOrLightSpecificPrefix = themeName.startsWith("dark") ? "dark" : themeName.startsWith("light") ? "light" : "", rawTheme = themes[themeName], key = darkOrLightSpecificPrefix + JSON.stringify(rawTheme);
@@ -8590,6 +8503,7 @@ var require_createTamagui_native = __commonJS({
8590
8503
  var theme = {
8591
8504
  ...rawTheme
8592
8505
  };
8506
+ colorTokens && Object.assign(theme, colorTokens);
8593
8507
  for (var key1 in theme) (0, import_themes.ensureThemeVariable)(theme, key1);
8594
8508
  var deduped = {
8595
8509
  names: [
@@ -9828,12 +9742,13 @@ var require_FontLanguage_native = __commonJS({
9828
9742
  });
9829
9743
  module2.exports = __toCommonJS2(FontLanguage_native_exports);
9830
9744
  var import_jsx_runtime2 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), FontLanguage = function(param) {
9831
- var { children, ...props } = param, language = import_react3.default.useMemo(function() {
9745
+ var { children, ...props } = param, parentProps = import_react3.default.useContext(import_ComponentContext.ComponentContext), language = import_react3.default.useMemo(function() {
9832
9746
  return props;
9833
9747
  }, [
9834
9748
  JSON.stringify(props)
9835
9749
  ]);
9836
9750
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
9751
+ ...parentProps,
9837
9752
  language,
9838
9753
  children
9839
9754
  });