/** * Style presets for the agentic bridge. * * A "style" is a small, curated bundle of design tokens — a color palette with * named *roles* (background / title / body / accent / …), a heading+body font * pairing, and a typographic size scale. Presets are hand-tuned so every * role-pair clears WCAG AA contrast, which lets the agent build good-looking, * legible slides without hand-picking colors or font sizes. * * The agent flow is: * 1. `styles.catalog` → see the available presets. * 2. `deck.applyStyle` → pick ONE; it sets the deck theme + records `styleId`. * 3. `slides.createFromLayout` → layouts read the active preset's role tokens * to place themed, contrast-safe elements. * * Only the preset *id* is persisted on the deck theme (`theme.styleId`); the * rich token data lives here in code, so it always renders deterministically * and survives document serialization without bloating the saved deck. */ import type { SlideTheme } from '../../types/slides'; /** Named color roles. Every role pairs with a readable foreground/background. */ export interface FikaStylePalette { /** Default slide background (content slides). */ background: string; /** Subtle panel/card fill that sits on `background`. */ surface: string; /** Heading/title text on `background`/`surface`. */ title: string; /** Body/paragraph text on `background`/`surface`. */ body: string; /** De-emphasized text (captions, labels) on `background`/`surface`. */ muted: string; /** Hairline rules, dividers, and thin borders. */ rule: string; /** Primary accent (bars, highlights, key numbers). */ accent: string; /** Secondary accent for variety (second series, alt highlight). */ accent2: string; /** Tinted accent wash for soft panels/bands. */ accentSoft: string; /** Readable foreground when placed on `accent`. */ onAccent: string; /** Feature background for title/section/closing slides (usually dark). */ featureBackground: string; /** Title text on `featureBackground`. */ featureTitle: string; /** Body/subtitle text on `featureBackground`. */ featureBody: string; /** Accent that pops on `featureBackground`. */ featureAccent: string; } /** Typographic size scale in px (canvas units), largest → smallest. */ export interface FikaStyleScale { /** Hero/cover title. */ display: number; /** Standard slide title. */ title: number; /** Section header / column heading. */ sectionHeader: number; /** Body copy and bullets. */ body: number; /** Eyebrow labels, kickers, tags. */ label: number; /** Captions, footnotes, source lines. */ caption: number; } export interface FikaStyleFonts { /** Heading/display font family. */ heading: string; /** Body/paragraph font family. */ body: string; } /** * The style's signature visual motif — ONE distinctive, repeatable element * that ties a deck together and replaces the generic "accent rule under the * title" slop tell. Layouts render this instead of a bare rectangle. The motif * is described declaratively so every layout family can draw it consistently. */ export interface FikaStyleMotif { /** Which accent slot the motif draws from. */ colorRole: 'accent' | 'accent2'; /** The geometric treatment. */ shape: 'doubleRule' | 'offsetBlock' | 'roundedChip' | 'hairline'; /** Approximate rendered size, in canvas px, for the primary placement. */ size: number; /** One-line description surfaced in the style catalog so the agent can picture it. */ description: string; } export interface FikaStylePreset { id: string; /** Human label shown in the catalog. */ label: string; /** One-line description of the look & best use. */ description: string; fonts: FikaStyleFonts; palette: FikaStylePalette; scale: FikaStyleScale; /** Ordered chart series colors derived from the palette. */ chartColors: string[]; /** The style's signature motif, drawn by layouts instead of a generic rule. */ motif: FikaStyleMotif; } /** Compact catalog entry (what `styles.catalog` returns to the agent). */ export interface FikaStyleSummary { id: string; label: string; description: string; fonts: FikaStyleFonts; /** A few representative colors so the agent can picture the look. */ preview: { background: string; title: string; body: string; accent: string; featureBackground: string; }; /** The style's signature motif description, so the agent knows the deck's throughline. */ motif: FikaStyleMotif; } export declare const DEFAULT_STYLE_ID = "academic"; export declare const PPTX_STYLE_PRESETS: FikaStylePreset[]; export declare function getStylePreset(id?: string | null): FikaStylePreset | undefined; /** Resolve a usable preset, falling back to the default when id is missing/unknown. */ export declare function resolveStylePreset(id?: string | null): FikaStylePreset; export declare function listStylePresets(): FikaStyleSummary[]; /** Canvas width the preset type scales and motif sizes are authored for. */ export declare const STYLE_REFERENCE_WIDTH = 1000; /** * Rescale a preset's px-based type scale and motif for a canvas of `width` * px. Presets are authored for the 1000px default viewport; an imported * 1280px deck would otherwise get 22px body copy that reads 22% smaller than * designed. Returns the same object when no scaling is needed. */ export declare function scaleStylePreset(preset: FikaStylePreset, width: number): FikaStylePreset; /** * Build the deck-theme patch for a preset. Sets the inheritable defaults that * manually-created elements pick up (`fontColor`, `fontName`, `backgroundColor`, * `themeColors`) and records `styleId` so layouts can resolve the full preset. */ export declare function styleThemePatch(preset: FikaStylePreset): Partial;