tamagui 1.81.3 → 1.82.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
@@ -782,6 +782,7 @@ var require_validStyleProps_native = __commonJS({
782
782
  borderTopWidth: !0,
783
783
  borderWidth: !0,
784
784
  transform: !0,
785
+ transformOrigin: !0,
785
786
  alignContent: !0,
786
787
  alignItems: !0,
787
788
  alignSelf: !0,
@@ -4414,6 +4415,7 @@ var require_ThemeDebug_native = __commonJS({
4414
4415
  }) {
4415
4416
  return children;
4416
4417
  }
4418
+ ThemeDebug.displayName = "ThemeDebug";
4417
4419
  }
4418
4420
  });
4419
4421
 
@@ -4459,6 +4461,7 @@ var require_Theme_native = __commonJS({
4459
4461
  }, [props.children, disableDirectChildTheme]);
4460
4462
  return useThemedChildren(themeState, children, props, isRoot);
4461
4463
  });
4464
+ Theme2.displayName = "Theme";
4462
4465
  Theme2.avoidForwardRef = !0;
4463
4466
  function useThemedChildren(themeState, children, props, isRoot = !1, avoidWrap = !1) {
4464
4467
  let { themeManager, isNewTheme } = themeState, { shallow, forceClassName } = props, hasEverThemed = (0, import_react2.useRef)(!1);
@@ -4602,7 +4605,11 @@ var require_Slot_native = __commonJS({
4602
4605
  );
4603
4606
  }
4604
4607
  return import_react2.Children.count(children) > 1 ? import_react2.Children.only(null) : null;
4605
- }), Slottable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children }), pressMap = import_constants4.isWeb ? {
4608
+ });
4609
+ Slot.displayName = "Slot";
4610
+ var Slottable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children });
4611
+ Slottable.displayName = "Slottable";
4612
+ var pressMap = import_constants4.isWeb ? {
4606
4613
  onPress: "onClick",
4607
4614
  onPressOut: "onMouseUp",
4608
4615
  onPressIn: "onMouseDown"
@@ -4791,7 +4798,7 @@ var require_createComponent_native = __commonJS({
4791
4798
  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);
4792
4799
  process.env.NODE_ENV === "development" && time && time`use-context`;
4793
4800
  let element = import_constants4.isWeb && (!Component || typeof Component == "string") && props.tag || Component, elementType = isText ? BaseText || element || "span" : BaseView || element || (hasTextAncestor ? "span" : "div");
4794
- if (animationsConfig && willBeAnimated && (animationsConfig.Text && (elementType = animationsConfig.Text), animationsConfig.View && (elementType = animationsConfig.View)), isAnimated && presence) {
4801
+ if (animationsConfig && willBeAnimated && (elementType = animationsConfig[isText ? "Text" : "View"] || elementType), isAnimated && presence) {
4795
4802
  let presenceState = presence[2];
4796
4803
  if (presenceState) {
4797
4804
  let isEntering = state.unmounted, isExiting2 = !presenceState.isPresent, enterExitVariant = presenceState.enterExitVariant, enterVariant = enterExitVariant ?? presenceState.enterVariant, exitVariant = enterExitVariant ?? presenceState.exitVariant;
@@ -4996,7 +5003,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
4996
5003
  fontFamily && fontFamily[0] === "$" && (fontFamily = fontFamily.slice(1));
4997
5004
  let fontFamilyClassName = fontFamily ? `font_${fontFamily}` : "", style = avoidAnimationStyle ? splitStyles.style : animationStyles || splitStyles.style, className;
4998
5005
  asChild === "except-style" || asChild === "except-style-web" || (viewProps.style = style);
4999
- let runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), attachFocus = !!(runtimePressStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onLongPress || onClick), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = runtimeHoverStyle || onHoverIn || onHoverOut, isHoverable = import_constants4.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), handlesPressEvents = !(import_constants4.isWeb || asChild), shouldAttach = !!(attachFocus || attachPress || isHoverable || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle);
5006
+ let runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), attachFocus = !!(runtimePressStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onLongPress || onClick), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = runtimeHoverStyle || onHoverIn || onHoverOut, isHoverable = import_constants4.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !!(attachFocus || attachPress || isHoverable || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle);
5000
5007
  process.env.NODE_ENV === "development" && time && time`events-setup`;
5001
5008
  let events = shouldAttach && !isDisabled && !props.asChild ? {
5002
5009
  onPressOut: attachPress ? (e) => {
@@ -5116,7 +5123,6 @@ If you meant to do this, you can disable this warning - either change untilMeasu
5116
5123
  defaultProps,
5117
5124
  splitStyles,
5118
5125
  animationStyles,
5119
- handlesPressEvents,
5120
5126
  willBeAnimated,
5121
5127
  isStringElement,
5122
5128
  classNamesIn: (_m = props.className) == null ? void 0 : _m.split(" "),
@@ -6249,6 +6255,7 @@ var require_Stack_native = __commonJS({
6249
6255
  defaultProps: import_constants4.stackDefaultStyles,
6250
6256
  validStyles: import_helpers.validStyles
6251
6257
  });
6258
+ Stack3.displayName = "Stack";
6252
6259
  }
6253
6260
  });
6254
6261
 
@@ -6355,7 +6362,10 @@ var require_Text_native = __commonJS({
6355
6362
  Text: () => Text3
6356
6363
  });
6357
6364
  module2.exports = __toCommonJS2(Text_exports);
6358
- var import_helpers = require_index_native7(), import_createComponent = require_createComponent_native(), Text3 = (0, import_createComponent.createComponent)({
6365
+ var import_helpers = require_index_native7(), import_createComponent = require_createComponent_native(), ellipsisStyle = {
6366
+ numberOfLines: 1,
6367
+ lineBreakMode: "clip"
6368
+ }, Text3 = (0, import_createComponent.createComponent)({
6359
6369
  acceptsClassName: !0,
6360
6370
  isText: !0,
6361
6371
  defaultProps: {
@@ -6368,11 +6378,14 @@ var require_Text_native = __commonJS({
6368
6378
  ellipsizeMode: {
6369
6379
  "...": () => null
6370
6380
  },
6381
+ /**
6382
+ * @deprecated Use ellipsis instead
6383
+ */
6371
6384
  ellipse: {
6372
- true: {
6373
- numberOfLines: 1,
6374
- lineBreakMode: "clip"
6375
- }
6385
+ true: ellipsisStyle
6386
+ },
6387
+ ellipsis: {
6388
+ true: ellipsisStyle
6376
6389
  }
6377
6390
  },
6378
6391
  validStyles: {
@@ -6380,6 +6393,7 @@ var require_Text_native = __commonJS({
6380
6393
  ...import_helpers.stylePropsTextOnly
6381
6394
  }
6382
6395
  });
6396
+ Text3.displayName = "Text";
6383
6397
  }
6384
6398
  });
6385
6399
 
@@ -6441,6 +6455,7 @@ var require_FontLanguage_native = __commonJS({
6441
6455
  let language = (0, import_react2.useMemo)(() => props, [JSON.stringify(props)]);
6442
6456
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, { language, children });
6443
6457
  };
6458
+ FontLanguage2.displayName = "FontLanguage";
6444
6459
  }
6445
6460
  });
6446
6461
 
@@ -6493,6 +6508,7 @@ var require_TamaguiProvider_native = __commonJS({
6493
6508
  }
6494
6509
  ) });
