tamagui 1.138.4 → 1.138.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.
Files changed (3) hide show
  1. package/dist/native.cjs +39 -39
  2. package/dist/test.cjs +39 -39
  3. package/package.json +55 -55
package/dist/native.cjs CHANGED
@@ -3050,14 +3050,16 @@ var propMapper = function(key, value, styleState, disabled, map) {
3050
3050
  return;
3051
3051
  }
3052
3052
  }
3053
- if (styleProps2.disableExpandShorthands || key in conf2.shorthands && (key = conf2.shorthands[key]), value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : isVariable(value) && (value = resolveVariableValue(key, value, styleProps2.resolveValues))), value != null) {
3053
+ styleProps2.disableExpandShorthands || key in conf2.shorthands && (key = conf2.shorthands[key]);
3054
+ var originalValue = value;
3055
+ if (value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : isVariable(value) && (value = resolveVariableValue(key, value, styleProps2.resolveValues))), value != null) {
3054
3056
  key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
3055
3057
  var expanded = styleProps2.noExpand ? null : expandStyle(key, value);
3056
3058
  if (expanded) for (var max2 = expanded.length, i = 0; i < max2; i++) {
3057
3059
  var [nkey, nvalue] = expanded[i];
3058
- map(nkey, nvalue);
3060
+ map(nkey, nvalue, originalValue);
3059
3061
  }
3060
- else map(key, value);
3062
+ else map(key, value, originalValue);
3061
3063
  }
3062
3064
  }
