react-native-screen-transitions 4.0.0-alpha.4 → 4.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +17 -9
- package/lib/commonjs/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +4 -15
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +22 -24
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +3 -36
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/commonjs/components/boundary/utils/destination-signals.js +7 -1
- package/lib/commonjs/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/commonjs/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js +15 -14
- package/lib/commonjs/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js.map +1 -1
- package/lib/commonjs/providers/screen/styles/hooks/use-interpolated-style-maps.js +17 -17
- package/lib/commonjs/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/stores/bounds/internals/entries.js +13 -3
- package/lib/commonjs/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +18 -10
- package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +4 -15
- package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +22 -24
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +3 -36
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +2 -2
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/module/components/boundary/utils/destination-signals.js +7 -1
- package/lib/module/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/module/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js +15 -14
- package/lib/module/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js.map +1 -1
- package/lib/module/providers/screen/styles/hooks/use-interpolated-style-maps.js +17 -17
- package/lib/module/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/stores/bounds/internals/entries.js +13 -3
- package/lib/module/stores/bounds/internals/entries.js.map +1 -1
- package/lib/typescript/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts +1 -5
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +0 -2
- package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
- package/lib/typescript/components/boundary/utils/destination-signals.d.ts +1 -1
- package/lib/typescript/components/boundary/utils/destination-signals.d.ts.map +1 -1
- package/lib/typescript/providers/screen/styles/helpers/resolve-interpolator-style-handoff.d.ts +1 -3
- package/lib/typescript/providers/screen/styles/helpers/resolve-interpolator-style-handoff.d.ts.map +1 -1
- package/lib/typescript/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +4 -4
- package/lib/typescript/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/stores/bounds/internals/entries.d.ts +1 -1
- package/lib/typescript/stores/bounds/internals/entries.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +34 -13
- package/src/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +4 -20
- package/src/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts +27 -37
- package/src/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +10 -57
- package/src/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts +1 -8
- package/src/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +0 -3
- package/src/components/boundary/utils/destination-signals.ts +6 -2
- package/src/providers/screen/styles/helpers/resolve-interpolator-style-handoff.ts +16 -16
- package/src/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +21 -24
- package/src/stores/bounds/internals/entries.ts +12 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js +0 -18
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js +0 -13
- package/lib/module/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts +0 -3
- package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts.map +0 -1
- package/src/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.ts +0 -16
|
@@ -82,10 +82,10 @@ const runInterpolator = ({
|
|
|
82
82
|
* normal interpolator selection once the gesture-driven close is no longer in
|
|
83
83
|
* play.
|
|
84
84
|
*
|
|
85
|
-
* At an ownership handoff, the
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
85
|
+
* At an ownership handoff, the current interpolator remains live but is
|
|
86
|
+
* evaluated without the next-screen relationship. The next owner replaces
|
|
87
|
+
* matching scalar keys and composes its live transforms after the current
|
|
88
|
+
* screen's self-owned transforms.
|
|
89
89
|
*/
|
|
90
90
|
const useInterpolatedStylesMap = ({
|
|
91
91
|
enabled,
|
|
@@ -123,7 +123,6 @@ const useInterpolatedStylesMap = ({
|
|
|
123
123
|
} = _system.SystemStore.getBag(activeScreenKey);
|
|
124
124
|
const isGesturingDuringCloseAnimation = (0, _reactNativeReanimated.useSharedValue)(false);
|
|
125
125
|
const initialDestinationStylesReady = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
126
|
-
const frozenCurrentStylesMap = (0, _reactNativeReanimated.useSharedValue)(_constants.NO_STYLES);
|
|
127
126
|
const shouldPrepareInitialDestinationStyles = enabled && !!destinationPairKey && !nextScreenKey && !!currentInterpolator;
|
|
128
127
|
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
129
128
|
"worklet";
|
|
@@ -184,14 +183,19 @@ const useInterpolatedStylesMap = ({
|
|
|
184
183
|
const nextReady = currentOwnsInterpolator ? 0 : 1;
|
|
185
184
|
nextInterpolatorReady.set(nextReady);
|
|
186
185
|
const interpolatorOptionsOwner = currentOwnsInterpolator ? "current" : "next";
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
|
|
187
|
+
// Once the next interpolator owns the relationship, the current
|
|
188
|
+
// interpolator remains responsible only for its own live presentation.
|
|
189
|
+
// This preserves snap-point transforms without letting current-screen
|
|
190
|
+
// unfocus rules compete with the next screen's outgoing transition.
|
|
191
|
+
const currentSelectedFrame = (0, _selectInterpolatorFrame.selectInterpolatorFrame)(props, isInGestureMode || !!nextInterpolator);
|
|
192
|
+
const currentResult = runInterpolator({
|
|
189
193
|
interpolator: currentInterpolator,
|
|
190
194
|
props,
|
|
191
|
-
selectedFrame,
|
|
195
|
+
selectedFrame: currentSelectedFrame,
|
|
192
196
|
bounds: boundsAccessor,
|
|
193
197
|
transition
|
|
194
|
-
})
|
|
198
|
+
});
|
|
195
199
|
const initialDestinationStyleGate = (0, _visibilityGate.resolveInitialDestinationStyleGate)({
|
|
196
200
|
shouldPrepareStyles: shouldPrepareInitialDestinationStyles,
|
|
197
201
|
isVisibilityBlocked: visibilityBlocked.get(),
|
|
@@ -206,18 +210,15 @@ const useInterpolatedStylesMap = ({
|
|
|
206
210
|
const handoff = (0, _resolveInterpolatorStyleHandoff.resolveInterpolatorStyleHandoff)({
|
|
207
211
|
currentOwnsInterpolator: true,
|
|
208
212
|
currentStylesMap: currentResult?.stylesMap,
|
|
209
|
-
nextStylesMap: undefined
|
|
210
|
-
frozenCurrentStylesMap: frozenCurrentStylesMap.get()
|
|
213
|
+
nextStylesMap: undefined
|
|
211
214
|
});
|
|
212
|
-
if (handoff.nextFrozenCurrentStylesMap !== frozenCurrentStylesMap.get()) {
|
|
213
|
-
frozenCurrentStylesMap.set(handoff.nextFrozenCurrentStylesMap);
|
|
214
|
-
}
|
|
215
215
|
return handoff.localStylesMaps.length ? handoff.localStylesMaps : NO_STYLE_LAYERS;
|
|
216
216
|
}
|
|
217
|
+
const nextSelectedFrame = (0, _selectInterpolatorFrame.selectInterpolatorFrame)(props, false);
|
|
217
218
|
const nextResult = runInterpolator({
|
|
218
219
|
interpolator: nextInterpolator,
|
|
219
220
|
props,
|
|
220
|
-
selectedFrame,
|
|
221
|
+
selectedFrame: nextSelectedFrame,
|
|
221
222
|
bounds: boundsAccessor,
|
|
222
223
|
transition
|
|
223
224
|
});
|
|
@@ -226,8 +227,7 @@ const useInterpolatedStylesMap = ({
|
|
|
226
227
|
const handoff = (0, _resolveInterpolatorStyleHandoff.resolveInterpolatorStyleHandoff)({
|
|
227
228
|
currentOwnsInterpolator: false,
|
|
228
229
|
currentStylesMap: currentResult?.stylesMap,
|
|
229
|
-
nextStylesMap: nextResult?.stylesMap
|
|
230
|
-
frozenCurrentStylesMap: frozenCurrentStylesMap.get()
|
|
230
|
+
nextStylesMap: nextResult?.stylesMap
|
|
231
231
|
});
|
|
232
232
|
return handoff.localStylesMaps.length ? handoff.localStylesMaps : NO_STYLE_LAYERS;
|
|
233
233
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_constants","_animation","_system","_logger","_animation2","_useBuildBoundsAccessor","_useBuildTransitionAccessor","_readScreenAnimationRevisions","_selectedInterpolatorOptions","_descriptors","_options","_collectInterpolatorSharedValues","_normalizeSlots","_resolveInterpolatorStyleHandoff","_selectInterpolatorFrame","_stripInterpolatorOptions","_transitionVisualState","_visibilityGate","NO_STYLE_LAYERS","normalizeRawStyleMap","rawStyleMap","NO_STYLES","stylesMap","normalizeSlots","stripInterpolatorOptions","runInterpolator","interpolator","props","selectedFrame","bounds","transition","undefined","raw","_","__DEV__","logger","warn","useInterpolatedStylesMap","enabled","visibilityBlocked","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","destinationPairKey","screenOptions","useScreenOptionsStore","screenInterpolatorProps","screenInterpolatorPropsRevision","selectedInterpolatorOptions","nextInterpolator","currentInterpolator","ancestorScreenAnimationSources","descendantScreenAnimationSources","useScreenAnimationStore","boundsAccessor","useBuildBoundsAccessor","useBuildTransitionAccessor","nextInterpolatorReady","useSharedValue","interpolatorSharedValues","useMemo","collectInterpolatorSharedValues","activeScreenKey","closing","activeClosing","entering","activeEntering","AnimationStore","getBag","animationProgress","activeAnimationProgress","pendingLifecycleRequestKind","activePendingLifecycleRequestKind","pendingLifecycleStartBlockCount","activePendingLifecycleStartBlockCount","SystemStore","isGesturingDuringCloseAnimation","initialDestinationStylesReady","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_constants","_animation","_system","_logger","_animation2","_useBuildBoundsAccessor","_useBuildTransitionAccessor","_readScreenAnimationRevisions","_selectedInterpolatorOptions","_descriptors","_options","_collectInterpolatorSharedValues","_normalizeSlots","_resolveInterpolatorStyleHandoff","_selectInterpolatorFrame","_stripInterpolatorOptions","_transitionVisualState","_visibilityGate","NO_STYLE_LAYERS","normalizeRawStyleMap","rawStyleMap","NO_STYLES","stylesMap","normalizeSlots","stripInterpolatorOptions","runInterpolator","interpolator","props","selectedFrame","bounds","transition","undefined","raw","_","__DEV__","logger","warn","useInterpolatedStylesMap","enabled","visibilityBlocked","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","destinationPairKey","screenOptions","useScreenOptionsStore","screenInterpolatorProps","screenInterpolatorPropsRevision","selectedInterpolatorOptions","nextInterpolator","currentInterpolator","ancestorScreenAnimationSources","descendantScreenAnimationSources","useScreenAnimationStore","boundsAccessor","useBuildBoundsAccessor","useBuildTransitionAccessor","nextInterpolatorReady","useSharedValue","interpolatorSharedValues","useMemo","collectInterpolatorSharedValues","activeScreenKey","closing","activeClosing","entering","activeEntering","AnimationStore","getBag","animationProgress","activeAnimationProgress","pendingLifecycleRequestKind","activePendingLifecycleRequestKind","pendingLifecycleStartBlockCount","activePendingLifecycleStartBlockCount","SystemStore","isGesturingDuringCloseAnimation","initialDestinationStylesReady","shouldPrepareInitialDestinationStyles","useAnimatedReaction","get","isVisibilityBlocked","styleGate","resolveInitialDestinationStyleGate","shouldPrepareStyles","stylesReady","shouldMarkStylesReady","set","localStylesMaps","useDerivedValue","readScreenAnimationRevisions","current","next","isDragging","gesture","dragging","isNextClosing","isInGestureMode","isPendingOpen","LifecycleTransitionRequestKind","Open","activeOpening","isOpeningBlocked","isOpenTransitionBlocked","opening","hasCloseFinished","hasCloseTransitionFinished","currentOwnsInterpolator","nextReady","interpolatorOptionsOwner","currentSelectedFrame","selectInterpolatorFrame","currentResult","initialDestinationStyleGate","shouldWithholdStyles","syncSelectedInterpolatorOptions","options","syncScreenOptionsOverrides","handoff","resolveInterpolatorStyleHandoff","currentStylesMap","nextStylesMap","length","nextSelectedFrame","nextResult","exports"],"sourceRoot":"../../../../../../src","sources":["providers/screen/styles/hooks/use-interpolated-style-maps.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAMA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AASA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,uBAAA,GAAAP,OAAA;AACA,IAAAQ,2BAAA,GAAAR,OAAA;AAEA,IAAAS,6BAAA,GAAAT,OAAA;AACA,IAAAU,4BAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,QAAA,GAAAZ,OAAA;AAIA,IAAAa,gCAAA,GAAAb,OAAA;AACA,IAAAc,eAAA,GAAAd,OAAA;AACA,IAAAe,gCAAA,GAAAf,OAAA;AAEA,IAAAgB,wBAAA,GAAAhB,OAAA;AAIA,IAAAiB,yBAAA,GAAAjB,OAAA;AACA,IAAAkB,sBAAA,GAAAlB,OAAA;AAIA,IAAAmB,eAAA,GAAAnB,OAAA;AAEA,MAAMoB,eAAiC,GA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AEF,OAAO;IACNwE,eAAe;IACf/B;EACD,CAAC;AACF,CAAC;AAACoE,OAAA,CAAA1F,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -61,17 +61,27 @@ function getEntry(tag, key) {
|
|
|
61
61
|
|
|
62
62
|
return _state.boundaryRegistry.get()[tag]?.screens[key] ?? null;
|
|
63
63
|
}
|
|
64
|
-
function getMatchingSourceScreenKey(tag, destinationScreenKey, preferredScreenKey) {
|
|
64
|
+
function getMatchingSourceScreenKey(tag, destinationScreenKey, preferredScreenKey, excludedScreenKeys) {
|
|
65
65
|
"worklet";
|
|
66
66
|
|
|
67
67
|
const screens = _state.boundaryRegistry.get()[tag]?.screens;
|
|
68
68
|
if (!screens) return null;
|
|
69
|
-
|
|
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]) {
|
|
70
80
|
return preferredScreenKey;
|
|
71
81
|
}
|
|
72
82
|
let latestScreenKey = null;
|
|
73
83
|
for (const screenKey in screens) {
|
|
74
|
-
if (screenKey !== destinationScreenKey) {
|
|
84
|
+
if (screenKey !== destinationScreenKey && !isExcluded(screenKey)) {
|
|
75
85
|
latestScreenKey = screenKey;
|
|
76
86
|
}
|
|
77
87
|
}
|
|
@@ -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","getMatchingSourceScreenKey","destinationScreenKey","preferredScreenKey","latestScreenKey","setEntry","modify","removeEntry","hasAnyKeys"],"sourceRoot":"../../../../../src","sources":["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,CAACJ,MAAM,KAAKK,SAAS,EAAE;IAC/BF,KAAK,CAACH,MAAM,GAAGI,KAAK,CAACJ,MAAM;EAC5B;EAEA,IAAII,KAAK,CAACH,MAAM,KAAKI,SAAS,EAAE;IAC/BF,KAAK,CAACF,MAAM,GAAGG,KAAK,CAACH,MAAM,IAAI,CAAC,CAAC;EAClC;EAEA,IAAIG,KAAK,CAACE,cAAc,KAAK,IAAI,EAAE;IAClC,OAAOH,KAAK,CAACG,cAAc;EAC5B,CAAC,MAAM,IAAIF,KAAK,CAACE,cAAc,KAAKD,SAAS,EAAE;IAC9CF,KAAK,CAACG,cAAc,GAAGF,KAAK,CAACE,cAAc;EAC5C;EAEA,IAAIF,KAAK,CAACG,OAAO,KAAK,IAAI,EAAE;IAC3B,OAAOJ,KAAK,CAACI,OAAO;EACrB,CAAC,MAAM,IAAIH,KAAK,CAACG,OAAO,KAAKF,SAAS,EAAE;IACvCF,KAAK,CAACI,OAAO,GAAGH,KAAK,CAACG,OAAO;EAC9B;EAEA,IAAIH,KAAK,CAACI,cAAc,KAAK,IAAI,EAAE;IAClC,OAAOL,KAAK,CAACK,cAAc;EAC5B,CAAC,MAAM,IAAIJ,KAAK,CAACI,cAAc,KAAKH,SAAS,EAAE;IAC9CF,KAAK,CAACK,cAAc,GAAGJ,KAAK,CAACI,cAAc;EAC5C;AACD,CAAC;AAED,SAASC,QAAQA,CAACd,GAAU,EAAEe,GAAc,EAAgB;EAC3D,SAAS;;EACT,OAAOC,uBAAgB,CAACC,GAAG,CAAC,CAAC,CAACjB,GAAG,CAAC,EAAEC,OAAO,CAACc,GAAG,CAAC,IAAI,IAAI;AACzD;AAEA,SAASG,0BAA0BA,CAClClB,GAAU,EACVmB,oBAA+B,EAC/BC,kBAA8B,
|
|
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":["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,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AI,CAACG,UAAU,CAACnB,SAAS,CAAC,EAAE;MACjEsB,eAAe,GAAGtB,SAAS;IAC5B;EACD;EAEA,OAAOsB,eAAe;AACvB;AAEA,SAASC,QAAQA,CAAC1B,GAAU,EAAEG,SAAoB,EAAEM,KAAiB,EAAE;EACtE,SAAS;;EACTO,uBAAgB,CAACW,MAAM,CAAkC5B,KAAQ,IAAQ;IACxE,SAAS;;IACT,MAAMS,KAAK,GAAGN,iBAAiB,CAACH,KAAK,EAAEC,GAAG,EAAEG,SAAS,CAAC;IACtDI,eAAe,CAACC,KAAK,EAAEC,KAAK,CAAC;IAC7B,OAAOV,KAAK;EACb,CAAC,CAAC;AACH;AAEA,SAAS6B,WAAWA,CAAC5B,GAAU,EAAEG,SAAoB,EAAE;EACtD,SAAS;;EACTa,uBAAgB,CAACW,MAAM,CAAkC5B,KAAQ,IAAQ;IACxE,SAAS;;IACT,MAAMK,QAAQ,GAAGL,KAAK,CAACC,GAAG,CAAC;IAC3B,IAAI,CAACI,QAAQ,EAAEH,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":[]}
|
package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useCallback, useLayoutEffect } from "react";
|
|
3
|
+
import { useCallback, useLayoutEffect, useMemo } from "react";
|
|
4
4
|
import { cancelAnimation, useAnimatedReaction, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
|
|
5
5
|
import { scheduleOnUI } from "react-native-worklets";
|
|
6
|
+
import { useStack } from "../../../../hooks/navigation/use-stack";
|
|
6
7
|
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
7
8
|
import { AnimationStore } from "../../../../stores/animation.store";
|
|
8
9
|
import { createScreenPairKey, getSourceScreenKeyFromPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
@@ -39,6 +40,10 @@ export const useInitialDestinationMeasurement = ({
|
|
|
39
40
|
const destinationEnabled = enabled && !nextScreenKey;
|
|
40
41
|
const canReceiveDestination = destinationEnabled && !!destinationPairKey;
|
|
41
42
|
const preferredSourceScreenKey = destinationPairKey ? getSourceScreenKeyFromPairKey(destinationPairKey) : undefined;
|
|
43
|
+
const stackScenes = useStack(store => store.scenes);
|
|
44
|
+
// A retained closing screen can still have registered boundaries, but it
|
|
45
|
+
// cannot own a new transition link.
|
|
46
|
+
const closingSourceScreenKeys = useMemo(() => stackScenes.filter(scene => scene.activity === "closing").map(scene => scene.route.key), [stackScenes]);
|
|
42
47
|
const progress = AnimationStore.getValue(currentScreenKey, "transitionProgress");
|
|
43
48
|
const {
|
|
44
49
|
actions: {
|
|
@@ -50,6 +55,7 @@ export const useInitialDestinationMeasurement = ({
|
|
|
50
55
|
const retryToken = useSharedValue(0);
|
|
51
56
|
const handshakeRetries = useSharedValue(0);
|
|
52
57
|
const hasGivenUp = useSharedValue(0);
|
|
58
|
+
const hasFinishedInitialMeasurement = useSharedValue(0);
|
|
53
59
|
const releaseLifecycleStartBlock = useCallback(() => {
|
|
54
60
|
"worklet";
|
|
55
61
|
|
|
@@ -57,13 +63,14 @@ export const useInitialDestinationMeasurement = ({
|
|
|
57
63
|
if (!isBlockingLifecycleStart.get()) {
|
|
58
64
|
return;
|
|
59
65
|
}
|
|
66
|
+
hasFinishedInitialMeasurement.set(1);
|
|
60
67
|
isBlockingLifecycleStart.set(0);
|
|
61
68
|
unblockLifecycleStart();
|
|
62
|
-
}, [isBlockingLifecycleStart, retryToken, unblockLifecycleStart]);
|
|
69
|
+
}, [hasFinishedInitialMeasurement, isBlockingLifecycleStart, retryToken, unblockLifecycleStart]);
|
|
63
70
|
const claimLifecycleStartBlock = useCallback(() => {
|
|
64
71
|
"worklet";
|
|
65
72
|
|
|
66
|
-
if (!canReceiveDestination || !getMatchingSourceScreenKey(tag, currentScreenKey
|
|
73
|
+
if (!canReceiveDestination || hasFinishedInitialMeasurement.get() || !getMatchingSourceScreenKey(tag, currentScreenKey)) {
|
|
67
74
|
return;
|
|
68
75
|
}
|
|
69
76
|
|
|
@@ -75,7 +82,7 @@ export const useInitialDestinationMeasurement = ({
|
|
|
75
82
|
}
|
|
76
83
|
blockLifecycleStart();
|
|
77
84
|
isBlockingLifecycleStart.set(1);
|
|
78
|
-
}, [blockLifecycleStart, canReceiveDestination, currentScreenKey, isBlockingLifecycleStart, progress,
|
|
85
|
+
}, [blockLifecycleStart, canReceiveDestination, currentScreenKey, hasFinishedInitialMeasurement, isBlockingLifecycleStart, progress, tag]);
|
|
79
86
|
useLayoutEffect(() => {
|
|
80
87
|
if (!canReceiveDestination) {
|
|
81
88
|
return;
|
|
@@ -95,14 +102,14 @@ export const useInitialDestinationMeasurement = ({
|
|
|
95
102
|
useAnimatedReaction(() => {
|
|
96
103
|
"worklet";
|
|
97
104
|
|
|
98
|
-
if (!canReceiveDestination || isBlockingLifecycleStart.get() <= 0) {
|
|
105
|
+
if (!canReceiveDestination || hasFinishedInitialMeasurement.get() || isBlockingLifecycleStart.get() <= 0) {
|
|
99
106
|
return null;
|
|
100
107
|
}
|
|
101
108
|
if (progress.get() > 0) {
|
|
102
109
|
return null;
|
|
103
110
|
}
|
|
104
111
|
const retryTick = retryToken.get();
|
|
105
|
-
const sourceScreenKey = getMatchingSourceScreenKey(tag, currentScreenKey, preferredSourceScreenKey);
|
|
112
|
+
const sourceScreenKey = getMatchingSourceScreenKey(tag, currentScreenKey, preferredSourceScreenKey, closingSourceScreenKeys);
|
|
106
113
|
const pairKey = sourceScreenKey ? createScreenPairKey(sourceScreenKey, currentScreenKey) : undefined;
|
|
107
114
|
const signal = getInitialDestinationMeasurementSignal({
|
|
108
115
|
enabled: destinationEnabled,
|
|
@@ -117,11 +124,11 @@ export const useInitialDestinationMeasurement = ({
|
|
|
117
124
|
}, (next, previous) => {
|
|
118
125
|
"worklet";
|
|
119
126
|
|
|
120
|
-
if (!next) {
|
|
127
|
+
if (!next || hasFinishedInitialMeasurement.get()) {
|
|
121
128
|
return;
|
|
122
129
|
}
|
|
123
130
|
const [measurePairKey, action, retryTick] = next;
|
|
124
|
-
if (!
|
|
131
|
+
if (!action) {
|
|
125
132
|
return;
|
|
126
133
|
}
|
|
127
134
|
const previousMeasurePairKey = previous?.[0];
|
|
@@ -139,17 +146,18 @@ export const useInitialDestinationMeasurement = ({
|
|
|
139
146
|
handshakeRetries.set(0);
|
|
140
147
|
return;
|
|
141
148
|
}
|
|
142
|
-
if (action === "measure") {
|
|
149
|
+
if (action === "measure" && measurePairKey) {
|
|
143
150
|
measureBoundary({
|
|
144
151
|
type: "destination",
|
|
145
152
|
pairKey: measurePairKey
|
|
146
153
|
});
|
|
147
154
|
}
|
|
148
|
-
const link = getLink(measurePairKey, linkKey);
|
|
155
|
+
const link = measurePairKey ? getLink(measurePairKey, linkKey) : null;
|
|
149
156
|
const linkComplete = !!link?.source && !!link.destination;
|
|
150
157
|
if (linkComplete || action === "complete") {
|
|
151
158
|
cancelAnimation(retryToken);
|
|
152
159
|
handshakeRetries.set(0);
|
|
160
|
+
hasFinishedInitialMeasurement.set(1);
|
|
153
161
|
if (escapeClipping) {
|
|
154
162
|
// Screen-level escape has a second readiness phase after destination
|
|
155
163
|
// matching: the host must commit before the transition starts, or
|
package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useLayoutEffect","cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","scheduleOnUI","useDescriptorsStore","AnimationStore","createScreenPairKey","getSourceScreenKeyFromPairKey","getEntry","getMatchingSourceScreenKey","getLink","pairs","SystemStore","logger","getInitialDestinationMeasurementSignal","HANDSHAKE_RETRY_DELAY_MS","MAX_HANDSHAKE_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","escapeClipping","measureBoundary","tag","linkKey","group","currentScreenKey","s","derivations","nextScreenKey","destinationPairKey","destinationEnabled","canReceiveDestination","preferredSourceScreenKey","undefined","progress","getValue","actions","blockLifecycleStart","unblockLifecycleStart","getBag","isBlockingLifecycleStart","retryToken","handshakeRetries","hasGivenUp","releaseLifecycleStartBlock","get","set","claimLifecycleStartBlock","retryTick","sourceScreenKey","pairKey","signal","linkId","destinationPresent","sourcePresent","linkState","action","next","previous","measurePairKey","previousMeasurePairKey","previousAction","previousRetryTick","shouldHandleSignal","type","link","linkComplete","source","destination","warn","duration"],"sourceRoot":"../../../../../../src","sources":["components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,eAAe,QAAQ,OAAO;
|
|
1
|
+
{"version":3,"names":["useCallback","useLayoutEffect","useMemo","cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","scheduleOnUI","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":["components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,eAAe,EAAEC,OAAO,QAAQ,OAAO;AAC7D,SACCC,eAAe,EACfC,mBAAmB,EACnBC,cAAc,EACdC,SAAS,EACTC,UAAU,QACJ,yBAAyB;AAChC,SAASC,YAAY,QAAQ,uBAAuB;AACpD,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,0BAA0B,QACpB,6CAA6C;AACpD,SAASC,OAAO,QAAQ,2CAA2C;AACnE,SAASC,KAAK,QAAQ,2CAA2C;AAEjE,SAASC,WAAW,QAAQ,iCAAiC;AAC7D,SAASC,MAAM,QAAQ,0BAA0B;AAEjD,SAASC,sCAAsC,QAAQ,iCAAiC;;AAExF;AACA;AACA,MAAMC,wBAAwB,GAAG,EAAE;AACnC;AACA;AACA;AACA;AACA;AACA,MAAMC,qBAAqB,GAAG,EAAE;AAShC,OAAO,MAAMC,gCAAgC,GAAGA,CAAC;EAChDC,QAAQ;EACRC,OAAO;EACPC,cAAc;EACdC;AACuC,CAAC,KAAK;EAC7C,MAAM;IAAEC,GAAG;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGN,QAAQ;EACxC,MAAMO,gBAAgB,GAAGrB,mBAAmB,CAC1CsB,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,gBACtB,CAAC;EACD,MAAMG,aAAa,GAAGxB,mBAAmB,CAAEsB,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,aAAa,CAAC;EAC7E,MAAMC,kBAA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ChD3D,eAAe,CAACsD,UAAU,CAAC;IAC3BA,UAAU,CAACM,GAAG,CACbzD,SAAS,CACRe,wBAAwB,EACxBd,UAAU,CAACkD,UAAU,CAACK,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;MAAEyB,QAAQ,EAAE;IAAE,CAAC,CACjD,CACD,CAAC;EACF,CACD,CAAC;AACF,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
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","useCallback","I18nManager","StyleSheet","Animated","useAnimatedStyle","useFrameCallback","useSharedValue","NO_STYLES","composeSlotStyleWithLocalTransform","getLink","SystemStore","NativePortalHost","PORTAL_POINTER_EVENTS","
|
|
1
|
+
{"version":3,"names":["memo","useCallback","I18nManager","StyleSheet","Animated","useAnimatedStyle","useFrameCallback","useSharedValue","NO_STYLES","composeSlotStyleWithLocalTransform","getLink","SystemStore","NativePortalHost","PORTAL_POINTER_EVENTS","resolvePortalOffsetStyle","getPortalHostBounds","jsx","_jsx","AnimatedPortalBoundaryHost","createAnimatedComponent","PortalBoundaryHost","host","style","geometryReadyFrames","unblockLifecycleStart","getBag","screenKey","actions","handleFrame","portalHostReady","get","link","pairKey","boundaryId","hasSource","source","hasHostBounds","hostKey","hasSlot","slotsMap","undefined","hasGeometry","set","hostStyle","sourceBounds","bounds","isCrossScreenPortal","placement","contentFrameStyle","height","width","slotStyle","slot","boundsLocalTransform","View","pointerEvents","collapsable","children","name","portalHostName","styles","content","create","isRTL","end","position","top","left"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary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AAU;IACpBC,GAAG,EAAE;EACN,CAAC,GACA;IACAC,IAAI,EAAE,CAAC;IACPF,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACH,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,57 +3,55 @@
|
|
|
3
3
|
import { useCallback, useLayoutEffect, useRef, useState } from "react";
|
|
4
4
|
import { useAnimatedReaction } from "react-native-reanimated";
|
|
5
5
|
import { scheduleOnRN } from "react-native-worklets";
|
|
6
|
-
import {
|
|
6
|
+
import { getPairKeyForSource } from "../../../../../../stores/bounds/internals/links";
|
|
7
7
|
import { createBoundaryPortalHostName } from "../../../utils/naming";
|
|
8
|
-
import { hasActiveBoundaryPortalLink } from "../helpers/active-pair";
|
|
9
8
|
import { mountPortalBoundaryHost, unmountPortalBoundaryHostByName } from "../stores/portal-boundary-host.store";
|
|
10
9
|
export const useActivePortalBoundaryHost = ({
|
|
11
10
|
boundaryId,
|
|
12
11
|
currentScreenKey,
|
|
13
12
|
escapeHostKey,
|
|
14
|
-
localStylesMaps,
|
|
15
13
|
portalHostName,
|
|
16
14
|
portalHostReady,
|
|
17
|
-
slotsMap
|
|
18
|
-
sourcePairKey
|
|
15
|
+
slotsMap
|
|
19
16
|
}) => {
|
|
20
|
-
const [
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (sourcePairKeyRef.current !== observedSourcePairKey) {
|
|
17
|
+
const [activePortal, setActivePortal] = useState(null);
|
|
18
|
+
const activePairKeyRef = useRef(null);
|
|
19
|
+
const updateActivePortal = useCallback(pairKey => {
|
|
20
|
+
if (activePairKeyRef.current === pairKey) {
|
|
25
21
|
return;
|
|
26
22
|
}
|
|
27
|
-
|
|
23
|
+
activePairKeyRef.current = pairKey;
|
|
24
|
+
setActivePortal(pairKey ? {
|
|
25
|
+
pairKey
|
|
26
|
+
} : null);
|
|
28
27
|
}, []);
|
|
29
28
|
useAnimatedReaction(() => {
|
|
30
29
|
"worklet";
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, (
|
|
31
|
+
const isBoundaryAnimating = slotsMap.get()[boundaryId] !== undefined;
|
|
32
|
+
if (!isBoundaryAnimating) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
return getPairKeyForSource(boundaryId, currentScreenKey);
|
|
36
|
+
}, (pairKey, previousPairKey) => {
|
|
38
37
|
"worklet";
|
|
39
38
|
|
|
40
|
-
if (
|
|
39
|
+
if (pairKey === previousPairKey) {
|
|
41
40
|
return;
|
|
42
41
|
}
|
|
43
|
-
scheduleOnRN(
|
|
42
|
+
scheduleOnRN(updateActivePortal, pairKey);
|
|
44
43
|
});
|
|
45
44
|
useLayoutEffect(() => {
|
|
46
|
-
if (!
|
|
45
|
+
if (!activePortal || !escapeHostKey) {
|
|
47
46
|
portalHostName.set(null);
|
|
48
47
|
portalHostReady.set(false);
|
|
49
48
|
return;
|
|
50
49
|
}
|
|
51
|
-
const nextPortalHostName = createBoundaryPortalHostName(escapeHostKey, boundaryId,
|
|
50
|
+
const nextPortalHostName = createBoundaryPortalHostName(escapeHostKey, boundaryId, activePortal.pairKey);
|
|
52
51
|
mountPortalBoundaryHost({
|
|
53
52
|
boundaryId,
|
|
54
53
|
hostKey: escapeHostKey,
|
|
55
|
-
|
|
56
|
-
pairKey: sourcePairKey,
|
|
54
|
+
pairKey: activePortal.pairKey,
|
|
57
55
|
portalHostName: nextPortalHostName,
|
|
58
56
|
portalHostReady,
|
|
59
57
|
screenKey: currentScreenKey,
|
|
@@ -65,6 +63,6 @@ export const useActivePortalBoundaryHost = ({
|
|
|
65
63
|
portalHostReady.set(false);
|
|
66
64
|
unmountPortalBoundaryHostByName(nextPortalHostName);
|
|
67
65
|
};
|
|
68
|
-
}, [boundaryId, currentScreenKey, escapeHostKey,
|
|
66
|
+
}, [activePortal, boundaryId, currentScreenKey, escapeHostKey, portalHostName, portalHostReady, slotsMap]);
|
|
69
67
|
};
|
|
70
68
|
//# sourceMappingURL=use-active-portal-boundary-host.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useLayoutEffect","useRef","useState","useAnimatedReaction","scheduleOnRN","
|
|
1
|
+
{"version":3,"names":["useCallback","useLayoutEffect","useRef","useState","useAnimatedReaction","scheduleOnRN","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":["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,SAA2BC,mBAAmB,QAAQ,yBAAyB;AAC/E,SAASC,YAAY,QAAQ,uBAAuB;AACpD,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,YAAY,EAAEC,eAAe,CAAC,GAAGf,QAAQ,CAAsB,IAAI,CAAC;EAC3E,MAAMgB,gBAAgB,GAAGjB,MAAM,CAAuB,IAAI,CAAC;EAE3D,MAAMkB,kBAAkB,GAAGpB,WAAW,CAAEqB,OAA6B,IAAK;IACzE,IAAIF,gBAAgB,CAACG,OAAO,KAAKD,OAAO,EAAE;MACzC;IACD;IAEAF,gBAAgB,CAACG,OAAO,GAAGD,OAA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AAU,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":["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;IA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