react-native-screen-transitions 3.9.0-beta.2 → 3.9.0-beta.3
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/components/boundary/components/boundary-target.js +19 -14
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +14 -7
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +32 -2
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js +4 -3
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js +3 -2
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +2 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +2 -3
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js +1 -3
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/teleport.js +2 -1
- package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +16 -3
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/commonjs/shared/constants.js +4 -0
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +4 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js +10 -10
- package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +10 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-build-pan-gesture.js +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +25 -3
- package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -6
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +6 -1
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/snapshot.js +2 -0
- package/lib/commonjs/shared/providers/screen/gestures/shared/snapshot.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/values.js +2 -0
- package/lib/commonjs/shared/providers/screen/gestures/shared/values.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +11 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/commonjs/shared/stores/gesture.store.js +8 -0
- package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js +24 -7
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +2 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +177 -314
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js +12 -18
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js +196 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js +94 -108
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/mask.js +72 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/mask.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/targets.js +55 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/targets.js.map +1 -0
- package/lib/module/shared/components/boundary/components/boundary-target.js +20 -15
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +14 -7
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +2 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +32 -2
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js +5 -4
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js +3 -2
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +3 -2
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +3 -4
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js +1 -3
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/teleport.js +1 -0
- package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +17 -4
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/module/shared/constants.js +4 -0
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +4 -0
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js +10 -10
- package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +10 -2
- package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/use-build-pan-gesture.js +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +23 -2
- package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -6
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -2
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +6 -1
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/snapshot.js +2 -0
- package/lib/module/shared/providers/screen/gestures/shared/snapshot.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/values.js +2 -0
- package/lib/module/shared/providers/screen/gestures/shared/values.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +11 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/module/shared/stores/gesture.store.js +8 -0
- package/lib/module/shared/stores/gesture.store.js.map +1 -1
- package/lib/module/shared/types/bounds.types.js +26 -0
- package/lib/module/shared/types/bounds.types.js.map +1 -1
- package/lib/module/shared/utils/animation/animate-to-progress.js +24 -7
- package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js +2 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +181 -318
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/config.js +11 -17
- package/lib/module/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/drag.js +184 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/drag.js.map +1 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js +91 -102
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/mask.js +67 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/mask.js.map +1 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/targets.js +50 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/targets.js.map +1 -0
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +3 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/components/host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts +1 -3
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts +2 -3
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts +2 -3
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +1 -0
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +1 -0
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
- package/lib/typescript/shared/constants.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/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/activation/use-pan-activation.d.ts +2 -0
- package/lib/typescript/shared/providers/screen/gestures/pan/activation/use-pan-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/use-build-pan-gesture.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts +2 -0
- package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/snapshot.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/values.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +4 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
- package/lib/typescript/shared/stores/gesture.store.d.ts +4 -0
- package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +115 -88
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/gesture.types.d.ts +10 -0
- package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +1 -1
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts +7 -17
- package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts +55 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts +31 -34
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/mask.d.ts +25 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/mask.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/targets.d.ts +16 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/targets.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/types.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/components/boundary/components/boundary-target.tsx +37 -26
- package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +16 -13
- package/src/shared/components/boundary/portal/components/boundary-content-portal/components/host.tsx +6 -2
- package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +46 -3
- package/src/shared/components/boundary/portal/components/boundary-content-portal/index.tsx +8 -5
- package/src/shared/components/boundary/portal/components/boundary-portal/components/host.tsx +3 -2
- package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +3 -2
- package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx +4 -5
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +5 -1
- package/src/shared/components/boundary/portal/components/boundary-portal/index.tsx +1 -4
- package/src/shared/components/boundary/portal/teleport.ts +1 -0
- package/src/shared/components/boundary/providers/boundary-root.provider.tsx +23 -3
- package/src/shared/constants.ts +4 -0
- package/src/shared/index.ts +2 -0
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +8 -0
- package/src/shared/providers/screen/gestures/pan/activation/use-pan-activation.ts +16 -7
- package/src/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.ts +18 -1
- package/src/shared/providers/screen/gestures/pan/use-build-pan-gesture.ts +1 -0
- package/src/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.ts +40 -2
- package/src/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +7 -11
- package/src/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.ts +12 -15
- package/src/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.ts +6 -1
- package/src/shared/providers/screen/gestures/shared/snapshot.ts +2 -0
- package/src/shared/providers/screen/gestures/shared/values.ts +2 -0
- package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +14 -1
- package/src/shared/stores/gesture.store.ts +12 -0
- package/src/shared/types/bounds.types.ts +119 -90
- package/src/shared/types/gesture.types.ts +10 -0
- package/src/shared/types/index.ts +2 -0
- package/src/shared/utils/animation/animate-to-progress.ts +23 -7
- package/src/shared/utils/bounds/navigation/reveal/math.ts +2 -1
- package/src/shared/utils/bounds/navigation/zoom/build.ts +223 -411
- package/src/shared/utils/bounds/navigation/zoom/config.ts +15 -18
- package/src/shared/utils/bounds/navigation/zoom/drag.ts +327 -0
- package/src/shared/utils/bounds/navigation/zoom/helpers.ts +122 -184
- package/src/shared/utils/bounds/navigation/zoom/mask.ts +130 -0
- package/src/shared/utils/bounds/navigation/zoom/targets.ts +74 -0
- package/src/shared/utils/bounds/navigation/zoom/types.ts +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js +0 -25
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js.map +0 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/math.js +0 -20
- package/lib/module/shared/utils/bounds/navigation/zoom/math.js.map +0 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts +0 -8
- package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts.map +0 -1
- package/src/shared/utils/bounds/navigation/zoom/math.ts +0 -25
|
@@ -1,373 +1,236 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { interpolate } from "react-native-reanimated";
|
|
4
|
-
import { EPSILON, NAVIGATION_MASK_ELEMENT_STYLE_ID
|
|
4
|
+
import { EPSILON, NAVIGATION_MASK_ELEMENT_STYLE_ID } from "../../../../constants";
|
|
5
5
|
import { createBoundsAccessorCore } from "../../helpers/create-bounds-accessor-core";
|
|
6
|
-
import { getSourceBorderRadius
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
function resolveZoomGestureOptions({
|
|
14
|
-
rawDrag,
|
|
15
|
-
maxSensitivity
|
|
16
|
-
}) {
|
|
17
|
-
"worklet";
|
|
18
|
-
|
|
19
|
-
const {
|
|
20
|
-
gestureSensitivity,
|
|
21
|
-
gestureReleaseVelocityScale
|
|
22
|
-
} = resolveRevealGestureHandoff({
|
|
23
|
-
rawDrag,
|
|
24
|
-
maxSensitivity
|
|
25
|
-
});
|
|
26
|
-
return {
|
|
27
|
-
gestureSensitivity,
|
|
28
|
-
gestureReleaseVelocityScale
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/* -------------------------------------------------------------------------- */
|
|
33
|
-
/* BUILD ZOOM STYLES */
|
|
34
|
-
/* -------------------------------------------------------------------------- */
|
|
35
|
-
|
|
6
|
+
import { getSourceBorderRadius } from "../helpers";
|
|
7
|
+
import { resolveRevealContentBaseTransform } from "../reveal/math";
|
|
8
|
+
import { ZOOM_BACKDROP_MAX_OPACITY, ZOOM_BACKGROUND_SCALE, ZOOM_FOCUSED_ELEMENT_CLOSE_OPACITY_RANGE, ZOOM_FOCUSED_ELEMENT_OPEN_OPACITY_RANGE, ZOOM_SCREEN_A_FADE_END, ZOOM_SHARED_OPTIONS, ZOOM_UNFOCUSED_ELEMENT_CLOSE_OPACITY_RANGE, ZOOM_UNFOCUSED_ELEMENT_OPEN_OPACITY_RANGE } from "./config";
|
|
9
|
+
import { resolveZoomDragState, resolveZoomTrackedGestureScale } from "./drag";
|
|
10
|
+
import { resolveZoomBackdropOpacity, resolveZoomPinchFocalOffset, resolveZoomTrackedSourceTransform } from "./helpers";
|
|
11
|
+
import { resolveZoomNavigationMaskStyle, ZOOM_NAVIGATION_MASK_BORDER_RADIUS } from "./mask";
|
|
12
|
+
import { getZoomContentTarget, resolveZoomTrackingContentTarget } from "./targets";
|
|
36
13
|
export function buildZoomStyles({
|
|
37
14
|
tag,
|
|
38
|
-
|
|
39
|
-
|
|
15
|
+
props,
|
|
16
|
+
zoomOptions
|
|
40
17
|
}) {
|
|
41
18
|
"worklet";
|
|
42
19
|
|
|
43
20
|
if (!tag) {
|
|
44
21
|
return {};
|
|
45
22
|
}
|
|
46
|
-
|
|
47
|
-
/* ------------------------------ Shared Setup ------------------------------ */
|
|
48
|
-
|
|
49
23
|
const target = zoomOptions?.target;
|
|
24
|
+
const keepFocusedVisible = zoomOptions?.keepFocusedVisible === true;
|
|
25
|
+
const expandedBorderRadius = Math.max(0, zoomOptions?.borderRadius ?? ZOOM_NAVIGATION_MASK_BORDER_RADIUS);
|
|
26
|
+
const backgroundScale = zoomOptions?.backgroundScale ?? ZOOM_BACKGROUND_SCALE;
|
|
27
|
+
const backdropColor = zoomOptions?.backdropColor ?? "black";
|
|
28
|
+
const maxBackdropOpacity = zoomOptions?.backdropOpacity ?? ZOOM_BACKDROP_MAX_OPACITY;
|
|
50
29
|
const {
|
|
30
|
+
active,
|
|
31
|
+
current,
|
|
51
32
|
focused,
|
|
33
|
+
transitionProgress,
|
|
52
34
|
layouts: {
|
|
53
35
|
screen: screenLayout
|
|
54
36
|
}
|
|
55
37
|
} = props;
|
|
56
|
-
const
|
|
57
|
-
const activeTransitionProgress = props.active.transitionProgress;
|
|
58
|
-
const zoomAnchor = target === "bound" ? "center" : ZOOM_SHARED_OPTIONS.anchor;
|
|
38
|
+
const activeTransitionProgress = active.transitionProgress;
|
|
59
39
|
const bounds = createBoundsAccessorCore({
|
|
60
40
|
getProps: () => props
|
|
61
41
|
});
|
|
62
42
|
const scopedBounds = bounds(tag);
|
|
63
43
|
const link = scopedBounds.link();
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
fallback: ZOOM_FOCUSED_ELEMENT_OPEN_OPACITY_RANGE
|
|
75
|
-
}),
|
|
76
|
-
close: resolveOpacityRangeTuple({
|
|
77
|
-
value: zoomOptions?.focusedElementOpacity?.close,
|
|
78
|
-
fallback: ZOOM_FOCUSED_ELEMENT_CLOSE_OPACITY_RANGE
|
|
79
|
-
})
|
|
80
|
-
};
|
|
81
|
-
const unfocusedElementOpacity = {
|
|
82
|
-
open: resolveOpacityRangeTuple({
|
|
83
|
-
value: zoomOptions?.unfocusedElementOpacity?.open,
|
|
84
|
-
fallback: ZOOM_UNFOCUSED_ELEMENT_OPEN_OPACITY_RANGE
|
|
85
|
-
}),
|
|
86
|
-
close: resolveOpacityRangeTuple({
|
|
87
|
-
value: zoomOptions?.unfocusedElementOpacity?.close,
|
|
88
|
-
fallback: ZOOM_UNFOCUSED_ELEMENT_CLOSE_OPACITY_RANGE
|
|
89
|
-
})
|
|
90
|
-
};
|
|
91
|
-
const sourceVisibilityStyle = {
|
|
92
|
-
[buildEffectiveTag]: {
|
|
93
|
-
style: VISIBLE_STYLE
|
|
44
|
+
const sourceBounds = link?.source?.bounds;
|
|
45
|
+
if (!link || !sourceBounds) {
|
|
46
|
+
if (target !== "bound") {
|
|
47
|
+
scopedBounds.values({
|
|
48
|
+
scaleMode: ZOOM_SHARED_OPTIONS.scaleMode,
|
|
49
|
+
anchor: ZOOM_SHARED_OPTIONS.anchor,
|
|
50
|
+
method: "content",
|
|
51
|
+
target: target ?? "fullscreen",
|
|
52
|
+
progress: transitionProgress
|
|
53
|
+
});
|
|
94
54
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
const liveGesture = props.active.gesture;
|
|
103
|
-
const gestureHandoff = liveGesture.handoff;
|
|
104
|
-
const normX = gestureHandoff.normX;
|
|
105
|
-
const normY = gestureHandoff.normY;
|
|
106
|
-
const initialGesture = resolveZoomPanGestureDirection({
|
|
107
|
-
active: gestureHandoff.active,
|
|
108
|
-
direction: gestureHandoff.direction,
|
|
109
|
-
normX,
|
|
110
|
-
normY,
|
|
111
|
-
rawNormX: gestureHandoff.raw.normX,
|
|
112
|
-
rawNormY: gestureHandoff.raw.normY
|
|
55
|
+
return {};
|
|
56
|
+
}
|
|
57
|
+
const zoomContentTarget = getZoomContentTarget({
|
|
58
|
+
explicitTarget: target,
|
|
59
|
+
screenLayout,
|
|
60
|
+
link
|
|
113
61
|
});
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const verticalDragTranslation = resolveDragTranslationTuple(zoomOptions?.verticalDragTranslation);
|
|
119
|
-
const dragX = resolveDirectionalDragTranslation({
|
|
120
|
-
translation: liveGesture.x,
|
|
121
|
-
dimension: screenLayout.width,
|
|
122
|
-
negativeMax: horizontalDragTranslation.negativeMax,
|
|
123
|
-
positiveMax: horizontalDragTranslation.positiveMax,
|
|
124
|
-
exponent: horizontalDragTranslation.exponent
|
|
62
|
+
const trackingContentTarget = resolveZoomTrackingContentTarget({
|
|
63
|
+
contentTarget: zoomContentTarget,
|
|
64
|
+
link,
|
|
65
|
+
screenLayout
|
|
125
66
|
});
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
67
|
+
if (!trackingContentTarget) {
|
|
68
|
+
return {};
|
|
69
|
+
}
|
|
70
|
+
const drag = resolveZoomDragState({
|
|
71
|
+
gesture: active.gesture,
|
|
72
|
+
activeTransitionProgress,
|
|
73
|
+
screenLayout,
|
|
74
|
+
sourceBounds,
|
|
75
|
+
trackingContentTarget,
|
|
76
|
+
dragOptions: zoomOptions?.drag
|
|
132
77
|
});
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
shrinkMin: horizontalDragScale.shrinkMin,
|
|
140
|
-
growMax: horizontalDragScale.growMax,
|
|
141
|
-
exponent: horizontalDragScale.exponent
|
|
142
|
-
}) : IDENTITY_DRAG_SCALE_OUTPUT[0];
|
|
143
|
-
const dragYScale = isVerticalDismiss ? resolveDirectionalDragScale({
|
|
144
|
-
normalized: normY,
|
|
145
|
-
dismissDirection: initialGesture === "vertical-inverted" ? "negative" : "positive",
|
|
146
|
-
shrinkMin: verticalDragScale.shrinkMin,
|
|
147
|
-
growMax: verticalDragScale.growMax,
|
|
148
|
-
exponent: verticalDragScale.exponent
|
|
149
|
-
}) : IDENTITY_DRAG_SCALE_OUTPUT[1];
|
|
150
|
-
const dragScale = combineScales(dragXScale, dragYScale);
|
|
151
|
-
const handoffDragScale = props.active.gesture.dismissing ? resolveDismissScaleHandoff({
|
|
152
|
-
progress: activeTransitionProgress,
|
|
153
|
-
releaseScale: dragScale,
|
|
154
|
-
targetScale: 1,
|
|
155
|
-
velocity: gestureHandoff.velocity,
|
|
156
|
-
velocityDepth
|
|
157
|
-
}) : dragScale;
|
|
158
|
-
const zoomGestureOptions = resolveZoomGestureOptions({
|
|
159
|
-
rawDrag,
|
|
160
|
-
maxSensitivity
|
|
78
|
+
const trackedGestureScale = resolveZoomTrackedGestureScale({
|
|
79
|
+
drag,
|
|
80
|
+
activeTransitionProgress,
|
|
81
|
+
screenLayout,
|
|
82
|
+
sourceBounds,
|
|
83
|
+
trackingContentTarget
|
|
161
84
|
});
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
85
|
+
const focalGesture = drag.isDismissing ? active.gesture.handoff : active.gesture;
|
|
86
|
+
const focalProgress = drag.isDismissing ? activeTransitionProgress : 1;
|
|
87
|
+
const pinchFocalOffset = active.gesture.handoff.active === "pinch-in" ? resolveZoomPinchFocalOffset({
|
|
88
|
+
gestureScale: drag.isDismissing ? focalGesture.scale : trackedGestureScale,
|
|
89
|
+
pinchOriginX: focalGesture.pinchOriginX,
|
|
90
|
+
pinchOriginY: focalGesture.pinchOriginY,
|
|
91
|
+
progress: focalProgress,
|
|
92
|
+
rotation: drag.isDismissing ? focalGesture.rotation : drag.rotation,
|
|
93
|
+
screenLayout
|
|
94
|
+
}) : {
|
|
95
|
+
x: 0,
|
|
96
|
+
y: 0
|
|
97
|
+
};
|
|
165
98
|
if (focused) {
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
99
|
+
const sourceBorderRadius = getSourceBorderRadius(link);
|
|
100
|
+
const navigationMaskEnabled = current.options.navigationMaskEnabled;
|
|
101
|
+
const backdropOpacity = resolveZoomBackdropOpacity({
|
|
102
|
+
transitionProgress,
|
|
103
|
+
dismissalDrag: drag.dismissNorm,
|
|
104
|
+
fadeEnd: ZOOM_SCREEN_A_FADE_END,
|
|
105
|
+
maxOpacity: maxBackdropOpacity
|
|
171
106
|
});
|
|
172
107
|
const contentRaw = scopedBounds.values({
|
|
173
|
-
|
|
174
|
-
anchor:
|
|
108
|
+
scaleMode: ZOOM_SHARED_OPTIONS.scaleMode,
|
|
109
|
+
anchor: target === "bound" ? "center" : ZOOM_SHARED_OPTIONS.anchor,
|
|
175
110
|
method: "content",
|
|
176
|
-
target:
|
|
177
|
-
progress: transitionProgress
|
|
178
|
-
});
|
|
179
|
-
const maskRaw = scopedBounds.values({
|
|
180
|
-
...baseRawOptions,
|
|
181
|
-
anchor: ZOOM_SHARED_OPTIONS.anchor,
|
|
182
|
-
method: "size",
|
|
183
|
-
space: "absolute",
|
|
184
|
-
target: "fullscreen",
|
|
111
|
+
target: zoomContentTarget,
|
|
185
112
|
progress: transitionProgress
|
|
186
113
|
});
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
*/
|
|
199
|
-
const shouldRemoveClipping = !props.active.animating;
|
|
200
|
-
const focusedMaskBorderRadius = interpolate(transitionProgress, [0, 1], [sourceBorderRadius, shouldRemoveClipping ? 0 : targetBorderRadius], "clamp");
|
|
201
|
-
const {
|
|
202
|
-
top,
|
|
203
|
-
right,
|
|
204
|
-
bottom,
|
|
205
|
-
left
|
|
206
|
-
} = ZOOM_MASK_OUTSET;
|
|
207
|
-
const maskWidth = Math.max(1, toNumber(maskRaw.width) + left + right);
|
|
208
|
-
const maskHeight = Math.max(1, toNumber(maskRaw.height) + top + bottom);
|
|
209
|
-
const contentBaseTranslateX = toNumber(contentRaw.translateX);
|
|
210
|
-
const contentBaseTranslateY = toNumber(contentRaw.translateY);
|
|
211
|
-
const contentBaseScale = toNumber(contentRaw.scale, 1);
|
|
212
|
-
const safeContentBaseScale = Math.abs(contentBaseScale) > EPSILON ? contentBaseScale : 1;
|
|
213
|
-
const contentTranslateX = contentBaseTranslateX + dragX;
|
|
214
|
-
const contentTranslateY = contentBaseTranslateY + dragY;
|
|
215
|
-
const contentScale = contentBaseScale * handoffDragScale;
|
|
216
|
-
const maskBaseTranslateX = toNumber(maskRaw.translateX) - left;
|
|
217
|
-
const maskBaseTranslateY = toNumber(maskRaw.translateY) - top;
|
|
218
|
-
const maskCenterX = maskWidth / 2;
|
|
219
|
-
const maskCenterY = maskHeight / 2;
|
|
220
|
-
const contentCenterX = screenLayout.width / 2;
|
|
221
|
-
const contentCenterY = screenLayout.height / 2;
|
|
222
|
-
const compensatedMaskTranslateX = (maskBaseTranslateX - contentBaseTranslateX + (1 - contentBaseScale) * (maskCenterX - contentCenterX)) / safeContentBaseScale;
|
|
223
|
-
const compensatedMaskTranslateY = (maskBaseTranslateY - contentBaseTranslateY + (1 - contentBaseScale) * (maskCenterY - contentCenterY)) / safeContentBaseScale;
|
|
224
|
-
const compensatedMaskScale = 1 / safeContentBaseScale;
|
|
225
|
-
const focusedContentStyle = {
|
|
226
|
-
opacity: zoomOptions?.debug ? 0.5 : focusedFade,
|
|
227
|
-
transform: [{
|
|
228
|
-
translateX: contentTranslateX
|
|
229
|
-
}, {
|
|
230
|
-
translateY: contentTranslateY
|
|
231
|
-
}, {
|
|
232
|
-
scale: contentScale
|
|
233
|
-
}],
|
|
234
|
-
...(navigationMaskEnabled ? {} : {
|
|
235
|
-
borderRadius: focusedMaskBorderRadius,
|
|
236
|
-
overflow: "hidden"
|
|
237
|
-
})
|
|
238
|
-
};
|
|
239
|
-
const focusedStyles = {
|
|
240
|
-
content: {
|
|
241
|
-
style: focusedContentStyle
|
|
114
|
+
const focusedOpacityRange = active.closing ? ZOOM_FOCUSED_ELEMENT_CLOSE_OPACITY_RANGE : ZOOM_FOCUSED_ELEMENT_OPEN_OPACITY_RANGE;
|
|
115
|
+
const focusedFade = interpolate(transitionProgress, [focusedOpacityRange[0], focusedOpacityRange[1]], [focusedOpacityRange[2], focusedOpacityRange[3]], "clamp");
|
|
116
|
+
const contentBaseTranslateX = contentRaw.translateX;
|
|
117
|
+
const contentBaseTranslateY = contentRaw.translateY;
|
|
118
|
+
const contentBaseScale = contentRaw.scale;
|
|
119
|
+
const contentTranslateX = contentBaseTranslateX + drag.dragX + pinchFocalOffset.x * contentBaseScale;
|
|
120
|
+
const contentTranslateY = contentBaseTranslateY + drag.dragY + pinchFocalOffset.y * contentBaseScale;
|
|
121
|
+
const contentScale = drag.isDismissing ? drag.dismissContentScale : contentBaseScale * drag.gestureScale;
|
|
122
|
+
return {
|
|
123
|
+
options: {
|
|
124
|
+
gestureReleaseVelocityScale: 0.5
|
|
242
125
|
},
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
126
|
+
backdrop: {
|
|
127
|
+
style: {
|
|
128
|
+
backgroundColor: backdropColor,
|
|
129
|
+
opacity: backdropOpacity
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
content: {
|
|
247
133
|
style: {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
134
|
+
...(keepFocusedVisible ? {} : {
|
|
135
|
+
opacity: focusedFade
|
|
136
|
+
}),
|
|
251
137
|
transform: [{
|
|
252
|
-
translateX:
|
|
138
|
+
translateX: contentTranslateX
|
|
139
|
+
}, {
|
|
140
|
+
translateY: contentTranslateY
|
|
253
141
|
}, {
|
|
254
|
-
|
|
142
|
+
scale: contentScale
|
|
255
143
|
}, {
|
|
256
|
-
|
|
257
|
-
}]
|
|
144
|
+
rotateZ: `${drag.rotation}rad`
|
|
145
|
+
}],
|
|
146
|
+
borderRadius: interpolate(transitionProgress, [0, 1], [sourceBorderRadius, active.animating ? expandedBorderRadius : 0], "clamp"),
|
|
147
|
+
overflow: "hidden"
|
|
258
148
|
}
|
|
259
|
-
}
|
|
149
|
+
},
|
|
150
|
+
[NAVIGATION_MASK_ELEMENT_STYLE_ID]: navigationMaskEnabled ? resolveZoomNavigationMaskStyle({
|
|
151
|
+
scopedBounds,
|
|
152
|
+
link,
|
|
153
|
+
sourceBounds,
|
|
154
|
+
screenLayout,
|
|
155
|
+
transitionProgress,
|
|
156
|
+
drag,
|
|
157
|
+
contentTransform: contentRaw,
|
|
158
|
+
sourceBorderRadius,
|
|
159
|
+
expandedBorderRadius,
|
|
160
|
+
active
|
|
161
|
+
}) : {}
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
const unfocusedOpacityRange = active.closing ? ZOOM_UNFOCUSED_ELEMENT_CLOSE_OPACITY_RANGE : ZOOM_UNFOCUSED_ELEMENT_OPEN_OPACITY_RANGE;
|
|
165
|
+
const unfocusedFade = interpolate(transitionProgress, [unfocusedOpacityRange[0], unfocusedOpacityRange[1]], [unfocusedOpacityRange[2], unfocusedOpacityRange[3]], "clamp");
|
|
166
|
+
const unfocusedScale = interpolate(transitionProgress, [1, 2], [1, backgroundScale], "clamp");
|
|
167
|
+
const shouldHideSource = !active.closing && unfocusedFade <= EPSILON;
|
|
168
|
+
const unfocusedContentScale = active.settled ? 1 : unfocusedScale;
|
|
169
|
+
const unfocusedContent = {
|
|
170
|
+
style: {
|
|
171
|
+
transform: [{
|
|
172
|
+
scale: unfocusedContentScale
|
|
173
|
+
}]
|
|
260
174
|
}
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
// To avoid measuring a component from a bad position,
|
|
178
|
+
// we'll want to hide + reset this component when the animation has reached a visual settling point
|
|
179
|
+
if (shouldHideSource || active.settled) {
|
|
261
180
|
return {
|
|
262
|
-
|
|
263
|
-
|
|
181
|
+
content: unfocusedContent,
|
|
182
|
+
[link.id]: {
|
|
183
|
+
style: {
|
|
184
|
+
transform: [{
|
|
185
|
+
translateX: 0
|
|
186
|
+
}, {
|
|
187
|
+
translateY: 0
|
|
188
|
+
}, {
|
|
189
|
+
scaleX: 1
|
|
190
|
+
}, {
|
|
191
|
+
scaleY: 1
|
|
192
|
+
}],
|
|
193
|
+
opacity: shouldHideSource ? 0 : unfocusedFade
|
|
194
|
+
}
|
|
195
|
+
}
|
|
264
196
|
};
|
|
265
197
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
const shouldHideUnfocusedElement = !props.active.closing && didSourceComponentVisiblyHide;
|
|
279
|
-
const unfocusedElementTarget = getZoomContentTarget({
|
|
280
|
-
explicitTarget: target,
|
|
198
|
+
const trackedContentBaseScale = resolveRevealContentBaseTransform({
|
|
199
|
+
progress: activeTransitionProgress,
|
|
200
|
+
sourceBounds,
|
|
201
|
+
destinationBounds: trackingContentTarget,
|
|
202
|
+
screenLayout
|
|
203
|
+
}).scale;
|
|
204
|
+
const trackedDragX = drag.dragX + pinchFocalOffset.x * trackedContentBaseScale;
|
|
205
|
+
const trackedDragY = drag.dragY + pinchFocalOffset.y * trackedContentBaseScale;
|
|
206
|
+
const trackedSourceElement = resolveZoomTrackedSourceTransform({
|
|
207
|
+
progress: activeTransitionProgress,
|
|
208
|
+
sourceBounds,
|
|
209
|
+
destinationBounds: trackingContentTarget,
|
|
281
210
|
screenLayout,
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
const elementRaw = scopedBounds.values({
|
|
286
|
-
...baseRawOptions,
|
|
287
|
-
anchor: zoomAnchor,
|
|
288
|
-
method: "transform",
|
|
289
|
-
space: "relative",
|
|
290
|
-
target: unfocusedElementTarget,
|
|
291
|
-
progress: transitionProgress
|
|
292
|
-
});
|
|
293
|
-
const boundTargetCenterX = target === "bound" && link.destination?.bounds ? link.destination.bounds.pageX + link.destination.bounds.width / 2 : undefined;
|
|
294
|
-
const boundTargetCenterY = target === "bound" && link.destination?.bounds ? link.destination.bounds.pageY + link.destination.bounds.height / 2 : undefined;
|
|
295
|
-
const elementCenterX = boundTargetCenterX ?? (typeof unfocusedElementTarget === "object" ? unfocusedElementTarget.pageX + unfocusedElementTarget.width / 2 : screenLayout.width / 2);
|
|
296
|
-
const elementCenterY = boundTargetCenterY ?? (typeof unfocusedElementTarget === "object" ? unfocusedElementTarget.pageY + unfocusedElementTarget.height / 2 : screenLayout.height / 2);
|
|
297
|
-
const unfocusedContentScale = props.active.settled ? 1 : unfocusedScale;
|
|
298
|
-
const shouldTrackGestureTranslation = !props.active.settled;
|
|
299
|
-
const shouldTrackGestureScale = !props.active.settled;
|
|
300
|
-
const elementGestureScale = shouldTrackGestureScale ? handoffDragScale : 1;
|
|
301
|
-
const elementGestureX = shouldTrackGestureTranslation ? dragX : 0;
|
|
302
|
-
const elementGestureY = shouldTrackGestureTranslation ? dragY : 0;
|
|
303
|
-
const safeUnfocusedContentScale = Math.max(Math.abs(unfocusedContentScale), EPSILON);
|
|
304
|
-
// A naturally settled close can leave this as the last emitted style frame,
|
|
305
|
-
// so drop temporary stacking here instead of waiting for a later reset pass.
|
|
306
|
-
const shouldElevateUnfocusedElement = !props.active.closing || !props.active.settled;
|
|
307
|
-
const scaleShiftX = computeCenterScaleShift({
|
|
308
|
-
center: elementCenterX,
|
|
309
|
-
containerCenter: screenLayout.width / 2,
|
|
310
|
-
scale: elementGestureScale
|
|
311
|
-
});
|
|
312
|
-
const scaleShiftY = computeCenterScaleShift({
|
|
313
|
-
center: elementCenterY,
|
|
314
|
-
containerCenter: screenLayout.height / 2,
|
|
315
|
-
scale: elementGestureScale
|
|
316
|
-
});
|
|
317
|
-
const compensatedGestureX = composeCompensatedTranslation({
|
|
318
|
-
gesture: elementGestureX,
|
|
319
|
-
parentScale: unfocusedContentScale,
|
|
320
|
-
centerShift: scaleShiftX,
|
|
321
|
-
epsilon: EPSILON
|
|
322
|
-
});
|
|
323
|
-
const compensatedGestureY = composeCompensatedTranslation({
|
|
324
|
-
gesture: elementGestureY,
|
|
211
|
+
dragX: trackedDragX,
|
|
212
|
+
dragY: trackedDragY,
|
|
213
|
+
gestureScale: trackedGestureScale,
|
|
325
214
|
parentScale: unfocusedContentScale,
|
|
326
|
-
|
|
327
|
-
epsilon: EPSILON
|
|
215
|
+
rotation: drag.rotation
|
|
328
216
|
});
|
|
329
|
-
const elementTranslateX = toNumber(elementRaw.translateX) + compensatedGestureX;
|
|
330
|
-
const elementTranslateY = toNumber(elementRaw.translateY) + compensatedGestureY;
|
|
331
|
-
const elementScaleX = toNumber(elementRaw.scaleX, 1) * elementGestureScale / safeUnfocusedContentScale;
|
|
332
|
-
const elementScaleY = toNumber(elementRaw.scaleY, 1) * elementGestureScale / safeUnfocusedContentScale;
|
|
333
|
-
const resolvedElementStyle = shouldHideUnfocusedElement ? {
|
|
334
|
-
transform: [{
|
|
335
|
-
translateX: 0
|
|
336
|
-
}, {
|
|
337
|
-
translateY: 0
|
|
338
|
-
}, {
|
|
339
|
-
scaleX: 1
|
|
340
|
-
}, {
|
|
341
|
-
scaleY: 1
|
|
342
|
-
}],
|
|
343
|
-
opacity: zoomOptions?.debug ? 1 : 0,
|
|
344
|
-
zIndex: 0,
|
|
345
|
-
elevation: 0
|
|
346
|
-
} : {
|
|
347
|
-
transform: [{
|
|
348
|
-
translateX: elementTranslateX
|
|
349
|
-
}, {
|
|
350
|
-
translateY: elementTranslateY
|
|
351
|
-
}, {
|
|
352
|
-
scaleX: elementScaleX
|
|
353
|
-
}, {
|
|
354
|
-
scaleY: elementScaleY
|
|
355
|
-
}],
|
|
356
|
-
opacity: zoomOptions?.debug ? 1 : unfocusedFade,
|
|
357
|
-
zIndex: shouldElevateUnfocusedElement ? 9999 : 0,
|
|
358
|
-
elevation: shouldElevateUnfocusedElement ? 9999 : 0
|
|
359
|
-
};
|
|
360
217
|
return {
|
|
361
|
-
|
|
362
|
-
|
|
218
|
+
content: unfocusedContent,
|
|
219
|
+
[link.id]: {
|
|
363
220
|
style: {
|
|
364
221
|
transform: [{
|
|
365
|
-
|
|
366
|
-
}
|
|
222
|
+
translateX: trackedSourceElement.translateX
|
|
223
|
+
}, {
|
|
224
|
+
translateY: trackedSourceElement.translateY
|
|
225
|
+
}, {
|
|
226
|
+
rotateZ: `${drag.rotation}rad`
|
|
227
|
+
}, {
|
|
228
|
+
scaleX: trackedSourceElement.scaleX
|
|
229
|
+
}, {
|
|
230
|
+
scaleY: trackedSourceElement.scaleY
|
|
231
|
+
}],
|
|
232
|
+
opacity: unfocusedFade
|
|
367
233
|
}
|
|
368
|
-
},
|
|
369
|
-
[buildEffectiveTag]: {
|
|
370
|
-
style: resolvedElementStyle
|
|
371
234
|
}
|
|
372
235
|
};
|
|
373
236
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["interpolate","EPSILON","NAVIGATION_MASK_ELEMENT_STYLE_ID","VISIBLE_STYLE","createBoundsAccessorCore","getSourceBorderRadius","toNumber","combineScales","composeCompensatedTranslation","computeCenterScaleShift","resolveDirectionalDragScale","resolveOpacityRangeTuple","resolveDismissScaleHandoff","resolveRevealGestureHandoff","ZOOM_DISMISS_SCALE_ORBIT_DEPTH","ZOOM_FOCUSED_ELEMENT_CLOSE_OPACITY_RANGE","ZOOM_FOCUSED_ELEMENT_OPEN_OPACITY_RANGE","ZOOM_MASK_OUTSET","ZOOM_SHARED_OPTIONS","ZOOM_UNFOCUSED_ELEMENT_CLOSE_OPACITY_RANGE","ZOOM_UNFOCUSED_ELEMENT_OPEN_OPACITY_RANGE","getZoomContentTarget","interpolateOpacityRange","resolveBackgroundScale","resolveDragScaleTuple","resolveDragTranslationTuple","resolveZoomPanGestureDirection","resolveDirectionalDragTranslation","IDENTITY_DRAG_SCALE_OUTPUT","resolveZoomGestureOptions","rawDrag","maxSensitivity","gestureSensitivity","gestureReleaseVelocityScale","buildZoomStyles","tag","zoomOptions","props","target","focused","layouts","screen","screenLayout","transitionProgress","current","next","activeTransitionProgress","active","zoomAnchor","anchor","bounds","getProps","scopedBounds","link","baseRawOptions","scaleMode","buildEffectiveTag","id","sourceBorderRadius","targetBorderRadius","borderRadius","focusedElementOpacity","open","value","fallback","close","unfocusedElementOpacity","sourceVisibilityStyle","style","navigationMaskEnabled","options","velocityDepth","liveGesture","gesture","gestureHandoff","handoff","normX","normY","initialGesture","direction","rawNormX","raw","rawNormY","isHorizontalDismiss","isVerticalDismiss","Math","abs","horizontalDragTranslation","verticalDragTranslation","dragX","translation","x","dimension","width","negativeMax","positiveMax","exponent","dragY","y","height","horizontalDragScale","verticalDragScale","backgroundScale","dragXScale","normalized","dismissDirection","shrinkMin","growMax","dragYScale","dragScale","handoffDragScale","dismissing","progress","releaseScale","targetScale","velocity","zoomGestureOptions","focusedContentTarget","explicitTarget","contentRaw","values","method","maskRaw","space","focusedFade","closing","range","shouldRemoveClipping","animating","focusedMaskBorderRadius","top","right","bottom","left","maskWidth","max","maskHeight","contentBaseTranslateX","translateX","contentBaseTranslateY","translateY","contentBaseScale","scale","safeContentBaseScale","contentTranslateX","contentTranslateY","contentScale","maskBaseTranslateX","maskBaseTranslateY","maskCenterX","maskCenterY","contentCenterX","contentCenterY","compensatedMaskTranslateX","compensatedMaskTranslateY","compensatedMaskScale","focusedContentStyle","opacity","debug","transform","overflow","focusedStyles","content","unfocusedFade","unfocusedScale","didSourceComponentVisiblyHide","shouldHideUnfocusedElement","unfocusedElementTarget","elementRaw","boundTargetCenterX","destination","pageX","undefined","boundTargetCenterY","pageY","elementCenterX","elementCenterY","unfocusedContentScale","settled","shouldTrackGestureTranslation","shouldTrackGestureScale","elementGestureScale","elementGestureX","elementGestureY","safeUnfocusedContentScale","shouldElevateUnfocusedElement","scaleShiftX","center","containerCenter","scaleShiftY","compensatedGestureX","parentScale","centerShift","epsilon","compensatedGestureY","elementTranslateX","elementTranslateY","elementScaleX","scaleX","elementScaleY","scaleY","resolvedElementStyle","zIndex","elevation"],"sourceRoot":"../../../../../../../src","sources":["shared/utils/bounds/navigation/zoom/build.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,yBAAyB;AACrD,SACCC,OAAO,EACPC,gCAAgC,EAChCC,aAAa,QACP,uBAAuB;AAE9B,SAASC,wBAAwB,QAAQ,2CAA2C;AACpF,SAASC,qBAAqB,EAAEC,QAAQ,QAAQ,YAAY;AAC5D,SACCC,aAAa,EACbC,6BAA6B,EAC7BC,uBAAuB,EACvBC,2BAA2B,EAC3BC,wBAAwB,QAClB,SAAS;AAChB,SACCC,0BAA0B,EAC1BC,2BAA2B,QACrB,gBAAgB;AACvB,SACCC,8BAA8B,EAC9BC,wCAAwC,EACxCC,uCAAuC,EACvCC,gBAAgB,EAChBC,mBAAmB,EACnBC,0CAA0C,EAC1CC,yCAAyC,QACnC,UAAU;AACjB,SACCC,oBAAoB,EACpBC,uBAAuB,EACvBC,sBAAsB,EACtBC,qBAAqB,EACrBC,2BAA2B,EAC3BC,8BAA8B,QACxB,WAAW;AAClB,SAASC,iCAAiC,QAAQ,QAAQ;AAG1D,MAAMC,0BAA0B,GAAG,CAAC,CAAC,EAAE,CAAC,CAAU;AAElD,SAASC,yBAAyBA,CAAC;EAClCC,OAAO;EACPC;AAID,CAAC,EAAE;EACF,SAAS;;EAET,MAAM;IAAEC,kBAAkB;IAAEC;EAA4B,CAAC,GACxDpB,2BAA2B,CAAC;IAC3BiB,OAAO;IACPC;EACD,CAAC,CAAC;EAEH,OAAO;IACNC,kBAAkB;IAClBC;EACD,CAAC;AACF;;AAEA;AACA;AACA;;AAEA,OAAO,SAASC,eAAeA,CAAC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ACD;MACCvD,UAAU,EAAEwD;IACb,CAAC,EACD;MACCE,MAAM,EAAED;IACT,CAAC,EACD;MACCG,MAAM,EAAED;IACT,CAAC,CACD;IACD1C,OAAO,EAAEzH,WAAW,EAAE0H,KAAK,GAAG,CAAC,GAAGK,aAAa;IAC/CuC,MAAM,EAAEjB,6BAA6B,GAAG,IAAI,GAAG,CAAC;IAChDkB,SAAS,EAAElB,6BAA6B,GAAG,IAAI,GAAG;EACnD,CAAC;EAEH,OAAO;IACNnH,OAAO,EAAE8C,kBAAkB;IAC3B8C,OAAO,EAAE;MACR9F,KAAK,EAAE;QACN2F,SAAS,EAAE,CAAC;UAAEjB,KAAK,EAAEmC;QAAsB,CAAC;MAC7C;IACD,CAAC;IACD,CAACzH,iBAAiB,GAAG;MACpBY,KAAK,EAAEqI;IACR;EACD,CAAC;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["interpolate","EPSILON","NAVIGATION_MASK_ELEMENT_STYLE_ID","createBoundsAccessorCore","getSourceBorderRadius","resolveRevealContentBaseTransform","ZOOM_BACKDROP_MAX_OPACITY","ZOOM_BACKGROUND_SCALE","ZOOM_FOCUSED_ELEMENT_CLOSE_OPACITY_RANGE","ZOOM_FOCUSED_ELEMENT_OPEN_OPACITY_RANGE","ZOOM_SCREEN_A_FADE_END","ZOOM_SHARED_OPTIONS","ZOOM_UNFOCUSED_ELEMENT_CLOSE_OPACITY_RANGE","ZOOM_UNFOCUSED_ELEMENT_OPEN_OPACITY_RANGE","resolveZoomDragState","resolveZoomTrackedGestureScale","resolveZoomBackdropOpacity","resolveZoomPinchFocalOffset","resolveZoomTrackedSourceTransform","resolveZoomNavigationMaskStyle","ZOOM_NAVIGATION_MASK_BORDER_RADIUS","getZoomContentTarget","resolveZoomTrackingContentTarget","buildZoomStyles","tag","props","zoomOptions","target","keepFocusedVisible","expandedBorderRadius","Math","max","borderRadius","backgroundScale","backdropColor","maxBackdropOpacity","backdropOpacity","active","current","focused","transitionProgress","layouts","screen","screenLayout","activeTransitionProgress","bounds","getProps","scopedBounds","link","sourceBounds","source","values","scaleMode","anchor","method","progress","zoomContentTarget","explicitTarget","trackingContentTarget","contentTarget","drag","gesture","dragOptions","trackedGestureScale","focalGesture","isDismissing","handoff","focalProgress","pinchFocalOffset","gestureScale","scale","pinchOriginX","pinchOriginY","rotation","x","y","sourceBorderRadius","navigationMaskEnabled","options","dismissalDrag","dismissNorm","fadeEnd","maxOpacity","contentRaw","focusedOpacityRange","closing","focusedFade","contentBaseTranslateX","translateX","contentBaseTranslateY","translateY","contentBaseScale","contentTranslateX","dragX","contentTranslateY","dragY","contentScale","dismissContentScale","gestureReleaseVelocityScale","backdrop","style","backgroundColor","opacity","content","transform","rotateZ","animating","overflow","contentTransform","unfocusedOpacityRange","unfocusedFade","unfocusedScale","shouldHideSource","unfocusedContentScale","settled","unfocusedContent","id","scaleX","scaleY","trackedContentBaseScale","destinationBounds","trackedDragX","trackedDragY","trackedSourceElement","parentScale"],"sourceRoot":"../../../../../../../src","sources":["shared/utils/bounds/navigation/zoom/build.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,yBAAyB;AACrD,SACCC,OAAO,EACPC,gCAAgC,QAC1B,uBAAuB;AAC9B,SAASC,wBAAwB,QAAQ,2CAA2C;AACpF,SAASC,qBAAqB,QAAQ,YAAY;AAClD,SAASC,iCAAiC,QAAQ,gBAAgB;AAClE,SACCC,yBAAyB,EACzBC,qBAAqB,EACrBC,wCAAwC,EACxCC,uCAAuC,EACvCC,sBAAsB,EACtBC,mBAAmB,EACnBC,0CAA0C,EAC1CC,yCAAyC,QACnC,UAAU;AACjB,SAASC,oBAAoB,EAAEC,8BAA8B,QAAQ,QAAQ;AAC7E,SACCC,0BAA0B,EAC1BC,2BAA2B,EAC3BC,iCAAiC,QAC3B,WAAW;AAClB,SACCC,8BAA8B,EAC9BC,kCAAkC,QAC5B,QAAQ;AACf,SACCC,oBAAoB,EACpBC,gCAAgC,QAC1B,WAAW;AAGlB,OAAO,S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
8
|
-
export const ZOOM_DRAG_DIRECTIONAL_SCALE_MAX = 1.06;
|
|
9
|
-
export const ZOOM_DRAG_DIRECTIONAL_SCALE_EXPONENT = 2;
|
|
10
|
-
export const ZOOM_DRAG_TRANSLATION_NEGATIVE_MAX = 1;
|
|
11
|
-
export const ZOOM_DRAG_TRANSLATION_POSITIVE_MAX = 1;
|
|
12
|
-
export const ZOOM_DRAG_TRANSLATION_EXPONENT = 1;
|
|
13
|
-
export const ZOOM_DISMISS_SCALE_ORBIT_DEPTH = 0.5;
|
|
7
|
+
export const ZOOM_DISMISS_VELOCITY_DEPTH = 1.0;
|
|
14
8
|
export const ZOOM_BACKGROUND_SCALE = 0.9375;
|
|
15
|
-
|
|
16
|
-
export const
|
|
17
|
-
|
|
18
|
-
export const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
9
|
+
// Keep the previous screen visible beneath the zoom instead of reaching black.
|
|
10
|
+
export const ZOOM_BACKDROP_MAX_OPACITY = 0.45;
|
|
11
|
+
// Geometry-aligned native frames reach their darkest point around here.
|
|
12
|
+
export const ZOOM_SCREEN_A_FADE_END = 0.54;
|
|
13
|
+
// Open uses a tight owner handoff after red has traveled about one quarter.
|
|
14
|
+
export const ZOOM_FOCUSED_ELEMENT_OPEN_OPACITY_RANGE = [0, 0.4, 0, 1];
|
|
15
|
+
export const ZOOM_UNFOCUSED_ELEMENT_OPEN_OPACITY_RANGE = [1.27, 1.4, 1, 0];
|
|
16
|
+
// On close, red is prepared behind opaque blue before blue fades away.
|
|
17
|
+
export const ZOOM_FOCUSED_ELEMENT_CLOSE_OPACITY_RANGE = [0.13, 0.7, 0, 1];
|
|
18
|
+
export const ZOOM_UNFOCUSED_ELEMENT_CLOSE_OPACITY_RANGE = [1.7, 2, 1, 0];
|
|
25
19
|
//# sourceMappingURL=config.js.map
|