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.
- package/dist/{app-Bnln5XCo.js → app-GI_8rzn8.js} +339 -338
- package/dist/{cli-DEOw0tox.js → cli-CPY9dpTQ.js} +28 -26
- 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/context-CNTdcpo4.js +192 -0
- package/dist/index.js +3 -3
- package/dist/{init-BhEVxNbG.js → init-YypOGdjI.js} +9 -6
- package/dist/jsonld-e_0GNJdS.js +84 -0
- package/dist/node/build/index.d.ts.map +1 -1
- package/dist/node/build/prerender.d.ts +21 -0
- package/dist/node/build/prerender.d.ts.map +1 -1
- package/dist/node/build/prerenderWorker.d.ts +2 -0
- package/dist/node/build/prerenderWorker.d.ts.map +1 -0
- 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/cli/index.d.ts.map +1 -1
- 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/lib/worker-pool/index.d.ts +21 -0
- package/dist/node/lib/worker-pool/index.d.ts.map +1 -0
- 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 +39 -0
- package/dist/rolldown-runtime-B0aSnxlc.js +20 -0
- package/dist/shared/constants.d.ts.map +1 -1
- 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-l3GF0JOc.js → shared-LPNgvigl.js} +111 -120
- package/dist/shared.js +2 -2
- package/dist/{vite-DACnySpv.js → vite-Djs3IU9Y.js} +508 -587
- package/dist/vite.js +1 -1
- package/package.json +7 -7
- package/dist/node/lib/html-template.d.ts +0 -22
- 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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
|
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
|
|
32
|
-
let { rest: t } =
|
|
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
|
|
38
|
-
basename: () =>
|
|
39
|
-
dirname: () =>
|
|
40
|
-
extname: () =>
|
|
41
|
-
filestem: () =>
|
|
42
|
-
isContentFile: () =>
|
|
43
|
-
isTypeFile: () =>
|
|
44
|
-
join: () =>
|
|
45
|
-
stripExtension: () =>
|
|
46
|
-
stripPrefix: () =>
|
|
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
|
|
49
|
-
let n =
|
|
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
|
|
53
|
-
let t =
|
|
37
|
+
function p(e) {
|
|
38
|
+
let t = x(e).split("/");
|
|
54
39
|
return t.pop(), t.join("/");
|
|
55
40
|
}
|
|
56
|
-
function
|
|
57
|
-
let t =
|
|
41
|
+
function m(e) {
|
|
42
|
+
let t = f(e), n = t.lastIndexOf(".");
|
|
58
43
|
return n <= 0 ? "" : t.slice(n);
|
|
59
44
|
}
|
|
60
|
-
function
|
|
61
|
-
let t =
|
|
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
|
|
65
|
-
return
|
|
49
|
+
function g(e) {
|
|
50
|
+
return i.includes(m(e));
|
|
66
51
|
}
|
|
67
|
-
function
|
|
68
|
-
return
|
|
52
|
+
function _(e) {
|
|
53
|
+
return g(e) && e.split("/").includes("_types");
|
|
69
54
|
}
|
|
70
|
-
function
|
|
55
|
+
function v(...e) {
|
|
71
56
|
return e.filter(Boolean).join("/").replace(/\\+/g, "/").replace(/\/+/g, "/").replace(/\/$/, "") || "/";
|
|
72
57
|
}
|
|
73
|
-
function
|
|
74
|
-
let t =
|
|
58
|
+
function y(e) {
|
|
59
|
+
let t = m(e);
|
|
75
60
|
return t ? e.slice(0, -t.length) : e;
|
|
76
61
|
}
|
|
77
|
-
function
|
|
78
|
-
let n =
|
|
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
|
|
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
|
|
87
|
-
function
|
|
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
|
|
92
|
-
return
|
|
76
|
+
function ne(e) {
|
|
77
|
+
return T(e) ? C(e) : e;
|
|
93
78
|
}
|
|
94
|
-
function
|
|
79
|
+
function re(e, t) {
|
|
95
80
|
return `${e}/${t}`;
|
|
96
81
|
}
|
|
97
|
-
function
|
|
82
|
+
function S(e) {
|
|
98
83
|
return e === "/" ? "/index" : e + "/index";
|
|
99
84
|
}
|
|
100
|
-
function
|
|
101
|
-
return
|
|
85
|
+
function C(e) {
|
|
86
|
+
return p(A(e)) || "/";
|
|
102
87
|
}
|
|
103
|
-
function
|
|
104
|
-
let t =
|
|
105
|
-
return "/" +
|
|
88
|
+
function w(e) {
|
|
89
|
+
let t = h(e);
|
|
90
|
+
return "/" + v(p(e), t);
|
|
106
91
|
}
|
|
107
|
-
function
|
|
92
|
+
function ie(e) {
|
|
108
93
|
return e.split("?")[0].split("#")[0];
|
|
109
94
|
}
|
|
110
|
-
function
|
|
95
|
+
function T(e) {
|
|
111
96
|
return e === "/index" || e.endsWith("/index");
|
|
112
97
|
}
|
|
113
|
-
function
|
|
98
|
+
function ae(e, t) {
|
|
114
99
|
return t.startsWith(e + "/") || t === e;
|
|
115
100
|
}
|
|
116
|
-
function
|
|
117
|
-
return
|
|
101
|
+
function oe(e) {
|
|
102
|
+
return c.test(e);
|
|
118
103
|
}
|
|
119
|
-
function
|
|
120
|
-
let t =
|
|
121
|
-
return t === "" || !
|
|
104
|
+
function E(e) {
|
|
105
|
+
let t = m(e).slice(1);
|
|
106
|
+
return t === "" || !ee.has(t.toLowerCase());
|
|
122
107
|
}
|
|
123
|
-
function
|
|
108
|
+
function D(e) {
|
|
124
109
|
return e === "/" ? "/index" : e;
|
|
125
110
|
}
|
|
126
|
-
function
|
|
111
|
+
function O(e) {
|
|
127
112
|
let t = e.indexOf("#");
|
|
128
113
|
return 0 <= t ? e.slice(0, t) : e;
|
|
129
114
|
}
|
|
130
|
-
function
|
|
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
|
|
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
|
|
145
|
+
return I(t), { entries: t.entries };
|
|
158
146
|
}
|
|
159
|
-
function
|
|
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" ?
|
|
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 =
|
|
168
|
-
return n ?
|
|
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:
|
|
163
|
+
name: u(a.node.name),
|
|
176
164
|
url: i(a.node, t),
|
|
177
165
|
count: r(a.node)
|
|
178
166
|
}
|
|
179
|
-
}) :
|
|
167
|
+
}) : N(a.item.filepath) || n.push({
|
|
180
168
|
kind: "file",
|
|
181
|
-
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:
|
|
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
|
|
203
|
-
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;
|
|
204
192
|
}
|
|
205
|
-
function
|
|
206
|
-
let n =
|
|
207
|
-
return n ?
|
|
193
|
+
function le(e, t) {
|
|
194
|
+
let n = f(p(e));
|
|
195
|
+
return n ? u(n) : t;
|
|
208
196
|
}
|
|
209
|
-
function
|
|
197
|
+
function M(e, t) {
|
|
210
198
|
if (t !== void 0) return t;
|
|
211
|
-
let n =
|
|
212
|
-
if (
|
|
213
|
-
let t =
|
|
214
|
-
return t ?
|
|
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
|
|
204
|
+
return u(n);
|
|
217
205
|
}
|
|
218
|
-
function
|
|
219
|
-
return
|
|
206
|
+
function N(e) {
|
|
207
|
+
return h(e) === r;
|
|
220
208
|
}
|
|
221
|
-
function
|
|
222
|
-
return e.kind === "dir" ? e.node.name :
|
|
209
|
+
function P(e) {
|
|
210
|
+
return e.kind === "dir" ? e.node.name : h(e.item.filepath);
|
|
223
211
|
}
|
|
224
|
-
function
|
|
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
|
|
218
|
+
function I(e) {
|
|
231
219
|
e.entries.sort((e, t) => {
|
|
232
|
-
let n =
|
|
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" &&
|
|
223
|
+
for (let t of e.entries) t.kind === "dir" && I(t.node);
|
|
236
224
|
}
|
|
237
|
-
function
|
|
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:
|
|
241
|
-
url:
|
|
242
|
-
description:
|
|
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
|
|
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
|
|
246
|
+
function z(e) {
|
|
259
247
|
return e.startsWith("_");
|
|
260
248
|
}
|
|
261
249
|
//#endregion
|
|
262
250
|
//#region src/shared/utils/html.ts
|
|
263
|
-
var
|
|
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
|
|
350
|
+
function V(e) {
|
|
363
351
|
return e.replaceAll("&", "&").replaceAll("\"", """).replaceAll("<", "<").replaceAll(">", ">");
|
|
364
352
|
}
|
|
365
|
-
function
|
|
366
|
-
return W((0,
|
|
353
|
+
function H(e) {
|
|
354
|
+
return W((0, B.default)(e)).replace(/\s+/g, " ").trim();
|
|
367
355
|
}
|
|
368
|
-
var
|
|
369
|
-
function
|
|
370
|
-
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);
|
|
371
359
|
}
|
|
372
360
|
function W(e) {
|
|
373
361
|
return e.replaceAll("<", "<").replaceAll(">", ">").replaceAll(""", "\"").replaceAll("'", "'").replaceAll("&", "&");
|
|
374
362
|
}
|
|
375
363
|
//#endregion
|
|
376
364
|
//#region src/shared/utils/regex.ts
|
|
377
|
-
function
|
|
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
|
|
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
|
|
386
|
+
var pe = new Intl.DateTimeFormat("en-US", {
|
|
399
387
|
year: "numeric",
|
|
400
388
|
month: "short",
|
|
401
389
|
day: "numeric"
|
|
402
390
|
});
|
|
403
|
-
function
|
|
391
|
+
function me(e) {
|
|
404
392
|
let t = new Date(e);
|
|
405
|
-
return Number.isNaN(t.getTime()) ? e :
|
|
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
|
|
398
|
+
function ge(e) {
|
|
408
399
|
return Math.floor(Date.now() / 1e3) - e < Z ? $(e) : Q(e);
|
|
409
400
|
}
|
|
410
401
|
//#endregion
|
|
411
|
-
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 };
|