typerighter 0.55.0 → 0.55.2
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.
- package/dist/{app-Dj09xvlJ.js → app-C1ognrj1.js} +37 -37
- package/dist/{cli-qdkrcgUe.js → cli-CptK1Fy8.js} +5 -5
- package/dist/cli.js +1 -1
- package/dist/client/theme-default.js +218 -218
- package/dist/client.js +1 -1
- package/dist/index.js +2 -2
- package/dist/{init-CqTfzJfC.js → init-D8IGJCaj.js} +1 -1
- package/dist/node/build/prerender.d.ts +2 -2
- package/dist/node/build/prerender.d.ts.map +1 -1
- package/dist/node/build/seo/feed.d.ts +1 -1
- package/dist/node/build/seo/feed.d.ts.map +1 -1
- package/dist/node/build/seo/index.d.ts +4 -4
- package/dist/node/build/seo/index.d.ts.map +1 -1
- package/dist/node/build/seo/jsonld.d.ts +15 -2
- package/dist/node/build/seo/jsonld.d.ts.map +1 -1
- package/dist/node/build/seo/page.d.ts +16 -5
- package/dist/node/build/seo/page.d.ts.map +1 -1
- package/dist/node/build/seo/sitemap.d.ts +2 -2
- package/dist/node/build/seo/sitemap.d.ts.map +1 -1
- package/dist/node/lib/html-template.d.ts +3 -0
- package/dist/node/lib/html-template.d.ts.map +1 -1
- package/dist/node/lib/render/vue.d.ts.map +1 -1
- package/dist/page-CRsjLGU-.js +114 -0
- package/dist/prerenderWorker.js +31 -32
- package/dist/{renderMath-cPd-YSsZ.js → renderMath-CJKXI63h.js} +1 -1
- package/dist/shared/types/content.d.ts +3 -3
- package/dist/shared/types/content.d.ts.map +1 -1
- package/dist/shared/types/ssg.d.ts +3 -0
- package/dist/shared/types/ssg.d.ts.map +1 -1
- package/dist/shared/utils/format.d.ts +1 -0
- package/dist/shared/utils/format.d.ts.map +1 -1
- package/dist/shared/utils/url.d.ts +1 -0
- package/dist/shared/utils/url.d.ts.map +1 -1
- package/dist/{shared-tntT6SIH.js → shared-BK7uzYmy.js} +100 -94
- package/dist/shared.js +1 -1
- package/dist/typerighter.css +1 -1
- package/dist/{vite-C6g7N9dI.js → vite-UR3fMhaK.js} +489 -488
- package/dist/vite.js +1 -1
- package/package.json +3 -3
- 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
|
|
48
|
-
basename: () =>
|
|
49
|
-
dirname: () =>
|
|
50
|
-
extname: () =>
|
|
51
|
-
filestem: () =>
|
|
52
|
-
isContentFile: () =>
|
|
53
|
-
isTypeFile: () =>
|
|
54
|
-
join: () =>
|
|
55
|
-
stripExtension: () =>
|
|
56
|
-
stripPrefix: () =>
|
|
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
|
|
59
|
-
let n =
|
|
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 =
|
|
68
|
-
return
|
|
66
|
+
let t = T(e).split("/");
|
|
67
|
+
return t.pop(), t.join("/");
|
|
69
68
|
}
|
|
70
69
|
function v(e) {
|
|
71
|
-
let t =
|
|
72
|
-
return n <= 0 ?
|
|
70
|
+
let t = g(e), n = t.lastIndexOf(".");
|
|
71
|
+
return n <= 0 ? "" : t.slice(n);
|
|
73
72
|
}
|
|
74
73
|
function y(e) {
|
|
75
|
-
|
|
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
|
|
78
|
+
return i.includes(v(e));
|
|
79
|
+
}
|
|
80
|
+
function x(e) {
|
|
81
|
+
return b(e) && e.split("/").includes("_types");
|
|
79
82
|
}
|
|
80
|
-
function
|
|
83
|
+
function S(...e) {
|
|
81
84
|
return e.filter(Boolean).join("/").replace(/\\+/g, "/").replace(/\/+/g, "/").replace(/\/$/, "") || "/";
|
|
82
85
|
}
|
|
83
|
-
function
|
|
84
|
-
let t =
|
|
86
|
+
function C(e) {
|
|
87
|
+
let t = v(e);
|
|
85
88
|
return t ? e.slice(0, -t.length) : e;
|
|
86
89
|
}
|
|
87
|
-
function
|
|
88
|
-
let n =
|
|
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
|
|
94
|
+
function T(e) {
|
|
92
95
|
return e.replace(/\\/g, "/");
|
|
93
96
|
}
|
|
94
97
|
// src/shared/utils/url.ts
|
|
95
|
-
var
|
|
96
|
-
function
|
|
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
|
|
101
|
-
return
|
|
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
|
|
112
|
+
function k(e) {
|
|
107
113
|
return e === "/" ? "/index" : e + "/index";
|
|
108
114
|
}
|
|
109
|
-
function
|
|
110
|
-
return
|
|
115
|
+
function A(e) {
|
|
116
|
+
return _(F(e)) || "/";
|
|
111
117
|
}
|
|
112
|
-
function
|
|
113
|
-
let t =
|
|
114
|
-
return "/" +
|
|
118
|
+
function j(e) {
|
|
119
|
+
let t = y(e);
|
|
120
|
+
return "/" + S(_(e), t);
|
|
115
121
|
}
|
|
116
|
-
function
|
|
122
|
+
function M(e) {
|
|
117
123
|
return e.split("?")[0].split("#")[0];
|
|
118
124
|
}
|
|
119
|
-
function
|
|
125
|
+
function N(e) {
|
|
120
126
|
return e === "/index" || e.endsWith("/index");
|
|
121
127
|
}
|
|
122
|
-
function
|
|
128
|
+
function P(e, t) {
|
|
123
129
|
return t.startsWith(e + "/") || t === e;
|
|
124
130
|
}
|
|
125
|
-
function
|
|
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
|
-
|
|
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
|
|
145
|
+
function ce(e) {
|
|
140
146
|
return e.replace(/^\//, "");
|
|
141
147
|
}
|
|
142
|
-
function
|
|
148
|
+
function F(e) {
|
|
143
149
|
return e.replace(/\/$/, "") || "/";
|
|
144
150
|
}
|
|
145
151
|
// src/shared/utils/content.ts
|
|
146
|
-
function
|
|
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
|
|
174
|
+
return H(t), { entries: t.entries };
|
|
169
175
|
}
|
|
170
|
-
function
|
|
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" ?
|
|
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 =
|
|
179
|
-
return n ?
|
|
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
|
-
}) :
|
|
196
|
+
}) : z(a.item.filepath) || n.push({
|
|
191
197
|
kind: "file",
|
|
192
|
-
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
|
|
214
|
-
for (let t of e.entries) if (t.kind === "file" &&
|
|
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
|
|
217
|
-
let n =
|
|
222
|
+
function L(e, t) {
|
|
223
|
+
let n = g(_(e));
|
|
218
224
|
return n ? m(n) : t;
|
|
219
225
|
}
|
|
220
|
-
function
|
|
226
|
+
function R(e, t) {
|
|
221
227
|
if (t !== void 0) return t;
|
|
222
|
-
let n =
|
|
223
|
-
if (
|
|
224
|
-
let t =
|
|
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
|
|
230
|
-
return
|
|
235
|
+
function z(e) {
|
|
236
|
+
return y(e) === r;
|
|
231
237
|
}
|
|
232
|
-
function
|
|
233
|
-
return e.kind === "dir" ? e.node.name :
|
|
238
|
+
function B(e) {
|
|
239
|
+
return e.kind === "dir" ? e.node.name : y(e.item.filepath);
|
|
234
240
|
}
|
|
235
|
-
function
|
|
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
|
|
247
|
+
function H(e) {
|
|
242
248
|
e.entries.sort((e, t) => {
|
|
243
|
-
let n =
|
|
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" &&
|
|
252
|
+
for (let t of e.entries) t.kind === "dir" && H(t.node);
|
|
247
253
|
}
|
|
248
|
-
function
|
|
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:
|
|
252
|
-
url:
|
|
253
|
-
description:
|
|
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
|
-
|
|
261
|
+
mtimeSecs: e.fileMetadata?.mtimeSecs,
|
|
256
262
|
schema: e.schema
|
|
257
263
|
};
|
|
258
264
|
}
|
|
259
265
|
// src/shared/utils/debounce.ts
|
|
260
|
-
function
|
|
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
|
|
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
|
|
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
|
|
385
|
+
function he(e) {
|
|
380
386
|
return e.replaceAll("&", "&").replaceAll("\"", """).replaceAll("<", "<").replaceAll(">", ">");
|
|
381
387
|
}
|
|
382
|
-
function
|
|
388
|
+
function ge(e) {
|
|
383
389
|
return W((0, U.default)(e)).replace(/\s+/g, " ").trim();
|
|
384
390
|
}
|
|
385
|
-
var
|
|
386
|
-
function
|
|
387
|
-
return e === void 0 ? "" : (0, U.default)(e,
|
|
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("<", "<").replaceAll(">", ">").replaceAll(""", "\"").replaceAll("'", "'").replaceAll("&", "&");
|
|
391
397
|
}
|
|
392
398
|
// src/shared/utils/regex.ts
|
|
393
|
-
function
|
|
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
|
|
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
|
|
419
|
+
var xe = new Intl.DateTimeFormat("en-US", {
|
|
414
420
|
year: "numeric",
|
|
415
421
|
month: "short",
|
|
416
422
|
day: "numeric"
|
|
417
423
|
});
|
|
418
|
-
function
|
|
424
|
+
function Se(e) {
|
|
419
425
|
let t = new Date(e);
|
|
420
|
-
return Number.isNaN(t.getTime()) ? e :
|
|
426
|
+
return Number.isNaN(t.getTime()) ? e : xe.format(t);
|
|
421
427
|
}
|
|
422
|
-
function
|
|
428
|
+
function Ce(e) {
|
|
423
429
|
return new Date(e).toISOString().slice(0, 10);
|
|
424
430
|
}
|
|
425
|
-
function
|
|
431
|
+
function we(e) {
|
|
426
432
|
return Math.floor(Date.now() / 1e3) - e < Z ? $(e) : Q(e);
|
|
427
433
|
}
|
|
428
|
-
export {
|
|
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 {
|
|
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";
|