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