@tamagui/core 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
@@ -4797,7 +4797,7 @@ var require_createComponent_native = __commonJS({
4797
4797
  spacedChildren: () => spacedChildren
4798
4798
  });
4799
4799
  module2.exports = __toCommonJS2(createComponent_exports);
4800
- var import_compose_refs = require_index_native5(), import_constants3 = require_index_native3(), import_helpers = require_index_native4(), import_use_did_finish_ssr = require_index_native6(), import_react3 = __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_runtime = require("react/jsx-runtime"), tamaguiConfig, AnimatedText, AnimatedView, initialTheme, time, debugKeyListeners, startVisualizer, mouseUps = /* @__PURE__ */ new Set();
4800
+ var import_compose_refs = require_index_native5(), import_constants3 = require_index_native3(), import_helpers = require_index_native4(), import_use_did_finish_ssr = require_index_native6(), import_react3 = __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_runtime = require("react/jsx-runtime"), tamaguiConfig, initialTheme, time, debugKeyListeners, startVisualizer, mouseUps = /* @__PURE__ */ new Set();
4801
4801
  if (typeof document < "u") {
4802
4802
  let cancelTouches = () => {
4803
4803
  mouseUps.forEach((x) => x()), mouseUps.clear();
@@ -4900,17 +4900,21 @@ var require_createComponent_native = __commonJS({
4900
4900
  })(), usePresence = animationsConfig == null ? void 0 : animationsConfig.usePresence, presence = willBeAnimated && (usePresence == null ? void 0 : usePresence()) || null, hasEnterStyle = !!props.enterStyle, needsMount = !!((!import_constants3.isWeb || import_constants3.isClient) && willBeAnimated);
4901
4901
  process.env.NODE_ENV === "development" && time && time`pre-use-state`;
4902
4902
  let initialState = willBeAnimated ? supportsCSSVars ? import_defaultComponentState.defaultComponentStateShouldEnter : import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateMounted, states = (0, import_react3.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}` : "";
4903
- if (groupName && !stateRef.current.group && (stateRef.current.group = {
4904
- listeners: /* @__PURE__ */ new Set(),
4905
- emit(name, state2) {
4906
- this.listeners.forEach((l) => l(name, state2));
4907
- },
4908
- subscribe(cb) {
4909
- return this.listeners.add(cb), () => {
4910
- this.listeners.delete(cb);
4911
- };
4912
- }
4913
- }), groupName) {
4903
+ if (groupName && !stateRef.current.group) {
4904
+ let listeners = /* @__PURE__ */ new Set();
4905
+ stateRef.current.group = {
4906
+ listeners,
4907
+ emit(name, state2) {
4908
+ listeners.forEach((l) => l(name, state2));
4909
+ },
4910
+ subscribe(cb) {
4911
+ return listeners.add(cb), () => {
4912
+ listeners.delete(cb);
4913
+ };
4914
+ }
4915
+ };
4916
+ }
4917
+ if (groupName) {
4914
4918
  let groupContextState = componentContext.groups.state, og = setStateShallow;
4915
4919
  setStateShallow = (state2) => {
4916
4920
  og(state2), stateRef.current.group.emit(groupName, {
@@ -4928,10 +4932,8 @@ var require_createComponent_native = __commonJS({
4928
4932
  willBeAnimated && !supportsCSSVars && !presence && isHydrated && (import_constants3.isServer || state.unmounted === !0) && (isAnimated = !1), willBeAnimated && !stateRef.current.hasAnimated && (stateRef.current.hasAnimated = !0);
4929
4933
  let componentClassName = props.asChild ? "" : props.componentName ? `is_${props.componentName}` : defaultComponentClassName, hasTextAncestor = !!(import_constants3.isWeb && isText && componentContext.inText), isDisabled = props.disabled ?? ((_c = props.accessibilityState) == null ? void 0 : _c.disabled);
4930
4934
  process.env.NODE_ENV === "development" && time && time`use-context`;
4931
- let element = import_constants3.isWeb && (!Component || typeof Component == "string") && props.tag || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div");
4932
- AnimatedText = animationsConfig ? animationsConfig.Text : BaseTextComponent, AnimatedView = animationsConfig ? animationsConfig.View : BaseViewComponent;
4933
- let elementType = isText ? (isAnimated ? AnimatedText : null) || BaseTextComponent : (isAnimated ? AnimatedView : null) || BaseViewComponent;
4934
- if (isAnimated && presence) {
4935
+ let element = import_constants3.isWeb && (!Component || typeof Component == "string") && props.tag || Component, elementType = isText ? BaseText || element || "span" : BaseView || element || (hasTextAncestor ? "span" : "div");
4936
+ if (animationsConfig && willBeAnimated && (animationsConfig.Text && (elementType = animationsConfig.Text), animationsConfig.View && (elementType = animationsConfig.View)), isAnimated && presence) {
4935
4937
  let presenceState = presence[2];
4936
4938
  if (presenceState) {
4937
4939
  let isEntering = state.unmounted, isExiting2 = !presenceState.isPresent, enterExitVariant = presenceState.enterExitVariant, enterVariant = enterExitVariant ?? presenceState.enterVariant, exitVariant = enterExitVariant ?? presenceState.exitVariant;
@@ -5070,7 +5072,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
5070
5072
  ), process.env.NODE_ENV === "development" && time && time`destructure`;
5071
5073
  let disabled = ((_f = props.accessibilityState) == null ? void 0 : _f.disabled) || // @ts-expect-error (comes from core)
5072
5074
  props.accessibilityDisabled, viewProps = nonTamaguiProps;
5073
- isHOC && _themeProp && (viewProps.theme = _themeProp), groupName && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(
5075
+ hasAnimationProp && props.tag && !props.role && !props.accessibilityRole && (viewProps.role = props.tag), isHOC && _themeProp && (viewProps.theme = _themeProp), groupName && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(
5074
5076
  nonTamaguiProps.onLayout,
5075
5077
  (e) => {
5076
5078
  stateRef.current.group.emit(groupName, {