3063
3065
  }, resolveVariants = function(key, value, styleProps2, styleState, parentVariantKey) {
@@ -3117,7 +3119,10 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
3117
3119
  if (!(!styleProps2.noSkip && subKey in skipProps)) {
3118
3120
  if (staticConfig) {
3119
3121
  var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
3120
- contextProps && subKey in contextProps && (styleState.overriddenContextProps || (styleState.overriddenContextProps = {}), styleState.overriddenContextProps[subKey] = val);
3122
+ if (contextProps && subKey in contextProps) {
3123
+ var _styleState, _styleState1;
3124
+ (_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {}), styleState.overriddenContextProps[subKey] = val, (_styleState1 = styleState).originalContextPropValues || (_styleState1.originalContextPropValues = {}), styleState.originalContextPropValues[subKey] = val;
3125
+ }
3121
3126
  }
3122
3127
  if (styleProps2.noExpand) res[subKey] = val;
3123
3128
  else if (variants2 && subKey in variants2) {
@@ -3282,7 +3287,7 @@ function _type_of$5(obj) {
3282
3287
  "@swc/helpers - typeof";
3283
3288
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
3284
3289
  }
3285
- var conf;
3290
+ var conf, styleOriginalValues = /* @__PURE__ */ new WeakMap();
3286
3291
  function normalizeGroupKey(key, groupContext) {
3287
3292
  var parts = key.split("-"), plen = parts.length;
3288
3293
  if (
@@ -3329,7 +3334,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3329
3334
  if (!noSkip && keyInit in skipProps) return "continue";
3330
3335
  (isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
3331
3336
  var disablePropMap = isMediaOrPseudo || !isStyleLikeKey;
3332
- if (propMapper(keyInit, valInit, styleState, disablePropMap, function(key4, val2) {
3337
+ if (propMapper(keyInit, valInit, styleState, disablePropMap, function(key4, val2, originalVal) {
3333
3338
  var _parentStaticConfig_variants, isStyledContextProp = styledContext && key4 in styledContext;
3334
3339
  if (!isHOC && disablePropMap && !isStyledContextProp && !isMediaOrPseudo) {
3335
3340
  viewProps[key4] = val2;
@@ -3341,7 +3346,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3341
3346
  return;
3342
3347
  }
3343
3348
  if (!isHOC && isValidStyleKey(key4, validStyles$1, accept) || isAndroid && key4 === "elevation") {
3344
- mergeStyle(styleState, key4, val2, 1);
3349
+ mergeStyle(styleState, key4, val2, 1, false, originalVal);
3345
3350
  return;
3346
3351
  }
3347
3352
  if (isPseudo = key4 in validPseudoKeys, isMedia = isPseudo ? false : getMediaKey(key4), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants2 && key4 in variants2, isMedia === "group" && (key4 = normalizeGroupKey(key4, groupContext)), (inlineProps == null ? void 0 : inlineProps.has(key4)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened == null ? void 0 : inlineWhenUnflattened.has(key4))) {
@@ -3368,7 +3373,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3368
3373
  {
3369
3374
  var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled2 = componentState[descriptorKey] === false;
3370
3375
  isExit && (isDisabled2 = !styleProps2.isExiting), isEnter && componentState.unmounted === false && (isDisabled2 = true);
3371
- var importance = descriptor.priority;
3376
+ var importance = descriptor.priority, pseudoOriginalValues = styleOriginalValues.get(pseudoStyleObject);
3372
3377
  for (var pkey in pseudoStyleObject) {
3373
3378
  var _$val = pseudoStyleObject[pkey];
3374
3379
  if (isDisabled2) applyDefaultStyle(pkey, styleState);
@@ -3379,7 +3384,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3379
3384
  var _pseudos1, _key1;
3380
3385
  pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = _$val;
3381
3386
  }
3382
- mergeStyle(styleState, pkey, _$val, importance);
3387
+ mergeStyle(styleState, pkey, _$val, importance, false, pseudoOriginalValues == null ? void 0 : pseudoOriginalValues[pkey]);
3383
3388
  }
3384
3389
  }
3385
3390
  }
@@ -3398,10 +3403,10 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3398
3403
  var priority = mediaStylesSeen;
3399
3404
  if (mediaStylesSeen += 1, shouldDoClasses) ;
3400
3405
  else {
3401
- let mergeMediaStyle2 = function(key5, val3) {
3406
+ let mergeMediaStyle2 = function(key5, val3, originalVal2) {
3402
3407
  var _styleState4;
3403
3408
  (_styleState4 = styleState).style || (_styleState4.style = {});
3404
- var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, mediaState[mediaKeyShort], importanceBump);
3409
+ var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, mediaState[mediaKeyShort], importanceBump, debug, originalVal2);
3405
3410
  didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
3406
3411
  };
3407
3412
  var isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
@@ -3415,14 +3420,14 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3415
3420
  if (dynamicThemeAccess = true, isIos && getSetting("fastSchemeChange")) {
3416
3421
  var _styleState3;
3417
3422
  (_styleState3 = styleState).style || (_styleState3.style = {});
3418
- var scheme = mediaKeyShort, oppositeScheme = getOppositeScheme(mediaKeyShort);
3423
+ var scheme = mediaKeyShort, oppositeScheme = getOppositeScheme(mediaKeyShort), themeOriginalValues = styleOriginalValues.get(mediaStyle1);
3419
3424
  for (var subKey1 in mediaStyle1) {
3420
3425
  var _$val1 = extractValueFromDynamic(mediaStyle1[subKey1], scheme), oppositeVal = extractValueFromDynamic(styleState.style[subKey1], oppositeScheme);
3421
3426
  mediaStyle1[subKey1] = getDynamicVal({
3422
3427
  scheme,
3423
3428
  val: _$val1,
3424
3429
  oppositeVal
3425
- }), mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority);
3430
+ }), mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority, false, themeOriginalValues == null ? void 0 : themeOriginalValues[subKey1]);
3426
3431
  }
3427
3432
  } else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
3428
3433
  } else if (isGroupMedia) {
@@ -3452,6 +3457,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3452
3457
  importanceBump = priority1;
3453
3458
  }
3454
3459
  }
3460
+ var mediaOriginalValues = styleOriginalValues.get(mediaStyle1);
3455
3461
  for (var subKey2 in mediaStyle1) {
3456
3462
  if (subKey2 === "space") {
3457
3463
  space = valInit.space;
@@ -3459,8 +3465,9 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3459
3465
  }
3460
3466
  if (subKey2[0] === "$") {
3461
3467
  if (!isActivePlatform(subKey2) || !isActiveTheme(subKey2, themeName)) continue;
3462
- for (var subSubKey in mediaStyle1[subKey2]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey2][subSubKey]);
3463
- } else mergeMediaStyle2(subKey2, mediaStyle1[subKey2]);
3468
+ var subOriginalValues = styleOriginalValues.get(mediaStyle1[subKey2]);
3469
+ for (var subSubKey in mediaStyle1[subKey2]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey2][subSubKey], subOriginalValues == null ? void 0 : subOriginalValues[subSubKey]);
3470
+ } else mergeMediaStyle2(subKey2, mediaStyle1[subKey2], mediaOriginalValues == null ? void 0 : mediaOriginalValues[subKey2]);
3464
3471
  }
3465
3472
  }
3466
3473
  return;
@@ -3586,7 +3593,7 @@ function mergeFlatTransforms(target, flatTransforms) {
3586
3593
  });
3587
3594
  }
