@tamagui/sheet 2.7.7 → 3.0.0-beta.1093.1

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 (477) hide show
  1. package/dist/cjs/GestureSheetContext.cjs +28 -37
  2. package/dist/cjs/GestureSheetContext.native.cjs +48 -0
  3. package/dist/cjs/GestureSheetContext.native.js +29 -37
  4. package/dist/cjs/GestureSheetContext.native.js.map +1 -1
  5. package/dist/cjs/Sheet.cjs +220 -99
  6. package/dist/cjs/Sheet.native.cjs +245 -0
  7. package/dist/cjs/Sheet.native.js +223 -98
  8. package/dist/cjs/Sheet.native.js.map +1 -1
  9. package/dist/cjs/SheetContext.cjs +43 -22
  10. package/dist/cjs/SheetContext.native.cjs +57 -0
  11. package/dist/cjs/SheetContext.native.js +44 -22
  12. package/dist/cjs/SheetContext.native.js.map +1 -1
  13. package/dist/cjs/SheetController.cjs +49 -56
  14. package/dist/cjs/SheetController.native.cjs +71 -0
  15. package/dist/cjs/SheetController.native.js +52 -58
  16. package/dist/cjs/SheetController.native.js.map +1 -1
  17. package/dist/cjs/SheetDragSurface.cjs +50 -0
  18. package/dist/cjs/SheetDragSurface.native.cjs +61 -0
  19. package/dist/cjs/SheetDragSurface.native.js +63 -0
  20. package/dist/cjs/SheetDragSurface.native.js.map +1 -0
  21. package/dist/cjs/SheetImplementationCustom.cjs +664 -610
  22. package/dist/cjs/SheetImplementationCustom.native.cjs +748 -0
  23. package/dist/cjs/SheetImplementationCustom.native.js +704 -649
  24. package/dist/cjs/SheetImplementationCustom.native.js.map +1 -1
  25. package/dist/cjs/SheetScrollView.cjs +291 -312
  26. package/dist/cjs/SheetScrollView.native.cjs +326 -0
  27. package/dist/cjs/SheetScrollView.native.js +299 -319
  28. package/dist/cjs/SheetScrollView.native.js.map +1 -1
  29. package/dist/cjs/constants.cjs +21 -21
  30. package/dist/cjs/constants.native.cjs +36 -0
  31. package/dist/cjs/constants.native.js +21 -20
  32. package/dist/cjs/constants.native.js.map +1 -1
  33. package/dist/cjs/contexts.cjs +19 -28
  34. package/dist/cjs/contexts.native.cjs +37 -0
  35. package/dist/cjs/contexts.native.js +19 -27
  36. package/dist/cjs/contexts.native.js.map +1 -1
  37. package/dist/cjs/controller.cjs +16 -18
  38. package/dist/cjs/controller.native.cjs +31 -0
  39. package/dist/cjs/controller.native.js +16 -17
  40. package/dist/cjs/controller.native.js.map +1 -1
  41. package/dist/cjs/gestureState.cjs +28 -30
  42. package/dist/cjs/gestureState.native.cjs +53 -0
  43. package/dist/cjs/gestureState.native.js +29 -30
  44. package/dist/cjs/gestureState.native.js.map +1 -1
  45. package/dist/cjs/helpers.cjs +20 -24
  46. package/dist/cjs/helpers.native.cjs +34 -0
  47. package/dist/cjs/helpers.native.js +21 -24
  48. package/dist/cjs/helpers.native.js.map +1 -1
  49. package/dist/cjs/index.cjs +14 -21
  50. package/dist/cjs/index.native.cjs +36 -0
  51. package/dist/cjs/index.native.js +15 -21
  52. package/dist/cjs/index.native.js.map +1 -1
  53. package/dist/cjs/keyboardAvoidance.cjs +55 -79
  54. package/dist/cjs/keyboardAvoidance.native.cjs +74 -0
  55. package/dist/cjs/keyboardAvoidance.native.js +55 -78
  56. package/dist/cjs/keyboardAvoidance.native.js.map +1 -1
  57. package/dist/cjs/nativeSheet.cjs +17 -86
  58. package/dist/cjs/nativeSheet.native.cjs +94 -0
  59. package/dist/cjs/nativeSheet.native.js +73 -86
  60. package/dist/cjs/nativeSheet.native.js.map +1 -1
  61. package/dist/cjs/stableViewportHeight.cjs +27 -0
  62. package/dist/cjs/stableViewportHeight.native.cjs +29 -0
  63. package/dist/cjs/stableViewportHeight.native.js +31 -0
  64. package/dist/cjs/stableViewportHeight.native.js.map +1 -0
  65. package/dist/cjs/types.cjs +9 -11
  66. package/dist/cjs/types.native.cjs +18 -0
  67. package/dist/cjs/types.native.js +9 -10
  68. package/dist/cjs/types.native.js.map +1 -1
  69. package/dist/cjs/useGestureHandlerPan.cjs +244 -257
  70. package/dist/cjs/useGestureHandlerPan.native.cjs +272 -0
  71. package/dist/cjs/useGestureHandlerPan.native.js +253 -265
  72. package/dist/cjs/useGestureHandlerPan.native.js.map +1 -1
  73. package/dist/cjs/useKeyboardControllerSheet.cjs +82 -88
  74. package/dist/cjs/useKeyboardControllerSheet.native.cjs +92 -0
  75. package/dist/cjs/useKeyboardControllerSheet.native.js +73 -111
  76. package/dist/cjs/useKeyboardControllerSheet.native.js.map +1 -1
  77. package/dist/cjs/useSafeAreaInsets.cjs +19 -26
  78. package/dist/cjs/useSafeAreaInsets.native.cjs +50 -0
  79. package/dist/cjs/useSafeAreaInsets.native.js +29 -25
  80. package/dist/cjs/useSafeAreaInsets.native.js.map +1 -1
  81. package/dist/cjs/useSheetController.cjs +26 -39
  82. package/dist/cjs/useSheetController.native.cjs +41 -0
  83. package/dist/cjs/useSheetController.native.js +27 -39
  84. package/dist/cjs/useSheetController.native.js.map +1 -1
  85. package/dist/cjs/useSheetOffscreenSize.cjs +43 -53
  86. package/dist/cjs/useSheetOffscreenSize.native.cjs +59 -0
  87. package/dist/cjs/useSheetOffscreenSize.native.js +47 -56
  88. package/dist/cjs/useSheetOffscreenSize.native.js.map +1 -1
  89. package/dist/cjs/useSheetOpenState.cjs +68 -40
  90. package/dist/cjs/useSheetOpenState.native.cjs +87 -0
  91. package/dist/cjs/useSheetOpenState.native.js +73 -42
  92. package/dist/cjs/useSheetOpenState.native.js.map +1 -1
  93. package/dist/cjs/useSheetProviderProps.cjs +145 -164
  94. package/dist/cjs/useSheetProviderProps.native.cjs +175 -0
  95. package/dist/cjs/useSheetProviderProps.native.js +155 -174
  96. package/dist/cjs/useSheetProviderProps.native.js.map +1 -1
  97. package/dist/cjs/useSheetScrollViewGestures.cjs +171 -180
  98. package/dist/cjs/useSheetScrollViewGestures.native.cjs +149 -0
  99. package/dist/cjs/useSheetScrollViewGestures.native.js +135 -147
  100. package/dist/cjs/useSheetScrollViewGestures.native.js.map +1 -1
  101. package/dist/cjs/webViewport.cjs +46 -48
  102. package/dist/cjs/webViewport.native.cjs +78 -0
  103. package/dist/cjs/webViewport.native.js +49 -50
  104. package/dist/cjs/webViewport.native.js.map +1 -1
  105. package/dist/esm/GestureSheetContext.mjs +15 -20
  106. package/dist/esm/GestureSheetContext.mjs.map +1 -1
  107. package/dist/esm/GestureSheetContext.native.js +17 -22
  108. package/dist/esm/GestureSheetContext.native.js.map +1 -1
  109. package/dist/esm/Sheet.mjs +207 -83
  110. package/dist/esm/Sheet.mjs.map +1 -1
  111. package/dist/esm/Sheet.native.js +210 -83
  112. package/dist/esm/Sheet.native.js.map +1 -1
  113. package/dist/esm/SheetContext.mjs +21 -5
  114. package/dist/esm/SheetContext.mjs.map +1 -1
  115. package/dist/esm/SheetContext.native.js +21 -5
  116. package/dist/esm/SheetContext.native.js.map +1 -1
  117. package/dist/esm/SheetController.mjs +34 -30
  118. package/dist/esm/SheetController.mjs.map +1 -1
  119. package/dist/esm/SheetController.native.js +38 -34
  120. package/dist/esm/SheetController.native.js.map +1 -1
  121. package/dist/esm/SheetDragSurface.mjs +25 -0
  122. package/dist/esm/SheetDragSurface.mjs.map +1 -0
  123. package/dist/esm/SheetDragSurface.native.js +34 -0
  124. package/dist/esm/SheetDragSurface.native.js.map +1 -0
  125. package/dist/esm/SheetImplementationCustom.mjs +647 -586
  126. package/dist/esm/SheetImplementationCustom.mjs.map +1 -1
  127. package/dist/esm/SheetImplementationCustom.native.js +684 -618
  128. package/dist/esm/SheetImplementationCustom.native.js.map +1 -1
  129. package/dist/esm/SheetScrollView.mjs +278 -288
  130. package/dist/esm/SheetScrollView.mjs.map +1 -1
  131. package/dist/esm/SheetScrollView.native.js +287 -297
  132. package/dist/esm/SheetScrollView.native.js.map +1 -1
  133. package/dist/esm/constants.mjs +5 -3
  134. package/dist/esm/constants.mjs.map +1 -1
  135. package/dist/esm/constants.native.js +5 -3
  136. package/dist/esm/constants.native.js.map +1 -1
  137. package/dist/esm/contexts.mjs +3 -3
  138. package/dist/esm/contexts.mjs.map +1 -1
  139. package/dist/esm/contexts.native.js +3 -3
  140. package/dist/esm/contexts.native.js.map +1 -1
  141. package/dist/esm/controller.mjs +2 -2
  142. package/dist/esm/controller.native.js +2 -2
  143. package/dist/esm/gestureState.mjs +13 -11
  144. package/dist/esm/gestureState.mjs.map +1 -1
  145. package/dist/esm/gestureState.native.js +14 -12
  146. package/dist/esm/gestureState.native.js.map +1 -1
  147. package/dist/esm/helpers.mjs +7 -6
  148. package/dist/esm/helpers.mjs.map +1 -1
  149. package/dist/esm/helpers.native.js +8 -7
  150. package/dist/esm/helpers.native.js.map +1 -1
  151. package/dist/esm/index.js +21 -14
  152. package/dist/esm/index.mjs +21 -14
  153. package/dist/esm/index.native.js +21 -14
  154. package/dist/esm/keyboardAvoidance.mjs +40 -61
  155. package/dist/esm/keyboardAvoidance.mjs.map +1 -1
  156. package/dist/esm/keyboardAvoidance.native.js +40 -61
  157. package/dist/esm/keyboardAvoidance.native.js.map +1 -1
  158. package/dist/esm/nativeSheet.mjs +4 -70
  159. package/dist/esm/nativeSheet.mjs.map +1 -1
  160. package/dist/esm/nativeSheet.native.js +60 -70
  161. package/dist/esm/nativeSheet.native.js.map +1 -1
  162. package/dist/esm/stableViewportHeight.mjs +8 -0
  163. package/dist/esm/stableViewportHeight.mjs.map +1 -0
  164. package/dist/esm/stableViewportHeight.native.js +8 -0
  165. package/dist/esm/stableViewportHeight.native.js.map +1 -0
  166. package/dist/esm/types.mjs +0 -2
  167. package/dist/esm/types.native.js +0 -2
  168. package/dist/esm/useGestureHandlerPan.mjs +232 -239
  169. package/dist/esm/useGestureHandlerPan.mjs.map +1 -1
  170. package/dist/esm/useGestureHandlerPan.native.js +241 -248
  171. package/dist/esm/useGestureHandlerPan.native.js.map +1 -1
  172. package/dist/esm/useKeyboardControllerSheet.mjs +71 -71
  173. package/dist/esm/useKeyboardControllerSheet.mjs.map +1 -1
  174. package/dist/esm/useKeyboardControllerSheet.native.js +66 -94
  175. package/dist/esm/useKeyboardControllerSheet.native.js.map +1 -1
  176. package/dist/esm/useSafeAreaInsets.mjs +3 -1
  177. package/dist/esm/useSafeAreaInsets.mjs.map +1 -1
  178. package/dist/esm/useSafeAreaInsets.native.js +15 -3
  179. package/dist/esm/useSafeAreaInsets.native.js.map +1 -1
  180. package/dist/esm/useSheetController.mjs +14 -12
  181. package/dist/esm/useSheetController.mjs.map +1 -1
  182. package/dist/esm/useSheetController.native.js +14 -12
  183. package/dist/esm/useSheetController.native.js.map +1 -1
  184. package/dist/esm/useSheetOffscreenSize.mjs +30 -35
  185. package/dist/esm/useSheetOffscreenSize.mjs.map +1 -1
  186. package/dist/esm/useSheetOffscreenSize.native.js +34 -39
  187. package/dist/esm/useSheetOffscreenSize.native.js.map +1 -1
  188. package/dist/esm/useSheetOpenState.mjs +50 -22
  189. package/dist/esm/useSheetOpenState.mjs.map +1 -1
  190. package/dist/esm/useSheetOpenState.native.js +55 -25
  191. package/dist/esm/useSheetOpenState.native.js.map +1 -1
  192. package/dist/esm/useSheetProviderProps.mjs +130 -138
  193. package/dist/esm/useSheetProviderProps.mjs.map +1 -1
  194. package/dist/esm/useSheetProviderProps.native.js +140 -149
  195. package/dist/esm/useSheetProviderProps.native.js.map +1 -1
  196. package/dist/esm/useSheetScrollViewGestures.mjs +159 -162
  197. package/dist/esm/useSheetScrollViewGestures.mjs.map +1 -1
  198. package/dist/esm/useSheetScrollViewGestures.native.js +123 -130
  199. package/dist/esm/useSheetScrollViewGestures.native.js.map +1 -1
  200. package/dist/esm/webViewport.mjs +26 -25
  201. package/dist/esm/webViewport.mjs.map +1 -1
  202. package/dist/esm/webViewport.native.js +29 -28
  203. package/dist/esm/webViewport.native.js.map +1 -1
  204. package/dist/jsx/GestureSheetContext.mjs +15 -20
  205. package/dist/jsx/GestureSheetContext.mjs.map +1 -1
  206. package/dist/jsx/GestureSheetContext.native.cjs +48 -0
  207. package/dist/jsx/GestureSheetContext.native.js +29 -37
  208. package/dist/jsx/GestureSheetContext.native.js.map +1 -1
  209. package/dist/jsx/Sheet.mjs +207 -83
  210. package/dist/jsx/Sheet.mjs.map +1 -1
  211. package/dist/jsx/Sheet.native.cjs +245 -0
  212. package/dist/jsx/Sheet.native.js +223 -98
  213. package/dist/jsx/Sheet.native.js.map +1 -1
  214. package/dist/jsx/SheetContext.mjs +21 -5
  215. package/dist/jsx/SheetContext.mjs.map +1 -1
  216. package/dist/jsx/SheetContext.native.cjs +57 -0
  217. package/dist/jsx/SheetContext.native.js +44 -22
  218. package/dist/jsx/SheetContext.native.js.map +1 -1
  219. package/dist/jsx/SheetController.mjs +34 -30
  220. package/dist/jsx/SheetController.mjs.map +1 -1
  221. package/dist/jsx/SheetController.native.cjs +71 -0
  222. package/dist/jsx/SheetController.native.js +52 -58
  223. package/dist/jsx/SheetController.native.js.map +1 -1
  224. package/dist/jsx/SheetDragSurface.mjs +25 -0
  225. package/dist/jsx/SheetDragSurface.mjs.map +1 -0
  226. package/dist/jsx/SheetDragSurface.native.cjs +61 -0
  227. package/dist/jsx/SheetDragSurface.native.js +63 -0
  228. package/dist/jsx/SheetDragSurface.native.js.map +1 -0
  229. package/dist/jsx/SheetImplementationCustom.mjs +647 -586
  230. package/dist/jsx/SheetImplementationCustom.mjs.map +1 -1
  231. package/dist/jsx/SheetImplementationCustom.native.cjs +748 -0
  232. package/dist/jsx/SheetImplementationCustom.native.js +704 -649
  233. package/dist/jsx/SheetImplementationCustom.native.js.map +1 -1
  234. package/dist/jsx/SheetScrollView.mjs +278 -288
  235. package/dist/jsx/SheetScrollView.mjs.map +1 -1
  236. package/dist/jsx/SheetScrollView.native.cjs +326 -0
  237. package/dist/jsx/SheetScrollView.native.js +299 -319
  238. package/dist/jsx/SheetScrollView.native.js.map +1 -1
  239. package/dist/jsx/constants.mjs +5 -3
  240. package/dist/jsx/constants.mjs.map +1 -1
  241. package/dist/jsx/constants.native.cjs +36 -0
  242. package/dist/jsx/constants.native.js +21 -20
  243. package/dist/jsx/constants.native.js.map +1 -1
  244. package/dist/jsx/contexts.mjs +3 -3
  245. package/dist/jsx/contexts.mjs.map +1 -1
  246. package/dist/jsx/contexts.native.cjs +37 -0
  247. package/dist/jsx/contexts.native.js +19 -27
  248. package/dist/jsx/contexts.native.js.map +1 -1
  249. package/dist/jsx/controller.mjs +2 -2
  250. package/dist/jsx/controller.native.cjs +31 -0
  251. package/dist/jsx/controller.native.js +16 -17
  252. package/dist/jsx/controller.native.js.map +1 -1
  253. package/dist/jsx/gestureState.mjs +13 -11
  254. package/dist/jsx/gestureState.mjs.map +1 -1
  255. package/dist/jsx/gestureState.native.cjs +53 -0
  256. package/dist/jsx/gestureState.native.js +29 -30
  257. package/dist/jsx/gestureState.native.js.map +1 -1
  258. package/dist/jsx/helpers.mjs +7 -6
  259. package/dist/jsx/helpers.mjs.map +1 -1
  260. package/dist/jsx/helpers.native.cjs +34 -0
  261. package/dist/jsx/helpers.native.js +21 -24
  262. package/dist/jsx/helpers.native.js.map +1 -1
  263. package/dist/jsx/index.js +21 -14
  264. package/dist/jsx/index.mjs +21 -14
  265. package/dist/jsx/index.native.cjs +36 -0
  266. package/dist/jsx/index.native.js +15 -21
  267. package/dist/jsx/index.native.js.map +1 -1
  268. package/dist/jsx/keyboardAvoidance.mjs +40 -61
  269. package/dist/jsx/keyboardAvoidance.mjs.map +1 -1
  270. package/dist/jsx/keyboardAvoidance.native.cjs +74 -0
  271. package/dist/jsx/keyboardAvoidance.native.js +55 -78
  272. package/dist/jsx/keyboardAvoidance.native.js.map +1 -1
  273. package/dist/jsx/nativeSheet.mjs +4 -70
  274. package/dist/jsx/nativeSheet.mjs.map +1 -1
  275. package/dist/jsx/nativeSheet.native.cjs +94 -0
  276. package/dist/jsx/nativeSheet.native.js +73 -86
  277. package/dist/jsx/nativeSheet.native.js.map +1 -1
  278. package/dist/jsx/stableViewportHeight.mjs +8 -0
  279. package/dist/jsx/stableViewportHeight.mjs.map +1 -0
  280. package/dist/jsx/stableViewportHeight.native.cjs +29 -0
  281. package/dist/jsx/stableViewportHeight.native.js +31 -0
  282. package/dist/jsx/stableViewportHeight.native.js.map +1 -0
  283. package/dist/jsx/types.mjs +0 -2
  284. package/dist/jsx/types.native.cjs +18 -0
  285. package/dist/jsx/types.native.js +9 -10
  286. package/dist/jsx/types.native.js.map +1 -1
  287. package/dist/jsx/useGestureHandlerPan.mjs +232 -239
  288. package/dist/jsx/useGestureHandlerPan.mjs.map +1 -1
  289. package/dist/jsx/useGestureHandlerPan.native.cjs +272 -0
  290. package/dist/jsx/useGestureHandlerPan.native.js +253 -265
  291. package/dist/jsx/useGestureHandlerPan.native.js.map +1 -1
  292. package/dist/jsx/useKeyboardControllerSheet.mjs +71 -71
  293. package/dist/jsx/useKeyboardControllerSheet.mjs.map +1 -1
  294. package/dist/jsx/useKeyboardControllerSheet.native.cjs +92 -0
  295. package/dist/jsx/useKeyboardControllerSheet.native.js +73 -111
  296. package/dist/jsx/useKeyboardControllerSheet.native.js.map +1 -1
  297. package/dist/jsx/useSafeAreaInsets.mjs +3 -1
  298. package/dist/jsx/useSafeAreaInsets.mjs.map +1 -1
  299. package/dist/jsx/useSafeAreaInsets.native.cjs +50 -0
  300. package/dist/jsx/useSafeAreaInsets.native.js +29 -25
  301. package/dist/jsx/useSafeAreaInsets.native.js.map +1 -1
  302. package/dist/jsx/useSheetController.mjs +14 -12
  303. package/dist/jsx/useSheetController.mjs.map +1 -1
  304. package/dist/jsx/useSheetController.native.cjs +41 -0
  305. package/dist/jsx/useSheetController.native.js +27 -39
  306. package/dist/jsx/useSheetController.native.js.map +1 -1
  307. package/dist/jsx/useSheetOffscreenSize.mjs +30 -35
  308. package/dist/jsx/useSheetOffscreenSize.mjs.map +1 -1
  309. package/dist/jsx/useSheetOffscreenSize.native.cjs +59 -0
  310. package/dist/jsx/useSheetOffscreenSize.native.js +47 -56
  311. package/dist/jsx/useSheetOffscreenSize.native.js.map +1 -1
  312. package/dist/jsx/useSheetOpenState.mjs +50 -22
  313. package/dist/jsx/useSheetOpenState.mjs.map +1 -1
  314. package/dist/jsx/useSheetOpenState.native.cjs +87 -0
  315. package/dist/jsx/useSheetOpenState.native.js +73 -42
  316. package/dist/jsx/useSheetOpenState.native.js.map +1 -1
  317. package/dist/jsx/useSheetProviderProps.mjs +130 -138
  318. package/dist/jsx/useSheetProviderProps.mjs.map +1 -1
  319. package/dist/jsx/useSheetProviderProps.native.cjs +175 -0
  320. package/dist/jsx/useSheetProviderProps.native.js +155 -174
  321. package/dist/jsx/useSheetProviderProps.native.js.map +1 -1
  322. package/dist/jsx/useSheetScrollViewGestures.mjs +159 -162
  323. package/dist/jsx/useSheetScrollViewGestures.mjs.map +1 -1
  324. package/dist/jsx/useSheetScrollViewGestures.native.cjs +149 -0
  325. package/dist/jsx/useSheetScrollViewGestures.native.js +135 -147
  326. package/dist/jsx/useSheetScrollViewGestures.native.js.map +1 -1
  327. package/dist/jsx/webViewport.mjs +26 -25
  328. package/dist/jsx/webViewport.mjs.map +1 -1
  329. package/dist/jsx/webViewport.native.cjs +78 -0
  330. package/dist/jsx/webViewport.native.js +49 -50
  331. package/dist/jsx/webViewport.native.js.map +1 -1
  332. package/package.json +38 -40
  333. package/src/Sheet.tsx +314 -77
  334. package/src/SheetContext.tsx +57 -7
  335. package/src/SheetController.tsx +7 -6
  336. package/src/SheetDragSurface.native.tsx +42 -0
  337. package/src/SheetDragSurface.tsx +40 -0
  338. package/src/SheetImplementationCustom.tsx +364 -181
  339. package/src/SheetScrollView.tsx +36 -20
  340. package/src/constants.tsx +3 -3
  341. package/src/helpers.tsx +0 -14
  342. package/src/index.ts +3 -6
  343. package/src/{nativeSheet.tsx → nativeSheet.native.tsx} +9 -20
  344. package/src/nativeSheet.ts +19 -0
  345. package/src/stableViewportHeight.native.ts +9 -0
  346. package/src/stableViewportHeight.ts +15 -0
  347. package/src/types.tsx +122 -92
  348. package/src/useKeyboardControllerSheet.native.ts +10 -39
  349. package/src/useSafeAreaInsets.native.ts +20 -13
  350. package/src/useSheetController.tsx +15 -7
  351. package/src/useSheetOpenState.tsx +50 -4
  352. package/src/useSheetProviderProps.tsx +4 -27
  353. package/src/useSheetScrollViewGestures.ts +2 -2
  354. package/types/GestureSheetContext.d.ts +1 -1
  355. package/types/GestureSheetContext.d.ts.map +1 -1
  356. package/types/Sheet.d.ts +247 -151
  357. package/types/Sheet.d.ts.map +1 -1
  358. package/types/SheetContext.d.ts +28 -42
  359. package/types/SheetContext.d.ts.map +1 -1
  360. package/types/SheetController.d.ts +4 -2
  361. package/types/SheetController.d.ts.map +1 -1
  362. package/types/SheetDragSurface.d.ts +11 -0
  363. package/types/SheetDragSurface.d.ts.map +1 -0
  364. package/types/SheetDragSurface.native.d.ts +11 -0
  365. package/types/SheetDragSurface.native.d.ts.map +1 -0
  366. package/types/SheetImplementationCustom.d.ts +4 -36
  367. package/types/SheetImplementationCustom.d.ts.map +1 -1
  368. package/types/SheetScrollView.d.ts +21 -38
  369. package/types/SheetScrollView.d.ts.map +1 -1
  370. package/types/constants.d.ts +3 -2
  371. package/types/constants.d.ts.map +1 -1
  372. package/types/index.d.ts +1 -3
  373. package/types/index.d.ts.map +1 -1
  374. package/types/nativeSheet.d.ts +8 -8
  375. package/types/nativeSheet.d.ts.map +1 -1
  376. package/types/nativeSheet.native.d.ts +5 -0
  377. package/types/nativeSheet.native.d.ts.map +1 -0
  378. package/types/stableViewportHeight.d.ts +12 -0
  379. package/types/stableViewportHeight.d.ts.map +1 -0
  380. package/types/stableViewportHeight.native.d.ts +6 -0
  381. package/types/stableViewportHeight.native.d.ts.map +1 -0
  382. package/types/types.d.ts +43 -17
  383. package/types/types.d.ts.map +1 -1
  384. package/types/useKeyboardControllerSheet.native.d.ts +6 -6
  385. package/types/useKeyboardControllerSheet.native.d.ts.map +1 -1
  386. package/types/useSafeAreaInsets.native.d.ts +4 -12
  387. package/types/useSafeAreaInsets.native.d.ts.map +1 -1
  388. package/types/useSheetController.d.ts +6 -6
  389. package/types/useSheetController.d.ts.map +1 -1
  390. package/types/useSheetOffscreenSize.d.ts.map +1 -1
  391. package/types/useSheetOpenState.d.ts +3 -2
  392. package/types/useSheetOpenState.d.ts.map +1 -1
  393. package/types/useSheetProviderProps.d.ts +5 -8
  394. package/types/useSheetProviderProps.d.ts.map +1 -1
  395. package/types/useSheetScrollViewGestures.d.ts +2 -2
  396. package/types/useSheetScrollViewGestures.d.ts.map +1 -1
  397. package/.turbo/turbo-build.log +0 -2
  398. package/controller/index.cjs +0 -2
  399. package/controller/index.d.ts +0 -5
  400. package/controller/index.js +0 -2
  401. package/controller/index.native.cjs +0 -2
  402. package/controller/index.native.js +0 -2
  403. package/dist/cjs/GestureDetectorWrapper.cjs +0 -54
  404. package/dist/cjs/GestureDetectorWrapper.native.js +0 -58
  405. package/dist/cjs/GestureDetectorWrapper.native.js.map +0 -1
  406. package/dist/cjs/createSheet.cjs +0 -194
  407. package/dist/cjs/createSheet.native.js +0 -204
  408. package/dist/cjs/createSheet.native.js.map +0 -1
  409. package/dist/cjs/setupGestureHandler.cjs +0 -55
  410. package/dist/cjs/setupGestureHandler.native.js +0 -60
  411. package/dist/cjs/setupGestureHandler.native.js.map +0 -1
  412. package/dist/cjs/useSheet.cjs +0 -29
  413. package/dist/cjs/useSheet.native.js +0 -34
  414. package/dist/cjs/useSheet.native.js.map +0 -1
  415. package/dist/esm/GestureDetectorWrapper.mjs +0 -29
  416. package/dist/esm/GestureDetectorWrapper.mjs.map +0 -1
  417. package/dist/esm/GestureDetectorWrapper.native.js +0 -30
  418. package/dist/esm/GestureDetectorWrapper.native.js.map +0 -1
  419. package/dist/esm/controller.mjs.map +0 -1
  420. package/dist/esm/controller.native.js.map +0 -1
  421. package/dist/esm/createSheet.mjs +0 -168
  422. package/dist/esm/createSheet.mjs.map +0 -1
  423. package/dist/esm/createSheet.native.js +0 -176
  424. package/dist/esm/createSheet.native.js.map +0 -1
  425. package/dist/esm/index.js.map +0 -1
  426. package/dist/esm/index.mjs.map +0 -1
  427. package/dist/esm/index.native.js.map +0 -1
  428. package/dist/esm/setupGestureHandler.mjs +0 -29
  429. package/dist/esm/setupGestureHandler.mjs.map +0 -1
  430. package/dist/esm/setupGestureHandler.native.js +0 -31
  431. package/dist/esm/setupGestureHandler.native.js.map +0 -1
  432. package/dist/esm/types.mjs.map +0 -1
  433. package/dist/esm/types.native.js.map +0 -1
  434. package/dist/esm/useSheet.mjs +0 -4
  435. package/dist/esm/useSheet.mjs.map +0 -1
  436. package/dist/esm/useSheet.native.js +0 -6
  437. package/dist/esm/useSheet.native.js.map +0 -1
  438. package/dist/jsx/GestureDetectorWrapper.mjs +0 -29
  439. package/dist/jsx/GestureDetectorWrapper.mjs.map +0 -1
  440. package/dist/jsx/GestureDetectorWrapper.native.js +0 -58
  441. package/dist/jsx/GestureDetectorWrapper.native.js.map +0 -1
  442. package/dist/jsx/controller.mjs.map +0 -1
  443. package/dist/jsx/createSheet.mjs +0 -168
  444. package/dist/jsx/createSheet.mjs.map +0 -1
  445. package/dist/jsx/createSheet.native.js +0 -204
  446. package/dist/jsx/createSheet.native.js.map +0 -1
  447. package/dist/jsx/index.js.map +0 -1
  448. package/dist/jsx/index.mjs.map +0 -1
  449. package/dist/jsx/setupGestureHandler.mjs +0 -29
  450. package/dist/jsx/setupGestureHandler.mjs.map +0 -1
  451. package/dist/jsx/setupGestureHandler.native.js +0 -60
  452. package/dist/jsx/setupGestureHandler.native.js.map +0 -1
  453. package/dist/jsx/types.mjs.map +0 -1
  454. package/dist/jsx/useSheet.mjs +0 -4
  455. package/dist/jsx/useSheet.mjs.map +0 -1
  456. package/dist/jsx/useSheet.native.js +0 -34
  457. package/dist/jsx/useSheet.native.js.map +0 -1
  458. package/next.md +0 -78
  459. package/setup-gesture-handler/index.cjs +0 -2
  460. package/setup-gesture-handler/index.js +0 -2
  461. package/setup-gesture-handler/index.native.cjs +0 -2
  462. package/setup-gesture-handler/index.native.js +0 -2
  463. package/setup-gesture-handler.cjs +0 -1
  464. package/src/GestureDetectorWrapper.tsx +0 -38
  465. package/src/createSheet.tsx +0 -309
  466. package/src/setupGestureHandler.ts +0 -43
  467. package/src/useSheet.tsx +0 -3
  468. package/test/keyboardAvoidance.test.ts +0 -269
  469. package/tsconfig.json +0 -57
  470. package/types/GestureDetectorWrapper.d.ts +0 -14
  471. package/types/GestureDetectorWrapper.d.ts.map +0 -1
  472. package/types/createSheet.d.ts +0 -195
  473. package/types/createSheet.d.ts.map +0 -1
  474. package/types/setupGestureHandler.d.ts +0 -11
  475. package/types/setupGestureHandler.d.ts.map +0 -1
  476. package/types/useSheet.d.ts +0 -2
  477. package/types/useSheet.d.ts.map +0 -1
