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