@lodev09/react-native-true-sheet 4.0.0-beta.1 → 4.0.0-beta.11

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 (221) hide show
  1. package/README.md +25 -4
  2. package/android/build.gradle +22 -1
  3. package/android/src/main/java/com/lodev09/truesheet/TrueSheetContainerView.kt +24 -7
  4. package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentView.kt +211 -182
  5. package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentViewManager.kt +5 -1
  6. package/android/src/main/java/com/lodev09/truesheet/TrueSheetFooterView.kt +14 -19
  7. package/android/src/main/java/com/lodev09/truesheet/TrueSheetOverlayView.kt +106 -0
  8. package/android/src/main/java/com/lodev09/truesheet/TrueSheetOverlayViewManager.kt +45 -0
  9. package/android/src/main/java/com/lodev09/truesheet/TrueSheetPackage.kt +2 -1
  10. package/android/src/main/java/com/lodev09/truesheet/TrueSheetStateUpdater.kt +18 -0
  11. package/android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt +82 -39
  12. package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewController.kt +275 -88
  13. package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewManager.kt +26 -1
  14. package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetCoordinatorLayout.kt +75 -3
  15. package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetDetentCalculator.kt +56 -34
  16. package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetOverlayRootView.kt +137 -0
  17. package/android/src/main/java/com/lodev09/truesheet/events/TrueSheetLifecycleEvents.kt +15 -0
  18. package/android/src/main/java/com/lodev09/truesheet/utils/KeyboardUtils.kt +1 -1
  19. package/android/src/main/java/com/lodev09/truesheet/utils/TouchEventDeduper.kt +31 -0
  20. package/android/src/main/java/com/lodev09/truesheet/utils/ViewUtils.kt +19 -7
  21. package/android/src/main/jni/TrueSheetSpec.h +1 -0
  22. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewComponentDescriptor.h +0 -8
  23. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewShadowNode.cpp +52 -29
  24. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewShadowNode.h +6 -1
  25. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewState.cpp +1 -1
  26. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewState.h +6 -4
  27. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewShadowNode.cpp +7 -0
  28. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetLayoutUtils.h +46 -0
  29. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetOverlayViewComponentDescriptor.h +21 -0
  30. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetOverlayViewShadowNode.cpp +17 -0
  31. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetOverlayViewShadowNode.h +36 -0
  32. package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewShadowNode.cpp +4 -35
  33. package/ios/TrueSheetContainerView.h +14 -7
  34. package/ios/TrueSheetContainerView.mm +10 -7
  35. package/ios/TrueSheetContentView.h +31 -15
  36. package/ios/TrueSheetContentView.mm +148 -188
  37. package/ios/TrueSheetFooterView.h +6 -0
  38. package/ios/TrueSheetFooterView.mm +48 -2
  39. package/ios/TrueSheetModule.h +2 -7
  40. package/ios/TrueSheetModule.mm +7 -16
  41. package/ios/TrueSheetOverlayView.h +32 -0
  42. package/ios/TrueSheetOverlayView.mm +161 -0
  43. package/ios/TrueSheetView.mm +171 -29
  44. package/ios/TrueSheetViewController.h +10 -0
  45. package/ios/TrueSheetViewController.mm +256 -74
  46. package/ios/core/TrueSheetGrabberView.mm +13 -3
  47. package/ios/core/TrueSheetOverlayContainerView.h +31 -0
  48. package/ios/core/TrueSheetOverlayContainerView.mm +35 -0
  49. package/ios/events/TrueSheetLifecycleEvents.h +2 -0
  50. package/ios/events/TrueSheetLifecycleEvents.mm +8 -0
  51. package/ios/tvos/TrueSheetStubs.mm +12 -0
  52. package/ios/utils/UIView+ScrollEdgeInteraction.h +1 -0
  53. package/ios/utils/UIView+ScrollEdgeInteraction.mm +24 -2
  54. package/lib/module/TrueSheet.js +149 -34
  55. package/lib/module/TrueSheet.js.map +1 -1
  56. package/lib/module/TrueSheet.web.js +122 -53
  57. package/lib/module/TrueSheet.web.js.map +1 -1
  58. package/lib/module/TrueSheetOverlay.js +30 -0
  59. package/lib/module/TrueSheetOverlay.js.map +1 -0
  60. package/lib/module/TrueSheetOverlay.web.js +35 -0
  61. package/lib/module/TrueSheetOverlay.web.js.map +1 -0
  62. package/lib/module/TrueSheetPeek.web.js +3 -3
  63. package/lib/module/TrueSheetPeek.web.js.map +1 -1
  64. package/lib/module/fabric/TrueSheetContentViewNativeComponent.ts +1 -1
  65. package/lib/module/fabric/TrueSheetOverlayViewNativeComponent.ts +12 -0
  66. package/lib/module/fabric/TrueSheetViewNativeComponent.ts +5 -0
  67. package/lib/module/index.js +1 -0
  68. package/lib/module/index.js.map +1 -1
  69. package/lib/module/mocks/index.js +10 -0
  70. package/lib/module/mocks/index.js.map +1 -1
  71. package/lib/module/mocks/navigation.js +31 -21
  72. package/lib/module/mocks/navigation.js.map +1 -1
  73. package/lib/module/mocks/navigationExpoRouter.js +21 -0
  74. package/lib/module/mocks/navigationExpoRouter.js.map +1 -0
  75. package/lib/module/mocks/reanimated.js +1 -1
  76. package/lib/module/mocks/reanimated.js.map +1 -1
  77. package/lib/module/navigation/{TrueSheetView.js → TrueSheetNavigatorContent.js} +14 -12
  78. package/lib/module/navigation/TrueSheetNavigatorContent.js.map +1 -0
  79. package/lib/module/navigation/actions.js +50 -0
  80. package/lib/module/navigation/actions.js.map +1 -0
  81. package/lib/module/navigation/base-types.js +2 -0
  82. package/lib/module/navigation/base-types.js.map +1 -0
  83. package/lib/module/navigation/{TrueSheetRouter.js → createTrueSheetRouter.js} +11 -24
  84. package/lib/module/navigation/createTrueSheetRouter.js.map +1 -0
  85. package/lib/module/navigation/expo-router/base-types.js +2 -0
  86. package/lib/module/navigation/expo-router/base-types.js.map +1 -0
  87. package/lib/module/navigation/expo-router/index.js +50 -0
  88. package/lib/module/navigation/expo-router/index.js.map +1 -0
  89. package/lib/module/navigation/expo-router/types.js +4 -0
  90. package/lib/module/navigation/expo-router/types.js.map +1 -0
  91. package/lib/module/navigation/index.js +43 -2
  92. package/lib/module/navigation/index.js.map +1 -1
  93. package/lib/module/navigation/navigator.js +10 -0
  94. package/lib/module/navigation/navigator.js.map +1 -0
  95. package/lib/module/navigation/screen/ReanimatedTrueSheetScreen.js +2 -2
  96. package/lib/module/navigation/screen/ReanimatedTrueSheetScreen.js.map +1 -1
  97. package/lib/module/navigation/screen/TrueSheetScreen.js +2 -2
  98. package/lib/module/navigation/screen/TrueSheetScreen.js.map +1 -1
  99. package/lib/module/navigation/screen/useSheetScreenState.js +5 -4
  100. package/lib/module/navigation/screen/useSheetScreenState.js.map +1 -1
  101. package/lib/module/navigation/useTrueSheetNavigation.js +1 -1
  102. package/lib/module/navigation/useTrueSheetNavigation.js.map +1 -1
  103. package/lib/module/web/dom.js +10 -0
  104. package/lib/module/web/dom.js.map +1 -0
  105. package/lib/module/web/vaul/constants.js +4 -0
  106. package/lib/module/web/vaul/constants.js.map +1 -1
  107. package/lib/module/web/vaul/context.js.map +1 -1
  108. package/lib/module/web/vaul/helpers.js +10 -4
  109. package/lib/module/web/vaul/helpers.js.map +1 -1
  110. package/lib/module/web/vaul/index.js +35 -2
  111. package/lib/module/web/vaul/index.js.map +1 -1
  112. package/lib/typescript/src/TrueSheet.d.ts +6 -0
  113. package/lib/typescript/src/TrueSheet.d.ts.map +1 -1
  114. package/lib/typescript/src/TrueSheet.types.d.ts +72 -1
  115. package/lib/typescript/src/TrueSheet.types.d.ts.map +1 -1
  116. package/lib/typescript/src/TrueSheet.web.d.ts.map +1 -1
  117. package/lib/typescript/src/TrueSheetOverlay.d.ts +8 -0
  118. package/lib/typescript/src/TrueSheetOverlay.d.ts.map +1 -0
  119. package/lib/typescript/src/TrueSheetOverlay.web.d.ts +8 -0
  120. package/lib/typescript/src/TrueSheetOverlay.web.d.ts.map +1 -0
  121. package/lib/typescript/src/TrueSheetPeek.web.d.ts.map +1 -1
  122. package/lib/typescript/src/fabric/TrueSheetOverlayViewNativeComponent.d.ts +6 -0
  123. package/lib/typescript/src/fabric/TrueSheetOverlayViewNativeComponent.d.ts.map +1 -0
  124. package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts +4 -0
  125. package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts.map +1 -1
  126. package/lib/typescript/src/index.d.ts +1 -0
  127. package/lib/typescript/src/index.d.ts.map +1 -1
  128. package/lib/typescript/src/mocks/index.d.ts +4 -0
  129. package/lib/typescript/src/mocks/index.d.ts.map +1 -1
  130. package/lib/typescript/src/mocks/navigation.d.ts +5 -1
  131. package/lib/typescript/src/mocks/navigation.d.ts.map +1 -1
  132. package/lib/typescript/src/mocks/navigationExpoRouter.d.ts +22 -0
  133. package/lib/typescript/src/mocks/navigationExpoRouter.d.ts.map +1 -0
  134. package/lib/typescript/src/mocks/reanimated.d.ts.map +1 -1
  135. package/lib/typescript/src/navigation/TrueSheetNavigatorContent.d.ts +5 -0
  136. package/lib/typescript/src/navigation/TrueSheetNavigatorContent.d.ts.map +1 -0
  137. package/lib/typescript/src/navigation/actions.d.ts +71 -0
  138. package/lib/typescript/src/navigation/actions.d.ts.map +1 -0
  139. package/lib/typescript/src/navigation/base-types.d.ts +9 -0
  140. package/lib/typescript/src/navigation/base-types.d.ts.map +1 -0
  141. package/lib/typescript/src/navigation/createTrueSheetRouter.d.ts +3 -0
  142. package/lib/typescript/src/navigation/createTrueSheetRouter.d.ts.map +1 -0
  143. package/lib/typescript/src/navigation/expo-router/base-types.d.ts +8 -0
  144. package/lib/typescript/src/navigation/expo-router/base-types.d.ts.map +1 -0
  145. package/lib/typescript/src/navigation/expo-router/index.d.ts +37 -0
  146. package/lib/typescript/src/navigation/expo-router/index.d.ts.map +1 -0
  147. package/lib/typescript/src/navigation/expo-router/types.d.ts +44 -0
  148. package/lib/typescript/src/navigation/expo-router/types.d.ts.map +1 -0
  149. package/lib/typescript/src/navigation/index.d.ts +42 -3
  150. package/lib/typescript/src/navigation/index.d.ts.map +1 -1
  151. package/lib/typescript/src/navigation/navigator.d.ts +7 -0
  152. package/lib/typescript/src/navigation/navigator.d.ts.map +1 -0
  153. package/lib/typescript/src/navigation/screen/ReanimatedTrueSheetScreen.d.ts +1 -1
  154. package/lib/typescript/src/navigation/screen/ReanimatedTrueSheetScreen.d.ts.map +1 -1
  155. package/lib/typescript/src/navigation/screen/TrueSheetScreen.d.ts +1 -1
  156. package/lib/typescript/src/navigation/screen/TrueSheetScreen.d.ts.map +1 -1
  157. package/lib/typescript/src/navigation/screen/types.d.ts +3 -4
  158. package/lib/typescript/src/navigation/screen/types.d.ts.map +1 -1
  159. package/lib/typescript/src/navigation/screen/useSheetScreenState.d.ts +5 -6
  160. package/lib/typescript/src/navigation/screen/useSheetScreenState.d.ts.map +1 -1
  161. package/lib/typescript/src/navigation/types.d.ts +65 -5
  162. package/lib/typescript/src/navigation/types.d.ts.map +1 -1
  163. package/lib/typescript/src/navigation/useTrueSheetNavigation.d.ts +1 -1
  164. package/lib/typescript/src/navigation/useTrueSheetNavigation.d.ts.map +1 -1
  165. package/lib/typescript/src/web/dom.d.ts +7 -0
  166. package/lib/typescript/src/web/dom.d.ts.map +1 -0
  167. package/lib/typescript/src/web/vaul/constants.d.ts +1 -0
  168. package/lib/typescript/src/web/vaul/constants.d.ts.map +1 -1
  169. package/lib/typescript/src/web/vaul/context.d.ts +1 -0
  170. package/lib/typescript/src/web/vaul/context.d.ts.map +1 -1
  171. package/lib/typescript/src/web/vaul/helpers.d.ts.map +1 -1
  172. package/lib/typescript/src/web/vaul/index.d.ts +7 -1
  173. package/lib/typescript/src/web/vaul/index.d.ts.map +1 -1
  174. package/package.json +32 -9
  175. package/react-native.config.js +1 -0
  176. package/src/TrueSheet.tsx +184 -46
  177. package/src/TrueSheet.types.ts +77 -1
  178. package/src/TrueSheet.web.tsx +135 -64
  179. package/src/TrueSheetOverlay.tsx +24 -0
  180. package/src/TrueSheetOverlay.web.tsx +33 -0
  181. package/src/TrueSheetPeek.web.tsx +4 -3
  182. package/src/fabric/TrueSheetContentViewNativeComponent.ts +1 -1
  183. package/src/fabric/TrueSheetOverlayViewNativeComponent.ts +12 -0
  184. package/src/fabric/TrueSheetViewNativeComponent.ts +5 -0
  185. package/src/index.ts +1 -0
  186. package/src/mocks/index.ts +7 -0
  187. package/src/mocks/navigation.ts +32 -25
  188. package/src/mocks/navigationExpoRouter.ts +41 -0
  189. package/src/mocks/reanimated.ts +8 -9
  190. package/src/navigation/{TrueSheetView.tsx → TrueSheetNavigatorContent.tsx} +24 -17
  191. package/src/navigation/actions.ts +78 -0
  192. package/src/navigation/base-types.ts +20 -0
  193. package/src/navigation/createTrueSheetRouter.ts +194 -0
  194. package/src/navigation/expo-router/base-types.ts +18 -0
  195. package/src/navigation/expo-router/index.ts +90 -0
  196. package/src/navigation/expo-router/types.ts +116 -0
  197. package/src/navigation/index.ts +68 -2
  198. package/src/navigation/navigator.ts +18 -0
  199. package/src/navigation/screen/ReanimatedTrueSheetScreen.tsx +2 -2
  200. package/src/navigation/screen/TrueSheetScreen.tsx +2 -2
  201. package/src/navigation/screen/types.ts +4 -6
  202. package/src/navigation/screen/useSheetScreenState.ts +10 -15
  203. package/src/navigation/types.ts +99 -16
  204. package/src/navigation/useTrueSheetNavigation.ts +1 -1
  205. package/src/web/dom.ts +9 -0
  206. package/src/web/vaul/constants.ts +4 -0
  207. package/src/web/vaul/context.ts +1 -0
  208. package/src/web/vaul/helpers.ts +13 -6
  209. package/src/web/vaul/index.tsx +46 -1
  210. package/lib/module/navigation/TrueSheetRouter.js.map +0 -1
  211. package/lib/module/navigation/TrueSheetView.js.map +0 -1
  212. package/lib/module/navigation/createTrueSheetNavigator.js +0 -63
  213. package/lib/module/navigation/createTrueSheetNavigator.js.map +0 -1
  214. package/lib/typescript/src/navigation/TrueSheetRouter.d.ts +0 -57
  215. package/lib/typescript/src/navigation/TrueSheetRouter.d.ts.map +0 -1
  216. package/lib/typescript/src/navigation/TrueSheetView.d.ts +0 -10
  217. package/lib/typescript/src/navigation/TrueSheetView.d.ts.map +0 -1
  218. package/lib/typescript/src/navigation/createTrueSheetNavigator.d.ts +0 -35
  219. package/lib/typescript/src/navigation/createTrueSheetNavigator.d.ts.map +0 -1
  220. package/src/navigation/TrueSheetRouter.ts +0 -234
  221. package/src/navigation/createTrueSheetNavigator.tsx +0 -93
