nimbus-docs 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schemas.d.ts CHANGED
@@ -18,7 +18,7 @@ interface DocSchemaConfig<TFields extends Record<string, z.ZodTypeAny> = Record<
18
18
  * For typed Astro `image()` fields or per-collection field narrowing, use
19
19
  * the richer `defineSchema(ctx => ...)` factory instead.
20
20
  */
21
- declare function defineDocSchema<TFields extends Record<string, z.ZodTypeAny> = Record<string, never>>(config?: DocSchemaConfig<TFields>): z.ZodObject<(("prev" | "next" | "title" | "description" | "mode" | "sidebar" | "head" | "banner" | "draft" | "noindex" | "searchable" | "tableOfContents" | "lastUpdated" | "socialImage" | "previousSlug" | "external_link") & keyof TFields extends never ? {
21
+ declare function defineDocSchema<TFields extends Record<string, z.ZodTypeAny> = Record<string, never>>(config?: DocSchemaConfig<TFields>): z.ZodObject<(("prev" | "next" | "title" | "description" | "mode" | "hideChildren" | "sidebar" | "head" | "banner" | "draft" | "noindex" | "searchable" | "tableOfContents" | "lastUpdated" | "socialImage" | "previousSlug" | "external_link") & keyof TFields extends never ? {
22
22
  title: z.ZodString;
23
23
  description: z.ZodOptional<z.ZodString>;
24
24
  mode: z.ZodDefault<z.ZodEnum<{
@@ -58,9 +58,9 @@ declare function defineDocSchema<TFields extends Record<string, z.ZodTypeAny> =
58
58
  danger: "danger";
59
59
  }>>;
60
60
  }, z.core.$strip>]>>;
61
- hideIndex: z.ZodOptional<z.ZodBoolean>;
62
61
  }, z.core.$strip>>;
63
62
  }, z.core.$strip>]>>;
63
+ hideChildren: z.ZodOptional<z.ZodBoolean>;
64
64
  head: z.ZodDefault<z.ZodArray<z.ZodObject<{
65
65
  tag: z.ZodEnum<{
66
66
  title: "title";
@@ -146,9 +146,9 @@ declare function defineDocSchema<TFields extends Record<string, z.ZodTypeAny> =
146
146
  danger: "danger";
147
147
  }>>;
148
148
  }, z.core.$strip>]>>;
149
- hideIndex: z.ZodOptional<z.ZodBoolean>;
150
149
  }, z.core.$strip>>;
151
150
  }, z.core.$strip>]>>;
151
+ hideChildren: z.ZodOptional<z.ZodBoolean>;
152
152
  head: z.ZodDefault<z.ZodArray<z.ZodObject<{
153
153
  tag: z.ZodEnum<{
154
154
  title: "title";
@@ -234,9 +234,9 @@ interface DefineSchemaOptions {
234
234
  * }),
235
235
  * };
236
236
  */
237
- declare function defineSchema(factory: (ctx: astro_content0.SchemaContext) => DefineSchemaOptions): (ctx: astro_content0.SchemaContext) => z.ZodIntersection<z.ZodObject<any, z.core.$strip>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>> | z.ZodObject<Readonly<{
237
+ declare function defineSchema(factory: (ctx: astro_content0.SchemaContext) => DefineSchemaOptions): (ctx: astro_content0.SchemaContext) => z.ZodObject<Readonly<{
238
238
  [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
239
- }>, z.core.$loose>;
239
+ }>, z.core.$loose> | z.ZodIntersection<z.ZodObject<any, z.core.$strip>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
240
240
  /** Default docs schema. Equivalent to `defineDocSchema()`. */
241
241
  declare const docsSchema: z.ZodObject<{
242
242
  [x: string]: never;
@@ -306,9 +306,9 @@ declare const lenientDocsSchema: z.ZodObject<{
306
306
  danger: "danger";
307
307
  }>>;
308
308
  }, z.core.$strip>]>>;
309
- hideIndex: z.ZodOptional<z.ZodBoolean>;
310
309
  }, z.core.$strip>>;
311
310
  }, z.core.$strip>]>>;
