typerighter 0.57.2 → 0.57.3

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.
@@ -1,31 +1,31 @@
1
1
  import { B as e, D as t, F as n, H as r, I as i, O as a, R as o, T as s, U as c, Z as l, _ as u, b as d, c as f, d as p, et as m, g as h, h as g, i as _, nt as v, p as y, q as b, rt as x, v as ee, x as S, y as C, z as w } from "./shared-dB08amQA.js";
2
- import { n as T, t as E } from "./page-BbSO0VG8.js";
2
+ import { n as T, t as E } from "./page-ChF2owpa.js";
3
3
  import { t as D } from "./temml-CjI4drVW.js";
4
- import { a as O, i as k, n as te, r as ne } from "./context-CPrHBM3S.js";
5
- import { t as re } from "./es-B_QJMowB.js";
6
- import A, { resolve as j } from "node:path";
7
- import M from "picocolors";
8
- import ie from "@tailwindcss/vite";
9
- import ae from "@vitejs/plugin-vue";
10
- import { build as oe, normalizePath as N } from "vite";
11
- import P, { readdir as se } from "node:fs/promises";
12
- import { fileURLToPath as ce } from "node:url";
13
- import le from "node:os";
14
- import { Worker as ue } from "node:worker_threads";
15
- import F, { createReadStream as de, existsSync as fe, globSync as pe, readFileSync as me, statSync as he } from "node:fs";
16
- import { createRequire as ge } from "node:module";
17
- import { createChecker as _e, createCheckerByJson as ve } from "vue-component-meta";
18
- import { createHighlighter as ye, guessEmbeddedLanguages as be, isSpecialLang as xe } from "shiki";
4
+ import { a as O, i as k, n as A, r as te } from "./context-CLKZYp4U.js";
5
+ import { t as ne } from "./es-B_QJMowB.js";
6
+ import j, { resolve as M } from "node:path";
7
+ import N from "picocolors";
8
+ import re from "@tailwindcss/vite";
9
+ import ie from "@vitejs/plugin-vue";
10
+ import { build as ae, normalizePath as P } from "vite";
11
+ import F, { readdir as oe } from "node:fs/promises";
12
+ import { fileURLToPath as se } from "node:url";
13
+ import ce from "node:os";
14
+ import { Worker as le } from "node:worker_threads";
15
+ import I, { createReadStream as ue, existsSync as de, globSync as fe, readFileSync as pe, statSync as me } from "node:fs";
16
+ import { createRequire as he } from "node:module";
17
+ import { createChecker as ge, createCheckerByJson as _e } from "vue-component-meta";
18
+ import { createHighlighter as ve, guessEmbeddedLanguages as ye, isSpecialLang as be } from "shiki";
19
19
  // src/node/lib/worker-pool/index.ts