@@ -0,0 +1,22 @@
1
+ import type { ParamListBase } from '../navigation/expo-router/base-types';
2
+ import type { TrueSheetNavigationProp } from '../navigation/expo-router/types';
3
+ import { TrueSheetActions } from './navigation';
4
+ /**
5
+ * Mock Sheet layout for testing.
6
+ * Import from '@lodev09/react-native-true-sheet/navigation/expo-router/mock' in your test setup.
7
+ */
8
+ export declare const Sheet: jest.Mock<import("react").ReactNode, [{
9
+ children: React.ReactNode;
10
+ }], any> & {
11
+ Screen: jest.Mock<null, [], any>;
12
+ Protected: jest.Mock<null, [], any>;
13
+ };
14
+ /**
15
+ * Mock useTrueSheetNavigation hook for testing.
16
+ */
17
+ export declare const useTrueSheetNavigation: jest.Mock<TrueSheetNavigationProp<ParamListBase>, [], any>;
18
+ export { TrueSheetActions };
19
+ export type { TrueSheetActionType } from '../navigation/actions';
20
+ export type { DetentInfoEventPayload, PositionChangeEventPayload } from '../TrueSheet.types';
21
+ export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from '../navigation/expo-router/types';
22
+ //# sourceMappingURL=navigationExpoRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigationExpoRouter.d.ts","sourceRoot":"","sources":["../../../../src/mocks/navigationExpoRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EACL,gBAAgB,EAEjB,MAAM,cAAc,CAAC;AAEtB;;;GAGG;AACH,eAAO,MAAM,KAAK;cACmB,KAAK,CAAC,SAAS;;;;CAKnD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,4DAKlC,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,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,iCAAiC,CAAC"}
@@ -1 +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,CAA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AAa,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,5 @@
1
+ import type { NavigatorArgs } from 'standard-navigation';
2
+ import type { TrueSheetNavigationOptions, TrueSheetNavigatorContentExtraProps, TrueSheetStandardEventMap } from './types';
3
+ export type TrueSheetNavigatorContentProps = NavigatorArgs<TrueSheetNavigationOptions, TrueSheetStandardEventMap> & TrueSheetNavigatorContentExtraProps;
4
+ export declare const TrueSheetNavigatorContent: ({ routes, dispatch, descriptors, emitter, }: TrueSheetNavigatorContentProps) => import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=TrueSheetNavigatorContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrueSheetNavigatorContent.d.ts","sourceRoot":"","sources":["../../../../src/navigation/TrueSheetNavigatorContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EACV,0BAA0B,EAC1B,mCAAmC,EACnC,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAkBjB,MAAM,MAAM,8BAA8B,GAAG,aAAa,CACxD,0BAA0B,EAC1B,yBAAyB,CAC1B,GACC,mCAAmC,CAAC;AAEtC,eAAO,MAAM,yBAAyB,GAAI,6CAKvC,8BAA8B,4CAsEhC,CAAC"}
@@ -0,0 +1,71 @@
1
+ export type TrueSheetActionType = {
2
+ type: 'PUSH';
3
+ payload: {
4
+ name: string;
5
+ params?: object;
6
+ };
7
+ source?: string;
8
+ target?: string;
9
+ } | {
10
+ type: 'POP';
11
+ payload: {
12
+ count: number;
13
+ };
14
+ source?: string;
15
+ target?: string;
16
+ } | {
17
+ type: 'POP_TO';
18
+ payload: {
19
+ name: string;
20
+ params?: object;
21
+ merge?: boolean;
22
+ };
23
+ source?: string;
24
+ target?: string;
25
+ } | {
26
+ type: 'POP_TO_TOP';
27
+ source?: string;
28
+ target?: string;
29
+ } | {
30
+ type: 'REPLACE';
31
+ payload: {
32
+ name: string;
33
+ params?: object;
34
+ };
35
+ source?: string;
36
+ target?: string;
37
+ } | {
38
+ type: 'GO_BACK';
39
+ source?: string;
40
+ target?: string;
41
+ } | {
42
+ type: 'RESIZE';
43
+ index: number;
44
+ source?: string;
45
+ target?: string;
46
+ } | {
47
+ type: 'DISMISS';
48
+ source?: string;
49
+ target?: string;
50
+ } | {
51
+ type: 'REMOVE';
52
+ source?: string;
53
+ target?: string;
54
+ };
55
+ /**
56
+ * Action creators for the TrueSheet navigator.
57
+ * Plain objects matching `StackActions` shapes, plus sheet-specific actions.
58
+ */
59
+ export declare const TrueSheetActions: {
60
+ push: (name: string, params?: object) => TrueSheetActionType;
61
+ pop: (count?: number) => TrueSheetActionType;
62
+ popTo: (name: string, params?: object, options?: {
63
+ merge?: boolean;
64
+ }) => TrueSheetActionType;
65
+ popToTop: () => TrueSheetActionType;
66
+ replace: (name: string, params?: object) => TrueSheetActionType;
67
+ resize: (index: number) => TrueSheetActionType;
68
+ dismiss: () => TrueSheetActionType;
69
+ remove: () => TrueSheetActionType;
70
+ };
71
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/navigation/actions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAC3B;IACE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,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,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;;;GAGG;AACH,eAAO,MAAM,gBAAgB;iBACd,MAAM,WAAW,MAAM,KAAG,mBAAmB;kBAI7C,MAAM,KAAO,mBAAmB;kBAI/B,MAAM,WAAW,MAAM,YAAY;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAAG,mBAAmB;oBAI5E,mBAAmB;oBACjB,MAAM,WAAW,MAAM,KAAG,mBAAmB;oBAI7C,MAAM,KAAG,mBAAmB;mBAC/B,mBAAmB;kBACpB,mBAAmB;CAChC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Base navigation types for the React Navigation entry point.
3
+ *
4
+ * The Expo Router entry has its own copy sourced from `expo-router/react-navigation`
5
+ * (see `./expo-router/base-types`) because Expo Router apps never install
6
+ * `@react-navigation/*` — importing it there would silently resolve to `any`.
7
+ */
8
+ export type { DefaultNavigatorOptions, Descriptor, NavigationAction, NavigationHelpers, NavigationProp, NavigationState, ParamListBase, RouteProp, Router, StackActionHelpers, StackRouterOptions, } from '@react-navigation/core';
9
+ //# sourceMappingURL=base-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-types.d.ts","sourceRoot":"","sources":["../../../../src/navigation/base-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,YAAY,EACV,uBAAuB,EACvB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,aAAa,EACb,SAAS,EACT,MAAM,EACN,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { TrueSheetRouter, TrueSheetRouterFactory, TrueSheetRouterOptions } from './types';
2
+ export declare const createTrueSheetRouter: (stackRouter: TrueSheetRouterFactory) => (routerOptions: TrueSheetRouterOptions) => TrueSheetRouter;
3
+ //# sourceMappingURL=createTrueSheetRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTrueSheetRouter.d.ts","sourceRoot":"","sources":["../../../../src/navigation/createTrueSheetRouter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAgC/F,eAAO,MAAM,qBAAqB,GAC/B,aAAa,sBAAsB,MACnC,eAAe,sBAAsB,KAAG,eA8JxC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Base navigation types for the Expo Router entry point.
3
+ *
4
+ * Sourced from Expo Router's vendored React Navigation so apps that only install
5
+ * `expo-router` still get real types — see `../base-types` for the React Navigation copy.
6
+ */
7
+ export type { DefaultNavigatorOptions, NavigationAction, NavigationHelpers, NavigationProp, NavigationState, ParamListBase, RouteProp, Router, StackActionHelpers, StackRouterOptions, } from 'expo-router/react-navigation';
8
+ //# sourceMappingURL=base-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-types.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/expo-router/base-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EACV,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,aAAa,EACb,SAAS,EACT,MAAM,EACN,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { ParamListBase } from './base-types';
2
+ import type { TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetNavigatorContentExtraProps, TrueSheetNavigatorProps, TrueSheetStandardEventMap } from './types';
3
+ declare const SheetNavigator: import("react").ForwardRefExoticComponent<Omit<import("expo-router/build/standard-navigation/types").StandardRouterNavigatorProps<TrueSheetNavigationState<ParamListBase>, TrueSheetNavigationOptions, TrueSheetStandardEventMap, TrueSheetNavigatorContentExtraProps, import("expo-router").StackRouterOptions>, "children"> & Partial<Pick<import("expo-router/build/standard-navigation/types").StandardRouterNavigatorProps<TrueSheetNavigationState<ParamListBase>, TrueSheetNavigationOptions, TrueSheetStandardEventMap, TrueSheetNavigatorContentExtraProps, import("expo-router").StackRouterOptions>, "children">> & import("react").RefAttributes<unknown>> & {
4
+ Screen: (props: import("expo-router").ScreenProps<TrueSheetNavigationOptions, TrueSheetNavigationState<ParamListBase>, TrueSheetStandardEventMap & import("expo-router/react-navigation").EventMapBase>) => null;
5
+ Protected: typeof import("expo-router/build/views/Protected").Protected;
6
+ };
7
+ type SheetProps = Omit<React.ComponentProps<typeof SheetNavigator>, 'screenListeners' | 'routes' | 'dispatch'> & Partial<Pick<React.ComponentProps<typeof SheetNavigator>, 'routes' | 'dispatch'>> & Pick<TrueSheetNavigatorProps, 'screenListeners'>;
8
+ /**
9
+ * TrueSheet navigator layout for Expo Router.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * // app/sheet/_layout.tsx
14
+ * import { Sheet } from '@lodev09/react-native-true-sheet/navigation/expo-router';
15
+ *
16
+ * export default function SheetLayout() {
17
+ * return (
18
+ * <Sheet initialRouteName="(home)">
19
+ * <Sheet.Screen name="details" options={{ detents: [0.5, 1] }} />
20
+ * </Sheet>
21
+ * );
22
+ * }
23
+ * ```
24
+ */
25
+ export declare const Sheet: React.ComponentType<SheetProps> & {
26
+ Screen: typeof SheetNavigator.Screen;
27
+ Protected: typeof SheetNavigator.Protected;
28
+ };
29
+ /**
30
+ * Hook to access TrueSheet navigation with the resize helper.
31
+ * Built on expo-router's `useNavigation`.
32
+ */
33
+ export declare const useTrueSheetNavigation: <T extends ParamListBase = ParamListBase>() => TrueSheetNavigationProp<T>;
34
+ export { TrueSheetActions, type TrueSheetActionType } from '../actions';
35
+ export type { DetentInfoEventPayload, PositionChangeEventPayload } from '../../TrueSheet.types';
36
+ export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from './types';
37
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/expo-router/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAEV,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,mCAAmC,EACnC,uBAAuB,EAGvB,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AASjB,QAAA,MAAM,cAAc;;;CAWlB,CAAC;AAMH,KAAK,UAAU,GAAG,IAAI,CACpB,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,EAC3C,iBAAiB,GAAG,QAAQ,GAAG,UAAU,CAC1C,GACC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC,CAAC,GACjF,IAAI,CAAC,uBAAuB,EAAE,iBAAiB,CAAC,CAAC;AAEnD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,KAAK,EAAqB,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG;IACvE,MAAM,EAAE,OAAO,cAAc,CAAC,MAAM,CAAC;IACrC,SAAS,EAAE,OAAO,cAAc,CAAC,SAAS,CAAC;CAC5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,CAAC,SAAS,aAAa,GAAG,aAAa,OACpC,uBAAuB,CAAC,CAAC,CAAgD,CAAC;AAE/E,OAAO,EAAE,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAExE,YAAY,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEhG,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Expo Router flavour of `../types`: same shapes, but bound to Expo Router's
3
+ * vendored React Navigation types so apps that only install `expo-router` still
4
+ * get real types instead of `any` — see `./base-types`.
5
+ */
6
+ import type { TrueSheetActionType } from '../actions';
7
+ import type { TrueSheetActionHelpersOf, TrueSheetDispatch, TrueSheetNavigationEventMap, TrueSheetNavigationOptions, TrueSheetStateOf } from '../types';
8
+ import type { DefaultNavigatorOptions, NavigationAction, NavigationHelpers, NavigationProp, NavigationState, ParamListBase, RouteProp, Router, StackActionHelpers, StackRouterOptions } from './base-types';
9
+ export type TrueSheetRouterOptions = StackRouterOptions;
10
+ export type TrueSheetNavigationState<ParamList extends ParamListBase> = TrueSheetStateOf<NavigationState<ParamList>>;
11
+ export type TrueSheetRouterState = TrueSheetNavigationState<ParamListBase>;
12
+ export type TrueSheetRouter = Router<TrueSheetRouterState, TrueSheetActionType>;
13
+ export type TrueSheetRouterFactory = (options: TrueSheetRouterOptions) => TrueSheetRouter;
14
+ /**
15
+ * The base `StackRouter` factory to wrap — see `../types` for the shared contract.
16
+ */
17
+ export type StackRouterFactory = <State extends NavigationState<ParamListBase>, Action extends NavigationAction>(options: TrueSheetRouterOptions) => Router<State, Action>;
18
+ export type TrueSheetRoute = TrueSheetNavigationState<ParamListBase>['routes'][number];
19
+ /**
20
+ * Props injected into the navigator content by Expo Router's `createProps`.
21
+ * Raw routes carry the custom fields (`closing`, `resizeIndex`, `resizeKey`)
22
+ * that the standard state strips out.
23
+ */
24
+ export interface TrueSheetNavigatorContentExtraProps {
25
+ routes: TrueSheetRoute[];
26
+ dispatch: TrueSheetDispatch;
27
+ }
28
+ export type TrueSheetActionHelpers<ParamList extends ParamListBase> = TrueSheetActionHelpersOf<StackActionHelpers<ParamList>>;
29
+ export type TrueSheetNavigationProp<ParamList extends ParamListBase, RouteName extends keyof ParamList = string, NavigatorID extends string | undefined = undefined> = NavigationProp<ParamList, RouteName, NavigatorID, TrueSheetNavigationState<ParamList>, TrueSheetNavigationOptions, TrueSheetNavigationEventMap> & TrueSheetActionHelpers<ParamList>;
30
+ export type TrueSheetScreenProps<ParamList extends ParamListBase, RouteName extends keyof ParamList = string, NavigatorID extends string | undefined = undefined> = {
31
+ navigation: TrueSheetNavigationProp<ParamList, RouteName, NavigatorID>;
32
+ route: RouteProp<ParamList, RouteName>;
33
+ };
34
+ export type TrueSheetNavigationHelpers = NavigationHelpers<ParamListBase, TrueSheetNavigationEventMap>;
35
+ export type TrueSheetNavigatorProps = DefaultNavigatorOptions<ParamListBase, string | undefined, TrueSheetNavigationState<ParamListBase>, TrueSheetNavigationOptions, TrueSheetNavigationEventMap, unknown> & {
36
+ /**
37
+ * The name of the route to use as the base screen.
38
+ * This screen will be rendered as a regular screen, while other screens are presented as sheets.
39
+ * Defaults to the first screen defined in the navigator.
40
+ */
41
+ initialRouteName?: string;
42
+ };
43
+ export type { PositionChangeHandler, TrueSheetDispatch, TrueSheetNavigationEventMap, TrueSheetNavigationOptions, TrueSheetNavigationSheetProps, TrueSheetStandardEventMap, } from '../types';
44
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/expo-router/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,mBAAm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AAuB,CACjC,SAAS,SAAS,aAAa,EAC/B,SAAS,SAAS,MAAM,SAAS,GAAG,MAAM,EAC1C,WAAW,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,IAChD,cAAc,CAChB,SAAS,EACT,SAAS,EACT,WAAW,EACX,wBAAwB,CAAC,SAAS,CAAC,EACnC,0BAA0B,EAC1B,2BAA2B,CAC5B,GACC,sBAAsB,CAAC,SAAS,CAAC,CAAC;AAEpC,MAAM,MAAM,oBAAoB,CAC9B,SAAS,SAAS,aAAa,EAC/B,SAAS,SAAS,MAAM,SAAS,GAAG,MAAM,EAC1C,WAAW,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,IAChD;IACF,UAAU,EAAE,uBAAuB,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;IACvE,KAAK,EAAE,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CACxD,aAAa,EACb,2BAA2B,CAC5B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,uBAAuB,CAC3D,aAAa,EACb,MAAM,GAAG,SAAS,EAClB,wBAAwB,CAAC,aAAa,CAAC,EACvC,0BAA0B,EAC1B,2BAA2B,EAC3B,OAAO,CACR,GAAG;IACF;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,YAAY,EACV,qBAAqB,EACrB,iBAAiB,EACjB,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,EAC7B,yBAAyB,GAC1B,MAAM,UAAU,CAAC"}
@@ -1,6 +1,45 @@
1
- export { createTrueSheetNavigator } from './createTrueSheetNavigator';
2
- export { TrueSheetActions, type TrueSheetActionType } from './TrueSheetRouter';
1
+ import { type StandardNavigationTypeBagBase } from '@react-navigation/native';
2
+ import type { TrueSheetActionHelpers, TrueSheetNavigationOptions, TrueSheetNavigationEventMap, TrueSheetNavigationState, TrueSheetRouterOptions } from './types';
3
+ export interface TrueSheetNavigationTypeBag extends StandardNavigationTypeBagBase {
4
+ State: TrueSheetNavigationState<this['ParamList']>;
5
+ ActionHelpers: TrueSheetActionHelpers<this['ParamList']>;
6
+ ScreenOptions: TrueSheetNavigationOptions;
7
+ EventMap: TrueSheetNavigationEventMap;
8
+ RouterOptions: TrueSheetRouterOptions;
9
+ }
10
+ /**
11
+ * Creates a TrueSheet navigator.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const Sheet = createTrueSheetNavigator();
16
+ *
17
+ * function App() {
18
+ * return (
19
+ * <Sheet.Navigator>
20
+ * <Sheet.Screen name="Home" component={HomeScreen} />
21
+ * <Sheet.Screen
22
+ * name="Details"
23
+ * component={DetailsSheet}
24
+ * options={{ detents: [0.5, 1] }}
25
+ * />
26
+ * </Sheet.Navigator>
27
+ * );
28
+ * }
29
+ * ```
30
+ */
31
+ export declare const createTrueSheetNavigator: import("@react-navigation/native").StandardNavigationCreateNavigator<TrueSheetNavigationTypeBag, {}>;
32
+ /**
33
+ * Creates a screen configuration for the static API.
34
+ */
35
+ export declare const createTrueSheetScreen: import("@react-navigation/core").StaticScreenFactory<TrueSheetNavigationTypeBag & {
36
+ ParamList: import("@react-navigation/routers").ParamListBase;
37
+ NavigatorID: string | undefined;
38
+ Navigator: import("react").ComponentType<{}>;
39
+ }>;
40
+ export { TrueSheetActions, type TrueSheetActionType } from './actions';
41
+ export { createTrueSheetRouter } from './createTrueSheetRouter';
3
42
  export { useTrueSheetNavigation } from './useTrueSheetNavigation';
