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