@flemo/core 1.8.0 → 1.9.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/dist/core/__tests__/taskManagerBranches.test.d.ts +1 -0
- package/dist/core/engine/__tests__/createSwipeController.gestures.test.d.ts +1 -0
- package/dist/core/engine/__tests__/createTransitionEngine.branches.test.d.ts +1 -0
- package/dist/history/__tests__/historyDriverBranches.test.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +149 -136
- package/dist/navigate/createStepController.d.ts +1 -0
- package/dist/transition/__tests__/coverageBranches.test.d.ts +6 -0
- package/dist/transition/__tests__/presetSwipeCallbacks.test.d.ts +1 -0
- package/dist/transition/resolveTransition.d.ts +2 -0
- package/dist/utils/__tests__/findScrollableEvent.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { default as createMemoryHistoryDriver } from './history/memoryHistoryDri
|
|
|
8
8
|
export { default as createNavigateStore, type NavigateStatus, type NavigateStore, type NavigateStoreApi } from './navigate/store';
|
|
9
9
|
export { markSelfInducedPop, consumeSelfInducedPop, createSelfPopGuard, type SelfPopGuard } from './navigate/selfPopGuard';
|
|
10
10
|
export { default as createNavigationController, type NavigationControllerDeps, type DistanceOptions, type NavigateOptions, type PopOptions } from './navigate/createNavigationController';
|
|
11
|
-
export { default as createStepController, readStepParams, appendParamsQuery, type StepControllerDeps } from './navigate/createStepController';
|
|
11
|
+
export { default as createStepController, readStepParams, appendParamsQuery, subscribeStepParamsRestore, type StepControllerDeps } from './navigate/createStepController';
|
|
12
12
|
export { default as createRouterScope, type FlemoStores, type CreateRouterScopeInput } from './core/createRouterScope';
|
|
13
13
|
export { default as createScreenStore, type ScreenStore, type ScreenStoreApi, type SharedBarPresence } from './screen/store';
|
|
14
14
|
export { default as createScreenSelector, type ScreenSelection } from './screen/createScreenSelector';
|
|
@@ -16,6 +16,7 @@ export { default as computeScreenFreeze, type ScreenFreezeInput } from './screen
|
|
|
16
16
|
export { default as createTransition } from './transition/createTransition';
|
|
17
17
|
export { default as createRawTransition } from './transition/createRawTransition';
|
|
18
18
|
export { transitionMap } from './transition/transition';
|
|
19
|
+
export { default as resolveTransition } from './transition/resolveTransition';
|
|
19
20
|
export { default as createTransitionStore, type TransitionStore, type TransitionStoreApi } from './transition/store';
|
|
20
21
|
export { default as createDecorator } from './transition/decorator/createDecorator';
|
|
21
22
|
export { default as createRawDecorator } from './transition/decorator/createRawDecorator';
|
package/dist/index.mjs
CHANGED
|
@@ -633,9 +633,17 @@ function ne(e) {
|
|
|
633
633
|
}
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
|
+
function re(e, t) {
|
|
637
|
+
return e.subscribe((e) => {
|
|
638
|
+
let n = e.state;
|
|
639
|
+
n?.step && a.addTask(async () => {
|
|
640
|
+
t(n.params ?? {});
|
|
641
|
+
});
|
|
642
|
+
});
|
|
643
|
+
}
|
|
636
644
|
//#endregion
|
|
637
645
|
//#region src/transition/store.ts
|
|
638
|
-
function
|
|
646
|
+
function ie(t = "cupertino") {
|
|
639
647
|
return e((e) => ({
|
|
640
648
|
defaultTransitionName: t,
|
|
641
649
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -643,7 +651,7 @@ function re(t = "cupertino") {
|
|
|
643
651
|
}
|
|
644
652
|
//#endregion
|
|
645
653
|
//#region src/screen/store.ts
|
|
646
|
-
function
|
|
654
|
+
function ae() {
|
|
647
655
|
return e((e) => ({
|
|
648
656
|
dragStatus: "IDLE",
|
|
649
657
|
replaceTransitionStatus: "IDLE",
|
|
@@ -662,11 +670,11 @@ function T() {
|
|
|
662
670
|
}
|
|
663
671
|
//#endregion
|
|
664
672
|
//#region src/core/createRouterScope.ts
|
|
665
|
-
var
|
|
673
|
+
var oe = {
|
|
666
674
|
mark: () => {},
|
|
667
675
|
consume: () => !1
|
|
668
676
|
};
|
|
669
|
-
function
|
|
677
|
+
function se(e) {
|
|
670
678
|
let { routePaths: t, pathname: n, search: r, defaultTransitionName: i, memory: a, browserDriver: s } = e, c = l(t, n, r, i);
|
|
671
679
|
if (e.hostedScope) return e.hostedScope.history.getState().index === -1 && e.hostedScope.history.setState({
|
|
672
680
|
index: 0,
|
|
@@ -682,12 +690,12 @@ function ae(e) {
|
|
|
682
690
|
layoutId: c.layoutId
|
|
683
691
|
},
|
|
684
692
|
url: c.pathname
|
|
685
|
-
}) : s, d = a ?
|
|
693
|
+
}) : s, d = a ? oe : m();
|
|
686
694
|
return {
|
|
687
695
|
history: o([c], 0),
|
|
688
696
|
navigate: b(),
|
|
689
|
-
transition:
|
|
690
|
-
screen:
|
|
697
|
+
transition: ie(i),
|
|
698
|
+
screen: ae(),
|
|
691
699
|
driver: u,
|
|
692
700
|
markSelfInduced: d.mark,
|
|
693
701
|
consume: d.consume
|
|
@@ -695,7 +703,7 @@ function ae(e) {
|
|
|
695
703
|
}
|
|
696
704
|
//#endregion
|
|
697
705
|
//#region src/screen/createScreenSelector.ts
|
|
698
|
-
function
|
|
706
|
+
function ce(e, t) {
|
|
699
707
|
return e.map((n, r) => ({
|
|
700
708
|
...n,
|
|
701
709
|
isActive: r === t,
|
|
@@ -708,13 +716,13 @@ function oe(e, t) {
|
|
|
708
716
|
}
|
|
709
717
|
//#endregion
|
|
710
718
|
//#region src/screen/computeScreenFreeze.ts
|
|
711
|
-
function
|
|
719
|
+
function le(e) {
|
|
712
720
|
let t = e.status === "COMPLETED" && e.dragStatus === "IDLE";
|
|
713
721
|
return !e.isActive && t || e.isPrev && e.index - 2 <= e.zIndex && e.replaceTransitionStatus === "IDLE" || e.isPrev && e.index - 2 > e.zIndex;
|
|
714
722
|
}
|
|
715
723
|
//#endregion
|
|
716
724
|
//#region src/transition/createTransition.ts
|
|
717
|
-
function
|
|
725
|
+
function T({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exitBack: o, options: s }) {
|
|
718
726
|
return {
|
|
719
727
|
name: e,
|
|
720
728
|
initial: t,
|
|
@@ -735,7 +743,7 @@ function E({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exit
|
|
|
735
743
|
}
|
|
736
744
|
//#endregion
|
|
737
745
|
//#region src/transition/createRawTransition.ts
|
|
738
|
-
function
|
|
746
|
+
function ue({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnExit: l, completedOnEnter: u, options: d }) {
|
|
739
747
|
return {
|
|
740
748
|
name: e,
|
|
741
749
|
initial: t,
|
|
@@ -756,10 +764,10 @@ function ce({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
756
764
|
}
|
|
757
765
|
//#endregion
|
|
758
766
|
//#region src/transition/cupertino.ts
|
|
759
|
-
var
|
|
767
|
+
var de = (e, t, n) => {
|
|
760
768
|
let [r, i] = t, [a, o] = n;
|
|
761
769
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
762
|
-
},
|
|
770
|
+
}, fe = T({
|
|
763
771
|
name: "cupertino",
|
|
764
772
|
initial: { x: "100%" },
|
|
765
773
|
idle: {
|
|
@@ -819,7 +827,7 @@ var le = (e, t, n) => {
|
|
|
819
827
|
swipeDirection: "x",
|
|
820
828
|
onSwipeStart: async () => !0,
|
|
821
829
|
onSwipe: (e, t, { animate: n, currentScreen: r, prevScreen: i, onProgress: a }) => {
|
|
822
|
-
let { offset: o } = t, s = o.x, c =
|
|
830
|
+
let { offset: o } = t, s = o.x, c = de(s, [0, window.innerWidth], [0, 100]);
|
|
823
831
|
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 + c * .3}%` }, { duration: 0 }), c;
|
|
824
832
|
},
|
|
825
833
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
@@ -843,10 +851,10 @@ var le = (e, t, n) => {
|
|
|
843
851
|
})]), c;
|
|
844
852
|
}
|
|
845
853
|
}
|
|
846
|
-
}),
|
|
854
|
+
}), pe = (e, t, n) => {
|
|
847
855
|
let [r, i] = t, [a, o] = n;
|
|
848
856
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
849
|
-
},
|
|
857
|
+
}, me = T({
|
|
850
858
|
name: "layout",
|
|
851
859
|
initial: { opacity: .97 },
|
|
852
860
|
idle: {
|
|
@@ -874,7 +882,7 @@ var le = (e, t, n) => {
|
|
|
874
882
|
swipeDirection: "y",
|
|
875
883
|
onSwipeStart: async () => !0,
|
|
876
884
|
onSwipe: (e, t, { animate: n, currentScreen: r, onProgress: i }) => {
|
|
877
|
-
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c =
|
|
885
|
+
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c = pe(s, [0, 56], [1, .96]), l = Math.max(0, o - 56), u = Math.min(1, l / 160), d = Math.sqrt(u) * 12, f = Math.max(0, s + d), p = Math.min(56, f);
|
|
878
886
|
return i?.(!0, 100), n(r, {
|
|
879
887
|
y: f,
|
|
880
888
|
opacity: c
|
|
@@ -891,7 +899,7 @@ var le = (e, t, n) => {
|
|
|
891
899
|
}, { duration: .3 })]), c;
|
|
892
900
|
}
|
|
893
901
|
}
|
|
894
|
-
}),
|
|
902
|
+
}), he = T({
|
|
895
903
|
name: "material",
|
|
896
904
|
initial: { y: "100%" },
|
|
897
905
|
idle: {
|
|
@@ -999,7 +1007,7 @@ var le = (e, t, n) => {
|
|
|
999
1007
|
})]), c;
|
|
1000
1008
|
}
|
|
1001
1009
|
}
|
|
1002
|
-
}),
|
|
1010
|
+
}), E = T({
|
|
1003
1011
|
name: "none",
|
|
1004
1012
|
initial: {},
|
|
1005
1013
|
idle: {
|
|
@@ -1023,14 +1031,19 @@ var le = (e, t, n) => {
|
|
|
1023
1031
|
options: { duration: 0 }
|
|
1024
1032
|
}
|
|
1025
1033
|
}), D = new Map([
|
|
1026
|
-
["none",
|
|
1027
|
-
["cupertino",
|
|
1028
|
-
["material",
|
|
1029
|
-
["layout",
|
|
1034
|
+
["none", E],
|
|
1035
|
+
["cupertino", fe],
|
|
1036
|
+
["material", he],
|
|
1037
|
+
["layout", me]
|
|
1030
1038
|
]);
|
|
1031
1039
|
//#endregion
|
|
1040
|
+
//#region src/transition/resolveTransition.ts
|
|
1041
|
+
function ge(e) {
|
|
1042
|
+
return D.get(e) ?? D.get("none");
|
|
1043
|
+
}
|
|
1044
|
+
//#endregion
|
|
1032
1045
|
//#region src/transition/decorator/createDecorator.ts
|
|
1033
|
-
function
|
|
1046
|
+
function _e({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1034
1047
|
return {
|
|
1035
1048
|
name: e,
|
|
1036
1049
|
initial: t,
|
|
@@ -1051,7 +1064,7 @@ function he({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1051
1064
|
}
|
|
1052
1065
|
//#endregion
|
|
1053
1066
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1054
|
-
function
|
|
1067
|
+
function ve({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1055
1068
|
return {
|
|
1056
1069
|
name: e,
|
|
1057
1070
|
initial: t,
|
|
@@ -1072,7 +1085,7 @@ function ge({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1072
1085
|
}
|
|
1073
1086
|
//#endregion
|
|
1074
1087
|
//#region src/transition/decorator/overlay.ts
|
|
1075
|
-
var O = "rgba(0, 0, 0, 0.3)",
|
|
1088
|
+
var O = "rgba(0, 0, 0, 0.3)", ye = _e({
|
|
1076
1089
|
name: "overlay",
|
|
1077
1090
|
initial: {
|
|
1078
1091
|
opacity: 0,
|
|
@@ -1104,10 +1117,10 @@ var O = "rgba(0, 0, 0, 0.3)", _e = he({
|
|
|
1104
1117
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1105
1118
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1106
1119
|
}
|
|
1107
|
-
}), k = new Map([["overlay",
|
|
1120
|
+
}), k = new Map([["overlay", ye]]);
|
|
1108
1121
|
//#endregion
|
|
1109
1122
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1110
|
-
function
|
|
1123
|
+
function be({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1111
1124
|
return {
|
|
1112
1125
|
name: e,
|
|
1113
1126
|
initial: t,
|
|
@@ -1128,7 +1141,7 @@ function ve({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1128
1141
|
}
|
|
1129
1142
|
//#endregion
|
|
1130
1143
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1131
|
-
function
|
|
1144
|
+
function xe({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1132
1145
|
return {
|
|
1133
1146
|
name: e,
|
|
1134
1147
|
initial: t,
|
|
@@ -1160,7 +1173,7 @@ var A = /* @__PURE__ */ new Map(), j = {
|
|
|
1160
1173
|
"POPPING-false": "PUSHING-false",
|
|
1161
1174
|
"COMPLETED-true": "self",
|
|
1162
1175
|
"COMPLETED-false": "self"
|
|
1163
|
-
},
|
|
1176
|
+
}, Se = Object.keys(j), M = Se, Ce = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), N = (e) => typeof e == "object" && !!e && !Array.isArray(e), we = new Set(/* @__PURE__ */ "opacity.scale.scaleX.scaleY.scaleZ.aspectRatio.columnCount.columns.flex.flexGrow.flexShrink.fontWeight.gridArea.gridColumn.gridColumnEnd.gridColumnStart.gridRow.gridRowEnd.gridRowStart.lineHeight.lineClamp.order.orphans.tabSize.widows.zIndex.zoom.fillOpacity.floodOpacity.stopOpacity.strokeOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeWidth".split(".")), Te = (e, t) => t.startsWith("--") || we.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, P = (e, t) => typeof t == "number" ? Te(t, e) : typeof t == "string" ? t : "", F = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), I = new Set([
|
|
1164
1177
|
"x",
|
|
1165
1178
|
"y",
|
|
1166
1179
|
"z",
|
|
@@ -1171,7 +1184,7 @@ var A = /* @__PURE__ */ new Map(), j = {
|
|
|
1171
1184
|
"rotateX",
|
|
1172
1185
|
"rotateY",
|
|
1173
1186
|
"rotateZ"
|
|
1174
|
-
]),
|
|
1187
|
+
]), Ee = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, De = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, Oe = /^1(\.0+)?$/, ke = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 ? !0 : typeof t == "string" ? Oe.test(t.trim()) : !1 : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 ? !0 : typeof t == "string" ? De.test(t.trim()) : !1 : t === 0 ? !0 : typeof t == "string" ? Ee.test(t.trim()) : !1, Ae = (e, t) => {
|
|
1175
1188
|
switch (e) {
|
|
1176
1189
|
case "x": return `translateX(${t})`;
|
|
1177
1190
|
case "y": return `translateY(${t})`;
|
|
@@ -1185,23 +1198,23 @@ var A = /* @__PURE__ */ new Map(), j = {
|
|
|
1185
1198
|
case "rotateY": return `rotateY(${t})`;
|
|
1186
1199
|
default: return "";
|
|
1187
1200
|
}
|
|
1188
|
-
},
|
|
1201
|
+
}, L = (e) => {
|
|
1189
1202
|
let t = /* @__PURE__ */ new Set(), n = !1, r = (e) => {
|
|
1190
|
-
if (
|
|
1203
|
+
if (N(e)) for (let r of Object.keys(e)) {
|
|
1191
1204
|
let i = e[r];
|
|
1192
|
-
|
|
1205
|
+
P(r, i) !== "" && (I.has(r) ? n = !0 : t.add(F(r)));
|
|
1193
1206
|
}
|
|
1194
1207
|
};
|
|
1195
1208
|
r(e.initial);
|
|
1196
1209
|
for (let t of Object.values(e.variants)) r(t.value);
|
|
1197
1210
|
return n && t.add("transform"), Array.from(t);
|
|
1198
|
-
},
|
|
1199
|
-
if (!
|
|
1211
|
+
}, R = (e) => {
|
|
1212
|
+
if (!N(e)) return [];
|
|
1200
1213
|
let t = [], n = !0, r = [];
|
|
1201
1214
|
for (let i of Object.keys(e)) {
|
|
1202
|
-
let a = e[i], o =
|
|
1203
|
-
o !== "" && (
|
|
1204
|
-
property:
|
|
1215
|
+
let a = e[i], o = P(i, a);
|
|
1216
|
+
o !== "" && (I.has(i) ? (t.push(Ae(i, o)), ke(i, a) || (n = !1)) : r.push({
|
|
1217
|
+
property: F(i),
|
|
1205
1218
|
value: o
|
|
1206
1219
|
}));
|
|
1207
1220
|
}
|
|
@@ -1209,7 +1222,7 @@ var A = /* @__PURE__ */ new Map(), j = {
|
|
|
1209
1222
|
property: "transform",
|
|
1210
1223
|
value: n ? "none" : t.join(" ")
|
|
1211
1224
|
}), r;
|
|
1212
|
-
},
|
|
1225
|
+
}, z = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), B = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1213
1226
|
linear: "linear",
|
|
1214
1227
|
easeIn: "ease-in",
|
|
1215
1228
|
easeOut: "ease-out",
|
|
@@ -1219,33 +1232,33 @@ var A = /* @__PURE__ */ new Map(), j = {
|
|
|
1219
1232
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1220
1233
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1221
1234
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1222
|
-
}[e] ?? "ease" : "ease",
|
|
1235
|
+
}[e] ?? "ease" : "ease", je = (e) => {
|
|
1223
1236
|
if (!e) return 0;
|
|
1224
1237
|
let t = e.duration;
|
|
1225
1238
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1226
|
-
},
|
|
1239
|
+
}, Me = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, Ne = (e, t) => {
|
|
1227
1240
|
let [n, r] = t.split("-");
|
|
1228
1241
|
return `[data-flemo-screen][data-flemo-transition="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1229
|
-
},
|
|
1242
|
+
}, Pe = (e, t) => {
|
|
1230
1243
|
let [n, r] = t.split("-");
|
|
1231
1244
|
return `[data-flemo-decorator][data-flemo-decorator-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1232
|
-
},
|
|
1245
|
+
}, Fe = (e, t) => {
|
|
1233
1246
|
let [n, r] = t.split("-");
|
|
1234
1247
|
return `[data-flemo-bar][data-flemo-bar-transition="${e}"][data-flemo-bar-status="${n}"][data-flemo-bar-active="${r}"][data-flemo-bar-riding="true"]`;
|
|
1235
|
-
},
|
|
1248
|
+
}, Ie = (e, t) => {
|
|
1236
1249
|
let [n, r] = t.split("-");
|
|
1237
1250
|
return `[data-flemo-part-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1238
|
-
},
|
|
1239
|
-
let o =
|
|
1251
|
+
}, V = (e, t, n) => `flemo-${e}-${Ce(t)}-${n}`, H = (e, t, n, r, i, a) => {
|
|
1252
|
+
let o = R(r), s = R(i.value), c = je(i.options), l = Me(i.options), u = B(i.options?.ease), d = a(t, n), f = e === "screen" ? `${d},\n${Fe(t, n)}` : d;
|
|
1240
1253
|
if (s.length === 0 && o.length === 0) return "";
|
|
1241
|
-
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${
|
|
1242
|
-
let p =
|
|
1254
|
+
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${z(s)}\n animation: none;\n}`;
|
|
1255
|
+
let p = V(e, t, n), m = [
|
|
1243
1256
|
`@keyframes ${p} {`,
|
|
1244
1257
|
" from {",
|
|
1245
|
-
|
|
1258
|
+
z(o).replace(/^/gm, " "),
|
|
1246
1259
|
" }",
|
|
1247
1260
|
" to {",
|
|
1248
|
-
|
|
1261
|
+
z(s).replace(/^/gm, " "),
|
|
1249
1262
|
" }",
|
|
1250
1263
|
"}"
|
|
1251
1264
|
].join("\n"), h = [
|
|
@@ -1256,82 +1269,82 @@ var A = /* @__PURE__ */ new Map(), j = {
|
|
|
1256
1269
|
"both"
|
|
1257
1270
|
].filter(Boolean).join(" "), g = Array.from(new Set([...o.map((e) => e.property), ...s.map((e) => e.property)])), _ = g.length > 0 ? ` will-change: ${g.join(", ")};\n` : "", v = n.split("-")[0];
|
|
1258
1271
|
return `${m}\n${`${f} {\n animation: ${h};\n${_}${v === "PUSHING" || v === "REPLACING" ? " contain: layout;\n pointer-events: none;\n" : ""}}`}`;
|
|
1259
|
-
},
|
|
1260
|
-
let i =
|
|
1261
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1262
|
-
},
|
|
1272
|
+
}, U = (e, t, n, r) => {
|
|
1273
|
+
let i = R(r.value);
|
|
1274
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${z(i)}\n}`;
|
|
1275
|
+
}, Le = (e, t, n = []) => {
|
|
1263
1276
|
let r = [];
|
|
1264
1277
|
for (let t of e) {
|
|
1265
1278
|
let e = t.name;
|
|
1266
|
-
for (let n of
|
|
1279
|
+
for (let n of Se) {
|
|
1267
1280
|
let i = t.variants[n], a = j[n];
|
|
1268
1281
|
if (a === "self") {
|
|
1269
|
-
r.push(
|
|
1282
|
+
r.push(U(Ne, e, n, i));
|
|
1270
1283
|
continue;
|
|
1271
1284
|
}
|
|
1272
1285
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1273
|
-
r.push(
|
|
1286
|
+
r.push(H("screen", e, n, o, i, Ne));
|
|
1274
1287
|
}
|
|
1275
1288
|
}
|
|
1276
1289
|
for (let e of t) {
|
|
1277
1290
|
let t = e.name;
|
|
1278
|
-
for (let n of
|
|
1291
|
+
for (let n of M) {
|
|
1279
1292
|
let i = e.variants[n], a = j[n];
|
|
1280
1293
|
if (a === "self") {
|
|
1281
|
-
r.push(
|
|
1294
|
+
r.push(U(Pe, t, n, i));
|
|
1282
1295
|
continue;
|
|
1283
1296
|
}
|
|
1284
1297
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1285
|
-
r.push(
|
|
1298
|
+
r.push(H("decorator", t, n, o, i, Pe));
|
|
1286
1299
|
}
|
|
1287
1300
|
}
|
|
1288
1301
|
for (let e of n) {
|
|
1289
1302
|
let t = e.name;
|
|
1290
|
-
for (let n of
|
|
1303
|
+
for (let n of M) {
|
|
1291
1304
|
let i = e.variants[n], a = j[n];
|
|
1292
1305
|
if (a === "self") {
|
|
1293
|
-
r.push(
|
|
1306
|
+
r.push(U(Ie, t, n, i));
|
|
1294
1307
|
continue;
|
|
1295
1308
|
}
|
|
1296
1309
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1297
|
-
r.push(
|
|
1310
|
+
r.push(H("part", t, n, o, i, Ie));
|
|
1298
1311
|
}
|
|
1299
1312
|
}
|
|
1300
|
-
return [...r.filter((e) => e.length > 0),
|
|
1301
|
-
},
|
|
1313
|
+
return [...r.filter((e) => e.length > 0), Re].join("\n\n");
|
|
1314
|
+
}, Re = [
|
|
1302
1315
|
"[data-flemo-anim-hold=\"true\"],",
|
|
1303
1316
|
"[data-flemo-anim-hold=\"true\"] [data-flemo-part-name] {",
|
|
1304
1317
|
" animation-play-state: paused !important;",
|
|
1305
1318
|
"}"
|
|
1306
|
-
].join("\n"),
|
|
1319
|
+
].join("\n"), ze = (e, t) => {
|
|
1307
1320
|
let n = j[t];
|
|
1308
1321
|
if (n === "self") return !1;
|
|
1309
|
-
let r = e.variants[t], i =
|
|
1322
|
+
let r = e.variants[t], i = je(r.options), a = Me(r.options);
|
|
1310
1323
|
if (i <= 0 && a <= 0) return !1;
|
|
1311
|
-
let o =
|
|
1324
|
+
let o = R(n === "initial" ? e.initial : e.variants[n].value), s = R(r.value);
|
|
1312
1325
|
return o.length > 0 || s.length > 0;
|
|
1313
|
-
},
|
|
1314
|
-
function
|
|
1326
|
+
}, Be = "data-flemo";
|
|
1327
|
+
function W() {
|
|
1315
1328
|
if (u()) return;
|
|
1316
|
-
let e =
|
|
1317
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
1329
|
+
let e = Le(D.values(), k.values(), A.values()), t = document.head.querySelector(`style[${Be}]`);
|
|
1330
|
+
t || (t = document.createElement("style"), t.setAttribute(Be, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1318
1331
|
}
|
|
1319
1332
|
//#endregion
|
|
1320
1333
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1321
|
-
function
|
|
1334
|
+
function Ve(e, t, n = []) {
|
|
1322
1335
|
for (let t of e) D.set(t.name, t);
|
|
1323
1336
|
for (let e of t) k.set(e.name, e);
|
|
1324
1337
|
for (let e of n) A.set(e.name, e);
|
|
1325
|
-
return
|
|
1338
|
+
return W(), () => {
|
|
1326
1339
|
for (let t of e) D.delete(t.name);
|
|
1327
1340
|
for (let e of t) k.delete(e.name);
|
|
1328
1341
|
for (let e of n) A.delete(e.name);
|
|
1329
|
-
|
|
1342
|
+
W();
|
|
1330
1343
|
};
|
|
1331
1344
|
}
|
|
1332
1345
|
//#endregion
|
|
1333
1346
|
//#region src/transition/enteringInitialStyle.ts
|
|
1334
|
-
function
|
|
1347
|
+
function He(e) {
|
|
1335
1348
|
let { initial: t, isActive: n, status: r } = e;
|
|
1336
1349
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1337
1350
|
let i = {};
|
|
@@ -1339,35 +1352,35 @@ function Ve(e) {
|
|
|
1339
1352
|
}
|
|
1340
1353
|
//#endregion
|
|
1341
1354
|
//#region src/transition/animateInline.ts
|
|
1342
|
-
var
|
|
1343
|
-
let n =
|
|
1344
|
-
n || (n = /* @__PURE__ */ new Set(),
|
|
1345
|
-
},
|
|
1355
|
+
var Ue = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, G = /* @__PURE__ */ new WeakMap(), We = (e, t) => {
|
|
1356
|
+
let n = G.get(e);
|
|
1357
|
+
n || (n = /* @__PURE__ */ new Set(), G.set(e, n)), n.add(t);
|
|
1358
|
+
}, K = (e, t) => {
|
|
1346
1359
|
if (e.style.transition = "", t) {
|
|
1347
|
-
let n =
|
|
1360
|
+
let n = G.get(e);
|
|
1348
1361
|
for (let r of t) e.style.removeProperty(r), n?.delete(r);
|
|
1349
1362
|
return;
|
|
1350
1363
|
}
|
|
1351
|
-
let n =
|
|
1364
|
+
let n = G.get(e);
|
|
1352
1365
|
if (n && n.size > 0) {
|
|
1353
1366
|
for (let t of n) e.style.removeProperty(t);
|
|
1354
1367
|
n.clear();
|
|
1355
1368
|
return;
|
|
1356
1369
|
}
|
|
1357
1370
|
e.style.removeProperty("transform"), e.style.removeProperty("opacity");
|
|
1358
|
-
},
|
|
1359
|
-
if (!
|
|
1360
|
-
let r = e, i =
|
|
1371
|
+
}, q = (e, t, n = {}) => {
|
|
1372
|
+
if (!Ue(e)) return Promise.resolve();
|
|
1373
|
+
let r = e, i = R(t);
|
|
1361
1374
|
if (i.length === 0) return Promise.resolve();
|
|
1362
|
-
let a = typeof n.duration == "number" ? n.duration : 0, o = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, s =
|
|
1375
|
+
let a = typeof n.duration == "number" ? n.duration : 0, o = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, s = B(n.ease);
|
|
1363
1376
|
if (a <= 0 && o <= 0) {
|
|
1364
1377
|
r.style.transition = "none";
|
|
1365
|
-
for (let e of i) r.style.setProperty(e.property, e.value),
|
|
1378
|
+
for (let e of i) r.style.setProperty(e.property, e.value), We(r, e.property);
|
|
1366
1379
|
return Promise.resolve();
|
|
1367
1380
|
}
|
|
1368
1381
|
let c = i.map((e) => `${e.property} ${a}s ${s} ${o}s`).join(", ");
|
|
1369
1382
|
r.style.transition = c, r.offsetWidth;
|
|
1370
|
-
for (let e of i) r.style.setProperty(e.property, e.value),
|
|
1383
|
+
for (let e of i) r.style.setProperty(e.property, e.value), We(r, e.property);
|
|
1371
1384
|
return new Promise((e) => {
|
|
1372
1385
|
let t = !1, n = () => {
|
|
1373
1386
|
t || (t = !0, r.removeEventListener("transitionend", i), e());
|
|
@@ -1376,27 +1389,27 @@ var He = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, W = /* @__
|
|
|
1376
1389
|
};
|
|
1377
1390
|
r.addEventListener("transitionend", i), setTimeout(n, (a + o) * 1e3 + 60);
|
|
1378
1391
|
});
|
|
1379
|
-
},
|
|
1380
|
-
function
|
|
1392
|
+
}, J = "data-flemo-skip-animation", Y = () => {};
|
|
1393
|
+
function Ge(e) {
|
|
1381
1394
|
return { driveScreenLifecycle: (t) => {
|
|
1382
1395
|
let { getElements: n, transitionName: r, prevTransitionName: i, status: o, isActive: s } = t;
|
|
1383
|
-
if (!s) return o === "REPLACING" && i !== r && e.setReplaceTransitionStatus("PENDING"),
|
|
1396
|
+
if (!s) return o === "REPLACING" && i !== r && e.setReplaceTransitionStatus("PENDING"), Y;
|
|
1384
1397
|
if (o === "COMPLETED") {
|
|
1385
1398
|
e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
1386
1399
|
let { scope: t, decorator: r, bars: i } = n();
|
|
1387
|
-
t && (
|
|
1388
|
-
for (let e of i ?? []) e && (
|
|
1389
|
-
return
|
|
1400
|
+
t && (K(t), t.removeAttribute(J)), r && (K(r), r.removeAttribute(J));
|
|
1401
|
+
for (let e of i ?? []) e && (K(e), e.style.removeProperty("will-change"));
|
|
1402
|
+
return Y;
|
|
1390
1403
|
}
|
|
1391
|
-
if (o === "IDLE") return
|
|
1404
|
+
if (o === "IDLE") return Y;
|
|
1392
1405
|
let { scope: c } = n();
|
|
1393
|
-
if (!c) return
|
|
1406
|
+
if (!c) return Y;
|
|
1394
1407
|
let l = () => {
|
|
1395
1408
|
let t = e.getTransitionTaskId();
|
|
1396
1409
|
t && a.resolveTask(t);
|
|
1397
|
-
}, u =
|
|
1398
|
-
if (!(c.getAttribute("data-flemo-skip-animation") !== "true" &&
|
|
1399
|
-
let f =
|
|
1410
|
+
}, u = ge(r), d = `${o}-true`;
|
|
1411
|
+
if (!(c.getAttribute("data-flemo-skip-animation") !== "true" && ze(u, d))) return queueMicrotask(l), Y;
|
|
1412
|
+
let f = V("screen", r, d), p = (e) => {
|
|
1400
1413
|
e.target === c && e.animationName === f && (c.removeEventListener("animationend", p), l());
|
|
1401
1414
|
};
|
|
1402
1415
|
return c.addEventListener("animationend", p), () => {
|
|
@@ -1406,20 +1419,20 @@ function We(e) {
|
|
|
1406
1419
|
}
|
|
1407
1420
|
//#endregion
|
|
1408
1421
|
//#region src/utils/findScrollable.ts
|
|
1409
|
-
function
|
|
1410
|
-
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o =
|
|
1422
|
+
function X(e, t) {
|
|
1423
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = Ke(e);
|
|
1411
1424
|
if (!o) return {
|
|
1412
1425
|
element: null,
|
|
1413
1426
|
hasMarker: !1
|
|
1414
1427
|
};
|
|
1415
1428
|
let s = o.closest?.(r);
|
|
1416
|
-
if (s instanceof HTMLElement &&
|
|
1429
|
+
if (s instanceof HTMLElement && Z(s, n) && (!a || Q(s, n))) return {
|
|
1417
1430
|
element: s,
|
|
1418
1431
|
hasMarker: !0
|
|
1419
1432
|
};
|
|
1420
1433
|
let c = o, l = 0;
|
|
1421
1434
|
for (; c && l < i;) {
|
|
1422
|
-
if (
|
|
1435
|
+
if (Z(c, n) && (!a || Q(c, n))) return {
|
|
1423
1436
|
element: c,
|
|
1424
1437
|
hasMarker: !1
|
|
1425
1438
|
};
|
|
@@ -1430,7 +1443,7 @@ function Y(e, t) {
|
|
|
1430
1443
|
hasMarker: !1
|
|
1431
1444
|
};
|
|
1432
1445
|
}
|
|
1433
|
-
function
|
|
1446
|
+
function Ke(e) {
|
|
1434
1447
|
if (!e) return null;
|
|
1435
1448
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
1436
1449
|
if (n && n.length) {
|
|
@@ -1438,18 +1451,18 @@ function Ge(e) {
|
|
|
1438
1451
|
}
|
|
1439
1452
|
return e instanceof HTMLElement ? e : null;
|
|
1440
1453
|
}
|
|
1441
|
-
function
|
|
1454
|
+
function Z(e, t) {
|
|
1442
1455
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
1443
1456
|
}
|
|
1444
|
-
function
|
|
1445
|
-
if (!
|
|
1457
|
+
function Q(e, t) {
|
|
1458
|
+
if (!Z(e, t) || typeof window > "u") return !1;
|
|
1446
1459
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
1447
1460
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
1448
1461
|
}
|
|
1449
1462
|
//#endregion
|
|
1450
1463
|
//#region src/core/engine/createSwipeController.ts
|
|
1451
|
-
var
|
|
1452
|
-
function
|
|
1464
|
+
var qe = "data-flemo-skip-animation";
|
|
1465
|
+
function Je(e) {
|
|
1453
1466
|
let t = null, n = null, r = {
|
|
1454
1467
|
current: [],
|
|
1455
1468
|
prev: []
|
|
@@ -1495,9 +1508,9 @@ function Ke(e) {
|
|
|
1495
1508
|
y: e.clientY
|
|
1496
1509
|
}, u = t;
|
|
1497
1510
|
}, v = (n, i, a) => {
|
|
1498
|
-
let o =
|
|
1499
|
-
if (n === e.getElements().scope) for (let e of r.current)
|
|
1500
|
-
else if (n === t) for (let e of r.prev)
|
|
1511
|
+
let o = q(n, i, a);
|
|
1512
|
+
if (n === e.getElements().scope) for (let e of r.current) q(e, i, a);
|
|
1513
|
+
else if (n === t) for (let e of r.prev) q(e, i, a);
|
|
1501
1514
|
return o;
|
|
1502
1515
|
}, y = (t) => {
|
|
1503
1516
|
let n = e.getPartnerBars(), i = [], { sharedTopBar: a, sharedBottomBar: o } = e.getElements();
|
|
@@ -1511,12 +1524,12 @@ function Ke(e) {
|
|
|
1511
1524
|
current: i,
|
|
1512
1525
|
prev: s
|
|
1513
1526
|
};
|
|
1514
|
-
let c =
|
|
1527
|
+
let c = L(e.getTransition()).join(", ");
|
|
1515
1528
|
for (let e of i) e.style.willChange = c;
|
|
1516
1529
|
for (let e of s) e.style.willChange = c;
|
|
1517
1530
|
}, b = () => {
|
|
1518
|
-
for (let e of r.current)
|
|
1519
|
-
for (let e of r.prev)
|
|
1531
|
+
for (let e of r.current) K(e), e.style.removeProperty("will-change");
|
|
1532
|
+
for (let e of r.prev) K(e), e.style.removeProperty("will-change");
|
|
1520
1533
|
r = {
|
|
1521
1534
|
current: [],
|
|
1522
1535
|
prev: []
|
|
@@ -1532,7 +1545,7 @@ function Ke(e) {
|
|
|
1532
1545
|
let a = A.get(r.getAttribute("data-flemo-part-name"));
|
|
1533
1546
|
if (!a) return;
|
|
1534
1547
|
let o = {
|
|
1535
|
-
animate:
|
|
1548
|
+
animate: q,
|
|
1536
1549
|
element: r,
|
|
1537
1550
|
active: i
|
|
1538
1551
|
};
|
|
@@ -1541,7 +1554,7 @@ function Ke(e) {
|
|
|
1541
1554
|
for (let e of i.current) r(e, !0);
|
|
1542
1555
|
for (let e of i.prev) r(e, !1);
|
|
1543
1556
|
}, C = () => {
|
|
1544
|
-
for (let e of [...i.current, ...i.prev])
|
|
1557
|
+
for (let e of [...i.current, ...i.prev]) K(e);
|
|
1545
1558
|
i = {
|
|
1546
1559
|
current: [],
|
|
1547
1560
|
prev: []
|
|
@@ -1570,7 +1583,7 @@ function Ke(e) {
|
|
|
1570
1583
|
prevScreen: t,
|
|
1571
1584
|
onStart: (e) => {
|
|
1572
1585
|
m?.onSwipeStart?.(e, {
|
|
1573
|
-
animate:
|
|
1586
|
+
animate: q,
|
|
1574
1587
|
currentDecorator: f,
|
|
1575
1588
|
prevDecorator: n
|
|
1576
1589
|
}), S("start", e, 0);
|
|
@@ -1587,7 +1600,7 @@ function Ke(e) {
|
|
|
1587
1600
|
prevScreen: t,
|
|
1588
1601
|
onProgress: (e, t) => {
|
|
1589
1602
|
c?.onSwipe?.(e, t, {
|
|
1590
|
-
animate:
|
|
1603
|
+
animate: q,
|
|
1591
1604
|
currentDecorator: o,
|
|
1592
1605
|
prevDecorator: n
|
|
1593
1606
|
}), S("swipe", e, t);
|
|
@@ -1606,32 +1619,32 @@ function Ke(e) {
|
|
|
1606
1619
|
prevScreen: t,
|
|
1607
1620
|
onStart: (e) => {
|
|
1608
1621
|
u?.onSwipeEnd?.(e, {
|
|
1609
|
-
animate:
|
|
1622
|
+
animate: q,
|
|
1610
1623
|
currentDecorator: l,
|
|
1611
1624
|
prevDecorator: n
|
|
1612
1625
|
}), S("end", e, 0);
|
|
1613
1626
|
}
|
|
1614
1627
|
})) {
|
|
1615
|
-
c?.setAttribute(
|
|
1628
|
+
c?.setAttribute(qe, "true"), l?.setAttribute(qe, "true");
|
|
1616
1629
|
for (let e of r.current) e.style.removeProperty("will-change");
|
|
1617
|
-
for (let e of r.prev)
|
|
1630
|
+
for (let e of r.prev) K(e), e.style.removeProperty("will-change");
|
|
1618
1631
|
r = {
|
|
1619
1632
|
current: [],
|
|
1620
1633
|
prev: []
|
|
1621
1634
|
};
|
|
1622
|
-
for (let e of i.prev)
|
|
1635
|
+
for (let e of i.prev) K(e);
|
|
1623
1636
|
i = {
|
|
1624
1637
|
current: [],
|
|
1625
1638
|
prev: []
|
|
1626
1639
|
}, e.back();
|
|
1627
|
-
} else c &&
|
|
1640
|
+
} else c && K(c), t && K(t), l && K(l), n && K(n), b(), C(), e.setDragStatus("IDLE");
|
|
1628
1641
|
};
|
|
1629
1642
|
return {
|
|
1630
1643
|
pointerDown: (t) => {
|
|
1631
|
-
e.isReadyForDrag() && (f =
|
|
1644
|
+
e.isReadyForDrag() && (f = X(t.target, {
|
|
1632
1645
|
direction: "x",
|
|
1633
1646
|
verifyByScroll: !0
|
|
1634
|
-
}), p =
|
|
1647
|
+
}), p = X(t.target, {
|
|
1635
1648
|
direction: "y",
|
|
1636
1649
|
verifyByScroll: !0
|
|
1637
1650
|
}), m = t.clientX, h = t.clientY, (!f.element && !p.element || f.element || p.element) && (a = !0));
|
|
@@ -1660,7 +1673,7 @@ function Ke(e) {
|
|
|
1660
1673
|
}
|
|
1661
1674
|
//#endregion
|
|
1662
1675
|
//#region src/screen/computeBarRiding.ts
|
|
1663
|
-
function
|
|
1676
|
+
function Ye(e) {
|
|
1664
1677
|
return !(e.status === "PUSHING" || e.status === "POPPING" || e.status === "REPLACING") || !e.isTopOrTopPrev ? {
|
|
1665
1678
|
app: !1,
|
|
1666
1679
|
nav: !1
|
|
@@ -1671,11 +1684,11 @@ function qe(e) {
|
|
|
1671
1684
|
}
|
|
1672
1685
|
//#endregion
|
|
1673
1686
|
//#region src/screen/animStartAnchor.ts
|
|
1674
|
-
function
|
|
1687
|
+
function Xe(e) {
|
|
1675
1688
|
return !(e.status === "PUSHING" || e.status === "POPPING" || e.status === "REPLACING") || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
1676
1689
|
}
|
|
1677
|
-
var
|
|
1678
|
-
function
|
|
1690
|
+
var Ze = 300;
|
|
1691
|
+
function Qe(e) {
|
|
1679
1692
|
let t = 0, n = requestAnimationFrame(() => {
|
|
1680
1693
|
t = requestAnimationFrame(e);
|
|
1681
1694
|
}), r = setTimeout(e, 300);
|
|
@@ -1685,7 +1698,7 @@ function Xe(e) {
|
|
|
1685
1698
|
}
|
|
1686
1699
|
//#endregion
|
|
1687
1700
|
//#region src/screen/observeBarHeight.ts
|
|
1688
|
-
function
|
|
1701
|
+
function $e(e, t) {
|
|
1689
1702
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
1690
1703
|
let n = new ResizeObserver(([e]) => {
|
|
1691
1704
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -1697,7 +1710,7 @@ function Ze(e, t) {
|
|
|
1697
1710
|
//#endregion
|
|
1698
1711
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
1699
1712
|
var $ = 0;
|
|
1700
|
-
function
|
|
1713
|
+
function et(e) {
|
|
1701
1714
|
let t = 0, n = () => {
|
|
1702
1715
|
cancelAnimationFrame(t), t = requestAnimationFrame(() => {
|
|
1703
1716
|
let t = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
@@ -1712,12 +1725,12 @@ function Qe(e) {
|
|
|
1712
1725
|
}
|
|
1713
1726
|
//#endregion
|
|
1714
1727
|
//#region src/utils/matchesPathname.ts
|
|
1715
|
-
function
|
|
1728
|
+
function tt(e, t) {
|
|
1716
1729
|
return i(e).regexp.test(t);
|
|
1717
1730
|
}
|
|
1718
1731
|
//#endregion
|
|
1719
1732
|
//#region src/utils/buildRoutePath.ts
|
|
1720
|
-
function
|
|
1733
|
+
function nt(e, n) {
|
|
1721
1734
|
let i = n ?? {}, a = t(e)(Object.fromEntries(Object.entries(i).map(([e, t]) => [e, String(t)]))), o = (typeof e == "string" ? r(e) : e).tokens.filter((e) => e.type === "param").map((e) => e.name), s = Object.fromEntries(Object.entries(i).filter(([e]) => !o.includes(e))), c = new URLSearchParams(s).toString();
|
|
1722
1735
|
return {
|
|
1723
1736
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -1725,4 +1738,4 @@ function et(e, n) {
|
|
|
1725
1738
|
};
|
|
1726
1739
|
}
|
|
1727
1740
|
//#endregion
|
|
1728
|
-
export {
|
|
1741
|
+
export { Ze as ANIM_HOLD_RELEASE_BACKSTOP_MS, J as SKIP_ANIMATION_ATTR, a as TaskManger, Xe as animHoldKey, q as animateInline, V as animationName, te as appendParamsQuery, W as applyTransitionStyles, nt as buildRoutePath, Q as canProgrammaticallyScroll, K as clearInlineAnimation, L as collectAnimatedProperties, Le as compileTransitionStyles, Ye as computeBarRiding, le as computeScreenFreeze, _ as consumeSelfInducedPop, p as createBrowserHistoryDriver, _e as createDecorator, o as createHistoryStore, v as createHistorySync, y as createMemoryHistoryDriver, b as createNavigateStore, w as createNavigationController, be as createPartTransition, ve as createRawDecorator, xe as createRawPartTransition, ue as createRawTransition, se as createRouterScope, ce as createScreenSelector, ae as createScreenStore, m as createSelfPopGuard, ne as createStepController, Je as createSwipeController, T as createTransition, Ge as createTransitionEngine, ie as createTransitionStore, fe as cupertino, k as decoratorMap, B as easingToCss, d as ensureWindowHistoryState, He as enteringInitialStyle, X as findScrollable, s as getMatchedPathPattern, c as getParams, u as isServer, me as layout, g as markSelfInducedPop, tt as matchesPathname, he as material, E as none, $e as observeBarHeight, et as observeViewportScrollHeight, Z as overflowsAxis, ye as overlay, A as partTransitionMap, ee as readStepParams, Ve as registerTransitionDefinitions, ge as resolveTransition, Qe as scheduleAnimHoldRelease, l as seedInitialHistory, re as subscribeStepParamsRestore, R as targetToDecls, D as transitionMap, ze as variantHasAnimation };
|
|
@@ -18,3 +18,4 @@ export default function createStepController(deps: StepControllerDeps): {
|
|
|
18
18
|
replaceStep: (params: object) => Promise<void>;
|
|
19
19
|
popStep: () => Promise<void>;
|
|
20
20
|
};
|
|
21
|
+
export declare function subscribeStepParamsRestore(driver: HistoryDriver, onParams: (params: object) => void): () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED