@tamagui/core 1.123.9 → 1.123.10

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
@@ -5711,7 +5711,7 @@ var require_propMapper_native = __commonJS({
5711
5711
  return;
5712
5712
  }
5713
5713
  }
5714
- if (styleProps.disableExpandShorthands || key in conf.shorthands && (key = conf.shorthands[key]), value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps.resolveValues, styleState) : (0, import_createVariable.isVariable)(value) && (value = resolveVariableValue(key, value, styleProps.resolveValues))), value != null) {
5714
+ if (styleProps.disableExpandShorthands || key in conf.shorthands && (key = conf.shorthands[key]), value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps, styleState) : (0, import_createVariable.isVariable)(value) && (value = resolveVariableValue(key, value, styleProps.resolveValues))), value != null) {
5715
5715
  key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
5716
5716
  var expanded = styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key, value);
5717
5717
  if (expanded) for (var max = expanded.length, i = 0; i < max; i++) {
@@ -5773,7 +5773,7 @@ var require_propMapper_native = __commonJS({
5773
5773
  if (styleProps.noExpand) res[subKey] = val;
5774
5774
  else if (variants && subKey in variants) {
5775
5775
  if (parentVariantKey && parentVariantKey === key) res[subKey] = // SYNC WITH *1
5776
- val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val;
5776
+ val[0] === "$" ? getTokenForKey(subKey, val, styleProps, styleState) : val;
5777
5777
  else {
5778
5778
  var variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
5779
5779
  if (variantOut) {
@@ -5806,7 +5806,7 @@ var require_propMapper_native = __commonJS({
5806
5806
  if (typeof val == "string") {
5807
5807
  var fVal = (
5808
5808
  // SYNC WITH *1
5809
- val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val
5809
+ val[0] === "$" ? getTokenForKey(subKey, val, styleProps, styleState) : val
5810
5810
  );
5811
5811
  res[subKey] = fVal;
5812
5812
  continue;
@@ -5866,16 +5866,18 @@ var require_propMapper_native = __commonJS({
5866
5866
  var fontShorthand = {
5867
5867
  fontSize: "size",
5868
5868
  fontWeight: "weight"
5869
- }, lastFontFamilyToken = null, getTokenForKey = function(key, value) {
5870
- var resolveAs = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "none", styleState = arguments.length > 3 ? arguments[3] : void 0, _staticConfig_accept;
5869
+ }, lastFontFamilyToken = null, getTokenForKey = function(key, value, styleProps, styleState) {
5870
+ var _staticConfig_accept, resolveAs = styleProps.resolveValues || "none";
5871
5871
  if (resolveAs === "none") return value;
5872
5872
  var { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, tokensParsed = conf.tokensParsed, valOrVar, hasSet = !1, customTokenAccept = staticConfig == null || (_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key];
5873
5873
  if (customTokenAccept) {
5874
5874
  var _theme_value, val = (_theme_value = theme == null ? void 0 : theme[value]) !== null && _theme_value !== void 0 ? _theme_value : tokensParsed[customTokenAccept][value];
5875
5875
  val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
5876
5876
  }
5877
- if (theme && value in theme) valOrVar = theme[value], process.env.NODE_ENV === "development" && styleState.debug === "verbose" && (globalThis.tamaguiAvoidTracking = !0, console.info(` - resolving ${key} to theme value ${value} resolveAs ${resolveAs}`, valOrVar), globalThis.tamaguiAvoidTracking = !1), hasSet = !0;
5878
- else {
5877
+ if (theme && value in theme) {
5878
+ if (resolveAs === "except-theme") return value;
5879
+ valOrVar = theme[value], process.env.NODE_ENV === "development" && styleState.debug === "verbose" && (globalThis.tamaguiAvoidTracking = !0, console.info(` - resolving ${key} to theme value ${value} resolveAs ${resolveAs}`, valOrVar), globalThis.tamaguiAvoidTracking = !1), hasSet = !0;
5880
+ } else {
5879
5881
  if (value in conf.specificTokens) hasSet = !0, valOrVar = conf.specificTokens[value];
5880
5882
  else {
5881
5883
  switch (key) {
@@ -6381,7 +6383,7 @@ var require_getSplitStyles_native = __commonJS({
6381
6383
  console.groupEnd();
6382
6384
  }
6383
6385
  };
6384
- props.reddish && (debug = "verbose"), conf = conf || (0, import_config.getConfig)(), import_constants2.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
6386
+ conf = conf || (0, import_config.getConfig)(), import_constants2.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
6385
6387
  var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants2.isWeb && !styleProps.noClass, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles2 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers2.stylePropsText : import_helpers2.validStyles);
6386
6388
  process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-setup`;
6387
6389
  var styleState = {