typerighter 0.55.0 → 0.55.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.
- package/dist/{app-Dj09xvlJ.js → app-C1ognrj1.js} +37 -37
- package/dist/{cli-qdkrcgUe.js → cli-CptK1Fy8.js} +5 -5
- package/dist/cli.js +1 -1
- package/dist/client/theme-default.js +218 -218
- package/dist/client.js +1 -1
- package/dist/index.js +2 -2
- package/dist/{init-CqTfzJfC.js → init-D8IGJCaj.js} +1 -1
- package/dist/node/build/prerender.d.ts +2 -2
- package/dist/node/build/prerender.d.ts.map +1 -1
- package/dist/node/build/seo/feed.d.ts +1 -1
- package/dist/node/build/seo/feed.d.ts.map +1 -1
- package/dist/node/build/seo/index.d.ts +4 -4
- package/dist/node/build/seo/index.d.ts.map +1 -1
- package/dist/node/build/seo/jsonld.d.ts +15 -2
- package/dist/node/build/seo/jsonld.d.ts.map +1 -1
- package/dist/node/build/seo/page.d.ts +16 -5
- package/dist/node/build/seo/page.d.ts.map +1 -1
- package/dist/node/build/seo/sitemap.d.ts +2 -2
- package/dist/node/build/seo/sitemap.d.ts.map +1 -1
- package/dist/node/lib/html-template.d.ts +3 -0
- package/dist/node/lib/html-template.d.ts.map +1 -1
- package/dist/node/lib/render/vue.d.ts.map +1 -1
- package/dist/page-CRsjLGU-.js +114 -0
- package/dist/prerenderWorker.js +31 -32
- package/dist/{renderMath-cPd-YSsZ.js → renderMath-CJKXI63h.js} +1 -1
- package/dist/shared/types/content.d.ts +3 -3
- package/dist/shared/types/content.d.ts.map +1 -1
- package/dist/shared/types/ssg.d.ts +3 -0
- package/dist/shared/types/ssg.d.ts.map +1 -1
- package/dist/shared/utils/format.d.ts +1 -0
- package/dist/shared/utils/format.d.ts.map +1 -1
- package/dist/shared/utils/url.d.ts +1 -0
- package/dist/shared/utils/url.d.ts.map +1 -1
- package/dist/{shared-tntT6SIH.js → shared-BK7uzYmy.js} +100 -94
- package/dist/shared.js +1 -1
- package/dist/typerighter.css +1 -1
- package/dist/{vite-C6g7N9dI.js → vite-UR3fMhaK.js} +489 -488
- package/dist/vite.js +1 -1
- package/package.json +3 -3
- package/dist/jsonld-Bb_dN3WE.js +0 -81
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as e,
|
|
1
|
+
import { A as e, D as t, E as n, I as r, L as i, P as a, R as o, T as s, Y as c, _ as l, a as u, b as d, c as f, f as p, j as m, k as h, l as g, n as _, nt as v, p as y, r as b, rt as x, s as S, v as C, w, y as T } from "../shared-BK7uzYmy.js";
|
|
2
2
|
import { t as E } from "../es-B_QJMowB.js";
|
|
3
|
-
import { A as ee, B as te, C as D, D as ne, E as O, F as k, H as re, I as ie, L as ae, M as oe, N as se, O as ce, P as le, R as ue, S as de, T as fe, U as A, V as pe, _ as me, a as he, b as ge, c as _e, d as ve, f as ye, g as be, h as xe, i as Se, j as Ce, k as we, l as Te, m as j, n as Ee, o as De, p as Oe, r as M, s as ke, u as Ae, v as je, w as Me, x as Ne, y as Pe, z as Fe } from "../app-
|
|
3
|
+
import { A as ee, B as te, C as D, D as ne, E as O, F as k, H as re, I as ie, L as ae, M as oe, N as se, O as ce, P as le, R as ue, S as de, T as fe, U as A, V as pe, _ as me, a as he, b as ge, c as _e, d as ve, f as ye, g as be, h as xe, i as Se, j as Ce, k as we, l as Te, m as j, n as Ee, o as De, p as Oe, r as M, s as ke, u as Ae, v as je, w as Me, x as Ne, y as Pe, z as Fe } from "../app-C1ognrj1.js";
|
|
4
4
|
import { a as Ie, i as Le, n as Re, t as ze } from "../brand-BSCRFcrY.js";
|
|
5
5
|
import { t as Be } from "../inlineRe-CoUp2DgK.js";
|
|
6
6
|
import { Fragment as N, Teleport as Ve, computed as P, createBlock as F, createCommentVNode as I, createElementBlock as L, createElementVNode as R, createTextVNode as z, createVNode as B, defineComponent as V, getCurrentScope as He, h as Ue, markRaw as We, mergeModels as Ge, mergeProps as Ke, nextTick as qe, normalizeClass as H, normalizeStyle as Je, onBeforeUnmount as Ye, onMounted as Xe, onScopeDispose as Ze, onUnmounted as Qe, openBlock as U, readonly as $e, ref as W, render as et, renderList as G, renderSlot as K, resolveComponent as tt, resolveDynamicComponent as nt, shallowReadonly as rt, shallowRef as it, toDisplayString as q, toValue as at, unref as J, useModel as ot, useTemplateRef as Y, vModelText as st, vShow as ct, watch as X, watchEffect as lt, withCtx as ut, withDirectives as dt, withKeys as ft, withModifiers as pt } from "vue";
|
|
@@ -1145,7 +1145,7 @@ function kr(e) {
|
|
|
1145
1145
|
let i = !0;
|
|
1146
1146
|
n(() => {
|
|
1147
1147
|
i = !1;
|
|
1148
|
-
}), import("../renderMath-
|
|
1148
|
+
}), import("../renderMath-CJKXI63h.js").then(({ renderInlineMarkup: e }) => {
|
|
1149
1149
|
i && (t.value = e(r));
|
|
1150
1150
|
});
|
|
1151
1151
|
}), t;
|
|
@@ -1172,20 +1172,20 @@ var jr = ["innerHTML"], Mr = /* @__PURE__ */ V({
|
|
|
1172
1172
|
node: {},
|
|
1173
1173
|
urlPrefix: { default: "" }
|
|
1174
1174
|
},
|
|
1175
|
-
setup(
|
|
1176
|
-
let r = _e(), { withBase: i } = M(), a = P(() =>
|
|
1177
|
-
function
|
|
1175
|
+
setup(n) {
|
|
1176
|
+
let r = _e(), { withBase: i } = M(), a = P(() => w(n.urlPrefix, n.node.name)), o = P(() => l(n.node)), f = P(() => o.value ? t(o.value.filepath) : s(a.value)), p = P(() => i(f.value)), m = P(() => o.value?.label ?? c(n.node.name)), h = P(() => o.value?.icon ? ve(o.value.icon.name) : void 0), g = P(() => n.node.entries.filter((e) => e.kind === "dir" || !d(e.item.filepath))), _ = P(() => 0 < n.node.entries.length), v = P(() => y(n.node));
|
|
1177
|
+
function y(e) {
|
|
1178
1178
|
let t = 0;
|
|
1179
|
-
for (let n of e.entries) n.kind === "file" ? t++ : t +=
|
|
1179
|
+
for (let n of e.entries) n.kind === "file" ? t++ : t += y(n.node);
|
|
1180
1180
|
return t;
|
|
1181
1181
|
}
|
|
1182
|
-
let b = W(!
|
|
1183
|
-
if (x.value) return
|
|
1182
|
+
let b = W(!e(a.value, r.path)), x = W(!1), S = P(() => g.value.filter((e) => e.kind === "file").length), C = P(() => x.value ? 0 : Math.max(0, S.value - Br)), E = P(() => {
|
|
1183
|
+
if (x.value) return g.value;
|
|
1184
1184
|
let e = 0;
|
|
1185
|
-
return
|
|
1185
|
+
return g.value.filter((t) => t.kind === "dir" || ++e <= Br);
|
|
1186
1186
|
});
|
|
1187
|
-
X(() => r.path, (
|
|
1188
|
-
|
|
1187
|
+
X(() => r.path, (t) => {
|
|
1188
|
+
e(a.value, t) && (b.value = !1);
|
|
1189
1189
|
});
|
|
1190
1190
|
function ee() {
|
|
1191
1191
|
x.value = !0;
|
|
@@ -1199,9 +1199,9 @@ var jr = ["innerHTML"], Mr = /* @__PURE__ */ V({
|
|
|
1199
1199
|
function ne() {
|
|
1200
1200
|
b.value = !b.value;
|
|
1201
1201
|
}
|
|
1202
|
-
return (e,
|
|
1202
|
+
return (e, n) => {
|
|
1203
1203
|
let r = tt("TdTreeNode", !0);
|
|
1204
|
-
return
|
|
1204
|
+
return _.value ? (U(), L("div", {
|
|
1205
1205
|
key: 0,
|
|
1206
1206
|
class: "td-tree-node",
|
|
1207
1207
|
role: "treeitem",
|
|
@@ -1217,19 +1217,19 @@ var jr = ["innerHTML"], Mr = /* @__PURE__ */ V({
|
|
|
1217
1217
|
size: 14,
|
|
1218
1218
|
class: H(["td-tree-caret", { "is-collapsed": b.value }])
|
|
1219
1219
|
}, null, 8, ["class"]),
|
|
1220
|
-
R("span", Pr, q(
|
|
1220
|
+
R("span", Pr, q(m.value), 1),
|
|
1221
1221
|
B(Or, {
|
|
1222
1222
|
text: "Open index page",
|
|
1223
1223
|
always: ""
|
|
1224
1224
|
}, {
|
|
1225
1225
|
default: ut(() => [R("a", {
|
|
1226
|
-
href:
|
|
1227
|
-
class: H(["td-tree-index-btn", { "is-active": te(
|
|
1228
|
-
onClick:
|
|
1229
|
-
}, [
|
|
1226
|
+
href: p.value,
|
|
1227
|
+
class: H(["td-tree-index-btn", { "is-active": te(f.value) }]),
|
|
1228
|
+
onClick: n[0] ||= pt(() => {}, ["stop"])
|
|
1229
|
+
}, [h.value ? (U(), F(nt(h.value), {
|
|
1230
1230
|
key: 0,
|
|
1231
1231
|
size: 12
|
|
1232
|
-
})) : te(
|
|
1232
|
+
})) : te(f.value) ? (U(), F(J(St), {
|
|
1233
1233
|
key: 1,
|
|
1234
1234
|
size: 12
|
|
1235
1235
|
})) : (U(), F(J(ce), {
|
|
@@ -1238,27 +1238,27 @@ var jr = ["innerHTML"], Mr = /* @__PURE__ */ V({
|
|
|
1238
1238
|
}))], 10, Fr)]),
|
|
1239
1239
|
_: 1
|
|
1240
1240
|
}),
|
|
1241
|
-
R("span", Ir, q(
|
|
1241
|
+
R("span", Ir, q(v.value), 1)
|
|
1242
1242
|
], 32), R("div", {
|
|
1243
1243
|
class: H(["td-collapse td-tree-children", { "is-collapsed": b.value }]),
|
|
1244
1244
|
role: "group"
|
|
1245
1245
|
}, [R("div", null, [
|
|
1246
1246
|
o.value ? (U(), L("a", {
|
|
1247
1247
|
key: 0,
|
|
1248
|
-
href:
|
|
1249
|
-
class: H(["td-tree-link td-tree-index-entry", { "is-active": te(
|
|
1248
|
+
href: p.value,
|
|
1249
|
+
class: H(["td-tree-link td-tree-index-entry", { "is-active": te(f.value) }])
|
|
1250
1250
|
}, [B(J(ae), {
|
|
1251
1251
|
size: 14,
|
|
1252
1252
|
class: "td-tree-file-icon"
|
|
1253
|
-
}),
|
|
1253
|
+
}), n[1] ||= R("span", { class: "td-tree-link-text" }, "Overview", -1)], 10, Lr)) : I("", !0),
|
|
1254
1254
|
(U(!0), L(N, null, G(E.value, (e) => (U(), L(N, { key: e.kind === "dir" ? e.node.name : e.item.filepath }, [e.kind === "dir" ? (U(), F(r, {
|
|
1255
1255
|
key: 0,
|
|
1256
1256
|
node: e.node,
|
|
1257
1257
|
"url-prefix": a.value
|
|
1258
1258
|
}, null, 8, ["node", "url-prefix"])) : (U(), L("a", {
|
|
1259
1259
|
key: 1,
|
|
1260
|
-
href: J(i)(J(
|
|
1261
|
-
class: H(["td-tree-link", { "is-active": te(J(
|
|
1260
|
+
href: J(i)(J(t)(e.item.filepath)),
|
|
1261
|
+
class: H(["td-tree-link", { "is-active": te(J(t)(e.item.filepath)) }])
|
|
1262
1262
|
}, [
|
|
1263
1263
|
e.item.icon && J(ve)(e.item.icon.name) ? (U(), F(nt(J(ve)(e.item.icon.name)), {
|
|
1264
1264
|
key: 0,
|
|
@@ -1276,7 +1276,7 @@ var jr = ["innerHTML"], Mr = /* @__PURE__ */ V({
|
|
|
1276
1276
|
default: ut(() => [B(Mr, { text: J(T)(e.item.filepath, e.item.label) }, null, 8, ["text"])]),
|
|
1277
1277
|
_: 2
|
|
1278
1278
|
}, 1032, ["text"]),
|
|
1279
|
-
e.item.fileMetadata ? (U(), L("span", zr, q(J(u)(e.item.fileMetadata.
|
|
1279
|
+
e.item.fileMetadata ? (U(), L("span", zr, q(J(u)(e.item.fileMetadata.mtimeSecs)), 1)) : I("", !0)
|
|
1280
1280
|
], 10, Rr))], 64))), 128)),
|
|
1281
1281
|
C.value > 0 && !x.value ? (U(), L("button", {
|
|
1282
1282
|
key: 1,
|
|
@@ -1287,7 +1287,7 @@ var jr = ["innerHTML"], Mr = /* @__PURE__ */ V({
|
|
|
1287
1287
|
])], 2)], 8, Nr)) : I("", !0);
|
|
1288
1288
|
};
|
|
1289
1289
|
}
|
|
1290
|
-
}), [["__scopeId", "data-v-
|
|
1290
|
+
}), [["__scopeId", "data-v-519b4ee6"]]), Hr = {
|
|
1291
1291
|
class: "td-nav",
|
|
1292
1292
|
"aria-label": "Site navigation"
|
|
1293
1293
|
}, Ur = { role: "tree" }, Wr = ["href"], Gr = {
|
|
@@ -1300,28 +1300,28 @@ var jr = ["innerHTML"], Mr = /* @__PURE__ */ V({
|
|
|
1300
1300
|
__name: "TdContentNav",
|
|
1301
1301
|
props: { tree: {} },
|
|
1302
1302
|
setup(e) {
|
|
1303
|
-
let
|
|
1303
|
+
let n = _e(), { withBase: r } = M(), i = P(() => e.tree.entries.find((e) => e.kind === "file" && d(e.item.filepath))?.item), a = P(() => e.tree.entries.filter((e) => e.kind === "dir" || !d(e.item.filepath)));
|
|
1304
1304
|
function o(e) {
|
|
1305
|
-
return
|
|
1305
|
+
return n.path === e;
|
|
1306
1306
|
}
|
|
1307
|
-
return (e,
|
|
1308
|
-
href: J(r)(i.value ? J(
|
|
1309
|
-
class: H(["td-root-link", { "is-active": o(i.value ? J(
|
|
1307
|
+
return (e, n) => (U(), L("nav", Hr, [R("div", Ur, [R("a", {
|
|
1308
|
+
href: J(r)(i.value ? J(t)(i.value.filepath) : J(s)("/")),
|
|
1309
|
+
class: H(["td-root-link", { "is-active": o(i.value ? J(t)(i.value.filepath) : J(s)("/")) }]),
|
|
1310
1310
|
role: "treeitem"
|
|
1311
1311
|
}, [
|
|
1312
1312
|
B(J(ne), {
|
|
1313
1313
|
size: 14,
|
|
1314
1314
|
class: "td-root-link-icon"
|
|
1315
1315
|
}),
|
|
1316
|
-
|
|
1317
|
-
i.value ? (U(), L("span", Gr, q(i.value.fileMetadata ? J(u)(i.value.fileMetadata.
|
|
1316
|
+
n[0] ||= R("span", { class: "td-root-link-text" }, "Overview", -1),
|
|
1317
|
+
i.value ? (U(), L("span", Gr, q(i.value.fileMetadata ? J(u)(i.value.fileMetadata.mtimeSecs) : ""), 1)) : I("", !0)
|
|
1318
1318
|
], 10, Wr), (U(!0), L(N, null, G(a.value, (e) => (U(), L(N, { key: e.kind === "dir" ? e.node.name : e.item.filepath }, [e.kind === "dir" ? (U(), F(Vr, {
|
|
1319
1319
|
key: 0,
|
|
1320
1320
|
node: e.node
|
|
1321
1321
|
}, null, 8, ["node"])) : (U(), L("a", {
|
|
1322
1322
|
key: 1,
|
|
1323
|
-
href: J(r)(J(
|
|
1324
|
-
class: H(["td-root-link", { "is-active": o(J(
|
|
1323
|
+
href: J(r)(J(t)(e.item.filepath)),
|
|
1324
|
+
class: H(["td-root-link", { "is-active": o(J(t)(e.item.filepath)) }]),
|
|
1325
1325
|
role: "treeitem"
|
|
1326
1326
|
}, [
|
|
1327
1327
|
e.item.icon && J(ve)(e.item.icon.name) ? (U(), F(nt(J(ve)(e.item.icon.name)), {
|
|
@@ -1334,10 +1334,10 @@ var jr = ["innerHTML"], Mr = /* @__PURE__ */ V({
|
|
|
1334
1334
|
class: "td-root-link-icon"
|
|
1335
1335
|
})),
|
|
1336
1336
|
R("span", qr, q(J(T)(e.item.filepath, e.item.label)), 1),
|
|
1337
|
-
e.item.fileMetadata ? (U(), L("span", Jr, q(J(u)(e.item.fileMetadata.
|
|
1337
|
+
e.item.fileMetadata ? (U(), L("span", Jr, q(J(u)(e.item.fileMetadata.mtimeSecs)), 1)) : I("", !0)
|
|
1338
1338
|
], 10, Kr))], 64))), 128))])]));
|
|
1339
1339
|
}
|
|
1340
|
-
}), [["__scopeId", "data-v-
|
|
1340
|
+
}), [["__scopeId", "data-v-038de594"]]), Xr = { class: "td-footer" }, Zr = { key: 0 }, Qr = /*#__PURE__*/ j(/* @__PURE__ */ V({
|
|
1341
1341
|
__name: "TdFooter",
|
|
1342
1342
|
setup(e) {
|
|
1343
1343
|
let t = M(), n = (/* @__PURE__ */ new Date()).getFullYear();
|
|
@@ -1401,19 +1401,19 @@ var jr = ["innerHTML"], Mr = /* @__PURE__ */ V({
|
|
|
1401
1401
|
let t = _e(), { withBase: n } = M(), i = W(!1), a = P(() => {
|
|
1402
1402
|
let e = r(t.path), i = [{
|
|
1403
1403
|
name: "Home",
|
|
1404
|
-
href: n(
|
|
1404
|
+
href: n(s("/"))
|
|
1405
1405
|
}];
|
|
1406
1406
|
if (e === "/") return i;
|
|
1407
|
-
let a = e.replace(/^\//, "").split("/"), o =
|
|
1407
|
+
let a = e.replace(/^\//, "").split("/"), o = h(e) ? a.slice(0, -1) : a;
|
|
1408
1408
|
for (let e = 0; e < o.length; e++) {
|
|
1409
1409
|
let t = "/" + o.slice(0, e + 1).join("/"), r = e === o.length - 1;
|
|
1410
1410
|
i.push({
|
|
1411
|
-
name:
|
|
1412
|
-
href: n(r ? t :
|
|
1411
|
+
name: c(o[e]),
|
|
1412
|
+
href: n(r ? t : s(t))
|
|
1413
1413
|
});
|
|
1414
1414
|
}
|
|
1415
1415
|
return i;
|
|
1416
|
-
}), o = P(() => li < a.value.length),
|
|
1416
|
+
}), o = P(() => li < a.value.length), l = P(() => a.value.slice(1, -2));
|
|
1417
1417
|
return X(() => t.path, () => {
|
|
1418
1418
|
i.value = !1;
|
|
1419
1419
|
}), (e, t) => (U(), L("nav", ti, [R("a", {
|
|
@@ -1429,7 +1429,7 @@ var jr = ["innerHTML"], Mr = /* @__PURE__ */ V({
|
|
|
1429
1429
|
"onUpdate:open": t[0] ||= (e) => i.value = e
|
|
1430
1430
|
}, {
|
|
1431
1431
|
trigger: ut(() => [R("button", ri, [B(J(Ce), { size: 14 })])]),
|
|
1432
|
-
default: ut(() => [(U(!0), L(N, null, G(
|
|
1432
|
+
default: ut(() => [(U(!0), L(N, null, G(l.value, (e) => (U(), L("a", {
|
|
1433
1433
|
key: e.href,
|
|
1434
1434
|
href: e.href,
|
|
1435
1435
|
class: "td-breadcrumb-dropdown-item"
|
|
@@ -1462,25 +1462,25 @@ var jr = ["innerHTML"], Mr = /* @__PURE__ */ V({
|
|
|
1462
1462
|
"rel"
|
|
1463
1463
|
], pi = /*#__PURE__*/ j(/* @__PURE__ */ V({
|
|
1464
1464
|
__name: "TdHeaderNavBar",
|
|
1465
|
-
setup(
|
|
1466
|
-
let
|
|
1467
|
-
function
|
|
1468
|
-
return !e
|
|
1469
|
-
}
|
|
1470
|
-
return (
|
|
1471
|
-
key:
|
|
1472
|
-
href: J(
|
|
1473
|
-
target: J(
|
|
1474
|
-
rel: J(
|
|
1475
|
-
class: H(["td-header-nav-link", { "is-active":
|
|
1465
|
+
setup(e) {
|
|
1466
|
+
let t = M(), { withBase: n } = t, r = _e();
|
|
1467
|
+
function i(e) {
|
|
1468
|
+
return !m(e) && r.path.startsWith(n(e));
|
|
1469
|
+
}
|
|
1470
|
+
return (e, r) => J(t).nav?.length ? (U(), L("nav", di, [(U(!0), L(N, null, G(J(t).nav, (e) => (U(), L("a", {
|
|
1471
|
+
key: e.link,
|
|
1472
|
+
href: J(m)(e.link) ? e.link : J(n)(e.link),
|
|
1473
|
+
target: J(m)(e.link) ? "_blank" : void 0,
|
|
1474
|
+
rel: J(m)(e.link) ? "noopener noreferrer" : void 0,
|
|
1475
|
+
class: H(["td-header-nav-link", { "is-active": i(e.link) }])
|
|
1476
1476
|
}, [
|
|
1477
|
-
|
|
1477
|
+
e.icon && J(ve)(e.icon) ? (U(), F(nt(J(ve)(e.icon)), {
|
|
1478
1478
|
key: 0,
|
|
1479
1479
|
size: 14,
|
|
1480
1480
|
class: "td-header-nav-icon"
|
|
1481
1481
|
})) : I("", !0),
|
|
1482
|
-
z(" " + q(
|
|
1483
|
-
J(
|
|
1482
|
+
z(" " + q(e.title) + " ", 1),
|
|
1483
|
+
J(m)(e.link) ? (U(), F(J(Fe), {
|
|
1484
1484
|
key: 1,
|
|
1485
1485
|
size: 14
|
|
1486
1486
|
})) : I("", !0)
|
|
@@ -1495,25 +1495,25 @@ var jr = ["innerHTML"], Mr = /* @__PURE__ */ V({
|
|
|
1495
1495
|
"rel"
|
|
1496
1496
|
], gi = /*#__PURE__*/ j(/* @__PURE__ */ V({
|
|
1497
1497
|
__name: "TdHeaderNavMenu",
|
|
1498
|
-
setup(
|
|
1499
|
-
let
|
|
1500
|
-
function
|
|
1501
|
-
return !e
|
|
1502
|
-
}
|
|
1503
|
-
return (
|
|
1504
|
-
key:
|
|
1505
|
-
href: J(
|
|
1506
|
-
target: J(
|
|
1507
|
-
rel: J(
|
|
1508
|
-
class: H(["td-menu-nav-item", { "is-active":
|
|
1498
|
+
setup(e) {
|
|
1499
|
+
let t = M(), { withBase: n } = t, r = _e();
|
|
1500
|
+
function i(e) {
|
|
1501
|
+
return !m(e) && r.path.startsWith(n(e));
|
|
1502
|
+
}
|
|
1503
|
+
return (e, r) => J(t).nav?.length ? (U(), L("nav", mi, [(U(!0), L(N, null, G(J(t).nav, (e) => (U(), L("a", {
|
|
1504
|
+
key: e.link,
|
|
1505
|
+
href: J(m)(e.link) ? e.link : J(n)(e.link),
|
|
1506
|
+
target: J(m)(e.link) ? "_blank" : void 0,
|
|
1507
|
+
rel: J(m)(e.link) ? "noopener noreferrer" : void 0,
|
|
1508
|
+
class: H(["td-menu-nav-item", { "is-active": i(e.link) }])
|
|
1509
1509
|
}, [
|
|
1510
|
-
|
|
1510
|
+
e.icon ? (U(), F(Ae, {
|
|
1511
1511
|
key: 0,
|
|
1512
|
-
name:
|
|
1512
|
+
name: e.icon,
|
|
1513
1513
|
size: 16
|
|
1514
1514
|
}, null, 8, ["name"])) : I("", !0),
|
|
1515
|
-
R("span", null, q(
|
|
1516
|
-
J(
|
|
1515
|
+
R("span", null, q(e.title), 1),
|
|
1516
|
+
J(m)(e.link) ? (U(), F(J(Fe), {
|
|
1517
1517
|
key: 1,
|
|
1518
1518
|
size: 14
|
|
1519
1519
|
})) : I("", !0)
|
|
@@ -1575,7 +1575,7 @@ function bi(e) {
|
|
|
1575
1575
|
}
|
|
1576
1576
|
function xi(e) {
|
|
1577
1577
|
if (e.format && yi.has(e.format.toLowerCase())) return !0;
|
|
1578
|
-
let t =
|
|
1578
|
+
let t = o(e.name || e.url).slice(1);
|
|
1579
1579
|
return t ? yi.has(t.toLowerCase()) : !1;
|
|
1580
1580
|
}
|
|
1581
1581
|
// src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetRelation.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1591,29 +1591,29 @@ var Si = {
|
|
|
1591
1591
|
default: !1
|
|
1592
1592
|
}
|
|
1593
1593
|
},
|
|
1594
|
-
setup(
|
|
1595
|
-
let { withBase:
|
|
1596
|
-
return (
|
|
1594
|
+
setup(e) {
|
|
1595
|
+
let { withBase: t } = M(), n = P(() => bi(e.value)), r = P(() => n.value?.icon ? ve(n.value.icon.name) : void 0), i = P(() => n.value !== void 0 && m(n.value.url));
|
|
1596
|
+
return (a, o) => n.value ? (U(), L("span", Si, [n.value.isImage ? (U(), L("a", {
|
|
1597
1597
|
key: 0,
|
|
1598
|
-
href: J(
|
|
1598
|
+
href: J(t)(n.value.url),
|
|
1599
1599
|
target: "_blank",
|
|
1600
1600
|
rel: "noopener noreferrer",
|
|
1601
1601
|
class: "td-widget-image-preview",
|
|
1602
|
-
title:
|
|
1602
|
+
title: n.value.name
|
|
1603
1603
|
}, [R("img", {
|
|
1604
|
-
src: J(
|
|
1605
|
-
alt:
|
|
1604
|
+
src: J(t)(n.value.url),
|
|
1605
|
+
alt: n.value.name,
|
|
1606
1606
|
class: "td-widget-image-img",
|
|
1607
1607
|
loading: "lazy"
|
|
1608
|
-
}, null, 8, wi)], 8, Ci)) :
|
|
1608
|
+
}, null, 8, wi)], 8, Ci)) : n.value.format || n.value.url.includes(".") ? (U(), L("a", {
|
|
1609
1609
|
key: 1,
|
|
1610
|
-
href: J(
|
|
1610
|
+
href: J(t)(n.value.url),
|
|
1611
1611
|
target: "_blank",
|
|
1612
1612
|
rel: "noopener noreferrer",
|
|
1613
1613
|
class: "td-widget-file-link"
|
|
1614
|
-
}, [B(J(ee), { class: "td-widget-file-icon" }), R("span", Ei, q(
|
|
1614
|
+
}, [B(J(ee), { class: "td-widget-file-icon" }), R("span", Ei, q(n.value.name), 1)], 8, Ti)) : i.value ? (U(), L("a", {
|
|
1615
1615
|
key: 2,
|
|
1616
|
-
href:
|
|
1616
|
+
href: n.value.url,
|
|
1617
1617
|
target: "_blank",
|
|
1618
1618
|
rel: "noopener noreferrer",
|
|
1619
1619
|
class: "td-widget-ref td-widget-ref-external"
|
|
@@ -1622,13 +1622,13 @@ var Si = {
|
|
|
1622
1622
|
class: "td-widget-external-icon"
|
|
1623
1623
|
})], 8, Di)) : (U(), L("a", {
|
|
1624
1624
|
key: 3,
|
|
1625
|
-
href: J(
|
|
1625
|
+
href: J(t)(n.value.url),
|
|
1626
1626
|
class: "td-widget-ref"
|
|
1627
|
-
}, [
|
|
1627
|
+
}, [r.value && !e.hideIcon ? (U(), F(nt(r.value), {
|
|
1628
1628
|
key: 0,
|
|
1629
1629
|
size: 14,
|
|
1630
1630
|
class: "td-widget-ref-icon"
|
|
1631
|
-
})) : I("", !0), z(q(
|
|
1631
|
+
})) : I("", !0), z(q(n.value.name), 1)], 8, Oi))])) : (U(), L("span", ki, q(e.value), 1));
|
|
1632
1632
|
}
|
|
1633
1633
|
}), [["__scopeId", "data-v-20319819"]]), ji = { key: 0 }, Mi = { class: "td-widget-list td-widget-list-icons" }, Ni = { key: 1 }, Pi = { class: "td-widget-list" }, Fi = 5, Ii = /*#__PURE__*/ j(/* @__PURE__ */ V({
|
|
1634
1634
|
__name: "TdWidgetList",
|
|
@@ -1835,7 +1835,7 @@ var Bi = 5, Vi = /*#__PURE__*/ j(/* @__PURE__ */ V({
|
|
|
1835
1835
|
let e = n.value, t = r.value, i = [], a = /* @__PURE__ */ new Set();
|
|
1836
1836
|
e && Object.keys(e).forEach((e) => a.add(e)), Object.keys(t).forEach((e) => a.add(e));
|
|
1837
1837
|
for (let n of a) {
|
|
1838
|
-
if (
|
|
1838
|
+
if (p(n)) continue;
|
|
1839
1839
|
let r = t[n];
|
|
1840
1840
|
if (r == null || Array.isArray(r) && r.length === 0) continue;
|
|
1841
1841
|
let a = e?.[n] ?? { widget: "text" };
|
|
@@ -1853,33 +1853,33 @@ var Bi = 5, Vi = /*#__PURE__*/ j(/* @__PURE__ */ V({
|
|
|
1853
1853
|
function o(e) {
|
|
1854
1854
|
return a[e] ?? kt;
|
|
1855
1855
|
}
|
|
1856
|
-
let s = W(!1),
|
|
1857
|
-
function
|
|
1856
|
+
let s = W(!1), l = W(!1);
|
|
1857
|
+
function u() {
|
|
1858
1858
|
s.value = !s.value;
|
|
1859
1859
|
}
|
|
1860
|
-
function
|
|
1861
|
-
|
|
1860
|
+
function d() {
|
|
1861
|
+
l.value = !l.value;
|
|
1862
1862
|
}
|
|
1863
1863
|
return (t, n) => e.mode === "rail" && i.value.length > 0 ? (U(), L("div", Xi, [R("button", {
|
|
1864
1864
|
type: "button",
|
|
1865
1865
|
class: "td-fm-rail-header",
|
|
1866
|
-
onClick:
|
|
1866
|
+
onClick: d
|
|
1867
1867
|
}, [n[0] ||= R("span", { class: "td-fm-rail-label" }, "Properties", -1), B(J(ie), {
|
|
1868
1868
|
size: 14,
|
|
1869
|
-
class: H(["td-fm-rail-caret", { "is-collapsed":
|
|
1870
|
-
}, null, 8, ["class"])]), R("div", { class: H(["td-collapse", { "is-collapsed":
|
|
1869
|
+
class: H(["td-fm-rail-caret", { "is-collapsed": l.value }])
|
|
1870
|
+
}, null, 8, ["class"])]), R("div", { class: H(["td-collapse", { "is-collapsed": l.value }]) }, [R("div", null, [(U(!0), L(N, null, G(i.value, ([e, t]) => (U(), L("div", {
|
|
1871
1871
|
key: e,
|
|
1872
1872
|
class: "td-fm-rail-row"
|
|
1873
1873
|
}, [R("span", Zi, [(U(), F(nt(o(t.widget)), {
|
|
1874
1874
|
size: 12,
|
|
1875
1875
|
class: "td-fm-icon"
|
|
1876
|
-
})), z(" " + q(J(
|
|
1876
|
+
})), z(" " + q(J(c)(e)), 1)]), R("span", Qi, [B(Yi, {
|
|
1877
1877
|
definition: t,
|
|
1878
1878
|
value: r.value[e]
|
|
1879
1879
|
}, null, 8, ["definition", "value"])])]))), 128))])], 2)])) : i.value.length > 0 ? (U(), L("div", $i, [R("button", {
|
|
1880
1880
|
type: "button",
|
|
1881
1881
|
class: "td-fm-box-header",
|
|
1882
|
-
onClick:
|
|
1882
|
+
onClick: u
|
|
1883
1883
|
}, [R("span", ea, [n[1] ||= z("Properties ", -1), R("span", ta, q(i.value.length), 1)]), R("span", na, [z(q(s.value ? "Show" : "Hide") + " ", 1), s.value ? (U(), F(J(le), {
|
|
1884
1884
|
key: 1,
|
|
1885
1885
|
size: 14
|
|
@@ -1889,7 +1889,7 @@ var Bi = 5, Vi = /*#__PURE__*/ j(/* @__PURE__ */ V({
|
|
|
1889
1889
|
}))])]), R("div", { class: H(["td-collapse", { "is-collapsed": s.value }]) }, [R("div", ra, [(U(!0), L(N, null, G(i.value, ([e, t]) => (U(), L(N, { key: e }, [R("span", ia, [(U(), F(nt(o(t.widget)), {
|
|
1890
1890
|
size: 12,
|
|
1891
1891
|
class: "td-fm-icon"
|
|
1892
|
-
})), z(" " + q(J(
|
|
1892
|
+
})), z(" " + q(J(c)(e)), 1)]), R("span", aa, [B(Yi, {
|
|
1893
1893
|
definition: t,
|
|
1894
1894
|
value: r.value[e]
|
|
1895
1895
|
}, null, 8, ["definition", "value"])])], 64))), 128))])], 2)])) : I("", !0);
|
|
@@ -1960,10 +1960,10 @@ function ua() {
|
|
|
1960
1960
|
next: P(() => i.value.next)
|
|
1961
1961
|
};
|
|
1962
1962
|
}
|
|
1963
|
-
function da(e,
|
|
1964
|
-
let
|
|
1965
|
-
|
|
1966
|
-
for (let t of e.entries) t.kind === "file" && !d(t.item.filepath) ?
|
|
1963
|
+
function da(e, t, n) {
|
|
1964
|
+
let r = w(t, e.name), i = l(e);
|
|
1965
|
+
i && n.push(pa(i));
|
|
1966
|
+
for (let t of e.entries) t.kind === "file" && !d(t.item.filepath) ? n.push(pa(t.item)) : t.kind === "dir" && da(t.node, r, n);
|
|
1967
1967
|
}
|
|
1968
1968
|
function fa(e, t) {
|
|
1969
1969
|
let n = [], r = e.entries.find((e) => e.kind === "file" && d(e.item.filepath));
|
|
@@ -1971,10 +1971,10 @@ function fa(e, t) {
|
|
|
1971
1971
|
for (let t of e.entries) t.kind === "file" && !d(t.item.filepath) ? n.push(pa(t.item)) : t.kind === "dir" && da(t.node, "", n);
|
|
1972
1972
|
return n;
|
|
1973
1973
|
}
|
|
1974
|
-
function pa(e,
|
|
1975
|
-
let r = e.label === void 0 ?
|
|
1974
|
+
function pa(e, n) {
|
|
1975
|
+
let r = e.label === void 0 ? n === void 0 ? T(e.filepath) : C(e.filepath, n) : e.label;
|
|
1976
1976
|
return {
|
|
1977
|
-
url:
|
|
1977
|
+
url: t(e.filepath),
|
|
1978
1978
|
title: r
|
|
1979
1979
|
};
|
|
1980
1980
|
}
|
|
@@ -2203,29 +2203,29 @@ var Da = {
|
|
|
2203
2203
|
__name: "TdSidebarIcons",
|
|
2204
2204
|
props: { tree: {} },
|
|
2205
2205
|
emits: ["search"],
|
|
2206
|
-
setup(
|
|
2207
|
-
let i = r, a = _e(), { withBase: o } = M(),
|
|
2208
|
-
let
|
|
2209
|
-
for (let
|
|
2210
|
-
if (
|
|
2211
|
-
let
|
|
2212
|
-
|
|
2213
|
-
label:
|
|
2214
|
-
href: o(
|
|
2215
|
-
path:
|
|
2216
|
-
icon:
|
|
2217
|
-
isFallback: !
|
|
2206
|
+
setup(n, { emit: r }) {
|
|
2207
|
+
let i = r, a = _e(), { withBase: o } = M(), u = P(() => n.tree.entries.find((e) => e.kind === "file" && d(e.item.filepath))?.item), f = P(() => {
|
|
2208
|
+
let e = [];
|
|
2209
|
+
for (let r of n.tree.entries) {
|
|
2210
|
+
if (r.kind !== "dir") continue;
|
|
2211
|
+
let n = r.node, i = w("", n.name), a = l(n), u = a ? t(a.filepath) : s(i), d = a?.label ?? c(n.name), f = a?.icon ? ve(a.icon.name) : void 0;
|
|
2212
|
+
e.push({
|
|
2213
|
+
label: d,
|
|
2214
|
+
href: o(u),
|
|
2215
|
+
path: u,
|
|
2216
|
+
icon: f,
|
|
2217
|
+
isFallback: !f
|
|
2218
2218
|
});
|
|
2219
2219
|
}
|
|
2220
|
-
return
|
|
2220
|
+
return e;
|
|
2221
2221
|
});
|
|
2222
|
-
function
|
|
2222
|
+
function p() {
|
|
2223
2223
|
i("search");
|
|
2224
2224
|
}
|
|
2225
|
-
function
|
|
2226
|
-
return a.path ===
|
|
2225
|
+
function m(t) {
|
|
2226
|
+
return a.path === t || e(t, a.path);
|
|
2227
2227
|
}
|
|
2228
|
-
return (e,
|
|
2228
|
+
return (e, n) => (U(), L("div", Wa, [
|
|
2229
2229
|
B(Or, {
|
|
2230
2230
|
text: "Search",
|
|
2231
2231
|
always: ""
|
|
@@ -2234,31 +2234,31 @@ var Da = {
|
|
|
2234
2234
|
class: "td-sidebar-icon-btn",
|
|
2235
2235
|
type: "button",
|
|
2236
2236
|
"aria-label": "Search",
|
|
2237
|
-
onClick:
|
|
2237
|
+
onClick: p
|
|
2238
2238
|
}, [B(J(ge), { size: 16 })])]),
|
|
2239
2239
|
_: 1
|
|
2240
2240
|
}),
|
|
2241
|
-
|
|
2241
|
+
u.value ? (U(), F(Or, {
|
|
2242
2242
|
key: 0,
|
|
2243
|
-
text:
|
|
2243
|
+
text: u.value.label ?? "Home",
|
|
2244
2244
|
always: ""
|
|
2245
2245
|
}, {
|
|
2246
2246
|
default: ut(() => [R("a", {
|
|
2247
|
-
href: J(o)(J(
|
|
2248
|
-
class: H(["td-sidebar-icon-btn", { "is-active":
|
|
2249
|
-
"aria-label":
|
|
2247
|
+
href: J(o)(J(t)(u.value.filepath)),
|
|
2248
|
+
class: H(["td-sidebar-icon-btn", { "is-active": m(J(t)(u.value.filepath)) }]),
|
|
2249
|
+
"aria-label": u.value.label ?? "Home"
|
|
2250
2250
|
}, [B(J(ne), { size: 16 })], 10, Ga)]),
|
|
2251
2251
|
_: 1
|
|
2252
2252
|
}, 8, ["text"])) : I("", !0),
|
|
2253
|
-
|
|
2254
|
-
(U(!0), L(N, null, G(
|
|
2253
|
+
f.value.length ? (U(), L("div", Ka)) : I("", !0),
|
|
2254
|
+
(U(!0), L(N, null, G(f.value, (e) => (U(), F(Or, {
|
|
2255
2255
|
key: e.href,
|
|
2256
2256
|
text: e.label,
|
|
2257
2257
|
always: ""
|
|
2258
2258
|
}, {
|
|
2259
2259
|
default: ut(() => [R("a", {
|
|
2260
2260
|
href: e.href,
|
|
2261
|
-
class: H(["td-sidebar-icon-btn", { "is-active":
|
|
2261
|
+
class: H(["td-sidebar-icon-btn", { "is-active": m(e.path) }]),
|
|
2262
2262
|
"aria-label": e.label
|
|
2263
2263
|
}, [e.isFallback ? (U(), F(J(ce), {
|
|
2264
2264
|
key: 1,
|
|
@@ -2277,7 +2277,7 @@ function Ya(e, t) {
|
|
|
2277
2277
|
if (!e || !t) return f(e);
|
|
2278
2278
|
let n = t.trim().split(/\s+/).filter(Boolean), r = f(e);
|
|
2279
2279
|
for (let e of n) {
|
|
2280
|
-
let t = RegExp(`(${
|
|
2280
|
+
let t = RegExp(`(${S(e)})`, "gi");
|
|
2281
2281
|
r = r.replace(t, "<mark>$1</mark>");
|
|
2282
2282
|
}
|
|
2283
2283
|
return r;
|
|
@@ -2292,8 +2292,8 @@ function Za() {
|
|
|
2292
2292
|
function i() {
|
|
2293
2293
|
if (t) return t;
|
|
2294
2294
|
if (e.value) return t = We(E.loadJSON(e.value, {
|
|
2295
|
-
fields:
|
|
2296
|
-
storeFields:
|
|
2295
|
+
fields: v,
|
|
2296
|
+
storeFields: x
|
|
2297
2297
|
})), t;
|
|
2298
2298
|
}
|
|
2299
2299
|
function a(e, t) {
|
|
@@ -2329,7 +2329,7 @@ function Za() {
|
|
|
2329
2329
|
score: e.score
|
|
2330
2330
|
})), r.value = !1;
|
|
2331
2331
|
}
|
|
2332
|
-
let s =
|
|
2332
|
+
let s = y(o, 150);
|
|
2333
2333
|
function c(e) {
|
|
2334
2334
|
let t = e.trim();
|
|
2335
2335
|
t.length === 0 ? (n.value = [], r.value = !1) : (r.value = !0, s(t));
|
|
@@ -2367,22 +2367,22 @@ var Qa = {
|
|
|
2367
2367
|
}, so = { class: "td-palette-footer" }, co = /*#__PURE__*/ j(/* @__PURE__ */ V({
|
|
2368
2368
|
__name: "TdCommandPalette",
|
|
2369
2369
|
emits: ["toggle-sidebar", "show-shortcuts"],
|
|
2370
|
-
setup(e, { expose: t, emit:
|
|
2371
|
-
let
|
|
2370
|
+
setup(e, { expose: t, emit: r }) {
|
|
2371
|
+
let i = r, a = W(!1), o = W(""), s = W(0), c = Y("input"), l = Y("results"), u = _e(), d = Te(), { withBase: f } = M(), { previous: p, next: m } = ua(), { results: h, search: g, cancel: _ } = Za(), v = P(() => o.value.trim());
|
|
2372
2372
|
function y() {
|
|
2373
|
-
|
|
2373
|
+
a.value = !1, _();
|
|
2374
2374
|
}
|
|
2375
2375
|
function b() {
|
|
2376
|
-
|
|
2376
|
+
o.value = "", a.value = !0, s.value = 0, qe(() => c.value?.focus());
|
|
2377
2377
|
}
|
|
2378
2378
|
t({
|
|
2379
2379
|
open: b,
|
|
2380
2380
|
close: y
|
|
2381
2381
|
}), X(v, (e, t, n) => {
|
|
2382
|
-
n(() => _()), g(e),
|
|
2382
|
+
n(() => _()), g(e), s.value = 0;
|
|
2383
2383
|
});
|
|
2384
2384
|
let x = P(() => {
|
|
2385
|
-
let e =
|
|
2385
|
+
let e = n(u.path);
|
|
2386
2386
|
return e === "/" ? void 0 : e;
|
|
2387
2387
|
}), S = P(() => {
|
|
2388
2388
|
let e = [];
|
|
@@ -2409,13 +2409,13 @@ var Qa = {
|
|
|
2409
2409
|
label: "Collapse sidebar",
|
|
2410
2410
|
keys: [Q.Meta, Q.Backslash],
|
|
2411
2411
|
keepsOpen: !0,
|
|
2412
|
-
action: () =>
|
|
2412
|
+
action: () => i("toggle-sidebar")
|
|
2413
2413
|
}), e.push({
|
|
2414
2414
|
id: "view-shortcuts",
|
|
2415
2415
|
group: "View",
|
|
2416
2416
|
label: "Keyboard shortcuts",
|
|
2417
2417
|
action: () => {
|
|
2418
|
-
y(),
|
|
2418
|
+
y(), i("show-shortcuts");
|
|
2419
2419
|
}
|
|
2420
2420
|
}), e.push({
|
|
2421
2421
|
id: "page-copy",
|
|
@@ -2442,7 +2442,7 @@ var Qa = {
|
|
|
2442
2442
|
}
|
|
2443
2443
|
function ee(e) {
|
|
2444
2444
|
let t = T.value;
|
|
2445
|
-
e.key === "Escape" ? (e.preventDefault(), y()) : (e.key === "ArrowDown" && (e.preventDefault(),
|
|
2445
|
+
e.key === "Escape" ? (e.preventDefault(), y()) : (e.key === "ArrowDown" && (e.preventDefault(), s.value = 0 < t ? (s.value + 1) % t : 0), e.key === "ArrowUp" && (e.preventDefault(), s.value = 0 < t ? (s.value - 1 + t) % t : 0), e.key === "Enter" && (e.preventDefault(), D(s.value)));
|
|
2446
2446
|
}
|
|
2447
2447
|
function te(e) {
|
|
2448
2448
|
e.keepsOpen || y(), e.href ? d.go(e.href) : e.action?.();
|
|
@@ -2461,12 +2461,12 @@ var Qa = {
|
|
|
2461
2461
|
t && (y(), d.go(f(t.id)));
|
|
2462
2462
|
}
|
|
2463
2463
|
return X(T, () => {
|
|
2464
|
-
|
|
2465
|
-
}), X(
|
|
2464
|
+
s.value = 0;
|
|
2465
|
+
}), X(s, () => {
|
|
2466
2466
|
requestAnimationFrame(() => {
|
|
2467
2467
|
l.value?.querySelector(".is-selected")?.scrollIntoView({ block: "nearest" });
|
|
2468
2468
|
});
|
|
2469
|
-
}), (e, t) => (U(), F(Ve, { to: "body" }, [
|
|
2469
|
+
}), (e, t) => (U(), F(Ve, { to: "body" }, [a.value ? (U(), L(N, { key: 0 }, [R("div", {
|
|
2470
2470
|
class: "td-palette-scrim",
|
|
2471
2471
|
onClick: y
|
|
2472
2472
|
}), R("div", Qa, [
|
|
@@ -2477,14 +2477,14 @@ var Qa = {
|
|
|
2477
2477
|
}),
|
|
2478
2478
|
dt(R("input", {
|
|
2479
2479
|
ref: "input",
|
|
2480
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
2480
|
+
"onUpdate:modelValue": t[0] ||= (e) => o.value = e,
|
|
2481
2481
|
class: "td-palette-input",
|
|
2482
2482
|
type: "text",
|
|
2483
2483
|
placeholder: "Search pages and commands...",
|
|
2484
2484
|
autocomplete: "off",
|
|
2485
2485
|
spellcheck: "false",
|
|
2486
2486
|
onKeydown: ee
|
|
2487
|
-
}, null, 544), [[st,
|
|
2487
|
+
}, null, 544), [[st, o.value]]),
|
|
2488
2488
|
R("button", {
|
|
2489
2489
|
class: "td-palette-esc",
|
|
2490
2490
|
type: "button",
|
|
@@ -2496,17 +2496,17 @@ var Qa = {
|
|
|
2496
2496
|
J(h).length > 0 ? (U(), L(N, { key: 0 }, [t[1] ||= R("div", { class: "td-palette-group-label" }, " Pages ", -1), (U(!0), L(N, null, G(J(h), (e, t) => (U(), L("a", {
|
|
2497
2497
|
key: e.id,
|
|
2498
2498
|
href: J(f)(e.id),
|
|
2499
|
-
class: H(["td-palette-item", { "is-selected": t ===
|
|
2499
|
+
class: H(["td-palette-item", { "is-selected": t === s.value }]),
|
|
2500
2500
|
onClick: pt(() => ne(t), ["prevent"]),
|
|
2501
|
-
onMouseenter: () =>
|
|
2501
|
+
onMouseenter: () => s.value = t
|
|
2502
2502
|
}, [R("span", {
|
|
2503
2503
|
class: "td-palette-item-label",
|
|
2504
2504
|
innerHTML: J(Ya)(e.title, v.value)
|
|
2505
2505
|
}, null, 8, no), R("span", ro, q(e.id), 1)], 42, to))), 128))], 64)) : I("", !0),
|
|
2506
2506
|
(U(!0), L(N, null, G(w.value, (e) => (U(), L(N, { key: e.name }, [R("div", io, q(e.name), 1), (U(!0), L(N, null, G(e.commands, (e) => (U(), F(nt(e.href ? "a" : "button"), Ke({ key: e.id }, { ref_for: !0 }, e.href ? { href: e.href } : { type: "button" }, {
|
|
2507
|
-
class: ["td-palette-item", { "is-selected": E(e) ===
|
|
2507
|
+
class: ["td-palette-item", { "is-selected": E(e) === s.value }],
|
|
2508
2508
|
onClick: () => te(e),
|
|
2509
|
-
onMouseenter: () =>
|
|
2509
|
+
onMouseenter: () => s.value = E(e)
|
|
2510
2510
|
}), {
|
|
2511
2511
|
default: ut(() => [R("span", ao, q(e.label), 1), e.keys ? (U(), F($, {
|
|
2512
2512
|
key: 0,
|
|
@@ -2590,15 +2590,15 @@ var Qa = {
|
|
|
2590
2590
|
},
|
|
2591
2591
|
emits: /*@__PURE__*/ Ge(["select"], ["update:active", "update:query"]),
|
|
2592
2592
|
setup(e, { expose: t, emit: n }) {
|
|
2593
|
-
let r = ot(e, "active"), i = ot(e, "query"),
|
|
2593
|
+
let r = ot(e, "active"), i = ot(e, "query"), o = n, s = _e(), { withBase: l } = M(), { results: u, searching: d, indexLoaded: f, search: p, cancel: m } = Za(), h = W(-1), g = P(() => 0 < i.value.trim().length), _ = P(() => {
|
|
2594
2594
|
let e = [], t = /* @__PURE__ */ new Map();
|
|
2595
|
-
for (let n of
|
|
2596
|
-
let r =
|
|
2595
|
+
for (let n of u.value) {
|
|
2596
|
+
let r = a(n.id), i = t.get(r);
|
|
2597
2597
|
if (!i) {
|
|
2598
2598
|
let n = r.split("/").pop() || "index";
|
|
2599
2599
|
i = {
|
|
2600
2600
|
pageUrl: r,
|
|
2601
|
-
pageTitle:
|
|
2601
|
+
pageTitle: c(n),
|
|
2602
2602
|
results: []
|
|
2603
2603
|
}, t.set(r, i), e.push(i);
|
|
2604
2604
|
}
|
|
@@ -2606,34 +2606,34 @@ var Qa = {
|
|
|
2606
2606
|
}
|
|
2607
2607
|
return e;
|
|
2608
2608
|
});
|
|
2609
|
-
X(
|
|
2609
|
+
X(g, (e) => {
|
|
2610
2610
|
r.value = e;
|
|
2611
2611
|
}), X(i, (e, t, n) => {
|
|
2612
|
-
n(() =>
|
|
2612
|
+
n(() => m()), h.value = 0, p(e);
|
|
2613
2613
|
});
|
|
2614
|
-
function
|
|
2614
|
+
function v() {
|
|
2615
2615
|
i.value = "";
|
|
2616
2616
|
}
|
|
2617
|
-
let
|
|
2617
|
+
let y = P(() => _.value.flatMap((e) => e.results)), b = P(() => {
|
|
2618
2618
|
let e = /* @__PURE__ */ new Map();
|
|
2619
|
-
for (let t = 0; t <
|
|
2619
|
+
for (let t = 0; t < y.value.length; t++) e.set(y.value[t].id, t);
|
|
2620
2620
|
return e;
|
|
2621
2621
|
});
|
|
2622
2622
|
function x(e) {
|
|
2623
2623
|
let t = b.value.size;
|
|
2624
2624
|
if (t !== 0) {
|
|
2625
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
2626
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
2627
|
-
else if (e.key === "Enter" && 0 <=
|
|
2625
|
+
if (e.key === "ArrowDown") e.preventDefault(), h.value = (h.value + 1) % t, C();
|
|
2626
|
+
else if (e.key === "ArrowUp") e.preventDefault(), h.value = (h.value - 1 + t) % t, C();
|
|
2627
|
+
else if (e.key === "Enter" && 0 <= h.value) {
|
|
2628
2628
|
e.preventDefault();
|
|
2629
|
-
let t =
|
|
2629
|
+
let t = y.value[h.value];
|
|
2630
2630
|
if (!t) return;
|
|
2631
|
-
document.querySelector(`.td-search-result[href="${CSS.escape(
|
|
2631
|
+
document.querySelector(`.td-search-result[href="${CSS.escape(l(t.id))}"]`)?.click();
|
|
2632
2632
|
}
|
|
2633
2633
|
}
|
|
2634
2634
|
}
|
|
2635
2635
|
function S() {
|
|
2636
|
-
|
|
2636
|
+
o("select");
|
|
2637
2637
|
}
|
|
2638
2638
|
function C() {
|
|
2639
2639
|
requestAnimationFrame(() => {
|
|
@@ -2670,33 +2670,33 @@ var Qa = {
|
|
|
2670
2670
|
placeholder: "Search...",
|
|
2671
2671
|
onKeydown: x
|
|
2672
2672
|
}, null, 544), [[st, i.value]]),
|
|
2673
|
-
!
|
|
2673
|
+
!g.value && !J(d) ? (U(), F($, {
|
|
2674
2674
|
key: 0,
|
|
2675
2675
|
keys: [J(Q).Meta, J(Q).k],
|
|
2676
2676
|
class: "td-search-kbd"
|
|
2677
2677
|
}, null, 8, ["keys"])) : I("", !0),
|
|
2678
|
-
J(
|
|
2678
|
+
J(d) || !J(f) ? (U(), F(J(Ct), {
|
|
2679
2679
|
key: 1,
|
|
2680
2680
|
size: 12,
|
|
2681
2681
|
class: "td-search-spinner"
|
|
2682
|
-
})) :
|
|
2682
|
+
})) : g.value ? (U(), L("span", go, q(J(u).length), 1)) : I("", !0),
|
|
2683
2683
|
i.value ? (U(), L("button", {
|
|
2684
2684
|
key: 3,
|
|
2685
2685
|
class: "td-search-clear",
|
|
2686
2686
|
type: "button",
|
|
2687
2687
|
"aria-label": "Clear search",
|
|
2688
|
-
onClick:
|
|
2688
|
+
onClick: v
|
|
2689
2689
|
}, [B(J(xe), { size: 12 })])) : I("", !0)
|
|
2690
2690
|
]),
|
|
2691
|
-
|
|
2691
|
+
g.value && J(u).length > 0 ? (U(), L("div", _o, [(U(!0), L(N, null, G(_.value, (e) => (U(), L("div", {
|
|
2692
2692
|
key: e.pageUrl,
|
|
2693
2693
|
class: "td-search-group"
|
|
2694
2694
|
}, [(U(!0), L(N, null, G(e.results, (e) => (U(), L("a", {
|
|
2695
2695
|
key: e.id,
|
|
2696
|
-
href: J(
|
|
2696
|
+
href: J(l)(e.id),
|
|
2697
2697
|
class: H(["td-search-result", {
|
|
2698
|
-
"is-selected": b.value.get(e.id) ===
|
|
2699
|
-
"is-current": J(
|
|
2698
|
+
"is-selected": b.value.get(e.id) === h.value,
|
|
2699
|
+
"is-current": J(l)(e.id) === J(s).path
|
|
2700
2700
|
}]),
|
|
2701
2701
|
onClick: S
|
|
2702
2702
|
}, [
|
|
@@ -2711,7 +2711,7 @@ var Qa = {
|
|
|
2711
2711
|
innerHTML: J(Ya)(e.excerpt, i.value)
|
|
2712
2712
|
}, null, 8, xo)) : I("", !0)
|
|
2713
2713
|
], 10, vo))), 128))]))), 128))])) : I("", !0),
|
|
2714
|
-
|
|
2714
|
+
g.value && J(u).length === 0 ? (U(), L("div", So, " No results for \"" + q(i.value) + "\" ", 1)) : I("", !0)
|
|
2715
2715
|
]));
|
|
2716
2716
|
}
|
|
2717
2717
|
}), [["__scopeId", "data-v-f42853f1"]]), wo = /* @__PURE__ */ V({
|
|
@@ -3546,11 +3546,11 @@ var Bs = { class: "td-header" }, Vs = { class: "td-header-left" }, Hs = ["href"]
|
|
|
3546
3546
|
let { title: t, page: n } = he(), i = P(() => {
|
|
3547
3547
|
let e = n.value.icon;
|
|
3548
3548
|
return e ? ve(e.name) : void 0;
|
|
3549
|
-
}), a = M(), { withBase: o } = a,
|
|
3550
|
-
X(() =>
|
|
3551
|
-
let
|
|
3549
|
+
}), a = M(), { withBase: o } = a, c = Te(), l = Se(), u = P(() => l.value.ready), { isOpen: d, open: f, close: p } = ca(), m = W(""), h = W(!1), g = W(!1), _ = _e(), v = W(!1);
|
|
3550
|
+
X(() => _.path, () => p()), To(), Eo(), Ls();
|
|
3551
|
+
let y = Y("sidebarSearch"), x = Y("menuSearch"), S = Y("palette"), { previous: C, next: w } = ua();
|
|
3552
3552
|
function T() {
|
|
3553
|
-
|
|
3553
|
+
v.value = !1;
|
|
3554
3554
|
}
|
|
3555
3555
|
function E(e) {
|
|
3556
3556
|
let t = a.repo;
|
|
@@ -3561,21 +3561,21 @@ var Bs = { class: "td-header" }, Vs = { class: "td-header-left" }, Hs = ["href"]
|
|
|
3561
3561
|
].filter(Boolean).join("/")}`;
|
|
3562
3562
|
}
|
|
3563
3563
|
function ee() {
|
|
3564
|
-
k.value = !1, qe(() =>
|
|
3564
|
+
k.value = !1, qe(() => y.value?.focus());
|
|
3565
3565
|
}
|
|
3566
3566
|
function te() {
|
|
3567
|
-
|
|
3567
|
+
y.value?.isVisible ? y.value.focus() : (f(), x.value?.focus());
|
|
3568
3568
|
}
|
|
3569
3569
|
function D() {
|
|
3570
|
-
|
|
3570
|
+
S.value?.open();
|
|
3571
3571
|
}
|
|
3572
3572
|
function ne() {
|
|
3573
|
-
|
|
3573
|
+
v.value = !0;
|
|
3574
3574
|
}
|
|
3575
3575
|
ko([Q.Control, Q.k], te), ko([Q.Meta, Q.k], te), ko([Q.Control, Q.FSlash], D), ko([Q.Meta, Q.FSlash], D), ko([Q.Control, Q.ArrowLeft], () => {
|
|
3576
|
-
|
|
3576
|
+
C.value && c.go(C.value.url);
|
|
3577
3577
|
}, { ignoreWhenTyping: !0 }), ko([Q.Control, Q.ArrowRight], () => {
|
|
3578
|
-
|
|
3578
|
+
w.value && c.go(w.value.url);
|
|
3579
3579
|
}, { ignoreWhenTyping: !0 }), lt(() => {
|
|
3580
3580
|
if (typeof document > "u") return;
|
|
3581
3581
|
let e = t.value, r = a.title;
|
|
@@ -3614,9 +3614,9 @@ var Bs = { class: "td-header" }, Vs = { class: "td-header-left" }, Hs = ["href"]
|
|
|
3614
3614
|
}, "Skip to content", -1),
|
|
3615
3615
|
R("header", Bs, [
|
|
3616
3616
|
R("div", Vs, [
|
|
3617
|
-
B(la, { onClick: J(
|
|
3617
|
+
B(la, { onClick: J(f) }, null, 8, ["onClick"]),
|
|
3618
3618
|
R("a", {
|
|
3619
|
-
href: J(o)(J(
|
|
3619
|
+
href: J(o)(J(s)("/")),
|
|
3620
3620
|
class: "td-brand"
|
|
3621
3621
|
}, [B(Pt), R("span", Us, q(J(a).title || "Typedown"), 1)], 8, Hs),
|
|
3622
3622
|
B(ui, { class: "td-header-breadcrumb" })
|
|
@@ -3661,16 +3661,16 @@ var Bs = { class: "td-header" }, Vs = { class: "td-header-left" }, Hs = ["href"]
|
|
|
3661
3661
|
])
|
|
3662
3662
|
]),
|
|
3663
3663
|
R("div", {
|
|
3664
|
-
class: H(["td-drawer-scrim", { "is-open": J(
|
|
3665
|
-
onClick: r[0] ||= (...e) => J(
|
|
3664
|
+
class: H(["td-drawer-scrim", { "is-open": J(d) }]),
|
|
3665
|
+
onClick: r[0] ||= (...e) => J(p) && J(p)(...e)
|
|
3666
3666
|
}, null, 2),
|
|
3667
|
-
R("aside", { class: H(["td-drawer", { "is-open": J(
|
|
3667
|
+
R("aside", { class: H(["td-drawer", { "is-open": J(d) }]) }, [
|
|
3668
3668
|
R("header", Ks, [R("a", {
|
|
3669
|
-
href: J(o)(J(
|
|
3669
|
+
href: J(o)(J(s)("/")),
|
|
3670
3670
|
class: "td-brand"
|
|
3671
3671
|
}, [B(Pt), R("span", Js, q(J(a).title || "Typedown"), 1)], 8, qs), B(It, {
|
|
3672
3672
|
label: "Close menu",
|
|
3673
|
-
onClick: J(
|
|
3673
|
+
onClick: J(p)
|
|
3674
3674
|
}, {
|
|
3675
3675
|
default: ut(() => [B(J(xe), { size: 20 })]),
|
|
3676
3676
|
_: 1
|
|
@@ -3678,20 +3678,20 @@ var Bs = { class: "td-header" }, Vs = { class: "td-header-left" }, Hs = ["href"]
|
|
|
3678
3678
|
B(J(gi)),
|
|
3679
3679
|
B(Co, {
|
|
3680
3680
|
ref_key: "menuSearch",
|
|
3681
|
-
ref:
|
|
3682
|
-
query:
|
|
3683
|
-
"onUpdate:query": r[1] ||= (e) =>
|
|
3684
|
-
active:
|
|
3685
|
-
"onUpdate:active": r[2] ||= (e) =>
|
|
3686
|
-
onSelect: J(
|
|
3681
|
+
ref: x,
|
|
3682
|
+
query: m.value,
|
|
3683
|
+
"onUpdate:query": r[1] ||= (e) => m.value = e,
|
|
3684
|
+
active: g.value,
|
|
3685
|
+
"onUpdate:active": r[2] ||= (e) => g.value = e,
|
|
3686
|
+
onSelect: J(p)
|
|
3687
3687
|
}, null, 8, [
|
|
3688
3688
|
"query",
|
|
3689
3689
|
"active",
|
|
3690
3690
|
"onSelect"
|
|
3691
3691
|
]),
|
|
3692
|
-
|
|
3692
|
+
g.value ? I("", !0) : (U(), L("nav", Ys, [u.value ? (U(), F(Yr, {
|
|
3693
3693
|
key: 1,
|
|
3694
|
-
tree: J(
|
|
3694
|
+
tree: J(l).contentTree
|
|
3695
3695
|
}, null, 8, ["tree"])) : (U(), F(Ha, { key: 0 }))]))
|
|
3696
3696
|
], 2),
|
|
3697
3697
|
R("div", Xs, [R("nav", {
|
|
@@ -3705,23 +3705,23 @@ var Bs = { class: "td-header" }, Vs = { class: "td-header-left" }, Hs = ["href"]
|
|
|
3705
3705
|
}, [
|
|
3706
3706
|
J(k) ? (U(), F(Ja, {
|
|
3707
3707
|
key: 1,
|
|
3708
|
-
tree: J(
|
|
3708
|
+
tree: J(l).contentTree,
|
|
3709
3709
|
onSearch: ee
|
|
3710
3710
|
}, null, 8, ["tree"])) : (U(), L(N, { key: 0 }, [
|
|
3711
3711
|
K(e.$slots, "sidebar-top", {}, void 0, !0),
|
|
3712
3712
|
B(Co, {
|
|
3713
3713
|
ref_key: "sidebarSearch",
|
|
3714
|
-
ref:
|
|
3715
|
-
query:
|
|
3716
|
-
"onUpdate:query": r[3] ||= (e) =>
|
|
3717
|
-
active:
|
|
3718
|
-
"onUpdate:active": r[4] ||= (e) =>
|
|
3714
|
+
ref: y,
|
|
3715
|
+
query: m.value,
|
|
3716
|
+
"onUpdate:query": r[3] ||= (e) => m.value = e,
|
|
3717
|
+
active: h.value,
|
|
3718
|
+
"onUpdate:active": r[4] ||= (e) => h.value = e,
|
|
3719
3719
|
class: "td-sidebar-search"
|
|
3720
3720
|
}, null, 8, ["query", "active"]),
|
|
3721
3721
|
B(Ua, {
|
|
3722
|
-
tree: J(
|
|
3723
|
-
"search-active":
|
|
3724
|
-
ready:
|
|
3722
|
+
tree: J(l).contentTree,
|
|
3723
|
+
"search-active": h.value,
|
|
3724
|
+
ready: u.value
|
|
3725
3725
|
}, null, 8, [
|
|
3726
3726
|
"tree",
|
|
3727
3727
|
"search-active",
|
|
@@ -3767,7 +3767,7 @@ var Bs = { class: "td-header" }, Vs = { class: "td-header-left" }, Hs = ["href"]
|
|
|
3767
3767
|
class: "td-page-title",
|
|
3768
3768
|
innerHTML: J(n).titleHtml
|
|
3769
3769
|
}, null, 8, ac)) : I("", !0),
|
|
3770
|
-
J(n).fileMetadata ? (U(), L("div", oc, [R("span", null, q(J(b)(J(n).fileMetadata.
|
|
3770
|
+
J(n).fileMetadata ? (U(), L("div", oc, [R("span", null, q(J(b)(J(n).fileMetadata.mtimeSecs, "Modified")), 1), J(n).fileMetadata.ctimeSecs === J(n).fileMetadata.mtimeSecs ? I("", !0) : (U(), L("span", sc, " · " + q(J(b)(J(n).fileMetadata.ctimeSecs, "Created")), 1))])) : I("", !0),
|
|
3771
3771
|
B(J(oa), {
|
|
3772
3772
|
class: "td-frontmatter-inline",
|
|
3773
3773
|
schema: J(n).schema,
|
|
@@ -3796,17 +3796,17 @@ var Bs = { class: "td-header" }, Vs = { class: "td-header-left" }, Hs = ["href"]
|
|
|
3796
3796
|
K(e.$slots, "layout-bottom", {}, void 0, !0),
|
|
3797
3797
|
B(co, {
|
|
3798
3798
|
ref_key: "palette",
|
|
3799
|
-
ref:
|
|
3799
|
+
ref: S,
|
|
3800
3800
|
onToggleSidebar: ae,
|
|
3801
3801
|
onShowShortcuts: ne
|
|
3802
3802
|
}, null, 512),
|
|
3803
3803
|
B(po, {
|
|
3804
|
-
open:
|
|
3804
|
+
open: v.value,
|
|
3805
3805
|
onClose: T
|
|
3806
3806
|
}, null, 8, ["open"])
|
|
3807
3807
|
]));
|
|
3808
3808
|
}
|
|
3809
|
-
}), [["__scopeId", "data-v-
|
|
3809
|
+
}), [["__scopeId", "data-v-7895d684"]]), hc = { class: "pt-16 pb-24" }, gc = ["href"], _c = /* @__PURE__ */ V({
|
|
3810
3810
|
__name: "TdNotFound",
|
|
3811
3811
|
setup(e) {
|
|
3812
3812
|
let { withBase: t } = M();
|
|
@@ -3816,7 +3816,7 @@ var Bs = { class: "td-header" }, Vs = { class: "td-header-left" }, Hs = ["href"]
|
|
|
3816
3816
|
n[2] ||= R("p", { class: "text-td-fg-muted mt-2 text-td-base leading-td-relaxed" }, " The page you are looking for does not exist. ", -1),
|
|
3817
3817
|
R("a", {
|
|
3818
3818
|
class: "inline-flex items-center mt-6 text-td-accent text-td-sm font-extrabold tracking-td-tight hover:text-td-accent-hi",
|
|
3819
|
-
href: J(t)(J(
|
|
3819
|
+
href: J(t)(J(s)("/"))
|
|
3820
3820
|
}, "Go Home", 8, gc)
|
|
3821
3821
|
]));
|
|
3822
3822
|
}
|