typerighter 0.40.3 → 0.40.6
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-GI_8rzn8.js → app-OdN7kiy-.js} +28 -28
- package/dist/{cli-DQKf3is3.js → cli-FDtyIPNk.js} +6 -6
- package/dist/cli.js +1 -1
- package/dist/client/theme-default.js +236 -236
- package/dist/client.js +1 -1
- package/dist/{context-CNTdcpo4.js → context-CSvoDxVt.js} +4 -2
- package/dist/index.js +2 -2
- package/dist/{init-Dq6msKwz.js → init-BdR4QzXX.js} +2 -2
- package/dist/{jsonld-Dxk0xvAr.js → jsonld-BoEW-5KW.js} +5 -5
- package/dist/node/lib/typedown-context.d.ts.map +1 -1
- package/dist/node/plugin/vite/index.d.ts.map +1 -1
- package/dist/node/plugin/vite/virtual/site-data.d.ts +1 -1
- package/dist/node/plugin/vite/virtual/site-data.d.ts.map +1 -1
- package/dist/prerenderWorker.js +2 -2
- package/dist/shared/types/content.d.ts +1 -1
- package/dist/shared/types/content.d.ts.map +1 -1
- package/dist/shared/types/ssg.d.ts +3 -3
- package/dist/shared/types/ssg.d.ts.map +1 -1
- package/dist/shared/utils/debounce.d.ts +1 -0
- package/dist/shared/utils/debounce.d.ts.map +1 -1
- package/dist/{shared-LPNgvigl.js → shared-DMNZD2i1.js} +26 -17
- package/dist/shared.js +2 -2
- package/dist/typerighter.css +1 -1
- package/dist/{vite-D6x3T--t.js → vite-BlO1hmkO.js} +326 -326
- package/dist/vite.js +1 -1
- package/package.json +3 -3
package/dist/client.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, r as i, s as a, t as o } from "./app-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, r as i, s as a, t as o } from "./app-OdN7kiy-.js";
|
|
2
2
|
export { a as Content, o as createTypedownApp, t as useRoute, r as useRouter, i as useSiteConfig, n as useSiteData, e as useTdContent };
|
|
@@ -54,10 +54,12 @@ var s = /\u001B\[[0-9;]*m/g, c = class {
|
|
|
54
54
|
for (let e of t) this.cachedFileMap.delete(e);
|
|
55
55
|
}), e.onContentDeleted(({ filepath: e }) => {
|
|
56
56
|
this.cachedFiles = void 0, this.cachedFileMap.delete(e);
|
|
57
|
-
}), e.onSchemaUpdated(({ schema: e }) => {
|
|
57
|
+
}), e.onSchemaUpdated(({ schema: e, affectedFiles: t = [] }) => {
|
|
58
58
|
this.cachedSchemas = void 0, this.cachedSchemaMap.delete(e);
|
|
59
|
-
|
|
59
|
+
for (let e of t) this.cachedFileMap.delete(e);
|
|
60
|
+
}), e.onSchemaDeleted(({ schema: e, affectedFiles: t = [] }) => {
|
|
60
61
|
this.cachedSchemas = void 0, this.cachedSchemaMap.delete(e);
|
|
62
|
+
for (let e of t) this.cachedFileMap.delete(e);
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
65
|
get rpc() {
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./vite-
|
|
2
|
-
import { t as r } from "./cli-
|
|
1
|
+
import { n as e, r as t, t as n } from "./vite-BlO1hmkO.js";
|
|
2
|
+
import { t as r } from "./cli-FDtyIPNk.js";
|
|
3
3
|
export { t as buildSite, r as cli, e as generateClientAppEntry, n as typedown };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-B0aSnxlc.js";
|
|
2
|
-
import { t } from "./context-
|
|
2
|
+
import { t } from "./context-CSvoDxVt.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";
|
|
@@ -750,7 +750,7 @@ function He(e) {
|
|
|
750
750
|
build: "typerighter build",
|
|
751
751
|
preview: "typerighter preview"
|
|
752
752
|
},
|
|
753
|
-
devDependencies: { typerighter: "^0.40.
|
|
753
|
+
devDependencies: { typerighter: "^0.40.6" }
|
|
754
754
|
}, void 0, 2) + "\n";
|
|
755
755
|
}
|
|
756
756
|
function Ue() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { W as e, c as t, i as n } from "./shared-DMNZD2i1.js";
|
|
2
2
|
//#region src/node/lib/htmlTemplate.ts
|
|
3
3
|
function r(e) {
|
|
4
4
|
let n = t(e.title), r = t(e.description), i = e.siteTitle !== void 0 && e.title !== e.siteTitle ? `${n} - ${t(e.siteTitle)}` : n, a = e.origin ?? "", o = e.canonicalUrl === void 0 ? void 0 : a + e.canonicalUrl, s = o === void 0 ? "" : `\n <link rel="canonical" href="${t(o)}">`, c = o === void 0 ? "" : `\n <meta property="og:url" content="${t(o)}">`, l = e.ogImagePath === void 0 ? `${a}${e.base}og-image.png` : `${a}${e.ogImagePath}`, u = e.author === void 0 ? "" : `\n <meta name="author" content="${t(e.author)}">`, d = e.siteTitle === void 0 ? "" : `\n <meta property="og:site_name" content="${t(e.siteTitle)}">`, f = a === "" ? "" : `\n <link rel="alternate" type="application/rss+xml" title="${e.siteTitle === void 0 ? "RSS Feed" : t(e.siteTitle)}" href="${a}${e.base}feed.xml">`, p = (e.jsonLdBlocks ?? []).map((e) => `\n <script type="application/ld+json">${e}<\/script>`).join(""), m = e.headExtra === void 0 ? "" : e.headExtra + "\n";
|
|
@@ -37,19 +37,19 @@ ${m} </head>
|
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/node/build/seo/page.ts
|
|
39
39
|
function i(e) {
|
|
40
|
-
return e.
|
|
40
|
+
return e.seoMetadata?.title ?? e.title;
|
|
41
41
|
}
|
|
42
42
|
function a(e) {
|
|
43
|
-
if (e.
|
|
43
|
+
if (e.seoMetadata?.description !== void 0) return e.seoMetadata.description;
|
|
44
44
|
let t = e.frontmatter.description;
|
|
45
45
|
return t === void 0 ? "" : String(t);
|
|
46
46
|
}
|
|
47
47
|
function o(e) {
|
|
48
|
-
let t = e.
|
|
48
|
+
let t = e.fileMetadata?.mtime;
|
|
49
49
|
return t === void 0 ? void 0 : n(t);
|
|
50
50
|
}
|
|
51
51
|
function s(e) {
|
|
52
|
-
return e.
|
|
52
|
+
return e.seoMetadata?.image;
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/node/build/seo/jsonld.ts
|
|
@@ -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;
|
|
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;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f;AAED,wBAAgB,QAAQ,CAAE,OAAO,GAAE,qBAA0B,GAAG,MAAM,EAAE,
|
|
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,CA8TvE"}
|
|
@@ -6,7 +6,7 @@ export declare class VirtualSiteData implements VirtualModule {
|
|
|
6
6
|
scan(rootDirectory: string): void;
|
|
7
7
|
load(_context: TypedownContext): string;
|
|
8
8
|
clear(): void;
|
|
9
|
-
fetch(context: TypedownContext, server?: ViteDevServer)
|
|
9
|
+
fetch: (context: TypedownContext, server?: ViteDevServer | undefined) => void;
|
|
10
10
|
fetchSync(context: TypedownContext): Promise<void>;
|
|
11
11
|
invalidate(server: ViteDevServer): void;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site-data.d.ts","sourceRoot":"","sources":["../../../../../src/node/plugin/vite/virtual/site-data.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,MAAM,CAAC;AACd,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"site-data.d.ts","sourceRoot":"","sources":["../../../../../src/node/plugin/vite/virtual/site-data.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,MAAM,CAAC;AACd,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,6BAA6B,CAAC;AA2BrC,qBAAa,eAAgB,YAAW,aAAa;IACnD,OAAO,CAAC,IAAI,CAAuB;IAGnC,IAAI,CAAE,aAAa,EAAE,MAAM,GAAG,IAAI;IAmBlC,IAAI,CAAE,QAAQ,EAAE,eAAe,GAAG,MAAM;IAWxC,KAAK,IAAK,IAAI;IAMd,KAAK,yEASG;IAGF,SAAS,CAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD,UAAU,CAAE,MAAM,EAAE,aAAa,GAAG,IAAI;CAGzC"}
|
package/dist/prerenderWorker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./jsonld-
|
|
1
|
+
import { P as e } from "./shared-DMNZD2i1.js";
|
|
2
|
+
import { a as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./jsonld-BoEW-5KW.js";
|
|
3
3
|
import { pathToFileURL as c } from "node:url";
|
|
4
4
|
import { parentPort as l, workerData as u } from "node:worker_threads";
|
|
5
5
|
//#region src/node/build/prerenderWorker.ts
|
|
@@ -18,7 +18,7 @@ export interface ContentSummary {
|
|
|
18
18
|
/** First paragraph of the body content */
|
|
19
19
|
excerpt?: string;
|
|
20
20
|
/** File metadata (absent during initial disk scan, populated after RPC) */
|
|
21
|
-
|
|
21
|
+
fileMetadata?: FileMetadata;
|
|
22
22
|
}
|
|
23
23
|
export interface ContentTree {
|
|
24
24
|
/** Interleaved files and directories at the root, sorted by numeric prefix */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/shared/types/content.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,uBAAuB;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB;IAChB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/shared/types/content.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,uBAAuB;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB;IAChB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,YAAY,CAAC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AAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,aAAa,GAAG,UAAU,GAAG,MAAM,CAAC;AAEtH,MAAM,WAAW,gBAAgB;IAC/B,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,CAAC;CACxC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -21,10 +21,10 @@ export interface PageData {
|
|
|
21
21
|
frontmatter: Record<string, unknown>;
|
|
22
22
|
headings: MarkdownHeading[];
|
|
23
23
|
title: string;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
fileMetadata?: FileMetadata;
|
|
25
|
+
seoMetadata?: SeoMeta;
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface SeoMeta {
|
|
28
28
|
title?: string;
|
|
29
29
|
description?: string;
|
|
30
30
|
image?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssg.d.ts","sourceRoot":"","sources":["../../../src/shared/types/ssg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAAE,GAAG,EACf,MAAM,KAAK,CAAC;AACb,OAAO,KAAK,EACV,WAAW,EAAE,YAAY,EAC1B,MAAM,WAAW,CAAC;AAEnB,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,uCAA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Y,CAAC,EAAE,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,OAAO;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,wCAAwC;IACxC,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACpB,yBAAyB;IACzB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1C,iBAAiB;IACjB,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnB,sBAAsB;IACtB,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CACtB"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare function debounce<T extends (...args: any[]) => any>(fn: T, ms: number): (...args: Parameters<T>) => void;
|
|
2
|
+
export declare function throttle<T extends (...args: any[]) => any>(fn: T, ms: number): (...args: Parameters<T>) => void;
|
|
2
3
|
//# sourceMappingURL=debounce.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/debounce.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,MAAM,GACT,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAOlC"}
|
|
1
|
+
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/debounce.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,MAAM,GACT,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAOlC;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,MAAM,GACT,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAmBlC"}
|
|
@@ -229,7 +229,7 @@ function L(e) {
|
|
|
229
229
|
url: w(e.filepath),
|
|
230
230
|
description: F(e.header, "description", "summary") ?? e.excerpt,
|
|
231
231
|
tags: 0 < n.length ? n : void 0,
|
|
232
|
-
mtime: e.
|
|
232
|
+
mtime: e.fileMetadata?.mtime,
|
|
233
233
|
schema: e.schema
|
|
234
234
|
};
|
|
235
235
|
}
|
|
@@ -241,14 +241,23 @@ function R(e, t) {
|
|
|
241
241
|
clearTimeout(n), n = setTimeout(() => e(...r), t);
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
|
+
function z(e, t) {
|
|
245
|
+
let n = 0, r;
|
|
246
|
+
return (...i) => {
|
|
247
|
+
let a = Date.now();
|
|
248
|
+
a - n >= t ? (n = a, e(...i)) : (clearTimeout(r), r = setTimeout(() => {
|
|
249
|
+
n = Date.now(), e(...i);
|
|
250
|
+
}, t - (a - n)));
|
|
251
|
+
};
|
|
252
|
+
}
|
|
244
253
|
//#endregion
|
|
245
254
|
//#region src/shared/utils/field.ts
|
|
246
|
-
function
|
|
255
|
+
function B(e) {
|
|
247
256
|
return e.startsWith("_");
|
|
248
257
|
}
|
|
249
258
|
//#endregion
|
|
250
259
|
//#region src/shared/utils/html.ts
|
|
251
|
-
var
|
|
260
|
+
var V = /* @__PURE__ */ t((/* @__PURE__ */ n(((e, t) => {
|
|
252
261
|
(function(e) {
|
|
253
262
|
if (typeof n != "function") {
|
|
254
263
|
var n = function(e) {
|
|
@@ -347,22 +356,22 @@ var B = /* @__PURE__ */ t((/* @__PURE__ */ n(((e, t) => {
|
|
|
347
356
|
}) : typeof t == "object" && t.exports ? t.exports = c : e.striptags = c;
|
|
348
357
|
})(e);
|
|
349
358
|
})))(), 1);
|
|
350
|
-
function
|
|
359
|
+
function H(e) {
|
|
351
360
|
return e.replaceAll("&", "&").replaceAll("\"", """).replaceAll("<", "<").replaceAll(">", ">");
|
|
352
361
|
}
|
|
353
|
-
function
|
|
354
|
-
return W((0,
|
|
362
|
+
function U(e) {
|
|
363
|
+
return W((0, V.default)(e)).replace(/\s+/g, " ").trim();
|
|
355
364
|
}
|
|
356
|
-
var
|
|
357
|
-
function
|
|
358
|
-
return e === void 0 ? "" : (0,
|
|
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
|
+
function de(e) {
|
|
367
|
+
return e === void 0 ? "" : (0, V.default)(e, ue);
|
|
359
368
|
}
|
|
360
369
|
function W(e) {
|
|
361
370
|
return e.replaceAll("<", "<").replaceAll(">", ">").replaceAll(""", "\"").replaceAll("'", "'").replaceAll("&", "&");
|
|
362
371
|
}
|
|
363
372
|
//#endregion
|
|
364
373
|
//#region src/shared/utils/regex.ts
|
|
365
|
-
function
|
|
374
|
+
function fe(e) {
|
|
366
375
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
367
376
|
}
|
|
368
377
|
//#endregion
|
|
@@ -375,7 +384,7 @@ function Q(e) {
|
|
|
375
384
|
day: "numeric"
|
|
376
385
|
});
|
|
377
386
|
}
|
|
378
|
-
function
|
|
387
|
+
function pe(e, t) {
|
|
379
388
|
return typeof window > "u" ? "" : Math.floor(Date.now() / 1e3) - e < Z ? `${t} ${$(e)}` : `${t} at ${Q(e)}`;
|
|
380
389
|
}
|
|
381
390
|
function $(e) {
|
|
@@ -383,20 +392,20 @@ function $(e) {
|
|
|
383
392
|
let t = Math.floor(Date.now() / 1e3) - e;
|
|
384
393
|
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`;
|
|
385
394
|
}
|
|
386
|
-
var
|
|
395
|
+
var me = new Intl.DateTimeFormat("en-US", {
|
|
387
396
|
year: "numeric",
|
|
388
397
|
month: "short",
|
|
389
398
|
day: "numeric"
|
|
390
399
|
});
|
|
391
|
-
function
|
|
400
|
+
function he(e) {
|
|
392
401
|
let t = new Date(e);
|
|
393
|
-
return Number.isNaN(t.getTime()) ? e :
|
|
402
|
+
return Number.isNaN(t.getTime()) ? e : me.format(t);
|
|
394
403
|
}
|
|
395
|
-
function
|
|
404
|
+
function ge(e) {
|
|
396
405
|
return new Date(e).toISOString().slice(0, 10);
|
|
397
406
|
}
|
|
398
|
-
function
|
|
407
|
+
function _e(e) {
|
|
399
408
|
return Math.floor(Date.now() / 1e3) - e < Z ? $(e) : Q(e);
|
|
400
409
|
}
|
|
401
410
|
//#endregion
|
|
402
|
-
export {
|
|
411
|
+
export { oe as A, d as B, re as C, ie as D, w as E, A as F, c as G, b as H, f as I, r as J, i as K, m as L, D as M, O as N, T as O, k as P, g as R, ne as S, C as T, l as U, y as V, u as W, s as X, o as Y, j as _, $ as a, N as b, H as c, W as d, B as f, ce as g, se as h, ge as i, E as j, ae as k, de as l, z as m, he as n, _e as o, R as p, a as q, pe as r, fe as s, Q as t, U as u, le as v, S as w, te as x, M as y, _ as z };
|
package/dist/shared.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
export {
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, J as s, K as c, M as l, N as u, O as d, P as f, S as p, T as m, U as h, W as g, X as _, Y as v, _ as y, a as b, b as x, c as S, d as C, f as w, g as T, h as E, i as D, j as O, k, l as A, m as j, n as M, o as N, p as P, q as F, r as I, s as L, t as R, u as z, v as B, w as V, x as H, y as U } from "./shared-DMNZD2i1.js";
|
|
2
|
+
export { c as CONTENT_EXTENSIONS, F as CONTENT_GLOB, o as EXTERNAL_URL_RE, s as INDEX_FILENAME, v as SEARCH_FIELDS, _ as SEARCH_STORE_FIELDS, E as buildContentTree, T as buildDirectoryListingMap, P as debounce, S as escapeHtml, L as escapeRegex, R as formatAbsoluteTime, M as formatDateString, I as formatEditTime, D as formatIsoDate, b as formatRelativeTime, N as formatTime, H as getAnchor, p as getDirectoryFromPageUrl, n as getDirectoryUrl, V as getIndexUrl, y as getNodeIndexItem, m as getParentUrl, i as getTdContentUrl, B as getTdIndexTitle, U as getTdResourceTitle, r as getUrlPath, w as isBuiltinField, x as isIndexFile, d as isIndexUrl, k as isUrlAncestorOf, e as isUrlExternal, O as isUrlToPage, h as parseNumericPrefix, t as path, l as resolveRootUrl, A as sanitizeInlineHtml, u as stripAnchor, z as stripHtml, f as stripLeadingSlash, a as stripTrailingSlash, j as throttle, C as unescapeHtml, g as unslugify };
|