react-native-screen-transitions 3.4.0-alpha.1 → 3.4.0-alpha.2

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 (243) hide show
  1. package/README.md +11 -1109
  2. package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js +69 -2
  3. package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
  4. package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js +9 -0
  5. package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js.map +1 -1
  6. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +195 -0
  7. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
  8. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
  9. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
  10. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
  11. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
  12. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +54 -0
  13. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
  14. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +40 -8
  15. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
  16. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +72 -0
  17. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
  18. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
  19. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
  20. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +7 -4
  21. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
  22. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
  23. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
  24. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
  25. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
  26. package/lib/commonjs/shared/components/create-boundary-component/index.js +22 -8
  27. package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
  28. package/lib/commonjs/shared/components/create-transition-aware-component.js +3 -2
  29. package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
  30. package/lib/commonjs/shared/components/native-screen-container.js +12 -6
  31. package/lib/commonjs/shared/components/native-screen-container.js.map +1 -1
  32. package/lib/commonjs/shared/components/native-screen.js +35 -8
  33. package/lib/commonjs/shared/components/native-screen.js.map +1 -1
  34. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +60 -0
  35. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
  36. package/lib/commonjs/shared/components/screen-container/layers/content.js +5 -37
  37. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  38. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +21 -12
  39. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  40. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js +6 -7
  41. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  42. package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js +11 -6
  43. package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js.map +1 -1
  44. package/lib/commonjs/shared/providers/layout-anchor.provider.js +4 -6
  45. package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +1 -1
  46. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +14 -7
  47. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  48. package/lib/commonjs/shared/providers/stack/core.provider.js +14 -21
  49. package/lib/commonjs/shared/providers/stack/core.provider.js.map +1 -1
  50. package/lib/commonjs/shared/stores/animation.store.js +3 -1
  51. package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
  52. package/lib/commonjs/shared/stores/bounds/internals/presence.js.map +1 -1
  53. package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js +14 -5
  54. package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
  55. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js +0 -5
  56. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
  57. package/lib/commonjs/shared/utils/bounds/index.js +10 -0
  58. package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
  59. package/lib/commonjs/shared/utils/bounds/types/frame-props.js +6 -0
  60. package/lib/commonjs/shared/utils/bounds/types/frame-props.js.map +1 -0
  61. package/lib/commonjs/shared/utils/bounds/zoom/build.js +33 -26
  62. package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -1
  63. package/lib/commonjs/shared/utils/resolve-screen-transition-options.js +25 -0
  64. package/lib/commonjs/shared/utils/resolve-screen-transition-options.js.map +1 -0
  65. package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js +69 -3
  66. package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
  67. package/lib/module/component-stack/navigators/create-component-stack-navigator.js +9 -0
  68. package/lib/module/component-stack/navigators/create-component-stack-navigator.js.map +1 -1
  69. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +182 -0
  70. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
  71. package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
  72. package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
  73. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
  74. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
  75. package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +49 -0
  76. package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
  77. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +41 -8
  78. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
  79. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +67 -0
  80. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
  81. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
  82. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
  83. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +7 -4
  84. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
  85. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
  86. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
  87. package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
  88. package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
  89. package/lib/module/shared/components/create-boundary-component/index.js +22 -8
  90. package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
  91. package/lib/module/shared/components/create-transition-aware-component.js +3 -2
  92. package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
  93. package/lib/module/shared/components/native-screen-container.js +12 -6
  94. package/lib/module/shared/components/native-screen-container.js.map +1 -1
  95. package/lib/module/shared/components/native-screen.js +35 -8
  96. package/lib/module/shared/components/native-screen.js.map +1 -1
  97. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +56 -0
  98. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
  99. package/lib/module/shared/components/screen-container/layers/content.js +9 -41
  100. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  101. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +22 -13
  102. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  103. package/lib/module/shared/providers/gestures/handlers/use-handlers.js +6 -7
  104. package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  105. package/lib/module/shared/providers/gestures/helpers/gesture-activation.js +11 -6
  106. package/lib/module/shared/providers/gestures/helpers/gesture-activation.js.map +1 -1
  107. package/lib/module/shared/providers/layout-anchor.provider.js +4 -6
  108. package/lib/module/shared/providers/layout-anchor.provider.js.map +1 -1
  109. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +14 -7
  110. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  111. package/lib/module/shared/providers/stack/core.provider.js +14 -21
  112. package/lib/module/shared/providers/stack/core.provider.js.map +1 -1
  113. package/lib/module/shared/stores/animation.store.js +3 -1
  114. package/lib/module/shared/stores/animation.store.js.map +1 -1
  115. package/lib/module/shared/stores/bounds/internals/presence.js.map +1 -1
  116. package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js +14 -5
  117. package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
  118. package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js +0 -5
  119. package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
  120. package/lib/module/shared/utils/bounds/index.js +10 -0
  121. package/lib/module/shared/utils/bounds/index.js.map +1 -1
  122. package/lib/module/shared/utils/bounds/types/frame-props.js +4 -0
  123. package/lib/module/shared/utils/bounds/types/frame-props.js.map +1 -0
  124. package/lib/module/shared/utils/bounds/zoom/build.js +33 -26
  125. package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
  126. package/lib/module/shared/utils/resolve-screen-transition-options.js +19 -0
  127. package/lib/module/shared/utils/resolve-screen-transition-options.js.map +1 -0
  128. package/lib/typescript/blank-stack/index.d.ts +1 -1
  129. package/lib/typescript/blank-stack/index.d.ts.map +1 -1
  130. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +29 -4
  131. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
  132. package/lib/typescript/blank-stack/types.d.ts +33 -4
  133. package/lib/typescript/blank-stack/types.d.ts.map +1 -1
  134. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +8 -0
  135. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
  136. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +81 -0
  137. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +1 -0
  138. package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts.map +1 -1
  139. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts +2 -3
  140. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +1 -1
  141. package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts +11 -0
  142. package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts.map +1 -0
  143. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts +2 -2
  144. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts.map +1 -1
  145. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts +11 -0
  146. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts.map +1 -0
  147. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts.map +1 -1
  148. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts.map +1 -1
  149. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts +3 -3
  150. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts.map +1 -1
  151. package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts +2 -2
  152. package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts.map +1 -1
  153. package/lib/typescript/shared/components/create-boundary-component/index.d.ts +5 -3
  154. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
  155. package/lib/typescript/shared/components/create-boundary-component/types.d.ts +2 -4
  156. package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
  157. package/lib/typescript/shared/components/create-transition-aware-component.d.ts +1 -0
  158. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  159. package/lib/typescript/shared/components/native-screen-container.d.ts.map +1 -1
  160. package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
  161. package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts +3 -0
  162. package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -0
  163. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  164. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +3 -1
  165. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  166. package/lib/typescript/shared/index.d.ts +0 -1
  167. package/lib/typescript/shared/index.d.ts.map +1 -1
  168. package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts +1 -1
  169. package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
  170. package/lib/typescript/shared/providers/gestures/helpers/gesture-activation.d.ts.map +1 -1
  171. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +1 -1
  172. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +1 -1
  173. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  174. package/lib/typescript/shared/providers/stack/core.provider.d.ts +2 -0
  175. package/lib/typescript/shared/providers/stack/core.provider.d.ts.map +1 -1
  176. package/lib/typescript/shared/stores/animation.store.d.ts +5 -3
  177. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  178. package/lib/typescript/shared/stores/bounds/internals/presence.d.ts.map +1 -1
  179. package/lib/typescript/shared/types/animation.types.d.ts +7 -0
  180. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  181. package/lib/typescript/shared/types/screen.types.d.ts +46 -22
  182. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  183. package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -1
  184. package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts.map +1 -1
  185. package/lib/typescript/shared/utils/bounds/index.d.ts +2 -2
  186. package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
  187. package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts +5 -0
  188. package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts.map +1 -0
  189. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts +4 -4
  190. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts.map +1 -1
  191. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
  192. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +3 -3
  193. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -1
  194. package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts +5 -0
  195. package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts.map +1 -0
  196. package/package.json +2 -1
  197. package/src/blank-stack/index.ts +1 -0
  198. package/src/blank-stack/navigators/create-blank-stack-navigator.tsx +138 -19
  199. package/src/blank-stack/types.ts +33 -5
  200. package/src/component-stack/navigators/create-component-stack-navigator.tsx +8 -0
  201. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +258 -0
  202. package/src/shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts +7 -17
  203. package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +38 -28
  204. package/src/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.ts +58 -0
  205. package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +41 -10
  206. package/src/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.ts +82 -0
  207. package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +24 -12
  208. package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +11 -9
  209. package/src/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.ts +29 -26
  210. package/src/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.ts +26 -17
  211. package/src/shared/components/create-boundary-component/index.tsx +25 -6
  212. package/src/shared/components/create-boundary-component/types.ts +8 -4
  213. package/src/shared/components/create-transition-aware-component.tsx +5 -2
  214. package/src/shared/components/native-screen-container.tsx +11 -3
  215. package/src/shared/components/native-screen.tsx +65 -20
  216. package/src/shared/components/screen-container/hooks/use-content-layout.ts +82 -0
  217. package/src/shared/components/screen-container/layers/content.tsx +11 -73
  218. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +24 -16
  219. package/src/shared/providers/gestures/handlers/use-handlers.ts +8 -5
  220. package/src/shared/providers/gestures/helpers/gesture-activation.ts +11 -6
  221. package/src/shared/providers/layout-anchor.provider.tsx +2 -5
  222. package/src/shared/providers/register-bounds.provider.tsx +1 -1
  223. package/src/shared/providers/screen/animation/helpers/pipeline.ts +24 -8
  224. package/src/shared/providers/stack/core.provider.tsx +27 -14
  225. package/src/shared/stores/animation.store.ts +11 -7
  226. package/src/shared/stores/bounds/internals/presence.ts +3 -1
  227. package/src/shared/types/animation.types.ts +7 -0
  228. package/src/shared/types/screen.types.ts +50 -22
  229. package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +14 -1
  230. package/src/shared/utils/bounds/helpers/resolve-bound-tag.ts +0 -6
  231. package/src/shared/utils/bounds/index.ts +16 -5
  232. package/src/shared/utils/bounds/types/frame-props.ts +5 -0
  233. package/src/shared/utils/bounds/zoom/accessor.ts +3 -3
  234. package/src/shared/utils/bounds/zoom/build.ts +32 -22
  235. package/src/shared/utils/bounds/zoom/types.ts +3 -3
  236. package/src/shared/utils/resolve-screen-transition-options.ts +37 -0
  237. package/lib/commonjs/shared/providers/viewport.provider.js +0 -33
  238. package/lib/commonjs/shared/providers/viewport.provider.js.map +0 -1
  239. package/lib/module/shared/providers/viewport.provider.js +0 -27
  240. package/lib/module/shared/providers/viewport.provider.js.map +0 -1
  241. package/lib/typescript/shared/providers/viewport.provider.d.ts +0 -13
  242. package/lib/typescript/shared/providers/viewport.provider.d.ts.map +0 -1
  243. package/src/shared/providers/viewport.provider.tsx +0 -39
