import type { HsonNode, Primitive } from "../../core/types.js"; import type { DocumentLiveMapMode, LiveMapDocumentPath, LiveMapGraphOp } from "../../types/livemap.types.js"; export type LiveMapDocumentPathFailureCode = "MALFORMED_DOCUMENT_PATH" | "INVALID_DOCUMENT_PATH_INDEX" | "DOCUMENT_ROOT_UNAVAILABLE" | "DOCUMENT_PATH_OUT_OF_RANGE" | "DOCUMENT_PATH_PRIMITIVE_DESCENT"; /** Structured neutral failure owned by canonical document-path processing. */ export declare class LiveMapDocumentPathError extends TypeError { readonly code: LiveMapDocumentPathFailureCode; readonly segmentIndex: number | undefined; readonly segment: unknown; constructor(code: LiveMapDocumentPathFailureCode, reason: string, segmentIndex?: number, segment?: unknown); } /** Validate, detach, freeze, and establish the sole document-path brand. */ export declare function validate_document_path(input: unknown): LiveMapDocumentPath; /** Lexicographic numeric ordering suitable for deterministic indexes and output. */ export declare function compare_document_paths(left: LiveMapDocumentPath, right: LiveMapDocumentPath): number; export declare function document_path_equal(left: LiveMapDocumentPath, right: LiveMapDocumentPath): boolean; /** Return whether `prefix` is equal to or an ancestor of `path`. */ export declare function document_path_is_prefix(prefix: LiveMapDocumentPath, path: LiveMapDocumentPath): boolean; export declare function append_document_path(path: LiveMapDocumentPath, segment: unknown): LiveMapDocumentPath; export declare function parent_document_path(path: LiveMapDocumentPath): LiveMapDocumentPath | undefined; /** Deterministic JSON-array key; no string-key path semantics are admitted. */ export declare function encode_document_path(path: LiveMapDocumentPath): string; /** Resolve one validated path through canonical `$_content` ownership. */ export declare function resolve_document_path(root: HsonNode, mode: DocumentLiveMapMode, path: LiveMapDocumentPath): HsonNode | Primitive; /** Find the canonical path of one exact node inside the selected document root. */ export declare function find_document_node_path(root: HsonNode, mode: DocumentLiveMapMode, target: HsonNode): LiveMapDocumentPath | undefined; export type LiveMapDocumentPathEffect = Readonly<{ kind: "insert"; parent: LiveMapDocumentPath; index: number; }> | Readonly<{ kind: "delete"; parent: LiveMapDocumentPath; index: number; }> | Readonly<{ kind: "replace"; parent: LiveMapDocumentPath; index: number; }> | Readonly<{ kind: "move"; parent: LiveMapDocumentPath; from: number; to: number; }> | Readonly<{ kind: "replace-root"; }>; export type LiveMapDocumentPathTransform = Readonly<{ kind: "unchanged"; path: LiveMapDocumentPath; }> | Readonly<{ kind: "moved"; path: LiveMapDocumentPath; }> | Readonly<{ kind: "retired"; reason: "deleted" | "replaced" | "root-replaced"; }> | Readonly<{ kind: "invalid"; reason: string; }>; /** * Derive the one canonical path effect represented by a graph operation. * Attribute operations preserve locations and therefore have no path effect. */ export declare function document_path_effect_for_graph_operation(operation: LiveMapGraphOp): LiveMapDocumentPathEffect | undefined; /** * Transform one known structural location through one canonical content * effect. `move.to` is the final sibling index after removal. */ export declare function transform_document_path(path: LiveMapDocumentPath, effect: LiveMapDocumentPathEffect): LiveMapDocumentPathTransform; //# sourceMappingURL=livemap.document.path.d.ts.map