import * as Y from "yjs"; export type PatchOp = { op: "set"; path: string; value: any; } | { op: "insert"; path: string; index: number; value: any; } | { op: "delete"; path: string; } | { op: "move"; path: string; from: number; to: number; }; export declare function seedYDocFromJson(doc: Y.Doc, fieldName: string, json: any, type: "map" | "array"): void; export declare function yMapToJson(ymap: Y.Map): Record; export declare function yArrayToJson(yarray: Y.Array): any[]; export declare function yDocToJson(doc: Y.Doc, fieldName: string): any; export declare function applyJsonDiff(doc: Y.Doc, fieldName: string, newJson: any, origin?: string): Uint8Array; export declare function applyJsonPatch(doc: Y.Doc, fieldName: string, ops: PatchOp[], origin?: string): Uint8Array; export declare function initYDocWithJson(fieldName: string, json: any, type: "map" | "array"): { doc: Y.Doc; state: Uint8Array; };