import { EditorView } from 'prosemirror-view';
import { EditorRenderer, EditorRendererAttachParams } from './EditorRenderer.js';
import { Editor } from '../Editor.js';
import { EditorOptions } from '../types/EditorConfig.js';
/**
 * Standard DOM-based renderer for the SuperDoc editor.
 *
 * This renderer creates and manages a ProseMirror EditorView, handles DOM initialization,
 * and provides platform-specific behaviors for browser environments.
 *
 * Responsibilities:
 * - Creating and destroying ProseMirror views
 * - Initializing editor container elements and styles
 * - Managing fonts, mobile scaling, and responsive behaviors
 * - Handling copy/paste operations with custom transformations
 * - Integrating with browser developer tools
 *
 * This renderer is used automatically in browser environments and is skipped in headless mode.
 */
export declare class ProseMirrorRenderer implements EditorRenderer {
    #private;
    /**
     * The current ProseMirror EditorView instance.
     * Null when the renderer is not attached to a DOM element.
     */
    view: EditorView | null;
    /**
     * Array of cleanup functions for registered event listeners.
     * Each function removes a specific event listener when called.
     * This enables proper cleanup in destroy() to prevent memory leaks.
     */
    private eventListenerCleanups;
    /**
     * Timeout ID for the debounced resize handler.
     * Tracked to enable proper cleanup and prevent multiple pending timeouts.
     */
    private resizeTimeoutId;
    /**
     * Attach the renderer to a DOM element and create a ProseMirror view.
     *
     * Destroys any existing view before creating a new one to prevent memory leaks.
     *
     * @param params - Configuration including element, state, and callbacks
     * @param params.element - DOM element to mount into (or null for headless)
     * @param params.state - Initial ProseMirror editor state
     * @param params.editorProps - Additional ProseMirror view properties
     * @param params.dispatchTransaction - Transaction dispatch callback
     * @param params.handleClick - Optional click handler
     * @returns The created ProseMirror EditorView instance
     */
    attach({ element, state, editorProps, dispatchTransaction, handleClick, }: EditorRendererAttachParams): EditorView;
    /**
     * Destroy the renderer and clean up all resources.
     *
     * Destroys the ProseMirror view, removes all event listeners, and sets view to null.
     * Should be called when the editor is unmounted or destroyed.
     */
    destroy(): void;
    /**
     * Initialize the container element for the editor.
     *
     * Handles element selection via selector, applies style isolation class,
     * and configures headless mode if DOM is unavailable.
     *
     * In headless mode or when DOM is unavailable:
     * - Sets isHeadless to true
     * - Sets element to null
     *
     * In browser mode:
     * - Resolves element from selector (# or . prefix, or getElementById)
     * - Creates a new div if no element provided
     * - Applies style isolation class
     *
     * @param options - Partial editor options containing element/selector configuration
     */
    initContainerElement(options: Partial<EditorOptions>): void;
    /**
     * Initialize and inject document fonts into the DOM.
     *
     * Extracts font data from the converter, generates @font-face CSS rules,
     * and appends them to the document head for use throughout the application.
     *
     * Updates editor.fontsImported with the list of imported font families.
     *
     * Wraps DOM manipulation in try-catch to handle cases where document.head
     * is inaccessible or DOM operations fail (e.g., in restricted iframe contexts).
     *
     * @param editor - The editor instance containing font data via converter
     */
    initFonts(editor: Editor): void;
    /**
     * Update styles on the editor container and ProseMirror element.
     *
     * Applies:
     * - Page dimensions (width, height) from converter pageStyles
     * - Page margins (left, right, top for presentation mode)
     * - Accessibility attributes (role, aria-multiline, aria-label)
     * - Typography (font family, font size from document defaults)
     * - Mobile-specific styles (transform-origin, touch-action)
     * - Line height and padding for proper text layout
     *
     * @param editor - The editor instance
     * @param element - The container element to style
     * @param proseMirror - The ProseMirror content element (.ProseMirror)
     */
    updateEditorStyles(editor: Editor, element: HTMLElement, proseMirror: HTMLElement): void;
    /**
     * Initialize default styles for the editor container and ProseMirror element.
     *
     * Skipped in headless mode or when suppressDefaultDocxStyles is enabled.
     * Calls updateEditorStyles and initMobileStyles to apply all default styling.
     *
     * @param editor - The editor instance
     * @param element - The container element (defaults to editor.element)
     */
    initDefaultStyles(editor: Editor, element?: HTMLElement | null): void;
    /**
     * Initialize responsive styles for mobile devices.
     *
     * Sets up viewport-based scaling to fit the editor within mobile screen widths.
     * Listens for orientation changes and window resize events to update scaling dynamically.
     *
     * Note: Scaling is skipped in responsive layout mode since content reflows naturally.
     *
     * Scaling calculation:
     * - Maintains minimum side margins (MIN_MOBILE_SIDE_MARGIN_PX)
     * - Scales editor down if viewport is narrower than content
     * - Scales to 1.0 (100%) if viewport is wide enough
     *
     * Event listeners are tracked for proper cleanup in destroy().
     *
     * @param editor - The editor instance
     * @param element - The container element to apply mobile scaling to
     */
    initMobileStyles(editor: Editor, element: HTMLElement | null): void;
    /**
     * Register a copy event handler for transforming copied content.
     *
     * Intercepts the native copy event to apply custom transformations to the clipboard data.
     * Specifically transforms lists to ensure proper HTML structure when pasting into other applications.
     *
     * The handler:
     * - Serializes the current selection to HTML
     * - Applies list transformation via transformListsInCopiedContent
     * - Sets the transformed HTML on the clipboard
     *
     * Wraps clipboard operations in try-catch to handle permission errors or API failures.
     * The listener is tracked for cleanup in destroy().
     *
     * @param _editor - The editor instance (unused, kept for interface compatibility)
     */
    registerCopyHandler(_editor: Editor): void;
    /**
     * Initialize developer tools integration.
     *
     * Exposes editor and converter instances to window.superdocdev in development mode or when isDebug is enabled.
     * Skipped for header/footer editors to avoid cluttering the global scope.
     *
     * Available in:
     * - Development builds (process.env.NODE_ENV === 'development')
     * - Production builds with editor.options.isDebug = true
     *
     * Wraps in try-catch to handle cases where window is frozen or property assignment fails.
     *
     * @param editor - The editor instance to expose to developer tools
     */
    initDevTools(editor: Editor): void;
}
//# sourceMappingURL=ProseMirrorRenderer.d.ts.map