@tamagui/sheet 2.7.7 → 3.0.0-beta.643.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 (435) hide show
  1. package/dist/cjs/GestureDetectorWrapper.cjs +32 -41
  2. package/dist/cjs/GestureDetectorWrapper.native.cjs +48 -0
  3. package/dist/cjs/GestureDetectorWrapper.native.js +32 -40
  4. package/dist/cjs/GestureDetectorWrapper.native.js.map +1 -1
  5. package/dist/cjs/GestureSheetContext.cjs +29 -37
  6. package/dist/cjs/GestureSheetContext.native.cjs +49 -0
  7. package/dist/cjs/GestureSheetContext.native.js +30 -37
  8. package/dist/cjs/GestureSheetContext.native.js.map +1 -1
  9. package/dist/cjs/Sheet.cjs +206 -99
  10. package/dist/cjs/Sheet.native.cjs +234 -0
  11. package/dist/cjs/Sheet.native.js +212 -98
  12. package/dist/cjs/Sheet.native.js.map +1 -1
  13. package/dist/cjs/SheetContext.cjs +44 -22
  14. package/dist/cjs/SheetContext.native.cjs +58 -0
  15. package/dist/cjs/SheetContext.native.js +45 -22
  16. package/dist/cjs/SheetContext.native.js.map +1 -1
  17. package/dist/cjs/SheetController.cjs +50 -56
  18. package/dist/cjs/SheetController.native.cjs +72 -0
  19. package/dist/cjs/SheetController.native.js +53 -58
  20. package/dist/cjs/SheetController.native.js.map +1 -1
  21. package/dist/cjs/SheetImplementationCustom.cjs +674 -605
  22. package/dist/cjs/SheetImplementationCustom.native.cjs +762 -0
  23. package/dist/cjs/SheetImplementationCustom.native.js +713 -644
  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 +22 -21
  30. package/dist/cjs/constants.native.cjs +37 -0
  31. package/dist/cjs/constants.native.js +22 -20
  32. package/dist/cjs/constants.native.js.map +1 -1
  33. package/dist/cjs/contexts.cjs +20 -28
  34. package/dist/cjs/contexts.native.cjs +38 -0
  35. package/dist/cjs/contexts.native.js +20 -27
  36. package/dist/cjs/contexts.native.js.map +1 -1
  37. package/dist/cjs/controller.cjs +17 -18
  38. package/dist/cjs/controller.native.cjs +32 -0
  39. package/dist/cjs/controller.native.js +17 -17
  40. package/dist/cjs/controller.native.js.map +1 -1
  41. package/dist/cjs/gestureState.cjs +29 -30
  42. package/dist/cjs/gestureState.native.cjs +54 -0
  43. package/dist/cjs/gestureState.native.js +30 -30
  44. package/dist/cjs/gestureState.native.js.map +1 -1
  45. package/dist/cjs/helpers.cjs +21 -24
  46. package/dist/cjs/helpers.native.cjs +35 -0
  47. package/dist/cjs/helpers.native.js +22 -24
  48. package/dist/cjs/helpers.native.js.map +1 -1
  49. package/dist/cjs/index.cjs +15 -21
  50. package/dist/cjs/index.native.cjs +37 -0
  51. package/dist/cjs/index.native.js +16 -21
  52. package/dist/cjs/index.native.js.map +1 -1
  53. package/dist/cjs/keyboardAvoidance.cjs +56 -79
  54. package/dist/cjs/keyboardAvoidance.native.cjs +75 -0
  55. package/dist/cjs/keyboardAvoidance.native.js +56 -78
  56. package/dist/cjs/keyboardAvoidance.native.js.map +1 -1
  57. package/dist/cjs/nativeSheet.cjs +64 -76
  58. package/dist/cjs/nativeSheet.native.cjs +94 -0
  59. package/dist/cjs/nativeSheet.native.js +70 -83
  60. package/dist/cjs/nativeSheet.native.js.map +1 -1
  61. package/dist/cjs/types.cjs +10 -11
  62. package/dist/cjs/types.native.cjs +19 -0
  63. package/dist/cjs/types.native.js +10 -10
  64. package/dist/cjs/types.native.js.map +1 -1
  65. package/dist/cjs/useGestureHandlerPan.cjs +245 -257
  66. package/dist/cjs/useGestureHandlerPan.native.cjs +273 -0
  67. package/dist/cjs/useGestureHandlerPan.native.js +254 -265
  68. package/dist/cjs/useGestureHandlerPan.native.js.map +1 -1
  69. package/dist/cjs/useKeyboardControllerSheet.cjs +83 -88
  70. package/dist/cjs/useKeyboardControllerSheet.native.cjs +119 -0
  71. package/dist/cjs/useKeyboardControllerSheet.native.js +100 -111
  72. package/dist/cjs/useKeyboardControllerSheet.native.js.map +1 -1
  73. package/dist/cjs/useSafeAreaInsets.cjs +20 -26
  74. package/dist/cjs/useSafeAreaInsets.native.cjs +51 -0
  75. package/dist/cjs/useSafeAreaInsets.native.js +30 -25
  76. package/dist/cjs/useSafeAreaInsets.native.js.map +1 -1
  77. package/dist/cjs/useSheetController.cjs +27 -39
  78. package/dist/cjs/useSheetController.native.cjs +42 -0
  79. package/dist/cjs/useSheetController.native.js +28 -39
  80. package/dist/cjs/useSheetController.native.js.map +1 -1
  81. package/dist/cjs/useSheetOffscreenSize.cjs +44 -53
  82. package/dist/cjs/useSheetOffscreenSize.native.cjs +60 -0
  83. package/dist/cjs/useSheetOffscreenSize.native.js +48 -56
  84. package/dist/cjs/useSheetOffscreenSize.native.js.map +1 -1
  85. package/dist/cjs/useSheetOpenState.cjs +69 -40
  86. package/dist/cjs/useSheetOpenState.native.cjs +88 -0
  87. package/dist/cjs/useSheetOpenState.native.js +74 -42
  88. package/dist/cjs/useSheetOpenState.native.js.map +1 -1
  89. package/dist/cjs/useSheetProviderProps.cjs +146 -164
  90. package/dist/cjs/useSheetProviderProps.native.cjs +176 -0
  91. package/dist/cjs/useSheetProviderProps.native.js +156 -174
  92. package/dist/cjs/useSheetProviderProps.native.js.map +1 -1
  93. package/dist/cjs/useSheetScrollViewGestures.cjs +172 -180
  94. package/dist/cjs/useSheetScrollViewGestures.native.cjs +150 -0
  95. package/dist/cjs/useSheetScrollViewGestures.native.js +136 -147
  96. package/dist/cjs/useSheetScrollViewGestures.native.js.map +1 -1
  97. package/dist/cjs/webViewport.cjs +47 -48
  98. package/dist/cjs/webViewport.native.cjs +79 -0
  99. package/dist/cjs/webViewport.native.js +50 -50
  100. package/dist/cjs/webViewport.native.js.map +1 -1
  101. package/dist/esm/GestureDetectorWrapper.mjs +19 -23
  102. package/dist/esm/GestureDetectorWrapper.mjs.map +1 -1
  103. package/dist/esm/GestureDetectorWrapper.native.js +20 -24
  104. package/dist/esm/GestureDetectorWrapper.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 +191 -83
  110. package/dist/esm/Sheet.mjs.map +1 -1
  111. package/dist/esm/Sheet.native.js +198 -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/SheetImplementationCustom.mjs +655 -580
  122. package/dist/esm/SheetImplementationCustom.mjs.map +1 -1
  123. package/dist/esm/SheetImplementationCustom.native.js +691 -612
  124. package/dist/esm/SheetImplementationCustom.native.js.map +1 -1
  125. package/dist/esm/SheetScrollView.mjs +277 -288
  126. package/dist/esm/SheetScrollView.mjs.map +1 -1
  127. package/dist/esm/SheetScrollView.native.js +286 -297
  128. package/dist/esm/SheetScrollView.native.js.map +1 -1
  129. package/dist/esm/constants.mjs +5 -3
  130. package/dist/esm/constants.mjs.map +1 -1
  131. package/dist/esm/constants.native.js +5 -3
  132. package/dist/esm/constants.native.js.map +1 -1
  133. package/dist/esm/contexts.mjs +3 -3
  134. package/dist/esm/contexts.mjs.map +1 -1
  135. package/dist/esm/contexts.native.js +3 -3
  136. package/dist/esm/contexts.native.js.map +1 -1
  137. package/dist/esm/controller.mjs +2 -2
  138. package/dist/esm/controller.native.js +2 -2
  139. package/dist/esm/gestureState.mjs +13 -11
  140. package/dist/esm/gestureState.mjs.map +1 -1
  141. package/dist/esm/gestureState.native.js +14 -12
  142. package/dist/esm/gestureState.native.js.map +1 -1
  143. package/dist/esm/helpers.mjs +7 -6
  144. package/dist/esm/helpers.mjs.map +1 -1
  145. package/dist/esm/helpers.native.js +8 -7
  146. package/dist/esm/helpers.native.js.map +1 -1
  147. package/dist/esm/index.js +21 -14
  148. package/dist/esm/index.mjs +21 -14
  149. package/dist/esm/index.native.js +21 -14
  150. package/dist/esm/keyboardAvoidance.mjs +40 -61
  151. package/dist/esm/keyboardAvoidance.mjs.map +1 -1
  152. package/dist/esm/keyboardAvoidance.native.js +40 -61
  153. package/dist/esm/keyboardAvoidance.native.js.map +1 -1
  154. package/dist/esm/nativeSheet.mjs +52 -61
  155. package/dist/esm/nativeSheet.mjs.map +1 -1
  156. package/dist/esm/nativeSheet.native.js +58 -69
  157. package/dist/esm/nativeSheet.native.js.map +1 -1
  158. package/dist/esm/types.mjs +0 -2
  159. package/dist/esm/types.native.js +0 -2
  160. package/dist/esm/useGestureHandlerPan.mjs +232 -239
  161. package/dist/esm/useGestureHandlerPan.mjs.map +1 -1
  162. package/dist/esm/useGestureHandlerPan.native.js +241 -248
  163. package/dist/esm/useGestureHandlerPan.native.js.map +1 -1
  164. package/dist/esm/useKeyboardControllerSheet.mjs +71 -71
  165. package/dist/esm/useKeyboardControllerSheet.mjs.map +1 -1
  166. package/dist/esm/useKeyboardControllerSheet.native.js +92 -94
  167. package/dist/esm/useKeyboardControllerSheet.native.js.map +1 -1
  168. package/dist/esm/useSafeAreaInsets.mjs +3 -1
  169. package/dist/esm/useSafeAreaInsets.mjs.map +1 -1
  170. package/dist/esm/useSafeAreaInsets.native.js +15 -3
  171. package/dist/esm/useSafeAreaInsets.native.js.map +1 -1
  172. package/dist/esm/useSheetController.mjs +14 -12
  173. package/dist/esm/useSheetController.mjs.map +1 -1
  174. package/dist/esm/useSheetController.native.js +14 -12
  175. package/dist/esm/useSheetController.native.js.map +1 -1
  176. package/dist/esm/useSheetOffscreenSize.mjs +30 -35
  177. package/dist/esm/useSheetOffscreenSize.mjs.map +1 -1
  178. package/dist/esm/useSheetOffscreenSize.native.js +34 -39
  179. package/dist/esm/useSheetOffscreenSize.native.js.map +1 -1
  180. package/dist/esm/useSheetOpenState.mjs +50 -22
  181. package/dist/esm/useSheetOpenState.mjs.map +1 -1
  182. package/dist/esm/useSheetOpenState.native.js +55 -25
  183. package/dist/esm/useSheetOpenState.native.js.map +1 -1
  184. package/dist/esm/useSheetProviderProps.mjs +130 -138
  185. package/dist/esm/useSheetProviderProps.mjs.map +1 -1
  186. package/dist/esm/useSheetProviderProps.native.js +140 -149
  187. package/dist/esm/useSheetProviderProps.native.js.map +1 -1
  188. package/dist/esm/useSheetScrollViewGestures.mjs +159 -162
  189. package/dist/esm/useSheetScrollViewGestures.mjs.map +1 -1
  190. package/dist/esm/useSheetScrollViewGestures.native.js +123 -130
  191. package/dist/esm/useSheetScrollViewGestures.native.js.map +1 -1
  192. package/dist/esm/webViewport.mjs +26 -25
  193. package/dist/esm/webViewport.mjs.map +1 -1
  194. package/dist/esm/webViewport.native.js +29 -28
  195. package/dist/esm/webViewport.native.js.map +1 -1
  196. package/dist/jsx/GestureDetectorWrapper.mjs +19 -23
  197. package/dist/jsx/GestureDetectorWrapper.mjs.map +1 -1
  198. package/dist/jsx/GestureDetectorWrapper.native.cjs +48 -0
  199. package/dist/jsx/GestureDetectorWrapper.native.js +32 -40
  200. package/dist/jsx/GestureDetectorWrapper.native.js.map +1 -1
  201. package/dist/jsx/GestureSheetContext.mjs +15 -20
  202. package/dist/jsx/GestureSheetContext.mjs.map +1 -1
  203. package/dist/jsx/GestureSheetContext.native.cjs +49 -0
  204. package/dist/jsx/GestureSheetContext.native.js +30 -37
  205. package/dist/jsx/GestureSheetContext.native.js.map +1 -1
  206. package/dist/jsx/Sheet.mjs +191 -83
  207. package/dist/jsx/Sheet.mjs.map +1 -1
  208. package/dist/jsx/Sheet.native.cjs +234 -0
  209. package/dist/jsx/Sheet.native.js +212 -98
  210. package/dist/jsx/Sheet.native.js.map +1 -1
  211. package/dist/jsx/SheetContext.mjs +21 -5
  212. package/dist/jsx/SheetContext.mjs.map +1 -1
  213. package/dist/jsx/SheetContext.native.cjs +58 -0
  214. package/dist/jsx/SheetContext.native.js +45 -22
  215. package/dist/jsx/SheetContext.native.js.map +1 -1
  216. package/dist/jsx/SheetController.mjs +34 -30
  217. package/dist/jsx/SheetController.mjs.map +1 -1
  218. package/dist/jsx/SheetController.native.cjs +72 -0
  219. package/dist/jsx/SheetController.native.js +53 -58
  220. package/dist/jsx/SheetController.native.js.map +1 -1
  221. package/dist/jsx/SheetImplementationCustom.mjs +655 -580
  222. package/dist/jsx/SheetImplementationCustom.mjs.map +1 -1
  223. package/dist/jsx/SheetImplementationCustom.native.cjs +762 -0
  224. package/dist/jsx/SheetImplementationCustom.native.js +713 -644
  225. package/dist/jsx/SheetImplementationCustom.native.js.map +1 -1
  226. package/dist/jsx/SheetScrollView.mjs +277 -288
  227. package/dist/jsx/SheetScrollView.mjs.map +1 -1
  228. package/dist/jsx/SheetScrollView.native.cjs +326 -0
  229. package/dist/jsx/SheetScrollView.native.js +299 -319
  230. package/dist/jsx/SheetScrollView.native.js.map +1 -1
  231. package/dist/jsx/constants.mjs +5 -3
  232. package/dist/jsx/constants.mjs.map +1 -1
  233. package/dist/jsx/constants.native.cjs +37 -0
  234. package/dist/jsx/constants.native.js +22 -20
  235. package/dist/jsx/constants.native.js.map +1 -1
  236. package/dist/jsx/contexts.mjs +3 -3
  237. package/dist/jsx/contexts.mjs.map +1 -1
  238. package/dist/jsx/contexts.native.cjs +38 -0
  239. package/dist/jsx/contexts.native.js +20 -27
  240. package/dist/jsx/contexts.native.js.map +1 -1
  241. package/dist/jsx/controller.mjs +2 -2
  242. package/dist/jsx/controller.native.cjs +32 -0
  243. package/dist/jsx/controller.native.js +17 -17
  244. package/dist/jsx/controller.native.js.map +1 -1
  245. package/dist/jsx/gestureState.mjs +13 -11
  246. package/dist/jsx/gestureState.mjs.map +1 -1
  247. package/dist/jsx/gestureState.native.cjs +54 -0
  248. package/dist/jsx/gestureState.native.js +30 -30
  249. package/dist/jsx/gestureState.native.js.map +1 -1
  250. package/dist/jsx/helpers.mjs +7 -6
  251. package/dist/jsx/helpers.mjs.map +1 -1
  252. package/dist/jsx/helpers.native.cjs +35 -0
  253. package/dist/jsx/helpers.native.js +22 -24
  254. package/dist/jsx/helpers.native.js.map +1 -1
  255. package/dist/jsx/index.js +21 -14
  256. package/dist/jsx/index.mjs +21 -14
  257. package/dist/jsx/index.native.cjs +37 -0
  258. package/dist/jsx/index.native.js +16 -21
  259. package/dist/jsx/index.native.js.map +1 -1
  260. package/dist/jsx/keyboardAvoidance.mjs +40 -61
  261. package/dist/jsx/keyboardAvoidance.mjs.map +1 -1
  262. package/dist/jsx/keyboardAvoidance.native.cjs +75 -0
  263. package/dist/jsx/keyboardAvoidance.native.js +56 -78
  264. package/dist/jsx/keyboardAvoidance.native.js.map +1 -1
  265. package/dist/jsx/nativeSheet.mjs +52 -61
  266. package/dist/jsx/nativeSheet.mjs.map +1 -1
  267. package/dist/jsx/nativeSheet.native.cjs +94 -0
  268. package/dist/jsx/nativeSheet.native.js +70 -83
  269. package/dist/jsx/nativeSheet.native.js.map +1 -1
  270. package/dist/jsx/types.mjs +0 -2
  271. package/dist/jsx/types.native.cjs +19 -0
  272. package/dist/jsx/types.native.js +10 -10
  273. package/dist/jsx/types.native.js.map +1 -1
  274. package/dist/jsx/useGestureHandlerPan.mjs +232 -239
  275. package/dist/jsx/useGestureHandlerPan.mjs.map +1 -1
  276. package/dist/jsx/useGestureHandlerPan.native.cjs +273 -0
  277. package/dist/jsx/useGestureHandlerPan.native.js +254 -265
  278. package/dist/jsx/useGestureHandlerPan.native.js.map +1 -1
  279. package/dist/jsx/useKeyboardControllerSheet.mjs +71 -71
  280. package/dist/jsx/useKeyboardControllerSheet.mjs.map +1 -1
  281. package/dist/jsx/useKeyboardControllerSheet.native.cjs +119 -0
  282. package/dist/jsx/useKeyboardControllerSheet.native.js +100 -111
  283. package/dist/jsx/useKeyboardControllerSheet.native.js.map +1 -1
  284. package/dist/jsx/useSafeAreaInsets.mjs +3 -1
  285. package/dist/jsx/useSafeAreaInsets.mjs.map +1 -1
  286. package/dist/jsx/useSafeAreaInsets.native.cjs +51 -0
  287. package/dist/jsx/useSafeAreaInsets.native.js +30 -25
  288. package/dist/jsx/useSafeAreaInsets.native.js.map +1 -1
  289. package/dist/jsx/useSheetController.mjs +14 -12
  290. package/dist/jsx/useSheetController.mjs.map +1 -1
  291. package/dist/jsx/useSheetController.native.cjs +42 -0
  292. package/dist/jsx/useSheetController.native.js +28 -39
  293. package/dist/jsx/useSheetController.native.js.map +1 -1
  294. package/dist/jsx/useSheetOffscreenSize.mjs +30 -35
  295. package/dist/jsx/useSheetOffscreenSize.mjs.map +1 -1
  296. package/dist/jsx/useSheetOffscreenSize.native.cjs +60 -0
  297. package/dist/jsx/useSheetOffscreenSize.native.js +48 -56
  298. package/dist/jsx/useSheetOffscreenSize.native.js.map +1 -1
  299. package/dist/jsx/useSheetOpenState.mjs +50 -22
  300. package/dist/jsx/useSheetOpenState.mjs.map +1 -1
  301. package/dist/jsx/useSheetOpenState.native.cjs +88 -0
  302. package/dist/jsx/useSheetOpenState.native.js +74 -42
  303. package/dist/jsx/useSheetOpenState.native.js.map +1 -1
  304. package/dist/jsx/useSheetProviderProps.mjs +130 -138
  305. package/dist/jsx/useSheetProviderProps.mjs.map +1 -1
  306. package/dist/jsx/useSheetProviderProps.native.cjs +176 -0
  307. package/dist/jsx/useSheetProviderProps.native.js +156 -174
  308. package/dist/jsx/useSheetProviderProps.native.js.map +1 -1
  309. package/dist/jsx/useSheetScrollViewGestures.mjs +159 -162
  310. package/dist/jsx/useSheetScrollViewGestures.mjs.map +1 -1
  311. package/dist/jsx/useSheetScrollViewGestures.native.cjs +150 -0
  312. package/dist/jsx/useSheetScrollViewGestures.native.js +136 -147
  313. package/dist/jsx/useSheetScrollViewGestures.native.js.map +1 -1
  314. package/dist/jsx/webViewport.mjs +26 -25
  315. package/dist/jsx/webViewport.mjs.map +1 -1
  316. package/dist/jsx/webViewport.native.cjs +79 -0
  317. package/dist/jsx/webViewport.native.js +50 -50
  318. package/dist/jsx/webViewport.native.js.map +1 -1
  319. package/package.json +33 -39
  320. package/src/Sheet.tsx +316 -77
  321. package/src/SheetContext.tsx +57 -7
  322. package/src/SheetController.tsx +7 -6
  323. package/src/SheetImplementationCustom.tsx +343 -140
  324. package/src/SheetScrollView.tsx +24 -13
  325. package/src/constants.tsx +3 -3
  326. package/src/helpers.tsx +0 -14
  327. package/src/index.ts +3 -6
  328. package/src/nativeSheet.tsx +5 -15
  329. package/src/types.tsx +104 -92
  330. package/src/useKeyboardControllerSheet.native.ts +7 -2
  331. package/src/useSafeAreaInsets.native.ts +20 -13
  332. package/src/useSheetController.tsx +15 -7
  333. package/src/useSheetOpenState.tsx +50 -4
  334. package/src/useSheetProviderProps.tsx +4 -27
  335. package/src/useSheetScrollViewGestures.ts +2 -2
  336. package/types/GestureDetectorWrapper.d.ts +1 -1
  337. package/types/GestureDetectorWrapper.d.ts.map +1 -1
  338. package/types/GestureSheetContext.d.ts +1 -1
  339. package/types/GestureSheetContext.d.ts.map +1 -1
  340. package/types/Sheet.d.ts +384 -135
  341. package/types/Sheet.d.ts.map +1 -1
  342. package/types/SheetContext.d.ts +28 -42
  343. package/types/SheetContext.d.ts.map +1 -1
  344. package/types/SheetController.d.ts +4 -2
  345. package/types/SheetController.d.ts.map +1 -1
  346. package/types/SheetImplementationCustom.d.ts +3 -35
  347. package/types/SheetImplementationCustom.d.ts.map +1 -1
  348. package/types/SheetScrollView.d.ts +57 -23
  349. package/types/SheetScrollView.d.ts.map +1 -1
  350. package/types/constants.d.ts +3 -2
  351. package/types/constants.d.ts.map +1 -1
  352. package/types/index.d.ts +1 -3
  353. package/types/index.d.ts.map +1 -1
  354. package/types/nativeSheet.d.ts.map +1 -1
  355. package/types/types.d.ts +28 -17
  356. package/types/types.d.ts.map +1 -1
  357. package/types/useKeyboardControllerSheet.native.d.ts.map +1 -1
  358. package/types/useSafeAreaInsets.native.d.ts +4 -12
  359. package/types/useSafeAreaInsets.native.d.ts.map +1 -1
  360. package/types/useSheetController.d.ts +6 -6
  361. package/types/useSheetController.d.ts.map +1 -1
  362. package/types/useSheetOffscreenSize.d.ts.map +1 -1
  363. package/types/useSheetOpenState.d.ts +3 -2
  364. package/types/useSheetOpenState.d.ts.map +1 -1
  365. package/types/useSheetProviderProps.d.ts +5 -8
  366. package/types/useSheetProviderProps.d.ts.map +1 -1
  367. package/types/useSheetScrollViewGestures.d.ts +2 -2
  368. package/types/useSheetScrollViewGestures.d.ts.map +1 -1
  369. package/.turbo/turbo-build.log +0 -2
  370. package/controller/index.cjs +0 -2
  371. package/controller/index.d.ts +0 -5
  372. package/controller/index.js +0 -2
  373. package/controller/index.native.cjs +0 -2
  374. package/controller/index.native.js +0 -2
  375. package/dist/cjs/createSheet.cjs +0 -194
  376. package/dist/cjs/createSheet.native.js +0 -204
  377. package/dist/cjs/createSheet.native.js.map +0 -1
  378. package/dist/cjs/setupGestureHandler.cjs +0 -55
  379. package/dist/cjs/setupGestureHandler.native.js +0 -60
  380. package/dist/cjs/setupGestureHandler.native.js.map +0 -1
  381. package/dist/cjs/useSheet.cjs +0 -29
  382. package/dist/cjs/useSheet.native.js +0 -34
  383. package/dist/cjs/useSheet.native.js.map +0 -1
  384. package/dist/esm/controller.mjs.map +0 -1
  385. package/dist/esm/controller.native.js.map +0 -1
  386. package/dist/esm/createSheet.mjs +0 -168
  387. package/dist/esm/createSheet.mjs.map +0 -1
  388. package/dist/esm/createSheet.native.js +0 -176
  389. package/dist/esm/createSheet.native.js.map +0 -1
  390. package/dist/esm/index.js.map +0 -1
  391. package/dist/esm/index.mjs.map +0 -1
  392. package/dist/esm/index.native.js.map +0 -1
  393. package/dist/esm/setupGestureHandler.mjs +0 -29
  394. package/dist/esm/setupGestureHandler.mjs.map +0 -1
  395. package/dist/esm/setupGestureHandler.native.js +0 -31
  396. package/dist/esm/setupGestureHandler.native.js.map +0 -1
  397. package/dist/esm/types.mjs.map +0 -1
  398. package/dist/esm/types.native.js.map +0 -1
  399. package/dist/esm/useSheet.mjs +0 -4
  400. package/dist/esm/useSheet.mjs.map +0 -1
  401. package/dist/esm/useSheet.native.js +0 -6
  402. package/dist/esm/useSheet.native.js.map +0 -1
  403. package/dist/jsx/controller.mjs.map +0 -1
  404. package/dist/jsx/createSheet.mjs +0 -168
  405. package/dist/jsx/createSheet.mjs.map +0 -1
  406. package/dist/jsx/createSheet.native.js +0 -204
  407. package/dist/jsx/createSheet.native.js.map +0 -1
  408. package/dist/jsx/index.js.map +0 -1
  409. package/dist/jsx/index.mjs.map +0 -1
  410. package/dist/jsx/setupGestureHandler.mjs +0 -29
  411. package/dist/jsx/setupGestureHandler.mjs.map +0 -1
  412. package/dist/jsx/setupGestureHandler.native.js +0 -60
  413. package/dist/jsx/setupGestureHandler.native.js.map +0 -1
  414. package/dist/jsx/types.mjs.map +0 -1
  415. package/dist/jsx/useSheet.mjs +0 -4
  416. package/dist/jsx/useSheet.mjs.map +0 -1
  417. package/dist/jsx/useSheet.native.js +0 -34
  418. package/dist/jsx/useSheet.native.js.map +0 -1
  419. package/next.md +0 -78
  420. package/setup-gesture-handler/index.cjs +0 -2
  421. package/setup-gesture-handler/index.js +0 -2
  422. package/setup-gesture-handler/index.native.cjs +0 -2
  423. package/setup-gesture-handler/index.native.js +0 -2
  424. package/setup-gesture-handler.cjs +0 -1
  425. package/src/createSheet.tsx +0 -309
  426. package/src/setupGestureHandler.ts +0 -43
  427. package/src/useSheet.tsx +0 -3
  428. package/test/keyboardAvoidance.test.ts +0 -269
  429. package/tsconfig.json +0 -57
  430. package/types/createSheet.d.ts +0 -195
  431. package/types/createSheet.d.ts.map +0 -1
  432. package/types/setupGestureHandler.d.ts +0 -11
  433. package/types/setupGestureHandler.d.ts.map +0 -1
  434. package/types/useSheet.d.ts +0 -2
  435. package/types/useSheet.d.ts.map +0 -1
