react-native-screen-transitions 4.0.0-alpha.3 → 4.0.0-alpha.4
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/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +14 -10
- package/lib/commonjs/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/commonjs/components/boundary/hooks/lifecycles/use-initial-source-measurement.js +3 -1
- package/lib/commonjs/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -1
- package/lib/commonjs/components/boundary/hooks/lifecycles/use-refresh-boundary.js +3 -5
- package/lib/commonjs/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/commonjs/components/boundary/hooks/use-boundary-measurement.js +5 -4
- package/lib/commonjs/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/commonjs/components/boundary/utils/destination-signals.js +1 -3
- package/lib/commonjs/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/commonjs/components/boundary/utils/refresh-signals.js +2 -4
- package/lib/commonjs/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/commonjs/providers/screen/descriptors/descriptors.provider.js +3 -7
- package/lib/commonjs/providers/screen/descriptors/descriptors.provider.js.map +1 -1
- package/lib/commonjs/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +1 -3
- package/lib/commonjs/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/commonjs/providers/screen/descriptors/helpers/get-ancestor-keys.js +3 -20
- package/lib/commonjs/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -1
- package/lib/commonjs/stores/bounds/internals/entries.js +17 -0
- package/lib/commonjs/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/stores/bounds/internals/links.js +25 -0
- package/lib/commonjs/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/stores/bounds/internals/resolver.js +2 -12
- package/lib/commonjs/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/utils/bounds/helpers/create-link-accessor.js +2 -2
- package/lib/commonjs/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +16 -12
- package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/module/components/boundary/hooks/lifecycles/use-initial-source-measurement.js +3 -1
- package/lib/module/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -1
- package/lib/module/components/boundary/hooks/lifecycles/use-refresh-boundary.js +3 -5
- package/lib/module/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/module/components/boundary/hooks/use-boundary-measurement.js +5 -4
- package/lib/module/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/module/components/boundary/utils/destination-signals.js +1 -3
- package/lib/module/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/module/components/boundary/utils/refresh-signals.js +2 -4
- package/lib/module/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/module/providers/screen/descriptors/descriptors.provider.js +4 -8
- package/lib/module/providers/screen/descriptors/descriptors.provider.js.map +1 -1
- package/lib/module/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +1 -3
- package/lib/module/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/module/providers/screen/descriptors/helpers/get-ancestor-keys.js +3 -19
- package/lib/module/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -1
- package/lib/module/stores/bounds/internals/entries.js +17 -1
- package/lib/module/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/stores/bounds/internals/links.js +25 -2
- package/lib/module/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/stores/bounds/internals/resolver.js +3 -13
- package/lib/module/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/utils/bounds/helpers/create-link-accessor.js +3 -3
- package/lib/module/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/typescript/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts.map +1 -1
- package/lib/typescript/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -1
- package/lib/typescript/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
- package/lib/typescript/components/boundary/utils/destination-signals.d.ts +1 -2
- package/lib/typescript/components/boundary/utils/destination-signals.d.ts.map +1 -1
- package/lib/typescript/components/boundary/utils/refresh-signals.d.ts +0 -2
- package/lib/typescript/components/boundary/utils/refresh-signals.d.ts.map +1 -1
- package/lib/typescript/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
- package/lib/typescript/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +1 -3
- package/lib/typescript/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
- package/lib/typescript/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts +0 -8
- package/lib/typescript/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts.map +1 -1
- package/lib/typescript/stores/bounds/internals/entries.d.ts +2 -1
- package/lib/typescript/stores/bounds/internals/entries.d.ts.map +1 -1
- package/lib/typescript/stores/bounds/internals/links.d.ts +3 -1
- package/lib/typescript/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/stores/bounds/internals/resolver.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +43 -21
- package/src/components/boundary/hooks/lifecycles/use-initial-source-measurement.ts +6 -1
- package/src/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +8 -9
- package/src/components/boundary/hooks/use-boundary-measurement.ts +5 -4
- package/src/components/boundary/utils/destination-signals.ts +2 -6
- package/src/components/boundary/utils/refresh-signals.ts +2 -10
- package/src/providers/screen/descriptors/descriptors.provider.tsx +4 -11
- package/src/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +0 -4
- package/src/providers/screen/descriptors/helpers/get-ancestor-keys.ts +3 -30
- package/src/stores/bounds/internals/entries.ts +27 -1
- package/src/stores/bounds/internals/links.ts +36 -0
- package/src/stores/bounds/internals/resolver.ts +7 -21
- package/src/utils/bounds/helpers/create-link-accessor.ts +9 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_links","require","resolveTransitionPair","tag","context","destinationScreenKey","entering","currentScreenKey","nextScreenKey","pairKey","getPairKeyForDestination","matchedLink","getResolvedLink","link","sourceBounds","source","bounds","destinationBounds","destination","sourceStyles","styles","destinationStyles","sourceScreenKey","screenKey"],"sourceRoot":"../../../../../src","sources":["stores/bounds/internals/resolver.ts"],"mappings":";;;;;;AAKA,IAAAA,MAAA,GAAAC,OAAA;AAEA,SAASC,qBAAqBA,CAC7BC,GAAU,EACVC,OAAiC,EACR;EACzB,SAAS;;EACT,MAAMC,oBAAoB,GAAGD,OAAO,CAACE,QAAQ,GAC1CF,OAAO,CAACG,gBAAgB,GACxBH,OAAO,CAACI,aAAa;EACxB,MAAMC,OAAO,GAAGJ,oBAAoB,GACjC,IAAAK,+BAAwB,EAACP,GAAG,EAAEE,oBAAoB,CAAC,GACnD,IAAI;EACP,MAAMM,WAAW,GAAGF,OAAO,GAAG,IAAAG,sBAAe,EAACH,OAAO,EAAEN,GAAG,CAAC,CAACU,IAAI,GAAG,IAAI;EAEvE,OAAO;IACNC,YAAY,EAAEH,WAAW,EAAEI,MAAM,EAAEC,MAAM,IAAI,IAAI;IACjDC,iBAAiB,EAAEN,WAAW,EAAEO,WAAW,EAAEF,MAAM,IAAI,IAAI;IAC3DG,YAAY,EAAER,WAAW,EAAEI,MAAM,EAAEK,MAAM,IAAI,IAAI;IACjDC,iBAAiB,EAAEV,WAAW,EAAEO,WAAW,EAAEE,MAAM,IAAI,IAAI;IAC3DE,eAAe,EAAEX,WAAW,EAAEI,MAAM,EAAEQ,SAAS,IAAI,IAAI;IACvDlB,oBAAoB,EAAEM,WAAW,EAAEO,WAAW,EAAEK,SAAS,IAAI;EAC9D,CAAC;AACF","ignoreList":[]}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createLinkAccessor = void 0;
|
|
7
7
|
var _links = require("../../../stores/bounds/internals/links");
|
|
8
|
-
var _resolveBoundsPairKey = require("./resolve-bounds-pair-key");
|
|
9
8
|
const createLinkAccessor = getProps => {
|
|
10
9
|
"worklet";
|
|
11
10
|
|
|
@@ -14,7 +13,8 @@ const createLinkAccessor = getProps => {
|
|
|
14
13
|
|
|
15
14
|
const props = getProps();
|
|
16
15
|
const stringTag = String(tag);
|
|
17
|
-
const
|
|
16
|
+
const destinationScreenKey = props.next?.route.key ?? props.current?.route.key;
|
|
17
|
+
const pairKey = destinationScreenKey ? (0, _links.getPairKeyForDestination)(stringTag, destinationScreenKey) : null;
|
|
18
18
|
if (!pairKey) return null;
|
|
19
19
|
const resolved = (0, _links.getResolvedLink)(pairKey, stringTag);
|
|
20
20
|
return resolved.link ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_links","require","
|
|
1
|
+
{"version":3,"names":["_links","require","createLinkAccessor","getProps","getLink","tag","props","stringTag","String","destinationScreenKey","next","route","key","current","pairKey","getPairKeyForDestination","resolved","getResolvedLink","link","id","exports"],"sourceRoot":"../../../../../src","sources":["utils/bounds/helpers/create-link-accessor.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAgBO,MAAMC,kBAAkB,GAAIC,QAAkB,IAAmB;EACvE,SAAS;;EAET,MAAMC,OAAO,GAAIC,GAAY,IAAwB;IACpD,SAAS;;IACT,MAAMC,KAAK,GAAGH,QAAQ,CAAC,CAAC;IACxB,MAAMI,SAAS,GAAGC,MAAM,CAACH,GAAG,CAAC;IAC7B,MAAMI,oBAAoB,GACzBH,KAAK,CAACI,IAAI,EAAEC,KAAK,CAACC,GAAG,IAAIN,KAAK,CAACO,OAAO,EAAEF,KAAK,CAACC,GAAG;IAClD,MAAME,OAAO,GAAGL,oBAAoB,GACjC,IAAAM,+BAAwB,EAACR,SAAS,EAAEE,oBAAoB,CAAC,GACzD,IAAI;IACP,IAAI,CAACK,OAAO,EAAE,OAAO,IAAI;IAEzB,MAAME,QAAQ,GAAG,IAAAC,sBAAe,EAACH,OAAO,EAAEP,SAAS,CAAC;IACpD,OAAOS,QAAQ,CAACE,IAAI,GACjB;MACAC,EAAE,EAAEH,QAAQ,CAACX,GAAG;MAChB,GAAGW,QAAQ,CAACE;IACb,CAAC,GACA,IAAI;EACR,CAAC;EAED,OAAO;IACNd;EACD,CAAC;AACF,CAAC;AAACgB,OAAA,CAAAlB,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js
CHANGED
|
@@ -5,8 +5,8 @@ import { cancelAnimation, useAnimatedReaction, useSharedValue, withDelay, withTi
|
|
|
5
5
|
import { scheduleOnUI } from "react-native-worklets";
|
|
6
6
|
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
7
7
|
import { AnimationStore } from "../../../../stores/animation.store";
|
|
8
|
-
import { getSourceScreenKeyFromPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
9
|
-
import { getEntry } from "../../../../stores/bounds/internals/entries";
|
|
8
|
+
import { createScreenPairKey, getSourceScreenKeyFromPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
9
|
+
import { getEntry, getMatchingSourceScreenKey } from "../../../../stores/bounds/internals/entries";
|
|
10
10
|
import { getLink } from "../../../../stores/bounds/internals/links";
|
|
11
11
|
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
12
12
|
import { SystemStore } from "../../../../stores/system.store";
|
|
@@ -36,9 +36,9 @@ export const useInitialDestinationMeasurement = ({
|
|
|
36
36
|
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
37
37
|
const nextScreenKey = useDescriptorsStore(s => s.derivations.nextScreenKey);
|
|
38
38
|
const destinationPairKey = useDescriptorsStore(s => s.derivations.destinationPairKey);
|
|
39
|
-
const ancestorDestinationPairKey = useDescriptorsStore(s => s.derivations.ancestorDestinationPairKey);
|
|
40
39
|
const destinationEnabled = enabled && !nextScreenKey;
|
|
41
|
-
const
|
|
40
|
+
const canReceiveDestination = destinationEnabled && !!destinationPairKey;
|
|
41
|
+
const preferredSourceScreenKey = destinationPairKey ? getSourceScreenKeyFromPairKey(destinationPairKey) : undefined;
|
|
42
42
|
const progress = AnimationStore.getValue(currentScreenKey, "transitionProgress");
|
|
43
43
|
const {
|
|
44
44
|
actions: {
|
|
@@ -63,6 +63,10 @@ export const useInitialDestinationMeasurement = ({
|
|
|
63
63
|
const claimLifecycleStartBlock = useCallback(() => {
|
|
64
64
|
"worklet";
|
|
65
65
|
|
|
66
|
+
if (!canReceiveDestination || !getMatchingSourceScreenKey(tag, currentScreenKey, preferredSourceScreenKey)) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
66
70
|
// The progress check and block claim must share one UI-thread operation.
|
|
67
71
|
// Otherwise a JS-thread layout effect can observe zero, enqueue the block,
|
|
68
72
|
// and let the opening animation start before that block reaches the UI thread.
|
|
@@ -71,9 +75,9 @@ export const useInitialDestinationMeasurement = ({
|
|
|
71
75
|
}
|
|
72
76
|
blockLifecycleStart();
|
|
73
77
|
isBlockingLifecycleStart.set(1);
|
|
74
|
-
}, [blockLifecycleStart, isBlockingLifecycleStart, progress]);
|
|
78
|
+
}, [blockLifecycleStart, canReceiveDestination, currentScreenKey, isBlockingLifecycleStart, progress, preferredSourceScreenKey, tag]);
|
|
75
79
|
useLayoutEffect(() => {
|
|
76
|
-
if (!
|
|
80
|
+
if (!canReceiveDestination) {
|
|
77
81
|
return;
|
|
78
82
|
}
|
|
79
83
|
scheduleOnUI(claimLifecycleStartBlock);
|
|
@@ -87,26 +91,26 @@ export const useInitialDestinationMeasurement = ({
|
|
|
87
91
|
// runtime so it serializes with the handshake's guarded release.
|
|
88
92
|
scheduleOnUI(releaseLifecycleStartBlock);
|
|
89
93
|
};
|
|
90
|
-
}, [claimLifecycleStartBlock,
|
|
94
|
+
}, [claimLifecycleStartBlock, escapeClipping, canReceiveDestination, releaseLifecycleStartBlock]);
|
|
91
95
|
useAnimatedReaction(() => {
|
|
92
96
|
"worklet";
|
|
93
97
|
|
|
94
|
-
if (!
|
|
98
|
+
if (!canReceiveDestination || isBlockingLifecycleStart.get() <= 0) {
|
|
95
99
|
return null;
|
|
96
100
|
}
|
|
97
101
|
if (progress.get() > 0) {
|
|
98
102
|
return null;
|
|
99
103
|
}
|
|
100
104
|
const retryTick = retryToken.get();
|
|
101
|
-
const sourceScreenKey =
|
|
105
|
+
const sourceScreenKey = getMatchingSourceScreenKey(tag, currentScreenKey, preferredSourceScreenKey);
|
|
106
|
+
const pairKey = sourceScreenKey ? createScreenPairKey(sourceScreenKey, currentScreenKey) : undefined;
|
|
102
107
|
const signal = getInitialDestinationMeasurementSignal({
|
|
103
108
|
enabled: destinationEnabled,
|
|
104
|
-
|
|
105
|
-
ancestorDestinationPairKey,
|
|
109
|
+
pairKey,
|
|
106
110
|
linkId: linkKey,
|
|
107
111
|
group,
|
|
108
112
|
destinationPresent: getEntry(tag, currentScreenKey) !== null,
|
|
109
|
-
sourcePresent:
|
|
113
|
+
sourcePresent: sourceScreenKey !== null,
|
|
110
114
|
linkState: pairs.get()
|
|
111
115
|
});
|
|
112
116
|
return [signal?.pairKey ?? null, signal?.action ?? null, retryTick];
|
package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useLayoutEffect","cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","scheduleOnUI","useDescriptorsStore","AnimationStore","getSourceScreenKeyFromPairKey","getEntry","getLink","pairs","SystemStore","logger","getInitialDestinationMeasurementSignal","HANDSHAKE_RETRY_DELAY_MS","MAX_HANDSHAKE_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","escapeClipping","measureBoundary","tag","linkKey","group","currentScreenKey","s","derivations","nextScreenKey","destinationPairKey","
|
|
1
|
+
{"version":3,"names":["useCallback","useLayoutEffect","cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","scheduleOnUI","useDescriptorsStore","AnimationStore","createScreenPairKey","getSourceScreenKeyFromPairKey","getEntry","getMatchingSourceScreenKey","getLink","pairs","SystemStore","logger","getInitialDestinationMeasurementSignal","HANDSHAKE_RETRY_DELAY_MS","MAX_HANDSHAKE_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","escapeClipping","measureBoundary","tag","linkKey","group","currentScreenKey","s","derivations","nextScreenKey","destinationPairKey","destinationEnabled","canReceiveDestination","preferredSourceScreenKey","undefined","progress","getValue","actions","blockLifecycleStart","unblockLifecycleStart","getBag","isBlockingLifecycleStart","retryToken","handshakeRetries","hasGivenUp","releaseLifecycleStartBlock","get","set","claimLifecycleStartBlock","retryTick","sourceScreenKey","pairKey","signal","linkId","destinationPresent","sourcePresent","linkState","action","next","previous","measurePairKey","previousMeasurePairKey","previousAction","previousRetryTick","shouldHandleSignal","type","link","linkComplete","source","destination","warn","duration"],"sourceRoot":"../../../../../../src","sources":["components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,eAAe,QAAQ,OAAO;AACpD,SACCC,eAAe,EACfC,mBAAmB,EACnBC,cAAc,EACdC,SAAS,EACTC,UAAU,QACJ,yBAAyB;AAChC,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,mBAAmB,QAAQ,0CAA0C;AAC9E,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SACCC,mBAAmB,EACnBC,6BAA6B,QACvB,sDAAsD;AAC7D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ACA0B,gBAAgB,CAACI,GAAG,CAACJ,gBAAgB,CAACG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAChD/C,eAAe,CAAC2C,UAAU,CAAC;IAC3BA,UAAU,CAACK,GAAG,CACb7C,SAAS,CACRc,wBAAwB,EACxBb,UAAU,CAACuC,UAAU,CAACI,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;MAAEyB,QAAQ,EAAE;IAAE,CAAC,CACjD,CACD,CAAC;EACF,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useAnimatedReaction, useSharedValue } from "react-native-reanimated";
|
|
4
4
|
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
5
|
+
import { getPairKeyForSource } from "../../../../stores/bounds/internals/links";
|
|
5
6
|
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
6
7
|
import { getInitialSourceCaptureSignal } from "../../utils/source-signals";
|
|
7
8
|
export const useInitialSourceMeasurement = params => {
|
|
@@ -10,11 +11,12 @@ export const useInitialSourceMeasurement = params => {
|
|
|
10
11
|
measureBoundary,
|
|
11
12
|
boundTag
|
|
12
13
|
} = params;
|
|
13
|
-
const
|
|
14
|
+
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
14
15
|
const lastSourceCaptureSignal = useSharedValue(null);
|
|
15
16
|
useAnimatedReaction(() => {
|
|
16
17
|
"worklet";
|
|
17
18
|
|
|
19
|
+
const sourcePairKey = getPairKeyForSource(boundTag.tag, currentScreenKey) ?? undefined;
|
|
18
20
|
return getInitialSourceCaptureSignal({
|
|
19
21
|
enabled,
|
|
20
22
|
sourcePairKey,
|
package/lib/module/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedReaction","useSharedValue","useDescriptorsStore","pairs","getInitialSourceCaptureSignal","useInitialSourceMeasurement","params","enabled","measureBoundary","boundTag","
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","useSharedValue","useDescriptorsStore","getPairKeyForSource","pairs","getInitialSourceCaptureSignal","useInitialSourceMeasurement","params","enabled","measureBoundary","boundTag","currentScreenKey","s","derivations","lastSourceCaptureSignal","sourcePairKey","tag","undefined","linkId","linkKey","group","linkState","get","captureSignal","set","signal","type","pairKey"],"sourceRoot":"../../../../../../src","sources":["components/boundary/hooks/lifecycles/use-initial-source-measurement.ts"],"mappings":";;AAAA,SAASA,mBAAmB,EAAEC,cAAc,QAAQ,yBAAyB;AAC7E,SAASC,mBAAmB,QAAQ,0CAA0C;AAC9E,SAASC,mBAAmB,QAAQ,2CAA2C;AAC/E,SAASC,KAAK,QAAQ,2CAA2C;AAGjE,SAASC,6BAA6B,QAAQ,4BAA4B;AAE1E,OAAO,MAAMC,2BAA2B,GAAIC,MAI3C,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,eAAe;IAAEC;EAAS,CAAC,GAAGH,MAAM;EACrD,MAAMI,gBAAgB,GAAGT,mBAAmB,CAC1CU,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,gBACtB,CAAC;EACD,MAAMG,uBAAuB,GAAGb,cAAc,CAAgB,IAAI,CAAC;EAEnED,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,MAAMe,aAAa,GAClBZ,mBAAmB,CAACO,QAAQ,CAACM,GAAG,EAAEL,gBAAgB,CAAC,IAAIM,SAAS;IACjE,OAAOZ,6BAA6B,CAAC;MACpCG,OAAO;MACPO,aAAa;MACbG,MAAM,EAAER,QAAQ,CAACS,OAAO;MACxBC,KAAK,EAAEV,QAAQ,CAACU,KAAK;MACrBC,SAAS,EAAEN,aAAa,GAAGX,KAAK,CAACkB,GAAG,CAAC,CAAC,GAAGL;IAC1C,CAAC,CAAC;EACH,CAAC,EACAM,aAAa,IAAK;IAClB,SAAS;;IACT,IAAI,CAACf,OAAO,IAAI,CAACe,aAAa,EAAE;MAC/BT,uBAAuB,CAACU,GAAG,CAAC,IAAI,CAAC;MACjC;IACD;IAEA,IAAIV,uBAAuB,CAACQ,GAAG,CAAC,CAAC,KAAKC,aAAa,CAACE,MAAM,EAAE;MAC3D;IACD;IAEAX,uBAAuB,CAACU,GAAG,CAACD,aAAa,CAACE,MAAM,CAAC;IACjDhB,eAAe,CAAC;MACfiB,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { useAnimatedReaction } from "react-native-reanimated";
|
|
4
4
|
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
5
5
|
import { AnimationStore } from "../../../../stores/animation.store";
|
|
6
|
+
import { getPairKeyForDestination, getPairKeyForSource } from "../../../../stores/bounds/internals/links";
|
|
6
7
|
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
7
8
|
import { getRefreshBoundarySignal } from "../../utils/refresh-signals";
|
|
8
9
|
export const useRefreshBoundary = ({
|
|
@@ -16,9 +17,6 @@ export const useRefreshBoundary = ({
|
|
|
16
17
|
} = boundTag;
|
|
17
18
|
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
18
19
|
const nextScreenKey = useDescriptorsStore(s => s.derivations.nextScreenKey);
|
|
19
|
-
const sourcePairKey = useDescriptorsStore(s => s.derivations.sourcePairKey);
|
|
20
|
-
const destinationPairKey = useDescriptorsStore(s => s.derivations.destinationPairKey);
|
|
21
|
-
const ancestorDestinationPairKey = useDescriptorsStore(s => s.derivations.ancestorDestinationPairKey);
|
|
22
20
|
// Source-side boundaries refresh from the next screen's lifecycle pulse.
|
|
23
21
|
// Destination-side boundaries have no next screen, so they refresh from self.
|
|
24
22
|
const refreshScreenKey = nextScreenKey ?? currentScreenKey;
|
|
@@ -31,13 +29,13 @@ export const useRefreshBoundary = ({
|
|
|
31
29
|
if (!shouldRefresh) {
|
|
32
30
|
return null;
|
|
33
31
|
}
|
|
32
|
+
const sourcePairKey = getPairKeyForSource(boundTag.tag, currentScreenKey) ?? undefined;
|
|
33
|
+
const destinationPairKey = getPairKeyForDestination(boundTag.tag, currentScreenKey) ?? undefined;
|
|
34
34
|
return getRefreshBoundarySignal({
|
|
35
35
|
enabled,
|
|
36
36
|
currentScreenKey,
|
|
37
37
|
sourcePairKey,
|
|
38
38
|
destinationPairKey,
|
|
39
|
-
ancestorDestinationPairKey,
|
|
40
|
-
nextScreenKey,
|
|
41
39
|
linkId: linkKey,
|
|
42
40
|
group,
|
|
43
41
|
shouldRefresh,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedReaction","useDescriptorsStore","AnimationStore","pairs","getRefreshBoundarySignal","useRefreshBoundary","enabled","boundTag","measureBoundary","linkKey","group","currentScreenKey","s","derivations","nextScreenKey","
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","useDescriptorsStore","AnimationStore","getPairKeyForDestination","getPairKeyForSource","pairs","getRefreshBoundarySignal","useRefreshBoundary","enabled","boundTag","measureBoundary","linkKey","group","currentScreenKey","s","derivations","nextScreenKey","refreshScreenKey","refreshWillAnimate","getValue","refreshClosing","shouldRefresh","get","sourcePairKey","tag","undefined","destinationPairKey","linkId","closing","linkState","refreshSignal","prevRefreshSignal","signal","type","pairKey"],"sourceRoot":"../../../../../../src","sources":["components/boundary/hooks/lifecycles/use-refresh-boundary.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,mBAAmB,QAAQ,0CAA0C;AAC9E,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SACCC,wBAAwB,EACxBC,mBAAmB,QACb,2CAA2C;AAClD,SAASC,KAAK,QAAQ,2CAA2C;AAGjE,SAASC,wBAAwB,QAAQ,6BAA6B;AAQtE,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC,OAAO;EACPC,QAAQ;EACRC;AACyB,CAAC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D,iBAAiB,EAAEC,MAAM,EACjD;MACD;IACD;IAEAtB,eAAe,CAAC;MACfuB,IAAI,EAAEH,aAAa,CAACG,IAAI;MACxBC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -46,10 +46,11 @@ export const useBoundaryMeasurement = ({
|
|
|
46
46
|
escapeClipping
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
//
|
|
50
|
-
//
|
|
49
|
+
// Presence and source capture must not depend on this screen owning an
|
|
50
|
+
// interpolator: a nested source can participate in a transition owned by a
|
|
51
|
+
// different navigator.
|
|
51
52
|
useBoundaryPresence({
|
|
52
|
-
enabled
|
|
53
|
+
enabled,
|
|
53
54
|
boundTag,
|
|
54
55
|
currentScreenKey,
|
|
55
56
|
boundaryConfig,
|
|
@@ -57,7 +58,7 @@ export const useBoundaryMeasurement = ({
|
|
|
57
58
|
escapeClipping
|
|
58
59
|
});
|
|
59
60
|
useInitialSourceMeasurement({
|
|
60
|
-
enabled
|
|
61
|
+
enabled,
|
|
61
62
|
measureBoundary,
|
|
62
63
|
boundTag
|
|
63
64
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","prepareStyleForBounds","useBoundaryPresence","useInitialDestinationMeasurement","useInitialSourceMeasurement","useRefreshBoundary","useMeasurer","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","handoff","escapeClipping","config","anchor","scaleMode","target","method","boundaryConfig","preparedStyles","measureBoundary","measuredAnimatedRef"],"sourceRoot":"../../../../../src","sources":["components/boundary/hooks/use-boundary-measurement.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,OAAO;AAI/B,SAASC,qBAAqB,QAAQ,6CAA6C;AAEnF,SAASC,mBAAmB,QAAQ,oCAAoC;AACxE,SAASC,gCAAgC,QAAQ,kDAAkD;AACnG,SAASC,2BAA2B,QAAQ,6CAA6C;AACzF,SAASC,kBAAkB,QAAQ,mCAAmC;AACtE,SAASC,WAAW,QAAQ,gBAAgB;AAkB5C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGA,CAAC;EACtCC,QAAQ;EACRC,OAAO;EACPC,cAAc;EACdC,gBAAgB;EAChBC,WAAW;EACXC,KAAK;EACLC,OAAO;EACPC,cAAc;EACdC;AAC6B,CAAC,KAAK;EACnC,MAAM;IAAEC,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EACpD,MAAMK,cAAc,GAAGrB,OAAO,CAC7B,OAAO;IAAEiB,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,CAAC,EAC7C,CAACH,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,MAAM,CACnC,CAAC;EAED,MAAME,cAAc,GAAGtB,OAAO,CAAC,MAAMC,qBAAqB,CAACY,KAAK,CAAC,EAAE,CAACA,KAAK,CAAC,CAAC;EAE3E,MAAMU,eAAe,GAAGjB,WAAW,CAAC;IACnCG,OAAO;IACPD,QAAQ;IACRG,gBAAgB;IAChBW,cAAc;IACdE,mBAAmB,EAAEZ,WAAW;IAChCE,OAAO;IACPC;EACD,CAAC,CAAC;;EAEF;EACA;EACAb,mBAAmB,CAAC;IACnBO,OAAO
|
|
1
|
+
{"version":3,"names":["useMemo","prepareStyleForBounds","useBoundaryPresence","useInitialDestinationMeasurement","useInitialSourceMeasurement","useRefreshBoundary","useMeasurer","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","handoff","escapeClipping","config","anchor","scaleMode","target","method","boundaryConfig","preparedStyles","measureBoundary","measuredAnimatedRef"],"sourceRoot":"../../../../../src","sources":["components/boundary/hooks/use-boundary-measurement.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,OAAO;AAI/B,SAASC,qBAAqB,QAAQ,6CAA6C;AAEnF,SAASC,mBAAmB,QAAQ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AQ;IACRe;EACD,CAAC,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -6,15 +6,13 @@ export const getInitialDestinationMeasurementSignal = params => {
|
|
|
6
6
|
|
|
7
7
|
const {
|
|
8
8
|
enabled,
|
|
9
|
-
|
|
10
|
-
ancestorDestinationPairKey,
|
|
9
|
+
pairKey,
|
|
11
10
|
linkId,
|
|
12
11
|
group,
|
|
13
12
|
destinationPresent,
|
|
14
13
|
sourcePresent,
|
|
15
14
|
linkState
|
|
16
15
|
} = params;
|
|
17
|
-
const pairKey = destinationPairKey ?? ancestorDestinationPairKey;
|
|
18
16
|
if (!enabled || !pairKey) {
|
|
19
17
|
return null;
|
|
20
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getActiveGroupId","getLinkKeyFromTag","getInitialDestinationMeasurementSignal","params","enabled","
|
|
1
|
+
{"version":3,"names":["getActiveGroupId","getLinkKeyFromTag","getInitialDestinationMeasurementSignal","params","enabled","pairKey","linkId","group","destinationPresent","sourcePresent","linkState","action","linkKey","activeGroupId","link","links","destination","source"],"sourceRoot":"../../../../../src","sources":["components/boundary/utils/destination-signals.ts"],"mappings":";;AAAA,SACCA,gBAAgB,EAChBC,iBAAiB,QACX,mDAAmD;AAiB1D,OAAO,MAAMC,sCAAsC,GAAIC,MAQtD,IAAiD;EACjD,SAAS;;EACT,MAAM;IACLC,OAAO;IACPC,OAAO;IACPC,MAAM;IACNC,KAAK;IACLC,kBAAkB;IAClBC,aAAa;IACbC;EACD,CAAC,GAAGP,MAAM;EACV,IAAI,CAACC,OAAO,IAAI,CAACC,OAAO,EAAE;IACzB,OAAO,IAAI;EACZ;EAEA,IAAI,CAACG,kBAAkB,EAAE;IACxB,OAAO;MAAEH,OAAO;MAAEM,MAAM,EAAE;IAAO,CAAC;EACnC;EAEA,IAAI,CAACF,aAAa,EAAE;IACnB,OAAO;MAAEJ,OAAO;MAAEM,MAAM,EAAE;IAAU,CAAC;EACtC;EAEA,MAAMC,OAAO,GAAGX,iBAAiB,CAACK,MAAM,CAAC;EACzC,MAAMO,aAAa,GAClBN,KAAK,IAAIG,SAAS,GAAGV,gBAAgB,CAACU,SAAS,EAAEL,OAAO,EAAEE,KAAK,CAAC,GAAG,IAAI;EAExE,IAAIM,aAAa,IAAIA,aAAa,KAAKD,OAAO,EAAE;IAC/C,OAAO;MAAEP,OAAO;MAAEM,MAAM,EAAE;IAAU,CAAC;EACtC;EAEA,MAAMG,IAAI,GAAGJ,SAAS,GAAGL,OAAO,CAAC,EAAEU,KAAK,GAAGH,OAAO,CAAC;EAEnD,IAAI,CAACE,IAAI,EAAEE,WAAW,EAAE;IACvB,OAAO;MAAEX,OAAO;MAAEM,MAAM,EAAE;IAAU,CAAC;EACtC;EAEA,IAAI,CAACG,IAAI,CAACG,MAAM,EAAE;IACjB,OAAO;MAAEZ,OAAO;MAAEM,MAAM,EAAE;IAAO,CAAC;EACnC;EAEA,OAAO;IAAEN,OAAO;IAAEM,MAAM,EAAE;EAAW,CAAC;AACvC,CAAC","ignoreList":[]}
|
|
@@ -20,8 +20,6 @@ export const getRefreshBoundarySignal = params => {
|
|
|
20
20
|
currentScreenKey,
|
|
21
21
|
sourcePairKey,
|
|
22
22
|
destinationPairKey,
|
|
23
|
-
ancestorDestinationPairKey,
|
|
24
|
-
nextScreenKey,
|
|
25
23
|
linkId,
|
|
26
24
|
group,
|
|
27
25
|
shouldRefresh,
|
|
@@ -44,7 +42,7 @@ export const getRefreshBoundarySignal = params => {
|
|
|
44
42
|
}
|
|
45
43
|
return buildRefreshSignal("source", sourcePairKey, [currentScreenKey, closing ? "closing" : "settled"].join("|"));
|
|
46
44
|
}
|
|
47
|
-
const refreshDestinationPairKey = destinationPairKey
|
|
45
|
+
const refreshDestinationPairKey = destinationPairKey;
|
|
48
46
|
if (!refreshDestinationPairKey) {
|
|
49
47
|
return null;
|
|
50
48
|
}
|
|
@@ -63,7 +61,7 @@ export const getRefreshBoundarySignal = params => {
|
|
|
63
61
|
}
|
|
64
62
|
return buildRefreshSignal("source", sourcePairKey, [group, linkId, closing ? "closing" : "settled"].join("|"));
|
|
65
63
|
}
|
|
66
|
-
const refreshDestinationPairKey = destinationPairKey
|
|
64
|
+
const refreshDestinationPairKey = destinationPairKey;
|
|
67
65
|
if (!refreshDestinationPairKey) return null;
|
|
68
66
|
|
|
69
67
|
// Destination side:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SOURCE_SIGNAL_PREFIX","DESTINATION_SIGNAL_PREFIX","buildRefreshSignal","type","pairKey","key","prefix","signal","getRefreshBoundarySignal","params","enabled","currentScreenKey","sourcePairKey","destinationPairKey","
|
|
1
|
+
{"version":3,"names":["SOURCE_SIGNAL_PREFIX","DESTINATION_SIGNAL_PREFIX","buildRefreshSignal","type","pairKey","key","prefix","signal","getRefreshBoundarySignal","params","enabled","currentScreenKey","sourcePairKey","destinationPairKey","linkId","group","shouldRefresh","closing","linkState","sourcePair","participates","links","sourceRequests","join","refreshDestinationPairKey","activeId","groups"],"sourceRoot":"../../../../../src","sources":["components/boundary/utils/refresh-signals.ts"],"mappings":";;AAMA,MAAMA,oBAAoB,GAAG,SAAS;AACtC,MAAMC,yBAAyB,GAAG,cAAc;AAMhD,MAAMC,kBAAkB,GAAGA,CAC1BC,IAA2B,EAC3BC,OAAsB,EACtBC,GAAW,KACgB;EAC3B,SAAS;;EACT,MAAMC,MAAM,GACXH,IAAI,KAAK,QAAQ,GAAGH,oBAAoB,GAAGC,yBAAyB;EACrE,OAAO;IACNE,IAAI;IACJC,OAAO;IACPG,MAAM,EAAE,GAAGD,MAAM,GAAGF,OAAO,IAAIC,GAAG;EACnC,CAAC;AACF,CAAC;AAED,OAAO,MAAMG,wBAAwB,GAAIC,MAUxC,IAAmC;EACnC,SAAS;;EACT,MAAM;IACLC,OAAO;IACPC,gBAAgB;IAChBC,aAAa;IACbC,kBAAkB;IAClBC,MAAM;IACNC,KAAK;IACLC,aAAa;IACbC,OAAO;IACPC;EACD,CAA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AAS,GAAG,SAAS,CAAC,CAACM,IAAI,CAAC,GAAG,CAC1D,CAAC;EACF;EAEA,MAAMC,yBAAyB,GAAGX,kBAAkB;EAEpD,IAAI,CAACW,yBAAyB,EAAE,OAAO,IAAI;;EAE3C;EACA;EACA,MAAMC,QAAQ,GACbP,SAAS,GAAGM,yBAAyB,CAAC,EAAEE,MAAM,GAAGX,KAAK,CAAC,EAAEU,QAAQ;;EAElE;EACA;EACA,IAAIA,QAAQ,KAAKX,MAAM,EAAE;IACxB,OAAO,IAAI;EACZ;EAEA,OAAOZ,kBAAkB,CACxB,aAAa,EACbsB,yBAAyB,EACzB,CAACT,KAAK,EAAED,MAAM,EAAEG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC,CAACM,IAAI,CAAC,GAAG,CAC1D,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ import { useScreenTransitionsAdapterOptionalContext } from "../../../adapters/wi
|
|
|
5
5
|
import { useBlankStackStore } from "../../../providers/stack/blank-stack.provider";
|
|
6
6
|
import createProvider from "../../../utils/create-provider";
|
|
7
7
|
import { deriveDescriptorDerivations } from "./helpers/derive-descriptor-derivations";
|
|
8
|
-
import {
|
|
8
|
+
import { getAncestorKeys } from "./helpers/get-ancestor-keys";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Base descriptor interface - minimal contract for all stack types.
|
|
@@ -41,17 +41,13 @@ export const {
|
|
|
41
41
|
current: resolvedCurrent,
|
|
42
42
|
next: resolvedNext
|
|
43
43
|
}), [resolvedPrevious, resolvedCurrent, resolvedNext]);
|
|
44
|
-
const
|
|
45
|
-
ancestorKeys,
|
|
46
|
-
ancestorDestinationPairKey
|
|
47
|
-
} = useMemo(() => getAncestorKeyState(resolvedCurrent), [resolvedCurrent]);
|
|
44
|
+
const ancestorKeys = useMemo(() => getAncestorKeys(resolvedCurrent), [resolvedCurrent]);
|
|
48
45
|
const derivations = useMemo(() => deriveDescriptorDerivations({
|
|
49
46
|
previous: resolvedPrevious,
|
|
50
47
|
current: resolvedCurrent,
|
|
51
48
|
next: resolvedNext,
|
|
52
|
-
ancestorKeys
|
|
53
|
-
|
|
54
|
-
}), [resolvedPrevious, resolvedCurrent, resolvedNext, ancestorKeys, ancestorDestinationPairKey]);
|
|
49
|
+
ancestorKeys
|
|
50
|
+
}), [resolvedPrevious, resolvedCurrent, resolvedNext, ancestorKeys]);
|
|
55
51
|
return {
|
|
56
52
|
value: {
|
|
57
53
|
previous: resolvedPrevious,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useScreenTransitionsAdapterOptionalContext","useBlankStackStore","createProvider","deriveDescriptorDerivations","
|
|
1
|
+
{"version":3,"names":["useMemo","useScreenTransitionsAdapterOptionalContext","useBlankStackStore","createProvider","deriveDescriptorDerivations","getAncestorKeys","DescriptorsProvider","useDescriptorsStore","guarded","previous","current","next","routeKey","children","blankStackCurrent","store","scenesByKey","descriptor","undefined","blankStackPrevious","previousDescriptor","blankStackNext","nextDescriptor","adapterContext","adapterScene","scenes","routeIndexByKey","get","resolvedCurrent","resolvedPrevious","resolvedNext","Error","descriptors","ancestorKeys","derivations","value","options"],"sourceRoot":"../../../../../src","sources":["providers/screen/descriptors/descriptors.provider.tsx"],"mappings":";;AACA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,0CAA0C,QAAQ,mDAAmD;AAC9G,SAASC,kBAAkB,QAAQ,+CAA+C;AAElF,OAAOC,cAAc,MAAM,gCAAgC;AAE3D,SAASC,2BAA2B,QAAQ,yCAAyC;AACrF,SAASC,eAAe,QAAQ,6BAA6B;;AAE7D;AACA;AACA;AACA;AACA;;AA6BA,OAAO,MAAM;EAAEC,mBAAmB;EAAEC;AAAoB,CAAC,GAAGJ,cAAc,CACzE,aAAa,EACb;EAAEK,OAAO,EAAE;AAAK,CACjB,CAAC,CACA,CAAC;EAAEC,QAAQ;EAAEC,OAAO;EAAEC,IAAI;EAAEC,QAAQ;EAAEC;AAAS,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YAAY,CACjD,CAAC;EAED,MAAMG,YAAY,GAAGjC,OAAO,CAC3B,MAAMK,eAAe,CAACuB,eAAe,CAAC,EACtC,CAACA,eAAe,CACjB,CAAC;EAED,MAAMM,WAAW,GAAGlC,OAAO,CAC1B,MACCI,2BAA2B,CAAC;IAC3BK,QAAQ,EAAEoB,gBAAgB;IAC1BnB,OAAO,EAAEkB,eAAe;IACxBjB,IAAI,EAAEmB,YAAY;IAClBG;EACD,CAAC,CAAC,EACH,CAACJ,gBAAgB,EAAED,eAAe,EAAEE,YAAY,EAAEG,YAAY,CAC/D,CAAC;EAED,OAAO;IACNE,KAAK,EAAE;MACN1B,QAAQ,EAAEoB,gBAAgB;MAC1BnB,OAAO,EAAEkB,eAAe;MACxBjB,IAAI,EAAEmB,YAAY;MAClBE,WAAW;MACXE,WAAW;MACXE,OAAO,EAAER,eAAe,CAACQ;IAC1B,CAAC;IACDvB;EACD,CAAC;AACF,CACD,CAAC","ignoreList":[]}
|
|
@@ -5,8 +5,7 @@ export function deriveDescriptorDerivations({
|
|
|
5
5
|
previous,
|
|
6
6
|
current,
|
|
7
7
|
next,
|
|
8
|
-
ancestorKeys
|
|
9
|
-
ancestorDestinationPairKey
|
|
8
|
+
ancestorKeys
|
|
10
9
|
}) {
|
|
11
10
|
const previousScreenKey = previous?.route.key;
|
|
12
11
|
const currentScreenKey = current.route.key;
|
|
@@ -24,7 +23,6 @@ export function deriveDescriptorDerivations({
|
|
|
24
23
|
nextScreenKey,
|
|
25
24
|
sourcePairKey,
|
|
26
25
|
destinationPairKey,
|
|
27
|
-
ancestorDestinationPairKey,
|
|
28
26
|
parentScreenKey: ancestorKeys[0],
|
|
29
27
|
isFirstKey,
|
|
30
28
|
isTopMostScreen,
|
package/lib/module/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createScreenPairKey","deriveDescriptorDerivations","previous","current","next","ancestorKeys","
|
|
1
|
+
{"version":3,"names":["createScreenPairKey","deriveDescriptorDerivations","previous","current","next","ancestorKeys","previousScreenKey","route","key","currentScreenKey","nextScreenKey","sourcePairKey","undefined","destinationPairKey","navigationState","navigation","getState","routes","isFirstKey","findIndex","isTopMostScreen","hasConfiguredInterpolator","options","screenStyleInterpolator","parentScreenKey"],"sourceRoot":"../../../../../../src","sources":["providers/screen/descriptors/helpers/derive-descriptor-derivations.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,sDAAsD;AAwB1F,OAAO,SAASC,2BAA2BA,CAAC;EAC3CC,QAAQ;EACRC,OAAO;EACPC,IAAI;EACJC;AACO,CAAC,EAAyB;EACjC,MAAMC,iBAAiB,GAAGJ,QAAQ,EAAEK,KAAK,CAACC,GAAG;EAC7C,MAAMC,gBAAgB,GAAGN,OAAO,CAACI,KAAK,CAACC,GAAG;EAC1C,MAAME,aAAa,GAAGN,IAAI,EAAEG,KAAK,CAACC,GAAG;EACrC,MAAMG,aAAa,GAAGD,aAAa,GAChCV,mBAAmB,CAACS,gBAAgB,EAAEC,aAAa,CAAC,GACpDE,SAAS;EACZ,MAAMC,kBAAkB,GAAGP,iBAAiB,GACzCN,mBAAmB,CAACM,iBAAiB,EAAEG,gBAAgB,CAAC,GACxDG,SAAS;EAEZ,MAAME,eAAe,GAAGX,OAAO,CAACY,UAAU,CAACC,QAAQ,CAAC,CAAC;EACrD,MAAMC,MAAM,GAAGH,eAAe,EAAEG,MAAM,IAAI,EAAE;EAC5C,MAAMC,UAAU,GACfD,MAAM,CAACE,SAAS,CAAEZ,KAAK,IAAKA,KAAK,CAACC,GAAG,KAAKL,OAAO,CAACI,KAAK,CAACC,GAAG,CAAC,KAAK,CAAC;EACnE,MAAMY,eAAe,GAAG,CAAChB,IAAI;EAC7B,MAAMiB,yBAAyB,GAC9B,CAAC,CAAClB,OAAO,CAACmB,OAAO,CAACC,uBAAuB,IACzC,CAAC,CAACnB,IAAI,EAAEkB,OAAO,EAAEC,uBAAuB;EAEzC,OAAO;IACNjB,iBAAiB;IACjBG,gBAAgB;IAChBC,aAAa;IACbC,aAAa;IACbE,kBAAkB;IAClBW,eAAe,EAAEnB,YAAY,CAAC,CAAC,CAAC;IAChCa,UAAU;IACVE,eAAe;IACff,YAAY;IACZgB;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { createScreenPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
4
3
|
/**
|
|
5
4
|
* Builds nested navigator ancestor keys from immediate parent to root.
|
|
6
|
-
* The nearest ancestor destination pair lets child routes attach measurements
|
|
7
|
-
* to the transition owned by the parent stack.
|
|
8
5
|
*/
|
|
9
|
-
export function
|
|
6
|
+
export function getAncestorKeys(current) {
|
|
10
7
|
const ancestors = [];
|
|
11
|
-
let ancestorDestinationPairKey;
|
|
12
8
|
const nav = current.navigation;
|
|
13
9
|
if (typeof nav?.getParent !== "function") {
|
|
14
|
-
return
|
|
15
|
-
ancestorKeys: ancestors
|
|
16
|
-
};
|
|
10
|
+
return ancestors;
|
|
17
11
|
}
|
|
18
12
|
let parent = nav.getParent();
|
|
19
13
|
while (parent) {
|
|
@@ -22,20 +16,10 @@ export function getAncestorKeyState(current) {
|
|
|
22
16
|
const focusedRoute = state.routes[state.index];
|
|
23
17
|
if (focusedRoute?.key) {
|
|
24
18
|
ancestors.push(focusedRoute.key);
|
|
25
|
-
const previousRoute = state.routes[state.index - 1];
|
|
26
|
-
if (!ancestorDestinationPairKey && previousRoute?.key) {
|
|
27
|
-
ancestorDestinationPairKey = createScreenPairKey(previousRoute.key, focusedRoute.key);
|
|
28
|
-
}
|
|
29
19
|
}
|
|
30
20
|
}
|
|
31
21
|
parent = parent.getParent();
|
|
32
22
|
}
|
|
33
|
-
return
|
|
34
|
-
ancestorKeys: ancestors,
|
|
35
|
-
ancestorDestinationPairKey
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
export function getAncestorKeys(current) {
|
|
39
|
-
return getAncestorKeyState(current).ancestorKeys;
|
|
23
|
+
return ancestors;
|
|
40
24
|
}
|
|
41
25
|
//# sourceMappingURL=get-ancestor-keys.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["getAncestorKeys","current","ancestors","nav","navigation","getParent","parent","state","getState","routes","index","undefined","focusedRoute","key","push"],"sourceRoot":"../../../../../../src","sources":["providers/screen/descriptors/helpers/get-ancestor-keys.ts"],"mappings":";;AAEA;AACA;AACA;AACA,OAAO,SAASA,eAAeA,CAACC,OAA4B,EAAY;EACvE,MAAMC,SAAmB,GAAG,EAAE;EAC9B,MAAMC,GAAG,GAAGF,OAAO,CAACG,UAAiB;EAErC,IAAI,OAAOD,GAAG,EAAEE,SAAS,KAAK,UAAU,EAAE;IACzC,OAAOH,SAAS;EACjB;EAEA,IAAII,MAAM,GAAGH,GAAG,CAACE,SAAS,CAAC,CAAC;EAE5B,OAAOC,MAAM,EAAE;IACd,MAAMC,KAAK,GAAGD,MAAM,CAACE,QAAQ,CAAC,CAAC;IAC/B,IAAID,KAAK,EAAEE,MAAM,IAAIF,KAAK,CAACG,KAAK,KAAKC,SAAS,EAAE;MAC/C,MAAMC,YAAY,GAAGL,KAAK,CAACE,MAAM,CAACF,KAAK,CAACG,KAAK,CAAC;MAC9C,IAAIE,YAAY,EAAEC,GAAG,EAAE;QACtBX,SAAS,CAACY,IAAI,CAACF,YAAY,CAACC,GAAG,CAAC;MACjC;IACD;IACAP,MAAM,GAAGA,MAAM,CAACD,SAAS,CAAC,CAAC;EAC5B;EAEA,OAAOH,SAAS;AACjB","ignoreList":[]}
|
|
@@ -54,6 +54,22 @@ function getEntry(tag, key) {
|
|
|
54
54
|
|
|
55
55
|
return boundaryRegistry.get()[tag]?.screens[key] ?? null;
|
|
56
56
|
}
|
|
57
|
+
function getMatchingSourceScreenKey(tag, destinationScreenKey, preferredScreenKey) {
|
|
58
|
+
"worklet";
|
|
59
|
+
|
|
60
|
+
const screens = boundaryRegistry.get()[tag]?.screens;
|
|
61
|
+
if (!screens) return null;
|
|
62
|
+
if (preferredScreenKey && preferredScreenKey !== destinationScreenKey && screens[preferredScreenKey]) {
|
|
63
|
+
return preferredScreenKey;
|
|
64
|
+
}
|
|
65
|
+
let latestScreenKey = null;
|
|
66
|
+
for (const screenKey in screens) {
|
|
67
|
+
if (screenKey !== destinationScreenKey) {
|
|
68
|
+
latestScreenKey = screenKey;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return latestScreenKey;
|
|
72
|
+
}
|
|
57
73
|
function setEntry(tag, screenKey, patch) {
|
|
58
74
|
"worklet";
|
|
59
75
|
|
|
@@ -82,5 +98,5 @@ function removeEntry(tag, screenKey) {
|
|
|
82
98
|
return state;
|
|
83
99
|
});
|
|
84
100
|
}
|
|
85
|
-
export { getEntry, removeEntry, setEntry };
|
|
101
|
+
export { getEntry, getMatchingSourceScreenKey, removeEntry, setEntry };
|
|
86
102
|
//# sourceMappingURL=entries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["hasAnyKeys","boundaryRegistry","ensureBoundaryState","state","tag","screens","ensureScreenEntry","screenKey","tagState","bounds","styles","applyEntryPatch","entry","patch","undefined","boundaryConfig","handoff","escapeClipping","getEntry","key","get","setEntry","modify","removeEntry"],"sourceRoot":"../../../../../src","sources":["stores/bounds/internals/entries.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAE5C,SAAoCC,gBAAgB,QAAQ,SAAS;AAErE,MAAMC,mBAAmB,GAAGA,CAACC,KAA2B,EAAEC,GAAU,KAAK;EACxE,SAAS;;EACT,IAAI,CAACD,KAAK,CAACC,GAAG,CAAC,EAAE;IAChBD,KAAK,CAACC,GAAG,CAAC,GAAG;MACZC,OAAO,EAAE,CAAC;IACX,CAAC;EACF;EACA,OAAOF,KAAK,CAACC,GAAG,CAAC;AAClB,CAAC;AAED,MAAME,iB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EAAE;IAC9CF,KAAK,CAACK,cAAc,GAAGJ,KAAK,CAACI,cAAc;EAC5C;AACD,CAAC;AAED,SAASC,QAAQA,CAACd,GAAU,EAAEe,GAAc,EAAgB;EAC3D,SAAS;;EACT,OAAOlB,gBAAgB,CAACmB,GAAG,CAAC,CAAC,CAAChB,GAAG,CAAC,EAAEC,OAAO,CAACc,GAAG,CAAC,IAAI,IAAI;AACzD;AAEA,SAASE,QAAQA,
|
|
1
|
+
{"version":3,"names":["hasAnyKeys","boundaryRegistry","ensureBoundaryState","state","tag","screens","ensureScreenEntry","screenKey","tagState","bounds","styles","applyEntryPatch","entry","patch","undefined","boundaryConfig","handoff","escapeClipping","getEntry","key","get","getMatchingSourceScreenKey","destinationScreenKey","preferredScreenKey","latestScreenKey","setEntry","modify","removeEntry"],"sourceRoot":"../../../../../src","sources":["stores/bounds/internals/entries.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAE5C,SAAoCC,gBAAgB,QAAQ,SAAS;AAErE,MAAMC,mBAAmB,GAAGA,CAACC,KAA2B,EAAEC,GAAU,KAAK;EACxE,SAAS;;EACT,IAAI,CAACD,KAAK,CAACC,GAAG,CAAC,EAAE;IAChBD,KAAK,CAACC,GAAG,CAAC,GAAG;MACZC,OAAO,EAAE,CAAC;IACX,CAAC;EACF;EACA,OAAOF,KAAK,CAACC,GAAG,CAAC;AAClB,CAAC;AAED,MAAME,iBAAiB,GAAGA,CACzBH,KAA2B,EAC3BC,GAAU,EACVG,SAAoB,KACT;EACX,SAAS;;EACT,MAAMC,QAAQ,GAAGN,mBAAmB,CAACC,KAAK,EAAEC,GAAG,CAAC;EAChD,IAAI,CAACI,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC,EAAE;IACjCC,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC,GAAG;MAC7BE,MAAM,EAAE,IAAI;MACZC,MAAM,EAAE,CAAC;IACV,CAAC;EACF;EACA,OAAOF,QAAQ,CAACH,OAAO,C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ASe,QAAQ,EAAEG,0BAA0B,EAAEM,WAAW,EAAEF,QAAQ","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { createGroupTag, ensurePairGroups, ensurePairLinks, ensurePairSourceRequests, getGroupKeyFromTag, getLinkKeyFromTag, getActiveGroupId as getPairActiveGroupId, getDestination as getPairDestination, getLink as getPairLink, getSource as getPairSource } from "../helpers/link-pairs.helpers";
|
|
3
|
+
import { createGroupTag, ensurePairGroups, ensurePairLinks, ensurePairSourceRequests, getDestinationScreenKeyFromPairKey, getGroupKeyFromTag, getLinkKeyFromTag, getActiveGroupId as getPairActiveGroupId, getDestination as getPairDestination, getLink as getPairLink, getSource as getPairSource, getSourceScreenKeyFromPairKey } from "../helpers/link-pairs.helpers";
|
|
4
4
|
import { pairs } from "./state";
|
|
5
5
|
const syncLinkStatus = link => {
|
|
6
6
|
"worklet";
|
|
@@ -271,6 +271,29 @@ function getResolvedLink(pairKey, tag) {
|
|
|
271
271
|
link
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
+
function getPairKeyForSource(tag, screenKey) {
|
|
275
|
+
"worklet";
|
|
276
|
+
|
|
277
|
+
const state = pairs.get();
|
|
278
|
+
const linkKey = getLinkKeyFromTag(tag);
|
|
279
|
+
for (const pairKey in state) {
|
|
280
|
+
if (getSourceScreenKeyFromPairKey(pairKey) !== screenKey) continue;
|
|
281
|
+
if (getResolvedLink(pairKey, tag).link?.destination || state[pairKey]?.sourceRequests?.[linkKey]) {
|
|
282
|
+
return pairKey;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
function getPairKeyForDestination(tag, screenKey) {
|
|
288
|
+
"worklet";
|
|
289
|
+
|
|
290
|
+
const state = pairs.get();
|
|
291
|
+
for (const pairKey in state) {
|
|
292
|
+
if (getDestinationScreenKeyFromPairKey(pairKey) !== screenKey) continue;
|
|
293
|
+
if (getResolvedLink(pairKey, tag).link) return pairKey;
|
|
294
|
+
}
|
|
295
|
+
return null;
|
|
296
|
+
}
|
|
274
297
|
function getSource(pairKey, tag) {
|
|
275
298
|
"worklet";
|
|
276
299
|
|
|
@@ -281,5 +304,5 @@ function getDestination(pairKey, tag) {
|
|
|
281
304
|
|
|
282
305
|
return getPairDestination(pairs.get(), pairKey, getLinkKeyFromTag(tag));
|
|
283
306
|
}
|
|
284
|
-
export { getActiveGroupId, getDestination, getLink, getResolvedLink, getSource, requestSourceMeasure, setActiveGroupId, setDestination, setSource };
|
|
307
|
+
export { getActiveGroupId, getDestination, getLink, getPairKeyForDestination, getPairKeyForSource, getResolvedLink, getSource, requestSourceMeasure, setActiveGroupId, setDestination, setSource };
|
|
285
308
|
//# sourceMappingURL=links.js.map
|