4
43
  export type { DetentInfoEventPayload, PositionChangeEventPayload } from '../TrueSheet.types';
5
- export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from './types';
44
+ export type { StackRouterFactory, TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetRouterOptions, TrueSheetScreenProps, } from './types';
6
45
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/navigation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,6BAA6B,EACnC,MAAM,0BAA0B,CAAC;AAIlC,OAAO,KAAK,EAEV,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EAExB,sBAAsB,EACvB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,0BAA2B,SAAQ,6BAA6B;IAC/E,KAAK,EAAE,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IACnD,aAAa,EAAE,sBAAsB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IACzD,aAAa,EAAE,0BAA0B,CAAC;IAC1C,QAAQ,EAAE,2BAA2B,CAAC;IACtC,aAAa,EAAE,sBAAsB,CAAC;CACvC;AAYD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB,sGAAkB,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;EAAe,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,YAAY,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAE7F,YAAY,EACV,kBAAkB,EAClB,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { TrueSheetNavigationOptions, TrueSheetNavigatorContentExtraProps, TrueSheetStandardEventMap } from './types';
2
+ /**
3
+ * Framework-agnostic TrueSheet navigator.
4
+ * Wired into React Navigation via `./index` and Expo Router via `./expo-router`.
5
+ */
6
+ export declare const trueSheetNavigator: import("standard-navigation").StandardNavigator<TrueSheetNavigationOptions, TrueSheetStandardEventMap, TrueSheetNavigatorContentExtraProps>;
7
+ //# sourceMappingURL=navigator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigator.d.ts","sourceRoot":"","sources":["../../../../src/navigation/navigator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,0BAA0B,EAC1B,mCAAmC,EACnC,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,kBAAkB,6IAIH,CAAC"}
@@ -1,3 +1,3 @@
1
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;
2
+ export declare const ReanimatedTrueSheetScreen: ({ detentIndex, resizeKey, dispatch, emit, routeKey, closing, detents, children, positionChangeHandler, ...sheetProps }: TrueSheetScreenProps) => import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=ReanimatedTrueSheetScreen.d.ts.map
@@ -1 +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"}
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,wHAWvC,oBAAoB,4CAsCtB,CAAC"}
@@ -1,3 +1,3 @@
1
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;
2
+ export declare const TrueSheetScreen: ({ detentIndex, resizeKey, dispatch, emit, routeKey, closing, detents, children, positionChangeHandler, ...sheetProps }: TrueSheetScreenProps) => import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=TrueSheetScreen.d.ts.map
@@ -1 +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"}
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,wHAW7B,oBAAoB,4CAmCtB,CAAC"}
@@ -1,11 +1,10 @@
1
- import type { ParamListBase } from '@react-navigation/core';
2
1
  import type { TrueSheetProps } from '../../TrueSheet.types';