6495
6510
  }
6511
+ TamaguiProvider2.displayName = "TamaguiProvider";
6496
6512
  }
6497
6513
  });
6498
6514
 
@@ -6517,6 +6533,7 @@ var require_Configuration_native = __commonJS({
6517
6533
  let current = (0, import_react2.useContext)(import_ComponentContext.ComponentContext);
6518
6534
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, { ...current, ...props });
6519
6535
  };
6536
+ Configuration2.displayName = "Configuration";
6520
6537
  }
6521
6538
  });
6522
6539
 
@@ -7968,23 +7985,26 @@ var require_index_native15 = __commonJS({
7968
7985
  return viewProps;
7969
7986
  },
7970
7987
  useEvents(viewProps, events, { pseudos }, setStateShallow, staticConfig) {
7971
- if (events != null && events.onFocus && (viewProps.onFocus = events.onFocus), events != null && events.onBlur && (viewProps.onBlur = events.onBlur), staticConfig.isInput) {
7972
- if (events) {
7988
+ if (events)
7989
+ if (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur), staticConfig.isInput) {
7973
7990
  let { onPressIn, onPressOut, onPress } = events, inputEvents = {
7974
7991
  onPressIn,
7975
7992
  onPressOut: onPressOut || onPress
7976
7993
  };
7977
7994
  onPressOut && onPress && (inputEvents.onPressOut = (0, import_web.composeEventHandlers)(onPress, onPressOut)), Object.assign(viewProps, inputEvents);
7995
+ } else {
7996
+ viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
7997
+ let pressability = (0, import_Pressability.usePressability)(events);
7998
+ if (process.env.NODE_ENV === "development" && viewProps.debug && console.info(
7999
+ `Checking for press ${!!events.onPress} then applying pressability props: ${Object.keys(
8000
+ pressability || {}
8001
+ )}`
8002
+ ), events.onPress)
8003
+ for (let key in pressability) {
8004
+ let og = viewProps[key], val = pressability[key];
8005
+ viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0, import_web.composeEventHandlers)(og, val) : val;
8006
+ }
7978
8007
  }
7979
- } else {
7980
- events && viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
7981
- let pressability = (0, import_Pressability.usePressability)(events || null);
7982
- if (events && events.onPress)
7983
- for (let key in pressability) {
7984
- let og = viewProps[key], val = pressability[key];
7985
- viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0, import_web.composeEventHandlers)(og, val) : val;
7986
- }
7987
- }
7988
8008
  },
