@hefou/dux 0.0.0-stage → 1.0.1
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/LICENSE +21 -0
- package/README.md +121 -2
- package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/cjs/components/Layout.cjs +1 -0
- package/dist/cjs/components/Layout.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/common/Badge.cjs +1 -0
- package/dist/cjs/components/common/Badge.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/common/NavDropdown.cjs +1 -0
- package/dist/cjs/components/common/NavDropdown.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/common/PageHero.cjs +1 -0
- package/dist/cjs/components/common/PageHero.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/common/SocialIcons.cjs +1 -0
- package/dist/cjs/components/common/SocialIcons.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/docs/DocFooter.cjs +1 -0
- package/dist/cjs/components/docs/DocFooter.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/docs/Outline.cjs +1 -0
- package/dist/cjs/components/docs/Outline.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/docs/Sidebar.cjs +1 -0
- package/dist/cjs/components/docs/Sidebar.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/home/Features.cjs +1 -0
- package/dist/cjs/components/home/Features.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/home/Hero.cjs +1 -0
- package/dist/cjs/components/home/Hero.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/home/QuickStart.cjs +1 -0
- package/dist/cjs/components/home/QuickStart.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/layout/Footer.cjs +1 -0
- package/dist/cjs/components/layout/Footer.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/layout/Header.cjs +1 -0
- package/dist/cjs/components/layout/Header.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/pages/ChangeLog.cjs +1 -0
- package/dist/cjs/components/pages/ChangeLog.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/pages/Doc.cjs +1 -0
- package/dist/cjs/components/pages/Doc.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/pages/Home.cjs +1 -0
- package/dist/cjs/components/pages/Home.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/pages/Jump.cjs +1 -0
- package/dist/cjs/components/pages/Jump.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/pages/NotFound.cjs +1 -0
- package/dist/cjs/components/pages/NotFound.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/pages/SinglePage.cjs +1 -0
- package/dist/cjs/components/pages/SinglePage.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/pages/Sponsor.cjs +1 -0
- package/dist/cjs/components/pages/Sponsor.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/search/MiniSearchModal.cjs +1 -0
- package/dist/cjs/components/search/MiniSearchModal.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/components/search/SearchButton.cjs +1 -0
- package/dist/cjs/components/search/SearchButton.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/cjs/composables/search.data.cjs +1 -0
- package/dist/cjs/composables/useIcon.cjs +1 -0
- package/dist/cjs/composables/useLink.cjs +1 -0
- package/dist/cjs/composables/useLocale.cjs +1 -0
- package/dist/cjs/composables/useReadingTime.cjs +1 -0
- package/dist/cjs/composables/useSearch.cjs +1 -0
- package/dist/cjs/config.cjs +1 -0
- package/dist/cjs/dux.css +3 -0
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/locales/de-DE.cjs +1 -0
- package/dist/cjs/locales/en-US.cjs +1 -0
- package/dist/cjs/locales/es-ES.cjs +1 -0
- package/dist/cjs/locales/fr-FR.cjs +1 -0
- package/dist/cjs/locales/ja-JP.cjs +1 -0
- package/dist/cjs/locales/ko-KR.cjs +1 -0
- package/dist/cjs/locales/ru-RU.cjs +1 -0
- package/dist/cjs/locales/zh-CN.cjs +1 -0
- package/dist/cjs/locales/zh-TW.cjs +1 -0
- package/dist/cjs/shims/dayjs.cjs +1 -0
- package/dist/cjs/shims/sanitize-url.cjs +1 -0
- package/dist/esm/components/Layout.js +4 -0
- package/dist/esm/components/Layout.vue_vue_type_script_setup_true_lang.js +51 -0
- package/dist/esm/components/common/Badge.js +4 -0
- package/dist/esm/components/common/Badge.vue_vue_type_script_setup_true_lang.js +20 -0
- package/dist/esm/components/common/NavDropdown.js +4 -0
- package/dist/esm/components/common/NavDropdown.vue_vue_type_script_setup_true_lang.js +75 -0
- package/dist/esm/components/common/PageHero.js +4 -0
- package/dist/esm/components/common/PageHero.vue_vue_type_script_setup_true_lang.js +46 -0
- package/dist/esm/components/common/SocialIcons.js +4 -0
- package/dist/esm/components/common/SocialIcons.vue_vue_type_script_setup_true_lang.js +87 -0
- package/dist/esm/components/docs/DocFooter.js +4 -0
- package/dist/esm/components/docs/DocFooter.vue_vue_type_script_setup_true_lang.js +84 -0
- package/dist/esm/components/docs/Outline.js +4 -0
- package/dist/esm/components/docs/Outline.vue_vue_type_script_setup_true_lang.js +75 -0
- package/dist/esm/components/docs/Sidebar.js +4 -0
- package/dist/esm/components/docs/Sidebar.vue_vue_type_script_setup_true_lang.js +88 -0
- package/dist/esm/components/home/Features.js +4 -0
- package/dist/esm/components/home/Features.vue_vue_type_script_setup_true_lang.js +115 -0
- package/dist/esm/components/home/Hero.js +4 -0
- package/dist/esm/components/home/Hero.vue_vue_type_script_setup_true_lang.js +110 -0
- package/dist/esm/components/home/QuickStart.js +4 -0
- package/dist/esm/components/home/QuickStart.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/esm/components/layout/Footer.js +4 -0
- package/dist/esm/components/layout/Footer.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/esm/components/layout/Header.js +4 -0
- package/dist/esm/components/layout/Header.vue_vue_type_script_setup_true_lang.js +144 -0
- package/dist/esm/components/pages/ChangeLog.js +4 -0
- package/dist/esm/components/pages/ChangeLog.vue_vue_type_script_setup_true_lang.js +22 -0
- package/dist/esm/components/pages/Doc.js +4 -0
- package/dist/esm/components/pages/Doc.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/esm/components/pages/Home.js +4 -0
- package/dist/esm/components/pages/Home.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/esm/components/pages/Jump.js +4 -0
- package/dist/esm/components/pages/Jump.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/esm/components/pages/NotFound.js +4 -0
- package/dist/esm/components/pages/NotFound.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/esm/components/pages/SinglePage.js +4 -0
- package/dist/esm/components/pages/SinglePage.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/esm/components/pages/Sponsor.js +4 -0
- package/dist/esm/components/pages/Sponsor.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/esm/components/search/MiniSearchModal.js +4 -0
- package/dist/esm/components/search/MiniSearchModal.vue_vue_type_script_setup_true_lang.js +121 -0
- package/dist/esm/components/search/SearchButton.js +4 -0
- package/dist/esm/components/search/SearchButton.vue_vue_type_script_setup_true_lang.js +23 -0
- package/dist/esm/composables/search.data.js +20 -0
- package/dist/esm/composables/useIcon.js +12 -0
- package/dist/esm/composables/useLink.js +30 -0
- package/dist/esm/composables/useLocale.js +55 -0
- package/dist/esm/composables/useReadingTime.js +36 -0
- package/dist/esm/composables/useSearch.js +71 -0
- package/dist/esm/config.js +58 -0
- package/dist/esm/dux.css +3 -0
- package/dist/esm/index.js +19 -0
- package/dist/esm/locales/de-DE.js +72 -0
- package/dist/esm/locales/en-US.js +72 -0
- package/dist/esm/locales/es-ES.js +72 -0
- package/dist/esm/locales/fr-FR.js +72 -0
- package/dist/esm/locales/ja-JP.js +72 -0
- package/dist/esm/locales/ko-KR.js +72 -0
- package/dist/esm/locales/ru-RU.js +72 -0
- package/dist/esm/locales/zh-CN.js +72 -0
- package/dist/esm/locales/zh-TW.js +72 -0
- package/dist/esm/shims/dayjs.js +5 -0
- package/dist/esm/shims/sanitize-url.js +5 -0
- package/dist/types/components/Layout.vue.d.ts +3 -0
- package/dist/types/components/common/Badge.vue.d.ts +9 -0
- package/dist/types/components/common/NavDropdown.vue.d.ts +16 -0
- package/dist/types/components/common/PageHero.vue.d.ts +27 -0
- package/dist/types/components/common/SocialIcons.vue.d.ts +9 -0
- package/dist/types/components/docs/DocFooter.vue.d.ts +3 -0
- package/dist/types/components/docs/Outline.vue.d.ts +3 -0
- package/dist/types/components/docs/Sidebar.vue.d.ts +3 -0
- package/dist/types/components/home/Features.vue.d.ts +18 -0
- package/dist/types/components/home/Hero.vue.d.ts +33 -0
- package/dist/types/components/home/QuickStart.vue.d.ts +22 -0
- package/dist/types/components/layout/Footer.vue.d.ts +10 -0
- package/dist/types/components/layout/Header.vue.d.ts +10 -0
- package/dist/types/components/pages/ChangeLog.vue.d.ts +3 -0
- package/dist/types/components/pages/Doc.vue.d.ts +3 -0
- package/dist/types/components/pages/Home.vue.d.ts +3 -0
- package/dist/types/components/pages/Jump.vue.d.ts +3 -0
- package/dist/types/components/pages/NotFound.vue.d.ts +3 -0
- package/dist/types/components/pages/SinglePage.vue.d.ts +3 -0
- package/dist/types/components/pages/Sponsor.vue.d.ts +3 -0
- package/dist/types/components/search/MiniSearchModal.vue.d.ts +3 -0
- package/dist/types/components/search/SearchButton.vue.d.ts +3 -0
- package/dist/types/composables/search.data.d.ts +3 -0
- package/dist/types/composables/useIcon.d.ts +11 -0
- package/dist/types/composables/useLink.d.ts +10 -0
- package/dist/types/composables/useLocale.d.ts +12 -0
- package/dist/types/composables/useReadingTime.d.ts +9 -0
- package/dist/types/composables/useSearch.d.ts +65 -0
- package/dist/types/config.d.ts +6 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/types/index.d.ts +65 -0
- package/package.json +87 -3
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import e from "../docs/Sidebar.js";
|
|
2
|
+
import t from "../docs/Outline.js";
|
|
3
|
+
import n from "../docs/DocFooter.js";
|
|
4
|
+
import { useReadingTime as r } from "../../composables/useReadingTime.js";
|
|
5
|
+
import { computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, normalizeClass as u, openBlock as d, resolveComponent as f, toDisplayString as p, unref as m } from "vue";
|
|
6
|
+
import { useData as h } from "vitepress";
|
|
7
|
+
// components/pages/Doc.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var g = { class: "flex-1" }, _ = { class: "flex-1 relative py-6 lg:gap-10 lg:py-8 xl:grid xl:grid-cols-[1fr_300px]" }, v = { class: "mx-auto w-full min-w-0" }, y = { class: "prose prose-slate dark:prose-invert max-w-none prose-lg" }, b = { class: "mb-6 pb-6 border-b border-gray-200 dark:border-gray-700" }, x = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "mb-4"
|
|
11
|
+
}, S = { class: "flex items-center gap-4 text-sm text-muted-foreground not-prose" }, C = { class: "flex items-center gap-1.5" }, w = { class: "flex items-center gap-1.5" }, T = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "text-xl text-muted-foreground mt-4"
|
|
14
|
+
}, E = { class: "prose-content" }, D = { class: "hidden text-sm xl:block" }, O = /*@__PURE__*/ l({
|
|
15
|
+
__name: "Doc",
|
|
16
|
+
setup(l) {
|
|
17
|
+
let { page: O, site: k, theme: A, frontmatter: j } = h(), { readingTime: M, readingTimeLocale: N } = r(), P = i(() => {
|
|
18
|
+
let e = A.value.sidebar;
|
|
19
|
+
if (!e) return !1;
|
|
20
|
+
if (typeof e == "object" && !Array.isArray(e)) {
|
|
21
|
+
let t = O.value.relativePath;
|
|
22
|
+
for (let [n, r] of Object.entries(e)) if (t.startsWith(n.replace(/^\//, ""))) return (Array.isArray(r) ? r : []).length > 0;
|
|
23
|
+
return !1;
|
|
24
|
+
}
|
|
25
|
+
return (Array.isArray(e) ? e : []).length > 0;
|
|
26
|
+
}), F = i(() => {
|
|
27
|
+
let e = "container mx-auto px-4 flex-1 items-start";
|
|
28
|
+
return P.value ? `${e} md:grid md:grid-cols-[220px_minmax(0,1fr)] md:gap-6 lg:grid-cols-[240px_minmax(0,1fr)] lg:gap-10` : `${e} max-w-6xl`;
|
|
29
|
+
});
|
|
30
|
+
return (r, i) => {
|
|
31
|
+
let l = f("Content");
|
|
32
|
+
return d(), o("div", g, [s("div", { class: u(F.value) }, [c(e), s("main", _, [s("div", v, [s("article", y, [
|
|
33
|
+
s("div", b, [
|
|
34
|
+
m(j).title ? (d(), o("h1", x, p(m(j).title), 1)) : a("", !0),
|
|
35
|
+
s("div", S, [s("div", C, [i[0] ||= s("svg", {
|
|
36
|
+
class: "w-4 h-4",
|
|
37
|
+
fill: "none",
|
|
38
|
+
stroke: "currentColor",
|
|
39
|
+
viewBox: "0 0 24 24"
|
|
40
|
+
}, [s("path", {
|
|
41
|
+
"stroke-linecap": "round",
|
|
42
|
+
"stroke-linejoin": "round",
|
|
43
|
+
"stroke-width": "2",
|
|
44
|
+
d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
45
|
+
})], -1), s("span", null, p(m(N).time) + ":" + p(m(M).time), 1)]), s("div", w, [i[1] ||= s("svg", {
|
|
46
|
+
class: "w-4 h-4",
|
|
47
|
+
fill: "none",
|
|
48
|
+
stroke: "currentColor",
|
|
49
|
+
viewBox: "0 0 24 24"
|
|
50
|
+
}, [s("path", {
|
|
51
|
+
"stroke-linecap": "round",
|
|
52
|
+
"stroke-linejoin": "round",
|
|
53
|
+
"stroke-width": "2",
|
|
54
|
+
d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
55
|
+
})], -1), s("span", null, p(m(M).wordsText), 1)])]),
|
|
56
|
+
m(j).description ? (d(), o("p", T, p(m(j).description), 1)) : a("", !0)
|
|
57
|
+
]),
|
|
58
|
+
s("div", E, [c(l)]),
|
|
59
|
+
c(n)
|
|
60
|
+
])]), s("div", D, [c(t)])])], 2)]);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
export { O as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import e from "../home/Hero.js";
|
|
2
|
+
import t from "../home/Features.js";
|
|
3
|
+
import n from "../home/QuickStart.js";
|
|
4
|
+
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, openBlock as u, resolveComponent as d } from "vue";
|
|
5
|
+
import { useData as f } from "vitepress";
|
|
6
|
+
// components/pages/Home.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var p = { class: "home" }, m = { class: "custom-content" }, h = /*@__PURE__*/ l({
|
|
8
|
+
__name: "Home",
|
|
9
|
+
setup(l) {
|
|
10
|
+
let { frontmatter: h } = f(), g = r(() => h.value.hero || {}), _ = r(() => h.value.features || []), v = r(() => h.value.featuresConfig), y = r(() => h.value.quickStart);
|
|
11
|
+
return (r, l) => {
|
|
12
|
+
let f = d("Content");
|
|
13
|
+
return u(), o("div", p, [
|
|
14
|
+
c(e, { hero: g.value }, null, 8, ["hero"]),
|
|
15
|
+
_.value.length ? (u(), i(t, {
|
|
16
|
+
key: 0,
|
|
17
|
+
features: _.value,
|
|
18
|
+
config: v.value
|
|
19
|
+
}, null, 8, ["features", "config"])) : a("", !0),
|
|
20
|
+
y.value ? (u(), i(n, {
|
|
21
|
+
key: 1,
|
|
22
|
+
quickStart: y.value
|
|
23
|
+
}, null, 8, ["quickStart"])) : a("", !0),
|
|
24
|
+
s("div", m, [c(f)])
|
|
25
|
+
]);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export { h as default };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { useLocale as e } from "../../composables/useLocale.js";
|
|
2
|
+
import { useLink as t } from "../../composables/useLink.js";
|
|
3
|
+
import { Fragment as n, Transition as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, onMounted as d, openBlock as f, ref as p, renderList as m, toDisplayString as h, unref as g, withCtx as _ } from "vue";
|
|
4
|
+
import { useData as v } from "vitepress";
|
|
5
|
+
// components/pages/Jump.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var y = { class: "jump-layout min-h-screen flex items-center justify-center bg-linear-to-br from-white via-primary-50/30 to-primary-100/50 dark:bg-linear-to-br dark:from-gray-900 dark:via-gray-800/50 dark:to-primary-950/30" }, b = { class: "text-center z-10 max-w-md mx-auto px-6" }, x = { class: "mb-8" }, S = { class: "text-3xl font-bold text-gray-900 dark:text-white mb-2" }, C = { class: "text-gray-600 dark:text-gray-400" }, w = { class: "mb-8" }, T = { class: "text-gray-700 dark:text-gray-300 mb-2" }, E = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "text-sm text-gray-500 dark:text-gray-400"
|
|
9
|
+
}, D = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "mt-4"
|
|
12
|
+
}, O = { class: "inline-flex items-center px-4 py-2 rounded-full bg-primary-100 dark:bg-primary-900/50 text-primary-700 dark:text-primary-300" }, k = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "mt-8"
|
|
15
|
+
}, A = { class: "text-sm text-gray-600 dark:text-gray-400 mb-4" }, j = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "block text-xs mt-1"
|
|
18
|
+
}, M = { class: "flex flex-wrap justify-center gap-3" }, N = ["onClick"], P = { class: "text-gray-700 dark:text-gray-300 group-hover:text-primary-700 dark:group-hover:text-primary-300 font-medium" }, F = /*@__PURE__*/ u({
|
|
19
|
+
__name: "Jump",
|
|
20
|
+
setup(u) {
|
|
21
|
+
let { site: F, frontmatter: I } = v(), { resolveLink: L } = t(), R = e("jump"), z = p(!1), B = p(3), V = i(() => {
|
|
22
|
+
let e = F.value.locales || {};
|
|
23
|
+
return Object.entries(e).map(([e, t]) => {
|
|
24
|
+
let n = t, r = n.lang || e, i = "";
|
|
25
|
+
return i = n.link ? L(n.link) : L(e === "root" ? `/${r}/` : `/${e}/`), {
|
|
26
|
+
key: e,
|
|
27
|
+
label: n.label || e,
|
|
28
|
+
lang: r,
|
|
29
|
+
path: i
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
}), H = i(() => ({
|
|
33
|
+
redirecting: R.value?.redirecting || "Redirecting to preferred language...",
|
|
34
|
+
redirectingSecondary: R.value?.redirectingSecondary || "",
|
|
35
|
+
orChooseLanguage: R.value?.orChooseLanguage || "Or choose language",
|
|
36
|
+
orChooseLanguageSecondary: R.value?.orChooseLanguageSecondary || "",
|
|
37
|
+
countdown: R.value?.countdown || "s"
|
|
38
|
+
})), U = () => {
|
|
39
|
+
let e = new URLSearchParams(window.location.search).get("lang");
|
|
40
|
+
if (e) {
|
|
41
|
+
let t = V.value.find((t) => t.lang === e || t.key === e);
|
|
42
|
+
if (t) return t.key;
|
|
43
|
+
}
|
|
44
|
+
let t = navigator.language?.toLowerCase().replace("_", "-");
|
|
45
|
+
if (t) {
|
|
46
|
+
let e = V.value.find((e) => e.lang.toLowerCase() === t);
|
|
47
|
+
if (e) return e.key;
|
|
48
|
+
let n = t.split("-")[0], r = V.value.find((e) => e.lang.toLowerCase().startsWith(n));
|
|
49
|
+
if (r) return r.key;
|
|
50
|
+
}
|
|
51
|
+
return V.value[0]?.key || "root";
|
|
52
|
+
}, W = (e) => {
|
|
53
|
+
let t = V.value.find((t) => t.key === e);
|
|
54
|
+
t && (window.location.href = t.path);
|
|
55
|
+
};
|
|
56
|
+
return d(() => {
|
|
57
|
+
let e = U();
|
|
58
|
+
z.value = !0;
|
|
59
|
+
let t = setInterval(() => {
|
|
60
|
+
B.value--, B.value <= 0 && (clearInterval(t), W(e));
|
|
61
|
+
}, 1e3);
|
|
62
|
+
}), (e, t) => (f(), o("div", y, [t[3] ||= s("div", { class: "absolute inset-0 overflow-hidden" }, [
|
|
63
|
+
s("div", { class: "absolute -top-40 -right-32 w-80 h-80 bg-primary-200/20 dark:bg-primary-800/20 rounded-full blur-3xl" }),
|
|
64
|
+
s("div", { class: "absolute -bottom-40 -left-32 w-96 h-96 bg-primary-300/15 dark:bg-primary-700/15 rounded-full blur-3xl" }),
|
|
65
|
+
s("div", { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-150 h-150 bg-linear-to-r from-primary-100/10 to-primary-200/10 dark:from-primary-900/10 dark:to-primary-800/10 rounded-full blur-3xl" })
|
|
66
|
+
], -1), s("div", b, [
|
|
67
|
+
s("div", x, [
|
|
68
|
+
t[0] ||= s("div", { class: "icon-[heroicons--globe-alt] w-16 h-16 text-primary-500 mx-auto mb-4" }, null, -1),
|
|
69
|
+
s("h1", S, h(g(I).title || g(F).title), 1),
|
|
70
|
+
s("p", C, h(g(I).description || g(F).description), 1)
|
|
71
|
+
]),
|
|
72
|
+
s("div", w, [
|
|
73
|
+
t[2] ||= s("div", { class: "flex items-center justify-center mb-4" }, [s("div", { class: "animate-spin rounded-full h-8 w-8 border-b-2 border-primary-500" })], -1),
|
|
74
|
+
s("p", T, h(H.value.redirecting), 1),
|
|
75
|
+
H.value.redirectingSecondary ? (f(), o("p", E, h(H.value.redirectingSecondary), 1)) : a("", !0),
|
|
76
|
+
B.value > 0 ? (f(), o("div", D, [s("div", O, [t[1] ||= s("div", { class: "icon-[heroicons--clock] w-4 h-4 mr-2" }, null, -1), c(" " + h(B.value) + h(H.value.countdown), 1)])])) : a("", !0)
|
|
77
|
+
]),
|
|
78
|
+
l(r, {
|
|
79
|
+
"enter-active-class": "transition-all duration-500 ease-out",
|
|
80
|
+
"enter-from-class": "opacity-0 transform scale-95 translate-y-4",
|
|
81
|
+
"enter-to-class": "opacity-100 transform scale-100 translate-y-0"
|
|
82
|
+
}, {
|
|
83
|
+
default: _(() => [z.value ? (f(), o("div", k, [s("p", A, [s("span", null, h(H.value.orChooseLanguage), 1), H.value.orChooseLanguageSecondary ? (f(), o("span", j, h(H.value.orChooseLanguageSecondary), 1)) : a("", !0)]), s("div", M, [(f(!0), o(n, null, m(V.value, (e) => (f(), o("button", {
|
|
84
|
+
key: e.key,
|
|
85
|
+
onClick: (t) => W(e.key),
|
|
86
|
+
class: "px-4 py-2 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-primary-300 dark:hover:border-primary-600 hover:bg-primary-50 dark:hover:bg-primary-900/30 transition-all group"
|
|
87
|
+
}, [s("span", P, h(e.label), 1)], 8, N))), 128))])])) : a("", !0)]),
|
|
88
|
+
_: 1
|
|
89
|
+
})
|
|
90
|
+
])]));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
export { F as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useLocale as e } from "../../composables/useLocale.js";
|
|
2
|
+
import { createElementBlock as t, createElementVNode as n, createTextVNode as r, defineComponent as i, openBlock as a, toDisplayString as o, unref as s } from "vue";
|
|
3
|
+
// components/pages/NotFound.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var c = { class: "not-found" }, l = { class: "container mx-auto px-4 py-16 text-center" }, u = { class: "text-6xl font-bold text-gray-900 dark:text-gray-100 mb-4" }, d = { class: "text-xl text-gray-600 dark:text-gray-400 mb-8" }, f = { class: "flex flex-col sm:flex-row gap-4 justify-center" }, p = {
|
|
5
|
+
href: "/",
|
|
6
|
+
class: "inline-flex items-center gap-2 px-6 py-3 bg-primary-600 hover:bg-primary-700 text-white no-underline rounded-lg font-medium transition-colors duration-200"
|
|
7
|
+
}, m = /*@__PURE__*/ i({
|
|
8
|
+
__name: "NotFound",
|
|
9
|
+
setup(i) {
|
|
10
|
+
let m = e("notFound"), h = () => {
|
|
11
|
+
window.history.back();
|
|
12
|
+
};
|
|
13
|
+
return (e, i) => (a(), t("div", c, [n("div", l, [
|
|
14
|
+
i[2] ||= n("div", { class: "mb-8" }, [n("div", { class: "icon-[heroicons--face-frown] h-24 w-24 mx-auto text-gray-400 dark:text-gray-600" })], -1),
|
|
15
|
+
n("h1", u, o(s(m).title), 1),
|
|
16
|
+
n("p", d, o(s(m).content), 1),
|
|
17
|
+
n("div", f, [n("a", p, [i[0] ||= n("div", { class: "icon-[heroicons--home] h-5 w-5" }, null, -1), r(" " + o(s(m).backToHome), 1)]), n("button", {
|
|
18
|
+
onClick: h,
|
|
19
|
+
class: "inline-flex items-center gap-2 px-6 py-3 border-2 border-gray-300 dark:border-gray-600 hover:border-primary-500 dark:hover:border-primary-400 text-gray-700 dark:text-gray-300 rounded-lg font-medium transition-colors duration-200"
|
|
20
|
+
}, [i[1] ||= n("div", { class: "icon-[heroicons--arrow-left] h-5 w-5" }, null, -1), r(" " + o(s(m).previousPage), 1)])])
|
|
21
|
+
])]));
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export { m as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import e from "../common/PageHero.js";
|
|
2
|
+
import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, openBlock as l, resolveComponent as u, unref as d } from "vue";
|
|
3
|
+
import { useData as f } from "vitepress";
|
|
4
|
+
// components/pages/SinglePage.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var p = { class: "page-container" }, m = { class: "page-main" }, h = /*@__PURE__*/ s({
|
|
6
|
+
__name: "SinglePage",
|
|
7
|
+
setup(s) {
|
|
8
|
+
let { page: h, frontmatter: g } = f(), _ = t(() => g.value.maxWidth || "max-w-6xl"), v = t(() => g.value.heroColor || "info"), y = t(() => g.value.heroIcon || ""), b = t(() => g.value.heroSize || "md");
|
|
9
|
+
return (t, s) => {
|
|
10
|
+
let f = u("Content");
|
|
11
|
+
return l(), i("div", p, [d(g).title ? (l(), n(e, {
|
|
12
|
+
key: 0,
|
|
13
|
+
title: d(g).title,
|
|
14
|
+
description: d(g).description,
|
|
15
|
+
icon: y.value,
|
|
16
|
+
color: v.value,
|
|
17
|
+
align: "center",
|
|
18
|
+
size: b.value
|
|
19
|
+
}, null, 8, [
|
|
20
|
+
"title",
|
|
21
|
+
"description",
|
|
22
|
+
"icon",
|
|
23
|
+
"color",
|
|
24
|
+
"size"
|
|
25
|
+
])) : r("", !0), a("main", m, [a("div", { class: c(["page-content", _.value]) }, [o(f)], 2)])]);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export { h as default };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import e from "../common/PageHero.js";
|
|
2
|
+
import { useLocale as t } from "../../composables/useLocale.js";
|
|
3
|
+
import { useIcon as n } from "../../composables/useIcon.js";
|
|
4
|
+
import { useLink as r } from "../../composables/useLink.js";
|
|
5
|
+
import { Fragment as i, computed as a, createCommentVNode as ee, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as te, normalizeClass as u, openBlock as d, ref as f, renderList as p, resolveComponent as ne, toDisplayString as m, unref as h } from "vue";
|
|
6
|
+
import { useData as re } from "vitepress";
|
|
7
|
+
// components/pages/Sponsor.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var ie = { class: "sponsor-container" }, ae = { class: "sponsor-main" }, oe = { class: "sponsor-main-container" }, se = { class: "sponsor-grid" }, ce = { class: "sponsor-form" }, g = { class: "sponsor-card" }, _ = { class: "sponsor-card-title" }, v = { class: "sponsor-payment-methods" }, y = ["onClick"], b = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "sponsor-payment-icon text-lg"
|
|
11
|
+
}, x = ["src", "alt"], S = ["src", "alt"], C = ["innerHTML"], w = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "icon-[tabler--coin] sponsor-payment-icon"
|
|
14
|
+
}, T = { class: "sponsor-payment-qrcode" }, E = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "sponsor-payment-qrcode-wrapper"
|
|
17
|
+
}, D = ["src", "alt"], O = { class: "sponsor-payment-qrcode-text" }, k = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "text-center"
|
|
20
|
+
}, A = ["href"], j = { class: "sponsor-payment-description" }, M = { class: "sponsor-card" }, N = { class: "sponsor-content prose-content" }, P = { class: "sponsor-sidebar" }, le = { class: "sponsor-sidebar-card" }, F = { class: "sponsor-sidebar-title" }, I = { class: "sponsor-list" }, L = { class: "sponsor-avatar" }, R = { class: "sponsor-info" }, z = { class: "sponsor-info-header" }, B = { class: "sponsor-info-name" }, V = { class: "sponsor-info-amount" }, H = { class: "sponsor-info-message" }, U = { class: "sponsor-info-date" }, W = { class: "sponsor-stats" }, ue = { class: "sponsor-stats-grid" }, de = { class: "sponsor-stats-value" }, fe = { class: "sponsor-stats-label" }, pe = { class: "sponsor-stats-value" }, me = { class: "sponsor-stats-label" }, G = /*@__PURE__*/ te({
|
|
21
|
+
__name: "Sponsor",
|
|
22
|
+
setup(te) {
|
|
23
|
+
let { frontmatter: G } = re(), { isEmoji: he, isImageUrl: K } = n(), { resolveAsset: q } = r(), J = t("sponsor"), Y = f("wechat"), X = a(() => G.value.sponsors || []), Z = a(() => {
|
|
24
|
+
let e = X.value;
|
|
25
|
+
return {
|
|
26
|
+
totalAmount: e.reduce((e, t) => e + (t.amount || 0), 0),
|
|
27
|
+
totalSponsors: e.length
|
|
28
|
+
};
|
|
29
|
+
}), Q = a(() => G.value.paymentMethods || {}), ge = (e) => ({
|
|
30
|
+
green: "bg-green-500 text-white shadow-lg",
|
|
31
|
+
blue: "bg-blue-500 text-white shadow-lg",
|
|
32
|
+
indigo: "bg-indigo-500 text-white shadow-lg",
|
|
33
|
+
red: "bg-red-500 text-white shadow-lg",
|
|
34
|
+
yellow: "bg-yellow-500 text-white shadow-lg",
|
|
35
|
+
purple: "bg-purple-500 text-white shadow-lg"
|
|
36
|
+
})[e] || "bg-primary-500 text-white shadow-lg", $ = (e) => e ? K(e) ? "image" : e.includes("<svg") || e.endsWith(".svg") ? "svg" : he(e) ? "emoji" : "class" : "class";
|
|
37
|
+
return (t, n) => {
|
|
38
|
+
let r = ne("Content");
|
|
39
|
+
return d(), o("div", ie, [l(e, {
|
|
40
|
+
title: h(G).title,
|
|
41
|
+
description: h(G).description,
|
|
42
|
+
icon: "icon-[tabler--heart-filled]",
|
|
43
|
+
color: "sponsor",
|
|
44
|
+
align: "center",
|
|
45
|
+
size: "md"
|
|
46
|
+
}, null, 8, ["title", "description"]), s("main", ae, [s("div", oe, [s("div", se, [s("div", ce, [s("div", g, [
|
|
47
|
+
s("h2", _, m(h(J).selectPaymentMethod), 1),
|
|
48
|
+
s("div", v, [(d(!0), o(i, null, p(Q.value, (e, t) => (d(), o("button", {
|
|
49
|
+
key: t,
|
|
50
|
+
onClick: (e) => Y.value = String(t),
|
|
51
|
+
class: u(["sponsor-payment-btn", Y.value === String(t) ? ge(e.color) : "bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"])
|
|
52
|
+
}, [e.icon ? (d(), o(i, { key: 0 }, [$(e.icon) === "emoji" ? (d(), o("span", b, m(e.icon), 1)) : $(e.icon) === "image" ? (d(), o("img", {
|
|
53
|
+
key: 1,
|
|
54
|
+
src: h(q)(e.icon),
|
|
55
|
+
alt: e.name,
|
|
56
|
+
class: "sponsor-payment-icon w-5 h-5 object-contain"
|
|
57
|
+
}, null, 8, x)) : $(e.icon) === "svg" && e.icon.endsWith(".svg") ? (d(), o("img", {
|
|
58
|
+
key: 2,
|
|
59
|
+
src: h(q)(e.icon),
|
|
60
|
+
alt: e.name,
|
|
61
|
+
class: "sponsor-payment-icon w-5 h-5"
|
|
62
|
+
}, null, 8, S)) : $(e.icon) === "svg" && e.icon.includes("<svg") ? (d(), o("div", {
|
|
63
|
+
key: 3,
|
|
64
|
+
innerHTML: e.icon,
|
|
65
|
+
class: "sponsor-payment-icon w-5 h-5"
|
|
66
|
+
}, null, 8, C)) : (d(), o("div", {
|
|
67
|
+
key: 4,
|
|
68
|
+
class: u(e.icon + " sponsor-payment-icon")
|
|
69
|
+
}, null, 2))], 64)) : (d(), o("div", w)), c(" " + m(e.name), 1)], 10, y))), 128))]),
|
|
70
|
+
s("div", T, [Q.value[Y.value].qrcode ? (d(), o("div", E, [s("img", {
|
|
71
|
+
src: h(q)(Q.value[Y.value].qrcode),
|
|
72
|
+
alt: Q.value[Y.value].name,
|
|
73
|
+
class: "sponsor-payment-qrcode-img"
|
|
74
|
+
}, null, 8, D), s("p", O, m(Q.value[Y.value].description), 1)])) : Q.value[Y.value].link ? (d(), o("div", k, [s("a", {
|
|
75
|
+
href: Q.value[Y.value].link,
|
|
76
|
+
target: "_blank",
|
|
77
|
+
class: "sponsor-payment-link"
|
|
78
|
+
}, [n[0] ||= s("div", { class: "icon-[tabler--external-link] h-5 w-5" }, null, -1), c(" " + m(Q.value[Y.value].name), 1)], 8, A), s("p", j, m(Q.value[Y.value].description), 1)])) : ee("", !0)])
|
|
79
|
+
]), s("div", M, [s("div", N, [l(r)])])]), s("div", P, [s("div", le, [
|
|
80
|
+
s("h3", F, [n[1] ||= s("div", { class: "sponsor-sidebar-icon icon-[tabler--users]" }, null, -1), c(" " + m(h(J).recentSupporters), 1)]),
|
|
81
|
+
s("div", I, [(d(!0), o(i, null, p(X.value, (e, t) => (d(), o("div", {
|
|
82
|
+
key: t,
|
|
83
|
+
class: "sponsor-list-item"
|
|
84
|
+
}, [s("div", L, m(e.name.charAt(0)), 1), s("div", R, [
|
|
85
|
+
s("div", z, [s("span", B, m(e.name), 1), s("span", V, "¥" + m(e.amount), 1)]),
|
|
86
|
+
s("p", H, m(e.message), 1),
|
|
87
|
+
s("p", U, m(e.date), 1)
|
|
88
|
+
])]))), 128))]),
|
|
89
|
+
s("div", W, [s("div", ue, [s("div", null, [s("p", de, m(Z.value.totalSponsors), 1), s("p", fe, m(h(J).totalSupporters), 1)]), s("div", null, [s("p", pe, "¥" + m(Z.value.totalAmount.toLocaleString()), 1), s("p", me, m(h(J).totalAmount), 1)])])])
|
|
90
|
+
])])])])])]);
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
export { G as default };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { useLocale as e } from "../../composables/useLocale.js";
|
|
2
|
+
import { useLink as t } from "../../composables/useLink.js";
|
|
3
|
+
import { closeSearch as n, initSearchIndex as ee, isSearchOpen as r, navigateResults as i, performSearch as a, searchQuery as o, searchResults as s, selectResult as te, selectedIndex as c } from "../../composables/useSearch.js";
|
|
4
|
+
import { Fragment as l, Teleport as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, defineComponent as ne, isRef as re, nextTick as ie, normalizeClass as ae, onMounted as oe, onUnmounted as h, openBlock as g, ref as _, renderList as v, toDisplayString as y, unref as b, vModelText as x, watch as S, withDirectives as C, withModifiers as w } from "vue";
|
|
5
|
+
import { useRouter as T } from "vitepress";
|
|
6
|
+
// components/search/MiniSearchModal.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var E = { class: "relative w-full max-w-2xl bg-white dark:bg-gray-900/80 backdrop-blur-xl border border-gray-200/50 dark:border-gray-800/50 rounded-xl shadow-2xl overflow-hidden search-container" }, D = { class: "search-box border-b border-gray-200 dark:border-gray-800" }, O = { class: "flex items-center px-4" }, k = ["placeholder"], A = ["aria-label"], j = { class: "search-results max-h-[60vh] overflow-y-auto" }, M = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "p-8 text-center"
|
|
10
|
+
}, N = { class: "text-gray-500 dark:text-gray-400" }, P = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "py-2"
|
|
13
|
+
}, se = [
|
|
14
|
+
"href",
|
|
15
|
+
"onClick",
|
|
16
|
+
"onMouseenter"
|
|
17
|
+
], F = { class: "flex items-start gap-3" }, I = { class: "flex-1 min-w-0" }, L = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "text-xs text-gray-500 dark:text-gray-400 mb-1"
|
|
20
|
+
}, R = { class: "text-sm font-medium text-gray-900 dark:text-gray-100 mb-1" }, z = { class: "text-sm text-gray-600 dark:text-gray-400 line-clamp-2" }, B = {
|
|
21
|
+
key: 2,
|
|
22
|
+
class: "p-8 text-center"
|
|
23
|
+
}, V = { class: "text-gray-500 dark:text-gray-400" }, H = { class: "search-footer border-t border-gray-200 dark:border-gray-800 px-4 py-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400" }, U = { class: "flex items-center gap-4" }, W = { class: "flex items-center gap-1" }, G = ["aria-label"], K = { class: "flex items-center gap-1" }, ce = ["aria-label"], le = ["aria-label"], ue = ["aria-label"], q = /*@__PURE__*/ ne({
|
|
24
|
+
__name: "MiniSearchModal",
|
|
25
|
+
setup(ne) {
|
|
26
|
+
let q = _(), de = T(), { resolveLink: J } = t(), Y = e("search");
|
|
27
|
+
oe(async () => {
|
|
28
|
+
await ee(), document.addEventListener("keydown", $);
|
|
29
|
+
}), h(() => {
|
|
30
|
+
document.removeEventListener("keydown", $);
|
|
31
|
+
}), S(r, async (e) => {
|
|
32
|
+
e && (await ie(), q.value?.focus());
|
|
33
|
+
});
|
|
34
|
+
let fe = () => {
|
|
35
|
+
a(o.value);
|
|
36
|
+
}, X = () => {
|
|
37
|
+
o.value = "", s.value = [], c.value = 0, q.value?.focus();
|
|
38
|
+
}, Z = (e) => {
|
|
39
|
+
te(e, (e) => {
|
|
40
|
+
de.go(J(e));
|
|
41
|
+
});
|
|
42
|
+
}, Q = () => {
|
|
43
|
+
n();
|
|
44
|
+
}, pe = (e) => {
|
|
45
|
+
switch (e.key) {
|
|
46
|
+
case "ArrowUp":
|
|
47
|
+
e.preventDefault(), i("up");
|
|
48
|
+
break;
|
|
49
|
+
case "ArrowDown":
|
|
50
|
+
e.preventDefault(), i("down");
|
|
51
|
+
break;
|
|
52
|
+
case "Enter":
|
|
53
|
+
e.preventDefault(), Z(c.value);
|
|
54
|
+
break;
|
|
55
|
+
case "Escape": e.preventDefault(), Q();
|
|
56
|
+
}
|
|
57
|
+
}, $ = (e) => {
|
|
58
|
+
(e.metaKey || e.ctrlKey) && e.key === "k" && (e.preventDefault(), r.value ? Q() : r.value = !0);
|
|
59
|
+
};
|
|
60
|
+
return (e, t) => (g(), d(u, { to: "body" }, [b(r) ? (g(), p("div", {
|
|
61
|
+
key: 0,
|
|
62
|
+
class: "fixed inset-0 z-100 flex items-start justify-center p-4 sm:p-6 md:p-20",
|
|
63
|
+
onClick: w(Q, ["self"])
|
|
64
|
+
}, [m("div", {
|
|
65
|
+
class: "fixed inset-0 bg-black/50 backdrop-blur-sm search-modal",
|
|
66
|
+
onClick: Q
|
|
67
|
+
}), m("div", E, [
|
|
68
|
+
m("div", D, [m("div", O, [
|
|
69
|
+
t[2] ||= m("div", { class: "icon-[heroicons--magnifying-glass] h-5 w-5 text-gray-400 dark:text-gray-500" }, null, -1),
|
|
70
|
+
C(m("input", {
|
|
71
|
+
ref_key: "searchInput",
|
|
72
|
+
ref: q,
|
|
73
|
+
"onUpdate:modelValue": t[0] ||= (e) => re(o) ? o.value = e : null,
|
|
74
|
+
type: "text",
|
|
75
|
+
placeholder: b(Y).button.buttonText,
|
|
76
|
+
class: "flex-1 px-3 py-4 text-base bg-transparent outline-none text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400",
|
|
77
|
+
onInput: fe,
|
|
78
|
+
onKeydown: pe
|
|
79
|
+
}, null, 40, k), [[x, b(o)]]),
|
|
80
|
+
b(o) ? (g(), p("button", {
|
|
81
|
+
key: 0,
|
|
82
|
+
onClick: X,
|
|
83
|
+
class: "p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded",
|
|
84
|
+
"aria-label": b(Y).modal.resetButtonTitle
|
|
85
|
+
}, [...t[1] ||= [m("div", { class: "icon-[heroicons--x-mark] h-4 w-4 text-gray-400 dark:text-gray-500" }, null, -1)]], 8, A)) : f("", !0)
|
|
86
|
+
])]),
|
|
87
|
+
m("div", j, [b(o) && b(s).length === 0 ? (g(), p("div", M, [t[3] ||= m("div", { class: "icon-[heroicons--magnifying-glass] h-12 w-12 mx-auto text-gray-300 dark:text-gray-600 mb-3" }, null, -1), m("p", N, y(b(Y).modal.noResultsText), 1)])) : b(s).length > 0 ? (g(), p("div", P, [(g(!0), p(l, null, v(b(s), (e, n) => (g(), p("a", {
|
|
88
|
+
key: e.id,
|
|
89
|
+
href: b(J)(e.url),
|
|
90
|
+
class: ae(["search-result block px-4 py-3 hover:bg-primary-600/10 transition-colors", { "bg-primary-600/10": b(c) === n }]),
|
|
91
|
+
onClick: w((e) => Z(n), ["prevent"]),
|
|
92
|
+
onMouseenter: (e) => c.value = n
|
|
93
|
+
}, [m("div", F, [t[4] ||= m("div", { class: "icon-[heroicons--document-text] h-5 w-5 text-gray-400 dark:text-gray-500 mt-0.5 shrink-0" }, null, -1), m("div", I, [
|
|
94
|
+
e.section ? (g(), p("div", L, y(e.section), 1)) : f("", !0),
|
|
95
|
+
m("h3", R, y(e.title), 1),
|
|
96
|
+
m("p", z, y(e.text), 1)
|
|
97
|
+
])])], 42, se))), 128))])) : (g(), p("div", B, [t[5] ||= m("div", { class: "icon-[heroicons--magnifying-glass] h-12 w-12 mx-auto text-gray-300 dark:text-gray-600 mb-3" }, null, -1), m("p", V, y(b(Y).button.buttonText), 1)]))]),
|
|
98
|
+
m("div", H, [m("div", U, [m("span", W, [m("kbd", {
|
|
99
|
+
class: "flex items-center",
|
|
100
|
+
"aria-label": b(Y).modal.footer.selectKeyAriaLabel
|
|
101
|
+
}, [...t[6] ||= [m("div", { class: "icon-[heroicons--arrow-turn-down-left] h-3 w-3" }, null, -1)]], 8, G), m("span", null, y(b(Y).modal.footer.selectText), 1)]), m("span", K, [
|
|
102
|
+
m("kbd", {
|
|
103
|
+
class: "flex items-center",
|
|
104
|
+
"aria-label": b(Y).modal.footer.navigateUpKeyAriaLabel
|
|
105
|
+
}, [...t[7] ||= [m("div", { class: "icon-[heroicons--arrow-up] h-3 w-3" }, null, -1)]], 8, ce),
|
|
106
|
+
m("kbd", {
|
|
107
|
+
class: "flex items-center",
|
|
108
|
+
"aria-label": b(Y).modal.footer.navigateDownKeyAriaLabel
|
|
109
|
+
}, [...t[8] ||= [m("div", { class: "icon-[heroicons--arrow-down] h-3 w-3" }, null, -1)]], 8, le),
|
|
110
|
+
m("span", null, y(b(Y).modal.footer.navigateText), 1)
|
|
111
|
+
])]), m("button", {
|
|
112
|
+
onClick: Q,
|
|
113
|
+
class: "flex items-center gap-1 hover:text-gray-700 dark:hover:text-gray-300"
|
|
114
|
+
}, [m("kbd", {
|
|
115
|
+
class: "flex items-center",
|
|
116
|
+
"aria-label": b(Y).modal.footer.closeKeyAriaLabel
|
|
117
|
+
}, [...t[9] ||= [m("div", { class: "icon-[heroicons--x-mark] h-3 w-3" }, null, -1)]], 8, ue), m("span", null, y(b(Y).modal.footer.closeText), 1)])])
|
|
118
|
+
])])) : f("", !0)]));
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
export { q as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { openSearch as e } from "../../composables/useSearch.js";
|
|
2
|
+
import { useLocale as t } from "../../composables/useLocale.js";
|
|
3
|
+
import { createElementBlock as n, createElementVNode as r, defineComponent as i, openBlock as a, toDisplayString as o, unref as s } from "vue";
|
|
4
|
+
// components/search/SearchButton.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var c = ["aria-label"], l = { class: "hidden sm:inline-block" }, u = /*@__PURE__*/ i({
|
|
6
|
+
__name: "SearchButton",
|
|
7
|
+
setup(i) {
|
|
8
|
+
let u = t("search"), d = () => {
|
|
9
|
+
e();
|
|
10
|
+
};
|
|
11
|
+
return (e, t) => (a(), n("button", {
|
|
12
|
+
type: "button",
|
|
13
|
+
onClick: d,
|
|
14
|
+
class: "search-button inline-flex items-center gap-2 px-3 py-1.5 h-8 text-sm text-gray-600 dark:text-gray-400 bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-lg transition-colors",
|
|
15
|
+
"aria-label": s(u).button?.buttonAriaLabel
|
|
16
|
+
}, [
|
|
17
|
+
t[0] ||= r("div", { class: "icon-[heroicons--magnifying-glass] h-4 w-4" }, null, -1),
|
|
18
|
+
r("span", l, o(s(u).button?.buttonText), 1),
|
|
19
|
+
t[1] ||= r("kbd", { class: "hidden sm:inline-flex items-center gap-1 ml-auto" }, [r("span", { class: "search-kbd" }, "⌘"), r("span", { class: "search-kbd" }, "K")], -1)
|
|
20
|
+
], 8, c));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export { u as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createContentLoader as e } from "vitepress";
|
|
2
|
+
// composables/search.data.ts
|
|
3
|
+
var t = e("**/*.md", {
|
|
4
|
+
includeSrc: !0,
|
|
5
|
+
render: !0,
|
|
6
|
+
excerpt: !1,
|
|
7
|
+
transform(e) {
|
|
8
|
+
return e.map((e, t) => {
|
|
9
|
+
let n = e.src || "", r = n?.match(/^#{1,4}\s+(.+)$/m), i = r ? r[1].trim() : void 0, a = e.url.split("/")[1] || "";
|
|
10
|
+
return {
|
|
11
|
+
id: `doc-${t}`,
|
|
12
|
+
title: i,
|
|
13
|
+
text: n,
|
|
14
|
+
url: e.url,
|
|
15
|
+
section: a.charAt(0).toUpperCase() + a.slice(1)
|
|
16
|
+
};
|
|
17
|
+
}).filter((e) => e.title);
|
|
18
|
+
}
|
|
19
|
+
}), n = t;
|
|
20
|
+
export { n as data, t as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { computed as e } from "vue";
|
|
2
|
+
// composables/useIcon.ts
|
|
3
|
+
function t() {
|
|
4
|
+
let t = (e) => e ? e.startsWith("icon-[") || !e.includes("-") || e.length <= 3 ? e : e.includes("--") ? `icon-[${e}]` : `icon-[heroicons--${e}]` : "";
|
|
5
|
+
return {
|
|
6
|
+
getIconClass: t,
|
|
7
|
+
useIconClass: (n) => e(() => t(n.value)),
|
|
8
|
+
isEmoji: (e) => e ? !e.includes("-") && e.length <= 3 : !1,
|
|
9
|
+
isImageUrl: (e) => e ? e.startsWith("http://") || e.startsWith("https://") || e.startsWith("/") || e.includes(".svg") || e.includes(".png") || e.includes(".jpg") || e.includes(".jpeg") : !1
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export { t as useIcon };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useData as e, withBase as t } from "vitepress";
|
|
2
|
+
// composables/useLink.ts
|
|
3
|
+
function n() {
|
|
4
|
+
let { site: n } = e(), r = (e) => /^https?:\/\//.test(e), i = (e) => e ? r(e) || e.startsWith("#") ? e : t(e) : "", a = (e) => e ? /^https?:\/\//.test(e) || e.startsWith("data:") ? e : t(e) : "", o = (e) => e.map((e) => ({
|
|
5
|
+
...e,
|
|
6
|
+
link: e.link ? i(e.link) : void 0,
|
|
7
|
+
items: e.items ? o(e.items) : void 0
|
|
8
|
+
})), s = (e) => {
|
|
9
|
+
if (!e) return e;
|
|
10
|
+
if (Array.isArray(e)) return e.map((e) => ({
|
|
11
|
+
...e,
|
|
12
|
+
link: e.link ? i(e.link) : void 0,
|
|
13
|
+
items: e.items ? s(e.items) : void 0
|
|
14
|
+
}));
|
|
15
|
+
if (typeof e == "object") {
|
|
16
|
+
let t = {};
|
|
17
|
+
for (let [n, r] of Object.entries(e)) t[n] = s(r);
|
|
18
|
+
return t;
|
|
19
|
+
}
|
|
20
|
+
return e;
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
isExternalLink: r,
|
|
24
|
+
resolveLink: i,
|
|
25
|
+
resolveAsset: a,
|
|
26
|
+
resolveNavLinks: o,
|
|
27
|
+
resolveSidebarLinks: s
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export { n as useLink };
|