/** * Collaborative editing utilities for Sunsama task notes * * These functions create and update Yjs-based collaborative snapshots * compatible with Sunsama's real-time editing system. * * IMPORTANT: Task notes use XmlFragment → XmlElement('paragraph') → XmlText, * NOT Y.Text directly — using Y.Text breaks Sunsama UI sync. */ import type { CollabSnapshot } from '../types/api.js'; /** * Creates a collaborative editing snapshot for task notes using Yjs * * Always creates a collabSnapshot even for empty notes to match UI behavior * and enable future note updates. * * @param taskId - The task ID (used to construct the Yjs document name) * @param notes - The notes content in Markdown format (can be empty) * @returns CollabSnapshot object with Yjs-generated state */ export declare function createCollabSnapshot(taskId: string, notes: string): CollabSnapshot; /** * Creates an updated collaborative editing snapshot based on existing state * * Takes an existing collaborative snapshot and creates a new one with updated * content, properly handling the Yjs document state and incrementing version clocks. * * @param existingSnapshot - The existing collaborative snapshot from the task * @param newContent - The new content to apply (Markdown format) * @returns Updated CollabSnapshot object */ export declare function createUpdatedCollabSnapshot(existingSnapshot: CollabSnapshot, newContent: string): CollabSnapshot; //# sourceMappingURL=collab.d.ts.map