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