typerighter 0.38.1 → 0.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/{app-Bnln5XCo.js → app-GI_8rzn8.js} +339 -338
  2. package/dist/{cli-DEOw0tox.js → cli-CPY9dpTQ.js} +28 -26
  3. package/dist/cli.js +1 -1
  4. package/dist/client/app/index.d.ts +8 -0
  5. package/dist/client/app/index.d.ts.map +1 -1
  6. package/dist/client/theme-default.js +174 -174
  7. package/dist/client.js +1 -1
  8. package/dist/context-CNTdcpo4.js +192 -0
  9. package/dist/index.js +3 -3
  10. package/dist/{init-BhEVxNbG.js → init-YypOGdjI.js} +9 -6
  11. package/dist/jsonld-e_0GNJdS.js +84 -0
  12. package/dist/node/build/index.d.ts.map +1 -1
  13. package/dist/node/build/prerender.d.ts +21 -0
  14. package/dist/node/build/prerender.d.ts.map +1 -1
  15. package/dist/node/build/prerenderWorker.d.ts +2 -0
  16. package/dist/node/build/prerenderWorker.d.ts.map +1 -0
  17. package/dist/node/build/seo/feed.d.ts +3 -0
  18. package/dist/node/build/seo/feed.d.ts.map +1 -0
  19. package/dist/node/build/seo/index.d.ts +5 -0
  20. package/dist/node/build/seo/index.d.ts.map +1 -0
  21. package/dist/node/build/seo/jsonld.d.ts +10 -0
  22. package/dist/node/build/seo/jsonld.d.ts.map +1 -0
  23. package/dist/node/build/seo/page.d.ts +6 -0
  24. package/dist/node/build/seo/page.d.ts.map +1 -0
  25. package/dist/node/build/seo/sitemap.d.ts +3 -0
  26. package/dist/node/build/seo/sitemap.d.ts.map +1 -0
  27. package/dist/node/cli/index.d.ts.map +1 -1
  28. package/dist/node/lib/htmlTemplate.d.ts +30 -0
  29. package/dist/node/lib/htmlTemplate.d.ts.map +1 -0
  30. package/dist/node/lib/render/vue.d.ts.map +1 -1
  31. package/dist/node/lib/worker-pool/index.d.ts +21 -0
  32. package/dist/node/lib/worker-pool/index.d.ts.map +1 -0
  33. package/dist/node/plugin/vite/virtual/app.d.ts +2 -0
  34. package/dist/node/plugin/vite/virtual/app.d.ts.map +1 -1
  35. package/dist/prerenderWorker.js +39 -0
  36. package/dist/rolldown-runtime-B0aSnxlc.js +20 -0
  37. package/dist/shared/constants.d.ts.map +1 -1
  38. package/dist/shared/types/ssg.d.ts +6 -0
  39. package/dist/shared/types/ssg.d.ts.map +1 -1
  40. package/dist/shared/utils/time.d.ts +1 -0
  41. package/dist/shared/utils/time.d.ts.map +1 -1
  42. package/dist/shared/utils/url.d.ts +1 -0
  43. package/dist/shared/utils/url.d.ts.map +1 -1
  44. package/dist/{shared-l3GF0JOc.js → shared-LPNgvigl.js} +111 -120
  45. package/dist/shared.js +2 -2
  46. package/dist/{vite-DACnySpv.js → vite-Djs3IU9Y.js} +508 -587
  47. package/dist/vite.js +1 -1
  48. package/package.json +7 -7
  49. package/dist/node/lib/html-template.d.ts +0 -22
  50. package/dist/node/lib/html-template.d.ts.map +0 -1
@@ -11,5 +11,6 @@ export declare function isUrlExternal(path: string): boolean;
11
11
  export declare function isUrlToPage(filename: string): boolean;
12
12
  export declare function resolveRootUrl(url: string): string;
13
13
  export declare function stripAnchor(url: string): string;