@@ -5,12 +5,12 @@ import { StyleSheet } from "react-native";
5
5
  import { GestureHandlerRootView } from "react-native-gesture-handler";
6
6
  import { StackType } from "../../types/stack.types";
7
7
  import createProvider from "../../utils/create-provider";
8
- import { ViewportProvider } from "../viewport.provider";
9
8
 
10
9
  export interface StackCoreConfig {
11
10
  TRANSITIONS_ALWAYS_ON?: boolean;
12
11
  STACK_TYPE?: StackType;
13
12
  DISABLE_NATIVE_SCREENS?: boolean;
13
+ DISABLE_NATIVE_SCREEN_CONTAINER?: boolean;
14
14
  }
15
15
 
16
16
  interface StackCoreProviderProps {
@@ -23,6 +23,7 @@ export interface StackCoreContextValue {
23
23
  TRANSITIONS_ALWAYS_ON: boolean;
24
24
  STACK_TYPE?: StackType;
25
25
  DISABLE_NATIVE_SCREENS: boolean;
26
+ DISABLE_NATIVE_SCREEN_CONTAINER: boolean;
26
27
  };
27
28
  }
28
29
 
@@ -34,18 +35,27 @@ const { StackCoreProvider: InternalStackCoreProvider, useStackCoreContext } =
34
35
  const {
35
36
  TRANSITIONS_ALWAYS_ON = false,
36
37
  DISABLE_NATIVE_SCREENS = false,
38
+ DISABLE_NATIVE_SCREEN_CONTAINER = false,
37
39
  STACK_TYPE = StackType.BLANK,
38
40
  } = config;
