@tamagui/sheet 1.26.0 → 1.27.0-1684163004699

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.
Files changed (212) hide show
  1. package/dist/cjs/Sheet.js +24 -427
  2. package/dist/cjs/Sheet.js.map +2 -2
  3. package/dist/cjs/SheetContext.js.map +1 -1
  4. package/dist/cjs/SheetImplementationCustom.js +340 -0
  5. package/dist/cjs/SheetImplementationCustom.js.map +6 -0
  6. package/dist/cjs/constants.js +13 -0
  7. package/dist/cjs/constants.js.map +1 -1
  8. package/dist/cjs/{useSheetContoller.js → contexts.js} +12 -21
  9. package/dist/cjs/contexts.js.map +6 -0
  10. package/dist/cjs/createSheet.js +167 -0
  11. package/dist/cjs/createSheet.js.map +6 -0
  12. package/dist/cjs/helpers.js +38 -0
  13. package/dist/cjs/helpers.js.map +6 -0
  14. package/dist/cjs/index.js +4 -0
  15. package/dist/cjs/index.js.map +1 -1
  16. package/dist/cjs/nativeSheet.js +3 -5
  17. package/dist/cjs/nativeSheet.js.map +1 -1
  18. package/dist/cjs/{getNativeSheet.js → useSheet.js} +8 -17
  19. package/dist/cjs/useSheet.js.map +6 -0
  20. package/dist/cjs/useSheetController.js +2 -1
  21. package/dist/cjs/useSheetController.js.map +1 -1
  22. package/dist/cjs/useSheetProviderProps.js +30 -3
  23. package/dist/cjs/useSheetProviderProps.js.map +1 -1
  24. package/dist/esm/Sheet.js +21 -449
  25. package/dist/esm/Sheet.js.map +2 -2
  26. package/dist/esm/SheetContext.js.map +1 -1
  27. package/dist/esm/{Sheet.mjs → SheetImplementationCustom.js} +88 -279
  28. package/dist/esm/SheetImplementationCustom.js.map +6 -0
  29. package/dist/esm/constants.js +10 -0
  30. package/dist/esm/constants.js.map +1 -1
  31. package/dist/esm/contexts.js +10 -0
  32. package/dist/esm/contexts.js.map +6 -0
  33. package/dist/esm/createSheet.js +151 -0
  34. package/dist/esm/createSheet.js.map +6 -0
  35. package/dist/esm/helpers.js +14 -0
  36. package/dist/esm/helpers.js.map +6 -0
  37. package/dist/esm/index.js +2 -0
  38. package/dist/esm/index.js.map +1 -1
  39. package/dist/esm/nativeSheet.js +3 -5
  40. package/dist/esm/nativeSheet.js.map +1 -1
  41. package/dist/esm/useSheet.js +6 -0
  42. package/dist/esm/useSheet.js.map +6 -0
  43. package/dist/esm/useSheetController.js +2 -1
  44. package/dist/esm/useSheetController.js.map +1 -1
  45. package/dist/esm/useSheetProviderProps.js +31 -4
  46. package/dist/esm/useSheetProviderProps.js.map +1 -1
  47. package/dist/jsx/Sheet.js +21 -436
  48. package/dist/jsx/Sheet.js.map +2 -2
  49. package/dist/jsx/Sheet.mjs +21 -436
  50. package/dist/jsx/Sheet.mjs.map +2 -2
  51. package/dist/jsx/SheetContext.js.map +1 -1
  52. package/dist/jsx/SheetContext.mjs.map +1 -1
  53. package/dist/jsx/SheetImplementationCustom.js +330 -0
  54. package/dist/jsx/SheetImplementationCustom.js.map +6 -0
  55. package/dist/jsx/SheetImplementationCustom.mjs +330 -0
  56. package/dist/jsx/SheetImplementationCustom.mjs.map +6 -0
  57. package/dist/jsx/constants.js +10 -0
  58. package/dist/jsx/constants.js.map +1 -1
  59. package/dist/jsx/constants.mjs +10 -0
  60. package/dist/jsx/constants.mjs.map +1 -1
  61. package/dist/jsx/contexts.js +10 -0
  62. package/dist/jsx/contexts.js.map +6 -0
  63. package/dist/jsx/contexts.mjs +10 -0
  64. package/dist/jsx/contexts.mjs.map +6 -0
  65. package/dist/jsx/createSheet.js +139 -0
  66. package/dist/jsx/createSheet.js.map +6 -0
  67. package/dist/jsx/createSheet.mjs +139 -0
  68. package/dist/jsx/createSheet.mjs.map +6 -0
  69. package/dist/jsx/helpers.js +14 -0
  70. package/dist/jsx/helpers.js.map +6 -0
  71. package/dist/jsx/helpers.mjs +14 -0
  72. package/dist/jsx/helpers.mjs.map +6 -0
  73. package/dist/jsx/index.js +2 -0
  74. package/dist/jsx/index.js.map +1 -1
  75. package/dist/jsx/index.mjs +2 -0
  76. package/dist/jsx/index.mjs.map +1 -1
  77. package/dist/jsx/nativeSheet.js +3 -5
  78. package/dist/jsx/nativeSheet.js.map +1 -1
  79. package/dist/jsx/nativeSheet.mjs +3 -5
  80. package/dist/jsx/nativeSheet.mjs.map +1 -1
  81. package/dist/jsx/useSheet.js +6 -0
  82. package/dist/jsx/useSheet.js.map +6 -0
  83. package/dist/jsx/useSheet.mjs +6 -0
  84. package/dist/jsx/useSheet.mjs.map +6 -0
  85. package/dist/jsx/useSheetController.js +2 -1
  86. package/dist/jsx/useSheetController.js.map +1 -1
  87. package/dist/jsx/useSheetController.mjs +2 -1
  88. package/dist/jsx/useSheetController.mjs.map +1 -1
  89. package/dist/jsx/useSheetProviderProps.js +31 -4
  90. package/dist/jsx/useSheetProviderProps.js.map +1 -1
  91. package/dist/jsx/useSheetProviderProps.mjs +31 -4
  92. package/dist/jsx/useSheetProviderProps.mjs.map +1 -1
  93. package/package.json +14 -13
  94. package/src/Sheet.tsx +20 -544
  95. package/src/SheetContext.tsx +1 -16
  96. package/src/SheetImplementationCustom.tsx +404 -0
  97. package/src/constants.tsx +11 -0
  98. package/src/contexts.ts +9 -0
  99. package/src/createSheet.tsx +215 -0
  100. package/src/helpers.tsx +10 -0
  101. package/src/index.ts +2 -0
  102. package/src/nativeSheet.tsx +3 -5
  103. package/src/useSheet.tsx +3 -0
  104. package/src/useSheetController.tsx +1 -0
  105. package/src/useSheetProviderProps.tsx +48 -7
  106. package/types/Sheet.d.ts +163 -80
  107. package/types/Sheet.d.ts.map +1 -1
  108. package/types/SheetContext.d.ts +100 -27
  109. package/types/SheetContext.d.ts.map +1 -1
  110. package/types/SheetImplementationCustom.d.ts +27 -0
  111. package/types/SheetImplementationCustom.d.ts.map +1 -0
  112. package/types/constants.d.ts +3 -0
  113. package/types/constants.d.ts.map +1 -1
  114. package/types/contexts.d.ts +6 -0
  115. package/types/contexts.d.ts.map +1 -0
  116. package/types/createSheet.d.ts +70 -0
  117. package/types/createSheet.d.ts.map +1 -0
  118. package/types/helpers.d.ts +2 -0
  119. package/types/helpers.d.ts.map +1 -0
  120. package/types/index.d.ts +2 -0
  121. package/types/index.d.ts.map +1 -1
  122. package/types/nativeSheet.d.ts.map +1 -1
  123. package/types/useSheet.d.ts +22 -0
  124. package/types/useSheet.d.ts.map +1 -0
  125. package/types/useSheetController.d.ts +1 -0
  126. package/types/useSheetController.d.ts.map +1 -1
  127. package/types/useSheetProviderProps.d.ts +8 -3
  128. package/types/useSheetProviderProps.d.ts.map +1 -1
  129. package/dist/cjs/getNativeSheet.js.map +0 -6
  130. package/dist/cjs/native-ios.js +0 -5
  131. package/dist/cjs/native-ios.js.map +0 -6
  132. package/dist/cjs/useSheetChildren.js +0 -80
  133. package/dist/cjs/useSheetChildren.js.map +0 -6
  134. package/dist/cjs/useSheetContoller.js.map +0 -6
  135. package/dist/cjs/useSheetSnapPoints.js +0 -77
  136. package/dist/cjs/useSheetSnapPoints.js.map +0 -6
  137. package/dist/esm/Sheet.mjs.map +0 -6
  138. package/dist/esm/SheetContext.mjs +0 -14
  139. package/dist/esm/SheetContext.mjs.map +0 -6
  140. package/dist/esm/SheetController.mjs +0 -25
  141. package/dist/esm/SheetController.mjs.map +0 -6
  142. package/dist/esm/SheetScrollView.mjs +0 -81
  143. package/dist/esm/SheetScrollView.mjs.map +0 -6
  144. package/dist/esm/constants.mjs +0 -9
  145. package/dist/esm/constants.mjs.map +0 -6
  146. package/dist/esm/getNativeSheet.js +0 -14
  147. package/dist/esm/getNativeSheet.js.map +0 -6
  148. package/dist/esm/getNativeSheet.mjs +0 -14
  149. package/dist/esm/getNativeSheet.mjs.map +0 -6
  150. package/dist/esm/index.mjs +0 -8
  151. package/dist/esm/index.mjs.map +0 -6
  152. package/dist/esm/native-ios.js +0 -4
  153. package/dist/esm/native-ios.js.map +0 -6
  154. package/dist/esm/native-ios.mjs +0 -4
  155. package/dist/esm/native-ios.mjs.map +0 -6
  156. package/dist/esm/nativeSheet.mjs +0 -47
  157. package/dist/esm/nativeSheet.mjs.map +0 -6
  158. package/dist/esm/types.mjs +0 -1
  159. package/dist/esm/types.mjs.map +0 -6
  160. package/dist/esm/useSheetChildren.js +0 -46
  161. package/dist/esm/useSheetChildren.js.map +0 -6
  162. package/dist/esm/useSheetChildren.mjs +0 -46
  163. package/dist/esm/useSheetChildren.mjs.map +0 -6
  164. package/dist/esm/useSheetContoller.js +0 -19
  165. package/dist/esm/useSheetContoller.js.map +0 -6
  166. package/dist/esm/useSheetContoller.mjs +0 -19
  167. package/dist/esm/useSheetContoller.mjs.map +0 -6
  168. package/dist/esm/useSheetController.mjs +0 -19
  169. package/dist/esm/useSheetController.mjs.map +0 -6
  170. package/dist/esm/useSheetOpenState.mjs +0 -27
  171. package/dist/esm/useSheetOpenState.mjs.map +0 -6
  172. package/dist/esm/useSheetProviderProps.mjs +0 -64
  173. package/dist/esm/useSheetProviderProps.mjs.map +0 -6
  174. package/dist/esm/useSheetSnapPoints.js +0 -53
  175. package/dist/esm/useSheetSnapPoints.js.map +0 -6
  176. package/dist/esm/useSheetSnapPoints.mjs +0 -53
  177. package/dist/esm/useSheetSnapPoints.mjs.map +0 -6
  178. package/dist/jsx/getNativeSheet.js +0 -14
  179. package/dist/jsx/getNativeSheet.js.map +0 -6
  180. package/dist/jsx/getNativeSheet.mjs +0 -14
  181. package/dist/jsx/getNativeSheet.mjs.map +0 -6
  182. package/dist/jsx/native-ios.js +0 -4
  183. package/dist/jsx/native-ios.js.map +0 -6
  184. package/dist/jsx/native-ios.mjs +0 -4
  185. package/dist/jsx/native-ios.mjs.map +0 -6
  186. package/dist/jsx/useSheetChildren.js +0 -45
  187. package/dist/jsx/useSheetChildren.js.map +0 -6
  188. package/dist/jsx/useSheetChildren.mjs +0 -45
  189. package/dist/jsx/useSheetChildren.mjs.map +0 -6
  190. package/dist/jsx/useSheetContoller.js +0 -19
  191. package/dist/jsx/useSheetContoller.js.map +0 -6
  192. package/dist/jsx/useSheetContoller.mjs +0 -19
  193. package/dist/jsx/useSheetContoller.mjs.map +0 -6
  194. package/dist/jsx/useSheetSnapPoints.js +0 -53
  195. package/dist/jsx/useSheetSnapPoints.js.map +0 -6
  196. package/dist/jsx/useSheetSnapPoints.mjs +0 -53
  197. package/dist/jsx/useSheetSnapPoints.mjs.map +0 -6
  198. package/src/useSheetChildren.tsx +0 -47
  199. package/src/useSheetSnapPoints.tsx +0 -60
  200. package/types/SHEET_HANDLE_NAME.d.ts +0 -4
  201. package/types/getNativeSheet.d.ts +0 -3
  202. package/types/getNativeSheet.d.ts.map +0 -1
  203. package/types/native-ios.d.ts +0 -2
  204. package/types/native-ios.d.ts.map +0 -1
  205. package/types/useAnimated.d.ts +0 -19
  206. package/types/useAnimation.d.ts +0 -1
  207. package/types/useSheetChildren.d.ts +0 -7
  208. package/types/useSheetChildren.d.ts.map +0 -1
  209. package/types/useSheetContoller.d.ts +0 -14
  210. package/types/useSheetContoller.d.ts.map +0 -1
  211. package/types/useSheetSnapPoints.d.ts +0 -7
  212. package/types/useSheetSnapPoints.d.ts.map +0 -1
