typerighter 0.52.1 → 0.53.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,8 +1,8 @@
1
- import { A as e, C as t, E as n, F as r, I as i, L as a, N as o, O as s, _ as c, a as l, b as u, c as d, et as f, f as p, k as m, l as h, n as g, p as _, q as v, r as y, s as b, tt as x, v as S, w as C, y as w } from "../shared-C5ERr4vS.js";
2
- import { t as T } from "../es-ClqUVRJn.js";
3
- import { A as ee, C as te, D as ne, E, F as re, I as ie, L as D, M as ae, N as oe, O as se, P as ce, S as le, T as ue, _ as de, a as fe, b as pe, c as O, d as me, f as he, g as ge, h as _e, i as ve, j as ye, k as be, m as k, n as xe, o as Se, p as Ce, r as A, s as we, u as Te, v as Ee, w as De, x as Oe, y as ke } from "../app-n56VkC5b.js";
4
- import { a as Ae, i as je, n as Me, t as Ne } from "../brand-CG1fQshq.js";
5
- import { t as Pe } from "../inlineRe-Cn-J_E76.js";
1
+ import { A as e, C as t, E as n, F as r, I as i, L as a, N as o, O as s, _ as c, a as l, b as u, c as d, et as f, f as p, k as m, l as h, n as g, p as _, q as v, r as y, s as b, tt as x, v as S, w as C, y as w } from "../shared-v0btHVwj.js";
2
+ import { t as T } from "../es-B_QJMowB.js";
3
+ import { A as ee, C as te, D as ne, E, F as re, I as ie, L as D, M as ae, N as oe, O as se, P as ce, S as le, T as ue, _ as de, a as fe, b as pe, c as O, d as me, f as he, g as ge, h as _e, i as ve, j as ye, k as be, m as k, n as xe, o as Se, p as Ce, r as A, s as we, u as Te, v as Ee, w as De, x as Oe, y as ke } from "../app-DxLZjnyG.js";
4
+ import { a as Ae, i as je, n as Me, t as Ne } from "../brand-BSCRFcrY.js";
5
+ import { t as Pe } from "../inlineRe-CoUp2DgK.js";
6
6
  import { Fragment as j, Teleport as Fe, computed as M, createBlock as N, createCommentVNode as P, createElementBlock as F, createElementVNode as I, createTextVNode as L, createVNode as R, defineComponent as z, getCurrentScope as Ie, markRaw as Le, mergeModels as Re, mergeProps as ze, nextTick as Be, normalizeClass as B, normalizeStyle as Ve, onBeforeUnmount as He, onMounted as Ue, onScopeDispose as We, onUnmounted as V, openBlock as H, readonly as Ge, ref as U, renderList as W, renderSlot as G, resolveComponent as Ke, resolveDynamicComponent as qe, shallowReadonly as Je, shallowRef as Ye, toDisplayString as K, toValue as Xe, unref as q, useModel as Ze, useTemplateRef as Qe, vModelText as $e, watch as J, watchEffect as et, withCtx as tt, withDirectives as nt, withKeys as rt, withModifiers as it } from "vue";
