motion-plus-vue 1.1.5 → 1.2.0-alpha.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/cjs/index.js +2 -2
- package/dist/components/AnimateNumber/AnimateNumber.d.ts +2 -2
- package/dist/components/AnimateNumber/Mask.d.ts +7 -4
- package/dist/components/AnimateNumber/NumberSection.d.ts +1 -0
- package/dist/components/AnimateNumber/NumberSymbol.d.ts +4 -1
- package/dist/components/AnimateNumber/types.d.ts +5 -2
- package/dist/components/Cursor/Cursor.d.ts +3 -3
- package/dist/components/Ticker/Ticker.d.ts +28 -0
- package/dist/components/Ticker/TickerItem.d.ts +31 -0
- package/dist/components/Ticker/const.d.ts +4 -0
- package/dist/components/Ticker/context.d.ts +14 -0
- package/dist/components/Ticker/index.d.ts +7 -0
- package/dist/components/Ticker/use-item-offset.d.ts +1 -0
- package/dist/components/Ticker/use-keyboard-focus.d.ts +3 -0
- package/dist/es/components/AnimateNumber/AnimateNumber.vue.mjs +57 -46
- package/dist/es/components/AnimateNumber/Mask.vue.mjs +18 -14
- package/dist/es/components/AnimateNumber/NumberDigit.vue.mjs +55 -50
- package/dist/es/components/AnimateNumber/NumberSection.vue.mjs +79 -83
- package/dist/es/components/AnimateNumber/NumberSymbol.vue.mjs +30 -28
- package/dist/es/components/AnimateNumber/use-animate.mjs +5 -5
- package/dist/es/components/Ticker/Ticker.vue.mjs +183 -0
- package/dist/es/components/Ticker/Ticker.vue2.mjs +4 -0
- package/dist/es/components/Ticker/TickerItem.vue.mjs +46 -0
- package/dist/es/components/Ticker/TickerItem.vue2.mjs +4 -0
- package/dist/es/components/Ticker/const.mjs +4 -0
- package/dist/es/components/Ticker/context.mjs +6 -0
- package/dist/es/components/Ticker/index.mjs +5 -0
- package/dist/es/components/Ticker/use-item-offset.mjs +12 -0
- package/dist/es/components/Ticker/use-keyboard-focus.mjs +68 -0
- package/dist/es/index.mjs +20 -12
- package/dist/es/utils/flatten-slots.mjs +10 -0
- package/dist/index.d.ts +3 -2
- package/dist/utils/flatten-slots.d.ts +2 -0
- package/package.json +14 -6
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as _, ref as s, watch as v, nextTick as B, createBlock as c, openBlock as o, unref as l, normalizeStyle as g, withCtx as j, createElementVNode as A, createElementBlock as d, createCommentVNode as R, Fragment as V, renderList as b, resolveDynamicComponent as h, createVNode as F } from "vue";
|
|
2
2
|
import { useMotionConfig as K, motion as S, animate as T } from "motion-v";
|
|
3
3
|
import { useIsInitialRender as z } from "./hooks/use-is-initial-render.mjs";
|
|
4
|
-
import { digitFillStyle as
|
|
4
|
+
import { digitFillStyle as D, maskHeight as H } from "./config.mjs";
|
|
5
5
|
import { useAnimate as L } from "./use-animate.mjs";
|
|
6
6
|
import { getWidthInEm as Y } from "./utils/get-width-in-ems.mjs";
|
|
7
7
|
import { targetWidths as $ } from "./utils/target-widths.mjs";
|
|
8
|
-
const Z = /* @__PURE__ */
|
|
8
|
+
const Z = /* @__PURE__ */ _({
|
|
9
9
|
__name: "NumberDigit",
|
|
10
10
|
props: {
|
|
11
11
|
value: {},
|
|
@@ -17,79 +17,84 @@ const Z = /* @__PURE__ */ M({
|
|
|
17
17
|
},
|
|
18
18
|
partKey: {},
|
|
19
19
|
onRemove: {},
|
|
20
|
-
style: {}
|
|
20
|
+
style: {},
|
|
21
|
+
layoutDependency: {}
|
|
21
22
|
},
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
23
|
+
setup(x) {
|
|
24
|
+
const a = x, m = a.initialValue ?? a.value, k = z(), I = K(), r = s(), p = s(Array(10).fill(null)), C = s(), {
|
|
24
25
|
getRoot: N,
|
|
25
26
|
handleComplete: P,
|
|
26
|
-
root:
|
|
27
|
-
} = L(
|
|
28
|
-
let
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
if (!
|
|
32
|
-
return
|
|
33
|
-
if (
|
|
34
|
-
return
|
|
35
|
-
|
|
27
|
+
root: u
|
|
28
|
+
} = L(a);
|
|
29
|
+
let f = m;
|
|
30
|
+
const n = s(m);
|
|
31
|
+
v([() => a.value, () => a.isPresent], ([e, t]) => {
|
|
32
|
+
if (!t)
|
|
33
|
+
return n.value = 0;
|
|
34
|
+
if (k.current)
|
|
35
|
+
return B(() => {
|
|
36
|
+
n.value = e;
|
|
36
37
|
});
|
|
37
|
-
|
|
38
|
+
n.value = e;
|
|
38
39
|
}, {
|
|
39
40
|
immediate: !0
|
|
40
41
|
});
|
|
41
|
-
function
|
|
42
|
-
var
|
|
43
|
-
if (!
|
|
44
|
-
const
|
|
45
|
-
T(
|
|
46
|
-
y: [
|
|
42
|
+
function E(e) {
|
|
43
|
+
var w;
|
|
44
|
+
if (!r.value || e === f) return;
|
|
45
|
+
const t = r.value.getBoundingClientRect(), i = (w = u.value) == null ? void 0 : w.getBoundingClientRect(), W = t.height * (e - f) + (t.top - (i ? i.top || 0 : t.top));
|
|
46
|
+
T(r.value, {
|
|
47
|
+
y: [W, 0]
|
|
47
48
|
}, I.value.transition);
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
-
if (
|
|
51
|
-
const
|
|
52
|
-
|
|
50
|
+
function M(e) {
|
|
51
|
+
if (k.current && m === e || !p.value[e]) return;
|
|
52
|
+
const t = Y(p.value[e]);
|
|
53
|
+
u.value && ($.set(u.value, t), u.value.style.width = t), C.value = t;
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
v(n, (e) => {
|
|
56
|
+
M(e);
|
|
56
57
|
}, {
|
|
57
58
|
immediate: !0,
|
|
58
|
-
flush: "
|
|
59
|
-
}),
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
flush: "sync"
|
|
60
|
+
}), v(n, async (e, t, i) => {
|
|
61
|
+
await B(), E(e), i(() => {
|
|
62
|
+
f = e;
|
|
62
63
|
});
|
|
63
64
|
}, {
|
|
64
65
|
immediate: !0,
|
|
65
|
-
flush: "
|
|
66
|
+
flush: "sync"
|
|
66
67
|
});
|
|
67
|
-
function
|
|
68
|
+
function y(e) {
|
|
68
69
|
return () => F("span", {
|
|
69
70
|
key: e,
|
|
70
71
|
style: {
|
|
71
72
|
display: "inline-block",
|
|
72
73
|
padding: `calc(${H}/2) 0`
|
|
74
|
+
},
|
|
75
|
+
ref: (t) => {
|
|
76
|
+
p.value[e] = t;
|
|
73
77
|
}
|
|
74
78
|
}, [e]);
|
|
75
79
|
}
|
|
76
|
-
return (e,
|
|
77
|
-
ref:
|
|
80
|
+
return (e, t) => (o(), c(l(S).span, {
|
|
81
|
+
ref: l(N),
|
|
78
82
|
layout: "position",
|
|
83
|
+
"layout-dependency": e.layoutDependency,
|
|
79
84
|
"data-state": e.isPresent ? void 0 : "exiting",
|
|
80
85
|
"data-key": e.partKey,
|
|
81
|
-
style:
|
|
86
|
+
style: g({
|
|
82
87
|
display: "inline-flex",
|
|
83
88
|
justifyContent: "center",
|
|
84
89
|
width: C.value,
|
|
85
90
|
pointerEvents: e.isPresent ? void 0 : "none"
|
|
86
91
|
}),
|
|
87
92
|
"aria-hidden": !e.isPresent,
|
|
88
|
-
onMotioncomplete:
|
|
93
|
+
onMotioncomplete: l(P)
|
|
89
94
|
}, {
|
|
90
95
|
default: j(() => [A("span", {
|
|
91
96
|
ref_key: "scope",
|
|
92
|
-
ref:
|
|
97
|
+
ref: r,
|
|
93
98
|
style: {
|
|
94
99
|
display: "inline-flex",
|
|
95
100
|
justifyContent: "center",
|
|
@@ -97,27 +102,27 @@ const Z = /* @__PURE__ */ M({
|
|
|
97
102
|
alignItems: "center",
|
|
98
103
|
position: "relative"
|
|
99
104
|
}
|
|
100
|
-
}, [
|
|
105
|
+
}, [n.value !== 0 ? (o(), d("span", {
|
|
101
106
|
key: 0,
|
|
102
|
-
style:
|
|
103
|
-
...
|
|
107
|
+
style: g({
|
|
108
|
+
...l(D),
|
|
104
109
|
bottom: "100%",
|
|
105
110
|
left: 0
|
|
106
111
|
})
|
|
107
|
-
}, [(o(!0),
|
|
112
|
+
}, [(o(!0), d(V, null, b(n.value, (i) => (o(), c(h(y(i - 1)), {
|
|
108
113
|
key: i - 1
|
|
109
|
-
}))), 128))], 4)) : R("", !0), (o(),
|
|
114
|
+
}))), 128))], 4)) : R("", !0), (o(), c(h(y(n.value)))), n.value !== 9 ? (o(), d("span", {
|
|
110
115
|
key: 1,
|
|
111
|
-
style:
|
|
112
|
-
...
|
|
116
|
+
style: g({
|
|
117
|
+
...l(D),
|
|
113
118
|
top: "100%",
|
|
114
119
|
left: 0
|
|
115
120
|
})
|
|
116
|
-
}, [(o(!0),
|
|
117
|
-
key:
|
|
121
|
+
}, [(o(!0), d(V, null, b(9 - n.value, (i) => (o(), c(h(y(n.value + i)), {
|
|
122
|
+
key: n.value + i
|
|
118
123
|
}))), 128))], 4)) : R("", !0)], 512)]),
|
|
119
124
|
_: 1
|
|
120
|
-
}, 8, ["data-state", "data-key", "style", "aria-hidden", "onMotioncomplete"]));
|
|
125
|
+
}, 8, ["layout-dependency", "data-state", "data-key", "style", "aria-hidden", "onMotioncomplete"]));
|
|
121
126
|
}
|
|
122
127
|
});
|
|
123
128
|
export {
|
|
@@ -1,121 +1,117 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useDomRef as M, motion as
|
|
3
|
-
import { injectSectionContext as
|
|
4
|
-
import { useIsInitialRender as
|
|
5
|
-
import { getWidthInEm as
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as I, ref as c, watch as g, nextTick as D, toRef as E, createBlock as m, openBlock as u, unref as y, normalizeStyle as _, normalizeClass as $, withCtx as R, createElementVNode as B, createTextVNode as N, createVNode as S, createElementBlock as w, Fragment as P, renderList as b } from "vue";
|
|
2
|
+
import { useDomRef as M, motion as T, AnimatePresence as V } from "motion-v";
|
|
3
|
+
import { injectSectionContext as z } from "./context.mjs";
|
|
4
|
+
import { useIsInitialRender as A } from "./hooks/use-is-initial-render.mjs";
|
|
5
|
+
import { getWidthInEm as j } from "./utils/get-width-in-ems.mjs";
|
|
6
|
+
import L from "./NumberSymbol.vue.mjs";
|
|
7
7
|
import F from "./NumberDigit.vue.mjs";
|
|
8
|
-
|
|
9
|
-
const Y = /* @__PURE__ */ j({
|
|
8
|
+
const Q = /* @__PURE__ */ I({
|
|
10
9
|
__name: "NumberSection",
|
|
11
10
|
props: {
|
|
12
11
|
parts: {},
|
|
13
12
|
justify: { default: "left" },
|
|
14
13
|
mode: {},
|
|
15
14
|
name: {},
|
|
16
|
-
style: {}
|
|
15
|
+
style: {},
|
|
16
|
+
layoutDependency: {}
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
setup(C) {
|
|
19
|
+
var x;
|
|
20
|
+
const o = C, d = c(), p = M(), a = c(), v = A(), l = c(o.parts);
|
|
21
|
+
let k = o.name === "pre" && !((x = o.parts) != null && x.length) ? void 0 : !1;
|
|
22
|
+
g(() => o.parts, (n) => {
|
|
23
|
+
const i = new Map(n.map((t) => [t.key, { ...t, isPresent: !0 }])), e = l.value.filter((t) => !i.get(t.key)).map(
|
|
24
|
+
(t) => ({ ...t, isPresent: !1 })
|
|
25
|
+
), s = n.sort((t, r) => t.originalIndex - r.originalIndex);
|
|
26
|
+
l.value = e.concat(s);
|
|
27
|
+
}, { flush: "pre" }), g(() => {
|
|
28
|
+
var n;
|
|
29
|
+
return (n = o.parts) == null ? void 0 : n.map((i) => i.value).join("");
|
|
30
|
+
}, async (n, i) => {
|
|
31
|
+
if (await D(), k = !1, !a.value)
|
|
27
32
|
return;
|
|
28
|
-
if (
|
|
29
|
-
|
|
33
|
+
if (v.current) {
|
|
34
|
+
p.value && (p.value.style.width = j(a.value));
|
|
30
35
|
return;
|
|
31
36
|
}
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return e.remove(), () => {
|
|
38
|
-
s.value && s.value.insertBefore(e, _);
|
|
37
|
+
const e = Array.from(a.value.children).map((t) => {
|
|
38
|
+
if (t instanceof HTMLElement && t.dataset.state === "exiting") {
|
|
39
|
+
const r = t.nextSibling;
|
|
40
|
+
return t.remove(), () => {
|
|
41
|
+
a.value && a.value.insertBefore(t, r);
|
|
39
42
|
};
|
|
40
43
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
e.style.width = R;
|
|
47
|
-
};
|
|
48
|
-
});
|
|
49
|
-
function n() {
|
|
50
|
-
const e = w(s.value);
|
|
51
|
-
d.value = e;
|
|
44
|
+
}), s = j(a.value);
|
|
45
|
+
d.value = s;
|
|
46
|
+
for (let t = e.length - 1; t >= 0; t--) {
|
|
47
|
+
const r = e[t];
|
|
48
|
+
r && r();
|
|
52
49
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
}, { immediate: !0, flush: "post" });
|
|
59
|
-
const o = C(m, "justify");
|
|
60
|
-
L({
|
|
61
|
-
justify: o
|
|
50
|
+
}, { flush: "post" });
|
|
51
|
+
const f = E(o, "justify");
|
|
52
|
+
z({
|
|
53
|
+
justify: f
|
|
62
54
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
function h(n, i) {
|
|
56
|
+
var e;
|
|
57
|
+
l.value = l.value.filter((s) => s.key !== n), (e = i == null ? void 0 : i.parentElement) == null || e.removeChild(i);
|
|
66
58
|
}
|
|
67
|
-
return (
|
|
68
|
-
ref:
|
|
69
|
-
class: $(`number-section-${
|
|
70
|
-
style:
|
|
71
|
-
...
|
|
59
|
+
return (n, i) => (u(), m(y(T).span, {
|
|
60
|
+
ref: y(p),
|
|
61
|
+
class: $(`number-section-${n.name}`),
|
|
62
|
+
style: _({
|
|
63
|
+
...n.style,
|
|
72
64
|
display: "inline-flex",
|
|
73
|
-
justifyContent:
|
|
65
|
+
justifyContent: f.value,
|
|
74
66
|
width: d.value
|
|
75
67
|
}),
|
|
76
|
-
layout: "position"
|
|
68
|
+
layout: "position",
|
|
69
|
+
"layout-dependency": n.layoutDependency
|
|
77
70
|
}, {
|
|
78
|
-
default:
|
|
71
|
+
default: R(() => [
|
|
79
72
|
B("span", {
|
|
80
73
|
ref_key: "measuredRef",
|
|
81
|
-
ref:
|
|
74
|
+
ref: a,
|
|
82
75
|
style: {
|
|
83
76
|
display: "inline-flex",
|
|
84
77
|
justifyContent: "inherit",
|
|
85
78
|
position: "relative"
|
|
86
79
|
}
|
|
87
80
|
}, [
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
mode:
|
|
91
|
-
"anchor-x":
|
|
81
|
+
i[0] || (i[0] = N(" ")),
|
|
82
|
+
S(y(V), {
|
|
83
|
+
mode: n.mode,
|
|
84
|
+
"anchor-x": f.value,
|
|
92
85
|
initial: !1
|
|
93
86
|
}, {
|
|
94
|
-
default:
|
|
95
|
-
(u(!0),
|
|
96
|
-
key:
|
|
87
|
+
default: R(() => [
|
|
88
|
+
(u(!0), w(P, null, b(l.value, (e) => (u(), w(P, {
|
|
89
|
+
key: e.key
|
|
97
90
|
}, [
|
|
98
|
-
|
|
99
|
-
key:
|
|
100
|
-
"part-key":
|
|
91
|
+
e.type === "integer" || e.type === "fraction" ? (u(), m(F, {
|
|
92
|
+
key: e.key,
|
|
93
|
+
"part-key": e.key,
|
|
101
94
|
initial: { opacity: 0 },
|
|
102
95
|
animate: { opacity: 1 },
|
|
103
96
|
exit: { opacity: 0 },
|
|
104
|
-
value:
|
|
105
|
-
"is-present":
|
|
106
|
-
"initial-value":
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
type:
|
|
111
|
-
|
|
97
|
+
value: e.value,
|
|
98
|
+
"is-present": e.isPresent ?? !0,
|
|
99
|
+
"initial-value": y(v).current ? void 0 : 0,
|
|
100
|
+
"layout-dependency": n.layoutDependency,
|
|
101
|
+
onRemove: h
|
|
102
|
+
}, null, 8, ["part-key", "value", "is-present", "initial-value", "layout-dependency"])) : (u(), m(L, {
|
|
103
|
+
key: e.type === "literal" ? `${e.key}:${e.value}` : e.key,
|
|
104
|
+
type: e.type,
|
|
105
|
+
"part-key": e.key,
|
|
112
106
|
initial: { opacity: 0 },
|
|
113
107
|
animate: { opacity: 1 },
|
|
114
108
|
exit: { opacity: 0 },
|
|
115
|
-
value:
|
|
116
|
-
"is-present":
|
|
117
|
-
|
|
118
|
-
|
|
109
|
+
value: e.value,
|
|
110
|
+
"is-present": e.isPresent ?? !0,
|
|
111
|
+
"pre-initial": y(k),
|
|
112
|
+
"layout-dependency": n.layoutDependency,
|
|
113
|
+
onRemove: h
|
|
114
|
+
}, null, 8, ["type", "part-key", "value", "is-present", "pre-initial", "layout-dependency"]))
|
|
119
115
|
], 64))), 128))
|
|
120
116
|
]),
|
|
121
117
|
_: 1
|
|
@@ -123,9 +119,9 @@ const Y = /* @__PURE__ */ j({
|
|
|
123
119
|
], 512)
|
|
124
120
|
]),
|
|
125
121
|
_: 1
|
|
126
|
-
}, 8, ["class", "style"]));
|
|
122
|
+
}, 8, ["class", "style", "layout-dependency"]));
|
|
127
123
|
}
|
|
128
124
|
});
|
|
129
125
|
export {
|
|
130
|
-
|
|
126
|
+
Q as default
|
|
131
127
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { motion as
|
|
1
|
+
import { defineComponent as d, createBlock as i, openBlock as a, unref as e, normalizeStyle as u, withCtx as n, createVNode as c, createTextVNode as m, toDisplayString as f } from "vue";
|
|
2
|
+
import { motion as l, AnimatePresence as h } from "motion-v";
|
|
3
3
|
import { maskHeight as v } from "./config.mjs";
|
|
4
4
|
import { useSectionContext as g } from "./context.mjs";
|
|
5
5
|
import { useAnimate as k } from "./use-animate.mjs";
|
|
6
|
-
const
|
|
6
|
+
const I = /* @__PURE__ */ d({
|
|
7
7
|
__name: "NumberSymbol",
|
|
8
8
|
props: {
|
|
9
9
|
partKey: {},
|
|
@@ -11,15 +11,18 @@ const B = /* @__PURE__ */ u({
|
|
|
11
11
|
value: {},
|
|
12
12
|
isPresent: { type: Boolean },
|
|
13
13
|
onRemove: { type: Function },
|
|
14
|
-
style: {}
|
|
14
|
+
style: {},
|
|
15
|
+
layoutDependency: {},
|
|
16
|
+
preInitial: { type: Boolean }
|
|
15
17
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
return (t,
|
|
19
|
-
ref: e(
|
|
18
|
+
setup(p) {
|
|
19
|
+
const r = p, { justify: o } = g(), { getRoot: s, handleComplete: y } = k(r);
|
|
20
|
+
return (t, C) => (a(), i(e(l).span, {
|
|
21
|
+
ref: e(s),
|
|
20
22
|
layout: "position",
|
|
23
|
+
"layout-dependency": t.layoutDependency,
|
|
21
24
|
"data-state": t.isPresent ? void 0 : "exiting",
|
|
22
|
-
style:
|
|
25
|
+
style: u({
|
|
23
26
|
display: "inline-flex",
|
|
24
27
|
justifyContent: e(o),
|
|
25
28
|
padding: `calc(${e(v)}/2) 0`,
|
|
@@ -27,47 +30,46 @@ const B = /* @__PURE__ */ u({
|
|
|
27
30
|
pointerEvents: t.isPresent ? void 0 : "none"
|
|
28
31
|
}),
|
|
29
32
|
"aria-hidden": !t.isPresent,
|
|
30
|
-
onMotioncomplete: e(
|
|
33
|
+
onMotioncomplete: e(y)
|
|
31
34
|
}, {
|
|
32
|
-
default:
|
|
33
|
-
|
|
35
|
+
default: n(() => [
|
|
36
|
+
c(e(h), {
|
|
34
37
|
mode: "popLayout",
|
|
35
38
|
"anchor-x": e(o),
|
|
36
|
-
initial:
|
|
39
|
+
initial: t.preInitial
|
|
37
40
|
}, {
|
|
38
|
-
default:
|
|
39
|
-
(a(),
|
|
41
|
+
default: n(() => [
|
|
42
|
+
(a(), i(e(l).span, {
|
|
40
43
|
key: t.value,
|
|
41
44
|
layout: e(o) === "right" ? "position" : !1,
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
"layout-dependency": t.layoutDependency,
|
|
46
|
+
initial: { opacity: 0, left: e(o) === "right" && t.preInitial === void 0 ? "-100%" : void 0 },
|
|
47
|
+
animate: { opacity: [null, 1], left: 0 },
|
|
44
48
|
exit: {
|
|
45
49
|
opacity: [null, 0],
|
|
46
50
|
transition: {
|
|
47
|
-
duration: 0.
|
|
51
|
+
opacity: { duration: 0.4 }
|
|
48
52
|
}
|
|
49
53
|
},
|
|
50
54
|
style: {
|
|
51
55
|
display: "inline-block",
|
|
52
|
-
whiteSpace: "pre"
|
|
53
|
-
|
|
54
|
-
transition: {
|
|
55
|
-
duration: 0.2
|
|
56
|
+
whiteSpace: "pre",
|
|
57
|
+
position: "relative"
|
|
56
58
|
}
|
|
57
59
|
}, {
|
|
58
|
-
default:
|
|
59
|
-
|
|
60
|
+
default: n(() => [
|
|
61
|
+
m(f(t.value), 1)
|
|
60
62
|
]),
|
|
61
63
|
_: 1
|
|
62
|
-
}, 8, ["layout"]))
|
|
64
|
+
}, 8, ["layout", "layout-dependency", "initial"]))
|
|
63
65
|
]),
|
|
64
66
|
_: 1
|
|
65
|
-
}, 8, ["anchor-x"])
|
|
67
|
+
}, 8, ["anchor-x", "initial"])
|
|
66
68
|
]),
|
|
67
69
|
_: 1
|
|
68
|
-
}, 8, ["data-state", "style", "aria-hidden", "onMotioncomplete"]));
|
|
70
|
+
}, 8, ["layout-dependency", "data-state", "style", "aria-hidden", "onMotioncomplete"]));
|
|
69
71
|
}
|
|
70
72
|
});
|
|
71
73
|
export {
|
|
72
|
-
|
|
74
|
+
I as default
|
|
73
75
|
};
|
|
@@ -2,21 +2,21 @@ import { mountedStates as u } from "motion-v";
|
|
|
2
2
|
import { ref as f, watch as m } from "vue";
|
|
3
3
|
function v(e) {
|
|
4
4
|
const n = f();
|
|
5
|
-
function
|
|
5
|
+
function a(t) {
|
|
6
6
|
n.value = t == null ? void 0 : t.$el;
|
|
7
7
|
}
|
|
8
8
|
m(() => e.isPresent, (t) => {
|
|
9
9
|
var i;
|
|
10
10
|
n.value && ((i = u.get(n.value)) == null || i.setActive("exit", !t));
|
|
11
11
|
});
|
|
12
|
-
function
|
|
12
|
+
function o(t) {
|
|
13
13
|
var i;
|
|
14
|
-
t.detail.isExit && !e.isPresent && ((i = e.onRemove) == null || i.call(e, e.partKey));
|
|
14
|
+
t.detail.isExit && !e.isPresent && ((i = e.onRemove) == null || i.call(e, e.partKey, t.target));
|
|
15
15
|
}
|
|
16
16
|
return {
|
|
17
17
|
root: n,
|
|
18
|
-
getRoot:
|
|
19
|
-
handleComplete:
|
|
18
|
+
getRoot: a,
|
|
19
|
+
handleComplete: o
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
export {
|