@pagesmith/core 0.3.0 → 0.4.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/README.md +28 -4
- package/REFERENCE.md +163 -94
- package/dist/ai/index.d.mts +5 -3
- package/dist/ai/index.d.mts.map +1 -1
- package/dist/ai/index.mjs +300 -206
- package/dist/ai/index.mjs.map +1 -1
- package/dist/assets/index.d.mts +10 -1
- package/dist/assets/index.d.mts.map +1 -1
- package/dist/assets/index.mjs +2 -2
- package/dist/{assets-DXiWF_KI.mjs → assets-CAPOqQ_P.mjs} +42 -5
- package/dist/assets-CAPOqQ_P.mjs.map +1 -0
- package/dist/{content-config-Bfe4W9us.d.mts → content-config-Bu2HH0Yx.d.mts} +49 -17
- package/dist/{content-config-Bfe4W9us.d.mts.map → content-config-Bu2HH0Yx.d.mts.map} +1 -1
- package/dist/{content-layer-DPK1EmfY.mjs → content-layer-CJRrNpZ_.mjs} +192 -36
- package/dist/content-layer-CJRrNpZ_.mjs.map +1 -0
- package/dist/content-layer-Ckt08g2i.d.mts +122 -0
- package/dist/content-layer-Ckt08g2i.d.mts.map +1 -0
- package/dist/create/index.d.mts.map +1 -1
- package/dist/create/index.mjs +31 -30
- package/dist/create/index.mjs.map +1 -1
- package/dist/css/index.d.mts +1 -1
- package/dist/css/index.mjs +1 -1
- package/dist/css-CO3CBqxx.mjs +24 -0
- package/dist/css-CO3CBqxx.mjs.map +1 -0
- package/dist/heading-D4X2L4vd.d.mts +12 -0
- package/dist/heading-D4X2L4vd.d.mts.map +1 -0
- package/dist/{index-BBYkDxwI.d.mts → index-B4YZRIzb.d.mts} +1 -1
- package/dist/{index-BBYkDxwI.d.mts.map → index-B4YZRIzb.d.mts.map} +1 -1
- package/dist/{index-Bg9srb5U.d.mts → index-B7NRZAxd.d.mts} +1 -1
- package/dist/{index-Bg9srb5U.d.mts.map → index-B7NRZAxd.d.mts.map} +1 -1
- package/dist/{index-YXQxMV6J.d.mts → index-CryArLlX.d.mts} +2 -2
- package/dist/{index-YXQxMV6J.d.mts.map → index-CryArLlX.d.mts.map} +1 -1
- package/dist/{index-CbOKbkjJ.d.mts → index-D44syBt-.d.mts} +3 -2
- package/dist/index-D44syBt-.d.mts.map +1 -0
- package/dist/index.d.mts +16 -99
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +15 -11
- package/dist/index.mjs.map +1 -1
- package/dist/loaders/index.d.mts +2 -2
- package/dist/loaders/index.mjs +1 -1
- package/dist/{loaders-Cf-BXf2L.mjs → loaders-DnyWfANR.mjs} +3 -3
- package/dist/loaders-DnyWfANR.mjs.map +1 -0
- package/dist/markdown/index.d.mts +2 -2
- package/dist/markdown/index.mjs +1 -1
- package/dist/{markdown-CyrHoDhP.mjs → markdown-DMHd400a.mjs} +29 -2
- package/dist/markdown-DMHd400a.mjs.map +1 -0
- package/dist/{heading-BpDXnl-7.d.mts → markdown-config-CDvh5aJ-.d.mts} +2 -10
- package/dist/markdown-config-CDvh5aJ-.d.mts.map +1 -0
- package/dist/mcp/index.d.mts +23 -0
- package/dist/mcp/index.d.mts.map +1 -0
- package/dist/mcp/index.mjs +2 -0
- package/dist/mcp/server.d.mts +13 -0
- package/dist/mcp/server.d.mts.map +1 -0
- package/dist/mcp/server.mjs +2 -0
- package/dist/runtime/index.d.mts.map +1 -1
- package/dist/runtime/index.mjs +4 -9
- package/dist/runtime/index.mjs.map +1 -1
- package/dist/schemas/index.d.mts +4 -3
- package/dist/server-BZA_iSen.mjs +203 -0
- package/dist/server-BZA_iSen.mjs.map +1 -0
- package/dist/ssg-utils/index.d.mts +51 -0
- package/dist/ssg-utils/index.d.mts.map +1 -0
- package/dist/ssg-utils/index.mjs +119 -0
- package/dist/ssg-utils/index.mjs.map +1 -0
- package/dist/{types-Cn52sdoq.d.mts → types-B-V5qemH.d.mts} +1 -1
- package/dist/{types-Cn52sdoq.d.mts.map → types-B-V5qemH.d.mts.map} +1 -1
- package/dist/vite/index.d.mts +69 -34
- package/dist/vite/index.d.mts.map +1 -1
- package/dist/vite/index.mjs +296 -228
- package/dist/vite/index.mjs.map +1 -1
- package/docs/agents/AGENTS.md.template +29 -0
- package/docs/agents/changelog-notes.md +15 -0
- package/docs/agents/errors.md +150 -0
- package/docs/agents/migration.md +25 -0
- package/docs/agents/recipes.md +50 -0
- package/docs/agents/usage.md +119 -0
- package/docs/llms-full.txt +111 -0
- package/docs/llms.txt +68 -0
- package/package.json +57 -4
- package/dist/assets-DXiWF_KI.mjs.map +0 -1
- package/dist/content-layer-DPK1EmfY.mjs.map +0 -1
- package/dist/css-BneO430t.mjs +0 -20
- package/dist/css-BneO430t.mjs.map +0 -1
- package/dist/heading-BpDXnl-7.d.mts.map +0 -1
- package/dist/index-CbOKbkjJ.d.mts.map +0 -1
- package/dist/loaders-Cf-BXf2L.mjs.map +0 -1
- package/dist/markdown-CyrHoDhP.mjs.map +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { t as Heading } from "../heading-D4X2L4vd.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/ssg-utils/index.d.ts
|
|
4
|
+
type MarkdownEntry<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
5
|
+
contentSlug: string;
|
|
6
|
+
html: string;
|
|
7
|
+
headings: Heading[];
|
|
8
|
+
frontmatter: T;
|
|
9
|
+
};
|
|
10
|
+
type NavEntry = {
|
|
11
|
+
slug: string;
|
|
12
|
+
title: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
url: string;
|
|
15
|
+
date?: string;
|
|
16
|
+
tags?: string[];
|
|
17
|
+
};
|
|
18
|
+
type NavGroup = {
|
|
19
|
+
series: string;
|
|
20
|
+
items: NavEntry[];
|
|
21
|
+
};
|
|
22
|
+
declare const menuIcon = "<svg viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"><path d=\"M3 5h14M3 10h14M3 15h14\"/></svg>";
|
|
23
|
+
declare const closeIcon = "<svg viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"><path d=\"m5 5 10 10M15 5 5 15\"/></svg>";
|
|
24
|
+
declare const searchIcon = "<svg viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"><circle cx=\"8.5\" cy=\"8.5\" r=\"5.5\"/><path d=\"m13 13 4 4\"/></svg>";
|
|
25
|
+
declare function normalizeRoute(url: string, base: string): string;
|
|
26
|
+
declare function leafSlug(contentSlug: string, collection: string): string;
|
|
27
|
+
declare function routeFor(entry: MarkdownEntry, collection: string, options?: {
|
|
28
|
+
topLevel?: string[];
|
|
29
|
+
}): string;
|
|
30
|
+
declare function getTime(date: string | Date | undefined): number;
|
|
31
|
+
declare function toIso(date: string | Date | undefined): string | undefined;
|
|
32
|
+
declare function formatDate(iso: string): string;
|
|
33
|
+
declare function estimateReadTime(html: string): number;
|
|
34
|
+
declare function escapeHtml(value: string): string;
|
|
35
|
+
declare function buildNavEntries(entries: MarkdownEntry[], base: string, section: string): NavEntry[];
|
|
36
|
+
declare function groupByField(entries: MarkdownEntry[], base: string, section: string, field: string, fallback?: string): NavGroup[];
|
|
37
|
+
type DocumentShellOptions = {
|
|
38
|
+
title: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
basePath: string;
|
|
41
|
+
cssPath: string;
|
|
42
|
+
jsPath?: string;
|
|
43
|
+
searchEnabled?: boolean;
|
|
44
|
+
bodyHtml: string;
|
|
45
|
+
sidebarHtml?: string;
|
|
46
|
+
headHtml?: string;
|
|
47
|
+
};
|
|
48
|
+
declare function renderDocumentShell(options: DocumentShellOptions): string;
|
|
49
|
+
//#endregion
|
|
50
|
+
export { DocumentShellOptions, type Heading, MarkdownEntry, NavEntry, NavGroup, buildNavEntries, closeIcon, escapeHtml, estimateReadTime, formatDate, getTime, groupByField, leafSlug, menuIcon, normalizeRoute, renderDocumentShell, routeFor, searchIcon, toIso };
|
|
51
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/ssg-utils/index.ts"],"mappings":";;;KAcY,aAAA,WAAwB,MAAA,oBAA0B,MAAA;EAC5D,WAAA;EACA,IAAA;EACA,QAAA,EAAU,OAAA;EACV,WAAA,EAAa,CAAA;AAAA;AAAA,KAGH,QAAA;EACV,IAAA;EACA,KAAA;EACA,WAAA;EACA,GAAA;EACA,IAAA;EACA,IAAA;AAAA;AAAA,KAGU,QAAA;EACV,MAAA;EACA,KAAA,EAAO,QAAA;AAAA;AAAA,cAKI,QAAA;AAAA,cAEA,SAAA;AAAA,cAEA,UAAA;AAAA,iBAKG,cAAA,CAAe,GAAA,UAAa,IAAA;AAAA,iBAO5B,QAAA,CAAS,WAAA,UAAqB,UAAA;AAAA,iBAK9B,QAAA,CACd,KAAA,EAAO,aAAA,EACP,UAAA,UACA,OAAA;EAAY,QAAA;AAAA;AAAA,iBASE,OAAA,CAAQ,IAAA,WAAe,IAAA;AAAA,iBAKvB,KAAA,CAAM,IAAA,WAAe,IAAA;AAAA,iBAKrB,UAAA,CAAW,GAAA;AAAA,iBAWX,gBAAA,CAAiB,IAAA;AAAA,iBAKjB,UAAA,CAAW,KAAA;AAAA,iBASX,eAAA,CACd,OAAA,EAAS,aAAA,IACT,IAAA,UACA,OAAA,WACC,QAAA;AAAA,iBAWa,YAAA,CACd,OAAA,EAAS,aAAA,IACT,IAAA,UACA,OAAA,UACA,KAAA,UACA,QAAA,YACC,QAAA;AAAA,KAuBS,oBAAA;EACV,KAAA;EACA,WAAA;EACA,QAAA;EACA,OAAA;EACA,MAAA;EACA,aAAA;EACA,QAAA;EACA,WAAA;EACA,QAAA;AAAA;AAAA,iBAGc,mBAAA,CAAoB,OAAA,EAAS,oBAAA"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
//#region src/ssg-utils/index.ts
|
|
2
|
+
const menuIcon = "<svg viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"><path d=\"M3 5h14M3 10h14M3 15h14\"/></svg>";
|
|
3
|
+
const closeIcon = "<svg viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"><path d=\"m5 5 10 10M15 5 5 15\"/></svg>";
|
|
4
|
+
const searchIcon = "<svg viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"><circle cx=\"8.5\" cy=\"8.5\" r=\"5.5\"/><path d=\"m13 13 4 4\"/></svg>";
|
|
5
|
+
function normalizeRoute(url, base) {
|
|
6
|
+
if (!base || !url.startsWith(base)) return url === "" ? "/" : url;
|
|
7
|
+
const trimmed = url.slice(base.length);
|
|
8
|
+
if (trimmed === "") return "/";
|
|
9
|
+
return trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
|
|
10
|
+
}
|
|
11
|
+
function leafSlug(contentSlug, collection) {
|
|
12
|
+
const escaped = collection.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
13
|
+
return contentSlug.replace(new RegExp(`^${escaped}/`), "");
|
|
14
|
+
}
|
|
15
|
+
function routeFor(entry, collection, options) {
|
|
16
|
+
const slug = leafSlug(entry.contentSlug, collection);
|
|
17
|
+
return (options?.topLevel ?? ["pages"]).includes(collection) ? `/${slug}` : `/${collection}/${slug}`;
|
|
18
|
+
}
|
|
19
|
+
function getTime(date) {
|
|
20
|
+
if (!date) return 0;
|
|
21
|
+
return date instanceof Date ? date.getTime() : new Date(date).getTime();
|
|
22
|
+
}
|
|
23
|
+
function toIso(date) {
|
|
24
|
+
if (!date) return void 0;
|
|
25
|
+
return (date instanceof Date ? date : new Date(date)).toISOString();
|
|
26
|
+
}
|
|
27
|
+
function formatDate(iso) {
|
|
28
|
+
return new Date(iso).toLocaleDateString("en-US", {
|
|
29
|
+
year: "numeric",
|
|
30
|
+
month: "long",
|
|
31
|
+
day: "numeric"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function estimateReadTime(html) {
|
|
35
|
+
const text = html.replace(/<[^>]+>/g, " ");
|
|
36
|
+
return Math.max(1, Math.ceil(text.split(/\s+/).filter(Boolean).length / 200));
|
|
37
|
+
}
|
|
38
|
+
function escapeHtml(value) {
|
|
39
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
40
|
+
}
|
|
41
|
+
function buildNavEntries(entries, base, section) {
|
|
42
|
+
return entries.map((entry) => ({
|
|
43
|
+
slug: leafSlug(entry.contentSlug, section),
|
|
44
|
+
title: entry.frontmatter.title ?? "",
|
|
45
|
+
description: entry.frontmatter.description,
|
|
46
|
+
url: `${base}/${section}/${leafSlug(entry.contentSlug, section)}`,
|
|
47
|
+
date: toIso(entry.frontmatter.date),
|
|
48
|
+
tags: entry.frontmatter.tags ?? []
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
function groupByField(entries, base, section, field, fallback = "Other") {
|
|
52
|
+
const groups = [];
|
|
53
|
+
const seen = /* @__PURE__ */ new Map();
|
|
54
|
+
for (const entry of entries) {
|
|
55
|
+
const series = entry.frontmatter[field] ?? fallback;
|
|
56
|
+
if (!seen.has(series)) {
|
|
57
|
+
const items = [];
|
|
58
|
+
seen.set(series, items);
|
|
59
|
+
groups.push({
|
|
60
|
+
series,
|
|
61
|
+
items
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
seen.get(series).push({
|
|
65
|
+
slug: leafSlug(entry.contentSlug, section),
|
|
66
|
+
title: entry.frontmatter.title ?? "",
|
|
67
|
+
url: `${base}/${section}/${leafSlug(entry.contentSlug, section)}`
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return groups;
|
|
71
|
+
}
|
|
72
|
+
function renderDocumentShell(options) {
|
|
73
|
+
const { title, description, basePath, cssPath, jsPath, searchEnabled, bodyHtml, sidebarHtml, headHtml } = options;
|
|
74
|
+
const base = basePath.replace(/\/+$/, "");
|
|
75
|
+
return `<html lang="en" class="no-js">
|
|
76
|
+
<head>
|
|
77
|
+
<meta charset="utf-8" />
|
|
78
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
79
|
+
<meta name="color-scheme" content="light dark" />
|
|
80
|
+
<title>${escapeHtml(title)}</title>
|
|
81
|
+
${description ? `<meta name="description" content="${escapeHtml(description)}" />` : ""}
|
|
82
|
+
<meta property="og:type" content="website" />
|
|
83
|
+
<meta property="og:title" content="${escapeHtml(title)}" />
|
|
84
|
+
${description ? `<meta property="og:description" content="${escapeHtml(description)}" />` : ""}
|
|
85
|
+
<link rel="icon" href="${base}/favicon.svg" type="image/svg+xml" />
|
|
86
|
+
<link rel="stylesheet" href="${base}/assets/fonts.css" />
|
|
87
|
+
<link rel="stylesheet" href="${cssPath}" />
|
|
88
|
+
${searchEnabled ? `<link rel="stylesheet" href="${base}/pagefind/pagefind-ui.css" />` : ""}
|
|
89
|
+
<script>document.documentElement.classList.remove('no-js')<\/script>
|
|
90
|
+
${searchEnabled ? `<script src="${base}/pagefind/pagefind-ui.js" defer><\/script>` : ""}
|
|
91
|
+
${searchEnabled ? "<noscript><style>.doc-search-trigger{display:none!important}</style></noscript>" : ""}
|
|
92
|
+
${headHtml ?? ""}
|
|
93
|
+
</head>
|
|
94
|
+
<body>
|
|
95
|
+
${bodyHtml}
|
|
96
|
+
${sidebarHtml ? `<dialog class="doc-sidebar-modal" id="sidebar-modal">
|
|
97
|
+
<div class="doc-sidebar-modal-backdrop" data-sidebar-close=""></div>
|
|
98
|
+
<div class="doc-sidebar-modal-panel">
|
|
99
|
+
<button type="button" class="doc-sidebar-modal-close" data-sidebar-close="" aria-label="Close navigation">${closeIcon}</button>
|
|
100
|
+
<nav class="doc-sidebar-nav" aria-label="Sidebar navigation">${sidebarHtml}</nav>
|
|
101
|
+
</div>
|
|
102
|
+
</dialog>` : ""}
|
|
103
|
+
${searchEnabled ? `<dialog class="doc-search-modal" id="search-modal" aria-label="Search" data-search-show-images="false" data-search-show-sub-results="true">
|
|
104
|
+
<div class="doc-search-modal-inner">
|
|
105
|
+
<div class="doc-search-modal-header">
|
|
106
|
+
<span class="doc-search-modal-title">Search</span>
|
|
107
|
+
<button type="button" class="doc-search-modal-close" aria-label="Close" data-search-close="">${closeIcon}</button>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="doc-search-modal-body" id="search-container" data-pagefind-search=""></div>
|
|
110
|
+
</div>
|
|
111
|
+
</dialog>` : ""}
|
|
112
|
+
${jsPath ? `<script src="${jsPath}" defer><\/script>` : ""}
|
|
113
|
+
</body>
|
|
114
|
+
</html>`;
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { buildNavEntries, closeIcon, escapeHtml, estimateReadTime, formatDate, getTime, groupByField, leafSlug, menuIcon, normalizeRoute, renderDocumentShell, routeFor, searchIcon, toIso };
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/ssg-utils/index.ts"],"sourcesContent":["/**\n * Shared SSG utilities for framework example sites.\n *\n * Provides types that match virtual module output, icon SVGs,\n * route helpers, date formatting, and HTML document rendering\n * used across all framework examples.\n */\n\nimport type { Heading } from '../schemas/heading'\n\n// ── Types ──\n\nexport type { Heading }\n\nexport type MarkdownEntry<T extends Record<string, unknown> = Record<string, unknown>> = {\n contentSlug: string\n html: string\n headings: Heading[]\n frontmatter: T\n}\n\nexport type NavEntry = {\n slug: string\n title: string\n description?: string\n url: string\n date?: string\n tags?: string[]\n}\n\nexport type NavGroup = {\n series: string\n items: NavEntry[]\n}\n\n// ── Icons ──\n\nexport const menuIcon =\n '<svg viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"><path d=\"M3 5h14M3 10h14M3 15h14\"/></svg>'\nexport const closeIcon =\n '<svg viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"><path d=\"m5 5 10 10M15 5 5 15\"/></svg>'\nexport const searchIcon =\n '<svg viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"><circle cx=\"8.5\" cy=\"8.5\" r=\"5.5\"/><path d=\"m13 13 4 4\"/></svg>'\n\n// ── Route helpers ──\n\nexport function normalizeRoute(url: string, base: string): string {\n if (!base || !url.startsWith(base)) return url === '' ? '/' : url\n const trimmed = url.slice(base.length)\n if (trimmed === '') return '/'\n return trimmed.startsWith('/') ? trimmed : `/${trimmed}`\n}\n\nexport function leafSlug(contentSlug: string, collection: string): string {\n const escaped = collection.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n return contentSlug.replace(new RegExp(`^${escaped}/`), '')\n}\n\nexport function routeFor(\n entry: MarkdownEntry,\n collection: string,\n options?: { topLevel?: string[] },\n): string {\n const slug = leafSlug(entry.contentSlug, collection)\n const topLevel = options?.topLevel ?? ['pages']\n return topLevel.includes(collection) ? `/${slug}` : `/${collection}/${slug}`\n}\n\n// ── Date helpers ──\n\nexport function getTime(date: string | Date | undefined): number {\n if (!date) return 0\n return date instanceof Date ? date.getTime() : new Date(date).getTime()\n}\n\nexport function toIso(date: string | Date | undefined): string | undefined {\n if (!date) return undefined\n return (date instanceof Date ? date : new Date(date)).toISOString()\n}\n\nexport function formatDate(iso: string): string {\n const date = new Date(iso)\n return date.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n })\n}\n\n// ── Content helpers ──\n\nexport function estimateReadTime(html: string): number {\n const text = html.replace(/<[^>]+>/g, ' ')\n return Math.max(1, Math.ceil(text.split(/\\s+/).filter(Boolean).length / 200))\n}\n\nexport function escapeHtml(value: string): string {\n return value\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n}\n\nexport function buildNavEntries(\n entries: MarkdownEntry[],\n base: string,\n section: string,\n): NavEntry[] {\n return entries.map((entry) => ({\n slug: leafSlug(entry.contentSlug, section),\n title: (entry.frontmatter.title as string) ?? '',\n description: entry.frontmatter.description as string | undefined,\n url: `${base}/${section}/${leafSlug(entry.contentSlug, section)}`,\n date: toIso(entry.frontmatter.date as string | Date | undefined),\n tags: (entry.frontmatter.tags as string[]) ?? [],\n }))\n}\n\nexport function groupByField(\n entries: MarkdownEntry[],\n base: string,\n section: string,\n field: string,\n fallback = 'Other',\n): NavGroup[] {\n const groups: NavGroup[] = []\n const seen = new Map<string, NavEntry[]>()\n\n for (const entry of entries) {\n const series = (entry.frontmatter[field] as string) ?? fallback\n if (!seen.has(series)) {\n const items: NavEntry[] = []\n seen.set(series, items)\n groups.push({ series, items })\n }\n seen.get(series)!.push({\n slug: leafSlug(entry.contentSlug, section),\n title: (entry.frontmatter.title as string) ?? '',\n url: `${base}/${section}/${leafSlug(entry.contentSlug, section)}`,\n })\n }\n\n return groups\n}\n\n// ── HTML document shell ──\n\nexport type DocumentShellOptions = {\n title: string\n description?: string\n basePath: string\n cssPath: string\n jsPath?: string\n searchEnabled?: boolean\n bodyHtml: string\n sidebarHtml?: string\n headHtml?: string\n}\n\nexport function renderDocumentShell(options: DocumentShellOptions): string {\n const {\n title,\n description,\n basePath,\n cssPath,\n jsPath,\n searchEnabled,\n bodyHtml,\n sidebarHtml,\n headHtml,\n } = options\n const base = basePath.replace(/\\/+$/, '')\n\n return `<html lang=\"en\" class=\"no-js\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <meta name=\"color-scheme\" content=\"light dark\" />\n <title>${escapeHtml(title)}</title>\n ${description ? `<meta name=\"description\" content=\"${escapeHtml(description)}\" />` : ''}\n <meta property=\"og:type\" content=\"website\" />\n <meta property=\"og:title\" content=\"${escapeHtml(title)}\" />\n ${description ? `<meta property=\"og:description\" content=\"${escapeHtml(description)}\" />` : ''}\n <link rel=\"icon\" href=\"${base}/favicon.svg\" type=\"image/svg+xml\" />\n <link rel=\"stylesheet\" href=\"${base}/assets/fonts.css\" />\n <link rel=\"stylesheet\" href=\"${cssPath}\" />\n ${searchEnabled ? `<link rel=\"stylesheet\" href=\"${base}/pagefind/pagefind-ui.css\" />` : ''}\n <script>document.documentElement.classList.remove('no-js')</script>\n ${searchEnabled ? `<script src=\"${base}/pagefind/pagefind-ui.js\" defer></script>` : ''}\n ${searchEnabled ? '<noscript><style>.doc-search-trigger{display:none!important}</style></noscript>' : ''}\n ${headHtml ?? ''}\n </head>\n <body>\n ${bodyHtml}\n ${\n sidebarHtml\n ? `<dialog class=\"doc-sidebar-modal\" id=\"sidebar-modal\">\n <div class=\"doc-sidebar-modal-backdrop\" data-sidebar-close=\"\"></div>\n <div class=\"doc-sidebar-modal-panel\">\n <button type=\"button\" class=\"doc-sidebar-modal-close\" data-sidebar-close=\"\" aria-label=\"Close navigation\">${closeIcon}</button>\n <nav class=\"doc-sidebar-nav\" aria-label=\"Sidebar navigation\">${sidebarHtml}</nav>\n </div>\n </dialog>`\n : ''\n }\n ${\n searchEnabled\n ? `<dialog class=\"doc-search-modal\" id=\"search-modal\" aria-label=\"Search\" data-search-show-images=\"false\" data-search-show-sub-results=\"true\">\n <div class=\"doc-search-modal-inner\">\n <div class=\"doc-search-modal-header\">\n <span class=\"doc-search-modal-title\">Search</span>\n <button type=\"button\" class=\"doc-search-modal-close\" aria-label=\"Close\" data-search-close=\"\">${closeIcon}</button>\n </div>\n <div class=\"doc-search-modal-body\" id=\"search-container\" data-pagefind-search=\"\"></div>\n </div>\n </dialog>`\n : ''\n }\n ${jsPath ? `<script src=\"${jsPath}\" defer></script>` : ''}\n </body>\n</html>`\n}\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-B-V5qemH.d.mts","names":[],"sources":["../src/loaders/types.ts"],"mappings":";;AAOA;;;;;KAAY,UAAA;AAAA,KACA,UAAA;AAAA,UAEK,YAAA;EAFK;EAIpB,IAAA,EAAM,MAAA;EAFS;EAIf,OAAA;AAAA;AAAA,UAGe,MAAA;EALf;EAOA,IAAA;EALA;EAOA,IAAA,EAAM,UAAA;EAPC;EASP,UAAA;EANqB;EAQrB,IAAA,CAAK,QAAA,WAAmB,OAAA,CAAQ,YAAA;AAAA"}
|
package/dist/vite/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { a as CollectionMap, i as CollectionDef, o as InferCollectionData, t as ContentLayerConfig } from "../content-config-
|
|
3
|
-
import { t as Heading } from "../heading-
|
|
2
|
+
import { a as CollectionMap, i as CollectionDef, o as InferCollectionData, t as ContentLayerConfig } from "../content-config-Bu2HH0Yx.mjs";
|
|
3
|
+
import { t as Heading } from "../heading-D4X2L4vd.mjs";
|
|
4
4
|
import * as http from "node:http";
|
|
5
5
|
import { Agent, ClientRequest, ClientRequestArgs, OutgoingHttpHeaders } from "node:http";
|
|
6
6
|
import { Http2SecureServer } from "node:http2";
|
|
@@ -62,7 +62,7 @@ declare function prerenderRoutes(options: PrerenderOptions): Promise<{
|
|
|
62
62
|
pages: number;
|
|
63
63
|
}>;
|
|
64
64
|
//#endregion
|
|
65
|
-
//#region ../../node_modules/vite/
|
|
65
|
+
//#region ../../node_modules/vite/types/hmrPayload.d.ts
|
|
66
66
|
type HotPayload = ConnectedPayload | PingPayload | UpdatePayload | FullReloadPayload | CustomPayload | ErrorPayload | PrunePayload;
|
|
67
67
|
interface ConnectedPayload {
|
|
68
68
|
type: 'connected';
|
|
@@ -127,7 +127,7 @@ interface ErrorPayload {
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
//#endregion
|
|
130
|
-
//#region ../../node_modules/vite/dist/
|
|
130
|
+
//#region ../../node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts
|
|
131
131
|
//#region src/shared/invokeMethods.d.ts
|
|
132
132
|
interface FetchFunctionOptions {
|
|
133
133
|
cached?: boolean;
|
|
@@ -180,7 +180,7 @@ interface ViteFetchResult {
|
|
|
180
180
|
invalidate: boolean;
|
|
181
181
|
}
|
|
182
182
|
//#endregion
|
|
183
|
-
//#region ../../node_modules/vite/
|
|
183
|
+
//#region ../../node_modules/vite/types/customEvent.d.ts
|
|
184
184
|
interface CustomEventMap {
|
|
185
185
|
// client events
|
|
186
186
|
'vite:beforeUpdate': UpdatePayload;
|
|
@@ -241,7 +241,7 @@ type ForwardConsolePayload = {
|
|
|
241
241
|
*/
|
|
242
242
|
type InferCustomEventPayload<T extends string> = T extends keyof CustomEventMap ? CustomEventMap[T] : any;
|
|
243
243
|
//#endregion
|
|
244
|
-
//#region ../../node_modules/vite/
|
|
244
|
+
//#region ../../node_modules/vite/node_modules/rolldown/dist/shared/logging-C6h4g8dA.d.mts
|
|
245
245
|
//#region src/log/logging.d.ts
|
|
246
246
|
/** @inline */
|
|
247
247
|
type LogLevel$1 = "info" | "debug" | "warn";
|
|
@@ -291,7 +291,7 @@ interface RolldownError extends RolldownLog {
|
|
|
291
291
|
}
|
|
292
292
|
type LogOrStringHandler = (level: LogLevelWithError, log: RolldownLogWithString) => void; //#endregion
|
|
293
293
|
//#endregion
|
|
294
|
-
//#region ../../node_modules/@oxc-project/types/types.d.ts
|
|
294
|
+
//#region ../../node_modules/vite/node_modules/@oxc-project/types/types.d.ts
|
|
295
295
|
// Auto-generated code, DO NOT EDIT DIRECTLY!
|
|
296
296
|
// To edit this generated file you have to edit `tasks/ast_tools/src/generators/typescript.rs`.
|
|
297
297
|
interface Program extends Span {
|
|
@@ -1577,20 +1577,20 @@ interface JSDocUnknownType extends Span {
|
|
|
1577
1577
|
type: "TSJSDocUnknownType";
|
|
1578
1578
|
parent?: Node;
|
|
1579
1579
|
}
|
|
1580
|
-
type
|
|
1581
|
-
type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "+" | "-" | "*" | "/" | "%" | "**" | "<<" | ">>" | ">>>" | "|" | "^" | "&" | "in" | "instanceof";
|
|
1582
|
-
type LogicalOperator = "||" | "&&" | "??";
|
|
1583
|
-
type UnaryOperator = "+" | "-" | "!" | "~" | "typeof" | "void" | "delete";
|
|
1584
|
-
type UpdateOperator = "++" | "--";
|
|
1580
|
+
type ModuleKind = "script" | "module" | "commonjs";
|
|
1585
1581
|
interface Span {
|
|
1586
1582
|
start: number;
|
|
1587
1583
|
end: number;
|
|
1588
1584
|
range?: [number, number];
|
|
1589
1585
|
}
|
|
1590
|
-
type
|
|
1586
|
+
type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??=";
|
|
1587
|
+
type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "+" | "-" | "*" | "/" | "%" | "**" | "<<" | ">>" | ">>>" | "|" | "^" | "&" | "in" | "instanceof";
|
|
1588
|
+
type LogicalOperator = "||" | "&&" | "??";
|
|
1589
|
+
type UnaryOperator = "+" | "-" | "!" | "~" | "typeof" | "void" | "delete";
|
|
1590
|
+
type UpdateOperator = "++" | "--";
|
|
1591
1591
|
type Node = Program | IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | ThisExpression | ArrayExpression | ObjectExpression | ObjectProperty | TemplateLiteral | TaggedTemplateExpression | TemplateElement | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression | CallExpression | NewExpression | MetaProperty | SpreadElement | UpdateExpression | UnaryExpression | BinaryExpression | PrivateInExpression | LogicalExpression | ConditionalExpression | AssignmentExpression | ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetRest | AssignmentTargetWithDefault | AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty | SequenceExpression | Super | AwaitExpression | ChainExpression | ParenthesizedExpression | Directive | Hashbang | BlockStatement | VariableDeclaration | VariableDeclarator | EmptyStatement | ExpressionStatement | IfStatement | DoWhileStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | ContinueStatement | BreakStatement | ReturnStatement | WithStatement | SwitchStatement | SwitchCase | LabeledStatement | ThrowStatement | TryStatement | CatchClause | DebuggerStatement | AssignmentPattern | ObjectPattern | BindingProperty | ArrayPattern | BindingRestElement | Function$1 | FunctionBody | ArrowFunctionExpression | YieldExpression | Class | ClassBody | MethodDefinition | PropertyDefinition | PrivateIdentifier | StaticBlock | AccessorProperty | ImportExpression | ImportDeclaration | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportAttribute | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExportSpecifier | V8IntrinsicExpression | BooleanLiteral | NullLiteral | NumericLiteral | StringLiteral | BigIntLiteral | RegExpLiteral | JSXElement | JSXOpeningElement | JSXClosingElement | JSXFragment | JSXOpeningFragment | JSXClosingFragment | JSXNamespacedName | JSXMemberExpression | JSXExpressionContainer | JSXEmptyExpression | JSXAttribute | JSXSpreadAttribute | JSXIdentifier | JSXSpreadChild | JSXText | TSThisParameter | TSEnumDeclaration | TSEnumBody | TSEnumMember | TSTypeAnnotation | TSLiteralType | TSConditionalType | TSUnionType | TSIntersectionType | TSParenthesizedType | TSTypeOperator | TSArrayType | TSIndexedAccessType | TSTupleType | TSNamedTupleMember | TSOptionalType | TSRestType | TSAnyKeyword | TSStringKeyword | TSBooleanKeyword | TSNumberKeyword | TSNeverKeyword | TSIntrinsicKeyword | TSUnknownKeyword | TSNullKeyword | TSUndefinedKeyword | TSVoidKeyword | TSSymbolKeyword | TSThisType | TSObjectKeyword | TSBigIntKeyword | TSTypeReference | TSQualifiedName | TSTypeParameterInstantiation | TSTypeParameter | TSTypeParameterDeclaration | TSTypeAliasDeclaration | TSClassImplements | TSInterfaceDeclaration | TSInterfaceBody | TSPropertySignature | TSIndexSignature | TSCallSignatureDeclaration | TSMethodSignature | TSConstructSignatureDeclaration | TSIndexSignatureName | TSInterfaceHeritage | TSTypePredicate | TSModuleDeclaration | TSGlobalDeclaration | TSModuleBlock | TSTypeLiteral | TSInferType | TSTypeQuery | TSImportType | TSImportTypeQualifiedName | TSFunctionType | TSConstructorType | TSMappedType | TSTemplateLiteralType | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | Decorator | TSExportAssignment | TSNamespaceExportDeclaration | TSInstantiationExpression | JSDocNullableType | JSDocNonNullableType | JSDocUnknownType | ParamPattern;
|
|
1592
1592
|
//#endregion
|
|
1593
|
-
//#region ../../node_modules/vite/
|
|
1593
|
+
//#region ../../node_modules/vite/node_modules/rolldown/dist/shared/binding-CYVfiOV3.d.mts
|
|
1594
1594
|
interface CodegenOptions {
|
|
1595
1595
|
/**
|
|
1596
1596
|
* Remove whitespace.
|
|
@@ -2266,16 +2266,25 @@ declare class BindingDecodedMap {
|
|
|
2266
2266
|
* Each line is an array of segments, where each segment is [generatedColumn, sourceIndex, originalLine, originalColumn, nameIndex?].
|
|
2267
2267
|
*/
|
|
2268
2268
|
get mappings(): Array<Array<Array<number>>>;
|
|
2269
|
+
/** The list of source indices that should be excluded from debugging. */
|
|
2270
|
+
get x_google_ignoreList(): Array<number> | null;
|
|
2269
2271
|
}
|
|
2270
2272
|
declare class BindingMagicString {
|
|
2271
2273
|
constructor(source: string, options?: BindingMagicStringOptions | undefined | null);
|
|
2272
2274
|
get original(): string;
|
|
2273
2275
|
get filename(): string | null;
|
|
2274
2276
|
get indentExclusionRanges(): Array<Array<number>> | Array<number> | null;
|
|
2277
|
+
get ignoreList(): boolean;
|
|
2275
2278
|
get offset(): number;
|
|
2276
2279
|
set offset(offset: number);
|
|
2277
2280
|
replace(from: string, to: string): this;
|
|
2278
2281
|
replaceAll(from: string, to: string): this;
|
|
2282
|
+
/**
|
|
2283
|
+
* Returns the UTF-16 offset past the last match, or -1 if no match was found.
|
|
2284
|
+
* The JS wrapper uses this to update `lastIndex` on the caller's RegExp.
|
|
2285
|
+
* Global/sticky behavior is derived from the regex's own flags.
|
|
2286
|
+
*/
|
|
2287
|
+
replaceRegex(from: RegExp, to: string): number;
|
|
2279
2288
|
prepend(content: string): this;
|
|
2280
2289
|
append(content: string): this;
|
|
2281
2290
|
prependLeft(index: number, content: string): this;
|
|
@@ -2316,6 +2325,8 @@ declare class BindingMagicString {
|
|
|
2316
2325
|
lastChar(): string;
|
|
2317
2326
|
/** Returns the content after the last newline in the generated string. */
|
|
2318
2327
|
lastLine(): string;
|
|
2328
|
+
/** Returns the guessed indentation string, or `\t` if none is found. */
|
|
2329
|
+
getIndentString(): string;
|
|
2319
2330
|
/** Returns a clone with content outside the specified range removed. */
|
|
2320
2331
|
snip(start: number, end: number): BindingMagicString;
|
|
2321
2332
|
/**
|
|
@@ -2374,6 +2385,8 @@ declare class BindingSourceMap {
|
|
|
2374
2385
|
get names(): Array<string>;
|
|
2375
2386
|
/** The VLQ-encoded mappings string. */
|
|
2376
2387
|
get mappings(): string;
|
|
2388
|
+
/** The list of source indices that should be excluded from debugging. */
|
|
2389
|
+
get x_google_ignoreList(): Array<number> | null;
|
|
2377
2390
|
/** Returns the source map as a JSON string. */
|
|
2378
2391
|
toString(): string;
|
|
2379
2392
|
/** Returns the source map as a base64-encoded data URL. */
|
|
@@ -2483,6 +2496,7 @@ interface BindingMagicStringOptions {
|
|
|
2483
2496
|
filename?: string;
|
|
2484
2497
|
offset?: number;
|
|
2485
2498
|
indentExclusionRanges?: Array<Array<number>> | Array<number>;
|
|
2499
|
+
ignoreList?: boolean;
|
|
2486
2500
|
}
|
|
2487
2501
|
interface BindingModules {
|
|
2488
2502
|
values: Array<BindingRenderedModule>;
|
|
@@ -2585,7 +2599,7 @@ interface ViteImportGlobMeta {
|
|
|
2585
2599
|
isSubImportsPattern?: boolean;
|
|
2586
2600
|
} //#endregion
|
|
2587
2601
|
//#endregion
|
|
2588
|
-
//#region ../../node_modules/
|
|
2602
|
+
//#region ../../node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts
|
|
2589
2603
|
type StringOrRegExp$1 = string | RegExp;
|
|
2590
2604
|
type PluginModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {});
|
|
2591
2605
|
type FilterExpression = And | Or | Not | Id | ImporterId | ModuleType$1 | Code | Query;
|
|
@@ -2647,7 +2661,7 @@ declare class Exclude$1 {
|
|
|
2647
2661
|
constructor(expr: FilterExpression);
|
|
2648
2662
|
}
|
|
2649
2663
|
//#endregion
|
|
2650
|
-
//#region ../../node_modules/vite/
|
|
2664
|
+
//#region ../../node_modules/vite/node_modules/rolldown/dist/shared/define-config-BkRKRADp.d.mts
|
|
2651
2665
|
//#region src/types/misc.d.ts
|
|
2652
2666
|
/** @inline */
|
|
2653
2667
|
type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
|
|
@@ -3104,6 +3118,16 @@ interface OutputOptions {
|
|
|
3104
3118
|
*/
|
|
3105
3119
|
sourcemapPathTransform?: SourcemapPathTransformOption;
|
|
3106
3120
|
/**
|
|
3121
|
+
* Whether to exclude the original source code from sourcemaps.
|
|
3122
|
+
*
|
|
3123
|
+
* When `true`, the `sourcesContent` field is omitted from the generated sourcemap,
|
|
3124
|
+
* reducing the sourcemap file size. The sourcemap will still contain source file paths
|
|
3125
|
+
* and mappings, so debugging works if the original files are available.
|
|
3126
|
+
*
|
|
3127
|
+
* @default false
|
|
3128
|
+
*/
|
|
3129
|
+
sourcemapExcludeSources?: boolean;
|
|
3130
|
+
/**
|
|
3107
3131
|
* A string to prepend to the bundle before {@linkcode Plugin.renderChunk | renderChunk} hook.
|
|
3108
3132
|
*
|
|
3109
3133
|
* See {@linkcode intro | output.intro}, {@linkcode postBanner | output.postBanner} as well.
|
|
@@ -3899,6 +3923,10 @@ interface RolldownWatcher {
|
|
|
3899
3923
|
//#region src/binding-magic-string.d.ts
|
|
3900
3924
|
interface RolldownMagicString extends BindingMagicString {
|
|
3901
3925
|
readonly isRolldownMagicString: true;
|
|
3926
|
+
/** Accepts a string or RegExp pattern. RegExp supports `$&`, `$$`, and `$N` substitutions. */
|
|
3927
|
+
replace(from: string | RegExp, to: string): this;
|
|
3928
|
+
/** Accepts a string or RegExp pattern. RegExp must have the global (`g`) flag. */
|
|
3929
|
+
replaceAll(from: string | RegExp, to: string): this;
|
|
3902
3930
|
}
|
|
3903
3931
|
type RolldownMagicStringConstructor = Omit<typeof BindingMagicString, "prototype"> & {
|
|
3904
3932
|
new (...args: ConstructorParameters<typeof BindingMagicString>): RolldownMagicString;
|
|
@@ -4247,6 +4275,8 @@ interface NormalizedOutputOptions {
|
|
|
4247
4275
|
hashCharacters: "base64" | "base36" | "hex";
|
|
4248
4276
|
/** @see {@linkcode OutputOptions.sourcemapDebugIds | sourcemapDebugIds} */
|
|
4249
4277
|
sourcemapDebugIds: boolean;
|
|
4278
|
+
/** @see {@linkcode OutputOptions.sourcemapExcludeSources | sourcemapExcludeSources} */
|
|
4279
|
+
sourcemapExcludeSources: boolean;
|
|
4250
4280
|
/** @see {@linkcode OutputOptions.sourcemapIgnoreList | sourcemapIgnoreList} */
|
|
4251
4281
|
sourcemapIgnoreList: boolean | SourcemapIgnoreListOption | StringOrRegExp | undefined;
|
|
4252
4282
|
/** @see {@linkcode OutputOptions.sourcemapPathTransform | sourcemapPathTransform} */
|
|
@@ -4428,8 +4458,6 @@ interface PluginContextMeta {
|
|
|
4428
4458
|
}
|
|
4429
4459
|
/** @category Plugin APIs */
|
|
4430
4460
|
interface MinimalPluginContext {
|
|
4431
|
-
/** @hidden */
|
|
4432
|
-
readonly pluginName: string;
|
|
4433
4461
|
/**
|
|
4434
4462
|
* Similar to {@linkcode warn | this.warn}, except that it will also abort
|
|
4435
4463
|
* the bundling process with an error.
|
|
@@ -6178,7 +6206,7 @@ interface RolldownOptions extends InputOptions {
|
|
|
6178
6206
|
* @category Config
|
|
6179
6207
|
*/
|
|
6180
6208
|
//#endregion
|
|
6181
|
-
//#region ../../node_modules/vite/
|
|
6209
|
+
//#region ../../node_modules/vite/node_modules/rolldown/dist/shared/transform-C_gBfjMR.d.mts
|
|
6182
6210
|
//#endregion
|
|
6183
6211
|
//#region src/utils/transform.d.ts
|
|
6184
6212
|
/**
|
|
@@ -6193,13 +6221,13 @@ interface TransformOptions$1 extends BindingEnhancedTransformOptions {}
|
|
|
6193
6221
|
* @category Utilities
|
|
6194
6222
|
*/
|
|
6195
6223
|
//#endregion
|
|
6196
|
-
//#region ../../node_modules/vite/
|
|
6224
|
+
//#region ../../node_modules/vite/types/internal/esbuildOptions.d.ts
|
|
6197
6225
|
/* eslint-enable @typescript-eslint/ban-ts-comment */
|
|
6198
6226
|
type EsbuildTarget = string | string[];
|
|
6199
6227
|
type EsbuildTransformOptions = esbuild.TransformOptions;
|
|
6200
6228
|
type DepsOptimizerEsbuildOptions = Omit<esbuild.BuildOptions, 'bundle' | 'entryPoints' | 'external' | 'write' | 'watch' | 'outdir' | 'outfile' | 'outbase' | 'outExtension' | 'metafile'>;
|
|
6201
6229
|
//#endregion
|
|
6202
|
-
//#region ../../node_modules/vite/
|
|
6230
|
+
//#region ../../node_modules/vite/types/metadata.d.ts
|
|
6203
6231
|
interface AssetMetadata {
|
|
6204
6232
|
importedAssets: Set<string>;
|
|
6205
6233
|
importedCss: Set<string>;
|
|
@@ -6227,7 +6255,7 @@ interface CustomPluginOptionsVite {
|
|
|
6227
6255
|
/** @deprecated no-op since Vite 6.1 */
|
|
6228
6256
|
lang?: string;
|
|
6229
6257
|
}
|
|
6230
|
-
declare module '
|
|
6258
|
+
declare module 'rolldown' {
|
|
6231
6259
|
export interface OutputAsset {
|
|
6232
6260
|
viteMetadata?: AssetMetadata;
|
|
6233
6261
|
}
|
|
@@ -6242,16 +6270,16 @@ declare module '@voidzero-dev/vite-plus-core/rolldown' {
|
|
|
6242
6270
|
}
|
|
6243
6271
|
}
|
|
6244
6272
|
//#endregion
|
|
6245
|
-
//#region ../../node_modules/vite/
|
|
6273
|
+
//#region ../../node_modules/vite/types/internal/terserOptions.d.ts
|
|
6246
6274
|
/* eslint-enable @typescript-eslint/ban-ts-comment */
|
|
6247
6275
|
type TerserMinifyOptions = Terser.MinifyOptions;
|
|
6248
6276
|
//#endregion
|
|
6249
|
-
//#region ../../node_modules/vite/
|
|
6277
|
+
//#region ../../node_modules/vite/types/internal/lightningcssOptions.d.ts
|
|
6250
6278
|
/* eslint-enable @typescript-eslint/ban-ts-comment */
|
|
6251
6279
|
type LightningCSSOptions = Omit<Lightningcss.BundleAsyncOptions<Lightningcss.CustomAtRules>, 'filename' | 'resolver' | 'minify' | 'sourceMap' | 'analyzeDependencies' // properties not overridden by Vite, but does not make sense to set by end users
|
|
6252
6280
|
| 'inputSourceMap' | 'projectRoot'>;
|
|
6253
6281
|
//#endregion
|
|
6254
|
-
//#region ../../node_modules/vite/
|
|
6282
|
+
//#region ../../node_modules/vite/types/internal/cssPreprocessorOptions.d.ts
|
|
6255
6283
|
/* eslint-enable @typescript-eslint/ban-ts-comment */
|
|
6256
6284
|
// https://github.com/type-challenges/type-challenges/issues/29285
|
|
6257
6285
|
type IsAny<T> = boolean extends (T extends never ? true : false) ? true : false;
|
|
@@ -6270,7 +6298,7 @@ declare global {
|
|
|
6270
6298
|
interface HTMLLinkElement {}
|
|
6271
6299
|
}
|
|
6272
6300
|
//#endregion
|
|
6273
|
-
//#region ../../node_modules/vite/
|
|
6301
|
+
//#region ../../node_modules/vite/types/importGlob.d.ts
|
|
6274
6302
|
/**
|
|
6275
6303
|
* Declare Worker in case DOM is not added to the tsconfig lib causing
|
|
6276
6304
|
* Worker interface is not defined. For developers with DOM lib added,
|
|
@@ -6281,10 +6309,10 @@ declare global {
|
|
|
6281
6309
|
interface Worker {}
|
|
6282
6310
|
}
|
|
6283
6311
|
//#endregion
|
|
6284
|
-
//#region ../../node_modules/vite/dist/
|
|
6312
|
+
//#region ../../node_modules/vite/dist/node/index.d.ts
|
|
6285
6313
|
//#region \0rolldown/runtime.js
|
|
6286
6314
|
//#endregion
|
|
6287
|
-
//#region
|
|
6315
|
+
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.5_typescript@5.9.3_vite@packages+vite_vue@3.5.30_typescript@5.9.3_/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
|
|
6288
6316
|
//#region src/node/cli-commands.d.ts
|
|
6289
6317
|
interface StartOptions {
|
|
6290
6318
|
root?: string;
|
|
@@ -6293,7 +6321,7 @@ interface StartOptions {
|
|
|
6293
6321
|
port?: string | number;
|
|
6294
6322
|
open?: boolean;
|
|
6295
6323
|
} //#endregion
|
|
6296
|
-
//#region
|
|
6324
|
+
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.5_typescript@5.9.3_vite@packages+vite_vue@3.5.30_typescript@5.9.3_/node_modules/@vitejs/devtools/dist/config.d.ts
|
|
6297
6325
|
//#region src/node/config.d.ts
|
|
6298
6326
|
interface DevToolsConfig extends Partial<StartOptions> {
|
|
6299
6327
|
enabled: boolean;
|
|
@@ -6307,6 +6335,13 @@ interface DevToolsConfig extends Partial<StartOptions> {
|
|
|
6307
6335
|
* @default true
|
|
6308
6336
|
*/
|
|
6309
6337
|
clientAuth?: boolean;
|
|
6338
|
+
/**
|
|
6339
|
+
* Pre-configured auth tokens that are automatically trusted.
|
|
6340
|
+
*
|
|
6341
|
+
* Clients connecting with an auth token matching one of these
|
|
6342
|
+
* will be auto-approved without a terminal prompt.
|
|
6343
|
+
*/
|
|
6344
|
+
clientAuthTokens?: string[];
|
|
6310
6345
|
}
|
|
6311
6346
|
interface ResolvedDevToolsConfig {
|
|
6312
6347
|
config: Omit<DevToolsConfig, 'enabled'> & {
|
|
@@ -6572,7 +6607,7 @@ declare namespace Connect {
|
|
|
6572
6607
|
listen(handle: any, listeningListener?: Function): http.Server;
|
|
6573
6608
|
}
|
|
6574
6609
|
} //#endregion
|
|
6575
|
-
//#region
|
|
6610
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.23.2_ms@2.1.3/node_modules/http-proxy-3/dist/lib/http-proxy/index.d.ts
|
|
6576
6611
|
interface ProxyTargetDetailed {
|
|
6577
6612
|
host: string;
|
|
6578
6613
|
port: number;
|
|
@@ -6759,7 +6794,7 @@ declare class ProxyServer<TIncomingMessage extends typeof http.IncomingMessage =
|
|
|
6759
6794
|
before: <PT extends ProxyType>(type: PT, passName: string, cb: PassFunctions<TIncomingMessage, TServerResponse, TError>[PT]) => void;
|
|
6760
6795
|
after: <PT extends ProxyType>(type: PT, passName: string, cb: PassFunctions<TIncomingMessage, TServerResponse, TError>[PT]) => void;
|
|
6761
6796
|
} //#endregion
|
|
6762
|
-
//#region
|
|
6797
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.23.2_ms@2.1.3/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.d.ts
|
|
6763
6798
|
//#endregion
|
|
6764
6799
|
//#region src/node/server/middlewares/proxy.d.ts
|
|
6765
6800
|
interface ProxyOptions extends ServerOptions$3 {
|
|
@@ -8931,7 +8966,7 @@ interface ConfigPluginContext extends Omit<MinimalPluginContext, "meta" | "envir
|
|
|
8931
8966
|
meta: Omit<PluginContextMeta, "watchMode">;
|
|
8932
8967
|
}
|
|
8933
8968
|
interface MinimalPluginContextWithoutEnvironment extends Omit<MinimalPluginContext, "environment"> {}
|
|
8934
|
-
declare module "
|
|
8969
|
+
declare module "rolldown" {
|
|
8935
8970
|
interface MinimalPluginContext extends PluginContextExtension {}
|
|
8936
8971
|
interface PluginContextMeta extends PluginContextMetaExtension {}
|
|
8937
8972
|
}
|
|
@@ -9800,7 +9835,7 @@ type SsgRenderConfig = {
|
|
|
9800
9835
|
};
|
|
9801
9836
|
declare function pagesmithSsg(options: SsgPluginOptions): Plugin[];
|
|
9802
9837
|
//#endregion
|
|
9803
|
-
//#region src/vite/
|
|
9838
|
+
//#region src/vite/content-plugin.d.ts
|
|
9804
9839
|
type Simplify<T> = { [K in keyof T]: T[K] } & {};
|
|
9805
9840
|
type PagesmithResolvedConfig = {
|
|
9806
9841
|
root: string;
|
|
@@ -9874,5 +9909,5 @@ type PagesmithContentPluginOptions<TCollections extends CollectionMap> = Omit<Co
|
|
|
9874
9909
|
declare function pagesmithContent<TCollections extends CollectionMap>(collections: TCollections, options?: Omit<PagesmithContentPluginOptions<TCollections>, 'collections'>): PagesmithVitePlugin;
|
|
9875
9910
|
declare function pagesmithContent<TCollections extends CollectionMap>(options: PagesmithContentPluginOptions<TCollections>): PagesmithVitePlugin;
|
|
9876
9911
|
//#endregion
|
|
9877
|
-
export { BaseContentModuleEntry, ContentCollectionModule, ContentModuleMap, DataContentModuleEntry, MarkdownContentModuleEntry, PagesmithContentPluginOptions, PagesmithVitePlugin, type PrerenderOptions, type SsgPluginOptions, type SsgRenderConfig, pagesmithContent, pagesmithSsg, prerenderRoutes, sharedAssetsPlugin };
|
|
9912
|
+
export { type BaseContentModuleEntry, type ContentCollectionModule, type ContentModuleMap, type DataContentModuleEntry, type MarkdownContentModuleEntry, type PagesmithContentPluginOptions, type PagesmithVitePlugin, type PrerenderOptions, type SsgPluginOptions, type SsgRenderConfig, pagesmithContent, pagesmithSsg, prerenderRoutes, sharedAssetsPlugin };
|
|
9878
9913
|
//# sourceMappingURL=index.d.mts.map
|