typerighter 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of typerighter might be problematic. Click here for more details.
- package/dist/{app-C35j_dTB.js → app-5DaKZ6wW.js} +1 -1
- package/dist/{cli-Be6WWIHS.js → cli-Be6DoesE.js} +12 -12
- package/dist/cli.js +1 -1
- package/dist/client/theme-default.js +371 -371
- package/dist/client.js +1 -1
- package/dist/index.js +2 -2
- package/dist/{init-Cr4wOumz.js → init-JN1W4s3d.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 ye, onUnmounted as B, openBlock as V, readonly as be, ref as H, renderList as U, renderSlot as W, resolveComponent as xe, shallowRef as Se, toDisplayString as G, unref as K, useModel as q, useTemplateRef as Ce, vModelText as we, watch as J, watchEffect as Te, withCtx as Y, withDirectives as Ee, withModifiers as De } from "vue";
|
|
6
|
+
var Oe = E("chevron-down", [["path", {
|
|
7
7
|
d: "m6 9 6 6 6-6",
|
|
8
8
|
key: "qrunsl"
|
|
9
|
-
}]]),
|
|
9
|
+
}]]), ke = E("chevron-right", [["path", {
|
|
10
10
|
d: "m9 18 6-6-6-6",
|
|
11
11
|
key: "mthhwq"
|
|
12
|
-
}]]),
|
|
12
|
+
}]]), Ae = E("chevron-left", [["path", {
|
|
13
13
|
d: "m15 18-6-6 6-6",
|
|
14
14
|
key: "1wnfg3"
|
|
15
|
-
}]]),
|
|
15
|
+
}]]), je = 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
|
+
]), Me = 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
|
+
]), Ne = 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
|
+
}]]), Pe = 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
|
+
}]]), Fe = E("loader-circle", [["path", {
|
|
65
65
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
66
66
|
key: "13zald"
|
|
67
|
-
}]]),
|
|
67
|
+
}]]), Ie = 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
|
+
]), Le = 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
|
+
}]]), Re = 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
|
+
}]]), ze = 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
|
+
}]]), Be = 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
|
+
}]]), Ve = 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
|
+
]), X = 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
|
+
}]]), He = [
|
|
150
150
|
"height",
|
|
151
151
|
"width",
|
|
152
152
|
"viewBox"
|
|
153
|
-
],
|
|
153
|
+
], Ue = ["d"], We = ["d"], Ge = ["d"], Ke = /* @__PURE__ */ L({
|
|
154
154
|
__name: "TdBrandIcon",
|
|
155
155
|
props: { size: { default: 28 } },
|
|
156
156
|
setup(e) {
|
|
157
|
-
return (t, n) => (
|
|
157
|
+
return (t, n) => (V(), P("svg", {
|
|
158
158
|
fill: "none",
|
|
159
159
|
height: e.size,
|
|
160
160
|
width: e.size * 208 / 128,
|
|
161
|
-
viewBox:
|
|
161
|
+
viewBox: K(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: K(ue),
|
|
167
167
|
"fill-rule": "evenodd",
|
|
168
168
|
fill: "currentColor"
|
|
169
|
-
}, null, 8,
|
|
170
|
-
|
|
171
|
-
d:
|
|
169
|
+
}, null, 8, Ue),
|
|
170
|
+
F("path", {
|
|
171
|
+
d: K(le),
|
|
172
172
|
fill: "currentColor"
|
|
173
|
-
}, null, 8,
|
|
174
|
-
|
|
175
|
-
d:
|
|
173
|
+
}, null, 8, We),
|
|
174
|
+
F("path", {
|
|
175
|
+
d: K(de),
|
|
176
176
|
fill: "currentColor"
|
|
177
|
-
}, null, 8,
|
|
178
|
-
], 8,
|
|
177
|
+
}, null, 8, Ge)
|
|
178
|
+
], 8, He));
|
|
179
179
|
}
|
|
180
|
-
}),
|
|
180
|
+
}), qe = ["title", "aria-label"], Z = /* @__PURE__ */ L({
|
|
181
181
|
__name: "TdButton",
|
|
182
182
|
props: { label: {} },
|
|
183
183
|
setup(e) {
|
|
184
|
-
return (t, n) => (
|
|
184
|
+
return (t, n) => (V(), 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
|
+
}, [W(t.$slots, "default")], 8, qe));
|
|
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 = Ce("wrapper"), n = H(!1), r = H({
|
|
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) => (V(), 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
|
+
}), [W(i.$slots, "default", {}, void 0, !0)], 16), (V(), M(fe, { to: "body" }, [n.value ? (V(), 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
|
+
}, G(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 _ = H(!y(i, t.path)), v = H(!1), ee = j(() => v.value ? l : l.slice(0, st)), S = j(() => Math.max(0, l.length - st));
|
|
273
|
+
J(() => 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 = xe("TdTreeNode", !0);
|
|
287
|
+
return K(p) ? (V(), 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(K(Oe), {
|
|
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, G(K(r)(e.node.name)), 1)], 8, $e),
|
|
297
|
+
F("a", {
|
|
298
|
+
href: K(c),
|
|
299
|
+
class: R(["td-tree-index-btn", { "is-active": C(K(o)) }])
|
|
300
|
+
}, [C(K(o)) ? (V(), M(K(Ne), {
|
|
301
301
|
key: 0,
|
|
302
302
|
size: 12
|
|
303
|
-
})) : (
|
|
303
|
+
})) : (V(), M(K(ae), {
|
|
304
304
|
key: 1,
|
|
305
305
|
size: 12
|
|
306
|
-
}))], 10,
|
|
307
|
-
|
|
308
|
-
]),
|
|
309
|
-
(
|
|
306
|
+
}))], 10, tt),
|
|
307
|
+
F("span", nt, G(h.value), 1)
|
|
308
|
+
]), _.value ? N("", !0) : (V(), P("div", rt, [
|
|
309
|
+
(V(!0), P(A, null, U(e.node.children, (e) => (V(), M(s, {
|
|
310
310
|
key: e.name,
|
|
311
311
|
node: e,
|
|
312
|
-
"url-prefix":
|
|
312
|
+
"url-prefix": K(i)
|
|
313
313
|
}, null, 8, ["node", "url-prefix"]))), 128)),
|
|
314
|
-
(
|
|
314
|
+
(V(!0), P(A, null, U(ee.value, (e) => (V(), P("a", {
|
|
315
315
|
key: e.filepath,
|
|
316
|
-
href:
|
|
317
|
-
class:
|
|
316
|
+
href: K(n)(K(b)(e.filepath)),
|
|
317
|
+
class: R(["td-tree-link", { "is-active": C(K(b)(e.filepath)) }])
|
|
318
318
|
}, [
|
|
319
|
-
|
|
319
|
+
I(K(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: K(m)(e.header, e.filepath)
|
|
326
326
|
}, {
|
|
327
|
-
default:
|
|
327
|
+
default: Y(() => [F("span", { innerHTML: K(Ye)(K(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, G(K(d)(e.metadata.mtime)), 1)
|
|
331
|
+
], 10, it))), 128)),
|
|
332
|
+
S.value > 0 && !v.value ? (V(), P("button", {
|
|
333
333
|
key: 0,
|
|
334
334
|
class: "td-tree-more",
|
|
335
335
|
type: "button",
|
|
336
336
|
onClick: te
|
|
337
|
-
},
|
|
338
|
-
]))])) :
|
|
337
|
+
}, G(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) => (V(), P("nav", null, [
|
|
353
|
+
F("a", {
|
|
354
|
+
href: K(n)(K(r) ? K(b)(K(r).filepath) : K(s)("/")),
|
|
355
|
+
class: R(["td-root-link", { "is-active": a(K(r) ? K(b)(K(r).filepath) : K(s)("/")) }])
|
|
356
356
|
}, [
|
|
357
|
-
|
|
357
|
+
I(K(Pe), {
|
|
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
|
+
K(r) ? (V(), P("span", ut, G(K(d)(K(r).metadata.mtime)), 1)) : N("", !0)
|
|
363
|
+
], 10, lt),
|
|
364
|
+
(V(!0), P(A, null, U(K(i), (e) => (V(), P("a", {
|
|
365
365
|
key: e.filepath,
|
|
366
|
-
href:
|
|
367
|
-
class:
|
|
366
|
+
href: K(n)(K(b)(e.filepath)),
|
|
367
|
+
class: R(["td-root-link", { "is-active": a(K(b)(e.filepath)) }])
|
|
368
368
|
}, [
|
|
369
|
-
|
|
369
|
+
I(K(k), {
|
|
370
370
|
size: 14,
|
|
371
371
|
class: "td-root-link-icon"
|
|
372
372
|
}),
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
], 10,
|
|
376
|
-
(
|
|
373
|
+
F("span", ft, G(K(m)(e.header, e.filepath)), 1),
|
|
374
|
+
F("span", pt, G(K(d)(e.metadata.mtime)), 1)
|
|
375
|
+
], 10, dt))), 128)),
|
|
376
|
+
(V(!0), P(A, null, U(e.tree.children, (e) => (V(), 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 = q(e, "open"), n = Ce("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 J(t, (e) => {
|
|
405
405
|
typeof document > "u" || (e ? document.addEventListener("click", r) : document.removeEventListener("click", r));
|
|
406
|
-
}),
|
|
406
|
+
}), B(() => {
|
|
407
407
|
typeof document > "u" || document.removeEventListener("click", r);
|
|
408
|
-
}), (e, r) => (
|
|
408
|
+
}), (e, r) => (V(), 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 }, [W(e.$slots, "trigger", {}, void 0, !0)]), t.value ? (V(), P("div", ht, [W(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 = H(!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 J(() => t.path, () => {
|
|
445
445
|
a.value = !1;
|
|
446
|
-
}), (e, t) => (
|
|
446
|
+
}), (e, t) => (V(), 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
|
+
}, G(o.value[0].name), 9, vt), l.value ? (V(), 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: Y(() => [F("button", yt, [I(K(je), { size: 14 })])]),
|
|
459
|
+
default: Y(() => [(V(!0), P(A, null, U(u.value, (e) => (V(), P("a", {
|
|
460
460
|
key: e.href,
|
|
461
461
|
href: e.href,
|
|
462
462
|
class: "td-breadcrumb-dropdown-item"
|
|
463
|
-
},
|
|
463
|
+
}, G(e.name), 9, bt))), 128))]),
|
|
464
464
|
_: 1
|
|
465
465
|
}, 8, ["open"]),
|
|
466
|
-
(
|
|
466
|
+
(V(!0), P(A, null, U(o.value.slice(-2), (e) => (V(), 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] ? (V(), P("span", St, G(e.name), 1)) : (V(), P("a", {
|
|
470
470
|
key: 0,
|
|
471
471
|
href: e.href,
|
|
472
472
|
class: "td-breadcrumb-link"
|
|
473
|
-
},
|
|
474
|
-
], 64)) : (
|
|
473
|
+
}, G(e.name), 9, xt))], 64))), 128))
|
|
474
|
+
], 64)) : (V(!0), P(A, { key: 1 }, U(o.value.slice(1), (e, n) => (V(), 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 ? (V(), P("a", {
|
|
478
478
|
key: 0,
|
|
479
479
|
href: e.href,
|
|
480
480
|
class: "td-breadcrumb-link"
|
|
481
|
-
},
|
|
481
|
+
}, G(e.name), 9, Ct)) : (V(), P("span", wt, G(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) => (V(), P("span", Dt, [e.value ? (V(), M(K(ze), {
|
|
488
488
|
key: 0,
|
|
489
489
|
size: 16,
|
|
490
490
|
class: "td-widget-checkbox-icon is-checked"
|
|
491
|
-
})) : (
|
|
491
|
+
})) : (V(), M(K(Be), {
|
|
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) => K(n) ? (V(), P("span", jt, [K(n).isImage ? (V(), P("a", {
|
|
550
550
|
key: 0,
|
|
551
|
-
href:
|
|
551
|
+
href: K(t)(K(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: K(n).name
|
|
556
|
+
}, [F("img", {
|
|
557
|
+
src: K(t)(K(n).url),
|
|
558
|
+
alt: K(n).name,
|
|
559
559
|
class: "td-widget-image-img",
|
|
560
560
|
loading: "lazy"
|
|
561
|
-
}, null, 8,
|
|
561
|
+
}, null, 8, Nt)], 8, Mt)) : K(n).format || K(n).url.includes(".") ? (V(), P("a", {
|
|
562
562
|
key: 1,
|
|
563
|
-
href:
|
|
563
|
+
href: K(t)(K(n).url),
|
|
564
564
|
target: "_blank",
|
|
565
565
|
rel: "noopener noreferrer",
|
|
566
566
|
class: "td-widget-file-link"
|
|
567
|
-
}, [
|
|
567
|
+
}, [I(K(Me), { class: "td-widget-file-icon" }), F("span", Ft, G(K(n).name), 1)], 8, Pt)) : (V(), P("a", {
|
|
568
568
|
key: 2,
|
|
569
|
-
href:
|
|
569
|
+
href: K(t)(K(n).url),
|
|
570
570
|
class: "td-widget-ref"
|
|
571
|
-
},
|
|
571
|
+
}, G(K(n).name), 9, It))])) : (V(), P("span", Lt, G(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 = H(!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 ? (V(), P("div", zt, [F("ul", Bt, [(V(!0), P(A, null, U(s(K(i)), (e, t) => (V(), P("li", { key: t }, [I(Rt, { value: { $ref: e } }, null, 8, ["value"])]))), 128))]), K(a) > 0 ? (V(), P("button", {
|
|
588
588
|
key: 0,
|
|
589
589
|
class: "td-widget-more",
|
|
590
590
|
type: "button",
|
|
591
591
|
onClick: o
|
|
592
|
-
},
|
|
592
|
+
}, G(t.value ? "show less" : `+${K(a)} more`), 1)) : N("", !0)])) : (V(), P("div", Vt, [F("ul", Ht, [(V(!0), P(A, null, U(s(K(n)), (e, t) => (V(), P("li", { key: t }, [K(Q)(e) ? (V(), M(Rt, {
|
|
593
593
|
key: 0,
|
|
594
594
|
value: e
|
|
595
|
-
}, null, 8, ["value"])) : (
|
|
595
|
+
}, null, 8, ["value"])) : (V(), P(A, { key: 1 }, [pe(G(e), 1)], 64))]))), 128))]), K(a) > 0 ? (V(), P("button", {
|
|
596
596
|
key: 0,
|
|
597
597
|
class: "td-widget-more",
|
|
598
598
|
type: "button",
|
|
599
599
|
onClick: o
|
|
600
|
-
},
|
|
600
|
+
}, G(t.value ? "show less" : `+${K(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 = H(!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) => (V(), P(A, null, [(V(!0), P(A, null, U(r(), (e, t) => (V(), P("span", {
|
|
659
659
|
key: t,
|
|
660
660
|
class: "td-widget-pill",
|
|
661
|
-
style:
|
|
662
|
-
},
|
|
661
|
+
style: z(K(Kt)(e))
|
|
662
|
+
}, G(e), 5))), 128)), K(i) > 0 ? (V(), P("button", {
|
|
663
663
|
key: 0,
|
|
664
664
|
class: "td-widget-more",
|
|
665
665
|
type: "button",
|
|
666
666
|
onClick: a
|
|
667
|
-
},
|
|
667
|
+
}, G(t.value ? "show less" : `+${K(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) => (V(), P("span", {
|
|
674
674
|
class: "td-widget-pill",
|
|
675
|
-
style:
|
|
676
|
-
},
|
|
675
|
+
style: z(K(Kt)(e.value))
|
|
676
|
+
}, G(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) => K(i) ? (V(), P("a", {
|
|
690
690
|
key: 0,
|
|
691
|
-
href:
|
|
691
|
+
href: K(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: K(r) ? K(r).name : K(n)
|
|
696
|
+
}, [F("img", {
|
|
697
|
+
src: K(a),
|
|
698
|
+
alt: K(r) ? K(r).name : K(n),
|
|
699
699
|
class: "td-widget-image-img",
|
|
700
700
|
loading: "lazy"
|
|
701
|
-
}, null, 8,
|
|
701
|
+
}, null, 8, Qt)], 8, Zt)) : o.value ? (V(), P("a", {
|
|
702
702
|
key: 1,
|
|
703
|
-
href:
|
|
703
|
+
href: K(a),
|
|
704
704
|
target: "_blank",
|
|
705
705
|
rel: "noopener noreferrer",
|
|
706
706
|
class: "td-widget-file-link"
|
|
707
|
-
}, [
|
|
707
|
+
}, [I(K(Me), { class: "td-widget-file-icon" }), F("span", en, G(K(n).split("/").pop() ?? K(n)), 1)], 8, $t)) : (V(), P(A, { key: 2 }, [pe(G(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 ? (V(), P("span", nn, "Empty")) : e.definition.widget === "checkbox" ? (V(), 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" ? (V(), 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" ? (V(), M(Yt, {
|
|
726
726
|
key: 3,
|
|
727
727
|
value: e.value
|
|
728
|
-
}, null, 8, ["value"])) :
|
|
728
|
+
}, null, 8, ["value"])) : K(Q)(e.value) || e.definition.widget === "relation" ? (V(), 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" ? (V(), 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"])) : (V(), 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 ? (V(), P("div", an, [(V(!0), P(A, null, U(i.value, ([t, n]) => (V(), P("div", {
|
|
766
766
|
key: t,
|
|
767
767
|
class: "td-frontmatter-row"
|
|
768
|
-
}, [
|
|
768
|
+
}, [F("span", on, G(K(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"]]), $ = H(!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: be($),
|
|
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) => (V(), M(Z, {
|
|
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: K(t) ? "Close menu" : "Open menu",
|
|
796
|
+
"aria-expanded": K(t),
|
|
797
|
+
onClick: K(n)
|
|
798
798
|
}, {
|
|
799
|
-
default:
|
|
799
|
+
default: Y(() => [K(t) ? (V(), M(K(X), {
|
|
800
800
|
key: 0,
|
|
801
801
|
size: 20,
|
|
802
802
|
class: "group-hover:text-td-primary-solid transition-colors"
|
|
803
|
-
})) : (
|
|
803
|
+
})) : (V(), M(K(Ie), {
|
|
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) => K(t) || K(n) ? (V(), P("nav", hn, [K(t) ? (V(), P("a", {
|
|
877
877
|
key: 0,
|
|
878
|
-
href:
|
|
878
|
+
href: K(t).url,
|
|
879
879
|
class: "td-previous-next-link is-previous"
|
|
880
|
-
}, [
|
|
880
|
+
}, [I(K(Ae), {
|
|
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, G(K(t).title), 1)])], 8, gn)) : (V(), P("span", yn)), K(n) ? (V(), P("a", {
|
|
884
884
|
key: 2,
|
|
885
|
-
href:
|
|
885
|
+
href: K(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, G(K(n).title), 1)]), I(K(ke), {
|
|
888
888
|
size: 16,
|
|
889
889
|
class: "td-previous-next-icon"
|
|
890
|
-
})], 8, bn)) : (
|
|
890
|
+
})], 8, bn)) : (V(), 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 = q(t, "active"), s = q(t, "query"), c = n, u = Se([]), d = H(!1), f = H(-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
|
+
J(p, (e) => {
|
|
927
|
+
i.value = e;
|
|
928
928
|
});
|
|
929
|
-
let
|
|
930
|
-
|
|
931
|
-
|
|
929
|
+
let h = oe(), _ = re(), y;
|
|
930
|
+
J(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
|
+
J(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) => (V(), P("div", Tn, [
|
|
1036
|
+
F("div", En, [
|
|
1037
|
+
I(K(Re), {
|
|
1038
1038
|
size: 14,
|
|
1039
1039
|
class: "td-search-icon"
|
|
1040
1040
|
}),
|
|
1041
|
-
|
|
1042
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
1041
|
+
Ee(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), [[we, s.value]]),
|
|
1049
|
+
d.value ? (V(), M(K(Fe), {
|
|
1050
1050
|
key: 0,
|
|
1051
1051
|
size: 12,
|
|
1052
1052
|
class: "td-search-spinner"
|
|
1053
|
-
})) :
|
|
1054
|
-
|
|
1053
|
+
})) : p.value ? (V(), P("span", Dn, G(u.value.length), 1)) : N("", !0),
|
|
1054
|
+
s.value ? (V(), 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(K(X), { size: 12 })])) : N("", !0)
|
|
1061
1061
|
]),
|
|
1062
|
-
|
|
1062
|
+
p.value && u.value.length > 0 ? (V(), P("div", On, [(V(!0), P(A, null, U(m.value, (e) => (V(), P("div", {
|
|
1063
1063
|
key: e.pageUrl,
|
|
1064
1064
|
class: "td-search-group"
|
|
1065
|
-
}, [
|
|
1065
|
+
}, [F("div", kn, G(e.pageTitle), 1), (V(!0), P(A, null, U(e.results, (e) => (V(), 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 ? (V(), 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 ? (V(), P("div", Nn, " No results for \"" + G(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) => (V(), M(Z, {
|
|
1086
1086
|
class: "w-9 h-9 text-td-neutral-fg-muted group hover:opacity-70",
|
|
1087
|
-
label:
|
|
1088
|
-
onClick:
|
|
1087
|
+
label: K(t) ? "Switch to light mode" : "Switch to dark mode",
|
|
1088
|
+
onClick: K(n)
|
|
1089
1089
|
}, {
|
|
1090
|
-
default:
|
|
1090
|
+
default: Y(() => [K(t) ? (V(), M(K(Ve), {
|
|
1091
1091
|
key: 0,
|
|
1092
1092
|
size: 18,
|
|
1093
1093
|
class: "group-hover:text-td-primary-solid transition-colors"
|
|
1094
|
-
})) : (
|
|
1094
|
+
})) : (V(), M(K(Le), {
|
|
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
|
+
ye(() => {
|
|
1118
1118
|
document.addEventListener("click", e);
|
|
1119
|
-
}),
|
|
1119
|
+
}), B(() => {
|
|
1120
1120
|
document.removeEventListener("click", e);
|
|
1121
1121
|
});
|
|
1122
1122
|
}
|
|
@@ -1153,16 +1153,16 @@ function Bn() {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
document.addEventListener("pointermove", o), document.addEventListener("pointerup", s);
|
|
1155
1155
|
}
|
|
1156
|
-
|
|
1156
|
+
ye(() => {
|
|
1157
1157
|
document.addEventListener("pointermove", r), document.addEventListener("pointerdown", i);
|
|
1158
|
-
}),
|
|
1158
|
+
}), B(() => {
|
|
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
1164
|
function Vn(e) {
|
|
1165
|
-
let t =
|
|
1165
|
+
let t = H(""), n;
|
|
1166
1166
|
function r() {
|
|
1167
1167
|
if (typeof document > "u") return;
|
|
1168
1168
|
n?.disconnect(), t.value = "";
|
|
@@ -1185,9 +1185,9 @@ function Vn(e) {
|
|
|
1185
1185
|
for (let t of e) n.observe(t);
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
|
-
return
|
|
1189
|
-
typeof window > "u" ||
|
|
1190
|
-
}, { immediate: !0 }),
|
|
1188
|
+
return J(e, () => {
|
|
1189
|
+
typeof window > "u" || _e(r);
|
|
1190
|
+
}, { immediate: !0 }), B(() => {
|
|
1191
1191
|
n?.disconnect();
|
|
1192
1192
|
}), t;
|
|
1193
1193
|
}
|
|
@@ -1196,22 +1196,22 @@ function Vn(e) {
|
|
|
1196
1196
|
var Hn = {
|
|
1197
1197
|
key: 0,
|
|
1198
1198
|
class: "td-toc"
|
|
1199
|
-
}, Un = { class: "td-toc-list" }, Wn = ["href"], Gn = /*#__PURE__*/ T(/* @__PURE__ */
|
|
1199
|
+
}, Un = { class: "td-toc-list" }, Wn = ["href"], Gn = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
1200
1200
|
__name: "TdToc",
|
|
1201
1201
|
props: { headings: {} },
|
|
1202
1202
|
setup(e) {
|
|
1203
1203
|
let t = Vn(() => e.headings);
|
|
1204
|
-
return (n, r) => e.headings.length ? (
|
|
1204
|
+
return (n, r) => e.headings.length ? (V(), P("div", Hn, [r[0] ||= F("div", { class: "td-toc-label" }, " On this page ", -1), F("ul", Un, [(V(!0), P(A, null, U(e.headings, (e) => (V(), P("li", {
|
|
1205
1205
|
key: e.slug,
|
|
1206
|
-
class:
|
|
1206
|
+
class: R({
|
|
1207
1207
|
"td-toc-indent-1": e.level === 3,
|
|
1208
1208
|
"td-toc-indent-2": e.level === 4,
|
|
1209
1209
|
"td-toc-indent-3": e.level === 5
|
|
1210
1210
|
})
|
|
1211
|
-
}, [
|
|
1211
|
+
}, [F("a", {
|
|
1212
1212
|
href: e.link,
|
|
1213
|
-
class:
|
|
1214
|
-
},
|
|
1213
|
+
class: R(["td-toc-link", { "is-active": K(t) === e.slug }])
|
|
1214
|
+
}, G(e.title), 11, Wn)], 2))), 128))])])) : N("", !0);
|
|
1215
1215
|
}
|
|
1216
1216
|
}), [["__scopeId", "data-v-84e4402d"]]), Kn = { class: "td-header" }, qn = { class: "td-header-left" }, Jn = ["href"], Yn = { class: "td-brand-name" }, Xn = { class: "td-header-right" }, Zn = { class: "td-menu-header" }, Qn = { class: "td-header-left" }, $n = ["href"], er = { class: "td-brand-name" }, tr = {
|
|
1217
1217
|
key: 0,
|
|
@@ -1223,18 +1223,18 @@ var Hn = {
|
|
|
1223
1223
|
}, cr = { key: 0 }, lr = {
|
|
1224
1224
|
class: "td-sidebar-right",
|
|
1225
1225
|
"aria-label": "Table of contents"
|
|
1226
|
-
}, ur = 200, dr = 500, fr = 272, pr = "td-sidebar-width", mr = /*#__PURE__*/ T(/* @__PURE__ */
|
|
1226
|
+
}, ur = 200, dr = 500, fr = 272, pr = "td-sidebar-width", mr = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
1227
1227
|
__name: "TdLayout",
|
|
1228
1228
|
setup(e) {
|
|
1229
|
-
let { title: t, page: n } =
|
|
1230
|
-
|
|
1229
|
+
let { title: t, page: n } = ie(), r = D(), { withBase: i } = r, a = C(), { isOpen: o, close: c } = ln(), l = H(""), u = H(!1), d = H(!1), f = O();
|
|
1230
|
+
J(() => f.path, () => c()), Ln(), Te(() => {
|
|
1231
1231
|
if (typeof document > "u") return;
|
|
1232
1232
|
let e = t.value, i = r.title;
|
|
1233
1233
|
document.title = e && e !== i ? `${e} - ${i}` : i;
|
|
1234
1234
|
let a = n.frontmatter?.description === void 0 ? r.description ?? "" : String(n.frontmatter.description), o = document.querySelector("meta[name=\"description\"]");
|
|
1235
1235
|
o && o.setAttribute("content", a);
|
|
1236
1236
|
}), Bn();
|
|
1237
|
-
let p =
|
|
1237
|
+
let p = H(typeof localStorage < "u" && Number(localStorage.getItem(pr)) || fr);
|
|
1238
1238
|
function m(e) {
|
|
1239
1239
|
let t = e.clientX, n = p.value, r = e.currentTarget;
|
|
1240
1240
|
r.setPointerCapture(e.pointerId);
|
|
@@ -1247,83 +1247,83 @@ var Hn = {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
document.body.style.cursor = "col-resize", r.addEventListener("pointermove", i), r.addEventListener("pointerup", a);
|
|
1249
1249
|
}
|
|
1250
|
-
return (e, f) => (
|
|
1251
|
-
|
|
1252
|
-
href:
|
|
1250
|
+
return (e, f) => (V(), P("div", null, [
|
|
1251
|
+
F("header", Kn, [F("div", qn, [I(un), F("a", {
|
|
1252
|
+
href: K(i)(K(s)("/")),
|
|
1253
1253
|
class: "td-brand"
|
|
1254
|
-
}, [
|
|
1255
|
-
|
|
1256
|
-
|
|
1254
|
+
}, [I(Ke), F("span", Yn, G(K(r).title || "Typedown"), 1)], 8, Jn)]), F("div", Xn, [I(In)])]),
|
|
1255
|
+
F("div", { class: R(["td-menu-overlay", { "is-open": K(o) }]) }, [
|
|
1256
|
+
F("header", Zn, [F("div", Qn, [I(Z, {
|
|
1257
1257
|
class: "w-9 h-9 text-td-neutral-fg-muted hover:text-td-primary-solid",
|
|
1258
1258
|
label: "Close menu",
|
|
1259
|
-
onClick:
|
|
1259
|
+
onClick: K(c)
|
|
1260
1260
|
}, {
|
|
1261
|
-
default:
|
|
1261
|
+
default: Y(() => [I(K(X), { size: 20 })]),
|
|
1262
1262
|
_: 1
|
|
1263
|
-
}, 8, ["onClick"]),
|
|
1264
|
-
href:
|
|
1263
|
+
}, 8, ["onClick"]), F("a", {
|
|
1264
|
+
href: K(i)(K(s)("/")),
|
|
1265
1265
|
class: "td-brand"
|
|
1266
|
-
}, [
|
|
1267
|
-
|
|
1266
|
+
}, [I(Ke), F("span", er, G(K(r).title || "Typedown"), 1)], 8, $n)])]),
|
|
1267
|
+
I(Fn, {
|
|
1268
1268
|
query: l.value,
|
|
1269
1269
|
"onUpdate:query": f[0] ||= (e) => l.value = e,
|
|
1270
1270
|
active: d.value,
|
|
1271
1271
|
"onUpdate:active": f[1] ||= (e) => d.value = e,
|
|
1272
|
-
onSelect:
|
|
1272
|
+
onSelect: K(c)
|
|
1273
1273
|
}, null, 8, [
|
|
1274
1274
|
"query",
|
|
1275
1275
|
"active",
|
|
1276
1276
|
"onSelect"
|
|
1277
1277
|
]),
|
|
1278
|
-
d.value ?
|
|
1278
|
+
d.value ? N("", !0) : (V(), P("nav", tr, [I(mt, { tree: K(a).contentTree }, null, 8, ["tree"])]))
|
|
1279
1279
|
], 2),
|
|
1280
|
-
|
|
1280
|
+
F("div", nr, [F("nav", {
|
|
1281
1281
|
class: "td-sidebar-left",
|
|
1282
1282
|
"aria-label": "Site navigation",
|
|
1283
|
-
style:
|
|
1283
|
+
style: z({ width: `${p.value}px` })
|
|
1284
1284
|
}, [
|
|
1285
|
-
|
|
1285
|
+
I(Fn, {
|
|
1286
1286
|
query: l.value,
|
|
1287
1287
|
"onUpdate:query": f[2] ||= (e) => l.value = e,
|
|
1288
1288
|
active: u.value,
|
|
1289
1289
|
"onUpdate:active": f[3] ||= (e) => u.value = e
|
|
1290
1290
|
}, null, 8, ["query", "active"]),
|
|
1291
|
-
u.value ?
|
|
1291
|
+
u.value ? N("", !0) : (V(), M(mt, {
|
|
1292
1292
|
key: 0,
|
|
1293
|
-
tree:
|
|
1293
|
+
tree: K(a).contentTree
|
|
1294
1294
|
}, null, 8, ["tree"])),
|
|
1295
|
-
|
|
1295
|
+
F("div", {
|
|
1296
1296
|
class: "td-sidebar-resize",
|
|
1297
|
-
onPointerdown:
|
|
1297
|
+
onPointerdown: De(m, ["prevent"])
|
|
1298
1298
|
}, null, 32)
|
|
1299
|
-
], 4),
|
|
1300
|
-
|
|
1301
|
-
|
|
1299
|
+
], 4), F("div", rr, [F("main", ir, [F("article", ar, [
|
|
1300
|
+
I(Et),
|
|
1301
|
+
K(t) ? (V(), P("h1", {
|
|
1302
1302
|
key: 0,
|
|
1303
1303
|
class: "td-page-title",
|
|
1304
|
-
innerHTML:
|
|
1305
|
-
}, null, 8, or)) :
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
schema:
|
|
1309
|
-
frontmatter:
|
|
1304
|
+
innerHTML: K(Ye)(K(t))
|
|
1305
|
+
}, null, 8, or)) : N("", !0),
|
|
1306
|
+
K(n).metadata ? (V(), P("div", sr, [F("span", null, G(K(_)(K(n).metadata.mtime, "Modified")), 1), K(n).metadata.ctime === K(n).metadata.mtime ? N("", !0) : (V(), P("span", cr, " · " + G(K(_)(K(n).metadata.ctime, "Created")), 1))])) : N("", !0),
|
|
1307
|
+
I(K(cn), {
|
|
1308
|
+
schema: K(n).schema,
|
|
1309
|
+
frontmatter: K(n).frontmatter
|
|
1310
1310
|
}, null, 8, ["schema", "frontmatter"]),
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
])]),
|
|
1311
|
+
I(K(w)),
|
|
1312
|
+
I(wn)
|
|
1313
|
+
])]), F("nav", lr, [I(Gn, { headings: K(n).headings }, null, 8, ["headings"])])])])
|
|
1314
1314
|
]));
|
|
1315
1315
|
}
|
|
1316
|
-
}), [["__scopeId", "data-v-93a3d24b"]]), hr = { class: "pt-16 pb-24" }, gr = ["href"], _r = /* @__PURE__ */
|
|
1316
|
+
}), [["__scopeId", "data-v-93a3d24b"]]), hr = { class: "pt-16 pb-24" }, gr = ["href"], _r = /* @__PURE__ */ L({
|
|
1317
1317
|
__name: "TdNotFound",
|
|
1318
1318
|
setup(e) {
|
|
1319
1319
|
let { withBase: t } = D();
|
|
1320
|
-
return (e, n) => (
|
|
1321
|
-
n[0] ||=
|
|
1322
|
-
n[1] ||=
|
|
1323
|
-
n[2] ||=
|
|
1324
|
-
|
|
1320
|
+
return (e, n) => (V(), P("div", hr, [
|
|
1321
|
+
n[0] ||= F("p", { class: "text-td-display font-td-heading leading-none tracking-td-title text-td-fg-muted" }, " 404 ", -1),
|
|
1322
|
+
n[1] ||= F("h1", { class: "text-td-h2 font-td-heading leading-td-heading tracking-td-heading mt-4" }, " Page Not Found ", -1),
|
|
1323
|
+
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),
|
|
1324
|
+
F("a", {
|
|
1325
1325
|
class: "inline-flex items-center mt-6 text-td-primary-solid text-td-ui font-td-heading tracking-td-heading hover:text-td-primary-solid-hover",
|
|
1326
|
-
href:
|
|
1326
|
+
href: K(t)(K(s)("/"))
|
|
1327
1327
|
}, "Go Home", 8, gr)
|
|
1328
1328
|
]));
|
|
1329
1329
|
}
|