react-native-screen-transitions 3.11.0 → 3.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +27 -15
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js +3 -1
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +3 -5
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +5 -4
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +4 -15
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +22 -24
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +3 -36
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +8 -4
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +2 -4
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js +3 -7
- package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +1 -3
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +3 -20
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js +15 -14
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +17 -17
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/entries.js +27 -0
- package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +25 -0
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +2 -12
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +2 -2
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +30 -18
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js +3 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +3 -5
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +5 -4
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +4 -15
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +22 -24
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +3 -36
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +2 -2
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/destination-signals.js +8 -4
- package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/refresh-signals.js +2 -4
- package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js +4 -8
- package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +1 -3
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +3 -19
- package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js +15 -14
- package/lib/module/shared/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +17 -17
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/entries.js +27 -1
- package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +25 -2
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +3 -13
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +3 -3
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts +1 -5
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +0 -2
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts +2 -3
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts +0 -2
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +1 -3
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts +0 -8
- package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-interpolator-style-handoff.d.ts +1 -3
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-interpolator-style-handoff.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +4 -4
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts +2 -1
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +3 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +67 -24
- package/src/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.ts +6 -1
- package/src/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +8 -9
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +5 -4
- package/src/shared/components/boundary/portal/components/boundary-content-portal/components/host.tsx +1 -1
- package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +4 -20
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts +27 -37
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +10 -57
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts +1 -8
- package/src/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +0 -3
- package/src/shared/components/boundary/utils/destination-signals.ts +8 -8
- package/src/shared/components/boundary/utils/refresh-signals.ts +2 -10
- package/src/shared/providers/screen/descriptors/descriptors.provider.tsx +4 -11
- package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +0 -4
- package/src/shared/providers/screen/descriptors/helpers/get-ancestor-keys.ts +3 -30
- package/src/shared/providers/screen/styles/helpers/resolve-interpolator-style-handoff.ts +16 -16
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +21 -24
- package/src/shared/stores/bounds/internals/entries.ts +38 -1
- package/src/shared/stores/bounds/internals/links.ts +36 -0
- package/src/shared/stores/bounds/internals/resolver.ts +7 -21
- package/src/shared/utils/bounds/helpers/create-link-accessor.ts +9 -3
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js +0 -18
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js +0 -13
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts +0 -3
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts.map +0 -1
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.ts +0 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useLayoutEffect","useRef","useState","runOnJS","useAnimatedReaction","
|
|
1
|
+
{"version":3,"names":["useCallback","useLayoutEffect","useRef","useState","runOnJS","useAnimatedReaction","getPairKeyForSource","createBoundaryPortalHostName","mountPortalBoundaryHost","unmountPortalBoundaryHostByName","useActivePortalBoundaryHost","boundaryId","currentScreenKey","escapeHostKey","portalHostName","portalHostReady","slotsMap","activePortal","setActivePortal","activePairKeyRef","updateActivePortal","pairKey","current","isBoundaryAnimating","get","undefined","previousPairKey","set","nextPortalHostName","hostKey","screenKey"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,eAAe,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACtE,SACCC,OAAO,EAEPC,mBAAmB,QACb,yBAAyB;AAChC,SAASC,mBAAmB,QAAQ,iDAAiD;AAGrF,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SACCC,uBAAuB,EACvBC,+BAA+B,QACzB,sCAAsC;AAe7C,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC3CC,UAAU;EACVC,gBAAgB;EAChBC,aAAa;EACbC,cAAc;EACdC,eAAe;EACfC;AACkC,CAAC,KAAK;EACxC,MAAM,CAACC,YAA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S,EAAElB,gBAAgB;MAC3BI;IACD,CAAC,CAAC;IACFF,cAAc,CAACa,GAAG,CAACC,kBAAkB,CAAC;IAEtC,OAAO,MAAM;MACZd,cAAc,CAACa,GAAG,CAAC,IAAI,CAAC;MACxBZ,eAAe,CAACY,GAAG,CAAC,KAAK,CAAC;MAC1BlB,+BAA+B,CAACmB,kBAAkB,CAAC;IACpD,CAAC;EACF,CAAC,EAAE,CACFX,YAAY,EACZN,UAAU,EACVC,gBAAgB,EAChBC,aAAa,EACbC,cAAc,EACdC,eAAe,EACfC,QAAQ,CACR,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -3,40 +3,26 @@
|
|
|
3
3
|
import { useAnimatedProps, useSharedValue } from "react-native-reanimated";
|
|
4
4
|
import { useDescriptorsStore } from "../../../../../../providers/screen/descriptors";
|
|
5
5
|
import { useScreenSlots } from "../../../../../../providers/screen/styles";
|
|
6
|
-
import { hasCloseTransitionFinished } from "../../../../../../providers/screen/styles/helpers/transition-visual-state";
|
|
7
|
-
import { AnimationStore } from "../../../../../../stores/animation.store";
|
|
8
|
-
import { pairs } from "../../../../../../stores/bounds/internals/state";
|
|
9
|
-
import { SystemStore } from "../../../../../../stores/system.store";
|
|
10
6
|
import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
|
|
11
7
|
import { isTeleportEnabled } from "../../../utils/teleport-control";
|
|
12
|
-
import { hasActiveBoundaryPortalLink } from "../helpers/active-pair";
|
|
13
8
|
import { useActiveHostKey } from "../stores/host-registry.store";
|
|
14
9
|
import { useActivePortalBoundaryHost } from "./use-active-portal-boundary-host";
|
|
15
10
|
export const useBoundaryPortalAttachment = ({
|
|
16
11
|
boundaryId
|
|
17
12
|
}) => {
|
|
18
|
-
const sourcePairKey = useDescriptorsStore(s => s.derivations.sourcePairKey);
|
|
19
13
|
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
20
|
-
const nextScreenKey = useDescriptorsStore(s => s.derivations.nextScreenKey);
|
|
21
|
-
const destinationScreenKey = nextScreenKey ?? currentScreenKey;
|
|
22
|
-
const destinationAnimationProgress = SystemStore.getValue(destinationScreenKey, "animationProgress");
|
|
23
|
-
const destinationClosing = AnimationStore.getValue(destinationScreenKey, "closing");
|
|
24
14
|
const {
|
|
25
|
-
localStylesMaps,
|
|
26
15
|
slotsMap
|
|
27
16
|
} = useScreenSlots();
|
|
28
17
|
const portalHostName = useSharedValue(null);
|
|
29
18
|
const portalHostReady = useSharedValue(false);
|
|
30
|
-
const attachedDestination = useSharedValue(null);
|
|
31
19
|
const escapeHostKey = useActiveHostKey(currentScreenKey);
|
|
32
20
|
useActivePortalBoundaryHost({
|
|
33
21
|
boundaryId,
|
|
34
22
|
currentScreenKey,
|
|
35
23
|
escapeHostKey,
|
|
36
|
-
localStylesMaps,
|
|
37
24
|
portalHostName,
|
|
38
25
|
portalHostReady,
|
|
39
|
-
sourcePairKey,
|
|
40
26
|
slotsMap
|
|
41
27
|
});
|
|
42
28
|
const teleportProps = useAnimatedProps(() => {
|
|
@@ -48,30 +34,11 @@ export const useBoundaryPortalAttachment = ({
|
|
|
48
34
|
teleport,
|
|
49
35
|
...slotProps
|
|
50
36
|
} = slot?.props ?? {};
|
|
51
|
-
const
|
|
52
|
-
const hostName = portalHostName.get();
|
|
53
|
-
const hasActiveLink = hasActiveBoundaryPortalLink({
|
|
54
|
-
boundaryId,
|
|
55
|
-
pairsState: pairs.get(),
|
|
56
|
-
sourcePairKey
|
|
57
|
-
});
|
|
58
|
-
const hasAttachableHost = shouldTeleport && hasActiveLink && portalHostReady.get() && hostName;
|
|
59
|
-
if (hasAttachableHost) {
|
|
60
|
-
attachedDestination.set({
|
|
61
|
-
animationProgress: destinationAnimationProgress,
|
|
62
|
-
closing: destinationClosing
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
const attached = attachedDestination.get();
|
|
66
|
-
const hasAttachedCloseFinished = attached !== null && hasCloseTransitionFinished({
|
|
67
|
-
animationProgress: attached.animationProgress.get(),
|
|
68
|
-
closing: attached.closing.get()
|
|
69
|
-
});
|
|
70
|
-
const canAttach = hasAttachableHost && !hasAttachedCloseFinished;
|
|
71
|
-
const targetHostName = canAttach ? hostName : PORTAL_HOST_NAME_RESET_VALUE;
|
|
37
|
+
const shouldAttach = slot !== undefined && isTeleportEnabled(teleport) && portalHostReady.get();
|
|
38
|
+
const hostName = shouldAttach ? portalHostName.get() : PORTAL_HOST_NAME_RESET_VALUE;
|
|
72
39
|
return {
|
|
73
40
|
...slotProps,
|
|
74
|
-
hostName
|
|
41
|
+
hostName
|
|
75
42
|
};
|
|
76
43
|
});
|
|
77
44
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedProps","useSharedValue","useDescriptorsStore","useScreenSlots","
|
|
1
|
+
{"version":3,"names":["useAnimatedProps","useSharedValue","useDescriptorsStore","useScreenSlots","PORTAL_HOST_NAME_RESET_VALUE","isTeleportEnabled","useActiveHostKey","useActivePortalBoundaryHost","useBoundaryPortalAttachment","boundaryId","currentScreenKey","s","derivations","slotsMap","portalHostName","portalHostReady","escapeHostKey","teleportProps","slot","get","pointerEvents","_pointerEvents","teleport","slotProps","props","shouldAttach","undefined","hostName"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts"],"mappings":";;AAAA,SAASA,gBAAgB,EAAEC,cAAc,QAAQ,yBAAyB;AAC1E,SAASC,mBAAmB,QAAQ,gDAAgD;AACpF,SAASC,cAAc,QAAQ,2CAA2C;AAC1E,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SAASC,iBAAiB,QAAQ,iCAAiC;AACnE,SAASC,gBAAgB,QAAQ,+BAA+B;AAChE,SAASC,2BAA2B,QAAQ,mCAAmC;AAM/E,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC3CC;AACkC,CAAC,KAAK;EACxC,MAAMC,gBAAgB,GAAGR,mBAAmB,CAC1CS,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,gBACtB,CAAC;EACD,MAAM;IAAEG;EAAS,CAAC,GAAGV,cAAc,CAAC,CAAC;EACrC,MAAMW,cAAc,GAAGb,cAAc,CAAgB,IAAI,CAAC;EAC1D,MAAMc,eAAe,GAAGd,cAAc,CAAC,KAAK,CAAC;EAC7C,MAAMe,aAAa,GAAGV,gBAAgB,CAACI,gBAAgB,CAAC;EAExDH,2BAA2B,CAAC;IAC3BE,UAAU;IACVC,gBAAgB;IAChBM,aAAa;IACbF,cAAc;IACdC,eAAe;IACfF;EACD,CAAC,CAAC;EAEF,MAAMI,aAAa,GAAGjB,gBAAgB,CAAC,MAAM;IAC5C,SAAS;;IAET,MAAMkB,IAAI,GAAGL,QAAQ,CAACM,GAAG,CAAC,CAAC,CAACV,UAAU,CAAC;IACvC,MAAM;MACLW,aAAa,EAAEC,cAAc;MAC7BC,QAAQ;MACR,GAAGC;IACJ,CAAC,GAAGL,IAAI,EAAEM,KAAK,IAAI,CAAC,CAAC;IACrB,MAAMC,YAAY,GACjBP,IAAI,KAAKQ,SAAS,IAClBrB,iBAAiB,CAACiB,QAAQ,CAAC,IAC3BP,eAAe,CAACI,GAAG,CAAC,CAAC;IACtB,MAAMQ,QAAQ,GAAGF,YAAY,GAC1BX,cAAc,CAACK,GAAG,CAAC,CAAC,GACpBf,4BAA4B;IAE/B,OAAO;MACN,GAAGmB,SAAS;MACZI;IACD,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IAAEV;EAAc,CAAC;AACzB,CAAC","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ import { useLayoutEffect } from "react";
|
|
|
4
4
|
import { cancelAnimation, measure, runOnUI, useAnimatedReaction, useAnimatedRef, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
|
|
5
5
|
import { ScrollStore } from "../../../../../../stores/scroll.store";
|
|
6
6
|
import { getVisibilityBlockOffset } from "../../../../../../utils/visibility-block-offset";
|
|
7
|
-
import { adjustedMeasuredBoundsForOverscrollDeltas, correctMeasuredBoundsForVisibilityGate
|
|
7
|
+
import { adjustedMeasuredBoundsForOverscrollDeltas, correctMeasuredBoundsForVisibilityGate } from "../../../../utils/measured-bounds";
|
|
8
8
|
import { clearPortalHostBounds, setPortalHostBounds } from "../stores/host-bounds.store";
|
|
9
9
|
const HOST_MEASUREMENT_RETRY_DELAY_MS = 16;
|
|
10
10
|
export const useHostMeasurement = ({
|
|
@@ -60,7 +60,7 @@ export const useHostMeasurement = ({
|
|
|
60
60
|
viewportWidth,
|
|
61
61
|
viewportHeight
|
|
62
62
|
});
|
|
63
|
-
if (
|
|
63
|
+
if (correctedMeasured.width <= 0 || correctedMeasured.height <= 0) {
|
|
64
64
|
cancelAnimation(retryToken);
|
|
65
65
|
retryToken.set(withDelay(HOST_MEASUREMENT_RETRY_DELAY_MS, withTiming(retryToken.get() + 1, {
|
|
66
66
|
duration: 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useLayoutEffect","cancelAnimation","measure","runOnUI","useAnimatedReaction","useAnimatedRef","useSharedValue","withDelay","withTiming","ScrollStore","getVisibilityBlockOffset","adjustedMeasuredBoundsForOverscrollDeltas","correctMeasuredBoundsForVisibilityGate","
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","cancelAnimation","measure","runOnUI","useAnimatedReaction","useAnimatedRef","useSharedValue","withDelay","withTiming","ScrollStore","getVisibilityBlockOffset","adjustedMeasuredBoundsForOverscrollDeltas","correctMeasuredBoundsForVisibilityGate","clearPortalHostBounds","setPortalHostBounds","HOST_MEASUREMENT_RETRY_DELAY_MS","useHostMeasurement","capturesScroll","enabled","hostKey","screenKey","visibilityBlocked","viewportHeight","viewportWidth","hostRef","scrollMetadata","getValue","hasMeasuredHost","retryToken","get","state","hasAlreadyMeasured","measured","set","duration","currentScroll","overscrollNormalized","correctedMeasured","visibilityBlockOffset","width","height","x","y","pageX","pageY","scroll"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/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AK;MAC9BC,KAAK,EAAEP,iBAAiB,CAACO,KAAK;MAC9BC,MAAM,EAAE5B,cAAc,GAAGkB,aAAa,GAAG;IAC1C,CAAC,CAAC;IAEFR,eAAe,CAACM,GAAG,CAAC,IAAI,CAAC;EAC1B,CACD,CAAC;EAEDjC,eAAe,CAAC,MAAM;IACrB,OAAO,MAAM;MACZG,OAAO,CAACU,qBAAqB,CAAC,CAACM,OAAO,CAAC;IACxC,CAAC;EACF,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,OAAO;IACNK;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -25,7 +25,7 @@ const emit = () => {
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
const isSameHost = (a, b) => {
|
|
28
|
-
return a.boundaryId === b.boundaryId && a.hostKey === b.hostKey && a.
|
|
28
|
+
return a.boundaryId === b.boundaryId && a.hostKey === b.hostKey && a.pairKey === b.pairKey && a.portalHostName === b.portalHostName && a.portalHostReady === b.portalHostReady && a.screenKey === b.screenKey && a.slotsMap === b.slotsMap;
|
|
29
29
|
};
|
|
30
30
|
export const mountPortalBoundaryHost = host => {
|
|
31
31
|
const previous = activeBoundaryHosts.get(host.portalHostName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useSyncExternalStore","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","
|
|
1
|
+
{"version":3,"names":["useSyncExternalStore","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","pairKey","portalHostName","portalHostReady","screenKey","slotsMap","mountPortalBoundaryHost","previous","get","set","unmountPortalBoundaryHostByName","delete","subscribe","add","useActivePortalBoundaryHosts"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-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,QAAQ;AAE3B,CAAC;AAED,OAAO,MAAMC,uBAAuB,GAAIhB,IAA8B,IAAK;EAC1E,MAAMiB,QAAQ,GAAGtB,mBAAmB,CAACuB,GAAG,CAAClB,IAAI,CAACY,cAAc,CAAC;EAC7D,IAAIK,QAAQ,IAAIV,UAAU,CAACU,QAAQ,EAAEjB,IAAI,CAAC,EAAE;IAC3C;EACD;EAEAL,mBAAmB,CAACwB,GAAG,CAACnB,IAAI,CAACY,cAAc,EAAEZ,IAAI,CAAC;EAClDK,IAAI,CAAC,CAAC;AACP,CAAC;AAED,OAAO,MAAMe,+BAA+B,GAC3CR,cAAyC,IACrC;EACJ,IAAI,CAACA,cAAc,IAAI,CAACjB,mBAAmB,CAAC0B,MAAM,CAACT,cAAc,CAAC,EAAE;IACnE;EACD;EAEAP,IAAI,CAAC,CAAC;AACP,CAAC;AAED,MAAMiB,SAAS,GAAIhB,QAAoB,IAAK;EAC3Cb,SAAS,CAAC8B,GAAG,CAACjB,QAAQ,CAAC;EAEvB,OAAO,MAAM;IACZb,SAAS,CAAC4B,MAAM,CAACf,QAAQ,CAAC;EAC3B,CAAC;AACF,CAAC;AAED,OAAO,MAAMkB,4BAA4B,GAAIrB,OAAe,IAAK;EAChE,OAAOZ,oBAAoB,CAC1B+B,SAAS,EACT,MAAMzB,QAAQ,CAACC,YAAY,CAACK,OAAO,CAAC,IAAIX,WAAW,EACnD,MAAMA,WACP,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -6,18 +6,22 @@ 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
|
-
|
|
18
|
-
if (!enabled || !pairKey) {
|
|
16
|
+
if (!enabled) {
|
|
19
17
|
return null;
|
|
20
18
|
}
|
|
19
|
+
if (!pairKey) {
|
|
20
|
+
return {
|
|
21
|
+
pairKey: null,
|
|
22
|
+
action: "wait"
|
|
23
|
+
};
|
|
24
|
+
}
|
|
21
25
|
if (!destinationPresent) {
|
|
22
26
|
return {
|
|
23
27
|
pairKey,
|
|
@@ -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":["shared/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,EAAE;IACb,OAAO,IAAI;EACZ;EAEA,IAAI,CAACC,OAAO,EAAE;IACb,OAAO;MAAEA,OAAO,EAAE,IAAI;MAAEM,MAAM,EAAE;IAAO,CAAC;EACzC;EAEA,IAAI,CAACH,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":["shared/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,CAAC,GAAGT,MAAM;EAEV,IAAI,CAACC,OAAO,EAAE,OAAO,IAAI;EAEzB,IAAI,CAACM,aAAa,EAAE;IACnB,OAAO,IAAI;EACZ;;EAEA;E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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":["shared/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,CAAC,KAAK;EACpD,MAAMC,iBAAiB,GAAGZ,kBAAkB,CAAEa,KAAK,IAClDH,QAAQ,GAAGG,KAAK,EAAEC,WAAW,CAACJ,QAAQ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AC;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":[]}
|
package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js
CHANGED
|
@@ -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/shared/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":["shared/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":["shared/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":[]}
|
package/lib/module/shared/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js
CHANGED
|
@@ -46,16 +46,16 @@ const mergeSlots = (frozen, live) => {
|
|
|
46
46
|
}
|
|
47
47
|
return merged;
|
|
48
48
|
};
|
|
49
|
-
const
|
|
49
|
+
const composeCurrentAndNextStyles = (current, next) => {
|
|
50
50
|
"worklet";
|
|
51
51
|
|
|
52
52
|
const composed = {
|
|
53
|
-
...
|
|
53
|
+
...current
|
|
54
54
|
};
|
|
55
|
-
for (const slotId in
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
composed[slotId] = mergeSlots(
|
|
55
|
+
for (const slotId in next) {
|
|
56
|
+
const nextSlot = next[slotId];
|
|
57
|
+
if (nextSlot) {
|
|
58
|
+
composed[slotId] = mergeSlots(current[slotId], nextSlot);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
return composed;
|
|
@@ -63,26 +63,27 @@ const composeFrozenAndLiveStyles = (frozen, live) => {
|
|
|
63
63
|
export const resolveInterpolatorStyleHandoff = ({
|
|
64
64
|
currentOwnsInterpolator,
|
|
65
65
|
currentStylesMap,
|
|
66
|
-
nextStylesMap
|
|
67
|
-
frozenCurrentStylesMap
|
|
66
|
+
nextStylesMap
|
|
68
67
|
}) => {
|
|
69
68
|
"worklet";
|
|
70
69
|
|
|
71
70
|
if (currentOwnsInterpolator) {
|
|
72
71
|
return {
|
|
73
|
-
localStylesMaps: currentStylesMap ? [currentStylesMap] : []
|
|
74
|
-
nextFrozenCurrentStylesMap: currentStylesMap ?? frozenCurrentStylesMap
|
|
72
|
+
localStylesMaps: currentStylesMap ? [currentStylesMap] : []
|
|
75
73
|
};
|
|
76
74
|
}
|
|
77
75
|
if (!nextStylesMap) {
|
|
78
76
|
return {
|
|
79
|
-
localStylesMaps:
|
|
80
|
-
|
|
77
|
+
localStylesMaps: currentStylesMap ? [currentStylesMap] : []
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
if (!currentStylesMap) {
|
|
81
|
+
return {
|
|
82
|
+
localStylesMaps: [nextStylesMap]
|
|
81
83
|
};
|
|
82
84
|
}
|
|
83
85
|
return {
|
|
84
|
-
localStylesMaps: [
|
|
85
|
-
nextFrozenCurrentStylesMap: frozenCurrentStylesMap
|
|
86
|
+
localStylesMaps: [composeCurrentAndNextStyles(currentStylesMap, nextStylesMap)]
|
|
86
87
|
};
|
|
87
88
|
};
|
|
88
89
|
//# sourceMappingURL=resolve-interpolator-style-handoff.js.map
|
package/lib/module/shared/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["mergeBuckets","frozen","live","composeTransforms","merged","key","liveValue","undefined","frozenValue","Array","isArray","mergeSlots","style","props","boundsLocalTransform","
|
|
1
|
+
{"version":3,"names":["mergeBuckets","frozen","live","composeTransforms","merged","key","liveValue","undefined","frozenValue","Array","isArray","mergeSlots","style","props","boundsLocalTransform","composeCurrentAndNextStyles","current","next","composed","slotId","nextSlot","resolveInterpolatorStyleHandoff","currentOwnsInterpolator","currentStylesMap","nextStylesMap","localStylesMaps"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/styles/helpers/resolve-interpolator-style-handoff.ts"],"mappings":";;AAMA,MAAMA,YAAY,GAAGA,CACpBC,MAA2C,EAC3CC,IAAyC,EACzCC,iBAA0B,KACtB;EACJ,SAAS;;EAET,IAAI,CAACF,MAAM,EAAE;IACZ,OAAOC,IAAI;EACZ;EAEA,IAAI,CAACA,IAAI,EAAE;IACV,OAAOD,MAAM;EACd;EAEA,MAAMG,MAA+B,GAAG;IAAE,GAAGH;EAAO,CAAC;EAErD,KAAK,MAAMI,GAAG,IAAIH,IAAI,EAAE;IACvB,MAAMI,SAAS,GAAGJ,IAAI,CAACG,GAAG,CAAC;IAE3B,IAAIC,SAAS,KAAKC,SAAS,IAAID,SAAS,KAAK,IAAI,EAAE;MAClD;IACD;IAEA,MAAME,WAAW,GAAGP,MAAM,CAACI,GAAG,CAAC;IAE/B,IACCF,iBAAiB,IACjBE,GAAG,KAAK,WAAW,IACnBI,KAAK,CAACC,OAAO,CAACF,WAAW,CAAC,IAC1BC,KAAK,CAACC,OAAO,CAACJ,SAAS,CAAC,EACvB;MACDF,MAAM,CAACC,GAAG,CAAC,GAAG,CAAC,GAAGG,WAAW,EAAE,GAAGF,SAAS,CAAC;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AAuB;EACvBC,gBAAgB;EAChBC;AAKD,CAAC,KAEI;EACJ,SAAS;;EAET,IAAIF,uBAAuB,EAAE;IAC5B,OAAO;MACNG,eAAe,EAAEF,gBAAgB,GAAG,CAACA,gBAAgB,CAAC,GAAG;IAC1D,CAAC;EACF;EAEA,IAAI,CAACC,aAAa,EAAE;IACnB,OAAO;MACNC,eAAe,EAAEF,gBAAgB,GAAG,CAACA,gBAAgB,CAAC,GAAG;IAC1D,CAAC;EACF;EAEA,IAAI,CAACA,gBAAgB,EAAE;IACtB,OAAO;MACNE,eAAe,EAAE,CAACD,aAAa;IAChC,CAAC;EACF;EAEA,OAAO;IACNC,eAAe,EAAE,CAChBV,2BAA2B,CAACQ,gBAAgB,EAAEC,aAAa,CAAC;EAE9D,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -78,10 +78,10 @@ const runInterpolator = ({
|
|
|
78
78
|
* normal interpolator selection once the gesture-driven close is no longer in
|
|
79
79
|
* play.
|
|
80
80
|
*
|
|
81
|
-
* At an ownership handoff, the
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
81
|
+
* At an ownership handoff, the current interpolator remains live but is
|
|
82
|
+
* evaluated without the next-screen relationship. The next owner replaces
|
|
83
|
+
* matching scalar keys and composes its live transforms after the current
|
|
84
|
+
* screen's self-owned transforms.
|
|
85
85
|
*/
|
|
86
86
|
export const useInterpolatedStylesMap = ({
|
|
87
87
|
enabled,
|
|
@@ -119,7 +119,6 @@ export const useInterpolatedStylesMap = ({
|
|
|
119
119
|
} = SystemStore.getBag(activeScreenKey);
|
|
120
120
|
const isGesturingDuringCloseAnimation = useSharedValue(false);
|
|
121
121
|
const initialDestinationStylesReady = useSharedValue(0);
|
|
122
|
-
const frozenCurrentStylesMap = useSharedValue(NO_STYLES);
|
|
123
122
|
const shouldPrepareInitialDestinationStyles = enabled && !!destinationPairKey && !nextScreenKey && !!currentInterpolator;
|
|
124
123
|
useAnimatedReaction(() => {
|
|
125
124
|
"worklet";
|
|
@@ -180,14 +179,19 @@ export const useInterpolatedStylesMap = ({
|
|
|
180
179
|
const nextReady = currentOwnsInterpolator ? 0 : 1;
|
|
181
180
|
nextInterpolatorReady.set(nextReady);
|
|
182
181
|
const interpolatorOptionsOwner = currentOwnsInterpolator ? "current" : "next";
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
|
|
183
|
+
// Once the next interpolator owns the relationship, the current
|
|
184
|
+
// interpolator remains responsible only for its own live presentation.
|
|
185
|
+
// This preserves snap-point transforms without letting current-screen
|
|
186
|
+
// unfocus rules compete with the next screen's outgoing transition.
|
|
187
|
+
const currentSelectedFrame = selectInterpolatorFrame(props, isInGestureMode || !!nextInterpolator);
|
|
188
|
+
const currentResult = runInterpolator({
|
|
185
189
|
interpolator: currentInterpolator,
|
|
186
190
|
props,
|
|
187
|
-
selectedFrame,
|
|
191
|
+
selectedFrame: currentSelectedFrame,
|
|
188
192
|
bounds: boundsAccessor,
|
|
189
193
|
transition
|
|
190
|
-
})
|
|
194
|
+
});
|
|
191
195
|
const initialDestinationStyleGate = resolveInitialDestinationStyleGate({
|
|
192
196
|
shouldPrepareStyles: shouldPrepareInitialDestinationStyles,
|
|
193
197
|
isVisibilityBlocked: visibilityBlocked.get(),
|
|
@@ -202,18 +206,15 @@ export const useInterpolatedStylesMap = ({
|
|
|
202
206
|
const handoff = resolveInterpolatorStyleHandoff({
|
|
203
207
|
currentOwnsInterpolator: true,
|
|
204
208
|
currentStylesMap: currentResult?.stylesMap,
|
|
205
|
-
nextStylesMap: undefined
|
|
206
|
-
frozenCurrentStylesMap: frozenCurrentStylesMap.get()
|
|
209
|
+
nextStylesMap: undefined
|
|
207
210
|
});
|
|
208
|
-
if (handoff.nextFrozenCurrentStylesMap !== frozenCurrentStylesMap.get()) {
|
|
209
|
-
frozenCurrentStylesMap.set(handoff.nextFrozenCurrentStylesMap);
|
|
210
|
-
}
|
|
211
211
|
return handoff.localStylesMaps.length ? handoff.localStylesMaps : NO_STYLE_LAYERS;
|
|
212
212
|
}
|
|
213
|
+
const nextSelectedFrame = selectInterpolatorFrame(props, false);
|
|
213
214
|
const nextResult = runInterpolator({
|
|
214
215
|
interpolator: nextInterpolator,
|
|
215
216
|
props,
|
|
216
|
-
selectedFrame,
|
|
217
|
+
selectedFrame: nextSelectedFrame,
|
|
217
218
|
bounds: boundsAccessor,
|
|
218
219
|
transition
|
|
219
220
|
});
|
|
@@ -222,8 +223,7 @@ export const useInterpolatedStylesMap = ({
|
|
|
222
223
|
const handoff = resolveInterpolatorStyleHandoff({
|
|
223
224
|
currentOwnsInterpolator: false,
|
|
224
225
|
currentStylesMap: currentResult?.stylesMap,
|
|
225
|
-
nextStylesMap: nextResult?.stylesMap
|
|
226
|
-
frozenCurrentStylesMap: frozenCurrentStylesMap.get()
|
|
226
|
+
nextStylesMap: nextResult?.stylesMap
|
|
227
227
|
});
|
|
228
228
|
return handoff.localStylesMaps.length ? handoff.localStylesMaps : NO_STYLE_LAYERS;
|
|
229
229
|
});
|