@voidzero-dev/vitepress-theme 0.1.35 → 0.1.36
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/index100.js +6 -6
- package/dist/index101.js +4 -32
- package/dist/index102.js +4 -57
- package/dist/index103.js +6 -8
- package/dist/index104.js +29 -10
- package/dist/index105.js +55 -56
- package/dist/index106.js +9 -6
- package/dist/index107.js +13 -38
- package/dist/index108.js +58 -21
- package/dist/index109.js +6 -25
- package/dist/index110.js +39 -10
- package/dist/index111.js +20 -56
- package/dist/index112.js +25 -36
- package/dist/index113.js +10 -119
- package/dist/index114.js +54 -89
- package/dist/index115.js +34 -6
- package/dist/index116.js +112 -432
- package/dist/index117.js +92 -33
- package/dist/index118.js +6 -1200
- package/dist/index119.js +438 -3
- package/dist/index120.js +5 -1735
- package/dist/index121.js +1735 -5
- package/dist/index122.js +1 -1
- package/dist/index27.js +1 -1
- package/dist/index3.js +3 -3
- package/dist/index30.js +8 -8
- package/dist/index34.js +12 -12
- package/dist/index36.js +7 -7
- package/dist/index38.js +7 -7
- package/dist/index4.js +10 -10
- package/dist/index40.js +18 -2
- package/dist/index41.js +18 -84
- package/dist/index42.js +18 -66
- package/dist/index43.js +23 -51
- package/dist/index44.js +2 -76
- package/dist/index45.js +30 -22
- package/dist/index46.js +2 -30
- package/dist/index47.js +2 -26
- package/dist/index48.js +2 -26
- package/dist/index49.js +2 -26
- package/dist/index50.js +2 -26
- package/dist/index51.js +2 -18
- package/dist/index52.js +2 -18
- package/dist/index53.js +2 -18
- package/dist/index54.js +2 -2
- package/dist/index55.js +2 -2
- package/dist/index56.js +2 -2
- package/dist/index57.js +2 -2
- package/dist/index58.js +2 -2
- package/dist/index59.js +2 -2
- package/dist/index6.js +1 -1
- package/dist/index60.js +2 -2
- package/dist/index61.js +1 -1
- package/dist/index62.js +2 -2
- package/dist/index63.js +2 -2
- package/dist/index64.js +2 -2
- package/dist/index65.js +1 -1
- package/dist/index66.js +2 -49
- package/dist/index67.js +84 -43
- package/dist/index68.js +64 -2585
- package/dist/index69.js +50 -48
- package/dist/index7.js +1 -1
- package/dist/index70.js +76 -7207
- package/dist/index71.js +24 -12
- package/dist/index72.js +29 -21
- package/dist/index73.js +26 -124
- package/dist/index74.js +26 -2
- package/dist/index75.js +26 -2
- package/dist/index76.js +26 -2
- package/dist/index77.js +1 -1
- package/dist/index78.js +49 -2
- package/dist/index79.js +44 -26
- package/dist/index8.js +2 -2
- package/dist/index80.js +2585 -32
- package/dist/index81.js +51 -2
- package/dist/index82.js +7207 -2
- package/dist/index83.js +14 -2
- package/dist/index84.js +1 -1
- package/dist/index85.js +22 -2
- package/dist/index86.js +124 -2
- package/dist/index87.js +2 -2
- package/dist/index88.js +5324 -2
- package/dist/index89.js +2 -2
- package/dist/index90.js +1 -1
- package/dist/index91.js +1 -1
- package/dist/index92.js +1 -1
- package/dist/index93.js +1 -1
- package/dist/index94.js +2 -5324
- package/dist/index95.js +2 -2
- package/dist/index96.js +3 -9
- package/dist/index97.js +32 -6
- package/dist/index98.js +1201 -4
- package/dist/index99.js +10 -4
- package/package.json +1 -1
package/dist/index100.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return
|
|
1
|
+
function t() {
|
|
2
|
+
let e = document.activeElement;
|
|
3
|
+
if (e == null) return null;
|
|
4
|
+
for (; e != null && e.shadowRoot != null && e.shadowRoot.activeElement != null; ) e = e.shadowRoot.activeElement;
|
|
5
|
+
return e;
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
t as getActiveElement
|
|
9
9
|
};
|
package/dist/index101.js
CHANGED
|
@@ -1,35 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const t = l(), r = i(), u = s(() => ["#text", "#comment"].includes(r.value?.$el.nodeName) ? r.value?.$el.nextElementSibling : a(r)), o = Object.assign({}, t.exposed), n = {};
|
|
5
|
-
for (const e in t.props) Object.defineProperty(n, e, {
|
|
6
|
-
enumerable: !0,
|
|
7
|
-
configurable: !0,
|
|
8
|
-
get: () => t.props[e]
|
|
9
|
-
});
|
|
10
|
-
if (Object.keys(o).length > 0) for (const e in o) Object.defineProperty(n, e, {
|
|
11
|
-
enumerable: !0,
|
|
12
|
-
configurable: !0,
|
|
13
|
-
get: () => o[e]
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(n, "$el", {
|
|
16
|
-
enumerable: !0,
|
|
17
|
-
configurable: !0,
|
|
18
|
-
get: () => t.vnode.el
|
|
19
|
-
}), t.exposed = n;
|
|
20
|
-
function c(e) {
|
|
21
|
-
r.value = e, e && (Object.defineProperty(n, "$el", {
|
|
22
|
-
enumerable: !0,
|
|
23
|
-
configurable: !0,
|
|
24
|
-
get: () => e instanceof Element ? e : e.$el
|
|
25
|
-
}), t.exposed = n);
|
|
26
|
-
}
|
|
27
|
-
return {
|
|
28
|
-
forwardRef: c,
|
|
29
|
-
currentRef: r,
|
|
30
|
-
currentElement: u
|
|
31
|
-
};
|
|
1
|
+
import { Fragment as e } from "vue";
|
|
2
|
+
function n(t) {
|
|
3
|
+
return t ? t.flatMap((r) => r.type === e ? n(r.children) : [r]) : [];
|
|
32
4
|
}
|
|
33
5
|
export {
|
|
34
|
-
|
|
6
|
+
n as renderSlotFragments
|
|
35
7
|
};
|
package/dist/index102.js
CHANGED
|
@@ -1,59 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
function U(i) {
|
|
5
|
-
var n;
|
|
6
|
-
const l = F(i);
|
|
7
|
-
return (n = l?.$el) != null ? n : l;
|
|
8
|
-
}
|
|
9
|
-
function D(i) {
|
|
10
|
-
return JSON.parse(JSON.stringify(i));
|
|
11
|
-
}
|
|
12
|
-
function W(i, n, l, w = {}) {
|
|
13
|
-
var a, c, d;
|
|
14
|
-
const {
|
|
15
|
-
clone: s = !1,
|
|
16
|
-
passive: N = !1,
|
|
17
|
-
eventName: S,
|
|
18
|
-
deep: m = !1,
|
|
19
|
-
defaultValue: $,
|
|
20
|
-
shouldEmit: v
|
|
21
|
-
} = w, t = J(), g = l || t?.emit || ((a = t?.$emit) == null ? void 0 : a.bind(t)) || ((d = (c = t?.proxy) == null ? void 0 : c.$emit) == null ? void 0 : d.bind(t?.proxy));
|
|
22
|
-
let o = S;
|
|
23
|
-
n || (n = "modelValue"), o = o || `update:${n.toString()}`;
|
|
24
|
-
const p = (e) => s ? typeof s == "function" ? s(e) : D(e) : e, V = () => b(i[n]) ? p(i[n]) : $, x = (e) => {
|
|
25
|
-
v ? v(e) && g(o, e) : g(o, e);
|
|
26
|
-
};
|
|
27
|
-
if (N) {
|
|
28
|
-
const e = V(), f = O(e);
|
|
29
|
-
let u = !1;
|
|
30
|
-
return _(
|
|
31
|
-
() => i[n],
|
|
32
|
-
(r) => {
|
|
33
|
-
u || (u = !0, f.value = p(r), h(() => u = !1));
|
|
34
|
-
}
|
|
35
|
-
), _(
|
|
36
|
-
f,
|
|
37
|
-
(r) => {
|
|
38
|
-
!u && (r !== i[n] || m) && x(r);
|
|
39
|
-
},
|
|
40
|
-
{ deep: m }
|
|
41
|
-
), f;
|
|
42
|
-
} else
|
|
43
|
-
return C({
|
|
44
|
-
get() {
|
|
45
|
-
return V();
|
|
46
|
-
},
|
|
47
|
-
set(e) {
|
|
48
|
-
x(e);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
1
|
+
import { createContext as o } from "./index99.js";
|
|
2
|
+
import "vue";
|
|
3
|
+
const [e] = o("ConfigProvider");
|
|
52
4
|
export {
|
|
53
|
-
|
|
54
|
-
T as defaultWindow,
|
|
55
|
-
E as isClient,
|
|
56
|
-
b as isDef,
|
|
57
|
-
U as unrefElement,
|
|
58
|
-
W as useVModel
|
|
5
|
+
e as injectConfigProviderContext
|
|
59
6
|
};
|
package/dist/index103.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { injectConfigProviderContext as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const t = r({ useId: void 0 });
|
|
7
|
-
return t.useId ? `${e}-${t.useId()}` : `${e}-${++n}`;
|
|
1
|
+
import { injectConfigProviderContext as o } from "./index102.js";
|
|
2
|
+
import { ref as e, computed as i } from "vue";
|
|
3
|
+
function u(r) {
|
|
4
|
+
const t = o({ dir: e("ltr") });
|
|
5
|
+
return i(() => r?.value || t.dir?.value || "ltr");
|
|
8
6
|
}
|
|
9
7
|
export {
|
|
10
|
-
|
|
8
|
+
u as useDirection
|
|
11
9
|
};
|
package/dist/index104.js
CHANGED
|
@@ -1,16 +1,35 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { getCurrentInstance as l, ref as i, computed as s } from "vue";
|
|
2
|
+
import { unrefElement as a } from "./index105.js";
|
|
3
|
+
function m() {
|
|
4
|
+
const t = l(), r = i(), u = s(() => ["#text", "#comment"].includes(r.value?.$el.nodeName) ? r.value?.$el.nextElementSibling : a(r)), o = Object.assign({}, t.exposed), n = {};
|
|
5
|
+
for (const e in t.props) Object.defineProperty(n, e, {
|
|
6
|
+
enumerable: !0,
|
|
7
|
+
configurable: !0,
|
|
8
|
+
get: () => t.props[e]
|
|
9
|
+
});
|
|
10
|
+
if (Object.keys(o).length > 0) for (const e in o) Object.defineProperty(n, e, {
|
|
11
|
+
enumerable: !0,
|
|
12
|
+
configurable: !0,
|
|
13
|
+
get: () => o[e]
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(n, "$el", {
|
|
16
|
+
enumerable: !0,
|
|
17
|
+
configurable: !0,
|
|
18
|
+
get: () => t.vnode.el
|
|
19
|
+
}), t.exposed = n;
|
|
20
|
+
function c(e) {
|
|
21
|
+
r.value = e, e && (Object.defineProperty(n, "$el", {
|
|
22
|
+
enumerable: !0,
|
|
23
|
+
configurable: !0,
|
|
24
|
+
get: () => e instanceof Element ? e : e.$el
|
|
25
|
+
}), t.exposed = n);
|
|
6
26
|
}
|
|
7
27
|
return {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
28
|
+
forwardRef: c,
|
|
29
|
+
currentRef: r,
|
|
30
|
+
currentElement: u
|
|
12
31
|
};
|
|
13
32
|
}
|
|
14
33
|
export {
|
|
15
|
-
|
|
34
|
+
m as useForwardExpose
|
|
16
35
|
};
|
package/dist/index105.js
CHANGED
|
@@ -1,60 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ref as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
12
|
-
},
|
|
13
|
-
unmountSuspended: {
|
|
14
|
-
MOUNT: "mounted",
|
|
15
|
-
ANIMATION_END: "unmounted"
|
|
16
|
-
},
|
|
17
|
-
unmounted: { MOUNT: "mounted" }
|
|
18
|
-
}), i = (e) => {
|
|
19
|
-
if (C) {
|
|
20
|
-
const n = new CustomEvent(e, {
|
|
21
|
-
bubbles: !1,
|
|
22
|
-
cancelable: !1
|
|
23
|
-
});
|
|
24
|
-
t.value?.dispatchEvent(n);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
N(o, async (e, n) => {
|
|
28
|
-
const v = n !== e;
|
|
29
|
-
if (await h(), v) {
|
|
30
|
-
const d = r.value, u = l(t.value);
|
|
31
|
-
e ? (a("MOUNT"), i("enter"), u === "none" && i("after-enter")) : u === "none" || u === "undefined" || A.value?.display === "none" ? (a("UNMOUNT"), i("leave"), i("after-leave")) : n && d !== u ? (a("ANIMATION_OUT"), i("leave")) : (a("UNMOUNT"), i("after-leave"));
|
|
32
|
-
}
|
|
33
|
-
}, { immediate: !0 });
|
|
34
|
-
const s = (e) => {
|
|
35
|
-
const n = l(t.value), v = n.includes(CSS.escape(e.animationName)), d = m.value === "mounted" ? "enter" : "leave";
|
|
36
|
-
if (e.target === t.value && v && (i(`after-${d}`), a("ANIMATION_END"), !p.value)) {
|
|
37
|
-
const u = t.value.style.animationFillMode;
|
|
38
|
-
t.value.style.animationFillMode = "forwards", c = M?.setTimeout(() => {
|
|
39
|
-
t.value?.style.animationFillMode === "forwards" && (t.value.style.animationFillMode = u);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
e.target === t.value && n === "none" && a("ANIMATION_END");
|
|
43
|
-
}, T = (e) => {
|
|
44
|
-
e.target === t.value && (r.value = l(t.value));
|
|
45
|
-
}, O = N(t, (e, n) => {
|
|
46
|
-
e ? (A.value = getComputedStyle(e), e.addEventListener("animationstart", T), e.addEventListener("animationcancel", s), e.addEventListener("animationend", s)) : (a("ANIMATION_END"), c !== void 0 && M?.clearTimeout(c), n?.removeEventListener("animationstart", T), n?.removeEventListener("animationcancel", s), n?.removeEventListener("animationend", s));
|
|
47
|
-
}, { immediate: !0 }), I = N(m, () => {
|
|
48
|
-
const e = l(t.value);
|
|
49
|
-
r.value = m.value === "mounted" ? e : "none";
|
|
50
|
-
});
|
|
51
|
-
return S(() => {
|
|
52
|
-
O(), I();
|
|
53
|
-
}), { isPresent: g(() => ["mounted", "unmountSuspended"].includes(m.value)) };
|
|
1
|
+
import { isDef as b, isClient as E } from "./index109.js";
|
|
2
|
+
import { getCurrentInstance as J, ref as O, watch as _, nextTick as h, computed as C, toValue as F } from "vue";
|
|
3
|
+
const T = E ? window : void 0;
|
|
4
|
+
function U(i) {
|
|
5
|
+
var n;
|
|
6
|
+
const l = F(i);
|
|
7
|
+
return (n = l?.$el) != null ? n : l;
|
|
8
|
+
}
|
|
9
|
+
function D(i) {
|
|
10
|
+
return JSON.parse(JSON.stringify(i));
|
|
54
11
|
}
|
|
55
|
-
function l
|
|
56
|
-
|
|
12
|
+
function W(i, n, l, w = {}) {
|
|
13
|
+
var a, c, d;
|
|
14
|
+
const {
|
|
15
|
+
clone: s = !1,
|
|
16
|
+
passive: N = !1,
|
|
17
|
+
eventName: S,
|
|
18
|
+
deep: m = !1,
|
|
19
|
+
defaultValue: $,
|
|
20
|
+
shouldEmit: v
|
|
21
|
+
} = w, t = J(), g = l || t?.emit || ((a = t?.$emit) == null ? void 0 : a.bind(t)) || ((d = (c = t?.proxy) == null ? void 0 : c.$emit) == null ? void 0 : d.bind(t?.proxy));
|
|
22
|
+
let o = S;
|
|
23
|
+
n || (n = "modelValue"), o = o || `update:${n.toString()}`;
|
|
24
|
+
const p = (e) => s ? typeof s == "function" ? s(e) : D(e) : e, V = () => b(i[n]) ? p(i[n]) : $, x = (e) => {
|
|
25
|
+
v ? v(e) && g(o, e) : g(o, e);
|
|
26
|
+
};
|
|
27
|
+
if (N) {
|
|
28
|
+
const e = V(), f = O(e);
|
|
29
|
+
let u = !1;
|
|
30
|
+
return _(
|
|
31
|
+
() => i[n],
|
|
32
|
+
(r) => {
|
|
33
|
+
u || (u = !0, f.value = p(r), h(() => u = !1));
|
|
34
|
+
}
|
|
35
|
+
), _(
|
|
36
|
+
f,
|
|
37
|
+
(r) => {
|
|
38
|
+
!u && (r !== i[n] || m) && x(r);
|
|
39
|
+
},
|
|
40
|
+
{ deep: m }
|
|
41
|
+
), f;
|
|
42
|
+
} else
|
|
43
|
+
return C({
|
|
44
|
+
get() {
|
|
45
|
+
return V();
|
|
46
|
+
},
|
|
47
|
+
set(e) {
|
|
48
|
+
x(e);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
57
51
|
}
|
|
58
52
|
export {
|
|
59
|
-
|
|
53
|
+
D as cloneFnJSON,
|
|
54
|
+
T as defaultWindow,
|
|
55
|
+
E as isClient,
|
|
56
|
+
b as isDef,
|
|
57
|
+
U as unrefElement,
|
|
58
|
+
W as useVModel
|
|
60
59
|
};
|
package/dist/index106.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { injectConfigProviderContext as r } from "./index102.js";
|
|
2
|
+
import * as o from "vue";
|
|
3
|
+
let n = 0;
|
|
4
|
+
function d(i, e = "reka") {
|
|
5
|
+
if ("useId" in o) return `${e}-${o.useId?.()}`;
|
|
6
|
+
const t = r({ useId: void 0 });
|
|
7
|
+
return t.useId ? `${e}-${t.useId()}` : `${e}-${++n}`;
|
|
8
|
+
}
|
|
5
9
|
export {
|
|
6
|
-
|
|
7
|
-
i as isDef
|
|
10
|
+
d as useId
|
|
8
11
|
};
|
package/dist/index107.js
CHANGED
|
@@ -1,41 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
name: "Presence",
|
|
7
|
-
props: {
|
|
8
|
-
present: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
required: !0
|
|
11
|
-
},
|
|
12
|
-
forceMount: { type: Boolean }
|
|
13
|
-
},
|
|
14
|
-
slots: {},
|
|
15
|
-
setup(l, { slots: a, expose: c }) {
|
|
16
|
-
const { present: i, forceMount: p } = m(l), r = h(), { isPresent: t } = f(i, r);
|
|
17
|
-
c({ present: t });
|
|
18
|
-
let n = a.default({ present: t.value });
|
|
19
|
-
n = u(n || []);
|
|
20
|
-
const s = v();
|
|
21
|
-
if (n && n?.length > 1) {
|
|
22
|
-
const o = s?.parent?.type.name ? `<${s.parent.type.name} />` : "component";
|
|
23
|
-
throw new Error([
|
|
24
|
-
`Detected an invalid children for \`${o}\` for \`Presence\` component.`,
|
|
25
|
-
"",
|
|
26
|
-
"Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",
|
|
27
|
-
"You can apply a few solutions:",
|
|
28
|
-
["Provide a single child element so that `presence` directive attach correctly.", "Ensure the first child is an actual element instead of a raw text node or comment node."].map((e) => ` - ${e}`).join(`
|
|
29
|
-
`)
|
|
30
|
-
].join(`
|
|
31
|
-
`));
|
|
32
|
-
}
|
|
33
|
-
return () => p.value || i.value || t.value ? y(a.default({ present: t.value })[0], { ref: (o) => {
|
|
34
|
-
const e = w(o);
|
|
35
|
-
return typeof e?.hasAttribute > "u" || (e?.hasAttribute("data-reka-popper-content-wrapper") ? r.value = e.firstElementChild : r.value = e), e;
|
|
36
|
-
} }) : null;
|
|
1
|
+
import { ref as c } from "vue";
|
|
2
|
+
function i(n, a) {
|
|
3
|
+
const t = c(n);
|
|
4
|
+
function r(e) {
|
|
5
|
+
return a[t.value][e] ?? t.value;
|
|
37
6
|
}
|
|
38
|
-
|
|
7
|
+
return {
|
|
8
|
+
state: t,
|
|
9
|
+
dispatch: (e) => {
|
|
10
|
+
t.value = r(e);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
39
14
|
export {
|
|
40
|
-
|
|
15
|
+
i as useStateMachine
|
|
41
16
|
};
|
package/dist/index108.js
CHANGED
|
@@ -1,23 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { useStateMachine as U } from "./index107.js";
|
|
2
|
+
import { ref as f, watch as N, nextTick as h, onUnmounted as S, computed as g } from "vue";
|
|
3
|
+
import { defaultWindow as y } from "./index105.js";
|
|
4
|
+
import { isClient as C } from "./index109.js";
|
|
5
|
+
function P(o, t) {
|
|
6
|
+
const A = f({}), r = f("none"), p = f(o), E = o.value ? "mounted" : "unmounted";
|
|
7
|
+
let c;
|
|
8
|
+
const M = t.value?.ownerDocument.defaultView ?? y, { state: m, dispatch: a } = U(E, {
|
|
9
|
+
mounted: {
|
|
10
|
+
UNMOUNT: "unmounted",
|
|
11
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
12
|
+
},
|
|
13
|
+
unmountSuspended: {
|
|
14
|
+
MOUNT: "mounted",
|
|
15
|
+
ANIMATION_END: "unmounted"
|
|
16
|
+
},
|
|
17
|
+
unmounted: { MOUNT: "mounted" }
|
|
18
|
+
}), i = (e) => {
|
|
19
|
+
if (C) {
|
|
20
|
+
const n = new CustomEvent(e, {
|
|
21
|
+
bubbles: !1,
|
|
22
|
+
cancelable: !1
|
|
23
|
+
});
|
|
24
|
+
t.value?.dispatchEvent(n);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
N(o, async (e, n) => {
|
|
28
|
+
const v = n !== e;
|
|
29
|
+
if (await h(), v) {
|
|
30
|
+
const d = r.value, u = l(t.value);
|
|
31
|
+
e ? (a("MOUNT"), i("enter"), u === "none" && i("after-enter")) : u === "none" || u === "undefined" || A.value?.display === "none" ? (a("UNMOUNT"), i("leave"), i("after-leave")) : n && d !== u ? (a("ANIMATION_OUT"), i("leave")) : (a("UNMOUNT"), i("after-leave"));
|
|
32
|
+
}
|
|
33
|
+
}, { immediate: !0 });
|
|
34
|
+
const s = (e) => {
|
|
35
|
+
const n = l(t.value), v = n.includes(CSS.escape(e.animationName)), d = m.value === "mounted" ? "enter" : "leave";
|
|
36
|
+
if (e.target === t.value && v && (i(`after-${d}`), a("ANIMATION_END"), !p.value)) {
|
|
37
|
+
const u = t.value.style.animationFillMode;
|
|
38
|
+
t.value.style.animationFillMode = "forwards", c = M?.setTimeout(() => {
|
|
39
|
+
t.value?.style.animationFillMode === "forwards" && (t.value.style.animationFillMode = u);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
e.target === t.value && n === "none" && a("ANIMATION_END");
|
|
43
|
+
}, T = (e) => {
|
|
44
|
+
e.target === t.value && (r.value = l(t.value));
|
|
45
|
+
}, O = N(t, (e, n) => {
|
|
46
|
+
e ? (A.value = getComputedStyle(e), e.addEventListener("animationstart", T), e.addEventListener("animationcancel", s), e.addEventListener("animationend", s)) : (a("ANIMATION_END"), c !== void 0 && M?.clearTimeout(c), n?.removeEventListener("animationstart", T), n?.removeEventListener("animationcancel", s), n?.removeEventListener("animationend", s));
|
|
47
|
+
}, { immediate: !0 }), I = N(m, () => {
|
|
48
|
+
const e = l(t.value);
|
|
49
|
+
r.value = m.value === "mounted" ? e : "none";
|
|
50
|
+
});
|
|
51
|
+
return S(() => {
|
|
52
|
+
O(), I();
|
|
53
|
+
}), { isPresent: g(() => ["mounted", "unmountSuspended"].includes(m.value)) };
|
|
54
|
+
}
|
|
55
|
+
function l(o) {
|
|
56
|
+
return o && getComputedStyle(o).animationName || "none";
|
|
57
|
+
}
|
|
21
58
|
export {
|
|
22
|
-
|
|
59
|
+
P as usePresence
|
|
23
60
|
};
|
package/dist/index109.js
CHANGED
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"img",
|
|
6
|
-
"input"
|
|
7
|
-
], d = f({
|
|
8
|
-
name: "Primitive",
|
|
9
|
-
inheritAttrs: !1,
|
|
10
|
-
props: {
|
|
11
|
-
asChild: {
|
|
12
|
-
type: Boolean,
|
|
13
|
-
default: !1
|
|
14
|
-
},
|
|
15
|
-
as: {
|
|
16
|
-
type: [String, Object],
|
|
17
|
-
default: "div"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
setup(t, { attrs: i, slots: n }) {
|
|
21
|
-
const e = t.asChild ? "template" : t.as;
|
|
22
|
-
return typeof e == "string" && l.includes(e) ? () => a(e, i) : e !== "template" ? () => a(t.as, i, { default: n.default }) : () => a(r, i, { default: n.default });
|
|
23
|
-
}
|
|
24
|
-
});
|
|
1
|
+
import "vue";
|
|
2
|
+
const n = typeof window < "u" && typeof document < "u";
|
|
3
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
4
|
+
const i = (e) => typeof e < "u";
|
|
25
5
|
export {
|
|
26
|
-
|
|
6
|
+
n as isClient,
|
|
7
|
+
i as isDef
|
|
27
8
|
};
|
package/dist/index110.js
CHANGED
|
@@ -1,12 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { renderSlotFragments as u } from "./index101.js";
|
|
2
|
+
import { usePresence as f } from "./index108.js";
|
|
3
|
+
import { defineComponent as d, toRefs as m, ref as h, getCurrentInstance as v, h as y } from "vue";
|
|
4
|
+
import { unrefElement as w } from "./index105.js";
|
|
5
|
+
var x = d({
|
|
6
|
+
name: "Presence",
|
|
7
|
+
props: {
|
|
8
|
+
present: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
required: !0
|
|
11
|
+
},
|
|
12
|
+
forceMount: { type: Boolean }
|
|
13
|
+
},
|
|
14
|
+
slots: {},
|
|
15
|
+
setup(l, { slots: a, expose: c }) {
|
|
16
|
+
const { present: i, forceMount: p } = m(l), r = h(), { isPresent: t } = f(i, r);
|
|
17
|
+
c({ present: t });
|
|
18
|
+
let n = a.default({ present: t.value });
|
|
19
|
+
n = u(n || []);
|
|
20
|
+
const s = v();
|
|
21
|
+
if (n && n?.length > 1) {
|
|
22
|
+
const o = s?.parent?.type.name ? `<${s.parent.type.name} />` : "component";
|
|
23
|
+
throw new Error([
|
|
24
|
+
`Detected an invalid children for \`${o}\` for \`Presence\` component.`,
|
|
25
|
+
"",
|
|
26
|
+
"Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",
|
|
27
|
+
"You can apply a few solutions:",
|
|
28
|
+
["Provide a single child element so that `presence` directive attach correctly.", "Ensure the first child is an actual element instead of a raw text node or comment node."].map((e) => ` - ${e}`).join(`
|
|
29
|
+
`)
|
|
30
|
+
].join(`
|
|
31
|
+
`));
|
|
32
|
+
}
|
|
33
|
+
return () => p.value || i.value || t.value ? y(a.default({ present: t.value })[0], { ref: (o) => {
|
|
34
|
+
const e = w(o);
|
|
35
|
+
return typeof e?.hasAttribute > "u" || (e?.hasAttribute("data-reka-popper-content-wrapper") ? r.value = e.firstElementChild : r.value = e), e;
|
|
36
|
+
} }) : null;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
10
39
|
export {
|
|
11
|
-
|
|
40
|
+
x as Presence_default
|
|
12
41
|
};
|
package/dist/index111.js
CHANGED
|
@@ -1,59 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} else e = k(a);
|
|
15
|
-
const C = (o = !1) => {
|
|
16
|
-
const t = e.collectionRef.value;
|
|
17
|
-
if (!t) return [];
|
|
18
|
-
const r = Array.from(t.querySelectorAll(`[${d}]`)), l = Array.from(e.itemMap.value.values()).sort((n, c) => r.indexOf(n.ref) - r.indexOf(c.ref));
|
|
19
|
-
return o ? l : l.filter((n) => n.ref.dataset.disabled !== "");
|
|
20
|
-
}, E = f({
|
|
21
|
-
name: "CollectionSlot",
|
|
22
|
-
setup(o, { slots: t }) {
|
|
23
|
-
const { primitiveElement: r, currentElement: i } = m();
|
|
24
|
-
return w(i, () => {
|
|
25
|
-
e.collectionRef.value = i.value;
|
|
26
|
-
}), () => v(s, { ref: r }, t);
|
|
27
|
-
}
|
|
28
|
-
}), I = f({
|
|
29
|
-
name: "CollectionItem",
|
|
30
|
-
inheritAttrs: !1,
|
|
31
|
-
props: { value: { validator: () => !0 } },
|
|
32
|
-
setup(o, { slots: t, attrs: r }) {
|
|
33
|
-
const { primitiveElement: i, currentElement: l } = m();
|
|
34
|
-
return x((n) => {
|
|
35
|
-
if (l.value) {
|
|
36
|
-
const c = T(l.value);
|
|
37
|
-
e.itemMap.value.set(c, {
|
|
38
|
-
ref: l.value,
|
|
39
|
-
value: o.value
|
|
40
|
-
}), n(() => e.itemMap.value.delete(c));
|
|
41
|
-
}
|
|
42
|
-
}), () => v(s, {
|
|
1
|
+
import { renderSlotFragments as s } from "./index101.js";
|
|
2
|
+
import { defineComponent as d, Comment as l, mergeProps as f, cloneVNode as c } from "vue";
|
|
3
|
+
const a = d({
|
|
4
|
+
name: "PrimitiveSlot",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
setup(u, { attrs: t, slots: o }) {
|
|
7
|
+
return () => {
|
|
8
|
+
if (!o.default) return null;
|
|
9
|
+
const e = s(o.default()), n = e.findIndex((p) => p.type !== l);
|
|
10
|
+
if (n === -1) return e;
|
|
11
|
+
const r = e[n];
|
|
12
|
+
delete r.props?.ref;
|
|
13
|
+
const m = r.props ? f(t, r.props) : t, i = c({
|
|
43
14
|
...r,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
getItems: C,
|
|
51
|
-
reactiveItems: R,
|
|
52
|
-
itemMapSize: S,
|
|
53
|
-
CollectionSlot: E,
|
|
54
|
-
CollectionItem: I
|
|
55
|
-
};
|
|
56
|
-
}
|
|
15
|
+
props: {}
|
|
16
|
+
}, m);
|
|
17
|
+
return e.length === 1 ? i : (e[n] = i, e);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
});
|
|
57
21
|
export {
|
|
58
|
-
|
|
22
|
+
a as Slot
|
|
59
23
|
};
|