UNPKG

@veltdev/tiptap-velt-comments

Version:

Tiptap Extension to add Google Docs-style overlay comments to your Tiptap editor. Works with the Velt Collaboration SDK.

29 lines (28 loc) 887 B
/** * State management type definitions. * These types represent the internal state structure for managing annotations. */ import type { CommentAnnotationContext } from '@/types/common'; import type { CommentAnnotation } from '@/types/velt'; /** * Represents a single annotation with its associated data and position. */ export interface AnnotationData { annotationId: string; multiThreadAnnotationId?: string; context: CommentAnnotationContext; position?: { from: number; to: number; }; } /** * Complete annotation state for a single editor instance. * Maintains annotations map, comment annotations array (with status), and selected annotations set. */ export interface AnnotationState { annotations: Map<string, AnnotationData>; commentAnnotations: CommentAnnotation[]; selectedAnnotations: Set<string>; editorId: string; }