33 lines
812 B
TypeScript
33 lines
812 B
TypeScript
/**
|
|
* Comment Pin Types — shared between client and server.
|
|
* Figma-style overlay comment markers on the canvas.
|
|
*/
|
|
|
|
export interface CommentPinAnchor {
|
|
type: 'shape' | 'canvas';
|
|
shapeId?: string; // when type === 'shape'
|
|
offsetX: number; // shape-relative or world coords
|
|
offsetY: number;
|
|
}
|
|
|
|
export interface CommentPinMessage {
|
|
id: string;
|
|
authorId: string; // DID
|
|
authorName: string;
|
|
text: string;
|
|
mentionedDids?: string[];
|
|
createdAt: number;
|
|
}
|
|
|
|
export interface CommentPinData {
|
|
id: string;
|
|
anchor: CommentPinAnchor;
|
|
resolved: boolean;
|
|
messages: CommentPinMessage[];
|
|
createdAt: number;
|
|
createdBy: string; // DID
|
|
createdByName: string;
|
|
linkedNoteId?: string; // rNotes note ID
|
|
linkedNoteTitle?: string; // cached title for display
|
|
}
|