package/dist/cjs/Sheet.js CHANGED
@@ -19,39 +19,22 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
19
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
20
  var Sheet_exports = {};
21
21
  __export(Sheet_exports, {
22
- ControlledSheet: () => ControlledSheet,
22
+ Frame: () => Frame,
23
+ Handle: () => Handle,
24
+ Overlay: () => Overlay,
23
25
  Sheet: () => Sheet,
24
- SheetFrame: () => SheetFrame,
25
- SheetFrameFrame: () => SheetFrameFrame,
26
- SheetHandle: () => SheetHandle,
27
26
  SheetHandleFrame: () => SheetHandleFrame,
28
- SheetOverlay: () => SheetOverlay,
29
27
  SheetOverlayFrame: () => SheetOverlayFrame,
30
- createSheetScope: () => import_SheetContext2.createSheetScope
28
+ createSheetScope: () => import_SheetContext.createSheetScope
31
29
  });
32
30
  module.exports = __toCommonJS(Sheet_exports);
33
- var import_jsx_runtime = require("react/jsx-runtime");
34
- var import_adapt = require("@tamagui/adapt");
35
- var import_compose_refs = require("@tamagui/compose-refs");
36
31
  var import_core = require("@tamagui/core");
37
- var import_portal = require("@tamagui/portal");
38
- var import_remove_scroll = require("@tamagui/remove-scroll");
39
32
  var import_stacks = require("@tamagui/stacks");