7
7
  var at = D({
8
8
  name: "circle-dot",
@@ -271,8 +271,7 @@ function qt(e) {
271
271
  y: n
272
272
  };
273
273
  }
274
- //#endregion
275
- //#region ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
274
+ // ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
276
275
  function Jt(e, t, n) {
277
276
  let { reference: r, floating: i } = e, a = Nt(t), o = Pt(t), s = Mt(o), c = kt(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
278
277
  switch (c) {
@@ -388,7 +387,7 @@ var Xt = 50, Zt = async (e, t, n) => {
388
387
  x: n,
389
388
  y: r
390
389
  }, p = Pt(i), m = Mt(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), C = S ? S[y] : 0;
391
- (!C || !await (o.isElement == null ? void 0 : o.isElement(S))) && (C = s.floating[y] || a.floating[m]);
390
+ C && await (o.isElement == null ? void 0 : o.isElement(S)) || (C = s.floating[y] || a.floating[m]);
392
391
  let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, ee = Ct(d[_], T), te = Ct(d[v], T), ne = C - h[m] - te, E = C / 2 - h[m] / 2 + w, re = Dt(ee, E, ne), ie = !c.arrow && At(i) != null && E !== re && a.reference[m] / 2 - (E < ee ? ee : te) - h[m] / 2 < 0, D = ie ? E < ee ? E - ee : E - ne : 0;
393
392
  return {
394
393
  [p]: f[p] + D,
@@ -518,8 +517,7 @@ var nn = function(e) {
518
517
  }
519
518
  };
520
519
  };
521
- //#endregion
522
- //#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
520
+ // ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
523
521
  function an() {
524
522
  return typeof window < "u";
525
523
  }
@@ -615,8 +613,7 @@ function Tn(e, t, n) {
615
613
  function En(e) {
616
614
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
617
615
  }
618
- //#endregion
619
- //#region ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
616
+ // ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
620
617
  function Dn(e) {
621
618
  let t = Q(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = ln(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = Tt(n) !== a || Tt(r) !== o;
622
619
  return s && (n = a, r = o), {
@@ -632,7 +629,7 @@ function kn(e) {
632
629
  let t = On(e);
633
630
  if (!ln(t)) return Y(1);
634
631
  let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Dn(t), o = (a ? Tt(n.width) : n.width) / r, s = (a ? Tt(n.height) : n.height) / i;
635
- return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
632
+ return o && Number.isFinite(o) || (o = 1), s && Number.isFinite(s) || (s = 1), {
636
633
  x: o,
637
634
  y: s
638
635
  };
@@ -862,8 +859,7 @@ var Qn = {
862
859
  platform: a
863
860
  });
864
861
  };
865
- //#endregion
866
- //#region ../../node_modules/.pnpm/@floating-ui+vue@2.0.1_vue@3.5.44_typescript@6.0.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs
862
+ // ../../node_modules/.pnpm/@floating-ui+vue@2.0.1_vue@3.5.44_typescript@6.0.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs
867
863
  function ir(e) {
868
864
  return typeof e == "object" && !!e && "$el" in e;
869
865
  }
@@ -950,8 +946,7 @@ function lr(e, t, n) {
950
946
  update: y
951
947
  };
952
948
  }
953
- //#endregion
954
- //#region src/client/theme-default/components/TdTooltip.vue
949
+ // src/client/theme-default/components/TdTooltip.vue
955
950
  var ur = /*#__PURE__*/ k(/* @__PURE__ */ z({
956
951
  inheritAttrs: !1,
957
952
  __name: "TdTooltip",
@@ -1017,8 +1012,7 @@ var ur = /*#__PURE__*/ k(/* @__PURE__ */ z({
1017
1012
  }, null, 4)], 36)) : P("", !0)]))], 64));
1018
1013
  }
1019
1014
  }), [["__scopeId", "data-v-953f5bd3"]]);
1020
- //#endregion
1021
- //#region src/client/theme-default/utils/renderInlineMarkup.ts
1015
+ // src/client/theme-default/utils/renderInlineMarkup.ts
1022
1016
  function dr(e) {
1023
1017
  let t = U(fr(e()));
1024
1018
  return et((n) => {
@@ -1030,7 +1024,7 @@ function dr(e) {
1030
1024
  let i = !0;
1031
1025
  n(() => {
1032
1026
  i = !1;
1033
- }), import("../renderMath-C59kPnxc.js").then(({ renderInlineMarkup: e }) => {
1027
+ }), import("../renderMath-CxusSg92.js").then(({ renderInlineMarkup: e }) => {
1034
1028
  i && (t.value = e(r));
1035
1029
  });
1036
1030
  }), t;
@@ -1040,8 +1034,7 @@ function fr(e) {
1040
1034
  for (let r of e.matchAll(Pe)) n += d(e.slice(t, r.index)), r[1] === void 0 ? n += d(r[0]) : n += `<code>${d(r[1])}</code>`, t = r.index + r[0].length;
1041
1035
  return n += d(e.slice(t)), n;
1042
1036
  }
1043
- //#endregion
1044
- //#region src/client/theme-default/components/TdTree/TdTreeNodeLabel.vue?vue&type=script&setup=true&lang.ts
1037
+ // src/client/theme-default/components/TdTree/TdTreeNodeLabel.vue?vue&type=script&setup=true&lang.ts
1045
1038
  var pr = ["innerHTML"], mr = /* @__PURE__ */ z({
1046
1039
  __name: "TdTreeNodeLabel",
1047
1040
  props: { text: {} },
@@ -1173,7 +1166,7 @@ var pr = ["innerHTML"], mr = /* @__PURE__ */ z({
1173
1166
  ])], 2)], 8, hr)) : P("", !0);
1174
1167
  };
1175
1168
  }
1176
- }), [["__scopeId", "data-v-fbd1ff27"]]), wr = {
1169
+ }), [["__scopeId", "data-v-9ff3968e"]]), wr = {
1177
1170
  class: "td-nav",
1178
1171
  "aria-label": "Site navigation"
1179
1172
  }, Tr = { role: "tree" }, Er = ["href"], Dr = {
@@ -1364,7 +1357,7 @@ var pr = ["innerHTML"], mr = /* @__PURE__ */ z({
1364
1357
  size: 14
1365
1358
  })) : P("", !0)], 10, Jr))), 128))])) : P("", !0);
