react-native-screen-transitions 3.4.0-beta.0 → 3.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +6 -5
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +4 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +28 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/{use-prepare-transition-measurement.js → use-pre-transition-measurement.js} +7 -5
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.js.map +1 -0
- package/lib/commonjs/shared/constants.js +1 -2
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/providers/register-bounds.provider.js +9 -1
- package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/clear.js +23 -167
- package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/presence.js +0 -3
- package/lib/commonjs/shared/stores/bounds/internals/presence.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/registry.js +0 -5
- package/lib/commonjs/shared/stores/bounds/internals/registry.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +0 -3
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/state.js +1 -83
- package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/constants.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/{resolve-bound-tag.js → create-bound-tag.js} +5 -5
- package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/{interpolators.js → create-interpolators.js} +6 -6
- package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/{link-accessor.js → create-link-accessor.js} +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +70 -0
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/{style-composers.js → styles/composers.js} +22 -22
- package/lib/commonjs/shared/utils/bounds/helpers/styles/composers.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/{compute-bounds-styles.js → styles/compute.js} +9 -9
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/{interpolate-style.js → styles/interpolate-link-style.js} +4 -4
- package/lib/commonjs/shared/utils/bounds/helpers/styles/interpolate-link-style.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/styles/styles.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/index.js +16 -44
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/zoom/build.js +135 -31
- package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/zoom/config.js +8 -1
- package/lib/commonjs/shared/utils/bounds/zoom/config.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/zoom/math.js +34 -1
- package/lib/commonjs/shared/utils/bounds/zoom/math.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +6 -5
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +4 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +29 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/{use-prepare-transition-measurement.js → use-pre-transition-measurement.js} +5 -3
- package/lib/module/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.js.map +1 -0
- package/lib/module/shared/constants.js +1 -2
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/providers/register-bounds.provider.js +9 -1
- package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/clear.js +24 -168
- package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/presence.js +1 -4
- package/lib/module/shared/stores/bounds/internals/presence.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/registry.js +1 -6
- package/lib/module/shared/stores/bounds/internals/registry.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +1 -4
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/state.js +0 -78
- package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/module/shared/utils/bounds/constants.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/{resolve-bound-tag.js → create-bound-tag.js} +3 -3
- package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/{interpolators.js → create-interpolators.js} +5 -5
- package/lib/module/shared/utils/bounds/helpers/create-interpolators.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/{link-accessor.js → create-link-accessor.js} +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +64 -0
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/{style-composers.js → styles/composers.js} +22 -22
- package/lib/module/shared/utils/bounds/helpers/styles/composers.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/{compute-bounds-styles.js → styles/compute.js} +7 -7
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/{interpolate-style.js → styles/interpolate-link-style.js} +4 -4
- package/lib/module/shared/utils/bounds/helpers/styles/interpolate-link-style.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/styles/styles.js.map +1 -0
- package/lib/module/shared/utils/bounds/index.js +14 -42
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/zoom/build.js +138 -34
- package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/zoom/config.js +7 -0
- package/lib/module/shared/utils/bounds/zoom/config.js.map +1 -1
- package/lib/module/shared/utils/bounds/zoom/math.js +31 -0
- package/lib/module/shared/utils/bounds/zoom/math.js.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts +14 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/{use-prepare-transition-measurement.d.ts → use-pre-transition-measurement.d.ts} +2 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/constants.d.ts +0 -1
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +1 -1
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/register-bounds.provider.d.ts +7 -0
- package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/presence.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/registry.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts +0 -3
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +72 -0
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +1 -1
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/constants.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts +7 -0
- package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/{interpolators.d.ts → create-interpolators.d.ts} +3 -3
- package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/{link-accessor.d.ts → create-link-accessor.d.ts} +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +20 -0
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/{style-composers.d.ts → styles/composers.d.ts} +4 -4
- package/lib/typescript/shared/utils/bounds/helpers/styles/composers.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/{compute-bounds-styles.d.ts → styles/compute.d.ts} +3 -3
- package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/{interpolate-style.d.ts → styles/interpolate-link-style.d.ts} +2 -2
- package/lib/typescript/shared/utils/bounds/helpers/styles/interpolate-link-style.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/styles/styles.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/options.d.ts +3 -2
- package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/config.d.ts +7 -0
- package/lib/typescript/shared/utils/bounds/zoom/config.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/math.d.ts +17 -0
- package/lib/typescript/shared/utils/bounds/zoom/math.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/components/create-boundary-component/create-boundary-component.tsx +6 -5
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +6 -1
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +28 -13
- package/src/shared/components/create-boundary-component/hooks/{use-prepare-transition-measurement.ts → use-pre-transition-measurement.ts} +8 -5
- package/src/shared/constants.ts +0 -1
- package/src/shared/index.ts +2 -0
- package/src/shared/providers/register-bounds.provider.tsx +8 -1
- package/src/shared/stores/bounds/internals/clear.ts +47 -220
- package/src/shared/stores/bounds/internals/presence.ts +1 -4
- package/src/shared/stores/bounds/internals/registry.ts +1 -11
- package/src/shared/stores/bounds/internals/resolver.ts +1 -9
- package/src/shared/stores/bounds/internals/state.ts +0 -98
- package/src/shared/types/bounds.types.ts +74 -0
- package/src/shared/types/index.ts +2 -0
- package/src/shared/utils/bounds/{helpers/constants.ts → constants.ts} +1 -1
- package/src/shared/utils/bounds/helpers/{resolve-bound-tag.ts → create-bound-tag.ts} +2 -2
- package/src/shared/utils/bounds/helpers/{interpolators.ts → create-interpolators.ts} +19 -12
- package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +100 -0
- package/src/shared/utils/bounds/helpers/{style-composers.ts → styles/composers.ts} +119 -53
- package/src/shared/utils/bounds/helpers/{compute-bounds-styles.ts → styles/compute.ts} +9 -9
- package/src/shared/utils/bounds/helpers/{interpolate-style.ts → styles/interpolate-link-style.ts} +9 -4
- package/src/shared/utils/bounds/index.ts +13 -53
- package/src/shared/utils/bounds/types/options.ts +3 -2
- package/src/shared/utils/bounds/zoom/build.ts +169 -61
- package/src/shared/utils/bounds/zoom/config.ts +9 -0
- package/src/shared/utils/bounds/zoom/math.ts +57 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-prepare-transition-measurement.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/build-bounds-options.js +0 -41
- package/lib/commonjs/shared/utils/bounds/helpers/build-bounds-options.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/constants.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/interpolate-style.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/interpolate.js +0 -20
- package/lib/commonjs/shared/utils/bounds/helpers/interpolate.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-prepare-transition-measurement.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/build-bounds-options.js +0 -36
- package/lib/module/shared/utils/bounds/helpers/build-bounds-options.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/constants.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/interpolate-style.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/interpolate.js +0 -16
- package/lib/module/shared/utils/bounds/helpers/interpolate.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/interpolators.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/link-accessor.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/style-composers.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/styles.js.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-prepare-transition-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts +0 -14
- package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/constants.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/interpolate-style.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/interpolate.d.ts +0 -2
- package/lib/typescript/shared/utils/bounds/helpers/interpolate.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts +0 -7
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles.d.ts.map +0 -1
- package/src/shared/utils/bounds/helpers/build-bounds-options.ts +0 -48
- package/src/shared/utils/bounds/helpers/interpolate.ts +0 -19
- /package/lib/commonjs/shared/utils/bounds/{helpers/constants.js → constants.js} +0 -0
- /package/lib/commonjs/shared/utils/bounds/helpers/{styles.js → styles/styles.js} +0 -0
- /package/lib/module/shared/utils/bounds/{helpers/constants.js → constants.js} +0 -0
- /package/lib/module/shared/utils/bounds/helpers/{styles.js → styles/styles.js} +0 -0
- /package/lib/typescript/shared/utils/bounds/{helpers/constants.d.ts → constants.d.ts} +0 -0
- /package/lib/typescript/shared/utils/bounds/helpers/{styles.d.ts → styles/styles.d.ts} +0 -0
- /package/src/shared/utils/bounds/helpers/{link-accessor.ts → create-link-accessor.ts} +0 -0
- /package/src/shared/utils/bounds/helpers/{styles.ts → styles/styles.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { matchesNavigatorKey, matchesScreenKey } from "../helpers/matching";
|
|
4
|
-
import {
|
|
4
|
+
import { presence, registry } from "./state";
|
|
5
5
|
const hasAnyKeys = record => {
|
|
6
6
|
"worklet";
|
|
7
7
|
|
|
@@ -10,93 +10,9 @@ const hasAnyKeys = record => {
|
|
|
10
10
|
}
|
|
11
11
|
return false;
|
|
12
12
|
};
|
|
13
|
-
const
|
|
13
|
+
const clearRegistry = (shouldClearSnapshot, shouldClearLink) => {
|
|
14
14
|
"worklet";
|
|
15
15
|
|
|
16
|
-
const currentRegistry = registry.value;
|
|
17
|
-
let snapshots = 0;
|
|
18
|
-
let links = 0;
|
|
19
|
-
for (const tag in currentRegistry) {
|
|
20
|
-
const tagState = currentRegistry[tag];
|
|
21
|
-
for (const snapshotKey in tagState.snapshots) {
|
|
22
|
-
const snapshot = tagState.snapshots[snapshotKey];
|
|
23
|
-
const matched = matchByAncestor ? snapshotKey === screenKey || (snapshot.ancestorKeys?.includes(screenKey) ?? false) : snapshotKey === screenKey;
|
|
24
|
-
if (matched) snapshots++;
|
|
25
|
-
}
|
|
26
|
-
for (let i = 0; i < tagState.linkStack.length; i++) {
|
|
27
|
-
const link = tagState.linkStack[i];
|
|
28
|
-
if (matchesScreenKey(link.source, screenKey) || matchesScreenKey(link.destination, screenKey)) {
|
|
29
|
-
links++;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return {
|
|
34
|
-
snapshots,
|
|
35
|
-
links
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
const countRegistryMatchesByBranch = branchNavigatorKey => {
|
|
39
|
-
"worklet";
|
|
40
|
-
|
|
41
|
-
const currentRegistry = registry.value;
|
|
42
|
-
let snapshots = 0;
|
|
43
|
-
let links = 0;
|
|
44
|
-
for (const tag in currentRegistry) {
|
|
45
|
-
const tagState = currentRegistry[tag];
|
|
46
|
-
for (const snapshotKey in tagState.snapshots) {
|
|
47
|
-
const snapshot = tagState.snapshots[snapshotKey];
|
|
48
|
-
const matched = snapshot.navigatorKey === branchNavigatorKey || (snapshot.ancestorNavigatorKeys?.includes(branchNavigatorKey) ?? false);
|
|
49
|
-
if (matched) snapshots++;
|
|
50
|
-
}
|
|
51
|
-
for (let i = 0; i < tagState.linkStack.length; i++) {
|
|
52
|
-
const link = tagState.linkStack[i];
|
|
53
|
-
if (matchesNavigatorKey(link.source, branchNavigatorKey) || matchesNavigatorKey(link.destination, branchNavigatorKey)) {
|
|
54
|
-
links++;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
snapshots,
|
|
60
|
-
links
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
const countPresenceMatches = (screenKey, matchByAncestor) => {
|
|
64
|
-
"worklet";
|
|
65
|
-
|
|
66
|
-
const currentPresence = presence.value;
|
|
67
|
-
let matches = 0;
|
|
68
|
-
for (const tag in currentPresence) {
|
|
69
|
-
const tagEntries = currentPresence[tag];
|
|
70
|
-
for (const entryScreenKey in tagEntries) {
|
|
71
|
-
const entry = tagEntries[entryScreenKey];
|
|
72
|
-
const matched = matchByAncestor ? entryScreenKey === screenKey || (entry.ancestorKeys?.includes(screenKey) ?? false) : entryScreenKey === screenKey;
|
|
73
|
-
if (matched) matches++;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return matches;
|
|
77
|
-
};
|
|
78
|
-
const countPresenceMatchesByBranch = branchNavigatorKey => {
|
|
79
|
-
"worklet";
|
|
80
|
-
|
|
81
|
-
const currentPresence = presence.value;
|
|
82
|
-
let matches = 0;
|
|
83
|
-
for (const tag in currentPresence) {
|
|
84
|
-
const tagEntries = currentPresence[tag];
|
|
85
|
-
for (const entryScreenKey in tagEntries) {
|
|
86
|
-
const entry = tagEntries[entryScreenKey];
|
|
87
|
-
const matched = entry.navigatorKey === branchNavigatorKey || (entry.ancestorNavigatorKeys?.includes(branchNavigatorKey) ?? false);
|
|
88
|
-
if (matched) matches++;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return matches;
|
|
92
|
-
};
|
|
93
|
-
const clearRegistry = params => {
|
|
94
|
-
"worklet";
|
|
95
|
-
|
|
96
|
-
const {
|
|
97
|
-
shouldRemoveSnapshot,
|
|
98
|
-
shouldRemoveLink
|
|
99
|
-
} = params;
|
|
100
16
|
registry.modify(state => {
|
|
101
17
|
"worklet";
|
|
102
18
|
|
|
@@ -104,13 +20,13 @@ const clearRegistry = params => {
|
|
|
104
20
|
const tagState = state[tag];
|
|
105
21
|
for (const snapshotKey in tagState.snapshots) {
|
|
106
22
|
const snapshot = tagState.snapshots[snapshotKey];
|
|
107
|
-
if (
|
|
23
|
+
if (shouldClearSnapshot(snapshotKey, snapshot)) {
|
|
108
24
|
delete tagState.snapshots[snapshotKey];
|
|
109
25
|
}
|
|
110
26
|
}
|
|
111
27
|
for (let i = tagState.linkStack.length - 1; i >= 0; i--) {
|
|
112
28
|
const link = tagState.linkStack[i];
|
|
113
|
-
if (
|
|
29
|
+
if (shouldClearLink(link)) {
|
|
114
30
|
tagState.linkStack.splice(i, 1);
|
|
115
31
|
}
|
|
116
32
|
}
|
|
@@ -121,24 +37,7 @@ const clearRegistry = params => {
|
|
|
121
37
|
return state;
|
|
122
38
|
});
|
|
123
39
|
};
|
|
124
|
-
const
|
|
125
|
-
"worklet";
|
|
126
|
-
|
|
127
|
-
presence.modify(state => {
|
|
128
|
-
"worklet";
|
|
129
|
-
|
|
130
|
-
for (const tag in state) {
|
|
131
|
-
const tagEntries = state[tag];
|
|
132
|
-
if (!tagEntries[screenKey]) continue;
|
|
133
|
-
delete tagEntries[screenKey];
|
|
134
|
-
if (!hasAnyKeys(tagEntries)) {
|
|
135
|
-
delete state[tag];
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return state;
|
|
139
|
-
});
|
|
140
|
-
};
|
|
141
|
-
const clearPresenceByAncestor = ancestorKey => {
|
|
40
|
+
const clearPresence = shouldClearPresence => {
|
|
142
41
|
"worklet";
|
|
143
42
|
|
|
144
43
|
presence.modify(state => {
|
|
@@ -148,8 +47,7 @@ const clearPresenceByAncestor = ancestorKey => {
|
|
|
148
47
|
const tagEntries = state[tag];
|
|
149
48
|
for (const entryScreenKey in tagEntries) {
|
|
150
49
|
const entry = tagEntries[entryScreenKey];
|
|
151
|
-
|
|
152
|
-
if (shouldRemove) {
|
|
50
|
+
if (shouldClearPresence(entryScreenKey, entry)) {
|
|
153
51
|
delete tagEntries[entryScreenKey];
|
|
154
52
|
}
|
|
155
53
|
}
|
|
@@ -160,83 +58,41 @@ const clearPresenceByAncestor = ancestorKey => {
|
|
|
160
58
|
return state;
|
|
161
59
|
});
|
|
162
60
|
};
|
|
163
|
-
const
|
|
61
|
+
const performClear = (shouldClearSnapshot, shouldClearLink, shouldClearPresence) => {
|
|
164
62
|
"worklet";
|
|
165
63
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
for (const tag in state) {
|
|
170
|
-
const tagEntries = state[tag];
|
|
171
|
-
for (const entryScreenKey in tagEntries) {
|
|
172
|
-
const entry = tagEntries[entryScreenKey];
|
|
173
|
-
const shouldRemove = entry.navigatorKey === branchNavigatorKey || (entry.ancestorNavigatorKeys?.includes(branchNavigatorKey) ?? false);
|
|
174
|
-
if (shouldRemove) {
|
|
175
|
-
delete tagEntries[entryScreenKey];
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
if (!hasAnyKeys(tagEntries)) {
|
|
179
|
-
delete state[tag];
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
return state;
|
|
183
|
-
});
|
|
64
|
+
clearRegistry(shouldClearSnapshot, shouldClearLink);
|
|
65
|
+
clearPresence(shouldClearPresence);
|
|
184
66
|
};
|
|
185
67
|
function clear(screenKey) {
|
|
186
68
|
"worklet";
|
|
187
69
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
shouldRemoveSnapshot: snapshotKey => snapshotKey === screenKey,
|
|
192
|
-
shouldRemoveLink: link => {
|
|
193
|
-
return matchesScreenKey(link.source, screenKey) || matchesScreenKey(link.destination, screenKey);
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
clearPresenceDirect(screenKey);
|
|
197
|
-
const afterMatches = countRegistryMatches(screenKey, false);
|
|
198
|
-
const afterPresenceMatches = countPresenceMatches(screenKey, false);
|
|
199
|
-
debugClearLog(`clear(${screenKey}) snapshots=${beforeMatches.snapshots}->${afterMatches.snapshots} links=${beforeMatches.links}->${afterMatches.links} presence=${beforePresenceMatches}->${afterPresenceMatches}`);
|
|
200
|
-
debugStoreSizeLog(`clear(${screenKey})`);
|
|
70
|
+
performClear(snapshotKey => snapshotKey === screenKey, link => {
|
|
71
|
+
return matchesScreenKey(link.source, screenKey) || matchesScreenKey(link.destination, screenKey);
|
|
72
|
+
}, entryScreenKey => entryScreenKey === screenKey);
|
|
201
73
|
}
|
|
202
74
|
function clearByAncestor(ancestorKey) {
|
|
203
75
|
"worklet";
|
|
204
76
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
shouldRemoveLink: link => {
|
|
212
|
-
return matchesScreenKey(link.source, ancestorKey) || matchesScreenKey(link.destination, ancestorKey);
|
|
213
|
-
}
|
|
77
|
+
performClear((snapshotKey, snapshot) => {
|
|
78
|
+
return snapshotKey === ancestorKey || (snapshot.ancestorKeys?.includes(ancestorKey) ?? false);
|
|
79
|
+
}, link => {
|
|
80
|
+
return matchesScreenKey(link.source, ancestorKey) || matchesScreenKey(link.destination, ancestorKey);
|
|
81
|
+
}, (entryScreenKey, entry) => {
|
|
82
|
+
return entryScreenKey === ancestorKey || (entry.ancestorKeys?.includes(ancestorKey) ?? false);
|
|
214
83
|
});
|
|
215
|
-
clearPresenceByAncestor(ancestorKey);
|
|
216
|
-
const afterMatches = countRegistryMatches(ancestorKey, true);
|
|
217
|
-
const afterPresenceMatches = countPresenceMatches(ancestorKey, true);
|
|
218
|
-
debugClearLog(`clearByAncestor(${ancestorKey}) snapshots=${beforeMatches.snapshots}->${afterMatches.snapshots} links=${beforeMatches.links}->${afterMatches.links} presence=${beforePresenceMatches}->${afterPresenceMatches}`);
|
|
219
|
-
debugStoreSizeLog(`clearByAncestor(${ancestorKey})`);
|
|
220
84
|
}
|
|
221
85
|
function clearByBranch(branchNavigatorKey) {
|
|
222
86
|
"worklet";
|
|
223
87
|
|
|
224
88
|
if (!branchNavigatorKey) return;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
shouldRemoveLink: link => {
|
|
232
|
-
return matchesNavigatorKey(link.source, branchNavigatorKey) || matchesNavigatorKey(link.destination, branchNavigatorKey);
|
|
233
|
-
}
|
|
89
|
+
performClear((_snapshotKey, snapshot) => {
|
|
90
|
+
return snapshot.navigatorKey === branchNavigatorKey || (snapshot.ancestorNavigatorKeys?.includes(branchNavigatorKey) ?? false);
|
|
91
|
+
}, link => {
|
|
92
|
+
return matchesNavigatorKey(link.source, branchNavigatorKey) || matchesNavigatorKey(link.destination, branchNavigatorKey);
|
|
93
|
+
}, (_entryScreenKey, entry) => {
|
|
94
|
+
return entry.navigatorKey === branchNavigatorKey || (entry.ancestorNavigatorKeys?.includes(branchNavigatorKey) ?? false);
|
|
234
95
|
});
|
|
235
|
-
clearPresenceByBranch(branchNavigatorKey);
|
|
236
|
-
const afterMatches = countRegistryMatchesByBranch(branchNavigatorKey);
|
|
237
|
-
const afterPresenceMatches = countPresenceMatchesByBranch(branchNavigatorKey);
|
|
238
|
-
debugClearLog(`clearByBranch(${branchNavigatorKey}) snapshots=${beforeMatches.snapshots}->${afterMatches.snapshots} links=${beforeMatches.links}->${afterMatches.links} presence=${beforePresenceMatches}->${afterPresenceMatches}`);
|
|
239
|
-
debugStoreSizeLog(`clearByBranch(${branchNavigatorKey})`);
|
|
240
96
|
}
|
|
241
97
|
export { clear, clearByAncestor, clearByBranch };
|
|
242
98
|
//# sourceMappingURL=clear.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["matchesNavigatorKey","matchesScreenKey","
|
|
1
|
+
{"version":3,"names":["matchesNavigatorKey","matchesScreenKey","presence","registry","hasAnyKeys","record","_key","clearRegistry","shouldClearSnapshot","shouldClearLink","modify","state","tag","tagState","snapshotKey","snapshots","snapshot","i","linkStack","length","link","splice","clearPresence","shouldClearPresence","tagEntries","entryScreenKey","entry","performClear","clear","screenKey","source","destination","clearByAncestor","ancestorKey","ancestorKeys","includes","clearByBranch","branchNavigatorKey","_snapshotKey","navigatorKey","ancestorNavigatorKeys","_entryScreenKey"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/clear.ts"],"mappings":";;AAAA,SAASA,mBAAmB,EAAEC,gBAAgB,QAAQ,qBAAqB;AAS3E,SAASC,QAAQ,EAAsBC,QAAQ,QAAQ,SAAS;AAEhE,MAAMC,UAAU,GAAIC,MAA+B,IAAK;EACvD,SAAS;;EACT,KAAK,MAAMC,IAAI,IAAID,MAAM,EAAE;IAC1B,OAAO,IAAI;EACZ;EACA,OAAO,KAAK;AACb,CAAC;AAcD,MAAME,aAAa,GAAGA,CACrBC,mBAAsC,EACtCC,eAA8B,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AAK,CAACQ,YAAY,EAAEC,QAAQ,CAACF,WAAW,CAAC,IAAI,KAAK,CAAC;EAEtD,CACD,CAAC;AACF;AAEA,SAASG,aAAaA,CAACC,kBAAgC,EAAE;EACxD,SAAS;;EACT,IAAI,CAACA,kBAAkB,EAAE;EAEzBV,YAAY,CACX,CAACW,YAAY,EAAEtB,QAAQ,KAAK;IAC3B,OACCA,QAAQ,CAACuB,YAAY,KAAKF,kBAAkB,KAC3CrB,QAAQ,CAACwB,qBAAqB,EAAEL,QAAQ,CAACE,kBAAkB,CAAC,IAAI,KAAK,CAAC;EAEzE,CAAC,EACAjB,IAAI,IAAK;IACT,OACCpB,mBAAmB,CAACoB,IAAI,CAACU,MAAM,EAAEO,kBAAkB,CAAC,IACpDrC,mBAAmB,CAACoB,IAAI,CAACW,WAAW,EAAEM,kBAAkB,CAAC;EAE3D,CAAC,EACD,CAACI,eAAe,EAAEf,KAAK,KAAK;IAC3B,OACCA,KAAK,CAACa,YAAY,KAAKF,kBAAkB,KACxCX,KAAK,CAACc,qBAAqB,EAAEL,QAAQ,CAACE,kBAAkB,CAAC,IAAI,KAAK,CAAC;EAEtE,CACD,CAAC;AACF;AAEA,SAAST,KAAK,EAAEI,eAAe,EAAEI,aAAa","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { groups, presence } from "./state";
|
|
4
4
|
function registerBoundaryPresence(tag, screenKey, ancestorKeys, boundaryConfig, navigatorKey, ancestorNavigatorKeys) {
|
|
5
5
|
"worklet";
|
|
6
6
|
|
|
@@ -23,7 +23,6 @@ function registerBoundaryPresence(tag, screenKey, ancestorKeys, boundaryConfig,
|
|
|
23
23
|
};
|
|
24
24
|
return state;
|
|
25
25
|
});
|
|
26
|
-
debugStoreSizeLog(`registerBoundaryPresence(${tag},${screenKey})`);
|
|
27
26
|
}
|
|
28
27
|
function unregisterBoundaryPresence(tag, screenKey) {
|
|
29
28
|
"worklet";
|
|
@@ -50,7 +49,6 @@ function unregisterBoundaryPresence(tag, screenKey) {
|
|
|
50
49
|
delete state[tag];
|
|
51
50
|
return state;
|
|
52
51
|
});
|
|
53
|
-
debugStoreSizeLog(`unregisterBoundaryPresence(${tag},${screenKey})`);
|
|
54
52
|
}
|
|
55
53
|
function hasBoundaryPresence(tag, screenKey) {
|
|
56
54
|
"worklet";
|
|
@@ -102,7 +100,6 @@ function setGroupActiveId(group, id) {
|
|
|
102
100
|
};
|
|
103
101
|
return state;
|
|
104
102
|
});
|
|
105
|
-
debugStoreSizeLog(`setGroupActiveId(${group},${id})`);
|
|
106
103
|
}
|
|
107
104
|
function getGroupActiveId(group) {
|
|
108
105
|
"worklet";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["groups","presence","registerBoundaryPresence","tag","screenKey","ancestorKeys","boundaryConfig","navigatorKey","ancestorNavigatorKeys","modify","state","mutableState","tagEntries","currentEntry","count","unregisterBoundaryPresence","value","mutableTagEntries","mutableEntry","nextCount","_remainingKey","hasBoundaryPresence","direct","entryScreenKey","entry","includes","getBoundaryPresence","getBoundaryConfig","setGroupActiveId","group","id","activeId","getGroupActiveId","getGroups"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/presence.ts"],"mappings":";;AACA,SAA2BA,MAAM,EAAEC,QAAQ,QAAQ,SAAS;AAE5D,SAASC,wBAAwBA,CAChCC,GAAU,EACVC,SAAoB,EACpBC,YAA0B,EAC1BC,cAA+B,EAC/BC,YAAqB,EACrBC,qBAAgC,EAC/B;EACD,SAAS;;EACTP,QAAQ,CAACQ,MAAM,CAA2BC,KAAQ,IAAQ;IACzD,SAAS;;IACT,MAAMC,YAAY,GAAGD,KAAsB;IAC3C,IAAIE,UAAU,GAAGD,YAAY,CAACR,GAAG,CAAC;IAClC,IAAI,CAACS,UAAU,EAAE;MAChBA,UAAU,GAAG,CAAC,CAAC;MACfD,YAAY,CA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OAAOoB,KAAK,CAAClB,cAAc,IAAI,IAAI;IACpC;EACD;EAEA,OAAO,IAAI;AACZ;AAEA,SAASsB,gBAAgBA,CAACC,KAAa,EAAEC,EAAU,EAAE;EACpD,SAAS;;EACT9B,MAAM,CAACS,MAAM,CAAyBC,KAAQ,IAAQ;IACrD,SAAS;;IACT,MAAMC,YAAY,GAAGD,KAAoB;IACzCC,YAAY,CAACkB,KAAK,CAAC,GAAG;MACrBE,QAAQ,EAAED;IACX,CAAC;IACD,OAAOpB,KAAK;EACb,CAAC,CAAC;AACH;AAEA,SAASsB,gBAAgBA,CAACH,KAAa,EAAiB;EACvD,SAAS;;EACT,OAAO7B,MAAM,CAACgB,KAAK,CAACa,KAAK,CAAC,EAAEE,QAAQ,IAAI,IAAI;AAC7C;AAEA,SAASE,SAASA,CAAA,EAAG;EACpB,SAAS;;EACT,OAAOjC,MAAM;AACd;AAEA,SACCE,wBAAwB,EACxBa,0BAA0B,EAC1BM,mBAAmB,EACnBK,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAgB,EAChBI,gBAAgB,EAChBC,SAAS","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { matchesScreenKey } from "../helpers/matching";
|
|
4
|
-
import { createEmptyTagState,
|
|
4
|
+
import { createEmptyTagState, registry } from "./state";
|
|
5
5
|
const LINK_HISTORY_LIMIT = 3;
|
|
6
6
|
const ensureTagState = (state, tag) => {
|
|
7
7
|
"worklet";
|
|
@@ -62,7 +62,6 @@ function registerSnapshot(tag, screenKey, bounds, styles = {}, ancestorKeys, nav
|
|
|
62
62
|
};
|
|
63
63
|
return state;
|
|
64
64
|
});
|
|
65
|
-
debugStoreSizeLog(`registerSnapshot(${tag},${screenKey})`);
|
|
66
65
|
}
|
|
67
66
|
function setLinkSource(tag, screenKey, bounds, styles = {}, ancestorKeys, navigatorKey, ancestorNavigatorKeys) {
|
|
68
67
|
"worklet";
|
|
@@ -93,7 +92,6 @@ function setLinkSource(tag, screenKey, bounds, styles = {}, ancestorKeys, naviga
|
|
|
93
92
|
trimLinkHistory(tagState);
|
|
94
93
|
return state;
|
|
95
94
|
});
|
|
96
|
-
debugStoreSizeLog(`setLinkSource(${tag},${screenKey})`);
|
|
97
95
|
}
|
|
98
96
|
function updateLinkSource(tag, screenKey, bounds, styles = {}, ancestorKeys, navigatorKey, ancestorNavigatorKeys) {
|
|
99
97
|
"worklet";
|
|
@@ -133,7 +131,6 @@ function updateLinkSource(tag, screenKey, bounds, styles = {}, ancestorKeys, nav
|
|
|
133
131
|
};
|
|
134
132
|
return state;
|
|
135
133
|
});
|
|
136
|
-
debugStoreSizeLog(`updateLinkSource(${tag},${screenKey})`);
|
|
137
134
|
}
|
|
138
135
|
const findLatestPendingIndex = (stack, expectedSourceScreenKey) => {
|
|
139
136
|
"worklet";
|
|
@@ -184,7 +181,6 @@ function setLinkDestination(tag, screenKey, bounds, styles = {}, ancestorKeys, e
|
|
|
184
181
|
};
|
|
185
182
|
return state;
|
|
186
183
|
});
|
|
187
|
-
debugStoreSizeLog(`setLinkDestination(${tag},${screenKey})`);
|
|
188
184
|
}
|
|
189
185
|
function updateLinkDestination(tag, screenKey, bounds, styles = {}, ancestorKeys, expectedSourceScreenKey, navigatorKey, ancestorNavigatorKeys) {
|
|
190
186
|
"worklet";
|
|
@@ -222,7 +218,6 @@ function updateLinkDestination(tag, screenKey, bounds, styles = {}, ancestorKeys
|
|
|
222
218
|
};
|
|
223
219
|
return state;
|
|
224
220
|
});
|
|
225
|
-
debugStoreSizeLog(`updateLinkDestination(${tag},${screenKey})`);
|
|
226
221
|
}
|
|
227
222
|
function getActiveLink(tag, screenKey) {
|
|
228
223
|
"worklet";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["matchesScreenKey","createEmptyTagState","debugStoreSizeLog","registry","LINK_HISTORY_LIMIT","ensureTagState","state","tag","isSameScreenFamily","a","b","screenKey","ancestorKeys","includes","trimLinkHistory","tagState","overLimit","linkStack","length","splice","getSnapshot","key","value","snapshots","snap","bounds","styles","registerSnapshot","navigatorKey","ancestorNavigatorKeys","modify","setLinkSource","stack","topIndex","topLink","source","destination","push","updateLinkSource","targetIndex","i","link","findLatestPendingIndex","expectedSourceScreenKey","findLatestSourceIndex","setLinkDestination","targetLink","updateLinkDestination","getActiveLink","lastLink","hasPendingLink","hasPendingLinkFromSource","sourceScreenKey","getLatestPendingSourceScreenKey","hasSourceLink","hasDestinationLink"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/registry.ts"],"mappings":";;AACA,SAASA,gBAAgB,QAAQ,qBAAqB;AAStD,SACCC,mBAAmB,EACnBC,iBAAiB,EAEjBC,QAAQ,QACF,SAAS;AAEhB,MAAMC,kBAAkB,GAAG,CAAC;AAE5B,MAAMC,cAAc,GAAGA,CAACC,KAAoB,EAAEC,GAAU,KAAe;EACtE,SAAS;;EACT,IAAI,CAACD,KAAK,CAACC,GAAG,CAAC,EAAE;IAChBD,KAAK,CAACC,GAAG,CAAC,GAAGN,mBAAmB,CAAC,CAAC;EACnC;EACA,OAAOK,KAAK,CAACC,GAAG,CAAC;AAClB,CAAC;AAED,MAAMC,kBAAkB,GAAGA,CAC1BC,CAAuD,EACvDC,CAAuD,KAC1C;EACb,SAAS;;EACT,OACCD,CAAC,CAACE,SAAS,KAAKD,CAAC,CAACC,SAAS,KAC1BF,CAAC,CAACG,YAAY,EAAEC,QAAQ,CAACH,CAAC,CAACC,SAAS,CAAC,IAAI,KAAK,CAAC,KAC/CD,CAAC,CAACE,YAAY,EAAEC,QAAQ,CAACJ,CAAC,CAACE,SAAS,CAAC,IAAI,KAAK,CAAC;AAElD,CAAC;AAED,MAAMG,eAAe,GAAIC,QAAkB,IAAK;EAC/C,SAAS;;EACT,MAAMC,SAAS,GAAGD,QAAQ,CAACE,SAAS,CAACC,MAAM,GAAGd,kBAAkB;EAChE,IAAIY,SAAS,IAAI,CAAC,EAAE;EACpBD,QAA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,GAAU,EAAEI,SAAoB,EAAW;EACtE,SAAS;;EACT,MAAMI,QAAQ,GAAGZ,QAAQ,CAACmB,KAAK,CAACf,GAAG,CAAC;EACpC,MAAMyB,KAAK,GAAGjB,QAAQ,EAAEE,SAAS;EACjC,IAAI,CAACe,KAAK,IAAIA,KAAK,CAACd,MAAM,KAAK,CAAC,EAAE,OAAO,KAAK;EAE9C,KAAK,IAAIsB,CAAC,GAAGR,KAAK,CAACd,MAAM,GAAG,CAAC,EAAEsB,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;IAC3C,IAAIxC,gBAAgB,CAACgC,KAAK,CAACQ,CAAC,CAAC,CAACJ,WAAW,EAAEzB,SAAS,CAAC,EAAE,OAAO,IAAI;EACnE;EAEA,OAAO,KAAK;AACb;AAEA,SACCS,WAAW,EACXO,gBAAgB,EAChBI,aAAa,EACbO,gBAAgB,EAChBO,kBAAkB,EAClBE,qBAAqB,EACrBC,aAAa,EACbE,cAAc,EACdC,wBAAwB,EACxBE,+BAA+B,EAC/BC,aAAa,EACbC,kBAAkB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["matchesScreenKey","createEmptyTagState","registry","LINK_HISTORY_LIMIT","ensureTagState","state","tag","isSameScreenFamily","a","b","screenKey","ancestorKeys","includes","trimLinkHistory","tagState","overLimit","linkStack","length","splice","getSnapshot","key","value","snapshots","snap","bounds","styles","registerSnapshot","navigatorKey","ancestorNavigatorKeys","modify","setLinkSource","stack","topIndex","topLink","source","destination","push","updateLinkSource","targetIndex","i","link","findLatestPendingIndex","expectedSourceScreenKey","findLatestSourceIndex","setLinkDestination","targetLink","updateLinkDestination","getActiveLink","lastLink","hasPendingLink","hasPendingLinkFromSource","sourceScreenKey","getLatestPendingSourceScreenKey","hasSourceLink","hasDestinationLink"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/registry.ts"],"mappings":";;AACA,SAASA,gBAAgB,QAAQ,qBAAqB;AAStD,SAASC,mBAAmB,EAAsBC,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../helpers/matching";
|
|
4
|
-
import {
|
|
4
|
+
import { registry } from "./state";
|
|
5
5
|
const findLatestLink = (tagState, predicate) => {
|
|
6
6
|
"worklet";
|
|
7
7
|
|
|
@@ -69,9 +69,6 @@ function resolveTransitionPair(tag, context) {
|
|
|
69
69
|
const destinationStyles = matchedLink?.destination?.styles ?? null;
|
|
70
70
|
const sourceScreenKey = matchedLink?.source?.screenKey ?? null;
|
|
71
71
|
const destinationScreenKey = matchedLink?.destination?.screenKey ?? null;
|
|
72
|
-
if (!sourceBounds || !destinationBounds) {
|
|
73
|
-
debugResolverLog(`unresolved tag=${tag} entering=${context.entering ? 1 : 0} source=${sourceBounds ? 1 : 0} destination=${destinationBounds ? 1 : 0} pending=${usedPending ? 1 : 0}`);
|
|
74
|
-
}
|
|
75
72
|
return {
|
|
76
73
|
sourceBounds,
|
|
77
74
|
destinationBounds,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["matchesScreenKey","
|
|
1
|
+
{"version":3,"names":["matchesScreenKey","registry","findLatestLink","tagState","predicate","stack","linkStack","i","length","link","findCompletedLinkByDestination","screenKey","destination","findCompletedLinkBySource","source","findPendingLinkBySource","resolveTransitionPair","tag","context","value","matchedLink","usedPending","entering","currentScreenKey","previousScreenKey","nextScreenKey","sourceBounds","bounds","destinationBounds","sourceStyles","styles","destinationStyles","sourceScreenKey","destinationScreenKey"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/resolver.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,qBAAqB;AAStD,SAASC,QAAQ,QAAQ,SAAS;AAElC,MAAMC,cAAc,GAAGA,CACtBC,QAAkB,EAClBC,SAAqC,KACjB;EACpB,SAAS;;EACT,MAAMC,KAAK,GAAGF,QAAQ,CAACG,SAAS;EAChC,KAAK,IAAIC,CAAC,GAAGF,KAAK,CAACG,MAAM,GAAG,CAAC,EAAED,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;IAC3C,MAAME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AAMsB,oBAAoB,GAAGb,WAAW,EAAER,WAAW,EAAED,SAAS,IAAI,IAAI;EAExE,OAAO;IACNe,YAAY;IACZE,iBAAiB;IACjBC,YAAY;IACZE,iBAAiB;IACjBC,eAAe;IACfC,oBAAoB;IACpBZ;EACD,CAAC;AACF;AAEA,SAASL,qBAAqB","ignoreList":[]}
|
|
@@ -12,82 +12,4 @@ export const createEmptyTagState = () => {
|
|
|
12
12
|
export const registry = makeMutable({});
|
|
13
13
|
export const presence = makeMutable({});
|
|
14
14
|
export const groups = makeMutable({});
|
|
15
|
-
const RESOLVER_LOG_PREFIX = "[bounds:resolver]";
|
|
16
|
-
const ENABLE_RESOLVER_DEBUG_LOGS = false;
|
|
17
|
-
const CLEAR_LOG_PREFIX = "[bounds:clear]";
|
|
18
|
-
const ENABLE_CLEAR_DEBUG_LOGS = false;
|
|
19
|
-
const SIZE_LOG_PREFIX = "[bounds:size]";
|
|
20
|
-
const ENABLE_SIZE_DEBUG_LOGS = false;
|
|
21
|
-
export function debugResolverLog(message) {
|
|
22
|
-
"worklet";
|
|
23
|
-
|
|
24
|
-
if (!ENABLE_RESOLVER_DEBUG_LOGS) return;
|
|
25
|
-
console.warn(`${RESOLVER_LOG_PREFIX} ${message}`);
|
|
26
|
-
}
|
|
27
|
-
export function debugClearLog(message) {
|
|
28
|
-
"worklet";
|
|
29
|
-
|
|
30
|
-
if (!ENABLE_CLEAR_DEBUG_LOGS) return;
|
|
31
|
-
console.warn(`${CLEAR_LOG_PREFIX} ${message}`);
|
|
32
|
-
}
|
|
33
|
-
const collectBoundStoreSize = () => {
|
|
34
|
-
"worklet";
|
|
35
|
-
|
|
36
|
-
const currentRegistry = registry.value;
|
|
37
|
-
const currentPresence = presence.value;
|
|
38
|
-
const currentGroups = groups.value;
|
|
39
|
-
let tags = 0;
|
|
40
|
-
let snapshots = 0;
|
|
41
|
-
let links = 0;
|
|
42
|
-
let pendingLinks = 0;
|
|
43
|
-
let completedLinks = 0;
|
|
44
|
-
for (const tag in currentRegistry) {
|
|
45
|
-
tags++;
|
|
46
|
-
const tagState = currentRegistry[tag];
|
|
47
|
-
for (const _snapshotKey in tagState.snapshots) {
|
|
48
|
-
snapshots++;
|
|
49
|
-
}
|
|
50
|
-
for (let i = 0; i < tagState.linkStack.length; i++) {
|
|
51
|
-
links++;
|
|
52
|
-
if (tagState.linkStack[i].destination === null) {
|
|
53
|
-
pendingLinks++;
|
|
54
|
-
} else {
|
|
55
|
-
completedLinks++;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
let presenceTags = 0;
|
|
60
|
-
let presenceEntries = 0;
|
|
61
|
-
let presenceCount = 0;
|
|
62
|
-
for (const tag in currentPresence) {
|
|
63
|
-
presenceTags++;
|
|
64
|
-
const entries = currentPresence[tag];
|
|
65
|
-
for (const screenKey in entries) {
|
|
66
|
-
presenceEntries++;
|
|
67
|
-
presenceCount += entries[screenKey].count ?? 0;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
let groupsCount = 0;
|
|
71
|
-
for (const _group in currentGroups) {
|
|
72
|
-
groupsCount++;
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
tags,
|
|
76
|
-
snapshots,
|
|
77
|
-
links,
|
|
78
|
-
pendingLinks,
|
|
79
|
-
completedLinks,
|
|
80
|
-
presenceTags,
|
|
81
|
-
presenceEntries,
|
|
82
|
-
presenceCount,
|
|
83
|
-
groups: groupsCount
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
export function debugStoreSizeLog(action) {
|
|
87
|
-
"worklet";
|
|
88
|
-
|
|
89
|
-
if (!ENABLE_SIZE_DEBUG_LOGS) return;
|
|
90
|
-
const size = collectBoundStoreSize();
|
|
91
|
-
console.warn(`${SIZE_LOG_PREFIX} ${action} tags=${size.tags} snapshots=${size.snapshots} links=${size.links} pending=${size.pendingLinks} completed=${size.completedLinks} presenceTags=${size.presenceTags} presenceEntries=${size.presenceEntries} presenceCount=${size.presenceCount} groups=${size.groups}`);
|
|
92
|
-
}
|
|
93
15
|
//# sourceMappingURL=state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["makeMutable","createEmptyTagState","snapshots","linkStack","registry","presence","groups"
|
|
1
|
+
{"version":3,"names":["makeMutable","createEmptyTagState","snapshots","linkStack","registry","presence","groups"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/state.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,yBAAyB;AAGrD,OAAO,MAAMC,mBAAmB,GAAGA,CAAA,KAAgB;EAClD,SAAS;;EACT,OAAO;IACNC,SAAS,EAAE,CAAC,CAAC;IACbC,SAAS,EAAE;EACZ,CAAC;AACF,CAAC;AAKD,OAAO,MAAMC,QAAQ,GAAGJ,WAAW,CAAgB,CAAC,CAAC,CAAC;AACtD,OAAO,MAAMK,QAAQ,GAAGL,WAAW,CAAgB,CAAC,CAAC,CAAC;AACtD,OAAO,MAAMM,MAAM,GAAGN,WAAW,CAAc,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_BOUNDS_OPTIONS","target","method","space","scaleMode","anchor","raw"],"sourceRoot":"../../../../../src","sources":["shared/utils/bounds/constants.ts"],"mappings":";;AAEA,OAAO,MAAMA,sBAAsB,GAAG;EACrCC,MAAM,EAAE,OAAO;EACfC,MAAM,EAAE,WAAW;EACnBC,KAAK,EAAE,UAAU;EACjBC,SAAS,EAAE,OAAO;EAClBC,MAAM,EAAE,QAAQ;EAChBC,GAAG,EAAE;AACN,CAAqE","ignoreList":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const createBoundTag = ({
|
|
4
4
|
id,
|
|
5
5
|
group
|
|
6
6
|
}) => {
|
|
7
7
|
"worklet";
|
|
8
8
|
|
|
9
|
-
if (id
|
|
9
|
+
if (id == null || id === "") return undefined;
|
|
10
10
|
const normalizedId = String(id);
|
|
11
11
|
if (!group) {
|
|
12
12
|
return normalizedId;
|
|
13
13
|
}
|
|
14
14
|
return `${group}:${normalizedId}`;
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=
|
|
16
|
+
//# sourceMappingURL=create-bound-tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createBoundTag","id","group","undefined","normalizedId","String"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/helpers/create-bound-tag.ts"],"mappings":";;AAOA,OAAO,MAAMA,cAAc,GAAGA,CAAC;EAC9BC,EAAE;EACFC;AACsB,CAAC,KAAyB;EAChD,SAAS;;EAET,IAAID,EAAE,IAAI,IAAI,IAAIA,EAAE,KAAK,EAAE,EAAE,OAAOE,SAAS;EAE7C,MAAMC,YAAY,GAAGC,MAAM,CAACJ,EAAE,CAAC;EAE/B,IAAI,CAACC,KAAK,EAAE;IACX,OAAOE,YAAY;EACpB;EAEA,OAAO,GAAGF,KAAK,IAAIE,YAAY,EAAE;AAClC,CAAC","ignoreList":[]}
|