@tamagui/core 1.123.4 → 1.123.6

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
@@ -3512,12 +3512,12 @@ var require_createStyledContext_native = __commonJS({
3512
3512
  }
3513
3513
  });
3514
3514
  module2.exports = __toCommonJS2(createStyledContext_exports);
3515
- var import_jsx_runtime = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_objectIdentityKey = require_objectIdentityKey_native();
3515
+ var import_jsx_runtime = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_objectIdentityKey = require_objectIdentityKey_native(), createReactContext = import_react3.default[Math.random(), "createContext"];
3516
3516
  function createStyledContext(defaultValues) {
3517
- var OGContext = /* @__PURE__ */ import_react3.default.createContext(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map();
3517
+ var OGContext = createReactContext(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map();
3518
3518
  function getOrCreateScopedContext(scope) {
3519
3519
  var ScopedContext = scopedContexts.get(scope);
3520
- return ScopedContext || (ScopedContext = /* @__PURE__ */ import_react3.default.createContext(defaultValues), scopedContexts.set(scope, ScopedContext)), ScopedContext;
3520
+ return ScopedContext || (ScopedContext = createReactContext(defaultValues), scopedContexts.set(scope, ScopedContext)), ScopedContext;
3521
3521
  }
3522
3522
  var Provider = function(param) {
3523
3523
  var { children, scope, ...values } = param, next = import_react3.default.useMemo(function() {
@@ -5837,29 +5837,31 @@ var require_propMapper_native = __commonJS({
5837
5837
  };
5838
5838
  });
5839
5839
  function getVariantDefinition(variant, value, conf) {
5840
- if (typeof variant == "function") return variant;
5841
- var exact = variant[value];
5842
- if (exact) return exact;
5843
- if (value != null) {
5844
- var { tokensParsed } = conf, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
5845
- try {
5846
- for (var _iterator = tokenCats[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
5847
- var { name, spreadName } = _step.value;
5848
- if (spreadName in variant && value in tokensParsed[name]) return variant[spreadName];
5849
- }
5850
- } catch (err) {
5851
- _didIteratorError = !0, _iteratorError = err;
5852
- } finally {
5840
+ if (variant) {
5841
+ if (typeof variant == "function") return variant;
5842
+ var exact = variant[value];
5843
+ if (exact) return exact;
5844
+ if (value != null) {
5845
+ var { tokensParsed } = conf, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
5853
5846
  try {
5854
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
5847
+ for (var _iterator = tokenCats[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
5848
+ var { name, spreadName } = _step.value;
5849
+ if (spreadName in variant && value in tokensParsed[name]) return variant[spreadName];
5850
+ }
5851
+ } catch (err) {
5852
+ _didIteratorError = !0, _iteratorError = err;
5855
5853
  } finally {
5856
- if (_didIteratorError) throw _iteratorError;
5854
+ try {
5855
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
5856
+ } finally {
5857
+ if (_didIteratorError) throw _iteratorError;
5858
+ }
5857
5859
  }
5860
+ var fontSizeVariant = variant["...fontSize"];
5861
+ if (fontSizeVariant && conf.fontSizeTokens.has(value)) return fontSizeVariant;
5858
5862
  }
5859
- var fontSizeVariant = variant["...fontSize"];
5860
- if (fontSizeVariant && conf.fontSizeTokens.has(value)) return fontSizeVariant;
5863
+ return variant[`:${typeof value}`] || variant["..."];
5861
5864
  }
5862
- return variant[`:${typeof value}`] || variant["..."];
5863
5865
  }
5864
5866
  var fontShorthand = {
5865
5867
  fontSize: "size",