tamagui 1.132.3 → 1.132.5-1752435204050

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
@@ -8848,7 +8848,8 @@ var require_createComponent_native = __commonJS({
8848
8848
  }, themeName = (themeState == null ? void 0 : themeState.name) || "";
8849
8849
  process.env.NODE_ENV === "development" && time2 && time2`split-styles-prepare`;
8850
8850
  var splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
8851
- if (splitStyles && groupContext) {
8851
+ if (splitStyles && groupContext && // avoids onLayout if we don't need it
8852
+ props.containerType !== "normal") {
8852
8853
  var groupState = groupContext == null ? void 0 : groupContext.state;
8853
8854
  if (groupState && groupState.layout === void 0) {
8854
8855
  var _splitStyles_style, _splitStyles_style1;
@@ -8958,7 +8959,8 @@ var require_createComponent_native = __commonJS({
8958
8959
  }
8959
8960
  process.env.NODE_ENV === "development" && props.untilMeasured && !props.group && console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
8960
8961
 
8961
- If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time2 && time2`destructure`, splitStyles && groupContext && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
8962
+ If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time2 && time2`destructure`, splitStyles && groupContext && // avoids onLayout if we don't need it
8963
+ props.containerType !== "normal" && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
8962
8964
  var _stateRef_current_group, layout = e.nativeEvent.layout;
8963
8965
  groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
8964
8966
  layout
@@ -17166,7 +17168,7 @@ var require_Adapt_native = __commonJS({
17166
17168
  portalName
17167
17169
  ]);
17168
17170
  var [when, setWhen] = import_react3.default.useState(null), [platform2, setPlatform] = import_react3.default.useState(null), [children2, setChildren] = import_react3.default.useState(null);
17169
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LastAdaptContextScope, {
17171
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LastAdaptContextScope.Provider, {
17170
17172
  value: scope,
17171
17173
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProvideAdaptContext, {
17172
17174
  Contents: FinalContents,
@@ -24321,7 +24323,23 @@ var require_useFloating_native = __commonJS({
24321
24323
  module2.exports = __toCommonJS2(useFloating_exports);
24322
24324
  var import_react3 = __toESM2(require("react")), Floating = __toESM2(require_Floating_native()), FloatingOverrideContext2 = /* @__PURE__ */ import_react3.default.createContext(null), useFloating2 = function(props) {
24323
24325
  var _this, context = import_react3.default.useContext(FloatingOverrideContext2);
24324
- return (_this = context || Floating.useFloating) === null || _this === void 0 ? void 0 : _this(props);
24326
+ return (_this = context || Floating.useFloating) === null || _this === void 0 ? void 0 : _this({
24327
+ ...props,
24328
+ middleware: [
24329
+ // @ts-ignore
24330
+ ...props.middleware,
24331
+ {
24332
+ name: "rounded",
24333
+ fn(param) {
24334
+ var { x, y } = param;
24335
+ return {
24336
+ x: Math.round(x),
24337
+ y: Math.round(y)
24338
+ };
24339
+ }
24340
+ }
24341
+ ]
24342
+ });
24325
24343
  };
24326
24344
  }
24327
24345
  });
@@ -24558,7 +24576,7 @@ var require_Popper_native = __commonJS({
24558
24576
  Object.assign(setupOptions, options);
24559
24577
  }
24560
24578
  function Popper(props) {
24561
- var _middlewareData_checkFloating, { children, size: size2, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset2, disableRTL, resize, passThrough, open, scope } = props, [arrowEl, setArrow] = React4.useState(null), [arrowSize, setArrowSize] = React4.useState(0), offsetOptions = offset2 ?? arrowSize, floatingStyle = React4.useRef({}), floating = (0, import_floating.useFloating)({
24579
+ var { children, size: size2, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset2, disableRTL, resize, passThrough, open, scope } = props, [arrowEl, setArrow] = React4.useState(null), [arrowSize, setArrowSize] = React4.useState(0), offsetOptions = offset2 ?? arrowSize, floatingStyle = React4.useRef({}), floating = (0, import_floating.useFloating)({
24562
24580
  open: passThrough ? !1 : open || !0,
24563
24581
  strategy,
24564
24582
  placement,
@@ -24602,14 +24620,22 @@ var require_Popper_native = __commonJS({
24602
24620
  dimensions,
24603
24621
  keyboardOpen
24604
24622
  ]);
24605
- var popperContext = {
24606
- size: size2,
24607
- arrowRef: setArrow,
24608
- arrowStyle: middlewareData.arrow,
24609
- onArrowSize: setArrowSize,
24610
- hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
24611
- ...floating
24612
- };
24623
+ var popperContext = React4.useMemo(function() {
24624
+ var _middlewareData_checkFloating;
24625
+ return {
24626
+ size: size2,
24627
+ arrowRef: setArrow,
24628
+ arrowStyle: middlewareData.arrow,
24629
+ onArrowSize: setArrowSize,
24630
+ hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
24631
+ ...floating
24632
+ };
24633
+ }, [
24634
+ size2,
24635
+ floating.x,
24636
+ floating.y,
24637
+ floating.isPositioned
24638
+ ]);
24613
24639
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProvider, {
24614
24640
  scope,
24615
24641
  ...popperContext,