@liveblocks/react-ui 3.15.0-components1 → 3.15.0-thread2

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 (145) hide show
  1. package/dist/_private/index.cjs +7 -1
  2. package/dist/_private/index.cjs.map +1 -1
  3. package/dist/_private/index.d.cts +10 -4
  4. package/dist/_private/index.d.ts +10 -4
  5. package/dist/_private/index.js +3 -1
  6. package/dist/_private/index.js.map +1 -1
  7. package/dist/components/AiChat.cjs +10 -2
  8. package/dist/components/AiChat.cjs.map +1 -1
  9. package/dist/components/AiChat.js +10 -2
  10. package/dist/components/AiChat.js.map +1 -1
  11. package/dist/components/Comment.cjs +277 -232
  12. package/dist/components/Comment.cjs.map +1 -1
  13. package/dist/components/Comment.js +263 -237
  14. package/dist/components/Comment.js.map +1 -1
  15. package/dist/components/Composer.cjs +4 -2
  16. package/dist/components/Composer.cjs.map +1 -1
  17. package/dist/components/Composer.js +5 -3
  18. package/dist/components/Composer.js.map +1 -1
  19. package/dist/components/InboxNotification.cjs +6 -4
  20. package/dist/components/InboxNotification.cjs.map +1 -1
  21. package/dist/components/InboxNotification.js +7 -5
  22. package/dist/components/InboxNotification.js.map +1 -1
  23. package/dist/components/Thread.cjs +71 -45
  24. package/dist/components/Thread.cjs.map +1 -1
  25. package/dist/components/Thread.js +56 -49
  26. package/dist/components/Thread.js.map +1 -1
  27. package/dist/components/internal/AiComposer.cjs +2 -1
  28. package/dist/components/internal/AiComposer.cjs.map +1 -1
  29. package/dist/components/internal/AiComposer.js +2 -1
  30. package/dist/components/internal/AiComposer.js.map +1 -1
  31. package/dist/components/internal/CodeBlock.cjs +2 -1
  32. package/dist/components/internal/CodeBlock.cjs.map +1 -1
  33. package/dist/components/internal/CodeBlock.js +2 -1
  34. package/dist/components/internal/CodeBlock.js.map +1 -1
  35. package/dist/components/internal/Dropdown.cjs +28 -7
  36. package/dist/components/internal/Dropdown.cjs.map +1 -1
  37. package/dist/components/internal/Dropdown.js +7 -7
  38. package/dist/components/internal/Dropdown.js.map +1 -1
  39. package/dist/components/internal/EmojiPicker.cjs +27 -6
  40. package/dist/components/internal/EmojiPicker.cjs.map +1 -1
  41. package/dist/components/internal/EmojiPicker.js +6 -6
  42. package/dist/components/internal/EmojiPicker.js.map +1 -1
  43. package/dist/components/internal/List.cjs +2 -2
  44. package/dist/components/internal/List.cjs.map +1 -1
  45. package/dist/components/internal/List.js +2 -2
  46. package/dist/components/internal/List.js.map +1 -1
  47. package/dist/components/internal/Tooltip.cjs +28 -7
  48. package/dist/components/internal/Tooltip.cjs.map +1 -1
  49. package/dist/components/internal/Tooltip.js +7 -7
  50. package/dist/components/internal/Tooltip.js.map +1 -1
  51. package/dist/index.cjs +0 -12
  52. package/dist/index.cjs.map +1 -1
  53. package/dist/index.d.cts +197 -213
  54. package/dist/index.d.ts +197 -213
  55. package/dist/index.js +0 -6
  56. package/dist/index.js.map +1 -1
  57. package/dist/primitives/AiComposer/index.cjs +4 -5
  58. package/dist/primitives/AiComposer/index.cjs.map +1 -1
  59. package/dist/primitives/AiComposer/index.js +4 -5
  60. package/dist/primitives/AiComposer/index.js.map +1 -1
  61. package/dist/primitives/AiMessage/index.cjs +2 -2
  62. package/dist/primitives/AiMessage/index.cjs.map +1 -1
  63. package/dist/primitives/AiMessage/index.js +2 -2
  64. package/dist/primitives/AiMessage/index.js.map +1 -1
  65. package/dist/primitives/Collapsible/index.cjs +4 -4
  66. package/dist/primitives/Collapsible/index.cjs.map +1 -1
  67. package/dist/primitives/Collapsible/index.js +4 -4
  68. package/dist/primitives/Collapsible/index.js.map +1 -1
  69. package/dist/primitives/Comment/index.cjs +4 -4
  70. package/dist/primitives/Comment/index.cjs.map +1 -1
  71. package/dist/primitives/Comment/index.js +4 -4
  72. package/dist/primitives/Comment/index.js.map +1 -1
  73. package/dist/primitives/Composer/index.cjs +35 -23
  74. package/dist/primitives/Composer/index.cjs.map +1 -1
  75. package/dist/primitives/Composer/index.js +16 -23
  76. package/dist/primitives/Composer/index.js.map +1 -1
  77. package/dist/primitives/Duration.cjs +2 -2
  78. package/dist/primitives/Duration.cjs.map +1 -1
  79. package/dist/primitives/Duration.js +2 -2
  80. package/dist/primitives/Duration.js.map +1 -1
  81. package/dist/primitives/FileSize.cjs +2 -2
  82. package/dist/primitives/FileSize.cjs.map +1 -1
  83. package/dist/primitives/FileSize.js +2 -2
  84. package/dist/primitives/FileSize.js.map +1 -1
  85. package/dist/primitives/Markdown.cjs +2 -2
  86. package/dist/primitives/Markdown.cjs.map +1 -1
  87. package/dist/primitives/Markdown.js +2 -2
  88. package/dist/primitives/Markdown.js.map +1 -1
  89. package/dist/primitives/Timestamp.cjs +2 -2
  90. package/dist/primitives/Timestamp.cjs.map +1 -1
  91. package/dist/primitives/Timestamp.js +2 -2
  92. package/dist/primitives/Timestamp.js.map +1 -1
  93. package/dist/utils/Portal.cjs +2 -2
  94. package/dist/utils/Portal.cjs.map +1 -1
  95. package/dist/utils/Portal.js +2 -2
  96. package/dist/utils/Portal.js.map +1 -1
  97. package/dist/utils/use-stable-component.cjs +32 -0
  98. package/dist/utils/use-stable-component.cjs.map +1 -0
  99. package/dist/utils/use-stable-component.js +30 -0
  100. package/dist/utils/use-stable-component.js.map +1 -0
  101. package/dist/version.cjs +1 -1
  102. package/dist/version.cjs.map +1 -1
  103. package/dist/version.js +1 -1
  104. package/dist/version.js.map +1 -1
  105. package/package.json +10 -6
  106. package/src/styles/dark/index.css +1 -1
  107. package/src/styles/index.css +4 -252
  108. package/styles/dark/attributes.css +1 -1
  109. package/styles/dark/attributes.css.map +1 -1
  110. package/styles/dark/media-query.css +1 -1
  111. package/styles/dark/media-query.css.map +1 -1
  112. package/styles.css +1 -1
  113. package/styles.css.map +1 -1
  114. package/dist/components/AvatarStack.cjs +0 -115
  115. package/dist/components/AvatarStack.cjs.map +0 -1
  116. package/dist/components/AvatarStack.js +0 -113
  117. package/dist/components/AvatarStack.js.map +0 -1
  118. package/dist/components/CommentPin.cjs +0 -27
  119. package/dist/components/CommentPin.cjs.map +0 -1
  120. package/dist/components/CommentPin.js +0 -25
  121. package/dist/components/CommentPin.js.map +0 -1
  122. package/dist/components/Cursor.cjs +0 -40
  123. package/dist/components/Cursor.cjs.map +0 -1
  124. package/dist/components/Cursor.js +0 -38
  125. package/dist/components/Cursor.js.map +0 -1
  126. package/dist/components/Cursors.cjs +0 -252
  127. package/dist/components/Cursors.cjs.map +0 -1
  128. package/dist/components/Cursors.js +0 -250
  129. package/dist/components/Cursors.js.map +0 -1
  130. package/dist/components/FloatingComposer.cjs +0 -82
  131. package/dist/components/FloatingComposer.cjs.map +0 -1
  132. package/dist/components/FloatingComposer.js +0 -80
  133. package/dist/components/FloatingComposer.js.map +0 -1
  134. package/dist/components/FloatingThread.cjs +0 -82
  135. package/dist/components/FloatingThread.cjs.map +0 -1
  136. package/dist/components/FloatingThread.js +0 -80
  137. package/dist/components/FloatingThread.js.map +0 -1
  138. package/dist/utils/animation-loop.cjs +0 -44
  139. package/dist/utils/animation-loop.cjs.map +0 -1
  140. package/dist/utils/animation-loop.js +0 -42
  141. package/dist/utils/animation-loop.js.map +0 -1
  142. package/dist/utils/use-pre-resolve-user.cjs +0 -18
  143. package/dist/utils/use-pre-resolve-user.cjs.map +0 -1
  144. package/dist/utils/use-pre-resolve-user.js +0 -16
  145. package/dist/utils/use-pre-resolve-user.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../../src/components/internal/Tooltip.tsx"],"sourcesContent":["\"use client\";\n\nimport { Tooltip as TooltipPrimitive } from \"radix-ui\";\nimport type { ComponentProps, ReactNode } from \"react\";\nimport { forwardRef, useMemo } from \"react\";\n\nimport { useLiveblocksUiConfig } from \"../../config\";\nimport {\n FLOATING_ELEMENT_COLLISION_PADDING,\n FLOATING_ELEMENT_SIDE_OFFSET,\n} from \"../../constants\";\nimport { cn } from \"../../utils/cn\";\nimport { isApple } from \"../../utils/is-apple\";\n\nconst ALT_KEY = { title: \"Alt\", key: \"⌥\" };\nconst COMMAND_KEY = { title: \"Command\", key: \"⌘\" };\nconst CONTROL_KEY = { title: \"Ctrl\", key: \"⌃\" };\nconst SHIFT_KEY = { title: \"Shift\", key: \"⇧\" };\nconst ENTER_KEY = { title: \"Enter\", key: \"⏎\" };\nconst SPACE_KEY = { title: \"Space\", key: \"␣\" };\nconst ESCAPE_KEY = { title: \"Escape\", key: \"⎋\" };\n\nconst KEYS = {\n alt: () => ALT_KEY,\n mod: () => (isApple() ? COMMAND_KEY : CONTROL_KEY),\n control: () => CONTROL_KEY,\n ctrl: () => CONTROL_KEY,\n command: () => COMMAND_KEY,\n cmd: () => COMMAND_KEY,\n shift: () => SHIFT_KEY,\n enter: () => ENTER_KEY,\n \" \": () => SPACE_KEY,\n space: () => SPACE_KEY,\n escape: () => ESCAPE_KEY,\n esc: () => ESCAPE_KEY,\n} as const;\n\nexport interface TooltipProps\n extends Pick<TooltipPrimitive.TooltipTriggerProps, \"children\">,\n Omit<TooltipPrimitive.TooltipContentProps, \"content\"> {\n content: ReactNode;\n multiline?: boolean;\n}\n\nexport interface ShortcutTooltipProps extends TooltipProps {\n shortcut?: string;\n}\n\nexport interface ShortcutTooltipKeyProps extends ComponentProps<\"abbr\"> {\n name: keyof typeof KEYS;\n}\n\nfunction getShortcutKbdFromKeymap(keymap: string) {\n const keys = keymap.split(\"-\");\n\n return (\n <>\n {keys.map((key, index) => {\n const lowerKey = key.toLowerCase();\n\n if (lowerKey in KEYS) {\n return (\n <ShortcutTooltipKey\n key={index}\n name={lowerKey as keyof typeof KEYS}\n />\n );\n }\n\n return <span key={index}>{key}</span>;\n })}\n </>\n );\n}\n\nexport const Tooltip = forwardRef<HTMLButtonElement, TooltipProps>(\n ({ children, content, multiline, className, ...props }, forwardedRef) => {\n const { portalContainer } = useLiveblocksUiConfig();\n\n return (\n <TooltipPrimitive.Root disableHoverableContent>\n <TooltipPrimitive.Trigger asChild ref={forwardedRef}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal container={portalContainer}>\n <TooltipPrimitive.Content\n className={cn(\n \"lb-root lb-portal lb-tooltip\",\n multiline && \"lb-tooltip:multiline\",\n className\n )}\n side=\"top\"\n align=\"center\"\n sideOffset={FLOATING_ELEMENT_SIDE_OFFSET}\n collisionPadding={FLOATING_ELEMENT_COLLISION_PADDING}\n {...props}\n >\n {content}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n );\n }\n);\n\nexport const ShortcutTooltip = forwardRef<\n HTMLButtonElement,\n ShortcutTooltipProps\n>(({ children, content, shortcut, ...props }, forwardedRef) => {\n const shortcutKbd = useMemo(() => {\n return shortcut ? getShortcutKbdFromKeymap(shortcut) : null;\n }, [shortcut]);\n\n return (\n <Tooltip\n content={\n <>\n {content}\n {shortcutKbd && (\n <kbd className=\"lb-tooltip-shortcut\">{shortcutKbd}</kbd>\n )}\n </>\n }\n {...props}\n ref={forwardedRef}\n >\n {children}\n </Tooltip>\n );\n});\n\nfunction ShortcutTooltipKey({ name, ...props }: ShortcutTooltipKeyProps) {\n const { title, key } = useMemo(() => KEYS[name]?.(), [name]);\n\n return (\n <abbr title={title} {...props}>\n {key}\n </abbr>\n );\n}\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\n"],"names":[],"mappings":";;;;;;;;;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAa;AACA;AAC2B;AACvB;AACH;AACG;AACJ;AACE;AACA;AACF;AACE;AACC;AAEhB;AAiBA;AACE;AAEA;AAGM;AAEA;AACE;AACE;AAAC;AAAA;AAEO;AAAA;AADD;AAEP;AAIJ;AAA8B;AAItC;AAEO;AAAgB;AAEnB;AAEA;AAEI;AAEA;AAEE;AAAkB;AAAjB;AACY;AACT;AACa;AACb;AACF;AACK;AACC;AACM;AACM;AACd;AAEH;AAAA;AAEL;AACF;AAGN;AAEa;AAIX;AACE;AAAuD;AAGzD;AACE;AAAC;AAAA;AAGM;AAAA;AAEmD;AAEtD;AAEE;AACC;AAEJ;AAAA;AAGP;AAEA;AACE;AAEA;AAKF;AAEO;;"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../../src/components/internal/Tooltip.tsx"],"sourcesContent":["\"use client\";\n\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport type { ComponentProps, ReactNode } from \"react\";\nimport { forwardRef, useMemo } from \"react\";\n\nimport { useLiveblocksUiConfig } from \"../../config\";\nimport {\n FLOATING_ELEMENT_COLLISION_PADDING,\n FLOATING_ELEMENT_SIDE_OFFSET,\n} from \"../../constants\";\nimport { cn } from \"../../utils/cn\";\nimport { isApple } from \"../../utils/is-apple\";\n\nconst ALT_KEY = { title: \"Alt\", key: \"⌥\" };\nconst COMMAND_KEY = { title: \"Command\", key: \"⌘\" };\nconst CONTROL_KEY = { title: \"Ctrl\", key: \"⌃\" };\nconst SHIFT_KEY = { title: \"Shift\", key: \"⇧\" };\nconst ENTER_KEY = { title: \"Enter\", key: \"⏎\" };\nconst SPACE_KEY = { title: \"Space\", key: \"␣\" };\nconst ESCAPE_KEY = { title: \"Escape\", key: \"⎋\" };\n\nconst KEYS = {\n alt: () => ALT_KEY,\n mod: () => (isApple() ? COMMAND_KEY : CONTROL_KEY),\n control: () => CONTROL_KEY,\n ctrl: () => CONTROL_KEY,\n command: () => COMMAND_KEY,\n cmd: () => COMMAND_KEY,\n shift: () => SHIFT_KEY,\n enter: () => ENTER_KEY,\n \" \": () => SPACE_KEY,\n space: () => SPACE_KEY,\n escape: () => ESCAPE_KEY,\n esc: () => ESCAPE_KEY,\n} as const;\n\nexport interface TooltipProps\n extends Pick<TooltipPrimitive.TooltipTriggerProps, \"children\">,\n Omit<TooltipPrimitive.TooltipContentProps, \"content\"> {\n content: ReactNode;\n multiline?: boolean;\n}\n\nexport interface ShortcutTooltipProps extends TooltipProps {\n shortcut?: string;\n}\n\nexport interface ShortcutTooltipKeyProps extends ComponentProps<\"abbr\"> {\n name: keyof typeof KEYS;\n}\n\nfunction getShortcutKbdFromKeymap(keymap: string) {\n const keys = keymap.split(\"-\");\n\n return (\n <>\n {keys.map((key, index) => {\n const lowerKey = key.toLowerCase();\n\n if (lowerKey in KEYS) {\n return (\n <ShortcutTooltipKey\n key={index}\n name={lowerKey as keyof typeof KEYS}\n />\n );\n }\n\n return <span key={index}>{key}</span>;\n })}\n </>\n );\n}\n\nexport const Tooltip = forwardRef<HTMLButtonElement, TooltipProps>(\n ({ children, content, multiline, className, ...props }, forwardedRef) => {\n const { portalContainer } = useLiveblocksUiConfig();\n\n return (\n <TooltipPrimitive.Root disableHoverableContent>\n <TooltipPrimitive.Trigger asChild ref={forwardedRef}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal container={portalContainer}>\n <TooltipPrimitive.Content\n className={cn(\n \"lb-root lb-portal lb-tooltip\",\n multiline && \"lb-tooltip:multiline\",\n className\n )}\n side=\"top\"\n align=\"center\"\n sideOffset={FLOATING_ELEMENT_SIDE_OFFSET}\n collisionPadding={FLOATING_ELEMENT_COLLISION_PADDING}\n {...props}\n >\n {content}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n );\n }\n);\n\nexport const ShortcutTooltip = forwardRef<\n HTMLButtonElement,\n ShortcutTooltipProps\n>(({ children, content, shortcut, ...props }, forwardedRef) => {\n const shortcutKbd = useMemo(() => {\n return shortcut ? getShortcutKbdFromKeymap(shortcut) : null;\n }, [shortcut]);\n\n return (\n <Tooltip\n content={\n <>\n {content}\n {shortcutKbd && (\n <kbd className=\"lb-tooltip-shortcut\">{shortcutKbd}</kbd>\n )}\n </>\n }\n {...props}\n ref={forwardedRef}\n >\n {children}\n </Tooltip>\n );\n});\n\nfunction ShortcutTooltipKey({ name, ...props }: ShortcutTooltipKeyProps) {\n const { title, key } = useMemo(() => KEYS[name]?.(), [name]);\n\n return (\n <abbr title={title} {...props}>\n {key}\n </abbr>\n );\n}\n\nexport { TooltipProvider } from \"@radix-ui/react-tooltip\";\n"],"names":[],"mappings":";;;;;;;;;;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAa;AACA;AAC2B;AACvB;AACH;AACG;AACJ;AACE;AACA;AACF;AACE;AACC;AAEhB;AAiBA;AACE;AAEA;AAGM;AAEA;AACE;AACE;AAAC;AAAA;AAEO;AAAA;AADD;AAEP;AAIJ;AAA8B;AAItC;AAEO;AAAgB;AAEnB;AAEA;AAEI;AAEA;AAEE;AAAkB;AAAjB;AACY;AACT;AACa;AACb;AACF;AACK;AACC;AACM;AACM;AACd;AAEH;AAAA;AAEL;AACF;AAGN;AAEa;AAIX;AACE;AAAuD;AAGzD;AACE;AAAC;AAAA;AAGM;AAAA;AAEmD;AAEtD;AAEE;AACC;AAEJ;AAAA;AAGP;AAEA;AACE;AAEA;AAKF;;"}
