tamagui 1.90.6 → 1.90.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3628,7 +3628,7 @@ var require_ThemeManager_native = __commonJS({
3628
3628
  var found = potentials.find(function(t) {
3629
3629
  return t in themes;
3630
3630
  });
3631
- if (typeof props.debug == "string" && import_constants4.isClient && console.info(" getState ", {
3631
+ if (typeof props.debug == "string" && import_constants4.isClient && console.info(" \u{1F537} [".concat(manager == null ? void 0 : manager.id, "] getState"), {
3632
3632
  props,
3633
3633
  found,
3634
3634
  potentials,
@@ -4087,7 +4087,7 @@ var require_useTheme_native = __commonJS({
4087
4087
  if (prev != null && prev.themeManager) {
4088
4088
  themeManager2 = prev.themeManager;
4089
4089
  var forceChange = force || !!(keys != null && keys.length), next = themeManager2.getState(props, parentManager), nextState = getShouldUpdateTheme(themeManager2, next, prev.state, forceChange);
4090
- nextState ? (state2 = nextState, prev.isNewTheme ? themeManager2.updateState(nextState) : themeManager2 = getNewThemeManager()) : prev.isNewTheme && parentManager && !next && (themeManager2 = parentManager);
4090
+ nextState ? (state2 = nextState, !prev.isNewTheme && !isRoot ? themeManager2 = getNewThemeManager() : themeManager2.updateState(nextState)) : prev.isNewTheme && parentManager && !next && (themeManager2 = parentManager);
4091
4091
  } else
4092
4092
  themeManager2 = getNewThemeManager(), state2 = _object_spread9({}, themeManager2.state);
4093
4093
  }
@@ -6716,7 +6716,8 @@ var require_skipProps_native = __commonJS({
6716
6716
  style: 1,
6717
6717
  // handled after loop so pseudos set usedKeys and override it if necessary
6718
6718
  group: 1,
6719
- themeInverse: 1
6719
+ themeInverse: 1,
6720
+ animatePresence: 1
6720
6721
  };
6721
6722
  skipProps["data-test-renders"] = 1;
6722
6723
  Object.assign(skipProps, {
@@ -8662,7 +8663,7 @@ var require_createComponent_native = __commonJS({
8662
8663
  return !!(next || curState.hasAnimated);
8663
8664
  }(), willBeAnimated = !import_constants4.isServer && willBeAnimatedClient;
8664
8665
  willBeAnimated && !curState.hasAnimated && (curState.hasAnimated = !0);
8665
- var isHydrated = config != null && config.disableSSR ? !0 : (0, import_use_did_finish_ssr.useDidFinishSSR)(), presence = willBeAnimated && (animationsConfig == null || (_animationsConfig_usePresence = animationsConfig.usePresence) === null || _animationsConfig_usePresence === void 0 ? void 0 : _animationsConfig_usePresence.call(animationsConfig)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasRNAnimation = hasAnimationProp && (animationsConfig == null ? void 0 : animationsConfig.isReactNative), isReactNative = staticConfig.isReactNative, isAnimated = willBeAnimated;
8666
+ var isHydrated = config != null && config.disableSSR ? !0 : (0, import_use_did_finish_ssr.useDidFinishSSR)(), presence = willBeAnimated && props.animatePresence !== !1 && (animationsConfig == null || (_animationsConfig_usePresence = animationsConfig.usePresence) === null || _animationsConfig_usePresence === void 0 ? void 0 : _animationsConfig_usePresence.call(animationsConfig)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasRNAnimation = hasAnimationProp && (animationsConfig == null ? void 0 : animationsConfig.isReactNative), isReactNative = staticConfig.isReactNative, isAnimated = willBeAnimated;
8666
8667
  !isReactNative && hasRNAnimation && !isHOC && !isHydrated && (isAnimated = !1, curState.willHydrate = !0);
8667
8668
  var hasEnterState = hasEnterStyle || isEntering, needsToMount = !isHydrated || !curState.host, initialState = hasEnterState ? needsToMount ? import_defaultComponentState.defaultComponentStateShouldEnter : import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateMounted, states = (0, import_react2.useState)(initialState), state = props.forceStyle ? _object_spread_props8(_object_spread9({}, states[0]), _define_property9({}, props.forceStyle, !0)) : states[0], setState = states[1], setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, debugProp);
8668
8669
  if (isHydrated && state.unmounted === "should-enter" && (state.unmounted = !0), presenceState && isAnimated && isHydrated && staticConfig.variants) {
@@ -29325,8 +29326,12 @@ var require_Popper_native = __commonJS({
29325
29326
  var virtualRef = props.virtualRef, __scopePopper = props.__scopePopper, anchorProps = _object_without_properties5(props, [
29326
29327
  "virtualRef",
29327
29328
  "__scopePopper"
29328
- ]), _usePopperContext = usePopperContext(__scopePopper), getReferenceProps = _usePopperContext.getReferenceProps, refs = _usePopperContext.refs, ref = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref, virtualRef ?? refs.setReference);
29329
- if (virtualRef)
29329
+ ]), _usePopperContext = usePopperContext(__scopePopper), getReferenceProps = _usePopperContext.getReferenceProps, refs = _usePopperContext.refs, ref = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref, refs.setReference);
29330
+ if (React2.useEffect(function() {
29331
+ virtualRef && refs.setReference(virtualRef.current);
29332
+ }, [
29333
+ virtualRef
29334
+ ]), virtualRef)
29330
29335
  return null;
29331
29336
  var stackProps = _object_spread9({
29332
29337
  ref: composedRefs
@@ -29371,9 +29376,9 @@ var require_Popper_native = __commonJS({
29371
29376
  placement,
29372
29377
  strategy,
29373
29378
  props
29374
- ]), _React_useState = _sliced_to_array(React2.useState(!0), 2), hasInitialPosition = _React_useState[0], setHasInitialPosition = _React_useState[1];
29379
+ ]), _React_useState = _sliced_to_array(React2.useState(!0), 2), needsMeasure = _React_useState[0], setNeedsMeasure = _React_useState[1];
29375
29380
  if (React2.useEffect(function() {
29376
- (x || y) && setHasInitialPosition(!1);
29381
+ (x || y) && setNeedsMeasure(!1);
29377
29382
  }, [
29378
29383
  x,
29379
29384
  y
@@ -29393,12 +29398,10 @@ var require_Popper_native = __commonJS({
29393
29398
  }, enableAnimationForPositionChange && {
29394
29399
  // apply animation but disable it on initial render to avoid animating from 0 to the first position
29395
29400
  animation: rest.animation,
29396
- animateOnly: [
29401
+ animateOnly: needsMeasure ? [
29397
29402
  "none"
29398
- ]
29399
- }, enableAnimationForPositionChange && !hasInitialPosition && {
29400
- animation: rest.animation,
29401
- animateOnly: rest.animateOnly
29403
+ ] : rest.animateOnly,
29404
+ animatePresence: !1
29402
29405
  }, !import_constants4.isWeb && floatingStyles);
29403
29406
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, _object_spread_props8(_object_spread9({}, getFloatingProps ? getFloatingProps(frameProps) : frameProps), {
29404
29407
  children: contents
@@ -29932,10 +29935,7 @@ var require_Popover_native = __commonJS({
29932
29935
  "disableRemoveScroll",
29933
29936
  "freezeContentsWhenHidden",
29934
29937
  "setIsFullyHidden"
29935
- ]), context = usePopoverContext(__scopePopover), open = context.open, keepChildrenMounted = context.keepChildrenMounted, popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), contents = import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
29936
- style: dspContentsStyle,
29937
- children
29938
- }) : children;
29938
+ ]), context = usePopoverContext(__scopePopover), open = context.open, keepChildrenMounted = context.keepChildrenMounted, popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE);
29939
29939
  if (context.breakpointActive) {
29940
29940
  var childrenWithoutScrollView = React2.Children.toArray(children).map(function(child) {
29941
29941
  return /* @__PURE__ */ React2.isValidElement(child) && child.type === import_react_native4.ScrollView ? child.props.children : child;
@@ -29980,7 +29980,10 @@ var require_Popover_native = __commonJS({
29980
29980
  trapped: trapFocus,
29981
29981
  onMountAutoFocus: onOpenAutoFocus,
29982
29982
  onUnmountAutoFocus: onCloseAutoFocus,
29983
- children: contents
29983
+ children: import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
29984
+ style: dspContentsStyle,
29985
+ children
29986
+ }) : children
29984
29987
  })
29985
29988
  })
29986
29989
  })