/** * Returns the pending share state for a diagram, if any. * @param {HTMLElement} diagram - The diagram element. * @returns {object|null} The pending share state or null. */ export function getPendingShareState(diagram: HTMLElement): object | null; /** * Generates a high-precision shareable link for the current view. * * Strategically records: * 1. The precise internal point at the screen center (dv-cx, dv-cy). * 2. The high-precision zoom level (dv-z). * 3. Any active rotation (dv-r). * * @param {number} diagramIndex - Index of the diagram being shared. * @returns {string|null} The generated share URL, or null if generation fails. */ export function generateShareLink(diagramIndex: number): string | null; /** * Copies the generated share link to the system clipboard. */ export function shareLink(diagramIndex: any): Promise; /** * Detects and parses shared state from the URL. * @returns {object|boolean} The restored diagram and its index, or false if no state found. */ export function restoreViewFromURL(diagrams: any): object | boolean; /** * Reconstructs the saved view state in the modal. * * THE RESTORATION WORKFLOW: * 1. Apply Rotation. * 2. Apply Zoom (Resetting the pan state to a known centered baseline). * 3. Matrix Re-Sync: * - Wait for one browser frame (requestAnimationFrame) for zoom to settle. * - Find where the saved coordinate (cx, cy) is currently located on screen. * - Pan the diagram by the pixel distance needed to return that point to the center. */ export function applyRestoredViewState(diagram: any, panzoom: any): boolean; //# sourceMappingURL=share.d.ts.map