import { PptxChartData, PptxComment, PptxSlide } from 'pptx-viewer-core'; import { CanvasSize } from 'pptx-viewer-shared'; /** * Prop contracts for the slide surfaces: the pure `SlideStage` (used by the * canvas, the thumbnail rail and the off-screen export stage alike) and the * interactive `SlideCanvas` that scales it and owns the pointer handlers. * Split out of `props.ts` for the repo's file-size budget; import them from * `./props`, which re-exports this module. */ export interface SlideStageProps { slide: PptxSlide | undefined; canvasSize: CanvasSize; mediaDataUrls: Map; scale?: number; /** Forwarded to each `ElementRenderer`; see `ElementRendererProps.presenting`. */ presenting?: boolean; /** * True only for the main (interactive) canvas, never the thumbnail rail. * Adds `role="region" aria-roledescription="slide"` to the stage itself * (the framework-neutral e2e hook React/Vue/Angular also emit) and is * forwarded to each `ElementRenderer`; see `ElementRendererProps.interactive`. */ interactive?: boolean; editTemplateMode?: boolean; /** Forwarded to each `ElementRenderer`; see `ElementRendererProps.editingElementId`. */ editingElementId?: string | null; /** * Skip the resolved slide background and leave the stage see-through. * * `getSlideBackgroundStyle` always resolves to an OPAQUE fill (it falls back * to the default slide background), which is right for a stage that owns the * screen and wrong for one stacked over another. The morph transition's * departing-shape layer is exactly that: it sits above the incoming slide, * so its background would hide the whole morph behind a flat slab. */ transparentBackground?: boolean; ontablecellcommit?: (elementId: string, rowIndex: number, cellIndex: number, text: string) => void; onsmartartnodecommit?: (elementId: string, nodeId: string, text: string) => void; onsmartartnodefill?: (elementId: string, nodeId: string, fill: string) => void; /** See `ElementRendererProps.onchartpointcommit`. */ onchartpointcommit?: (elementId: string, chartData: PptxChartData) => void; /** See `ElementRendererProps.ontableresizecolumns`. */ ontableresizecolumns?: (elementId: string, widths: number[]) => void; /** See `ElementRendererProps.ontableresizerow`. */ ontableresizerow?: (elementId: string, rowIndex: number, height: number) => void; /** * Comments drawn as numbered marker dots INSIDE the stage (the * `aria-roledescription="slide"` region, the framework-neutral e2e hook). * The host passes the active slide's comments only while it is editable * (Vue's visibility semantics), so thumbnails and the show stay clean. */ comments?: readonly PptxComment[]; /** A marker dot was clicked; the host brings its comments UI on screen. */ oncommentmarkerclick?: (commentId: string) => void; } export interface SlideCanvasProps { slide: PptxSlide | undefined; canvasSize: CanvasSize; mediaDataUrls: Map; /** Effective scale (fit-to-viewport x user zoom), pre-computed by the host. */ scale: number; /** True only on the live presentation stage; see `SlideStageProps.presenting`. */ presenting?: boolean; /** * Grid dot/line spacing in CSS px for the `.pptx-svelte-show-grid` overlay, * derived by the host from the deck's authored `viewProperties.gridSpacing` * via `computeGridSpacingPx`. Defaults to 12px (this binding's existing * grid step) when the deck has none. */ gridSpacingPx?: number; /** True while in-place editing is available; gates the pointer handlers and the editing cursor/class. */ editingActive?: boolean; editTemplateMode?: boolean; /** Forwarded to `SlideStage`; see `SlideStageProps.editingElementId`. */ editingElementId?: string | null; ontablecellcommit?: (elementId: string, rowIndex: number, cellIndex: number, text: string) => void; onsmartartnodecommit?: (elementId: string, nodeId: string, text: string) => void; onsmartartnodefill?: (elementId: string, nodeId: string, fill: string) => void; /** See `ElementRendererProps.onchartpointcommit`. */ onchartpointcommit?: (elementId: string, chartData: PptxChartData) => void; /** See `ElementRendererProps.ontableresizecolumns`. */ ontableresizecolumns?: (elementId: string, widths: number[]) => void; /** See `ElementRendererProps.ontableresizerow`. */ ontableresizerow?: (elementId: string, rowIndex: number, height: number) => void; /** Passed through to `SlideStage`; see {@link SlideStageProps.comments}. */ comments?: readonly PptxComment[]; /** Passed through to `SlideStage`; see {@link SlideStageProps.oncommentmarkerclick}. */ oncommentmarkerclick?: (commentId: string) => void; /** Reports the stage-holder node to the host on mount/teardown (editing hit-surface, export capture anchor). */ onstageholder?: (el: HTMLDivElement | null) => void; onstagepointerdown?: (event: PointerEvent) => void; onstagepointermove?: (event: PointerEvent) => void; onstagedblclick?: (event: MouseEvent) => void; onstagecontextmenu?: (event: MouseEvent) => void; /** Fired on any stage click; the host wires this to advance presentation playback. */ onstageclick?: (event: MouseEvent) => void; /** * True while the AI panel is picking an element: the next element click(s) * become the assistant's focus (highlighted) instead of selecting / editing. */ aiPickMode?: boolean; /** * True while a running AI tool is active: the stage marks itself * `data-pptx-ai-active` so element colour changes tween while the assistant * works (see AiFocusHighlightOverlay's tween rule). */ aiActive?: boolean; /** Route a picked canvas element to the AI focus (pick mode only). */ onaipickelement?: (elementId: string) => void; /** * Overlay content layered above the slide (selection/editor layer, ink * drawing, alignment guides, presentation annotations, collaboration * cursors, transition overlay, ...). Rendered inside the same * fixed-size, scaled stage-holder as the slide itself. Kept out of this * component's own props (rather than a fixed list of overlay slots) so it * stays free of the live editor/controller instances those overlays need. */ children?: import('svelte').Snippet; } //# sourceMappingURL=props-stage.d.ts.map