@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
@@ -1,102 +1,97 @@
1
+
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
6
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
10
11
  };
11
12
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
19
20
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
22
  var useKeyboardControllerSheet_exports = {};
24
- __export(useKeyboardControllerSheet_exports, {
25
- useKeyboardControllerSheet: () => useKeyboardControllerSheet
26
- });
23
+ __export(useKeyboardControllerSheet_exports, { useKeyboardControllerSheet: () => useKeyboardControllerSheet });
27
24
  module.exports = __toCommonJS(useKeyboardControllerSheet_exports);
28
25
  var import_react = require("react");
29
26
  var import_constants = require("@tamagui/constants");
30
27
  var import_webViewport = require("./webViewport.cjs");
31
28
  function useKeyboardControllerSheet(options) {
32
- const {
33
- enabled
34
- } = options;
35
- const [keyboardHeight, setKeyboardHeight] = (0, import_react.useState)(() => import_constants.isWeb && enabled && typeof window !== "undefined" && window.visualViewport ? (() => {
36
- const resizeHeight = (0, import_webViewport.getWebKeyboardResizeHeight)();
37
- return resizeHeight >= import_webViewport.MIN_KEYBOARD_HEIGHT && (0, import_webViewport.isEditableElement)(document.activeElement) ? (0, import_webViewport.getWebKeyboardBottomInset)() : 0;
38
- })() : 0);
39
- const [isKeyboardVisible, setIsKeyboardVisible] = (0, import_react.useState)(() => keyboardHeight > 0);
40
- const pauseKeyboardHandler = (0, import_react.useRef)(false);
41
- const pendingHide = (0, import_react.useRef)(false);
42
- const isVisibleRef = (0, import_react.useRef)(false);
43
- isVisibleRef.current = isKeyboardVisible;
44
- const dismissKeyboard = (0, import_react.useCallback)(() => {
45
- if (typeof document === "undefined") return;
46
- const active = document.activeElement;
47
- if ((0, import_webViewport.isEditableElement)(active)) {
48
- active?.blur?.();
49
- }
50
- }, []);
51
- const flushPendingHide = (0, import_react.useCallback)(() => {
52
- if (pendingHide.current) {
53
- pendingHide.current = false;
54
- setIsKeyboardVisible(false);
55
- setKeyboardHeight(0);
56
- }
57
- }, []);
58
- (0, import_react.useEffect)(() => {
59
- if (!import_constants.isWeb || !enabled) return;
60
- if (typeof window === "undefined") return;
61
- const vv = window.visualViewport;
62
- if (!vv) return;
63
- const update = () => {
64
- const resizeHeight = (0, import_webViewport.getWebKeyboardResizeHeight)();
65
- const height = (0, import_webViewport.getWebKeyboardBottomInset)();
66
- const tall = resizeHeight >= import_webViewport.MIN_KEYBOARD_HEIGHT;
67
- const editableFocused = (0, import_webViewport.isEditableElement)(document.activeElement);
68
- const visible = tall && (editableFocused || isVisibleRef.current);
69
- if (!visible) {
70
- if (pauseKeyboardHandler.current && isVisibleRef.current) {
71
- pendingHide.current = true;
72
- return;
73
- }
74
- setIsKeyboardVisible(false);
75
- setKeyboardHeight(0);
76
- return;
77
- }
78
- pendingHide.current = false;
79
- setIsKeyboardVisible(true);
80
- setKeyboardHeight(prev => prev === height ? prev : height);
81
- };
82
- vv.addEventListener("resize", update);
83
- vv.addEventListener("scroll", update);
84
- window.addEventListener("focusin", update);
85
- window.addEventListener("focusout", update);
86
- update();
87
- return () => {
88
- vv.removeEventListener("resize", update);
89
- vv.removeEventListener("scroll", update);
90
- window.removeEventListener("focusin", update);
91
- window.removeEventListener("focusout", update);
92
- };
93
- }, [enabled]);
94
- return {
95
- keyboardControllerEnabled: false,
96
- keyboardHeight,
97
- isKeyboardVisible,
98
- dismissKeyboard,
99
- pauseKeyboardHandler,
100
- flushPendingHide
101
- };
102
- }
29
+ const { enabled } = options;
30
+ const [keyboardHeight, setKeyboardHeight] = (0, import_react.useState)(() => import_constants.isWeb && enabled && typeof window !== "undefined" && window.visualViewport ? (() => {
31
+ const resizeHeight = (0, import_webViewport.getWebKeyboardResizeHeight)();
32
+ return resizeHeight >= import_webViewport.MIN_KEYBOARD_HEIGHT && (0, import_webViewport.isEditableElement)(document.activeElement) ? (0, import_webViewport.getWebKeyboardBottomInset)() : 0;
33
+ })() : 0);
34
+ const [isKeyboardVisible, setIsKeyboardVisible] = (0, import_react.useState)(() => keyboardHeight > 0);
35
+ const pauseKeyboardHandler = (0, import_react.useRef)(false);
36
+ const pendingHide = (0, import_react.useRef)(false);
37
+ const isVisibleRef = (0, import_react.useRef)(false);
38
+ isVisibleRef.current = isKeyboardVisible;
39
+ const dismissKeyboard = (0, import_react.useCallback)(() => {
40
+ if (typeof document === "undefined") return;
41
+ const active = document.activeElement;
42
+ if ((0, import_webViewport.isEditableElement)(active)) {
43
+ active?.blur?.();
44
+ }
45
+ }, []);
46
+ const flushPendingHide = (0, import_react.useCallback)(() => {
47
+ if (pendingHide.current) {
48
+ pendingHide.current = false;
49
+ setIsKeyboardVisible(false);
50
+ setKeyboardHeight(0);
51
+ }
52
+ }, []);
53
+ (0, import_react.useEffect)(() => {
54
+ if (!import_constants.isWeb || !enabled) return;
55
+ if (typeof window === "undefined") return;
56
+ const vv = window.visualViewport;
57
+ if (!vv) return;
58
+ const update = () => {
59
+ const resizeHeight = (0, import_webViewport.getWebKeyboardResizeHeight)();
60
+ const height = (0, import_webViewport.getWebKeyboardBottomInset)();
61
+ const tall = resizeHeight >= import_webViewport.MIN_KEYBOARD_HEIGHT;
62
+ const editableFocused = (0, import_webViewport.isEditableElement)(document.activeElement);
63
+ const visible = tall && (editableFocused || isVisibleRef.current);
64
+ if (!visible) {
65
+ if (pauseKeyboardHandler.current && isVisibleRef.current) {
66
+ pendingHide.current = true;
67
+ return;
68
+ }
69
+ setIsKeyboardVisible(false);
70
+ setKeyboardHeight(0);
71
+ return;
72
+ }
73
+ pendingHide.current = false;
74
+ setIsKeyboardVisible(true);
75
+ setKeyboardHeight((prev) => prev === height ? prev : height);
76
+ };
77
+ vv.addEventListener("resize", update);
78
+ vv.addEventListener("scroll", update);
79
+ window.addEventListener("focusin", update);
80
+ window.addEventListener("focusout", update);
81
+ update();
82
+ return () => {
83
+ vv.removeEventListener("resize", update);
84
+ vv.removeEventListener("scroll", update);
85
+ window.removeEventListener("focusin", update);
86
+ window.removeEventListener("focusout", update);
87
+ };
88
+ }, [enabled]);
89
+ return {
90
+ keyboardControllerEnabled: false,
91
+ keyboardHeight,
92
+ isKeyboardVisible,
93
+ dismissKeyboard,
94
+ pauseKeyboardHandler,
95
+ flushPendingHide
96
+ };
97
+ }
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
22
+ };
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
+ var useKeyboardControllerSheet_native_exports = {};
25
+ __export(useKeyboardControllerSheet_native_exports, { useKeyboardControllerSheet: () => useKeyboardControllerSheet });
26
+ module.exports = __toCommonJS(useKeyboardControllerSheet_native_exports);
27
+ var import_react = require("react");
28
+ var import_react_native = require("react-native");
29
+ var isKeyboardControllerEnabled = function() {
30
+ return false;
31
+ };
32
+ var getKeyboardControllerState = function() {
33
+ return {};
34
+ };
35
+ try {
36
+ var nativeModule = require("@tamagui/native");
37
+ isKeyboardControllerEnabled = nativeModule.isKeyboardControllerEnabled;
38
+ getKeyboardControllerState = nativeModule.getKeyboardControllerState;
39
+ } catch (e) {}
40
+ function useKeyboardControllerSheet(options) {
41
+ var { enabled } = options;
42
+ var [keyboardHeight, setKeyboardHeight] = (0, import_react.useState)(0);
43
+ var [isKeyboardVisible, setIsKeyboardVisible] = (0, import_react.useState)(false);
44
+ var keyboardControllerEnabled = isKeyboardControllerEnabled();
45
+ var pauseKeyboardHandler = (0, import_react.useRef)(false);
46
+ var pendingHide = (0, import_react.useRef)(false);
47
+ var dismissKeyboard = (0, import_react.useCallback)(function() {
48
+ import_react_native.Keyboard.dismiss();
49
+ if (keyboardControllerEnabled) {
50
+ try {
51
+ var _KeyboardController_dismiss;
52
+ var { KeyboardController } = getKeyboardControllerState();
53
+ KeyboardController === null || KeyboardController === void 0 ? void 0 : (_KeyboardController_dismiss = KeyboardController.dismiss) === null || _KeyboardController_dismiss === void 0 ? void 0 : _KeyboardController_dismiss.call(KeyboardController);
54
+ } catch (e) {}
55
+ }
56
+ }, [keyboardControllerEnabled]);
57
+ var flushPendingHide = (0, import_react.useCallback)(function() {
58
+ if (pendingHide.current) {
59
+ pendingHide.current = false;
60
+ setIsKeyboardVisible(false);
61
+ setKeyboardHeight(0);
62
+ }
63
+ }, []);
64
+ (0, import_react.useEffect)(function() {
65
+ if (!enabled || !keyboardControllerEnabled) return;
66
+ var { KeyboardEvents } = getKeyboardControllerState();
67
+ if (!(KeyboardEvents === null || KeyboardEvents === void 0 ? void 0 : KeyboardEvents.addListener)) return;
68
+ var showSub = KeyboardEvents.addListener("keyboardWillShow", function(e) {
69
+ var _e_height;
70
+ var height = (_e_height = e === null || e === void 0 ? void 0 : e.height) !== null && _e_height !== void 0 ? _e_height : 0;
71
+ if (height > 0) {
72
+ setKeyboardHeight(height);
73
+ }
74
+ setIsKeyboardVisible(true);
75
+ });
76
+ var hideSub = KeyboardEvents.addListener("keyboardWillHide", function() {
77
+ if (pauseKeyboardHandler.current) {
78
+ pendingHide.current = true;
79
+ return;
80
+ }
81
+ setIsKeyboardVisible(false);
82
+ setKeyboardHeight(0);
83
+ });
84
+ return function() {
85
+ var _showSub_remove, _hideSub_remove;
86
+ showSub === null || showSub === void 0 ? void 0 : (_showSub_remove = showSub.remove) === null || _showSub_remove === void 0 ? void 0 : _showSub_remove.call(showSub);
87
+ hideSub === null || hideSub === void 0 ? void 0 : (_hideSub_remove = hideSub.remove) === null || _hideSub_remove === void 0 ? void 0 : _hideSub_remove.call(hideSub);
88
+ };
89
+ }, [enabled, keyboardControllerEnabled]);
90
+ (0, import_react.useEffect)(function() {
91
+ if (!enabled) return;
92
+ var showEvent = import_react_native.Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow";
93
+ var hideEvent = import_react_native.Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide";
94
+ var showListener = import_react_native.Keyboard.addListener(showEvent, function(e) {
95
+ setKeyboardHeight(e.endCoordinates.height);
96
+ setIsKeyboardVisible(true);
97
+ });
98
+ var hideListener = import_react_native.Keyboard.addListener(hideEvent, function() {
99
+ if (pauseKeyboardHandler.current) {
100
+ pendingHide.current = true;
101
+ return;
102
+ }
103
+ setIsKeyboardVisible(false);
104
+ setKeyboardHeight(0);
105
+ });
106
+ return function() {
107
+ showListener.remove();
108
+ hideListener.remove();
109
+ };
110
+ }, [enabled, keyboardControllerEnabled]);
111
+ return {
112
+ keyboardControllerEnabled,
113
+ keyboardHeight,
114
+ isKeyboardVisible,
115
+ dismissKeyboard,
116
+ pauseKeyboardHandler,
117
+ flushPendingHide
118
+ };
119
+ }
@@ -1,132 +1,121 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
12
13
  };
