@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,16 @@
|
|
|
1
|
+
export type SubtitleTrack = {
|
|
2
|
+
id: string;
|
|
3
|
+
language: string | null;
|
|
4
|
+
fileName: string | null;
|
|
5
|
+
status: 'empty' | 'uploading' | 'ready';
|
|
6
|
+
};
|
|
7
|
+
type SubtitleTrackRowProps = {
|
|
8
|
+
track: SubtitleTrack;
|
|
9
|
+
onUpdate: (updates: Partial<SubtitleTrack>) => void;
|
|
10
|
+
onUpload: (file: File, language: string) => Promise<void>;
|
|
11
|
+
selectLanguagePlaceholder: string;
|
|
12
|
+
uploadLabel: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function SubtitleTrackRow({ track, onUpdate, onUpload, selectLanguagePlaceholder, uploadLabel, }: SubtitleTrackRowProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=SubtitleTrackRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubtitleTrackRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.tsx"],"names":[],"mappings":"AAsCA,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,OAAO,CAAC;CACzC,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IACpD,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,yBAAyB,EAAE,MAAM,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,yBAAyB,EACzB,WAAW,GACZ,EAAE,qBAAqB,2CAgEvB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type SubtitlesSectionProps = {
|
|
2
|
+
title: string;
|
|
3
|
+
toggleLabel: string;
|
|
4
|
+
manualLabel: string;
|
|
5
|
+
addTrackLabel: string;
|
|
6
|
+
selectLanguagePlaceholder: string;
|
|
7
|
+
uploadLabel: string;
|
|
8
|
+
value: boolean;
|
|
9
|
+
onChange: (value: boolean) => void;
|
|
10
|
+
videoId?: string | null;
|
|
11
|
+
};
|
|
12
|
+
export declare function SubtitlesSection({ title, toggleLabel, manualLabel, addTrackLabel, selectLanguagePlaceholder, uploadLabel, value, onChange, videoId, }: SubtitlesSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=SubtitlesSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubtitlesSection.d.ts","sourceRoot":"","sources":["../../../../../src/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.tsx"],"names":[],"mappings":"AAQA,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,yBAAyB,EAAE,MAAM,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,WAAW,EACX,WAAW,EACX,aAAa,EACb,yBAAyB,EACzB,WAAW,EACX,KAAK,EACL,QAAQ,EACR,OAAO,GACR,EAAE,qBAAqB,2CA6EvB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { VideoSettingsDataSource } from '../../types';
|
|
2
|
+
export declare const VideoSettingsDataSourceProvider: import("react").Provider<VideoSettingsDataSource | null>;
|
|
3
|
+
export declare function useVideoSettingsDataSource(): VideoSettingsDataSource;
|
|
4
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/components/VideoPlayer/components/VideoSettingsModal/context.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAK3D,eAAO,MAAM,+BAA+B,0DACH,CAAC;AAE1C,wBAAgB,0BAA0B,IAAI,uBAAuB,CAQpE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createContext as o, useContext as r } from "react";
|
|
2
|
+
const t = o(null), n = t.Provider;
|
|
3
|
+
function s() {
|
|
4
|
+
const e = r(t);
|
|
5
|
+
if (!e)
|
|
6
|
+
throw new Error(
|
|
7
|
+
"useVideoSettingsDataSource must be used inside <VideoSettingsModal>"
|
|
8
|
+
);
|
|
9
|
+
return e;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
n as VideoSettingsDataSourceProvider,
|
|
13
|
+
s as useVideoSettingsDataSource
|
|
14
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Subtitle, VideoSettingsData, VideoSettingsDataSource } from '../../types';
|
|
2
|
+
import type { ChapterInput } from '../../utils/chapters';
|
|
3
|
+
type VideoSettingsModalProps = {
|
|
4
|
+
opened: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
dataSource: VideoSettingsDataSource;
|
|
7
|
+
videoId?: string | null;
|
|
8
|
+
data?: VideoSettingsData | null;
|
|
9
|
+
onPosterChange?: (posterUrl: string | null) => void;
|
|
10
|
+
onChaptersSaved?: (chapters: ChapterInput[]) => void;
|
|
11
|
+
onChaptersDisabledChange?: (disabled: boolean) => void;
|
|
12
|
+
onSubtitlesSaved?: (tracks: Subtitle[]) => void;
|
|
13
|
+
posterUrl?: string | null;
|
|
14
|
+
chaptersDisabled?: boolean;
|
|
15
|
+
shakaPlayer?: any | null;
|
|
16
|
+
nativeVideo?: HTMLVideoElement | null;
|
|
17
|
+
videoDuration?: number | null;
|
|
18
|
+
playerMode?: 'shaka' | 'native';
|
|
19
|
+
};
|
|
20
|
+
export declare function VideoSettingsModal({ opened, onClose, dataSource, videoId, data, onPosterChange, onChaptersSaved, onChaptersDisabledChange, onSubtitlesSaved, posterUrl, chaptersDisabled, shakaPlayer, nativeVideo, videoDuration, playerMode, }: VideoSettingsModalProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/VideoPlayer/components/VideoSettingsModal/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAQzD,KAAK,uBAAuB,GAAG;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,uBAAuB,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAChC,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACpD,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IACrD,wBAAwB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CACjC,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,OAAO,EACP,UAAU,EACV,OAAO,EACP,IAAI,EACJ,cAAc,EACd,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,SAAS,EACT,gBAAwB,EACxB,WAAW,EACX,WAAW,EACX,aAAa,EACb,UAAqB,GACtB,EAAE,uBAAuB,2CAuNzB"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { jsxs as c, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as a, useRef as E, useCallback as u, useEffect as f } from "react";
|
|
3
|
+
import { useTranslation as I } from "react-i18next";
|
|
4
|
+
import { HelpCircleIcon as B } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as O } from "@hugeicons/react";
|
|
6
|
+
import { Box as N, Stack as U, Flex as q, Text as G, Tooltip as J, Drawer as K, Modal as Q } from "@mantine/core";
|
|
7
|
+
import { IS_TOUCH_DEVICE as W } from "../../utils/touch.js";
|
|
8
|
+
import { ChaptersSection as X } from "./ChaptersSection.js";
|
|
9
|
+
import { CoverSection as Y } from "./CoverSection.js";
|
|
10
|
+
import { FooterActions as Z } from "./FooterActions.js";
|
|
11
|
+
import { ManualSubtitlesPanel as $ } from "./ManualSubtitlesPanel.js";
|
|
12
|
+
import { VideoSettingsDataSourceProvider as ee } from "./context.js";
|
|
13
|
+
function ve({
|
|
14
|
+
opened: r,
|
|
15
|
+
onClose: l,
|
|
16
|
+
dataSource: s,
|
|
17
|
+
videoId: o,
|
|
18
|
+
data: n,
|
|
19
|
+
onPosterChange: b,
|
|
20
|
+
onChaptersSaved: M,
|
|
21
|
+
onChaptersDisabledChange: C,
|
|
22
|
+
onSubtitlesSaved: S,
|
|
23
|
+
posterUrl: z,
|
|
24
|
+
chaptersDisabled: g = !1,
|
|
25
|
+
shakaPlayer: y,
|
|
26
|
+
nativeVideo: L,
|
|
27
|
+
videoDuration: D,
|
|
28
|
+
playerMode: R = "native"
|
|
29
|
+
}) {
|
|
30
|
+
const { t: e } = I(), [m, P] = a(g), [d, A] = a(
|
|
31
|
+
null
|
|
32
|
+
), [v, w] = a(
|
|
33
|
+
n ?? null
|
|
34
|
+
), [T, F] = a([]), p = E(
|
|
35
|
+
null
|
|
36
|
+
), h = E(null), [H, x] = a(!1), V = u((t) => {
|
|
37
|
+
A(t);
|
|
38
|
+
}, []);
|
|
39
|
+
f(() => {
|
|
40
|
+
n && w(n);
|
|
41
|
+
}, [n]), f(() => {
|
|
42
|
+
!r || !o || s.getSettings().then((t) => {
|
|
43
|
+
t && w(t);
|
|
44
|
+
}).catch(() => {
|
|
45
|
+
});
|
|
46
|
+
}, [r, o, s]), f(() => {
|
|
47
|
+
r && P(g);
|
|
48
|
+
}, [r, g]);
|
|
49
|
+
const j = u(
|
|
50
|
+
async (t) => {
|
|
51
|
+
if (o)
|
|
52
|
+
return s.uploadCover(t);
|
|
53
|
+
},
|
|
54
|
+
[o, s]
|
|
55
|
+
), k = u(async () => {
|
|
56
|
+
x(!0);
|
|
57
|
+
try {
|
|
58
|
+
if (p.current) {
|
|
59
|
+
const t = await p.current();
|
|
60
|
+
Array.isArray(t) && M?.(t);
|
|
61
|
+
}
|
|
62
|
+
C?.(m), h.current && await h.current(), S?.(T), d !== null && b?.(d), o && await s.getSettings(), l();
|
|
63
|
+
} finally {
|
|
64
|
+
x(!1);
|
|
65
|
+
}
|
|
66
|
+
}, [
|
|
67
|
+
o,
|
|
68
|
+
s,
|
|
69
|
+
m,
|
|
70
|
+
C,
|
|
71
|
+
M,
|
|
72
|
+
l,
|
|
73
|
+
b,
|
|
74
|
+
S,
|
|
75
|
+
d,
|
|
76
|
+
T
|
|
77
|
+
]), _ = /* @__PURE__ */ c(ee, { value: s, children: [
|
|
78
|
+
/* @__PURE__ */ i(N, { className: "video-settings-modal-body", children: /* @__PURE__ */ c(U, { gap: 32, children: [
|
|
79
|
+
/* @__PURE__ */ i(
|
|
80
|
+
Y,
|
|
81
|
+
{
|
|
82
|
+
opened: r,
|
|
83
|
+
videoId: o,
|
|
84
|
+
initialData: v,
|
|
85
|
+
title: e("editor.video.settingsModal.cover"),
|
|
86
|
+
uploadLabel: e("editor.video.settingsModal.uploadFile"),
|
|
87
|
+
cropLabel: e("editor.video.settingsModal.cropCoverImage"),
|
|
88
|
+
emptyCoverLabel: e("editor.video.settingsModal.emptyCovers"),
|
|
89
|
+
loadErrorLabel: e("editor.video.settingsModal.loadError"),
|
|
90
|
+
retryLabel: e("editor.video.settingsModal.retry"),
|
|
91
|
+
onCoverUpload: j,
|
|
92
|
+
onSelectedPosterChange: V,
|
|
93
|
+
selectedPosterUrl: d ?? z ?? null
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ c(U, { gap: "xs", children: [
|
|
97
|
+
/* @__PURE__ */ c(q, { align: "center", gap: 6, children: [
|
|
98
|
+
/* @__PURE__ */ i(G, { className: "video-settings-modal-section-title", children: e("editor.video.settingsModal.subtitles") }),
|
|
99
|
+
/* @__PURE__ */ i(
|
|
100
|
+
J,
|
|
101
|
+
{
|
|
102
|
+
label: e("editor.video.settingsModal.subtitlesFormatHint"),
|
|
103
|
+
position: "right",
|
|
104
|
+
withArrow: !0,
|
|
105
|
+
children: /* @__PURE__ */ i(
|
|
106
|
+
O,
|
|
107
|
+
{
|
|
108
|
+
icon: B,
|
|
109
|
+
size: 16,
|
|
110
|
+
color: "var(--mantine-color-dimmed)"
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
] }),
|
|
116
|
+
/* @__PURE__ */ i(
|
|
117
|
+
$,
|
|
118
|
+
{
|
|
119
|
+
videoId: o,
|
|
120
|
+
mode: R,
|
|
121
|
+
shakaPlayer: y,
|
|
122
|
+
nativeVideo: L,
|
|
123
|
+
statusSubtitles: v?.subtitles,
|
|
124
|
+
onTracksChange: F,
|
|
125
|
+
onSave: (t) => {
|
|
126
|
+
h.current = t;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
] }),
|
|
131
|
+
/* @__PURE__ */ i(
|
|
132
|
+
X,
|
|
133
|
+
{
|
|
134
|
+
videoId: o,
|
|
135
|
+
initialChapters: v?.chapters,
|
|
136
|
+
nativeVideo: L,
|
|
137
|
+
shakaPlayer: y,
|
|
138
|
+
videoDuration: D,
|
|
139
|
+
title: e("editor.video.settingsModal.chapters"),
|
|
140
|
+
toggleLabel: e("editor.video.settingsModal.showChaptersInPlayer"),
|
|
141
|
+
chaptersDisabled: m,
|
|
142
|
+
onChaptersDisabledChange: P,
|
|
143
|
+
onSave: (t) => {
|
|
144
|
+
p.current = t;
|
|
145
|
+
},
|
|
146
|
+
timePlaceholder: e(
|
|
147
|
+
"editor.video.settingsModal.chaptersTimePlaceholder"
|
|
148
|
+
),
|
|
149
|
+
titlePlaceholder: e(
|
|
150
|
+
"editor.video.settingsModal.chaptersTitlePlaceholder"
|
|
151
|
+
),
|
|
152
|
+
endTimePlaceholder: e(
|
|
153
|
+
"editor.video.settingsModal.chaptersEndTimePlaceholder"
|
|
154
|
+
),
|
|
155
|
+
addChapterLabel: e("editor.video.settingsModal.addChapter"),
|
|
156
|
+
deleteChapterLabel: e("editor.video.settingsModal.deleteChapter"),
|
|
157
|
+
emptyLabel: e("editor.video.settingsModal.emptyChapters"),
|
|
158
|
+
errorLabel: e("editor.video.settingsModal.chaptersError"),
|
|
159
|
+
invalidRangeLabel: e(
|
|
160
|
+
"editor.video.settingsModal.chaptersInvalidTimeRange"
|
|
161
|
+
)
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
] }) }),
|
|
165
|
+
/* @__PURE__ */ i(N, { className: "video-settings-modal-footer", children: /* @__PURE__ */ i(
|
|
166
|
+
Z,
|
|
167
|
+
{
|
|
168
|
+
cancelLabel: e("editor.video.settingsModal.cancel"),
|
|
169
|
+
saveLabel: e("editor.video.settingsModal.save"),
|
|
170
|
+
onCancel: l,
|
|
171
|
+
onSave: k,
|
|
172
|
+
isSaving: H
|
|
173
|
+
}
|
|
174
|
+
) })
|
|
175
|
+
] });
|
|
176
|
+
return W ? /* @__PURE__ */ i(
|
|
177
|
+
K,
|
|
178
|
+
{
|
|
179
|
+
opened: r,
|
|
180
|
+
onClose: l,
|
|
181
|
+
title: e("editor.video.settingsModal.title"),
|
|
182
|
+
position: "bottom",
|
|
183
|
+
size: "auto",
|
|
184
|
+
radius: "lg",
|
|
185
|
+
zIndex: 300,
|
|
186
|
+
className: "video-settings-modal",
|
|
187
|
+
classNames: {
|
|
188
|
+
content: "video-settings-drawer",
|
|
189
|
+
header: "video-settings-drawer__header",
|
|
190
|
+
title: "video-settings-drawer__title",
|
|
191
|
+
body: "video-settings-drawer__body"
|
|
192
|
+
},
|
|
193
|
+
children: _
|
|
194
|
+
}
|
|
195
|
+
) : /* @__PURE__ */ i(
|
|
196
|
+
Q,
|
|
197
|
+
{
|
|
198
|
+
opened: r,
|
|
199
|
+
onClose: l,
|
|
200
|
+
title: e("editor.video.settingsModal.title"),
|
|
201
|
+
size: "md",
|
|
202
|
+
radius: "lg",
|
|
203
|
+
zIndex: 300,
|
|
204
|
+
className: "video-settings-modal",
|
|
205
|
+
children: _
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
export {
|
|
210
|
+
ve as VideoSettingsModal
|
|
211
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PlayerSettingsSnapshot } from '../../utils/videoSettings';
|
|
2
|
+
type VideoSpeedMenuProps = {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
settings: PlayerSettingsSnapshot;
|
|
5
|
+
currentSpeed?: number | null;
|
|
6
|
+
onBack: () => void;
|
|
7
|
+
onSelect: (speed: number) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function VideoSpeedMenu({ disabled, settings, currentSpeed, onBack, onSelect, }: VideoSpeedMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/VideoPlayer/components/VideoSpeedMenu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAIxE,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,sBAAsB,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,QAAQ,GACT,EAAE,mBAAmB,2CA+BrB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as p } from "react-i18next";
|
|
3
|
+
import { TickIcon as f, ArrowLeftIcon as u } from "../VideoIcons.js";
|
|
4
|
+
import { VideoMenu as S } from "../VideoMenu.js";
|
|
5
|
+
function I({
|
|
6
|
+
disabled: o,
|
|
7
|
+
settings: i,
|
|
8
|
+
currentSpeed: r,
|
|
9
|
+
onBack: s,
|
|
10
|
+
onSelect: c
|
|
11
|
+
}) {
|
|
12
|
+
const { t: n } = p(), d = (e) => e === 1 ? n("editor.video.settings.normal") : e.toString(), m = r ?? i.currentSpeed, a = i.speeds.map((e) => {
|
|
13
|
+
const l = e === m;
|
|
14
|
+
return {
|
|
15
|
+
key: `speed-${e}`,
|
|
16
|
+
testId: `video-settings-speed-${e}`,
|
|
17
|
+
onClick: () => c(e),
|
|
18
|
+
disabled: o,
|
|
19
|
+
leftLabel: d(e),
|
|
20
|
+
rightSection: l ? /* @__PURE__ */ t(f, { size: 16 }) : null
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
return /* @__PURE__ */ t(
|
|
24
|
+
S,
|
|
25
|
+
{
|
|
26
|
+
width: 264,
|
|
27
|
+
maxHeight: 244,
|
|
28
|
+
header: {
|
|
29
|
+
label: n("editor.video.settings.speed"),
|
|
30
|
+
onClick: s,
|
|
31
|
+
disabled: o,
|
|
32
|
+
leftSection: /* @__PURE__ */ t(u, { size: 16 }),
|
|
33
|
+
testId: "video-settings-speed-header"
|
|
34
|
+
},
|
|
35
|
+
items: a
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
I as VideoSpeedMenu
|
|
41
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PlayerSettingsSnapshot } from '../../utils/videoSettings';
|
|
2
|
+
type VideoSubtitlesMenuProps = {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
settings: PlayerSettingsSnapshot;
|
|
5
|
+
onBack: () => void;
|
|
6
|
+
onSelect: (subtitleId: number | null) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function VideoSubtitlesMenu({ disabled, settings, onBack, onSelect, }: VideoSubtitlesMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/VideoPlayer/components/VideoSubtitlesMenu/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AA6BxE,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,sBAAsB,CAAC;IACjC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,QAAQ,GACT,EAAE,uBAAuB,2CAkCzB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as f } from "react-i18next";
|
|
3
|
+
import { isAutoGeneratedTrack as k } from "../../utils/subtitles.js";
|
|
4
|
+
import { TickIcon as b, ArrowLeftIcon as p } from "../VideoIcons.js";
|
|
5
|
+
import { VideoMenu as h } from "../VideoMenu.js";
|
|
6
|
+
const m = {
|
|
7
|
+
en: "English",
|
|
8
|
+
es: "Español",
|
|
9
|
+
fr: "Français",
|
|
10
|
+
de: "Deutsch",
|
|
11
|
+
it: "Italiano",
|
|
12
|
+
pt: "Português",
|
|
13
|
+
ru: "Русский",
|
|
14
|
+
uk: "Українська",
|
|
15
|
+
pl: "Polski",
|
|
16
|
+
nl: "Nederlands",
|
|
17
|
+
sv: "Svenska",
|
|
18
|
+
no: "Norsk",
|
|
19
|
+
da: "Dansk",
|
|
20
|
+
fi: "Suomi",
|
|
21
|
+
tr: "Türkçe",
|
|
22
|
+
ar: "العربية",
|
|
23
|
+
he: "עברית",
|
|
24
|
+
hi: "हिन्दी",
|
|
25
|
+
ja: "日本語",
|
|
26
|
+
ko: "한국어",
|
|
27
|
+
zh: "中文",
|
|
28
|
+
ro: "Română"
|
|
29
|
+
};
|
|
30
|
+
function L({
|
|
31
|
+
disabled: i,
|
|
32
|
+
settings: s,
|
|
33
|
+
onBack: l,
|
|
34
|
+
onSelect: a
|
|
35
|
+
}) {
|
|
36
|
+
const { t: n } = f(), u = n("editor.video.settingsModal.autoGenerated"), d = s.subtitles.map((t) => {
|
|
37
|
+
const c = t.id === s.currentSubtitleId;
|
|
38
|
+
let e = t.label;
|
|
39
|
+
if (k({ label: e })) {
|
|
40
|
+
const r = t.lang ? m[t.lang.toLowerCase()] : null;
|
|
41
|
+
r && (e = r), e = `${e} (${u})`;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
key: `subtitle-${t.id ?? "off"}`,
|
|
45
|
+
testId: `video-settings-subtitle-${t.id ?? "off"}`,
|
|
46
|
+
onClick: () => a(t.id),
|
|
47
|
+
disabled: i,
|
|
48
|
+
leftLabel: e,
|
|
49
|
+
rightSection: c ? /* @__PURE__ */ o(b, { size: 16 }) : null
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
return /* @__PURE__ */ o(
|
|
53
|
+
h,
|
|
54
|
+
{
|
|
55
|
+
width: 264,
|
|
56
|
+
header: {
|
|
57
|
+
label: n("editor.video.settings.subtitlesCc"),
|
|
58
|
+
onClick: l,
|
|
59
|
+
disabled: i,
|
|
60
|
+
leftSection: /* @__PURE__ */ o(p, { size: 16 }),
|
|
61
|
+
testId: "video-settings-subtitles-header"
|
|
62
|
+
},
|
|
63
|
+
items: d
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
L as VideoSubtitlesMenu
|
|
69
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Storyboard, StoryboardCue, StoryboardFrame } from '../types';
|
|
2
|
+
type StoryboardInfo = Storyboard;
|
|
3
|
+
interface UseStoryboardProps {
|
|
4
|
+
storyboard?: StoryboardInfo | null;
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
authHeaders?: Record<string, string>;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
type SheetDimensions = {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
export declare function useStoryboard({ storyboard, baseUrl, authHeaders, enabled, }: UseStoryboardProps): {
|
|
14
|
+
ready: boolean;
|
|
15
|
+
cues: StoryboardCue[];
|
|
16
|
+
durationSec: number;
|
|
17
|
+
getFrameAtRatio: (ratio: number) => StoryboardFrame | null;
|
|
18
|
+
ensureSheetDimensions: (url: string) => Promise<SheetDimensions | null | undefined>;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=useStoryboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStoryboard.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoPlayer/hooks/useStoryboard.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,eAAe,EAEhB,MAAM,UAAU,CAAC;AAOlB,KAAK,cAAc,GAAG,UAAU,CAAC;AAEjC,UAAU,kBAAkB;IAC1B,UAAU,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,KAAK,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,OAAO,EACP,WAAW,EACX,OAAc,GACf,EAAE,kBAAkB;;;;6BAoGT,MAAM,KAAG,eAAe,GAAG,IAAI;iCA3B3B,MAAM;EA8DrB"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { useState as u, useRef as A, useEffect as k, useCallback as C, useMemo as F } from "react";
|
|
2
|
+
import { resolveStoryboardUrl as P, parseStoryboardVtt as G, clampRatio as H } from "../utils/storyboard.js";
|
|
3
|
+
function N({
|
|
4
|
+
storyboard: r,
|
|
5
|
+
baseUrl: i,
|
|
6
|
+
authHeaders: p,
|
|
7
|
+
enabled: y = !0
|
|
8
|
+
}) {
|
|
9
|
+
const [n, S] = u([]), [m, w] = u(0), [h, l] = u(!1), [c, E] = u(
|
|
10
|
+
() => /* @__PURE__ */ new Map()
|
|
11
|
+
), f = A(/* @__PURE__ */ new Set()), v = y && r?.ready && r.vttUrl && r.metaUrl;
|
|
12
|
+
k(() => {
|
|
13
|
+
if (!v) {
|
|
14
|
+
l(!1), S([]), w(0);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
let t = !0;
|
|
18
|
+
return (async () => {
|
|
19
|
+
const a = P(r.vttUrl, i), e = P(
|
|
20
|
+
r.metaUrl,
|
|
21
|
+
i
|
|
22
|
+
), U = {
|
|
23
|
+
method: "GET",
|
|
24
|
+
headers: p || {},
|
|
25
|
+
credentials: i ? void 0 : "include"
|
|
26
|
+
}, [R, x] = await Promise.all([
|
|
27
|
+
fetch(a, U),
|
|
28
|
+
fetch(e, U)
|
|
29
|
+
]);
|
|
30
|
+
if (!R.ok || !x.ok) {
|
|
31
|
+
t && l(!1);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const [W, j] = await Promise.all([
|
|
35
|
+
R.text(),
|
|
36
|
+
x.json().catch(() => ({}))
|
|
37
|
+
]);
|
|
38
|
+
if (!t) return;
|
|
39
|
+
const M = G(W, a, i), D = Number(j.durationSec || 0);
|
|
40
|
+
S(M), w(D), l(M.length > 0 && D > 0);
|
|
41
|
+
})().catch(() => {
|
|
42
|
+
t && l(!1);
|
|
43
|
+
}), () => {
|
|
44
|
+
t = !1;
|
|
45
|
+
};
|
|
46
|
+
}, [v, r?.vttUrl, r?.metaUrl, i, p]);
|
|
47
|
+
const d = C(
|
|
48
|
+
async (t) => {
|
|
49
|
+
if (c.has(t) || f.current.has(t))
|
|
50
|
+
return c.get(t);
|
|
51
|
+
f.current.add(t);
|
|
52
|
+
const s = new Image(), a = await new Promise((e) => {
|
|
53
|
+
s.onload = () => e({ width: s.naturalWidth, height: s.naturalHeight }), s.onerror = () => e(null), s.src = t;
|
|
54
|
+
});
|
|
55
|
+
return f.current.delete(t), a ? (E((e) => {
|
|
56
|
+
const o = new Map(e);
|
|
57
|
+
return o.set(t, a), o;
|
|
58
|
+
}), a) : null;
|
|
59
|
+
},
|
|
60
|
+
[c]
|
|
61
|
+
), T = C(
|
|
62
|
+
(t) => {
|
|
63
|
+
if (!h || !m || n.length === 0) return null;
|
|
64
|
+
const s = H(t), a = Math.min(
|
|
65
|
+
n.length - 1,
|
|
66
|
+
Math.max(0, Math.floor(s * n.length))
|
|
67
|
+
), e = n[a], o = c.get(e.sheetUrl);
|
|
68
|
+
return {
|
|
69
|
+
...e,
|
|
70
|
+
sheetWidth: o?.width,
|
|
71
|
+
sheetHeight: o?.height
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
[h, m, n, c]
|
|
75
|
+
), g = F(() => n.map((t) => t.sheetUrl), [n]);
|
|
76
|
+
return k(() => {
|
|
77
|
+
if (!h || g.length === 0) return;
|
|
78
|
+
const t = g[0];
|
|
79
|
+
c.has(t) || d(t).catch(() => {
|
|
80
|
+
});
|
|
81
|
+
}, [h, g, c, d]), {
|
|
82
|
+
ready: h,
|
|
83
|
+
cues: n,
|
|
84
|
+
durationSec: m,
|
|
85
|
+
getFrameAtRatio: T,
|
|
86
|
+
ensureSheetDimensions: d
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
N as useStoryboard
|
|
91
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { VideoPlayer } from './VideoPlayer';
|
|
2
|
+
export type { VideoPlayerProps } from './VideoPlayer';
|
|
3
|
+
export { VideoSettingsModal } from './components/VideoSettingsModal';
|
|
4
|
+
export { default as VideoSelect } from './components/VideoSelect';
|
|
5
|
+
export type { VideoSelectProps } from './components/VideoSelect';
|
|
6
|
+
export type { Chapter, ChapterThumb, Cover, PlayerInfo, Storyboard, StoryboardCue, StoryboardFrame, StoryboardMeta, Subtitle, SubtitleTrack, SubtitleUploadOptions, VideoPreview, VideoSettingsData, VideoSettingsDataSource, VideoSource, } from './types';
|
|
7
|
+
export { isAutoGeneratedTrack, normalizeSubtitleTrack, } from './utils/subtitles';
|
|
8
|
+
export type { ChapterInput } from './utils/chapters';
|
|
9
|
+
export { parseChaptersText, parseTimestampToSec, secondsToTimestamp, } from './utils/chapters';
|
|
10
|
+
export { IS_TOUCH_DEVICE, IS_TOUCH_TABLET } from './utils/touch';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/VideoPlayer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,YAAY,EACV,OAAO,EACP,YAAY,EACZ,KAAK,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,eAAe,EACf,cAAc,EACd,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,WAAW,GACZ,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|