39
41
 
40
42
  const flags = useMemo(
41
- () => ({ TRANSITIONS_ALWAYS_ON, STACK_TYPE, DISABLE_NATIVE_SCREENS }),
42
- [TRANSITIONS_ALWAYS_ON, STACK_TYPE, DISABLE_NATIVE_SCREENS],
43
+ () => ({
44
+ TRANSITIONS_ALWAYS_ON,
45
+ STACK_TYPE,
46
+ DISABLE_NATIVE_SCREENS,
47
+ DISABLE_NATIVE_SCREEN_CONTAINER,
48
+ }),
49
+ [
50
+ TRANSITIONS_ALWAYS_ON,
51
+ STACK_TYPE,
52
+ DISABLE_NATIVE_SCREENS,
53
+ DISABLE_NATIVE_SCREEN_CONTAINER,
54
+ ],
43
55
  );
44
56
 
45
- const value = useMemo(() => ({ flags }), [flags]);
46
-
47
57
  return {
48
- value,
58
+ value: { flags },
49
59
  children: (
50
60
  <GestureHandlerRootView
51
61
  style={styles.container}
@@ -53,9 +63,7 @@ const { StackCoreProvider: InternalStackCoreProvider, useStackCoreContext } =
53
63
  STACK_TYPE === StackType.COMPONENT ? "box-none" : undefined
54
64
  }
55
65
  >
56
- <SafeAreaProviderCompat>
57
- <ViewportProvider>{children}</ViewportProvider>
58
- </SafeAreaProviderCompat>
66
+ <SafeAreaProviderCompat>{children}</SafeAreaProviderCompat>
59
67
  </GestureHandlerRootView>
60
68
  ),
61
69
  };
