import { PptxElement, PptxSlide } from 'pptx-viewer-core'; import { CanvasSize, ShapePresetType } from 'pptx-viewer-shared'; /** * Element insertion for the Svelte editor. * * The element *factories* (`newTextElement`, `newShapeElement`, * `newTableElement`) are the shared, framework-agnostic builders from * `pptx-viewer-shared` (`render/editor-insert`); every binding uses the same * ones so a "Text box" or "Rectangle" is identical across React/Vue/Angular/ * Svelte. This module adds only the two thin, binding-local pieces the shared * factories deliberately leave out: id generation (the factories return * `id: ''`) and the pure "append to the current slide" mutation. */ export { newShapeElement, newTableElement, newTextElement } from 'pptx-viewer-shared'; /** Generate a fresh, collision-resistant element id (prefixed for clarity). */ export declare function newElementId(): string; /** * Build an `image` element from a data URL (the file picker reads a chosen * file as a `data:` URI, which the renderer consumes directly via `imageData`). */ export declare function newImageElement(imageData: string, x: number, y: number, width: number, height: number): PptxElement; /** * Build a `shape` element for any preset in the shared shape catalogue * (`SHAPE_PRESET_DEFS`, 30 presets). The shared `newShapeElement` factory * only covers `'rect' | 'ellipse' | 'line'`; core's `shapeType` field is a * plain string with no such restriction, so this widens it for the Insert * tab's shape gallery without touching the shared factory's narrow contract. */ export declare function newPresetShapeElement(shapeType: ShapePresetType, x?: number, y?: number): PptxElement; /** * Centre an element's box on the slide canvas (top-left clamped to >= 0). * Used by the "structured" Insert actions (chart / equation / SmartArt / * media / action button / field) so a freshly-inserted diagram or media * clip lands in the middle of the slide rather than stacking at a fixed * corner offset. */ export declare function centerOnCanvas(el: PptxElement, canvasSize: CanvasSize): void; /** Append `element` to the given slide's element list (immutable). */ export declare function appendElement(slides: readonly PptxSlide[], slideIndex: number, element: PptxElement): PptxSlide[]; //# sourceMappingURL=editor-insert.d.ts.map