40
- var import_use_keyboard_visible = require("@tamagui/use-keyboard-visible");
41
- var import_react = require("react");
42
- var import_react_native = require("react-native");
43
33
  var import_constants = require("./constants");
44
- var import_nativeSheet = require("./nativeSheet");
34
+ var import_createSheet = require("./createSheet");
45
35
  var import_SheetContext = require("./SheetContext");
46
- var import_SheetScrollView = require("./SheetScrollView");
47
- var import_useSheetChildren = require("./useSheetChildren");
48
- var import_useSheetController = require("./useSheetController");
49
- var import_useSheetOpenState = require("./useSheetOpenState");
50
- var import_useSheetProviderProps = require("./useSheetProviderProps");
51
- var import_useSheetSnapPoints = require("./useSheetSnapPoints");
52
- var import_SheetContext2 = require("./SheetContext");
53
36
  __reExport(Sheet_exports, require("./types"), module.exports);
54
- const SheetHandleFrame = (0, import_core.styled)(import_stacks.XStack, {
37
+ const Handle = (0, import_core.styled)(import_stacks.XStack, {
55
38
  name: import_constants.SHEET_HANDLE_NAME,
56
39
  variants: {
57
40
  open: {
@@ -82,34 +65,17 @@ const SheetHandleFrame = (0, import_core.styled)(import_stacks.XStack, {
82
65
  unstyled: false
83
66
  }
84
67
  });
85
- const SheetHandle = SheetHandleFrame.extractable(
86
- ({ __scopeSheet, ...props }) => {
87
- const context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_HANDLE_NAME, __scopeSheet);
88
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
89
- SheetHandleFrame,
90
- {
91
- onPress: () => {
92
- const max = context.snapPoints.length + (context.dismissOnSnapToBottom ? -1 : 0);
93
- const nextPos = (context.position + 1) % max;
94
- context.setPosition(nextPos);
95
- },
96
- open: context.open,
97
- ...props
98
- }
99
- );
100
- }
101
- );
102
- const SHEET_OVERLAY_NAME = "SheetOverlay";
103
- const SheetOverlayFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
104
- name: SHEET_OVERLAY_NAME,
68
+ const Overlay = (0, import_core.styled)(import_stacks.ThemeableStack, {
69
+ name: import_constants.SHEET_OVERLAY_NAME,
105
70
  variants: {
106
- closed: {
71
+ open: {
107
72
  true: {
108
- opacity: 0,
109
- pointerEvents: "none"
73
+ opacity: 1,
74
+ pointerEvents: "auto"
110
75
  },
111
76
  false: {
112
- pointerEvents: "auto"
77
+ opacity: 0,
78
+ pointerEvents: "none"
113
79
  }
114
80
  },
115
81
  unstyled: {
@@ -125,29 +91,7 @@ const SheetOverlayFrame = (0, import_core.styled)(import_stacks.ThemeableStack,
125
91
  unstyled: false
126
92
  }
127
93
  });
128
- const SheetOverlay = SheetOverlayFrame.extractable(
129
- ({ __scopeSheet, ...props }) => {
130
- const context = (0, import_SheetContext.useSheetContext)(SHEET_OVERLAY_NAME, __scopeSheet);
131
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
132
- SheetOverlayFrame,
133
- {
134
- closed: !context.open || context.hidden,
135
- ...props,
136
- onPress: (0, import_core.mergeEvent)(
137
- props.onPress,
138
- context.dismissOnOverlayPress ? () => {
139
- context.setOpen(false);
140
- } : void 0
141
- )
142
- }
143
- );
144
- }
145
- );
146
- const selectionStyleSheet = import_core.isClient ? document.createElement("style") : null;
147
- if (selectionStyleSheet) {
148
- document.head.appendChild(selectionStyleSheet);
149
- }
150
- const SheetFrameFrame = (0, import_core.styled)(import_stacks.YStack, {
94
+ const Frame = (0, import_core.styled)(import_stacks.YStack, {
151
95
  name: import_constants.SHEET_NAME,
152
96
  variants: {
153
97
  unstyled: {
@@ -158,8 +102,7 @@ const SheetFrameFrame = (0, import_core.styled)(import_stacks.YStack, {
158
102
  borderTopRightRadius: "$true",
159
103
  width: "100%",
160
104
  maxHeight: "100%",
161
- overflow: "hidden",
162
- pointerEvents: "auto"
105
+ overflow: "hidden"
163
106
  }
164
107
  }
165
108
  },
@@ -167,366 +110,20 @@ const SheetFrameFrame = (0, import_core.styled)(import_stacks.YStack, {
167
110
  unstyled: false
168
111
  }
169
112
  });
170
- const SheetFrame = SheetFrameFrame.extractable(
171
- (0, import_react.forwardRef)(
172
- ({ __scopeSheet, ...props }, forwardedRef) => {
173
- const context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_NAME, __scopeSheet);
174
- const composedContentRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.contentRef);
175
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetFrameFrame, { ref: composedContentRef, ...props });
176
- }
177
- )
178
- );
179
- const HIDDEN_SIZE = 1e4;
180
- const sheetComponents = {
181
- Handle: SheetHandle,
182
- Frame: SheetFrame,
183
- Overlay: SheetOverlay,
184
- ScrollView: import_SheetScrollView.SheetScrollView
185
- };
186
- const ParentSheetContext = (0, import_react.createContext)({
187
- zIndex: 1e5
113
+ const Sheet = (0, import_createSheet.createSheet)({
114
+ Frame,
115
+ Handle,
116
+ Overlay
188
117
  });
189
- const Sheet = (0, import_core.withStaticProperties)(
190
- (0, import_react.forwardRef)(function Sheet2(props, ref) {
191
- const hydrated = (0, import_core.useDidFinishSSR)();
192
- const { isShowingNonSheet } = (0, import_useSheetController.useSheetController)();
193
- let SheetImplementation = SheetImplementationCustom;
194
- if (props.native && import_react_native.Platform.OS === "ios") {
195
- if (process.env.TAMAGUI_TARGET === "native") {
196
- const impl = (0, import_nativeSheet.getNativeSheet)("ios");
197
- if (impl) {
198
- SheetImplementation = impl;
199
- }
200
- }
201
- }
202
- if (isShowingNonSheet || !hydrated) {
203
- return null;
204
- }
205
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetImplementation, { ref, ...props });
206
- }),
207
- sheetComponents
208
- );
209
- const SheetImplementationCustom = (0, import_core.themeable)(
210
- (0, import_react.forwardRef)(function SheetImplementationCustom2(props, forwardedRef) {
211
- const parentSheet = (0, import_react.useContext)(ParentSheetContext);
212
- const {
213
- animationConfig,
214
- forceRemoveScrollEnabled = null,
215
- disableDrag: disableDragProp,
216
- modal = false,
217
- zIndex = parentSheet.zIndex + 1,
218
- moveOnKeyboardChange = false,
219
- portalProps
220
- } = props;
221
- const state = (0, import_useSheetOpenState.useSheetOpenState)(props);
222
- const providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state);
223
- const { positions, maxSnapPoint, screenSize } = (0, import_useSheetSnapPoints.useSheetSnapPoints)(providerProps);
224
- const { position, contentRef, setPosition, scrollBridge, frameSize, setFrameSize } = providerProps;
225
- const { open, isHidden, controller } = state;
226
- const { frameComponent, handleComponent, bottomCoverComponent, overlayComponent } = (0, import_useSheetChildren.useSheetChildren)(props.children);
227
- const sheetRef = (0, import_react.useRef)(null);
228
- const ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef);
229
- const driver = (0, import_core.useAnimationDriver)();
230
- if (!driver) {
231
- throw new Error("Must set animations in tamagui.config.ts");
232
- }
233
- const disableDrag = disableDragProp ?? (controller == null ? void 0 : controller.disableDrag);
234
- const keyboardIsVisible = (0, import_use_keyboard_visible.useKeyboardVisible)();
235
- const themeName = (0, import_core.useThemeName)();
236
- const { useAnimatedNumber, useAnimatedNumberReaction, useAnimatedNumberStyle } = driver;
237
- const animatedNumber = useAnimatedNumber(HIDDEN_SIZE);
238
- const at = (0, import_react.useRef)(0);
239
- useAnimatedNumberReaction(
240
- {
241
- value: animatedNumber,
242
- hostRef: sheetRef
243
- },
244
- (value) => {
245
- if (!driver.isReactNative)
246
- return;
247
- at.current = value;
248
- scrollBridge.paneY = value;
249
- }
250
- );
251
- function stopSpring() {
252
- animatedNumber.stop();
253
- if (scrollBridge.onFinishAnimate) {
254
- scrollBridge.onFinishAnimate();
255
- scrollBridge.onFinishAnimate = void 0;
256
- }
257
- }
258
- const [opacity, setOpacity] = (0, import_react.useState)(open ? 1 : 0);
259
- if (open && opacity === 0) {
260
- setOpacity(1);
261
- }
262
- (0, import_react.useEffect)(() => {
263
- if (!open) {
264
- const tm = setTimeout(() => {
265
- setOpacity(0);
266
- }, 400);
267
- return () => {
268
- clearTimeout(tm);
269
- };
270
- }
271
- }, [open]);
272
- const animateTo = (0, import_core.useEvent)((position2) => {
273
- const current = animatedNumber.getValue();
274
- if (isHidden && open)
275
- return;
276
- if (!current)
277
- return;
278
- if (frameSize === 0)
279
- return;
280
- const hiddenValue = frameSize === 0 ? HIDDEN_SIZE : screenSize;
281
- const toValue = isHidden || position2 === -1 ? hiddenValue : positions[position2];
282
- if (at.current === toValue)
283
- return;
284
- stopSpring();
285
- if (isHidden) {
286
- animatedNumber.setValue(toValue, {
287
- type: "timing",
288
- duration: 0
289
- });
290
- at.current = toValue;
291
- return;
292
- }
293
- const overshootClamping = at.current === HIDDEN_SIZE;
294
- animatedNumber.setValue(toValue, {
295
- ...animationConfig,
296
- type: "spring",
297
- overshootClamping
298
- });
299
- });
300
- (0, import_core.useIsomorphicLayoutEffect)(() => {
301
- animateTo(position);
302
- }, [isHidden, frameSize, position, animateTo]);
303
- const [isShowingInnerSheet, setIsShowingInnerSheet] = (0, import_react.useState)(false);
304
- const shouldHideParentSheet = !import_core.isWeb && modal && isShowingInnerSheet;
305
- const parentSheetContext = (0, import_react.useContext)(SheetInsideSheetContext);
306
- const onInnerSheet = (0, import_react.useCallback)((hasChild) => {
307
- setIsShowingInnerSheet(hasChild);
308
- }, []);
309
- const panResponder = (0, import_react.useMemo)(
310
- () => {
311
- if (disableDrag)
312
- return;
313
- if (!frameSize)
314
- return;
315
- if (isShowingInnerSheet)
316
- return;
317
- const minY = positions[0];
318
- scrollBridge.paneMinY = minY;
319
- let startY = at.current;
320
- function makeUnselectable(val) {
321
- if (!selectionStyleSheet)
322
- return;
323
- if (!val) {
324
- selectionStyleSheet.innerText = "";
325
- } else {
326
- selectionStyleSheet.innerText = ":root * { user-select: none !important; -webkit-user-select: none !important; }";
327
- }
328
- }
329
- const release = ({ vy, dragAt }) => {
330
- isExternalDrag = false;
331
- previouslyScrolling = false;
332
- makeUnselectable(false);
333
- const at2 = dragAt + startY;
334
- const end = at2 + frameSize * vy * 0.2;
335
- let closestPoint = 0;
336
- let dist = Infinity;
337
- for (let i = 0; i < positions.length; i++) {
338
- const position2 = positions[i];
339
- const curDist = end > position2 ? end - position2 : position2 - end;
340
- if (curDist < dist) {
341
- dist = curDist;
342
- closestPoint = i;
343
- }
344
- }
345
- setPosition(closestPoint);
346
- animateTo(closestPoint);
347
- };
348
- const finish = (_e, state2) => {
349
- release({
350
- vy: state2.vy,
351
- dragAt: state2.dy
352
- });
353
- };
354
- let previouslyScrolling = false;
355
- const onMoveShouldSet = (_e, { dy }) => {
356
- const isScrolled = scrollBridge.y !== 0;
357
- const isDraggingUp = dy < 0;
358
- const isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
359
- if (isScrolled) {
360
- previouslyScrolling = true;
361
- return false;
362
- }
363
- if (isNearTop) {
364
- if (!isScrolled && isDraggingUp) {
365
- return false;
366
- }
367
- }
368
- return Math.abs(dy) > 5;
369
- };
370
- const grant = () => {
371
- makeUnselectable(true);
372
- stopSpring();
373
- startY = at.current;
374
- };
375
- let isExternalDrag = false;
376
- scrollBridge.drag = (dy) => {
377
- if (!isExternalDrag) {
378
- isExternalDrag = true;
379
- grant();
380
- }
381
- const to = dy + startY;
382
- animatedNumber.setValue(resisted(to, minY), { type: "direct" });
383
- };
384
- scrollBridge.release = release;
385
- return import_react_native.PanResponder.create({
386
- onMoveShouldSetPanResponder: onMoveShouldSet,
387
- onPanResponderGrant: grant,
388
- onPanResponderMove: (_e, { dy }) => {
389
- const toFull = dy + startY;
390
- const to = resisted(toFull, minY);
391
- animatedNumber.setValue(to, { type: "direct" });
392
- },
393
- onPanResponderEnd: finish,
394
- onPanResponderTerminate: finish,
395
- onPanResponderRelease: finish
396
- });
397
- },
398
- // eslint-disable-next-line react-hooks/exhaustive-deps
399
- [disableDrag, isShowingInnerSheet, animateTo, frameSize, positions, setPosition]
400
- );
401
- const animatedStyle = useAnimatedNumberStyle(animatedNumber, (val) => {
402
- "worklet";
403
- const translateY = frameSize === 0 ? HIDDEN_SIZE : val;
404
- return {
405
- transform: [{ translateY }]
406
- };
407
- });
408
- const sizeBeforeKeyboard = (0, import_react.useRef)(null);
409
- (0, import_react.useEffect)(() => {
410
- if (import_core.isWeb || !moveOnKeyboardChange)
411
- return;
412
- const keyboardDidShowListener = import_react_native.Keyboard.addListener("keyboardDidShow", (e) => {
413
- if (sizeBeforeKeyboard.current !== null)
414
- return;
415
- sizeBeforeKeyboard.current = animatedNumber.getValue();
416
- animatedNumber.setValue(
417
- Math.max(animatedNumber.getValue() - e.endCoordinates.height, 0)
418
- );
419
- });
420
- const keyboardDidHideListener = import_react_native.Keyboard.addListener("keyboardDidHide", () => {
421
- if (sizeBeforeKeyboard.current === null)
422
- return;
423
- animatedNumber.setValue(sizeBeforeKeyboard.current);
424
- sizeBeforeKeyboard.current = null;
425
- });
426
- return () => {
427
- keyboardDidHideListener.remove();
428
- keyboardDidShowListener.remove();
429
- };
430
- }, []);
431
- const AnimatedView = driver["NumberView"] ?? driver.View;
432
- (0, import_core.useIsomorphicLayoutEffect)(() => {
433
- if (!(parentSheetContext && open))
434
- return;
435
- parentSheetContext(true);
436
- return () => {
437
- parentSheetContext(false);
438
- };
439
- }, [parentSheetContext, open]);
440
- const nextParentContext = (0, import_react.useMemo)(
441
- () => ({
442
- zIndex
443
- }),
444
- [zIndex]
445
- );
446
- const handleLayout = (0, import_react.useCallback)(
447
- (e) => {
448
- var _a;
449
- let next = (_a = e.nativeEvent) == null ? void 0 : _a.layout.height;
450
- if (import_core.isWeb && import_core.isTouchable && !open) {
451
- next += 100;
452
- }
453
- if (!next)
454
- return;
455
- setFrameSize(() => next);
456
- },
457
- [keyboardIsVisible]
458
- );
459
- const removeScrollEnabled = forceRemoveScrollEnabled ?? (open && modal);
460
- const contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ParentSheetContext.Provider, { value: nextParentContext, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_SheetContext.SheetProvider, { ...providerProps, children: [
461
- shouldHideParentSheet ? null : overlayComponent,
462
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
463
- AnimatedView,
464
- {
465
- ref,
466
- ...panResponder == null ? void 0 : panResponder.panHandlers,
467
- onLayout: handleLayout,
468
- pointerEvents: open && !shouldHideParentSheet ? "auto" : "none",
469
- animation: props.animation,
470
- style: [
471
- {
472
- position: "absolute",
473
- zIndex,
474
- width: "100%",
475
- height: `${maxSnapPoint}%`,
476
- opacity
477
- },
478
- animatedStyle
479
- ],
480
- children: [
481
- handleComponent,
482
- bottomCoverComponent,
483
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
484
- import_remove_scroll.RemoveScroll,
485
- {
486
- forwardProps: true,
487
- enabled: removeScrollEnabled,
488
- allowPinchZoom: true,
489
- shards: [contentRef],
490
- removeScrollBar: false,
491
- children: frameComponent
492
- }
493
- )
494
- ]
495
- }
496
- )
497
- ] }) });
498
- const adaptContext = (0, import_react.useContext)(import_adapt.AdaptParentContext);
499
- if (modal) {
500
- const modalContents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.Portal, { zIndex, ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, { forceClassName: true, name: themeName, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParentContext.Provider, { value: adaptContext, children: contents }) }) });
501
- if (import_core.isWeb) {
502
- return modalContents;
503
- }
504
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetInsideSheetContext.Provider, { value: onInnerSheet, children: modalContents });
505
- }
506
- return contents;
507
- })
508
- );
509
- const SheetInsideSheetContext = (0, import_react.createContext)(null);
510
- const ControlledSheet = Sheet;
511
- function resisted(y, minY, maxOverflow = 25) {
512
- if (y < minY) {
513
- const past = minY - y;
514
- const pctPast = Math.min(maxOverflow, past) / maxOverflow;
515
- const diminishBy = 1.1 - Math.pow(0.1, pctPast);
516
- const extra = -diminishBy * maxOverflow;
517
- return minY + extra;
518
- }
519
- return y;
520
- }
118
+ const SheetOverlayFrame = Overlay;
119
+ const SheetHandleFrame = Handle;
521
120
  // Annotate the CommonJS export names for ESM import in node:
