rspace-online/shared/module-comment-types.ts

29 lines
770 B
TypeScript

/**
* Module Comment Pin Types — Figma-style threaded comment markers
* anchored to `data-collab-id` elements on rApp module pages.
*
* Reuses CommentPinMessage from comment-pin-types.ts for thread messages.
*/
import type { CommentPinMessage } from './comment-pin-types';
export interface ModuleCommentAnchor {
type: 'element';
elementId: string; // data-collab-id value (e.g. "task:abc123")
moduleId: string; // which rApp (e.g. "rtasks")
}
export interface ModuleCommentPin {
id: string;
anchor: ModuleCommentAnchor;
resolved: boolean;
messages: CommentPinMessage[];
createdAt: number;
createdBy: string; // DID
createdByName: string;
}
export interface ModuleCommentsDoc {
pins: { [pinId: string]: ModuleCommentPin };
}