react-native-screen-transitions 3.11.0 → 3.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/create-interpolator-scope.js +40 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/create-interpolator-scope.js.map +1 -0
- 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 +22 -27
- 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/create-interpolator-scope.js +35 -0
- package/lib/module/shared/providers/screen/styles/helpers/create-interpolator-scope.js.map +1 -0
- 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 +22 -27
- 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/create-interpolator-scope.d.ts +9 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/create-interpolator-scope.d.ts.map +1 -0
- 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/create-interpolator-scope.ts +45 -0
- 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 +28 -35
- 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/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js +0 -21
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.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/module/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js +0 -16
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.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/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.d.ts +0 -2
- package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.d.ts.map +0 -1
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.ts +0 -16
- package/src/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.tsx +0 -15
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getEntry = getEntry;
|
|
7
|
+
exports.getMatchingSourceScreenKey = getMatchingSourceScreenKey;
|
|
7
8
|
exports.removeEntry = removeEntry;
|
|
8
9
|
exports.setEntry = setEntry;
|
|
9
10
|
var _keys = require("../helpers/keys");
|
|
@@ -60,6 +61,32 @@ function getEntry(tag, key) {
|
|
|
60
61
|
|
|
61
62
|
return _state.boundaryRegistry.get()[tag]?.screens[key] ?? null;
|
|
62
63
|
}
|
|
64
|
+
function getMatchingSourceScreenKey(tag, destinationScreenKey, preferredScreenKey, excludedScreenKeys) {
|
|
65
|
+
"worklet";
|
|
66
|
+
|
|
67
|
+
const screens = _state.boundaryRegistry.get()[tag]?.screens;
|
|
68
|
+
if (!screens) return null;
|
|
69
|
+
const isExcluded = screenKey => {
|
|
70
|
+
"worklet";
|
|
71
|
+
|
|
72
|
+
for (let index = 0; index < (excludedScreenKeys?.length ?? 0); index++) {
|
|
73
|
+
if (excludedScreenKeys?.[index] === screenKey) {
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return false;
|
|
78
|
+
};
|
|
79
|
+
if (preferredScreenKey && preferredScreenKey !== destinationScreenKey && !isExcluded(preferredScreenKey) && screens[preferredScreenKey]) {
|
|
80
|
+
return preferredScreenKey;
|
|
81
|
+
}
|
|
82
|
+
let latestScreenKey = null;
|
|
83
|
+
for (const screenKey in screens) {
|
|
84
|
+
if (screenKey !== destinationScreenKey && !isExcluded(screenKey)) {
|
|
85
|
+
latestScreenKey = screenKey;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return latestScreenKey;
|
|
89
|
+
}
|
|
63
90
|
function setEntry(tag, screenKey, patch) {
|
|
64
91
|
"worklet";
|
|
65
92
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_keys","require","_state","ensureBoundaryState","state","tag","screens","ensureScreenEntry","screenKey","tagState","bounds","styles","applyEntryPatch","entry","patch","undefined","boundaryConfig","handoff","escapeClipping","getEntry","key","boundaryRegistry","get","setEntry","modify","removeEntry","hasAnyKeys"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/entries.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_keys","require","_state","ensureBoundaryState","state","tag","screens","ensureScreenEntry","screenKey","tagState","bounds","styles","applyEntryPatch","entry","patch","undefined","boundaryConfig","handoff","escapeClipping","getEntry","key","boundaryRegistry","get","getMatchingSourceScreenKey","destinationScreenKey","preferredScreenKey","excludedScreenKeys","isExcluded","index","length","latestScreenKey","setEntry","modify","removeEntry","hasAnyKeys"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/entries.ts"],"mappings":";;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,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,CAACE,SAAS,CAAC;AACnC,CAAC;AAED,MAAMI,eAAe,GAAGA,CAACC,KAAY,EAAEC,KAAiB,KAAK;EAC5D,SAAS;;EACT,IAAIA,KAAK,C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AEH,OAAO,CAACE,SAAS,CAAC,EAAE;MAClC,OAAOJ,KAAK;IACb;IAEA,OAAOK,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC;IAClC,IAAI,CAAC,IAAA0B,gBAAU,EAACzB,QAAQ,CAACH,OAAO,CAAC,EAAE;MAClC,OAAOF,KAAK,CAACC,GAAG,CAAC;IAClB;IAEA,OAAOD,KAAK;EACb,CAAC,CAAC;AACH","ignoreList":[]}
|
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getActiveGroupId = getActiveGroupId;
|
|
7
7
|
exports.getDestination = getDestination;
|
|
8
8
|
exports.getLink = getLink;
|
|
9
|
+
exports.getPairKeyForDestination = getPairKeyForDestination;
|
|
10
|
+
exports.getPairKeyForSource = getPairKeyForSource;
|
|
9
11
|
exports.getResolvedLink = getResolvedLink;
|
|
10
12
|
exports.getSource = getSource;
|
|
11
13
|
exports.requestSourceMeasure = requestSourceMeasure;
|
|
@@ -283,6 +285,29 @@ function getResolvedLink(pairKey, tag) {
|
|
|
283
285
|
link
|
|
284
286
|
};
|
|
285
287
|
}
|
|
288
|
+
function getPairKeyForSource(tag, screenKey) {
|
|
289
|
+
"worklet";
|
|
290
|
+
|
|
291
|
+
const state = _state.pairs.get();
|
|
292
|
+
const linkKey = (0, _linkPairs.getLinkKeyFromTag)(tag);
|
|
293
|
+
for (const pairKey in state) {
|
|
294
|
+
if ((0, _linkPairs.getSourceScreenKeyFromPairKey)(pairKey) !== screenKey) continue;
|
|
295
|
+
if (getResolvedLink(pairKey, tag).link?.destination || state[pairKey]?.sourceRequests?.[linkKey]) {
|
|
296
|
+
return pairKey;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return null;
|
|
300
|
+
}
|
|
301
|
+
function getPairKeyForDestination(tag, screenKey) {
|
|
302
|
+
"worklet";
|
|
303
|
+
|
|
304
|
+
const state = _state.pairs.get();
|
|
305
|
+
for (const pairKey in state) {
|
|
306
|
+
if ((0, _linkPairs.getDestinationScreenKeyFromPairKey)(pairKey) !== screenKey) continue;
|
|
307
|
+
if (getResolvedLink(pairKey, tag).link) return pairKey;
|
|
308
|
+
}
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
286
311
|
function getSource(pairKey, tag) {
|
|
287
312
|
"worklet";
|
|
288
313
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_linkPairs","require","_state","syncLinkStatus","link","status","source","destination","isSharedValueLike","value","_isReanimatedSharedValue","snapshotSharedValue","snapshotTransformArrayValue","snapshot","index","length","snapshotValue","snapshotTransformEntryValue","undefined","push","Array","isArray","snapshotTransformItem","hasValue","key","snapshotTransform","snapshotStyles","styles","transform","createLinkSide","screenKey","bounds","runtimeFlags","handoff","escapeClipping","writePairLink","state","pairKey","linkKey","ensurePairLinks","writeGroup","group","activeId","initialId","previousInitialId","groups","ensurePairGroups","writeDestination","existingLink","getPairLink","initialDestination","setSource","tag","pairs","modify","getLinkKeyFromTag","pairLinks","initialSource","sourceRequests","setDestination","setActiveGroupId","requestSourceMeasure","ensurePairSourceRequests","getActiveGroupId","getPairActiveGroupId","get","getLink","hasSourceLink","getResolvedLink","getGroupKeyFromTag","initialLink","createGroupTag","getSource","getPairSource","getDestination","getPairDestination"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/links.ts"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAuBA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,cAAc,GAAIC,IAAa,IAAK;EACzC,SAAS;;EACTA,IAAI,CAACC,MAAM,GAAGD,IAAI,CAACE,MAAM,GACtBF,IAAI,CAACG,WAAW,GACf,UAAU,GACV,wBAAwB,GACzB,mBAAmB;AACvB,CAAC;AAQD,MAAMC,iBAAiB,GAAIC,KAAc,IAA+B;EACvE,SAAS;;EACT,OACEA,KAAK,EAAsCC,wBAAwB,KACpE,IAAI;AAEN,CAAC;AAED,MAAMC,m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EAAE,IAAAkB,4BAAiB,EAACH,GAAG,CAAC,CAAC;AACnE;AAEA,SAASsB,cAAcA,CACtBrC,OAAsB,EACtBe,GAAU,EACsB;EAChC,SAAS;;EACT,OAAO,IAAAuB,yBAAkB,EAACtB,YAAK,CAACY,GAAG,CAAC,CAAC,EAAE5B,OAAO,EAAE,IAAAkB,4BAAiB,EAACH,GAAG,CAAC,CAAC;AACxE","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_linkPairs","require","_state","syncLinkStatus","link","status","source","destination","isSharedValueLike","value","_isReanimatedSharedValue","snapshotSharedValue","snapshotTransformArrayValue","snapshot","index","length","snapshotValue","snapshotTransformEntryValue","undefined","push","Array","isArray","snapshotTransformItem","hasValue","key","snapshotTransform","snapshotStyles","styles","transform","createLinkSide","screenKey","bounds","runtimeFlags","handoff","escapeClipping","writePairLink","state","pairKey","linkKey","ensurePairLinks","writeGroup","group","activeId","initialId","previousInitialId","groups","ensurePairGroups","writeDestination","existingLink","getPairLink","initialDestination","setSource","tag","pairs","modify","getLinkKeyFromTag","pairLinks","initialSource","sourceRequests","setDestination","setActiveGroupId","requestSourceMeasure","ensurePairSourceRequests","getActiveGroupId","getPairActiveGroupId","get","getLink","hasSourceLink","getResolvedLink","getGroupKeyFromTag","initialLink","createGroupTag","getPairKeyForSource","getSourceScreenKeyFromPairKey","getPairKeyForDestination","getDestinationScreenKeyFromPairKey","getSource","getPairSource","getDestination","getPairDestination"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/links.ts"],"mappings":";;;;;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAyBA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,cAAc,GAAIC,IAAa,IAAK;EACzC,SAAS;;EACTA,IAAI,CAACC,MAAM,GAAGD,IAAI,CAACE,MAAM,GACtBF,IAAI,CAACG,WAAW,GACf,UAAU,GACV,wBAAwB,GACzB,mBAAmB;AACvB,CAAC;AAQD,MAAMC,iBAAiB,G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]}
|
|
@@ -4,22 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolveTransitionPair = resolveTransitionPair;
|
|
7
|
-
var _linkPairs = require("../helpers/link-pairs.helpers");
|
|
8
7
|
var _links = require("./links");
|
|
9
|
-
function resolvePairKey(context) {
|
|
10
|
-
"worklet";
|
|
11
|
-
|
|
12
|
-
if (context.entering) {
|
|
13
|
-
if (!context.previousScreenKey || !context.currentScreenKey) return null;
|
|
14
|
-
return (0, _linkPairs.createScreenPairKey)(context.previousScreenKey, context.currentScreenKey);
|
|
15
|
-
}
|
|
16
|
-
if (!context.currentScreenKey || !context.nextScreenKey) return null;
|
|
17
|
-
return (0, _linkPairs.createScreenPairKey)(context.currentScreenKey, context.nextScreenKey);
|
|
18
|
-
}
|
|
19
8
|
function resolveTransitionPair(tag, context) {
|
|
20
9
|
"worklet";
|
|
21
10
|
|
|
22
|
-
const
|
|
11
|
+
const destinationScreenKey = context.entering ? context.currentScreenKey : context.nextScreenKey;
|
|
12
|
+
const pairKey = destinationScreenKey ? (0, _links.getPairKeyForDestination)(tag, destinationScreenKey) : null;
|
|
23
13
|
const matchedLink = pairKey ? (0, _links.getResolvedLink)(pairKey, tag).link : null;
|
|
24
14
|
return {
|
|
25
15
|
sourceBounds: matchedLink?.source?.bounds ?? null,
|
|
@@ -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":["shared/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":["shared/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":[]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useCallback, useLayoutEffect } from "react";
|
|
3
|
+
import { useCallback, useLayoutEffect, useMemo } from "react";
|
|
4
4
|
import { cancelAnimation, runOnUI, useAnimatedReaction, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
|
|
5
|
+
import { useStack } from "../../../../hooks/navigation/use-stack";
|
|
5
6
|
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
6
7
|
import { AnimationStore } from "../../../../stores/animation.store";
|
|
7
|
-
import { getSourceScreenKeyFromPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
8
|
-
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";
|
|
9
10
|
import { getLink } from "../../../../stores/bounds/internals/links";
|
|
10
11
|
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
11
12
|
import { SystemStore } from "../../../../stores/system.store";
|
|
@@ -35,9 +36,13 @@ export const useInitialDestinationMeasurement = ({
|
|
|
35
36
|
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
36
37
|
const nextScreenKey = useDescriptorsStore(s => s.derivations.nextScreenKey);
|
|
37
38
|
const destinationPairKey = useDescriptorsStore(s => s.derivations.destinationPairKey);
|
|
38
|
-
const ancestorDestinationPairKey = useDescriptorsStore(s => s.derivations.ancestorDestinationPairKey);
|
|
39
39
|
const destinationEnabled = enabled && !nextScreenKey;
|
|
40
|
-
const
|
|
40
|
+
const canReceiveDestination = destinationEnabled && !!destinationPairKey;
|
|
41
|
+
const preferredSourceScreenKey = destinationPairKey ? getSourceScreenKeyFromPairKey(destinationPairKey) : undefined;
|
|
42
|
+
const stackScenes = useStack(store => store.scenes);
|
|
43
|
+
// A retained closing screen can still have registered boundaries, but it
|
|
44
|
+
// cannot own a new transition link.
|
|
45
|
+
const closingSourceScreenKeys = useMemo(() => stackScenes.filter(scene => scene.activity === "closing").map(scene => scene.route.key), [stackScenes]);
|
|
41
46
|
const progress = AnimationStore.getValue(currentScreenKey, "transitionProgress");
|
|
42
47
|
const {
|
|
43
48
|
actions: {
|
|
@@ -49,6 +54,7 @@ export const useInitialDestinationMeasurement = ({
|
|
|
49
54
|
const retryToken = useSharedValue(0);
|
|
50
55
|
const handshakeRetries = useSharedValue(0);
|
|
51
56
|
const hasGivenUp = useSharedValue(0);
|
|
57
|
+
const hasFinishedInitialMeasurement = useSharedValue(0);
|
|
52
58
|
const releaseLifecycleStartBlock = useCallback(() => {
|
|
53
59
|
"worklet";
|
|
54
60
|
|
|
@@ -56,12 +62,17 @@ export const useInitialDestinationMeasurement = ({
|
|
|
56
62
|
if (!isBlockingLifecycleStart.get()) {
|
|
57
63
|
return;
|
|
58
64
|
}
|
|
65
|
+
hasFinishedInitialMeasurement.set(1);
|
|
59
66
|
isBlockingLifecycleStart.set(0);
|
|
60
67
|
unblockLifecycleStart();
|
|
61
|
-
}, [isBlockingLifecycleStart, retryToken, unblockLifecycleStart]);
|
|
68
|
+
}, [hasFinishedInitialMeasurement, isBlockingLifecycleStart, retryToken, unblockLifecycleStart]);
|
|
62
69
|
const claimLifecycleStartBlock = useCallback(() => {
|
|
63
70
|
"worklet";
|
|
64
71
|
|
|
72
|
+
if (!canReceiveDestination || hasFinishedInitialMeasurement.get() || !getMatchingSourceScreenKey(tag, currentScreenKey)) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
|
|
65
76
|
// The progress check and block claim must share one UI-thread operation.
|
|
66
77
|
// Otherwise a JS-thread layout effect can observe zero, enqueue the block,
|
|
67
78
|
// and let the opening animation start before that block reaches the UI thread.
|
|
@@ -70,9 +81,9 @@ export const useInitialDestinationMeasurement = ({
|
|
|
70
81
|
}
|
|
71
82
|
blockLifecycleStart();
|
|
72
83
|
isBlockingLifecycleStart.set(1);
|
|
73
|
-
}, [blockLifecycleStart, isBlockingLifecycleStart, progress]);
|
|
84
|
+
}, [blockLifecycleStart, canReceiveDestination, currentScreenKey, hasFinishedInitialMeasurement, isBlockingLifecycleStart, progress, tag]);
|
|
74
85
|
useLayoutEffect(() => {
|
|
75
|
-
if (!
|
|
86
|
+
if (!canReceiveDestination) {
|
|
76
87
|
return;
|
|
77
88
|
}
|
|
78
89
|
runOnUI(claimLifecycleStartBlock)();
|
|
@@ -86,37 +97,37 @@ export const useInitialDestinationMeasurement = ({
|
|
|
86
97
|
// runtime so it serializes with the handshake's guarded release.
|
|
87
98
|
runOnUI(releaseLifecycleStartBlock)();
|
|
88
99
|
};
|
|
89
|
-
}, [claimLifecycleStartBlock,
|
|
100
|
+
}, [claimLifecycleStartBlock, escapeClipping, canReceiveDestination, releaseLifecycleStartBlock]);
|
|
90
101
|
useAnimatedReaction(() => {
|
|
91
102
|
"worklet";
|
|
92
103
|
|
|
93
|
-
if (!
|
|
104
|
+
if (!canReceiveDestination || hasFinishedInitialMeasurement.get() || isBlockingLifecycleStart.get() <= 0) {
|
|
94
105
|
return null;
|
|
95
106
|
}
|
|
96
107
|
if (progress.get() > 0) {
|
|
97
108
|
return null;
|
|
98
109
|
}
|
|
99
110
|
const retryTick = retryToken.get();
|
|
100
|
-
const sourceScreenKey =
|
|
111
|
+
const sourceScreenKey = getMatchingSourceScreenKey(tag, currentScreenKey, preferredSourceScreenKey, closingSourceScreenKeys);
|
|
112
|
+
const pairKey = sourceScreenKey ? createScreenPairKey(sourceScreenKey, currentScreenKey) : undefined;
|
|
101
113
|
const signal = getInitialDestinationMeasurementSignal({
|
|
102
114
|
enabled: destinationEnabled,
|
|
103
|
-
|
|
104
|
-
ancestorDestinationPairKey,
|
|
115
|
+
pairKey,
|
|
105
116
|
linkId: linkKey,
|
|
106
117
|
group,
|
|
107
118
|
destinationPresent: getEntry(tag, currentScreenKey) !== null,
|
|
108
|
-
sourcePresent:
|
|
119
|
+
sourcePresent: sourceScreenKey !== null,
|
|
109
120
|
linkState: pairs.get()
|
|
110
121
|
});
|
|
111
122
|
return [signal?.pairKey ?? null, signal?.action ?? null, retryTick];
|
|
112
123
|
}, (next, previous) => {
|
|
113
124
|
"worklet";
|
|
114
125
|
|
|
115
|
-
if (!next) {
|
|
126
|
+
if (!next || hasFinishedInitialMeasurement.get()) {
|
|
116
127
|
return;
|
|
117
128
|
}
|
|
118
129
|
const [measurePairKey, action, retryTick] = next;
|
|
119
|
-
if (!
|
|
130
|
+
if (!action) {
|
|
120
131
|
return;
|
|
121
132
|
}
|
|
122
133
|
const previousMeasurePairKey = previous?.[0];
|
|
@@ -134,17 +145,18 @@ export const useInitialDestinationMeasurement = ({
|
|
|
134
145
|
handshakeRetries.set(0);
|
|
135
146
|
return;
|
|
136
147
|
}
|
|
137
|
-
if (action === "measure") {
|
|
148
|
+
if (action === "measure" && measurePairKey) {
|
|
138
149
|
measureBoundary({
|
|
139
150
|
type: "destination",
|
|
140
151
|
pairKey: measurePairKey
|
|
141
152
|
});
|
|
142
153
|
}
|
|
143
|
-
const link = getLink(measurePairKey, linkKey);
|
|
154
|
+
const link = measurePairKey ? getLink(measurePairKey, linkKey) : null;
|
|
144
155
|
const linkComplete = !!link?.source && !!link.destination;
|
|
145
156
|
if (linkComplete || action === "complete") {
|
|
146
157
|
cancelAnimation(retryToken);
|
|
147
158
|
handshakeRetries.set(0);
|
|
159
|
+
hasFinishedInitialMeasurement.set(1);
|
|
148
160
|
if (escapeClipping) {
|
|
149
161
|
// Screen-level escape has a second readiness phase after destination
|
|
150
162
|
// matching: the host must commit before the transition starts, or
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useLayoutEffect","cancelAnimation","runOnUI","useAnimatedReaction","useSharedValue","withDelay","withTiming","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","useMemo","cancelAnimation","runOnUI","useAnimatedReaction","useSharedValue","withDelay","withTiming","useStack","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","stackScenes","store","scenes","closingSourceScreenKeys","filter","scene","activity","map","route","key","progress","getValue","actions","blockLifecycleStart","unblockLifecycleStart","getBag","isBlockingLifecycleStart","retryToken","handshakeRetries","hasGivenUp","hasFinishedInitialMeasurement","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":["shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,eAAe,EAAEC,OAAO,QAAQ,OAAO;AAC7D,SACCC,eAAe,EACfC,OAAO,EACPC,mBAAmB,EACnBC,cAAc,EACdC,SAAS,EACTC,UAAU,QACJ,yBAAyB;AAChC,SAASC,QAAQ,QAAQ,wCAAwC;AACjE,SAASC,mBAAmB,QAAQ,0CAA0C;AAC9E,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SACCC,mBAAmB,EACnBC,6BAA6B,QACvB,sDAAsD;AAC7D,SACCC,QAAQ,EACRC,0BAA0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C,GAAG,IAAI;IACrE,MAAMsD,YAAY,GAAG,CAAC,CAACD,IAAI,EAAEE,MAAM,IAAI,CAAC,CAACF,IAAI,CAACG,WAAW;IAEzD,IAAIF,YAAY,IAAIV,MAAM,KAAK,UAAU,EAAE;MAC1CtE,eAAe,CAACsD,UAAU,CAAC;MAC3BC,gBAAgB,CAACK,GAAG,CAAC,CAAC,CAAC;MACvBH,6BAA6B,CAACG,GAAG,CAAC,CAAC,CAAC;MACpC,IAAIrC,cAAc,EAAE;QACnB;QACA;QACA;QACA;MACD;MACAmC,0BAA0B,CAAC,CAAC;MAC5B;IACD;IAEA,IAAIH,gBAAgB,CAACI,GAAG,CAAC,CAAC,IAAIxC,qBAAqB,EAAE;MACpDqC,UAAU,CAACI,GAAG,CAAC,CAAC,CAAC;MACjBF,0BAA0B,CAAC,CAAC;MAC5B1C,MAAM,CAACmE,IAAI,CACV,aAAazD,OAAO,2DAA2DP,qBAAqB,oGACrG,CAAC;MACD;IACD;;IAEA;IACA;IACAoC,gBAAgB,CAACK,GAAG,CAACL,gBAAgB,CAACI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAChD3D,eAAe,CAACsD,UAAU,CAAC;IAC3BA,UAAU,CAACM,GAAG,CACbxD,SAAS,CACRc,wBAAwB,EACxBb,UAAU,CAACiD,UAAU,CAACK,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;MAAEyB,QAAQ,EAAE;IAAE,CAAC,CACjD,CACD,CAAC;EACF,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js
CHANGED
|
@@ -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/shared/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":["shared/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":["shared/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,KAAK;EAC/B,MAAM;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGH,QAAQ;EACnC,MAAMI,gBAAgB,GAAGZ,mBAAmB,CAC1Ca,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,gBACtB,CAAC;EACD,MAAMG,aAAa,GAAGf,mBAAmB,CAAEa,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,aAAa,CAAC;EAC7E;EACA;EACA,MAAMC,gBAAgB,GAAGD,aAAa,IAAIH,gBAAgB;EAC1D,MAAMK,kBAAkB,GAAGhB,cAAc,CAACiB,QAAQ,CACjDF,gBAAgB,EAChB,aACD,CAAC;EACD,MAAMG,cAAc,GAAGlB,cAAc,CAACiB,QAAQ,CAACF,gBAAgB,EAAE,SAAS,CAAC;EAE3EjB,mBAAmB,CAClB,MAAM;IACL,SAAS;;IAET,MAAMqB,aAAa,GAAGb,OAAO,IAAI,CAAC,CAACU,kBAAkB,CAACI,GAAG,CAAC,CAAC;IAC3D,IAAI,CAACD,aAAa,EAAE;MACnB,OAAO,IAAI;IACZ;IACA,MAAME,aAAa,GAClBnB,mBAAmB,CAACK,QAAQ,CAACe,GAAG,EAAEX,gBAAgB,CAAC,IAAIY,SAAS;IACjE,MAAMC,kBAAkB,GACvBvB,wBAAwB,CAACM,QAAQ,CAACe,GAAG,EAAEX,gBAAgB,CAAC,IAAIY,SAAS;IAEtE,OAAOnB,wBAAwB,CAAC;MAC/BE,OAAO;MACPK,gBAAgB;MAChBU,aAAa;MACbG,kBAAkB;MAClBC,MAAM,EAAEhB,OAAO;MACfC,KAAK;MACLS,aAAa;MACbO,OAAO,EAAE,CAAC,CAACR,cAAc,CAACE,GAAG,CAAC,CAAC;MAC/BO,SAAS,EAAExB,KAAK,CAACiB,GAAG,CAAC;IACtB,CAAC,CAAC;EACH,CAAC,EACD,CAACQ,aAAa,EAAEC,iBAAiB,KAAK;IACrC,SAAS;;IAET,IACC,CAACD,aAAa,IACdA,aAAa,CAACE,MAAM,KAAKD,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":["shared/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":["shared/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;EACA;EACAb,mBAAmB,CAAC;IACnBO,OAAO;IACPD,QAAQ;IACRG,gBAAgB;IAChBU,cAAc;IACdP,OAAO;IACPC;EACD,CAAC,CAAC;EAEFX,2BAA2B,CAAC;IAC3BK,OAAO;IACPc,eAAe;IACff;EACD,CAAC,CAAC;EAEFL,gCAAgC,CAAC;IAChCK,QAAQ;IACRC,OAAO,EAAEC,cAAc;IACvBK,cAAc;IACdQ;EACD,CAAC,CAAC;EAEFlB,kBAAkB,CAAC;IAClBI,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRe;EACD,CAAC,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","StyleSheet","Animated","NativePortalHost","PORTAL_POINTER_EVENTS","createBoundaryContentPortalHostName","Fragment","_Fragment","jsx","_jsx","jsxs","_jsxs","AnimatedPortalHost","createAnimatedComponent","BoundaryContentPortalHost","boundaryId","children","enabled","screenKey","portalHostName","name","pointerEvents","style","styles","host","create","
|
|
1
|
+
{"version":3,"names":["memo","StyleSheet","Animated","NativePortalHost","PORTAL_POINTER_EVENTS","createBoundaryContentPortalHostName","Fragment","_Fragment","jsx","_jsx","jsxs","_jsxs","AnimatedPortalHost","createAnimatedComponent","BoundaryContentPortalHost","boundaryId","children","enabled","screenKey","portalHostName","name","pointerEvents","style","styles","host","create","flatten","absoluteFill","overflow"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-content-portal/components/host.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAwB,OAAO;AAC5C,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,gBAAgB,EAAEC,qBAAqB,QAAQ,mBAAmB;AAC3E,SAASC,mCAAmC,QAAQ,sBAAsB;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3E,MAAMC,kBAAkB,GAAGT,gBAAgB,GACxCD,QAAQ,CAACW,uBAAuB,CAACV,gBAAgB,CAAC,GAClD,IAAI;AASP,OAAO,MAAMW,yBAAyB,gBAAGd,IAAI,CAC5C,SAASc,yBAAyBA,CAAC;EAClCC,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC;AAC+B,CAAC,EAAE;EAClC,IAAI,CAACD,OAAO,IAAI,CAACL,kBAAkB,EAAE;IACpC,oBAAOH,IAAA,CAAAF,SAAA;MAAAS,QAAA,EAAGA;IAAQ,CAAG,CAAC;EACvB;EAEA,MAAMG,cAAc,GAAGd,mCAAmC,CACzDa,SAAS,EACTH,UACD,CAAC;EAED,oBACCJ,KAAA,CAAAJ,SAAA;IAAAS,QAAA,GACEA,QAAQ,eACTP,IAAA,CAACG,kBAAkB;MAClBQ,IAAI,EAAED,cAAe;MACrBE,aAAa,EAAEjB,qBAAsB;MACrCkB,KAAK,EAAEC,MAAM,CAACC;IAAK,CACnB,CAAC;EAAA,CACD,CAAC;AAEL,CACD,CAAC;AAED,MAAMD,MAAM,GAAGtB,UAAU,CAACwB,MAAM,CAAC;EAChCD,IAAI,EAAE;IACL,GAAGvB,UAAU,CAACyB,OAAO,CAACzB,UAAU,CAAC0B,YAAY,CAAC;IAC9CC,QAAQ,EAAE;EACX;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -8,7 +8,6 @@ import { composeSlotStyleWithLocalTransform } from "../../../../../../providers/
|
|
|
8
8
|
import { getLink } from "../../../../../../stores/bounds/internals/links";
|
|
9
9
|
import { SystemStore } from "../../../../../../stores/system.store";
|
|
10
10
|
import { NativePortalHost, PORTAL_POINTER_EVENTS } from "../../../teleport";
|
|
11
|
-
import { hasLocalSlot } from "../helpers/has-local-slot";
|
|
12
11
|
import { resolvePortalOffsetStyle } from "../helpers/offset-style";
|
|
13
12
|
import { getPortalHostBounds } from "../stores/host-bounds.store";
|
|
14
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -28,7 +27,10 @@ export const PortalBoundaryHost = /*#__PURE__*/memo(function PortalBoundaryHost(
|
|
|
28
27
|
return;
|
|
29
28
|
}
|
|
30
29
|
const link = getLink(host.pairKey, host.boundaryId);
|
|
31
|
-
const
|
|
30
|
+
const hasSource = !!link?.source;
|
|
31
|
+
const hasHostBounds = getPortalHostBounds(host.hostKey) !== null;
|
|
32
|
+
const hasSlot = host.slotsMap.get()[host.boundaryId] !== undefined;
|
|
33
|
+
const hasGeometry = hasSource && hasHostBounds && hasSlot;
|
|
32
34
|
if (!hasGeometry) {
|
|
33
35
|
geometryReadyFrames.set(0);
|
|
34
36
|
return;
|
|
@@ -76,19 +78,6 @@ export const PortalBoundaryHost = /*#__PURE__*/memo(function PortalBoundaryHost(
|
|
|
76
78
|
const slotStyle = useAnimatedStyle(() => {
|
|
77
79
|
"worklet";
|
|
78
80
|
|
|
79
|
-
// `slotsMap` is the resolved map: it may contain real interpolator output,
|
|
80
|
-
// inherited styles, or resolver-created reset patches for slots that just
|
|
81
|
-
// disappeared. Normal components need those reset patches so stale styles
|
|
82
|
-
// clear correctly.
|
|
83
|
-
//
|
|
84
|
-
// A screen-level portal host is different. It is only the temporary visual
|
|
85
|
-
// receiver for teleported content, not the original component that needs a
|
|
86
|
-
// cleanup frame. If the current local interpolator layers did not emit this
|
|
87
|
-
// boundary id, any resolved style here is cleanup/stale residue and should
|
|
88
|
-
// not be drawn by the host.
|
|
89
|
-
if (!hasLocalSlot(host.localStylesMaps.get(), host.boundaryId)) {
|
|
90
|
-
return NO_STYLES;
|
|
91
|
-
}
|
|
92
81
|
const slot = host.slotsMap.get()[host.boundaryId];
|
|
93
82
|
return composeSlotStyleWithLocalTransform(slot?.style ?? NO_STYLES, undefined, slot?.boundsLocalTransform);
|
|
94
83
|
});
|