/**
 * Returns true when the given value, after coercion to a trimmed string, is
 * a base-10 integer Word would accept as `w:id`.
 *
 * @param {unknown} value
 * @returns {boolean}
 */
export function isDecimalWordId(value: unknown): boolean;
/**
 * @returns {WordIdAllocator}
 */
export function createWordIdAllocator(): WordIdAllocator;
export const TRACKED_CHANGE_SOURCE_ID_MAP_PROPERTY: "SuperdocTrackedChangeSourceIds";
/**
 * Word revision id allocator for DOCX export.
 *
 * Word stores tracked-change revision ids (`w:id` on `<w:ins>`, `<w:del>`,
 * `<w:rPrChange>`) as decimal strings whose namespace is per-part: document,
 * each header, each footer, footnotes, and endnotes are independent. The
 * allocator preserves imported raw Word ids (carried on the SuperDoc mark as
 * `sourceId`) and mints fresh part-local decimal ids for native revisions and
 * successor fragments whose `sourceId` is empty or non-decimal.
 *
 * The allocator only assigns `w:id` values. It does NOT replace the internal
 * SuperDoc logical id (`id`, a UUID) — internal graph metadata stays on PM
 * marks; only the Word-native `w:id` attribute is decimal.
 *
 * Two phases:
 *   1) `reserveAll(allMarks)` walks every tracked mark and reserves every
 *      decimal `sourceId` value found.
 *   2) `allocate({ partPath, sourceId, logicalId })` returns the `w:id` to
 *      write into OOXML for a single mark. Same `logicalId` returns the same
 *      `w:id` within the same part, so paired replacement halves stay linked.
 */
export type WordIdAllocator = {
    reserve: (partPath: string, sourceId: string | number | null | undefined) => void;
    reserveAll: (entries: Iterable<{
        partPath: string;
        sourceId: string | number | null | undefined;
    }>) => void;
    allocate: (input: {
        partPath: string;
        sourceId?: string | number | null;
        logicalId?: string | null;
    }) => string;
    isDecimal: (value: unknown) => boolean;
    getSourceIdMap: () => Record<string, Record<string, string>>;
    __snapshot: () => Record<string, {
        reservedDecimal: number[];
        nextDecimal: number;
    }>;
};
/**
 * Word revision id allocator for DOCX export.
 *
 * Word stores tracked-change revision ids (`w:id` on `<w:ins>`, `<w:del>`,
 * `<w:rPrChange>`) as decimal strings whose namespace is per-part: document,
 * each header, each footer, footnotes, and endnotes are independent. The
 * allocator preserves imported raw Word ids (carried on the SuperDoc mark as
 * `sourceId`) and mints fresh part-local decimal ids for native revisions and
 * successor fragments whose `sourceId` is empty or non-decimal.
 *
 * The allocator only assigns `w:id` values. It does NOT replace the internal
 * SuperDoc logical id (`id`, a UUID) — internal graph metadata stays on PM
 * marks; only the Word-native `w:id` attribute is decimal.
 *
 * Two phases:
 *   1) `reserveAll(allMarks)` walks every tracked mark and reserves every
 *      decimal `sourceId` value found.
 *   2) `allocate({ partPath, sourceId, logicalId })` returns the `w:id` to
 *      write into OOXML for a single mark. Same `logicalId` returns the same
 *      `w:id` within the same part, so paired replacement halves stay linked.
 */
export type PartWordIdState = {
    reservedDecimal: Set<number>;
    nextDecimal: number;
    assignedByLogicalId: Map<string, number>;
    sourceIdByWordId: Map<string, string>;
};
//# sourceMappingURL=word-id-allocator.d.ts.map