react-native-screen-transitions 3.7.0-alpha.0 → 3.7.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/shared/adapters/with-screen-transitions/index.js +0 -6
- package/lib/commonjs/shared/adapters/with-screen-transitions/index.js.map +1 -1
- package/lib/commonjs/shared/adapters/with-screen-transitions/options.js +22 -68
- package/lib/commonjs/shared/adapters/with-screen-transitions/options.js.map +1 -1
- package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js +1 -1
- package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js.map +1 -1
- package/lib/commonjs/shared/components/activity/helpers.js +1 -1
- package/lib/commonjs/shared/components/activity/helpers.js.map +1 -1
- package/lib/commonjs/shared/components/activity/variants/activity-screen.js +4 -3
- package/lib/commonjs/shared/components/activity/variants/activity-screen.js.map +1 -1
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +7 -28
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +2 -14
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.js +5 -7
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.js +1 -5
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/helpers.js +12 -1
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/helpers.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/reconcile-managed-routes.js +2 -7
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/reconcile-managed-routes.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/managed-stack-controller.js +4 -4
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/managed-stack-controller.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +4 -4
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js +2 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
- package/lib/module/shared/adapters/with-screen-transitions/index.js +0 -1
- package/lib/module/shared/adapters/with-screen-transitions/index.js.map +1 -1
- package/lib/module/shared/adapters/with-screen-transitions/options.js +21 -67
- package/lib/module/shared/adapters/with-screen-transitions/options.js.map +1 -1
- package/lib/module/shared/adapters/with-screen-transitions/stack-layout.js +2 -2
- package/lib/module/shared/adapters/with-screen-transitions/stack-layout.js.map +1 -1
- package/lib/module/shared/components/activity/helpers.js +1 -1
- package/lib/module/shared/components/activity/helpers.js.map +1 -1
- package/lib/module/shared/components/activity/variants/activity-screen.js +4 -3
- package/lib/module/shared/components/activity/variants/activity-screen.js.map +1 -1
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +7 -28
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +3 -15
- package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.js +6 -8
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.js.map +1 -1
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.js +2 -6
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.js.map +1 -1
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/helpers.js +9 -0
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/helpers.js.map +1 -1
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/reconcile-managed-routes.js +2 -7
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/reconcile-managed-routes.js.map +1 -1
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/managed-stack-controller.js +4 -4
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/managed-stack-controller.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js +5 -5
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/config.js +1 -0
- package/lib/module/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
- package/lib/typescript/blank-stack/types.d.ts +10 -9
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/index.d.ts +1 -2
- package/lib/typescript/shared/adapters/with-screen-transitions/index.d.ts.map +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/options.d.ts +3 -10
- package/lib/typescript/shared/adapters/with-screen-transitions/options.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +1 -1
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts +1 -2
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/helpers.d.ts +2 -0
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/reconcile-managed-routes.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +19 -0
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +15 -14
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts +1 -0
- package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/blank-stack/types.ts +10 -9
- package/src/shared/adapters/with-screen-transitions/index.tsx +1 -6
- package/src/shared/adapters/with-screen-transitions/options.ts +38 -109
- package/src/shared/adapters/with-screen-transitions/stack-layout.tsx +5 -5
- package/src/shared/components/activity/helpers.ts +1 -1
- package/src/shared/components/activity/variants/activity-screen.tsx +4 -3
- package/src/shared/index.ts +1 -5
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +12 -53
- package/src/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.tsx +3 -16
- package/src/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.ts +9 -12
- package/src/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.ts +2 -10
- package/src/shared/providers/stack/helpers/managed-stack-state/helpers/helpers.ts +19 -0
- package/src/shared/providers/stack/helpers/managed-stack-state/helpers/reconcile-managed-routes.ts +2 -12
- package/src/shared/providers/stack/helpers/managed-stack-state/managed-stack-controller.ts +4 -4
- package/src/shared/types/bounds.types.ts +19 -0
- package/src/shared/types/screen.types.ts +15 -14
- package/src/shared/utils/bounds/navigation/reveal/build.ts +10 -6
- package/src/shared/utils/bounds/navigation/reveal/config.ts +1 -0
|
@@ -46,27 +46,28 @@ export type BackdropBehavior = "block" | "passthrough" | "dismiss" | "collapse";
|
|
|
46
46
|
/**
|
|
47
47
|
* Controls how an inactive screen is retained after it is no longer active.
|
|
48
48
|
*
|
|
49
|
-
* - `
|
|
50
|
-
* keep inactive screen mounted,
|
|
51
|
-
*
|
|
52
|
-
*
|
|
49
|
+
* - `hide`
|
|
50
|
+
* keep inactive screen mounted, pause/freeze inactive work where supported,
|
|
51
|
+
* and hide inactive paint/native presentation after safe paint
|
|
52
|
+
* RNS: activityState=0, visible=false, shouldFreeze=true
|
|
53
|
+
* React Activity: mode="hidden" with paint hidden
|
|
53
54
|
*
|
|
54
|
-
* - `
|
|
55
|
-
* keep last painted UI visible but
|
|
56
|
-
* RNS: activityState=1, visible=true,
|
|
55
|
+
* - `pause`
|
|
56
|
+
* keep last painted UI visible but pause/freeze inactive work where supported
|
|
57
|
+
* RNS: activityState=1, visible=true, shouldFreeze=true
|
|
57
58
|
* React Activity: mode="hidden" with paint preserved
|
|
58
59
|
*
|
|
59
|
-
* - `detach`
|
|
60
|
-
* remove inactive screen from native/view presentation after safe paint
|
|
61
|
-
* RNS: activityState=0, visible=false
|
|
62
|
-
* React Activity: mode="hidden" + display none, or equivalent
|
|
63
|
-
*
|
|
64
60
|
* - `unmount`
|
|
65
|
-
*
|
|
61
|
+
* remove React subtree when the inactive screen is safe to remove
|
|
66
62
|
* RNS native: only after safe paint for non-nested screens
|
|
67
63
|
* web: return null
|
|
64
|
+
*
|
|
65
|
+
* - `keep`
|
|
66
|
+
* keep inactive screen mounted, attached, visible, not interactive, and running
|
|
67
|
+
* RNS: activityState=1, visible=true
|
|
68
|
+
* React Activity: mode="visible"
|
|
68
69
|
*/
|
|
69
|
-
export type InactiveBehavior = "
|
|
70
|
+
export type InactiveBehavior = "hide" | "pause" | "unmount" | "keep";
|
|
70
71
|
|
|
71
72
|
export type TransitionAwareProps<T extends object> = AnimatedProps<T> & {
|
|
72
73
|
/**
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
DRAG_MASK_HEIGHT_COLLAPSE_END,
|
|
14
14
|
HORIZONTAL_DRAG_MASK_COLLAPSE_SCALE,
|
|
15
15
|
IDENTITY_DRAG_SCALE_OUTPUT,
|
|
16
|
+
REVEAL_BACKGROUND_SCALE,
|
|
16
17
|
REVEAL_BORDER_RADIUS,
|
|
17
18
|
REVEAL_SHADOW_OFFSET,
|
|
18
19
|
REVEAL_USES_TRANSFORM_MASK,
|
|
@@ -65,6 +66,10 @@ export function buildRevealStyles({
|
|
|
65
66
|
const disablePointerEventsTillElementTransition =
|
|
66
67
|
revealOptions?.disablePointerEventsTillElementTransition ?? true;
|
|
67
68
|
const maskSizingMode = revealOptions?.maskSizingMode ?? "auto";
|
|
69
|
+
const backgroundScale =
|
|
70
|
+
revealOptions?.backgroundScale ?? REVEAL_BACKGROUND_SCALE;
|
|
71
|
+
const shouldBackgroundScaleResetOnSettled =
|
|
72
|
+
revealOptions?.shouldBackgroundScaleResetOnSettled ?? true;
|
|
68
73
|
const usesTransformMask =
|
|
69
74
|
maskSizingMode === "auto"
|
|
70
75
|
? REVEAL_USES_TRANSFORM_MASK
|
|
@@ -366,8 +371,6 @@ export function buildRevealStyles({
|
|
|
366
371
|
},
|
|
367
372
|
[link.id]: {
|
|
368
373
|
style: {
|
|
369
|
-
position: "relative",
|
|
370
|
-
zIndex: 999,
|
|
371
374
|
transform: [{ translateX: elementTX }, { translateY: elementY }],
|
|
372
375
|
},
|
|
373
376
|
},
|
|
@@ -376,10 +379,11 @@ export function buildRevealStyles({
|
|
|
376
379
|
|
|
377
380
|
/* ---------------------------- Unfocused Screen ---------------------------- */
|
|
378
381
|
|
|
379
|
-
const unfocusedScale = mixUnit(1,
|
|
380
|
-
const unfocusedContentScale =
|
|
381
|
-
|
|
382
|
-
|
|
382
|
+
const unfocusedScale = mixUnit(1, backgroundScale, props.active.progress);
|
|
383
|
+
const unfocusedContentScale =
|
|
384
|
+
props.active.logicallySettled && shouldBackgroundScaleResetOnSettled
|
|
385
|
+
? 1
|
|
386
|
+
: unfocusedScale;
|
|
383
387
|
|
|
384
388
|
const trackingContentTarget =
|
|
385
389
|
initialDestinationTarget ?? link.destination.bounds;
|
|
@@ -15,6 +15,7 @@ export const DRAG_MASK_HEIGHT_COLLAPSE_END = 0.7;
|
|
|
15
15
|
export const HORIZONTAL_DRAG_MASK_COLLAPSE_SCALE = 0.5;
|
|
16
16
|
export const DISMISS_SCALE_ORBIT_DEPTH = 0.5;
|
|
17
17
|
export const CLOSE_SOURCE_HANDOFF_PROGRESS = 0.25;
|
|
18
|
+
export const REVEAL_BACKGROUND_SCALE = 0.9375;
|
|
18
19
|
|
|
19
20
|
export const IDENTITY_DRAG_SCALE_OUTPUT = [1, 1] as const;
|
|
20
21
|
export const ZERO_TO_ONE_RANGE = [0, 1] as const;
|