31 lines
708 B
TypeScript
31 lines
708 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;
|
|
}
|