@layers-app/shared 0.4.5 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
- package/dist/components/AppContainer/AppContainer.module.css.js +22 -12
- package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts +6 -0
- package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts.map +1 -0
- package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.js +161 -0
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +24 -22
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +237 -95
- package/dist/components/AppContainer/components/Header.d.ts.map +1 -1
- package/dist/components/AppContainer/components/Header.js +6 -5
- package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
- package/dist/components/AppContainer/components/ToolSidebar.js +161 -128
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts +62 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +1111 -131
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +158 -6
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.js +59 -56
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +4 -3
- package/dist/components/AppContainer/types.d.ts +1 -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 +2 -0
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.js +22 -17
- package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts +15 -0
- package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts.map +1 -0
- package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.js +36 -0
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +22 -22
- package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts +14 -0
- package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts.map +1 -0
- package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.js +31 -0
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +172 -120
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +68 -62
- package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts +18 -0
- package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts.map +1 -0
- package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.js +35 -0
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts +33 -0
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts.map +1 -0
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.js +70 -0
- package/dist/components/AttachmentsGalleryModal/helpers.d.ts +8 -0
- package/dist/components/AttachmentsGalleryModal/helpers.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/helpers.js +22 -17
- package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.js +28 -25
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +36 -41
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +32 -28
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +135 -80
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +24 -14
- package/dist/components/BouncingLogo/BouncingLogo.d.ts +1 -3
- package/dist/components/BouncingLogo/BouncingLogo.d.ts.map +1 -1
- package/dist/components/BouncingLogo/BouncingLogo.js +14 -20
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -8
- package/dist/components/Chat/CallMessage/CallMessage.module.css.js +8 -8
- package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +5 -5
- package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +1 -1
- package/dist/components/Chat/ChatInput/ChatInput.module.css.js +44 -32
- package/dist/components/Chat/ChatInput/index.d.ts +29 -1
- package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
- package/dist/components/Chat/ChatInput/index.js +178 -118
- package/dist/components/Chat/ChatInput/smilePlusIcon.d.ts +3 -0
- package/dist/components/Chat/ChatInput/smilePlusIcon.d.ts.map +1 -0
- package/dist/components/Chat/ChatInput/smilePlusIcon.js +49 -0
- package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +4 -4
- package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +2 -2
- package/dist/components/Chat/ChatMessage/index.d.ts +2 -0
- package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
- package/dist/components/Chat/ChatMessage/index.js +136 -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 +3 -3
- package/dist/components/Chat/MessageActions/MessageActions.module.css.js +1 -1
- package/dist/components/Chat/MessageActions/index.d.ts +7 -0
- package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageActions/index.js +40 -36
- package/dist/components/Chat/MessageForward/MessageForward.module.css.js +1 -1
- package/dist/components/Chat/MessageList/MessageList.module.css.js +10 -6
- package/dist/components/Chat/MessageList/index.d.ts +30 -3
- package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageList/index.js +154 -66
- package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +3 -3
- package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageMeta/index.js +21 -19
- package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +8 -8
- package/dist/components/Chat/MessageReactions/index.d.ts +17 -0
- package/dist/components/Chat/MessageReactions/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageReactions/index.js +60 -28
- package/dist/components/Chat/MessageReply/MessageReply.module.css.js +7 -7
- package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +8 -6
- package/dist/components/Chat/MessageStatus/index.d.ts +1 -1
- package/dist/components/Chat/MessageStatus/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageStatus/index.js +49 -34
- package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +1 -1
- package/dist/components/CircleColorPicker/CircleColorPicker.d.ts.map +1 -1
- package/dist/components/CircleColorPicker/CircleColorPicker.js +17 -15
- package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +3 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +81 -76
- package/dist/components/ColorPicker/ColorPicker.module.css.js +24 -24
- package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerList.js +43 -41
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerToolbar.js +52 -50
- package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
- 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/EmojiPicker/EmojiPanel.d.ts +2 -1
- package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +73 -72
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +16 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +121 -86
- package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
- package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/IconsPanel.js +28 -25
- package/dist/components/EntityIcon.d.ts +1 -0
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +80 -32
- package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
- package/dist/components/ErrorPage/components/Error403.d.ts +5 -1
- package/dist/components/ErrorPage/components/Error403.d.ts.map +1 -1
- package/dist/components/ErrorPage/components/Error403.js +25 -21
- package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
- package/dist/components/ErrorPage/index.d.ts +5 -1
- package/dist/components/ErrorPage/index.d.ts.map +1 -1
- package/dist/components/ErrorPage/index.js +17 -10
- 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/store/formStore.d.ts.map +1 -1
- package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts +3 -1
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -1
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.js +26 -25
- 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/MusicPlayerBar/components/HoverActions.js +28 -28
- package/dist/components/NavMenu/NavMenu.d.ts +7 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/NavMenu.js +54 -44
- package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +84 -84
- package/dist/components/NavMenu/types.d.ts +4 -0
- package/dist/components/NavMenu/types.d.ts.map +1 -1
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
- package/dist/components/NewToolbar/utils.d.ts +12 -0
- package/dist/components/NewToolbar/utils.d.ts.map +1 -0
- package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
- package/dist/components/Notification/Notification.module.css.js +1 -1
- package/dist/components/OnboardingTour/index.d.ts +1 -1
- package/dist/components/OnboardingTour/index.d.ts.map +1 -1
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts +2 -0
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -1
- package/dist/components/OnboardingTour/useOnboardingTour.js +63 -51
- 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/VideoPlayer/VideoPlayer.d.ts +24 -0
- package/dist/components/VideoPlayer/VideoPlayer.d.ts.map +1 -0
- package/dist/components/VideoPlayer/VideoPlayer.js +727 -0
- package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts +8 -0
- package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/MobileDrawer/index.js +67 -0
- package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts +7 -0
- package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/SelectListOptionButton.js +44 -0
- package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts +9 -0
- package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/StoryboardPreview.js +38 -0
- package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts +33 -0
- package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoCustomControls.js +601 -0
- package/dist/components/VideoPlayer/components/VideoIcons.d.ts +25 -0
- package/dist/components/VideoPlayer/components/VideoIcons.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoIcons.js +145 -0
- package/dist/components/VideoPlayer/components/VideoMenu.d.ts +27 -0
- package/dist/components/VideoPlayer/components/VideoMenu.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoMenu.js +77 -0
- package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts +17 -0
- package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.js +289 -0
- package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts +10 -0
- package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoQualityMenu/index.js +55 -0
- package/dist/components/VideoPlayer/components/VideoSelect.d.ts +10 -0
- package/dist/components/VideoPlayer/components/VideoSelect.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoSelect.js +168 -0
- package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts +12 -0
- package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.js +48 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts +25 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.js +384 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts +21 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.js +264 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts +10 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.js +39 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts +14 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.js +360 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts +16 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts +14 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts +4 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/context.js +14 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts +22 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoSettingsModal/index.js +211 -0
- package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts +11 -0
- package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.js +41 -0
- package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts +10 -0
- package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts.map +1 -0
- package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.js +69 -0
- package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts +21 -0
- package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts.map +1 -0
- package/dist/components/VideoPlayer/hooks/useStoryboard.js +91 -0
- package/dist/components/VideoPlayer/index.d.ts +11 -0
- package/dist/components/VideoPlayer/index.d.ts.map +1 -0
- package/dist/components/VideoPlayer/types.d.ts +101 -0
- package/dist/components/VideoPlayer/types.d.ts.map +1 -0
- package/dist/components/VideoPlayer/utils/chapters.d.ts +8 -0
- package/dist/components/VideoPlayer/utils/chapters.d.ts.map +1 -0
- package/dist/components/VideoPlayer/utils/chapters.js +38 -0
- package/dist/components/VideoPlayer/utils/storyboard.d.ts +5 -0
- package/dist/components/VideoPlayer/utils/storyboard.d.ts.map +1 -0
- package/dist/components/VideoPlayer/utils/storyboard.js +47 -0
- package/dist/components/VideoPlayer/utils/subtitles.d.ts +18 -0
- package/dist/components/VideoPlayer/utils/subtitles.d.ts.map +1 -0
- package/dist/components/VideoPlayer/utils/subtitles.js +23 -0
- package/dist/components/VideoPlayer/utils/touch.d.ts +3 -0
- package/dist/components/VideoPlayer/utils/touch.d.ts.map +1 -0
- package/dist/components/VideoPlayer/utils/touch.js +5 -0
- package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts +10 -0
- package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts.map +1 -0
- package/dist/components/VideoPlayer/utils/videoPlayerUtils.js +22 -0
- package/dist/components/VideoPlayer/utils/videoSettings.d.ts +69 -0
- package/dist/components/VideoPlayer/utils/videoSettings.d.ts.map +1 -0
- package/dist/components/VideoPlayer/utils/videoSettings.js +90 -0
- package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +16 -14
- package/dist/components/table/FrontTable.d.ts.map +1 -1
- package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
- package/dist/config/brand.d.ts.map +1 -1
- package/dist/config/brand.js +29 -29
- package/dist/config/envConfig.d.ts +4 -0
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/config/envConfig.js +41 -37
- package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
- package/dist/helpers/showNotifications.d.ts +9 -0
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +96 -58
- package/dist/helpers/showNotifications.module.css.js +1 -1
- package/dist/hooks/useDateUtils.d.ts.map +1 -1
- package/dist/hooks/useDateUtils.js +19 -23
- package/dist/hooks/useUiPref.d.ts +2 -0
- package/dist/hooks/useUiPref.d.ts.map +1 -0
- package/dist/hooks/useUiPref.js +80 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +582 -558
- 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/videoSettings/createVideoSettingsDataSource.d.ts +19 -0
- package/dist/videoSettings/createVideoSettingsDataSource.d.ts.map +1 -0
- package/dist/videoSettings/createVideoSettingsDataSource.js +127 -0
- package/docs/README.md +499 -499
- package/package.json +79 -78
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ErrorSection as m } from "./ErrorSection.js";
|
|
3
|
+
import { useShakePlayer as n } from "./ShakePlayer/useShakePlayer.js";
|
|
4
|
+
import c from "../styles.module.css.js";
|
|
5
|
+
import { VideoPlayer as d } from "../../VideoPlayer/VideoPlayer.js";
|
|
6
|
+
const u = ({
|
|
7
|
+
attachmentId: o,
|
|
8
|
+
isActive: t,
|
|
9
|
+
autoPlay: l
|
|
10
|
+
}) => {
|
|
11
|
+
const { containerRef: s, vodUrl: r, rawUrl: i, isError: a } = n({
|
|
12
|
+
attachmentId: o,
|
|
13
|
+
isActive: t,
|
|
14
|
+
autoPlay: l
|
|
15
|
+
});
|
|
16
|
+
return a ? /* @__PURE__ */ e(m, {}) : /* @__PURE__ */ e("div", { ref: s, className: c.videoPlayerFill, children: /* @__PURE__ */ e(
|
|
17
|
+
d,
|
|
18
|
+
{
|
|
19
|
+
videoId: o,
|
|
20
|
+
source: {
|
|
21
|
+
streamUrl: r,
|
|
22
|
+
nativeUrl: i,
|
|
23
|
+
optimizedReady: !!r,
|
|
24
|
+
isProcessing: !r && !i
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
) });
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
u as LegacyAttachmentVideoPlayer
|
|
31
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentsGalleryModal/components/ModalHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModalHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentsGalleryModal/components/ModalHeader.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAWrD,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,aAAa,EAAE,CAAC;CAC/B;AAED,eAAO,MAAM,WAAW,iEACK,gBAAgB,6CA0M5C,CAAC"}
|
|
@@ -1,132 +1,184 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { Box as
|
|
5
|
-
import { IconDownload as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { jsxs as o, Fragment as P, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as V, useRef as O, useState as Z, useMemo as j } from "react";
|
|
3
|
+
import { useTranslation as x } from "react-i18next";
|
|
4
|
+
import { Box as B, Tooltip as i, ActionIcon as a, Flex as m, Text as h, Loader as E } from "@mantine/core";
|
|
5
|
+
import { IconDownload as A, IconMinus as U, IconPlus as G, IconSettings as H, IconX as K } from "@tabler/icons-react";
|
|
6
|
+
import { getEnvConfig as L } from "../../../config/envConfig.js";
|
|
7
|
+
import { getFileIcons as X } from "../../../helpers/getFileIcons.js";
|
|
8
|
+
import { getFileType as q } from "../../../helpers/getFileType.js";
|
|
9
|
+
import { createVideoSettingsDataSource as J } from "../../../videoSettings/createVideoSettingsDataSource.js";
|
|
10
|
+
import { useAttachmentsGalleryContext as Q } from "../AttachmentsGalleryContext.js";
|
|
11
|
+
import { getAttachmentFormat as W, zoomStep as S } from "../helpers.js";
|
|
12
|
+
import { useDownloadFile as Y } from "../hooks/useDownloadFile.js";
|
|
13
|
+
import { useZoomReset as _ } from "../hooks/useZoomReset.js";
|
|
14
|
+
import { useAttachmentVideoStatus as $ } from "./useAttachmentVideoStatus.js";
|
|
15
|
+
import r from "../styles.module.css.js";
|
|
16
|
+
import { VideoSettingsModal as ee } from "../../VideoPlayer/components/VideoSettingsModal/index.js";
|
|
17
|
+
const ve = V(
|
|
18
|
+
({ onClose: C, attachments: I }) => {
|
|
19
|
+
_();
|
|
20
|
+
const { t: n } = x("ui"), { t: p } = x(), u = O(null), {
|
|
21
|
+
zoomPercentage: F,
|
|
22
|
+
transformRefs: f,
|
|
23
|
+
selectedIndex: g,
|
|
24
|
+
videoRefreshKey: D,
|
|
25
|
+
refreshVideo: c
|
|
26
|
+
} = Q(), t = I?.[g], v = t ? W(t) : null, { status: l } = $(
|
|
27
|
+
v?.isVideo ? t?.id : void 0,
|
|
28
|
+
D
|
|
29
|
+
), s = l?.videoId ?? null, [N, w] = Z(!1), d = j(
|
|
30
|
+
() => s ? J(s, {
|
|
31
|
+
baseUrl: L().apiBaseUrl
|
|
32
|
+
}) : null,
|
|
33
|
+
[s]
|
|
34
|
+
), R = () => {
|
|
35
|
+
S({
|
|
36
|
+
animationRef: u,
|
|
19
37
|
dir: "in",
|
|
20
|
-
activeRef:
|
|
38
|
+
activeRef: f.current[g]
|
|
21
39
|
});
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
animationRef:
|
|
40
|
+
}, k = () => {
|
|
41
|
+
S({
|
|
42
|
+
animationRef: u,
|
|
25
43
|
dir: "out",
|
|
26
|
-
activeRef:
|
|
44
|
+
activeRef: f.current[g]
|
|
27
45
|
});
|
|
28
|
-
}, {
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
className: n.headerAction,
|
|
48
|
-
size: "lg",
|
|
49
|
-
variant: "subtle",
|
|
50
|
-
loading: d,
|
|
51
|
-
onClick: u,
|
|
52
|
-
children: /* @__PURE__ */ e(p, { size: 20 })
|
|
53
|
-
}
|
|
54
|
-
) }) : /* @__PURE__ */ l(s, { align: "center", gap: 8, ml: 6, miw: 0, children: [
|
|
55
|
-
o ? T(
|
|
56
|
-
j(
|
|
57
|
-
o.contentType ?? "",
|
|
58
|
-
!1,
|
|
59
|
-
o.originalFileName
|
|
60
|
-
),
|
|
61
|
-
!1,
|
|
62
|
-
20
|
|
63
|
-
) : null,
|
|
64
|
-
/* @__PURE__ */ e(g, { fw: 500, fz: 14, c: "var(--app-gallary-text)", truncate: !0, children: o?.originalFileName || "" })
|
|
65
|
-
] }),
|
|
66
|
-
A ? /* @__PURE__ */ e("div", {}) : /* @__PURE__ */ l(s, { gap: "xs", children: [
|
|
67
|
-
/* @__PURE__ */ e(i, { withArrow: !0, label: r("gallery.zoomOut"), children: /* @__PURE__ */ e(
|
|
68
|
-
t,
|
|
69
|
-
{
|
|
70
|
-
className: n.headerAction,
|
|
71
|
-
size: "lg",
|
|
72
|
-
variant: "subtle",
|
|
73
|
-
onClick: b,
|
|
74
|
-
children: /* @__PURE__ */ e(N, { size: 20 })
|
|
75
|
-
}
|
|
76
|
-
) }),
|
|
77
|
-
/* @__PURE__ */ l(
|
|
78
|
-
g,
|
|
79
|
-
{
|
|
80
|
-
fw: 500,
|
|
81
|
-
fz: 14,
|
|
82
|
-
c: "var(--app-gallary-text)",
|
|
83
|
-
miw: 50,
|
|
84
|
-
ta: "center",
|
|
85
|
-
children: [
|
|
86
|
-
y,
|
|
87
|
-
"%"
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
),
|
|
91
|
-
/* @__PURE__ */ e(i, { withArrow: !0, label: r("gallery.zoomIn"), children: /* @__PURE__ */ e(
|
|
92
|
-
t,
|
|
93
|
-
{
|
|
94
|
-
className: n.headerAction,
|
|
95
|
-
size: "lg",
|
|
96
|
-
variant: "subtle",
|
|
97
|
-
onClick: x,
|
|
98
|
-
children: /* @__PURE__ */ e(R, { size: 20 })
|
|
99
|
-
}
|
|
100
|
-
) })
|
|
101
|
-
] }),
|
|
102
|
-
/* @__PURE__ */ l(s, { justify: "end", gap: "xs", children: [
|
|
103
|
-
!h && /* @__PURE__ */ e(i, { withArrow: !0, label: r("gallery.download"), children: /* @__PURE__ */ e(
|
|
104
|
-
t,
|
|
46
|
+
}, { isFetching: b, onDownload: z, isMobile: y } = Y(t), T = v?.isImage ?? !1;
|
|
47
|
+
return /* @__PURE__ */ o(P, { children: [
|
|
48
|
+
/* @__PURE__ */ o(
|
|
49
|
+
B,
|
|
50
|
+
{
|
|
51
|
+
style: {
|
|
52
|
+
borderRadius: 8,
|
|
53
|
+
display: "grid",
|
|
54
|
+
gridTemplateColumns: "1fr auto 1fr",
|
|
55
|
+
alignItems: "center",
|
|
56
|
+
flex: "none",
|
|
57
|
+
gap: 12
|
|
58
|
+
},
|
|
59
|
+
px: 8,
|
|
60
|
+
py: 8,
|
|
61
|
+
bg: "var(--mantine-color-dark-6)",
|
|
62
|
+
children: [
|
|
63
|
+
y ? /* @__PURE__ */ e(i, { withArrow: !0, label: n("gallery.download"), children: /* @__PURE__ */ e(
|
|
64
|
+
a,
|
|
105
65
|
{
|
|
106
|
-
className:
|
|
66
|
+
className: r.headerAction,
|
|
107
67
|
size: "lg",
|
|
108
68
|
variant: "subtle",
|
|
109
|
-
loading:
|
|
110
|
-
onClick:
|
|
111
|
-
children: /* @__PURE__ */ e(
|
|
69
|
+
loading: b,
|
|
70
|
+
onClick: z,
|
|
71
|
+
children: /* @__PURE__ */ e(A, { size: 20 })
|
|
112
72
|
}
|
|
113
|
-
) }),
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
73
|
+
) }) : /* @__PURE__ */ o(m, { align: "center", gap: 8, ml: 6, miw: 0, children: [
|
|
74
|
+
t ? X(
|
|
75
|
+
q(
|
|
76
|
+
t.contentType ?? "",
|
|
77
|
+
!1,
|
|
78
|
+
t.originalFileName
|
|
79
|
+
),
|
|
80
|
+
!1,
|
|
81
|
+
20
|
|
82
|
+
) : null,
|
|
83
|
+
/* @__PURE__ */ e(h, { fw: 500, fz: 14, c: "var(--app-gallary-text)", truncate: !0, children: t?.originalFileName || "" })
|
|
84
|
+
] }),
|
|
85
|
+
T ? /* @__PURE__ */ o(m, { gap: "xs", children: [
|
|
86
|
+
/* @__PURE__ */ e(i, { withArrow: !0, label: n("gallery.zoomOut"), children: /* @__PURE__ */ e(
|
|
87
|
+
a,
|
|
88
|
+
{
|
|
89
|
+
className: r.headerAction,
|
|
90
|
+
size: "lg",
|
|
91
|
+
variant: "subtle",
|
|
92
|
+
onClick: k,
|
|
93
|
+
children: /* @__PURE__ */ e(U, { size: 20 })
|
|
94
|
+
}
|
|
95
|
+
) }),
|
|
96
|
+
/* @__PURE__ */ o(
|
|
97
|
+
h,
|
|
98
|
+
{
|
|
99
|
+
fw: 500,
|
|
100
|
+
fz: 14,
|
|
101
|
+
c: "var(--app-gallary-text)",
|
|
102
|
+
miw: 50,
|
|
103
|
+
ta: "center",
|
|
104
|
+
children: [
|
|
105
|
+
F,
|
|
106
|
+
"%"
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
/* @__PURE__ */ e(i, { withArrow: !0, label: n("gallery.zoomIn"), children: /* @__PURE__ */ e(
|
|
111
|
+
a,
|
|
112
|
+
{
|
|
113
|
+
className: r.headerAction,
|
|
114
|
+
size: "lg",
|
|
115
|
+
variant: "subtle",
|
|
116
|
+
onClick: R,
|
|
117
|
+
children: /* @__PURE__ */ e(G, { size: 20 })
|
|
118
|
+
}
|
|
119
|
+
) })
|
|
120
|
+
] }) : l?.isProcessing ? /* @__PURE__ */ o(m, { align: "center", gap: 8, miw: 0, children: [
|
|
121
|
+
/* @__PURE__ */ e(E, { size: "xs", color: "var(--app-gallary-text)" }),
|
|
122
|
+
/* @__PURE__ */ e(h, { className: r.processingText, fw: 500, fz: 14, children: p("editor.video.upload.processingShort", {
|
|
123
|
+
percent: Math.round(l.processingPercent ?? 0)
|
|
124
|
+
}) })
|
|
125
|
+
] }) : /* @__PURE__ */ e("div", {}),
|
|
126
|
+
/* @__PURE__ */ o(m, { justify: "end", gap: "xs", children: [
|
|
127
|
+
d && !l?.isProcessing && /* @__PURE__ */ e(i, { withArrow: !0, label: p("editor.video.player.settings"), children: /* @__PURE__ */ e(
|
|
128
|
+
a,
|
|
129
|
+
{
|
|
130
|
+
className: r.headerAction,
|
|
131
|
+
size: "lg",
|
|
132
|
+
variant: "subtle",
|
|
133
|
+
onClick: () => w(!0),
|
|
134
|
+
children: /* @__PURE__ */ e(H, { size: 20 })
|
|
135
|
+
}
|
|
136
|
+
) }),
|
|
137
|
+
!y && /* @__PURE__ */ e(i, { withArrow: !0, label: n("gallery.download"), children: /* @__PURE__ */ e(
|
|
138
|
+
a,
|
|
139
|
+
{
|
|
140
|
+
className: r.headerAction,
|
|
141
|
+
size: "lg",
|
|
142
|
+
variant: "subtle",
|
|
143
|
+
loading: b,
|
|
144
|
+
onClick: z,
|
|
145
|
+
children: /* @__PURE__ */ e(A, { size: 20 })
|
|
146
|
+
}
|
|
147
|
+
) }),
|
|
148
|
+
/* @__PURE__ */ e(i, { withArrow: !0, label: n("gallery.close"), children: /* @__PURE__ */ e(
|
|
149
|
+
a,
|
|
150
|
+
{
|
|
151
|
+
className: r.headerAction,
|
|
152
|
+
size: "lg",
|
|
153
|
+
variant: "subtle",
|
|
154
|
+
onClick: C,
|
|
155
|
+
children: /* @__PURE__ */ e(K, { size: 20 })
|
|
156
|
+
}
|
|
157
|
+
) })
|
|
158
|
+
] })
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
d && s && /* @__PURE__ */ e(
|
|
163
|
+
ee,
|
|
164
|
+
{
|
|
165
|
+
opened: N,
|
|
166
|
+
onClose: () => w(!1),
|
|
167
|
+
dataSource: d,
|
|
168
|
+
videoId: s,
|
|
169
|
+
chaptersDisabled: l?.chaptersDisabled,
|
|
170
|
+
onChaptersSaved: c,
|
|
171
|
+
onSubtitlesSaved: c,
|
|
172
|
+
onPosterChange: c,
|
|
173
|
+
onChaptersDisabledChange: (M) => {
|
|
174
|
+
d.setChaptersDisabled(M).then(c).catch(() => {
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
] });
|
|
128
180
|
}
|
|
129
181
|
);
|
|
130
182
|
export {
|
|
131
|
-
|
|
183
|
+
ve as ModalHeader
|
|
132
184
|
};
|
package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
"vod-player": "_vod-
|
|
3
|
-
"vod-player__player": "_vod-
|
|
1
|
+
const e = {
|
|
2
|
+
"vod-player": "_vod-player_1eqso_1",
|
|
3
|
+
"vod-player__player": "_vod-player__player_1eqso_13"
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useShakePlayer.d.ts","sourceRoot":"","sources":["../../../../../src/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useShakePlayer.d.ts","sourceRoot":"","sources":["../../../../../src/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.tsx"],"names":[],"mappings":"AAkDA,eAAO,MAAM,cAAc,GAAI,uCAI5B;IACD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;;;;;CAqLA,CAAC"}
|
|
@@ -1,101 +1,107 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
import { getEnvConfig as
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
return
|
|
6
|
-
},
|
|
7
|
-
const
|
|
8
|
-
return (await fetch(`${
|
|
1
|
+
import { useState as R, useRef as f, useCallback as A, useEffect as C } from "react";
|
|
2
|
+
import { getEnvConfig as S } from "../../../../config/envConfig.js";
|
|
3
|
+
const U = () => {
|
|
4
|
+
const e = S().apiBaseUrl || "";
|
|
5
|
+
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
6
|
+
}, E = async (e) => {
|
|
7
|
+
const s = U();
|
|
8
|
+
return (await fetch(`${s}/v1/auth/refresh`, {
|
|
9
9
|
method: "POST",
|
|
10
10
|
credentials: "include",
|
|
11
|
-
signal:
|
|
11
|
+
signal: e
|
|
12
12
|
})).ok;
|
|
13
|
-
}, $ = async (
|
|
14
|
-
const
|
|
15
|
-
...
|
|
13
|
+
}, $ = async (e, s) => {
|
|
14
|
+
const l = await fetch(e, {
|
|
15
|
+
...s,
|
|
16
16
|
credentials: "include"
|
|
17
17
|
});
|
|
18
|
-
return
|
|
19
|
-
...
|
|
18
|
+
return l.status !== 401 && l.status !== 403 || !await E(s.signal) || s.signal.aborted ? l : fetch(e, {
|
|
19
|
+
...s,
|
|
20
20
|
credentials: "include"
|
|
21
21
|
});
|
|
22
|
-
}, V = ({
|
|
23
|
-
attachmentId:
|
|
24
|
-
isActive:
|
|
25
|
-
autoPlay:
|
|
22
|
+
}, q = () => !!window.layersDesktop || (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") && window.location.port !== "3000", V = ({
|
|
23
|
+
attachmentId: e,
|
|
24
|
+
isActive: s,
|
|
25
|
+
autoPlay: l
|
|
26
26
|
}) => {
|
|
27
|
-
const [
|
|
28
|
-
(
|
|
29
|
-
if (!
|
|
30
|
-
const
|
|
31
|
-
`/v1/attachments/${
|
|
32
|
-
|
|
27
|
+
const [w, g] = R(null), [b, p] = R(null), [T, d] = R(!1), m = f(null), c = f(!0), o = f(null), t = f(null), u = f(null), a = A(
|
|
28
|
+
(r) => {
|
|
29
|
+
if (!e || u.current || !c.current || r.aborted) return;
|
|
30
|
+
const h = U() || window.location.origin, i = new URL(
|
|
31
|
+
`/v1/attachments/${e}`,
|
|
32
|
+
h
|
|
33
33
|
).toString();
|
|
34
|
-
|
|
34
|
+
u.current = i, g(null), p(i);
|
|
35
35
|
},
|
|
36
|
-
[
|
|
37
|
-
),
|
|
38
|
-
if (!
|
|
36
|
+
[e]
|
|
37
|
+
), k = A(async () => {
|
|
38
|
+
if (!e || u.current) return;
|
|
39
39
|
o.current && (clearTimeout(o.current), o.current = null), t.current && t.current.abort();
|
|
40
|
-
const
|
|
41
|
-
t.current =
|
|
40
|
+
const r = new AbortController();
|
|
41
|
+
t.current = r, d(!1);
|
|
42
42
|
try {
|
|
43
|
-
await
|
|
43
|
+
await E(r.signal), a(r.signal);
|
|
44
44
|
} catch (n) {
|
|
45
|
-
if (n instanceof Error && n.name === "AbortError" || !c.current ||
|
|
46
|
-
|
|
45
|
+
if (n instanceof Error && n.name === "AbortError" || !c.current || r.signal.aborted) return;
|
|
46
|
+
d(!0);
|
|
47
47
|
}
|
|
48
|
-
}, [
|
|
49
|
-
if (!
|
|
48
|
+
}, [e, a]), y = async () => {
|
|
49
|
+
if (!e)
|
|
50
50
|
return;
|
|
51
51
|
t.current && t.current.abort();
|
|
52
|
-
const
|
|
53
|
-
t.current =
|
|
52
|
+
const r = new AbortController();
|
|
53
|
+
t.current = r;
|
|
54
54
|
try {
|
|
55
|
-
const n =
|
|
56
|
-
`${n}/v1/attachments/${
|
|
55
|
+
const n = U(), h = await $(
|
|
56
|
+
`${n}/v1/attachments/${e}/vod`,
|
|
57
57
|
{
|
|
58
58
|
method: "GET",
|
|
59
59
|
headers: {
|
|
60
60
|
Accept: "*/*"
|
|
61
61
|
},
|
|
62
|
-
signal:
|
|
62
|
+
signal: r.signal
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
|
-
if (!
|
|
66
|
-
await
|
|
65
|
+
if (!h.ok) {
|
|
66
|
+
await a(r.signal);
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
if (!c.current ||
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
const
|
|
74
|
-
if (
|
|
75
|
-
p(null),
|
|
69
|
+
const i = await h.json();
|
|
70
|
+
if (!c.current || r.signal.aborted) return;
|
|
71
|
+
const v = n || window.location.origin;
|
|
72
|
+
if (i.ready) {
|
|
73
|
+
const B = new URL(i.url, v).toString();
|
|
74
|
+
if (u.current) return;
|
|
75
|
+
p(null), g(B);
|
|
76
76
|
} else
|
|
77
|
-
|
|
77
|
+
a(r.signal), o.current = setTimeout(() => {
|
|
78
78
|
y();
|
|
79
79
|
}, 3e3);
|
|
80
80
|
} catch (n) {
|
|
81
|
-
if (n instanceof Error && n.name === "AbortError" || !c.current ||
|
|
82
|
-
|
|
81
|
+
if (n instanceof Error && n.name === "AbortError" || !c.current || r.signal.aborted) return;
|
|
82
|
+
d(!0);
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
|
-
return
|
|
86
|
-
if (c.current = !0,
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
return C(() => {
|
|
86
|
+
if (c.current = !0, g(null), p(null), d(!1), u.current = null, o.current && (clearTimeout(o.current), o.current = null), t.current && (t.current.abort(), t.current = null), !!e) {
|
|
87
|
+
if (q()) {
|
|
88
|
+
const r = new AbortController();
|
|
89
|
+
t.current = r, a(r.signal);
|
|
90
|
+
} else
|
|
91
|
+
y();
|
|
92
|
+
return () => {
|
|
93
|
+
c.current = !1, o.current && (clearTimeout(o.current), o.current = null), t.current && (t.current.abort(), t.current = null), u.current = null;
|
|
89
94
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
}
|
|
96
|
+
}, [e]), C(() => {
|
|
97
|
+
if (!w && !b || !m.current) return;
|
|
98
|
+
const r = m.current.querySelector(
|
|
93
99
|
"video"
|
|
94
100
|
);
|
|
95
|
-
|
|
101
|
+
r && (s ? l !== !1 && r.play().catch((n) => {
|
|
96
102
|
console.error("Ошибка при воспроизведении видео:", n);
|
|
97
|
-
}) :
|
|
98
|
-
}, [
|
|
103
|
+
}) : r.pause());
|
|
104
|
+
}, [s, w, b, l]), { containerRef: m, fallbackToRawAttachment: k, isError: T, vodUrl: w, rawUrl: b };
|
|
99
105
|
};
|
|
100
106
|
export {
|
|
101
107
|
V as useShakePlayer
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AttachmentVideoStatus } from './useAttachmentVideoStatus';
|
|
2
|
+
type Props = {
|
|
3
|
+
attachmentId: string;
|
|
4
|
+
status: AttachmentVideoStatus;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
autoPlay?: boolean;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Player for videos that went through the video pipeline: playback URLs come
|
|
10
|
+
* straight from `/v1/videos/{id}/status`, so there is no `/vod` polling. While
|
|
11
|
+
* the backend is still transcoding, chapters are hidden and HLS is used only
|
|
12
|
+
* once `optimizedReady`; otherwise the raw URL plays. The processing progress
|
|
13
|
+
* is shown in the gallery header. Subtitles/chapters/storyboard ride along from
|
|
14
|
+
* the same status payload.
|
|
15
|
+
*/
|
|
16
|
+
export declare const StatusVideoPlayer: ({ attachmentId, status, isActive, autoPlay, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=StatusVideoPlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusVideoPlayer.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentsGalleryModal/components/StatusVideoPlayer.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAIxE,KAAK,KAAK,GAAG;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAAI,+CAK/B,KAAK,4CAsCP,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as s, useEffect as t } from "react";
|
|
3
|
+
import y from "../styles.module.css.js";
|
|
4
|
+
import { VideoPlayer as m } from "../../VideoPlayer/VideoPlayer.js";
|
|
5
|
+
const U = ({
|
|
6
|
+
attachmentId: d,
|
|
7
|
+
status: e,
|
|
8
|
+
isActive: o,
|
|
9
|
+
autoPlay: l
|
|
10
|
+
}) => {
|
|
11
|
+
const i = s(null), c = e.isProcessing, a = e.playback.optimizedReady ? e.playback.primaryUrl ?? null : null, n = e.playback.rawUrl ?? null;
|
|
12
|
+
return t(() => {
|
|
13
|
+
const r = i.current?.querySelector("video");
|
|
14
|
+
r && (o ? l !== !1 && r.play().catch(() => {
|
|
15
|
+
}) : r.pause());
|
|
16
|
+
}, [o, l, a, n]), /* @__PURE__ */ p("div", { ref: i, className: y.videoPlayerFill, children: /* @__PURE__ */ p(
|
|
17
|
+
m,
|
|
18
|
+
{
|
|
19
|
+
videoId: d,
|
|
20
|
+
source: {
|
|
21
|
+
streamUrl: a,
|
|
22
|
+
nativeUrl: n,
|
|
23
|
+
posterUrl: e.posterUrl ?? null,
|
|
24
|
+
optimizedReady: !!e.playback.optimizedReady,
|
|
25
|
+
isProcessing: c
|
|
26
|
+
},
|
|
27
|
+
subtitles: e.subtitles,
|
|
28
|
+
chapters: c || e.chaptersDisabled ? void 0 : e.chapters,
|
|
29
|
+
storyboard: e.storyboard
|
|
30
|
+
}
|
|
31
|
+
) });
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
U as StatusVideoPlayer
|
|
35
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Chapter, Storyboard, Subtitle } from '../../VideoPlayer';
|
|
2
|
+
export type AttachmentVideoStatus = {
|
|
3
|
+
videoId?: string;
|
|
4
|
+
state?: string;
|
|
5
|
+
isProcessing: boolean;
|
|
6
|
+
processingPercent?: number;
|
|
7
|
+
posterUrl?: string;
|
|
8
|
+
chaptersDisabled?: boolean;
|
|
9
|
+
playback: {
|
|
10
|
+
primaryUrl?: string | null;
|
|
11
|
+
rawUrl?: string | null;
|
|
12
|
+
optimizedReady?: boolean;
|
|
13
|
+
};
|
|
14
|
+
subtitles?: Subtitle[];
|
|
15
|
+
chapters?: Chapter[];
|
|
16
|
+
storyboard?: Storyboard | null;
|
|
17
|
+
};
|
|
18
|
+
type Result = {
|
|
19
|
+
status: AttachmentVideoStatus | null;
|
|
20
|
+
loaded: boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Fetches (and, while processing, polls) the video status for an attachment.
|
|
24
|
+
* Pipeline videos resolve here via the videoId → sourceAttachmentId fallback and
|
|
25
|
+
* carry their own playback URLs + subtitles/chapters/storyboard — so the rich
|
|
26
|
+
* player needs no `/vod` polling. While the backend is still transcoding the
|
|
27
|
+
* status is re-polled so the processing banner, HLS switch and subtitles appear
|
|
28
|
+
* without reopening. Old attachments (no VideoAsset) return 404 → `status` stays
|
|
29
|
+
* null and the caller falls back to the legacy `/vod` flow.
|
|
30
|
+
*/
|
|
31
|
+
export declare function useAttachmentVideoStatus(attachmentId?: string, refreshKey?: number): Result;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=useAttachmentVideoStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAttachmentVideoStatus.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGvE,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE;QACR,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;IACF,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF,KAAK,MAAM,GAAG;IACZ,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACrC,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AA8EF;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,CAAC,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CA2DR"}
|