typerighter 0.32.6 → 0.38.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/client.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, l as r, o as i, t as a, u as o } from "./app-I-BVWGvX.js";
1
+ import { a as e, c as t, i as n, l as r, o as i, t as a, u as o } from "./app-Dp7FPdlU.js";
2
2
  export { t as Content, a as createTypedownApp, r as useRoute, o as useRouter, n as useSiteConfig, e as useSiteData, i as useTdContent };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as e, n as t, t as n } from "./vite-DHp_mMcQ.js";
2
- import { t as r } from "./cli-6z4XoGNS.js";
1
+ import { a as e, n as t, t as n } from "./vite-tIS_9gV0.js";
2
+ import { t as r } from "./cli-CAX9mFxL.js";
3
3
  export { e as buildSite, r as cli, t as generateClientAppEntry, n as typedown };
@@ -1,5 +1,5 @@
1
- import { q as e } from "./shared-hpG9wf_j.js";
2
- import { r as t } from "./vite-DHp_mMcQ.js";
1
+ import { J as e } from "./shared-DwnQV3ZZ.js";
2
+ import { r as t } from "./vite-tIS_9gV0.js";
3
3
  import { a as n, i as r, n as i, r as a, t as o } from "./brand-CG1fQshq.js";
4
4
  import s from "node:path";
5
5
  import c from "node:fs/promises";
@@ -749,7 +749,7 @@ function He(e) {
749
749
  build: "typerighter build",
750
750
  preview: "typerighter preview"
751
751
  },
752
- devDependencies: { typerighter: "^0.32.6" }
752
+ devDependencies: { typerighter: "^0.38.0" }
753
753
  }, void 0, 2) + "\n";
754
754
  }
755
755
  function Ue() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/cli/index.ts"],"names":[],"mappings":"AAmBA,wBAAgB,GAAG,SAwLlB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/cli/index.ts"],"names":[],"mappings":"AAmBA,wBAAgB,GAAG,SA+LlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"typedown-context.d.ts","sourceRoot":"","sources":["../../../src/node/lib/typedown-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EACzG,KAAK,YAAY,EAClB,MAAM,yBAAyB,CAAC;AAIjC,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAY;gBAEb,MAAM,EAAE,SAAS;IAK9B,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,WAAW,CAAuB;IAC1C,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,eAAe,CAAmC;IAC1D,OAAO,CAAC,aAAa,CAAsC;IAE3D,OAAO,CAAC,4BAA4B;IAuDpC,IAAI,GAAG,IAAK,SAAS,CAEpB;IAIK,OAAO,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAYpD,QAAQ,CAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAiBtD,SAAS,IAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IAQ/B,WAAW,IAAK,OAAO,CAAC,aAAa,EAAE,CAAC;IAMxC,SAAS,IAAK,OAAO,CAAC,YAAY,CAAC;IAQnC,SAAS,CAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAYjD,WAAW,IAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IAQjC,UAAU,IAAK,OAAO,CAAC,kBAAkB,CAAC;IAI1C,UAAU,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;CAG7D;AAED,wBAAgB,cAAc,CAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAMvD"}
