@lodev09/react-native-true-sheet 4.0.0-beta.0 → 4.0.0-beta.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 (367) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +42 -31
  3. package/RNTrueSheet.podspec +10 -2
  4. package/android/build.gradle +2 -1
  5. package/android/src/main/java/com/lodev09/truesheet/TrueSheetContainerView.kt +174 -49
  6. package/android/src/main/java/com/lodev09/truesheet/TrueSheetContainerViewManager.kt +7 -0
  7. package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentView.kt +371 -18
  8. package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentViewManager.kt +14 -0
  9. package/android/src/main/java/com/lodev09/truesheet/TrueSheetFooterView.kt +150 -21
  10. package/android/src/main/java/com/lodev09/truesheet/TrueSheetFooterViewManager.kt +14 -0
  11. package/android/src/main/java/com/lodev09/truesheet/TrueSheetHeaderView.kt +38 -0
  12. package/android/src/main/java/com/lodev09/truesheet/TrueSheetHeaderViewManager.kt +28 -0
  13. package/android/src/main/java/com/lodev09/truesheet/TrueSheetModule.kt +84 -24
  14. package/android/src/main/java/com/lodev09/truesheet/TrueSheetPackage.kt +5 -4
  15. package/android/src/main/java/com/lodev09/truesheet/TrueSheetPeekView.kt +72 -0
  16. package/android/src/main/java/com/lodev09/truesheet/TrueSheetPeekViewManager.kt +33 -0
  17. package/android/src/main/java/com/lodev09/truesheet/TrueSheetStateUpdater.kt +45 -0
  18. package/android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt +526 -231
  19. package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewController.kt +1217 -603
  20. package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewManager.kt +136 -29
  21. package/android/src/main/java/com/lodev09/truesheet/core/RNScreensEventObserver.kt +63 -0
  22. package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetBottomSheetBehavior.kt +36 -0
  23. package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetBottomSheetView.kt +255 -0
  24. package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetCoordinatorLayout.kt +303 -0
  25. package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetDetentCalculator.kt +277 -0
  26. package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetDimView.kt +162 -0
  27. package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetGrabberView.kt +180 -0
  28. package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetKeyboardObserver.kt +207 -0
  29. package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetStackManager.kt +220 -0
  30. package/android/src/main/java/com/lodev09/truesheet/events/TrueSheetDragEvents.kt +71 -0
  31. package/android/src/main/java/com/lodev09/truesheet/events/TrueSheetFocusEvents.kt +65 -0
  32. package/android/src/main/java/com/lodev09/truesheet/events/TrueSheetLifecycleEvents.kt +112 -0
  33. package/android/src/main/java/com/lodev09/truesheet/events/TrueSheetStateEvents.kt +56 -0
  34. package/android/src/main/java/com/lodev09/truesheet/utils/KeyboardUtils.kt +84 -0
  35. package/android/src/main/java/com/lodev09/truesheet/utils/ScreenUtils.kt +93 -67
  36. package/android/src/main/java/com/lodev09/truesheet/utils/ViewUtils.kt +30 -0
  37. package/android/src/main/jni/CMakeLists.txt +63 -0
  38. package/android/src/main/jni/TrueSheetSpec.h +19 -0
  39. package/android/src/main/jni/TrueSheetStateUpdater.cpp +96 -0
  40. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewComponentDescriptor.h +24 -0
  41. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewShadowNode.cpp +43 -0
  42. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewShadowNode.h +28 -0
  43. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewState.cpp +11 -0
  44. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewState.h +37 -0
  45. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewComponentDescriptor.h +24 -0
  46. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewShadowNode.cpp +56 -0
  47. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewShadowNode.h +28 -0
  48. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewState.cpp +11 -0
  49. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewState.h +41 -0
  50. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetInsets.cpp +18 -0
  51. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetInsets.h +16 -0
  52. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewComponentDescriptor.h +28 -0
  53. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewShadowNode.cpp +61 -0
  54. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewShadowNode.h +45 -0
  55. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewState.cpp +23 -0
  56. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewState.h +52 -0
  57. package/ios/TrueSheetContainerView.h +81 -6
  58. package/ios/TrueSheetContainerView.mm +275 -21
  59. package/ios/TrueSheetContentView.h +38 -1
  60. package/ios/TrueSheetContentView.mm +413 -43
  61. package/ios/TrueSheetFooterView.h +27 -2
  62. package/ios/TrueSheetFooterView.mm +141 -35
  63. package/ios/{events/OnDidDismissEvent.h → TrueSheetHeaderView.h} +10 -7
  64. package/ios/TrueSheetHeaderView.mm +64 -0
  65. package/ios/TrueSheetModule.mm +92 -5
  66. package/ios/TrueSheetPeekView.h +32 -0
  67. package/ios/TrueSheetPeekView.mm +99 -0
  68. package/ios/TrueSheetView.h +7 -15
  69. package/ios/TrueSheetView.mm +633 -215
  70. package/ios/TrueSheetViewController.h +84 -16
  71. package/ios/TrueSheetViewController.mm +1136 -333
  72. package/ios/core/RNScreensEventObserver.h +46 -0
  73. package/ios/core/RNScreensEventObserver.mm +280 -0
  74. package/ios/core/TrueSheetBlurView.h +27 -0
  75. package/ios/core/TrueSheetBlurView.mm +82 -0
  76. package/ios/core/TrueSheetDetentCalculator.h +107 -0
  77. package/ios/core/TrueSheetDetentCalculator.mm +197 -0
  78. package/ios/core/TrueSheetGrabberView.h +72 -0
  79. package/ios/core/TrueSheetGrabberView.mm +178 -0
  80. package/ios/core/TrueSheetKeyboardObserver.h +39 -0
  81. package/ios/core/TrueSheetKeyboardObserver.mm +112 -0
  82. package/ios/events/TrueSheetDragEvents.h +39 -0
  83. package/ios/events/TrueSheetDragEvents.mm +62 -0
  84. package/ios/events/{OnPositionChangeEvent.h → TrueSheetFocusEvents.h} +8 -5
  85. package/ios/events/TrueSheetFocusEvents.mm +49 -0
  86. package/ios/events/TrueSheetLifecycleEvents.h +40 -0
  87. package/ios/events/TrueSheetLifecycleEvents.mm +71 -0
  88. package/ios/events/TrueSheetStateEvents.h +35 -0
  89. package/ios/events/TrueSheetStateEvents.mm +49 -0
  90. package/ios/tvos/TrueSheetStubs.mm +154 -0
  91. package/ios/{events/OnMountEvent.h → utils/BlurUtil.h} +5 -7
  92. package/ios/utils/BlurUtil.mm +69 -0
  93. package/ios/utils/GestureUtil.h +7 -0
  94. package/ios/utils/GestureUtil.mm +12 -0
  95. package/ios/utils/PlatformUtil.h +15 -0
  96. package/ios/utils/UIView+FirstResponder.h +15 -0
  97. package/ios/utils/UIView+FirstResponder.mm +26 -0
  98. package/ios/{events/OnWillDismissEvent.h → utils/UIView+ScrollEdgeInteraction.h} +6 -7
  99. package/ios/utils/UIView+ScrollEdgeInteraction.mm +62 -0
  100. package/ios/utils/WindowUtil.mm +17 -1
  101. package/lib/module/TrueSheet.js +224 -64
  102. package/lib/module/TrueSheet.js.map +1 -1
  103. package/lib/module/TrueSheet.web.js +1201 -0
  104. package/lib/module/TrueSheet.web.js.map +1 -0
  105. package/lib/module/TrueSheetPeek.js +15 -0
  106. package/lib/module/TrueSheetPeek.js.map +1 -0
  107. package/lib/module/TrueSheetPeek.web.js +55 -0
  108. package/lib/module/TrueSheetPeek.web.js.map +1 -0
  109. package/lib/module/TrueSheetProvider.js +28 -0
  110. package/lib/module/TrueSheetProvider.js.map +1 -0
  111. package/lib/module/TrueSheetProvider.web.js +157 -0
  112. package/lib/module/TrueSheetProvider.web.js.map +1 -0
  113. package/lib/module/fabric/TrueSheetContainerViewNativeComponent.ts +1 -1
  114. package/lib/module/fabric/TrueSheetContentViewNativeComponent.ts +5 -1
  115. package/lib/module/fabric/TrueSheetFooterViewNativeComponent.ts +10 -2
  116. package/lib/module/fabric/TrueSheetHeaderViewNativeComponent.ts +8 -0
  117. package/lib/module/fabric/TrueSheetPeekViewNativeComponent.ts +8 -0
  118. package/lib/module/fabric/TrueSheetViewNativeComponent.ts +105 -18
  119. package/lib/module/index.js +3 -3
  120. package/lib/module/index.js.map +1 -1
  121. package/lib/module/mocks/index.js +93 -0
  122. package/lib/module/mocks/index.js.map +1 -0
  123. package/lib/module/mocks/navigation.js +85 -0
  124. package/lib/module/mocks/navigation.js.map +1 -0
  125. package/lib/module/mocks/reanimated.js +91 -0
  126. package/lib/module/mocks/reanimated.js.map +1 -0
  127. package/lib/module/navigation/TrueSheetRouter.js +170 -0
  128. package/lib/module/navigation/TrueSheetRouter.js.map +1 -0
  129. package/lib/module/navigation/TrueSheetView.js +71 -0
  130. package/lib/module/navigation/TrueSheetView.js.map +1 -0
  131. package/lib/module/navigation/createTrueSheetNavigator.js +63 -0
  132. package/lib/module/navigation/createTrueSheetNavigator.js.map +1 -0
  133. package/lib/module/navigation/index.js +6 -0
  134. package/lib/module/navigation/index.js.map +1 -0
  135. package/lib/module/navigation/screen/ReanimatedTrueSheetScreen.js +56 -0
  136. package/lib/module/navigation/screen/ReanimatedTrueSheetScreen.js.map +1 -0
  137. package/lib/module/navigation/screen/TrueSheetScreen.js +49 -0
  138. package/lib/module/navigation/screen/TrueSheetScreen.js.map +1 -0
  139. package/lib/module/navigation/screen/index.js +5 -0
  140. package/lib/module/navigation/screen/index.js.map +1 -0
  141. package/lib/module/navigation/screen/types.js +4 -0
  142. package/lib/module/navigation/screen/types.js.map +1 -0
  143. package/lib/module/navigation/screen/useSheetScreenState.js +68 -0
  144. package/lib/module/navigation/screen/useSheetScreenState.js.map +1 -0
  145. package/lib/module/navigation/types.js +4 -0
  146. package/lib/module/navigation/types.js.map +1 -0
  147. package/lib/module/navigation/useTrueSheetNavigation.js +24 -0
  148. package/lib/module/navigation/useTrueSheetNavigation.js.map +1 -0
  149. package/lib/module/reanimated/ReanimatedTrueSheet.js +15 -9
  150. package/lib/module/reanimated/ReanimatedTrueSheet.js.map +1 -1
  151. package/lib/module/reanimated/ReanimatedTrueSheet.web.js +81 -0
  152. package/lib/module/reanimated/ReanimatedTrueSheet.web.js.map +1 -0
  153. package/lib/module/reanimated/ReanimatedTrueSheetProvider.js +4 -2
  154. package/lib/module/reanimated/ReanimatedTrueSheetProvider.js.map +1 -1
  155. package/lib/module/reanimated/index.js +2 -2
  156. package/lib/module/reanimated/index.js.map +1 -1
  157. package/lib/module/reanimated/useReanimatedPositionChangeHandler.web.js +20 -0
  158. package/lib/module/reanimated/useReanimatedPositionChangeHandler.web.js.map +1 -0
  159. package/lib/module/specs/NativeTrueSheetModule.js.map +1 -1
  160. package/lib/module/web/constants.js +16 -0
  161. package/lib/module/web/constants.js.map +1 -0
  162. package/lib/module/web/vaul/README.md +9 -0
  163. package/lib/module/web/vaul/browser.js +30 -0
  164. package/lib/module/web/vaul/browser.js.map +1 -0
  165. package/lib/module/web/vaul/constants.js +15 -0
  166. package/lib/module/web/vaul/constants.js.map +1 -0
  167. package/lib/module/web/vaul/context.js +59 -0
  168. package/lib/module/web/vaul/context.js.map +1 -0
  169. package/lib/module/web/vaul/helpers.js +93 -0
  170. package/lib/module/web/vaul/helpers.js.map +1 -0
  171. package/lib/module/web/vaul/index.js +1309 -0
  172. package/lib/module/web/vaul/index.js.map +1 -0
  173. package/lib/module/web/vaul/style.css +287 -0
  174. package/lib/module/web/vaul/style.css.d.js +2 -0
  175. package/lib/module/web/vaul/style.css.d.js.map +1 -0
  176. package/lib/module/web/vaul/types.js +2 -0
  177. package/lib/module/web/vaul/types.js.map +1 -0
  178. package/lib/module/web/vaul/use-composed-refs.js +34 -0
  179. package/lib/module/web/vaul/use-composed-refs.js.map +1 -0
  180. package/lib/module/web/vaul/use-controllable-state.js +54 -0
  181. package/lib/module/web/vaul/use-controllable-state.js.map +1 -0
  182. package/lib/module/web/vaul/use-position-fixed.js +123 -0
  183. package/lib/module/web/vaul/use-position-fixed.js.map +1 -0
  184. package/lib/module/web/vaul/use-prevent-scroll.js +258 -0
  185. package/lib/module/web/vaul/use-prevent-scroll.js.map +1 -0
  186. package/lib/module/web/vaul/use-scale-background.js +57 -0
  187. package/lib/module/web/vaul/use-scale-background.js.map +1 -0
  188. package/lib/module/web/vaul/use-snap-points.js +305 -0
  189. package/lib/module/web/vaul/use-snap-points.js.map +1 -0
  190. package/lib/typescript/src/TrueSheet.d.ts +51 -14
  191. package/lib/typescript/src/TrueSheet.d.ts.map +1 -1
  192. package/lib/typescript/src/TrueSheet.types.d.ts +463 -54
  193. package/lib/typescript/src/TrueSheet.types.d.ts.map +1 -1
  194. package/lib/typescript/src/TrueSheet.web.d.ts +5 -0
  195. package/lib/typescript/src/TrueSheet.web.d.ts.map +1 -0
  196. package/lib/typescript/src/TrueSheetPeek.d.ts +9 -0
  197. package/lib/typescript/src/TrueSheetPeek.d.ts.map +1 -0
  198. package/lib/typescript/src/TrueSheetPeek.web.d.ts +28 -0
  199. package/lib/typescript/src/TrueSheetPeek.web.d.ts.map +1 -0
  200. package/lib/typescript/src/TrueSheetProvider.d.ts +18 -0
  201. package/lib/typescript/src/TrueSheetProvider.d.ts.map +1 -0
  202. package/lib/typescript/src/TrueSheetProvider.web.d.ts +27 -0
  203. package/lib/typescript/src/TrueSheetProvider.web.d.ts.map +1 -0
  204. package/lib/typescript/src/fabric/TrueSheetContainerViewNativeComponent.d.ts.map +1 -1
  205. package/lib/typescript/src/fabric/TrueSheetContentViewNativeComponent.d.ts.map +1 -1
  206. package/lib/typescript/src/fabric/TrueSheetFooterViewNativeComponent.d.ts +2 -0
  207. package/lib/typescript/src/fabric/TrueSheetFooterViewNativeComponent.d.ts.map +1 -1
  208. package/lib/typescript/src/fabric/TrueSheetHeaderViewNativeComponent.d.ts +6 -0
  209. package/lib/typescript/src/fabric/TrueSheetHeaderViewNativeComponent.d.ts.map +1 -0
  210. package/lib/typescript/src/fabric/TrueSheetPeekViewNativeComponent.d.ts +6 -0
  211. package/lib/typescript/src/fabric/TrueSheetPeekViewNativeComponent.d.ts.map +1 -0
  212. package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts +67 -16
  213. package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts.map +1 -1
  214. package/lib/typescript/src/index.d.ts +2 -2
  215. package/lib/typescript/src/index.d.ts.map +1 -1
  216. package/lib/typescript/src/mocks/index.d.ts +43 -0
  217. package/lib/typescript/src/mocks/index.d.ts.map +1 -0
  218. package/lib/typescript/src/mocks/navigation.d.ts +66 -0
  219. package/lib/typescript/src/mocks/navigation.d.ts.map +1 -0
  220. package/lib/typescript/src/mocks/reanimated.d.ts +48 -0
  221. package/lib/typescript/src/mocks/reanimated.d.ts.map +1 -0
  222. package/lib/typescript/src/navigation/TrueSheetRouter.d.ts +57 -0
  223. package/lib/typescript/src/navigation/TrueSheetRouter.d.ts.map +1 -0
  224. package/lib/typescript/src/navigation/TrueSheetView.d.ts +10 -0
  225. package/lib/typescript/src/navigation/TrueSheetView.d.ts.map +1 -0
  226. package/lib/typescript/src/navigation/createTrueSheetNavigator.d.ts +35 -0
  227. package/lib/typescript/src/navigation/createTrueSheetNavigator.d.ts.map +1 -0
  228. package/lib/typescript/src/navigation/index.d.ts +6 -0
  229. package/lib/typescript/src/navigation/index.d.ts.map +1 -0
  230. package/lib/typescript/src/navigation/screen/ReanimatedTrueSheetScreen.d.ts +3 -0
  231. package/lib/typescript/src/navigation/screen/ReanimatedTrueSheetScreen.d.ts.map +1 -0
  232. package/lib/typescript/src/navigation/screen/TrueSheetScreen.d.ts +3 -0
  233. package/lib/typescript/src/navigation/screen/TrueSheetScreen.d.ts.map +1 -0
  234. package/lib/typescript/src/navigation/screen/index.d.ts +4 -0
  235. package/lib/typescript/src/navigation/screen/index.d.ts.map +1 -0
  236. package/lib/typescript/src/navigation/screen/types.d.ts +15 -0
  237. package/lib/typescript/src/navigation/screen/types.d.ts.map +1 -0
  238. package/lib/typescript/src/navigation/screen/useSheetScreenState.d.ts +35 -0
  239. package/lib/typescript/src/navigation/screen/useSheetScreenState.d.ts.map +1 -0
  240. package/lib/typescript/src/navigation/types.d.ts +153 -0
  241. package/lib/typescript/src/navigation/types.d.ts.map +1 -0
  242. package/lib/typescript/src/navigation/useTrueSheetNavigation.d.ts +23 -0
  243. package/lib/typescript/src/navigation/useTrueSheetNavigation.d.ts.map +1 -0
  244. package/lib/typescript/src/reanimated/ReanimatedTrueSheet.d.ts.map +1 -1
  245. package/lib/typescript/src/reanimated/ReanimatedTrueSheet.web.d.ts +41 -0
  246. package/lib/typescript/src/reanimated/ReanimatedTrueSheet.web.d.ts.map +1 -0
  247. package/lib/typescript/src/reanimated/ReanimatedTrueSheetProvider.d.ts +8 -2
  248. package/lib/typescript/src/reanimated/ReanimatedTrueSheetProvider.d.ts.map +1 -1
  249. package/lib/typescript/src/reanimated/useReanimatedPositionChangeHandler.web.d.ts +15 -0
  250. package/lib/typescript/src/reanimated/useReanimatedPositionChangeHandler.web.d.ts.map +1 -0
  251. package/lib/typescript/src/specs/NativeTrueSheetModule.d.ts +25 -3
  252. package/lib/typescript/src/specs/NativeTrueSheetModule.d.ts.map +1 -1
  253. package/lib/typescript/src/web/constants.d.ts +14 -0
  254. package/lib/typescript/src/web/constants.d.ts.map +1 -0
  255. package/lib/typescript/src/web/vaul/browser.d.ts +8 -0
  256. package/lib/typescript/src/web/vaul/browser.d.ts.map +1 -0
  257. package/lib/typescript/src/web/vaul/constants.d.ts +13 -0
  258. package/lib/typescript/src/web/vaul/constants.d.ts.map +1 -0
  259. package/lib/typescript/src/web/vaul/context.d.ts +53 -0
  260. package/lib/typescript/src/web/vaul/context.d.ts.map +1 -0
  261. package/lib/typescript/src/web/vaul/helpers.d.ts +17 -0
  262. package/lib/typescript/src/web/vaul/helpers.d.ts.map +1 -0
  263. package/lib/typescript/src/web/vaul/index.d.ts +228 -0
  264. package/lib/typescript/src/web/vaul/index.d.ts.map +1 -0
  265. package/lib/typescript/src/web/vaul/types.d.ts +7 -0
  266. package/lib/typescript/src/web/vaul/types.d.ts.map +1 -0
  267. package/lib/typescript/src/web/vaul/use-composed-refs.d.ts +14 -0
  268. package/lib/typescript/src/web/vaul/use-composed-refs.d.ts.map +1 -0
  269. package/lib/typescript/src/web/vaul/use-controllable-state.d.ts +9 -0
  270. package/lib/typescript/src/web/vaul/use-controllable-state.d.ts.map +1 -0
  271. package/lib/typescript/src/web/vaul/use-position-fixed.d.ts +19 -0
  272. package/lib/typescript/src/web/vaul/use-position-fixed.d.ts.map +1 -0
  273. package/lib/typescript/src/web/vaul/use-prevent-scroll.d.ts +18 -0
  274. package/lib/typescript/src/web/vaul/use-prevent-scroll.d.ts.map +1 -0
  275. package/lib/typescript/src/web/vaul/use-scale-background.d.ts +2 -0
  276. package/lib/typescript/src/web/vaul/use-scale-background.d.ts.map +1 -0
  277. package/lib/typescript/src/web/vaul/use-snap-points.d.ts +38 -0
  278. package/lib/typescript/src/web/vaul/use-snap-points.d.ts.map +1 -0
  279. package/package.json +78 -34
  280. package/react-native.config.js +9 -2
  281. package/src/TrueSheet.tsx +276 -60
  282. package/src/TrueSheet.types.ts +525 -71
  283. package/src/TrueSheet.web.tsx +1366 -0
  284. package/src/TrueSheetPeek.tsx +11 -0
  285. package/src/TrueSheetPeek.web.tsx +63 -0
  286. package/src/TrueSheetProvider.tsx +33 -0
  287. package/src/TrueSheetProvider.web.tsx +220 -0
  288. package/src/fabric/TrueSheetContainerViewNativeComponent.ts +1 -1
  289. package/src/fabric/TrueSheetContentViewNativeComponent.ts +5 -1
  290. package/src/fabric/TrueSheetFooterViewNativeComponent.ts +10 -2
  291. package/src/fabric/TrueSheetHeaderViewNativeComponent.ts +8 -0
  292. package/src/fabric/TrueSheetPeekViewNativeComponent.ts +8 -0
  293. package/src/fabric/TrueSheetViewNativeComponent.ts +105 -18
  294. package/src/index.ts +2 -2
  295. package/src/mocks/index.ts +89 -0
  296. package/src/mocks/navigation.ts +72 -0
  297. package/src/mocks/reanimated.ts +101 -0
  298. package/src/navigation/TrueSheetRouter.ts +234 -0
  299. package/src/navigation/TrueSheetView.tsx +99 -0
  300. package/src/navigation/createTrueSheetNavigator.tsx +93 -0
  301. package/src/navigation/index.ts +14 -0
  302. package/src/navigation/screen/ReanimatedTrueSheetScreen.tsx +61 -0
  303. package/src/navigation/screen/TrueSheetScreen.tsx +54 -0
  304. package/src/navigation/screen/index.ts +3 -0
  305. package/src/navigation/screen/types.ts +21 -0
  306. package/src/navigation/screen/useSheetScreenState.ts +107 -0
  307. package/src/navigation/types.ts +219 -0
  308. package/src/navigation/useTrueSheetNavigation.ts +26 -0
  309. package/src/reanimated/ReanimatedTrueSheet.tsx +12 -7
  310. package/src/reanimated/ReanimatedTrueSheet.web.tsx +75 -0
  311. package/src/reanimated/ReanimatedTrueSheetProvider.tsx +12 -8
  312. package/src/reanimated/useReanimatedPositionChangeHandler.web.ts +31 -0
  313. package/src/specs/NativeTrueSheetModule.ts +28 -3
  314. package/src/web/constants.ts +13 -0
  315. package/src/web/vaul/README.md +9 -0
  316. package/src/web/vaul/browser.ts +38 -0
  317. package/src/web/vaul/constants.ts +20 -0
  318. package/src/web/vaul/context.ts +101 -0
  319. package/src/web/vaul/helpers.ts +124 -0
  320. package/src/web/vaul/index.tsx +1740 -0
  321. package/src/web/vaul/style.css +287 -0
  322. package/src/web/vaul/style.css.d.ts +1 -0
  323. package/src/web/vaul/types.ts +7 -0
  324. package/src/web/vaul/use-composed-refs.ts +35 -0
  325. package/src/web/vaul/use-controllable-state.ts +66 -0
  326. package/src/web/vaul/use-position-fixed.ts +147 -0
  327. package/src/web/vaul/use-prevent-scroll.ts +309 -0
  328. package/src/web/vaul/use-scale-background.ts +64 -0
  329. package/src/web/vaul/use-snap-points.ts +455 -0
  330. package/android/src/main/java/com/lodev09/truesheet/events/DetentChangeEvent.kt +0 -26
  331. package/android/src/main/java/com/lodev09/truesheet/events/DidDismissEvent.kt +0 -20
  332. package/android/src/main/java/com/lodev09/truesheet/events/DidPresentEvent.kt +0 -26
  333. package/android/src/main/java/com/lodev09/truesheet/events/DragBeginEvent.kt +0 -26
  334. package/android/src/main/java/com/lodev09/truesheet/events/DragChangeEvent.kt +0 -26
  335. package/android/src/main/java/com/lodev09/truesheet/events/DragEndEvent.kt +0 -26
  336. package/android/src/main/java/com/lodev09/truesheet/events/MountEvent.kt +0 -20
  337. package/android/src/main/java/com/lodev09/truesheet/events/PositionChangeEvent.kt +0 -32
  338. package/android/src/main/java/com/lodev09/truesheet/events/SizeChangeEvent.kt +0 -27
  339. package/android/src/main/java/com/lodev09/truesheet/events/WillDismissEvent.kt +0 -20
  340. package/android/src/main/java/com/lodev09/truesheet/events/WillPresentEvent.kt +0 -26
  341. package/android/src/main/res/values/styles.xml +0 -8
  342. package/ios/events/OnDetentChangeEvent.h +0 -28
  343. package/ios/events/OnDetentChangeEvent.mm +0 -30
  344. package/ios/events/OnDidDismissEvent.mm +0 -25
  345. package/ios/events/OnDidPresentEvent.h +0 -28
  346. package/ios/events/OnDidPresentEvent.mm +0 -30
  347. package/ios/events/OnDragBeginEvent.h +0 -28
  348. package/ios/events/OnDragBeginEvent.mm +0 -30
  349. package/ios/events/OnDragChangeEvent.h +0 -28
  350. package/ios/events/OnDragChangeEvent.mm +0 -30
  351. package/ios/events/OnDragEndEvent.h +0 -28
  352. package/ios/events/OnDragEndEvent.mm +0 -30
  353. package/ios/events/OnMountEvent.mm +0 -25
  354. package/ios/events/OnPositionChangeEvent.mm +0 -32
  355. package/ios/events/OnSizeChangeEvent.h +0 -28
  356. package/ios/events/OnSizeChangeEvent.mm +0 -30
  357. package/ios/events/OnWillDismissEvent.mm +0 -25
  358. package/ios/events/OnWillPresentEvent.h +0 -28
  359. package/ios/events/OnWillPresentEvent.mm +0 -30
  360. package/ios/utils/LayoutUtil.h +0 -44
  361. package/ios/utils/LayoutUtil.mm +0 -50
  362. package/lib/module/TrueSheetGrabber.js +0 -51
  363. package/lib/module/TrueSheetGrabber.js.map +0 -1
  364. package/lib/typescript/src/TrueSheetGrabber.d.ts +0 -39
  365. package/lib/typescript/src/TrueSheetGrabber.d.ts.map +0 -1
  366. package/src/TrueSheetGrabber.tsx +0 -82
  367. package/src/__mocks__/index.js +0 -67
