@tamagui/core 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.
package/dist/native.js CHANGED
@@ -1882,39 +1882,39 @@ var require_pseudoDescriptors_native = __commonJS({
1882
1882
  // order of keys here important! in priority order
1883
1883
  hoverStyle: {
1884
1884
  name: "hover",
1885
- priority: 1
1885
+ priority: 2
1886
1886
  },
1887
1887
  pressStyle: {
1888
1888
  name: "active",
1889
1889
  stateKey: "press",
1890
- priority: 2
1890
+ priority: 3
1891
1891
  },
1892
1892
  focusVisibleStyle: {
1893
1893
  name: "focus-visible",
1894
- priority: 3,
1894
+ priority: 4,
1895
1895
  stateKey: "focusVisible"
1896
1896
  },
1897
1897
  focusStyle: {
1898
1898
  name: "focus",
1899
- priority: 3
1899
+ priority: 4
1900
1900
  },
1901
1901
  focusWithinStyle: {
1902
1902
  name: "focus-within",
1903
- priority: 3,
1903
+ priority: 4,
1904
1904
  stateKey: "focusWithin"
1905
1905
  },
1906
1906
  disabledStyle: {
1907
1907
  name: "disabled",
1908
- priority: 4,
1908
+ priority: 5,
1909
1909
  stateKey: "disabled"
1910
1910
  }
1911
1911
  }, pseudoPriorities = {
1912
- hover: 1,
1913
- press: 2,
1914
- focus: 3,
1915
- focusVisible: 3,
1916
- focusWithin: 3,
1917
- disabled: 4
1912
+ hover: pseudoDescriptorsBase.hoverStyle.priority,
1913
+ press: pseudoDescriptorsBase.pressStyle.priority,
1914
+ focus: pseudoDescriptorsBase.focusStyle.priority,
1915
+ focusVisible: pseudoDescriptorsBase.focusVisibleStyle.priority,
1916
+ focusWithin: pseudoDescriptorsBase.focusWithinStyle.priority,
1917
+ disabled: pseudoDescriptorsBase.disabledStyle.priority
1918
1918
  }, pseudoDescriptors = {
1919
1919
  ...pseudoDescriptorsBase,
1920
1920
  enterStyle: {
@@ -2159,9 +2159,9 @@ var require_useMedia_native = __commonJS({
2159
2159
  }
2160
2160
  return res;
2161
2161
  }
2162
- var getMediaImportanceIfMoreImportant = function(mediaKey, key, importancesUsed, isSizeMedia) {
2163
- var importance = isSizeMedia && !(0, import_config.getSetting)("mediaPropOrder") ? getMediaKeyImportance(mediaKey) : defaultMediaImportance;
2164
- return !importancesUsed[key] || importance > importancesUsed[key] ? importance : null;
2162
+ var getMediaImportanceIfMoreImportant = function(mediaKey, key, styleState, isSizeMedia) {
2163
+ var importance = isSizeMedia && !(0, import_config.getSetting)("mediaPropOrder") ? getMediaKeyImportance(mediaKey) : defaultMediaImportance, usedKeys = styleState.usedKeys;
2164
+ return !usedKeys[key] || importance > usedKeys[key] ? importance : null;
2165
2165
  };
2166
2166
  function camelToHyphen(str) {
2167
2167
  return str.replace(/[A-Z]/g, function(m) {
@@ -5442,7 +5442,7 @@ var require_getSplitStyles_native = __commonJS({
5442
5442
  if (keyInit === "group" && !1) var identifier2, containerType, containerCSS;
5443
5443
  return "continue";
5444
5444
  }
5445
- var valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles2, accept);
5445
+ var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles2, accept);
5446
5446
  if (0) var _viewProps2, _dataSet;
5447
5447
  if (!isValidStyleKeyInit) {
5448
5448
  if (!import_constants.isAndroid && keyInit === "elevationAndroid") return "continue";
@@ -5456,13 +5456,13 @@ var require_getSplitStyles_native = __commonJS({
5456
5456
  if (0) var didUseKeyInit;
5457
5457
  var isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers2.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo = !!(isMedia || isPseudo);
5458
5458
  if (isMediaOrPseudo && keyInit.startsWith("$group-")) {
5459
- var parts = keyInit.split("-");
5459
+ var parts = keyInit.split("-"), plen = parts.length;
5460
5460
  if (
5461
5461
  // check if its actually a simple group selector to avoid breaking selectors
5462
- parts.length === 2 || parts.length === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
5462
+ plen === 2 || plen === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
5463
5463
  ) {
5464
5464
  var name2 = parts[1];
5465
- groupContext != null && groupContext[name2] || (keyInit = keyInit.replace("$group-", "$group-true-"));
5465
+ groupContext && !(groupContext != null && groupContext[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
5466
5466
  }
5467
5467
  }
5468
5468
  var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
@@ -5478,6 +5478,9 @@ var require_getSplitStyles_native = __commonJS({
5478
5478
  variant: variants == null ? void 0 : variants[keyInit],
5479
5479
  isVariant,
5480
5480
  isHOCShouldPassThrough,
5481
+ usedKeys: {
5482
+ ...styleState.usedKeys
5483
+ },
5481
5484
  parentStaticConfig
5482
5485
  })), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !noSkip && keyInit in import_skipProps.skipProps) return "continue";
5483
5486
  (isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
@@ -5557,7 +5560,7 @@ var require_getSplitStyles_native = __commonJS({
5557
5560
  var _$val = pseudoStyleObject[pkey];
5558
5561
  if (isDisabled) applyDefaultStyle(pkey, styleState);
5559
5562
  else {
5560
- var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
5563
+ var curImportance = styleState.usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
5561
5564
  if (shouldMerge) {
5562
5565
  if (process.env.IS_STATIC === "is_static") {
5563
5566
  var _pseudos1, _key1;
@@ -5575,7 +5578,7 @@ var require_getSplitStyles_native = __commonJS({
5575
5578
  }
5576
5579
  if (!isDisabled) for (var _$key in val2) {
5577
5580
  var k = shorthands[_$key] || _$key;
5578
- usedKeys[k] = Math.max(importance, usedKeys[k] || 0);
5581
+ styleState.usedKeys[k] = Math.max(importance, styleState.usedKeys[k] || 0);
5579
5582
  }
5580
5583
  }
5581
5584
  return;
@@ -5597,8 +5600,8 @@ var require_getSplitStyles_native = __commonJS({
5597
5600
  if (mediaStylesSeen += 1, shouldDoClasses) {
5598
5601
  var mediaStyle = getSubStyle(styleState, key4, val2, !1);
5599
5602
  if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
5600
- var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
5601
- importance1 && (space = val2.space, usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(`Found more important space for current media ${mediaKeyShort}: ${val2} (importance: ${importance1})`));
5603
+ var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", styleState, !0);
5604
+ importance1 && (space = val2.space, styleState.usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(`Found more important space for current media ${mediaKeyShort}: ${val2} (importance: ${importance1})`));
5602
5605
  }
5603
5606
  var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle), _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
5604
5607
  try {
@@ -5624,7 +5627,7 @@ var require_getSplitStyles_native = __commonJS({
5624
5627
  var mergeMediaStyle2 = function(key5, val3) {
5625
5628
  var _styleState4;
5626
5629
  (_styleState4 = styleState).style || (_styleState4.style = {});
5627
- var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, usedKeys, mediaState2[mediaKeyShort], importanceBump, debug);
5630
+ var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, mediaState2[mediaKeyShort], importanceBump, debug);
5628
5631
  didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
5629
5632
  }, mergeMediaStyle = mergeMediaStyle2, isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
5630
5633
  if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
@@ -5724,7 +5727,7 @@ var require_getSplitStyles_native = __commonJS({
5724
5727
  conf = conf || (0, import_config.getConfig)();
5725
5728
  var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
5726
5729
  import_constants.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
5727
- var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClass && !styleProps.isAnimated, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles2 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers2.stylePropsText : import_helpers2.validStyles);
5730
+ var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClass && !styleProps.isAnimated, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles2 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers2.stylePropsText : import_helpers2.validStyles);
5728
5731
  process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-setup`;
5729
5732
  var styleState = {
5730
5733
  classNames,
@@ -5735,7 +5738,7 @@ var require_getSplitStyles_native = __commonJS({
5735
5738
  staticConfig,
5736
5739
  style: null,
5737
5740
  theme,
5738
- usedKeys,
5741
+ usedKeys: {},
5739
5742
  viewProps,
5740
5743
  context: componentContext,
5741
5744
  debug
@@ -5869,10 +5872,10 @@ var require_getSplitStyles_native = __commonJS({
5869
5872
  });
5870
5873
  }
5871
5874
  function mergeStyle(styleState, key, val, importance) {
5872
- var disableNormalize = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, { viewProps, styleProps, staticConfig } = styleState, existingImportance = styleState.usedKeys[key];
5873
- if (!(importance < existingImportance)) if (key in import_helpers2.stylePropsTransform) {
5874
- var _styleState, _styleState_usedKeys, _key;
5875
- (_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), (_styleState_usedKeys = styleState.usedKeys)[_key = key] || (_styleState_usedKeys[_key] = 1), styleState.flatTransforms[key] = val;
5875
+ var disableNormalize = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, { viewProps, styleProps, staticConfig, usedKeys } = styleState, existingImportance = usedKeys[key] || 0;
5876
+ if (!(existingImportance > importance)) if (key in import_helpers2.stylePropsTransform) {
5877
+ var _styleState;
5878
+ (_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), usedKeys[key] = importance, styleState.flatTransforms[key] = val;
5876
5879
  } else {
5877
5880
  var shouldNormalize = import_constants.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
5878
5881
  if (
@@ -5880,8 +5883,8 @@ var require_getSplitStyles_native = __commonJS({
5880
5883
  staticConfig.accept && key in staticConfig.accept
5881
5884
  ) viewProps[key] = out;
5882
5885
  else {
5883
- var _styleState1, _styleState_usedKeys1, _key1;
5884
- (_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
5886
+ var _styleState1;
5887
+ (_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
5885
5888
  // if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
5886
5889
  key === "transform" && Array.isArray(out) ? [
5887
5890
  ...out
@@ -5958,10 +5961,10 @@ var require_getSplitStyles_native = __commonJS({
5958
5961
  delete viewProps[key], viewProps[key] = next;
5959
5962
  } else viewProps[key] = val;
5960
5963
  }
5961
- function mergeMediaByImportance(styleState, mediaKey, key, value, usedKeys, isSizeMedia, importanceBump, debugProp) {
5962
- var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, usedKeys, isSizeMedia);
5964
+ function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, importanceBump, debugProp) {
5965
+ var usedKeys = styleState.usedKeys, importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, styleState, isSizeMedia);
5963
5966
  if (importanceBump && (importance = (importance || 0) + importanceBump), process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)(`mergeMediaByImportance ${key} importance usedKey ${usedKeys[key]} next ${importance}`), importance === null) return !1;
5964
- if (usedKeys[key] = importance, key in import_pseudoDescriptors.pseudoDescriptors) {
5967
+ if (key in import_pseudoDescriptors.pseudoDescriptors) {
5965
5968
  var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
5966
5969
  if (isDisabled) return !1;
5967
5970
  for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance);
@@ -7216,9 +7219,7 @@ var require_useComponentState_native = __commonJS({
7216
7219
  var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? {
7217
7220
  ...states[0],
7218
7221
  [props.forceStyle]: !0
7219
- } : states[0], setState = states[1];
7220
- stateRef.current.nextComponentState && Object.assign(state, stateRef.current.nextComponentState);
7221
- var isAnimated = willBeAnimated;
7222
+ } : states[0], setState = states[1], isAnimated = willBeAnimated;
7222
7223
  import_constants.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(_) {
7223
7224
  return {
7224
7225
  ...state
@@ -7490,7 +7491,7 @@ var require_createComponent_native = __commonJS({
7490
7491
  }
7491
7492
  });
7492
7493
  module2.exports = __toCommonJS2(createComponent_exports);
7493
- var import_jsx_runtime2 = require("react/jsx-runtime"), import_compose_refs = require_index_native4(), import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_is_equal_shallow = require_index_native5(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants2 = 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(), time2, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
7494
+ var import_jsx_runtime2 = require("react/jsx-runtime"), import_compose_refs = require_index_native4(), import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_is_equal_shallow = require_index_native5(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants2 = 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(), time2, NextState = /* @__PURE__ */ new WeakMap(), debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
7494
7495
  "hover",
7495
7496
  "press",
7496
7497
  "pressIn",
@@ -7504,7 +7505,7 @@ var require_createComponent_native = __commonJS({
7504
7505
  var BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
7505
7506
  value: !1
7506
7507
  };
7507
- import_constants.isWeb && globalThis.document && (document.addEventListener("keydown", function() {
7508
+ import_constants.isWeb && typeof document < "u" && (document.addEventListener("keydown", function() {
7508
7509
  lastInteractionWasKeyboard.value || (lastInteractionWasKeyboard.value = !0);
7509
7510
  }), document.addEventListener("mousedown", function() {
7510
7511
  lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
@@ -7578,7 +7579,12 @@ var require_createComponent_native = __commonJS({
7578
7579
  }, [
7579
7580
  componentName2
7580
7581
  ]);
7581
- var 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() {
7582
+ var 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;
7583
+ hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders && (0, import_constants.useIsomorphicLayoutEffect)(function() {
7584
+ var pendingState = NextState.get(stateRef);
7585
+ pendingState && (setStateShallow(pendingState), NextState.set(stateRef, void 0));
7586
+ });
7587
+ var allGroupContexts = (0, import_react3.useMemo)(function() {
7582
7588
  var _stateRef_current_group;
7583
7589
  if (!groupName) return groupContextParent;
7584
7590
  (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
@@ -7617,13 +7623,8 @@ var require_createComponent_native = __commonJS({
7617
7623
  stateRef,
7618
7624
  groupName,
7619
7625
  groupContextParent
7620
- ]), setStateShallow = componentState.setStateShallow, pendingState = stateRef.current.nextComponentState;
7621
- pendingState && (stateRef.current.nextComponentState = void 0, componentState.setState(function(prev) {
7622
- return {
7623
- ...prev,
7624
- ...pendingState
7625
- };
7626
- })), process.env.NODE_ENV === "development" && time2 && time2`use-state`;
7626
+ ]), setStateShallow = componentState.setStateShallow;
7627
+ process.env.NODE_ENV === "development" && time2 && time2`use-state`;
7627
7628
  var hasTextAncestor = !!(import_constants.isWeb && isText && componentContext.inText), isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
7628
7629
  animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
7629
7630
  // "needsWebStyles" basically with motion we just animate a plain div, but
@@ -7702,7 +7703,7 @@ var require_createComponent_native = __commonJS({
7702
7703
  if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
7703
7704
  var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
7704
7705
  stateRef.current.setStateShallow = function(nextOrGetNext) {
7705
- var prev = stateRef.current.nextComponentState || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
7706
+ var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
7706
7707
  if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
7707
7708
  var canAvoidReRender = Object.keys(next).every(function(key3) {
7708
7709
  return avoidReRenderKeys.has(key3);
@@ -7712,7 +7713,7 @@ var require_createComponent_native = __commonJS({
7712
7713
  ...prev,
7713
7714
  ...next
7714
7715
  };
7715
- stateRef.current.nextComponentState = updatedState, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && (console.groupCollapsed("[\u26A1\uFE0F] avoid setState", next, {
7716
+ NextState.set(stateRef, updatedState), process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && (console.groupCollapsed("[\u26A1\uFE0F] avoid setState", next, {
7716
7717
  updatedState,
7717
7718
  props
7718
7719
  }), console.info(stateRef.current.host), console.groupEnd());
@@ -7864,9 +7865,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
7864
7865
  mediaGroups ? Object.keys([
7865
7866
  ...mediaGroups
7866
7867
  ]).join("") : 0
7867
- ]), hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders && (0, import_react3.useEffect)(function() {
7868
- stateRef.current.nextComponentState = void 0;
7869
- });
7868
+ ]);
7870
7869
  var groupEmitter = stateRef.current.group;
7871
7870
  (0, import_constants.useIsomorphicLayoutEffect)(function() {
7872
7871
  !groupContext || !groupEmitter || notifyGroupSubscribers(groupContext, groupEmitter, state);
@@ -7918,24 +7917,16 @@ If you meant to do this, you can disable this warning - either change untilMeasu
7918
7917
  },
7919
7918
  ...attachFocus && {
7920
7919
  onFocus: function(e) {
7921
- componentContext.setParentFocusState && componentContext.setParentFocusState({
7922
- focusWithin: !0
7923
- }), pseudos != null && pseudos.focusVisibleStyle ? setTimeout(function() {
7924
- setStateShallow({
7925
- focus: !0,
7926
- focusVisible: !!lastInteractionWasKeyboard.value
7927
- });
7928
- }, 0) : setStateShallow({
7929
- focus: !0,
7930
- focusVisible: !1
7931
- }), onFocus == null || onFocus(e);
7920
+ var next = {};
7921
+ componentContext.setParentFocusState && (next.focusWithin = !0), pseudos != null && pseudos.focusVisibleStyle && lastInteractionWasKeyboard.value ? next.focusVisible = !0 : next.focus = !0, setStateShallow(next), onFocus == null || onFocus(e);
7932
7922
  },
7933
7923
  onBlur: function(e) {
7934
7924
  componentContext.setParentFocusState && componentContext.setParentFocusState({
7935
7925
  focusWithin: !1
7936
7926
  }), setStateShallow({
7937
7927
  focus: !1,
7938
- focusVisible: !1
7928
+ focusVisible: !1,
7929
+ focusWithin: !1
7939
7930
  }), onBlur == null || onBlur(e);
7940
7931
  }
7941
7932
  }
@@ -7983,7 +7974,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
7983
7974
  ...componentContext,
7984
7975
  setParentFocusState: setStateShallow,
7985
7976
  children: content
7986
- })), "group" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_GroupContext.GroupContext.Provider, {
7977
+ })), "group" in props && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_GroupContext.GroupContext.Provider, {
7987
7978
  value: allGroupContexts,
7988
7979
  children: content
7989
7980
  })), process.env.NODE_ENV === "development" && time2 && time2`group-context`, content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), process.env.NODE_ENV === "development" && time2 && time2`themed-children`, staticConfig.context) {