3
- import type { PositionChangeHandler, TrueSheetNavigationHelpers, TrueSheetNavigationProp, TrueSheetNavigationSheetProps } from '../types';
2
+ import type { PositionChangeHandler, TrueSheetDispatch, TrueSheetEmitFn, TrueSheetNavigationSheetProps } from '../types';
4
3
  export interface TrueSheetScreenProps extends TrueSheetNavigationSheetProps {
5
4
  detentIndex: number;
6
5
  resizeKey?: number;
7
- navigation: TrueSheetNavigationProp<ParamListBase>;
8
- emit: TrueSheetNavigationHelpers['emit'];
6
+ dispatch: TrueSheetDispatch;
7
+ emit: TrueSheetEmitFn;
9
8
  routeKey: string;
10
9
  closing?: boolean;
11
10
  detents: TrueSheetProps['detents'];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/screen/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EACV,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,oBAAqB,SAAQ,6BAA6B;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,uBAAuB,CAAC,aAAa,CAAC,CAAC;IACnD,IAAI,EAAE,0BAA0B,CAAC,MAAM,CAAC,CAAC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC/C"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/screen/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,oBAAqB,SAAQ,6BAA6B;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC/C"}
@@ -1,15 +1,13 @@
1
1
  import { TrueSheet } from '../../TrueSheet';
