tamagui 1.130.6 → 1.130.7
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 +16 -7
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +16 -7
- package/dist/test.native.js.map +1 -1
- package/package.json +55 -55
package/dist/test.native.js
CHANGED
|
@@ -17679,6 +17679,7 @@ var require_useSheetProviderProps_native = __commonJS({
|
|
|
17679
17679
|
if (!animationDriver) throw new Error("Must set animations in tamagui.config.ts");
|
|
17680
17680
|
var scrollBridge = (0, import_use_constant.useConstant)(function() {
|
|
17681
17681
|
var parentDragListeners = /* @__PURE__ */ new Set(), bridge = {
|
|
17682
|
+
hasScrollableContent: !1,
|
|
17682
17683
|
enabled: !1,
|
|
17683
17684
|
y: 0,
|
|
17684
17685
|
paneY: 0,
|
|
@@ -18093,7 +18094,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18093
18094
|
screenSize,
|
|
18094
18095
|
frameSize
|
|
18095
18096
|
]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
18096
|
-
isAbleToPosition && animateTo(position);
|
|
18097
|
+
isAbleToPosition && (animateTo(position), position === -1 && (scrollBridge.scrollLock = !1, scrollBridge.scrollStartY = -1));
|
|
18097
18098
|
}, [
|
|
18098
18099
|
isAbleToPosition,
|
|
18099
18100
|
position
|
|
@@ -18125,9 +18126,13 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18125
18126
|
var { dy } = param;
|
|
18126
18127
|
function getShouldSet() {
|
|
18127
18128
|
if (e.target === providerProps.handleRef.current) return !0;
|
|
18128
|
-
if (scrollBridge.
|
|
18129
|
-
|
|
18130
|
-
|
|
18129
|
+
if (scrollBridge.hasScrollableContent === !0) {
|
|
18130
|
+
if (scrollBridge.scrollLock) return !1;
|
|
18131
|
+
var isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
|
|
18132
|
+
if (isScrolled) return previouslyScrolling = !0, !1;
|
|
18133
|
+
if (isNearTop && hasScrollView.current && isDraggingUp) return !1;
|
|
18134
|
+
}
|
|
18135
|
+
return Math.abs(dy) > 5;
|
|
18131
18136
|
}
|
|
18132
18137
|
var granted = getShouldSet();
|
|
18133
18138
|
return granted && scrollBridge.setParentDragging(!0), granted;
|
|
@@ -18548,9 +18553,13 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
18548
18553
|
var [hasScrollableContent, setHasScrollableContent] = (0, import_react3.useState)(!0), parentHeight = (0, import_react3.useRef)(0), contentHeight = (0, import_react3.useRef)(0), setIsScrollable = function() {
|
|
18549
18554
|
parentHeight.current && contentHeight.current && setHasScrollableContent(contentHeight.current > parentHeight.current);
|
|
18550
18555
|
};
|
|
18551
|
-
return
|
|
18556
|
+
return (0, import_react3.useEffect)(function() {
|
|
18557
|
+
scrollBridge.hasScrollableContent = hasScrollableContent;
|
|
18558
|
+
}, [
|
|
18559
|
+
hasScrollableContent
|
|
18560
|
+
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_scroll_view.ScrollView, {
|
|
18552
18561
|
onLayout: function(e) {
|
|
18553
|
-
parentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
|
|
18562
|
+
parentHeight.current = Math.ceil(e.nativeEvent.layout.height), setIsScrollable();
|
|
18554
18563
|
},
|
|
18555
18564
|
ref: (0, import_compose_refs.composeRefs)(scrollRef, ref),
|
|
18556
18565
|
flex: 1,
|
|
@@ -18605,7 +18614,7 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
18605
18614
|
pointerEvents: "none",
|
|
18606
18615
|
zIndex: -1,
|
|
18607
18616
|
onLayout: function(e) {
|
|
18608
|
-
contentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
|
|
18617
|
+
contentHeight.current = Math.floor(e.nativeEvent.layout.height), setIsScrollable();
|
|
18609
18618
|
}
|
|
18610
18619
|
}),
|
|
18611
18620
|
children
|