react-native-screen-transitions 3.6.0-alpha.3 → 3.6.0-beta.0
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/screen-container/layers/content.js +1 -11
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/constants.js +2 -1
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +10 -3
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.js +2 -2
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +7 -2
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/stack-progress.js +25 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/stack-progress.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +13 -4
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/options/helpers.js +9 -4
- package/lib/commonjs/shared/providers/screen/options/helpers.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +94 -13
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +4 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/types.js +4 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +85 -28
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +5 -4
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js +2 -2
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/direct.provider.js +1 -3
- package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/use-stack-derived.js +2 -12
- package/lib/commonjs/shared/providers/stack/helpers/use-stack-derived.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/managed.provider.js +1 -3
- package/lib/commonjs/shared/providers/stack/managed.provider.js.map +1 -1
- package/lib/commonjs/shared/stores/animation.store.js +5 -3
- package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +18 -3
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +0 -2
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +5 -2
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +3 -13
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/constants.js +1 -0
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +10 -3
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.js +2 -2
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +7 -2
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/stack-progress.js +20 -0
- package/lib/module/shared/providers/screen/animation/helpers/stack-progress.js.map +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/policy.js +14 -5
- package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/module/shared/providers/screen/options/helpers.js +10 -5
- package/lib/module/shared/providers/screen/options/helpers.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +95 -14
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +4 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/types.js +2 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +84 -28
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +5 -4
- package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/styles.provider.js +2 -2
- package/lib/module/shared/providers/screen/styles/styles.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/direct.provider.js +1 -3
- package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/helpers/use-stack-derived.js +2 -12
- package/lib/module/shared/providers/stack/helpers/use-stack-derived.js.map +1 -1
- package/lib/module/shared/providers/stack/managed.provider.js +1 -3
- package/lib/module/shared/providers/stack/managed.provider.js.map +1 -1
- package/lib/module/shared/stores/animation.store.js +5 -3
- package/lib/module/shared/stores/animation.store.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +18 -3
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/types/animation.types.js +2 -1
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js +0 -2
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +5 -2
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +2 -1
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +0 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +12 -12
- package/lib/typescript/shared/providers/screen/animation/helpers/build-screen-transition-options.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts +2 -2
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/selected-interpolator-options.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/stack-progress.d.ts +3 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/stack-progress.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +4 -4
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/options/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/options/types.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/options/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts +4 -4
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/types.d.ts +2 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +6 -6
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts +3 -2
- package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/helpers/use-stack-derived.d.ts +5 -5
- package/lib/typescript/shared/providers/stack/helpers/use-stack-derived.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts +4 -3
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +4 -3
- package/lib/typescript/shared/types/animation.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/types/screen.types.d.ts +9 -12
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/components/screen-container/layers/content.tsx +2 -21
- package/src/shared/constants.ts +6 -1
- package/src/shared/hooks/navigation/use-stack.tsx +0 -1
- package/src/shared/providers/screen/animation/helpers/build-screen-transition-options.ts +1 -2
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +16 -8
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.ts +2 -1
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +1 -0
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +19 -5
- package/src/shared/providers/screen/animation/helpers/selected-interpolator-options.ts +0 -3
- package/src/shared/providers/screen/animation/helpers/stack-progress.ts +29 -0
- package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +2 -0
- package/src/shared/providers/screen/gestures/shared/policy.ts +20 -7
- package/src/shared/providers/screen/options/helpers.ts +17 -13
- package/src/shared/providers/screen/options/types.ts +1 -1
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +140 -19
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts +5 -1
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/types.ts +4 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +132 -44
- package/src/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.tsx +7 -5
- package/src/shared/providers/screen/styles/styles.provider.tsx +2 -2
- package/src/shared/providers/stack/direct.provider.tsx +2 -12
- package/src/shared/providers/stack/helpers/use-stack-derived.ts +6 -15
- package/src/shared/providers/stack/managed.provider.tsx +1 -5
- package/src/shared/stores/animation.store.ts +6 -3
- package/src/shared/stores/bounds/internals/links.ts +27 -3
- package/src/shared/types/animation.types.ts +7 -3
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/screen.types.ts +9 -12
- package/src/shared/utils/bounds/navigation/reveal/build.ts +0 -2
- package/src/shared/utils/bounds/navigation/zoom/build.ts +6 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { shouldSlotInherit } from "../../constants";
|
|
4
4
|
import { materializeResolvedSlot } from "./materialize-slot";
|
|
5
|
-
import { getResolvedSlotState
|
|
5
|
+
import { getResolvedSlotState } from "./slot-state";
|
|
6
6
|
const getForwardedSlot = (slot, hasAnyKeys) => {
|
|
7
7
|
"worklet";
|
|
8
8
|
|
|
@@ -16,6 +16,27 @@ const hasEitherResetPatch = (hasStyleResetPatch, hasPropResetPatch) => {
|
|
|
16
16
|
|
|
17
17
|
return hasStyleResetPatch || hasPropResetPatch;
|
|
18
18
|
};
|
|
19
|
+
const hasDefinedBucketValue = value => {
|
|
20
|
+
"worklet";
|
|
21
|
+
|
|
22
|
+
return value !== undefined && value !== null;
|
|
23
|
+
};
|
|
24
|
+
const hasResettableDisappearedKeys = (previousKeys, previousResetValues, currentKeys) => {
|
|
25
|
+
"worklet";
|
|
26
|
+
|
|
27
|
+
if (!previousKeys || !previousResetValues) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
for (const key in previousKeys) {
|
|
31
|
+
if (currentKeys !== undefined && currentKeys[key] === true) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (previousResetValues[key] !== undefined) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
};
|
|
19
40
|
const getResolvedSlotOutput = ({
|
|
20
41
|
slot,
|
|
21
42
|
previousState,
|
|
@@ -25,8 +46,8 @@ const getResolvedSlotOutput = ({
|
|
|
25
46
|
"worklet";
|
|
26
47
|
|
|
27
48
|
const state = getResolvedSlotState(slot);
|
|
28
|
-
const hasStyleResetPatch = resetDroppedKeys &&
|
|
29
|
-
const hasPropResetPatch = resetDroppedKeys &&
|
|
49
|
+
const hasStyleResetPatch = resetDroppedKeys && hasResettableDisappearedKeys(previousState?.styleKeys, previousState?.styleResetValues, state.styleKeys);
|
|
50
|
+
const hasPropResetPatch = resetDroppedKeys && hasResettableDisappearedKeys(previousState?.propKeys, previousState?.propResetValues, state.propKeys);
|
|
30
51
|
const hasResetPatch = hasEitherResetPatch(hasStyleResetPatch, hasPropResetPatch);
|
|
31
52
|
const nextState = state.nextState ?? (carryPreviousState ? previousState : undefined);
|
|
32
53
|
if (!hasResetPatch) {
|
|
@@ -50,20 +71,72 @@ const getResolvedSlotOutput = ({
|
|
|
50
71
|
nextState
|
|
51
72
|
};
|
|
52
73
|
};
|
|
74
|
+
const hasLocalStyleSource = context => {
|
|
75
|
+
"worklet";
|
|
76
|
+
|
|
77
|
+
return context.localStylesMaps.length > 0;
|
|
78
|
+
};
|
|
79
|
+
const hasLocalSlot = (context, slotId) => {
|
|
80
|
+
"worklet";
|
|
81
|
+
|
|
82
|
+
for (let index = 0; index < context.localStylesMaps.length; index++) {
|
|
83
|
+
if (context.localStylesMaps[index]?.[slotId] !== undefined) {
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return false;
|
|
88
|
+
};
|
|
53
89
|
const shouldDeferMissingLocalSlotReset = (context, slotId) => {
|
|
54
90
|
"worklet";
|
|
55
91
|
|
|
56
92
|
const canInherit = shouldSlotInherit(slotId);
|
|
57
|
-
const
|
|
93
|
+
const localSlotExists = hasLocalSlot(context, slotId);
|
|
58
94
|
const hasInheritedSlot = canInherit && context.ancestorStylesMap[slotId] !== undefined;
|
|
59
|
-
return context.deferLocalSlotResets && !canInherit && !
|
|
95
|
+
return context.deferLocalSlotResets && !hasLocalStyleSource(context) && !canInherit && !localSlotExists && !hasInheritedSlot;
|
|
96
|
+
};
|
|
97
|
+
const mergeBucket = (resolvedBucket, source) => {
|
|
98
|
+
"worklet";
|
|
99
|
+
|
|
100
|
+
if (!source) {
|
|
101
|
+
return resolvedBucket;
|
|
102
|
+
}
|
|
103
|
+
let nextBucket = resolvedBucket;
|
|
104
|
+
for (const key in source) {
|
|
105
|
+
const value = source[key];
|
|
106
|
+
if (!hasDefinedBucketValue(value)) {
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
nextBucket = nextBucket ?? {};
|
|
110
|
+
nextBucket[key] = value;
|
|
111
|
+
}
|
|
112
|
+
return nextBucket;
|
|
113
|
+
};
|
|
114
|
+
const getMergedLocalSlot = (context, slotId) => {
|
|
115
|
+
"worklet";
|
|
116
|
+
|
|
117
|
+
let mergedStyle;
|
|
118
|
+
let mergedProps;
|
|
119
|
+
for (let index = 0; index < context.localStylesMaps.length; index++) {
|
|
120
|
+
const slot = context.localStylesMaps[index]?.[slotId];
|
|
121
|
+
if (slot === undefined) {
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
mergedStyle = mergeBucket(mergedStyle, slot.style);
|
|
125
|
+
mergedProps = mergeBucket(mergedProps, slot.props);
|
|
126
|
+
}
|
|
127
|
+
if (!mergedStyle && !mergedProps) {
|
|
128
|
+
return undefined;
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
style: mergedStyle,
|
|
132
|
+
props: mergedProps
|
|
133
|
+
};
|
|
60
134
|
};
|
|
61
135
|
const getSlotForId = (context, slotId) => {
|
|
62
136
|
"worklet";
|
|
63
137
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return currentSlot;
|
|
138
|
+
if (hasLocalSlot(context, slotId)) {
|
|
139
|
+
return getMergedLocalSlot(context, slotId);
|
|
67
140
|
}
|
|
68
141
|
if (shouldSlotInherit(slotId)) {
|
|
69
142
|
return context.ancestorStylesMap[slotId];
|
|
@@ -219,14 +292,22 @@ const appendResolvedSlot = (context, slotId) => {
|
|
|
219
292
|
const appendCurrentSlots = context => {
|
|
220
293
|
"worklet";
|
|
221
294
|
|
|
222
|
-
|
|
223
|
-
|
|
295
|
+
const appendedSlotIds = {};
|
|
296
|
+
for (let index = 0; index < context.localStylesMaps.length; index++) {
|
|
297
|
+
const stylesMap = context.localStylesMaps[index];
|
|
298
|
+
for (const slotId in stylesMap) {
|
|
299
|
+
if (stylesMap[slotId] === undefined || appendedSlotIds[slotId]) {
|
|
300
|
+
continue;
|
|
301
|
+
}
|
|
302
|
+
appendedSlotIds[slotId] = true;
|
|
303
|
+
appendResolvedSlot(context, slotId);
|
|
304
|
+
}
|
|
224
305
|
}
|
|
225
306
|
};
|
|
226
307
|
const shouldAppendInheritedSlot = (context, slotId) => {
|
|
227
308
|
"worklet";
|
|
228
309
|
|
|
229
|
-
return shouldSlotInherit(slotId) && context
|
|
310
|
+
return shouldSlotInherit(slotId) && !hasLocalSlot(context, slotId);
|
|
230
311
|
};
|
|
231
312
|
const appendInheritedSlots = context => {
|
|
232
313
|
"worklet";
|
|
@@ -241,7 +322,7 @@ const shouldAppendPreviousSlot = (context, slotId) => {
|
|
|
241
322
|
"worklet";
|
|
242
323
|
|
|
243
324
|
const inheritedSlotExists = shouldSlotInherit(slotId) && context.ancestorStylesMap[slotId] !== undefined;
|
|
244
|
-
return context
|
|
325
|
+
return !hasLocalSlot(context, slotId) && !inheritedSlotExists;
|
|
245
326
|
};
|
|
246
327
|
const appendPreviousSlots = context => {
|
|
247
328
|
"worklet";
|
|
@@ -260,7 +341,7 @@ const appendPreviousSlots = context => {
|
|
|
260
341
|
* concrete identity values.
|
|
261
342
|
*/
|
|
262
343
|
export const resolveSlotStyles = ({
|
|
263
|
-
|
|
344
|
+
localStylesMaps,
|
|
264
345
|
ancestorStylesMap,
|
|
265
346
|
previousStyleStatesBySlot,
|
|
266
347
|
deferLocalSlotResets = false
|
|
@@ -270,7 +351,7 @@ export const resolveSlotStyles = ({
|
|
|
270
351
|
const resolvedStylesMap = {};
|
|
271
352
|
const nextPreviousStyleStatesBySlot = {};
|
|
272
353
|
const context = {
|
|
273
|
-
|
|
354
|
+
localStylesMaps,
|
|
274
355
|
ancestorStylesMap,
|
|
275
356
|
previousStyleStatesBySlot,
|
|
276
357
|
deferLocalSlotResets,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["shouldSlotInherit","materializeResolvedSlot","getResolvedSlotState","hasDisappearedKeys","getForwardedSlot","slot","hasAnyKeys","undefined","hasEitherResetPatch","hasStyleResetPatch","hasPropResetPatch","getResolvedSlotOutput","previousState","resetDroppedKeys","carryPreviousState","state","styleKeys","propKeys","hasResetPatch","nextState","resolvedSlot","baseStyle","baseProps","hasAnyStyleKeys","hasAnyPropKeys","shouldDeferMissingLocalSlotReset","context","slotId","canInherit","hasCurrentSlot","currentStylesMap","hasInheritedSlot","ancestorStylesMap","deferLocalSlotResets","getSlotForId","currentSlot","writeResolvedSlotOutput","nextPreviousStyleStatesBySlot","resolvedStylesMap","areTransformItemsEqual","left","right","leftObject","rightObject","key","areTransformArraysEqual","Array","isArray","length","i","areFlatObjectsEqual","leftValue","rightValue","areSlotsEqual","style","props","reuseEqualResolvedSlots","previousResolvedStylesMap","changed","stableStylesMap","nextSlot","previousSlot","appendResolvedSlot","shouldDeferReset","previousStyleStatesBySlot","appendCurrentSlots","shouldAppendInheritedSlot","appendInheritedSlots","shouldAppendPreviousSlot","inheritedSlotExists","appendPreviousSlots","resolveSlotStyles"],"sourceRoot":"../../../../../../../../src","sources":["shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts"],"mappings":";;AAIA,SAASA,iBAAiB,QAAQ,iBAAiB;AACnD,SAASC,uBAAuB,QAAQ,oBAAoB;AAC5D,SAASC,oBAAoB,EAAEC,kBAAkB,QAAQ,cAAc;AAiBvE,MAAMC,gBAAgB,GAAGA,CACxBC,IAA+C,EAC/CC,UAAmB,KACf;EACJ,SAAS;;EAET,IAAI,CAACA,UAAU,EAAE;IAChB,OAAOC,SAAS;EACjB;EAEA,OAAOF,IAAI;AACZ,CAAC;AAED,MAAMG,mBAAmB,GAAGA,CAC3BC,kBAA2B,EAC3BC,iBAA0B,KACtB;EACJ,SAAS;;EACT,OAAOD,kBAAkB,IAAIC,iBAAiB;AAC/C,CAAC;AAED,MAAMC,qBAAqB,GAAGA,CAAC;EAC9BN,IAAI;EACJO,aAAa;EACbC,gBAAgB;EAChBC;AAMD,CAAC,KAAK;EACL,SAAS;;EACT,MAAMC,KAAK,GAAGb,oBAAoB,CAACG,IAAI,CAAC;EAExC,MAAMI,kBAAkB,GACvBI,gBAAgB,IAChBV,kBAAkB,CAACS,aAAa,EAAEI,SAAS,EAAED,KAAK,CAACC,SAAS,CAAC;EAC9D,MAAMN,iBAAiB,GACtBG,gBAAgB,IAChBV,kBAAkB,CAACS,aAAa,EAAEK,QAAQ,EAAEF,KAAK,CAACE,QAAQ,CAAC;EAC5D,MAAMC,aAAa,GAAGV,mBAAmB,CACxCC,kBAAkB,EAClBC,iBACD,CAAC;EACD,MAA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J,SAAS;;EACT,MAAM0C,mBAAmB,GACxBrE,iBAAiB,CAAC2B,MAAM,CAAC,IACzBD,OAAO,CAACM,iBAAiB,CAACL,MAAM,CAAC,KAAKpB,SAAS;EAEhD,OAAOmB,OAAO,CAACI,gBAAgB,CAACH,MAAM,CAAC,KAAKpB,SAAS,IAAI,CAAC8D,mBAAmB;AAC9E,CAAC;AAED,MAAMC,mBAAmB,GAAI5C,OAAiC,IAAK;EAClE,SAAS;;EAET,KAAK,MAAMC,MAAM,IAAID,OAAO,CAACsC,yBAAyB,EAAE;IACvD,IAAII,wBAAwB,CAAC1C,OAAO,EAAEC,MAAM,CAAC,EAAE;MAC9CmC,kBAAkB,CAACpC,OAAO,EAAEC,MAAM,CAAC;IACpC;EACD;AACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM4C,iBAAiB,GAAGA,CAAC;EACjCzC,gBAAgB;EAChBE,iBAAiB;EACjBgC,yBAAyB;EACzB/B,oBAAoB,GAAG;AAMxB,CAAC,KAAK;EACL,SAAS;;EACT,MAAMK,iBAAwD,GAAG,CAAC,CAAC;EACnE,MAAMD,6BAA0D,GAAG,CAAC,CAAC;EACrE,MAAMX,OAAO,GAAG;IACfI,gBAAgB;IAChBE,iBAAiB;IACjBgC,yBAAyB;IACzB/B,oBAAoB;IACpBK,iBAAiB;IACjBD;EACD,CAAC;EAED4B,kBAAkB,CAACvC,OAAO,CAAC;EAC3ByC,oBAAoB,CAACzC,OAAO,CAAC;EAC7B4C,mBAAmB,CAAC5C,OAAO,CAAC;EAE5B,OAAO;IACNY,iBAAiB;IACjBD;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["shouldSlotInherit","materializeResolvedSlot","getResolvedSlotState","getForwardedSlot","slot","hasAnyKeys","undefined","hasEitherResetPatch","hasStyleResetPatch","hasPropResetPatch","hasDefinedBucketValue","value","hasResettableDisappearedKeys","previousKeys","previousResetValues","currentKeys","key","getResolvedSlotOutput","previousState","resetDroppedKeys","carryPreviousState","state","styleKeys","styleResetValues","propKeys","propResetValues","hasResetPatch","nextState","resolvedSlot","baseStyle","baseProps","hasAnyStyleKeys","hasAnyPropKeys","hasLocalStyleSource","context","localStylesMaps","length","hasLocalSlot","slotId","index","shouldDeferMissingLocalSlotReset","canInherit","localSlotExists","hasInheritedSlot","ancestorStylesMap","deferLocalSlotResets","mergeBucket","resolvedBucket","source","nextBucket","getMergedLocalSlot","mergedStyle","mergedProps","style","props","getSlotForId","writeResolvedSlotOutput","nextPreviousStyleStatesBySlot","resolvedStylesMap","areTransformItemsEqual","left","right","leftObject","rightObject","areTransformArraysEqual","Array","isArray","i","areFlatObjectsEqual","leftValue","rightValue","areSlotsEqual","reuseEqualResolvedSlots","previousResolvedStylesMap","changed","stableStylesMap","nextSlot","previousSlot","appendResolvedSlot","shouldDeferReset","previousStyleStatesBySlot","appendCurrentSlots","appendedSlotIds","stylesMap","shouldAppendInheritedSlot","appendInheritedSlots","shouldAppendPreviousSlot","inheritedSlotExists","appendPreviousSlots","resolveSlotStyles"],"sourceRoot":"../../../../../../../../src","sources":["shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts"],"mappings":";;AAIA,SAASA,iBAAiB,QAAQ,iBAAiB;AACnD,SAASC,uBAAuB,QAAQ,oBAAoB;AAC5D,SAASC,oBAAoB,QAAQ,cAAc;AAkBnD,MAAMC,gBAAgB,GAAGA,CACxBC,IAA+C,EAC/CC,UAAmB,KACf;EACJ,SAAS;;EAET,IAAI,CAACA,UAAU,EAAE;IAChB,OAAOC,SAAS;EACjB;EAEA,OAAOF,IAAI;AACZ,CAAC;AAED,MAAMG,mBAAmB,GAAGA,CAC3BC,kBAA2B,EAC3BC,iBAA0B,KACtB;EACJ,SAAS;;EACT,OAAOD,kBAAkB,IAAIC,iBAAiB;AAC/C,CAAC;AAED,MAAMC,qBAAqB,GAAIC,KAAc,IAAK;EACjD,SAAS;;EACT,OAAOA,KAAK,KAAKL,SAAS,IAA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AG,CAAC,CAAC;EACrE,MAAMvB,OAAO,GAAG;IACfC,eAAe;IACfS,iBAAiB;IACjBoC,yBAAyB;IACzBnC,oBAAoB;IACpBa,iBAAiB;IACjBD;EACD,CAAC;EAEDwB,kBAAkB,CAAC/C,OAAO,CAAC;EAC3BmD,oBAAoB,CAACnD,OAAO,CAAC;EAC7BsD,mBAAmB,CAACtD,OAAO,CAAC;EAE5B,OAAO;IACNwB,iBAAiB;IACjBD;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js
CHANGED
|
@@ -23,7 +23,10 @@ const materializeResolvedBucket = ({
|
|
|
23
23
|
continue;
|
|
24
24
|
}
|
|
25
25
|
const previousResetValue = previousResetValues?.[key];
|
|
26
|
-
|
|
26
|
+
const resetValue = previousResetValue !== undefined ? previousResetValue : resetValues?.[key];
|
|
27
|
+
if (resetValue !== undefined) {
|
|
28
|
+
resolvedBucket[key] = resetValue;
|
|
29
|
+
}
|
|
27
30
|
}
|
|
28
31
|
if (source) {
|
|
29
32
|
for (const key in source) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PROP_RESET_VALUES","STYLE_RESET_VALUES","materializeResolvedBucket","source","previousKeys","previousResetValues","currentKeys","hasAnyKeys","hasResetPatch","resetValues","undefined","resolvedBucket","keysToReset","key","previousResetValue","value","materializeResolvedStyle","baseStyle","previousState","styleKeys","hasAnyStyleKeys","hasStyleResetPatch","styleResetValues","materializeResolvedProps","baseProps","propKeys","hasAnyPropKeys","hasPropResetPatch","propResetValues","materializeResolvedSlot","resolvedSlot","resolvedStyle","resolvedProps","style","props"],"sourceRoot":"../../../../../../../../src","sources":["shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts"],"mappings":";;AACA,SAASA,iBAAiB,EAAEC,kBAAkB,QAAQ,iBAAiB;AAGvE;AACA,MAAMC,yBAAyB,GAAGA,CAAC;EAClCC,MAAM;EACNC,YAAY;EACZC,mBAAmB;EACnBC,WAAW;EACXC,UAAU;EACVC,aAAa;EACbC;AASD,CAAC,KAAK;EACL,SAAS;;EAET,IAAI,CAACF,UAAU,IAAI,CAACC,aAAa,EAAE;IAClC,OAAOE,SAAS;EACjB;EAEA,MAAMC,cAAuC,GAAG,CAAC,CAAC;EAClD,MAAMC,WAAW,GAAGR,YAAY,IAAI,CAAC,CAAC;EAEtC,KAAK,MAAMS,GAAG,IAAID,WAAW,EAAE;IAC9B,IAAIN,WAAW,KAAKI,SAAS,IAAIJ,WAAW,CAACO,GAAG,CAAC,KAAK,IAAI,EAAE;MAC3D;IACD;IAEA,MAAMC,kBAAkB,GAAGT,mBAAmB,GAAGQ,GAAG,CAAC;
|
|
1
|
+
{"version":3,"names":["PROP_RESET_VALUES","STYLE_RESET_VALUES","materializeResolvedBucket","source","previousKeys","previousResetValues","currentKeys","hasAnyKeys","hasResetPatch","resetValues","undefined","resolvedBucket","keysToReset","key","previousResetValue","resetValue","value","materializeResolvedStyle","baseStyle","previousState","styleKeys","hasAnyStyleKeys","hasStyleResetPatch","styleResetValues","materializeResolvedProps","baseProps","propKeys","hasAnyPropKeys","hasPropResetPatch","propResetValues","materializeResolvedSlot","resolvedSlot","resolvedStyle","resolvedProps","style","props"],"sourceRoot":"../../../../../../../../src","sources":["shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts"],"mappings":";;AACA,SAASA,iBAAiB,EAAEC,kBAAkB,QAAQ,iBAAiB;AAGvE;AACA,MAAMC,yBAAyB,GAAGA,CAAC;EAClCC,MAAM;EACNC,YAAY;EACZC,mBAAmB;EACnBC,WAAW;EACXC,UAAU;EACVC,aAAa;EACbC;AASD,CAAC,KAAK;EACL,SAAS;;EAET,IAAI,CAACF,UAAU,IAAI,CAACC,aAAa,EAAE;IAClC,OAAOE,SAAS;EACjB;EAEA,MAAMC,cAAuC,GAAG,CAAC,CAAC;EAClD,MAAMC,WAAW,GAAGR,YAAY,IAAI,CAAC,CAAC;EA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S;IACjBrB,YAAY,EAAEe,aAAa,EAAEO,QAAQ;IACrCrB,mBAAmB,EAAEc,aAAa,EAAEU,eAAe;IACnDvB,WAAW,EAAEoB,QAAQ;IACrBnB,UAAU,EAAEoB,cAAc;IAC1BnB,aAAa,EAAEoB,iBAAiB;IAChCnB,WAAW,EAAET;EACd,CAAC,CAAC;AACH,CAAC;AAED,OAAO,MAAM8B,uBAAuB,GAAGA,CAAC;EACvCZ,SAAS;EACTO,SAAS;EACTN,aAAa;EACbC,SAAS;EACTM,QAAQ;EACRL,eAAe;EACfM,cAAc;EACdL,kBAAkB;EAClBM;AAWD,CAAC,KAAK;EACL,SAAS;;EACT,MAAMG,YAAY,GAAG,CAAC,CAAkC;EAExD,MAAMC,aAAa,GAAGf,wBAAwB,CAAC;IAC9CC,SAAS;IACTC,aAAa;IACbC,SAAS;IACTC,eAAe;IACfC;EACD,CAAC,CAAC;EAEF,MAAMW,aAAa,GAAGT,wBAAwB,CAAC;IAC9CC,SAAS;IACTN,aAAa;IACbO,QAAQ;IACRC,cAAc;IACdC;EACD,CAAC,CAAC;EAEFG,YAAY,CAACG,KAAK,GAAGF,aAAa;EAClCD,YAAY,CAACI,KAAK,GAAGF,aAAa;EAElC,IAAI,CAACF,YAAY,CAACG,KAAK,IAAI,CAACH,YAAY,CAACI,KAAK,EAAE;IAC/C,OAAOzB,SAAS;EACjB;EAEA,OAAOqB,YAAY;AACpB,CAAC","ignoreList":[]}
|
|
@@ -12,9 +12,58 @@ import { syncScreenOptionsOverrides, useScreenOptionsContext } from "../../optio
|
|
|
12
12
|
import { normalizeSlots } from "../helpers/normalize-slots";
|
|
13
13
|
import { preserveAnimatedPropsOnly } from "../helpers/preserve-animated-props-only";
|
|
14
14
|
import { stripInterpolatorOptions } from "../helpers/strip-interpolator-options";
|
|
15
|
+
const NO_STYLE_LAYERS = [];
|
|
16
|
+
const normalizeRawStyleMap = (rawStyleMap, shouldDeferStyleBuckets) => {
|
|
17
|
+
"worklet";
|
|
18
|
+
|
|
19
|
+
if (!rawStyleMap) {
|
|
20
|
+
return NO_STYLES;
|
|
21
|
+
}
|
|
22
|
+
const stylesMap = normalizeSlots(stripInterpolatorOptions(rawStyleMap));
|
|
23
|
+
return shouldDeferStyleBuckets ? preserveAnimatedPropsOnly(stylesMap) : stylesMap;
|
|
24
|
+
};
|
|
25
|
+
const runInterpolator = ({
|
|
26
|
+
interpolator,
|
|
27
|
+
props,
|
|
28
|
+
progress,
|
|
29
|
+
next,
|
|
30
|
+
bounds,
|
|
31
|
+
shouldDeferStyleBuckets
|
|
32
|
+
}) => {
|
|
33
|
+
"worklet";
|
|
34
|
+
|
|
35
|
+
if (!interpolator) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
const raw = interpolator({
|
|
40
|
+
...props,
|
|
41
|
+
progress,
|
|
42
|
+
next,
|
|
43
|
+
bounds
|
|
44
|
+
});
|
|
45
|
+
const rawStyleMap = typeof raw === "object" && raw != null ? raw : undefined;
|
|
46
|
+
return {
|
|
47
|
+
rawStyleMap,
|
|
48
|
+
stylesMap: normalizeRawStyleMap(rawStyleMap, shouldDeferStyleBuckets)
|
|
49
|
+
};
|
|
50
|
+
} catch (_) {
|
|
51
|
+
if (__DEV__) {
|
|
52
|
+
logger.warn("screenStyleInterpolator must be a worklet");
|
|
53
|
+
}
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const appendLayer = (layers, result) => {
|
|
58
|
+
"worklet";
|
|
59
|
+
|
|
60
|
+
if (result) {
|
|
61
|
+
layers.push(result.stylesMap);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
15
64
|
|
|
16
65
|
/**
|
|
17
|
-
* Builds the raw interpolated
|
|
66
|
+
* Builds the raw interpolated style layers for the current screen pass.
|
|
18
67
|
*
|
|
19
68
|
* This hook exists to stabilize style ownership during rapid navigation,
|
|
20
69
|
* especially when an interactive close gesture overlaps with a new navigation
|
|
@@ -34,9 +83,9 @@ import { stripInterpolatorOptions } from "../helpers/strip-interpolator-options"
|
|
|
34
83
|
* hidden window so animated props and runtime options stay warm, but defer style
|
|
35
84
|
* buckets so measurement sees the final untransformed layout.
|
|
36
85
|
*
|
|
37
|
-
* The result
|
|
38
|
-
* slot ids determine whether
|
|
39
|
-
*
|
|
86
|
+
* The result is ordered from lowest to highest priority. Resolution happens
|
|
87
|
+
* downstream, where slot ids determine whether slots inherit from ancestors and
|
|
88
|
+
* where higher owner layers override lower owner layers per key.
|
|
40
89
|
*/
|
|
41
90
|
export const useInterpolatedStylesMap = () => {
|
|
42
91
|
const {
|
|
@@ -90,38 +139,45 @@ export const useInterpolatedStylesMap = () => {
|
|
|
90
139
|
}
|
|
91
140
|
const isInGestureMode = !!isDragging || isGesturingDuringCloseAnimation.get();
|
|
92
141
|
const interpolatorOptionsOwner = isInGestureMode || !nextInterpolator ? "current" : "next";
|
|
93
|
-
const interpolator = interpolatorOptionsOwner === "current" ? currentInterpolator : nextInterpolator;
|
|
94
|
-
if (!interpolator) {
|
|
95
|
-
syncSelectedInterpolatorOptions(selectedInterpolatorOptions, "current");
|
|
96
|
-
syncScreenOptionsOverrides(undefined, screenOptions);
|
|
97
|
-
return NO_STYLES;
|
|
98
|
-
}
|
|
99
142
|
let effectiveProgress = progress;
|
|
100
143
|
let effectiveNext = next;
|
|
101
144
|
if (isInGestureMode) {
|
|
102
145
|
effectiveProgress = current.progress;
|
|
103
146
|
effectiveNext = undefined;
|
|
104
147
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
if (__DEV__) {
|
|
119
|
-
logger.warn("screenStyleInterpolator must be a worklet");
|
|
148
|
+
const currentResult = runInterpolator({
|
|
149
|
+
interpolator: currentInterpolator,
|
|
150
|
+
props,
|
|
151
|
+
progress: effectiveProgress,
|
|
152
|
+
next: effectiveNext,
|
|
153
|
+
bounds: boundsAccessor,
|
|
154
|
+
shouldDeferStyleBuckets
|
|
155
|
+
});
|
|
156
|
+
if (interpolatorOptionsOwner === "current") {
|
|
157
|
+
syncSelectedInterpolatorOptions(selectedInterpolatorOptions, "current", currentResult?.rawStyleMap?.options);
|
|
158
|
+
syncScreenOptionsOverrides(currentResult?.rawStyleMap, screenOptions);
|
|
159
|
+
if (!currentResult) {
|
|
160
|
+
return NO_STYLE_LAYERS;
|
|
120
161
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
162
|
+
return [currentResult.stylesMap];
|
|
163
|
+
}
|
|
164
|
+
const nextResult = runInterpolator({
|
|
165
|
+
interpolator: nextInterpolator,
|
|
166
|
+
props,
|
|
167
|
+
progress: effectiveProgress,
|
|
168
|
+
next: effectiveNext,
|
|
169
|
+
bounds: boundsAccessor,
|
|
170
|
+
shouldDeferStyleBuckets
|
|
171
|
+
});
|
|
172
|
+
syncSelectedInterpolatorOptions(selectedInterpolatorOptions, "next", nextResult?.rawStyleMap?.options);
|
|
173
|
+
syncScreenOptionsOverrides(undefined, screenOptions);
|
|
174
|
+
const layers = [];
|
|
175
|
+
appendLayer(layers, currentResult);
|
|
176
|
+
appendLayer(layers, nextResult);
|
|
177
|
+
if (layers.length === 0) {
|
|
178
|
+
return NO_STYLE_LAYERS;
|
|
124
179
|
}
|
|
180
|
+
return layers;
|
|
125
181
|
});
|
|
126
182
|
};
|
|
127
183
|
//# sourceMappingURL=use-interpolated-style-maps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useDerivedValue","useSharedValue","NO_STYLES","SystemStore","logger","useScreenAnimationContext","useBuildBoundsAccessor","syncSelectedInterpolatorOptions","useDescriptorDerivations","syncScreenOptionsOverrides","useScreenOptionsContext","normalizeSlots","preserveAnimatedPropsOnly","stripInterpolatorOptions","
|
|
1
|
+
{"version":3,"names":["useDerivedValue","useSharedValue","NO_STYLES","SystemStore","logger","useScreenAnimationContext","useBuildBoundsAccessor","syncSelectedInterpolatorOptions","useDescriptorDerivations","syncScreenOptionsOverrides","useScreenOptionsContext","normalizeSlots","preserveAnimatedPropsOnly","stripInterpolatorOptions","NO_STYLE_LAYERS","normalizeRawStyleMap","rawStyleMap","shouldDeferStyleBuckets","stylesMap","runInterpolator","interpolator","props","progress","next","bounds","undefined","raw","_","__DEV__","warn","appendLayer","layers","result","push","useInterpolatedStylesMap","currentScreenKey","screenOptions","screenInterpolatorProps","screenInterpolatorPropsRevision","selectedInterpolatorOptions","nextInterpolator","currentInterpolator","boundsAccessor","pendingLifecycleStartBlockCount","getValue","isGesturingDuringCloseAnimation","get","current","isDragging","gesture","dragging","isNextClosing","closing","set","isInGestureMode","interpolatorOptionsOwner","effectiveProgress","effectiveNext","currentResult","options","nextResult","length"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx"],"mappings":";;AAAA,SAASA,eAAe,EAAEC,cAAc,QAAQ,yBAAyB;AACzE,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,WAAW,QAAQ,iCAAiC;AAM7D,SAASC,MAAM,QAAQ,0BAA0B;AACjD,SAASC,yBAAyB,QAAQ,iBAAiB;AAC3D,SAASC,sBAAsB,QAAQ,6DAA6D;AAEpG,SAASC,+BAA+B,QAAQ,uDAAuD;AACvG,SAASC,wBAAwB,QAAQ,mBAAmB;AAC5D,SACCC,0BAA0B,EAC1BC,uBAAuB,QACjB,eAAe;AACtB,SAASC,cAAc,QAAQ,4BAA4B;AAC3D,SAASC,yBAAyB,QAAQ,yCAAyC;AAEnF,SAASC,wBAAwB,QAAQ,uCAAuC;AAEhF,MAAMC,eAAiC,GAAG,EAAE;AAgB5C,MAAMC,oBAAoB,GAAGA,CAC5BC,WAAoD,EACpDC,uBAAgC,KAC5B;EACJ,SAAS;;EAET,IAAI,CAACD,WAAW,EAAE;IACjB,OAAOd,SAAS;E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CAAC,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ import { NO_STYLES } from "../../../../constants";
|
|
|
5
5
|
import { useScreenAnimationContext } from "../../animation";
|
|
6
6
|
import { resolveSlotStyles, reuseEqualResolvedSlots } from "../helpers/resolve-slot-styles";
|
|
7
7
|
export const useResolvedStylesMap = ({
|
|
8
|
-
|
|
8
|
+
localStylesMaps,
|
|
9
9
|
ancestorStylesMap
|
|
10
10
|
}) => {
|
|
11
11
|
const {
|
|
@@ -19,14 +19,15 @@ export const useResolvedStylesMap = ({
|
|
|
19
19
|
|
|
20
20
|
screenInterpolatorPropsRevision.get();
|
|
21
21
|
const props = screenInterpolatorProps.get();
|
|
22
|
-
// Keep missing local slots alive
|
|
23
|
-
//
|
|
22
|
+
// Keep missing local slots alive only when another route drives this screen
|
|
23
|
+
// and no active local style layer is available. Once a current/next layer
|
|
24
|
+
// runs, omitted local slots and dropped keys are intentional reset signals.
|
|
24
25
|
const deferLocalSlotResets = !props.focused && !props.current.closing;
|
|
25
26
|
const {
|
|
26
27
|
resolvedStylesMap,
|
|
27
28
|
nextPreviousStyleStatesBySlot
|
|
28
29
|
} = resolveSlotStyles({
|
|
29
|
-
|
|
30
|
+
localStylesMaps: localStylesMaps.get(),
|
|
30
31
|
ancestorStylesMap: ancestorStylesMap?.get() ?? NO_STYLES,
|
|
31
32
|
previousStyleStatesBySlot: previousStyleStatesBySlot.get(),
|
|
32
33
|
deferLocalSlotResets
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useDerivedValue","useSharedValue","NO_STYLES","useScreenAnimationContext","resolveSlotStyles","reuseEqualResolvedSlots","useResolvedStylesMap","
|
|
1
|
+
{"version":3,"names":["useDerivedValue","useSharedValue","NO_STYLES","useScreenAnimationContext","resolveSlotStyles","reuseEqualResolvedSlots","useResolvedStylesMap","localStylesMaps","ancestorStylesMap","screenInterpolatorProps","screenInterpolatorPropsRevision","previousStyleStatesBySlot","previousResolvedStylesMap","get","props","deferLocalSlotResets","focused","current","closing","resolvedStylesMap","nextPreviousStyleStatesBySlot","set","stableResolvedStylesMap"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/styles/hooks/use-resolved-slot-style-map.tsx"],"mappings":";;AAAA,SAECA,eAAe,EACfC,cAAc,QACR,yBAAyB;AAChC,SAASC,SAAS,QAAQ,uBAAuB;AAEjD,SAASC,yBAAyB,QAAQ,iBAAiB;AAC3D,SAGCC,iBAAiB,EACjBC,uBAAuB,QACjB,gCAAgC;AAOvC,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EACpCC,eAAe;EACfC;AAC2B,CAAC,KAAK;EACjC,MAAM;IAAEC,uBAAuB;IAAEC;EAAgC,CAAC,GACjEP,yBAAyB,CAAC,CAAC;EAC5B,MAAMQ,yBAAyB,GAAGV,cAAc,CAC/C,CAAC,CACF,CAAC;EACD,MAAMW,yBAAyB,GAC9BX,cAAc,CAAwCC,SAAS,CAAC;EAEjE,OAAOF,eAAe,CAAC,MAAM;IAC5B,SAAS;;IACTU,+BAA+B,CAACG,GAAG,CAAC,CAAC;IAErC,MAAMC,KAAK,GAAGL,uBAAuB,CAACI,GAAG,CAAC,CAAC;IAC3C;IACA;IACA;IACA,MAAME,oBAAoB,GAAG,CAACD,KAAK,CAACE,OAAO,IAAI,CAACF,KAAK,CAACG,OAAO,CAACC,OAAO;IAErE,MAAM;MAAEC,iBAAiB;MAAEC;IAA8B,CAAC,GACzDhB,iBAAiB,CAAC;MACjBG,eAAe,EAAEA,eAAe,CAACM,GAAG,CAAC,CAAC;MACtCL,iBAAiB,EAAEA,iBAAiB,EAAEK,GAAG,CAAC,CAAC,IAAIX,SAAS;MACxDS,yBAAyB,EAAEA,yBAAyB,CAACE,GAAG,CAAC,CAAC;MAC1DE;IACD,CAAC,CAAC;IAEHJ,yBAAyB,CAACU,GAAG,CAACD,6BAA6B,CAAC;IAC5D,MAAME,uBAAuB,GAAGjB,uBAAuB,CAAC;MACvDc,iBAAiB;MACjBP,yBAAyB,EAAEA,yBAAyB,CAACC,GAAG,CAAC;IAC1D,CAAC,CAAC;IACFD,yBAAyB,CAACS,GAAG,CAACC,uBAAuB,CAAC;IAEtD,OAAOA,uBAAuB;EAC/B,CAAC,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -20,9 +20,9 @@ export const {
|
|
|
20
20
|
isFloatingOverlay
|
|
21
21
|
}) => {
|
|
22
22
|
const parentContext = useContext(ScreenStylesContext);
|
|
23
|
-
const
|
|
23
|
+
const rawStylesMaps = useInterpolatedStylesMap();
|
|
24
24
|
const stylesMap = useResolvedStylesMap({
|
|
25
|
-
|
|
25
|
+
localStylesMaps: rawStylesMaps,
|
|
26
26
|
ancestorStylesMap: parentContext?.stylesMap
|
|
27
27
|
});
|
|
28
28
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useContext","StyleSheet","Animated","createProvider","MaybeFloatingContainer","useInterpolatedStylesMap","useMaybeBlockVisibility","useResolvedStylesMap","jsx","_jsx","ScreenStylesProvider","ScreenStylesContext","useScreenStylesContext","useScreenStyles","guarded","children","isFloatingOverlay","parentContext","
|
|
1
|
+
{"version":3,"names":["useContext","StyleSheet","Animated","createProvider","MaybeFloatingContainer","useInterpolatedStylesMap","useMaybeBlockVisibility","useResolvedStylesMap","jsx","_jsx","ScreenStylesProvider","ScreenStylesContext","useScreenStylesContext","useScreenStyles","guarded","children","isFloatingOverlay","parentContext","rawStylesMaps","stylesMap","localStylesMaps","ancestorStylesMap","animatedStyle","animatedProps","value","View","style","styles","container","create","flex"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/styles/styles.provider.tsx"],"mappings":";;AAAA,SAAyBA,UAAU,QAAQ,OAAO;AAClD,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,MAA4B,yBAAyB;AAEpE,OAAOC,cAAc,MAAM,gCAAgC;AAC3D,SAASC,sBAAsB,QAAQ,uCAAuC;AAC9E,SAASC,wBAAwB,QAAQ,qCAAqC;AAC9E,SAASC,uBAAuB,QAAQ,oCAAoC;AAC5E,SAASC,oBAAoB,QAAQ,qCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAW3E,OAAO,MAAM;EACZC,oBAAoB;EACpBC,mBAAmB;EACnBC,sBAAsB,EAAEC;AACzB,CAAC,GAAGV,cAAc,CAAC,cAAc,EAAE;EAClCW,OAAO,EAAE;AACV,CAAC,CAAC,CAAkC,CAAC;EAAEC,QAAQ;EAAEC;AAAkB,CAAC,KAAK;EACxE,MAAMC,aAAa,GAAGjB,UAAU,CAACW,mBAAmB,CAAC;EAErD,MAAMO,aAAa,GAAGb,wBAAwB,CAAC,CAAC;EAEhD,MAAMc,SAAS,GAAGZ,oBAAoB,CAAC;IACtCa,eAAe,EAAEF,aAAa;IAC9BG,iBAAiB,EAAEJ,aAAa,EAAEE;EACnC,CAAC,CAAC;EAEF,MAAM;IAAEG,aAAa;IAAEC;EAAc,CAAC,GACrCjB,uBAAuB,CAACU,iBAAiB,CAAC;EAE3C,OAAO;IACNQ,KAAK,EAAE;MACNL;IACD,CAAC;IACDJ,QAAQ,eACPN,IAAA,CAACL,sBAAsB;MAACY,iBAAiB,EAAEA,iBAAkB;MAAAD,QAAA,eAC5DN,IAAA,CAACP,QAAQ,CAACuB,IAAI;QACbC,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAEN,aAAa,CAAE;QACzCC,aAAa,EAAEA,aAAc;QAAAR,QAAA,EAE5BA;MAAQ,CACK;IAAC,CACO;EAE1B,CAAC;AACF,CAAC,CAAC;AAEF,MAAMY,MAAM,GAAG1B,UAAU,CAAC4B,MAAM,CAAC;EAChCD,SAAS,EAAE;IAAEE,IAAI,EAAE;EAAE;AACtB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -66,7 +66,6 @@ function useDirectStackValue(props) {
|
|
|
66
66
|
};
|
|
67
67
|
}, [state.routes, state.preloadedRoutes, preloadedDescriptors, descriptors]);
|
|
68
68
|
const {
|
|
69
|
-
stackProgress,
|
|
70
69
|
optimisticFocusedIndex
|
|
71
70
|
} = useStackDerived(animationMaps);
|
|
72
71
|
const focusedIndex = state.index;
|
|
@@ -76,9 +75,8 @@ function useDirectStackValue(props) {
|
|
|
76
75
|
routeKeys,
|
|
77
76
|
routes: allRoutes,
|
|
78
77
|
scenes,
|
|
79
|
-
stackProgress,
|
|
80
78
|
optimisticFocusedIndex
|
|
81
|
-
}), [flags, navigatorKey, routeKeys, allRoutes, scenes,
|
|
79
|
+
}), [flags, navigatorKey, routeKeys, allRoutes, scenes, optimisticFocusedIndex]);
|
|
82
80
|
|
|
83
81
|
// DirectStack context value
|
|
84
82
|
const lifecycleValue = useMemo(() => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","StackContext","AnimationStore","isOverlayVisible","useStackCoreContext","useStackDerived","jsx","_jsx","useDirectStackValue","props","state","navigation","descriptors","describe","flags","navigatorKey","key","preloadedDescriptors","preloadedRoutes","reduce","acc","route","scenes","shouldShowFloatOverlay","routeKeys","allRoutes","animationMaps","routes","concat","allDescriptors","descriptor","isPreloaded","undefined","push","getBag","options","enableTransitions","
|
|
1
|
+
{"version":3,"names":["useMemo","StackContext","AnimationStore","isOverlayVisible","useStackCoreContext","useStackDerived","jsx","_jsx","useDirectStackValue","props","state","navigation","descriptors","describe","flags","navigatorKey","key","preloadedDescriptors","preloadedRoutes","reduce","acc","route","scenes","shouldShowFloatOverlay","routeKeys","allRoutes","animationMaps","routes","concat","allDescriptors","descriptor","isPreloaded","undefined","push","getBag","options","enableTransitions","optimisticFocusedIndex","focusedIndex","index","stackContextValue","lifecycleValue","withDirectStack","Component","DirectStackProvider","Provider","value","children"],"sourceRoot":"../../../../../src","sources":["shared/providers/stack/direct.provider.tsx"],"mappings":";;AACA,SAASA,OAAO,QAAQ,OAAO;AAE/B,SACCC,YAAY,QAEN,kCAAkC;AACzC,SACCC,cAAc,QAER,8BAA8B;AAMrC,SAASC,gBAAgB,QAA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C,UAAU;IACVC,WAAW;IACXU,MAAM;IACNgB,YAAY;IACZf;EACD,CAAC,CAAC,EACF,CACCb,KAAK,EACLC,UAAU,EACVC,WAAW,EACXU,MAAM,EACNgB,YAAY,EACZf,sBAAsB,CAExB,CAAC;EAED,OAAO;IAAE,GAAGkB,cAAc;IAAED;EAAkB,CAAC;AAChD;AAEA,SAASE,eAAeA,CACvBC,SAAuD,EACpC;EACnB,OAAO,SAASC,mBAAmBA,CAACnC,KAAa,EAAE;IAClD,MAAM;MAAE+B,iBAAiB;MAAE,GAAGC;IAAe,CAAC,GAAGjC,mBAAmB,CAACC,KAAK,CAAC;IAE3E,oBACCF,IAAA,CAACN,YAAY,CAAC4C,QAAQ;MAACC,KAAK,EAAEN,iBAAkB;MAAAO,QAAA,eAC/CxC,IAAA,CAACoC,SAAS;QAAA,GAAKF;MAAc,CAAG;IAAC,CACX,CAAC;EAE1B,CAAC;AACF;AAGA,SAASC,eAAe","ignoreList":[]}
|
|
@@ -2,19 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { useDerivedValue } from "react-native-reanimated";
|
|
4
4
|
/**
|
|
5
|
-
* Derives
|
|
6
|
-
*
|
|
5
|
+
* Derives an optimistic focused index from animation store maps.
|
|
6
|
+
* Shared between managed and direct providers.
|
|
7
7
|
*/
|
|
8
8
|
export function useStackDerived(animationMaps) {
|
|
9
|
-
const stackProgress = useDerivedValue(() => {
|
|
10
|
-
"worklet";
|
|
11
|
-
|
|
12
|
-
let total = 0;
|
|
13
|
-
for (let i = 0; i < animationMaps.length; i++) {
|
|
14
|
-
total += animationMaps[i].progress.get();
|
|
15
|
-
}
|
|
16
|
-
return total;
|
|
17
|
-
});
|
|
18
9
|
const optimisticFocusedIndex = useDerivedValue(() => {
|
|
19
10
|
"worklet";
|
|
20
11
|
|
|
@@ -26,7 +17,6 @@ export function useStackDerived(animationMaps) {
|
|
|
26
17
|
return lastIndex - closingFromTop;
|
|
27
18
|
});
|
|
28
19
|
return {
|
|
29
|
-
stackProgress,
|
|
30
20
|
optimisticFocusedIndex
|
|
31
21
|
};
|
|
32
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useDerivedValue","useStackDerived","animationMaps","
|
|
1
|
+
{"version":3,"names":["useDerivedValue","useStackDerived","animationMaps","optimisticFocusedIndex","lastIndex","length","closingFromTop","i","closing","get"],"sourceRoot":"../../../../../../src","sources":["shared/providers/stack/helpers/use-stack-derived.ts"],"mappings":";;AAAA,SAA4BA,eAAe,QAAQ,yBAAyB;AAc5E;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAC9BC,aAAyC,EAC1B;EACf,MAAMC,sBAAsB,GAAGH,eAAe,CAAC,MAAM;IACpD,SAAS;;IACT,MAAMI,SAAS,GAAGF,aAAa,CAACG,MAAM,GAAG,CAAC;IAC1C,IAAIC,cAAc,GAAG,CAAC;IACtB,KAAK,IAAIC,CAAC,GAAGH,SAAS,EAAEG,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;MACpC,IAAIL,aAAa,CAACK,CAAC,CAAC,CAACC,OAAO,CAACC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAEH,cAAc,EAAE,CAAC,KACpD;IACN;IACA,OAAOF,SAAS,GAAGE,cAAc;EAClC,CAAC,CAAC;EAEF,OAAO;IAAEH;EAAuB,CAAC;AAClC","ignoreList":[]}
|
|
@@ -30,7 +30,6 @@ function useManagedStackValue(props) {
|
|
|
30
30
|
const navigatorKey = props.state.key;
|
|
31
31
|
const processed = useProcessedRoutes(state.routes, state.descriptors);
|
|
32
32
|
const {
|
|
33
|
-
stackProgress,
|
|
34
33
|
optimisticFocusedIndex
|
|
35
34
|
} = useStackDerived(processed.animationMaps);
|
|
36
35
|
const closingRouteMap = useClosingRouteMap(processed.routeKeys, processed.animationMaps);
|
|
@@ -43,9 +42,8 @@ function useManagedStackValue(props) {
|
|
|
43
42
|
routeKeys: processed.routeKeys,
|
|
44
43
|
routes: state.routes,
|
|
45
44
|
scenes: processed.scenes,
|
|
46
|
-
stackProgress,
|
|
47
45
|
optimisticFocusedIndex
|
|
48
|
-
}), [flags, navigatorKey, processed.routeKeys, state.routes, processed.scenes,
|
|
46
|
+
}), [flags, navigatorKey, processed.routeKeys, state.routes, processed.scenes, optimisticFocusedIndex]);
|
|
49
47
|
|
|
50
48
|
// Managed-specific context (consumed by useManagedStackContext())
|
|
51
49
|
const managedContextValue = useMemo(() => ({
|