typerighter 0.11.4 → 0.12.0

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,5 +1,5 @@
1
1
  import { A as e, I as t, L as n, M as r, d as i, f as a, s as o } from "./shared-xivlz-gA.js";
2
- import { a as s, n as c, t as l } from "./vite-ofOi3oqG.js";
2
+ import { a as s, n as c, t as l } from "./vite-sjqEapXH.js";
3
3
  import u from "node:fs";
4
4
  import d from "node:path";
5
5
  import f from "picocolors";
@@ -110,14 +110,14 @@ async function S(e, t = {}) {
110
110
  await h.mkdir(M, { recursive: !0 });
111
111
  let N = d.join(M, "client-entry.js"), P = d.join(M, "ssr-entry.js");
112
112
  await Promise.all([h.writeFile(N, l({
113
- contentDir: _.contentDir,
113
+ rootDir: _.rootDir,
114
114
  siteTitle: _.siteTitle,
115
115
  siteDescription: _.siteDescription,
116
116
  repo: _.repo,
117
117
  contentTree: k,
118
118
  schemas: O
119
119
  })), h.writeFile(P, C({
120
- contentDir: _.contentDir,
120
+ rootDir: _.rootDir,
121
121
  layoutImport: x,
122
122
  siteConfig: A,
123
123
  siteData: j
@@ -177,7 +177,7 @@ async function S(e, t = {}) {
177
177
  let D = T(S, s);
178
178
  await h.writeFile(d.join(o, "sitemap.xml"), D);
179
179
  let O = d.join(u, "assets"), A = d.join(o, "assets");
180
- await h.cp(O, A, { recursive: !0 }).catch(() => {}), await w(d.join(n, _.contentDir), o);
180
+ await h.cp(O, A, { recursive: !0 }).catch(() => {}), await w(d.join(n, _.rootDir), o);
181
181
  } finally {
182
182
  await Promise.all([
183
183
  h.rm(M, {
@@ -197,7 +197,7 @@ async function S(e, t = {}) {
197
197
  a.log(`\nBuild complete. Output: ${o}`);
198
198
  }
199
199
  function C(e) {
200
- let r = `/${e.contentDir}/${n}`, i = JSON.parse(e.siteConfig), o = JSON.parse(e.siteData), s = a((o.contentTree ?? {
200
+ let r = `/${e.rootDir}/${n}`, i = JSON.parse(e.siteConfig), o = JSON.parse(e.siteData), s = a((o.contentTree ?? {
201
201
  rootItems: [],
202
202
  children: []
203
203
  }).children ?? [], i.title ?? ""), c = JSON.stringify({
@@ -224,7 +224,7 @@ function findPage(base) {
224
224
  }
225
225
 
226
226
  function loadPageModule(pagePath) {
227
- const base = ('/${e.contentDir}/' + pagePath).replace(/\\/+/g, '/').replace(/\\/$/, '');
227
+ const base = ('/${e.rootDir}/' + pagePath).replace(/\\/+/g, '/').replace(/\\/$/, '');
228
228
  const page = findPage(base);
229
229
  if (page) return Promise.resolve(page);
230
230
 
@@ -652,7 +652,7 @@ function Y() {
652
652
  n.dispose();
653
653
  }
654
654
  }), e.command("init [root]", "Scaffold a new project").action(async (e) => {
655
- let { initialize: t } = await import("./init-maHdUPKV.js");
655
+ let { initialize: t } = await import("./init-Cr4wOumz.js");
656
656
  await t(Z(e));
657
657
  }), e.command("preview [root]", "Preview production build").option("--port <port>", "Port to listen on").action(async (e, t) => {
658
658
  let { preview: n } = await import("vite");
@@ -671,7 +671,7 @@ function Y() {
671
671
  for (let r of n) {
672
672
  let n = await e.formatFile(r);
673
673
  if (n.changed) {
674
- let e = d.resolve(t.contentDir, r);
674
+ let e = d.resolve(t.rootDir, r);
675
675
  u.writeFileSync(e, n.content), i++;
676
676
  }
677
677
  }
@@ -682,7 +682,7 @@ function Y() {
682
682
  } finally {
683
683
  n.dispose();
684
684
  }
685
- }), e.help(), e.version("0.11.4"), e.parse();
685
+ }), e.help(), e.version("0.12.0"), e.parse();
686
686
  }
687
687
  function X(e, t) {
688
688
  let n = t instanceof Error ? t.message : String(t);
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as e } from "./cli-BpVRzZoy.js";
1
+ import { t as e } from "./cli-Be6WWIHS.js";
2
2
  export { e as cli };
@@ -570,26 +570,26 @@ var Mt = {
570
570
  class: "td-widget-ref"
571
571
  }, W(G(n).name), 9, Lt))])) : (B(), N("span", Rt, W(e.value), 1));
572
572
  }
573
- }), [["__scopeId", "data-v-876b5225"]]), Bt = { class: "td-widget-list" }, Vt = { class: "td-widget-list" }, Ht = 5, Ut = /*#__PURE__*/ T(/* @__PURE__ */ I({
573
+ }), [["__scopeId", "data-v-876b5225"]]), Bt = { key: 0 }, Vt = { class: "td-widget-list" }, Ht = { key: 1 }, Ut = { class: "td-widget-list" }, Wt = 5, Gt = /*#__PURE__*/ T(/* @__PURE__ */ I({
574
574
  __name: "TdWidgetList",
575
575
  props: {
576
576
  definition: {},
577
577
  value: {}
578
578
  },
579
579
  setup(e) {
580
- let t = V(!1), n = Array.isArray(e.value) ? e.value : [], r = e.definition.items?.widget === "relation", i = r ? n.map((e) => Z(e)).filter((e) => e !== void 0) : [], a = r ? Math.max(0, i.length - Ht) : Math.max(0, n.length - Ht);
580
+ let t = V(!1), n = Array.isArray(e.value) ? e.value : [], r = e.definition.items?.widget === "relation", i = r ? n.map((e) => Z(e)).filter((e) => e !== void 0) : [], a = r ? Math.max(0, i.length - Wt) : Math.max(0, n.length - Wt);
581
581
  function o() {
582
582
  t.value = !t.value;
583
583
  }
584
584
  function s(e) {
585
- return t.value ? e : e.slice(0, Ht);
585
+ return t.value ? e : e.slice(0, Wt);
586
586
  }
587
- return (e, c) => r ? (B(), N(k, { key: 0 }, [P("ul", Bt, [(B(!0), N(k, null, H(s(G(i)), (e, t) => (B(), N("li", { key: t }, [F(zt, { value: { $ref: e } }, null, 8, ["value"])]))), 128))]), G(a) > 0 ? (B(), N("button", {
587
+ return (e, c) => r ? (B(), N("div", Bt, [P("ul", Vt, [(B(!0), N(k, null, H(s(G(i)), (e, t) => (B(), N("li", { key: t }, [F(zt, { value: { $ref: e } }, null, 8, ["value"])]))), 128))]), G(a) > 0 ? (B(), N("button", {
588
588
  key: 0,
589
589
  class: "td-widget-more",
590
590
  type: "button",
591
591
  onClick: o
592
- }, W(t.value ? "show less" : `+${G(a)} more`), 1)) : M("", !0)], 64)) : (B(), N(k, { key: 1 }, [P("ul", Vt, [(B(!0), N(k, null, H(s(G(n)), (e, t) => (B(), N("li", { key: t }, [G(Z)(e) ? (B(), j(zt, {
592
+ }, W(t.value ? "show less" : `+${G(a)} more`), 1)) : M("", !0)])) : (B(), N("div", Ht, [P("ul", Ut, [(B(!0), N(k, null, H(s(G(n)), (e, t) => (B(), N("li", { key: t }, [G(Z)(e) ? (B(), j(zt, {
593
593
  key: 0,
594
594
  value: e
595
595
  }, null, 8, ["value"])) : (B(), N(k, { key: 1 }, [me(W(e), 1)], 64))]))), 128))]), G(a) > 0 ? (B(), N("button", {
@@ -597,9 +597,9 @@ var Mt = {
597
597
  class: "td-widget-more",
598
598
  type: "button",
599
599
  onClick: o
600
- }, W(t.value ? "show less" : `+${G(a)} more`), 1)) : M("", !0)], 64));
600
+ }, W(t.value ? "show less" : `+${G(a)} more`), 1)) : M("", !0)]));
601
601
  }
602
- }), [["__scopeId", "data-v-8ee8e985"]]), Wt = [
602
+ }), [["__scopeId", "data-v-dbe9921b"]]), Kt = [
603
603
  {
604
604
  fg: "#a0522d",
605
605
  bg: "rgba(160, 82, 45, 0.1)"
@@ -633,32 +633,32 @@ var Mt = {
633
633
  bg: "rgba(239, 68, 68, 0.1)"
634
634
  }
635
635
  ];
636
- function Gt(e) {
637
- let t = Wt[Kt(String(e ?? "")) % Wt.length];
636
+ function qt(e) {
637
+ let t = Kt[Jt(String(e ?? "")) % Kt.length];
638
638
  return {
639
639
  color: t.fg,
640
640
  background: t.bg
641
641
  };
642
642
  }
643
- function Kt(e) {
643
+ function Jt(e) {
644
644
  let t = 0;
645
645
  for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n) | 0;
646
646
  return Math.abs(t);
647
647
  }
648
648
  //#endregion
649
649
  //#region src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetMultiSelect.vue?vue&type=script&setup=true&lang.ts
650
- var qt = 5, Jt = /*#__PURE__*/ T(/* @__PURE__ */ I({
650
+ var Yt = 5, Xt = /*#__PURE__*/ T(/* @__PURE__ */ I({
651
651
  __name: "TdWidgetMultiSelect",
652
652
  props: { value: {} },
653
653
  setup(e) {
654
- let t = V(!1), n = Array.isArray(e.value) ? e.value : [], r = () => t.value ? n : n.slice(0, qt), i = Math.max(0, n.length - qt);
654
+ let t = V(!1), n = Array.isArray(e.value) ? e.value : [], r = () => t.value ? n : n.slice(0, Yt), i = Math.max(0, n.length - Yt);
655
655
  function a() {
656
656
  t.value = !t.value;
657
657
  }
658
658
  return (e, n) => (B(), N(k, null, [(B(!0), N(k, null, H(r(), (e, t) => (B(), N("span", {
659
659
  key: t,
660
660
  class: "td-widget-pill",
661
- style: R(G(Gt)(e))
661
+ style: R(G(qt)(e))
662
662
  }, W(e), 5))), 128)), G(i) > 0 ? (B(), N("button", {
663
663
  key: 0,
664
664
  class: "td-widget-more",
@@ -666,16 +666,16 @@ var qt = 5, Jt = /*#__PURE__*/ T(/* @__PURE__ */ I({
666
666
  onClick: a
667
667
  }, W(t.value ? "show less" : `+${G(i)} more`), 1)) : M("", !0)], 64));
668
668
  }
669
- }), [["__scopeId", "data-v-33269637"]]), Yt = /*#__PURE__*/ T(/* @__PURE__ */ I({
669
+ }), [["__scopeId", "data-v-33269637"]]), Zt = /*#__PURE__*/ T(/* @__PURE__ */ I({
670
670
  __name: "TdWidgetSelect",
671
671
  props: { value: {} },
672
672
  setup(e) {
673
673
  return (t, n) => (B(), N("span", {
674
674
  class: "td-widget-pill",
675
- style: R(G(Gt)(e.value))
675
+ style: R(G(qt)(e.value))
676
676
  }, W(e.value), 5));
677
677
  }
678
- }), [["__scopeId", "data-v-7dea5e20"]]), Xt = ["href", "title"], Zt = ["src", "alt"], Qt = ["href"], $t = { class: "td-widget-file-name" }, en = /*#__PURE__*/ T(/* @__PURE__ */ I({
678
+ }), [["__scopeId", "data-v-7dea5e20"]]), Qt = ["href", "title"], $t = ["src", "alt"], en = ["href"], tn = { class: "td-widget-file-name" }, nn = /*#__PURE__*/ T(/* @__PURE__ */ I({
679
679
  __name: "TdWidgetText",
680
680
  props: {
681
681
  definition: {},
@@ -698,50 +698,50 @@ var qt = 5, Jt = /*#__PURE__*/ T(/* @__PURE__ */ I({
698
698
  alt: G(r) ? G(r).name : G(n),
699
699
  class: "td-widget-image-img",
700
700
  loading: "lazy"
701
- }, null, 8, Zt)], 8, Xt)) : o.value ? (B(), N("a", {
701
+ }, null, 8, $t)], 8, Qt)) : o.value ? (B(), N("a", {
702
702
  key: 1,
703
703
  href: G(a),
704
704
  target: "_blank",
705
705
  rel: "noopener noreferrer",
706
706
  class: "td-widget-file-link"
707
- }, [F(G(Ne), { class: "td-widget-file-icon" }), P("span", $t, W(G(n).split("/").pop() ?? G(n)), 1)], 8, Qt)) : (B(), N(k, { key: 2 }, [me(W(s(e.value)), 1)], 64));
707
+ }, [F(G(Ne), { class: "td-widget-file-icon" }), P("span", tn, W(G(n).split("/").pop() ?? G(n)), 1)], 8, en)) : (B(), N(k, { key: 2 }, [me(W(s(e.value)), 1)], 64));
708
708
  }
709
- }), [["__scopeId", "data-v-fd07e395"]]), tn = {
709
+ }), [["__scopeId", "data-v-fd07e395"]]), rn = {
710
710
  key: 0,
711
711
  class: "td-frontmatter-empty"
712
- }, nn = /*#__PURE__*/ T(/* @__PURE__ */ I({
712
+ }, an = /*#__PURE__*/ T(/* @__PURE__ */ I({
713
713
  __name: "TdFrontmatterValue",
714
714
  props: {
715
715
  definition: {},
716
716
  value: {}
717
717
  },
718
718
  setup(e) {
719
- return (t, n) => e.value === void 0 || e.value === null ? (B(), N("span", tn, "Empty")) : e.definition.widget === "checkbox" ? (B(), j(kt, {
719
+ return (t, n) => e.value === void 0 || e.value === null ? (B(), N("span", rn, "Empty")) : e.definition.widget === "checkbox" ? (B(), j(kt, {
720
720
  key: 1,
721
721
  value: e.value
722
- }, null, 8, ["value"])) : e.definition.widget === "select" ? (B(), j(Yt, {
722
+ }, null, 8, ["value"])) : e.definition.widget === "select" ? (B(), j(Zt, {
723
723
  key: 2,
724
724
  value: e.value
725
- }, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (B(), j(Jt, {
725
+ }, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (B(), j(Xt, {
726
726
  key: 3,
727
727
  value: e.value
728
728
  }, null, 8, ["value"])) : G(Z)(e.value) || e.definition.widget === "relation" ? (B(), j(zt, {
729
729
  key: 4,
730
730
  value: e.value
731
- }, null, 8, ["value"])) : Array.isArray(e.value) || e.definition.widget === "list" ? (B(), j(Ut, {
731
+ }, null, 8, ["value"])) : Array.isArray(e.value) || e.definition.widget === "list" ? (B(), j(Gt, {
732
732
  key: 5,
733
733
  definition: e.definition,
734
734
  value: e.value
735
- }, null, 8, ["definition", "value"])) : (B(), j(en, {
735
+ }, null, 8, ["definition", "value"])) : (B(), j(nn, {
736
736
  key: 6,
737
737
  definition: e.definition,
738
738
  value: e.value
739
739
  }, null, 8, ["definition", "value"]));
740
740
  }
741
- }), [["__scopeId", "data-v-44c1432c"]]), rn = {
741
+ }), [["__scopeId", "data-v-44c1432c"]]), on = {
742
742
  key: 0,
743
743
  class: "td-frontmatter"
744
- }, an = { class: "td-frontmatter-label" }, on = { class: "td-frontmatter-value" }, sn = /*#__PURE__*/ T(/* @__PURE__ */ I({
744
+ }, sn = { class: "td-frontmatter-label" }, cn = { class: "td-frontmatter-value" }, ln = /*#__PURE__*/ T(/* @__PURE__ */ I({
745
745
  __name: "TdFrontmatter",
746
746
  props: {
747
747
  schema: { default: () => void 0 },
@@ -762,16 +762,16 @@ var qt = 5, Jt = /*#__PURE__*/ T(/* @__PURE__ */ I({
762
762
  }
763
763
  return r;
764
764
  });
765
- return (t, n) => r.value.length > 0 ? (B(), N("div", rn, [(B(!0), N(k, null, H(r.value, ([t, n]) => (B(), N("div", {
765
+ return (t, n) => r.value.length > 0 ? (B(), N("div", on, [(B(!0), N(k, null, H(r.value, ([t, n]) => (B(), N("div", {
766
766
  key: t,
767
767
  class: "td-frontmatter-row"
768
- }, [P("span", an, W(G(i)(t)), 1), P("span", on, [F(nn, {
768
+ }, [P("span", sn, W(G(i)(t)), 1), P("span", cn, [F(an, {
769
769
  definition: n,
770
770
  value: e.frontmatter[t]
771
771
  }, null, 8, ["definition", "value"])])]))), 128))])) : M("", !0);
772
772
  }
773
773
  }), [["__scopeId", "data-v-3b6a0d40"]]), Q = V(!1);
774
- function cn() {
774
+ function un() {
775
775
  function e() {
776
776
  Q.value = !Q.value;
777
777
  }
@@ -786,10 +786,10 @@ function cn() {
786
786
  }
787
787
  //#endregion
788
788
  //#region src/client/theme-default/components/TdMenuButton.vue
789
- var ln = /* @__PURE__ */ I({
789
+ var dn = /* @__PURE__ */ I({
790
790
  __name: "TdMenuButton",
791
791
  setup(e) {
792
- let { isOpen: t, toggle: n } = cn();
792
+ let { isOpen: t, toggle: n } = un();
793
793
  return (e, r) => (B(), j(X, {
794
794
  class: "td-menu-button w-9 h-9 text-td-neutral-fg-muted group",
795
795
  label: G(t) ? "Close menu" : "Open menu",
@@ -815,8 +815,8 @@ var ln = /* @__PURE__ */ I({
815
815
  });
816
816
  //#endregion
817
817
  //#region src/client/theme-default/composables/usePreviousNext.ts
818
- function un() {
819
- let e = C(), t = O(), { withBase: n } = D(), r = A(() => fn(e.contentTree)), i = A(() => r.value.findIndex((e) => e.url === t.path));
818
+ function fn() {
819
+ let e = C(), t = O(), { withBase: n } = D(), r = A(() => mn(e.contentTree)), i = A(() => r.value.findIndex((e) => e.url === t.path));
820
820
  return {
821
821
  previous: A(() => {
822
822
  if (i.value < 1) return;
@@ -836,19 +836,19 @@ function un() {
836
836
  })
837
837
  };
838
838
  }
839
- function dn(e, t, n) {
839
+ function pn(e, t, n) {
840
840
  let r = e.items.find((e) => f(e.filepath) === a), o = u(n, e.name);
841
841
  r ? t.push($(r)) : t.push({
842
842
  url: s(o),
843
843
  title: i(e.name)
844
844
  });
845
845
  for (let n of e.items) f(n.filepath) !== "index" && t.push($(n));
846
- for (let n of e.children) dn(n, t, o);
846
+ for (let n of e.children) pn(n, t, o);
847
847
  }
848
- function fn(e) {
848
+ function mn(e) {
849
849
  let t = [];
850
850
  for (let n of e.rootItems) t.push($(n));
851
- for (let n of e.children) dn(n, t, "");
851
+ for (let n of e.children) pn(n, t, "");
852
852
  return t;
853
853
  }
854
854
  function $(e) {
@@ -859,46 +859,46 @@ function $(e) {
859
859
  }
860
860
  //#endregion
861
861
  //#region src/client/theme-default/components/TdPreviousNext.vue?vue&type=script&setup=true&lang.ts
862
- var pn = {
862
+ var hn = {
863
863
  key: 0,
864
864
  class: "td-previous-next",
865
865
  "aria-label": "Page navigation"
866
- }, mn = ["href"], hn = { class: "td-previous-next-content" }, gn = { class: "td-previous-next-title" }, _n = {
866
+ }, gn = ["href"], _n = { class: "td-previous-next-content" }, vn = { class: "td-previous-next-title" }, yn = {
867
867
  key: 1,
868
868
  class: "td-previous-next-spacer"
869
- }, vn = ["href"], yn = { class: "td-previous-next-content" }, bn = { class: "td-previous-next-title" }, xn = {
869
+ }, bn = ["href"], xn = { class: "td-previous-next-content" }, Sn = { class: "td-previous-next-title" }, Cn = {
870
870
  key: 3,
871
871
  class: "td-previous-next-spacer"
872
- }, Sn = /*#__PURE__*/ T(/* @__PURE__ */ I({
872
+ }, wn = /*#__PURE__*/ T(/* @__PURE__ */ I({
873
873
  __name: "TdPreviousNext",
874
874
  setup(e) {
875
- let { previous: t, next: n } = un();
876
- return (e, r) => G(t) || G(n) ? (B(), N("nav", pn, [G(t) ? (B(), N("a", {
875
+ let { previous: t, next: n } = fn();
876
+ return (e, r) => G(t) || G(n) ? (B(), N("nav", hn, [G(t) ? (B(), N("a", {
877
877
  key: 0,
878
878
  href: G(t).url,
879
879
  class: "td-previous-next-link is-previous"
880
880
  }, [F(G(je), {
881
881
  size: 16,
882
882
  class: "td-previous-next-icon"
883
- }), P("span", hn, [r[0] ||= P("span", { class: "td-previous-next-label" }, "Previous", -1), P("span", gn, W(G(t).title), 1)])], 8, mn)) : (B(), N("span", _n)), G(n) ? (B(), N("a", {
883
+ }), P("span", _n, [r[0] ||= P("span", { class: "td-previous-next-label" }, "Previous", -1), P("span", vn, W(G(t).title), 1)])], 8, gn)) : (B(), N("span", yn)), G(n) ? (B(), N("a", {
884
884
  key: 2,
885
885
  href: G(n).url,
886
886
  class: "td-previous-next-link is-next"
887
- }, [P("span", yn, [r[1] ||= P("span", { class: "td-previous-next-label" }, "Next", -1), P("span", bn, W(G(n).title), 1)]), F(G(Ae), {
887
+ }, [P("span", xn, [r[1] ||= P("span", { class: "td-previous-next-label" }, "Next", -1), P("span", Sn, W(G(n).title), 1)]), F(G(Ae), {
888
888
  size: 16,
889
889
  class: "td-previous-next-icon"
890
- })], 8, vn)) : (B(), N("span", xn))])) : M("", !0);
890
+ })], 8, bn)) : (B(), N("span", Cn))])) : M("", !0);
891
891
  }
892
- }), [["__scopeId", "data-v-4439d186"]]), Cn = { class: "td-search" }, wn = { class: "td-search-input-wrap" }, Tn = {
892
+ }), [["__scopeId", "data-v-4439d186"]]), Tn = { class: "td-search" }, En = { class: "td-search-input-wrap" }, Dn = {
893
893
  key: 1,
894
894
  class: "td-search-count"
895
- }, En = {
895
+ }, On = {
896
896
  key: 0,
897
897
  class: "td-search-results"
898
- }, Dn = { class: "td-search-group-label" }, On = ["href"], kn = ["innerHTML"], An = ["innerHTML"], jn = {
898
+ }, kn = { class: "td-search-group-label" }, An = ["href"], jn = ["innerHTML"], Mn = ["innerHTML"], Nn = {
899
899
  key: 1,
900
900
  class: "td-search-empty"
901
- }, Mn = 120, Nn = /*#__PURE__*/ T(/* @__PURE__ */ I({
901
+ }, Pn = 120, Fn = /*#__PURE__*/ T(/* @__PURE__ */ I({
902
902
  __name: "TdSearch",
903
903
  props: {
904
904
  active: {
@@ -961,13 +961,13 @@ var pn = {
961
961
  function ne(e, t) {
962
962
  if (!e) return "";
963
963
  let n = Object.keys(t);
964
- if (n.length === 0) return e.slice(0, Mn);
964
+ if (n.length === 0) return e.slice(0, Pn);
965
965
  let r = e.toLowerCase(), i = e.length;
966
966
  for (let e of n) {
967
967
  let t = r.indexOf(e.toLowerCase());
968
968
  t !== -1 && t < i && (i = t);
969
969
  }
970
- let a = Math.max(0, i - 30), o = Math.min(e.length, a + Mn), s = e.slice(a, o).trim();
970
+ let a = Math.max(0, i - 30), o = Math.min(e.length, a + Pn), s = e.slice(a, o).trim();
971
971
  return 0 < a && (s = "..." + s), o < e.length && (s += "..."), s;
972
972
  }
973
973
  async function T(e, t, n) {
@@ -1032,8 +1032,8 @@ var pn = {
1032
1032
  x || (u.value = !1);
1033
1033
  }
1034
1034
  }
1035
- return (e, t) => (B(), N("div", Cn, [
1036
- P("div", wn, [
1035
+ return (e, t) => (B(), N("div", Tn, [
1036
+ P("div", En, [
1037
1037
  F(G(ze), {
1038
1038
  size: 14,
1039
1039
  class: "td-search-icon"
@@ -1050,7 +1050,7 @@ var pn = {
1050
1050
  key: 0,
1051
1051
  size: 12,
1052
1052
  class: "td-search-spinner"
1053
- })) : f.value ? (B(), N("span", Tn, W(c.value.length), 1)) : M("", !0),
1053
+ })) : f.value ? (B(), N("span", Dn, W(c.value.length), 1)) : M("", !0),
1054
1054
  a.value ? (B(), N("button", {
1055
1055
  key: 2,
1056
1056
  class: "td-search-clear",
@@ -1059,10 +1059,10 @@ var pn = {
1059
1059
  onClick: C
1060
1060
  }, [F(G(Y), { size: 12 })])) : M("", !0)
1061
1061
  ]),
1062
- f.value && c.value.length > 0 ? (B(), N("div", En, [(B(!0), N(k, null, H(p.value, (e) => (B(), N("div", {
1062
+ f.value && c.value.length > 0 ? (B(), N("div", On, [(B(!0), N(k, null, H(p.value, (e) => (B(), N("div", {
1063
1063
  key: e.pageUrl,
1064
1064
  class: "td-search-group"
1065
- }, [P("div", Dn, W(e.pageTitle), 1), (B(!0), N(k, null, H(e.results, (e) => (B(), N("a", {
1065
+ }, [P("div", kn, W(e.pageTitle), 1), (B(!0), N(k, null, H(e.results, (e) => (B(), N("a", {
1066
1066
  key: e.id,
1067
1067
  href: e.id,
1068
1068
  class: L(["td-search-result", { "is-selected": D.value.get(e.id) === d.value }]),
@@ -1070,15 +1070,15 @@ var pn = {
1070
1070
  }, [P("span", {
1071
1071
  class: "td-search-result-title",
1072
1072
  innerHTML: O(e.title, a.value)
1073
- }, null, 8, kn), e.excerpt ? (B(), N("span", {
1073
+ }, null, 8, jn), e.excerpt ? (B(), N("span", {
1074
1074
  key: 0,
1075
1075
  class: "td-search-result-excerpt",
1076
1076
  innerHTML: O(e.excerpt, a.value)
1077
- }, null, 8, An)) : M("", !0)], 10, On))), 128))]))), 128))])) : M("", !0),
1078
- f.value && c.value.length === 0 ? (B(), N("div", jn, " No results for \"" + W(a.value) + "\" ", 1)) : M("", !0)
1077
+ }, null, 8, Mn)) : M("", !0)], 10, An))), 128))]))), 128))])) : M("", !0),
1078
+ f.value && c.value.length === 0 ? (B(), N("div", Nn, " No results for \"" + W(a.value) + "\" ", 1)) : M("", !0)
1079
1079
  ]));
1080
1080
  }
1081
- }), [["__scopeId", "data-v-dc5caa87"]]), Pn = /* @__PURE__ */ I({
1081
+ }), [["__scopeId", "data-v-dc5caa87"]]), In = /* @__PURE__ */ I({
1082
1082
  __name: "TdThemeToggle",
1083
1083
  setup(e) {
1084
1084
  let { isDark: t, toggle: n } = ce();
@@ -1102,7 +1102,7 @@ var pn = {
1102
1102
  });
1103
1103
  //#endregion
1104
1104
  //#region src/client/theme-default/composables/useCopyCode.ts
1105
- function Fn() {
1105
+ function Ln() {
1106
1106
  function e(e) {
1107
1107
  let t = e.target?.closest(".copy");
1108
1108
  if (!t) return;
@@ -1122,11 +1122,11 @@ function Fn() {
1122
1122
  }
1123
1123
  //#endregion
1124
1124
  //#region src/client/theme-default/composables/useResizableTable.ts
1125
- var In = 6, Ln = 40;
1126
- function Rn() {
1125
+ var Rn = 6, zn = 40;
1126
+ function Bn() {
1127
1127
  let e, t = !1;
1128
1128
  function n(e, t) {
1129
- return e.getBoundingClientRect().right - t < In;
1129
+ return e.getBoundingClientRect().right - t < Rn;
1130
1130
  }
1131
1131
  function r(r) {
1132
1132
  if (t) return;
@@ -1146,7 +1146,7 @@ function Rn() {
1146
1146
  r.classList.add("is-resizing"), document.body.style.cursor = "col-resize";
1147
1147
  function o(e) {
1148
1148
  let t = e.clientX - i;
1149
- r && (r.style.width = `${Math.max(Ln, a + t)}px`);
1149
+ r && (r.style.width = `${Math.max(zn, a + t)}px`);
1150
1150
  }
1151
1151
  function s() {
1152
1152
  t = !1, r?.classList.remove("is-resizing"), document.body.style.cursor = "", document.removeEventListener("pointermove", o), document.removeEventListener("pointerup", s);
@@ -1161,7 +1161,7 @@ function Rn() {
1161
1161
  }
1162
1162
  //#endregion
1163
1163
  //#region src/client/theme-default/composables/useActiveTocHeading.ts
1164
- function zn(e) {
1164
+ function Vn(e) {
1165
1165
  let t = V(""), n;
1166
1166
  function r() {
1167
1167
  if (typeof document > "u") return;
@@ -1193,15 +1193,15 @@ function zn(e) {
1193
1193
  }
1194
1194
  //#endregion
1195
1195
  //#region src/client/theme-default/components/TdToc.vue?vue&type=script&setup=true&lang.ts
1196
- var Bn = {
1196
+ var Hn = {
1197
1197
  key: 0,
1198
1198
  class: "td-toc"
1199
- }, Vn = { class: "td-toc-list" }, Hn = ["href"], Un = /*#__PURE__*/ T(/* @__PURE__ */ I({
1199
+ }, Un = { class: "td-toc-list" }, Wn = ["href"], Gn = /*#__PURE__*/ T(/* @__PURE__ */ I({
1200
1200
  __name: "TdToc",
1201
1201
  props: { headings: {} },
1202
1202
  setup(e) {
1203
- let t = zn(() => e.headings);
1204
- return (n, r) => e.headings.length ? (B(), N("div", Bn, [r[0] ||= P("div", { class: "td-toc-label" }, " On this page ", -1), P("ul", Vn, [(B(!0), N(k, null, H(e.headings, (e) => (B(), N("li", {
1203
+ let t = Vn(() => e.headings);
1204
+ return (n, r) => e.headings.length ? (B(), N("div", Hn, [r[0] ||= P("div", { class: "td-toc-label" }, " On this page ", -1), P("ul", Un, [(B(!0), N(k, null, H(e.headings, (e) => (B(), N("li", {
1205
1205
  key: e.slug,
1206
1206
  class: L({
1207
1207
  "td-toc-indent-1": e.level === 3,
@@ -1211,49 +1211,49 @@ var Bn = {
1211
1211
  }, [P("a", {
1212
1212
  href: e.link,
1213
1213
  class: L(["td-toc-link", { "is-active": G(t) === e.slug }])
1214
- }, W(e.title), 11, Hn)], 2))), 128))])])) : M("", !0);
1214
+ }, W(e.title), 11, Wn)], 2))), 128))])])) : M("", !0);
1215
1215
  }
1216
- }), [["__scopeId", "data-v-84e4402d"]]), Wn = { class: "td-header" }, Gn = { class: "td-header-left" }, Kn = ["href"], qn = { class: "td-brand-name" }, Jn = { class: "td-header-right" }, Yn = { class: "td-menu-header" }, Xn = { class: "td-header-left" }, Zn = ["href"], Qn = { class: "td-brand-name" }, $n = {
1216
+ }), [["__scopeId", "data-v-84e4402d"]]), Kn = { class: "td-header" }, qn = { class: "td-header-left" }, Jn = ["href"], Yn = { class: "td-brand-name" }, Xn = { class: "td-header-right" }, Zn = { class: "td-menu-header" }, Qn = { class: "td-header-left" }, $n = ["href"], er = { class: "td-brand-name" }, tr = {
1217
1217
  key: 0,
1218
1218
  class: "pt-4",
1219
1219
  "aria-label": "Site navigation"
1220
- }, er = { class: "td-page" }, tr = { class: "td-main-and-toc" }, nr = { class: "td-main" }, rr = { class: "td-content" }, ir = ["innerHTML"], ar = {
1220
+ }, nr = { class: "td-page" }, rr = { class: "td-main-and-toc" }, ir = { class: "td-main" }, ar = { class: "td-content" }, or = ["innerHTML"], sr = {
1221
1221
  key: 1,
1222
1222
  class: "td-page-meta"
1223
- }, or = { key: 0 }, sr = {
1223
+ }, cr = { key: 0 }, lr = {
1224
1224
  class: "td-sidebar-right",
1225
1225
  "aria-label": "Table of contents"
1226
- }, cr = 200, lr = 500, ur = 272, dr = "td-sidebar-width", fr = /*#__PURE__*/ T(/* @__PURE__ */ I({
1226
+ }, ur = 200, dr = 500, fr = 272, pr = "td-sidebar-width", mr = /*#__PURE__*/ T(/* @__PURE__ */ I({
1227
1227
  __name: "TdLayout",
1228
1228
  setup(e) {
1229
- let { title: t, page: n } = ae(), r = D(), { withBase: i } = r, a = C(), { isOpen: o, close: c } = cn(), l = V(""), u = V(!1), d = V(!1), f = O();
1230
- q(() => f.path, () => c()), Fn(), Ee(() => {
1229
+ let { title: t, page: n } = ae(), r = D(), { withBase: i } = r, a = C(), { isOpen: o, close: c } = un(), l = V(""), u = V(!1), d = V(!1), f = O();
1230
+ q(() => f.path, () => c()), Ln(), Ee(() => {
1231
1231
  if (typeof document > "u") return;
1232
1232
  let e = t.value, i = r.title;
1233
1233
  document.title = e && e !== i ? `${e} - ${i}` : i;
1234
1234
  let a = n.frontmatter?.description === void 0 ? r.description ?? "" : String(n.frontmatter.description), o = document.querySelector("meta[name=\"description\"]");
1235
1235
  o && o.setAttribute("content", a);
1236
- }), Rn();
1237
- let p = V(typeof localStorage < "u" && Number(localStorage.getItem(dr)) || ur);
1236
+ }), Bn();
1237
+ let p = V(typeof localStorage < "u" && Number(localStorage.getItem(pr)) || fr);
1238
1238
  function m(e) {
1239
1239
  let t = e.clientX, n = p.value, r = e.currentTarget;
1240
1240
  r.setPointerCapture(e.pointerId);
1241
1241
  function i(e) {
1242
- let r = Math.min(lr, Math.max(cr, n + e.clientX - t));
1242
+ let r = Math.min(dr, Math.max(ur, n + e.clientX - t));
1243
1243
  p.value = r;
1244
1244
  }
1245
1245
  function a() {
1246
- document.body.style.cursor = "", r.removeEventListener("pointermove", i), r.removeEventListener("pointerup", a), localStorage.setItem(dr, String(p.value));
1246
+ document.body.style.cursor = "", r.removeEventListener("pointermove", i), r.removeEventListener("pointerup", a), localStorage.setItem(pr, String(p.value));
1247
1247
  }
1248
1248
  document.body.style.cursor = "col-resize", r.addEventListener("pointermove", i), r.addEventListener("pointerup", a);
1249
1249
  }
1250
1250
  return (e, f) => (B(), N("div", null, [
1251
- P("header", Wn, [P("div", Gn, [F(ln), P("a", {
1251
+ P("header", Kn, [P("div", qn, [F(dn), P("a", {
1252
1252
  href: G(i)(G(s)("/")),
1253
1253
  class: "td-brand"
1254
- }, [F(qe), P("span", qn, W(G(r).title || "Typedown"), 1)], 8, Kn)]), P("div", Jn, [F(Pn)])]),
1254
+ }, [F(qe), P("span", Yn, W(G(r).title || "Typedown"), 1)], 8, Jn)]), P("div", Xn, [F(In)])]),
1255
1255
  P("div", { class: L(["td-menu-overlay", { "is-open": G(o) }]) }, [
1256
- P("header", Yn, [P("div", Xn, [F(X, {
1256
+ P("header", Zn, [P("div", Qn, [F(X, {
1257
1257
  class: "w-9 h-9 text-td-neutral-fg-muted hover:text-td-primary-solid",
1258
1258
  label: "Close menu",
1259
1259
  onClick: G(c)
@@ -1263,8 +1263,8 @@ var Bn = {
1263
1263
  }, 8, ["onClick"]), P("a", {
1264
1264
  href: G(i)(G(s)("/")),
1265
1265
  class: "td-brand"
1266
- }, [F(qe), P("span", Qn, W(G(r).title || "Typedown"), 1)], 8, Zn)])]),
1267
- F(Nn, {
1266
+ }, [F(qe), P("span", er, W(G(r).title || "Typedown"), 1)], 8, $n)])]),
1267
+ F(Fn, {
1268
1268
  query: l.value,
1269
1269
  "onUpdate:query": f[0] ||= (e) => l.value = e,
1270
1270
  active: d.value,
@@ -1275,14 +1275,14 @@ var Bn = {
1275
1275
  "active",
1276
1276
  "onSelect"
1277
1277
  ]),
1278
- d.value ? M("", !0) : (B(), N("nav", $n, [F(ht, { tree: G(a).contentTree }, null, 8, ["tree"])]))
1278
+ d.value ? M("", !0) : (B(), N("nav", tr, [F(ht, { tree: G(a).contentTree }, null, 8, ["tree"])]))
1279
1279
  ], 2),
1280
- P("div", er, [P("nav", {
1280
+ P("div", nr, [P("nav", {
1281
1281
  class: "td-sidebar-left",
1282
1282
  "aria-label": "Site navigation",
1283
1283
  style: R({ width: `${p.value}px` })
1284
1284
  }, [
1285
- F(Nn, {
1285
+ F(Fn, {
1286
1286
  query: l.value,
1287
1287
  "onUpdate:query": f[2] ||= (e) => l.value = e,
1288
1288
  active: u.value,
@@ -1296,40 +1296,40 @@ var Bn = {
1296
1296
  class: "td-sidebar-resize",
1297
1297
  onPointerdown: Oe(m, ["prevent"])
1298
1298
  }, null, 32)
1299
- ], 4), P("div", tr, [P("main", nr, [P("article", rr, [
1299
+ ], 4), P("div", rr, [P("main", ir, [P("article", ar, [
1300
1300
  F(Dt),
1301
1301
  G(t) ? (B(), N("h1", {
1302
1302
  key: 0,
1303
1303
  class: "td-page-title",
1304
1304
  innerHTML: G(Xe)(G(t))
1305
- }, null, 8, ir)) : M("", !0),
1306
- G(n).metadata ? (B(), N("div", ar, [P("span", null, W(G(_)(G(n).metadata.mtime, "Modified")), 1), G(n).metadata.ctime === G(n).metadata.mtime ? M("", !0) : (B(), N("span", or, " · " + W(G(_)(G(n).metadata.ctime, "Created")), 1))])) : M("", !0),
1307
- F(G(sn), {
1305
+ }, null, 8, or)) : M("", !0),
1306
+ G(n).metadata ? (B(), N("div", sr, [P("span", null, W(G(_)(G(n).metadata.mtime, "Modified")), 1), G(n).metadata.ctime === G(n).metadata.mtime ? M("", !0) : (B(), N("span", cr, " · " + W(G(_)(G(n).metadata.ctime, "Created")), 1))])) : M("", !0),
1307
+ F(G(ln), {
1308
1308
  schema: G(n).schema,
1309
1309
  frontmatter: G(n).frontmatter
1310
1310
  }, null, 8, ["schema", "frontmatter"]),
1311
1311
  F(G(w)),
1312
- F(Sn)
1313
- ])]), P("nav", sr, [F(Un, { headings: G(n).headings }, null, 8, ["headings"])])])])
1312
+ F(wn)
1313
+ ])]), P("nav", lr, [F(Gn, { headings: G(n).headings }, null, 8, ["headings"])])])])
1314
1314
  ]));
1315
1315
  }
1316
- }), [["__scopeId", "data-v-93a3d24b"]]), pr = { class: "pt-16 pb-24" }, mr = ["href"], hr = /* @__PURE__ */ I({
1316
+ }), [["__scopeId", "data-v-93a3d24b"]]), hr = { class: "pt-16 pb-24" }, gr = ["href"], _r = /* @__PURE__ */ I({
1317
1317
  __name: "TdNotFound",
1318
1318
  setup(e) {
1319
1319
  let { withBase: t } = D();
1320
- return (e, n) => (B(), N("div", pr, [
1320
+ return (e, n) => (B(), N("div", hr, [
1321
1321
  n[0] ||= P("p", { class: "text-td-display font-td-heading leading-none tracking-td-title text-td-fg-muted" }, " 404 ", -1),
1322
1322
  n[1] ||= P("h1", { class: "text-td-h2 font-td-heading leading-td-heading tracking-td-heading mt-4" }, " Page Not Found ", -1),
1323
1323
  n[2] ||= P("p", { class: "text-td-fg-muted mt-2 text-td-body leading-td-body" }, " The page you are looking for does not exist. ", -1),
1324
1324
  P("a", {
1325
1325
  class: "inline-flex items-center mt-6 text-td-primary-solid text-td-ui font-td-heading tracking-td-heading hover:text-td-primary-solid-hover",
1326
1326
  href: G(t)(G(s)("/"))
1327
- }, "Go Home", 8, mr)
1327
+ }, "Go Home", 8, gr)
1328
1328
  ]));
1329
1329
  }
1330
- }), gr = {
1331
- Layout: fr,
1332
- NotFound: hr
1330
+ }), vr = {
1331
+ Layout: mr,
1332
+ NotFound: _r
1333
1333
  };
1334
1334
  //#endregion
1335
- export { ne as TdDirectoryIndex, fr as TdLayout, hr as TdNotFound, gr as default, Fn as useCopyCode };
1335
+ export { ne as TdDirectoryIndex, mr as TdLayout, _r as TdNotFound, vr as default, Ln as useCopyCode };