@@ -5,54 +5,46 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
12
  };
13
13
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
21
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
23
  var GestureSheetContext_exports = {};
26
24
  __export(GestureSheetContext_exports, {
27
- GestureSheetProvider: () => GestureSheetProvider,
28
- useGestureSheetContext: () => useGestureSheetContext
25
+ GestureSheetProvider: () => GestureSheetProvider,
26
+ useGestureSheetContext: () => useGestureSheetContext
29
27
  });
30
28
  module.exports = __toCommonJS(GestureSheetContext_exports);
31
29
  var import_jsx_runtime = require("react/jsx-runtime");
32
30
  var import_react = require("react");
33
- var GestureSheetContext = /* @__PURE__ */(0, import_react.createContext)(null);
31
+ var GestureSheetContext = /* @__PURE__ */ (0, import_react.createContext)(null);
34
32
  function useGestureSheetContext() {
35
- return (0, import_react.useContext)(GestureSheetContext);
33
+ return (0, import_react.useContext)(GestureSheetContext);
36
34
  }
37
35
  function GestureSheetProvider(param) {
38
- var {
39
- children,
40
- isDragging,
41
- blockPan,
42
- setBlockPan,
43
- panGesture,
44
- panGestureRef
45
- } = param;
46
- var value = {
47
- panGesture,
48
- panGestureRef,
49
- isDragging,
50
- blockPan,
51
- setBlockPan
52
- };
53
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(GestureSheetContext.Provider, {
54
- value,
55
- children
56
- });
36
+ var { children, isDragging, blockPan, setBlockPan, panGesture, panGestureRef } = param;
37
+ var value = {
38
+ panGesture,
39
+ panGestureRef,
40
+ isDragging,
41
+ blockPan,
42
+ setBlockPan
43
+ };
44
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GestureSheetContext.Provider, {
45
+ value,
46
+ children
47
+ });
57
48
  }
