@layers-app/shared 0.4.7 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/dist/assets/default-workspace-avatar.jpg.js +1 -1
  2. package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
  3. package/dist/components/AliasTextInput/AliasTextInput.js +32 -32
  4. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
  5. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  6. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  7. package/dist/components/AppContainer/AppContainer.js +76 -71
  8. package/dist/components/AppContainer/AppContainer.module.css.js +14 -14
  9. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  10. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +77 -49
  11. package/dist/components/AppContainer/components/NavbarContent.d.ts.map +1 -1
  12. package/dist/components/AppContainer/components/NavbarContent.js +16 -2
  13. package/dist/components/AppContainer/components/ToolSidebar.d.ts +5 -0
  14. package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
  15. package/dist/components/AppContainer/components/ToolSidebar.js +42 -30
  16. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +90 -90
  17. package/dist/components/AppContainer/types.d.ts +12 -0
  18. package/dist/components/AppContainer/types.d.ts.map +1 -1
  19. package/dist/components/AppShell/AppShell.module.css.js +5 -5
  20. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.d.ts +0 -2
  21. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.d.ts.map +1 -1
  22. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.js +17 -22
  23. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +22 -22
  24. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
  25. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +120 -172
  26. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  27. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +28 -32
  28. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts +3 -1
  29. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  30. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +237 -93
  31. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +22 -20
  32. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -4
  33. package/dist/components/Chat/CallMessage/CallMessage.module.css.js +8 -8
  34. package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +1 -1
  35. package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +1 -1
  36. package/dist/components/Chat/ChatInput/ChatInput.module.css.js +44 -44
  37. package/dist/components/Chat/ChatInput/index.d.ts +13 -1
  38. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
  39. package/dist/components/Chat/ChatInput/index.js +264 -164
  40. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts +16 -0
  41. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts.map +1 -0
  42. package/dist/components/Chat/ChatInput/useVoiceRecorder.js +83 -0
  43. package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +4 -4
  44. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +20 -16
  45. package/dist/components/Chat/ChatMessage/index.d.ts +16 -0
  46. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
  47. package/dist/components/Chat/ChatMessage/index.js +153 -118
  48. package/dist/components/Chat/ChatPill/ChatPill.module.css.js +1 -1
  49. package/dist/components/Chat/DialogItem/DialogItem.module.css.js +4 -4
  50. package/dist/components/Chat/DialogList/DialogList.module.css.js +1 -1
  51. package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +4 -4
  52. package/dist/components/Chat/MessageActions/MessageActions.module.css.js +1 -1
  53. package/dist/components/Chat/MessageActions/index.d.ts +2 -0
  54. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
  55. package/dist/components/Chat/MessageActions/index.js +188 -50
  56. package/dist/components/Chat/MessageAuthor/index.d.ts +7 -1
  57. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -1
  58. package/dist/components/Chat/MessageAuthor/index.js +39 -25
  59. package/dist/components/Chat/MessageForward/MessageForward.module.css.js +1 -1
  60. package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -12
  61. package/dist/components/Chat/MessageList/index.d.ts +17 -25
  62. package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
  63. package/dist/components/Chat/MessageList/index.js +201 -149
  64. package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +3 -3
  65. package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +12 -12
  66. package/dist/components/Chat/MessageReply/MessageReply.module.css.js +7 -7
  67. package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +8 -8
  68. package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +1 -1
  69. package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
  70. package/dist/components/ColorPicker/ColorPicker.module.css.js +32 -26
  71. package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
  72. package/dist/components/ColorPicker/ColorPickerList.js +83 -72
  73. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +1 -0
  74. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
  75. package/dist/components/ColorPicker/ColorPickerToolbar.js +94 -85
  76. package/dist/components/ColorPicker/icons.js +5 -5
  77. package/dist/components/ColorPicker/types.d.ts +6 -0
  78. package/dist/components/ColorPicker/types.d.ts.map +1 -1
  79. package/dist/components/ColorPicker/types.js +53 -11
  80. package/dist/components/ColorPicker/useRecentColors.d.ts +3 -1
  81. package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -1
  82. package/dist/components/ColorPicker/useRecentColors.js +43 -20
  83. package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
  84. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +2 -1
  85. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
  86. package/dist/components/CommentComposer/CommentEditorHotkeys.js +29 -26
  87. package/dist/components/CommentComposer/index.d.ts +1 -1
  88. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  89. package/dist/components/CommentComposer/index.js +70 -68
  90. package/dist/components/CommentComposer/types.d.ts +6 -0
  91. package/dist/components/CommentComposer/types.d.ts.map +1 -1
  92. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  93. package/dist/components/Copyright/Copyright.module.css.js +1 -1
  94. package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
  95. package/dist/components/CustomKBD/index.js +21 -22
  96. package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
  97. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  98. package/dist/components/EmojiPicker/EmojiPicker.js +129 -121
  99. package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
  100. package/dist/components/EntityTitle/EntityTitle.d.ts +3 -4
  101. package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
  102. package/dist/components/EntityTitle/EntityTitle.js +81 -80
  103. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  104. package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
  105. package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
  106. package/dist/components/FilePicker/FilePicker.module.css.js +7 -7
  107. package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
  108. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  109. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
  110. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
  111. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
  112. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
  113. package/dist/components/FormViewer/helpers/conditions.d.ts.map +1 -1
  114. package/dist/components/FormViewer/helpers/conditions.js +33 -17
  115. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  116. package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
  117. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
  118. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
  119. package/dist/components/Loaders/styles.module.css.js +6 -6
  120. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
  121. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +23 -23
  122. package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
  123. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  124. package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
  125. package/dist/components/Notification/InfiniteScroll.d.ts +12 -0
  126. package/dist/components/Notification/InfiniteScroll.d.ts.map +1 -0
  127. package/dist/components/Notification/InfiniteScroll.js +42 -0
  128. package/dist/components/Notification/Notification.d.ts +4 -1
  129. package/dist/components/Notification/Notification.d.ts.map +1 -1
  130. package/dist/components/Notification/Notification.module.css.js +28 -4
  131. package/dist/components/Notification/atoms/ActionBadge.d.ts +11 -0
  132. package/dist/components/Notification/atoms/ActionBadge.d.ts.map +1 -0
  133. package/dist/components/Notification/atoms/ActionBadge.js +53 -0
  134. package/dist/components/Notification/atoms/ArchiveIcon.d.ts +7 -0
  135. package/dist/components/Notification/atoms/ArchiveIcon.d.ts.map +1 -0
  136. package/dist/components/Notification/atoms/ArchiveIcon.js +40 -0
  137. package/dist/components/Notification/atoms/InboxIcon.d.ts +7 -0
  138. package/dist/components/Notification/atoms/InboxIcon.d.ts.map +1 -0
  139. package/dist/components/Notification/atoms/InboxIcon.js +33 -0
  140. package/dist/components/Notification/atoms/MarkReadIcon.d.ts +7 -0
  141. package/dist/components/Notification/atoms/MarkReadIcon.d.ts.map +1 -0
  142. package/dist/components/Notification/atoms/MarkReadIcon.js +33 -0
  143. package/dist/components/Notification/atoms/ResourceIcon.d.ts +7 -0
  144. package/dist/components/Notification/atoms/ResourceIcon.d.ts.map +1 -0
  145. package/dist/components/Notification/atoms/TabBadge.d.ts +7 -0
  146. package/dist/components/Notification/atoms/TabBadge.d.ts.map +1 -0
  147. package/dist/components/Notification/atoms/TabBadge.js +32 -0
  148. package/dist/components/Notification/atoms/UnreadDot.d.ts +6 -0
  149. package/dist/components/Notification/atoms/UnreadDot.d.ts.map +1 -0
  150. package/dist/components/Notification/atoms/UnreadDot.js +23 -0
  151. package/dist/components/Notification/atoms/index.d.ts +5 -0
  152. package/dist/components/Notification/atoms/index.d.ts.map +1 -0
  153. package/dist/components/Notification/hooks/index.d.ts +8 -0
  154. package/dist/components/Notification/hooks/index.d.ts.map +1 -0
  155. package/dist/components/Notification/hooks/useInboxActions.d.ts +12 -0
  156. package/dist/components/Notification/hooks/useInboxActions.d.ts.map +1 -0
  157. package/dist/components/Notification/hooks/useInboxActions.js +58 -0
  158. package/dist/components/Notification/hooks/useInboxLoader.d.ts +8 -0
  159. package/dist/components/Notification/hooks/useInboxLoader.d.ts.map +1 -0
  160. package/dist/components/Notification/hooks/useInboxLoader.js +49 -0
  161. package/dist/components/Notification/hooks/useNotificationItem.d.ts +26 -0
  162. package/dist/components/Notification/hooks/useNotificationItem.d.ts.map +1 -0
  163. package/dist/components/Notification/hooks/useNotificationItem.js +51 -0
  164. package/dist/components/Notification/hooks/useNotificationStore.d.ts +49 -0
  165. package/dist/components/Notification/hooks/useNotificationStore.d.ts.map +1 -0
  166. package/dist/components/Notification/hooks/useNotificationStore.js +139 -0
  167. package/dist/components/Notification/hooks/useNotificationStream.d.ts +2 -0
  168. package/dist/components/Notification/hooks/useNotificationStream.d.ts.map +1 -0
  169. package/dist/components/Notification/hooks/useNotificationStream.js +86 -0
  170. package/dist/components/Notification/hooks/useNotificationTime.d.ts +2 -0
  171. package/dist/components/Notification/hooks/useNotificationTime.d.ts.map +1 -0
  172. package/dist/components/Notification/hooks/useNotificationTime.js +23 -0
  173. package/dist/components/Notification/hooks/useNotificationsApi.d.ts +25 -0
  174. package/dist/components/Notification/hooks/useNotificationsApi.d.ts.map +1 -0
  175. package/dist/components/Notification/hooks/useNotificationsApi.js +64 -0
  176. package/dist/components/Notification/lib/api.d.ts +4 -0
  177. package/dist/components/Notification/lib/api.d.ts.map +1 -0
  178. package/dist/components/Notification/lib/api.js +19 -0
  179. package/dist/components/Notification/lib/index.d.ts +5 -0
  180. package/dist/components/Notification/lib/index.d.ts.map +1 -0
  181. package/dist/components/Notification/lib/notificationText.d.ts +10 -0
  182. package/dist/components/Notification/lib/notificationText.d.ts.map +1 -0
  183. package/dist/components/Notification/lib/notificationText.js +131 -0
  184. package/dist/components/Notification/lib/stripHtml.d.ts +2 -0
  185. package/dist/components/Notification/lib/stripHtml.d.ts.map +1 -0
  186. package/dist/components/Notification/lib/stripHtml.js +6 -0
  187. package/dist/components/Notification/lib/types.d.ts +45 -0
  188. package/dist/components/Notification/lib/types.d.ts.map +1 -0
  189. package/dist/components/Notification/lib/types.js +9 -0
  190. package/dist/components/Notification/molecules/InboxEmpty.d.ts +8 -0
  191. package/dist/components/Notification/molecules/InboxEmpty.d.ts.map +1 -0
  192. package/dist/components/Notification/molecules/InboxEmpty.js +21 -0
  193. package/dist/components/Notification/molecules/InboxHeader.d.ts +17 -0
  194. package/dist/components/Notification/molecules/InboxHeader.d.ts.map +1 -0
  195. package/dist/components/Notification/molecules/InboxHeader.js +73 -0
  196. package/dist/components/Notification/molecules/InboxTabs.d.ts +15 -0
  197. package/dist/components/Notification/molecules/InboxTabs.d.ts.map +1 -0
  198. package/dist/components/Notification/molecules/InboxTabs.js +60 -0
  199. package/dist/components/Notification/molecules/NotificationActions.d.ts +9 -0
  200. package/dist/components/Notification/molecules/NotificationActions.d.ts.map +1 -0
  201. package/dist/components/Notification/molecules/NotificationActions.js +64 -0
  202. package/dist/components/Notification/molecules/NotificationAvatar.d.ts +17 -0
  203. package/dist/components/Notification/molecules/NotificationAvatar.d.ts.map +1 -0
  204. package/dist/components/Notification/molecules/NotificationAvatar.js +38 -0
  205. package/dist/components/Notification/molecules/NotificationContent.d.ts +22 -0
  206. package/dist/components/Notification/molecules/NotificationContent.d.ts.map +1 -0
  207. package/dist/components/Notification/molecules/NotificationContent.js +183 -0
  208. package/dist/components/Notification/molecules/index.d.ts +7 -0
  209. package/dist/components/Notification/molecules/index.d.ts.map +1 -0
  210. package/dist/components/Notification/organisms/InboxItem.d.ts +14 -0
  211. package/dist/components/Notification/organisms/InboxItem.d.ts.map +1 -0
  212. package/dist/components/Notification/organisms/InboxItem.js +100 -0
  213. package/dist/components/Notification/organisms/InboxPanel.d.ts +4 -0
  214. package/dist/components/Notification/organisms/InboxPanel.d.ts.map +1 -0
  215. package/dist/components/Notification/organisms/InboxPanel.js +99 -0
  216. package/dist/components/Notification/organisms/index.d.ts +3 -0
  217. package/dist/components/Notification/organisms/index.d.ts.map +1 -0
  218. package/dist/components/PillTabs/PillTabs.module.css.js +1 -1
  219. package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
  220. package/dist/components/SettingsSection/styles.module.css.js +1 -1
  221. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
  222. package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
  223. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  224. package/dist/components/modals/RemoveConfirmModal.js +27 -26
  225. package/dist/components/table/FrontTable.d.ts.map +1 -1
  226. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  227. package/dist/config/envConfig.d.ts +2 -0
  228. package/dist/config/envConfig.d.ts.map +1 -1
  229. package/dist/config/envConfig.js +29 -28
  230. package/dist/helpers/getFileIcons.js +5 -5
  231. package/dist/helpers/getFileType.d.ts.map +1 -1
  232. package/dist/helpers/getFileType.js +11 -2
  233. package/dist/helpers/platform.d.ts +1 -1
  234. package/dist/helpers/platform.d.ts.map +1 -1
  235. package/dist/helpers/platform.js +1 -0
  236. package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
  237. package/dist/helpers/showNotifications.module.css.js +1 -1
  238. package/dist/index.css +1 -1
  239. package/dist/index.d.ts +0 -2
  240. package/dist/index.d.ts.map +1 -1
  241. package/dist/index.js +560 -571
  242. package/dist/lang/locales/ui_en.json.js +1 -1
  243. package/dist/lang/locales/ui_es.json.js +1 -1
  244. package/dist/lang/locales/ui_ru.json.js +1 -1
  245. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.context.js +15 -0
  246. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.js +228 -0
  247. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.module.css.js +4 -0
  248. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioControls.js +19 -0
  249. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioMuteButton.js +30 -0
  250. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioPlayButton.js +40 -0
  251. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSkipButton.js +28 -0
  252. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpectrum.js +137 -0
  253. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpeedControl.js +31 -0
  254. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeDisplay.js +44 -0
  255. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeline.js +71 -0
  256. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioVolumeSlider.js +43 -0
  257. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioWaveform.js +166 -0
  258. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/use-audio.js +201 -0
  259. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.context.js +15 -0
  260. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.js +272 -0
  261. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.module.css.js +4 -0
  262. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoCaptionsButton.js +55 -0
  263. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoControls.js +30 -0
  264. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoFullscreenButton.js +31 -0
  265. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoMuteButton.js +29 -0
  266. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPiPButton.js +29 -0
  267. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPlayButton.js +28 -0
  268. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoSkipButton.js +27 -0
  269. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeDisplay.js +44 -0
  270. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeline.js +70 -0
  271. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/use-video.js +170 -0
  272. package/docs/README.md +499 -499
  273. package/package.json +80 -79
  274. package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts +0 -15
  275. package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts.map +0 -1
  276. package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.js +0 -36
  277. package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts +0 -14
  278. package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts.map +0 -1
  279. package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.js +0 -31
  280. package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts +0 -18
  281. package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts.map +0 -1
  282. package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.js +0 -35
  283. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts +0 -33
  284. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts.map +0 -1
  285. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.js +0 -70
  286. package/dist/components/Notification/Notification.js +0 -119
  287. package/dist/components/Notification/NotificationCard.d.ts +0 -10
  288. package/dist/components/Notification/NotificationCard.d.ts.map +0 -1
  289. package/dist/components/Notification/NotificationCard.js +0 -93
  290. package/dist/components/VideoPlayer/VideoPlayer.d.ts +0 -24
  291. package/dist/components/VideoPlayer/VideoPlayer.d.ts.map +0 -1
  292. package/dist/components/VideoPlayer/VideoPlayer.js +0 -727
  293. package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts +0 -8
  294. package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts.map +0 -1
  295. package/dist/components/VideoPlayer/components/MobileDrawer/index.js +0 -67
  296. package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts +0 -7
  297. package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts.map +0 -1
  298. package/dist/components/VideoPlayer/components/SelectListOptionButton.js +0 -44
  299. package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts +0 -9
  300. package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts.map +0 -1
  301. package/dist/components/VideoPlayer/components/StoryboardPreview.js +0 -38
  302. package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts +0 -33
  303. package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts.map +0 -1
  304. package/dist/components/VideoPlayer/components/VideoCustomControls.js +0 -601
  305. package/dist/components/VideoPlayer/components/VideoIcons.d.ts +0 -25
  306. package/dist/components/VideoPlayer/components/VideoIcons.d.ts.map +0 -1
  307. package/dist/components/VideoPlayer/components/VideoIcons.js +0 -145
  308. package/dist/components/VideoPlayer/components/VideoMenu.d.ts +0 -27
  309. package/dist/components/VideoPlayer/components/VideoMenu.d.ts.map +0 -1
  310. package/dist/components/VideoPlayer/components/VideoMenu.js +0 -77
  311. package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts +0 -17
  312. package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts.map +0 -1
  313. package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.js +0 -289
  314. package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts +0 -10
  315. package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts.map +0 -1
  316. package/dist/components/VideoPlayer/components/VideoQualityMenu/index.js +0 -55
  317. package/dist/components/VideoPlayer/components/VideoSelect.d.ts +0 -10
  318. package/dist/components/VideoPlayer/components/VideoSelect.d.ts.map +0 -1
  319. package/dist/components/VideoPlayer/components/VideoSelect.js +0 -168
  320. package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts +0 -12
  321. package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts.map +0 -1
  322. package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.js +0 -48
  323. package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts +0 -25
  324. package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts.map +0 -1
  325. package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.js +0 -384
  326. package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts +0 -21
  327. package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts.map +0 -1
  328. package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.js +0 -264
  329. package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts +0 -10
  330. package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts.map +0 -1
  331. package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.js +0 -39
  332. package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts +0 -14
  333. package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts.map +0 -1
  334. package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.js +0 -360
  335. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts +0 -16
  336. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts.map +0 -1
  337. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts +0 -14
  338. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts.map +0 -1
  339. package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts +0 -4
  340. package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts.map +0 -1
  341. package/dist/components/VideoPlayer/components/VideoSettingsModal/context.js +0 -14
  342. package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts +0 -22
  343. package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts.map +0 -1
  344. package/dist/components/VideoPlayer/components/VideoSettingsModal/index.js +0 -211
  345. package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts +0 -11
  346. package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts.map +0 -1
  347. package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.js +0 -41
  348. package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts +0 -10
  349. package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts.map +0 -1
  350. package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.js +0 -69
  351. package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts +0 -21
  352. package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts.map +0 -1
  353. package/dist/components/VideoPlayer/hooks/useStoryboard.js +0 -91
  354. package/dist/components/VideoPlayer/index.d.ts +0 -11
  355. package/dist/components/VideoPlayer/index.d.ts.map +0 -1
  356. package/dist/components/VideoPlayer/types.d.ts +0 -101
  357. package/dist/components/VideoPlayer/types.d.ts.map +0 -1
  358. package/dist/components/VideoPlayer/utils/chapters.d.ts +0 -8
  359. package/dist/components/VideoPlayer/utils/chapters.d.ts.map +0 -1
  360. package/dist/components/VideoPlayer/utils/chapters.js +0 -38
  361. package/dist/components/VideoPlayer/utils/storyboard.d.ts +0 -5
  362. package/dist/components/VideoPlayer/utils/storyboard.d.ts.map +0 -1
  363. package/dist/components/VideoPlayer/utils/storyboard.js +0 -47
  364. package/dist/components/VideoPlayer/utils/subtitles.d.ts +0 -18
  365. package/dist/components/VideoPlayer/utils/subtitles.d.ts.map +0 -1
  366. package/dist/components/VideoPlayer/utils/subtitles.js +0 -23
  367. package/dist/components/VideoPlayer/utils/touch.d.ts +0 -3
  368. package/dist/components/VideoPlayer/utils/touch.d.ts.map +0 -1
  369. package/dist/components/VideoPlayer/utils/touch.js +0 -5
  370. package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts +0 -10
  371. package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts.map +0 -1
  372. package/dist/components/VideoPlayer/utils/videoPlayerUtils.js +0 -22
  373. package/dist/components/VideoPlayer/utils/videoSettings.d.ts +0 -69
  374. package/dist/components/VideoPlayer/utils/videoSettings.d.ts.map +0 -1
  375. package/dist/components/VideoPlayer/utils/videoSettings.js +0 -90
  376. package/dist/videoSettings/createVideoSettingsDataSource.d.ts +0 -19
  377. package/dist/videoSettings/createVideoSettingsDataSource.d.ts.map +0 -1
  378. package/dist/videoSettings/createVideoSettingsDataSource.js +0 -127
