typerighter 0.41.0 → 0.42.1
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-CrcoXWCG.js → app-xAspP0Kq.js} +5 -5
- package/dist/{cli-Chux95ZY.js → cli-CThN6kIr.js} +5 -5
- package/dist/cli.js +1 -2
- package/dist/client/theme-default.js +10 -25
- package/dist/client.js +1 -2
- package/dist/index.js +2 -2
- package/dist/{init-CjABoI2t.js → init-DSA-JLUJ.js} +9 -13
- package/dist/node/build/index.d.ts.map +1 -1
- package/dist/node/plugin/vite/virtual/utils.d.ts.map +1 -1
- package/dist/prerenderWorker.js +2 -2
- package/dist/shared.js +1 -2
- package/dist/{temml-DZbhOfRE.js → temml-D47Z4xZ2.js} +31 -38
- package/dist/{vite-Bsf15M7-.js → vite-Dup9wBL7.js} +133 -138
- package/dist/vite.js +1 -2
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { F as e, M as t, T as n, a as r, w as i } from "./shared-BMujDY3P.js";
|
|
2
2
|
import { t as a } from "./es-ClqUVRJn.js";
|
|
3
3
|
import { Fragment as o, computed as s, createApp as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, h, inject as g, markRaw as _, mergeProps as v, nextTick as y, openBlock as b, provide as x, reactive as ee, readonly as S, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, unref as k, vModelText as te, watch as ne, withDirectives as re, withKeys as ie, withModifiers as ae } from "vue";
|
|
4
|
-
//#region ../../node_modules/.pnpm/@lucide+vue@1.47.0_vue@3.5.
|
|
4
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.47.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/shared/src/build/defaultAttributes.mjs
|
|
5
5
|
var A = {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: 24,
|
|
@@ -14,7 +14,7 @@ var A = {
|
|
|
14
14
|
"stroke-linejoin": "round"
|
|
15
15
|
}, j = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim();
|
|
16
16
|
//#endregion
|
|
17
|
-
//#region ../../node_modules/.pnpm/@lucide+vue@1.47.0_vue@3.5.
|
|
17
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.47.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/shared/src/build/buildLucideIconNode.mjs
|
|
18
18
|
function M(e) {
|
|
19
19
|
return e != null;
|
|
20
20
|
}
|
|
@@ -51,7 +51,7 @@ function oe(e, t = {}) {
|
|
|
51
51
|
];
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
|
-
//#region ../../node_modules/.pnpm/@lucide+vue@1.47.0_vue@3.5.
|
|
54
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.47.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/shared/src/utils/hasA11yProp.mjs
|
|
55
55
|
var se = (e) => {
|
|
56
56
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
57
57
|
return !1;
|
|
@@ -60,7 +60,7 @@ function ue() {
|
|
|
60
60
|
return g(le, {});
|
|
61
61
|
}
|
|
62
62
|
//#endregion
|
|
63
|
-
//#region ../../node_modules/.pnpm/@lucide+vue@1.47.0_vue@3.5.
|
|
63
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.47.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
64
64
|
var de = ({ name: e, iconNode: t, "icon-node": n, icon: r = {
|
|
65
65
|
name: ce(e),
|
|
66
66
|
node: t ?? n,
|
|
@@ -83,7 +83,7 @@ var de = ({ name: e, iconNode: t, "icon-node": n, icon: r = {
|
|
|
83
83
|
return h("svg", T, [...E.map((e) => h(...e)), ...w ?? []]);
|
|
84
84
|
};
|
|
85
85
|
//#endregion
|
|
86
|
-
//#region ../../node_modules/.pnpm/@lucide+vue@1.47.0_vue@3.5.
|
|
86
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.47.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/createLucideIcon.mjs
|
|
87
87
|
function P(e, t = []) {
|
|
88
88
|
let n = typeof e == "string" ? {
|
|
89
89
|
name: e,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e, t } from "./vite-
|
|
1
|
+
import { r as e, t } from "./vite-Dup9wBL7.js";
|
|
2
2
|
import { n } from "./context-CSvoDxVt.js";
|
|
3
3
|
import r from "node:path";
|
|
4
4
|
import i from "picocolors";
|
|
@@ -363,7 +363,7 @@ function k() {
|
|
|
363
363
|
}), process.on("unhandledRejection", (e) => {
|
|
364
364
|
A("runtime", e instanceof Error ? e : Error(String(e)));
|
|
365
365
|
}), i.command("[root]", "Start dev server").alias("dev").option("--port <port>", "Port to listen on").option("--host", "Expose to network").option("--fresh", "Start fresh, ignore cache from previous session").option("--verbose", "Print version and build info").action(async (e, n) => {
|
|
366
|
-
n.verbose && console.log(`${O} cli v0.
|
|
366
|
+
n.verbose && console.log(`${O} cli v0.42.1 (built 10/12/2026, 3:41:25 AM)\n`), n.fresh && (process.env.TYPEDOWN_NO_CACHE = "1");
|
|
367
367
|
let r = await a({
|
|
368
368
|
root: M(e),
|
|
369
369
|
configFile: !1,
|
|
@@ -388,7 +388,7 @@ function k() {
|
|
|
388
388
|
}
|
|
389
389
|
process.exit(0);
|
|
390
390
|
}), i.command("init [root]", "Scaffold a new project").option("--name <name>", "Project name").option("--title <title>", "Site title").option("--description <description>", "Site description").option("--yes", "Skip confirmation for existing projects").action(async (e, t) => {
|
|
391
|
-
let { initialize: n } = await import("./init-
|
|
391
|
+
let { initialize: n } = await import("./init-DSA-JLUJ.js");
|
|
392
392
|
await n(M(e), t);
|
|
393
393
|
}), i.command("preview [root]", "Preview production build").option("--port <port>", "Port to listen on").action(async (e, t) => {
|
|
394
394
|
let r = M(e), i = n(r);
|
|
@@ -426,7 +426,7 @@ function k() {
|
|
|
426
426
|
} finally {
|
|
427
427
|
i.dispose();
|
|
428
428
|
}
|
|
429
|
-
}), i.help(), i.version("0.
|
|
429
|
+
}), i.help(), i.version("0.42.1"), i.parse();
|
|
430
430
|
}
|
|
431
431
|
function A(e, t) {
|
|
432
432
|
let n = t instanceof Error ? t.message : String(t);
|
|
@@ -434,7 +434,7 @@ function A(e, t) {
|
|
|
434
434
|
}
|
|
435
435
|
async function j(e) {
|
|
436
436
|
let t = await (await e.getTdContext()).rpc.getVersion();
|
|
437
|
-
console.log(`${O} cli v0.
|
|
437
|
+
console.log(`${O} cli v0.42.1 (built 10/12/2026, 3:41:25 AM)`), console.log(`${O} rpc v${t}`), console.log("");
|
|
438
438
|
}
|
|
439
439
|
function M(e) {
|
|
440
440
|
return r.resolve(e ?? process.cwd());
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as cli };
|
|
1
|
+
export { t as cli } from "./cli-CThN6kIr.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as e, C as t, E as n, F as r, I as i, L as a, N as o, O as s, W as c, X as l, Y as u, _ as d, a as f, b as p, c as m, f as h, k as g, l as _, n as v, p as y, r as b, s as x, v as S, w as C, y as w } from "../shared-BMujDY3P.js";
|
|
2
|
-
import { t as T } from "../temml-
|
|
2
|
+
import { t as T } from "../temml-D47Z4xZ2.js";
|
|
3
3
|
import { t as ee } from "../es-ClqUVRJn.js";
|
|
4
|
-
import { A as te, C as ne, D as E, E as re, F as ie, I as D, M as ae, N as oe, O as se, P as ce, S as le, T as ue, _ as de, a as fe, b as pe, c as O, d as k, f as me, g as he, h as ge, i as _e, j as ve, k as ye, m as A, n as be, o as xe, p as Se, r as j, s as Ce, u as we, v as Te, w as Ee, x as De, y as Oe } from "../app-
|
|
4
|
+
import { A as te, C as ne, D as E, E as re, F as ie, I as D, M as ae, N as oe, O as se, P as ce, S as le, T as ue, _ as de, a as fe, b as pe, c as O, d as k, f as me, g as he, h as ge, i as _e, j as ve, k as ye, m as A, n as be, o as xe, p as Se, r as j, s as Ce, u as we, v as Te, w as Ee, x as De, y as Oe } from "../app-xAspP0Kq.js";
|
|
5
5
|
import { a as ke, i as Ae, n as je, t as Me } from "../brand-CG1fQshq.js";
|
|
6
6
|
import { Fragment as M, Teleport as Ne, computed as N, createBlock as P, createCommentVNode as F, createElementBlock as I, createElementVNode as L, createTextVNode as R, createVNode as z, defineComponent as B, getCurrentScope as Pe, markRaw as Fe, mergeModels as Ie, mergeProps as Le, nextTick as Re, normalizeClass as V, normalizeStyle as ze, onBeforeUnmount as Be, onMounted as Ve, onScopeDispose as He, onUnmounted as Ue, openBlock as H, readonly as We, ref as U, renderList as W, renderSlot as Ge, resolveComponent as Ke, resolveDynamicComponent as G, shallowReadonly as qe, shallowRef as Je, toDisplayString as K, toValue as Ye, unref as q, useModel as Xe, useTemplateRef as Ze, vModelText as Qe, watch as J, watchEffect as $e, withCtx as et, withDirectives as tt, withKeys as nt, withModifiers as rt } from "vue";
|
|
7
7
|
var it = D({
|
|
@@ -879,7 +879,7 @@ var $n = {
|
|
|
879
879
|
});
|
|
880
880
|
};
|
|
881
881
|
//#endregion
|
|
882
|
-
//#region ../../node_modules/.pnpm/@floating-ui+vue@2.0.1_vue@3.5.
|
|
882
|
+
//#region ../../node_modules/.pnpm/@floating-ui+vue@2.0.1_vue@3.5.43_typescript@6.0.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs
|
|
883
883
|
function ar(e) {
|
|
884
884
|
return typeof e == "object" && !!e && "$el" in e;
|
|
885
885
|
}
|
|
@@ -945,14 +945,7 @@ function ur(e, t, n) {
|
|
|
945
945
|
typeof v == "function" && (v(), v = void 0);
|
|
946
946
|
}
|
|
947
947
|
function x() {
|
|
948
|
-
|
|
949
|
-
y();
|
|
950
|
-
return;
|
|
951
|
-
}
|
|
952
|
-
if (l.value != null && u.value != null) {
|
|
953
|
-
v = r(l.value, u.value, y);
|
|
954
|
-
return;
|
|
955
|
-
}
|
|
948
|
+
b(), r === void 0 ? y() : l.value != null && u.value != null && (v = r(l.value, u.value, y));
|
|
956
949
|
}
|
|
957
950
|
function S() {
|
|
958
951
|
i.value || (g.value = !1);
|
|
@@ -1212,9 +1205,9 @@ var dr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
|
1212
1205
|
t.value = !t.value;
|
|
1213
1206
|
}
|
|
1214
1207
|
return J(t, (e) => {
|
|
1215
|
-
typeof document
|
|
1208
|
+
typeof document < "u" && (e ? document.addEventListener("click", r) : document.removeEventListener("click", r));
|
|
1216
1209
|
}), Ue(() => {
|
|
1217
|
-
typeof document
|
|
1210
|
+
typeof document < "u" && document.removeEventListener("click", r);
|
|
1218
1211
|
}), (e, r) => (H(), I("span", Le({
|
|
1219
1212
|
ref_key: "wrapper",
|
|
1220
1213
|
ref: n
|
|
@@ -1891,7 +1884,7 @@ function oa(e) {
|
|
|
1891
1884
|
}), Ue(() => {
|
|
1892
1885
|
window.removeEventListener("scroll", a), r !== void 0 && cancelAnimationFrame(r);
|
|
1893
1886
|
}), J(e, (e) => {
|
|
1894
|
-
typeof window
|
|
1887
|
+
typeof window < "u" && Re(() => o(e));
|
|
1895
1888
|
}, { immediate: !0 }), t;
|
|
1896
1889
|
}
|
|
1897
1890
|
function sa(e) {
|
|
@@ -2044,11 +2037,7 @@ function ya() {
|
|
|
2044
2037
|
let s = y(o, 150);
|
|
2045
2038
|
function c(e) {
|
|
2046
2039
|
let t = e.trim();
|
|
2047
|
-
|
|
2048
|
-
n.value = [], r.value = !1;
|
|
2049
|
-
return;
|
|
2050
|
-
}
|
|
2051
|
-
r.value = !0, s(t);
|
|
2040
|
+
t.length === 0 ? (n.value = [], r.value = !1) : (r.value = !0, s(t));
|
|
2052
2041
|
}
|
|
2053
2042
|
function d() {
|
|
2054
2043
|
r.value = !1;
|
|
@@ -2318,7 +2307,7 @@ function za() {
|
|
|
2318
2307
|
return;
|
|
2319
2308
|
}
|
|
2320
2309
|
let a = i.closest("th");
|
|
2321
|
-
e && e !== a && (e.classList.remove("is-near-border"), e = void 0),
|
|
2310
|
+
e && e !== a && (e.classList.remove("is-near-border"), e = void 0), a && a.nextElementSibling && (n(a, r.clientX) ? (a.classList.add("is-near-border"), e = a) : (a.classList.remove("is-near-border"), e = void 0));
|
|
2322
2311
|
}
|
|
2323
2312
|
function i(e) {
|
|
2324
2313
|
let r = e.target?.closest(".td-content th");
|
|
@@ -2419,11 +2408,7 @@ var Ga = { class: "td-header" }, Ka = { class: "td-header-left" }, qa = ["href"]
|
|
|
2419
2408
|
J(() => m.path, () => u()), Ma(), Ua();
|
|
2420
2409
|
let h = Ze("sidebarSearch"), g = Ze("menuSearch");
|
|
2421
2410
|
function _() {
|
|
2422
|
-
|
|
2423
|
-
g.value?.blur(), h.value?.blur(), c.value && u();
|
|
2424
|
-
return;
|
|
2425
|
-
}
|
|
2426
|
-
c.value ? g.value?.focus() : h.value?.isVisible ? h.value.focus() : (l(), Re(() => g.value?.focus()));
|
|
2411
|
+
g.value?.isFocused || h.value?.isFocused ? (g.value?.blur(), h.value?.blur(), c.value && u()) : c.value ? g.value?.focus() : h.value?.isVisible ? h.value.focus() : (l(), Re(() => g.value?.focus()));
|
|
2427
2412
|
}
|
|
2428
2413
|
Pa([$.Control, $.k], _), Pa([$.Meta, $.k], _), $e(() => {
|
|
2429
2414
|
if (typeof document > "u") return;
|
package/dist/client.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { a as Content, o as createTypedownApp, t as useRoute, r as useRouter, i as useSiteConfig, n as useSiteData, e as useTdContent };
|
|
1
|
+
export { s as Content, t as createTypedownApp, c as useRoute, l as useRouter, r as useSiteConfig, i as useSiteData, a as useTdContent } from "./app-xAspP0Kq.js";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./vite-
|
|
2
|
-
import { t as r } from "./cli-
|
|
1
|
+
import { n as e, r as t, t as n } from "./vite-Dup9wBL7.js";
|
|
2
|
+
import { t as r } from "./cli-CThN6kIr.js";
|
|
3
3
|
export { t as buildSite, r as cli, e as generateClientAppEntry, n as typedown };
|
|
@@ -101,20 +101,16 @@ var m = (() => {
|
|
|
101
101
|
if (n.hard && i > t) {
|
|
102
102
|
let e = t - c, n = 1 + Math.floor((i - e - 1) / t);
|
|
103
103
|
Math.floor((i - 1) / t) < n && s.push(""), F(s, r, t), c = S(s.at(-1) ?? "");
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
} else {
|
|
105
|
+
if (c + i > t && c && i) {
|
|
106
|
+
if (n.wordWrap === !1 && c < t) {
|
|
107
|
+
F(s, r, t), c = S(s.at(-1) ?? "");
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
s.push(""), c = 0;
|
|
110
111
|
}
|
|
111
|
-
s.
|
|
112
|
-
}
|
|
113
|
-
if (c + i > t && n.wordWrap === !1) {
|
|
114
|
-
F(s, r, t), c = S(s.at(-1) ?? "");
|
|
115
|
-
continue;
|
|
112
|
+
c + i > t && n.wordWrap === !1 ? (F(s, r, t), c = S(s.at(-1) ?? "")) : (s[s.length - 1] += r, c += i);
|
|
116
113
|
}
|
|
117
|
-
s[s.length - 1] += r, c += i;
|
|
118
114
|
}
|
|
119
115
|
n.trim !== !1 && (s = s.map((e) => ae(e)));
|
|
120
116
|
let l = s.join("\n"), u = !1;
|
|
@@ -750,7 +746,7 @@ function He(e) {
|
|
|
750
746
|
build: "typerighter build",
|
|
751
747
|
preview: "typerighter preview"
|
|
752
748
|
},
|
|
753
|
-
devDependencies: { typerighter: "^0.
|
|
749
|
+
devDependencies: { typerighter: "^0.42.1" }
|
|
754
750
|
}, void 0, 2) + "\n";
|
|
755
751
|
}
|
|
756
752
|
function Ue() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/build/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACE,KAAK,YAAY,EACzB,MAAM,MAAM,CAAC;AAcd,OAAO,KAAK,EACV,UAAU,EACX,MAAM,YAAY,CAAC;AAOpB,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,UAAU,CAAC,EAAE,YAAY,CAAC;CAC3B;AAGD,wBAAsB,SAAS,CAAE,GAAG,EAAE,UAAU,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/build/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACE,KAAK,YAAY,EACzB,MAAM,MAAM,CAAC;AAcd,OAAO,KAAK,EACV,UAAU,EACX,MAAM,YAAY,CAAC;AAOpB,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,UAAU,CAAC,EAAE,YAAY,CAAC;CAC3B;AAGD,wBAAsB,SAAS,CAAE,GAAG,EAAE,UAAU,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwM3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/node/plugin/vite/virtual/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,aAAa;IAC5B,IAAI,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/node/plugin/vite/virtual/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACzD,UAAU,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;CACzC;AAGD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,MAAM,GACjB,IAAI,CAsBN"}
|
package/dist/prerenderWorker.js
CHANGED
|
@@ -3,10 +3,10 @@ import { a as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./jsonld
|
|
|
3
3
|
import { pathToFileURL as c } from "node:url";
|
|
4
4
|
import { parentPort as l, workerData as u } from "node:worker_threads";
|
|
5
5
|
//#region src/node/build/prerenderWorker.ts
|
|
6
|
-
var d = u, f = await import(c(d.ssrEntryPath).href);
|
|
6
|
+
var d = u, f = await (await import(c(d.ssrEntryPath).href)).createRenderer();
|
|
7
7
|
l.on("message", async (c) => {
|
|
8
8
|
try {
|
|
9
|
-
let u = await f
|
|
9
|
+
let u = await f(c), p = i(u.pageData), m = t(u.pageData), h = a(u.pageData), g = d.base + e(c), _ = [s({
|
|
10
10
|
title: p,
|
|
11
11
|
description: m,
|
|
12
12
|
canonicalUrl: g,
|
package/dist/shared.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { c as CONTENT_EXTENSIONS, F as CONTENT_GLOB, o as EXTERNAL_URL_RE, s as INDEX_FILENAME, v as SEARCH_FIELDS, _ as SEARCH_STORE_FIELDS, E as buildContentTree, T as buildDirectoryListingMap, P as debounce, S as escapeHtml, L as escapeRegex, R as formatAbsoluteTime, M as formatDateString, I as formatEditTime, D as formatIsoDate, b as formatRelativeTime, N as formatTime, H as getAnchor, p as getDirectoryFromPageUrl, n as getDirectoryUrl, V as getIndexUrl, y as getNodeIndexItem, m as getParentUrl, i as getTdContentUrl, B as getTdIndexTitle, U as getTdResourceTitle, r as getUrlPath, w as isBuiltinField, x as isIndexFile, d as isIndexUrl, k as isUrlAncestorOf, e as isUrlExternal, O as isUrlToPage, h as parseNumericPrefix, t as path, l as resolveRootUrl, A as sanitizeInlineHtml, u as stripAnchor, z as stripHtml, f as stripLeadingSlash, a as stripTrailingSlash, j as throttle, C as unescapeHtml, g as unslugify };
|
|
1
|
+
export { K as CONTENT_EXTENSIONS, q as CONTENT_GLOB, G as EXTERNAL_URL_RE, J as INDEX_FILENAME, Y as SEARCH_FIELDS, X as SEARCH_STORE_FIELDS, h as buildContentTree, g as buildDirectoryListingMap, p as debounce, c as escapeHtml, s as escapeRegex, t as formatAbsoluteTime, n as formatDateString, r as formatEditTime, i as formatIsoDate, a as formatRelativeTime, o as formatTime, x as getAnchor, S as getDirectoryFromPageUrl, C as getDirectoryUrl, w as getIndexUrl, _ as getNodeIndexItem, T as getParentUrl, E as getTdContentUrl, v as getTdIndexTitle, y as getTdResourceTitle, D as getUrlPath, f as isBuiltinField, b as isIndexFile, O as isIndexUrl, k as isUrlAncestorOf, A as isUrlExternal, j as isUrlToPage, U as parseNumericPrefix, B as path, M as resolveRootUrl, l as sanitizeInlineHtml, N as stripAnchor, u as stripHtml, P as stripLeadingSlash, F as stripTrailingSlash, m as throttle, d as unescapeHtml, W as unslugify } from "./shared-BMujDY3P.js";
|
|
@@ -399,30 +399,30 @@ function Te(e, t, n) {
|
|
|
399
399
|
a.length > 0 && i.push(new x("mrow", a)), i.push(n), a = [];
|
|
400
400
|
let e = new x("mtd", i);
|
|
401
401
|
e.style.textAlign = "left", r.push(new x("mtr", [e])), i = [], s += 1;
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
402
|
+
} else {
|
|
403
|
+
if (a.push(n), n.type && n.type === "mo" && n.children.length === 1 && !(n.attributes.form && n.attributes.form === "prefix") && !Object.prototype.hasOwnProperty.call(n.attributes, "movablelimits")) {
|
|
404
|
+
let r = n.children[0].text;
|
|
405
|
+
if (t === "=" && r === "=") {
|
|
406
|
+
if (o += 1, o > 1) {
|
|
407
|
+
a.pop();
|
|
408
|
+
let e = new x("mrow", a);
|
|
409
|
+
i.push(e), a = [n];
|
|
410
|
+
}
|
|
411
|
+
} else if (t === "tex") {
|
|
412
|
+
let t = s < e.length - 1 ? e[s + 1] : null, n = !0;
|
|
413
|
+
if (!(t && t.type === "mtext" && t.attributes.linebreak && t.attributes.linebreak === "nobreak")) for (let t = s + 1; t < e.length; t++) {
|
|
414
|
+
let r = e[t];
|
|
415
|
+
if (r.type && r.type === "mspace" && !(r.attributes.linebreak && r.attributes.linebreak === "newline")) a.push(r), s += 1, r.attributes && r.attributes.linebreak && r.attributes.linebreak === "nobreak" && (n = !1);
|
|
416
|
+
else break;
|
|
417
|
+
}
|
|
418
|
+
if (n) {
|
|
419
|
+
let e = new x("mrow", a);
|
|
420
|
+
i.push(e), a = [];
|
|
421
|
+
}
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
+
s += 1;
|
|
424
425
|
}
|
|
425
|
-
s += 1;
|
|
426
426
|
}
|
|
427
427
|
if (a.length > 0) {
|
|
428
428
|
let e = new x("mrow", a);
|
|
@@ -509,24 +509,17 @@ var Ae = (e, t) => {
|
|
|
509
509
|
for (let n = 0; n < e.length; n++) i.push(V(e[n], t));
|
|
510
510
|
for (let t = 0; t < i.length; t++) {
|
|
511
511
|
let n = i[t];
|
|
512
|
-
if (t < e.length - 1 && je(e[t]) && je(e[t + 1]) && n.setAttribute("rspace", "0em"), t > 0 && je(e[t]) && je(e[t - 1]) && n.setAttribute("lspace", "0em"), n.type === "mn" && a && a.type === "mn")
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
continue;
|
|
523
|
-
}
|
|
524
|
-
if (n.type === "mn" && ke(a)) n.children = [...a.children, ...n.children], r.pop();
|
|
525
|
-
else if ((n.type === "msup" || n.type === "msub") && n.children.length >= 1 && a && (a.type === "mn" || ke(a))) {
|
|
526
|
-
let e = n.children[0];
|
|
527
|
-
e instanceof x && e.type === "mn" && a && (e.children = [...a.children, ...e.children], r.pop());
|
|
512
|
+
if (t < e.length - 1 && je(e[t]) && je(e[t + 1]) && n.setAttribute("rspace", "0em"), t > 0 && je(e[t]) && je(e[t - 1]) && n.setAttribute("lspace", "0em"), n.type === "mn" && a && a.type === "mn") a.children.push(...n.children);
|
|
513
|
+
else if (ke(n) && a && a.type === "mn") a.children.push(...n.children);
|
|
514
|
+
else if (a && a.type === "mn" && t < i.length - 1 && i[t + 1].type === "mn" && Ae(e, t)) a.children.push(...n.children);
|
|
515
|
+
else {
|
|
516
|
+
if (n.type === "mn" && ke(a)) n.children = [...a.children, ...n.children], r.pop();
|
|
517
|
+
else if ((n.type === "msup" || n.type === "msub") && n.children.length >= 1 && a && (a.type === "mn" || ke(a))) {
|
|
518
|
+
let e = n.children[0];
|
|
519
|
+
e instanceof x && e.type === "mn" && a && (e.children = [...a.children, ...e.children], r.pop());
|
|
520
|
+
}
|
|
521
|
+
r.push(n), a = n;
|
|
528
522
|
}
|
|
529
|
-
r.push(n), a = n;
|
|
530
523
|
}
|
|
531
524
|
return r;
|
|
532
525
|
}, B = function(e, t, n = !1) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { D as e, E as t, F as n, H as r, K as i, L as a, P as o, R as s, V as c, X as l, Y as u, _ as d, b as f, c as p, d as m, g as h, h as g, i as _, p as v, q as y, v as b, w as x, y as S, z as C } from "./shared-BMujDY3P.js";
|
|
2
2
|
import { a as w, i as T, n as E, o as ee, r as D, s as O, t as te } from "./jsonld-Du1iJ_fG.js";
|
|
3
|
-
import { t as ne } from "./temml-
|
|
3
|
+
import { t as ne } from "./temml-D47Z4xZ2.js";
|
|
4
4
|
import { a as re, i as ie, n as ae, r as oe } from "./context-CSvoDxVt.js";
|
|
5
5
|
import { t as se } from "./es-ClqUVRJn.js";
|
|
6
6
|
import k, { resolve as A } from "node:path";
|
|
@@ -137,33 +137,30 @@ async function ke(e, t, n) {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
async function Ae(e, t, n) {
|
|
140
|
-
let r = await import(e.ssrEntryPath), i = e.pagePaths.length, a = 0;
|
|
141
|
-
for (let s
|
|
142
|
-
let c =
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}), h = s === "/" ? "index.html" : `${o(s)}.html`, g = k.join(e.outDir, h);
|
|
165
|
-
await N.mkdir(k.dirname(g), { recursive: !0 }), await N.writeFile(g, m), a++, e.progress?.update(a, i);
|
|
166
|
-
}));
|
|
140
|
+
let r = await (await import(e.ssrEntryPath)).createRenderer(), i = e.pagePaths.length, a = 0;
|
|
141
|
+
for (let s of e.pagePaths) {
|
|
142
|
+
let c = await r(s), l = ee(c.pageData), u = w(c.pageData), d = D(c.pageData), f = e.base + o(s), p = [te({
|
|
143
|
+
title: l,
|
|
144
|
+
description: u,
|
|
145
|
+
canonicalUrl: f,
|
|
146
|
+
author: e.author,
|
|
147
|
+
dateModified: d
|
|
148
|
+
}), E(s, l)].filter((e) => e !== void 0), m = O({
|
|
149
|
+
title: l,
|
|
150
|
+
description: u,
|
|
151
|
+
siteTitle: e.siteTitle,
|
|
152
|
+
author: e.author,
|
|
153
|
+
base: e.base,
|
|
154
|
+
origin: e.origin,
|
|
155
|
+
lang: e.lang,
|
|
156
|
+
entryScript: t,
|
|
157
|
+
canonicalUrl: f,
|
|
158
|
+
ogImagePath: T(c.pageData),
|
|
159
|
+
jsonLdBlocks: p,
|
|
160
|
+
headExtra: n,
|
|
161
|
+
appContent: c.html
|
|
162
|
+
}), h = s === "/" ? "index.html" : `${o(s)}.html`, g = k.join(e.outDir, h);
|
|
163
|
+
await N.mkdir(k.dirname(g), { recursive: !0 }), await N.writeFile(g, m), a++, e.progress?.update(a, i);
|
|
167
164
|
}
|
|
168
165
|
}
|
|
169
166
|
async function je(e) {
|
|
@@ -221,52 +218,51 @@ async function I(e, t = {}) {
|
|
|
221
218
|
recursive: !0,
|
|
222
219
|
force: !0
|
|
223
220
|
});
|
|
224
|
-
let s = await e.getTdContext(), [l, u, d
|
|
221
|
+
let s = await e.getTdContext(), [l, u, d] = await Promise.all([
|
|
225
222
|
s.getConfig(),
|
|
226
223
|
s.listFiles(),
|
|
227
|
-
s.listSidebar()
|
|
228
|
-
|
|
229
|
-
]), p = l.origin ?? void 0, m = l.author ?? void 0, h = l.license ?? void 0, _ = l.repo ?? void 0, v = t.base ?? l.basePath ?? "/", y = v.endsWith("/") ? v : v + "/", b = d.map((e) => ({
|
|
224
|
+
s.listSidebar()
|
|
225
|
+
]), f = l.origin ?? void 0, p = l.author ?? void 0, m = l.license ?? void 0, h = l.repo ?? void 0, _ = t.base ?? l.basePath ?? "/", v = _.endsWith("/") ? _ : _ + "/", y = d.map((e) => ({
|
|
230
226
|
...e,
|
|
231
227
|
header: {}
|
|
232
|
-
})),
|
|
228
|
+
})), b = g(y), x = JSON.stringify({
|
|
233
229
|
title: l.siteTitle,
|
|
234
230
|
description: l.siteDescription,
|
|
235
|
-
basePath:
|
|
236
|
-
origin:
|
|
231
|
+
basePath: v,
|
|
232
|
+
origin: f,
|
|
237
233
|
lang: l.lang,
|
|
238
234
|
nav: l.nav
|
|
239
|
-
}),
|
|
235
|
+
}), S = JSON.stringify({
|
|
240
236
|
ready: !0,
|
|
241
|
-
contentTree:
|
|
242
|
-
}),
|
|
243
|
-
await N.mkdir(
|
|
244
|
-
let
|
|
245
|
-
await Promise.all([N.writeFile(
|
|
237
|
+
contentTree: b
|
|
238
|
+
}), C = k.join(n, "node_modules", ".typerighter");
|
|
239
|
+
await N.mkdir(C, { recursive: !0 });
|
|
240
|
+
let w = k.join(C, "client-entry.js"), T = k.join(C, "ssr-entry.js");
|
|
241
|
+
await Promise.all([N.writeFile(w, Q({
|
|
246
242
|
rootDir: l.rootDir,
|
|
247
|
-
basePath:
|
|
248
|
-
origin:
|
|
243
|
+
basePath: v,
|
|
244
|
+
origin: f,
|
|
249
245
|
lang: l.lang,
|
|
250
246
|
siteTitle: l.siteTitle,
|
|
251
247
|
siteDescription: l.siteDescription,
|
|
252
|
-
repo:
|
|
253
|
-
author:
|
|
254
|
-
license:
|
|
248
|
+
repo: h,
|
|
249
|
+
author: p,
|
|
250
|
+
license: m,
|
|
255
251
|
nav: l.nav
|
|
256
|
-
})), N.writeFile(
|
|
252
|
+
})), N.writeFile(T, Pe({
|
|
257
253
|
rootDir: l.rootDir,
|
|
258
254
|
layoutImport: Ne,
|
|
259
|
-
siteConfig:
|
|
260
|
-
siteData:
|
|
255
|
+
siteConfig: x,
|
|
256
|
+
siteData: S
|
|
261
257
|
}))]);
|
|
262
258
|
try {
|
|
263
|
-
let s =
|
|
259
|
+
let s = $({ context: e }), m = e.createViteLogger(), h = new F(r, "Building client bundle...");
|
|
264
260
|
await M({
|
|
265
261
|
...t.viteConfig,
|
|
266
262
|
root: n,
|
|
267
|
-
base:
|
|
263
|
+
base: v,
|
|
268
264
|
plugins: s,
|
|
269
|
-
customLogger:
|
|
265
|
+
customLogger: m,
|
|
270
266
|
logLevel: "silent",
|
|
271
267
|
build: {
|
|
272
268
|
...t.viteConfig?.build,
|
|
@@ -275,7 +271,7 @@ async function I(e, t = {}) {
|
|
|
275
271
|
emptyOutDir: !0,
|
|
276
272
|
rollupOptions: {
|
|
277
273
|
...t.viteConfig?.build?.rollupOptions,
|
|
278
|
-
input:
|
|
274
|
+
input: w
|
|
279
275
|
}
|
|
280
276
|
}
|
|
281
277
|
});
|
|
@@ -285,49 +281,49 @@ async function I(e, t = {}) {
|
|
|
285
281
|
await M({
|
|
286
282
|
...t.viteConfig,
|
|
287
283
|
root: n,
|
|
288
|
-
base:
|
|
284
|
+
base: v,
|
|
289
285
|
plugins: s,
|
|
290
|
-
customLogger:
|
|
286
|
+
customLogger: m,
|
|
291
287
|
logLevel: "silent",
|
|
292
288
|
build: {
|
|
293
289
|
...t.viteConfig?.build,
|
|
294
290
|
outDir: o,
|
|
295
|
-
ssr:
|
|
291
|
+
ssr: T,
|
|
296
292
|
emptyOutDir: !0
|
|
297
293
|
}
|
|
298
294
|
}), _.done("SSR bundle");
|
|
299
|
-
let
|
|
295
|
+
let y = u.map((e) => {
|
|
300
296
|
let t = c(e);
|
|
301
297
|
return t === "index" ? "/" : `/${t}`;
|
|
302
298
|
});
|
|
303
|
-
|
|
304
|
-
let
|
|
299
|
+
y.push("/"), L(b.entries, "", y);
|
|
300
|
+
let x = new F(r, "Pre-rendering pages...");
|
|
305
301
|
await Oe({
|
|
306
302
|
ssrEntryPath: k.join(o, "ssr-entry.js"),
|
|
307
303
|
clientOutDir: a,
|
|
308
304
|
outDir: i,
|
|
309
|
-
base:
|
|
310
|
-
origin:
|
|
305
|
+
base: v,
|
|
306
|
+
origin: f,
|
|
311
307
|
lang: l.lang,
|
|
312
|
-
pagePaths:
|
|
308
|
+
pagePaths: y,
|
|
313
309
|
siteTitle: l.siteTitle,
|
|
314
|
-
author:
|
|
315
|
-
progress:
|
|
316
|
-
}),
|
|
310
|
+
author: p,
|
|
311
|
+
progress: x
|
|
312
|
+
}), x.done(`Pre-rendered ${y.length} pages`);
|
|
317
313
|
let S = /* @__PURE__ */ new Map();
|
|
318
314
|
for (let e of d) {
|
|
319
315
|
let t = c(e.filepath), n = t === "index" ? "/" : `/${t}`;
|
|
320
316
|
S.set(n, e.fileMetadata.mtime);
|
|
321
317
|
}
|
|
322
|
-
let C = we(
|
|
323
|
-
|
|
318
|
+
let C = we(y, v, f, S), E = [N.writeFile(k.join(i, "sitemap.xml"), C)];
|
|
319
|
+
f !== void 0 && (E.push(N.writeFile(k.join(i, "robots.txt"), Te(f, v))), E.push(N.writeFile(k.join(i, "feed.xml"), Ee(d, v, f, l.siteTitle, l.siteDescription, l.lang)))), await Promise.all(E);
|
|
324
320
|
let ee = k.join(a, "assets"), D = k.join(i, "assets");
|
|
325
321
|
await N.cp(ee, D, { recursive: !0 }).catch(() => {}), await Fe(k.join(n, l.rootDir), i);
|
|
326
322
|
let O = k.join(n, l.publicDir);
|
|
327
323
|
await N.cp(O, i, { recursive: !0 }).catch(() => {});
|
|
328
324
|
} finally {
|
|
329
325
|
await Promise.all([
|
|
330
|
-
N.rm(
|
|
326
|
+
N.rm(C, {
|
|
331
327
|
recursive: !0,
|
|
332
328
|
force: !0
|
|
333
329
|
}),
|
|
@@ -384,11 +380,13 @@ function loadPageModule(pagePath) {
|
|
|
384
380
|
return Promise.resolve(undefined);
|
|
385
381
|
}
|
|
386
382
|
|
|
387
|
-
export async function
|
|
383
|
+
export async function createRenderer() {
|
|
388
384
|
const { app, router } = await createTypedownApp(loadPageModule, theme.Layout, ${e.siteConfig}, siteData);
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
385
|
+
return async function render(url) {
|
|
386
|
+
await router.go(url, { replace: true });
|
|
387
|
+
const html = await renderToString(app);
|
|
388
|
+
return { html, pageData: router.route.data };
|
|
389
|
+
};
|
|
392
390
|
}
|
|
393
391
|
`;
|
|
394
392
|
}
|
|
@@ -866,25 +864,22 @@ var q = "\0@typedown/pages?resource=", J = "@typedown/site-data", bt = "\0@typed
|
|
|
866
864
|
//#region src/node/plugin/vite/virtual/utils.ts
|
|
867
865
|
function Z(e, t) {
|
|
868
866
|
let n = e.moduleGraph.getModuleById(t);
|
|
869
|
-
if (
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
}
|
|
882
|
-
function St(e) {
|
|
883
|
-
return e.startsWith("\0") ? "/@id/__x00__" + e.slice(1) : e;
|
|
867
|
+
if (n) {
|
|
868
|
+
e.moduleGraph.invalidateModule(n);
|
|
869
|
+
for (let t of n.importers) e.hot.send({
|
|
870
|
+
type: "update",
|
|
871
|
+
updates: [{
|
|
872
|
+
type: "js-update",
|
|
873
|
+
path: t.url,
|
|
874
|
+
acceptedPath: n.url,
|
|
875
|
+
timestamp: Date.now()
|
|
876
|
+
}]
|
|
877
|
+
});
|
|
878
|
+
}
|
|
884
879
|
}
|
|
885
880
|
//#endregion
|
|
886
881
|
//#region src/node/plugin/vite/virtual/app.ts
|
|
887
|
-
var
|
|
882
|
+
var St = class {
|
|
888
883
|
async load(e) {
|
|
889
884
|
let t = await e.getConfig();
|
|
890
885
|
return Q({
|
|
@@ -985,7 +980,7 @@ if (import.meta.hot) {
|
|
|
985
980
|
}
|
|
986
981
|
//#endregion
|
|
987
982
|
//#region src/node/plugin/vite/virtual/pages.ts
|
|
988
|
-
var
|
|
983
|
+
var Ct = class {
|
|
989
984
|
async load(e) {
|
|
990
985
|
let t = (await e.getConfig()).rootDir ?? ".";
|
|
991
986
|
return `export const pages = import.meta.glob('${t === "." ? "/**/*.{td,md}" : `/${t}/**/*.{td,md}`}');`;
|
|
@@ -1021,12 +1016,12 @@ var wt = class {
|
|
|
1021
1016
|
invalidate(e) {
|
|
1022
1017
|
Z(e, K);
|
|
1023
1018
|
}
|
|
1024
|
-
},
|
|
1019
|
+
}, wt = "\0@typedown/site-data", Tt = {
|
|
1025
1020
|
ready: !1,
|
|
1026
1021
|
contentTree: { entries: [] },
|
|
1027
1022
|
schemas: {},
|
|
1028
1023
|
directoryListings: {}
|
|
1029
|
-
},
|
|
1024
|
+
}, Et = class {
|
|
1030
1025
|
data;
|
|
1031
1026
|
scan(e) {
|
|
1032
1027
|
let t = ye("**/*.td", {
|
|
@@ -1047,27 +1042,27 @@ var wt = class {
|
|
|
1047
1042
|
let t = this.data ? {
|
|
1048
1043
|
ready: !0,
|
|
1049
1044
|
...this.data
|
|
1050
|
-
} :
|
|
1045
|
+
} : Tt;
|
|
1051
1046
|
return `export default ${JSON.stringify(t)}`;
|
|
1052
1047
|
}
|
|
1053
1048
|
clear() {
|
|
1054
1049
|
this.data = void 0;
|
|
1055
1050
|
}
|
|
1056
1051
|
fetch = v((e, t) => {
|
|
1057
|
-
|
|
1052
|
+
Dt(e).then((e) => {
|
|
1058
1053
|
this.data = e, t && this.invalidate(t);
|
|
1059
1054
|
}).catch((e) => {
|
|
1060
1055
|
console.error("[typedown] Failed to fetch site data:", e instanceof Error ? e.message : e);
|
|
1061
1056
|
});
|
|
1062
1057
|
}, 200);
|
|
1063
1058
|
async fetchSync(e) {
|
|
1064
|
-
this.data = await
|
|
1059
|
+
this.data = await Dt(e);
|
|
1065
1060
|
}
|
|
1066
1061
|
invalidate(e) {
|
|
1067
|
-
Z(e,
|
|
1062
|
+
Z(e, wt);
|
|
1068
1063
|
}
|
|
1069
1064
|
};
|
|
1070
|
-
async function
|
|
1065
|
+
async function Dt(e) {
|
|
1071
1066
|
let [t, n, r] = await Promise.all([
|
|
1072
1067
|
e.getConfig(),
|
|
1073
1068
|
e.listSidebar(),
|
|
@@ -1084,7 +1079,7 @@ async function Ot(e) {
|
|
|
1084
1079
|
}
|
|
1085
1080
|
//#endregion
|
|
1086
1081
|
//#region src/node/lib/search-indexer/index.ts
|
|
1087
|
-
var
|
|
1082
|
+
var Ot = class {
|
|
1088
1083
|
index;
|
|
1089
1084
|
constructor() {
|
|
1090
1085
|
this.index = new se({
|
|
@@ -1108,19 +1103,19 @@ var kt = class {
|
|
|
1108
1103
|
};
|
|
1109
1104
|
//#endregion
|
|
1110
1105
|
//#region src/node/lib/search-indexer/scan.ts
|
|
1111
|
-
function
|
|
1112
|
-
let n =
|
|
1106
|
+
function kt(e, t) {
|
|
1107
|
+
let n = Nt(e), r = [];
|
|
1113
1108
|
for (let t of n) {
|
|
1114
|
-
let n =
|
|
1109
|
+
let n = Mt(e, t);
|
|
1115
1110
|
n && r.push(n);
|
|
1116
1111
|
}
|
|
1117
1112
|
t.addAll(r);
|
|
1118
1113
|
}
|
|
1119
|
-
function
|
|
1120
|
-
let i =
|
|
1114
|
+
function At(e, n, r) {
|
|
1115
|
+
let i = Mt(e, A(e, n));
|
|
1121
1116
|
i ? r.addPage(i) : r.discardPage(t(n));
|
|
1122
1117
|
}
|
|
1123
|
-
function
|
|
1118
|
+
function jt(e, t) {
|
|
1124
1119
|
let n = S(e);
|
|
1125
1120
|
if (!t.startsWith("---")) return {
|
|
1126
1121
|
title: n,
|
|
@@ -1137,7 +1132,7 @@ function Mt(e, t) {
|
|
|
1137
1132
|
body: a
|
|
1138
1133
|
};
|
|
1139
1134
|
}
|
|
1140
|
-
function
|
|
1135
|
+
function Mt(e, n) {
|
|
1141
1136
|
let r;
|
|
1142
1137
|
try {
|
|
1143
1138
|
r = be(n, "utf-8");
|
|
@@ -1145,14 +1140,14 @@ function Nt(e, n) {
|
|
|
1145
1140
|
return;
|
|
1146
1141
|
}
|
|
1147
1142
|
if (!r.trim()) return;
|
|
1148
|
-
let i = n.slice(e.length + 1), { title: a, body: o } =
|
|
1143
|
+
let i = n.slice(e.length + 1), { title: a, body: o } = jt(i, r);
|
|
1149
1144
|
return {
|
|
1150
1145
|
id: t(i),
|
|
1151
1146
|
title: a,
|
|
1152
1147
|
text: `${a}\n${o}`
|
|
1153
1148
|
};
|
|
1154
1149
|
}
|
|
1155
|
-
function
|
|
1150
|
+
function Nt(e) {
|
|
1156
1151
|
return ye("**/*.td", {
|
|
1157
1152
|
cwd: e,
|
|
1158
1153
|
exclude: (e) => e.startsWith("_")
|
|
@@ -1160,33 +1155,33 @@ function Pt(e) {
|
|
|
1160
1155
|
}
|
|
1161
1156
|
//#endregion
|
|
1162
1157
|
//#region src/node/plugin/vite/virtual/search-index.ts
|
|
1163
|
-
var
|
|
1164
|
-
indexer = new
|
|
1158
|
+
var Pt = "\0@typedown/search-index", Ft = class {
|
|
1159
|
+
indexer = new Ot();
|
|
1165
1160
|
load(e) {
|
|
1166
1161
|
return `export default ${JSON.stringify(this.indexer.serialize())}`;
|
|
1167
1162
|
}
|
|
1168
1163
|
index(e) {
|
|
1169
|
-
|
|
1164
|
+
kt(e, this.indexer);
|
|
1170
1165
|
}
|
|
1171
1166
|
reindex(e, t) {
|
|
1172
|
-
|
|
1167
|
+
At(e, t, this.indexer);
|
|
1173
1168
|
}
|
|
1174
1169
|
invalidate(e) {
|
|
1175
|
-
Z(e,
|
|
1170
|
+
Z(e, Pt);
|
|
1176
1171
|
}
|
|
1177
|
-
},
|
|
1178
|
-
function
|
|
1172
|
+
}, It = Se(import.meta.url);
|
|
1173
|
+
function Lt() {
|
|
1179
1174
|
return [{
|
|
1180
1175
|
find: "vue/server-renderer",
|
|
1181
|
-
replacement:
|
|
1176
|
+
replacement: It.resolve("vue/server-renderer")
|
|
1182
1177
|
}, {
|
|
1183
1178
|
find: "vue",
|
|
1184
|
-
replacement:
|
|
1179
|
+
replacement: It.resolve("vue/dist/vue.runtime.esm-bundler.js")
|
|
1185
1180
|
}];
|
|
1186
1181
|
}
|
|
1187
1182
|
//#endregion
|
|
1188
1183
|
//#region src/node/plugin/vite/middleware/vault-assets.ts
|
|
1189
|
-
var
|
|
1184
|
+
var Rt = {
|
|
1190
1185
|
jpg: "image/jpeg",
|
|
1191
1186
|
jpeg: "image/jpeg",
|
|
1192
1187
|
png: "image/png",
|
|
@@ -1204,7 +1199,7 @@ var zt = {
|
|
|
1204
1199
|
woff: "font/woff",
|
|
1205
1200
|
ttf: "font/ttf"
|
|
1206
1201
|
};
|
|
1207
|
-
function
|
|
1202
|
+
function zt(t, r) {
|
|
1208
1203
|
return (i, o, s) => {
|
|
1209
1204
|
if (!i.url || i.method !== "GET" || o.writableEnded) return s();
|
|
1210
1205
|
let c = e(i.url);
|
|
@@ -1213,7 +1208,7 @@ function Bt(t, r) {
|
|
|
1213
1208
|
if (ve(d)) try {
|
|
1214
1209
|
let e = xe(d);
|
|
1215
1210
|
if (e.isFile()) {
|
|
1216
|
-
let t =
|
|
1211
|
+
let t = Rt[a(d).slice(1).toLowerCase()] ?? "application/octet-stream";
|
|
1217
1212
|
o.setHeader("Content-Type", t), o.setHeader("Content-Length", e.size), _e(d).pipe(o);
|
|
1218
1213
|
return;
|
|
1219
1214
|
}
|
|
@@ -1223,7 +1218,7 @@ function Bt(t, r) {
|
|
|
1223
1218
|
}
|
|
1224
1219
|
//#endregion
|
|
1225
1220
|
//#region src/node/plugin/vite/middleware/virtual-html.ts
|
|
1226
|
-
function
|
|
1221
|
+
function Bt(t, r, i) {
|
|
1227
1222
|
return (a, o, s) => {
|
|
1228
1223
|
if (!a.url) return s();
|
|
1229
1224
|
let c = n(e(a.url)), l = n(i.basePath);
|
|
@@ -1231,12 +1226,12 @@ function Vt(t, r, i) {
|
|
|
1231
1226
|
let u = c.slice(l.length);
|
|
1232
1227
|
if (u.startsWith("/@") || u.startsWith("/node_modules") || c.includes(".") && !c.endsWith("/index.html")) return s();
|
|
1233
1228
|
r.getConfig().then(async (e) => {
|
|
1234
|
-
let n = await t.transformIndexHtml(a.url ?? "",
|
|
1229
|
+
let n = await t.transformIndexHtml(a.url ?? "", Vt(i, e));
|
|
1235
1230
|
o.setHeader("Content-Type", "text/html"), o.end(n);
|
|
1236
1231
|
}).catch(() => s());
|
|
1237
1232
|
};
|
|
1238
1233
|
}
|
|
1239
|
-
function
|
|
1234
|
+
function Vt(e, t) {
|
|
1240
1235
|
return e.devHtml === void 0 && (e.devHtml = O({
|
|
1241
1236
|
title: t.siteTitle,
|
|
1242
1237
|
description: t.siteDescription,
|
|
@@ -1246,8 +1241,8 @@ function Ht(e, t) {
|
|
|
1246
1241
|
}
|
|
1247
1242
|
//#endregion
|
|
1248
1243
|
//#region src/node/plugin/vite/index.ts
|
|
1249
|
-
function
|
|
1250
|
-
let t = e.context, n, i, a, o = new
|
|
1244
|
+
function $(e = {}) {
|
|
1245
|
+
let t = e.context, n, i, a, o = new St(), c = new Ct(), l = new Et(), u = new Ft(), d = {
|
|
1251
1246
|
devHtml: void 0,
|
|
1252
1247
|
basePath: "/",
|
|
1253
1248
|
rootDirectory: "vault"
|
|
@@ -1274,7 +1269,7 @@ function Ut(e = {}) {
|
|
|
1274
1269
|
port: n.server?.port ?? 8686,
|
|
1275
1270
|
strictPort: n.server?.strictPort ?? !1
|
|
1276
1271
|
},
|
|
1277
|
-
resolve: { alias:
|
|
1272
|
+
resolve: { alias: Lt() },
|
|
1278
1273
|
ssr: { noExternal: ["typerighter"] }
|
|
1279
1274
|
};
|
|
1280
1275
|
},
|
|
@@ -1286,7 +1281,7 @@ function Ut(e = {}) {
|
|
|
1286
1281
|
let e = await f(), t = await e.getConfig(), r = A(t.rootDir);
|
|
1287
1282
|
u.index(r), await l.fetchSync(e);
|
|
1288
1283
|
let i = await e.checkVault();
|
|
1289
|
-
if (
|
|
1284
|
+
if (Kt(i.diagnostics), 0 < i.errorCount) {
|
|
1290
1285
|
let e = i.diagnostics.filter((e) => e.severity === "error").map((e) => ` ${e.filepath}:${e.line}:${e.column} - ${e.message} (${e.code})`);
|
|
1291
1286
|
this.error(`Vault check failed with ${i.errorCount} error(s):\n${e.join("\n")}`);
|
|
1292
1287
|
}
|
|
@@ -1312,9 +1307,9 @@ function Ut(e = {}) {
|
|
|
1312
1307
|
let t = await f(), r = await t.getConfig(), i = A(r.rootDir);
|
|
1313
1308
|
u.index(i), l.scan(i), l.fetch(t, n), e.httpServer?.once("listening", async () => {
|
|
1314
1309
|
let e = await t.checkVault();
|
|
1315
|
-
0 < e.diagnostics.length && (console.error(""),
|
|
1310
|
+
0 < e.diagnostics.length && (console.error(""), Kt(e.diagnostics));
|
|
1316
1311
|
}), t.rpc.onConfigChanged(() => {
|
|
1317
|
-
n && (d.devHtml = void 0, l.clear(), o.invalidate(n), c.invalidate(n),
|
|
1312
|
+
n && (d.devHtml = void 0, l.clear(), o.invalidate(n), c.invalidate(n), Ut(n), l.fetch(t, n));
|
|
1318
1313
|
});
|
|
1319
1314
|
function a(...e) {
|
|
1320
1315
|
n && t.getConfig().then((t) => {
|
|
@@ -1323,7 +1318,7 @@ function Ut(e = {}) {
|
|
|
1323
1318
|
for (let i of e) {
|
|
1324
1319
|
let e = ue(A(n.config.root, t.rootDir, i)), a = n.moduleGraph.getModulesByFile(e);
|
|
1325
1320
|
if (a?.size) {
|
|
1326
|
-
for (let e of a) n.moduleGraph.invalidateModule(e), r.push(
|
|
1321
|
+
for (let e of a) n.moduleGraph.invalidateModule(e), r.push(Gt(e));
|
|
1327
1322
|
c.invalidatePageData(n, i);
|
|
1328
1323
|
}
|
|
1329
1324
|
}
|
|
@@ -1339,13 +1334,13 @@ function Ut(e = {}) {
|
|
|
1339
1334
|
n && (u.reindex(i, e), u.invalidate(n), c.invalidate(n), l.fetch(t, n), a(e));
|
|
1340
1335
|
});
|
|
1341
1336
|
function s() {
|
|
1342
|
-
n && (l.clear(),
|
|
1337
|
+
n && (l.clear(), Wt(n), l.fetch(t, n));
|
|
1343
1338
|
}
|
|
1344
1339
|
t.rpc.onSchemaUpdated(s), t.rpc.onSchemaDeleted(s);
|
|
1345
1340
|
let p = await t.getConfig();
|
|
1346
1341
|
d.basePath = p.basePath, d.rootDirectory = p.rootDir, t.rpc.onConfigChanged((e) => {
|
|
1347
1342
|
d.basePath = e.basePath, d.rootDirectory = e.rootDir, d.devHtml = void 0;
|
|
1348
|
-
}), e.middlewares.use(
|
|
1343
|
+
}), e.middlewares.use(zt(e, d)), e.middlewares.use(Bt(e, t, d));
|
|
1349
1344
|
},
|
|
1350
1345
|
async transform(e, t) {
|
|
1351
1346
|
let n = t.split("?")[0];
|
|
@@ -1389,21 +1384,21 @@ function Ut(e = {}) {
|
|
|
1389
1384
|
...ce()
|
|
1390
1385
|
];
|
|
1391
1386
|
}
|
|
1392
|
-
function
|
|
1387
|
+
function Ht(e) {
|
|
1393
1388
|
return [...e.moduleGraph.idToModuleMap.entries()].filter(([e]) => e.endsWith(".td")).map(([, e]) => e);
|
|
1394
1389
|
}
|
|
1395
|
-
function
|
|
1396
|
-
for (let t of
|
|
1390
|
+
function Ut(e) {
|
|
1391
|
+
for (let t of Ht(e)) e.moduleGraph.invalidateModule(t);
|
|
1397
1392
|
e.hot.send({ type: "full-reload" });
|
|
1398
1393
|
}
|
|
1399
|
-
function
|
|
1400
|
-
let t =
|
|
1394
|
+
function Wt(e) {
|
|
1395
|
+
let t = Ht(e).map((t) => (e.moduleGraph.invalidateModule(t), Gt(t)));
|
|
1401
1396
|
0 < t.length && e.hot.send({
|
|
1402
1397
|
type: "update",
|
|
1403
1398
|
updates: t
|
|
1404
1399
|
});
|
|
1405
1400
|
}
|
|
1406
|
-
function
|
|
1401
|
+
function Gt(e) {
|
|
1407
1402
|
return {
|
|
1408
1403
|
type: "js-update",
|
|
1409
1404
|
path: e.url,
|
|
@@ -1411,11 +1406,11 @@ function $(e) {
|
|
|
1411
1406
|
timestamp: Date.now()
|
|
1412
1407
|
};
|
|
1413
1408
|
}
|
|
1414
|
-
function
|
|
1409
|
+
function Kt(e) {
|
|
1415
1410
|
for (let t of e) {
|
|
1416
1411
|
let e = `${t.filepath}:${t.line}:${t.column}`, n = t.severity === "error" ? j.red("error") : j.yellow("warn");
|
|
1417
1412
|
console.error(` ${n} ${e} ${t.message} ${j.dim(`(${t.code})`)}`);
|
|
1418
1413
|
}
|
|
1419
1414
|
}
|
|
1420
1415
|
//#endregion
|
|
1421
|
-
export { Q as n, I as r,
|
|
1416
|
+
export { Q as n, I as r, $ as t };
|
package/dist/vite.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as generateClientAppEntry, t as typedown };
|
|
1
|
+
export { n as generateClientAppEntry, t as typedown } from "./vite-Dup9wBL7.js";
|
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.
|
|
4
|
+
"version": "0.42.1",
|
|
5
5
|
"description": "Typedown: A typed content framework.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -60,17 +60,17 @@
|
|
|
60
60
|
"@lucide/vue": "^1.47.0",
|
|
61
61
|
"@shikijs/transformers": "^4.4.3",
|
|
62
62
|
"@tailwindcss/vite": "^4.3.3",
|
|
63
|
-
"@typerighter/rpc-client": "0.
|
|
64
|
-
"@typerighter/rpc-server": "0.
|
|
65
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
63
|
+
"@typerighter/rpc-client": "0.42.1",
|
|
64
|
+
"@typerighter/rpc-server": "0.42.1",
|
|
65
|
+
"@vitejs/plugin-vue": "^6.0.10",
|
|
66
66
|
"cac": "^7.0.0",
|
|
67
67
|
"picocolors": "^1.1.1",
|
|
68
|
-
"shiki": "^4.
|
|
68
|
+
"shiki": "^4.5.0",
|
|
69
69
|
"striptags": "^3.2.0",
|
|
70
70
|
"tailwindcss": "^4.3.3",
|
|
71
71
|
"temml": "^0.13.5",
|
|
72
|
-
"vite": "^8.
|
|
73
|
-
"vue": "^3.5.
|
|
72
|
+
"vite": "^8.3.4",
|
|
73
|
+
"vue": "^3.5.43"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@hdnax/nuclint": "^0.17.5",
|