49
+
58
50
  //# sourceMappingURL=GestureSheetContext.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","GestureSheetContext_exports","GestureSheetProvider","useGestureSheetContext"],"sources":["../../src/GestureSheetContext.tsx"],"sourcesContent":[null],"mappings":"AACA,YAAS;;AA0DL,IAAAA,SAAA,GAAAC,MAAA,CAAAC,cAAA;AAhCJ,IAAAC,gBAAM,GAAAF,MAAsB,CAAAG,wBAAmD;AAExE,IAAAC,iBAAS,GAAAJ,MAAA,CAAAK,mBAA0D;AACxE,IAAAC,YAAO,GAAAN,MAAW,CAAAO,SAAA,CAAAC,cAAmB;AACvC,IAAAC,QAAA,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EAWO,SAASC,IAAA,IAAAD,GAAA,EACdZ,SAAA,CAAAW,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AAAA;AACA,IACAC,WAAA,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EACA,IAAAF,IAAA,WAAAA,IAAA,wBAAAA,IAAA;IACA,SAAAG,GAAA,IAAAhB,iBAAA,CAAAa,IAAA,GACA,KAAAX,YAAA,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,EAC4BnB,SAAA,CAAAiB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAjB,gBAAA,CAAAe,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;EAC5B;EAAwC,OACtCE,EAAA;AAAA;AACA,IACAM,YAAA,GAAAC,GAAA,IAAAR,WAAA,CAAAhB,SAAA;EAAAyB,KAAA;AAAA,IAAAD,GAAA;AAAA,IACAE,2BAAA;AAAAhB,QACA,CAAAgB,2BAAA;EACFC,oBAAA,EAAAA,CAAA,KAAAA,oBAAA;EAEAC,sBACE,EAAAA,CAAA,KAACA;AAEL","ignoreList":[]}
