import type { HsonNode } from "../../core/types.js"; import type { DocumentLiveMapAttrsMutationApi, DocumentLiveMapFlagsMutationApi, DocumentLiveMapMode, LiveMapDocumentAttrs, LiveMapDocumentContent, LiveMapDocumentRequestTarget, LiveMapGraphCommit, LiveMapGraphInsertContentOp, LiveMapGraphMoveContentOp, LiveMapGraphOp, LiveMapGraphReplaceAttrsOp, LiveMapGraphRemoveContentOp, LiveMapGraphReplaceContentOp } from "../../types/livemap.types.js"; import { type LiveMapDocumentIdentityEffect, type LiveMapDocumentIdentityOverlay } from "./livemap.document.identity.js"; export type PreparedDocumentMutation = Readonly<{ root: HsonNode; overlay: LiveMapDocumentIdentityOverlay; operation: TOp; identityEffects: readonly LiveMapDocumentIdentityEffect[]; }>; /** Internal state boundary implemented by the shared LiveMap Core. */ export type LiveMapDocumentMutationController = Readonly<{ mode: DocumentLiveMapMode; rev: () => number; root: () => HsonNode; overlay: () => LiveMapDocumentIdentityOverlay; applyMutation: (candidate: PreparedDocumentMutation) => LiveMapGraphCommit; }>; /** Build the document capability over one atomic Core controller. */ export declare function make_livemap_document_mutation_api(controller: LiveMapDocumentMutationController): Readonly<{ attrs: DocumentLiveMapAttrsMutationApi; flags: DocumentLiveMapFlagsMutationApi; /** Internal atomic substrate shared by every public bulk attrs method. */ replaceAttrs: (target: LiveMapDocumentRequestTarget, attrs: LiveMapDocumentAttrs) => LiveMapGraphCommit; replaceContent: (target: LiveMapDocumentRequestTarget, index: number, replacement: LiveMapDocumentContent) => LiveMapGraphCommit; insertContent: (target: LiveMapDocumentRequestTarget, index: number, content: LiveMapDocumentContent) => LiveMapGraphCommit; removeContent: (target: LiveMapDocumentRequestTarget, index: number) => LiveMapGraphCommit; moveContent: (target: LiveMapDocumentRequestTarget, from: number, to: number) => LiveMapGraphCommit; }>; /** Validate and plan one graph operation against a detached candidate root. */ export declare function prepare_document_graph_operation(root: HsonNode, mode: DocumentLiveMapMode, input: unknown, overlay?: LiveMapDocumentIdentityOverlay): PreparedDocumentMutation; //# sourceMappingURL=livemap.document.mutation.d.ts.map