import { ChartPptxElement, PptxChartData, PptxElement } from 'pptx-viewer-core'; import { ChartPartRef } from 'pptx-viewer-shared'; /** * chart-drag (Svelte): direct on-canvas chart editing, the Svelte port of Vue's * `useChartCanvasInteraction` and React's `ChartElementView`. * * The state machine, the hit-target stylesheet and the highlight all live in * `pptx-viewer-shared/render/chart-canvas-drag`; this module is only the runes * wrapper, so a fix to the drag maths reaches all five bindings at once. * * Behaviour: press a bar / dot / slice to select it, drag it vertically to * change its value (live local preview, committed ONCE on release so one drag * is one undo step), Escape cancels; double-click the title to edit it in * place (Enter/blur commits, Escape cancels). The projector always emits the * `data-chart-*` hit-testing attributes; they stay pointer-transparent until * the root carries `pptx-chart-interactive`, which is why thumbnails and the * presentation stage cannot be dragged. */ export declare class ChartDragController { #private; /** Chart data with the in-flight drag applied, or null when idle. */ preview: PptxChartData | null; /** Formatted value for the floating mid-drag badge, or null when idle. */ label: string | null; /** The mark the user last pressed, highlighted until selection moves away. */ selectedPart: ChartPartRef | null; /** Inline title editor draft; null while the editor is closed. */ titleDraft: string | null; constructor(input: { element: () => ChartPptxElement; root: () => HTMLElement | null; commit: (elementId: string, chartData: PptxChartData) => void; }); /** The element to render: the committed one, or the drag preview over it. */ rendered(): PptxElement; /** Re-apply the selected-mark highlight; the SVG is re-created every render. */ syncHighlight(): void; onpointerdown: (event: PointerEvent) => void; /** * Double-click handler for the chart root: opens the inline title editor * when the title itself was hit, and otherwise just keeps a mark * double-click from bubbling into the element-level inline-text-edit * handler (a mark double-click is already handled as two presses). */ ondblclick: (event: MouseEvent) => void; setTitleDraft(value: string): void; commitTitle(): void; cancelTitle(): void; /** Release listeners when the chart unmounts mid-drag. */ destroy(): void; } //# sourceMappingURL=chart-drag.svelte.d.ts.map