522
121
  0 && (module.exports = {
523
- ControlledSheet,
122
+ Frame,
123
+ Handle,
124
+ Overlay,
524
125
  Sheet,
525
- SheetFrame,
526
- SheetFrameFrame,
527
- SheetHandle,
528
126
  SheetHandleFrame,
529
- SheetOverlay,
530
127
  SheetOverlayFrame,
531
128
  createSheetScope,
532
129
  ...require("./types")
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Sheet.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsGM;AAtGN,mBAAmC;AACnC,0BAAgC;AAChC,kBAeO;AACP,oBAAuB;AACvB,2BAA6B;AAC7B,oBAAyE;AACzE,kCAAmC;AACnC,mBAWO;AACP,0BAQO;AAEP,uBAA8C;AAC9C,yBAA+B;AAC/B,0BAA+C;AAC/C,6BAAgC;AAEhC,8BAAiC;AACjC,gCAAmC;AACnC,+BAAkC;AAClC,mCAAsC;AACtC,gCAAmC;AAEnC,IAAAA,uBAAiC;AACjC,0BAAc,oBAxDd;AA8DO,MAAM,uBAAmB,oBAAO,sBAAQ;AAAA,EAC7C,MAAM;AAAA,EAEN,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,QACJ,eAAe;AAAA,MACjB;AAAA,MACA,OAAO;AAAA,QACL,SAAS;AAAA,QACT,eAAe;AAAA,MACjB;AAAA,IACF;AAAA,IAEA,UAAU;AAAA,MACR,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,cAAc;AAAA,QACd,iBAAiB;AAAA,QACjB,QAAQ;AAAA,QACR,kBAAkB;AAAA,QAClB,cAA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;",
5
- "names": ["import_SheetContext", "Sheet", "SheetImplementationCustom", "position", "at", "state"]
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuB;AACvB,oBAA+C;AAE/C,uBAAkE;AAClE,yBAA4B;AAE5B,0BAAiC;AACjC,0BAAc,oBAPd;AAaO,MAAM,aAAS,oBAAO,sBAAQ;AAAA,EACnC,MAAM;AAAA,EAEN,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,QACJ,eAAe;AAAA,MACjB;AAAA,MACA,OAAO;AAAA,QACL,SAAS;AAAA,QACT,eAAe;AAAA,MACjB;AAAA,IACF;AAAA,IAEA,UAAU;AAAA,MACR,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,cAAc;AAAA,QACd,iBAAiB;AAAA,QACjB,QAAQ;AAAA,QACR,kBAAkB;AAAA,QAClB,cAAc;AAAA,QACd,SAAS;AAAA,QAET,YAAY;AAAA,UACV,SAAS;AAAA,QACX;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,UAAU;AAAA,EACZ;AACF,CAAC;AAMM,MAAM,cAAU,oBAAO,8BAAgB;AAAA,EAC5C,MAAM;AAAA,EAEN,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,eAAe;AAAA,MACjB;AAAA,MACA,OAAO;AAAA,QACL,SAAS;AAAA,QACT,eAAe;AAAA,MACjB;AAAA,IACF;AAAA,IAEA,UAAU;AAAA,MACR,OAAO;AAAA,QACL,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,cAAc;AAAA,QACd,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,UAAU;AAAA,EACZ;AACF,CAAC;AAMM,MAAM,YAAQ,oBAAO,sBAAQ;AAAA,EAClC,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