@cometchat/chat-uikit-react 5.0.0-beta1 → 5.0.0-beta2

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 (249) hide show
  1. package/README.md +8 -7
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.js +1 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/styles/CometChatEditPreview.css +1 -0
  6. package/dist/styles/CometChatFileBubble.css +2 -0
  7. package/dist/styles/CometChatMessageComposer.css +5 -0
  8. package/dist/styles/CometChatMessageHeader.css +11 -0
  9. package/dist/styles/components/CometChatEditPreview.css +1 -0
  10. package/dist/styles/components/CometChatFileBubble.css +2 -0
  11. package/dist/styles/components/CometChatMessageComposer.css +5 -0
  12. package/dist/styles/components/CometChatMessageHeader.css +11 -0
  13. package/dist/styles/components/index.css +1 -0
  14. package/dist/styles/index.css +1 -0
  15. package/dist/types/events/CometChatUIEvents.d.ts +2 -0
  16. package/package.json +1 -1
  17. package/screenshots/sample_app_overview.png +0 -0
  18. package/dist/Collaborative_Whiteboard_Dark.png +0 -0
  19. package/dist/Collaborative_Whiteboard_Light.png +0 -0
  20. package/dist/styles/CometChatBadge.css +0 -15
  21. package/dist/styles/CometChatCard.css +0 -41
  22. package/dist/styles/components/CometChatBadge.css +0 -15
  23. package/dist/styles/components/CometChatCard.css +0 -41
  24. package/dist/types/CometChatUIKit/CometChatUIKitSharedSettings.d.ts +0 -8
  25. package/dist/types/components/BaseComponents/CometChatBadge/CometChatBadge.d.ts +0 -10
  26. package/dist/types/components/BaseComponents/CometChatCard/CometChatCard.d.ts +0 -15
  27. package/dist/types/components/BaseComponents/CometChatQuickView/CometChatQuickView.d.ts +0 -9
  28. package/dist/types/components/BaseComponents/CometChatSingleSelect/CometChatSingleSelect.d.ts +0 -8
  29. package/dist/types/components/CometChatUserMemberWrapper/index.d.ts +0 -23
  30. package/dist/types/modals/InteractiveActions/APIAction.d.ts +0 -108
  31. package/dist/types/modals/InteractiveActions/CustomAction.d.ts +0 -12
  32. package/dist/types/modals/InteractiveActions/URLNavigationAction.d.ts +0 -30
  33. package/dist/types/modals/InteractiveActions/index.d.ts +0 -3
  34. package/dist/types/modals/InteractiveElements/BaseInputElement.d.ts +0 -50
  35. package/dist/types/modals/InteractiveElements/BaseInteractiveElement.d.ts +0 -25
  36. package/dist/types/modals/InteractiveElements/ButtonElement.d.ts +0 -48
  37. package/dist/types/modals/InteractiveElements/CheckboxElement.d.ts +0 -46
  38. package/dist/types/modals/InteractiveElements/DateTimePickerElement.d.ts +0 -124
  39. package/dist/types/modals/InteractiveElements/DropdownElement.d.ts +0 -55
  40. package/dist/types/modals/InteractiveElements/LabelElement.d.ts +0 -29
  41. package/dist/types/modals/InteractiveElements/OptionElement.d.ts +0 -35
  42. package/dist/types/modals/InteractiveElements/RadioButtonElement.d.ts +0 -54
  43. package/dist/types/modals/InteractiveElements/SingleSelectElement.d.ts +0 -50
  44. package/dist/types/modals/InteractiveElements/TextInputElement.d.ts +0 -69
  45. package/dist/types/modals/InteractiveElements/index.d.ts +0 -11
  46. package/dist/types/modals/InteractiveEntities/ActionEntity.d.ts +0 -32
  47. package/dist/types/modals/InteractiveEntities/ElementEntity.d.ts +0 -35
  48. package/dist/types/modals/InteractiveEntities/index.d.ts +0 -2
  49. package/dist/types/modals/InteractiveMessage/CardMessage.d.ts +0 -69
  50. package/dist/types/modals/InteractiveMessage/CustomInteractiveMessage.d.ts +0 -20
  51. package/dist/types/modals/InteractiveMessage/FormMessage.d.ts +0 -75
  52. package/dist/types/modals/InteractiveMessage/SchedulerMessage.d.ts +0 -230
  53. package/dist/types/modals/InteractiveMessage/index.d.ts +0 -5
  54. package/dist/types/src/CometChatCustomHooks.d.ts +0 -27
  55. package/dist/types/src/CometChatUIKit/CometChatCalls.d.ts +0 -1
  56. package/dist/types/src/CometChatUIKit/CometChatUIKit.d.ts +0 -147
  57. package/dist/types/src/CometChatUIKit/CometChatUIKitLoginListener.d.ts +0 -32
  58. package/dist/types/src/CometChatUIKit/CometChatUIKitUtility.d.ts +0 -81
  59. package/dist/types/src/CometChatUIKit/UIKitSettings.d.ts +0 -304
  60. package/dist/types/src/Enums/Enums.d.ts +0 -258
  61. package/dist/types/src/components/AI/AIBaseConfiguration.d.ts +0 -51
  62. package/dist/types/src/components/AI/AIConversationStarter/AIConversationStarterConfiguration.d.ts +0 -20
  63. package/dist/types/src/components/AI/AIConversationStarter/AIConversationStarterDecorator.d.ts +0 -18
  64. package/dist/types/src/components/AI/AIConversationStarter/AIConversationStarterExtension.d.ts +0 -8
  65. package/dist/types/src/components/AI/AIConversationStarter/AIConversationStarterView.d.ts +0 -8
  66. package/dist/types/src/components/AI/AIConversationSummary/AIConversationSummaryConfiguration.d.ts +0 -31
  67. package/dist/types/src/components/AI/AIConversationSummary/AIConversationSummaryDecorator.d.ts +0 -22
  68. package/dist/types/src/components/AI/AIConversationSummary/AIConversationSummaryExtension.d.ts +0 -8
  69. package/dist/types/src/components/AI/AIConversationSummary/AIConversationSummaryView.d.ts +0 -9
  70. package/dist/types/src/components/AI/AIExtensionDataSource.d.ts +0 -6
  71. package/dist/types/src/components/AI/AISmartReplies/AISmartRepliesConfiguration.d.ts +0 -28
  72. package/dist/types/src/components/AI/AISmartReplies/AISmartRepliesDecorator.d.ts +0 -21
  73. package/dist/types/src/components/AI/AISmartReplies/AISmartRepliesExtension.d.ts +0 -8
  74. package/dist/types/src/components/AI/AISmartReplies/AISmartRepliesView.d.ts +0 -11
  75. package/dist/types/src/components/BaseComponents/CometChatActionBubble/CometChatActionBubble.d.ts +0 -8
  76. package/dist/types/src/components/BaseComponents/CometChatActionSheet/CometChatActionSheet.d.ts +0 -7
  77. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/CometChatAudioBubble.d.ts +0 -6
  78. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/base-plugin.d.ts +0 -21
  79. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/decoder.d.ts +0 -9
  80. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/dom.d.ts +0 -13
  81. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/draggable.d.ts +0 -1
  82. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/event-emitter.d.ts +0 -21
  83. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/fetcher.d.ts +0 -5
  84. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/player.d.ts +0 -50
  85. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/plugins/envelope.d.ts +0 -79
  86. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/plugins/hover.d.ts +0 -36
  87. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/plugins/minimap.d.ts +0 -65
  88. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/plugins/record.d.ts +0 -89
  89. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/plugins/regions.d.ts +0 -139
  90. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/plugins/spectrogram.d.ts +0 -98
  91. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/plugins/timeline.d.ts +0 -54
  92. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/plugins/zoom.d.ts +0 -55
  93. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/renderer.d.ts +0 -63
  94. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/timer.d.ts +0 -11
  95. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/wavesurfer.d.ts +0 -223
  96. package/dist/types/src/components/BaseComponents/CometChatAudioBubble/src/webaudio.d.ts +0 -63
  97. package/dist/types/src/components/BaseComponents/CometChatAvatar/CometChatAvatar.d.ts +0 -13
  98. package/dist/types/src/components/BaseComponents/CometChatButton/CometChatButton.d.ts +0 -12
  99. package/dist/types/src/components/BaseComponents/CometChatCallBubble/CometChatCallBubble.d.ts +0 -12
  100. package/dist/types/src/components/BaseComponents/CometChatChangeScope/CometChatChangeScope.d.ts +0 -10
  101. package/dist/types/src/components/BaseComponents/CometChatChangeScope/useCometChatChangeScope.d.ts +0 -10
  102. package/dist/types/src/components/BaseComponents/CometChatCheckbox/CometChatCheckbox.d.ts +0 -11
  103. package/dist/types/src/components/BaseComponents/CometChatCheckbox/useCometChatCheckbox.d.ts +0 -11
  104. package/dist/types/src/components/BaseComponents/CometChatConfirmDialog/CometChatConfirmDialog.d.ts +0 -16
  105. package/dist/types/src/components/BaseComponents/CometChatContextMenu/CometChatContextMenu.d.ts +0 -17
  106. package/dist/types/src/components/BaseComponents/CometChatDate/CometChatDate.d.ts +0 -13
  107. package/dist/types/src/components/BaseComponents/CometChatDate/useCometChatDate.d.ts +0 -8
  108. package/dist/types/src/components/BaseComponents/CometChatDeleteBubble/CometChatDeleteBubble.d.ts +0 -14
  109. package/dist/types/src/components/BaseComponents/CometChatDocumentBubble/CometChatDocumentBubble.d.ts +0 -11
  110. package/dist/types/src/components/BaseComponents/CometChatDropDown/CometChatDropDown.d.ts +0 -14
  111. package/dist/types/src/components/BaseComponents/CometChatDropDown/useCometChatDropDown.d.ts +0 -12
  112. package/dist/types/src/components/BaseComponents/CometChatEditPreview/CometChatEditPreview.d.ts +0 -21
  113. package/dist/types/src/components/BaseComponents/CometChatEmojiKeyboard/CometChatEmoji.d.ts +0 -22
  114. package/dist/types/src/components/BaseComponents/CometChatEmojiKeyboard/CometChatEmojiKeyboard.d.ts +0 -7
  115. package/dist/types/src/components/BaseComponents/CometChatEmojiKeyboard/emojis.d.ts +0 -6579
  116. package/dist/types/src/components/BaseComponents/CometChatEmojiKeyboard/useCometChatEmojiKeyboard.d.ts +0 -17
  117. package/dist/types/src/components/BaseComponents/CometChatFileBubble/CometChatFileBubble.d.ts +0 -9
  118. package/dist/types/src/components/BaseComponents/CometChatFullScreenViewer/CometChatFullScreenViewer.d.ts +0 -23
  119. package/dist/types/src/components/BaseComponents/CometChatImageBubble/CometChatImageBubble.d.ts +0 -10
  120. package/dist/types/src/components/BaseComponents/CometChatImageBubble/useCometChatImageBubble.d.ts +0 -7
  121. package/dist/types/src/components/BaseComponents/CometChatList/CometChatList.d.ts +0 -156
  122. package/dist/types/src/components/BaseComponents/CometChatList/useCometChatList.d.ts +0 -17
  123. package/dist/types/src/components/BaseComponents/CometChatListItem/CometChatListItem.d.ts +0 -15
  124. package/dist/types/src/components/BaseComponents/CometChatListItem/useCometChatListItem.d.ts +0 -12
  125. package/dist/types/src/components/BaseComponents/CometChatLiveReaction/CometChatLiveReaction.d.ts +0 -5
  126. package/dist/types/src/components/BaseComponents/CometChatLiveReaction/useLiveReactionHook.d.ts +0 -19
  127. package/dist/types/src/components/BaseComponents/CometChatMediaRecorder/CometChatMediaRecorder.d.ts +0 -8
  128. package/dist/types/src/components/BaseComponents/CometChatMessageBubble/CometChatMessageBubble.d.ts +0 -28
  129. package/dist/types/src/components/BaseComponents/CometChatPopover/CometChatPopover.d.ts +0 -24
  130. package/dist/types/src/components/BaseComponents/CometChatRadioButton/CometChatRadioButton.d.ts +0 -14
  131. package/dist/types/src/components/BaseComponents/CometChatRadioButton/useCometChatRadioButton.d.ts +0 -13
  132. package/dist/types/src/components/BaseComponents/CometChatSearchBar/CometChatSearchBar.d.ts +0 -9
  133. package/dist/types/src/components/BaseComponents/CometChatSearchBar/useCometChatSearchBar.d.ts +0 -10
  134. package/dist/types/src/components/BaseComponents/CometChatTextBubble/CometChatTextBubble.d.ts +0 -8
  135. package/dist/types/src/components/BaseComponents/CometChatTextBubble/useCometChatTextBubble.d.ts +0 -6
  136. package/dist/types/src/components/BaseComponents/CometChatToast/CometChatToast.d.ts +0 -27
  137. package/dist/types/src/components/BaseComponents/CometChatVideoBubble/CometChatVideoBubble.d.ts +0 -9
  138. package/dist/types/src/components/BaseComponents/CometChatVideoBubble/useCometChatVideoBubble.d.ts +0 -6
  139. package/dist/types/src/components/Calling/CallButtonConfiguration.d.ts +0 -10
  140. package/dist/types/src/components/Calling/CallingConfiguration.d.ts +0 -7
  141. package/dist/types/src/components/Calling/CallingExtension.d.ts +0 -9
  142. package/dist/types/src/components/Calling/CallingExtensionDecorator.d.ts +0 -29
  143. package/dist/types/src/components/Calling/CometChatCallButtons/CometChatCallButtons.d.ts +0 -36
  144. package/dist/types/src/components/Calling/CometChatCallButtons/useCallButtons.d.ts +0 -6
  145. package/dist/types/src/components/Calling/CometChatCallLogs/CometChatCallLogs.d.ts +0 -71
  146. package/dist/types/src/components/Calling/CometChatCallLogs/useCometChatCallLogs.d.ts +0 -2
  147. package/dist/types/src/components/Calling/CometChatIncomingCall/CometChatIncomingCall.d.ts +0 -59
  148. package/dist/types/src/components/Calling/CometChatIncomingCall/useCometChatIncomingCall.d.ts +0 -2
  149. package/dist/types/src/components/Calling/CometChatOngoingCall/CometChatOngoingCall.d.ts +0 -10
  150. package/dist/types/src/components/Calling/CometChatOngoingCall/useCometChatOngoingCall.d.ts +0 -2
  151. package/dist/types/src/components/Calling/CometChatOutgoingCall/CometChatOutgoingCall.d.ts +0 -36
  152. package/dist/types/src/components/Calling/CometChatOutgoingCall/useCometChatOutgoingCall.d.ts +0 -7
  153. package/dist/types/src/components/Calling/OutgoingCallConfiguration.d.ts +0 -8
  154. package/dist/types/src/components/Calling/Utils/utils.d.ts +0 -7
  155. package/dist/types/src/components/CometChatConversations/CometChatConversations.d.ts +0 -219
  156. package/dist/types/src/components/CometChatConversations/controller.d.ts +0 -74
  157. package/dist/types/src/components/CometChatConversations/useCometChatConversations.d.ts +0 -25
  158. package/dist/types/src/components/CometChatGroupMembers/CometChatGroupMembers.d.ts +0 -178
  159. package/dist/types/src/components/CometChatGroupMembers/controller.d.ts +0 -38
  160. package/dist/types/src/components/CometChatGroupMembers/useCometChatGroupMembers.d.ts +0 -22
  161. package/dist/types/src/components/CometChatGroups/CometChatGroups.d.ts +0 -150
  162. package/dist/types/src/components/CometChatGroups/controller.d.ts +0 -44
  163. package/dist/types/src/components/CometChatGroups/useCometChatGroups.d.ts +0 -15
  164. package/dist/types/src/components/CometChatMessageComposer/CometChatMessageComposer.d.ts +0 -166
  165. package/dist/types/src/components/CometChatMessageComposer/useCometChatMessageComposer.d.ts +0 -42
  166. package/dist/types/src/components/CometChatMessageHeader/CometChatMessageHeader.d.ts +0 -29
  167. package/dist/types/src/components/CometChatMessageHeader/useCometChatMessageHeader.d.ts +0 -3
  168. package/dist/types/src/components/CometChatMessageInformation/CometChatMessageInformation.d.ts +0 -6
  169. package/dist/types/src/components/CometChatMessageList/CometChatMessageList.d.ts +0 -132
  170. package/dist/types/src/components/CometChatMessageList/CometChatMessageListController.d.ts +0 -48
  171. package/dist/types/src/components/CometChatMessageList/useCometChatMessageList.d.ts +0 -6
  172. package/dist/types/src/components/CometChatThreadedMessagePreview/CometChatThreadedMessagePreview.d.ts +0 -11
  173. package/dist/types/src/components/CometChatUserMemberWrapper/CometChatUserMemberWrapper.d.ts +0 -21
  174. package/dist/types/src/components/CometChatUsers/CometChatUsers.d.ts +0 -193
  175. package/dist/types/src/components/CometChatUsers/controller.d.ts +0 -28
  176. package/dist/types/src/components/CometChatUsers/useCometChatUsers.d.ts +0 -19
  177. package/dist/types/src/components/Extensions/CollaborativeDocument/CollaborativeDocumentConfiguration.d.ts +0 -35
  178. package/dist/types/src/components/Extensions/CollaborativeDocument/CollaborativeDocumentConstants.d.ts +0 -15
  179. package/dist/types/src/components/Extensions/CollaborativeDocument/CollaborativeDocumentExtension.d.ts +0 -37
  180. package/dist/types/src/components/Extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.d.ts +0 -116
  181. package/dist/types/src/components/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardConfiguration.d.ts +0 -35
  182. package/dist/types/src/components/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardConstants.d.ts +0 -13
  183. package/dist/types/src/components/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.d.ts +0 -29
  184. package/dist/types/src/components/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.d.ts +0 -94
  185. package/dist/types/src/components/Extensions/ExtensionsDataSource.d.ts +0 -29
  186. package/dist/types/src/components/Extensions/ExtensionsId.d.ts +0 -22
  187. package/dist/types/src/components/Extensions/LinkPreview/LinkPreview.d.ts +0 -37
  188. package/dist/types/src/components/Extensions/LinkPreview/LinkPreviewConstants.d.ts +0 -11
  189. package/dist/types/src/components/Extensions/LinkPreview/LinkPreviewExtension.d.ts +0 -24
  190. package/dist/types/src/components/Extensions/LinkPreview/LinkPreviewExtensionDecorator.d.ts +0 -60
  191. package/dist/types/src/components/Extensions/MessageTranslation/MessageTranslationBubble.d.ts +0 -35
  192. package/dist/types/src/components/Extensions/MessageTranslation/MessageTranslationConstants.d.ts +0 -12
  193. package/dist/types/src/components/Extensions/MessageTranslation/MessageTranslationExtension.d.ts +0 -30
  194. package/dist/types/src/components/Extensions/MessageTranslation/MessageTranslationExtensionDecorator.d.ts +0 -53
  195. package/dist/types/src/components/Extensions/Polls/CreatePolls.d.ts +0 -66
  196. package/dist/types/src/components/Extensions/Polls/PollsBubble.d.ts +0 -35
  197. package/dist/types/src/components/Extensions/Polls/PollsConfiguration.d.ts +0 -19
  198. package/dist/types/src/components/Extensions/Polls/PollsConstants.d.ts +0 -8
  199. package/dist/types/src/components/Extensions/Polls/PollsExtension.d.ts +0 -8
  200. package/dist/types/src/components/Extensions/Polls/PollsExtensionDecorator.d.ts +0 -112
  201. package/dist/types/src/components/Extensions/Stickers/StickersConstants.d.ts +0 -16
  202. package/dist/types/src/components/Extensions/Stickers/StickersExtension.d.ts +0 -31
  203. package/dist/types/src/components/Extensions/Stickers/StickersExtensionDecorator.d.ts +0 -112
  204. package/dist/types/src/components/Extensions/Stickers/StickersKeyboard.d.ts +0 -29
  205. package/dist/types/src/components/Extensions/ThumbnailGeneration/ThumbnailGenerationConstants.d.ts +0 -13
  206. package/dist/types/src/components/Extensions/ThumbnailGeneration/ThumbnailGenerationExtension.d.ts +0 -21
  207. package/dist/types/src/components/Extensions/ThumbnailGeneration/ThumbnailGenerationExtensionDecorator.d.ts +0 -40
  208. package/dist/types/src/components/Reactions/CometChatReactionInfo/CometChatReactionInfo.d.ts +0 -9
  209. package/dist/types/src/components/Reactions/CometChatReactionList/CometChatReactionList.d.ts +0 -8
  210. package/dist/types/src/components/Reactions/CometChatReactions/CometChatReactions.d.ts +0 -12
  211. package/dist/types/src/constants/CometChatUIKitConstants.d.ts +0 -139
  212. package/dist/types/src/constants/CometChatUtilityConstants.d.ts +0 -9
  213. package/dist/types/src/constants/index.d.ts +0 -1
  214. package/dist/types/src/events/CometChatCallEvents.d.ts +0 -10
  215. package/dist/types/src/events/CometChatConversationEvents.d.ts +0 -13
  216. package/dist/types/src/events/CometChatGroupEvents.d.ts +0 -63
  217. package/dist/types/src/events/CometChatMessageEvents.d.ts +0 -43
  218. package/dist/types/src/events/CometChatUIEvents.d.ts +0 -59
  219. package/dist/types/src/events/CometChatUserEvents.d.ts +0 -16
  220. package/dist/types/src/formatters/CometChatFormatters/CometChatMentionsFormatter/CometChatMentionsFormatter.d.ts +0 -210
  221. package/dist/types/src/formatters/CometChatFormatters/CometChatTextFormatter.d.ts +0 -268
  222. package/dist/types/src/formatters/CometChatFormatters/CometChatUrlsFormatter/CometChatUrlsFormatter.d.ts +0 -12
  223. package/dist/types/src/formatters/index.d.ts +0 -3
  224. package/dist/types/src/index.d.ts +0 -108
  225. package/dist/types/src/modals/CometChatActions.d.ts +0 -36
  226. package/dist/types/src/modals/CometChatActionsIcon.d.ts +0 -38
  227. package/dist/types/src/modals/CometChatActionsView.d.ts +0 -39
  228. package/dist/types/src/modals/CometChatMessageComposerAction.d.ts +0 -33
  229. package/dist/types/src/modals/CometChatMessageOption.d.ts +0 -37
  230. package/dist/types/src/modals/CometChatMessageTemplate.d.ts +0 -70
  231. package/dist/types/src/modals/CometChatOption.d.ts +0 -20
  232. package/dist/types/src/modals/index.d.ts +0 -7
  233. package/dist/types/src/resources/CometChatLocalize/cometchat-localize.d.ts +0 -5603
  234. package/dist/types/src/resources/CometChatSoundManager/CometChatSoundManager.d.ts +0 -128
  235. package/dist/types/src/resources/index.d.ts +0 -1
  236. package/dist/types/src/utils/CallingDetailsUtils.d.ts +0 -42
  237. package/dist/types/src/utils/ChatConfigurator.d.ts +0 -12
  238. package/dist/types/src/utils/ChatSdkEventInitializer.d.ts +0 -6
  239. package/dist/types/src/utils/ConversationUtils.d.ts +0 -69
  240. package/dist/types/src/utils/DataSource.d.ts +0 -55
  241. package/dist/types/src/utils/DataSourceDecorator.d.ts +0 -57
  242. package/dist/types/src/utils/GroupMemberUtils.d.ts +0 -32
  243. package/dist/types/src/utils/MessageReceiptUtils.d.ts +0 -44
  244. package/dist/types/src/utils/MessageUtils.d.ts +0 -55
  245. package/dist/types/src/utils/MessagesDataSource.d.ts +0 -110
  246. package/dist/types/src/utils/Storage.d.ts +0 -33
  247. package/dist/types/src/utils/util.d.ts +0 -26
  248. package/dist/types/utils/IcsToJson.d.ts +0 -19
  249. package/dist/types/utils/InteractiveMessageUtils.d.ts +0 -71