@@ -1,168 +0,0 @@
1
- import { jsxs as p, Fragment as H, jsx as e } from "react/jsx-runtime";
2
- import { useState as V, useMemo as W } from "react";
3
- import { useTranslation as M } from "react-i18next";
4
- import { ArrowDown01Icon as y, Tick02Icon as F } from "@hugeicons/core-free-icons";
5
- import { HugeiconsIcon as u } from "@hugeicons/react";
6
- import { useCombobox as G, InputBase as I, Stack as L, Combobox as s, Group as U } from "@mantine/core";
7
- import { useDisclosure as Y } from "@mantine/hooks";
8
- import { IS_TOUCH_DEVICE as q } from "../utils/touch.js";
9
- import { MobileDrawer as J } from "./MobileDrawer/index.js";
10
- import { SelectListOptionButton as K } from "./SelectListOptionButton.js";
11
- /* empty css */
12
- function ho({
13
- size: d = "sm",
14
- w: m = 150,
15
- comboboxProps: _,
16
- rightSection: h,
17
- renderOption: f,
18
- data: i,
19
- value: x,
20
- defaultValue: N,
21
- onChange: b,
22
- inputClassName: O,
23
- ...k
24
- }) {
25
- const {
26
- onClick: w,
27
- type: Q,
28
- onCopy: R,
29
- onCut: X,
30
- onPaste: Z,
31
- classNames: t,
32
- allowDeselect: $,
33
- ...v
34
- } = k, C = [typeof t == "object" && t && "input" in t ? t.input : void 0, O].filter(Boolean).join(" ") || void 0, g = C ? {
35
- ...typeof t == "object" && t ? t : {},
36
- input: C
37
- } : t, [, P] = V(""), n = G({
38
- onDropdownClose: () => {
39
- n.resetSelectedOption(), n.focusTarget(), P("");
40
- },
41
- onDropdownOpen: () => {
42
- n.focusSearchInput();
43
- }
44
- }), l = W(
45
- () => (Array.isArray(i) ? i : []).map(
46
- (o) => typeof o == "string" ? { value: o, label: o } : o
47
- ),
48
- [i]
49
- ), a = x ?? N ?? null, D = l.find((o) => o.value === a)?.label ?? "", { t: T } = M(), [j, { open: E, close: S }] = Y(!1);
50
- if (q)
51
- return /* @__PURE__ */ p(H, { children: [
52
- /* @__PURE__ */ e(
53
- I,
54
- {
55
- component: "button",
56
- size: d,
57
- w: m,
58
- classNames: g,
59
- pointer: !0,
60
- rightSection: h ?? /* @__PURE__ */ e(
61
- u,
62
- {
63
- icon: y,
64
- size: 16,
65
- className: "editor-select__chevron"
66
- }
67
- ),
68
- rightSectionPointerEvents: "none",
69
- onClick: (o) => {
70
- w?.(o), E();
71
- },
72
- ...v,
73
- children: D
74
- }
75
- ),
76
- /* @__PURE__ */ e(
77
- J,
78
- {
79
- opened: j,
80
- onClose: S,
81
- title: T("editor.video.source.drawerTitle", "Source"),
82
- children: /* @__PURE__ */ e(L, { gap: 4, p: 0, children: l.map((o) => /* @__PURE__ */ e(
83
- K,
84
- {
85
- label: o.label,
86
- checked: o.value === a,
87
- onSelect: () => {
88
- b?.(o.value, o), S();
89
- }
90
- },
91
- o.value
92
- )) })
93
- }
94
- )
95
- ] });
96
- const z = (o, r, c) => f ? f({
97
- option: { value: o, label: r },
98
- checked: c
99
- }) : /* @__PURE__ */ p(U, { justify: "space-between", wrap: "nowrap", w: "100%", children: [
100
- r,
101
- c && /* @__PURE__ */ e(
102
- u,
103
- {
104
- icon: F,
105
- size: 16,
106
- color: "var(--mantine-primary-color-text)"
107
- }
108
- )
109
- ] }), { width: A, ...B } = _ || {};
110
- return /* @__PURE__ */ p(
111
- s,
112
- {
113
- store: n,
114
- withinPortal: !0,
115
- onOptionSubmit: (o) => {
116
- const r = l.find((c) => c.value === o) ?? {
117
- value: o,
118
- label: o
119
- };
120
- b?.(o, r), n.closeDropdown();
121
- },
122
- width: A ?? "target",
123
- ...B,
124
- children: [
125
- /* @__PURE__ */ e(s.Target, { children: /* @__PURE__ */ e(
126
- I,
127
- {
128
- component: "button",
129
- size: d,
130
- w: m,
131
- classNames: g,
132
- pointer: !0,
133
- rightSection: h ?? /* @__PURE__ */ e(
134
- u,
135
- {
136
- icon: y,
137
- size: 16,
138
- className: "editor-select__chevron"
139
- }
140
- ),
141
- rightSectionPointerEvents: "none",
142
- onClick: (o) => {
143
- w?.(o), n.toggleDropdown();
144
- },
145
- ...v,
146
- children: D
147
- }
148
- ) }),
149
- /* @__PURE__ */ e(s.Dropdown, { children: /* @__PURE__ */ e(
150
- s.Options,
151
- {
152
- style: {
153
- maxHeight: 396,
154
- overflowY: "auto"
155
- },
156
- children: l.length > 0 ? l.map((o) => {
157
- const r = o.value === a;
158
- return /* @__PURE__ */ e(s.Option, { value: o.value, children: z(o.value, o.label, r) }, o.value);
159
- }) : /* @__PURE__ */ e(s.Empty, { children: "Nothing found" })
160
- }
161
- ) })
162
- ]
163
- }
164
- );
165
- }
166
- export {
167
- ho as default
168
- };
@@ -1,12 +0,0 @@
1
- import type { PlayerSettingsSnapshot } from '../../utils/videoSettings';
2
- type VideoSettingsMenuProps = {
3
- isOpen?: boolean;
4
- disabled?: boolean;
5
- settings: PlayerSettingsSnapshot;
6
- onSpeedClick: () => void;
7
- onQualityClick: () => void;
8
- onSubtitlesClick: () => void;
9
- };
10
- export declare function VideoSettingsMenu({ disabled, settings, onSpeedClick, onQualityClick, onSubtitlesClick, }: VideoSettingsMenuProps): import("react/jsx-runtime").JSX.Element;
11
- export {};
12
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/VideoPlayer/components/VideoSettingsMenu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AASxE,KAAK,sBAAsB,GAAG;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,sBAAsB,CAAC;IACjC,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,gBAAgB,GACjB,EAAE,sBAAsB,2CA+CxB"}
@@ -1,48 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as f } from "react-i18next";
3
- import { ChevronRightIcon as n, SubtitleIcon as m, SpeedIcon as p, QualityIcon as S } from "../VideoIcons.js";
4
- import { VideoMenu as I } from "../VideoMenu.js";
5
- function g({
6
- disabled: o,
7
- settings: e,
8
- onSpeedClick: r,
9
- onQualityClick: s,
10
- onSubtitlesClick: d
11
- }) {
12
- const { t: i } = f(), u = e.currentSpeed === 1 ? i("editor.video.settings.normal") : `${e.currentSpeed}x`, a = e.qualities.find((l) => l.id === e.currentQualityId)?.label || i("editor.video.settings.auto"), c = e.subtitles.find((l) => l.id === e.currentSubtitleId)?.label || i("editor.video.settings.off"), b = [
13
- {
14
- key: "subtitles",
15
- testId: "video-settings-menu-subtitles",
16
- onClick: d,
17
- disabled: o || !e.hasRealSubtitles,
18
- leftIcon: /* @__PURE__ */ t(m, { size: 16 }),
19
- leftLabel: i("editor.video.settings.subtitlesCc"),
20
- centerLabel: c,
21
- rightSection: /* @__PURE__ */ t(n, { size: 16 })
22
- },
23
- {
24
- key: "speed",
25
- testId: "video-settings-menu-speed",
26
- onClick: r,
27
- disabled: o || !e.hasRealSpeeds,
28
- leftIcon: /* @__PURE__ */ t(p, { size: 16 }),
29
- leftLabel: i("editor.video.settings.speed"),
30
- centerLabel: u,
31
- rightSection: /* @__PURE__ */ t(n, { size: 16 })
32
- },
33
- {
34
- key: "quality",
35
- testId: "video-settings-menu-quality",
36
- onClick: s,
37
- disabled: o || !e.hasRealQualities,
38
- leftIcon: /* @__PURE__ */ t(S, { size: 16 }),
39
- leftLabel: i("editor.video.settings.quality"),
40
- centerLabel: a,
41
- rightSection: /* @__PURE__ */ t(n, { size: 16 })
42
- }
43
- ];
44
- return /* @__PURE__ */ t(I, { width: 300, items: b });
45
- }
46
- export {
47
- g as VideoSettingsMenu
48
- };
@@ -1,25 +0,0 @@
1
- import type { Chapter } from '../../types';
2
- import { type ChapterInput } from '../../utils/chapters';
3
- type ChaptersSectionProps = {
4
- videoId?: string | null;
5
- initialChapters?: Chapter[];
6
- nativeVideo?: HTMLVideoElement | null;
7
- shakaPlayer?: any | null;
8
- videoDuration?: number | null;
9
- title: string;
10
- toggleLabel: string;
11
- chaptersDisabled: boolean;
12
- onChaptersDisabledChange: (value: boolean) => void;
13
- onSave?: (saveHandler: () => Promise<ChapterInput[] | null>) => void;
14
- timePlaceholder: string;
15
- endTimePlaceholder: string;
16
- titlePlaceholder: string;
17
- addChapterLabel: string;
18
- deleteChapterLabel: string;
19
- emptyLabel: string;
20
- errorLabel: string;
21
- invalidRangeLabel: string;
22
- };
23
- export declare function ChaptersSection({ videoId, initialChapters, nativeVideo, shakaPlayer, videoDuration: videoDurationProp, title, toggleLabel, chaptersDisabled, onChaptersDisabledChange, onSave, timePlaceholder, endTimePlaceholder, titlePlaceholder, addChapterLabel, deleteChapterLabel, emptyLabel, errorLabel, }: ChaptersSectionProps): import("react/jsx-runtime").JSX.Element;
24
- export {};
25
- //# sourceMappingURL=ChaptersSection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChaptersSection.d.ts","sourceRoot":"","sources":["../../../../../src/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,sBAAsB,CAAC;AAM9B,KAAK,oBAAoB,GAAG;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,EAAE,CAAC;IAC5B,WAAW,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,wBAAwB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnD,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,OAAO,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC;IACrE,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AA0PF,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,eAAe,EACf,WAAW,EACX,WAAW,EACX,aAAa,EAAE,iBAAiB,EAChC,KAAK,EACL,WAAW,EACX,gBAAgB,EAChB,wBAAwB,EACxB,MAAM,EACN,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,UAAU,GACX,EAAE,oBAAoB,2CA4StB"}
@@ -1,384 +0,0 @@
1
- import { jsxs as B, jsx as r, Fragment as St } from "react/jsx-runtime";
2
- import { useState as g, useRef as it, useCallback as T, useEffect as j } from "react";
3
- import { Stack as st, Text as R, Flex as at, Switch as xt, Divider as Tt, Group as yt, TextInput as ut, Textarea as Mt, Menu as Q, ActionIcon as Ct } from "@mantine/core";
4
- import { secondsToTimestamp as D, parseTimestampToSec as dt } from "../../utils/chapters.js";
5
- import { MoreVerticalIcon as wt } from "../VideoIcons.js";
6
- import { useVideoSettingsDataSource as Et } from "./context.js";
7
- function ht() {
8
- try {
9
- return crypto.randomUUID();
10
- } catch {
11
- return `${Date.now()}-${Math.random().toString(16).slice(2)}`;
12
- }
13
- }
14
- function vt(x) {
15
- return x.map((i) => ({
16
- id: ht(),
17
- startSec: i.startSec ?? 0,
18
- title: (i.title ?? "").trim()
19
- })).sort((i, m) => i.startSec - m.startSec);
20
- }
21
- function Nt({
22
- chapter: x,
23
- index: i,
24
- startSec: m,
25
- endSec: p,
26
- isLast: y,
27
- disabled: N,
28
- startTimePlaceholder: X,
29
- endTimePlaceholder: U,
30
- titlePlaceholder: Y,
31
- deleteChapterLabel: $,
32
- startMin: G,
33
- startMax: b,
34
- endMin: Z,
35
- endMax: V,
36
- onStartSecChange: W,
37
- onEndSecChange: P,
38
- onTitleChange: _,
39
- onRemove: z
40
- }) {
41
- const [S, L] = g(
42
- () => D(m)
43
- ), [H, k] = g(
44
- () => p == null ? "" : D(p)
45
- ), [M, C] = g(!1), [q, a] = g(!1), [I, h] = g(!1), [w, A] = g(!1);
46
- j(() => {
47
- I || L(D(m));
48
- }, [m, I]), j(() => {
49
- w || k(p == null ? "" : D(p));
50
- }, [p, w]);
51
- const J = (c) => {
52
- L(c);
53
- const E = dt(c);
54
- if (E !== null) {
55
- const f = Math.floor(Number(E) || 0), F = f < G, v = b != null && f > b;
56
- if (F || v) {
57
- C(!0);
58
- return;
59
- }
60
- C(!1), W(i, f);
61
- } else if (c.trim() === "") {
62
- const F = 0 < G, v = b != null && 0 > b;
63
- if (F || v) {
64
- C(!0);
65
- return;
66
- }
67
- C(!1), W(i, 0);
68
- } else
69
- C(!0);
70
- }, tt = (c) => {
71
- if (k(c), y) return;
72
- const E = dt(c);
73
- if (E !== null) {
74
- const f = Math.floor(Number(E) || 0), v = f < (Z ?? -1 / 0), et = V != null && f > V;
75
- if (v || et) {
76
- a(!0);
77
- return;
78
- }
79
- a(!1), P(i, f);
80
- } else c.trim() === "" ? a(!1) : a(!0);
81
- };
82
- return /* @__PURE__ */ B(
83
- yt,
84
- {
85
- gap: 10,
86
- align: "flex-start",
87
- wrap: "nowrap",
88
- className: "video-settings-modal-chapter-row",
89
- style: { maxWidth: "100%" },
90
- children: [
91
- /* @__PURE__ */ B(st, { className: "video-settings-modal-chapter-times", children: [
92
- /* @__PURE__ */ r(
93
- ut,
94
- {
95
- size: "sm",
96
- radius: 8,
97
- variant: "default",
98
- placeholder: X,
99
- value: S,
100
- onChange: (c) => J(c.currentTarget.value),
101
- style: { width: "100%" },
102
- styles: {
103
- input: {
104
- height: 36,
105
- paddingTop: 6,
106
- paddingBottom: 6,
107
- paddingLeft: 12,
108
- paddingRight: 12,
109
- lineHeight: 1.45
110
- }
111
- },
112
- error: M,
113
- disabled: N,
114
- onFocus: () => h(!0),
115
- onBlur: () => h(!1)
116
- }
117
- ),
118
- /* @__PURE__ */ r(
119
- ut,
120
- {
121
- size: "sm",
122
- radius: 8,
123
- variant: "default",
124
- placeholder: U,
125
- value: H,
126
- onChange: (c) => tt(c.currentTarget.value),
127
- style: { width: "100%" },
128
- styles: {
129
- input: {
130
- height: 36,
131
- paddingTop: 6,
132
- paddingBottom: 6,
133
- paddingLeft: 12,
134
- paddingRight: 12,
135
- lineHeight: 1.45
136
- }
137
- },
138
- error: q,
139
- disabled: N || y || p == null,
140
- onFocus: () => A(!0),
141
- onBlur: () => A(!1)
142
- }
143
- )
144
- ] }),
145
- /* @__PURE__ */ r(at, { className: "video-settings-modal-chapter-title", children: /* @__PURE__ */ r(
146
- Mt,
147
- {
148
- size: "sm",
149
- radius: 8,
150
- variant: "default",
151
- placeholder: Y,
152
- value: x.title,
153
- onChange: (c) => _(i, c.currentTarget.value),
154
- styles: {
155
- root: {
156
- width: "100%",
157
- height: "100%"
158
- },
159
- wrapper: {
160
- height: "100%"
161
- },
162
- input: {
163
- height: "100%",
164
- paddingTop: 8,
165
- paddingBottom: 8,
166
- paddingLeft: 12,
167
- paddingRight: 12,
168
- lineHeight: 1.45,
169
- resize: "none"
170
- }
171
- },
172
- style: { width: "100%", height: "100%" },
173
- disabled: N
174
- }
175
- ) }),
176
- /* @__PURE__ */ r(at, { className: "video-settings-modal-chapter-actions", children: /* @__PURE__ */ B(Q, { position: "bottom-end", children: [
177
- /* @__PURE__ */ r(Q.Target, { children: /* @__PURE__ */ r(
178
- Ct,
179
- {
180
- size: 36,
181
- variant: "subtle",
182
- color: "gray",
183
- "aria-label": "Chapter actions",
184
- disabled: N,
185
- radius: 8,
186
- "data-test-id": "video-settings-chapters-row-menu",
187
- children: /* @__PURE__ */ r(wt, { size: 20 })
188
- }
189
- ) }),
190
- /* @__PURE__ */ r(Q.Dropdown, { children: /* @__PURE__ */ r(
191
- Q.Item,
192
- {
193
- color: "red",
194
- onClick: () => z(i),
195
- "data-test-id": "video-settings-chapters-delete",
196
- children: $
197
- }
198
- ) })
199
- ] }) })
200
- ]
201
- }
202
- );
203
- }
204
- function Lt({
205
- videoId: x,
206
- initialChapters: i,
207
- nativeVideo: m,
208
- shakaPlayer: p,
209
- videoDuration: y,
210
- title: N,
211
- toggleLabel: X,
212
- chaptersDisabled: U,
213
- onChaptersDisabledChange: Y,
214
- onSave: $,
215
- timePlaceholder: G,
216
- endTimePlaceholder: b,
217
- titlePlaceholder: Z,
218
- addChapterLabel: V,
219
- deleteChapterLabel: W,
220
- emptyLabel: P,
221
- errorLabel: _
222
- }) {
223
- const [z, S] = g(
224
- []
225
- ), [L, H] = g(null), [k, M] = g(null), [C] = g(!1), [, q] = g(!1), [a, I] = g(null), h = it(!1), w = it(!1), A = Et(), J = T((t) => {
226
- w.current || h.current || S(vt(t));
227
- }, []);
228
- j(() => {
229
- if (y != null && y > 0) {
230
- I(y);
231
- return;
232
- }
233
- try {
234
- const t = p?.seekRange?.();
235
- if (t && Number.isFinite(t.end) && t.end > 0) {
236
- I(t.end);
237
- return;
238
- }
239
- } catch {
240
- }
241
- if (m) {
242
- const t = m.duration;
243
- if (Number.isFinite(t) && t > 0) {
244
- I(t);
245
- return;
246
- }
247
- }
248
- }, [y, p, m]);
249
- const tt = T(() => a == null ? null : Math.floor(a), [a]), c = T(async () => {
250
- if (!x) return null;
251
- M(null), q(!0), w.current = !0, H(null);
252
- try {
253
- const t = z.filter((e) => e.title.trim()).filter((e) => a == null || e.startSec < a).sort((e, n) => e.startSec - n.startSec).map(({ startSec: e, title: n }) => ({ startSec: e, title: n }));
254
- return await A.saveChapters(t), h.current = !1, t;
255
- } catch (t) {
256
- const e = t instanceof Error ? t.message : _;
257
- return /exceeds/i.test(e) || H(e), null;
258
- } finally {
259
- q(!1), w.current = !1;
260
- }
261
- }, [x, A, z, _, tt]);
262
- j(() => {
263
- $?.(c);
264
- }, [c, $]);
265
- const E = T(() => {
266
- h.current = !0, M(null), S((t) => {
267
- const e = a != null ? Math.floor(a) : null, n = [...t].sort((d, u) => d.startSec - u.startSec), l = n.length > 0 ? Math.floor(n[n.length - 1].startSec) : -1, s = Math.max(0, l + 1), o = e != null ? Math.min(s, Math.max(0, e - 1)) : s;
268
- return [
269
- ...n,
270
- {
271
- id: ht(),
272
- startSec: o,
273
- title: ""
274
- }
275
- ];
276
- });
277
- }, [a]), f = T((t, e) => {
278
- h.current = !0, S((n) => {
279
- const s = [...[...n].sort((d, u) => d.startSec - u.startSec)], o = s[t];
280
- return o ? (s[t] = { ...o, title: e }, s) : n;
281
- });
282
- }, []), F = T((t, e) => {
283
- h.current = !0, M(null), S((n) => {
284
- const l = [...n].sort((d, u) => d.startSec - u.startSec), s = l[t];
285
- if (!s) return n;
286
- const o = [...l];
287
- return o[t] = { ...s, startSec: e }, o.sort((d, u) => d.startSec - u.startSec);
288
- });
289
- }, []), v = T((t, e) => {
290
- h.current = !0, M(null), S((n) => {
291
- const l = [...n].sort((d, u) => d.startSec - u.startSec);
292
- if (t >= l.length - 1) return n;
293
- const s = l[t + 1];
294
- if (!s) return n;
295
- const o = [...l];
296
- return o[t + 1] = { ...s, startSec: e }, o.sort((d, u) => d.startSec - u.startSec);
297
- });
298
- }, []), et = T((t) => {
299
- h.current = !0, M(null), S((e) => [...e].sort((l, s) => l.startSec - s.startSec).filter((l, s) => s !== t));
300
- }, []);
301
- return j(() => {
302
- if (!x) {
303
- S([]), H(null), h.current = !1;
304
- return;
305
- }
306
- w.current || h.current || Array.isArray(i) && J(i);
307
- }, [x, i, J]), /* @__PURE__ */ B(st, { gap: "xs", "data-test-id": "video-settings-chapters-section", children: [
308
- /* @__PURE__ */ r(
309
- R,
310
- {
311
- className: "video-settings-modal-section-title",
312
- "data-test-id": "video-settings-chapters-title",
313
- children: N
314
- }
315
- ),
316
- /* @__PURE__ */ B(
317
- at,
318
- {
319
- align: "center",
320
- gap: "md",
321
- className: "video-settings-modal-subtitles-auto-toggle",
322
- children: [
323
- /* @__PURE__ */ r(R, { size: "sm", fw: 500, c: "var(--mantine-color-bright)", flex: 1, children: X }),
324
- /* @__PURE__ */ r(
325
- xt,
326
- {
327
- size: "sm",
328
- checked: !U,
329
- onChange: (t) => Y(!t.currentTarget.checked),
330
- "data-test-id": "video-settings-chapters-toggle"
331
- }
332
- )
333
- ]
334
- }
335
- ),
336
- !U && /* @__PURE__ */ B(St, { children: [
337
- /* @__PURE__ */ r(Tt, { my: 4 }),
338
- L && /* @__PURE__ */ r(R, { size: "sm", c: "red", mb: "xs", children: L }),
339
- k && /* @__PURE__ */ r(R, { size: "sm", c: "red", mb: "xs", children: k }),
340
- /* @__PURE__ */ r(st, { gap: 12, children: [...z].sort((t, e) => t.startSec - e.startSec).map((t, e, n) => {
341
- const l = n[e + 1] || null, s = n[e + 2] || null, o = a != null ? Math.floor(a) : null, d = l != null ? Math.floor(l.startSec) : o ?? null, u = Math.floor(t.startSec), lt = e > 0 ? Math.floor(n[e - 1].startSec) : null, ot = l != null ? Math.floor(l.startSec) : null, gt = lt != null ? lt + 1 : 0, K = ot != null ? ot - 1 : null, nt = o != null ? o - 1 : null, ft = K != null && nt != null ? Math.min(K, nt) : K ?? nt, mt = e < n.length - 1 ? u + 1 : null, ct = s != null ? Math.floor(s.startSec) : null, O = ct != null ? ct - 1 : null, rt = o ?? null, pt = O != null && rt != null ? Math.min(O, rt) : O ?? rt;
342
- return /* @__PURE__ */ r(
343
- Nt,
344
- {
345
- chapter: t,
346
- index: e,
347
- startSec: u,
348
- endSec: d,
349
- isLast: e === n.length - 1,
350
- startMin: gt,
351
- startMax: ft,
352
- endMin: mt,
353
- endMax: pt,
354
- disabled: !1,
355
- startTimePlaceholder: G,
356
- endTimePlaceholder: a != null ? D(Math.floor(a)) : b,
357
- titlePlaceholder: Z,
358
- deleteChapterLabel: W,
359
- onStartSecChange: F,
360
- onEndSecChange: v,
361
- onTitleChange: f,
362
- onRemove: et
363
- },
364
- t.id
365
- );
366
- }) }),
367
- /* @__PURE__ */ r(
368
- R,
369
- {
370
- component: "button",
371
- type: "button",
372
- className: "video-settings-modal-link",
373
- onClick: E,
374
- "data-test-id": "video-settings-chapters-add",
375
- children: V
376
- }
377
- ),
378
- z.length === 0 && !C && /* @__PURE__ */ r(R, { size: "xs", c: "dimmed", children: P })
379
- ] })
380
- ] });
381
- }
382
- export {
383
- Lt as ChaptersSection
384
- };
@@ -1,21 +0,0 @@
1
- import { FileWithPath } from '@mantine/dropzone';
2
- import type { VideoSettingsData } from '../../types';
3
- type CoverSectionProps = {
4
- opened: boolean;
5
- videoId?: string | null;
6
- initialData?: VideoSettingsData | null;
7
- title: string;
8
- uploadLabel: string;
9
- cropLabel: string;
10
- emptyCoverLabel: string;
11
- loadErrorLabel?: string;
12
- retryLabel?: string;
13
- onCoverUpload?: (file: FileWithPath) => void | Promise<VideoSettingsData | undefined>;
14
- onCropCover?: () => void;
15
- onPosterChange?: (posterUrl: string | null) => void;
16
- onSelectedPosterChange?: (url: string | null) => void;
17
- selectedPosterUrl?: string | null;
18
- };
19
- export declare function CoverSection({ opened, videoId, initialData, title, uploadLabel, loadErrorLabel, retryLabel, onCoverUpload, onPosterChange: _onPosterChange, onSelectedPosterChange, selectedPosterUrl, }: CoverSectionProps): import("react/jsx-runtime").JSX.Element;
20
- export {};
21
- //# sourceMappingURL=CoverSection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoverSection.d.ts","sourceRoot":"","sources":["../../../../../src/components/VideoPlayer/components/VideoSettingsModal/CoverSection.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAY,YAAY,EAAmB,MAAM,mBAAmB,CAAC;AAE5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIrD,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,CACd,IAAI,EAAE,YAAY,KACf,IAAI,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACpD,sBAAsB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACtD,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,WAAW,EACX,KAAK,EACL,WAAW,EACX,cAAc,EACd,UAAU,EACV,aAAa,EACb,cAAc,EAAE,eAAe,EAC/B,sBAAsB,EACtB,iBAAiB,GAClB,EAAE,iBAAiB,2CA6VnB"}