@hanzogui/sheet 3.0.2 → 7.0.0

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 (303) hide show
  1. package/controller/index.cjs +1 -1
  2. package/controller/index.native.cjs +1 -1
  3. package/next.md +2 -2
  4. package/package.json +24 -24
  5. package/setup-gesture-handler/index.cjs +1 -1
  6. package/setup-gesture-handler/index.native.cjs +1 -1
  7. package/src/Sheet.tsx +3 -3
  8. package/src/SheetController.tsx +4 -1
  9. package/src/SheetImplementationCustom.tsx +24 -13
  10. package/src/createSheet.tsx +9 -9
  11. package/src/setupGestureHandler.ts +2 -2
  12. package/src/useSheetController.tsx +4 -0
  13. package/src/useSheetProviderProps.tsx +4 -4
  14. package/types/Sheet.d.ts +51 -51
  15. package/types/SheetContext.d.ts +8 -8
  16. package/types/SheetController.d.ts +1 -1
  17. package/types/SheetImplementationCustom.d.ts +4 -4
  18. package/types/SheetScrollView.d.ts +10 -10
  19. package/types/createSheet.d.ts +39 -39
  20. package/types/gestureState.d.ts +3 -3
  21. package/types/setupGestureHandler.d.ts +1 -1
  22. package/types/types.d.ts +4 -4
  23. package/types/useSheetController.d.ts +3 -0
  24. package/types/useSheetProviderProps.d.ts +4 -4
  25. package/dist/cjs/GestureDetectorWrapper.cjs +0 -48
  26. package/dist/cjs/GestureDetectorWrapper.native.js +0 -53
  27. package/dist/cjs/GestureDetectorWrapper.native.js.map +0 -1
  28. package/dist/cjs/GestureSheetContext.cjs +0 -52
  29. package/dist/cjs/GestureSheetContext.native.js +0 -56
  30. package/dist/cjs/GestureSheetContext.native.js.map +0 -1
  31. package/dist/cjs/Sheet.cjs +0 -117
  32. package/dist/cjs/Sheet.native.js +0 -120
  33. package/dist/cjs/Sheet.native.js.map +0 -1
  34. package/dist/cjs/SheetContext.cjs +0 -32
  35. package/dist/cjs/SheetContext.native.js +0 -35
  36. package/dist/cjs/SheetContext.native.js.map +0 -1
  37. package/dist/cjs/SheetController.cjs +0 -65
  38. package/dist/cjs/SheetController.native.js +0 -71
  39. package/dist/cjs/SheetController.native.js.map +0 -1
  40. package/dist/cjs/SheetImplementationCustom.cjs +0 -472
  41. package/dist/cjs/SheetImplementationCustom.native.js +0 -524
  42. package/dist/cjs/SheetImplementationCustom.native.js.map +0 -1
  43. package/dist/cjs/SheetScrollView.cjs +0 -180
  44. package/dist/cjs/SheetScrollView.native.js +0 -197
  45. package/dist/cjs/SheetScrollView.native.js.map +0 -1
  46. package/dist/cjs/constants.cjs +0 -32
  47. package/dist/cjs/constants.native.js +0 -35
  48. package/dist/cjs/constants.native.js.map +0 -1
  49. package/dist/cjs/contexts.cjs +0 -42
  50. package/dist/cjs/contexts.native.js +0 -45
  51. package/dist/cjs/contexts.native.js.map +0 -1
  52. package/dist/cjs/controller.cjs +0 -29
  53. package/dist/cjs/controller.native.js +0 -32
  54. package/dist/cjs/controller.native.js.map +0 -1
  55. package/dist/cjs/createSheet.cjs +0 -191
  56. package/dist/cjs/createSheet.native.js +0 -208
  57. package/dist/cjs/createSheet.native.js.map +0 -1
  58. package/dist/cjs/gestureState.cjs +0 -39
  59. package/dist/cjs/gestureState.native.js +0 -42
  60. package/dist/cjs/gestureState.native.js.map +0 -1
  61. package/dist/cjs/helpers.cjs +0 -31
  62. package/dist/cjs/helpers.native.js +0 -35
  63. package/dist/cjs/helpers.native.js.map +0 -1
  64. package/dist/cjs/index.cjs +0 -28
  65. package/dist/cjs/index.native.js +0 -31
  66. package/dist/cjs/index.native.js.map +0 -1
  67. package/dist/cjs/nativeSheet.cjs +0 -87
  68. package/dist/cjs/nativeSheet.native.js +0 -101
  69. package/dist/cjs/nativeSheet.native.js.map +0 -1
  70. package/dist/cjs/setupGestureHandler.cjs +0 -46
  71. package/dist/cjs/setupGestureHandler.native.js +0 -50
  72. package/dist/cjs/setupGestureHandler.native.js.map +0 -1
  73. package/dist/cjs/types.cjs +0 -16
  74. package/dist/cjs/types.native.js +0 -19
  75. package/dist/cjs/types.native.js.map +0 -1
  76. package/dist/cjs/useGestureHandlerPan.cjs +0 -136
  77. package/dist/cjs/useGestureHandlerPan.native.js +0 -145
  78. package/dist/cjs/useGestureHandlerPan.native.js.map +0 -1
  79. package/dist/cjs/useKeyboardControllerSheet.cjs +0 -38
  80. package/dist/cjs/useKeyboardControllerSheet.native.js +0 -114
  81. package/dist/cjs/useKeyboardControllerSheet.native.js.map +0 -1
  82. package/dist/cjs/useSheet.cjs +0 -27
  83. package/dist/cjs/useSheet.native.js +0 -32
  84. package/dist/cjs/useSheet.native.js.map +0 -1
  85. package/dist/cjs/useSheetController.cjs +0 -50
  86. package/dist/cjs/useSheetController.native.js +0 -53
  87. package/dist/cjs/useSheetController.native.js.map +0 -1
  88. package/dist/cjs/useSheetOffscreenSize.cjs +0 -51
  89. package/dist/cjs/useSheetOffscreenSize.native.js +0 -61
  90. package/dist/cjs/useSheetOffscreenSize.native.js.map +0 -1
  91. package/dist/cjs/useSheetOpenState.cjs +0 -49
  92. package/dist/cjs/useSheetOpenState.native.js +0 -56
  93. package/dist/cjs/useSheetOpenState.native.js.map +0 -1
  94. package/dist/cjs/useSheetProviderProps.cjs +0 -133
  95. package/dist/cjs/useSheetProviderProps.native.js +0 -153
  96. package/dist/cjs/useSheetProviderProps.native.js.map +0 -1
  97. package/dist/cjs/useSheetScrollViewGestures.cjs +0 -123
  98. package/dist/cjs/useSheetScrollViewGestures.native.js +0 -110
  99. package/dist/cjs/useSheetScrollViewGestures.native.js.map +0 -1
  100. package/dist/esm/GestureDetectorWrapper.mjs +0 -25
  101. package/dist/esm/GestureDetectorWrapper.mjs.map +0 -1
  102. package/dist/esm/GestureDetectorWrapper.native.js +0 -27
  103. package/dist/esm/GestureDetectorWrapper.native.js.map +0 -1
  104. package/dist/esm/GestureSheetContext.mjs +0 -28
  105. package/dist/esm/GestureSheetContext.mjs.map +0 -1
  106. package/dist/esm/GestureSheetContext.native.js +0 -29
  107. package/dist/esm/GestureSheetContext.native.js.map +0 -1
  108. package/dist/esm/Sheet.mjs +0 -89
  109. package/dist/esm/Sheet.mjs.map +0 -1
  110. package/dist/esm/Sheet.native.js +0 -89
  111. package/dist/esm/Sheet.native.js.map +0 -1
  112. package/dist/esm/SheetContext.mjs +0 -6
  113. package/dist/esm/SheetContext.mjs.map +0 -1
  114. package/dist/esm/SheetContext.native.js +0 -6
  115. package/dist/esm/SheetContext.native.js.map +0 -1
  116. package/dist/esm/SheetController.mjs +0 -31
  117. package/dist/esm/SheetController.mjs.map +0 -1
  118. package/dist/esm/SheetController.native.js +0 -34
  119. package/dist/esm/SheetController.native.js.map +0 -1
  120. package/dist/esm/SheetImplementationCustom.mjs +0 -437
  121. package/dist/esm/SheetImplementationCustom.mjs.map +0 -1
  122. package/dist/esm/SheetImplementationCustom.native.js +0 -487
  123. package/dist/esm/SheetImplementationCustom.native.js.map +0 -1
  124. package/dist/esm/SheetScrollView.mjs +0 -146
  125. package/dist/esm/SheetScrollView.mjs.map +0 -1
  126. package/dist/esm/SheetScrollView.native.js +0 -160
  127. package/dist/esm/SheetScrollView.native.js.map +0 -1
  128. package/dist/esm/constants.mjs +0 -6
  129. package/dist/esm/constants.mjs.map +0 -1
  130. package/dist/esm/constants.native.js +0 -6
  131. package/dist/esm/constants.native.js.map +0 -1
  132. package/dist/esm/contexts.mjs +0 -7
  133. package/dist/esm/contexts.mjs.map +0 -1
  134. package/dist/esm/contexts.native.js +0 -7
  135. package/dist/esm/contexts.native.js.map +0 -1
  136. package/dist/esm/controller.mjs +0 -4
  137. package/dist/esm/controller.mjs.map +0 -1
  138. package/dist/esm/controller.native.js +0 -4
  139. package/dist/esm/controller.native.js.map +0 -1
  140. package/dist/esm/createSheet.mjs +0 -168
  141. package/dist/esm/createSheet.mjs.map +0 -1
  142. package/dist/esm/createSheet.native.js +0 -182
  143. package/dist/esm/createSheet.native.js.map +0 -1
  144. package/dist/esm/gestureState.mjs +0 -13
  145. package/dist/esm/gestureState.mjs.map +0 -1
  146. package/dist/esm/gestureState.native.js +0 -13
  147. package/dist/esm/gestureState.native.js.map +0 -1
  148. package/dist/esm/helpers.mjs +0 -8
  149. package/dist/esm/helpers.mjs.map +0 -1
  150. package/dist/esm/helpers.native.js +0 -9
  151. package/dist/esm/helpers.native.js.map +0 -1
  152. package/dist/esm/index.js +0 -12
  153. package/dist/esm/index.js.map +0 -1
  154. package/dist/esm/index.mjs +0 -12
  155. package/dist/esm/index.mjs.map +0 -1
  156. package/dist/esm/index.native.js +0 -12
  157. package/dist/esm/index.native.js.map +0 -1
  158. package/dist/esm/nativeSheet.mjs +0 -63
  159. package/dist/esm/nativeSheet.mjs.map +0 -1
  160. package/dist/esm/nativeSheet.native.js +0 -74
  161. package/dist/esm/nativeSheet.native.js.map +0 -1
  162. package/dist/esm/setupGestureHandler.mjs +0 -22
  163. package/dist/esm/setupGestureHandler.mjs.map +0 -1
  164. package/dist/esm/setupGestureHandler.native.js +0 -23
  165. package/dist/esm/setupGestureHandler.native.js.map +0 -1
  166. package/dist/esm/types.mjs +0 -2
  167. package/dist/esm/types.mjs.map +0 -1
  168. package/dist/esm/types.native.js +0 -2
  169. package/dist/esm/types.native.js.map +0 -1
  170. package/dist/esm/useGestureHandlerPan.mjs +0 -113
  171. package/dist/esm/useGestureHandlerPan.mjs.map +0 -1
  172. package/dist/esm/useGestureHandlerPan.native.js +0 -119
  173. package/dist/esm/useGestureHandlerPan.native.js.map +0 -1
  174. package/dist/esm/useKeyboardControllerSheet.mjs +0 -15
  175. package/dist/esm/useKeyboardControllerSheet.mjs.map +0 -1
  176. package/dist/esm/useKeyboardControllerSheet.native.js +0 -88
  177. package/dist/esm/useKeyboardControllerSheet.native.js.map +0 -1
  178. package/dist/esm/useSheet.mjs +0 -4
  179. package/dist/esm/useSheet.mjs.map +0 -1
  180. package/dist/esm/useSheet.native.js +0 -6
  181. package/dist/esm/useSheet.native.js.map +0 -1
  182. package/dist/esm/useSheetController.mjs +0 -15
  183. package/dist/esm/useSheetController.mjs.map +0 -1
  184. package/dist/esm/useSheetController.native.js +0 -15
  185. package/dist/esm/useSheetController.native.js.map +0 -1
  186. package/dist/esm/useSheetOffscreenSize.mjs +0 -28
  187. package/dist/esm/useSheetOffscreenSize.mjs.map +0 -1
  188. package/dist/esm/useSheetOffscreenSize.native.js +0 -35
  189. package/dist/esm/useSheetOffscreenSize.native.js.map +0 -1
  190. package/dist/esm/useSheetOpenState.mjs +0 -26
  191. package/dist/esm/useSheetOpenState.mjs.map +0 -1
  192. package/dist/esm/useSheetOpenState.native.js +0 -30
  193. package/dist/esm/useSheetOpenState.native.js.map +0 -1
  194. package/dist/esm/useSheetProviderProps.mjs +0 -99
  195. package/dist/esm/useSheetProviderProps.mjs.map +0 -1
  196. package/dist/esm/useSheetProviderProps.native.js +0 -116
  197. package/dist/esm/useSheetProviderProps.native.js.map +0 -1
  198. package/dist/esm/useSheetScrollViewGestures.mjs +0 -100
  199. package/dist/esm/useSheetScrollViewGestures.mjs.map +0 -1
  200. package/dist/esm/useSheetScrollViewGestures.native.js +0 -84
  201. package/dist/esm/useSheetScrollViewGestures.native.js.map +0 -1
  202. package/dist/jsx/GestureDetectorWrapper.mjs +0 -25
  203. package/dist/jsx/GestureDetectorWrapper.mjs.map +0 -1
  204. package/dist/jsx/GestureDetectorWrapper.native.js +0 -53
  205. package/dist/jsx/GestureDetectorWrapper.native.js.map +0 -1
  206. package/dist/jsx/GestureSheetContext.mjs +0 -28
  207. package/dist/jsx/GestureSheetContext.mjs.map +0 -1
  208. package/dist/jsx/GestureSheetContext.native.js +0 -56
  209. package/dist/jsx/GestureSheetContext.native.js.map +0 -1
  210. package/dist/jsx/Sheet.mjs +0 -89
  211. package/dist/jsx/Sheet.mjs.map +0 -1
  212. package/dist/jsx/Sheet.native.js +0 -120
  213. package/dist/jsx/Sheet.native.js.map +0 -1
  214. package/dist/jsx/SheetContext.mjs +0 -6
  215. package/dist/jsx/SheetContext.mjs.map +0 -1
  216. package/dist/jsx/SheetContext.native.js +0 -35
  217. package/dist/jsx/SheetContext.native.js.map +0 -1
  218. package/dist/jsx/SheetController.mjs +0 -31
  219. package/dist/jsx/SheetController.mjs.map +0 -1
  220. package/dist/jsx/SheetController.native.js +0 -71
  221. package/dist/jsx/SheetController.native.js.map +0 -1
  222. package/dist/jsx/SheetImplementationCustom.mjs +0 -437
  223. package/dist/jsx/SheetImplementationCustom.mjs.map +0 -1
  224. package/dist/jsx/SheetImplementationCustom.native.js +0 -524
  225. package/dist/jsx/SheetImplementationCustom.native.js.map +0 -1
  226. package/dist/jsx/SheetScrollView.mjs +0 -146
  227. package/dist/jsx/SheetScrollView.mjs.map +0 -1
  228. package/dist/jsx/SheetScrollView.native.js +0 -197
  229. package/dist/jsx/SheetScrollView.native.js.map +0 -1
  230. package/dist/jsx/constants.mjs +0 -6
  231. package/dist/jsx/constants.mjs.map +0 -1
  232. package/dist/jsx/constants.native.js +0 -35
  233. package/dist/jsx/constants.native.js.map +0 -1
  234. package/dist/jsx/contexts.mjs +0 -7
  235. package/dist/jsx/contexts.mjs.map +0 -1
  236. package/dist/jsx/contexts.native.js +0 -45
  237. package/dist/jsx/contexts.native.js.map +0 -1
  238. package/dist/jsx/controller.mjs +0 -4
  239. package/dist/jsx/controller.mjs.map +0 -1
  240. package/dist/jsx/controller.native.js +0 -32
  241. package/dist/jsx/controller.native.js.map +0 -1
  242. package/dist/jsx/createSheet.mjs +0 -168
  243. package/dist/jsx/createSheet.mjs.map +0 -1
  244. package/dist/jsx/createSheet.native.js +0 -208
  245. package/dist/jsx/createSheet.native.js.map +0 -1
  246. package/dist/jsx/gestureState.mjs +0 -13
  247. package/dist/jsx/gestureState.mjs.map +0 -1
  248. package/dist/jsx/gestureState.native.js +0 -42
  249. package/dist/jsx/gestureState.native.js.map +0 -1
  250. package/dist/jsx/helpers.mjs +0 -8
  251. package/dist/jsx/helpers.mjs.map +0 -1
  252. package/dist/jsx/helpers.native.js +0 -35
  253. package/dist/jsx/helpers.native.js.map +0 -1
  254. package/dist/jsx/index.js +0 -12
  255. package/dist/jsx/index.js.map +0 -1
  256. package/dist/jsx/index.mjs +0 -12
  257. package/dist/jsx/index.mjs.map +0 -1
  258. package/dist/jsx/index.native.js +0 -31
  259. package/dist/jsx/index.native.js.map +0 -1
  260. package/dist/jsx/nativeSheet.mjs +0 -63
  261. package/dist/jsx/nativeSheet.mjs.map +0 -1
  262. package/dist/jsx/nativeSheet.native.js +0 -101
  263. package/dist/jsx/nativeSheet.native.js.map +0 -1
  264. package/dist/jsx/setupGestureHandler.mjs +0 -22
  265. package/dist/jsx/setupGestureHandler.mjs.map +0 -1
  266. package/dist/jsx/setupGestureHandler.native.js +0 -50
  267. package/dist/jsx/setupGestureHandler.native.js.map +0 -1
  268. package/dist/jsx/types.mjs +0 -2
  269. package/dist/jsx/types.mjs.map +0 -1
  270. package/dist/jsx/types.native.js +0 -19
  271. package/dist/jsx/types.native.js.map +0 -1
  272. package/dist/jsx/useGestureHandlerPan.mjs +0 -113
  273. package/dist/jsx/useGestureHandlerPan.mjs.map +0 -1
  274. package/dist/jsx/useGestureHandlerPan.native.js +0 -145
  275. package/dist/jsx/useGestureHandlerPan.native.js.map +0 -1
  276. package/dist/jsx/useKeyboardControllerSheet.mjs +0 -15
  277. package/dist/jsx/useKeyboardControllerSheet.mjs.map +0 -1
  278. package/dist/jsx/useKeyboardControllerSheet.native.js +0 -114
  279. package/dist/jsx/useKeyboardControllerSheet.native.js.map +0 -1
  280. package/dist/jsx/useSheet.mjs +0 -4
  281. package/dist/jsx/useSheet.mjs.map +0 -1
  282. package/dist/jsx/useSheet.native.js +0 -32
  283. package/dist/jsx/useSheet.native.js.map +0 -1
  284. package/dist/jsx/useSheetController.mjs +0 -15
  285. package/dist/jsx/useSheetController.mjs.map +0 -1
  286. package/dist/jsx/useSheetController.native.js +0 -53
  287. package/dist/jsx/useSheetController.native.js.map +0 -1
  288. package/dist/jsx/useSheetOffscreenSize.mjs +0 -28
  289. package/dist/jsx/useSheetOffscreenSize.mjs.map +0 -1
  290. package/dist/jsx/useSheetOffscreenSize.native.js +0 -61
  291. package/dist/jsx/useSheetOffscreenSize.native.js.map +0 -1
  292. package/dist/jsx/useSheetOpenState.mjs +0 -26
  293. package/dist/jsx/useSheetOpenState.mjs.map +0 -1
  294. package/dist/jsx/useSheetOpenState.native.js +0 -56
  295. package/dist/jsx/useSheetOpenState.native.js.map +0 -1
  296. package/dist/jsx/useSheetProviderProps.mjs +0 -99
  297. package/dist/jsx/useSheetProviderProps.mjs.map +0 -1
  298. package/dist/jsx/useSheetProviderProps.native.js +0 -153
  299. package/dist/jsx/useSheetProviderProps.native.js.map +0 -1
  300. package/dist/jsx/useSheetScrollViewGestures.mjs +0 -100
  301. package/dist/jsx/useSheetScrollViewGestures.mjs.map +0 -1
  302. package/dist/jsx/useSheetScrollViewGestures.native.js +0 -110
  303. package/dist/jsx/useSheetScrollViewGestures.native.js.map +0 -1
