typerighter 0.39.0 → 0.40.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-N-phWAP_.js → app-GI_8rzn8.js} +69 -68
- package/dist/{cli-DVQB43sa.js → cli-CNSEVT0i.js} +5 -5
- package/dist/cli.js +1 -1
- package/dist/client/app/index.d.ts +8 -0
- package/dist/client/app/index.d.ts.map +1 -1
- package/dist/client/theme-default.js +174 -174
- package/dist/client.js +1 -1
- package/dist/index.js +2 -2
- package/dist/{init-pLTVuBAf.js → init-BplW2rUB.js} +7 -4
- package/dist/jsonld-Dxk0xvAr.js +84 -0
- package/dist/node/build/index.d.ts.map +1 -1
- package/dist/node/build/prerender.d.ts +9 -0
- package/dist/node/build/prerender.d.ts.map +1 -1
- package/dist/node/build/seo/feed.d.ts +3 -0
- package/dist/node/build/seo/feed.d.ts.map +1 -0
- package/dist/node/build/seo/index.d.ts +5 -0
- package/dist/node/build/seo/index.d.ts.map +1 -0
- package/dist/node/build/seo/jsonld.d.ts +10 -0
- package/dist/node/build/seo/jsonld.d.ts.map +1 -0
- package/dist/node/build/seo/page.d.ts +6 -0
- package/dist/node/build/seo/page.d.ts.map +1 -0
- package/dist/node/build/seo/sitemap.d.ts +3 -0
- package/dist/node/build/seo/sitemap.d.ts.map +1 -0
- package/dist/node/lib/htmlTemplate.d.ts +30 -0
- package/dist/node/lib/htmlTemplate.d.ts.map +1 -0
- package/dist/node/lib/render/vue.d.ts.map +1 -1
- package/dist/node/plugin/vite/virtual/app.d.ts +2 -0
- package/dist/node/plugin/vite/virtual/app.d.ts.map +1 -1
- package/dist/prerenderWorker.js +32 -20
- package/dist/shared/types/ssg.d.ts +6 -0
- package/dist/shared/types/ssg.d.ts.map +1 -1
- package/dist/shared/utils/time.d.ts +1 -0
- package/dist/shared/utils/time.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-Lh4FwI36.js → shared-LPNgvigl.js} +47 -41
- package/dist/shared.js +2 -2
- package/dist/{vite-XB1qqgp7.js → vite-D6x3T--t.js} +462 -391
- package/dist/vite.js +1 -1
- package/package.json +7 -7
- package/dist/html-template-S2xsTyW5.js +0 -42
- package/dist/node/lib/html-template.d.ts +0 -22
- package/dist/node/lib/html-template.d.ts.map +0 -1
|
@@ -74,7 +74,7 @@ function te(e) {
|
|
|
74
74
|
return 0 <= t ? e.slice(t + 1) : "";
|
|
75
75
|
}
|
|
76
76
|
function ne(e) {
|
|
77
|
-
return
|
|
77
|
+
return T(e) ? C(e) : e;
|
|
78
78
|
}
|
|
79
79
|
function re(e, t) {
|
|
80
80
|
return `${e}/${t}`;
|
|
@@ -83,25 +83,25 @@ function S(e) {
|
|
|
83
83
|
return e === "/" ? "/index" : e + "/index";
|
|
84
84
|
}
|
|
85
85
|
function C(e) {
|
|
86
|
-
return p(
|
|
86
|
+
return p(A(e)) || "/";
|
|
87
87
|
}
|
|
88
88
|
function w(e) {
|
|
89
89
|
let t = h(e);
|
|
90
90
|
return "/" + v(p(e), t);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function ie(e) {
|
|
93
93
|
return e.split("?")[0].split("#")[0];
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function T(e) {
|
|
96
96
|
return e === "/index" || e.endsWith("/index");
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function ae(e, t) {
|
|
99
99
|
return t.startsWith(e + "/") || t === e;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function oe(e) {
|
|
102
102
|
return c.test(e);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function E(e) {
|
|
105
105
|
let t = m(e).slice(1);
|
|
106
106
|
return t === "" || !ee.has(t.toLowerCase());
|
|
107
107
|
}
|
|
@@ -113,6 +113,9 @@ function O(e) {
|
|
|
113
113
|
return 0 <= t ? e.slice(0, t) : e;
|
|
114
114
|
}
|
|
115
115
|
function k(e) {
|
|
116
|
+
return e.replace(/^\//, "");
|
|
117
|
+
}
|
|
118
|
+
function A(e) {
|
|
116
119
|
return e.replace(/\/$/, "") || "/";
|
|
117
120
|
}
|
|
118
121
|
//#endregion
|
|
@@ -139,17 +142,17 @@ function se(e) {
|
|
|
139
142
|
item: n
|
|
140
143
|
});
|
|
141
144
|
}
|
|
142
|
-
return
|
|
145
|
+
return I(t), { entries: t.entries };
|
|
143
146
|
}
|
|
144
147
|
function ce(e, t) {
|
|
145
148
|
let n = {};
|
|
146
149
|
function r(e) {
|
|
147
150
|
let t = 0;
|
|
148
|
-
for (let n of e.entries) n.kind === "file" ?
|
|
151
|
+
for (let n of e.entries) n.kind === "file" ? N(n.item.filepath) || t++ : t += r(n.node);
|
|
149
152
|
return t;
|
|
150
153
|
}
|
|
151
154
|
function i(e, t) {
|
|
152
|
-
let n =
|
|
155
|
+
let n = j(e);
|
|
153
156
|
return n ? w(n.filepath) : S(`${t}/${e.name}`);
|
|
154
157
|
}
|
|
155
158
|
function a(e, t) {
|
|
@@ -161,9 +164,9 @@ function ce(e, t) {
|
|
|
161
164
|
url: i(a.node, t),
|
|
162
165
|
count: r(a.node)
|
|
163
166
|
}
|
|
164
|
-
}) :
|
|
167
|
+
}) : N(a.item.filepath) || n.push({
|
|
165
168
|
kind: "file",
|
|
166
|
-
item:
|
|
169
|
+
item: L(a.item)
|
|
167
170
|
});
|
|
168
171
|
return n;
|
|
169
172
|
}
|
|
@@ -184,47 +187,47 @@ function ce(e, t) {
|
|
|
184
187
|
entries: a(e, "")
|
|
185
188
|
}, o(e, ""), n;
|
|
186
189
|
}
|
|
187
|
-
function
|
|
188
|
-
for (let t of e.entries) if (t.kind === "file" &&
|
|
190
|
+
function j(e) {
|
|
191
|
+
for (let t of e.entries) if (t.kind === "file" && N(t.item.filepath)) return t.item;
|
|
189
192
|
}
|
|
190
193
|
function le(e, t) {
|
|
191
194
|
let n = f(p(e));
|
|
192
195
|
return n ? u(n) : t;
|
|
193
196
|
}
|
|
194
|
-
function
|
|
197
|
+
function M(e, t) {
|
|
195
198
|
if (t !== void 0) return t;
|
|
196
199
|
let n = h(e);
|
|
197
|
-
if (
|
|
200
|
+
if (N(e)) {
|
|
198
201
|
let t = f(p(e));
|
|
199
202
|
return t ? u(t) : n;
|
|
200
203
|
}
|
|
201
204
|
return u(n);
|
|
202
205
|
}
|
|
203
|
-
function
|
|
206
|
+
function N(e) {
|
|
204
207
|
return h(e) === r;
|
|
205
208
|
}
|
|
206
|
-
function
|
|
209
|
+
function P(e) {
|
|
207
210
|
return e.kind === "dir" ? e.node.name : h(e.item.filepath);
|
|
208
211
|
}
|
|
209
|
-
function
|
|
212
|
+
function F(e, ...t) {
|
|
210
213
|
for (let n of t) {
|
|
211
214
|
let t = e[n];
|
|
212
215
|
if (typeof t == "string" && 0 < t.length) return t;
|
|
213
216
|
}
|
|
214
217
|
}
|
|
215
|
-
function
|
|
218
|
+
function I(e) {
|
|
216
219
|
e.entries.sort((e, t) => {
|
|
217
|
-
let n =
|
|
220
|
+
let n = P(e), r = P(t), i = l(n), a = l(r);
|
|
218
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;
|
|
219
222
|
});
|
|
220
|
-
for (let t of e.entries) t.kind === "dir" &&
|
|
223
|
+
for (let t of e.entries) t.kind === "dir" && I(t.node);
|
|
221
224
|
}
|
|
222
|
-
function
|
|
225
|
+
function L(e) {
|
|
223
226
|
let t = e.header.tags, n = Array.isArray(t) ? t.filter((e) => typeof e == "string") : [];
|
|
224
227
|
return {
|
|
225
|
-
name:
|
|
228
|
+
name: M(e.filepath, e.label),
|
|
226
229
|
url: w(e.filepath),
|
|
227
|
-
description:
|
|
230
|
+
description: F(e.header, "description", "summary") ?? e.excerpt,
|
|
228
231
|
tags: 0 < n.length ? n : void 0,
|
|
229
232
|
mtime: e.metadata?.mtime,
|
|
230
233
|
schema: e.schema
|
|
@@ -232,7 +235,7 @@ function I(e) {
|
|
|
232
235
|
}
|
|
233
236
|
//#endregion
|
|
234
237
|
//#region src/shared/utils/debounce.ts
|
|
235
|
-
function
|
|
238
|
+
function R(e, t) {
|
|
236
239
|
let n;
|
|
237
240
|
return (...r) => {
|
|
238
241
|
clearTimeout(n), n = setTimeout(() => e(...r), t);
|
|
@@ -240,12 +243,12 @@ function L(e, t) {
|
|
|
240
243
|
}
|
|
241
244
|
//#endregion
|
|
242
245
|
//#region src/shared/utils/field.ts
|
|
243
|
-
function
|
|
246
|
+
function z(e) {
|
|
244
247
|
return e.startsWith("_");
|
|
245
248
|
}
|
|
246
249
|
//#endregion
|
|
247
250
|
//#region src/shared/utils/html.ts
|
|
248
|
-
var
|
|
251
|
+
var B = /* @__PURE__ */ t((/* @__PURE__ */ n(((e, t) => {
|
|
249
252
|
(function(e) {
|
|
250
253
|
if (typeof n != "function") {
|
|
251
254
|
var n = function(e) {
|
|
@@ -344,22 +347,22 @@ var z = /* @__PURE__ */ t((/* @__PURE__ */ n(((e, t) => {
|
|
|
344
347
|
}) : typeof t == "object" && t.exports ? t.exports = c : e.striptags = c;
|
|
345
348
|
})(e);
|
|
346
349
|
})))(), 1);
|
|
347
|
-
function
|
|
350
|
+
function V(e) {
|
|
348
351
|
return e.replaceAll("&", "&").replaceAll("\"", """).replaceAll("<", "<").replaceAll(">", ">");
|
|
349
352
|
}
|
|
350
|
-
function
|
|
351
|
-
return W((0,
|
|
353
|
+
function H(e) {
|
|
354
|
+
return W((0, B.default)(e)).replace(/\s+/g, " ").trim();
|
|
352
355
|
}
|
|
353
|
-
var
|
|
354
|
-
function
|
|
355
|
-
return e === void 0 ? "" : (0,
|
|
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);
|
|
356
359
|
}
|
|
357
360
|
function W(e) {
|
|
358
361
|
return e.replaceAll("<", "<").replaceAll(">", ">").replaceAll(""", "\"").replaceAll("'", "'").replaceAll("&", "&");
|
|
359
362
|
}
|
|
360
363
|
//#endregion
|
|
361
364
|
//#region src/shared/utils/regex.ts
|
|
362
|
-
function
|
|
365
|
+
function de(e) {
|
|
363
366
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
364
367
|
}
|
|
365
368
|
//#endregion
|
|
@@ -372,7 +375,7 @@ function Q(e) {
|
|
|
372
375
|
day: "numeric"
|
|
373
376
|
});
|
|
374
377
|
}
|
|
375
|
-
function
|
|
378
|
+
function fe(e, t) {
|
|
376
379
|
return typeof window > "u" ? "" : Math.floor(Date.now() / 1e3) - e < Z ? `${t} ${$(e)}` : `${t} at ${Q(e)}`;
|
|
377
380
|
}
|
|
378
381
|
function $(e) {
|
|
@@ -380,17 +383,20 @@ function $(e) {
|
|
|
380
383
|
let t = Math.floor(Date.now() / 1e3) - e;
|
|
381
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`;
|
|
382
385
|
}
|
|
383
|
-
var
|
|
386
|
+
var pe = new Intl.DateTimeFormat("en-US", {
|
|
384
387
|
year: "numeric",
|
|
385
388
|
month: "short",
|
|
386
389
|
day: "numeric"
|
|
387
390
|
});
|
|
388
|
-
function
|
|
391
|
+
function me(e) {
|
|
389
392
|
let t = new Date(e);
|
|
390
|
-
return Number.isNaN(t.getTime()) ? e :
|
|
393
|
+
return Number.isNaN(t.getTime()) ? e : pe.format(t);
|
|
391
394
|
}
|
|
392
|
-
function
|
|
395
|
+
function he(e) {
|
|
396
|
+
return new Date(e).toISOString().slice(0, 10);
|
|
397
|
+
}
|
|
398
|
+
function ge(e) {
|
|
393
399
|
return Math.floor(Date.now() / 1e3) - e < Z ? $(e) : Q(e);
|
|
394
400
|
}
|
|
395
401
|
//#endregion
|
|
396
|
-
export {
|
|
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,
|
|
2
|
-
export {
|
|
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 };
|