@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.
@@ -4826,14 +4826,14 @@ var require_propMapper_native = __commonJS({
4826
4826
  }, lastFontFamilyToken = null, getTokenForKey = function(key, value, styleProps, styleState) {
4827
4827
  var _staticConfig_accept, resolveAs = styleProps.resolveValues || "none";
4828
4828
  if (resolveAs === "none") return value;
4829
- 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];
4829
+ 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];
4830
4830
  if (customTokenAccept) {
4831
- var _theme_value, val = (_theme_value = theme == null ? void 0 : theme[value]) !== null && _theme_value !== void 0 ? _theme_value : tokensParsed[customTokenAccept][value];
4831
+ var val = themeValue ?? tokensParsed[customTokenAccept][value];
4832
4832
  val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
4833
4833
  }
4834
- if (theme && value in theme) {
4834
+ if (themeValue) {
4835
4835
  if (resolveAs === "except-theme") return value;
4836
- valOrVar = theme[value], hasSet = !0;
4836
+ valOrVar = themeValue, hasSet = !0;
4837
4837
  } else {
4838
4838
  if (value in conf.specificTokens) hasSet = !0, valOrVar = conf.specificTokens[value];
4839
4839
  else {
@@ -10086,7 +10086,7 @@ var require_matchQuery_native = __commonJS({
10086
10086
  case "color":
10087
10087
  case "color-index":
10088
10088
  case "monochrome":
10089
- expValue = parseInt(expValue, 10) || 1, value = parseInt(value, 10) || 0;
10089
+ expValue = Number.parseInt(expValue, 10) || 1, value = Number.parseInt(value, 10) || 0;
10090
10090
  break;
10091
10091
  }
10092
10092
  switch (modifier) {
@@ -10127,7 +10127,7 @@ var require_matchQuery_native = __commonJS({
10127
10127
  return decimal || (numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/), decimal = numbers[1] / numbers[2]), decimal;
10128
10128
  }
10129
10129
  function toDpi(resolution) {
10130
- 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];
10130
+ 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];
10131
10131
  switch (units) {
10132
10132
  case "dpcm":
10133
10133
  return value / 2.54;
@@ -10138,7 +10138,7 @@ var require_matchQuery_native = __commonJS({
10138
10138
  }
10139
10139
  }
10140
10140
  function toPx(length) {
10141
- 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];
10141
+ 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];
10142
10142
  switch (units) {
10143
10143
  case "em":
10144
10144
  return value * 16;