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