react-native-screen-transitions 3.4.0-alpha.1 → 3.4.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1109
- package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js +69 -2
- package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js +9 -0
- package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +195 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +54 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +40 -8
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +72 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +7 -4
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js +22 -8
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/commonjs/shared/components/create-transition-aware-component.js +3 -2
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/native-screen-container.js +12 -6
- package/lib/commonjs/shared/components/native-screen-container.js.map +1 -1
- package/lib/commonjs/shared/components/native-screen.js +35 -8
- package/lib/commonjs/shared/components/native-screen.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +60 -0
- package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
- package/lib/commonjs/shared/components/screen-container/layers/content.js +5 -37
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +21 -12
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js +6 -7
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js +11 -6
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/layout-anchor.provider.js +4 -6
- package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +14 -7
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/core.provider.js +14 -21
- package/lib/commonjs/shared/providers/stack/core.provider.js.map +1 -1
- package/lib/commonjs/shared/stores/animation.store.js +3 -1
- package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/presence.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js +14 -5
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js +0 -5
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/index.js +10 -0
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/types/frame-props.js +6 -0
- package/lib/commonjs/shared/utils/bounds/types/frame-props.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/zoom/build.js +33 -26
- package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/resolve-screen-transition-options.js +25 -0
- package/lib/commonjs/shared/utils/resolve-screen-transition-options.js.map +1 -0
- package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js +69 -3
- package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/module/component-stack/navigators/create-component-stack-navigator.js +9 -0
- package/lib/module/component-stack/navigators/create-component-stack-navigator.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +182 -0
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
- package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +49 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +41 -8
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +67 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +7 -4
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
- package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/index.js +22 -8
- package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/module/shared/components/create-transition-aware-component.js +3 -2
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/native-screen-container.js +12 -6
- package/lib/module/shared/components/native-screen-container.js.map +1 -1
- package/lib/module/shared/components/native-screen.js +35 -8
- package/lib/module/shared/components/native-screen.js.map +1 -1
- package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +56 -0
- package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
- package/lib/module/shared/components/screen-container/layers/content.js +9 -41
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +22 -13
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js +6 -7
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/module/shared/providers/gestures/helpers/gesture-activation.js +11 -6
- package/lib/module/shared/providers/gestures/helpers/gesture-activation.js.map +1 -1
- package/lib/module/shared/providers/layout-anchor.provider.js +4 -6
- package/lib/module/shared/providers/layout-anchor.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +14 -7
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/stack/core.provider.js +14 -21
- package/lib/module/shared/providers/stack/core.provider.js.map +1 -1
- package/lib/module/shared/stores/animation.store.js +3 -1
- package/lib/module/shared/stores/animation.store.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/presence.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js +14 -5
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js +0 -5
- package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
- package/lib/module/shared/utils/bounds/index.js +10 -0
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/types/frame-props.js +4 -0
- package/lib/module/shared/utils/bounds/types/frame-props.js.map +1 -0
- package/lib/module/shared/utils/bounds/zoom/build.js +33 -26
- package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/resolve-screen-transition-options.js +19 -0
- package/lib/module/shared/utils/resolve-screen-transition-options.js.map +1 -0
- package/lib/typescript/blank-stack/index.d.ts +1 -1
- package/lib/typescript/blank-stack/index.d.ts.map +1 -1
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +29 -4
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/blank-stack/types.d.ts +33 -4
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +8 -0
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +81 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts +2 -3
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts +11 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts +2 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts +11 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts +3 -3
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts +2 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts +5 -3
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts +2 -4
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts +1 -0
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/native-screen-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts +3 -0
- package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +3 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +0 -1
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts +1 -1
- package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/helpers/gesture-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/core.provider.d.ts +2 -0
- package/lib/typescript/shared/providers/stack/core.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts +5 -3
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/presence.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +7 -0
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +46 -22
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/index.d.ts +2 -2
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts +5 -0
- package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts +4 -4
- package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +3 -3
- package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts +5 -0
- package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts.map +1 -0
- package/package.json +2 -1
- package/src/blank-stack/index.ts +1 -0
- package/src/blank-stack/navigators/create-blank-stack-navigator.tsx +138 -19
- package/src/blank-stack/types.ts +33 -5
- package/src/component-stack/navigators/create-component-stack-navigator.tsx +8 -0
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +258 -0
- package/src/shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts +7 -17
- package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +38 -28
- package/src/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.ts +58 -0
- package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +41 -10
- package/src/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.ts +82 -0
- package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +24 -12
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +11 -9
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.ts +29 -26
- package/src/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.ts +26 -17
- package/src/shared/components/create-boundary-component/index.tsx +25 -6
- package/src/shared/components/create-boundary-component/types.ts +8 -4
- package/src/shared/components/create-transition-aware-component.tsx +5 -2
- package/src/shared/components/native-screen-container.tsx +11 -3
- package/src/shared/components/native-screen.tsx +65 -20
- package/src/shared/components/screen-container/hooks/use-content-layout.ts +82 -0
- package/src/shared/components/screen-container/layers/content.tsx +11 -73
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +24 -16
- package/src/shared/providers/gestures/handlers/use-handlers.ts +8 -5
- package/src/shared/providers/gestures/helpers/gesture-activation.ts +11 -6
- package/src/shared/providers/layout-anchor.provider.tsx +2 -5
- package/src/shared/providers/register-bounds.provider.tsx +1 -1
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +24 -8
- package/src/shared/providers/stack/core.provider.tsx +27 -14
- package/src/shared/stores/animation.store.ts +11 -7
- package/src/shared/stores/bounds/internals/presence.ts +3 -1
- package/src/shared/types/animation.types.ts +7 -0
- package/src/shared/types/screen.types.ts +50 -22
- package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +14 -1
- package/src/shared/utils/bounds/helpers/resolve-bound-tag.ts +0 -6
- package/src/shared/utils/bounds/index.ts +16 -5
- package/src/shared/utils/bounds/types/frame-props.ts +5 -0
- package/src/shared/utils/bounds/zoom/accessor.ts +3 -3
- package/src/shared/utils/bounds/zoom/build.ts +32 -22
- package/src/shared/utils/bounds/zoom/types.ts +3 -3
- package/src/shared/utils/resolve-screen-transition-options.ts +37 -0
- package/lib/commonjs/shared/providers/viewport.provider.js +0 -33
- package/lib/commonjs/shared/providers/viewport.provider.js.map +0 -1
- package/lib/module/shared/providers/viewport.provider.js +0 -27
- package/lib/module/shared/providers/viewport.provider.js.map +0 -1
- package/lib/typescript/shared/providers/viewport.provider.d.ts +0 -13
- package/lib/typescript/shared/providers/viewport.provider.d.ts.map +0 -1
- package/src/shared/providers/viewport.provider.tsx +0 -39
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useCallback } from "react";
|
|
4
|
+
import { useAnimatedReaction, useSharedValue } from "react-native-reanimated";
|
|
5
|
+
export const useDeferredMeasurementTrigger = params => {
|
|
6
|
+
const {
|
|
7
|
+
enabled,
|
|
8
|
+
isAnimating,
|
|
9
|
+
canFlush,
|
|
10
|
+
onFlush
|
|
11
|
+
} = params;
|
|
12
|
+
const hasPendingMeasurement = useSharedValue(false);
|
|
13
|
+
const clearPendingMeasurement = useCallback(() => {
|
|
14
|
+
"worklet";
|
|
15
|
+
|
|
16
|
+
hasPendingMeasurement.value = false;
|
|
17
|
+
}, [hasPendingMeasurement]);
|
|
18
|
+
const queueOrFlushMeasurement = useCallback(() => {
|
|
19
|
+
"worklet";
|
|
20
|
+
|
|
21
|
+
if (!enabled) return;
|
|
22
|
+
if (isAnimating.value) {
|
|
23
|
+
hasPendingMeasurement.value = true;
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
hasPendingMeasurement.value = false;
|
|
27
|
+
onFlush();
|
|
28
|
+
}, [enabled, isAnimating, hasPendingMeasurement, onFlush]);
|
|
29
|
+
useAnimatedReaction(() => {
|
|
30
|
+
"worklet";
|
|
31
|
+
|
|
32
|
+
if (!enabled) return false;
|
|
33
|
+
if (!hasPendingMeasurement.value) return false;
|
|
34
|
+
if (isAnimating.value) return false;
|
|
35
|
+
return canFlush ? canFlush() : true;
|
|
36
|
+
}, (shouldFlush, previousShouldFlush) => {
|
|
37
|
+
"worklet";
|
|
38
|
+
|
|
39
|
+
if (!enabled) return;
|
|
40
|
+
if (!shouldFlush || shouldFlush === previousShouldFlush) return;
|
|
41
|
+
hasPendingMeasurement.value = false;
|
|
42
|
+
onFlush();
|
|
43
|
+
}, [enabled, isAnimating, hasPendingMeasurement, canFlush, onFlush]);
|
|
44
|
+
return {
|
|
45
|
+
clearPendingMeasurement,
|
|
46
|
+
queueOrFlushMeasurement
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=use-deferred-measurement-trigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useAnimatedReaction","useSharedValue","useDeferredMeasurementTrigger","params","enabled","isAnimating","canFlush","onFlush","hasPendingMeasurement","clearPendingMeasurement","value","queueOrFlushMeasurement","shouldFlush","previousShouldFlush"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAECC,mBAAmB,EACnBC,cAAc,QACR,yBAAyB;AAEhC,OAAO,MAAMC,6BAA6B,GAAIC,MAK7C,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,WAAW;IAAEC,QAAQ;IAAEC;EAAQ,CAAC,GAAGJ,MAAM;EAC1D,MAAMK,qBAAqB,GAAGP,cAAc,CAAC,KAAK,CAAC;EAEnD,MAAMQ,uBAAuB,GAAGV,WAAW,CAAC,MAAM;IACjD,SAAS;;IACTS,qBAAqB,CAACE,KAAK,GAAG,KAAK;EACpC,CAAC,EAAE,CAACF,qBAAqB,CAAC,CAAC;EAE3B,MAAMG,uBAAuB,GAAGZ,WAAW,CAAC,MAAM;IACjD,SAAS;;IACT,IAAI,CAACK,OAAO,EAAE;IAEd,IAAIC,WAAW,CAACK,KAAK,EAAE;MACtBF,qBAAqB,CAACE,KAAK,GAAG,IAAI;MAClC;IACD;IAEAF,qBAAqB,CAACE,KAAK,GAAG,KAAK;IACnCH,OAAO,CAAC,CAAC;EACV,CAAC,EAAE,CAACH,OAAO,EAAEC,WAAW,EAAEG,qBAAqB,EAAED,OAAO,CAAC,CAAC;EAE1DP,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,IAAI,CAACI,OAAO,EAAE,OAAO,KAAK;IAC1B,IAAI,CAACI,qBAAqB,CAACE,KAAK,EAAE,OAAO,KAAK;IAC9C,IAAIL,WAAW,CAACK,KAAK,EAAE,OAAO,KAAK;IACnC,OAAOJ,QAAQ,GAAGA,QAAQ,CAAC,CAAC,GAAG,IAAI;EACpC,CAAC,EACD,CAACM,WAAW,EAAEC,mBAAmB,KAAK;IACrC,SAAS;;IACT,IAAI,CAACT,OAAO,EAAE;IACd,IAAI,CAACQ,WAAW,IAAIA,WAAW,KAAKC,mBAAmB,EAAE;IAEzDL,qBAAqB,CAACE,KAAK,GAAG,KAAK;IACnCH,OAAO,CAAC,CAAC;EACV,CAAC,EACD,CAACH,OAAO,EAAEC,WAAW,EAAEG,qBAAqB,EAAEF,QAAQ,EAAEC,OAAO,CAChE,CAAC;EAED,OAAO;IACNE,uBAAuB;IACvBE;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { useAnimatedReaction } from "react-native-reanimated";
|
|
4
4
|
import { BoundStore } from "../../../stores/bounds";
|
|
5
|
+
import { canFlushGroupActiveMeasurement, resolveGroupActiveMeasurementAction } from "./helpers/measurement-rules";
|
|
6
|
+
import { useDeferredMeasurementTrigger } from "./use-deferred-measurement-trigger";
|
|
7
|
+
|
|
5
8
|
/**
|
|
6
9
|
* Watches the group's active id in the BoundStore.
|
|
7
10
|
* When this boundary becomes the active member of its group,
|
|
@@ -20,6 +23,30 @@ export const useGroupActiveMeasurement = params => {
|
|
|
20
23
|
} = params;
|
|
21
24
|
const idStr = String(id);
|
|
22
25
|
const allGroups = BoundStore.getGroups();
|
|
26
|
+
const {
|
|
27
|
+
clearPendingMeasurement,
|
|
28
|
+
queueOrFlushMeasurement
|
|
29
|
+
} = useDeferredMeasurementTrigger({
|
|
30
|
+
enabled,
|
|
31
|
+
isAnimating,
|
|
32
|
+
canFlush: () => {
|
|
33
|
+
"worklet";
|
|
34
|
+
|
|
35
|
+
return canFlushGroupActiveMeasurement({
|
|
36
|
+
enabled,
|
|
37
|
+
isEligible: !!group && shouldUpdateDestination,
|
|
38
|
+
memberId: idStr,
|
|
39
|
+
activeId: group ? allGroups.value[group]?.activeId ?? null : null
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
onFlush: () => {
|
|
43
|
+
"worklet";
|
|
44
|
+
|
|
45
|
+
maybeMeasureAndStore({
|
|
46
|
+
intent: "refresh-destination"
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
23
50
|
useAnimatedReaction(() => {
|
|
24
51
|
"worklet";
|
|
25
52
|
|
|
@@ -29,14 +56,20 @@ export const useGroupActiveMeasurement = params => {
|
|
|
29
56
|
}, (activeId, previousActiveId) => {
|
|
30
57
|
"worklet";
|
|
31
58
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
59
|
+
const action = resolveGroupActiveMeasurementAction({
|
|
60
|
+
enabled,
|
|
61
|
+
isEligible: !!group && shouldUpdateDestination,
|
|
62
|
+
memberId: idStr,
|
|
63
|
+
activeId,
|
|
64
|
+
previousActiveId
|
|
65
|
+
});
|
|
66
|
+
if (action === "clear-pending") {
|
|
67
|
+
clearPendingMeasurement();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (action === "queue-or-flush") {
|
|
71
|
+
queueOrFlushMeasurement();
|
|
39
72
|
}
|
|
40
|
-
}, [enabled, group, idStr, shouldUpdateDestination,
|
|
73
|
+
}, [enabled, group, idStr, shouldUpdateDestination, clearPendingMeasurement, queueOrFlushMeasurement]);
|
|
41
74
|
};
|
|
42
75
|
//# sourceMappingURL=use-group-active-measurement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedReaction","BoundStore","useGroupActiveMeasurement","params","enabled","group","id","shouldUpdateDestination","isAnimating","maybeMeasureAndStore","idStr","String","allGroups","getGroups","
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","BoundStore","canFlushGroupActiveMeasurement","resolveGroupActiveMeasurementAction","useDeferredMeasurementTrigger","useGroupActiveMeasurement","params","enabled","group","id","shouldUpdateDestination","isAnimating","maybeMeasureAndStore","idStr","String","allGroups","getGroups","clearPendingMeasurement","queueOrFlushMeasurement","canFlush","isEligible","memberId","activeId","value","onFlush","intent","previousActiveId","action"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-group-active-measurement.ts"],"mappings":";;AAAA,SAA2BA,mBAAmB,QAAQ,yBAAyB;AAC/E,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,SACCC,8BAA8B,EAC9BC,mCAAmC,QAC7B,6BAA6B;AACpC,SAASC,6BAA6B,QAAQ,oCAAoC;;AAElF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAIC,MAOzC,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,KAAK;IACLC,EAAE;IACFC,uBAAuB;IACvBC,WAAW;IACXC;EACD,CAAC,GAAGN,MAAM;EACV,MAAMO,KAAK,GAAGC,MAAM,CAACL,EAAE,CAAC;EAExB,MAAMM,SAAS,GAAGd,UAAU,CAACe,SAAS,CAAC,CAAC;EACxC,MAAM;IAAEC,uBAAuB;IAAEC;EAAwB,CAAC,GACzDd,6BAA6B,CAAC;IAC7BG,OAAO;IACPI,WAAW;IACXQ,QAAQ,EAAEA,CAAA,KAAM;MACf,SAAS;;MACT,OAAOjB,8BAA8B,CAAC;QACrCK,OAAO;QACPa,UAAU,EAAE,CAAC,CAACZ,KAAK,IAAIE,uBAAuB;QAC9CW,QAAQ,EAAER,KAAK;QACfS,QAAQ,EAAEd,KAAK,GAAIO,SAAS,CAACQ,KAAK,CAACf,KAAK,CAAC,EAAEc,QAAQ,IAAI,IAAI,GAAI;MAChE,CAAC,CAAC;IACH,CAAC;IACDE,OAAO,EAAEA,CAAA,KAAM;MACd,SAAS;;MACTZ,oBAAoB,CAAC;QAAEa,MAAM,EAAE;MAAsB,CAAC,CAAC;IACxD;EACD,CAAC,CAAC;EAEHzB,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,IAAI,CAACO,OAAO,EAAE,OAAO,IAAI;IACzB,IAAI,CAACC,KAAK,EAAE,OAAO,IAAI;IACvB,OAAOO,SAAS,CAACQ,KAAK,CAACf,KAAK,CAAC,EAAEc,QAAQ,IAAI,IAAI;EAChD,CAAC,EACD,CAACA,QAAQ,EAAEI,gBAAgB,KAAK;IAC/B,SAAS;;IACT,MAAMC,MAAM,GAAGxB,mCAAmC,CAAC;MAClDI,OAAO;MACPa,UAAU,EAAE,CAAC,CAACZ,KAAK,IAAIE,uBAAuB;MAC9CW,QAAQ,EAAER,KAAK;MACfS,QAAQ;MACRI;IACD,CAAC,CAAC;IAEF,IAAIC,MAAM,KAAK,eAAe,EAAE;MAC/BV,uBAAuB,CAAC,CAAC;MACzB;IACD;IAEA,IAAIU,MAAM,KAAK,gBAAgB,EAAE;MAChCT,uBAAuB,CAAC,CAAC;IAC1B;EACD,CAAC,EACD,CACCX,OAAO,EACPC,KAAK,EACLK,KAAK,EACLH,uBAAuB,EACvBO,uBAAuB,EACvBC,uBAAuB,CAEzB,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useAnimatedReaction } from "react-native-reanimated";
|
|
4
|
+
import { BoundStore } from "../../../stores/bounds";
|
|
5
|
+
import { canFlushGroupActiveMeasurement, resolveGroupActiveMeasurementAction } from "./helpers/measurement-rules";
|
|
6
|
+
import { useDeferredMeasurementTrigger } from "./use-deferred-measurement-trigger";
|
|
7
|
+
export const useGroupActiveSourceMeasurement = params => {
|
|
8
|
+
const {
|
|
9
|
+
enabled,
|
|
10
|
+
group,
|
|
11
|
+
id,
|
|
12
|
+
hasNextScreen,
|
|
13
|
+
isAnimating,
|
|
14
|
+
maybeMeasureAndStore
|
|
15
|
+
} = params;
|
|
16
|
+
const idStr = String(id);
|
|
17
|
+
const allGroups = BoundStore.getGroups();
|
|
18
|
+
const {
|
|
19
|
+
clearPendingMeasurement,
|
|
20
|
+
queueOrFlushMeasurement
|
|
21
|
+
} = useDeferredMeasurementTrigger({
|
|
22
|
+
enabled,
|
|
23
|
+
isAnimating,
|
|
24
|
+
canFlush: () => {
|
|
25
|
+
"worklet";
|
|
26
|
+
|
|
27
|
+
return canFlushGroupActiveMeasurement({
|
|
28
|
+
enabled,
|
|
29
|
+
isEligible: !!group && hasNextScreen,
|
|
30
|
+
memberId: idStr,
|
|
31
|
+
activeId: group ? allGroups.value[group]?.activeId ?? null : null
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
onFlush: () => {
|
|
35
|
+
"worklet";
|
|
36
|
+
|
|
37
|
+
maybeMeasureAndStore({
|
|
38
|
+
intent: "refresh-source"
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
useAnimatedReaction(() => {
|
|
43
|
+
"worklet";
|
|
44
|
+
|
|
45
|
+
if (!enabled) return null;
|
|
46
|
+
if (!group) return null;
|
|
47
|
+
return allGroups.value[group]?.activeId ?? null;
|
|
48
|
+
}, (activeId, previousActiveId) => {
|
|
49
|
+
"worklet";
|
|
50
|
+
|
|
51
|
+
const action = resolveGroupActiveMeasurementAction({
|
|
52
|
+
enabled,
|
|
53
|
+
isEligible: !!group && hasNextScreen,
|
|
54
|
+
memberId: idStr,
|
|
55
|
+
activeId,
|
|
56
|
+
previousActiveId
|
|
57
|
+
});
|
|
58
|
+
if (action === "clear-pending") {
|
|
59
|
+
clearPendingMeasurement();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (action === "queue-or-flush") {
|
|
63
|
+
queueOrFlushMeasurement();
|
|
64
|
+
}
|
|
65
|
+
}, [enabled, group, idStr, hasNextScreen, clearPendingMeasurement, queueOrFlushMeasurement]);
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=use-group-active-source-measurement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","BoundStore","canFlushGroupActiveMeasurement","resolveGroupActiveMeasurementAction","useDeferredMeasurementTrigger","useGroupActiveSourceMeasurement","params","enabled","group","id","hasNextScreen","isAnimating","maybeMeasureAndStore","idStr","String","allGroups","getGroups","clearPendingMeasurement","queueOrFlushMeasurement","canFlush","isEligible","memberId","activeId","value","onFlush","intent","previousActiveId","action"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-group-active-source-measurement.ts"],"mappings":";;AAAA,SAA2BA,mBAAmB,QAAQ,yBAAyB;AAC/E,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,SACCC,8BAA8B,EAC9BC,mCAAmC,QAC7B,6BAA6B;AACpC,SAASC,6BAA6B,QAAQ,oCAAoC;AAElF,OAAO,MAAMC,+BAA+B,GAAIC,MAO/C,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,KAAK;IACLC,EAAE;IACFC,aAAa;IACbC,WAAW;IACXC;EACD,CAAC,GAAGN,MAAM;EACV,MAAMO,KAAK,GAAGC,MAAM,CAACL,EAAE,CAAC;EACxB,MAAMM,SAAS,GAAGd,UAAU,CAACe,SAAS,CAAC,CAAC;EACxC,MAAM;IAAEC,uBAAuB;IAAEC;EAAwB,CAAC,GACzDd,6BAA6B,CAAC;IAC7BG,OAAO;IACPI,WAAW;IACXQ,QAAQ,EAAEA,CAAA,KAAM;MACf,SAAS;;MACT,OAAOjB,8BAA8B,CAAC;QACrCK,OAAO;QACPa,UAAU,EAAE,CAAC,CAACZ,KAAK,IAAIE,aAAa;QACpCW,QAAQ,EAAER,KAAK;QACfS,QAAQ,EAAEd,KAAK,GAAIO,SAAS,CAACQ,KAAK,CAACf,KAAK,CAAC,EAAEc,QAAQ,IAAI,IAAI,GAAI;MAChE,CAAC,CAAC;IACH,CAAC;IACDE,OAAO,EAAEA,CAAA,KAAM;MACd,SAAS;;MACTZ,oBAAoB,CAAC;QAAEa,MAAM,EAAE;MAAiB,CAAC,CAAC;IACnD;EACD,CAAC,CAAC;EAEHzB,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,IAAI,CAACO,OAAO,EAAE,OAAO,IAAI;IACzB,IAAI,CAACC,KAAK,EAAE,OAAO,IAAI;IACvB,OAAOO,SAAS,CAACQ,KAAK,CAACf,KAAK,CAAC,EAAEc,QAAQ,IAAI,IAAI;EAChD,CAAC,EACD,CAACA,QAAQ,EAAEI,gBAAgB,KAAK;IAC/B,SAAS;;IACT,MAAMC,MAAM,GAAGxB,mCAAmC,CAAC;MAClDI,OAAO;MACPa,UAAU,EAAE,CAAC,CAACZ,KAAK,IAAIE,aAAa;MACpCW,QAAQ,EAAER,KAAK;MACfS,QAAQ;MACRI;IACD,CAAC,CAAC;IAEF,IAAIC,MAAM,KAAK,eAAe,EAAE;MAC/BV,uBAAuB,CAAC,CAAC;MACzB;IACD;IAEA,IAAIU,MAAM,KAAK,gBAAgB,EAAE;MAChCT,uBAAuB,CAAC,CAAC;IAC1B;EACD,CAAC,EACD,CACCX,OAAO,EACPC,KAAK,EACLK,KAAK,EACLH,aAAa,EACbO,uBAAuB,EACvBC,uBAAuB,CAEzB,CAAC;AACF,CAAC","ignoreList":[]}
|
package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js
CHANGED
|
@@ -5,6 +5,7 @@ import { runOnUI, useSharedValue } from "react-native-reanimated";
|
|
|
5
5
|
import { AnimationStore } from "../../../stores/animation.store";
|
|
6
6
|
import { BoundStore } from "../../../stores/bounds";
|
|
7
7
|
import { resolvePendingSourceKey } from "../helpers/resolve-pending-source-key";
|
|
8
|
+
import { resolveInitialLayoutMeasurementIntent } from "./helpers/measurement-rules";
|
|
8
9
|
export const useInitialLayoutHandler = params => {
|
|
9
10
|
const {
|
|
10
11
|
enabled,
|
|
@@ -29,15 +30,23 @@ export const useInitialLayoutHandler = params => {
|
|
|
29
30
|
break;
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
let hasPendingLinkFromSource = false;
|
|
34
|
+
if (isAnyAnimating) {
|
|
35
|
+
const resolvedSourceKey = resolvePendingSourceKey(sharedBoundTag, expectedSourceScreenKey);
|
|
36
|
+
if (resolvedSourceKey && BoundStore.hasPendingLinkFromSource(sharedBoundTag, resolvedSourceKey)) {
|
|
37
|
+
hasPendingLinkFromSource = true;
|
|
38
|
+
}
|
|
37
39
|
}
|
|
40
|
+
const intent = resolveInitialLayoutMeasurementIntent({
|
|
41
|
+
enabled,
|
|
42
|
+
hasSharedBoundTag: !!sharedBoundTag,
|
|
43
|
+
hasMeasuredOnLayout: hasMeasuredOnLayout.get(),
|
|
44
|
+
isAnyAnimating: !!isAnyAnimating,
|
|
45
|
+
hasPendingLinkFromSource
|
|
46
|
+
});
|
|
47
|
+
if (!intent) return;
|
|
38
48
|
maybeMeasureAndStore({
|
|
39
|
-
|
|
40
|
-
shouldSetDestination: true
|
|
49
|
+
intent
|
|
41
50
|
});
|
|
42
51
|
hasMeasuredOnLayout.set(true);
|
|
43
52
|
}, [enabled, sharedBoundTag, hasMeasuredOnLayout, isAnimating, ancestorAnimations, maybeMeasureAndStore, expectedSourceScreenKey]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useLayoutEffect","runOnUI","useSharedValue","AnimationStore","BoundStore","resolvePendingSourceKey","useInitialLayoutHandler","params","enabled","sharedBoundTag","currentScreenKey","ancestorKeys","expectedSourceScreenKey","maybeMeasureAndStore","isAnimating","getRouteAnimation","ancestorAnimations","map","key","hasMeasuredOnLayout","handleInitialLayout","get","isAnyAnimating","i","length","
|
|
1
|
+
{"version":3,"names":["useCallback","useLayoutEffect","runOnUI","useSharedValue","AnimationStore","BoundStore","resolvePendingSourceKey","resolveInitialLayoutMeasurementIntent","useInitialLayoutHandler","params","enabled","sharedBoundTag","currentScreenKey","ancestorKeys","expectedSourceScreenKey","maybeMeasureAndStore","isAnimating","getRouteAnimation","ancestorAnimations","map","key","hasMeasuredOnLayout","handleInitialLayout","get","isAnyAnimating","i","length","hasPendingLinkFromSource","resolvedSourceKey","intent","hasSharedBoundTag","set"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,eAAe,QAAQ,OAAO;AACpD,SAASC,OAAO,EAAEC,cAAc,QAAQ,yBAAyB;AACjE,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,uBAAuB,QAAQ,uCAAuC;AAE/E,SAASC,qCAAqC,QAAQ,6BAA6B;AAEnF,OAAO,MAAMC,uBAAuB,GAAIC,MAOvC,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,cAAc;IACdC,gBAAgB;IAChBC,YAAY;IACZC,uBAAuB;IACvBC;EACD,CAAC,GAAGN,MAAM;EAEV,MAAMO,WAAW,GAAGZ,cAAc,CAACa,iBAAiB,CACnDL,gBAAgB,EAChB,WACD,CAAC;EAED,MAAMM,kBAAkB,GAAGL,YAAY,CAACM,GAAG,CAAEC,GAAG,IAC/ChB,cAAc,CAACa,iBAAiB,CAACG,GAAG,EAAE,WAAW,CAClD,CAAC;EAED,MAAMC,mBAAmB,GAAGlB,cAAc,CAAC,KAAK,CAAC;EAEjD,MAAMmB,mBAAmB,GAAGtB,WAAW,CAAC,MAAM;IAC7C,SAAS;;IACT,IAAI,CAACU,OAAO,EAAE;IACd,IAAI,CAACC,cAAc,IAAIU,mBAAmB,CAACE,GAAG,CAAC,CAAC,EAAE;IAElD,IAAIC,cAAc,GAAGR,WAAW,CAACO,GAAG,CAAC,CAAC;IACtC,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGP,kBAAkB,CAACQ,MAAM,EAAED,CAAC,EAAE,EAAE;MACnD,IAAIP,kBAAkB,CAACO,CAAC,CAAC,CAACF,GAAG,CAAC,CAAC,EAAE;QAChCC,cAAc,GAAG,CAAC;QAClB;MACD;IACD;IAEA,IAAIG,wBAAwB,GAAG,KAAK;IAEpC,IAAIH,cAAc,EAAE;MACnB,MAAMI,iBAAiB,GAAGtB,uBAAuB,CAChDK,cAAc,EACdG,uBACD,CAAC;MACD,IACCc,iBAAiB,IACjBvB,UAAU,CAACsB,wBAAwB,CAAChB,cAAc,EAAEiB,iBAAiB,CAAC,EACrE;QACDD,wBAAwB,GAAG,IAAI;MAChC;IACD;IAEA,MAAME,MAAM,GAAGtB,qCAAqC,CAAC;MACpDG,OAAO;MACPoB,iBAAiB,EAAE,CAAC,CAACnB,cAAc;MACnCU,mBAAmB,EAAEA,mBAAmB,CAACE,GAAG,CAAC,CAAC;MAC9CC,cAAc,EAAE,CAAC,CAACA,cAAc;MAChCG;IACD,CAAC,CAAC;IACF,IAAI,CAACE,MAAM,EAAE;IAEbd,oBAAoB,CAAC;MACpBc;IACD,CAAC,CAAC;IAEFR,mBAAmB,CAACU,GAAG,CAAC,IAAI,CAAC;EAC9B,CAAC,EAAE,CACFrB,OAAO,EACPC,cAAc,EACdU,mBAAmB,EACnBL,WAAW,EACXE,kBAAkB,EAClBH,oBAAoB,EACpBD,uBAAuB,CACvB,CAAC;;EAEF;EACA;EACAb,eAAe,CAAC,MAAM;IACrB,IAAI,CAACS,OAAO,EAAE;IACdR,OAAO,CAACoB,mBAAmB,CAAC,CAAC,CAAC;EAC/B,CAAC,EAAE,CAACZ,OAAO,EAAEY,mBAAmB,CAAC,CAAC;AACnC,CAAC","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { useAnimatedReaction } from "react-native-reanimated";
|
|
4
4
|
import { BoundStore } from "../../../stores/bounds";
|
|
5
5
|
import { resolvePendingSourceKey } from "../helpers/resolve-pending-source-key";
|
|
6
|
+
import { resolvePendingDestinationCaptureSignal } from "./helpers/measurement-rules";
|
|
6
7
|
export const usePendingDestinationMeasurement = params => {
|
|
7
8
|
const {
|
|
8
9
|
sharedBoundTag,
|
|
@@ -13,10 +14,12 @@ export const usePendingDestinationMeasurement = params => {
|
|
|
13
14
|
useAnimatedReaction(() => {
|
|
14
15
|
"worklet";
|
|
15
16
|
|
|
16
|
-
if (!enabled) return 0;
|
|
17
17
|
const resolvedSourceKey = resolvePendingSourceKey(sharedBoundTag, expectedSourceScreenKey);
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
return resolvePendingDestinationCaptureSignal({
|
|
19
|
+
enabled,
|
|
20
|
+
resolvedSourceKey,
|
|
21
|
+
hasPendingLinkFromSource: resolvedSourceKey ? BoundStore.hasPendingLinkFromSource(sharedBoundTag, resolvedSourceKey) : false
|
|
22
|
+
});
|
|
20
23
|
}, (captureSignal, previousCaptureSignal) => {
|
|
21
24
|
"worklet";
|
|
22
25
|
|
|
@@ -25,7 +28,7 @@ export const usePendingDestinationMeasurement = params => {
|
|
|
25
28
|
return;
|
|
26
29
|
}
|
|
27
30
|
maybeMeasureAndStore({
|
|
28
|
-
|
|
31
|
+
intent: "complete-destination"
|
|
29
32
|
});
|
|
30
33
|
}, [enabled, sharedBoundTag, expectedSourceScreenKey, maybeMeasureAndStore]);
|
|
31
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedReaction","BoundStore","resolvePendingSourceKey","usePendingDestinationMeasurement","params","sharedBoundTag","enabled","expectedSourceScreenKey","maybeMeasureAndStore","resolvedSourceKey","hasPendingLinkFromSource","captureSignal","previousCaptureSignal","
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","BoundStore","resolvePendingSourceKey","resolvePendingDestinationCaptureSignal","usePendingDestinationMeasurement","params","sharedBoundTag","enabled","expectedSourceScreenKey","maybeMeasureAndStore","resolvedSourceKey","hasPendingLinkFromSource","captureSignal","previousCaptureSignal","intent"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,uBAAuB,QAAQ,uCAAuC;AAE/E,SAASC,sCAAsC,QAAQ,6BAA6B;AAEpF,OAAO,MAAMC,gCAAgC,GAAIC,MAKhD,IAAK;EACL,MAAM;IACLC,cAAc;IACdC,OAAO;IACPC,uBAAuB;IACvBC;EACD,CAAC,GAAGJ,MAAM;EAEVL,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,MAAMU,iBAAiB,GAAGR,uBAAuB,CAChDI,cAAc,EACdE,uBACD,CAAC;IACD,OAAOL,sCAAsC,CAAC;MAC7CI,OAAO;MACPG,iBAAiB;MACjBC,wBAAwB,EAAED,iBAAiB,GACxCT,UAAU,CAACU,wBAAwB,CACnCL,cAAc,EACdI,iBACD,CAAC,GACA;IACJ,CAAC,CAAC;EACH,CAAC,EACD,CAACE,aAAa,EAAEC,qBAAqB,KAAK;IACzC,SAAS;;IACT,IAAI,CAACN,OAAO,EAAE;IACd,IAAI,CAACK,aAAa,IAAIA,aAAa,KAAKC,qBAAqB,EAAE;MAC9D;IACD;IAEAJ,oBAAoB,CAAC;MAAEK,MAAM,EAAE;IAAuB,CAAC,CAAC;EACzD,CAAC,EACD,CAACP,OAAO,EAAED,cAAc,EAAEE,uBAAuB,EAAEC,oBAAoB,CACxE,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { useAnimatedReaction, useSharedValue } from "react-native-reanimated";
|
|
4
4
|
import { BoundStore } from "../../../stores/bounds";
|
|
5
5
|
import { resolvePendingSourceKey } from "../helpers/resolve-pending-source-key";
|
|
6
|
+
import { resolvePendingDestinationRetrySignal } from "./helpers/measurement-rules";
|
|
6
7
|
export const usePendingDestinationRetryMeasurement = params => {
|
|
7
8
|
const {
|
|
8
9
|
sharedBoundTag,
|
|
@@ -20,21 +21,19 @@ export const usePendingDestinationRetryMeasurement = params => {
|
|
|
20
21
|
useAnimatedReaction(() => {
|
|
21
22
|
"worklet";
|
|
22
23
|
|
|
23
|
-
if (!enabled) return 0;
|
|
24
|
-
if (retryCount.get() >= MAX_RETRIES) return 0;
|
|
25
|
-
if (!animating.get()) return 0;
|
|
26
|
-
if (BoundStore.hasDestinationLink(sharedBoundTag, currentScreenKey)) return 0;
|
|
27
|
-
const currentProgress = progress.get();
|
|
28
|
-
if (currentProgress <= 0 || currentProgress >= RETRY_PROGRESS_MAX) {
|
|
29
|
-
return 0;
|
|
30
|
-
}
|
|
31
24
|
const resolvedSourceKey = resolvePendingSourceKey(sharedBoundTag, expectedSourceScreenKey);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
return resolvePendingDestinationRetrySignal({
|
|
26
|
+
enabled,
|
|
27
|
+
retryCount: retryCount.get(),
|
|
28
|
+
maxRetries: MAX_RETRIES,
|
|
29
|
+
isAnimating: !!animating.get(),
|
|
30
|
+
hasDestinationLink: BoundStore.hasDestinationLink(sharedBoundTag, currentScreenKey),
|
|
31
|
+
progress: progress.get(),
|
|
32
|
+
retryProgressMax: RETRY_PROGRESS_MAX,
|
|
33
|
+
retryProgressBuckets: RETRY_PROGRESS_BUCKETS,
|
|
34
|
+
resolvedSourceKey,
|
|
35
|
+
hasPendingLinkFromSource: resolvedSourceKey ? BoundStore.hasPendingLinkFromSource(sharedBoundTag, resolvedSourceKey) : false
|
|
36
|
+
});
|
|
38
37
|
}, captureSignal => {
|
|
39
38
|
"worklet";
|
|
40
39
|
|
|
@@ -46,7 +45,7 @@ export const usePendingDestinationRetryMeasurement = params => {
|
|
|
46
45
|
if (retryCount.get() >= MAX_RETRIES) return;
|
|
47
46
|
retryCount.set(retryCount.get() + 1);
|
|
48
47
|
maybeMeasureAndStore({
|
|
49
|
-
|
|
48
|
+
intent: "complete-destination"
|
|
50
49
|
});
|
|
51
50
|
}, [enabled, sharedBoundTag, currentScreenKey, expectedSourceScreenKey, progress, animating, maybeMeasureAndStore, retryCount]);
|
|
52
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedReaction","useSharedValue","BoundStore","resolvePendingSourceKey","usePendingDestinationRetryMeasurement","params","sharedBoundTag","enabled","currentScreenKey","expectedSourceScreenKey","progress","animating","maybeMeasureAndStore","retryCount","MAX_RETRIES","RETRY_PROGRESS_BUCKETS","RETRY_PROGRESS_MAX","
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","useSharedValue","BoundStore","resolvePendingSourceKey","resolvePendingDestinationRetrySignal","usePendingDestinationRetryMeasurement","params","sharedBoundTag","enabled","currentScreenKey","expectedSourceScreenKey","progress","animating","maybeMeasureAndStore","retryCount","MAX_RETRIES","RETRY_PROGRESS_BUCKETS","RETRY_PROGRESS_MAX","resolvedSourceKey","get","maxRetries","isAnimating","hasDestinationLink","retryProgressMax","retryProgressBuckets","hasPendingLinkFromSource","captureSignal","set","intent"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.ts"],"mappings":";;AAAA,SAECA,mBAAmB,EACnBC,cAAc,QACR,yBAAyB;AAChC,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,uBAAuB,QAAQ,uCAAuC;AAE/E,SAASC,oCAAoC,QAAQ,6BAA6B;AAElF,OAAO,MAAMC,qCAAqC,GAAIC,MAQrD,IAAK;EACL,MAAM;IACLC,cAAc;IACdC,OAAO;IACPC,gBAAgB;IAChBC,uBAAuB;IACvBC,QAAQ;IACRC,SAAS;IACTC;EACD,CAAC,GAAGP,MAAM;EAEV,MAAMQ,UAAU,GAAGb,cAAc,CAAC,CAAC,CAAC;EACpC,MAAMc,WAAW,GAAG,CAAC;EACrB,MAAMC,sBAAsB,GAAG,CAAC;EAChC,MAAMC,kBAAkB,GAAG,IAAI;EAE/BjB,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,MAAMkB,iBAAiB,GAAGf,uBAAuB,CAChDI,cAAc,EACdG,uBACD,CAAC;IACD,OAAON,oCAAoC,CAAC;MAC3CI,OAAO;MACPM,UAAU,EAAEA,UAAU,CAACK,GAAG,CAAC,CAAC;MAC5BC,UAAU,EAAEL,WAAW;MACvBM,WAAW,EAAE,CAAC,CAACT,SAAS,CAACO,GAAG,CAAC,CAAC;MAC9BG,kBAAkB,EAAEpB,UAAU,CAACoB,kBAAkB,CAChDf,cAAc,EACdE,gBACD,CAAC;MACDE,QAAQ,EAAEA,QAAQ,CAACQ,GAAG,CAAC,CAAC;MACxBI,gBAAgB,EAAEN,kBAAkB;MACpCO,oBAAoB,EAAER,sBAAsB;MAC5CE,iBAAiB;MACjBO,wBAAwB,EAAEP,iBAAiB,GACxChB,UAAU,CAACuB,wBAAwB,CACnClB,cAAc,EACdW,iBACD,CAAC,GACA;IACJ,CAAC,CAAC;EACH,CAAC,EACAQ,aAAa,IAAK;IAClB,SAAS;;IACT,IAAI,CAAClB,OAAO,EAAE;IACd,IAAI,CAACkB,aAAa,EAAE;MACnBZ,UAAU,CAACa,GAAG,CAAC,CAAC,CAAC;MACjB;IACD;IAEA,IAAIb,UAAU,CAACK,GAAG,CAAC,CAAC,IAAIJ,WAAW,EAAE;IACrCD,UAAU,CAACa,GAAG,CAACb,UAAU,CAACK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IACpCN,oBAAoB,CAAC;MAAEe,MAAM,EAAE;IAAuB,CAAC,CAAC;EACzD,CAAC,EACD,CACCpB,OAAO,EACPD,cAAc,EACdE,gBAAgB,EAChBC,uBAAuB,EACvBC,QAAQ,EACRC,SAAS,EACTC,oBAAoB,EACpBC,UAAU,CAEZ,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { useAnimatedReaction } from "react-native-reanimated";
|
|
4
4
|
import { useScrollSettleContext } from "../../../providers/scroll-settle.provider";
|
|
5
|
+
import { shouldTriggerScrollSettledRefresh } from "./helpers/measurement-rules";
|
|
6
|
+
import { useDeferredMeasurementTrigger } from "./use-deferred-measurement-trigger";
|
|
5
7
|
export const useScrollSettledMeasurement = params => {
|
|
6
8
|
const {
|
|
7
9
|
enabled,
|
|
@@ -12,19 +14,35 @@ export const useScrollSettledMeasurement = params => {
|
|
|
12
14
|
} = params;
|
|
13
15
|
const scrollSettle = useScrollSettleContext();
|
|
14
16
|
const settledSignal = scrollSettle?.settledSignal;
|
|
17
|
+
const {
|
|
18
|
+
queueOrFlushMeasurement
|
|
19
|
+
} = useDeferredMeasurementTrigger({
|
|
20
|
+
enabled,
|
|
21
|
+
isAnimating,
|
|
22
|
+
onFlush: () => {
|
|
23
|
+
"worklet";
|
|
24
|
+
|
|
25
|
+
maybeMeasureAndStore({
|
|
26
|
+
intent: "refresh-source"
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
15
30
|
useAnimatedReaction(() => settledSignal?.value ?? 0, (signal, previousSignal) => {
|
|
16
31
|
"worklet";
|
|
17
32
|
|
|
18
|
-
if (!
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
33
|
+
if (!shouldTriggerScrollSettledRefresh({
|
|
34
|
+
enabled,
|
|
35
|
+
group,
|
|
36
|
+
hasNextScreen,
|
|
37
|
+
hasSettledSignal: !!settledSignal,
|
|
38
|
+
signal,
|
|
39
|
+
previousSignal
|
|
40
|
+
})) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
23
43
|
// Re-measure source bounds after scroll settles while idle.
|
|
24
44
|
// This captures post-scroll positions before close transition starts.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
28
|
-
}, [enabled, group, hasNextScreen, settledSignal, isAnimating, maybeMeasureAndStore]);
|
|
45
|
+
queueOrFlushMeasurement();
|
|
46
|
+
}, [enabled, group, hasNextScreen, settledSignal, queueOrFlushMeasurement]);
|
|
29
47
|
};
|
|
30
48
|
//# sourceMappingURL=use-scroll-settled-measurement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedReaction","useScrollSettleContext","useScrollSettledMeasurement","params","enabled","group","hasNextScreen","isAnimating","maybeMeasureAndStore","scrollSettle","settledSignal","value","signal","previousSignal","
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","useScrollSettleContext","shouldTriggerScrollSettledRefresh","useDeferredMeasurementTrigger","useScrollSettledMeasurement","params","enabled","group","hasNextScreen","isAnimating","maybeMeasureAndStore","scrollSettle","settledSignal","queueOrFlushMeasurement","onFlush","intent","value","signal","previousSignal","hasSettledSignal"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.ts"],"mappings":";;AAAA,SAA2BA,mBAAmB,QAAQ,yBAAyB;AAC/E,SAASC,sBAAsB,QAAQ,2CAA2C;AAElF,SAASC,iCAAiC,QAAQ,6BAA6B;AAC/E,SAASC,6BAA6B,QAAQ,oCAAoC;AAElF,OAAO,MAAMC,2BAA2B,GAAIC,MAM3C,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,KAAK;IAAEC,aAAa;IAAEC,WAAW;IAAEC;EAAqB,CAAC,GACzEL,MAAM;EACP,MAAMM,YAAY,GAAGV,sBAAsB,CAAC,CAAC;EAC7C,MAAMW,aAAa,GAAGD,YAAY,EAAEC,aAAa;EACjD,MAAM;IAAEC;EAAwB,CAAC,GAAGV,6BAA6B,CAAC;IACjEG,OAAO;IACPG,WAAW;IACXK,OAAO,EAAEA,CAAA,KAAM;MACd,SAAS;;MACTJ,oBAAoB,CAAC;QAAEK,MAAM,EAAE;MAAiB,CAAC,CAAC;IACnD;EACD,CAAC,CAAC;EAEFf,mBAAmB,CAClB,MAAMY,aAAa,EAAEI,KAAK,IAAI,CAAC,EAC/B,CAACC,MAAM,EAAEC,cAAc,KAAK;IAC3B,SAAS;;IACT,IACC,CAAChB,iCAAiC,CAAC;MAClCI,OAAO;MACPC,KAAK;MACLC,aAAa;MACbW,gBAAgB,EAAE,CAAC,CAACP,aAAa;MACjCK,MAAM;MACNC;IACD,CAAC,CAAC,EACD;MACD;IACD;IACA;IACA;IACAL,uBAAuB,CAAC,CAAC;EAC1B,CAAC,EACD,CAACP,OAAO,EAAEC,KAAK,EAAEC,aAAa,EAAEI,aAAa,EAAEC,uBAAuB,CACvE,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -13,19 +13,23 @@ import { useAutoSourceMeasurement } from "./hooks/use-auto-source-measurement";
|
|
|
13
13
|
import { useBoundaryMeasureAndStore } from "./hooks/use-boundary-measure-and-store";
|
|
14
14
|
import { useBoundaryPresence } from "./hooks/use-boundary-presence";
|
|
15
15
|
import { useGroupActiveMeasurement } from "./hooks/use-group-active-measurement";
|
|
16
|
+
import { useGroupActiveSourceMeasurement } from "./hooks/use-group-active-source-measurement";
|
|
16
17
|
import { useInitialLayoutHandler } from "./hooks/use-initial-layout-handler";
|
|
17
18
|
import { usePendingDestinationMeasurement } from "./hooks/use-pending-destination-measurement";
|
|
18
19
|
import { usePendingDestinationRetryMeasurement } from "./hooks/use-pending-destination-retry-measurement";
|
|
19
20
|
import { useScrollSettledMeasurement } from "./hooks/use-scroll-settled-measurement";
|
|
20
21
|
import { buildBoundaryMatchKey } from "./utils/build-boundary-match-key";
|
|
21
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
-
const
|
|
23
|
+
const setGroupSelectionOnUI = (group, id) => {
|
|
23
24
|
"worklet";
|
|
24
25
|
|
|
25
26
|
BoundStore.setGroupActiveId(group, id);
|
|
26
27
|
};
|
|
27
|
-
export function createBoundaryComponent(Wrapped) {
|
|
28
|
-
const
|
|
28
|
+
export function createBoundaryComponent(Wrapped, options = {}) {
|
|
29
|
+
const {
|
|
30
|
+
alreadyAnimated = false
|
|
31
|
+
} = options;
|
|
32
|
+
const AnimatedComponent = alreadyAnimated ? Wrapped : Animated.createAnimatedComponent(Wrapped);
|
|
29
33
|
const Inner = /*#__PURE__*/forwardRef((props, _ref) => {
|
|
30
34
|
const {
|
|
31
35
|
enabled = true,
|
|
@@ -146,6 +150,18 @@ export function createBoundaryComponent(Wrapped) {
|
|
|
146
150
|
maybeMeasureAndStore
|
|
147
151
|
});
|
|
148
152
|
|
|
153
|
+
// Source-side analog for grouped retargeting: when an unfocused/source
|
|
154
|
+
// boundary becomes the active member, refresh its snapshot (and source
|
|
155
|
+
// link when one exists) so close transitions don't use stale geometry.
|
|
156
|
+
useGroupActiveSourceMeasurement({
|
|
157
|
+
enabled: runtimeEnabled,
|
|
158
|
+
group,
|
|
159
|
+
id,
|
|
160
|
+
hasNextScreen,
|
|
161
|
+
isAnimating,
|
|
162
|
+
maybeMeasureAndStore
|
|
163
|
+
});
|
|
164
|
+
|
|
149
165
|
// While idle on source screens, re-measure after scroll settles so a later
|
|
150
166
|
// close transition starts from up-to-date source geometry.
|
|
151
167
|
useScrollSettledMeasurement({
|
|
@@ -169,10 +185,10 @@ export function createBoundaryComponent(Wrapped) {
|
|
|
169
185
|
const handlePress = useCallback((...args) => {
|
|
170
186
|
// Press path has priority: capture source before user onPress/navigation.
|
|
171
187
|
if (group) {
|
|
172
|
-
runOnUI(
|
|
188
|
+
runOnUI(setGroupSelectionOnUI)(group, String(id));
|
|
173
189
|
}
|
|
174
190
|
runOnUI(maybeMeasureAndStore)({
|
|
175
|
-
|
|
191
|
+
intent: "capture-source"
|
|
176
192
|
});
|
|
177
193
|
if (typeof onPress === "function") {
|
|
178
194
|
onPress(...args);
|
|
@@ -217,8 +233,6 @@ export const Boundary = {
|
|
|
217
233
|
/** Passive boundary wrapper (no built-in press semantics). */
|
|
218
234
|
View: BoundaryView,
|
|
219
235
|
/** Pressable boundary wrapper with press-priority source capture. */
|
|
220
|
-
Pressable: BoundaryPressable
|
|
221
|
-
/** Factory for custom boundary wrappers. */
|
|
222
|
-
createBoundaryComponent
|
|
236
|
+
Pressable: BoundaryPressable
|
|
223
237
|
};
|
|
224
238
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","memo","useCallback","useMemo","Pressable","View","RNView","Animated","runOnUI","useAnimatedRef","useAssociatedStyles","useLayoutAnchorContext","useDescriptorDerivations","AnimationStore","BoundStore","prepareStyleForBounds","useAutoSourceMeasurement","useBoundaryMeasureAndStore","useBoundaryPresence","useGroupActiveMeasurement","useInitialLayoutHandler","usePendingDestinationMeasurement","usePendingDestinationRetryMeasurement","useScrollSettledMeasurement","buildBoundaryMatchKey","jsx","_jsx","
|
|
1
|
+
{"version":3,"names":["forwardRef","memo","useCallback","useMemo","Pressable","View","RNView","Animated","runOnUI","useAnimatedRef","useAssociatedStyles","useLayoutAnchorContext","useDescriptorDerivations","AnimationStore","BoundStore","prepareStyleForBounds","useAutoSourceMeasurement","useBoundaryMeasureAndStore","useBoundaryPresence","useGroupActiveMeasurement","useGroupActiveSourceMeasurement","useInitialLayoutHandler","usePendingDestinationMeasurement","usePendingDestinationRetryMeasurement","useScrollSettledMeasurement","buildBoundaryMatchKey","jsx","_jsx","setGroupSelectionOnUI","group","id","setGroupActiveId","createBoundaryComponent","Wrapped","options","alreadyAnimated","AnimatedComponent","createAnimatedComponent","Inner","props","_ref","enabled","anchor","scaleMode","target","method","style","onPress","rest","sharedBoundTag","animatedRef","previousScreenKey","preferredSourceScreenKey","currentScreenKey","nextScreenKey","ancestorKeys","navigatorKey","ancestorNavigatorKeys","hasConfiguredInterpolator","runtimeEnabled","hasNextScreen","shouldUpdateDestination","layoutAnchor","boundaryConfig","undefined","isAnimating","getRouteAnimation","progress","preparedStyles","associatedStyles","resetTransformOnUnset","waitForFirstResolvedStyle","maybeMeasureAndStore","shouldRunDestinationEffects","expectedSourceScreenKey","animating","handlePress","args","String","intent","resolvedOnPress","ref","collapsable","BoundaryView","displayName","BoundaryPressable","Boundary"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/index.tsx"],"mappings":";;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EA;AACA,MAAM6C,YAAY,GAAGnD,uBAAuB,CAAC1B,MAAM,CAAC;AACpD6E,YAAY,CAACC,WAAW,GAAG,0BAA0B;AAErD,MAAMC,iBAAiB,GAAGrD,uBAAuB,CAAC5B,SAAS,CAAC;AAC5DiF,iBAAiB,CAACD,WAAW,GAAG,+BAA+B;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,QAAQ,GAAG;EACvB;EACAjF,IAAI,EAAE8E,YAAY;EAClB;EACA/E,SAAS,EAAEiF;AACZ,CAAC","ignoreList":[]}
|
|
@@ -12,9 +12,10 @@ import { ScrollSettleProvider } from "../providers/scroll-settle.provider";
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
export function createTransitionAwareComponent(Wrapped, options = {}) {
|
|
14
14
|
const {
|
|
15
|
-
isScrollable = false
|
|
15
|
+
isScrollable = false,
|
|
16
|
+
alreadyAnimated = false
|
|
16
17
|
} = options;
|
|
17
|
-
const AnimatedComponent = Animated.createAnimatedComponent(Wrapped);
|
|
18
|
+
const AnimatedComponent = alreadyAnimated ? Wrapped : Animated.createAnimatedComponent(Wrapped);
|
|
18
19
|
const ScrollableInner = /*#__PURE__*/forwardRef((props, ref) => {
|
|
19
20
|
const {
|
|
20
21
|
remeasureOnFocus: _remeasureOnFocus,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","memo","useCallback","GestureDetector","Animated","runOnUI","useAnimatedRef","useComposedEventHandler","useSharedValue","useAssociatedStyles","useScrollRegistry","RegisterBoundsProvider","ScrollSettleProvider","jsx","_jsx","createTransitionAwareComponent","Wrapped","options","isScrollable","AnimatedComponent","createAnimatedComponent","ScrollableInner","props","ref","remeasureOnFocus","_remeasureOnFocus","onScroll","userOnScroll","onMomentumScrollEnd","userOnMomentumScrollEnd","onScrollEndDrag","userOnScrollEndDrag","scrollableProps","settledSignal","emitScrollSettled","value","scrollDirection","horizontal","scrollHandler","onContentSizeChange","onLayout","nativeGesture","direction","composedScrollHandler","handleMomentumScrollEnd","event","handleScrollEndDrag","velocityX","Math","abs","nativeEvent","velocity","x","velocityY","y","scrollableComponent","scrollEventThrottle","children","gesture","Inner","_","style","sharedBoundTag","styleId","onPress","rest","animatedRef","associatedStyles","associatedProps","id","resetTransformOnUnset","waitForFirstResolvedStyle","captureActiveOnPress","handleInitialLayout","animatedProps","collapsable"],"sourceRoot":"../../../../src","sources":["shared/components/create-transition-aware-component.tsx"],"mappings":";;AAAA;;AAEA,SAA6BA,UAAU,EAAEC,IAAI,EAAEC,WAAW,QAAQ,OAAO;AAEzE,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,OAAOC,QAAQ,IACdC,OAAO,EACPC,cAAc,EACdC,uBAAuB,EACvBC,cAAc,QACR,yBAAyB;AAChC,SAASC,mBAAmB,QAAQ,yCAAyC;AAC7E,SAASC,iBAAiB,QAAQ,uCAAuC;AACzE,SAASC,sBAAsB,QAAQ,uCAAuC;AAC9E,SAASC,oBAAoB,QAAQ,qCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["forwardRef","memo","useCallback","GestureDetector","Animated","runOnUI","useAnimatedRef","useComposedEventHandler","useSharedValue","useAssociatedStyles","useScrollRegistry","RegisterBoundsProvider","ScrollSettleProvider","jsx","_jsx","createTransitionAwareComponent","Wrapped","options","isScrollable","alreadyAnimated","AnimatedComponent","createAnimatedComponent","ScrollableInner","props","ref","remeasureOnFocus","_remeasureOnFocus","onScroll","userOnScroll","onMomentumScrollEnd","userOnMomentumScrollEnd","onScrollEndDrag","userOnScrollEndDrag","scrollableProps","settledSignal","emitScrollSettled","value","scrollDirection","horizontal","scrollHandler","onContentSizeChange","onLayout","nativeGesture","direction","composedScrollHandler","handleMomentumScrollEnd","event","handleScrollEndDrag","velocityX","Math","abs","nativeEvent","velocity","x","velocityY","y","scrollableComponent","scrollEventThrottle","children","gesture","Inner","_","style","sharedBoundTag","styleId","onPress","rest","animatedRef","associatedStyles","associatedProps","id","resetTransformOnUnset","waitForFirstResolvedStyle","captureActiveOnPress","handleInitialLayout","animatedProps","collapsable"],"sourceRoot":"../../../../src","sources":["shared/components/create-transition-aware-component.tsx"],"mappings":";;AAAA;;AAEA,SAA6BA,UAAU,EAAEC,IAAI,EAAEC,WAAW,QAAQ,OAAO;AAEzE,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,OAAOC,QAAQ,IACdC,OAAO,EACPC,cAAc,EACdC,uBAAuB,EACvBC,cAAc,QACR,yBAAyB;AAChC,SAASC,mBAAmB,QAAQ,yCAAyC;AAC7E,SAASC,iBAAiB,QAAQ,uCAAuC;AACzE,SAASC,sBAAsB,QAAQ,uCAAuC;AAC9E,SAASC,oBAAoB,QAAQ,qCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQ3E,OAAO,SAASC,8BAA8BA,CAC7CC,OAAyB,EACzBC,OAA8C,GAAG,CAAC,CAAC,EAClD;EACD,MAAM;IAAEC,YAAY,GAAG,KAAK;IAAEC,eAAe,GAAG;EAAM,CAAC,GAAGF,OAAO;EAEjE,MAAMG,iBAAiB,GAAGD,eAAe,GACtCH,OAAO,GACPZ,QAAQ,CAACiB,uBAAuB,CAACL,OAAO,CAAC;EAE5C,MAAMM,eAAe,gBAAGtB,UAAU,CAGhC,CAACuB,KAAU,EAAEC,GAAG,KAAK;IACtB,MAAM;MACLC,gBAAgB,EAAEC,iBAAiB;MACnCC,QAAQ,EAAEC,YAAY;MACtBC,mBAAmB,EAAEC,uBAAuB;MAC5CC,eAAe,EAAEC,mBAAmB;MACpC,GAAGC;IACJ,CAAC,GAAGV,KAAK;IAET,MAAMW,aAAa,GAAG1B,cAAc,CAAC,CAAC,CAAC;IAEvC,MAAM2B,iBAAiB,GAAGjC,WAAW,CAAC,MAAM;MAC3CG,OAAO,CAAC,MAAM;QACb,SAAS;;QACT6B,aAAa,C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5D,IAAA,CAACM,iBAAiB;QAAA,GACZ8C,IAAI;QACT1C,GAAG,EAAE2C,WAAY;QACjBL,KAAK,EAAE,CAACA,KAAK,EAAEM,gBAAgB,CAAE;QACjCO,aAAa,EAAEN,eAAgB;QAC/BJ,OAAO,EAAEQ,oBAAqB;QAC9BhC,QAAQ,EAAEpC,OAAO,CAACqE,mBAAmB,CAAE;QACvCE,WAAW,EAAE,CAACb,cAAe;QAAAL,QAAA,EAE5BA;MAAQ,CACS;IACnB,CACsB,CAAC;EAE3B,CAAC,CAAC;EAEF,IAAIxC,YAAY,EAAE;IACjB,oBAAOjB,IAAI,CAACqB,eAAe,CAAC;EAM7B;EAEA,oBAAOrB,IAAI,CAAC2D,KAAK,CAAC;AAMnB","ignoreList":[]}
|
|
@@ -9,19 +9,25 @@ export const NativeScreenContainer = ({
|
|
|
9
9
|
}) => {
|
|
10
10
|
const {
|
|
11
11
|
flags: {
|
|
12
|
-
DISABLE_NATIVE_SCREENS = false
|
|
12
|
+
DISABLE_NATIVE_SCREENS = false,
|
|
13
|
+
DISABLE_NATIVE_SCREEN_CONTAINER = false
|
|
13
14
|
}
|
|
14
15
|
} = useStack();
|
|
15
|
-
if (!DISABLE_NATIVE_SCREENS) {
|
|
16
|
+
if (!DISABLE_NATIVE_SCREENS && !DISABLE_NATIVE_SCREEN_CONTAINER) {
|
|
16
17
|
return /*#__PURE__*/_jsx(ScreenContainer, {
|
|
17
18
|
style: styles.container,
|
|
18
19
|
children: children
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
return (
|
|
23
|
+
/*#__PURE__*/
|
|
24
|
+
// Mirror ScreenContainer's native boundary when screens are disabled.
|
|
25
|
+
_jsx(View, {
|
|
26
|
+
collapsable: false,
|
|
27
|
+
style: styles.container,
|
|
28
|
+
children: children
|
|
29
|
+
})
|
|
30
|
+
);
|
|
25
31
|
};
|
|
26
32
|
const styles = StyleSheet.create({
|
|
27
33
|
container: {
|