1
+ {"version":3,"file":"typedown-context.d.ts","sourceRoot":"","sources":["../../../src/node/lib/typedown-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EACzG,KAAK,YAAY,EAClB,MAAM,yBAAyB,CAAC;AAIjC,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAY;gBAEb,MAAM,EAAE,SAAS;IAK9B,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,WAAW,CAAuB;IAC1C,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,eAAe,CAAmC;IAC1D,OAAO,CAAC,aAAa,CAAsC;IAE3D,OAAO,CAAC,4BAA4B;IA2CpC,IAAI,GAAG,IAAK,SAAS,CAEpB;IAIK,OAAO,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAYpD,QAAQ,CAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAiBtD,SAAS,IAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IAQ/B,WAAW,IAAK,OAAO,CAAC,aAAa,EAAE,CAAC;IAMxC,SAAS,IAAK,OAAO,CAAC,YAAY,CAAC;IAQnC,SAAS,CAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAYjD,WAAW,IAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IAQjC,UAAU,IAAK,OAAO,CAAC,kBAAkB,CAAC;IAI1C,UAAU,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;CAG7D;AAED,wBAAgB,cAAc,CAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAMvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/plugin/vite/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,MAAM,EACZ,MAAM,MAAM,CAAC;AAOd,OAAO,EACiC,KAAK,UAAU,EACtD,MAAM,eAAe,CAAC;AAkCvB,OAAO,EACL,QAAQ,IAAI,sBAAsB,EAClC,KAAK,eAAe,IAAI,qBAAqB,GAC9C,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IAEpC,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,QAAQ,CAAE,OAAO,GAAE,qBAA0B,GAAG,MAAM,EAAE,CA6UvE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/plugin/vite/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,MAAM,EACZ,MAAM,MAAM,CAAC;AAOd,OAAO,EACiC,KAAK,UAAU,EACtD,MAAM,eAAe,CAAC;AAiCvB,OAAO,EACL,QAAQ,IAAI,sBAAsB,EAClC,KAAK,eAAe,IAAI,qBAAqB,GAC9C,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IAEpC,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,QAAQ,CAAE,OAAO,GAAE,qBAA0B,GAAG,MAAM,EAAE,CAgUvE"}
@@ -1 +1 @@
1
- {"version":3,"file":"vault-assets.d.ts","sourceRoot":"","sources":["../../../../../src/node/plugin/vite/middleware/vault-assets.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,eAAe,EAAE,cAAc,EAChC,MAAM,WAAW,CAAC;AAInB,OAAO,KAAK,EACV,aAAa,EACd,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,mBAAmB,EACpB,MAAM,IAAI,CAAC;AAwBZ,wBAAgB,WAAW,CAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,mBAAmB,IAE1E,SAAS,eAAe,EACxB,UAAU,cAAc,EACxB,MAAM,MAAM,IAAI,UAwCnB"}
1
+ {"version":3,"file":"vault-assets.d.ts","sourceRoot":"","sources":["../../../../../src/node/plugin/vite/middleware/vault-assets.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,eAAe,EAAE,cAAc,EAChC,MAAM,WAAW,CAAC;AAInB,OAAO,KAAK,EACV,aAAa,EACd,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,mBAAmB,EACpB,MAAM,IAAI,CAAC;AAwBZ,wBAAgB,WAAW,CAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,mBAAmB,IAE1E,SAAS,eAAe,EACxB,UAAU,cAAc,EACxB,MAAM,MAAM,IAAI,UA6CnB"}
@@ -6,4 +6,5 @@ export declare function isContentFile(filepath: string): boolean;
6
6
  export declare function isTypeFile(filepath: string): boolean;
7
7
  export declare function join(...segments: string[]): string;
8
8
  export declare function stripExtension(filepath: string): string;
9
+ export declare function stripPrefix(filepath: string, prefix: string): string;
9
10
  //# sourceMappingURL=path.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/path.ts"],"names":[],"mappings":"AAOA,wBAAgB,QAAQ,CAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAStE;AAED,wBAAgB,OAAO,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMjD;AAED,wBAAgB,OAAO,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKjD;AAED,wBAAgB,QAAQ,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED,wBAAgB,aAAa,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAExD;AAGD,wBAAgB,UAAU,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,wBAAgB,IAAI,CAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAOnD;AAED,wBAAgB,cAAc,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIxD"}
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/path.ts"],"names":[],"mappings":"AAOA,wBAAgB,QAAQ,CAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAStE;AAED,wBAAgB,OAAO,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMjD;AAED,wBAAgB,OAAO,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKjD;AAED,wBAAgB,QAAQ,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED,wBAAgB,aAAa,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAExD;AAGD,wBAAgB,UAAU,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,wBAAgB,IAAI,CAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAOnD;AAED,wBAAgB,cAAc,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIxD;AAID,wBAAgB,WAAW,CAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAQrE"}
@@ -15,10 +15,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
15
15
  }, l = (n, r, o) => (o = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
16
16
  value: n,
17
17
  enumerable: !0
18
- }) : o, n)), u = "index", d = [".td", ".md"], f = "**/*.{td,md}", p = ["title", "text"], m = ["title"], h = /^[a-z]+:/i;
18
+ }) : o, n)), u = "index", d = [".td", ".md"], f = "**/*.{td,md}", p = ["title", "text"], ee = ["title"], m = /^[a-z]+:/i;
19
19
  //#endregion
