typerighter 0.57.5 → 0.57.6

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,4 +1,4 @@
1
- import { s as e, t } from "./vite-BW7e5WmY.js";
1
+ import { s as e, t } from "./vite-D5VPvBjJ.js";
2
2
  import { n } from "./context-CLKZYp4U.js";
3
3
  import r from "node:path";
4
4
  import i from "picocolors";
@@ -370,7 +370,7 @@ function A() {
370
370
  }), process.on("unhandledRejection", (e) => {
371
371
  j("runtime", e instanceof Error ? e : Error(String(e)));
372
372
  }), 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) => {
373
- n.verbose && console.log(`${k} cli v0.57.5 (built 11/10/2026, 5:45:36 AM)\n`), n.fresh && (process.env.TYPEDOWN_NO_CACHE = "1");
373
+ n.verbose && console.log(`${k} cli v0.57.6 (built 11/13/2026, 11:26:41 AM)\n`), n.fresh && (process.env.TYPEDOWN_NO_CACHE = "1");
374
374
  let r = await a({
375
375
  root: N(e),
376
376
  configFile: !1,
@@ -396,7 +396,7 @@ function A() {
396
396
  }
397
397
  process.exit(0);
398
398
  }), 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) => {
399
- let { initialize: n } = await import("./init-C7wSvwll.js");
399
+ let { initialize: n } = await import("./init-C_guo1iW.js");
400
400
  await n(N(e), t);
401
401
  }), i.command("preview [root]", "Preview production build").option("--port <port>", "Port to listen on").action(async (e, t) => {
402
402
  let r = N(e), i = n(r);
@@ -435,7 +435,7 @@ function A() {
435
435
  } finally {
436
436
  i.dispose();
437
437
  }
438
- }), i.help(), i.version("0.57.5"), i.parse();
438
+ }), i.help(), i.version("0.57.6"), i.parse();
439
439
  }
440
440
  function j(e, t) {
441
441
  let n = t instanceof Error ? t.message : String(t);
@@ -443,7 +443,7 @@ function j(e, t) {
443
443
  }
444
444
  async function M(e) {
445
445
  let t = await (await e.getTdContext()).rpc.getVersion();
446
- console.log(`${k} cli v0.57.5 (built 11/10/2026, 5:45:36 AM)`), console.log(`${k} rpc v${t}`), console.log("");
446
+ console.log(`${k} cli v0.57.6 (built 11/13/2026, 11:26:41 AM)`), console.log(`${k} rpc v${t}`), console.log("");
447
447
  }
448
448
  function N(e) {
449
449
  return r.resolve(e ?? process.cwd());
package/dist/cli.js CHANGED
@@ -1 +1 @@
1
- export { t as cli } from "./cli-qLoiInH7.js";
1
+ export { t as cli } from "./cli-Cm8KzMli.js";
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./vite-BW7e5WmY.js";
2
- import { t as s } from "./cli-qLoiInH7.js";
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./vite-D5VPvBjJ.js";
2
+ import { t as s } from "./cli-Cm8KzMli.js";
3
3
  export { n as PAGES_ID, i as PAGE_DATA_EVENT, t as SEARCH_INDEX_ID, e as SITE_DATA_ID, r as THEME_ID, a as buildSite, s as cli, o as typedown };
@@ -769,7 +769,7 @@ function Ze(e) {
769
769
  check: "typerighter check"
770
770
  },
771
771
  devDependencies: {
772
- typerighter: "^0.57.5",
772
+ typerighter: "^0.57.6",
773
773
  typescript: "^5.0.0"
774
774
  }
775
775
  }, void 0, 2) + "\n";
@@ -552,14 +552,14 @@ function Ue(e, t, n = "") {
552
552
  p(r.node) || t.push(c(e)), Ue(r.node.entries, t, e);
553
553
  }
554
554
  }
