import { PptxLayoutOption, PptxLayoutPreview } from 'pptx-viewer-core'; import { SlideTemplateBuildOptions, SlideTemplateId } from 'pptx-viewer-shared'; import { EditorState } from './editor-state.svelte'; /** * The Home tab's Slides group (new / duplicate / delete slide), split out of * `EditorState` to keep it under the repo's 300-LOC budget. Every method * returns the new active slide index (or `null` on a no-op) so the caller * (the Slides group, via the host's slide-navigation callback) can move the * viewer to it; `EditorState` itself has no concept of "the active slide" * beyond the `getCurrent` dependency it already reads for element ops. */ export declare class EditorSlidesController { #private; constructor(editor: EditorState); /** Insert a blank slide after the current one. Returns its new index, or null when not editable. */ insertSlideAfterCurrent(): number | null; /** * Insert a shared-catalogue template slide after the current one, as one * undoable step (Home > Slide Templates gallery). The caller (the gallery * launcher, which can read the render context) passes the deck's scheme and * canvas size in `options` so the slide inherits the theme; without them * the shared builder falls back to the Office default scheme at 1280x720. * Returns the new index, or null when not editable. */ insertSlideFromTemplate(templateId: SlideTemplateId, options?: SlideTemplateBuildOptions): number | null; /** Duplicate the current slide. Returns its new index, or null when not editable. */ duplicateCurrentSlide(): number | null; /** Delete the current slide. Returns the new active index, or null (not editable / only slide). */ deleteCurrentSlide(): number | null; /** * Duplicate the slide at an arbitrary index (the sorter's context-menu * target, which need not be the active slide). Returns the index the * caller should navigate to so the active slide stays the same logical * slide the user was looking at, or null when not editable. */ duplicateSlideAtIndex(index: number): number | null; /** * Delete the slide at an arbitrary index (the sorter's context-menu * target). Returns the index the caller should navigate to, or null (not * editable / only slide). */ deleteSlideAtIndex(index: number): number | null; /** Toggle the hidden flag on the slide at `index` (the sorter's context-menu target). */ toggleSlideHidden(index: number): void; /** * The layouts available for the current slide (its master's layouts), * resolved via the core `getAvailableLayoutsForSlide` API. Empty when no * deck is loaded. Backs the Home tab's Layout dropdown (React parity). */ availableLayouts(): Promise; /** * Artwork thumbnails for the New Slide / Layout galleries, keyed by path. * * A method rather than state: parsing every layout part is only worth doing * once a gallery is opened, and core memoises the result. */ layoutPreviews(): Promise>; /** Re-map the current slide onto `layoutPath`. Returns its index, or null when not editable. */ applyLayout(layoutPath: string): Promise; /** * Reset the current slide by re-applying its own layout, restoring inherited * placeholder geometry/formatting (React's Home > Reset). Returns the slide * index, or null when the slide has no known layout path. */ resetSlide(): Promise; /** Move an arbitrary thumbnail slide. Returns the selected target index on success. */ moveSlide(fromIndex: number, toIndex: number): number | null; } //# sourceMappingURL=editor-slides-controller.d.ts.map