20
- var Se = class {
20
+ var xe = class {
21
21
  workers = [];
22
22
  queue = [];
23
23
  destroyed = !1;
24
24
  startupError;
25
25
  constructor(e) {
26
- let t = e.concurrency ?? Math.max(1, Math.floor(le.cpus().length / 2));
26
+ let t = e.concurrency ?? Math.max(1, Math.floor(ce.cpus().length / 2));
27
27
  for (let n = 0; n < t; n++) {
28
- let t = new ue(e.filename, { workerData: e.workerData }), n = { worker: t };
28
+ let t = new le(e.filename, { workerData: e.workerData }), n = { worker: t };
29
29
  this.workers.push(n), t.on("message", (e) => {
30
30
  let t = n.pending;
31
31
  n.pending = void 0, e.error === void 0 ? t?.resolve(e.result) : t?.reject(Error(e.error)), this.dispatch(n);
@@ -62,7 +62,7 @@ var Se = class {
62
62
  }
63
63
  };
64
64
  // src/node/build/seo/sitemap.ts
65
- function Ce(e, t, r, i) {
65
+ function Se(e, t, r, i) {
66
66
  let a = r ?? "";
67
67
  return `<?xml version="1.0" encoding="UTF-8"?>
68
68
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
@@ -73,7 +73,7 @@ ${e.map((e) => {
73
73
  </urlset>
74
74
  `;
75
75
  }
76
- function we(e, t) {
76
+ function Ce(e, t) {
77
77
  return `User-agent: *
78
78
  Allow: /
79
79
 
@@ -81,7 +81,7 @@ Sitemap: ${e}${t}sitemap.xml
81
81
  `;
82
82
  }
83
83
  // src/node/build/seo/feed.ts
84
- function Te(e, t, n, i, a, o) {
84
+ function we(e, t, n, i, a, o) {
85
85
  let s = [...e].filter((e) => e.fileMetadata.mtimeSecs > 0).sort((e, t) => t.fileMetadata.mtimeSecs - e.fileMetadata.mtimeSecs).slice(0, 50).map((e) => {
86
86
  let i = r(e.filepath), a = `${n}${t}${i}`, o = (/* @__PURE__ */ new Date(e.fileMetadata.mtimeSecs * 1e3)).toUTCString(), s = f(e.label ?? i), c = e.excerpt === void 0 ? "" : `<![CDATA[${e.excerpt}]]>`;
87
87
  return ` <item>
@@ -106,19 +106,19 @@ ${s}
106
106
  `;
107
107
  }
108
108
  // src/node/build/fonts.ts
109
- function Ee(e) {
110
- let t = A.basename(e);
109
+ function Te(e) {
110
+ let t = j.basename(e);
111
111
  return t.endsWith(".woff2") && t.includes("-latin-") && !t.includes("-latin-ext-");
112
112
  }
113
113
  // src/node/build/prerender.ts
114
- var De = 64;
115
- async function Oe(e) {
116
- let { clientEntry: t, cssFiles: n, fontFiles: r } = await je(e.clientOutDir), i = [n.map((t) => ` <link rel="stylesheet" href="${e.base}${t}">`).join("\n"), r.map((t) => ` <link rel="preload" as="font" type="font/woff2" crossorigin href="${e.base}${t}">`).join("\n")].filter(Boolean).join("\n") || void 0;
117
- e.pageRoutes.length >= De ? await ke(e, t, i) : await Ae(e, t, i);
118
- }
119
- async function ke(e, t, n) {
120
- let r = new Se({
121
- filename: A.resolve(ce(import.meta.url), "../prerenderWorker.js"),
114
+ var Ee = 64;
115
+ async function De(e) {
116
+ let { clientEntry: t, cssFiles: n, fontFiles: r } = await Ae(e.clientOutDir), i = [n.map((t) => ` <link rel="stylesheet" href="${e.base}${t}">`).join("\n"), r.map((t) => ` <link rel="preload" as="font" type="font/woff2" crossorigin href="${e.base}${t}">`).join("\n")].filter(Boolean).join("\n") || void 0;
117
+ e.pageRoutes.length >= Ee ? await Oe(e, t, i) : await ke(e, t, i);
118
+ }
119
+ async function Oe(e, t, n) {
120
+ let r = new xe({
121
+ filename: j.resolve(se(import.meta.url), "../prerenderWorker.js"),
122
122
  workerData: {
123
123
  ssrEntryPath: e.ssrEntryPath,
124
124
  base: e.base,
@@ -132,14 +132,14 @@ async function ke(e, t, n) {
132
132
  }), i = 0, a = e.pageRoutes.length;
133
133
  try {
134
134
  await Promise.all(e.pageRoutes.map(async (t) => {
135
- let n = await r.run(t), o = A.join(e.outDir, n.fileName);
136
- await P.mkdir(A.dirname(o), { recursive: !0 }), await P.writeFile(o, n.html), i++, e.progress?.update(i, a);
135
+ let n = await r.run(t), o = j.join(e.outDir, n.fileName);
136
+ await F.mkdir(j.dirname(o), { recursive: !0 }), await F.writeFile(o, n.html), i++, e.progress?.update(i, a);
137
137
  }));
138
138
  } finally {
139
139
  await r.destroy();
140
140
  }
141
141
  }
142
- async function Ae(e, t, r) {
142
+ async function ke(e, t, r) {
143
143
  let i = await (await import(e.ssrEntryPath)).createRenderer(), a = e.pageRoutes.length, o = 0;
144
144
  for (let s of e.pageRoutes) {
145
145
  let c = await i(s), l = E(c.pageData, s, {
@@ -161,13 +161,13 @@ async function Ae(e, t, r) {
161
161
  jsonLdBlocks: l.jsonLdBlocks,
162
162
  headExtra: r,
163
163
  appContent: c.html
164
- }), d = l.isHomepage ? "index.html" : `${n(s)}.html`, f = A.join(e.outDir, d);
165
- await P.mkdir(A.dirname(f), { recursive: !0 }), await P.writeFile(f, u), o++, e.progress?.update(o, a);
164
+ }), d = l.isHomepage ? "index.html" : `${n(s)}.html`, f = j.join(e.outDir, d);
165
+ await F.mkdir(j.dirname(f), { recursive: !0 }), await F.writeFile(f, u), o++, e.progress?.update(o, a);
166
166
  }
167
167
  }
168
- async function je(e) {
169
- let t = A.join(e, ".vite", "manifest.json"), n = await P.readFile(t, "utf-8"), r = JSON.parse(n), i = "", a = [], o = [];
170
- for (let e of Object.values(r)) e.isEntry ? (i = e.file, e.css && a.push(...e.css)) : Ee(e.file) && o.push(e.file);
168
+ async function Ae(e) {
169
+ let t = j.join(e, ".vite", "manifest.json"), n = await F.readFile(t, "utf-8"), r = JSON.parse(n), i = "", a = [], o = [];
170
+ for (let e of Object.values(r)) e.isEntry ? (i = e.file, e.css && a.push(...e.css)) : Te(e.file) && o.push(e.file);
171
171
  return {
172
172
  clientEntry: i,
173
173
  cssFiles: a,
@@ -175,7 +175,7 @@ async function je(e) {
175
175
  };
176
176
  }
177
177
  // src/node/lib/codegen/app-entry.ts
178
- function Me(e, t) {
178
+ function je(e, t) {
179
179
  let { rootDir: n = ".", mountPath: r = "", userComponents: i = [] } = e, a = [r, n === "." ? "" : n].filter(Boolean).join("/"), o = i.map((e) => `import ${e.name} from ${JSON.stringify(e.absolutePath)};`).join("\n"), s = i.map((e) => `app.component(${JSON.stringify(e.name)}, ${e.name});`).join("\n"), c = JSON.stringify({
180
180
  title: e.siteTitle,
181
181
  description: e.siteDescription,
@@ -233,11 +233,11 @@ if (import.meta.hot) {
233
233
  `;
234
234
  }
235
235
  // src/node/lib/codegen/theme.ts
236
- var I = "typerighter/client/theme-default";
236
+ var Me = "typerighter/client/theme-default";
237
237
  function Ne(e, t) {
238
- let n = e?.notFound ? `import CustomNotFound from ${JSON.stringify(t ? A.resolve(t, e.notFound) : e.notFound)};` : "", r = e?.notFound ? ", NotFound: CustomNotFound" : "";
238
+ let n = e?.notFound ? `import CustomNotFound from ${JSON.stringify(t ? j.resolve(t, e.notFound) : e.notFound)};` : "", r = e?.notFound ? ", NotFound: CustomNotFound" : "";
239
239
  if (e?.component) {
240
- let i = t ? A.resolve(t, e.component) : e.component;
240
+ let i = t ? j.resolve(t, e.component) : e.component;
241
241
  return [
242
242
  `import CustomLayout from ${JSON.stringify(i)};`,
243
243
  n,
@@ -248,24 +248,24 @@ function Ne(e, t) {
248
248
  if (0 < i.length) {
249
249
  let e = i.map(([e, t]) => `${JSON.stringify(b(e))}: () => h(resolveComponent(${JSON.stringify(t)}))`).join(", ");
250
250
  return [
251
- `import DefaultTheme from ${JSON.stringify(I)};`,
251
+ `import DefaultTheme from ${JSON.stringify(Me)};`,
252
252
  "import { h, resolveComponent } from 'vue';",
253
253
  n,
254
254
  `export default { Layout: { render() { return h(DefaultTheme.Layout, null, { ${e} }); } }${r} };`
255
255
  ].filter(Boolean).join("\n");
256
256
  }
257
257
  return n ? [
258
- `import DefaultTheme from ${JSON.stringify(I)};`,
258
+ `import DefaultTheme from ${JSON.stringify(Me)};`,
259
259
  n,
260
260
  `export default { ...DefaultTheme${r} };`
261
- ].join("\n") : `export { default } from ${JSON.stringify(I)};`;
261
+ ].join("\n") : `export { default } from ${JSON.stringify(Me)};`;
262
262
  }
263
263
  // src/node/lib/components.ts
264
264
  function Pe(e) {
265
- let t = A.join(e, "tsconfig.json");
266
- if (F.existsSync(t)) return _e(t);
265
+ let t = j.join(e, "tsconfig.json");
266
+ if (I.existsSync(t)) return ge(t);
267
267
  let n = Fe(e);
268
- return ve(e, { compilerOptions: {
268
+ return _e(e, { compilerOptions: {
269
269
  strict: !1,
270
270
  jsx: "preserve",
271
271
  jsxImportSource: "vue",
@@ -275,35 +275,35 @@ function Pe(e) {
275
275
  async function L(e, t) {
276
276
  let n = [];
277
277
  for (let r of e) if (r.kind === "dir") {
278
- let e = A.resolve(t, r.path), i;
278
+ let e = j.resolve(t, r.path), i;
279
279
  try {
280
- i = await se(e, { withFileTypes: !0 });
280
+ i = await oe(e, { withFileTypes: !0 });
281
281
  } catch {
282
282
  continue;
283
283
  }
284
284
  for (let t of i) if (t.isFile() && t.name.endsWith(".vue")) n.push({
285
285
  name: t.name.slice(0, -4),
286
- absolutePath: A.join(e, t.name)
286
+ absolutePath: j.join(e, t.name)
287
287
  });
288
288
  else if (t.isDirectory()) {
289
- let r = A.join(e, t.name, "index.vue");
290
- F.existsSync(r) && n.push({
289
+ let r = j.join(e, t.name, "index.vue");
290
+ I.existsSync(r) && n.push({
291
291
  name: t.name,
292
292
  absolutePath: r
293
293
  });
294
294
  }
295
295
  } else n.push({
296
296
  name: r.name,
297
- absolutePath: A.resolve(t, r.source)
297
+ absolutePath: j.resolve(t, r.source)
298
298
  });
299
299
  return n;
300
300
  }
301
301
  function Fe(e) {
302
302
  try {
303
- let t = ge(A.join(e, "package.json")), n = A.dirname(t.resolve("vue/package.json"));
303
+ let t = he(j.join(e, "package.json")), n = j.dirname(t.resolve("vue/package.json"));
304
304
  return {
305
305
  vue: [n],
306
- "vue/*": [A.join(n, "*")]
306
+ "vue/*": [j.join(n, "*")]
307
307
  };
308
308
  } catch {
309
309
  return;
@@ -315,7 +315,7 @@ var R = [
315
315
  "◓",
316
316
  "◑",
317
317
  "◒"
318
- ], z = class {
318
+ ], Ie = class {
319
319
  logger;
320
320
  label;
321
321
  start;
@@ -323,8 +323,8 @@ var R = [
323
323
  constructor(e, t) {
324
324
  if (this.logger = e, this.label = t, this.start = performance.now(), process.stdout.isTTY) {
325
325
  let e = 0;
326
- process.stdout.write(M.cyan(`${R[0]} ${t}`)), this.spinnerInterval = setInterval(() => {
327
- e = (e + 1) % R.length, process.stdout.write(`\r${M.cyan(`${R[e]} ${this.label}`)}`);
326
+ process.stdout.write(N.cyan(`${R[0]} ${t}`)), this.spinnerInterval = setInterval(() => {
327
+ e = (e + 1) % R.length, process.stdout.write(`\r${N.cyan(`${R[e]} ${this.label}`)}`);
328
328
  }, 120).unref();
329
329
  } else this.logger.start(t);
330
330
  }
@@ -336,19 +336,19 @@ var R = [
336
336
  done(e) {
337
337
  this.stopSpinner(), process.stdout.isTTY && process.stdout.write("\r\x1B[K");
338
338
  let t = Math.round(performance.now() - this.start);
339
- this.logger.success(`${e} (${Ie(t)})`);
339
+ this.logger.success(`${e} (${Le(t)})`);
340
340
  }
341
341
  stopSpinner() {
342
342
  this.spinnerInterval &&= (clearInterval(this.spinnerInterval), void 0);
343
343
  }
344
344
  };
345
- function Ie(e) {
345
+ function Le(e) {
346
346
  return e < 1e3 ? `${Math.round(e)}ms` : `${(e / 1e3).toFixed(1)}s`;
347
347
  }
348
348
  // src/node/build/index.ts
349
- async function Le(e, t = {}) {
350
- let { root: n, logger: i } = e, a = A.resolve(n, t.outDir ?? "dist"), o = A.join(a, ".client"), s = A.join(a, ".server");
351
- await P.rm(a, {
349
+ async function Re(e, t = {}) {
350
+ let { root: n, logger: i } = e, a = j.resolve(n, t.outDir ?? "dist"), o = j.join(a, ".client"), s = j.join(a, ".server");
351
+ await F.rm(a, {
352
352
  recursive: !0,
353
353
  force: !0
354
354
  });
@@ -375,11 +375,11 @@ async function Le(e, t = {}) {
375
375
  ready: !0,
376
376
  contentTree: C,
377
377
  schemas: m
378
- }), E = A.join(n, "node_modules", ".typerighter");
379
- await P.mkdir(E, { recursive: !0 });
380
- let D = A.join(E, "client-entry.js"), O = A.join(E, "ssr-entry.js"), k = A.join(E, "theme.js"), te = await L(l.components, n), ne = Ne(l.layout ?? void 0, n);
378
+ }), E = j.join(n, "node_modules", ".typerighter");
379
+ await F.mkdir(E, { recursive: !0 });
380
+ let D = j.join(E, "client-entry.js"), O = j.join(E, "ssr-entry.js"), k = j.join(E, "theme.js"), A = await L(l.components, n), te = Ne(l.layout ?? void 0, n);
381
381
  await Promise.all([
382
- P.writeFile(D, Me({
382
+ F.writeFile(D, je({
383
383
  rootDir: l.rootDir,
384
384
  basePath: x,
385
385
  origin: h,
@@ -390,31 +390,31 @@ async function Le(e, t = {}) {
390
390
  author: _,
391
391
  license: v,
392
392
  nav: l.nav,
393
- userComponents: te
393
+ userComponents: A
394
394
  }, {
395
- theme: Y,
396
- pages: G,
397
- siteData: q,
398
- searchIndex: J,
399
- pageDataEvent: X
395
+ theme: J,
396
+ pages: W,
397
+ siteData: K,
398
+ searchIndex: q,
399
+ pageDataEvent: Y
400
400
  })),
401
- P.writeFile(O, Re({
401
+ F.writeFile(O, ze({
402
402
  rootDir: l.rootDir,
403
403
  siteConfig: w,
404
404
  siteData: T,
405
405
  themeModulePath: k,
406
- userComponents: te
406
+ userComponents: A
407
407
  })),
408
- P.writeFile(k, ne)
408
+ F.writeFile(k, te)
409
409
  ]);
410
410
  try {
411
- let c = _n({ context: e }), f = e.createViteLogger(), p = new z(i, "Building client bundle...");
412
- await oe({
411
+ let c = e.createViteLogger(), f = new Ie(i, "Building bundles..."), p = performance.now();
412
+ await Promise.all([ae({
413
413
  ...t.viteConfig,
414
414
  root: n,
415
415
  base: x,
416
- plugins: c,
417
- customLogger: f,
416
+ plugins: $({ context: e }),
417
+ customLogger: c,
418
418
  logLevel: "silent",
419
419
  build: {
420
420
  ...t.viteConfig?.build,
@@ -426,16 +426,12 @@ async function Le(e, t = {}) {
426
426
  input: D
427
427
  }
428
428
  }
429
- });
430
- let m = await P.readdir(A.join(o, "assets")).catch(() => []);
431
- p.done(`Client bundle (${m.length} chunks)`);
432
- let g = new z(i, "Building SSR bundle...");
433
- await oe({
429
+ }), ae({
434
430
  ...t.viteConfig,
435
431
  root: n,
436
432
  base: x,
437
- plugins: c,
438
- customLogger: f,
433
+ plugins: $({ context: e }),
434
+ customLogger: c,
439
435
  logLevel: "silent",
440
436
  build: {
441
437
  ...t.viteConfig?.build,
@@ -443,15 +439,17 @@ async function Le(e, t = {}) {
443
439
  ssr: O,
444
440
  emptyOutDir: !0
445
441
  }
446
- }), g.done("SSR bundle");
442
+ })]);
443
+ let m = await F.readdir(j.join(o, "assets")).catch(() => []), g = performance.now() - p;
444
+ f.done(`Client (${m.length} chunks) + SSR`), process.env.TYPEDOWN_VERBOSE === "1" && process.stderr.write(`[timing:phase] bundles ${g.toFixed(0)}ms\n`);
447
445
  let v = u.map((e) => {
448
446
  let t = r(e);
449
447
  return t === "index" ? "/" : `/${t}`;
450
448
  });
451
- v.push("/"), Be(C.entries, v);
452
- let y = new z(i, "Pre-rendering pages...");
453
- await Oe({
454
- ssrEntryPath: A.join(s, "ssr-entry.js"),
449
+ v.push("/"), Ve(C.entries, v);
450
+ let y = new Ie(i, "Pre-rendering pages...");
451
+ await De({
452
+ ssrEntryPath: j.join(s, "ssr-entry.js"),
455
453
  clientOutDir: o,
456
454
  outDir: a,
457
455
  base: x,
@@ -467,23 +465,23 @@ async function Le(e, t = {}) {
467
465
  let t = r(e.filepath), n = t === "index" ? "/" : `/${t}`;
468
466
  b.set(n, e.fileMetadata.mtimeSecs);
469
467
  }
470
- let ee = Ce(v, x, h, b), S = [P.writeFile(A.join(a, "sitemap.xml"), ee)];
471
- h !== void 0 && (S.push(P.writeFile(A.join(a, "robots.txt"), we(h, x))), S.push(P.writeFile(A.join(a, "feed.xml"), Te(d, x, h, l.siteTitle, l.siteDescription, l.lang)))), await Promise.all(S);
472
- let w = A.join(o, "assets"), T = A.join(a, "assets");
473
- await P.cp(w, T, { recursive: !0 }).catch(() => {}), await ze(A.join(n, l.rootDir), a);
474
- let E = A.join(n, l.publicDir);
475
- await P.cp(E, a, { recursive: !0 }).catch(() => {});
468
+ let ee = Se(v, x, h, b), S = [F.writeFile(j.join(a, "sitemap.xml"), ee)];
469
+ h !== void 0 && (S.push(F.writeFile(j.join(a, "robots.txt"), Ce(h, x))), S.push(F.writeFile(j.join(a, "feed.xml"), we(d, x, h, l.siteTitle, l.siteDescription, l.lang)))), await Promise.all(S);
470
+ let w = j.join(o, "assets"), T = j.join(a, "assets");
471
+ await F.cp(w, T, { recursive: !0 }).catch(() => {}), await Be(j.join(n, l.rootDir), a);
472
+ let E = j.join(n, l.publicDir);
473
+ await F.cp(E, a, { recursive: !0 }).catch(() => {});
476
474
  } finally {
477
475
  await Promise.all([
478
- P.rm(E, {
476
+ F.rm(E, {
479
477
  recursive: !0,
480
478
  force: !0
481
479
  }),
482
- P.rm(o, {
480
+ F.rm(o, {
483
481
  recursive: !0,
484
482
  force: !0
485
483
  }),
486
- P.rm(s, {
484
+ F.rm(s, {
487
485
  recursive: !0,
488
486
  force: !0
489
487
  })
@@ -491,7 +489,7 @@ async function Le(e, t = {}) {
491
489
  }
492
490
  i.log(`\nBuild complete. Output: ${a}`);
493
491
  }
494
- function Re(e) {
492
+ function ze(e) {
495
493
  let t = `/${e.rootDir}/${m}`, n = JSON.parse(e.siteConfig), r = JSON.parse(e.siteData), i = r.contentTree ?? { entries: [] }, a = h(i.entries ?? [], n.title ?? ""), o = JSON.stringify({
496
494
  ...r,
497
495
  directoryListings: a
@@ -517,31 +515,31 @@ export async function createRenderer() {
517
515
  }
518
516
  `;
519
517
  }
520
- async function ze(e, t) {
521
- let n = (await P.readdir(e, {
518
+ async function Be(e, t) {
519
+ let n = (await F.readdir(e, {
522
520
  recursive: !0,
523
521
  withFileTypes: !0
524
522
  })).filter((e) => e.isFile() && !w(e.name)).map(async (n) => {
525
- let r = A.join(n.parentPath, n.name), i = A.relative(e, r), a = A.join(t, i);
526
- return P.mkdir(A.dirname(a), { recursive: !0 }).then(() => P.copyFile(r, a));
523
+ let r = j.join(n.parentPath, n.name), i = j.relative(e, r), a = j.join(t, i);
524
+ return F.mkdir(j.dirname(a), { recursive: !0 }).then(() => F.copyFile(r, a));
527
525
  });
528
526
  await Promise.all(n);
529
527
  }
530
- function Be(e, t, n = "") {
528
+ function Ve(e, t, n = "") {
531
529
  for (let r of e) {
532
530
  if (r.kind !== "dir") continue;
533
531
  let e = `${n}/${r.node.name}`;
534
- u(r.node) || t.push(s(e)), Be(r.node.entries, t, e);
532
+ u(r.node) || t.push(s(e)), Ve(r.node.entries, t, e);
535
533
  }
536
534
  }
537
535
  // ../../node_modules/.pnpm/@shikijs+transformers@4.4.3/node_modules/@shikijs/transformers/dist/index.mjs
538
- var Ve = /(\s+\/\/)/, He = /(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/, Ue = /(?:\/\/|#|;{1,2}|%{1,2}|--)(\s*)$/, We = [
536
+ var He = /(\s+\/\/)/, Ue = /(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/, We = /(?:\/\/|#|;{1,2}|%{1,2}|--)(\s*)$/, Ge = [
539
537
  [/^(<!--)(.+)(-->)$/, !1],
540
538
  [/^(\/\*)(.+)(\*\/)$/, !1],
541
539
  [/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/, !0],
542
540
  [/^(\*)(.+)$/, !0]
543
541
  ];
544
- function Ge(e, t, n) {
542
+ function Ke(e, t, n) {
545
543
  let r = [];
546
544
  for (let i of e) {
547
545
  if (n === "v3") {
@@ -550,8 +548,8 @@ function Ge(e, t, n) {
550
548
  let n = e.children[0];
551
549
  if (n.type !== "text") return e;
552
550
  let r = t === i.children.length - 1;
553
- if (!B(n.value, r)) return e;
554
- let a = n.value.split(Ve);
551
+ if (!z(n.value, r)) return e;
552
+ let a = n.value.split(He);
555
553
  if (a.length <= 1) return e;
556
554
  let o = [a[0]];
557
555
  for (let e = 1; e < a.length; e += 2) o.push(a[e] + (a[e + 1] || ""));
@@ -572,13 +570,13 @@ function Ge(e, t, n) {
572
570
  if (a.type !== "element") continue;
573
571
  let o = a.children.at(0);
574
572
  if (o?.type !== "text") continue;
575
- let s = n === e.length - 1, c = B(o.value, s), l;
573
+ let s = n === e.length - 1, c = z(o.value, s), l;
576
574
  if (!c && n > 0 && o.value.trim().startsWith("[!code")) {
577
575
  let t = e[n - 1];
578
576
  if (t?.type === "element") {
579
577
  let n = t.children.at(0);
580
578
  if (n?.type === "text" && n.value.includes("//")) {
581
- let l = B(n.value + o.value, s);
579
+ let l = z(n.value + o.value, s);
582
580
  if (l) {
583
581
  c = l, r.push({
584
582
  info: l,
@@ -595,7 +593,7 @@ function Ge(e, t, n) {
595
593
  }
596
594
  if (c) {
597
595
  if (t && !s && n !== 0) {
598
- let t = Ke(e[n - 1], "{") && Ke(e[n + 1], "}");
596
+ let t = qe(e[n - 1], "{") && qe(e[n + 1], "}");
599
597
  r.push({
600
598
  info: c,
601
599
  line: i,
@@ -617,16 +615,16 @@ function Ge(e, t, n) {
617
615
  }
618
616
  return r;
619
617
  }
620
- function Ke(e, t) {
618
+ function qe(e, t) {
621
619
  if (e.type !== "element") return !1;
622
620
  let n = e.children[0];
623
621
  return n.type === "text" && n.value.trim() === t;
624
622
  }
625
- function B(e, t) {
623
+ function z(e, t) {
626
624
  let n = e.trimStart(), r = e.length - n.length;
627
625
  n = n.trimEnd();
628
626
  let i = e.length - n.length - r;
629
- for (let [e, a] of We) {
627
+ for (let [e, a] of Ge) {
630
628
  if (a && !t) continue;
631
629
  let o = e.exec(n);
632
630
  if (o) return [
@@ -636,22 +634,22 @@ function B(e, t) {
636
634
  ];
637
635
  }
638
636
  }
639
- function qe(e) {
640
- let t = e.match(He);
641
- return t && t[1].trim().length === 0 ? e.slice(0, t.index) : e;
642
- }
643
637
  function Je(e) {
644
638
  let t = e.match(Ue);
639
+ return t && t[1].trim().length === 0 ? e.slice(0, t.index) : e;
640
+ }
641
+ function Ye(e) {
642
+ let t = e.match(We);
645
643
  return t && t[1].trim().length === 0 ? e.slice(0, t.index).trimEnd() : e;
646
644
  }
647
- function Ye(e, t, n, r) {
645
+ function Xe(e, t, n, r) {
648
646
  return r ??= "v3", {
649
647
  name: e,
650
648
  code(e) {
651
649
  let i = e.children.filter((e) => e.type === "element"), a = [];
652
650
  e.data ??= {};
653
651
  let o = e.data;
654
- o._shiki_notation ??= Ge(i, ["jsx", "tsx"].includes(this.options.lang), r);
652
+ o._shiki_notation ??= Ke(i, ["jsx", "tsx"].includes(this.options.lang), r);
655
653
  let s = o._shiki_notation;
656
654
  for (let e of s) {
657
655
  if (e.info[1].length === 0) continue;
@@ -659,7 +657,7 @@ function Ye(e, t, n, r) {
659
657
  e.isLineCommentOnly && r !== "v1" && o++;
660
658
  let s = !1;
661
659
  if (e.info[1] = e.info[1].replace(t, (...t) => n.call(this, t, e.line, e.token, i, o) ? (s = !0, "") : t[0]), !s) continue;
662
- r === "v1" ? e.info[1] = qe(e.info[1]) : r === "v3" && (e.info[1] = Je(e.info[1]));
660
+ r === "v1" ? e.info[1] = Je(e.info[1]) : r === "v3" && (e.info[1] = Ye(e.info[1]));
663
661
  let c = e.info[1].trim().length === 0;
664
662
  if (c && (e.info[1] = ""), c && e.isLineCommentOnly) a.push(e.line);
665
663
  else if (c && e.isJsxStyle) e.line.children.splice(e.line.children.indexOf(e.token) - 1, 3);
@@ -684,44 +682,44 @@ function Ye(e, t, n, r) {
684
682
  }
685
683
  };
686
684
  }
687
- var Xe = /\{([\d,-]+)\}/;
688
- function Ze(e) {
685
+ var Ze = /\{([\d,-]+)\}/;
686
+ function Qe(e) {
689
687
  if (!e) return null;
690
- let t = e.match(Xe);
688
+ let t = e.match(Ze);
691
689
  return t ? t[1].split(",").flatMap((e) => {
692
690
  let t = e.split("-").map((e) => Number.parseInt(e, 10));
693
691
  return t.length === 1 ? [t[0]] : Array.from({ length: t[1] - t[0] + 1 }, (e, n) => t[0] + n);
694
692
  }) : null;
695
693
  }
696
- var Qe = Symbol("highlighted-lines");
697
- function $e(e = {}) {
694
+ var $e = Symbol("highlighted-lines");
695
+ function et(e = {}) {
698
696
  let { className: t = "highlighted", zeroIndexed: n = !1 } = e;
699
697
  return {
700
698
  name: "@shikijs/transformers:meta-highlight",
701
699
  line(e, r) {
702
700
  if (!this.options.meta?.__raw) return;
703
701
  let i = this.meta;
704
- i[Qe] ??= Ze(this.options.meta.__raw);
705
- let a = i[Qe] ?? [], o = n ? r - 1 : r;
702
+ i[$e] ??= Qe(this.options.meta.__raw);
703
+ let a = i[$e] ?? [], o = n ? r - 1 : r;
706
704
  return a.includes(o) && this.addClassToHast(e, t), e;
707
705
  }
708
706
  };
709
707
  }
710
- var et = /[.*+?^${}()|[\]\\]/g;
711
- function tt(e) {
712
- return e.replace(et, "\\$&");
708
+ var tt = /[.*+?^${}()|[\]\\]/g;
709
+ function nt(e) {
710
+ return e.replace(tt, "\\$&");
713
711
  }
714
- function V(e = {}, t = "@shikijs/transformers:notation-map") {
712
+ function B(e = {}, t = "@shikijs/transformers:notation-map") {
715
713
  let { classMap: n = {}, classActivePre: r = void 0, classActiveCode: i = void 0 } = e;
716
- return Ye(t, RegExp(`#?\\s*\\[!code (${Object.keys(n).map(tt).join("|")})(:\\d+)?\\]`, "gi"), function([e, t, a = ":1"], o, s, c, l) {
714
+ return Xe(t, RegExp(`#?\\s*\\[!code (${Object.keys(n).map(nt).join("|")})(:\\d+)?\\]`, "gi"), function([e, t, a = ":1"], o, s, c, l) {
717
715
  let u = Number.parseInt(a.slice(1), 10);
718
716
  for (let e = l; e < Math.min(l + u, c.length); e++) this.addClassToHast(c[e], n[t]);
719
717
  return r && this.addClassToHast(this.pre, r), i && this.addClassToHast(this.code, i), !0;
720
718
  }, e.matchAlgorithm);
721
719
  }
722
- function nt(e = {}) {
720
+ function rt(e = {}) {
723
721
  let { classLineAdd: t = "diff add", classLineRemove: n = "diff remove", classActivePre: r = "has-diff", classActiveCode: i } = e;
724
- return V({
722
+ return B({
725
723
  classMap: {
726
724
  "++": t,
727
725
  "--": n
@@ -731,31 +729,31 @@ function nt(e = {}) {
731
729
  matchAlgorithm: e.matchAlgorithm
732
730
  }, "@shikijs/transformers:notation-diff");
733
731
  }
734
- function rt(e = {}) {
732
+ function it(e = {}) {
735
733
  let { classMap: t = {
736
734
  error: ["highlighted", "error"],
737
735
  warning: ["highlighted", "warning"],
738
736
  info: ["highlighted", "info"]
739
737
  }, classActivePre: n = "has-highlighted", classActiveCode: r } = e;
740
- return V({
738
+ return B({
741
739
  classMap: t,
742
740
  classActivePre: n,
743
741
  classActiveCode: r,
744
742
  matchAlgorithm: e.matchAlgorithm
745
743
  }, "@shikijs/transformers:notation-error-level");
746
744
  }
747
- function it(e = {}) {
745
+ function at(e = {}) {
748
746
  let { classActiveLine: t = "focused", classActivePre: n = "has-focused", classActiveCode: r } = e;
749
- return V({
747
+ return B({
750
748
  classMap: { focus: t },
751
749
  classActivePre: n,
752
750
  classActiveCode: r,
753
751
  matchAlgorithm: e.matchAlgorithm
754
752
  }, "@shikijs/transformers:notation-focus");
755
753
  }
756
- function at(e = {}) {
754
+ function ot(e = {}) {
757
755
  let { classActiveLine: t = "highlighted", classActivePre: n = "has-highlighted", classActiveCode: r } = e;
758
- return V({
756
+ return B({
759
757
  classMap: {
760
758
  highlight: t,
761
759
  hl: t
@@ -766,41 +764,41 @@ function at(e = {}) {
766
764
  }, "@shikijs/transformers:notation-highlight");
767
765
  }
768
766
  // src/node/lib/render/highlight/language.ts
769
- var ot = [
767
+ var st = [
770
768
  "shellscript",
771
769
  "shell",
772
770
  "bash",
773
771
  "sh",
774
772
  "zsh"
775
773
  ];
776
- function st(e) {
777
- return ot.includes(e);
774
+ function ct(e) {
775
+ return st.includes(e);
778
776
  }
779
- var ct = /^[a-zA-Z0-9-_]+/;
780
- function lt(e) {
781
- return ct.exec(e)?.[0] || "";
777
+ var lt = /^[a-zA-Z0-9-_]+/;
778
+ function ut(e) {
779
+ return lt.exec(e)?.[0] || "";
782
780
  }
783
781
  // src/node/lib/render/highlight/index.ts
784
- var ut = new FinalizationRegistry((e) => {
782
+ var dt = new FinalizationRegistry((e) => {
785
783
  e();
786
- }), H = {
784
+ }), V = {
787
785
  light: "github-light",
788
786
  dark: "github-dark"
789
787
  };
790
- async function dt() {
791
- let e = await ye({
792
- themes: [H.light, H.dark],
788
+ async function ft() {
789
+ let e = await ve({
790
+ themes: [V.light, V.dark],
793
791
  langs: []
794
792
  }), t = [
795
- $e(),
796
- nt(),
797
- it({
793
+ et(),
794
+ rt(),
795
+ at({
798
796
  classActiveLine: "has-focus",
799
797
  classActivePre: "has-focused-lines"
800
798
  }),
801
- at(),
802
- rt(),
803
- ft(),
799
+ ot(),
800
+ it(),
801
+ pt(),
804
802
  {
805
803
  name: "typedown:add-dir",
806
804
  pre(e) {
@@ -809,19 +807,19 @@ async function dt() {
809
807
  }
810
808
  ], n = new Set(e.getLoadedLanguages());
811
809
  async function r(r, i, a, o) {
812
- let s = lt(i);
810
+ let s = ut(i);
813
811
  if (s) {
814
812
  let e = i;
815
813
  i = s.toLowerCase(), a = e.slice(i.length).replace(/(?<!=)\{/g, " {") + " " + a, a = a.trim().replace(/\s+/g, " ");
816
814
  }
817
815
  i ||= "txt";
818
816
  try {
819
- !xe(i) && !n.has(i) && (await e.loadLanguage(i), n.add(i));
817
+ !be(i) && !n.has(i) && (await e.loadLanguage(i), n.add(i));
820
818
  } catch {
821
819
  O.warn(`\nThe language '${i}' is not loaded, falling back to 'txt' for syntax highlighting.`), i = "txt";
822
820
  }
823
821
  r = r.trimEnd();
824
- let c = be(r, i, e);
822
+ let c = ye(r, i, e);
825
823
  return await e.loadLanguage(...c), e.codeToHtml(r, {
826
824
  lang: i,
827
825
  transformers: [
@@ -842,10 +840,10 @@ async function dt() {
842
840
  });
843
841
  }
844
842
  },
845
- ...o === void 0 ? [] : [pt(o)]
843
+ ...o === void 0 ? [] : [mt(o)]
846
844
  ],
847
845
  meta: { __raw: a },
848
- themes: H,
846
+ themes: V,
849
847
  defaultColor: !1,
850
848
  colorReplacements: {
851
849
  "github-light": {
@@ -870,13 +868,13 @@ async function dt() {
870
868
  }
871
869
  });
872
870
  }
873
- return ut.register(r, () => e.dispose()), r;
871
+ return dt.register(r, () => e.dispose()), r;
874
872
  }
875
- function ft() {
873
+ function pt() {
876
874
  return {
877
875
  name: "typedown:disable-shell-symbol-select",
878
876
  tokens(e) {
879
- if (st(this.options.lang)) for (let t of e) {
877
+ if (ct(this.options.lang)) for (let t of e) {
880
878
  if (t.length < 2) continue;
881
879
  let e = t[0].content.trim();
882
880
  (e === "$" || e === ">") && t[1].content[0] === " " && (t[0].content = e + " ", t[0].htmlStyle ??= {}, t[0].htmlStyle["user-select"] = "none", t[0].htmlStyle["-webkit-user-select"] = "none", t[1].content = t[1].content.slice(1));
@@ -884,7 +882,7 @@ function ft() {
884
882
  }
885
883
  };
886
884
  }
887
- function pt(e) {
885
+ function mt(e) {
888
886
  return {
889
887
  name: "typedown:line-numbers",
890
888
  code(t) {
@@ -916,23 +914,23 @@ function pt(e) {
916
914
  };
917
915
  }
918
916
  // src/node/lib/render/postprocess.ts
919
- var mt;
920
- async function ht(e) {
921
- return e = await vt(e), e = wt(e), e;
917
+ var ht;
918
+ async function gt(e) {
919
+ return e = await yt(e), e = Tt(e), e;
922
920
  }
923
- function gt() {
924
- return mt ||= dt(), mt;
921
+ function _t() {
922
+ return ht ||= ft(), ht;
925
923
  }
926
- var _t = /<pre class="td-code-placeholder"([^>]*)><code>([\s\S]*?)<\/code><\/pre>/g;
927
- function U(e, t) {
924
+ var vt = /<pre class="td-code-placeholder"([^>]*)><code>([\s\S]*?)<\/code><\/pre>/g;
925
+ function H(e, t) {
928
926
  return e.match(RegExp(`${t}="([^"]*)"`))?.[1];
929
927
  }
930
- async function vt(e) {
931
- let t = await gt(), n = [...e.matchAll(_t)];
928
+ async function yt(e) {
929
+ let t = await _t(), n = [...e.matchAll(vt)];
932
930
  if (n.length === 0) return e;
933
931
  let r = await Promise.all(n.map(async (e) => {
934
- let n = e[1], r = U(n, "data-lang") ?? "", i = U(n, "data-meta") ?? "", a = U(n, "data-title"), o = U(n, "data-line-numbers"), s = p(e[2]);
935
- return xt(await t(s, r, i, o === void 0 ? void 0 : parseInt(o) || 1), r, {
932
+ let n = e[1], r = H(n, "data-lang") ?? "", i = H(n, "data-meta") ?? "", a = H(n, "data-title"), o = H(n, "data-line-numbers"), s = p(e[2]);
933
+ return St(await t(s, r, i, o === void 0 ? void 0 : parseInt(o) || 1), r, {
936
934
  title: a,
937
935
  lineNumbers: o
938
936
  });
@@ -943,7 +941,7 @@ async function vt(e) {
943
941
  }
944
942
  return i;
945
943
  }
946
- var yt = {
944
+ var bt = {
947
945
  typescript: "TypeScript",
948
946
  javascript: "JavaScript",
949
947
  tsx: "TSX",
@@ -991,24 +989,24 @@ var yt = {
991
989
  scala: "Scala",
992
990
  txt: "Text"
993
991
  };
994
- function bt(e) {
995
- return yt[e.toLowerCase()] ?? e;
992
+ function xt(e) {
993
+ return bt[e.toLowerCase()] ?? e;
996
994
  }
997
- function xt(e, t, n) {
995
+ function St(e, t, n) {
998
996
  t ||= "txt";
999
- let r = bt(t), i = ["td-code-block", "language-" + t];
997
+ let r = xt(t), i = ["td-code-block", "language-" + t];
1000
998
  n.title && i.push("has-title"), n.lineNumbers !== void 0 && i.push("line-numbers-mode");
1001
999
  let a = `<figure class="${i.join(" ")}">`;
1002
1000
  return a += "<figcaption class=\"td-code-header\">", a += "<span class=\"td-code-left\">", a += `<span class="td-code-lang">${f(r)}</span>`, n.title && (a += `<span class="td-code-label">${f(n.title)}</span>`), a += "</span>", a += "<span class=\"td-code-actions\">", a += "<button type=\"button\" aria-label=\"Copy code\" data-copied=\"Copied\" class=\"td-code-copy\">", a += "<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\"></rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"></path></svg>", a += "<span class=\"td-code-copy-text\">Copy</span>", a += "</button>", a += "</span>", a += "</figcaption>", a += e, a += "</figure>", a;
1003
1001
  }
1004
- var St = /<span class="td-math-inline">([\s\S]*?)<\/span>/g, Ct = /<div class="td-math-block">([\s\S]*?)<\/div>/g;
1005
- function wt(e) {
1006
- return e = e.replace(St, (e, t) => Dt(t, !1)), e = e.replace(Ct, (e, t) => Dt(t, !0)), e;
1002
+ var Ct = /<span class="td-math-inline">([\s\S]*?)<\/span>/g, wt = /<div class="td-math-block">([\s\S]*?)<\/div>/g;
1003
+ function Tt(e) {
1004
+ return e = e.replace(Ct, (e, t) => Ot(t, !1)), e = e.replace(wt, (e, t) => Ot(t, !0)), e;
1007
1005
  }
1008
- var Tt = /`([^`]+)`|\$([^$]+)\$/g;
1009
- function Et(e) {
1006
+ var Et = /`([^`]+)`|\$([^$]+)\$/g;
1007
+ function Dt(e) {
1010
1008
  let t = 0, n = "";
1011
- for (let r of e.matchAll(Tt)) {
1009
+ for (let r of e.matchAll(Et)) {
1012
1010
  if (n += f(e.slice(t, r.index)), r[1] !== void 0) n += `<code>${f(r[1])}</code>`;
1013
1011
  else if (r[2] !== void 0) try {
1014
1012
  n += D.renderToString(r[2], { throwOnError: !1 });
@@ -1019,7 +1017,7 @@ function Et(e) {
1019
1017
  }
1020
1018
  return n += f(e.slice(t)), n;
1021
1019
  }
1022
- function Dt(e, t) {
1020
+ function Ot(e, t) {
1023
1021
  let n = t ? "div" : "span";
1024
1022
  try {
1025
1023
  return D.renderToString(p(e), {
@@ -1031,7 +1029,7 @@ function Dt(e, t) {
1031
1029
  }
1032
1030
  }
1033
1031
  // src/node/lib/render/vue.ts
1034
- async function W(e, t, n) {
1032
+ async function U(e, t, n) {
1035
1033
  let r = t.title || t.label || (d(n) ? ee(n, (await e.getConfig()).siteTitle) : C(n));
1036
1034
  return {
1037
1035
  schema: t.schema,
@@ -1039,17 +1037,17 @@ async function W(e, t, n) {
1039
1037
  label: t.label,
1040
1038
  icon: t.icon,
1041
1039
  frontmatter: t.header ?? {},
1042
- headings: kt(t.headings),
1040
+ headings: At(t.headings),
1043
1041
  title: r,
1044
- titleHtml: Et(r),
1042
+ titleHtml: Dt(r),
1045
1043
  filepath: n,
1046
1044
  fileMetadata: t.fileMetadata,
1047
1045
  seoMetadata: t.seoMetadata,
1048
1046
  excerpt: t.excerpt
1049
1047
  };
1050
1048
  }
1051
- async function Ot(e, t, n) {
1052
- let r = await ht(t.content), i = await W(e, t, n), a = JSON.stringify(`@typedown/pages?resource=${encodeURIComponent(n)}`);
1049
+ async function kt(e, t, n) {
1050
+ let r = await gt(t.content), i = await U(e, t, n), a = JSON.stringify(`@typedown/pages?resource=${encodeURIComponent(n)}`);
1053
1051
  return {
1054
1052
  vueSrc: [
1055
1053
  "<script>",
@@ -1061,12 +1059,12 @@ async function Ot(e, t, n) {
1061
1059
  `import { pageData } from ${a}`,
1062
1060
  "useRouter().route.data = pageData",
1063
1061
  "<\/script>",
1064
- `<template><div class="typedown-content">\n${At(r)}\n</div></template>`
1062
+ `<template><div class="typedown-content">\n${jt(r)}\n</div></template>`
1065
1063
  ].join("\n"),
1066
1064
  pageData: i
1067
1065
  };
1068
1066
  }
1069
- function kt(e) {
1067
+ function At(e) {
1070
1068
  let t = [], n = [];
1071
1069
  for (let r of e) {
1072
1070
  let e = {
@@ -1082,15 +1080,15 @@ function kt(e) {
1082
1080
  }
1083
1081
  return t;
1084
1082
  }
1085
- function At(e) {
1083
+ function jt(e) {
1086
1084
  return e.replaceAll("{{", "&#123;&#123;").replaceAll("}}", "&#125;&#125;");
1087
1085
  }
1088
1086
  // src/node/plugin/vite/constants.ts
1089
- var jt = "@typedown/app", Mt = "\0@typedown/app", G = "@typedown/pages", Nt = "\0" + G;
1090
- G + "";
1091
- var K = "\0@typedown/pages?resource=", q = "@typedown/site-data", Pt = "\0@typedown/site-data", J = "@typedown/search-index", Ft = "\0@typedown/search-index", Y = "@typedown/theme", It = "\0@typedown/theme", X = "typedown:page-data";
1087
+ var Mt = "@typedown/app", Nt = "\0@typedown/app", W = "@typedown/pages", Pt = "\0" + W;
1088
+ W + "";
1089
+ var G = "\0@typedown/pages?resource=", K = "@typedown/site-data", Ft = "\0@typedown/site-data", q = "@typedown/search-index", It = "\0@typedown/search-index", J = "@typedown/theme", Lt = "\0@typedown/theme", Y = "typedown:page-data";
1092
1090
  // src/node/plugin/vite/virtual/utils.ts
1093
- function Z(e, t) {
1091
+ function X(e, t) {
1094
1092
  let n = e.moduleGraph.getModuleById(t);
1095
1093
  if (n) {
1096
1094
  e.moduleGraph.invalidateModule(n);
@@ -1106,14 +1104,14 @@ function Z(e, t) {
1106
1104
  }
1107
1105
  }
1108
1106
  // src/node/plugin/vite/virtual/app.ts
1109
- var Lt = class {
1107
+ var Rt = class {
1110
1108
  mountPath;
1111
1109
  constructor(e = "") {
1112
1110
  this.mountPath = e;
1113
1111
  }
1114
1112
  async load(e) {
1115
1113
  let t = await (await e.getTdContext()).getConfig(), n = await L(t.components, e.root);
1116
- return Me({
1114
+ return je({
1117
1115
  rootDir: t.rootDir,
1118
1116
  mountPath: this.mountPath,
1119
1117
  basePath: t.basePath,
@@ -1127,17 +1125,17 @@ var Lt = class {
1127
1125
  nav: t.nav,
1128
1126
  userComponents: n
1129
1127
  }, {
1130
- theme: Y,
1131
- pages: G,
1132
- siteData: q,
1133
- searchIndex: J,
1134
- pageDataEvent: X
1128
+ theme: J,
1129
+ pages: W,
1130
+ siteData: K,
1131
+ searchIndex: q,
1132
+ pageDataEvent: Y
1135
1133
  });
1136
1134
  }
1137
1135
  invalidate(e) {
1138
- Z(e, Mt);
1136
+ X(e, Nt);
1139
1137
  }
1140
- }, Rt = class {
1138
+ }, zt = class {
1141
1139
  mountPath;
1142
1140
  constructor(e = "") {
1143
1141
  this.mountPath = e;
@@ -1150,21 +1148,21 @@ var Lt = class {
1150
1148
  if (e.startsWith("@typedown/pages?resource=")) return "\0" + e;
1151
1149
  }
1152
1150
  isPageDataModule(e) {
1153
- return e.startsWith(K);
1151
+ return e.startsWith(G);
1154
1152
  }
1155
1153
  async loadPageData(e, t) {
1156
- let n = decodeURIComponent(e.slice(K.length)), r = await W(t, await t.getFile(n), n);
1154
+ let n = decodeURIComponent(e.slice(G.length)), r = await U(t, await t.getFile(n), n);
1157
1155
  return `export const pageData = ${JSON.stringify(r)}`;
1158
1156
  }
1159
1157
  invalidatePageData(e, t) {
1160
- Z(e, K + encodeURIComponent(t));
1158
+ X(e, G + encodeURIComponent(t));
1161
1159
  }
1162
1160
  sendPageData(e, t, n) {
1163
1161
  t.getFile(n).then(async (r) => {
1164
- let i = await W(t, r, n);
1162
+ let i = await U(t, r, n);
1165
1163
  e.hot.send({
1166
1164
  type: "custom",
1167
- event: X,
1165
+ event: Y,
1168
1166
  data: {
1169
1167
  filepath: n,
1170
1168
  pageData: i
@@ -1175,24 +1173,24 @@ var Lt = class {
1175
1173
  });
1176
1174
  }
1177
1175
  invalidate(e) {
1178
- Z(e, Nt);
1176
+ X(e, Pt);
1179
1177
  }
1180
- }, zt = class {
1178
+ }, Bt = class {
1181
1179
  async load(e) {
1182
1180
  return Ne((await (await e.getTdContext()).getConfig()).layout ?? void 0, e.root);
1183
1181
  }
1184
1182
  invalidate(e) {
1185
- Z(e, It);
1183
+ X(e, Lt);
1186
1184
  }
1187
- }, Bt = "\0@typedown/site-data", Vt = {
1185
+ }, Vt = "\0@typedown/site-data", Ht = {
1188
1186
  ready: !1,
1189
1187
  contentTree: { entries: [] },
1190
1188
  schemas: {},
1191
1189
  directoryListings: {}
1192
- }, Ht = class {
1190
+ }, Ut = class {
1193
1191
  data;
1194
1192
  scan(e) {
1195
- let t = pe("**/*.td", {
1193
+ let t = fe("**/*.td", {
1196
1194
  cwd: e,
1197
1195
  exclude: (e) => e.startsWith("_")
1198
1196
  }).map((e) => ({
@@ -1210,27 +1208,27 @@ var Lt = class {
1210
1208
  let t = this.data ? {
1211
1209
  ready: !0,
1212
1210
  ...this.data
1213
- } : Vt;
1211
+ } : Ht;
1214
1212
  return `export default ${JSON.stringify(t)}`;
1215
1213
  }
1216
1214
  clear() {
1217
1215
  this.data = void 0;
1218
1216
  }
1219
1217
  fetch = y((e, t) => {
1220
- Ut(e).then((e) => {
1218
+ Wt(e).then((e) => {
1221
1219
  this.data = e, t && this.invalidate(t);
1222
1220
  }).catch((e) => {
1223
1221
  console.error("[typedown] Failed to fetch site data:", e instanceof Error ? e.message : e);
1224
1222
  });
1225
1223
  }, 200);
1226
1224
  async fetchSync(e) {
1227
- this.data = await Ut(e);
1225
+ this.data = await Wt(e);
1228
1226
  }
1229
1227
  invalidate(e) {
1230
- Z(e, Bt);
1228
+ X(e, Vt);
1231
1229
  }
1232
1230
  };
1233
- async function Ut(e) {
1231
+ async function Wt(e) {
1234
1232
  let [t, n, r] = await Promise.all([
1235
1233
  e.getConfig(),
1236
1234
  e.listSidebar(),
@@ -1246,10 +1244,10 @@ async function Ut(e) {
1246
1244
  };
1247
1245
  }
1248
1246
  // src/node/lib/search-indexer/index.ts
1249
- var Wt = class {
1247
+ var Gt = class {
1250
1248
  index;
1251
1249
  constructor() {
1252
- this.index = new re({
1250
+ this.index = new ne({
1253
1251
  fields: v,
1254
1252
  storeFields: x
1255
1253
  });
@@ -1269,19 +1267,19 @@ var Wt = class {
1269
1267
  }
1270
1268
  };
1271
1269
  // src/node/lib/search-indexer/scan.ts
1272
- function Gt(e, t) {
1273
- let n = Yt(e), r = [];
1270
+ function Kt(e, t) {
1271
+ let n = Xt(e), r = [];
1274
1272
  for (let t of n) {
1275
- let n = Jt(e, t);
1273
+ let n = Yt(e, t);
1276
1274
  n && r.push(n);
1277
1275
  }
1278
1276
  t.addAll(r);
1279
1277
  }
1280
- function Kt(e, n, r) {
1281
- let i = Jt(e, j(e, n));
1278
+ function qt(e, n, r) {
1279
+ let i = Yt(e, M(e, n));
1282
1280
  i ? r.addPage(i) : r.discardPage(t(n));
1283
1281
  }
1284
- function qt(e, t) {
1282
+ function Jt(e, t) {
1285
1283
  let n = C(e);
1286
1284
  if (!t.startsWith("---")) return {
1287
1285
  title: n,
@@ -1298,54 +1296,54 @@ function qt(e, t) {
1298
1296
  body: a
1299
1297
  };
1300
1298
  }
1301
- function Jt(e, n) {
1299
+ function Yt(e, n) {
1302
1300
  let r;
1303
1301
  try {
1304
- r = me(n, "utf-8");
1302
+ r = pe(n, "utf-8");
1305
1303
  } catch {
1306
1304
  return;
1307
1305
  }
1308
1306
  if (!r.trim()) return;
1309
- let i = n.slice(e.length + 1), { title: a, body: o } = qt(i, r);
1307
+ let i = n.slice(e.length + 1), { title: a, body: o } = Jt(i, r);
1310
1308
  return {
1311
1309
  id: t(i),
1312
1310
  title: a,
1313
1311
  text: `${a}\n${o}`
1314
1312
  };
1315
1313
  }
1316
- function Yt(e) {
1317
- return pe("**/*.td", {
1314
+ function Xt(e) {
1315
+ return fe("**/*.td", {
1318
1316
  cwd: e,
1319
1317
  exclude: (e) => e.startsWith("_")
1320
- }).map((t) => j(e, t));
1318
+ }).map((t) => M(e, t));
1321
1319
  }
1322
1320
  // src/node/plugin/vite/virtual/search-index.ts
1323
- var Xt = "\0@typedown/search-index", Zt = class {
1324
- indexer = new Wt();
1321
+ var Zt = "\0@typedown/search-index", Qt = class {
1322
+ indexer = new Gt();
1325
1323
  load(e) {
1326
1324
  return `export default ${JSON.stringify(this.indexer.serialize())}`;
1327
1325
  }
1328
1326
  index(e) {
1329
- Gt(e, this.indexer);
1327
+ Kt(e, this.indexer);
1330
1328
  }
1331
1329
  reindex(e, t) {
1332
- Kt(e, t, this.indexer);
1330
+ qt(e, t, this.indexer);
1333
1331
  }
1334
1332
  invalidate(e) {
1335
- Z(e, Xt);
1333
+ X(e, Zt);
1336
1334
  }
1337
- }, Qt = ge(import.meta.url);
1338
- function $t() {
1335
+ }, $t = he(import.meta.url);
1336
+ function en() {
1339
1337
  return [{
1340
1338
  find: "vue/server-renderer",
1341
- replacement: Qt.resolve("vue/server-renderer")
1339
+ replacement: $t.resolve("vue/server-renderer")
1342
1340
  }, {
1343
1341
  find: "vue",
1344
- replacement: Qt.resolve("vue/dist/vue.runtime.esm-bundler.js")
1342
+ replacement: $t.resolve("vue/dist/vue.runtime.esm-bundler.js")
1345
1343
  }];
1346
1344
  }
1347
1345
  // src/node/plugin/vite/middleware/vault-assets.ts
1348
- var en = {
1346
+ var tn = {
1349
1347
  jpg: "image/jpeg",
1350
1348
  jpeg: "image/jpeg",
1351
1349
  png: "image/png",
@@ -1363,17 +1361,17 @@ var en = {
1363
1361
  woff: "font/woff",
1364
1362
  ttf: "font/ttf"
1365
1363
  };
1366
- function tn(e, t) {
1364
+ function nn(e, t) {
1367
1365
  return (n, r, s) => {
1368
1366
  if (!n.url || n.method !== "GET" || r.writableEnded) return s();
1369
1367
  let c = a(n.url);
1370
1368
  if (c.startsWith("/@") || c.startsWith("/node_modules")) return s();
1371
- let l = i(t.basePath), u = (l && c.startsWith(l) ? c.slice(l.length) : c).replace(/^\//, ""), d = j(e.config.root, t.rootDirectory, u);
1372
- if (fe(d)) try {
1373
- let e = he(d);
1369
+ let l = i(t.basePath), u = (l && c.startsWith(l) ? c.slice(l.length) : c).replace(/^\//, ""), d = M(e.config.root, t.rootDirectory, u);
1370
+ if (de(d)) try {
1371
+ let e = me(d);
1374
1372
  if (e.isFile()) {
1375
- let t = en[o(d).slice(1).toLowerCase()] ?? "application/octet-stream";
1376
- r.setHeader("Content-Type", t), r.setHeader("Content-Length", e.size), de(d).pipe(r);
1373
+ let t = tn[o(d).slice(1).toLowerCase()] ?? "application/octet-stream";
1374
+ r.setHeader("Content-Type", t), r.setHeader("Content-Length", e.size), ue(d).pipe(r);
1377
1375
  return;
1378
1376
  }
1379
1377
  } catch {}
@@ -1381,7 +1379,7 @@ function tn(e, t) {
1381
1379
  };
1382
1380
  }
1383
1381
  // src/node/plugin/vite/middleware/virtual-html.ts
1384
- function nn(e, t, n) {
1382
+ function rn(e, t, n) {
1385
1383
  return (r, o, s) => {
1386
1384
  if (!r.url) return s();
1387
1385
  let c = i(a(r.url)), l = i(n.basePath);
@@ -1389,30 +1387,30 @@ function nn(e, t, n) {
1389
1387
  let u = c.slice(l.length);
1390
1388
  if (u.startsWith("/@") || u.startsWith("/node_modules") || c.includes(".") && !c.endsWith("/index.html")) return s();
1391
1389
  t.getConfig().then(async (t) => {
1392
- let i = await e.transformIndexHtml(r.url ?? "", rn(n, t));
1390
+ let i = await e.transformIndexHtml(r.url ?? "", an(n, t));
1393
1391
  o.setHeader("Content-Type", "text/html"), o.end(i);
1394
1392
  }).catch(() => s());
1395
1393
  };
1396
1394
  }
1397
- function rn(e, t) {
1395
+ function an(e, t) {
1398
1396
  return e.devHtml === void 0 && (e.devHtml = T({
1399
1397
  title: t.siteTitle,
1400
1398
  description: t.siteDescription,
1401
1399
  base: "/",
1402
1400
  ogType: "website",
1403
- entryScript: jt
1401
+ entryScript: Mt
1404
1402
  })), e.devHtml;
1405
1403
  }
1406
1404
  // src/node/lib/prop-schema.ts
1407
- function an(e, t, n) {
1405
+ function on(e, t, n) {
1408
1406
  let r = {};
1409
1407
  for (let i of e) {
1410
- let e = `./${A.relative(t, i.absolutePath)}`;
1408
+ let e = `./${j.relative(t, i.absolutePath)}`;
1411
1409
  try {
1412
1410
  let t = n.getComponentMeta(i.absolutePath), a = {}, o = !1;
1413
1411
  for (let e of t.props) {
1414
1412
  if (e.global) continue;
1415
- let t = $(e.schema);
1413
+ let t = Z(e.schema);
1416
1414
  if (t !== void 0) {
1417
1415
  let n = { schema: e.required ? t : l(t) };
1418
1416
  e.description && (n.description = e.description), a[e.name] = n, o = !0;
@@ -1430,25 +1428,25 @@ function an(e, t, n) {
1430
1428
  }
1431
1429
  return r;
1432
1430
  }
1433
- function on(e) {
1431
+ function sn(e) {
1434
1432
  if (!e || e.length !== 1) return;
1435
- let t = $(e[0]);
1433
+ let t = Z(e[0]);
1436
1434
  return t === void 0 ? void 0 : {
1437
1435
  type: "array",
1438
1436
  items: t
1439
1437
  };
1440
1438
  }
1441
- function sn(e, t) {
1442
- if (t && 0 < Object.keys(t).length) return cn(t);
1439
+ function cn(e, t) {
1440
+ if (t && 0 < Object.keys(t).length) return un(t);
1443
1441
  let n = /^(?:Record<string,\s*(\w+)>|\{\s*\[key:\s*string\]:\s*(\w+);\s*\})$/.exec(e);
1444
1442
  if (!n) return;
1445
- let r = Q(n[1] ?? n[2]);
1443
+ let r = ln(n[1] ?? n[2]);
1446
1444
  return r === void 0 ? void 0 : {
1447
1445
  type: "object",
1448
1446
  additionalProperties: r
1449
1447
  };
1450
1448
  }
1451
- function Q(e) {
1449
+ function ln(e) {
1452
1450
  switch (e) {
1453
1451
  case "string": return { type: "string" };
1454
1452
  case "number": return { type: "number" };
@@ -1462,7 +1460,7 @@ function Q(e) {
1462
1460
  let t = e.replace(/^["']|["']$/g, "");
1463
1461
  i.push({ const: t });
1464
1462
  } else {
1465
- let t = Q(e);
1463
+ let t = ln(e);
1466
1464
  if (t === void 0) return;
1467
1465
  i.push(t);
1468
1466
  }
@@ -1472,10 +1470,10 @@ function Q(e) {
1472
1470
  return;
1473
1471
  }
1474
1472
  }
1475
- function cn(e) {
1473
+ function un(e) {
1476
1474
  let t = {}, n = [];
1477
1475
  for (let [r, i] of Object.entries(e)) {
1478
- let e = $(i.schema);
1476
+ let e = Z(i.schema);
1479
1477
  if (e === void 0) return;
1480
1478
  t[r] = e, i.required && n.push(r);
1481
1479
  }
@@ -1486,21 +1484,21 @@ function cn(e) {
1486
1484
  };
1487
1485
  return 0 < n.length && (r.required = n), r;
1488
1486
  }
1489
- function $(e) {
1490
- if (typeof e == "string") return Q(e);
1487
+ function Z(e) {
1488
+ if (typeof e == "string") return ln(e);
1491
1489
  switch (e.kind) {
1492
- case "enum": return ln(e.schema);
1493
- case "array": return on(e.schema);
1494
- case "object": return sn(e.type, e.schema);
1490
+ case "enum": return dn(e.schema);
1491
+ case "array": return sn(e.schema);
1492
+ case "object": return cn(e.type, e.schema);
1495
1493
  case "literal": return "value" in e ? { const: e.value } : void 0;
1496
1494
  default: return;
1497
1495
  }
1498
1496
  }
1499
- function ln(e) {
1497
+ function dn(e) {
1500
1498
  let t = e ?? [], n = t.some((e) => e === "undefined" || e === "null"), r = t.filter((e) => e !== "undefined" && e !== "null");
1501
1499
  if (r.length === 0) return;
1502
1500
  if (r.length === 1) {
1503
- let e = $(r[0]);
1501
+ let e = Z(r[0]);
1504
1502
  return e === void 0 ? void 0 : n ? l(e) : e;
1505
1503
  }
1506
1504
  if (r.every((e) => typeof e == "object" && e.kind === "literal")) {
@@ -1514,7 +1512,7 @@ function ln(e) {
1514
1512
  }
1515
1513
  let i = [];
1516
1514
  for (let e of r) {
1517
- let t = $(e);
1515
+ let t = Z(e);
1518
1516
  if (t === void 0) return;
1519
1517
  i.push(t);
1520
1518
  }
@@ -1523,43 +1521,43 @@ function ln(e) {
1523
1521
  return n ? l(a) : a;
1524
1522
  }
1525
1523
  // src/node/plugin/vite/subplugins/component-contract.ts
1526
- var un = ".typedown/components.json";
1527
- function dn(e) {
1524
+ var fn = ".typedown/components.json";
1525
+ function pn(e) {
1528
1526
  return {
1529
1527
  name: "vite-plugin-typedown-component-contract",
1530
1528
  async buildStart() {
1531
1529
  let t = e();
1532
1530
  if (!t) return;
1533
1531
  let n = await L((await (await t.getTdContext()).getConfig()).components, t.root);
1534
- gn(t.root, n);
1532
+ Q(t.root, n);
1535
1533
  },
1536
1534
  configureServer(t) {
1537
1535
  let n = e();
1538
1536
  n && n.getTdContext().then(async (e) => {
1539
1537
  let r = await e.getConfig(), i = await L(r.components, n.root);
1540
- gn(n.root, i), fn(t, r.components, n.root);
1538
+ Q(n.root, i), mn(t, r.components, n.root);
1541
1539
  }).catch(() => {});
1542
1540
  }
1543
1541
  };
1544
1542
  }
1545
- function fn(e, t, n) {
1546
- let r = new Set(t.filter((e) => e.kind === "explicit").map((e) => N(A.resolve(n, e.source)))), i = new Set(t.filter((e) => e.kind === "dir").map((e) => N(A.resolve(n, e.path))));
1543
+ function mn(e, t, n) {
1544
+ let r = new Set(t.filter((e) => e.kind === "explicit").map((e) => P(j.resolve(n, e.source)))), i = new Set(t.filter((e) => e.kind === "dir").map((e) => P(j.resolve(n, e.path))));
1547
1545
  for (let t of i) e.watcher.add(t);
1548
1546
  let a = (a) => {
1549
- pn(a, r, i) && (e.config.logger.info("[typedown] component changed, rebuilding contract..."), L(t, n).then((e) => gn(n, e)).catch(() => {}));
1547
+ hn(a, r, i) && (e.config.logger.info("[typedown] component changed, rebuilding contract..."), L(t, n).then((e) => Q(n, e)).catch(() => {}));
1550
1548
  };
1551
1549
  e.watcher.on("change", a), e.watcher.on("add", a), e.watcher.on("unlink", a);
1552
1550
  }
1553
- function pn(e, t, n) {
1551
+ function hn(e, t, n) {
1554
1552
  if (!e.endsWith(".vue")) return !1;
1555
- let r = N(e);
1553
+ let r = P(e);
1556
1554
  if (t.has(r)) return !0;
1557
1555
  for (let e of n) if (r.startsWith(e + "/")) return !0;
1558
1556
  return !1;
1559
1557
  }
1560
- function mn() {
1558
+ function gn() {
1561
1559
  try {
1562
- let e = A.dirname(ce(import.meta.url)), t = A.resolve(e, "builtin-components.json"), n = JSON.parse(F.readFileSync(t, "utf-8"));
1560
+ let e = j.dirname(se(import.meta.url)), t = j.resolve(e, "builtin-components.json"), n = JSON.parse(I.readFileSync(t, "utf-8"));
1563
1561
  for (let e of Object.values(n)) if (typeof e == "object" && e && "source" in e) {
1564
1562
  let t = e;
1565
1563
  typeof t.source == "string" && t.source.startsWith("./") && (t.source = `typerighter/${t.source.slice(2)}`);
@@ -1569,18 +1567,18 @@ function mn() {
1569
1567
  return {};
1570
1568
  }
1571
1569
  }
1572
- var hn = mn();
1573
- function gn(e, t) {
1574
- if (!(0 < Object.keys(hn).length) && t.length === 0) return;
1575
- let n = 0 < t.length ? an(t, e, Pe(e)) : {}, r = {
1576
- ...hn,
1570
+ var _n = gn();
1571
+ function Q(e, t) {
1572
+ if (!(0 < Object.keys(_n).length) && t.length === 0) return;
1573
+ let n = 0 < t.length ? on(t, e, Pe(e)) : {}, r = {
1574
+ ..._n,
1577
1575
  ...n
1578
- }, i = A.join(e, un);
1579
- F.mkdirSync(A.dirname(i), { recursive: !0 }), F.writeFileSync(i, JSON.stringify(r, null, 2));
1576
+ }, i = j.join(e, fn);
1577
+ I.mkdirSync(j.dirname(i), { recursive: !0 }), I.writeFileSync(i, JSON.stringify(r, null, 2));
1580
1578
  }
1581
1579
  // src/node/plugin/vite/index.ts
1582
- function _n(t = {}) {
1583
- let n = t.context, r, i, a, o = new Lt(t.root ?? ""), s = new zt(), l = new Rt(t.root ?? ""), u = new Ht(), d = new Zt(), f = {
1580
+ function $(t = {}) {
1581
+ let n = t.context, r, i, a, o = new Rt(t.root ?? ""), s = new Bt(), l = new zt(t.root ?? ""), u = new Ut(), d = new Qt(), f = {
1584
1582
  devHtml: void 0,
1585
1583
  basePath: "/",
1586
1584
  rootDirectory: "vault"
@@ -1594,8 +1592,8 @@ function _n(t = {}) {
1594
1592
  enforce: "pre",
1595
1593
  async config(e) {
1596
1594
  if (!n) {
1597
- let r = t.root ? j(e.root ?? process.cwd(), t.root) : ne(e.root ?? process.cwd());
1598
- n = te(r);
1595
+ let r = t.root ? M(e.root ?? process.cwd(), t.root) : te(e.root ?? process.cwd());
1596
+ n = A(r);
1599
1597
  }
1600
1598
  a = e.base ?? "/";
1601
1599
  let r = await (await p()).getConfig();
@@ -1606,16 +1604,16 @@ function _n(t = {}) {
1606
1604
  port: e.server?.port ?? 8686,
1607
1605
  strictPort: e.server?.strictPort ?? !1
1608
1606
  },
1609
- resolve: { alias: $t() },
1607
+ resolve: { alias: en() },
1610
1608
  ssr: { noExternal: ["typerighter"] }
1611
1609
  };
1612
1610
  },
1613
1611
  configResolved(e) {
1614
- i = j(e.root, e.build.outDir);
1612
+ i = M(e.root, e.build.outDir);
1615
1613
  },
1616
1614
  async buildStart() {
1617
1615
  if (r) return;
1618
- let e = await p(), t = await e.getConfig(), n = j(t.rootDir);
1616
+ let e = await p(), t = await e.getConfig(), n = M(t.rootDir);
1619
1617
  d.index(n), await u.fetchSync(e);
1620
1618
  let i = await e.checkVault();
1621
1619
  if (Sn(i.diagnostics), 0 < i.errorCount) {
@@ -1624,12 +1622,12 @@ function _n(t = {}) {
1624
1622
  }
1625
1623
  },
1626
1624
  resolveId(e) {
1627
- if (e === "/@typedown/app" || e === "@typedown/app") return Mt;
1628
- if (e === "@typedown/pages") return Nt;
1625
+ if (e === "/@typedown/app" || e === "@typedown/app") return Nt;
1626
+ if (e === "@typedown/pages") return Pt;
1629
1627
  if (e.startsWith("@typedown/pages?resource=")) return l.resolvePageData(e);
1630
- if (e === "@typedown/site-data") return Pt;
1631
- if (e === "@typedown/search-index") return Ft;
1632
- if (e === "@typedown/theme") return It;
1628
+ if (e === "@typedown/site-data") return Ft;
1629
+ if (e === "@typedown/search-index") return It;
1630
+ if (e === "@typedown/theme") return Lt;
1633
1631
  },
1634
1632
  async load(e) {
1635
1633
  if (l.isPageDataModule(e)) return l.loadPageData(e, await p());
@@ -1643,7 +1641,7 @@ function _n(t = {}) {
1643
1641
  },
1644
1642
  async configureServer(e) {
1645
1643
  r = e;
1646
- let t = await p(), n = await t.getConfig(), i = j(n.rootDir);
1644
+ let t = await p(), n = await t.getConfig(), i = M(n.rootDir);
1647
1645
  d.index(i), u.scan(i), u.fetch(t, r), e.httpServer?.once("listening", async () => {
1648
1646
  let e = await t.checkVault();
1649
1647
  0 < e.diagnostics.length && (console.error(""), Sn(e.diagnostics));
@@ -1657,7 +1655,7 @@ function _n(t = {}) {
1657
1655
  if (!r) return;
1658
1656
  let n = [];
1659
1657
  for (let i of e) {
1660
- let e = N(j(r.config.root, t.rootDir, i)), a = r.moduleGraph.getModulesByFile(e);
1658
+ let e = P(M(r.config.root, t.rootDir, i)), a = r.moduleGraph.getModulesByFile(e);
1661
1659
  if (a?.size) {
1662
1660
  for (let e of a) r.moduleGraph.invalidateModule(e), n.push(xn(e));
1663
1661
  l.invalidatePageData(r, i);
@@ -1681,18 +1679,18 @@ function _n(t = {}) {
1681
1679
  let m = await t.getConfig();
1682
1680
  f.basePath = m.basePath, f.rootDirectory = m.rootDir, t.rpc.onConfigChanged((e) => {
1683
1681
  f.basePath = e.basePath, f.rootDirectory = e.rootDir, f.devHtml = void 0;
1684
- }), e.middlewares.use(tn(e, f)), e.middlewares.use(nn(e, t, f));
1682
+ }), e.middlewares.use(nn(e, f)), e.middlewares.use(rn(e, t, f));
1685
1683
  },
1686
1684
  async transform(t, n) {
1687
1685
  let r = n.split("?")[0];
1688
1686
  if (!w(r)) return;
1689
1687
  if (e(r)) return {
1690
- code: `<script>import theme from '${Y}'; import { TdNotFound } from 'typerighter/client/theme-default'; export default theme.NotFound || TdNotFound; export const pageData = { frontmatter: {}, headings: [], title: '' };<\/script>`,
1688
+ code: `<script>import theme from '${J}'; import { TdNotFound } from 'typerighter/client/theme-default'; export default theme.NotFound || TdNotFound; export const pageData = { frontmatter: {}, headings: [], title: '' };<\/script>`,
1691
1689
  map: null
1692
1690
  };
1693
1691
  let i = await p(), a = await i.getConfig(), o = c(r, a.rootDir);
1694
1692
  try {
1695
- let { vueSrc: e } = await Ot(i, await i.getFile(o), o);
1693
+ let { vueSrc: e } = await kt(i, await i.getFile(o), o);
1696
1694
  return {
1697
1695
  code: e,
1698
1696
  map: null
@@ -1709,23 +1707,23 @@ function _n(t = {}) {
1709
1707
  async closeBundle() {
1710
1708
  if (!t.context && n) try {
1711
1709
  let e = (await (await n.getTdContext()).getConfig()).basePath, t = e.startsWith(a) ? e.slice(a.length) : e.replace(/^\//, "");
1712
- await Le(n, {
1713
- outDir: j(i, t),
1710
+ await Re(n, {
1711
+ outDir: M(i, t),
1714
1712
  base: e
1715
1713
  });
1716
1714
  } finally {
1717
1715
  n.dispose();
1718
1716
  }
1719
1717
  }
1720
- }, h = ae({
1718
+ }, h = ie({
1721
1719
  include: t.root ? RegExp(`${t.root.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}/.*\\.(?:vue|td)$`) : /\.(?:vue|td)$/,
1722
1720
  template: { transformAssetUrls: !1 }
1723
1721
  });
1724
1722
  return [
1725
1723
  m,
1726
- dn(() => n),
1724
+ pn(() => n),
1727
1725
  h,
1728
- ...ie()
1726
+ ...re()
1729
1727
  ];
1730
1728
  }
1731
1729
  function vn(e) {
@@ -1752,8 +1750,8 @@ function xn(e) {
1752
1750
  }
1753
1751
  function Sn(e) {
1754
1752
  for (let t of e) {
1755
- let e = `${t.filepath}:${t.line}:${t.column}`, n = t.severity === "error" ? M.red("error") : M.yellow("warn");
1756
- console.error(` ${n} ${e} ${t.message} ${M.dim(`(${t.code})`)}`);
1753
+ let e = `${t.filepath}:${t.line}:${t.column}`, n = t.severity === "error" ? N.red("error") : N.yellow("warn");
1754
+ console.error(` ${n} ${e} ${t.message} ${N.dim(`(${t.code})`)}`);
1757
1755
  }
1758
1756
  }
1759
- export { q as a, J as i, G as n, Y as o, X as r, Le as s, _n as t };
1757
+ export { K as a, q as i, W as n, J as o, Y as r, Re as s, $ as t };