react-native-screen-transitions 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/bound-capture.js +7 -2
- package/lib/commonjs/components/bound-capture.js.map +1 -1
- package/lib/commonjs/components/controllers/screen-lifecycle.js +3 -9
- package/lib/commonjs/components/controllers/screen-lifecycle.js.map +1 -1
- package/lib/commonjs/components/create-transition-aware-component.js +2 -1
- package/lib/commonjs/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/components/root-transition-aware.js +3 -1
- package/lib/commonjs/components/root-transition-aware.js.map +1 -1
- package/lib/commonjs/hooks/animation/use-associated-style.js +41 -6
- package/lib/commonjs/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/commonjs/hooks/bounds/use-bound-registry.js +8 -6
- package/lib/commonjs/hooks/bounds/use-bound-registry.js.map +1 -1
- package/lib/commonjs/providers/transition-styles.js +5 -1
- package/lib/commonjs/providers/transition-styles.js.map +1 -1
- package/lib/commonjs/stores/bounds/_utils.js +118 -0
- package/lib/commonjs/stores/bounds/_utils.js.map +1 -0
- package/lib/commonjs/stores/bounds/index.js +116 -0
- package/lib/commonjs/stores/bounds/index.js.map +1 -0
- package/lib/commonjs/stores/utils/reset-stores-for-screen.js +1 -4
- package/lib/commonjs/stores/utils/reset-stores-for-screen.js.map +1 -1
- package/lib/module/components/bound-capture.js +7 -2
- package/lib/module/components/bound-capture.js.map +1 -1
- package/lib/module/components/controllers/screen-lifecycle.js +3 -9
- package/lib/module/components/controllers/screen-lifecycle.js.map +1 -1
- package/lib/module/components/create-transition-aware-component.js +2 -1
- package/lib/module/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/components/root-transition-aware.js +3 -1
- package/lib/module/components/root-transition-aware.js.map +1 -1
- package/lib/module/hooks/animation/use-associated-style.js +42 -7
- package/lib/module/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/module/hooks/bounds/use-bound-registry.js +8 -6
- package/lib/module/hooks/bounds/use-bound-registry.js.map +1 -1
- package/lib/module/providers/transition-styles.js +5 -1
- package/lib/module/providers/transition-styles.js.map +1 -1
- package/lib/module/stores/bounds/_utils.js +113 -0
- package/lib/module/stores/bounds/_utils.js.map +1 -0
- package/lib/module/stores/bounds/index.js +112 -0
- package/lib/module/stores/bounds/index.js.map +1 -0
- package/lib/module/stores/utils/reset-stores-for-screen.js +1 -4
- package/lib/module/stores/utils/reset-stores-for-screen.js.map +1 -1
- package/lib/typescript/components/bound-capture.d.ts.map +1 -1
- package/lib/typescript/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/hooks/animation/use-associated-style.d.ts +4 -4
- package/lib/typescript/hooks/animation/use-associated-style.d.ts.map +1 -1
- package/lib/typescript/hooks/bounds/use-bound-registry.d.ts.map +1 -1
- package/lib/typescript/providers/transition-styles.d.ts +4 -1
- package/lib/typescript/providers/transition-styles.d.ts.map +1 -1
- package/lib/typescript/stores/bounds/_utils.d.ts +24 -0
- package/lib/typescript/stores/bounds/_utils.d.ts.map +1 -0
- package/lib/typescript/stores/{bounds.d.ts → bounds/index.d.ts} +3 -13
- package/lib/typescript/stores/bounds/index.d.ts.map +1 -0
- package/lib/typescript/stores/utils/reset-stores-for-screen.d.ts +1 -3
- package/lib/typescript/stores/utils/reset-stores-for-screen.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/bounds.store.test.ts +185 -0
- package/src/components/bound-capture.tsx +5 -2
- package/src/components/controllers/screen-lifecycle.tsx +3 -3
- package/src/components/create-transition-aware-component.tsx +1 -0
- package/src/components/root-transition-aware.tsx +1 -1
- package/src/hooks/animation/use-associated-style.tsx +42 -7
- package/src/hooks/bounds/use-bound-registry.tsx +9 -12
- package/src/providers/transition-styles.tsx +8 -2
- package/src/stores/bounds/_utils.ts +161 -0
- package/src/stores/bounds/index.ts +125 -0
- package/src/stores/utils/reset-stores-for-screen.ts +1 -7
- package/LICENSE +0 -21
- package/lib/commonjs/stores/bounds.js +0 -205
- package/lib/commonjs/stores/bounds.js.map +0 -1
- package/lib/module/stores/bounds.js +0 -201
- package/lib/module/stores/bounds.js.map +0 -1
- package/lib/typescript/stores/bounds.d.ts.map +0 -1
- package/src/stores/bounds.ts +0 -227
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type MeasuredDimensions,
|
|
3
|
+
makeMutable,
|
|
4
|
+
type StyleProps,
|
|
5
|
+
} from "react-native-reanimated";
|
|
6
|
+
import type { ScreenTransitionState } from "../../types/animation";
|
|
7
|
+
import type { ScreenKey } from "../../types/navigator";
|
|
8
|
+
import type { Any } from "../../types/utils";
|
|
9
|
+
import { pairKey, resolveActiveBound } from "./_utils";
|
|
10
|
+
|
|
11
|
+
type BoundsDict = Record<
|
|
12
|
+
string,
|
|
13
|
+
Record<string, { bounds: MeasuredDimensions; styles: StyleProps }>
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
const registry = makeMutable<BoundsDict>({});
|
|
17
|
+
const pairCache = makeMutable<Record<string, string>>({});
|
|
18
|
+
const lastActiveByRoute = makeMutable<Record<string, string>>({});
|
|
19
|
+
|
|
20
|
+
function setBounds(
|
|
21
|
+
screenId: string,
|
|
22
|
+
boundId: string,
|
|
23
|
+
bounds: MeasuredDimensions | null = null,
|
|
24
|
+
styles: StyleProps = {},
|
|
25
|
+
) {
|
|
26
|
+
"worklet";
|
|
27
|
+
registry.modify((state: Any) => {
|
|
28
|
+
"worklet";
|
|
29
|
+
if (!state[screenId]) {
|
|
30
|
+
state[screenId] = {};
|
|
31
|
+
}
|
|
32
|
+
state[screenId][boundId] = { bounds, styles };
|
|
33
|
+
|
|
34
|
+
return state;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function getBounds(screenId: string) {
|
|
39
|
+
"worklet";
|
|
40
|
+
return registry.value[screenId] ?? {};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function setRouteActive(routeKey: string, boundId: string) {
|
|
44
|
+
"worklet";
|
|
45
|
+
lastActiveByRoute.modify((state: Any) => {
|
|
46
|
+
"worklet";
|
|
47
|
+
state[routeKey] = boundId;
|
|
48
|
+
return state;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function getRouteActive(routeKey: string) {
|
|
53
|
+
"worklet";
|
|
54
|
+
return lastActiveByRoute.value[routeKey] ?? null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function setPairCache(fromKey: string, toKey: string, boundId: string) {
|
|
58
|
+
"worklet";
|
|
59
|
+
const key = pairKey(fromKey, toKey);
|
|
60
|
+
if (!key) return;
|
|
61
|
+
pairCache.modify((state: Any) => {
|
|
62
|
+
"worklet";
|
|
63
|
+
state[key] = boundId;
|
|
64
|
+
return state;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function getPairCache(fromKey: string, toKey: string) {
|
|
69
|
+
"worklet";
|
|
70
|
+
const key = pairKey(fromKey, toKey);
|
|
71
|
+
if (!key) return null;
|
|
72
|
+
return pairCache.value[key] ?? null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function clear(routeKey: ScreenKey) {
|
|
76
|
+
"worklet";
|
|
77
|
+
registry.modify((state) => {
|
|
78
|
+
"worklet";
|
|
79
|
+
delete state[routeKey];
|
|
80
|
+
return state;
|
|
81
|
+
});
|
|
82
|
+
lastActiveByRoute.modify((state) => {
|
|
83
|
+
"worklet";
|
|
84
|
+
if (state[routeKey]) delete state[routeKey];
|
|
85
|
+
return state;
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
pairCache.modify((state) => {
|
|
89
|
+
"worklet";
|
|
90
|
+
const keys = Object.keys(state);
|
|
91
|
+
for (let i = 0; i < keys.length; i++) {
|
|
92
|
+
const k = keys[i];
|
|
93
|
+
const [from, to] = k.split("|");
|
|
94
|
+
if (from === routeKey || to === routeKey) {
|
|
95
|
+
delete state[k];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return state;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function getActiveBound(
|
|
103
|
+
current: ScreenTransitionState,
|
|
104
|
+
next: ScreenTransitionState | undefined,
|
|
105
|
+
previous: ScreenTransitionState | undefined,
|
|
106
|
+
) {
|
|
107
|
+
"worklet";
|
|
108
|
+
return resolveActiveBound({
|
|
109
|
+
current,
|
|
110
|
+
next,
|
|
111
|
+
previous,
|
|
112
|
+
getPairCache,
|
|
113
|
+
setPairCache,
|
|
114
|
+
getRouteActive,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export const Bounds = {
|
|
119
|
+
setBounds,
|
|
120
|
+
getBounds,
|
|
121
|
+
setRouteActive,
|
|
122
|
+
getRouteActive,
|
|
123
|
+
clear,
|
|
124
|
+
getActiveBound,
|
|
125
|
+
};
|
|
@@ -6,14 +6,8 @@ import { Gestures } from "../gestures";
|
|
|
6
6
|
/**
|
|
7
7
|
* Reset all stores for a given screen
|
|
8
8
|
*/
|
|
9
|
-
export const resetStoresForScreen = (
|
|
10
|
-
current: NativeStackDescriptor,
|
|
11
|
-
options: { clearActive?: boolean } = {},
|
|
12
|
-
) => {
|
|
9
|
+
export const resetStoresForScreen = (current: NativeStackDescriptor) => {
|
|
13
10
|
Animations.clear(current.route.key);
|
|
14
11
|
Gestures.clear(current.route.key);
|
|
15
12
|
Bounds.clear(current.route.key);
|
|
16
|
-
if (options.clearActive) {
|
|
17
|
-
Bounds.clearActive();
|
|
18
|
-
}
|
|
19
13
|
};
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Ed
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Bounds = void 0;
|
|
7
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
const registry = (0, _reactNativeReanimated.makeMutable)({});
|
|
9
|
-
const activeBoundId = (0, _reactNativeReanimated.makeMutable)(null);
|
|
10
|
-
const lastActiveByRoute = (0, _reactNativeReanimated.makeMutable)({});
|
|
11
|
-
const pairHints = (0, _reactNativeReanimated.makeMutable)({});
|
|
12
|
-
function pairKey(fromKey, toKey) {
|
|
13
|
-
"worklet";
|
|
14
|
-
|
|
15
|
-
return fromKey && toKey ? `${fromKey}|${toKey}` : "";
|
|
16
|
-
}
|
|
17
|
-
function setBounds(screenId, boundId, bounds = null, styles = {}) {
|
|
18
|
-
"worklet";
|
|
19
|
-
|
|
20
|
-
registry.modify(state => {
|
|
21
|
-
"worklet";
|
|
22
|
-
|
|
23
|
-
if (!state[screenId]) {
|
|
24
|
-
state[screenId] = {};
|
|
25
|
-
}
|
|
26
|
-
state[screenId][boundId] = {
|
|
27
|
-
bounds,
|
|
28
|
-
styles
|
|
29
|
-
};
|
|
30
|
-
return state;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function getBounds(screenId) {
|
|
34
|
-
"worklet";
|
|
35
|
-
|
|
36
|
-
return registry.value[screenId] ?? {};
|
|
37
|
-
}
|
|
38
|
-
function setActiveBoundId(boundId) {
|
|
39
|
-
"worklet";
|
|
40
|
-
|
|
41
|
-
activeBoundId.value = boundId;
|
|
42
|
-
}
|
|
43
|
-
function getActiveBoundId() {
|
|
44
|
-
"worklet";
|
|
45
|
-
|
|
46
|
-
return activeBoundId.value;
|
|
47
|
-
}
|
|
48
|
-
function setRouteActive(routeKey, boundId) {
|
|
49
|
-
"worklet";
|
|
50
|
-
|
|
51
|
-
lastActiveByRoute.modify(state => {
|
|
52
|
-
"worklet";
|
|
53
|
-
|
|
54
|
-
state[routeKey] = boundId;
|
|
55
|
-
return state;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function getRouteActive(routeKey) {
|
|
59
|
-
"worklet";
|
|
60
|
-
|
|
61
|
-
return lastActiveByRoute.value[routeKey] ?? null;
|
|
62
|
-
}
|
|
63
|
-
function setTransitionHint(fromKey, toKey, boundId) {
|
|
64
|
-
"worklet";
|
|
65
|
-
|
|
66
|
-
const key = pairKey(fromKey, toKey);
|
|
67
|
-
if (!key) return;
|
|
68
|
-
pairHints.modify(state => {
|
|
69
|
-
"worklet";
|
|
70
|
-
|
|
71
|
-
state[key] = boundId;
|
|
72
|
-
return state;
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
function getTransitionHint(fromKey, toKey) {
|
|
76
|
-
"worklet";
|
|
77
|
-
|
|
78
|
-
const key = pairKey(fromKey, toKey);
|
|
79
|
-
if (!key) return null;
|
|
80
|
-
return pairHints.value[key] ?? null;
|
|
81
|
-
}
|
|
82
|
-
function clear(routeKey) {
|
|
83
|
-
"worklet";
|
|
84
|
-
|
|
85
|
-
registry.modify(state => {
|
|
86
|
-
"worklet";
|
|
87
|
-
|
|
88
|
-
delete state[routeKey];
|
|
89
|
-
return state;
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
function clearActive() {
|
|
93
|
-
"worklet";
|
|
94
|
-
|
|
95
|
-
activeBoundId.value = null;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// Helpers for readability
|
|
99
|
-
function hasBound(s, id) {
|
|
100
|
-
"worklet";
|
|
101
|
-
|
|
102
|
-
return !!id && !!s && !!s.bounds && !!s.bounds[id];
|
|
103
|
-
}
|
|
104
|
-
function keysOf(s) {
|
|
105
|
-
"worklet";
|
|
106
|
-
|
|
107
|
-
return Object.keys(s?.bounds || {});
|
|
108
|
-
}
|
|
109
|
-
function getRoutePair(current, next, previous) {
|
|
110
|
-
"worklet";
|
|
111
|
-
|
|
112
|
-
const isClosing = !!next;
|
|
113
|
-
const fromKey = isClosing ? current.route.key : previous?.route.key;
|
|
114
|
-
const toKey = isClosing ? next?.route.key : current.route.key;
|
|
115
|
-
const other = next ?? previous;
|
|
116
|
-
return {
|
|
117
|
-
fromKey,
|
|
118
|
-
toKey,
|
|
119
|
-
other
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
function resolveFromHints(fromKey, toKey, other) {
|
|
123
|
-
"worklet";
|
|
124
|
-
|
|
125
|
-
if (fromKey && toKey) {
|
|
126
|
-
const hinted = getTransitionHint(fromKey, toKey);
|
|
127
|
-
if (hasBound(other, hinted)) return hinted;
|
|
128
|
-
}
|
|
129
|
-
return "";
|
|
130
|
-
}
|
|
131
|
-
function resolveFromRequested(reqId, current, other) {
|
|
132
|
-
"worklet";
|
|
133
|
-
|
|
134
|
-
const otherHasAny = !!other && keysOf(other).length > 0;
|
|
135
|
-
if (hasBound(other, reqId)) return reqId;
|
|
136
|
-
if (!otherHasAny && hasBound(current, reqId)) return reqId;
|
|
137
|
-
return "";
|
|
138
|
-
}
|
|
139
|
-
function resolveFromSets(current, other, fromKey) {
|
|
140
|
-
"worklet";
|
|
141
|
-
|
|
142
|
-
if (!other) return "";
|
|
143
|
-
const a = keysOf(current);
|
|
144
|
-
const b = keysOf(other);
|
|
145
|
-
const inter = a.filter(k => b.includes(k));
|
|
146
|
-
const otherHasAny = b.length > 0;
|
|
147
|
-
const routeActive = fromKey ? getRouteActive(fromKey) : null;
|
|
148
|
-
if (inter.length > 0) {
|
|
149
|
-
if (routeActive && inter.includes(routeActive)) return routeActive;
|
|
150
|
-
return inter[0];
|
|
151
|
-
}
|
|
152
|
-
if (routeActive && hasBound(other, routeActive)) return routeActive;
|
|
153
|
-
if (b.length === 1) return b[0];
|
|
154
|
-
if (!otherHasAny) {
|
|
155
|
-
if (routeActive && hasBound(current, routeActive)) return routeActive;
|
|
156
|
-
if (a.length === 1) return a[0];
|
|
157
|
-
}
|
|
158
|
-
return "";
|
|
159
|
-
}
|
|
160
|
-
function getActiveBound(current, next, previous) {
|
|
161
|
-
"worklet";
|
|
162
|
-
|
|
163
|
-
const requestedId = activeBoundId.value;
|
|
164
|
-
const {
|
|
165
|
-
fromKey,
|
|
166
|
-
toKey,
|
|
167
|
-
other
|
|
168
|
-
} = getRoutePair(current, next, previous);
|
|
169
|
-
|
|
170
|
-
// check last remembered hint
|
|
171
|
-
const byHint = resolveFromHints(fromKey, toKey, other);
|
|
172
|
-
if (byHint) {
|
|
173
|
-
if (fromKey && toKey) setTransitionHint(fromKey, toKey, byHint);
|
|
174
|
-
return byHint;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// check the active id
|
|
178
|
-
const byRequested = resolveFromRequested(requestedId, current, other);
|
|
179
|
-
if (byRequested) {
|
|
180
|
-
if (fromKey && toKey) setTransitionHint(fromKey, toKey, byRequested);
|
|
181
|
-
return byRequested;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// check the sets (intersection/MRU/fallbacks)
|
|
185
|
-
const bySets = resolveFromSets(current, other, fromKey);
|
|
186
|
-
if (bySets) {
|
|
187
|
-
if (fromKey && toKey) setTransitionHint(fromKey, toKey, bySets);
|
|
188
|
-
return bySets;
|
|
189
|
-
}
|
|
190
|
-
return "";
|
|
191
|
-
}
|
|
192
|
-
const Bounds = exports.Bounds = {
|
|
193
|
-
setBounds,
|
|
194
|
-
getBounds,
|
|
195
|
-
setActiveBoundId,
|
|
196
|
-
getActiveBoundId,
|
|
197
|
-
setRouteActive,
|
|
198
|
-
getRouteActive,
|
|
199
|
-
setTransitionHint,
|
|
200
|
-
getTransitionHint,
|
|
201
|
-
clear,
|
|
202
|
-
clearActive,
|
|
203
|
-
getActiveBound
|
|
204
|
-
};
|
|
205
|
-
//# sourceMappingURL=bounds.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","registry","makeMutable","activeBoundId","lastActiveByRoute","pairHints","pairKey","fromKey","toKey","setBounds","screenId","boundId","bounds","styles","modify","state","getBounds","value","setActiveBoundId","getActiveBoundId","setRouteActive","routeKey","getRouteActive","setTransitionHint","key","getTransitionHint","clear","clearActive","hasBound","s","id","keysOf","Object","keys","getRoutePair","current","next","previous","isClosing","route","other","resolveFromHints","hinted","resolveFromRequested","reqId","otherHasAny","length","resolveFromSets","a","b","inter","filter","k","includes","routeActive","getActiveBound","requestedId","byHint","byRequested","bySets","Bounds","exports"],"sourceRoot":"../../../src","sources":["stores/bounds.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAcA,MAAMC,QAAQ,GAAG,IAAAC,kCAAW,EAAa,CAAC,CAAC,CAAC;AAC5C,MAAMC,aAAa,GAAG,IAAAD,kCAAW,EAAgB,IAAI,CAAC;AACtD,MAAME,iBAAiB,GAAG,IAAAF,kCAAW,EAAyB,CAAC,CAAC,CAAC;AACjE,MAAMG,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oB,MAAM,GAAGhB,gBAAgB,CAAClC,OAAO,EAAEC,KAAK,EAAEgC,KAAK,CAAC;EACtD,IAAIiB,MAAM,EAAE;IACX,IAAIlD,OAAO,IAAIC,KAAK,EAAEe,iBAAiB,CAAChB,OAAO,EAAEC,KAAK,EAAEiD,MAAM,CAAC;IAC/D,OAAOA,MAAM;EACd;;EAEA;EACA,MAAMC,WAAW,GAAGf,oBAAoB,CAACa,WAAW,EAAErB,OAAO,EAAEK,KAAK,CAAC;EACrE,IAAIkB,WAAW,EAAE;IAChB,IAAInD,OAAO,IAAIC,KAAK,EAAEe,iBAAiB,CAAChB,OAAO,EAAEC,KAAK,EAAEkD,WAAW,CAAC;IACpE,OAAOA,WAAW;EACnB;;EAEA;EACA,MAAMC,MAAM,GAAGZ,eAAe,CAACZ,OAAO,EAAEK,KAAK,EAAEjC,OAAO,CAAC;EACvD,IAAIoD,MAAM,EAAE;IACX,IAAIpD,OAAO,IAAIC,KAAK,EAAEe,iBAAiB,CAAChB,OAAO,EAAEC,KAAK,EAAEmD,MAAM,CAAC;IAC/D,OAAOA,MAAM;EACd;EAEA,OAAO,EAAE;AACV;AAEO,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EACrBnD,SAAS;EACTO,SAAS;EACTE,gBAAgB;EAChBC,gBAAgB;EAChBC,cAAc;EACdE,cAAc;EACdC,iBAAiB;EACjBE,iBAAiB;EACjBC,KAAK;EACLC,WAAW;EACX4B;AACD,CAAC","ignoreList":[]}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { makeMutable } from "react-native-reanimated";
|
|
4
|
-
const registry = makeMutable({});
|
|
5
|
-
const activeBoundId = makeMutable(null);
|
|
6
|
-
const lastActiveByRoute = makeMutable({});
|
|
7
|
-
const pairHints = makeMutable({});
|
|
8
|
-
function pairKey(fromKey, toKey) {
|
|
9
|
-
"worklet";
|
|
10
|
-
|
|
11
|
-
return fromKey && toKey ? `${fromKey}|${toKey}` : "";
|
|
12
|
-
}
|
|
13
|
-
function setBounds(screenId, boundId, bounds = null, styles = {}) {
|
|
14
|
-
"worklet";
|
|
15
|
-
|
|
16
|
-
registry.modify(state => {
|
|
17
|
-
"worklet";
|
|
18
|
-
|
|
19
|
-
if (!state[screenId]) {
|
|
20
|
-
state[screenId] = {};
|
|
21
|
-
}
|
|
22
|
-
state[screenId][boundId] = {
|
|
23
|
-
bounds,
|
|
24
|
-
styles
|
|
25
|
-
};
|
|
26
|
-
return state;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
function getBounds(screenId) {
|
|
30
|
-
"worklet";
|
|
31
|
-
|
|
32
|
-
return registry.value[screenId] ?? {};
|
|
33
|
-
}
|
|
34
|
-
function setActiveBoundId(boundId) {
|
|
35
|
-
"worklet";
|
|
36
|
-
|
|
37
|
-
activeBoundId.value = boundId;
|
|
38
|
-
}
|
|
39
|
-
function getActiveBoundId() {
|
|
40
|
-
"worklet";
|
|
41
|
-
|
|
42
|
-
return activeBoundId.value;
|
|
43
|
-
}
|
|
44
|
-
function setRouteActive(routeKey, boundId) {
|
|
45
|
-
"worklet";
|
|
46
|
-
|
|
47
|
-
lastActiveByRoute.modify(state => {
|
|
48
|
-
"worklet";
|
|
49
|
-
|
|
50
|
-
state[routeKey] = boundId;
|
|
51
|
-
return state;
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function getRouteActive(routeKey) {
|
|
55
|
-
"worklet";
|
|
56
|
-
|
|
57
|
-
return lastActiveByRoute.value[routeKey] ?? null;
|
|
58
|
-
}
|
|
59
|
-
function setTransitionHint(fromKey, toKey, boundId) {
|
|
60
|
-
"worklet";
|
|
61
|
-
|
|
62
|
-
const key = pairKey(fromKey, toKey);
|
|
63
|
-
if (!key) return;
|
|
64
|
-
pairHints.modify(state => {
|
|
65
|
-
"worklet";
|
|
66
|
-
|
|
67
|
-
state[key] = boundId;
|
|
68
|
-
return state;
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
function getTransitionHint(fromKey, toKey) {
|
|
72
|
-
"worklet";
|
|
73
|
-
|
|
74
|
-
const key = pairKey(fromKey, toKey);
|
|
75
|
-
if (!key) return null;
|
|
76
|
-
return pairHints.value[key] ?? null;
|
|
77
|
-
}
|
|
78
|
-
function clear(routeKey) {
|
|
79
|
-
"worklet";
|
|
80
|
-
|
|
81
|
-
registry.modify(state => {
|
|
82
|
-
"worklet";
|
|
83
|
-
|
|
84
|
-
delete state[routeKey];
|
|
85
|
-
return state;
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
function clearActive() {
|
|
89
|
-
"worklet";
|
|
90
|
-
|
|
91
|
-
activeBoundId.value = null;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// Helpers for readability
|
|
95
|
-
function hasBound(s, id) {
|
|
96
|
-
"worklet";
|
|
97
|
-
|
|
98
|
-
return !!id && !!s && !!s.bounds && !!s.bounds[id];
|
|
99
|
-
}
|
|
100
|
-
function keysOf(s) {
|
|
101
|
-
"worklet";
|
|
102
|
-
|
|
103
|
-
return Object.keys(s?.bounds || {});
|
|
104
|
-
}
|
|
105
|
-
function getRoutePair(current, next, previous) {
|
|
106
|
-
"worklet";
|
|
107
|
-
|
|
108
|
-
const isClosing = !!next;
|
|
109
|
-
const fromKey = isClosing ? current.route.key : previous?.route.key;
|
|
110
|
-
const toKey = isClosing ? next?.route.key : current.route.key;
|
|
111
|
-
const other = next ?? previous;
|
|
112
|
-
return {
|
|
113
|
-
fromKey,
|
|
114
|
-
toKey,
|
|
115
|
-
other
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
function resolveFromHints(fromKey, toKey, other) {
|
|
119
|
-
"worklet";
|
|
120
|
-
|
|
121
|
-
if (fromKey && toKey) {
|
|
122
|
-
const hinted = getTransitionHint(fromKey, toKey);
|
|
123
|
-
if (hasBound(other, hinted)) return hinted;
|
|
124
|
-
}
|
|
125
|
-
return "";
|
|
126
|
-
}
|
|
127
|
-
function resolveFromRequested(reqId, current, other) {
|
|
128
|
-
"worklet";
|
|
129
|
-
|
|
130
|
-
const otherHasAny = !!other && keysOf(other).length > 0;
|
|
131
|
-
if (hasBound(other, reqId)) return reqId;
|
|
132
|
-
if (!otherHasAny && hasBound(current, reqId)) return reqId;
|
|
133
|
-
return "";
|
|
134
|
-
}
|
|
135
|
-
function resolveFromSets(current, other, fromKey) {
|
|
136
|
-
"worklet";
|
|
137
|
-
|
|
138
|
-
if (!other) return "";
|
|
139
|
-
const a = keysOf(current);
|
|
140
|
-
const b = keysOf(other);
|
|
141
|
-
const inter = a.filter(k => b.includes(k));
|
|
142
|
-
const otherHasAny = b.length > 0;
|
|
143
|
-
const routeActive = fromKey ? getRouteActive(fromKey) : null;
|
|
144
|
-
if (inter.length > 0) {
|
|
145
|
-
if (routeActive && inter.includes(routeActive)) return routeActive;
|
|
146
|
-
return inter[0];
|
|
147
|
-
}
|
|
148
|
-
if (routeActive && hasBound(other, routeActive)) return routeActive;
|
|
149
|
-
if (b.length === 1) return b[0];
|
|
150
|
-
if (!otherHasAny) {
|
|
151
|
-
if (routeActive && hasBound(current, routeActive)) return routeActive;
|
|
152
|
-
if (a.length === 1) return a[0];
|
|
153
|
-
}
|
|
154
|
-
return "";
|
|
155
|
-
}
|
|
156
|
-
function getActiveBound(current, next, previous) {
|
|
157
|
-
"worklet";
|
|
158
|
-
|
|
159
|
-
const requestedId = activeBoundId.value;
|
|
160
|
-
const {
|
|
161
|
-
fromKey,
|
|
162
|
-
toKey,
|
|
163
|
-
other
|
|
164
|
-
} = getRoutePair(current, next, previous);
|
|
165
|
-
|
|
166
|
-
// check last remembered hint
|
|
167
|
-
const byHint = resolveFromHints(fromKey, toKey, other);
|
|
168
|
-
if (byHint) {
|
|
169
|
-
if (fromKey && toKey) setTransitionHint(fromKey, toKey, byHint);
|
|
170
|
-
return byHint;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// check the active id
|
|
174
|
-
const byRequested = resolveFromRequested(requestedId, current, other);
|
|
175
|
-
if (byRequested) {
|
|
176
|
-
if (fromKey && toKey) setTransitionHint(fromKey, toKey, byRequested);
|
|
177
|
-
return byRequested;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// check the sets (intersection/MRU/fallbacks)
|
|
181
|
-
const bySets = resolveFromSets(current, other, fromKey);
|
|
182
|
-
if (bySets) {
|
|
183
|
-
if (fromKey && toKey) setTransitionHint(fromKey, toKey, bySets);
|
|
184
|
-
return bySets;
|
|
185
|
-
}
|
|
186
|
-
return "";
|
|
187
|
-
}
|
|
188
|
-
export const Bounds = {
|
|
189
|
-
setBounds,
|
|
190
|
-
getBounds,
|
|
191
|
-
setActiveBoundId,
|
|
192
|
-
getActiveBoundId,
|
|
193
|
-
setRouteActive,
|
|
194
|
-
getRouteActive,
|
|
195
|
-
setTransitionHint,
|
|
196
|
-
getTransitionHint,
|
|
197
|
-
clear,
|
|
198
|
-
clearActive,
|
|
199
|
-
getActiveBound
|
|
200
|
-
};
|
|
201
|
-
//# sourceMappingURL=bounds.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["makeMutable","registry","activeBoundId","lastActiveByRoute","pairHints","pairKey","fromKey","toKey","setBounds","screenId","boundId","bounds","styles","modify","state","getBounds","value","setActiveBoundId","getActiveBoundId","setRouteActive","routeKey","getRouteActive","setTransitionHint","key","getTransitionHint","clear","clearActive","hasBound","s","id","keysOf","Object","keys","getRoutePair","current","next","previous","isClosing","route","other","resolveFromHints","hinted","resolveFromRequested","reqId","otherHasAny","length","resolveFromSets","a","b","inter","filter","k","includes","routeActive","getActiveBound","requestedId","byHint","byRequested","bySets","Bounds"],"sourceRoot":"../../../src","sources":["stores/bounds.ts"],"mappings":";;AAAA,SAECA,WAAW,QAEL,yBAAyB;AAUhC,MAAMC,QAAQ,GAAGD,WAAW,CAAa,CAAC,CAAC,CAAC;AAC5C,MAAME,aAAa,GAAGF,WAAW,CAAgB,IAAI,CAAC;AACtD,MAAM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