@commentkit/comment-kit 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/angular/comment-kit-ui-DlWdgxZJ.js +17929 -0
  3. package/dist/{qwik/dom-BjJ-QroQ.js → angular/dom-Cx1nMbdI.js} +9 -2
  4. package/dist/angular/{mount-ui-CM6GekDi.js → mount-ui-Q_U4OkMo.js} +1 -1
  5. package/dist/angular/{realtime-D-sBnozI.js → realtime-VrKV0lPI.js} +10 -1
  6. package/dist/angular/styles-CmEq782M.js +2 -0
  7. package/dist/angular.es.js +22 -6
  8. package/dist/comment-kit.es.js +22 -6
  9. package/dist/core/comment-kit-ui-CwoXDJXR.js +17929 -0
  10. package/dist/core/{mount-ui-EgkHvqV9.js → mount-ui-D-pILMLR.js} +1 -1
  11. package/dist/core/{realtime-yUS-GhJ_.js → realtime-C3_O7gi2.js} +1 -1
  12. package/dist/core/styles-Dzn_nEz7.js +2 -0
  13. package/dist/core/{websocket-manager-DorGPjR4.js → websocket-manager-D1_TEuy_.js} +9 -0
  14. package/dist/preact/comment-kit-ui-CIeAiL3D.js +17929 -0
  15. package/dist/{angular/dom-ON-u4y6t.js → preact/dom-_ULpq7rg.js} +9 -2
  16. package/dist/preact/{mount-ui-2SqQgVGO.js → mount-ui-8BL4DWNw.js} +1 -1
  17. package/dist/preact/{realtime-PCo5q96o.js → realtime-COin_nJF.js} +10 -1
  18. package/dist/preact/styles-ECCK6Z_C.js +2 -0
  19. package/dist/preact.es.js +22 -6
  20. package/dist/qwik/comment-kit-ui-CT3GZ8ry.js +17929 -0
  21. package/dist/{solid/dom-Bpw1A0oz.js → qwik/dom-Dm3gzBBJ.js} +9 -2
  22. package/dist/qwik/{mount-ui-DcWO4cw4.js → mount-ui-DQ22eQbu.js} +1 -1
  23. package/dist/qwik/{realtime-BJTjcla8.js → realtime-DhfcBrwF.js} +10 -1
  24. package/dist/qwik/styles-CMcDFAyE.js +2 -0
  25. package/dist/qwik.es.js +22 -6
  26. package/dist/react/{limits-Dflmuf1P.js → limits-CpprSem3.js} +10 -3
  27. package/dist/react/{realtime-DtkfBr0e.js → realtime-DGqScuox.js} +125 -116
  28. package/dist/react.es.js +12023 -3561
  29. package/dist/solid/comment-kit-ui-BXcJmq6H.js +17929 -0
  30. package/dist/{preact/dom-BAV8grk_.js → solid/dom-DqDH-Gml.js} +9 -2
  31. package/dist/solid/{mount-ui-zLYWCM7u.js → mount-ui-DmrWIA8O.js} +1 -1
  32. package/dist/solid/{realtime-CthMPv02.js → realtime-DbUJK4gU.js} +10 -1
  33. package/dist/solid/styles-Be_8-1ZV.js +2 -0
  34. package/dist/solid.es.js +22 -6
  35. package/dist/svelte/comment-kit-ui-C-8rQmBN.js +17929 -0
  36. package/dist/svelte/dom-MyTrWzy_.js +104 -0
  37. package/dist/svelte/{mount-ui-DoUxiZdf.js → mount-ui-CDgJuoAF.js} +1 -1
  38. package/dist/svelte/{realtime-TdWPhe9S.js → realtime-M1CJbCBA.js} +10 -1
  39. package/dist/svelte/styles-B863Tn5m.js +2 -0
  40. package/dist/svelte.es.js +22 -6
  41. package/dist/types/core/comment-kit-core.d.ts +12 -0
  42. package/dist/types/core/websocket-manager.d.ts +5 -0
  43. package/dist/types/react/comments/comment-flow.d.ts +8 -0
  44. package/dist/types/react/comments/outcomes.d.ts +22 -0
  45. package/dist/types/react/comments/pin-geometry.d.ts +12 -0
  46. package/dist/types/react/comments/view-model.d.ts +59 -0
  47. package/dist/types/react/components/comment-actions.d.ts +20 -0
  48. package/dist/types/react/components/comment-body.d.ts +8 -0
  49. package/dist/types/react/components/comment-composer-actions.d.ts +26 -0
  50. package/dist/types/react/components/comment-composer-extras-fields.d.ts +35 -0
  51. package/dist/types/react/components/comment-composer-extras-toolbar.d.ts +28 -0
  52. package/dist/types/react/components/comment-composer-extras.d.ts +10 -0
  53. package/dist/types/react/components/comment-composer-hook.d.ts +53 -0
  54. package/dist/types/react/components/comment-composer-media.d.ts +30 -0
  55. package/dist/types/react/components/comment-composer.d.ts +4 -0
  56. package/dist/types/react/components/comment-connection-alert.d.ts +7 -0
  57. package/dist/types/react/components/comment-custom-cursor.d.ts +14 -0
  58. package/dist/types/react/components/comment-emoji-picker.d.ts +12 -0
  59. package/dist/types/react/components/comment-error-banner.d.ts +8 -0
  60. package/dist/types/react/components/comment-format-toolbar.d.ts +6 -0
  61. package/dist/types/react/components/comment-header.d.ts +41 -0
  62. package/dist/types/react/components/comment-image-lightbox.d.ts +18 -0
  63. package/dist/types/react/components/comment-images.d.ts +15 -0
  64. package/dist/types/react/components/comment-item.d.ts +25 -0
  65. package/dist/types/react/components/comment-login-modal.d.ts +20 -0
  66. package/dist/types/react/components/comment-marker-layer-composer.d.ts +21 -0
  67. package/dist/types/react/components/comment-marker-layer.d.ts +26 -0
  68. package/dist/types/react/components/comment-marker-popover.d.ts +12 -0
  69. package/dist/types/react/components/comment-marker.d.ts +14 -0
  70. package/dist/types/react/components/comment-page-ref.d.ts +9 -0
  71. package/dist/types/react/components/comment-panel.d.ts +17 -0
  72. package/dist/types/react/components/comment-quoted-text.d.ts +9 -0
  73. package/dist/types/react/components/comment-reactions.d.ts +11 -0
  74. package/dist/types/react/components/comment-thread-detail-badges.d.ts +16 -0
  75. package/dist/types/react/components/comment-thread-detail-meta.d.ts +8 -0
  76. package/dist/types/react/components/comment-thread-detail-replies.d.ts +13 -0
  77. package/dist/types/react/components/comment-thread-detail.d.ts +10 -0
  78. package/dist/types/react/components/comment-thread-footer.d.ts +12 -0
  79. package/dist/types/react/components/comment-thread-list-item.d.ts +14 -0
  80. package/dist/types/react/components/comment-thread-list.d.ts +8 -0
  81. package/dist/types/react/components/comment-user-avatar-tooltip.d.ts +12 -0
  82. package/dist/types/react/ui/primitives/alert/alert.d.ts +8 -0
  83. package/dist/types/react/ui/primitives/alert/index.d.ts +1 -0
  84. package/dist/vue/comment-kit-ui-Cq30Cmvs.js +17929 -0
  85. package/dist/vue/dom-C7krZAR8.js +104 -0
  86. package/dist/vue/{mount-ui-QijqPINi.js → mount-ui-Dqz0_jd_.js} +1 -1
  87. package/dist/vue/{realtime-2P9gIgF8.js → realtime-B0B5cE-E.js} +10 -1
  88. package/dist/vue/styles-C4t8gcea.js +2 -0
  89. package/dist/vue.es.js +22 -6
  90. package/package.json +1 -1
  91. package/dist/angular/comment-kit-ui-BYFqkQq1.js +0 -9483
  92. package/dist/angular/styles-CvndAWRF.js +0 -2
  93. package/dist/core/comment-kit-ui-BiJZt5rE.js +0 -9483
  94. package/dist/core/styles-D19zARBi.js +0 -2
  95. package/dist/preact/comment-kit-ui-BUrKxAhh.js +0 -9483
  96. package/dist/preact/styles-Dwd4AJR8.js +0 -2
  97. package/dist/qwik/comment-kit-ui-DYW9KrsB.js +0 -9483
  98. package/dist/qwik/styles-BB1B91hh.js +0 -2
  99. package/dist/solid/comment-kit-ui-B2LPR7cY.js +0 -9483
  100. package/dist/solid/styles-CtYBghRP.js +0 -2
  101. package/dist/svelte/comment-kit-ui-D__j1cXs.js +0 -9483
  102. package/dist/svelte/dom-mfioQqLy.js +0 -97
  103. package/dist/svelte/styles-DKCGeARl.js +0 -2
  104. package/dist/vue/comment-kit-ui-B0id65SI.js +0 -9483
  105. package/dist/vue/dom-eo0P9Z6Z.js +0 -97
  106. package/dist/vue/styles-BrHt1-ia.js +0 -2