package/src/Sheet.tsx CHANGED
@@ -1,59 +1,79 @@
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 {
5
+ createRefComponent,
6
+ createStyledHOC,
7
+ styled,
8
+ View,
9
+ type TamaguiElement,
10
+ type ViewProps,
11
+ } from '@tamagui/core'
12
+ import { composeEventHandlers, withStaticProperties } from '@tamagui/helpers'
13
+ import { resolveViewZIndex } from '@tamagui/portal'
14
+ import { RemoveScroll } from '@tamagui/remove-scroll'
2
15
  import { XStack, YStack } from '@tamagui/stacks'
16
+ import { useDidFinishSSR } from '@tamagui/use-did-finish-ssr'
17
+ import { StackZIndexContext } from '@tamagui/z-index-stack'
18
+ import type { FunctionComponent, Ref } from 'react'
19
+ import { useContext, useEffect, useMemo, useRef } from 'react'
20
+ import type { View as RNView } from 'react-native'
21
+ import { Platform } from 'react-native'
22
+ import {
23
+ SHEET_BACKGROUND_NAME,
24
+ SHEET_CONTAINER_NAME,
25
+ SHEET_HANDLE_NAME,
26
+ SHEET_OVERLAY_MARKER,
27
+ SHEET_OVERLAY_NAME,
28
+ } from './constants'
29
+ import { getNativeSheet } from './nativeSheet'
30
+ import {
31
+ SheetOverlayLayerContext,
32
+ useAnimatedPosition,
33
+ useSheetContext,
34
+ } from './SheetContext'
35
+ import { SheetImplementationCustom } from './SheetImplementationCustom'
36
+ import { SheetScrollView } from './SheetScrollView'
37
+ import type { SheetProps, SheetScopedProps } from './types'
38
+ import { useSheetController } from './useSheetController'
39
+ import { useSheetOffscreenSize } from './useSheetOffscreenSize'
40
+ import { getMaxViewportHeight } from './webViewport'
3
41
 