3588
3595
  function mergeStyle(styleState, key, val, importance) {
3589
- var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, {
3596
+ var originalVal = arguments.length > 5 ? arguments[5] : void 0, _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, {
3590
3597
  viewProps,
3591
3598
  styleProps: styleProps2,
3592
3599
  staticConfig,
@@ -3595,8 +3602,10 @@ function mergeStyle(styleState, key, val, importance) {
3595
3602
  if (!(existingImportance > importance)) {
3596
3603
  var contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
3597
3604
  if (contextProps && key in contextProps) {
3598
- var _styleState;
3599
- (_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {}), styleState.overriddenContextProps[key] = val;
3605
+ var _styleState_originalContextPropValues, _styleState;
3606
+ (_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {});
3607
+ var originalFromState = (_styleState_originalContextPropValues = styleState.originalContextPropValues) === null || _styleState_originalContextPropValues === void 0 ? void 0 : _styleState_originalContextPropValues[key], _ref;
3608
+ styleState.overriddenContextProps[key] = (_ref = originalVal != null ? originalVal : originalFromState) !== null && _ref !== void 0 ? _ref : val;
3600
3609
  }
3601
3610
  if (key in stylePropsTransform) {
3602
3611
  var _styleState1;
@@ -3622,14 +3631,14 @@ var getSubStyle = function(styleState, subKey, styleIn, avoidMergeTransform) {
3622
3631
  key1 = conf2.shorthands[key1] || key1;
3623
3632
  var shouldSkip = !staticConfig.isHOC && key1 in skipProps && !styleProps2.noSkip;
3624
3633
  if (shouldSkip) return key = key1, "continue";
3625
- propMapper(key1, val, styleState, false, function(skey, sval) {
3626
- skey in validPseudoKeys && (sval = getSubStyle(styleState, skey, sval, avoidMergeTransform)), !avoidMergeTransform && skey in stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps2.noNormalize ? sval : normalizeValueWithProperty$1(sval);
3634
+ propMapper(key1, val, styleState, false, function(skey, sval, originalVal) {
3635
+ originalVal !== void 0 && (originalValues || (originalValues = {}), originalValues[skey] = originalVal), skey in validPseudoKeys && (sval = getSubStyle(styleState, skey, sval, avoidMergeTransform)), !avoidMergeTransform && skey in stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps2.noNormalize ? sval : normalizeValueWithProperty$1(sval);
3627
3636
  }), key = key1;
3628
3637
  }, {
3629
3638
  staticConfig,
3630
3639
  conf: conf2,
3631
3640
  styleProps: styleProps2
3632
- } = styleState, styleOut = {};
3641
+ } = styleState, styleOut = {}, originalValues;
3633
3642
  for (var key in styleIn) _loop2(key);
3634
3643
  if (!avoidMergeTransform) {
3635
3644
  if (Array.isArray(styleOut.transform)) {
@@ -3638,7 +3647,7 @@ var getSubStyle = function(styleState, subKey, styleIn, avoidMergeTransform) {
3638
3647
  }
3639
3648
  styleState.flatTransforms && mergeFlatTransforms(styleOut, styleState.flatTransforms);
3640
3649
  }
3641
- return styleProps2.noNormalize || fixStyles(styleOut), styleOut;
3650
+ return styleProps2.noNormalize || fixStyles(styleOut), originalValues && styleOriginalValues.set(styleOut, originalValues), styleOut;
3642
3651
  }, useSplitStyles = function(a, b2, c, d, e2, f, g, h2, i, j, k, l) {
3643
3652
  var res = getSplitStyles(a, b2, c, d, e2, f, g, h2, i, j, k, l);
3644
3653
  return res;
@@ -3675,15 +3684,16 @@ function passDownProp(viewProps, key, val) {
3675
3684
  delete viewProps[key], viewProps[key] = next;
3676
3685
  } else viewProps[key] = val;
3677
3686
  }
3678
- function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, importanceBump, debugProp) {
3687
+ function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, importanceBump, debugProp, originalVal) {
3679
3688
  styleState.usedKeys;
3680
3689
  var importance = getMediaImportanceIfMoreImportant(mediaKey, key, styleState, isSizeMedia);
3681
3690
  if (importanceBump && (importance = (importance || 0) + importanceBump), importance === null) return false;
3682
3691
  if (key in pseudoDescriptors) {
3683
3692
  var descriptor = pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled2 = styleState.componentState[descriptorKey] === false;
3684
3693
  if (isDisabled2) return false;
3685
- for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance);
3686
- } else mergeStyle(styleState, key, value, importance);
3694
+ var pseudoOriginalValues = styleOriginalValues.get(value);
3695
+ for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance, false, pseudoOriginalValues == null ? void 0 : pseudoOriginalValues[subKey]);
3696
+ } else mergeStyle(styleState, key, value, importance, false, originalVal);
3687
3697
  return true;
3688
3698
  }
3689
3699
  function normalizeStyle(style) {
@@ -11003,8 +11013,8 @@ var AlertDialogPortal = function(props) {
11003
11013
  scope,
11004
11014
  cancelRef,
11005
11015
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, __spreadProps(__spreadValues({
11006
- // @ts-ignore
11007
11016
  role: "alertdialog",
11017
+ "aria-modal": true,
11008
11018
  scope: dialogScope
11009
11019
  }, contentProps), {
11010
11020
  ref: composedRefs,
@@ -11266,10 +11276,10 @@ var AVATAR_NAME = "Avatar", [createAvatarContext, createAvatarScope] = createCon
11266
11276
  }
11267
11277
  )) === null || _getShapeSize === void 0 ? void 0 : _getShapeSize.width);
11268
11278
  return React__namespace.useEffect(function() {
11269
- setStatus("idle");
11279
+ setStatus(src ? "idle" : "error");
11270
11280
  }, [JSON.stringify(src)]), React__namespace.useEffect(function() {
11271
11281
  onLoadingStatusChange(status), context2.onImageLoadingStatusChange(status);
11272
- }, [status]), /* @__PURE__ */ jsxRuntimeExports.jsx(YStack, {
11282
+ }, [status]), src ? /* @__PURE__ */ jsxRuntimeExports.jsx(YStack, {
11273
11283
  fullscreen: true,
11274
11284
  zIndex: 1,
11275
11285
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Image, __spreadProps(__spreadValues(__spreadValues({
@@ -11292,7 +11302,7 @@ var AVATAR_NAME = "Avatar", [createAvatarContext, createAvatarScope] = createCon
11292
11302
  setStatus("loaded");
11293
11303
  }
11294
11304
  }))
11295
- });
11305
+ }) : null;
11296
11306
  });