@@ -0,0 +1,9 @@
1
+ import type { ViewProps } from 'react-native';
2
+ /**
3
+ * Wrapper component that marks its children as the sheet's peek content.
4
+ * When rendered within a `TrueSheet`, the `"peek"` detent reveals everything
5
+ * from the top of the sheet through the bottom of this component — content
6
+ * below it stays hidden until the sheet is expanded.
7
+ */
8
+ export declare const TrueSheetPeek: (props: ViewProps) => import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=TrueSheetPeek.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrueSheetPeek.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetPeek.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,SAAS,4CAAoD,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { type RefObject } from 'react';
2
+ import { View, type ViewProps } from 'react-native';
3
+ /**
4
+ * Reports the measured peek content height to the owning TrueSheet.
5
+ * @internal
6
+ */
7
+ export interface TrueSheetPeekContextValue {
8
+ contentRef: RefObject<View | null>;
9
+ peekRef: RefObject<View | null>;
10
+ setPeekContentHeight: (height: number) => void;
11
+ }
12
+ export declare const TrueSheetPeekContext: import("react").Context<TrueSheetPeekContextValue | null>;
13
+ /**
14
+ * Distance from the top of the content view to the bottom of the peek view,
15
+ * so the peek view's offset within the content (padding, views above it)
16
+ * counts toward the peek detent. Both rects live in the drawer's transformed
17
+ * subtree, so an in-flight translate cancels out of the delta.
18
+ * @internal
19
+ */
20
+ export declare const measurePeekContentHeight: (peekElement: HTMLElement, contentElement: HTMLElement) => number;
21
+ /**
22
+ * Wrapper component that marks its children as the sheet's peek content.
23
+ * When rendered within a `TrueSheet`, the `"peek"` detent reveals everything
24
+ * from the top of the sheet through the bottom of this component — content
25
+ * below it stays hidden until the sheet is expanded.
26
+ */
27
+ export declare const TrueSheetPeek: ({ onLayout, ...rest }: ViewProps) => import("react/jsx-runtime").JSX.Element;
28
+ //# sourceMappingURL=TrueSheetPeek.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrueSheetPeek.web.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetPeek.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAC;AACrF,OAAO,EAA0B,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACnC,OAAO,EAAE,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAChC,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,oBAAoB,2DAAwD,CAAC;AAE1F;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GACnC,aAAa,WAAW,EACxB,gBAAgB,WAAW,KAC1B,MACsF,CAAC;AAE1F;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,uBAAuB,SAAS,4CA4B7D,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { TrueSheetStaticMethods } from './TrueSheet.types';
3
+ export type { TrueSheetStaticMethods };
4
+ export interface TrueSheetProviderProps {
5
+ children: ReactNode;
6
+ }
7
+ /**
8
+ * Provider for TrueSheet on native platforms.
9
+ * This is a pass-through component - no context is needed on native
10
+ * since TrueSheet uses static instance methods internally.
11
+ */
12
+ export declare function TrueSheetProvider({ children }: TrueSheetProviderProps): ReactNode;
13
+ /**
14
+ * Hook to control TrueSheet instances by name.
15
+ * On native, this maps directly to TrueSheet static methods.
16
+ */
17
+ export declare function useTrueSheet(): TrueSheetStaticMethods;
18
+ //# sourceMappingURL=TrueSheetProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrueSheetProvider.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,YAAY,EAAE,sBAAsB,EAAE,CAAC;AAEvC,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE,sBAAsB,aAErE;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,sBAAsB,CAQrD"}
@@ -0,0 +1,27 @@
1
+ import { type ReactNode, type RefObject } from 'react';
2
+ import type { TrueSheetMethods, TrueSheetStaticMethods } from './TrueSheet.types';
3
+ type SheetRef = RefObject<TrueSheetMethods | null>;
4
+ type NodeRef = RefObject<HTMLDivElement | null>;
5
+ interface StackEntry {
6
+ ref: SheetRef;
7
+ nodeRef: NodeRef;
8
+ isFormSheetRef: RefObject<boolean>;
9
+ }
10
+ export interface TrueSheetProviderProps {
11
+ children: ReactNode;
12
+ }
13
+ export declare function TrueSheetProvider({ children }: TrueSheetProviderProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function usePortalContainer(): HTMLElement | null;
15
+ export declare function useTrueSheet(): TrueSheetStaticMethods;
16
+ export declare function useRegisterSheet(name: string | undefined, ref: SheetRef): void;
17
+ /**
18
+ * Registers the sheet in the open stack while `isOpen` is true and returns
19
+ * live data used by each sheet to render stacked visuals and dismiss children.
20
+ */
21
+ export declare function useSheetStack(ref: SheetRef, nodeRef: NodeRef, isOpen: boolean, isFormSheet: boolean): {
22
+ descendants: readonly StackEntry[];
23
+ isNested: boolean;
24
+ dismissAbove: (animated?: boolean) => Promise<void>;
25
+ };
26
+ export {};
27
+ //# sourceMappingURL=TrueSheetProvider.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrueSheetProvider.web.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetProvider.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAElF,KAAK,QAAQ,GAAG,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;AACnD,KAAK,OAAO,GAAG,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;AAEhD,UAAU,UAAU;IAClB,GAAG,EAAE,QAAQ,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CACpC;AAmBD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE,sBAAsB,2CAyErE;AAED,wBAAgB,kBAAkB,IAAI,WAAW,GAAG,IAAI,CAGvD;AAED,wBAAgB,YAAY,IAAI,sBAAsB,CA8BrD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,CAM9E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,QAAQ,EACb,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,OAAO,EACf,WAAW,EAAE,OAAO;;;8BAkCA,OAAO;EAY5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"TrueSheetContainerViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetContainerViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAED,wBAAiF"}
1
+ {"version":3,"file":"TrueSheetContainerViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetContainerViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAED,wBAA6E"}
@@ -1 +1 @@
1
- {"version":3,"file":"TrueSheetContentViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetContentViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAED,wBAA+E"}
1
+ {"version":3,"file":"TrueSheetContentViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetContentViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAID,wBAEG"}
@@ -1,5 +1,7 @@
1
1
  import type { ViewProps } from 'react-native';
2
+ import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
2
3
  export interface NativeProps extends ViewProps {
4
+ autoBottomInset?: WithDefault<boolean, false>;
3
5
  }
4
6
  declare const _default: import("react-native").HostComponent<NativeProps>;
5
7
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"TrueSheetFooterViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetFooterViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAED,wBAA8E"}
1
+ {"version":3,"file":"TrueSheetFooterViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetFooterViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAG7E,MAAM,WAAW,WAAY,SAAQ,SAAS;IAI5C,eAAe,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;CAC/C;;AAID,wBAEG"}
@@ -0,0 +1,6 @@
1
+ import type { ViewProps } from 'react-native';
2
+ export interface NativeProps extends ViewProps {
3
+ }
4
+ declare const _default: import("react-native").HostComponent<NativeProps>;
5
+ export default _default;
6
+ //# sourceMappingURL=TrueSheetHeaderViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrueSheetHeaderViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetHeaderViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAED,wBAA8E"}
@@ -0,0 +1,6 @@
1
+ import type { ViewProps } from 'react-native';
2
+ export interface NativeProps extends ViewProps {
3
+ }
4
+ declare const _default: import("react-native").HostComponent<NativeProps>;
5
+ export default _default;
6
+ //# sourceMappingURL=TrueSheetPeekViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrueSheetPeekViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetPeekViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAED,wBAA4E"}
@@ -1,32 +1,77 @@
1
- import type { ViewProps } from 'react-native';
2
- import type { DirectEventHandler, Double, Int32, WithDefault, Float } from 'react-native/Libraries/Types/CodegenTypes';
1
+ import type { ColorValue, ProcessedColorValue, ViewProps } from 'react-native';
2
+ import type { DirectEventHandler, Double, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
3
+ type GrabberOptionsType = Readonly<{
4
+ width?: Double;
5
+ height?: Double;
6
+ topMargin?: Double;
7
+ cornerRadius?: WithDefault<Double, -1>;
8
+ color?: ProcessedColorValue | null;
9
+ adaptive?: WithDefault<boolean, true>;
10
+ }>;
11
+ type AccessibilityOptionsType = Readonly<{
12
+ grabberLabel?: WithDefault<string, 'Sheet Grabber'>;
13
+ grabberHint?: WithDefault<string, 'Double-tap to expand. Swipe up or down to resize the sheet'>;
14
+ expandedValue?: WithDefault<string, 'Expanded'>;
15
+ collapsedValue?: WithDefault<string, 'Collapsed'>;
16
+ detentValue?: WithDefault<string, 'Detent {index} of {count}'>;
17
+ expandActionLabel?: WithDefault<string, 'Expand'>;
18
+ collapseActionLabel?: WithDefault<string, 'Collapse'>;
19
+ paneTitle?: WithDefault<string, 'Bottom sheet'>;
20
+ }>;
21
+ type BlurOptionsType = Readonly<{
22
+ intensity?: WithDefault<Double, -1>;
23
+ interaction?: WithDefault<boolean, true>;
24
+ }>;
25
+ type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
26
+ type ScrollableOptionsType = Readonly<{
27
+ keyboardScrollOffset?: WithDefault<Double, 0>;
28
+ scrollingExpandsSheet?: WithDefault<boolean, true>;
29
+ topScrollEdgeEffect?: WithDefault<ScrollEdgeEffect, 'hidden'>;
30
+ bottomScrollEdgeEffect?: WithDefault<ScrollEdgeEffect, 'hidden'>;
31
+ }>;
32
+ type FooterOptionsType = Readonly<{
33
+ footerPosition?: WithDefault<'relative' | 'absolute', 'relative'>;
34
+ keyboardOffset?: WithDefault<Double, 0>;
35
+ }>;
36
+ type HeaderOptionsType = Readonly<{
37
+ position?: WithDefault<'relative' | 'absolute', 'relative'>;
38
+ }>;
3
39
  export interface DetentInfoEventPayload {
4
40
  index: Int32;
5
41
  position: Double;
42
+ detent: Double;
6
43
  }
7
44
  export interface PositionChangeEventPayload {
8
- index: Int32;
45
+ index: Double;
9
46
  position: Double;
10
- transitioning: boolean;
11
- }
12
- export interface SizeChangeEventPayload {
13
- width: Double;
14
- height: Double;
47
+ detent: Double;
48
+ realtime: boolean;
15
49
  }
16
50
  export interface NativeProps extends ViewProps {
17
- detents?: ReadonlyArray<Float>;
18
- maxHeight?: WithDefault<Double, 0>;
19
- background?: WithDefault<Int32, 0>;
51
+ detents?: ReadonlyArray<Double>;
52
+ maxContentHeight?: WithDefault<Double, 0>;
53
+ maxContentWidth?: WithDefault<Double, 0>;
20
54
  cornerRadius?: WithDefault<Double, -1>;
55
+ elevation?: WithDefault<Double, -1>;
56
+ backgroundColor?: ColorValue;
21
57
  initialDetentIndex?: WithDefault<Int32, -1>;
22
- dimmedIndex?: WithDefault<Int32, 0>;
23
- blurTint?: WithDefault<string, ''>;
24
- keyboardMode?: WithDefault<'resize' | 'pan', 'resize'>;
58
+ dimmedDetentIndex?: WithDefault<Int32, 0>;
59
+ backgroundBlur?: WithDefault<'none' | 'light' | 'dark' | 'default' | 'extra-light' | 'regular' | 'prominent' | 'system-ultra-thin-material' | 'system-thin-material' | 'system-material' | 'system-thick-material' | 'system-chrome-material' | 'system-ultra-thin-material-light' | 'system-thin-material-light' | 'system-material-light' | 'system-thick-material-light' | 'system-chrome-material-light' | 'system-ultra-thin-material-dark' | 'system-thin-material-dark' | 'system-material-dark' | 'system-thick-material-dark' | 'system-chrome-material-dark', 'none'>;
60
+ anchor?: WithDefault<'left' | 'center' | 'right', 'center'>;
61
+ anchorOffset?: WithDefault<Double, 16>;
62
+ insetAdjustment?: WithDefault<'automatic' | 'never', 'automatic'>;
63
+ blurOptions?: BlurOptionsType;
25
64
  grabber?: WithDefault<boolean, true>;
65
+ grabberOptions?: GrabberOptionsType;
66
+ accessibilityOptions?: AccessibilityOptionsType;
26
67
  dismissible?: WithDefault<boolean, true>;
68
+ draggable?: WithDefault<boolean, true>;
27
69
  dimmed?: WithDefault<boolean, true>;
28
70
  initialDetentAnimated?: WithDefault<boolean, true>;
29
- edgeToEdgeFullScreen?: WithDefault<boolean, false>;
71
+ scrollableOptions?: ScrollableOptionsType;
72
+ headerOptions?: HeaderOptionsType;
73
+ footerOptions?: FooterOptionsType;
74
+ presentation?: WithDefault<'page' | 'form', 'page'>;
30
75
  onMount?: DirectEventHandler<null>;
31
76
  onWillPresent?: DirectEventHandler<DetentInfoEventPayload>;
32
77
  onDidPresent?: DirectEventHandler<DetentInfoEventPayload>;
@@ -37,7 +82,13 @@ export interface NativeProps extends ViewProps {
37
82
  onDragChange?: DirectEventHandler<DetentInfoEventPayload>;
38
83
  onDragEnd?: DirectEventHandler<DetentInfoEventPayload>;
39
84
  onPositionChange?: DirectEventHandler<PositionChangeEventPayload>;
40
- onSizeChange?: DirectEventHandler<SizeChangeEventPayload>;
85
+ onWillFocus?: DirectEventHandler<null>;
86
+ onDidFocus?: DirectEventHandler<null>;
87
+ onWillBlur?: DirectEventHandler<null>;
88
+ onDidBlur?: DirectEventHandler<null>;
89
+ onVisibilityChange?: DirectEventHandler<Readonly<{
90
+ visible: boolean;
91
+ }>>;
41
92
  }
42
93
  declare const _default: import("react-native").HostComponent<NativeProps>;
43
94
  export default _default;
@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,5 +1,5 @@
1
1
  export * from './TrueSheet';
2
2
  export * from './TrueSheet.types';
3
- export * from './TrueSheetGrabber';
4
- export * from './reanimated';
3
+ export { TrueSheetPeek } from './TrueSheetPeek';
4
+ export { TrueSheetProvider, useTrueSheet } from './TrueSheetProvider';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import { View, type ViewProps } from 'react-native';
3
+ import type { TrueSheetProps, TrueSheetStaticMethods } from '../TrueSheet.types';
4
+ interface TrueSheetState {
5
+ shouldRenderNativeView: boolean;
6
+ }
7
+ /**
8
+ * Mock TrueSheet component for testing.
9
+ * Import from '@lodev09/react-native-true-sheet/mock' in your test setup.
10
+ */
11
+ export declare class TrueSheet extends React.Component<TrueSheetProps, TrueSheetState> {
12
+ static instances: Record<string, TrueSheet>;
13
+ static dismiss: jest.Mock<Promise<void>, [_name: string, _animated?: boolean | undefined], any>;
14
+ static dismissStack: jest.Mock<Promise<void>, [_name: string, _animated?: boolean | undefined], any>;
15
+ static present: jest.Mock<Promise<void>, [_name: string, _index?: number | undefined, _animated?: boolean | undefined], any>;
16
+ static resize: jest.Mock<Promise<void>, [_name: string, _index: number], any>;
17
+ static dismissAll: jest.Mock<Promise<void>, [_animated?: boolean | undefined], any>;
18
+ dismiss: jest.Mock<Promise<void>, [_animated?: boolean | undefined], any>;
19
+ dismissStack: jest.Mock<Promise<void>, [_animated?: boolean | undefined], any>;
20
+ present: jest.Mock<Promise<void>, [_index?: number | undefined, _animated?: boolean | undefined], any>;
21
+ resize: jest.Mock<Promise<void>, [_index: number], any>;
22
+ componentDidMount(): void;
23
+ componentWillUnmount(): void;
24
+ private renderHeader;
25
+ private renderFooter;
26
+ render(): React.CElement<ViewProps, View>;
27
+ }
28
+ /**
29
+ * Mock TrueSheetPeek component for testing.
30
+ */
31
+ export declare function TrueSheetPeek({ children, ...rest }: ViewProps): React.CElement<ViewProps, View>;
32
+ /**
33
+ * Mock TrueSheetProvider for testing.
34
+ */
35
+ export declare function TrueSheetProvider({ children }: {
36
+ children: React.ReactNode;
37
+ }): React.ReactNode;
38
+ /**
39
+ * Mock useTrueSheet hook for testing.
40
+ */
41
+ export declare function useTrueSheet(): TrueSheetStaticMethods;
42
+ export * from '../TrueSheet.types';
43
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,UAAU,cAAc;IACtB,sBAAsB,EAAE,OAAO,CAAC;CACjC;AAED;;;GAGG;AACH,qBAAa,SAAU,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC;IAC5E,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAM;IAEjD,MAAM,CAAC,OAAO,kFAAsE;IACpF,MAAM,CAAC,YAAY,kFAAsE;IACzF,MAAM,CAAC,OAAO,+GAEZ;IACF,MAAM,CAAC,MAAM,iEAAiE;IAC9E,MAAM,CAAC,UAAU,mEAAuD;IAExE,OAAO,mEAAuD;IAC9D,YAAY,mEAAuD;IACnE,OAAO,gGAAwE;IAC/E,MAAM,kDAAkD;IAExD,iBAAiB;IAOjB,oBAAoB;IAOpB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,YAAY;IAMpB,MAAM;CAIP;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,mCAE7D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,mBAE5E;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,sBAAsB,CAQrD;AAED,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,66 @@
1
+ import type { ParamListBase } from '@react-navigation/native';
2
+ import type { TrueSheetNavigationProp } from '../navigation/types';
3
+ /**
4
+ * Mock createTrueSheetNavigator for testing.
5
+ * Import from '@lodev09/react-native-true-sheet/navigation/mock' in your test setup.
6
+ */
7
+ export declare const createTrueSheetNavigator: jest.Mock<{
8
+ Navigator: jest.Mock<import("react").ReactNode, [{
9
+ children: React.ReactNode;
10
+ }], any>;
11
+ Screen: jest.Mock<null, [], any>;
12
+ Group: jest.Mock<null, [], any>;
13
+ }, [], any>;
14
+ /**
15
+ * Mock TrueSheetActions for testing.
16
+ */
17
+ export declare const TrueSheetActions: {
18
+ push: jest.Mock<{
19
+ type: string;
20
+ payload: {
21
+ name: string;
22
+ params: object | undefined;
23
+ };
24
+ }, [name: string, params?: object | undefined], any>;
25
+ pop: jest.Mock<{
26
+ type: string;
27
+ payload: {
28
+ count: number | undefined;
29
+ };
30
+ }, [count?: number | undefined], any>;
31
+ popTo: jest.Mock<{
32
+ type: string;
33
+ payload: {
34
+ name: string;
35
+ params: object | undefined;
36
+ };
37
+ }, [name: string, params?: object | undefined], any>;
38
+ popToTop: jest.Mock<{
39
+ type: string;
40
+ }, [], any>;
41
+ replace: jest.Mock<{
42
+ type: string;
43
+ payload: {
44
+ name: string;
45
+ params: object | undefined;
46
+ };
47
+ }, [name: string, params?: object | undefined], any>;
48
+ resize: jest.Mock<{
49
+ type: string;
50
+ index: number;
51
+ }, [index: number], any>;
52
+ dismiss: jest.Mock<{
53
+ type: string;
54
+ }, [], any>;
55
+ remove: jest.Mock<{
56
+ type: string;
57
+ }, [], any>;
58
+ };
59
+ /**
60
+ * Mock useTrueSheetNavigation hook for testing.
61
+ */
62
+ export declare const useTrueSheetNavigation: jest.Mock<TrueSheetNavigationProp<ParamListBase>, [], any>;
63
+ export type { TrueSheetActionType } from '../navigation/TrueSheetRouter';
64
+ export type { DetentInfoEventPayload, PositionChangeEventPayload } from '../TrueSheet.types';
65
+ export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from '../navigation/types';
66
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../src/mocks/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;kBACW,KAAK,CAAC,SAAS;;;;WAG5D,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAe5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,4DAuBlC,CAAC;AAEF,YAAY,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,YAAY,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAC7F,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import type { SharedValue } from 'react-native-reanimated';
4
+ import type { TrueSheetProps, PositionChangeEventPayload } from '../TrueSheet.types';
5
+ interface TrueSheetState {
6
+ shouldRenderNativeView: boolean;
7
+ }
8
+ interface MockReanimatedTrueSheetContextValue {
9
+ animatedPosition: SharedValue<number>;
10
+ animatedIndex: SharedValue<number>;
11
+ animatedDetent: SharedValue<number>;
12
+ }
13
+ /**
14
+ * Mock ReanimatedTrueSheet component for testing.
15
+ * Import from '@lodev09/react-native-true-sheet/reanimated/mock' in your test setup.
16
+ */
17
+ export declare class ReanimatedTrueSheet extends React.Component<TrueSheetProps, TrueSheetState> {
18
+ static instances: Record<string, ReanimatedTrueSheet>;
19
+ static dismiss: jest.Mock<Promise<void>, [_name: string, _animated?: boolean | undefined], any>;
20
+ static dismissStack: jest.Mock<Promise<void>, [_name: string, _animated?: boolean | undefined], any>;
21
+ static present: jest.Mock<Promise<void>, [_name: string, _index?: number | undefined, _animated?: boolean | undefined], any>;
22
+ static resize: jest.Mock<Promise<void>, [_name: string, _index: number], any>;
23
+ dismiss: jest.Mock<Promise<void>, [_animated?: boolean | undefined], any>;
24
+ dismissStack: jest.Mock<Promise<void>, [_animated?: boolean | undefined], any>;
25
+ present: jest.Mock<Promise<void>, [_index?: number | undefined, _animated?: boolean | undefined], any>;
26
+ resize: jest.Mock<Promise<void>, [_index: number], any>;
27
+ componentDidMount(): void;
28
+ componentWillUnmount(): void;
29
+ private renderHeader;
30
+ private renderFooter;
31
+ render(): React.CElement<import("react-native").ViewProps, View>;
32
+ }
33
+ /**
34
+ * Mock ReanimatedTrueSheetProvider for testing.
35
+ */
36
+ export declare function ReanimatedTrueSheetProvider({ children }: {
37
+ children: React.ReactNode;
38
+ }): React.ReactNode;
39
+ /**
40
+ * Mock useReanimatedTrueSheet hook for testing.
41
+ */
42
+ export declare const useReanimatedTrueSheet: jest.Mock<MockReanimatedTrueSheetContextValue, [], any>;
43
+ /**
44
+ * Mock useReanimatedPositionChangeHandler hook for testing.
45
+ */
46
+ export declare const useReanimatedPositionChangeHandler: jest.Mock<jest.Mock<any, any, any>, [_handler: (payload: PositionChangeEventPayload) => void, _dependencies?: unknown[] | undefined], any>;
47
+ export {};
48
+ //# sourceMappingURL=reanimated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reanimated.d.ts","sourceRoot":"","sources":["../../../../src/mocks/reanimated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAErF,UAAU,cAAc;IACtB,sBAAsB,EAAE,OAAO,CAAC;CACjC;AAED,UAAU,mCAAmC;IAC3C,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACrC;AAYD;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC;IACtF,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAM;IAE3D,MAAM,CAAC,OAAO,kFAAsE;IACpF,MAAM,CAAC,YAAY,kFAAsE;IACzF,MAAM,CAAC,OAAO,+GAEZ;IACF,MAAM,CAAC,MAAM,iEAAiE;IAE9E,OAAO,mEAAuD;IAC9D,YAAY,mEAAuD;IACnE,OAAO,gGAAwE;IAC/E,MAAM,kDAAkD;IAExD,iBAAiB;IAOjB,oBAAoB;IAOpB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,YAAY;IAMpB,MAAM;CAIP;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,mBAEtF;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,yDAMlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kCAAkC,2DACxB,0BAA0B,KAAK,IAAI,8CACzD,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { type CommonActions, type ParamListBase, type Router, type StackActionType, type StackRouterOptions } from '@react-navigation/core';
2
+ import type { TrueSheetNavigationState } from './types';
3
+ export type TrueSheetRouterOptions = StackRouterOptions;
4
+ export type TrueSheetActionType = StackActionType | ReturnType<typeof CommonActions.goBack> | {
5
+ type: 'RESIZE';
6
+ index: number;
7
+ source?: string;
8
+ target?: string;
9
+ } | {
10
+ type: 'DISMISS';
11
+ source?: string;
12
+ target?: string;
13
+ } | {
14
+ type: 'REMOVE';
15
+ source?: string;
16
+ target?: string;
17
+ };
18
+ export declare const TrueSheetActions: {
19
+ resize: (index: number) => TrueSheetActionType;
20
+ dismiss: () => TrueSheetActionType;
21
+ remove: () => TrueSheetActionType;
22
+ replace(name: string, params?: object): {
23
+ readonly type: "REPLACE";
24
+ readonly payload: {
25
+ readonly name: string;
26
+ readonly params: object | undefined;
27
+ };
28
+ };
29
+ push(name: string, params?: object): {
30
+ readonly type: "PUSH";
31
+ readonly payload: {
32
+ readonly name: string;
33
+ readonly params: object | undefined;
34
+ };
35
+ };
36
+ pop(count?: number): {
37
+ readonly type: "POP";
38
+ readonly payload: {
39
+ readonly count: number;
40
+ };
41
+ };
42
+ popToTop(): {
43
+ readonly type: "POP_TO_TOP";
44
+ };
45
+ popTo(name: string, params?: object, options?: {
46
+ merge?: boolean;
47
+ }): {
48
+ readonly type: "POP_TO";
49
+ readonly payload: {
50
+ readonly name: string;
51
+ readonly params: object | undefined;
52
+ readonly merge: boolean | undefined;
53
+ };
54
+ };
55
+ };
56
+ export declare const TrueSheetRouter: (routerOptions: StackRouterOptions) => Router<TrueSheetNavigationState<ParamListBase>, TrueSheetActionType>;
57
+ //# sourceMappingURL=TrueSheetRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrueSheetRouter.d.ts","sourceRoot":"","sources":["../../../../src/navigation/TrueSheetRouter.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,MAAM,EAEX,KAAK,eAAe,EAEpB,KAAK,kBAAkB,EACxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAExD,MAAM,MAAM,mBAAmB,GAC3B,eAAe,GACf,UAAU,CAAC,OAAO,aAAa,CAAC,MAAM,CAAC,GACvC;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN,eAAO,MAAM,gBAAgB;oBAEX,MAAM,KAAG,mBAAmB;mBAC/B,mBAAmB;kBACpB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;aA+FO,CAAC;;;;;;;;;CA9FxC,CAAC;AA8BF,eAAO,MAAM,eAAe,GAC1B,eAAe,kBAAkB,KAChC,MAAM,CAAC,wBAAwB,CAAC,aAAa,CAAC,EAAE,mBAAmB,CAiKrE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { ParamListBase } from '@react-navigation/core';
2
+ import type { TrueSheetDescriptorMap, TrueSheetNavigationHelpers, TrueSheetNavigationState } from './types';
3
+ interface TrueSheetViewProps {
4
+ state: TrueSheetNavigationState<ParamListBase>;
5
+ navigation: TrueSheetNavigationHelpers;
6
+ descriptors: TrueSheetDescriptorMap;
7
+ }
8
+ export declare const TrueSheetView: ({ state, navigation, descriptors }: TrueSheetViewProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=TrueSheetView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrueSheetView.d.ts","sourceRoot":"","sources":["../../../../src/navigation/TrueSheetView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,KAAK,EACV,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAkBjB,UAAU,kBAAkB;IAC1B,KAAK,EAAE,wBAAwB,CAAC,aAAa,CAAC,CAAC;IAC/C,UAAU,EAAE,0BAA0B,CAAC;IACvC,WAAW,EAAE,sBAAsB,CAAC;CACrC;AAED,eAAO,MAAM,aAAa,GAAI,oCAAoC,kBAAkB,4CAoEnF,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { type NavigatorTypeBagBase, type ParamListBase, type StaticConfig, type TypedNavigator } from '@react-navigation/core';
2
+ import type { TrueSheetNavigationEventMap, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetNavigatorProps } from './types';
3
+ declare const TrueSheetNavigator: ({ id, initialRouteName, children, layout, screenListeners, screenOptions, screenLayout, }: TrueSheetNavigatorProps) => import("react/jsx-runtime").JSX.Element;
4
+ /**
5
+ * Creates a TrueSheet navigator.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * const Sheet = createTrueSheetNavigator();
10
+ *
11
+ * function App() {
12
+ * return (
13
+ * <Sheet.Navigator>
14
+ * <Sheet.Screen name="Home" component={HomeScreen} />
15
+ * <Sheet.Screen
16
+ * name="Details"
17
+ * component={DetailsSheet}
18
+ * options={{ detents: [0.5, 1] }}
19
+ * />
20
+ * </Sheet.Navigator>
21
+ * );
22
+ * }
23
+ * ```
24
+ */
25
+ export declare const createTrueSheetNavigator: <const ParamList extends ParamListBase, const NavigatorID extends string | undefined = undefined, const TypeBag extends NavigatorTypeBagBase = {
26
+ ParamList: ParamList;
27
+ NavigatorID: NavigatorID;
28
+ State: TrueSheetNavigationState<ParamList>;
29
+ ScreenOptions: TrueSheetNavigationOptions;
30
+ EventMap: TrueSheetNavigationEventMap;
31
+ NavigationList: { [RouteName in keyof ParamList]: TrueSheetNavigationProp<ParamList, RouteName, NavigatorID>; };
32
+ Navigator: typeof TrueSheetNavigator;
33
+ }, const Config extends StaticConfig<TypeBag> = StaticConfig<TypeBag>>(config?: Config) => TypedNavigator<TypeBag, Config>;
34
+ export {};
35
+ //# sourceMappingURL=createTrueSheetNavigator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTrueSheetNavigator.d.ts","sourceRoot":"","sources":["../../../../src/navigation/createTrueSheetNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,cAAc,EAEpB,MAAM,wBAAwB,CAAC;AAIhC,OAAO,KAAK,EAEV,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAEjB,QAAA,MAAM,kBAAkB,GAAI,2FAQzB,uBAAuB,4CAsBzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB,GACnC,KAAK,CAAC,SAAS,SAAS,aAAa,EACrC,KAAK,CAAC,WAAW,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EACxD,KAAK,CAAC,OAAO,SAAS,oBAAoB,GAAG;IAC3C,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAC3C,aAAa,EAAE,0BAA0B,CAAC;IAC1C,QAAQ,EAAE,2BAA2B,CAAC;IACtC,cAAc,EAAE,GACb,SAAS,IAAI,MAAM,SAAS,GAAG,uBAAuB,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,GAC3F,CAAC;IACF,SAAS,EAAE,OAAO,kBAAkB,CAAC;CACtC,EACD,KAAK,CAAC,MAAM,SAAS,YAAY,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,EAElE,SAAS,MAAM,KACd,cAAc,CAAC,OAAO,EAAE,MAAM,CAEhC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { createTrueSheetNavigator } from './createTrueSheetNavigator';
2
+ export { TrueSheetActions, type TrueSheetActionType } from './TrueSheetRouter';
3
+ export { useTrueSheetNavigation } from './useTrueSheetNavigation';
4
+ export type { DetentInfoEventPayload, PositionChangeEventPayload } from '../TrueSheet.types';
5
+ export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from './types';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/navigation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,YAAY,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAE7F,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { TrueSheetScreenProps } from './types';
2
+ export declare const ReanimatedTrueSheetScreen: ({ detentIndex, resizeKey, navigation, emit, routeKey, closing, detents, children, positionChangeHandler, ...sheetProps }: TrueSheetScreenProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=ReanimatedTrueSheetScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReanimatedTrueSheetScreen.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/screen/ReanimatedTrueSheetScreen.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAKpD,eAAO,MAAM,yBAAyB,GAAI,0HAWvC,oBAAoB,4CAsCtB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { TrueSheetScreenProps } from './types';
2
+ export declare const TrueSheetScreen: ({ detentIndex, resizeKey, navigation, emit, routeKey, closing, detents, children, positionChangeHandler, ...sheetProps }: TrueSheetScreenProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=TrueSheetScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrueSheetScreen.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/screen/TrueSheetScreen.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGpD,eAAO,MAAM,eAAe,GAAI,0HAW7B,oBAAoB,4CAmCtB,CAAC"}