import { PetAtlasLayout } from '../core/types'; export type { PetAtlasLayout, PetAtlasRowDef } from '../core/types'; export type WidgetState = 'idle' | 'thinking' | 'building' | 'delegating' | 'success' | 'error' | 'greeting' | 'waiting' | 'leaving'; export type WidgetEventName = 'stateChange' | 'userMessage' | 'visibility'; export interface SayOptions { ttl?: number; link?: string; } export interface PlayOptions { /** Number of times to play the action's animation loop. Default 1. */ loops?: number; /** Override duration explicitly (ms). When set, takes precedence over loops. */ durationMs?: number; } export interface ConfigureOptions { name?: string; glyph?: string; accent?: string; imageUrl?: string; storageKey?: string; /** Apply the standard 8×9 Codex atlas layout. Use with `imageUrl` pointing * at a spritesheet from the Codex Hatchery (j20.nz) or one produced by * the Codex hatch-pet skill. Mutually exclusive with `atlas` — if both * are set, `atlas` wins. */ useCodexAtlas?: boolean; /** Custom atlas layout for spritesheets that don't follow the Codex 8×9 * format. Each `rowsDef` entry maps a row index to a named row id (e.g. * 'idle', 'walking') with its frame count and FPS. */ atlas?: PetAtlasLayout; /** Show a chat input under the speech bubble. On Enter, the input fires a * `userMessage` event with the typed text. Consumers wire this to their * own backend (LLM, helpdesk, custom) and call `say(reply)` to display * the response. The pet ships no UI for message history — that's * consumer territory. */ chat?: boolean; /** Placeholder text for the chat input. Default: "Ask…". */ chatPlaceholder?: string; } export interface MountOptions extends ConfigureOptions { /** Target element to attach the shadow DOM host to. Defaults to document.body. */ target?: HTMLElement; } export interface ObserveOptions { /** Pet state to play when any