2
- import type { DetentChangeEvent, DetentInfoEventPayload, DidBlurEvent, DidFocusEvent, DidPresentEvent, DragBeginEvent, DragChangeEvent, DragEndEvent, PositionChangeEvent, PositionChangeEventPayload, WillBlurEvent, WillDismissEvent, WillFocusEvent, WillPresentEvent } from '../../TrueSheet.types';
3
- import type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationProp } from '../types';
4
- import type { ParamListBase } from '@react-navigation/core';
5
- type EmitFn = TrueSheetNavigationHelpers['emit'];
2
+ import type { DetentChangeEvent, DetentInfoEventPayload, DidBlurEvent, DidFocusEvent, DidPresentEvent, DragBeginEvent, DragChangeEvent, DragEndEvent, PositionChangeEvent, PositionChangeEventPayload, WillBlurEvent, WillDismissEvent, DismissAttemptEvent, WillFocusEvent, WillPresentEvent } from '../../TrueSheet.types';
3
+ import type { TrueSheetDispatch, TrueSheetEmitFn, TrueSheetNavigationEventMap } from '../types';
6
4
  interface UseSheetScreenStateProps {
7
5
  detentIndex: number;
8
6
  resizeKey?: number;
9
7
  closing?: boolean;
10
- navigation: TrueSheetNavigationProp<ParamListBase>;
8
+ dispatch: TrueSheetDispatch;
11
9
  routeKey: string;
12
- emit: EmitFn;
10
+ emit: TrueSheetEmitFn;
13
11
  }
