typerighter 0.55.0 → 0.55.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 (40) hide show
  1. package/dist/{app-Dj09xvlJ.js → app-C1ognrj1.js} +37 -37
  2. package/dist/{cli-qdkrcgUe.js → cli-Cfn9ef18.js} +5 -5
  3. package/dist/cli.js +1 -1
  4. package/dist/client/theme-default.js +218 -218
  5. package/dist/client.js +1 -1
  6. package/dist/index.js +2 -2
  7. package/dist/{init-CqTfzJfC.js → init-DLnxbm8u.js} +1 -1
  8. package/dist/node/build/prerender.d.ts +2 -2
  9. package/dist/node/build/prerender.d.ts.map +1 -1
  10. package/dist/node/build/seo/feed.d.ts +1 -1
  11. package/dist/node/build/seo/feed.d.ts.map +1 -1
  12. package/dist/node/build/seo/index.d.ts +4 -4
  13. package/dist/node/build/seo/index.d.ts.map +1 -1
  14. package/dist/node/build/seo/jsonld.d.ts +15 -2
  15. package/dist/node/build/seo/jsonld.d.ts.map +1 -1
  16. package/dist/node/build/seo/page.d.ts +16 -5
  17. package/dist/node/build/seo/page.d.ts.map +1 -1
  18. package/dist/node/build/seo/sitemap.d.ts +2 -2
  19. package/dist/node/build/seo/sitemap.d.ts.map +1 -1
  20. package/dist/node/lib/html-template.d.ts +3 -0
  21. package/dist/node/lib/html-template.d.ts.map +1 -1
  22. package/dist/node/lib/render/vue.d.ts.map +1 -1
  23. package/dist/page-BktMady3.js +114 -0
  24. package/dist/prerenderWorker.js +31 -32
  25. package/dist/{renderMath-cPd-YSsZ.js → renderMath-CJKXI63h.js} +1 -1
  26. package/dist/shared/types/content.d.ts +3 -3
  27. package/dist/shared/types/content.d.ts.map +1 -1
  28. package/dist/shared/types/ssg.d.ts +3 -0
  29. package/dist/shared/types/ssg.d.ts.map +1 -1
  30. package/dist/shared/utils/format.d.ts +1 -0
  31. package/dist/shared/utils/format.d.ts.map +1 -1
  32. package/dist/shared/utils/url.d.ts +1 -0
  33. package/dist/shared/utils/url.d.ts.map +1 -1
  34. package/dist/{shared-tntT6SIH.js → shared-BK7uzYmy.js} +100 -94
  35. package/dist/shared.js +1 -1
  36. package/dist/typerighter.css +1 -1
  37. package/dist/{vite-C6g7N9dI.js → vite-B9tiBEhg.js} +489 -488
  38. package/dist/vite.js +1 -1
  39. package/package.json +3 -3
  40. package/dist/jsonld-Bb_dN3WE.js +0 -81
