import { PptxAppProperties, PptxCoreProperties, PptxCustomProperty, PptxPresentationProperties, PptxThemeOption } from 'pptx-viewer-core'; import { CanvasSize, SlideSizeEmu } from 'pptx-viewer-shared'; import { EditorState } from '../editor/editor-state.svelte'; import { PresentationLoader } from './presentation-loader.svelte'; /** * Deck-level state and mutations behind the inspector's no-selection * Properties tab: the Svelte port of Vue's `useInspectorDeckActions` (itself * mirroring the relevant pieces of React's `useThemeHandlers` and the * viewer-level canvas-size / document-property setters). * * Provided from `PowerPointViewer` via Svelte context (see * {@link provideInspectorDeck}) so `InspectorPanel` can reach it from any * mount point (viewer body, master view, mobile sheets) without threading a * prop through every intermediate component. */ export interface InspectorDeckActions { /** Packaged theme parts (`ppt/theme/*.xml`) selectable in the THEME card. */ readonly themeOptions: PptxThemeOption[]; /** Slide canvas size in px (the loader's reactive value). */ readonly canvasSize: CanvasSize; /** Notes page size in px, when the package declares one. */ readonly notesCanvasSize: CanvasSize | undefined; /** The deck's `p:sldSz` in EMU, which is what a save persists. */ readonly slideSize: SlideSizeEmu | undefined; /** Apply a packaged theme part by archive path (React's `handleApplyTheme`). */ applyThemeByPath(themePath: string, applyToAllMasters: boolean): void; /** Resize the slide canvas (inspector SLIDE SIZE card's raw W/H inputs). */ updateCanvasSize(size: CanvasSize): void; /** * Adopt an EMU slide size (a preset pick or an orientation flip). Writes the * EMU state AND the pixel canvas, so the stage resizes and the save keeps the * exact authored dimensions. */ updateSlideSize(size: SlideSizeEmu): void; /** Patch deck-wide slide-show / print settings (PRESENTATION card). */ updatePresentationProperties(patch: Partial): void; /** Patch document core properties (Title / Author / ...). */ updateCoreProperties(patch: Partial): void; /** Patch application properties (Company / Application). */ updateAppProperties(patch: Partial): void; /** Replace the custom document-property list. */ updateCustomProperties(next: PptxCustomProperty[]): void; /** * Set a layout/master's background colour (SLIDE BACKGROUND card's * template rows, shown while `editTemplateMode` is on). Master Views * covers the same ground but requires leaving the slide. */ setTemplateBackground(path: string, backgroundColor: string): void; /** Read a layout/master's current background colour. */ getTemplateBackgroundColor(path: string): string | undefined; } export interface InspectorDeckDeps { loader: PresentationLoader; editor: EditorState; } /** Build the deck-action facade over the loader + history-tracked editor. */ export declare function createInspectorDeckActions(deps: InspectorDeckDeps): InspectorDeckActions; /** * Context key for the inspector deck actions. Exported so tests (and * out-of-tree mounts) can seed it via `mount(Component, { context: new * Map([[INSPECTOR_DECK_CONTEXT_KEY, deck]]) })`; mirrors `I18N_CONTEXT_KEY`. */ export declare const INSPECTOR_DECK_CONTEXT_KEY: unique symbol; /** Provide the deck actions to the component subtree (root component only). */ export declare function provideInspectorDeck(deck: InspectorDeckActions): void; /** Consume the nearest provided deck actions; undefined in standalone mounts. */ export declare function useInspectorDeck(): InspectorDeckActions | undefined; //# sourceMappingURL=inspector-deck.d.ts.map