tamagui 1.84.1 → 1.85.0

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
@@ -556,7 +556,7 @@ var require_composeEventHandlers_native = __commonJS({
556
556
  });
557
557
  module2.exports = __toCommonJS2(composeEventHandlers_exports);
558
558
  function composeEventHandlers(og, next, { checkDefaultPrevented = !0 } = {}) {
559
- return !og || !next ? next || og || void 0 : function(event) {
559
+ return !og || !next ? next || og || void 0 : (event) => {
560
560
  if (og == null || og(event), !event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
561
561
  "defaultPrevented" in event && !event.defaultPrevented)
562
562
  return next == null ? void 0 : next(event);
@@ -892,7 +892,7 @@ var require_withStaticProperties_native = __commonJS({
892
892
  withStaticProperties: () => withStaticProperties2
893
893
  });
894
894
  module2.exports = __toCommonJS2(withStaticProperties_exports);
895
- var import_react2 = require("react"), Decorated = Symbol(), withStaticProperties2 = function(component, staticProps) {
895
+ var import_react2 = require("react"), Decorated = Symbol(), withStaticProperties2 = (component, staticProps) => {
896
896
  let next = (() => {
897
897
  if (component[Decorated]) {
898
898
  let _ = (0, import_react2.forwardRef)(
@@ -2038,14 +2038,14 @@ var require_accessibilityDirectMap_native = __commonJS({
2038
2038
  return to;
2039
2039
  }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), accessibilityDirectMap_native_exports = {};
2040
2040
  __export2(accessibilityDirectMap_native_exports, {
2041
- accessibilityDirectMap: () => accessibilityDirectMap2,
2041
+ accessibilityDirectMap: () => accessibilityDirectMap,
2042
2042
  accessibilityWebRoleToNativeRole: () => accessibilityWebRoleToNativeRole,
2043
2043
  nativeAccessibilityState: () => nativeAccessibilityState,
2044
2044
  nativeAccessibilityValue: () => nativeAccessibilityValue,
2045
2045
  webToNativeAccessibilityDirectMap: () => webToNativeAccessibilityDirectMap
2046
2046
  });
2047
2047
  module2.exports = __toCommonJS2(accessibilityDirectMap_native_exports);
2048
- var accessibilityDirectMap2 = {}, webToNativeAccessibilityDirectMap = {
2048
+ var accessibilityDirectMap = {}, webToNativeAccessibilityDirectMap = {
2049
2049
  "aria-label": "accessibilityLabel",
2050
2050
  "aria-labelledby": "accessibilityLabelledBy",
2051
2051
  "aria-live": "accessibilityLiveRegion",
@@ -2789,7 +2789,7 @@ var require_normalizeValueWithProperty_native = __commonJS({
2789
2789
  return;
2790
2790
  }
2791
2791
  let cssVal = cssRule.replace(/.*:/, "").replace(/;.*/, "").trim(), res;
2792
- return cssVal.startsWith("var(") ? res = cssVal : import_helpers.stylePropsUnitless[key] ? res = +cssVal : cssVal.endsWith("px") ? res = +cssVal.replace("px", "") : res = cssVal, rcache[cssRule] = res, process.env.NODE_ENV === "development" && typeof res == "number" && isNaN(res) && console.info("Tamagui invalid parsed value, NaN:", {
2792
+ return cssVal.startsWith("var(") ? res = cssVal : import_helpers.stylePropsUnitless[key] ? res = +cssVal : cssVal.endsWith("px") ? res = +cssVal.replace("px", "") : res = cssVal, rcache[cssRule] = res, process.env.NODE_ENV === "development" && typeof res == "number" && Number.isNaN(res) && console.info("Tamagui invalid parsed value, NaN:", {
2793
2793
  res,
2794
2794
  cssVal,
2795
2795
  cssRule,
@@ -3142,9 +3142,9 @@ var require_propMapper_native = __commonJS({
3142
3142
  }
3143
3143
  }) : styleStateIn, { conf, styleProps, fontFamily, staticConfig } = styleState, { variants } = staticConfig;
3144
3144
  if (process.env.NODE_ENV === "development" && fontFamily && fontFamily[0] === "$" && !(fontFamily in conf.fontsParsed) && console.warn(
3145
- `Warning: no fontFamily "${fontFamily}" found in config: ${Object.keys(conf.fontsParsed).join(
3146
- ", "
3147
- )}`
3145
+ `Warning: no fontFamily "${fontFamily}" found in config: ${Object.keys(
3146
+ conf.fontsParsed
3147
+ ).join(", ")}`
3148
3148
  ), !styleProps.noExpand && variants && key in variants) {
3149
3149
  styleState.curProps[key] = value;
3150
3150
  let variantValue = resolveVariants(key, value, styleProps, styleState, "");
@@ -3424,7 +3424,8 @@ var require_getSplitStyles_native = __commonJS({
3424
3424
  let nativeA11yProp = import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit];
3425
3425
  keyInit === "aria-hidden" && (viewProps["aria-hidden"] = valInit), viewProps[nativeA11yProp] = valInit;
3426
3426
  continue;
3427
- } else if (import_accessibilityDirectMap.nativeAccessibilityValue[keyInit]) {
3427
+ }
3428
+ if (import_accessibilityDirectMap.nativeAccessibilityValue[keyInit]) {
3428
3429
  let field = import_accessibilityDirectMap.nativeAccessibilityValue[keyInit];
3429
3430
  viewProps.accessibilityValue ? viewProps.accessibilityValue[field] = valInit : viewProps.accessibilityValue = {
3430
3431
  [field]: valInit
@@ -3447,7 +3448,7 @@ var require_getSplitStyles_native = __commonJS({
3447
3448
  mergeStylePropIntoStyle(styleState, valInit);
3448
3449
  continue;
3449
3450
  }
3450
- if (0 && !(keyInit in accessibilityDirectMap))
3451
+ if (0)
3451
3452
  switch (keyInit) {
3452
3453
  case "accessibilityRole":
3453
3454
  case "accessibilityLabelledBy":
@@ -3520,10 +3521,7 @@ current`, {
3520
3521
  val,
3521
3522
  styleProps.noClassNames
3522
3523
  ), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
3523
- if (process.env.NODE_ENV === "development" && !styleProps.isAnimated && !componentState.unmounted && (isEnter || isExit) && console.warn(
3524
- `No animation prop given to component ${staticConfig.componentName || ""} ${props["data-at"] || ""} with enterStyle / exitStyle, these styles will be ignored`,
3525
- { props }
3526
- ), !descriptor || isExit && !styleProps.isExiting)
3524
+ if (!descriptor || isExit && !styleProps.isExiting)
3527
3525
  continue;
3528
3526
  if ((!shouldDoClasses || IS_STATIC) && (pseudos ||= {}, pseudos[key] ||= {}, IS_STATIC)) {
3529
3527
  Object.assign(pseudos[key], pseudoStyleObject);
@@ -3569,7 +3567,8 @@ current`, {
3569
3567
  }
3570
3568
  }
3571
3569
  continue;
3572
- } else if (isMedia) {
3570
+ }
3571
+ if (isMedia) {
3573
3572
  if (!val)
3574
3573
  continue;
3575
3574
  if (isMedia === "platform") {
@@ -3928,10 +3927,10 @@ var require_ThemeManagerContext_native = __commonJS({
3928
3927
  return to;
3929
3928
  }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), ThemeManagerContext_exports = {};
3930
3929
  __export2(ThemeManagerContext_exports, {
3931
- ThemeManagerContext: () => ThemeManagerContext
3930
+ ThemeManagerIDContext: () => ThemeManagerIDContext
3932
3931
  });
3933
3932
  module2.exports = __toCommonJS2(ThemeManagerContext_exports);
3934
- var import_react2 = require("react"), ThemeManagerContext = (0, import_react2.createContext)(null);
3933
+ var import_react2 = require("react"), ThemeManagerIDContext = (0, import_react2.createContext)(1);
3935
3934
  }
3936
3935
  });
3937
3936
 
@@ -3960,7 +3959,7 @@ var require_ThemeManager_native = __commonJS({
3960
3959
  }
3961
3960
  var uid = 0, ThemeManager = class {
3962
3961
  constructor(props = {}, parentManager) {
3963
- if (this.props = props, this.id = uid++, this.themeListeners = /* @__PURE__ */ new Set(), this.parentManager = null, this.state = emptyState, this._allKeys = null, parentManager === "root") {
3962
+ if (this.props = props, this.id = 0, this.themeListeners = /* @__PURE__ */ new Set(), this.parentManager = null, this.state = emptyState, this._allKeys = null, uid = (uid + 1) % Number.MAX_VALUE, this.id = uid, parentManager === "root") {
3964
3963
  this.updateStateFromProps(props, !1);
3965
3964
  return;
3966
3965
  }
@@ -4103,6 +4102,7 @@ var require_useTheme_native = __commonJS({
4103
4102
  }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), useTheme_exports = {};
4104
4103
  __export2(useTheme_exports, {
4105
4104
  activeThemeManagers: () => activeThemeManagers,
4105
+ getThemeManager: () => getThemeManager,
4106
4106
  getThemeProxied: () => getThemeProxied,
4107
4107
  useChangeThemeEffect: () => useChangeThemeEffect,
4108
4108
  useTheme: () => useTheme4,
@@ -4133,13 +4133,13 @@ var require_useTheme_native = __commonJS({
4133
4133
  }), next;
4134
4134
  }
4135
4135
  ), { themeManager, state } = changedThemeState;
4136
- state != null && state.theme || process.env.NODE_ENV === "development" && process.env.TAMAGUI_DISABLE_NO_THEME_WARNING !== "1" && console.warn(
4136
+ process.env.NODE_ENV === "development" && (state != null && state.theme || process.env.TAMAGUI_DISABLE_NO_THEME_WARNING !== "1" && console.warn(
4137
4137
  `[tamagui] No theme found, this could be due to an invalid theme name (given theme props ${JSON.stringify(
4138
4138
  props
4139
4139
  )}).
4140
4140
 
4141
4141
  If this is intended and you are using Tamagui without any themes, you can disable this warning by setting the environment variable TAMAGUI_DISABLE_NO_THEME_WARNING=1`
4142
- );
4142
+ ));
4143
4143
  let themeProxied = (0, import_react2.useMemo)(() => !themeManager || !(state != null && state.theme) ? {} : getThemeProxied(state, props.deopt, themeManager, keys.current, props.debug), [state == null ? void 0 : state.theme, themeManager, props.deopt, props.debug]);
4144
4144
  return process.env.NODE_ENV === "development" && props.debug === "verbose" && (console.groupCollapsed(" \u{1F539} useTheme =>", state == null ? void 0 : state.name), console.info("returning state", changedThemeState, "from props", props), console.groupEnd()), [changedThemeState, themeProxied];
4145
4145
  };
@@ -4217,8 +4217,13 @@ If this is intended and you are using Tamagui without any themes, you can disabl
4217
4217
  }
4218
4218
  return !1;
4219
4219
  }
4220
- var activeThemeManagers = /* @__PURE__ */ new Set(), useChangeThemeEffect = (props, isRoot = !1, keys, shouldUpdate) => {
4221
- let { disable } = props, parentManager = (0, import_react2.useContext)(import_ThemeManagerContext.ThemeManagerContext);
4220
+ var activeThemeManagers = /* @__PURE__ */ new Set(), _uidToManager = /* @__PURE__ */ new WeakMap(), _idToUID = {}, getId = (id) => _idToUID[id], getThemeManager = (id) => _uidToManager.get(getId(id)), registerThemeManager = (t) => {
4221
+ if (!_idToUID[t.id]) {
4222
+ let id = _idToUID[t.id] = {};
4223
+ _uidToManager.set(id, t);
4224
+ }
4225
+ }, useChangeThemeEffect = (props, isRoot = !1, keys, shouldUpdate) => {
4226
+ let { disable } = props, parentManagerId = (0, import_react2.useContext)(import_ThemeManagerContext.ThemeManagerIDContext), parentManager = getThemeManager(parentManagerId);
4222
4227
  if (!isRoot && !parentManager || disable)
4223
4228
  return {
4224
4229
  isNewTheme: !1,
@@ -4244,18 +4249,25 @@ If this is intended and you are using Tamagui without any themes, you can disabl
4244
4249
  }));
4245
4250
  return;
4246
4251
  }
4247
- isNewTheme && themeManager && activeThemeManagers.add(themeManager), (isNewTheme || getShouldUpdateTheme(themeManager)) && setThemeState(createState);
4252
+ (isNewTheme || getShouldUpdateTheme(themeManager)) && (activeThemeManagers.add(themeManager), setThemeState(createState));
4248
4253
  let selfListenerDispose = themeManager.onChangeTheme((_a, _b, forced) => {
4249
4254
  forced && setThemeState((prev) => createState(prev, !0));
4250
4255
  }), disposeChangeListener = parentManager == null ? void 0 : parentManager.onChangeTheme(
4251
4256
  (name, manager, forced) => {
4252
4257
  let force = forced || (shouldUpdate == null ? void 0 : shouldUpdate()) || props.deopt || props["disable-child-theme"], shouldTryUpdate = force ?? !!(keys != null && keys.length || isNewTheme);
4253
- process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info(" \u{1F538} onChange", themeManager.id, { force, shouldTryUpdate, props, name, manager, keys }), shouldTryUpdate && setThemeState((prev) => createState(prev, force));
4258
+ process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info(" \u{1F538} onChange", themeManager.id, {
4259
+ force,
4260
+ shouldTryUpdate,
4261
+ props,
4262
+ name,
4263
+ manager,
4264
+ keys
4265
+ }), shouldTryUpdate && setThemeState((prev) => createState(prev, force));
4254
4266
  },
4255
4267
  themeManager.id
4256
4268
  );
4257
4269
  return () => {
4258
- selfListenerDispose(), disposeChangeListener == null || disposeChangeListener(), activeThemeManagers.delete(themeManager);
4270
+ selfListenerDispose(), disposeChangeListener == null || disposeChangeListener(), isNewTheme && activeThemeManagers.delete(themeManager);
4259
4271
  };
4260
4272
  }, [
4261
4273
  themeManager,
@@ -4303,14 +4315,16 @@ If this is intended and you are using Tamagui without any themes, you can disabl
4303
4315
  } else
4304
4316
  themeManager2 = getNewThemeManager(), state2 = { ...themeManager2.state };
4305
4317
  }
4306
- let isNewTheme2 = !!(themeManager2 !== parentManager || props.inverse), mounted2 = props.inverse ? isRoot || (prev == null ? void 0 : prev.mounted) : !0;
4318
+ let isNewTheme2 = !!(themeManager2 !== parentManager || props.inverse);
4319
+ isNewTheme2 && registerThemeManager(themeManager2);
4320
+ let mounted2 = props.inverse ? isRoot || (prev == null ? void 0 : prev.mounted) : !0;
4307
4321
  state2 || (isNewTheme2 ? state2 = themeManager2.state : (state2 = parentManager.state, themeManager2 = parentManager));
4308
4322
  let wasInversed = prev == null ? void 0 : prev.inversed, inversed2 = isNewTheme2 && state2.scheme !== (parentManager == null ? void 0 : parentManager.state.scheme) ? !0 : wasInversed != null ? !1 : null, response = {
4309
4323
  themeManager: themeManager2,
4310
4324
  isNewTheme: isNewTheme2,
4311
4325
  mounted: mounted2,
4312
4326
  inversed: inversed2
4313
- }, shouldReturnPrev = !force && prev && // isEqualShallow uses the second arg as the keys so this should compare without state first...
4327
+ }, shouldReturnPrev = prev && !force && // isEqualShallow uses the second arg as the keys so this should compare without state first...
4314
4328
  (0, import_createShallowSetState.isEqualShallow)(prev, response) && // ... and then compare just the state, because we make a new state obj but is likely the same
4315
4329
  (0, import_createShallowSetState.isEqualShallow)(prev.state, state2);
4316
4330
  if (prev && shouldReturnPrev)
@@ -4406,7 +4420,9 @@ var require_Theme_native = __commonJS({
4406
4420
  function getThemedChildren(themeState, children, props, isRoot = !1) {
4407
4421
  let { themeManager, isNewTheme } = themeState;
4408
4422
  if (!themeManager)
4409
- throw "\u274C";
4423
+ throw new Error(
4424
+ process.env.NODE_ENV === "development" ? "\u274C No theme found, either incorrect name, potential duplicate tamagui deps, or TamaguiProvider not providing themes." : "\u274C"
4425
+ );
4410
4426
  let { shallow, forceClassName } = props, hasEverThemed = (0, import_react2.useRef)(!1), shouldRenderChildrenWithTheme = isNewTheme || props.inverse || hasEverThemed.current || forceClassName || isRoot;
4411
4427
  if (shouldRenderChildrenWithTheme && (hasEverThemed.current = !0), !shouldRenderChildrenWithTheme)
4412
4428
  return children;
@@ -4416,7 +4432,7 @@ var require_Theme_native = __commonJS({
4416
4432
  void 0,
4417
4433
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, { name: themeManager.state.parentName, children: child.props.children })
4418
4434
  ) : child));
4419
- let elementsWithContext = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ThemeManagerContext.ThemeManagerContext.Provider, { value: themeManager, children: next });
4435
+ let elementsWithContext = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ThemeManagerContext.ThemeManagerIDContext.Provider, { value: themeManager.id, children: next });
4420
4436
  return forceClassName === !1 ? elementsWithContext : import_constants4.isWeb ? wrapThemeElements({
4421
4437
  children: elementsWithContext,
4422
4438
  themeState,
@@ -4703,7 +4719,7 @@ var require_createComponent_native = __commonJS({
4703
4719
  {}
4704
4720
  );
4705
4721
  process.env.NODE_ENV === "development" && time && time`stateref`;
4706
- let hostRef = (0, import_react2.useRef)(null), animationsConfig = componentContext.animationDriver, useAnimations = animationsConfig == null ? void 0 : animationsConfig.useAnimations, hasAnimationProp = !!(props.animation || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationsConfig == null ? void 0 : animationsConfig.supportsCSSVars, willBeAnimated = (() => {
4722
+ let hostRef = (0, import_react2.useRef)(null), animationsConfig = componentContext.animationDriver, useAnimations = animationsConfig == null ? void 0 : animationsConfig.useAnimations, hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationsConfig == null ? void 0 : animationsConfig.supportsCSSVars, willBeAnimated = (() => {
4707
4723
  if (import_constants4.isServer && !supportsCSSVars)
4708
4724
  return !1;
4709
4725
  let curState = stateRef.current;
@@ -5761,7 +5777,7 @@ ${runtimeStyles}`;
5761
5777
  function getThemesDeduped(themes) {
5762
5778
  let dedupedThemes = [], existing = /* @__PURE__ */ new Map();
5763
5779
  for (let themeName in themes) {
5764
- let darkOrLightSpecificPrefix = themeName.startsWith("dark") ? "dark" : themeName.startsWith("light") ? "light" : "", rawTheme = themes[themeName], key = darkOrLightSpecificPrefix + JSON.stringify(rawTheme);
5780
+ let darkOrLightSpecificPrefix = themeName.startsWith("dark") ? "dark" : themeName.startsWith("light") ? "light" : "", rawTheme = themes[themeName], key = darkOrLightSpecificPrefix + JSON.stringify(Object.entries(rawTheme).sort((a, b) => a[0] > b[0] ? -1 : 1));
5765
5781
  if (existing.has(key)) {
5766
5782
  existing.get(key).names.push(themeName);
5767
5783
  continue;
@@ -5861,7 +5877,7 @@ var require_setupReactNative_native = __commonJS({
5861
5877
  });
5862
5878
  module2.exports = __toCommonJS2(setupReactNative_exports);
5863
5879
  function getReactNativeConfig(Component) {
5864
- var _a, _b, _c;
5880
+ var _a, _b, _c, _d;
5865
5881
  if (Component)
5866
5882
  return (_a = Component.propTypes) != null && _a.onTextInput || (_b = Component.propTypes) != null && _b.onChangeText ? RNConfigs.TextInput : Component.getSizeWithHeaders ? RNConfigs.Image : (_c = Component.propTypes) != null && _c.textBreakStrategy ? RNConfigs.Text : RNConfigs.default;
5867
5883
  }
@@ -6100,9 +6116,9 @@ var require_useThemeName_native = __commonJS({
6100
6116
  useThemeName: () => useThemeName2
6101
6117
  });
6102
6118
  module2.exports = __toCommonJS2(useThemeName_exports);
6103
- var import_constants4 = require_index_native(), import_react2 = require("react"), import_ThemeManagerContext = require_ThemeManagerContext_native();
6119
+ var import_constants4 = require_index_native(), import_react2 = require("react"), import_ThemeManagerContext = require_ThemeManagerContext_native(), import_useTheme = require_useTheme_native();
6104
6120
  function useThemeName2(opts) {
6105
- let manager = (0, import_react2.useContext)(import_ThemeManagerContext.ThemeManagerContext), [name, setName] = (0, import_react2.useState)((manager == null ? void 0 : manager.state.name) || "");
6121
+ let manager = (0, import_useTheme.getThemeManager)((0, import_react2.useContext)(import_ThemeManagerContext.ThemeManagerIDContext)), [name, setName] = (0, import_react2.useState)((manager == null ? void 0 : manager.state.name) || "");
6106
6122
  return (0, import_constants4.useIsomorphicLayoutEffect)(() => {
6107
6123
  if (manager)
6108
6124
  return setName(manager.state.name), manager.onChangeTheme((next, manager2) => {
@@ -6716,8 +6732,8 @@ var require_utils_native = __commonJS({
6716
6732
  if (domEvent.type === "selectionchange") {
6717
6733
  let target = (_a = window.getSelection()) == null ? void 0 : _a.anchorNode;
6718
6734
  return composedPathFallback(target);
6719
- } else
6720
- return domEvent.composedPath != null ? domEvent.composedPath() : composedPathFallback(domEvent.target);
6735
+ }
6736
+ return domEvent.composedPath != null ? domEvent.composedPath() : composedPathFallback(domEvent.target);
6721
6737
  }
6722
6738
  function composedPathFallback(target) {
6723
6739
  let path = [];
@@ -7207,7 +7223,7 @@ var require_ResponderSystem_native = __commonJS({
7207
7223
  function findWantsResponder(eventPaths, domEvent, responderEvent) {
7208
7224
  let shouldSetCallbacks = shouldSetResponderEvents[domEvent.type];
7209
7225
  if (shouldSetCallbacks != null) {
7210
- let { idPath, nodePath } = eventPaths, shouldSetCallbackCaptureName = shouldSetCallbacks[0], shouldSetCallbackBubbleName = shouldSetCallbacks[1], { bubbles } = shouldSetCallbacks[2], check = function(id, node, callbackName) {
7226
+ let { idPath, nodePath } = eventPaths, shouldSetCallbackCaptureName = shouldSetCallbacks[0], shouldSetCallbackBubbleName = shouldSetCallbacks[1], { bubbles } = shouldSetCallbacks[2], check = (id, node, callbackName) => {
7211
7227
  let shouldSetCallback = getResponderConfig(id)[callbackName];
7212
7228
  if (shouldSetCallback != null && (responderEvent.currentTarget = node, shouldSetCallback(responderEvent) === !0)) {
7213
7229
  let prunedIdPath = idPath.slice(idPath.indexOf(id));
@@ -7859,7 +7875,7 @@ var require_index_native15 = __commonJS({
7859
7875
  var import_react_native_use_responder_events = require_index_native14(), import_web = require_index_native12(), import_react2 = require("react"), import_createOptimizedView = require_createOptimizedView_native(), import_getBaseViews = require_getBaseViews_native(), import_useElementLayout = require_useElementLayout_native(), import_usePlatformMethods = require_usePlatformMethods_native(), import_Pressability = require_Pressability_native();
7860
7876
  __reExport2(src_exports2, require_index_native12(), module2.exports);
7861
7877
  __reExport2(src_exports2, require_reactNativeTypes_native(), module2.exports);
7862
- var View2 = import_web.View, Stack3 = import_web.Stack, Text3 = import_web.Text, baseViews = (0, import_getBaseViews.getBaseViews)();
7878
+ var baseViews = (0, import_getBaseViews.getBaseViews)();
7863
7879
  (0, import_web.setupHooks)({
7864
7880
  getBaseViews: import_getBaseViews.getBaseViews,
7865
7881
  usePropsTransform(elementType, propsIn, hostRef) {
@@ -7948,7 +7964,7 @@ var require_index_native15 = __commonJS({
7948
7964
  });
7949
7965
  var dontComposePressabilityKeys = {
7950
7966
  onClick: !0
7951
- };
7967
+ }, View2 = import_web.View, Stack3 = import_web.Stack, Text3 = import_web.Text;
7952
7968
  }
7953
7969
  });
7954
7970
 
@@ -11819,7 +11835,7 @@ var require_Avatar_native = __commonJS({
11819
11835
  import_image.Image,
11820
11836
  {
11821
11837
  fullscreen: !0,
11822
- ...typeof shapeSize == "number" && !isNaN(shapeSize) && {
11838
+ ...typeof shapeSize == "number" && !Number.isNaN(shapeSize) && {
11823
11839
  width: shapeSize,
11824
11840
  height: shapeSize
11825
11841
  },
@@ -12165,10 +12181,12 @@ var require_Button_native = __commonJS({
12165
12181
  }), ButtonIcon = (props) => {
12166
12182
  let { children, scaleIcon = 1 } = props, { size: size2, color } = (0, import_react2.useContext)(ButtonContext), iconSize = (typeof size2 == "number" ? size2 * 0.5 : (0, import_font_size.getFontSize)(size2)) * scaleIcon;
12167
12183
  return (0, import_helpers_tamagui.useGetThemedIcon)({ size: iconSize, color })(children);
12168
- }, ButtonComponent = ButtonFrame.styleable(function(props, ref) {
12169
- let { props: buttonProps } = useButton(props);
12170
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ButtonFrame, { ...buttonProps, ref });
12171
- }), buttonStaticConfig = {
12184
+ }, ButtonComponent = ButtonFrame.styleable(
12185
+ function(props, ref) {
12186
+ let { props: buttonProps } = useButton(props);
12187
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ButtonFrame, { ...buttonProps, ref });
12188
+ }
12189
+ ), buttonStaticConfig = {
12172
12190
  inlineProps: /* @__PURE__ */ new Set([
12173
12191
  // text props go here (can't really optimize them, but we never fully extract button anyway)
12174
12192
  // may be able to remove this entirely, as the compiler / runtime have gotten better
@@ -13941,10 +13959,12 @@ var require_ListItem_native = __commonJS({
13941
13959
  ] })
13942
13960
  }
13943
13961
  };
13944
- }, ListItemComponent = ListItemFrame.styleable(function(props, ref) {
13945
- let { props: listItemProps } = useListItem(props);
13946
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ListItemFrame, { ref, ...listItemProps });
13947
- }), ListItem2 = (0, import_helpers.withStaticProperties)(ListItemComponent, {
13962
+ }, ListItemComponent = ListItemFrame.styleable(
13963
+ function(props, ref) {
13964
+ let { props: listItemProps } = useListItem(props);
13965
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ListItemFrame, { ref, ...listItemProps });
13966
+ }
13967
+ ), ListItem2 = (0, import_helpers.withStaticProperties)(ListItemComponent, {
13948
13968
  Text: ListItemText,
13949
13969
  Subtitle: ListItemSubtitle
13950
13970
  });
@@ -15862,10 +15882,10 @@ var require_Progress_native = __commonJS({
15862
15882
  return typeof value == "number";
15863
15883
  }
15864
15884
  function isValidMaxNumber(max2) {
15865
- return isNumber(max2) && !isNaN(max2) && max2 > 0;
15885
+ return isNumber(max2) && !Number.isNaN(max2) && max2 > 0;
15866
15886
  }
15867
15887
  function isValidValueNumber(value, max2) {
15868
- return isNumber(value) && !isNaN(value) && value <= max2 && value >= 0;
15888
+ return isNumber(value) && !Number.isNaN(value) && value <= max2 && value >= 0;
15869
15889
  }
15870
15890
  var DEFAULT_MAX = 100, ProgressFrame = (0, import_core13.styled)(import_stacks3.ThemeableStack, {
15871
15891
  name: "Progress",
@@ -17005,35 +17025,33 @@ var require_Select_native = __commonJS({
17005
17025
  }
17006
17026
  }), SelectGroup = React2.forwardRef(
17007
17027
  (props, forwardedRef) => {
17008
- let { __scopeSelect, ...groupProps } = props, groupId = React2.useId(), context = (0, import_context.useSelectContext)(GROUP_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(GROUP_NAME, __scopeSelect), size2 = itemParentContext.size ?? "$true", nativeSelectRef = React2.useRef(null), content = function() {
17009
- return itemParentContext.shouldRenderWebNative ? (
17010
- // @ts-expect-error until we support typing based on tag
17011
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NativeSelectFrame, { asChild: !0, size: size2, value: context.value, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
17012
- NativeSelectTextFrame,
17013
- {
17014
- onChange: (event) => {
17015
- itemParentContext.onChange(event.currentTarget.value);
17016
- },
17017
- size: size2,
17018
- ref: nativeSelectRef,
17019
- style: {
17020
- color: "var(--color)",
17021
- // @ts-ignore
17022
- appearance: "none"
17023
- },
17024
- children: props.children
17025
- }
17026
- ) })
17027
- ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
17028
- SelectGroupFrame,
17028
+ let { __scopeSelect, ...groupProps } = props, groupId = React2.useId(), context = (0, import_context.useSelectContext)(GROUP_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(GROUP_NAME, __scopeSelect), size2 = itemParentContext.size ?? "$true", nativeSelectRef = React2.useRef(null), content = itemParentContext.shouldRenderWebNative ? (
17029
+ // @ts-expect-error until we support typing based on tag
17030
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NativeSelectFrame, { asChild: !0, size: size2, value: context.value, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
17031
+ NativeSelectTextFrame,
17029
17032
  {
17030
- role: "group",
17031
- "aria-labelledby": groupId,
17032
- ...groupProps,
17033
- ref: forwardedRef
17033
+ onChange: (event) => {
17034
+ itemParentContext.onChange(event.currentTarget.value);
17035
+ },
17036
+ size: size2,
17037
+ ref: nativeSelectRef,
17038
+ style: {
17039
+ color: "var(--color)",
17040
+ // @ts-ignore
17041
+ appearance: "none"
17042
+ },
17043
+ children: props.children
17034
17044
  }
17035
- );
17036
- }();
17045
+ ) })
17046
+ ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
17047
+ SelectGroupFrame,
17048
+ {
17049
+ role: "group",
17050
+ "aria-labelledby": groupId,
17051
+ ...groupProps,
17052
+ ref: forwardedRef
17053
+ }
17054
+ );
17037
17055
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId || "", children: content });
17038
17056
  }
17039
17057
  );
@@ -17291,7 +17309,10 @@ var require_helpers_native2 = __commonJS({
17291
17309
  return 100 / (max2 - min2) * (value - min2);
17292
17310
  }
17293
17311
  function getLabel(index, totalValues) {
17294
- return totalValues > 2 ? `Value ${index + 1} of ${totalValues}` : totalValues === 2 ? ["Minimum", "Maximum"][index] : void 0;
17312
+ if (totalValues > 2)
17313
+ return `Value ${index + 1} of ${totalValues}`;
17314
+ if (totalValues === 2)
17315
+ return ["Minimum", "Maximum"][index];
17295
17316
  }
17296
17317
  function getClosestValueIndex(values, nextValue) {
17297
17318
  if (values.length === 1)
@@ -18813,36 +18834,38 @@ var require_Toggle_native = __commonJS({
18813
18834
  defaultVariants: {
18814
18835
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
18815
18836
  }
18816
- }), Toggle = React2.forwardRef(function(props, forwardedRef) {
18817
- let {
18818
- pressed: pressedProp,
18819
- defaultPressed = !1,
18820
- onPressedChange,
18821
- ...buttonProps
18822
- } = props, [pressed = !1, setPressed] = (0, import_use_controllable_state.useControllableState)({
18823
- prop: pressedProp,
18824
- onChange: onPressedChange,
18825
- defaultProp: defaultPressed
18826
- });
18827
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
18828
- ToggleFrame,
18829
- {
18830
- ...!props.unstyled && {
18831
- theme: pressed ? "active" : null,
18832
- themeShallow: !0
18833
- },
18834
- active: props.unstyled ? void 0 : pressed,
18835
- "aria-pressed": pressed,
18836
- "data-state": pressed ? "on" : "off",
18837
- "data-disabled": props.disabled ? "" : void 0,
18838
- ...buttonProps,
18839
- ref: forwardedRef,
18840
- onPress: (0, import_helpers.composeEventHandlers)(props.onPress ?? void 0, () => {
18841
- props.disabled || setPressed(!pressed);
18842
- })
18843
- }
18844
- );
18845
- });
18837
+ }), Toggle = React2.forwardRef(
18838
+ function(props, forwardedRef) {
18839
+ let {
18840
+ pressed: pressedProp,
18841
+ defaultPressed = !1,
18842
+ onPressedChange,
18843
+ ...buttonProps
18844
+ } = props, [pressed = !1, setPressed] = (0, import_use_controllable_state.useControllableState)({
18845
+ prop: pressedProp,
18846
+ onChange: onPressedChange,
18847
+ defaultProp: defaultPressed
18848
+ });
18849
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
18850
+ ToggleFrame,
18851
+ {
18852
+ ...!props.unstyled && {
18853
+ theme: pressed ? "active" : null,
18854
+ themeShallow: !0
18855
+ },
18856
+ active: props.unstyled ? void 0 : pressed,
18857
+ "aria-pressed": pressed,
18858
+ "data-state": pressed ? "on" : "off",
18859
+ "data-disabled": props.disabled ? "" : void 0,
18860
+ ...buttonProps,
18861
+ ref: forwardedRef,
18862
+ onPress: (0, import_helpers.composeEventHandlers)(props.onPress ?? void 0, () => {
18863
+ props.disabled || setPressed(!pressed);
18864
+ })
18865
+ }
18866
+ );
18867
+ }
18868
+ );
18846
18869
  }
18847
18870
  });
18848
18871
 
@@ -19198,9 +19221,9 @@ var require_index_native67 = __commonJS({
19198
19221
  let timeout, isCancelled = !1;
19199
19222
  function debounced() {
19200
19223
  isCancelled = !1;
19201
- let context = this, args = arguments;
19202
- leading && !timeout && func.apply(context, args), clearTimeout(timeout), timeout = setTimeout(function() {
19203
- timeout = null, leading || isCancelled || func.apply(context, args), isCancelled = !1;
19224
+ let args = arguments;
19225
+ leading && !timeout && func.apply(this, args), clearTimeout(timeout), timeout = setTimeout(() => {
19226
+ timeout = null, leading || isCancelled || func.apply(this, args), isCancelled = !1;
19204
19227
  }, wait);
19205
19228
  }
19206
19229
  return debounced.cancel = () => {