555
- // ../../node_modules/.pnpm/@shikijs+transformers@4.4.3/node_modules/@shikijs/transformers/dist/index.mjs
556
- var We = /(\s+\/\/)/, Ge = /(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/, Ke = /(?:\/\/|#|;{1,2}|%{1,2}|--)(\s*)$/, qe = [
555
+ // ../../node_modules/.pnpm/@shikijs+transformers@4.6.0/node_modules/@shikijs/transformers/dist/index.mjs
556
+ var We = /(\s+\/\/)/, Ge = /(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/, Ke = /(?:\/\/|#|;{1,2}|%{1,2}|--)(\s*)$/, qe = /^(?:\/\/|["'#]|;{1,2}|%{1,2}|--)$/, Je = [
557
557
  [/^(<!--)(.+)(-->)$/, !1],
558
558
  [/^(\/\*)(.+)(\*\/)$/, !1],
559
559
  [/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/, !0],
560
560
  [/^(\*)(.+)$/, !0]
561
561
  ];
562
- function Je(e, t, n) {
562
+ function Ye(e, t, n) {
563
563
  let r = [];
564
564
  for (let i of e) {
565
565
  if (n === "v3") {
@@ -595,7 +595,7 @@ function Je(e, t, n) {
595
595
  let t = e[n - 1];
596
596
  if (t?.type === "element") {
597
597
  let n = t.children.at(0);
598
- if (n?.type === "text" && n.value.includes("//")) {
598
+ if (n?.type === "text" && (n.value.includes("//") || qe.test(n.value.trim()))) {
599
599
  let l = B(n.value + o.value, s);
600
600
  if (l) {
601
601
  c = l, r.push({
@@ -613,7 +613,7 @@ function Je(e, t, n) {
613
613
  }
614
614
  if (c) {
615
615
  if (t && !s && n !== 0) {
616
- let t = Ye(e[n - 1], "{") && Ye(e[n + 1], "}");
616
+ let t = Xe(e[n - 1], "{") && Xe(e[n + 1], "}");
617
617
  r.push({
618
618
  info: c,
619
619
  line: i,
@@ -635,7 +635,7 @@ function Je(e, t, n) {
635
635
  }
636
636
  return r;
637
637
  }
638
- function Ye(e, t) {
638
+ function Xe(e, t) {
639
639
  if (e.type !== "element") return !1;
640
640
  let n = e.children[0];
641
641
  return n.type === "text" && n.value.trim() === t;
@@ -644,7 +644,7 @@ function B(e, t) {
644
644
  let n = e.trimStart(), r = e.length - n.length;
645
645
  n = n.trimEnd();
646
646
  let i = e.length - n.length - r;
647
- for (let [e, a] of qe) {
647
+ for (let [e, a] of Je) {
648
648
  if (a && !t) continue;
649
649
  let o = e.exec(n);
650
650
  if (o) return [
@@ -654,34 +654,35 @@ function B(e, t) {
654
654
  ];
655
655
  }
656
656
  }
657
- function Xe(e) {
657
+ function Ze(e) {
658
658
  let t = e.match(Ge);
659
659
  return t && t[1].trim().length === 0 ? e.slice(0, t.index) : e;
660
660
  }
661
- function Ze(e) {
661
+ function Qe(e) {
662
662
  let t = e.match(Ke);
663
663
  return t && t[1].trim().length === 0 ? e.slice(0, t.index).trimEnd() : e;
664
664
  }
665
- function Qe(e, t, n, r) {
665
+ var $e = /#?\s*\[!code\b(?:\\.|[^\]])*\]/gi;
666
+ function et(e, t, n, r) {
666
667
  return r ??= "v3", {
667
668
  name: e,
668
669
  code(e) {
669
670
  let i = e.children.filter((e) => e.type === "element"), a = [];
670
671
  e.data ??= {};
671
672
  let o = e.data;
672
- o._shiki_notation ??= Je(i, ["jsx", "tsx"].includes(this.options.lang), r);
673
+ o._shiki_notation ??= Ye(i, ["jsx", "tsx"].includes(this.options.lang), r);
673
674
  let s = o._shiki_notation;
674
675
  for (let e of s) {
675
676
  if (e.info[1].length === 0) continue;
676
- let o = i.indexOf(e.line);
677
- e.isLineCommentOnly && r !== "v1" && o++;
678
- let s = !1;
679
- 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;
680
- r === "v1" ? e.info[1] = Xe(e.info[1]) : r === "v3" && (e.info[1] = Ze(e.info[1]));
681
- let c = e.info[1].trim().length === 0;
682
- if (c && (e.info[1] = ""), c && e.isLineCommentOnly) a.push(e.line);
683
- else if (c && e.isJsxStyle) e.line.children.splice(e.line.children.indexOf(e.token) - 1, 3);
684
- else if (c) {
677
+ let o = i.indexOf(e.line), s = e.info[1].replace($e, "").replace(t, "").trim().length === 0;
678
+ e.isLineCommentOnly && s && r !== "v1" && o++;
679
+ let c = !1;
680
+ if (e.info[1] = e.info[1].replace(t, (...t) => n.call(this, t, e.line, e.token, i, o) ? (c = !0, "") : t[0]), !c) continue;
681
+ r === "v1" ? e.info[1] = Ze(e.info[1]) : r === "v3" && (e.info[1] = Qe(e.info[1]));
682
+ let l = e.info[1].trim().length === 0;
683
+ if (l && (e.info[1] = ""), l && e.isLineCommentOnly) a.push(e.line);
684
+ else if (l && e.isJsxStyle) e.line.children.splice(e.line.children.indexOf(e.token) - 1, 3);
685
+ else if (l) {
685
686
  if (e.additionalTokens) for (let t = e.additionalTokens.length - 1; t >= 0; t--) {
686
687
  let n = e.additionalTokens[t], r = e.line.children.indexOf(n);
687
688
  r !== -1 && e.line.children.splice(r, 1);
@@ -702,42 +703,42 @@ function Qe(e, t, n, r) {
702
703
  }
703
704
  };
704
705
  }
705
- var $e = /\{([\d,-]+)\}/;
706
- function et(e) {
706
+ var tt = /\{([\d,-]+)\}/;
707
+ function nt(e) {
707
708
  if (!e) return null;
708
- let t = e.match($e);
709
+ let t = e.match(tt);
709
710
  return t ? t[1].split(",").flatMap((e) => {
710
711
  let t = e.split("-").map((e) => Number.parseInt(e, 10));
711
712
  return t.length === 1 ? [t[0]] : Array.from({ length: t[1] - t[0] + 1 }, (e, n) => t[0] + n);
712
713
  }) : null;
713
714
  }
714
- var tt = Symbol("highlighted-lines");
715
- function nt(e = {}) {
715
+ var rt = Symbol("highlighted-lines");
716
+ function it(e = {}) {
716
717
  let { className: t = "highlighted", zeroIndexed: n = !1 } = e;
717
718
  return {
718
719
  name: "@shikijs/transformers:meta-highlight",
719
720
  line(e, r) {
720
721
  if (!this.options.meta?.__raw) return;
721
722
  let i = this.meta;
722
- i[tt] ??= et(this.options.meta.__raw);
723
- let a = i[tt] ?? [], o = n ? r - 1 : r;
723
+ i[rt] ??= nt(this.options.meta.__raw);
724
+ let a = i[rt] ?? [], o = n ? r - 1 : r;
724
725
  return a.includes(o) && this.addClassToHast(e, t), e;
725
726
  }
726
727
  };
727
728
  }
728
- var rt = /[.*+?^${}()|[\]\\]/g;
729
- function it(e) {
730
- return e.replace(rt, "\\$&");
729
+ var at = /[.*+?^${}()|[\]\\]/g;
730
+ function ot(e) {
731
+ return e.replace(at, "\\$&");
731
732
  }
732
733
  function V(e = {}, t = "@shikijs/transformers:notation-map") {
733
734
  let { classMap: n = {}, classActivePre: r = void 0, classActiveCode: i = void 0 } = e;
734
- return Qe(t, RegExp(`#?\\s*\\[!code (${Object.keys(n).map(it).join("|")})(:\\d+)?\\]`, "gi"), function([e, t, a = ":1"], o, s, c, l) {
735
+ return et(t, RegExp(`#?\\s*\\[!code (${Object.keys(n).map(ot).join("|")})(:\\d+)?\\]`, "gi"), function([e, t, a = ":1"], o, s, c, l) {
735
736
  let u = Number.parseInt(a.slice(1), 10);
736
737
  for (let e = l; e < Math.min(l + u, c.length); e++) this.addClassToHast(c[e], n[t]);
737
738
  return r && this.addClassToHast(this.pre, r), i && this.addClassToHast(this.code, i), !0;
738
739
  }, e.matchAlgorithm);
739
740
  }
740
- function at(e = {}) {
741
+ function st(e = {}) {
741
742
  let { classLineAdd: t = "diff add", classLineRemove: n = "diff remove", classActivePre: r = "has-diff", classActiveCode: i } = e;
742
743
  return V({
743
744
  classMap: {
@@ -749,7 +750,7 @@ function at(e = {}) {
749
750
  matchAlgorithm: e.matchAlgorithm
750
751
  }, "@shikijs/transformers:notation-diff");
751
752
  }
752
- function ot(e = {}) {
753
+ function ct(e = {}) {
753
754
  let { classMap: t = {
754
755
  error: ["highlighted", "error"],
755
756
  warning: ["highlighted", "warning"],
@@ -762,7 +763,7 @@ function ot(e = {}) {
762
763
  matchAlgorithm: e.matchAlgorithm
763
764
  }, "@shikijs/transformers:notation-error-level");
764
765
  }
765
- function st(e = {}) {
766
+ function lt(e = {}) {
766
767
  let { classActiveLine: t = "focused", classActivePre: n = "has-focused", classActiveCode: r } = e;
767
768
  return V({
768
769
  classMap: { focus: t },
@@ -771,7 +772,7 @@ function st(e = {}) {
771
772
  matchAlgorithm: e.matchAlgorithm
772
773
  }, "@shikijs/transformers:notation-focus");
773
774
  }
774
- function ct(e = {}) {
775
+ function ut(e = {}) {
775
776
  let { classActiveLine: t = "highlighted", classActivePre: n = "has-highlighted", classActiveCode: r } = e;
776
777
  return V({
777
778
  classMap: {
@@ -784,41 +785,41 @@ function ct(e = {}) {
784
785
  }, "@shikijs/transformers:notation-highlight");
785
786
  }
786
787
  // src/node/lib/render/highlight/language.ts
787
- var lt = [
788
+ var dt = [
788
789
  "shellscript",
789
790
  "shell",
790
791
  "bash",
791
792
  "sh",
792
793
  "zsh"
793
794
  ];
794
- function ut(e) {
795
- return lt.includes(e);
796
- }
797
- var dt = /^[a-zA-Z0-9-_]+/;
798
795
  function ft(e) {
799
- return dt.exec(e)?.[0] || "";
796
+ return dt.includes(e);
797
+ }
798
+ var pt = /^[a-zA-Z0-9-_]+/;
799
+ function mt(e) {
800
+ return pt.exec(e)?.[0] || "";
800
801
  }
801
802
  // src/node/lib/render/highlight/index.ts
802
- var pt = new FinalizationRegistry((e) => {
803
+ var ht = new FinalizationRegistry((e) => {
803
804
  e();
804
805
  }), H = {
805
806
  light: "github-light",
806
807
  dark: "github-dark"
807
808
  };
808
- async function mt() {
809
+ async function gt() {
809
810
  let e = await be({
810
811
  themes: [H.light, H.dark],
811
812
  langs: []
812
813
  }), t = [
813
- nt(),
814
- at(),
815
- st({
814
+ it(),
815
+ st(),
816
+ lt({
816
817
  classActiveLine: "has-focus",
817
818
  classActivePre: "has-focused-lines"
818
819
  }),
820
+ ut(),
819
821
  ct(),
820
- ot(),
821
- ht(),
822
+ _t(),
822
823
  {
823
824
  name: "typedown:add-dir",
824
825
  pre(e) {
@@ -827,7 +828,7 @@ async function mt() {
827
828
  }
828
829
  ], n = new Set(e.getLoadedLanguages());
829
830
  async function r(r, i, a, o) {
830
- let s = ft(i);
831
+ let s = mt(i);
831
832
  if (s) {
832
833
  let e = i;
833
834
  i = s.toLowerCase(), a = e.slice(i.length).replace(/(?<!=)\{/g, " {") + " " + a, a = a.trim().replace(/\s+/g, " ");
@@ -860,7 +861,7 @@ async function mt() {
860
861
  });
861
862
  }
862
863
  },
863
- ...o === void 0 ? [] : [gt(o)]
864
+ ...o === void 0 ? [] : [vt(o)]
864
865
  ],
865
866
  meta: { __raw: a },
866
867
  themes: H,
@@ -888,13 +889,13 @@ async function mt() {
888
889
  }
889
890
  });
890
891
  }
891
- return pt.register(r, () => e.dispose()), r;
892
+ return ht.register(r, () => e.dispose()), r;
892
893
  }
893
- function ht() {
894
+ function _t() {
894
895
  return {
895
896
  name: "typedown:disable-shell-symbol-select",
896
897
  tokens(e) {
897
- if (ut(this.options.lang)) for (let t of e) {
898
+ if (ft(this.options.lang)) for (let t of e) {
898
899
  if (t.length < 2) continue;
899
900
  let e = t[0].content.trim();
900
901
  (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));
@@ -902,7 +903,7 @@ function ht() {
902
903
  }
903
904
  };
904
905
  }
905
- function gt(e) {
906
+ function vt(e) {
906
907
  return {
907
908
  name: "typedown:line-numbers",
908
909
  code(t) {
@@ -934,23 +935,23 @@ function gt(e) {
934
935
  };
935
936
  }
936
937
  // src/node/lib/render/postprocess.ts
937
- var _t;
938
- async function vt(e) {
939
- return e = await xt(e), e = Dt(e), e;
938
+ var yt;
939
+ async function bt(e) {
940
+ return e = await Ct(e), e = kt(e), e;
940
941
  }
941
- function yt() {
942
- return _t ||= mt(), _t;
942
+ function xt() {
943
+ return yt ||= gt(), yt;
943
944
  }
944
- var bt = /<pre class="td-code-placeholder"([^>]*)><code>([\s\S]*?)<\/code><\/pre>/g;
945
+ var St = /<pre class="td-code-placeholder"([^>]*)><code>([\s\S]*?)<\/code><\/pre>/g;
945
946
  function U(e, t) {
946
947
  return e.match(RegExp(`${t}="([^"]*)"`))?.[1];
947
948
  }
948
- async function xt(e) {
949
- let t = await yt(), n = [...e.matchAll(bt)];
949
+ async function Ct(e) {
950
+ let t = await xt(), n = [...e.matchAll(St)];
950
951
  if (n.length === 0) return e;
951
952
  let r = await Promise.all(n.map(async (e) => {
952
953
  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 = g(e[2]);
953
- return wt(await t(s, r, i, o === void 0 ? void 0 : parseInt(o) || 1), r, {
954
+ return Et(await t(s, r, i, o === void 0 ? void 0 : parseInt(o) || 1), r, {
954
955
  title: a,
955
956
  lineNumbers: o
956
957
  });
@@ -961,7 +962,7 @@ async function xt(e) {
961
962
  }
962
963
  return i;
963
964
  }
964
- var St = {
965
+ var wt = {
965
966
  typescript: "TypeScript",
966
967
  javascript: "JavaScript",
967
968
  tsx: "TSX",
@@ -1009,24 +1010,24 @@ var St = {
1009
1010
  scala: "Scala",
1010
1011
  txt: "Text"
1011
1012
  };
1012
- function Ct(e) {
1013
- return St[e.toLowerCase()] ?? e;
1013
+ function Tt(e) {
1014
+ return wt[e.toLowerCase()] ?? e;
1014
1015
  }
1015
- function wt(e, t, n) {
1016
+ function Et(e, t, n) {
1016
1017
  t ||= "txt";
1017
- let r = Ct(t), i = ["td-code-block", "language-" + t];
1018
+ let r = Tt(t), i = ["td-code-block", "language-" + t];
1018
1019
  n.title && i.push("has-title"), n.lineNumbers !== void 0 && i.push("line-numbers-mode");
1019
1020
  let a = `<figure class="${i.join(" ")}">`;
1020
1021
  return a += "<figcaption class=\"td-code-header\">", a += "<span class=\"td-code-left\">", a += `<span class="td-code-lang">${h(r)}</span>`, n.title && (a += `<span class="td-code-label">${h(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;
1021
1022
  }
1022
- var Tt = /<span class="td-math-inline">([\s\S]*?)<\/span>/g, Et = /<div class="td-math-block">([\s\S]*?)<\/div>/g;
1023
- function Dt(e) {
1024
- return e = e.replace(Tt, (e, t) => At(t, !1)), e = e.replace(Et, (e, t) => At(t, !0)), e;
1025
- }
1026
- var Ot = /`([^`]+)`|\$([^$]+)\$/g;
1023
+ var Dt = /<span class="td-math-inline">([\s\S]*?)<\/span>/g, Ot = /<div class="td-math-block">([\s\S]*?)<\/div>/g;
1027
1024
  function kt(e) {
1025
+ return e = e.replace(Dt, (e, t) => Mt(t, !1)), e = e.replace(Ot, (e, t) => Mt(t, !0)), e;
1026
+ }
1027
+ var At = /`([^`]+)`|\$([^$]+)\$/g;
1028
+ function jt(e) {
1028
1029
  let t = 0, n = "";
1029
- for (let r of e.matchAll(Ot)) {
1030
+ for (let r of e.matchAll(At)) {
1030
1031
  if (n += h(e.slice(t, r.index)), r[1] !== void 0) n += `<code>${h(r[1])}</code>`;
1031
1032
  else if (r[2] !== void 0) try {
1032
1033
  n += k.renderToString(r[2], { throwOnError: !1 });
@@ -1037,7 +1038,7 @@ function kt(e) {
1037
1038
  }
1038
1039
  return n += h(e.slice(t)), n;
1039
1040
  }
1040
- function At(e, t) {
1041
+ function Mt(e, t) {
1041
1042
  let n = t ? "div" : "span";
1042
1043
  try {
1043
1044
  return k.renderToString(g(e), {
@@ -1057,17 +1058,17 @@ async function W(e, t, n) {
1057
1058
  label: t.label,
1058
1059
  icon: t.icon,
1059
1060
  frontmatter: t.header ?? {},
1060
- headings: Mt(t.headings),
1061
+ headings: Pt(t.headings),
1061
1062
  title: r,
1062
- titleHtml: kt(r),
1063
+ titleHtml: jt(r),
1063
1064
  filepath: n,
1064
1065
  fileMetadata: t.fileMetadata,
1065
1066
  seoMetadata: t.seoMetadata,
1066
1067
  excerpt: t.excerpt
1067
1068
  };
1068
1069
  }
1069
- async function jt(e, t, n) {
1070
- let r = await vt(t.content), i = await W(e, t, n), a = JSON.stringify(`@typedown/pages?resource=${encodeURIComponent(n)}`);
1070
+ async function Nt(e, t, n) {
1071
+ let r = await bt(t.content), i = await W(e, t, n), a = JSON.stringify(`@typedown/pages?resource=${encodeURIComponent(n)}`);
1071
1072
  return {
1072
1073
  vueSrc: [
1073
1074
  "<script>",
@@ -1079,12 +1080,12 @@ async function jt(e, t, n) {
1079
1080
  `import { pageData } from ${a}`,
1080
1081
  "useRouter().route.data = pageData",
1081
1082
  "<\/script>",
1082
- `<template><div class="typedown-content">\n${Nt(r)}\n</div></template>`
1083
+ `<template><div class="typedown-content">\n${Ft(r)}\n</div></template>`
1083
1084
  ].join("\n"),
1084
1085
  pageData: i
1085
1086
  };
1086
1087
  }
1087
- function Mt(e) {
1088
+ function Pt(e) {
1088
1089
  let t = [], n = [];
1089
1090
  for (let r of e) {
1090
1091
  let e = {
@@ -1100,13 +1101,13 @@ function Mt(e) {
1100
1101
  }
1101
1102
  return t;
1102
1103
  }
1103
- function Nt(e) {
1104
+ function Ft(e) {
1104
1105
  return e.replaceAll("{{", "&#123;&#123;").replaceAll("}}", "&#125;&#125;");
1105
1106
  }
1106
1107
  // src/node/plugin/vite/constants.ts
1107
- var Pt = "@typedown/app", Ft = "\0@typedown/app", G = "@typedown/pages", It = "\0" + G;
1108
+ var It = "@typedown/app", Lt = "\0@typedown/app", G = "@typedown/pages", Rt = "\0" + G;
1108
1109
  G + "";
1109
- var K = "\0@typedown/pages?resource=", q = "@typedown/site-data", Lt = "\0@typedown/site-data", J = "@typedown/search-index", Rt = "\0@typedown/search-index", Y = "@typedown/theme", zt = "\0@typedown/theme", X = "typedown:page-data";
1110
+ var K = "\0@typedown/pages?resource=", q = "@typedown/site-data", zt = "\0@typedown/site-data", J = "@typedown/search-index", Bt = "\0@typedown/search-index", Y = "@typedown/theme", Vt = "\0@typedown/theme", X = "typedown:page-data";
1110
1111
  // src/node/plugin/vite/virtual/utils.ts
1111
1112
  function Z(e, t) {
1112
1113
  let n = e.moduleGraph.getModuleById(t);
@@ -1124,7 +1125,7 @@ function Z(e, t) {
1124
1125
  }
1125
1126
  }
1126
1127
  // src/node/plugin/vite/virtual/app.ts
1127
- var Bt = class {
1128
+ var Ht = class {
1128
1129
  mountPath;
1129
1130
  constructor(e = "") {
1130
1131
  this.mountPath = e;
@@ -1153,9 +1154,9 @@ var Bt = class {
1153
1154
  });
1154
1155
  }
1155
1156
  invalidate(e) {
1156
- Z(e, Ft);
1157
+ Z(e, Lt);
1157
1158
  }
1158
- }, Vt = class {
1159
+ }, Ut = class {
1159
1160
  mountPath;
1160
1161
  constructor(e = "") {
1161
1162
  this.mountPath = e;
@@ -1198,21 +1199,21 @@ var Bt = class {
1198
1199
  });
1199
1200
  }
1200
1201
  invalidate(e) {
1201
- Z(e, It);
1202
+ Z(e, Rt);
1202
1203
  }
1203
- }, Ht = class {
1204
+ }, Wt = class {
1204
1205
  async load(e) {
1205
1206
  return Fe((await (await e.getTdContext()).getConfig()).layout ?? void 0, e.root);
1206
1207
  }
1207
1208
  invalidate(e) {
1208
- Z(e, zt);
1209
+ Z(e, Vt);
1209
1210
  }
1210
- }, Ut = "\0@typedown/site-data", Wt = {
1211
+ }, Gt = "\0@typedown/site-data", Kt = {
1211
1212
  ready: !1,
1212
1213
  contentTree: { entries: [] },
1213
1214
  schemas: {},
1214
1215
  directoryListings: {}
1215
- }, Gt = class {
1216
+ }, qt = class {
1216
1217
  data;
1217
1218
  scan(e) {
1218
1219
  let t = me("**/*.td", {
@@ -1233,27 +1234,27 @@ var Bt = class {
1233
1234
  let t = this.data ? {
1234
1235
  ready: !0,
1235
1236
  ...this.data
1236
- } : Wt;
1237
+ } : Kt;
1237
1238
  return `export default ${JSON.stringify(t)}`;
1238
1239
  }
1239
1240
  clear() {
1240
1241
  this.data = void 0;
1241
1242
  }
1242
1243
  fetch = x((e, t) => {
1243
- Kt(e).then((e) => {
1244
+ Jt(e).then((e) => {
1244
1245
  this.data = e, t && this.invalidate(t);
1245
1246
  }).catch((e) => {
1246
1247
  console.error("[typedown] Failed to fetch site data:", e instanceof Error ? e.message : e);
1247
1248
  });
1248
1249
  }, 200);
1249
1250
  async fetchSync(e) {
1250
- this.data = await Kt(e);
1251
+ this.data = await Jt(e);
1251
1252
  }
1252
1253
  invalidate(e) {
1253
- Z(e, Ut);
1254
+ Z(e, Gt);
1254
1255
  }
1255
1256
  };
1256
- async function Kt(e) {
1257
+ async function Jt(e) {
1257
1258
  let [t, n, r] = await Promise.all([
1258
1259
  e.getConfig(),
1259
1260
  e.listSidebar(),
@@ -1269,7 +1270,7 @@ async function Kt(e) {
1269
1270
  };
1270
1271
  }
1271
1272
  // src/node/lib/search-indexer/index.ts
1272
- var qt = class {
1273
+ var Yt = class {
1273
1274
  index;
1274
1275
  constructor() {
1275
1276
  this.index = new ie({
@@ -1292,19 +1293,19 @@ var qt = class {
1292
1293
  }
1293
1294
  };
1294
1295
  // src/node/lib/search-indexer/scan.ts
1295
- function Jt(e, t) {
1296
- let n = Qt(e), r = [];
1296
+ function Xt(e, t) {
1297
+ let n = en(e), r = [];
1297
1298
  for (let t of n) {
1298
- let n = Zt(e, t);
1299
+ let n = $t(e, t);
1299
1300
  n && r.push(n);
1300
1301
  }
1301
1302
  t.addAll(r);
1302
1303
  }
1303
- function Yt(e, n, r) {
1304
- let i = Zt(e, M(e, n));
1304
+ function Zt(e, n, r) {
1305
+ let i = $t(e, M(e, n));
1305
1306
  i ? r.addPage(i) : r.discardPage(t(n));
1306
1307
  }
1307
- function Xt(e, t) {
1308
+ function Qt(e, t) {
1308
1309
  let n = T(e);
1309
1310
  if (!t.startsWith("---")) return {
1310
1311
  title: n,
@@ -1321,7 +1322,7 @@ function Xt(e, t) {
1321
1322
  body: a
1322
1323
  };
1323
1324
  }
1324
- function Zt(e, n) {
1325
+ function $t(e, n) {
1325
1326
  let r;
1326
1327
  try {
1327
1328
  r = he(n, "utf-8");
@@ -1329,46 +1330,46 @@ function Zt(e, n) {
1329
1330
  return;
1330
1331
  }
1331
1332
  if (!r.trim()) return;
1332
- let i = n.slice(e.length + 1), { title: a, body: o } = Xt(i, r);
1333
+ let i = n.slice(e.length + 1), { title: a, body: o } = Qt(i, r);
1333
1334
  return {
1334
1335
  id: t(i),
1335
1336
  title: a,
1336
1337
  text: `${a}\n${o}`
1337
1338
  };
1338
1339
  }
1339
- function Qt(e) {
1340
+ function en(e) {
1340
1341
  return me("**/*.td", {
1341
1342
  cwd: e,
1342
1343
  exclude: (e) => e.startsWith("_")
1343
1344
  }).map((t) => M(e, t));
1344
1345
  }
1345
1346
  // src/node/plugin/vite/virtual/search-index.ts
1346
- var $t = "\0@typedown/search-index", en = class {
1347
- indexer = new qt();
1347
+ var tn = "\0@typedown/search-index", nn = class {
1348
+ indexer = new Yt();
1348
1349
  load(e) {
1349
1350
  return `export default ${JSON.stringify(this.indexer.serialize())}`;
1350
1351
  }
1351
1352
  index(e) {
1352
- Jt(e, this.indexer);
1353
+ Xt(e, this.indexer);
1353
1354
  }
1354
1355
  reindex(e, t) {
1355
- Yt(e, t, this.indexer);
1356
+ Zt(e, t, this.indexer);
1356
1357
  }
1357
1358
  invalidate(e) {
1358
- Z(e, $t);
1359
+ Z(e, tn);
1359
1360
  }
1360
- }, tn = _e(import.meta.url);
1361
- function nn() {
1361
+ }, rn = _e(import.meta.url);
1362
+ function an() {
1362
1363
  return [{
1363
1364
  find: "vue/server-renderer",
1364
- replacement: tn.resolve("vue/server-renderer")
1365
+ replacement: rn.resolve("vue/server-renderer")
1365
1366
  }, {
1366
1367
  find: "vue",
1367
- replacement: tn.resolve("vue/dist/vue.runtime.esm-bundler.js")
1368
+ replacement: rn.resolve("vue/dist/vue.runtime.esm-bundler.js")
1368
1369
  }];
1369
1370
  }
1370
1371
  // src/node/plugin/vite/middleware/vault-assets.ts
1371
- var rn = {
1372
+ var on = {
1372
1373
  jpg: "image/jpeg",
1373
1374
  jpeg: "image/jpeg",
1374
1375
  png: "image/png",
@@ -1386,7 +1387,7 @@ var rn = {
1386
1387
  woff: "font/woff",
1387
1388
  ttf: "font/ttf"
1388
1389
  };
1389
- function an(e, t) {
1390
+ function sn(e, t) {
1390
1391
  return (n, i, o) => {
1391
1392
  if (!n.url || n.method !== "GET" || i.writableEnded) return o();
1392
1393
  let c = a(n.url);
@@ -1395,7 +1396,7 @@ function an(e, t) {
1395
1396
  if (pe(d)) try {
1396
1397
  let e = ge(d);
1397
1398
  if (e.isFile()) {
1398
- let t = rn[s(d).slice(1).toLowerCase()] ?? "application/octet-stream";
1399
+ let t = on[s(d).slice(1).toLowerCase()] ?? "application/octet-stream";
1399
1400
  i.setHeader("Content-Type", t), i.setHeader("Content-Length", e.size), fe(d).pipe(i);
1400
1401
  return;
1401
1402
  }
@@ -1404,7 +1405,7 @@ function an(e, t) {
1404
1405
  };
1405
1406
  }
1406
1407
  // src/node/plugin/vite/middleware/virtual-html.ts
1407
- function on(e, t, n) {
1408
+ function cn(e, t, n) {
1408
1409
  return (i, o, s) => {
1409
1410
  if (!i.url) return s();
1410
1411
  let c = r(a(i.url)), l = r(n.basePath);
@@ -1412,22 +1413,22 @@ function on(e, t, n) {
1412
1413
  let u = c.slice(l.length);
1413
1414
  if (u.startsWith("/@") || u.startsWith("/node_modules") || c.includes(".") && !c.endsWith("/index.html")) return s();
1414
1415
  t.getConfig().then(async (t) => {
1415
- let r = await e.transformIndexHtml(i.url ?? "", sn(n, t));
1416
+ let r = await e.transformIndexHtml(i.url ?? "", ln(n, t));
1416
1417
  o.setHeader("Content-Type", "text/html"), o.end(r);
1417
1418
  }).catch(() => s());
1418
1419
  };
1419
1420
  }
1420
- function sn(e, t) {
1421
+ function ln(e, t) {
1421
1422
  return e.devHtml === void 0 && (e.devHtml = D({
1422
1423
  title: t.siteTitle,
1423
1424
  description: t.siteDescription,
1424
1425
  base: "/",
1425
1426
  ogType: "website",
1426
- entryScript: Pt
1427
+ entryScript: It
1427
1428
  })), e.devHtml;
1428
1429
  }
1429
1430
  // src/node/lib/prop-schema.ts
1430
- function cn(e, t, n) {
1431
+ function un(e, t, n) {
1431
1432
  let r = {};
1432
1433
  for (let i of e) {
1433
1434
  let e = `./${j.relative(t, i.absolutePath)}`;
@@ -1453,7 +1454,7 @@ function cn(e, t, n) {
1453
1454
  }
1454
1455
  return r;
1455
1456
  }
1456
- function ln(e) {
1457
+ function dn(e) {
1457
1458
  if (!e || e.length !== 1) return;
1458
1459
  let t = Q(e[0]);
1459
1460
  return t === void 0 ? void 0 : {
@@ -1461,17 +1462,17 @@ function ln(e) {
1461
1462
  items: t
1462
1463
  };
1463
1464
  }
1464
- function un(e, t) {
1465
- if (t && 0 < Object.keys(t).length) return fn(t);
1465
+ function fn(e, t) {
1466
+ if (t && 0 < Object.keys(t).length) return mn(t);
1466
1467
  let n = /^(?:Record<string,\s*(\w+)>|\{\s*\[key:\s*string\]:\s*(\w+);\s*\})$/.exec(e);
1467
1468
  if (!n) return;
1468
- let r = dn(n[1] ?? n[2]);
1469
+ let r = pn(n[1] ?? n[2]);
1469
1470
  return r === void 0 ? void 0 : {
1470
1471
  type: "object",
1471
1472
  additionalProperties: r
1472
1473
  };
1473
1474
  }
1474
- function dn(e) {
1475
+ function pn(e) {
1475
1476
  switch (e) {
1476
1477
  case "string": return { type: "string" };
1477
1478
  case "number": return { type: "number" };
@@ -1485,7 +1486,7 @@ function dn(e) {
1485
1486
  let t = e.replace(/^["']|["']$/g, "");
1486
1487
  i.push({ const: t });
1487
1488
  } else {
1488
- let t = dn(e);
1489
+ let t = pn(e);
1489
1490
  if (t === void 0) return;
1490
1491
  i.push(t);
1491
1492
  }
@@ -1495,7 +1496,7 @@ function dn(e) {
1495
1496
  return;
1496
1497
  }
1497
1498
  }
1498
- function fn(e) {
1499
+ function mn(e) {
1499
1500
  let t = {}, n = [];
1500
1501
  for (let [r, i] of Object.entries(e)) {
1501
1502
  let e = Q(i.schema);
@@ -1510,16 +1511,16 @@ function fn(e) {
1510
1511
  return 0 < n.length && (r.required = n), r;
1511
1512
  }
1512
1513
  function Q(e) {
1513
- if (typeof e == "string") return dn(e);
1514
+ if (typeof e == "string") return pn(e);
1514
1515
  switch (e.kind) {
1515
- case "enum": return pn(e.schema);
1516
- case "array": return ln(e.schema);
1517
- case "object": return un(e.type, e.schema);
1516
+ case "enum": return hn(e.schema);
1517
+ case "array": return dn(e.schema);
1518
+ case "object": return fn(e.type, e.schema);
1518
1519
  case "literal": return "value" in e ? { const: e.value } : void 0;
1519
1520
  default: return;
1520
1521
  }
1521
1522
  }
1522
- function pn(e) {
1523
+ function hn(e) {
1523
1524
  let t = e ?? [], n = t.some((e) => e === "undefined" || e === "null"), r = t.filter((e) => e !== "undefined" && e !== "null");
1524
1525
  if (r.length === 0) return;
1525
1526
  if (r.length === 1) {
@@ -1546,41 +1547,41 @@ function pn(e) {
1546
1547
  return n ? o(a) : a;
1547
1548
  }
1548
1549
  // src/node/plugin/vite/subplugins/component-contract.ts
1549
- var mn = ".typedown/components.json";
1550
- function hn(e) {
1550
+ var gn = ".typedown/components.json";
1551
+ function _n(e) {
1551
1552
  return {
1552
1553
  name: "vite-plugin-typedown-component-contract",
1553
1554
  async buildStart() {
1554
1555
  let t = e();
1555
1556
  if (!t) return;
1556
1557
  let n = await R((await (await t.getTdContext()).getConfig()).components, t.root);
1557
- bn(t.root, n);
1558
+ Sn(t.root, n);
1558
1559
  },
1559
1560
  configureServer(t) {
1560
1561
  let n = e();
1561
1562
  n && n.getTdContext().then(async (e) => {
1562
1563
  let r = await e.getConfig(), i = await R(r.components, n.root);
1563
- bn(n.root, i), gn(t, r.components, n.root);
1564
+ Sn(n.root, i), vn(t, r.components, n.root);
1564
1565
  }).catch(() => {});
1565
1566
  }
1566
1567
  };
1567
1568
  }
1568
- function gn(e, t, n) {
1569
+ function vn(e, t, n) {
1569
1570
  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))));
1570
1571
  for (let t of i) e.watcher.add(t);
1571
1572
  let a = (a) => {
1572
- _n(a, r, i) && (e.config.logger.info("[typedown] component changed, rebuilding contract..."), R(t, n).then((e) => bn(n, e)).catch(() => {}));
1573
+ yn(a, r, i) && (e.config.logger.info("[typedown] component changed, rebuilding contract..."), R(t, n).then((e) => Sn(n, e)).catch(() => {}));
1573
1574
  };
1574
1575
  e.watcher.on("change", a), e.watcher.on("add", a), e.watcher.on("unlink", a);
1575
1576
  }
1576
- function _n(e, t, n) {
1577
+ function yn(e, t, n) {
1577
1578
  if (!e.endsWith(".vue")) return !1;
1578
1579
  let r = P(e);
1579
1580
  if (t.has(r)) return !0;
1580
1581
  for (let e of n) if (r.startsWith(e + "/")) return !0;
1581
1582
  return !1;
1582
1583
  }
1583
- function vn() {
1584
+ function bn() {
1584
1585
  try {
1585
1586
  let e = j.dirname(le(import.meta.url)), t = j.resolve(e, "builtin-components.json"), n = JSON.parse(I.readFileSync(t, "utf-8"));
1586
1587
  for (let e of Object.values(n)) if (typeof e == "object" && e && "source" in e) {
@@ -1592,18 +1593,18 @@ function vn() {
1592
1593
  return {};
1593
1594
  }
1594
1595
  }
1595
- var yn = vn();
1596
- function bn(e, t) {
1597
- if (!(0 < Object.keys(yn).length) && t.length === 0) return;
1598
- let n = 0 < t.length ? cn(t, e, Ie(e)) : {}, r = {
1599
- ...yn,
1596
+ var xn = bn();
1597
+ function Sn(e, t) {
1598
+ if (!(0 < Object.keys(xn).length) && t.length === 0) return;
1599
+ let n = 0 < t.length ? un(t, e, Ie(e)) : {}, r = {
1600
+ ...xn,
1600
1601
  ...n
1601
- }, i = j.join(e, mn);
1602
+ }, i = j.join(e, gn);
1602
1603
  I.mkdirSync(j.dirname(i), { recursive: !0 }), I.writeFileSync(i, JSON.stringify(r, null, 2));
1603
1604
  }
1604
1605
  // src/node/plugin/vite/index.ts
1605
1606
  function $(t = {}) {
1606
- let n = t.context, r, i, a, o = new Bt(t.root ?? ""), s = new Ht(), c = new Vt(t.root ?? ""), l = new Gt(), f = new en(), p = {
1607
+ let n = t.context, r, i, a, o = new Ht(t.root ?? ""), s = new Wt(), c = new Ut(t.root ?? ""), l = new qt(), f = new nn(), p = {
1607
1608
  devHtml: void 0,
1608
1609
  basePath: "/",
1609
1610
  rootDirectory: "vault"
@@ -1629,7 +1630,7 @@ function $(t = {}) {
1629
1630
  port: e.server?.port ?? 8686,
1630
1631
  strictPort: e.server?.strictPort ?? !1
1631
1632
  },
1632
- resolve: { alias: nn() },
1633
+ resolve: { alias: an() },
1633
1634
  ssr: { noExternal: ["typerighter"] }
1634
1635
  };
1635
1636
  },
@@ -1641,18 +1642,18 @@ function $(t = {}) {
1641
1642
  let e = await m(), t = await e.getConfig(), n = M(t.rootDir);
1642
1643
  f.index(n), await l.fetchSync(e);
1643
1644
  let i = await e.checkVault();
1644
- if (Tn(i.diagnostics), 0 < i.errorCount) {
1645
+ if (Dn(i.diagnostics), 0 < i.errorCount) {
1645
1646
  let e = i.diagnostics.filter((e) => e.severity === "error").map((e) => ` ${e.filepath}:${e.line}:${e.column} - ${e.message} (${e.code})`);
1646
1647
  this.error(`Vault check failed with ${i.errorCount} error(s):\n${e.join("\n")}`);
1647
1648
  }
1648
1649
  },
1649
1650
  resolveId(e) {
1650
- if (e === "/@typedown/app" || e === "@typedown/app") return Ft;
1651
- if (e === "@typedown/pages") return It;
1651
+ if (e === "/@typedown/app" || e === "@typedown/app") return Lt;
1652
+ if (e === "@typedown/pages") return Rt;
1652
1653
  if (e.startsWith("@typedown/pages?resource=")) return c.resolvePageData(e);
1653
- if (e === "@typedown/site-data") return Lt;
1654
- if (e === "@typedown/search-index") return Rt;
1655
- if (e === "@typedown/theme") return zt;
1654
+ if (e === "@typedown/site-data") return zt;
1655
+ if (e === "@typedown/search-index") return Bt;
1656
+ if (e === "@typedown/theme") return Vt;
1656
1657
  },
1657
1658
  async load(e) {
1658
1659
  if (c.isPageDataModule(e)) return c.loadPageData(e, await m());
@@ -1669,11 +1670,11 @@ function $(t = {}) {
1669
1670
  let t = await m(), n = await t.getConfig(), i = M(n.rootDir);
1670
1671
  f.index(i), l.scan(i), l.fetch(t, r), e.httpServer?.once("listening", async () => {
1671
1672
  let e = await t.checkVault();
1672
- 0 < e.diagnostics.length && (console.error(""), Tn(e.diagnostics));
1673
+ 0 < e.diagnostics.length && (console.error(""), Dn(e.diagnostics));
1673
1674
  }), t.rpc.onConfigChanged(() => {
1674
- r && (p.devHtml = void 0, l.clear(), o.invalidate(r), s.invalidate(r), c.invalidate(r), Sn(r), l.fetch(t, r));
1675
+ r && (p.devHtml = void 0, l.clear(), o.invalidate(r), s.invalidate(r), c.invalidate(r), wn(r), l.fetch(t, r));
1675
1676
  }), t.rpc.onComponentContractChanged(() => {
1676
- r && (o.invalidate(r), Sn(r));
1677
+ r && (o.invalidate(r), wn(r));
1677
1678
  });
1678
1679
  function a(...e) {
1679
1680
  r && t.getConfig().then((t) => {
@@ -1682,7 +1683,7 @@ function $(t = {}) {
1682
1683
  for (let i of e) {
1683
1684
  let e = P(M(r.config.root, t.rootDir, i)), a = r.moduleGraph.getModulesByFile(e);
1684
1685
  if (a?.size) {
1685
- for (let e of a) r.moduleGraph.invalidateModule(e), n.push(wn(e));
1686
+ for (let e of a) r.moduleGraph.invalidateModule(e), n.push(En(e));
1686
1687
  c.invalidatePageData(r, i);
1687
1688
  }
1688
1689
  }
@@ -1698,13 +1699,13 @@ function $(t = {}) {
1698
1699
  r && (f.reindex(i, e), f.invalidate(r), c.invalidate(r), l.fetch(t, r), a(e));
1699
1700
  });
1700
1701
  function u() {
1701
- r && (l.clear(), Cn(r), l.fetch(t, r));
1702
+ r && (l.clear(), Tn(r), l.fetch(t, r));
1702
1703
  }
1703
1704
  t.rpc.onSchemaUpdated(u), t.rpc.onSchemaDeleted(u);
1704
1705
  let d = await t.getConfig();
1705
1706
  p.basePath = d.basePath, p.rootDirectory = d.rootDir, t.rpc.onConfigChanged((e) => {
1706
1707
  p.basePath = e.basePath, p.rootDirectory = e.rootDir, p.devHtml = void 0;
1707
- }), e.middlewares.use(an(e, p)), e.middlewares.use(on(e, t, p));
1708
+ }), e.middlewares.use(sn(e, p)), e.middlewares.use(cn(e, t, p));
1708
1709
  },
1709
1710
  async transform(t, n) {
1710
1711
  let r = n.split("?")[0];
@@ -1715,7 +1716,7 @@ function $(t = {}) {
1715
1716
  };
1716
1717
  let i = await m(), a = await i.getConfig(), o = d(r, a.rootDir);
1717
1718
  try {
1718
- let { vueSrc: e } = await jt(i, await i.getFile(o), o);
1719
+ let { vueSrc: e } = await Nt(i, await i.getFile(o), o);
1719
1720
  return {
1720
1721
  code: e,
1721
1722
  map: null
@@ -1746,26 +1747,26 @@ function $(t = {}) {
1746
1747
  });
1747
1748
  return [
1748
1749
  h,
1749
- hn(() => n),
1750
+ _n(() => n),
1750
1751
  g,
1751
1752
  ...ae()
1752
1753
  ];
1753
1754
  }
1754
- function xn(e) {
1755
+ function Cn(e) {
1755
1756
  return [...e.moduleGraph.idToModuleMap.entries()].filter(([e]) => e.endsWith(".td")).map(([, e]) => e);
1756
1757
  }
1757
- function Sn(e) {
1758
- for (let t of xn(e)) e.moduleGraph.invalidateModule(t);
1758
+ function wn(e) {
1759
+ for (let t of Cn(e)) e.moduleGraph.invalidateModule(t);
1759
1760
  e.hot.send({ type: "full-reload" });
1760
1761
  }
1761
- function Cn(e) {
1762
- let t = xn(e).map((t) => (e.moduleGraph.invalidateModule(t), wn(t)));
1762
+ function Tn(e) {
1763
+ let t = Cn(e).map((t) => (e.moduleGraph.invalidateModule(t), En(t)));
1763
1764
  0 < t.length && e.hot.send({
1764
1765
  type: "update",
1765
1766
  updates: t
1766
1767
  });
1767
1768
  }
1768
- function wn(e) {
1769
+ function En(e) {
1769
1770
  return {
1770
1771
  type: "js-update",
1771
1772
  path: e.url,
@@ -1773,7 +1774,7 @@ function wn(e) {
1773
1774
  timestamp: Date.now()
1774
1775
  };
1775
1776
  }
1776
- function Tn(e) {
1777
+ function Dn(e) {
1777
1778
  for (let t of e) {
1778
1779
  let e = `${t.filepath}:${t.line}:${t.column}`, n = t.severity === "error" ? N.red("error") : N.yellow("warn");
1779
1780
  console.error(` ${n} ${e} ${t.message} ${N.dim(`(${t.code})`)}`);
package/dist/vite.js CHANGED
@@ -1 +1 @@
1
- export { n as PAGES_ID, r as PAGE_DATA_EVENT, i as SEARCH_INDEX_ID, a as SITE_DATA_ID, o as THEME_ID, t as typedown } from "./vite-BW7e5WmY.js";
1
+ export { n as PAGES_ID, r as PAGE_DATA_EVENT, i as SEARCH_INDEX_ID, a as SITE_DATA_ID, o as THEME_ID, t as typedown } from "./vite-D5VPvBjJ.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.57.5",
4
+ "version": "0.57.6",
5
5
  "description": "Typedown: A typed content framework.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -59,14 +59,14 @@
59
59
  "@fontsource-variable/inter": "^5.3.0",
60
60
  "@fontsource-variable/jetbrains-mono": "^5.3.0",
61
61
  "@lucide/vue": "^1.47.0",
62
- "@shikijs/transformers": "^4.4.3",
62
+ "@shikijs/transformers": "^4.6.0",
63
63
  "@tailwindcss/vite": "^4.3.3",
64
- "@typerighter/rpc-client": "0.57.5",
65
- "@typerighter/rpc-server": "0.57.5",
64
+ "@typerighter/rpc-client": "0.57.6",
65
+ "@typerighter/rpc-server": "0.57.6",
66
66
  "@vitejs/plugin-vue": "^6.0.10",
67
67
  "cac": "^7.1.0",
68
68
  "picocolors": "^1.1.1",
69
- "shiki": "^4.5.0",
69
+ "shiki": "^4.6.0",
70
70
  "striptags": "^3.2.0",
71
71
  "tailwindcss": "^4.3.3",
72
72
  "temml": "^0.13.5",
@@ -79,11 +79,11 @@
79
79
  },
80
80
  "devDependencies": {
81
81
  "@hdnax/nuclint": "^0.17.5",
82
- "@playwright/test": "^1.61.1",
82
+ "@playwright/test": "^1.65.0",
83
83
  "@types/node": "^26.4.1",
84
84
  "@unhead/vue": "^3.4.3",
85
85
  "minisearch": "^7.2.0",
86
- "playwright": "^1.61.1",
86
+ "playwright": "^1.65.0",
87
87
  "vitest": "^5.0.1"
88
88
  },
89
89
  "scripts": {
@@ -1,6 +0,0 @@
1
- export interface ImageDimensions {
2
- width: number;
3
- height: number;
4
- }
5
- export declare function getImageDimensions(buffer: Buffer): ImageDimensions | undefined;
6
- //# sourceMappingURL=image-dimensions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"image-dimensions.d.ts","sourceRoot":"","sources":["../../../src/node/lib/image-dimensions.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,GACb,eAAe,GAAG,SAAS,CAQ7B"}