14
12
  export declare const useSheetScreenState: (props: UseSheetScreenStateProps) => {
15
13
  ref: import("react").RefObject<TrueSheet | null>;
@@ -20,6 +18,7 @@ export declare const useSheetScreenState: (props: UseSheetScreenStateProps) => {
20
18
  onDidPresent: (e: DidPresentEvent) => void;
21
19
  onWillDismiss: (_e: WillDismissEvent) => void;
22
20
  onDidDismiss: () => void;
21
+ onDismissAttempt: (_e: DismissAttemptEvent) => void;
23
22
  onDetentChange: (e: DetentChangeEvent) => void;
24
23
  onDragBegin: (e: DragBeginEvent) => void;
25
24
  onDragChange: (e: DragChangeEvent) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useSheetScreenState.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/screen/useSheetScreenState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,cAAc,EACd,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,0BAA0B,EAC1B,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,KAAK,MAAM,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;AAEjD,UAAU,wBAAwB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,uBAAuB,CAAC,aAAa,CAAC,CAAC;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,mBAAmB,GAAI,OAAO,wBAAwB;;;sBAyBvD,MAAM,2BAA2B,QACjC,sBAAsB,GAAG,0BAA0B,GAAG,SAAS;;2BAmBlD,gBAAgB;0BACjB,eAAe;4BACb,gBAAgB;;4BAEhB,iBAAiB;yBACpB,cAAc;0BACb,eAAe;uBAClB,YAAY;8BACL,mBAAmB;0BACvB,cAAc;yBACf,aAAa;yBACb,aAAa;wBACd,YAAY;;CAWjC,CAAC"}
1
+ {"version":3,"file":"useSheetScreenState.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/screen/useSheetScreenState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,cAAc,EACd,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,0BAA0B,EAC1B,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAGhG,UAAU,wBAAwB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,eAAO,MAAM,mBAAmB,GAAI,OAAO,wBAAwB;;;sBAyBvD,MAAM,2BAA2B,QACjC,sBAAsB,GAAG,0BAA0B,GAAG,SAAS;;2BAmBlD,gBAAgB;0BACjB,eAAe;4BACb,gBAAgB;;+BAEb,mBAAmB;4BACtB,iBAAiB;yBACpB,cAAc;0BACb,eAAe;uBAClB,YAAY;8BACL,mBAAmB;0BACvB,cAAc;yBACf,aAAa;yBACb,aAAa;wBACd,YAAY;;CAWjC,CAAC"}
@@ -1,5 +1,7 @@
1
- import type { DefaultNavigatorOptions, Descriptor, NavigationHelpers, NavigationProp, NavigationState, ParamListBase, RouteProp, StackActionHelpers } from '@react-navigation/core';
1
+ import type { NavigatorArgs } from 'standard-navigation';
2
2
  import type { DetentInfoEventPayload, PositionChangeEventPayload, TrueSheetProps } from '../TrueSheet.types';
3
+ import type { TrueSheetActionType } from './actions';
4
+ import type { DefaultNavigatorOptions, Descriptor, NavigationAction, NavigationHelpers, NavigationProp, NavigationState, ParamListBase, RouteProp, Router, StackActionHelpers, StackRouterOptions } from './base-types';
3
5
  export type PositionChangeHandler = (payload: PositionChangeEventPayload) => void;
4
6
  export type TrueSheetNavigationEventMap = {
5
7
  /**
@@ -26,6 +28,12 @@ export type TrueSheetNavigationEventMap = {
26
28
  sheetDidDismiss: {
27
29
  data: undefined;
28
30
  };
31
+ /**
32
+ * Event fired when the user tries to dismiss a non-dismissible sheet.
33
+ */
34
+ sheetDismissAttempt: {
35
+ data: undefined;
36
+ };
29
37
  /**
30
38
  * Event fired when the sheet's detent changes.
31
39
  */
@@ -81,27 +89,79 @@ export type TrueSheetNavigationEventMap = {
81
89
  data: undefined;
82
90
  };
83
91
  };
84
- export type TrueSheetNavigationState<ParamList extends ParamListBase> = Omit<NavigationState<ParamList>, 'routes'> & {
92
+ /**
93
+ * A navigation state tagged as `true-sheet`, with the sheet fields the router
94
+ * adds to each route.
95
+ * Generic over the base state so each entry point can bind its own
96
+ * `NavigationState` — see `./base-types`.
97
+ */
98
+ export type TrueSheetStateOf<State extends {
99
+ routes: readonly unknown[];
100
+ }> = Omit<State, 'routes'> & {
85
101
  type: 'true-sheet';
86
- routes: (NavigationState<ParamList>['routes'][number] & {
102
+ routes: (State['routes'][number] & {
87
103
  resizeIndex?: number;
88
104
  resizeKey?: number;
89
105
  closing?: boolean;
90
106
  })[];
91
107
  };
92
- export type TrueSheetActionHelpers<ParamList extends ParamListBase> = StackActionHelpers<ParamList> & {
108
+ export type TrueSheetNavigationState<ParamList extends ParamListBase> = TrueSheetStateOf<NavigationState<ParamList>>;
109
+ export type TrueSheetRouterState = TrueSheetNavigationState<ParamListBase>;
110
+ export type TrueSheetRouterOptions = StackRouterOptions;
111
+ export type TrueSheetRouter = Router<TrueSheetRouterState, TrueSheetActionType>;
112
+ /**
113
+ * The wrapped router factory — also the shape `createTrueSheetRouter` accepts,
114
+ * pre-instantiated so either entry point's `StackRouterFactory` fits it.
115
+ */
116
+ export type TrueSheetRouterFactory = (options: TrueSheetRouterOptions) => TrueSheetRouter;
117
+ /**
118
+ * The base `StackRouter` factory to wrap, typed generically over the state and
119
+ * action types the wrapper threads through — `StackRouter` is structural and
120
+ * never touches the sheet-specific fields.
121
+ * Injected by each entry point so the shared router never imports
122
+ * `@react-navigation/*` at runtime (Expo Router apps don't install it).
123
+ */
124
+ export type StackRouterFactory = <State extends NavigationState<ParamListBase>, Action extends NavigationAction>(options: TrueSheetRouterOptions) => Router<State, Action>;
125
+ /**
126
+ * `TrueSheetNavigationEventMap` in the `standard-navigation` event-map shape.
127
+ */
128
+ export type TrueSheetStandardEventMap = {
129
+ [K in keyof TrueSheetNavigationEventMap]: {
130
+ data: TrueSheetNavigationEventMap[K]['data'];
131
+ canPreventDefault: false;
132
+ };
133
+ };
134
+ export type TrueSheetRoute = TrueSheetNavigationState<ParamListBase>['routes'][number];
135
+ export type TrueSheetDispatch = (action: TrueSheetActionType) => void;
136
+ export type TrueSheetEmitFn = NavigatorArgs<TrueSheetNavigationOptions, TrueSheetStandardEventMap>['emitter']['emit'];
137
+ /**
138
+ * Props injected into the navigator content by each adapter
139
+ * (React Navigation's `mapper` / Expo Router's `createProps`).
140
+ * Raw routes carry the custom fields (`closing`, `resizeIndex`, `resizeKey`)
141
+ * that the standard state strips out.
142
+ */
143
+ export interface TrueSheetNavigatorContentExtraProps {
144
+ routes: TrueSheetRoute[];
145
+ dispatch: TrueSheetDispatch;
146
+ }
147
+ /**
148
+ * Generic over the base helpers so each entry point can bind its own
149
+ * `StackActionHelpers` — see `./base-types`.
150
+ */
151
+ export type TrueSheetActionHelpersOf<Helpers> = Helpers & {
93
152
  /**
94
153
  * Resize the sheet to a specific detent index.
95
154
  */
96
155
  resize(index?: number): void;
97
156
  };
157
+ export type TrueSheetActionHelpers<ParamList extends ParamListBase> = TrueSheetActionHelpersOf<StackActionHelpers<ParamList>>;
98
158
  export type TrueSheetNavigationProp<ParamList extends ParamListBase, RouteName extends keyof ParamList = string, NavigatorID extends string | undefined = undefined> = NavigationProp<ParamList, RouteName, NavigatorID, TrueSheetNavigationState<ParamList>, TrueSheetNavigationOptions, TrueSheetNavigationEventMap> & TrueSheetActionHelpers<ParamList>;
99
159
  export type TrueSheetScreenProps<ParamList extends ParamListBase, RouteName extends keyof ParamList = string, NavigatorID extends string | undefined = undefined> = {
100
160
  navigation: TrueSheetNavigationProp<ParamList, RouteName, NavigatorID>;
101
161
  route: RouteProp<ParamList, RouteName>;
102
162
  };
103
163
  export type TrueSheetNavigationHelpers = NavigationHelpers<ParamListBase, TrueSheetNavigationEventMap>;
104
- export type TrueSheetNavigationSheetProps = Pick<TrueSheetProps, 'detents' | 'backgroundColor' | 'cornerRadius' | 'dismissible' | 'draggable' | 'grabber' | 'grabberOptions' | 'accessibilityOptions' | 'dimmed' | 'dimmedDetentIndex' | 'backgroundBlur' | 'blurOptions' | 'maxContentHeight' | 'maxContentWidth' | 'presentation' | 'style' | 'header' | 'headerStyle' | 'headerOptions' | 'footer' | 'footerStyle' | 'footerOptions' | 'scrollableOptions' | 'insetAdjustment' | 'anchor' | 'anchorOffset' | 'elevation' | 'detached' | 'detachedOffset'>;
164
+ export type TrueSheetNavigationSheetProps = Pick<TrueSheetProps, 'detents' | 'backgroundColor' | 'cornerRadius' | 'dismissible' | 'draggable' | 'grabber' | 'grabberOptions' | 'accessibilityOptions' | 'dimmed' | 'dimmedDetentIndex' | 'backgroundBlur' | 'blurOptions' | 'maxContentHeight' | 'maxContentWidth' | 'presentation' | 'style' | 'header' | 'headerStyle' | 'headerOptions' | 'footer' | 'footerStyle' | 'footerOptions' | 'scrollableRef' | 'scrollableOptions' | 'insetAdjustment' | 'anchor' | 'anchorOffset' | 'elevation' | 'detached' | 'detachedOffset'>;
105
165
  /**
106
166
  * Screen options for TrueSheet navigator screens.
107
167
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/navigation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,aAAa,EACb,SAAS,EACT,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,sBAAsB,EACtB,0BAA0B,EAC1B,cAAc,EACf,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,0BAA0B,KAAK,IAAI,CAAC;AAElF,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,gBAAgB,EAAE;QAAE,IAAI,EAAE,sBAAsB,CAAA;KAAE,CAAC;IACnD;;OAEG;IACH,eAAe,EAAE;QAAE,IAAI,EAAE,sBAAsB,CAAA;KAAE,CAAC;IAClD;;OAEG;IACH,gBAAgB,EAAE;QAAE,IAAI,EAAE,SAAS,CAAA;KAAE,CAAC;IACtC;;OAEG;IACH,eAAe,EAAE;QAAE,IAAI,EAAE,SAAS,CAAA;KAAE,CAAC;IACrC;;OAEG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AkB,GAClB,iBAAiB,GACjB,cAAc,GACd,OAAO,GACP,QAAQ,GACR,aAAa,GACb,eAAe,GACf,QAAQ,GACR,aAAa,GACb,eAAe,GACf,eAAe,GACf,mBAAmB,GACnB,iBAAiB,GACjB,QAAQ,GACR,cAAc,GACd,WAAW,GACX,UAAU,GACV,gBAAgB,CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,6BAA6B,GAAG;IACvE;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;;;;;;;;;;;;OAiBG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,uBAAuB,CAC3D,aAAa,EACb,MAAM,GAAG,SAAS,EAClB,wBAAwB,CAAC,aAAa,CAAC,EACvC,0BAA0B,EAC1B,2BAA2B,EAC3B,OAAO,CACR,GAAG;IACF;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAC1C,0BAA0B,EAC1B,uBAAuB,CAAC,aAAa,CAAC,EACtC,SAAS,CAAC,aAAa,CAAC,CACzB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,CAAC;CACpC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type ParamListBase } from '@react-navigation/core';
1
+ import { type ParamListBase } from '@react-navigation/native';
2
2
  import type { TrueSheetNavigationProp } from './types';
3
3
  /**
4
4
  * Hook to access TrueSheet navigation with the resize helper.
@@ -1 +1 @@
1
- {"version":3,"file":"useTrueSheetNavigation.d.ts","sourceRoot":"","sources":["../../../../src/navigation/useTrueSheetNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sBAAsB,GACjC,CAAC,SAAS,aAAa,GAAG,aAAa,OACpC,uBAAuB,CAAC,CAAC,CAAgD,CAAC"}
1
+ {"version":3,"file":"useTrueSheetNavigation.d.ts","sourceRoot":"","sources":["../../../../src/navigation/useTrueSheetNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sBAAsB,GACjC,CAAC,SAAS,aAAa,GAAG,aAAa,OACpC,uBAAuB,CAAC,CAAC,CAAgD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { View } from 'react-native';
2
+ /**
3
+ * Resolves a React Native web `View` ref value to its underlying DOM element —
4
+ * RN-web refs expose the host DOM node directly.
5
+ */
6
+ export declare const getDOMElement: (view: View | null) => HTMLElement | null;
7
+ //# sourceMappingURL=dom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../../src/web/dom.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,IAAI,GAAG,IAAI,KAAG,WAAW,GAAG,IACrB,CAAC"}
@@ -5,6 +5,7 @@ export declare const TRANSITIONS: {
5
5
  export declare const VELOCITY_THRESHOLD = 0.4;
6
6
  export declare const DEFAULT_PEEK_HEIGHT = 150;
7
7
  export declare const CLOSE_THRESHOLD = 0.25;
8
+ export declare const DISMISS_ATTEMPT_THRESHOLD = 24;
8
9
  export declare const SCROLL_LOCK_TIMEOUT = 100;
9
10
  export declare const BORDER_RADIUS = 8;
10
11
  export declare const NESTED_DISPLACEMENT = 16;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;CAGvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;CAGvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,eAAO,MAAM,eAAe,OAAO,CAAC;AAIpC,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
@@ -18,6 +18,7 @@ interface DrawerContextValue {
18
18
  onNestedOpenChange: (o: boolean) => void;
19
19
  onNestedRelease: (event: React.PointerEvent<HTMLDivElement>, open: boolean) => void;
20
20
  dismissible: boolean;
21
+ onDismissAttempt?: () => void;
21
22
  isOpen: boolean;
22
23
  isDragging: boolean;
23
24
  keyboardIsOpen: React.MutableRefObject<boolean>;