14
+ export declare function stripLeadingSlash(url: string): string;
14
15
  export declare function stripTrailingSlash(url: string): string;
15
16
  //# sourceMappingURL=url.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/url.ts"],"names":[],"mappings":"AAqBA,wBAAgB,SAAS,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAI9C;AAGD,wBAAgB,uBAAuB,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,eAAe,CAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAExE;AAGD,wBAAgB,WAAW,CAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED,wBAAgB,YAAY,CAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,eAAe,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIzD;AAGD,wBAAgB,UAAU,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAGD,wBAAgB,UAAU,CAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED,wBAAgB,eAAe,CAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE5E;AAGD,wBAAgB,aAAa,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAGD,wBAAgB,WAAW,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAItD;AAED,wBAAgB,cAAc,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEnD;AAGD,wBAAgB,WAAW,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED,wBAAgB,kBAAkB,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD"}
1
+ {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/url.ts"],"names":[],"mappings":"AAqBA,wBAAgB,SAAS,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAI9C;AAGD,wBAAgB,uBAAuB,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,eAAe,CAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAExE;AAGD,wBAAgB,WAAW,CAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED,wBAAgB,YAAY,CAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,eAAe,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIzD;AAGD,wBAAgB,UAAU,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAGD,wBAAgB,UAAU,CAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED,wBAAgB,eAAe,CAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE5E;AAGD,wBAAgB,aAAa,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAGD,wBAAgB,WAAW,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAItD;AAED,wBAAgB,cAAc,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEnD;AAGD,wBAAgB,WAAW,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED,wBAAgB,iBAAiB,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,kBAAkB,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD"}
@@ -1,24 +1,9 @@
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) => {
3
- let r = {};
4
- for (var i in e) t(r, i, {
5
- get: e[i],
6
- enumerable: !0
7
- });
8
- return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
9
- }, c = (e, i, o, s) => {
10
- if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
11
- get: ((e) => i[e]).bind(null, d),
12
- enumerable: !(s = n(i, d)) || s.enumerable
13
- });
14
- return e;
15
- }, l = (n, r, o) => (o = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
16
- value: n,
17
- enumerable: !0
18
- }) : o, n)), u = "index", d = [".td", ".md"], f = "**/*.{td,md}", p = ["title", "text"], ee = ["title", "text"], m = /^[a-z]+:/i;
1
+ import { n as e, r as t, t as n } from "./rolldown-runtime-B0aSnxlc.js";
2
+ //#region src/shared/constants.ts
3
+ var r = "index", i = [".td", ".md"], a = "**/*.{td,md}", o = ["title", "text"], s = ["title", "text"], c = /^[a-z]+:/i;
19
4
  //#endregion
20
5
  //#region src/shared/utils/format.ts
