react-native-screen-transitions 3.4.0-alpha.6 → 3.4.0-alpha.7
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/README.md +136 -46
- package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js +27 -45
- package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/components/boundary-target.js +39 -0
- package/lib/commonjs/shared/components/create-boundary-component/components/boundary-target.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +232 -0
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +2 -4
- 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-boundary-measure-and-store.js +4 -3
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +2 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js +20 -214
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/providers/boundary-owner.provider.js +63 -0
- package/lib/commonjs/shared/components/create-boundary-component/providers/boundary-owner.provider.js.map +1 -0
- package/lib/commonjs/shared/components/create-transition-aware-component.js +29 -7
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +1 -1
- package/lib/commonjs/shared/components/screen-container/index.js +8 -12
- package/lib/commonjs/shared/components/screen-container/index.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +4 -4
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +4 -4
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +4 -4
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +4 -4
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.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/providers/screen/screen-composer.js +1 -1
- package/lib/commonjs/shared/providers/screen/screen-composer.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/build-resolved-style-map.js +144 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/build-resolved-style-map.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js +28 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/split-normalized-style-maps.js +39 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/split-normalized-style-maps.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/index.js +25 -0
- package/lib/commonjs/shared/providers/screen/styles/index.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/{styles.provider.js → styles/styles.provider.js} +47 -39
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js +21 -10
- package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/zoom/build.js +56 -30
- package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js +27 -45
- package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/module/component-stack/navigators/create-component-stack-navigator.js +1 -1
- package/lib/module/shared/components/create-boundary-component/components/boundary-target.js +34 -0
- package/lib/module/shared/components/create-boundary-component/components/boundary-target.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +227 -0
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +2 -4
- 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-boundary-measure-and-store.js +4 -3
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +2 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/index.js +16 -213
- package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/providers/boundary-owner.provider.js +56 -0
- package/lib/module/shared/components/create-boundary-component/providers/boundary-owner.provider.js.map +1 -0
- package/lib/module/shared/components/create-transition-aware-component.js +30 -8
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/float-overlay.js +1 -1
- package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/module/shared/components/screen-container/index.js +8 -12
- package/lib/module/shared/components/screen-container/index.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js +4 -4
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +4 -4
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +4 -4
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/surface-container.js +4 -4
- package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
- package/lib/module/shared/constants.js +2 -1
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/providers/screen/screen-composer.js +1 -1
- package/lib/module/shared/providers/screen/screen-composer.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/build-resolved-style-map.js +139 -0
- package/lib/module/shared/providers/screen/styles/helpers/build-resolved-style-map.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js +23 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/split-normalized-style-maps.js +34 -0
- package/lib/module/shared/providers/screen/styles/helpers/split-normalized-style-maps.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/index.js +4 -0
- package/lib/module/shared/providers/screen/styles/index.js.map +1 -0
- package/lib/module/shared/providers/screen/{styles.provider.js → styles/styles.provider.js} +48 -40
- package/lib/module/shared/providers/screen/styles/styles.provider.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js +2 -2
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/style-composers.js +21 -10
- package/lib/module/shared/utils/bounds/helpers/style-composers.js.map +1 -1
- package/lib/module/shared/utils/bounds/zoom/build.js +55 -28
- package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +9 -15
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/blank-stack/types.d.ts +6 -4
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +1 -1
- package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts +209 -0
- package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts +8 -0
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +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-boundary-measure-and-store.d.ts +2 -8
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts +216 -12
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/providers/boundary-owner.provider.d.ts +35 -0
- package/lib/typescript/shared/components/create-boundary-component/providers/boundary-owner.provider.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +1 -0
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +209 -2
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/build-resolved-style-map.d.ts +11 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/build-resolved-style-map.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.d.ts +7 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/split-normalized-style-maps.d.ts +6 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/split-normalized-style-maps.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/index.d.ts +2 -0
- package/lib/typescript/shared/providers/screen/styles/index.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/{styles.provider.d.ts → styles/styles.provider.d.ts} +3 -5
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts.map +1 -0
- package/lib/typescript/shared/types/animation.types.d.ts +3 -9
- 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 +2 -4
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts +1 -11
- package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/blank-stack/navigators/create-blank-stack-navigator.tsx +37 -80
- package/src/blank-stack/types.ts +7 -4
- package/src/component-stack/navigators/create-component-stack-navigator.tsx +1 -1
- package/src/shared/components/create-boundary-component/components/boundary-target.tsx +45 -0
- package/src/shared/components/create-boundary-component/create-boundary-component.tsx +282 -0
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +2 -7
- package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +6 -10
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.ts +3 -2
- package/src/shared/components/create-boundary-component/index.tsx +16 -252
- package/src/shared/components/create-boundary-component/providers/boundary-owner.provider.tsx +109 -0
- package/src/shared/components/create-transition-aware-component.tsx +33 -5
- package/src/shared/components/overlay/variations/float-overlay.tsx +1 -1
- package/src/shared/components/screen-container/index.tsx +10 -13
- package/src/shared/components/screen-container/layers/backdrop.tsx +4 -4
- package/src/shared/components/screen-container/layers/content.tsx +4 -4
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +6 -4
- package/src/shared/components/screen-container/layers/surface-container.tsx +4 -4
- package/src/shared/constants.ts +1 -0
- package/src/shared/index.ts +0 -1
- package/src/shared/providers/screen/screen-composer.tsx +1 -1
- package/src/shared/providers/screen/styles/helpers/build-resolved-style-map.ts +185 -0
- package/src/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.ts +31 -0
- package/src/shared/providers/screen/styles/helpers/split-normalized-style-maps.ts +44 -0
- package/src/shared/providers/screen/styles/index.tsx +5 -0
- package/src/shared/providers/screen/styles/styles.provider.tsx +173 -0
- package/src/shared/types/animation.types.ts +3 -10
- package/src/shared/types/index.ts +0 -1
- package/src/shared/types/screen.types.ts +2 -4
- package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +2 -1
- package/src/shared/utils/bounds/helpers/style-composers.ts +11 -0
- package/src/shared/utils/bounds/zoom/build.ts +85 -70
- package/lib/commonjs/shared/components/screen-container/deferred-visibility-host.js +0 -45
- package/lib/commonjs/shared/components/screen-container/deferred-visibility-host.js.map +0 -1
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js +0 -234
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/helpers/resolve-interpolated-style-output.js +0 -50
- package/lib/commonjs/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles.provider.js.map +0 -1
- package/lib/module/shared/components/screen-container/deferred-visibility-host.js +0 -40
- package/lib/module/shared/components/screen-container/deferred-visibility-host.js.map +0 -1
- package/lib/module/shared/hooks/animation/use-associated-style.js +0 -229
- package/lib/module/shared/hooks/animation/use-associated-style.js.map +0 -1
- package/lib/module/shared/providers/screen/helpers/resolve-interpolated-style-output.js +0 -44
- package/lib/module/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +0 -1
- package/lib/module/shared/providers/screen/styles.provider.js.map +0 -1
- package/lib/typescript/shared/components/screen-container/deferred-visibility-host.d.ts +0 -14
- package/lib/typescript/shared/components/screen-container/deferred-visibility-host.d.ts.map +0 -1
- package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts +0 -32
- package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/helpers/resolve-interpolated-style-output.d.ts +0 -14
- package/lib/typescript/shared/providers/screen/helpers/resolve-interpolated-style-output.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles.provider.d.ts.map +0 -1
- package/src/shared/components/screen-container/deferred-visibility-host.tsx +0 -44
- package/src/shared/hooks/animation/use-associated-style.ts +0 -297
- package/src/shared/providers/screen/helpers/resolve-interpolated-style-output.ts +0 -61
- package/src/shared/providers/screen/styles.provider.tsx +0 -164
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.buildResolvedStyleMap = void 0;
|
|
7
|
+
var _constants = require("../../../../constants");
|
|
8
|
+
const IDENTITY_TRANSFORM = [{
|
|
9
|
+
translateX: 0
|
|
10
|
+
}, {
|
|
11
|
+
translateY: 0
|
|
12
|
+
}, {
|
|
13
|
+
scaleX: 1
|
|
14
|
+
}, {
|
|
15
|
+
scaleY: 1
|
|
16
|
+
}];
|
|
17
|
+
const ALWAYS_RESET_STYLE_VALUES = {
|
|
18
|
+
zIndex: 0,
|
|
19
|
+
elevation: 0
|
|
20
|
+
};
|
|
21
|
+
const hasAnyKeys = record => {
|
|
22
|
+
"worklet";
|
|
23
|
+
|
|
24
|
+
for (const _key in record) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
};
|
|
29
|
+
const collectStyleKeyMeta = record => {
|
|
30
|
+
"worklet";
|
|
31
|
+
|
|
32
|
+
const keys = {};
|
|
33
|
+
let hasAny = false;
|
|
34
|
+
if (!record) {
|
|
35
|
+
return {
|
|
36
|
+
keys,
|
|
37
|
+
hasAny
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
for (const key in record) {
|
|
41
|
+
keys[key] = true;
|
|
42
|
+
hasAny = true;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
keys,
|
|
46
|
+
hasAny
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
const collectRelevantSlotIds = ({
|
|
50
|
+
currentStylesMap,
|
|
51
|
+
fallbackStylesMap,
|
|
52
|
+
previousStyleKeysBySlot
|
|
53
|
+
}) => {
|
|
54
|
+
"worklet";
|
|
55
|
+
|
|
56
|
+
const slotIds = {};
|
|
57
|
+
for (const slotId in currentStylesMap) {
|
|
58
|
+
slotIds[slotId] = true;
|
|
59
|
+
}
|
|
60
|
+
for (const slotId in fallbackStylesMap) {
|
|
61
|
+
slotIds[slotId] = true;
|
|
62
|
+
}
|
|
63
|
+
for (const slotId in previousStyleKeysBySlot) {
|
|
64
|
+
slotIds[slotId] = true;
|
|
65
|
+
}
|
|
66
|
+
return slotIds;
|
|
67
|
+
};
|
|
68
|
+
const buildUnsetPatch = ({
|
|
69
|
+
previousKeys,
|
|
70
|
+
currentKeys
|
|
71
|
+
}) => {
|
|
72
|
+
"worklet";
|
|
73
|
+
|
|
74
|
+
const unsetPatch = {};
|
|
75
|
+
for (const key in previousKeys) {
|
|
76
|
+
if (currentKeys[key]) continue;
|
|
77
|
+
if (key === "transform") {
|
|
78
|
+
unsetPatch.transform = IDENTITY_TRANSFORM;
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (key in ALWAYS_RESET_STYLE_VALUES) {
|
|
82
|
+
unsetPatch[key] = ALWAYS_RESET_STYLE_VALUES[key];
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
unsetPatch[key] = undefined;
|
|
86
|
+
}
|
|
87
|
+
return unsetPatch;
|
|
88
|
+
};
|
|
89
|
+
const buildResolvedStyleMap = ({
|
|
90
|
+
currentStylesMap,
|
|
91
|
+
fallbackStylesMap,
|
|
92
|
+
previousStyleKeysBySlot
|
|
93
|
+
}) => {
|
|
94
|
+
"worklet";
|
|
95
|
+
|
|
96
|
+
const resolvedStylesMap = {};
|
|
97
|
+
const nextPreviousStyleKeysBySlot = {};
|
|
98
|
+
const slotIds = collectRelevantSlotIds({
|
|
99
|
+
currentStylesMap,
|
|
100
|
+
fallbackStylesMap,
|
|
101
|
+
previousStyleKeysBySlot
|
|
102
|
+
});
|
|
103
|
+
for (const slotId in slotIds) {
|
|
104
|
+
const slot = currentStylesMap[slotId] ?? fallbackStylesMap[slotId];
|
|
105
|
+
const baseStyle = slot?.style;
|
|
106
|
+
const {
|
|
107
|
+
keys: currentKeys,
|
|
108
|
+
hasAny: hasCurrentStyleKeys
|
|
109
|
+
} = collectStyleKeyMeta(baseStyle);
|
|
110
|
+
const unsetPatch = buildUnsetPatch({
|
|
111
|
+
previousKeys: previousStyleKeysBySlot[slotId] ?? {},
|
|
112
|
+
currentKeys
|
|
113
|
+
});
|
|
114
|
+
const hasUnsetPatch = hasAnyKeys(unsetPatch);
|
|
115
|
+
const hasProps = slot?.props !== undefined;
|
|
116
|
+
if (!slot && !hasUnsetPatch) {
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
const resolvedStyle = hasCurrentStyleKeys || hasUnsetPatch ? {
|
|
120
|
+
...unsetPatch,
|
|
121
|
+
...(slot?.style ?? _constants.NO_STYLES)
|
|
122
|
+
} : undefined;
|
|
123
|
+
if (resolvedStyle === undefined && !hasProps) {
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
const resolvedSlot = {};
|
|
127
|
+
if (resolvedStyle !== undefined) {
|
|
128
|
+
resolvedSlot.style = resolvedStyle;
|
|
129
|
+
}
|
|
130
|
+
if (hasProps) {
|
|
131
|
+
resolvedSlot.props = slot?.props;
|
|
132
|
+
}
|
|
133
|
+
resolvedStylesMap[slotId] = resolvedSlot;
|
|
134
|
+
if (hasCurrentStyleKeys) {
|
|
135
|
+
nextPreviousStyleKeysBySlot[slotId] = currentKeys;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
resolvedStylesMap,
|
|
140
|
+
nextPreviousStyleKeysBySlot
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
exports.buildResolvedStyleMap = buildResolvedStyleMap;
|
|
144
|
+
//# sourceMappingURL=build-resolved-style-map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_constants","require","IDENTITY_TRANSFORM","translateX","translateY","scaleX","scaleY","ALWAYS_RESET_STYLE_VALUES","zIndex","elevation","hasAnyKeys","record","_key","collectStyleKeyMeta","keys","hasAny","key","collectRelevantSlotIds","currentStylesMap","fallbackStylesMap","previousStyleKeysBySlot","slotIds","slotId","buildUnsetPatch","previousKeys","currentKeys","unsetPatch","transform","undefined","buildResolvedStyleMap","resolvedStylesMap","nextPreviousStyleKeysBySlot","slot","baseStyle","style","hasCurrentStyleKeys","hasUnsetPatch","hasProps","props","resolvedStyle","NO_STYLES","resolvedSlot","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/styles/helpers/build-resolved-style-map.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAaA,MAAMC,kBAAkB,GAAG,CAC1B;EAAEC,UAAU,EAAE;AAAE,CAAC,EACjB;EAAEC,UAAU,EAAE;AAAE,CAAC,EACjB;EAAEC,MAAM,EAAE;AAAE,CAAC,EACb;EAAEC,MAAM,EAAE;AAAE,CAAC,CACJ;AAEV,MAAMC,yBAAyB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AAa,GACjC;MACA,GAAGV,UAAU;MACb,IAAIM,IAAI,EAAEE,KAAK,IAAIM,oBAAS;IAC7B,CAAC,GACAZ,SAAS;IAEb,IAAIW,aAAa,KAAKX,SAAS,IAAI,CAACS,QAAQ,EAAE;MAC7C;IACD;IAEA,MAAMI,YAAY,GAAG,CAAC,CAAkC;IAExD,IAAIF,aAAa,KAAKX,SAAS,EAAE;MAChCa,YAAY,CAACP,KAAK,GAAGK,aAAa;IACnC;IAEA,IAAIF,QAAQ,EAAE;MACbI,YAAY,CAACH,KAAK,GAAGN,IAAI,EAAEM,KAAK;IACjC;IAEAR,iBAAiB,CAACR,MAAM,CAAC,GAAGmB,YAAY;IAExC,IAAIN,mBAAmB,EAAE;MACxBJ,2BAA2B,CAACT,MAAM,CAAC,GAAGG,WAAW;IAClD;EACD;EAEA,OAAO;IACNK,iBAAiB;IACjBC;EACD,CAAC;AACF,CAAC;AAACW,OAAA,CAAAb,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.resolveInterpolatedStyleOutput = void 0;
|
|
7
|
+
var _constants = require("../../../../constants");
|
|
8
|
+
var _normalizeInterpolatedStyle = require("../../../../utils/normalize-interpolated-style");
|
|
9
|
+
const resolveInterpolatedStyleOutput = raw => {
|
|
10
|
+
"worklet";
|
|
11
|
+
|
|
12
|
+
if (raw == null || typeof raw !== "object") {
|
|
13
|
+
return {
|
|
14
|
+
stylesMap: _constants.NO_STYLES,
|
|
15
|
+
wasLegacy: false
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
const {
|
|
19
|
+
result,
|
|
20
|
+
wasLegacy
|
|
21
|
+
} = (0, _normalizeInterpolatedStyle.normalizeInterpolatedStyle)(raw);
|
|
22
|
+
return {
|
|
23
|
+
stylesMap: result,
|
|
24
|
+
wasLegacy
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
exports.resolveInterpolatedStyleOutput = resolveInterpolatedStyleOutput;
|
|
28
|
+
//# sourceMappingURL=resolve-interpolated-style-output.js.map
|
package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_constants","require","_normalizeInterpolatedStyle","resolveInterpolatedStyleOutput","raw","stylesMap","NO_STYLES","wasLegacy","result","normalizeInterpolatedStyle","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/styles/helpers/resolve-interpolated-style-output.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAKA,IAAAC,2BAAA,GAAAD,OAAA;AAOO,MAAME,8BAA8B,GAC1CC,GAAmD,IACd;EACrC,SAAS;;EAET,IAAIA,GAAG,IAAI,IAAI,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;IAC3C,OAAO;MACNC,SAAS,EAAEC,oBAAS;MACpBC,SAAS,EAAE;IACZ,CAAC;EACF;EAEA,MAAM;IAAEC,MAAM;IAAED;EAAU,CAAC,GAAG,IAAAE,sDAA0B,EAACL,GAAG,CAAC;EAE7D,OAAO;IACNC,SAAS,EAAEG,MAAM;IACjBD;EACD,CAAC;AACF,CAAC;AAACG,OAAA,CAAAP,8BAAA,GAAAA,8BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.splitNormalizedStyleMaps = void 0;
|
|
7
|
+
var _constants = require("../../../../constants");
|
|
8
|
+
const LAYER_STYLE_SLOT_IDS = {
|
|
9
|
+
content: true,
|
|
10
|
+
backdrop: true,
|
|
11
|
+
surface: true,
|
|
12
|
+
[_constants.NAVIGATION_MASK_ELEMENT_STYLE_ID]: true,
|
|
13
|
+
[_constants.NAVIGATION_MASK_CONTAINER_STYLE_ID]: true
|
|
14
|
+
};
|
|
15
|
+
const isLayerStyleSlotId = slotId => {
|
|
16
|
+
"worklet";
|
|
17
|
+
|
|
18
|
+
// biome-ignore lint/suspicious/noPrototypeBuiltins: <Typescript lib target is ES2020>
|
|
19
|
+
return Object.prototype.hasOwnProperty.call(LAYER_STYLE_SLOT_IDS, slotId);
|
|
20
|
+
};
|
|
21
|
+
const splitNormalizedStyleMaps = stylesMap => {
|
|
22
|
+
"worklet";
|
|
23
|
+
|
|
24
|
+
const layerStylesMap = {};
|
|
25
|
+
const elementStylesMap = {};
|
|
26
|
+
for (const slotId in stylesMap) {
|
|
27
|
+
if (isLayerStyleSlotId(slotId)) {
|
|
28
|
+
layerStylesMap[slotId] = stylesMap[slotId];
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
elementStylesMap[slotId] = stylesMap[slotId];
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
layerStylesMap,
|
|
35
|
+
elementStylesMap
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
exports.splitNormalizedStyleMaps = splitNormalizedStyleMaps;
|
|
39
|
+
//# sourceMappingURL=split-normalized-style-maps.js.map
|
package/lib/commonjs/shared/providers/screen/styles/helpers/split-normalized-style-maps.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_constants","require","LAYER_STYLE_SLOT_IDS","content","backdrop","surface","NAVIGATION_MASK_ELEMENT_STYLE_ID","NAVIGATION_MASK_CONTAINER_STYLE_ID","isLayerStyleSlotId","slotId","Object","prototype","hasOwnProperty","call","splitNormalizedStyleMaps","stylesMap","layerStylesMap","elementStylesMap","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/styles/helpers/split-normalized-style-maps.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAMA,MAAMC,oBAAoB,GAAG;EAC5BC,OAAO,EAAE,IAAI;EACbC,QAAQ,EAAE,IAAI;EACdC,OAAO,EAAE,IAAI;EACb,CAACC,2CAAgC,GAAG,IAAI;EACxC,CAACC,6CAAkC,GAAG;AACvC,CAAU;AAEV,MAAMC,kBAAkB,GAAIC,MAAc,IAAK;EAC9C,SAAS;;EACT;EACA,OAAOC,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACX,oBAAoB,EAAEO,MAAM,CAAC;AAC1E,CAAC;AAEM,MAAMK,wBAAwB,GACpCC,SAAgD,IAI5C;EACJ,SAAS;;EACT,MAAMC,cAAqD,GAAG,CAAC,CAAC;EAChE,MAAMC,gBAAuD,GAAG,CAAC,CAAC;EAElE,KAAK,MAAMR,MAAM,IAAIM,SAAS,EAAE;IAC/B,IAAIP,kBAAkB,CAACC,MAAM,CAAC,EAAE;MAC/BO,cAAc,CAACP,MAAM,CAAC,GAAGM,SAAS,CAACN,MAAM,CAAC;MAC1C;IACD;IAEAQ,gBAAgB,CAACR,MAAM,CAAC,GAAGM,SAAS,CAACN,MAAM,CAAC;EAC7C;EAEA,OAAO;IACNO,cAAc;IACdC;EACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAAJ,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ScreenStylesContext", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _styles.ScreenStylesContext;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ScreenStylesProvider", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _styles.ScreenStylesProvider;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "useScreenStyles", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _styles.useScreenStyles;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var _styles = require("./styles.provider");
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_styles","require"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/styles/index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA","ignoreList":[]}
|
package/lib/commonjs/shared/providers/screen/{styles.provider.js → styles/styles.provider.js}
RENAMED
|
@@ -6,11 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useScreenStyles = exports.ScreenStylesProvider = exports.ScreenStylesContext = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
-
var _constants = require("
|
|
10
|
-
var _createProvider = _interopRequireDefault(require("
|
|
11
|
-
var _logger = require("
|
|
12
|
-
var _animation = require("
|
|
9
|
+
var _constants = require("../../../constants");
|
|
10
|
+
var _createProvider = _interopRequireDefault(require("../../../utils/create-provider"));
|
|
11
|
+
var _logger = require("../../../utils/logger");
|
|
12
|
+
var _animation = require("../animation");
|
|
13
|
+
var _buildResolvedStyleMap = require("./helpers/build-resolved-style-map");
|
|
13
14
|
var _resolveInterpolatedStyleOutput = require("./helpers/resolve-interpolated-style-output");
|
|
15
|
+
var _splitNormalizedStyleMaps = require("./helpers/split-normalized-style-maps");
|
|
14
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
17
|
const {
|
|
16
18
|
ScreenStylesProvider,
|
|
@@ -21,21 +23,18 @@ const {
|
|
|
21
23
|
})(({
|
|
22
24
|
children
|
|
23
25
|
}) => {
|
|
24
|
-
const
|
|
26
|
+
const parentContext = (0, _react.useContext)(ScreenStylesContext);
|
|
25
27
|
const {
|
|
26
28
|
screenInterpolatorProps,
|
|
27
29
|
nextInterpolator,
|
|
28
30
|
currentInterpolator,
|
|
29
31
|
boundsAccessor
|
|
30
32
|
} = (0, _animation.useScreenAnimationContext)();
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Tracks when user starts a gesture while another screen is still closing.
|
|
34
|
-
* This persists until both the gesture ends AND the closing animation completes.
|
|
35
|
-
*/
|
|
36
33
|
const isGesturingDuringCloseAnimation = (0, _reactNativeReanimated.useSharedValue)(false);
|
|
37
34
|
const hasWarnedLegacy = (0, _reactNativeReanimated.useSharedValue)(false);
|
|
38
|
-
const
|
|
35
|
+
const previousLayerStyleKeysBySlot = (0, _reactNativeReanimated.useSharedValue)({});
|
|
36
|
+
const previousElementStyleKeysBySlot = (0, _reactNativeReanimated.useSharedValue)({});
|
|
37
|
+
const rawStyleResolution = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
39
38
|
"worklet";
|
|
40
39
|
|
|
41
40
|
const props = screenInterpolatorProps.value;
|
|
@@ -53,19 +52,13 @@ const {
|
|
|
53
52
|
isGesturingDuringCloseAnimation.value = false;
|
|
54
53
|
}
|
|
55
54
|
const isInGestureMode = isDragging || isGesturingDuringCloseAnimation.value;
|
|
56
|
-
|
|
57
|
-
// Select interpolator
|
|
58
|
-
// - If in gesture mode, use current screen's interpolator since we're driving
|
|
59
|
-
// the animation from this screen (dragging back to dismiss next).
|
|
60
55
|
const interpolator = isInGestureMode ? currentInterpolator : nextInterpolator ?? currentInterpolator;
|
|
61
56
|
if (!interpolator) {
|
|
62
|
-
return
|
|
57
|
+
return {
|
|
58
|
+
layerStylesMap: _constants.NO_STYLES,
|
|
59
|
+
elementStylesMap: _constants.NO_STYLES
|
|
60
|
+
};
|
|
63
61
|
}
|
|
64
|
-
|
|
65
|
-
// Build effective props with corrected progress
|
|
66
|
-
// - Gesture mode: use current.progress only (avoids jumps during drag)
|
|
67
|
-
// - Normal: use derived progress as-is
|
|
68
|
-
|
|
69
62
|
let effectiveProgress = progress;
|
|
70
63
|
let effectiveNext = next;
|
|
71
64
|
if (isInGestureMode) {
|
|
@@ -81,49 +74,64 @@ const {
|
|
|
81
74
|
});
|
|
82
75
|
const {
|
|
83
76
|
stylesMap,
|
|
84
|
-
resolutionMode,
|
|
85
77
|
wasLegacy
|
|
86
78
|
} = (0, _resolveInterpolatedStyleOutput.resolveInterpolatedStyleOutput)(raw);
|
|
79
|
+
const {
|
|
80
|
+
layerStylesMap,
|
|
81
|
+
elementStylesMap
|
|
82
|
+
} = (0, _splitNormalizedStyleMaps.splitNormalizedStyleMaps)(stylesMap);
|
|
87
83
|
if (__DEV__ && wasLegacy && !hasWarnedLegacy.value) {
|
|
88
84
|
hasWarnedLegacy.value = true;
|
|
89
85
|
_logger.logger.warn("Flat interpolator return shape (contentStyle/backdropStyle) is deprecated. " + "Use the nested format instead: { content: { style }, backdrop: { style } }.");
|
|
90
86
|
}
|
|
91
87
|
return {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
resolutionMode,
|
|
95
|
-
isSettled: current.settled === 1
|
|
96
|
-
})
|
|
88
|
+
layerStylesMap,
|
|
89
|
+
elementStylesMap
|
|
97
90
|
};
|
|
98
91
|
} catch (err) {
|
|
99
92
|
if (__DEV__) {
|
|
100
93
|
console.warn("[react-native-screen-transitions] screenStyleInterpolator must be a worklet", err);
|
|
101
94
|
}
|
|
102
95
|
return {
|
|
103
|
-
|
|
104
|
-
|
|
96
|
+
layerStylesMap: _constants.NO_STYLES,
|
|
97
|
+
elementStylesMap: _constants.NO_STYLES
|
|
105
98
|
};
|
|
106
99
|
}
|
|
107
100
|
});
|
|
108
|
-
const
|
|
101
|
+
const layerStylesMap = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
109
102
|
"worklet";
|
|
110
103
|
|
|
111
|
-
|
|
104
|
+
const {
|
|
105
|
+
resolvedStylesMap,
|
|
106
|
+
nextPreviousStyleKeysBySlot
|
|
107
|
+
} = (0, _buildResolvedStyleMap.buildResolvedStyleMap)({
|
|
108
|
+
currentStylesMap: rawStyleResolution.value.layerStylesMap,
|
|
109
|
+
fallbackStylesMap: _constants.NO_STYLES,
|
|
110
|
+
previousStyleKeysBySlot: previousLayerStyleKeysBySlot.value
|
|
111
|
+
});
|
|
112
|
+
previousLayerStyleKeysBySlot.value = nextPreviousStyleKeysBySlot;
|
|
113
|
+
return resolvedStylesMap;
|
|
112
114
|
});
|
|
113
|
-
const
|
|
115
|
+
const elementStylesMap = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
114
116
|
"worklet";
|
|
115
117
|
|
|
116
|
-
|
|
118
|
+
const {
|
|
119
|
+
resolvedStylesMap,
|
|
120
|
+
nextPreviousStyleKeysBySlot
|
|
121
|
+
} = (0, _buildResolvedStyleMap.buildResolvedStyleMap)({
|
|
122
|
+
currentStylesMap: rawStyleResolution.value.elementStylesMap,
|
|
123
|
+
fallbackStylesMap: parentContext?.elementStylesMap.value ?? _constants.NO_STYLES,
|
|
124
|
+
previousStyleKeysBySlot: previousElementStyleKeysBySlot.value
|
|
125
|
+
});
|
|
126
|
+
previousElementStyleKeysBySlot.value = nextPreviousStyleKeysBySlot;
|
|
127
|
+
return resolvedStylesMap;
|
|
117
128
|
});
|
|
118
129
|
const value = (0, _react.useMemo)(() => {
|
|
119
|
-
// Build ancestor chain: [parent, grandparent, great-grandparent, ...]
|
|
120
|
-
const ancestorStylesMaps = parentCtx ? [parentCtx.stylesMap, ...parentCtx.ancestorStylesMaps] : [];
|
|
121
130
|
return {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
resolutionMode
|
|
131
|
+
layerStylesMap,
|
|
132
|
+
elementStylesMap
|
|
125
133
|
};
|
|
126
|
-
}, [
|
|
134
|
+
}, [elementStylesMap, layerStylesMap]);
|
|
127
135
|
return {
|
|
128
136
|
value,
|
|
129
137
|
children
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_constants","_createProvider","_interopRequireDefault","_logger","_animation","_buildResolvedStyleMap","_resolveInterpolatedStyleOutput","_splitNormalizedStyleMaps","e","__esModule","default","ScreenStylesProvider","ScreenStylesContext","useScreenStylesContext","useScreenStyles","createProvider","guarded","children","parentContext","useContext","screenInterpolatorProps","nextInterpolator","currentInterpolator","boundsAccessor","useScreenAnimationContext","isGesturingDuringCloseAnimation","useSharedValue","hasWarnedLegacy","previousLayerStyleKeysBySlot","previousElementStyleKeysBySlot","rawStyleResolution","useDerivedValue","props","value","current","next","progress","isDragging","gesture","dragging","isNextClosing","closing","isInGestureMode","interpolator","layerStylesMap","NO_STYLES","elementStylesMap","effectiveProgress","effectiveNext","undefined","raw","bounds","stylesMap","wasLegacy","resolveInterpolatedStyleOutput","splitNormalizedStyleMaps","__DEV__","logger","warn","err","console","resolvedStylesMap","nextPreviousStyleKeysBySlot","buildResolvedStyleMap","currentStylesMap","fallbackStylesMap","previousStyleKeysBySlot","useMemo","exports"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/styles/styles.provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,sBAAA,GAAAP,OAAA;AAIA,IAAAQ,+BAAA,GAAAR,OAAA;AACA,IAAAS,yBAAA,GAAAT,OAAA;AAAiF,SAAAI,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAW1E,MAAM;EACZG,oBAAoB;EACpBC,mBAAmB;EACnBC,sBAAsB,EAAEC;AACzB,CAAC,GAAG,IAAAC,uBAAc,EAAC,cAAc,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AC,CAAC;IAEHL,4BAA4B,CAACK,KAAK,GAAG6B,2BAA2B;IAChE,OAAOD,iBAAiB;EACzB,CAAC,CAAC;EAEH,MAAMf,gBAAgB,GACrB,IAAAf,sCAAe,EAAwC,MAAM;IAC5D,SAAS;;IACT,MAAM;MAAE8B,iBAAiB;MAAEC;IAA4B,CAAC,GACvD,IAAAC,4CAAqB,EAAC;MACrBC,gBAAgB,EAAElC,kBAAkB,CAACG,KAAK,CAACa,gBAAgB;MAC3DmB,iBAAiB,EAChB/C,aAAa,EAAE4B,gBAAgB,CAACb,KAAK,IAAIY,oBAAS;MACnDqB,uBAAuB,EAAErC,8BAA8B,CAACI;IACzD,CAAC,CAAC;IAEHJ,8BAA8B,CAACI,KAAK,GAAG6B,2BAA2B;IAElE,OAAOD,iBAAiB;EACzB,CAAC,CAAC;EAEH,MAAM5B,KAAK,GAAG,IAAAkC,cAAO,EAA2B,MAAM;IACrD,OAAO;MACNvB,cAAc;MACdE;IACD,CAAC;EACF,CAAC,EAAE,CAACA,gBAAgB,EAAEF,cAAc,CAAC,CAAC;EAEtC,OAAO;IAAEX,KAAK;IAAEhB;EAAS,CAAC;AAC3B,CACD,CAAC;AAACmD,OAAA,CAAAtD,eAAA,GAAAA,eAAA;AAAAsD,OAAA,CAAAxD,mBAAA,GAAAA,mBAAA;AAAAwD,OAAA,CAAAzD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","_bounds","_geometry","_styleComposers","resolveBounds","params","entering","next","fullscreen","FULLSCREEN_DIMENSIONS","dimensions","isFullscreenTarget","computeOptions","target","hasCustomTarget","hasTargetOverride","currentScreenKey","current","route","key","previousScreenKey","previous","nextScreenKey","resolvedPair","BoundStore","resolveTransitionPair","String","id","sourceBounds","destinationBounds","start","end","sourceScreenKey","destinationScreenKey","usedSnapshotDestination","customTarget","computeBoundStyles","progress","raw","EMPTY_BOUND_HELPER_RESULT_RAW","HIDDEN_STYLE","ranges","ENTER_RANGE","EXIT_RANGE","method","ignoresSnapshotDestinationOwnership","currentOwnsSource","contentStart","contentEnd","geometry","computeContentTransformGeometry","anchor","scaleMode","composeContentStyle","computeRelativeGeometry","common","isSize","isAbsolute","space","composeSizeAbsolute","composeSizeRelative","composeTransformAbsolute","composeTransformRelative","exports"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/helpers/compute-bounds-styles.ts"],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_constants","require","_bounds","_geometry","_styleComposers","resolveBounds","params","entering","next","fullscreen","FULLSCREEN_DIMENSIONS","dimensions","isFullscreenTarget","computeOptions","target","hasCustomTarget","hasTargetOverride","currentScreenKey","current","route","key","previousScreenKey","previous","nextScreenKey","resolvedPair","BoundStore","resolveTransitionPair","String","id","sourceBounds","destinationBounds","start","end","sourceScreenKey","destinationScreenKey","usedSnapshotDestination","customTarget","computeBoundStyles","progress","raw","EMPTY_BOUND_HELPER_RESULT_RAW","NO_STYLES","HIDDEN_STYLE","ranges","ENTER_RANGE","EXIT_RANGE","method","ignoresSnapshotDestinationOwnership","currentOwnsSource","contentStart","contentEnd","geometry","computeContentTransformGeometry","anchor","scaleMode","composeContentStyle","computeRelativeGeometry","common","isSize","isAbsolute","space","composeSizeAbsolute","composeSizeRelative","composeTransformAbsolute","composeTransformRelative","exports"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/helpers/compute-bounds-styles.ts"],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAQA,IAAAC,OAAA,GAAAD,OAAA;AAWA,IAAAE,SAAA,GAAAF,OAAA;AAIA,IAAAG,eAAA,GAAAH,OAAA;AASA,MAAMI,aAAa,GAAIC,MAStB,IAAK;EACL,SAAS;;EAET,MAAMC,QAAQ,GAAG,CAACD,MAAM,CAACE,IAAI;EAC7B,MAAMC,UAAU,GAAG,IAAAC,gCAAqB,EAACJ,MAAM,CAACK,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GAAG7C,cAAc,CAACiC,MAAM,KAAK,MAAM;EAC/C,MAAMa,UAAU,GAAG9C,cAAc,CAAC+C,KAAK,KAAK,UAAU;EAEtD,OAAOF,MAAM,GACVC,UAAU,GACT,IAAAE,mCAAmB,EAACJ,MAAM,CAAC,GAC3B,IAAAK,mCAAmB,EAACL,MAAM,CAAC,GAC5BE,UAAU,GACT,IAAAI,wCAAwB,EAACN,MAAM,CAAC,GAChC,IAAAO,wCAAwB,EAACP,MAAM,CAAC;AACrC,CAAC;AAACQ,OAAA,CAAA5B,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -8,6 +8,7 @@ exports.composeSizeAbsolute = composeSizeAbsolute;
|
|
|
8
8
|
exports.composeSizeRelative = composeSizeRelative;
|
|
9
9
|
exports.composeTransformAbsolute = composeTransformAbsolute;
|
|
10
10
|
exports.composeTransformRelative = composeTransformRelative;
|
|
11
|
+
var _constants = require("../../../constants");
|
|
11
12
|
var _interpolate = require("./interpolate");
|
|
12
13
|
/**
|
|
13
14
|
* Element-level (relative) params shared by size/transform composers.
|
|
@@ -165,7 +166,8 @@ function composeSizeAbsolute(params) {
|
|
|
165
166
|
width,
|
|
166
167
|
height,
|
|
167
168
|
translateX,
|
|
168
|
-
translateY
|
|
169
|
+
translateY,
|
|
170
|
+
..._constants.VISIBLE_STYLE
|
|
169
171
|
};
|
|
170
172
|
}
|
|
171
173
|
return {
|
|
@@ -175,7 +177,8 @@ function composeSizeAbsolute(params) {
|
|
|
175
177
|
translateX
|
|
176
178
|
}, {
|
|
177
179
|
translateY
|
|
178
|
-
}]
|
|
180
|
+
}],
|
|
181
|
+
..._constants.VISIBLE_STYLE
|
|
179
182
|
};
|
|
180
183
|
}
|
|
181
184
|
function composeSizeRelative(params) {
|
|
@@ -210,7 +213,8 @@ function composeSizeRelative(params) {
|
|
|
210
213
|
translateX,
|
|
211
214
|
translateY,
|
|
212
215
|
width,
|
|
213
|
-
height
|
|
216
|
+
height,
|
|
217
|
+
..._constants.VISIBLE_STYLE
|
|
214
218
|
};
|
|
215
219
|
}
|
|
216
220
|
return {
|
|
@@ -220,7 +224,8 @@ function composeSizeRelative(params) {
|
|
|
220
224
|
translateY
|
|
221
225
|
}],
|
|
222
226
|
width,
|
|
223
|
-
height
|
|
227
|
+
height,
|
|
228
|
+
..._constants.VISIBLE_STYLE
|
|
224
229
|
};
|
|
225
230
|
}
|
|
226
231
|
function composeTransformAbsolute(params) {
|
|
@@ -243,7 +248,8 @@ function composeTransformAbsolute(params) {
|
|
|
243
248
|
translateX,
|
|
244
249
|
translateY,
|
|
245
250
|
scaleX,
|
|
246
|
-
scaleY
|
|
251
|
+
scaleY,
|
|
252
|
+
..._constants.VISIBLE_STYLE
|
|
247
253
|
};
|
|
248
254
|
}
|
|
249
255
|
return {
|
|
@@ -255,7 +261,8 @@ function composeTransformAbsolute(params) {
|
|
|
255
261
|
scaleX
|
|
256
262
|
}, {
|
|
257
263
|
scaleY
|
|
258
|
-
}]
|
|
264
|
+
}],
|
|
265
|
+
..._constants.VISIBLE_STYLE
|
|
259
266
|
};
|
|
260
267
|
}
|
|
261
268
|
function composeTransformRelative(params) {
|
|
@@ -276,7 +283,8 @@ function composeTransformRelative(params) {
|
|
|
276
283
|
translateX,
|
|
277
284
|
translateY,
|
|
278
285
|
scaleX,
|
|
279
|
-
scaleY
|
|
286
|
+
scaleY,
|
|
287
|
+
..._constants.VISIBLE_STYLE
|
|
280
288
|
};
|
|
281
289
|
}
|
|
282
290
|
return {
|
|
@@ -292,7 +300,8 @@ function composeTransformRelative(params) {
|
|
|
292
300
|
scaleX
|
|
293
301
|
}, {
|
|
294
302
|
scaleY
|
|
295
|
-
}]
|
|
303
|
+
}],
|
|
304
|
+
..._constants.VISIBLE_STYLE
|
|
296
305
|
};
|
|
297
306
|
}
|
|
298
307
|
function composeContentStyle(params) {
|
|
@@ -319,7 +328,8 @@ function composeContentStyle(params) {
|
|
|
319
328
|
return {
|
|
320
329
|
translateX,
|
|
321
330
|
translateY,
|
|
322
|
-
scale
|
|
331
|
+
scale,
|
|
332
|
+
..._constants.VISIBLE_STYLE
|
|
323
333
|
};
|
|
324
334
|
}
|
|
325
335
|
return {
|
|
@@ -329,7 +339,8 @@ function composeContentStyle(params) {
|
|
|
329
339
|
translateY
|
|
330
340
|
}, {
|
|
331
341
|
scale
|
|
332
|
-
}]
|
|
342
|
+
}],
|
|
343
|
+
..._constants.VISIBLE_STYLE
|
|
333
344
|
};
|
|
334
345
|
}
|
|
335
346
|
//# sourceMappingURL=style-composers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_constants","require","_interpolate","getAnchorPoint","bounds","anchor","pageX","pageY","width","height","x","y","getAnchorOffset","composeSizeAbsolute","params","start","end","progress","ranges","computeOptions","startAnchor","endAnchor","interpolateClamped","anchorX","anchorY","anchorOffset","translateX","translateY","raw","VISIBLE_STYLE","transform","composeSizeRelative","geometry","baseX","entering","baseY","composeTransformAbsolute","scaleX","scaleY","composeTransformRelative","dx","dy","gestures","composeContentStyle","s","tx","ty","scale"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/helpers/style-composers.ts"],"mappings":";;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,MAAME,cAAc,GAAGA,CACtBC,MAA0B,EAC1BC,MAAoB,GAAG,QAAQ,KACD;EAC9B,SAAS;;EAET,MAAM;IAAEC,KAAK;IAAEC,KAAK;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAAGL,MAAM;EAE9C,QAAQC,MAAM;IACb,KAAK,YAAY;MAChB,OAAO;QAAEK,CAAC,EAAEJ,KAAK;QAAEK,CAAC,EAAEJ;MAAM,CAAC;IAC9B,KAAK,KAAK;MACT,OAAO;QAAEG,CAAC,EAAEJ,KAAK,GAAGE,KAA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