311
+ hideChildren: z.ZodOptional<z.ZodBoolean>;
312
312
  head: z.ZodDefault<z.ZodArray<z.ZodObject<{
313
313
  tag: z.ZodEnum<{
314
314
  title: "title";
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","names":[],"sources":["../src/schemas.ts"],"mappings":";;;;UAkBiB,eAAA,iBACC,MAAA,SAAe,CAAA,CAAE,UAAA,IAAc,MA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AA;;cAW9B,cAAA,EAAc,CAAA,CAAA,UAAA,CAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;iBAeX,oBAAA,iBACE,MAAA,SAAe,CAAA,CAAE,UAAA,IAAc,MAAA,gBAAA,CAC/C,MAAA;EAAU,MAAA,GAAS,OAAA;AAAA,IAAc,CAAA,CAAA,SAAA,mBAAA,OAAA;;;;;;cAmBtB,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAGjB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;cAU5B,mBAAA,EAAmB,CAAA,CAAA,SAAA;;;;;;;KAQb,aAAA,GAAgB,CAAA,CAAE,KAAA,QAAa,mBAAA;;cAG9B,gBAAA,EAAgB,CAAA,CAAA,SAAA"}
package/dist/schemas.js CHANGED
@@ -30,8 +30,7 @@ const sidebarBadgeSchema = z.union([z.string(), z.object({
30
30
  })]);
31
31
  const sidebarGroupSchema = z.object({
32
32
  label: z.string({ error: "\"sidebar.group.label\" must be a string" }).optional(),
33
- badge: sidebarBadgeSchema.optional(),
34
- hideIndex: z.boolean({ error: "\"sidebar.group.hideIndex\" must be true or false" }).optional()
33
+ badge: sidebarBadgeSchema.optional()
35
34
  });
36
35
  const sidebarSchema = z.object({
37
36
  order: z.number({ error: "\"sidebar.order\" must be a number" }).optional(),
@@ -76,27 +75,15 @@ const bannerSchema = z.object({
76
75
  }).optional()
77
76
  });
78
77
  /**
79
- * Frontmatter keys that used to exist but no longer do. When user content
80
- * still carries one of these, Zod's default `.strip()` behavior would
81
- * silently drop it — the page would build, but with subtly different
82
- * behavior (the old toggle just disappears). That's a confusing failure
83
- * mode for an authoring contract.
84
- *
85
- * `withUnknownKeyCheck` (below) consults this map. Hits get the friendly
86
- * migration message verbatim; everything else falls through to a generic
87
- * "Unknown frontmatter key" error so typos don't sneak past either.
88
- *
89
- * Entries removed in the v0 → v1 cleanup:
78
+ * Frontmatter keys the schema does not accept, mapped to a migration
79
+ * message. Without this, Zod's default `.strip()` behavior would silently
80
+ * drop an unrecognized key — the page would build, but with subtly
81
+ * different behavior (the toggle just disappears). That's a confusing
82
+ * failure mode for an authoring contract, so these fail loudly instead.
90
83
  *
91
- * - `template` `mode`: same shape, but `"splash"` is now `"custom"`.
92
- * - `pagefind` `searchable`: same boolean; default now derives from
93
- * `noindex` (a non-crawlable page is non-searchable by default).
94
- * - `llms`: removed. All published pages are listed in `/llms.txt`; the
95
- * escape hatch is `noindex: true`.
96
- * - `aiDeprioritize`: removed. The framework no longer emits an
97
- * agent-downrank signal.
98
- * - `hero`: removed. Compose the hero in MDX body with user-owned
99
- * components instead of a frontmatter contract.
84
+ * `withFrontmatterKeyCheck` (below) consults this map. Hits get the
85
+ * friendly migration message verbatim; everything else falls through to a
86
+ * generic "Unknown frontmatter key" error so typos don't sneak past either.
100
87
  */
101
88
  const REMOVED_FRONTMATTER_KEYS = {
102
89
  template: "was renamed to \"mode\". Replace `template: \"doc\"` with `mode: \"doc\"`, and `template: \"splash\"` with `mode: \"custom\"`.",
@@ -124,6 +111,7 @@ function baseDocSchema() {
124
111
  description: z.string({ error: "\"description\" must be a string" }).optional(),
125
112
  mode: z.enum(["doc", "custom"], { error: "\"mode\" must be \"doc\" or \"custom\"" }).default("doc"),
126
113
  sidebar: z.union([z.literal(false), sidebarSchema]).optional(),
114
+ hideChildren: z.boolean({ error: "\"hideChildren\" must be true or false" }).optional(),
127
115
  head: z.array(headElementSchema).default([]),
128
116
  banner: bannerSchema.optional(),
129
117
  draft: z.boolean({ error: "\"draft\" must be true or false" }).default(false),
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","names":[],"sources":["../src/schemas.ts"],"sourcesContent":["/**\n * Content schemas for Nimbus.\n *\n * `docsSchema` is the default frontmatter contract for the `docs` collection.\n * `partialsSchema` is the contract for `<Render file=\"...\" />` partials.\n * `defineDocSchema(config)` returns a customizable schema for advanced users\n * composing schemas outside the `docsCollection()` factory.\n *\n * Error messages target content authors, not framework developers.\n * Astro 6 ships Zod v4 via `astro/zod`. The v4 API uses a single `error`\n * field on every schema constructor — NOT v3's `required_error` /\n * `invalid_type_error` / `errorMap`.\n */\n\nimport { z } from \"astro/zod\";\nimport { withStrictKeys } from \"./_internal/strict-keys.js\";\nimport { isAbsoluteUrl } from \"./_internal/url.js\";\n\nexport interface DocSchemaConfig<\n TFields extends Record<string, z.ZodTypeAny> = Record<string, never>,\n> {\n /**\n * Additional frontmatter fields merged into the default schema.\n * Generic-typed so the call-site shape is preserved through to\n * `entry.data.<field>` access in consumer code.\n */\n fields?: TFields;\n}\n\n// ---------------------------------------------------------------------------\n// Building blocks\n// ---------------------------------------------------------------------------\n\nconst sidebarBadgeSchema = z.union([\n z.string(),\n z.object({\n text: z.string({ error: 'sidebar badge needs a \"text\" field' }),\n variant: z\n .enum(\n [\"default\", \"info\", \"note\", \"success\", \"tip\", \"warning\", \"caution\", \"danger\"],\n {\n error:\n '\"variant\" must be one of: default, info, note, success, tip, warning, caution, danger',\n },\n )\n .default(\"default\"),\n }),\n]);\n\n// Group-level overrides for sidebar entries that act as a group label\n// (i.e. an `index.mdx` whose siblings become the group's children).\n// Starlight parity — sites migrating from Starlight write these as\n// `sidebar: { group: { … } }`. Apply only when the entry is the index\n// of a directory containing other entries.\nconst sidebarGroupSchema = z.object({\n /** Override the group label (defaults to the directory name). */\n label: z.string({ error: '\"sidebar.group.label\" must be a string' }).optional(),\n /** Override the group badge (defaults to none). */\n badge: sidebarBadgeSchema.optional(),\n /**\n * @deprecated No longer meaningful under structural separation. The\n * group label is now always the link to the index page (when one\n * exists), and the index is never duplicated as a child. Accepted but\n * ignored. Future major can drop the field.\n *\n * Pre-2026 Nimbus rendered the index as the first child link of its\n * group; this flag controlled that behavior. The \"Configuration >\n * Configuration\" duplicate it was meant to suppress can no longer\n * occur — the data model itself disallows it.\n */\n hideIndex: z\n .boolean({ error: '\"sidebar.group.hideIndex\" must be true or false' })\n .optional(),\n});\n\nconst sidebarSchema = z.object({\n order: z.number({ error: '\"sidebar.order\" must be a number' }).optional(),\n label: z.string({ error: '\"sidebar.label\" must be a string' }).optional(),\n badge: sidebarBadgeSchema.optional(),\n hidden: z.boolean({ error: '\"sidebar.hidden\" must be true or false' }).optional(),\n hideChildren: z\n .boolean({ error: '\"sidebar.hideChildren\" must be true or false' })\n .optional(),\n /** Group-level overrides; see `sidebarGroupSchema`. */\n group: sidebarGroupSchema.optional(),\n});\n\nconst prevNextSchema = z\n .union([\n z.string(),\n z.object({ link: z.string().optional(), label: z.string().optional() }),\n z.literal(false),\n ])\n .optional();\n\n// Head elements: every HTML tag that's valid as a direct child of <head>.\n// The earlier enum was meta/link/script/style only, which rejected the\n// equally-valid `title`, `noscript`, and `base` — the CF docs pilot hit\n// this on a page that overrides the browser tab title via\n// `head: [{ tag: title, content: \"Overview\" }]`. Keeping it an enum (vs.\n// a free `z.string()`) so typos still fail loudly, just over the full\n// real set rather than a curated subset.\nconst headElementSchema = z.object({\n tag: z.enum([\"meta\", \"link\", \"script\", \"style\", \"title\", \"noscript\", \"base\"], {\n error:\n 'head element \"tag\" must be one of: meta, link, script, style, title, noscript, base',\n }),\n attrs: z.record(z.string(), z.string()).default({}),\n content: z.string().optional(),\n});\n\n// Mirrors `BannerProps` in types.ts. Layouts consume this directly off\n// `entry.data.banner` and render the `<Banner>` component with it, so the\n// schema is framework-owned (not user-extensible territory).\nconst bannerSchema = z.object({\n content: z.string({ error: 'banner \"content\" must be a string' }),\n type: z\n .enum([\"note\", \"tip\", \"caution\", \"danger\"], {\n error: 'banner \"type\" must be one of: note, tip, caution, danger',\n })\n .optional(),\n dismissible: z\n .object({\n id: z.string({\n error: 'banner \"dismissible.id\" must be a string — a stable identifier you bump when banner content meaningfully changes',\n }),\n days: z.number({ error: 'banner \"dismissible.days\" must be a number' }).optional(),\n })\n .optional(),\n});\n\n// ---------------------------------------------------------------------------\n// Removed/renamed frontmatter keys — surface migration errors loudly\n// ---------------------------------------------------------------------------\n\n/**\n * Frontmatter keys that used to exist but no longer do. When user content\n * still carries one of these, Zod's default `.strip()` behavior would\n * silently drop it — the page would build, but with subtly different\n * behavior (the old toggle just disappears). That's a confusing failure\n * mode for an authoring contract.\n *\n * `withUnknownKeyCheck` (below) consults this map. Hits get the friendly\n * migration message verbatim; everything else falls through to a generic\n * \"Unknown frontmatter key\" error so typos don't sneak past either.\n *\n * Entries removed in the v0 → v1 cleanup:\n *\n * - `template` → `mode`: same shape, but `\"splash\"` is now `\"custom\"`.\n * - `pagefind` → `searchable`: same boolean; default now derives from\n * `noindex` (a non-crawlable page is non-searchable by default).\n * - `llms`: removed. All published pages are listed in `/llms.txt`; the\n * escape hatch is `noindex: true`.\n * - `aiDeprioritize`: removed. The framework no longer emits an\n * agent-downrank signal.\n * - `hero`: removed. Compose the hero in MDX body with user-owned\n * components instead of a frontmatter contract.\n */\nconst REMOVED_FRONTMATTER_KEYS: Record<string, string> = {\n template:\n 'was renamed to \"mode\". Replace `template: \"doc\"` with `mode: \"doc\"`, and `template: \"splash\"` with `mode: \"custom\"`.',\n pagefind:\n 'was renamed to \"searchable\". Same boolean shape; the default now derives from `noindex` (a non-crawlable page is non-searchable unless you set `searchable: true` explicitly).',\n llms:\n \"was removed. Every published page is now listed in /llms.txt; use `noindex: true` to keep a page out of both search engines and the LLM index.\",\n aiDeprioritize:\n \"was removed. The framework no longer emits an agent-downrank signal. If you want a page hidden from agents, use `noindex: true`.\",\n hero:\n \"was removed. Compose your hero in the MDX body using user-owned components; there is no longer a `hero` frontmatter contract.\",\n};\n\n/**\n * Apply this AFTER any `.extend()` so user-added fields are recognized\n * as valid. Wraps the schema in `.passthrough().superRefine()` so removed\n * keys raise a guided migration error; other unknown keys raise a\n * generic error pointing at `defineSchema({ extend: ... })`.\n */\nfunction withFrontmatterKeyCheck<T extends z.ZodObject<z.ZodRawShape>>(schema: T) {\n return withStrictKeys(schema, {\n removedKeys: REMOVED_FRONTMATTER_KEYS,\n contextLabel: \"Frontmatter key\",\n unknownHint: (key) =>\n `If you meant to add a custom field, declare it in your collection's schema via \\`defineSchema({ extend: z.object({ ${key}: ... }) })\\`.`,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Base docs schema\n// ---------------------------------------------------------------------------\n\nfunction baseDocSchema() {\n return z.object({\n title: z.string({\n error: (iss) =>\n iss.input === undefined\n ? 'Missing required \"title\" in frontmatter. Every doc needs:\\n\\n ---\\n title: \"Your Page Title\"\\n ---'\n : `\"title\" must be a string, received ${typeof iss.input}`,\n }),\n description: z.string({ error: '\"description\" must be a string' }).optional(),\n mode: z\n .enum([\"doc\", \"custom\"], {\n error: '\"mode\" must be \"doc\" or \"custom\"',\n })\n .default(\"doc\"),\n sidebar: z.union([z.literal(false), sidebarSchema]).optional(),\n head: z.array(headElementSchema).default([]),\n banner: bannerSchema.optional(),\n draft: z.boolean({ error: '\"draft\" must be true or false' }).default(false),\n noindex: z.boolean({ error: '\"noindex\" must be true or false' }).default(false),\n /**\n * Whether this page is included in the site search index. When omitted,\n * derives from `noindex` (a page that's not crawlable is by default not\n * searchable). Set explicitly to override — e.g. `{ noindex: true,\n * searchable: true }` keeps the page out of search engines but findable\n * in the site's own search.\n */\n searchable: z\n .boolean({ error: '\"searchable\" must be true or false' })\n .optional(),\n tableOfContents: z\n .union([\n z.literal(false),\n z\n .object({\n minHeadingLevel: z\n .number({ error: '\"minHeadingLevel\" must be a number (1-6)' })\n .int()\n .min(1)\n .max(6)\n .default(2),\n maxHeadingLevel: z\n .number({ error: '\"maxHeadingLevel\" must be a number (1-6)' })\n .int()\n .min(1)\n .max(6)\n .default(3),\n })\n .refine((v) => v.minHeadingLevel <= v.maxHeadingLevel, {\n message: \"minHeadingLevel must be <= maxHeadingLevel\",\n }),\n ])\n .optional(),\n lastUpdated: z.coerce\n .date({ error: '\"lastUpdated\" must be a valid date (e.g. 2024-01-15)' })\n .optional(),\n /**\n * Explicit per-page social/OG image override (path or absolute URL).\n * When omitted, the page route is expected to fall back to a\n * programmatically-generated card or the site-wide `config.socialImage`.\n */\n socialImage: z\n .string({ error: '\"socialImage\" must be a string (path or URL)' })\n .optional(),\n prev: prevNextSchema,\n next: prevNextSchema,\n /**\n * Versioning rename escape hatch.\n *\n * When a page is renamed between versions (the URL slug changes), the\n * newer version's frontmatter declares the slug it had in an older\n * version. The framework uses this to link the pages as cross-version\n * alternates and to emit a `<link rel=\"canonical\">` to the current\n * version's URL.\n *\n * Example: `docs-v1/old-name.mdx` was renamed in v2 to `new-name.mdx`.\n * On the new page (`docs/new-name.mdx`, current version), set:\n *\n * previousSlug: old-name\n *\n * Now `/new-name` and `/v1/old-name` are linked as the same logical\n * page in `<head>` alternates, and the v1 page's canonical points to\n * `/new-name`.\n *\n * Accepts a single slug string (the page's id in the older version)\n * or an array of strings when the page has been renamed across more\n * than one version.\n */\n previousSlug: z\n .union([z.string(), z.array(z.string())], {\n error: '\"previousSlug\" must be a string or array of strings',\n })\n .optional(),\n /**\n * Rewrite this page's sidebar link to point at an external (or\n * cross-section) URL. The page still builds at its filesystem path —\n * `external_link` only changes how the sidebar links to it. The link\n * renders with `target=\"_blank\" rel=\"noopener\"` and is treated as\n * external by header/footer chrome.\n *\n * Must be either an absolute URL (`https://…`, `mailto:…`,\n * protocol-relative `//cdn.…`) or a site-absolute path (`/foo/bar`).\n * Relative strings (`\"foo\"`, `\"./bar\"`) and empty strings are\n * rejected — the sidebar builder consumes this directly as an\n * `<a href>`, and a relative href against the entry's own URL\n * would route somewhere unintended (typically into the entry's\n * own subtree). An empty string would produce an indexHref of\n * `\"\"` on group landings, breaking the link entirely.\n *\n * Starlight convention; CF docs uses this to redirect deprecated\n * pages to their replacements without 301s.\n */\n external_link: z\n .string({\n error: '\"external_link\" must be a URL or absolute path',\n })\n .refine((v) => v.length > 0 && (isAbsoluteUrl(v) || v.startsWith(\"/\")), {\n message:\n '\"external_link\" must be a non-empty absolute URL (e.g. \"https://example.com/foo\") ' +\n 'or a site-absolute path (e.g. \"/replacement-page\"). ' +\n \"Relative paths are rejected because they'd resolve against the entry's own URL rather than where the author intended.\",\n })\n .optional(),\n });\n}\n\n// ---------------------------------------------------------------------------\n// Public API\n// ---------------------------------------------------------------------------\n\n/**\n * Build a customizable docs schema. Use this when composing schemas outside\n * the `docsCollection()` factory (e.g. multiple docs collections with\n * different shapes).\n *\n * For typed Astro `image()` fields or per-collection field narrowing, use\n * the richer `defineSchema(ctx => ...)` factory instead.\n */\nexport function defineDocSchema<\n TFields extends Record<string, z.ZodTypeAny> = Record<string, never>,\n>(config: DocSchemaConfig<TFields> = {}) {\n const base = baseDocSchema();\n // Always extend (with `{}` when no fields) so the result type is\n // `ZodObject<baseShape & TFields>` rather than a union of branches.\n // A union widens the consumer view of `entry.data.X` to the intersection\n // of branch fields, which is \"no fields\" for the false branch and\n // re-erases everything we just preserved.\n const merged = base.extend((config.fields ?? {}) as TFields);\n // Cast back to the underlying ZodObject. Runtime wrap (`.passthrough()\n // .superRefine()`) stays — the unknown-key check still fires. But tsdown\n // collapses ZodEffects emissions to `ZodObject<Record<string, ZodType<unknown>>>`,\n // erasing every framework field type at every consumer's `entry.data.X`\n // access. The cast preserves the field shapes through .d.ts emission.\n return withFrontmatterKeyCheck(merged) as unknown as typeof merged;\n}\n\n/**\n * Factory options for `defineSchema`.\n *\n * - `extend`: additional fields merged into the framework schema. Use\n * this for user-defined frontmatter (`author`, `tags`, `cover`).\n * - `narrow`: replaces framework fields with tighter types within this\n * collection. Use when a collection has stricter rules — e.g.\n * `{ mode: z.literal(\"doc\") }` says no landing pages in this collection.\n */\nexport interface DefineSchemaOptions {\n extend?: z.ZodTypeAny;\n narrow?: Record<string, z.ZodTypeAny>;\n}\n\n/**\n * Build a typed docs schema with access to the Astro `SchemaContext`.\n * Use this when you want typed image fields (`ctx.image()`), per-\n * collection narrowing of framework fields, or both. The simpler\n * `defineDocSchema({ fields })` factory is still available for the\n * common case of just adding fields.\n *\n * import { defineCollection } from \"astro:content\";\n * import { z } from \"astro/zod\";\n * import { defineSchema } from \"nimbus-docs/schemas\";\n *\n * export const collections = {\n * docs: defineCollection({\n * loader: ...,\n * schema: defineSchema((ctx) => ({\n * extend: z.object({\n * cover: ctx.image().optional(),\n * author: z.string().optional(),\n * }),\n * narrow: {\n * mode: z.literal(\"doc\"), // no landing pages here\n * },\n * })),\n * }),\n * };\n */\nexport function defineSchema(\n factory: (ctx: import(\"astro:content\").SchemaContext) => DefineSchemaOptions,\n) {\n return (ctx: import(\"astro:content\").SchemaContext) => {\n const { extend, narrow } = factory(ctx);\n let schema = baseDocSchema() as z.ZodObject<any>;\n\n // narrowing first (overrides framework fields)\n if (narrow) {\n schema = schema.extend(narrow);\n }\n\n // additive extension (new user fields). Prefer .merge for ZodObject\n // (preserves object-ness for downstream .extend); fall back to .and\n // for any other Zod type (intersection, union, etc.).\n if (extend) {\n if (extend instanceof z.ZodObject) {\n schema = schema.merge(extend);\n } else {\n // Intersection path — `.and()` returns ZodIntersection, on which\n // we can't run `withUnknownKeyCheck` (it operates on ZodObject's\n // `.shape`). Users on this path lose the removed-key migration\n // diagnostic; they own that trade-off by reaching for the\n // non-object extend.\n return schema.and(extend);\n }\n }\n\n return withFrontmatterKeyCheck(schema);\n };\n}\n\n/** Default docs schema. Equivalent to `defineDocSchema()`. */\nexport const docsSchema = defineDocSchema();\n\nconst partialsObjectSchema = z.object({\n /**\n * Declared parameters this partial accepts.\n * Suffix with `?` for optional params: `[\"name\", \"deprecated?\"]`\n */\n params: z.array(z.string()).optional(),\n});\n\n/** Schema for partials (`<Render file=\"...\" />` snippets). */\nexport const partialsSchema = partialsObjectSchema.default({});\n\n/**\n * Build a customizable partials schema. Mirrors `defineDocSchema` — use\n * when porting upstream partials that ship product-specific frontmatter\n * keys (e.g. CF's `inputParameters`) and you want them to validate without\n * editing the source files.\n *\n * import { z } from \"astro/zod\";\n * import { partialsCollection } from \"nimbus-docs/content\";\n *\n * defineCollection(partialsCollection({\n * schemaFields: { inputParameters: z.string().optional() },\n * }));\n */\nexport function definePartialsSchema<\n TFields extends Record<string, z.ZodTypeAny> = Record<string, never>,\n>(config: { fields?: TFields } = {}) {\n // Same generic preservation trick as `defineDocSchema` — always extend\n // (even with `{}`) so the result type stays `ZodObject<base & TFields>`\n // rather than a union with the no-fields branch erasing types.\n const merged = partialsObjectSchema.extend((config.fields ?? {}) as TFields);\n return merged as unknown as typeof merged;\n}\n\n// ---------------------------------------------------------------------------\n// Lenient variants — used by `nimbus-docs lint` (`nimbus/frontmatter-shape`).\n//\n// The standalone lint CLI can't yet see a site's extended\n// `content.config.ts` schema, so it validates the *types* of the fields\n// the framework owns while tolerating user-added fields (passthrough).\n// Unknown-key detection is deferred to when the engine can load the real\n// per-collection schema.\n// ---------------------------------------------------------------------------\n\n/** Docs frontmatter, framework fields type-checked, extra keys allowed. */\nexport const lenientDocsSchema = baseDocSchema().passthrough();\n\n/** Partials frontmatter, framework fields type-checked, extra keys allowed. */\nexport const lenientPartialsSchema = partialsObjectSchema.passthrough();\n\n// ---------------------------------------------------------------------------\n// Components collection — used by sites documenting their own UI components.\n// Pair with `componentsCollection()` from `nimbus-docs/content`. Authoring\n// pattern: hero `<Showcase>` block + `<Example>` blocks in the MDX body, with\n// `props` declared in frontmatter for a generated prop table.\n// ---------------------------------------------------------------------------\n\n/** One row in a component's `props` frontmatter array. */\nconst componentPropSchema = z.object({\n name: z.string({ error: 'prop needs a \"name\"' }),\n type: z.string({ error: 'prop needs a \"type\"' }),\n defaultValue: z.string().optional(),\n required: z.boolean().default(false),\n description: z.string({ error: 'prop needs a \"description\"' }),\n});\n\nexport type ComponentProp = z.infer<typeof componentPropSchema>;\n\n/** Default schema for the components collection. */\nexport const componentsSchema = z.object({\n title: z.string({\n error: (iss) =>\n iss.input === undefined\n ? 'Missing \"title\" in frontmatter — display name used in the sidebar and page header.'\n : `\"title\" must be a string, received ${typeof iss.input}`,\n }),\n tagline: z.string({\n error: (iss) =>\n iss.input === undefined\n ? 'Missing \"tagline\" in frontmatter — one-sentence summary shown under the title.'\n : `\"tagline\" must be a string, received ${typeof iss.input}`,\n }),\n props: z.array(componentPropSchema).default([]),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;AAiCA,MAAM,qBAAqB,EAAE,MAAM,CACjC,EAAE,QAAQ,EACV,EAAE,OAAO;CACP,MAAM,EAAE,OAAO,EAAE,OAAO,wCAAsC,CAAC;CAC/D,SAAS,EACN,KACC;EAAC;EAAW;EAAQ;EAAQ;EAAW;EAAO;EAAW;EAAW;EAAS,EAC7E,EACE,OACE,2FACH,CACF,CACA,QAAQ,UAAU;CACtB,CAAC,CACH,CAAC;AAOF,MAAM,qBAAqB,EAAE,OAAO;CAElC,OAAO,EAAE,OAAO,EAAE,OAAO,4CAA0C,CAAC,CAAC,UAAU;CAE/E,OAAO,mBAAmB,UAAU;CAYpC,WAAW,EACR,QAAQ,EAAE,OAAO,qDAAmD,CAAC,CACrE,UAAU;CACd,CAAC;AAEF,MAAM,gBAAgB,EAAE,OAAO;CAC7B,OAAO,EAAE,OAAO,EAAE,OAAO,sCAAoC,CAAC,CAAC,UAAU;CACzE,OAAO,EAAE,OAAO,EAAE,OAAO,sCAAoC,CAAC,CAAC,UAAU;CACzE,OAAO,mBAAmB,UAAU;CACpC,QAAQ,EAAE,QAAQ,EAAE,OAAO,4CAA0C,CAAC,CAAC,UAAU;CACjF,cAAc,EACX,QAAQ,EAAE,OAAO,kDAAgD,CAAC,CAClE,UAAU;CAEb,OAAO,mBAAmB,UAAU;CACrC,CAAC;AAEF,MAAM,iBAAiB,EACpB,MAAM;CACL,EAAE,QAAQ;CACV,EAAE,OAAO;EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU;EAAE,OAAO,EAAE,QAAQ,CAAC,UAAU;EAAE,CAAC;CACvE,EAAE,QAAQ,MAAM;CACjB,CAAC,CACD,UAAU;AASb,MAAM,oBAAoB,EAAE,OAAO;CACjC,KAAK,EAAE,KAAK;EAAC;EAAQ;EAAQ;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js","names":[],"sources":["../src/schemas.ts"],"sourcesContent":["/**\n * Content schemas for Nimbus.\n *\n * `docsSchema` is the default frontmatter contract for the `docs` collection.\n * `partialsSchema` is the contract for `<Render file=\"...\" />` partials.\n * `defineDocSchema(config)` returns a customizable schema for advanced users\n * composing schemas outside the `docsCollection()` factory.\n *\n * Error messages target content authors, not framework developers.\n * Astro 6 ships Zod v4 via `astro/zod`. The v4 API uses a single `error`\n * field on every schema constructor — NOT v3's `required_error` /\n * `invalid_type_error` / `errorMap`.\n */\n\nimport { z } from \"astro/zod\";\nimport { withStrictKeys } from \"./_internal/strict-keys.js\";\nimport { isAbsoluteUrl } from \"./_internal/url.js\";\n\nexport interface DocSchemaConfig<\n TFields extends Record<string, z.ZodTypeAny> = Record<string, never>,\n> {\n /**\n * Additional frontmatter fields merged into the default schema.\n * Generic-typed so the call-site shape is preserved through to\n * `entry.data.<field>` access in consumer code.\n */\n fields?: TFields;\n}\n\n// ---------------------------------------------------------------------------\n// Building blocks\n// ---------------------------------------------------------------------------\n\nconst sidebarBadgeSchema = z.union([\n z.string(),\n z.object({\n text: z.string({ error: 'sidebar badge needs a \"text\" field' }),\n variant: z\n .enum(\n [\"default\", \"info\", \"note\", \"success\", \"tip\", \"warning\", \"caution\", \"danger\"],\n {\n error:\n '\"variant\" must be one of: default, info, note, success, tip, warning, caution, danger',\n },\n )\n .default(\"default\"),\n }),\n]);\n\n// Group-level overrides for sidebar entries that act as a group label\n// (i.e. an `index.mdx` whose siblings become the group's children),\n// written as `sidebar: { group: { … } }`. Apply only when the entry is\n// the index of a directory containing other entries.\nconst sidebarGroupSchema = z.object({\n /** Override the group label (defaults to the directory name). */\n label: z.string({ error: '\"sidebar.group.label\" must be a string' }).optional(),\n /** Override the group badge (defaults to none). */\n badge: sidebarBadgeSchema.optional(),\n});\n\nconst sidebarSchema = z.object({\n order: z.number({ error: '\"sidebar.order\" must be a number' }).optional(),\n label: z.string({ error: '\"sidebar.label\" must be a string' }).optional(),\n badge: sidebarBadgeSchema.optional(),\n hidden: z.boolean({ error: '\"sidebar.hidden\" must be true or false' }).optional(),\n hideChildren: z\n .boolean({ error: '\"sidebar.hideChildren\" must be true or false' })\n .optional(),\n /** Group-level overrides; see `sidebarGroupSchema`. */\n group: sidebarGroupSchema.optional(),\n});\n\nconst prevNextSchema = z\n .union([\n z.string(),\n z.object({ link: z.string().optional(), label: z.string().optional() }),\n z.literal(false),\n ])\n .optional();\n\n// Head elements: every HTML tag that's valid as a direct child of <head>.\n// The earlier enum was meta/link/script/style only, which rejected the\n// equally-valid `title`, `noscript`, and `base` — needed on a page that\n// overrides the browser tab title via\n// `head: [{ tag: title, content: \"Overview\" }]`. Keeping it an enum (vs.\n// a free `z.string()`) so typos still fail loudly, just over the full\n// real set rather than a curated subset.\nconst headElementSchema = z.object({\n tag: z.enum([\"meta\", \"link\", \"script\", \"style\", \"title\", \"noscript\", \"base\"], {\n error:\n 'head element \"tag\" must be one of: meta, link, script, style, title, noscript, base',\n }),\n attrs: z.record(z.string(), z.string()).default({}),\n content: z.string().optional(),\n});\n\n// Mirrors `BannerProps` in types.ts. Layouts consume this directly off\n// `entry.data.banner` and render the `<Banner>` component with it, so the\n// schema is framework-owned (not user-extensible territory).\nconst bannerSchema = z.object({\n content: z.string({ error: 'banner \"content\" must be a string' }),\n type: z\n .enum([\"note\", \"tip\", \"caution\", \"danger\"], {\n error: 'banner \"type\" must be one of: note, tip, caution, danger',\n })\n .optional(),\n dismissible: z\n .object({\n id: z.string({\n error: 'banner \"dismissible.id\" must be a string — a stable identifier you bump when banner content meaningfully changes',\n }),\n days: z.number({ error: 'banner \"dismissible.days\" must be a number' }).optional(),\n })\n .optional(),\n});\n\n// ---------------------------------------------------------------------------\n// Removed/renamed frontmatter keys — surface migration errors loudly\n// ---------------------------------------------------------------------------\n\n/**\n * Frontmatter keys the schema does not accept, mapped to a migration\n * message. Without this, Zod's default `.strip()` behavior would silently\n * drop an unrecognized key — the page would build, but with subtly\n * different behavior (the toggle just disappears). That's a confusing\n * failure mode for an authoring contract, so these fail loudly instead.\n *\n * `withFrontmatterKeyCheck` (below) consults this map. Hits get the\n * friendly migration message verbatim; everything else falls through to a\n * generic \"Unknown frontmatter key\" error so typos don't sneak past either.\n */\nconst REMOVED_FRONTMATTER_KEYS: Record<string, string> = {\n template:\n 'was renamed to \"mode\". Replace `template: \"doc\"` with `mode: \"doc\"`, and `template: \"splash\"` with `mode: \"custom\"`.',\n pagefind:\n 'was renamed to \"searchable\". Same boolean shape; the default now derives from `noindex` (a non-crawlable page is non-searchable unless you set `searchable: true` explicitly).',\n llms:\n \"was removed. Every published page is now listed in /llms.txt; use `noindex: true` to keep a page out of both search engines and the LLM index.\",\n aiDeprioritize:\n \"was removed. The framework no longer emits an agent-downrank signal. If you want a page hidden from agents, use `noindex: true`.\",\n hero:\n \"was removed. Compose your hero in the MDX body using user-owned components; there is no longer a `hero` frontmatter contract.\",\n};\n\n/**\n * Apply this AFTER any `.extend()` so user-added fields are recognized\n * as valid. Wraps the schema in `.passthrough().superRefine()` so removed\n * keys raise a guided migration error; other unknown keys raise a\n * generic error pointing at `defineSchema({ extend: ... })`.\n */\nfunction withFrontmatterKeyCheck<T extends z.ZodObject<z.ZodRawShape>>(schema: T) {\n return withStrictKeys(schema, {\n removedKeys: REMOVED_FRONTMATTER_KEYS,\n contextLabel: \"Frontmatter key\",\n unknownHint: (key) =>\n `If you meant to add a custom field, declare it in your collection's schema via \\`defineSchema({ extend: z.object({ ${key}: ... }) })\\`.`,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Base docs schema\n// ---------------------------------------------------------------------------\n\nfunction baseDocSchema() {\n return z.object({\n title: z.string({\n error: (iss) =>\n iss.input === undefined\n ? 'Missing required \"title\" in frontmatter. Every doc needs:\\n\\n ---\\n title: \"Your Page Title\"\\n ---'\n : `\"title\" must be a string, received ${typeof iss.input}`,\n }),\n description: z.string({ error: '\"description\" must be a string' }).optional(),\n mode: z\n .enum([\"doc\", \"custom\"], {\n error: '\"mode\" must be \"doc\" or \"custom\"',\n })\n .default(\"doc\"),\n sidebar: z.union([z.literal(false), sidebarSchema]).optional(),\n /**\n * Top-level alias of `sidebar.hideChildren`. When the page is a section\n * index, collapses the group to a single link. The nested\n * `sidebar.hideChildren` still works and takes precedence.\n */\n hideChildren: z\n .boolean({ error: '\"hideChildren\" must be true or false' })\n .optional(),\n head: z.array(headElementSchema).default([]),\n banner: bannerSchema.optional(),\n draft: z.boolean({ error: '\"draft\" must be true or false' }).default(false),\n noindex: z.boolean({ error: '\"noindex\" must be true or false' }).default(false),\n /**\n * Whether this page is included in the site search index. When omitted,\n * derives from `noindex` (a page that's not crawlable is by default not\n * searchable). Set explicitly to override — e.g. `{ noindex: true,\n * searchable: true }` keeps the page out of search engines but findable\n * in the site's own search.\n */\n searchable: z\n .boolean({ error: '\"searchable\" must be true or false' })\n .optional(),\n tableOfContents: z\n .union([\n z.literal(false),\n z\n .object({\n minHeadingLevel: z\n .number({ error: '\"minHeadingLevel\" must be a number (1-6)' })\n .int()\n .min(1)\n .max(6)\n .default(2),\n maxHeadingLevel: z\n .number({ error: '\"maxHeadingLevel\" must be a number (1-6)' })\n .int()\n .min(1)\n .max(6)\n .default(3),\n })\n .refine((v) => v.minHeadingLevel <= v.maxHeadingLevel, {\n message: \"minHeadingLevel must be <= maxHeadingLevel\",\n }),\n ])\n .optional(),\n lastUpdated: z.coerce\n .date({ error: '\"lastUpdated\" must be a valid date (e.g. 2024-01-15)' })\n .optional(),\n /**\n * Explicit per-page social/OG image override (path or absolute URL).\n * When omitted, the page route is expected to fall back to a\n * programmatically-generated card or the site-wide `config.socialImage`.\n */\n socialImage: z\n .string({ error: '\"socialImage\" must be a string (path or URL)' })\n .optional(),\n prev: prevNextSchema,\n next: prevNextSchema,\n /**\n * Versioning rename escape hatch.\n *\n * When a page is renamed between versions (the URL slug changes), the\n * newer version's frontmatter declares the slug it had in an older\n * version. The framework uses this to link the pages as cross-version\n * alternates and to emit a `<link rel=\"canonical\">` to the current\n * version's URL.\n *\n * Example: `docs-v1/old-name.mdx` was renamed in v2 to `new-name.mdx`.\n * On the new page (`docs/new-name.mdx`, current version), set:\n *\n * previousSlug: old-name\n *\n * Now `/new-name` and `/v1/old-name` are linked as the same logical\n * page in `<head>` alternates, and the v1 page's canonical points to\n * `/new-name`.\n *\n * Accepts a single slug string (the page's id in the older version)\n * or an array of strings when the page has been renamed across more\n * than one version.\n */\n previousSlug: z\n .union([z.string(), z.array(z.string())], {\n error: '\"previousSlug\" must be a string or array of strings',\n })\n .optional(),\n /**\n * Rewrite this page's sidebar link to point at an external (or\n * cross-section) URL. The page still builds at its filesystem path —\n * `external_link` only changes how the sidebar links to it. The link\n * renders with `target=\"_blank\" rel=\"noopener\"` and is treated as\n * external by header/footer chrome.\n *\n * Must be either an absolute URL (`https://…`, `mailto:…`,\n * protocol-relative `//cdn.…`) or a site-absolute path (`/foo/bar`).\n * Relative strings (`\"foo\"`, `\"./bar\"`) and empty strings are\n * rejected — the sidebar builder consumes this directly as an\n * `<a href>`, and a relative href against the entry's own URL\n * would route somewhere unintended (typically into the entry's\n * own subtree). An empty string would produce an indexHref of\n * `\"\"` on group landings, breaking the link entirely.\n *\n * Useful to redirect deprecated pages to their replacements without\n * 301s.\n */\n external_link: z\n .string({\n error: '\"external_link\" must be a URL or absolute path',\n })\n .refine((v) => v.length > 0 && (isAbsoluteUrl(v) || v.startsWith(\"/\")), {\n message:\n '\"external_link\" must be a non-empty absolute URL (e.g. \"https://example.com/foo\") ' +\n 'or a site-absolute path (e.g. \"/replacement-page\"). ' +\n \"Relative paths are rejected because they'd resolve against the entry's own URL rather than where the author intended.\",\n })\n .optional(),\n });\n}\n\n// ---------------------------------------------------------------------------\n// Public API\n// ---------------------------------------------------------------------------\n\n/**\n * Build a customizable docs schema. Use this when composing schemas outside\n * the `docsCollection()` factory (e.g. multiple docs collections with\n * different shapes).\n *\n * For typed Astro `image()` fields or per-collection field narrowing, use\n * the richer `defineSchema(ctx => ...)` factory instead.\n */\nexport function defineDocSchema<\n TFields extends Record<string, z.ZodTypeAny> = Record<string, never>,\n>(config: DocSchemaConfig<TFields> = {}) {\n const base = baseDocSchema();\n // Always extend (with `{}` when no fields) so the result type is\n // `ZodObject<baseShape & TFields>` rather than a union of branches.\n // A union widens the consumer view of `entry.data.X` to the intersection\n // of branch fields, which is \"no fields\" for the false branch and\n // re-erases everything we just preserved.\n const merged = base.extend((config.fields ?? {}) as TFields);\n // Cast back to the underlying ZodObject. Runtime wrap (`.passthrough()\n // .superRefine()`) stays — the unknown-key check still fires. But tsdown\n // collapses ZodEffects emissions to `ZodObject<Record<string, ZodType<unknown>>>`,\n // erasing every framework field type at every consumer's `entry.data.X`\n // access. The cast preserves the field shapes through .d.ts emission.\n return withFrontmatterKeyCheck(merged) as unknown as typeof merged;\n}\n\n/**\n * Factory options for `defineSchema`.\n *\n * - `extend`: additional fields merged into the framework schema. Use\n * this for user-defined frontmatter (`author`, `tags`, `cover`).\n * - `narrow`: replaces framework fields with tighter types within this\n * collection. Use when a collection has stricter rules — e.g.\n * `{ mode: z.literal(\"doc\") }` says no landing pages in this collection.\n */\nexport interface DefineSchemaOptions {\n extend?: z.ZodTypeAny;\n narrow?: Record<string, z.ZodTypeAny>;\n}\n\n/**\n * Build a typed docs schema with access to the Astro `SchemaContext`.\n * Use this when you want typed image fields (`ctx.image()`), per-\n * collection narrowing of framework fields, or both. The simpler\n * `defineDocSchema({ fields })` factory is still available for the\n * common case of just adding fields.\n *\n * import { defineCollection } from \"astro:content\";\n * import { z } from \"astro/zod\";\n * import { defineSchema } from \"nimbus-docs/schemas\";\n *\n * export const collections = {\n * docs: defineCollection({\n * loader: ...,\n * schema: defineSchema((ctx) => ({\n * extend: z.object({\n * cover: ctx.image().optional(),\n * author: z.string().optional(),\n * }),\n * narrow: {\n * mode: z.literal(\"doc\"), // no landing pages here\n * },\n * })),\n * }),\n * };\n */\nexport function defineSchema(\n factory: (ctx: import(\"astro:content\").SchemaContext) => DefineSchemaOptions,\n) {\n return (ctx: import(\"astro:content\").SchemaContext) => {\n const { extend, narrow } = factory(ctx);\n let schema = baseDocSchema() as z.ZodObject<any>;\n\n // narrowing first (overrides framework fields)\n if (narrow) {\n schema = schema.extend(narrow);\n }\n\n // additive extension (new user fields). Prefer .merge for ZodObject\n // (preserves object-ness for downstream .extend); fall back to .and\n // for any other Zod type (intersection, union, etc.).\n if (extend) {\n if (extend instanceof z.ZodObject) {\n schema = schema.merge(extend);\n } else {\n // Intersection path — `.and()` returns ZodIntersection, on which\n // we can't run `withFrontmatterKeyCheck` (it operates on ZodObject's\n // `.shape`). Users on this path lose the removed-key migration\n // diagnostic; they own that trade-off by reaching for the\n // non-object extend.\n return schema.and(extend);\n }\n }\n\n return withFrontmatterKeyCheck(schema);\n };\n}\n\n/** Default docs schema. Equivalent to `defineDocSchema()`. */\nexport const docsSchema = defineDocSchema();\n\nconst partialsObjectSchema = z.object({\n /**\n * Declared parameters this partial accepts.\n * Suffix with `?` for optional params: `[\"name\", \"deprecated?\"]`\n */\n params: z.array(z.string()).optional(),\n});\n\n/** Schema for partials (`<Render file=\"...\" />` snippets). */\nexport const partialsSchema = partialsObjectSchema.default({});\n\n/**\n * Build a customizable partials schema. Mirrors `defineDocSchema` — use\n * when porting upstream partials that ship product-specific frontmatter\n * keys (e.g. CF's `inputParameters`) and you want them to validate without\n * editing the source files.\n *\n * import { z } from \"astro/zod\";\n * import { partialsCollection } from \"nimbus-docs/content\";\n *\n * defineCollection(partialsCollection({\n * schemaFields: { inputParameters: z.string().optional() },\n * }));\n */\nexport function definePartialsSchema<\n TFields extends Record<string, z.ZodTypeAny> = Record<string, never>,\n>(config: { fields?: TFields } = {}) {\n // Same generic preservation trick as `defineDocSchema` — always extend\n // (even with `{}`) so the result type stays `ZodObject<base & TFields>`\n // rather than a union with the no-fields branch erasing types.\n const merged = partialsObjectSchema.extend((config.fields ?? {}) as TFields);\n return merged as unknown as typeof merged;\n}\n\n// ---------------------------------------------------------------------------\n// Lenient variants — used by `nimbus-docs lint` (`nimbus/frontmatter-shape`).\n//\n// The standalone lint CLI can't yet see a site's extended\n// `content.config.ts` schema, so it validates the *types* of the fields\n// the framework owns while tolerating user-added fields (passthrough).\n// Unknown-key detection is deferred to when the engine can load the real\n// per-collection schema.\n// ---------------------------------------------------------------------------\n\n/** Docs frontmatter, framework fields type-checked, extra keys allowed. */\nexport const lenientDocsSchema = baseDocSchema().passthrough();\n\n/** Partials frontmatter, framework fields type-checked, extra keys allowed. */\nexport const lenientPartialsSchema = partialsObjectSchema.passthrough();\n\n// ---------------------------------------------------------------------------\n// Components collection — used by sites documenting their own UI components.\n// Pair with `componentsCollection()` from `nimbus-docs/content`. Authoring\n// pattern: hero `<Showcase>` block + `<Example>` blocks in the MDX body, with\n// `props` declared in frontmatter for a generated prop table.\n// ---------------------------------------------------------------------------\n\n/** One row in a component's `props` frontmatter array. */\nconst componentPropSchema = z.object({\n name: z.string({ error: 'prop needs a \"name\"' }),\n type: z.string({ error: 'prop needs a \"type\"' }),\n defaultValue: z.string().optional(),\n required: z.boolean().default(false),\n description: z.string({ error: 'prop needs a \"description\"' }),\n});\n\nexport type ComponentProp = z.infer<typeof componentPropSchema>;\n\n/** Default schema for the components collection. */\nexport const componentsSchema = z.object({\n title: z.string({\n error: (iss) =>\n iss.input === undefined\n ? 'Missing \"title\" in frontmatter — display name used in the sidebar and page header.'\n : `\"title\" must be a string, received ${typeof iss.input}`,\n }),\n tagline: z.string({\n error: (iss) =>\n iss.input === undefined\n ? 'Missing \"tagline\" in frontmatter — one-sentence summary shown under the title.'\n : `\"tagline\" must be a string, received ${typeof iss.input}`,\n }),\n props: z.array(componentPropSchema).default([]),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;AAiCA,MAAM,qBAAqB,EAAE,MAAM,CACjC,EAAE,QAAQ,EACV,EAAE,OAAO;CACP,MAAM,EAAE,OAAO,EAAE,OAAO,wCAAsC,CAAC;CAC/D,SAAS,EACN,KACC;EAAC;EAAW;EAAQ;EAAQ;EAAW;EA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C,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,UAAU,EACvC,CAAC;;AAGF,MAAa,iBAAiB,qBAAqB,QAAQ,EAAE,CAAC;;;;;;;;;;;;;;AAe9D,SAAgB,qBAEd,SAA+B,EAAE,EAAE;AAKnC,QADe,qBAAqB,OAAQ,OAAO,UAAU,EAAE,CAAa;;;AAe9E,MAAa,oBAAoB,eAAe,CAAC,aAAa;;AAG9D,MAAa,wBAAwB,qBAAqB,aAAa;;AAUvE,MAAM,sBAAsB,EAAE,OAAO;CACnC,MAAM,EAAE,OAAO,EAAE,OAAO,yBAAuB,CAAC;CAChD,MAAM,EAAE,OAAO,EAAE,OAAO,yBAAuB,CAAC;CAChD,cAAc,EAAE,QAAQ,CAAC,UAAU;CACnC,UAAU,EAAE,SAAS,CAAC,QAAQ,MAAM;CACpC,aAAa,EAAE,OAAO,EAAE,OAAO,gCAA8B,CAAC;CAC/D,CAAC;;AAKF,MAAa,mBAAmB,EAAE,OAAO;CACvC,OAAO,EAAE,OAAO,EACd,QAAQ,QACN,IAAI,UAAU,SACV,yFACA,sCAAsC,OAAO,IAAI,SACxD,CAAC;CACF,SAAS,EAAE,OAAO,EAChB,QAAQ,QACN,IAAI,UAAU,SACV,qFACA,wCAAwC,OAAO,IAAI,SAC1D,CAAC;CACF,OAAO,EAAE,MAAM,oBAAoB,CAAC,QAAQ,EAAE,CAAC;CAChD,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as Severity, i as RuleCode, n as Diagnostic, o as SeverityConfig, r as DiagnosticFix, t as AuthoringRuleCode } from "./diagnostic-ewiZxpSO.js";
1
+ import { a as Severity, i as RuleCode, n as Diagnostic, o as SeverityConfig, r as DiagnosticFix, t as AuthoringRuleCode } from "./diagnostic-CnxJwVpT.js";
2
2
 
3
3
  //#region src/types.d.ts
4
4
  /**
@@ -56,14 +56,14 @@ interface NimbusConfig {
56
56
  * `src/content/docs-v2/`). Order is preserved; the picker and any
57
57
  * ordered enumeration will use it as-is.
58
58
  * - `deprecated` — subset of `others` that should render deprecation
59
- * UX (banner + sidebar badge + search demotion). P0 stores the list;
60
- * the visible behavior lands in P3. Default `[]`.
59
+ * UX (banner + sidebar badge + search demotion). Default `[]`.
61
60
  * - `hidden` — subset of `others` that should be URL-reachable but
62
61
  * omitted from the picker, search index, and any other surface that
63
62
  * enumerates "all versions." Default `[]`.
64
63
  *
65
- * P0 ships the data layer only. Picker UI, cross-version `<link rel="alternate">`,
66
- * canonical pointers, and deprecation banners land in later phases.
64
+ * The framework ships the data layer; the starter renders the picker UI,
65
+ * cross-version `<link rel="alternate">`, canonical pointers, and
66
+ * deprecation banners.
67
67
  */
68
68
  versions?: VersionsConfig;
69
69
  }
@@ -204,6 +204,19 @@ interface SidebarConfig {
204
204
  * @default "full"
205
205
  */
206
206
  scope?: "full" | "section";
207
+ /**
208
+ * Isolate the rail below the top-level section, so a sub-path becomes its
209
+ * own rail. `boundaries` is a list of segment globs (`*` matches one
210
+ * segment); a page under a matched boundary has its rail descended to the
211
+ * group covering that prefix. Matching is by descendant href, so it works
212
+ * for index-less folders. Pairs with `scope: "section"`; a non-matching
213
+ * page is unaffected.
214
+ *
215
+ * @example { boundaries: ["guides/*"] }
216
+ */
217
+ isolate?: {
218
+ boundaries: string[];
219
+ };
207
220
  /**
208
221
  * Collapse every autogenerated group by default. When `true`, all
209
222
  * groups in the sidebar render closed initially; the group that
@@ -222,10 +235,12 @@ interface SidebarConfig {
222
235
  */
223
236
  defaultCollapsed?: boolean;
224
237
  /**
225
- * @deprecated No-op under structural separation. The group label is
226
- * now always the link to the index page, so there is no "first child
227
- * representing the index" to relabel. Accepted but ignored. Future
228
- * major can drop the field.
238
+ * Relabel each section's landing link to a fixed string. Pass `true`
239
+ * for "Overview" or a custom string for anything else. Applies to a
240
+ * `directory:` autogenerate's leading landing link; config groups
241
+ * expose their index as the group label itself, so those are
242
+ * unaffected. When omitted or `false`, landing links keep their page
243
+ * title.
229
244
  *
230
245
  * @default false
231
246
  */
@@ -275,6 +290,18 @@ type SidebarConfigItem = string | {
275
290
  items: SidebarConfigItem[];
276
291
  collapsed?: boolean;
277
292
  badge?: SidebarBadge;
293
+ /**
294
+ * The URL prefix this group occupies (e.g. `/api`). Marks the group as
295
+ * a section that owns a URL segment which may have no page of its own.
296
+ * Used with `landing`.
297
+ */
298
+ segment?: string;
299
+ /**
300
+ * Where the group's label links. May differ from `segment` when the
301
+ * segment URL itself has no page. Becomes the group's `indexHref`, so
302
+ * breadcrumbs and the rail point at a real page rather than a dead URL.
303
+ */
304
+ landing?: string;
278
305
  };
279
306
  type BadgeVariant = "default" | "info" | "note" | "success" | "tip" | "warning" | "caution" | "danger";
280
307
  type SidebarBadge = string | {
@@ -306,14 +333,11 @@ interface SidebarGroupItem {
306
333
  children: SidebarItem[];
307
334
  _indexId?: string;
308
335
  /**
309
- * URL of the group's landing page (the directory's `index.mdx`), when
310
- * one exists. When set, the renderer should make the group label
311
- * clickable (matching the Fumadocs / Fern / Docusaurus pattern where
312
- * the group label IS the link to the landing page, and the landing
313
- * page is NOT duplicated as a child of the group).
314
- *
315
- * When `undefined`, the group has no landing page and the label is
316
- * a non-interactive header — children are the only navigable items.
336
+ * URL of the group's landing page (the directory's `index.mdx`), when one
337
+ * exists. When set, the renderer makes the group label a link to the
338
+ * landing page, which is not duplicated as a child of the group. When
339
+ * `undefined`, the label is a non-interactive header and only the
340
+ * children navigate.
317
341
  */
318
342
  indexHref?: string;
319
343
  /** True when the group's landing page is the current route. */
@@ -326,6 +350,13 @@ interface SidebarGroupItem {
326
350
  * When omitted/false, `indexHref` is an in-site path.
327
351
  */
328
352
  indexIsExternal?: boolean;
353
+ /**
354
+ * The URL prefix this group occupies, when declared as a synthetic
355
+ * section via the config `segment` key (e.g. `/ai`). Lets a section own
356
+ * a URL segment that has no page of its own; the clickable landing lives
357
+ * on `indexHref`.
358
+ */
359
+ segment?: string;
329
360
  /**
330
361
  * Internal: the URL prefix where this group's content lives, when
331
362
  * derived from an `autogenerate` config item. `deriveSidebarSections`
@@ -338,6 +369,22 @@ interface SidebarGroupItem {
338
369
  _prefix?: string;
339
370
  }
340
371
  type SidebarItem = SidebarLinkItem | SidebarExternalLinkItem | SidebarGroupItem;
372
+ /**
373
+ * A pass over the final sidebar tree (after scope and isolate), returning
374
+ * the transformed tree. Passed to `getSidebar` as an argument rather than
375
+ * via config, which is JSON-serialized and cannot carry functions.
376
+ *
377
+ * `sectionSlug` is seg0 and `module` is seg1 of the current path;
378
+ * `indexEntryId` is the active section group's landing entry id, or
379
+ * `undefined` for an index-less section.
380
+ */
381
+ type SidebarTransform = (ctx: {
382
+ tree: SidebarItem[];
383
+ sectionSlug: string;
384
+ module?: string;
385
+ currentSlug: string;
386
+ indexEntryId?: string;
387
+ }) => SidebarItem[] | Promise<SidebarItem[]>;
341
388
  interface TOCItem {
342
389
  depth: number;
343
390
  text: string;
@@ -345,7 +392,12 @@ interface TOCItem {
345
392
  }
346
393
  interface Breadcrumb {
347
394
  label: string;
348
- href: string;
395
+ /**
396
+ * Destination URL. Optional: a crumb for a node with no landing page
397
+ * (e.g. an index-less folder) has no `href` and renders non-interactive.
398
+ * Renderers must emit a `<span>` when `href` is absent.
399
+ */
400
+ href?: string;
349
401
  }
350
402
  interface PrevNextLink {
351
403
  label: string;
@@ -485,5 +537,5 @@ interface DocsPageProps extends BasePageProps {
485
537
  prevNext: PrevNext;
486
538
  }
487
539
  //#endregion
488
- export { type AuthoringRuleCode, BadgeVariant, BannerProps, BasePageProps, Breadcrumb, type Diagnostic, type DiagnosticFix, DocsPageProps, FeaturesConfig, HeadElement, NimbusConfig, PrevNext, PrevNextLink, PrevNextOverrides, ResolvedVersions, type RuleCode, SearchConfig, SearchProvider, SearchResult, type Severity, type SeverityConfig, SidebarBadge, SidebarConfig, SidebarConfigItem, SidebarExternalLinkItem, SidebarGroupItem, SidebarItem, SidebarLinkItem, SidebarSection, TOCItem, VersionAlternateRecord, VersionAlternatesTable, VersionPageRef, VersionStatus, VersionsConfig };
540
+ export { type AuthoringRuleCode, BadgeVariant, BannerProps, BasePageProps, Breadcrumb, type Diagnostic, type DiagnosticFix, DocsPageProps, FeaturesConfig, HeadElement, NimbusConfig, PrevNext, PrevNextLink, PrevNextOverrides, ResolvedVersions, type RuleCode, SearchConfig, SearchProvider, SearchResult, type Severity, type SeverityConfig, SidebarBadge, SidebarConfig, SidebarConfigItem, SidebarExternalLinkItem, SidebarGroupItem, SidebarItem, SidebarLinkItem, SidebarSection, SidebarTransform, TOCItem, VersionAlternateRecord, VersionAlternatesTable, VersionPageRef, VersionStatus, VersionsConfig };
489
541
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;UAQiB,YAAA;EAAY;EAE3B,IAAA;EACA,KAAA;EACA,WAAA;EACA,MAAA;EAgCS;EA9BT,SAAA;EAsDyB;EApDzB,MAAA;EAPA;EASA,WAAA;EAPA;;;;;EAaA,WAAA;EAEA;EAAA,cAAA;EAEO;EAAP,IAAA,GAAO,WAAA;EACP,OAAA,GAAU,aAAA;EASV;;;;;;;;EAAA,QAAA,GAAW,cAAA;EAoCkB;;;;;EA9B7B,MAAA,GAAS,YAAA;EAkCT;;;AAQF;;;;;;;;;;;AAYA;;;;;;;;;EA9BE,QAAA,GAAW,cAAA;AAAA;;;;UAMI,cAAA;EACf,OAAA;EACA,MAAA;EACA,UAAA;EACA,MAAA;AAAA;;;;;;UAQe,gBAAA;EACf,OAAA;EACA,MAAA;EACA,UAAA;EACA,MAAA;EACA,GAAA;AAAA;;;;;UAOe,cAAA;EAiDf;EA/CA,UAAA;EAgDQ;EA9CR,OAAA;EA+De;EA7Df,IAAA;;;;AAoEF;;;EA7DE,GAAA;AAAA;AAiEF;;;;;;AAAA,UAxDiB,sBAAA;EACf,IAAA,EAAM,cAAA;EACN,UAAA,EAAY,cAAA;EACZ,SAAA,EAAW,cAAA;AAAA;;KAID,sBAAA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;;;;EAKA,OAAA;AAAA;;;;;;;;;;;;;;;;;UAmBe,aAAA,SAAsB,aAAA;;;;;;;EAQrC,IAAA;;;;;EAKA,UAAA;;EAEA,KAAA;;EAIA,OAAA;;EAEA,MAAA,GAAS,WAAA;;;;;;;;EAUT,OAAA,EAAS,WAAA;;;;;;;EAOT,QAAA,EAAU,OAAA;;EAEV,WAAA,EAAa,UAAA;;EAEb,QAAA,EAAU,QAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nimbus-docs",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Docs, for humans and agents",
@@ -74,8 +74,8 @@
74
74
  }
75
75
  },
76
76
  "dependencies": {
77
- "@astrojs/markdown-satteri": "^0.2.1",
78
- "@astrojs/mdx": "^6.0.0",
77
+ "@astrojs/markdown-satteri": "0.2.1",
78
+ "@astrojs/mdx": "6.0.1",
79
79
  "@astrojs/sitemap": "^3.7.2",
80
80
  "@clack/prompts": "^0.9.1",
81
81
  "@shikijs/transformers": "^4.1.0",
@@ -98,11 +98,13 @@
98
98
  "yaml": "^2.7.1"
99
99
  },
100
100
  "devDependencies": {
101
+ "@mdx-js/mdx": "^3.1.1",
101
102
  "@shikijs/types": "^4.1.0",
102
103
  "@types/react": "^19.2.6",
103
104
  "@types/react-dom": "^19.2.3",
104
105
  "astro": "^6.4.0",
105
106
  "jsdom": "^29.1.1",
107
+ "shiki": "^4.2.0",
106
108
  "tsdown": "^0.20.3",
107
109
  "tsx": "^4.22.3",
108
110
  "typescript": "^5.8.3"
@@ -23,7 +23,7 @@
23
23
  * </head>
24
24
  *
25
25
  * SEO/OG fixes ship via framework version bump, not by every user
26
- * re-doing their head tags. Roadmap row 7(a).
26
+ * re-doing their head tags.
27
27
  */
28
28
 
29
29
  import { existsSync } from "node:fs";
@@ -1 +0,0 @@
1
- {"version":3,"file":"diagnostic-ewiZxpSO.d.ts","names":[],"sources":["../src/lint/diagnostic.ts"],"mappings":";;AAyBA;;;;;;;;;;;;;;;;;;;;;;;cAAa,UAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BD,QAAA,gBAAwB,UAAA;;;;;AAgCpC;;;KAvBY,iBAAA,WACJ,QAAA,WAAmB,UAAA,EAAY,CAAA;EAAa,IAAA;AAAA,IAC9C,CAAA,WAEJ,QAAA;;;KAIU,QAAA;;KAGA,cAAA,GAAiB,QAAA;AAAA,UAEZ,aAAA;EAkBf;EAhBA,WAAA;EAoBA;;;;EAfA,KAAA,EAAO,KAAA;IAAQ,KAAA;IAAyB,IAAA;EAAA;AAAA;AAAA,UAGzB,UAAA;EACf,IAAA,EAAM,QAAA;EACN,QAAA,EAAU,QAAA;;;EAGV,MAAA;EACA,OAAA;;EAEA,IAAA;;EAEA,IAAA;;EAEA,MAAA;EACA,OAAA;EACA,SAAA;EACA,GAAA,GAAM,aAAA;AAAA"}