react-native-screen-transitions 3.4.0-rc.0 → 3.4.0

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 (46) hide show
  1. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +0 -1
  2. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  3. package/lib/commonjs/shared/constants.js +2 -2
  4. package/lib/commonjs/shared/constants.js.map +1 -1
  5. package/lib/commonjs/shared/hooks/gestures/use-scroll-registry.js +22 -12
  6. package/lib/commonjs/shared/hooks/gestures/use-scroll-registry.js.map +1 -1
  7. package/lib/commonjs/shared/typecheck/public-api.typecheck.js +5 -0
  8. package/lib/commonjs/shared/typecheck/public-api.typecheck.js.map +1 -1
  9. package/lib/commonjs/shared/types/animation.types.js +1 -3
  10. package/lib/commonjs/shared/types/animation.types.js.map +1 -1
  11. package/lib/commonjs/shared/utils/bounds/zoom/build.js +10 -8
  12. package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -1
  13. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +0 -1
  14. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  15. package/lib/module/shared/constants.js +2 -2
  16. package/lib/module/shared/constants.js.map +1 -1
  17. package/lib/module/shared/hooks/gestures/use-scroll-registry.js +22 -12
  18. package/lib/module/shared/hooks/gestures/use-scroll-registry.js.map +1 -1
  19. package/lib/module/shared/typecheck/public-api.typecheck.js +5 -0
  20. package/lib/module/shared/typecheck/public-api.typecheck.js.map +1 -1
  21. package/lib/module/shared/types/animation.types.js +44 -1
  22. package/lib/module/shared/types/animation.types.js.map +1 -1
  23. package/lib/module/shared/utils/bounds/zoom/build.js +10 -8
  24. package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
  25. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts +3 -206
  26. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts.map +1 -1
  27. package/lib/typescript/shared/components/create-boundary-component/index.d.ts +2 -206
  28. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
  29. package/lib/typescript/shared/components/create-transition-aware-component.d.ts +5 -6
  30. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  31. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  32. package/lib/typescript/shared/constants.d.ts +2 -2
  33. package/lib/typescript/shared/constants.d.ts.map +1 -1
  34. package/lib/typescript/shared/hooks/gestures/use-scroll-registry.d.ts.map +1 -1
  35. package/lib/typescript/shared/index.d.ts +647 -909
  36. package/lib/typescript/shared/index.d.ts.map +1 -1
  37. package/lib/typescript/shared/types/animation.types.d.ts +9 -0
  38. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  39. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +0 -1
  42. package/src/shared/constants.ts +4 -2
  43. package/src/shared/hooks/gestures/use-scroll-registry.ts +23 -12
  44. package/src/shared/typecheck/public-api.typecheck.ts +6 -0
  45. package/src/shared/types/animation.types.ts +12 -0
  46. package/src/shared/utils/bounds/zoom/build.ts +11 -8
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAEN,uBAAuB,EACvB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,8BAA8B,EAAE,MAAM,gDAAgD,CAAC;AAChG,OAAO,UAAU,MAAM,uCAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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le, ViewStyle } from "react-native";
2
2
  import type { StyleProps, WithSpringConfig, WithTimingConfig } from "react-native-reanimated";
3
3
  import type { EdgeInsets } from "react-native-safe-area-context";
4
+ import { NAVIGATION_MASK_CONTAINER_STYLE_ID, NAVIGATION_MASK_ELEMENT_STYLE_ID } from "../constants";
4
5
  import type { BoundsAccessor } from "./bounds.types";
5
6
  import type { GestureValues } from "./gesture.types";
6
7
  import type { Layout } from "./screen.types";
@@ -235,6 +236,10 @@ export type NormalizedTransitionInterpolatedStyle = {
235
236
  backdrop?: NormalizedTransitionSlotStyle;
236
237
  /** Animated style and props for the surface component layer within the screen. */
237
238
  surface?: NormalizedTransitionSlotStyle;
239
+ /** Animated style and props for the navigation mask container layer. */
240
+ [NAVIGATION_MASK_CONTAINER_STYLE_ID]?: NormalizedTransitionSlotStyle;
241
+ /** Animated style and props for the navigation mask element layer. */
242
+ [NAVIGATION_MASK_ELEMENT_STYLE_ID]?: NormalizedTransitionSlotStyle;
238
243
  /** Custom styles/props by id for Transition.View components. */
239
244
  [id: string]: NormalizedTransitionSlotStyle | undefined;
240
245
  };
