@tamagui/core 1.124.16 → 1.124.18

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
@@ -5114,14 +5114,14 @@ var require_propMapper_native = __commonJS({
5114
5114
  }, lastFontFamilyToken = null, getTokenForKey = function(key, value, styleProps, styleState) {
5115
5115
  var _staticConfig_accept, resolveAs = styleProps.resolveValues || "none";
5116
5116
  if (resolveAs === "none") return value;
5117
- 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];
5117
+ var { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, themeValue = theme ? theme[value] || theme[value.slice(1)] : void 0, tokensParsed = conf.tokensParsed, valOrVar, hasSet = !1, customTokenAccept = staticConfig == null || (_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key];
5118
5118
  if (customTokenAccept) {
5119
- var _theme_value, val = (_theme_value = theme == null ? void 0 : theme[value]) !== null && _theme_value !== void 0 ? _theme_value : tokensParsed[customTokenAccept][value];
5119
+ var val = themeValue ?? tokensParsed[customTokenAccept][value];
5120
5120
  val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
5121
5121
  }
5122
- if (theme && value in theme) {
5122
+ if (themeValue) {
5123
5123
  if (resolveAs === "except-theme") return value;
5124
- 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;
5124
+ valOrVar = themeValue, 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;
5125
5125
  } else {
5126
5126
  if (value in conf.specificTokens) hasSet = !0, valOrVar = conf.specificTokens[value];
5127
5127
  else {
@@ -10693,7 +10693,7 @@ var require_matchQuery_native = __commonJS({
10693
10693
  case "color":
10694
10694
  case "color-index":
10695
10695
  case "monochrome":
10696
- expValue = parseInt(expValue, 10) || 1, value = parseInt(value, 10) || 0;
10696
+ expValue = Number.parseInt(expValue, 10) || 1, value = Number.parseInt(value, 10) || 0;
10697
10697
  break;
10698
10698
  }
10699
10699
  switch (modifier) {
@@ -10734,7 +10734,7 @@ var require_matchQuery_native = __commonJS({
10734
10734
  return decimal || (numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/), decimal = numbers[1] / numbers[2]), decimal;
10735
10735
  }
10736
10736
  function toDpi(resolution) {
10737
- var _String_match, value = parseFloat(resolution), units = (_String_match = String(resolution).match(RE_RESOLUTION_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
10737
+ var _String_match, value = Number.parseFloat(resolution), units = (_String_match = String(resolution).match(RE_RESOLUTION_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
10738
10738
  switch (units) {
10739
10739
  case "dpcm":
10740
10740
  return value / 2.54;
@@ -10745,7 +10745,7 @@ var require_matchQuery_native = __commonJS({
10745
10745
  }
10746
10746
  }
10747
10747
  function toPx(length) {
10748
- var _String_match, value = parseFloat(length), units = (_String_match = String(length).match(RE_LENGTH_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
10748
+ var _String_match, value = Number.parseFloat(length), units = (_String_match = String(length).match(RE_LENGTH_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
10749
10749
  switch (units) {
10750
10750
  case "em":
10751
10751
  return value * 16;