typerighter 0.11.0 → 0.11.2
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.
Potentially problematic release.
This version of typerighter might be problematic. Click here for more details.
- package/dist/{app-C-qfoH4a.js → app-C35j_dTB.js} +1 -1
- package/dist/{cli-SWWO1fzA.js → cli-C_HI052E.js} +53 -53
- package/dist/cli.js +1 -1
- package/dist/client/theme-default.js +515 -421
- package/dist/client.js +1 -1
- package/dist/index.js +2 -2
- package/dist/{init-3_ZHUZAp.js → init-pXnb5d5A.js} +7 -7
- package/dist/node/plugin/vite/index.d.ts.map +1 -1
- package/dist/{shared-BIdsxcZ2.js → shared-xivlz-gA.js} +1 -1
- package/dist/shared.js +2 -2
- package/dist/typerighter.css +1 -1
- package/dist/{vite-8CV23ALg.js → vite-ofOi3oqG.js} +38 -3
- package/dist/vite.js +1 -1
- package/package.json +3 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as
|
|
3
|
-
import { a as
|
|
4
|
-
import { a as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
var
|
|
1
|
+
import { B as e, D as t, E as n, O as r, P as i, R as a, T as o, _ as s, b as c, c as l, g as u, i as d, k as f, l as p, m, n as h, o as g, r as _, s as v, u as y, x as b, y as x, z as ee } from "../shared-xivlz-gA.js";
|
|
2
|
+
import { r as S, t as te } from "../es-CG8rP6j5.js";
|
|
3
|
+
import { a as C, c as w, d as ne, f as T, h as E, i as D, l as O, m as re, n as ie, o as ae, p as oe, r as se, s as ce } from "../app-C35j_dTB.js";
|
|
4
|
+
import { a as le, i as ue, n as de, t as fe } from "../brand-CG1fQshq.js";
|
|
5
|
+
import { Fragment as k, Teleport as pe, computed as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createTextVNode as me, createVNode as F, defineComponent as I, markRaw as he, mergeModels as ge, mergeProps as _e, nextTick as ve, normalizeClass as L, normalizeStyle as R, onBeforeUnmount as ye, onMounted as be, onUnmounted as z, openBlock as B, readonly as xe, ref as V, renderList as H, renderSlot as U, resolveComponent as Se, shallowRef as Ce, toDisplayString as W, unref as G, useModel as K, useTemplateRef as we, vModelText as Te, watch as q, watchEffect as Ee, withCtx as J, withDirectives as De, withModifiers as Oe } from "vue";
|
|
6
|
+
var ke = E("chevron-down", [["path", {
|
|
7
7
|
d: "m6 9 6 6 6-6",
|
|
8
8
|
key: "qrunsl"
|
|
9
|
-
}]]),
|
|
9
|
+
}]]), Ae = E("chevron-right", [["path", {
|
|
10
10
|
d: "m9 18 6-6-6-6",
|
|
11
11
|
key: "mthhwq"
|
|
12
|
-
}]]),
|
|
12
|
+
}]]), je = E("chevron-left", [["path", {
|
|
13
13
|
d: "m15 18-6-6 6-6",
|
|
14
14
|
key: "1wnfg3"
|
|
15
|
-
}]]),
|
|
15
|
+
}]]), Me = E("ellipsis", [
|
|
16
16
|
["circle", {
|
|
17
17
|
cx: "12",
|
|
18
18
|
cy: "12",
|
|
@@ -31,19 +31,40 @@ var we = E("chevron-down", [["path", {
|
|
|
31
31
|
r: "1",
|
|
32
32
|
key: "1pcz8c"
|
|
33
33
|
}]
|
|
34
|
-
]),
|
|
34
|
+
]), Ne = E("file-text", [
|
|
35
|
+
["path", {
|
|
36
|
+
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",
|
|
37
|
+
key: "1oefj6"
|
|
38
|
+
}],
|
|
39
|
+
["path", {
|
|
40
|
+
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
41
|
+
key: "wfsgrz"
|
|
42
|
+
}],
|
|
43
|
+
["path", {
|
|
44
|
+
d: "M10 9H8",
|
|
45
|
+
key: "b1mrlr"
|
|
46
|
+
}],
|
|
47
|
+
["path", {
|
|
48
|
+
d: "M16 13H8",
|
|
49
|
+
key: "t4e002"
|
|
50
|
+
}],
|
|
51
|
+
["path", {
|
|
52
|
+
d: "M16 17H8",
|
|
53
|
+
key: "z1uh3a"
|
|
54
|
+
}]
|
|
55
|
+
]), Pe = E("folder-open", [["path", {
|
|
35
56
|
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",
|
|
36
57
|
key: "usdka0"
|
|
37
|
-
}]]),
|
|
58
|
+
}]]), Fe = E("house", [["path", {
|
|
38
59
|
d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",
|
|
39
60
|
key: "5wwlr5"
|
|
40
61
|
}], ["path", {
|
|
41
62
|
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",
|
|
42
63
|
key: "r6nss1"
|
|
43
|
-
}]]),
|
|
64
|
+
}]]), Ie = E("loader-circle", [["path", {
|
|
44
65
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
45
66
|
key: "13zald"
|
|
46
|
-
}]]),
|
|
67
|
+
}]]), Le = E("menu", [
|
|
47
68
|
["path", {
|
|
48
69
|
d: "M4 5h16",
|
|
49
70
|
key: "1tepv9"
|
|
@@ -56,10 +77,10 @@ var we = E("chevron-down", [["path", {
|
|
|
56
77
|
d: "M4 19h16",
|
|
57
78
|
key: "1djgab"
|
|
58
79
|
}]
|
|
59
|
-
]),
|
|
80
|
+
]), Re = E("moon", [["path", {
|
|
60
81
|
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",
|
|
61
82
|
key: "kfwtm"
|
|
62
|
-
}]]),
|
|
83
|
+
}]]), ze = E("search", [["path", {
|
|
63
84
|
d: "m21 21-4.34-4.34",
|
|
64
85
|
key: "14j7rj"
|
|
65
86
|
}], ["circle", {
|
|
@@ -67,20 +88,20 @@ var we = E("chevron-down", [["path", {
|
|
|
67
88
|
cy: "11",
|
|
68
89
|
r: "8",
|
|
69
90
|
key: "4ej97u"
|
|
70
|
-
}]]),
|
|
91
|
+
}]]), Be = E("square-check-big", [["path", {
|
|
71
92
|
d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",
|
|
72
93
|
key: "2acyp4"
|
|
73
94
|
}], ["path", {
|
|
74
95
|
d: "m9 11 3 3L22 4",
|
|
75
96
|
key: "1pflzl"
|
|
76
|
-
}]]),
|
|
97
|
+
}]]), Ve = E("square", [["rect", {
|
|
77
98
|
width: "18",
|
|
78
99
|
height: "18",
|
|
79
100
|
x: "3",
|
|
80
101
|
y: "3",
|
|
81
102
|
rx: "2",
|
|
82
103
|
key: "afitv7"
|
|
83
|
-
}]]),
|
|
104
|
+
}]]), He = E("sun", [
|
|
84
105
|
["circle", {
|
|
85
106
|
cx: "12",
|
|
86
107
|
cy: "12",
|
|
@@ -119,79 +140,79 @@ var we = E("chevron-down", [["path", {
|
|
|
119
140
|
d: "m19.07 4.93-1.41 1.41",
|
|
120
141
|
key: "1shlcs"
|
|
121
142
|
}]
|
|
122
|
-
]),
|
|
143
|
+
]), Y = E("x", [["path", {
|
|
123
144
|
d: "M18 6 6 18",
|
|
124
145
|
key: "1bl5f8"
|
|
125
146
|
}], ["path", {
|
|
126
147
|
d: "m6 6 12 12",
|
|
127
148
|
key: "d8bk6v"
|
|
128
|
-
}]]),
|
|
149
|
+
}]]), Ue = [
|
|
129
150
|
"height",
|
|
130
151
|
"width",
|
|
131
152
|
"viewBox"
|
|
132
|
-
],
|
|
153
|
+
], We = ["d"], Ge = ["d"], Ke = ["d"], qe = /* @__PURE__ */ I({
|
|
133
154
|
__name: "TdBrandIcon",
|
|
134
155
|
props: { size: { default: 28 } },
|
|
135
156
|
setup(e) {
|
|
136
|
-
return (t, n) => (
|
|
157
|
+
return (t, n) => (B(), N("svg", {
|
|
137
158
|
fill: "none",
|
|
138
159
|
height: e.size,
|
|
139
160
|
width: e.size * 208 / 128,
|
|
140
|
-
viewBox:
|
|
161
|
+
viewBox: G(le),
|
|
141
162
|
xmlns: "http://www.w3.org/2000/svg"
|
|
142
163
|
}, [
|
|
143
|
-
|
|
164
|
+
P("path", {
|
|
144
165
|
"clip-rule": "evenodd",
|
|
145
|
-
d:
|
|
166
|
+
d: G(de),
|
|
146
167
|
"fill-rule": "evenodd",
|
|
147
168
|
fill: "currentColor"
|
|
148
|
-
}, null, 8,
|
|
149
|
-
|
|
150
|
-
d:
|
|
169
|
+
}, null, 8, We),
|
|
170
|
+
P("path", {
|
|
171
|
+
d: G(ue),
|
|
151
172
|
fill: "currentColor"
|
|
152
|
-
}, null, 8,
|
|
153
|
-
|
|
154
|
-
d:
|
|
173
|
+
}, null, 8, Ge),
|
|
174
|
+
P("path", {
|
|
175
|
+
d: G(fe),
|
|
155
176
|
fill: "currentColor"
|
|
156
|
-
}, null, 8,
|
|
157
|
-
], 8,
|
|
177
|
+
}, null, 8, Ke)
|
|
178
|
+
], 8, Ue));
|
|
158
179
|
}
|
|
159
|
-
}),
|
|
180
|
+
}), Je = ["title", "aria-label"], X = /* @__PURE__ */ I({
|
|
160
181
|
__name: "TdButton",
|
|
161
182
|
props: { label: {} },
|
|
162
183
|
setup(e) {
|
|
163
|
-
return (t, n) => (
|
|
184
|
+
return (t, n) => (B(), N("button", {
|
|
164
185
|
type: "button",
|
|
165
186
|
class: "inline-flex items-center justify-center cursor-pointer",
|
|
166
187
|
title: e.label,
|
|
167
188
|
"aria-label": e.label
|
|
168
|
-
}, [
|
|
189
|
+
}, [U(t.$slots, "default")], 8, Je));
|
|
169
190
|
}
|
|
170
|
-
}),
|
|
171
|
-
function
|
|
191
|
+
}), Ye = /\$([^$]+)\$/g;
|
|
192
|
+
function Xe(e) {
|
|
172
193
|
let t = 0, n = "";
|
|
173
|
-
for (let r of e.matchAll(
|
|
174
|
-
n +=
|
|
194
|
+
for (let r of e.matchAll(Ye)) {
|
|
195
|
+
n += v(e.slice(t, r.index));
|
|
175
196
|
try {
|
|
176
|
-
n +=
|
|
197
|
+
n += S.renderToString(r[1], {
|
|
177
198
|
throwOnError: !1,
|
|
178
199
|
output: "htmlAndMathml"
|
|
179
200
|
});
|
|
180
201
|
} catch {
|
|
181
|
-
n +=
|
|
202
|
+
n += v(r[0]);
|
|
182
203
|
}
|
|
183
204
|
t = r.index + r[0].length;
|
|
184
205
|
}
|
|
185
|
-
return n +=
|
|
206
|
+
return n += v(e.slice(t)), n;
|
|
186
207
|
}
|
|
187
208
|
//#endregion
|
|
188
209
|
//#region src/client/theme-default/components/TdTooltip.vue
|
|
189
|
-
var
|
|
210
|
+
var Ze = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
190
211
|
inheritAttrs: !1,
|
|
191
212
|
__name: "TdTooltip",
|
|
192
213
|
props: { text: {} },
|
|
193
214
|
setup(e) {
|
|
194
|
-
let t =
|
|
215
|
+
let t = we("wrapper"), n = V(!1), r = V({
|
|
195
216
|
top: "0px",
|
|
196
217
|
left: "0px"
|
|
197
218
|
}), i;
|
|
@@ -213,155 +234,155 @@ var Ge = /*#__PURE__*/ T(/* @__PURE__ */ R({
|
|
|
213
234
|
left: `${i.left}px`
|
|
214
235
|
}, n.value = !0;
|
|
215
236
|
}
|
|
216
|
-
return
|
|
237
|
+
return ye(() => {
|
|
217
238
|
a();
|
|
218
|
-
}), (i, c) => (
|
|
239
|
+
}), (i, c) => (B(), N(k, null, [P("span", _e({
|
|
219
240
|
ref_key: "wrapper",
|
|
220
241
|
ref: t
|
|
221
242
|
}, i.$attrs, {
|
|
222
243
|
class: "td-tooltip-trigger",
|
|
223
244
|
onMouseenter: s,
|
|
224
245
|
onMouseleave: o
|
|
225
|
-
}), [
|
|
246
|
+
}), [U(i.$slots, "default", {}, void 0, !0)], 16), (B(), j(pe, { to: "body" }, [n.value ? (B(), N("span", {
|
|
226
247
|
key: 0,
|
|
227
248
|
class: "td-tooltip",
|
|
228
|
-
style:
|
|
249
|
+
style: R(r.value),
|
|
229
250
|
role: "tooltip",
|
|
230
251
|
onMouseenter: a,
|
|
231
252
|
onMouseleave: o
|
|
232
|
-
},
|
|
253
|
+
}, W(e.text), 37)) : M("", !0)]))], 64));
|
|
233
254
|
}
|
|
234
|
-
}), [["__scopeId", "data-v-018d7f4b"]]),
|
|
255
|
+
}), [["__scopeId", "data-v-018d7f4b"]]), Qe = {
|
|
235
256
|
key: 0,
|
|
236
257
|
class: "td-tree-node"
|
|
237
|
-
},
|
|
258
|
+
}, $e = { class: "td-tree-label" }, et = ["aria-expanded"], tt = { class: "td-tree-label-text" }, nt = ["href"], rt = { class: "td-tree-count" }, it = {
|
|
238
259
|
key: 0,
|
|
239
260
|
class: "td-tree-children"
|
|
240
|
-
},
|
|
261
|
+
}, at = ["href"], ot = ["innerHTML"], st = { class: "td-tree-time" }, ct = 20, lt = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
241
262
|
__name: "TdTreeNode",
|
|
242
263
|
props: {
|
|
243
264
|
node: {},
|
|
244
265
|
urlPrefix: { default: "" }
|
|
245
266
|
},
|
|
246
|
-
setup(
|
|
247
|
-
let
|
|
267
|
+
setup(e) {
|
|
268
|
+
let t = O(), { withBase: n } = D(), r = u(e.urlPrefix, e.node.name), o = e.node.items.find((e) => f(e.filepath) === a), c = o ? x(o.filepath) : s(r), l = n(c), p = e.node.items.filter((e) => f(e.filepath) !== a), h = 0 < e.node.children.length || 0 < e.node.items.length, g = A(() => _(e.node));
|
|
248
269
|
function _(e) {
|
|
249
270
|
return e.items.length + e.children.reduce((e, t) => e + _(t), 0);
|
|
250
271
|
}
|
|
251
|
-
let v =
|
|
252
|
-
|
|
253
|
-
|
|
272
|
+
let v = V(!b(r, t.path)), y = V(!1), ee = A(() => y.value ? p : p.slice(0, ct)), S = A(() => Math.max(0, p.length - ct));
|
|
273
|
+
q(() => t.path, (e) => {
|
|
274
|
+
b(r, e) && (v.value = !1);
|
|
254
275
|
});
|
|
255
|
-
function
|
|
256
|
-
|
|
276
|
+
function te() {
|
|
277
|
+
y.value = !0;
|
|
257
278
|
}
|
|
258
|
-
function
|
|
259
|
-
return
|
|
279
|
+
function C(e) {
|
|
280
|
+
return t.path === e;
|
|
260
281
|
}
|
|
261
|
-
function
|
|
282
|
+
function w() {
|
|
262
283
|
v.value = !v.value;
|
|
263
284
|
}
|
|
264
|
-
return (
|
|
265
|
-
let
|
|
266
|
-
return
|
|
267
|
-
|
|
285
|
+
return (t, a) => {
|
|
286
|
+
let o = Se("TdTreeNode", !0);
|
|
287
|
+
return G(h) ? (B(), N("div", Qe, [P("div", $e, [
|
|
288
|
+
P("button", {
|
|
268
289
|
type: "button",
|
|
269
290
|
class: "td-tree-toggle",
|
|
270
291
|
"aria-expanded": !v.value,
|
|
271
|
-
onClick:
|
|
272
|
-
}, [
|
|
292
|
+
onClick: w
|
|
293
|
+
}, [F(G(ke), {
|
|
273
294
|
size: 14,
|
|
274
|
-
class:
|
|
275
|
-
}, null, 8, ["class"]),
|
|
276
|
-
|
|
277
|
-
href:
|
|
278
|
-
class:
|
|
279
|
-
}, [
|
|
295
|
+
class: L(["td-tree-caret", { "is-collapsed": v.value }])
|
|
296
|
+
}, null, 8, ["class"]), P("span", tt, W(G(i)(e.node.name)), 1)], 8, et),
|
|
297
|
+
P("a", {
|
|
298
|
+
href: G(l),
|
|
299
|
+
class: L(["td-tree-index-btn", { "is-active": C(G(c)) }])
|
|
300
|
+
}, [C(G(c)) ? (B(), j(G(Pe), {
|
|
280
301
|
key: 0,
|
|
281
302
|
size: 12
|
|
282
|
-
})) : (
|
|
303
|
+
})) : (B(), j(G(oe), {
|
|
283
304
|
key: 1,
|
|
284
305
|
size: 12
|
|
285
|
-
}))], 10,
|
|
286
|
-
|
|
287
|
-
]), v.value ?
|
|
288
|
-
(
|
|
306
|
+
}))], 10, nt),
|
|
307
|
+
P("span", rt, W(g.value), 1)
|
|
308
|
+
]), v.value ? M("", !0) : (B(), N("div", it, [
|
|
309
|
+
(B(!0), N(k, null, H(e.node.children, (e) => (B(), j(o, {
|
|
289
310
|
key: e.name,
|
|
290
311
|
node: e,
|
|
291
|
-
"url-prefix":
|
|
312
|
+
"url-prefix": G(r)
|
|
292
313
|
}, null, 8, ["node", "url-prefix"]))), 128)),
|
|
293
|
-
(
|
|
314
|
+
(B(!0), N(k, null, H(ee.value, (e) => (B(), N("a", {
|
|
294
315
|
key: e.filepath,
|
|
295
|
-
href:
|
|
296
|
-
class:
|
|
316
|
+
href: G(n)(G(x)(e.filepath)),
|
|
317
|
+
class: L(["td-tree-link", { "is-active": C(G(x)(e.filepath)) }])
|
|
297
318
|
}, [
|
|
298
|
-
|
|
319
|
+
F(G(re), {
|
|
299
320
|
size: 14,
|
|
300
321
|
class: "td-tree-file-icon"
|
|
301
322
|
}),
|
|
302
|
-
|
|
323
|
+
F(Ze, {
|
|
303
324
|
class: "td-tree-link-text",
|
|
304
|
-
text:
|
|
325
|
+
text: G(m)(e.header, e.filepath)
|
|
305
326
|
}, {
|
|
306
|
-
default:
|
|
327
|
+
default: J(() => [P("span", { innerHTML: G(Xe)(G(m)(e.header, e.filepath)) }, null, 8, ot)]),
|
|
307
328
|
_: 2
|
|
308
329
|
}, 1032, ["text"]),
|
|
309
|
-
|
|
310
|
-
], 10,
|
|
311
|
-
S.value > 0 && !
|
|
330
|
+
P("span", st, W(G(d)(e.metadata.mtime)), 1)
|
|
331
|
+
], 10, at))), 128)),
|
|
332
|
+
S.value > 0 && !y.value ? (B(), N("button", {
|
|
312
333
|
key: 0,
|
|
313
334
|
class: "td-tree-more",
|
|
314
335
|
type: "button",
|
|
315
|
-
onClick:
|
|
316
|
-
},
|
|
317
|
-
]))])) :
|
|
336
|
+
onClick: te
|
|
337
|
+
}, W(S.value) + " more ", 1)) : M("", !0)
|
|
338
|
+
]))])) : M("", !0);
|
|
318
339
|
};
|
|
319
340
|
}
|
|
320
|
-
}), [["__scopeId", "data-v-357d77d6"]]),
|
|
341
|
+
}), [["__scopeId", "data-v-357d77d6"]]), ut = ["href"], dt = {
|
|
321
342
|
key: 0,
|
|
322
343
|
class: "td-root-link-time"
|
|
323
|
-
},
|
|
344
|
+
}, ft = ["href"], pt = { class: "td-root-link-text" }, mt = { class: "td-root-link-time" }, ht = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
324
345
|
__name: "TdContentNav",
|
|
325
346
|
props: { tree: {} },
|
|
326
|
-
setup(
|
|
327
|
-
let
|
|
328
|
-
function
|
|
329
|
-
return
|
|
347
|
+
setup(e) {
|
|
348
|
+
let t = O(), { withBase: n } = D(), r = e.tree.rootItems.find((e) => f(e.filepath) === a), i = e.tree.rootItems.filter((e) => f(e.filepath) !== a);
|
|
349
|
+
function o(e) {
|
|
350
|
+
return t.path === e;
|
|
330
351
|
}
|
|
331
|
-
return (
|
|
332
|
-
|
|
333
|
-
href:
|
|
334
|
-
class:
|
|
352
|
+
return (t, a) => (B(), N("nav", null, [
|
|
353
|
+
P("a", {
|
|
354
|
+
href: G(n)(G(r) ? G(x)(G(r).filepath) : G(s)("/")),
|
|
355
|
+
class: L(["td-root-link", { "is-active": o(G(r) ? G(x)(G(r).filepath) : G(s)("/")) }])
|
|
335
356
|
}, [
|
|
336
|
-
|
|
357
|
+
F(G(Fe), {
|
|
337
358
|
size: 14,
|
|
338
359
|
class: "td-root-link-icon"
|
|
339
360
|
}),
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
], 10,
|
|
343
|
-
(
|
|
361
|
+
a[0] ||= P("span", { class: "td-root-link-text" }, "Overview", -1),
|
|
362
|
+
G(r) ? (B(), N("span", dt, W(G(d)(G(r).metadata.mtime)), 1)) : M("", !0)
|
|
363
|
+
], 10, ut),
|
|
364
|
+
(B(!0), N(k, null, H(G(i), (e) => (B(), N("a", {
|
|
344
365
|
key: e.filepath,
|
|
345
|
-
href:
|
|
346
|
-
class:
|
|
366
|
+
href: G(n)(G(x)(e.filepath)),
|
|
367
|
+
class: L(["td-root-link", { "is-active": o(G(x)(e.filepath)) }])
|
|
347
368
|
}, [
|
|
348
|
-
|
|
369
|
+
F(G(re), {
|
|
349
370
|
size: 14,
|
|
350
371
|
class: "td-root-link-icon"
|
|
351
372
|
}),
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
], 10,
|
|
355
|
-
(
|
|
373
|
+
P("span", pt, W(G(m)(e.header, e.filepath)), 1),
|
|
374
|
+
P("span", mt, W(G(d)(e.metadata.mtime)), 1)
|
|
375
|
+
], 10, ft))), 128)),
|
|
376
|
+
(B(!0), N(k, null, H(e.tree.children, (e) => (B(), j(lt, {
|
|
356
377
|
key: e.name,
|
|
357
378
|
node: e
|
|
358
379
|
}, null, 8, ["node"]))), 128))
|
|
359
380
|
]));
|
|
360
381
|
}
|
|
361
|
-
}), [["__scopeId", "data-v-1efa59be"]]),
|
|
382
|
+
}), [["__scopeId", "data-v-1efa59be"]]), gt = {
|
|
362
383
|
key: 0,
|
|
363
384
|
class: "td-dropdown-panel"
|
|
364
|
-
},
|
|
385
|
+
}, _t = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
365
386
|
inheritAttrs: !1,
|
|
366
387
|
__name: "TdDropdown",
|
|
367
388
|
props: {
|
|
@@ -373,39 +394,39 @@ var Ge = /*#__PURE__*/ T(/* @__PURE__ */ R({
|
|
|
373
394
|
},
|
|
374
395
|
emits: ["update:open"],
|
|
375
396
|
setup(e) {
|
|
376
|
-
let t =
|
|
397
|
+
let t = K(e, "open"), n = we("wrapper");
|
|
377
398
|
function r(e) {
|
|
378
399
|
n.value?.contains(e.target) || (t.value = !1);
|
|
379
400
|
}
|
|
380
401
|
function i() {
|
|
381
402
|
t.value = !t.value;
|
|
382
403
|
}
|
|
383
|
-
return
|
|
404
|
+
return q(t, (e) => {
|
|
384
405
|
typeof document > "u" || (e ? document.addEventListener("click", r) : document.removeEventListener("click", r));
|
|
385
|
-
}),
|
|
406
|
+
}), z(() => {
|
|
386
407
|
typeof document > "u" || document.removeEventListener("click", r);
|
|
387
|
-
}), (e, r) => (
|
|
408
|
+
}), (e, r) => (B(), N("span", _e({
|
|
388
409
|
ref_key: "wrapper",
|
|
389
410
|
ref: n
|
|
390
|
-
}, e.$attrs, { class: "td-dropdown" }), [
|
|
411
|
+
}, e.$attrs, { class: "td-dropdown" }), [P("span", { onClick: i }, [U(e.$slots, "trigger", {}, void 0, !0)]), t.value ? (B(), N("div", gt, [U(e.$slots, "default", {}, void 0, !0)])) : M("", !0)], 16));
|
|
391
412
|
}
|
|
392
|
-
}), [["__scopeId", "data-v-d71f3c74"]]),
|
|
413
|
+
}), [["__scopeId", "data-v-d71f3c74"]]), vt = {
|
|
393
414
|
class: "td-breadcrumb",
|
|
394
415
|
"aria-label": "Breadcrumb"
|
|
395
|
-
},
|
|
416
|
+
}, yt = ["href"], bt = {
|
|
396
417
|
type: "button",
|
|
397
418
|
class: "td-breadcrumb-ellipsis"
|
|
398
|
-
},
|
|
419
|
+
}, xt = ["href"], St = ["href"], Ct = {
|
|
399
420
|
key: 1,
|
|
400
421
|
class: "td-breadcrumb-current"
|
|
401
|
-
},
|
|
422
|
+
}, wt = ["href"], Tt = {
|
|
402
423
|
key: 1,
|
|
403
424
|
class: "td-breadcrumb-current"
|
|
404
|
-
},
|
|
425
|
+
}, Et = 3, Dt = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
405
426
|
__name: "TdBreadcrumb",
|
|
406
427
|
setup(e) {
|
|
407
|
-
let
|
|
408
|
-
let e = t
|
|
428
|
+
let t = O(), { withBase: r } = D(), a = V(!1), o = A(() => {
|
|
429
|
+
let e = n(t.path), a = [{
|
|
409
430
|
name: "Home",
|
|
410
431
|
href: r(s("/"))
|
|
411
432
|
}];
|
|
@@ -419,105 +440,166 @@ var Ge = /*#__PURE__*/ T(/* @__PURE__ */ R({
|
|
|
419
440
|
});
|
|
420
441
|
}
|
|
421
442
|
return a;
|
|
422
|
-
}), l =
|
|
423
|
-
return
|
|
443
|
+
}), l = A(() => Et < o.value.length), u = A(() => o.value.slice(1, -2));
|
|
444
|
+
return q(() => t.path, () => {
|
|
424
445
|
a.value = !1;
|
|
425
|
-
}), (e, t) => (
|
|
446
|
+
}), (e, t) => (B(), N("nav", vt, [P("a", {
|
|
426
447
|
href: o.value[0].href,
|
|
427
448
|
class: "td-breadcrumb-link td-breadcrumb-home"
|
|
428
|
-
},
|
|
429
|
-
t[2] ||=
|
|
449
|
+
}, W(o.value[0].name), 9, yt), l.value ? (B(), N(k, { key: 0 }, [
|
|
450
|
+
t[2] ||= P("span", {
|
|
430
451
|
class: "td-breadcrumb-sep",
|
|
431
452
|
"aria-hidden": "true"
|
|
432
453
|
}, "/", -1),
|
|
433
|
-
|
|
454
|
+
F(_t, {
|
|
434
455
|
open: a.value,
|
|
435
456
|
"onUpdate:open": t[0] ||= (e) => a.value = e
|
|
436
457
|
}, {
|
|
437
|
-
trigger:
|
|
438
|
-
default:
|
|
458
|
+
trigger: J(() => [P("button", bt, [F(G(Me), { size: 14 })])]),
|
|
459
|
+
default: J(() => [(B(!0), N(k, null, H(u.value, (e) => (B(), N("a", {
|
|
439
460
|
key: e.href,
|
|
440
461
|
href: e.href,
|
|
441
462
|
class: "td-breadcrumb-dropdown-item"
|
|
442
|
-
},
|
|
463
|
+
}, W(e.name), 9, xt))), 128))]),
|
|
443
464
|
_: 1
|
|
444
465
|
}, 8, ["open"]),
|
|
445
|
-
(
|
|
466
|
+
(B(!0), N(k, null, H(o.value.slice(-2), (e) => (B(), N(k, { key: e.href }, [t[1] ||= P("span", {
|
|
446
467
|
class: "td-breadcrumb-sep",
|
|
447
468
|
"aria-hidden": "true"
|
|
448
|
-
}, "/", -1), e === o.value[o.value.length - 1] ? (
|
|
469
|
+
}, "/", -1), e === o.value[o.value.length - 1] ? (B(), N("span", Ct, W(e.name), 1)) : (B(), N("a", {
|
|
449
470
|
key: 0,
|
|
450
471
|
href: e.href,
|
|
451
472
|
class: "td-breadcrumb-link"
|
|
452
|
-
},
|
|
453
|
-
], 64)) : (
|
|
473
|
+
}, W(e.name), 9, St))], 64))), 128))
|
|
474
|
+
], 64)) : (B(!0), N(k, { key: 1 }, H(o.value.slice(1), (e, n) => (B(), N(k, { key: e.href }, [t[3] ||= P("span", {
|
|
454
475
|
class: "td-breadcrumb-sep",
|
|
455
476
|
"aria-hidden": "true"
|
|
456
|
-
}, "/", -1), n < o.value.length - 2 ? (
|
|
477
|
+
}, "/", -1), n < o.value.length - 2 ? (B(), N("a", {
|
|
457
478
|
key: 0,
|
|
458
479
|
href: e.href,
|
|
459
480
|
class: "td-breadcrumb-link"
|
|
460
|
-
},
|
|
481
|
+
}, W(e.name), 9, wt)) : (B(), N("span", Tt, W(e.name), 1))], 64))), 128))]));
|
|
461
482
|
}
|
|
462
|
-
}), [["__scopeId", "data-v-948f69fb"]]),
|
|
483
|
+
}), [["__scopeId", "data-v-948f69fb"]]), Ot = { class: "td-widget-checkbox" }, kt = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
463
484
|
__name: "TdWidgetCheckbox",
|
|
464
485
|
props: { value: {} },
|
|
465
486
|
setup(e) {
|
|
466
|
-
return (t, n) => (
|
|
487
|
+
return (t, n) => (B(), N("span", Ot, [e.value ? (B(), j(G(Be), {
|
|
467
488
|
key: 0,
|
|
468
489
|
size: 16,
|
|
469
490
|
class: "td-widget-checkbox-icon is-checked"
|
|
470
|
-
})) : (
|
|
491
|
+
})) : (B(), j(G(Ve), {
|
|
471
492
|
key: 1,
|
|
472
493
|
size: 16,
|
|
473
494
|
class: "td-widget-checkbox-icon"
|
|
474
495
|
}))]));
|
|
475
496
|
}
|
|
476
|
-
}), [["__scopeId", "data-v-0efb2919"]])
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
497
|
+
}), [["__scopeId", "data-v-0efb2919"]]), At = /* @__PURE__ */ new Set([
|
|
498
|
+
"png",
|
|
499
|
+
"jpg",
|
|
500
|
+
"jpeg",
|
|
501
|
+
"gif",
|
|
502
|
+
"webp",
|
|
503
|
+
"svg",
|
|
504
|
+
"avif",
|
|
505
|
+
"bmp",
|
|
506
|
+
"ico",
|
|
507
|
+
"tiff"
|
|
508
|
+
]);
|
|
509
|
+
function Z(e) {
|
|
510
|
+
if (!e) return;
|
|
511
|
+
if (typeof e == "string") {
|
|
512
|
+
let n = e.trim();
|
|
513
|
+
return !n || !jt({ url: n }) ? void 0 : {
|
|
514
|
+
url: n,
|
|
515
|
+
name: t(n),
|
|
516
|
+
isImage: !0
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
if (typeof e != "object") return;
|
|
520
|
+
let n = e, r = n.$ref ?? n;
|
|
521
|
+
if (typeof r.url != "string") return;
|
|
522
|
+
let i = r.url, a = r.name ?? t(i), o = r.format ?? n.format;
|
|
523
|
+
return {
|
|
524
|
+
url: i,
|
|
525
|
+
name: a,
|
|
526
|
+
format: o,
|
|
527
|
+
isImage: jt({
|
|
528
|
+
url: i,
|
|
529
|
+
name: a,
|
|
530
|
+
format: o
|
|
531
|
+
})
|
|
487
532
|
};
|
|
488
533
|
}
|
|
534
|
+
function jt(e) {
|
|
535
|
+
if (e.format && At.has(e.format.toLowerCase())) return !0;
|
|
536
|
+
let t = r(e.name || e.url).slice(1);
|
|
537
|
+
return t ? At.has(t.toLowerCase()) : !1;
|
|
538
|
+
}
|
|
489
539
|
//#endregion
|
|
490
|
-
//#region src/client/theme-default/components/TdFrontmatter/widgets/
|
|
491
|
-
var
|
|
540
|
+
//#region src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetRelation.vue?vue&type=script&setup=true&lang.ts
|
|
541
|
+
var Mt = {
|
|
542
|
+
key: 0,
|
|
543
|
+
class: "td-widget-relation-wrapper"
|
|
544
|
+
}, Nt = ["href", "title"], Pt = ["src", "alt"], Ft = ["href"], It = { class: "td-widget-file-name" }, Lt = ["href"], Rt = { key: 1 }, zt = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
545
|
+
__name: "TdWidgetRelation",
|
|
546
|
+
props: { value: {} },
|
|
547
|
+
setup(e) {
|
|
548
|
+
let { withBase: t } = D(), n = Z(e.value);
|
|
549
|
+
return (r, i) => G(n) ? (B(), N("span", Mt, [G(n).isImage ? (B(), N("a", {
|
|
550
|
+
key: 0,
|
|
551
|
+
href: G(t)(G(n).url),
|
|
552
|
+
target: "_blank",
|
|
553
|
+
rel: "noopener noreferrer",
|
|
554
|
+
class: "td-widget-image-preview",
|
|
555
|
+
title: G(n).name
|
|
556
|
+
}, [P("img", {
|
|
557
|
+
src: G(t)(G(n).url),
|
|
558
|
+
alt: G(n).name,
|
|
559
|
+
class: "td-widget-image-img",
|
|
560
|
+
loading: "lazy"
|
|
561
|
+
}, null, 8, Pt)], 8, Nt)) : G(n).format || G(n).url.includes(".") ? (B(), N("a", {
|
|
562
|
+
key: 1,
|
|
563
|
+
href: G(t)(G(n).url),
|
|
564
|
+
target: "_blank",
|
|
565
|
+
rel: "noopener noreferrer",
|
|
566
|
+
class: "td-widget-file-link"
|
|
567
|
+
}, [F(G(Ne), { class: "td-widget-file-icon" }), P("span", It, W(G(n).name), 1)], 8, Ft)) : (B(), N("a", {
|
|
568
|
+
key: 2,
|
|
569
|
+
href: G(t)(G(n).url),
|
|
570
|
+
class: "td-widget-ref"
|
|
571
|
+
}, W(G(n).name), 9, Lt))])) : (B(), N("span", Rt, W(e.value), 1));
|
|
572
|
+
}
|
|
573
|
+
}), [["__scopeId", "data-v-876b5225"]]), Bt = { class: "td-widget-list" }, Vt = { class: "td-widget-list" }, Ht = 5, Ut = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
492
574
|
__name: "TdWidgetList",
|
|
493
575
|
props: {
|
|
494
576
|
definition: {},
|
|
495
577
|
value: {}
|
|
496
578
|
},
|
|
497
579
|
setup(e) {
|
|
498
|
-
let t =
|
|
580
|
+
let t = V(!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 - Ht) : Math.max(0, n.length - Ht);
|
|
499
581
|
function o() {
|
|
500
582
|
t.value = !t.value;
|
|
501
583
|
}
|
|
502
584
|
function s(e) {
|
|
503
|
-
return t.value ? e : e.slice(0,
|
|
585
|
+
return t.value ? e : e.slice(0, Ht);
|
|
504
586
|
}
|
|
505
|
-
return (e, c) => r ? (
|
|
506
|
-
href: e.url,
|
|
507
|
-
class: "td-widget-ref"
|
|
508
|
-
}, K(e.name), 9, Et)]))), 128))]), q(a) > 0 ? (H(), F("button", {
|
|
587
|
+
return (e, c) => r ? (B(), N(k, { key: 0 }, [P("ul", Bt, [(B(!0), N(k, null, H(s(G(i)), (e, t) => (B(), N("li", { key: t }, [F(zt, { value: { $ref: e } }, null, 8, ["value"])]))), 128))]), G(a) > 0 ? (B(), N("button", {
|
|
509
588
|
key: 0,
|
|
510
589
|
class: "td-widget-more",
|
|
511
590
|
type: "button",
|
|
512
591
|
onClick: o
|
|
513
|
-
},
|
|
592
|
+
}, W(t.value ? "show less" : `+${G(a)} more`), 1)) : M("", !0)], 64)) : (B(), N(k, { key: 1 }, [P("ul", Vt, [(B(!0), N(k, null, H(s(G(n)), (e, t) => (B(), N("li", { key: t }, [G(Z)(e) ? (B(), j(zt, {
|
|
593
|
+
key: 0,
|
|
594
|
+
value: e
|
|
595
|
+
}, null, 8, ["value"])) : (B(), N(k, { key: 1 }, [me(W(e), 1)], 64))]))), 128))]), G(a) > 0 ? (B(), N("button", {
|
|
514
596
|
key: 0,
|
|
515
597
|
class: "td-widget-more",
|
|
516
598
|
type: "button",
|
|
517
599
|
onClick: o
|
|
518
|
-
},
|
|
600
|
+
}, W(t.value ? "show less" : `+${G(a)} more`), 1)) : M("", !0)], 64));
|
|
519
601
|
}
|
|
520
|
-
}), [["__scopeId", "data-v-
|
|
602
|
+
}), [["__scopeId", "data-v-13850897"]]), Wt = [
|
|
521
603
|
{
|
|
522
604
|
fg: "#a0522d",
|
|
523
605
|
bg: "rgba(160, 82, 45, 0.1)"
|
|
@@ -551,162 +633,174 @@ var Tt = { class: "td-widget-list" }, Et = ["href"], Dt = { class: "td-widget-li
|
|
|
551
633
|
bg: "rgba(239, 68, 68, 0.1)"
|
|
552
634
|
}
|
|
553
635
|
];
|
|
554
|
-
function
|
|
555
|
-
let t =
|
|
636
|
+
function Gt(e) {
|
|
637
|
+
let t = Wt[Kt(String(e ?? "")) % Wt.length];
|
|
556
638
|
return {
|
|
557
639
|
color: t.fg,
|
|
558
640
|
background: t.bg
|
|
559
641
|
};
|
|
560
642
|
}
|
|
561
|
-
function
|
|
643
|
+
function Kt(e) {
|
|
562
644
|
let t = 0;
|
|
563
645
|
for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n) | 0;
|
|
564
646
|
return Math.abs(t);
|
|
565
647
|
}
|
|
566
648
|
//#endregion
|
|
567
649
|
//#region src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetMultiSelect.vue?vue&type=script&setup=true&lang.ts
|
|
568
|
-
var
|
|
650
|
+
var qt = 5, Jt = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
569
651
|
__name: "TdWidgetMultiSelect",
|
|
570
652
|
props: { value: {} },
|
|
571
653
|
setup(e) {
|
|
572
|
-
let t =
|
|
654
|
+
let t = V(!1), n = Array.isArray(e.value) ? e.value : [], r = () => t.value ? n : n.slice(0, qt), i = Math.max(0, n.length - qt);
|
|
573
655
|
function a() {
|
|
574
656
|
t.value = !t.value;
|
|
575
657
|
}
|
|
576
|
-
return (e, n) => (
|
|
658
|
+
return (e, n) => (B(), N(k, null, [(B(!0), N(k, null, H(r(), (e, t) => (B(), N("span", {
|
|
577
659
|
key: t,
|
|
578
660
|
class: "td-widget-pill",
|
|
579
|
-
style:
|
|
580
|
-
},
|
|
661
|
+
style: R(G(Gt)(e))
|
|
662
|
+
}, W(e), 5))), 128)), G(i) > 0 ? (B(), N("button", {
|
|
581
663
|
key: 0,
|
|
582
664
|
class: "td-widget-more",
|
|
583
665
|
type: "button",
|
|
584
666
|
onClick: a
|
|
585
|
-
},
|
|
667
|
+
}, W(t.value ? "show less" : `+${G(i)} more`), 1)) : M("", !0)], 64));
|
|
586
668
|
}
|
|
587
|
-
}), [["__scopeId", "data-v-33269637"]]),
|
|
588
|
-
__name: "TdWidgetRelation",
|
|
589
|
-
props: { value: {} },
|
|
590
|
-
setup(e) {
|
|
591
|
-
let t = wt(e.value);
|
|
592
|
-
return (n, r) => q(t) ? (H(), F("a", {
|
|
593
|
-
key: 0,
|
|
594
|
-
href: q(t).url,
|
|
595
|
-
class: "td-widget-ref"
|
|
596
|
-
}, K(q(t).name), 9, Ft)) : (H(), F("span", It, K(e.value), 1));
|
|
597
|
-
}
|
|
598
|
-
}), [["__scopeId", "data-v-32528101"]]), Rt = /*#__PURE__*/ T(/* @__PURE__ */ R({
|
|
669
|
+
}), [["__scopeId", "data-v-33269637"]]), Yt = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
599
670
|
__name: "TdWidgetSelect",
|
|
600
671
|
props: { value: {} },
|
|
601
672
|
setup(e) {
|
|
602
|
-
return (t, n) => (
|
|
673
|
+
return (t, n) => (B(), N("span", {
|
|
603
674
|
class: "td-widget-pill",
|
|
604
|
-
style:
|
|
605
|
-
},
|
|
675
|
+
style: R(G(Gt)(e.value))
|
|
676
|
+
}, W(e.value), 5));
|
|
606
677
|
}
|
|
607
|
-
}), [["__scopeId", "data-v-7dea5e20"]]),
|
|
678
|
+
}), [["__scopeId", "data-v-7dea5e20"]]), Xt = ["href", "title"], Zt = ["src", "alt"], Qt = ["href"], $t = { class: "td-widget-file-name" }, en = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
608
679
|
__name: "TdWidgetText",
|
|
609
680
|
props: {
|
|
610
681
|
definition: {},
|
|
611
682
|
value: {}
|
|
612
683
|
},
|
|
613
684
|
setup(e) {
|
|
614
|
-
|
|
615
|
-
|
|
685
|
+
let { withBase: t } = D(), n = typeof e.value == "string" ? e.value.trim() : "", r = Z(e.value), i = r ? r.isImage : 0 < n.length && jt({ url: n }), a = t(r ? r.url : n), o = A(() => !n || !n.includes(".") || n.includes(" ") ? !1 : n.endsWith(".pdf") || n.endsWith(".zip") || n.endsWith(".doc") || n.endsWith(".docx"));
|
|
686
|
+
function s(t) {
|
|
687
|
+
return t == null ? "" : e.definition.widget === "date" ? h(String(t)) : String(t);
|
|
616
688
|
}
|
|
617
|
-
return (
|
|
689
|
+
return (t, c) => G(i) ? (B(), N("a", {
|
|
690
|
+
key: 0,
|
|
691
|
+
href: G(a),
|
|
692
|
+
target: "_blank",
|
|
693
|
+
rel: "noopener noreferrer",
|
|
694
|
+
class: "td-widget-image-preview",
|
|
695
|
+
title: G(r) ? G(r).name : G(n)
|
|
696
|
+
}, [P("img", {
|
|
697
|
+
src: G(a),
|
|
698
|
+
alt: G(r) ? G(r).name : G(n),
|
|
699
|
+
class: "td-widget-image-img",
|
|
700
|
+
loading: "lazy"
|
|
701
|
+
}, null, 8, Zt)], 8, Xt)) : o.value ? (B(), N("a", {
|
|
702
|
+
key: 1,
|
|
703
|
+
href: G(a),
|
|
704
|
+
target: "_blank",
|
|
705
|
+
rel: "noopener noreferrer",
|
|
706
|
+
class: "td-widget-file-link"
|
|
707
|
+
}, [F(G(Ne), { class: "td-widget-file-icon" }), P("span", $t, W(G(n).split("/").pop() ?? G(n)), 1)], 8, Qt)) : (B(), N(k, { key: 2 }, [me(W(s(e.value)), 1)], 64));
|
|
618
708
|
}
|
|
619
|
-
}),
|
|
709
|
+
}), [["__scopeId", "data-v-fd07e395"]]), tn = {
|
|
620
710
|
key: 0,
|
|
621
711
|
class: "td-frontmatter-empty"
|
|
622
|
-
},
|
|
712
|
+
}, nn = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
623
713
|
__name: "TdFrontmatterValue",
|
|
624
714
|
props: {
|
|
625
715
|
definition: {},
|
|
626
716
|
value: {}
|
|
627
717
|
},
|
|
628
718
|
setup(e) {
|
|
629
|
-
return (t, n) => e.value === void 0 || e.value === null ? (
|
|
719
|
+
return (t, n) => e.value === void 0 || e.value === null ? (B(), N("span", tn, "Empty")) : e.definition.widget === "checkbox" ? (B(), j(kt, {
|
|
630
720
|
key: 1,
|
|
631
721
|
value: e.value
|
|
632
|
-
}, null, 8, ["value"])) : e.definition.widget === "select" ? (
|
|
722
|
+
}, null, 8, ["value"])) : e.definition.widget === "select" ? (B(), j(Yt, {
|
|
633
723
|
key: 2,
|
|
634
724
|
value: e.value
|
|
635
|
-
}, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (
|
|
725
|
+
}, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (B(), j(Jt, {
|
|
636
726
|
key: 3,
|
|
637
727
|
value: e.value
|
|
638
|
-
}, null, 8, ["value"])) : e.definition.widget === "relation" ? (
|
|
728
|
+
}, null, 8, ["value"])) : G(Z)(e.value) || e.definition.widget === "relation" ? (B(), j(zt, {
|
|
639
729
|
key: 4,
|
|
640
730
|
value: e.value
|
|
641
|
-
}, null, 8, ["value"])) : e.definition.widget === "list" ? (
|
|
731
|
+
}, null, 8, ["value"])) : Array.isArray(e.value) || e.definition.widget === "list" ? (B(), j(Ut, {
|
|
642
732
|
key: 5,
|
|
643
733
|
definition: e.definition,
|
|
644
734
|
value: e.value
|
|
645
|
-
}, null, 8, ["definition", "value"])) : (
|
|
735
|
+
}, null, 8, ["definition", "value"])) : (B(), j(en, {
|
|
646
736
|
key: 6,
|
|
647
737
|
definition: e.definition,
|
|
648
738
|
value: e.value
|
|
649
739
|
}, null, 8, ["definition", "value"]));
|
|
650
740
|
}
|
|
651
|
-
}), [["__scopeId", "data-v-
|
|
741
|
+
}), [["__scopeId", "data-v-44c1432c"]]), rn = {
|
|
652
742
|
key: 0,
|
|
653
743
|
class: "td-frontmatter"
|
|
654
|
-
},
|
|
744
|
+
}, an = { class: "td-frontmatter-label" }, on = { class: "td-frontmatter-value" }, sn = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
655
745
|
__name: "TdFrontmatter",
|
|
656
746
|
props: {
|
|
657
747
|
schema: { default: () => void 0 },
|
|
658
748
|
frontmatter: {}
|
|
659
749
|
},
|
|
660
750
|
setup(e) {
|
|
661
|
-
let t =
|
|
751
|
+
let t = C(), n = A(() => {
|
|
662
752
|
if (e.schema) return t.schemas[e.schema];
|
|
663
|
-
}), r =
|
|
664
|
-
let t = n.value;
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
753
|
+
}), r = A(() => {
|
|
754
|
+
let t = n.value, r = [], i = /* @__PURE__ */ new Set();
|
|
755
|
+
t && Object.keys(t).forEach((e) => i.add(e)), Object.keys(e.frontmatter).forEach((e) => i.add(e));
|
|
756
|
+
for (let n of i) {
|
|
757
|
+
if (p(n)) continue;
|
|
758
|
+
let i = e.frontmatter[n];
|
|
759
|
+
if (i == null || Array.isArray(i) && i.length === 0) continue;
|
|
760
|
+
let a = t?.[n] ?? { widget: "text" };
|
|
761
|
+
r.push([n, a]);
|
|
762
|
+
}
|
|
763
|
+
return r;
|
|
670
764
|
});
|
|
671
|
-
return (t, n) => r.value.length > 0 ? (
|
|
765
|
+
return (t, n) => r.value.length > 0 ? (B(), N("div", rn, [(B(!0), N(k, null, H(r.value, ([t, n]) => (B(), N("div", {
|
|
672
766
|
key: t,
|
|
673
767
|
class: "td-frontmatter-row"
|
|
674
|
-
}, [
|
|
768
|
+
}, [P("span", an, W(G(i)(t)), 1), P("span", on, [F(nn, {
|
|
675
769
|
definition: n,
|
|
676
770
|
value: e.frontmatter[t]
|
|
677
|
-
}, null, 8, ["definition", "value"])])]))), 128))])) :
|
|
771
|
+
}, null, 8, ["definition", "value"])])]))), 128))])) : M("", !0);
|
|
678
772
|
}
|
|
679
|
-
}), [["__scopeId", "data-v-
|
|
680
|
-
function
|
|
773
|
+
}), [["__scopeId", "data-v-3b6a0d40"]]), Q = V(!1);
|
|
774
|
+
function cn() {
|
|
681
775
|
function e() {
|
|
682
|
-
|
|
776
|
+
Q.value = !Q.value;
|
|
683
777
|
}
|
|
684
778
|
function t() {
|
|
685
|
-
|
|
779
|
+
Q.value = !1;
|
|
686
780
|
}
|
|
687
781
|
return {
|
|
688
|
-
isOpen:
|
|
782
|
+
isOpen: xe(Q),
|
|
689
783
|
toggle: e,
|
|
690
784
|
close: t
|
|
691
785
|
};
|
|
692
786
|
}
|
|
693
787
|
//#endregion
|
|
694
788
|
//#region src/client/theme-default/components/TdMenuButton.vue
|
|
695
|
-
var
|
|
789
|
+
var ln = /* @__PURE__ */ I({
|
|
696
790
|
__name: "TdMenuButton",
|
|
697
791
|
setup(e) {
|
|
698
|
-
let { isOpen: t, toggle: n } =
|
|
699
|
-
return (e, r) => (
|
|
792
|
+
let { isOpen: t, toggle: n } = cn();
|
|
793
|
+
return (e, r) => (B(), j(X, {
|
|
700
794
|
class: "td-menu-button w-9 h-9 text-td-neutral-fg-muted group",
|
|
701
|
-
label:
|
|
702
|
-
"aria-expanded":
|
|
703
|
-
onClick:
|
|
795
|
+
label: G(t) ? "Close menu" : "Open menu",
|
|
796
|
+
"aria-expanded": G(t),
|
|
797
|
+
onClick: G(n)
|
|
704
798
|
}, {
|
|
705
|
-
default:
|
|
799
|
+
default: J(() => [G(t) ? (B(), j(G(Y), {
|
|
706
800
|
key: 0,
|
|
707
801
|
size: 20,
|
|
708
802
|
class: "group-hover:text-td-primary-solid transition-colors"
|
|
709
|
-
})) : (
|
|
803
|
+
})) : (B(), j(G(Le), {
|
|
710
804
|
key: 1,
|
|
711
805
|
size: 20,
|
|
712
806
|
class: "group-hover:text-td-primary-solid transition-colors"
|
|
@@ -721,10 +815,10 @@ var qt = /* @__PURE__ */ R({
|
|
|
721
815
|
});
|
|
722
816
|
//#endregion
|
|
723
817
|
//#region src/client/theme-default/composables/usePreviousNext.ts
|
|
724
|
-
function
|
|
725
|
-
let e =
|
|
818
|
+
function un() {
|
|
819
|
+
let e = C(), t = O(), { withBase: n } = D(), r = A(() => fn(e.contentTree)), i = A(() => r.value.findIndex((e) => e.url === t.path));
|
|
726
820
|
return {
|
|
727
|
-
previous:
|
|
821
|
+
previous: A(() => {
|
|
728
822
|
if (i.value < 1) return;
|
|
729
823
|
let e = r.value[i.value - 1];
|
|
730
824
|
return {
|
|
@@ -732,7 +826,7 @@ function Jt() {
|
|
|
732
826
|
url: n(e.url)
|
|
733
827
|
};
|
|
734
828
|
}),
|
|
735
|
-
next:
|
|
829
|
+
next: A(() => {
|
|
736
830
|
if (i.value === -1 || r.value.length - 1 <= i.value) return;
|
|
737
831
|
let e = r.value[i.value + 1];
|
|
738
832
|
return {
|
|
@@ -742,69 +836,69 @@ function Jt() {
|
|
|
742
836
|
})
|
|
743
837
|
};
|
|
744
838
|
}
|
|
745
|
-
function
|
|
746
|
-
let
|
|
747
|
-
|
|
748
|
-
url: s(
|
|
749
|
-
title: i(
|
|
839
|
+
function dn(e, t, n) {
|
|
840
|
+
let r = e.items.find((e) => f(e.filepath) === a), o = u(n, e.name);
|
|
841
|
+
r ? t.push($(r)) : t.push({
|
|
842
|
+
url: s(o),
|
|
843
|
+
title: i(e.name)
|
|
750
844
|
});
|
|
751
|
-
for (let n of
|
|
752
|
-
for (let
|
|
845
|
+
for (let n of e.items) f(n.filepath) !== "index" && t.push($(n));
|
|
846
|
+
for (let n of e.children) dn(n, t, o);
|
|
753
847
|
}
|
|
754
|
-
function
|
|
848
|
+
function fn(e) {
|
|
755
849
|
let t = [];
|
|
756
|
-
for (let n of e.rootItems) t.push(
|
|
757
|
-
for (let n of e.children)
|
|
850
|
+
for (let n of e.rootItems) t.push($(n));
|
|
851
|
+
for (let n of e.children) dn(n, t, "");
|
|
758
852
|
return t;
|
|
759
853
|
}
|
|
760
|
-
function
|
|
854
|
+
function $(e) {
|
|
761
855
|
return {
|
|
762
|
-
url:
|
|
763
|
-
title:
|
|
856
|
+
url: x(e.filepath),
|
|
857
|
+
title: m(e.header, e.filepath)
|
|
764
858
|
};
|
|
765
859
|
}
|
|
766
860
|
//#endregion
|
|
767
861
|
//#region src/client/theme-default/components/TdPreviousNext.vue?vue&type=script&setup=true&lang.ts
|
|
768
|
-
var
|
|
862
|
+
var pn = {
|
|
769
863
|
key: 0,
|
|
770
864
|
class: "td-previous-next",
|
|
771
865
|
"aria-label": "Page navigation"
|
|
772
|
-
},
|
|
866
|
+
}, mn = ["href"], hn = { class: "td-previous-next-content" }, gn = { class: "td-previous-next-title" }, _n = {
|
|
773
867
|
key: 1,
|
|
774
868
|
class: "td-previous-next-spacer"
|
|
775
|
-
},
|
|
869
|
+
}, vn = ["href"], yn = { class: "td-previous-next-content" }, bn = { class: "td-previous-next-title" }, xn = {
|
|
776
870
|
key: 3,
|
|
777
871
|
class: "td-previous-next-spacer"
|
|
778
|
-
},
|
|
872
|
+
}, Sn = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
779
873
|
__name: "TdPreviousNext",
|
|
780
874
|
setup(e) {
|
|
781
|
-
let { previous: t, next: n } =
|
|
782
|
-
return (e, r) =>
|
|
875
|
+
let { previous: t, next: n } = un();
|
|
876
|
+
return (e, r) => G(t) || G(n) ? (B(), N("nav", pn, [G(t) ? (B(), N("a", {
|
|
783
877
|
key: 0,
|
|
784
|
-
href:
|
|
878
|
+
href: G(t).url,
|
|
785
879
|
class: "td-previous-next-link is-previous"
|
|
786
|
-
}, [
|
|
880
|
+
}, [F(G(je), {
|
|
787
881
|
size: 16,
|
|
788
882
|
class: "td-previous-next-icon"
|
|
789
|
-
}),
|
|
883
|
+
}), P("span", hn, [r[0] ||= P("span", { class: "td-previous-next-label" }, "Previous", -1), P("span", gn, W(G(t).title), 1)])], 8, mn)) : (B(), N("span", _n)), G(n) ? (B(), N("a", {
|
|
790
884
|
key: 2,
|
|
791
|
-
href:
|
|
885
|
+
href: G(n).url,
|
|
792
886
|
class: "td-previous-next-link is-next"
|
|
793
|
-
}, [
|
|
887
|
+
}, [P("span", yn, [r[1] ||= P("span", { class: "td-previous-next-label" }, "Next", -1), P("span", bn, W(G(n).title), 1)]), F(G(Ae), {
|
|
794
888
|
size: 16,
|
|
795
889
|
class: "td-previous-next-icon"
|
|
796
|
-
})], 8,
|
|
890
|
+
})], 8, vn)) : (B(), N("span", xn))])) : M("", !0);
|
|
797
891
|
}
|
|
798
|
-
}), [["__scopeId", "data-v-4439d186"]]),
|
|
892
|
+
}), [["__scopeId", "data-v-4439d186"]]), Cn = { class: "td-search" }, wn = { class: "td-search-input-wrap" }, Tn = {
|
|
799
893
|
key: 1,
|
|
800
894
|
class: "td-search-count"
|
|
801
|
-
},
|
|
895
|
+
}, En = {
|
|
802
896
|
key: 0,
|
|
803
897
|
class: "td-search-results"
|
|
804
|
-
},
|
|
898
|
+
}, Dn = { class: "td-search-group-label" }, On = ["href"], kn = ["innerHTML"], An = ["innerHTML"], jn = {
|
|
805
899
|
key: 1,
|
|
806
900
|
class: "td-search-empty"
|
|
807
|
-
},
|
|
901
|
+
}, Mn = 120, Nn = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
808
902
|
__name: "TdSearch",
|
|
809
903
|
props: {
|
|
810
904
|
active: {
|
|
@@ -815,11 +909,11 @@ var Qt = {
|
|
|
815
909
|
query: { default: "" },
|
|
816
910
|
queryModifiers: {}
|
|
817
911
|
},
|
|
818
|
-
emits: /*@__PURE__*/
|
|
819
|
-
setup(
|
|
820
|
-
let
|
|
912
|
+
emits: /*@__PURE__*/ ge(["select"], ["update:active", "update:query"]),
|
|
913
|
+
setup(t, { emit: n }) {
|
|
914
|
+
let r = K(t, "active"), a = K(t, "query"), s = n, c = Ce([]), u = V(!1), d = V(-1), f = A(() => 0 < a.value.trim().length), p = A(() => {
|
|
821
915
|
let e = [], t = /* @__PURE__ */ new Map();
|
|
822
|
-
for (let n of
|
|
916
|
+
for (let n of c.value) {
|
|
823
917
|
let r = o(n.id), a = t.get(r);
|
|
824
918
|
a || (a = {
|
|
825
919
|
pageUrl: r,
|
|
@@ -829,101 +923,101 @@ var Qt = {
|
|
|
829
923
|
}
|
|
830
924
|
return e;
|
|
831
925
|
});
|
|
832
|
-
|
|
833
|
-
|
|
926
|
+
q(f, (e) => {
|
|
927
|
+
r.value = e;
|
|
834
928
|
});
|
|
835
|
-
let
|
|
836
|
-
|
|
837
|
-
|
|
929
|
+
let m = se(), h = ie(), _;
|
|
930
|
+
q(m, () => {
|
|
931
|
+
_ = void 0;
|
|
838
932
|
});
|
|
839
|
-
function
|
|
840
|
-
if (
|
|
841
|
-
if (
|
|
842
|
-
fields:
|
|
843
|
-
storeFields:
|
|
844
|
-
})),
|
|
933
|
+
function b() {
|
|
934
|
+
if (_) return _;
|
|
935
|
+
if (m.value) return _ = he(te.loadJSON(m.value, {
|
|
936
|
+
fields: ee,
|
|
937
|
+
storeFields: e
|
|
938
|
+
})), _;
|
|
845
939
|
}
|
|
846
|
-
let
|
|
847
|
-
|
|
940
|
+
let x = !1, S = y((e) => oe(e), 150);
|
|
941
|
+
q(a, (e, t, n) => {
|
|
848
942
|
n(() => {
|
|
849
|
-
|
|
850
|
-
}),
|
|
943
|
+
x = !0;
|
|
944
|
+
}), x = !1;
|
|
851
945
|
let r = e.trim();
|
|
852
946
|
if (!r) {
|
|
853
|
-
|
|
947
|
+
c.value = [], u.value = !1;
|
|
854
948
|
return;
|
|
855
949
|
}
|
|
856
|
-
|
|
950
|
+
u.value = !0, d.value = -1, S(r);
|
|
857
951
|
});
|
|
858
|
-
function
|
|
859
|
-
|
|
952
|
+
function C() {
|
|
953
|
+
a.value = "";
|
|
860
954
|
}
|
|
861
|
-
function
|
|
862
|
-
let n = RegExp(`id="${
|
|
955
|
+
function w(e, t) {
|
|
956
|
+
let n = RegExp(`id="${g(t)}"[^>]*>`, "i").exec(e);
|
|
863
957
|
if (!n) return l(e);
|
|
864
958
|
let r = e.slice(n.index + n[0].length), i = r.search(/<h[1-6]/i);
|
|
865
959
|
return l(0 <= i ? r.slice(0, i) : r);
|
|
866
960
|
}
|
|
867
|
-
function
|
|
961
|
+
function ne(e, t) {
|
|
868
962
|
if (!e) return "";
|
|
869
963
|
let n = Object.keys(t);
|
|
870
|
-
if (n.length === 0) return e.slice(0,
|
|
964
|
+
if (n.length === 0) return e.slice(0, Mn);
|
|
871
965
|
let r = e.toLowerCase(), i = e.length;
|
|
872
966
|
for (let e of n) {
|
|
873
967
|
let t = r.indexOf(e.toLowerCase());
|
|
874
968
|
t !== -1 && t < i && (i = t);
|
|
875
969
|
}
|
|
876
|
-
let a = Math.max(0, i - 30), o = Math.min(e.length, a +
|
|
970
|
+
let a = Math.max(0, i - 30), o = Math.min(e.length, a + Mn), s = e.slice(a, o).trim();
|
|
877
971
|
return 0 < a && (s = "..." + s), o < e.length && (s += "..."), s;
|
|
878
972
|
}
|
|
879
|
-
async function
|
|
973
|
+
async function T(e, t, n) {
|
|
880
974
|
let r = o(t), i = t.indexOf("#"), a = 0 <= i ? t.slice(i + 1) : "";
|
|
881
975
|
try {
|
|
882
976
|
let t = (await e(r))?.default, i = (typeof t?.data == "function" ? t.data() : {}).__html ?? "";
|
|
883
|
-
return
|
|
977
|
+
return ne(a ? w(i, a) : l(i), n);
|
|
884
978
|
} catch {
|
|
885
979
|
return "";
|
|
886
980
|
}
|
|
887
981
|
}
|
|
888
|
-
let
|
|
982
|
+
let E = A(() => p.value.flatMap((e) => e.results)), D = A(() => {
|
|
889
983
|
let e = /* @__PURE__ */ new Map();
|
|
890
|
-
for (let t = 0; t <
|
|
984
|
+
for (let t = 0; t < E.value.length; t++) e.set(E.value[t].id, t);
|
|
891
985
|
return e;
|
|
892
986
|
});
|
|
893
|
-
function
|
|
894
|
-
if (!e || !t) return
|
|
895
|
-
let n = t.trim().split(/\s+/).filter(Boolean), r =
|
|
987
|
+
function O(e, t) {
|
|
988
|
+
if (!e || !t) return v(e);
|
|
989
|
+
let n = t.trim().split(/\s+/).filter(Boolean), r = v(e);
|
|
896
990
|
for (let e of n) {
|
|
897
|
-
let t = RegExp(`(${
|
|
991
|
+
let t = RegExp(`(${g(e)})`, "gi");
|
|
898
992
|
r = r.replace(t, "<mark>$1</mark>");
|
|
899
993
|
}
|
|
900
994
|
return r;
|
|
901
995
|
}
|
|
902
|
-
function
|
|
903
|
-
let t =
|
|
996
|
+
function re(e) {
|
|
997
|
+
let t = D.value.size;
|
|
904
998
|
if (t !== 0) {
|
|
905
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
906
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
907
|
-
else if (e.key === "Enter" && 0 <=
|
|
999
|
+
if (e.key === "ArrowDown") e.preventDefault(), d.value = (d.value + 1) % t;
|
|
1000
|
+
else if (e.key === "ArrowUp") e.preventDefault(), d.value = (d.value - 1 + t) % t;
|
|
1001
|
+
else if (e.key === "Enter" && 0 <= d.value) {
|
|
908
1002
|
e.preventDefault();
|
|
909
|
-
let t =
|
|
1003
|
+
let t = E.value[d.value];
|
|
910
1004
|
if (!t) return;
|
|
911
1005
|
document.querySelector(`.td-search-result[href="${CSS.escape(t.id)}"]`)?.click();
|
|
912
1006
|
}
|
|
913
1007
|
}
|
|
914
1008
|
}
|
|
915
|
-
function
|
|
916
|
-
|
|
1009
|
+
function ae() {
|
|
1010
|
+
s("select");
|
|
917
1011
|
}
|
|
918
|
-
async function
|
|
919
|
-
let t =
|
|
1012
|
+
async function oe(e) {
|
|
1013
|
+
let t = b();
|
|
920
1014
|
if (t) try {
|
|
921
1015
|
let n = t.search(e, {
|
|
922
1016
|
prefix: !0,
|
|
923
1017
|
fuzzy: .2,
|
|
924
1018
|
boost: { title: 2 }
|
|
925
1019
|
}), r = await Promise.all(n.slice(0, 20).map(async (e) => {
|
|
926
|
-
let t =
|
|
1020
|
+
let t = h ? await T(h, e.id, e.match) : "";
|
|
927
1021
|
return {
|
|
928
1022
|
id: e.id,
|
|
929
1023
|
title: e.title,
|
|
@@ -932,72 +1026,72 @@ var Qt = {
|
|
|
932
1026
|
score: e.score
|
|
933
1027
|
};
|
|
934
1028
|
}));
|
|
935
|
-
if (
|
|
936
|
-
|
|
1029
|
+
if (x) return;
|
|
1030
|
+
c.value = r;
|
|
937
1031
|
} finally {
|
|
938
|
-
|
|
1032
|
+
x || (u.value = !1);
|
|
939
1033
|
}
|
|
940
1034
|
}
|
|
941
|
-
return (e, t) => (
|
|
942
|
-
|
|
943
|
-
|
|
1035
|
+
return (e, t) => (B(), N("div", Cn, [
|
|
1036
|
+
P("div", wn, [
|
|
1037
|
+
F(G(ze), {
|
|
944
1038
|
size: 14,
|
|
945
1039
|
class: "td-search-icon"
|
|
946
1040
|
}),
|
|
947
|
-
|
|
948
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
1041
|
+
De(P("input", {
|
|
1042
|
+
"onUpdate:modelValue": t[0] ||= (e) => a.value = e,
|
|
949
1043
|
class: "td-search-input",
|
|
950
1044
|
type: "text",
|
|
951
1045
|
size: "1",
|
|
952
1046
|
placeholder: "Search...",
|
|
953
|
-
onKeydown:
|
|
954
|
-
}, null, 544), [[
|
|
955
|
-
|
|
1047
|
+
onKeydown: re
|
|
1048
|
+
}, null, 544), [[Te, a.value]]),
|
|
1049
|
+
u.value ? (B(), j(G(Ie), {
|
|
956
1050
|
key: 0,
|
|
957
1051
|
size: 12,
|
|
958
1052
|
class: "td-search-spinner"
|
|
959
|
-
})) :
|
|
960
|
-
|
|
1053
|
+
})) : f.value ? (B(), N("span", Tn, W(c.value.length), 1)) : M("", !0),
|
|
1054
|
+
a.value ? (B(), N("button", {
|
|
961
1055
|
key: 2,
|
|
962
1056
|
class: "td-search-clear",
|
|
963
1057
|
type: "button",
|
|
964
1058
|
"aria-label": "Clear search",
|
|
965
|
-
onClick:
|
|
966
|
-
}, [
|
|
1059
|
+
onClick: C
|
|
1060
|
+
}, [F(G(Y), { size: 12 })])) : M("", !0)
|
|
967
1061
|
]),
|
|
968
|
-
|
|
1062
|
+
f.value && c.value.length > 0 ? (B(), N("div", En, [(B(!0), N(k, null, H(p.value, (e) => (B(), N("div", {
|
|
969
1063
|
key: e.pageUrl,
|
|
970
1064
|
class: "td-search-group"
|
|
971
|
-
}, [
|
|
1065
|
+
}, [P("div", Dn, W(e.pageTitle), 1), (B(!0), N(k, null, H(e.results, (e) => (B(), N("a", {
|
|
972
1066
|
key: e.id,
|
|
973
1067
|
href: e.id,
|
|
974
|
-
class:
|
|
975
|
-
onClick:
|
|
976
|
-
}, [
|
|
1068
|
+
class: L(["td-search-result", { "is-selected": D.value.get(e.id) === d.value }]),
|
|
1069
|
+
onClick: ae
|
|
1070
|
+
}, [P("span", {
|
|
977
1071
|
class: "td-search-result-title",
|
|
978
|
-
innerHTML:
|
|
979
|
-
}, null, 8,
|
|
1072
|
+
innerHTML: O(e.title, a.value)
|
|
1073
|
+
}, null, 8, kn), e.excerpt ? (B(), N("span", {
|
|
980
1074
|
key: 0,
|
|
981
1075
|
class: "td-search-result-excerpt",
|
|
982
|
-
innerHTML:
|
|
983
|
-
}, null, 8,
|
|
984
|
-
|
|
1076
|
+
innerHTML: O(e.excerpt, a.value)
|
|
1077
|
+
}, null, 8, An)) : M("", !0)], 10, On))), 128))]))), 128))])) : M("", !0),
|
|
1078
|
+
f.value && c.value.length === 0 ? (B(), N("div", jn, " No results for \"" + W(a.value) + "\" ", 1)) : M("", !0)
|
|
985
1079
|
]));
|
|
986
1080
|
}
|
|
987
|
-
}), [["__scopeId", "data-v-dc5caa87"]]),
|
|
1081
|
+
}), [["__scopeId", "data-v-dc5caa87"]]), Pn = /* @__PURE__ */ I({
|
|
988
1082
|
__name: "TdThemeToggle",
|
|
989
1083
|
setup(e) {
|
|
990
|
-
let { isDark: t, toggle: n } =
|
|
991
|
-
return (e, r) => (
|
|
1084
|
+
let { isDark: t, toggle: n } = ce();
|
|
1085
|
+
return (e, r) => (B(), j(X, {
|
|
992
1086
|
class: "w-9 h-9 text-td-neutral-fg-muted group hover:opacity-70",
|
|
993
|
-
label:
|
|
994
|
-
onClick:
|
|
1087
|
+
label: G(t) ? "Switch to light mode" : "Switch to dark mode",
|
|
1088
|
+
onClick: G(n)
|
|
995
1089
|
}, {
|
|
996
|
-
default:
|
|
1090
|
+
default: J(() => [G(t) ? (B(), j(G(He), {
|
|
997
1091
|
key: 0,
|
|
998
1092
|
size: 18,
|
|
999
1093
|
class: "group-hover:text-td-primary-solid transition-colors"
|
|
1000
|
-
})) : (
|
|
1094
|
+
})) : (B(), j(G(Re), {
|
|
1001
1095
|
key: 1,
|
|
1002
1096
|
size: 18,
|
|
1003
1097
|
class: "group-hover:text-td-primary-solid transition-colors"
|
|
@@ -1008,7 +1102,7 @@ var Qt = {
|
|
|
1008
1102
|
});
|
|
1009
1103
|
//#endregion
|
|
1010
1104
|
//#region src/client/theme-default/composables/useCopyCode.ts
|
|
1011
|
-
function
|
|
1105
|
+
function Fn() {
|
|
1012
1106
|
function e(e) {
|
|
1013
1107
|
let t = e.target?.closest(".copy");
|
|
1014
1108
|
if (!t) return;
|
|
@@ -1020,19 +1114,19 @@ function xn() {
|
|
|
1020
1114
|
t.classList.remove("copied"), t.setAttribute("title", i);
|
|
1021
1115
|
}, 2e3);
|
|
1022
1116
|
}
|
|
1023
|
-
|
|
1117
|
+
be(() => {
|
|
1024
1118
|
document.addEventListener("click", e);
|
|
1025
|
-
}),
|
|
1119
|
+
}), z(() => {
|
|
1026
1120
|
document.removeEventListener("click", e);
|
|
1027
1121
|
});
|
|
1028
1122
|
}
|
|
1029
1123
|
//#endregion
|
|
1030
1124
|
//#region src/client/theme-default/composables/useResizableTable.ts
|
|
1031
|
-
var
|
|
1032
|
-
function
|
|
1125
|
+
var In = 6, Ln = 40;
|
|
1126
|
+
function Rn() {
|
|
1033
1127
|
let e, t = !1;
|
|
1034
1128
|
function n(e, t) {
|
|
1035
|
-
return e.getBoundingClientRect().right - t <
|
|
1129
|
+
return e.getBoundingClientRect().right - t < In;
|
|
1036
1130
|
}
|
|
1037
1131
|
function r(r) {
|
|
1038
1132
|
if (t) return;
|
|
@@ -1052,23 +1146,23 @@ function wn() {
|
|
|
1052
1146
|
r.classList.add("is-resizing"), document.body.style.cursor = "col-resize";
|
|
1053
1147
|
function o(e) {
|
|
1054
1148
|
let t = e.clientX - i;
|
|
1055
|
-
r && (r.style.width = `${Math.max(
|
|
1149
|
+
r && (r.style.width = `${Math.max(Ln, a + t)}px`);
|
|
1056
1150
|
}
|
|
1057
1151
|
function s() {
|
|
1058
1152
|
t = !1, r?.classList.remove("is-resizing"), document.body.style.cursor = "", document.removeEventListener("pointermove", o), document.removeEventListener("pointerup", s);
|
|
1059
1153
|
}
|
|
1060
1154
|
document.addEventListener("pointermove", o), document.addEventListener("pointerup", s);
|
|
1061
1155
|
}
|
|
1062
|
-
|
|
1156
|
+
be(() => {
|
|
1063
1157
|
document.addEventListener("pointermove", r), document.addEventListener("pointerdown", i);
|
|
1064
|
-
}),
|
|
1158
|
+
}), z(() => {
|
|
1065
1159
|
document.removeEventListener("pointermove", r), document.removeEventListener("pointerdown", i);
|
|
1066
1160
|
});
|
|
1067
1161
|
}
|
|
1068
1162
|
//#endregion
|
|
1069
1163
|
//#region src/client/theme-default/composables/useActiveTocHeading.ts
|
|
1070
|
-
function
|
|
1071
|
-
let t =
|
|
1164
|
+
function zn(e) {
|
|
1165
|
+
let t = V(""), n;
|
|
1072
1166
|
function r() {
|
|
1073
1167
|
if (typeof document > "u") return;
|
|
1074
1168
|
n?.disconnect(), t.value = "";
|
|
@@ -1091,151 +1185,151 @@ function Tn(e) {
|
|
|
1091
1185
|
for (let t of e) n.observe(t);
|
|
1092
1186
|
}
|
|
1093
1187
|
}
|
|
1094
|
-
return
|
|
1095
|
-
typeof window > "u" ||
|
|
1096
|
-
}, { immediate: !0 }),
|
|
1188
|
+
return q(e, () => {
|
|
1189
|
+
typeof window > "u" || ve(r);
|
|
1190
|
+
}, { immediate: !0 }), z(() => {
|
|
1097
1191
|
n?.disconnect();
|
|
1098
1192
|
}), t;
|
|
1099
1193
|
}
|
|
1100
1194
|
//#endregion
|
|
1101
1195
|
//#region src/client/theme-default/components/TdToc.vue?vue&type=script&setup=true&lang.ts
|
|
1102
|
-
var
|
|
1196
|
+
var Bn = {
|
|
1103
1197
|
key: 0,
|
|
1104
1198
|
class: "td-toc"
|
|
1105
|
-
},
|
|
1199
|
+
}, Vn = { class: "td-toc-list" }, Hn = ["href"], Un = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
1106
1200
|
__name: "TdToc",
|
|
1107
1201
|
props: { headings: {} },
|
|
1108
1202
|
setup(e) {
|
|
1109
|
-
let t =
|
|
1110
|
-
return (n, r) => e.headings.length ? (
|
|
1203
|
+
let t = zn(() => e.headings);
|
|
1204
|
+
return (n, r) => e.headings.length ? (B(), N("div", Bn, [r[0] ||= P("div", { class: "td-toc-label" }, " On this page ", -1), P("ul", Vn, [(B(!0), N(k, null, H(e.headings, (e) => (B(), N("li", {
|
|
1111
1205
|
key: e.slug,
|
|
1112
|
-
class:
|
|
1206
|
+
class: L({
|
|
1113
1207
|
"td-toc-indent-1": e.level === 3,
|
|
1114
1208
|
"td-toc-indent-2": e.level === 4,
|
|
1115
1209
|
"td-toc-indent-3": e.level === 5
|
|
1116
1210
|
})
|
|
1117
|
-
}, [
|
|
1211
|
+
}, [P("a", {
|
|
1118
1212
|
href: e.link,
|
|
1119
|
-
class:
|
|
1120
|
-
},
|
|
1213
|
+
class: L(["td-toc-link", { "is-active": G(t) === e.slug }])
|
|
1214
|
+
}, W(e.title), 11, Hn)], 2))), 128))])])) : M("", !0);
|
|
1121
1215
|
}
|
|
1122
|
-
}), [["__scopeId", "data-v-84e4402d"]]),
|
|
1216
|
+
}), [["__scopeId", "data-v-84e4402d"]]), Wn = { class: "td-header" }, Gn = { class: "td-header-left" }, Kn = ["href"], qn = { class: "td-brand-name" }, Jn = { class: "td-header-right" }, Yn = { class: "td-menu-header" }, Xn = { class: "td-header-left" }, Zn = ["href"], Qn = { class: "td-brand-name" }, $n = {
|
|
1123
1217
|
key: 0,
|
|
1124
1218
|
class: "pt-4",
|
|
1125
1219
|
"aria-label": "Site navigation"
|
|
1126
|
-
},
|
|
1220
|
+
}, er = { class: "td-page" }, tr = { class: "td-main-and-toc" }, nr = { class: "td-main" }, rr = { class: "td-content" }, ir = ["innerHTML"], ar = {
|
|
1127
1221
|
key: 1,
|
|
1128
1222
|
class: "td-page-meta"
|
|
1129
|
-
},
|
|
1223
|
+
}, or = { key: 0 }, sr = {
|
|
1130
1224
|
class: "td-sidebar-right",
|
|
1131
1225
|
"aria-label": "Table of contents"
|
|
1132
|
-
},
|
|
1226
|
+
}, cr = 200, lr = 500, ur = 272, dr = "td-sidebar-width", fr = /*#__PURE__*/ T(/* @__PURE__ */ I({
|
|
1133
1227
|
__name: "TdLayout",
|
|
1134
1228
|
setup(e) {
|
|
1135
|
-
let { title: t, page: n } =
|
|
1136
|
-
|
|
1229
|
+
let { title: t, page: n } = ae(), r = D(), { withBase: i } = r, a = C(), { isOpen: o, close: c } = cn(), l = V(""), u = V(!1), d = V(!1), f = O();
|
|
1230
|
+
q(() => f.path, () => c()), Fn(), Ee(() => {
|
|
1137
1231
|
if (typeof document > "u") return;
|
|
1138
1232
|
let e = t.value, i = r.title;
|
|
1139
1233
|
document.title = e && e !== i ? `${e} - ${i}` : i;
|
|
1140
1234
|
let a = n.frontmatter?.description === void 0 ? r.description ?? "" : String(n.frontmatter.description), o = document.querySelector("meta[name=\"description\"]");
|
|
1141
1235
|
o && o.setAttribute("content", a);
|
|
1142
|
-
}),
|
|
1143
|
-
let p =
|
|
1236
|
+
}), Rn();
|
|
1237
|
+
let p = V(typeof localStorage < "u" && Number(localStorage.getItem(dr)) || ur);
|
|
1144
1238
|
function m(e) {
|
|
1145
1239
|
let t = e.clientX, n = p.value, r = e.currentTarget;
|
|
1146
1240
|
r.setPointerCapture(e.pointerId);
|
|
1147
1241
|
function i(e) {
|
|
1148
|
-
let r = Math.min(
|
|
1242
|
+
let r = Math.min(lr, Math.max(cr, n + e.clientX - t));
|
|
1149
1243
|
p.value = r;
|
|
1150
1244
|
}
|
|
1151
1245
|
function a() {
|
|
1152
|
-
document.body.style.cursor = "", r.removeEventListener("pointermove", i), r.removeEventListener("pointerup", a), localStorage.setItem(
|
|
1246
|
+
document.body.style.cursor = "", r.removeEventListener("pointermove", i), r.removeEventListener("pointerup", a), localStorage.setItem(dr, String(p.value));
|
|
1153
1247
|
}
|
|
1154
1248
|
document.body.style.cursor = "col-resize", r.addEventListener("pointermove", i), r.addEventListener("pointerup", a);
|
|
1155
1249
|
}
|
|
1156
|
-
return (e, f) => (
|
|
1157
|
-
|
|
1158
|
-
href:
|
|
1250
|
+
return (e, f) => (B(), N("div", null, [
|
|
1251
|
+
P("header", Wn, [P("div", Gn, [F(ln), P("a", {
|
|
1252
|
+
href: G(i)(G(s)("/")),
|
|
1159
1253
|
class: "td-brand"
|
|
1160
|
-
}, [
|
|
1161
|
-
|
|
1162
|
-
|
|
1254
|
+
}, [F(qe), P("span", qn, W(G(r).title || "Typedown"), 1)], 8, Kn)]), P("div", Jn, [F(Pn)])]),
|
|
1255
|
+
P("div", { class: L(["td-menu-overlay", { "is-open": G(o) }]) }, [
|
|
1256
|
+
P("header", Yn, [P("div", Xn, [F(X, {
|
|
1163
1257
|
class: "w-9 h-9 text-td-neutral-fg-muted hover:text-td-primary-solid",
|
|
1164
1258
|
label: "Close menu",
|
|
1165
|
-
onClick:
|
|
1259
|
+
onClick: G(c)
|
|
1166
1260
|
}, {
|
|
1167
|
-
default:
|
|
1261
|
+
default: J(() => [F(G(Y), { size: 20 })]),
|
|
1168
1262
|
_: 1
|
|
1169
|
-
}, 8, ["onClick"]),
|
|
1170
|
-
href:
|
|
1263
|
+
}, 8, ["onClick"]), P("a", {
|
|
1264
|
+
href: G(i)(G(s)("/")),
|
|
1171
1265
|
class: "td-brand"
|
|
1172
|
-
}, [
|
|
1173
|
-
|
|
1266
|
+
}, [F(qe), P("span", Qn, W(G(r).title || "Typedown"), 1)], 8, Zn)])]),
|
|
1267
|
+
F(Nn, {
|
|
1174
1268
|
query: l.value,
|
|
1175
1269
|
"onUpdate:query": f[0] ||= (e) => l.value = e,
|
|
1176
1270
|
active: d.value,
|
|
1177
1271
|
"onUpdate:active": f[1] ||= (e) => d.value = e,
|
|
1178
|
-
onSelect:
|
|
1272
|
+
onSelect: G(c)
|
|
1179
1273
|
}, null, 8, [
|
|
1180
1274
|
"query",
|
|
1181
1275
|
"active",
|
|
1182
1276
|
"onSelect"
|
|
1183
1277
|
]),
|
|
1184
|
-
d.value ?
|
|
1278
|
+
d.value ? M("", !0) : (B(), N("nav", $n, [F(ht, { tree: G(a).contentTree }, null, 8, ["tree"])]))
|
|
1185
1279
|
], 2),
|
|
1186
|
-
|
|
1280
|
+
P("div", er, [P("nav", {
|
|
1187
1281
|
class: "td-sidebar-left",
|
|
1188
1282
|
"aria-label": "Site navigation",
|
|
1189
|
-
style:
|
|
1283
|
+
style: R({ width: `${p.value}px` })
|
|
1190
1284
|
}, [
|
|
1191
|
-
|
|
1285
|
+
F(Nn, {
|
|
1192
1286
|
query: l.value,
|
|
1193
1287
|
"onUpdate:query": f[2] ||= (e) => l.value = e,
|
|
1194
1288
|
active: u.value,
|
|
1195
1289
|
"onUpdate:active": f[3] ||= (e) => u.value = e
|
|
1196
1290
|
}, null, 8, ["query", "active"]),
|
|
1197
|
-
u.value ?
|
|
1291
|
+
u.value ? M("", !0) : (B(), j(ht, {
|
|
1198
1292
|
key: 0,
|
|
1199
|
-
tree:
|
|
1293
|
+
tree: G(a).contentTree
|
|
1200
1294
|
}, null, 8, ["tree"])),
|
|
1201
|
-
|
|
1295
|
+
P("div", {
|
|
1202
1296
|
class: "td-sidebar-resize",
|
|
1203
|
-
onPointerdown:
|
|
1297
|
+
onPointerdown: Oe(m, ["prevent"])
|
|
1204
1298
|
}, null, 32)
|
|
1205
|
-
], 4),
|
|
1206
|
-
|
|
1207
|
-
|
|
1299
|
+
], 4), P("div", tr, [P("main", nr, [P("article", rr, [
|
|
1300
|
+
F(Dt),
|
|
1301
|
+
G(t) ? (B(), N("h1", {
|
|
1208
1302
|
key: 0,
|
|
1209
1303
|
class: "td-page-title",
|
|
1210
|
-
innerHTML:
|
|
1211
|
-
}, null, 8,
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
schema:
|
|
1215
|
-
frontmatter:
|
|
1304
|
+
innerHTML: G(Xe)(G(t))
|
|
1305
|
+
}, null, 8, ir)) : M("", !0),
|
|
1306
|
+
G(n).metadata ? (B(), N("div", ar, [P("span", null, W(G(_)(G(n).metadata.mtime, "Modified")), 1), G(n).metadata.ctime === G(n).metadata.mtime ? M("", !0) : (B(), N("span", or, " · " + W(G(_)(G(n).metadata.ctime, "Created")), 1))])) : M("", !0),
|
|
1307
|
+
F(G(sn), {
|
|
1308
|
+
schema: G(n).schema,
|
|
1309
|
+
frontmatter: G(n).frontmatter
|
|
1216
1310
|
}, null, 8, ["schema", "frontmatter"]),
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
])]),
|
|
1311
|
+
F(G(w)),
|
|
1312
|
+
F(Sn)
|
|
1313
|
+
])]), P("nav", sr, [F(Un, { headings: G(n).headings }, null, 8, ["headings"])])])])
|
|
1220
1314
|
]));
|
|
1221
1315
|
}
|
|
1222
|
-
}), [["__scopeId", "data-v-93a3d24b"]]),
|
|
1316
|
+
}), [["__scopeId", "data-v-93a3d24b"]]), pr = { class: "pt-16 pb-24" }, mr = ["href"], hr = /* @__PURE__ */ I({
|
|
1223
1317
|
__name: "TdNotFound",
|
|
1224
1318
|
setup(e) {
|
|
1225
1319
|
let { withBase: t } = D();
|
|
1226
|
-
return (e, n) => (
|
|
1227
|
-
n[0] ||=
|
|
1228
|
-
n[1] ||=
|
|
1229
|
-
n[2] ||=
|
|
1230
|
-
|
|
1320
|
+
return (e, n) => (B(), N("div", pr, [
|
|
1321
|
+
n[0] ||= P("p", { class: "text-td-display font-td-heading leading-none tracking-td-title text-td-fg-muted" }, " 404 ", -1),
|
|
1322
|
+
n[1] ||= P("h1", { class: "text-td-h2 font-td-heading leading-td-heading tracking-td-heading mt-4" }, " Page Not Found ", -1),
|
|
1323
|
+
n[2] ||= P("p", { class: "text-td-fg-muted mt-2 text-td-body leading-td-body" }, " The page you are looking for does not exist. ", -1),
|
|
1324
|
+
P("a", {
|
|
1231
1325
|
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",
|
|
1232
|
-
href:
|
|
1233
|
-
}, "Go Home", 8,
|
|
1326
|
+
href: G(t)(G(s)("/"))
|
|
1327
|
+
}, "Go Home", 8, mr)
|
|
1234
1328
|
]));
|
|
1235
1329
|
}
|
|
1236
|
-
}),
|
|
1237
|
-
Layout:
|
|
1238
|
-
NotFound:
|
|
1330
|
+
}), gr = {
|
|
1331
|
+
Layout: fr,
|
|
1332
|
+
NotFound: hr
|
|
1239
1333
|
};
|
|
1240
1334
|
//#endregion
|
|
1241
|
-
export {
|
|
1335
|
+
export { ne as TdDirectoryIndex, fr as TdLayout, hr as TdNotFound, gr as default, Fn as useCopyCode };
|