/*
[RFC-0102] Canonical SectionHeader contract — structured heading (string or
tone-segmented array), optional subheading, independent alignment, optional
section number, optional level override.
- Do not declare body content (RFC-0103) or CTA shape (RFC-0104).
- Do not couple header alignment to body alignment (each is independent).
- RFC-0133: backfilled MODULE_MAP and CHANGE_SUMMARY markers for compass.validate compliance.
- RFC-1196: step 1 — sectionHeadingId() resolver + sectionId prop
*/
import { z } from "zod";
import { horizontalAlignSchema } from "./horizontal-align.ts";
import { effectStackSchema } from "./effects.ts";
export const headingToneSchema = z.enum(["default", "primary", "accent", "muted", "inverse"]);
export type HeadingTone = z.infer;
export const headingSegmentSchema = z
.object({
text: z.string().min(1),
tone: headingToneSchema.optional(),
})
.strict();
export type HeadingSegment = z.infer;
/**
* RFC-0102 — HeadingContent. Either a plain string (entire title renders in
* tone "default") or an array of tone-segmented runs that the renderer wraps
* in