4
- import { SHEET_HANDLE_NAME, SHEET_NAME, SHEET_OVERLAY_NAME } from './constants'
5
- import { createSheet } from './createSheet'
6
-
7
- export { createSheetScope } from './SheetContext'
8
42
  export * from './types'
9
43
 
10
- /* -------------------------------------------------------------------------------------------------
11
- * SheetHandle
12
- * -----------------------------------------------------------------------------------------------*/
44
+ type SheetStyleShorthandProps = {
45
+ h?: ViewProps['height']
46
+ o?: ViewProps['opacity']
47
+ pos?: ViewProps['position']
48
+ }
49
+
50
+ type SheetViewProps<ExtraProps extends object = {}> = SheetScopedProps<
51
+ ViewProps & SheetStyleShorthandProps & ExtraProps
52
+ >
13
53
 
14
- export const Handle = styled(XStack, {
15
- name: SHEET_HANDLE_NAME,
54
+ const SheetHandleFrame = styled(XStack, {
55
+ displayName: SHEET_HANDLE_NAME,
16
56
 
57
+ // the behavior Handle ships no opacity rules; open/close aesthetics (fade in
58
+ // when open, dim when idle) live in the copied skin. see the canonical skin.
17
59
  variants: {
18
60
  open: {
19
61
  true: {
20
- opacity: 1,
21
62
  pointerEvents: 'auto',
22
63
  },
23
64
  false: {
24
- opacity: 0,
25
65
  pointerEvents: 'none',
26
66
  },
27
67
  },
28
-
29
- unstyled: {
30
- false: {
31
- height: 10,
32
- borderRadius: 100,
33
- backgroundColor: '$background',
34
- zIndex: 10,
35
- marginHorizontal: '35%',
36
- marginBottom: '$2',
37
- opacity: 0.5,
38
-
39
- hoverStyle: {
40
- opacity: 0.7,
41
- },
42
- },
43
- },
44
68
  } as const,
45
-
46
- defaultVariants: {
47
- unstyled: process.env.TAMAGUI_HEADLESS === '1',
48
- },
49
69
  })
50
70
 
51
- /* -------------------------------------------------------------------------------------------------
52
- * SheetOverlay
53
- * -----------------------------------------------------------------------------------------------*/
54
-
55
- export const Overlay = styled(YStack, {
56
- name: SHEET_OVERLAY_NAME,
71
+ const SheetOverlayFrame = styled(YStack, {
72
+ displayName: SHEET_OVERLAY_NAME,
73
+ inset: 0,
74
+ position: 'absolute',
75
+ zIndex: 100_000 - 1,
76
+ pointerEvents: 'auto',
57
77
 
58
78
  variants: {
59
79
  open: {
@@ -64,51 +84,270 @@ export const Overlay = styled(YStack, {
64
84
  pointerEvents: 'none',
65
85
  },
66
86
  },
67
-
68
- unstyled: {
69
- false: {
70
- fullscreen: true,
71
- position: 'absolute',
72
- backgroundColor: '$background',
73
- zIndex: 100_000 - 1,
74
- pointerEvents: 'auto',
75
- },
76
- },
77
87
  } as const,
88
+ })
89
+
90
+ Object.assign(SheetOverlayFrame.staticConfig, { [SHEET_OVERLAY_MARKER]: true })
78
91
 
79
- defaultVariants: {
80
- unstyled: process.env.TAMAGUI_HEADLESS === '1',
81
- },
92
+ const SheetContainerFrame = styled(YStack, {
93
+ displayName: SHEET_CONTAINER_NAME,
94
+ flex: 1,
95
+ position: 'relative',
96
+ zIndex: 0,
97
+ width: '100%',
98
+ maxHeight: '100%',
82
99
  })
83
100
 
84
- /* -------------------------------------------------------------------------------------------------
85
- * Sheet
86
- * -----------------------------------------------------------------------------------------------*/
101
+ const SheetBackgroundFrame = styled(YStack, {
102
+ displayName: SHEET_BACKGROUND_NAME,
103
+ position: 'absolute',
104
+ top: 0,
105
+ left: 0,
106
+ right: 0,
107
+ zIndex: -1,
108
+ pointerEvents: 'none',
109
+ })
87
110
 
88
- export const Frame = styled(YStack, {
89
- name: SHEET_NAME,
111
+ export const SheetHandle = createStyledHOC(
112
+ SheetHandleFrame,
113
+ ({ scope, ...props }: SheetViewProps, forwardedRef) => {
114
+ const context = useSheetContext(scope)
115
+ const composedRef = useComposedRefs<TamaguiElement>(context.handleRef, forwardedRef)
116
+ const wasDraggingRef = useRef(false)
90
117
 
91
- variants: {
92
- unstyled: {
93
- false: {
94
- flex: 1,
95
- backgroundColor: '$background',
96
- borderTopLeftRadius: '$true',
97
- borderTopRightRadius: '$true',
98
- width: '100%',
99
- maxHeight: '100%',
100
- overflow: 'hidden',
101
- },
102
- },
103
- } as const,
118
+ useEffect(() => {
119
+ if (!context.scrollBridge) return
120
+ return context.scrollBridge.onParentDragging((isDragging: boolean) => {
121
+ if (isDragging) {
122
+ wasDraggingRef.current = true
123
+ }
124
+ })
125
+ }, [context.scrollBridge])
104
126
 
105
- defaultVariants: {
106
- unstyled: process.env.TAMAGUI_HEADLESS === '1',
107
- },
108
- })
127
+ if (context.onlyShowContainer) {
128
+ return null
129
+ }
130
+
131
+ return (
132
+ <SheetHandleFrame
133
+ ref={composedRef}
134
+ onPressIn={() => {
135
+ wasDraggingRef.current = false
136
+ }}
137
+ onPress={() => {
138
+ if (wasDraggingRef.current) {
139
+ wasDraggingRef.current = false
140
+ return
141
+ }
142
+ const max = context.snapPoints.length + (context.dismissOnSnapToBottom ? -1 : 0)
143
+ const nextPos = (context.position + 1) % max
144
+ context.setPosition(nextPos)
145
+ }}
146
+ open={context.open}
147
+ {...props}
148
+ />
149
+ )
150
+ }
151
+ )
152
+
153
+ export const SheetOverlay = createStyledHOC(
154
+ SheetOverlayFrame,
155
+ (propsIn: SheetViewProps, ref) => {
156
+ const { scope, ...props } = propsIn
157
+ const context = useSheetContext(scope)
158
+ const isInOverlayLayer = useContext(SheetOverlayLayerContext)
159
+ const didWarn = useRef(false)
160
+
161
+ if (context.onlyShowContainer) {
162
+ return null
163
+ }
164
+
165
+ if (!isInOverlayLayer) {
166
+ if (process.env.NODE_ENV === 'development' && !didWarn.current) {
167
+ didWarn.current = true
168
+ console.error(
169
+ 'Sheet.Overlay must be a direct child of Sheet. Move it next to Sheet.Handle and Sheet.Container.'
170
+ )
171
+ }
172
+
173
+ return null
174
+ }
175
+
176
+ return (
177
+ <SheetOverlayFrame
178
+ {...props}
179
+ ref={ref}
180
+ onPress={composeEventHandlers(
181
+ props.onPress,
182
+ context.dismissOnOverlayPress
183
+ ? () => {
184
+ context.setOpen(false)
185
+ }
186
+ : undefined
187
+ )}
188
+ />
189
+ )
190
+ }
191
+ )
192
+
193
+ type ExtraContainerProps = {
194
+ /**
195
+ * Adds padding accounting for the currently offscreen content, so if you put a flex element inside
196
+ * the sheet, it will always flex to the height of the visible amount of the sheet. If this is not
197
+ * turned on, the inner content is always set to the max height of the sheet.
198
+ */
199
+ adjustPaddingForOffscreenContent?: boolean
200
+ }
201
+
202
+ export const SheetContainer = createStyledHOC(
203
+ SheetContainerFrame,
204
+ (
205
+ {
206
+ scope,
207
+ adjustPaddingForOffscreenContent,
208
+ children,
209
+ ...props
210
+ }: SheetViewProps<ExtraContainerProps>,
211
+ forwardedRef
212
+ ) => {
213
+ const context = useSheetContext(scope)
214
+ const { hasFit, disableRemoveScroll, frameSize, contentRef, open } = context
215
+ const composedContentRef = useComposedRefs(forwardedRef, contentRef)
216
+ const offscreenSize = useSheetOffscreenSize(context)
217
+ const stableFrameSize = useRef(frameSize)
218
+
219
+ useEffect(() => {
220
+ if (open && frameSize) {
221
+ stableFrameSize.current = frameSize
222
+ }
223
+ }, [open, frameSize])
224
+
225
+ const sheetContents = useMemo(() => {
226
+ const shouldUseFixedHeight = hasFit && !open && stableFrameSize.current
227
+
228
+ return (
229
+ <SheetContainerFrame
230
+ ref={composedContentRef}
231
+ flex={hasFit && open ? 0 : 1}
232
+ flexBasis={hasFit ? 'auto' : undefined}
233
+ height={
234
+ shouldUseFixedHeight
235
+ ? stableFrameSize.current
236
+ : hasFit
237
+ ? undefined
238
+ : frameSize
239
+ }
240
+ pointerEvents={open ? 'auto' : 'none'}
241
+ data-state={open ? 'open' : 'closed'}
242
+ {...props}
243
+ >
244
+ <StackZIndexContext zIndex={resolveViewZIndex(props.zIndex)}>
245
+ {children}
246
+ </StackZIndexContext>
247
+
248
+ {adjustPaddingForOffscreenContent && (
249
+ <View data-sheet-offscreen-pad height={offscreenSize} width="100%" />
250
+ )}
251
+ </SheetContainerFrame>
252
+ )
253
+ }, [open, props, frameSize, offscreenSize, adjustPaddingForOffscreenContent, hasFit])
254
+
255
+ return (
256
+ <RemoveScroll enabled={!disableRemoveScroll && context.open}>
257
+ {sheetContents}
258
+ </RemoveScroll>
259
+ )
260
+ }
261
+ )
262
+
263
+ type ExtraBackgroundProps = {
264
+ /**
265
+ * Disables the default background extension below the sheet. Leave this off
266
+ * when a spring can overshoot on open so page content never shows through.
267
+ */
268
+ disableHideBottomOverflow?: boolean
269
+ }
270
+
271
+ export const SheetBackground = createStyledHOC(
272
+ SheetBackgroundFrame,
273
+ (
274
+ { scope, disableHideBottomOverflow, ...props }: SheetViewProps<ExtraBackgroundProps>,
275
+ forwardedRef
276
+ ) => {
277
+ const context = useSheetContext(scope)
278
+ const bottomOverflow = isWeb
279
+ ? Math.max(context.frameSize, getMaxViewportHeight())
280
+ : context.frameSize
281
+
282
+ return (
283
+ <SheetBackgroundFrame
284
+ ref={forwardedRef}
285
+ data-sheet-background=""
286
+ bottom={disableHideBottomOverflow ? 0 : -bottomOverflow}
287
+ {...props}
288
+ />
289
+ )
290
+ }
291
+ )
292
+
293
+ export const SheetRoot = createRefComponent<RNView, SheetProps>(
294
+ function SheetRoot(props, ref) {
295
+ const hydrated = useDidFinishSSR()
296
+ const isAdapted = useAdaptIsActive()
297
+ const adaptContext = useAdaptContext()
298
+ const { isShowingNonSheet } = useSheetController(props.scope)
299
+ const shouldUseAdapt = Boolean(
300
+ adaptContext.open !== undefined || adaptContext.onOpenChange
301
+ )
302
+ const isShowingAdaptNonSheet =
303
+ shouldUseAdapt && !adaptContext.active && adaptContext.open
304
+
305
+ let SheetImplementation = SheetImplementationCustom
306
+
307
+ if (props.native && Platform.OS === 'ios') {
308
+ if (process.env.TAMAGUI_TARGET === 'native') {
309
+ const impl = getNativeSheet('ios')
310
+ if (impl) {
311
+ // @ts-expect-error accepting external sheet implementation
312
+ SheetImplementation = impl
313
+ }
314
+ }
315
+ }
316
+
317
+ if (isShowingAdaptNonSheet || isShowingNonSheet || !hydrated) {
318
+ return null
319
+ }
320
+
321
+ const implementation = <SheetImplementation ref={ref} {...props} />
322
+
323
+ return isAdapted ? (
324
+ <AdaptCapabilities scroll overlay dismiss>
325
+ {implementation}
326
+ </AdaptCapabilities>
327
+ ) : (
328
+ implementation
329
+ )
330
+ }
331
+ )
332
+
333
+ const sheetParts = {
334
+ Container: SheetContainer,
335
+ Background: SheetBackground,
336
+ Overlay: SheetOverlay,
337
+ Handle: SheetHandle,
338
+ ScrollView: SheetScrollView,
339
+ }
340
+
341
+ export const SheetControlled = withStaticProperties(
342
+ SheetRoot as unknown as FunctionComponent<
343
+ Omit<SheetProps, 'open' | 'onOpenChange'> & { ref?: Ref<RNView> }
344
+ >,
345
+ sheetParts
346
+ )
109
347
 
110
- export const Sheet = createSheet({
111
- Frame,
112
- Handle,
113
- Overlay,
348
+ export const Sheet = withStaticProperties(SheetRoot, {
349
+ Root: SheetRoot,
350
+ Controlled: SheetControlled,
351
+ useAnimatedPosition,
352
+ ...sheetParts,
114
353
  })
@@ -1,11 +1,61 @@
1
- import { createContextScope } from '@tamagui/create-context'
1
+ import { createStyledContext, type UniversalAnimatedNumber } from '@tamagui/core'
2
+ import React from 'react'
2
3
 
3
- import { SHEET_NAME } from './constants'
4
4
  import type { SheetContextValue } from './useSheetProviderProps'
5
5
 
6
- export const [createSheetContext, createSheetScope] = createContextScope(SHEET_NAME)
6
+ export const SheetContext = createStyledContext<SheetContextValue>({}, 'Sheet__')
7
7
 
8
- export const [SheetProvider, useSheetContext] = createSheetContext<SheetContextValue>(
9
- SHEET_NAME,
10
- {} as any
11
- )
8
+ export const { Provider: SheetProvider, useStyledContext: useSheetContext } = SheetContext
9
+
10
+ export const SheetOverlayLayerContext = React.createContext(false)
11
+
12
+ // the UIKit system sheet does not expose the continuous position that powers
13
+ // Sheet.useAnimatedPosition. mark that implementation separately so the hook
14
+ // can explain how to opt back into the custom Sheet instead of claiming the
15
+ // caller is outside Sheet entirely.
16
+ export const SheetNativeSystemContext = React.createContext(false)
17
+
18
+ export type SheetAnimatedPositionContextValue = {
19
+ // the exact animated number driving the frame's translateY (px from screen
20
+ // top). drive drag-linked effects off this via useAnimatedNumberStyle.
21
+ value: UniversalAnimatedNumber<any>
22
+ // height of the viewport the sheet positions against
23
+ screenSize: number
24
+ // measured height of the sheet frame
25
+ frameSize: number
26
+ // resolved px positions (translateY) matching snapPoints order
27
+ snapOffsets: number[]
28
+ // the top-most (fully open) position
29
+ minY: number
30
+ }
31
+
32
+ export const SheetAnimatedPositionContext =
33
+ React.createContext<SheetAnimatedPositionContextValue | null>(null)
34
+
35
+ /**
36
+ * Read the sheet's live animated position. Call inside a `Sheet` to build
37
+ * drag-linked effects (e.g. an overlay fade) on the public animation hooks:
38
+ *
39
+ * ```tsx
40
+ * const { value, screenSize } = Sheet.useAnimatedPosition()
41
+ * const style = useAnimatedNumberStyle(value, (y) => {
42
+ * 'worklet'
43
+ * return { opacity: Math.max(0, 0.5 * (1 - y / screenSize)) }
44
+ * })
45
+ * ```
46
+ */
47
+ export function useAnimatedPosition(): SheetAnimatedPositionContextValue {
48
+ const context = React.useContext(SheetAnimatedPositionContext)
49
+ const isNativeSystemSheet = React.useContext(SheetNativeSystemContext)
50
+ if (!context) {
51
+ if (isNativeSystemSheet) {
52
+ throw new Error(
53
+ "Sheet.useAnimatedPosition() is unavailable when Sheet uses the native iOS system sheet because UIKit does not expose its continuous position. Remove the `native` prop to use Tamagui's custom Sheet and animated position hooks."
54
+ )
55
+ }
56
+ throw new Error(
57
+ 'Sheet.useAnimatedPosition() must be used inside a <Sheet>. Render the component that calls it as a child of Sheet.'
58
+ )
59
+ }
60
+ return context
61
+ }
@@ -8,13 +8,14 @@ import { SheetControllerContext } from './useSheetController'
8
8
  export const SheetController = ({
9
9
  children,
10
10
  onOpenChange: onOpenChangeProp,
11
- onAnimationComplete: onAnimationCompleteProp,
11
+ onTransition: onTransitionProp,
12
12
  open,
13
13
  hidden,
14
14
  disableDrag,
15
- }: Partial<SheetControllerContextValue> & { children?: ReactNode }) => {
15
+ scope = '',
16
+ }: Partial<SheetControllerContextValue> & { children?: ReactNode; scope?: string }) => {
16
17
  const onOpenChange = useEvent(onOpenChangeProp)
17
- const onAnimationComplete = useEvent(onAnimationCompleteProp)
18
+ const onTransition = useEvent(onTransitionProp)
18
19
  const id = useId()
19
20
 
20
21
  // track hidden transitions to signal adapt handoff
@@ -33,14 +34,14 @@ export const SheetController = ({
33
34
  hidden,
34
35
  disableDrag,
35
36
  onOpenChange,
36
- onAnimationComplete,
37
+ onTransition,
37
38
  skipNextAnimation,
38
39
  }),
39
- [id, onOpenChange, onAnimationComplete, open, hidden, disableDrag, skipNextAnimation]
40
+ [id, onOpenChange, onTransition, open, hidden, disableDrag, skipNextAnimation]
40
41
  )
41
42
 
42
43
  return (
43
- <SheetControllerContext.Provider value={memoValue}>
44
+ <SheetControllerContext.Provider scope={scope} {...memoValue}>
44
45
  {children}
45
46
  </SheetControllerContext.Provider>
46
47
  )