@commentkit/comment-kit 0.6.5 → 0.6.7

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 (158) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/angular/comment-kit-ui-ClsgTVKj.js +24898 -0
  3. package/dist/angular/mount-ui-EPLnH0YJ.js +72 -0
  4. package/dist/{preact/shadow-root-DAhpHo_W.js → angular/shadow-root-yMOaW9pk.js} +48 -41
  5. package/dist/angular/styles-CMz7-p8x.js +2 -0
  6. package/dist/angular/{ShadowRootContext-2BrAO1qU.js → widget-theme-CYPYAwhR.js} +18 -1
  7. package/dist/angular.es.js +3 -3
  8. package/dist/comment-kit.css +2 -0
  9. package/dist/comment-kit.es.js +3 -3
  10. package/dist/core/comment-kit-ui-BTYGcSK-.js +24898 -0
  11. package/dist/core/mount-ui-B6jipL2Z.js +72 -0
  12. package/dist/core/{shadow-root-09zwHxly.js → shadow-root-DAtdjHG2.js} +48 -41
  13. package/dist/core/styles-ClRoB6ro.js +2 -0
  14. package/dist/core/{ShadowRootContext--ArKkwbH.js → widget-theme-BWDYr7VR.js} +18 -1
  15. package/dist/preact/comment-kit-ui-nhY36fa4.js +24898 -0
  16. package/dist/preact/mount-ui-Dri-RQe3.js +72 -0
  17. package/dist/{qwik/shadow-root-tLjXys-_.js → preact/shadow-root-D-NcwruG.js} +48 -41
  18. package/dist/preact/styles-D6i7be5-.js +2 -0
  19. package/dist/preact/{ShadowRootContext-CJWLIRy4.js → widget-theme-B7Z2pbaA.js} +18 -1
  20. package/dist/preact.es.js +3 -3
  21. package/dist/qwik/comment-kit-ui-B2oSKreb.js +24898 -0
  22. package/dist/qwik/mount-ui-DkvDtcft.js +72 -0
  23. package/dist/{angular/shadow-root-C7wgghDv.js → qwik/shadow-root-PkjcnvPe.js} +48 -41
  24. package/dist/qwik/styles-DmEmq5Lh.js +2 -0
  25. package/dist/qwik/{ShadowRootContext-CTbULRKq.js → widget-theme-lbPF3I0A.js} +18 -1
  26. package/dist/qwik.es.js +3 -3
  27. package/dist/react.es.js +18649 -11656
  28. package/dist/solid/comment-kit-ui-B7GeN0T8.js +24898 -0
  29. package/dist/solid/mount-ui-CTFITRP7.js +72 -0
  30. package/dist/solid/shadow-root-CssU3bQb.js +93 -0
  31. package/dist/solid/styles-DbueS9xx.js +2 -0
  32. package/dist/solid/widget-theme-B4DJ14fI.js +24 -0
  33. package/dist/solid.es.js +3 -3
  34. package/dist/svelte/comment-kit-ui-CKmdu0gr.js +24898 -0
  35. package/dist/svelte/mount-ui-N1vul-tl.js +72 -0
  36. package/dist/svelte/shadow-root-DG8inbf6.js +93 -0
  37. package/dist/svelte/styles-BK_MaUpD.js +2 -0
  38. package/dist/svelte/widget-theme-CkfJNysI.js +24 -0
  39. package/dist/svelte.es.js +3 -3
  40. package/dist/types/react/comments/outcomes.d.ts +7 -1
  41. package/dist/types/react/comments/view-model.d.ts +8 -1
  42. package/dist/types/react/components/annotation-toolbar.d.ts +36 -0
  43. package/dist/types/react/components/build-panel-shared-props.d.ts +25 -0
  44. package/dist/types/react/components/comment-actions.d.ts +1 -2
  45. package/dist/types/react/components/comment-body.d.ts +1 -1
  46. package/dist/types/react/components/comment-branch-filter.d.ts +15 -0
  47. package/dist/types/react/components/comment-composer-extras-fields.d.ts +4 -7
  48. package/dist/types/react/components/comment-composer-extras-toolbar.d.ts +3 -22
  49. package/dist/types/react/components/comment-composer-extras.d.ts +1 -1
  50. package/dist/types/react/components/comment-composer-extras.state.d.ts +24 -0
  51. package/dist/types/react/components/comment-composer-hook.d.ts +1 -53
  52. package/dist/types/react/components/comment-composer-media.d.ts +1 -14
  53. package/dist/types/react/components/comment-composer.d.ts +1 -1
  54. package/dist/types/react/components/comment-composer.types.d.ts +41 -0
  55. package/dist/types/react/components/comment-composer.utils.d.ts +3 -0
  56. package/dist/types/react/components/comment-cursor-layer.d.ts +14 -0
  57. package/dist/types/react/components/comment-drawing-canvas.d.ts +10 -0
  58. package/dist/types/react/components/comment-extension-banner.d.ts +8 -0
  59. package/dist/types/react/components/comment-fab-tools.d.ts +37 -0
  60. package/dist/types/react/components/comment-filter-assignee.d.ts +9 -0
  61. package/dist/types/react/components/comment-filter-bar.d.ts +27 -0
  62. package/dist/types/react/components/comment-filter-popover.d.ts +20 -0
  63. package/dist/types/react/components/comment-format-toolbar.constants.d.ts +34 -0
  64. package/dist/types/react/components/comment-header.d.ts +1 -8
  65. package/dist/types/react/components/comment-highlight-layer.d.ts +11 -0
  66. package/dist/types/react/components/comment-highlight-marker.d.ts +9 -0
  67. package/dist/types/react/components/comment-image-lightbox.d.ts +1 -9
  68. package/dist/types/react/components/comment-images.d.ts +2 -10
  69. package/dist/types/react/components/comment-item.d.ts +2 -1
  70. package/dist/types/react/components/comment-keyboard-shortcuts.d.ts +7 -0
  71. package/dist/types/react/components/comment-kit-overlays.d.ts +15 -0
  72. package/dist/types/react/components/comment-kit.d.ts +12 -0
  73. package/dist/types/react/components/comment-list-filters.d.ts +14 -0
  74. package/dist/types/react/components/comment-marker-layer.d.ts +2 -1
  75. package/dist/types/react/components/comment-marker.d.ts +2 -1
  76. package/dist/types/react/components/comment-member-list.d.ts +10 -0
  77. package/dist/types/react/components/comment-mode-bar.d.ts +15 -0
  78. package/dist/types/react/components/comment-online-users.d.ts +8 -0
  79. package/dist/types/react/components/comment-panel-header.d.ts +22 -0
  80. package/dist/types/react/components/comment-panel-mobile.d.ts +9 -0
  81. package/dist/types/react/components/comment-panel-utils.d.ts +6 -0
  82. package/dist/types/react/components/comment-panel-view-body.d.ts +23 -0
  83. package/dist/types/react/components/comment-panel.d.ts +22 -2
  84. package/dist/types/react/components/comment-remote-cursor.d.ts +11 -0
  85. package/dist/types/react/components/comment-screenshot-annotator.d.ts +11 -0
  86. package/dist/types/react/components/comment-screenshot-overlay.d.ts +10 -0
  87. package/dist/types/react/components/comment-search-bar.d.ts +7 -0
  88. package/dist/types/react/components/comment-settings-view.d.ts +20 -0
  89. package/dist/types/react/components/comment-skeletons.d.ts +9 -0
  90. package/dist/types/react/components/comment-thread-detail-meta.d.ts +2 -1
  91. package/dist/types/react/components/comment-thread-detail.d.ts +4 -1
  92. package/dist/types/react/components/comment-thread-list-item.d.ts +2 -1
  93. package/dist/types/react/components/comment-thread-list.d.ts +9 -1
  94. package/dist/types/react/components/comment-users-context.d.ts +15 -0
  95. package/dist/types/react/components/comment-utils.d.ts +20 -0
  96. package/dist/types/react/components/comment.d.ts +26 -0
  97. package/dist/types/react/components/constants.d.ts +50 -0
  98. package/dist/types/react/components/drawing-path-renderer.d.ts +10 -0
  99. package/dist/types/react/components/ui.d.ts +44 -0
  100. package/dist/types/react/components/use-comment-composer.d.ts +28 -0
  101. package/dist/types/react/hooks/use-comment-fab-drag.d.ts +21 -0
  102. package/dist/types/react/hooks/use-comment-hash-link.d.ts +20 -0
  103. package/dist/types/react/hooks/use-comment-kit-filters.d.ts +19 -0
  104. package/dist/types/react/hooks/use-comment-kit-keyboard.d.ts +11 -0
  105. package/dist/types/react/hooks/use-comment-kit-prop-sync.d.ts +12 -0
  106. package/dist/types/react/hooks/use-comment-marker-drag.d.ts +23 -0
  107. package/dist/types/react/hooks/use-comment-panel-navigation.d.ts +21 -0
  108. package/dist/types/react/hooks/use-comment-realtime.d.ts +6 -0
  109. package/dist/types/react/hooks/use-comment-thread-actions.d.ts +15 -0
  110. package/dist/types/react/hooks/use-connection-retry.d.ts +9 -0
  111. package/dist/types/react/hooks/use-drawing.d.ts +32 -0
  112. package/dist/types/react/hooks/use-extension-conflicts.d.ts +13 -0
  113. package/dist/types/react/hooks/use-filtered-threads.d.ts +7 -0
  114. package/dist/types/react/hooks/use-marker-layer.d.ts +19 -0
  115. package/dist/types/react/hooks/use-screenshot.d.ts +18 -0
  116. package/dist/types/react/hooks/use-text-selection.d.ts +17 -0
  117. package/dist/types/react/hooks/use-websocket.d.ts +9 -0
  118. package/dist/types/react/ui/lib/widget-theme.d.ts +7 -0
  119. package/dist/types/react/ui/primitives/breadcrumb/breadcrumb.d.ts +10 -0
  120. package/dist/types/react/ui/primitives/breadcrumb/index.d.ts +1 -0
  121. package/dist/types/react/ui/primitives/button-group/button-group.d.ts +9 -0
  122. package/dist/types/react/ui/primitives/button-group/index.d.ts +1 -0
  123. package/dist/types/react/ui/primitives/input-otp/index.d.ts +1 -0
  124. package/dist/types/react/ui/primitives/input-otp/input-otp.d.ts +11 -0
  125. package/dist/vue/comment-kit-ui-MfED5JLH.js +24898 -0
  126. package/dist/vue/mount-ui-C85XBX4V.js +72 -0
  127. package/dist/vue/shadow-root-zwd_wUIP.js +93 -0
  128. package/dist/vue/styles-B0NAkbKu.js +2 -0
  129. package/dist/vue/widget-theme-D7Vkagk7.js +24 -0
  130. package/dist/vue.es.js +3 -3
  131. package/package.json +2 -1
  132. package/dist/angular/comment-kit-ui-D8YIOzCe.js +0 -17929
  133. package/dist/angular/mount-ui-hhCRg_hE.js +0 -55
  134. package/dist/angular/styles-CmEq782M.js +0 -2
  135. package/dist/core/comment-kit-ui-CYYImlEM.js +0 -17929
  136. package/dist/core/mount-ui-_GMxCfLy.js +0 -55
  137. package/dist/core/styles-Dzn_nEz7.js +0 -2
  138. package/dist/preact/comment-kit-ui-fCVNh5Gq.js +0 -17929
  139. package/dist/preact/mount-ui-HWdd5qAJ.js +0 -55
  140. package/dist/preact/styles-ECCK6Z_C.js +0 -2
  141. package/dist/qwik/comment-kit-ui-BVoctltC.js +0 -17929
  142. package/dist/qwik/mount-ui-KC4IJqjG.js +0 -55
  143. package/dist/qwik/styles-CMcDFAyE.js +0 -2
  144. package/dist/solid/ShadowRootContext-BS6MCclL.js +0 -7
  145. package/dist/solid/comment-kit-ui-CnlHcwzZ.js +0 -17929
  146. package/dist/solid/mount-ui-C1voqvrE.js +0 -55
  147. package/dist/solid/shadow-root-D5nErAFI.js +0 -86
  148. package/dist/solid/styles-Be_8-1ZV.js +0 -2
  149. package/dist/svelte/ShadowRootContext-DhByMr-q.js +0 -7
  150. package/dist/svelte/comment-kit-ui-BFWous-b.js +0 -17929
  151. package/dist/svelte/mount-ui-dOE2KN0m.js +0 -55
  152. package/dist/svelte/shadow-root-Cz-v-rYe.js +0 -86
  153. package/dist/svelte/styles-B863Tn5m.js +0 -2
  154. package/dist/vue/ShadowRootContext-BQTcHNil.js +0 -7
  155. package/dist/vue/comment-kit-ui-oPTLTwxG.js +0 -17929
  156. package/dist/vue/mount-ui-CszzjVeF.js +0 -55
  157. package/dist/vue/shadow-root-SLTVf5yk.js +0 -86
  158. package/dist/vue/styles-C4t8gcea.js +0 -2