@@ -71,16 +79,21 @@ export function withStackCore<TProps extends object>(
71
79
  ): React.FC<TProps & StackCoreConfig> {
72
80
  return function StackCoreWrapper({
73
81
  DISABLE_NATIVE_SCREENS,
82
+ DISABLE_NATIVE_SCREEN_CONTAINER,
74
83
  TRANSITIONS_ALWAYS_ON,
75
84
  STACK_TYPE,
76
85
  ...props
77
86
  }: TProps & StackCoreConfig) {
78
- // User props first, then defaultConfig overrides (config takes priority)
87
+ // Start from defaults, then apply explicit overrides from the caller.
79
88
  const config: StackCoreConfig = {
80
- ...(DISABLE_NATIVE_SCREENS !== undefined && { DISABLE_NATIVE_SCREENS }),
81
- ...(TRANSITIONS_ALWAYS_ON !== undefined && { TRANSITIONS_ALWAYS_ON }),
82
- ...(STACK_TYPE !== undefined && { STACK_TYPE }),
83
- ...defaultConfig,
89
+ TRANSITIONS_ALWAYS_ON:
90
+ TRANSITIONS_ALWAYS_ON ?? defaultConfig.TRANSITIONS_ALWAYS_ON,
91
+ STACK_TYPE: STACK_TYPE ?? defaultConfig.STACK_TYPE,
92
+ DISABLE_NATIVE_SCREENS:
93
+ DISABLE_NATIVE_SCREENS ?? defaultConfig.DISABLE_NATIVE_SCREENS,
94
+ DISABLE_NATIVE_SCREEN_CONTAINER:
95
+ DISABLE_NATIVE_SCREEN_CONTAINER ??
96
+ defaultConfig.DISABLE_NATIVE_SCREEN_CONTAINER,
84
97
  };
85
98
  return (
86
99
  <InternalStackCoreProvider config={config}>
@@ -3,7 +3,7 @@ import {
3
3
  makeMutable,
4
4
  type SharedValue,
5
5
  } from "react-native-reanimated";
6
- import type { ScreenKey } from "../types/screen.types";
6
+ import type { Layout, ScreenKey } from "../types/screen.types";
7
7
 
8
8
  export type AnimationStoreMap = {
9
9
  progress: SharedValue<number>;
@@ -13,6 +13,8 @@ export type AnimationStoreMap = {
13
13
  targetProgress: SharedValue<number>;
14
14
  /** Resolved fraction (contentHeight / screenHeight) for the 'auto' snap point. -1 = not yet measured. */
15
15
  autoSnapPoint: SharedValue<number>;
16
+ /** Intrinsic content layout measured from the screen container wrapper. */
17
+ contentLayout: SharedValue<Layout | null>;
16
18
  };
17
19
 
18
20
  const store: Record<ScreenKey, AnimationStoreMap> = {};
@@ -25,6 +27,7 @@ function createAnimationBag(): AnimationStoreMap {
25
27
  entering: makeMutable(0),
26
28
  targetProgress: makeMutable(1),
27
29
  autoSnapPoint: makeMutable(-1),
30
+ contentLayout: makeMutable<Layout | null>(null),
28
31
  };
29
32
  }
30
33
 
@@ -43,17 +46,17 @@ function peekRouteAnimations(
43
46
  return store[routeKey];
44
47
  }
45
48
 
46
- function getRouteAnimation(
49
+ function getRouteAnimation<K extends keyof AnimationStoreMap>(
47
50
  routeKey: ScreenKey,
48
- type: keyof AnimationStoreMap,
49
- ): SharedValue<number> {
51
+ type: K,
52
+ ): AnimationStoreMap[K] {
50
53
  return ensure(routeKey)[type];
51
54
  }
52
55
 
53
- function getAnimation(
56
+ function getAnimation<K extends keyof AnimationStoreMap>(
54
57
  routeKey: ScreenKey,
55
- type: keyof AnimationStoreMap,
56
- ): SharedValue<number> {
58
+ type: K,
59
+ ): AnimationStoreMap[K] {
57
60
  return getRouteAnimation(routeKey, type);
58
61
  }
59
62
 
@@ -70,6 +73,7 @@ function clear(routeKey: ScreenKey) {
70
73
  cancelAnimation(bag.entering);
71
74
  cancelAnimation(bag.targetProgress);
72
75
  cancelAnimation(bag.autoSnapPoint);
76
+ cancelAnimation(bag.contentLayout);
73
77
  }
74
78
  delete store[routeKey];
75
79
  }
@@ -118,7 +118,9 @@ function setGroupActiveId(group: string, id: string) {
118
118
  groups.modify(<T extends GroupsState>(state: T): T => {
119
119
  "worklet";
120
120
  const mutableState = state as GroupsState;
121
- mutableState[group] = { activeId: id };
121
+ mutableState[group] = {
122
+ activeId: id,
123
+ };
122
124
  return state;
123
125
  });
124
126
  debugStoreSizeLog(`setGroupActiveId(${group},${id})`);
@@ -103,6 +103,13 @@ export interface ScreenInterpolationProps {
103
103
  * The `width` and `height` of the screen container.
104
104
  */
105
105
  screen: Layout;
106
+ /**
107
+ * The intrinsic measured content wrapper layout when available.
108
+ *
109
+ * This is currently populated for the measured screen-container path used by
110
+ * auto snap-point sizing. It is undefined until a real measurement exists.
111
+ */
112
+ content?: Layout;
106
113
  };
107
114
 
108
115
  /**
@@ -12,6 +12,9 @@ export type Layout = {
12
12
  };
13
13
 
14
14
  export type ScreenKey = string;
15
+ export type SheetScrollGestureBehavior =
16
+ | "expand-and-collapse"
17
+ | "collapse-only";
15
18
 
16
19
  /**
17
20
  * A single snap point value. Either a fraction of screen height (0–1) or
@@ -33,10 +36,13 @@ export type TransitionAwareProps<T extends object> = AnimatedProps<T> & {
33
36
  * </Transition.View>
34
37
  *
35
38
  * // In your screenStyleInterpolator:
36
- * return {
37
- * 'hero-image': {
38
- * opacity: interpolate(progress, [0, 1], [0, 1]),
39
- * transform: [{ scale: interpolate(progress, [0, 1], [0.8, 1]) }]
39
+ * screenStyleInterpolator: ({ progress }) => {
40
+ * "worklet";
41
+ * return {
42
+ * 'hero-image': {
43
+ * opacity: interpolate(progress, [0, 1], [0, 1]),
44
+ * transform: [{ scale: interpolate(progress, [0, 1], [0.8, 1]) }]
45
+ * }
40
46
  * }
41
47
  * }
42
48
  */
@@ -87,6 +93,13 @@ export type ScreenTransitionConfig = {
87
93
  * (e.g. `bounds().navigation.zoom()`) is ready from the first frame.
88
94
  *
89
95
  * Requires `@react-native-masked-view/masked-view` to be installed.
96
+ *
97
+ * @default false
98
+ */
99
+ navigationMaskEnabled?: boolean;
100
+
101
+ /**
102
+ * @deprecated Use `navigationMaskEnabled` instead.
90
103
  */
91
104
  maskEnabled?: boolean;
92
105
 
@@ -209,16 +222,25 @@ export type ScreenTransitionConfig = {
209
222
  initialSnapIndex?: number;
210
223
 
211
224
  /**
212
- * Controls whether swiping to expand the sheet works from within a ScrollView.
213
- *
214
- * - `true` (Apple Maps style): Swiping up at scroll top expands the sheet
215
- * - `false` (Instagram style): Expand only works via deadspace (non-scrollable areas)
225
+ * Controls how nested scroll content hands gestures off to a snap sheet.
216
226
  *
217
- * Collapse (swipe down at scroll top) always works regardless of this setting.
227
+ * - `"expand-and-collapse"` (Apple Maps style): Swiping up at scroll boundary expands the sheet,
228
+ * and swiping down at scroll boundary collapses or dismisses it
229
+ * - `"collapse-only"` (Instagram style): Expand only works via deadspace; collapse/dismiss via
230
+ * nested scroll content still works at boundary
218
231
  *
219
232
  * Only applies to screens with `snapPoints` configured.
220
233
  *
221
- * @default true
234
+ * @default "expand-and-collapse"
235
+ */
236
+ sheetScrollGestureBehavior?: SheetScrollGestureBehavior;
237
+
238
+ /**
239
+ * @deprecated Use `sheetScrollGestureBehavior` instead.
240
+ *
241
+ * Mapping:
242
+ * - `true` -> `"expand-and-collapse"`
243
+ * - `false` -> `"collapse-only"`
222
244
  */
223
245
  expandViaScrollView?: boolean;
224
246
 
@@ -255,12 +277,15 @@ export type ScreenTransitionConfig = {
255
277
  *
256
278
  * @example
257
279
  * backdropComponent: BlurView,
258
- * screenStyleInterpolator: ({ progress }) => ({
259
- * backdrop: {
260
- * style: { opacity: interpolate(progress, [0, 1], [0, 1]) },
261
- * props: { intensity: interpolate(progress, [0, 1], [0, 80]) },
262
- * },
263
- * })
280
+ * screenStyleInterpolator: ({ progress }) => {
281
+ * "worklet";
282
+ * return {
283
+ * backdrop: {
284
+ * style: { opacity: interpolate(progress, [0, 1], [0, 1]) },
285
+ * props: { intensity: interpolate(progress, [0, 1], [0, 80]) },
286
+ * },
287
+ * };
288
+ * }
264
289
  *
265
290
  * @default undefined
266
291
  */
@@ -277,12 +302,15 @@ export type ScreenTransitionConfig = {
277
302
  *
278
303
  * @example
279
304
  * surfaceComponent: SquircleView,
280
- * screenStyleInterpolator: ({ progress }) => ({
281
- * surface: {
282
- * style: { opacity: interpolate(progress, [0, 1], [0, 1]) },
283
- * props: { cornerRadius: 24, cornerSmoothing: 0.7 },
284
- * },
285
- * })
305
+ * screenStyleInterpolator: ({ progress }) => {
306
+ * "worklet";
307
+ * return {
308
+ * surface: {
309
+ * style: { opacity: interpolate(progress, [0, 1], [0, 1]) },
310
+ * props: { cornerRadius: 24, cornerSmoothing: 0.7 },
311
+ * },
312
+ * };
313
+ * }
286
314
  *
287
315
  * @default undefined
288
316
  */
@@ -73,6 +73,8 @@ const resolveBounds = (params: {
73
73
  currentScreenKey,
74
74
  sourceScreenKey: resolvedPair.sourceScreenKey,
75
75
  destinationScreenKey: resolvedPair.destinationScreenKey,
76
+ hasTargetOverride,
77
+ usedSnapshotDestination: resolvedPair.usedSnapshotDestination,
76
78
  };
77
79
  }
78
80
 
@@ -85,6 +87,8 @@ const resolveBounds = (params: {
85
87
  currentScreenKey,
86
88
  sourceScreenKey: resolvedPair.sourceScreenKey,
87
89
  destinationScreenKey: resolvedPair.destinationScreenKey,
90
+ hasTargetOverride,
91
+ usedSnapshotDestination: resolvedPair.usedSnapshotDestination,
88
92
  };
89
93
  }
90
94
 
@@ -107,6 +111,8 @@ const resolveBounds = (params: {
107
111
  currentScreenKey,
108
112
  sourceScreenKey: resolvedPair.sourceScreenKey,
109
113
  destinationScreenKey: resolvedPair.destinationScreenKey,
114
+ hasTargetOverride,
115
+ usedSnapshotDestination: resolvedPair.usedSnapshotDestination,
110
116
  };
111
117
  };
112
118
 
@@ -131,6 +137,8 @@ export const computeBoundStyles = (
131
137
  currentScreenKey,
132
138
  sourceScreenKey,
133
139
  destinationScreenKey,
140
+ hasTargetOverride,
141
+ usedSnapshotDestination,
134
142
  } = resolveBounds({
135
143
  id,
136
144
  previous,
@@ -151,10 +159,15 @@ export const computeBoundStyles = (
151
159
  const ranges: readonly [number, number] = entering ? ENTER_RANGE : EXIT_RANGE;
152
160
 
153
161
  if (computeOptions.method === "content") {
162
+ const ignoresSnapshotDestinationOwnership =
163
+ hasTargetOverride &&
164
+ usedSnapshotDestination &&
165
+ destinationScreenKey === sourceScreenKey;
154
166
  const currentOwnsSource =
155
167
  !!currentScreenKey &&
156
168
  currentScreenKey === sourceScreenKey &&
157
- currentScreenKey !== destinationScreenKey;
169
+ (currentScreenKey !== destinationScreenKey ||
170
+ ignoresSnapshotDestinationOwnership);
158
171
  const contentStart = currentOwnsSource ? end : start;
159
172
  const contentEnd = currentOwnsSource ? start : end;
160
173
  const geometry = computeContentTransformGeometry({
@@ -1,4 +1,3 @@
1
- import { BoundStore } from "../../../stores/bounds";
2
1
  import type { BoundId } from "../types/options";
3
2
 
4
3
  export type ResolveBoundTagParams = {
@@ -20,10 +19,5 @@ export const resolveBoundTag = ({
20
19
  return normalizedId;
21
20
  }
22
21
 
23
- const currentActiveId = BoundStore.getGroupActiveId(group);
24
- if (currentActiveId !== normalizedId) {
25
- BoundStore.setGroupActiveId(group, normalizedId);
26
- }
27
-
28
22
  return `${group}:${normalizedId}`;
29
23
  };
@@ -6,11 +6,23 @@ import { computeBoundStyles } from "./helpers/compute-bounds-styles";
6
6
  import { createInterpolators } from "./helpers/interpolators";
7
7
  import { createLinkAccessor } from "./helpers/link-accessor";
8
8
  import { resolveBoundTag } from "./helpers/resolve-bound-tag";
9
+ import type { BoundsFrameProps } from "./types/frame-props";
9
10
  import type { BoundsOptions } from "./types/options";
10
11
  import { createZoomAccessor } from "./zoom";
11
12
 
13
+ const syncGroupActiveMember = (group?: string, id?: string | number) => {
14
+ "worklet";
15
+ if (!group) return;
16
+ if (id === undefined || id === null || id === "") return;
17
+
18
+ const normalizedId = String(id);
19
+ if (BoundStore.getGroupActiveId(group) === normalizedId) return;
20
+
21
+ BoundStore.setGroupActiveId(group, normalizedId);
22
+ };
23
+
12
24
  export const createBoundsAccessor = (
13
- getProps: () => Omit<ScreenInterpolationProps, "bounds">,
25
+ getProps: () => BoundsFrameProps,
14
26
  ): BoundsAccessor => {
15
27
  "worklet";
16
28
 
@@ -37,6 +49,7 @@ export const createBoundsAccessor = (
37
49
  const computeElementBoundsStyles = (params?: BoundsOptions) => {
38
50
  "worklet";
39
51
  const props = getProps();
52
+ syncGroupActiveMember(params?.group, params?.id);
40
53
 
41
54
  const resolved = buildBoundsOptions({
42
55
  props,
@@ -54,15 +67,13 @@ export const createBoundsAccessor = (
54
67
  scaleMode: params?.scaleMode,
55
68
  target: params?.target,
56
69
  };
57
- let cachedNavigationPairProps:
58
- | Omit<ScreenInterpolationProps, "bounds">
59
- | undefined;
70
+ let cachedNavigationPairProps: BoundsFrameProps | undefined;
60
71
  let cachedNavigationPairTag = "";
61
72
  let cachedNavigationPair: ResolvedTransitionPair | undefined;
62
73
 
63
74
  const resolveNavigationPair = (
64
75
  tag: string,
65
- frameProps: Omit<ScreenInterpolationProps, "bounds">,
76
+ frameProps: BoundsFrameProps,
66
77
  ): ResolvedTransitionPair | undefined => {
67
78
  "worklet";
68
79
  if (!tag) return undefined;
@@ -0,0 +1,5 @@
1
+ import type { ScreenInterpolationProps } from "../../../types/animation.types";
2
+
3
+ export type BoundsFrameProps = Omit<ScreenInterpolationProps, "bounds"> & {
4
+ navigationMaskEnabled: boolean;
5
+ };
@@ -1,17 +1,17 @@
1
- import type { ScreenInterpolationProps } from "../../../types/animation.types";
2
1
  import type { BoundsNavigationZoomOptions } from "../../../types/bounds.types";
3
2
  import type { ResolveBoundTagParams } from "../helpers/resolve-bound-tag";
3
+ import type { BoundsFrameProps } from "../types/frame-props";
4
4
  import type { BoundId, BoundsOptions } from "../types/options";
5
5
  import { buildZoomStyles } from "./build";
6
6
 
7
7
  type ZoomAccessorParams = {
8
8
  id?: BoundId;
9
9
  group?: string;
10
- getProps: () => Omit<ScreenInterpolationProps, "bounds">;
10
+ getProps: () => BoundsFrameProps;
11
11
  resolveBoundTag: (params: ResolveBoundTagParams) => string | undefined;
12
12
  computeRaw: (
13
13
  overrides?: Partial<BoundsOptions>,
14
- frameProps?: Omit<ScreenInterpolationProps, "bounds">,
14
+ frameProps?: BoundsFrameProps,
15
15
  ) => Record<string, unknown>;
16
16
  zoomBaseOptions?: Pick<
17
17
  BoundsNavigationZoomOptions,
@@ -459,6 +459,12 @@ export const buildZoomStyles = ({
459
459
  const nextRouteKey = props.next?.route.key;
460
460
  const entering = !props.next;
461
461
  const screenLayout = props.layouts.screen;
462
+ const transitionContext = {
463
+ currentScreenKey: currentRouteKey,
464
+ previousScreenKey: previousRouteKey,
465
+ nextScreenKey: nextRouteKey,
466
+ entering,
467
+ };
462
468
 
463
469
  const resolvedConfig = resolveZoomConfig({
464
470
  id,
@@ -477,6 +483,19 @@ export const buildZoomStyles = ({
477
483
  explicitTarget,
478
484
  zoomOptions: resolvedZoomOptions,
479
485
  } = resolvedConfig;
486
+ const resolvedPair = BoundStore.resolveTransitionPair(
487
+ resolvedTag,
488
+ transitionContext,
489
+ );
490
+ const focusedVisibilityStyles = {
491
+ [resolvedTag]: {
492
+ style: { opacity: 1 },
493
+ },
494
+ } satisfies TransitionInterpolatedStyle;
495
+
496
+ if (!resolvedPair.sourceBounds) {
497
+ return focused ? focusedVisibilityStyles : NO_STYLES;
498
+ }
480
499
 
481
500
  const normX = props.active.gesture.normX;
482
501
  const normY = props.active.gesture.normY;
@@ -519,13 +538,6 @@ export const buildZoomStyles = ({
519
538
  const dragScale = combineScales(dragXScale, dragYScale);
520
539
 
521
540
  if (focused) {
522
- const focusedPair = BoundStore.resolveTransitionPair(resolvedTag, {
523
- currentScreenKey: currentRouteKey,
524
- previousScreenKey: previousRouteKey,
525
- nextScreenKey: nextRouteKey,
526
- entering,
527
- });
528
-
529
541
  const contentTarget = getZoomContentTarget({
530
542
  explicitTarget,
531
543
  resolvedTag,
@@ -535,7 +547,7 @@ export const buildZoomStyles = ({
535
547
  entering,
536
548
  screenLayout,
537
549
  anchor: sharedOptions.anchor,
538
- resolvedPair: focusedPair,
550
+ resolvedPair,
539
551
  });
540
552
 
541
553
  const contentRaw = computeRaw({
@@ -565,18 +577,21 @@ export const buildZoomStyles = ({
565
577
  const maskRadii = resolveMaskRadii({
566
578
  progress,
567
579
  zoomOptions: resolvedZoomOptions,
568
- resolvedPair: focusedPair,
580
+ resolvedPair,
569
581
  });
582
+ const focusedContentStyle = {
583
+ opacity: focusedFade,
584
+ transform: [
585
+ { translateX: contentTranslateX },
586
+ { translateY: contentTranslateY },
587
+ { scale: contentScale },
588
+ ],
589
+ };
570
590
 
571
591
  return {
572
592
  [NAVIGATION_CONTAINER_STYLE_ID]: {
573
593
  style: {
574
- opacity: focusedFade,
575
- transform: [
576
- { translateX: contentTranslateX },
577
- { translateY: contentTranslateY },
578
- { scale: contentScale },
579
- ],
594
+ ...focusedContentStyle,
580
595
  },
581
596
  },
582
597
  [NAVIGATION_MASK_STYLE_ID]: {
@@ -598,13 +613,7 @@ export const buildZoomStyles = ({
598
613
  : {}),
599
614
  },
600
615
  },
601
- // Signal the destination boundary to stay visible during the transition.
602
- // Without this, useAssociatedStyles enters "waiting-first-style" mode
603
- // (opacity: 0) because it detects previous-screen evidence but never
604
- // receives a resolved style for this tag.
605
- [resolvedTag]: {
606
- style: { opacity: 1 },
607
- },
616
+ ...focusedVisibilityStyles,
608
617
  };
609
618
  }
610
619
 
@@ -626,6 +635,7 @@ export const buildZoomStyles = ({
626
635
  entering,
627
636
  screenLayout,
628
637
  anchor: sharedOptions.anchor,
638
+ resolvedPair,
629
639
  });
630
640
 
631
641
  const elementRaw = computeRaw({
@@ -1,5 +1,5 @@
1
- import type { ScreenInterpolationProps } from "../../../types/animation.types";
2
1
  import type { BoundsNavigationZoomOptions } from "../../../types/bounds.types";
2
+ import type { BoundsFrameProps } from "../types/frame-props";
3
3
  import type { BoundId, BoundsOptions } from "../types/options";
4
4
 
5
5
  export type ResolveTag = (params: {
@@ -9,14 +9,14 @@ export type ResolveTag = (params: {
9
9
 
10
10
  export type ComputeRaw = (
11
11
  overrides: Partial<BoundsOptions>,
12
- frameProps?: Omit<ScreenInterpolationProps, "bounds">,
12
+ frameProps?: BoundsFrameProps,
13
13
  ) => Record<string, unknown>;
14
14
 
15
15
  export type BuildZoomStylesParams = {
16
16
  id: BoundId;
17
17
  group?: string;
18
18
  zoomOptions?: BoundsNavigationZoomOptions;
19
- props: Omit<ScreenInterpolationProps, "bounds">;
19
+ props: BoundsFrameProps;
20
20
  resolveTag: ResolveTag;
21
21
  computeRaw: ComputeRaw;
22
22
  };
@@ -0,0 +1,37 @@
1
+ import type {
2
+ ScreenTransitionConfig,
3
+ SheetScrollGestureBehavior,
4
+ } from "../types/screen.types";
5
+
6
+ export const DEFAULT_SHEET_SCROLL_GESTURE_BEHAVIOR: SheetScrollGestureBehavior =
7
+ "expand-and-collapse";
8
+
9
+ export const resolveSheetScrollGestureBehavior = (
10
+ options: Pick<
11
+ ScreenTransitionConfig,
12
+ "sheetScrollGestureBehavior" | "expandViaScrollView"
13
+ >,
14
+ ): SheetScrollGestureBehavior => {
15
+ const explicitBehavior = options.sheetScrollGestureBehavior;
16
+ if (explicitBehavior) return explicitBehavior;
17
+
18
+ const legacyBehavior = options.expandViaScrollView;
19
+ if (legacyBehavior !== undefined) {
20
+ return legacyBehavior ? "expand-and-collapse" : "collapse-only";
21
+ }
22
+
23
+ return DEFAULT_SHEET_SCROLL_GESTURE_BEHAVIOR;
24
+ };
25
+
26
+ export const resolveNavigationMaskEnabled = (
27
+ options: Pick<
28
+ ScreenTransitionConfig,
29
+ "navigationMaskEnabled" | "maskEnabled"
30
+ >,
31
+ ): boolean => {
32
+ if (options.navigationMaskEnabled !== undefined) {
33
+ return options.navigationMaskEnabled;
34
+ }
35
+
36
+ return options.maskEnabled ?? false;
37
+ };
@@ -1,33 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useViewportContext = exports.ViewportProvider = void 0;
7
- var _react = require("react");
8
- var _reactNative = require("react-native");
9
- var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
10
- var _createProvider = _interopRequireDefault(require("../utils/create-provider"));
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- const {
13
- ViewportProvider,
14
- useViewportContext
15
- } = (0, _createProvider.default)("Viewport", {
16
- guarded: true
17
- })(({
18
- children
19
- }) => {
20
- const dimensions = (0, _reactNative.useWindowDimensions)();
21
- const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
22
- const value = (0, _react.useMemo)(() => ({
23
- dimensions,
24
- insets
25
- }), [dimensions, insets]);
26
- return {
27
- value,
28
- children
29
- };
30
- });
31
- exports.useViewportContext = useViewportContext;
32
- exports.ViewportProvider = ViewportProvider;
33
- //# sourceMappingURL=viewport.provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_reactNative","_reactNativeSafeAreaContext","_createProvider","_interopRequireDefault","e","__esModule","default","ViewportProvider","useViewportContext","createProvider","guarded","children","dimensions","useWindowDimensions","insets","useSafeAreaInsets","value","useMemo","exports"],"sourceRoot":"../../../../src","sources":["shared/providers/viewport.provider.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAIA,IAAAG,eAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAsD,SAAAI,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAWtD,MAAM;EAAEG,gBAAgB;EAAEC;AAAmB,CAAC,GAAG,IAAAC,uBAAc,EAAC,UAAU,EAAE;EAC3EC,OAAO,EAAE;AACV,CAAC,CAAC,CAA8C,CAAC;EAAEC;AAAS,CAAC,KAAK;EACjE,MAAMC,UAAU,GAAG,IAAAC,gCAAmB,EAAC,CAAC;EACxC,MAAMC,MAAM,GAAG,IAAAC,6CAAiB,EAAC,CAAC;EAElC,MAAMC,KAAK,GAAG,IAAAC,cAAO,EACpB,OAAO;IACNL,UAAU;IACVE;EACD,CAAC,CAAC,EACF,CAACF,UAAU,EAAEE,MAAM,CACpB,CAAC;EAED,OAAO;IACNE,KAAK;IACLL;EACD,CAAC;AACF,CAAC,CAAC;AAACO,OAAA,CAAAV,kBAAA,GAAAA,kBAAA;AAAAU,OAAA,CAAAX,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- import { useMemo } from "react";
4
- import { useWindowDimensions } from "react-native";
5
- import { useSafeAreaInsets } from "react-native-safe-area-context";
6
- import createProvider from "../utils/create-provider";
7
- const {
8
- ViewportProvider,
9
- useViewportContext
10
- } = createProvider("Viewport", {
11
- guarded: true
12
- })(({
13
- children
14
- }) => {
15
- const dimensions = useWindowDimensions();
16
- const insets = useSafeAreaInsets();
17
- const value = useMemo(() => ({
18
- dimensions,
19
- insets
20
- }), [dimensions, insets]);
21
- return {
22
- value,
23
- children
24
- };
25
- });
26
- export { ViewportProvider, useViewportContext };
27
- //# sourceMappingURL=viewport.provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useMemo","useWindowDimensions","useSafeAreaInsets","createProvider","ViewportProvider","useViewportContext","guarded","children","dimensions","insets","value"],"sourceRoot":"../../../../src","sources":["shared/providers/viewport.provider.tsx"],"mappings":";;AACA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAA0BC,mBAAmB,QAAQ,cAAc;AACnE,SAECC,iBAAiB,QACX,gCAAgC;AACvC,OAAOC,cAAc,MAAM,0BAA0B;AAWrD,MAAM;EAAEC,gBAAgB;EAAEC;AAAmB,CAAC,GAAGF,cAAc,CAAC,UAAU,EAAE;EAC3EG,OAAO,EAAE;AACV,CAAC,CAAC,CAA8C,CAAC;EAAEC;AAAS,CAAC,KAAK;EACjE,MAAMC,UAAU,GAAGP,mBAAmB,CAAC,CAAC;EACxC,MAAMQ,MAAM,GAAGP,iBAAiB,CAAC,CAAC;EAElC,MAAMQ,KAAK,GAAGV,OAAO,CACpB,OAAO;IACNQ,UAAU;IACVC;EACD,CAAC,CAAC,EACF,CAACD,UAAU,EAAEC,MAAM,CACpB,CAAC;EAED,OAAO;IACNC,KAAK;IACLH;EACD,CAAC;AACF,CAAC,CAAC;AAEF,SAASH,gBAAgB,EAAEC,kBAAkB","ignoreList":[]}