@liveblocks/react-ui 2.18.3 → 2.18.4-uns2
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.
- package/dist/_private/index.cjs +118 -0
- package/dist/_private/index.cjs.map +1 -0
- package/dist/_private/index.js +54 -117
- package/dist/_private/index.js.map +1 -1
- package/dist/components/{Comment.mjs → Comment.cjs} +196 -169
- package/dist/components/{Comment.mjs.map → Comment.cjs.map} +1 -1
- package/dist/components/Comment.js +168 -195
- package/dist/components/Comment.js.map +1 -1
- package/dist/components/{Composer.mjs → Composer.cjs} +151 -148
- package/dist/components/{Composer.mjs.map → Composer.cjs.map} +1 -1
- package/dist/components/Composer.js +147 -150
- package/dist/components/Composer.js.map +1 -1
- package/dist/components/HistoryVersionSummary.cjs +45 -0
- package/dist/components/{HistoryVersionSummary.mjs.map → HistoryVersionSummary.cjs.map} +1 -1
- package/dist/components/HistoryVersionSummary.js +17 -19
- package/dist/components/HistoryVersionSummary.js.map +1 -1
- package/dist/components/HistoryVersionSummaryList.cjs +25 -0
- package/dist/components/{HistoryVersionSummaryList.mjs.map → HistoryVersionSummaryList.cjs.map} +1 -1
- package/dist/components/HistoryVersionSummaryList.js +8 -10
- package/dist/components/HistoryVersionSummaryList.js.map +1 -1
- package/dist/components/{InboxNotification.mjs → InboxNotification.cjs} +124 -122
- package/dist/components/{InboxNotification.mjs.map → InboxNotification.cjs.map} +1 -1
- package/dist/components/InboxNotification.js +121 -123
- package/dist/components/InboxNotification.js.map +1 -1
- package/dist/components/InboxNotificationList.cjs +42 -0
- package/dist/components/{InboxNotificationList.mjs.map → InboxNotificationList.cjs.map} +1 -1
- package/dist/components/InboxNotificationList.js +14 -16
- package/dist/components/InboxNotificationList.js.map +1 -1
- package/dist/components/{Thread.mjs → Thread.cjs} +70 -49
- package/dist/components/{Thread.mjs.map → Thread.cjs.map} +1 -1
- package/dist/components/Thread.js +48 -69
- package/dist/components/Thread.js.map +1 -1
- package/dist/components/internal/{Attachment.mjs → Attachment.cjs} +82 -78
- package/dist/components/internal/{Attachment.mjs.map → Attachment.cjs.map} +1 -1
- package/dist/components/internal/Attachment.js +77 -81
- package/dist/components/internal/Attachment.js.map +1 -1
- package/dist/components/internal/{Attribution.mjs → Attribution.cjs} +10 -8
- package/dist/components/internal/{Attribution.mjs.map → Attribution.cjs.map} +1 -1
- package/dist/components/internal/Attribution.js +7 -9
- package/dist/components/internal/Attribution.js.map +1 -1
- package/dist/components/internal/Avatar.cjs +48 -0
- package/dist/components/internal/{Avatar.mjs.map → Avatar.cjs.map} +1 -1
- package/dist/components/internal/Avatar.js +18 -20
- package/dist/components/internal/Avatar.js.map +1 -1
- package/dist/components/internal/Button.cjs +80 -0
- package/dist/components/internal/{Button.mjs.map → Button.cjs.map} +1 -1
- package/dist/components/internal/Button.js +19 -23
- package/dist/components/internal/Button.js.map +1 -1
- package/dist/components/internal/Dropdown.cjs +92 -0
- package/dist/components/internal/{Dropdown.mjs.map → Dropdown.cjs.map} +1 -1
- package/dist/components/internal/Dropdown.js +22 -47
- package/dist/components/internal/Dropdown.js.map +1 -1
- package/dist/components/internal/Emoji.cjs +19 -0
- package/dist/components/internal/{Emoji.mjs.map → Emoji.cjs.map} +1 -1
- package/dist/components/internal/Emoji.js +8 -10
- package/dist/components/internal/Emoji.js.map +1 -1
- package/dist/components/internal/EmojiPicker.cjs +208 -0
- package/dist/components/internal/{EmojiPicker.mjs.map → EmojiPicker.cjs.map} +1 -1
- package/dist/components/internal/EmojiPicker.js +52 -76
- package/dist/components/internal/EmojiPicker.js.map +1 -1
- package/dist/components/internal/{Icon.mjs → Icon.cjs} +10 -6
- package/dist/components/internal/{Icon.mjs.map → Icon.cjs.map} +1 -1
- package/dist/components/internal/Icon.js +5 -9
- package/dist/components/internal/Icon.js.map +1 -1
- package/dist/components/internal/{InboxNotificationThread.mjs → InboxNotificationThread.cjs} +34 -30
- package/dist/components/internal/{InboxNotificationThread.mjs.map → InboxNotificationThread.cjs.map} +1 -1
- package/dist/components/internal/InboxNotificationThread.js +29 -33
- package/dist/components/internal/InboxNotificationThread.js.map +1 -1
- package/dist/components/internal/List.cjs +36 -0
- package/dist/components/internal/{List.mjs.map → List.cjs.map} +1 -1
- package/dist/components/internal/List.js +14 -16
- package/dist/components/internal/List.js.map +1 -1
- package/dist/components/internal/Room.cjs +24 -0
- package/dist/components/internal/{Room.mjs.map → Room.cjs.map} +1 -1
- package/dist/components/internal/Room.js +9 -11
- package/dist/components/internal/Room.js.map +1 -1
- package/dist/components/internal/Tooltip.cjs +134 -0
- package/dist/components/internal/{Tooltip.mjs.map → Tooltip.cjs.map} +1 -1
- package/dist/components/internal/Tooltip.js +29 -54
- package/dist/components/internal/Tooltip.js.map +1 -1
- package/dist/components/internal/User.cjs +28 -0
- package/dist/components/internal/{User.mjs.map → User.cjs.map} +1 -1
- package/dist/components/internal/User.js +13 -15
- package/dist/components/internal/User.js.map +1 -1
- package/dist/components.cjs +48 -0
- package/dist/{components.mjs.map → components.cjs.map} +1 -1
- package/dist/components.js +9 -14
- package/dist/components.js.map +1 -1
- package/dist/config.cjs +39 -0
- package/dist/{config.mjs.map → config.cjs.map} +1 -1
- package/dist/config.js +15 -18
- package/dist/config.js.map +1 -1
- package/dist/{constants.mjs → constants.cjs} +6 -2
- package/dist/{constants.mjs.map → constants.cjs.map} +1 -1
- package/dist/constants.js +1 -5
- package/dist/constants.js.map +1 -1
- package/dist/icon.cjs +69 -0
- package/dist/icon.cjs.map +1 -0
- package/dist/icon.js +32 -68
- package/dist/icon.js.map +1 -1
- package/dist/icons/ArrowCornerDownRight.cjs +16 -0
- package/dist/icons/{ArrowCornerDownRight.mjs.map → ArrowCornerDownRight.cjs.map} +1 -1
- package/dist/icons/ArrowCornerDownRight.js +5 -7
- package/dist/icons/ArrowCornerDownRight.js.map +1 -1
- package/dist/icons/ArrowCornerUpRight.cjs +16 -0
- package/dist/icons/ArrowCornerUpRight.cjs.map +1 -0
- package/dist/icons/ArrowCornerUpRight.js +5 -7
- package/dist/icons/ArrowCornerUpRight.js.map +1 -1
- package/dist/icons/ArrowDown.cjs +16 -0
- package/dist/icons/ArrowDown.cjs.map +1 -0
- package/dist/icons/ArrowDown.js +5 -7
- package/dist/icons/ArrowDown.js.map +1 -1
- package/dist/icons/ArrowUp.cjs +16 -0
- package/dist/icons/ArrowUp.cjs.map +1 -0
- package/dist/icons/ArrowUp.js +5 -7
- package/dist/icons/ArrowUp.js.map +1 -1
- package/dist/icons/{Attachment.mjs → Attachment.cjs} +8 -6
- package/dist/icons/{Attachment.mjs.map → Attachment.cjs.map} +1 -1
- package/dist/icons/Attachment.js +5 -7
- package/dist/icons/Attachment.js.map +1 -1
- package/dist/icons/Blockquote.cjs +16 -0
- package/dist/icons/Blockquote.cjs.map +1 -0
- package/dist/icons/Blockquote.js +5 -7
- package/dist/icons/Blockquote.js.map +1 -1
- package/dist/icons/Bold.cjs +16 -0
- package/dist/icons/{Bold.mjs.map → Bold.cjs.map} +1 -1
- package/dist/icons/Bold.js +5 -7
- package/dist/icons/Bold.js.map +1 -1
- package/dist/icons/Check.cjs +16 -0
- package/dist/icons/Check.cjs.map +1 -0
- package/dist/icons/Check.js +5 -7
- package/dist/icons/Check.js.map +1 -1
- package/dist/icons/ChevronDown.cjs +16 -0
- package/dist/icons/{ChevronDown.mjs.map → ChevronDown.cjs.map} +1 -1
- package/dist/icons/ChevronDown.js +5 -7
- package/dist/icons/ChevronDown.js.map +1 -1
- package/dist/icons/ChevronLeft.cjs +16 -0
- package/dist/icons/{ChevronLeft.mjs.map → ChevronLeft.cjs.map} +1 -1
- package/dist/icons/ChevronLeft.js +5 -7
- package/dist/icons/ChevronLeft.js.map +1 -1
- package/dist/icons/ChevronRight.cjs +16 -0
- package/dist/icons/{ChevronRight.mjs.map → ChevronRight.cjs.map} +1 -1
- package/dist/icons/ChevronRight.js +5 -7
- package/dist/icons/ChevronRight.js.map +1 -1
- package/dist/icons/ChevronUp.cjs +16 -0
- package/dist/icons/{ChevronUp.mjs.map → ChevronUp.cjs.map} +1 -1
- package/dist/icons/ChevronUp.js +5 -7
- package/dist/icons/ChevronUp.js.map +1 -1
- package/dist/icons/Code.cjs +16 -0
- package/dist/icons/Code.cjs.map +1 -0
- package/dist/icons/Code.js +5 -7
- package/dist/icons/Code.js.map +1 -1
- package/dist/icons/Comment.cjs +16 -0
- package/dist/icons/{Comment.mjs.map → Comment.cjs.map} +1 -1
- package/dist/icons/Comment.js +5 -7
- package/dist/icons/Comment.js.map +1 -1
- package/dist/icons/Cross.cjs +21 -0
- package/dist/icons/Cross.cjs.map +1 -0
- package/dist/icons/Cross.js +6 -8
- package/dist/icons/Cross.js.map +1 -1
- package/dist/icons/Delete.cjs +16 -0
- package/dist/icons/{Delete.mjs.map → Delete.cjs.map} +1 -1
- package/dist/icons/Delete.js +5 -7
- package/dist/icons/Delete.js.map +1 -1
- package/dist/icons/Edit.cjs +16 -0
- package/dist/icons/{Edit.mjs.map → Edit.cjs.map} +1 -1
- package/dist/icons/Edit.js +5 -7
- package/dist/icons/Edit.js.map +1 -1
- package/dist/icons/Ellipsis.cjs +31 -0
- package/dist/icons/Ellipsis.cjs.map +1 -0
- package/dist/icons/Ellipsis.js +7 -9
- package/dist/icons/Ellipsis.js.map +1 -1
- package/dist/icons/Emoji.cjs +34 -0
- package/dist/icons/Emoji.cjs.map +1 -0
- package/dist/icons/Emoji.js +9 -11
- package/dist/icons/Emoji.js.map +1 -1
- package/dist/icons/EmojiAdd.cjs +37 -0
- package/dist/icons/EmojiAdd.cjs.map +1 -0
- package/dist/icons/EmojiAdd.js +10 -12
- package/dist/icons/EmojiAdd.js.map +1 -1
- package/dist/icons/H1.cjs +16 -0
- package/dist/icons/{H1.mjs.map → H1.cjs.map} +1 -1
- package/dist/icons/H1.js +5 -7
- package/dist/icons/H1.js.map +1 -1
- package/dist/icons/H2.cjs +16 -0
- package/dist/icons/H2.cjs.map +1 -0
- package/dist/icons/H2.js +5 -7
- package/dist/icons/H2.js.map +1 -1
- package/dist/icons/H3.cjs +16 -0
- package/dist/icons/{H3.mjs.map → H3.cjs.map} +1 -1
- package/dist/icons/H3.js +5 -7
- package/dist/icons/H3.js.map +1 -1
- package/dist/icons/Italic.cjs +16 -0
- package/dist/icons/{Italic.mjs.map → Italic.cjs.map} +1 -1
- package/dist/icons/Italic.js +5 -7
- package/dist/icons/Italic.js.map +1 -1
- package/dist/icons/Lengthen.cjs +16 -0
- package/dist/icons/Lengthen.cjs.map +1 -0
- package/dist/icons/Lengthen.js +5 -7
- package/dist/icons/Lengthen.js.map +1 -1
- package/dist/icons/ListOrdered.cjs +16 -0
- package/dist/icons/{ListOrdered.mjs.map → ListOrdered.cjs.map} +1 -1
- package/dist/icons/ListOrdered.js +5 -7
- package/dist/icons/ListOrdered.js.map +1 -1
- package/dist/icons/ListUnordered.cjs +39 -0
- package/dist/icons/ListUnordered.cjs.map +1 -0
- package/dist/icons/ListUnordered.js +10 -12
- package/dist/icons/ListUnordered.js.map +1 -1
- package/dist/icons/Mention.cjs +21 -0
- package/dist/icons/Mention.cjs.map +1 -0
- package/dist/icons/Mention.js +6 -8
- package/dist/icons/Mention.js.map +1 -1
- package/dist/icons/QuestionMark.cjs +26 -0
- package/dist/icons/QuestionMark.cjs.map +1 -0
- package/dist/icons/QuestionMark.js +7 -9
- package/dist/icons/QuestionMark.js.map +1 -1
- package/dist/icons/Redo.cjs +21 -0
- package/dist/icons/Redo.cjs.map +1 -0
- package/dist/icons/Redo.js +6 -8
- package/dist/icons/Redo.js.map +1 -1
- package/dist/icons/Resolve.cjs +23 -0
- package/dist/icons/Resolve.cjs.map +1 -0
- package/dist/icons/Resolve.js +6 -8
- package/dist/icons/Resolve.js.map +1 -1
- package/dist/icons/Resolved.cjs +25 -0
- package/dist/icons/Resolved.cjs.map +1 -0
- package/dist/icons/Resolved.js +6 -8
- package/dist/icons/Resolved.js.map +1 -1
- package/dist/icons/Restore.cjs +21 -0
- package/dist/icons/Restore.cjs.map +1 -0
- package/dist/icons/Restore.js +6 -8
- package/dist/icons/Restore.js.map +1 -1
- package/dist/icons/Search.cjs +16 -0
- package/dist/icons/{Search.mjs.map → Search.cjs.map} +1 -1
- package/dist/icons/Search.js +5 -7
- package/dist/icons/Search.js.map +1 -1
- package/dist/icons/Send.cjs +16 -0
- package/dist/icons/Send.cjs.map +1 -0
- package/dist/icons/Send.js +5 -7
- package/dist/icons/Send.js.map +1 -1
- package/dist/icons/Shorten.cjs +16 -0
- package/dist/icons/{Shorten.mjs.map → Shorten.cjs.map} +1 -1
- package/dist/icons/Shorten.js +5 -7
- package/dist/icons/Shorten.js.map +1 -1
- package/dist/icons/{Sparkles.mjs → Sparkles.cjs} +8 -6
- package/dist/icons/{Sparkles.mjs.map → Sparkles.cjs.map} +1 -1
- package/dist/icons/Sparkles.js +5 -7
- package/dist/icons/Sparkles.js.map +1 -1
- package/dist/icons/SparklesText.cjs +21 -0
- package/dist/icons/{SparklesText.mjs.map → SparklesText.cjs.map} +1 -1
- package/dist/icons/SparklesText.js +6 -8
- package/dist/icons/SparklesText.js.map +1 -1
- package/dist/icons/Spinner.cjs +17 -0
- package/dist/icons/Spinner.cjs.map +1 -0
- package/dist/icons/Spinner.js +5 -7
- package/dist/icons/Spinner.js.map +1 -1
- package/dist/icons/Strikethrough.cjs +16 -0
- package/dist/icons/{Strikethrough.mjs.map → Strikethrough.cjs.map} +1 -1
- package/dist/icons/Strikethrough.js +5 -7
- package/dist/icons/Strikethrough.js.map +1 -1
- package/dist/icons/Text.cjs +16 -0
- package/dist/icons/{Text.mjs.map → Text.cjs.map} +1 -1
- package/dist/icons/Text.js +5 -7
- package/dist/icons/Text.js.map +1 -1
- package/dist/icons/Translate.cjs +21 -0
- package/dist/icons/{Translate.mjs.map → Translate.cjs.map} +1 -1
- package/dist/icons/Translate.js +6 -8
- package/dist/icons/Translate.js.map +1 -1
- package/dist/icons/Underline.cjs +16 -0
- package/dist/icons/Underline.cjs.map +1 -0
- package/dist/icons/Underline.js +5 -7
- package/dist/icons/Underline.js.map +1 -1
- package/dist/icons/Undo.cjs +21 -0
- package/dist/icons/Undo.cjs.map +1 -0
- package/dist/icons/Undo.js +6 -8
- package/dist/icons/Undo.js.map +1 -1
- package/dist/icons/Warning.cjs +23 -0
- package/dist/icons/Warning.cjs.map +1 -0
- package/dist/icons/Warning.js +6 -8
- package/dist/icons/Warning.js.map +1 -1
- package/dist/icons/index.cjs +96 -0
- package/dist/icons/index.cjs.map +1 -0
- package/dist/icons/index.js +45 -95
- package/dist/icons/index.js.map +1 -1
- package/dist/index.cjs +28 -0
- package/dist/{index.mjs.map → index.cjs.map} +1 -1
- package/dist/index.js +14 -26
- package/dist/index.js.map +1 -1
- package/dist/{overrides.mjs → overrides.cjs} +32 -27
- package/dist/{overrides.mjs.map → overrides.cjs.map} +1 -1
- package/dist/overrides.js +26 -31
- package/dist/overrides.js.map +1 -1
- package/dist/primitives/Comment/{index.mjs → index.cjs} +35 -31
- package/dist/primitives/Comment/{index.mjs.map → index.cjs.map} +1 -1
- package/dist/primitives/Comment/index.js +30 -34
- package/dist/primitives/Comment/index.js.map +1 -1
- package/dist/primitives/Comment/{utils.mjs → utils.cjs} +7 -2
- package/dist/primitives/Comment/{utils.mjs.map → utils.cjs.map} +1 -1
- package/dist/primitives/Comment/utils.js +1 -6
- package/dist/primitives/Comment/utils.js.map +1 -1
- package/dist/primitives/Composer/contexts.cjs +60 -0
- package/dist/primitives/Composer/{contexts.mjs.map → contexts.cjs.map} +1 -1
- package/dist/primitives/Composer/contexts.js +18 -30
- package/dist/primitives/Composer/contexts.js.map +1 -1
- package/dist/primitives/Composer/{index.mjs → index.cjs} +305 -273
- package/dist/primitives/Composer/{index.mjs.map → index.cjs.map} +1 -1
- package/dist/primitives/Composer/index.js +272 -304
- package/dist/primitives/Composer/index.js.map +1 -1
- package/dist/primitives/Composer/{utils.mjs → utils.cjs} +79 -64
- package/dist/primitives/Composer/{utils.mjs.map → utils.cjs.map} +1 -1
- package/dist/primitives/Composer/utils.js +63 -78
- package/dist/primitives/Composer/utils.js.map +1 -1
- package/dist/primitives/EmojiPicker/contexts.cjs +19 -0
- package/dist/primitives/EmojiPicker/{contexts.mjs.map → contexts.cjs.map} +1 -1
- package/dist/primitives/EmojiPicker/contexts.js +6 -9
- package/dist/primitives/EmojiPicker/contexts.js.map +1 -1
- package/dist/primitives/EmojiPicker/{index.mjs → index.cjs} +96 -92
- package/dist/primitives/EmojiPicker/{index.mjs.map → index.cjs.map} +1 -1
- package/dist/primitives/EmojiPicker/index.js +91 -95
- package/dist/primitives/EmojiPicker/index.js.map +1 -1
- package/dist/primitives/EmojiPicker/{utils.mjs → utils.cjs} +14 -10
- package/dist/primitives/EmojiPicker/{utils.mjs.map → utils.cjs.map} +1 -1
- package/dist/primitives/EmojiPicker/utils.js +9 -13
- package/dist/primitives/EmojiPicker/utils.js.map +1 -1
- package/dist/primitives/FileSize.cjs +36 -0
- package/dist/primitives/{FileSize.mjs.map → FileSize.cjs.map} +1 -1
- package/dist/primitives/FileSize.js +10 -12
- package/dist/primitives/FileSize.js.map +1 -1
- package/dist/primitives/{Timestamp.mjs → Timestamp.cjs} +27 -25
- package/dist/primitives/{Timestamp.mjs.map → Timestamp.cjs.map} +1 -1
- package/dist/primitives/Timestamp.js +24 -26
- package/dist/primitives/Timestamp.js.map +1 -1
- package/dist/primitives/index.cjs +20 -0
- package/dist/primitives/index.cjs.map +1 -0
- package/dist/primitives/index.js +10 -19
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/internal/Emoji.cjs +32 -0
- package/dist/primitives/internal/{Emoji.mjs.map → Emoji.cjs.map} +1 -1
- package/dist/primitives/internal/Emoji.js +9 -11
- package/dist/primitives/internal/Emoji.js.map +1 -1
- package/dist/shared.cjs +13 -0
- package/dist/{shared.mjs.map → shared.cjs.map} +1 -1
- package/dist/shared.js +6 -8
- package/dist/shared.js.map +1 -1
- package/dist/slate/plugins/{auto-formatting.mjs → auto-formatting.cjs} +18 -16
- package/dist/slate/plugins/{auto-formatting.mjs.map → auto-formatting.cjs.map} +1 -1
- package/dist/slate/plugins/auto-formatting.js +15 -17
- package/dist/slate/plugins/auto-formatting.js.map +1 -1
- package/dist/slate/plugins/{auto-links.mjs → auto-links.cjs} +43 -40
- package/dist/slate/plugins/{auto-links.mjs.map → auto-links.cjs.map} +1 -1
- package/dist/slate/plugins/auto-links.js +39 -42
- package/dist/slate/plugins/auto-links.js.map +1 -1
- package/dist/slate/plugins/{custom-links.mjs → custom-links.cjs} +19 -16
- package/dist/slate/plugins/{custom-links.mjs.map → custom-links.cjs.map} +1 -1
- package/dist/slate/plugins/custom-links.js +15 -18
- package/dist/slate/plugins/custom-links.js.map +1 -1
- package/dist/slate/plugins/empty-clear-formatting.cjs +18 -0
- package/dist/slate/plugins/{empty-clear-formatting.mjs.map → empty-clear-formatting.cjs.map} +1 -1
- package/dist/slate/plugins/empty-clear-formatting.js +5 -7
- package/dist/slate/plugins/empty-clear-formatting.js.map +1 -1
- package/dist/slate/plugins/mentions.cjs +129 -0
- package/dist/slate/plugins/{mentions.mjs.map → mentions.cjs.map} +1 -1
- package/dist/slate/plugins/mentions.js +35 -42
- package/dist/slate/plugins/mentions.js.map +1 -1
- package/dist/slate/plugins/normalize.cjs +28 -0
- package/dist/slate/plugins/normalize.cjs.map +1 -0
- package/dist/slate/plugins/normalize.js +8 -10
- package/dist/slate/plugins/normalize.js.map +1 -1
- package/dist/slate/plugins/{paste.mjs → paste.cjs} +14 -12
- package/dist/slate/plugins/{paste.mjs.map → paste.cjs.map} +1 -1
- package/dist/slate/plugins/paste.js +11 -13
- package/dist/slate/plugins/paste.js.map +1 -1
- package/dist/slate/utils/get-character.cjs +50 -0
- package/dist/slate/utils/{get-character.mjs.map → get-character.cjs.map} +1 -1
- package/dist/slate/utils/get-character.js +10 -13
- package/dist/slate/utils/get-character.js.map +1 -1
- package/dist/slate/utils/get-dom-range.cjs +17 -0
- package/dist/slate/utils/{get-dom-range.mjs.map → get-dom-range.cjs.map} +1 -1
- package/dist/slate/utils/get-dom-range.js +3 -5
- package/dist/slate/utils/get-dom-range.js.map +1 -1
- package/dist/slate/utils/{get-match-range.mjs → get-match-range.cjs} +14 -12
- package/dist/slate/utils/{get-match-range.mjs.map → get-match-range.cjs.map} +1 -1
- package/dist/slate/utils/get-match-range.js +11 -13
- package/dist/slate/utils/get-match-range.js.map +1 -1
- package/dist/slate/utils/is-empty-string.cjs +8 -0
- package/dist/slate/utils/is-empty-string.cjs.map +1 -0
- package/dist/slate/utils/is-empty-string.js +1 -3
- package/dist/slate/utils/is-empty-string.js.map +1 -1
- package/dist/slate/utils/is-empty.cjs +27 -0
- package/dist/slate/utils/{is-empty.mjs.map → is-empty.cjs.map} +1 -1
- package/dist/slate/utils/is-empty.js +8 -10
- package/dist/slate/utils/is-empty.js.map +1 -1
- package/dist/slate/utils/{is-text.mjs → is-text.cjs} +5 -2
- package/dist/slate/utils/{is-text.mjs.map → is-text.cjs.map} +1 -1
- package/dist/slate/utils/is-text.js +1 -4
- package/dist/slate/utils/is-text.js.map +1 -1
- package/dist/slate/utils/{is-whitespace-character.mjs → is-whitespace-character.cjs} +4 -2
- package/dist/slate/utils/{is-whitespace-character.mjs.map → is-whitespace-character.cjs.map} +1 -1
- package/dist/slate/utils/is-whitespace-character.js +1 -3
- package/dist/slate/utils/is-whitespace-character.js.map +1 -1
- package/dist/slate/utils/marks.cjs +62 -0
- package/dist/slate/utils/{marks.mjs.map → marks.cjs.map} +1 -1
- package/dist/slate/utils/marks.js +12 -19
- package/dist/slate/utils/marks.js.map +1 -1
- package/dist/slate/utils/selection-contains-inlines.cjs +36 -0
- package/dist/slate/utils/selection-contains-inlines.cjs.map +1 -0
- package/dist/slate/utils/selection-contains-inlines.js +7 -9
- package/dist/slate/utils/selection-contains-inlines.js.map +1 -1
- package/dist/utils/{Persist.mjs → Persist.cjs} +26 -22
- package/dist/utils/{Persist.mjs.map → Persist.cjs.map} +1 -1
- package/dist/utils/Persist.js +21 -25
- package/dist/utils/Persist.js.map +1 -1
- package/dist/utils/Portal.cjs +29 -0
- package/dist/utils/{Portal.mjs.map → Portal.cjs.map} +1 -1
- package/dist/utils/Portal.js +9 -11
- package/dist/utils/Portal.js.map +1 -1
- package/dist/utils/{capitalize.mjs → capitalize.cjs} +4 -2
- package/dist/utils/capitalize.cjs.map +1 -0
- package/dist/utils/capitalize.js +1 -3
- package/dist/utils/capitalize.js.map +1 -1
- package/dist/utils/{clamp.mjs → clamp.cjs} +4 -2
- package/dist/utils/clamp.cjs.map +1 -0
- package/dist/utils/clamp.js +1 -3
- package/dist/utils/clamp.js.map +1 -1
- package/dist/utils/{class-names.mjs → class-names.cjs} +4 -2
- package/dist/utils/{class-names.mjs.map → class-names.cjs.map} +1 -1
- package/dist/utils/class-names.js +1 -3
- package/dist/utils/class-names.js.map +1 -1
- package/dist/utils/{data-transfer.mjs → data-transfer.cjs} +6 -4
- package/dist/utils/{data-transfer.mjs.map → data-transfer.cjs.map} +1 -1
- package/dist/utils/data-transfer.js +3 -5
- package/dist/utils/data-transfer.js.map +1 -1
- package/dist/utils/{download.mjs → download.cjs} +4 -2
- package/dist/utils/download.cjs.map +1 -0
- package/dist/utils/download.js +1 -3
- package/dist/utils/download.js.map +1 -1
- package/dist/utils/exists.cjs +8 -0
- package/dist/utils/exists.cjs.map +1 -0
- package/dist/utils/exists.js +1 -3
- package/dist/utils/exists.js.map +1 -1
- package/dist/utils/{find-last-index.mjs → find-last-index.cjs} +4 -2
- package/dist/utils/find-last-index.cjs.map +1 -0
- package/dist/utils/find-last-index.js +1 -3
- package/dist/utils/find-last-index.js.map +1 -1
- package/dist/utils/{format-file-size.mjs → format-file-size.cjs} +6 -4
- package/dist/utils/format-file-size.cjs.map +1 -0
- package/dist/utils/format-file-size.js +3 -5
- package/dist/utils/format-file-size.js.map +1 -1
- package/dist/utils/{get-initials.mjs → get-initials.cjs} +4 -2
- package/dist/utils/get-initials.cjs.map +1 -0
- package/dist/utils/get-initials.js +1 -3
- package/dist/utils/get-initials.js.map +1 -1
- package/dist/utils/intl.cjs +30 -0
- package/dist/utils/{intl.mjs.map → intl.cjs.map} +1 -1
- package/dist/utils/intl.js +6 -11
- package/dist/utils/intl.js.map +1 -1
- package/dist/utils/{is-apple.mjs → is-apple.cjs} +4 -2
- package/dist/utils/is-apple.cjs.map +1 -0
- package/dist/utils/is-apple.js +1 -3
- package/dist/utils/is-apple.js.map +1 -1
- package/dist/utils/{is-key.mjs → is-key.cjs} +6 -4
- package/dist/utils/{is-key.mjs.map → is-key.cjs.map} +1 -1
- package/dist/utils/is-key.js +3 -5
- package/dist/utils/is-key.js.map +1 -1
- package/dist/utils/{memoize.mjs → memoize.cjs} +6 -4
- package/dist/utils/memoize.cjs.map +1 -0
- package/dist/utils/memoize.js +3 -5
- package/dist/utils/memoize.js.map +1 -1
- package/dist/utils/{pluralize.mjs → pluralize.cjs} +4 -2
- package/dist/utils/pluralize.cjs.map +1 -0
- package/dist/utils/pluralize.js +1 -3
- package/dist/utils/pluralize.js.map +1 -1
- package/dist/utils/{request-idle-callback.mjs → request-idle-callback.cjs} +5 -2
- package/dist/utils/{request-idle-callback.mjs.map → request-idle-callback.cjs.map} +1 -1
- package/dist/utils/request-idle-callback.js +1 -4
- package/dist/utils/request-idle-callback.js.map +1 -1
- package/dist/utils/{request-submit.mjs → request-submit.cjs} +4 -2
- package/dist/utils/request-submit.cjs.map +1 -0
- package/dist/utils/request-submit.js +1 -3
- package/dist/utils/request-submit.js.map +1 -1
- package/dist/utils/{url.mjs → url.cjs} +4 -2
- package/dist/utils/url.cjs.map +1 -0
- package/dist/utils/url.js +1 -3
- package/dist/utils/url.js.map +1 -1
- package/dist/utils/{use-controllable-state.mjs → use-controllable-state.cjs} +11 -9
- package/dist/utils/{use-controllable-state.mjs.map → use-controllable-state.cjs.map} +1 -1
- package/dist/utils/use-controllable-state.js +8 -10
- package/dist/utils/use-controllable-state.js.map +1 -1
- package/dist/utils/use-index.cjs +32 -0
- package/dist/utils/{use-index.mjs.map → use-index.cjs.map} +1 -1
- package/dist/utils/use-index.js +11 -13
- package/dist/utils/use-index.js.map +1 -1
- package/dist/utils/use-initial.cjs +11 -0
- package/dist/utils/{use-initial.mjs.map → use-initial.cjs.map} +1 -1
- package/dist/utils/use-initial.js +3 -5
- package/dist/utils/use-initial.js.map +1 -1
- package/dist/utils/{use-interval.mjs → use-interval.cjs} +8 -6
- package/dist/utils/use-interval.cjs.map +1 -0
- package/dist/utils/use-interval.js +5 -7
- package/dist/utils/use-interval.js.map +1 -1
- package/dist/utils/use-latest.cjs +14 -0
- package/dist/utils/{use-latest.mjs.map → use-latest.cjs.map} +1 -1
- package/dist/utils/use-latest.js +4 -6
- package/dist/utils/use-latest.js.map +1 -1
- package/dist/utils/use-observable.cjs +15 -0
- package/dist/utils/{use-observable.mjs.map → use-observable.cjs.map} +1 -1
- package/dist/utils/use-observable.js +5 -7
- package/dist/utils/use-observable.js.map +1 -1
- package/dist/utils/{use-refs.mjs → use-refs.cjs} +6 -4
- package/dist/utils/{use-refs.mjs.map → use-refs.cjs.map} +1 -1
- package/dist/utils/use-refs.js +3 -5
- package/dist/utils/use-refs.js.map +1 -1
- package/dist/utils/use-rerender.cjs +14 -0
- package/dist/utils/{use-rerender.mjs.map → use-rerender.cjs.map} +1 -1
- package/dist/utils/use-rerender.js +3 -5
- package/dist/utils/use-rerender.js.map +1 -1
- package/dist/utils/{use-visible.mjs → use-visible.cjs} +11 -8
- package/dist/utils/{use-visible.mjs.map → use-visible.cjs.map} +1 -1
- package/dist/utils/use-visible.js +7 -10
- package/dist/utils/use-visible.js.map +1 -1
- package/dist/utils/{use-window-focus.mjs → use-window-focus.cjs} +6 -4
- package/dist/utils/use-window-focus.cjs.map +1 -0
- package/dist/utils/use-window-focus.js +3 -5
- package/dist/utils/use-window-focus.js.map +1 -1
- package/dist/utils/{visually-hidden.mjs → visually-hidden.cjs} +4 -2
- package/dist/utils/visually-hidden.cjs.map +1 -0
- package/dist/utils/visually-hidden.js +1 -3
- package/dist/utils/visually-hidden.js.map +1 -1
- package/dist/utils/{wrap.mjs → wrap.cjs} +4 -2
- package/dist/utils/wrap.cjs.map +1 -0
- package/dist/utils/wrap.js +1 -3
- package/dist/utils/wrap.js.map +1 -1
- package/dist/version.cjs +10 -0
- package/dist/{version.mjs.map → version.cjs.map} +1 -1
- package/dist/version.js +3 -7
- package/dist/version.js.map +1 -1
- package/package.json +28 -27
- package/styles/dark/attributes.css.d.cts +1 -0
- package/styles/dark/media-query.css.d.cts +1 -0
- package/styles.css.d.cts +1 -0
- package/dist/_private/index.mjs +0 -55
- package/dist/_private/index.mjs.map +0 -1
- package/dist/components/HistoryVersionSummary.mjs +0 -43
- package/dist/components/HistoryVersionSummaryList.mjs +0 -23
- package/dist/components/InboxNotificationList.mjs +0 -40
- package/dist/components/internal/Avatar.mjs +0 -46
- package/dist/components/internal/Button.mjs +0 -76
- package/dist/components/internal/Dropdown.mjs +0 -67
- package/dist/components/internal/Emoji.mjs +0 -17
- package/dist/components/internal/EmojiPicker.mjs +0 -184
- package/dist/components/internal/List.mjs +0 -34
- package/dist/components/internal/Room.mjs +0 -22
- package/dist/components/internal/Tooltip.mjs +0 -109
- package/dist/components/internal/User.mjs +0 -26
- package/dist/components.mjs +0 -43
- package/dist/config.mjs +0 -36
- package/dist/icon.mjs +0 -33
- package/dist/icon.mjs.map +0 -1
- package/dist/icons/ArrowCornerDownRight.mjs +0 -14
- package/dist/icons/ArrowCornerUpRight.mjs +0 -14
- package/dist/icons/ArrowCornerUpRight.mjs.map +0 -1
- package/dist/icons/ArrowDown.mjs +0 -14
- package/dist/icons/ArrowDown.mjs.map +0 -1
- package/dist/icons/ArrowUp.mjs +0 -14
- package/dist/icons/ArrowUp.mjs.map +0 -1
- package/dist/icons/Blockquote.mjs +0 -14
- package/dist/icons/Blockquote.mjs.map +0 -1
- package/dist/icons/Bold.mjs +0 -14
- package/dist/icons/Check.mjs +0 -14
- package/dist/icons/Check.mjs.map +0 -1
- package/dist/icons/ChevronDown.mjs +0 -14
- package/dist/icons/ChevronLeft.mjs +0 -14
- package/dist/icons/ChevronRight.mjs +0 -14
- package/dist/icons/ChevronUp.mjs +0 -14
- package/dist/icons/Code.mjs +0 -14
- package/dist/icons/Code.mjs.map +0 -1
- package/dist/icons/Comment.mjs +0 -14
- package/dist/icons/Cross.mjs +0 -19
- package/dist/icons/Cross.mjs.map +0 -1
- package/dist/icons/Delete.mjs +0 -14
- package/dist/icons/Edit.mjs +0 -14
- package/dist/icons/Ellipsis.mjs +0 -29
- package/dist/icons/Ellipsis.mjs.map +0 -1
- package/dist/icons/Emoji.mjs +0 -32
- package/dist/icons/Emoji.mjs.map +0 -1
- package/dist/icons/EmojiAdd.mjs +0 -35
- package/dist/icons/EmojiAdd.mjs.map +0 -1
- package/dist/icons/H1.mjs +0 -14
- package/dist/icons/H2.mjs +0 -14
- package/dist/icons/H2.mjs.map +0 -1
- package/dist/icons/H3.mjs +0 -14
- package/dist/icons/Italic.mjs +0 -14
- package/dist/icons/Lengthen.mjs +0 -14
- package/dist/icons/Lengthen.mjs.map +0 -1
- package/dist/icons/ListOrdered.mjs +0 -14
- package/dist/icons/ListUnordered.mjs +0 -37
- package/dist/icons/ListUnordered.mjs.map +0 -1
- package/dist/icons/Mention.mjs +0 -19
- package/dist/icons/Mention.mjs.map +0 -1
- package/dist/icons/QuestionMark.mjs +0 -24
- package/dist/icons/QuestionMark.mjs.map +0 -1
- package/dist/icons/Redo.mjs +0 -19
- package/dist/icons/Redo.mjs.map +0 -1
- package/dist/icons/Resolve.mjs +0 -21
- package/dist/icons/Resolve.mjs.map +0 -1
- package/dist/icons/Resolved.mjs +0 -23
- package/dist/icons/Resolved.mjs.map +0 -1
- package/dist/icons/Restore.mjs +0 -19
- package/dist/icons/Restore.mjs.map +0 -1
- package/dist/icons/Search.mjs +0 -14
- package/dist/icons/Send.mjs +0 -14
- package/dist/icons/Send.mjs.map +0 -1
- package/dist/icons/Shorten.mjs +0 -14
- package/dist/icons/SparklesText.mjs +0 -19
- package/dist/icons/Spinner.mjs +0 -15
- package/dist/icons/Spinner.mjs.map +0 -1
- package/dist/icons/Strikethrough.mjs +0 -14
- package/dist/icons/Text.mjs +0 -14
- package/dist/icons/Translate.mjs +0 -19
- package/dist/icons/Underline.mjs +0 -14
- package/dist/icons/Underline.mjs.map +0 -1
- package/dist/icons/Undo.mjs +0 -19
- package/dist/icons/Undo.mjs.map +0 -1
- package/dist/icons/Warning.mjs +0 -21
- package/dist/icons/Warning.mjs.map +0 -1
- package/dist/icons/index.mjs +0 -46
- package/dist/icons/index.mjs.map +0 -1
- package/dist/index.mjs +0 -16
- package/dist/primitives/Composer/contexts.mjs +0 -48
- package/dist/primitives/EmojiPicker/contexts.mjs +0 -16
- package/dist/primitives/FileSize.mjs +0 -34
- package/dist/primitives/index.mjs +0 -11
- package/dist/primitives/index.mjs.map +0 -1
- package/dist/primitives/internal/Emoji.mjs +0 -30
- package/dist/shared.mjs +0 -11
- package/dist/slate/plugins/empty-clear-formatting.mjs +0 -16
- package/dist/slate/plugins/mentions.mjs +0 -122
- package/dist/slate/plugins/normalize.mjs +0 -26
- package/dist/slate/plugins/normalize.mjs.map +0 -1
- package/dist/slate/utils/get-character.mjs +0 -47
- package/dist/slate/utils/get-dom-range.mjs +0 -15
- package/dist/slate/utils/is-empty-string.mjs +0 -6
- package/dist/slate/utils/is-empty-string.mjs.map +0 -1
- package/dist/slate/utils/is-empty.mjs +0 -25
- package/dist/slate/utils/marks.mjs +0 -55
- package/dist/slate/utils/selection-contains-inlines.mjs +0 -34
- package/dist/slate/utils/selection-contains-inlines.mjs.map +0 -1
- package/dist/utils/Portal.mjs +0 -27
- package/dist/utils/capitalize.mjs.map +0 -1
- package/dist/utils/clamp.mjs.map +0 -1
- package/dist/utils/download.mjs.map +0 -1
- package/dist/utils/exists.mjs +0 -6
- package/dist/utils/exists.mjs.map +0 -1
- package/dist/utils/find-last-index.mjs.map +0 -1
- package/dist/utils/format-file-size.mjs.map +0 -1
- package/dist/utils/get-initials.mjs.map +0 -1
- package/dist/utils/intl.mjs +0 -25
- package/dist/utils/is-apple.mjs.map +0 -1
- package/dist/utils/memoize.mjs.map +0 -1
- package/dist/utils/pluralize.mjs.map +0 -1
- package/dist/utils/request-submit.mjs.map +0 -1
- package/dist/utils/url.mjs.map +0 -1
- package/dist/utils/use-index.mjs +0 -30
- package/dist/utils/use-initial.mjs +0 -9
- package/dist/utils/use-interval.mjs.map +0 -1
- package/dist/utils/use-latest.mjs +0 -12
- package/dist/utils/use-observable.mjs +0 -13
- package/dist/utils/use-rerender.mjs +0 -12
- package/dist/utils/use-window-focus.mjs.map +0 -1
- package/dist/utils/visually-hidden.mjs.map +0 -1
- package/dist/utils/wrap.mjs.map +0 -1
- package/dist/version.mjs +0 -6
- /package/dist/_private/{index.d.mts → index.d.cts} +0 -0
- /package/dist/{index.d.mts → index.d.cts} +0 -0
- /package/dist/primitives/{index.d.mts → index.d.cts} +0 -0
|
@@ -1,59 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
37
|
-
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
38
|
-
|
|
39
|
-
function _interopNamespaceDefault(e) {
|
|
40
|
-
var n = Object.create(null);
|
|
41
|
-
if (e) {
|
|
42
|
-
Object.keys(e).forEach(function (k) {
|
|
43
|
-
if (k !== 'default') {
|
|
44
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
45
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
46
|
-
enumerable: true,
|
|
47
|
-
get: function () { return e[k]; }
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
n.default = e;
|
|
53
|
-
return Object.freeze(n);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
var TogglePrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(TogglePrimitive);
|
|
2
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { useAddRoomCommentReaction, useRemoveRoomCommentReaction, useRoomAttachmentUrl, useMarkRoomThreadAsRead, useDeleteRoomComment, useEditRoomComment } from '@liveblocks/react/_private';
|
|
4
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
5
|
+
import { forwardRef, useMemo, useCallback, useRef, useState, useEffect } from 'react';
|
|
6
|
+
import { CheckIcon } from '../icons/Check.js';
|
|
7
|
+
import { CrossIcon } from '../icons/Cross.js';
|
|
8
|
+
import { DeleteIcon } from '../icons/Delete.js';
|
|
9
|
+
import { EditIcon } from '../icons/Edit.js';
|
|
10
|
+
import { EllipsisIcon } from '../icons/Ellipsis.js';
|
|
11
|
+
import { EmojiAddIcon } from '../icons/EmojiAdd.js';
|
|
12
|
+
import { useOverrides } from '../overrides.js';
|
|
13
|
+
import { Mention as CommentMention$1, Link as CommentLink$1, Body as CommentBody } from '../primitives/Comment/index.js';
|
|
14
|
+
import { Submit as ComposerSubmit } from '../primitives/Composer/index.js';
|
|
15
|
+
import { Timestamp } from '../primitives/Timestamp.js';
|
|
16
|
+
import { useCurrentUserId } from '../shared.js';
|
|
17
|
+
import { MENTION_CHARACTER } from '../slate/plugins/mentions.js';
|
|
18
|
+
import { classNames } from '../utils/class-names.js';
|
|
19
|
+
import { download } from '../utils/download.js';
|
|
20
|
+
import { useRefs } from '../utils/use-refs.js';
|
|
21
|
+
import { useVisibleCallback } from '../utils/use-visible.js';
|
|
22
|
+
import { useWindowFocus } from '../utils/use-window-focus.js';
|
|
23
|
+
import { Composer } from './Composer.js';
|
|
24
|
+
import { MediaAttachment, FileAttachment, separateMediaAttachments } from './internal/Attachment.js';
|
|
25
|
+
import { Avatar } from './internal/Avatar.js';
|
|
26
|
+
import { CustomButton, Button } from './internal/Button.js';
|
|
27
|
+
import { Dropdown, DropdownItem } from './internal/Dropdown.js';
|
|
28
|
+
import { Emoji } from './internal/Emoji.js';
|
|
29
|
+
import { EmojiPicker } from './internal/EmojiPicker.js';
|
|
30
|
+
import { List } from './internal/List.js';
|
|
31
|
+
import { Tooltip, ShortcutTooltip } from './internal/Tooltip.js';
|
|
32
|
+
import { User } from './internal/User.js';
|
|
33
|
+
import { TooltipProvider } from '@radix-ui/react-tooltip';
|
|
34
|
+
import { PopoverTrigger } from '@radix-ui/react-popover';
|
|
35
|
+
import { DropdownMenuTrigger } from '@radix-ui/react-dropdown-menu';
|
|
57
36
|
|
|
58
37
|
|
|
59
38
|
const REACTIONS_TRUNCATE = 5;
|
|
@@ -62,14 +41,14 @@ function CommentMention({
|
|
|
62
41
|
className,
|
|
63
42
|
...props
|
|
64
43
|
}) {
|
|
65
|
-
const currentId =
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
className: classNames
|
|
44
|
+
const currentId = useCurrentUserId();
|
|
45
|
+
return /* @__PURE__ */ jsxs(CommentMention$1, {
|
|
46
|
+
className: classNames("lb-comment-mention", className),
|
|
68
47
|
"data-self": userId === currentId ? "" : void 0,
|
|
69
48
|
...props,
|
|
70
49
|
children: [
|
|
71
|
-
|
|
72
|
-
/* @__PURE__ */
|
|
50
|
+
MENTION_CHARACTER,
|
|
51
|
+
/* @__PURE__ */ jsx(User, {
|
|
73
52
|
userId
|
|
74
53
|
})
|
|
75
54
|
]
|
|
@@ -81,8 +60,8 @@ function CommentLink({
|
|
|
81
60
|
className,
|
|
82
61
|
...props
|
|
83
62
|
}) {
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
className: classNames
|
|
63
|
+
return /* @__PURE__ */ jsx(CommentLink$1, {
|
|
64
|
+
className: classNames("lb-comment-link", className),
|
|
86
65
|
href,
|
|
87
66
|
...props,
|
|
88
67
|
children
|
|
@@ -94,16 +73,16 @@ function CommentNonInteractiveLink({
|
|
|
94
73
|
className,
|
|
95
74
|
...props
|
|
96
75
|
}) {
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
-
className: classNames
|
|
76
|
+
return /* @__PURE__ */ jsx("span", {
|
|
77
|
+
className: classNames("lb-comment-link", className),
|
|
99
78
|
...props,
|
|
100
79
|
children
|
|
101
80
|
});
|
|
102
81
|
}
|
|
103
|
-
const CommentReactionButton =
|
|
104
|
-
const $ =
|
|
105
|
-
return /* @__PURE__ */
|
|
106
|
-
className: classNames
|
|
82
|
+
const CommentReactionButton = forwardRef(({ reaction, overrides, className, ...props }, forwardedRef) => {
|
|
83
|
+
const $ = useOverrides(overrides);
|
|
84
|
+
return /* @__PURE__ */ jsxs(CustomButton, {
|
|
85
|
+
className: classNames("lb-comment-reaction", className),
|
|
107
86
|
variant: "outline",
|
|
108
87
|
"aria-label": $.COMMENT_REACTION_DESCRIPTION(
|
|
109
88
|
reaction.emoji,
|
|
@@ -112,30 +91,30 @@ const CommentReactionButton = react.forwardRef(({ reaction, overrides: overrides
|
|
|
112
91
|
...props,
|
|
113
92
|
ref: forwardedRef,
|
|
114
93
|
children: [
|
|
115
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ jsx(Emoji, {
|
|
116
95
|
className: "lb-comment-reaction-emoji",
|
|
117
96
|
emoji: reaction.emoji
|
|
118
97
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ jsx("span", {
|
|
120
99
|
className: "lb-comment-reaction-count",
|
|
121
100
|
children: reaction.users.length
|
|
122
101
|
})
|
|
123
102
|
]
|
|
124
103
|
});
|
|
125
104
|
});
|
|
126
|
-
const CommentReaction =
|
|
127
|
-
const addReaction =
|
|
128
|
-
const removeReaction =
|
|
129
|
-
const currentId =
|
|
130
|
-
const isActive =
|
|
105
|
+
const CommentReaction = forwardRef(({ comment, reaction, overrides, disabled, ...props }, forwardedRef) => {
|
|
106
|
+
const addReaction = useAddRoomCommentReaction(comment.roomId);
|
|
107
|
+
const removeReaction = useRemoveRoomCommentReaction(comment.roomId);
|
|
108
|
+
const currentId = useCurrentUserId();
|
|
109
|
+
const isActive = useMemo(() => {
|
|
131
110
|
return reaction.users.some((users) => users.id === currentId);
|
|
132
111
|
}, [currentId, reaction]);
|
|
133
|
-
const $ =
|
|
134
|
-
const tooltipContent =
|
|
135
|
-
() => /* @__PURE__ */
|
|
112
|
+
const $ = useOverrides(overrides);
|
|
113
|
+
const tooltipContent = useMemo(
|
|
114
|
+
() => /* @__PURE__ */ jsx("span", {
|
|
136
115
|
children: $.COMMENT_REACTION_LIST(
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
values: reaction.users.map((users) => /* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ jsx(List, {
|
|
117
|
+
values: reaction.users.map((users) => /* @__PURE__ */ jsx(User, {
|
|
139
118
|
userId: users.id,
|
|
140
119
|
replaceSelf: true
|
|
141
120
|
}, users.id)),
|
|
@@ -149,10 +128,10 @@ const CommentReaction = react.forwardRef(({ comment, reaction, overrides: overri
|
|
|
149
128
|
}),
|
|
150
129
|
[$, reaction]
|
|
151
130
|
);
|
|
152
|
-
const stopPropagation =
|
|
131
|
+
const stopPropagation = useCallback((event) => {
|
|
153
132
|
event.stopPropagation();
|
|
154
133
|
}, []);
|
|
155
|
-
const handlePressedChange =
|
|
134
|
+
const handlePressedChange = useCallback(
|
|
156
135
|
(isPressed) => {
|
|
157
136
|
if (isPressed) {
|
|
158
137
|
addReaction({
|
|
@@ -170,32 +149,32 @@ const CommentReaction = react.forwardRef(({ comment, reaction, overrides: overri
|
|
|
170
149
|
},
|
|
171
150
|
[addReaction, comment.threadId, comment.id, reaction.emoji, removeReaction]
|
|
172
151
|
);
|
|
173
|
-
return /* @__PURE__ */
|
|
152
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
174
153
|
content: tooltipContent,
|
|
175
154
|
multiline: true,
|
|
176
155
|
className: "lb-comment-reaction-tooltip",
|
|
177
|
-
children: /* @__PURE__ */
|
|
156
|
+
children: /* @__PURE__ */ jsx(TogglePrimitive.Root, {
|
|
178
157
|
asChild: true,
|
|
179
158
|
pressed: isActive,
|
|
180
159
|
onPressedChange: handlePressedChange,
|
|
181
160
|
onClick: stopPropagation,
|
|
182
161
|
disabled,
|
|
183
162
|
ref: forwardedRef,
|
|
184
|
-
children: /* @__PURE__ */
|
|
163
|
+
children: /* @__PURE__ */ jsx(CommentReactionButton, {
|
|
185
164
|
"data-self": isActive ? "" : void 0,
|
|
186
165
|
reaction,
|
|
187
|
-
overrides
|
|
166
|
+
overrides,
|
|
188
167
|
...props
|
|
189
168
|
})
|
|
190
169
|
})
|
|
191
170
|
});
|
|
192
171
|
});
|
|
193
|
-
const CommentNonInteractiveReaction =
|
|
194
|
-
const currentId =
|
|
195
|
-
const isActive =
|
|
172
|
+
const CommentNonInteractiveReaction = forwardRef(({ reaction, overrides, ...props }, forwardedRef) => {
|
|
173
|
+
const currentId = useCurrentUserId();
|
|
174
|
+
const isActive = useMemo(() => {
|
|
196
175
|
return reaction.users.some((users) => users.id === currentId);
|
|
197
176
|
}, [currentId, reaction]);
|
|
198
|
-
return /* @__PURE__ */
|
|
177
|
+
return /* @__PURE__ */ jsx(CommentReactionButton, {
|
|
199
178
|
disableable: false,
|
|
200
179
|
"data-self": isActive ? "" : void 0,
|
|
201
180
|
reaction,
|
|
@@ -208,7 +187,7 @@ function openAttachment({ attachment, url }) {
|
|
|
208
187
|
if (attachment.mimeType === "application/pdf" || attachment.mimeType.startsWith("image/") || attachment.mimeType.startsWith("video/") || attachment.mimeType.startsWith("audio/")) {
|
|
209
188
|
window.open(url, "_blank");
|
|
210
189
|
} else {
|
|
211
|
-
download
|
|
190
|
+
download(url, attachment.name);
|
|
212
191
|
}
|
|
213
192
|
}
|
|
214
193
|
function CommentMediaAttachment({
|
|
@@ -219,8 +198,8 @@ function CommentMediaAttachment({
|
|
|
219
198
|
overrides,
|
|
220
199
|
...props
|
|
221
200
|
}) {
|
|
222
|
-
const { url } =
|
|
223
|
-
const handleClick =
|
|
201
|
+
const { url } = useRoomAttachmentUrl(attachment.id, roomId);
|
|
202
|
+
const handleClick = useCallback(
|
|
224
203
|
(event) => {
|
|
225
204
|
if (!url) {
|
|
226
205
|
return;
|
|
@@ -234,8 +213,8 @@ function CommentMediaAttachment({
|
|
|
234
213
|
},
|
|
235
214
|
[attachment, onAttachmentClick, url]
|
|
236
215
|
);
|
|
237
|
-
return /* @__PURE__ */
|
|
238
|
-
className: classNames
|
|
216
|
+
return /* @__PURE__ */ jsx(MediaAttachment, {
|
|
217
|
+
className: classNames("lb-comment-attachment", className),
|
|
239
218
|
...props,
|
|
240
219
|
attachment,
|
|
241
220
|
overrides,
|
|
@@ -251,8 +230,8 @@ function CommentFileAttachment({
|
|
|
251
230
|
overrides,
|
|
252
231
|
...props
|
|
253
232
|
}) {
|
|
254
|
-
const { url } =
|
|
255
|
-
const handleClick =
|
|
233
|
+
const { url } = useRoomAttachmentUrl(attachment.id, roomId);
|
|
234
|
+
const handleClick = useCallback(
|
|
256
235
|
(event) => {
|
|
257
236
|
if (!url) {
|
|
258
237
|
return;
|
|
@@ -266,8 +245,8 @@ function CommentFileAttachment({
|
|
|
266
245
|
},
|
|
267
246
|
[attachment, onAttachmentClick, url]
|
|
268
247
|
);
|
|
269
|
-
return /* @__PURE__ */
|
|
270
|
-
className: classNames
|
|
248
|
+
return /* @__PURE__ */ jsx(FileAttachment, {
|
|
249
|
+
className: classNames("lb-comment-attachment", className),
|
|
271
250
|
...props,
|
|
272
251
|
attachment,
|
|
273
252
|
overrides,
|
|
@@ -279,8 +258,8 @@ function CommentNonInteractiveFileAttachment({
|
|
|
279
258
|
className,
|
|
280
259
|
...props
|
|
281
260
|
}) {
|
|
282
|
-
return /* @__PURE__ */
|
|
283
|
-
className: classNames
|
|
261
|
+
return /* @__PURE__ */ jsx(FileAttachment, {
|
|
262
|
+
className: classNames("lb-comment-attachment", className),
|
|
284
263
|
allowMediaPreview: false,
|
|
285
264
|
...props
|
|
286
265
|
});
|
|
@@ -290,9 +269,9 @@ function AutoMarkReadThreadIdHandler({
|
|
|
290
269
|
roomId,
|
|
291
270
|
commentRef
|
|
292
271
|
}) {
|
|
293
|
-
const markThreadAsRead =
|
|
294
|
-
const isWindowFocused = useWindowFocus
|
|
295
|
-
|
|
272
|
+
const markThreadAsRead = useMarkRoomThreadAsRead(roomId);
|
|
273
|
+
const isWindowFocused = useWindowFocus();
|
|
274
|
+
useVisibleCallback(
|
|
296
275
|
commentRef,
|
|
297
276
|
() => {
|
|
298
277
|
markThreadAsRead(threadId);
|
|
@@ -303,7 +282,7 @@ function AutoMarkReadThreadIdHandler({
|
|
|
303
282
|
);
|
|
304
283
|
return null;
|
|
305
284
|
}
|
|
306
|
-
const Comment =
|
|
285
|
+
const Comment = forwardRef(
|
|
307
286
|
({
|
|
308
287
|
comment,
|
|
309
288
|
indentContent = true,
|
|
@@ -317,42 +296,42 @@ const Comment = react.forwardRef(
|
|
|
317
296
|
onAttachmentClick,
|
|
318
297
|
onCommentEdit,
|
|
319
298
|
onCommentDelete,
|
|
320
|
-
overrides
|
|
299
|
+
overrides,
|
|
321
300
|
className,
|
|
322
301
|
additionalActions,
|
|
323
302
|
additionalActionsClassName,
|
|
324
303
|
autoMarkReadThreadId,
|
|
325
304
|
...props
|
|
326
305
|
}, forwardedRef) => {
|
|
327
|
-
const ref =
|
|
328
|
-
const mergedRefs = useRefs
|
|
329
|
-
const currentUserId =
|
|
330
|
-
const deleteComment =
|
|
331
|
-
const editComment =
|
|
332
|
-
const addReaction =
|
|
333
|
-
const removeReaction =
|
|
334
|
-
const $ =
|
|
335
|
-
const [isEditing, setEditing] =
|
|
336
|
-
const [isTarget, setTarget] =
|
|
337
|
-
const [isMoreActionOpen, setMoreActionOpen] =
|
|
338
|
-
const [isReactionActionOpen, setReactionActionOpen] =
|
|
339
|
-
const { mediaAttachments, fileAttachments } =
|
|
340
|
-
return
|
|
306
|
+
const ref = useRef(null);
|
|
307
|
+
const mergedRefs = useRefs(forwardedRef, ref);
|
|
308
|
+
const currentUserId = useCurrentUserId();
|
|
309
|
+
const deleteComment = useDeleteRoomComment(comment.roomId);
|
|
310
|
+
const editComment = useEditRoomComment(comment.roomId);
|
|
311
|
+
const addReaction = useAddRoomCommentReaction(comment.roomId);
|
|
312
|
+
const removeReaction = useRemoveRoomCommentReaction(comment.roomId);
|
|
313
|
+
const $ = useOverrides(overrides);
|
|
314
|
+
const [isEditing, setEditing] = useState(false);
|
|
315
|
+
const [isTarget, setTarget] = useState(false);
|
|
316
|
+
const [isMoreActionOpen, setMoreActionOpen] = useState(false);
|
|
317
|
+
const [isReactionActionOpen, setReactionActionOpen] = useState(false);
|
|
318
|
+
const { mediaAttachments, fileAttachments } = useMemo(() => {
|
|
319
|
+
return separateMediaAttachments(comment.attachments);
|
|
341
320
|
}, [comment.attachments]);
|
|
342
|
-
const stopPropagation =
|
|
321
|
+
const stopPropagation = useCallback((event) => {
|
|
343
322
|
event.stopPropagation();
|
|
344
323
|
}, []);
|
|
345
|
-
const handleEdit =
|
|
324
|
+
const handleEdit = useCallback(() => {
|
|
346
325
|
setEditing(true);
|
|
347
326
|
}, []);
|
|
348
|
-
const handleEditCancel =
|
|
327
|
+
const handleEditCancel = useCallback(
|
|
349
328
|
(event) => {
|
|
350
329
|
event.stopPropagation();
|
|
351
330
|
setEditing(false);
|
|
352
331
|
},
|
|
353
332
|
[]
|
|
354
333
|
);
|
|
355
|
-
const handleEditSubmit =
|
|
334
|
+
const handleEditSubmit = useCallback(
|
|
356
335
|
({ body, attachments }, event) => {
|
|
357
336
|
onCommentEdit?.(comment);
|
|
358
337
|
event.preventDefault();
|
|
@@ -366,20 +345,20 @@ const Comment = react.forwardRef(
|
|
|
366
345
|
},
|
|
367
346
|
[comment, editComment, onCommentEdit]
|
|
368
347
|
);
|
|
369
|
-
const handleDelete =
|
|
348
|
+
const handleDelete = useCallback(() => {
|
|
370
349
|
onCommentDelete?.(comment);
|
|
371
350
|
deleteComment({
|
|
372
351
|
commentId: comment.id,
|
|
373
352
|
threadId: comment.threadId
|
|
374
353
|
});
|
|
375
354
|
}, [comment, deleteComment, onCommentDelete]);
|
|
376
|
-
const handleAuthorClick =
|
|
355
|
+
const handleAuthorClick = useCallback(
|
|
377
356
|
(event) => {
|
|
378
357
|
onAuthorClick?.(comment.userId, event);
|
|
379
358
|
},
|
|
380
359
|
[comment.userId, onAuthorClick]
|
|
381
360
|
);
|
|
382
|
-
const handleReactionSelect =
|
|
361
|
+
const handleReactionSelect = useCallback(
|
|
383
362
|
(emoji) => {
|
|
384
363
|
const reactionIndex = comment.reactions.findIndex(
|
|
385
364
|
(reaction) => reaction.emoji === emoji
|
|
@@ -409,7 +388,7 @@ const Comment = react.forwardRef(
|
|
|
409
388
|
currentUserId
|
|
410
389
|
]
|
|
411
390
|
);
|
|
412
|
-
|
|
391
|
+
useEffect(() => {
|
|
413
392
|
const isWindowDefined = typeof window !== "undefined";
|
|
414
393
|
if (!isWindowDefined)
|
|
415
394
|
return;
|
|
@@ -422,16 +401,16 @@ const Comment = react.forwardRef(
|
|
|
422
401
|
if (!showDeleted && !comment.body) {
|
|
423
402
|
return null;
|
|
424
403
|
}
|
|
425
|
-
return /* @__PURE__ */
|
|
404
|
+
return /* @__PURE__ */ jsxs(TooltipProvider, {
|
|
426
405
|
children: [
|
|
427
|
-
autoMarkReadThreadId && /* @__PURE__ */
|
|
406
|
+
autoMarkReadThreadId && /* @__PURE__ */ jsx(AutoMarkReadThreadIdHandler, {
|
|
428
407
|
commentRef: ref,
|
|
429
408
|
threadId: autoMarkReadThreadId,
|
|
430
409
|
roomId: comment.roomId
|
|
431
410
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ jsxs("div", {
|
|
433
412
|
id: comment.id,
|
|
434
|
-
className: classNames
|
|
413
|
+
className: classNames(
|
|
435
414
|
"lb-root lb-comment",
|
|
436
415
|
indentContent && "lb-comment:indent-content",
|
|
437
416
|
showActions === "hover" && "lb-comment:show-actions-hover",
|
|
@@ -445,37 +424,37 @@ const Comment = react.forwardRef(
|
|
|
445
424
|
...props,
|
|
446
425
|
ref: mergedRefs,
|
|
447
426
|
children: [
|
|
448
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ jsxs("div", {
|
|
449
428
|
className: "lb-comment-header",
|
|
450
429
|
children: [
|
|
451
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ jsxs("div", {
|
|
452
431
|
className: "lb-comment-details",
|
|
453
432
|
children: [
|
|
454
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ jsx(Avatar, {
|
|
455
434
|
className: "lb-comment-avatar",
|
|
456
435
|
userId: comment.userId,
|
|
457
436
|
onClick: handleAuthorClick
|
|
458
437
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ jsxs("span", {
|
|
460
439
|
className: "lb-comment-details-labels",
|
|
461
440
|
children: [
|
|
462
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ jsx(User, {
|
|
463
442
|
className: "lb-comment-author",
|
|
464
443
|
userId: comment.userId,
|
|
465
444
|
onClick: handleAuthorClick
|
|
466
445
|
}),
|
|
467
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ jsxs("span", {
|
|
468
447
|
className: "lb-comment-date",
|
|
469
448
|
children: [
|
|
470
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ jsx(Timestamp, {
|
|
471
450
|
locale: $.locale,
|
|
472
451
|
date: comment.createdAt,
|
|
473
452
|
className: "lb-date lb-comment-date-created"
|
|
474
453
|
}),
|
|
475
|
-
comment.editedAt && comment.body && /* @__PURE__ */
|
|
454
|
+
comment.editedAt && comment.body && /* @__PURE__ */ jsxs(Fragment, {
|
|
476
455
|
children: [
|
|
477
456
|
" ",
|
|
478
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ jsx("span", {
|
|
479
458
|
className: "lb-comment-date-edited",
|
|
480
459
|
children: $.COMMENT_EDITED
|
|
481
460
|
})
|
|
@@ -487,59 +466,59 @@ const Comment = react.forwardRef(
|
|
|
487
466
|
})
|
|
488
467
|
]
|
|
489
468
|
}),
|
|
490
|
-
showActions && !isEditing && /* @__PURE__ */
|
|
491
|
-
className: classNames
|
|
469
|
+
showActions && !isEditing && /* @__PURE__ */ jsxs("div", {
|
|
470
|
+
className: classNames(
|
|
492
471
|
"lb-comment-actions",
|
|
493
472
|
additionalActionsClassName
|
|
494
473
|
),
|
|
495
474
|
children: [
|
|
496
475
|
additionalActions ?? null,
|
|
497
|
-
showReactions && /* @__PURE__ */
|
|
476
|
+
showReactions && /* @__PURE__ */ jsx(EmojiPicker, {
|
|
498
477
|
onEmojiSelect: handleReactionSelect,
|
|
499
478
|
onOpenChange: setReactionActionOpen,
|
|
500
|
-
children: /* @__PURE__ */
|
|
479
|
+
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
501
480
|
content: $.COMMENT_ADD_REACTION,
|
|
502
|
-
children: /* @__PURE__ */
|
|
481
|
+
children: /* @__PURE__ */ jsx(PopoverTrigger, {
|
|
503
482
|
asChild: true,
|
|
504
|
-
children: /* @__PURE__ */
|
|
483
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
505
484
|
className: "lb-comment-action",
|
|
506
485
|
onClick: stopPropagation,
|
|
507
486
|
"aria-label": $.COMMENT_ADD_REACTION,
|
|
508
|
-
icon: /* @__PURE__ */
|
|
487
|
+
icon: /* @__PURE__ */ jsx(EmojiAddIcon, {})
|
|
509
488
|
})
|
|
510
489
|
})
|
|
511
490
|
})
|
|
512
491
|
}),
|
|
513
|
-
comment.userId === currentUserId && /* @__PURE__ */
|
|
492
|
+
comment.userId === currentUserId && /* @__PURE__ */ jsx(Dropdown, {
|
|
514
493
|
open: isMoreActionOpen,
|
|
515
494
|
onOpenChange: setMoreActionOpen,
|
|
516
495
|
align: "end",
|
|
517
|
-
content: /* @__PURE__ */
|
|
496
|
+
content: /* @__PURE__ */ jsxs(Fragment, {
|
|
518
497
|
children: [
|
|
519
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ jsx(DropdownItem, {
|
|
520
499
|
onSelect: handleEdit,
|
|
521
500
|
onClick: stopPropagation,
|
|
522
|
-
icon: /* @__PURE__ */
|
|
501
|
+
icon: /* @__PURE__ */ jsx(EditIcon, {}),
|
|
523
502
|
children: $.COMMENT_EDIT
|
|
524
503
|
}),
|
|
525
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ jsx(DropdownItem, {
|
|
526
505
|
onSelect: handleDelete,
|
|
527
506
|
onClick: stopPropagation,
|
|
528
|
-
icon: /* @__PURE__ */
|
|
507
|
+
icon: /* @__PURE__ */ jsx(DeleteIcon, {}),
|
|
529
508
|
children: $.COMMENT_DELETE
|
|
530
509
|
})
|
|
531
510
|
]
|
|
532
511
|
}),
|
|
533
|
-
children: /* @__PURE__ */
|
|
512
|
+
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
534
513
|
content: $.COMMENT_MORE,
|
|
535
|
-
children: /* @__PURE__ */
|
|
514
|
+
children: /* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
536
515
|
asChild: true,
|
|
537
|
-
children: /* @__PURE__ */
|
|
516
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
538
517
|
className: "lb-comment-action",
|
|
539
518
|
disabled: !comment.body,
|
|
540
519
|
onClick: stopPropagation,
|
|
541
520
|
"aria-label": $.COMMENT_MORE,
|
|
542
|
-
icon: /* @__PURE__ */
|
|
521
|
+
icon: /* @__PURE__ */ jsx(EllipsisIcon, {})
|
|
543
522
|
})
|
|
544
523
|
})
|
|
545
524
|
})
|
|
@@ -548,9 +527,9 @@ const Comment = react.forwardRef(
|
|
|
548
527
|
})
|
|
549
528
|
]
|
|
550
529
|
}),
|
|
551
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ jsx("div", {
|
|
552
531
|
className: "lb-comment-content",
|
|
553
|
-
children: isEditing ? /* @__PURE__ */
|
|
532
|
+
children: isEditing ? /* @__PURE__ */ jsx(Composer, {
|
|
554
533
|
className: "lb-comment-composer",
|
|
555
534
|
onComposerSubmit: handleEditSubmit,
|
|
556
535
|
defaultValue: comment.body,
|
|
@@ -559,28 +538,28 @@ const Comment = react.forwardRef(
|
|
|
559
538
|
showAttribution: false,
|
|
560
539
|
showAttachments,
|
|
561
540
|
showFormattingControls: showComposerFormattingControls,
|
|
562
|
-
actions: /* @__PURE__ */
|
|
541
|
+
actions: /* @__PURE__ */ jsxs(Fragment, {
|
|
563
542
|
children: [
|
|
564
|
-
/* @__PURE__ */
|
|
543
|
+
/* @__PURE__ */ jsx(Tooltip, {
|
|
565
544
|
content: $.COMMENT_EDIT_COMPOSER_CANCEL,
|
|
566
545
|
"aria-label": $.COMMENT_EDIT_COMPOSER_CANCEL,
|
|
567
|
-
children: /* @__PURE__ */
|
|
546
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
568
547
|
className: "lb-composer-action",
|
|
569
548
|
onClick: handleEditCancel,
|
|
570
|
-
icon: /* @__PURE__ */
|
|
549
|
+
icon: /* @__PURE__ */ jsx(CrossIcon, {})
|
|
571
550
|
})
|
|
572
551
|
}),
|
|
573
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ jsx(ShortcutTooltip, {
|
|
574
553
|
content: $.COMMENT_EDIT_COMPOSER_SAVE,
|
|
575
554
|
shortcut: "Enter",
|
|
576
|
-
children: /* @__PURE__ */
|
|
555
|
+
children: /* @__PURE__ */ jsx(ComposerSubmit, {
|
|
577
556
|
asChild: true,
|
|
578
|
-
children: /* @__PURE__ */
|
|
557
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
579
558
|
variant: "primary",
|
|
580
559
|
className: "lb-composer-action",
|
|
581
560
|
onClick: stopPropagation,
|
|
582
561
|
"aria-label": $.COMMENT_EDIT_COMPOSER_SAVE,
|
|
583
|
-
icon: /* @__PURE__ */
|
|
562
|
+
icon: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
584
563
|
})
|
|
585
564
|
})
|
|
586
565
|
})
|
|
@@ -590,62 +569,62 @@ const Comment = react.forwardRef(
|
|
|
590
569
|
COMPOSER_PLACEHOLDER: $.COMMENT_EDIT_COMPOSER_PLACEHOLDER
|
|
591
570
|
},
|
|
592
571
|
roomId: comment.roomId
|
|
593
|
-
}) : comment.body ? /* @__PURE__ */
|
|
572
|
+
}) : comment.body ? /* @__PURE__ */ jsxs(Fragment, {
|
|
594
573
|
children: [
|
|
595
|
-
/* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ jsx(CommentBody, {
|
|
596
575
|
className: "lb-comment-body",
|
|
597
576
|
body: comment.body,
|
|
598
577
|
components: {
|
|
599
|
-
Mention: ({ userId }) => /* @__PURE__ */
|
|
578
|
+
Mention: ({ userId }) => /* @__PURE__ */ jsx(CommentMention, {
|
|
600
579
|
userId,
|
|
601
580
|
onClick: (event) => onMentionClick?.(userId, event)
|
|
602
581
|
}),
|
|
603
582
|
Link: CommentLink
|
|
604
583
|
}
|
|
605
584
|
}),
|
|
606
|
-
showAttachments && (mediaAttachments.length > 0 || fileAttachments.length > 0) ? /* @__PURE__ */
|
|
585
|
+
showAttachments && (mediaAttachments.length > 0 || fileAttachments.length > 0) ? /* @__PURE__ */ jsxs("div", {
|
|
607
586
|
className: "lb-comment-attachments",
|
|
608
587
|
children: [
|
|
609
|
-
mediaAttachments.length > 0 ? /* @__PURE__ */
|
|
588
|
+
mediaAttachments.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
610
589
|
className: "lb-attachments",
|
|
611
|
-
children: mediaAttachments.map((attachment) => /* @__PURE__ */
|
|
590
|
+
children: mediaAttachments.map((attachment) => /* @__PURE__ */ jsx(CommentMediaAttachment, {
|
|
612
591
|
attachment,
|
|
613
|
-
overrides
|
|
592
|
+
overrides,
|
|
614
593
|
onAttachmentClick,
|
|
615
594
|
roomId: comment.roomId
|
|
616
595
|
}, attachment.id))
|
|
617
596
|
}) : null,
|
|
618
|
-
fileAttachments.length > 0 ? /* @__PURE__ */
|
|
597
|
+
fileAttachments.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
619
598
|
className: "lb-attachments",
|
|
620
|
-
children: fileAttachments.map((attachment) => /* @__PURE__ */
|
|
599
|
+
children: fileAttachments.map((attachment) => /* @__PURE__ */ jsx(CommentFileAttachment, {
|
|
621
600
|
attachment,
|
|
622
|
-
overrides
|
|
601
|
+
overrides,
|
|
623
602
|
onAttachmentClick,
|
|
624
603
|
roomId: comment.roomId
|
|
625
604
|
}, attachment.id))
|
|
626
605
|
}) : null
|
|
627
606
|
]
|
|
628
607
|
}) : null,
|
|
629
|
-
showReactions && comment.reactions.length > 0 && /* @__PURE__ */
|
|
608
|
+
showReactions && comment.reactions.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
630
609
|
className: "lb-comment-reactions",
|
|
631
610
|
children: [
|
|
632
|
-
comment.reactions.map((reaction) => /* @__PURE__ */
|
|
611
|
+
comment.reactions.map((reaction) => /* @__PURE__ */ jsx(CommentReaction, {
|
|
633
612
|
comment,
|
|
634
613
|
reaction,
|
|
635
|
-
overrides
|
|
614
|
+
overrides
|
|
636
615
|
}, reaction.emoji)),
|
|
637
|
-
/* @__PURE__ */
|
|
616
|
+
/* @__PURE__ */ jsx(EmojiPicker, {
|
|
638
617
|
onEmojiSelect: handleReactionSelect,
|
|
639
|
-
children: /* @__PURE__ */
|
|
618
|
+
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
640
619
|
content: $.COMMENT_ADD_REACTION,
|
|
641
|
-
children: /* @__PURE__ */
|
|
620
|
+
children: /* @__PURE__ */ jsx(PopoverTrigger, {
|
|
642
621
|
asChild: true,
|
|
643
|
-
children: /* @__PURE__ */
|
|
622
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
644
623
|
className: "lb-comment-reaction lb-comment-reaction-add",
|
|
645
624
|
variant: "outline",
|
|
646
625
|
onClick: stopPropagation,
|
|
647
626
|
"aria-label": $.COMMENT_ADD_REACTION,
|
|
648
|
-
icon: /* @__PURE__ */
|
|
627
|
+
icon: /* @__PURE__ */ jsx(EmojiAddIcon, {})
|
|
649
628
|
})
|
|
650
629
|
})
|
|
651
630
|
})
|
|
@@ -653,9 +632,9 @@ const Comment = react.forwardRef(
|
|
|
653
632
|
]
|
|
654
633
|
})
|
|
655
634
|
]
|
|
656
|
-
}) : /* @__PURE__ */
|
|
635
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
657
636
|
className: "lb-comment-body",
|
|
658
|
-
children: /* @__PURE__ */
|
|
637
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
659
638
|
className: "lb-comment-deleted",
|
|
660
639
|
children: $.COMMENT_DELETED
|
|
661
640
|
})
|
|
@@ -668,11 +647,5 @@ const Comment = react.forwardRef(
|
|
|
668
647
|
}
|
|
669
648
|
);
|
|
670
649
|
|
|
671
|
-
|
|
672
|
-
exports.CommentLink = CommentLink;
|
|
673
|
-
exports.CommentMention = CommentMention;
|
|
674
|
-
exports.CommentNonInteractiveFileAttachment = CommentNonInteractiveFileAttachment;
|
|
675
|
-
exports.CommentNonInteractiveLink = CommentNonInteractiveLink;
|
|
676
|
-
exports.CommentNonInteractiveReaction = CommentNonInteractiveReaction;
|
|
677
|
-
exports.CommentReaction = CommentReaction;
|
|
650
|
+
export { Comment, CommentLink, CommentMention, CommentNonInteractiveFileAttachment, CommentNonInteractiveLink, CommentNonInteractiveReaction, CommentReaction };
|
|
678
651
|
//# sourceMappingURL=Comment.js.map
|