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