@@ -1,191 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
- get: () => from[key],
14
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
- });
16
- return to;
17
- };
18
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
20
- }), mod);
21
- var createSheet_exports = {};
22
- __export(createSheet_exports, {
23
- createSheet: () => createSheet
24
- });
25
- module.exports = __toCommonJS(createSheet_exports);
26
- var import_gui_compose_refs = require("@hanzogui/compose-refs"),
27
- import_gui_constants = require("@hanzogui/constants"),
28
- import_gui_core = require("@hanzogui/core"),
29
- import_gui_helpers = require("@hanzogui/helpers"),
30
- import_gui_portal = require("@hanzogui/portal"),
31
- import_gui_remove_scroll = require("@hanzogui/remove-scroll"),
32
- import_gui_use_did_finish_ssr = require("@hanzogui/use-did-finish-ssr"),
33
- import_gui_z_index_stack = require("@hanzogui/z-index-stack"),
34
- import_react = require("react"),
35
- import_react_native = require("react-native-web"),
36
- import_constants = require("./constants.cjs"),
37
- import_nativeSheet = require("./nativeSheet.cjs"),
38
- import_SheetContext = require("./SheetContext.cjs"),
39
- import_SheetImplementationCustom = require("./SheetImplementationCustom.cjs"),
40
- import_SheetScrollView = require("./SheetScrollView.cjs"),
41
- import_useSheetController = require("./useSheetController.cjs"),
42
- import_useSheetOffscreenSize = require("./useSheetOffscreenSize.cjs"),
43
- import_jsx_runtime =
44
- // @ts-ignore
45
- require("react/jsx-runtime");
46
- function createSheet({
47
- Handle,
48
- Frame,
49
- Overlay
50
- }) {
51
- const SheetHandle = Handle.styleable(({
52
- __scopeSheet,
53
- ...props
54
- }, forwardedRef) => {
55
- const context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_HANDLE_NAME, __scopeSheet),
56
- composedRef = (0, import_gui_compose_refs.useComposedRefs)(context.handleRef, forwardedRef),
57
- wasDraggingRef = (0, import_react.useRef)(!1);
58
- return (0, import_react.useEffect)(() => {
59
- if (context.scrollBridge) return context.scrollBridge.onParentDragging(isDragging => {
60
- isDragging && (wasDraggingRef.current = !0);
61
- });
62
- }, [context.scrollBridge]), context.onlyShowFrame ? null : /* @__PURE__ */(0, import_jsx_runtime.jsx)(Handle, {
63
- ref: composedRef,
64
- onPressIn: () => {
65
- wasDraggingRef.current = !1;
66
- },
67
- onPress: () => {
68
- if (wasDraggingRef.current) {
69
- wasDraggingRef.current = !1;
70
- return;
71
- }
72
- const max = context.snapPoints.length + (context.dismissOnSnapToBottom ? -1 : 0),
73
- nextPos = (context.position + 1) % max;
74
- context.setPosition(nextPos);
75
- },
76
- open: context.open,
77
- ...props
78
- });
79
- }),
80
- SheetOverlay = Overlay.styleable((propsIn, ref) => {
81
- const {
82
- __scopeSheet,
83
- ...props
84
- } = propsIn,
85
- context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_OVERLAY_NAME, __scopeSheet),
86
- element = (0, import_react.useMemo)(() =>
87
- // @ts-ignore
88
- /* @__PURE__ */
89
- (0, import_jsx_runtime.jsx)(Overlay, {
90
- ...props,
91
- onPress: (0, import_gui_helpers.composeEventHandlers)(props.onPress, context.dismissOnOverlayPress ? () => {
92
- context.setOpen(!1);
93
- } : void 0)
94
- }), [props.onPress, props.opacity, context.dismissOnOverlayPress]);
95
- return (0, import_gui_constants.useIsomorphicLayoutEffect)(() => {
96
- context.onOverlayComponent?.(element);
97
- }, [element]), context.onlyShowFrame, null;
98
- }),
99
- SheetFrame = Frame.styleable(({
100
- __scopeSheet,
101
- adjustPaddingForOffscreenContent,
102
- disableHideBottomOverflow,
103
- children,
104
- ...props
105
- }, forwardedRef) => {
106
- const context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_NAME, __scopeSheet),
107
- {
108
- hasFit,
109
- disableRemoveScroll,
110
- frameSize,
111
- contentRef,
112
- open
113
- } = context,
114
- composedContentRef = (0, import_gui_compose_refs.useComposedRefs)(forwardedRef, contentRef),
115
- offscreenSize = (0, import_useSheetOffscreenSize.useSheetOffscreenSize)(context),
116
- stableFrameSize = (0, import_react.useRef)(frameSize);
117
- (0, import_react.useEffect)(() => {
118
- open && frameSize && (stableFrameSize.current = frameSize);
119
- }, [open, frameSize]);
120
- const sheetContents = (0, import_react.useMemo)(() => {
121
- const shouldUseFixedHeight = hasFit && !open && stableFrameSize.current;
122
- return (
123
- // @ts-expect-error
124
- /* @__PURE__ */
125
- (0, import_jsx_runtime.jsxs)(Frame, {
126
- ref: composedContentRef,
127
- flex: hasFit && open ? 0 : 1,
128
- flexBasis: hasFit ? "auto" : void 0,
129
- height: shouldUseFixedHeight ? stableFrameSize.current : hasFit ? void 0 : frameSize,
130
- pointerEvents: open ? "auto" : "none",
131
- "data-state": open ? "open" : "closed",
132
- ...props,
133
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_z_index_stack.StackZIndexContext, {
134
- zIndex: (0, import_gui_portal.resolveViewZIndex)(props.zIndex),
135
- children
136
- }), adjustPaddingForOffscreenContent && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_core.View, {
137
- "data-sheet-offscreen-pad": !0,
138
- height: offscreenSize,
139
- width: "100%"
140
- })]
141
- })
142
- );
143
- }, [open, props, frameSize, offscreenSize, adjustPaddingForOffscreenContent, hasFit]);
144
- return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
145
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_remove_scroll.RemoveScroll, {
146
- enabled: !disableRemoveScroll && context.open,
147
- children: sheetContents
148
- }), !disableHideBottomOverflow &&
149
- // @ts-ignore
150
- /* @__PURE__ */
151
- (0, import_jsx_runtime.jsx)(Frame, {
152
- ...props,
153
- componentName: "SheetCover",
154
- children: null,
155
- testID: void 0,
156
- id: void 0,
157
- position: "absolute",
158
- bottom: "-100%",
159
- zIndex: -1,
160
- height: context.frameSize,
161
- left: 0,
162
- right: 0,
163
- borderWidth: 0,
164
- borderRadius: 0,
165
- shadowOpacity: 0
166
- })]
167
- });
168
- }),
169
- Sheet = (0, import_react.forwardRef)(function (props, ref) {
170
- const hydrated = (0, import_gui_use_did_finish_ssr.useDidFinishSSR)(),
171
- {
172
- isShowingNonSheet
173
- } = (0, import_useSheetController.useSheetController)();
174
- let SheetImplementation = import_SheetImplementationCustom.SheetImplementationCustom;
175
- return props.native && import_react_native.Platform.OS, isShowingNonSheet || !hydrated ? null : /* @__PURE__ */(0, import_jsx_runtime.jsx)(SheetImplementation, {
176
- ref,
177
- ...props
178
- });
179
- }),
180
- components = {
181
- Frame: SheetFrame,
182
- Overlay: SheetOverlay,
183
- Handle: SheetHandle,
184
- ScrollView: import_SheetScrollView.SheetScrollView
185
- },
186
- Controlled = (0, import_gui_helpers.withStaticProperties)(Sheet, components);
187
- return (0, import_gui_helpers.withStaticProperties)(Sheet, {
188
- ...components,
189
- Controlled
190
- });
191
- }
@@ -1,208 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
- get: () => from[key],
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
22
- }), mod);
23
- var createSheet_exports = {};
24
- __export(createSheet_exports, {
25
- createSheet: () => createSheet
26
- });
27
- module.exports = __toCommonJS(createSheet_exports);
28
- var import_jsx_runtime = require("react/jsx-runtime"),
29
- import_gui_compose_refs = require("@hanzogui/compose-refs"),
30
- import_gui_constants = require("@hanzogui/constants"),
31
- import_gui_core = require("@hanzogui/core"),
32
- import_gui_helpers = require("@hanzogui/helpers"),
33
- import_gui_portal = require("@hanzogui/portal"),
34
- import_gui_remove_scroll = require("@hanzogui/remove-scroll"),
35
- import_gui_use_did_finish_ssr = require("@hanzogui/use-did-finish-ssr"),
36
- import_gui_z_index_stack = require("@hanzogui/z-index-stack"),
37
- import_react = require("react"),
38
- import_react_native = require("react-native"),
39
- import_constants = require("./constants.native.js"),
40
- import_nativeSheet = require("./nativeSheet.native.js"),
41
- import_SheetContext = require("./SheetContext.native.js"),
42
- import_SheetImplementationCustom = require("./SheetImplementationCustom.native.js"),
43
- import_SheetScrollView = require("./SheetScrollView.native.js"),
44
- import_useSheetController = require("./useSheetController.native.js"),
45
- import_useSheetOffscreenSize = require("./useSheetOffscreenSize.native.js");
46
- function createSheet(param) {
47
- var {
48
- Handle,
49
- Frame,
50
- Overlay
51
- } = param,
52
- SheetHandle = Handle.styleable(function (param2, forwardedRef) {
53
- var {
54
- __scopeSheet,
55
- ...props
56
- } = param2,
57
- context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_HANDLE_NAME, __scopeSheet),
58
- composedRef = (0, import_gui_compose_refs.useComposedRefs)(context.handleRef, forwardedRef),
59
- wasDraggingRef = (0, import_react.useRef)(!1);
60
- return (0, import_react.useEffect)(function () {
61
- if (context.scrollBridge) return context.scrollBridge.onParentDragging(function (isDragging) {
62
- isDragging && (wasDraggingRef.current = !0);
63
- });
64
- }, [context.scrollBridge]), context.onlyShowFrame ? null :
65
- // @ts-ignore
66
- /* @__PURE__ */
67
- (0, import_jsx_runtime.jsx)(Handle, {
68
- ref: composedRef,
69
- onPressIn: function () {
70
- wasDraggingRef.current = !1;
71
- },
72
- onPress: function () {
73
- if (wasDraggingRef.current) {
74
- wasDraggingRef.current = !1;
75
- return;
76
- }
77
- var max = context.snapPoints.length + (context.dismissOnSnapToBottom ? -1 : 0),
78
- nextPos = (context.position + 1) % max;
79
- context.setPosition(nextPos);
80
- },
81
- open: context.open,
82
- ...props
83
- });
84
- }),
85
- SheetOverlay = Overlay.styleable(function (propsIn, ref) {
86
- var {
87
- __scopeSheet,
88
- ...props
89
- } = propsIn,
90
- context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_OVERLAY_NAME, __scopeSheet),
91
- element = (0, import_react.useMemo)(function () {
92
- return (
93
- // @ts-ignore
94
- /* @__PURE__ */
95
- (0, import_jsx_runtime.jsx)(Overlay, {
96
- ...props,
97
- onPress: (0, import_gui_helpers.composeEventHandlers)(props.onPress, context.dismissOnOverlayPress ? function () {
98
- context.setOpen(!1);
99
- } : void 0)
100
- })
101
- );
102
- }, [props.onPress, props.opacity, context.dismissOnOverlayPress]);
103
- return (0, import_gui_constants.useIsomorphicLayoutEffect)(function () {
104
- var _context_onOverlayComponent;
105
- (_context_onOverlayComponent = context.onOverlayComponent) === null || _context_onOverlayComponent === void 0 || _context_onOverlayComponent.call(context, element);
106
- }, [element]), context.onlyShowFrame, null;
107
- }),
108
- SheetFrame = Frame.styleable(function (param2, forwardedRef) {
109
- var {
110
- __scopeSheet,
111
- adjustPaddingForOffscreenContent,
112
- disableHideBottomOverflow,
113
- children,
114
- ...props
115
- } = param2,
116
- context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_NAME, __scopeSheet),
117
- {
118
- hasFit,
119
- disableRemoveScroll,
120
- frameSize,
121
- contentRef,
122
- open
123
- } = context,
124
- composedContentRef = (0, import_gui_compose_refs.useComposedRefs)(forwardedRef, contentRef),
125
- offscreenSize = (0, import_useSheetOffscreenSize.useSheetOffscreenSize)(context),
126
- stableFrameSize = (0, import_react.useRef)(frameSize);
127
- (0, import_react.useEffect)(function () {
128
- open && frameSize && (stableFrameSize.current = frameSize);
129
- }, [open, frameSize]);
130
- var sheetContents = (0, import_react.useMemo)(function () {
131
- var shouldUseFixedHeight = hasFit && !open && stableFrameSize.current;
132
- return (
133
- // @ts-expect-error
134
- /* @__PURE__ */
135
- (0, import_jsx_runtime.jsxs)(Frame, {
136
- ref: composedContentRef,
137
- flex: hasFit && open ? 0 : 1,
138
- flexBasis: hasFit ? "auto" : void 0,
139
- height: shouldUseFixedHeight ? stableFrameSize.current : hasFit ? void 0 : frameSize,
140
- pointerEvents: open ? "auto" : "none",
141
- "data-state": open ? "open" : "closed",
142
- ...props,
143
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_z_index_stack.StackZIndexContext, {
144
- zIndex: (0, import_gui_portal.resolveViewZIndex)(props.zIndex),
145
- children
146
- }), adjustPaddingForOffscreenContent && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_core.View, {
147
- "data-sheet-offscreen-pad": !0,
148
- height: offscreenSize,
149
- width: "100%"
150
- })]
151
- })
152
- );
153
- }, [open, props, frameSize, offscreenSize, adjustPaddingForOffscreenContent, hasFit]);
154
- return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
155
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_remove_scroll.RemoveScroll, {
156
- enabled: !disableRemoveScroll && context.open,
157
- children: sheetContents
158
- }), /* below frame hide when bouncing past 100% */
159
- !disableHideBottomOverflow &&
160
- // @ts-ignore
161
- /* @__PURE__ */
162
- (0, import_jsx_runtime.jsx)(Frame, {
163
- ...props,
164
- componentName: "SheetCover",
165
- children: null,
166
- // Don't inherit testID - this is a visual helper element
167
- testID: void 0,
168
- id: void 0,
169
- position: "absolute",
170
- bottom: "-100%",
171
- zIndex: -1,
172
- height: context.frameSize,
173
- left: 0,
174
- right: 0,
175
- borderWidth: 0,
176
- borderRadius: 0,
177
- shadowOpacity: 0
178
- })]
179
- });
180
- }),
181
- Sheet = /* @__PURE__ */(0, import_react.forwardRef)(function (props, ref) {
182
- var hydrated = (0, import_gui_use_did_finish_ssr.useDidFinishSSR)(),
183
- {
184
- isShowingNonSheet
185
- } = (0, import_useSheetController.useSheetController)(),
186
- SheetImplementation = import_SheetImplementationCustom.SheetImplementationCustom;
187
- if (props.native && import_react_native.Platform.OS === "ios") {
188
- var impl = (0, import_nativeSheet.getNativeSheet)("ios");
189
- impl && (SheetImplementation = impl);
190
- }
191
- return isShowingNonSheet || !hydrated ? null : /* @__PURE__ */(0, import_jsx_runtime.jsx)(SheetImplementation, {
192
- ref,
193
- ...props
194
- });
195
- }),
196
- components = {
197
- Frame: SheetFrame,
198
- Overlay: SheetOverlay,
199
- Handle: SheetHandle,
200
- ScrollView: import_SheetScrollView.SheetScrollView
201
- },
202
- Controlled = (0, import_gui_helpers.withStaticProperties)(Sheet, components);
203
- return (0, import_gui_helpers.withStaticProperties)(Sheet, {
204
- ...components,
205
- Controlled
206
- });
207
- }
208
- //# sourceMappingURL=createSheet.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createSheet_exports","__export","createSheet","module","exports","import_jsx_runtime","require","import_gui_compose_refs","import_gui_constants","import_gui_core","import_gui_helpers","import_gui_portal","import_gui_remove_scroll","import_gui_use_did_finish_ssr","import_gui_z_index_stack","import_react","import_react_native","import_constants","import_nativeSheet","import_SheetContext","import_SheetImplementationCustom","import_SheetScrollView","import_useSheetController","import_useSheetOffscreenSize","param","Handle","Frame","Overlay","SheetHandle","styleable","param2","forwardedRef","__scopeSheet","props","context","useSheetContext","SHEET_HANDLE_NAME","composedRef","useComposedRefs","handleRef","wasDraggingRef","useRef","useEffect","scrollBridge","onParentDragging","isDragging","current","onlyShowFrame","jsx","ref","onPressIn","onPress","max","snapPoints","length","dismissOnSnapToBottom","nextPos","position","setPosition","open","SheetOverlay","propsIn","SHEET_OVERLAY_NAME","element","useMemo","composeEventHandlers","dismissOnOverlayPress","setOpen","opacity","useIsomorphicLayoutEffect","_context_onOverlayComponent","onOverlayComponent","call","SheetFrame","adjustPaddingForOffscreenContent","disableHideBottomOverflow","children","SHEET_NAME","hasFit","disableRemoveScroll","frameSize","contentRef","composedContentRef","offscreenSize","useSheetOffscreenSize","stableFrameSize","sheetContents","shouldUseFixedHeight","jsxs","flex","flexBasis","height","pointerEvents","StackZIndexContext","zIndex","resolveViewZIndex","View","width","Fragment","RemoveScroll","enabled","componentName","testID","id","bottom","left","right","borderWidth","borderRadius","shadowOpacity","Sheet","forwardRef","hydrated","useDidFinishSSR","isShowingNonSheet","useSheetController","SheetImplementation","SheetImplementationCustom","native","Platform","OS","impl","getNativeSheet","components"],"sources":["../../src/createSheet.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CA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BAAA,CAAAoG,eAAA;QAAA;UAAAC;QAAA,QAAA5F,yBAAA,CAAA6F,kBAAA;QAAAC,mBAAA,GAAAhG,gCAAA,CAAAiG,yBAAA;MACP,IAAApF,KAAS,CAAAqF,MAAA,IAAAtG,mBAAA,CAAAuG,QAAA,CAAAC,EAAA;QACT,IAAAC,IAAQ,OAAAvG,kBAAA,CAAAwG,cAAA;QACRD,IAAA,KAAAL,mBAAY,GAAAK,IAAA;MACd;MAOA,OAAAP,iBAAO,KAAAF,QAAA,yBAA4B,IAAA3G,kBAAA,CAAA2C,GAAA,EAAAoE,mBAAA;QACjCnE,GAAG;QACH,GAAAhB;MACD;IACH;IAAA0F,UAAA","ignoreList":[]}
@@ -1,39 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
- get: () => from[key],
14
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
- });
16
- return to;
17
- };
18
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
20
- }), mod);
21
- var gestureState_exports = {};
22
- __export(gestureState_exports, {
23
- getGestureHandlerState: () => getGestureHandlerState,
24
- isGestureHandlerEnabled: () => isGestureHandlerEnabled,
25
- setGestureHandlerState: () => setGestureHandlerState,
26
- setGestureState: () => setGestureState
27
- });
28
- module.exports = __toCommonJS(gestureState_exports);
29
- var import_gui_native = require("@hanzogui/native");
30
- function isGestureHandlerEnabled() {
31
- return (0, import_gui_native.getGestureHandler)().isEnabled;
32
- }
33
- function getGestureHandlerState() {
34
- return (0, import_gui_native.getGestureHandler)().state;
35
- }
36
- function setGestureHandlerState(updates) {
37
- (0, import_gui_native.getGestureHandler)().set(updates);
38
- }
39
- const setGestureState = setGestureHandlerState;
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
- get: () => from[key],
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
22
- }), mod);
23
- var gestureState_exports = {};
24
- __export(gestureState_exports, {
25
- getGestureHandlerState: () => getGestureHandlerState,
26
- isGestureHandlerEnabled: () => isGestureHandlerEnabled,
27
- setGestureHandlerState: () => setGestureHandlerState,
28
- setGestureState: () => setGestureState
29
- });
30
- module.exports = __toCommonJS(gestureState_exports);
31
- var import_gui_native = require("@hanzogui/native");
32
- function isGestureHandlerEnabled() {
33
- return (0, import_gui_native.getGestureHandler)().isEnabled;
34
- }
35
- function getGestureHandlerState() {
36
- return (0, import_gui_native.getGestureHandler)().state;
37
- }
38
- function setGestureHandlerState(updates) {
39
- (0, import_gui_native.getGestureHandler)().set(updates);
40
- }
41
- var setGestureState = setGestureHandlerState;
42
- //# sourceMappingURL=gestureState.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","gestureState_exports","__export","getGestureHandlerState","isGestureHandlerEnabled","setGestureHandlerState","setGestureState","module","exports","import_gui_native","require","getGestureHandler","isEnabled","state","updates","set"],"sources":["../../src/gestureState.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,sBAAA,EAAAA,CAAA,KAAAA,sBAAA;EAAAC,uBAAA,EAAAA,CAAA,KAAAA,uBAAA;EAAAC,sBAAA,EAAAA,CAAA,KAAAA,sBAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA;AAAA;AAKAC,MAAA,CAAAC,OAAA,GAAAZ,YAAqD,CAAAK,oBAAA;AAK9C,IAAAQ,iBAAS,GAAAC,OAAA,oBAAmC;AACjD,SAAAN,uBAAOA,CAAA;EACT,WAAAK,iBAAA,CAAAE,iBAAA,IAAAC,SAAA;AAEO;AACL,SAAAT,sBAAOA,CAAA;EACT,WAAAM,iBAAA,CAAAE,iBAAA,IAAAE,KAAA;AAEO;AACL,SAAAR,uBAAAS,OAAA;EACF,IAAAL,iBAAA,CAAAE,iBAAA,IAAAI,GAAA,CAAAD,OAAA;AAGO","ignoreList":[]}
@@ -1,31 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
- get: () => from[key],
14
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
- });
16
- return to;
17
- };
18
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
20
- }), mod);
21
- var helpers_exports = {};
22
- __export(helpers_exports, {
23
- resisted: () => resisted
24
- });
25
- module.exports = __toCommonJS(helpers_exports);
26
- function resisted(y, minY, maxOverflow = 25) {
27
- if (y >= minY) return y;
28
- const pastBoundary = minY - y,
29
- resistedDistance = Math.sqrt(pastBoundary) * 2;
30
- return minY - resistedDistance;
31
- }
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
- get: () => from[key],
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
22
- }), mod);
23
- var helpers_exports = {};
24
- __export(helpers_exports, {
25
- resisted: () => resisted
26
- });
27
- module.exports = __toCommonJS(helpers_exports);
28
- function resisted(y, minY) {
29
- var maxOverflow = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 25;
30
- if (y >= minY) return y;
31
- var pastBoundary = minY - y,
32
- resistedDistance = Math.sqrt(pastBoundary) * 2;
33
- return minY - resistedDistance;
34
- }
35
- //# sourceMappingURL=helpers.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","helpers_exports","__export","resisted","module","exports","y","minY","maxOverflow","arguments","length","pastBoundary","resistedDistance","Math","sqrt"],"sources":["../../src/helpers.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA;AAAA;AAAOC,MAAA,CAAAC,OAAS,GAAAT,YAAkC,CAAAK,eAAkB;AAElE,SAAIE,QAAKA,CAAAG,CAAA,EAAAC,IAAA;EACP,IAAAC,WAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;EAIT,IAAAH,CAAA,IAAMC,IAAA,EAQN,OAAOD,CAAA;EACT,IAAAK,YAAA,GAAAJ,IAAA,GAAAD,CAAA;IAAAM,gBAAA,GAAAC,IAAA,CAAAC,IAAA,CAAAH,YAAA","ignoreList":[]}
@@ -1,28 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
7
- get: () => from[key],
8
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
- });
10
- return to;
11
- },
12
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
- value: !0
15
- }), mod);
16
- var index_exports = {};
17
- module.exports = __toCommonJS(index_exports);
18
- __reExport(index_exports, require("./Sheet.cjs"), module.exports);
19
- __reExport(index_exports, require("./useSheet.cjs"), module.exports);
20
- __reExport(index_exports, require("./createSheet.cjs"), module.exports);
21
- __reExport(index_exports, require("./SheetController.cjs"), module.exports);
22
- __reExport(index_exports, require("./useSheetController.cjs"), module.exports);
23
- __reExport(index_exports, require("./useSheetOpenState.cjs"), module.exports);
24
- __reExport(index_exports, require("./useSheetOffscreenSize.cjs"), module.exports);
25
- __reExport(index_exports, require("./SheetScrollView.cjs"), module.exports);
26
- __reExport(index_exports, require("./nativeSheet.cjs"), module.exports);
27
- __reExport(index_exports, require("./types.cjs"), module.exports);
28
- __reExport(index_exports, require("./contexts.cjs"), module.exports);
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
- get: () => from[key],
10
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
- });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
17
- }), mod);
18
- var index_exports = {};
19
- module.exports = __toCommonJS(index_exports);
20
- __reExport(index_exports, require("./Sheet.native.js"), module.exports);
21
- __reExport(index_exports, require("./useSheet.native.js"), module.exports);
22
- __reExport(index_exports, require("./createSheet.native.js"), module.exports);
23
- __reExport(index_exports, require("./SheetController.native.js"), module.exports);
24
- __reExport(index_exports, require("./useSheetController.native.js"), module.exports);
25
- __reExport(index_exports, require("./useSheetOpenState.native.js"), module.exports);
26
- __reExport(index_exports, require("./useSheetOffscreenSize.native.js"), module.exports);
27
- __reExport(index_exports, require("./SheetScrollView.native.js"), module.exports);
28
- __reExport(index_exports, require("./nativeSheet.native.js"), module.exports);
29
- __reExport(index_exports, require("./types.native.js"), module.exports);
30
- __reExport(index_exports, require("./contexts.native.js"), module.exports);
31
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,uBAAAH,MADd,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,0BAAAH,MAFd,CAAAC,OAAA;AAGAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,6BAAAH,MAHd,CAAAC,OAAA;AAIAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,iCAAAH,MAJd,CAAAC,OAAA;AAKAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,oCALdH,MAAA,CAAAC,OAAA;AAMAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,mCAAAH,MANd,CAAAC,OAAA;AAOAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,oCAPd,GAAAH,MAAA,CAAAC,OAAA;AAQAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,8BARd,GAAAH,MAAA,CAAAC,OAAA;AASAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,0BATd,GAAAH,MAAA,CAAAC,OAAA;AAUAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,uBAAAH,MAVd,CAAAC,OAAA","ignoreList":[]}