import type { Editor } from "@tiptap/core"; import { type CommentStore, type CommentStoreSnapshot, type CommentThread, type TrackChangesSnapshot, type TrackedChange } from "@pixerate/editor"; export declare const EMPTY_COMMENTS_SNAPSHOT: CommentStoreSnapshot; export declare const EMPTY_TRACK_CHANGES_SNAPSHOT: TrackChangesSnapshot; export declare function isCommentStore(value: unknown): value is CommentStore; /** Resolves a comment store from a store or an editor using `Comments`. */ export declare function resolveCommentStore(source: Editor | CommentStore | null | undefined): CommentStore | null; export interface SvelteComments { readonly threads: readonly CommentThread[]; readonly activeThreadId: string | null; readonly store: CommentStore | null; subscribe(run: (value: CommentStoreSnapshot) => void): () => void; destroy(): void; } /** * Reactive (runes) and Svelte-store-compatible view of a comment store. Pass * the store or an editor using the `Comments` extension. Call `destroy()` * when done (or create it inside a component, where it lives as long as the * component). */ export declare function createComments(source: Editor | CommentStore | null | undefined): SvelteComments; export interface SvelteTrackChanges extends TrackChangesSnapshot { readonly currentChange: TrackedChange | null; setEnabled(enabled: boolean): void; toggle(): void; accept(id: string): void; reject(id: string): void; acceptAll(): void; rejectAll(): void; next(): void; previous(): void; /** Selects a change in the editor. */ select(id: string): void; /** Accepts a tracked move (both ends). */ acceptMove(id: string): void; /** Rejects a tracked move (both ends). */ rejectMove(id: string): void; subscribe(run: (value: TrackChangesSnapshot) => void): () => void; destroy(): void; } /** * Reactive (runes) and Svelte-store-compatible view of an editor's tracked * changes (`TrackChanges` extension) with its commands. */ export declare function createTrackChanges(editor: Editor | null | undefined): SvelteTrackChanges;