import { defineCollection } from 'astro:content'; import { i as BookSchemasOptions } from './types-DjqMnwHw.js'; import 'astro'; import './schemas-CKipJ5Ie.js'; import 'astro/zod'; /** * v3.4.0 (closes #7): consumer-facing helper to define a `frontmatter` * content collection that the scaffold's auto-injected * `/frontmatter/[slug]` route can render. * * Usage in consumer's content.config.ts: * * import { defineBookSchemas, frontmatterCollection } from * '@brandon_m_behring/book-scaffold-astro/schemas'; * import { z } from 'astro:content'; * * export const { collections } = { * collections: { * ...defineBookSchemas().collections, * frontmatter: frontmatterCollection(z.object({ * slug: z.string(), * title: z.string(), * order: z.number(), * description: z.string().optional(), * })), * }, * }; * * Then enable the route via `defineBookConfig({ routes: { frontmatter: true } })` * and drop MDX files under `src/content/frontmatter/`. The scaffold-injected * route renders each entry with the consumer's mdx-components in scope (issue #2 * plumbing applies). * * Default loader: `**\/*.{md,mdx}` under `./src/content/frontmatter` (excluding * underscore-prefixed files). Override `base` via the second arg. */ declare function frontmatterCollection(schema: Parameters[0]['schema'], base?: string): unknown; /** * Returns the package's default content collections. Closed shape per Q5; * consumer extends via object spread and Zod `.extend()` (see PACKAGE_DESIGN.md ยง5). */ declare function defineBookSchemas(opts?: BookSchemasOptions): { collections: Record; }; export { defineBookSchemas, frontmatterCollection };