@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.
Files changed (296) hide show
  1. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
  2. package/dist/components/AppContainer/AppContainer.module.css.js +22 -12
  3. package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts +6 -0
  4. package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts.map +1 -0
  5. package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.js +161 -0
  6. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  7. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +24 -22
  8. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  9. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +237 -95
  10. package/dist/components/AppContainer/components/Header.d.ts.map +1 -1
  11. package/dist/components/AppContainer/components/Header.js +6 -5
  12. package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
  13. package/dist/components/AppContainer/components/ToolSidebar.js +161 -128
  14. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts +62 -1
  15. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  16. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +1111 -131
  17. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +158 -6
  18. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  19. package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
  20. package/dist/components/AppContainer/hooks/useAppContainer.js +59 -56
  21. package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
  22. package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +4 -3
  23. package/dist/components/AppContainer/types.d.ts +1 -0
  24. package/dist/components/AppContainer/types.d.ts.map +1 -1
  25. package/dist/components/AppShell/AppShell.module.css.js +5 -5
  26. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.d.ts +2 -0
  27. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.d.ts.map +1 -1
  28. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.js +22 -17
  29. package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts +15 -0
  30. package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts.map +1 -0
  31. package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.js +36 -0
  32. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +22 -22
  33. package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts +14 -0
  34. package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts.map +1 -0
  35. package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.js +31 -0
  36. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
  37. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +172 -120
  38. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  39. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
  40. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +68 -62
  41. package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts +18 -0
  42. package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts.map +1 -0
  43. package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.js +35 -0
  44. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts +33 -0
  45. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts.map +1 -0
  46. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.js +70 -0
  47. package/dist/components/AttachmentsGalleryModal/helpers.d.ts +8 -0
  48. package/dist/components/AttachmentsGalleryModal/helpers.d.ts.map +1 -1
  49. package/dist/components/AttachmentsGalleryModal/helpers.js +22 -17
  50. package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts.map +1 -1
  51. package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.js +28 -25
  52. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
  53. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +36 -41
  54. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +32 -28
  55. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  56. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +135 -80
  57. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +24 -14
  58. package/dist/components/BouncingLogo/BouncingLogo.d.ts +1 -3
  59. package/dist/components/BouncingLogo/BouncingLogo.d.ts.map +1 -1
  60. package/dist/components/BouncingLogo/BouncingLogo.js +14 -20
  61. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -8
  62. package/dist/components/Chat/CallMessage/CallMessage.module.css.js +8 -8
  63. package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +5 -5
  64. package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +1 -1
  65. package/dist/components/Chat/ChatInput/ChatInput.module.css.js +44 -32
  66. package/dist/components/Chat/ChatInput/index.d.ts +29 -1
  67. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
  68. package/dist/components/Chat/ChatInput/index.js +178 -118
  69. package/dist/components/Chat/ChatInput/smilePlusIcon.d.ts +3 -0
  70. package/dist/components/Chat/ChatInput/smilePlusIcon.d.ts.map +1 -0
  71. package/dist/components/Chat/ChatInput/smilePlusIcon.js +49 -0
  72. package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +4 -4
  73. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +2 -2
  74. package/dist/components/Chat/ChatMessage/index.d.ts +2 -0
  75. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
  76. package/dist/components/Chat/ChatMessage/index.js +136 -118
  77. package/dist/components/Chat/ChatPill/ChatPill.module.css.js +1 -1
  78. package/dist/components/Chat/DialogItem/DialogItem.module.css.js +4 -4
  79. package/dist/components/Chat/DialogList/DialogList.module.css.js +1 -1
  80. package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +3 -3
  81. package/dist/components/Chat/MessageActions/MessageActions.module.css.js +1 -1
  82. package/dist/components/Chat/MessageActions/index.d.ts +7 -0
  83. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
  84. package/dist/components/Chat/MessageActions/index.js +40 -36
  85. package/dist/components/Chat/MessageForward/MessageForward.module.css.js +1 -1
  86. package/dist/components/Chat/MessageList/MessageList.module.css.js +10 -6
  87. package/dist/components/Chat/MessageList/index.d.ts +30 -3
  88. package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
  89. package/dist/components/Chat/MessageList/index.js +154 -66
  90. package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +3 -3
  91. package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -1
  92. package/dist/components/Chat/MessageMeta/index.js +21 -19
  93. package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +8 -8
  94. package/dist/components/Chat/MessageReactions/index.d.ts +17 -0
  95. package/dist/components/Chat/MessageReactions/index.d.ts.map +1 -1
  96. package/dist/components/Chat/MessageReactions/index.js +60 -28
  97. package/dist/components/Chat/MessageReply/MessageReply.module.css.js +7 -7
  98. package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +8 -6
  99. package/dist/components/Chat/MessageStatus/index.d.ts +1 -1
  100. package/dist/components/Chat/MessageStatus/index.d.ts.map +1 -1
  101. package/dist/components/Chat/MessageStatus/index.js +49 -34
  102. package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +1 -1
  103. package/dist/components/CircleColorPicker/CircleColorPicker.d.ts.map +1 -1
  104. package/dist/components/CircleColorPicker/CircleColorPicker.js +17 -15
  105. package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
  106. package/dist/components/ColorPicker/ColorPicker.d.ts +3 -0
  107. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  108. package/dist/components/ColorPicker/ColorPicker.js +81 -76
  109. package/dist/components/ColorPicker/ColorPicker.module.css.js +24 -24
  110. package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
  111. package/dist/components/ColorPicker/ColorPickerList.js +43 -41
  112. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
  113. package/dist/components/ColorPicker/ColorPickerToolbar.js +52 -50
  114. package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
  115. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  116. package/dist/components/Copyright/Copyright.module.css.js +1 -1
  117. package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
  118. package/dist/components/EmojiPicker/EmojiPanel.d.ts +2 -1
  119. package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
  120. package/dist/components/EmojiPicker/EmojiPanel.js +73 -72
  121. package/dist/components/EmojiPicker/EmojiPicker.d.ts +16 -1
  122. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  123. package/dist/components/EmojiPicker/EmojiPicker.js +121 -86
  124. package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
  125. package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
  126. package/dist/components/EmojiPicker/IconsPanel.js +28 -25
  127. package/dist/components/EntityIcon.d.ts +1 -0
  128. package/dist/components/EntityIcon.d.ts.map +1 -1
  129. package/dist/components/EntityIcon.js +80 -32
  130. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  131. package/dist/components/ErrorPage/components/Error403.d.ts +5 -1
  132. package/dist/components/ErrorPage/components/Error403.d.ts.map +1 -1
  133. package/dist/components/ErrorPage/components/Error403.js +25 -21
  134. package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
  135. package/dist/components/ErrorPage/index.d.ts +5 -1
  136. package/dist/components/ErrorPage/index.d.ts.map +1 -1
  137. package/dist/components/ErrorPage/index.js +17 -10
  138. package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
  139. package/dist/components/FilePicker/FilePicker.module.css.js +7 -7
  140. package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
  141. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  142. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
  143. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
  144. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
  145. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
  146. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  147. package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
  148. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts +3 -1
  149. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -1
  150. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.js +26 -25
  151. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
  152. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
  153. package/dist/components/Loaders/styles.module.css.js +6 -6
  154. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
  155. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +23 -23
  156. package/dist/components/MusicPlayerBar/components/HoverActions.js +28 -28
  157. package/dist/components/NavMenu/NavMenu.d.ts +7 -1
  158. package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
  159. package/dist/components/NavMenu/NavMenu.js +54 -44
  160. package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
  161. package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
  162. package/dist/components/NavMenu/components/NavMenuItem.js +84 -84
  163. package/dist/components/NavMenu/types.d.ts +4 -0
  164. package/dist/components/NavMenu/types.d.ts.map +1 -1
  165. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  166. package/dist/components/NewToolbar/utils.d.ts +12 -0
  167. package/dist/components/NewToolbar/utils.d.ts.map +1 -0
  168. package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
  169. package/dist/components/Notification/Notification.module.css.js +1 -1
  170. package/dist/components/OnboardingTour/index.d.ts +1 -1
  171. package/dist/components/OnboardingTour/index.d.ts.map +1 -1
  172. package/dist/components/OnboardingTour/useOnboardingTour.d.ts +2 -0
  173. package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -1
  174. package/dist/components/OnboardingTour/useOnboardingTour.js +63 -51
  175. package/dist/components/PillTabs/PillTabs.module.css.js +1 -1
  176. package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
  177. package/dist/components/SettingsSection/styles.module.css.js +1 -1
  178. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
  179. package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
  180. package/dist/components/VideoPlayer/VideoPlayer.d.ts +24 -0
  181. package/dist/components/VideoPlayer/VideoPlayer.d.ts.map +1 -0
  182. package/dist/components/VideoPlayer/VideoPlayer.js +727 -0
  183. package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts +8 -0
  184. package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts.map +1 -0
  185. package/dist/components/VideoPlayer/components/MobileDrawer/index.js +67 -0
  186. package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts +7 -0
  187. package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts.map +1 -0
  188. package/dist/components/VideoPlayer/components/SelectListOptionButton.js +44 -0
  189. package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts +9 -0
  190. package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts.map +1 -0
  191. package/dist/components/VideoPlayer/components/StoryboardPreview.js +38 -0
  192. package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts +33 -0
  193. package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts.map +1 -0
  194. package/dist/components/VideoPlayer/components/VideoCustomControls.js +601 -0
  195. package/dist/components/VideoPlayer/components/VideoIcons.d.ts +25 -0
  196. package/dist/components/VideoPlayer/components/VideoIcons.d.ts.map +1 -0
  197. package/dist/components/VideoPlayer/components/VideoIcons.js +145 -0
  198. package/dist/components/VideoPlayer/components/VideoMenu.d.ts +27 -0
  199. package/dist/components/VideoPlayer/components/VideoMenu.d.ts.map +1 -0
  200. package/dist/components/VideoPlayer/components/VideoMenu.js +77 -0
  201. package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts +17 -0
  202. package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts.map +1 -0
  203. package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.js +289 -0
  204. package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts +10 -0
  205. package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts.map +1 -0
  206. package/dist/components/VideoPlayer/components/VideoQualityMenu/index.js +55 -0
  207. package/dist/components/VideoPlayer/components/VideoSelect.d.ts +10 -0
  208. package/dist/components/VideoPlayer/components/VideoSelect.d.ts.map +1 -0
  209. package/dist/components/VideoPlayer/components/VideoSelect.js +168 -0
  210. package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts +12 -0
  211. package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts.map +1 -0
  212. package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.js +48 -0
  213. package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts +25 -0
  214. package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts.map +1 -0
  215. package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.js +384 -0
  216. package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts +21 -0
  217. package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts.map +1 -0
  218. package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.js +264 -0
  219. package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts +10 -0
  220. package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts.map +1 -0
  221. package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.js +39 -0
  222. package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts +14 -0
  223. package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts.map +1 -0
  224. package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.js +360 -0
  225. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts +16 -0
  226. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts.map +1 -0
  227. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts +14 -0
  228. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts.map +1 -0
  229. package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts +4 -0
  230. package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts.map +1 -0
  231. package/dist/components/VideoPlayer/components/VideoSettingsModal/context.js +14 -0
  232. package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts +22 -0
  233. package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts.map +1 -0
  234. package/dist/components/VideoPlayer/components/VideoSettingsModal/index.js +211 -0
  235. package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts +11 -0
  236. package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts.map +1 -0
  237. package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.js +41 -0
  238. package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts +10 -0
  239. package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts.map +1 -0
  240. package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.js +69 -0
  241. package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts +21 -0
  242. package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts.map +1 -0
  243. package/dist/components/VideoPlayer/hooks/useStoryboard.js +91 -0
  244. package/dist/components/VideoPlayer/index.d.ts +11 -0
  245. package/dist/components/VideoPlayer/index.d.ts.map +1 -0
  246. package/dist/components/VideoPlayer/types.d.ts +101 -0
  247. package/dist/components/VideoPlayer/types.d.ts.map +1 -0
  248. package/dist/components/VideoPlayer/utils/chapters.d.ts +8 -0
  249. package/dist/components/VideoPlayer/utils/chapters.d.ts.map +1 -0
  250. package/dist/components/VideoPlayer/utils/chapters.js +38 -0
  251. package/dist/components/VideoPlayer/utils/storyboard.d.ts +5 -0
  252. package/dist/components/VideoPlayer/utils/storyboard.d.ts.map +1 -0
  253. package/dist/components/VideoPlayer/utils/storyboard.js +47 -0
  254. package/dist/components/VideoPlayer/utils/subtitles.d.ts +18 -0
  255. package/dist/components/VideoPlayer/utils/subtitles.d.ts.map +1 -0
  256. package/dist/components/VideoPlayer/utils/subtitles.js +23 -0
  257. package/dist/components/VideoPlayer/utils/touch.d.ts +3 -0
  258. package/dist/components/VideoPlayer/utils/touch.d.ts.map +1 -0
  259. package/dist/components/VideoPlayer/utils/touch.js +5 -0
  260. package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts +10 -0
  261. package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts.map +1 -0
  262. package/dist/components/VideoPlayer/utils/videoPlayerUtils.js +22 -0
  263. package/dist/components/VideoPlayer/utils/videoSettings.d.ts +69 -0
  264. package/dist/components/VideoPlayer/utils/videoSettings.d.ts.map +1 -0
  265. package/dist/components/VideoPlayer/utils/videoSettings.js +90 -0
  266. package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
  267. package/dist/components/WorkspaceMenu/WorkspaceItem.js +16 -14
  268. package/dist/components/table/FrontTable.d.ts.map +1 -1
  269. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  270. package/dist/config/brand.d.ts.map +1 -1
  271. package/dist/config/brand.js +29 -29
  272. package/dist/config/envConfig.d.ts +4 -0
  273. package/dist/config/envConfig.d.ts.map +1 -1
  274. package/dist/config/envConfig.js +41 -37
  275. package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
  276. package/dist/helpers/showNotifications.d.ts +9 -0
  277. package/dist/helpers/showNotifications.d.ts.map +1 -1
  278. package/dist/helpers/showNotifications.js +96 -58
  279. package/dist/helpers/showNotifications.module.css.js +1 -1
  280. package/dist/hooks/useDateUtils.d.ts.map +1 -1
  281. package/dist/hooks/useDateUtils.js +19 -23
  282. package/dist/hooks/useUiPref.d.ts +2 -0
  283. package/dist/hooks/useUiPref.d.ts.map +1 -0
  284. package/dist/hooks/useUiPref.js +80 -0
  285. package/dist/index.css +1 -1
  286. package/dist/index.d.ts +3 -0
  287. package/dist/index.d.ts.map +1 -1
  288. package/dist/index.js +582 -558
  289. package/dist/lang/locales/ui_en.json.js +1 -1
  290. package/dist/lang/locales/ui_es.json.js +1 -1
  291. package/dist/lang/locales/ui_ru.json.js +1 -1
  292. package/dist/videoSettings/createVideoSettingsDataSource.d.ts +19 -0
  293. package/dist/videoSettings/createVideoSettingsDataSource.d.ts.map +1 -0
  294. package/dist/videoSettings/createVideoSettingsDataSource.js +127 -0
  295. package/docs/README.md +499 -499
  296. 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":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAQrD,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,aAAa,EAAE,CAAC;CAC/B;AAED,eAAO,MAAM,WAAW,iEACK,gBAAgB,6CAwI5C,CAAC"}
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 l, jsx as e } from "react/jsx-runtime";
2
- import { memo as v, useRef as I } from "react";
3
- import { useTranslation as C } from "react-i18next";
4
- import { Box as F, Tooltip as i, ActionIcon as t, Flex as s, Text as g } from "@mantine/core";
5
- import { IconDownload as p, IconMinus as N, IconPlus as R, IconX as k } from "@tabler/icons-react";
6
- import { getFileIcons as T } from "../../../helpers/getFileIcons.js";
7
- import { getFileType as j } from "../../../helpers/getFileType.js";
8
- import { useAttachmentsGalleryContext as D } from "../AttachmentsGalleryContext.js";
9
- import { zoomStep as f } from "../helpers.js";
10
- import { useDownloadFile as M } from "../hooks/useDownloadFile.js";
11
- import { useZoomReset as Z } from "../hooks/useZoomReset.js";
12
- import n from "../styles.module.css.js";
13
- const L = v(
14
- ({ onClose: w, attachments: z }) => {
15
- Z();
16
- const { t: r } = C("ui"), c = I(null), { zoomPercentage: y, transformRefs: m, selectedIndex: a } = D(), o = z?.[a], x = () => {
17
- f({
18
- animationRef: c,
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: m.current[a]
38
+ activeRef: f.current[g]
21
39
  });
22
- }, b = () => {
23
- f({
24
- animationRef: c,
40
+ }, k = () => {
41
+ S({
42
+ animationRef: u,
25
43
  dir: "out",
26
- activeRef: m.current[a]
44
+ activeRef: f.current[g]
27
45
  });
28
- }, { isVideo: A, isFetching: d, onDownload: u, isMobile: h } = M(o);
29
- return /* @__PURE__ */ l(
30
- F,
31
- {
32
- style: {
33
- borderRadius: 8,
34
- display: "grid",
35
- gridTemplateColumns: "1fr auto 1fr",
36
- alignItems: "center",
37
- flex: "none",
38
- gap: 12
39
- },
40
- px: 8,
41
- py: 8,
42
- bg: "var(--mantine-color-dark-6)",
43
- children: [
44
- h ? /* @__PURE__ */ e(i, { withArrow: !0, label: r("gallery.download"), children: /* @__PURE__ */ e(
45
- t,
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: n.headerAction,
66
+ className: r.headerAction,
107
67
  size: "lg",
108
68
  variant: "subtle",
109
- loading: d,
110
- onClick: u,
111
- children: /* @__PURE__ */ e(p, { size: 20 })
69
+ loading: b,
70
+ onClick: z,
71
+ children: /* @__PURE__ */ e(A, { size: 20 })
112
72
  }
113
- ) }),
114
- /* @__PURE__ */ e(i, { withArrow: !0, label: r("gallery.close"), children: /* @__PURE__ */ e(
115
- t,
116
- {
117
- className: n.headerAction,
118
- size: "lg",
119
- variant: "subtle",
120
- onClick: w,
121
- children: /* @__PURE__ */ e(k, { size: 20 })
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
- L as ModalHeader
183
+ ve as ModalHeader
132
184
  };
@@ -1,7 +1,7 @@
1
- const _ = {
2
- "vod-player": "_vod-player_11682_1",
3
- "vod-player__player": "_vod-player__player_11682_25"
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
- _ as default
6
+ e as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useShakePlayer.d.ts","sourceRoot":"","sources":["../../../../../src/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.tsx"],"names":[],"mappings":"AA4CA,eAAO,MAAM,cAAc,GAAI,uCAI5B;IACD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;;;;;CA+KA,CAAC"}
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 U, useRef as i, useCallback as A, useEffect as E } from "react";
2
- import { getEnvConfig as k } from "../../../../config/envConfig.js";
3
- const m = () => {
4
- const r = k().apiBaseUrl || "";
5
- return r.endsWith("/") ? r.slice(0, -1) : r;
6
- }, T = async (r) => {
7
- const u = m();
8
- return (await fetch(`${u}/v1/auth/refresh`, {
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: r
11
+ signal: e
12
12
  })).ok;
13
- }, $ = async (r, u) => {
14
- const s = await fetch(r, {
15
- ...u,
13
+ }, $ = async (e, s) => {
14
+ const l = await fetch(e, {
15
+ ...s,
16
16
  credentials: "include"
17
17
  });
18
- return s.status !== 401 && s.status !== 403 || !await T(u.signal) || u.signal.aborted ? s : fetch(r, {
19
- ...u,
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: r,
24
- isActive: u,
25
- autoPlay: s
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 [f, h] = U(null), [b, p] = U(null), [v, w] = U(!1), R = i(null), c = i(!0), o = i(null), t = i(null), l = i(null), d = A(
28
- (e) => {
29
- if (!r || l.current || !c.current || e.aborted) return;
30
- const g = m() || window.location.origin, a = new URL(
31
- `/v1/attachments/${r}`,
32
- g
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
- l.current = a, h(null), p(a);
34
+ u.current = i, g(null), p(i);
35
35
  },
36
- [r]
37
- ), C = A(async () => {
38
- if (!r || l.current) return;
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 e = new AbortController();
41
- t.current = e, w(!1);
40
+ const r = new AbortController();
41
+ t.current = r, d(!1);
42
42
  try {
43
- await T(e.signal), d(e.signal);
43
+ await E(r.signal), a(r.signal);
44
44
  } catch (n) {
45
- if (n instanceof Error && n.name === "AbortError" || !c.current || e.signal.aborted) return;
46
- w(!0);
45
+ if (n instanceof Error && n.name === "AbortError" || !c.current || r.signal.aborted) return;
46
+ d(!0);
47
47
  }
48
- }, [r, d]), y = async () => {
49
- if (!r)
48
+ }, [e, a]), y = async () => {
49
+ if (!e)
50
50
  return;
51
51
  t.current && t.current.abort();
52
- const e = new AbortController();
53
- t.current = e;
52
+ const r = new AbortController();
53
+ t.current = r;
54
54
  try {
55
- const n = m(), g = await $(
56
- `${n}/v1/attachments/${r}/vod`,
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: e.signal
62
+ signal: r.signal
63
63
  }
64
64
  );
65
- if (!g.ok) {
66
- await d(e.signal);
65
+ if (!h.ok) {
66
+ await a(r.signal);
67
67
  return;
68
68
  }
69
- const a = await g.json();
70
- if (!c.current || e.signal.aborted) return;
71
- const B = n || window.location.origin;
72
- if (a.ready) {
73
- const S = new URL(a.url, B).toString();
74
- if (l.current) return;
75
- p(null), h(S);
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
- d(e.signal), o.current = setTimeout(() => {
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 || e.signal.aborted) return;
82
- w(!0);
81
+ if (n instanceof Error && n.name === "AbortError" || !c.current || r.signal.aborted) return;
82
+ d(!0);
83
83
  }
84
84
  };
85
- return E(() => {
86
- if (c.current = !0, h(null), p(null), w(!1), l.current = null, o.current && (clearTimeout(o.current), o.current = null), t.current && (t.current.abort(), t.current = null), !!r)
87
- return y(), () => {
88
- c.current = !1, o.current && (clearTimeout(o.current), o.current = null), t.current && (t.current.abort(), t.current = null), l.current = null;
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
- }, [r]), E(() => {
91
- if (!f && !b || !R.current) return;
92
- const e = R.current.querySelector(
95
+ }
96
+ }, [e]), C(() => {
97
+ if (!w && !b || !m.current) return;
98
+ const r = m.current.querySelector(
93
99
  "video"
94
100
  );
95
- e && (u ? s !== !1 && e.play().catch((n) => {
101
+ r && (s ? l !== !1 && r.play().catch((n) => {
96
102
  console.error("Ошибка при воспроизведении видео:", n);
97
- }) : e.pause());
98
- }, [u, f, b, s]), { containerRef: R, fallbackToRawAttachment: C, isError: v, vodUrl: f, rawUrl: b };
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"}