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