@@ -249,6 +254,10 @@ export type TransitionInterpolatedStyle = {
249
254
  backdrop?: TransitionSlotStyle;
250
255
  /** Animated style and props for the surface component layer within the screen. */
251
256
  surface?: TransitionSlotStyle;
257
+ /** Animated style and props for the navigation mask container layer. */
258
+ [NAVIGATION_MASK_CONTAINER_STYLE_ID]?: TransitionSlotStyle;
259
+ /** Animated style and props for the navigation mask element layer. */
260
+ [NAVIGATION_MASK_ELEMENT_STYLE_ID]?: TransitionSlotStyle;
252
261
  /** Custom styles/props by id for Transition.View components. */
253
262
  [id: string]: TransitionSlotStyle | undefined;
254
263
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"animation.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/animation.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,E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G;AACH,MAAM,MAAM,qCAAqC,GAAG;IACnD,iEAAiE;IACjE,OAAO,CAAC,EAAE,6BAA6B,CAAC;IACxC,uEAAuE;IACvE,QAAQ,CAAC,EAAE,6BAA6B,CAAC;IACzC,kFAAkF;IAClF,OAAO,CAAC,EAAE,6BAA6B,CAAC;IACxC,gEAAgE;IAChE,CAAC,EAAE,EAAE,MAAM,GAAG,6BAA6B,GAAG,SAAS,CAAC;CACxD,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACzC,iEAAiE;IACjE,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,kFAAkF;IAClF,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,gEAAgE;IAChE,CAAC,EAAE,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAAC;IAC9C;;;OAGG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;;OAGG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC;;;OAGG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC3B"}
1
+ {"version":3,"file":"animation.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/animation.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EACX,UAAU,EACV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,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/build.ts"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAsL5E,wBAAgB,eAAe,CAAC,EAC/B,WAAW,EACX,WAAW,EACX,KAAK,GACL,EAAE,qBAAqB,GAAG,qBAAqB,CAwa/C"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/build.ts"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAyL5E,wBAAgB,eAAe,CAAC,EAC/B,WAAW,EACX,WAAW,EACX,KAAK,GACL,EAAE,qBAAqB,GAAG,qBAAqB,CAwa/C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-screen-transitions",
3
- "version": "3.4.0-rc.0",
3
+ "version": "3.4.0",
4
4
  "description": "Easy screen transitions for React Native and Expo",
5
5
  "author": "Ed",
6
6
  "license": "MIT",
@@ -78,7 +78,6 @@ export const MaybeMaskedNavigationContainer = memo(
78
78
  styles.navigationContainer,
79
79
  animatedNavigationMaskContainerStyle,
80
80
  ]}
81
- pointerEvents={pointerEvents}
82
81
  collapsable={false}
83
82
  >
84
83
  {children}
@@ -16,8 +16,10 @@ export const CONTAINER_STYLE_ID = "_ROOT_CONTAINER";
16
16
  /**
17
17
  * Navigation mask integration
18
18
  */
19
- export const NAVIGATION_MASK_ELEMENT_STYLE_ID = "_NAVIGATION_ROOT_MASK";
20
- export const NAVIGATION_MASK_CONTAINER_STYLE_ID = "_NAVIGATION_ROOT_CONTAINER";
19
+ export const NAVIGATION_MASK_ELEMENT_STYLE_ID =
20
+ "NAVIGATION_MASK_ELEMENT_STYLE_ID";
21
+ export const NAVIGATION_MASK_CONTAINER_STYLE_ID =
22
+ "NAVIGATION_MASK_CONTAINER_STYLE_ID";
21
23
 
