@layers-app/shared 0.4.7 → 0.4.9
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/assets/default-workspace-avatar.jpg.js +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.js +32 -32
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
- package/dist/components/AppContainer/AppContainer.d.ts +1 -1
- package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/AppContainer.js +76 -71
- package/dist/components/AppContainer/AppContainer.module.css.js +14 -14
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +77 -49
- package/dist/components/AppContainer/components/NavbarContent.d.ts.map +1 -1
- package/dist/components/AppContainer/components/NavbarContent.js +16 -2
- package/dist/components/AppContainer/components/ToolSidebar.d.ts +5 -0
- package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
- package/dist/components/AppContainer/components/ToolSidebar.js +42 -30
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +90 -90
- package/dist/components/AppContainer/types.d.ts +12 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AppShell/AppShell.module.css.js +5 -5
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +59 -52
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts +1 -0
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.js +16 -15
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +22 -22
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts +3 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +237 -93
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +22 -20
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -4
- package/dist/components/Chat/CallMessage/CallMessage.module.css.js +8 -8
- package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +1 -1
- package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +1 -1
- package/dist/components/Chat/ChatInput/ChatInput.module.css.js +44 -44
- package/dist/components/Chat/ChatInput/index.d.ts +13 -1
- package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
- package/dist/components/Chat/ChatInput/index.js +264 -164
- package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts +16 -0
- package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts.map +1 -0
- package/dist/components/Chat/ChatInput/useVoiceRecorder.js +83 -0
- package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +4 -4
- package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +20 -16
- package/dist/components/Chat/ChatMessage/index.d.ts +16 -0
- package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
- package/dist/components/Chat/ChatMessage/index.js +153 -118
- package/dist/components/Chat/ChatPill/ChatPill.module.css.js +1 -1
- package/dist/components/Chat/DialogItem/DialogItem.module.css.js +4 -4
- package/dist/components/Chat/DialogList/DialogList.module.css.js +1 -1
- package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +4 -4
- package/dist/components/Chat/MessageActions/MessageActions.module.css.js +1 -1
- package/dist/components/Chat/MessageActions/index.d.ts +2 -0
- package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageActions/index.js +188 -50
- package/dist/components/Chat/MessageAuthor/index.d.ts +7 -1
- package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageAuthor/index.js +39 -25
- package/dist/components/Chat/MessageForward/MessageForward.module.css.js +1 -1
- package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -12
- package/dist/components/Chat/MessageList/index.d.ts +17 -25
- package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageList/index.js +201 -149
- package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +3 -3
- package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +12 -12
- package/dist/components/Chat/MessageReply/MessageReply.module.css.js +7 -7
- package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +8 -8
- package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +1 -1
- package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.js +32 -26
- package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerList.js +83 -72
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +1 -0
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerToolbar.js +94 -85
- package/dist/components/ColorPicker/icons.js +5 -5
- package/dist/components/ColorPicker/types.d.ts +6 -0
- package/dist/components/ColorPicker/types.d.ts.map +1 -1
- package/dist/components/ColorPicker/types.js +53 -11
- package/dist/components/ColorPicker/useRecentColors.d.ts +3 -1
- package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -1
- package/dist/components/ColorPicker/useRecentColors.js +43 -20
- package/dist/components/CommentComposer/CommentComposer.module.css.js +14 -10
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +2 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +29 -26
- package/dist/components/CommentComposer/index.d.ts +2 -1
- package/dist/components/CommentComposer/index.d.ts.map +1 -1
- package/dist/components/CommentComposer/index.js +333 -313
- package/dist/components/CommentComposer/types.d.ts +10 -0
- package/dist/components/CommentComposer/types.d.ts.map +1 -1
- package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
- package/dist/components/Copyright/Copyright.module.css.js +1 -1
- package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
- package/dist/components/CustomKBD/index.js +21 -22
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +129 -121
- package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
- package/dist/components/EntityTitle/EntityTitle.d.ts +3 -4
- package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
- package/dist/components/EntityTitle/EntityTitle.js +81 -80
- package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
- package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
- package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
- package/dist/components/FilePicker/FilePicker.module.css.js +7 -7
- package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
- package/dist/components/FormViewer/helpers/conditions.d.ts.map +1 -1
- package/dist/components/FormViewer/helpers/conditions.js +33 -17
- package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
- package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
- package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
- package/dist/components/Loaders/styles.module.css.js +6 -6
- package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
- package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +23 -23
- package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
- package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
- package/dist/components/Notification/InfiniteScroll.d.ts +12 -0
- package/dist/components/Notification/InfiniteScroll.d.ts.map +1 -0
- package/dist/components/Notification/InfiniteScroll.js +42 -0
- package/dist/components/Notification/Notification.d.ts +4 -1
- package/dist/components/Notification/Notification.d.ts.map +1 -1
- package/dist/components/Notification/Notification.module.css.js +28 -4
- package/dist/components/Notification/atoms/ActionBadge.d.ts +11 -0
- package/dist/components/Notification/atoms/ActionBadge.d.ts.map +1 -0
- package/dist/components/Notification/atoms/ActionBadge.js +53 -0
- package/dist/components/Notification/atoms/ArchiveIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/ArchiveIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/ArchiveIcon.js +40 -0
- package/dist/components/Notification/atoms/InboxIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/InboxIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/InboxIcon.js +33 -0
- package/dist/components/Notification/atoms/MarkReadIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/MarkReadIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/MarkReadIcon.js +33 -0
- package/dist/components/Notification/atoms/ResourceIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/ResourceIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/TabBadge.d.ts +7 -0
- package/dist/components/Notification/atoms/TabBadge.d.ts.map +1 -0
- package/dist/components/Notification/atoms/TabBadge.js +32 -0
- package/dist/components/Notification/atoms/UnreadDot.d.ts +6 -0
- package/dist/components/Notification/atoms/UnreadDot.d.ts.map +1 -0
- package/dist/components/Notification/atoms/UnreadDot.js +23 -0
- package/dist/components/Notification/atoms/index.d.ts +5 -0
- package/dist/components/Notification/atoms/index.d.ts.map +1 -0
- package/dist/components/Notification/hooks/index.d.ts +8 -0
- package/dist/components/Notification/hooks/index.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useInboxActions.d.ts +12 -0
- package/dist/components/Notification/hooks/useInboxActions.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useInboxActions.js +58 -0
- package/dist/components/Notification/hooks/useInboxLoader.d.ts +8 -0
- package/dist/components/Notification/hooks/useInboxLoader.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useInboxLoader.js +49 -0
- package/dist/components/Notification/hooks/useNotificationItem.d.ts +26 -0
- package/dist/components/Notification/hooks/useNotificationItem.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationItem.js +51 -0
- package/dist/components/Notification/hooks/useNotificationStore.d.ts +49 -0
- package/dist/components/Notification/hooks/useNotificationStore.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationStore.js +139 -0
- package/dist/components/Notification/hooks/useNotificationStream.d.ts +2 -0
- package/dist/components/Notification/hooks/useNotificationStream.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationStream.js +86 -0
- package/dist/components/Notification/hooks/useNotificationTime.d.ts +2 -0
- package/dist/components/Notification/hooks/useNotificationTime.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationTime.js +23 -0
- package/dist/components/Notification/hooks/useNotificationsApi.d.ts +25 -0
- package/dist/components/Notification/hooks/useNotificationsApi.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationsApi.js +64 -0
- package/dist/components/Notification/lib/api.d.ts +4 -0
- package/dist/components/Notification/lib/api.d.ts.map +1 -0
- package/dist/components/Notification/lib/api.js +19 -0
- package/dist/components/Notification/lib/index.d.ts +5 -0
- package/dist/components/Notification/lib/index.d.ts.map +1 -0
- package/dist/components/Notification/lib/notificationText.d.ts +10 -0
- package/dist/components/Notification/lib/notificationText.d.ts.map +1 -0
- package/dist/components/Notification/lib/notificationText.js +131 -0
- package/dist/components/Notification/lib/stripHtml.d.ts +2 -0
- package/dist/components/Notification/lib/stripHtml.d.ts.map +1 -0
- package/dist/components/Notification/lib/stripHtml.js +6 -0
- package/dist/components/Notification/lib/types.d.ts +45 -0
- package/dist/components/Notification/lib/types.d.ts.map +1 -0
- package/dist/components/Notification/lib/types.js +9 -0
- package/dist/components/Notification/molecules/InboxEmpty.d.ts +8 -0
- package/dist/components/Notification/molecules/InboxEmpty.d.ts.map +1 -0
- package/dist/components/Notification/molecules/InboxEmpty.js +21 -0
- package/dist/components/Notification/molecules/InboxHeader.d.ts +17 -0
- package/dist/components/Notification/molecules/InboxHeader.d.ts.map +1 -0
- package/dist/components/Notification/molecules/InboxHeader.js +73 -0
- package/dist/components/Notification/molecules/InboxTabs.d.ts +15 -0
- package/dist/components/Notification/molecules/InboxTabs.d.ts.map +1 -0
- package/dist/components/Notification/molecules/InboxTabs.js +60 -0
- package/dist/components/Notification/molecules/NotificationActions.d.ts +9 -0
- package/dist/components/Notification/molecules/NotificationActions.d.ts.map +1 -0
- package/dist/components/Notification/molecules/NotificationActions.js +64 -0
- package/dist/components/Notification/molecules/NotificationAvatar.d.ts +17 -0
- package/dist/components/Notification/molecules/NotificationAvatar.d.ts.map +1 -0
- package/dist/components/Notification/molecules/NotificationAvatar.js +38 -0
- package/dist/components/Notification/molecules/NotificationContent.d.ts +22 -0
- package/dist/components/Notification/molecules/NotificationContent.d.ts.map +1 -0
- package/dist/components/Notification/molecules/NotificationContent.js +183 -0
- package/dist/components/Notification/molecules/index.d.ts +7 -0
- package/dist/components/Notification/molecules/index.d.ts.map +1 -0
- package/dist/components/Notification/organisms/InboxItem.d.ts +14 -0
- package/dist/components/Notification/organisms/InboxItem.d.ts.map +1 -0
- package/dist/components/Notification/organisms/InboxItem.js +100 -0
- package/dist/components/Notification/organisms/InboxPanel.d.ts +4 -0
- package/dist/components/Notification/organisms/InboxPanel.d.ts.map +1 -0
- package/dist/components/Notification/organisms/InboxPanel.js +99 -0
- package/dist/components/Notification/organisms/index.d.ts +3 -0
- package/dist/components/Notification/organisms/index.d.ts.map +1 -0
- package/dist/components/PillTabs/PillTabs.module.css.js +1 -1
- package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
- package/dist/components/SettingsSection/styles.module.css.js +1 -1
- package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
- package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
- package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
- package/dist/components/modals/RemoveConfirmModal.js +27 -26
- package/dist/components/table/FrontTable.d.ts.map +1 -1
- package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
- package/dist/config/envConfig.d.ts +2 -0
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/config/envConfig.js +29 -28
- package/dist/helpers/getFileIcons.js +5 -5
- package/dist/helpers/getFileType.d.ts +1 -1
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +11 -1
- package/dist/helpers/platform.d.ts +1 -1
- package/dist/helpers/platform.d.ts.map +1 -1
- package/dist/helpers/platform.js +1 -0
- package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
- package/dist/helpers/showNotifications.module.css.js +1 -1
- package/dist/hooks/useDateUtils.d.ts +3 -1
- package/dist/hooks/useDateUtils.d.ts.map +1 -1
- package/dist/hooks/useDateUtils.js +23 -18
- package/dist/index.css +1 -1
- package/dist/index.js +595 -588
- package/dist/lang/locales/ui_en.json.js +9 -7
- package/dist/lang/locales/ui_es.json.js +6 -4
- package/dist/lang/locales/ui_ru.json.js +8 -6
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.context.js +15 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.js +228 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.module.css.js +4 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioControls.js +19 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioMuteButton.js +30 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioPlayButton.js +40 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSkipButton.js +28 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpectrum.js +137 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpeedControl.js +31 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeDisplay.js +44 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeline.js +71 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioVolumeSlider.js +43 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioWaveform.js +166 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/use-audio.js +201 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.context.js +15 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.js +272 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.module.css.js +4 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoCaptionsButton.js +55 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoControls.js +30 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoFullscreenButton.js +31 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoMuteButton.js +29 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPiPButton.js +29 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPlayButton.js +28 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoSkipButton.js +27 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeDisplay.js +44 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeline.js +70 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/use-video.js +170 -0
- package/docs/README.md +499 -499
- package/package.json +81 -79
- package/dist/components/Notification/Notification.js +0 -119
- package/dist/components/Notification/NotificationCard.d.ts +0 -10
- package/dist/components/Notification/NotificationCard.d.ts.map +0 -1
- package/dist/components/Notification/NotificationCard.js +0 -93
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { useState as R, useCallback as f, useRef as A, useEffect as w } from "react";
|
|
2
|
+
import { resolveRecentKind as I, IS_APPLE as C } from "./types.js";
|
|
3
|
+
const k = "color-picker-recent", L = 11;
|
|
4
|
+
let i = 0;
|
|
5
|
+
function a(e) {
|
|
4
6
|
try {
|
|
5
7
|
const t = localStorage.getItem(e);
|
|
6
8
|
return t ? JSON.parse(t) : [];
|
|
@@ -8,32 +10,53 @@ function n(e) {
|
|
|
8
10
|
return [];
|
|
9
11
|
}
|
|
10
12
|
}
|
|
11
|
-
function
|
|
13
|
+
function T(e, t, r) {
|
|
12
14
|
try {
|
|
13
|
-
localStorage.setItem(e, JSON.stringify(t.slice(0,
|
|
15
|
+
localStorage.setItem(e, JSON.stringify(t.slice(0, r)));
|
|
14
16
|
} catch {
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
function _(e) {
|
|
20
|
+
return e.code !== "KeyH" || !e.shiftKey || e.altKey ? !1 : C ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey;
|
|
21
|
+
}
|
|
22
|
+
function F(e) {
|
|
23
|
+
const t = e?.storageKey ?? k, r = e?.maxItems ?? L, l = e?.onApplyShortcut, s = e?.shortcutScoped ?? !1, [p, u] = R(
|
|
24
|
+
() => a(t)
|
|
25
|
+
), h = f(() => {
|
|
26
|
+
u(a(t));
|
|
27
|
+
}, [t]), K = f(
|
|
28
|
+
(o, c, n) => {
|
|
29
|
+
const g = a(t).filter(
|
|
30
|
+
(S) => !(S.value === o && S.sectionKey === c)
|
|
31
|
+
), m = [{ value: o, sectionKey: c, border: n }, ...g].slice(
|
|
32
|
+
0,
|
|
33
|
+
r
|
|
34
|
+
);
|
|
35
|
+
T(t, m, r), u(m);
|
|
26
36
|
},
|
|
27
|
-
[t,
|
|
28
|
-
),
|
|
37
|
+
[t, r]
|
|
38
|
+
), E = f(() => {
|
|
29
39
|
try {
|
|
30
40
|
localStorage.removeItem(t);
|
|
31
41
|
} catch {
|
|
32
42
|
}
|
|
33
|
-
|
|
34
|
-
}, [t]);
|
|
35
|
-
|
|
43
|
+
u([]);
|
|
44
|
+
}, [t]), y = A(l);
|
|
45
|
+
y.current = l;
|
|
46
|
+
const d = !!l;
|
|
47
|
+
return w(() => {
|
|
48
|
+
if (!d) return;
|
|
49
|
+
s && (i += 1);
|
|
50
|
+
const o = (c) => {
|
|
51
|
+
if (!_(c) || !s && i > 0) return;
|
|
52
|
+
const n = a(t)[0];
|
|
53
|
+
n && (c.preventDefault(), y.current?.(n.value, I(n.sectionKey)));
|
|
54
|
+
};
|
|
55
|
+
return window.addEventListener("keydown", o), () => {
|
|
56
|
+
window.removeEventListener("keydown", o), s && (i -= 1);
|
|
57
|
+
};
|
|
58
|
+
}, [d, s, t]), { recentColors: p, addRecent: K, clearRecent: E, reload: h };
|
|
36
59
|
}
|
|
37
60
|
export {
|
|
38
|
-
|
|
61
|
+
F as useRecentColors
|
|
39
62
|
};
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_commentComposerWrapper_ate6h_1", t = "_commentComposerFloat_ate6h_135", e = "_composerContainer_ate6h_193", a = "_editorWrapper_ate6h_225", r = "_editMode_ate6h_383", m = "_compact_ate6h_409", c = "_attachmentsSlot_ate6h_441", p = {
|
|
2
2
|
commentComposerWrapper: o,
|
|
3
|
-
commentComposerFloat:
|
|
4
|
-
composerContainer:
|
|
5
|
-
editorWrapper:
|
|
6
|
-
editMode:
|
|
3
|
+
commentComposerFloat: t,
|
|
4
|
+
composerContainer: e,
|
|
5
|
+
editorWrapper: a,
|
|
6
|
+
editMode: r,
|
|
7
|
+
compact: m,
|
|
8
|
+
attachmentsSlot: c
|
|
7
9
|
};
|
|
8
10
|
export {
|
|
9
|
-
|
|
11
|
+
c as attachmentsSlot,
|
|
12
|
+
t as commentComposerFloat,
|
|
10
13
|
o as commentComposerWrapper,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
p as
|
|
14
|
-
|
|
14
|
+
m as compact,
|
|
15
|
+
e as composerContainer,
|
|
16
|
+
p as default,
|
|
17
|
+
r as editMode,
|
|
18
|
+
a as editorWrapper
|
|
15
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CommentComposerTypes } from './types';
|
|
3
|
-
export declare const CommentEditorHandler: ({ children, onSubmit, editorRef, commentDraft, onBlur, inputContainerRef, isFloat, isEdit, hasChanges, ns, }: {
|
|
3
|
+
export declare const CommentEditorHandler: ({ children, onSubmit, editorRef, commentDraft, onBlur, inputContainerRef, isFloat, isEdit, hasChanges, ns, forceAutoFocus, }: {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
onSubmit: () => void;
|
|
6
6
|
editorRef: React.MutableRefObject<any>;
|
|
@@ -14,5 +14,6 @@ export declare const CommentEditorHandler: ({ children, onSubmit, editorRef, com
|
|
|
14
14
|
isEdit: boolean;
|
|
15
15
|
hasChanges: boolean;
|
|
16
16
|
ns: string;
|
|
17
|
+
forceAutoFocus?: boolean;
|
|
17
18
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
//# sourceMappingURL=CommentEditorHotkeys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommentEditorHotkeys.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/CommentEditorHotkeys.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C,eAAO,MAAM,oBAAoB,GAAI,
|
|
1
|
+
{"version":3,"file":"CommentEditorHotkeys.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/CommentEditorHotkeys.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C,eAAO,MAAM,oBAAoB,GAAI,8HAYlC;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACvC,iBAAiB,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC/C,YAAY,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,EAAE,CAAC;KACjD,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,4CA6KA,CAAC"}
|
|
@@ -1,55 +1,58 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as T, useEffect as u } from "react";
|
|
3
3
|
import { useTranslation as k } from "react-i18next";
|
|
4
4
|
import { openRemoveConfirmModal as P } from "../modals/RemoveConfirmModal.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import v from "./CommentComposer.module.css.js";
|
|
6
|
+
const W = ({
|
|
7
7
|
children: b,
|
|
8
8
|
onSubmit: E,
|
|
9
|
-
editorRef:
|
|
9
|
+
editorRef: a,
|
|
10
10
|
commentDraft: f,
|
|
11
11
|
onBlur: c,
|
|
12
12
|
inputContainerRef: p,
|
|
13
|
-
isFloat:
|
|
13
|
+
isFloat: w,
|
|
14
14
|
isEdit: i,
|
|
15
15
|
hasChanges: s,
|
|
16
|
-
ns:
|
|
16
|
+
ns: L,
|
|
17
|
+
forceAutoFocus: S
|
|
17
18
|
}) => {
|
|
18
|
-
const d =
|
|
19
|
+
const d = T(null), g = i || w || S, { t: r } = k(L);
|
|
19
20
|
return u(() => {
|
|
20
21
|
const t = (e) => {
|
|
21
22
|
if (e.code === "Enter" && !e.shiftKey) {
|
|
22
|
-
if (e.stopPropagation(), i ? s : !s) return;
|
|
23
|
+
if (document.querySelector('[id^="mention-item-"]') || (e.stopPropagation(), i ? s : !s)) return;
|
|
23
24
|
d.current && d.current.contains(document.activeElement) && (e.preventDefault(), E());
|
|
24
25
|
}
|
|
25
26
|
};
|
|
26
27
|
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
27
28
|
}, [E, i, s]), u(() => {
|
|
28
|
-
if (!
|
|
29
|
-
const t =
|
|
30
|
-
|
|
29
|
+
if (!g) return;
|
|
30
|
+
const t = a.current;
|
|
31
|
+
if (!t) return;
|
|
32
|
+
const e = window.setTimeout(() => {
|
|
31
33
|
t.focus(() => ({ defaultSelection: "rootEnd" }));
|
|
32
34
|
}, 100);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
return () => window.clearTimeout(e);
|
|
36
|
+
}, [g]), u(() => {
|
|
37
|
+
const t = a.current;
|
|
35
38
|
if (!t) return;
|
|
36
39
|
const e = () => setTimeout(() => {
|
|
37
40
|
t.focus(() => ({ defaultSelection: "rootEnd" }));
|
|
38
|
-
}, 0), o = (
|
|
39
|
-
const n =
|
|
41
|
+
}, 0), o = (m) => {
|
|
42
|
+
const n = m.target;
|
|
40
43
|
if (!n || n.closest("button") || n.closest("[data-no-focus]")) return;
|
|
41
44
|
if (n.closest("[data-editor-spacer='true']")) {
|
|
42
45
|
e();
|
|
43
46
|
return;
|
|
44
47
|
}
|
|
45
|
-
const l = n.closest(`.${
|
|
48
|
+
const l = n.closest(`.${v.commentComposerWrapper}`);
|
|
46
49
|
if (!l) return;
|
|
47
|
-
const
|
|
48
|
-
if (!
|
|
49
|
-
l.querySelector(`.${
|
|
50
|
+
const y = l.querySelector("[data-comment-footer]");
|
|
51
|
+
if (!y || !y.contains(n)) return;
|
|
52
|
+
l.querySelector(`.${v.imagePreviewWrapper}`) || l.querySelector(`.${v.filePreviewWrapper}`) || e();
|
|
50
53
|
};
|
|
51
54
|
return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
|
|
52
|
-
}, [
|
|
55
|
+
}, [a]), u(() => {
|
|
53
56
|
const t = d.current;
|
|
54
57
|
if (!t) return;
|
|
55
58
|
const e = () => {
|
|
@@ -62,8 +65,8 @@ const M = ({
|
|
|
62
65
|
const t = (e) => {
|
|
63
66
|
const o = e.target;
|
|
64
67
|
if (!o) return;
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
68
|
+
const m = p.current;
|
|
69
|
+
if (m && !m.contains(o) && !(o.closest(".mantine-Modal-root") || o.closest(".floating-text-format-popup") || o.closest('[data-test-id="floating-link-dropdown"]'))) {
|
|
67
70
|
if (i) {
|
|
68
71
|
if (!s) {
|
|
69
72
|
e.stopPropagation(), e.preventDefault(), P({
|
|
@@ -84,7 +87,7 @@ const M = ({
|
|
|
84
87
|
c?.();
|
|
85
88
|
return;
|
|
86
89
|
}
|
|
87
|
-
if (
|
|
90
|
+
if (w) {
|
|
88
91
|
if (f.text.trim() !== "" || (f.files?.length ?? 0) > 0) {
|
|
89
92
|
e.stopPropagation(), e.preventDefault(), P({
|
|
90
93
|
title: r("editor.composer.discardCommentTitle"),
|
|
@@ -106,8 +109,8 @@ const M = ({
|
|
|
106
109
|
}
|
|
107
110
|
};
|
|
108
111
|
return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
|
|
109
|
-
}, [i,
|
|
112
|
+
}, [i, w, s, f, c]), /* @__PURE__ */ C("div", { ref: d, children: b });
|
|
110
113
|
};
|
|
111
114
|
export {
|
|
112
|
-
|
|
115
|
+
W as CommentEditorHandler
|
|
113
116
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { CommentComposerProps } from './types';
|
|
2
|
-
export declare const CommentComposer: ({ children, onSubmit, initialDraft, updateLocation, onBlur, setEdit, ns, }: CommentComposerProps) => import("react/jsx-runtime").JSX.Element
|
|
3
|
+
export declare const CommentComposer: React.MemoExoticComponent<({ children, onSubmit, initialDraft, updateLocation, onBlur, setEdit, ns, compact, placeholder: placeholderProp, autoFocus, }: CommentComposerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAsBf,OAAO,EAAE,oBAAoB,EAAwB,MAAM,SAAS,CAAC;AA0CrE,eAAO,MAAM,eAAe,2JAYvB,oBAAoB,6CAydxB,CAAC"}
|