import { n as LoaderResult, r as LoaderType, t as Loader } from "./types-BpfjH9-C.mjs"; import { a as CollectionMap, c as RawEntry, d as ValidatorContext, f as ValidationEntryResult, i as CollectionDef, l as ContentValidator, m as ValidationResult, n as ContentPlugin, o as InferCollectionData, p as ValidationIssue, r as CollectionComputed, s as InferCollectionLoaderKind, t as ContentLayerConfig, u as ResolvedValidatorContext } from "./content-config-CJROdGFz.mjs"; import { i as MarkdownConfigSchema, n as HeadingSchema, r as MarkdownConfig, t as Heading } from "./heading-CIGVDIkM.mjs"; import { a as ProjectFrontmatter, i as BlogFrontmatterSchema, n as BaseFrontmatterSchema, o as ProjectFrontmatterSchema, r as BlogFrontmatter, t as BaseFrontmatter } from "./index-CphA0N9D.mjs"; import { A as ContentEntry, C as LinkValidatorOptions, D as validateImageHtml, E as imageStructureValidator, M as ConvertOptions, N as ConvertResult, O as headingValidator, P as convert, S as runValidators, T as linkValidator, _ as ValidateContentOptions, a as WatchEvent, b as validateContent, c as DiscoveredContentConfig, d as LoadedCollections, f as buildFileSchemaMap, g as ContentFileResult, h as loadContentSchemaMap, i as WatchCallback, j as RenderedContent, k as codeBlockValidator, l as FileSchemaEntry, m as loadContentCollections, n as LayerConvertOptions, o as WatchHandle, p as discoverContentConfig, r as TypedContentLayer, s as createContentLayer, t as ContentLayer, u as LoadedCollection, v as ValidateContentSummary, w as createLinkValidator, x as builtinMarkdownValidators, y as formatContentValidationReport } from "./content-layer-DtDJaHHK.mjs"; import { n as processMarkdown, t as MarkdownResult } from "./index-1RnokD0-.mjs"; import { a as TomlLoader, c as JsoncLoader, i as YamlLoader, l as JsonLoader, n as registerLoader, o as MarkdownLoader, r as resolveLoader, s as LoaderError, t as defaultIncludePatterns } from "./index-BU8Y_IoP.mjs"; import { a as createLogger, i as Logger, n as LogLevel, o as defaultLogger, r as LogMethod, t as CreateLoggerOptions } from "./index-BnL7-K_p.mjs"; import { ZodSchema, z, z as z$1 } from "zod"; //#region src/config.d.ts /** Define a content layer configuration with type inference. */ declare function defineConfig(config: ContentLayerConfig): ContentLayerConfig; /** Define a collection with Zod schema type inference. */ declare function defineCollection(def: Omit, "computed"> & { computed?: TComputed & CollectionComputed; }): CollectionDef; /** Define a named collection map with strong literal inference. */ declare function defineCollections(collections: TCollections): TCollections; //#endregion //#region src/collections.d.ts type FactoryOptions = { /** Override the default content directory. */directory?: string; /** * Override the default frontmatter schema. Use `BlogFrontmatterSchema.extend({...})` * (or the relevant base) when adding project-specific fields. */ schema?: S; /** Extra include globs beyond the default `**\/*.md`. */ include?: string[]; /** Extra exclude globs. */ exclude?: string[]; /** Computed fields derived from each entry. */ computed?: TComputed & CollectionComputed; }; type FactoryResult = CollectionDef; /** A markdown collection that uses `BlogFrontmatterSchema` by default. */ declare function blogCollection(options?: FactoryOptions): FactoryResult; /** A markdown collection that uses `ProjectFrontmatterSchema` by default. */ declare function projectsCollection(options?: FactoryOptions): FactoryResult; /** * A markdown collection that uses `BaseFrontmatterSchema` — suitable for * docs-style content where every entry has at least title/description. */ declare function docsCollection(options?: FactoryOptions): FactoryResult; //#endregion //#region src/frontmatter.d.ts type FrontmatterResult = { frontmatter: Record; content: string; }; /** Extract frontmatter from raw markdown using gray-matter. */ declare function extractFrontmatter(raw: string): FrontmatterResult; /** * Validate frontmatter against a Zod schema. Returns parsed data or errors. * * @deprecated Use `validateSchema()` from `@pagesmith/core` for richer * validation results including field paths and severity levels. */ declare function validateFrontmatter(frontmatter: Record, schema: ZodSchema): { success: true; data: T; } | { success: false; errors: string[]; }; //#endregion //#region src/toc.d.ts /** * Extract table of contents headings from an HTML string. * * Regex-based: finds text, strips inner HTML tags. * No dependency on unified — works on any HTML string. */ declare function extractToc(html: string): Heading[]; //#endregion //#region src/utils/concurrency.d.ts /** * Default bounded-concurrency limit derived from the host's available * parallelism (never less than 1). Used as the cap for CPU- and IO-bound fan-out * so a large collection or asset set does not spawn an unbounded number of * in-flight promises at once. */ declare function defaultConcurrency(): number; /** * Map over `items` with an async `mapper`, running at most `concurrency` * invocations in flight at any time. Results are returned in the same order as * `items` regardless of completion order. * * This is the single shared worker-pool primitive for `@pagesmith/core`; use it * anywhere an unbounded `Promise.all(items.map(...))` would otherwise spawn one * promise per item (content loading, image variant emission, …). * * The `mapper` is responsible for its own error handling if partial failures * should not reject the whole batch — a thrown error propagates and rejects the * returned promise, mirroring `Promise.all`. * * @param items - Items to process. An empty list resolves to an empty array. * @param mapper - Async transform invoked with each item and its index. * @param concurrency - Maximum in-flight invocations. Defaults to * {@link defaultConcurrency}. Values below 1 are clamped to 1. */ declare function mapWithConcurrency(items: readonly T[], mapper: (item: T, index: number) => Promise, concurrency?: number): Promise; //#endregion export { type BaseFrontmatter, BaseFrontmatterSchema, type BlogFrontmatter, BlogFrontmatterSchema, type CollectionComputed, type CollectionDef, type CollectionMap, ContentEntry, type ContentFileResult, type ContentLayer, type ContentLayerConfig, type ContentPlugin, type ContentValidator, type ConvertOptions, type ConvertResult, type CreateLoggerOptions, type DiscoveredContentConfig, type FileSchemaEntry, type FrontmatterResult, type Heading, HeadingSchema, type InferCollectionData, type InferCollectionLoaderKind, JsonLoader, JsoncLoader, type LayerConvertOptions, type LinkValidatorOptions, type LoadedCollection, type LoadedCollections, type Loader, LoaderError, type LoaderResult, type LoaderType, type LogLevel, type LogMethod, type Logger, type MarkdownConfig, MarkdownConfigSchema, MarkdownLoader, type MarkdownResult, type ProjectFrontmatter, ProjectFrontmatterSchema, type RawEntry, type RenderedContent, type ResolvedValidatorContext, TomlLoader, type TypedContentLayer, type ValidateContentOptions, type ValidateContentSummary, type ValidationEntryResult, type ValidationIssue, type ValidationResult, type ValidatorContext, type WatchCallback, type WatchEvent, type WatchHandle, YamlLoader, blogCollection, buildFileSchemaMap, builtinMarkdownValidators, codeBlockValidator, convert, createContentLayer, createLinkValidator, createLogger, defaultConcurrency, defaultIncludePatterns, defaultLogger, defineCollection, defineCollections, defineConfig, discoverContentConfig, docsCollection, extractFrontmatter, extractToc, formatContentValidationReport, headingValidator, imageStructureValidator, linkValidator, loadContentCollections, loadContentSchemaMap, mapWithConcurrency, processMarkdown, projectsCollection, registerLoader, resolveLoader, runValidators, validateContent, validateFrontmatter, validateImageHtml, z }; //# sourceMappingURL=index.d.mts.map