import { Translator } from '../../i18n/translator'; import { EditorController } from '../editor/editor-controller.svelte'; import { EditorState } from '../editor/editor-state.svelte'; import { ViewerLoadDetail } from '../types'; import { PresentationLoader } from './presentation-loader.svelte'; import { ViewerState } from './viewer-state.svelte'; export interface ViewerEffectsDeps { getSource(): Uint8Array | ArrayBuffer | null | undefined; getEditable(): boolean; getInitialSlide(): number; getTranslator(): Translator; loader: PresentationLoader; viewer: ViewerState; editor: EditorState; controller: EditorController; getOnload(): ((detail: ViewerLoadDetail) => void) | undefined; getOnerror(): ((message: string) => void) | undefined; getOnslidechange(): ((index: number) => void) | undefined; /** * Called synchronously right after a completed load is committed to editor * state, before the commit's effects flush. Collaboration re-adopts the * shared doc's slides here so a slow bootstrap load that lands mid-session * cannot clobber content already synced from the room (and the placeholder * deck is never published into the doc); the per-load session seeding that * belongs to the new deck (the authored custom show) rides along. */ onContentApplied?(): void; } /** * All of `PowerPointViewer`'s `$effect`-based wiring in one place: keeps * `editor.editable` in sync with the host prop (closing any open selection/ * inline edit when it turns off), resets selection on slide navigation, * drives the load pipeline from the `source` prop, and announces * load/error/slide-change to the host callbacks. Extracted purely to keep * the component's own script under the file-size budget; runs during the * component's setup exactly as if inlined, since Svelte 5 effects only * require being registered synchronously during initialization. */ export declare function useViewerEffects(deps: ViewerEffectsDeps): void; //# sourceMappingURL=viewer-effects.svelte.d.ts.map