import { PptxSlide } from 'pptx-viewer-core'; import { PresentationController } from './presentation-controller.svelte'; /** * `usePresentationEffects`: the `$effect`-based wiring that drives the Svelte * viewer's presentation mode from its reactive state. Extracted from * `PowerPointViewer.svelte` (mirroring `useViewerEffects`) so the SFC stays thin * and this logic is lintable; runs during the component's setup exactly as if * inlined, since Svelte 5 effects only require synchronous registration. * * Two effects: * 1. Drive the {@link PresentationController} lifecycle from the fullscreen flag * and current slide: `start()` on enter, `stop()` on exit, `onSlideChange()` * on every in-presentation navigation (resets builds + plays the incoming * slide's transition). * 2. Push each element's native-animation state (visibility, CSS animation, * trigger-shape cursor) onto the live stage after every DOM update (slide * change / build advance / auto-advance) and keep the per-slide native * `@keyframes` injected. When not presenting it clears the managed * properties so the windowed / editing canvas never carries animation state. * Structural reveals (chart / SmartArt build, `p:animClr` fill / stroke) are * applied declaratively by the renderers via the element-states context. * 3. Route interactive / hover trigger events on the live stage. * 4. Arm the current slide's authored `p:transition/@advTm` auto-advance. */ export interface PresentationEffectsDeps { controller: PresentationController; /** True while the viewer is the fullscreen (presentation) element. */ getPresenting(): boolean; /** The active slide index (0-based). */ getCurrentIndex(): number; /** The active slide (read so the style effect re-runs after it re-renders). */ getActiveSlide(): PptxSlide | undefined; /** The live presentation stage root (`.pptx-svelte-stage`), or null. */ getStageRoot(): HTMLElement | null; /** * False when the show is set to advance manually * (`PptxPresentationProperties.advanceMode === 'manual'`). Defaults to true, * matching PowerPoint's "Using timings, if present". */ getUseTimings?(): boolean; } export declare function usePresentationEffects(deps: PresentationEffectsDeps): void; //# sourceMappingURL=presentation-effects.svelte.d.ts.map