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 CHANGED
@@ -18278,6 +18278,7 @@ var require_useSheetProviderProps_native = __commonJS({
18278
18278
  if (!animationDriver) throw new Error(process.env.NODE_ENV === "production" ? "\u274C 008" : "Must set animations in tamagui.config.ts");
18279
18279
  var scrollBridge = (0, import_use_constant.useConstant)(function() {
18280
18280
  var parentDragListeners = /* @__PURE__ */ new Set(), bridge = {
18281
+ hasScrollableContent: !1,
18281
18282
  enabled: !1,
18282
18283
  y: 0,
18283
18284
  paneY: 0,
@@ -18692,7 +18693,7 @@ var require_SheetImplementationCustom_native = __commonJS({
18692
18693
  screenSize,
18693
18694
  frameSize
18694
18695
  ]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
18695
- isAbleToPosition && animateTo(position);
18696
+ isAbleToPosition && (animateTo(position), position === -1 && (scrollBridge.scrollLock = !1, scrollBridge.scrollStartY = -1));
18696
18697
  }, [
18697
18698
  isAbleToPosition,
18698
18699
  position
@@ -18724,9 +18725,13 @@ var require_SheetImplementationCustom_native = __commonJS({
18724
18725
  var { dy } = param;
18725
18726
  function getShouldSet() {
18726
18727
  if (e.target === providerProps.handleRef.current) return !0;
18727
- if (scrollBridge.scrollLock) return !1;
18728
- var isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
18729
- return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && hasScrollView.current && isDraggingUp ? !1 : Math.abs(dy) > 5;
18728
+ if (scrollBridge.hasScrollableContent === !0) {
18729
+ if (scrollBridge.scrollLock) return !1;
18730
+ var isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
18731
+ if (isScrolled) return previouslyScrolling = !0, !1;
18732
+ if (isNearTop && hasScrollView.current && isDraggingUp) return !1;
18733
+ }
18734
+ return Math.abs(dy) > 5;
18730
18735
  }
18731
18736
  var granted = getShouldSet();
18732
18737
  return granted && scrollBridge.setParentDragging(!0), granted;
@@ -19147,9 +19152,13 @@ var require_SheetScrollView_native = __commonJS({
19147
19152
  var [hasScrollableContent, setHasScrollableContent] = (0, import_react3.useState)(!0), parentHeight = (0, import_react3.useRef)(0), contentHeight = (0, import_react3.useRef)(0), setIsScrollable = function() {
19148
19153
  parentHeight.current && contentHeight.current && setHasScrollableContent(contentHeight.current > parentHeight.current);
19149
19154
  };
19150
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_scroll_view.ScrollView, {
19155
+ return (0, import_react3.useEffect)(function() {
19156
+ scrollBridge.hasScrollableContent = hasScrollableContent;
19157
+ }, [
19158
+ hasScrollableContent
19159
+ ]), /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_scroll_view.ScrollView, {
19151
19160
  onLayout: function(e) {
19152
- parentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
19161
+ parentHeight.current = Math.ceil(e.nativeEvent.layout.height), setIsScrollable();
19153
19162
  },
19154
19163
  ref: (0, import_compose_refs.composeRefs)(scrollRef, ref),
19155
19164
  flex: 1,
@@ -19204,7 +19213,7 @@ var require_SheetScrollView_native = __commonJS({
19204
19213
  pointerEvents: "none",
19205
19214
  zIndex: -1,
19206
19215
  onLayout: function(e) {
19207
- contentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
19216
+ contentHeight.current = Math.floor(e.nativeEvent.layout.height), setIsScrollable();
19208
19217
  }
19209
19218
  }),
19210
19219
  children