import { SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionInfo, SelectionReleaseSnapshotInput, SelectionReleaseSnapshotResult, OoxmlContentSource } from './selection.types.js'; export type { SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionOoxmlDependency, SelectionTableCellsTarget, TableSelectionInfo, SelectionInfo, SelectionReleaseSnapshotInput, SelectionReleaseSnapshotResult, OoxmlContentSource, } from './selection.types.js'; /** * Engine-specific adapter for the selection API. */ export interface SelectionAdapter { readonly supportsRetainedOoxml?: boolean; /** Read the editor's current selection. */ current(input: SelectionCurrentInput): SelectionInfo; extractOoxml(input: SelectionExtractOoxmlInput): SelectionExtractOoxmlResult; releaseSnapshot?(input: SelectionReleaseSnapshotInput): SelectionReleaseSnapshotResult; } /** * Public selection API exposed on `editor.doc.selection`. */ export interface SelectionApi { /** * Read the editor's current selection as a portable {@link SelectionInfo}. * * Use to drive custom UIs (toolbars, sidebars, popovers) without * reaching into ProseMirror internals. For comment-target construction, * pass the resulting `target` directly to `comments.create`. */ current(input?: SelectionCurrentInput): SelectionInfo; /** Capture the addressed selected OOXML and its package dependencies. */ extractOoxml(input: SelectionExtractOoxmlInput): SelectionExtractOoxmlResult; /** Release an exact restoration handle without changing document or history. */ releaseSnapshot(input: SelectionReleaseSnapshotInput): SelectionReleaseSnapshotResult; } export declare function executeSelectionExtractOoxml(adapter: SelectionAdapter, input: SelectionExtractOoxmlInput): SelectionExtractOoxmlResult; export declare function executeSelectionCurrent(adapter: SelectionAdapter, input?: SelectionCurrentInput): SelectionInfo; export declare function executeSelectionReleaseSnapshot(adapter: SelectionAdapter, input: SelectionReleaseSnapshotInput): SelectionReleaseSnapshotResult; export declare function isOoxmlContentSource(input: T): input is T & OoxmlContentSource; export declare function validateOoxmlContentSource(input: Record): void;