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
package/lib/commonjs/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.useInitialDestinationMeasurement = void 0;
|
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
9
|
var _reactNativeWorklets = require("react-native-worklets");
|
|
10
|
+
var _useStack = require("../../../../hooks/navigation/use-stack");
|
|
10
11
|
var _descriptors = require("../../../../providers/screen/descriptors");
|
|
11
12
|
var _animation = require("../../../../stores/animation.store");
|
|
12
13
|
var _linkPairs = require("../../../../stores/bounds/helpers/link-pairs.helpers");
|
|
@@ -42,6 +43,10 @@ const useInitialDestinationMeasurement = ({
|
|
|
42
43
|
const destinationEnabled = enabled && !nextScreenKey;
|
|
43
44
|
const canReceiveDestination = destinationEnabled && !!destinationPairKey;
|
|
44
45
|
const preferredSourceScreenKey = destinationPairKey ? (0, _linkPairs.getSourceScreenKeyFromPairKey)(destinationPairKey) : undefined;
|
|
46
|
+
const stackScenes = (0, _useStack.useStack)(store => store.scenes);
|
|
47
|
+
// A retained closing screen can still have registered boundaries, but it
|
|
48
|
+
// cannot own a new transition link.
|
|
49
|
+
const closingSourceScreenKeys = (0, _react.useMemo)(() => stackScenes.filter(scene => scene.activity === "closing").map(scene => scene.route.key), [stackScenes]);
|
|
45
50
|
const progress = _animation.AnimationStore.getValue(currentScreenKey, "transitionProgress");
|
|
46
51
|
const {
|
|
47
52
|
actions: {
|
|
@@ -53,6 +58,7 @@ const useInitialDestinationMeasurement = ({
|
|
|
53
58
|
const retryToken = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
54
59
|
const handshakeRetries = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
55
60
|
const hasGivenUp = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
61
|
+
const hasFinishedInitialMeasurement = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
56
62
|
const releaseLifecycleStartBlock = (0, _react.useCallback)(() => {
|
|
57
63
|
"worklet";
|
|
58
64
|
|
|
@@ -60,13 +66,14 @@ const useInitialDestinationMeasurement = ({
|
|
|
60
66
|
if (!isBlockingLifecycleStart.get()) {
|
|
61
67
|
return;
|
|
62
68
|
}
|
|
69
|
+
hasFinishedInitialMeasurement.set(1);
|
|
63
70
|
isBlockingLifecycleStart.set(0);
|
|
64
71
|
unblockLifecycleStart();
|
|
65
|
-
}, [isBlockingLifecycleStart, retryToken, unblockLifecycleStart]);
|
|
72
|
+
}, [hasFinishedInitialMeasurement, isBlockingLifecycleStart, retryToken, unblockLifecycleStart]);
|
|
66
73
|
const claimLifecycleStartBlock = (0, _react.useCallback)(() => {
|
|
67
74
|
"worklet";
|
|
68
75
|
|
|
69
|
-
if (!canReceiveDestination || !(0, _entries.getMatchingSourceScreenKey)(tag, currentScreenKey
|
|
76
|
+
if (!canReceiveDestination || hasFinishedInitialMeasurement.get() || !(0, _entries.getMatchingSourceScreenKey)(tag, currentScreenKey)) {
|
|
70
77
|
return;
|
|
71
78
|
}
|
|
72
79
|
|
|
@@ -78,7 +85,7 @@ const useInitialDestinationMeasurement = ({
|
|
|
78
85
|
}
|
|
79
86
|
blockLifecycleStart();
|
|
80
87
|
isBlockingLifecycleStart.set(1);
|
|
81
|
-
}, [blockLifecycleStart, canReceiveDestination, currentScreenKey, isBlockingLifecycleStart, progress,
|
|
88
|
+
}, [blockLifecycleStart, canReceiveDestination, currentScreenKey, hasFinishedInitialMeasurement, isBlockingLifecycleStart, progress, tag]);
|
|
82
89
|
(0, _react.useLayoutEffect)(() => {
|
|
83
90
|
if (!canReceiveDestination) {
|
|
84
91
|
return;
|
|
@@ -98,14 +105,14 @@ const useInitialDestinationMeasurement = ({
|
|
|
98
105
|
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
99
106
|
"worklet";
|
|
100
107
|
|
|
101
|
-
if (!canReceiveDestination || isBlockingLifecycleStart.get() <= 0) {
|
|
108
|
+
if (!canReceiveDestination || hasFinishedInitialMeasurement.get() || isBlockingLifecycleStart.get() <= 0) {
|
|
102
109
|
return null;
|
|
103
110
|
}
|
|
104
111
|
if (progress.get() > 0) {
|
|
105
112
|
return null;
|
|
106
113
|
}
|
|
107
114
|
const retryTick = retryToken.get();
|
|
108
|
-
const sourceScreenKey = (0, _entries.getMatchingSourceScreenKey)(tag, currentScreenKey, preferredSourceScreenKey);
|
|
115
|
+
const sourceScreenKey = (0, _entries.getMatchingSourceScreenKey)(tag, currentScreenKey, preferredSourceScreenKey, closingSourceScreenKeys);
|
|
109
116
|
const pairKey = sourceScreenKey ? (0, _linkPairs.createScreenPairKey)(sourceScreenKey, currentScreenKey) : undefined;
|
|
110
117
|
const signal = (0, _destinationSignals.getInitialDestinationMeasurementSignal)({
|
|
111
118
|
enabled: destinationEnabled,
|
|
@@ -120,11 +127,11 @@ const useInitialDestinationMeasurement = ({
|
|
|
120
127
|
}, (next, previous) => {
|
|
121
128
|
"worklet";
|
|
122
129
|
|
|
123
|
-
if (!next) {
|
|
130
|
+
if (!next || hasFinishedInitialMeasurement.get()) {
|
|
124
131
|
return;
|
|
125
132
|
}
|
|
126
133
|
const [measurePairKey, action, retryTick] = next;
|
|
127
|
-
if (!
|
|
134
|
+
if (!action) {
|
|
128
135
|
return;
|
|
129
136
|
}
|
|
130
137
|
const previousMeasurePairKey = previous?.[0];
|
|
@@ -142,17 +149,18 @@ const useInitialDestinationMeasurement = ({
|
|
|
142
149
|
handshakeRetries.set(0);
|
|
143
150
|
return;
|
|
144
151
|
}
|
|
145
|
-
if (action === "measure") {
|
|
152
|
+
if (action === "measure" && measurePairKey) {
|
|
146
153
|
measureBoundary({
|
|
147
154
|
type: "destination",
|
|
148
155
|
pairKey: measurePairKey
|
|
149
156
|
});
|
|
150
157
|
}
|
|
151
|
-
const link = (0, _links.getLink)(measurePairKey, linkKey);
|
|
158
|
+
const link = measurePairKey ? (0, _links.getLink)(measurePairKey, linkKey) : null;
|
|
152
159
|
const linkComplete = !!link?.source && !!link.destination;
|
|
153
160
|
if (linkComplete || action === "complete") {
|
|
154
161
|
(0, _reactNativeReanimated.cancelAnimation)(retryToken);
|
|
155
162
|
handshakeRetries.set(0);
|
|
163
|
+
hasFinishedInitialMeasurement.set(1);
|
|
156
164
|
if (escapeClipping) {
|
|
157
165
|
// Screen-level escape has a second readiness phase after destination
|
|
158
166
|
// matching: the host must commit before the transition starts, or
|
package/lib/commonjs/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_reactNativeWorklets","_descriptors","_animation","_linkPairs","_entries","_links","_state","_system","_logger","_destinationSignals","HANDSHAKE_RETRY_DELAY_MS","MAX_HANDSHAKE_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","escapeClipping","measureBoundary","tag","linkKey","group","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","destinationPairKey","destinationEnabled","canReceiveDestination","preferredSourceScreenKey","getSourceScreenKeyFromPairKey","undefined","progress","AnimationStore","getValue","actions","blockLifecycleStart","unblockLifecycleStart","SystemStore","getBag","isBlockingLifecycleStart","useSharedValue","retryToken","handshakeRetries","hasGivenUp","releaseLifecycleStartBlock","useCallback","cancelAnimation","get","set","claimLifecycleStartBlock","getMatchingSourceScreenKey","useLayoutEffect","scheduleOnUI","useAnimatedReaction","retryTick","sourceScreenKey","pairKey","createScreenPairKey","signal","getInitialDestinationMeasurementSignal","linkId","destinationPresent","getEntry","sourcePresent","linkState","pairs","action","next","previous","measurePairKey","previousMeasurePairKey","previousAction","previousRetryTick","shouldHandleSignal","type","link","getLink","linkComplete","source","destination","logger","warn","withDelay","withTiming","duration","exports"],"sourceRoot":"../../../../../../src","sources":["components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAOA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_reactNativeWorklets","_useStack","_descriptors","_animation","_linkPairs","_entries","_links","_state","_system","_logger","_destinationSignals","HANDSHAKE_RETRY_DELAY_MS","MAX_HANDSHAKE_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","escapeClipping","measureBoundary","tag","linkKey","group","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","destinationPairKey","destinationEnabled","canReceiveDestination","preferredSourceScreenKey","getSourceScreenKeyFromPairKey","undefined","stackScenes","useStack","store","scenes","closingSourceScreenKeys","useMemo","filter","scene","activity","map","route","key","progress","AnimationStore","getValue","actions","blockLifecycleStart","unblockLifecycleStart","SystemStore","getBag","isBlockingLifecycleStart","useSharedValue","retryToken","handshakeRetries","hasGivenUp","hasFinishedInitialMeasurement","releaseLifecycleStartBlock","useCallback","cancelAnimation","get","set","claimLifecycleStartBlock","getMatchingSourceScreenKey","useLayoutEffect","scheduleOnUI","useAnimatedReaction","retryTick","sourceScreenKey","pairKey","createScreenPairKey","signal","getInitialDestinationMeasurementSignal","linkId","destinationPresent","getEntry","sourcePresent","linkState","pairs","action","next","previous","measurePairKey","previousMeasurePairKey","previousAction","previousRetryTick","shouldHandleSignal","type","link","getLink","linkComplete","source","destination","logger","warn","withDelay","withTiming","duration","exports"],"sourceRoot":"../../../../../../src","sources":["components/boundary/hooks/lifecycles/use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GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;MAAEqC,QAAQ,EAAE;IAAE,CAAC,CACjD,CACD,CAAC;EACF,CACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAAtF,gCAAA,GAAAA,gCAAA","ignoreList":[]}
|
|
@@ -12,7 +12,6 @@ var _composeSlotStyle = require("../../../../../../providers/screen/styles/helpe
|
|
|
12
12
|
var _links = require("../../../../../../stores/bounds/internals/links");
|
|
13
13
|
var _system = require("../../../../../../stores/system.store");
|
|
14
14
|
var _teleport = require("../../../teleport");
|
|
15
|
-
var _hasLocalSlot = require("../helpers/has-local-slot");
|
|
16
15
|
var _offsetStyle = require("../helpers/offset-style");
|
|
17
16
|
var _hostBounds = require("../stores/host-bounds.store");
|
|
18
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -33,7 +32,10 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
|
|
|
33
32
|
return;
|
|
34
33
|
}
|
|
35
34
|
const link = (0, _links.getLink)(host.pairKey, host.boundaryId);
|
|
36
|
-
const
|
|
35
|
+
const hasSource = !!link?.source;
|
|
36
|
+
const hasHostBounds = (0, _hostBounds.getPortalHostBounds)(host.hostKey) !== null;
|
|
37
|
+
const hasSlot = host.slotsMap.get()[host.boundaryId] !== undefined;
|
|
38
|
+
const hasGeometry = hasSource && hasHostBounds && hasSlot;
|
|
37
39
|
if (!hasGeometry) {
|
|
38
40
|
geometryReadyFrames.set(0);
|
|
39
41
|
return;
|
|
@@ -81,19 +83,6 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
|
|
|
81
83
|
const slotStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
82
84
|
"worklet";
|
|
83
85
|
|
|
84
|
-
// `slotsMap` is the resolved map: it may contain real interpolator output,
|
|
85
|
-
// inherited styles, or resolver-created reset patches for slots that just
|
|
86
|
-
// disappeared. Normal components need those reset patches so stale styles
|
|
87
|
-
// clear correctly.
|
|
88
|
-
//
|
|
89
|
-
// A screen-level portal host is different. It is only the temporary visual
|
|
90
|
-
// receiver for teleported content, not the original component that needs a
|
|
91
|
-
// cleanup frame. If the current local interpolator layers did not emit this
|
|
92
|
-
// boundary id, any resolved style here is cleanup/stale residue and should
|
|
93
|
-
// not be drawn by the host.
|
|
94
|
-
if (!(0, _hasLocalSlot.hasLocalSlot)(host.localStylesMaps.get(), host.boundaryId)) {
|
|
95
|
-
return _constants.NO_STYLES;
|
|
96
|
-
}
|
|
97
86
|
const slot = host.slotsMap.get()[host.boundaryId];
|
|
98
87
|
return (0, _composeSlotStyle.composeSlotStyleWithLocalTransform)(slot?.style ?? _constants.NO_STYLES, undefined, slot?.boundsLocalTransform);
|
|
99
88
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_constants","_composeSlotStyle","_links","_system","_teleport","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_constants","_composeSlotStyle","_links","_system","_teleport","_offsetStyle","_hostBounds","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedPortalBoundaryHost","NativePortalHost","Animated","createAnimatedComponent","PortalBoundaryHost","exports","memo","host","style","geometryReadyFrames","useSharedValue","unblockLifecycleStart","SystemStore","getBag","screenKey","actions","handleFrame","useCallback","portalHostReady","link","getLink","pairKey","boundaryId","hasSource","source","hasHostBounds","getPortalHostBounds","hostKey","hasSlot","slotsMap","undefined","hasGeometry","useFrameCallback","hostStyle","useAnimatedStyle","NO_STYLES","sourceBounds","bounds","isCrossScreenPortal","resolvePortalOffsetStyle","placement","contentFrameStyle","height","width","slotStyle","slot","composeSlotStyleWithLocalTransform","boundsLocalTransform","jsx","View","pointerEvents","PORTAL_POINTER_EVENTS","collapsable","children","name","portalHostName","styles","content","StyleSheet","create","I18nManager","isRTL","end","position","top","left"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,OAAA;AAKA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAEA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAAkE,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAG,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,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","ignoreList":[]}
|
|
@@ -7,57 +7,55 @@ exports.useActivePortalBoundaryHost = void 0;
|
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
9
|
var _reactNativeWorklets = require("react-native-worklets");
|
|
10
|
-
var
|
|
10
|
+
var _links = require("../../../../../../stores/bounds/internals/links");
|
|
11
11
|
var _naming = require("../../../utils/naming");
|
|
12
|
-
var _activePair = require("../helpers/active-pair");
|
|
13
12
|
var _portalBoundaryHost = require("../stores/portal-boundary-host.store");
|
|
14
13
|
const useActivePortalBoundaryHost = ({
|
|
15
14
|
boundaryId,
|
|
16
15
|
currentScreenKey,
|
|
17
16
|
escapeHostKey,
|
|
18
|
-
localStylesMaps,
|
|
19
17
|
portalHostName,
|
|
20
18
|
portalHostReady,
|
|
21
|
-
slotsMap
|
|
22
|
-
sourcePairKey
|
|
19
|
+
slotsMap
|
|
23
20
|
}) => {
|
|
24
|
-
const [
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (sourcePairKeyRef.current !== observedSourcePairKey) {
|
|
21
|
+
const [activePortal, setActivePortal] = (0, _react.useState)(null);
|
|
22
|
+
const activePairKeyRef = (0, _react.useRef)(null);
|
|
23
|
+
const updateActivePortal = (0, _react.useCallback)(pairKey => {
|
|
24
|
+
if (activePairKeyRef.current === pairKey) {
|
|
29
25
|
return;
|
|
30
26
|
}
|
|
31
|
-
|
|
27
|
+
activePairKeyRef.current = pairKey;
|
|
28
|
+
setActivePortal(pairKey ? {
|
|
29
|
+
pairKey
|
|
30
|
+
} : null);
|
|
32
31
|
}, []);
|
|
33
32
|
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
34
33
|
"worklet";
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, (
|
|
35
|
+
const isBoundaryAnimating = slotsMap.get()[boundaryId] !== undefined;
|
|
36
|
+
if (!isBoundaryAnimating) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return (0, _links.getPairKeyForSource)(boundaryId, currentScreenKey);
|
|
40
|
+
}, (pairKey, previousPairKey) => {
|
|
42
41
|
"worklet";
|
|
43
42
|
|
|
44
|
-
if (
|
|
43
|
+
if (pairKey === previousPairKey) {
|
|
45
44
|
return;
|
|
46
45
|
}
|
|
47
|
-
(0, _reactNativeWorklets.scheduleOnRN)(
|
|
46
|
+
(0, _reactNativeWorklets.scheduleOnRN)(updateActivePortal, pairKey);
|
|
48
47
|
});
|
|
49
48
|
(0, _react.useLayoutEffect)(() => {
|
|
50
|
-
if (!
|
|
49
|
+
if (!activePortal || !escapeHostKey) {
|
|
51
50
|
portalHostName.set(null);
|
|
52
51
|
portalHostReady.set(false);
|
|
53
52
|
return;
|
|
54
53
|
}
|
|
55
|
-
const nextPortalHostName = (0, _naming.createBoundaryPortalHostName)(escapeHostKey, boundaryId,
|
|
54
|
+
const nextPortalHostName = (0, _naming.createBoundaryPortalHostName)(escapeHostKey, boundaryId, activePortal.pairKey);
|
|
56
55
|
(0, _portalBoundaryHost.mountPortalBoundaryHost)({
|
|
57
56
|
boundaryId,
|
|
58
57
|
hostKey: escapeHostKey,
|
|
59
|
-
|
|
60
|
-
pairKey: sourcePairKey,
|
|
58
|
+
pairKey: activePortal.pairKey,
|
|
61
59
|
portalHostName: nextPortalHostName,
|
|
62
60
|
portalHostReady,
|
|
63
61
|
screenKey: currentScreenKey,
|
|
@@ -69,7 +67,7 @@ const useActivePortalBoundaryHost = ({
|
|
|
69
67
|
portalHostReady.set(false);
|
|
70
68
|
(0, _portalBoundaryHost.unmountPortalBoundaryHostByName)(nextPortalHostName);
|
|
71
69
|
};
|
|
72
|
-
}, [boundaryId, currentScreenKey, escapeHostKey,
|
|
70
|
+
}, [activePortal, boundaryId, currentScreenKey, escapeHostKey, portalHostName, portalHostReady, slotsMap]);
|
|
73
71
|
};
|
|
74
72
|
exports.useActivePortalBoundaryHost = useActivePortalBoundaryHost;
|
|
75
73
|
//# sourceMappingURL=use-active-portal-boundary-host.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_reactNativeWorklets","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_reactNativeWorklets","_links","_naming","_portalBoundaryHost","useActivePortalBoundaryHost","boundaryId","currentScreenKey","escapeHostKey","portalHostName","portalHostReady","slotsMap","activePortal","setActivePortal","useState","activePairKeyRef","useRef","updateActivePortal","useCallback","pairKey","current","useAnimatedReaction","isBoundaryAnimating","get","undefined","getPairKeyForSource","previousPairKey","scheduleOnRN","useLayoutEffect","set","nextPortalHostName","createBoundaryPortalHostName","mountPortalBoundaryHost","hostKey","screenKey","unmountPortalBoundaryHostByName","exports"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAGA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AAkBO,MAAMM,2BAA2B,GAAGA,CAAC;EAC3CC,UAAU;EACVC,gBAAgB;EAChBC,aAAa;EACbC,cAAc;EACdC,eAAe;EACfC;AACkC,CAAC,KAAK;EACxC,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAC,eAAQ,EAAsB,IAAI,CAAC;EAC3E,MAAMC,gBAAgB,GAAG,IAAAC,aAAM,EAAuB,IAAI,CAAC;EAE3D,MAAMC,kBAAkB,GAAG,IAAAC,kBAAW,EAAEC,OAA6B,IAAK;IACzE,IAAIJ,gBAAgB,CAACK,OAAO,KAAKD,OAAO,EAAE;MACzC;IACD;IAEAJ,gBAAgB,CAACK,OAAO,GAAGD,OAAO;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ACpD,CAAC;EACF,CAAC,EAAE,CACFlB,YAAY,EACZN,UAAU,EACVC,gBAAgB,EAChBC,aAAa,EACbC,cAAc,EACdC,eAAe,EACfC,QAAQ,CACR,CAAC;AACH,CAAC;AAACyB,OAAA,CAAA/B,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -7,40 +7,26 @@ exports.useBoundaryPortalAttachment = void 0;
|
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
8
|
var _descriptors = require("../../../../../../providers/screen/descriptors");
|
|
9
9
|
var _styles = require("../../../../../../providers/screen/styles");
|
|
10
|
-
var _transitionVisualState = require("../../../../../../providers/screen/styles/helpers/transition-visual-state");
|
|
11
|
-
var _animation = require("../../../../../../stores/animation.store");
|
|
12
|
-
var _state = require("../../../../../../stores/bounds/internals/state");
|
|
13
|
-
var _system = require("../../../../../../stores/system.store");
|
|
14
10
|
var _naming = require("../../../utils/naming");
|
|
15
11
|
var _teleportControl = require("../../../utils/teleport-control");
|
|
16
|
-
var _activePair = require("../helpers/active-pair");
|
|
17
12
|
var _hostRegistry = require("../stores/host-registry.store");
|
|
18
13
|
var _useActivePortalBoundaryHost = require("./use-active-portal-boundary-host");
|
|
19
14
|
const useBoundaryPortalAttachment = ({
|
|
20
15
|
boundaryId
|
|
21
16
|
}) => {
|
|
22
|
-
const sourcePairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.sourcePairKey);
|
|
23
17
|
const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
|
|
24
|
-
const nextScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.nextScreenKey);
|
|
25
|
-
const destinationScreenKey = nextScreenKey ?? currentScreenKey;
|
|
26
|
-
const destinationAnimationProgress = _system.SystemStore.getValue(destinationScreenKey, "animationProgress");
|
|
27
|
-
const destinationClosing = _animation.AnimationStore.getValue(destinationScreenKey, "closing");
|
|
28
18
|
const {
|
|
29
|
-
localStylesMaps,
|
|
30
19
|
slotsMap
|
|
31
20
|
} = (0, _styles.useScreenSlots)();
|
|
32
21
|
const portalHostName = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
33
22
|
const portalHostReady = (0, _reactNativeReanimated.useSharedValue)(false);
|
|
34
|
-
const attachedDestination = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
35
23
|
const escapeHostKey = (0, _hostRegistry.useActiveHostKey)(currentScreenKey);
|
|
36
24
|
(0, _useActivePortalBoundaryHost.useActivePortalBoundaryHost)({
|
|
37
25
|
boundaryId,
|
|
38
26
|
currentScreenKey,
|
|
39
27
|
escapeHostKey,
|
|
40
|
-
localStylesMaps,
|
|
41
28
|
portalHostName,
|
|
42
29
|
portalHostReady,
|
|
43
|
-
sourcePairKey,
|
|
44
30
|
slotsMap
|
|
45
31
|
});
|
|
46
32
|
const teleportProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
|
|
@@ -52,30 +38,11 @@ const useBoundaryPortalAttachment = ({
|
|
|
52
38
|
teleport,
|
|
53
39
|
...slotProps
|
|
54
40
|
} = slot?.props ?? {};
|
|
55
|
-
const
|
|
56
|
-
const hostName = portalHostName.get();
|
|
57
|
-
const hasActiveLink = (0, _activePair.hasActiveBoundaryPortalLink)({
|
|
58
|
-
boundaryId,
|
|
59
|
-
pairsState: _state.pairs.get(),
|
|
60
|
-
sourcePairKey
|
|
61
|
-
});
|
|
62
|
-
const hasAttachableHost = shouldTeleport && hasActiveLink && portalHostReady.get() && hostName;
|
|
63
|
-
if (hasAttachableHost) {
|
|
64
|
-
attachedDestination.set({
|
|
65
|
-
animationProgress: destinationAnimationProgress,
|
|
66
|
-
closing: destinationClosing
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
const attached = attachedDestination.get();
|
|
70
|
-
const hasAttachedCloseFinished = attached !== null && (0, _transitionVisualState.hasCloseTransitionFinished)({
|
|
71
|
-
animationProgress: attached.animationProgress.get(),
|
|
72
|
-
closing: attached.closing.get()
|
|
73
|
-
});
|
|
74
|
-
const canAttach = hasAttachableHost && !hasAttachedCloseFinished;
|
|
75
|
-
const targetHostName = canAttach ? hostName : _naming.PORTAL_HOST_NAME_RESET_VALUE;
|
|
41
|
+
const shouldAttach = slot !== undefined && (0, _teleportControl.isTeleportEnabled)(teleport) && portalHostReady.get();
|
|
42
|
+
const hostName = shouldAttach ? portalHostName.get() : _naming.PORTAL_HOST_NAME_RESET_VALUE;
|
|
76
43
|
return {
|
|
77
44
|
...slotProps,
|
|
78
|
-
hostName
|
|
45
|
+
hostName
|
|
79
46
|
};
|
|
80
47
|
});
|
|
81
48
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_descriptors","_styles","
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_descriptors","_styles","_naming","_teleportControl","_hostRegistry","_useActivePortalBoundaryHost","useBoundaryPortalAttachment","boundaryId","currentScreenKey","useDescriptorsStore","s","derivations","slotsMap","useScreenSlots","portalHostName","useSharedValue","portalHostReady","escapeHostKey","useActiveHostKey","useActivePortalBoundaryHost","teleportProps","useAnimatedProps","slot","get","pointerEvents","_pointerEvents","teleport","slotProps","props","shouldAttach","undefined","isTeleportEnabled","hostName","PORTAL_HOST_NAME_RESET_VALUE","exports"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,4BAAA,GAAAN,OAAA;AAMO,MAAMO,2BAA2B,GAAGA,CAAC;EAC3CC;AACkC,CAAC,KAAK;EACxC,MAAMC,gBAAgB,GAAG,IAAAC,gCAAmB,EAC1CC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACH,gBACtB,CAAC;EACD,MAAM;IAAEI;EAAS,CAAC,GAAG,IAAAC,sBAAc,EAAC,CAAC;EACrC,MAAMC,cAAc,GAAG,IAAAC,qCAAc,EAAgB,IAAI,CAAC;EAC1D,MAAMC,eAAe,GAAG,IAAAD,qCAAc,EAAC,KAAK,CAAC;EAC7C,MAAME,aAAa,GAAG,IAAAC,8BAAgB,EAACV,gBAAgB,CAAC;EAExD,IAAAW,wDAA2B,EAAC;IAC3BZ,UAAU;IACVC,gBAAgB;IAChBS,aAAa;IACbH,cAAc;IACdE,eAAe;IACfJ;EACD,CAAC,CAAC;EAEF,MAAMQ,aAAa,GAAG,IAAAC,uCAAgB,EAAC,MAAM;IAC5C,SAAS;;IAET,MAAMC,IAAI,GAAGV,QAAQ,CAACW,GAAG,CAAC,CAAC,CAAChB,UAAU,CAAC;IACvC,MAAM;MACLiB,aAAa,EAAEC,cAAc;MAC7BC,QAAQ;MACR,GAAGC;IACJ,CAAC,GAAGL,IAAI,EAAEM,KAAK,IAAI,CAAC,CAAC;IACrB,MAAMC,YAAY,GACjBP,IAAI,KAAKQ,SAAS,IAClB,IAAAC,kCAAiB,EAACL,QAAQ,CAAC,IAC3BV,eAAe,CAACO,GAAG,CAAC,CAAC;IACtB,MAAMS,QAAQ,GAAGH,YAAY,GAC1Bf,cAAc,CAACS,GAAG,CAAC,CAAC,GACpBU,oCAA4B;IAE/B,OAAO;MACN,GAAGN,SAAS;MACZK;IACD,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IAAEZ;EAAc,CAAC;AACzB,CAAC;AAACc,OAAA,CAAA5B,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -65,7 +65,7 @@ const useHostMeasurement = ({
|
|
|
65
65
|
viewportWidth,
|
|
66
66
|
viewportHeight
|
|
67
67
|
});
|
|
68
|
-
if (
|
|
68
|
+
if (correctedMeasured.width <= 0 || correctedMeasured.height <= 0) {
|
|
69
69
|
(0, _reactNativeReanimated.cancelAnimation)(retryToken);
|
|
70
70
|
retryToken.set((0, _reactNativeReanimated.withDelay)(HOST_MEASUREMENT_RETRY_DELAY_MS, (0, _reactNativeReanimated.withTiming)(retryToken.get() + 1, {
|
|
71
71
|
duration: 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_reactNativeWorklets","_scroll","_visibilityBlockOffset","_measuredBounds","_hostBounds","HOST_MEASUREMENT_RETRY_DELAY_MS","useHostMeasurement","capturesScroll","enabled","hostKey","screenKey","visibilityBlocked","viewportHeight","viewportWidth","hostRef","useAnimatedRef","scrollMetadata","ScrollStore","getValue","hasMeasuredHost","useSharedValue","retryToken","useAnimatedReaction","get","state","cancelAnimation","hasAlreadyMeasured","measured","measure","set","withDelay","withTiming","duration","currentScroll","overscrollNormalized","adjustedMeasuredBoundsForOverscrollDeltas","correctedMeasured","correctMeasuredBoundsForVisibilityGate","visibilityBlockOffset","getVisibilityBlockOffset","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_reactNativeWorklets","_scroll","_visibilityBlockOffset","_measuredBounds","_hostBounds","HOST_MEASUREMENT_RETRY_DELAY_MS","useHostMeasurement","capturesScroll","enabled","hostKey","screenKey","visibilityBlocked","viewportHeight","viewportWidth","hostRef","useAnimatedRef","scrollMetadata","ScrollStore","getValue","hasMeasuredHost","useSharedValue","retryToken","useAnimatedReaction","get","state","cancelAnimation","hasAlreadyMeasured","measured","measure","set","withDelay","withTiming","duration","currentScroll","overscrollNormalized","adjustedMeasuredBoundsForOverscrollDeltas","correctedMeasured","correctMeasuredBoundsForVisibilityGate","visibilityBlockOffset","getVisibilityBlockOffset","width","height","setPortalHostBounds","x","y","pageX","pageY","scroll","useLayoutEffect","scheduleOnUI","clearPortalHostBounds","exports"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AA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AAG0B,aAAa,GAAG;IAC1C,CAAC,CAAC;IAEFd,eAAe,CAACU,GAAG,CAAC,IAAI,CAAC;EAC1B,CACD,CAAC;EAED,IAAAmB,sBAAe,EAAC,MAAM;IACrB,OAAO,MAAM;MACZ,IAAAC,iCAAY,EAACC,iCAAqB,EAAEzC,OAAO,CAAC;IAC7C,CAAC;EACF,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,OAAO;IACNK;EACD,CAAC;AACF,CAAC;AAACqC,OAAA,CAAA7C,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -29,7 +29,7 @@ const emit = () => {
|
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
const isSameHost = (a, b) => {
|
|
32
|
-
return a.boundaryId === b.boundaryId && a.hostKey === b.hostKey && a.
|
|
32
|
+
return a.boundaryId === b.boundaryId && a.hostKey === b.hostKey && a.pairKey === b.pairKey && a.portalHostName === b.portalHostName && a.portalHostReady === b.portalHostReady && a.screenKey === b.screenKey && a.slotsMap === b.slotsMap;
|
|
33
33
|
};
|
|
34
34
|
const mountPortalBoundaryHost = host => {
|
|
35
35
|
const previous = activeBoundaryHosts.get(host.portalHostName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","
|
|
1
|
+
{"version":3,"names":["_react","require","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","pairKey","portalHostName","portalHostReady","screenKey","slotsMap","mountPortalBoundaryHost","previous","get","set","exports","unmountPortalBoundaryHostByName","delete","subscribe","add","useActivePortalBoundaryHosts","useSyncExternalStore"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts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;AAEM,MAAMC,uBAAuB,GAAIhB,IAA8B,IAAK;EAC1E,MAAMiB,QAAQ,GAAGtB,mBAAmB,CAACuB,GAAG,CAAClB,IAAI,CAACY,cAAc,CAAC;EAC7D,IAAIK,QAAQ,IAAIV,UAAU,CAACU,QAAQ,EAAEjB,IAAI,CAAC,EAAE;IAC3C;EACD;EAEAL,mBAAmB,CAACwB,GAAG,CAACnB,IAAI,CAACY,cAAc,EAAEZ,IAAI,CAAC;EAClDK,IAAI,CAAC,CAAC;AACP,CAAC;AAACe,OAAA,CAAAJ,uBAAA,GAAAA,uBAAA;AAEK,MAAMK,+BAA+B,GAC3CT,cAAyC,IACrC;EACJ,IAAI,CAACA,cAAc,IAAI,CAACjB,mBAAmB,CAAC2B,MAAM,CAACV,cAAc,CAAC,EAAE;IACnE;EACD;EAEAP,IAAI,CAAC,CAAC;AACP,CAAC;AAACe,OAAA,CAAAC,+BAAA,GAAAA,+BAAA;AAEF,MAAME,SAAS,GAAIjB,QAAoB,IAAK;EAC3Cb,SAAS,CAAC+B,GAAG,CAAClB,QAAQ,CAAC;EAEvB,OAAO,MAAM;IACZb,SAAS,CAAC6B,MAAM,CAAChB,QAAQ,CAAC;EAC3B,CAAC;AACF,CAAC;AAEM,MAAMmB,4BAA4B,GAAItB,OAAe,IAAK;EAChE,OAAO,IAAAuB,2BAAoB,EAC1BH,SAAS,EACT,MAAM1B,QAAQ,CAACC,YAAY,CAACK,OAAO,CAAC,IAAIX,WAAW,EACnD,MAAMA,WACP,CAAC;AACF,CAAC;AAAC4B,OAAA,CAAAK,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
|
@@ -17,9 +17,15 @@ const getInitialDestinationMeasurementSignal = params => {
|
|
|
17
17
|
sourcePresent,
|
|
18
18
|
linkState
|
|
19
19
|
} = params;
|
|
20
|
-
if (!enabled
|
|
20
|
+
if (!enabled) {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
+
if (!pairKey) {
|
|
24
|
+
return {
|
|
25
|
+
pairKey: null,
|
|
26
|
+
action: "wait"
|
|
27
|
+
};
|
|
28
|
+
}
|
|
23
29
|
if (!destinationPresent) {
|
|
24
30
|
return {
|
|
25
31
|
pairKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_linkPairs","require","getInitialDestinationMeasurementSignal","params","enabled","pairKey","linkId","group","destinationPresent","sourcePresent","linkState","action","linkKey","getLinkKeyFromTag","activeGroupId","getActiveGroupId","link","links","destination","source","exports"],"sourceRoot":"../../../../../src","sources":["components/boundary/utils/destination-signals.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAoBO,MAAMC,sCAAsC,GAAIC,MAQtD,IAAiD;EACjD,SAAS;;EACT,MAAM;IACLC,OAAO;IACPC,OAAO;IACPC,MAAM;IACNC,KAAK;IACLC,kBAAkB;IAClBC,aAAa;IACbC;EACD,CAAC,GAAGP,MAAM;EACV,IAAI,CAACC,OAAO,IAAI,CAACC,OAAO,EAAE;
|
|
1
|
+
{"version":3,"names":["_linkPairs","require","getInitialDestinationMeasurementSignal","params","enabled","pairKey","linkId","group","destinationPresent","sourcePresent","linkState","action","linkKey","getLinkKeyFromTag","activeGroupId","getActiveGroupId","link","links","destination","source","exports"],"sourceRoot":"../../../../../src","sources":["components/boundary/utils/destination-signals.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAoBO,MAAMC,sCAAsC,GAAIC,MAQtD,IAAiD;EACjD,SAAS;;EACT,MAAM;IACLC,OAAO;IACPC,OAAO;IACPC,MAAM;IACNC,KAAK;IACLC,kBAAkB;IAClBC,aAAa;IACbC;EACD,CAAC,GAAGP,MAAM;EACV,IAAI,CAACC,OAAO,EAAE;IACb,OAAO,IAAI;EACZ;EAEA,IAAI,CAACC,OAAO,EAAE;IACb,OAAO;MAAEA,OAAO,EAAE,IAAI;MAAEM,MAAM,EAAE;IAAO,CAAC;EACzC;EAEA,IAAI,CAACH,kBAAkB,EAAE;IACxB,OAAO;MAAEH,OAAO;MAAEM,MAAM,EAAE;IAAO,CAAC;EACnC;EAEA,IAAI,CAACF,aAAa,EAAE;IACnB,OAAO;MAAEJ,OAAO;MAAEM,MAAM,EAAE;IAAU,CAAC;EACtC;EAEA,MAAMC,OAAO,GAAG,IAAAC,4BAAiB,EAACP,MAAM,CAAC;EACzC,MAAMQ,aAAa,GAClBP,KAAK,IAAIG,SAAS,GAAG,IAAAK,2BAAgB,EAACL,SAAS,EAAEL,OAAO,EAAEE,KAAK,CAAC,GAAG,IAAI;EAExE,IAAIO,aAAa,IAAIA,aAAa,KAAKF,OAAO,EAAE;IAC/C,OAAO;MAAEP,OAAO;MAAEM,MAAM,EAAE;IAAU,CAAC;EACtC;EAEA,MAAMK,IAAI,GAAGN,SAAS,GAAGL,OAAO,CAAC,EAAEY,KAAK,GAAGL,OAAO,CAAC;EAEnD,IAAI,CAACI,IAAI,EAAEE,WAAW,EAAE;IACvB,OAAO;MAAEb,OAAO;MAAEM,MAAM,EAAE;IAAU,CAAC;EACtC;EAEA,IAAI,CAACK,IAAI,CAACG,MAAM,EAAE;IACjB,OAAO;MAAEd,OAAO;MAAEM,MAAM,EAAE;IAAO,CAAC;EACnC;EAEA,OAAO;IAAEN,OAAO;IAAEM,MAAM,EAAE;EAAW,CAAC;AACvC,CAAC;AAACS,OAAA,CAAAlB,sCAAA,GAAAA,sCAAA","ignoreList":[]}
|
|
@@ -50,16 +50,16 @@ const mergeSlots = (frozen, live) => {
|
|
|
50
50
|
}
|
|
51
51
|
return merged;
|
|
52
52
|
};
|
|
53
|
-
const
|
|
53
|
+
const composeCurrentAndNextStyles = (current, next) => {
|
|
54
54
|
"worklet";
|
|
55
55
|
|
|
56
56
|
const composed = {
|
|
57
|
-
...
|
|
57
|
+
...current
|
|
58
58
|
};
|
|
59
|
-
for (const slotId in
|
|
60
|
-
const
|
|
61
|
-
if (
|
|
62
|
-
composed[slotId] = mergeSlots(
|
|
59
|
+
for (const slotId in next) {
|
|
60
|
+
const nextSlot = next[slotId];
|
|
61
|
+
if (nextSlot) {
|
|
62
|
+
composed[slotId] = mergeSlots(current[slotId], nextSlot);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
return composed;
|
|
@@ -67,26 +67,27 @@ const composeFrozenAndLiveStyles = (frozen, live) => {
|
|
|
67
67
|
const resolveInterpolatorStyleHandoff = ({
|
|
68
68
|
currentOwnsInterpolator,
|
|
69
69
|
currentStylesMap,
|
|
70
|
-
nextStylesMap
|
|
71
|
-
frozenCurrentStylesMap
|
|
70
|
+
nextStylesMap
|
|
72
71
|
}) => {
|
|
73
72
|
"worklet";
|
|
74
73
|
|
|
75
74
|
if (currentOwnsInterpolator) {
|
|
76
75
|
return {
|
|
77
|
-
localStylesMaps: currentStylesMap ? [currentStylesMap] : []
|
|
78
|
-
nextFrozenCurrentStylesMap: currentStylesMap ?? frozenCurrentStylesMap
|
|
76
|
+
localStylesMaps: currentStylesMap ? [currentStylesMap] : []
|
|
79
77
|
};
|
|
80
78
|
}
|
|
81
79
|
if (!nextStylesMap) {
|
|
82
80
|
return {
|
|
83
|
-
localStylesMaps:
|
|
84
|
-
|
|
81
|
+
localStylesMaps: currentStylesMap ? [currentStylesMap] : []
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
if (!currentStylesMap) {
|
|
85
|
+
return {
|
|
86
|
+
localStylesMaps: [nextStylesMap]
|
|
85
87
|
};
|
|
86
88
|
}
|
|
87
89
|
return {
|
|
88
|
-
localStylesMaps: [
|
|
89
|
-
nextFrozenCurrentStylesMap: frozenCurrentStylesMap
|
|
90
|
+
localStylesMaps: [composeCurrentAndNextStyles(currentStylesMap, nextStylesMap)]
|
|
90
91
|
};
|
|
91
92
|
};
|
|
92
93
|
exports.resolveInterpolatorStyleHandoff = resolveInterpolatorStyleHandoff;
|
package/lib/commonjs/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["mergeBuckets","frozen","live","composeTransforms","merged","key","liveValue","undefined","frozenValue","Array","isArray","mergeSlots","style","props","boundsLocalTransform","
|
|
1
|
+
{"version":3,"names":["mergeBuckets","frozen","live","composeTransforms","merged","key","liveValue","undefined","frozenValue","Array","isArray","mergeSlots","style","props","boundsLocalTransform","composeCurrentAndNextStyles","current","next","composed","slotId","nextSlot","resolveInterpolatorStyleHandoff","currentOwnsInterpolator","currentStylesMap","nextStylesMap","localStylesMaps","exports"],"sourceRoot":"../../../../../../src","sources":["providers/screen/styles/helpers/resolve-interpolator-style-handoff.ts"],"mappings":";;;;;;AAMA,MAAMA,YAAY,GAAGA,CACpBC,MAA2C,EAC3CC,IAAyC,EACzCC,iBAA0B,KACtB;EACJ,SAAS;;EAET,IAAI,CAACF,MAAM,EAAE;IACZ,OAAOC,IAAI;EACZ;EAEA,IAAI,CAACA,IAAI,EAAE;IACV,OAAOD,MAAM;EACd;EAEA,MAAMG,MAA+B,GAAG;IAAE,GAAGH;EAAO,CAAC;EAErD,KAAK,MAAMI,GAAG,IAAIH,IAAI,EAAE;IACvB,MAAMI,SAAS,GAAGJ,IAAI,CAACG,GAAG,CAAC;IAE3B,IAAIC,SAAS,KAAKC,SAAS,IAAID,SAAS,KAAK,IAAI,EAAE;MAClD;IACD;IAEA,MAAME,WAAW,GAAGP,MAAM,CAACI,GAAG,CAAC;IAE/B,IACCF,iBAAiB,IACjBE,GAAG,KAAK,WAAW,IACnBI,KAAK,CAACC,OAAO,CAACF,WAAW,CAAC,IAC1BC,KAAK,CAACC,OAAO,CAACJ,SAAS,CAAC,EACvB;MACDF,MAAM,CAACC,GAAG,CAAC,GAAG,CAAC,GAAGG,WAAW,EAAE,GAAGF,SAAS,CAAC;MAC5C;IACD;IAEAF,MAAM,CAACC,GAAG,CAAC,GAAGC,SAAS;EACxB;EAEA,OAAOF,MAAM;AACd,CAAC;AAED,MAAMO,UAAU,GAAGA,CAClBV,MAAiD,EACjDC,IAAmC,KACA;EACnC,SAAS;;E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