7989
8009
  useChildren(elementType, children, viewProps, events, staticConfig) {
7990
8010
  if (process.env.NODE_ENV !== "test") {
@@ -8174,10 +8194,14 @@ var require_Stacks_native = __commonJS({
8174
8194
  }, YStack3 = (0, import_core13.styled)(import_core13.Stack, {
8175
8195
  flexDirection: "column",
8176
8196
  variants
8177
- }), XStack = (0, import_core13.styled)(import_core13.Stack, {
8197
+ });
8198
+ YStack3.displayName = "YStack";
8199
+ var XStack = (0, import_core13.styled)(import_core13.Stack, {
8178
8200
  flexDirection: "row",
8179
8201
  variants
8180
- }), ZStack = (0, import_core13.styled)(
8202
+ });
8203
+ XStack.displayName = "XStack";
8204
+ var ZStack = (0, import_core13.styled)(
8181
8205
  YStack3,
8182
8206
  {
8183
8207
  position: "relative"
@@ -8187,6 +8211,7 @@ var require_Stacks_native = __commonJS({
8187
8211
  isZStack: !0
8188
8212
  }
8189
8213
  );
8214
+ ZStack.displayName = "ZStack";
8190
8215
  }
8191
8216
  });
8192
8217
 
@@ -12239,14 +12264,29 @@ var require_Button_native = __commonJS({
12239
12264
  noTextWrap,
12240
12265
  fontFamily,
12241
12266
  fontSize,
12267
+ fontWeight,
12268
+ fontStyle,
12269
+ letterSpacing,
12242
12270
  tag,
12271
+ ellipse,
12272
+ maxFontSizeMultiplier,
12243
12273
  ...restProps
12244
12274
  } = propsActive, size2 = propsActive.size || (propsActive.unstyled ? void 0 : "$true"), color = propsActive.color, iconSize = (typeof size2 == "number" ? size2 * 0.5 : (0, import_font_size.getFontSize)(size2)) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
12245
12275
  size: iconSize,
12246
12276
  color
12247
12277
  }), [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon), spaceSize = space ?? (0, import_web.getVariableValue)(iconSize) * scaleSpace, contents = noTextWrap ? [propsIn.children] : (0, import_text2.wrapChildrenInText)(
12248
12278
  Text3,
12249
- { children: propsIn.children, fontFamily, fontSize, textProps },
12279
+ {
12280
+ children: propsIn.children,
12281
+ fontFamily,
12282
+ fontSize,
12283
+ textProps,
12284
+ fontWeight,
12285
+ fontStyle,
12286
+ letterSpacing,
12287
+ ellipse,
12288
+ maxFontSizeMultiplier
12289
+ },
12250
12290
  Text3 === ButtonText && propsActive.unstyled !== !0 ? {
12251
12291
  unstyled: process.env.TAMAGUI_HEADLESS === "1",
12252
12292
  size: size2