22
24
  /**
23
25
  * Styles
@@ -156,6 +156,8 @@ export const useScrollRegistry = (props: ScrollProgressHookProps) => {
156
156
  return gesture;
157
157
  }, [panGestures, scrollConfigs]);
158
158
 
159
+ const isHorizontal = scrollDirection === "horizontal";
160
+
159
161
  const scrollHandler = useAnimatedScrollHandler({
160
162
  onScroll: (event) => {
161
163
  if (scrollConfigs.length === 0) return;
@@ -164,8 +166,8 @@ export const useScrollRegistry = (props: ScrollProgressHookProps) => {
164
166
  "worklet";
165
167
  if (v === null) {
166
168
  return {
167
- x: event.contentOffset.x,
168
- y: event.contentOffset.y,
169
+ x: isHorizontal ? event.contentOffset.x : 0,
170
+ y: isHorizontal ? 0 : event.contentOffset.y,
169
171
  contentHeight: 0,
170
172
  contentWidth: 0,
171
173
  layoutHeight: 0,
@@ -173,8 +175,11 @@ export const useScrollRegistry = (props: ScrollProgressHookProps) => {
173
175
  isTouched: true,
174
176
  };
175
177
  }
176
- v.x = event.contentOffset.x;
177
- v.y = event.contentOffset.y;
178
+ if (isHorizontal) {
179
+ v.x = event.contentOffset.x;
180
+ } else {
181
+ v.y = event.contentOffset.y;
182
+ }
178
183
  return v;
179
184
  };
180
185
 
@@ -198,13 +203,16 @@ export const useScrollRegistry = (props: ScrollProgressHookProps) => {
198
203
  y: 0,
199
204
  layoutHeight: 0,
200
205
  layoutWidth: 0,
201
- contentWidth: width,
202
- contentHeight: height,
206
+ contentWidth: isHorizontal ? width : 0,
207
+ contentHeight: isHorizontal ? 0 : height,
203
208
  isTouched: false,
204
209
  };
205
210
  }
206
- v.contentWidth = width;
207
- v.contentHeight = height;
211
+ if (isHorizontal) {
212
+ v.contentWidth = width;
213
+ } else {
214
+ v.contentHeight = height;
215
+ }
208
216
  return v;
209
217
  };
210
218
 
@@ -229,13 +237,16 @@ export const useScrollRegistry = (props: ScrollProgressHookProps) => {
229
237
  y: 0,
230
238
  contentHeight: 0,
231
239
  contentWidth: 0,
232
- layoutHeight: height,
233
- layoutWidth: width,
240
+ layoutHeight: isHorizontal ? 0 : height,
241
+ layoutWidth: isHorizontal ? width : 0,
234
242
  isTouched: false,
235
243
  };
236
244
  }
237
- v.layoutHeight = height;
238
- v.layoutWidth = width;
245
+ if (isHorizontal) {
246
+ v.layoutWidth = width;
247
+ } else {
248
+ v.layoutHeight = height;
249
+ }
239
250
  return v;
240
251
  };
241
252
 
@@ -44,6 +44,11 @@ const nestedInterpolatedStyle: TransitionInterpolatedStyle = {
44
44
  },
45
45
  };
46
46
 
47
+ const navigationMaskInterpolatedStyle: TransitionInterpolatedStyle = {
48
+ [NAVIGATION_MASK_CONTAINER_STYLE_ID]: slotStyle,
49
+ [NAVIGATION_MASK_ELEMENT_STYLE_ID]: slotStyle,
50
+ };
51
+
47
52
  const legacyInterpolatedStyle: TransitionInterpolatedStyle = {
48
53
  contentStyle: {
49
54
  opacity: 1,
@@ -189,6 +194,7 @@ const publicApiTypecheck = {
189
194
  },
190
195
  slotStyle,
191
196
  nestedInterpolatedStyle,
197
+ navigationMaskInterpolatedStyle,
192
198
  legacyInterpolatedStyle,
193
199
  gestureTarget,
194
200
  numericBoundsResult,
@@ -5,6 +5,10 @@ import type {
5
5
  WithTimingConfig,
6
6
  } from "react-native-reanimated";
7
7
  import type { EdgeInsets } from "react-native-safe-area-context";
8
+ import {
9
+ NAVIGATION_MASK_CONTAINER_STYLE_ID,
10
+ NAVIGATION_MASK_ELEMENT_STYLE_ID,
11
+ } from "../constants";
8
12
  import type { BoundsAccessor } from "./bounds.types";
9
13
  import type { GestureValues } from "./gesture.types";
10
14
  import type { Layout } from "./screen.types";
@@ -273,6 +277,10 @@ export type NormalizedTransitionInterpolatedStyle = {
273
277
  backdrop?: NormalizedTransitionSlotStyle;
274
278
  /** Animated style and props for the surface component layer within the screen. */
