react-native-screen-transitions 3.5.0 → 3.5.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.
Files changed (136) hide show
  1. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +2 -2
  2. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  3. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +3 -3
  4. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +1 -1
  5. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js +3 -3
  6. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  7. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js +7 -6
  8. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js.map +1 -1
  9. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js +2 -2
  10. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js.map +1 -1
  11. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js +8 -8
  12. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
  13. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +6 -5
  14. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
  15. package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js +4 -4
  16. package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js.map +1 -1
  17. package/lib/commonjs/shared/providers/register-bounds.provider.js +8 -8
  18. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  19. package/lib/commonjs/shared/providers/screen/styles/components/maybe-floating-container.js +1 -1
  20. package/lib/commonjs/shared/providers/screen/styles/components/maybe-floating-container.js.map +1 -1
  21. package/lib/commonjs/shared/stores/bounds/helpers/apply-measured-bounds-writes.js +6 -6
  22. package/lib/commonjs/shared/stores/bounds/helpers/apply-measured-bounds-writes.js.map +1 -1
  23. package/lib/commonjs/shared/stores/bounds/index.js +85 -1
  24. package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
  25. package/lib/commonjs/shared/stores/bounds/internals/registry.js +7 -0
  26. package/lib/commonjs/shared/stores/bounds/internals/registry.js.map +1 -1
  27. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +3 -1
  28. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  29. package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js +3 -3
  30. package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js.map +1 -1
  31. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +3 -3
  32. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  33. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +5 -4
  34. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  35. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +2 -2
  36. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  37. package/lib/commonjs/shared/utils/bounds/zoom/build.js +4 -3
  38. package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -1
  39. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +2 -2
  40. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  41. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +3 -3
  42. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +1 -1
  43. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +3 -3
  44. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  45. package/lib/module/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js +7 -6
  46. package/lib/module/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js.map +1 -1
  47. package/lib/module/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js +2 -2
  48. package/lib/module/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js.map +1 -1
  49. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +8 -8
  50. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
  51. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +6 -5
  52. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
  53. package/lib/module/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js +4 -4
  54. package/lib/module/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js.map +1 -1
  55. package/lib/module/shared/providers/register-bounds.provider.js +8 -8
  56. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  57. package/lib/module/shared/providers/screen/styles/components/maybe-floating-container.js +1 -1
  58. package/lib/module/shared/providers/screen/styles/components/maybe-floating-container.js.map +1 -1
  59. package/lib/module/shared/stores/bounds/helpers/apply-measured-bounds-writes.js +6 -6
  60. package/lib/module/shared/stores/bounds/helpers/apply-measured-bounds-writes.js.map +1 -1
  61. package/lib/module/shared/stores/bounds/index.js +85 -1
  62. package/lib/module/shared/stores/bounds/index.js.map +1 -1
  63. package/lib/module/shared/stores/bounds/internals/registry.js +7 -0
  64. package/lib/module/shared/stores/bounds/internals/registry.js.map +1 -1
  65. package/lib/module/shared/stores/bounds/internals/resolver.js +3 -1
  66. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  67. package/lib/module/shared/utils/bounds/helpers/create-interpolators.js +3 -3
  68. package/lib/module/shared/utils/bounds/helpers/create-interpolators.js.map +1 -1
  69. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +3 -3
  70. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  71. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +5 -4
  72. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  73. package/lib/module/shared/utils/bounds/helpers/styles/compute.js +2 -2
  74. package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  75. package/lib/module/shared/utils/bounds/zoom/build.js +4 -3
  76. package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
  77. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts +207 -4
  78. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts.map +1 -1
  79. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +1 -1
  80. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -1
  81. package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.d.ts.map +1 -1
  82. package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-source-boundary.d.ts.map +1 -1
  83. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -1
  84. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +1 -1
  85. package/lib/typescript/shared/components/create-boundary-component/index.d.ts +208 -4
  86. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
  87. package/lib/typescript/shared/components/create-transition-aware-component.d.ts +6 -5
  88. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  89. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -1
  90. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
  91. package/lib/typescript/shared/components/scene-view.d.ts +1 -1
  92. package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
  93. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +2 -2
  94. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  95. package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.d.ts.map +1 -1
  96. package/lib/typescript/shared/index.d.ts +918 -656
  97. package/lib/typescript/shared/index.d.ts.map +1 -1
  98. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  99. package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts +1 -1
  100. package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts.map +1 -1
  101. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +2 -2
  102. package/lib/typescript/shared/stores/bounds/index.d.ts +25 -0
  103. package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
  104. package/lib/typescript/shared/stores/bounds/internals/registry.d.ts.map +1 -1
  105. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  106. package/lib/typescript/shared/stores/bounds/types.d.ts +3 -0
  107. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  108. package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts.map +1 -1
  109. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts +1 -1
  110. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
  111. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +1 -1
  112. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
  113. package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts +1 -1
  114. package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
  115. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
  116. package/package.json +2 -1
  117. package/src/shared/components/create-boundary-component/create-boundary-component.tsx +2 -2
  118. package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +7 -4
  119. package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +6 -3
  120. package/src/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.ts +12 -7
  121. package/src/shared/components/create-boundary-component/hooks/use-capture-source-boundary.ts +2 -4
  122. package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +14 -12
  123. package/src/shared/components/create-boundary-component/hooks/use-refresh-boundary.ts +6 -12
  124. package/src/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.ts +8 -4
  125. package/src/shared/providers/register-bounds.provider.tsx +13 -16
  126. package/src/shared/providers/screen/styles/components/maybe-floating-container.tsx +1 -1
  127. package/src/shared/stores/bounds/helpers/apply-measured-bounds-writes.ts +6 -6
  128. package/src/shared/stores/bounds/index.ts +182 -0
  129. package/src/shared/stores/bounds/internals/registry.ts +8 -0
  130. package/src/shared/stores/bounds/internals/resolver.ts +2 -0
  131. package/src/shared/stores/bounds/types.ts +3 -0
  132. package/src/shared/utils/bounds/helpers/create-interpolators.ts +3 -6
  133. package/src/shared/utils/bounds/helpers/create-link-accessor.ts +7 -6
  134. package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +8 -8
  135. package/src/shared/utils/bounds/helpers/styles/compute.ts +3 -5
  136. package/src/shared/utils/bounds/zoom/build.ts +5 -6
