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