package/dist/index.cjs CHANGED
@@ -4,14 +4,8 @@ var core = require('@liveblocks/core');
4
4
  var version = require('./version.cjs');
5
5
  var AiChat = require('./components/AiChat.cjs');
6
6
  var AiTool = require('./components/AiTool.cjs');
7
- var AvatarStack = require('./components/AvatarStack.cjs');
8
7
  var Comment = require('./components/Comment.cjs');
9
- var CommentPin = require('./components/CommentPin.cjs');
10
8
  var Composer = require('./components/Composer.cjs');
11
- var Cursor = require('./components/Cursor.cjs');
12
- var Cursors = require('./components/Cursors.cjs');
13
- var FloatingComposer = require('./components/FloatingComposer.cjs');
14
- var FloatingThread = require('./components/FloatingThread.cjs');
15
9
  var HistoryVersionSummary = require('./components/HistoryVersionSummary.cjs');
16
10
  var HistoryVersionSummaryList = require('./components/HistoryVersionSummaryList.cjs');
17
11
  var InboxNotification = require('./components/InboxNotification.cjs');
@@ -25,14 +19,8 @@ core.detectDupes(version.PKG_NAME, version.PKG_VERSION, version.PKG_FORMAT);
25
19
 
26
20
  exports.AiChat = AiChat.AiChat;
