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
|
@@ -30,21 +30,18 @@ export const usePinchBehavior = (
|
|
|
30
30
|
const { withSensitivity, resetSensitivity } =
|
|
31
31
|
usePinchGestureSensitivity(screenOptions);
|
|
32
32
|
|
|
33
|
-
const onStart = useCallback(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
[runtime, screenOptions, resetSensitivity],
|
|
47
|
-
);
|
|
33
|
+
const onStart = useCallback(() => {
|
|
34
|
+
"worklet";
|
|
35
|
+
const latestRuntime = resolvePinchRuntime(
|
|
36
|
+
runtime.get(),
|
|
37
|
+
screenOptions.get(),
|
|
38
|
+
);
|
|
39
|
+
if (latestRuntime.participation.effectiveSnapPoints.hasSnapPoints) {
|
|
40
|
+
primeSnapPinchRelease(latestRuntime);
|
|
41
|
+
}
|
|
42
|
+
startPinchBase(latestRuntime);
|
|
43
|
+
resetSensitivity();
|
|
44
|
+
}, [runtime, screenOptions, resetSensitivity]);
|
|
48
45
|
|
|
49
46
|
const onUpdate = useCallback(
|
|
50
47
|
(rawEvent: PinchGestureEvent) => {
|
package/src/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.ts
CHANGED
|
@@ -214,7 +214,12 @@ export const useScrollGestureCoordination = (
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
for (const pinchGesture of pinchGestures) {
|
|
217
|
-
|
|
217
|
+
// A pinch must remain possible after the first finger lands. Making
|
|
218
|
+
// native scrolling wait for it to fail therefore stalls ordinary
|
|
219
|
+
// one-finger scrolling until touch-up. Let both recognizers run:
|
|
220
|
+
// the ScrollView can begin immediately, while a second finger can
|
|
221
|
+
// still promote the screen gesture to a pinch.
|
|
222
|
+
gesture = gesture.simultaneousWithExternalGesture({
|
|
218
223
|
current: pinchGesture as unknown as GestureType,
|
|
219
224
|
});
|
|
220
225
|
}
|
|
@@ -20,6 +20,8 @@ export const snapshotGestureHandoff = (
|
|
|
20
20
|
snapshot.normScale.set(gestures.normScale.get());
|
|
21
21
|
snapshot.focalX.set(gestures.focalX.get());
|
|
22
22
|
snapshot.focalY.set(gestures.focalY.get());
|
|
23
|
+
snapshot.pinchOriginX.set(gestures.pinchOriginX.get());
|
|
24
|
+
snapshot.pinchOriginY.set(gestures.pinchOriginY.get());
|
|
23
25
|
snapshot.rotation.set(gestures.rotation.get());
|
|
24
26
|
snapshot.raw.x.set(gestures.raw.x.get());
|
|
25
27
|
snapshot.raw.y.set(gestures.raw.y.get());
|
|
@@ -34,6 +34,8 @@ export const clearFocalPoint = (gestures: GestureStoreMap) => {
|
|
|
34
34
|
"worklet";
|
|
35
35
|
gestures.focalX.set(0);
|
|
36
36
|
gestures.focalY.set(0);
|
|
37
|
+
gestures.pinchOriginX.set(0);
|
|
38
|
+
gestures.pinchOriginY.set(0);
|
|
37
39
|
};
|
|
38
40
|
|
|
39
41
|
export const clearRawTransformValues = (gestures: GestureStoreMap) => {
|
|
@@ -14,7 +14,7 @@ import { resolveScreenVisibilityGate } from "../helpers/visibility-gate";
|
|
|
14
14
|
export const useMaybeBlockVisibility = (isFloatingOverlay?: boolean) => {
|
|
15
15
|
const { height } = useWindowDimensions();
|
|
16
16
|
const { currentScreenKey } = useDescriptorDerivations();
|
|
17
|
-
const { entering, transitionProgress } =
|
|
17
|
+
const { closing, entering, progressAnimating, transitionProgress } =
|
|
18
18
|
AnimationStore.getBag(currentScreenKey);
|
|
19
19
|
const { pendingLifecycleStartBlockCount, pendingLifecycleRequestKind } =
|
|
20
20
|
SystemStore.getBag(currentScreenKey);
|
|
@@ -49,6 +49,19 @@ export const useMaybeBlockVisibility = (isFloatingOverlay?: boolean) => {
|
|
|
49
49
|
const animatedStyle = useAnimatedStyle(() => {
|
|
50
50
|
"worklet";
|
|
51
51
|
const offset = getVisibilityBlockOffset(height);
|
|
52
|
+
// Keep opacity out of normal rendering so effects such as Liquid Glass
|
|
53
|
+
// retain native compositing. Once closing has fully finished, hiding the
|
|
54
|
+
// outgoing screen lets the handoff settle before React removes its host.
|
|
55
|
+
const shouldHideClosedScreen =
|
|
56
|
+
closing.get() === 1 &&
|
|
57
|
+
transitionProgress.get() <= 0 &&
|
|
58
|
+
progressAnimating.get() === 0;
|
|
59
|
+
|
|
60
|
+
if (shouldHideClosedScreen) {
|
|
61
|
+
return {
|
|
62
|
+
opacity: 0,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
52
65
|
|
|
53
66
|
return {
|
|
54
67
|
transform: [
|
|
@@ -29,6 +29,8 @@ type GestureSnapshotStoreMap = {
|
|
|
29
29
|
normScale: SharedValue<number>;
|
|
30
30
|
focalX: SharedValue<number>;
|
|
31
31
|
focalY: SharedValue<number>;
|
|
32
|
+
pinchOriginX: SharedValue<number>;
|
|
33
|
+
pinchOriginY: SharedValue<number>;
|
|
32
34
|
rotation: SharedValue<number>;
|
|
33
35
|
raw: GestureRawStoreMap;
|
|
34
36
|
active: SharedValue<ActiveGesture | null>;
|
|
@@ -53,6 +55,8 @@ export type GestureStoreMap = {
|
|
|
53
55
|
normScale: SharedValue<number>;
|
|
54
56
|
focalX: SharedValue<number>;
|
|
55
57
|
focalY: SharedValue<number>;
|
|
58
|
+
pinchOriginX: SharedValue<number>;
|
|
59
|
+
pinchOriginY: SharedValue<number>;
|
|
56
60
|
rotation: SharedValue<number>;
|
|
57
61
|
raw: GestureRawStoreMap;
|
|
58
62
|
internal: GestureInternalStoreMap;
|
|
@@ -105,6 +109,8 @@ function createGestureBag(): GestureStoreMap {
|
|
|
105
109
|
normScale,
|
|
106
110
|
focalX: makeMutable(0),
|
|
107
111
|
focalY: makeMutable(0),
|
|
112
|
+
pinchOriginX: makeMutable(0),
|
|
113
|
+
pinchOriginY: makeMutable(0),
|
|
108
114
|
rotation: makeMutable(0),
|
|
109
115
|
raw: {
|
|
110
116
|
x: makeMutable(0),
|
|
@@ -130,6 +136,8 @@ function createGestureBag(): GestureStoreMap {
|
|
|
130
136
|
normScale: makeMutable(0),
|
|
131
137
|
focalX: makeMutable(0),
|
|
132
138
|
focalY: makeMutable(0),
|
|
139
|
+
pinchOriginX: makeMutable(0),
|
|
140
|
+
pinchOriginY: makeMutable(0),
|
|
133
141
|
rotation: makeMutable(0),
|
|
134
142
|
raw: {
|
|
135
143
|
x: makeMutable(0),
|
|
@@ -177,6 +185,8 @@ export const GestureStore = createStore<GestureStoreMap>({
|
|
|
177
185
|
cancelAnimation(bag.normScale);
|
|
178
186
|
cancelAnimation(bag.focalX);
|
|
179
187
|
cancelAnimation(bag.focalY);
|
|
188
|
+
cancelAnimation(bag.pinchOriginX);
|
|
189
|
+
cancelAnimation(bag.pinchOriginY);
|
|
180
190
|
cancelAnimation(bag.rotation);
|
|
181
191
|
cancelAnimation(bag.raw.x);
|
|
182
192
|
cancelAnimation(bag.raw.y);
|
|
@@ -198,6 +208,8 @@ export const GestureStore = createStore<GestureStoreMap>({
|
|
|
198
208
|
cancelAnimation(bag.internal.snapshot.normScale);
|
|
199
209
|
cancelAnimation(bag.internal.snapshot.focalX);
|
|
200
210
|
cancelAnimation(bag.internal.snapshot.focalY);
|
|
211
|
+
cancelAnimation(bag.internal.snapshot.pinchOriginX);
|
|
212
|
+
cancelAnimation(bag.internal.snapshot.pinchOriginY);
|
|
201
213
|
cancelAnimation(bag.internal.snapshot.rotation);
|
|
202
214
|
cancelAnimation(bag.internal.snapshot.raw.x);
|
|
203
215
|
cancelAnimation(bag.internal.snapshot.raw.y);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ColorValue } from "react-native";
|
|
2
2
|
import {
|
|
3
3
|
NAVIGATION_MASK_CONTAINER_STYLE_ID,
|
|
4
4
|
NAVIGATION_MASK_ELEMENT_STYLE_ID,
|
|
@@ -31,78 +31,142 @@ export type { BoundsLink, BoundsLinkStatus } from "../stores/bounds/types";
|
|
|
31
31
|
*/
|
|
32
32
|
export type BoundsMethod = "transform" | "size" | "content";
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Axis-specific response intensity used by {@linkcode BoundsNavigationZoomDragOptions}.
|
|
36
|
+
*
|
|
37
|
+
* `0` disables the response on an axis, `1` preserves the native zoom preset,
|
|
38
|
+
* and values above `1` exaggerate it.
|
|
39
|
+
*/
|
|
40
|
+
export type BoundsNavigationZoomAxisResponse = {
|
|
41
|
+
/** Horizontal gesture response multiplier. @default 1 */
|
|
42
|
+
horizontal?: number;
|
|
43
|
+
/** Vertical gesture response multiplier. @default 1 */
|
|
44
|
+
vertical?: number;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Adjusts the intensity of zoom's native drag behavior without replacing its
|
|
49
|
+
* built-in curves.
|
|
50
|
+
*
|
|
51
|
+
* @see {@linkcode BoundsNavigationZoomOptions.drag}
|
|
52
|
+
*/
|
|
53
|
+
export type BoundsNavigationZoomDragOptions = {
|
|
54
|
+
/**
|
|
55
|
+
* Multiplies the native rendered translation.
|
|
56
|
+
*
|
|
57
|
+
* @default { horizontal: 1, vertical: 1 }
|
|
58
|
+
*/
|
|
59
|
+
translation?: BoundsNavigationZoomAxisResponse;
|
|
60
|
+
/**
|
|
61
|
+
* Multiplies the native scale displacement from `1`.
|
|
62
|
+
*
|
|
63
|
+
* @default { horizontal: 1, vertical: 1 }
|
|
64
|
+
*/
|
|
65
|
+
scale?: BoundsNavigationZoomAxisResponse;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Legacy zoom opacity interpolation tuple.
|
|
70
|
+
*
|
|
71
|
+
* @deprecated Zoom opacity ownership now follows the native preset.
|
|
72
|
+
*/
|
|
73
|
+
export type BoundsNavigationZoomOpacityRange = readonly [
|
|
74
|
+
inputStart: number,
|
|
75
|
+
inputEnd: number,
|
|
76
|
+
outputStart?: number,
|
|
77
|
+
outputEnd?: number,
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Legacy opening and closing zoom opacity ranges.
|
|
82
|
+
*
|
|
83
|
+
* @deprecated Zoom opacity ownership now follows the native preset.
|
|
84
|
+
*/
|
|
85
|
+
export type BoundsNavigationZoomOpacityRanges = {
|
|
86
|
+
open?: BoundsNavigationZoomOpacityRange;
|
|
87
|
+
close?: BoundsNavigationZoomOpacityRange;
|
|
88
|
+
};
|
|
89
|
+
|
|
34
90
|
export type BoundsNavigationZoomOptions = {
|
|
35
|
-
target?: "bound" | "fullscreen" | MeasuredDimensions;
|
|
36
|
-
debug?: boolean;
|
|
37
|
-
borderRadius?: number;
|
|
38
91
|
/**
|
|
39
|
-
*
|
|
92
|
+
* Geometry that the zoomed content should resolve against.
|
|
40
93
|
*
|
|
41
|
-
* `
|
|
42
|
-
*
|
|
94
|
+
* `"bound"` uses the paired destination boundary. `"fullscreen"` uses the
|
|
95
|
+
* screen, and measured dimensions provide an explicit target rectangle.
|
|
96
|
+
* When omitted, zoom keeps its native full-width aspect-ratio target.
|
|
97
|
+
*/
|
|
98
|
+
target?: BoundsComputeOptions["target"];
|
|
99
|
+
/**
|
|
100
|
+
* Keeps the focused screen content visible throughout the zoom.
|
|
101
|
+
*
|
|
102
|
+
* Enable this for handed-off or live content that should not use zoom's
|
|
103
|
+
* built-in focused-content opacity fade.
|
|
43
104
|
*
|
|
44
|
-
*
|
|
45
|
-
* - `inputStart`: transition progress start
|
|
46
|
-
* - `inputEnd`: transition progress end
|
|
47
|
-
* - `outputStart`: opacity at `inputStart` (defaults to built-in preset)
|
|
48
|
-
* - `outputEnd`: opacity at `inputEnd` (defaults to built-in preset)
|
|
105
|
+
* @default false
|
|
49
106
|
*/
|
|
50
|
-
|
|
107
|
+
keepFocusedVisible?: boolean;
|
|
51
108
|
/**
|
|
52
|
-
*
|
|
109
|
+
* Expanded transition clipping radius.
|
|
53
110
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
111
|
+
* Zoom interpolates from the measured source radius to this value while the
|
|
112
|
+
* screen is animating. This controls the visible clipping result regardless
|
|
113
|
+
* of whether a navigation mask is enabled.
|
|
56
114
|
*
|
|
57
|
-
*
|
|
58
|
-
* - `inputStart`: transition progress start
|
|
59
|
-
* - `inputEnd`: transition progress end
|
|
60
|
-
* - `outputStart`: opacity at `inputStart` (defaults to built-in preset)
|
|
61
|
-
* - `outputEnd`: opacity at `inputEnd` (defaults to built-in preset)
|
|
115
|
+
* @default 64
|
|
62
116
|
*/
|
|
63
|
-
|
|
117
|
+
borderRadius?: number;
|
|
64
118
|
/**
|
|
65
|
-
* Scale applied to the unfocused
|
|
66
|
-
*
|
|
119
|
+
* Scale applied to the unfocused screen while the zoom runs above it.
|
|
120
|
+
*
|
|
121
|
+
* @default 0.9375
|
|
67
122
|
*/
|
|
68
123
|
backgroundScale?: number;
|
|
69
124
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* Zoom lowers gesture sensitivity as the drag gets deeper so the content
|
|
73
|
-
* handoff stays stable. This value controls the starting/highest sensitivity
|
|
74
|
-
* in that curve.
|
|
125
|
+
* Color rendered behind the focused zoom content.
|
|
75
126
|
*
|
|
76
|
-
* @default
|
|
127
|
+
* @default "black"
|
|
77
128
|
*/
|
|
78
|
-
|
|
129
|
+
backdropColor?: ColorValue;
|
|
79
130
|
/**
|
|
80
|
-
*
|
|
131
|
+
* Maximum opacity reached by the zoom backdrop.
|
|
81
132
|
*
|
|
82
|
-
*
|
|
83
|
-
* to `0` to remove the velocity depth effect.
|
|
133
|
+
* Values are clamped between `0` and `1`.
|
|
84
134
|
*
|
|
85
|
-
* @default 0.
|
|
135
|
+
* @default 0.45
|
|
136
|
+
*/
|
|
137
|
+
backdropOpacity?: number;
|
|
138
|
+
/**
|
|
139
|
+
* Native drag-response intensity controls.
|
|
140
|
+
*/
|
|
141
|
+
drag?: BoundsNavigationZoomDragOptions;
|
|
142
|
+
/**
|
|
143
|
+
* @deprecated Ignored. Zoom no longer exposes a transition-specific debug
|
|
144
|
+
* overlay.
|
|
145
|
+
*/
|
|
146
|
+
debug?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* @deprecated Ignored. Zoom opacity ownership now follows the native preset.
|
|
149
|
+
*/
|
|
150
|
+
focusedElementOpacity?: BoundsNavigationZoomOpacityRanges;
|
|
151
|
+
/**
|
|
152
|
+
* @deprecated Ignored. Zoom opacity ownership now follows the native preset.
|
|
153
|
+
*/
|
|
154
|
+
unfocusedElementOpacity?: BoundsNavigationZoomOpacityRanges;
|
|
155
|
+
/**
|
|
156
|
+
* @deprecated Ignored. Zoom now owns its gesture sensitivity curve.
|
|
157
|
+
*/
|
|
158
|
+
maxSensitivity?: number;
|
|
159
|
+
/**
|
|
160
|
+
* @deprecated Ignored. Zoom now owns its velocity-depth behavior.
|
|
86
161
|
*/
|
|
87
162
|
velocityDepth?: number;
|
|
88
163
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* Gesture movement now always contributes to `progress`; use `transitionProgress`
|
|
92
|
-
* when a recipe needs transition progress without live gesture contribution.
|
|
93
|
-
* The zoom helper no longer reads this option.
|
|
94
|
-
*
|
|
95
|
-
* @deprecated Use `transitionProgress` from interpolation state instead.
|
|
164
|
+
* @deprecated Ignored. Gesture movement always contributes to `progress`.
|
|
96
165
|
*/
|
|
97
166
|
gestureProgressMode?: GestureProgressMode;
|
|
98
167
|
/**
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* Tuple order:
|
|
103
|
-
* - `shrinkMin`: minimum scale when dragging toward dismissal
|
|
104
|
-
* - `growMax`: maximum scale when dragging opposite dismissal
|
|
105
|
-
* - `exponent`: curve exponent controlling how quickly scaling ramps
|
|
168
|
+
* @deprecated Ignored. Use `drag.scale.horizontal` to adjust response
|
|
169
|
+
* intensity without replacing the native curve.
|
|
106
170
|
*/
|
|
107
171
|
horizontalDragScale?: readonly [
|
|
108
172
|
shrinkMin: number,
|
|
@@ -110,13 +174,8 @@ export type BoundsNavigationZoomOptions = {
|
|
|
110
174
|
exponent?: number,
|
|
111
175
|
];
|
|
112
176
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* Tuple order:
|
|
117
|
-
* - `shrinkMin`: minimum scale when dragging toward dismissal
|
|
118
|
-
* - `growMax`: maximum scale when dragging opposite dismissal
|
|
119
|
-
* - `exponent`: curve exponent controlling how quickly scaling ramps
|
|
177
|
+
* @deprecated Ignored. Use `drag.scale.vertical` to adjust response intensity
|
|
178
|
+
* without replacing the native curve.
|
|
120
179
|
*/
|
|
121
180
|
verticalDragScale?: readonly [
|
|
122
181
|
shrinkMin: number,
|
|
@@ -124,17 +183,8 @@ export type BoundsNavigationZoomOptions = {
|
|
|
124
183
|
exponent?: number,
|
|
125
184
|
];
|
|
126
185
|
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* Tuple order:
|
|
130
|
-
* - `negativeMax`: multiplier when dragging left / negative
|
|
131
|
-
* - `positiveMax`: multiplier when dragging right / positive
|
|
132
|
-
* - `exponent`: curve exponent controlling how quickly translation ramps
|
|
133
|
-
*
|
|
134
|
-
* Examples:
|
|
135
|
-
* - `[0, 0]` disables horizontal drag translation
|
|
136
|
-
* - `[0.5, 0.5]` halves horizontal drag travel
|
|
137
|
-
* - `[1.2, 1.2]` amplifies horizontal drag travel
|
|
186
|
+
* @deprecated Ignored. Use `drag.translation.horizontal` to adjust response
|
|
187
|
+
* intensity without replacing the native curve.
|
|
138
188
|
*/
|
|
139
189
|
horizontalDragTranslation?: readonly [
|
|
140
190
|
negativeMax: number,
|
|
@@ -142,17 +192,8 @@ export type BoundsNavigationZoomOptions = {
|
|
|
142
192
|
exponent?: number,
|
|
143
193
|
];
|
|
144
194
|
/**
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* Tuple order:
|
|
148
|
-
* - `negativeMax`: multiplier when dragging up / negative
|
|
149
|
-
* - `positiveMax`: multiplier when dragging down / positive
|
|
150
|
-
* - `exponent`: curve exponent controlling how quickly translation ramps
|
|
151
|
-
*
|
|
152
|
-
* Examples:
|
|
153
|
-
* - `[0, 0]` disables vertical drag translation
|
|
154
|
-
* - `[0.5, 0.5]` halves vertical drag travel
|
|
155
|
-
* - `[1.2, 1.2]` amplifies vertical drag travel
|
|
195
|
+
* @deprecated Ignored. Use `drag.translation.vertical` to adjust response
|
|
196
|
+
* intensity without replacing the native curve.
|
|
156
197
|
*/
|
|
157
198
|
verticalDragTranslation?: readonly [
|
|
158
199
|
negativeMax: number,
|
|
@@ -161,18 +202,6 @@ export type BoundsNavigationZoomOptions = {
|
|
|
161
202
|
];
|
|
162
203
|
};
|
|
163
204
|
|
|
164
|
-
export type BoundsNavigationZoomOpacityRange = readonly [
|
|
165
|
-
inputStart: number,
|
|
166
|
-
inputEnd: number,
|
|
167
|
-
outputStart?: number,
|
|
168
|
-
outputEnd?: number,
|
|
169
|
-
];
|
|
170
|
-
|
|
171
|
-
export type BoundsNavigationZoomOpacityRanges = {
|
|
172
|
-
open?: BoundsNavigationZoomOpacityRange;
|
|
173
|
-
close?: BoundsNavigationZoomOpacityRange;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
205
|
export type BoundsNavigationZoomStyle = TransitionInterpolatedStyle & {
|
|
177
206
|
content?: TransitionSlotStyle;
|
|
178
207
|
[NAVIGATION_MASK_CONTAINER_STYLE_ID]?: TransitionSlotStyle;
|
|
@@ -150,6 +150,8 @@ export type GestureHandoffValues = {
|
|
|
150
150
|
normScale: number;
|
|
151
151
|
focalX: number;
|
|
152
152
|
focalY: number;
|
|
153
|
+
pinchOriginX: number;
|
|
154
|
+
pinchOriginY: number;
|
|
153
155
|
rotation: number;
|
|
154
156
|
raw: RawGestureValues;
|
|
155
157
|
/**
|
|
@@ -202,6 +204,14 @@ export type GestureValues = {
|
|
|
202
204
|
* The live pinch focal point y-position in screen coordinates.
|
|
203
205
|
*/
|
|
204
206
|
focalY: number;
|
|
207
|
+
/**
|
|
208
|
+
* The pinch focal point x-position captured when the gesture activated.
|
|
209
|
+
*/
|
|
210
|
+
pinchOriginX: number;
|
|
211
|
+
/**
|
|
212
|
+
* The pinch focal point y-position captured when the gesture activated.
|
|
213
|
+
*/
|
|
214
|
+
pinchOriginY: number;
|
|
205
215
|
/**
|
|
206
216
|
* The live two-finger rotation in radians.
|
|
207
217
|
*/
|
|
@@ -25,6 +25,8 @@ export type {
|
|
|
25
25
|
BoundsNavigationAccessor,
|
|
26
26
|
BoundsNavigationRevealOptions,
|
|
27
27
|
BoundsNavigationRevealStyle,
|
|
28
|
+
BoundsNavigationZoomAxisResponse,
|
|
29
|
+
BoundsNavigationZoomDragOptions,
|
|
28
30
|
BoundsNavigationZoomOpacityRange,
|
|
29
31
|
BoundsNavigationZoomOpacityRanges,
|
|
30
32
|
BoundsNavigationZoomOptions,
|
|
@@ -113,14 +113,30 @@ export const animateToProgress = ({
|
|
|
113
113
|
entering.set(FALSE);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
if (
|
|
117
|
-
runOnJS(onAnimationFinish)(state.finished);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// Delay clearing progress animation by one frame to ensure final frame is painted
|
|
121
|
-
requestAnimationFrame(() => {
|
|
116
|
+
if (isClosing) {
|
|
122
117
|
progressAnimating.set(FALSE);
|
|
123
|
-
|
|
118
|
+
|
|
119
|
+
if (onAnimationFinish) {
|
|
120
|
+
// Paint the terminal UI-thread host/style state before React
|
|
121
|
+
// removes the closing route and its native portal host.
|
|
122
|
+
requestAnimationFrame(() => {
|
|
123
|
+
"worklet";
|
|
124
|
+
requestAnimationFrame(() => {
|
|
125
|
+
"worklet";
|
|
126
|
+
runOnJS(onAnimationFinish)(state.finished);
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
} else {
|
|
131
|
+
if (onAnimationFinish) {
|
|
132
|
+
runOnJS(onAnimationFinish)(state.finished);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Delay clearing progress animation by one frame to ensure final frame is painted
|
|
136
|
+
requestAnimationFrame(() => {
|
|
137
|
+
progressAnimating.set(FALSE);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
124
140
|
}),
|
|
125
141
|
);
|
|
126
142
|
};
|
|
@@ -141,7 +141,8 @@ export function resolveDismissScaleHandoff({
|
|
|
141
141
|
"worklet";
|
|
142
142
|
|
|
143
143
|
const closeProgress = 1 - progress;
|
|
144
|
-
const
|
|
144
|
+
const easeIn = 1 - Math.cos((Math.PI / 2) * closeProgress);
|
|
145
|
+
const scaleProgress = easeIn ** 2;
|
|
145
146
|
const baseScale = releaseScale + (targetScale - releaseScale) * scaleProgress;
|
|
146
147
|
|
|
147
148
|
const orbitDepth = velocityDepth * velocity;
|