20
20
  //#region src/shared/utils/format.ts
21
- function g(e) {
21
+ function h(e) {
22
22
  let t = e.match(/^(\d+)[-_](.+)$/);
23
23
  return t ? {
24
24
  order: Number(t[1]),
@@ -28,13 +28,13 @@ function g(e) {
28
28
  rest: e
29
29
  };
30
30
  }
31
- function _(e) {
32
- let { rest: t } = g(e), n = t.replace(/[-_]/g, " ").split(" ");
31
+ function g(e) {
32
+ let { rest: t } = h(e), n = t.replace(/[-_]/g, " ").split(" ");
33
33
  return 0 < n.length && (n[0] = n[0].charAt(0).toUpperCase() + n[0].slice(1)), n.join(" ");
34
34
  }
35
35
  //#endregion
36
36
  //#region src/shared/utils/path.ts
37
- var ee = /* @__PURE__ */ s({
37
+ var _ = /* @__PURE__ */ s({
38
38
  basename: () => v,
39
39
  dirname: () => y,
40
40
  extname: () => b,
@@ -42,14 +42,15 @@ var ee = /* @__PURE__ */ s({
42
42
  isContentFile: () => S,
43
43
  isTypeFile: () => C,
44
44
  join: () => w,
45
- stripExtension: () => T
45
+ stripExtension: () => T,
46
+ stripPrefix: () => E
46
47
  });
47
48
  function v(e, t) {
48
- let n = E(e).split("/").pop() ?? "";
49
+ let n = D(e).split("/").pop() ?? "";
49
50
  return t !== void 0 && n.endsWith(t) ? n.slice(0, -t.length) : n;
50
51
  }
51
52
  function y(e) {
52
- let t = E(e).split("/");
53
+ let t = D(e).split("/");
53
54
  return t.pop(), t.join("/");
54
55
  }
55
56
  function b(e) {
@@ -73,43 +74,47 @@ function T(e) {
73
74
  let t = b(e);
74
75
  return t ? e.slice(0, -t.length) : e;
75
76
  }
76
- function E(e) {
77
+ function E(e, t) {
78
+ let n = D(e), r = `/${t}/`, i = n.lastIndexOf(r);
79
+ return i === -1 ? n : n.slice(i + r.length);
80
+ }
81
+ function D(e) {
77
82
  return e.replace(/\\/g, "/");
78
83
  }
79
84
  //#endregion
80
85
  //#region src/shared/utils/url.ts
81
86
  var te = 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(","));
82
- function D(e) {
87
+ function O(e) {
83
88
  let t = e.indexOf("#");
84
89
  return 0 <= t ? e.slice(t + 1) : "";
85
90
  }
86
- function ne(e) {
87
- return j(e) ? k(e) : e;
91
+ function k(e) {
92
+ return N(e) ? j(e) : e;
88
93
  }
89
- function re(e, t) {
94
+ function ne(e, t) {
90
95
  return `${e}/${t}`;
91
96
  }
92
- function O(e) {
97
+ function A(e) {
93
98
  return e === "/" ? "/index" : e + "/index";
94
99
  }
95
- function k(e) {
96
- return y(P(e)) || "/";
100
+ function j(e) {
101
+ return y(F(e)) || "/";
97
102
  }
98
- function A(e) {
103
+ function M(e) {
99
104
  let t = x(e);
100
105
  return "/" + w(y(e), t);
101
106
  }
102
- function ie(e) {
107
+ function re(e) {
103
108
  return e.split("?")[0].split("#")[0];
104
109
  }
105
- function j(e) {
110
+ function N(e) {
106
111
  return e === "/index" || e.endsWith("/index");
107
112
  }
108
- function M(e, t) {
113
+ function P(e, t) {
109
114
  return t.startsWith(e + "/") || t === e;
110
115
  }
111
- function N(e) {
112
- return h.test(e);
116
+ function ie(e) {
117
+ return m.test(e);
113
118
  }
114
119
  function ae(e) {
115
120
  let t = b(e).slice(1);
@@ -122,7 +127,7 @@ function se(e) {
122
127
  let t = e.indexOf("#");
123
128
  return 0 <= t ? e.slice(0, t) : e;
124
129
  }
125
- function P(e) {
130
+ function F(e) {
126
131
  return e.replace(/\/$/, "") || "/";
127
132
  }
128
133
  //#endregion
@@ -149,31 +154,31 @@ function ce(e) {
149
154
  item: n
150
155
  });
151
156
  }
152
- return B(t), { entries: t.entries };
157
+ return V(t), { entries: t.entries };
153
158
  }
154
159
  function le(e, t) {
155
160
  let n = {};
156
161
  function r(e) {
157
162
  let t = 0;
158
- for (let n of e.entries) n.kind === "file" ? L(n.item.filepath) || t++ : t += r(n.node);
163
+ for (let n of e.entries) n.kind === "file" ? R(n.item.filepath) || t++ : t += r(n.node);
159
164
  return t;
160
165
  }
161
166
  function i(e, t) {
162
- let n = F(e);
163
- return n ? A(n.filepath) : O(`${t}/${e.name}`);
167
+ let n = I(e);
168
+ return n ? M(n.filepath) : A(`${t}/${e.name}`);
164
169
  }
165
170
  function a(e, t) {
166
171
  let n = [];
167
172
  for (let a of e) a.kind === "dir" ? n.push({
168
173
  kind: "dir",
169
174
  sub: {
170
- name: _(a.node.name),
175
+ name: g(a.node.name),
171
176
  url: i(a.node, t),
172
177
  count: r(a.node)
173
178
  }
174
- }) : L(a.item.filepath) || n.push({
179
+ }) : R(a.item.filepath) || n.push({
175
180
  kind: "file",
176
- item: V(a.item)
181
+ item: H(a.item)
177
182
  });
178
183
  return n;
179
184
  }
@@ -182,7 +187,7 @@ function le(e, t) {
182
187
  if (r.kind !== "dir") continue;
183
188
  let e = r.node, i = t ? `${t}/${e.name}` : `/${e.name}`;
184
189
  n[i] = {
185
- title: _(e.name),
190
+ title: g(e.name),
186
191
  url: i,
187
192
  entries: a(e.entries, i)
188
193
  }, o(e.entries, i);
@@ -194,47 +199,47 @@ function le(e, t) {
194
199
  entries: a(e, "")
195
200
  }, o(e, ""), n;
196
201
  }
197
- function F(e) {
198
- for (let t of e.entries) if (t.kind === "file" && L(t.item.filepath)) return t.item;
202
+ function I(e) {
203
+ for (let t of e.entries) if (t.kind === "file" && R(t.item.filepath)) return t.item;
199
204
  }
200
205
  function ue(e, t) {
201
206
  let n = v(y(e));
202
- return n ? _(n) : t;
207
+ return n ? g(n) : t;
203
208
  }
204
- function I(e, t) {
209
+ function L(e, t) {
205
210
  if (t !== void 0) return t;
206
211
  let n = x(e);
207
- if (L(e)) {
212
+ if (R(e)) {
208
213
  let t = v(y(e));
209
- return t ? _(t) : n;
214
+ return t ? g(t) : n;
210
215
  }
211
- return _(n);
216
+ return g(n);
212
217
  }
213
- function L(e) {
218
+ function R(e) {
214
219
  return x(e) === u;
215
220
  }
216
- function R(e) {
221
+ function z(e) {
217
222
  return e.kind === "dir" ? e.node.name : x(e.item.filepath);
218
223
  }
219
- function z(e, ...t) {
224
+ function B(e, ...t) {
220
225
  for (let n of t) {
221
226
  let t = e[n];
222
227
  if (typeof t == "string" && 0 < t.length) return t;
223
228
  }
224
229
  }
225
- function B(e) {
230
+ function V(e) {
226
231
  e.entries.sort((e, t) => {
227
- let n = R(e), r = R(t), i = g(n), a = g(r);
232
+ let n = z(e), r = z(t), i = h(n), a = h(r);
228
233
  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;
229
234
  });
230
- for (let t of e.entries) t.kind === "dir" && B(t.node);
235
+ for (let t of e.entries) t.kind === "dir" && V(t.node);
231
236
  }
232
- function V(e) {
237
+ function H(e) {
233
238
  let t = e.header.tags, n = Array.isArray(t) ? t.filter((e) => typeof e == "string") : [];
234
239
  return {
235
- name: I(e.filepath, e.label),
236
- url: A(e.filepath),
237
- description: z(e.header, "description", "summary") ?? e.excerpt,
240
+ name: L(e.filepath, e.label),
241
+ url: M(e.filepath),
242
+ description: B(e.header, "description", "summary") ?? e.excerpt,
238
243
  tags: 0 < n.length ? n : void 0,
239
244
  mtime: e.metadata?.mtime,
240
245
  schema: e.schema
@@ -242,7 +247,7 @@ function V(e) {
242
247
  }
243
248
  //#endregion
244
249
  //#region src/shared/utils/debounce.ts
245
- function H(e, t) {
250
+ function de(e, t) {
246
251
  let n;
247
252
  return (...r) => {
248
253
  clearTimeout(n), n = setTimeout(() => e(...r), t);
@@ -250,7 +255,7 @@ function H(e, t) {
250
255
  }
251
256
  //#endregion
252
257
  //#region src/shared/utils/field.ts
253
- function de(e) {
258
+ function fe(e) {
254
259
  return e.startsWith("_");
255
260
  }
256
261
  //#endregion
@@ -354,22 +359,22 @@ var U = /* @__PURE__ */ l((/* @__PURE__ */ o(((e, t) => {
354
359
  }) : typeof t == "object" && t.exports ? t.exports = c : e.striptags = c;
355
360
  })(e);
356
361
  })))(), 1);
357
- function fe(e) {
362
+ function pe(e) {
358
363
  return e.replaceAll("&", "&amp;").replaceAll("\"", "&quot;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
359
364
  }
360
- function pe(e) {
365
+ function me(e) {
361
366
  return W((0, U.default)(e)).replace(/\s+/g, " ").trim();
362
367
  }
363
- var me = /* @__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(".");
364
- function he(e) {
365
- return e === void 0 ? "" : (0, U.default)(e, me);
368
+ 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(".");
369
+ function ge(e) {
370
+ return e === void 0 ? "" : (0, U.default)(e, he);
366
371
  }
367
372
  function W(e) {
368
373
  return e.replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&quot;", "\"").replaceAll("&#39;", "'").replaceAll("&amp;", "&");
369
374
  }
370
375
  //#endregion
371
376
  //#region src/shared/utils/regex.ts
372
- function ge(e) {
377
+ function _e(e) {
373
378
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
374
379
  }
375
380
  //#endregion
@@ -382,7 +387,7 @@ function Q(e) {
382
387
  day: "numeric"
383
388
  });
384
389
  }
385
- function _e(e, t) {
390
+ function ve(e, t) {
386
391
  return typeof window > "u" ? "" : Math.floor(Date.now() / 1e3) - e < Z ? `${t} ${$(e)}` : `${t} at ${Q(e)}`;
387
392
  }
388
393
  function $(e) {
@@ -390,17 +395,17 @@ function $(e) {
390
395
  let t = Math.floor(Date.now() / 1e3) - e;
391
396
  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`;
392
397
  }
393
- var ve = new Intl.DateTimeFormat("en-US", {
398
+ var ye = new Intl.DateTimeFormat("en-US", {
394
399
  year: "numeric",
395
400
  month: "short",
396
401
  day: "numeric"
397
402
  });
398
- function ye(e) {
403
+ function be(e) {
399
404
  let t = new Date(e);
400
- return Number.isNaN(t.getTime()) ? e : ve.format(t);
405
+ return Number.isNaN(t.getTime()) ? e : ye.format(t);
401
406
  }
402
- function be(e) {
407
+ function xe(e) {
403
408
  return Math.floor(Date.now() / 1e3) - e < Z ? $(e) : Q(e);
404
409
  }
405
410
  //#endregion
406
- export { oe as A, _ as B, k as C, M as D, j as E, S as F, p as G, d as H, C as I, m as K, ee as L, P as M, v as N, N as O, b as P, T as R, O as S, ie as T, f as U, h as V, u as W, I as _, be as a, ne as b, he as c, de as d, H as f, ue as g, F as h, $ as i, se as j, ae as k, pe as l, le as m, ye as n, ge as o, ce as p, o as q, _e as r, fe as s, Q as t, W as u, L as v, A as w, re as x, D as y, g as z };
411
+ export { oe as A, h as B, j as C, P as D, N as E, S as F, u as G, m as H, C as I, o as J, p as K, _ as L, F as M, v as N, ie as O, b as P, T as R, A as S, re as T, d as U, g as V, f as W, L as _, xe as a, k as b, ge as c, fe as d, de as f, ue as g, I as h, $ as i, se as j, ae as k, me as l, le as m, be as n, _e as o, ce as p, ee as q, ve as r, pe as s, Q as t, W as u, R as v, M as w, ne as x, O as y, E as z };
package/dist/shared.js CHANGED
@@ -1,2 +1,2 @@
1
- import { A as e, B as t, C as n, D as r, E as i, G as a, H as o, K as s, L as c, M as l, O as u, S as d, T as f, U as p, V as m, W as h, _ as g, a as _, b as v, c as y, d as b, f as x, g as S, h as C, i as w, j as T, k as E, l as D, m as O, n as k, o as A, p as j, r as M, s as N, t as P, u as F, v as I, w as L, x as R, y as z, z as B } from "./shared-hpG9wf_j.js";
2
- export { o as CONTENT_EXTENSIONS, p as CONTENT_GLOB, m as EXTERNAL_URL_RE, h as INDEX_FILENAME, a as SEARCH_FIELDS, s as SEARCH_STORE_FIELDS, j as buildContentTree, O as buildDirectoryListingMap, x as debounce, N as escapeHtml, A as escapeRegex, P as formatAbsoluteTime, k as formatDateString, M as formatEditTime, w as formatRelativeTime, _ as formatTime, z as getAnchor, v as getDirectoryFromPageUrl, R as getDirectoryUrl, d as getIndexUrl, C as getNodeIndexItem, n as getParentUrl, L as getTdContentUrl, S as getTdIndexTitle, g as getTdResourceTitle, f as getUrlPath, b as isBuiltinField, I as isIndexFile, i as isIndexUrl, r as isUrlAncestorOf, u as isUrlExternal, E as isUrlToPage, B as parseNumericPrefix, c as path, e as resolveRootUrl, y as sanitizeInlineHtml, T as stripAnchor, D as stripHtml, l as stripTrailingSlash, F as unescapeHtml, t as unslugify };
1
+ import { A as e, B as t, C as n, D as r, E as i, G as a, H as o, K as s, L as c, M as l, O as u, S as d, T as f, U as p, V as m, W as h, _ as g, a as _, b as v, c as y, d as b, f as x, g as S, h as C, i as w, j as T, k as E, l as D, m as O, n as k, o as A, p as j, q as M, r as N, s as P, t as F, u as I, v as L, w as R, x as z, y as B } from "./shared-DwnQV3ZZ.js";
2
+ export { p as CONTENT_EXTENSIONS, h as CONTENT_GLOB, o as EXTERNAL_URL_RE, a as INDEX_FILENAME, s as SEARCH_FIELDS, M as SEARCH_STORE_FIELDS, j as buildContentTree, O as buildDirectoryListingMap, x as debounce, P as escapeHtml, A as escapeRegex, F as formatAbsoluteTime, k as formatDateString, N as formatEditTime, w as formatRelativeTime, _ as formatTime, B as getAnchor, v as getDirectoryFromPageUrl, z as getDirectoryUrl, d as getIndexUrl, C as getNodeIndexItem, n as getParentUrl, R as getTdContentUrl, S as getTdIndexTitle, g as getTdResourceTitle, f as getUrlPath, b as isBuiltinField, L as isIndexFile, i as isIndexUrl, r as isUrlAncestorOf, u as isUrlExternal, E as isUrlToPage, t as parseNumericPrefix, c as path, e as resolveRootUrl, y as sanitizeInlineHtml, T as stripAnchor, D as stripHtml, l as stripTrailingSlash, I as unescapeHtml, m as unslugify };