@@ -39,111 +39,117 @@ function p(e) {
39
39
  function ee(e) {
40
40
  return e.replace(/_/g, "-");
41
41
  }
42
+ function te(e, t) {
43
+ return e.length <= t ? e : e.slice(0, t - 1).trimEnd() + "…";
44
+ }
42
45
  function m(e) {
43
46
  let { rest: t } = f(e), n = t.replace(/[-_]/g, " ").split(" ");
44
47
  return 0 < n.length && (n[0] = n[0].charAt(0).toUpperCase() + n[0].slice(1)), n.join(" ");
45
48
  }
46
49
  // src/shared/utils/path.ts
47
- var te = /* @__PURE__ */ e({
48
- basename: () => h,
49
- dirname: () => g,
50
- extname: () => _,
51
- filestem: () => v,
52
- isContentFile: () => y,
53
- isTypeFile: () => b,
54
- join: () => x,
55
- stripExtension: () => S,
56
- stripPrefix: () => C
50
+ var h = /* @__PURE__ */ e({
51
+ basename: () => g,
52
+ dirname: () => _,
53
+ extname: () => v,
54
+ filestem: () => y,
55
+ isContentFile: () => b,
56
+ isTypeFile: () => x,
57
+ join: () => S,
58
+ stripExtension: () => C,
59
+ stripPrefix: () => w
57
60
  });
58
- function h(e, t) {
59
- let n = w(e).split("/").pop() ?? "";
61
+ function g(e, t) {
62
+ let n = T(e).split("/").pop() ?? "";
60
63
  return t !== void 0 && n.endsWith(t) ? n.slice(0, -t.length) : n;
61
64
  }
62
- function g(e) {
63
- let t = w(e).split("/");
64
- return t.pop(), t.join("/");
65
- }
66
65
  function _(e) {
67
- let t = h(e), n = t.lastIndexOf(".");
68
- return n <= 0 ? "" : t.slice(n);
66
+ let t = T(e).split("/");
67
+ return t.pop(), t.join("/");
69
68
  }
70
69
  function v(e) {
71
- let t = h(e), n = t.lastIndexOf(".");
72
- return n <= 0 ? t : t.slice(0, n);
70
+ let t = g(e), n = t.lastIndexOf(".");
71
+ return n <= 0 ? "" : t.slice(n);
73
72
  }
74
73
  function y(e) {
75
- return i.includes(_(e));
74
+ let t = g(e), n = t.lastIndexOf(".");
75
+ return n <= 0 ? t : t.slice(0, n);
76
76
  }
77
77
  function b(e) {
78
- return y(e) && e.split("/").includes("_types");
78
+ return i.includes(v(e));
79
+ }
80
+ function x(e) {
81
+ return b(e) && e.split("/").includes("_types");
79
82
  }
80
- function x(...e) {
83
+ function S(...e) {
81
84
  return e.filter(Boolean).join("/").replace(/\\+/g, "/").replace(/\/+/g, "/").replace(/\/$/, "") || "/";
82
85
  }
83
- function S(e) {
84
- let t = _(e);
86
+ function C(e) {
87
+ let t = v(e);
85
88
  return t ? e.slice(0, -t.length) : e;
86
89
  }
87
- function C(e, t) {
88
- let n = w(e), r = `/${t}/`, i = n.lastIndexOf(r);
90
+ function w(e, t) {
91
+ let n = T(e), r = `/${t}/`, i = n.lastIndexOf(r);
89
92
  return i === -1 ? n : n.slice(i + r.length);
90
93
  }
91
- function w(e) {
94
+ function T(e) {
92
95
  return e.replace(/\\/g, "/");
93
96
  }
94
97
  // src/shared/utils/url.ts
95
- var ne = 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(","));
96
- function T(e) {
98
+ var E = 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(","));
99
+ function D(e) {
100
+ return e.endsWith("/") ? e : e + "/";
101
+ }
102
+ function O(e) {
97
103
  let t = e.indexOf("#");
98
104
  return 0 <= t ? e.slice(t + 1) : "";
99
105
  }
100
- function E(e) {
101
- return A(e) ? O(e) : e;
106
+ function ne(e) {
107
+ return N(e) ? A(e) : e;
102
108
  }
103
109
  function re(e, t) {
104
110
  return `${e}/${t}`;
105
111
  }
106
- function D(e) {
112
+ function k(e) {
107
113
  return e === "/" ? "/index" : e + "/index";
108
114
  }
109
- function O(e) {
110
- return g(P(e)) || "/";
115
+ function A(e) {
116
+ return _(F(e)) || "/";
111
117
  }
112
- function k(e) {
113
- let t = v(e);
114
- return "/" + x(g(e), t);
118
+ function j(e) {
119
+ let t = y(e);
120
+ return "/" + S(_(e), t);
115
121
  }
116
- function ie(e) {
122
+ function M(e) {
117
123
  return e.split("?")[0].split("#")[0];
118
124
  }
119
- function A(e) {
125
+ function N(e) {
120
126
  return e === "/index" || e.endsWith("/index");
121
127
  }
122
- function j(e, t) {
128
+ function P(e, t) {
123
129
  return t.startsWith(e + "/") || t === e;
124
130
  }
125
- function M(e) {
131
+ function ie(e) {
126
132
  return c.test(e);
127
133
  }
128
- function N(e) {
129
- let t = _(e).slice(1);
130
- return t === "" || !ne.has(t.toLowerCase());
131
- }
132
134
  function ae(e) {
133
- return e === "/" ? "/index" : e;
135
+ let t = v(e).slice(1);
136
+ return t === "" || !E.has(t.toLowerCase());
134
137
  }
135
138
  function oe(e) {
139
+ return e === "/" ? "/index" : e;
140
+ }
141
+ function se(e) {
136
142
  let t = e.indexOf("#");
137
143
  return 0 <= t ? e.slice(0, t) : e;
138
144
  }
139
- function se(e) {
145
+ function ce(e) {
140
146
  return e.replace(/^\//, "");
141
147
  }
142
- function P(e) {
148
+ function F(e) {
143
149
  return e.replace(/\/$/, "") || "/";
144
150
  }
145
151
  // src/shared/utils/content.ts
146
- function ce(e) {
152
+ function le(e) {
147
153
  let t = {
148
154
  name: "",
149
155
  entries: []
@@ -165,18 +171,18 @@ function ce(e) {
165
171
  item: n
166
172
  });
167
173
  }
168
- return B(t), { entries: t.entries };
174
+ return H(t), { entries: t.entries };
169
175
  }
170
- function le(e, t) {
176
+ function ue(e, t) {
171
177
  let n = {};
172
178
  function r(e) {
173
179
  let t = 0;
174
- for (let n of e.entries) n.kind === "file" ? L(n.item.filepath) || t++ : t += r(n.node);
180
+ for (let n of e.entries) n.kind === "file" ? z(n.item.filepath) || t++ : t += r(n.node);
175
181
  return t;
176
182
  }
177
183
  function i(e, t) {
178
- let n = F(e);
179
- return n ? k(n.filepath) : D(`${t}/${e.name}`);
184
+ let n = I(e);
185
+ return n ? j(n.filepath) : k(`${t}/${e.name}`);
180
186
  }
181
187
  function a(e, t) {
182
188
  let n = [];
@@ -187,9 +193,9 @@ function le(e, t) {
187
193
  url: i(a.node, t),
188
194
  count: r(a.node)
189
195
  }
190
- }) : L(a.item.filepath) || n.push({
196
+ }) : z(a.item.filepath) || n.push({
191
197
  kind: "file",
192
- item: V(a.item)
198
+ item: de(a.item)
193
199
  });
194
200
  return n;
195
201
  }
@@ -210,60 +216,60 @@ function le(e, t) {
210
216
  entries: a(e, "")
211
217
  }, o(e, ""), n;
212
218
  }
213
- function F(e) {
214
- for (let t of e.entries) if (t.kind === "file" && L(t.item.filepath)) return t.item;
219
+ function I(e) {
220
+ for (let t of e.entries) if (t.kind === "file" && z(t.item.filepath)) return t.item;
215
221
  }
216
- function ue(e, t) {
217
- let n = h(g(e));
222
+ function L(e, t) {
223
+ let n = g(_(e));
218
224
  return n ? m(n) : t;
219
225
  }
220
- function I(e, t) {
226
+ function R(e, t) {
221
227
  if (t !== void 0) return t;
222
- let n = v(e);
223
- if (L(e)) {
224
- let t = h(g(e));
228
+ let n = y(e);
229
+ if (z(e)) {
230
+ let t = g(_(e));
225
231
  return t ? m(t) : n;
226
232
  }
227
233
  return m(n);
228
234
  }
229
- function L(e) {
230
- return v(e) === r;
235
+ function z(e) {
236
+ return y(e) === r;
231
237
  }
232
- function R(e) {
233
- return e.kind === "dir" ? e.node.name : v(e.item.filepath);
238
+ function B(e) {
239
+ return e.kind === "dir" ? e.node.name : y(e.item.filepath);
234
240
  }
235
- function z(e, ...t) {
241
+ function V(e, ...t) {
236
242
  for (let n of t) {
237
243
  let t = e[n];
238
244
  if (typeof t == "string" && 0 < t.length) return t;
239
245
  }
240
246
  }
241
- function B(e) {
247
+ function H(e) {
242
248
  e.entries.sort((e, t) => {
243
- let n = R(e), r = R(t), i = f(n), a = f(r);
249
+ let n = B(e), r = B(t), i = f(n), a = f(r);
244
250
  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;
245
251
  });
246
- for (let t of e.entries) t.kind === "dir" && B(t.node);
252
+ for (let t of e.entries) t.kind === "dir" && H(t.node);
247
253
  }
248
- function V(e) {
254
+ function de(e) {
249
255
  let t = e.header.tags, n = Array.isArray(t) ? t.filter((e) => typeof e == "string") : [];
250
256
  return {
251
- name: I(e.filepath, e.label),
252
- url: k(e.filepath),
253
- description: z(e.header, "description", "summary") ?? e.excerpt,
257
+ name: R(e.filepath, e.label),
258
+ url: j(e.filepath),
259
+ description: V(e.header, "description", "summary") ?? e.excerpt,
254
260
  tags: 0 < n.length ? n : void 0,
255
- mtime: e.fileMetadata?.mtime,
261
+ mtimeSecs: e.fileMetadata?.mtimeSecs,
256
262
  schema: e.schema
257
263
  };
258
264
  }
259
265
  // src/shared/utils/debounce.ts
260
- function H(e, t) {
266
+ function fe(e, t) {
261
267
  let n;
262
268
  return (...r) => {
263
269
  clearTimeout(n), n = setTimeout(() => e(...r), t);
264
270
  };
265
271
  }
266
- function de(e, t) {
272
+ function pe(e, t) {
267
273
  let n = 0, r;
268
274
  return (...i) => {
269
275
  let a = Date.now();
@@ -273,7 +279,7 @@ function de(e, t) {
273
279
  };
274
280
  }
275
281
  // src/shared/utils/field.ts
276
- function fe(e) {
282
+ function me(e) {
277
283
  return e.startsWith("_");
278
284
  }
279
285
  // src/shared/utils/html.ts
@@ -376,21 +382,21 @@ var U = /* @__PURE__ */ t((/* @__PURE__ */ n(((e, t, n) => {
376
382
  }) : typeof t == "object" && t.exports ? t.exports = c : e.striptags = c;
377
383
  })(n);
378
384
  })))(), 1);
379
- function pe(e) {
385
+ function he(e) {
380
386
  return e.replaceAll("&", "&amp;").replaceAll("\"", "&quot;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
381
387
  }
382
- function me(e) {
388
+ function ge(e) {
383
389
  return W((0, U.default)(e)).replace(/\s+/g, " ").trim();
384
390
  }
385
- 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(".");
386
- function ge(e) {
387
- return e === void 0 ? "" : (0, U.default)(e, he);
391
+ var _e = /* @__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(".");
392
+ function ve(e) {
393
+ return e === void 0 ? "" : (0, U.default)(e, _e);
388
394
  }
389
395
  function W(e) {
390
396
  return e.replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&quot;", "\"").replaceAll("&#39;", "'").replaceAll("&amp;", "&");
391
397
  }
392
398
  // src/shared/utils/regex.ts
393
- function _e(e) {
399
+ function ye(e) {
394
400
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
395
401
  }
396
402
  // src/shared/utils/time.ts
@@ -402,7 +408,7 @@ function Q(e) {
402
408
  day: "numeric"
403
409
  });
404
410
  }
405
- function ve(e, t) {
411
+ function be(e, t) {
406
412
  return typeof window > "u" ? "" : Math.floor(Date.now() / 1e3) - e < Z ? `${t} ${$(e)}` : `${t} at ${Q(e)}`;
407
413
  }
408
414
  function $(e) {
@@ -410,19 +416,19 @@ function $(e) {
410
416
  let t = Math.floor(Date.now() / 1e3) - e;
411
417
  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`;
412
418
  }
413
- var ye = new Intl.DateTimeFormat("en-US", {
419
+ var xe = new Intl.DateTimeFormat("en-US", {
414
420
  year: "numeric",
415
421
  month: "short",
416
422
  day: "numeric"
417
423
  });
418
- function be(e) {
424
+ function Se(e) {
419
425
  let t = new Date(e);
420
- return Number.isNaN(t.getTime()) ? e : ye.format(t);
426
+ return Number.isNaN(t.getTime()) ? e : xe.format(t);
421
427
  }
422
- function xe(e) {
428
+ function Ce(e) {
423
429
  return new Date(e).toISOString().slice(0, 10);
424
430
  }
425
- function Se(e) {
431
+ function we(e) {
426
432
  return Math.floor(Date.now() / 1e3) - e < Z ? $(e) : Q(e);
427
433
  }
428
- export { r as $, M as A, te as B, re as C, ie as D, k as E, P as F, p as G, C as H, h as I, l as J, ee as K, _ as L, ae as M, oe as N, A as O, se as P, a as Q, y as R, E as S, O as T, d as U, S as V, f as W, c as X, u as Y, i as Z, F as _, $ as a, L as b, pe as c, W as d, o as et, fe as f, le as g, ce as h, xe as i, N as j, j as k, ge as l, de as m, be as n, Se as o, H as p, m as q, ve as r, _e as s, Q as t, s as tt, me as u, ue as v, D as w, T as x, I as y, b as z };
434
+ export { i as $, P as A, x as B, ne as C, j as D, A as E, ce as F, f as G, C as H, F as I, te as J, p as K, g as L, ae as M, oe as N, M as O, se as P, c as Q, v as R, O as S, k as T, w as U, h as V, d as W, l as X, m as Y, u as Z, I as _, $ as a, z as b, he as c, W as d, a as et, me as f, ue as g, le as h, Ce as i, ie as j, N as k, ve as l, pe as m, Se as n, o as nt, we as o, fe as p, ee as q, be as r, s as rt, ye as s, Q as t, r as tt, ge as u, L as v, re as w, D as x, R as y, b as z };
package/dist/shared.js CHANGED
@@ -1 +1 @@
1
- export { Z as CONTENT_EXTENSIONS, Q as CONTENT_GLOB, X as EXTERNAL_URL_RE, $ as INDEX_FILENAME, et as SEARCH_FIELDS, tt as SEARCH_STORE_FIELDS, h as buildContentTree, g as buildDirectoryListingMap, p as debounce, c as escapeHtml, s as escapeRegex, t as formatAbsoluteTime, n as formatDateString, r as formatEditTime, i as formatIsoDate, a as formatRelativeTime, o as formatTime, x as getAnchor, S as getDirectoryFromPageUrl, C as getDirectoryUrl, w as getIndexUrl, _ as getNodeIndexItem, T as getParentUrl, E as getTdContentUrl, v as getTdIndexTitle, y as getTdResourceTitle, D as getUrlPath, f as isBuiltinField, b as isIndexFile, O as isIndexUrl, J as isOptional, k as isUrlAncestorOf, A as isUrlExternal, j as isUrlToPage, U as kebabToPascal, Y as makeOptional, W as parseNumericPrefix, G as pascalToKebab, B as path, M as resolveRootUrl, l as sanitizeInlineHtml, K as snakeToKebab, N as stripAnchor, u as stripHtml, P as stripLeadingSlash, F as stripTrailingSlash, m as throttle, d as unescapeHtml, q as unslugify } from "./shared-tntT6SIH.js";
1
+ export { $ as CONTENT_EXTENSIONS, et as CONTENT_GLOB, Q as EXTERNAL_URL_RE, tt as INDEX_FILENAME, nt as SEARCH_FIELDS, rt as SEARCH_STORE_FIELDS, h as buildContentTree, g as buildDirectoryListingMap, p as debounce, x as ensureTrailingSlash, c as escapeHtml, s as escapeRegex, t as formatAbsoluteTime, n as formatDateString, r as formatEditTime, i as formatIsoDate, a as formatRelativeTime, o as formatTime, S as getAnchor, C as getDirectoryFromPageUrl, w as getDirectoryUrl, T as getIndexUrl, _ as getNodeIndexItem, E as getParentUrl, D as getTdContentUrl, v as getTdIndexTitle, y as getTdResourceTitle, O as getUrlPath, f as isBuiltinField, b as isIndexFile, k as isIndexUrl, X as isOptional, A as isUrlAncestorOf, j as isUrlExternal, M as isUrlToPage, W as kebabToPascal, Z as makeOptional, G as parseNumericPrefix, K as pascalToKebab, V as path, N as resolveRootUrl, l as sanitizeInlineHtml, q as snakeToKebab, P as stripAnchor, u as stripHtml, F as stripLeadingSlash, I as stripTrailingSlash, m as throttle, J as truncate, d as unescapeHtml, Y as unslugify } from "./shared-BK7uzYmy.js";