tamagui 1.79.17 → 1.79.18

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
@@ -4633,7 +4633,7 @@ var require_createComponent_native = __commonJS({
4633
4633
  spacedChildren: () => spacedChildren2
4634
4634
  });
4635
4635
  module2.exports = __toCommonJS2(createComponent_exports);
4636
- var import_compose_refs = require_index_native10(), import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_use_did_finish_ssr = require_index_native2(), import_react2 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_proxyThemeVariables = require_proxyThemeVariables_native(), import_themeable = require_themeable_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(), import_ThemeDebug = require_ThemeDebug_native(), import_jsx_runtime6 = require("react/jsx-runtime"), tamaguiConfig, AnimatedText, AnimatedView, initialTheme, time, debugKeyListeners, startVisualizer, mouseUps = /* @__PURE__ */ new Set();
4636
+ var import_compose_refs = require_index_native10(), import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_use_did_finish_ssr = require_index_native2(), import_react2 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_proxyThemeVariables = require_proxyThemeVariables_native(), import_themeable = require_themeable_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(), import_ThemeDebug = require_ThemeDebug_native(), import_jsx_runtime6 = require("react/jsx-runtime"), tamaguiConfig, initialTheme, time, debugKeyListeners, startVisualizer, mouseUps = /* @__PURE__ */ new Set();
4637
4637
  if (typeof document < "u") {
4638
4638
  let cancelTouches = () => {
4639
4639
  mouseUps.forEach((x) => x()), mouseUps.clear();
@@ -4736,17 +4736,21 @@ var require_createComponent_native = __commonJS({
4736
4736
  })(), usePresence = animationsConfig == null ? void 0 : animationsConfig.usePresence, presence = willBeAnimated && (usePresence == null ? void 0 : usePresence()) || null, hasEnterStyle = !!props.enterStyle, needsMount = !!((!import_constants4.isWeb || import_constants4.isClient) && willBeAnimated);
4737
4737
  process.env.NODE_ENV === "development" && time && time`pre-use-state`;
4738
4738
  let initialState = willBeAnimated ? supportsCSSVars ? import_defaultComponentState.defaultComponentStateShouldEnter : import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateMounted, states = (0, import_react2.useState)(initialState), state = propsIn.forceStyle ? { ...states[0], [propsIn.forceStyle]: !0 } : states[0], setState = states[1], setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState), groupName = props.group, groupClassName = groupName ? `t_group_${props.group}` : "";
4739
- if (groupName && !stateRef.current.group && (stateRef.current.group = {
4740
- listeners: /* @__PURE__ */ new Set(),
4741
- emit(name, state2) {
4742
- this.listeners.forEach((l) => l(name, state2));
4743
- },
4744
- subscribe(cb) {
4745
- return this.listeners.add(cb), () => {
4746
- this.listeners.delete(cb);
4747
- };
4748
- }
4749
- }), groupName) {
4739
+ if (groupName && !stateRef.current.group) {
4740
+ let listeners = /* @__PURE__ */ new Set();
4741
+ stateRef.current.group = {
4742
+ listeners,
4743
+ emit(name, state2) {
4744
+ listeners.forEach((l) => l(name, state2));
4745
+ },
4746
+ subscribe(cb) {
4747
+ return listeners.add(cb), () => {
4748
+ listeners.delete(cb);
4749
+ };
4750
+ }
4751
+ };
4752
+ }
4753
+ if (groupName) {
4750
4754
  let groupContextState = componentContext.groups.state, og = setStateShallow;
4751
4755
  setStateShallow = (state2) => {
4752
4756
  og(state2), stateRef.current.group.emit(groupName, {
@@ -4764,10 +4768,8 @@ var require_createComponent_native = __commonJS({
4764
4768
  willBeAnimated && !supportsCSSVars && !presence && isHydrated && (import_constants4.isServer || state.unmounted === !0) && (isAnimated = !1), willBeAnimated && !stateRef.current.hasAnimated && (stateRef.current.hasAnimated = !0);
4765
4769
  let componentClassName = props.asChild ? "" : props.componentName ? `is_${props.componentName}` : defaultComponentClassName, hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText), isDisabled = props.disabled ?? ((_c = props.accessibilityState) == null ? void 0 : _c.disabled);
4766
4770
  process.env.NODE_ENV === "development" && time && time`use-context`;
4767
- let element = import_constants4.isWeb && (!Component || typeof Component == "string") && props.tag || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div");
4768
- AnimatedText = animationsConfig ? animationsConfig.Text : BaseTextComponent, AnimatedView = animationsConfig ? animationsConfig.View : BaseViewComponent;
4769
- let elementType = isText ? (isAnimated ? AnimatedText : null) || BaseTextComponent : (isAnimated ? AnimatedView : null) || BaseViewComponent;
4770
- if (isAnimated && presence) {
4771
+ let element = import_constants4.isWeb && (!Component || typeof Component == "string") && props.tag || Component, elementType = isText ? BaseText || element || "span" : BaseView || element || (hasTextAncestor ? "span" : "div");
4772
+ if (animationsConfig && willBeAnimated && (animationsConfig.Text && (elementType = animationsConfig.Text), animationsConfig.View && (elementType = animationsConfig.View)), isAnimated && presence) {
4771
4773
  let presenceState = presence[2];
4772
4774
  if (presenceState) {
4773
4775
  let isEntering = state.unmounted, isExiting2 = !presenceState.isPresent, enterExitVariant = presenceState.enterExitVariant, enterVariant = enterExitVariant ?? presenceState.enterVariant, exitVariant = enterExitVariant ?? presenceState.exitVariant;
@@ -4906,7 +4908,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
4906
4908
  ), process.env.NODE_ENV === "development" && time && time`destructure`;
4907
4909
  let disabled = ((_f = props.accessibilityState) == null ? void 0 : _f.disabled) || // @ts-expect-error (comes from core)
4908
4910
  props.accessibilityDisabled, viewProps = nonTamaguiProps;
4909
- isHOC && _themeProp && (viewProps.theme = _themeProp), groupName && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(
4911
+ hasAnimationProp && props.tag && !props.role && !props.accessibilityRole && (viewProps.role = props.tag), isHOC && _themeProp && (viewProps.theme = _themeProp), groupName && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(
4910
4912
  nonTamaguiProps.onLayout,
4911
4913
  (e) => {
4912
4914
  stateRef.current.group.emit(groupName, {
@@ -15451,7 +15453,7 @@ var require_Popover_native = __commonJS({
15451
15453
  usePopoverContext: () => usePopoverContext
15452
15454
  });
15453
15455
  module2.exports = __toCommonJS2(Popover_exports);
15454
- var import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native24(), import_animate = require_index_native52(), import_aria_hidden = require_index_native26(), import_compose_refs = require_index_native10(), import_constants4 = require_index_native(), import_core13 = require_index_native15(), import_floating = require_index_native53(), import_focus_scope = require_index_native28(), import_helpers = require_index_native7(), import_popper = require_index_native54(), import_portal2 = require_index_native29(), import_remove_scroll = require_index_native30(), import_sheet = require_index_native34(), import_stacks3 = require_index_native19(), import_use_controllable_state = require_index_native9(), React2 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_useFloatingContext = require_useFloatingContext_native(), import_jsx_runtime6 = require("react/jsx-runtime"), POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core13.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = React2.forwardRef(function(props, forwardedRef) {
15456
+ var import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native24(), import_animate = require_index_native52(), import_animate_presence = require_index_native5(), import_aria_hidden = require_index_native26(), import_compose_refs = require_index_native10(), import_constants4 = require_index_native(), import_core13 = require_index_native15(), import_floating = require_index_native53(), import_focus_scope = require_index_native28(), import_helpers = require_index_native7(), import_popper = require_index_native54(), import_portal2 = require_index_native29(), import_remove_scroll = require_index_native30(), import_sheet = require_index_native34(), import_stacks3 = require_index_native19(), import_use_controllable_state = require_index_native9(), React2 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_useFloatingContext = require_useFloatingContext_native(), import_jsx_runtime6 = require("react/jsx-runtime"), POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core13.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = React2.forwardRef(function(props, forwardedRef) {
15455
15457
  let { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
15456
15458
  return React2.useEffect(() => (onCustomAnchorAdd(), () => onCustomAnchorRemove()), [onCustomAnchorAdd, onCustomAnchorRemove]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
15457
15459
  import_popper.PopperAnchor,
@@ -15565,14 +15567,14 @@ var require_Popover_native = __commonJS({
15565
15567
  return null;
15566
15568
  if (context.breakpointActive) {
15567
15569
  let childrenWithoutScrollView = React2.Children.toArray(children).map((child) => React2.isValidElement(child) && child.type === import_react_native4.ScrollView ? child.props.children : child), content = childrenWithoutScrollView;
15568
- return (import_react_native4.Platform.OS === "android" || import_react_native4.Platform.OS === "ios") && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
15570
+ return import_react_native4.Platform.OS === "android" || import_react_native4.Platform.OS === "ios" ? content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
15569
15571
  import_popper.PopperContext.Provider,
15570
15572
  {
15571
15573
  scope: __scopePopover || POPOVER_SCOPE,
15572
15574
  ...popperContext,
15573
- children: childrenWithoutScrollView
15575
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, { children: childrenWithoutScrollView })
15574
15576
  }
15575
- )), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, { hostName: `${context.id}PopoverContents`, children: content });
15577
+ ) : content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, { children: content }), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, { hostName: `${context.id}PopoverContents`, children: content });
15576
15578
  }
15577
15579
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
15578
15580
  import_animate.Animate,
@@ -15608,7 +15610,7 @@ var require_Popover_native = __commonJS({
15608
15610
  trapped: trapFocus,
15609
15611
  onMountAutoFocus: onOpenAutoFocus,
15610
15612
  onUnmountAutoFocus: onCloseAutoFocus,
15611
- children: contents
15613
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, { children: contents })
15612
15614
  }
15613
15615
  )
15614
15616
  }