tamagui 1.129.13 → 1.129.14

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.
@@ -2795,39 +2795,39 @@ var require_pseudoDescriptors_native = __commonJS({
2795
2795
  // order of keys here important! in priority order
2796
2796
  hoverStyle: {
2797
2797
  name: "hover",
2798
- priority: 1
2798
+ priority: 2
2799
2799
  },
2800
2800
  pressStyle: {
2801
2801
  name: "active",
2802
2802
  stateKey: "press",
2803
- priority: 2
2803
+ priority: 3
2804
2804
  },
2805
2805
  focusVisibleStyle: {
2806
2806
  name: "focus-visible",
2807
- priority: 3,
2807
+ priority: 4,
2808
2808
  stateKey: "focusVisible"
2809
2809
  },
2810
2810
  focusStyle: {
2811
2811
  name: "focus",
2812
- priority: 3
2812
+ priority: 4
2813
2813
  },
2814
2814
  focusWithinStyle: {
2815
2815
  name: "focus-within",
2816
- priority: 3,
2816
+ priority: 4,
2817
2817
  stateKey: "focusWithin"
2818
2818
  },
2819
2819
  disabledStyle: {
2820
2820
  name: "disabled",
2821
- priority: 4,
2821
+ priority: 5,
2822
2822
  stateKey: "disabled"
2823
2823
  }
2824
2824
  }, pseudoPriorities = {
2825
- hover: 1,
2826
- press: 2,
2827
- focus: 3,
2828
- focusVisible: 3,
2829
- focusWithin: 3,
2830
- disabled: 4
2825
+ hover: pseudoDescriptorsBase.hoverStyle.priority,
2826
+ press: pseudoDescriptorsBase.pressStyle.priority,
2827
+ focus: pseudoDescriptorsBase.focusStyle.priority,
2828
+ focusVisible: pseudoDescriptorsBase.focusVisibleStyle.priority,
2829
+ focusWithin: pseudoDescriptorsBase.focusWithinStyle.priority,
2830
+ disabled: pseudoDescriptorsBase.disabledStyle.priority
2831
2831
  }, pseudoDescriptors = {
2832
2832
  ...pseudoDescriptorsBase,
2833
2833
  enterStyle: {
@@ -3062,9 +3062,9 @@ var require_useMedia_native = __commonJS({
3062
3062
  }
3063
3063
  return res;
3064
3064
  }
3065
- var getMediaImportanceIfMoreImportant = function(mediaKey, key, importancesUsed, isSizeMedia) {
3066
- var importance = isSizeMedia && !(0, import_config.getSetting)("mediaPropOrder") ? getMediaKeyImportance(mediaKey) : defaultMediaImportance;
3067
- return !importancesUsed[key] || importance > importancesUsed[key] ? importance : null;
3065
+ var getMediaImportanceIfMoreImportant = function(mediaKey, key, styleState, isSizeMedia) {
3066
+ var importance = isSizeMedia && !(0, import_config.getSetting)("mediaPropOrder") ? getMediaKeyImportance(mediaKey) : defaultMediaImportance, usedKeys = styleState.usedKeys;
3067
+ return !usedKeys[key] || importance > usedKeys[key] ? importance : null;
3068
3068
  };
3069
3069
  function camelToHyphen(str) {
3070
3070
  return str.replace(/[A-Z]/g, function(m) {
@@ -6257,7 +6257,7 @@ var require_getSplitStyles_native = __commonJS({
6257
6257
  if (keyInit === "group" && !1) var identifier2, containerType, containerCSS;
6258
6258
  return "continue";
6259
6259
  }
6260
- var valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles, accept);
6260
+ var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles, accept);
6261
6261
  if (0) var _viewProps2, _dataSet;
6262
6262
  if (!isValidStyleKeyInit) {
6263
6263
  if (!import_constants4.isAndroid && keyInit === "elevationAndroid") return "continue";
@@ -6271,13 +6271,13 @@ var require_getSplitStyles_native = __commonJS({
6271
6271
  if (0) var didUseKeyInit;
6272
6272
  var isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo = !!(isMedia || isPseudo);
6273
6273
  if (isMediaOrPseudo && keyInit.startsWith("$group-")) {
6274
- var parts = keyInit.split("-");
6274
+ var parts = keyInit.split("-"), plen = parts.length;
6275
6275
  if (
6276
6276
  // check if its actually a simple group selector to avoid breaking selectors
6277
- parts.length === 2 || parts.length === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
6277
+ plen === 2 || plen === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
6278
6278
  ) {
6279
6279
  var name2 = parts[1];
6280
- groupContext != null && groupContext[name2] || (keyInit = keyInit.replace("$group-", "$group-true-"));
6280
+ groupContext && !(groupContext != null && groupContext[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
6281
6281
  }
6282
6282
  }
6283
6283
  var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
@@ -6348,7 +6348,7 @@ var require_getSplitStyles_native = __commonJS({
6348
6348
  var _$val = pseudoStyleObject[pkey];
6349
6349
  if (isDisabled) applyDefaultStyle(pkey, styleState);
6350
6350
  else {
6351
- var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
6351
+ var curImportance = styleState.usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
6352
6352
  if (shouldMerge) {
6353
6353
  if (process.env.IS_STATIC === "is_static") {
6354
6354
  var _pseudos1, _key1;
@@ -6360,7 +6360,7 @@ var require_getSplitStyles_native = __commonJS({
6360
6360
  }
6361
6361
  if (!isDisabled) for (var _$key in val2) {
6362
6362
  var k = shorthands[_$key] || _$key;
6363
- usedKeys[k] = Math.max(importance, usedKeys[k] || 0);
6363
+ styleState.usedKeys[k] = Math.max(importance, styleState.usedKeys[k] || 0);
6364
6364
  }
6365
6365
  }
6366
6366
  return;
@@ -6373,8 +6373,8 @@ var require_getSplitStyles_native = __commonJS({
6373
6373
  if (mediaStylesSeen += 1, shouldDoClasses) {
6374
6374
  var mediaStyle = getSubStyle(styleState, key4, val2, !1);
6375
6375
  if (hasSpace && (delete mediaStyle.space, mediaState3[mediaKeyShort])) {
6376
- var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
6377
- importance1 && (space = val2.space, usedKeys.space = importance1);
6376
+ var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", styleState, !0);
6377
+ importance1 && (space = val2.space, styleState.usedKeys.space = importance1);
6378
6378
  }
6379
6379
  var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle), _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
6380
6380
  try {
@@ -6398,7 +6398,7 @@ var require_getSplitStyles_native = __commonJS({
6398
6398
  var mergeMediaStyle2 = function(key5, val3) {
6399
6399
  var _styleState4;
6400
6400
  (_styleState4 = styleState).style || (_styleState4.style = {});
6401
- var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, usedKeys, mediaState3[mediaKeyShort], importanceBump, debug);
6401
+ var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, mediaState3[mediaKeyShort], importanceBump, debug);
6402
6402
  didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
6403
6403
  }, mergeMediaStyle = mergeMediaStyle2, isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
6404
6404
  if (!isThemeMedia && !isPlatformMedia && !isGroupMedia && !mediaState3[mediaKeyShort])
@@ -6467,7 +6467,7 @@ var require_getSplitStyles_native = __commonJS({
6467
6467
  conf = conf || (0, import_config.getConfig)();
6468
6468
  var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
6469
6469
  import_constants4.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
6470
- var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClass && !styleProps.isAnimated, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles), styleState = {
6470
+ var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClass && !styleProps.isAnimated, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles), styleState = {
6471
6471
  classNames,
6472
6472
  conf,
6473
6473
  props,
@@ -6476,7 +6476,7 @@ var require_getSplitStyles_native = __commonJS({
6476
6476
  staticConfig,
6477
6477
  style: null,
6478
6478
  theme,
6479
- usedKeys,
6479
+ usedKeys: {},
6480
6480
  viewProps,
6481
6481
  context: componentContext,
6482
6482
  debug
@@ -6585,10 +6585,10 @@ var require_getSplitStyles_native = __commonJS({
6585
6585
  });
6586
6586
  }
6587
6587
  function mergeStyle(styleState, key, val, importance) {
6588
- var disableNormalize = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, { viewProps, styleProps, staticConfig } = styleState, existingImportance = styleState.usedKeys[key];
6589
- if (!(importance < existingImportance)) if (key in import_helpers.stylePropsTransform) {
6590
- var _styleState, _styleState_usedKeys, _key;
6591
- (_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), (_styleState_usedKeys = styleState.usedKeys)[_key = key] || (_styleState_usedKeys[_key] = 1), styleState.flatTransforms[key] = val;
6588
+ var disableNormalize = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, { viewProps, styleProps, staticConfig, usedKeys } = styleState, existingImportance = usedKeys[key] || 0;
6589
+ if (!(existingImportance > importance)) if (key in import_helpers.stylePropsTransform) {
6590
+ var _styleState;
6591
+ (_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), usedKeys[key] = importance, styleState.flatTransforms[key] = val;
6592
6592
  } else {
6593
6593
  var shouldNormalize = import_constants4.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
6594
6594
  if (
@@ -6596,8 +6596,8 @@ var require_getSplitStyles_native = __commonJS({
6596
6596
  staticConfig.accept && key in staticConfig.accept
6597
6597
  ) viewProps[key] = out;
6598
6598
  else {
6599
- var _styleState1, _styleState_usedKeys1, _key1;
6600
- (_styleState1 = styleState).style || (_styleState1.style = {}), (_styleState_usedKeys1 = styleState.usedKeys)[_key1 = key] || (_styleState_usedKeys1[_key1] = 1), styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
6599
+ var _styleState1;
6600
+ (_styleState1 = styleState).style || (_styleState1.style = {}), usedKeys[key] = importance, styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
6601
6601
  // if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
6602
6602
  key === "transform" && Array.isArray(out) ? [
6603
6603
  ...out
@@ -6674,10 +6674,10 @@ var require_getSplitStyles_native = __commonJS({
6674
6674
  delete viewProps[key], viewProps[key] = next;
6675
6675
  } else viewProps[key] = val;
6676
6676
  }
6677
- function mergeMediaByImportance(styleState, mediaKey, key, value, usedKeys, isSizeMedia, importanceBump, debugProp) {
6678
- var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, usedKeys, isSizeMedia);
6677
+ function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, importanceBump, debugProp) {
6678
+ var usedKeys = styleState.usedKeys, importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, styleState, isSizeMedia);
6679
6679
  if (importanceBump && (importance = (importance || 0) + importanceBump), importance === null) return !1;
6680
- if (usedKeys[key] = importance, key in import_pseudoDescriptors.pseudoDescriptors) {
6680
+ if (key in import_pseudoDescriptors.pseudoDescriptors) {
6681
6681
  var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
6682
6682
  if (isDisabled) return !1;
6683
6683
  for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance);
@@ -7893,9 +7893,7 @@ var require_useComponentState_native = __commonJS({
7893
7893
  var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? {
7894
7894
  ...states[0],
7895
7895
  [props.forceStyle]: !0
7896
- } : states[0], setState = states[1];
7897
- stateRef.current.nextComponentState && Object.assign(state, stateRef.current.nextComponentState);
7898
- var isAnimated = willBeAnimated;
7896
+ } : states[0], setState = states[1], isAnimated = willBeAnimated;
7899
7897
  import_constants4.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), state.disabled = disabled, setState(function(_) {
7900
7898
  return {
7901
7899
  ...state
@@ -8162,7 +8160,7 @@ var require_createComponent_native = __commonJS({
8162
8160
  }
8163
8161
  });
8164
8162
  module2.exports = __toCommonJS2(createComponent_exports);
8165
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_is_equal_shallow = require_index_native12(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_GroupContext = require_GroupContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
8163
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_is_equal_shallow = require_index_native12(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_GroupContext = require_GroupContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), NextState = /* @__PURE__ */ new WeakMap(), componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
8166
8164
  "hover",
8167
8165
  "press",
8168
8166
  "pressIn",
@@ -8176,7 +8174,7 @@ var require_createComponent_native = __commonJS({
8176
8174
  var BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
8177
8175
  value: !1
8178
8176
  };
8179
- import_constants4.isWeb && globalThis.document && (document.addEventListener("keydown", function() {
8177
+ import_constants4.isWeb && typeof document < "u" && (document.addEventListener("keydown", function() {
8180
8178
  lastInteractionWasKeyboard.value || (lastInteractionWasKeyboard.value = !0);
8181
8179
  }), document.addEventListener("mousedown", function() {
8182
8180
  lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
@@ -8225,7 +8223,12 @@ var require_createComponent_native = __commonJS({
8225
8223
  ...styledContextProps
8226
8224
  } : defaultProps, props = propsIn;
8227
8225
  curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
8228
- var componentName2 = props.componentName || staticConfig.componentName, componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), groupContextParent = import_react3.default.useContext(import_GroupContext.GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, animationDriver, staticConfig, config), { disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSS, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState, allGroupContexts = (0, import_react3.useMemo)(function() {
8226
+ var componentName2 = props.componentName || staticConfig.componentName, componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), groupContextParent = import_react3.default.useContext(import_GroupContext.GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, animationDriver, staticConfig, config), { disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSS, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState;
8227
+ hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders && (0, import_constants4.useIsomorphicLayoutEffect)(function() {
8228
+ var pendingState = NextState.get(stateRef);
8229
+ pendingState && (setStateShallow(pendingState), NextState.set(stateRef, void 0));
8230
+ });
8231
+ var allGroupContexts = (0, import_react3.useMemo)(function() {
8229
8232
  var _stateRef_current_group;
8230
8233
  if (!groupName) return groupContextParent;
8231
8234
  (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
@@ -8264,14 +8267,7 @@ var require_createComponent_native = __commonJS({
8264
8267
  stateRef,
8265
8268
  groupName,
8266
8269
  groupContextParent
8267
- ]), setStateShallow = componentState.setStateShallow, pendingState = stateRef.current.nextComponentState;
8268
- pendingState && (stateRef.current.nextComponentState = void 0, componentState.setState(function(prev) {
8269
- return {
8270
- ...prev,
8271
- ...pendingState
8272
- };
8273
- }));
8274
- var hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText), isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants4.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
8270
+ ]), setStateShallow = componentState.setStateShallow, hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText), isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants4.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
8275
8271
  animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
8276
8272
  // "needsWebStyles" basically with motion we just animate a plain div, but
8277
8273
  // we still have animated.View/Text for Sheet which wants to control
@@ -8321,7 +8317,7 @@ var require_createComponent_native = __commonJS({
8321
8317
  if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
8322
8318
  var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
8323
8319
  stateRef.current.setStateShallow = function(nextOrGetNext) {
8324
- var prev = stateRef.current.nextComponentState || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
8320
+ var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
8325
8321
  if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
8326
8322
  var canAvoidReRender = Object.keys(next).every(function(key3) {
8327
8323
  return avoidReRenderKeys.has(key3);
@@ -8331,7 +8327,7 @@ var require_createComponent_native = __commonJS({
8331
8327
  ...prev,
8332
8328
  ...next
8333
8329
  };
8334
- stateRef.current.nextComponentState = updatedState;
8330
+ NextState.set(stateRef, updatedState);
8335
8331
  var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
8336
8332
  if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !styleListener) return;
8337
8333
  var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
@@ -8461,9 +8457,7 @@ var require_createComponent_native = __commonJS({
8461
8457
  mediaGroups ? Object.keys([
8462
8458
  ...mediaGroups
8463
8459
  ]).join("") : 0
8464
- ]), hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders && (0, import_react3.useEffect)(function() {
8465
- stateRef.current.nextComponentState = void 0;
8466
- });
8460
+ ]);
8467
8461
  var groupEmitter = stateRef.current.group;
8468
8462
  (0, import_constants4.useIsomorphicLayoutEffect)(function() {
8469
8463
  !groupContext || !groupEmitter || notifyGroupSubscribers(groupContext, groupEmitter, state);
@@ -8502,24 +8496,16 @@ var require_createComponent_native = __commonJS({
8502
8496
  },
8503
8497
  ...attachFocus && {
8504
8498
  onFocus: function(e) {
8505
- componentContext.setParentFocusState && componentContext.setParentFocusState({
8506
- focusWithin: !0
8507
- }), pseudos != null && pseudos.focusVisibleStyle ? setTimeout(function() {
8508
- setStateShallow({
8509
- focus: !0,
8510
- focusVisible: !!lastInteractionWasKeyboard.value
8511
- });
8512
- }, 0) : setStateShallow({
8513
- focus: !0,
8514
- focusVisible: !1
8515
- }), onFocus == null || onFocus(e);
8499
+ var next = {};
8500
+ componentContext.setParentFocusState && (next.focusWithin = !0), pseudos != null && pseudos.focusVisibleStyle && lastInteractionWasKeyboard.value ? next.focusVisible = !0 : next.focus = !0, setStateShallow(next), onFocus == null || onFocus(e);
8516
8501
  },
8517
8502
  onBlur: function(e) {
8518
8503
  componentContext.setParentFocusState && componentContext.setParentFocusState({
8519
8504
  focusWithin: !1
8520
8505
  }), setStateShallow({
8521
8506
  focus: !1,
8522
- focusVisible: !1
8507
+ focusVisible: !1,
8508
+ focusWithin: !1
8523
8509
  }), onBlur == null || onBlur(e);
8524
8510
  }
8525
8511
  }
@@ -8560,7 +8546,7 @@ var require_createComponent_native = __commonJS({
8560
8546
  ...componentContext,
8561
8547
  setParentFocusState: setStateShallow,
8562
8548
  children: content
8563
- })), "group" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GroupContext.GroupContext.Provider, {
8549
+ })), "group" in props && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GroupContext.GroupContext.Provider, {
8564
8550
  value: allGroupContexts,
8565
8551
  children: content
8566
8552
  })), content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), staticConfig.context) {