21
- function h(e) {
6
+ function l(e) {
22
7
  let t = e.match(/^(\d+)[-_](.+)$/);
23
8
  return t ? {
24
9
  order: Number(t[1]),
@@ -28,111 +13,114 @@ function h(e) {
28
13
  rest: e
29
14
  };
30
15
  }
31
- function g(e) {
32
- let { rest: t } = h(e), n = t.replace(/[-_]/g, " ").split(" ");
16
+ function u(e) {
17
+ let { rest: t } = l(e), n = t.replace(/[-_]/g, " ").split(" ");
33
18
  return 0 < n.length && (n[0] = n[0].charAt(0).toUpperCase() + n[0].slice(1)), n.join(" ");
34
19
  }
35
20
  //#endregion
36
21
  //#region src/shared/utils/path.ts
37
- var _ = /* @__PURE__ */ s({
38
- basename: () => v,
39
- dirname: () => y,
40
- extname: () => b,
41
- filestem: () => x,
42
- isContentFile: () => S,
43
- isTypeFile: () => C,
44
- join: () => w,
45
- stripExtension: () => T,
46
- stripPrefix: () => E
22
+ var d = /* @__PURE__ */ e({
23
+ basename: () => f,
24
+ dirname: () => p,
25
+ extname: () => m,
26
+ filestem: () => h,
27
+ isContentFile: () => g,
28
+ isTypeFile: () => _,
29
+ join: () => v,
30
+ stripExtension: () => y,
31
+ stripPrefix: () => b
47
32
  });
48
- function v(e, t) {
49
- let n = D(e).split("/").pop() ?? "";
33
+ function f(e, t) {
34
+ let n = x(e).split("/").pop() ?? "";
50
35
  return t !== void 0 && n.endsWith(t) ? n.slice(0, -t.length) : n;
51
36
  }
52
- function y(e) {
53
- let t = D(e).split("/");
37
+ function p(e) {
38
+ let t = x(e).split("/");
54
39
  return t.pop(), t.join("/");
55
40
  }
56
- function b(e) {
57
- let t = v(e), n = t.lastIndexOf(".");
41
+ function m(e) {
42
+ let t = f(e), n = t.lastIndexOf(".");
58
43
  return n <= 0 ? "" : t.slice(n);
59
44
  }
60
- function x(e) {
61
- let t = v(e), n = t.lastIndexOf(".");
45
+ function h(e) {
46
+ let t = f(e), n = t.lastIndexOf(".");
62
47
  return n <= 0 ? t : t.slice(0, n);
63
48
  }
64
- function S(e) {
65
- return d.includes(b(e));
49
+ function g(e) {
50
+ return i.includes(m(e));
66
51
  }
67
- function C(e) {
68
- return S(e) && e.split("/").includes("_types");
52
+ function _(e) {
53
+ return g(e) && e.split("/").includes("_types");
69
54
  }
70
- function w(...e) {
55
+ function v(...e) {
71
56
  return e.filter(Boolean).join("/").replace(/\\+/g, "/").replace(/\/+/g, "/").replace(/\/$/, "") || "/";
72
57
  }
73
- function T(e) {
74
- let t = b(e);
58
+ function y(e) {
59
+ let t = m(e);
75
60
  return t ? e.slice(0, -t.length) : e;
76
61
  }
77
- function E(e, t) {
78
- let n = D(e), r = `/${t}/`, i = n.lastIndexOf(r);
62
+ function b(e, t) {
63
+ let n = x(e), r = `/${t}/`, i = n.lastIndexOf(r);
79
64
  return i === -1 ? n : n.slice(i + r.length);
80
65
  }
81
- function D(e) {
66
+ function x(e) {
82
67
  return e.replace(/\\/g, "/");
83
68
  }
84
69
  //#endregion
85
70
  //#region src/shared/utils/url.ts
86
- var te = new Set("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip".split(","));
87
- function O(e) {
71
+ var ee = new Set("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip".split(","));
72
+ function te(e) {
88
73
  let t = e.indexOf("#");
89
74
  return 0 <= t ? e.slice(t + 1) : "";
90
75
  }
91
- function k(e) {
92
- return N(e) ? j(e) : e;
76
+ function ne(e) {
77
+ return T(e) ? C(e) : e;
93
78
  }
94
- function ne(e, t) {
79
+ function re(e, t) {
95
80
  return `${e}/${t}`;
96
81
  }
97
- function A(e) {
82
+ function S(e) {
98
83
  return e === "/" ? "/index" : e + "/index";
99
84
  }
100
- function j(e) {
101
- return y(F(e)) || "/";
85
+ function C(e) {
86
+ return p(A(e)) || "/";
102
87
  }
103
- function M(e) {
104
- let t = x(e);
105
- return "/" + w(y(e), t);
88
+ function w(e) {
89
+ let t = h(e);
90
+ return "/" + v(p(e), t);
106
91
  }
107
- function re(e) {
92
+ function ie(e) {
108
93
  return e.split("?")[0].split("#")[0];
109
94
  }
110
- function N(e) {
95
+ function T(e) {
111
96
  return e === "/index" || e.endsWith("/index");
112
97
  }
113
- function P(e, t) {
98
+ function ae(e, t) {
114
99
  return t.startsWith(e + "/") || t === e;
115
100
  }
116
- function ie(e) {
117
- return m.test(e);
101
+ function oe(e) {
102
+ return c.test(e);
118
103
  }
119
- function ae(e) {
120
- let t = b(e).slice(1);
121
- return t === "" || !te.has(t.toLowerCase());
104
+ function E(e) {
105
+ let t = m(e).slice(1);
106
+ return t === "" || !ee.has(t.toLowerCase());
122
107
  }
123
- function oe(e) {
108
+ function D(e) {
124
109
  return e === "/" ? "/index" : e;
125
110
  }
126
- function se(e) {
111
+ function O(e) {
127
112
  let t = e.indexOf("#");
128
113
  return 0 <= t ? e.slice(0, t) : e;
129
114
  }
130
- function F(e) {
115
+ function k(e) {
116
+ return e.replace(/^\//, "");
117
+ }
118
+ function A(e) {
131
119
  return e.replace(/\/$/, "") || "/";
132
120
  }
133
121
  //#endregion
134
122
  //#region src/shared/utils/content.ts
135
- function ce(e) {
123
+ function se(e) {
136
124
  let t = {
137
125
  name: "",
138
126
  entries: []
@@ -154,31 +142,31 @@ function ce(e) {
154
142
  item: n
155
143
  });
156
144
  }
157
- return V(t), { entries: t.entries };
145
+ return I(t), { entries: t.entries };
158
146
  }
159
- function le(e, t) {
147
+ function ce(e, t) {
160
148
  let n = {};
161
149
  function r(e) {
162
150
  let t = 0;
163
- for (let n of e.entries) n.kind === "file" ? R(n.item.filepath) || t++ : t += r(n.node);
151
+ for (let n of e.entries) n.kind === "file" ? N(n.item.filepath) || t++ : t += r(n.node);
164
152
  return t;
165
153
  }
166
154
  function i(e, t) {
167
- let n = I(e);
168
- return n ? M(n.filepath) : A(`${t}/${e.name}`);
155
+ let n = j(e);
156
+ return n ? w(n.filepath) : S(`${t}/${e.name}`);
169
157
  }
170
158
  function a(e, t) {
171
159
  let n = [];
172
160
  for (let a of e) a.kind === "dir" ? n.push({
173
161
  kind: "dir",
174
162
  sub: {
175
- name: g(a.node.name),
163
+ name: u(a.node.name),
176
164
  url: i(a.node, t),
177
165
  count: r(a.node)
178
166
  }
179
- }) : R(a.item.filepath) || n.push({
167
+ }) : N(a.item.filepath) || n.push({
180
168
  kind: "file",
181
- item: H(a.item)
169
+ item: L(a.item)
182
170
  });
183
171
  return n;
184
172
  }
@@ -187,7 +175,7 @@ function le(e, t) {
187
175
  if (r.kind !== "dir") continue;
188
176
  let e = r.node, i = t ? `${t}/${e.name}` : `/${e.name}`;
189
177
  n[i] = {
190
- title: g(e.name),
178
+ title: u(e.name),
191
179
  url: i,
192
180
  entries: a(e.entries, i)
193
181
  }, o(e.entries, i);
@@ -199,47 +187,47 @@ function le(e, t) {
199
187
  entries: a(e, "")
200
188
  }, o(e, ""), n;
201
189
  }
202
- function I(e) {
203
- for (let t of e.entries) if (t.kind === "file" && R(t.item.filepath)) return t.item;
190
+ function j(e) {
191
+ for (let t of e.entries) if (t.kind === "file" && N(t.item.filepath)) return t.item;
204
192
  }
205
- function ue(e, t) {
206
- let n = v(y(e));
207
- return n ? g(n) : t;
193
+ function le(e, t) {
194
+ let n = f(p(e));
195
+ return n ? u(n) : t;
208
196
  }
209
- function L(e, t) {
197
+ function M(e, t) {
210
198
  if (t !== void 0) return t;
211
- let n = x(e);
212
- if (R(e)) {
213
- let t = v(y(e));
214
- return t ? g(t) : n;
199
+ let n = h(e);
200
+ if (N(e)) {
201
+ let t = f(p(e));
202
+ return t ? u(t) : n;
215
203
  }
216
- return g(n);
204
+ return u(n);
217
205
  }
218
- function R(e) {
219
- return x(e) === u;
206
+ function N(e) {
207
+ return h(e) === r;
220
208
  }
221
- function z(e) {
222
- return e.kind === "dir" ? e.node.name : x(e.item.filepath);
209
+ function P(e) {
210
+ return e.kind === "dir" ? e.node.name : h(e.item.filepath);
223
211
  }
224
- function B(e, ...t) {
212
+ function F(e, ...t) {
225
213
  for (let n of t) {
226
214
  let t = e[n];
227
215
  if (typeof t == "string" && 0 < t.length) return t;
228
216
  }
229
217
  }
230
- function V(e) {
218
+ function I(e) {
231
219
  e.entries.sort((e, t) => {
232
- let n = z(e), r = z(t), i = h(n), a = h(r);
220
+ let n = P(e), r = P(t), i = l(n), a = l(r);
233
221
  return i.order === a.order ? i.order === Infinity && e.kind !== t.kind ? e.kind === "dir" ? -1 : 1 : i.rest.localeCompare(a.rest) : i.order - a.order;
234
222
  });
235
- for (let t of e.entries) t.kind === "dir" && V(t.node);
223
+ for (let t of e.entries) t.kind === "dir" && I(t.node);
236
224
  }
237
- function H(e) {
225
+ function L(e) {
238
226
  let t = e.header.tags, n = Array.isArray(t) ? t.filter((e) => typeof e == "string") : [];
239
227
  return {
240
- name: L(e.filepath, e.label),
241
- url: M(e.filepath),
242
- description: B(e.header, "description", "summary") ?? e.excerpt,
228
+ name: M(e.filepath, e.label),
229
+ url: w(e.filepath),
230
+ description: F(e.header, "description", "summary") ?? e.excerpt,
243
231
  tags: 0 < n.length ? n : void 0,
244
232
  mtime: e.metadata?.mtime,
245
233
  schema: e.schema
@@ -247,7 +235,7 @@ function H(e) {
247
235
  }
248
236
  //#endregion
249
237
  //#region src/shared/utils/debounce.ts
250
- function de(e, t) {
238
+ function R(e, t) {
251
239
  let n;
252
240
  return (...r) => {
253
241
  clearTimeout(n), n = setTimeout(() => e(...r), t);
@@ -255,12 +243,12 @@ function de(e, t) {
255
243
  }
256
244
  //#endregion
257
245
  //#region src/shared/utils/field.ts
258
- function fe(e) {
246
+ function z(e) {
259
247
  return e.startsWith("_");
260
248
  }
261
249
  //#endregion
262
250
  //#region src/shared/utils/html.ts
263
- var U = /* @__PURE__ */ l((/* @__PURE__ */ o(((e, t) => {
251
+ var B = /* @__PURE__ */ t((/* @__PURE__ */ n(((e, t) => {
264
252
  (function(e) {
265
253
  if (typeof n != "function") {
266
254
  var n = function(e) {
@@ -359,22 +347,22 @@ var U = /* @__PURE__ */ l((/* @__PURE__ */ o(((e, t) => {
359
347
  }) : typeof t == "object" && t.exports ? t.exports = c : e.striptags = c;
360
348
  })(e);
361
349
  })))(), 1);
362
- function pe(e) {
350
+ function V(e) {
363
351
  return e.replaceAll("&", "&amp;").replaceAll("\"", "&quot;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
364
352
  }
365
- function me(e) {
366
- return W((0, U.default)(e)).replace(/\s+/g, " ").trim();
353
+ function H(e) {
354
+ return W((0, B.default)(e)).replace(/\s+/g, " ").trim();
367
355
  }
368
- var he = /* @__PURE__ */ "code.em.strong.s.span.sub.sup.math.mrow.mi.mn.mo.mfrac.msup.msub.msubsup.msqrt.mroot.mtext.mspace.merror.semantics.annotation.mover.munder.munderover.mtable.mtr.mtd".split(".");
369
- function ge(e) {
370
- return e === void 0 ? "" : (0, U.default)(e, he);
356
+ var U = /* @__PURE__ */ "code.em.strong.s.span.sub.sup.math.mrow.mi.mn.mo.mfrac.msup.msub.msubsup.msqrt.mroot.mtext.mspace.merror.semantics.annotation.mover.munder.munderover.mtable.mtr.mtd".split(".");
357
+ function ue(e) {
358
+ return e === void 0 ? "" : (0, B.default)(e, U);
371
359
  }
372
360
  function W(e) {
373
361
  return e.replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&quot;", "\"").replaceAll("&#39;", "'").replaceAll("&amp;", "&");
374
362
  }
375
363
  //#endregion
376
364
  //#region src/shared/utils/regex.ts
377
- function _e(e) {
365
+ function de(e) {
378
366
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
379
367
  }
380
368
  //#endregion
@@ -387,7 +375,7 @@ function Q(e) {
387
375
  day: "numeric"
388
376
  });
389
377
  }
390
- function ve(e, t) {
378
+ function fe(e, t) {
391
379
  return typeof window > "u" ? "" : Math.floor(Date.now() / 1e3) - e < Z ? `${t} ${$(e)}` : `${t} at ${Q(e)}`;
392
380
  }
393
381
  function $(e) {
@@ -395,17 +383,20 @@ function $(e) {
395
383
  let t = Math.floor(Date.now() / 1e3) - e;
396
384
  return t < G ? "just now" : t < K ? `${Math.floor(t / G)}m ago` : t < q ? `${Math.floor(t / K)}h ago` : t < J ? `${Math.floor(t / q)}d ago` : t < Y ? `${Math.floor(t / J)}w ago` : t < X ? `${Math.floor(t / Y)}mo ago` : `${Math.floor(t / X)}y ago`;
397
385
  }
398
- var ye = new Intl.DateTimeFormat("en-US", {
386
+ var pe = new Intl.DateTimeFormat("en-US", {
399
387
  year: "numeric",
400
388
  month: "short",
401
389
  day: "numeric"
402
390
  });
403
- function be(e) {
391
+ function me(e) {
404
392
  let t = new Date(e);
405
- return Number.isNaN(t.getTime()) ? e : ye.format(t);
393
+ return Number.isNaN(t.getTime()) ? e : pe.format(t);
394
+ }
395
+ function he(e) {
396
+ return new Date(e).toISOString().slice(0, 10);
406
397
  }
407
- function xe(e) {
398
+ function ge(e) {
408
399
  return Math.floor(Date.now() / 1e3) - e < Z ? $(e) : Q(e);
409
400
  }
410
401
  //#endregion
411
- export { oe as A, h as B, j as C, P as D, N as E, S as F, u as G, m as H, C as I, o as J, p as K, _ as L, F as M, v as N, ie as O, b as P, T as R, A as S, re as T, d as U, g as V, f as W, L as _, xe as a, k as b, ge as c, fe as d, de as f, ue as g, I as h, $ as i, se as j, ae as k, me as l, le as m, be as n, _e as o, ce as p, ee as q, ve as r, pe as s, Q as t, W as u, R as v, M as w, ne as x, O as y, E as z };
402
+ export { E as A, y as B, S as C, T as D, ie as E, f as F, i as G, l as H, m as I, o as J, a as K, g as L, O as M, k as N, ae as O, A as P, _ as R, re as S, w as T, u as U, b as V, c as W, s as Y, le as _, $ as a, te as b, V as c, W as d, z as f, j as g, ce as h, he as i, D as j, oe as k, ue as l, se as m, me as n, ge as o, R as p, r as q, fe as r, de as s, Q as t, H as u, M as v, C as w, ne as x, N as y, d as z };
package/dist/shared.js CHANGED
@@ -1,2 +1,2 @@
1
- import { A as e, B as t, C as n, D as r, E as i, G as a, H as o, K as s, L as c, M as l, O as u, S as d, T as f, U as p, V as m, W as h, _ as g, a as _, b as v, c as y, d as b, f as x, g as S, h as C, i as w, j as T, k as E, l as D, m as O, n as k, o as A, p as j, q as M, r as N, s as P, t as F, u as I, v as L, w as R, x as z, y as B } from "./shared-l3GF0JOc.js";
2
- export { p as CONTENT_EXTENSIONS, h as CONTENT_GLOB, o as EXTERNAL_URL_RE, a as INDEX_FILENAME, s as SEARCH_FIELDS, M as SEARCH_STORE_FIELDS, j as buildContentTree, O as buildDirectoryListingMap, x as debounce, P as escapeHtml, A as escapeRegex, F as formatAbsoluteTime, k as formatDateString, N as formatEditTime, w as formatRelativeTime, _ as formatTime, B as getAnchor, v as getDirectoryFromPageUrl, z as getDirectoryUrl, d as getIndexUrl, C as getNodeIndexItem, n as getParentUrl, R as getTdContentUrl, S as getTdIndexTitle, g as getTdResourceTitle, f as getUrlPath, b as isBuiltinField, L as isIndexFile, i as isIndexUrl, r as isUrlAncestorOf, u as isUrlExternal, E as isUrlToPage, t as parseNumericPrefix, c as path, e as resolveRootUrl, y as sanitizeInlineHtml, T as stripAnchor, D as stripHtml, l as stripTrailingSlash, I as unescapeHtml, m as unslugify };
1
+ import { A as e, C as t, D as n, E as r, G as i, H as a, J as o, K as s, M as c, N as l, O as u, P as d, S as f, T as p, U as m, W as h, Y as g, _, a as v, b as y, c as b, d as x, f as S, g as C, h as w, i as T, j as E, k as D, l as O, m as k, n as A, o as j, p as M, q as N, r as P, s as F, t as I, u as L, v as R, w as z, x as B, y as V, z as H } from "./shared-LPNgvigl.js";
2
+ export { i as CONTENT_EXTENSIONS, s as CONTENT_GLOB, h as EXTERNAL_URL_RE, N as INDEX_FILENAME, o as SEARCH_FIELDS, g as SEARCH_STORE_FIELDS, k as buildContentTree, w as buildDirectoryListingMap, M as debounce, b as escapeHtml, F as escapeRegex, I as formatAbsoluteTime, A as formatDateString, P as formatEditTime, T as formatIsoDate, v as formatRelativeTime, j as formatTime, y as getAnchor, B as getDirectoryFromPageUrl, f as getDirectoryUrl, t as getIndexUrl, C as getNodeIndexItem, z as getParentUrl, p as getTdContentUrl, _ as getTdIndexTitle, R as getTdResourceTitle, r as getUrlPath, S as isBuiltinField, V as isIndexFile, n as isIndexUrl, u as isUrlAncestorOf, D as isUrlExternal, e as isUrlToPage, a as parseNumericPrefix, H as path, E as resolveRootUrl, O as sanitizeInlineHtml, c as stripAnchor, L as stripHtml, l as stripLeadingSlash, d as stripTrailingSlash, x as unescapeHtml, m as unslugify };