1366
1359
  }
1367
- }), [["__scopeId", "data-v-f416755c"]]), Xr = {
1360
+ }), [["__scopeId", "data-v-4df0cda6"]]), Xr = {
1368
1361
  key: 0,
1369
1362
  class: "td-menu-nav"
1370
1363
  }, Zr = [
@@ -1454,8 +1447,7 @@ function ri(e) {
1454
1447
  let t = a(e.name || e.url).slice(1);
1455
1448
  return t ? ti.has(t.toLowerCase()) : !1;
1456
1449
  }
1457
- //#endregion
1458
- //#region src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetRelation.vue?vue&type=script&setup=true&lang.ts
1450
+ // src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetRelation.vue?vue&type=script&setup=true&lang.ts
1459
1451
  var ii = {
1460
1452
  key: 0,
1461
1453
  class: "td-widget-relation-wrapper"
@@ -1521,10 +1513,10 @@ var ii = {
1521
1513
  function s(e) {
1522
1514
  return t.value ? e : e.slice(0, _i);
1523
1515
  }
1524
- return (e, c) => r.value ? (H(), F("div", pi, [I("ul", mi, [(H(!0), F(j, null, W(s(i.value), (e, t) => (H(), F("li", { key: t }, [(H(), N(qe(e.icon ? q(me)(e.icon.name) ?? q(ue) : q(ue)), {
1516
+ return (e, c) => r.value ? (H(), F("div", pi, [I("ul", mi, [(H(!0), F(j, null, W(s(i.value), (e, t) => (H(), F("li", { key: t }, [I("div", null, [(H(), N(qe(e.icon ? q(me)(e.icon.name) ?? q(ue) : q(ue)), {
1525
1517
  size: 14,
1526
1518
  class: "td-widget-list-icon"
1527
- })), R(fi, {
1519
+ }))]), R(fi, {
1528
1520
  value: { $ref: e },
1529
1521
  "hide-icon": ""
1530
1522
  }, null, 8, ["value"])]))), 128))]), a.value > 0 ? (H(), F("button", {
@@ -1542,7 +1534,7 @@ var ii = {
1542
1534
  onClick: o
1543
1535
  }, K(t.value ? "show less" : `+${a.value} more`), 1)) : P("", !0)]));
1544
1536
  }
1545
- }), [["__scopeId", "data-v-919aaa0d"]]), yi = [
1537
+ }), [["__scopeId", "data-v-bc659020"]]), yi = [
1546
1538
  {
1547
1539
  fg: "#a0522d",
1548
1540
  bg: "rgba(160, 82, 45, 0.1)"
@@ -1588,8 +1580,7 @@ function xi(e) {
1588
1580
  for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n) | 0;
1589
1581
  return Math.abs(t);
1590
1582
  }
1591
- //#endregion
1592
- //#region src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetMultiSelect.vue?vue&type=script&setup=true&lang.ts
1583
+ // src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetMultiSelect.vue?vue&type=script&setup=true&lang.ts
1593
1584
  var Si = 5, Ci = /*#__PURE__*/ k(/* @__PURE__ */ z({
1594
1585
  __name: "TdWidgetMultiSelect",
1595
1586
  props: { value: {} },
@@ -1609,7 +1600,7 @@ var Si = 5, Ci = /*#__PURE__*/ k(/* @__PURE__ */ z({
1609
1600
  onClick: a
1610
1601
  }, K(t.value ? "show less" : `+${i.value} more`), 1)) : P("", !0)], 64));
1611
1602
  }
1612
- }), [["__scopeId", "data-v-2f88152d"]]), wi = /*#__PURE__*/ k(/* @__PURE__ */ z({
1603
+ }), [["__scopeId", "data-v-b3656329"]]), wi = /*#__PURE__*/ k(/* @__PURE__ */ z({
1613
1604
  __name: "TdWidgetSelect",
1614
1605
  props: { value: {} },
1615
1606
  setup(e) {
@@ -1778,8 +1769,7 @@ function Wi() {
1778
1769
  close: n
1779
1770
  };
1780
1771
  }
1781
- //#endregion
1782
- //#region src/client/theme-default/components/TdMenuButton.vue
1772
+ // src/client/theme-default/components/TdMenuButton.vue
1783
1773
  var Gi = /* @__PURE__ */ z({
1784
1774
  __name: "TdMenuButton",
1785
1775
  setup(e) {
@@ -1805,8 +1795,7 @@ var Gi = /* @__PURE__ */ z({
1805
1795
  ]));
1806
1796
  }
1807
1797
  });
1808
- //#endregion
1809
- //#region src/client/theme-default/composables/usePreviousNext.ts
1798
+ // src/client/theme-default/composables/usePreviousNext.ts
1810
1799
  function Ki() {
1811
1800
  let e = ve(), t = O(), { withBase: n, title: r } = A(), i = M(() => {
1812
1801
  let i = qi(e.value.contentTree, t.path, r);
@@ -1879,8 +1868,7 @@ function Xi(e, r) {
1879
1868
  title: a ? w(a.filepath, a.label) : v(e.name)
1880
1869
  };
1881
1870
  }
1882
- //#endregion
1883
- //#region src/client/theme-default/components/TdPreviousNext.vue?vue&type=script&setup=true&lang.ts
1871
+ // src/client/theme-default/components/TdPreviousNext.vue?vue&type=script&setup=true&lang.ts
1884
1872
  var Zi = {
1885
1873
  key: 0,
1886
1874
  class: "td-prevnext",
@@ -1948,8 +1936,7 @@ function la(e) {
1948
1936
  for (; n;) t += n.offsetTop, n = n.offsetParent;
1949
1937
  return t;
1950
1938
  }
1951
- //#endregion
1952
- //#region src/client/theme-default/components/custom/TdToc.vue?vue&type=script&setup=true&lang.ts
1939
+ // src/client/theme-default/components/custom/TdToc.vue?vue&type=script&setup=true&lang.ts
1953
1940
  var ua = {
1954
1941
  key: 0,
1955
1942
  class: "td-toc",
@@ -2139,8 +2126,7 @@ function Sa() {
2139
2126
  cancel: l
2140
2127
  };
2141
2128
  }
2142
- //#endregion
2143
- //#region src/client/theme-default/components/TdSiteSearch/highlight.ts
2129
+ // src/client/theme-default/components/TdSiteSearch/highlight.ts
2144
2130
  function Ca(e, t) {
2145
2131
  if (!e || !t) return d(e);
2146
2132
  let n = t.trim().split(/\s+/).filter(Boolean), r = d(e);
@@ -2150,8 +2136,7 @@ function Ca(e, t) {
2150
2136
  }
2151
2137
  return r;
2152
2138
  }
2153
- //#endregion
2154
- //#region src/client/theme-default/components/TdSiteSearch/TdSiteSearch.vue?vue&type=script&setup=true&lang.ts
2139
+ // src/client/theme-default/components/TdSiteSearch/TdSiteSearch.vue?vue&type=script&setup=true&lang.ts
2155
2140
  var wa = { class: "td-search" }, Ta = { class: "td-search-input-wrap" }, Ea = {
2156
2141
  key: 2,
2157
2142
  class: "td-search-count"
@@ -2317,8 +2302,7 @@ var wa = { class: "td-search" }, Ta = { class: "td-search-input-wrap" }, Ea = {
2317
2302
  }, 8, ["label", "onClick"]));
2318
2303
  }
2319
2304
  });
2320
- //#endregion
2321
- //#region src/client/theme-default/composables/useCopyCode.ts
2305
+ // src/client/theme-default/composables/useCopyCode.ts
2322
2306
  function Fa() {
2323
2307
  function e(e) {
2324
2308
  let t = e.target?.closest(".td-code-copy, .copy");
@@ -2345,8 +2329,7 @@ function Fa() {
2345
2329
  document.removeEventListener("click", e);
2346
2330
  });
2347
2331
  }
2348
- //#endregion
2349
- //#region src/client/theme-default/composables/useCopyHeadingAnchor.ts
2332
+ // src/client/theme-default/composables/useCopyHeadingAnchor.ts
2350
2333
  function Ia() {
2351
2334
  function e(e) {
2352
2335
  let t = e.target?.closest(".td-header-anchor");
@@ -2363,8 +2346,7 @@ function Ia() {
2363
2346
  document.removeEventListener("click", e);
2364
2347
  });
2365
2348
  }
2366
- //#endregion
2367
- //#region src/client/theme-default/composables/useHotkey.ts
2349
+ // src/client/theme-default/composables/useHotkey.ts
2368
2350
  var La = /* @__PURE__ */ new Map([
2369
2351
  [$.Control, "ctrlKey"],
2370
2352
  [$.Alt, "altKey"],
@@ -2403,8 +2385,7 @@ function Ba(e, t) {
2403
2385
  for (let t of n) if (!e[La.get(t)]) return !1;
2404
2386
  return !(e.ctrlKey && !n.includes($.Control) || e.altKey && !n.includes($.Alt) || e.shiftKey && !n.includes($.Shift) || e.metaKey && !n.includes($.Meta));
2405
2387
  }
2406
- //#endregion
2407
- //#region src/client/theme-default/composables/useResizableTable.ts
2388
+ // src/client/theme-default/composables/useResizableTable.ts
2408
2389
  var Va = 6, Ha = 40;
2409
2390
  function Ua() {
2410
2391
  let e, t = !1;
@@ -2442,8 +2423,7 @@ function Ua() {
2442
2423
  document.removeEventListener("pointermove", r), document.removeEventListener("pointerdown", i);
2443
2424
  });
2444
2425
  }
2445
- //#endregion
2446
- //#region src/client/theme-default/composables/lazy-embed/d2.ts
2426
+ // src/client/theme-default/composables/lazy-embed/d2.ts
2447
2427
  var Wa = "https://esm.sh/@terrastruct/d2@0.1.32", Ga, Ka = 0;
2448
2428
  function qa(e) {
2449
2429
  let t = {
@@ -2491,8 +2471,7 @@ async function Ya(e) {
2491
2471
  t.classList.add("td-d2-error");
2492
2472
  }
2493
2473
  }
2494
- //#endregion
2495
- //#region src/client/theme-default/composables/lazy-embed/mermaid.ts
2474
+ // src/client/theme-default/composables/lazy-embed/mermaid.ts
2496
2475
  var Xa = "https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs", Za, Qa = 0;
2497
2476
  function $a(e) {
2498
2477
  let t = {
@@ -2539,8 +2518,7 @@ async function to(e) {
2539
2518
  t.classList.add("td-mermaid-error");
2540
2519
  }
2541
2520
  }
2542
- //#endregion
2543
- //#region src/client/theme-default/composables/lazy-embed/github.ts
2521
+ // src/client/theme-default/composables/lazy-embed/github.ts
2544
2522
  var no = "https://emgithub.com/embed-v2.js";
2545
2523
  function ro(e) {
2546
2524
  let t, n = [], r = {
@@ -2582,8 +2560,7 @@ function ro(e) {
2582
2560
  function io(e, t) {
2583
2561
  return `${no}?target=${encodeURIComponent(e)}&style=${t ? "base16/gruvbox-dark-medium" : "grayscale"}&type=code&showBorder=on&showFileMeta=on&showFullPath=on&showCopy=on&showLineNumbers=on`;
2584
2562
  }
2585
- //#endregion
2586
- //#region src/client/theme-default/composables/lazy-embed/index.ts
2563
+ // src/client/theme-default/composables/lazy-embed/index.ts
2587
2564
  function ao() {
2588
2565
  let e = [], t = /* @__PURE__ */ new WeakSet(), n = /* @__PURE__ */ new WeakMap(), r, i;
2589
2566
  function a() {
@@ -2620,8 +2597,7 @@ function ao() {
2620
2597
  };
2621
2598
  $a(o), qa(o), ro(o);
2622
2599
  }
2623
- //#endregion
2624
- //#region src/client/theme-default/TdLayout.vue?vue&type=script&setup=true&lang.ts
2600
+ // src/client/theme-default/TdLayout.vue?vue&type=script&setup=true&lang.ts
2625
2601
  var oo = { class: "td-header" }, so = { class: "td-header-left" }, co = ["href"], lo = { class: "td-brand-name" }, uo = { class: "td-header-right" }, fo = ["href"], po = { class: "td-drawer-header" }, mo = ["href"], ho = { class: "td-brand-name" }, go = {
2626
2602
  key: 0,
2627
2603
  class: "pt-4",
@@ -2854,5 +2830,4 @@ var oo = { class: "td-header" }, so = { class: "td-header-left" }, co = ["href"]
2854
2830
  Layout: No,
2855
2831
  NotFound: Io
2856
2832
  };
2857
- //#endregion
2858
2833
  export { bt as TdBrandIcon, jr as TdContentNav, Ce as TdDirectoryIndex, Pr as TdFooter, he as TdGlossaryIndex, ba as TdKbdShortcut, $ as TdKeyName, No as TdLayout, Io as TdNotFound, oa as TdPreviousNext, ha as TdRail, Pa as TdThemeToggle, pa as TdToc, Lo as default, Fa as useCopyCode, Ra as useGlobalHotkey, za as useLocalHotkeys };
package/dist/client.js CHANGED
@@ -1 +1 @@
1
- export { s as Content, t as createTypedownApp, c as useRoute, l as useRouter, r as useSiteConfig, i as useSiteData, a as useTdContent, o as useTheme } from "./app-n56VkC5b.js";
1
+ export { s as Content, t as createTypedownApp, c as useRoute, l as useRouter, r as useSiteConfig, i as useSiteData, a as useTdContent, o as useTheme } from "./app-DxLZjnyG.js";
@@ -4,7 +4,7 @@ import { createLogger as n } from "vite";
4
4
  import r from "node:fs";
5
5
  import { RpcServer as i } from "@typerighter/rpc-server";
6
6
  import { RPC_CANCELLED_CODE as a, RpcClient as o } from "@typerighter/rpc-client";
7
- //#region src/node/lib/logger.ts
7
+ // src/node/lib/logger.ts
8
8
  var s = /\u001B\[[0-9;]*m/g, c = class {
9
9
  logStream;
10
10
  constructor(e) {
@@ -116,8 +116,7 @@ async function f(e, t = 5) {
116
116
  }
117
117
  throw Error("unreachable");
118
118
  }
119
- //#endregion
120
- //#region src/node/context.ts
119
+ // src/node/context.ts
121
120
  var p = ["typedown.yaml", "typedown.yml"];
122
121
  function m(e) {
123
122
  let t = new c(_(e));
@@ -190,5 +189,4 @@ function _(t) {
190
189
  return;
191
190
  }
192
191
  }
193
- //#endregion
194
192
  export { l as a, d as i, m as n, h as r, p as t };
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/minisearch@7.2.0/node_modules/minisearch/dist/es/index.js
1
+ // ../../node_modules/.pnpm/minisearch@7.2.0/node_modules/minisearch/dist/es/index.js
2
2
  var e = "KEYS", t = "VALUES", n = class {
3
3
  constructor(e, t) {
4
4
  let n = e._tree, r = Array.from(n.keys());
@@ -701,5 +701,4 @@ var v = (e, t) => Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0, y
701
701
  for (let r of Object.keys(e)) t.set(parseInt(r, 10), e[r]), ++n % 1e3 == 0 && await F(0);
702
702
  return t;
703
703
  }, F = (e) => new Promise((t) => setTimeout(t, e)), I = /[\n\r\p{Z}\p{P}]+/u;
704
- //#endregion
705
704
  export { _ as t };
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-1F0Ui0Iu.js";
2
- import { t as s } from "./cli-BsmuFw-5.js";
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./vite-0T8QXeWH.js";
2
+ import { t as s } from "./cli-CR4zpr_R.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 };
@@ -1,6 +1,6 @@
1
- import { t as e } from "./rolldown-runtime-B0aSnxlc.js";
2
- import { t } from "./context-CSvoDxVt.js";
3
- import { a as n, i as r, n as i, r as a, t as o } from "./brand-CG1fQshq.js";
1
+ import { t as e } from "./rolldown-runtime-QGRDbDUS.js";
2
+ import { t } from "./context-CPrHBM3S.js";
3
+ import { a as n, i as r, n as i, r as a, t as o } from "./brand-BSCRFcrY.js";
4
4
  import s from "node:path";
5
5
  import c from "node:fs/promises";
6
6
  import { existsSync as l } from "node:fs";
@@ -8,7 +8,7 @@ import { styleText as u } from "node:util";
8
8
  import d, { stdin as f, stdout as p } from "node:process";
9
9
  import m from "node:readline";
10
10
  import "node:tty";
11
- //#region ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
11
+ // ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
12
12
  var h = (() => {
13
13
  let e = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
14
14
  return (t) => {
@@ -137,8 +137,7 @@ var h = (() => {
137
137
  function I(e, t, n) {
138
138
  return String(e).normalize().split(ce).map((e) => se(e, t, n)).join("\n");
139
139
  }
140
- //#endregion
141
- //#region ../../node_modules/.pnpm/@clack+core@1.4.3/node_modules/@clack/core/dist/index.mjs
140
+ // ../../node_modules/.pnpm/@clack+core@1.4.3/node_modules/@clack/core/dist/index.mjs
142
141
  var L = (/* @__PURE__ */ e(((e, t) => {
143
142
  var n = "\x1B", r = `${n}[`, i = "\x07", a = {
144
143
  to(e, t) {
@@ -468,8 +467,7 @@ var de = class {
468
467
  });
469
468
  }
470
469
  };
471
- //#endregion
472
- //#region ../../node_modules/.pnpm/@clack+prompts@1.7.0/node_modules/@clack/prompts/dist/index.mjs
470
+ // ../../node_modules/.pnpm/@clack+prompts@1.7.0/node_modules/@clack/prompts/dist/index.mjs
473
471
  function me() {
474
472
  return d.platform === "win32" ? !!d.env.CI || !!d.env.WT_SESSION || !!d.env.TERMINUS_SUBLIME || d.env.ConEmuTask === "{cmd::Cmder}" || d.env.TERM_PROGRAM === "Terminus-Sublime" || d.env.TERM_PROGRAM === "vscode" || d.env.TERM === "xterm-256color" || d.env.TERM === "alacritty" || d.env.TERMINAL_EMULATOR === "JetBrains-JediTerm" : d.env.TERM !== "linux";
475
473
  }
@@ -679,8 +677,7 @@ ${t ? u("cyan", Y) : ""}
679
677
  }
680
678
  }
681
679
  }).prompt();
682
- //#endregion
683
- //#region src/node/cli/init.ts
680
+ // src/node/cli/init.ts
684
681
  async function Re(e, t = {}) {
685
682
  let n = !Xe(t);
686
683
  await Qe(e, n ? await ze(e, t) : $e(t)), n && Ze(e);
@@ -754,7 +751,7 @@ function Ge(e) {
754
751
  check: "typerighter check"
755
752
  },
756
753
  devDependencies: {
757
- typerighter: "^0.52.1",
754
+ typerighter: "^0.53.0",
758
755
  typescript: "^5.0.0"
759
756
  }
760
757
  }, void 0, 2) + "\n";
@@ -831,5 +828,4 @@ async function $(e, t, n, r = {}) {
831
828
  return await c.writeFile(i, n), r.silent || X.success(`created ${t}`), !0;
832
829
  }
833
830
  }
834
- //#endregion
835
831
  export { Re as initialize };
@@ -0,0 +1,3 @@
1
+ // src/client/theme-default/utils/inlineRe.ts
2
+ var e = /`([^`]+)`|\$([^$]+)\$/g;
3
+ export { e as t };
@@ -1,5 +1,5 @@
1
- import { c as e, i as t, q as n } from "./shared-C5ERr4vS.js";
2
- //#region src/node/lib/html-template.ts
1
+ import { c as e, i as t, q as n } from "./shared-v0btHVwj.js";
2
+ // src/node/lib/html-template.ts
3
3
  function r(t) {
4
4
  let n = e(t.title), r = e(t.description), i = t.siteTitle !== void 0 && t.title !== t.siteTitle ? `${n} - ${e(t.siteTitle)}` : n, a = t.origin ?? "", o = t.canonicalUrl === void 0 ? void 0 : a + t.canonicalUrl, s = o === void 0 ? "" : `\n <link rel="canonical" href="${e(o)}">`, c = o === void 0 ? "" : `\n <meta property="og:url" content="${e(o)}">`, l = t.ogImagePath === void 0 ? `${a}${t.base}og-image.png` : `${a}${t.ogImagePath}`, u = t.author === void 0 ? "" : `\n <meta name="author" content="${e(t.author)}">`, d = t.siteTitle === void 0 ? "" : `\n <meta property="og:site_name" content="${e(t.siteTitle)}">`, f = a === "" ? "" : `\n <link rel="alternate" type="application/rss+xml" title="${t.siteTitle === void 0 ? "RSS Feed" : e(t.siteTitle)}" href="${a}${t.base}feed.xml">`, p = (t.jsonLdBlocks ?? []).map((e) => `\n <script type="application/ld+json">${e}<\/script>`).join(""), m = t.headExtra === void 0 ? "" : t.headExtra + "\n";
5
5
  return `<!DOCTYPE html>
@@ -34,8 +34,7 @@ ${m} </head>
34
34
  </body>
35
35
  </html>`;
36
36
  }
37
- //#endregion
38
- //#region src/node/build/seo/page.ts
37
+ // src/node/build/seo/page.ts
39
38
  function i(e) {
40
39
  return e.seoMetadata?.title ?? e.title;
41
40
  }
@@ -51,8 +50,7 @@ function o(e) {
51
50
  function s(e) {
52
51
  return e.seoMetadata?.image;
53
52
  }
54
- //#endregion
55
- //#region src/node/build/seo/jsonld.ts
53
+ // src/node/build/seo/jsonld.ts
56
54
  function c(e) {
57
55
  return JSON.stringify({
58
56
  "@context": "https://schema.org",
@@ -80,5 +78,4 @@ function l(e, t) {
80
78
  itemListElement: i
81
79
  });
82
80
  }
83
- //#endregion
84
81
  export { a, s as i, l as n, i as o, o as r, r as s, c as t };
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-contract.d.ts","sourceRoot":"","sources":["../../../src/node/build/builtin-contract.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AA0BxD,wBAAgB,oBAAoB,IAAK,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAWrE"}
1
+ {"version":3,"file":"builtin-contract.d.ts","sourceRoot":"","sources":["../../../src/node/build/builtin-contract.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AA0BxD,wBAAgB,oBAAoB,IAAK,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAUrE"}
@@ -1,8 +1,8 @@
1
- import { P as e } from "./shared-C5ERr4vS.js";
2
- import { a as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./jsonld-CRHOaFMj.js";
1
+ import { P as e } from "./shared-v0btHVwj.js";
2
+ import { a as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./jsonld-CByNA46l.js";
3
3
  import { pathToFileURL as c } from "node:url";
4
4
  import { parentPort as l, workerData as u } from "node:worker_threads";
5
- //#region src/node/build/prerenderWorker.ts
5
+ // src/node/build/prerenderWorker.ts
6
6
  var d = u, f = await (await import(c(d.ssrEntryPath).href)).createRenderer();
7
7
  l.on("message", async (c) => {
8
8
  try {
@@ -36,4 +36,3 @@ l.on("message", async (c) => {
36
36
  l.postMessage({ error: e instanceof Error ? e.message : String(e) });
37
37
  }
38
38
  });
39
- //#endregion
@@ -1,7 +1,7 @@
1
- import { c as e } from "./shared-C5ERr4vS.js";
2
- import { t } from "./temml-D47Z4xZ2.js";
3
- import { t as n } from "./inlineRe-Cn-J_E76.js";
4
- //#region src/client/theme-default/utils/renderMath.ts
1
+ import { c as e } from "./shared-v0btHVwj.js";
2
+ import { t } from "./temml-CjI4drVW.js";
3
+ import { t as n } from "./inlineRe-CoUp2DgK.js";
4
+ // src/client/theme-default/utils/renderMath.ts
5
5
  function r(r) {
6
6
  let i = 0, a = "";
7
7
  for (let o of r.matchAll(n)) {
@@ -15,5 +15,4 @@ function r(r) {
15
15
  }
16
16
  return a += e(r.slice(i)), a;
17
17
  }
18
- //#endregion
19
18
  export { r as renderInlineMarkup };
@@ -1,5 +1,5 @@
1
- //#region \0rolldown/runtime.js
2
- var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, n) => {
1
+ // \0rolldown/runtime.js
2
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), s = (e, n) => {
3
3
  let r = {};
4
4
  for (var i in e) t(r, i, {
5
5
  get: e[i],
@@ -16,5 +16,4 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
16
16
  value: n,
17
17
  enumerable: !0
18
18
  }) : o, n));
19
- //#endregion
20
19
  export { s as n, l as r, o as t };
@@ -5,6 +5,9 @@ export interface ArraySchema {
5
5
  type: 'array';
6
6
  items: JsonSchema;
7
7
  }
8
+ export interface ConstSchema {
9
+ const: string | number | boolean | null;
10
+ }
8
11
  export interface DictSchema {
9
12
  type: 'object';
10
13
  additionalProperties: JsonSchema;
@@ -12,7 +15,7 @@ export interface DictSchema {
12
15
  export interface EnumSchema {
13
16
  enum: (string | number | boolean | null)[];
14
17
  }
15
- export type JsonSchema = PrimitiveSchema | MultiTypeSchema | EnumSchema | ArraySchema | ProductSchema | DictSchema | OneOfSchema | AnyOfSchema;
18
+ export type JsonSchema = PrimitiveSchema | MultiTypeSchema | EnumSchema | ConstSchema | ArraySchema | ProductSchema | DictSchema | OneOfSchema | AnyOfSchema;
16
19
  export interface MultiTypeSchema {
17
20
  type: string[];
18
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../../src/shared/types/json-schema.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAGD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,UAAU,CAAC;CACnB;AAGD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,oBAAoB,EAAE,UAAU,CAAC;CAClC;AAGD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC;CAC5C;AAED,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,eAAe,GACf,UAAU,GACV,WAAW,GACX,aAAa,GACb,UAAU,GACV,WAAW,GACX,WAAW,CAAC;AAGhB,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAGD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAGD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;CACvC;AAGD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,oBAAoB,EAAE,KAAK,CAAC;CAC7B;AAED,wBAAgB,UAAU,CAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAKvD;AAED,wBAAgB,YAAY,CAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAmC5D"}
1
+ {"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../../src/shared/types/json-schema.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAGD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,UAAU,CAAC;CACnB;AAGD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CACzC;AAGD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,oBAAoB,EAAE,UAAU,CAAC;CAClC;AAGD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC;CAC5C;AAED,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,eAAe,GACf,UAAU,GACV,WAAW,GACX,WAAW,GACX,aAAa,GACb,UAAU,GACV,WAAW,GACX,WAAW,CAAC;AAGhB,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAGD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAGD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;CACvC;AAGD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,oBAAoB,EAAE,KAAK,CAAC;CAC7B;AAED,wBAAgB,UAAU,CAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAKvD;AAED,wBAAgB,YAAY,CAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAmC5D"}