275
279
  surface?: NormalizedTransitionSlotStyle;
280
+ /** Animated style and props for the navigation mask container layer. */
281
+ [NAVIGATION_MASK_CONTAINER_STYLE_ID]?: NormalizedTransitionSlotStyle;
282
+ /** Animated style and props for the navigation mask element layer. */
283
+ [NAVIGATION_MASK_ELEMENT_STYLE_ID]?: NormalizedTransitionSlotStyle;
276
284
  /** Custom styles/props by id for Transition.View components. */
277
285
  [id: string]: NormalizedTransitionSlotStyle | undefined;
278
286
  };
@@ -288,6 +296,10 @@ export type TransitionInterpolatedStyle = {
288
296
  backdrop?: TransitionSlotStyle;
289
297
  /** Animated style and props for the surface component layer within the screen. */
290
298
  surface?: TransitionSlotStyle;
299
+ /** Animated style and props for the navigation mask container layer. */
300
+ [NAVIGATION_MASK_CONTAINER_STYLE_ID]?: TransitionSlotStyle;
301
+ /** Animated style and props for the navigation mask element layer. */
302
+ [NAVIGATION_MASK_ELEMENT_STYLE_ID]?: TransitionSlotStyle;
291
303
  /** Custom styles/props by id for Transition.View components. */
292
304
  [id: string]: TransitionSlotStyle | undefined;
293
305
  /**
@@ -44,6 +44,15 @@ import type { BuildZoomStylesParams, ZoomInterpolatedStyle } from "./types";
44
44
  const IDENTITY_DRAG_SCALE_OUTPUT = [1, 1] as const;
45
45
  const presentedZoomTagByRoute = makeMutable<Record<string, string>>({});
46
46
 
47
+ function cachePresentedZoomTag(routeKey: string, resolvedTag: string) {
48
+ "worklet";
49
+
50
+ presentedZoomTagByRoute.value = {
51
+ ...presentedZoomTagByRoute.value,
52
+ [routeKey]: resolvedTag,
53
+ };
54
+ }
55
+
47
56
  /* -------------------------------------------------------------------------- */
48
57
  /* LOCAL HELPERS */
49
58
  /* -------------------------------------------------------------------------- */
@@ -189,10 +198,7 @@ function resolveEffectiveZoomTag(params: {
189
198
  const shouldFreezeDuringEnter = entering && animating && !isFreshOpenFrame;
190
199
 
191
200
  if (!cachedTag || isFreshOpenFrame) {
192
- presentedZoomTagByRoute.modify((state) => ({
193
- ...state,
194
- [activeRouteKey]: resolvedTag,
195
- }));
201
+ cachePresentedZoomTag(activeRouteKey, resolvedTag);
196
202
  return resolvedTag;
197
203
  }
198
204
 
@@ -208,10 +214,7 @@ function resolveEffectiveZoomTag(params: {
208
214
  }
209
215
 
210
216
  if (cachedTag !== resolvedTag) {
211
- presentedZoomTagByRoute.modify((state) => ({
212
- ...state,
213
- [activeRouteKey]: resolvedTag,
214
- }));
217
+ cachePresentedZoomTag(activeRouteKey, resolvedTag);
215
218
  }
216
219
 
217
220
  return resolvedTag;