27
21
  exports.AiTool = AiTool.AiTool;
28
- exports.AvatarStack = AvatarStack.AvatarStack;
29
22
  exports.Comment = Comment.Comment;
30
- exports.CommentPin = CommentPin.CommentPin;
31
23
  exports.Composer = Composer.Composer;
32
- exports.Cursor = Cursor.Cursor;
33
- exports.Cursors = Cursors.Cursors;
34
- exports.FloatingComposer = FloatingComposer.FloatingComposer;
35
- exports.FloatingThread = FloatingThread.FloatingThread;
36
24
  exports.HistoryVersionSummary = HistoryVersionSummary.HistoryVersionSummary;
37
25
  exports.HistoryVersionSummaryList = HistoryVersionSummaryList.HistoryVersionSummaryList;
38
26
  exports.InboxNotification = InboxNotification.InboxNotification;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\n\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport type {\n AiChatComponents,\n AiChatComponentsEmptyProps,\n AiChatComponentsLoadingProps,\n AiChatProps,\n} from \"./components/AiChat\";\nexport { AiChat } from \"./components/AiChat\";\nexport type { AiToolIconProps, AiToolProps } from \"./components/AiTool\";\nexport { AiTool } from \"./components/AiTool\";\nexport type { AvatarStackProps } from \"./components/AvatarStack\";\nexport { AvatarStack } from \"./components/AvatarStack\";\nexport type {\n CommentDropdownItemProps,\n CommentProps,\n} from \"./components/Comment\";\nexport { Comment } from \"./components/Comment\";\nexport type { CommentPinProps } from \"./components/CommentPin\";\nexport { CommentPin } from \"./components/CommentPin\";\nexport type { ComposerProps } from \"./components/Composer\";\nexport { Composer } from \"./components/Composer\";\nexport type { CursorProps } from \"./components/Cursor\";\nexport { Cursor } from \"./components/Cursor\";\nexport type { CursorsProps } from \"./components/Cursors\";\nexport { Cursors } from \"./components/Cursors\";\nexport type { FloatingComposerProps } from \"./components/FloatingComposer\";\nexport { FloatingComposer } from \"./components/FloatingComposer\";\nexport type { FloatingThreadProps } from \"./components/FloatingThread\";\nexport { FloatingThread } from \"./components/FloatingThread\";\nexport type { HistoryVersionSummaryProps } from \"./components/HistoryVersionSummary\";\nexport { HistoryVersionSummary } from \"./components/HistoryVersionSummary\";\nexport type { HistoryVersionSummaryListProps } from \"./components/HistoryVersionSummaryList\";\nexport { HistoryVersionSummaryList } from \"./components/HistoryVersionSummaryList\";\nexport type {\n InboxNotificationAvatarProps,\n InboxNotificationCustomKindProps,\n InboxNotificationCustomProps,\n InboxNotificationIconProps,\n InboxNotificationInspectorProps,\n InboxNotificationProps,\n InboxNotificationTextMentionKindProps,\n InboxNotificationTextMentionProps,\n InboxNotificationThreadKindProps,\n InboxNotificationThreadProps,\n} from \"./components/InboxNotification\";\nexport { InboxNotification } from \"./components/InboxNotification\";\nexport type { InboxNotificationListProps } from \"./components/InboxNotificationList\";\nexport { InboxNotificationList } from \"./components/InboxNotificationList\";\nexport type { ThreadProps } from \"./components/Thread\";\nexport { Thread } from \"./components/Thread\";\nexport { LiveblocksUiConfig } from \"./config\";\nexport * as Icon from \"./icon\";\nexport type {\n CommentOverrides,\n ComposerOverrides,\n GlobalOverrides,\n InboxNotificationOverrides,\n LocalizationOverrides,\n Overrides,\n ThreadOverrides,\n} from \"./overrides\";\nexport { useOverrides } from \"./overrides\";\nexport type {\n AiComposerSubmitMessage,\n ComposerSubmitComment,\n} from \"./primitives\";\nexport type {\n CommentAttachmentArgs,\n ComposerBodyMark,\n ComposerBodyMarks,\n} from \"./types\";\n"],"names":["detectDupes","PKG_NAME","PKG_VERSION","PKG_FORMAT"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIAA,gBAAY,CAAAC,gBAAA,EAAUC,qBAAaC,kBAAU,CAAA;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\n\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport type {\n AiChatComponents,\n AiChatComponentsEmptyProps,\n AiChatComponentsLoadingProps,\n AiChatProps,\n} from \"./components/AiChat\";\nexport { AiChat } from \"./components/AiChat\";\nexport type { AiToolIconProps, AiToolProps } from \"./components/AiTool\";\nexport { AiTool } from \"./components/AiTool\";\nexport type {\n CommentAuthorProps,\n CommentAvatarProps,\n CommentDateProps,\n CommentDropdownItemProps,\n CommentProps,\n} from \"./components/Comment\";\nexport { Comment } from \"./components/Comment\";\nexport type { ComposerProps } from \"./components/Composer\";\nexport { Composer } from \"./components/Composer\";\nexport type { HistoryVersionSummaryProps } from \"./components/HistoryVersionSummary\";\nexport { HistoryVersionSummary } from \"./components/HistoryVersionSummary\";\nexport type { HistoryVersionSummaryListProps } from \"./components/HistoryVersionSummaryList\";\nexport { HistoryVersionSummaryList } from \"./components/HistoryVersionSummaryList\";\nexport type {\n InboxNotificationAvatarProps,\n InboxNotificationCustomKindProps,\n InboxNotificationCustomProps,\n InboxNotificationIconProps,\n InboxNotificationInspectorProps,\n InboxNotificationProps,\n InboxNotificationTextMentionKindProps,\n InboxNotificationTextMentionProps,\n InboxNotificationThreadKindProps,\n InboxNotificationThreadProps,\n} from \"./components/InboxNotification\";\nexport { InboxNotification } from \"./components/InboxNotification\";\nexport type { InboxNotificationListProps } from \"./components/InboxNotificationList\";\nexport { InboxNotificationList } from \"./components/InboxNotificationList\";\nexport type { ThreadProps } from \"./components/Thread\";\nexport { Thread } from \"./components/Thread\";\nexport { LiveblocksUiConfig } from \"./config\";\nexport * as Icon from \"./icon\";\nexport type {\n CommentOverrides,\n ComposerOverrides,\n GlobalOverrides,\n InboxNotificationOverrides,\n LocalizationOverrides,\n Overrides,\n ThreadOverrides,\n} from \"./overrides\";\nexport { useOverrides } from \"./overrides\";\nexport type {\n AiComposerSubmitMessage,\n ComposerSubmitComment,\n} from \"./primitives\";\nexport type {\n CommentAttachmentArgs,\n ComposerBodyMark,\n ComposerBodyMarks,\n} from \"./types\";\n"],"names":["detectDupes","PKG_NAME","PKG_VERSION","PKG_FORMAT"],"mappings":";;;;;;;;;;;;;;;;;AAIAA,gBAAY,CAAAC,gBAAA,EAAUC,qBAAaC,kBAAU,CAAA;;;;;;;;;;;;;;;"}
