import { isSafeHyperlinkHref } from '../opc/index.js'; import { DocPrIdAllocator } from './docpr-ids.js'; import { type XmlDocument } from './xml.js'; export declare const HYPERLINK_RELATIONSHIP_TYPE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"; export declare const IMAGE_RELATIONSHIP_TYPE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"; export { isSafeHyperlinkHref }; export interface NewRelationship { id: string; type: string; target: string; mode: 'Internal' | 'External'; /** Absolute package part name (e.g. `word/media/image1.png`), set only for newly added media parts. */ partName?: string; } /** Walks every element/attribute in a parsed document.xml to find relationship ids already in use. */ export declare function scanUsedRelationshipIds(doc: XmlDocument): Set; /** Allocates unused `rIdN` ids for new relationships introduced while applying a model diff. */ export declare class RelationshipAllocator { private readonly used; private readonly created; private readonly imagePartToRelId; /** Shared drawing-id allocator, so `wp:docPr` ids stay unique across every part of a save. */ readonly docPrIds: DocPrIdAllocator; constructor(existingIds: Iterable, docPrIds?: DocPrIdAllocator); private nextId; /** Registers a brand-new external hyperlink target and returns its relationship id. */ addExternalHyperlink(href: string): string; /** Registers (once per part) a newly inserted image part and returns its relationship id. */ addImage(partName: string): string; get newRelationships(): readonly NewRelationship[]; } //# sourceMappingURL=relationship-allocator.d.ts.map