tamagui 1.109.6 → 1.109.7

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
@@ -7323,7 +7323,7 @@ var require_getVariantExtras_native = __commonJS({
7323
7323
  return (0, import_createVariable.getVariableValue)(styleState.fontFamily || styleState.curProps.fontFamily) || props.fontFamily || (0, import_createVariable.getVariableValue)(styleState.conf.defaultFont);
7324
7324
  },
7325
7325
  get font() {
7326
- return fonts[this.fontFamily] || (props.fontFamily ? void 0 : styleState.conf.defaultFont);
7326
+ return fonts[this.fontFamily] || (!props.fontFamily || props.fontFamily[0] === "$" ? fonts[styleState.conf.defaultFont] : void 0);
7327
7327
  },
7328
7328
  // TODO do this in splitstlye
7329
7329
  // we avoid passing in default props for media queries because that would confuse things like SizableText.size:
@@ -17224,50 +17224,29 @@ var require_index_native21 = __commonJS({
17224
17224
  });
17225
17225
  module2.exports = __toCommonJS2(src_exports2);
17226
17226
  var import_core12 = require_index_native16();
17227
- function _define_property9(obj, key, value) {
17228
- return key in obj ? Object.defineProperty(obj, key, {
17229
- value,
17230
- enumerable: !0,
17231
- configurable: !0,
17232
- writable: !0
17233
- }) : obj[key] = value, obj;
17234
- }
17235
- function _object_spread9(target) {
17236
- for (var i = 1; i < arguments.length; i++) {
17237
- var source = arguments[i] != null ? arguments[i] : {}, ownKeys8 = Object.keys(source);
17238
- typeof Object.getOwnPropertySymbols == "function" && (ownKeys8 = ownKeys8.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
17239
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
17240
- }))), ownKeys8.forEach(function(key) {
17241
- _define_property9(target, key, source[key]);
17242
- });
17243
- }
17244
- return target;
17245
- }
17246
17227
  function _type_of1(obj) {
17247
17228
  "@swc/helpers - typeof";
17248
17229
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
17249
17230
  }
17250
17231
  var getFontSized2 = function() {
17251
17232
  var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true", _ref = arguments.length > 1 ? arguments[1] : void 0, font = _ref.font, fontFamily = _ref.fontFamily, props = _ref.props, _font_lineHeight, _font_weight, _font_letterSpacing, _font_transform, _font_style, _font_color;
17252
- if (!font) {
17253
- process.env.NODE_ENV === "development" && console.warn("Warning: No font found in props", _object_spread9({}, props), 'For a sized text component, you either need to set fontFamily directly, or through the "defaultFont" setting in your createTamagui config.');
17254
- return;
17233
+ if (font) {
17234
+ var sizeToken = sizeTokenIn === "$true" ? getDefaultSizeToken(font) : sizeTokenIn, fontSize = font.size[sizeToken], lineHeight = (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[sizeToken], fontWeight = (_font_weight = font.weight) === null || _font_weight === void 0 ? void 0 : _font_weight[sizeToken], letterSpacing = (_font_letterSpacing = font.letterSpacing) === null || _font_letterSpacing === void 0 ? void 0 : _font_letterSpacing[sizeToken], textTransform = (_font_transform = font.transform) === null || _font_transform === void 0 ? void 0 : _font_transform[sizeToken], _props_fontStyle, fontStyle = (_props_fontStyle = props.fontStyle) !== null && _props_fontStyle !== void 0 ? _props_fontStyle : (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken], _props_color, color = (_props_color = props.color) !== null && _props_color !== void 0 ? _props_color : (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken], style = {
17235
+ color,
17236
+ fontStyle,
17237
+ textTransform,
17238
+ fontFamily,
17239
+ fontWeight,
17240
+ letterSpacing,
17241
+ fontSize,
17242
+ lineHeight
17243
+ };
17244
+ return process.env.NODE_ENV === "development" && props.debug && props.debug === "verbose" && (console.groupCollapsed(" \u{1F539} getFontSized", sizeTokenIn, sizeToken), console.info({
17245
+ style,
17246
+ props,
17247
+ font
17248
+ }), console.groupEnd()), style;
17255
17249
  }
17256
- var sizeToken = sizeTokenIn === "$true" ? getDefaultSizeToken(font) : sizeTokenIn, fontSize = font.size[sizeToken], lineHeight = (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[sizeToken], fontWeight = (_font_weight = font.weight) === null || _font_weight === void 0 ? void 0 : _font_weight[sizeToken], letterSpacing = (_font_letterSpacing = font.letterSpacing) === null || _font_letterSpacing === void 0 ? void 0 : _font_letterSpacing[sizeToken], textTransform = (_font_transform = font.transform) === null || _font_transform === void 0 ? void 0 : _font_transform[sizeToken], _props_fontStyle, fontStyle = (_props_fontStyle = props.fontStyle) !== null && _props_fontStyle !== void 0 ? _props_fontStyle : (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken], _props_color, color = (_props_color = props.color) !== null && _props_color !== void 0 ? _props_color : (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken], style = {
17257
- color,
17258
- fontStyle,
17259
- textTransform,
17260
- fontFamily,
17261
- fontWeight,
17262
- letterSpacing,
17263
- fontSize,
17264
- lineHeight
17265
- };
17266
- return process.env.NODE_ENV === "development" && props.debug && props.debug === "verbose" && (console.groupCollapsed(" \u{1F539} getFontSized", sizeTokenIn, sizeToken), console.info({
17267
- style,
17268
- props,
17269
- font
17270
- }), console.groupEnd()), style;
17271
17250
  }, cache = /* @__PURE__ */ new WeakMap();
17272
17251
  function getDefaultSizeToken(font) {
17273
17252
  if (((typeof font > "u" ? "undefined" : _type_of3(font)) > "u" ? "undefined" : _type_of1(font)) === "object" && cache.has(font)) return cache.get(font);