package/dist/index.d.cts CHANGED
@@ -1,8 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ComponentType, ComponentPropsWithoutRef, ElementType, ReactNode, ComponentProps, FormEvent, RefAttributes, MouseEvent, PropsWithChildren } from 'react';
3
- import { CommentAttachment, AiReasoningPart, AiRetrievalPart, Relax, WithNavigation, AiAssistantMessage, CopilotId, AiKnowledgeSource, AiOpaqueToolDefinition, AiToolTypePack, JsonObject, AiToolExecuteCallback, NoInfr, CommentBody, MentionData, BaseMetadata, DTM, DCM, Patchable, CommentData, ThreadData, HistoryVersion, InboxNotificationData, InboxNotificationThreadData, InboxNotificationTextMentionData, InboxNotificationCustomData, KDAD } from '@liveblocks/core';
3
+ import { CommentAttachment, AiReasoningPart, AiRetrievalPart, Relax, WithNavigation, AiAssistantMessage, CopilotId, AiKnowledgeSource, AiOpaqueToolDefinition, AiToolTypePack, JsonObject, AiToolExecuteCallback, NoInfr, CommentBody, MentionData, BaseMetadata, DTM, DCM, Patchable, CommentData, HistoryVersion, InboxNotificationData, InboxNotificationThreadData, InboxNotificationTextMentionData, InboxNotificationCustomData, KDAD, ThreadData } from '@liveblocks/core';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import { Popover } from 'radix-ui';
6
5
 
