typerighter 0.42.1 → 0.43.0
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-xAspP0Kq.js → app-DjpuKzvd.js} +17 -5
- package/dist/{cli-CThN6kIr.js → cli-DKDYNRYe.js} +5 -5
- package/dist/cli.js +1 -1
- package/dist/client/app/index.d.ts +29 -5
- package/dist/client/app/index.d.ts.map +1 -1
- package/dist/client/app/router.d.ts.map +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/theme-default.js +822 -715
- package/dist/client.js +1 -1
- package/dist/fonts.css +2 -0
- package/dist/index.js +3 -3
- package/dist/{init-DSA-JLUJ.js → init-sdwwozr2.js} +3 -2
- package/dist/inlineRe-Cn-J_E76.js +4 -0
- package/dist/{jsonld-Du1iJ_fG.js → jsonld-Crj_9xpa.js} +1 -1
- package/dist/node/build/fonts.d.ts +2 -0
- package/dist/node/build/fonts.d.ts.map +1 -0
- package/dist/node/build/index.d.ts.map +1 -1
- package/dist/node/build/prerender.d.ts.map +1 -1
- package/dist/node/cli/init.d.ts.map +1 -1
- package/dist/node/lib/codegen/app-entry.d.ts +30 -0
- package/dist/node/lib/codegen/app-entry.d.ts.map +1 -0
- package/dist/node/lib/codegen/components.d.ts +7 -0
- package/dist/node/lib/codegen/components.d.ts.map +1 -0
- package/dist/node/lib/codegen/index.d.ts +4 -0
- package/dist/node/lib/codegen/index.d.ts.map +1 -0
- package/dist/node/lib/codegen/theme.d.ts +5 -0
- package/dist/node/lib/codegen/theme.d.ts.map +1 -0
- package/dist/node/lib/render/postprocess.d.ts +1 -0
- package/dist/node/lib/render/postprocess.d.ts.map +1 -1
- package/dist/node/lib/render/vue.d.ts.map +1 -1
- package/dist/node/plugin/vite/constants.d.ts +2 -0
- package/dist/node/plugin/vite/constants.d.ts.map +1 -1
- package/dist/node/plugin/vite/index.d.ts +1 -1
- package/dist/node/plugin/vite/index.d.ts.map +1 -1
- package/dist/node/plugin/vite/virtual/app.d.ts +3 -21
- package/dist/node/plugin/vite/virtual/app.d.ts.map +1 -1
- package/dist/node/plugin/vite/virtual/theme.d.ts +7 -0
- package/dist/node/plugin/vite/virtual/theme.d.ts.map +1 -0
- package/dist/prerenderWorker.js +2 -2
- package/dist/renderMath-C2Z7HdfG.js +19 -0
- package/dist/shared/types/ssg.d.ts +4 -0
- package/dist/shared/types/ssg.d.ts.map +1 -1
- package/dist/shared/utils/format.d.ts +2 -0
- package/dist/shared/utils/format.d.ts.map +1 -1
- package/dist/shared/utils/format.test.d.ts +2 -0
- package/dist/shared/utils/format.test.d.ts.map +1 -0
- package/dist/{shared-BMujDY3P.js → shared-QuBFygxT.js} +104 -98
- package/dist/shared.js +1 -1
- package/dist/typedown.schema.json +133 -0
- package/dist/typerighter.css +1 -1
- package/dist/{vite-Dup9wBL7.js → vite-Cj1Ofykq.js} +540 -425
- package/dist/vite.js +1 -1
- package/package.json +6 -4
|
@@ -4,6 +4,9 @@ var r = "index", i = [".td", ".md"], a = "**/*.{td,md}", o = ["title", "text"],
|
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/shared/utils/format.ts
|
|
6
6
|
function l(e) {
|
|
7
|
+
return e.replace(/(^|[-_])([a-z])/g, (e, t, n) => n.toUpperCase());
|
|
8
|
+
}
|
|
9
|
+
function u(e) {
|
|
7
10
|
let t = e.match(/^(\d+)[-_](.+)$/);
|
|
8
11
|
return t ? {
|
|
9
12
|
order: Number(t[1]),
|
|
@@ -13,109 +16,112 @@ function l(e) {
|
|
|
13
16
|
rest: e
|
|
14
17
|
};
|
|
15
18
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
19
|
+
function d(e) {
|
|
20
|
+
return e.replace(/_/g, "-");
|
|
21
|
+
}
|
|
22
|
+
function f(e) {
|
|
23
|
+
let { rest: t } = u(e), n = t.replace(/[-_]/g, " ").split(" ");
|
|
18
24
|
return 0 < n.length && (n[0] = n[0].charAt(0).toUpperCase() + n[0].slice(1)), n.join(" ");
|
|
19
25
|
}
|
|
20
26
|
//#endregion
|
|
21
27
|
//#region src/shared/utils/path.ts
|
|
22
|
-
var
|
|
23
|
-
basename: () =>
|
|
24
|
-
dirname: () =>
|
|
25
|
-
extname: () =>
|
|
26
|
-
filestem: () =>
|
|
27
|
-
isContentFile: () =>
|
|
28
|
-
isTypeFile: () =>
|
|
29
|
-
join: () =>
|
|
30
|
-
stripExtension: () =>
|
|
31
|
-
stripPrefix: () =>
|
|
28
|
+
var p = /* @__PURE__ */ e({
|
|
29
|
+
basename: () => m,
|
|
30
|
+
dirname: () => h,
|
|
31
|
+
extname: () => g,
|
|
32
|
+
filestem: () => _,
|
|
33
|
+
isContentFile: () => v,
|
|
34
|
+
isTypeFile: () => y,
|
|
35
|
+
join: () => b,
|
|
36
|
+
stripExtension: () => x,
|
|
37
|
+
stripPrefix: () => S
|
|
32
38
|
});
|
|
33
|
-
function
|
|
34
|
-
let n =
|
|
39
|
+
function m(e, t) {
|
|
40
|
+
let n = C(e).split("/").pop() ?? "";
|
|
35
41
|
return t !== void 0 && n.endsWith(t) ? n.slice(0, -t.length) : n;
|
|
36
42
|
}
|
|
37
|
-
function
|
|
38
|
-
let t =
|
|
43
|
+
function h(e) {
|
|
44
|
+
let t = C(e).split("/");
|
|
39
45
|
return t.pop(), t.join("/");
|
|
40
46
|
}
|
|
41
|
-
function
|
|
42
|
-
let t =
|
|
47
|
+
function g(e) {
|
|
48
|
+
let t = m(e), n = t.lastIndexOf(".");
|
|
43
49
|
return n <= 0 ? "" : t.slice(n);
|
|
44
50
|
}
|
|
45
|
-
function
|
|
46
|
-
let t =
|
|
51
|
+
function _(e) {
|
|
52
|
+
let t = m(e), n = t.lastIndexOf(".");
|
|
47
53
|
return n <= 0 ? t : t.slice(0, n);
|
|
48
54
|
}
|
|
49
|
-
function
|
|
50
|
-
return i.includes(
|
|
55
|
+
function v(e) {
|
|
56
|
+
return i.includes(g(e));
|
|
51
57
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
58
|
+
function y(e) {
|
|
59
|
+
return v(e) && e.split("/").includes("_types");
|
|
54
60
|
}
|
|
55
|
-
function
|
|
61
|
+
function b(...e) {
|
|
56
62
|
return e.filter(Boolean).join("/").replace(/\\+/g, "/").replace(/\/+/g, "/").replace(/\/$/, "") || "/";
|
|
57
63
|
}
|
|
58
|
-
function
|
|
59
|
-
let t =
|
|
64
|
+
function x(e) {
|
|
65
|
+
let t = g(e);
|
|
60
66
|
return t ? e.slice(0, -t.length) : e;
|
|
61
67
|
}
|
|
62
|
-
function
|
|
63
|
-
let n =
|
|
68
|
+
function S(e, t) {
|
|
69
|
+
let n = C(e), r = `/${t}/`, i = n.lastIndexOf(r);
|
|
64
70
|
return i === -1 ? n : n.slice(i + r.length);
|
|
65
71
|
}
|
|
66
|
-
function
|
|
72
|
+
function C(e) {
|
|
67
73
|
return e.replace(/\\/g, "/");
|
|
68
74
|
}
|
|
69
75
|
//#endregion
|
|
70
76
|
//#region src/shared/utils/url.ts
|
|
71
77
|
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
|
|
78
|
+
function w(e) {
|
|
73
79
|
let t = e.indexOf("#");
|
|
74
80
|
return 0 <= t ? e.slice(t + 1) : "";
|
|
75
81
|
}
|
|
76
|
-
function
|
|
77
|
-
return
|
|
82
|
+
function te(e) {
|
|
83
|
+
return O(e) ? E(e) : e;
|
|
78
84
|
}
|
|
79
|
-
function
|
|
85
|
+
function ne(e, t) {
|
|
80
86
|
return `${e}/${t}`;
|
|
81
87
|
}
|
|
82
|
-
function
|
|
88
|
+
function T(e) {
|
|
83
89
|
return e === "/" ? "/index" : e + "/index";
|
|
84
90
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
91
|
+
function E(e) {
|
|
92
|
+
return h(M(e)) || "/";
|
|
87
93
|
}
|
|
88
|
-
function
|
|
89
|
-
let t =
|
|
90
|
-
return "/" +
|
|
94
|
+
function D(e) {
|
|
95
|
+
let t = _(e);
|
|
96
|
+
return "/" + b(h(e), t);
|
|
91
97
|
}
|
|
92
|
-
function
|
|
98
|
+
function re(e) {
|
|
93
99
|
return e.split("?")[0].split("#")[0];
|
|
94
100
|
}
|
|
95
|
-
function
|
|
101
|
+
function O(e) {
|
|
96
102
|
return e === "/index" || e.endsWith("/index");
|
|
97
103
|
}
|
|
98
|
-
function
|
|
104
|
+
function ie(e, t) {
|
|
99
105
|
return t.startsWith(e + "/") || t === e;
|
|
100
106
|
}
|
|
101
|
-
function
|
|
107
|
+
function ae(e) {
|
|
102
108
|
return c.test(e);
|
|
103
109
|
}
|
|
104
|
-
function
|
|
105
|
-
let t =
|
|
110
|
+
function oe(e) {
|
|
111
|
+
let t = g(e).slice(1);
|
|
106
112
|
return t === "" || !ee.has(t.toLowerCase());
|
|
107
113
|
}
|
|
108
|
-
function
|
|
114
|
+
function k(e) {
|
|
109
115
|
return e === "/" ? "/index" : e;
|
|
110
116
|
}
|
|
111
|
-
function
|
|
117
|
+
function A(e) {
|
|
112
118
|
let t = e.indexOf("#");
|
|
113
119
|
return 0 <= t ? e.slice(0, t) : e;
|
|
114
120
|
}
|
|
115
|
-
function
|
|
121
|
+
function j(e) {
|
|
116
122
|
return e.replace(/^\//, "");
|
|
117
123
|
}
|
|
118
|
-
function
|
|
124
|
+
function M(e) {
|
|
119
125
|
return e.replace(/\/$/, "") || "/";
|
|
120
126
|
}
|
|
121
127
|
//#endregion
|
|
@@ -142,31 +148,31 @@ function se(e) {
|
|
|
142
148
|
item: n
|
|
143
149
|
});
|
|
144
150
|
}
|
|
145
|
-
return
|
|
151
|
+
return R(t), { entries: t.entries };
|
|
146
152
|
}
|
|
147
153
|
function ce(e, t) {
|
|
148
154
|
let n = {};
|
|
149
155
|
function r(e) {
|
|
150
156
|
let t = 0;
|
|
151
|
-
for (let n of e.entries) n.kind === "file" ?
|
|
157
|
+
for (let n of e.entries) n.kind === "file" ? F(n.item.filepath) || t++ : t += r(n.node);
|
|
152
158
|
return t;
|
|
153
159
|
}
|
|
154
160
|
function i(e, t) {
|
|
155
|
-
let n =
|
|
156
|
-
return n ?
|
|
161
|
+
let n = N(e);
|
|
162
|
+
return n ? D(n.filepath) : T(`${t}/${e.name}`);
|
|
157
163
|
}
|
|
158
164
|
function a(e, t) {
|
|
159
165
|
let n = [];
|
|
160
166
|
for (let a of e) a.kind === "dir" ? n.push({
|
|
161
167
|
kind: "dir",
|
|
162
168
|
sub: {
|
|
163
|
-
name:
|
|
169
|
+
name: f(a.node.name),
|
|
164
170
|
url: i(a.node, t),
|
|
165
171
|
count: r(a.node)
|
|
166
172
|
}
|
|
167
|
-
}) :
|
|
173
|
+
}) : F(a.item.filepath) || n.push({
|
|
168
174
|
kind: "file",
|
|
169
|
-
item:
|
|
175
|
+
item: z(a.item)
|
|
170
176
|
});
|
|
171
177
|
return n;
|
|
172
178
|
}
|
|
@@ -175,7 +181,7 @@ function ce(e, t) {
|
|
|
175
181
|
if (r.kind !== "dir") continue;
|
|
176
182
|
let e = r.node, i = t ? `${t}/${e.name}` : `/${e.name}`;
|
|
177
183
|
n[i] = {
|
|
178
|
-
title:
|
|
184
|
+
title: f(e.name),
|
|
179
185
|
url: i,
|
|
180
186
|
entries: a(e.entries, i)
|
|
181
187
|
}, o(e.entries, i);
|
|
@@ -187,47 +193,47 @@ function ce(e, t) {
|
|
|
187
193
|
entries: a(e, "")
|
|
188
194
|
}, o(e, ""), n;
|
|
189
195
|
}
|
|
190
|
-
function
|
|
191
|
-
for (let t of e.entries) if (t.kind === "file" &&
|
|
196
|
+
function N(e) {
|
|
197
|
+
for (let t of e.entries) if (t.kind === "file" && F(t.item.filepath)) return t.item;
|
|
192
198
|
}
|
|
193
199
|
function le(e, t) {
|
|
194
|
-
let n =
|
|
195
|
-
return n ?
|
|
200
|
+
let n = m(h(e));
|
|
201
|
+
return n ? f(n) : t;
|
|
196
202
|
}
|
|
197
|
-
function
|
|
203
|
+
function P(e, t) {
|
|
198
204
|
if (t !== void 0) return t;
|
|
199
|
-
let n =
|
|
200
|
-
if (
|
|
201
|
-
let t =
|
|
202
|
-
return t ?
|
|
205
|
+
let n = _(e);
|
|
206
|
+
if (F(e)) {
|
|
207
|
+
let t = m(h(e));
|
|
208
|
+
return t ? f(t) : n;
|
|
203
209
|
}
|
|
204
|
-
return
|
|
210
|
+
return f(n);
|
|
205
211
|
}
|
|
206
|
-
function
|
|
207
|
-
return
|
|
212
|
+
function F(e) {
|
|
213
|
+
return _(e) === r;
|
|
208
214
|
}
|
|
209
|
-
function
|
|
210
|
-
return e.kind === "dir" ? e.node.name :
|
|
215
|
+
function I(e) {
|
|
216
|
+
return e.kind === "dir" ? e.node.name : _(e.item.filepath);
|
|
211
217
|
}
|
|
212
|
-
function
|
|
218
|
+
function L(e, ...t) {
|
|
213
219
|
for (let n of t) {
|
|
214
220
|
let t = e[n];
|
|
215
221
|
if (typeof t == "string" && 0 < t.length) return t;
|
|
216
222
|
}
|
|
217
223
|
}
|
|
218
|
-
function
|
|
224
|
+
function R(e) {
|
|
219
225
|
e.entries.sort((e, t) => {
|
|
220
|
-
let n =
|
|
226
|
+
let n = I(e), r = I(t), i = u(n), a = u(r);
|
|
221
227
|
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;
|
|
222
228
|
});
|
|
223
|
-
for (let t of e.entries) t.kind === "dir" &&
|
|
229
|
+
for (let t of e.entries) t.kind === "dir" && R(t.node);
|
|
224
230
|
}
|
|
225
|
-
function
|
|
231
|
+
function z(e) {
|
|
226
232
|
let t = e.header.tags, n = Array.isArray(t) ? t.filter((e) => typeof e == "string") : [];
|
|
227
233
|
return {
|
|
228
|
-
name:
|
|
229
|
-
url:
|
|
230
|
-
description:
|
|
234
|
+
name: P(e.filepath, e.label),
|
|
235
|
+
url: D(e.filepath),
|
|
236
|
+
description: L(e.header, "description", "summary") ?? e.excerpt,
|
|
231
237
|
tags: 0 < n.length ? n : void 0,
|
|
232
238
|
mtime: e.fileMetadata?.mtime,
|
|
233
239
|
schema: e.schema
|
|
@@ -235,13 +241,13 @@ function L(e) {
|
|
|
235
241
|
}
|
|
236
242
|
//#endregion
|
|
237
243
|
//#region src/shared/utils/debounce.ts
|
|
238
|
-
function
|
|
244
|
+
function B(e, t) {
|
|
239
245
|
let n;
|
|
240
246
|
return (...r) => {
|
|
241
247
|
clearTimeout(n), n = setTimeout(() => e(...r), t);
|
|
242
248
|
};
|
|
243
249
|
}
|
|
244
|
-
function
|
|
250
|
+
function V(e, t) {
|
|
245
251
|
let n = 0, r;
|
|
246
252
|
return (...i) => {
|
|
247
253
|
let a = Date.now();
|
|
@@ -252,12 +258,12 @@ function z(e, t) {
|
|
|
252
258
|
}
|
|
253
259
|
//#endregion
|
|
254
260
|
//#region src/shared/utils/field.ts
|
|
255
|
-
function
|
|
261
|
+
function H(e) {
|
|
256
262
|
return e.startsWith("_");
|
|
257
263
|
}
|
|
258
264
|
//#endregion
|
|
259
265
|
//#region src/shared/utils/html.ts
|
|
260
|
-
var
|
|
266
|
+
var U = /* @__PURE__ */ t((/* @__PURE__ */ n(((e, t) => {
|
|
261
267
|
(function(e) {
|
|
262
268
|
if (typeof n != "function") {
|
|
263
269
|
var n = function(e) {
|
|
@@ -356,22 +362,22 @@ var V = /* @__PURE__ */ t((/* @__PURE__ */ n(((e, t) => {
|
|
|
356
362
|
}) : typeof t == "object" && t.exports ? t.exports = c : e.striptags = c;
|
|
357
363
|
})(e);
|
|
358
364
|
})))(), 1);
|
|
359
|
-
function
|
|
365
|
+
function ue(e) {
|
|
360
366
|
return e.replaceAll("&", "&").replaceAll("\"", """).replaceAll("<", "<").replaceAll(">", ">");
|
|
361
367
|
}
|
|
362
|
-
function U(e) {
|
|
363
|
-
return W((0, V.default)(e)).replace(/\s+/g, " ").trim();
|
|
364
|
-
}
|
|
365
|
-
var ue = /* @__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(".");
|
|
366
368
|
function de(e) {
|
|
367
|
-
return
|
|
369
|
+
return W((0, U.default)(e)).replace(/\s+/g, " ").trim();
|
|
370
|
+
}
|
|
371
|
+
var fe = /* @__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(".");
|
|
372
|
+
function pe(e) {
|
|
373
|
+
return e === void 0 ? "" : (0, U.default)(e, fe);
|
|
368
374
|
}
|
|
369
375
|
function W(e) {
|
|
370
376
|
return e.replaceAll("<", "<").replaceAll(">", ">").replaceAll(""", "\"").replaceAll("'", "'").replaceAll("&", "&");
|
|
371
377
|
}
|
|
372
378
|
//#endregion
|
|
373
379
|
//#region src/shared/utils/regex.ts
|
|
374
|
-
function
|
|
380
|
+
function me(e) {
|
|
375
381
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
376
382
|
}
|
|
377
383
|
//#endregion
|
|
@@ -384,7 +390,7 @@ function Q(e) {
|
|
|
384
390
|
day: "numeric"
|
|
385
391
|
});
|
|
386
392
|
}
|
|
387
|
-
function
|
|
393
|
+
function he(e, t) {
|
|
388
394
|
return typeof window > "u" ? "" : Math.floor(Date.now() / 1e3) - e < Z ? `${t} ${$(e)}` : `${t} at ${Q(e)}`;
|
|
389
395
|
}
|
|
390
396
|
function $(e) {
|
|
@@ -392,20 +398,20 @@ function $(e) {
|
|
|
392
398
|
let t = Math.floor(Date.now() / 1e3) - e;
|
|
393
399
|
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`;
|
|
394
400
|
}
|
|
395
|
-
var
|
|
401
|
+
var ge = new Intl.DateTimeFormat("en-US", {
|
|
396
402
|
year: "numeric",
|
|
397
403
|
month: "short",
|
|
398
404
|
day: "numeric"
|
|
399
405
|
});
|
|
400
|
-
function
|
|
406
|
+
function _e(e) {
|
|
401
407
|
let t = new Date(e);
|
|
402
|
-
return Number.isNaN(t.getTime()) ? e :
|
|
408
|
+
return Number.isNaN(t.getTime()) ? e : ge.format(t);
|
|
403
409
|
}
|
|
404
|
-
function
|
|
410
|
+
function ve(e) {
|
|
405
411
|
return new Date(e).toISOString().slice(0, 10);
|
|
406
412
|
}
|
|
407
|
-
function
|
|
413
|
+
function ye(e) {
|
|
408
414
|
return Math.floor(Date.now() / 1e3) - e < Z ? $(e) : Q(e);
|
|
409
415
|
}
|
|
410
416
|
//#endregion
|
|
411
|
-
export {
|
|
417
|
+
export { ae as A, p as B, ne as C, re as D, D as E, M as F, d as G, S as H, m as I, i as J, f as K, g as L, k as M, A as N, O, j as P, s as Q, v as R, te as S, E as T, l as U, x as V, u as W, r as X, a as Y, o as Z, N as _, $ as a, F as b, ue as c, W as d, H as f, ce as g, se as h, ve as i, oe as j, ie as k, pe as l, V as m, _e as n, ye as o, B as p, c as q, he as r, me as s, Q as t, de as u, le as v, T as w, w as x, P as y, y as z };
|
package/dist/shared.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { J as CONTENT_EXTENSIONS, Y as CONTENT_GLOB, q as EXTERNAL_URL_RE, X as INDEX_FILENAME, Z as SEARCH_FIELDS, Q 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, k as isUrlAncestorOf, A as isUrlExternal, j as isUrlToPage, U as kebabToPascal, W as parseNumericPrefix, B as path, M as resolveRootUrl, l as sanitizeInlineHtml, G as snakeToKebab, N as stripAnchor, u as stripHtml, P as stripLeadingSlash, F as stripTrailingSlash, m as throttle, d as unescapeHtml, K as unslugify } from "./shared-QuBFygxT.js";
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "typedown.schema.json",
|
|
4
|
+
"title": "Typedown vault configuration",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["version"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"version": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Config file version",
|
|
12
|
+
"examples": ["1.0.0"]
|
|
13
|
+
},
|
|
14
|
+
"repo": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Repository URL shown in the site footer"
|
|
17
|
+
},
|
|
18
|
+
"vault": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"properties": {
|
|
22
|
+
"root_dir": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Path to the vault directory relative to this file",
|
|
25
|
+
"default": ".",
|
|
26
|
+
"examples": ["vault", "docs", "."]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"theme": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"properties": {
|
|
34
|
+
"components": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"description": "Custom Vue components: folder paths (scanned for .vue files) or explicit name-to-source mappings",
|
|
37
|
+
"items": {
|
|
38
|
+
"oneOf": [
|
|
39
|
+
{
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Folder path to scan for .vue files"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"type": "object",
|
|
45
|
+
"description": "Explicit component name to source path mapping",
|
|
46
|
+
"minProperties": 1,
|
|
47
|
+
"maxProperties": 1,
|
|
48
|
+
"additionalProperties": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"examples": [
|
|
55
|
+
["./src/components"],
|
|
56
|
+
[{ "Chart": "./src/Chart.vue" }],
|
|
57
|
+
["./src/components", { "Chart": "./src/MyChart.vue" }]
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"site": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"properties": {
|
|
66
|
+
"title": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"description": "Site title shown in the browser tab and header"
|
|
69
|
+
},
|
|
70
|
+
"description": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "Site description used in meta tags"
|
|
73
|
+
},
|
|
74
|
+
"origin": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "Canonical site URL used for sitemap and SEO (e.g. https://example.com)",
|
|
77
|
+
"examples": ["https://example.com"]
|
|
78
|
+
},
|
|
79
|
+
"lang": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "HTML lang attribute",
|
|
82
|
+
"default": "en",
|
|
83
|
+
"examples": ["en", "fr", "ja"]
|
|
84
|
+
},
|
|
85
|
+
"base_path": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "Base path when the site is served from a subdirectory (e.g. /docs)",
|
|
88
|
+
"default": "/",
|
|
89
|
+
"examples": ["/", "/docs", "/blog"]
|
|
90
|
+
},
|
|
91
|
+
"author": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"description": "Site author name used in meta tags and JSON-LD"
|
|
94
|
+
},
|
|
95
|
+
"license": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"description": "Content license shown in the footer",
|
|
98
|
+
"examples": ["CC BY 4.0", "MIT", "AGPL-3.0-only"]
|
|
99
|
+
},
|
|
100
|
+
"public_dir": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"description": "Directory for static assets copied as-is to the build output",
|
|
103
|
+
"default": "public"
|
|
104
|
+
},
|
|
105
|
+
"nav": {
|
|
106
|
+
"type": "array",
|
|
107
|
+
"description": "Top navigation links (max 4 recommended)",
|
|
108
|
+
"maxItems": 4,
|
|
109
|
+
"items": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"required": ["title", "link"],
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"properties": {
|
|
114
|
+
"title": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"description": "Link label"
|
|
117
|
+
},
|
|
118
|
+
"link": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "URL or internal path"
|
|
121
|
+
},
|
|
122
|
+
"icon": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "Lucide icon name (e.g. icon.book, icon.github)",
|
|
125
|
+
"examples": ["icon.book", "icon.github", "icon.home"]
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|