tamagui 1.95.0 → 1.95.2

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
@@ -8957,15 +8957,15 @@ var require_createComponent_native = __commonJS({
8957
8957
  Unspaced: function() {
8958
8958
  return Unspaced2;
8959
8959
  },
8960
+ componentSetStates: function() {
8961
+ return componentSetStates;
8962
+ },
8960
8963
  createComponent: function() {
8961
8964
  return createComponent2;
8962
8965
  },
8963
8966
  isDisabled: function() {
8964
8967
  return isDisabled;
8965
8968
  },
8966
- mouseUps: function() {
8967
- return mouseUps;
8968
- },
8969
8969
  spacedChildren: function() {
8970
8970
  return spacedChildren2;
8971
8971
  },
@@ -9275,11 +9275,16 @@ var require_createComponent_native = __commonJS({
9275
9275
  return data;
9276
9276
  }, data;
9277
9277
  }
9278
- var tamaguiConfig, time, debugKeyListeners, startVisualizer, mouseUps = /* @__PURE__ */ new Set();
9278
+ var tamaguiConfig, time, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set();
9279
9279
  (typeof document > "u" ? "undefined" : _type_of(document)) < "u" && (cancelTouches = function() {
9280
- mouseUps.forEach(function(x) {
9281
- return x();
9282
- }), mouseUps.clear();
9280
+ componentSetStates.forEach(function(setState) {
9281
+ return setState(function(prev) {
9282
+ return prev.press || prev.pressIn ? _object_spread_props8(_object_spread9({}, prev), {
9283
+ press: !1,
9284
+ pressIn: !1
9285
+ }) : prev;
9286
+ });
9287
+ }), componentSetStates.clear();
9283
9288
  }, addEventListener("mouseup", cancelTouches), addEventListener("touchend", cancelTouches), addEventListener("touchcancel", cancelTouches), process.env.NODE_ENV === "development" && (startVisualizer = function() {
9284
9289
  var devVisualizerConfig = import_config.devConfig === null || import_config.devConfig === void 0 ? void 0 : import_config.devConfig.visualizer;
9285
9290
  if (devVisualizerConfig) {
@@ -9581,14 +9586,12 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9581
9586
  typeof item == "string" && item !== `
9582
9587
  ` && console.error("Unexpected text node: ".concat(item, ". A text node cannot be a child of a <View>."));
9583
9588
  }), process.env.NODE_ENV === "development" && time && time(_templateObject13());
9584
- var pseudoGroups = splitStyles.pseudoGroups, mediaGroups = splitStyles.mediaGroups;
9585
- curStateRef.unPress || (curStateRef.unPress = function() {
9589
+ var pseudoGroups = splitStyles.pseudoGroups, mediaGroups = splitStyles.mediaGroups, unPress = function() {
9586
9590
  return setStateShallow({
9587
9591
  press: !1,
9588
9592
  pressIn: !1
9589
9593
  });
9590
- });
9591
- var unPress = curStateRef.unPress;
9594
+ };
9592
9595
  (0, import_react4.useEffect)(function() {
9593
9596
  if (!disabled) {
9594
9597
  if (state.unmounted) {
@@ -9606,7 +9609,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9606
9609
  pseudoGroups
9607
9610
  });
9608
9611
  return function() {
9609
- dispose == null || dispose(), mouseUps.delete(unPress);
9612
+ dispose == null || dispose(), componentSetStates.delete(setState);
9610
9613
  };
9611
9614
  }
9612
9615
  }, [
@@ -9627,14 +9630,14 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9627
9630
  },
9628
9631
  onMouseLeave: function(e) {
9629
9632
  var next = {};
9630
- mouseUps.add(unPress), needsHoverState && (next.hover = !1), needsPressState && state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
9633
+ needsHoverState && (next.hover = !1), needsPressState && state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
9631
9634
  }
9632
9635
  }), {
9633
9636
  onPressIn: attachPress ? function(e) {
9634
9637
  (runtimePressStyle || groupName) && setStateShallow({
9635
9638
  press: !0,
9636
9639
  pressIn: !0
9637
- }), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants4.isWeb && mouseUps.add(unPress);
9640
+ }), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants4.isWeb && componentSetStates.add(setState);
9638
9641
  } : void 0,
9639
9642
  onPress: attachPress ? function(e) {
9640
9643
  unPress(), import_constants4.isWeb && (onClick == null || onClick(e)), onPress == null || onPress(e);
@@ -30696,7 +30699,7 @@ var require_Popper_native = __commonJS({
30696
30699
  strategy,
30697
30700
  props
30698
30701
  ]), _React_useState = _sliced_to_array(React2.useState(!0), 2), needsMeasure = _React_useState[0], setNeedsMeasure = _React_useState[1];
30699
- if (React2.useEffect(function() {
30702
+ React2.useEffect(function() {
30700
30703
  (x || y) && setNeedsMeasure(!1);
30701
30704
  }, [
30702
30705
  x,
@@ -30705,8 +30708,7 @@ var require_Popper_native = __commonJS({
30705
30708
  isMounted && update();
30706
30709
  }, [
30707
30710
  isMounted
30708
- ]), !isMounted)
30709
- return null;
30711
+ ]);
30710
30712
  var show = !0, setShow = void 0;
30711
30713
  if (import_constants4.isAndroid) {
30712
30714
  var ref;
@@ -30718,6 +30720,8 @@ var require_Popper_native = __commonJS({
30718
30720
  y
30719
30721
  ]);
30720
30722
  }
30723
+ if (!isMounted)
30724
+ return null;
30721
30725
  var frameProps = _object_spread9({
30722
30726
  ref: contentRefs,
30723
30727
  x: x || 0,