11297
11307
  AvatarImage.displayName = IMAGE_NAME;
11298
11308
  var FALLBACK_NAME = "AvatarFallback", AvatarFallbackFrame = styled(YStack, {
@@ -16395,16 +16405,6 @@ var TABS_NAME = "Tabs", DefaultTabsFrame = styled(SizableStack, {
16395
16405
  pointerEvents: "none"
16396
16406
  }
16397
16407
  },
16398
- active: {
16399
- true: {
16400
- hoverStyle: {
16401
- backgroundColor: "$background"
16402
- },
16403
- focusStyle: {
16404
- backgroundColor: "$background"
16405
- }
16406
- }
16407
- },
16408
16408
  unstyled: {
16409
16409
  false: {
16410
16410
  borderWidth: 0,
package/dist/test.cjs CHANGED
@@ -3291,14 +3291,16 @@ var propMapper = function(key, value, styleState, disabled, map) {
3291
3291
  return;
3292
3292
  }
3293
3293
  }
3294
- if (styleProps2.disableExpandShorthands || key in conf2.shorthands && (key = conf2.shorthands[key]), value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : isVariable(value) && (value = resolveVariableValue(key, value, styleProps2.resolveValues))), value != null) {
3294
+ styleProps2.disableExpandShorthands || key in conf2.shorthands && (key = conf2.shorthands[key]);
3295
+ var originalValue = value;
3296
+ if (value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : isVariable(value) && (value = resolveVariableValue(key, value, styleProps2.resolveValues))), value != null) {
3295
3297
  key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
3296
3298
  var expanded = styleProps2.noExpand ? null : expandStyle(key, value);
3297
3299
  if (expanded) for (var max2 = expanded.length, i = 0; i < max2; i++) {
3298
3300
  var [nkey, nvalue] = expanded[i];
3299
- map(nkey, nvalue);
3301
+ map(nkey, nvalue, originalValue);
3300
3302
  }
3301
- else map(key, value);
3303
+ else map(key, value, originalValue);
3302
3304
  }
3303
3305
  }
3304
3306
  }, resolveVariants = function(key, value, styleProps2, styleState, parentVariantKey) {
@@ -3358,7 +3360,10 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
3358
3360
  if (!(!styleProps2.noSkip && subKey in skipProps)) {
3359
3361
  if (staticConfig) {
3360
3362
  var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
3361
- contextProps && subKey in contextProps && (styleState.overriddenContextProps || (styleState.overriddenContextProps = {}), styleState.overriddenContextProps[subKey] = val);
3363
+ if (contextProps && subKey in contextProps) {
3364
+ var _styleState, _styleState1;
3365
+ (_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {}), styleState.overriddenContextProps[subKey] = val, (_styleState1 = styleState).originalContextPropValues || (_styleState1.originalContextPropValues = {}), styleState.originalContextPropValues[subKey] = val;
3366
+ }
3362
3367
  }
3363
3368
  if (styleProps2.noExpand) res[subKey] = val;
3364
3369
  else if (variants2 && subKey in variants2) {
@@ -3523,7 +3528,7 @@ function _type_of$5(obj) {
3523
3528
  "@swc/helpers - typeof";
3524
3529
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
3525
3530
  }
3526
- var conf;
3531
+ var conf, styleOriginalValues = /* @__PURE__ */ new WeakMap();
3527
3532
  function normalizeGroupKey(key, groupContext) {
3528
3533
  var parts = key.split("-"), plen = parts.length;
3529
3534
  if (
@@ -3571,7 +3576,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3571
3576
  if (!noSkip && keyInit in skipProps) return "continue";
3572
3577
  (isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
3573
3578
  var disablePropMap = isMediaOrPseudo || !isStyleLikeKey;
3574
- if (propMapper(keyInit, valInit, styleState, disablePropMap, function(key4, val2) {
3579
+ if (propMapper(keyInit, valInit, styleState, disablePropMap, function(key4, val2, originalVal) {
3575
3580
  var _parentStaticConfig_variants, isStyledContextProp = styledContext && key4 in styledContext;
3576
3581
  if (!isHOC && disablePropMap && !isStyledContextProp && !isMediaOrPseudo) {
3577
3582
  viewProps[key4] = val2;
@@ -3583,7 +3588,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3583
3588
  return;
3584
3589
  }
3585
3590
  if (!isHOC && isValidStyleKey(key4, validStyles$1, accept) || isAndroid && key4 === "elevation") {
3586
- mergeStyle(styleState, key4, val2, 1);
3591
+ mergeStyle(styleState, key4, val2, 1, false, originalVal);
3587
3592
  return;
3588
3593
  }
3589
3594
  if (isPseudo = key4 in validPseudoKeys, isMedia = isPseudo ? false : getMediaKey(key4), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants2 && key4 in variants2, isMedia === "group" && (key4 = normalizeGroupKey(key4, groupContext)), (inlineProps == null ? void 0 : inlineProps.has(key4)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened == null ? void 0 : inlineWhenUnflattened.has(key4))) {
@@ -3610,7 +3615,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3610
3615
  {
3611
3616
  var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled2 = componentState[descriptorKey] === false;
3612
3617
  isExit && (isDisabled2 = !styleProps2.isExiting), isEnter && componentState.unmounted === false && (isDisabled2 = true);
3613
- var importance = descriptor.priority;
3618
+ var importance = descriptor.priority, pseudoOriginalValues = styleOriginalValues.get(pseudoStyleObject);
3614
3619
  for (var pkey in pseudoStyleObject) {
3615
3620
  var _$val = pseudoStyleObject[pkey];
3616
3621
  if (isDisabled2) applyDefaultStyle(pkey, styleState);
@@ -3621,7 +3626,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3621
3626
  var _pseudos1, _key1;
3622
3627
  pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = _$val;
3623
3628
  }
3624
- mergeStyle(styleState, pkey, _$val, importance);
3629
+ mergeStyle(styleState, pkey, _$val, importance, false, pseudoOriginalValues == null ? void 0 : pseudoOriginalValues[pkey]);
3625
3630
  }
3626
3631
  }
3627
3632
  }
@@ -3640,10 +3645,10 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3640
3645
  var priority = mediaStylesSeen;
3641
3646
  if (mediaStylesSeen += 1, shouldDoClasses) ;
3642
3647
  else {
3643
- let mergeMediaStyle2 = function(key5, val3) {
3648
+ let mergeMediaStyle2 = function(key5, val3, originalVal2) {
3644
3649
  var _styleState4;
3645
3650
  (_styleState4 = styleState).style || (_styleState4.style = {});
3646
- var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, mediaState[mediaKeyShort], importanceBump);
3651
+ var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, mediaState[mediaKeyShort], importanceBump, debug, originalVal2);
3647
3652
  didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
3648
3653
  };
3649
3654
  var isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
@@ -3657,14 +3662,14 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3657
3662
  if (dynamicThemeAccess = true, isIos && getSetting("fastSchemeChange")) {
3658
3663
  var _styleState3;
3659
3664
  (_styleState3 = styleState).style || (_styleState3.style = {});
3660
- var scheme = mediaKeyShort, oppositeScheme = getOppositeScheme(mediaKeyShort);
3665
+ var scheme = mediaKeyShort, oppositeScheme = getOppositeScheme(mediaKeyShort), themeOriginalValues = styleOriginalValues.get(mediaStyle1);
3661
3666
  for (var subKey1 in mediaStyle1) {
3662
3667
  var _$val1 = extractValueFromDynamic(mediaStyle1[subKey1], scheme), oppositeVal = extractValueFromDynamic(styleState.style[subKey1], oppositeScheme);
3663
3668
  mediaStyle1[subKey1] = getDynamicVal({
3664
3669
  scheme,
3665
3670
  val: _$val1,
3666
3671
  oppositeVal
3667
- }), mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority);
3672
+ }), mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority, false, themeOriginalValues == null ? void 0 : themeOriginalValues[subKey1]);
3668
3673
  }
3669
3674
  } else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
3670
3675
  } else if (isGroupMedia) {
@@ -3694,6 +3699,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3694
3699
  importanceBump = priority1;
3695
3700
  }
3696
3701
  }
3702
+ var mediaOriginalValues = styleOriginalValues.get(mediaStyle1);
3697
3703
  for (var subKey2 in mediaStyle1) {
3698
3704
  if (subKey2 === "space") {
3699
3705
  space = valInit.space;
@@ -3701,8 +3707,9 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3701
3707
  }
3702
3708
  if (subKey2[0] === "$") {
3703
3709
  if (!isActivePlatform(subKey2) || !isActiveTheme(subKey2, themeName)) continue;
3704
- for (var subSubKey in mediaStyle1[subKey2]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey2][subSubKey]);
3705
- } else mergeMediaStyle2(subKey2, mediaStyle1[subKey2]);
3710
+ var subOriginalValues = styleOriginalValues.get(mediaStyle1[subKey2]);
3711
+ for (var subSubKey in mediaStyle1[subKey2]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey2][subSubKey], subOriginalValues == null ? void 0 : subOriginalValues[subSubKey]);
3712
+ } else mergeMediaStyle2(subKey2, mediaStyle1[subKey2], mediaOriginalValues == null ? void 0 : mediaOriginalValues[subKey2]);
3706
3713
  }
3707
3714
  }
3708
3715
  return;
@@ -3828,7 +3835,7 @@ function mergeFlatTransforms(target, flatTransforms) {
3828
3835
  });