@@ -1,139 +0,0 @@
1
- /**
2
- * Regions are visual overlays on the waveform that can be used to mark segments of audio.
3
- * Regions can be clicked on, dragged and resized.
4
- * You can set the color and content of each region, as well as their HTML content.
5
- */
6
- import BasePlugin, { type BasePluginEvents } from '../base-plugin';
7
- import EventEmitter from '../event-emitter';
8
- export type RegionsPluginOptions = undefined;
9
- export type RegionsPluginEvents = BasePluginEvents & {
10
- /** When a region is created */
11
- 'region-created': [region: Region];
12
- /** When a region is being updated */
13
- 'region-update': [region: Region, side?: 'start' | 'end'];
14
- /** When a region is done updating */
15
- 'region-updated': [region: Region];
16
- /** When a region is removed */
17
- 'region-removed': [region: Region];
18
- /** When a region is clicked */
19
- 'region-clicked': [region: Region, e: MouseEvent];
20
- /** When a region is double-clicked */
21
- 'region-double-clicked': [region: Region, e: MouseEvent];
22
- /** When playback enters a region */
23
- 'region-in': [region: Region];
24
- /** When playback leaves a region */
25
- 'region-out': [region: Region];
26
- };
27
- export type RegionEvents = {
28
- /** Before the region is removed */
29
- remove: [];
30
- /** When the region's parameters are being updated */
31
- update: [side?: 'start' | 'end'];
32
- /** When dragging or resizing is finished */
33
- 'update-end': [];
34
- /** On play */
35
- play: [];
36
- /** On mouse click */
37
- click: [event: MouseEvent];
38
- /** Double click */
39
- dblclick: [event: MouseEvent];
40
- /** Mouse over */
41
- over: [event: MouseEvent];
42
- /** Mouse leave */
43
- leave: [event: MouseEvent];
44
- };
45
- export type RegionParams = {
46
- /** The id of the region, any string */
47
- id?: string;
48
- /** The start position of the region (in seconds) */
49
- start: number;
50
- /** The end position of the region (in seconds) */
51
- end?: number;
52
- /** Allow/dissallow dragging the region */
53
- drag?: boolean;
54
- /** Allow/dissallow resizing the region */
55
- resize?: boolean;
56
- /** The color of the region (CSS color) */
57
- color?: string;
58
- /** Content string or HTML element */
59
- content?: string | HTMLElement;
60
- /** Min length when resizing (in seconds) */
61
- minLength?: number;
62
- /** Max length when resizing (in seconds) */
63
- maxLength?: number;
64
- /** The index of the channel */
65
- channelIdx?: number;
66
- /** Allow/Disallow contenteditable property for content */
67
- contentEditable?: boolean;
68
- };
69
- declare class SingleRegion extends EventEmitter<RegionEvents> implements Region {
70
- private totalDuration;
71
- private numberOfChannels;
72
- element: HTMLElement;
73
- id: string;
74
- start: number;
75
- end: number;
76
- drag: boolean;
77
- resize: boolean;
78
- color: string;
79
- content?: HTMLElement;
80
- minLength: number;
81
- maxLength: number;
82
- channelIdx: number;
83
- contentEditable: boolean;
84
- subscriptions: (() => void)[];
85
- constructor(params: RegionParams, totalDuration: number, numberOfChannels?: number);
86
- private clampPosition;
87
- private setPart;
88
- private addResizeHandles;
89
- private removeResizeHandles;
90
- private initElement;
91
- private renderPosition;
92
- private toggleCursor;
93
- private initMouseEvents;
94
- _onUpdate(dx: number, side?: 'start' | 'end'): void;
95
- private onMove;
96
- private onResize;
97
- private onEndResizing;
98
- private onContentClick;
99
- onContentBlur(): void;
100
- _setTotalDuration(totalDuration: number): void;
101
- /** Play the region from the start */
102
- play(): void;
103
- /** Set the HTML content of the region */
104
- setContent(content: RegionParams['content']): void;
105
- /** Update the region's options */
106
- setOptions(options: Omit<RegionParams, 'minLength' | 'maxLength'>): void;
107
- /** Remove the region */
108
- remove(): void;
109
- }
110
- declare class RegionsPlugin extends BasePlugin<RegionsPluginEvents, RegionsPluginOptions> {
111
- private regions;
112
- private regionsContainer;
113
- /** Create an instance of RegionsPlugin */
114
- constructor(options?: RegionsPluginOptions);
115
- /** Create an instance of RegionsPlugin */
116
- static create(options?: RegionsPluginOptions): RegionsPlugin;
117
- /** Called by wavesurfer, don't call manually */
118
- onInit(): void;
119
- private initRegionsContainer;
120
- /** Get all created regions */
121
- getRegions(): Region[];
122
- private avoidOverlapping;
123
- private adjustScroll;
124
- private virtualAppend;
125
- private saveRegion;
126
- /** Create a region with given parameters */
127
- addRegion(options: RegionParams): Region;
128
- /**
129
- * Enable creation of regions by dragging on an empty space on the waveform.
130
- * Returns a function to disable the drag selection.
131
- */
132
- enableDragSelection(options: Omit<RegionParams, 'start' | 'end'>, threshold?: number): () => void;
133
- /** Remove all regions */
134
- clearRegions(): void;
135
- /** Destroy the plugin and clean up */
136
- destroy(): void;
137
- }
138
- export default RegionsPlugin;
139
- export type Region = SingleRegion;
@@ -1,98 +0,0 @@
1
- /**
2
- * Spectrogram plugin
3
- *
4
- * Render a spectrogram visualisation of the audio.
5
- *
6
- * @author Pavel Denisov (https://github.com/akreal)
7
- * @see https://github.com/wavesurfer-js/wavesurfer/pull/337
8
- *
9
- * @example
10
- * // ... initialising wavesurfer with the plugin
11
- * var wavesurfer = WaveSurfer.create({
12
- * // wavesurfer options ...
13
- * plugins: [
14
- * SpectrogramPlugin.create({
15
- * // plugin options ...
16
- * })
17
- * ]
18
- * });
19
- */
20
- /**
21
- * Spectrogram plugin for wavesurfer.
22
- */
23
- import BasePlugin, { type BasePluginEvents } from '../base-plugin';
24
- export type SpectrogramPluginOptions = {
25
- /** Selector of element or element in which to render */
26
- container?: string | HTMLElement;
27
- /** Number of samples to fetch to FFT. Must be a power of 2. */
28
- fftSamples?: number;
29
- /** Height of the spectrogram view in CSS pixels */
30
- height?: number;
31
- /** Set to true to display frequency labels. */
32
- labels?: boolean;
33
- labelsBackground?: string;
34
- labelsColor?: string;
35
- labelsHzColor?: string;
36
- /** Size of the overlapping window. Must be < fftSamples. Auto deduced from canvas size by default. */
37
- noverlap?: number;
38
- /** The window function to be used. */
39
- windowFunc?: 'bartlett' | 'bartlettHann' | 'blackman' | 'cosine' | 'gauss' | 'hamming' | 'hann' | 'lanczoz' | 'rectangular' | 'triangular';
40
- /** Some window functions have this extra value. (Between 0 and 1) */
41
- alpha?: number;
42
- /** Min frequency to scale spectrogram. */
43
- frequencyMin?: number;
44
- /** Max frequency to scale spectrogram. Set this to samplerate/2 to draw whole range of spectrogram. */
45
- frequencyMax?: number;
46
- /**
47
- * Based on: https://manual.audacityteam.org/man/spectrogram_settings.html
48
- * - Linear: Linear The linear vertical scale goes linearly from 0 kHz to 20 kHz frequency by default.
49
- * - Mel: The name Mel comes from the word melody to indicate that the scale is based on pitch comparisons. This is the default scale.
50
- */
51
- scale?: 'linear' | 'mel';
52
- /**
53
- * Increases / decreases the brightness of the display.
54
- * For small signals where the display is mostly "blue" (dark) you can increase this value to see brighter colors and give more detail.
55
- * If the display has too much "white", decrease this value.
56
- * The default is 20dB and corresponds to a -20 dB signal at a particular frequency being displayed as "white". */
57
- gainDB?: number;
58
- /**
59
- * Affects the range of signal sizes that will be displayed as colors.
60
- * The default is 80 dB and means that you will not see anything for signals 80 dB below the value set for "Gain".
61
- */
62
- rangeDB?: number;
63
- /**
64
- * A 256 long array of 4-element arrays. Each entry should contain a float between 0 and 1 and specify r, g, b, and alpha.
65
- * Each entry should contain a float between 0 and 1 and specify r, g, b, and alpha.
66
- * - gray: Gray scale.
67
- * - igray: Inverted gray scale.
68
- * - roseus: From https://github.com/dofuuz/roseus/blob/main/roseus/cmap/roseus.py
69
- */
70
- colorMap?: number[][] | 'gray' | 'igray' | 'roseus';
71
- /** Render a spectrogram for each channel independently when true. */
72
- splitChannels?: boolean;
73
- };
74
- export type SpectrogramPluginEvents = BasePluginEvents & {
75
- ready: [];
76
- click: [relativeX: number];
77
- };
78
- declare class SpectrogramPlugin extends BasePlugin<SpectrogramPluginEvents, SpectrogramPluginOptions> {
79
- static create(options?: SpectrogramPluginOptions): SpectrogramPlugin;
80
- constructor(options: SpectrogramPluginOptions);
81
- onInit(): void;
82
- destroy(): void;
83
- loadFrequenciesData(url: string | URL): Promise<void>;
84
- private createWrapper;
85
- private createCanvas;
86
- private render;
87
- private drawSpectrogram;
88
- private hzToMel;
89
- private melToHz;
90
- private createMelFilterBank;
91
- private applyMelFilterBank;
92
- private getFrequencies;
93
- private freqType;
94
- private unitType;
95
- private loadLabels;
96
- private resample;
97
- }
98
- export default SpectrogramPlugin;
@@ -1,54 +0,0 @@
1
- /**
2
- * The Timeline plugin adds timestamps and notches under the waveform.
3
- */
4
- import BasePlugin, { type BasePluginEvents } from '../base-plugin';
5
- export type TimelinePluginOptions = {
6
- /** The height of the timeline in pixels, defaults to 20 */
7
- height?: number;
8
- /** HTML element or selector for a timeline container, defaults to wavesufer's container */
9
- container?: HTMLElement | string;
10
- /** Pass 'beforebegin' to insert the timeline on top of the waveform */
11
- insertPosition?: InsertPosition;
12
- /** The duration of the timeline in seconds, defaults to wavesurfer's duration */
13
- duration?: number;
14
- /** Interval between ticks in seconds */
15
- timeInterval?: number;
16
- /** Interval between numeric labels in seconds */
17
- primaryLabelInterval?: number;
18
- /** Interval between secondary numeric labels in seconds */
19
- secondaryLabelInterval?: number;
20
- /** Interval between numeric labels in timeIntervals (i.e notch count) */
21
- primaryLabelSpacing?: number;
22
- /** Interval between secondary numeric labels in timeIntervals (i.e notch count) */
23
- secondaryLabelSpacing?: number;
24
- /** Custom inline style to apply to the container */
25
- style?: Partial<CSSStyleDeclaration> | string;
26
- /** Turn the time into a suitable label for the time. */
27
- formatTimeCallback?: (seconds: number) => string;
28
- /** Opacity of the secondary labels, defaults to 0.25 */
29
- secondaryLabelOpacity?: number;
30
- };
31
- declare const defaultOptions: {
32
- height: number;
33
- formatTimeCallback: (seconds: number) => string;
34
- };
35
- export type TimelinePluginEvents = BasePluginEvents & {
36
- ready: [];
37
- };
38
- declare class TimelinePlugin extends BasePlugin<TimelinePluginEvents, TimelinePluginOptions> {
39
- private timelineWrapper;
40
- protected options: TimelinePluginOptions & typeof defaultOptions;
41
- constructor(options?: TimelinePluginOptions);
42
- static create(options?: TimelinePluginOptions): TimelinePlugin;
43
- /** Called by wavesurfer, don't call manually */
44
- onInit(): void;
45
- /** Unmount */
46
- destroy(): void;
47
- private initTimelineWrapper;
48
- private defaultTimeInterval;
49
- private defaultPrimaryLabelInterval;
50
- private defaultSecondaryLabelInterval;
51
- private virtualAppend;
52
- private initTimeline;
53
- }
54
- export default TimelinePlugin;
@@ -1,55 +0,0 @@
1
- /**
2
- * Zoom plugin
3
- *
4
- * Zoom in or out on the waveform when scrolling the mouse wheel
5
- *
6
- * @author HoodyHuo (https://github.com/HoodyHuo)
7
- * @author Chris Morbitzer (https://github.com/cmorbitzer)
8
- * @author Sam Hulick (https://github.com/ffxsam)
9
- *
10
- * @example
11
- * // ... initialising wavesurfer with the plugin
12
- * var wavesurfer = WaveSurfer.create({
13
- * // wavesurfer options ...
14
- * plugins: [
15
- * ZoomPlugin.create({
16
- * // plugin options ...
17
- * })
18
- * ]
19
- * });
20
- */
21
- import { BasePlugin, BasePluginEvents } from '../base-plugin';
22
- export type ZoomPluginOptions = {
23
- /**
24
- * The amount of zoom per wheel step, e.g. 0.5 means a 50% magnification per scroll
25
- *
26
- * @default 0.5
27
- */
28
- scale?: number;
29
- maxZoom?: number;
30
- /**
31
- * The amount the wheel or trackpad needs to be moved before zooming the waveform. Set this value to 0 to have totally
32
- * fluid zooming (this has a high CPU cost).
33
- *
34
- * @default 5
35
- */
36
- deltaThreshold?: number;
37
- };
38
- declare const defaultOptions: {
39
- scale: number;
40
- deltaThreshold: number;
41
- };
42
- export type ZoomPluginEvents = BasePluginEvents;
43
- declare class ZoomPlugin extends BasePlugin<ZoomPluginEvents, ZoomPluginOptions> {
44
- protected options: ZoomPluginOptions & typeof defaultOptions;
45
- private wrapper;
46
- private container;
47
- private accumulatedDelta;
48
- constructor(options?: ZoomPluginOptions);
49
- static create(options?: ZoomPluginOptions): ZoomPlugin;
50
- onInit(): void;
51
- private onWheel;
52
- private calculateNewZoom;
53
- destroy(): void;
54
- }
55
- export default ZoomPlugin;
@@ -1,63 +0,0 @@
1
- import EventEmitter from './event-emitter';
2
- import type { WaveSurferOptions } from './wavesurfer';
3
- type RendererEvents = {
4
- click: [relativeX: number, relativeY: number];
5
- dblclick: [relativeX: number, relativeY: number];
6
- drag: [relativeX: number];
7
- dragstart: [relativeX: number];
8
- dragend: [relativeX: number];
9
- scroll: [relativeStart: number, relativeEnd: number, scrollLeft: number, scrollRight: number];
10
- render: [];
11
- rendered: [];
12
- };
13
- declare class Renderer extends EventEmitter<RendererEvents> {
14
- private static MAX_CANVAS_WIDTH;
15
- private static MAX_NODES;
16
- private options;
17
- private parent;
18
- private container;
19
- private scrollContainer;
20
- private wrapper;
21
- private canvasWrapper;
22
- private progressWrapper;
23
- private cursor;
24
- private timeouts;
25
- private isScrollable;
26
- private audioData;
27
- private resizeObserver;
28
- private lastContainerWidth;
29
- private isDragging;
30
- private subscriptions;
31
- private unsubscribeOnScroll?;
32
- constructor(options: WaveSurferOptions, audioElement?: HTMLElement);
33
- private parentFromOptionsContainer;
34
- private initEvents;
35
- private onContainerResize;
36
- private initDrag;
37
- private getHeight;
38
- private initHtml;
39
- /** Wavesurfer itself calls this method. Do not call it manually. */
40
- setOptions(options: WaveSurferOptions): void;
41
- getWrapper(): HTMLElement;
42
- getWidth(): number;
43
- getScroll(): number;
44
- setScroll(pixels: number): void;
45
- setScrollPercentage(percent: number): void;
46
- destroy(): void;
47
- private createDelay;
48
- private convertColorValues;
49
- private getPixelRatio;
50
- private renderBarWaveform;
51
- private renderLineWaveform;
52
- private renderWaveform;
53
- private renderSingleCanvas;
54
- private renderMultiCanvas;
55
- private renderChannel;
56
- render(audioData: AudioBuffer): Promise<void>;
57
- reRender(): void;
58
- zoom(minPxPerSec: number): void;
59
- private scrollIntoView;
60
- renderProgress(progress: number, isPlaying?: boolean): void;
61
- exportImage(format: string, quality: number, type: 'dataURL' | 'blob'): Promise<string[] | Blob[]>;
62
- }
63
- export default Renderer;
@@ -1,11 +0,0 @@
1
- import EventEmitter from './event-emitter';
2
- type TimerEvents = {
3
- tick: [];
4
- };
5
- declare class Timer extends EventEmitter<TimerEvents> {
6
- private unsubscribe;
7
- start(): void;
8
- stop(): void;
9
- destroy(): void;
10
- }
11
- export default Timer;
@@ -1,223 +0,0 @@
1
- import BasePlugin, { type GenericPlugin } from './base-plugin';
2
- import * as dom from './dom';
3
- import Player from './player';
4
- export type WaveSurferOptions = {
5
- /** Required: an HTML element or selector where the waveform will be rendered */
6
- container: HTMLElement | string;
7
- /** The height of the waveform in pixels, or "auto" to fill the container height */
8
- height?: number | 'auto';
9
- /** The width of the waveform in pixels or any CSS value; defaults to 100% */
10
- width?: number | string;
11
- /** The color of the waveform */
12
- waveColor?: string | string[] | CanvasGradient;
13
- /** The color of the progress mask */
14
- progressColor?: string | string[] | CanvasGradient;
15
- /** The color of the playpack cursor */
16
- cursorColor?: string;
17
- /** The cursor width */
18
- cursorWidth?: number;
19
- /** If set, the waveform will be rendered with bars like this: ▁ ▂ ▇ ▃ ▅ ▂ */
20
- barWidth?: number;
21
- /** Spacing between bars in pixels */
22
- barGap?: number;
23
- /** Rounded borders for bars */
24
- barRadius?: number;
25
- /** A vertical scaling factor for the waveform */
26
- barHeight?: number;
27
- /** Vertical bar alignment */
28
- barAlign?: 'top' | 'bottom';
29
- /** Minimum pixels per second of audio (i.e. the zoom level) */
30
- minPxPerSec?: number;
31
- /** Stretch the waveform to fill the container, true by default */
32
- fillParent?: boolean;
33
- /** Audio URL */
34
- url?: string;
35
- /** Pre-computed audio data, arrays of floats for each channel */
36
- peaks?: Array<Float32Array | number[]>;
37
- /** Pre-computed audio duration in seconds */
38
- duration?: number;
39
- /** Use an existing media element instead of creating one */
40
- media?: HTMLMediaElement;
41
- /** Whether to show default audio element controls */
42
- mediaControls?: boolean;
43
- /** Play the audio on load */
44
- autoplay?: boolean;
45
- /** Pass false to disable clicks on the waveform */
46
- interact?: boolean;
47
- /** Allow to drag the cursor to seek to a new position. If an object with `debounceTime` is provided instead
48
- * then `dragToSeek` will also be true. If `true` the default is 200ms
49
- */
50
- dragToSeek?: boolean | {
51
- debounceTime: number;
52
- };
53
- /** Hide the scrollbar */
54
- hideScrollbar?: boolean;
55
- /** Audio rate, i.e. the playback speed */
56
- audioRate?: number;
57
- /** Automatically scroll the container to keep the current position in viewport */
58
- autoScroll?: boolean;
59
- /** If autoScroll is enabled, keep the cursor in the center of the waveform during playback */
60
- autoCenter?: boolean;
61
- /** Decoding sample rate. Doesn't affect the playback. Defaults to 8000 */
62
- sampleRate?: number;
63
- /** Render each audio channel as a separate waveform */
64
- splitChannels?: Array<Partial<WaveSurferOptions> & {
65
- overlay?: boolean;
66
- }>;
67
- /** Stretch the waveform to the full height */
68
- normalize?: boolean;
69
- /** The list of plugins to initialize on start */
70
- plugins?: GenericPlugin[];
71
- /** Custom render function */
72
- renderFunction?: (peaks: Array<Float32Array | number[]>, ctx: CanvasRenderingContext2D) => void;
73
- /** Options to pass to the fetch method */
74
- fetchParams?: RequestInit;
75
- /** Playback "backend" to use, defaults to MediaElement */
76
- backend?: 'WebAudio' | 'MediaElement';
77
- /** Nonce for CSP if necessary */
78
- cspNonce?: string;
79
- };
80
- declare const defaultOptions: {
81
- waveColor: string;
82
- progressColor: string;
83
- cursorWidth: number;
84
- minPxPerSec: number;
85
- fillParent: boolean;
86
- interact: boolean;
87
- dragToSeek: boolean;
88
- autoScroll: boolean;
89
- autoCenter: boolean;
90
- sampleRate: number;
91
- };
92
- export type WaveSurferEvents = {
93
- /** After wavesurfer is created */
94
- init: [];
95
- /** When audio starts loading */
96
- load: [url: string];
97
- /** During audio loading */
98
- loading: [percent: number];
99
- /** When the audio has been decoded */
100
- decode: [duration: number];
101
- /** When the audio is both decoded and can play */
102
- ready: [duration: number];
103
- /** When visible waveform is drawn */
104
- redraw: [];
105
- /** When all audio channel chunks of the waveform have drawn */
106
- redrawcomplete: [];
107
- /** When the audio starts playing */
108
- play: [];
109
- /** When the audio pauses */
110
- pause: [];
111
- /** When the audio finishes playing */
112
- finish: [];
113
- /** On audio position change, fires continuously during playback */
114
- timeupdate: [currentTime: number];
115
- /** An alias of timeupdate but only when the audio is playing */
116
- audioprocess: [currentTime: number];
117
- /** When the user seeks to a new position */
118
- seeking: [currentTime: number];
119
- /** When the user interacts with the waveform (i.g. clicks or drags on it) */
120
- interaction: [newTime: number];
121
- /** When the user clicks on the waveform */
122
- click: [relativeX: number, relativeY: number];
123
- /** When the user double-clicks on the waveform */
124
- dblclick: [relativeX: number, relativeY: number];
125
- /** When the user drags the cursor */
126
- drag: [relativeX: number];
127
- /** When the user starts dragging the cursor */
128
- dragstart: [relativeX: number];
129
- /** When the user ends dragging the cursor */
130
- dragend: [relativeX: number];
131
- /** When the waveform is scrolled (panned) */
132
- scroll: [visibleStartTime: number, visibleEndTime: number, scrollLeft: number, scrollRight: number];
133
- /** When the zoom level changes */
134
- zoom: [minPxPerSec: number];
135
- /** Just before the waveform is destroyed so you can clean up your events */
136
- destroy: [];
137
- /** When source file is unable to be fetched, decoded, or an error is thrown by media element */
138
- error: [error: Error];
139
- };
140
- declare class WaveSurfer extends Player<WaveSurferEvents> {
141
- options: WaveSurferOptions & typeof defaultOptions;
142
- private renderer;
143
- private timer;
144
- private plugins;
145
- private decodedData;
146
- protected subscriptions: Array<() => void>;
147
- protected mediaSubscriptions: Array<() => void>;
148
- protected abortController: AbortController | null;
149
- static readonly BasePlugin: typeof BasePlugin;
150
- static readonly dom: typeof dom;
151
- /** Create a new WaveSurfer instance */
152
- static create(options: WaveSurferOptions): WaveSurfer;
153
- /** Create a new WaveSurfer instance */
154
- constructor(options: WaveSurferOptions);
155
- private updateProgress;
156
- private initTimerEvents;
157
- private initPlayerEvents;
158
- private initRendererEvents;
159
- private initPlugins;
160
- private unsubscribePlayerEvents;
161
- /** Set new wavesurfer options and re-render it */
162
- setOptions(options: Partial<WaveSurferOptions>): void;
163
- /** Register a wavesurfer plugin */
164
- registerPlugin<T extends GenericPlugin>(plugin: T): T;
165
- /** For plugins only: get the waveform wrapper div */
166
- getWrapper(): HTMLElement;
167
- /** For plugins only: get the scroll container client width */
168
- getWidth(): number;
169
- /** Get the current scroll position in pixels */
170
- getScroll(): number;
171
- /** Set the current scroll position in pixels */
172
- setScroll(pixels: number): void;
173
- /** Move the start of the viewing window to a specific time in the audio (in seconds) */
174
- setScrollTime(time: number): void;
175
- /** Get all registered plugins */
176
- getActivePlugins(): GenericPlugin[];
177
- private loadAudio;
178
- /** Load an audio file by URL, with optional pre-decoded audio data */
179
- load(url: string, channelData?: WaveSurferOptions['peaks'], duration?: number): Promise<void>;
180
- /** Load an audio blob */
181
- loadBlob(blob: Blob, channelData?: WaveSurferOptions['peaks'], duration?: number): Promise<void>;
182
- /** Zoom the waveform by a given pixels-per-second factor */
183
- zoom(minPxPerSec: number): void;
184
- /** Get the decoded audio data */
185
- getDecodedData(): AudioBuffer | null;
186
- /** Get decoded peaks */
187
- exportPeaks({ channels, maxLength, precision }?: {
188
- channels?: number | undefined;
189
- maxLength?: number | undefined;
190
- precision?: number | undefined;
191
- }): Array<number[]>;
192
- /** Get the duration of the audio in seconds */
193
- getDuration(): number;
194
- /** Toggle if the waveform should react to clicks */
195
- toggleInteraction(isInteractive: boolean): void;
196
- /** Jump to a specific time in the audio (in seconds) */
197
- setTime(time: number): void;
198
- /** Seek to a percentage of audio as [0..1] (0 = beginning, 1 = end) */
199
- seekTo(progress: number): void;
200
- /** Play or pause the audio */
201
- playPause(): Promise<void>;
202
- /** Stop the audio and go to the beginning */
203
- stop(): void;
204
- /** Skip N or -N seconds from the current position */
205
- skip(seconds: number): void;
206
- /** Empty the waveform */
207
- empty(): void;
208
- /** Set HTML media element */
209
- setMediaElement(element: HTMLMediaElement): void;
210
- /**
211
- * Export the waveform image as a data-URI or a blob.
212
- *
213
- * @param format The format of the exported image, can be `image/png`, `image/jpeg`, `image/webp` or any other format supported by the browser.
214
- * @param quality The quality of the exported image, for `image/jpeg` or `image/webp`. Must be between 0 and 1.
215
- * @param type The type of the exported image, can be `dataURL` (default) or `blob`.
216
- * @returns A promise that resolves with an array of data-URLs or blobs, one for each canvas element.
217
- */
218
- exportImage(format: string, quality: number, type: 'dataURL'): Promise<string[]>;
219
- exportImage(format: string, quality: number, type: 'blob'): Promise<Blob[]>;
220
- /** Unmount wavesurfer */
221
- destroy(): void;
222
- }
223
- export default WaveSurfer;