import type { PartialChoices } from "./prompts.js"; /** * Header-right item shapes accepted in v1 of preset support. Mirrors * `HeaderRightComponentItem` and `HeaderRightTriggerItem` from * `src/config/settings-types.ts`. The wider `link`/`html` variants are * intentionally rejected for now — they need free-text fields that pollute * the JSON preset schema and the generator UI. */ export type PresetHeaderRightComponentName = "theme-toggle" | "language-switcher" | "version-switcher" | "github-link" | "search"; export type PresetHeaderRightTriggerName = "design-token-panel" | "ai-chat"; export interface PresetHeaderRightComponentItem { type: "component"; component: PresetHeaderRightComponentName; } export interface PresetHeaderRightTriggerItem { type: "trigger"; trigger: PresetHeaderRightTriggerName; } export type PresetHeaderRightItem = PresetHeaderRightComponentItem | PresetHeaderRightTriggerItem; export interface PresetMetaTagsConfig { description?: boolean; keywords?: string | false; ogImage?: string | false; ogSiteName?: boolean; twitterCard?: "summary" | "summary_large_image" | false; twitterSite?: string; twitterCreator?: string; } /** * Parse the comma-separated CLI form (or normalize the array form used by * presets and the programmatic API). Empty entries are ignored so a trailing * comma is harmless; validation below still rejects an entirely empty list. */ export declare function parseChangelogPackages(value: string | readonly string[]): string[]; /** * Shared changelog-package validation for CLI, JSON presets, and the * programmatic API. Keeping this next to the parser prevents the three entry * points from accepting different slug grammars or duplicate lists. */ export declare function validateChangelogPackages(list: unknown): string | null; /** * Validates a `headerRightItems` value against the v1 preset allowlist. * Shared by `validatePreset()` (JSON preset path) and `createZudoDoc()` * (programmatic API path, #2922) so the two entry points can never drift. */ export declare function validateHeaderRightItems(items: unknown): string | null; /** * Validates a `metaTags` value's sub-field types. Shared by `validatePreset()` * (JSON preset path) and `createZudoDoc()` (programmatic API path, #2922) so * the two entry points can never drift. */ export declare function validateMetaTags(metaTags: unknown): string | null; export interface PresetJson { projectName?: string; defaultLang?: string; additionalLangs?: string[]; colorSchemeMode?: "single" | "light-dark"; singleScheme?: string; lightScheme?: string; darkScheme?: string; defaultMode?: "light" | "dark"; respectPrefersColorScheme?: boolean; /** Theme pack slug (ADR #2818 Decision 7), validated against THEME_PACKS. */ themePack?: string; features?: string[]; /** Package slugs for the nested changelog layout. */ changelogPackages?: string[]; githubUrl?: string; cjkFriendly?: boolean; minifyHtml?: boolean; packageManager?: "pnpm" | "npm" | "yarn" | "bun"; headerRightItems?: PresetHeaderRightItem[]; metaTags?: PresetMetaTagsConfig; } export declare function loadPreset(pathOrStdin: string): PartialChoices; export declare function validatePreset(json: unknown): string | null; export declare function presetToChoices(json: PresetJson): PartialChoices;