import { Node as ProseMirrorNode } from 'prosemirror-model'; import { Editor } from '../../core/Editor.js'; export type ImagePlacement = 'inline' | 'floating'; export interface ImageCandidate { pos: number; node: ProseMirrorNode; sdImageId: string; placement: ImagePlacement; } /** * Walks the document tree and collects every image node that has a stable * `sdImageId` attribute. Images without an `sdImageId` are skipped — they * cannot be targeted by the Document API. */ export declare function collectImages(doc: ProseMirrorNode): ImageCandidate[]; /** * Finds a single image by `sdImageId`. * * @throws {DocumentApiAdapterError} `TARGET_NOT_FOUND` when no image has the given ID. * @throws {DocumentApiAdapterError} `AMBIGUOUS_TARGET` when multiple images share the same ID. */ export declare function findImageById(editor: Editor, sdImageId: string): ImageCandidate; /** * Requires that the targeted image has floating placement. * * @throws {DocumentApiAdapterError} `INVALID_TARGET` when the image is inline. */ export declare function requireFloatingPlacement(image: ImageCandidate, operation: string): void; //# sourceMappingURL=image-resolver.d.ts.map