3829
3836
  }
3830
3837
  function mergeStyle(styleState, key, val, importance) {
3831
- var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, {
3838
+ var originalVal = arguments.length > 5 ? arguments[5] : void 0, _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, {
3832
3839
  viewProps,
3833
3840
  styleProps: styleProps2,
3834
3841
  staticConfig,
@@ -3837,8 +3844,10 @@ function mergeStyle(styleState, key, val, importance) {
3837
3844
  if (!(existingImportance > importance)) {
3838
3845
  var contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
3839
3846
  if (contextProps && key in contextProps) {
3840
- var _styleState;
3841
- (_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {}), styleState.overriddenContextProps[key] = val;
3847
+ var _styleState_originalContextPropValues, _styleState;
3848
+ (_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {});
3849
+ var originalFromState = (_styleState_originalContextPropValues = styleState.originalContextPropValues) === null || _styleState_originalContextPropValues === void 0 ? void 0 : _styleState_originalContextPropValues[key], _ref;
3850
+ styleState.overriddenContextProps[key] = (_ref = originalVal != null ? originalVal : originalFromState) !== null && _ref !== void 0 ? _ref : val;
3842
3851
  }
3843
3852
  if (key in stylePropsTransform) {
3844
3853
  var _styleState1;
@@ -3864,14 +3873,14 @@ var getSubStyle = function(styleState, subKey, styleIn, avoidMergeTransform) {
3864
3873
  key1 = conf2.shorthands[key1] || key1;
3865
3874
  var shouldSkip = !staticConfig.isHOC && key1 in skipProps && !styleProps2.noSkip;
3866
3875
  if (shouldSkip) return key = key1, "continue";
3867
- propMapper(key1, val, styleState, false, function(skey, sval) {
3868
- skey in validPseudoKeys && (sval = getSubStyle(styleState, skey, sval, avoidMergeTransform)), !avoidMergeTransform && skey in stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps2.noNormalize ? sval : normalizeValueWithProperty$1(sval);
3876
+ propMapper(key1, val, styleState, false, function(skey, sval, originalVal) {
3877
+ originalVal !== void 0 && (originalValues || (originalValues = {}), originalValues[skey] = originalVal), skey in validPseudoKeys && (sval = getSubStyle(styleState, skey, sval, avoidMergeTransform)), !avoidMergeTransform && skey in stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps2.noNormalize ? sval : normalizeValueWithProperty$1(sval);
3869
3878
  }), key = key1;
3870
3879
  }, {
3871
3880
  staticConfig,
3872
3881
  conf: conf2,
3873
3882
  styleProps: styleProps2
3874
- } = styleState, styleOut = {};
3883
+ } = styleState, styleOut = {}, originalValues;
3875
3884
  for (var key in styleIn) _loop2(key);
3876
3885
  if (!avoidMergeTransform) {
3877
3886
  if (Array.isArray(styleOut.transform)) {
@@ -3880,7 +3889,7 @@ var getSubStyle = function(styleState, subKey, styleIn, avoidMergeTransform) {
3880
3889
  }
3881
3890
  styleState.flatTransforms && mergeFlatTransforms(styleOut, styleState.flatTransforms);
3882
3891
  }
3883
- return styleProps2.noNormalize || fixStyles(styleOut), styleOut;
3892
+ return styleProps2.noNormalize || fixStyles(styleOut), originalValues && styleOriginalValues.set(styleOut, originalValues), styleOut;
3884
3893
  }, useSplitStyles = function(a, b2, c, d, e2, f, g, h2, i, j, k, l) {
3885
3894
  var res = getSplitStyles(a, b2, c, d, e2, f, g, h2, i, j, k, l);
3886
3895
  return res;
@@ -3917,15 +3926,16 @@ function passDownProp(viewProps, key, val) {
3917
3926
  delete viewProps[key], viewProps[key] = next;
3918
3927
  } else viewProps[key] = val;
3919
3928
  }
3920
- function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, importanceBump, debugProp) {
3929
+ function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, importanceBump, debugProp, originalVal) {
3921
3930
  styleState.usedKeys;
3922
3931
  var importance = getMediaImportanceIfMoreImportant(mediaKey, key, styleState, isSizeMedia);
3923
3932
  if (importanceBump && (importance = (importance || 0) + importanceBump), importance === null) return false;
3924
3933
  if (key in pseudoDescriptors) {
3925
3934
  var descriptor = pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled2 = styleState.componentState[descriptorKey] === false;
3926
3935
  if (isDisabled2) return false;
3927
- for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance);
3928
- } else mergeStyle(styleState, key, value, importance);
3936
+ var pseudoOriginalValues = styleOriginalValues.get(value);
3937
+ for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance, false, pseudoOriginalValues == null ? void 0 : pseudoOriginalValues[subKey]);
3938
+ } else mergeStyle(styleState, key, value, importance, false, originalVal);
3929
3939
  return true;
3930
3940
  }
3931
3941
  function normalizeStyle(style) {
@@ -11151,8 +11161,8 @@ var AlertDialogPortal = function(props) {
11151
11161
  scope,
11152
11162
  cancelRef,
11153
11163
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, __spreadProps(__spreadValues({
11154
- // @ts-ignore
11155
11164
  role: "alertdialog",
11165
+ "aria-modal": true,
11156
11166
  scope: dialogScope
11157
11167
  }, contentProps), {
11158
11168
  ref: composedRefs,
@@ -11414,10 +11424,10 @@ var AVATAR_NAME = "Avatar", [createAvatarContext, createAvatarScope] = createCon
11414
11424
  }
11415
11425
  )) === null || _getShapeSize === void 0 ? void 0 : _getShapeSize.width);
11416
11426
  return React__namespace.useEffect(function() {
11417
- setStatus("idle");
11427
+ setStatus(src ? "idle" : "error");
11418
11428
  }, [JSON.stringify(src)]), React__namespace.useEffect(function() {
11419
11429
  onLoadingStatusChange(status), context2.onImageLoadingStatusChange(status);
11420
- }, [status]), /* @__PURE__ */ jsxRuntimeExports.jsx(YStack, {
11430
+ }, [status]), src ? /* @__PURE__ */ jsxRuntimeExports.jsx(YStack, {
11421
11431
  fullscreen: true,
11422
11432
  zIndex: 1,
11423
11433
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Image, __spreadProps(__spreadValues(__spreadValues({
@@ -11440,7 +11450,7 @@ var AVATAR_NAME = "Avatar", [createAvatarContext, createAvatarScope] = createCon
11440
11450
  setStatus("loaded");
11441
11451
  }
11442
11452
  }))
11443
- });
11453
+ }) : null;
11444
11454
  });
