@pagesmith/core 0.1.0 → 0.2.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/assets/favicon.svg +4 -0
- package/dist/{content-config-fHPaFZ7i.d.mts → content-config-wW-3r5gG.d.mts} +3 -5
- package/dist/{content-config-fHPaFZ7i.d.mts.map → content-config-wW-3r5gG.d.mts.map} +1 -1
- package/dist/{content-layer-B7fQ3im4.mjs → content-layer-DWdgdBeI.mjs} +33 -22
- package/dist/content-layer-DWdgdBeI.mjs.map +1 -0
- package/dist/convert-XdGgNqH0.mjs +27 -0
- package/dist/convert-XdGgNqH0.mjs.map +1 -0
- package/dist/{index-BQ6B1-qG.d.mts → index-D79hUFbK.d.mts} +7 -7
- package/dist/{index-BQ6B1-qG.d.mts.map → index-D79hUFbK.d.mts.map} +1 -1
- package/dist/{index-sFCx17CD.d.mts → index-Dbsw1QON.d.mts} +7 -7
- package/dist/index-Dbsw1QON.d.mts.map +1 -0
- package/dist/index.d.mts +5 -5
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +28 -4
- 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-DyABmDrE.mjs → loaders-Bla48ZN9.mjs} +23 -17
- package/dist/loaders-Bla48ZN9.mjs.map +1 -0
- package/dist/schemas/index.d.mts +2 -2
- package/dist/schemas/index.mjs +1 -1
- package/dist/{schemas-DJS7wOzd.mjs → schemas-BZEPTGWs.mjs} +3 -3
- package/dist/schemas-BZEPTGWs.mjs.map +1 -0
- package/dist/{types-DUsjRE7Y.d.mts → types-B-V5qemH.d.mts} +2 -2
- package/dist/{types-DUsjRE7Y.d.mts.map → types-B-V5qemH.d.mts.map} +1 -1
- package/dist/vite/index.d.mts +1 -1
- package/dist/vite/index.mjs +21 -12
- package/dist/vite/index.mjs.map +1 -1
- package/package.json +1 -5
- package/dist/content-layer-B7fQ3im4.mjs.map +0 -1
- package/dist/convert-DnuB6SVV.mjs +0 -52
- package/dist/convert-DnuB6SVV.mjs.map +0 -1
- package/dist/index-sFCx17CD.d.mts.map +0 -1
- package/dist/loaders-DyABmDrE.mjs.map +0 -1
- package/dist/schemas-DJS7wOzd.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as LoaderType, t as Loader } from "./types-
|
|
1
|
+
import { r as LoaderType, t as Loader } from "./types-B-V5qemH.mjs";
|
|
2
2
|
import { r as MarkdownConfig } from "./heading-Dhvzlay-.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
@@ -1108,9 +1108,7 @@ type ContentLayerConfig = {
|
|
|
1108
1108
|
assets?: {
|
|
1109
1109
|
/** Enable content-hash filenames */hashFilenames?: boolean; /** Output directory for hashed assets */
|
|
1110
1110
|
outputDir?: string;
|
|
1111
|
-
}; /**
|
|
1112
|
-
cache?: boolean; /** Load all entries eagerly on creation */
|
|
1113
|
-
eager?: boolean; /** Content plugins */
|
|
1111
|
+
}; /** Content plugins */
|
|
1114
1112
|
plugins?: ContentPlugin[];
|
|
1115
1113
|
};
|
|
1116
1114
|
/** Plugin interface for processing + validation. */
|
|
@@ -1125,4 +1123,4 @@ type ContentPlugin = {
|
|
|
1125
1123
|
};
|
|
1126
1124
|
//#endregion
|
|
1127
1125
|
export { CollectionMap as a, RawEntry as c, ValidationEntryResult as d, ValidationIssue as f, CollectionDef as i, ContentValidator as l, ContentPlugin as n, InferCollectionData as o, ValidationResult as p, CollectionComputed as r, InferCollectionLoaderKind as s, ContentLayerConfig as t, ValidatorContext as u };
|
|
1128
|
-
//# sourceMappingURL=content-config-
|
|
1126
|
+
//# sourceMappingURL=content-config-wW-3r5gG.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-config-fHPaFZ7i.d.mts","names":["Data","Point","line","column","offset","Position","start","end","Literal","Node","value","type","data","position","Parent","children","Data","UnistData","Literal","UnistLiteral","Node","UnistNode","Parent","UnistParent","AlignType","ReferenceType","Alternative","alt","Association","identifier","label","Reference","referenceType","Resource","url","title","BlockContent","BlockContentMap","Blockquote","Code","Heading","Html","List","Paragraph","Table","ThematicBreak","blockquote","code","heading","html","list","paragraph","table","thematicBreak","DefinitionContent","DefinitionContentMap","Definition","FootnoteDefinition","definition","footnoteDefinition","FrontmatterContent","FrontmatterContentMap","Yaml","yaml","ListContent","ListContentMap","ListItem","listItem","PhrasingContent","PhrasingContentMap","Break","Delete","Emphasis","FootnoteReference","Image","ImageReference","InlineCode","Link","LinkReference","Strong","Text","break","delete","emphasis","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text","RootContent","RootContentMap","TableCell","TableRow","tableCell","tableRow","RowContent","RowContentMap","TableContent","TableContentMap","Content","Literals","Nodes","Extract","Root","Parents","TopLevelContent","value","data","children","Array","BlockquoteData","type","BreakData","CodeData","lang","meta","DefinitionData","DeleteData","EmphasisData","FootnoteDefinitionData","FootnoteReferenceData","HeadingData","depth","HtmlData","HTML","ImageData","ImageReferenceData","InlineCodeData","LinkData","LinkReferenceData","ListData","ordered","start","spread","ListItemData","checked","ParagraphData","RootData","StrongData","TableData","align","TableRowData","TableCellData","TextData","ThematicBreakData","YamlData","YAML"],"sources":["../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/mdast/index.d.ts","../src/validation/schema-validator.ts","../src/validation/types.ts","../src/schemas/collection.ts","../src/schemas/content-config.ts"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;AAqBA;;;;;AAKA;;;;;;;;;AAqBA;;UA1BiBA,MAAAA;;;;UAKAC,KAAAA;EA8BH;;AA6Bd;EAvDIC,IAAAA;EAwEmB;;;EAnEnBC,MAAAA;EAmEAU;;;EA/DAT,MAAAA;AAAAA;;AClBJ;;;;UD0BiBC,QAAAA;ECfLoB;;;EDmBRnB,KAAAA,EAAOL,KAAAA;ECZMyB;;;EDiBbnB,GAAAA,EAAKN,KAAAA;AAAAA;;;ACyET;;;;;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F,QAAA,GAAW,SAAA,EJ2CU;EIzCrB,QAAA,IAAY,KAAA,EAAO,QAAA;EAEnB,MAAA,IAAU,KAAA,EAAO,QAAA;EAEjB,OAAA,IAAW,QAAA,UAAkB,SAAA,qBH5CV;EG8CnB,SAAA,IAAa,KAAA,EAAO,QAAA,KAAa,QAAA,GAAW,OAAA,CAAQ,QAAA,GH9CjC;EGgDnB,UAAA,GAAa,gBAAA,IHrCHY;EGuCV,wBAAA;AAAA;;;AJlDF;AAAA,KKbY,kBAAA;0BAEV,WAAA,EAAa,aAAA,ELWM;EKTnB,IAAA,WLcoB;EKZpB,QAAA,GAAW,cAAA,ELYS;EKVpB,MAAA;ILmBEtB,oCKjBA,aAAA,YLqBM;IKnBN,SAAA;EAAA,GL2BqB;EKxBvB,KAAA,YLiCY;EK/BZ,KAAA,YL0BSF;EKxBT,OAAA,GAAU,aAAA;AAAA;;KAIA,aAAA;EACV,IAAA,ULqDmB;EKnDnB,YAAA,UAAsB,IAAA,gBLoED;EKlErB,YAAA,UAAsB,IAAA,gBL0DpBW;EKxDF,QAAA,IAAY,KAAA;IAAS,IAAA,EAAM,MAAA;IAAqB,OAAA;EAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"content-config-wW-3r5gG.d.mts","names":["Data","Point","line","column","offset","Position","start","end","Literal","Node","value","type","data","position","Parent","children","Data","UnistData","Literal","UnistLiteral","Node","UnistNode","Parent","UnistParent","AlignType","ReferenceType","Alternative","alt","Association","identifier","label","Reference","referenceType","Resource","url","title","BlockContent","BlockContentMap","Blockquote","Code","Heading","Html","List","Paragraph","Table","ThematicBreak","blockquote","code","heading","html","list","paragraph","table","thematicBreak","DefinitionContent","DefinitionContentMap","Definition","FootnoteDefinition","definition","footnoteDefinition","FrontmatterContent","FrontmatterContentMap","Yaml","yaml","ListContent","ListContentMap","ListItem","listItem","PhrasingContent","PhrasingContentMap","Break","Delete","Emphasis","FootnoteReference","Image","ImageReference","InlineCode","Link","LinkReference","Strong","Text","break","delete","emphasis","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text","RootContent","RootContentMap","TableCell","TableRow","tableCell","tableRow","RowContent","RowContentMap","TableContent","TableContentMap","Content","Literals","Nodes","Extract","Root","Parents","TopLevelContent","value","data","children","Array","BlockquoteData","type","BreakData","CodeData","lang","meta","DefinitionData","DeleteData","EmphasisData","FootnoteDefinitionData","FootnoteReferenceData","HeadingData","depth","HtmlData","HTML","ImageData","ImageReferenceData","InlineCodeData","LinkData","LinkReferenceData","ListData","ordered","start","spread","ListItemData","checked","ParagraphData","RootData","StrongData","TableData","align","TableRowData","TableCellData","TextData","ThematicBreakData","YamlData","YAML"],"sources":["../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/mdast/index.d.ts","../src/validation/schema-validator.ts","../src/validation/types.ts","../src/schemas/collection.ts","../src/schemas/content-config.ts"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;AAqBA;;;;;AAKA;;;;;;;;;AAqBA;;UA1BiBA,MAAAA;;;;UAKAC,KAAAA;EA8BH;;AA6Bd;EAvDIC,IAAAA;EAwEmB;;;EAnEnBC,MAAAA;EAmEAU;;;EA/DAT,MAAAA;AAAAA;;AClBJ;;;;UD0BiBC,QAAAA;ECfLoB;;;EDmBRnB,KAAAA,EAAOL,KAAAA;ECZMyB;;;EDiBbnB,GAAAA,EAAKN,KAAAA;AAAAA;;;ACyET;;;;;AAWA;;;UDvDiBQ,MAAAA;ECuD+C;AAmBhE;;EDtEIE,IAAAA;ECwEM4B;;;EDnEN3B,IAAAA,GAAOZ,MAAAA;ECwEA4C;;;;;;EDhEP/B,QAAAA,GAAWR,QAAAA;AAAAA;;;;;AAjFf;;;;;AAKA;;;;;;;;;AAqBA;;KC1BYmB,SAAAA;;;;;;;ADgEZ;;;KCrDYC,aAAAA;AAAAA;;;;UAOKC,WAAAA;;;;AAlBjB;EAuBIC,GAAAA;AAAAA;;AAZJ;;;;;AAOA;;;UAiBiBC,WAAAA;EAZV;AAYP;;;;;AA+BA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,GAAW,cAAA,ELYS;EKVpB,MAAA;ILmBEtB,oCKjBA,aAAA,YLqBM;IKnBN,SAAA;EAAA,GL2BqB;EKxBvB,OAAA,GAAU,aAAA;AAAA;;KAIA,aAAA;EACV,IAAA,UL4BOF;EK1BP,YAAA,UAAsB,IAAA,gBL0BV;EKxBZ,YAAA,UAAsB,IAAA,gBLqDH;EKnDnB,QAAA,IAAY,KAAA;IAAS,IAAA,EAAM,MAAA;IAAqB,OAAA;EAAA;AAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as processMarkdown } from "./markdown-Cj5X26FL.mjs";
|
|
2
|
-
import { n as resolveLoader, t as defaultIncludePatterns } from "./loaders-
|
|
2
|
+
import { n as resolveLoader, t as defaultIncludePatterns } from "./loaders-Bla48ZN9.mjs";
|
|
3
3
|
import { dirname, extname, relative, resolve } from "path";
|
|
4
4
|
import remarkParse from "remark-parse";
|
|
5
5
|
import { unified } from "unified";
|
|
6
|
-
import { existsSync } from "fs";
|
|
7
6
|
import fg from "fast-glob";
|
|
7
|
+
import { existsSync } from "fs";
|
|
8
8
|
//#region src/utils/read-time.ts
|
|
9
9
|
/**
|
|
10
10
|
* Read time estimation.
|
|
@@ -91,9 +91,9 @@ function runPluginValidators(plugins, entry) {
|
|
|
91
91
|
* File discovery via glob patterns.
|
|
92
92
|
*/
|
|
93
93
|
/** Discover files matching glob patterns in a directory. */
|
|
94
|
-
function discoverFiles(options) {
|
|
94
|
+
async function discoverFiles(options) {
|
|
95
95
|
const { directory, include, exclude = [] } = options;
|
|
96
|
-
return fg
|
|
96
|
+
return (await fg(include, {
|
|
97
97
|
cwd: directory,
|
|
98
98
|
absolute: true,
|
|
99
99
|
ignore: [
|
|
@@ -102,7 +102,7 @@ function discoverFiles(options) {
|
|
|
102
102
|
"**/dev/**",
|
|
103
103
|
...exclude
|
|
104
104
|
]
|
|
105
|
-
}).map((p) => resolve(p));
|
|
105
|
+
})).map((p) => resolve(p));
|
|
106
106
|
}
|
|
107
107
|
//#endregion
|
|
108
108
|
//#region src/utils/slug.ts
|
|
@@ -148,14 +148,12 @@ function validateSchema(data, schema) {
|
|
|
148
148
|
issues: [],
|
|
149
149
|
validatedData: result.data
|
|
150
150
|
};
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
validatedData: data
|
|
158
|
-
};
|
|
151
|
+
const details = result.error.issues.map((issue) => ({
|
|
152
|
+
field: issue.path.length > 0 ? formatPath(issue.path) : void 0,
|
|
153
|
+
message: issue.message,
|
|
154
|
+
severity: "error"
|
|
155
|
+
})).map((i) => i.field ? `${i.field}: ${i.message}` : i.message).join("; ");
|
|
156
|
+
throw new Error(`Schema validation failed: ${details}`);
|
|
159
157
|
}
|
|
160
158
|
//#endregion
|
|
161
159
|
//#region src/validation/code-block-validator.ts
|
|
@@ -393,7 +391,7 @@ var ContentStore = class {
|
|
|
393
391
|
}
|
|
394
392
|
const loader = resolveLoader(def.loader);
|
|
395
393
|
const directory = resolve(this.rootDir, def.directory);
|
|
396
|
-
const files = discoverFiles({
|
|
394
|
+
const files = await discoverFiles({
|
|
397
395
|
directory,
|
|
398
396
|
include: def.include ?? defaultIncludePatterns(loader),
|
|
399
397
|
exclude: def.exclude
|
|
@@ -479,10 +477,23 @@ var ContentStore = class {
|
|
|
479
477
|
for (const [slug, cached] of entries) if (cached.issues.length > 0) result.set(slug, cached.issues);
|
|
480
478
|
return result;
|
|
481
479
|
}
|
|
482
|
-
/** Invalidate a single entry
|
|
483
|
-
invalidate(collection, slug) {
|
|
484
|
-
this.
|
|
485
|
-
|
|
480
|
+
/** Invalidate a single entry and reload it without reloading the entire collection. */
|
|
481
|
+
async invalidate(collection, slug) {
|
|
482
|
+
const def = this.config.collections[collection];
|
|
483
|
+
if (!def) return;
|
|
484
|
+
const collectionCache = this.cache.get(collection);
|
|
485
|
+
if (!collectionCache) return;
|
|
486
|
+
const existing = collectionCache.get(slug);
|
|
487
|
+
if (!existing) return;
|
|
488
|
+
const loader = resolveLoader(def.loader);
|
|
489
|
+
const directory = resolve(this.rootDir, def.directory);
|
|
490
|
+
try {
|
|
491
|
+
const result = await this.loadEntry(collection, existing.entry.filePath, directory, loader, def);
|
|
492
|
+
if (result) collectionCache.set(slug, result);
|
|
493
|
+
else collectionCache.delete(slug);
|
|
494
|
+
} catch {
|
|
495
|
+
collectionCache.delete(slug);
|
|
496
|
+
}
|
|
486
497
|
}
|
|
487
498
|
/** Invalidate an entire collection. */
|
|
488
499
|
invalidateCollection(collection) {
|
|
@@ -535,11 +546,11 @@ var ContentLayerImpl = class {
|
|
|
535
546
|
return this.store.getEntry(collection, slug);
|
|
536
547
|
}
|
|
537
548
|
async convert(markdown, options) {
|
|
538
|
-
const { convert: coreConvert } = await import("./convert-
|
|
549
|
+
const { convert: coreConvert } = await import("./convert-XdGgNqH0.mjs").then((n) => n.n);
|
|
539
550
|
return coreConvert(markdown, { markdown: options?.markdown ?? this.config.markdown });
|
|
540
551
|
}
|
|
541
|
-
invalidate(collection, slug) {
|
|
542
|
-
this.store.invalidate(collection, slug);
|
|
552
|
+
async invalidate(collection, slug) {
|
|
553
|
+
await this.store.invalidate(collection, slug);
|
|
543
554
|
}
|
|
544
555
|
invalidateCollection(collection) {
|
|
545
556
|
this.store.invalidateCollection(collection);
|
|
@@ -587,4 +598,4 @@ function createContentLayer(config) {
|
|
|
587
598
|
//#endregion
|
|
588
599
|
export { headingValidator as a, ContentEntry as c, linkValidator as i, builtinMarkdownValidators as n, codeBlockValidator as o, runValidators as r, toSlug as s, createContentLayer as t };
|
|
589
600
|
|
|
590
|
-
//# sourceMappingURL=content-layer-
|
|
601
|
+
//# sourceMappingURL=content-layer-DWdgdBeI.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-layer-DWdgdBeI.mjs","names":[],"sources":["../src/utils/read-time.ts","../src/entry.ts","../src/plugins/index.ts","../src/utils/glob.ts","../src/utils/slug.ts","../src/validation/schema-validator.ts","../src/validation/code-block-validator.ts","../src/validation/heading-validator.ts","../src/validation/link-validator.ts","../src/validation/runner.ts","../src/store.ts","../src/content-layer.ts"],"sourcesContent":["/**\n * Read time estimation.\n *\n * Computes estimated reading time from markdown source (~200 words per minute).\n */\n\n/** Compute read time in minutes from raw markdown. */\nexport function computeReadTime(rawMarkdown: string): number {\n const plainText = rawMarkdown\n .replace(/```[\\s\\S]*?```/g, ' ')\n .replace(/^( {4}|\\t).+$/gm, ' ')\n .replace(/^---[\\s\\S]*?---/m, ' ')\n .replace(/<[^>]+>/g, ' ')\n .replace(/!?\\[([^\\]]*)\\]\\([^)]*\\)/g, '$1')\n .replace(/[#*_~`>]/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim()\n const wordCount = plainText.split(' ').filter(Boolean).length\n return Math.max(1, Math.ceil(wordCount / 200))\n}\n","/**\n * ContentEntry — represents a single content entry in a collection.\n *\n * Supports lazy rendering: data is available immediately after loading,\n * but HTML rendering is deferred until render() is called.\n */\n\nimport type { Heading } from './schemas/heading'\nimport type { MarkdownConfig } from './schemas/markdown-config'\nimport { processMarkdown } from './markdown'\nimport { computeReadTime } from './utils/read-time'\n\nexport type RenderedContent = {\n /** Processed HTML */\n html: string\n /** Extracted headings for TOC */\n headings: Heading[]\n /** Estimated read time in minutes */\n readTime: number\n}\n\nexport class ContentEntry<T = Record<string, any>> {\n /** URL-friendly identifier */\n readonly slug: string\n /** Collection this entry belongs to */\n readonly collection: string\n /** Absolute path to source file */\n readonly filePath: string\n /** Validated data (frontmatter or parsed data) */\n readonly data: T\n /** Raw body content (markdown only) */\n readonly rawContent?: string\n\n /** Cached render result */\n private _rendered?: RenderedContent\n /** Markdown config for rendering */\n private _markdownConfig: MarkdownConfig\n\n constructor(\n slug: string,\n collection: string,\n filePath: string,\n data: T,\n rawContent: string | undefined,\n markdownConfig: MarkdownConfig,\n ) {\n this.slug = slug\n this.collection = collection\n this.filePath = filePath\n this.data = data\n this.rawContent = rawContent\n this._markdownConfig = markdownConfig\n }\n\n /** Render the entry content to HTML. Cached after first call. */\n async render(options?: { force?: boolean }): Promise<RenderedContent> {\n if (this._rendered && !options?.force) {\n return this._rendered\n }\n\n if (!this.rawContent) {\n // Non-markdown entries have no renderable content\n this._rendered = { html: '', headings: [], readTime: 0 }\n return this._rendered\n }\n\n const result = await processMarkdown(this.rawContent, this._markdownConfig, {\n content: this.rawContent,\n frontmatter: this.data as Record<string, unknown>,\n })\n const readTime = computeReadTime(this.rawContent)\n\n this._rendered = {\n html: result.html,\n headings: result.headings,\n readTime,\n }\n\n return this._rendered\n }\n\n /** Clear cached render result. */\n clearRenderCache(): void {\n this._rendered = undefined\n }\n}\n","/**\n * Plugin registration and execution.\n */\n\nimport type { ContentPlugin } from '../schemas/content-config'\n\n/** Collect all remark plugins from content plugins. */\nexport function collectRemarkPlugins(plugins: ContentPlugin[]): any[] {\n return plugins.filter((p) => p.remarkPlugin).map((p) => p.remarkPlugin!)\n}\n\n/** Collect all rehype plugins from content plugins. */\nexport function collectRehypePlugins(plugins: ContentPlugin[]): any[] {\n return plugins.filter((p) => p.rehypePlugin).map((p) => p.rehypePlugin!)\n}\n\n/** Run all plugin validators against an entry. */\nexport function runPluginValidators(\n plugins: ContentPlugin[],\n entry: { data: Record<string, any>; content?: string },\n): string[] {\n const issues: string[] = []\n for (const plugin of plugins) {\n if (plugin.validate) {\n issues.push(...plugin.validate(entry))\n }\n }\n return issues\n}\n\nexport type { ContentPlugin } from '../schemas/content-config'\n","/**\n * File discovery via glob patterns.\n */\n\nimport fg from 'fast-glob'\nimport { resolve } from 'path'\n\nexport interface DiscoverOptions {\n /** Directory to search in (absolute path) */\n directory: string\n /** Glob patterns to include */\n include: string[]\n /** Glob patterns to exclude */\n exclude?: string[]\n}\n\n/** Discover files matching glob patterns in a directory. */\nexport async function discoverFiles(options: DiscoverOptions): Promise<string[]> {\n const { directory, include, exclude = [] } = options\n\n const files = await fg(include, {\n cwd: directory,\n absolute: true,\n ignore: ['**/node_modules/**', '**/dist/**', '**/dev/**', ...exclude],\n })\n\n return files.map((p) => resolve(p))\n}\n","/**\n * Path-to-slug conversion.\n *\n * Generalized from packages/core/src/content/collector.ts.\n */\n\nimport { extname, relative } from 'path'\n\n/**\n * Convert a content file path to a URL-friendly slug.\n *\n * Examples:\n * content/posts/hello-world/README.md -> 'hello-world'\n * content/posts/hello-world/index.md -> 'hello-world'\n * content/posts/hello-world.md -> 'hello-world'\n * content/authors/john.json -> 'john'\n * content/posts/nested/deep/post.md -> 'nested/deep/post'\n */\nexport function toSlug(filePath: string, directory: string): string {\n const ext = extname(filePath)\n let slug = relative(directory, filePath).replace(/\\\\/g, '/')\n\n // Remove file extension\n if (ext) {\n slug = slug.slice(0, -ext.length)\n }\n\n // Strip README / index suffixes\n if (slug === 'README' || slug === 'index') return '/'\n if (slug.endsWith('/README')) slug = slug.slice(0, -7)\n if (slug.endsWith('/index')) slug = slug.slice(0, -6)\n\n return slug\n}\n","/**\n * Schema validation with rich error reporting.\n *\n * Wraps Zod's safeParse to produce human-readable validation issues.\n */\n\nimport type { ZodError, ZodType } from 'zod'\n\nexport type ValidationIssue = {\n /** Field path (e.g. 'tags[0]') */\n field?: string\n /** Human-readable error message */\n message: string\n /** Error severity */\n severity: 'error' | 'warn'\n}\n\nexport type ValidationEntryResult = {\n slug: string\n filePath: string\n issues: ValidationIssue[]\n}\n\nexport type ValidationResult = {\n collection: string\n entries: ValidationEntryResult[]\n errors: number\n warnings: number\n}\n\n/** Format a Zod error path into a human-readable field path. */\nexport function formatPath(path: PropertyKey[]): string {\n return path\n .map((segment, i) => {\n if (typeof segment === 'number') return `[${segment}]`\n if (typeof segment === 'symbol') return `[${String(segment)}]`\n if (i === 0) return segment\n return `.${segment}`\n })\n .join('')\n}\n\n/** Validate data against a Zod schema and return structured issues. */\nexport function validateSchema(\n data: Record<string, any>,\n schema: ZodType,\n): {\n issues: ValidationIssue[]\n validatedData: any\n} {\n const result = schema.safeParse(data)\n if (result.success) {\n return {\n issues: [],\n validatedData: result.data,\n }\n }\n\n const issues = (result.error as ZodError).issues.map((issue) => ({\n field: issue.path.length > 0 ? formatPath(issue.path) : undefined,\n message: issue.message,\n severity: 'error' as const,\n }))\n\n const details = issues.map((i) => (i.field ? `${i.field}: ${i.message}` : i.message)).join('; ')\n\n throw new Error(`Schema validation failed: ${details}`)\n}\n","/**\n * Code block validator — checks fenced code block meta syntax.\n *\n * Walks the shared MDAST for `code` nodes. Validates known meta properties\n * and language identifiers. Meta syntax follows Expressive Code conventions.\n */\n\nimport type { ValidationIssue } from './schema-validator'\nimport type { ContentValidator, MdastNode, ValidatorContext } from './types'\n\n/** Known meta properties accepted by Expressive Code and its plugins. */\nconst KNOWN_META_PROPS = new Set([\n 'title',\n 'showLineNumbers',\n 'startLineNumber',\n 'wrap',\n 'frame',\n 'collapse',\n 'mark',\n 'ins',\n 'del',\n])\n\n/** Extract the property name portion of a meta token (before `=` or `{`). */\nfunction extractMetaPropNames(meta: string): string[] {\n const props: string[] = []\n\n // Match key=value, key={...}, or bare flags\n const tokenRegex = /(\\w+)(?:=(?:\\{[^}]*\\}|\"[^\"]*\"|'[^']*'|\\S+))?/g\n let match: RegExpExecArray | null\n while ((match = tokenRegex.exec(meta)) !== null) {\n props.push(match[1]!)\n }\n\n return props\n}\n\n/** Collect all `code` nodes from MDAST. */\nfunction collectCodeBlocks(node: MdastNode): MdastNode[] {\n const blocks: MdastNode[] = []\n\n if (node.type === 'code') {\n blocks.push(node)\n }\n\n if (node.children) {\n for (const child of node.children) {\n blocks.push(...collectCodeBlocks(child))\n }\n }\n\n return blocks\n}\n\nexport const codeBlockValidator: ContentValidator = {\n name: 'code-blocks',\n\n validate(ctx: ValidatorContext): ValidationIssue[] {\n if (!ctx.rawContent || !ctx.mdast) return []\n\n const issues: ValidationIssue[] = []\n const tree = ctx.mdast as MdastNode\n\n const codeBlocks = collectCodeBlocks(tree)\n\n for (const block of codeBlocks) {\n const line = block.position?.start.line\n const lineInfo = line ? ` (line ${line})` : ''\n const meta = block.meta ?? ''\n const hasMeta = meta.trim().length > 0\n\n // Language required when using syntax features\n if (hasMeta && !block.lang) {\n issues.push({\n field: `code-block${lineInfo}`,\n message: 'Code block has meta properties but no language identifier',\n severity: 'warn',\n })\n }\n\n if (!hasMeta) continue\n\n // Check for unknown meta properties\n const propNames = extractMetaPropNames(meta)\n for (const prop of propNames) {\n if (!KNOWN_META_PROPS.has(prop)) {\n issues.push({\n field: `code-block${lineInfo}`,\n message: `Unknown code block meta property: \"${prop}\"`,\n severity: 'warn',\n })\n }\n }\n }\n\n return issues\n },\n}\n","/**\n * Heading validator — checks heading structure in markdown.\n *\n * Walks the shared MDAST for heading nodes. Validates level ordering and h1 uniqueness.\n */\n\nimport type { ValidationIssue } from './schema-validator'\nimport type { ContentValidator, MdastNode, ValidatorContext } from './types'\n\n/** Extract plain text from a heading node's children. */\nfunction getTextContent(node: MdastNode): string {\n if (node.type === 'text') return node.value ?? ''\n if (node.children) return node.children.map(getTextContent).join('')\n return ''\n}\n\n/** Collect all heading nodes from MDAST. */\nfunction collectHeadings(node: MdastNode): Array<{ depth: number; text: string; line?: number }> {\n const headings: Array<{ depth: number; text: string; line?: number }> = []\n\n if (node.type === 'heading' && node.depth) {\n headings.push({\n depth: node.depth,\n text: getTextContent(node),\n line: node.position?.start.line,\n })\n }\n\n if (node.children) {\n for (const child of node.children) {\n headings.push(...collectHeadings(child))\n }\n }\n\n return headings\n}\n\nexport const headingValidator: ContentValidator = {\n name: 'headings',\n\n validate(ctx: ValidatorContext): ValidationIssue[] {\n if (!ctx.rawContent || !ctx.mdast) return []\n\n const issues: ValidationIssue[] = []\n const tree = ctx.mdast as MdastNode\n\n const headings = collectHeadings(tree)\n\n // No headings in a document with content is worth noting\n if (headings.length === 0) {\n const hasContent = ctx.rawContent.trim().length > 0\n if (hasContent) {\n issues.push({\n message: 'Document has content but no headings',\n severity: 'warn',\n })\n }\n return issues\n }\n\n // At most one h1\n const h1s = headings.filter((h) => h.depth === 1)\n if (h1s.length > 1) {\n for (const h of h1s.slice(1)) {\n const lineInfo = h.line ? ` (line ${h.line})` : ''\n issues.push({\n field: `headings${lineInfo}`,\n message: `Multiple h1 headings found: \"${h.text}\"`,\n severity: 'warn',\n })\n }\n }\n\n // No skipped levels (only flag when going deeper)\n for (let i = 1; i < headings.length; i++) {\n const prev = headings[i - 1]!\n const curr = headings[i]!\n if (curr.depth > prev.depth + 1) {\n const lineInfo = curr.line ? ` (line ${curr.line})` : ''\n issues.push({\n field: `headings${lineInfo}`,\n message: `Heading level skip: h${prev.depth} -> h${curr.depth} (\"${curr.text}\")`,\n severity: 'warn',\n })\n }\n }\n\n return issues\n },\n}\n","/**\n * Link validator — checks links in markdown content.\n *\n * Walks the shared MDAST for link/image nodes. Internal links are checked for file existence;\n * external links are checked for well-formed URL format.\n */\n\nimport { existsSync } from 'fs'\nimport { dirname, resolve } from 'path'\nimport type { ValidationIssue } from './schema-validator'\nimport type { ContentValidator, MdastNode, ValidatorContext } from './types'\n\n/** Walk MDAST tree, collecting link and image nodes. */\nfunction collectLinks(node: MdastNode): Array<{ url: string; line?: number }> {\n const links: Array<{ url: string; line?: number }> = []\n\n if ((node.type === 'link' || node.type === 'image') && node.url) {\n links.push({\n url: node.url,\n line: node.position?.start.line,\n })\n }\n\n if (node.children) {\n for (const child of node.children) {\n links.push(...collectLinks(child))\n }\n }\n\n return links\n}\n\nfunction isInternalLink(url: string): boolean {\n if (url.startsWith('#')) return false\n if (url.startsWith('http://') || url.startsWith('https://')) return false\n if (url.startsWith('//')) return false\n if (url.startsWith('mailto:')) return false\n if (url.startsWith('tel:')) return false\n return true\n}\n\nfunction isWellFormedUrl(url: string): boolean {\n try {\n new URL(url)\n return true\n } catch {\n return false\n }\n}\n\nexport const linkValidator: ContentValidator = {\n name: 'links',\n\n validate(ctx: ValidatorContext): ValidationIssue[] {\n if (!ctx.rawContent || !ctx.mdast) return []\n\n const issues: ValidationIssue[] = []\n const tree = ctx.mdast as MdastNode\n\n const links = collectLinks(tree)\n const fileDir = dirname(ctx.filePath)\n\n for (const link of links) {\n const lineInfo = link.line ? ` (line ${link.line})` : ''\n\n // External links — check URL format\n if (link.url.startsWith('http://') || link.url.startsWith('https://')) {\n if (!isWellFormedUrl(link.url)) {\n issues.push({\n field: `links${lineInfo}`,\n message: `Malformed external URL: ${link.url}`,\n severity: 'warn',\n })\n }\n continue\n }\n\n // Internal links — check file exists\n if (isInternalLink(link.url)) {\n // Strip fragment and query\n const urlPath = link.url.split('#')[0]!.split('?')[0]!\n if (!urlPath) continue // pure fragment link\n\n const resolved = resolve(fileDir, urlPath)\n if (!existsSync(resolved)) {\n issues.push({\n field: `links${lineInfo}`,\n message: `Broken internal link: ${link.url}`,\n severity: 'error',\n })\n }\n }\n }\n\n return issues\n },\n}\n","/**\n * Validation runner — executes a list of content validators on an entry.\n *\n * Validators that throw are caught and converted to error-severity issues\n * so one failing validator does not block the rest.\n */\n\nimport remarkParse from 'remark-parse'\nimport { unified } from 'unified'\nimport type { ValidationIssue } from './schema-validator'\nimport type { ContentValidator, ValidatorContext } from './types'\n\nimport { codeBlockValidator } from './code-block-validator'\nimport { headingValidator } from './heading-validator'\nimport { linkValidator } from './link-validator'\n\n/** The built-in validators for markdown content. */\nexport const builtinMarkdownValidators: ContentValidator[] = [\n linkValidator,\n codeBlockValidator,\n headingValidator,\n]\n\n/** Run all validators on a single content entry. */\nexport async function runValidators(\n ctx: ValidatorContext,\n validators: ContentValidator[],\n): Promise<ValidationIssue[]> {\n if (ctx.rawContent && !ctx.mdast) {\n ctx.mdast = unified().use(remarkParse).parse(ctx.rawContent)\n }\n\n const issues: ValidationIssue[] = []\n\n for (const validator of validators) {\n try {\n const result = await validator.validate(ctx)\n issues.push(...result)\n } catch (err) {\n // Convert thrown errors into issues so one bad validator doesn't abort all\n const message = err instanceof Error ? err.message : String(err)\n issues.push({\n message: `Validator \"${validator.name}\" threw: ${message}`,\n severity: 'error',\n })\n }\n }\n\n return issues\n}\n","/**\n * ContentStore — in-memory cache for loaded collections.\n *\n * Handles file discovery, loading, validation, and caching.\n * Not exported directly — used internally by ContentLayer.\n */\n\nimport { resolve } from 'path'\nimport type { MarkdownConfig } from './schemas/markdown-config'\nimport type { ZodType } from 'zod'\nimport { ContentEntry } from './entry'\nimport { defaultIncludePatterns, resolveLoader } from './loaders'\nimport type { Loader } from './loaders/types'\nimport { collectRehypePlugins, collectRemarkPlugins, runPluginValidators } from './plugins'\nimport type { CollectionDef, RawEntry } from './schemas/collection'\nimport type { ContentLayerConfig } from './schemas/content-config'\nimport { discoverFiles } from './utils/glob'\nimport { toSlug } from './utils/slug'\nimport { validateSchema, type ValidationIssue } from './validation'\nimport { builtinMarkdownValidators, runValidators } from './validation/runner'\nimport type { ContentValidator } from './validation/types'\n\ntype CacheEntry = {\n entry: ContentEntry<any>\n issues: ValidationIssue[]\n}\n\nexport class ContentStore {\n private cache = new Map<string, Map<string, CacheEntry>>()\n private loaded = new Set<string>()\n private config: ContentLayerConfig\n private rootDir: string\n private markdownConfig: MarkdownConfig\n\n constructor(config: ContentLayerConfig) {\n this.config = config\n this.rootDir = config.root ? resolve(config.root) : process.cwd()\n this.markdownConfig = this.createMarkdownConfig()\n }\n\n /** Load a collection (if not already loaded) and return entries. */\n async loadCollection<S extends ZodType>(\n name: string,\n def: CollectionDef<S>,\n ): Promise<ContentEntry<any>[]> {\n if (this.loaded.has(name)) {\n const cached = this.cache.get(name)\n return cached ? Array.from(cached.values()).map((c) => c.entry) : []\n }\n\n const loader = resolveLoader(def.loader)\n const directory = resolve(this.rootDir, def.directory)\n const include = def.include ?? defaultIncludePatterns(loader)\n\n const files = await discoverFiles({\n directory,\n include,\n exclude: def.exclude,\n })\n\n const entries = new Map<string, CacheEntry>()\n const results = await Promise.all(\n files.map(async (filePath) => {\n try {\n return await this.loadEntry(name, filePath, directory, loader, def)\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err)\n const slug = def.slugify ? def.slugify(filePath, directory) : toSlug(filePath, directory)\n return {\n entry: new ContentEntry(slug, name, filePath, {}, undefined, this.markdownConfig),\n issues: [{ message: `Failed to load: ${message}`, severity: 'error' as const }],\n }\n }\n }),\n )\n\n for (const result of results) {\n if (result) {\n entries.set(result.entry.slug, result)\n }\n }\n\n this.cache.set(name, entries)\n this.loaded.add(name)\n\n return Array.from(entries.values()).map((c) => c.entry)\n }\n\n /** Load a single entry from a file. */\n private async loadEntry(\n collectionName: string,\n filePath: string,\n directory: string,\n loader: Loader,\n def: CollectionDef<any>,\n ): Promise<CacheEntry | null> {\n const loaded = await loader.load(filePath)\n const slug = def.slugify ? def.slugify(filePath, directory) : toSlug(filePath, directory)\n\n let raw: RawEntry = {\n data: loaded.data,\n content: loaded.content,\n filePath,\n slug,\n }\n\n // Apply transform\n if (def.transform) {\n raw = await def.transform(raw)\n }\n\n // Apply computed fields\n if (def.computed) {\n for (const [key, fn] of Object.entries(def.computed) as Array<\n [string, (entry: RawEntry) => any]\n >) {\n raw.data[key] = fn(raw)\n }\n }\n\n // Apply filter\n if (def.filter && !def.filter(raw)) {\n return null\n }\n\n // Validate schema once to collect issues and transformed data.\n const { issues, validatedData } = validateSchema(raw.data, def.schema)\n\n // Custom validation\n if (def.validate) {\n const customError = def.validate(raw)\n if (customError) {\n issues.push({ message: customError, severity: 'error' })\n }\n }\n\n // Run content validators on markdown entries\n const isMarkdownEntry = raw.content !== undefined\n if (isMarkdownEntry) {\n const validators = this.resolveValidators(def)\n if (validators.length > 0) {\n const contentIssues = await runValidators(\n {\n filePath,\n slug,\n collection: collectionName,\n rawContent: raw.content,\n data: raw.data,\n },\n validators,\n )\n issues.push(...contentIssues)\n }\n }\n\n if (this.config.plugins?.length) {\n const pluginIssues = runPluginValidators(this.config.plugins, {\n data: raw.data,\n content: raw.content,\n })\n for (const message of pluginIssues) {\n issues.push({ message, severity: 'error' })\n }\n }\n\n const entry = new ContentEntry(\n slug,\n collectionName,\n filePath,\n validatedData,\n raw.content,\n this.markdownConfig,\n )\n\n return { entry, issues }\n }\n\n /** Get a single entry by slug. */\n getEntry(collection: string, slug: string): ContentEntry<any> | undefined {\n return this.cache.get(collection)?.get(slug)?.entry\n }\n\n /** Get validation issues for a collection. */\n getIssues(collection: string): Map<string, ValidationIssue[]> {\n const result = new Map<string, ValidationIssue[]>()\n const entries = this.cache.get(collection)\n if (!entries) return result\n for (const [slug, cached] of entries) {\n if (cached.issues.length > 0) {\n result.set(slug, cached.issues)\n }\n }\n return result\n }\n\n /** Invalidate a single entry and reload it without reloading the entire collection. */\n async invalidate(collection: string, slug: string): Promise<void> {\n const def = this.config.collections[collection]\n if (!def) return\n\n const collectionCache = this.cache.get(collection)\n if (!collectionCache) return\n\n const existing = collectionCache.get(slug)\n if (!existing) return\n\n const loader = resolveLoader(def.loader)\n const directory = resolve(this.rootDir, def.directory)\n\n try {\n const result = await this.loadEntry(\n collection,\n existing.entry.filePath,\n directory,\n loader,\n def,\n )\n if (result) {\n collectionCache.set(slug, result)\n } else {\n // Entry was filtered out after reload\n collectionCache.delete(slug)\n }\n } catch {\n // File may have been deleted; remove from cache\n collectionCache.delete(slug)\n }\n }\n\n /** Invalidate an entire collection. */\n invalidateCollection(collection: string): void {\n this.cache.delete(collection)\n this.loaded.delete(collection)\n }\n\n /** Invalidate all collections. */\n invalidateAll(): void {\n this.cache.clear()\n this.loaded.clear()\n }\n\n /** Resolve the list of content validators for a collection. */\n private resolveValidators(def: CollectionDef<any>): ContentValidator[] {\n const builtin = def.disableBuiltinValidators ? [] : builtinMarkdownValidators\n const custom = def.validators ?? []\n return [...builtin, ...custom]\n }\n\n private createMarkdownConfig(): MarkdownConfig {\n const base = this.config.markdown ?? {}\n const remarkPlugins = [...(base.remarkPlugins ?? [])]\n const rehypePlugins = [...(base.rehypePlugins ?? [])]\n const plugins = this.config.plugins ?? []\n\n if (plugins.length > 0) {\n remarkPlugins.push(...collectRemarkPlugins(plugins))\n rehypePlugins.push(...collectRehypePlugins(plugins))\n }\n\n return {\n ...base,\n ...(remarkPlugins.length > 0 ? { remarkPlugins } : {}),\n ...(rehypePlugins.length > 0 ? { rehypePlugins } : {}),\n }\n }\n}\n","/**\n * ContentLayer — the main API for working with content collections.\n *\n * Created via createContentLayer(config). Provides methods to:\n * - Load and query collections (getCollection, getEntry)\n * - Convert markdown directly (convert)\n * - Invalidate cache (invalidate, invalidateCollection, invalidateAll)\n * - Validate all entries (validate)\n */\n\nimport type { ConvertResult } from './convert'\nimport type { MarkdownConfig } from './schemas/markdown-config'\nimport type { ContentEntry } from './entry'\nimport type { CollectionDef } from './schemas/collection'\nimport type { ContentLayerConfig } from './schemas/content-config'\nimport { ContentStore } from './store'\nimport type { ValidationResult } from './validation'\n\nexport interface ContentLayer {\n /** Get all entries in a collection. */\n getCollection(name: string): Promise<ContentEntry<any>[]>\n\n /** Get a single entry by collection name and slug. */\n getEntry(collection: string, slug: string): Promise<ContentEntry<any> | undefined>\n\n /** Convert raw markdown to HTML (no collection, no validation). */\n convert(markdown: string, options?: LayerConvertOptions): Promise<ConvertResult>\n\n /** Invalidate a single entry's cache. */\n invalidate(collection: string, slug: string): Promise<void>\n\n /** Invalidate an entire collection's cache. */\n invalidateCollection(collection: string): void\n\n /** Invalidate all cached data. */\n invalidateAll(): void\n\n /** Validate all entries in a collection (or all collections). */\n validate(collection?: string): Promise<ValidationResult[]>\n\n /** Get the names of all configured collections. */\n getCollectionNames(): string[]\n\n /** Get the definition of a collection. */\n getCollectionDef(name: string): CollectionDef | undefined\n}\n\nexport type LayerConvertOptions = {\n markdown?: MarkdownConfig\n}\n\nclass ContentLayerImpl implements ContentLayer {\n private store: ContentStore\n private config: ContentLayerConfig\n\n constructor(config: ContentLayerConfig) {\n this.config = config\n this.store = new ContentStore(config)\n }\n\n async getCollection(name: string): Promise<ContentEntry<any>[]> {\n const def = this.config.collections[name]\n if (!def) {\n throw new Error(\n `Collection \"${name}\" not found. Available: ${Object.keys(this.config.collections).join(\n ', ',\n )}`,\n )\n }\n return this.store.loadCollection(name, def)\n }\n\n async getEntry(collection: string, slug: string): Promise<ContentEntry<any> | undefined> {\n // The first getEntry call loads the full collection and then serves from cache.\n // Single-entry loading would skip collection-level transforms and validation context.\n await this.getCollection(collection)\n return this.store.getEntry(collection, slug)\n }\n\n async convert(markdown: string, options?: LayerConvertOptions): Promise<ConvertResult> {\n const { convert: coreConvert } = await import('./convert.js')\n return coreConvert(markdown, {\n markdown: options?.markdown ?? this.config.markdown,\n })\n }\n\n async invalidate(collection: string, slug: string): Promise<void> {\n await this.store.invalidate(collection, slug)\n }\n\n invalidateCollection(collection: string): void {\n this.store.invalidateCollection(collection)\n }\n\n invalidateAll(): void {\n this.store.invalidateAll()\n }\n\n async validate(collection?: string): Promise<ValidationResult[]> {\n const names = collection ? [collection] : Object.keys(this.config.collections)\n const results: ValidationResult[] = []\n\n for (const name of names) {\n // Ensure loaded\n await this.getCollection(name)\n\n const issues = this.store.getIssues(name)\n const entries = Array.from(issues.entries()).map(([slug, entryIssues]) => {\n const entry = this.store.getEntry(name, slug)\n return {\n slug,\n filePath: entry?.filePath ?? '',\n issues: entryIssues,\n }\n })\n\n let errors = 0\n let warnings = 0\n for (const entry of entries) {\n for (const issue of entry.issues) {\n if (issue.severity === 'error') errors++\n else warnings++\n }\n }\n\n results.push({ collection: name, entries, errors, warnings })\n }\n\n return results\n }\n\n getCollectionNames(): string[] {\n return Object.keys(this.config.collections)\n }\n\n getCollectionDef(name: string): CollectionDef | undefined {\n return this.config.collections[name]\n }\n}\n\n/** Create a new content layer from a configuration. */\nexport function createContentLayer(config: ContentLayerConfig): ContentLayer {\n return new ContentLayerImpl(config)\n}\n"],"mappings":";;;;;;;;;;;;;;AAOA,SAAgB,gBAAgB,aAA6B;CAU3D,MAAM,YATY,YACf,QAAQ,mBAAmB,IAAI,CAC/B,QAAQ,mBAAmB,IAAI,CAC/B,QAAQ,oBAAoB,IAAI,CAChC,QAAQ,YAAY,IAAI,CACxB,QAAQ,4BAA4B,KAAK,CACzC,QAAQ,aAAa,IAAI,CACzB,QAAQ,QA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,MAAM,UAAU,KAAK;GACzC,MAAM,UAAU,MAAM,KAAK,OAAO,SAAS,CAAC,CAAC,KAAK,CAAC,MAAM,iBAAiB;AAExE,WAAO;KACL;KACA,UAHY,KAAK,MAAM,SAAS,MAAM,KAAK,EAG1B,YAAY;KAC7B,QAAQ;KACT;KACD;GAEF,IAAI,SAAS;GACb,IAAI,WAAW;AACf,QAAK,MAAM,SAAS,QAClB,MAAK,MAAM,SAAS,MAAM,OACxB,KAAI,MAAM,aAAa,QAAS;OAC3B;AAIT,WAAQ,KAAK;IAAE,YAAY;IAAM;IAAS;IAAQ;IAAU,CAAC;;AAG/D,SAAO;;CAGT,qBAA+B;AAC7B,SAAO,OAAO,KAAK,KAAK,OAAO,YAAY;;CAG7C,iBAAiB,MAAyC;AACxD,SAAO,KAAK,OAAO,YAAY;;;;AAKnC,SAAgB,mBAAmB,QAA0C;AAC3E,QAAO,IAAI,iBAAiB,OAAO"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { t as processMarkdown } from "./markdown-Cj5X26FL.mjs";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __exportAll = (all, no_symbols) => {
|
|
5
|
+
let target = {};
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
11
|
+
return target;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/convert.ts
|
|
15
|
+
var convert_exports = /* @__PURE__ */ __exportAll({ convert: () => convert });
|
|
16
|
+
async function convert(input, options = {}) {
|
|
17
|
+
const result = await processMarkdown(input, options.markdown || {});
|
|
18
|
+
return {
|
|
19
|
+
html: result.html,
|
|
20
|
+
toc: result.headings,
|
|
21
|
+
frontmatter: result.frontmatter
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { convert_exports as n, convert as t };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=convert-XdGgNqH0.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-XdGgNqH0.mjs","names":[],"sources":["../src/convert.ts"],"sourcesContent":["import { processMarkdown } from './markdown'\nimport type { Heading } from './schemas/heading'\nimport type { MarkdownConfig } from './schemas/markdown-config'\n\nexport type ConvertOptions = {\n markdown?: MarkdownConfig\n}\n\nexport type ConvertResult = {\n html: string\n toc: Heading[]\n frontmatter: Record<string, any>\n}\n\nexport async function convert(input: string, options: ConvertOptions = {}): Promise<ConvertResult> {\n const result = await processMarkdown(input, options.markdown || {})\n return { html: result.html, toc: result.headings, frontmatter: result.frontmatter }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAcA,eAAsB,QAAQ,OAAe,UAA0B,EAAE,EAA0B;CACjG,MAAM,SAAS,MAAM,gBAAgB,OAAO,QAAQ,YAAY,EAAE,CAAC;AACnE,QAAO;EAAE,MAAM,OAAO;EAAM,KAAK,OAAO;EAAU,aAAa,OAAO;EAAa"}
|
|
@@ -5,8 +5,8 @@ declare const BaseFrontmatterSchema: z.ZodObject<{
|
|
|
5
5
|
title: z.ZodString;
|
|
6
6
|
description: z.ZodString;
|
|
7
7
|
publishedDate: z.ZodCoercedDate<unknown>;
|
|
8
|
-
lastUpdatedOn: z.ZodCoercedDate<unknown
|
|
9
|
-
tags: z.ZodArray<z.ZodString
|
|
8
|
+
lastUpdatedOn: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
9
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
10
10
|
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
11
11
|
}, z.core.$loose>;
|
|
12
12
|
type BaseFrontmatter = z.infer<typeof BaseFrontmatterSchema>;
|
|
@@ -14,8 +14,8 @@ declare const ProjectFrontmatterSchema: z.ZodObject<{
|
|
|
14
14
|
title: z.ZodString;
|
|
15
15
|
description: z.ZodString;
|
|
16
16
|
publishedDate: z.ZodCoercedDate<unknown>;
|
|
17
|
-
lastUpdatedOn: z.ZodCoercedDate<unknown
|
|
18
|
-
tags: z.ZodArray<z.ZodString
|
|
17
|
+
lastUpdatedOn: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
18
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
19
19
|
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
20
20
|
gitRepo: z.ZodOptional<z.ZodString>;
|
|
21
21
|
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -28,8 +28,8 @@ declare const BlogFrontmatterSchema: z.ZodObject<{
|
|
|
28
28
|
title: z.ZodString;
|
|
29
29
|
description: z.ZodString;
|
|
30
30
|
publishedDate: z.ZodCoercedDate<unknown>;
|
|
31
|
-
lastUpdatedOn: z.ZodCoercedDate<unknown
|
|
32
|
-
tags: z.ZodArray<z.ZodString
|
|
31
|
+
lastUpdatedOn: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
32
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
33
33
|
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
34
34
|
category: z.ZodOptional<z.ZodString>;
|
|
35
35
|
featured: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -38,4 +38,4 @@ declare const BlogFrontmatterSchema: z.ZodObject<{
|
|
|
38
38
|
type BlogFrontmatter = z.infer<typeof BlogFrontmatterSchema>;
|
|
39
39
|
//#endregion
|
|
40
40
|
export { ProjectFrontmatter as a, BlogFrontmatterSchema as i, BaseFrontmatterSchema as n, ProjectFrontmatterSchema as o, BlogFrontmatter as r, BaseFrontmatter as t };
|
|
41
|
-
//# sourceMappingURL=index-
|
|
41
|
+
//# sourceMappingURL=index-D79hUFbK.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-D79hUFbK.d.mts","names":[],"sources":["../src/schemas/frontmatter.ts"],"mappings":";;;cAIa,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;KAWtB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,qBAAA;AAAA,cAIhC,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;KAYzB,kBAAA,GAAqB,CAAA,CAAE,KAAA,QAAa,wBAAA;AAAA,cAInC,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;KAMtB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,qBAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as LoaderResult, r as LoaderType, t as Loader } from "./types-
|
|
1
|
+
import { n as LoaderResult, r as LoaderType, t as Loader } from "./types-B-V5qemH.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/loaders/json.d.ts
|
|
4
4
|
declare class JsonLoader implements Loader {
|
|
5
5
|
name: string;
|
|
6
6
|
kind: "data";
|
|
7
7
|
extensions: string[];
|
|
8
|
-
load(filePath: string): LoaderResult
|
|
8
|
+
load(filePath: string): Promise<LoaderResult>;
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/loaders/jsonc.d.ts
|
|
@@ -13,7 +13,7 @@ declare class JsoncLoader implements Loader {
|
|
|
13
13
|
name: string;
|
|
14
14
|
kind: "data";
|
|
15
15
|
extensions: string[];
|
|
16
|
-
load(filePath: string): LoaderResult
|
|
16
|
+
load(filePath: string): Promise<LoaderResult>;
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/loaders/errors.d.ts
|
|
@@ -30,7 +30,7 @@ declare class MarkdownLoader implements Loader {
|
|
|
30
30
|
name: string;
|
|
31
31
|
kind: "markdown";
|
|
32
32
|
extensions: string[];
|
|
33
|
-
load(filePath: string): LoaderResult
|
|
33
|
+
load(filePath: string): Promise<LoaderResult>;
|
|
34
34
|
}
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/loaders/toml.d.ts
|
|
@@ -38,7 +38,7 @@ declare class TomlLoader implements Loader {
|
|
|
38
38
|
name: string;
|
|
39
39
|
kind: "data";
|
|
40
40
|
extensions: string[];
|
|
41
|
-
load(filePath: string): LoaderResult
|
|
41
|
+
load(filePath: string): Promise<LoaderResult>;
|
|
42
42
|
}
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region src/loaders/yaml.d.ts
|
|
@@ -46,7 +46,7 @@ declare class YamlLoader implements Loader {
|
|
|
46
46
|
name: string;
|
|
47
47
|
kind: "data";
|
|
48
48
|
extensions: string[];
|
|
49
|
-
load(filePath: string): LoaderResult
|
|
49
|
+
load(filePath: string): Promise<LoaderResult>;
|
|
50
50
|
}
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region src/loaders/index.d.ts
|
|
@@ -56,4 +56,4 @@ declare function resolveLoader(loaderOrType: LoaderType | Loader): Loader;
|
|
|
56
56
|
declare function defaultIncludePatterns(loader: Loader): string[];
|
|
57
57
|
//#endregion
|
|
58
58
|
export { MarkdownLoader as a, JsonLoader as c, TomlLoader as i, resolveLoader as n, LoaderError as o, YamlLoader as r, JsoncLoader as s, defaultIncludePatterns as t };
|
|
59
|
-
//# sourceMappingURL=index-
|
|
59
|
+
//# sourceMappingURL=index-Dbsw1QON.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Dbsw1QON.d.mts","names":[],"sources":["../src/loaders/json.ts","../src/loaders/jsonc.ts","../src/loaders/errors.ts","../src/loaders/markdown.ts","../src/loaders/toml.ts","../src/loaders/yaml.ts","../src/loaders/index.ts"],"mappings":";;;cAWa,UAAA,YAAsB,MAAA;EACjC,IAAA;EACA,IAAA;EACA,UAAA;EAEM,IAAA,CAAK,QAAA,WAAmB,OAAA,CAAQ,YAAA;AAAA;;;cCoC3B,WAAA,YAAuB,MAAA;EAClC,IAAA;EACA,IAAA;EACA,UAAA;EAEM,IAAA,CAAK,QAAA,WAAmB,OAAA,CAAQ,YAAA;AAAA;;;cCzD3B,WAAA,SAAoB,KAAA;EAAA,SACtB,QAAA;EAAA,SACA,MAAA;EAAA,SACA,IAAA;EAAA,SACA,MAAA;cAEG,OAAA,UAAiB,QAAA,UAAkB,MAAA,UAAgB,IAAA,WAAe,MAAA;AAAA;;;cCOnE,cAAA,YAA0B,MAAA;EACrC,IAAA;EACA,IAAA;EACA,UAAA;EAEM,IAAA,CAAK,QAAA,WAAmB,OAAA,CAAQ,YAAA;AAAA;;;cCT3B,UAAA,YAAsB,MAAA;EACjC,IAAA;EACA,IAAA;EACA,UAAA;EAEM,IAAA,CAAK,QAAA,WAAmB,OAAA,CAAQ,YAAA;AAAA;;;cCL3B,UAAA,YAAsB,MAAA;EACjC,IAAA;EACA,IAAA;EACA,UAAA;EAEM,IAAA,CAAK,QAAA,WAAmB,OAAA,CAAQ,YAAA;AAAA;;;;iBCaxB,aAAA,CAAc,YAAA,EAAc,UAAA,GAAa,MAAA,GAAS,MAAA;;iBAqBlD,sBAAA,CAAuB,MAAA,EAAQ,MAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AiArtifact, AiArtifactKind, AiAssistant, AiInstallOptions, AiInstallResult, AiInstallScope, getAiArtifactContent, getAiArtifacts, installAiArtifacts } from "./ai/index.mjs";
|
|
2
2
|
import { t as buildCss } from "./index-CeNDTM-y.mjs";
|
|
3
|
-
import { n as LoaderResult, r as LoaderType, t as Loader } from "./types-
|
|
4
|
-
import { a as CollectionMap, c as RawEntry, d as ValidationEntryResult, f as ValidationIssue, i as CollectionDef, l as ContentValidator, n as ContentPlugin, o as InferCollectionData, p as ValidationResult, r as CollectionComputed, s as InferCollectionLoaderKind, t as ContentLayerConfig, u as ValidatorContext } from "./content-config-
|
|
3
|
+
import { n as LoaderResult, r as LoaderType, t as Loader } from "./types-B-V5qemH.mjs";
|
|
4
|
+
import { a as CollectionMap, c as RawEntry, d as ValidationEntryResult, f as ValidationIssue, i as CollectionDef, l as ContentValidator, n as ContentPlugin, o as InferCollectionData, p as ValidationResult, r as CollectionComputed, s as InferCollectionLoaderKind, t as ContentLayerConfig, u as ValidatorContext } from "./content-config-wW-3r5gG.mjs";
|
|
5
5
|
import { i as MarkdownConfigSchema, n as HeadingSchema, r as MarkdownConfig, t as Heading } from "./heading-Dhvzlay-.mjs";
|
|
6
6
|
import { Fragment, HtmlString, h } from "./jsx-runtime/index.mjs";
|
|
7
7
|
import { n as processMarkdown, t as MarkdownResult } from "./index-DpRBzO8Q.mjs";
|
|
8
|
-
import { a as ProjectFrontmatter, i as BlogFrontmatterSchema, n as BaseFrontmatterSchema, o as ProjectFrontmatterSchema, r as BlogFrontmatter, t as BaseFrontmatter } from "./index-
|
|
9
|
-
import { a as MarkdownLoader, c as JsonLoader, i as TomlLoader, r as YamlLoader, s as JsoncLoader } from "./index-
|
|
8
|
+
import { a as ProjectFrontmatter, i as BlogFrontmatterSchema, n as BaseFrontmatterSchema, o as ProjectFrontmatterSchema, r as BlogFrontmatter, t as BaseFrontmatter } from "./index-D79hUFbK.mjs";
|
|
9
|
+
import { a as MarkdownLoader, c as JsonLoader, i as TomlLoader, r as YamlLoader, s as JsoncLoader } from "./index-Dbsw1QON.mjs";
|
|
10
10
|
import { ZodSchema, z, z as z$1 } from "zod";
|
|
11
11
|
|
|
12
12
|
//#region src/config.d.ts
|
|
@@ -84,7 +84,7 @@ interface ContentLayer {
|
|
|
84
84
|
/** Convert raw markdown to HTML (no collection, no validation). */
|
|
85
85
|
convert(markdown: string, options?: LayerConvertOptions): Promise<ConvertResult>;
|
|
86
86
|
/** Invalidate a single entry's cache. */
|
|
87
|
-
invalidate(collection: string, slug: string): void
|
|
87
|
+
invalidate(collection: string, slug: string): Promise<void>;
|
|
88
88
|
/** Invalidate an entire collection's cache. */
|
|
89
89
|
invalidateCollection(collection: string): void;
|
|
90
90
|
/** Invalidate all cached data. */
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/config.ts","../src/convert.ts","../src/entry.ts","../src/validation/code-block-validator.ts","../src/validation/heading-validator.ts","../src/validation/link-validator.ts","../src/validation/runner.ts","../src/content-layer.ts","../src/frontmatter.ts","../src/toc.ts"],"mappings":";;;;;;;;;;;;;iBAagB,YAAA,CAAa,MAAA,EAAQ,kBAAA,GAAqB,kBAAA;AAA1D;AAAA,iBAKgB,gBAAA,iBACE,GAAA,CAAE,OAAA,0BACM,kBAAA,6BACF,UAAA,GAAa,MAAA,GAAS,UAAA,GAAa,MAAA,CAAA,CAEzD,GAAA,EAAK,IAAA,CAAK,aAAA,CAAc,CAAA,EAAG,SAAA,EAAW,OAAA;EACpC,QAAA,GAAW,SAAA,GAAY,kBAAA;AAAA,IAExB,aAAA,CAAc,CAAA,EAAG,SAAA,EAAW,OAAA;;iBAKf,iBAAA,4BAA6C,aAAA,CAAA,CAC3D,WAAA,EAAa,YAAA,GACZ,YAAA;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/config.ts","../src/convert.ts","../src/entry.ts","../src/validation/code-block-validator.ts","../src/validation/heading-validator.ts","../src/validation/link-validator.ts","../src/validation/runner.ts","../src/content-layer.ts","../src/frontmatter.ts","../src/toc.ts"],"mappings":";;;;;;;;;;;;;iBAagB,YAAA,CAAa,MAAA,EAAQ,kBAAA,GAAqB,kBAAA;AAA1D;AAAA,iBAKgB,gBAAA,iBACE,GAAA,CAAE,OAAA,0BACM,kBAAA,6BACF,UAAA,GAAa,MAAA,GAAS,UAAA,GAAa,MAAA,CAAA,CAEzD,GAAA,EAAK,IAAA,CAAK,aAAA,CAAc,CAAA,EAAG,SAAA,EAAW,OAAA;EACpC,QAAA,GAAW,SAAA,GAAY,kBAAA;AAAA,IAExB,aAAA,CAAc,CAAA,EAAG,SAAA,EAAW,OAAA;;iBAKf,iBAA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AAA,CAAW,UAAA,UAAoB,IAAA,WAAe,OAAA;EPV9B;EOahB,oBAAA,CAAqB,UAAA;EPXC;EOctB,aAAA;EPd4C;EOiB5C,QAAA,CAAS,UAAA,YAAsB,OAAA,CAAQ,gBAAA;EPff;EOkBxB,kBAAA;EPlBsC;EOqBtC,gBAAA,CAAiB,IAAA,WAAe,aAAA;AAAA;AAAA,KAGtB,mBAAA;EACV,QAAA,GAAW,cAAA;AAAA;;iBA6FG,kBAAA,CAAmB,MAAA,EAAQ,kBAAA,GAAqB,YAAA;;;KClIpD,iBAAA;EACV,WAAA,EAAa,MAAA;EACb,OAAA;AAAA;;iBAIc,kBAAA,CAAmB,GAAA,WAAc,iBAAA;;iBAMjC,mBAAA,GAAA,CACd,WAAA,EAAa,MAAA,eACb,MAAA,EAAQ,SAAA,CAAU,CAAA;EACf,OAAA;EAAe,IAAA,EAAM,CAAA;AAAA;EAAQ,OAAA;EAAgB,MAAA;AAAA;;;;;;;;;iBClBlC,UAAA,CAAW,IAAA,WAAe,OAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as convert } from "./convert-XdGgNqH0.mjs";
|
|
2
2
|
import { t as processMarkdown } from "./markdown-Cj5X26FL.mjs";
|
|
3
|
-
import { a as headingValidator, c as ContentEntry, i as linkValidator, n as builtinMarkdownValidators, o as codeBlockValidator, r as runValidators, t as createContentLayer } from "./content-layer-
|
|
4
|
-
import { a as MarkdownLoader, i as TomlLoader, o as JsoncLoader, r as YamlLoader, s as JsonLoader } from "./loaders-
|
|
3
|
+
import { a as headingValidator, c as ContentEntry, i as linkValidator, n as builtinMarkdownValidators, o as codeBlockValidator, r as runValidators, t as createContentLayer } from "./content-layer-DWdgdBeI.mjs";
|
|
4
|
+
import { a as MarkdownLoader, i as TomlLoader, o as JsoncLoader, r as YamlLoader, s as JsonLoader } from "./loaders-Bla48ZN9.mjs";
|
|
5
5
|
import { Fragment, HtmlString, h } from "./jsx-runtime/index.mjs";
|
|
6
6
|
import { t as buildCss } from "./css-ekIt2Fdb.mjs";
|
|
7
|
-
import { a as ProjectFrontmatterSchema, i as BlogFrontmatterSchema, n as HeadingSchema, r as BaseFrontmatterSchema, t as MarkdownConfigSchema } from "./schemas-
|
|
7
|
+
import { a as ProjectFrontmatterSchema, i as BlogFrontmatterSchema, n as HeadingSchema, r as BaseFrontmatterSchema, t as MarkdownConfigSchema } from "./schemas-BZEPTGWs.mjs";
|
|
8
8
|
import { getAiArtifactContent, getAiArtifacts, installAiArtifacts } from "./ai/index.mjs";
|
|
9
9
|
import matter from "gray-matter";
|
|
10
10
|
import { parse } from "yaml";
|
|
@@ -51,6 +51,30 @@ function validateFrontmatter(frontmatter, schema) {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
|
+
//#region src/toc.ts
|
|
55
|
+
/**
|
|
56
|
+
* Extract table of contents headings from an HTML string.
|
|
57
|
+
*
|
|
58
|
+
* Regex-based: finds <h[1-6] id="...">text</h[1-6]>, strips inner HTML tags.
|
|
59
|
+
* No dependency on unified — works on any HTML string.
|
|
60
|
+
*/
|
|
61
|
+
function extractToc(html) {
|
|
62
|
+
const headings = [];
|
|
63
|
+
const re = /<h([1-6])\s+id="([^"]*)"[^>]*>([\s\S]*?)<\/h\1>/gi;
|
|
64
|
+
let match;
|
|
65
|
+
while ((match = re.exec(html)) !== null) {
|
|
66
|
+
const depth = parseInt(match[1], 10);
|
|
67
|
+
const slug = match[2];
|
|
68
|
+
const text = match[3].replace(/<[^>]+>/g, "").trim();
|
|
69
|
+
headings.push({
|
|
70
|
+
depth,
|
|
71
|
+
text,
|
|
72
|
+
slug
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return headings;
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
54
78
|
export { BaseFrontmatterSchema, BlogFrontmatterSchema, ContentEntry, Fragment, HeadingSchema, HtmlString, JsonLoader, JsoncLoader, MarkdownConfigSchema, MarkdownLoader, ProjectFrontmatterSchema, TomlLoader, YamlLoader, buildCss, builtinMarkdownValidators, codeBlockValidator, convert, createContentLayer, defineCollection, defineCollections, defineConfig, extractFrontmatter, extractToc, getAiArtifactContent, getAiArtifacts, h, headingValidator, installAiArtifacts, linkValidator, processMarkdown, runValidators, validateFrontmatter, z };
|
|
55
79
|
|
|
56
80
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["parseYaml"],"sources":["../src/config.ts","../src/frontmatter.ts"],"sourcesContent":["/**\n * Configuration helpers.\n *\n * defineConfig() and defineCollection() are type-safe identity functions\n * that provide TypeScript inference for collection schemas.\n */\n\nimport type { z } from 'zod'\nimport type { CollectionComputed, CollectionDef, CollectionMap } from './schemas/collection'\nimport type { Loader, LoaderType } from './loaders/types'\nimport type { ContentLayerConfig } from './schemas/content-config'\n\n/** Define a content layer configuration with type inference. */\nexport function defineConfig(config: ContentLayerConfig): ContentLayerConfig {\n return config\n}\n\n/** Define a collection with Zod schema type inference. */\nexport function defineCollection<\n const S extends z.ZodType,\n const TComputed extends CollectionComputed = {},\n const TLoader extends LoaderType | Loader = LoaderType | Loader,\n>(\n def: Omit<CollectionDef<S, TComputed, TLoader>, 'computed'> & {\n computed?: TComputed & CollectionComputed\n },\n): CollectionDef<S, TComputed, TLoader> {\n return def\n}\n\n/** Define a named collection map with strong literal inference. */\nexport function defineCollections<const TCollections extends CollectionMap>(\n collections: TCollections,\n): TCollections {\n return collections\n}\n","/**\n * Frontmatter extraction and validation.\n *\n * Uses gray-matter to parse YAML frontmatter from markdown,\n * and optionally validates against a Zod schema.\n */\n\nimport matter from 'gray-matter'\nimport { parse as parseYaml } from 'yaml'\nimport type { ZodSchema } from 'zod'\n\nexport type FrontmatterResult = {\n frontmatter: Record<string, any>\n content: string\n}\n\n/** Extract frontmatter from raw markdown using gray-matter. */\nexport function extractFrontmatter(raw: string): FrontmatterResult {\n const { data, content } = matter(raw, { engines: { yaml: parseYaml } })\n return { frontmatter: data, content }\n}\n\n/** Validate frontmatter against a Zod schema. Returns parsed data or throws. */\nexport function validateFrontmatter<T>(\n frontmatter: Record<string, any>,\n schema: ZodSchema<T>,\n): { success: true; data: T } | { success: false; errors: string[] } {\n const result = schema.safeParse(frontmatter)\n if (result.success) {\n return { success: true, data: result.data }\n }\n const errors = result.error.issues.map((issue) => `${issue.path.join('.')}: ${issue.message}`)\n return { success: false, errors }\n}\n"],"mappings":";;;;;;;;;;;;;AAaA,SAAgB,aAAa,QAAgD;AAC3E,QAAO;;;AAIT,SAAgB,iBAKd,KAGsC;AACtC,QAAO;;;AAIT,SAAgB,kBACd,aACc;AACd,QAAO;;;;;;;;;;;ACjBT,SAAgB,mBAAmB,KAAgC;CACjE,MAAM,EAAE,MAAM,YAAY,OAAO,KAAK,EAAE,SAAS,EAAE,MAAMA,OAAW,EAAE,CAAC;AACvE,QAAO;EAAE,aAAa;EAAM;EAAS;;;AAIvC,SAAgB,oBACd,aACA,QACmE;CACnE,MAAM,SAAS,OAAO,UAAU,YAAY;AAC5C,KAAI,OAAO,QACT,QAAO;EAAE,SAAS;EAAM,MAAM,OAAO;EAAM;AAG7C,QAAO;EAAE,SAAS;EAAO,QADV,OAAO,MAAM,OAAO,KAAK,UAAU,GAAG,MAAM,KAAK,KAAK,IAAI,CAAC,IAAI,MAAM,UAAU;EAC7D"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["parseYaml"],"sources":["../src/config.ts","../src/frontmatter.ts","../src/toc.ts"],"sourcesContent":["/**\n * Configuration helpers.\n *\n * defineConfig() and defineCollection() are type-safe identity functions\n * that provide TypeScript inference for collection schemas.\n */\n\nimport type { z } from 'zod'\nimport type { CollectionComputed, CollectionDef, CollectionMap } from './schemas/collection'\nimport type { Loader, LoaderType } from './loaders/types'\nimport type { ContentLayerConfig } from './schemas/content-config'\n\n/** Define a content layer configuration with type inference. */\nexport function defineConfig(config: ContentLayerConfig): ContentLayerConfig {\n return config\n}\n\n/** Define a collection with Zod schema type inference. */\nexport function defineCollection<\n const S extends z.ZodType,\n const TComputed extends CollectionComputed = {},\n const TLoader extends LoaderType | Loader = LoaderType | Loader,\n>(\n def: Omit<CollectionDef<S, TComputed, TLoader>, 'computed'> & {\n computed?: TComputed & CollectionComputed\n },\n): CollectionDef<S, TComputed, TLoader> {\n return def\n}\n\n/** Define a named collection map with strong literal inference. */\nexport function defineCollections<const TCollections extends CollectionMap>(\n collections: TCollections,\n): TCollections {\n return collections\n}\n","/**\n * Frontmatter extraction and validation.\n *\n * Uses gray-matter to parse YAML frontmatter from markdown,\n * and optionally validates against a Zod schema.\n */\n\nimport matter from 'gray-matter'\nimport { parse as parseYaml } from 'yaml'\nimport type { ZodSchema } from 'zod'\n\nexport type FrontmatterResult = {\n frontmatter: Record<string, any>\n content: string\n}\n\n/** Extract frontmatter from raw markdown using gray-matter. */\nexport function extractFrontmatter(raw: string): FrontmatterResult {\n const { data, content } = matter(raw, { engines: { yaml: parseYaml } })\n return { frontmatter: data, content }\n}\n\n/** Validate frontmatter against a Zod schema. Returns parsed data or throws. */\nexport function validateFrontmatter<T>(\n frontmatter: Record<string, any>,\n schema: ZodSchema<T>,\n): { success: true; data: T } | { success: false; errors: string[] } {\n const result = schema.safeParse(frontmatter)\n if (result.success) {\n return { success: true, data: result.data }\n }\n const errors = result.error.issues.map((issue) => `${issue.path.join('.')}: ${issue.message}`)\n return { success: false, errors }\n}\n","import type { Heading } from './schemas/heading'\n\n/**\n * Extract table of contents headings from an HTML string.\n *\n * Regex-based: finds <h[1-6] id=\"...\">text</h[1-6]>, strips inner HTML tags.\n * No dependency on unified — works on any HTML string.\n */\nexport function extractToc(html: string): Heading[] {\n const headings: Heading[] = []\n const re = /<h([1-6])\\s+id=\"([^\"]*)\"[^>]*>([\\s\\S]*?)<\\/h\\1>/gi\n let match: RegExpExecArray | null\n\n while ((match = re.exec(html)) !== null) {\n const depth = parseInt(match[1], 10)\n const slug = match[2]\n // Strip inner HTML tags to get plain text\n const text = match[3].replace(/<[^>]+>/g, '').trim()\n headings.push({ depth, text, slug })\n }\n\n return headings\n}\n"],"mappings":";;;;;;;;;;;;;AAaA,SAAgB,aAAa,QAAgD;AAC3E,QAAO;;;AAIT,SAAgB,iBAKd,KAGsC;AACtC,QAAO;;;AAIT,SAAgB,kBACd,aACc;AACd,QAAO;;;;;;;;;;;ACjBT,SAAgB,mBAAmB,KAAgC;CACjE,MAAM,EAAE,MAAM,YAAY,OAAO,KAAK,EAAE,SAAS,EAAE,MAAMA,OAAW,EAAE,CAAC;AACvE,QAAO;EAAE,aAAa;EAAM;EAAS;;;AAIvC,SAAgB,oBACd,aACA,QACmE;CACnE,MAAM,SAAS,OAAO,UAAU,YAAY;AAC5C,KAAI,OAAO,QACT,QAAO;EAAE,SAAS;EAAM,MAAM,OAAO;EAAM;AAG7C,QAAO;EAAE,SAAS;EAAO,QADV,OAAO,MAAM,OAAO,KAAK,UAAU,GAAG,MAAM,KAAK,KAAK,IAAI,CAAC,IAAI,MAAM,UAAU;EAC7D;;;;;;;;;;ACxBnC,SAAgB,WAAW,MAAyB;CAClD,MAAM,WAAsB,EAAE;CAC9B,MAAM,KAAK;CACX,IAAI;AAEJ,SAAQ,QAAQ,GAAG,KAAK,KAAK,MAAM,MAAM;EACvC,MAAM,QAAQ,SAAS,MAAM,IAAI,GAAG;EACpC,MAAM,OAAO,MAAM;EAEnB,MAAM,OAAO,MAAM,GAAG,QAAQ,YAAY,GAAG,CAAC,MAAM;AACpD,WAAS,KAAK;GAAE;GAAO;GAAM;GAAM,CAAC;;AAGtC,QAAO"}
|
package/dist/loaders/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as LoaderResult, r as LoaderType, t as Loader } from "../types-
|
|
2
|
-
import { a as MarkdownLoader, c as JsonLoader, i as TomlLoader, n as resolveLoader, o as LoaderError, r as YamlLoader, s as JsoncLoader, t as defaultIncludePatterns } from "../index-
|
|
1
|
+
import { n as LoaderResult, r as LoaderType, t as Loader } from "../types-B-V5qemH.mjs";
|
|
2
|
+
import { a as MarkdownLoader, c as JsonLoader, i as TomlLoader, n as resolveLoader, o as LoaderError, r as YamlLoader, s as JsoncLoader, t as defaultIncludePatterns } from "../index-Dbsw1QON.mjs";
|
|
3
3
|
export { JsonLoader, JsoncLoader, Loader, LoaderError, LoaderResult, LoaderType, MarkdownLoader, TomlLoader, YamlLoader, defaultIncludePatterns, resolveLoader };
|
package/dist/loaders/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MarkdownLoader, c as LoaderError, i as TomlLoader, n as resolveLoader, o as JsoncLoader, r as YamlLoader, s as JsonLoader, t as defaultIncludePatterns } from "../loaders-
|
|
1
|
+
import { a as MarkdownLoader, c as LoaderError, i as TomlLoader, n as resolveLoader, o as JsoncLoader, r as YamlLoader, s as JsonLoader, t as defaultIncludePatterns } from "../loaders-Bla48ZN9.mjs";
|
|
2
2
|
export { JsonLoader, JsoncLoader, LoaderError, MarkdownLoader, TomlLoader, YamlLoader, defaultIncludePatterns, resolveLoader };
|