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