typerighter 0.3.0 → 0.4.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/app-Bw90hv7G.js +266 -0
- package/dist/brand-BtMsUv5o.js +201 -0
- package/dist/{cli-CoyGXgR1.js → cli-s44ly0MH.js} +233 -172
- package/dist/cli.js +1 -1
- package/dist/client/app/index.d.ts +12 -4
- package/dist/client/app/index.d.ts.map +1 -1
- package/dist/client/app/router.d.ts.map +1 -1
- package/dist/client/theme-default.js +707 -149
- package/dist/client.js +2 -2
- package/dist/constants-E2UATqMm.js +32183 -0
- package/dist/es-ClqUVRJn.js +705 -0
- package/dist/index.js +4 -4
- package/dist/{init-CUo89E7j.js → init-0hKcjQtf.js} +10 -12
- package/dist/node/build/index.d.ts.map +1 -1
- package/dist/node/lib/markdown/index.d.ts.map +1 -1
- package/dist/node/lib/markdown/plugins/callout-container.d.ts +4 -0
- package/dist/node/lib/markdown/plugins/callout-container.d.ts.map +1 -0
- package/dist/node/lib/markdown/plugins/custom-container.d.ts +3 -0
- package/dist/node/lib/markdown/plugins/custom-container.d.ts.map +1 -0
- package/dist/node/lib/markdown/plugins/{highlight.d.ts → highlight/index.d.ts} +1 -1
- package/dist/node/lib/markdown/plugins/highlight/index.d.ts.map +1 -0
- package/dist/node/lib/markdown/plugins/highlight/language.d.ts +3 -0
- package/dist/node/lib/markdown/plugins/highlight/language.d.ts.map +1 -0
- package/dist/node/lib/progress.d.ts.map +1 -1
- package/dist/node/lib/render/vue.d.ts +2 -2
- package/dist/node/lib/render/vue.d.ts.map +1 -1
- package/dist/node/lib/typedown-context.d.ts +4 -4
- package/dist/node/lib/typedown-context.d.ts.map +1 -1
- package/dist/node/plugin/vite/constants.d.ts +2 -1
- package/dist/node/plugin/vite/constants.d.ts.map +1 -1
- package/dist/node/plugin/vite/index.d.ts +15 -1
- package/dist/node/plugin/vite/index.d.ts.map +1 -1
- package/dist/node/plugin/vite/search.d.ts +15 -0
- package/dist/node/plugin/vite/search.d.ts.map +1 -0
- package/dist/shared/constants.d.ts +6 -0
- package/dist/shared/constants.d.ts.map +1 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/types/content.d.ts +54 -4
- package/dist/shared/types/content.d.ts.map +1 -1
- package/dist/shared/types/ssg.d.ts +3 -1
- package/dist/shared/types/ssg.d.ts.map +1 -1
- package/dist/shared/utils/content.d.ts +5 -5
- package/dist/shared/utils/content.d.ts.map +1 -1
- package/dist/shared/utils/debounce.d.ts +2 -0
- package/dist/shared/utils/debounce.d.ts.map +1 -0
- package/dist/shared/utils/format.d.ts +5 -1
- package/dist/shared/utils/format.d.ts.map +1 -1
- package/dist/shared/utils/html.d.ts +1 -0
- package/dist/shared/utils/html.d.ts.map +1 -1
- package/dist/shared/utils/index.d.ts +6 -4
- package/dist/shared/utils/index.d.ts.map +1 -1
- package/dist/shared/utils/path.d.ts +8 -0
- package/dist/shared/utils/path.d.ts.map +1 -0
- package/dist/shared/utils/regex.d.ts +2 -0
- package/dist/shared/utils/regex.d.ts.map +1 -0
- package/dist/shared/utils/time.d.ts +6 -0
- package/dist/shared/utils/time.d.ts.map +1 -0
- package/dist/shared/utils/url.d.ts +6 -2
- package/dist/shared/utils/url.d.ts.map +1 -1
- package/dist/typerighter.css +1 -1
- package/dist/vite-nzhkELg7.js +309 -0
- package/dist/vite.js +2 -3
- package/package.json +9 -5
- package/dist/app-CM3biamr.js +0 -184
- package/dist/brand-CeSqpEQ2.js +0 -4
- package/dist/chunk-DfAF0w94-EwUSVR-h.js +0 -13
- package/dist/constants-B7b8AsH0.js +0 -9530
- package/dist/content-BM3UKxcc.js +0 -16
- package/dist/lib-CBtriEt5-Ch50D04V.js +0 -3309
- package/dist/liteDOM-Cp0aN3bP-YwW1TGWI.js +0 -741
- package/dist/node/lib/markdown/plugins/container.d.ts +0 -3
- package/dist/node/lib/markdown/plugins/container.d.ts.map +0 -1
- package/dist/node/lib/markdown/plugins/highlight.d.ts.map +0 -1
- package/dist/node/plugin/vite/codegen.d.ts +0 -27
- package/dist/node/plugin/vite/codegen.d.ts.map +0 -1
- package/dist/node/plugin/vite/codegen.test.d.ts +0 -2
- package/dist/node/plugin/vite/codegen.test.d.ts.map +0 -1
- package/dist/plugin-D2xuSVM4.js +0 -1
- package/dist/rolldown-runtime-Dqa2HsxW.js +0 -20
- package/dist/shared/utils/environment.d.ts +0 -2
- package/dist/shared/utils/environment.d.ts.map +0 -1
- package/dist/shared/utils/highlight.d.ts +0 -3
- package/dist/shared/utils/highlight.d.ts.map +0 -1
- package/dist/shared/utils/html.test.d.ts +0 -2
- package/dist/shared/utils/html.test.d.ts.map +0 -1
- package/dist/shared-DzTfF-_d.js +0 -14
- package/dist/tex-svg-full-BI3fonbT-CfoPQ3xc.js +0 -60224
- package/dist/vite-BxXQPieu.js +0 -228
- package/dist/wgxpath.install-node-Csk64Aj9-C0enUGLs.js +0 -1094
- package/dist/xypic-DrMJn58R-B4fw2rYo.js +0 -14846
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
1
|
+
import { A as e, O as t, _ as n, a as r, c as i, g as a, h as o, i as s, k as c, l, m as u, n as d, o as f, s as p, t as m, u as h, v as g, w as _, x as v } from "../brand-BtMsUv5o.js";
|
|
2
|
+
import { t as y } from "../es-ClqUVRJn.js";
|
|
3
|
+
import { a as b, c as x, d as S, i as C, l as w, n as ee, o as T, r as te, s as ne } from "../app-Bw90hv7G.js";
|
|
4
|
+
import { Fragment as E, computed as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createVNode as M, defineComponent as N, h as P, inject as re, markRaw as ie, mergeModels as ae, normalizeClass as F, normalizeStyle as I, onMounted as oe, onUnmounted as se, openBlock as L, readonly as ce, ref as R, renderList as z, renderSlot as le, resolveComponent as ue, shallowRef as de, toDisplayString as B, unref as V, useModel as H, vModelText as fe, watch as U, withCtx as W, withDirectives as pe } from "vue";
|
|
5
|
+
//#region src/shared/utils/debounce.ts
|
|
6
|
+
function me(e, t) {
|
|
7
|
+
let n;
|
|
8
|
+
return (...r) => {
|
|
9
|
+
clearTimeout(n), n = setTimeout(() => e(...r), t);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/shared/utils/regex.ts
|
|
14
|
+
function G(e) {
|
|
15
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.30.0_vue@3.5.40_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/shared/src/utils/isEmptyString.mjs
|
|
19
|
+
var K = (e) => e === "", he = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), ge = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), _e = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), ve = (e) => {
|
|
20
|
+
let t = _e(e);
|
|
12
21
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
13
|
-
},
|
|
22
|
+
}, q = {
|
|
14
23
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15
24
|
width: 24,
|
|
16
25
|
height: 24,
|
|
@@ -20,24 +29,56 @@ var A = (e) => {
|
|
|
20
29
|
"stroke-width": 2,
|
|
21
30
|
"stroke-linecap": "round",
|
|
22
31
|
"stroke-linejoin": "round"
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
}, ye = /* @__PURE__ */ Symbol("lucide-icons");
|
|
33
|
+
function be() {
|
|
34
|
+
return re(ye, {});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.30.0_vue@3.5.40_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
38
|
+
var xe = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absolute-stroke-width": i, strokeWidth: a, "stroke-width": o, size: s, color: c, ...l }, { slots: u }) => {
|
|
39
|
+
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } = be(), g = D(() => {
|
|
40
|
+
let e = K(r) || K(i) || r === !0 || i === !0 || m === !0, t = a || o || p || q["stroke-width"];
|
|
41
|
+
return e ? Number(t) * 24 / Number(s ?? d ?? q.width) : t;
|
|
42
|
+
});
|
|
43
|
+
return P("svg", {
|
|
44
|
+
...q,
|
|
45
|
+
...l,
|
|
46
|
+
width: s ?? d ?? q.width,
|
|
47
|
+
height: s ?? d ?? q.height,
|
|
48
|
+
stroke: c ?? f ?? q.stroke,
|
|
49
|
+
"stroke-width": g.value,
|
|
50
|
+
class: he("lucide", h, ...e ? [`lucide-${ge(ve(e))}-icon`, `lucide-${ge(e)}`] : ["lucide-icon"])
|
|
51
|
+
}, [...(t ?? n ?? []).map((e) => P(...e)), ...u.default ? [u.default()] : []]);
|
|
52
|
+
}, J = (e, t) => (n, { slots: r, attrs: i }) => P(xe, {
|
|
33
53
|
...i,
|
|
34
54
|
...n,
|
|
35
55
|
iconNode: t,
|
|
36
56
|
name: e
|
|
37
|
-
}, r),
|
|
57
|
+
}, r.default ? { default: r.default } : void 0), Se = J("chevron-down", [["path", {
|
|
38
58
|
d: "m6 9 6 6 6-6",
|
|
39
59
|
key: "qrunsl"
|
|
40
|
-
}]]),
|
|
60
|
+
}]]), Ce = J("corner-left-up", [["path", {
|
|
61
|
+
d: "M14 9 9 4 4 9",
|
|
62
|
+
key: "1af5af"
|
|
63
|
+
}], ["path", {
|
|
64
|
+
d: "M20 20h-7a4 4 0 0 1-4-4V4",
|
|
65
|
+
key: "1blwi3"
|
|
66
|
+
}]]), Y = J("file", [["path", {
|
|
67
|
+
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
68
|
+
key: "1oefj6"
|
|
69
|
+
}], ["path", {
|
|
70
|
+
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
71
|
+
key: "wfsgrz"
|
|
72
|
+
}]]), we = J("folder-open", [["path", {
|
|
73
|
+
d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
|
|
74
|
+
key: "usdka0"
|
|
75
|
+
}]]), Te = J("house", [["path", {
|
|
76
|
+
d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",
|
|
77
|
+
key: "5wwlr5"
|
|
78
|
+
}], ["path", {
|
|
79
|
+
d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",
|
|
80
|
+
key: "r6nss1"
|
|
81
|
+
}]]), Ee = J("menu", [
|
|
41
82
|
["path", {
|
|
42
83
|
d: "M4 5h16",
|
|
43
84
|
key: "1tepv9"
|
|
@@ -50,10 +91,18 @@ var A = (e) => {
|
|
|
50
91
|
d: "M4 19h16",
|
|
51
92
|
key: "1djgab"
|
|
52
93
|
}]
|
|
53
|
-
]),
|
|
94
|
+
]), De = J("moon", [["path", {
|
|
54
95
|
d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
|
|
55
96
|
key: "kfwtm"
|
|
56
|
-
}]]),
|
|
97
|
+
}]]), Oe = J("search", [["path", {
|
|
98
|
+
d: "m21 21-4.34-4.34",
|
|
99
|
+
key: "14j7rj"
|
|
100
|
+
}], ["circle", {
|
|
101
|
+
cx: "11",
|
|
102
|
+
cy: "11",
|
|
103
|
+
r: "8",
|
|
104
|
+
key: "4ej97u"
|
|
105
|
+
}]]), ke = J("sun", [
|
|
57
106
|
["circle", {
|
|
58
107
|
cx: "12",
|
|
59
108
|
cy: "12",
|
|
@@ -92,117 +141,410 @@ var A = (e) => {
|
|
|
92
141
|
d: "m19.07 4.93-1.41 1.41",
|
|
93
142
|
key: "1shlcs"
|
|
94
143
|
}]
|
|
95
|
-
]),
|
|
144
|
+
]), X = J("x", [["path", {
|
|
96
145
|
d: "M18 6 6 18",
|
|
97
146
|
key: "1bl5f8"
|
|
98
147
|
}], ["path", {
|
|
99
148
|
d: "m6 6 12 12",
|
|
100
149
|
key: "d8bk6v"
|
|
101
|
-
}]]),
|
|
150
|
+
}]]), Ae = [
|
|
102
151
|
"height",
|
|
103
152
|
"width",
|
|
104
153
|
"viewBox"
|
|
105
|
-
],
|
|
154
|
+
], je = ["d"], Me = ["d"], Ne = ["d"], Pe = /* @__PURE__ */ N({
|
|
106
155
|
__name: "TdBrandIcon",
|
|
107
156
|
props: { size: { default: 28 } },
|
|
108
157
|
setup(e) {
|
|
109
|
-
return (t, n) => (
|
|
158
|
+
return (t, n) => (L(), A("svg", {
|
|
110
159
|
fill: "none",
|
|
111
160
|
height: e.size,
|
|
112
161
|
width: e.size * 208 / 128,
|
|
113
|
-
viewBox:
|
|
162
|
+
viewBox: V(r),
|
|
114
163
|
xmlns: "http://www.w3.org/2000/svg"
|
|
115
164
|
}, [
|
|
116
|
-
|
|
165
|
+
j("path", {
|
|
117
166
|
"clip-rule": "evenodd",
|
|
118
|
-
d:
|
|
167
|
+
d: V(d),
|
|
119
168
|
"fill-rule": "evenodd",
|
|
120
169
|
fill: "currentColor"
|
|
121
|
-
}, null, 8,
|
|
122
|
-
|
|
123
|
-
d:
|
|
170
|
+
}, null, 8, je),
|
|
171
|
+
j("path", {
|
|
172
|
+
d: V(s),
|
|
124
173
|
fill: "currentColor"
|
|
125
|
-
}, null, 8,
|
|
126
|
-
|
|
127
|
-
d:
|
|
174
|
+
}, null, 8, Me),
|
|
175
|
+
j("path", {
|
|
176
|
+
d: V(m),
|
|
128
177
|
fill: "currentColor"
|
|
129
|
-
}, null, 8,
|
|
130
|
-
], 8,
|
|
178
|
+
}, null, 8, Ne)
|
|
179
|
+
], 8, Ae));
|
|
131
180
|
}
|
|
132
|
-
}),
|
|
181
|
+
}), Fe = ["title", "aria-label"], Z = /* @__PURE__ */ N({
|
|
133
182
|
__name: "TdButton",
|
|
134
183
|
props: { label: {} },
|
|
135
184
|
setup(e) {
|
|
136
|
-
return (t, n) => (
|
|
185
|
+
return (t, n) => (L(), A("button", {
|
|
137
186
|
type: "button",
|
|
138
187
|
class: "inline-flex items-center justify-center cursor-pointer",
|
|
139
188
|
title: e.label,
|
|
140
189
|
"aria-label": e.label
|
|
141
|
-
}, [
|
|
190
|
+
}, [le(t.$slots, "default")], 8, Fe));
|
|
142
191
|
}
|
|
143
|
-
}),
|
|
192
|
+
}), Ie = {
|
|
193
|
+
key: 0,
|
|
194
|
+
class: "td-tree-node"
|
|
195
|
+
}, Le = ["aria-expanded"], Re = { class: "td-tree-label-text" }, ze = { class: "td-tree-count" }, Be = ["href"], Ve = { class: "td-tree-link-text" }, He = {
|
|
196
|
+
key: 0,
|
|
197
|
+
class: "td-tree-time"
|
|
198
|
+
}, Ue = ["href"], We = { class: "td-tree-link-text" }, Ge = { class: "td-tree-time" }, Ke = 4, qe = /*#__PURE__*/ S(/* @__PURE__ */ N({
|
|
199
|
+
__name: "TdTreeNode",
|
|
200
|
+
props: {
|
|
201
|
+
node: {},
|
|
202
|
+
depth: { default: 0 },
|
|
203
|
+
urlPrefix: { default: "" }
|
|
204
|
+
},
|
|
205
|
+
setup(e) {
|
|
206
|
+
let r = w(), a = o(e.urlPrefix, e.node.name), s = e.node.items.find((e) => v(e.filepath) === t), c = e.node.items.filter((e) => v(e.filepath) !== t), l = 0 < e.node.children.length || 0 < e.node.items.length, d = D(() => f(e.node));
|
|
207
|
+
function f(e) {
|
|
208
|
+
return e.items.length + e.children.reduce((e, t) => e + f(t), 0);
|
|
209
|
+
}
|
|
210
|
+
let p = R(!g(a, r.path)), m = R(!1), h = D(() => m.value ? c : c.slice(0, Ke)), y = D(() => Math.max(0, c.length - Ke));
|
|
211
|
+
U(() => r.path, (e) => {
|
|
212
|
+
g(a, e) && (p.value = !1);
|
|
213
|
+
});
|
|
214
|
+
function b() {
|
|
215
|
+
m.value = !0;
|
|
216
|
+
}
|
|
217
|
+
function x(e) {
|
|
218
|
+
return r.path === e;
|
|
219
|
+
}
|
|
220
|
+
function S() {
|
|
221
|
+
p.value = !p.value;
|
|
222
|
+
}
|
|
223
|
+
return (t, r) => {
|
|
224
|
+
let o = ue("TdTreeNode", !0);
|
|
225
|
+
return V(l) ? (L(), A("div", Ie, [j("button", {
|
|
226
|
+
type: "button",
|
|
227
|
+
class: "td-tree-label",
|
|
228
|
+
"aria-expanded": !p.value,
|
|
229
|
+
style: I({ paddingLeft: `${12 + e.depth * 12}px` }),
|
|
230
|
+
onClick: S
|
|
231
|
+
}, [
|
|
232
|
+
M(V(Se), {
|
|
233
|
+
size: 14,
|
|
234
|
+
class: F(["td-tree-caret", { "is-collapsed": p.value }])
|
|
235
|
+
}, null, 8, ["class"]),
|
|
236
|
+
j("span", Re, B(V(_)(e.node.name)), 1),
|
|
237
|
+
j("span", ze, B(d.value), 1)
|
|
238
|
+
], 12, Le), p.value ? k("", !0) : (L(), A("div", {
|
|
239
|
+
key: 0,
|
|
240
|
+
class: "td-tree-children",
|
|
241
|
+
style: I({ marginLeft: `${14 + e.depth * 10}px` })
|
|
242
|
+
}, [
|
|
243
|
+
j("a", {
|
|
244
|
+
href: V(s) ? V(n)(V(s).filepath) : V(a),
|
|
245
|
+
class: F(["td-tree-link", { "is-active": x(V(s) ? V(n)(V(s).filepath) : V(a)) }]),
|
|
246
|
+
style: I({ paddingLeft: `${32 + e.depth * 12}px` })
|
|
247
|
+
}, [
|
|
248
|
+
M(V(Te), {
|
|
249
|
+
size: 14,
|
|
250
|
+
class: "td-tree-file-icon"
|
|
251
|
+
}),
|
|
252
|
+
j("span", Ve, B(V(_)(e.node.name)), 1),
|
|
253
|
+
V(s) ? (L(), A("span", He, B(V(i)(V(s).metadata.mtime)), 1)) : k("", !0)
|
|
254
|
+
], 14, Be),
|
|
255
|
+
(L(!0), A(E, null, z(e.node.children, (t) => (L(), O(o, {
|
|
256
|
+
key: t.name,
|
|
257
|
+
node: t,
|
|
258
|
+
depth: e.depth + 1,
|
|
259
|
+
"url-prefix": V(a)
|
|
260
|
+
}, null, 8, [
|
|
261
|
+
"node",
|
|
262
|
+
"depth",
|
|
263
|
+
"url-prefix"
|
|
264
|
+
]))), 128)),
|
|
265
|
+
(L(!0), A(E, null, z(h.value, (t) => (L(), A("a", {
|
|
266
|
+
key: t.filepath,
|
|
267
|
+
href: V(n)(t.filepath),
|
|
268
|
+
class: F(["td-tree-link", { "is-active": x(V(n)(t.filepath)) }]),
|
|
269
|
+
style: I({ paddingLeft: `${32 + e.depth * 12}px` })
|
|
270
|
+
}, [
|
|
271
|
+
M(V(Y), {
|
|
272
|
+
size: 14,
|
|
273
|
+
class: "td-tree-file-icon"
|
|
274
|
+
}),
|
|
275
|
+
j("span", We, B(V(u)(t.header, t.filepath)), 1),
|
|
276
|
+
j("span", Ge, B(V(i)(t.metadata.mtime)), 1)
|
|
277
|
+
], 14, Ue))), 128)),
|
|
278
|
+
y.value > 0 && !m.value ? (L(), A("button", {
|
|
279
|
+
key: 0,
|
|
280
|
+
class: "td-tree-more",
|
|
281
|
+
type: "button",
|
|
282
|
+
style: I({ paddingLeft: `${32 + e.depth * 12}px` }),
|
|
283
|
+
onClick: b
|
|
284
|
+
}, B(y.value) + " more ", 5)) : k("", !0)
|
|
285
|
+
], 4))])) : k("", !0);
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
}), [["__scopeId", "data-v-06253791"]]), Je = ["href"], Ye = {
|
|
289
|
+
key: 0,
|
|
290
|
+
class: "td-root-link-time"
|
|
291
|
+
}, Xe = ["href"], Ze = { class: "td-root-link-text" }, Qe = { class: "td-root-link-time" }, $e = /*#__PURE__*/ S(/* @__PURE__ */ N({
|
|
144
292
|
__name: "TdContentNav",
|
|
145
|
-
props: {
|
|
146
|
-
setup(
|
|
147
|
-
let r = w(
|
|
148
|
-
function
|
|
149
|
-
r.
|
|
293
|
+
props: { tree: {} },
|
|
294
|
+
setup(e) {
|
|
295
|
+
let r = w(), a = e.tree.rootItems.find((e) => v(e.filepath) === t), o = e.tree.rootItems.filter((e) => v(e.filepath) !== t);
|
|
296
|
+
function s(e) {
|
|
297
|
+
return r.path === e;
|
|
298
|
+
}
|
|
299
|
+
return (t, r) => (L(), A("nav", null, [
|
|
300
|
+
j("a", {
|
|
301
|
+
href: V(a) ? V(n)(V(a).filepath) : "/",
|
|
302
|
+
class: F(["td-root-link", { "is-active": s(V(a) ? V(n)(V(a).filepath) : "/") }])
|
|
303
|
+
}, [
|
|
304
|
+
M(V(Te), {
|
|
305
|
+
size: 14,
|
|
306
|
+
class: "td-root-link-icon"
|
|
307
|
+
}),
|
|
308
|
+
r[0] ||= j("span", { class: "td-root-link-text" }, "Overview", -1),
|
|
309
|
+
V(a) ? (L(), A("span", Ye, B(V(i)(V(a).metadata.mtime)), 1)) : k("", !0)
|
|
310
|
+
], 10, Je),
|
|
311
|
+
(L(!0), A(E, null, z(V(o), (e) => (L(), A("a", {
|
|
312
|
+
key: e.filepath,
|
|
313
|
+
href: V(n)(e.filepath),
|
|
314
|
+
class: F(["td-root-link", { "is-active": s(V(n)(e.filepath)) }])
|
|
315
|
+
}, [
|
|
316
|
+
M(V(Y), {
|
|
317
|
+
size: 14,
|
|
318
|
+
class: "td-root-link-icon"
|
|
319
|
+
}),
|
|
320
|
+
j("span", Ze, B(V(u)(e.header, e.filepath)), 1),
|
|
321
|
+
j("span", Qe, B(V(i)(e.metadata.mtime)), 1)
|
|
322
|
+
], 10, Xe))), 128)),
|
|
323
|
+
(L(!0), A(E, null, z(e.tree.children, (e) => (L(), O(qe, {
|
|
324
|
+
key: e.name,
|
|
325
|
+
node: e
|
|
326
|
+
}, null, 8, ["node"]))), 128))
|
|
327
|
+
]));
|
|
328
|
+
}
|
|
329
|
+
}), [["__scopeId", "data-v-392b5753"]]), et = {
|
|
330
|
+
class: "td-breadcrumb",
|
|
331
|
+
"aria-label": "Breadcrumb"
|
|
332
|
+
}, tt = {
|
|
333
|
+
key: 0,
|
|
334
|
+
class: "td-breadcrumb-sep"
|
|
335
|
+
}, nt = ["href"], rt = {
|
|
336
|
+
key: 2,
|
|
337
|
+
class: "td-breadcrumb-current"
|
|
338
|
+
}, it = /*#__PURE__*/ S(/* @__PURE__ */ N({
|
|
339
|
+
__name: "TdBreadcrumb",
|
|
340
|
+
setup(e) {
|
|
341
|
+
let t = w(), n = D(() => {
|
|
342
|
+
let e = t.path === "/" ? "/" : t.path.replace(/\/$/, ""), n = [{
|
|
343
|
+
name: "Home",
|
|
344
|
+
href: "/"
|
|
345
|
+
}];
|
|
346
|
+
if (e === "/") return n;
|
|
347
|
+
let r = e.replace(/^\//, "").split("/");
|
|
348
|
+
for (let e = 0; e < r.length; e++) n.push({
|
|
349
|
+
name: _(r[e]),
|
|
350
|
+
href: "/" + r.slice(0, e + 1).join("/")
|
|
351
|
+
});
|
|
352
|
+
return n;
|
|
353
|
+
});
|
|
354
|
+
return (e, t) => (L(), A("nav", et, [(L(!0), A(E, null, z(n.value, (e, t) => (L(), A(E, { key: e.href }, [t > 0 ? (L(), A("span", tt, "/")) : k("", !0), t < n.value.length - 1 ? (L(), A("a", {
|
|
355
|
+
key: 1,
|
|
356
|
+
href: e.href,
|
|
357
|
+
class: "td-breadcrumb-link"
|
|
358
|
+
}, B(e.name), 9, nt)) : (L(), A("span", rt, B(e.name), 1))], 64))), 128))]));
|
|
359
|
+
}
|
|
360
|
+
}), [["__scopeId", "data-v-7273c2c0"]]), at = { class: "td-widget-checkbox" }, ot = /*#__PURE__*/ S(/* @__PURE__ */ N({
|
|
361
|
+
__name: "TdWidgetCheckbox",
|
|
362
|
+
props: { value: {} },
|
|
363
|
+
setup(e) {
|
|
364
|
+
return (t, n) => (L(), A("span", at, B(e.value ? "☑" : "☐"), 1));
|
|
365
|
+
}
|
|
366
|
+
}), [["__scopeId", "data-v-32f57a06"]]);
|
|
367
|
+
//#endregion
|
|
368
|
+
//#region src/client/theme-default/components/TdFrontmatter/widgets/ref.ts
|
|
369
|
+
function st(e) {
|
|
370
|
+
if (typeof e != "object" || !e) return;
|
|
371
|
+
let t = e.$ref;
|
|
372
|
+
if (typeof t != "object" || !t) return;
|
|
373
|
+
let { url: n, name: r } = t;
|
|
374
|
+
if (!(typeof n != "string" || typeof r != "string")) return {
|
|
375
|
+
url: n,
|
|
376
|
+
name: r
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
//#endregion
|
|
380
|
+
//#region src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetList.vue?vue&type=script&setup=true&lang.ts
|
|
381
|
+
var ct = ["href"], lt = { class: "td-widget-list" }, Q = 5, ut = /*#__PURE__*/ S(/* @__PURE__ */ N({
|
|
382
|
+
__name: "TdWidgetList",
|
|
383
|
+
props: {
|
|
384
|
+
definition: {},
|
|
385
|
+
value: {}
|
|
386
|
+
},
|
|
387
|
+
setup(e) {
|
|
388
|
+
let t = R(!1), n = Array.isArray(e.value) ? e.value : [], r = e.definition.items?.widget === "relation", i = r ? n.map((e) => st(e)).filter((e) => e !== void 0) : [], a = r ? Math.max(0, i.length - Q) : Math.max(0, n.length - Q);
|
|
389
|
+
function o() {
|
|
390
|
+
t.value = !t.value;
|
|
150
391
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}, [
|
|
392
|
+
function s(e) {
|
|
393
|
+
return t.value ? e : e.slice(0, Q);
|
|
394
|
+
}
|
|
395
|
+
return (e, c) => r ? (L(), A(E, { key: 0 }, [(L(!0), A(E, null, z(s(V(i)), (e, t) => (L(), A("a", {
|
|
396
|
+
key: t,
|
|
397
|
+
href: e.url,
|
|
398
|
+
class: "td-widget-ref"
|
|
399
|
+
}, B(e.name), 9, ct))), 128)), V(a) > 0 ? (L(), A("button", {
|
|
400
|
+
key: 0,
|
|
401
|
+
class: "td-widget-more",
|
|
402
|
+
type: "button",
|
|
403
|
+
onClick: o
|
|
404
|
+
}, B(t.value ? "show less" : `+${V(a)} more`), 1)) : k("", !0)], 64)) : (L(), A(E, { key: 1 }, [j("ul", lt, [(L(!0), A(E, null, z(s(V(n)), (e, t) => (L(), A("li", { key: t }, B(e), 1))), 128))]), V(a) > 0 ? (L(), A("button", {
|
|
405
|
+
key: 0,
|
|
406
|
+
class: "td-widget-more",
|
|
155
407
|
type: "button",
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
onClick: () => i(String(a))
|
|
159
|
-
}, [v(D(ce), {
|
|
160
|
-
size: 14,
|
|
161
|
-
class: x(["td-content-nav-caret", { "is-collapsed": r.value[a] }])
|
|
162
|
-
}, null, 8, ["class"]), ee(" " + E(a), 1)], 8, le), r.value[a] ? h("", !0) : (C(), g("div", ue, [(C(!0), g(f, null, T(n, (n) => (C(), g("a", {
|
|
163
|
-
key: n.path,
|
|
164
|
-
href: D(e)(n),
|
|
165
|
-
class: "td-content-nav-link"
|
|
166
|
-
}, E(D(t)(n)), 9, de))), 128))]))]))), 128))]));
|
|
408
|
+
onClick: o
|
|
409
|
+
}, B(t.value ? "show less" : `+${V(a)} more`), 1)) : k("", !0)], 64));
|
|
167
410
|
}
|
|
168
|
-
}),
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
function
|
|
411
|
+
}), [["__scopeId", "data-v-5428367c"]]), dt = 5, ft = /*#__PURE__*/ S(/* @__PURE__ */ N({
|
|
412
|
+
__name: "TdWidgetMultiSelect",
|
|
413
|
+
props: { value: {} },
|
|
414
|
+
setup(e) {
|
|
415
|
+
let t = R(!1), n = Array.isArray(e.value) ? e.value : [], r = () => t.value ? n : n.slice(0, dt), i = Math.max(0, n.length - dt);
|
|
416
|
+
function a() {
|
|
417
|
+
t.value = !t.value;
|
|
418
|
+
}
|
|
419
|
+
return (e, n) => (L(), A(E, null, [(L(!0), A(E, null, z(r(), (e, t) => (L(), A("span", {
|
|
420
|
+
key: t,
|
|
421
|
+
class: "td-widget-pill"
|
|
422
|
+
}, B(e), 1))), 128)), V(i) > 0 ? (L(), A("button", {
|
|
423
|
+
key: 0,
|
|
424
|
+
class: "td-widget-more",
|
|
425
|
+
type: "button",
|
|
426
|
+
onClick: a
|
|
427
|
+
}, B(t.value ? "show less" : `+${V(i)} more`), 1)) : k("", !0)], 64));
|
|
428
|
+
}
|
|
429
|
+
}), [["__scopeId", "data-v-3d5db69d"]]), pt = ["href"], mt = { key: 1 }, ht = /*#__PURE__*/ S(/* @__PURE__ */ N({
|
|
430
|
+
__name: "TdWidgetRelation",
|
|
431
|
+
props: { value: {} },
|
|
432
|
+
setup(e) {
|
|
433
|
+
let t = st(e.value);
|
|
434
|
+
return (n, r) => V(t) ? (L(), A("a", {
|
|
435
|
+
key: 0,
|
|
436
|
+
href: V(t).url,
|
|
437
|
+
class: "td-widget-ref"
|
|
438
|
+
}, B(V(t).name), 9, pt)) : (L(), A("span", mt, B(e.value), 1));
|
|
439
|
+
}
|
|
440
|
+
}), [["__scopeId", "data-v-32528101"]]), gt = { class: "td-widget-pill" }, _t = /*#__PURE__*/ S(/* @__PURE__ */ N({
|
|
441
|
+
__name: "TdWidgetSelect",
|
|
442
|
+
props: { value: {} },
|
|
443
|
+
setup(e) {
|
|
444
|
+
return (t, n) => (L(), A("span", gt, B(e.value), 1));
|
|
445
|
+
}
|
|
446
|
+
}), [["__scopeId", "data-v-99c8837d"]]), vt = /* @__PURE__ */ N({
|
|
447
|
+
__name: "TdWidgetText",
|
|
448
|
+
props: {
|
|
449
|
+
definition: {},
|
|
450
|
+
value: {}
|
|
451
|
+
},
|
|
452
|
+
setup(e) {
|
|
453
|
+
function t(t) {
|
|
454
|
+
return t == null ? "" : e.definition.widget === "date" ? f(String(t)) : String(t);
|
|
455
|
+
}
|
|
456
|
+
return (n, r) => B(t(e.value));
|
|
457
|
+
}
|
|
458
|
+
}), yt = {
|
|
459
|
+
key: 0,
|
|
460
|
+
class: "td-frontmatter-empty"
|
|
461
|
+
}, bt = /*#__PURE__*/ S(/* @__PURE__ */ N({
|
|
462
|
+
__name: "TdFrontmatterValue",
|
|
463
|
+
props: {
|
|
464
|
+
definition: {},
|
|
465
|
+
value: {}
|
|
466
|
+
},
|
|
467
|
+
setup(e) {
|
|
468
|
+
return (t, n) => e.value === void 0 || e.value === null ? (L(), A("span", yt, "Empty")) : e.definition.widget === "checkbox" ? (L(), O(ot, {
|
|
469
|
+
key: 1,
|
|
470
|
+
value: e.value
|
|
471
|
+
}, null, 8, ["value"])) : e.definition.widget === "select" ? (L(), O(_t, {
|
|
472
|
+
key: 2,
|
|
473
|
+
value: e.value
|
|
474
|
+
}, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (L(), O(ft, {
|
|
475
|
+
key: 3,
|
|
476
|
+
value: e.value
|
|
477
|
+
}, null, 8, ["value"])) : e.definition.widget === "relation" ? (L(), O(ht, {
|
|
478
|
+
key: 4,
|
|
479
|
+
value: e.value
|
|
480
|
+
}, null, 8, ["value"])) : e.definition.widget === "list" ? (L(), O(ut, {
|
|
481
|
+
key: 5,
|
|
482
|
+
definition: e.definition,
|
|
483
|
+
value: e.value
|
|
484
|
+
}, null, 8, ["definition", "value"])) : (L(), O(vt, {
|
|
485
|
+
key: 6,
|
|
486
|
+
definition: e.definition,
|
|
487
|
+
value: e.value
|
|
488
|
+
}, null, 8, ["definition", "value"]));
|
|
489
|
+
}
|
|
490
|
+
}), [["__scopeId", "data-v-0bce73aa"]]), xt = {
|
|
491
|
+
key: 0,
|
|
492
|
+
class: "td-frontmatter"
|
|
493
|
+
}, St = { class: "td-frontmatter-label" }, Ct = { class: "td-frontmatter-value" }, wt = /*#__PURE__*/ S(/* @__PURE__ */ N({
|
|
494
|
+
__name: "TdFrontmatter",
|
|
495
|
+
props: {
|
|
496
|
+
schema: { default: () => void 0 },
|
|
497
|
+
frontmatter: {}
|
|
498
|
+
},
|
|
499
|
+
setup(e) {
|
|
500
|
+
let t = b(), n = D(() => {
|
|
501
|
+
if (e.schema) return t.schemas[e.schema];
|
|
502
|
+
}), r = D(() => {
|
|
503
|
+
let e = n.value;
|
|
504
|
+
return e ? Object.entries(e).filter(([e]) => !e.startsWith("_")) : [];
|
|
505
|
+
});
|
|
506
|
+
return (t, n) => r.value.length > 0 ? (L(), A("div", xt, [(L(!0), A(E, null, z(r.value, ([t, n]) => (L(), A("div", {
|
|
507
|
+
key: t,
|
|
508
|
+
class: "td-frontmatter-row"
|
|
509
|
+
}, [j("span", St, B(V(_)(t)), 1), j("span", Ct, [M(bt, {
|
|
510
|
+
definition: n,
|
|
511
|
+
value: e.frontmatter[t]
|
|
512
|
+
}, null, 8, ["definition", "value"])])]))), 128))])) : k("", !0);
|
|
513
|
+
}
|
|
514
|
+
}), [["__scopeId", "data-v-76ddc55f"]]), $ = R(!1);
|
|
515
|
+
function Tt() {
|
|
174
516
|
function e() {
|
|
175
|
-
|
|
517
|
+
$.value = !$.value;
|
|
176
518
|
}
|
|
177
519
|
function t() {
|
|
178
|
-
|
|
520
|
+
$.value = !1;
|
|
179
521
|
}
|
|
180
522
|
return {
|
|
181
|
-
isOpen:
|
|
523
|
+
isOpen: ce($),
|
|
182
524
|
toggle: e,
|
|
183
525
|
close: t
|
|
184
526
|
};
|
|
185
527
|
}
|
|
186
528
|
//#endregion
|
|
187
529
|
//#region src/client/theme-default/components/TdMenuButton.vue
|
|
188
|
-
var
|
|
530
|
+
var Et = /* @__PURE__ */ N({
|
|
189
531
|
__name: "TdMenuButton",
|
|
190
532
|
setup(e) {
|
|
191
|
-
let { isOpen: t, toggle: n } =
|
|
192
|
-
return (e, r) => (
|
|
193
|
-
class: "td-menu-button w-9 h-9 text-td-
|
|
194
|
-
label:
|
|
195
|
-
"aria-expanded":
|
|
196
|
-
onClick:
|
|
533
|
+
let { isOpen: t, toggle: n } = Tt();
|
|
534
|
+
return (e, r) => (L(), O(Z, {
|
|
535
|
+
class: "td-menu-button w-9 h-9 text-td-neutral-fg-muted group",
|
|
536
|
+
label: V(t) ? "Close menu" : "Open menu",
|
|
537
|
+
"aria-expanded": V(t),
|
|
538
|
+
onClick: V(n)
|
|
197
539
|
}, {
|
|
198
|
-
default:
|
|
540
|
+
default: W(() => [V(t) ? (L(), O(V(X), {
|
|
199
541
|
key: 0,
|
|
200
542
|
size: 20,
|
|
201
|
-
class: "group-hover:text-td-primary transition-colors"
|
|
202
|
-
})) : (
|
|
543
|
+
class: "group-hover:text-td-primary-solid transition-colors"
|
|
544
|
+
})) : (L(), O(V(Ee), {
|
|
203
545
|
key: 1,
|
|
204
546
|
size: 20,
|
|
205
|
-
class: "group-hover:text-td-primary transition-colors"
|
|
547
|
+
class: "group-hover:text-td-primary-solid transition-colors"
|
|
206
548
|
}))]),
|
|
207
549
|
_: 1
|
|
208
550
|
}, 8, [
|
|
@@ -211,23 +553,181 @@ var pe = /* @__PURE__ */ y({
|
|
|
211
553
|
"onClick"
|
|
212
554
|
]));
|
|
213
555
|
}
|
|
214
|
-
}),
|
|
556
|
+
}), Dt = { class: "td-search" }, Ot = { class: "td-search-input-wrap" }, kt = {
|
|
557
|
+
key: 0,
|
|
558
|
+
class: "td-search-count"
|
|
559
|
+
}, At = {
|
|
560
|
+
key: 0,
|
|
561
|
+
class: "td-search-results"
|
|
562
|
+
}, jt = ["href"], Mt = { class: "td-search-result-header" }, Nt = ["innerHTML"], Pt = {
|
|
563
|
+
key: 0,
|
|
564
|
+
class: "td-search-result-badge"
|
|
565
|
+
}, Ft = { class: "td-search-result-breadcrumb" }, It = ["innerHTML"], Lt = {
|
|
566
|
+
key: 1,
|
|
567
|
+
class: "td-search-empty"
|
|
568
|
+
}, Rt = 120, zt = /*#__PURE__*/ S(/* @__PURE__ */ N({
|
|
569
|
+
__name: "TdSearch",
|
|
570
|
+
props: {
|
|
571
|
+
active: {
|
|
572
|
+
type: Boolean,
|
|
573
|
+
default: !1
|
|
574
|
+
},
|
|
575
|
+
activeModifiers: {},
|
|
576
|
+
query: { default: "" },
|
|
577
|
+
queryModifiers: {}
|
|
578
|
+
},
|
|
579
|
+
emits: /*@__PURE__*/ ae(["select"], ["update:active", "update:query"]),
|
|
580
|
+
setup(t, { emit: n }) {
|
|
581
|
+
let r = H(t, "active"), i = H(t, "query"), a = n, o = w(), s = de([]), u = D(() => 0 < i.value.trim().length);
|
|
582
|
+
U(u, (e) => {
|
|
583
|
+
r.value = e;
|
|
584
|
+
});
|
|
585
|
+
let d = te(), f = ee(), p;
|
|
586
|
+
U(d, () => {
|
|
587
|
+
p = void 0;
|
|
588
|
+
});
|
|
589
|
+
function m() {
|
|
590
|
+
if (p) return p;
|
|
591
|
+
if (d.value) return p = ie(y.loadJSON(d.value, {
|
|
592
|
+
fields: c,
|
|
593
|
+
storeFields: e
|
|
594
|
+
})), p;
|
|
595
|
+
}
|
|
596
|
+
let g = !1, _ = me((e) => O(e), 150);
|
|
597
|
+
U(i, (e, t, n) => {
|
|
598
|
+
n(() => {
|
|
599
|
+
g = !0;
|
|
600
|
+
}), g = !1;
|
|
601
|
+
let r = e.trim();
|
|
602
|
+
if (!r) {
|
|
603
|
+
s.value = [];
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
_(r);
|
|
607
|
+
});
|
|
608
|
+
function v() {
|
|
609
|
+
i.value = "";
|
|
610
|
+
}
|
|
611
|
+
function b(e, t) {
|
|
612
|
+
let n = RegExp(`id="${G(t)}"[^>]*>`, "i").exec(e);
|
|
613
|
+
if (!n) return h(e);
|
|
614
|
+
let r = e.slice(n.index + n[0].length), i = r.search(/<h[1-6]/i);
|
|
615
|
+
return h(0 <= i ? r.slice(0, i) : r);
|
|
616
|
+
}
|
|
617
|
+
function x(e, t) {
|
|
618
|
+
if (!e) return "";
|
|
619
|
+
let n = Object.keys(t);
|
|
620
|
+
if (n.length === 0) return e.slice(0, Rt);
|
|
621
|
+
let r = e.toLowerCase(), i = e.length;
|
|
622
|
+
for (let e of n) {
|
|
623
|
+
let t = r.indexOf(e.toLowerCase());
|
|
624
|
+
t !== -1 && t < i && (i = t);
|
|
625
|
+
}
|
|
626
|
+
let a = Math.max(0, i - 30), o = Math.min(e.length, a + Rt), s = e.slice(a, o).trim();
|
|
627
|
+
return 0 < a && (s = "..." + s), o < e.length && (s += "..."), s;
|
|
628
|
+
}
|
|
629
|
+
async function S(e, t, n) {
|
|
630
|
+
let r = t.indexOf("#"), i = 0 <= r ? t.slice(0, r) : t, a = 0 <= r ? t.slice(r + 1) : "";
|
|
631
|
+
try {
|
|
632
|
+
let t = (await e(i))?.default, r = (typeof t?.data == "function" ? t.data() : {}).__html ?? "";
|
|
633
|
+
return x(a ? b(r, a) : h(r), n);
|
|
634
|
+
} catch {
|
|
635
|
+
return "";
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
function C(e, t) {
|
|
639
|
+
if (!e || !t) return l(e);
|
|
640
|
+
let n = t.trim().split(/\s+/).filter(Boolean), r = l(e);
|
|
641
|
+
for (let e of n) {
|
|
642
|
+
let t = RegExp(`(${G(e)})`, "gi");
|
|
643
|
+
r = r.replace(t, "<mark>$1</mark>");
|
|
644
|
+
}
|
|
645
|
+
return r;
|
|
646
|
+
}
|
|
647
|
+
function T(e) {
|
|
648
|
+
let t = e.split("#")[0];
|
|
649
|
+
return o.path === t;
|
|
650
|
+
}
|
|
651
|
+
function ne() {
|
|
652
|
+
a("select");
|
|
653
|
+
}
|
|
654
|
+
async function O(e) {
|
|
655
|
+
let t = m();
|
|
656
|
+
if (!t) return;
|
|
657
|
+
let n = t.search(e, {
|
|
658
|
+
prefix: !0,
|
|
659
|
+
fuzzy: .2,
|
|
660
|
+
boost: { title: 2 }
|
|
661
|
+
}), r = await Promise.all(n.slice(0, 20).map(async (e) => {
|
|
662
|
+
let t = f ? await S(f, e.id, e.match) : "";
|
|
663
|
+
return {
|
|
664
|
+
id: e.id,
|
|
665
|
+
title: e.title,
|
|
666
|
+
titles: e.titles,
|
|
667
|
+
excerpt: t,
|
|
668
|
+
score: e.score
|
|
669
|
+
};
|
|
670
|
+
}));
|
|
671
|
+
g || (s.value = r);
|
|
672
|
+
}
|
|
673
|
+
return (e, t) => (L(), A("div", Dt, [
|
|
674
|
+
j("div", Ot, [
|
|
675
|
+
M(V(Oe), {
|
|
676
|
+
size: 14,
|
|
677
|
+
class: "td-search-icon"
|
|
678
|
+
}),
|
|
679
|
+
pe(j("input", {
|
|
680
|
+
"onUpdate:modelValue": t[0] ||= (e) => i.value = e,
|
|
681
|
+
class: "td-search-input",
|
|
682
|
+
type: "text",
|
|
683
|
+
placeholder: "Search..."
|
|
684
|
+
}, null, 512), [[fe, i.value]]),
|
|
685
|
+
u.value ? (L(), A("span", kt, B(s.value.length), 1)) : k("", !0),
|
|
686
|
+
i.value ? (L(), A("button", {
|
|
687
|
+
key: 1,
|
|
688
|
+
class: "td-search-clear",
|
|
689
|
+
type: "button",
|
|
690
|
+
"aria-label": "Clear search",
|
|
691
|
+
onClick: v
|
|
692
|
+
}, [M(V(X), { size: 12 })])) : k("", !0)
|
|
693
|
+
]),
|
|
694
|
+
u.value && s.value.length > 0 ? (L(), A("div", At, [(L(!0), A(E, null, z(s.value, (e) => (L(), A("a", {
|
|
695
|
+
key: e.id,
|
|
696
|
+
href: e.id,
|
|
697
|
+
class: "td-search-result",
|
|
698
|
+
onClick: ne
|
|
699
|
+
}, [
|
|
700
|
+
j("span", Mt, [j("span", {
|
|
701
|
+
class: "td-search-result-title",
|
|
702
|
+
innerHTML: C(e.title, i.value)
|
|
703
|
+
}, null, 8, Nt), T(e.id) ? (L(), A("span", Pt, "current page")) : k("", !0)]),
|
|
704
|
+
j("span", Ft, B(e.titles.join(" / ")), 1),
|
|
705
|
+
e.excerpt ? (L(), A("span", {
|
|
706
|
+
key: 0,
|
|
707
|
+
class: "td-search-result-excerpt",
|
|
708
|
+
innerHTML: C(e.excerpt, i.value)
|
|
709
|
+
}, null, 8, It)) : k("", !0)
|
|
710
|
+
], 8, jt))), 128))])) : k("", !0),
|
|
711
|
+
u.value && s.value.length === 0 ? (L(), A("div", Lt, " No results for \"" + B(i.value) + "\" ", 1)) : k("", !0)
|
|
712
|
+
]));
|
|
713
|
+
}
|
|
714
|
+
}), [["__scopeId", "data-v-44fb07da"]]), Bt = /* @__PURE__ */ N({
|
|
215
715
|
__name: "TdThemeToggle",
|
|
216
716
|
setup(e) {
|
|
217
|
-
let { isDark: t, toggle:
|
|
218
|
-
return (e,
|
|
219
|
-
class: "w-9 h-9 text-td-
|
|
220
|
-
label:
|
|
221
|
-
onClick:
|
|
717
|
+
let { isDark: t, toggle: n } = ne();
|
|
718
|
+
return (e, r) => (L(), O(Z, {
|
|
719
|
+
class: "w-9 h-9 text-td-neutral-fg-muted group hover:opacity-70",
|
|
720
|
+
label: V(t) ? "Switch to light mode" : "Switch to dark mode",
|
|
721
|
+
onClick: V(n)
|
|
222
722
|
}, {
|
|
223
|
-
default:
|
|
723
|
+
default: W(() => [V(t) ? (L(), O(V(ke), {
|
|
224
724
|
key: 0,
|
|
225
725
|
size: 18,
|
|
226
|
-
class: "group-hover:text-td-
|
|
227
|
-
})) : (
|
|
726
|
+
class: "group-hover:text-td-primary-solid transition-colors"
|
|
727
|
+
})) : (L(), O(V(De), {
|
|
228
728
|
key: 1,
|
|
229
729
|
size: 18,
|
|
230
|
-
class: "group-hover:text-td-primary transition-colors"
|
|
730
|
+
class: "group-hover:text-td-primary-solid transition-colors"
|
|
231
731
|
}))]),
|
|
232
732
|
_: 1
|
|
233
733
|
}, 8, ["label", "onClick"]));
|
|
@@ -235,7 +735,7 @@ var pe = /* @__PURE__ */ y({
|
|
|
235
735
|
});
|
|
236
736
|
//#endregion
|
|
237
737
|
//#region src/client/theme-default/composables/useCopyCode.ts
|
|
238
|
-
function
|
|
738
|
+
function Vt() {
|
|
239
739
|
function e(e) {
|
|
240
740
|
let t = e.target?.closest(".copy");
|
|
241
741
|
if (!t) return;
|
|
@@ -247,94 +747,152 @@ function X() {
|
|
|
247
747
|
t.classList.remove("copied"), t.setAttribute("title", i);
|
|
248
748
|
}, 2e3);
|
|
249
749
|
}
|
|
250
|
-
|
|
750
|
+
oe(() => {
|
|
251
751
|
document.addEventListener("click", e);
|
|
252
|
-
}),
|
|
752
|
+
}), se(() => {
|
|
253
753
|
document.removeEventListener("click", e);
|
|
254
754
|
});
|
|
255
755
|
}
|
|
256
756
|
//#endregion
|
|
257
757
|
//#region src/client/theme-default/TdLayout.vue?vue&type=script&setup=true&lang.ts
|
|
258
|
-
var
|
|
758
|
+
var Ht = { class: "td-header" }, Ut = { class: "td-header-left" }, Wt = {
|
|
259
759
|
href: "/",
|
|
260
760
|
class: "td-brand"
|
|
261
|
-
},
|
|
761
|
+
}, Gt = { class: "td-brand-name" }, Kt = { class: "td-header-right" }, qt = { class: "td-menu-header" }, Jt = { class: "td-header-left" }, Yt = {
|
|
262
762
|
href: "/",
|
|
263
763
|
class: "td-brand"
|
|
264
|
-
},
|
|
764
|
+
}, Xt = { class: "td-brand-name" }, Zt = {
|
|
765
|
+
key: 0,
|
|
265
766
|
class: "pt-4",
|
|
266
767
|
"aria-label": "Site navigation"
|
|
267
|
-
},
|
|
768
|
+
}, Qt = { class: "td-page" }, $t = {
|
|
268
769
|
class: "td-sidebar-left",
|
|
269
770
|
"aria-label": "Site navigation"
|
|
270
|
-
},
|
|
771
|
+
}, en = { class: "td-main-and-toc" }, tn = { class: "td-main" }, nn = { class: "td-content" }, rn = {
|
|
271
772
|
key: 0,
|
|
272
773
|
class: "td-page-title"
|
|
273
|
-
},
|
|
774
|
+
}, an = {
|
|
775
|
+
key: 1,
|
|
776
|
+
class: "td-page-meta"
|
|
777
|
+
}, on = { key: 0 }, sn = {
|
|
274
778
|
class: "td-sidebar-right",
|
|
275
779
|
"aria-label": "Table of contents"
|
|
276
|
-
},
|
|
780
|
+
}, cn = {
|
|
277
781
|
key: 0,
|
|
278
782
|
class: "td-toc"
|
|
279
|
-
},
|
|
783
|
+
}, ln = { class: "td-toc-list" }, un = ["href"], dn = /*#__PURE__*/ S(/* @__PURE__ */ N({
|
|
280
784
|
__name: "TdLayout",
|
|
281
785
|
setup(e) {
|
|
282
|
-
let { title: t, page: n } =
|
|
283
|
-
return
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
786
|
+
let { title: t, page: n } = T(), r = C(), i = b(), { isOpen: a, close: o } = Tt(), s = R(""), c = R(!1), l = R(!1), u = w();
|
|
787
|
+
return U(() => u.path, () => o()), Vt(), (e, u) => (L(), A("div", null, [
|
|
788
|
+
j("header", Ht, [j("div", Ut, [M(Et), j("a", Wt, [M(Pe), j("span", Gt, B(V(r).title || "Typedown"), 1)])]), j("div", Kt, [M(Bt)])]),
|
|
789
|
+
j("div", { class: F(["td-menu-overlay", { "is-open": V(a) }]) }, [
|
|
790
|
+
j("header", qt, [j("div", Jt, [M(Z, {
|
|
791
|
+
class: "w-9 h-9 text-td-neutral-fg-muted hover:text-td-primary-solid",
|
|
792
|
+
label: "Close menu",
|
|
793
|
+
onClick: V(o)
|
|
794
|
+
}, {
|
|
795
|
+
default: W(() => [M(V(X), { size: 20 })]),
|
|
796
|
+
_: 1
|
|
797
|
+
}, 8, ["onClick"]), j("a", Yt, [M(Pe), j("span", Xt, B(V(r).title || "Typedown"), 1)])])]),
|
|
798
|
+
M(zt, {
|
|
799
|
+
query: s.value,
|
|
800
|
+
"onUpdate:query": u[0] ||= (e) => s.value = e,
|
|
801
|
+
active: l.value,
|
|
802
|
+
"onUpdate:active": u[1] ||= (e) => l.value = e,
|
|
803
|
+
onSelect: V(o)
|
|
804
|
+
}, null, 8, [
|
|
805
|
+
"query",
|
|
806
|
+
"active",
|
|
807
|
+
"onSelect"
|
|
808
|
+
]),
|
|
809
|
+
l.value ? k("", !0) : (L(), A("nav", Zt, [M($e, { tree: V(i).contentTree }, null, 8, ["tree"])]))
|
|
810
|
+
], 2),
|
|
811
|
+
j("div", Qt, [j("nav", $t, [M(zt, {
|
|
812
|
+
query: s.value,
|
|
813
|
+
"onUpdate:query": u[2] ||= (e) => s.value = e,
|
|
814
|
+
active: c.value,
|
|
815
|
+
"onUpdate:active": u[3] ||= (e) => c.value = e
|
|
816
|
+
}, null, 8, ["query", "active"]), c.value ? k("", !0) : (L(), O($e, {
|
|
817
|
+
key: 0,
|
|
818
|
+
tree: V(i).contentTree
|
|
819
|
+
}, null, 8, ["tree"]))]), j("div", en, [j("main", tn, [j("article", nn, [
|
|
820
|
+
M(it),
|
|
821
|
+
V(t) ? (L(), A("h1", rn, B(V(t)), 1)) : k("", !0),
|
|
822
|
+
V(n).metadata ? (L(), A("div", an, [j("span", null, B(V(p)(V(n).metadata.mtime, "Modified")), 1), V(n).metadata.ctime === V(n).metadata.mtime ? k("", !0) : (L(), A("span", on, " · " + B(V(p)(V(n).metadata.ctime, "Created")), 1))])) : k("", !0),
|
|
823
|
+
M(V(wt), {
|
|
824
|
+
schema: V(n).schema,
|
|
825
|
+
frontmatter: V(n).frontmatter
|
|
826
|
+
}, null, 8, ["schema", "frontmatter"]),
|
|
827
|
+
M(V(x))
|
|
828
|
+
])]), j("nav", sn, [V(n).headings.length ? (L(), A("div", cn, [u[4] ||= j("div", { class: "td-toc-label" }, " On this page ", -1), j("ul", ln, [(L(!0), A(E, null, z(V(n).headings, (e) => (L(), A("li", {
|
|
294
829
|
key: e.slug,
|
|
295
|
-
class:
|
|
830
|
+
class: F({
|
|
296
831
|
"td-toc-indent-1": e.level === 3,
|
|
297
832
|
"td-toc-indent-2": e.level === 4,
|
|
298
833
|
"td-toc-indent-3": e.level === 5
|
|
299
834
|
})
|
|
300
|
-
}, [
|
|
835
|
+
}, [j("a", {
|
|
301
836
|
href: e.link,
|
|
302
837
|
class: "td-toc-link"
|
|
303
|
-
},
|
|
838
|
+
}, B(e.title), 9, un)], 2))), 128))])])) : k("", !0)])])])
|
|
304
839
|
]));
|
|
305
840
|
}
|
|
306
|
-
}), [["__scopeId", "data-v-
|
|
307
|
-
function
|
|
308
|
-
return
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
class: "inline-flex items-center mt-6 text-td-primary text-td-ui font-td-heading tracking-td-heading hover:text-td-primary-hover",
|
|
841
|
+
}), [["__scopeId", "data-v-24088016"]]), fn = {}, pn = { class: "pt-16 pb-24" };
|
|
842
|
+
function mn(e, t) {
|
|
843
|
+
return L(), A("div", pn, [...t[0] ||= [
|
|
844
|
+
j("p", { class: "text-td-display font-td-heading leading-none tracking-td-title text-td-fg-muted" }, " 404 ", -1),
|
|
845
|
+
j("h1", { class: "text-td-h2 font-td-heading leading-td-heading tracking-td-heading mt-4" }, " Page Not Found ", -1),
|
|
846
|
+
j("p", { class: "text-td-fg-muted mt-2 text-td-body leading-td-body" }, " The page you are looking for does not exist. ", -1),
|
|
847
|
+
j("a", {
|
|
848
|
+
class: "inline-flex items-center mt-6 text-td-primary-solid text-td-ui font-td-heading tracking-td-heading hover:text-td-primary-solid-hover",
|
|
314
849
|
href: "/"
|
|
315
850
|
}, "Go Home", -1)
|
|
316
851
|
]]);
|
|
317
852
|
}
|
|
318
|
-
var
|
|
319
|
-
__name: "
|
|
320
|
-
props: {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
853
|
+
var hn = /*#__PURE__*/ S(fn, [["render", mn]]), gn = ["href"], _n = { key: 1 }, vn = ["href"], yn = { class: "font-td-semibold text-td-body-sm" }, bn = { class: "text-td-label text-td-neutral-fg-muted ml-auto" }, xn = { key: 2 }, Sn = ["href"], Cn = { class: "font-td-semibold text-td-body-sm" }, wn = /*#__PURE__*/ S(/* @__PURE__ */ N({
|
|
854
|
+
__name: "TdDirectoryIndex",
|
|
855
|
+
props: {
|
|
856
|
+
url: {},
|
|
857
|
+
subdirectories: { default: () => [] },
|
|
858
|
+
items: { default: () => [] }
|
|
859
|
+
},
|
|
860
|
+
setup(e) {
|
|
861
|
+
let t = D(() => e.url === "/"), n = D(() => a(e.url));
|
|
862
|
+
return (r, i) => (L(), A("div", null, [
|
|
863
|
+
t.value ? k("", !0) : (L(), A("a", {
|
|
864
|
+
key: 0,
|
|
865
|
+
href: n.value,
|
|
866
|
+
class: "td-dir-row"
|
|
867
|
+
}, [M(V(Ce), {
|
|
868
|
+
size: 16,
|
|
869
|
+
class: "text-td-gray-500 flex-shrink-0"
|
|
870
|
+
}), i[0] ||= j("span", { class: "font-td-semibold text-td-body-sm text-td-neutral-fg-muted" }, "..", -1)], 8, gn)),
|
|
871
|
+
e.subdirectories.length > 0 ? (L(), A("div", _n, [(L(!0), A(E, null, z(e.subdirectories, (e) => (L(), A("a", {
|
|
872
|
+
key: e.url,
|
|
873
|
+
href: e.url,
|
|
874
|
+
class: "td-dir-row"
|
|
875
|
+
}, [
|
|
876
|
+
M(V(we), {
|
|
877
|
+
size: 16,
|
|
878
|
+
class: "text-td-gray-500 flex-shrink-0"
|
|
879
|
+
}),
|
|
880
|
+
j("span", yn, B(e.name), 1),
|
|
881
|
+
j("span", bn, B(e.count), 1)
|
|
882
|
+
], 8, vn))), 128))])) : k("", !0),
|
|
883
|
+
e.items.length > 0 ? (L(), A("div", xn, [(L(!0), A(E, null, z(e.items, (e) => (L(), A("a", {
|
|
884
|
+
key: e.url,
|
|
885
|
+
href: e.url,
|
|
886
|
+
class: "td-dir-row"
|
|
887
|
+
}, [M(V(Y), {
|
|
888
|
+
size: 16,
|
|
889
|
+
class: "text-td-gray-500 flex-shrink-0"
|
|
890
|
+
}), j("span", Cn, B(e.name), 1)], 8, Sn))), 128))])) : k("", !0)
|
|
891
|
+
]));
|
|
334
892
|
}
|
|
335
|
-
}), [["__scopeId", "data-v-
|
|
336
|
-
Layout:
|
|
337
|
-
NotFound:
|
|
893
|
+
}), [["__scopeId", "data-v-d08106fa"]]), Tn = {
|
|
894
|
+
Layout: dn,
|
|
895
|
+
NotFound: hn
|
|
338
896
|
};
|
|
339
897
|
//#endregion
|
|
340
|
-
export {
|
|
898
|
+
export { wn as TdDirectoryIndex, dn as TdLayout, hn as TdNotFound, Tn as default, Vt as useCopyCode };
|