1
+ {"version":3,"file":"GestureSheetContext.native.js","names":[],"sources":["jsx/GestureSheetContext.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar GestureSheetContext_exports = {};\n__export(GestureSheetContext_exports, {\n GestureSheetProvider: () => GestureSheetProvider,\n useGestureSheetContext: () => useGestureSheetContext\n});\nmodule.exports = __toCommonJS(GestureSheetContext_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = require(\"react\");\nvar GestureSheetContext = /* @__PURE__ */ (0, import_react.createContext)(null);\nfunction useGestureSheetContext() {\n return (0, import_react.useContext)(GestureSheetContext);\n}\nfunction GestureSheetProvider(param) {\n var { children, isDragging, blockPan, setBlockPan, panGesture, panGestureRef } = param;\n var value = {\n panGesture,\n panGestureRef,\n isDragging,\n blockPan,\n setBlockPan\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GestureSheetContext.Provider, {\n value,\n children\n });\n}\n//# sourceMappingURL=GestureSheetContext.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,8BAA8B,CAAC;AACnC,SAAS,6BAA6B;CACpC,4BAA4B;CAC5B,8BAA8B;AAChC,CAAC;AACD,OAAO,UAAU,aAAa,2BAA2B;AACzD,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,eAAe,QAAQ,OAAO;AAClC,IAAI,sBAAsC,iBAAC,GAAG,aAAa,cAAa,CAAE,IAAI;AAC9E,SAAS,yBAAyB;CAChC,QAAQ,GAAG,aAAa,WAAU,CAAE,mBAAmB;AACzD;AACA,SAAS,qBAAqB,OAAO;CACnC,IAAI,EAAE,UAAU,YAAY,UAAU,aAAa,YAAY,kBAAkB;CACjF,IAAI,QAAQ;EACV;EACA;EACA;EACA;EACA;CACF;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,oBAAoB,UAAU;EAC/E;EACA;CACF,CAAC;AACH"}
@@ -1,89 +1,213 @@
1
- import { styled } from "@tamagui/core";
1
+ import { AdaptCapabilities, useAdaptContext, useAdaptIsActive } from "@tamagui/adapt";
2
+ import { useComposedRefs } from "@tamagui/compose-refs";
3
+ import { isWeb } from "@tamagui/constants";
4
+ import { View, createRefComponent, createStyledHOC, styled } from "@tamagui/core";
5
+ import { composeEventHandlers, withStaticProperties } from "@tamagui/helpers";
6
+ import { resolveViewZIndex } from "@tamagui/portal";
7
+ import { RemoveScroll } from "@tamagui/remove-scroll";
2
8
  import { XStack, YStack } from "@tamagui/stacks";
3
- import { SHEET_HANDLE_NAME, SHEET_NAME, SHEET_OVERLAY_NAME } from "./constants.mjs";
4
- import { createSheet } from "./createSheet.mjs";
5
- import { createSheetScope } from "./SheetContext.mjs";
6
- export * from "./types.mjs";
7
- const Handle = styled(XStack, {
8
- name: SHEET_HANDLE_NAME,
9
- variants: {
10
- open: {
11
- true: {
12
- opacity: 1,
13
- pointerEvents: "auto"
14
- },
15
- false: {
16
- opacity: 0,
17
- pointerEvents: "none"
18
- }
19
- },
20
- unstyled: {
21
- false: {
22
- height: 10,
23
- borderRadius: 100,
24
- backgroundColor: "$background",
25
- zIndex: 10,
26
- marginHorizontal: "35%",
27
- marginBottom: "$2",
28
- opacity: 0.5,
29
- hoverStyle: {
30
- opacity: 0.7
31
- }
32
- }
33
- }
34
- },
35
- defaultVariants: {
36
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
37
- }
9
+ import { useDidFinishSSR } from "@tamagui/use-did-finish-ssr";
10
+ import { StackZIndexContext } from "@tamagui/z-index-stack";
11
+ import { useContext, useEffect, useMemo, useRef } from "react";
12
+ import { SHEET_BACKGROUND_NAME, SHEET_CONTAINER_NAME, SHEET_HANDLE_NAME, SHEET_OVERLAY_MARKER, SHEET_OVERLAY_NAME } from "./constants.mjs";
13
+ import { getNativeSheet } from "./nativeSheet.mjs";
14
+ import { SheetOverlayLayerContext, useAnimatedPosition, useSheetContext } from "./SheetContext.mjs";
15
+ import { SheetImplementationCustom } from "./SheetImplementationCustom.mjs";
16
+ import { SheetScrollView } from "./SheetScrollView.mjs";
17
+ import { useSheetController } from "./useSheetController.mjs";
18
+ import { useSheetOffscreenSize } from "./useSheetOffscreenSize.mjs";
19
+ import { getMaxViewportHeight } from "./webViewport.mjs";
20
+ import { jsx, jsxs } from "react/jsx-runtime";
21
+
22
+ export * from "./types.mjs"
23
+
24
+ const SheetHandleFrame = styled(XStack, {
25
+ displayName: SHEET_HANDLE_NAME,
26
+ variants: { open: {
27
+ true: { pointerEvents: "auto" },
28
+ false: { pointerEvents: "none" }
29
+ } }
38
30
  });
39
- const Overlay = styled(YStack, {
40
- name: SHEET_OVERLAY_NAME,
41
- variants: {
42
- open: {
43
- true: {
44
- pointerEvents: "auto"
45
- },
46
- false: {
47
- pointerEvents: "none"
48
- }
49
- },
50
- unstyled: {
51
- false: {
52
- fullscreen: true,
53
- position: "absolute",
54
- backgroundColor: "$background",
55
- zIndex: 1e5 - 1,
56
- pointerEvents: "auto"
57
- }
58
- }
59
- },
60
- defaultVariants: {
61
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
62
- }
31
+ const SheetOverlayFrame = styled(YStack, {
32
+ displayName: SHEET_OVERLAY_NAME,
33
+ inset: 0,
34
+ position: "absolute",
35
+ zIndex: 1e5 - 1,
36
+ pointerEvents: "auto",
37
+ variants: { open: {
38
+ true: { pointerEvents: "auto" },
39
+ false: { pointerEvents: "none" }
40
+ } }
63
41
  });
64
- const Frame = styled(YStack, {
65
- name: SHEET_NAME,
66
- variants: {
67
- unstyled: {
68
- false: {
69
- flex: 1,
70
- backgroundColor: "$background",
71
- borderTopLeftRadius: "$true",
72
- borderTopRightRadius: "$true",
73
- width: "100%",
74
- maxHeight: "100%",
75
- overflow: "hidden"
76
- }
77
- }
78
- },
79
- defaultVariants: {
80
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
81
- }
42
+ Object.assign(SheetOverlayFrame.staticConfig, { [SHEET_OVERLAY_MARKER]: true });
43
+ const SheetContainerFrame = styled(YStack, {
44
+ displayName: SHEET_CONTAINER_NAME,
45
+ flex: 1,
46
+ position: "relative",
47
+ zIndex: 0,
48
+ width: "100%",
49
+ maxHeight: "100%"
82
50
  });
83
- const Sheet = createSheet({
84
- Frame,
85
- Handle,
86
- Overlay
51
+ const SheetBackgroundFrame = styled(YStack, {
52
+ displayName: SHEET_BACKGROUND_NAME,
53
+ position: "absolute",
54
+ top: 0,
55
+ left: 0,
56
+ right: 0,
57
+ zIndex: -1,
58
+ pointerEvents: "none"
87
59
  });
88
- export { Frame, Handle, Overlay, Sheet, createSheetScope };
60
+ const SheetHandle = createStyledHOC(SheetHandleFrame, ({ scope, ...props }, forwardedRef) => {
61
+ const context = useSheetContext(scope);
62
+ const composedRef = useComposedRefs(context.handleRef, forwardedRef);
63
+ const wasDraggingRef = useRef(false);
64
+ useEffect(() => {
65
+ if (!context.scrollBridge) return;
66
+ return context.scrollBridge.onParentDragging((isDragging) => {
67
+ if (isDragging) {
68
+ wasDraggingRef.current = true;
69
+ }
70
+ });
71
+ }, [context.scrollBridge]);
72
+ if (context.onlyShowContainer) {
73
+ return null;
74
+ }
75
+ return /* @__PURE__ */ jsx(SheetHandleFrame, {
76
+ ref: composedRef,
77
+ onPressIn: () => {
78
+ wasDraggingRef.current = false;
79
+ },
80
+ onPress: () => {
81
+ if (wasDraggingRef.current) {
82
+ wasDraggingRef.current = false;
83
+ return;
84
+ }
85
+ const max = context.snapPoints.length + (context.dismissOnSnapToBottom ? -1 : 0);
86
+ const nextPos = (context.position + 1) % max;
87
+ context.setPosition(nextPos);
88
+ },
89
+ open: context.open,
90
+ ...props
91
+ });
92
+ });
93
+ const SheetOverlay = createStyledHOC(SheetOverlayFrame, (propsIn, ref) => {
94
+ const { scope, ...props } = propsIn;
95
+ const context = useSheetContext(scope);
96
+ const isInOverlayLayer = useContext(SheetOverlayLayerContext);
97
+ const didWarn = useRef(false);
98
+ if (context.onlyShowContainer) {
99
+ return null;
100
+ }
101
+ if (!isInOverlayLayer) {
102
+ if (process.env.NODE_ENV === "development" && !didWarn.current) {
103
+ didWarn.current = true;
104
+ console.error("Sheet.Overlay must be a direct child of Sheet. Move it next to Sheet.Handle and Sheet.Container.");
105
+ }
106
+ return null;
107
+ }
108
+ return /* @__PURE__ */ jsx(SheetOverlayFrame, {
109
+ ...props,
110
+ ref,
111
+ onPress: composeEventHandlers(props.onPress, context.dismissOnOverlayPress ? () => {
112
+ context.setOpen(false);
113
+ } : void 0)
114
+ });
115
+ });
116
+ const SheetContainer = createStyledHOC(SheetContainerFrame, ({ scope, adjustPaddingForOffscreenContent, children, ...props }, forwardedRef) => {
117
+ const context = useSheetContext(scope);
118
+ const { hasFit, disableRemoveScroll, frameSize, contentRef, open } = context;
119
+ const composedContentRef = useComposedRefs(forwardedRef, contentRef);
120
+ const offscreenSize = useSheetOffscreenSize(context);
121
+ const stableFrameSize = useRef(frameSize);
122
+ useEffect(() => {
123
+ if (open && frameSize) {
124
+ stableFrameSize.current = frameSize;
125
+ }
126
+ }, [open, frameSize]);
127
+ const sheetContents = useMemo(() => {
128
+ const shouldUseFixedHeight = hasFit && !open && stableFrameSize.current;
129
+ return /* @__PURE__ */ jsxs(SheetContainerFrame, {
130
+ ref: composedContentRef,
131
+ flex: hasFit && open ? 0 : 1,
132
+ flexBasis: hasFit ? "auto" : void 0,
133
+ height: shouldUseFixedHeight ? stableFrameSize.current : hasFit ? void 0 : frameSize,
134
+ pointerEvents: open ? "auto" : "none",
135
+ "data-state": open ? "open" : "closed",
136
+ ...props,
137
+ children: [/* @__PURE__ */ jsx(StackZIndexContext, {
138
+ zIndex: resolveViewZIndex(props.zIndex),
139
+ children
140
+ }), adjustPaddingForOffscreenContent && /* @__PURE__ */ jsx(View, {
141
+ "data-sheet-offscreen-pad": true,
142
+ height: offscreenSize,
143
+ width: "100%"
144
+ })]
145
+ });
146
+ }, [
147
+ open,
148
+ props,
149
+ frameSize,
150
+ offscreenSize,
151
+ adjustPaddingForOffscreenContent,
152
+ hasFit
153
+ ]);
154
+ return /* @__PURE__ */ jsx(RemoveScroll, {
155
+ enabled: !disableRemoveScroll && context.open,
156
+ children: sheetContents
157
+ });
158
+ });
159
+ const SheetBackground = createStyledHOC(SheetBackgroundFrame, ({ scope, disableHideBottomOverflow, ...props }, forwardedRef) => {
160
+ const context = useSheetContext(scope);
161
+ const bottomOverflow = isWeb ? Math.max(context.frameSize, getMaxViewportHeight()) : context.frameSize;
162
+ return /* @__PURE__ */ jsx(SheetBackgroundFrame, {
163
+ ref: forwardedRef,
164
+ "data-sheet-background": "",
165
+ bottom: disableHideBottomOverflow ? 0 : -bottomOverflow,
166
+ ...props
167
+ });
168
+ });
169
+ const SheetRoot = createRefComponent(function SheetRoot2(props, ref) {
170
+ const hydrated = useDidFinishSSR();
171
+ const isAdapted = useAdaptIsActive();
172
+ const adaptContext = useAdaptContext();
173
+ const { isShowingNonSheet } = useSheetController(props.scope);
174
+ const shouldUseAdapt = Boolean(adaptContext.open !== void 0 || adaptContext.onOpenChange);
175
+ const isShowingAdaptNonSheet = shouldUseAdapt && !adaptContext.active && adaptContext.open;
176
+ let SheetImplementation = SheetImplementationCustom;
177
+ if (props.native) {
178
+ const impl = getNativeSheet("ios");
179
+ if (impl) {
180
+ SheetImplementation = impl;
181
+ }
182
+ }
183
+ if (isShowingAdaptNonSheet || isShowingNonSheet || !hydrated) {
184
+ return null;
185
+ }
186
+ const implementation = /* @__PURE__ */ jsx(SheetImplementation, {
187
+ ref,
188
+ ...props
189
+ });
190
+ return isAdapted ? /* @__PURE__ */ jsx(AdaptCapabilities, {
191
+ scroll: true,
192
+ overlay: true,
193
+ dismiss: true,
194
+ children: implementation
195
+ }) : implementation;
196
+ });
197
+ const sheetParts = {
198
+ Container: SheetContainer,
199
+ Background: SheetBackground,
200
+ Overlay: SheetOverlay,
201
+ Handle: SheetHandle,
202
+ ScrollView: SheetScrollView
203
+ };
204
+ const SheetControlled = withStaticProperties(SheetRoot, sheetParts);
205
+ const Sheet = withStaticProperties(SheetRoot, {
206
+ Root: SheetRoot,
207
+ Controlled: SheetControlled,
208
+ useAnimatedPosition,
209
+ ...sheetParts
210
+ });
211
+
212
+ export { Sheet, SheetBackground, SheetContainer, SheetControlled, SheetHandle, SheetOverlay, SheetRoot };
89
213
  //# sourceMappingURL=Sheet.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["styled","XStack","YStack","SHEET_HANDLE_NAME","SHEET_NAME","SHEET_OVERLAY_NAME","createSheet","createSheetScope","Handle","name","variants","open","true","opacity","pointerEvents","false","unstyled","height","borderRadius","backgroundColor","zIndex","marginHorizontal","marginBottom","hoverStyle","defaultVariants","process","env","TAMAGUI_HEADLESS","Overlay","fullscreen","position","Frame","flex","borderTopLeftRadius","borderTopRightRadius","width","maxHeight","overflow","Sheet"],"sources":["../../src/Sheet.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAA,QAAc;AACvB,SAASC,MAAA,EAAQC,MAAA,QAAc;AAE/B,SAASC,iBAAA,EAAmBC,UAAA,EAAYC,kBAAA,QAA0B;AAClE,SAASC,WAAA,QAAmB;AAE5B,SAASC,gBAAA,QAAwB;AACjC,cAAc;AAMP,MAAMC,MAAA,GAASR,MAAA,CAAOC,MAAA,EAAQ;EACnCQ,IAAA,EAAMN,iBAAA;EAENO,QAAA,EAAU;IACRC,IAAA,EAAM;MACJC,IAAA,EAAM;QACJC,OAAA,EAAS;QACTC,aAAA,EAAe;MACjB;MACAC,KAAA,EAAO;QACLF,OAAA,EAAS;QACTC,aAAA,EAAe;MACjB;IACF;IAEAE,QAAA,EAAU;MACRD,KAAA,EAAO;QACLE,MAAA,EAAQ;QACRC,YAAA,EAAc;QACdC,eAAA,EAAiB;QACjBC,MAAA,EAAQ;QACRC,gBAAA,EAAkB;QAClBC,YAAA,EAAc;QACdT,OAAA,EAAS;QAETU,UAAA,EAAY;UACVV,OAAA,EAAS;QACX;MACF;IACF;EACF;EAEAW,eAAA,EAAiB;IACfR,QAAA,EAAUS,OAAA,CAAQC,GAAA,CAAIC,gBAAA,KAAqB;EAC7C;AACF,CAAC;AAMM,MAAMC,OAAA,GAAU5B,MAAA,CAAOE,MAAA,EAAQ;EACpCO,IAAA,EAAMJ,kBAAA;EAENK,QAAA,EAAU;IACRC,IAAA,EAAM;MACJC,IAAA,EAAM;QACJE,aAAA,EAAe;MACjB;MACAC,KAAA,EAAO;QACLD,aAAA,EAAe;MACjB;IACF;IAEAE,QAAA,EAAU;MACRD,KAAA,EAAO;QACLc,UAAA,EAAY;QACZC,QAAA,EAAU;QACVX,eAAA,EAAiB;QACjBC,MAAA,EAAQ,MAAU;QAClBN,aAAA,EAAe;MACjB;IACF;EACF;EAEAU,eAAA,EAAiB;IACfR,QAAA,EAAUS,OAAA,CAAQC,GAAA,CAAIC,gBAAA,KAAqB;EAC7C;AACF,CAAC;AAMM,MAAMI,KAAA,GAAQ/B,MAAA,CAAOE,MAAA,EAAQ;EAClCO,IAAA,EAAML,UAAA;EAENM,QAAA,EAAU;IACRM,QAAA,EAAU;MACRD,KAAA,EAAO;QACLiB,IAAA,EAAM;QACNb,eAAA,EAAiB;QACjBc,mBAAA,EAAqB;QACrBC,oBAAA,EAAsB;QACtBC,KAAA,EAAO;QACPC,SAAA,EAAW;QACXC,QAAA,EAAU;MACZ;IACF;EACF;EAEAb,eAAA,EAAiB;IACfR,QAAA,EAAUS,OAAA,CAAQC,GAAA,CAAIC,gBAAA,KAAqB;EAC7C;AACF,CAAC;AAEM,MAAMW,KAAA,GAAQhC,WAAA,CAAY;EAC/ByB,KAAA;EACAvB,MAAA;EACAoB;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Sheet.js","names":[],"sources":["jsx/Sheet.js"],"sourcesContent":["import { AdaptCapabilities, useAdaptContext, useAdaptIsActive } from \"@tamagui/adapt\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb } from \"@tamagui/constants\";\nimport {\n createRefComponent,\n createStyledHOC,\n styled,\n View\n} from \"@tamagui/core\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport { resolveViewZIndex } from \"@tamagui/portal\";\nimport { RemoveScroll } from \"@tamagui/remove-scroll\";\nimport { XStack, YStack } from \"@tamagui/stacks\";\nimport { useDidFinishSSR } from \"@tamagui/use-did-finish-ssr\";\nimport { StackZIndexContext } from \"@tamagui/z-index-stack\";\nimport { useContext, useEffect, useMemo, useRef } from \"react\";\nimport {\n SHEET_BACKGROUND_NAME,\n SHEET_CONTAINER_NAME,\n SHEET_HANDLE_NAME,\n SHEET_OVERLAY_MARKER,\n SHEET_OVERLAY_NAME\n} from \"./constants\";\nimport { getNativeSheet } from \"./nativeSheet\";\nimport {\n SheetOverlayLayerContext,\n useAnimatedPosition,\n useSheetContext\n} from \"./SheetContext\";\nimport { SheetImplementationCustom } from \"./SheetImplementationCustom\";\nimport { SheetScrollView } from \"./SheetScrollView\";\nimport { useSheetController } from \"./useSheetController\";\nimport { useSheetOffscreenSize } from \"./useSheetOffscreenSize\";\nimport { getMaxViewportHeight } from \"./webViewport\";\nexport * from \"./types\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nconst SheetHandleFrame = styled(XStack, {\n displayName: SHEET_HANDLE_NAME,\n // the behavior Handle ships no opacity rules; open/close aesthetics (fade in\n // when open, dim when idle) live in the copied skin. see the canonical skin.\n variants: {\n open: {\n true: {\n pointerEvents: \"auto\"\n },\n false: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nconst SheetOverlayFrame = styled(YStack, {\n displayName: SHEET_OVERLAY_NAME,\n inset: 0,\n position: \"absolute\",\n zIndex: 1e5 - 1,\n pointerEvents: \"auto\",\n variants: {\n open: {\n true: {\n pointerEvents: \"auto\"\n },\n false: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nObject.assign(SheetOverlayFrame.staticConfig, { [SHEET_OVERLAY_MARKER]: true });\nconst SheetContainerFrame = styled(YStack, {\n displayName: SHEET_CONTAINER_NAME,\n flex: 1,\n position: \"relative\",\n zIndex: 0,\n width: \"100%\",\n maxHeight: \"100%\"\n});\nconst SheetBackgroundFrame = styled(YStack, {\n displayName: SHEET_BACKGROUND_NAME,\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n zIndex: -1,\n pointerEvents: \"none\"\n});\nconst SheetHandle = createStyledHOC(\n SheetHandleFrame,\n ({ scope, ...props }, forwardedRef) => {\n const context = useSheetContext(scope);\n const composedRef = useComposedRefs(context.handleRef, forwardedRef);\n const wasDraggingRef = useRef(false);\n useEffect(() => {\n if (!context.scrollBridge) return;\n return context.scrollBridge.onParentDragging((isDragging) => {\n if (isDragging) {\n wasDraggingRef.current = true;\n }\n });\n }, [context.scrollBridge]);\n if (context.onlyShowContainer) {\n return null;\n }\n return /* @__PURE__ */ jsx(\n SheetHandleFrame,\n {\n ref: composedRef,\n onPressIn: () => {\n wasDraggingRef.current = false;\n },\n onPress: () => {\n if (wasDraggingRef.current) {\n wasDraggingRef.current = false;\n return;\n }\n const max = context.snapPoints.length + (context.dismissOnSnapToBottom ? -1 : 0);\n const nextPos = (context.position + 1) % max;\n context.setPosition(nextPos);\n },\n open: context.open,\n ...props\n }\n );\n }\n);\nconst SheetOverlay = createStyledHOC(\n SheetOverlayFrame,\n (propsIn, ref) => {\n const { scope, ...props } = propsIn;\n const context = useSheetContext(scope);\n const isInOverlayLayer = useContext(SheetOverlayLayerContext);\n const didWarn = useRef(false);\n if (context.onlyShowContainer) {\n return null;\n }\n if (!isInOverlayLayer) {\n if (process.env.NODE_ENV === \"development\" && !didWarn.current) {\n didWarn.current = true;\n console.error(\n \"Sheet.Overlay must be a direct child of Sheet. Move it next to Sheet.Handle and Sheet.Container.\"\n );\n }\n return null;\n }\n return /* @__PURE__ */ jsx(\n SheetOverlayFrame,\n {\n ...props,\n ref,\n onPress: composeEventHandlers(\n props.onPress,\n context.dismissOnOverlayPress ? () => {\n context.setOpen(false);\n } : void 0\n )\n }\n );\n }\n);\nconst SheetContainer = createStyledHOC(\n SheetContainerFrame,\n ({\n scope,\n adjustPaddingForOffscreenContent,\n children,\n ...props\n }, forwardedRef) => {\n const context = useSheetContext(scope);\n const { hasFit, disableRemoveScroll, frameSize, contentRef, open } = context;\n const composedContentRef = useComposedRefs(forwardedRef, contentRef);\n const offscreenSize = useSheetOffscreenSize(context);\n const stableFrameSize = useRef(frameSize);\n useEffect(() => {\n if (open && frameSize) {\n stableFrameSize.current = frameSize;\n }\n }, [open, frameSize]);\n const sheetContents = useMemo(() => {\n const shouldUseFixedHeight = hasFit && !open && stableFrameSize.current;\n return /* @__PURE__ */ jsxs(\n SheetContainerFrame,\n {\n ref: composedContentRef,\n flex: hasFit && open ? 0 : 1,\n flexBasis: hasFit ? \"auto\" : void 0,\n height: shouldUseFixedHeight ? stableFrameSize.current : hasFit ? void 0 : frameSize,\n pointerEvents: open ? \"auto\" : \"none\",\n \"data-state\": open ? \"open\" : \"closed\",\n ...props,\n children: [\n /* @__PURE__ */ jsx(StackZIndexContext, { zIndex: resolveViewZIndex(props.zIndex), children }),\n adjustPaddingForOffscreenContent && /* @__PURE__ */ jsx(View, { \"data-sheet-offscreen-pad\": true, height: offscreenSize, width: \"100%\" })\n ]\n }\n );\n }, [open, props, frameSize, offscreenSize, adjustPaddingForOffscreenContent, hasFit]);\n return /* @__PURE__ */ jsx(RemoveScroll, { enabled: !disableRemoveScroll && context.open, children: sheetContents });\n }\n);\nconst SheetBackground = createStyledHOC(\n SheetBackgroundFrame,\n ({ scope, disableHideBottomOverflow, ...props }, forwardedRef) => {\n const context = useSheetContext(scope);\n const bottomOverflow = isWeb ? Math.max(context.frameSize, getMaxViewportHeight()) : context.frameSize;\n return /* @__PURE__ */ jsx(\n SheetBackgroundFrame,\n {\n ref: forwardedRef,\n \"data-sheet-background\": \"\",\n bottom: disableHideBottomOverflow ? 0 : -bottomOverflow,\n ...props\n }\n );\n }\n);\nconst SheetRoot = createRefComponent(\n function SheetRoot2(props, ref) {\n const hydrated = useDidFinishSSR();\n const isAdapted = useAdaptIsActive();\n const adaptContext = useAdaptContext();\n const { isShowingNonSheet } = useSheetController(props.scope);\n const shouldUseAdapt = Boolean(\n adaptContext.open !== void 0 || adaptContext.onOpenChange\n );\n const isShowingAdaptNonSheet = shouldUseAdapt && !adaptContext.active && adaptContext.open;\n let SheetImplementation = SheetImplementationCustom;\n if (props.native) {\n const impl = getNativeSheet(\"ios\");\n if (impl) {\n SheetImplementation = impl;\n }\n }\n if (isShowingAdaptNonSheet || isShowingNonSheet || !hydrated) {\n return null;\n }\n const implementation = /* @__PURE__ */ jsx(SheetImplementation, { ref, ...props });\n return isAdapted ? /* @__PURE__ */ jsx(AdaptCapabilities, { scroll: true, overlay: true, dismiss: true, children: implementation }) : implementation;\n }\n);\nconst sheetParts = {\n Container: SheetContainer,\n Background: SheetBackground,\n Overlay: SheetOverlay,\n Handle: SheetHandle,\n ScrollView: SheetScrollView\n};\nconst SheetControlled = withStaticProperties(\n SheetRoot,\n sheetParts\n);\nconst Sheet = withStaticProperties(SheetRoot, {\n Root: SheetRoot,\n Controlled: SheetControlled,\n useAnimatedPosition,\n ...sheetParts\n});\nexport {\n Sheet,\n SheetBackground,\n SheetContainer,\n SheetControlled,\n SheetHandle,\n SheetOverlay,\n SheetRoot\n};\n//# sourceMappingURL=Sheet.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,mBAAmB,OAAO,QAAQ;CACtC,aAAa;CAGb,UAAU,EACR,MAAM;EACJ,MAAM,EACJ,eAAe,OACjB;EACA,OAAO,EACL,eAAe,OACjB;CACF,EACF;AACF,CAAC;AACD,MAAM,oBAAoB,OAAO,QAAQ;CACvC,aAAa;CACb,OAAO;CACP,UAAU;CACV,QAAQ,MAAM;CACd,eAAe;CACf,UAAU,EACR,MAAM;EACJ,MAAM,EACJ,eAAe,OACjB;EACA,OAAO,EACL,eAAe,OACjB;CACF,EACF;AACF,CAAC;AACD,OAAO,OAAO,kBAAkB,cAAc,GAAG,uBAAuB,KAAK,CAAC;AAC9E,MAAM,sBAAsB,OAAO,QAAQ;CACzC,aAAa;CACb,MAAM;CACN,UAAU;CACV,QAAQ;CACR,OAAO;CACP,WAAW;AACb,CAAC;AACD,MAAM,uBAAuB,OAAO,QAAQ;CAC1C,aAAa;CACb,UAAU;CACV,KAAK;CACL,MAAM;CACN,OAAO;CACP,QAAQ,CAAC;CACT,eAAe;AACjB,CAAC;AACD,MAAM,cAAc,gBAClB,mBACC,EAAE,OAAO,GAAG,SAAS,iBAAiB;CACrC,MAAM,UAAU,gBAAgB,KAAK;CACrC,MAAM,cAAc,gBAAgB,QAAQ,WAAW,YAAY;CACnE,MAAM,iBAAiB,OAAO,KAAK;CACnC,gBAAgB;EACd,IAAI,CAAC,QAAQ,cAAc;EAC3B,OAAO,QAAQ,aAAa,kBAAkB,eAAe;GAC3D,IAAI,YAAY;IACd,eAAe,UAAU;GAC3B;EACF,CAAC;CACH,GAAG,CAAC,QAAQ,YAAY,CAAC;CACzB,IAAI,QAAQ,mBAAmB;EAC7B,OAAO;CACT;CACA,OAAuB,oBACrB,kBACA;EACE,KAAK;EACL,iBAAiB;GACf,eAAe,UAAU;EAC3B;EACA,eAAe;GACb,IAAI,eAAe,SAAS;IAC1B,eAAe,UAAU;IACzB;GACF;GACA,MAAM,MAAM,QAAQ,WAAW,UAAU,QAAQ,wBAAwB,CAAC,IAAI;GAC9E,MAAM,WAAW,QAAQ,WAAW,KAAK;GACzC,QAAQ,YAAY,OAAO;EAC7B;EACA,MAAM,QAAQ;EACd,GAAG;CACL,CACF;AACF,CACF;AACA,MAAM,eAAe,gBACnB,oBACC,SAAS,QAAQ;CAChB,MAAM,EAAE,OAAO,GAAG,UAAU;CAC5B,MAAM,UAAU,gBAAgB,KAAK;CACrC,MAAM,mBAAmB,WAAW,wBAAwB;CAC5D,MAAM,UAAU,OAAO,KAAK;CAC5B,IAAI,QAAQ,mBAAmB;EAC7B,OAAO;CACT;CACA,IAAI,CAAC,kBAAkB;EACrB,IAAI,QAAQ,IAAI,aAAa,iBAAiB,CAAC,QAAQ,SAAS;GAC9D,QAAQ,UAAU;GAClB,QAAQ,MACN,kGACF;EACF;EACA,OAAO;CACT;CACA,OAAuB,oBACrB,mBACA;EACE,GAAG;EACH;EACA,SAAS,qBACP,MAAM,SACN,QAAQ,8BAA8B;GACpC,QAAQ,QAAQ,KAAK;EACvB,IAAI,KAAK,CACX;CACF,CACF;AACF,CACF;AACA,MAAM,iBAAiB,gBACrB,sBACC,EACC,OACA,kCACA,UACA,GAAG,SACF,iBAAiB;CAClB,MAAM,UAAU,gBAAgB,KAAK;CACrC,MAAM,EAAE,QAAQ,qBAAqB,WAAW,YAAY,SAAS;CACrE,MAAM,qBAAqB,gBAAgB,cAAc,UAAU;CACnE,MAAM,gBAAgB,sBAAsB,OAAO;CACnD,MAAM,kBAAkB,OAAO,SAAS;CACxC,gBAAgB;EACd,IAAI,QAAQ,WAAW;GACrB,gBAAgB,UAAU;EAC5B;CACF,GAAG,CAAC,MAAM,SAAS,CAAC;CACpB,MAAM,gBAAgB,cAAc;EAClC,MAAM,uBAAuB,UAAU,CAAC,QAAQ,gBAAgB;EAChE,OAAuB,qBACrB,qBACA;GACE,KAAK;GACL,MAAM,UAAU,OAAO,IAAI;GAC3B,WAAW,SAAS,SAAS,KAAK;GAClC,QAAQ,uBAAuB,gBAAgB,UAAU,SAAS,KAAK,IAAI;GAC3E,eAAe,OAAO,SAAS;GAC/B,cAAc,OAAO,SAAS;GAC9B,GAAG;GACH,UAAU,CACQ,oBAAI,oBAAoB;IAAE,QAAQ,kBAAkB,MAAM,MAAM;IAAG;GAAS,CAAC,GAC7F,oCAAoD,oBAAI,MAAM;IAAE,4BAA4B;IAAM,QAAQ;IAAe,OAAO;GAAO,CAAC,CAC1I;EACF,CACF;CACF,GAAG;EAAC;EAAM;EAAO;EAAW;EAAe;EAAkC;CAAM,CAAC;CACpF,OAAuB,oBAAI,cAAc;EAAE,SAAS,CAAC,uBAAuB,QAAQ;EAAM,UAAU;CAAc,CAAC;AACrH,CACF;AACA,MAAM,kBAAkB,gBACtB,uBACC,EAAE,OAAO,2BAA2B,GAAG,SAAS,iBAAiB;CAChE,MAAM,UAAU,gBAAgB,KAAK;CACrC,MAAM,iBAAiB,QAAQ,KAAK,IAAI,QAAQ,WAAW,qBAAqB,CAAC,IAAI,QAAQ;CAC7F,OAAuB,oBACrB,sBACA;EACE,KAAK;EACL,yBAAyB;EACzB,QAAQ,4BAA4B,IAAI,CAAC;EACzC,GAAG;CACL,CACF;AACF,CACF;AACA,MAAM,YAAY,mBAChB,SAAS,WAAW,OAAO,KAAK;CAC9B,MAAM,WAAW,gBAAgB;CACjC,MAAM,YAAY,iBAAiB;CACnC,MAAM,eAAe,gBAAgB;CACrC,MAAM,EAAE,sBAAsB,mBAAmB,MAAM,KAAK;CAC5D,MAAM,iBAAiB,QACrB,aAAa,SAAS,KAAK,KAAK,aAAa,YAC/C;CACA,MAAM,yBAAyB,kBAAkB,CAAC,aAAa,UAAU,aAAa;CACtF,IAAI,sBAAsB;CAC1B,IAAI,MAAM,QAAQ;EAChB,MAAM,OAAO,eAAe,KAAK;EACjC,IAAI,MAAM;GACR,sBAAsB;EACxB;CACF;CACA,IAAI,0BAA0B,qBAAqB,CAAC,UAAU;EAC5D,OAAO;CACT;CACA,MAAM,iBAAiC,oBAAI,qBAAqB;EAAE;EAAK,GAAG;CAAM,CAAC;CACjF,OAAO,YAA4B,oBAAI,mBAAmB;EAAE,QAAQ;EAAM,SAAS;EAAM,SAAS;EAAM,UAAU;CAAe,CAAC,IAAI;AACxI,CACF;AACA,MAAM,aAAa;CACjB,WAAW;CACX,YAAY;CACZ,SAAS;CACT,QAAQ;CACR,YAAY;AACd;AACA,MAAM,kBAAkB,qBACtB,WACA,UACF;AACA,MAAM,QAAQ,qBAAqB,WAAW;CAC5C,MAAM;CACN,YAAY;CACZ;CACA,GAAG;AACL,CAAC"}