11445
11455
  AvatarImage.displayName = IMAGE_NAME;
11446
11456
  var FALLBACK_NAME = "AvatarFallback", AvatarFallbackFrame = styled(YStack, {
@@ -16543,16 +16553,6 @@ var TABS_NAME = "Tabs", DefaultTabsFrame = styled(SizableStack, {
16543
16553
  pointerEvents: "none"
16544
16554
  }
16545
16555
  },
16546
- active: {
16547
- true: {
16548
- hoverStyle: {
16549
- backgroundColor: "$background"
16550
- },
16551
- focusStyle: {
16552
- backgroundColor: "$background"
16553
- }
16554
- }
16555
- },
16556
16556
  unstyled: {
16557
16557
  false: {
16558
16558
  borderWidth: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamagui",
3
- "version": "1.138.4",
3
+ "version": "1.138.6",
4
4
  "type": "module",
5
5
  "description": "Style and UI for React (web and native) meet an optimizing compiler",
6
6
  "removeSideEffects": true,
@@ -81,62 +81,62 @@
81
81
  }
82
82
  },
83
83
  "dependencies": {
84
- "@tamagui/accordion": "1.138.4",
85
- "@tamagui/adapt": "1.138.4",
86
- "@tamagui/alert-dialog": "1.138.4",
87
- "@tamagui/animate-presence": "1.138.4",
88
- "@tamagui/avatar": "1.138.4",
89
- "@tamagui/button": "1.138.4",
90
- "@tamagui/card": "1.138.4",
91
- "@tamagui/checkbox": "1.138.4",
92
- "@tamagui/compose-refs": "1.138.4",
93
- "@tamagui/constants": "1.138.4",
94
- "@tamagui/core": "1.138.4",
95
- "@tamagui/create-context": "1.138.4",
96
- "@tamagui/dialog": "1.138.4",
97
- "@tamagui/elements": "1.138.4",
98
- "@tamagui/fake-react-native": "1.138.4",
99
- "@tamagui/focusable": "1.138.4",
100
- "@tamagui/font-size": "1.138.4",
101
- "@tamagui/form": "1.138.4",
102
- "@tamagui/get-button-sized": "1.138.4",
103
- "@tamagui/get-font-sized": "1.138.4",
104
- "@tamagui/get-token": "1.138.4",
105
- "@tamagui/group": "1.138.4",
106
- "@tamagui/helpers-tamagui": "1.138.4",
107
- "@tamagui/image": "1.138.4",
108
- "@tamagui/label": "1.138.4",
109
- "@tamagui/linear-gradient": "1.138.4",
110
- "@tamagui/list-item": "1.138.4",
111
- "@tamagui/polyfill-dev": "1.138.4",
112
- "@tamagui/popover": "1.138.4",
113
- "@tamagui/popper": "1.138.4",
114
- "@tamagui/portal": "1.138.4",
115
- "@tamagui/progress": "1.138.4",
116
- "@tamagui/radio-group": "1.138.4",
117
- "@tamagui/react-native-media-driver": "1.138.4",
118
- "@tamagui/scroll-view": "1.138.4",
119
- "@tamagui/select": "1.138.4",
120
- "@tamagui/separator": "1.138.4",
121
- "@tamagui/shapes": "1.138.4",
122
- "@tamagui/sheet": "1.138.4",
123
- "@tamagui/slider": "1.138.4",
124
- "@tamagui/stacks": "1.138.4",
125
- "@tamagui/switch": "1.138.4",
126
- "@tamagui/tabs": "1.138.4",
127
- "@tamagui/text": "1.138.4",
128
- "@tamagui/theme": "1.138.4",
129
- "@tamagui/toggle-group": "1.138.4",
130
- "@tamagui/tooltip": "1.138.4",
131
- "@tamagui/use-controllable-state": "1.138.4",
132
- "@tamagui/use-debounce": "1.138.4",
133
- "@tamagui/use-force-update": "1.138.4",
134
- "@tamagui/use-window-dimensions": "1.138.4",
135
- "@tamagui/visually-hidden": "1.138.4",
136
- "@tamagui/z-index-stack": "1.138.4"
84
+ "@tamagui/accordion": "1.138.6",
85
+ "@tamagui/adapt": "1.138.6",
86
+ "@tamagui/alert-dialog": "1.138.6",
87
+ "@tamagui/animate-presence": "1.138.6",
88
+ "@tamagui/avatar": "1.138.6",
89
+ "@tamagui/button": "1.138.6",
90
+ "@tamagui/card": "1.138.6",
91
+ "@tamagui/checkbox": "1.138.6",
92
+ "@tamagui/compose-refs": "1.138.6",
93
+ "@tamagui/constants": "1.138.6",
94
+ "@tamagui/core": "1.138.6",
95
+ "@tamagui/create-context": "1.138.6",
96
+ "@tamagui/dialog": "1.138.6",
97
+ "@tamagui/elements": "1.138.6",
98
+ "@tamagui/fake-react-native": "1.138.6",
99
+ "@tamagui/focusable": "1.138.6",
100
+ "@tamagui/font-size": "1.138.6",
101
+ "@tamagui/form": "1.138.6",
102
+ "@tamagui/get-button-sized": "1.138.6",
103
+ "@tamagui/get-font-sized": "1.138.6",
104
+ "@tamagui/get-token": "1.138.6",
105
+ "@tamagui/group": "1.138.6",
106
+ "@tamagui/helpers-tamagui": "1.138.6",
107
+ "@tamagui/image": "1.138.6",
108
+ "@tamagui/label": "1.138.6",
109
+ "@tamagui/linear-gradient": "1.138.6",
110
+ "@tamagui/list-item": "1.138.6",
111
+ "@tamagui/polyfill-dev": "1.138.6",
112
+ "@tamagui/popover": "1.138.6",
113
+ "@tamagui/popper": "1.138.6",
114
+ "@tamagui/portal": "1.138.6",
115
+ "@tamagui/progress": "1.138.6",
116
+ "@tamagui/radio-group": "1.138.6",
117
+ "@tamagui/react-native-media-driver": "1.138.6",
118
+ "@tamagui/scroll-view": "1.138.6",
119
+ "@tamagui/select": "1.138.6",
120
+ "@tamagui/separator": "1.138.6",
121
+ "@tamagui/shapes": "1.138.6",
122
+ "@tamagui/sheet": "1.138.6",
123
+ "@tamagui/slider": "1.138.6",
124
+ "@tamagui/stacks": "1.138.6",
125
+ "@tamagui/switch": "1.138.6",
126
+ "@tamagui/tabs": "1.138.6",
127
+ "@tamagui/text": "1.138.6",
128
+ "@tamagui/theme": "1.138.6",
129
+ "@tamagui/toggle-group": "1.138.6",
130
+ "@tamagui/tooltip": "1.138.6",
131
+ "@tamagui/use-controllable-state": "1.138.6",
132
+ "@tamagui/use-debounce": "1.138.6",
133
+ "@tamagui/use-force-update": "1.138.6",
134
+ "@tamagui/use-window-dimensions": "1.138.6",
135
+ "@tamagui/visually-hidden": "1.138.6",
136
+ "@tamagui/z-index-stack": "1.138.6"
137
137
  },
138
138
  "devDependencies": {
139
- "@tamagui/build": "1.138.4",
139
+ "@tamagui/build": "1.138.6",
140
140
  "react": "*",
141
141
  "react-native": "0.81.5",
142
142
  "react-native-web": "^0.21.0"