typerighter 0.12.1 → 0.12.2
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.
|
@@ -652,7 +652,7 @@ function Y() {
|
|
|
652
652
|
n.dispose();
|
|
653
653
|
}
|
|
654
654
|
}), e.command("init [root]", "Scaffold a new project").action(async (e) => {
|
|
655
|
-
let { initialize: t } = await import("./init-
|
|
655
|
+
let { initialize: t } = await import("./init-DXSnwZBc.js");
|
|
656
656
|
await t(Z(e));
|
|
657
657
|
}), e.command("preview [root]", "Preview production build").option("--port <port>", "Port to listen on").action(async (e, t) => {
|
|
658
658
|
let { preview: n } = await import("vite");
|
|
@@ -682,7 +682,7 @@ function Y() {
|
|
|
682
682
|
} finally {
|
|
683
683
|
n.dispose();
|
|
684
684
|
}
|
|
685
|
-
}), e.help(), e.version("0.12.
|
|
685
|
+
}), e.help(), e.version("0.12.2"), e.parse();
|
|
686
686
|
}
|
|
687
687
|
function X(e, t) {
|
|
688
688
|
let n = t instanceof Error ? t.message : String(t);
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./cli-
|
|
1
|
+
import { t as e } from "./cli-CrhTEDdv.js";
|
|
2
2
|
export { e as cli };
|
|
@@ -2,17 +2,17 @@ import { B as e, D as t, E as n, F as r, O as i, T as a, V as o, _ as s, b as c,
|
|
|
2
2
|
import { r as S, t as te } from "../es-CG8rP6j5.js";
|
|
3
3
|
import { a as C, c as w, d as ne, f as T, h as E, i as D, l as O, m as k, n as re, o as ie, p as ae, r as oe, s as se } from "../app-5DaKZ6wW.js";
|
|
4
4
|
import { a as ce, i as le, n as ue, t as de } from "../brand-CG1fQshq.js";
|
|
5
|
-
import { Fragment as A, Teleport as fe, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createTextVNode as pe, createVNode as I, defineComponent as L, markRaw as me, mergeModels as he, mergeProps as ge, nextTick as _e, normalizeClass as R, normalizeStyle as z, onBeforeUnmount as ve, onMounted as
|
|
6
|
-
var
|
|
5
|
+
import { Fragment as A, Teleport as fe, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createTextVNode as pe, createVNode as I, defineComponent as L, markRaw as me, mergeModels as he, mergeProps as ge, nextTick as _e, normalizeClass as R, normalizeStyle as z, onBeforeUnmount as ve, onMounted as B, onUnmounted as V, openBlock as H, readonly as ye, ref as U, renderList as W, renderSlot as G, resolveComponent as be, shallowRef as xe, toDisplayString as K, unref as q, useModel as J, useTemplateRef as Se, vModelText as Ce, watch as Y, watchEffect as we, withCtx as X, withDirectives as Te, withModifiers as Ee } from "vue";
|
|
6
|
+
var De = E("chevron-down", [["path", {
|
|
7
7
|
d: "m6 9 6 6 6-6",
|
|
8
8
|
key: "qrunsl"
|
|
9
|
-
}]]),
|
|
9
|
+
}]]), Oe = E("chevron-right", [["path", {
|
|
10
10
|
d: "m9 18 6-6-6-6",
|
|
11
11
|
key: "mthhwq"
|
|
12
|
-
}]]),
|
|
12
|
+
}]]), ke = E("chevron-left", [["path", {
|
|
13
13
|
d: "m15 18-6-6 6-6",
|
|
14
14
|
key: "1wnfg3"
|
|
15
|
-
}]]),
|
|
15
|
+
}]]), Ae = E("ellipsis", [
|
|
16
16
|
["circle", {
|
|
17
17
|
cx: "12",
|
|
18
18
|
cy: "12",
|
|
@@ -31,7 +31,7 @@ var Oe = E("chevron-down", [["path", {
|
|
|
31
31
|
r: "1",
|
|
32
32
|
key: "1pcz8c"
|
|
33
33
|
}]
|
|
34
|
-
]),
|
|
34
|
+
]), je = E("file-text", [
|
|
35
35
|
["path", {
|
|
36
36
|
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",
|
|
37
37
|
key: "1oefj6"
|
|
@@ -52,19 +52,19 @@ var Oe = E("chevron-down", [["path", {
|
|
|
52
52
|
d: "M16 17H8",
|
|
53
53
|
key: "z1uh3a"
|
|
54
54
|
}]
|
|
55
|
-
]),
|
|
55
|
+
]), Me = E("folder-open", [["path", {
|
|
56
56
|
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",
|
|
57
57
|
key: "usdka0"
|
|
58
|
-
}]]),
|
|
58
|
+
}]]), Ne = E("house", [["path", {
|
|
59
59
|
d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",
|
|
60
60
|
key: "5wwlr5"
|
|
61
61
|
}], ["path", {
|
|
62
62
|
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",
|
|
63
63
|
key: "r6nss1"
|
|
64
|
-
}]]),
|
|
64
|
+
}]]), Pe = E("loader-circle", [["path", {
|
|
65
65
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
66
66
|
key: "13zald"
|
|
67
|
-
}]]),
|
|
67
|
+
}]]), Fe = E("menu", [
|
|
68
68
|
["path", {
|
|
69
69
|
d: "M4 5h16",
|
|
70
70
|
key: "1tepv9"
|
|
@@ -77,10 +77,10 @@ var Oe = E("chevron-down", [["path", {
|
|
|
77
77
|
d: "M4 19h16",
|
|
78
78
|
key: "1djgab"
|
|
79
79
|
}]
|
|
80
|
-
]),
|
|
80
|
+
]), Ie = E("moon", [["path", {
|
|
81
81
|
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",
|
|
82
82
|
key: "kfwtm"
|
|
83
|
-
}]]),
|
|
83
|
+
}]]), Le = E("search", [["path", {
|
|
84
84
|
d: "m21 21-4.34-4.34",
|
|
85
85
|
key: "14j7rj"
|
|
86
86
|
}], ["circle", {
|
|
@@ -88,20 +88,20 @@ var Oe = E("chevron-down", [["path", {
|
|
|
88
88
|
cy: "11",
|
|
89
89
|
r: "8",
|
|
90
90
|
key: "4ej97u"
|
|
91
|
-
}]]),
|
|
91
|
+
}]]), Re = E("square-check-big", [["path", {
|
|
92
92
|
d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",
|
|
93
93
|
key: "2acyp4"
|
|
94
94
|
}], ["path", {
|
|
95
95
|
d: "m9 11 3 3L22 4",
|
|
96
96
|
key: "1pflzl"
|
|
97
|
-
}]]),
|
|
97
|
+
}]]), ze = E("square", [["rect", {
|
|
98
98
|
width: "18",
|
|
99
99
|
height: "18",
|
|
100
100
|
x: "3",
|
|
101
101
|
y: "3",
|
|
102
102
|
rx: "2",
|
|
103
103
|
key: "afitv7"
|
|
104
|
-
}]]),
|
|
104
|
+
}]]), Be = E("sun", [
|
|
105
105
|
["circle", {
|
|
106
106
|
cx: "12",
|
|
107
107
|
cy: "12",
|
|
@@ -140,53 +140,53 @@ var Oe = E("chevron-down", [["path", {
|
|
|
140
140
|
d: "m19.07 4.93-1.41 1.41",
|
|
141
141
|
key: "1shlcs"
|
|
142
142
|
}]
|
|
143
|
-
]),
|
|
143
|
+
]), Z = E("x", [["path", {
|
|
144
144
|
d: "M18 6 6 18",
|
|
145
145
|
key: "1bl5f8"
|
|
146
146
|
}], ["path", {
|
|
147
147
|
d: "m6 6 12 12",
|
|
148
148
|
key: "d8bk6v"
|
|
149
|
-
}]]),
|
|
149
|
+
}]]), Ve = [
|
|
150
150
|
"height",
|
|
151
151
|
"width",
|
|
152
152
|
"viewBox"
|
|
153
|
-
],
|
|
153
|
+
], He = ["d"], Ue = ["d"], We = ["d"], Ge = /* @__PURE__ */ L({
|
|
154
154
|
__name: "TdBrandIcon",
|
|
155
155
|
props: { size: { default: 28 } },
|
|
156
156
|
setup(e) {
|
|
157
|
-
return (t, n) => (
|
|
157
|
+
return (t, n) => (H(), P("svg", {
|
|
158
158
|
fill: "none",
|
|
159
159
|
height: e.size,
|
|
160
160
|
width: e.size * 208 / 128,
|
|
161
|
-
viewBox:
|
|
161
|
+
viewBox: q(ce),
|
|
162
162
|
xmlns: "http://www.w3.org/2000/svg"
|
|
163
163
|
}, [
|
|
164
164
|
F("path", {
|
|
165
165
|
"clip-rule": "evenodd",
|
|
166
|
-
d:
|
|
166
|
+
d: q(ue),
|
|
167
167
|
"fill-rule": "evenodd",
|
|
168
168
|
fill: "currentColor"
|
|
169
|
-
}, null, 8,
|
|
169
|
+
}, null, 8, He),
|
|
170
170
|
F("path", {
|
|
171
|
-
d:
|
|
171
|
+
d: q(le),
|
|
172
172
|
fill: "currentColor"
|
|
173
|
-
}, null, 8,
|
|
173
|
+
}, null, 8, Ue),
|
|
174
174
|
F("path", {
|
|
175
|
-
d:
|
|
175
|
+
d: q(de),
|
|
176
176
|
fill: "currentColor"
|
|
177
|
-
}, null, 8,
|
|
178
|
-
], 8,
|
|
177
|
+
}, null, 8, We)
|
|
178
|
+
], 8, Ve));
|
|
179
179
|
}
|
|
180
|
-
}),
|
|
180
|
+
}), Ke = ["title", "aria-label"], qe = /* @__PURE__ */ L({
|
|
181
181
|
__name: "TdButton",
|
|
182
182
|
props: { label: {} },
|
|
183
183
|
setup(e) {
|
|
184
|
-
return (t, n) => (
|
|
184
|
+
return (t, n) => (H(), P("button", {
|
|
185
185
|
type: "button",
|
|
186
186
|
class: "inline-flex items-center justify-center cursor-pointer",
|
|
187
187
|
title: e.label,
|
|
188
188
|
"aria-label": e.label
|
|
189
|
-
}, [
|
|
189
|
+
}, [G(t.$slots, "default")], 8, Ke));
|
|
190
190
|
}
|
|
191
191
|
}), Je = /\$([^$]+)\$/g;
|
|
192
192
|
function Ye(e) {
|
|
@@ -212,7 +212,7 @@ var Xe = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
|
212
212
|
__name: "TdTooltip",
|
|
213
213
|
props: { text: {} },
|
|
214
214
|
setup(e) {
|
|
215
|
-
let t =
|
|
215
|
+
let t = Se("wrapper"), n = U(!1), r = U({
|
|
216
216
|
top: "0px",
|
|
217
217
|
left: "0px"
|
|
218
218
|
}), i;
|
|
@@ -236,21 +236,21 @@ var Xe = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
|
236
236
|
}
|
|
237
237
|
return ve(() => {
|
|
238
238
|
a();
|
|
239
|
-
}), (i, c) => (
|
|
239
|
+
}), (i, c) => (H(), P(A, null, [F("span", ge({
|
|
240
240
|
ref_key: "wrapper",
|
|
241
241
|
ref: t
|
|
242
242
|
}, i.$attrs, {
|
|
243
243
|
class: "td-tooltip-trigger",
|
|
244
244
|
onMouseenter: s,
|
|
245
245
|
onMouseleave: o
|
|
246
|
-
}), [
|
|
246
|
+
}), [G(i.$slots, "default", {}, void 0, !0)], 16), (H(), M(fe, { to: "body" }, [n.value ? (H(), P("span", {
|
|
247
247
|
key: 0,
|
|
248
248
|
class: "td-tooltip",
|
|
249
249
|
style: z(r.value),
|
|
250
250
|
role: "tooltip",
|
|
251
251
|
onMouseenter: a,
|
|
252
252
|
onMouseleave: o
|
|
253
|
-
},
|
|
253
|
+
}, K(e.text), 37)) : N("", !0)]))], 64));
|
|
254
254
|
}
|
|
255
255
|
}), [["__scopeId", "data-v-018d7f4b"]]), Ze = {
|
|
256
256
|
key: 0,
|
|
@@ -269,8 +269,8 @@ var Xe = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
|
269
269
|
function g(e) {
|
|
270
270
|
return e.items.length + e.children.reduce((e, t) => e + g(t), 0);
|
|
271
271
|
}
|
|
272
|
-
let _ =
|
|
273
|
-
|
|
272
|
+
let _ = U(!y(i, t.path)), v = U(!1), ee = j(() => v.value ? l : l.slice(0, st)), S = j(() => Math.max(0, l.length - st));
|
|
273
|
+
Y(() => t.path, (e) => {
|
|
274
274
|
y(i, e) && (_.value = !1);
|
|
275
275
|
});
|
|
276
276
|
function te() {
|
|
@@ -283,58 +283,58 @@ var Xe = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
|
283
283
|
_.value = !_.value;
|
|
284
284
|
}
|
|
285
285
|
return (t, a) => {
|
|
286
|
-
let s =
|
|
287
|
-
return
|
|
286
|
+
let s = be("TdTreeNode", !0);
|
|
287
|
+
return q(p) ? (H(), P("div", Ze, [F("div", Qe, [
|
|
288
288
|
F("button", {
|
|
289
289
|
type: "button",
|
|
290
290
|
class: "td-tree-toggle",
|
|
291
291
|
"aria-expanded": !_.value,
|
|
292
292
|
onClick: w
|
|
293
|
-
}, [I(
|
|
293
|
+
}, [I(q(De), {
|
|
294
294
|
size: 14,
|
|
295
295
|
class: R(["td-tree-caret", { "is-collapsed": _.value }])
|
|
296
|
-
}, null, 8, ["class"]), F("span", et,
|
|
296
|
+
}, null, 8, ["class"]), F("span", et, K(q(r)(e.node.name)), 1)], 8, $e),
|
|
297
297
|
F("a", {
|
|
298
|
-
href:
|
|
299
|
-
class: R(["td-tree-index-btn", { "is-active": C(
|
|
300
|
-
}, [C(
|
|
298
|
+
href: q(c),
|
|
299
|
+
class: R(["td-tree-index-btn", { "is-active": C(q(o)) }])
|
|
300
|
+
}, [C(q(o)) ? (H(), M(q(Me), {
|
|
301
301
|
key: 0,
|
|
302
302
|
size: 12
|
|
303
|
-
})) : (
|
|
303
|
+
})) : (H(), M(q(ae), {
|
|
304
304
|
key: 1,
|
|
305
305
|
size: 12
|
|
306
306
|
}))], 10, tt),
|
|
307
|
-
F("span", nt,
|
|
308
|
-
]), _.value ? N("", !0) : (
|
|
309
|
-
(
|
|
307
|
+
F("span", nt, K(h.value), 1)
|
|
308
|
+
]), _.value ? N("", !0) : (H(), P("div", rt, [
|
|
309
|
+
(H(!0), P(A, null, W(e.node.children, (e) => (H(), M(s, {
|
|
310
310
|
key: e.name,
|
|
311
311
|
node: e,
|
|
312
|
-
"url-prefix":
|
|
312
|
+
"url-prefix": q(i)
|
|
313
313
|
}, null, 8, ["node", "url-prefix"]))), 128)),
|
|
314
|
-
(
|
|
314
|
+
(H(!0), P(A, null, W(ee.value, (e) => (H(), P("a", {
|
|
315
315
|
key: e.filepath,
|
|
316
|
-
href:
|
|
317
|
-
class: R(["td-tree-link", { "is-active": C(
|
|
316
|
+
href: q(n)(q(b)(e.filepath)),
|
|
317
|
+
class: R(["td-tree-link", { "is-active": C(q(b)(e.filepath)) }])
|
|
318
318
|
}, [
|
|
319
|
-
I(
|
|
319
|
+
I(q(k), {
|
|
320
320
|
size: 14,
|
|
321
321
|
class: "td-tree-file-icon"
|
|
322
322
|
}),
|
|
323
323
|
I(Xe, {
|
|
324
324
|
class: "td-tree-link-text",
|
|
325
|
-
text:
|
|
325
|
+
text: q(m)(e.header, e.filepath)
|
|
326
326
|
}, {
|
|
327
|
-
default:
|
|
327
|
+
default: X(() => [F("span", { innerHTML: q(Ye)(q(m)(e.header, e.filepath)) }, null, 8, at)]),
|
|
328
328
|
_: 2
|
|
329
329
|
}, 1032, ["text"]),
|
|
330
|
-
F("span", ot,
|
|
330
|
+
F("span", ot, K(q(d)(e.metadata.mtime)), 1)
|
|
331
331
|
], 10, it))), 128)),
|
|
332
|
-
S.value > 0 && !v.value ? (
|
|
332
|
+
S.value > 0 && !v.value ? (H(), P("button", {
|
|
333
333
|
key: 0,
|
|
334
334
|
class: "td-tree-more",
|
|
335
335
|
type: "button",
|
|
336
336
|
onClick: te
|
|
337
|
-
},
|
|
337
|
+
}, K(S.value) + " more ", 1)) : N("", !0)
|
|
338
338
|
]))])) : N("", !0);
|
|
339
339
|
};
|
|
340
340
|
}
|
|
@@ -349,31 +349,31 @@ var Xe = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
|
349
349
|
function a(e) {
|
|
350
350
|
return t.path === e;
|
|
351
351
|
}
|
|
352
|
-
return (t, o) => (
|
|
352
|
+
return (t, o) => (H(), P("nav", null, [
|
|
353
353
|
F("a", {
|
|
354
|
-
href:
|
|
355
|
-
class: R(["td-root-link", { "is-active": a(
|
|
354
|
+
href: q(n)(q(r) ? q(b)(q(r).filepath) : q(s)("/")),
|
|
355
|
+
class: R(["td-root-link", { "is-active": a(q(r) ? q(b)(q(r).filepath) : q(s)("/")) }])
|
|
356
356
|
}, [
|
|
357
|
-
I(
|
|
357
|
+
I(q(Ne), {
|
|
358
358
|
size: 14,
|
|
359
359
|
class: "td-root-link-icon"
|
|
360
360
|
}),
|
|
361
361
|
o[0] ||= F("span", { class: "td-root-link-text" }, "Overview", -1),
|
|
362
|
-
|
|
362
|
+
q(r) ? (H(), P("span", ut, K(q(d)(q(r).metadata.mtime)), 1)) : N("", !0)
|
|
363
363
|
], 10, lt),
|
|
364
|
-
(
|
|
364
|
+
(H(!0), P(A, null, W(q(i), (e) => (H(), P("a", {
|
|
365
365
|
key: e.filepath,
|
|
366
|
-
href:
|
|
367
|
-
class: R(["td-root-link", { "is-active": a(
|
|
366
|
+
href: q(n)(q(b)(e.filepath)),
|
|
367
|
+
class: R(["td-root-link", { "is-active": a(q(b)(e.filepath)) }])
|
|
368
368
|
}, [
|
|
369
|
-
I(
|
|
369
|
+
I(q(k), {
|
|
370
370
|
size: 14,
|
|
371
371
|
class: "td-root-link-icon"
|
|
372
372
|
}),
|
|
373
|
-
F("span", ft,
|
|
374
|
-
F("span", pt,
|
|
373
|
+
F("span", ft, K(q(m)(e.header, e.filepath)), 1),
|
|
374
|
+
F("span", pt, K(q(d)(e.metadata.mtime)), 1)
|
|
375
375
|
], 10, dt))), 128)),
|
|
376
|
-
(
|
|
376
|
+
(H(!0), P(A, null, W(e.tree.children, (e) => (H(), M(ct, {
|
|
377
377
|
key: e.name,
|
|
378
378
|
node: e
|
|
379
379
|
}, null, 8, ["node"]))), 128))
|
|
@@ -394,21 +394,21 @@ var Xe = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
|
394
394
|
},
|
|
395
395
|
emits: ["update:open"],
|
|
396
396
|
setup(e) {
|
|
397
|
-
let t =
|
|
397
|
+
let t = J(e, "open"), n = Se("wrapper");
|
|
398
398
|
function r(e) {
|
|
399
399
|
n.value?.contains(e.target) || (t.value = !1);
|
|
400
400
|
}
|
|
401
401
|
function i() {
|
|
402
402
|
t.value = !t.value;
|
|
403
403
|
}
|
|
404
|
-
return
|
|
404
|
+
return Y(t, (e) => {
|
|
405
405
|
typeof document > "u" || (e ? document.addEventListener("click", r) : document.removeEventListener("click", r));
|
|
406
|
-
}),
|
|
406
|
+
}), V(() => {
|
|
407
407
|
typeof document > "u" || document.removeEventListener("click", r);
|
|
408
|
-
}), (e, r) => (
|
|
408
|
+
}), (e, r) => (H(), P("span", ge({
|
|
409
409
|
ref_key: "wrapper",
|
|
410
410
|
ref: n
|
|
411
|
-
}, e.$attrs, { class: "td-dropdown" }), [F("span", { onClick: i }, [
|
|
411
|
+
}, e.$attrs, { class: "td-dropdown" }), [F("span", { onClick: i }, [G(e.$slots, "trigger", {}, void 0, !0)]), t.value ? (H(), P("div", ht, [G(e.$slots, "default", {}, void 0, !0)])) : N("", !0)], 16));
|
|
412
412
|
}
|
|
413
413
|
}), [["__scopeId", "data-v-d71f3c74"]]), _t = {
|
|
414
414
|
class: "td-breadcrumb",
|
|
@@ -425,7 +425,7 @@ var Xe = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
|
425
425
|
}, Tt = 3, Et = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
426
426
|
__name: "TdBreadcrumb",
|
|
427
427
|
setup(e) {
|
|
428
|
-
let t = O(), { withBase: i } = D(), a =
|
|
428
|
+
let t = O(), { withBase: i } = D(), a = U(!1), o = j(() => {
|
|
429
429
|
let e = n(t.path), a = [{
|
|
430
430
|
name: "Home",
|
|
431
431
|
href: i(s("/"))
|
|
@@ -441,12 +441,12 @@ var Xe = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
|
441
441
|
}
|
|
442
442
|
return a;
|
|
443
443
|
}), l = j(() => Tt < o.value.length), u = j(() => o.value.slice(1, -2));
|
|
444
|
-
return
|
|
444
|
+
return Y(() => t.path, () => {
|
|
445
445
|
a.value = !1;
|
|
446
|
-
}), (e, t) => (
|
|
446
|
+
}), (e, t) => (H(), P("nav", _t, [F("a", {
|
|
447
447
|
href: o.value[0].href,
|
|
448
448
|
class: "td-breadcrumb-link td-breadcrumb-home"
|
|
449
|
-
},
|
|
449
|
+
}, K(o.value[0].name), 9, vt), l.value ? (H(), P(A, { key: 0 }, [
|
|
450
450
|
t[2] ||= F("span", {
|
|
451
451
|
class: "td-breadcrumb-sep",
|
|
452
452
|
"aria-hidden": "true"
|
|
@@ -455,40 +455,40 @@ var Xe = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
|
455
455
|
open: a.value,
|
|
456
456
|
"onUpdate:open": t[0] ||= (e) => a.value = e
|
|
457
457
|
}, {
|
|
458
|
-
trigger:
|
|
459
|
-
default:
|
|
458
|
+
trigger: X(() => [F("button", yt, [I(q(Ae), { size: 14 })])]),
|
|
459
|
+
default: X(() => [(H(!0), P(A, null, W(u.value, (e) => (H(), P("a", {
|
|
460
460
|
key: e.href,
|
|
461
461
|
href: e.href,
|
|
462
462
|
class: "td-breadcrumb-dropdown-item"
|
|
463
|
-
},
|
|
463
|
+
}, K(e.name), 9, bt))), 128))]),
|
|
464
464
|
_: 1
|
|
465
465
|
}, 8, ["open"]),
|
|
466
|
-
(
|
|
466
|
+
(H(!0), P(A, null, W(o.value.slice(-2), (e) => (H(), P(A, { key: e.href }, [t[1] ||= F("span", {
|
|
467
467
|
class: "td-breadcrumb-sep",
|
|
468
468
|
"aria-hidden": "true"
|
|
469
|
-
}, "/", -1), e === o.value[o.value.length - 1] ? (
|
|
469
|
+
}, "/", -1), e === o.value[o.value.length - 1] ? (H(), P("span", St, K(e.name), 1)) : (H(), P("a", {
|
|
470
470
|
key: 0,
|
|
471
471
|
href: e.href,
|
|
472
472
|
class: "td-breadcrumb-link"
|
|
473
|
-
},
|
|
474
|
-
], 64)) : (
|
|
473
|
+
}, K(e.name), 9, xt))], 64))), 128))
|
|
474
|
+
], 64)) : (H(!0), P(A, { key: 1 }, W(o.value.slice(1), (e, n) => (H(), P(A, { key: e.href }, [t[3] ||= F("span", {
|
|
475
475
|
class: "td-breadcrumb-sep",
|
|
476
476
|
"aria-hidden": "true"
|
|
477
|
-
}, "/", -1), n < o.value.length - 2 ? (
|
|
477
|
+
}, "/", -1), n < o.value.length - 2 ? (H(), P("a", {
|
|
478
478
|
key: 0,
|
|
479
479
|
href: e.href,
|
|
480
480
|
class: "td-breadcrumb-link"
|
|
481
|
-
},
|
|
481
|
+
}, K(e.name), 9, Ct)) : (H(), P("span", wt, K(e.name), 1))], 64))), 128))]));
|
|
482
482
|
}
|
|
483
483
|
}), [["__scopeId", "data-v-948f69fb"]]), Dt = { class: "td-widget-checkbox" }, Ot = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
484
484
|
__name: "TdWidgetCheckbox",
|
|
485
485
|
props: { value: {} },
|
|
486
486
|
setup(e) {
|
|
487
|
-
return (t, n) => (
|
|
487
|
+
return (t, n) => (H(), P("span", Dt, [e.value ? (H(), M(q(Re), {
|
|
488
488
|
key: 0,
|
|
489
489
|
size: 16,
|
|
490
490
|
class: "td-widget-checkbox-icon is-checked"
|
|
491
|
-
})) : (
|
|
491
|
+
})) : (H(), M(q(ze), {
|
|
492
492
|
key: 1,
|
|
493
493
|
size: 16,
|
|
494
494
|
class: "td-widget-checkbox-icon"
|
|
@@ -546,29 +546,29 @@ var jt = {
|
|
|
546
546
|
props: { value: {} },
|
|
547
547
|
setup(e) {
|
|
548
548
|
let { withBase: t } = D(), n = Q(e.value);
|
|
549
|
-
return (r, i) =>
|
|
549
|
+
return (r, i) => q(n) ? (H(), P("span", jt, [q(n).isImage ? (H(), P("a", {
|
|
550
550
|
key: 0,
|
|
551
|
-
href:
|
|
551
|
+
href: q(t)(q(n).url),
|
|
552
552
|
target: "_blank",
|
|
553
553
|
rel: "noopener noreferrer",
|
|
554
554
|
class: "td-widget-image-preview",
|
|
555
|
-
title:
|
|
555
|
+
title: q(n).name
|
|
556
556
|
}, [F("img", {
|
|
557
|
-
src:
|
|
558
|
-
alt:
|
|
557
|
+
src: q(t)(q(n).url),
|
|
558
|
+
alt: q(n).name,
|
|
559
559
|
class: "td-widget-image-img",
|
|
560
560
|
loading: "lazy"
|
|
561
|
-
}, null, 8, Nt)], 8, Mt)) :
|
|
561
|
+
}, null, 8, Nt)], 8, Mt)) : q(n).format || q(n).url.includes(".") ? (H(), P("a", {
|
|
562
562
|
key: 1,
|
|
563
|
-
href:
|
|
563
|
+
href: q(t)(q(n).url),
|
|
564
564
|
target: "_blank",
|
|
565
565
|
rel: "noopener noreferrer",
|
|
566
566
|
class: "td-widget-file-link"
|
|
567
|
-
}, [I(
|
|
567
|
+
}, [I(q(je), { class: "td-widget-file-icon" }), F("span", Ft, K(q(n).name), 1)], 8, Pt)) : (H(), P("a", {
|
|
568
568
|
key: 2,
|
|
569
|
-
href:
|
|
569
|
+
href: q(t)(q(n).url),
|
|
570
570
|
class: "td-widget-ref"
|
|
571
|
-
},
|
|
571
|
+
}, K(q(n).name), 9, It))])) : (H(), P("span", Lt, K(e.value), 1));
|
|
572
572
|
}
|
|
573
573
|
}), [["__scopeId", "data-v-876b5225"]]), zt = { key: 0 }, Bt = { class: "td-widget-list" }, Vt = { key: 1 }, Ht = { class: "td-widget-list" }, Ut = 5, Wt = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
574
574
|
__name: "TdWidgetList",
|
|
@@ -577,27 +577,27 @@ var jt = {
|
|
|
577
577
|
value: {}
|
|
578
578
|
},
|
|
579
579
|
setup(e) {
|
|
580
|
-
let t =
|
|
580
|
+
let t = U(!1), n = Array.isArray(e.value) ? e.value : [], r = e.definition.items?.widget === "relation", i = r ? n.map((e) => Q(e)).filter((e) => e !== void 0) : [], a = r ? Math.max(0, i.length - Ut) : Math.max(0, n.length - Ut);
|
|
581
581
|
function o() {
|
|
582
582
|
t.value = !t.value;
|
|
583
583
|
}
|
|
584
584
|
function s(e) {
|
|
585
585
|
return t.value ? e : e.slice(0, Ut);
|
|
586
586
|
}
|
|
587
|
-
return (e, c) => r ? (
|
|
587
|
+
return (e, c) => r ? (H(), P("div", zt, [F("ul", Bt, [(H(!0), P(A, null, W(s(q(i)), (e, t) => (H(), P("li", { key: t }, [I(Rt, { value: { $ref: e } }, null, 8, ["value"])]))), 128))]), q(a) > 0 ? (H(), P("button", {
|
|
588
588
|
key: 0,
|
|
589
589
|
class: "td-widget-more",
|
|
590
590
|
type: "button",
|
|
591
591
|
onClick: o
|
|
592
|
-
},
|
|
592
|
+
}, K(t.value ? "show less" : `+${q(a)} more`), 1)) : N("", !0)])) : (H(), P("div", Vt, [F("ul", Ht, [(H(!0), P(A, null, W(s(q(n)), (e, t) => (H(), P("li", { key: t }, [q(Q)(e) ? (H(), M(Rt, {
|
|
593
593
|
key: 0,
|
|
594
594
|
value: e
|
|
595
|
-
}, null, 8, ["value"])) : (
|
|
595
|
+
}, null, 8, ["value"])) : (H(), P(A, { key: 1 }, [pe(K(e), 1)], 64))]))), 128))]), q(a) > 0 ? (H(), P("button", {
|
|
596
596
|
key: 0,
|
|
597
597
|
class: "td-widget-more",
|
|
598
598
|
type: "button",
|
|
599
599
|
onClick: o
|
|
600
|
-
},
|
|
600
|
+
}, K(t.value ? "show less" : `+${q(a)} more`), 1)) : N("", !0)]));
|
|
601
601
|
}
|
|
602
602
|
}), [["__scopeId", "data-v-dbe9921b"]]), Gt = [
|
|
603
603
|
{
|
|
@@ -651,29 +651,29 @@ var Jt = 5, Yt = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
|
651
651
|
__name: "TdWidgetMultiSelect",
|
|
652
652
|
props: { value: {} },
|
|
653
653
|
setup(e) {
|
|
654
|
-
let t =
|
|
654
|
+
let t = U(!1), n = Array.isArray(e.value) ? e.value : [], r = () => t.value ? n : n.slice(0, Jt), i = Math.max(0, n.length - Jt);
|
|
655
655
|
function a() {
|
|
656
656
|
t.value = !t.value;
|
|
657
657
|
}
|
|
658
|
-
return (e, n) => (
|
|
658
|
+
return (e, n) => (H(), P(A, null, [(H(!0), P(A, null, W(r(), (e, t) => (H(), P("span", {
|
|
659
659
|
key: t,
|
|
660
660
|
class: "td-widget-pill",
|
|
661
|
-
style: z(
|
|
662
|
-
},
|
|
661
|
+
style: z(q(Kt)(e))
|
|
662
|
+
}, K(e), 5))), 128)), q(i) > 0 ? (H(), P("button", {
|
|
663
663
|
key: 0,
|
|
664
664
|
class: "td-widget-more",
|
|
665
665
|
type: "button",
|
|
666
666
|
onClick: a
|
|
667
|
-
},
|
|
667
|
+
}, K(t.value ? "show less" : `+${q(i)} more`), 1)) : N("", !0)], 64));
|
|
668
668
|
}
|
|
669
669
|
}), [["__scopeId", "data-v-33269637"]]), Xt = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
670
670
|
__name: "TdWidgetSelect",
|
|
671
671
|
props: { value: {} },
|
|
672
672
|
setup(e) {
|
|
673
|
-
return (t, n) => (
|
|
673
|
+
return (t, n) => (H(), P("span", {
|
|
674
674
|
class: "td-widget-pill",
|
|
675
|
-
style: z(
|
|
676
|
-
},
|
|
675
|
+
style: z(q(Kt)(e.value))
|
|
676
|
+
}, K(e.value), 5));
|
|
677
677
|
}
|
|
678
678
|
}), [["__scopeId", "data-v-7dea5e20"]]), Zt = ["href", "title"], Qt = ["src", "alt"], $t = ["href"], en = { class: "td-widget-file-name" }, tn = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
679
679
|
__name: "TdWidgetText",
|
|
@@ -686,25 +686,25 @@ var Jt = 5, Yt = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
|
686
686
|
function s(t) {
|
|
687
687
|
return t == null ? "" : e.definition.widget === "date" ? h(String(t)) : String(t);
|
|
688
688
|
}
|
|
689
|
-
return (t, c) =>
|
|
689
|
+
return (t, c) => q(i) ? (H(), P("a", {
|
|
690
690
|
key: 0,
|
|
691
|
-
href:
|
|
691
|
+
href: q(a),
|
|
692
692
|
target: "_blank",
|
|
693
693
|
rel: "noopener noreferrer",
|
|
694
694
|
class: "td-widget-image-preview",
|
|
695
|
-
title:
|
|
695
|
+
title: q(r) ? q(r).name : q(n)
|
|
696
696
|
}, [F("img", {
|
|
697
|
-
src:
|
|
698
|
-
alt:
|
|
697
|
+
src: q(a),
|
|
698
|
+
alt: q(r) ? q(r).name : q(n),
|
|
699
699
|
class: "td-widget-image-img",
|
|
700
700
|
loading: "lazy"
|
|
701
|
-
}, null, 8, Qt)], 8, Zt)) : o.value ? (
|
|
701
|
+
}, null, 8, Qt)], 8, Zt)) : o.value ? (H(), P("a", {
|
|
702
702
|
key: 1,
|
|
703
|
-
href:
|
|
703
|
+
href: q(a),
|
|
704
704
|
target: "_blank",
|
|
705
705
|
rel: "noopener noreferrer",
|
|
706
706
|
class: "td-widget-file-link"
|
|
707
|
-
}, [I(
|
|
707
|
+
}, [I(q(je), { class: "td-widget-file-icon" }), F("span", en, K(q(n).split("/").pop() ?? q(n)), 1)], 8, $t)) : (H(), P(A, { key: 2 }, [pe(K(s(e.value)), 1)], 64));
|
|
708
708
|
}
|
|
709
709
|
}), [["__scopeId", "data-v-fd07e395"]]), nn = {
|
|
710
710
|
key: 0,
|
|
@@ -716,23 +716,23 @@ var Jt = 5, Yt = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
|
716
716
|
value: {}
|
|
717
717
|
},
|
|
718
718
|
setup(e) {
|
|
719
|
-
return (t, n) => e.value === void 0 || e.value === null ? (
|
|
719
|
+
return (t, n) => e.value === void 0 || e.value === null ? (H(), P("span", nn, "Empty")) : e.definition.widget === "checkbox" ? (H(), M(Ot, {
|
|
720
720
|
key: 1,
|
|
721
721
|
value: e.value
|
|
722
|
-
}, null, 8, ["value"])) : e.definition.widget === "select" ? (
|
|
722
|
+
}, null, 8, ["value"])) : e.definition.widget === "select" ? (H(), M(Xt, {
|
|
723
723
|
key: 2,
|
|
724
724
|
value: e.value
|
|
725
|
-
}, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (
|
|
725
|
+
}, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (H(), M(Yt, {
|
|
726
726
|
key: 3,
|
|
727
727
|
value: e.value
|
|
728
|
-
}, null, 8, ["value"])) :
|
|
728
|
+
}, null, 8, ["value"])) : q(Q)(e.value) || e.definition.widget === "relation" ? (H(), M(Rt, {
|
|
729
729
|
key: 4,
|
|
730
730
|
value: e.value
|
|
731
|
-
}, null, 8, ["value"])) : Array.isArray(e.value) || e.definition.widget === "list" ? (
|
|
731
|
+
}, null, 8, ["value"])) : Array.isArray(e.value) || e.definition.widget === "list" ? (H(), M(Wt, {
|
|
732
732
|
key: 5,
|
|
733
733
|
definition: e.definition,
|
|
734
734
|
value: e.value
|
|
735
|
-
}, null, 8, ["definition", "value"])) : (
|
|
735
|
+
}, null, 8, ["definition", "value"])) : (H(), M(tn, {
|
|
736
736
|
key: 6,
|
|
737
737
|
definition: e.definition,
|
|
738
738
|
value: e.value
|
|
@@ -762,15 +762,15 @@ var Jt = 5, Yt = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
|
762
762
|
}
|
|
763
763
|
return r;
|
|
764
764
|
});
|
|
765
|
-
return (t, n) => i.value.length > 0 ? (
|
|
765
|
+
return (t, n) => i.value.length > 0 ? (H(), P("div", an, [(H(!0), P(A, null, W(i.value, ([t, n]) => (H(), P("div", {
|
|
766
766
|
key: t,
|
|
767
767
|
class: "td-frontmatter-row"
|
|
768
|
-
}, [F("span", on,
|
|
768
|
+
}, [F("span", on, K(q(r)(t)), 1), F("span", sn, [I(rn, {
|
|
769
769
|
definition: n,
|
|
770
770
|
value: e.frontmatter[t]
|
|
771
771
|
}, null, 8, ["definition", "value"])])]))), 128))])) : N("", !0);
|
|
772
772
|
}
|
|
773
|
-
}), [["__scopeId", "data-v-3b6a0d40"]]), $ =
|
|
773
|
+
}), [["__scopeId", "data-v-3b6a0d40"]]), $ = U(!1);
|
|
774
774
|
function ln() {
|
|
775
775
|
function e() {
|
|
776
776
|
$.value = !$.value;
|
|
@@ -779,7 +779,7 @@ function ln() {
|
|
|
779
779
|
$.value = !1;
|
|
780
780
|
}
|
|
781
781
|
return {
|
|
782
|
-
isOpen:
|
|
782
|
+
isOpen: ye($),
|
|
783
783
|
toggle: e,
|
|
784
784
|
close: t
|
|
785
785
|
};
|
|
@@ -790,17 +790,17 @@ var un = /* @__PURE__ */ L({
|
|
|
790
790
|
__name: "TdMenuButton",
|
|
791
791
|
setup(e) {
|
|
792
792
|
let { isOpen: t, toggle: n } = ln();
|
|
793
|
-
return (e, r) => (
|
|
793
|
+
return (e, r) => (H(), M(qe, {
|
|
794
794
|
class: "td-menu-button w-9 h-9 text-td-neutral-fg-muted group",
|
|
795
|
-
label:
|
|
796
|
-
"aria-expanded":
|
|
797
|
-
onClick:
|
|
795
|
+
label: q(t) ? "Close menu" : "Open menu",
|
|
796
|
+
"aria-expanded": q(t),
|
|
797
|
+
onClick: q(n)
|
|
798
798
|
}, {
|
|
799
|
-
default:
|
|
799
|
+
default: X(() => [q(t) ? (H(), M(q(Z), {
|
|
800
800
|
key: 0,
|
|
801
801
|
size: 20,
|
|
802
802
|
class: "group-hover:text-td-primary-solid transition-colors"
|
|
803
|
-
})) : (
|
|
803
|
+
})) : (H(), M(q(Fe), {
|
|
804
804
|
key: 1,
|
|
805
805
|
size: 20,
|
|
806
806
|
class: "group-hover:text-td-primary-solid transition-colors"
|
|
@@ -873,21 +873,21 @@ var hn = {
|
|
|
873
873
|
__name: "TdPreviousNext",
|
|
874
874
|
setup(e) {
|
|
875
875
|
let { previous: t, next: n } = dn();
|
|
876
|
-
return (e, r) =>
|
|
876
|
+
return (e, r) => q(t) || q(n) ? (H(), P("nav", hn, [q(t) ? (H(), P("a", {
|
|
877
877
|
key: 0,
|
|
878
|
-
href:
|
|
878
|
+
href: q(t).url,
|
|
879
879
|
class: "td-previous-next-link is-previous"
|
|
880
|
-
}, [I(
|
|
880
|
+
}, [I(q(ke), {
|
|
881
881
|
size: 16,
|
|
882
882
|
class: "td-previous-next-icon"
|
|
883
|
-
}), F("span", _n, [r[0] ||= F("span", { class: "td-previous-next-label" }, "Previous", -1), F("span", vn,
|
|
883
|
+
}), F("span", _n, [r[0] ||= F("span", { class: "td-previous-next-label" }, "Previous", -1), F("span", vn, K(q(t).title), 1)])], 8, gn)) : (H(), P("span", yn)), q(n) ? (H(), P("a", {
|
|
884
884
|
key: 2,
|
|
885
|
-
href:
|
|
885
|
+
href: q(n).url,
|
|
886
886
|
class: "td-previous-next-link is-next"
|
|
887
|
-
}, [F("span", xn, [r[1] ||= F("span", { class: "td-previous-next-label" }, "Next", -1), F("span", Sn,
|
|
887
|
+
}, [F("span", xn, [r[1] ||= F("span", { class: "td-previous-next-label" }, "Next", -1), F("span", Sn, K(q(n).title), 1)]), I(q(Oe), {
|
|
888
888
|
size: 16,
|
|
889
889
|
class: "td-previous-next-icon"
|
|
890
|
-
})], 8, bn)) : (
|
|
890
|
+
})], 8, bn)) : (H(), P("span", Cn))])) : N("", !0);
|
|
891
891
|
}
|
|
892
892
|
}), [["__scopeId", "data-v-4439d186"]]), Tn = { class: "td-search" }, En = { class: "td-search-input-wrap" }, Dn = {
|
|
893
893
|
key: 1,
|
|
@@ -911,7 +911,7 @@ var hn = {
|
|
|
911
911
|
},
|
|
912
912
|
emits: /*@__PURE__*/ he(["select"], ["update:active", "update:query"]),
|
|
913
913
|
setup(t, { emit: n }) {
|
|
914
|
-
let i =
|
|
914
|
+
let i = J(t, "active"), s = J(t, "query"), c = n, u = xe([]), d = U(!1), f = U(-1), p = j(() => 0 < s.value.trim().length), m = j(() => {
|
|
915
915
|
let e = [], t = /* @__PURE__ */ new Map();
|
|
916
916
|
for (let n of u.value) {
|
|
917
917
|
let i = a(n.id), o = t.get(i);
|
|
@@ -923,11 +923,11 @@ var hn = {
|
|
|
923
923
|
}
|
|
924
924
|
return e;
|
|
925
925
|
});
|
|
926
|
-
|
|
926
|
+
Y(p, (e) => {
|
|
927
927
|
i.value = e;
|
|
928
928
|
});
|
|
929
929
|
let h = oe(), _ = re(), y;
|
|
930
|
-
|
|
930
|
+
Y(h, () => {
|
|
931
931
|
y = void 0;
|
|
932
932
|
});
|
|
933
933
|
function b() {
|
|
@@ -938,7 +938,7 @@ var hn = {
|
|
|
938
938
|
})), y;
|
|
939
939
|
}
|
|
940
940
|
let x = !1, S = ee((e) => ae(e), 150);
|
|
941
|
-
|
|
941
|
+
Y(s, (e, t, n) => {
|
|
942
942
|
n(() => {
|
|
943
943
|
x = !0;
|
|
944
944
|
}), x = !1;
|
|
@@ -1032,37 +1032,37 @@ var hn = {
|
|
|
1032
1032
|
x || (d.value = !1);
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
|
-
return (e, t) => (
|
|
1035
|
+
return (e, t) => (H(), P("div", Tn, [
|
|
1036
1036
|
F("div", En, [
|
|
1037
|
-
I(
|
|
1037
|
+
I(q(Le), {
|
|
1038
1038
|
size: 14,
|
|
1039
1039
|
class: "td-search-icon"
|
|
1040
1040
|
}),
|
|
1041
|
-
|
|
1041
|
+
Te(F("input", {
|
|
1042
1042
|
"onUpdate:modelValue": t[0] ||= (e) => s.value = e,
|
|
1043
1043
|
class: "td-search-input",
|
|
1044
1044
|
type: "text",
|
|
1045
1045
|
size: "1",
|
|
1046
1046
|
placeholder: "Search...",
|
|
1047
1047
|
onKeydown: k
|
|
1048
|
-
}, null, 544), [[
|
|
1049
|
-
d.value ? (
|
|
1048
|
+
}, null, 544), [[Ce, s.value]]),
|
|
1049
|
+
d.value ? (H(), M(q(Pe), {
|
|
1050
1050
|
key: 0,
|
|
1051
1051
|
size: 12,
|
|
1052
1052
|
class: "td-search-spinner"
|
|
1053
|
-
})) : p.value ? (
|
|
1054
|
-
s.value ? (
|
|
1053
|
+
})) : p.value ? (H(), P("span", Dn, K(u.value.length), 1)) : N("", !0),
|
|
1054
|
+
s.value ? (H(), P("button", {
|
|
1055
1055
|
key: 2,
|
|
1056
1056
|
class: "td-search-clear",
|
|
1057
1057
|
type: "button",
|
|
1058
1058
|
"aria-label": "Clear search",
|
|
1059
1059
|
onClick: C
|
|
1060
|
-
}, [I(
|
|
1060
|
+
}, [I(q(Z), { size: 12 })])) : N("", !0)
|
|
1061
1061
|
]),
|
|
1062
|
-
p.value && u.value.length > 0 ? (
|
|
1062
|
+
p.value && u.value.length > 0 ? (H(), P("div", On, [(H(!0), P(A, null, W(m.value, (e) => (H(), P("div", {
|
|
1063
1063
|
key: e.pageUrl,
|
|
1064
1064
|
class: "td-search-group"
|
|
1065
|
-
}, [F("div", kn,
|
|
1065
|
+
}, [F("div", kn, K(e.pageTitle), 1), (H(!0), P(A, null, W(e.results, (e) => (H(), P("a", {
|
|
1066
1066
|
key: e.id,
|
|
1067
1067
|
href: e.id,
|
|
1068
1068
|
class: R(["td-search-result", { "is-selected": D.value.get(e.id) === f.value }]),
|
|
@@ -1070,28 +1070,28 @@ var hn = {
|
|
|
1070
1070
|
}, [F("span", {
|
|
1071
1071
|
class: "td-search-result-title",
|
|
1072
1072
|
innerHTML: O(e.title, s.value)
|
|
1073
|
-
}, null, 8, jn), e.excerpt ? (
|
|
1073
|
+
}, null, 8, jn), e.excerpt ? (H(), P("span", {
|
|
1074
1074
|
key: 0,
|
|
1075
1075
|
class: "td-search-result-excerpt",
|
|
1076
1076
|
innerHTML: O(e.excerpt, s.value)
|
|
1077
1077
|
}, null, 8, Mn)) : N("", !0)], 10, An))), 128))]))), 128))])) : N("", !0),
|
|
1078
|
-
p.value && u.value.length === 0 ? (
|
|
1078
|
+
p.value && u.value.length === 0 ? (H(), P("div", Nn, " No results for \"" + K(s.value) + "\" ", 1)) : N("", !0)
|
|
1079
1079
|
]));
|
|
1080
1080
|
}
|
|
1081
1081
|
}), [["__scopeId", "data-v-dc5caa87"]]), In = /* @__PURE__ */ L({
|
|
1082
1082
|
__name: "TdThemeToggle",
|
|
1083
1083
|
setup(e) {
|
|
1084
1084
|
let { isDark: t, toggle: n } = se();
|
|
1085
|
-
return (e, r) => (
|
|
1085
|
+
return (e, r) => (H(), M(qe, {
|
|
1086
1086
|
class: "w-9 h-9 text-td-neutral-fg-muted group hover:opacity-70",
|
|
1087
|
-
label:
|
|
1088
|
-
onClick:
|
|
1087
|
+
label: q(t) ? "Switch to light mode" : "Switch to dark mode",
|
|
1088
|
+
onClick: q(n)
|
|
1089
1089
|
}, {
|
|
1090
|
-
default:
|
|
1090
|
+
default: X(() => [q(t) ? (H(), M(q(Be), {
|
|
1091
1091
|
key: 0,
|
|
1092
1092
|
size: 18,
|
|
1093
1093
|
class: "group-hover:text-td-primary-solid transition-colors"
|
|
1094
|
-
})) : (
|
|
1094
|
+
})) : (H(), M(q(Ie), {
|
|
1095
1095
|
key: 1,
|
|
1096
1096
|
size: 18,
|
|
1097
1097
|
class: "group-hover:text-td-primary-solid transition-colors"
|
|
@@ -1114,9 +1114,9 @@ function Ln() {
|
|
|
1114
1114
|
t.classList.remove("copied"), t.setAttribute("title", i);
|
|
1115
1115
|
}, 2e3);
|
|
1116
1116
|
}
|
|
1117
|
-
|
|
1117
|
+
B(() => {
|
|
1118
1118
|
document.addEventListener("click", e);
|
|
1119
|
-
}),
|
|
1119
|
+
}), V(() => {
|
|
1120
1120
|
document.removeEventListener("click", e);
|
|
1121
1121
|
});
|
|
1122
1122
|
}
|
|
@@ -1153,55 +1153,62 @@ function Bn() {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
document.addEventListener("pointermove", o), document.addEventListener("pointerup", s);
|
|
1155
1155
|
}
|
|
1156
|
-
|
|
1156
|
+
B(() => {
|
|
1157
1157
|
document.addEventListener("pointermove", r), document.addEventListener("pointerdown", i);
|
|
1158
|
-
}),
|
|
1158
|
+
}), V(() => {
|
|
1159
1159
|
document.removeEventListener("pointermove", r), document.removeEventListener("pointerdown", i);
|
|
1160
1160
|
});
|
|
1161
1161
|
}
|
|
1162
1162
|
//#endregion
|
|
1163
1163
|
//#region src/client/theme-default/composables/useActiveTocHeading.ts
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
n
|
|
1169
|
-
let e =
|
|
1170
|
-
if (
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
t.value = e.target.id;
|
|
1174
|
-
return;
|
|
1175
|
-
}
|
|
1176
|
-
let r = window.scrollY;
|
|
1177
|
-
for (let n = e.length - 1; 0 <= n; n--) if (e[n].offsetTop <= r + 100) {
|
|
1178
|
-
t.value = e[n].id;
|
|
1179
|
-
return;
|
|
1180
|
-
}
|
|
1181
|
-
}, {
|
|
1182
|
-
rootMargin: "-64px 0px -70% 0px",
|
|
1183
|
-
threshold: 0
|
|
1184
|
-
});
|
|
1185
|
-
for (let t of e) n.observe(t);
|
|
1164
|
+
var Vn = 100;
|
|
1165
|
+
function Hn(e) {
|
|
1166
|
+
let t = U(void 0), n = [], r;
|
|
1167
|
+
function i() {
|
|
1168
|
+
if (n.length === 0) return;
|
|
1169
|
+
let e = window.scrollY;
|
|
1170
|
+
if (document.body.offsetHeight <= e + window.innerHeight) {
|
|
1171
|
+
t.value = n.at(-1).id;
|
|
1172
|
+
return;
|
|
1186
1173
|
}
|
|
1174
|
+
let r;
|
|
1175
|
+
for (let t of n) if (Un(t) <= e + Vn) r = t.id;
|
|
1176
|
+
else break;
|
|
1177
|
+
t.value = r;
|
|
1178
|
+
}
|
|
1179
|
+
function a() {
|
|
1180
|
+
r !== void 0 && cancelAnimationFrame(r), r = requestAnimationFrame(i);
|
|
1181
|
+
}
|
|
1182
|
+
function o(e) {
|
|
1183
|
+
if (typeof document > "u") return;
|
|
1184
|
+
t.value = void 0;
|
|
1185
|
+
let r = new Set(e.map((e) => e.slug));
|
|
1186
|
+
n = Array.from(document.querySelectorAll(".td-content h2[id], .td-content h3[id], .td-content h4[id], .td-content h5[id]")).filter((e) => r.has(e.id)), i();
|
|
1187
1187
|
}
|
|
1188
|
-
return
|
|
1189
|
-
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
}),
|
|
1188
|
+
return B(() => {
|
|
1189
|
+
window.addEventListener("scroll", a);
|
|
1190
|
+
}), V(() => {
|
|
1191
|
+
window.removeEventListener("scroll", a), r !== void 0 && cancelAnimationFrame(r);
|
|
1192
|
+
}), Y(e, (e) => {
|
|
1193
|
+
typeof window > "u" || _e(() => o(e));
|
|
1194
|
+
}, { immediate: !0 }), t;
|
|
1195
|
+
}
|
|
1196
|
+
function Un(e) {
|
|
1197
|
+
let t = 0, n = e;
|
|
1198
|
+
for (; n;) t += n.offsetTop, n = n.offsetParent;
|
|
1199
|
+
return t;
|
|
1193
1200
|
}
|
|
1194
1201
|
//#endregion
|
|
1195
1202
|
//#region src/client/theme-default/components/TdToc.vue?vue&type=script&setup=true&lang.ts
|
|
1196
|
-
var
|
|
1203
|
+
var Wn = {
|
|
1197
1204
|
key: 0,
|
|
1198
1205
|
class: "td-toc"
|
|
1199
|
-
},
|
|
1206
|
+
}, Gn = { class: "td-toc-list" }, Kn = ["href"], qn = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
1200
1207
|
__name: "TdToc",
|
|
1201
1208
|
props: { headings: {} },
|
|
1202
1209
|
setup(e) {
|
|
1203
|
-
let t =
|
|
1204
|
-
return (n, r) => e.headings.length ? (
|
|
1210
|
+
let t = Hn(() => e.headings);
|
|
1211
|
+
return (n, r) => e.headings.length ? (H(), P("div", Wn, [r[0] ||= F("div", { class: "td-toc-label" }, " On this page ", -1), F("ul", Gn, [(H(!0), P(A, null, W(e.headings, (e) => (H(), P("li", {
|
|
1205
1212
|
key: e.slug,
|
|
1206
1213
|
class: R({
|
|
1207
1214
|
"td-toc-indent-1": e.level === 3,
|
|
@@ -1210,74 +1217,74 @@ var Hn = {
|
|
|
1210
1217
|
})
|
|
1211
1218
|
}, [F("a", {
|
|
1212
1219
|
href: e.link,
|
|
1213
|
-
class: R(["td-toc-link", { "is-active":
|
|
1214
|
-
},
|
|
1220
|
+
class: R(["td-toc-link", { "is-active": q(t) === e.slug }])
|
|
1221
|
+
}, K(e.title), 11, Kn)], 2))), 128))])])) : N("", !0);
|
|
1215
1222
|
}
|
|
1216
|
-
}), [["__scopeId", "data-v-84e4402d"]]),
|
|
1223
|
+
}), [["__scopeId", "data-v-84e4402d"]]), Jn = { class: "td-header" }, Yn = { class: "td-header-left" }, Xn = ["href"], Zn = { class: "td-brand-name" }, Qn = { class: "td-header-right" }, $n = { class: "td-menu-header" }, er = { class: "td-header-left" }, tr = ["href"], nr = { class: "td-brand-name" }, rr = {
|
|
1217
1224
|
key: 0,
|
|
1218
1225
|
class: "pt-4",
|
|
1219
1226
|
"aria-label": "Site navigation"
|
|
1220
|
-
},
|
|
1227
|
+
}, ir = { class: "td-page" }, ar = { class: "td-main-and-toc" }, or = { class: "td-main" }, sr = { class: "td-content" }, cr = ["innerHTML"], lr = {
|
|
1221
1228
|
key: 1,
|
|
1222
1229
|
class: "td-page-meta"
|
|
1223
|
-
},
|
|
1230
|
+
}, ur = { key: 0 }, dr = {
|
|
1224
1231
|
class: "td-sidebar-right",
|
|
1225
1232
|
"aria-label": "Table of contents"
|
|
1226
|
-
},
|
|
1233
|
+
}, fr = 200, pr = 500, mr = 272, hr = "td-sidebar-width", gr = /*#__PURE__*/ T(/* @__PURE__ */ L({
|
|
1227
1234
|
__name: "TdLayout",
|
|
1228
1235
|
setup(e) {
|
|
1229
|
-
let { title: t, page: n } = ie(), r = D(), { withBase: i } = r, a = C(), { isOpen: o, close: c } = ln(), l =
|
|
1230
|
-
|
|
1236
|
+
let { title: t, page: n } = ie(), r = D(), { withBase: i } = r, a = C(), { isOpen: o, close: c } = ln(), l = U(""), u = U(!1), d = U(!1), f = O();
|
|
1237
|
+
Y(() => f.path, () => c()), Ln(), we(() => {
|
|
1231
1238
|
if (typeof document > "u") return;
|
|
1232
1239
|
let e = t.value, i = r.title;
|
|
1233
1240
|
document.title = e && e !== i ? `${e} - ${i}` : i;
|
|
1234
1241
|
let a = n.frontmatter?.description === void 0 ? r.description ?? "" : String(n.frontmatter.description), o = document.querySelector("meta[name=\"description\"]");
|
|
1235
1242
|
o && o.setAttribute("content", a);
|
|
1236
1243
|
}), Bn();
|
|
1237
|
-
let p =
|
|
1244
|
+
let p = U(typeof localStorage < "u" && Number(localStorage.getItem(hr)) || mr);
|
|
1238
1245
|
function m(e) {
|
|
1239
1246
|
let t = e.clientX, n = p.value, r = e.currentTarget;
|
|
1240
1247
|
r.setPointerCapture(e.pointerId);
|
|
1241
1248
|
function i(e) {
|
|
1242
|
-
let r = Math.min(
|
|
1249
|
+
let r = Math.min(pr, Math.max(fr, n + e.clientX - t));
|
|
1243
1250
|
p.value = r;
|
|
1244
1251
|
}
|
|
1245
1252
|
function a() {
|
|
1246
|
-
document.body.style.cursor = "", r.removeEventListener("pointermove", i), r.removeEventListener("pointerup", a), localStorage.setItem(
|
|
1253
|
+
document.body.style.cursor = "", r.removeEventListener("pointermove", i), r.removeEventListener("pointerup", a), localStorage.setItem(hr, String(p.value));
|
|
1247
1254
|
}
|
|
1248
1255
|
document.body.style.cursor = "col-resize", r.addEventListener("pointermove", i), r.addEventListener("pointerup", a);
|
|
1249
1256
|
}
|
|
1250
|
-
return (e, f) => (
|
|
1251
|
-
F("header",
|
|
1252
|
-
href:
|
|
1257
|
+
return (e, f) => (H(), P("div", null, [
|
|
1258
|
+
F("header", Jn, [F("div", Yn, [I(un), F("a", {
|
|
1259
|
+
href: q(i)(q(s)("/")),
|
|
1253
1260
|
class: "td-brand"
|
|
1254
|
-
}, [I(
|
|
1255
|
-
F("div", { class: R(["td-menu-overlay", { "is-open":
|
|
1256
|
-
F("header",
|
|
1261
|
+
}, [I(Ge), F("span", Zn, K(q(r).title || "Typedown"), 1)], 8, Xn)]), F("div", Qn, [I(In)])]),
|
|
1262
|
+
F("div", { class: R(["td-menu-overlay", { "is-open": q(o) }]) }, [
|
|
1263
|
+
F("header", $n, [F("div", er, [I(qe, {
|
|
1257
1264
|
class: "w-9 h-9 text-td-neutral-fg-muted hover:text-td-primary-solid",
|
|
1258
1265
|
label: "Close menu",
|
|
1259
|
-
onClick:
|
|
1266
|
+
onClick: q(c)
|
|
1260
1267
|
}, {
|
|
1261
|
-
default:
|
|
1268
|
+
default: X(() => [I(q(Z), { size: 20 })]),
|
|
1262
1269
|
_: 1
|
|
1263
1270
|
}, 8, ["onClick"]), F("a", {
|
|
1264
|
-
href:
|
|
1271
|
+
href: q(i)(q(s)("/")),
|
|
1265
1272
|
class: "td-brand"
|
|
1266
|
-
}, [I(
|
|
1273
|
+
}, [I(Ge), F("span", nr, K(q(r).title || "Typedown"), 1)], 8, tr)])]),
|
|
1267
1274
|
I(Fn, {
|
|
1268
1275
|
query: l.value,
|
|
1269
1276
|
"onUpdate:query": f[0] ||= (e) => l.value = e,
|
|
1270
1277
|
active: d.value,
|
|
1271
1278
|
"onUpdate:active": f[1] ||= (e) => d.value = e,
|
|
1272
|
-
onSelect:
|
|
1279
|
+
onSelect: q(c)
|
|
1273
1280
|
}, null, 8, [
|
|
1274
1281
|
"query",
|
|
1275
1282
|
"active",
|
|
1276
1283
|
"onSelect"
|
|
1277
1284
|
]),
|
|
1278
|
-
d.value ? N("", !0) : (
|
|
1285
|
+
d.value ? N("", !0) : (H(), P("nav", rr, [I(mt, { tree: q(a).contentTree }, null, 8, ["tree"])]))
|
|
1279
1286
|
], 2),
|
|
1280
|
-
F("div",
|
|
1287
|
+
F("div", ir, [F("nav", {
|
|
1281
1288
|
class: "td-sidebar-left",
|
|
1282
1289
|
"aria-label": "Site navigation",
|
|
1283
1290
|
style: z({ width: `${p.value}px` })
|
|
@@ -1288,48 +1295,48 @@ var Hn = {
|
|
|
1288
1295
|
active: u.value,
|
|
1289
1296
|
"onUpdate:active": f[3] ||= (e) => u.value = e
|
|
1290
1297
|
}, null, 8, ["query", "active"]),
|
|
1291
|
-
u.value ? N("", !0) : (
|
|
1298
|
+
u.value ? N("", !0) : (H(), M(mt, {
|
|
1292
1299
|
key: 0,
|
|
1293
|
-
tree:
|
|
1300
|
+
tree: q(a).contentTree
|
|
1294
1301
|
}, null, 8, ["tree"])),
|
|
1295
1302
|
F("div", {
|
|
1296
1303
|
class: "td-sidebar-resize",
|
|
1297
|
-
onPointerdown:
|
|
1304
|
+
onPointerdown: Ee(m, ["prevent"])
|
|
1298
1305
|
}, null, 32)
|
|
1299
|
-
], 4), F("div",
|
|
1306
|
+
], 4), F("div", ar, [F("main", or, [F("article", sr, [
|
|
1300
1307
|
I(Et),
|
|
1301
|
-
|
|
1308
|
+
q(t) ? (H(), P("h1", {
|
|
1302
1309
|
key: 0,
|
|
1303
1310
|
class: "td-page-title",
|
|
1304
|
-
innerHTML:
|
|
1305
|
-
}, null, 8,
|
|
1306
|
-
|
|
1307
|
-
I(
|
|
1308
|
-
schema:
|
|
1309
|
-
frontmatter:
|
|
1311
|
+
innerHTML: q(Ye)(q(t))
|
|
1312
|
+
}, null, 8, cr)) : N("", !0),
|
|
1313
|
+
q(n).metadata ? (H(), P("div", lr, [F("span", null, K(q(_)(q(n).metadata.mtime, "Modified")), 1), q(n).metadata.ctime === q(n).metadata.mtime ? N("", !0) : (H(), P("span", ur, " · " + K(q(_)(q(n).metadata.ctime, "Created")), 1))])) : N("", !0),
|
|
1314
|
+
I(q(cn), {
|
|
1315
|
+
schema: q(n).schema,
|
|
1316
|
+
frontmatter: q(n).frontmatter
|
|
1310
1317
|
}, null, 8, ["schema", "frontmatter"]),
|
|
1311
|
-
I(
|
|
1318
|
+
I(q(w)),
|
|
1312
1319
|
I(wn)
|
|
1313
|
-
])]), F("nav",
|
|
1320
|
+
])]), F("nav", dr, [I(qn, { headings: q(n).headings }, null, 8, ["headings"])])])])
|
|
1314
1321
|
]));
|
|
1315
1322
|
}
|
|
1316
|
-
}), [["__scopeId", "data-v-93a3d24b"]]),
|
|
1323
|
+
}), [["__scopeId", "data-v-93a3d24b"]]), _r = { class: "pt-16 pb-24" }, vr = ["href"], yr = /* @__PURE__ */ L({
|
|
1317
1324
|
__name: "TdNotFound",
|
|
1318
1325
|
setup(e) {
|
|
1319
1326
|
let { withBase: t } = D();
|
|
1320
|
-
return (e, n) => (
|
|
1327
|
+
return (e, n) => (H(), P("div", _r, [
|
|
1321
1328
|
n[0] ||= F("p", { class: "text-td-display font-td-heading leading-none tracking-td-title text-td-fg-muted" }, " 404 ", -1),
|
|
1322
1329
|
n[1] ||= F("h1", { class: "text-td-h2 font-td-heading leading-td-heading tracking-td-heading mt-4" }, " Page Not Found ", -1),
|
|
1323
1330
|
n[2] ||= F("p", { class: "text-td-fg-muted mt-2 text-td-body leading-td-body" }, " The page you are looking for does not exist. ", -1),
|
|
1324
1331
|
F("a", {
|
|
1325
1332
|
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",
|
|
1326
|
-
href:
|
|
1327
|
-
}, "Go Home", 8,
|
|
1333
|
+
href: q(t)(q(s)("/"))
|
|
1334
|
+
}, "Go Home", 8, vr)
|
|
1328
1335
|
]));
|
|
1329
1336
|
}
|
|
1330
|
-
}),
|
|
1331
|
-
Layout:
|
|
1332
|
-
NotFound:
|
|
1337
|
+
}), br = {
|
|
1338
|
+
Layout: gr,
|
|
1339
|
+
NotFound: yr
|
|
1333
1340
|
};
|
|
1334
1341
|
//#endregion
|
|
1335
|
-
export { ne as TdDirectoryIndex,
|
|
1342
|
+
export { ne as TdDirectoryIndex, gr as TdLayout, yr as TdNotFound, br as default, Ln as useCopyCode };
|
package/dist/index.js
CHANGED
|
@@ -2303,7 +2303,7 @@ function ai(e) {
|
|
|
2303
2303
|
build: "typerighter build",
|
|
2304
2304
|
preview: "typerighter preview"
|
|
2305
2305
|
},
|
|
2306
|
-
devDependencies: { typerighter: "^0.12.
|
|
2306
|
+
devDependencies: { typerighter: "^0.12.2" }
|
|
2307
2307
|
}, void 0, 2) + "\n";
|
|
2308
2308
|
}
|
|
2309
2309
|
function oi() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "typerighter",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.2",
|
|
5
5
|
"description": "Typedown: A typed content framework.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"tailwindcss": "^4.3.3",
|
|
86
86
|
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
|
|
87
87
|
"vue": "^3.0.0",
|
|
88
|
-
"@typerighter/rpc-client": "0.12.
|
|
89
|
-
"@typerighter/rpc-server": "0.12.
|
|
88
|
+
"@typerighter/rpc-client": "0.12.2",
|
|
89
|
+
"@typerighter/rpc-server": "0.12.2"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@hdnax/nuclint": "^0.17.4",
|