@tamagui/sheet 1.88.22 → 1.88.23
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/esm/Sheet.native.js +16 -40
- package/dist/esm/Sheet.native.js.map +1 -1
- package/dist/esm/SheetContext.native.js +6 -29
- package/dist/esm/SheetContext.native.js.map +1 -1
- package/dist/esm/SheetController.native.js +8 -26
- package/dist/esm/SheetController.native.js.map +1 -1
- package/dist/esm/SheetImplementationCustom.native.js +75 -65
- package/dist/esm/SheetImplementationCustom.native.js.map +2 -2
- package/dist/esm/SheetScrollView.native.js +13 -30
- package/dist/esm/SheetScrollView.native.js.map +1 -1
- package/dist/esm/constants.native.js +4 -29
- package/dist/esm/constants.native.js.map +1 -1
- package/dist/esm/contexts.native.js +5 -27
- package/dist/esm/contexts.native.js.map +1 -1
- package/dist/esm/createSheet.native.js +55 -61
- package/dist/esm/createSheet.native.js.map +2 -2
- package/dist/esm/helpers.native.js +2 -23
- package/dist/esm/helpers.native.js.map +1 -1
- package/dist/esm/index.native.js +9 -35
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/nativeSheet.native.js +15 -31
- package/dist/esm/nativeSheet.native.js.map +1 -1
- package/dist/esm/types.native.js +0 -14
- package/dist/esm/types.native.js.map +2 -2
- package/dist/esm/useSheet.native.js +4 -25
- package/dist/esm/useSheet.native.js.map +1 -1
- package/dist/esm/useSheetController.native.js +5 -27
- package/dist/esm/useSheetController.native.js.map +1 -1
- package/dist/esm/useSheetOffscreenSize.native.js +2 -23
- package/dist/esm/useSheetOffscreenSize.native.js.map +1 -1
- package/dist/esm/useSheetOpenState.native.js +6 -26
- package/dist/esm/useSheetOpenState.native.js.map +1 -1
- package/dist/esm/useSheetProviderProps.native.js +12 -38
- package/dist/esm/useSheetProviderProps.native.js.map +2 -2
- package/dist/jsx/Sheet.native.js +16 -40
- package/dist/jsx/Sheet.native.js.map +1 -1
- package/dist/jsx/SheetContext.native.js +6 -29
- package/dist/jsx/SheetContext.native.js.map +1 -1
- package/dist/jsx/SheetController.native.js +8 -26
- package/dist/jsx/SheetController.native.js.map +1 -1
- package/dist/jsx/SheetImplementationCustom.native.js +75 -65
- package/dist/jsx/SheetImplementationCustom.native.js.map +2 -2
- package/dist/jsx/SheetScrollView.native.js +13 -30
- package/dist/jsx/SheetScrollView.native.js.map +1 -1
- package/dist/jsx/constants.native.js +4 -29
- package/dist/jsx/constants.native.js.map +1 -1
- package/dist/jsx/contexts.native.js +5 -27
- package/dist/jsx/contexts.native.js.map +1 -1
- package/dist/jsx/createSheet.native.js +55 -61
- package/dist/jsx/createSheet.native.js.map +2 -2
- package/dist/jsx/helpers.native.js +2 -23
- package/dist/jsx/helpers.native.js.map +1 -1
- package/dist/jsx/index.native.js +9 -35
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/nativeSheet.native.js +15 -31
- package/dist/jsx/nativeSheet.native.js.map +1 -1
- package/dist/jsx/types.native.js +0 -14
- package/dist/jsx/types.native.js.map +2 -2
- package/dist/jsx/useSheet.native.js +4 -25
- package/dist/jsx/useSheet.native.js.map +1 -1
- package/dist/jsx/useSheetController.native.js +5 -27
- package/dist/jsx/useSheetController.native.js.map +1 -1
- package/dist/jsx/useSheetOffscreenSize.native.js +2 -23
- package/dist/jsx/useSheetOffscreenSize.native.js.map +1 -1
- package/dist/jsx/useSheetOpenState.native.js +6 -26
- package/dist/jsx/useSheetOpenState.native.js.map +1 -1
- package/dist/jsx/useSheetProviderProps.native.js +12 -38
- package/dist/jsx/useSheetProviderProps.native.js.map +2 -2
- package/package.json +16 -16
|
@@ -1,28 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { AdaptParentContext } from "@tamagui/adapt";
|
|
2
|
+
import { AnimatePresence } from "@tamagui/animate-presence";
|
|
3
|
+
import { useComposedRefs } from "@tamagui/compose-refs";
|
|
4
|
+
import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
5
|
+
import {
|
|
6
|
+
Stack,
|
|
7
|
+
Theme,
|
|
8
|
+
getConfig,
|
|
9
|
+
themeable,
|
|
10
|
+
useConfiguration,
|
|
11
|
+
useEvent,
|
|
12
|
+
useThemeName
|
|
13
|
+
} from "@tamagui/core";
|
|
14
|
+
import { Portal } from "@tamagui/portal";
|
|
15
|
+
import { useKeyboardVisible } from "@tamagui/use-keyboard-visible";
|
|
16
|
+
import {
|
|
17
|
+
forwardRef,
|
|
18
|
+
useCallback,
|
|
19
|
+
useContext,
|
|
20
|
+
useEffect,
|
|
21
|
+
useMemo,
|
|
22
|
+
useRef,
|
|
23
|
+
useState
|
|
24
|
+
} from "react";
|
|
25
|
+
import { Dimensions, Keyboard, PanResponder, View } from "react-native";
|
|
26
|
+
import { SHEET_HIDDEN_STYLESHEET } from "./constants";
|
|
27
|
+
import { ParentSheetContext, SheetInsideSheetContext } from "./contexts";
|
|
28
|
+
import { resisted } from "./helpers";
|
|
29
|
+
import { SheetProvider } from "./SheetContext";
|
|
30
|
+
import { useSheetOpenState } from "./useSheetOpenState";
|
|
31
|
+
import { useSheetProviderProps } from "./useSheetProviderProps";
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
33
|
let hiddenSize = 10000.1;
|
|
23
|
-
const SheetImplementationCustom =
|
|
24
|
-
|
|
25
|
-
const parentSheet =
|
|
34
|
+
const SheetImplementationCustom = themeable(
|
|
35
|
+
forwardRef(function(props, forwardedRef) {
|
|
36
|
+
const parentSheet = useContext(ParentSheetContext), {
|
|
26
37
|
animation,
|
|
27
38
|
animationConfig: animationConfigProp,
|
|
28
39
|
modal = !1,
|
|
@@ -30,7 +41,7 @@ const SheetImplementationCustom = (0, import_core.themeable)(
|
|
|
30
41
|
moveOnKeyboardChange = !1,
|
|
31
42
|
unmountChildrenWhenHidden = !1,
|
|
32
43
|
portalProps
|
|
33
|
-
} = props, keyboardIsVisible =
|
|
44
|
+
} = props, keyboardIsVisible = useKeyboardVisible(), state = useSheetOpenState(props), [overlayComponent, setOverlayComponent] = useState(null), providerProps = useSheetProviderProps(props, state, {
|
|
34
45
|
onOverlayComponent: setOverlayComponent
|
|
35
46
|
}), {
|
|
36
47
|
frameSize,
|
|
@@ -44,38 +55,38 @@ const SheetImplementationCustom = (0, import_core.themeable)(
|
|
|
44
55
|
screenSize,
|
|
45
56
|
setMaxContentSize,
|
|
46
57
|
maxSnapPoint
|
|
47
|
-
} = providerProps, { open, controller, isHidden } = state, sheetRef =
|
|
58
|
+
} = providerProps, { open, controller, isHidden } = state, sheetRef = useRef(null), ref = useComposedRefs(forwardedRef, sheetRef), animationConfig = (() => {
|
|
48
59
|
const [animationProp, animationPropConfig] = animation ? Array.isArray(animation) ? animation : [animation] : [];
|
|
49
60
|
return animationConfigProp ?? (animationProp ? {
|
|
50
|
-
...
|
|
61
|
+
...getConfig().animations.animations[animationProp],
|
|
51
62
|
...animationPropConfig
|
|
52
63
|
} : null);
|
|
53
|
-
})(), [isShowingInnerSheet, setIsShowingInnerSheet] =
|
|
64
|
+
})(), [isShowingInnerSheet, setIsShowingInnerSheet] = useState(!1), shouldHideParentSheet = !isWeb && modal && isShowingInnerSheet, parentSheetContext = useContext(SheetInsideSheetContext), onInnerSheet = useCallback((hasChild) => {
|
|
54
65
|
setIsShowingInnerSheet(hasChild);
|
|
55
|
-
}, []), positions =
|
|
66
|
+
}, []), positions = useMemo(
|
|
56
67
|
() => snapPoints.map(
|
|
57
68
|
(point) => getYPositions(snapPointsMode, point, screenSize, frameSize)
|
|
58
69
|
),
|
|
59
70
|
[screenSize, frameSize, snapPoints, snapPointsMode]
|
|
60
|
-
), { animationDriver } =
|
|
61
|
-
|
|
71
|
+
), { animationDriver } = useConfiguration(), { useAnimatedNumber, useAnimatedNumberStyle, useAnimatedNumberReaction } = animationDriver, AnimatedView = animationDriver.View ?? Stack;
|
|
72
|
+
useIsomorphicLayoutEffect(() => {
|
|
62
73
|
if (parentSheetContext && open)
|
|
63
74
|
return parentSheetContext(!0), () => {
|
|
64
75
|
parentSheetContext(!1);
|
|
65
76
|
};
|
|
66
77
|
}, [parentSheetContext, open]);
|
|
67
|
-
const nextParentContext =
|
|
78
|
+
const nextParentContext = useMemo(
|
|
68
79
|
() => ({
|
|
69
80
|
zIndex
|
|
70
81
|
}),
|
|
71
82
|
[zIndex]
|
|
72
|
-
), animatedNumber = useAnimatedNumber(hiddenSize), at =
|
|
83
|
+
), animatedNumber = useAnimatedNumber(hiddenSize), at = useRef(hiddenSize);
|
|
73
84
|
useAnimatedNumberReaction(
|
|
74
85
|
{
|
|
75
86
|
value: animatedNumber,
|
|
76
87
|
hostRef: sheetRef
|
|
77
88
|
},
|
|
78
|
-
|
|
89
|
+
useCallback(
|
|
79
90
|
(value) => {
|
|
80
91
|
at.current = value, scrollBridge.paneY = value;
|
|
81
92
|
},
|
|
@@ -85,7 +96,7 @@ const SheetImplementationCustom = (0, import_core.themeable)(
|
|
|
85
96
|
function stopSpring() {
|
|
86
97
|
animatedNumber.stop(), scrollBridge.onFinishAnimate && (scrollBridge.onFinishAnimate(), scrollBridge.onFinishAnimate = void 0);
|
|
87
98
|
}
|
|
88
|
-
const hasntMeasured = at.current === hiddenSize, animateTo =
|
|
99
|
+
const hasntMeasured = at.current === hiddenSize, animateTo = useEvent((position2) => {
|
|
89
100
|
if (frameSize === 0)
|
|
90
101
|
return;
|
|
91
102
|
let toValue = isHidden || position2 === -1 ? screenSize : positions[position2];
|
|
@@ -104,22 +115,22 @@ const SheetImplementationCustom = (0, import_core.themeable)(
|
|
|
104
115
|
});
|
|
105
116
|
}
|
|
106
117
|
});
|
|
107
|
-
|
|
118
|
+
useIsomorphicLayoutEffect(() => {
|
|
108
119
|
screenSize && hasntMeasured && animatedNumber.setValue(screenSize, {
|
|
109
120
|
type: "timing",
|
|
110
121
|
duration: 0
|
|
111
122
|
});
|
|
112
|
-
}, [hasntMeasured, screenSize]),
|
|
123
|
+
}, [hasntMeasured, screenSize]), useIsomorphicLayoutEffect(() => {
|
|
113
124
|
!frameSize || !screenSize || isHidden || hasntMeasured && !open || animateTo(position);
|
|
114
125
|
}, [isHidden, frameSize, screenSize, open, position]);
|
|
115
|
-
const disableDrag = props.disableDrag ?? (controller == null ? void 0 : controller.disableDrag), themeName =
|
|
126
|
+
const disableDrag = props.disableDrag ?? (controller == null ? void 0 : controller.disableDrag), themeName = useThemeName(), [isDragging, setIsDragging] = useState(!1), panResponder = useMemo(() => {
|
|
116
127
|
if (disableDrag || !frameSize || isShowingInnerSheet)
|
|
117
128
|
return;
|
|
118
129
|
const minY = positions[0];
|
|
119
130
|
scrollBridge.paneMinY = minY;
|
|
120
131
|
let startY = at.current;
|
|
121
132
|
function setPanning(val) {
|
|
122
|
-
setIsDragging(val),
|
|
133
|
+
setIsDragging(val), SHEET_HIDDEN_STYLESHEET && (val ? SHEET_HIDDEN_STYLESHEET.innerText = ":root * { user-select: none !important; -webkit-user-select: none !important; }" : SHEET_HIDDEN_STYLESHEET.innerText = "");
|
|
123
134
|
}
|
|
124
135
|
const release = ({ vy, dragAt }) => {
|
|
125
136
|
isExternalDrag = !1, previouslyScrolling = !1, setPanning(!1);
|
|
@@ -141,7 +152,7 @@ const SheetImplementationCustom = (0, import_core.themeable)(
|
|
|
141
152
|
if (e.target === providerProps.handleRef.current)
|
|
142
153
|
return !0;
|
|
143
154
|
const isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
|
|
144
|
-
return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && !isScrolled && isDraggingUp && !
|
|
155
|
+
return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && !isScrolled && isDraggingUp && !isWeb ? !1 : Math.abs(dy) > 5;
|
|
145
156
|
}, grant = () => {
|
|
146
157
|
setPanning(!0), stopSpring(), startY = at.current;
|
|
147
158
|
};
|
|
@@ -149,34 +160,34 @@ const SheetImplementationCustom = (0, import_core.themeable)(
|
|
|
149
160
|
return scrollBridge.drag = (dy) => {
|
|
150
161
|
isExternalDrag || (isExternalDrag = !0, grant());
|
|
151
162
|
const to = dy + startY;
|
|
152
|
-
animatedNumber.setValue(
|
|
153
|
-
}, scrollBridge.release = release,
|
|
163
|
+
animatedNumber.setValue(resisted(to, minY), { type: "direct" });
|
|
164
|
+
}, scrollBridge.release = release, PanResponder.create({
|
|
154
165
|
onMoveShouldSetPanResponder: onMoveShouldSet,
|
|
155
166
|
onPanResponderGrant: grant,
|
|
156
167
|
onPanResponderMove: (_e, { dy }) => {
|
|
157
|
-
const toFull = dy + startY, to =
|
|
168
|
+
const toFull = dy + startY, to = resisted(toFull, minY);
|
|
158
169
|
animatedNumber.setValue(to, { type: "direct" });
|
|
159
170
|
},
|
|
160
171
|
onPanResponderEnd: finish,
|
|
161
172
|
onPanResponderTerminate: finish,
|
|
162
173
|
onPanResponderRelease: finish
|
|
163
174
|
});
|
|
164
|
-
}, [disableDrag, isShowingInnerSheet, animateTo, frameSize, positions, setPosition]), handleAnimationViewLayout =
|
|
175
|
+
}, [disableDrag, isShowingInnerSheet, animateTo, frameSize, positions, setPosition]), handleAnimationViewLayout = useCallback(
|
|
165
176
|
(e) => {
|
|
166
177
|
var _a;
|
|
167
178
|
const next = Math.min(
|
|
168
179
|
(_a = e.nativeEvent) == null ? void 0 : _a.layout.height,
|
|
169
|
-
|
|
180
|
+
Dimensions.get("window").height
|
|
170
181
|
);
|
|
171
182
|
next && setFrameSize(next);
|
|
172
183
|
},
|
|
173
184
|
[keyboardIsVisible]
|
|
174
|
-
), handleMaxContentViewLayout =
|
|
185
|
+
), handleMaxContentViewLayout = useCallback(
|
|
175
186
|
(e) => {
|
|
176
187
|
var _a;
|
|
177
188
|
const next = Math.min(
|
|
178
189
|
(_a = e.nativeEvent) == null ? void 0 : _a.layout.height,
|
|
179
|
-
|
|
190
|
+
Dimensions.get("window").height
|
|
180
191
|
);
|
|
181
192
|
next && setMaxContentSize(next);
|
|
182
193
|
},
|
|
@@ -186,23 +197,23 @@ const SheetImplementationCustom = (0, import_core.themeable)(
|
|
|
186
197
|
return {
|
|
187
198
|
transform: [{ translateY: frameSize === 0 ? hiddenSize : val }]
|
|
188
199
|
};
|
|
189
|
-
}), sizeBeforeKeyboard =
|
|
190
|
-
|
|
191
|
-
if (
|
|
200
|
+
}), sizeBeforeKeyboard = useRef(null);
|
|
201
|
+
useEffect(() => {
|
|
202
|
+
if (isWeb || !moveOnKeyboardChange)
|
|
192
203
|
return;
|
|
193
|
-
const keyboardDidShowListener =
|
|
204
|
+
const keyboardDidShowListener = Keyboard.addListener("keyboardDidShow", (e) => {
|
|
194
205
|
sizeBeforeKeyboard.current === null && (sizeBeforeKeyboard.current = animatedNumber.getValue(), animatedNumber.setValue(
|
|
195
206
|
Math.max(animatedNumber.getValue() - e.endCoordinates.height, 0)
|
|
196
207
|
));
|
|
197
|
-
}), keyboardDidHideListener =
|
|
208
|
+
}), keyboardDidHideListener = Keyboard.addListener("keyboardDidHide", () => {
|
|
198
209
|
sizeBeforeKeyboard.current !== null && (animatedNumber.setValue(sizeBeforeKeyboard.current), sizeBeforeKeyboard.current = null);
|
|
199
210
|
});
|
|
200
211
|
return () => {
|
|
201
212
|
keyboardDidHideListener.remove(), keyboardDidShowListener.remove();
|
|
202
213
|
};
|
|
203
214
|
}, [moveOnKeyboardChange]);
|
|
204
|
-
const [opacity, setOpacity] =
|
|
205
|
-
open && opacity === 0 && setOpacity(1),
|
|
215
|
+
const [opacity, setOpacity] = useState(open ? 1 : 0);
|
|
216
|
+
open && opacity === 0 && setOpacity(1), useEffect(() => {
|
|
206
217
|
if (!open) {
|
|
207
218
|
const tm = setTimeout(() => {
|
|
208
219
|
setOpacity(0);
|
|
@@ -212,10 +223,10 @@ const SheetImplementationCustom = (0, import_core.themeable)(
|
|
|
212
223
|
};
|
|
213
224
|
}
|
|
214
225
|
}, [open]);
|
|
215
|
-
const forcedContentHeight = hasFit ? void 0 : snapPointsMode === "percent" ? `${maxSnapPoint}%` : maxSnapPoint, contents = /* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
snapPointsMode !== "percent" && /* @__PURE__ */
|
|
218
|
-
|
|
226
|
+
const forcedContentHeight = hasFit ? void 0 : snapPointsMode === "percent" ? `${maxSnapPoint}%` : maxSnapPoint, contents = /* @__PURE__ */ jsx(ParentSheetContext.Provider, { value: nextParentContext, children: /* @__PURE__ */ jsxs(SheetProvider, { ...providerProps, children: [
|
|
227
|
+
/* @__PURE__ */ jsx(AnimatePresence, { enterExitVariant: "open", children: shouldHideParentSheet || !open ? null : overlayComponent }),
|
|
228
|
+
snapPointsMode !== "percent" && /* @__PURE__ */ jsx(
|
|
229
|
+
View,
|
|
219
230
|
{
|
|
220
231
|
style: {
|
|
221
232
|
opacity: 0,
|
|
@@ -230,7 +241,7 @@ const SheetImplementationCustom = (0, import_core.themeable)(
|
|
|
230
241
|
onLayout: handleMaxContentViewLayout
|
|
231
242
|
}
|
|
232
243
|
),
|
|
233
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ jsx(
|
|
234
245
|
AnimatedView,
|
|
235
246
|
{
|
|
236
247
|
ref,
|
|
@@ -256,10 +267,10 @@ const SheetImplementationCustom = (0, import_core.themeable)(
|
|
|
256
267
|
children: props.children
|
|
257
268
|
}
|
|
258
269
|
)
|
|
259
|
-
] }) }), adaptContext =
|
|
270
|
+
] }) }), adaptContext = useContext(AdaptParentContext), shouldMountChildren = !!(opacity || !unmountChildrenWhenHidden);
|
|
260
271
|
if (modal) {
|
|
261
|
-
const modalContents = /* @__PURE__ */
|
|
262
|
-
return
|
|
272
|
+
const modalContents = /* @__PURE__ */ jsx(Portal, { zIndex, ...portalProps, children: shouldMountChildren && /* @__PURE__ */ jsx(Theme, { forceClassName: !0, name: themeName, children: /* @__PURE__ */ jsx(AdaptParentContext.Provider, { value: adaptContext, children: contents }) }) });
|
|
273
|
+
return isWeb ? modalContents : /* @__PURE__ */ jsx(SheetInsideSheetContext.Provider, { value: onInnerSheet, children: modalContents });
|
|
263
274
|
}
|
|
264
275
|
return contents;
|
|
265
276
|
})
|
|
@@ -285,8 +296,7 @@ function getYPositions(mode, point, screenSize, frameSize) {
|
|
|
285
296
|
const pct = Math.min(100, Math.max(0, Number(point))) / 100;
|
|
286
297
|
return Number.isNaN(pct) ? (console.warn("Invalid snapPoint percentage"), 0) : Math.round(screenSize - pct * screenSize);
|
|
287
298
|
}
|
|
288
|
-
|
|
289
|
-
0 && (module.exports = {
|
|
299
|
+
export {
|
|
290
300
|
SheetImplementationCustom
|
|
291
|
-
}
|
|
301
|
+
};
|
|
292
302
|
//# sourceMappingURL=SheetImplementationCustom.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SheetImplementationCustom.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": ["
|
|
4
|
+
"mappings": "AAAA,SAAS,0BAA0B;AACnC,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAChC,SAAS,OAAO,iCAAiC;AACjD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,0BAA0B;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP,SAAS,YAAY,UAAU,cAAc,YAAY;AAEzD,SAAS,+BAA+B;AACxC,SAAS,oBAAoB,+BAA+B;AAC5D,SAAS,gBAAgB;AACzB,SAAS,qBAAqB;AAE9B,SAAS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;AAEA,WAAO;AAAA,EACT,CAAC;AACH;AAEA,SAAS,cACP,MACA,OACA,YACA,WACA;AACA,MAAI,CAAC,cAAc,CAAC;AAAW,WAAO;AAEtC,MAAI,SAAS,SAAS;AACpB,QAAI,OAAO,SAAU;AACnB,aAAO,aAAa,KAAK,IAAI,YAAY,KAAK,IAAI,GAAG,KAAK,CAAC;AAE7D,QAAI,UAAU;AACZ,aAAO,aAAa,KAAK,IAAI,YAAY,SAAS;AAEpD,QAAI,MAAM,SAAS,GAAG,GAAG;AACvB,YAAMC,OAAM,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,OAAO,MAAM,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI;AACrE,aAAI,OAAO,MAAMA,IAAG,KAClB,QAAQ,KAAK,qCAAqC,GAC3C,KAEI,KAAK,MAAM,aAAaA,OAAM,UAAU;AAAA,IAEvD;AACA,mBAAQ,KAAK,iCAAiC,GACvC;AAAA,EACT;AAEA,MAAI,SAAS;AACX,WAAI,UAAU,IAAU,aACjB,aAAa,KAAK,IAAI,YAAY,SAAS;AAGpD,MAAI,SAAS,cAAc,OAAO,SAAU;AAC1C,WAAO,aAAa,KAAK,IAAI,YAAY,KAAK,IAAI,GAAG,KAAK,CAAC;AAG7D,QAAM,MAAM,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,OAAO,KAAK,CAAC,CAAC,IAAI;AACxD,SAAI,OAAO,MAAM,GAAG,KAClB,QAAQ,KAAK,8BAA8B,GACpC,KAGF,KAAK,MAAM,aAAa,MAAM,UAAU;AACjD;",
|
|
5
|
+
"names": ["position", "state", "pct"]
|
|
6
6
|
}
|
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var SheetScrollView_exports = {};
|
|
17
|
-
__export(SheetScrollView_exports, {
|
|
18
|
-
SheetScrollView: () => SheetScrollView
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(SheetScrollView_exports);
|
|
21
|
-
var import_compose_refs = require("@tamagui/compose-refs"), import_scroll_view = require("@tamagui/scroll-view"), import_react = require("react"), import_SheetContext = require("./SheetContext"), import_jsx_runtime = require("react/jsx-runtime");
|
|
22
|
-
const SHEET_SCROLL_VIEW_NAME = "SheetScrollView", SheetScrollView = (0, import_react.forwardRef)(
|
|
1
|
+
import { composeRefs } from "@tamagui/compose-refs";
|
|
2
|
+
import { ScrollView } from "@tamagui/scroll-view";
|
|
3
|
+
import { forwardRef, useMemo, useRef } from "react";
|
|
4
|
+
import { useSheetContext } from "./SheetContext";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
const SHEET_SCROLL_VIEW_NAME = "SheetScrollView", SheetScrollView = forwardRef(
|
|
23
7
|
({ __scopeSheet, children, onScroll, ...props }, ref) => {
|
|
24
|
-
const context =
|
|
8
|
+
const context = useSheetContext(SHEET_SCROLL_VIEW_NAME, __scopeSheet), { scrollBridge } = context, scrollRef = useRef(null), state = useRef({
|
|
25
9
|
lastPageY: 0,
|
|
26
10
|
dragAt: 0,
|
|
27
11
|
dys: [],
|
|
@@ -42,10 +26,10 @@ const SHEET_SCROLL_VIEW_NAME = "SheetScrollView", SheetScrollView = (0, import_r
|
|
|
42
26
|
vy
|
|
43
27
|
});
|
|
44
28
|
};
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
|
|
29
|
+
return /* @__PURE__ */ jsx(
|
|
30
|
+
ScrollView,
|
|
47
31
|
{
|
|
48
|
-
ref:
|
|
32
|
+
ref: composeRefs(scrollRef, ref),
|
|
49
33
|
flex: 1,
|
|
50
34
|
scrollEventThrottle: 8,
|
|
51
35
|
onScroll: (e) => {
|
|
@@ -57,13 +41,12 @@ const SHEET_SCROLL_VIEW_NAME = "SheetScrollView", SheetScrollView = (0, import_r
|
|
|
57
41
|
onResponderRelease: release,
|
|
58
42
|
className: "_ovs-contain",
|
|
59
43
|
...props,
|
|
60
|
-
children:
|
|
44
|
+
children: useMemo(() => children, [children])
|
|
61
45
|
}
|
|
62
46
|
);
|
|
63
47
|
}
|
|
64
48
|
);
|
|
65
|
-
|
|
66
|
-
0 && (module.exports = {
|
|
49
|
+
export {
|
|
67
50
|
SheetScrollView
|
|
68
|
-
}
|
|
51
|
+
};
|
|
69
52
|
//# sourceMappingURL=SheetScrollView.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SheetScrollView.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,mBAAmB;AAG5B,SAAS,kBAAkB;AAC3B,SAAS,YAAY,SAAS,cAAc;AAG5C,SAAS,uBAAuB;AAgE1B;AAvDN,MAAM,yBAAyB,mBAElB,kBAAkB;AAAA,EAC7B,CACE,EAAE,cAAc,UAAU,UAAU,GAAG,MAAM,GAC7C,QACG;AACH,UAAM,UAAU,gBAAgB,wBAAwB,YAAY,GAC9D,EAAE,aAAa,IAAI,SAEnB,YAAY,OAA4B,IAAI,GAc5C,QAAQ,OAAO;AAAA,MACnB,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,KAAK,CAAC;AAAA;AAAA,MACN,aAAa;AAAA,MACb,YAAY;AAAA,IACd,CAAC,GAEK,UAAU,MAAM;AACpB,UAAI,CAAC,MAAM,QAAQ;AACjB;AAEF,YAAM,QAAQ,aAAa,IAC3B,aAAa,eAAe,IAC5B,MAAM,QAAQ,cAAc;AAE5B,UAAI,KAAK;AACT,UAAI,MAAM,QAAQ,IAAI,QAAQ;AAC5B,cAAM,YAAY,MAAM,QAAQ,IAAI,MAAM,GAAG;AAG7C,cAFa,UAAU,SAAS,UAAU,OAAO,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,IAAI,KAClD,UAAU,SAClB;AAAA,MACf;AACA,YAAM,QAAQ,MAAM,CAAC,GACrB,aAAa,QAAQ;AAAA,QACnB,QAAQ,MAAM,QAAQ;AAAA,QACtB;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAK,YAAY,WAAkB,GAAG;AAAA,QACtC,MAAM;AAAA,QACN,qBAAqB;AAAA,QAErB,UAAU,CAAC,MAAM;AACf,gBAAM,EAAE,EAAE,IAAI,EAAE,YAAY;AAC5B,uBAAa,IAAI,GACb,IAAI,MACN,aAAa,eAAe,KAI9B,6BAAW;AAAA,QASb;AAAA,QACA,2BAA2B,OACzB,aAAa,eAAe,IAC5B,MAAM,QAAQ,aAAa,IACpB;AAAA,QAGT,0BAA0B,MAAM;AAAA,QAmChC,oBAAoB;AAAA,QACpB,WAAU;AAAA,QACT,GAAG;AAAA,QAEH,kBAAQ,MAAM,UAAU,CAAC,QAAQ,CAAC;AAAA;AAAA,IACrC;AAAA,EAEJ;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,36 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var constants_exports = {};
|
|
17
|
-
__export(constants_exports, {
|
|
18
|
-
SHEET_HANDLE_NAME: () => SHEET_HANDLE_NAME,
|
|
19
|
-
SHEET_HIDDEN_STYLESHEET: () => SHEET_HIDDEN_STYLESHEET,
|
|
20
|
-
SHEET_NAME: () => SHEET_NAME,
|
|
21
|
-
SHEET_OVERLAY_NAME: () => SHEET_OVERLAY_NAME,
|
|
22
|
-
constants: () => constants
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(constants_exports);
|
|
25
|
-
var import_core = require("@tamagui/core");
|
|
26
|
-
const constants = {}, SHEET_NAME = "Sheet", SHEET_HANDLE_NAME = "SheetHandle", SHEET_OVERLAY_NAME = "SheetOverlay", SHEET_HIDDEN_STYLESHEET = import_core.isClient ? document.createElement("style") : null;
|
|
1
|
+
import { isClient } from "@tamagui/core";
|
|
2
|
+
const constants = {}, SHEET_NAME = "Sheet", SHEET_HANDLE_NAME = "SheetHandle", SHEET_OVERLAY_NAME = "SheetOverlay", SHEET_HIDDEN_STYLESHEET = isClient ? document.createElement("style") : null;
|
|
27
3
|
SHEET_HIDDEN_STYLESHEET && document.head.appendChild(SHEET_HIDDEN_STYLESHEET);
|
|
28
|
-
|
|
29
|
-
0 && (module.exports = {
|
|
4
|
+
export {
|
|
30
5
|
SHEET_HANDLE_NAME,
|
|
31
6
|
SHEET_HIDDEN_STYLESHEET,
|
|
32
7
|
SHEET_NAME,
|
|
33
8
|
SHEET_OVERLAY_NAME,
|
|
34
9
|
constants
|
|
35
|
-
}
|
|
10
|
+
};
|
|
36
11
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,gBAAgB;AAElB,MAAM,YAAY,CAAC,GAEb,aAAa,SACb,oBAAoB,eACpB,qBAAqB,gBAErB,0BAA0B,WAAW,SAAS,cAAc,OAAO,IAAI;AAChF,2BACF,SAAS,KAAK,YAAY,uBAAuB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,31 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var contexts_exports = {};
|
|
17
|
-
__export(contexts_exports, {
|
|
18
|
-
ParentSheetContext: () => ParentSheetContext,
|
|
19
|
-
SheetInsideSheetContext: () => SheetInsideSheetContext
|
|
20
|
-
});
|
|
21
|
-
module.exports = __toCommonJS(contexts_exports);
|
|
22
|
-
var import_react = require("react");
|
|
23
|
-
const ParentSheetContext = (0, import_react.createContext)({
|
|
1
|
+
import { createContext } from "react";
|
|
2
|
+
const ParentSheetContext = createContext({
|
|
24
3
|
zIndex: 1e5
|
|
25
|
-
}), SheetInsideSheetContext =
|
|
26
|
-
|
|
27
|
-
0 && (module.exports = {
|
|
4
|
+
}), SheetInsideSheetContext = createContext(null);
|
|
5
|
+
export {
|
|
28
6
|
ParentSheetContext,
|
|
29
7
|
SheetInsideSheetContext
|
|
30
|
-
}
|
|
8
|
+
};
|
|
31
9
|
//# sourceMappingURL=contexts.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/contexts.ts"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,qBAAqB;AAEvB,MAAM,qBAAqB,cAAc;AAAA,EAC9C,QAAQ;AACV,CAAC,GAEY,0BAA0B,cAErC,IAAI;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|