@tamagui/core 1.95.0-1713852157160 → 1.95.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
@@ -8860,15 +8860,15 @@ var require_createComponent_native = __commonJS({
8860
8860
  Unspaced: function() {
8861
8861
  return Unspaced;
8862
8862
  },
8863
- componentSetStates: function() {
8864
- return componentSetStates;
8865
- },
8866
8863
  createComponent: function() {
8867
8864
  return createComponent;
8868
8865
  },
8869
8866
  isDisabled: function() {
8870
8867
  return isDisabled;
8871
8868
  },
8869
+ mouseUps: function() {
8870
+ return mouseUps;
8871
+ },
8872
8872
  spacedChildren: function() {
8873
8873
  return spacedChildren;
8874
8874
  },
@@ -9178,16 +9178,11 @@ var require_createComponent_native = __commonJS({
9178
9178
  return data;
9179
9179
  }, data;
9180
9180
  }
9181
- var tamaguiConfig, time, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set();
9181
+ var tamaguiConfig, time, debugKeyListeners, startVisualizer, mouseUps = /* @__PURE__ */ new Set();
9182
9182
  (typeof document > "u" ? "undefined" : _type_of(document)) < "u" && (cancelTouches = function() {
9183
- componentSetStates.forEach(function(setState) {
9184
- return setState(function(prev) {
9185
- return prev.press || prev.pressIn ? _object_spread_props(_object_spread2({}, prev), {
9186
- press: !1,
9187
- pressIn: !1
9188
- }) : prev;
9189
- });
9190
- }), componentSetStates.clear();
9183
+ mouseUps.forEach(function(x) {
9184
+ return x();
9185
+ }), mouseUps.clear();
9191
9186
  }, addEventListener("mouseup", cancelTouches), addEventListener("touchend", cancelTouches), addEventListener("touchcancel", cancelTouches), process.env.NODE_ENV === "development" && (startVisualizer = function() {
9192
9187
  var devVisualizerConfig = import_config.devConfig === null || import_config.devConfig === void 0 ? void 0 : import_config.devConfig.visualizer;
9193
9188
  if (devVisualizerConfig) {
@@ -9489,12 +9484,14 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9489
9484
  typeof item == "string" && item !== `
9490
9485
  ` && console.error("Unexpected text node: ".concat(item, ". A text node cannot be a child of a <View>."));
9491
9486
  }), process.env.NODE_ENV === "development" && time && time(_templateObject13());
9492
- var pseudoGroups = splitStyles.pseudoGroups, mediaGroups = splitStyles.mediaGroups, unPress = function() {
9487
+ var pseudoGroups = splitStyles.pseudoGroups, mediaGroups = splitStyles.mediaGroups;
9488
+ curStateRef.unPress || (curStateRef.unPress = function() {
9493
9489
  return setStateShallow({
9494
9490
  press: !1,
9495
9491
  pressIn: !1
9496
9492
  });
9497
- };
9493
+ });
9494
+ var unPress = curStateRef.unPress;
9498
9495
  (0, import_react3.useEffect)(function() {
9499
9496
  if (!disabled) {
9500
9497
  if (state.unmounted) {
@@ -9512,7 +9509,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9512
9509
  pseudoGroups
9513
9510
  });
9514
9511
  return function() {
9515
- dispose == null || dispose(), componentSetStates.delete(setState);
9512
+ dispose == null || dispose(), mouseUps.delete(unPress);
9516
9513
  };
9517
9514
  }
9518
9515
  }, [
@@ -9533,14 +9530,14 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9533
9530
  },
9534
9531
  onMouseLeave: function(e) {
9535
9532
  var next = {};
9536
- needsHoverState && (next.hover = !1), needsPressState && state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
9533
+ 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);
9537
9534
  }
9538
9535
  }), {
9539
9536
  onPressIn: attachPress ? function(e) {
9540
9537
  (runtimePressStyle || groupName) && setStateShallow({
9541
9538
  press: !0,
9542
9539
  pressIn: !0
9543
- }), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants.isWeb && componentSetStates.add(setState);
9540
+ }), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants.isWeb && mouseUps.add(unPress);
9544
9541
  } : void 0,
9545
9542
  onPress: attachPress ? function(e) {
9546
9543
  unPress(), import_constants.isWeb && (onClick == null || onClick(e)), onPress == null || onPress(e);