@layers-app/shared 0.4.7 → 0.4.8
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/AttachmentsGalleryContext.d.ts +0 -2
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.js +17 -22
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +22 -22
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +120 -172
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +28 -32
- 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 +4 -4
- 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 +1 -1
- package/dist/components/CommentComposer/index.d.ts.map +1 -1
- package/dist/components/CommentComposer/index.js +70 -68
- package/dist/components/CommentComposer/types.d.ts +6 -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.map +1 -1
- package/dist/helpers/getFileType.js +11 -2
- 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/index.css +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +560 -571
- package/dist/lang/locales/ui_en.json.js +1 -1
- package/dist/lang/locales/ui_es.json.js +1 -1
- package/dist/lang/locales/ui_ru.json.js +1 -1
- 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 +80 -79
- package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts +0 -15
- package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts.map +0 -1
- package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.js +0 -36
- package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts +0 -14
- package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts.map +0 -1
- package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.js +0 -31
- package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts +0 -18
- package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts.map +0 -1
- package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.js +0 -35
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts +0 -33
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts.map +0 -1
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.js +0 -70
- 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
- package/dist/components/VideoPlayer/VideoPlayer.d.ts +0 -24
- package/dist/components/VideoPlayer/VideoPlayer.d.ts.map +0 -1
- package/dist/components/VideoPlayer/VideoPlayer.js +0 -727
- package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts +0 -8
- package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/MobileDrawer/index.js +0 -67
- package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts +0 -7
- package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/SelectListOptionButton.js +0 -44
- package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts +0 -9
- package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/StoryboardPreview.js +0 -38
- package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts +0 -33
- package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoCustomControls.js +0 -601
- package/dist/components/VideoPlayer/components/VideoIcons.d.ts +0 -25
- package/dist/components/VideoPlayer/components/VideoIcons.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoIcons.js +0 -145
- package/dist/components/VideoPlayer/components/VideoMenu.d.ts +0 -27
- package/dist/components/VideoPlayer/components/VideoMenu.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoMenu.js +0 -77
- package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts +0 -17
- package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.js +0 -289
- package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts +0 -10
- package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoQualityMenu/index.js +0 -55
- package/dist/components/VideoPlayer/components/VideoSelect.d.ts +0 -10
- package/dist/components/VideoPlayer/components/VideoSelect.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSelect.js +0 -168
- package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts +0 -12
- package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.js +0 -48
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts +0 -25
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.js +0 -384
- package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts +0 -21
- package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.js +0 -264
- package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts +0 -10
- package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.js +0 -39
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts +0 -14
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.js +0 -360
- package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts +0 -16
- package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts +0 -14
- package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts +0 -4
- package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/context.js +0 -14
- package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts +0 -22
- package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/index.js +0 -211
- package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts +0 -11
- package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.js +0 -41
- package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts +0 -10
- package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.js +0 -69
- package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts +0 -21
- package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts.map +0 -1
- package/dist/components/VideoPlayer/hooks/useStoryboard.js +0 -91
- package/dist/components/VideoPlayer/index.d.ts +0 -11
- package/dist/components/VideoPlayer/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/types.d.ts +0 -101
- package/dist/components/VideoPlayer/types.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/chapters.d.ts +0 -8
- package/dist/components/VideoPlayer/utils/chapters.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/chapters.js +0 -38
- package/dist/components/VideoPlayer/utils/storyboard.d.ts +0 -5
- package/dist/components/VideoPlayer/utils/storyboard.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/storyboard.js +0 -47
- package/dist/components/VideoPlayer/utils/subtitles.d.ts +0 -18
- package/dist/components/VideoPlayer/utils/subtitles.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/subtitles.js +0 -23
- package/dist/components/VideoPlayer/utils/touch.d.ts +0 -3
- package/dist/components/VideoPlayer/utils/touch.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/touch.js +0 -5
- package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts +0 -10
- package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/videoPlayerUtils.js +0 -22
- package/dist/components/VideoPlayer/utils/videoSettings.d.ts +0 -69
- package/dist/components/VideoPlayer/utils/videoSettings.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/videoSettings.js +0 -90
- package/dist/videoSettings/createVideoSettingsDataSource.d.ts +0 -19
- package/dist/videoSettings/createVideoSettingsDataSource.d.ts.map +0 -1
- package/dist/videoSettings/createVideoSettingsDataSource.js +0 -127
|
@@ -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,15 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_commentComposerWrapper_jn3k1_1", e = "_commentComposerFloat_jn3k1_135", r = "_composerContainer_jn3k1_193", t = "_editorWrapper_jn3k1_225", n = "_editMode_jn3k1_383", p = {
|
|
2
2
|
commentComposerWrapper: o,
|
|
3
3
|
commentComposerFloat: e,
|
|
4
4
|
composerContainer: r,
|
|
5
5
|
editorWrapper: t,
|
|
6
|
-
editMode:
|
|
6
|
+
editMode: n
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
9
|
e as commentComposerFloat,
|
|
10
10
|
o as commentComposerWrapper,
|
|
11
11
|
r as composerContainer,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
p as default,
|
|
13
|
+
n as editMode,
|
|
14
14
|
t as editorWrapper
|
|
15
15
|
};
|
|
@@ -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,3 @@
|
|
|
1
1
|
import { CommentComposerProps } from './types';
|
|
2
|
-
export declare const CommentComposer: ({ children, onSubmit, initialDraft, updateLocation, onBlur, setEdit, ns, }: CommentComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const CommentComposer: ({ children, onSubmit, initialDraft, updateLocation, onBlur, setEdit, ns, autoFocus, }: CommentComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,EAAE,oBAAoB,EAAwB,MAAM,SAAS,CAAC;AA0CrE,eAAO,MAAM,eAAe,GAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,EAAE,oBAAoB,EAAwB,MAAM,SAAS,CAAC;AA0CrE,eAAO,MAAM,eAAe,GAAI,uFAS7B,oBAAoB,4CAuctB,CAAC"}
|
|
@@ -1,66 +1,67 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { Attachment02Icon as
|
|
1
|
+
import { jsx as n, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { useState as ee, useRef as v, useMemo as U, useCallback as te, useEffect as A } from "react";
|
|
3
|
+
import { useTranslation as oe } from "react-i18next";
|
|
4
|
+
import { Attachment02Icon as re, Sent02Icon as ne } from "@hugeicons/core-free-icons";
|
|
5
5
|
import { HugeiconsIcon as $ } from "@hugeicons/react";
|
|
6
|
-
import { Stack as
|
|
7
|
-
import { getMaxUploadSize as
|
|
6
|
+
import { Stack as se, Box as ie, Group as B, FileButton as le, ActionIcon as P, UnstyledButton as ae, Text as ce, Button as de, Popover as L } from "@mantine/core";
|
|
7
|
+
import { getMaxUploadSize as me } from "../../config/envConfig.js";
|
|
8
8
|
import { showErrorNotification as W } from "../../helpers/showNotifications.js";
|
|
9
|
-
import { AttachmentsPreview as
|
|
10
|
-
import { CommentEditorHandler as
|
|
11
|
-
import { useVirtualAnchor as
|
|
9
|
+
import { AttachmentsPreview as ue } from "../AttachmentsPreview/AttachmentsPreview.js";
|
|
10
|
+
import { CommentEditorHandler as fe } from "./CommentEditorHotkeys.js";
|
|
11
|
+
import { useVirtualAnchor as pe } from "./useVirtualAnchor.js";
|
|
12
12
|
import y from "./CommentComposer.module.css.js";
|
|
13
|
-
function j(
|
|
14
|
-
return "id" in
|
|
13
|
+
function j(r) {
|
|
14
|
+
return "id" in r;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return typeof
|
|
16
|
+
function he(r) {
|
|
17
|
+
return typeof r == "object" && "isTemp" in r;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const c = URL.createObjectURL(
|
|
19
|
+
function ge(r) {
|
|
20
|
+
const c = URL.createObjectURL(r);
|
|
21
21
|
return {
|
|
22
22
|
id: `temp-${crypto.randomUUID()}`,
|
|
23
|
-
name:
|
|
24
|
-
type:
|
|
25
|
-
size:
|
|
23
|
+
name: r.name,
|
|
24
|
+
type: r.type,
|
|
25
|
+
size: r.size,
|
|
26
26
|
url: c,
|
|
27
27
|
src: c,
|
|
28
|
-
isImage:
|
|
28
|
+
isImage: r.type.startsWith("image/"),
|
|
29
29
|
isTemp: !0,
|
|
30
|
-
raw:
|
|
30
|
+
raw: r
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
const M = () =>
|
|
34
|
-
function
|
|
35
|
-
return
|
|
33
|
+
const M = () => me() ?? 5 * 1024 * 1024, xe = 10;
|
|
34
|
+
function ye(r, c) {
|
|
35
|
+
return r(`composer.${c}`, { defaultValue: "" }) || r(`editor.composer.${c}`);
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
children:
|
|
37
|
+
const Re = ({
|
|
38
|
+
children: r,
|
|
39
39
|
onSubmit: c,
|
|
40
40
|
initialDraft: d,
|
|
41
41
|
updateLocation: N,
|
|
42
42
|
onBlur: k,
|
|
43
43
|
setEdit: R,
|
|
44
|
-
ns: S = "comments"
|
|
44
|
+
ns: S = "comments",
|
|
45
|
+
autoFocus: G
|
|
45
46
|
}) => {
|
|
46
|
-
const [m, _] =
|
|
47
|
+
const [m, _] = ee({
|
|
47
48
|
text: d?.text ?? "",
|
|
48
49
|
files: d?.files ?? []
|
|
49
|
-
}), { t: h } =
|
|
50
|
+
}), { t: h } = oe(S), X = h(S === "comments" ? "composer.placeholder" : "editor.composer.placeholder"), g = v(null), u = typeof d?.text < "u", a = {
|
|
50
51
|
text: m.text,
|
|
51
52
|
files: m.files
|
|
52
|
-
},
|
|
53
|
+
}, Y = v(null), p = v(null), V = U(
|
|
53
54
|
() => ({
|
|
54
55
|
container: document.createElement("div"),
|
|
55
56
|
elements: []
|
|
56
57
|
}),
|
|
57
58
|
[]
|
|
58
|
-
),
|
|
59
|
+
), q = v(null), f = !!N, J = pe({
|
|
59
60
|
isFloat: f,
|
|
60
61
|
updateLocation: N,
|
|
61
|
-
selectionRef:
|
|
62
|
-
selectionState:
|
|
63
|
-
}), I = 10 * 30 * 0.7, b =
|
|
62
|
+
selectionRef: q,
|
|
63
|
+
selectionState: V
|
|
64
|
+
}), I = 10 * 30 * 0.7, b = te(() => {
|
|
64
65
|
if (!p.current) return;
|
|
65
66
|
const e = p.current, t = e.querySelector(
|
|
66
67
|
'[class*="editorWrapper"]'
|
|
@@ -88,7 +89,7 @@ const Ne = ({
|
|
|
88
89
|
};
|
|
89
90
|
}
|
|
90
91
|
}, [f]);
|
|
91
|
-
const { textChanged:
|
|
92
|
+
const { textChanged: K, newFiles: D, deletedFiles: Q, hasChanges: F } = U(() => {
|
|
92
93
|
const e = d?.files || [], t = m.files, s = d?.text !== a.text, o = t.filter((i) => i.isTemp), x = new Set(
|
|
93
94
|
t.filter(
|
|
94
95
|
(i) => j(i)
|
|
@@ -116,9 +117,9 @@ const Ne = ({
|
|
|
116
117
|
files: o.files
|
|
117
118
|
};
|
|
118
119
|
});
|
|
119
|
-
},
|
|
120
|
+
}, Z = (e, t) => {
|
|
120
121
|
e && t((s) => {
|
|
121
|
-
const o = s.files, x =
|
|
122
|
+
const o = s.files, x = xe - o.length, l = [], E = [];
|
|
122
123
|
e.forEach((z) => {
|
|
123
124
|
z.size > M() ? E.push(z) : l.push(z);
|
|
124
125
|
}), E.length > 0 && W({
|
|
@@ -127,12 +128,12 @@ const Ne = ({
|
|
|
127
128
|
maxSize: Math.round(M() / (1024 * 1024))
|
|
128
129
|
})
|
|
129
130
|
}), l.length > x && W({
|
|
130
|
-
message:
|
|
131
|
+
message: ye(h, "uploadErrors.tooManyFiles")
|
|
131
132
|
});
|
|
132
133
|
const i = l.slice(0, x);
|
|
133
134
|
return {
|
|
134
135
|
...s,
|
|
135
|
-
files: [...o, ...i.map(
|
|
136
|
+
files: [...o, ...i.map(ge)]
|
|
136
137
|
};
|
|
137
138
|
});
|
|
138
139
|
}, w = async () => {
|
|
@@ -140,16 +141,16 @@ const Ne = ({
|
|
|
140
141
|
u ? await c({
|
|
141
142
|
mode: "edit",
|
|
142
143
|
data: {
|
|
143
|
-
textChanged:
|
|
144
|
-
newFiles:
|
|
145
|
-
deletedFiles:
|
|
144
|
+
textChanged: K,
|
|
145
|
+
newFiles: D,
|
|
146
|
+
deletedFiles: Q,
|
|
146
147
|
newText: a.text
|
|
147
148
|
}
|
|
148
149
|
}) : await c({
|
|
149
150
|
mode: "create",
|
|
150
151
|
data: {
|
|
151
152
|
text: a.text,
|
|
152
|
-
files: m.files.filter(
|
|
153
|
+
files: m.files.filter(he)
|
|
153
154
|
}
|
|
154
155
|
});
|
|
155
156
|
} catch {
|
|
@@ -164,8 +165,8 @@ const Ne = ({
|
|
|
164
165
|
const s = new t.klass();
|
|
165
166
|
e.append(s), s.select();
|
|
166
167
|
}), T({ text: "", files: [] }, !0);
|
|
167
|
-
}, O = /* @__PURE__ */
|
|
168
|
-
|
|
168
|
+
}, O = /* @__PURE__ */ n(
|
|
169
|
+
se,
|
|
169
170
|
{
|
|
170
171
|
ref: p,
|
|
171
172
|
className: `
|
|
@@ -178,11 +179,11 @@ const Ne = ({
|
|
|
178
179
|
{
|
|
179
180
|
className: y.composerContainer,
|
|
180
181
|
style: {
|
|
181
|
-
"--placeholder-text": `"${
|
|
182
|
+
"--placeholder-text": `"${X}"`
|
|
182
183
|
},
|
|
183
184
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
|
|
185
|
+
/* @__PURE__ */ n("div", { className: y.editorWrapper, children: /* @__PURE__ */ n(
|
|
186
|
+
fe,
|
|
186
187
|
{
|
|
187
188
|
onSubmit: w,
|
|
188
189
|
editorRef: g,
|
|
@@ -193,7 +194,8 @@ const Ne = ({
|
|
|
193
194
|
isFloat: f,
|
|
194
195
|
hasChanges: F,
|
|
195
196
|
ns: S,
|
|
196
|
-
|
|
197
|
+
forceAutoFocus: G,
|
|
198
|
+
children: r?.({
|
|
197
199
|
onSubmit: w,
|
|
198
200
|
handleBlur: () => {
|
|
199
201
|
},
|
|
@@ -204,9 +206,9 @@ const Ne = ({
|
|
|
204
206
|
})
|
|
205
207
|
}
|
|
206
208
|
) }),
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
|
|
209
|
+
/* @__PURE__ */ n(ie, { h: 10, "data-editor-spacer": !0, tabIndex: 0, style: { width: "100%" } }),
|
|
210
|
+
/* @__PURE__ */ n(
|
|
211
|
+
ue,
|
|
210
212
|
{
|
|
211
213
|
files: m.files,
|
|
212
214
|
mode: "draft",
|
|
@@ -227,24 +229,24 @@ const Ne = ({
|
|
|
227
229
|
tabIndex: 0,
|
|
228
230
|
gap: "4px",
|
|
229
231
|
children: [
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
|
|
232
|
+
/* @__PURE__ */ n(
|
|
233
|
+
le,
|
|
232
234
|
{
|
|
233
|
-
onChange: (e) =>
|
|
235
|
+
onChange: (e) => Z(e, T),
|
|
234
236
|
multiple: !0,
|
|
235
|
-
children: (e) => /* @__PURE__ */
|
|
237
|
+
children: (e) => /* @__PURE__ */ n(P, { ...e, variant: "subtle", size: "lg", color: "gray", children: /* @__PURE__ */ n(
|
|
236
238
|
$,
|
|
237
239
|
{
|
|
238
240
|
style: { transform: "rotate(35deg)" },
|
|
239
|
-
icon:
|
|
241
|
+
icon: re,
|
|
240
242
|
size: 20
|
|
241
243
|
}
|
|
242
244
|
) })
|
|
243
245
|
}
|
|
244
246
|
),
|
|
245
247
|
u ? /* @__PURE__ */ C(B, { gap: "8px", children: [
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
|
|
248
|
+
/* @__PURE__ */ n(
|
|
249
|
+
ae,
|
|
248
250
|
{
|
|
249
251
|
onClick: H,
|
|
250
252
|
"data-no-focus": !0,
|
|
@@ -255,11 +257,11 @@ const Ne = ({
|
|
|
255
257
|
background: "none",
|
|
256
258
|
border: "none"
|
|
257
259
|
},
|
|
258
|
-
children: /* @__PURE__ */
|
|
260
|
+
children: /* @__PURE__ */ n(ce, { size: "sm", c: "dimmed", children: h("composer.cancel") })
|
|
259
261
|
}
|
|
260
262
|
),
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
|
|
263
|
+
/* @__PURE__ */ n(
|
|
264
|
+
de,
|
|
263
265
|
{
|
|
264
266
|
size: "xs",
|
|
265
267
|
radius: "md",
|
|
@@ -268,7 +270,7 @@ const Ne = ({
|
|
|
268
270
|
children: h("composer.save")
|
|
269
271
|
}
|
|
270
272
|
)
|
|
271
|
-
] }) : /* @__PURE__ */
|
|
273
|
+
] }) : /* @__PURE__ */ n(
|
|
272
274
|
P,
|
|
273
275
|
{
|
|
274
276
|
size: "lg",
|
|
@@ -276,7 +278,7 @@ const Ne = ({
|
|
|
276
278
|
variant: "filled",
|
|
277
279
|
onClick: w,
|
|
278
280
|
disabled: !a.text.trim() && a.files.length === 0,
|
|
279
|
-
children: /* @__PURE__ */
|
|
281
|
+
children: /* @__PURE__ */ n($, { icon: ne, size: 20 })
|
|
280
282
|
}
|
|
281
283
|
)
|
|
282
284
|
]
|
|
@@ -321,10 +323,10 @@ const Ne = ({
|
|
|
321
323
|
}
|
|
322
324
|
},
|
|
323
325
|
children: [
|
|
324
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ n(L.Target, { children: /* @__PURE__ */ n(
|
|
325
327
|
"div",
|
|
326
328
|
{
|
|
327
|
-
ref:
|
|
329
|
+
ref: J,
|
|
328
330
|
style: {
|
|
329
331
|
position: "fixed",
|
|
330
332
|
width: "5px",
|
|
@@ -336,10 +338,10 @@ const Ne = ({
|
|
|
336
338
|
}
|
|
337
339
|
}
|
|
338
340
|
) }),
|
|
339
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ n(
|
|
340
342
|
L.Dropdown,
|
|
341
343
|
{
|
|
342
|
-
ref:
|
|
344
|
+
ref: Y,
|
|
343
345
|
className: y.commentComposerFloat,
|
|
344
346
|
children: O
|
|
345
347
|
}
|
|
@@ -349,5 +351,5 @@ const Ne = ({
|
|
|
349
351
|
) : O;
|
|
350
352
|
};
|
|
351
353
|
export {
|
|
352
|
-
|
|
354
|
+
Re as CommentComposer
|
|
353
355
|
};
|
|
@@ -34,6 +34,11 @@ export declare namespace CommentComposerTypes {
|
|
|
34
34
|
isImage: boolean;
|
|
35
35
|
isTemp: boolean;
|
|
36
36
|
raw?: File;
|
|
37
|
+
/** Natural media pixel dimensions when the backend reports them — lets the
|
|
38
|
+
* preview reserve the exact aspect-ratio box so the row doesn't reflow once
|
|
39
|
+
* the media loads. Undefined falls back to a fixed placeholder aspect. */
|
|
40
|
+
width?: number;
|
|
41
|
+
height?: number;
|
|
37
42
|
}
|
|
38
43
|
type AnyCommentFile = CommentAttachment;
|
|
39
44
|
interface CommentDraft {
|
|
@@ -82,6 +87,7 @@ export interface CommentComposerBaseProps {
|
|
|
82
87
|
initialDraft?: CommentComposerTypes.ComposerInitialDraft;
|
|
83
88
|
ns?: string;
|
|
84
89
|
placementData?: PlacementData;
|
|
90
|
+
autoFocus?: boolean;
|
|
85
91
|
setEdit?: (v: {
|
|
86
92
|
id: string;
|
|
87
93
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/types.ts"],"names":[],"mappings":"AAAA,yBAAiB,oBAAoB,CAAC;IACpC,KAAY,MAAM;QAChB,IAAI,SAAS;QACb,OAAO,YAAY;QACnB,MAAM,WAAW;QACjB,MAAM,WAAW;QACjB,SAAS,cAAc;QACvB,IAAI,SAAS;QACb,IAAI,gBAAgB;QACpB,IAAI,SAAS;QACb,UAAU,eAAe;QACzB,IAAI,SAAS;QACb,OAAO,YAAY;QACnB,IAAI,SAAS;KACd;IAED,UAAiB,qBAAqB;QACpC,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,IAAI,CAAC;QACb,GAAG,EAAE,IAAI,CAAC;KACX;IAED,UAAiB,iBAAiB;QAChC,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,OAAO,CAAC;QAChB,GAAG,CAAC,EAAE,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/types.ts"],"names":[],"mappings":"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"}
|