7
6
  interface GlobalComponents {
8
7
  Anchor: ComponentType<ComponentPropsWithoutRef<"a">> | "a";
@@ -810,25 +809,6 @@ declare const AiTool: react.ForwardRefExoticComponent<Omit<AiToolProps, "ref"> &
810
809
  Confirmation: typeof AiToolConfirmation;
811
810
  };
812
811
 
813
- interface AvatarStackProps extends ComponentPropsWithoutRef<"div"> {
814
- /**
815
- * Optional additional user IDs to include in the stack.
816
- */
817
- userIds?: string[];
818
- /**
819
- * The maximum number of visible avatars.
820
- */
821
- max?: number;
822
- /**
823
- * Override the component's strings.
824
- */
825
- overrides?: Partial<GlobalOverrides>;
826
- }
827
- /**
828
- * Displays a stack of avatars for the users currently present in the room.
829
- */
830
- declare const AvatarStack: react.ForwardRefExoticComponent<AvatarStackProps & react.RefAttributes<HTMLDivElement>>;
831
-
832
812
  interface ComposerEditorMentionProps {
833
813
  /**
834
814
  * Whether the mention is selected.
@@ -1051,11 +1031,27 @@ type ComposerProps<TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM>
1051
1031
  */
1052
1032
  declare const Composer: <TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM>(props: ComposerProps<TM, CM> & RefAttributes<HTMLFormElement>) => JSX.Element;
1053
1033
 
1054
- interface CommentProps extends ComponentPropsWithoutRef<"div"> {
1034
+ interface CommentProps<CM extends BaseMetadata = DCM> extends Omit<ComponentPropsWithoutRef<"div">, "children"> {
1055
1035
  /**
1056
1036
  * The comment to display.
1057
1037
  */
1058
- comment: CommentData;
1038
+ comment: CommentData<CM>;
1039
+ /**
1040
+ * The comment's avatar.
1041
+ * Can be combined with `Comment.Avatar` to easily follow default styles.
1042
+ */
1043
+ avatar?: ReactNode;
1044
+ /**
1045
+ * The comment's author.
1046
+ * Can be combined with `Comment.Author` to easily follow default styles.
1047
+ */
1048
+ author?: ReactNode;
1049
+ /**
1050
+ * The comment's date.
1051
+ * Can be combined with `Comment.Date` to easily follow default styles,
1052
+ * or the `Timestamp` primitive for more control.
1053
+ */
1054
+ date?: ReactNode;
1059
1055
  /**
1060
1056
  * How to show or hide the actions.
1061
1057
  */
@@ -1080,6 +1076,10 @@ interface CommentProps extends ComponentPropsWithoutRef<"div"> {
1080
1076
  * Whether to indent the comment's content.
1081
1077
  */
1082
1078
  indentContent?: boolean;
1079
+ /**
1080
+ * Additional content to display below the comment's body.
1081
+ */
1082
+ additionalContent?: ReactNode;
1083
1083
  /**
1084
1084
  * The event handler called when the comment is edited.
1085
1085
  */
@@ -1104,7 +1104,13 @@ interface CommentProps extends ComponentPropsWithoutRef<"div"> {
1104
1104
  * Add (or change) items to display in the comment's dropdown.
1105
1105
  */
1106
1106
  dropdownItems?: ReactNode | ((props: PropsWithChildren<{
1107
- comment: CommentData;
1107
+ comment: CommentData<CM>;
1108
+ }>) => ReactNode);
1109
+ /**
1110
+ * Override the comment's content.
1111
+ */
1112
+ children?: ReactNode | ((props: PropsWithChildren<{
1113
+ comment: CommentData<CM>;
1108
1114
  }>) => ReactNode);
1109
1115
  /**
1110
1116
  * Override the component's strings.
@@ -1115,6 +1121,31 @@ interface CommentProps extends ComponentPropsWithoutRef<"div"> {
1115
1121
  */
1116
1122
  components?: Partial<GlobalComponents>;
1117
1123
  }
1124
+ interface CommentAvatarProps extends Omit<ComponentProps<"div">, "children"> {
1125
+ /**
1126
+ * The user ID to display the avatar for.
1127
+ */
1128
+ userId: string;
1129
+ }
1130
+ interface CommentAuthorProps extends Omit<ComponentProps<"span">, "children"> {
1131
+ /**
1132
+ * The user ID to display the author for.
1133
+ */
1134
+ userId: string;
1135
+ }
1136
+ interface CommentDateProps extends Omit<ComponentProps<"span">, "children"> {
1137
+ /**
1138
+ * The date to display.
1139
+ */
1140
+ date: Date | string | number;
1141
+ /**
1142
+ * The locale used when formatting the date.
1143
+ */
1144
+ locale?: string;
1145
+ }
1146
+ declare function CommentAvatar(props: CommentAvatarProps): react_jsx_runtime.JSX.Element;
1147
+ declare function CommentAuthor(props: CommentAuthorProps): react_jsx_runtime.JSX.Element;
1148
+ declare function CommentDate({ locale, date, className, ...props }: CommentDateProps): react_jsx_runtime.JSX.Element;
1118
1149
  interface CommentDropdownItemProps extends Omit<ComponentPropsWithoutRef<"div">, "onSelect"> {
1119
1150
  /**
1120
1151
  * An optional icon displayed in this dropdown item.
@@ -1135,204 +1166,24 @@ interface CommentDropdownItemProps extends Omit<ComponentPropsWithoutRef<"div">,
1135
1166
  * ))}
1136
1167
  * </>
1137
1168
  */
1138
- declare const Comment: react.ForwardRefExoticComponent<CommentProps & react.RefAttributes<HTMLDivElement>> & {
1169
+ declare const Comment: react.ForwardRefExoticComponent<CommentProps<BaseMetadata> & react.RefAttributes<HTMLDivElement>> & {
1139
1170
  /**
1140
1171
  * Displays a dropdown item in the comment's dropdown.
1141
1172
  */
1142
1173
  DropdownItem: react.ForwardRefExoticComponent<CommentDropdownItemProps & react.RefAttributes<HTMLDivElement>>;
1143
- };
1144
-
1145
- interface CommentPinProps extends ComponentPropsWithoutRef<"button"> {
1146
- /**
1147
- * The corner that points to the comment position.
1148
- */
1149
- corner?: "top-left" | "top-right" | "bottom-right" | "bottom-left";
1150
- /**
1151
- * The user ID to optionally display an avatar for.
1152
- */
1153
- userId?: string;
1154
- }
1155
- /**
1156
- * Displays a comment pin that can be used as a trigger
1157
- * for `FloatingComposer` and `FloatingThread`.
1158
- */
1159
- declare const CommentPin: react.ForwardRefExoticComponent<CommentPinProps & react.RefAttributes<HTMLButtonElement>>;
1160
-
1161
- interface CursorProps extends ComponentPropsWithoutRef<"div"> {
1162
- /**
1163
- * A floating label to display next to the cursor.
1164
- */
1165
- label?: ReactNode;
1166
- /**
1167
- * The color of the cursor.
1168
- */
1169
- color?: string;
1170
- }
1171
- /**
1172
- * Displays a multiplayer cursor.
1173
- */
1174
- declare const Cursor: react.ForwardRefExoticComponent<CursorProps & react.RefAttributes<HTMLDivElement>>;
1175
-
1176
- interface CursorsProps extends ComponentPropsWithoutRef<"div"> {
1177
- /**
1178
- * The key used to store the cursors in users' Presence.
1179
- * This can be used to have multiple `Cursors` in a single room.
1180
- */
1181
- presenceKey?: string;
1182
- }
1183
- /**
1184
- * Displays multiplayer cursors.
1185
- */
1186
- declare const Cursors: react.ForwardRefExoticComponent<CursorsProps & react.RefAttributes<HTMLDivElement>>;
1187
-
1188
- interface FloatingComposerProps<TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> extends Omit<ComposerProps<TM, CM>, "collapsed" | "onCollapsedChange" | "defaultCollapsed">, Relax<Pick<Popover.PopoverProps, "defaultOpen" | "open" | "onOpenChange"> & Pick<Popover.PopoverContentProps, "side" | "sideOffset" | "align" | "alignOffset">> {
1189
- /**
1190
- * The element which opens the floating composer.
1191
- */
1192
- children: ReactNode;
1193
- }
1194
- /**
1195
- * Displays a floating composer attached to a trigger element.
1196
- */
1197
- declare const FloatingComposer: <TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM>(props: FloatingComposerProps<TM, CM> & RefAttributes<HTMLFormElement>) => JSX.Element;
1198
-
1199
- interface ThreadProps<TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> extends ComponentPropsWithoutRef<"div"> {
1200
- /**
1201
- * The thread to display.
1202
- */
1203
- thread: ThreadData<TM, CM>;
1204
- /**
1205
- * How to show or hide the composer to reply to the thread.
1206
- */
1207
- showComposer?: boolean | "collapsed";
1208
- /**
1209
- * Whether to show the action to resolve the thread.
1210
- */
1211
- showResolveAction?: boolean;
1212
1174
  /**
1213
- * How to show or hide the actions.
1214
- */
1215
- showActions?: CommentProps["showActions"];
1216
- /**
1217
- * Whether to show reactions.
1218
- */
1219
- showReactions?: CommentProps["showReactions"];
1220
- /**
1221
- * Whether to show the composer's formatting controls.
1222
- */
1223
- showComposerFormattingControls?: ComposerProps["showFormattingControls"];
1224
- /**
1225
- * Add (or change) items to display in a comment's dropdown.
1226
- */
1227
- commentDropdownItems?: ReactNode | ((props: PropsWithChildren<{
1228
- comment: CommentData;
1229
- }>) => ReactNode);
1230
- /**
1231
- * The maximum number of comments to show.
1232
- *
1233
- * The first and last comments are always shown and by default if some comments
1234
- * are hidden, only the first comment will be shown before the "show more" button
1235
- * and after it will be shown all the newest comments to fit the limit set.
1236
- *
1237
- * It's possible to customize this by setting `maxVisibleComments` to an object:
1238
- *
1239
- * @example
1240
- * // Only show the last comment, and all the older ones to fit the limit.
1241
- * <Thread maxVisibleComments={{ max: 5, show: "oldest" }} />
1242
- *
1243
- * @example
1244
- * // Show as many old comments as new ones to fit the limit.
1245
- * <Thread maxVisibleComments={{ max: 5, show: "both" }} />
1246
- */
1247
- maxVisibleComments?: number | {
1248
- max: number;
1249
- show: "oldest" | "both" | "newest";
1250
- };
1251
- /**
1252
- * Whether to blur the composer editor when the composer is submitted.
1253
- */
1254
- blurComposerOnSubmit?: ComposerProps["blurOnSubmit"];
1255
- /**
1256
- * Whether to indent the comments' content.
1257
- */
1258
- indentCommentContent?: CommentProps["indentContent"];
1259
- /**
1260
- * Whether to show deleted comments.
1261
- */
1262
- showDeletedComments?: CommentProps["showDeleted"];
1263
- /**
1264
- * Whether to show attachments.
1265
- */
1266
- showAttachments?: boolean;
1267
- /**
1268
- * The event handler called when changing the resolved status.
1269
- */
1270
- onResolvedChange?: (resolved: boolean) => void;
1271
- /**
1272
- * The event handler called when a comment is edited.
1273
- */
1274
- onCommentEdit?: CommentProps["onCommentEdit"];
1275
- /**
1276
- * The event handler called when a comment is deleted.
1277
- */
1278
- onCommentDelete?: CommentProps["onCommentDelete"];
1279
- /**
1280
- * The event handler called when the thread is deleted.
1281
- * A thread is deleted when all its comments are deleted.
1282
- */
1283
- onThreadDelete?: (thread: ThreadData<TM, CM>) => void;
1284
- /**
1285
- * The event handler called when clicking on a comment's author.
1286
- */
1287
- onAuthorClick?: CommentProps["onAuthorClick"];
1288
- /**
1289
- * The event handler called when clicking on a mention.
1175
+ * Displays a comment's avatar.
1290
1176
  */
1291
- onMentionClick?: CommentProps["onMentionClick"];
1177
+ Avatar: typeof CommentAvatar;
1292
1178
  /**
1293
- * The event handler called when clicking on a comment's attachment.
1179
+ * Displays a comment's author.
1294
1180
  */
1295
- onAttachmentClick?: CommentProps["onAttachmentClick"];
1181
+ Author: typeof CommentAuthor;
1296
1182
  /**
1297
- * The event handler called when the composer is submitted.
1183
+ * Displays a comment's date.
1298
1184
  */
1299
- onComposerSubmit?: ComposerProps["onComposerSubmit"];
1300
- /**
1301
- * Whether to focus the composer on mount.
1302
- */
1303
- autoFocus?: ComposerProps["autoFocus"];
1304
- /**
1305
- * Override the component's strings.
1306
- */
1307
- overrides?: Partial<GlobalOverrides & ThreadOverrides & CommentOverrides & ComposerOverrides>;
1308
- /**
1309
- * Override the component's components.
1310
- */
1311
- components?: Partial<GlobalComponents>;
1312
- }
1313
- /**
1314
- * Displays a thread of comments, with a composer to reply
1315
- * to it.
1316
- *
1317
- * @example
1318
- * <>
1319
- * {threads.map((thread) => (
1320
- * <Thread key={thread.id} thread={thread} />
1321
- * ))}
1322
- * </>
1323
- */
1324
- declare const Thread: <TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM>(props: ThreadProps<TM, CM> & RefAttributes<HTMLDivElement>) => JSX.Element;
1325
-
1326
- interface FloatingThreadProps<TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> extends ThreadProps<TM, CM>, Relax<Pick<Popover.PopoverProps, "defaultOpen" | "open" | "onOpenChange"> & Pick<Popover.PopoverContentProps, "side" | "sideOffset" | "align" | "alignOffset">> {
1327
- /**
1328
- * The element which opens the floating thread.
1329
- */
1330
- children: ReactNode;
1331
- }
1332
- /**
1333
- * Displays a floating thread attached to a trigger element.
1334
- */
1335
- declare const FloatingThread: <TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM>(props: FloatingThreadProps<TM, CM> & RefAttributes<HTMLDivElement>) => JSX.Element;
1185
+ Date: typeof CommentDate;
1186
+ };
1336
1187
 
1337
1188
  interface HistoryVersionSummaryProps extends ComponentPropsWithoutRef<"button"> {
1338
1189
  version: HistoryVersion;
@@ -1529,6 +1380,139 @@ interface InboxNotificationListProps extends ComponentPropsWithoutRef<"ol"> {
1529
1380
  */
1530
1381
  declare const InboxNotificationList: react.ForwardRefExoticComponent<InboxNotificationListProps & react.RefAttributes<HTMLOListElement>>;
1531
1382
 
1383
+ interface ThreadComponents<_TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> {
1384
+ /**
1385
+ * The component used to display comments.
1386
+ */
1387
+ Comment: ComponentType<CommentProps<CM>>;
1388
+ }
1389
+ interface ThreadProps<TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> extends ComponentPropsWithoutRef<"div"> {
1390
+ /**
1391
+ * The thread to display.
1392
+ */
1393
+ thread: ThreadData<TM, CM>;
1394
+ /**
1395
+ * How to show or hide the composer to reply to the thread.
1396
+ */
1397
+ showComposer?: boolean | "collapsed";
1398
+ /**
1399
+ * Whether to show the action to resolve the thread.
1400
+ */
1401
+ showResolveAction?: boolean;
1402
+ /**
1403
+ * How to show or hide the actions.
1404
+ */
1405
+ showActions?: CommentProps["showActions"];
1406
+ /**
1407
+ * Whether to show reactions.
1408
+ */
1409
+ showReactions?: CommentProps["showReactions"];
1410
+ /**
1411
+ * Whether to show the composer's formatting controls.
1412
+ */
1413
+ showComposerFormattingControls?: ComposerProps["showFormattingControls"];
1414
+ /**
1415
+ * Add (or change) items to display in a comment's dropdown.
1416
+ */
1417
+ commentDropdownItems?: ReactNode | ((props: PropsWithChildren<{
1418
+ comment: CommentData<CM>;
1419
+ }>) => ReactNode);
1420
+ /**
1421
+ * The maximum number of comments to show.
1422
+ *
1423
+ * The first and last comments are always shown and by default if some comments
1424
+ * are hidden, only the first comment will be shown before the "show more" button
1425
+ * and after it will be shown all the newest comments to fit the limit set.
1426
+ *
1427
+ * It's possible to customize this by setting `maxVisibleComments` to an object:
1428
+ *
1429
+ * @example
1430
+ * // Only show the last comment, and all the older ones to fit the limit.
1431
+ * <Thread maxVisibleComments={{ max: 5, show: "oldest" }} />
1432
+ *
1433
+ * @example
1434
+ * // Show as many old comments as new ones to fit the limit.
1435
+ * <Thread maxVisibleComments={{ max: 5, show: "both" }} />
1436
+ */
1437
+ maxVisibleComments?: number | {
1438
+ max: number;
1439
+ show: "oldest" | "both" | "newest";
1440
+ };
1441
+ /**
1442
+ * Whether to blur the composer editor when the composer is submitted.
1443
+ */
1444
+ blurComposerOnSubmit?: ComposerProps["blurOnSubmit"];
1445
+ /**
1446
+ * Whether to indent the comments' content.
1447
+ */
1448
+ indentCommentContent?: CommentProps["indentContent"];
1449
+ /**
1450
+ * Additional content to display below the thread's comments.
1451
+ */
1452
+ additionalContent?: ReactNode;
1453
+ /**
1454
+ * Whether to show deleted comments.
1455
+ */
1456
+ showDeletedComments?: CommentProps["showDeleted"];
1457
+ /**
1458
+ * Whether to show attachments.
1459
+ */
1460
+ showAttachments?: boolean;
1461
+ /**
1462
+ * The event handler called when changing the resolved status.
1463
+ */
1464
+ onResolvedChange?: (resolved: boolean) => void;
1465
+ /**
1466
+ * The event handler called when a comment is edited.
1467
+ */
1468
+ onCommentEdit?: CommentProps["onCommentEdit"];
1469
+ /**
1470
+ * The event handler called when a comment is deleted.
1471
+ */
1472
+ onCommentDelete?: CommentProps["onCommentDelete"];
1473
+ /**
1474
+ * The event handler called when the thread is deleted.
1475
+ * A thread is deleted when all its comments are deleted.
1476
+ */
1477
+ onThreadDelete?: (thread: ThreadData<TM, CM>) => void;
1478
+ /**
1479
+ * The event handler called when clicking on a comment's author.
1480
+ */
1481
+ onAuthorClick?: CommentProps["onAuthorClick"];
1482
+ /**
1483
+ * The event handler called when clicking on a mention.
1484
+ */
1485
+ onMentionClick?: CommentProps["onMentionClick"];
1486
+ /**
1487
+ * The event handler called when clicking on a comment's attachment.
1488
+ */
1489
+ onAttachmentClick?: CommentProps["onAttachmentClick"];
1490
+ /**
1491
+ * The event handler called when the composer is submitted.
1492
+ */
1493
+ onComposerSubmit?: ComposerProps["onComposerSubmit"];
1494
+ /**
1495
+ * Override the component's strings.
1496
+ */
1497
+ overrides?: Partial<GlobalOverrides & ThreadOverrides & CommentOverrides & ComposerOverrides>;
1498
+ /**
1499
+ * Override the component's components.
1500
+ */
1501
+ components?: Partial<GlobalComponents & ThreadComponents>;
1502
+ }
1503
+ /**
1504
+ * Displays a thread of comments, with a composer to reply
1505
+ * to it.
1506
+ *
1507
+ * @example
1508
+ * <>
1509
+ * {threads.map((thread) => (
1510
+ * <Thread key={thread.id} thread={thread} />
1511
+ * ))}
1512
+ * </>
1513
+ */
1514
+ declare const Thread: <TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM>(props: ThreadProps<TM, CM> & RefAttributes<HTMLDivElement>) => JSX.Element;
1515
+
1532
1516
  type LiveblocksUiConfigProps = PropsWithChildren<{
1533
1517
  /**
1534
1518
  * Override the components' strings.
@@ -1728,4 +1712,4 @@ declare namespace icon {
1728
1712
  };
1729
1713
  }
1730
1714
 
1731
- export { AiChat, AiChatComponents, AiChatComponentsEmptyProps, AiChatComponentsLoadingProps, AiChatProps, AiComposerSubmitMessage, AiTool, AiToolIconProps, AiToolProps, AvatarStack, AvatarStackProps, Comment, CommentAttachmentArgs, CommentDropdownItemProps, CommentOverrides, CommentPin, CommentPinProps, CommentProps, Composer, ComposerBodyMark, ComposerBodyMarks, ComposerOverrides, ComposerProps, ComposerSubmitComment, Cursor, CursorProps, Cursors, CursorsProps, FloatingComposer, FloatingComposerProps, FloatingThread, FloatingThreadProps, GlobalOverrides, HistoryVersionSummary, HistoryVersionSummaryList, HistoryVersionSummaryListProps, HistoryVersionSummaryProps, icon as Icon, InboxNotification, InboxNotificationAvatarProps, InboxNotificationCustomKindProps, InboxNotificationCustomProps, InboxNotificationIconProps, InboxNotificationInspectorProps, InboxNotificationList, InboxNotificationListProps, InboxNotificationOverrides, InboxNotificationProps, InboxNotificationTextMentionKindProps, InboxNotificationTextMentionProps, InboxNotificationThreadKindProps, InboxNotificationThreadProps, LiveblocksUiConfig, LocalizationOverrides, Overrides, Thread, ThreadOverrides, ThreadProps, useOverrides };
1715
+ export { AiChat, AiChatComponents, AiChatComponentsEmptyProps, AiChatComponentsLoadingProps, AiChatProps, AiComposerSubmitMessage, AiTool, AiToolIconProps, AiToolProps, Comment, CommentAttachmentArgs, CommentAuthorProps, CommentAvatarProps, CommentDateProps, CommentDropdownItemProps, CommentOverrides, CommentProps, Composer, ComposerBodyMark, ComposerBodyMarks, ComposerOverrides, ComposerProps, ComposerSubmitComment, GlobalOverrides, HistoryVersionSummary, HistoryVersionSummaryList, HistoryVersionSummaryListProps, HistoryVersionSummaryProps, icon as Icon, InboxNotification, InboxNotificationAvatarProps, InboxNotificationCustomKindProps, InboxNotificationCustomProps, InboxNotificationIconProps, InboxNotificationInspectorProps, InboxNotificationList, InboxNotificationListProps, InboxNotificationOverrides, InboxNotificationProps, InboxNotificationTextMentionKindProps, InboxNotificationTextMentionProps, InboxNotificationThreadKindProps, InboxNotificationThreadProps, LiveblocksUiConfig, LocalizationOverrides, Overrides, Thread, ThreadOverrides, ThreadProps, useOverrides };