/**
 * design/schema.mjs — Zod schema for C27 design tokens.
 *
 * Mirrors `src/cli/profile/schema.mjs` in layout: `.mjs` schema consumable
 * directly by the CLI kernel, with a TypeScript re-export at
 * `src/schemas/design-tokens.ts` that layers on inferred types.
 *
 * The tokens object is emitted to `.aperant/design/tokens.json` by
 * `apt-tools design-scan` (see `commands/design-scan.mjs`) and consumed by
 * the `apt:design` skill, which injects a `{TOKENS_BLOCK}` summary into its
 * Stage 1 wireframe context when the file is present.
 *
 * v1 shape is deliberately flat: every token kind maps to a small object of
 * sorted, deduped string arrays. Richer structure (semantic roles, dark/light
 * pairing, motion curves) is deferred — see docs/design-tokens.md for the
 * v1-limits list.
 */
import { z } from 'zod';
const StringArray = z.array(z.string());
export const ColorsSchema = z
    .object({
    hex: StringArray,
    rgb: StringArray,
    hsl: StringArray,
    tailwind: StringArray,
    css_vars: StringArray,
})
    .strict();
export const SpacingSchema = z
    .object({
    raw: StringArray,
    tailwind_scale: StringArray,
})
    .strict();
export const TypographySchema = z
    .object({
    font_families: StringArray,
    font_sizes_raw: StringArray,
    tailwind_sizes: StringArray,
    line_heights: StringArray,
})
    .strict();
export const RadiiSchema = z
    .object({
    raw: StringArray,
    tailwind: StringArray,
})
    .strict();
export const ShadowsSchema = z
    .object({
    raw: StringArray,
    tailwind: StringArray,
})
    .strict();
export const ScanStatsSchema = z
    .object({
    files_scanned: z.number().int().nonnegative(),
    files_skipped: z.number().int().nonnegative(),
})
    .strict();
export const DesignTokensSchema = z
    .object({
    version: z.literal(1),
    generated_at: z.string().min(1),
    project_root: z.string().min(1),
    scan: ScanStatsSchema,
    colors: ColorsSchema,
    spacing: SpacingSchema,
    typography: TypographySchema,
    radii: RadiiSchema,
    shadows: ShadowsSchema,
})
    .strict();
export function validateDesignTokens(data) {
    return DesignTokensSchema.safeParse(data);
}
//# sourceMappingURL=schema.mjs.map