@@ -0,0 +1,59 @@
1
+ import type { Attachment, Comment, CommentKitState, Reply, TaskStatus, User } from "../../core/types";
2
+ export interface CommentViewUser {
3
+ id: string;
4
+ name: string;
5
+ email?: string;
6
+ avatarUrl?: string;
7
+ }
8
+ export interface CommentViewImage {
9
+ id: string;
10
+ url: string;
11
+ alt?: string;
12
+ type: Attachment["type"];
13
+ filename?: string;
14
+ thumbnail?: string;
15
+ }
16
+ /** Presentation shape for one comment or reply. Canonical ids and dates stay intact. */
17
+ export interface CommentView {
18
+ id: string;
19
+ author: CommentViewUser;
20
+ body: string;
21
+ timestamp: string;
22
+ createdAt: string;
23
+ updatedAt?: string;
24
+ images: CommentViewImage[];
25
+ status: TaskStatus;
26
+ priority: Comment["priority"];
27
+ isResolved: boolean;
28
+ type: Comment["type"];
29
+ }
30
+ export interface ThreadView {
31
+ id: string;
32
+ parent: CommentView;
33
+ replies: CommentView[];
34
+ pageRef?: {
35
+ title: string;
36
+ path: string;
37
+ url?: string;
38
+ };
39
+ position: {
40
+ x: number;
41
+ y: number;
42
+ element?: string;
43
+ xpath?: string;
44
+ };
45
+ status: TaskStatus;
46
+ priority: Comment["priority"];
47
+ isResolved: boolean;
48
+ assignees: CommentViewUser[];
49
+ checklistDone: number;
50
+ checklistTotal: number;
51
+ }
52
+ export declare function formatCommentTimestamp(iso: string, now?: number): string;
53
+ export declare function toViewUser(user: Pick<User, "id" | "name" | "email" | "avatar">): CommentViewUser;
54
+ export declare function toCommentView(comment: Comment, now?: number): CommentView;
55
+ export declare function toReplyView(reply: Reply, now?: number): CommentView;
56
+ export declare function toThreadView(comment: Comment, now?: number): ThreadView;
57
+ /** Comments whose canonical page path matches the host page, ignoring origin. */
58
+ export declare function commentsForCurrentPage(comments: Comment[]): Comment[];
59
+ export declare function threadFromState(state: CommentKitState, commentId: string | null): ThreadView | null;
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ interface CommentActionsProps {
3
+ /** "list" = no three-dot menu; "detail" = full menu with edit/delete; "reply" = edit icon only, no menu. */
4
+ context?: "list" | "detail" | "reply";
5
+ isResolved?: boolean;
6
+ /** Accepted for API compatibility. Reaction persistence is deferred. */
7
+ onReact?: (emoji: string) => void;
8
+ onCopyUrl?: () => void;
9
+ onResolve?: () => void;
10
+ /** Copy body as markdown for LLM (detail only). */
11
+ onCopyMarkdown?: () => void;
12
+ /** Edit comment (detail only, own comments). */
13
+ onEdit?: () => void;
14
+ /** Delete thread (detail only). */
15
+ onDelete?: () => void;
16
+ /** Locate/scroll to the marker on the page. */
17
+ onLocate?: () => void;
18
+ }
19
+ export declare const CommentActions: React.MemoExoticComponent<({ context, isResolved, onReact: _onReact, onCopyUrl, onResolve, onCopyMarkdown, onEdit, onDelete, onLocate, }: CommentActionsProps) => import("react/jsx-runtime").JSX.Element>;
20
+ export {};
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import type { CommentViewUser } from "../comments/view-model";
3
+ interface CommentBodyProps {
4
+ text: string;
5
+ users?: CommentViewUser[];
6
+ }
7
+ export declare const CommentBody: React.MemoExoticComponent<({ text, users, }: CommentBodyProps) => import("react/jsx-runtime").JSX.Element>;
8
+ export {};
@@ -0,0 +1,26 @@
1
+ interface CommentUser {
2
+ id: string;
3
+ name: string;
4
+ avatarUrl?: string;
5
+ email?: string;
6
+ }
7
+ interface CommentComposerMentionsProps {
8
+ mentions: CommentUser[];
9
+ onSelect: (user: CommentUser) => void;
10
+ }
11
+ export declare function CommentComposerMentions({ mentions, onSelect }: CommentComposerMentionsProps): import("react/jsx-runtime").JSX.Element | null;
12
+ interface CommentComposerActionsProps {
13
+ mode: "reply" | "edit" | "new-thread";
14
+ hasContent: boolean;
15
+ disabled: boolean;
16
+ isSubmitting: boolean;
17
+ /** Accepted for API compatibility. Ignored until file upload ships. */
18
+ onAttachFile: () => void;
19
+ /** Accepted for API compatibility. Ignored until file upload ships. */
20
+ onAttachImage: () => void;
21
+ onFormatInsert: (prefix: string, suffix: string) => void;
22
+ onSubmit: () => void;
23
+ onCancel?: () => void;
24
+ }
25
+ export declare function CommentComposerActions({ mode, hasContent, disabled, isSubmitting, onAttachFile: _onAttachFile, onAttachImage: _onAttachImage, onFormatInsert, onSubmit, onCancel, }: CommentComposerActionsProps): import("react/jsx-runtime").JSX.Element;
26
+ export {};
@@ -0,0 +1,35 @@
1
+ /** Draft checklist row. Persistence stays with the composer that owns this list. */
2
+ export interface ChecklistDraft {
3
+ id: string;
4
+ label: string;
5
+ }
6
+ export type CommentPriority = "low" | "medium" | "high" | "urgent";
7
+ export interface CommentUser {
8
+ id: string;
9
+ name: string;
10
+ email?: string;
11
+ avatarUrl?: string;
12
+ }
13
+ interface DescriptionFieldProps {
14
+ description: string;
15
+ onChange: (description: string) => void;
16
+ }
17
+ export declare function ComposerDescriptionField({ description, onChange }: DescriptionFieldProps): import("react/jsx-runtime").JSX.Element;
18
+ interface ChecklistFieldProps {
19
+ checklist: ChecklistDraft[];
20
+ onAdd: (label: string) => void;
21
+ onRemove: (id: string) => void;
22
+ }
23
+ export declare function ComposerChecklistField({ checklist, onAdd: _onAdd, onRemove: _onRemove, }: ChecklistFieldProps): import("react/jsx-runtime").JSX.Element;
24
+ interface PriorityFieldProps {
25
+ priority: CommentPriority | null;
26
+ onChange: (priority: CommentPriority | null) => void;
27
+ }
28
+ export declare function ComposerPriorityField({ priority, onChange }: PriorityFieldProps): import("react/jsx-runtime").JSX.Element;
29
+ interface AssigneesFieldProps {
30
+ availableUsers: CommentUser[];
31
+ selectedAssignees: CommentUser[];
32
+ onChange: (users: CommentUser[]) => void;
33
+ }
34
+ export declare function ComposerAssigneesField({ availableUsers: _availableUsers, selectedAssignees, onChange: _onChange, }: AssigneesFieldProps): import("react/jsx-runtime").JSX.Element;
35
+ export {};
@@ -0,0 +1,28 @@
1
+ type Priority = "low" | "medium" | "high" | "urgent";
2
+ interface CommentUser {
3
+ id: string;
4
+ name: string;
5
+ avatarUrl?: string;
6
+ email?: string;
7
+ }
8
+ interface ChecklistDraft {
9
+ id: string;
10
+ label: string;
11
+ }
12
+ export interface ComposerExtrasState {
13
+ showDescription: boolean;
14
+ description: string;
15
+ showChecklist: boolean;
16
+ checklist: ChecklistDraft[];
17
+ showPriority: boolean;
18
+ priority: Priority | null;
19
+ showAssignees: boolean;
20
+ selectedAssignees: CommentUser[];
21
+ }
22
+ interface CommentComposerExtrasToolbarProps {
23
+ state: ComposerExtrasState;
24
+ availableUsers?: CommentUser[];
25
+ onUpdate: (patch: Partial<ComposerExtrasState>) => void;
26
+ }
27
+ export declare function CommentComposerExtrasToolbar({ state, availableUsers, onUpdate, }: CommentComposerExtrasToolbarProps): import("react/jsx-runtime").JSX.Element;
28
+ export {};
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { type ComposerExtrasState } from "./comment-composer-extras-toolbar";
3
+ import { type CommentUser } from "./comment-composer-extras-fields";
4
+ export type { ComposerExtrasState };
5
+ interface CommentComposerExtrasProps {
6
+ state: ComposerExtrasState;
7
+ onChange: (state: ComposerExtrasState) => void;
8
+ availableUsers?: CommentUser[];
9
+ }
10
+ export declare const CommentComposerExtras: React.MemoExoticComponent<({ state, onChange, availableUsers, }: CommentComposerExtrasProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,53 @@
1
+ import * as React from "react";
2
+ import type { CommentImage } from "./comment-images";
3
+ import type { ComposerExtrasState } from "./comment-composer-extras";
4
+ import type { CommentUser } from "./comment-composer-extras-fields";
5
+ export interface UploadItem {
6
+ id: string;
7
+ name: string;
8
+ progress: number;
9
+ status: "uploading" | "complete" | "error";
10
+ error?: string;
11
+ }
12
+ export interface ComposerSubmitPayload {
13
+ body: string;
14
+ description?: string;
15
+ priority?: "low" | "medium" | "high" | "urgent";
16
+ }
17
+ export interface CommentComposerProps {
18
+ mode?: "reply" | "edit" | "new-thread";
19
+ defaultValue?: string;
20
+ images?: CommentImage[];
21
+ /** Team members for @mentions. Assignee saving stays disabled in extras. */
22
+ availableUsers?: CommentUser[];
23
+ highlightedText?: string;
24
+ uploads?: UploadItem[];
25
+ onCancelUpload?: (id: string) => void;
26
+ onRetryUpload?: (id: string) => void;
27
+ onSubmit?: (value: string, payload?: ComposerSubmitPayload) => void | Promise<void>;
28
+ onCancel?: () => void;
29
+ placeholder?: string;
30
+ disabled?: boolean;
31
+ }
32
+ export declare function extractUrls(text: string): string[];
33
+ /** Heuristic: detect pasted text that looks like a code snippet. */
34
+ export declare function looksLikeCode(text: string): boolean;
35
+ export declare function useCommentComposer({ mode, defaultValue, availableUsers, onSubmit, disabled, }: Pick<CommentComposerProps, "mode" | "defaultValue" | "availableUsers" | "onSubmit" | "disabled">): {
36
+ value: string;
37
+ extras: ComposerExtrasState;
38
+ setExtras: React.Dispatch<React.SetStateAction<ComposerExtrasState>>;
39
+ textareaRef: React.RefObject<HTMLTextAreaElement | null>;
40
+ mentionQuery: string | null;
41
+ isSubmitting: boolean;
42
+ hasContent: boolean;
43
+ showExtras: boolean;
44
+ filteredMentions: CommentUser[];
45
+ replyUrls: string[];
46
+ resolvedUsers: CommentUser[];
47
+ handleSubmit: () => Promise<void>;
48
+ handleFormatInsert: (prefix: string, suffix: string) => void;
49
+ insertMention: (user: CommentUser) => void;
50
+ handleKeyDown: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;
51
+ handlePaste: (event: React.ClipboardEvent<HTMLTextAreaElement>) => void;
52
+ handleValueChange: (next: string, selectionStart: number) => void;
53
+ };
@@ -0,0 +1,30 @@
1
+ interface AttachedFile {
2
+ id: string;
3
+ name: string;
4
+ type: string;
5
+ size: number;
6
+ previewUrl?: string;
7
+ }
8
+ interface UploadItem {
9
+ id: string;
10
+ name: string;
11
+ progress: number;
12
+ status: "uploading" | "complete" | "error";
13
+ error?: string;
14
+ }
15
+ export declare function CommentComposerLinkPreviews({ urls }: {
16
+ urls: string[];
17
+ }): import("react/jsx-runtime").JSX.Element | null;
18
+ interface CommentComposerAttachmentsProps {
19
+ attachments: AttachedFile[];
20
+ onOpenLightbox: (file: AttachedFile) => void;
21
+ onRemove: (index: number) => void;
22
+ }
23
+ export declare function CommentComposerAttachments({ attachments, onOpenLightbox, onRemove, }: CommentComposerAttachmentsProps): import("react/jsx-runtime").JSX.Element | null;
24
+ interface CommentComposerUploadsProps {
25
+ uploads: UploadItem[];
26
+ onCancelUpload?: (id: string) => void;
27
+ onRetryUpload?: (id: string) => void;
28
+ }
29
+ export declare function CommentComposerUploads({ uploads, onCancelUpload, onRetryUpload, }: CommentComposerUploadsProps): import("react/jsx-runtime").JSX.Element | null;
30
+ export {};
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import type { CommentComposerProps, ComposerSubmitPayload, UploadItem } from "./comment-composer-hook";
3
+ export type { UploadItem, ComposerSubmitPayload, CommentComposerProps };
4
+ export declare const CommentComposer: React.MemoExoticComponent<({ mode, defaultValue, images, availableUsers, highlightedText, uploads, onCancelUpload, onRetryUpload, onSubmit, onCancel, placeholder, disabled, }: CommentComposerProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,7 @@
1
+ interface CommentConnectionAlertProps {
2
+ onRetry: () => void;
3
+ isRetrying: boolean;
4
+ }
5
+ declare function CommentConnectionAlert({ onRetry, isRetrying }: CommentConnectionAlertProps): import("react/jsx-runtime").JSX.Element;
6
+ export { CommentConnectionAlert };
7
+ export type { CommentConnectionAlertProps };
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import type { ToolType } from "../../core/types";
3
+ interface CommentCustomCursorProps {
4
+ /** Package tool. "comment" is the pin. "select" and null keep the native cursor. */
5
+ mode?: ToolType;
6
+ /** Container whose bounds constrain the cursor. Falls back to the window. */
7
+ containerRef?: React.RefObject<HTMLElement | null>;
8
+ }
9
+ /**
10
+ * Comment mode: tear-pin with a plus (sharp top-left is the hotspot).
11
+ * Draw, highlight, and screenshot: bare icon. Select and null render nothing.
12
+ */
13
+ export declare const CommentCustomCursor: React.MemoExoticComponent<({ mode, containerRef, }: CommentCustomCursorProps) => import("react/jsx-runtime").JSX.Element | null>;
14
+ export {};
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ interface CommentEmojiPickerProps {
3
+ onSelect: (emoji: string) => void;
4
+ /** When true, plus icon is only visible on hover (avoids clutter in action rows). */
5
+ plusOnHoverOnly?: boolean;
6
+ /** Button variant for the trigger. */
7
+ variant?: "ghost" | "outline";
8
+ /** Trigger button size. */
9
+ triggerSize?: "icon-xs" | "icon-sm";
10
+ }
11
+ export declare const CommentEmojiPicker: React.MemoExoticComponent<({ onSelect, plusOnHoverOnly, variant, triggerSize, }: CommentEmojiPickerProps) => import("react/jsx-runtime").JSX.Element>;
12
+ export {};
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ interface CommentErrorBannerProps {
3
+ error: string | null;
4
+ onDismiss?: (() => void) | undefined;
5
+ }
6
+ declare const CommentErrorBanner: React.MemoExoticComponent<({ error, onDismiss, }: CommentErrorBannerProps) => import("react/jsx-runtime").JSX.Element | null>;
7
+ export { CommentErrorBanner };
8
+ export type { CommentErrorBannerProps };
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ interface CommentFormatToolbarProps {
3
+ onInsert?: (prefix: string, suffix: string) => void;
4
+ }
5
+ export declare const CommentFormatToolbar: React.MemoExoticComponent<({ onInsert, }: CommentFormatToolbarProps) => import("react/jsx-runtime").JSX.Element>;
6
+ export {};
@@ -0,0 +1,41 @@
1
+ import * as React from "react";
2
+ import type { Comment, TaskStatus } from "../../core/types";
3
+ import type { CommentViewUser } from "../comments/view-model";
4
+ type CommentKind = Comment["type"];
5
+ type CommentPriority = Comment["priority"];
6
+ interface DeviceInfo {
7
+ browser: string;
8
+ os: string;
9
+ windowSize: string;
10
+ devicePixelRatio: number;
11
+ deployment?: string;
12
+ type: "desktop" | "mobile";
13
+ }
14
+ interface CommentHeaderProps {
15
+ author: CommentViewUser;
16
+ timestamp: string;
17
+ createdAt?: string;
18
+ showAvatar?: boolean;
19
+ type?: CommentKind;
20
+ /** "badge" shows type as Badge with label; "icon" shows icon-only (for compact list). */
21
+ typeDisplay?: "badge" | "icon";
22
+ deviceInfo?: DeviceInfo;
23
+ priority?: CommentPriority;
24
+ threadStatus?: TaskStatus;
25
+ isResolved?: boolean;
26
+ /** Dim the header row (for resolved/complete items). */
27
+ dimmed?: boolean;
28
+ /** "list" hides three-dot menu; "detail" shows full menu. */
29
+ context?: "list" | "detail" | "reply";
30
+ /** Accepted for API compatibility. Reaction persistence is deferred. */
31
+ onReact?: (emoji: string) => void;
32
+ onCopyUrl?: () => void;
33
+ onResolve?: () => void;
34
+ onCopyMarkdown?: () => void;
35
+ onEdit?: () => void;
36
+ onDelete?: () => void;
37
+ onLocate?: () => void;
38
+ className?: string;
39
+ }
40
+ export declare const CommentHeader: React.MemoExoticComponent<({ author, timestamp, createdAt, showAvatar, type, typeDisplay, deviceInfo, priority, threadStatus, isResolved, dimmed, context, onReact, onCopyUrl, onResolve, onCopyMarkdown, onEdit, onDelete, onLocate, className, }: CommentHeaderProps) => import("react/jsx-runtime").JSX.Element>;
41
+ export {};
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ export interface CommentImage {
3
+ id: string;
4
+ url: string;
5
+ alt?: string;
6
+ type?: "screenshot" | "file" | "drawing";
7
+ filename?: string;
8
+ size?: number;
9
+ thumbnail?: string;
10
+ }
11
+ interface CommentImageLightboxProps {
12
+ images: CommentImage[];
13
+ initialIndex: number;
14
+ open: boolean;
15
+ onClose: () => void;
16
+ }
17
+ export declare const CommentImageLightbox: React.MemoExoticComponent<({ images, initialIndex, open, onClose, }: CommentImageLightboxProps) => import("react/jsx-runtime").JSX.Element>;
18
+ export {};
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ export interface CommentImage {
3
+ id: string;
4
+ url: string;
5
+ alt?: string;
6
+ type?: "screenshot" | "file" | "drawing";
7
+ filename?: string;
8
+ size?: number;
9
+ thumbnail?: string;
10
+ }
11
+ interface CommentImagesProps {
12
+ images: CommentImage[];
13
+ }
14
+ export declare const CommentImages: React.MemoExoticComponent<({ images }: CommentImagesProps) => import("react/jsx-runtime").JSX.Element | null>;
15
+ export {};
@@ -0,0 +1,25 @@
1
+ import * as React from "react";
2
+ import type { CommentView } from "../comments/view-model";
3
+ type ItemContext = "list" | "detail" | "reply";
4
+ interface CommentItemProps {
5
+ readonly comment: CommentView;
6
+ readonly variant?: "full" | "compact";
7
+ readonly context?: ItemContext;
8
+ readonly showAvatar?: boolean;
9
+ readonly isEditing?: boolean;
10
+ readonly isResolved?: boolean;
11
+ readonly priority?: CommentView["priority"];
12
+ readonly threadStatus?: CommentView["status"];
13
+ readonly hideImages?: boolean;
14
+ readonly onStartEdit?: () => void;
15
+ readonly onCancelEdit?: () => void;
16
+ readonly onSaveEdit?: (id: string, body: string) => void | Promise<void>;
17
+ readonly onDelete?: () => void;
18
+ readonly onResolve?: () => void;
19
+ readonly onCopyUrl?: () => void;
20
+ readonly onCopyMarkdown?: () => void;
21
+ readonly onLocate?: () => void;
22
+ readonly onReact?: (emoji: string) => void;
23
+ }
24
+ export declare const CommentItem: React.MemoExoticComponent<({ comment, variant, context, showAvatar, isEditing, isResolved, priority, threadStatus, hideImages, onStartEdit, onCancelEdit, onSaveEdit, onDelete, onResolve, onCopyUrl, onCopyMarkdown, onLocate, onReact, }: CommentItemProps) => import("react/jsx-runtime").JSX.Element>;
25
+ export {};
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import type { OtpStep } from "../../core/types";
3
+ interface CommentLoginModalProps {
4
+ open: boolean;
5
+ otpStep: OtpStep;
6
+ email: string;
7
+ error: string | null;
8
+ loading: boolean;
9
+ onEmailChange: (email: string) => void;
10
+ /** Parent rejects when the code cannot be sent. */
11
+ onRequestOtp: (email: string) => Promise<void>;
12
+ /** Parent rejects when the code is invalid. Must not close the modal. */
13
+ onVerifyOtp: (otp: string) => Promise<void>;
14
+ onResend: () => Promise<void>;
15
+ onBack: () => void;
16
+ onClose: () => void;
17
+ }
18
+ declare const CommentLoginModal: React.MemoExoticComponent<({ open, otpStep, email, error, loading, onEmailChange, onRequestOtp, onVerifyOtp, onResend, onBack, onClose, }: CommentLoginModalProps) => import("react/jsx-runtime").JSX.Element>;
19
+ export { CommentLoginModal };
20
+ export type { CommentLoginModalProps };
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ import { type ComposerSubmitPayload } from "./comment-composer";
3
+ import type { CommentUser } from "./comment-composer-extras-fields";
4
+ export interface MarkerComposerUser {
5
+ id: string;
6
+ name: string;
7
+ avatarUrl?: string;
8
+ }
9
+ interface NewMarkerComposerProps {
10
+ newMarker: {
11
+ x: number;
12
+ y: number;
13
+ flipSide: boolean;
14
+ };
15
+ dismissing: boolean;
16
+ user: MarkerComposerUser;
17
+ availableUsers?: CommentUser[];
18
+ onSubmit: (body: string, payload?: ComposerSubmitPayload) => void | Promise<void>;
19
+ }
20
+ export declare const NewMarkerComposer: React.NamedExoticComponent<NewMarkerComposerProps & React.RefAttributes<HTMLDivElement>>;
21
+ export {};
@@ -0,0 +1,26 @@
1
+ import * as React from "react";
2
+ import type { ThreadView } from "../comments/view-model";
3
+ export interface MarkerPlaceInput {
4
+ body: string;
5
+ description?: string;
6
+ priority?: "low" | "medium" | "high" | "urgent";
7
+ clientX: number;
8
+ clientY: number;
9
+ target: Element | null;
10
+ }
11
+ export interface CommentMarkerUser {
12
+ id: string;
13
+ name: string;
14
+ avatarUrl?: string;
15
+ }
16
+ export interface CommentMarkerLayerProps {
17
+ threads: ThreadView[];
18
+ placing: boolean;
19
+ user?: CommentMarkerUser | null;
20
+ onPlace: (input: MarkerPlaceInput) => Promise<void>;
21
+ onViewThread: (id: string) => void;
22
+ onResolve: (id: string) => void;
23
+ onReopen: (id: string) => void;
24
+ onReply: (threadId: string, body: string) => Promise<void>;
25
+ }
26
+ export declare const CommentMarkerLayer: React.MemoExoticComponent<({ threads, placing, user, onPlace, onViewThread, onResolve, onReopen, onReply, }: CommentMarkerLayerProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,12 @@
1
+ import type { ThreadView } from "../comments/view-model";
2
+ export interface CommentMarkerPopoverContentProps {
3
+ thread: ThreadView;
4
+ popoverLoading: boolean;
5
+ quotedText?: string;
6
+ onResolve: (id: string) => void;
7
+ onReopen: (id: string) => void;
8
+ onReply: (threadId: string, body: string) => Promise<void>;
9
+ onViewThread: (id: string) => void;
10
+ onClose: () => void;
11
+ }
12
+ export declare function CommentMarkerPopoverContent({ thread, popoverLoading, quotedText, onResolve, onReopen, onReply, onViewThread, onClose, }: CommentMarkerPopoverContentProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import type { ThreadView } from "../comments/view-model";
3
+ export interface CommentMarkerProps {
4
+ thread: ThreadView;
5
+ index: number;
6
+ isActive: boolean;
7
+ onOpen: (id: string) => void;
8
+ onClose: () => void;
9
+ onViewThread: (id: string) => void;
10
+ onResolve: (id: string) => void;
11
+ onReopen: (id: string) => void;
12
+ onReply: (threadId: string, body: string) => Promise<void>;
13
+ }
14
+ export declare const CommentMarker: React.MemoExoticComponent<({ thread, index, isActive, onOpen, onClose, onViewThread, onResolve, onReopen, onReply, }: CommentMarkerProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ interface CommentPageRefProps {
3
+ title: string;
4
+ path: string;
5
+ url?: string;
6
+ className?: string;
7
+ }
8
+ export declare const CommentPageRef: React.MemoExoticComponent<({ title, path, url, className, }: CommentPageRefProps) => import("react/jsx-runtime").JSX.Element>;
9
+ export {};
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import type { ThreadView } from "../comments/view-model";
3
+ export interface CommentPanelProps {
4
+ readonly view: "list" | "detail";
5
+ readonly threads: ThreadView[];
6
+ readonly activeThread: ThreadView | null;
7
+ readonly dockSide?: "left" | "right";
8
+ readonly onSelectThread: (id: string) => void;
9
+ readonly onBack: () => void;
10
+ readonly onClose: () => void;
11
+ readonly onReply: (body: string) => Promise<void>;
12
+ readonly onResolve: () => void;
13
+ readonly onReopen: () => void;
14
+ readonly onSaveEdit?: (id: string, body: string) => Promise<void>;
15
+ readonly onLogout?: () => void;
16
+ }
17
+ export declare const CommentPanel: React.MemoExoticComponent<({ view, threads, activeThread, dockSide, onSelectThread, onBack, onClose, onReply, onResolve, onReopen, onSaveEdit, onLogout, }: CommentPanelProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ interface CommentQuotedTextProps {
3
+ text: string;
4
+ /** "truncate" = single line, "clamp" = up to 2 lines (default "clamp"). */
5
+ overflow?: "truncate" | "clamp";
6
+ className?: string;
7
+ }
8
+ export declare const CommentQuotedText: React.MemoExoticComponent<({ text, overflow, className, }: CommentQuotedTextProps) => import("react/jsx-runtime").JSX.Element>;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import type { CommentReaction } from "../../core/types";
3
+ interface CommentReactionsProps {
4
+ reactions?: CommentReaction[];
5
+ /** Accepted for API compatibility. Reaction persistence is deferred. */
6
+ onAddReaction?: (emoji: string) => void;
7
+ /** Accepted for API compatibility. Reaction persistence is deferred. */
8
+ onToggleReaction?: (emoji: string) => void;
9
+ }
10
+ export declare const CommentReactions: React.MemoExoticComponent<({ reactions, onAddReaction: _onAddReaction, onToggleReaction: _onToggleReaction, }: CommentReactionsProps) => import("react/jsx-runtime").JSX.Element>;
11
+ export {};
@@ -0,0 +1,16 @@
1
+ export type CommentMarkerType = "pin" | "highlight" | "drawing";
2
+ export type CommentPriority = "low" | "medium" | "high" | "urgent";
3
+ export type CommentTaskStatus = "open" | "resolved" | "complete";
4
+ export interface CommentThreadDetailSource {
5
+ parent: {
6
+ type?: CommentMarkerType;
7
+ };
8
+ priority?: CommentPriority;
9
+ status?: CommentTaskStatus;
10
+ }
11
+ interface CommentThreadDetailBadgesProps {
12
+ readonly thread: CommentThreadDetailSource;
13
+ readonly isResolved: boolean;
14
+ }
15
+ export declare function CommentThreadDetailBadges({ thread, isResolved }: CommentThreadDetailBadgesProps): import("react/jsx-runtime").JSX.Element | null;
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { ThreadView } from "../comments/view-model";
2
+ interface CommentThreadDetailMetaProps {
3
+ readonly thread: ThreadView;
4
+ readonly description?: string;
5
+ readonly onMarkComplete?: () => void;
6
+ }
7
+ export declare function CommentThreadDetailMeta({ thread, description, onMarkComplete, }: CommentThreadDetailMetaProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { ThreadView } from "../comments/view-model";
2
+ interface CommentThreadDetailRepliesProps {
3
+ readonly thread: ThreadView;
4
+ readonly animateLastReply: boolean;
5
+ readonly editingCommentId?: string | null;
6
+ readonly onStartEdit?: (id: string) => void;
7
+ readonly onCancelEdit?: () => void;
8
+ readonly onSaveEdit?: (id: string, body: string) => void | Promise<void>;
9
+ readonly onReact?: (id: string, emoji: string) => void;
10
+ readonly onScrollToTop: () => void;
11
+ }
12
+ export declare function CommentThreadDetailReplies({ thread, animateLastReply, editingCommentId, onStartEdit, onCancelEdit, onSaveEdit, onReact, onScrollToTop, }: CommentThreadDetailRepliesProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};