import { PptxSlide } from 'pptx-viewer-core'; import { ElementAnimationState } from 'pptx-viewer-shared'; /** * `AnimationPlayback`: native-timing (`p:timing`) animation playback for the * Svelte binding's presentation mode, driven by the shared, framework-agnostic * {@link PresentationAnimationController}. The runes analogue of the Vue * `useAnimationPlayback` composable, kept out of the SFC so it is unit-testable. * * This replaces the older preset (`PptxElementAnimation`) click-group model for * the slide show: the controller builds a timeline engine from the slide's * `nativeAnimations` (expanding staged text builds), which can represent native * staged chart / SmartArt builds (`p:bldChart` / `p:bldDgm`) and colour * animations (`p:animClr`) that the preset model could not. It mirrors the Vue / * React bindings. * * The class owns the reactive per-element state map, the keyframes CSS, and the * interactive / hover trigger-shape id sets; the controller stays pure. The * clock (timers, requestAnimationFrame) + DOM effects live in * {@link module:presentation/animation-playback-helpers}. * * NOTE: the editor / inspector animation PREVIEW still uses the older shared * `buildClickGroups` model (see `AnimationsTab` / `editor-animation-controller`); * this class is only the running slide show. */ export interface AnimationPlaybackDeps { /** The current slide to build the native-animation timeline for. */ getSlide(): PptxSlide | undefined; /** Presentation-level switch parsed from `p:showPr`. */ getShowWithAnimation?(): boolean | undefined; /** Host-provided action-sound player (resolves + plays embedded sounds). */ onPlayActionSound?: (soundPath: string) => void; /** Root element to scope media-command (`p:cmd`) target lookups to. */ frameRoot?: () => HTMLElement | null; } export declare class AnimationPlayback { #private; constructor(deps: AnimationPlaybackDeps); /** Reactive per-element native-animation state (visibility, build, colour). */ get elementStates(): Map; /** The per-slide `@keyframes` CSS to inject once per slide. */ get keyframesCss(): string; /** Shape ids that trigger an interactive (`onShapeClick`) sequence. */ get interactiveTriggerShapeIds(): ReadonlySet; /** Shape ids that trigger a hover (`onHover`) sequence. */ get hoverTriggerShapeIds(): ReadonlySet; /** True once every main-timeline click-group has been revealed. */ get isComplete(): boolean; /** Clear all pending timers + the in-flight staged-build RAF. */ clearTimers(): void; /** Whether the active slide was seeded as fully built (backward entry). */ get seededCompleted(): boolean; /** * Rebuild the controller for the current slide and replay from the start. The * controller builds the timeline engine (expanding text-build animations) and * derives keyframes CSS, trigger-shape ids, and the tracked element id list. */ reset(options?: { completed?: boolean; }): void; /** * Reveal the next click-group. Returns `true` if a group was revealed, `false` * when playback is complete or animations are disabled (so the caller can fall * through to slide navigation). */ advance(): boolean; /** Play an interactive shape's sequence; `true` when it triggered one. */ handleInteractiveShapeClick(shapeId: string): boolean; /** Play a hover shape's sequence; `true` when it triggered one. */ handleHoverStart(shapeId: string): boolean; /** Reset a hover shape's sequence so the next hover replays it. */ handleHoverEnd(shapeId: string): void; } //# sourceMappingURL=animation-playback.svelte.d.ts.map