import type { GDocsDocument, GDocsRequest } from './google-api-types.js'; import type { CachedParagraph } from './types.js'; declare const ANCHOR_PREFIX = "_bk_"; /** Generate a named range name with the _bk_ prefix */ export declare function generateAnchorName(index: number): string; /** Check if a named range name is an internal safe-docx anchor */ export declare function isInternalAnchor(name: string): boolean; /** * Build createNamedRange requests for all paragraphs without anchors. * Each named range spans startIndex to startIndex+1 (first character of the paragraph). */ export declare function buildNamedRangeInjectionRequests(paragraphs: CachedParagraph[], existingCount: number): GDocsRequest[]; /** * Map createNamedRange responses to anchor names. * Returns a Map of Google namedRangeId -> _bk_ name. */ export declare function mapNamedRangeResponses(responses: Array<{ createNamedRange?: { namedRangeId?: string; }; }>, startCounter: number): Map; /** * Extract existing _bk_ named ranges from document structure. * * With `includeTabsContent=true`, named ranges are found in * `tabs[].documentTab.namedRanges`, NOT in `doc.namedRanges`. * We also fall back to doc-level `namedRanges` for non-tab-aware reads. */ export declare function extractExistingAnchors(doc: GDocsDocument): Map; /** * Build deleteNamedRange requests for all _bk_ anchors (cleanup). */ export declare function buildAnchorCleanupRequests(anchorIds: string[]): GDocsRequest[]; export { ANCHOR_PREFIX as BOOKMARK_PREFIX }; export { generateAnchorName as generateBookmarkName }; export { isInternalAnchor as isInternalBookmark }; //# sourceMappingURL=anchors.d.ts.map