13
14
  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;
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
21
22
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
24
  var useKeyboardControllerSheet_native_exports = {};
26
- __export(useKeyboardControllerSheet_native_exports, {
27
- useKeyboardControllerSheet: () => useKeyboardControllerSheet
28
- });
25
+ __export(useKeyboardControllerSheet_native_exports, { useKeyboardControllerSheet: () => useKeyboardControllerSheet });
29
26
  module.exports = __toCommonJS(useKeyboardControllerSheet_native_exports);
30
27
  var import_react = require("react");
31
28
  var import_react_native = require("react-native");
32
- var isKeyboardControllerEnabled = function () {
33
- return false;
29
+ var isKeyboardControllerEnabled = function() {
30
+ return false;
34
31
  };
35
- var getKeyboardControllerState = function () {
36
- return {};
32
+ var getKeyboardControllerState = function() {
33
+ return {};
37
34
  };
38
35
  try {
39
- var nativeModule = require("@tamagui/native");
40
- isKeyboardControllerEnabled = nativeModule.isKeyboardControllerEnabled;
41
- getKeyboardControllerState = nativeModule.getKeyboardControllerState;
36
+ var nativeModule = require("@tamagui/native");
37
+ isKeyboardControllerEnabled = nativeModule.isKeyboardControllerEnabled;
38
+ getKeyboardControllerState = nativeModule.getKeyboardControllerState;
42
39
  } catch (e) {}
43
40
  function useKeyboardControllerSheet(options) {
44
- var {
45
- enabled
46
- } = options;
47
- var [keyboardHeight, setKeyboardHeight] = (0, import_react.useState)(0);
48
- var [isKeyboardVisible, setIsKeyboardVisible] = (0, import_react.useState)(false);
49
- var keyboardControllerEnabled = isKeyboardControllerEnabled();
50
- var pauseKeyboardHandler = (0, import_react.useRef)(false);
51
- var pendingHide = (0, import_react.useRef)(false);
52
- var dismissKeyboard = (0, import_react.useCallback)(function () {
53
- import_react_native.Keyboard.dismiss();
54
- if (keyboardControllerEnabled) {
55
- try {
56
- var _KeyboardController_dismiss;
57
- var {
58
- KeyboardController
59
- } = getKeyboardControllerState();
60
- KeyboardController === null || KeyboardController === void 0 ? void 0 : (_KeyboardController_dismiss = KeyboardController.dismiss) === null || _KeyboardController_dismiss === void 0 ? void 0 : _KeyboardController_dismiss.call(KeyboardController);
61
- } catch (e) {}
62
- }
63
- },
64
- // ignore errors from keyboard-controller
65
- [keyboardControllerEnabled]);
66
- var flushPendingHide = (0, import_react.useCallback)(function () {
67
- if (pendingHide.current) {
68
- pendingHide.current = false;
69
- setIsKeyboardVisible(false);
70
- setKeyboardHeight(0);
71
- }
72
- }, []);
73
- (0, import_react.useEffect)(function () {
74
- if (!enabled || !keyboardControllerEnabled) return;
75
- var {
76
- KeyboardEvents
77
- } = getKeyboardControllerState();
78
- if (!(KeyboardEvents === null || KeyboardEvents === void 0 ? void 0 : KeyboardEvents.addListener)) return;
79
- var showSub = KeyboardEvents.addListener("keyboardWillShow", function (e) {
80
- var _e_height;
81
- var height = (_e_height = e === null || e === void 0 ? void 0 : e.height) !== null && _e_height !== void 0 ? _e_height : 0;
82
- if (height > 0) {
83
- setKeyboardHeight(height);
84
- }
85
- setIsKeyboardVisible(true);
86
- });
87
- var hideSub = KeyboardEvents.addListener("keyboardWillHide", function () {
88
- if (pauseKeyboardHandler.current) {
89
- pendingHide.current = true;
90
- return;
91
- }
92
- setIsKeyboardVisible(false);
93
- setKeyboardHeight(0);
94
- });
95
- return function () {
96
- var _showSub_remove, _hideSub_remove;
97
- showSub === null || showSub === void 0 ? void 0 : (_showSub_remove = showSub.remove) === null || _showSub_remove === void 0 ? void 0 : _showSub_remove.call(showSub);
98
- hideSub === null || hideSub === void 0 ? void 0 : (_hideSub_remove = hideSub.remove) === null || _hideSub_remove === void 0 ? void 0 : _hideSub_remove.call(hideSub);
99
- };
100
- }, [enabled, keyboardControllerEnabled]);
101
- (0, import_react.useEffect)(function () {
102
- if (!enabled) return;
103
- if (keyboardControllerEnabled) return;
104
- var showEvent = import_react_native.Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow";
105
- var hideEvent = import_react_native.Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide";
106
- var showListener = import_react_native.Keyboard.addListener(showEvent, function (e) {
107
- setKeyboardHeight(e.endCoordinates.height);
108
- setIsKeyboardVisible(true);
109
- });
110
- var hideListener = import_react_native.Keyboard.addListener(hideEvent, function () {
111
- if (pauseKeyboardHandler.current) {
112
- pendingHide.current = true;
113
- return;
114
- }
115
- setIsKeyboardVisible(false);
116
- setKeyboardHeight(0);
117
- });
118
- return function () {
119
- showListener.remove();
120
- hideListener.remove();
121
- };
122
- }, [enabled, keyboardControllerEnabled]);
123
- return {
124
- keyboardControllerEnabled,
125
- keyboardHeight,
126
- isKeyboardVisible,
127
- dismissKeyboard,
128
- pauseKeyboardHandler,
129
- flushPendingHide
130
- };
41
+ var { enabled } = options;
42
+ var [keyboardHeight, setKeyboardHeight] = (0, import_react.useState)(0);
43
+ var [isKeyboardVisible, setIsKeyboardVisible] = (0, import_react.useState)(false);
44
+ var keyboardControllerEnabled = isKeyboardControllerEnabled();
45
+ var pauseKeyboardHandler = (0, import_react.useRef)(false);
46
+ var pendingHide = (0, import_react.useRef)(false);
47
+ var dismissKeyboard = (0, import_react.useCallback)(function() {
48
+ import_react_native.Keyboard.dismiss();
49
+ if (keyboardControllerEnabled) {
50
+ try {
51
+ var _KeyboardController_dismiss;
52
+ var { KeyboardController } = getKeyboardControllerState();
53
+ KeyboardController === null || KeyboardController === void 0 ? void 0 : (_KeyboardController_dismiss = KeyboardController.dismiss) === null || _KeyboardController_dismiss === void 0 ? void 0 : _KeyboardController_dismiss.call(KeyboardController);
54
+ } catch (e) {}
55
+ }
56
+ }, [keyboardControllerEnabled]);
57
+ var flushPendingHide = (0, import_react.useCallback)(function() {
58
+ if (pendingHide.current) {
59
+ pendingHide.current = false;
60
+ setIsKeyboardVisible(false);
61
+ setKeyboardHeight(0);
62
+ }
63
+ }, []);
64
+ (0, import_react.useEffect)(function() {
65
+ if (!enabled || !keyboardControllerEnabled) return;
66
+ var { KeyboardEvents } = getKeyboardControllerState();
67
+ if (!(KeyboardEvents === null || KeyboardEvents === void 0 ? void 0 : KeyboardEvents.addListener)) return;
68
+ var showSub = KeyboardEvents.addListener("keyboardWillShow", function(e) {
69
+ var _e_height;
70
+ var height = (_e_height = e === null || e === void 0 ? void 0 : e.height) !== null && _e_height !== void 0 ? _e_height : 0;
71
+ if (height > 0) {
72
+ setKeyboardHeight(height);
73
+ }
74
+ setIsKeyboardVisible(true);
75
+ });
76
+ var hideSub = KeyboardEvents.addListener("keyboardWillHide", function() {
77
+ if (pauseKeyboardHandler.current) {
78
+ pendingHide.current = true;
79
+ return;
80
+ }
81
+ setIsKeyboardVisible(false);
82
+ setKeyboardHeight(0);
83
+ });
84
+ return function() {
85
+ var _showSub_remove, _hideSub_remove;
86
+ showSub === null || showSub === void 0 ? void 0 : (_showSub_remove = showSub.remove) === null || _showSub_remove === void 0 ? void 0 : _showSub_remove.call(showSub);
87
+ hideSub === null || hideSub === void 0 ? void 0 : (_hideSub_remove = hideSub.remove) === null || _hideSub_remove === void 0 ? void 0 : _hideSub_remove.call(hideSub);
88
+ };
89
+ }, [enabled, keyboardControllerEnabled]);
90
+ (0, import_react.useEffect)(function() {
91
+ if (!enabled) return;
92
+ var showEvent = import_react_native.Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow";
93
+ var hideEvent = import_react_native.Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide";
94
+ var showListener = import_react_native.Keyboard.addListener(showEvent, function(e) {
95
+ setKeyboardHeight(e.endCoordinates.height);
96
+ setIsKeyboardVisible(true);
97
+ });
98
+ var hideListener = import_react_native.Keyboard.addListener(hideEvent, function() {
99
+ if (pauseKeyboardHandler.current) {
100
+ pendingHide.current = true;
101
+ return;
102
+ }
103
+ setIsKeyboardVisible(false);
104
+ setKeyboardHeight(0);
105
+ });
106
+ return function() {
107
+ showListener.remove();
108
+ hideListener.remove();
109
+ };
110
+ }, [enabled, keyboardControllerEnabled]);
111
+ return {
112
+ keyboardControllerEnabled,
113
+ keyboardHeight,
114
+ isKeyboardVisible,
115
+ dismissKeyboard,
116
+ pauseKeyboardHandler,
117
+ flushPendingHide
118
+ };
131
119
  }
120
+
132
121
  //# sourceMappingURL=useKeyboardControllerSheet.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useKeyboardControllerSheet_native_exports","__export","useKeyboardControllerSheet","module","exports","__toCommonJS","import_react","require","import_react_native","isKeyboardControllerEnabled","getKeyboardControllerState","nativeModule","e","options","enabled","keyboardHeight","setKeyboardHeight","useState","isKeyboardVisible","setIsKeyboardVisible","keyboardControllerEnabled","pauseKeyboardHandler","useRef","pendingHide","dismissKeyboard","useCallback","Keyboard","dismiss","_KeyboardController_dismiss","KeyboardController","call","flushPendingHide","current","useEffect","KeyboardEvents","addListener","showSub","_e_height","height","hideSub","_showSub_remove","_hideSub_remove","remove","showEvent","Platform","OS","hideEvent","showListener","endCoordinates","hideListener"],"sources":["../../src/useKeyboardControllerSheet.native.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,yCAAA;AAAAC,QAAA,CAAAD,yCAAA;EAAAE,0BAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAL,yCAAA;AASI,IAAAM,YAAA,GAAyDC,OAAA;AAC7D,IAAAC,mBAAA,GAAmCD,OAAA;AAEnC,IAAIE,2BAAA,GAA8B,SAAAA,CAAA,EAAW;EACzC,OAAO;AACX;AACA,IAAIC,0BAAA,GAA6B,SAAAA,CAAA,EAAW;EACxC,OAAO,CAAC;AACZ;AACA,IAAI;EACA,IAAIC,YAAA,GAAeJ,OAAA,CAAQ,iBAAiB;EAC5CE,2BAAA,GAA8BE,YAAA,CAAaF,2BAAA;EAC3CC,0BAAA,GAA6BC,YAAA,CAAaD,0BAAA;AAC9C,SAASE,CAAA,EAAG,CAAC;AAEN,SAASV,2BAA2BW,OAAA,EAAS;EAChD,IAAI;IAAEC;EAAQ,IAAID,OAAA;EAClB,IAAI,CAACE,cAAA,EAAgBC,iBAAiB,QAAIV,YAAA,CAAAW,QAAA,EAAS,CAAC;EACpD,IAAI,CAACC,iBAAA,EAAmBC,oBAAoB,QAAIb,YAAA,CAAAW,QAAA,EAAS,KAAK;EAC9D,IAAIG,yBAAA,GAA4BX,2BAAA,CAA4B;EAI5D,IAAIY,oBAAA,OAAuBf,YAAA,CAA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B,CAAC;IACD,IAAI8B,YAAA,GAAezC,mBAAA,CAAAkB,QAAA,CAASS,WAAA,CAAYW,SAAA,EAAW,YAAW;MAC1D,IAAIzB,oBAAA,CAAqBW,OAAA,EAAS;QAC9BT,WAAA,CAAYS,OAAA,GAAU;QACtB;MACJ;MACAb,oBAAA,CAAqB,KAAK;MAC1BH,iBAAA,CAAkB,CAAC;IACvB,CAAC;IACD,OAAO,YAAW;MACd+B,YAAA,CAAaL,MAAA,CAAO;MACpBO,YAAA,CAAaP,MAAA,CAAO;IACxB;EACJ,GAAG,CACC5B,OAAA,EACAM,yBAAA,CACH;EACD,OAAO;IACHA,yBAAA;IACAL,cAAA;IACAG,iBAAA;IACAM,eAAA;IACAH,oBAAA;IACAU;EACJ;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"useKeyboardControllerSheet.native.js","names":[],"sources":["cjs/useKeyboardControllerSheet.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 useKeyboardControllerSheet_native_exports = {};\n__export(useKeyboardControllerSheet_native_exports, {\n useKeyboardControllerSheet: () => useKeyboardControllerSheet\n});\nmodule.exports = __toCommonJS(useKeyboardControllerSheet_native_exports);\nvar import_react = require(\"react\");\nvar import_react_native = require(\"react-native\");\nvar isKeyboardControllerEnabled = function() {\n return false;\n};\nvar getKeyboardControllerState = function() {\n return {};\n};\ntry {\n var nativeModule = require(\"@tamagui/native\");\n isKeyboardControllerEnabled = nativeModule.isKeyboardControllerEnabled;\n getKeyboardControllerState = nativeModule.getKeyboardControllerState;\n} catch (e) {\n}\nfunction useKeyboardControllerSheet(options) {\n var { enabled } = options;\n var [keyboardHeight, setKeyboardHeight] = (0, import_react.useState)(0);\n var [isKeyboardVisible, setIsKeyboardVisible] = (0, import_react.useState)(false);\n var keyboardControllerEnabled = isKeyboardControllerEnabled();\n var pauseKeyboardHandler = (0, import_react.useRef)(false);\n var pendingHide = (0, import_react.useRef)(false);\n var dismissKeyboard = (0, import_react.useCallback)(\n function() {\n import_react_native.Keyboard.dismiss();\n if (keyboardControllerEnabled) {\n try {\n var _KeyboardController_dismiss;\n var { KeyboardController } = getKeyboardControllerState();\n KeyboardController === null || KeyboardController === void 0 ? void 0 : (_KeyboardController_dismiss = KeyboardController.dismiss) === null || _KeyboardController_dismiss === void 0 ? void 0 : _KeyboardController_dismiss.call(KeyboardController);\n } catch (e) {\n }\n }\n },\n // ignore errors from keyboard-controller\n [\n keyboardControllerEnabled\n ]\n );\n var flushPendingHide = (0, import_react.useCallback)(function() {\n if (pendingHide.current) {\n pendingHide.current = false;\n setIsKeyboardVisible(false);\n setKeyboardHeight(0);\n }\n }, []);\n (0, import_react.useEffect)(function() {\n if (!enabled || !keyboardControllerEnabled) return;\n var { KeyboardEvents } = getKeyboardControllerState();\n if (!(KeyboardEvents === null || KeyboardEvents === void 0 ? void 0 : KeyboardEvents.addListener)) return;\n var showSub = KeyboardEvents.addListener(\"keyboardWillShow\", function(e) {\n var _e_height;\n var height = (_e_height = e === null || e === void 0 ? void 0 : e.height) !== null && _e_height !== void 0 ? _e_height : 0;\n if (height > 0) {\n setKeyboardHeight(height);\n }\n setIsKeyboardVisible(true);\n });\n var hideSub = KeyboardEvents.addListener(\"keyboardWillHide\", function() {\n if (pauseKeyboardHandler.current) {\n pendingHide.current = true;\n return;\n }\n setIsKeyboardVisible(false);\n setKeyboardHeight(0);\n });\n return function() {\n var _showSub_remove, _hideSub_remove;\n showSub === null || showSub === void 0 ? void 0 : (_showSub_remove = showSub.remove) === null || _showSub_remove === void 0 ? void 0 : _showSub_remove.call(showSub);\n hideSub === null || hideSub === void 0 ? void 0 : (_hideSub_remove = hideSub.remove) === null || _hideSub_remove === void 0 ? void 0 : _hideSub_remove.call(hideSub);\n };\n }, [\n enabled,\n keyboardControllerEnabled\n ]);\n (0, import_react.useEffect)(function() {\n if (!enabled) return;\n var showEvent = import_react_native.Platform.OS === \"ios\" ? \"keyboardWillShow\" : \"keyboardDidShow\";\n var hideEvent = import_react_native.Platform.OS === \"ios\" ? \"keyboardWillHide\" : \"keyboardDidHide\";\n var showListener = import_react_native.Keyboard.addListener(showEvent, function(e) {\n setKeyboardHeight(e.endCoordinates.height);\n setIsKeyboardVisible(true);\n });\n var hideListener = import_react_native.Keyboard.addListener(hideEvent, function() {\n if (pauseKeyboardHandler.current) {\n pendingHide.current = true;\n return;\n }\n setIsKeyboardVisible(false);\n setKeyboardHeight(0);\n });\n return function() {\n showListener.remove();\n hideListener.remove();\n };\n }, [\n enabled,\n keyboardControllerEnabled\n ]);\n return {\n keyboardControllerEnabled,\n keyboardHeight,\n isKeyboardVisible,\n dismissKeyboard,\n pauseKeyboardHandler,\n flushPendingHide\n };\n}\n//# sourceMappingURL=useKeyboardControllerSheet.native.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,YA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