@@ -1,3 +1,4 @@
1
+ import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
1
2
  import { clear, clearByAncestor, clearByBranch } from "./internals/clear";
2
3
  import { getGroupActiveId, setGroupActiveId } from "./internals/groups";
3
4
  import {
@@ -14,6 +15,13 @@ import {
14
15
  setSource,
15
16
  } from "./internals/registry";
16
17
  import { resolveTransitionPair } from "./internals/resolver";
18
+ import type {
19
+ BoundaryConfig,
20
+ MeasuredEntry,
21
+ NavigatorKey,
22
+ ScreenKey,
23
+ TagID,
24
+ } from "./types";
17
25
 
18
26
  export type {
19
27
  BoundaryConfig,
@@ -24,6 +32,154 @@ export type {
24
32
  ResolveTransitionContext,
25
33
  } from "./types";
26
34
 
35
+ export type Snapshot = MeasuredEntry;
36
+
37
+ const registerSnapshot = (
38
+ tag: TagID,
39
+ screenKey: ScreenKey,
40
+ bounds: MeasuredDimensions,
41
+ styles: StyleProps = {},
42
+ ancestorKeys?: ScreenKey[],
43
+ navigatorKey?: NavigatorKey,
44
+ ancestorNavigatorKeys?: NavigatorKey[],
45
+ ) => {
46
+ "worklet";
47
+ setEntry(tag, screenKey, {
48
+ bounds,
49
+ styles,
50
+ ancestorKeys,
51
+ navigatorKey,
52
+ ancestorNavigatorKeys,
53
+ });
54
+ };
55
+
56
+ const registerBoundaryPresence = (
57
+ tag: TagID,
58
+ screenKey: ScreenKey,
59
+ ancestorKeys?: ScreenKey[],
60
+ boundaryConfig?: BoundaryConfig,
61
+ navigatorKey?: NavigatorKey,
62
+ ancestorNavigatorKeys?: NavigatorKey[],
63
+ ) => {
64
+ "worklet";
65
+ const currentPresenceCount = getEntry(tag, screenKey)?.presenceCount ?? 0;
66
+ setEntry(tag, screenKey, {
67
+ ancestorKeys,
68
+ boundaryConfig,
69
+ navigatorKey,
70
+ ancestorNavigatorKeys,
71
+ presenceCount: currentPresenceCount + 1,
72
+ });
73
+ };
74
+
75
+ const unregisterBoundaryPresence = (tag: TagID, screenKey: ScreenKey) => {
76
+ "worklet";
77
+ const currentPresenceCount = getEntry(tag, screenKey)?.presenceCount ?? 0;
78
+ if (currentPresenceCount > 1) {
79
+ setEntry(tag, screenKey, { presenceCount: currentPresenceCount - 1 });
80
+ return;
81
+ }
82
+
83
+ removeEntry(tag, screenKey);
84
+ };
85
+
86
+ const getLatestPendingSourceScreenKey = (tag: TagID): ScreenKey | null => {
87
+ "worklet";
88
+ return getPendingLink(tag)?.source.screenKey ?? null;
89
+ };
90
+
91
+ const setLinkSource = (
92
+ tag: TagID,
93
+ screenKey: ScreenKey,
94
+ bounds: MeasuredDimensions,
95
+ styles?: StyleProps,
96
+ ancestorKeys?: ScreenKey[],
97
+ navigatorKey?: NavigatorKey,
98
+ ancestorNavigatorKeys?: NavigatorKey[],
99
+ ) => {
100
+ "worklet";
101
+ setSource(
102
+ "capture",
103
+ tag,
104
+ screenKey,
105
+ bounds,
106
+ styles,
107
+ ancestorKeys,
108
+ navigatorKey,
109
+ ancestorNavigatorKeys,
110
+ );
111
+ };
112
+
113
+ const updateLinkSource = (
114
+ tag: TagID,
115
+ screenKey: ScreenKey,
116
+ bounds: MeasuredDimensions,
117
+ styles?: StyleProps,
118
+ ancestorKeys?: ScreenKey[],
119
+ navigatorKey?: NavigatorKey,
120
+ ancestorNavigatorKeys?: NavigatorKey[],
121
+ ) => {
122
+ "worklet";
123
+ setSource(
124
+ "refresh",
125
+ tag,
126
+ screenKey,
127
+ bounds,
128
+ styles,
129
+ ancestorKeys,
130
+ navigatorKey,
131
+ ancestorNavigatorKeys,
132
+ );
133
+ };
134
+
135
+ const setLinkDestination = (
136
+ tag: TagID,
137
+ screenKey: ScreenKey,
138
+ bounds: MeasuredDimensions,
139
+ styles?: StyleProps,
140
+ ancestorKeys?: ScreenKey[],
141
+ expectedSourceScreenKey?: ScreenKey,
142
+ navigatorKey?: NavigatorKey,
143
+ ancestorNavigatorKeys?: NavigatorKey[],
144
+ ) => {
145
+ "worklet";
146
+ setDestination(
147
+ "attach",
148
+ tag,
149
+ screenKey,
150
+ bounds,
151
+ styles,
152
+ ancestorKeys,
153
+ expectedSourceScreenKey,
154
+ navigatorKey,
155
+ ancestorNavigatorKeys,
156
+ );
157
+ };
158
+
159
+ const updateLinkDestination = (
160
+ tag: TagID,
161
+ screenKey: ScreenKey,
162
+ bounds: MeasuredDimensions,
163
+ styles?: StyleProps,
164
+ ancestorKeys?: ScreenKey[],
165
+ expectedSourceScreenKey?: ScreenKey,
166
+ navigatorKey?: NavigatorKey,
167
+ ancestorNavigatorKeys?: NavigatorKey[],
168
+ ) => {
169
+ "worklet";
170
+ setDestination(
171
+ "refresh",
172
+ tag,
173
+ screenKey,
174
+ bounds,
175
+ styles,
176
+ ancestorKeys,
177
+ expectedSourceScreenKey,
178
+ navigatorKey,
179
+ ancestorNavigatorKeys,
180
+ );
181
+ };
182
+
27
183
  export const BoundStore = {
28
184
  entry: {
29
185
  set: setEntry,
@@ -50,4 +206,30 @@ export const BoundStore = {
50
206
  byAncestor: clearByAncestor,
51
207
  byBranch: clearByBranch,
52
208
  },
209
+ // Legacy flat aliases used by the v3 tests and older internals. New code should
210
+ // prefer the explicit entry/link/group/cleanup namespaces above.
211
+ registerSnapshot,
212
+ getSnapshot: getMeasuredEntry,
213
+ setLinkSource,
214
+ updateLinkSource,
215
+ setLinkDestination,
216
+ updateLinkDestination,
217
+ getActiveLink,
218
+ resolveTransitionPair,
219
+ hasPendingLink: (tag: TagID) => getPendingLink(tag) !== null,
220
+ hasPendingLinkFromSource: (tag: TagID, sourceScreenKey: ScreenKey) =>
221
+ getPendingLink(tag, sourceScreenKey) !== null,
222
+ getLatestPendingSourceScreenKey,
223
+ hasSourceLink,
224
+ hasDestinationLink,
225
+ registerBoundaryPresence,
226
+ unregisterBoundaryPresence,
227
+ hasBoundaryPresence: (tag: TagID, screenKey: ScreenKey) =>
228
+ (getEntry(tag, screenKey)?.presenceCount ?? 0) > 0,
229
+ getBoundaryConfig: getEntryConfig,
230
+ setGroupActiveId,
231
+ getGroupActiveId,
232
+ clear,
233
+ clearByAncestor,
234
+ clearByBranch,
53
235
  };
@@ -102,6 +102,14 @@ const applyEntryPatch = (entry: ScreenEntry, patch: EntryPatch) => {
102
102
  entry.ancestorNavigatorKeys = patch.ancestorNavigatorKeys;
103
103
  }
104
104
  }
105
+
106
+ if (patch.presenceCount !== undefined) {
107
+ if (patch.presenceCount === null) {
108
+ delete entry.presenceCount;
109
+ } else {
110
+ entry.presenceCount = patch.presenceCount;
111
+ }
112
+ }
105
113
  };
106
114
 
107
115
  const findMatchingScreenEntry = (
@@ -130,6 +130,7 @@ function resolveTransitionPair(
130
130
  const destinationStyles = matchedLink?.destination?.styles ?? null;
131
131
  const sourceScreenKey = matchedLink?.source?.screenKey ?? null;
132
132
  const destinationScreenKey = matchedLink?.destination?.screenKey ?? null;
133
+ const usedPending = matchedLink ? matchedLink.destination === null : false;
133
134
 
134
135
  return {
135
136
  sourceBounds,
@@ -138,6 +139,7 @@ function resolveTransitionPair(
138
139
  destinationStyles,
139
140
  sourceScreenKey,
140
141
  destinationScreenKey,
142
+ usedPending,
141
143
  };
142
144
  }
143
145
 
@@ -23,6 +23,7 @@ export type Entry = {
23
23
  ancestorKeys?: ScreenKey[];
24
24
  navigatorKey?: NavigatorKey;
25
25
  ancestorNavigatorKeys?: NavigatorKey[];
26
+ presenceCount?: number;
26
27
  };
27
28
 
28
29
  export type MeasuredEntry = Entry & {
@@ -36,6 +37,7 @@ export type EntryPatch = {
36
37
  ancestorKeys?: ScreenKey[] | null;
37
38
  navigatorKey?: NavigatorKey | null;
38
39
  ancestorNavigatorKeys?: NavigatorKey[] | null;
40
+ presenceCount?: number | null;
39
41
  };
40
42
 
41
43
  export type ScreenIdentifier = {
@@ -64,6 +66,7 @@ export type ResolvedTransitionPair = {
64
66
  destinationStyles: StyleProps | null;
65
67
  sourceScreenKey: ScreenKey | null;
66
68
  destinationScreenKey: ScreenKey | null;
69
+ usedPending: boolean;
67
70
  };
68
71
 
69
72
  export type ScreenEntry = Entry;
@@ -4,7 +4,7 @@ import {
4
4
  type MeasuredDimensions,
5
5
  } from "react-native-reanimated";
6
6
  import { ENTER_RANGE, EXIT_RANGE } from "../../../constants";
7
- import { BoundStore } from "../../../stores/bounds";
7
+ import { getMeasuredEntry } from "../../../stores/bounds/internals/registry";
8
8
  import type { ScreenInterpolationProps } from "../../../types/animation.types";
9
9
  import type { BoundId } from "../types/options";
10
10
  import type { LinkAccessor } from "./create-link-accessor";
@@ -51,12 +51,9 @@ export const createInterpolators = ({
51
51
  const normalizedTag = String(tag);
52
52
 
53
53
  const currentMeasuredEntry = currentKey
54
- ? BoundStore.entry.getMeasured(normalizedTag, currentKey)
54
+ ? getMeasuredEntry(normalizedTag, currentKey)
55
55
  : null;
56
- const targetMeasuredEntry = BoundStore.entry.getMeasured(
57
- normalizedTag,
58
- targetKey,
59
- );
56
+ const targetMeasuredEntry = getMeasuredEntry(normalizedTag, targetKey);
60
57
 
61
58
  const currentValue = currentMeasuredEntry?.bounds?.[property] ?? fb;
62
59
  const targetValue = targetMeasuredEntry?.bounds?.[property] ?? fb;
@@ -1,4 +1,8 @@
1
- import { BoundStore, type MeasuredEntry } from "../../../stores/bounds";
1
+ import {
2
+ getActiveLink,
3
+ getMeasuredEntry,
4
+ } from "../../../stores/bounds/internals/registry";
5
+ import type { MeasuredEntry } from "../../../stores/bounds/types";
2
6
  import type { ScreenInterpolationProps } from "../../../types/animation.types";
3
7
  import type { BoundsLink } from "../../../types/bounds.types";
4
8
  import type { BoundId } from "../types/options";
@@ -17,7 +21,7 @@ export const createLinkAccessor = (getProps: GetProps): LinkAccessor => {
17
21
  const getMeasured = (tag: BoundId, key?: string): MeasuredEntry | null => {
18
22
  "worklet";
19
23
  if (!key) return null;
20
- return BoundStore.entry.getMeasured(String(tag), key);
24
+ return getMeasuredEntry(String(tag), key);
21
25
  };
22
26
 
23
27
  const getSnapshot = (tag: BoundId, key?: string): MeasuredEntry | null => {
@@ -28,10 +32,7 @@ export const createLinkAccessor = (getProps: GetProps): LinkAccessor => {
28
32
  const getLink = (tag: BoundId): BoundsLink | null => {
29
33
  "worklet";
30
34
  const props = getProps();
31
- const link = BoundStore.link.getActive(
32
- String(tag),
33
- props.current?.route.key,
34
- );
35
+ const link = getActiveLink(String(tag), props.current?.route.key);
35
36
  if (!link) return null;
36
37
  return {
37
38
  source: link.source
@@ -1,7 +1,9 @@
1
1
  import {
2
- BoundStore,
3
- type ResolvedTransitionPair,
4
- } from "../../../stores/bounds";
2
+ getGroupActiveId,
3
+ setGroupActiveId,
4
+ } from "../../../stores/bounds/internals/groups";
5
+ import { getEntryConfig } from "../../../stores/bounds/internals/registry";
6
+ import type { ResolvedTransitionPair } from "../../../stores/bounds/types";
5
7
  import type { ScreenInterpolationProps } from "../../../types/animation.types";
6
8
  import { DEFAULT_BOUNDS_OPTIONS } from "../constants";
7
9
  import type {
@@ -40,9 +42,7 @@ export const buildBoundsOptions = ({
40
42
  const currentScreenKey = props.current?.route.key;
41
43
 
42
44
  const boundaryConfig =
43
- tag && currentScreenKey
44
- ? BoundStore.entry.getConfig(tag, currentScreenKey)
45
- : null;
45
+ tag && currentScreenKey ? getEntryConfig(tag, currentScreenKey) : null;
46
46
 
47
47
  const resolved = {
48
48
  ...DEFAULT_BOUNDS_OPTIONS,
@@ -61,9 +61,9 @@ const syncGroupActiveMember = (group?: string, id?: BoundId) => {
61
61
 
62
62
  const normalizedId = String(id);
63
63
 
64
- if (BoundStore.group.getActiveId(group) === normalizedId) return;
64
+ if (getGroupActiveId(group) === normalizedId) return;
65
65
 
66
- BoundStore.group.setActiveId(group, normalizedId);
66
+ setGroupActiveId(group, normalizedId);
67
67
  };
68
68
 
69
69
  export const prepareBoundStyles = <T extends BoundsOptions>({
@@ -5,10 +5,8 @@ import {
5
5
  FULLSCREEN_DIMENSIONS,
6
6
  NO_STYLES,
7
7
  } from "../../../../constants";
8
- import {
9
- BoundStore,
10
- type ResolvedTransitionPair,
11
- } from "../../../../stores/bounds";
8
+ import { resolveTransitionPair } from "../../../../stores/bounds/internals/resolver";
9
+ import type { ResolvedTransitionPair } from "../../../../stores/bounds/types";
12
10
  import type { ScreenTransitionState } from "../../../../types/animation.types";
13
11
  import type { Layout } from "../../../../types/screen.types";
14
12
  import type {
@@ -54,7 +52,7 @@ const resolveStartEnd = (params: {
54
52
 
55
53
  const resolvedPair =
56
54
  params.resolvedPair ??
57
- BoundStore.link.getPair(String(params.id), {
55
+ resolveTransitionPair(String(params.id), {
58
56
  currentScreenKey,
59
57
  previousScreenKey,
60
58
  nextScreenKey,
@@ -5,10 +5,9 @@ import {
5
5
  NAVIGATION_MASK_ELEMENT_STYLE_ID,
6
6
  VISIBLE_STYLE,
7
7
  } from "../../../constants";
8
- import {
9
- BoundStore,
10
- type ResolvedTransitionPair,
11
- } from "../../../stores/bounds";
8
+ import { getGroupActiveId } from "../../../stores/bounds/internals/groups";
9
+ import { resolveTransitionPair } from "../../../stores/bounds/internals/resolver";
10
+ import type { ResolvedTransitionPair } from "../../../stores/bounds/types";
12
11
  import type { TransitionInterpolatedStyle } from "../../../types/animation.types";
13
12
  import type { Layout } from "../../../types/screen.types";
14
13
  import { prepareBoundStyles } from "../helpers/prepare-bound-styles";
@@ -176,7 +175,7 @@ export function buildZoomStyles({
176
175
  let buildEffectiveTag = tag;
177
176
  if (isGroup) {
178
177
  const group = tag.split(":")[0];
179
- const groupActiveTag = BoundStore.group.getActiveId(group)?.split(":")[0];
178
+ const groupActiveTag = getGroupActiveId(group)?.split(":")[0];
180
179
  buildEffectiveTag = `${group}:${groupActiveTag ?? tag.split(":")[1]}`;
181
180
  }
182
181
 
@@ -201,7 +200,7 @@ export function buildZoomStyles({
201
200
  scaleMode: ZOOM_SHARED_OPTIONS.scaleMode,
202
201
  } as const;
203
202
 
204
- const linkPair = BoundStore.link.getPair(buildEffectiveTag, {
203
+ const linkPair = resolveTransitionPair(buildEffectiveTag, {
205
204
  currentScreenKey: currentRouteKey,
206
205
  previousScreenKey: previousRouteKey,
207
206
  nextScreenKey: nextRouteKey,