import { Editor } from '../../core/Editor.js';
import { Node as ProseMirrorNode } from 'prosemirror-model';
import { BookmarkAddress, BookmarkDomain, BookmarkInfo, DiscoveryItem, StoryLocator } from '../../../../../../document-api/src/index.js';
export interface ResolvedBookmark {
    node: ProseMirrorNode;
    pos: number;
    name: string;
    bookmarkId: string;
    endPos: number | null;
}
export interface DocumentBookmarkEntry {
    name: string;
    bookmarkId: string;
    storyKey: string;
}
export type BookmarkMarkerType = 'bookmarkStart' | 'bookmarkEnd';
export interface DocumentBookmarkMarkerEntry {
    bookmarkId: string;
    storyKey: string;
    markerType: BookmarkMarkerType;
}
export declare function normalizeStory(locator?: StoryLocator): StoryLocator | undefined;
export declare function buildBookmarkAddress(name: string, story?: StoryLocator): BookmarkAddress;
export declare function findAllBookmarksInDocument(editor: Editor): DocumentBookmarkEntry[];
export declare function findAllBookmarkMarkersInDocument(editor: Editor): DocumentBookmarkMarkerEntry[];
/**
 * Finds all bookmarkStart nodes in document order.
 */
export declare function findAllBookmarks(doc: ProseMirrorNode): ResolvedBookmark[];
/**
 * Resolves a BookmarkAddress to its ProseMirror node and position.
 * @throws DocumentApiAdapterError with code TARGET_NOT_FOUND if not found.
 */
export declare function resolveBookmarkTarget(doc: ProseMirrorNode, target: BookmarkAddress): ResolvedBookmark;
export declare function extractBookmarkInfo(doc: ProseMirrorNode, resolved: ResolvedBookmark, story?: StoryLocator): BookmarkInfo;
export declare function buildBookmarkDiscoveryItem(doc: ProseMirrorNode, resolved: ResolvedBookmark, evaluatedRevision: string, story?: StoryLocator, idScope?: string): DiscoveryItem<BookmarkDomain>;
//# sourceMappingURL=bookmark-resolver.d.ts.map