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 +21 -17
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +21 -17
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/test.native.js
CHANGED
|
@@ -8454,15 +8454,15 @@ var require_createComponent_native = __commonJS({
|
|
|
8454
8454
|
Unspaced: function() {
|
|
8455
8455
|
return Unspaced2;
|
|
8456
8456
|
},
|
|
8457
|
+
componentSetStates: function() {
|
|
8458
|
+
return componentSetStates;
|
|
8459
|
+
},
|
|
8457
8460
|
createComponent: function() {
|
|
8458
8461
|
return createComponent2;
|
|
8459
8462
|
},
|
|
8460
8463
|
isDisabled: function() {
|
|
8461
8464
|
return isDisabled;
|
|
8462
8465
|
},
|
|
8463
|
-
mouseUps: function() {
|
|
8464
|
-
return mouseUps;
|
|
8465
|
-
},
|
|
8466
8466
|
spacedChildren: function() {
|
|
8467
8467
|
return spacedChildren2;
|
|
8468
8468
|
},
|
|
@@ -8589,11 +8589,16 @@ var require_createComponent_native = __commonJS({
|
|
|
8589
8589
|
return _array_like_to_array2(o, minLen);
|
|
8590
8590
|
}
|
|
8591
8591
|
}
|
|
8592
|
-
var
|
|
8592
|
+
var componentSetStates = /* @__PURE__ */ new Set();
|
|
8593
8593
|
(typeof document > "u" ? "undefined" : _type_of(document)) < "u" && (cancelTouches = function() {
|
|
8594
|
-
|
|
8595
|
-
return
|
|
8596
|
-
|
|
8594
|
+
componentSetStates.forEach(function(setState) {
|
|
8595
|
+
return setState(function(prev) {
|
|
8596
|
+
return prev.press || prev.pressIn ? _object_spread_props8(_object_spread9({}, prev), {
|
|
8597
|
+
press: !1,
|
|
8598
|
+
pressIn: !1
|
|
8599
|
+
}) : prev;
|
|
8600
|
+
});
|
|
8601
|
+
}), componentSetStates.clear();
|
|
8597
8602
|
}, addEventListener("mouseup", cancelTouches), addEventListener("touchend", cancelTouches), addEventListener("touchcancel", cancelTouches));
|
|
8598
8603
|
var cancelTouches, useComponentState = function(props, param, staticConfig, config) {
|
|
8599
8604
|
var animationDriver = param.animationDriver, groups = param.groups, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react4.useRef)({}), hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {
|
|
@@ -8810,14 +8815,12 @@ var require_createComponent_native = __commonJS({
|
|
|
8810
8815
|
})), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, curStateRef.willHydrate)) || nonTamaguiProps, curStateRef.composedRef || (curStateRef.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
|
|
8811
8816
|
return stateRef.current.host = x;
|
|
8812
8817
|
}, forwardedRef)), viewProps.ref = curStateRef.composedRef;
|
|
8813
|
-
var pseudoGroups = splitStyles.pseudoGroups, mediaGroups = splitStyles.mediaGroups
|
|
8814
|
-
curStateRef.unPress || (curStateRef.unPress = function() {
|
|
8818
|
+
var pseudoGroups = splitStyles.pseudoGroups, mediaGroups = splitStyles.mediaGroups, unPress = function() {
|
|
8815
8819
|
return setStateShallow({
|
|
8816
8820
|
press: !1,
|
|
8817
8821
|
pressIn: !1
|
|
8818
8822
|
});
|
|
8819
|
-
}
|
|
8820
|
-
var unPress = curStateRef.unPress;
|
|
8823
|
+
};
|
|
8821
8824
|
(0, import_react4.useEffect)(function() {
|
|
8822
8825
|
if (!disabled) {
|
|
8823
8826
|
if (state.unmounted) {
|
|
@@ -8835,7 +8838,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8835
8838
|
pseudoGroups
|
|
8836
8839
|
});
|
|
8837
8840
|
return function() {
|
|
8838
|
-
dispose == null || dispose(),
|
|
8841
|
+
dispose == null || dispose(), componentSetStates.delete(setState);
|
|
8839
8842
|
};
|
|
8840
8843
|
}
|
|
8841
8844
|
}, [
|
|
@@ -8854,14 +8857,14 @@ var require_createComponent_native = __commonJS({
|
|
|
8854
8857
|
},
|
|
8855
8858
|
onMouseLeave: function(e) {
|
|
8856
8859
|
var next = {};
|
|
8857
|
-
|
|
8860
|
+
needsHoverState && (next.hover = !1), needsPressState && state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
|
|
8858
8861
|
}
|
|
8859
8862
|
}), {
|
|
8860
8863
|
onPressIn: attachPress ? function(e) {
|
|
8861
8864
|
(runtimePressStyle || groupName) && setStateShallow({
|
|
8862
8865
|
press: !0,
|
|
8863
8866
|
pressIn: !0
|
|
8864
|
-
}), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants4.isWeb &&
|
|
8867
|
+
}), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants4.isWeb && componentSetStates.add(setState);
|
|
8865
8868
|
} : void 0,
|
|
8866
8869
|
onPress: attachPress ? function(e) {
|
|
8867
8870
|
unPress(), import_constants4.isWeb && (onClick == null || onClick(e)), onPress == null || onPress(e);
|
|
@@ -29643,7 +29646,7 @@ var require_Popper_native = __commonJS({
|
|
|
29643
29646
|
strategy,
|
|
29644
29647
|
props
|
|
29645
29648
|
]), _React_useState = _sliced_to_array(React2.useState(!0), 2), needsMeasure = _React_useState[0], setNeedsMeasure = _React_useState[1];
|
|
29646
|
-
|
|
29649
|
+
React2.useEffect(function() {
|
|
29647
29650
|
(x || y) && setNeedsMeasure(!1);
|
|
29648
29651
|
}, [
|
|
29649
29652
|
x,
|
|
@@ -29652,8 +29655,7 @@ var require_Popper_native = __commonJS({
|
|
|
29652
29655
|
isMounted && update();
|
|
29653
29656
|
}, [
|
|
29654
29657
|
isMounted
|
|
29655
|
-
])
|
|
29656
|
-
return null;
|
|
29658
|
+
]);
|
|
29657
29659
|
var show = !0, setShow = void 0;
|
|
29658
29660
|
if (import_constants4.isAndroid) {
|
|
29659
29661
|
var ref;
|
|
@@ -29665,6 +29667,8 @@ var require_Popper_native = __commonJS({
|
|
|
29665
29667
|
y
|
|
29666
29668
|
]);
|
|
29667
29669
|
}
|
|
29670
|
+
if (!isMounted)
|
|
29671
|
+
return null;
|
|
29668
29672
|
var frameProps = _object_spread9({
|
|
29669
29673
|
ref: contentRefs,
|
|
29670
29674
|
x: x || 0,
|