@@ -1,4 +1,4 @@
1
- import type { Attachment, Comment, CommentKitState, Reply, TaskStatus, User } from "../../core/types";
1
+ import type { Attachment, Comment, CommentKitState, CommentReaction, DrawingData, Reply, TaskChecklistItem, TaskStatus, User } from "../../core/types";
2
2
  export interface CommentViewUser {
3
3
  id: string;
4
4
  name: string;
@@ -26,6 +26,10 @@ export interface CommentView {
26
26
  priority: Comment["priority"];
27
27
  isResolved: boolean;
28
28
  type: Comment["type"];
29
+ isEdited?: boolean;
30
+ reactions?: CommentReaction[];
31
+ /** Highlighted passage. Present only for highlight threads. */
32
+ quotedText?: string;
29
33
  }
30
34
  export interface ThreadView {
31
35
  id: string;
@@ -48,6 +52,9 @@ export interface ThreadView {
48
52
  assignees: CommentViewUser[];
49
53
  checklistDone: number;
50
54
  checklistTotal: number;
55
+ description?: string;
56
+ checklist?: TaskChecklistItem[];
57
+ drawingData?: DrawingData;
51
58
  }
52
59
  export declare function formatCommentTimestamp(iso: string, now?: number): string;
53
60
  export declare function toViewUser(user: Pick<User, "id" | "name" | "email" | "avatar">): CommentViewUser;
@@ -0,0 +1,36 @@
1
+ import * as React from "react";
2
+ declare const DRAWING_TOOLS: readonly ["pen", "line", "rect", "circle", "arrow"];
3
+ export type DrawingTool = (typeof DRAWING_TOOLS)[number];
4
+ interface AnnotationToolbarProps {
5
+ /** Which drawing tools to show. Defaults to all. */
6
+ tools?: DrawingTool[];
7
+ /** Color palette to display. */
8
+ colors: readonly {
9
+ value: string;
10
+ label: string;
11
+ }[];
12
+ /** Current drawing state. The drawing canvas owns undo and redo. */
13
+ drawing: {
14
+ tool: DrawingTool;
15
+ color: string;
16
+ strokeWidth: number;
17
+ canUndo: boolean;
18
+ canRedo: boolean;
19
+ paths: {
20
+ id: string;
21
+ }[];
22
+ setTool: (tool: DrawingTool) => void;
23
+ setColor: (color: string) => void;
24
+ setStrokeWidth: (width: number) => void;
25
+ undo: () => void;
26
+ redo: () => void;
27
+ clear: () => void;
28
+ };
29
+ /** Show the save button and call this on click. Omit to hide save. */
30
+ onSave?: () => void;
31
+ /** Whether save is disabled (for example, no paths drawn). */
32
+ saveDisabled?: boolean;
33
+ onCancel: () => void;
34
+ }
35
+ export declare const AnnotationToolbar: React.MemoExoticComponent<({ tools, colors, drawing, onSave, saveDisabled, onCancel, }: AnnotationToolbarProps) => import("react/jsx-runtime").JSX.Element>;
36
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { ReactNode } from "react";
2
+ import type { CommentKitCore } from "../../core/comment-kit-core";
3
+ import type { CommentKitState } from "../../core/types";
4
+ import type { ThreadView } from "../comments/view-model";
5
+ import type { CommentPanelProps } from "./comment-panel";
6
+ /** Props shared by the docked panel and the mobile sheet. Presentation is chosen by the caller. */
7
+ export type CommentPanelSharedProps = Omit<CommentPanelProps, "presentation">;
8
+ interface BuildPanelSharedPropsInput {
9
+ core: CommentKitCore;
10
+ state: CommentKitState;
11
+ view: CommentPanelProps["view"];
12
+ threads: ThreadView[];
13
+ activeThread: ThreadView | null;
14
+ onlineUsers: CommentPanelProps["onlineUsers"];
15
+ settings: ReactNode;
16
+ onCopyUrl: (threadId: string) => void;
17
+ onLocate: (threadId: string) => void;
18
+ }
19
+ /**
20
+ * One prop object for both panel presentations. Thread actions are wired
21
+ * from the open thread, the same way the reference builder attaches the
22
+ * checklist handler only while a thread is active.
23
+ */
24
+ export declare function buildPanelSharedProps({ core, state, view, threads, activeThread, onlineUsers, settings, onCopyUrl, onLocate, }: BuildPanelSharedPropsInput): CommentPanelSharedProps;
25
+ export {};
@@ -3,7 +3,6 @@ interface CommentActionsProps {
3
3
  /** "list" = no three-dot menu; "detail" = full menu with edit/delete; "reply" = edit icon only, no menu. */
4
4
  context?: "list" | "detail" | "reply";
5
5
  isResolved?: boolean;
6
- /** Accepted for API compatibility. Reaction persistence is deferred. */
7
6
  onReact?: (emoji: string) => void;
8
7
  onCopyUrl?: () => void;
9
8
  onResolve?: () => void;
@@ -16,5 +15,5 @@ interface CommentActionsProps {
16
15
  /** Locate/scroll to the marker on the page. */
17
16
  onLocate?: () => void;
18
17
  }
19
- export declare const CommentActions: React.MemoExoticComponent<({ context, isResolved, onReact: _onReact, onCopyUrl, onResolve, onCopyMarkdown, onEdit, onDelete, onLocate, }: CommentActionsProps) => import("react/jsx-runtime").JSX.Element>;
18
+ export declare const CommentActions: React.MemoExoticComponent<({ context, isResolved, onReact, onCopyUrl, onResolve, onCopyMarkdown, onEdit, onDelete, onLocate, }: CommentActionsProps) => import("react/jsx-runtime").JSX.Element>;
20
19
  export {};
@@ -4,5 +4,5 @@ interface CommentBodyProps {
4
4
  text: string;
5
5
  users?: CommentViewUser[];
6
6
  }
7
- export declare const CommentBody: React.MemoExoticComponent<({ text, users, }: CommentBodyProps) => import("react/jsx-runtime").JSX.Element>;
7
+ export declare const CommentBody: React.MemoExoticComponent<({ text, users }: CommentBodyProps) => import("react/jsx-runtime").JSX.Element>;
8
8
  export {};
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ export interface BranchItem {
3
+ name: string;
4
+ isDefault?: boolean;
5
+ }
6
+ interface CommentBranchFilterProps {
7
+ branch?: string;
8
+ pagePath?: string;
9
+ pageFilter: "all" | "current";
10
+ projectName?: string;
11
+ branches?: BranchItem[];
12
+ onBranchChange?: (branch: string) => void;
13
+ }
14
+ export declare const CommentBranchFilter: React.MemoExoticComponent<({ branch, pagePath, pageFilter, projectName, branches, onBranchChange, }: CommentBranchFilterProps) => import("react/jsx-runtime").JSX.Element>;
15
+ export {};
@@ -1,9 +1,7 @@
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";
1
+ import type { ChecklistDraft } from "./comment-composer-extras.state";
2
+ import type { Priority } from "./comment";
3
+ export type { ChecklistDraft };
4
+ export type CommentPriority = Priority;
7
5
  export interface CommentUser {
8
6
  id: string;
9
7
  name: string;
@@ -32,4 +30,3 @@ interface AssigneesFieldProps {
32
30
  onChange: (users: CommentUser[]) => void;
33
31
  }
34
32
  export declare function ComposerAssigneesField({ availableUsers: _availableUsers, selectedAssignees, onChange: _onChange, }: AssigneesFieldProps): import("react/jsx-runtime").JSX.Element;
35
- export {};
@@ -1,28 +1,9 @@
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
- }
1
+ import type { ComposerExtrasState } from "./comment-composer-extras.state";
2
+ import type { CommentUser } from "./comment-composer-extras-fields";
3
+ export type { ComposerExtrasState };
22
4
  interface CommentComposerExtrasToolbarProps {
23
5
  state: ComposerExtrasState;
24
6
  availableUsers?: CommentUser[];
25
7
  onUpdate: (patch: Partial<ComposerExtrasState>) => void;
26
8
  }
27
9
  export declare function CommentComposerExtrasToolbar({ state, availableUsers, onUpdate, }: CommentComposerExtrasToolbarProps): import("react/jsx-runtime").JSX.Element;
28
- export {};
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { type ComposerExtrasState } from "./comment-composer-extras-toolbar";
2
+ import type { ComposerExtrasState } from "./comment-composer-extras.state";
3
3
  import { type CommentUser } from "./comment-composer-extras-fields";
4
4
  export type { ComposerExtrasState };
5
5
  interface CommentComposerExtrasProps {
@@ -0,0 +1,24 @@
1
+ interface ComposerAssignee {
2
+ id: string;
3
+ name: string;
4
+ email?: string;
5
+ avatarUrl?: string;
6
+ }
7
+ export interface ChecklistDraft {
8
+ id: string;
9
+ label: string;
10
+ }
11
+ export interface ComposerExtrasState {
12
+ showDescription: boolean;
13
+ description: string;
14
+ showChecklist: boolean;
15
+ checklist: ChecklistDraft[];
16
+ showPriority: boolean;
17
+ priority: "low" | "medium" | "high" | "urgent" | null;
18
+ showAssignees: boolean;
19
+ selectedAssignees: ComposerAssignee[];
20
+ }
21
+ export declare const initialExtrasState: ComposerExtrasState;
22
+ /** Fresh arrays so a reset does not share the constant's checklist or assignees. */
23
+ export declare function createComposerExtrasState(): ComposerExtrasState;
24
+ export {};
@@ -1,53 +1 @@
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
- };
1
+ export { useCommentComposer, type CommentComposerProps, type ComposerSubmitPayload, type UploadItem, } from "./use-comment-composer";
@@ -1,17 +1,4 @@
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
- }
1
+ import type { AttachedFile, UploadItem } from "./comment-composer.types";
15
2
  export declare function CommentComposerLinkPreviews({ urls }: {
16
3
  urls: string[];
17
4
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
- import type { CommentComposerProps, ComposerSubmitPayload, UploadItem } from "./comment-composer-hook";
2
+ import type { CommentComposerProps, ComposerSubmitPayload, UploadItem } from "./comment-composer.types";
3
3
  export type { UploadItem, ComposerSubmitPayload, CommentComposerProps };
4
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,41 @@
1
+ import type { CommentImage } from "./comment";
2
+ import type { CommentUser } from "./comment-composer-extras-fields";
3
+ export interface UploadItem {
4
+ id: string;
5
+ name: string;
6
+ progress: number;
7
+ status: "uploading" | "complete" | "error";
8
+ error?: string;
9
+ }
10
+ export interface AttachedFile {
11
+ id: string;
12
+ name: string;
13
+ type: string;
14
+ size: number;
15
+ previewUrl?: string;
16
+ }
17
+ export interface ComposerSubmitPayload {
18
+ body: string;
19
+ description?: string;
20
+ checklist?: {
21
+ label: string;
22
+ }[];
23
+ priority?: "low" | "medium" | "high" | "urgent";
24
+ assignees?: CommentUser[];
25
+ }
26
+ export interface CommentComposerProps {
27
+ mode?: "reply" | "edit" | "new-thread";
28
+ defaultValue?: string;
29
+ images?: CommentImage[];
30
+ /** Team members for @mentions. Assignee saving stays disabled in extras. */
31
+ availableUsers?: CommentUser[];
32
+ /** Highlighted text shown above the composer. */
33
+ highlightedText?: string;
34
+ uploads?: UploadItem[];
35
+ onCancelUpload?: (id: string) => void;
36
+ onRetryUpload?: (id: string) => void;
37
+ onSubmit?: (value: string, payload?: ComposerSubmitPayload) => void | Promise<void>;
38
+ onCancel?: () => void;
39
+ placeholder?: string;
40
+ disabled?: boolean;
41
+ }
@@ -0,0 +1,3 @@
1
+ export declare function extractUrls(text: string): string[];
2
+ /** Heuristic: detect pasted text that looks like a code snippet. */
3
+ export declare function looksLikeCode(text: string): boolean;
@@ -0,0 +1,14 @@
1
+ import type { CommentKitCore } from "../../core/comment-kit-core";
2
+ import type { RemoteCursorData } from "./ui";
3
+ interface CommentCursorLayerProps {
4
+ cursors: Map<string, RemoteCursorData>;
5
+ onLocalCursorMove?: (x: number, y: number) => void;
6
+ }
7
+ /**
8
+ * Subscribes to the engine's existing cursor events. Positions arrive as
9
+ * percentages because the realtime sender already throttles outbound moves.
10
+ */
11
+ declare function useRemoteCursors(core: CommentKitCore, currentPage: string): Map<string, RemoteCursorData>;
12
+ declare function CommentCursorLayer({ cursors, onLocalCursorMove }: CommentCursorLayerProps): import("react/jsx-runtime").JSX.Element | null;
13
+ export { CommentCursorLayer, useRemoteCursors };
14
+ export type { CommentCursorLayerProps, RemoteCursorData };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import type { DrawingData, DrawingPath } from "../../core/types";
3
+ interface CommentDrawingCanvasProps {
4
+ onSave: (data: DrawingData) => void | Promise<void>;
5
+ onCancel: () => void;
6
+ /** Strokes from other users, already in the engine path shape. */
7
+ remoteStrokes?: DrawingPath[];
8
+ }
9
+ export declare const CommentDrawingCanvas: React.MemoExoticComponent<({ onSave, onCancel, remoteStrokes, }: CommentDrawingCanvasProps) => import("react/jsx-runtime").JSX.Element>;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import type { DetectedExtension } from "../hooks/use-extension-conflicts";
3
+ interface CommentExtensionBannerProps {
4
+ extensions: DetectedExtension[];
5
+ onDismiss: () => void;
6
+ }
7
+ export declare const CommentExtensionBanner: React.MemoExoticComponent<({ extensions, onDismiss, }: CommentExtensionBannerProps) => import("react/jsx-runtime").JSX.Element | null>;
8
+ export {};
@@ -0,0 +1,37 @@
1
+ import { IconMapPin } from "@tabler/icons-react";
2
+ /**
3
+ * Toolbar modes. Pin maps to the engine's comment tool (key C).
4
+ * `altKey` is the physical key the existing Alt listener matches
5
+ * (Option composes characters on macOS, so that listener uses e.code).
6
+ * Tooltips show the engine key, which is what the shortcuts dialog lists.
7
+ */
8
+ export type FabToolMode = "idle" | "pin" | "select" | "highlight" | "drawing" | "screenshot";
9
+ export declare const FAB_TOOLS: {
10
+ value: Exclude<FabToolMode, "idle">;
11
+ label: string;
12
+ shortcut: string;
13
+ altKey: string;
14
+ icon: typeof IconMapPin;
15
+ featureKey?: "comments" | "drawing" | "highlighting" | "screenshots";
16
+ }[];
17
+ interface CommentFabToolsProps {
18
+ commentMode: FabToolMode;
19
+ features?: {
20
+ comments?: boolean;
21
+ drawing?: boolean;
22
+ highlighting?: boolean;
23
+ screenshots?: boolean;
24
+ realtime?: boolean;
25
+ };
26
+ tooltipSide: "left" | "right" | "top";
27
+ layout?: "vertical" | "horizontal";
28
+ onModeChange?: (mode: FabToolMode) => void;
29
+ isOpen: boolean;
30
+ onClose?: () => void;
31
+ onHide?: () => void;
32
+ /** Keep the hide dialog mounted while the toolbar collapses on scroll. */
33
+ hideDialogOpen?: boolean;
34
+ onHideDialogOpenChange?: (open: boolean) => void;
35
+ }
36
+ export declare function CommentFabTools({ commentMode, features, tooltipSide, layout, onModeChange, isOpen, onClose, onHide, hideDialogOpen, onHideDialogOpenChange, }: CommentFabToolsProps): import("react/jsx-runtime").JSX.Element;
37
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AssigneeFilter } from "../../core/types";
2
+ import type { CommentAvatarUser } from "./comment-user-avatar-tooltip";
3
+ interface FilterAssigneeComboboxProps {
4
+ availableAssignees: CommentAvatarUser[];
5
+ assigneeFilter: AssigneeFilter | undefined;
6
+ onAssigneeFilterChange: (filter: AssigneeFilter) => void;
7
+ }
8
+ export declare function FilterAssigneeCombobox({ availableAssignees, assigneeFilter, onAssigneeFilterChange, }: FilterAssigneeComboboxProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import type { AssigneeFilter, PageFilter, PriorityFilter, StatusFilter, UserFilter } from "../../core/types";
3
+ import type { CommentListFilters } from "./comment-list-filters";
4
+ import type { CommentAvatarUser } from "./comment-user-avatar-tooltip";
5
+ interface CommentFilterBarProps {
6
+ readonly totalCount: number;
7
+ readonly filteredCount: number;
8
+ readonly pageFilter: PageFilter;
9
+ readonly statusFilter: StatusFilter;
10
+ readonly sortOrder: CommentListFilters["sortOrder"];
11
+ readonly priorityFilter: PriorityFilter;
12
+ readonly userFilter?: UserFilter;
13
+ readonly assigneeFilter?: AssigneeFilter;
14
+ readonly availableAssignees?: CommentAvatarUser[];
15
+ readonly onPageFilterChange: (filter: PageFilter) => void;
16
+ readonly onStatusFilterChange: (filter: StatusFilter) => void;
17
+ readonly onSortOrderChange: (order: CommentListFilters["sortOrder"]) => void;
18
+ readonly onPriorityFilterChange: (filter: PriorityFilter) => void;
19
+ readonly onUserFilterChange?: (filter: UserFilter) => void;
20
+ readonly onAssigneeFilterChange?: (filter: AssigneeFilter) => void;
21
+ readonly onResetFilters?: () => void;
22
+ readonly selectAll?: boolean;
23
+ readonly onSelectAllChange?: (checked: boolean) => void;
24
+ readonly onSearchToggle?: () => void;
25
+ }
26
+ export declare const CommentFilterBar: React.MemoExoticComponent<({ totalCount, filteredCount, pageFilter, statusFilter, sortOrder, priorityFilter, userFilter, assigneeFilter, availableAssignees, onPageFilterChange, onStatusFilterChange, onSortOrderChange, onPriorityFilterChange, onUserFilterChange, onAssigneeFilterChange, onResetFilters, selectAll, onSelectAllChange, onSearchToggle, }: CommentFilterBarProps) => import("react/jsx-runtime").JSX.Element>;
27
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { AssigneeFilter, PriorityFilter, StatusFilter, UserFilter } from "../../core/types";
2
+ import type { CommentListFilters } from "./comment-list-filters";
3
+ import type { CommentAvatarUser } from "./comment-user-avatar-tooltip";
4
+ interface CommentFilterPopoverProps {
5
+ statusFilter: StatusFilter;
6
+ sortOrder: CommentListFilters["sortOrder"];
7
+ priorityFilter: PriorityFilter;
8
+ userFilter?: UserFilter;
9
+ assigneeFilter?: AssigneeFilter;
10
+ availableAssignees?: CommentAvatarUser[];
11
+ activeFilterCount: number;
12
+ onStatusFilterChange: (filter: StatusFilter) => void;
13
+ onSortOrderChange: (order: CommentListFilters["sortOrder"]) => void;
14
+ onPriorityFilterChange: (filter: PriorityFilter) => void;
15
+ onUserFilterChange?: (filter: UserFilter) => void;
16
+ onAssigneeFilterChange?: (filter: AssigneeFilter) => void;
17
+ onResetFilters?: () => void;
18
+ }
19
+ export declare function CommentFilterPopover({ statusFilter, sortOrder, priorityFilter, userFilter, assigneeFilter, availableAssignees, activeFilterCount, onStatusFilterChange, onSortOrderChange, onPriorityFilterChange, onUserFilterChange, onAssigneeFilterChange, onResetFilters, }: CommentFilterPopoverProps): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,34 @@
1
+ /** Menu labels and the matching keyboard chords. Icons stay in the toolbar. */
2
+ export declare const FORMAT_SHORTCUTS: readonly [{
3
+ readonly key: "bold";
4
+ readonly label: "Bold";
5
+ readonly prefix: "*";
6
+ readonly suffix: "*";
7
+ readonly shortcut: "⌘B";
8
+ readonly hotkey: "b";
9
+ readonly shift: false;
10
+ }, {
11
+ readonly key: "italic";
12
+ readonly label: "Italic";
13
+ readonly prefix: "_";
14
+ readonly suffix: "_";
15
+ readonly shortcut: "⌘I";
16
+ readonly hotkey: "i";
17
+ readonly shift: false;
18
+ }, {
19
+ readonly key: "strikethrough";
20
+ readonly label: "Strikethrough";
21
+ readonly prefix: "~";
22
+ readonly suffix: "~";
23
+ readonly shortcut: "⌘⇧X";
24
+ readonly hotkey: "x";
25
+ readonly shift: true;
26
+ }, {
27
+ readonly key: "code";
28
+ readonly label: "Code";
29
+ readonly prefix: "`";
30
+ readonly suffix: "`";
31
+ readonly shortcut: "⌘E";
32
+ readonly hotkey: "e";
33
+ readonly shift: false;
34
+ }];
@@ -1,16 +1,9 @@
1
1
  import * as React from "react";
2
2
  import type { Comment, TaskStatus } from "../../core/types";
3
3
  import type { CommentViewUser } from "../comments/view-model";
4
+ import type { DeviceInfo } from "./comment";
4
5
  type CommentKind = Comment["type"];
5
6
  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
7
  interface CommentHeaderProps {
15
8
  author: CommentViewUser;
16
9
  timestamp: string;
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import type { TextSelection } from "../../core/types";
3
+ import type { ComposerSubmitPayload } from "./comment-composer";
4
+ import type { CommentUser } from "./comment-composer-extras-fields";
5
+ interface CommentHighlightLayerProps {
6
+ enabled: boolean;
7
+ availableUsers?: CommentUser[];
8
+ onSubmit: (text: string, comment: string, selection: TextSelection, payload?: ComposerSubmitPayload) => void | Promise<void>;
9
+ }
10
+ export declare const CommentHighlightLayer: React.MemoExoticComponent<({ enabled, availableUsers, onSubmit, }: CommentHighlightLayerProps) => import("react/jsx-runtime").JSX.Element | null>;
11
+ export {};
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import type { Comment } from "../../core/types";
3
+ interface CommentHighlightMarkerProps {
4
+ comment: Comment;
5
+ isActive?: boolean;
6
+ onClick: () => void;
7
+ }
8
+ export declare const CommentHighlightMarker: React.MemoExoticComponent<({ comment, isActive, onClick, }: CommentHighlightMarkerProps) => import("react/jsx-runtime").JSX.Element | null>;
9
+ export {};
@@ -1,13 +1,5 @@
1
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
- }
2
+ import type { CommentImage } from "./comment";
11
3
  interface CommentImageLightboxProps {
12
4
  images: CommentImage[];
13
5
  initialIndex: number;
@@ -1,15 +1,7 @@
1
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
- }
2
+ import type { CommentImage } from "./comment";
3
+ export type { CommentImage };
11
4
  interface CommentImagesProps {
12
5
  images: CommentImage[];
13
6
  }
14
7
  export declare const CommentImages: React.MemoExoticComponent<({ images }: CommentImagesProps) => import("react/jsx-runtime").JSX.Element | null>;
15
- export {};
@@ -11,6 +11,7 @@ interface CommentItemProps {
11
11
  readonly priority?: CommentView["priority"];
12
12
  readonly threadStatus?: CommentView["status"];
13
13
  readonly hideImages?: boolean;
14
+ readonly hideReactions?: boolean;
14
15
  readonly onStartEdit?: () => void;
15
16
  readonly onCancelEdit?: () => void;
16
17
  readonly onSaveEdit?: (id: string, body: string) => void | Promise<void>;
@@ -21,5 +22,5 @@ interface CommentItemProps {
21
22
  readonly onLocate?: () => void;
22
23
  readonly onReact?: (emoji: string) => void;
23
24
  }
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 declare const CommentItem: React.MemoExoticComponent<({ comment, variant, context, showAvatar, isEditing, isResolved, priority, threadStatus, hideImages, hideReactions, onStartEdit, onCancelEdit, onSaveEdit, onDelete, onResolve, onCopyUrl, onCopyMarkdown, onLocate, onReact, }: CommentItemProps) => import("react/jsx-runtime").JSX.Element>;
25
26
  export {};
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ interface CommentKeyboardShortcutsProps {
3
+ open: boolean;
4
+ onClose: () => void;
5
+ }
6
+ export declare const CommentKeyboardShortcuts: React.MemoExoticComponent<({ open, onClose, }: CommentKeyboardShortcutsProps) => import("react/jsx-runtime").JSX.Element>;
7
+ export {};
@@ -0,0 +1,15 @@
1
+ import type { CommentKitCore } from "../../core/comment-kit-core";
2
+ import type { CommentKitState } from "../../core/types";
3
+ import { type RemoteCursorData } from "./comment-cursor-layer";
4
+ interface CommentKitOverlaysProps {
5
+ core: CommentKitCore;
6
+ state: CommentKitState;
7
+ remoteCursors: Map<string, RemoteCursorData>;
8
+ onScreenshotSave: (dataUrl: string, comment: string) => void | Promise<void>;
9
+ }
10
+ /**
11
+ * Drawing, highlight, screenshot, and live cursors. Login and shortcuts stay
12
+ * outside this tree so they can open while the rest of the widget is hidden.
13
+ */
14
+ export declare function CommentKitOverlays({ core, state, remoteCursors, onScreenshotSave, }: CommentKitOverlaysProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};