@tamagui/core 1.84.2 → 1.85.1

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.
@@ -61,8 +61,8 @@ var require_utils_native = __commonJS({
61
61
  if (domEvent.type === "selectionchange") {
62
62
  let target = (_a = window.getSelection()) == null ? void 0 : _a.anchorNode;
63
63
  return composedPathFallback(target);
64
- } else
65
- return domEvent.composedPath != null ? domEvent.composedPath() : composedPathFallback(domEvent.target);
64
+ }
65
+ return domEvent.composedPath != null ? domEvent.composedPath() : composedPathFallback(domEvent.target);
66
66
  }
67
67
  function composedPathFallback(target) {
68
68
  let path = [];
@@ -544,7 +544,7 @@ var require_ResponderSystem_native = __commonJS({
544
544
  function findWantsResponder(eventPaths, domEvent, responderEvent) {
545
545
  let shouldSetCallbacks = shouldSetResponderEvents[domEvent.type];
546
546
  if (shouldSetCallbacks != null) {
547
- let { idPath, nodePath } = eventPaths, shouldSetCallbackCaptureName = shouldSetCallbacks[0], shouldSetCallbackBubbleName = shouldSetCallbacks[1], { bubbles } = shouldSetCallbacks[2], check = function(id, node, callbackName) {
547
+ let { idPath, nodePath } = eventPaths, shouldSetCallbackCaptureName = shouldSetCallbacks[0], shouldSetCallbackBubbleName = shouldSetCallbacks[1], { bubbles } = shouldSetCallbacks[2], check = (id, node, callbackName) => {
548
548
  let shouldSetCallback = getResponderConfig(id)[callbackName];
549
549
  if (shouldSetCallback != null && (responderEvent.currentTarget = node, shouldSetCallback(responderEvent) === !0)) {
550
550
  let prunedIdPath = idPath.slice(idPath.indexOf(id));
@@ -778,7 +778,7 @@ var require_composeEventHandlers_native = __commonJS({
778
778
  });
779
779
  module2.exports = __toCommonJS2(composeEventHandlers_exports);
780
780
  function composeEventHandlers2(og, next, { checkDefaultPrevented = !0 } = {}) {
781
- return !og || !next ? next || og || void 0 : function(event) {
781
+ return !og || !next ? next || og || void 0 : (event) => {
782
782
  if (og == null || og(event), !event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
783
783
  "defaultPrevented" in event && !event.defaultPrevented)
784
784
  return next == null ? void 0 : next(event);
@@ -1160,7 +1160,7 @@ var require_withStaticProperties_native = __commonJS({
1160
1160
  withStaticProperties: () => withStaticProperties
1161
1161
  });
1162
1162
  module2.exports = __toCommonJS2(withStaticProperties_exports);
1163
- var import_react3 = require("react"), Decorated = Symbol(), withStaticProperties = function(component, staticProps) {
1163
+ var import_react3 = require("react"), Decorated = Symbol(), withStaticProperties = (component, staticProps) => {
1164
1164
  let next = (() => {
1165
1165
  if (component[Decorated]) {
1166
1166
  let _ = (0, import_react3.forwardRef)(
@@ -2145,14 +2145,14 @@ var require_accessibilityDirectMap_native = __commonJS({
2145
2145
  return to;
2146
2146
  }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), accessibilityDirectMap_native_exports = {};
2147
2147
  __export2(accessibilityDirectMap_native_exports, {
2148
- accessibilityDirectMap: () => accessibilityDirectMap2,
2148
+ accessibilityDirectMap: () => accessibilityDirectMap,
2149
2149
  accessibilityWebRoleToNativeRole: () => accessibilityWebRoleToNativeRole,
2150
2150
  nativeAccessibilityState: () => nativeAccessibilityState,
2151
2151
  nativeAccessibilityValue: () => nativeAccessibilityValue,
2152
2152
  webToNativeAccessibilityDirectMap: () => webToNativeAccessibilityDirectMap
2153
2153
  });
2154
2154
  module2.exports = __toCommonJS2(accessibilityDirectMap_native_exports);
2155
- var accessibilityDirectMap2 = {}, webToNativeAccessibilityDirectMap = {
2155
+ var accessibilityDirectMap = {}, webToNativeAccessibilityDirectMap = {
2156
2156
  "aria-label": "accessibilityLabel",
2157
2157
  "aria-labelledby": "accessibilityLabelledBy",
2158
2158
  "aria-live": "accessibilityLiveRegion",
@@ -3488,7 +3488,8 @@ var require_getSplitStyles_native = __commonJS({
3488
3488
  let nativeA11yProp = import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit];
3489
3489
  keyInit === "aria-hidden" && (viewProps["aria-hidden"] = valInit), viewProps[nativeA11yProp] = valInit;
3490
3490
  continue;
3491
- } else if (import_accessibilityDirectMap.nativeAccessibilityValue[keyInit]) {
3491
+ }
3492
+ if (import_accessibilityDirectMap.nativeAccessibilityValue[keyInit]) {
3492
3493
  let field = import_accessibilityDirectMap.nativeAccessibilityValue[keyInit];
3493
3494
  viewProps.accessibilityValue ? viewProps.accessibilityValue[field] = valInit : viewProps.accessibilityValue = {
3494
3495
  [field]: valInit
@@ -3511,7 +3512,7 @@ var require_getSplitStyles_native = __commonJS({
3511
3512
  mergeStylePropIntoStyle(styleState, valInit);
3512
3513
  continue;
3513
3514
  }
3514
- if (0 && !(keyInit in accessibilityDirectMap))
3515
+ if (0)
3515
3516
  switch (keyInit) {
3516
3517
  case "accessibilityRole":
3517
3518
  case "accessibilityLabelledBy":
@@ -3589,7 +3590,8 @@ var require_getSplitStyles_native = __commonJS({
3589
3590
  }
3590
3591
  }
3591
3592
  continue;
3592
- } else if (isMedia) {
3593
+ }
3594
+ if (isMedia) {
3593
3595
  if (!val)
3594
3596
  continue;
3595
3597
  if (isMedia === "platform") {
@@ -4365,7 +4367,9 @@ var require_Theme_native = __commonJS({
4365
4367
  function getThemedChildren(themeState, children, props, isRoot = !1) {
4366
4368
  let { themeManager, isNewTheme } = themeState;
4367
4369
  if (!themeManager)
4368
- throw new Error("\u274C");
4370
+ throw new Error(
4371
+ "\u274C"
4372
+ );
4369
4373
  let { shallow, forceClassName } = props, hasEverThemed = (0, import_react3.useRef)(!1), shouldRenderChildrenWithTheme = isNewTheme || props.inverse || hasEverThemed.current || forceClassName || isRoot;
4370
4374
  if (shouldRenderChildrenWithTheme && (hasEverThemed.current = !0), !shouldRenderChildrenWithTheme)
4371
4375
  return children;
@@ -4616,7 +4620,7 @@ var require_createComponent_native = __commonJS({
4616
4620
  curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
4617
4621
  let debugProp = props.debug, componentName = props.componentName || staticConfig.componentName, isHydrated = config != null && config.disableSSR ? !0 : (0, import_use_did_finish_ssr.useDidFinishSSR)(), stateRef = (0, import_react3.useRef)(
4618
4622
  {}
4619
- ), hostRef = (0, import_react3.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 = (() => {
4623
+ ), hostRef = (0, import_react3.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 = (() => {
4620
4624
  if (import_constants3.isServer && !supportsCSSVars)
4621
4625
  return !1;
4622
4626
  let curState = stateRef.current;
@@ -5578,7 +5582,7 @@ ${runtimeStyles}`;
5578
5582
  function getThemesDeduped(themes) {
5579
5583
  let dedupedThemes = [], existing = /* @__PURE__ */ new Map();
5580
5584
  for (let themeName in themes) {
5581
- let darkOrLightSpecificPrefix = themeName.startsWith("dark") ? "dark" : themeName.startsWith("light") ? "light" : "", rawTheme = themes[themeName], key = darkOrLightSpecificPrefix + JSON.stringify(rawTheme);
5585
+ 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));
5582
5586
  if (existing.has(key)) {
5583
5587
  existing.get(key).names.push(themeName);
5584
5588
  continue;
@@ -5678,7 +5682,7 @@ var require_setupReactNative_native = __commonJS({
5678
5682
  });
5679
5683
  module2.exports = __toCommonJS2(setupReactNative_exports);
5680
5684
  function getReactNativeConfig(Component) {
5681
- var _a, _b, _c;
5685
+ var _a, _b, _c, _d;
5682
5686
  if (Component)
5683
5687
  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;
5684
5688
  }
@@ -6805,7 +6809,7 @@ var Pressability = require_fake_react_native().default, usePressability = (init_
6805
6809
 
6806
6810
  // src/index.tsx
6807
6811
  __reExport(src_exports, __toESM(require_index_native9()), module.exports);
6808
- var View = import_web.View, Stack = import_web.Stack, Text = import_web.Text, baseViews = getBaseViews();
6812
+ var baseViews = getBaseViews();
6809
6813
  (0, import_web.setupHooks)({
6810
6814
  getBaseViews,
6811
6815
  usePropsTransform(elementType, propsIn, hostRef) {
@@ -6884,7 +6888,7 @@ var View = import_web.View, Stack = import_web.Stack, Text = import_web.Text, ba
6884
6888
  });
6885
6889
  var dontComposePressabilityKeys = {
6886
6890
  onClick: !0
6887
- };
6891
+ }, View = import_web.View, Stack = import_web.Stack, Text = import_web.Text;
6888
6892
  // Annotate the CommonJS export names for ESM import in node:
6889
6893
  0 && (module.exports = {
6890
6894
  Stack,