import { PptxElement } from 'pptx-viewer-core'; import { AiChangeBatch, PptxAiFocusedTarget, ToolCanvasTarget } from 'pptx-viewer-shared/ai'; /** One element ring to draw on the canvas: an explicit pick or a live-tool focus. */ export interface AiCanvasHighlight { slideIndex: number; elementId: string; /** `pick` = persistent user pick; `active` = transient AI-is-working ring. */ variant: 'pick' | 'active'; } /** Live viewer accessors + the panel-open hook the controller closes over. */ export interface AiPanelControllerDeps { getActiveSlideIndex(): number; getSelectedElementId(): string | null; getSelectedElementIds(): readonly string[]; /** The primary selected element, for building the "Fix with AI" directive. */ getSelectedElement(): PptxElement | undefined; /** Open the panel (askAboutSelection / fixSelection / startPicking need it). */ openPanel(): void; } export declare class AiPanelController { #private; /** Pinned focus override (null follows the live selection). */ pinnedFocus: PptxAiFocusedTarget[] | null; /** One-shot composer prefill. `nonce` bumps on every ask/fix. */ prefill: { text: string; nonce: number; }; /** True while the user is picking element(s) on the canvas for the assistant. */ pickMode: boolean; /** The elements the user has explicitly handed to the assistant. */ pickTargets: PptxAiFocusedTarget[]; /** The batch of just-applied element changes the canvas should animate. */ changeBatch: AiChangeBatch | null; constructor(deps: AiPanelControllerDeps); /** Focused targets derived live from the current canvas selection. */ get liveFocusTargets(): PptxAiFocusedTarget[]; /** True when there are explicit picks (they win over a pin / live selection). */ get hasPicks(): boolean; /** The targets the assistant should scope to: picks > pin > live selection. */ get effectiveTargets(): PptxAiFocusedTarget[]; /** Whether a pin is currently the active focus (no picks override it). */ get isPinned(): boolean; /** Element rings the canvas should draw (picks + the live tool focus). */ get canvasHighlights(): AiCanvasHighlight[]; /** True while the canvas should tween colour changes (AI is active). */ get canvasAnimating(): boolean; pinFocus(): void; clearPinnedFocus(): void; /** Open the panel scoped to the current selection, empty composer (focused). */ askAboutSelection(): void; /** Open the panel scoped to the current selection, prefilled fix directive. */ fixSelection(): void; /** Enter pick mode (the next canvas element clicks become picks). */ startPicking(): void; /** Leave pick mode without clearing the accumulated picks. */ stopPicking(): void; /** Add one clicked canvas element to the pick set (and highlight it). */ addPick(slideIndex: number, elementId: string): void; /** Empty the pick set and leave pick mode. */ clearPicks(): void; /** * Flash a transient "the AI is working on this" highlight for a running tool, * and enable colour tweening for a short settle window. Pass `null` to just * enable tweening (e.g. a theme-colour edit with no single element target). */ flashToolTarget(target: ToolCanvasTarget | null): void; /** * Push (or clear) the change batch the AI apply path published, so the canvas * overlay animates the just-applied edit (glide old->new, fade/scale in-out, * glow). Pass `null` to clear once the animation has settled. */ showChangeBatch(batch: AiChangeBatch | null): void; /** Cancel the pending flash timer (call on teardown). */ dispose(): void; } //# sourceMappingURL=ai-panel-controller.svelte.d.ts.map