@cloudflare/realtimekit-ui 1.1.0-staging.1 → 1.1.0-staging.11

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 (733) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/cjs/{TextMessage-7bb3e1fd.js → TextMessage-75b55b60.js} +1 -1
  3. package/dist/cjs/{chat-717e517d.js → chat-90670f84.js} +1 -16
  4. package/dist/cjs/{config-8c9ac89a.js → config-60d594e2.js} +2 -2
  5. package/dist/cjs/{debounce-a3e0d9e7.js → debounce-677e65cb.js} +1 -1
  6. package/dist/cjs/index-05554ce6.js +6 -22
  7. package/dist/cjs/{index-8d07e125.js → index-5442bdba.js} +1 -1
  8. package/dist/cjs/index.cjs.js +6 -5
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{merge-73e2770b.js → merge-7ce7986a.js} +1 -1
  11. package/dist/cjs/{notification-567fe887.js → notification-b9d42aa0.js} +1 -1
  12. package/dist/cjs/realtimekit-ui.cjs.js +1 -1
  13. package/dist/cjs/rtk-ai-toggle.cjs.entry.js +2 -2
  14. package/dist/cjs/rtk-ai-transcriptions.cjs.entry.js +3 -3
  15. package/dist/cjs/rtk-ai.cjs.entry.js +2 -2
  16. package/dist/cjs/rtk-audio-grid.cjs.entry.js +3 -3
  17. package/dist/cjs/rtk-audio-tile.cjs.entry.js +2 -2
  18. package/dist/cjs/rtk-audio-visualizer_4.cjs.entry.js +3 -3
  19. package/dist/cjs/{rtk-avatar_24.cjs.entry.js → rtk-avatar_23.cjs.entry.js} +432 -599
  20. package/dist/cjs/rtk-breakout-room-manager_3.cjs.entry.js +6 -6
  21. package/dist/cjs/rtk-breakout-rooms-manager_9.cjs.entry.js +11 -11
  22. package/dist/cjs/rtk-breakout-rooms-toggle.cjs.entry.js +2 -2
  23. package/dist/cjs/rtk-camera-selector_2.cjs.entry.js +2 -2
  24. package/dist/cjs/rtk-camera-toggle.cjs.entry.js +2 -2
  25. package/dist/cjs/rtk-caption-toggle.cjs.entry.js +2 -2
  26. package/dist/cjs/rtk-chat-composer-ui.cjs.entry.js +10 -24
  27. package/dist/cjs/rtk-chat-message.cjs.entry.js +4 -4
  28. package/dist/cjs/rtk-chat-messages-ui.cjs.entry.js +5 -5
  29. package/dist/cjs/rtk-chat-search-results.cjs.entry.js +3 -3
  30. package/dist/cjs/rtk-chat-selector-ui.cjs.entry.js +3 -3
  31. package/dist/cjs/rtk-chat-toggle.cjs.entry.js +30 -25
  32. package/dist/cjs/rtk-clock.cjs.entry.js +5 -5
  33. package/dist/cjs/rtk-controlbar-button.cjs.entry.js +3 -3
  34. package/dist/cjs/rtk-controlbar.cjs.entry.js +3 -3
  35. package/dist/cjs/rtk-debugger-audio_4.cjs.entry.js +2 -2
  36. package/dist/cjs/rtk-debugger-toggle.cjs.entry.js +3 -3
  37. package/dist/cjs/rtk-dialog-manager.cjs.entry.js +2 -2
  38. package/dist/cjs/rtk-dialog.cjs.entry.js +2 -2
  39. package/dist/cjs/rtk-ended-screen.cjs.entry.js +2 -2
  40. package/dist/cjs/rtk-file-dropzone.cjs.entry.js +3 -3
  41. package/dist/cjs/rtk-file-message_3.cjs.entry.js +12 -12
  42. package/dist/cjs/rtk-fullscreen-toggle.cjs.entry.js +2 -2
  43. package/dist/cjs/rtk-grid-pagination.cjs.entry.js +2 -2
  44. package/dist/cjs/rtk-grid.cjs.entry.js +2 -2
  45. package/dist/cjs/rtk-header.cjs.entry.js +3 -3
  46. package/dist/cjs/rtk-idle-screen.cjs.entry.js +3 -3
  47. package/dist/cjs/rtk-image-viewer.cjs.entry.js +3 -3
  48. package/dist/cjs/rtk-information-tooltip.cjs.entry.js +3 -3
  49. package/dist/cjs/rtk-leave-button.cjs.entry.js +3 -3
  50. package/dist/cjs/rtk-livestream-indicator_3.cjs.entry.js +2 -2
  51. package/dist/cjs/rtk-livestream-toggle.cjs.entry.js +2 -2
  52. package/dist/cjs/rtk-logo.cjs.entry.js +2 -2
  53. package/dist/cjs/rtk-meeting-title.cjs.entry.js +2 -2
  54. package/dist/cjs/rtk-message-list-view.cjs.entry.js +6 -6
  55. package/dist/cjs/rtk-mic-toggle.cjs.entry.js +2 -2
  56. package/dist/cjs/rtk-mixed-grid.cjs.entry.js +2 -2
  57. package/dist/cjs/rtk-more-toggle.cjs.entry.js +4 -4
  58. package/dist/cjs/rtk-mute-all-button.cjs.entry.js +2 -2
  59. package/dist/cjs/rtk-name-tag.cjs.entry.js +3 -3
  60. package/dist/cjs/rtk-network-indicator.cjs.entry.js +2 -2
  61. package/dist/cjs/rtk-notification.cjs.entry.js +6 -6
  62. package/dist/cjs/rtk-notifications.cjs.entry.js +8 -5
  63. package/dist/cjs/rtk-participant-count.cjs.entry.js +2 -2
  64. package/dist/cjs/rtk-participant-setup.cjs.entry.js +4 -4
  65. package/dist/cjs/rtk-participant_2.cjs.entry.js +17 -17
  66. package/dist/cjs/rtk-participants-audio.cjs.entry.js +3 -3
  67. package/dist/cjs/rtk-participants-stage-list_4.cjs.entry.js +3 -3
  68. package/dist/cjs/rtk-participants-toggle.cjs.entry.js +3 -3
  69. package/dist/cjs/rtk-participants.cjs.entry.js +3 -3
  70. package/dist/cjs/rtk-pip-toggle.cjs.entry.js +2 -2
  71. package/dist/cjs/rtk-plugin-main_2.cjs.entry.js +3 -3
  72. package/dist/cjs/rtk-plugins-toggle.cjs.entry.js +3 -3
  73. package/dist/cjs/rtk-plugins_2.cjs.entry.js +6 -6
  74. package/dist/cjs/rtk-poll_2.cjs.entry.js +5 -5
  75. package/dist/cjs/rtk-polls-toggle.cjs.entry.js +3 -3
  76. package/dist/cjs/rtk-recording-indicator.cjs.entry.js +3 -3
  77. package/dist/cjs/rtk-recording-toggle.cjs.entry.js +2 -2
  78. package/dist/cjs/rtk-screen-share-toggle.cjs.entry.js +2 -2
  79. package/dist/cjs/rtk-screenshare-view.cjs.entry.js +7 -7
  80. package/dist/cjs/rtk-settings-audio_2.cjs.entry.js +2 -2
  81. package/dist/cjs/rtk-settings-toggle.cjs.entry.js +3 -3
  82. package/dist/cjs/rtk-settings.cjs.entry.js +2 -2
  83. package/dist/cjs/rtk-setup-screen.cjs.entry.js +2 -2
  84. package/dist/cjs/rtk-sidebar-ui.cjs.entry.js +4 -4
  85. package/dist/cjs/rtk-sidebar.cjs.entry.js +3 -3
  86. package/dist/cjs/rtk-simple-grid.cjs.entry.js +2 -2
  87. package/dist/cjs/rtk-spotlight-grid.cjs.entry.js +4 -4
  88. package/dist/cjs/rtk-spotlight-indicator.cjs.entry.js +2 -2
  89. package/dist/cjs/rtk-stage-toggle.cjs.entry.js +2 -2
  90. package/dist/cjs/rtk-stage.cjs.entry.js +3 -3
  91. package/dist/cjs/rtk-transcript.cjs.entry.js +3 -3
  92. package/dist/cjs/rtk-transcripts.cjs.entry.js +2 -2
  93. package/dist/cjs/rtk-ui-provider.cjs.entry.js +13 -3
  94. package/dist/cjs/rtk-waiting-screen.cjs.entry.js +3 -3
  95. package/dist/cjs/{sidebar-2ad915b1.js → sidebar-e172c4ae.js} +1 -1
  96. package/dist/cjs/{ui-store-1cb28da8.js → ui-store-594688bf.js} +12 -9
  97. package/dist/collection/collection-manifest.json +0 -5
  98. package/dist/collection/components/rtk-ai/rtk-ai.js +2 -2
  99. package/dist/collection/components/rtk-ai-toggle/rtk-ai-toggle.js +2 -2
  100. package/dist/collection/components/rtk-ai-transcriptions/rtk-ai-transcriptions.js +2 -2
  101. package/dist/collection/components/rtk-audio-grid/rtk-audio-grid.js +3 -3
  102. package/dist/collection/components/rtk-audio-tile/rtk-audio-tile.js +2 -2
  103. package/dist/collection/components/rtk-audio-visualizer/rtk-audio-visualizer.js +2 -2
  104. package/dist/collection/components/rtk-avatar/rtk-avatar.js +3 -3
  105. package/dist/collection/components/rtk-breakout-room-manager/rtk-breakout-room-manager.js +2 -2
  106. package/dist/collection/components/rtk-breakout-room-participants/rtk-breakout-room-participants.js +4 -4
  107. package/dist/collection/components/rtk-breakout-room-toggle/rtk-breakout-rooms-toggle.js +3 -3
  108. package/dist/collection/components/rtk-breakout-rooms-manager/rtk-breakout-rooms-manager.js +3 -3
  109. package/dist/collection/components/rtk-broadcast-message-modal/rtk-broadcast-message-modal.js +4 -4
  110. package/dist/collection/components/rtk-camera-selector/rtk-camera-selector.js +2 -2
  111. package/dist/collection/components/rtk-camera-toggle/rtk-camera-toggle.js +2 -2
  112. package/dist/collection/components/rtk-caption-toggle/rtk-caption-toggle.js +2 -2
  113. package/dist/collection/components/rtk-chat/rtk-chat.css +47 -45
  114. package/dist/collection/components/rtk-chat/rtk-chat.js +98 -158
  115. package/dist/collection/components/rtk-chat-composer-ui/rtk-chat-composer-ui.js +12 -48
  116. package/dist/collection/components/rtk-chat-composer-view/rtk-chat-composer-view.js +30 -17
  117. package/dist/collection/components/rtk-chat-message/rtk-chat-message.js +4 -4
  118. package/dist/collection/components/rtk-chat-messages-ui/rtk-chat-messages-ui.js +5 -5
  119. package/dist/collection/components/rtk-chat-messages-ui-paginated/rtk-chat-messages-ui-paginated.js +44 -87
  120. package/dist/collection/components/rtk-chat-search-results/rtk-chat-search-results.js +3 -3
  121. package/dist/collection/components/rtk-chat-selector-ui/rtk-chat-selector-ui.js +2 -2
  122. package/dist/collection/components/rtk-chat-toggle/rtk-chat-toggle.css +1 -1
  123. package/dist/collection/components/rtk-chat-toggle/rtk-chat-toggle.js +29 -28
  124. package/dist/collection/components/rtk-clock/rtk-clock.js +4 -4
  125. package/dist/collection/components/rtk-confirmation-modal/rtk-confirmation-modal.js +3 -3
  126. package/dist/collection/components/rtk-controlbar/rtk-controlbar.js +3 -3
  127. package/dist/collection/components/rtk-controlbar-button/rtk-controlbar-button.js +2 -2
  128. package/dist/collection/components/rtk-counter/rtk-counter.js +4 -4
  129. package/dist/collection/components/rtk-debugger/rtk-debugger.js +2 -2
  130. package/dist/collection/components/rtk-debugger-audio/rtk-debugger-audio.js +2 -2
  131. package/dist/collection/components/rtk-debugger-screenshare/rtk-debugger-screenshare.js +2 -2
  132. package/dist/collection/components/rtk-debugger-system/rtk-debugger-system.js +2 -2
  133. package/dist/collection/components/rtk-debugger-toggle/rtk-debugger-toggle.js +3 -3
  134. package/dist/collection/components/rtk-debugger-video/rtk-debugger-video.js +2 -2
  135. package/dist/collection/components/rtk-dialog/rtk-dialog.js +2 -2
  136. package/dist/collection/components/rtk-dialog-manager/rtk-dialog-manager.js +2 -2
  137. package/dist/collection/components/rtk-draft-attachment-view/rtk-draft-attachment-view.js +3 -3
  138. package/dist/collection/components/rtk-emoji-picker/rtk-emoji-picker.js +3 -3
  139. package/dist/collection/components/rtk-emoji-picker-button/rtk-emoji-picker-button.js +3 -3
  140. package/dist/collection/components/rtk-ended-screen/rtk-ended-screen.js +2 -2
  141. package/dist/collection/components/rtk-file-dropzone/rtk-file-dropzone.js +3 -3
  142. package/dist/collection/components/rtk-file-message/rtk-file-message.js +4 -4
  143. package/dist/collection/components/rtk-file-message-view/rtk-file-message-view.js +2 -2
  144. package/dist/collection/components/rtk-file-picker-button/rtk-file-picker-button.js +4 -4
  145. package/dist/collection/components/rtk-fullscreen-toggle/rtk-fullscreen-toggle.js +2 -2
  146. package/dist/collection/components/rtk-grid/rtk-grid.js +2 -2
  147. package/dist/collection/components/rtk-grid-pagination/rtk-grid-pagination.js +2 -2
  148. package/dist/collection/components/rtk-header/rtk-header.js +3 -3
  149. package/dist/collection/components/rtk-icon/rtk-icon.js +1 -1
  150. package/dist/collection/components/rtk-idle-screen/rtk-idle-screen.js +3 -3
  151. package/dist/collection/components/rtk-image-message/rtk-image-message.js +6 -6
  152. package/dist/collection/components/rtk-image-message-view/rtk-image-message-view.js +5 -5
  153. package/dist/collection/components/rtk-image-viewer/rtk-image-viewer.js +3 -3
  154. package/dist/collection/components/rtk-information-tooltip/rtk-information-tooltip.js +2 -2
  155. package/dist/collection/components/rtk-join-stage/rtk-join-stage.js +3 -3
  156. package/dist/collection/components/rtk-leave-button/rtk-leave-button.js +3 -3
  157. package/dist/collection/components/rtk-leave-meeting/rtk-leave-meeting.js +4 -4
  158. package/dist/collection/components/rtk-livestream-indicator/rtk-livestream-indicator.js +2 -2
  159. package/dist/collection/components/rtk-livestream-player/rtk-livestream-player.js +2 -2
  160. package/dist/collection/components/rtk-livestream-toggle/rtk-livestream-toggle.js +2 -2
  161. package/dist/collection/components/rtk-logo/rtk-logo.js +1 -1
  162. package/dist/collection/components/rtk-markdown-view/rtk-markdown-view.js +1 -1
  163. package/dist/collection/components/rtk-meeting/rtk-meeting.js +39 -2
  164. package/dist/collection/components/rtk-meeting-title/rtk-meeting-title.js +2 -2
  165. package/dist/collection/components/rtk-menu/rtk-menu.js +4 -4
  166. package/dist/collection/components/rtk-menu-item/rtk-menu-item.css +6 -1
  167. package/dist/collection/components/rtk-menu-item/rtk-menu-item.js +25 -3
  168. package/dist/collection/components/rtk-menu-list/rtk-menu-list.css +15 -4
  169. package/dist/collection/components/rtk-menu-list/rtk-menu-list.js +25 -3
  170. package/dist/collection/components/rtk-message-list-view/rtk-message-list-view.js +4 -4
  171. package/dist/collection/components/rtk-message-view/rtk-message-view.css +30 -22
  172. package/dist/collection/components/rtk-message-view/rtk-message-view.js +73 -3
  173. package/dist/collection/components/rtk-mic-toggle/rtk-mic-toggle.js +2 -2
  174. package/dist/collection/components/rtk-microphone-selector/rtk-microphone-selector.js +2 -2
  175. package/dist/collection/components/rtk-mixed-grid/rtk-mixed-grid.js +2 -2
  176. package/dist/collection/components/rtk-more-toggle/rtk-more-toggle.js +4 -4
  177. package/dist/collection/components/rtk-mute-all-button/rtk-mute-all-button.js +2 -2
  178. package/dist/collection/components/rtk-mute-all-confirmation/rtk-mute-all-confirmation.js +3 -3
  179. package/dist/collection/components/rtk-name-tag/rtk-name-tag.js +3 -3
  180. package/dist/collection/components/rtk-network-indicator/rtk-network-indicator.js +2 -2
  181. package/dist/collection/components/rtk-notification/rtk-notification.js +4 -4
  182. package/dist/collection/components/rtk-notifications/rtk-notifications.js +6 -3
  183. package/dist/collection/components/rtk-overlay-modal/rtk-overlay-modal.js +3 -3
  184. package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.css +5 -5
  185. package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.js +329 -266
  186. package/dist/collection/components/rtk-participant/rtk-participant.js +14 -14
  187. package/dist/collection/components/rtk-participant-count/rtk-participant-count.js +2 -2
  188. package/dist/collection/components/rtk-participant-setup/rtk-participant-setup.js +4 -4
  189. package/dist/collection/components/rtk-participant-tile/rtk-participant-tile.js +2 -2
  190. package/dist/collection/components/rtk-participants/rtk-participants.js +2 -2
  191. package/dist/collection/components/rtk-participants-audio/rtk-participants-audio.js +3 -3
  192. package/dist/collection/components/rtk-participants-stage-list/rtk-participants-stage-list.js +3 -3
  193. package/dist/collection/components/rtk-participants-stage-queue/rtk-participants-stage-queue.js +2 -2
  194. package/dist/collection/components/rtk-participants-toggle/rtk-participants-toggle.js +2 -2
  195. package/dist/collection/components/rtk-participants-viewer-list/rtk-participants-viewer-list.js +2 -2
  196. package/dist/collection/components/rtk-participants-waiting-list/rtk-participants-waiting-list.js +2 -2
  197. package/dist/collection/components/rtk-permissions-message/rtk-permissions-message.js +3 -3
  198. package/dist/collection/components/rtk-pip-toggle/rtk-pip-toggle.js +2 -2
  199. package/dist/collection/components/rtk-plugin-main/rtk-plugin-main.js +2 -2
  200. package/dist/collection/components/rtk-plugins/rtk-plugins.js +3 -3
  201. package/dist/collection/components/rtk-plugins-toggle/rtk-plugins-toggle.js +2 -2
  202. package/dist/collection/components/rtk-poll/rtk-poll.js +3 -3
  203. package/dist/collection/components/rtk-poll-form/rtk-poll-form.js +4 -4
  204. package/dist/collection/components/rtk-polls/rtk-polls.js +5 -5
  205. package/dist/collection/components/rtk-polls-toggle/rtk-polls-toggle.js +2 -2
  206. package/dist/collection/components/rtk-recording-indicator/rtk-recording-indicator.js +3 -3
  207. package/dist/collection/components/rtk-recording-toggle/rtk-recording-toggle.js +2 -2
  208. package/dist/collection/components/rtk-screen-share-toggle/rtk-screen-share-toggle.js +2 -2
  209. package/dist/collection/components/rtk-screenshare-view/rtk-screenshare-view.js +7 -7
  210. package/dist/collection/components/rtk-settings/rtk-settings.js +2 -2
  211. package/dist/collection/components/rtk-settings-audio/rtk-settings-audio.js +2 -2
  212. package/dist/collection/components/rtk-settings-toggle/rtk-settings-toggle.js +3 -3
  213. package/dist/collection/components/rtk-settings-video/rtk-settings-video.js +2 -2
  214. package/dist/collection/components/rtk-setup-screen/rtk-setup-screen.js +2 -2
  215. package/dist/collection/components/rtk-sidebar/rtk-sidebar.js +2 -2
  216. package/dist/collection/components/rtk-sidebar-ui/rtk-sidebar-ui.js +5 -5
  217. package/dist/collection/components/rtk-simple-grid/rtk-simple-grid.js +2 -2
  218. package/dist/collection/components/rtk-speaker-selector/rtk-speaker-selector.js +2 -2
  219. package/dist/collection/components/rtk-spinner/rtk-spinner.js +2 -2
  220. package/dist/collection/components/rtk-spotlight-grid/rtk-spotlight-grid.js +4 -4
  221. package/dist/collection/components/rtk-spotlight-indicator/rtk-spotlight-indicator.js +2 -2
  222. package/dist/collection/components/rtk-stage/rtk-stage.js +3 -3
  223. package/dist/collection/components/rtk-stage-toggle/rtk-stage-toggle.js +2 -2
  224. package/dist/collection/components/rtk-switch/rtk-switch.js +3 -3
  225. package/dist/collection/components/rtk-tab-bar/rtk-tab-bar.js +3 -3
  226. package/dist/collection/components/rtk-text-composer-view/rtk-text-composer-view.js +3 -3
  227. package/dist/collection/components/rtk-text-message/rtk-text-message.js +4 -4
  228. package/dist/collection/components/rtk-text-message-view/rtk-text-message-view.js +1 -1
  229. package/dist/collection/components/rtk-tooltip/rtk-tooltip.js +1 -1
  230. package/dist/collection/components/rtk-transcript/rtk-transcript.js +2 -2
  231. package/dist/collection/components/rtk-transcripts/rtk-transcripts.js +1 -1
  232. package/dist/collection/components/rtk-ui-provider/rtk-ui-provider.js +39 -3
  233. package/dist/collection/components/rtk-viewer-count/rtk-viewer-count.js +2 -2
  234. package/dist/collection/components/rtk-virtualized-list/rtk-virtualized-participant-list.js +2 -2
  235. package/dist/collection/components/rtk-waiting-screen/rtk-waiting-screen.js +3 -3
  236. package/dist/collection/exports.js +2 -1
  237. package/dist/collection/lib/icons/default-icon-pack.js +0 -2
  238. package/dist/collection/lib/lang/default-language.js +1 -4
  239. package/dist/collection/lib/overrides.js +6 -0
  240. package/dist/collection/utils/chat.js +0 -4
  241. package/dist/collection/utils/flags.js +0 -2
  242. package/dist/collection/utils/sync-with-store/ui-store.js +4 -1
  243. package/dist/components/index.js +7 -7
  244. package/dist/components/{p-8d25843a.js → p-0899c09f.js} +3 -3
  245. package/dist/components/{p-0a35a909.js → p-19d83dd6.js} +4 -4
  246. package/dist/components/{p-6f340109.js → p-1c5cc842.js} +1 -1
  247. package/dist/components/{p-5c92df32.js → p-1c678eab.js} +6 -6
  248. package/dist/components/{p-dbfc9151.js → p-1e9999d7.js} +4 -4
  249. package/dist/components/{p-65cd2fe3.js → p-1ea0d406.js} +5 -5
  250. package/dist/components/{p-6c2cfa0d.js → p-206acdcd.js} +5 -5
  251. package/dist/components/{p-fd68a52b.js → p-21becaf3.js} +9 -9
  252. package/dist/components/{p-4d582a90.js → p-23d37f65.js} +6 -6
  253. package/dist/components/{p-3da4880c.js → p-24481cb4.js} +5 -5
  254. package/dist/components/{p-d3de8b85.js → p-2ec120cd.js} +4 -4
  255. package/dist/components/{p-20290b0b.js → p-3245ace2.js} +5 -5
  256. package/dist/components/p-33db910f.js +409 -0
  257. package/dist/components/{p-188bfe87.js → p-34654ffc.js} +9 -9
  258. package/dist/components/{p-d107e9f4.js → p-410cef02.js} +4 -4
  259. package/dist/components/{p-afe77b50.js → p-4c82be72.js} +3 -3
  260. package/dist/components/{p-b011763d.js → p-5194f4d6.js} +4 -4
  261. package/dist/components/{p-f7430e46.js → p-51ef5a21.js} +6 -6
  262. package/dist/components/{p-0b4e526c.js → p-52e95364.js} +4 -4
  263. package/dist/components/{p-10ef077c.js → p-541e6de7.js} +3 -3
  264. package/dist/components/{p-aae4c250.js → p-56134994.js} +1 -1
  265. package/dist/components/{p-395d7140.js → p-565c8389.js} +5 -5
  266. package/dist/components/{p-33a87325.js → p-5791a91d.js} +3 -3
  267. package/dist/components/{p-fa8f6b4a.js → p-63c79efa.js} +1 -1
  268. package/dist/components/{p-121e073d.js → p-63e06c50.js} +2 -2
  269. package/dist/components/{p-b34865c7.js → p-63e51be4.js} +5 -5
  270. package/dist/components/{p-2f82e0b0.js → p-645b761e.js} +8 -8
  271. package/dist/components/{p-914563e7.js → p-6614c9e7.js} +6 -6
  272. package/dist/components/{p-9e87b2c9.js → p-66ba4031.js} +2 -2
  273. package/dist/components/{p-488d88a8.js → p-66d10db2.js} +5 -5
  274. package/dist/components/{p-5f26bba3.js → p-6e10fc42.js} +2 -2
  275. package/dist/components/{p-0d7bf41b.js → p-71f12515.js} +4 -4
  276. package/dist/components/{p-3b29dda1.js → p-73baf5ba.js} +1 -1
  277. package/dist/components/{p-a6f2b402.js → p-770c0fd7.js} +38 -60
  278. package/dist/components/{p-e675729a.js → p-777aa628.js} +5 -5
  279. package/dist/components/{p-78b61cce.js → p-7a424d82.js} +1 -1
  280. package/dist/components/{p-2e282643.js → p-7c84212d.js} +6 -6
  281. package/dist/components/{p-a6296b02.js → p-7e6ca4af.js} +7 -4
  282. package/dist/components/{p-b882f4a1.js → p-7f790526.js} +5 -5
  283. package/dist/components/{p-88bef213.js → p-8222af8c.js} +2 -2
  284. package/dist/components/{p-0d582365.js → p-8e285a44.js} +2 -2
  285. package/dist/components/{p-c078ae06.js → p-901c2375.js} +3 -3
  286. package/dist/components/{p-cf503999.js → p-91bc86f4.js} +5 -5
  287. package/dist/components/{p-e81fc1e8.js → p-93947678.js} +3 -3
  288. package/dist/components/{p-7481511c.js → p-93db20a6.js} +3 -3
  289. package/dist/components/{p-f8f5cb31.js → p-951a67af.js} +4 -4
  290. package/dist/components/{p-f47894a6.js → p-97d1dcb7.js} +22 -28
  291. package/dist/components/{p-47c25f64.js → p-9c3c75a9.js} +1 -1
  292. package/dist/components/{p-a94b2e67.js → p-a6aea524.js} +2 -2
  293. package/dist/components/{p-51de7af3.js → p-a72d3d19.js} +1 -1
  294. package/dist/components/{p-ee98bbaf.js → p-a89ee2d2.js} +13 -13
  295. package/dist/components/{p-a4a5ff5a.js → p-a99b0889.js} +6 -6
  296. package/dist/components/{p-2f08d7eb.js → p-ac80e7fc.js} +99 -183
  297. package/dist/components/{p-dab9d3d6.js → p-addb4be5.js} +1 -12
  298. package/dist/components/{p-d06d1eac.js → p-aeba1c02.js} +3 -3
  299. package/dist/components/{p-55501201.js → p-b2904963.js} +5 -5
  300. package/dist/components/{p-bb8f2597.js → p-b37f2227.js} +7 -7
  301. package/dist/components/{p-c515acba.js → p-b4a37662.js} +3 -3
  302. package/dist/components/{p-244cbe7b.js → p-b65d1760.js} +2 -2
  303. package/dist/components/{p-563c785d.js → p-b69a05ad.js} +3 -3
  304. package/dist/components/{p-82f8c924.js → p-b92c53c7.js} +3 -3
  305. package/dist/components/{p-a29c01fc.js → p-bbffc0e1.js} +3 -3
  306. package/dist/components/{p-e6710b76.js → p-c0942317.js} +4 -4
  307. package/dist/components/{p-84e5b453.js → p-c402a1db.js} +2 -2
  308. package/dist/components/{p-190db142.js → p-c643c410.js} +8 -8
  309. package/dist/components/{p-a10b9faa.js → p-c66a52b7.js} +3 -3
  310. package/dist/components/{p-102b6df8.js → p-caaca684.js} +2 -2
  311. package/dist/components/{p-c3621e10.js → p-cd8f62c9.js} +7 -7
  312. package/dist/components/{p-f4e75ea9.js → p-cec4d080.js} +5 -5
  313. package/dist/components/{p-fe911889.js → p-d3414935.js} +20 -11
  314. package/dist/components/{p-7fc0dc2f.js → p-dc9dde66.js} +12 -10
  315. package/dist/components/{p-e8df7ac5.js → p-e09955f3.js} +19 -19
  316. package/dist/components/{p-6f272732.js → p-e583a838.js} +9 -9
  317. package/dist/components/{p-618864a0.js → p-e60aa036.js} +3 -3
  318. package/dist/components/{p-2d08ab28.js → p-efbfe5a0.js} +4 -4
  319. package/dist/components/{p-abe1dbe6.js → p-f247cacc.js} +4 -4
  320. package/dist/components/{p-63ef7ea4.js → p-f5101af9.js} +7 -7
  321. package/dist/components/{p-f7eb9c47.js → p-f5a3ee43.js} +6 -6
  322. package/dist/components/{p-e4a080a5.js → p-f7a8a2d8.js} +4 -4
  323. package/dist/components/{p-9889bee5.js → p-f8a13473.js} +5 -5
  324. package/dist/components/{p-6756b222.js → p-f95c314b.js} +3 -3
  325. package/dist/components/{p-080acf18.js → p-fe648db5.js} +7 -4
  326. package/dist/components/rtk-ai-toggle.js +5 -5
  327. package/dist/components/rtk-ai-transcriptions.js +1 -1
  328. package/dist/components/rtk-ai.js +4 -4
  329. package/dist/components/rtk-audio-grid.js +3 -3
  330. package/dist/components/rtk-audio-tile.js +6 -6
  331. package/dist/components/rtk-audio-visualizer.js +1 -1
  332. package/dist/components/rtk-avatar.js +1 -1
  333. package/dist/components/rtk-breakout-room-manager.js +1 -1
  334. package/dist/components/rtk-breakout-room-participants.js +1 -1
  335. package/dist/components/rtk-breakout-rooms-manager.js +1 -1
  336. package/dist/components/rtk-breakout-rooms-toggle.js +5 -5
  337. package/dist/components/rtk-broadcast-message-modal.js +1 -1
  338. package/dist/components/rtk-camera-selector.js +1 -1
  339. package/dist/components/rtk-camera-toggle.js +6 -6
  340. package/dist/components/rtk-caption-toggle.js +5 -5
  341. package/dist/components/rtk-chat-composer-ui.js +15 -32
  342. package/dist/components/rtk-chat-composer-view.js +1 -1
  343. package/dist/components/rtk-chat-message.js +1 -1
  344. package/dist/components/rtk-chat-messages-ui-paginated.js +1 -1
  345. package/dist/components/rtk-chat-messages-ui.js +17 -17
  346. package/dist/components/rtk-chat-search-results.js +14 -14
  347. package/dist/components/rtk-chat-selector-ui.js +4 -4
  348. package/dist/components/rtk-chat-toggle.js +34 -30
  349. package/dist/components/rtk-chat.js +1 -1
  350. package/dist/components/rtk-clock.js +6 -6
  351. package/dist/components/rtk-confirmation-modal.js +1 -1
  352. package/dist/components/rtk-controlbar-button.js +1 -1
  353. package/dist/components/rtk-controlbar.js +3 -3
  354. package/dist/components/rtk-counter.js +1 -1
  355. package/dist/components/rtk-debugger-audio.js +1 -1
  356. package/dist/components/rtk-debugger-screenshare.js +1 -1
  357. package/dist/components/rtk-debugger-system.js +1 -1
  358. package/dist/components/rtk-debugger-toggle.js +6 -6
  359. package/dist/components/rtk-debugger-video.js +1 -1
  360. package/dist/components/rtk-debugger.js +1 -1
  361. package/dist/components/rtk-dialog-manager.js +23 -23
  362. package/dist/components/rtk-dialog.js +1 -1
  363. package/dist/components/rtk-draft-attachment-view.js +1 -1
  364. package/dist/components/rtk-emoji-picker-button.js +1 -1
  365. package/dist/components/rtk-emoji-picker.js +1 -1
  366. package/dist/components/rtk-ended-screen.js +4 -4
  367. package/dist/components/rtk-file-dropzone.js +4 -4
  368. package/dist/components/rtk-file-message-view.js +1 -1
  369. package/dist/components/rtk-file-message.js +1 -1
  370. package/dist/components/rtk-file-picker-button.js +1 -1
  371. package/dist/components/rtk-fullscreen-toggle.js +1 -1
  372. package/dist/components/rtk-grid-pagination.js +4 -4
  373. package/dist/components/rtk-grid.js +9 -9
  374. package/dist/components/rtk-header.js +3 -3
  375. package/dist/components/rtk-icon.js +1 -1
  376. package/dist/components/rtk-idle-screen.js +6 -6
  377. package/dist/components/rtk-image-message-view.js +1 -1
  378. package/dist/components/rtk-image-message.js +1 -1
  379. package/dist/components/rtk-image-viewer.js +4 -4
  380. package/dist/components/rtk-information-tooltip.js +4 -4
  381. package/dist/components/rtk-join-stage.js +1 -1
  382. package/dist/components/rtk-leave-button.js +6 -6
  383. package/dist/components/rtk-leave-meeting.js +1 -1
  384. package/dist/components/rtk-livestream-indicator.js +1 -1
  385. package/dist/components/rtk-livestream-player.js +1 -1
  386. package/dist/components/rtk-livestream-toggle.js +5 -5
  387. package/dist/components/rtk-logo.js +1 -1
  388. package/dist/components/rtk-markdown-view.js +1 -1
  389. package/dist/components/rtk-meeting-title.js +3 -3
  390. package/dist/components/rtk-meeting.js +42 -36
  391. package/dist/components/rtk-menu-item.js +1 -1
  392. package/dist/components/rtk-menu-list.js +1 -1
  393. package/dist/components/rtk-menu.js +1 -1
  394. package/dist/components/rtk-message-list-view.js +7 -7
  395. package/dist/components/rtk-message-view.js +1 -1
  396. package/dist/components/rtk-mic-toggle.js +6 -6
  397. package/dist/components/rtk-microphone-selector.js +1 -1
  398. package/dist/components/rtk-mixed-grid.js +7 -7
  399. package/dist/components/rtk-more-toggle.js +7 -7
  400. package/dist/components/rtk-mute-all-button.js +6 -6
  401. package/dist/components/rtk-mute-all-confirmation.js +1 -1
  402. package/dist/components/rtk-name-tag.js +1 -1
  403. package/dist/components/rtk-network-indicator.js +3 -3
  404. package/dist/components/rtk-notification.js +1 -1
  405. package/dist/components/rtk-notifications.js +10 -7
  406. package/dist/components/rtk-overlay-modal.js +1 -1
  407. package/dist/components/rtk-paginated-list.js +1 -1
  408. package/dist/components/rtk-participant-count.js +3 -3
  409. package/dist/components/rtk-participant-setup.js +4 -4
  410. package/dist/components/rtk-participant-tile.js +1 -1
  411. package/dist/components/rtk-participant.js +1 -1
  412. package/dist/components/rtk-participants-audio.js +5 -5
  413. package/dist/components/rtk-participants-stage-list.js +1 -1
  414. package/dist/components/rtk-participants-stage-queue.js +1 -1
  415. package/dist/components/rtk-participants-toggle.js +6 -6
  416. package/dist/components/rtk-participants-viewer-list.js +1 -1
  417. package/dist/components/rtk-participants-waiting-list.js +1 -1
  418. package/dist/components/rtk-participants.js +15 -15
  419. package/dist/components/rtk-permissions-message.js +1 -1
  420. package/dist/components/rtk-pip-toggle.js +5 -5
  421. package/dist/components/rtk-plugin-main.js +1 -1
  422. package/dist/components/rtk-plugins-toggle.js +6 -6
  423. package/dist/components/rtk-plugins.js +1 -1
  424. package/dist/components/rtk-poll-form.js +1 -1
  425. package/dist/components/rtk-poll.js +1 -1
  426. package/dist/components/rtk-polls-toggle.js +6 -6
  427. package/dist/components/rtk-polls.js +1 -1
  428. package/dist/components/rtk-recording-indicator.js +4 -4
  429. package/dist/components/rtk-recording-toggle.js +5 -5
  430. package/dist/components/rtk-screen-share-toggle.js +6 -6
  431. package/dist/components/rtk-screenshare-view.js +9 -9
  432. package/dist/components/rtk-settings-audio.js +1 -1
  433. package/dist/components/rtk-settings-toggle.js +6 -6
  434. package/dist/components/rtk-settings-video.js +1 -1
  435. package/dist/components/rtk-settings.js +11 -11
  436. package/dist/components/rtk-setup-screen.js +7 -7
  437. package/dist/components/rtk-sidebar-ui.js +1 -1
  438. package/dist/components/rtk-sidebar.js +10 -10
  439. package/dist/components/rtk-simple-grid.js +2 -2
  440. package/dist/components/rtk-speaker-selector.js +1 -1
  441. package/dist/components/rtk-spinner.js +1 -1
  442. package/dist/components/rtk-spotlight-grid.js +4 -4
  443. package/dist/components/rtk-spotlight-indicator.js +1 -1
  444. package/dist/components/rtk-stage-toggle.js +6 -6
  445. package/dist/components/rtk-stage.js +3 -3
  446. package/dist/components/rtk-switch.js +1 -1
  447. package/dist/components/rtk-tab-bar.js +1 -1
  448. package/dist/components/rtk-text-composer-view.js +1 -1
  449. package/dist/components/rtk-text-message-view.js +1 -1
  450. package/dist/components/rtk-text-message.js +1 -1
  451. package/dist/components/rtk-tooltip.js +1 -1
  452. package/dist/components/rtk-transcript.js +1 -1
  453. package/dist/components/rtk-transcripts.js +3 -3
  454. package/dist/components/rtk-ui-provider.js +17 -5
  455. package/dist/components/rtk-viewer-count.js +1 -1
  456. package/dist/components/rtk-virtualized-participant-list.js +1 -1
  457. package/dist/components/rtk-waiting-screen.js +4 -4
  458. package/dist/docs/docs-components.json +1429 -12236
  459. package/dist/docs/docs-vscode.json +42 -94
  460. package/dist/esm/{TextMessage-ca92045e.js → TextMessage-0aed30b2.js} +1 -1
  461. package/dist/esm/{chat-ff185374.js → chat-a170fc58.js} +2 -13
  462. package/dist/esm/{config-e684aa4d.js → config-cea9cd37.js} +2 -2
  463. package/dist/esm/{debounce-3ea4df36.js → debounce-b7ba967e.js} +1 -1
  464. package/dist/esm/index-c1fb98bb.js +6 -22
  465. package/dist/esm/{index-e65afca5.js → index-d08145ca.js} +1 -1
  466. package/dist/esm/index.js +7 -7
  467. package/dist/esm/loader.js +1369 -1971
  468. package/dist/esm/{merge-7ffc04b3.js → merge-88832ad1.js} +1 -1
  469. package/dist/esm/{notification-78afaabf.js → notification-6fa40b68.js} +1 -1
  470. package/dist/esm/realtimekit-ui.js +1 -1
  471. package/dist/esm/rtk-ai-toggle.entry.js +2 -2
  472. package/dist/esm/rtk-ai-transcriptions.entry.js +3 -3
  473. package/dist/esm/rtk-ai.entry.js +2 -2
  474. package/dist/esm/rtk-audio-grid.entry.js +3 -3
  475. package/dist/esm/rtk-audio-tile.entry.js +2 -2
  476. package/dist/esm/rtk-audio-visualizer_4.entry.js +3 -3
  477. package/dist/esm/{rtk-avatar_24.entry.js → rtk-avatar_23.entry.js} +433 -599
  478. package/dist/esm/rtk-breakout-room-manager_3.entry.js +6 -6
  479. package/dist/esm/rtk-breakout-rooms-manager_9.entry.js +11 -11
  480. package/dist/esm/rtk-breakout-rooms-toggle.entry.js +2 -2
  481. package/dist/esm/rtk-camera-selector_2.entry.js +2 -2
  482. package/dist/esm/rtk-camera-toggle.entry.js +2 -2
  483. package/dist/esm/rtk-caption-toggle.entry.js +2 -2
  484. package/dist/esm/rtk-chat-composer-ui.entry.js +10 -24
  485. package/dist/esm/rtk-chat-message.entry.js +4 -4
  486. package/dist/esm/rtk-chat-messages-ui.entry.js +5 -5
  487. package/dist/esm/rtk-chat-search-results.entry.js +3 -3
  488. package/dist/esm/rtk-chat-selector-ui.entry.js +3 -3
  489. package/dist/esm/rtk-chat-toggle.entry.js +30 -25
  490. package/dist/esm/rtk-clock.entry.js +5 -5
  491. package/dist/esm/rtk-controlbar-button.entry.js +3 -3
  492. package/dist/esm/rtk-controlbar.entry.js +3 -3
  493. package/dist/esm/rtk-debugger-audio_4.entry.js +2 -2
  494. package/dist/esm/rtk-debugger-toggle.entry.js +3 -3
  495. package/dist/esm/rtk-dialog-manager.entry.js +2 -2
  496. package/dist/esm/rtk-dialog.entry.js +2 -2
  497. package/dist/esm/rtk-ended-screen.entry.js +2 -2
  498. package/dist/esm/rtk-file-dropzone.entry.js +3 -3
  499. package/dist/esm/rtk-file-message_3.entry.js +12 -12
  500. package/dist/esm/rtk-fullscreen-toggle.entry.js +2 -2
  501. package/dist/esm/rtk-grid-pagination.entry.js +2 -2
  502. package/dist/esm/rtk-grid.entry.js +2 -2
  503. package/dist/esm/rtk-header.entry.js +3 -3
  504. package/dist/esm/rtk-idle-screen.entry.js +3 -3
  505. package/dist/esm/rtk-image-viewer.entry.js +3 -3
  506. package/dist/esm/rtk-information-tooltip.entry.js +3 -3
  507. package/dist/esm/rtk-leave-button.entry.js +3 -3
  508. package/dist/esm/rtk-livestream-indicator_3.entry.js +2 -2
  509. package/dist/esm/rtk-livestream-toggle.entry.js +2 -2
  510. package/dist/esm/rtk-logo.entry.js +2 -2
  511. package/dist/esm/rtk-meeting-title.entry.js +2 -2
  512. package/dist/esm/rtk-message-list-view.entry.js +6 -6
  513. package/dist/esm/rtk-mic-toggle.entry.js +2 -2
  514. package/dist/esm/rtk-mixed-grid.entry.js +2 -2
  515. package/dist/esm/rtk-more-toggle.entry.js +4 -4
  516. package/dist/esm/rtk-mute-all-button.entry.js +2 -2
  517. package/dist/esm/rtk-name-tag.entry.js +3 -3
  518. package/dist/esm/rtk-network-indicator.entry.js +2 -2
  519. package/dist/esm/rtk-notification.entry.js +6 -6
  520. package/dist/esm/rtk-notifications.entry.js +8 -5
  521. package/dist/esm/rtk-participant-count.entry.js +2 -2
  522. package/dist/esm/rtk-participant-setup.entry.js +4 -4
  523. package/dist/esm/rtk-participant_2.entry.js +17 -17
  524. package/dist/esm/rtk-participants-audio.entry.js +3 -3
  525. package/dist/esm/rtk-participants-stage-list_4.entry.js +3 -3
  526. package/dist/esm/rtk-participants-toggle.entry.js +3 -3
  527. package/dist/esm/rtk-participants.entry.js +3 -3
  528. package/dist/esm/rtk-pip-toggle.entry.js +2 -2
  529. package/dist/esm/rtk-plugin-main_2.entry.js +3 -3
  530. package/dist/esm/rtk-plugins-toggle.entry.js +3 -3
  531. package/dist/esm/rtk-plugins_2.entry.js +6 -6
  532. package/dist/esm/rtk-poll_2.entry.js +5 -5
  533. package/dist/esm/rtk-polls-toggle.entry.js +3 -3
  534. package/dist/esm/rtk-recording-indicator.entry.js +3 -3
  535. package/dist/esm/rtk-recording-toggle.entry.js +2 -2
  536. package/dist/esm/rtk-screen-share-toggle.entry.js +2 -2
  537. package/dist/esm/rtk-screenshare-view.entry.js +7 -7
  538. package/dist/esm/rtk-settings-audio_2.entry.js +2 -2
  539. package/dist/esm/rtk-settings-toggle.entry.js +3 -3
  540. package/dist/esm/rtk-settings.entry.js +2 -2
  541. package/dist/esm/rtk-setup-screen.entry.js +2 -2
  542. package/dist/esm/rtk-sidebar-ui.entry.js +4 -4
  543. package/dist/esm/rtk-sidebar.entry.js +3 -3
  544. package/dist/esm/rtk-simple-grid.entry.js +2 -2
  545. package/dist/esm/rtk-spotlight-grid.entry.js +4 -4
  546. package/dist/esm/rtk-spotlight-indicator.entry.js +2 -2
  547. package/dist/esm/rtk-stage-toggle.entry.js +2 -2
  548. package/dist/esm/rtk-stage.entry.js +3 -3
  549. package/dist/esm/rtk-transcript.entry.js +3 -3
  550. package/dist/esm/rtk-transcripts.entry.js +2 -2
  551. package/dist/esm/rtk-ui-provider.entry.js +13 -3
  552. package/dist/esm/rtk-waiting-screen.entry.js +3 -3
  553. package/dist/esm/{sidebar-030fff49.js → sidebar-dd9a38aa.js} +1 -1
  554. package/dist/esm/{ui-store-9e486e1b.js → ui-store-5a66fa71.js} +12 -10
  555. package/dist/realtimekit-ui/index.esm.js +1 -1
  556. package/dist/realtimekit-ui/{p-a9dd63ef.entry.js → p-00fbc77d.entry.js} +1 -1
  557. package/dist/realtimekit-ui/p-085b70ca.entry.js +1 -0
  558. package/dist/realtimekit-ui/{p-f5aa8af7.entry.js → p-0a6840aa.entry.js} +1 -1
  559. package/dist/realtimekit-ui/p-0a9761b4.entry.js +1 -0
  560. package/dist/realtimekit-ui/{p-9c1f42dd.entry.js → p-0d173282.entry.js} +1 -1
  561. package/dist/realtimekit-ui/{p-8f512d69.entry.js → p-0d6b6c0d.entry.js} +1 -1
  562. package/dist/realtimekit-ui/{p-91fd286c.js → p-0e513482.js} +1 -1
  563. package/dist/realtimekit-ui/{p-74e1b5a6.entry.js → p-136d3fe2.entry.js} +1 -1
  564. package/dist/realtimekit-ui/{p-61d3f74f.entry.js → p-186d21ad.entry.js} +1 -1
  565. package/dist/realtimekit-ui/{p-7786e9a7.entry.js → p-194ca93a.entry.js} +1 -1
  566. package/dist/realtimekit-ui/{p-e925ca8a.entry.js → p-1b6b75a7.entry.js} +1 -1
  567. package/dist/realtimekit-ui/p-1d9ba38f.entry.js +1 -0
  568. package/dist/realtimekit-ui/p-1dbbb8cb.entry.js +1 -0
  569. package/dist/realtimekit-ui/{p-c1b81873.entry.js → p-1e8a9290.entry.js} +1 -1
  570. package/dist/realtimekit-ui/{p-80c856cd.js → p-1ff96b0f.js} +1 -1
  571. package/dist/realtimekit-ui/{p-31f58b98.entry.js → p-245c5d74.entry.js} +1 -1
  572. package/dist/realtimekit-ui/{p-ba51770e.entry.js → p-25a5687a.entry.js} +1 -1
  573. package/dist/realtimekit-ui/p-29c66766.entry.js +1 -0
  574. package/dist/realtimekit-ui/{p-77e04fb7.entry.js → p-2afa0984.entry.js} +1 -1
  575. package/dist/realtimekit-ui/{p-62e0a141.entry.js → p-2be75f31.entry.js} +1 -1
  576. package/dist/realtimekit-ui/{p-36c8dfa0.entry.js → p-2e996dd5.entry.js} +1 -1
  577. package/dist/realtimekit-ui/{p-3a325310.entry.js → p-3229431b.entry.js} +1 -1
  578. package/dist/realtimekit-ui/p-328d53bd.js +1 -0
  579. package/dist/realtimekit-ui/p-334f3f6d.entry.js +1 -0
  580. package/dist/realtimekit-ui/{p-2a0ec1c6.entry.js → p-38fb340d.entry.js} +1 -1
  581. package/dist/realtimekit-ui/{p-6a45f305.js → p-3a14da51.js} +1 -1
  582. package/dist/realtimekit-ui/p-3a309e80.entry.js +1 -0
  583. package/dist/realtimekit-ui/{p-d0384d90.entry.js → p-3c003b71.entry.js} +1 -1
  584. package/dist/realtimekit-ui/{p-d7f16f24.entry.js → p-3cc15c7a.entry.js} +1 -1
  585. package/dist/realtimekit-ui/{p-8b189438.entry.js → p-3eb5a72d.entry.js} +1 -1
  586. package/dist/realtimekit-ui/p-423ff132.entry.js +1 -0
  587. package/dist/realtimekit-ui/p-55074d37.entry.js +1 -0
  588. package/dist/realtimekit-ui/{p-9ad2c746.entry.js → p-574fa8db.entry.js} +1 -1
  589. package/dist/realtimekit-ui/{p-9cbf286a.entry.js → p-59ac307d.entry.js} +1 -1
  590. package/dist/realtimekit-ui/{p-5a2d8313.entry.js → p-5cd2b5e0.entry.js} +1 -1
  591. package/dist/realtimekit-ui/p-605e418e.entry.js +1 -0
  592. package/dist/realtimekit-ui/{p-882d07c9.entry.js → p-63c32e2d.entry.js} +1 -1
  593. package/dist/realtimekit-ui/{p-95f05e26.entry.js → p-6407dc7e.entry.js} +1 -1
  594. package/dist/realtimekit-ui/p-6560e903.entry.js +1 -0
  595. package/dist/realtimekit-ui/{p-de75d48d.entry.js → p-6acda400.entry.js} +1 -1
  596. package/dist/realtimekit-ui/p-6f8f175b.entry.js +1 -0
  597. package/dist/realtimekit-ui/{p-61a16ccf.entry.js → p-731bcf94.entry.js} +1 -1
  598. package/dist/realtimekit-ui/{p-2b373e53.entry.js → p-740444e7.entry.js} +1 -1
  599. package/dist/realtimekit-ui/{p-6adb2de4.entry.js → p-75087c10.entry.js} +1 -1
  600. package/dist/realtimekit-ui/{p-93b84c22.js → p-79731cb6.js} +1 -1
  601. package/dist/realtimekit-ui/{p-e7b83772.entry.js → p-7aa48099.entry.js} +1 -1
  602. package/dist/realtimekit-ui/{p-11c964cf.entry.js → p-7c9ac5df.entry.js} +1 -1
  603. package/dist/realtimekit-ui/{p-3369f405.entry.js → p-8000d8de.entry.js} +1 -1
  604. package/dist/realtimekit-ui/p-81beeff4.entry.js +1 -0
  605. package/dist/realtimekit-ui/p-872a05b0.entry.js +1 -0
  606. package/dist/realtimekit-ui/{p-4eee77b0.entry.js → p-8bd79e77.entry.js} +1 -1
  607. package/dist/realtimekit-ui/{p-b387e9a1.entry.js → p-904119a0.entry.js} +1 -1
  608. package/dist/realtimekit-ui/{p-12e4cb4a.js → p-91d15089.js} +1 -1
  609. package/dist/realtimekit-ui/p-91efc377.entry.js +1 -0
  610. package/dist/realtimekit-ui/{p-d9cad67f.entry.js → p-9b206390.entry.js} +1 -1
  611. package/dist/realtimekit-ui/{p-0b8c47d9.entry.js → p-9b35d38b.entry.js} +1 -1
  612. package/dist/realtimekit-ui/{p-a1203856.entry.js → p-9b5c6928.entry.js} +1 -1
  613. package/dist/realtimekit-ui/{p-ae7319ac.entry.js → p-9c7449a0.entry.js} +1 -1
  614. package/dist/realtimekit-ui/{p-38aec474.entry.js → p-a37a936c.entry.js} +1 -1
  615. package/dist/realtimekit-ui/p-a417984b.entry.js +1 -0
  616. package/dist/realtimekit-ui/{p-643194e4.entry.js → p-a6bccc60.entry.js} +1 -1
  617. package/dist/realtimekit-ui/{p-4eba1baa.entry.js → p-a71320ec.entry.js} +1 -1
  618. package/dist/realtimekit-ui/p-ab5b09f9.entry.js +1 -0
  619. package/dist/realtimekit-ui/p-ae9de69a.js +1 -0
  620. package/dist/realtimekit-ui/{p-3eefefa3.entry.js → p-aef75bbb.entry.js} +1 -1
  621. package/dist/realtimekit-ui/{p-7f76de48.entry.js → p-b89736c6.entry.js} +1 -1
  622. package/dist/realtimekit-ui/{p-a4e223e8.entry.js → p-bf87c56f.entry.js} +1 -1
  623. package/dist/realtimekit-ui/{p-c5c965b8.entry.js → p-c09f774c.entry.js} +1 -1
  624. package/dist/realtimekit-ui/{p-c638f666.entry.js → p-c0b75ca2.entry.js} +1 -1
  625. package/dist/realtimekit-ui/{p-f0f6c282.entry.js → p-c33b0b90.entry.js} +1 -1
  626. package/dist/realtimekit-ui/{p-a9126c12.entry.js → p-c4fada74.entry.js} +1 -1
  627. package/dist/realtimekit-ui/{p-98ee3341.entry.js → p-c77d9110.entry.js} +1 -1
  628. package/dist/realtimekit-ui/{p-7613857e.entry.js → p-cb72ae59.entry.js} +1 -1
  629. package/dist/realtimekit-ui/{p-7b999408.entry.js → p-d543f03a.entry.js} +1 -1
  630. package/dist/realtimekit-ui/{p-949b2b6a.entry.js → p-d6071b1d.entry.js} +1 -1
  631. package/dist/realtimekit-ui/{p-1666857d.entry.js → p-d644eed7.entry.js} +1 -1
  632. package/dist/realtimekit-ui/{p-788f26c4.entry.js → p-d679ea25.entry.js} +1 -1
  633. package/dist/realtimekit-ui/{p-91ea043c.js → p-d7b92a52.js} +1 -1
  634. package/dist/realtimekit-ui/p-d7c040f0.entry.js +1 -0
  635. package/dist/realtimekit-ui/{p-09869644.entry.js → p-d9117aa2.entry.js} +1 -1
  636. package/dist/realtimekit-ui/{p-c7711712.entry.js → p-dfd41e7d.entry.js} +1 -1
  637. package/dist/realtimekit-ui/{p-2fc5ef84.entry.js → p-e16f5890.entry.js} +1 -1
  638. package/dist/realtimekit-ui/p-e1f2d163.entry.js +1 -0
  639. package/dist/realtimekit-ui/p-e829a20f.entry.js +1 -0
  640. package/dist/realtimekit-ui/{p-3d0c4257.entry.js → p-f0054be9.entry.js} +1 -1
  641. package/dist/realtimekit-ui/{p-61a53713.entry.js → p-f19fe2c3.entry.js} +1 -1
  642. package/dist/realtimekit-ui/p-f39b89a3.entry.js +1 -0
  643. package/dist/realtimekit-ui/{p-a319e81f.entry.js → p-f4025c97.entry.js} +1 -1
  644. package/dist/realtimekit-ui/{p-54a31e02.entry.js → p-f6cd4525.entry.js} +1 -1
  645. package/dist/realtimekit-ui/p-f89bb70f.js +1 -0
  646. package/dist/realtimekit-ui/{p-385fddbd.entry.js → p-fa39a651.entry.js} +1 -1
  647. package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
  648. package/dist/types/components/rtk-chat/rtk-chat.d.ts +7 -15
  649. package/dist/types/components/rtk-chat-composer-ui/rtk-chat-composer-ui.d.ts +0 -4
  650. package/dist/types/components/rtk-chat-composer-view/rtk-chat-composer-view.d.ts +1 -0
  651. package/dist/types/components/rtk-chat-messages-ui-paginated/rtk-chat-messages-ui-paginated.d.ts +4 -12
  652. package/dist/types/components/rtk-chat-toggle/rtk-chat-toggle.d.ts +4 -6
  653. package/dist/types/components/rtk-meeting/rtk-meeting.d.ts +4 -0
  654. package/dist/types/components/rtk-menu-item/rtk-menu-item.d.ts +2 -0
  655. package/dist/types/components/rtk-menu-list/rtk-menu-list.d.ts +2 -0
  656. package/dist/types/components/rtk-message-view/rtk-message-view.d.ts +7 -0
  657. package/dist/types/components/rtk-paginated-list/rtk-paginated-list.d.ts +55 -54
  658. package/dist/types/components/rtk-sidebar-ui/rtk-sidebar-ui.d.ts +0 -2
  659. package/dist/types/components/rtk-ui-provider/rtk-ui-provider.d.ts +4 -1
  660. package/dist/types/components.d.ts +90 -467
  661. package/dist/types/exports.d.ts +2 -1
  662. package/dist/types/lib/icons/default-icon-pack.d.ts +0 -2
  663. package/dist/types/lib/lang/default-language.d.ts +1 -4
  664. package/dist/types/lib/overrides.d.ts +16 -0
  665. package/dist/types/types/props.d.ts +0 -4
  666. package/dist/types/utils/chat.d.ts +1 -3
  667. package/dist/types/utils/flags.d.ts +0 -2
  668. package/dist/types/utils/sync-with-store/ui-store.d.ts +4 -1
  669. package/package.json +1 -1
  670. package/dist/cjs/rtk-channel-creator.cjs.entry.js +0 -163
  671. package/dist/cjs/rtk-channel-details.cjs.entry.js +0 -49
  672. package/dist/cjs/rtk-channel-header.cjs.entry.js +0 -83
  673. package/dist/cjs/rtk-channel-selector-ui.cjs.entry.js +0 -147
  674. package/dist/collection/components/rtk-channel-creator/rtk-channel-creator.css +0 -210
  675. package/dist/collection/components/rtk-channel-creator/rtk-channel-creator.js +0 -290
  676. package/dist/collection/components/rtk-channel-details/rtk-channel-details.css +0 -93
  677. package/dist/collection/components/rtk-channel-details/rtk-channel-details.js +0 -149
  678. package/dist/collection/components/rtk-channel-header/rtk-channel-header.css +0 -99
  679. package/dist/collection/components/rtk-channel-header/rtk-channel-header.js +0 -256
  680. package/dist/collection/components/rtk-channel-selector-ui/rtk-channel-selector-ui.css +0 -330
  681. package/dist/collection/components/rtk-channel-selector-ui/rtk-channel-selector-ui.js +0 -286
  682. package/dist/collection/components/rtk-channel-selector-view/rtk-channel-selector-view.css +0 -306
  683. package/dist/collection/components/rtk-channel-selector-view/rtk-channel-selector-view.js +0 -341
  684. package/dist/components/p-a9540d93.js +0 -357
  685. package/dist/components/p-adf73364.js +0 -85
  686. package/dist/components/p-d4e2ac64.js +0 -203
  687. package/dist/components/rtk-channel-creator.d.ts +0 -11
  688. package/dist/components/rtk-channel-creator.js +0 -214
  689. package/dist/components/rtk-channel-details.d.ts +0 -11
  690. package/dist/components/rtk-channel-details.js +0 -6
  691. package/dist/components/rtk-channel-header.d.ts +0 -11
  692. package/dist/components/rtk-channel-header.js +0 -151
  693. package/dist/components/rtk-channel-selector-ui.d.ts +0 -11
  694. package/dist/components/rtk-channel-selector-ui.js +0 -194
  695. package/dist/components/rtk-channel-selector-view.d.ts +0 -11
  696. package/dist/components/rtk-channel-selector-view.js +0 -6
  697. package/dist/esm/rtk-channel-creator.entry.js +0 -159
  698. package/dist/esm/rtk-channel-details.entry.js +0 -45
  699. package/dist/esm/rtk-channel-header.entry.js +0 -79
  700. package/dist/esm/rtk-channel-selector-ui.entry.js +0 -143
  701. package/dist/realtimekit-ui/p-0689d68b.entry.js +0 -1
  702. package/dist/realtimekit-ui/p-084b6f30.js +0 -1
  703. package/dist/realtimekit-ui/p-1bf58a84.entry.js +0 -1
  704. package/dist/realtimekit-ui/p-2f641bfa.entry.js +0 -1
  705. package/dist/realtimekit-ui/p-33228f0a.entry.js +0 -1
  706. package/dist/realtimekit-ui/p-38f4773b.entry.js +0 -1
  707. package/dist/realtimekit-ui/p-3e02ec0b.entry.js +0 -1
  708. package/dist/realtimekit-ui/p-481549ac.entry.js +0 -1
  709. package/dist/realtimekit-ui/p-50157a65.entry.js +0 -1
  710. package/dist/realtimekit-ui/p-50e861f9.entry.js +0 -1
  711. package/dist/realtimekit-ui/p-5383fe87.entry.js +0 -1
  712. package/dist/realtimekit-ui/p-53ac3d30.entry.js +0 -1
  713. package/dist/realtimekit-ui/p-57277553.entry.js +0 -1
  714. package/dist/realtimekit-ui/p-5dc40f1a.entry.js +0 -1
  715. package/dist/realtimekit-ui/p-60a29b69.entry.js +0 -1
  716. package/dist/realtimekit-ui/p-639ab9ad.entry.js +0 -1
  717. package/dist/realtimekit-ui/p-7a8ca3f2.entry.js +0 -1
  718. package/dist/realtimekit-ui/p-8b341608.entry.js +0 -1
  719. package/dist/realtimekit-ui/p-930f0255.entry.js +0 -1
  720. package/dist/realtimekit-ui/p-941f159e.entry.js +0 -1
  721. package/dist/realtimekit-ui/p-951a7b06.entry.js +0 -1
  722. package/dist/realtimekit-ui/p-aa70de39.entry.js +0 -1
  723. package/dist/realtimekit-ui/p-b564d931.entry.js +0 -1
  724. package/dist/realtimekit-ui/p-e62593a2.entry.js +0 -1
  725. package/dist/realtimekit-ui/p-e720b51e.js +0 -1
  726. package/dist/realtimekit-ui/p-e87928f7.js +0 -1
  727. package/dist/realtimekit-ui/p-f40a55e3.entry.js +0 -1
  728. package/dist/realtimekit-ui/p-f645b8bb.entry.js +0 -1
  729. package/dist/types/components/rtk-channel-creator/rtk-channel-creator.d.ts +0 -37
  730. package/dist/types/components/rtk-channel-details/rtk-channel-details.d.ts +0 -16
  731. package/dist/types/components/rtk-channel-header/rtk-channel-header.d.ts +0 -32
  732. package/dist/types/components/rtk-channel-selector-ui/rtk-channel-selector-ui.d.ts +0 -35
  733. package/dist/types/components/rtk-channel-selector-view/rtk-channel-selector-view.d.ts +0 -62
@@ -1,22 +1,21 @@
1
1
  import { r as registerInstance, h, H as Host, c as createEvent, a as getElement, w as writeTask } from './index-c1fb98bb.js';
2
- import { e as defaultIconPack, h as useLanguage, c as createDefaultConfig, H as FlagsmithFeatureFlags, G as chatUnreadTimestamps, I as gracefulStorage, u as uiStore, b as createPeerStore } from './ui-store-9e486e1b.js';
2
+ import { e as defaultIconPack, i as useLanguage, c as createDefaultConfig, f as defaultOverrides, I as FlagsmithFeatureFlags, H as chatUnreadTimestamps, J as gracefulStorage, u as uiStore, b as createPeerStore } from './ui-store-5a66fa71.js';
3
3
  import { f as formatName, g as getInitials, s as sanitizeLink, h as hasOnlyEmojis } from './string-068ce30a.js';
4
- import { S as SyncWithStore } from './index-e65afca5.js';
5
- import { d as debounce } from './debounce-3ea4df36.js';
6
- import { h as handleFilesDataTransfer, g as generateChatGroupKey, T as TEMPORARY_CHANNEL_PREFIX, i as isDirectMessageChannel, d as alphabeticalSorter, e as getDMComparator, p as parseMessageForTarget, M as MAX_TEXT_LENGTH, f as parseRichText, j as extractReplyBlock, s as stripOutReplyBlock } from './chat-ff185374.js';
4
+ import { S as SyncWithStore } from './index-d08145ca.js';
5
+ import { h as handleFilesDataTransfer, g as generateChatGroupKey, p as parseMessageForTarget, M as MAX_TEXT_LENGTH, d as parseRichText, e as extractReplyBlock, s as stripOutReplyBlock } from './chat-a170fc58.js';
7
6
  import { g as getExtension, a as getFileSize, d as downloadFile } from './file-6114f1a9.js';
8
- import { p as provideRtkDesignSystem, d as deepMerge } from './merge-7ffc04b3.js';
7
+ import { p as provideRtkDesignSystem, d as deepMerge } from './merge-88832ad1.js';
9
8
  import { R as Render } from './index-d31a2e33.js';
10
- import { g as generateConfig } from './config-e684aa4d.js';
9
+ import { g as generateConfig } from './config-cea9cd37.js';
11
10
  import { i as index } from './ResizeObserver.es-02979d4e.js';
12
11
  import { c as computePosition, o as offset, f as flip, s as shift, a as arrow } from './floating-ui.dom.esm-21c3d54e.js';
13
12
  import { f as formatDateTime, e as elapsedDuration } from './date-b1f78dea.js';
14
- import { s as smoothScrollToBottom } from './scroll-2d8e810c.js';
13
+ import { d as debounce } from './debounce-b7ba967e.js';
15
14
 
16
15
  const rtkAvatarCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;height:var(--rtk-space-32, 128px);width:var(--rtk-space-32, 128px);align-items:center;justify-content:center;font-size:28px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));overflow:clip;border-radius:9999px;-webkit-user-select:none;-moz-user-select:none;user-select:none}rtk-icon{height:50%;width:50%}.image-ctr{display:flex;height:100%;width:100%;align-items:center;justify-content:center;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}img{height:var(--rtk-space-0, 0px);width:var(--rtk-space-0, 0px);-o-object-fit:cover;object-fit:cover}img.loaded{height:100%;width:100%}.initials{display:flex;height:100%;width:100%;align-items:center;justify-content:center;text-transform:uppercase}.image{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.image img{display:none;height:100%;width:100%;-o-object-fit:cover;object-fit:cover}.image img.loaded{display:block}:host([variant='hexagon']){border-radius:var(--rtk-border-radius-none, 0);clip-path:polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%)}:host([variant='square']){border-radius:var(--rtk-border-radius-none, 0);clip-path:polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)}:host([size='sm']){height:var(--rtk-space-14, 56px);width:var(--rtk-space-14, 56px);font-size:12px}:host([size='md']){height:var(--rtk-space-28, 112px);width:var(--rtk-space-28, 112px)}:host([size='lg']){height:var(--rtk-space-32, 128px);width:var(--rtk-space-32, 128px)}";
17
16
  const RtkAvatarStyle0 = rtkAvatarCss;
18
17
 
19
- var __decorate$h = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
18
+ var __decorate$g = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
20
19
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
21
20
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
22
21
  r = Reflect.decorate(decorators, target, key, desc);
@@ -51,13 +50,13 @@ const RtkAvatar = class {
51
50
  };
52
51
  }
53
52
  render() {
54
- return (h(Host, { key: 'c1a0be37edb75c40b275ad59af85cee7df3f1cdf' }, this.getAvatar(), h("slot", { key: '1cd71e7494a09d68a52051edc279911dc3168515' })));
53
+ return (h(Host, { key: 'd7d3a7b03a3807984dc6798b5e35cec4418e06e7' }, this.getAvatar(), h("slot", { key: '25aa9fe632a132c1e2f8ef88ac98043bb8ef085a' })));
55
54
  }
56
55
  };
57
- __decorate$h([
56
+ __decorate$g([
58
57
  SyncWithStore()
59
58
  ], RtkAvatar.prototype, "iconPack", void 0);
60
- __decorate$h([
59
+ __decorate$g([
61
60
  SyncWithStore()
62
61
  ], RtkAvatar.prototype, "t", void 0);
63
62
  RtkAvatar.style = RtkAvatarStyle0;
@@ -86,147 +85,7 @@ const RtkButton = class {
86
85
  };
87
86
  RtkButton.style = RtkButtonStyle0;
88
87
 
89
- const rtkChannelSelectorViewCss = ".scrollbar {\n /* For Firefox */\n scrollbar-width: thin;\n scrollbar-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent);\n}\n\n/* For WebKit */\n.scrollbar::-webkit-scrollbar {\n height: var(--rtk-space-1\\.5, 6px);\n width: var(--rtk-space-1\\.5, 6px);\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-background, transparent);\n}\n\n.scrollbar::-webkit-scrollbar-thumb {\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)));\n}\n\n\n:host {\n display: flex;\n flex-direction: column;\n width: 100%;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));\n position: relative;\n z-index: 10;\n height: var(--rtk-space-12, 48px);\n min-height: 48px;\n}\n\n.dropdown-trigger {\n height: 100%;\n width: 100%;\n border-width: var(--rtk-border-width-none, 0);\n border-style: none;\n padding: var(--rtk-space-4, 16px);\n display: flex;\n align-items: center;\n justify-content: space-between;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));\n font-size: 14px;\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n cursor: pointer;\n position: absolute;\n z-index: 20;\n}\n\n.dropdown-trigger span {\n display: flex;\n flex: 1 1 0%;\n align-items: center;\n justify-content: space-between;\n}\n\n.dropdown-trigger rtk-icon {\n margin-left: var(--rtk-space-1, 4px);\n height: var(--rtk-space-5, 20px);\n width: var(--rtk-space-5, 20px);\n flex-shrink: 0;\n}\n\n@container chatcontainer (height < 360px) {\n .dropdown-trigger {\n padding: var(--rtk-space-2, 8px);\n }\n .dropdown {\n top: var(--rtk-space-8, 32px) !important;\n }\n .search-container {\n padding-left: var(--rtk-space-0, 0px) !important;\n padding-right: var(--rtk-space-0, 0px) !important;\n padding-top: var(--rtk-space-0, 0px) !important;\n padding-bottom: var(--rtk-space-0, 0px) !important;\n }\n input {\n height: var(--rtk-space-8, 32px) !important;\n border-radius: var(--rtk-border-radius-none, 0) !important;\n }\n .channel {\n height: var(--rtk-space-8, 32px) !important;\n border-radius: var(--rtk-border-radius-sm, 4px) !important;\n }\n .avatar-icon {\n height: var(--rtk-space-3, 12px) !important;\n width: var(--rtk-space-3, 12px) !important;\n padding: var(--rtk-space-1, 4px) !important;\n }\n\n rtk-avatar {\n height: var(--rtk-space-5, 20px) !important;\n width: var(--rtk-space-5, 20px) !important;\n }\n}\n\n.dropdown {\n position: absolute;\n width: 100%;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));\n top: var(--rtk-space-12, 48px);\n z-index: 10;\n animation: 0.3s slide-down ease;\n}\n\n.dropdown .channels-container {\n max-height: var(--rtk-space-80, 320px);\n}\n\n.list {\n display: flex;\n flex-direction: column;\n}\n\n.list .channel .channel-data {\n align-items: flex-start;\n}\n\n.unread-count {\n display: flex;\n justify-content: center;\n height: var(--rtk-space-5, 20px);\n min-width: var(--rtk-space-3, 12px);\n border-radius: 9999px;\n padding-left: var(--rtk-space-1, 4px);\n padding-right: var(--rtk-space-1, 4px);\n font-size: 12px;\n line-height: 1.25rem;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));\n}\n\ninput {\n height: var(--rtk-space-9, 36px);\n width: 100%;\n padding-left: var(--rtk-space-3, 12px);\n padding-right: var(--rtk-space-3, 12px);\n box-sizing: border-box;\n border-width: var(--rtk-border-width-none, 0);\n border-style: none;\n outline: 2px solid transparent;\n outline-offset: 2px;\n border-radius: var(--rtk-border-radius-sm, 4px);\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n}\n\n.search-container {\n display: flex;\n flex-shrink: 0;\n flex-grow: 0;\n flex-basis: auto;\n align-items: center;\n padding-top: var(--rtk-space-3, 12px);\n padding-bottom: var(--rtk-space-3, 12px);\n padding-left: var(--rtk-space-2, 8px);\n padding-right: var(--rtk-space-2, 8px);\n border-bottom: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-700, 44 44 44));\n}\n\n.search-container rtk-icon {\n margin-left: calc(var(--rtk-space-8, 32px) * -1);\n height: var(--rtk-space-5, 20px);\n width: var(--rtk-space-5, 20px);\n color: rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76));\n}\n\n.channels-container {\n display: flex;\n flex-direction: column;\n gap: var(--rtk-space-1, 4px);\n padding: var(--rtk-space-2, 8px);\n flex: 1 1 auto;\n overflow-y: auto;\n}\n\n.channel {\n flex-shrink: 0;\n box-sizing: border-box;\n border-width: var(--rtk-border-width-none, 0);\n border-style: none;\n background-color: transparent;\n outline: 2px solid transparent;\n outline-offset: 2px;\n cursor: pointer;\n border-radius: var(--rtk-border-radius-md, 8px);\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--rtk-space-2, 8px);\n height: var(--rtk-space-16, 64px);\n width: 100%;\n padding-left: var(--rtk-space-2, 8px);\n padding-right: var(--rtk-space-3, 12px);\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.channel:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));\n}\n\n.channel .channel-data {\n flex: 1 1 0%;\n align-items: center;\n justify-content: space-between;\n display: flex;\n gap: var(--rtk-space-2, 8px);\n}\n\n.channel .name {\n font-size: 16px;\n}\n\n.channel .name, \n .channel .last-message {\n max-width: var(--rtk-space-40, 160px);\n text-align: left;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n}\n\n.channel .no-message {\n font-style: italic;\n}\n\n.channel rtk-avatar {\n height: var(--rtk-space-12, 48px);\n width: var(--rtk-space-12, 48px);\n overflow: clip;\n border-radius: 9999px;\n font-size: 14px;\n}\n\n.channel .avatar-icon {\n height: var(--rtk-space-6, 24px);\n width: var(--rtk-space-6, 24px);\n padding: var(--rtk-space-3, 12px);\n color: rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));\n overflow: clip;\n border-radius: 9999px;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n}\n\n.channel time, \n .channel .last-message {\n font-size: 12px;\n color: rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76));\n}\n\n.channel.active {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));\n}\n\n.channel.active .unread-count {\n background-color: rgb(var(--rtk-colors-text-on-brand-800, var(--rtk-colors-text-800, 255 255 255 / 0.76)));\n --tw-text-opacity: 1;\n color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity));\n}\n\n.channel.active time {\n color: rgb(var(--rtk-colors-text-on-brand-800, var(--rtk-colors-text-800, 255 255 255 / 0.76)));\n}\n\n.channel.active .last-message {\n color: rgb(var(--rtk-colors-text-on-brand-700, var(--rtk-colors-text-700, 255 255 255 / 0.64)));\n}\n\n.channel.active rtk-avatar {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));\n}\n\n.col {\n gap: var(--rtk-space-1, 4px);\n display: flex;\n flex-direction: column;\n}\n\n.channel-meta {\n flex-shrink: 0;\n align-items: flex-end;\n}\n\n@keyframes slide-down {\n from {\n transform: translateY(-50px);\n }\n to {\n transform: translateY(0%);\n }\n}\n";
90
- const RtkChannelSelectorViewStyle0 = rtkChannelSelectorViewCss;
91
-
92
- var __decorate$g = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
93
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
94
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
95
- r = Reflect.decorate(decorators, target, key, desc);
96
- else
97
- for (var i = decorators.length - 1; i >= 0; i--)
98
- if (d = decorators[i])
99
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
100
- return c > 3 && r && Object.defineProperty(target, key, r), r;
101
- };
102
- const RtkChannelSelectorView = class {
103
- constructor(hostRef) {
104
- registerInstance(this, hostRef);
105
- this.channelChange = createEvent(this, "channelChange", 7);
106
- /** Disables search bar (default = false) */
107
- this.disableSearch = false;
108
- /** Hides avatar (default = false) */
109
- this.hideAvatar = false;
110
- /** Icon Pack */
111
- this.iconPack = defaultIconPack;
112
- /** Language */
113
- this.t = useLanguage();
114
- /** Render as dropdown or list (default = list) */
115
- this.viewAs = 'list';
116
- this.searchQuery = '';
117
- this.showDropdown = false;
118
- this.calculateListHeight = debounce(() => {
119
- if (this.viewAs === 'list' && this.$listEl) {
120
- let height = 0;
121
- const slotEl = this.$el.shadowRoot.querySelector('slot[name="header"]');
122
- if (slotEl) {
123
- slotEl.assignedElements().forEach((e) => (height += e.offsetHeight));
124
- }
125
- if (this.$searchEl) {
126
- height += this.$searchEl.offsetHeight;
127
- }
128
- this.$listEl.style.height = `${window.innerHeight - height - 16}px`;
129
- }
130
- }, 60);
131
- this.getFilteredChannels = () => {
132
- if (this.searchQuery.trim() === '') {
133
- return this.channels;
134
- }
135
- return this.channels.filter((channel) => {
136
- return channel['name'].toLowerCase().includes(this.searchQuery.toLowerCase());
137
- });
138
- };
139
- this.toggleDropdown = () => {
140
- this.showDropdown = !this.showDropdown;
141
- };
142
- this.getChannelById = (id) => {
143
- return this.channels.find((channel) => channel.id === id);
144
- };
145
- this.getTotalUnreads = () => {
146
- return this.channels.reduce((acc, curr) => {
147
- return acc + curr.unreadCount;
148
- }, 0);
149
- };
150
- this.onChannelClickHandler = (channel) => {
151
- this.channelChange.emit(channel);
152
- if (this.viewAs === 'dropdown') {
153
- this.showDropdown = false;
154
- }
155
- };
156
- }
157
- connectedCallback() {
158
- this.resizeObserver = new ResizeObserver(this.calculateListHeight);
159
- }
160
- componentDidLoad() {
161
- this.resizeObserver.observe(this.$el);
162
- this.calculateListHeight();
163
- }
164
- disconnectedCallback() {
165
- var _a;
166
- (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
167
- this.calculateListHeight.cancel();
168
- }
169
- getTimeLabel(messageDate) {
170
- const today = new Date();
171
- const yesterday = new Date(today);
172
- yesterday.setDate(today.getDate() - 1);
173
- const firstDayOfWeek = new Date(today);
174
- firstDayOfWeek.setDate(today.getDate() - today.getDay() - 1);
175
- if (messageDate.toDateString() === today.toDateString()) {
176
- return messageDate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
177
- }
178
- else if (messageDate.toDateString() === yesterday.toDateString()) {
179
- return this.t('date.yesteday');
180
- }
181
- else if (messageDate > firstDayOfWeek) {
182
- const weekdays = [
183
- 'date.sunday',
184
- 'date.monday',
185
- 'date.tuesday',
186
- 'date.wednesday',
187
- 'date.thursday',
188
- 'date.friday',
189
- 'date.saturday',
190
- ];
191
- return this.t(weekdays[messageDate.getDay()]);
192
- }
193
- else {
194
- return Intl.DateTimeFormat([], {
195
- day: '2-digit',
196
- month: '2-digit',
197
- year: '2-digit',
198
- }).format(messageDate);
199
- }
200
- }
201
- render() {
202
- const filteredChannels = this.getFilteredChannels();
203
- const shouldShowDropdown = this.viewAs === 'list' || (this.viewAs === 'dropdown' && this.showDropdown);
204
- return (h(Host, { key: 'adc8ab4b9c8c865998588fbd9766296f18b3e48e' }, this.viewAs === 'list' && h("slot", { key: 'e5740725a4349472ca2eb1fb0816eb2311a99838', name: "header" }), shouldShowDropdown && (h("div", { key: '425adc920c28e0421e07bb0bd9f61b31c42fcda9', class: {
205
- dropdown: this.viewAs === 'dropdown',
206
- scrollbar: this.viewAs === 'dropdown',
207
- list: this.viewAs === 'list',
208
- } }, !this.disableSearch && (h("div", { key: '9fbbc48d8489f2a6490729fac1fecdef1838e84a', class: "search-container", ref: (el) => (this.$searchEl = el) }, h("input", { key: 'f7fb43662d50274f80380b735ef9f5fc0b215442', type: "text", placeholder: this.t('chat.search_conversations'), value: this.searchQuery, onInput: (e) => (this.searchQuery = e.target.value) }), h("rtk-icon", { key: 'af76e65a1397d2a6e557a28b687e26aef641c568', icon: this.iconPack.search }))), h("div", { key: '0711a9cfcc811269a5020dc41030c0daee5cc8bf', class: "channels-container scrollbar", ref: (el) => (this.$listEl = el) }, filteredChannels.map((channel) => {
209
- return (h("button", { class: { channel: true, active: this.selectedChannelId === channel.id }, onClick: () => this.onChannelClickHandler(channel) }, !this.hideAvatar && (h("div", null, channel.icon ? (h("rtk-icon", { class: "avatar-icon", icon: this.iconPack[channel.icon] })) : (h("rtk-avatar", { participant: {
210
- name: channel.name,
211
- picture: channel.avatarUrl,
212
- } })))), h("div", { class: "channel-data" }, h("div", { class: "col" }, h("div", { class: "name" }, channel.name), channel.latestMessage && (h("div", { class: {
213
- 'last-message': true,
214
- 'no-message': !channel.latestMessage,
215
- } }, h("rtk-text-message-view", { isMarkdown: true, text: channel.latestMessage })))), h("div", { class: "col channel-meta" }, channel.latestMessageTime && (h("time", { class: "time" }, this.getTimeLabel(channel.latestMessageTime))), channel.unreadCount > 0 && (h("div", { class: "unread-count" }, channel.unreadCount))))));
216
- })))), this.viewAs === 'dropdown' && (h("button", { key: '0c87f90d6d0fe22284995ab7259689f80a862829', class: "dropdown-trigger", onClick: this.toggleDropdown }, h("span", { key: 'd1a364f2c5c57d19702d0b8707ca661c1dc4c14f' }, this.selectedChannelId &&
217
- `${this.t('to')} ${this.getChannelById(this.selectedChannelId).name}`, this.getTotalUnreads() > 0 && (h("div", { key: 'bf789f9df82851825bc6ea12a19a5f37ab74aefe', class: "unread-count" }, this.getTotalUnreads()))), h("rtk-icon", { key: 'c0d03f883f4c46b2698be0f197751fc0470717ea', icon: this.showDropdown ? this.iconPack.chevron_up : this.iconPack.chevron_down })))));
218
- }
219
- get $el() { return getElement(this); }
220
- };
221
- __decorate$g([
222
- SyncWithStore()
223
- ], RtkChannelSelectorView.prototype, "iconPack", void 0);
224
- __decorate$g([
225
- SyncWithStore()
226
- ], RtkChannelSelectorView.prototype, "t", void 0);
227
- RtkChannelSelectorView.style = RtkChannelSelectorViewStyle0;
228
-
229
- const rtkChatCss = ":host {\n line-height: initial;\n font-family: var(--rtk-font-family, sans-serif);\n\n font-feature-settings: normal;\n font-variation-settings: normal;\n}\n\np {\n margin: var(--rtk-space-0, 0px);\n padding: var(--rtk-space-0, 0px);\n}\n\n.scrollbar {\n /* For Firefox */\n scrollbar-width: thin;\n scrollbar-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent);\n}\n\n/* For WebKit */\n.scrollbar::-webkit-scrollbar {\n height: var(--rtk-space-1\\.5, 6px);\n width: var(--rtk-space-1\\.5, 6px);\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-background, transparent);\n}\n\n.scrollbar::-webkit-scrollbar-thumb {\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)));\n}\n\n\n:host {\n display: flex;\n height: 100%;\n width: 100%;\n flex-direction: column;\n font-size: 14px;\n position: relative;\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n}\n\nh3 {\n margin: var(--rtk-space-0, 0px);\n display: flex;\n height: var(--rtk-space-12, 48px);\n align-items: center;\n justify-content: center;\n font-size: 16px;\n font-weight: 400;\n color: rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));\n text-align: center;\n}\n\n#dropzone {\n position: absolute;\n top: var(--rtk-space-0, 0px);\n right: var(--rtk-space-0, 0px);\n bottom: var(--rtk-space-0, 0px);\n left: var(--rtk-space-0, 0px);\n z-index: 10;\n display: none;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64));\n}\n\n#dropzone.active {\n display: flex;\n animation: 0.2s slide-up ease-in;\n}\n\nrtk-chat-messages-ui,\nrtk-chat-messages-ui-paginated {\n flex: 1 0 0;\n}\n\nrtk-chat-composer-view {\n margin: var(--rtk-space-2, 8px);\n}\n\n.chat-container {\n display: flex;\n height: 100%;\n width: 100%;\n flex-direction: row;\n container-type: size;\n container-name: chatcontainer;\n}\n\n@container chatcontainer (height < 360px) {\n rtk-channel-selector-view {\n height: var(--rtk-space-8, 32px);\n min-height: 24px;\n }\n}\n\n.chat {\n display: flex;\n flex: 1 1 0%;\n flex-direction: column;\n}\n\n.banner {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.banner .welcome-new-channel {\n width: var(--rtk-space-48, 192px);\n}\n\n.banner .create-channel-illustration {\n height: var(--rtk-space-40, 160px);\n width: var(--rtk-space-40, 160px);\n}\n\n.channel-selector-header {\n box-sizing: border-box;\n height: var(--rtk-space-16, 64px);\n padding: var(--rtk-space-4, 16px);\n display: flex;\n justify-content: space-between;\n border-bottom: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-700, 44 44 44));\n}\n\n.channel-selector-header .channel-create-btn {\n width: var(--rtk-space-8, 32px);\n justify-content: center;\n}\n\n.channel-selector-header .channel-create-btn:hover {\n --tw-text-opacity: 1;\n color: rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity));\n}\n\n.view-chats-btn {\n margin-top: var(--rtk-space-4, 16px);\n}\n\n.selector-container {\n z-index: 50;\n width: 100%;\n max-width: var(--rtk-space-80, 320px);\n border-right: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));\n}\n\n.selector-container.hide {\n display: none;\n}\n\n.mobile-close-btn {\n display: none;\n}\n\n.selector-container.mobile {\n height: 100%;\n width: 100%;\n max-width: 100%;\n position: absolute;\n top: var(--rtk-space-0, 0px);\n right: var(--rtk-space-0, 0px);\n bottom: var(--rtk-space-0, 0px);\n left: var(--rtk-space-0, 0px);\n background-color: rgba(var(--rtk-colors-background-1000, 8 8 8) / 0.6);\n display: flex;\n}\n\n.selector-container.mobile rtk-channel-selector-view {\n max-width: var(--rtk-space-96, 384px);\n animation: 0.3s swipe-in;\n}\n\n.selector-container.mobile .mobile-close-btn {\n margin-top: var(--rtk-space-4, 16px);\n margin-bottom: var(--rtk-space-4, 16px);\n margin-left: var(--rtk-space-6, 24px);\n margin-right: var(--rtk-space-6, 24px);\n display: block;\n}\n\n.pinned-messages-header {\n display: flex;\n align-items: center;\n gap: var(--rtk-space-2, 8px);\n padding: var(--rtk-space-2, 8px);\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));\n font-size: 12px;\n cursor: pointer;\n}\n\n.pinned-messages-header rtk-icon {\n height: var(--rtk-space-3, 12px);\n width: var(--rtk-space-3, 12px);\n}\n\n.pinned-messages-header:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n}\n\n.pinned-messages-header.active {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n}\n\n@keyframes swipe-in {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(0);\n }\n}\n";
88
+ const rtkChatCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{display:flex;height:100%;width:100%;flex-direction:column;font-size:14px;position:relative;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}h3{margin:var(--rtk-space-0, 0px);display:flex;height:var(--rtk-space-12, 48px);align-items:center;justify-content:center;font-size:16px;font-weight:400;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));text-align:center}#dropzone{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);z-index:10;display:none;flex-direction:column;align-items:center;justify-content:center;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}#dropzone.active{display:flex;animation:0.2s slide-up ease-in}rtk-chat-messages-ui,rtk-chat-messages-ui-paginated{flex:1 0 0}rtk-chat-composer-view{margin:var(--rtk-space-2, 8px)}.chat-container{display:flex;height:100%;width:100%;flex-direction:row;container-type:size;container-name:chatcontainer}.chat{display:flex;flex:1 1 0%;flex-direction:column}.banner{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.view-chats-btn{margin-top:var(--rtk-space-4, 16px)}.selector-container{z-index:50;width:100%;max-width:var(--rtk-space-80, 320px);border-right:var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60))}.selector-container.hide{display:none}.mobile-close-btn{display:none}.selector-container.mobile{height:100%;width:100%;max-width:100%;position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / 0.6);display:flex}.selector-container.mobile .mobile-close-btn{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);margin-left:var(--rtk-space-6, 24px);margin-right:var(--rtk-space-6, 24px);display:block}.pinned-messages{position:relative;display:flex;flex-direction:column}.pinned-messages-header{display:flex;align-items:center;justify-content:space-between;gap:var(--rtk-space-2, 8px);padding:var(--rtk-space-4, 16px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));font-size:14px;cursor:pointer}.pinned-messages-header div{display:flex;flex-direction:row;align-items:center;gap:var(--rtk-space-2, 8px)}.pinned-messages-header rtk-icon{height:var(--rtk-space-3, 12px);width:var(--rtk-space-3, 12px)}.pinned-messages-content{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));position:absolute;left:var(--rtk-space-0, 0px);top:100%;z-index:50;max-height:30vh;width:100%;overflow:auto}.pinned-message{display:flex;cursor:pointer;flex-direction:row;align-items:center;gap:var(--rtk-space-2, 8px);--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));padding:var(--rtk-space-4, 16px);border-bottom-width:var(--rtk-border-width-sm, 1px);border-right-width:var(--rtk-border-width-none, 0);border-left-width:var(--rtk-border-width-none, 0);border-top-width:var(--rtk-border-width-none, 0);border-style:solid}.pinned-message-avatar{height:var(--rtk-space-6, 24px) !important;width:var(--rtk-space-6, 24px) !important}@keyframes swipe-in{from{transform:translateX(-100%)}to{transform:translateX(0)}}";
230
89
  const RtkChatStyle0 = rtkChatCss;
231
90
 
232
91
  var __decorate$f = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -244,8 +103,6 @@ const RtkChat = class {
244
103
  registerInstance(this, hostRef);
245
104
  this.stateUpdate = createEvent(this, "rtkStateUpdate", 7);
246
105
  this.chatUpdateListener = ({ message }) => {
247
- if (message.channelId)
248
- return;
249
106
  if (!this.displayFilter || this.displayFilter(message)) {
250
107
  this.addToChatGroup(message);
251
108
  // shallow copy to trigger render
@@ -263,6 +120,8 @@ const RtkChat = class {
263
120
  this.iconPack = defaultIconPack;
264
121
  /** Language */
265
122
  this.t = useLanguage();
123
+ /** UI Overrides */
124
+ this.overrides = defaultOverrides;
266
125
  /** disables private chat */
267
126
  this.disablePrivateChat = false;
268
127
  /** Can current user pin/unpin messages */
@@ -294,14 +153,12 @@ const RtkChat = class {
294
153
  this.emojiPickerEnabled = false;
295
154
  this.chatRecipientId = 'everyone';
296
155
  this.participants = [];
297
- this.channels = [];
298
156
  this.editingMessage = null;
299
157
  this.replyMessage = null;
300
158
  this.searchQuery = '';
301
159
  this.selectorState = 'hide';
302
- this.creatingChannel = false;
160
+ this.isSendingMessage = false;
303
161
  this.showPinnedMessages = false;
304
- this.channelMap = new Map();
305
162
  this.onDragOver = (e) => {
306
163
  e.preventDefault();
307
164
  this.dropzoneActivated = true;
@@ -329,23 +186,14 @@ const RtkChat = class {
329
186
  });
330
187
  };
331
188
  this.disconnectMeeting = (meeting) => {
332
- var _a, _b, _c, _d, _e, _f;
189
+ var _a;
333
190
  if (this.isPrivateChatSupported()) {
334
191
  meeting === null || meeting === void 0 ? void 0 : meeting.participants.joined.removeListener('participantJoined', this.onParticipantUpdate);
335
192
  meeting === null || meeting === void 0 ? void 0 : meeting.participants.joined.removeListener('participantLeft', this.onParticipantUpdate);
336
193
  }
337
194
  (_a = meeting === null || meeting === void 0 ? void 0 : meeting.chat) === null || _a === void 0 ? void 0 : _a.removeListener('chatUpdate', this.chatUpdateListener);
338
- (_b = meeting === null || meeting === void 0 ? void 0 : meeting.chat) === null || _b === void 0 ? void 0 : _b.removeListener('channelCreate', this.onChannelCreateOrUpdate);
339
- (_c = meeting === null || meeting === void 0 ? void 0 : meeting.chat) === null || _c === void 0 ? void 0 : _c.removeListener('channelUpdate', this.onChannelCreateOrUpdate);
340
- (_d = meeting === null || meeting === void 0 ? void 0 : meeting.chat) === null || _d === void 0 ? void 0 : _d.removeListener('channelMessageUpdate', this.onChannelCreateOrUpdate);
341
- (_f = (_e = meeting === null || meeting === void 0 ? void 0 : meeting.participants) === null || _e === void 0 ? void 0 : _e.all) === null || _f === void 0 ? void 0 : _f.removeListener('participantsUpdate', this.onChannelCreateOrUpdate);
342
195
  meeting.self.permissions.removeListener('*', this.chatPermissionUpdateListener);
343
196
  };
344
- this.getFilteredParticipants = () => {
345
- if (this.privatePresetFilter.length === 0)
346
- return this.participants;
347
- return this.participants.filter((p) => this.privatePresetFilter.includes(p.presetName));
348
- };
349
197
  this.onParticipantUpdate = () => {
350
198
  this.participants = this.meeting.participants.joined
351
199
  .toArray()
@@ -362,20 +210,6 @@ const RtkChat = class {
362
210
  this.isPrivateChatSupported = () => {
363
211
  return this.canPrivateMessage && !this.disablePrivateChat;
364
212
  };
365
- this.updateRecipients = (event) => {
366
- const { id } = event.detail;
367
- this.chatRecipientId = id;
368
- this.selectedParticipant = this.participants.find((p) => p.userId === id);
369
- if (this.chatRecipientId !== 'everyone') {
370
- const allParticipants = [this.chatRecipientId, this.meeting.self.userId];
371
- const targetKey = generateChatGroupKey(allParticipants);
372
- this.selectedGroup = targetKey;
373
- }
374
- else {
375
- this.selectedGroup = 'everyone';
376
- }
377
- this.updateUnreadCountGroups({ [this.selectedGroup]: 0 });
378
- };
379
213
  this.isTextMessagingAllowed = () => {
380
214
  if (this.chatRecipientId === 'everyone') {
381
215
  // public chat
@@ -392,99 +226,29 @@ const RtkChat = class {
392
226
  // private chat
393
227
  return this.canPrivateMessage && this.canSendPrivateFiles;
394
228
  };
395
- this.onChannelChanged = (e) => {
396
- const channel = e.detail;
397
- if (channel.id.includes(TEMPORARY_CHANNEL_PREFIX)) {
398
- this.createDMChannel(channel.id.replace(TEMPORARY_CHANNEL_PREFIX, ''));
399
- }
400
- else {
401
- this.selectedChannelId = channel.id;
402
- }
403
- this.cleanup();
404
- if (this.selectorState !== 'desktop') {
405
- this.selectorState = 'hide';
406
- }
407
- };
408
- this.createDMChannel = async (memberId) => {
409
- this.creatingChannel = true;
410
- const newChannel = await this.meeting.chat.createChannel('Direct Message', [memberId], {
411
- visibility: 'private',
412
- isDirectMessage: true,
413
- });
414
- this.creatingChannel = false;
415
- this.selectedChannelId = newChannel.id;
416
- };
417
- this.cleanup = () => {
418
- this.editingMessage = null;
419
- this.replyMessage = null;
420
- this.searchQuery = '';
421
- };
422
229
  this.onQuotedMessageDismiss = () => {
423
230
  this.replyMessage = null;
424
231
  };
425
- this.onChannelCreateOrUpdate = (channel) => {
426
- if (channel) {
427
- this.channelMap.set(channel.id, channel);
428
- }
429
- else {
430
- this.meeting.chat.channels.forEach((chan) => this.channelMap.set(chan.id, chan));
431
- }
432
- const allChannels = Array.from(this.channelMap.values());
433
- const channels = allChannels
434
- .filter((channel) => !isDirectMessageChannel(channel))
435
- .sort((a, b) => alphabeticalSorter(a.displayName, b.displayName));
436
- const membersWithChannel = allChannels.filter(isDirectMessageChannel).map((channel) => {
437
- return Object.assign(Object.assign({}, channel), { displayName: this.getMemberDisplayName(channel) });
438
- });
439
- const membersWithoutChannel = this.meeting.participants.all
440
- .toArray()
441
- .filter((member) => {
442
- if (member.userId === this.meeting.self.userId)
443
- return false;
444
- const matcher = getDMComparator([this.meeting.self.userId, member.userId]);
445
- return membersWithChannel.every((channel) => getDMComparator(channel.memberIds) !== matcher);
446
- })
447
- .map((member) => {
448
- return {
449
- id: `${TEMPORARY_CHANNEL_PREFIX}${member.userId}`,
450
- displayName: member.name,
451
- displayPictureUrl: member.picture,
452
- isDirectMessage: true,
453
- unreadCount: 0,
454
- };
455
- });
456
- const dms = [...membersWithChannel, ...membersWithoutChannel].sort((a, b) => alphabeticalSorter(a.displayName, b.displayName));
457
- this.channels = [...channels, ...dms];
458
- // select channel only if it is created in db
459
- const nonTemporaryChannel = [...channels, ...membersWithChannel];
460
- if (!this.selectedChannelId && nonTemporaryChannel.length !== 0) {
461
- this.selectedChannelId = nonTemporaryChannel[0].id;
462
- }
463
- };
464
- this.getMemberDisplayName = (channel) => {
465
- var _a;
466
- let id;
467
- if (channel.memberIds.length === 1) {
468
- // channel with self
469
- id = channel.memberIds[0];
470
- }
471
- else {
472
- id =
473
- channel.memberIds[0] === this.meeting.self.userId
474
- ? channel.memberIds[1]
475
- : channel.memberIds[0];
476
- }
477
- const member = this.meeting.participants.all.toArray().find((member) => member.userId === id);
478
- return (_a = member === null || member === void 0 ? void 0 : member.name) !== null && _a !== void 0 ? _a : id;
479
- };
480
232
  this.onNewMessageHandler = async (e) => {
481
233
  const message = e.detail;
482
- this.meeting.chat.sendMessage(message, this.getRecipientPeerIds());
234
+ this.isSendingMessage = true;
235
+ try {
236
+ await this.meeting.chat.sendMessage(message, this.getRecipientPeerIds());
237
+ }
238
+ finally {
239
+ this.isSendingMessage = false;
240
+ }
483
241
  };
484
242
  this.onEditMessageHandler = async (e) => {
485
243
  var _a, _b;
486
- await ((_b = (_a = this.meeting) === null || _a === void 0 ? void 0 : _a.chat) === null || _b === void 0 ? void 0 : _b.editTextMessage(this.editingMessage.id, e.detail, this.editingMessage.channelId));
487
- this.editingMessage = null;
244
+ this.isSendingMessage = true;
245
+ try {
246
+ await ((_b = (_a = this.meeting) === null || _a === void 0 ? void 0 : _a.chat) === null || _b === void 0 ? void 0 : _b.editTextMessage(this.editingMessage.id, e.detail));
247
+ }
248
+ finally {
249
+ this.isSendingMessage = false;
250
+ this.editingMessage = null;
251
+ }
488
252
  };
489
253
  this.onEditCancel = () => {
490
254
  this.editingMessage = null;
@@ -499,35 +263,54 @@ const RtkChat = class {
499
263
  }
500
264
  };
501
265
  this.onDeleteMessage = (event) => {
266
+ var _a;
502
267
  const message = event.detail;
268
+ if (((_a = this.editingMessage) === null || _a === void 0 ? void 0 : _a.id) === message.id) {
269
+ this.editingMessage = null;
270
+ }
271
+ try {
272
+ if (typeof localStorage !== 'undefined') {
273
+ const keysToRemove = [];
274
+ for (let i = 0; i < localStorage.length; i++) {
275
+ const key = localStorage.key(i);
276
+ if (key && key.startsWith('rtk-chat-edit-') && key.endsWith(`-${message.id}`)) {
277
+ keysToRemove.push(key);
278
+ }
279
+ }
280
+ keysToRemove.forEach((key) => localStorage.removeItem(key));
281
+ }
282
+ }
283
+ catch (_b) {
284
+ // ignore storage access errors
285
+ }
503
286
  this.meeting.chat.deleteMessage(message.id);
504
287
  };
505
- this.getPrivateChatRecipients = () => {
506
- const participants = this.getFilteredParticipants().map((participant) => {
507
- const key = generateChatGroupKey([participant.userId, this.meeting.self.userId]);
508
- const result = {
509
- id: participant.userId,
510
- name: participant.name,
511
- avatarUrl: participant.picture,
512
- unreadCount: this.unreadCountGroups[key],
513
- };
514
- return result;
515
- });
516
- const everyone = {
517
- id: 'everyone',
518
- name: this.t('chat.everyone'),
519
- icon: 'participants',
520
- unreadCount: this.unreadCountGroups['everyone'],
521
- };
522
- return [everyone, ...participants];
288
+ this.onMessageEdit = (event) => {
289
+ const message = event.detail;
290
+ if (message.type !== 'text')
291
+ return;
292
+ this.replyMessage = null;
293
+ this.editingMessage = message;
523
294
  };
524
- this.onTogglePinnedMessages = () => {
525
- this.showPinnedMessages = !this.showPinnedMessages;
295
+ this.getPinnedMessageLabel = (message) => {
296
+ if (message.type === 'text')
297
+ return message.message;
298
+ if (message.type === 'image')
299
+ return 'Image';
300
+ if (message.type === 'file')
301
+ return 'File';
302
+ return '';
526
303
  };
527
304
  this.renderPinnedMessagesHeader = () => {
528
305
  if (this.meeting.chat.pinned.length === 0)
529
306
  return null;
530
- return (h("rtk-tooltip", { label: this.t('chat.toggle_pinned_msgs') }, h("div", { class: { 'pinned-messages-header': true, active: this.showPinnedMessages }, onClick: this.onTogglePinnedMessages }, h("rtk-icon", { icon: this.iconPack.pin }), this.t('chat.pinned_msgs'), ` (${this.meeting.chat.pinned.length})`)));
307
+ /**
308
+ * We do not display a picture against the avatar because the chatMessage API does not provide it.
309
+ */
310
+ return (h("div", { class: "pinned-messages" }, h("div", { class: "pinned-messages-header", onClick: () => (this.showPinnedMessages = !this.showPinnedMessages) }, h("div", null, h("rtk-icon", { icon: this.iconPack.pin, size: "sm" }), this.t('chat.pinned_msgs'), ` (${this.meeting.chat.pinned.length})`), h("rtk-icon", { icon: this.showPinnedMessages ? this.iconPack.chevron_up : this.iconPack.chevron_down, size: "sm" })), this.showPinnedMessages && (h("div", { class: "pinned-messages-content scrollbar" }, this.meeting.chat.pinned.map((message) => {
311
+ const label = this.getPinnedMessageLabel(message);
312
+ return (h("div", { class: "pinned-message" }, h("rtk-avatar", { class: "pinned-message-avatar", participant: { name: message.displayName, picture: '' }, size: "sm" }), h("span", null, label.length > 20 ? `${label.substring(0, 20)}...` : label)));
313
+ })))));
531
314
  };
532
315
  }
533
316
  connectedCallback() {
@@ -658,11 +441,7 @@ const RtkChat = class {
658
441
  }
659
442
  return peerIds;
660
443
  }
661
- channelSwitchListener(e) {
662
- this.onChannelChanged(e);
663
- }
664
444
  renderComposerUI() {
665
- var _a, _b, _c;
666
445
  if (this.chatRecipientId === 'everyone') {
667
446
  if (!this.canSendTextMessage && !this.canSendFiles)
668
447
  return null;
@@ -674,18 +453,18 @@ const RtkChat = class {
674
453
  const uiProps = { iconPack: this.iconPack, t: this.t, size: this.size };
675
454
  const message = this.editingMessage ? this.editingMessage.message : '';
676
455
  const quotedMessage = this.replyMessage ? this.replyMessage.message : '';
677
- return (h("rtk-chat-composer-view", Object.assign({ message: message, storageKey: (_a = this.selectedChannelId) !== null && _a !== void 0 ? _a : `draft-${this.selectedChannelId}`, quotedMessage: quotedMessage, isEditing: !!this.editingMessage, canSendTextMessage: this.isTextMessagingAllowed(), canSendFiles: this.isFileMessagingAllowed(), disableEmojiPicker: !!((_c = (_b = this.meeting) === null || _b === void 0 ? void 0 : _b.__internals__) === null || _c === void 0 ? void 0 : _c.features.hasFeature(FlagsmithFeatureFlags.DISABLE_EMOJI_PICKER)), maxLength: this.meeting.chat.maxTextLimit, rateLimits: this.meeting.chat.rateLimits, inputTextPlaceholder: this.t('chat.message_placeholder'), onNewMessage: this.onNewMessageHandler, onEditMessage: this.onEditMessageHandler, onEditCancel: this.onEditCancel, onQuotedMessageDismiss: this.onQuotedMessageDismiss }, uiProps), h("slot", { name: "chat-addon", slot: "chat-addon" })));
456
+ const draftStorageKey = 'rtk-chat-draft';
457
+ const editStorageKey = this.editingMessage
458
+ ? `rtk-chat-edit-${'no-channel'}-${this.editingMessage.id}`
459
+ : 'rtk-chat-edit';
460
+ const storageKey = this.editingMessage ? editStorageKey : draftStorageKey;
461
+ return (h("rtk-chat-composer-view", Object.assign({ message: message, storageKey: storageKey, quotedMessage: quotedMessage, isEditing: !!this.editingMessage, isSending: this.isSendingMessage, canSendTextMessage: this.isTextMessagingAllowed(), canSendFiles: this.isFileMessagingAllowed(), disableEmojiPicker: this.overrides.disableEmojiPicker, maxLength: this.meeting.chat.maxTextLimit, rateLimits: this.meeting.chat.rateLimits, inputTextPlaceholder: this.t('chat.message_placeholder'), onNewMessage: this.onNewMessageHandler, onEditMessage: this.onEditMessageHandler, onEditCancel: this.onEditCancel, onQuotedMessageDismiss: this.onQuotedMessageDismiss }, uiProps), h("slot", { name: "chat-addon", slot: "chat-addon" })));
678
462
  }
679
463
  render() {
680
- var _a;
681
464
  if (!this.meeting) {
682
465
  return null;
683
466
  }
684
- let chatMessages = this.chatGroups[this.selectedGroup] || [];
685
- if (this.showPinnedMessages && this.meeting.chat.pinned.length !== 0) {
686
- chatMessages = chatMessages.filter((chat) => chat.type === 'chat' && chat.message.pinned);
687
- }
688
- return (h(Host, null, h("div", { class: "chat-container" }, h("div", { class: "chat" }, this.isFileMessagingAllowed() && (h("div", { id: "dropzone", class: { active: this.dropzoneActivated }, part: "dropzone" }, h("rtk-icon", { icon: this.iconPack.attach }), h("p", null, this.t('chat.send_attachment')))), this.renderPinnedMessagesHeader(), this.isPrivateChatSupported() && (h("rtk-channel-selector-view", { channels: this.getPrivateChatRecipients(), selectedChannelId: ((_a = this.selectedParticipant) === null || _a === void 0 ? void 0 : _a.userId) || 'everyone', onChannelChange: this.updateRecipients, t: this.t, viewAs: "dropdown" })), h("rtk-chat-messages-ui-paginated", { meeting: this.meeting, onPinMessage: this.onPinMessage, onDeleteMessage: this.onDeleteMessage, size: this.size, iconPack: this.iconPack, t: this.t }), this.renderComposerUI()))));
467
+ return (h(Host, null, h("div", { class: "chat-container" }, h("div", { class: "chat" }, this.isFileMessagingAllowed() && (h("div", { id: "dropzone", class: { active: this.dropzoneActivated }, part: "dropzone" }, h("rtk-icon", { icon: this.iconPack.attach }), h("p", null, this.t('chat.send_attachment')))), this.renderPinnedMessagesHeader(), h("rtk-chat-messages-ui-paginated", { meeting: this.meeting, onPinMessage: this.onPinMessage, onEditMessage: this.onMessageEdit, onDeleteMessage: this.onDeleteMessage, size: this.size, iconPack: this.iconPack, t: this.t }), this.renderComposerUI()))));
689
468
  }
690
469
  get host() { return getElement(this); }
691
470
  static get watchers() { return {
@@ -706,6 +485,9 @@ __decorate$f([
706
485
  __decorate$f([
707
486
  SyncWithStore()
708
487
  ], RtkChat.prototype, "t", void 0);
488
+ __decorate$f([
489
+ SyncWithStore()
490
+ ], RtkChat.prototype, "overrides", void 0);
709
491
  RtkChat.style = RtkChatStyle0;
710
492
 
711
493
  const rtkChatComposerViewCss = ":host {\n display: flex;\n flex-direction: column;\n font-family: var(--rtk-font-family, sans-serif);\n font-size: 14px;\n position: relative;\n}\n\n.quoted-message-container {\n margin-bottom: var(--rtk-space-2, 8px);\n display: flex;\n justify-content: space-between;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n border-radius: var(--rtk-border-radius-md, 8px);\n border: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));\n}\n\n.quoted-message-container .quoted-message {\n flex: 1 1 0%;\n padding: var(--rtk-space-2, 8px);\n border-radius: var(--rtk-border-radius-md, 8px);\n max-height: var(--rtk-space-24, 96px);\n overflow-y: auto;\n word-break: break-all;\n}\n\n.quoted-message-container .quoted-message blockquote {\n display: none;\n}\n\n.quoted-message-container rtk-icon.dismiss {\n margin-left: auto;\n height: var(--rtk-space-5, 20px);\n width: var(--rtk-space-5, 20px);\n padding: var(--rtk-space-2, 8px);\n border-radius: var(--rtk-border-radius-md, 8px);\n color: rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));\n}\n\n.quoted-message-container rtk-icon.dismiss:hover {\n cursor: pointer;\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n}\n\n.quoted-message-container rtk-icon.dismiss {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.composer-container {\n position: relative;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));\n border-radius: var(--rtk-border-radius-md, 8px);\n overflow: hidden;\n border: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));\n}\n\n.composer-container > .composers {\n min-height: 60px;\n }\n\n@container chatcontainer (height < 360px) {\n .composer-container > .composers {\n min-height: 30px;\n }\n}\n\n.chat-buttons {\n padding: var(--rtk-space-3, 12px);\n display: flex;\n align-items: center;\n justify-content: space-between;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n}\n\n.chat-buttons .right {\n z-index: 10;\n}\n\n.chat-buttons .right .edit-buttons {\n display: flex;\n gap: var(--rtk-space-2, 8px);\n}\n\n.chat-buttons > div {\n display: flex;\n align-items: center;\n}\n\nrtk-emoji-picker {\n z-index: 20;\n position: absolute;\n top: calc(var(--rtk-space-72, 288px) * -1);\n border-top: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));\n animation: 0.3s slide-up ease;\n}\n\n@keyframes slide-up {\n from {\n transform: translateY(100%);\n }\n to {\n transform: translateY(0%);\n }\n}\n";
@@ -734,6 +516,7 @@ const RtkChatComposerView = class {
734
516
  this.onQuotedMessageDismiss = createEvent(this, "quotedMessageDismiss", 7);
735
517
  /** Whether user can send text messages */
736
518
  this.canSendTextMessage = true;
519
+ this.isSending = false;
737
520
  /** Whether user can send file messages */
738
521
  this.canSendFiles = true;
739
522
  /** Message to be pre-populated */
@@ -794,15 +577,7 @@ const RtkChatComposerView = class {
794
577
  messageLimits.messagesSent += 1;
795
578
  this.checkRateLimitBreached(currentTime);
796
579
  if (message.length > 0) {
797
- if (this.quotedMessage.length !== 0) {
798
- this.onNewMessage.emit({
799
- type: 'text',
800
- message,
801
- });
802
- }
803
- else {
804
- this.onNewMessage.emit({ type: 'text', message });
805
- }
580
+ this.onNewMessage.emit({ type: 'text', message });
806
581
  this.cleanup();
807
582
  }
808
583
  };
@@ -886,17 +661,17 @@ const RtkChatComposerView = class {
886
661
  render() {
887
662
  var _a;
888
663
  const uiProps = { iconPack: this.iconPack, t: this.t };
889
- return (h(Host, { key: '06455539e3067eb1c1c592b551d0ef99eba2f331' }, this.canSendTextMessage && this.isEmojiPickerOpen && (h("rtk-emoji-picker", Object.assign({ key: 'fe83b0ab9562cc0e1c61f89e4b441ef592edfa1a', part: "emoji-picker", onPickerClose: () => {
664
+ return (h(Host, { key: '2df23422579c855ced1cb6d24bb95786a1326baf' }, this.canSendTextMessage && this.isEmojiPickerOpen && (h("rtk-emoji-picker", Object.assign({ key: 'a7ed280a636d0207f58f0ad13f79c1eaed52ab9c', part: "emoji-picker", onPickerClose: () => {
890
665
  this.isEmojiPickerOpen = false;
891
666
  }, onRtkEmojiClicked: (e) => {
892
667
  this.textMessage += e.detail;
893
668
  this.$textComposer.setText(this.textMessage, true);
894
- } }, uiProps))), h("slot", { key: '8653c2e805e41adf5958941cc10ff01d43f97792', name: "chat-addon" }), this.quotedMessage && this.quotedMessage.length !== 0 && (h("div", { key: '82b9bf5203a799709e980d61ab827b9daf8292e6', class: "quoted-message-container", part: "quoted-message-container" }, h("div", { key: '4b9fe8f382da7075e815c329f2d7dca17ce0f694', class: "quoted-message scrollbar" }, h("rtk-text-message-view", { key: '7a16547e83d9bca43794e46e56c5a9c743a9929a', text: this.quotedMessage, isMarkdown: true })), h("div", { key: '5691b8d882016cda66cd2faf3858bc38cd53458c' }, h("rtk-icon", { key: '2d5b222bd5eaac6d46812b704674f52f86efdb92', "aria-label": this.t('dismiss'), class: "dismiss", icon: this.iconPack.dismiss, onClick: this.onQuotedMessageDismissHandler })))), h("div", { key: 'd7638411df9ae1b2cbef8cae66d0af2b7ad310e6', class: "composer-container" }, h("div", { key: 'ca1ee222584fdd27e53989d28b6ce583c6b0c400', class: "composers" }, this.fileToUpload && (h("rtk-draft-attachment-view", Object.assign({ key: 'd511c900c71a97f8f92640b73a7575dcd267de88' }, uiProps, { attachment: this.fileToUpload, onDeleteAttachment: () => (this.fileToUpload = null) }))), !this.fileToUpload && (h("rtk-text-composer-view", { key: '08f214184853dcedeccb5f07dac2a0a308269793', value: this.textMessage, placeholder: this.inputTextPlaceholder, onTextChange: this.onTextChangeHandler, keyDownHandler: this.onKeyDownHandler, maxLength: (_a = this.maxLength) !== null && _a !== void 0 ? _a : MAX_TEXT_LENGTH, rateLimitBreached: this.rateLimitsBreached, t: this.t, iconPack: this.iconPack, ref: (el) => (this.$textComposer = el) }))), h("div", { key: '9b6cbe7cb8529c8e60f8cc9e13cc95ca64504efc', class: "chat-buttons", part: "chat-buttons" }, h("div", { key: '30e24e8edf58179ef20ccd436d3833ba177ebb0d', class: "left", part: "chat-buttons-left" }, !this.fileToUpload && !this.isEditing && (h("div", { key: '54ad294bedab1c0bc7c02a72c4f3f51bc10bba85' }, this.canSendFiles && [
895
- h("rtk-file-picker-button", Object.assign({ key: '1a0760e05a183b6c8da2ff02e33ecd40bfdb6e97' }, uiProps, { onFileChange: (event) => this.onFileUploadHandler('file', event.detail) })),
896
- h("rtk-file-picker-button", Object.assign({ key: '5d6cf1928c8edb6737b367807c93152ad62cea36', filter: "image/*", label: this.t('chat.send_img'), icon: "image", onFileChange: (event) => this.onFileUploadHandler('image', event.detail) }, uiProps)),
897
- ], this.canSendTextMessage && !this.disableEmojiPicker && (h("rtk-emoji-picker-button", Object.assign({ key: '50f14152b8d15009104e9b1dd05ee5e1ec49ab16', isActive: this.isEmojiPickerOpen, onClick: () => {
669
+ } }, uiProps))), h("slot", { key: '759df2a2029fbba963cfc26cd871771881dd6c5e', name: "chat-addon" }), this.quotedMessage && this.quotedMessage.length !== 0 && (h("div", { key: '413be05a7374fc76f790ad3f6f5bef5a56a6ef97', class: "quoted-message-container", part: "quoted-message-container" }, h("div", { key: '7fb6b571103c675dca202b74bd07fd55062dab70', class: "quoted-message scrollbar" }, h("rtk-text-message-view", { key: '3997aa719a746234c5641e976dd0c27e68b69dae', text: this.quotedMessage, isMarkdown: true })), h("div", { key: 'f76ec54e3d67d6957d5d152b144b22d8cc122660' }, h("rtk-icon", { key: '897b52fc41814d2cb8beeb461c36c9843cb2869e', "aria-label": this.t('dismiss'), class: "dismiss", icon: this.iconPack.dismiss, onClick: this.onQuotedMessageDismissHandler })))), h("div", { key: '35447eb1fffffd372c231bc76ce741e483e7f26a', class: "composer-container" }, h("div", { key: '0f8f198df49fcc27f6c85b8d6909eb2a7c00e142', class: "composers" }, this.fileToUpload && (h("rtk-draft-attachment-view", Object.assign({ key: '9d325d05fecb12ecb41f02e54561d2e1b59b2c2f' }, uiProps, { attachment: this.fileToUpload, onDeleteAttachment: () => (this.fileToUpload = null) }))), !this.fileToUpload && (h("rtk-text-composer-view", { key: 'fbc870bb9d9c2418e528e64273edb67846e23e17', value: this.textMessage, placeholder: this.inputTextPlaceholder, onTextChange: this.onTextChangeHandler, keyDownHandler: this.onKeyDownHandler, maxLength: (_a = this.maxLength) !== null && _a !== void 0 ? _a : MAX_TEXT_LENGTH, rateLimitBreached: this.rateLimitsBreached, t: this.t, iconPack: this.iconPack, ref: (el) => (this.$textComposer = el) }))), h("div", { key: '20191403531eb87bca86d13387c7937153a4c99e', class: "chat-buttons", part: "chat-buttons" }, h("div", { key: '4914a61fea3f502dc14778a237e9ce35a97e3afc', class: "left", part: "chat-buttons-left" }, !this.fileToUpload && !this.isEditing && (h("div", { key: '76c843588f2f7d90f5e60a1e44955309026eda27' }, this.canSendFiles && [
670
+ h("rtk-file-picker-button", Object.assign({ key: 'cbb6f17b22f10b48ada27a4b4da3c1d5b2c7e320' }, uiProps, { onFileChange: (event) => this.onFileUploadHandler('file', event.detail) })),
671
+ h("rtk-file-picker-button", Object.assign({ key: '0868162a2da021dd4175e977adf47d72ca54044a', filter: "image/*", label: this.t('chat.send_img'), icon: "image", onFileChange: (event) => this.onFileUploadHandler('image', event.detail) }, uiProps)),
672
+ ], this.canSendTextMessage && !this.disableEmojiPicker && (h("rtk-emoji-picker-button", Object.assign({ key: 'a73378b5495dc3bfcde7dba335f674292ee6a96c', isActive: this.isEmojiPickerOpen, onClick: () => {
898
673
  this.isEmojiPickerOpen = !this.isEmojiPickerOpen;
899
- } }, uiProps))), h("slot", { key: '1e1fe81e1e196fc8d679bfc2d6ed0c6402c74a4a', name: "chat-buttons" })))), h("div", { key: '272526b7c81ed1acd028beceb3869c584e94308f', class: "right", part: "chat-buttons-right" }, !this.isEditing && (h("rtk-tooltip", { key: '6750abf323b2f1c951661c44390eb97d3ec71544', variant: "primary", label: this.t('chat.send_msg'), delay: 2000 }, h("rtk-button", { key: 'a159fa6dcc1f8ede64085abd8286a69ad86b7002', kind: "icon", disabled: this.disableSendButton, onClick: () => this.handleSendMessage(), title: this.t('chat.send_msg') }, h("rtk-icon", { key: 'bb26a3a7954727859f5566ecc60d746ac6700b7b', icon: this.iconPack.send })))), this.isEditing && (h("div", { key: '5ef512e3fc236510a518e76ce027f0c8fc1c9a0c', class: "edit-buttons" }, h("rtk-tooltip", { key: 'e18ae7567350d32b18a70de8cb2c1af0830353bc', variant: "secondary", label: this.t('cancel'), delay: 2000 }, h("rtk-button", { key: '4f4aa2e44308a393314ab95244c87a3b8d4b282c', kind: "icon", variant: "secondary", onClick: () => this.handleEditCancel(), title: this.t('cancel') }, h("rtk-icon", { key: 'a4a99fe9ae34707cb63f63461a4728baf70e3e7a', icon: this.iconPack.dismiss }))), h("rtk-tooltip", { key: '789315dbf551ba74d004459981532fa9a467ac45', variant: "primary", label: this.t('chat.update_msg'), delay: 2000 }, h("rtk-button", { key: '61da43993c2da9b8bd00796544030e9b4cb45f12', kind: "icon", onClick: () => this.handleEditMessage(), title: this.t('chat.send_msg') }, h("rtk-icon", { key: 'e45aab29b0f6553ed2d7f370a8817bdccdabe42e', icon: this.iconPack.checkmark }))))))))));
674
+ } }, uiProps))), h("slot", { key: '31208ad279dec430da4527d22730de8e418bc722', name: "chat-buttons" })))), h("div", { key: '04fcdd3f690548cbf1e257ffb2982785e557726b', class: "right", part: "chat-buttons-right" }, !this.isEditing && (h("rtk-tooltip", { key: '367bf710673a0a2276f46d52289409abb77fe27b', variant: "primary", label: this.t('chat.send_msg'), delay: 2000 }, h("rtk-button", { key: 'c677e3026636c375ed7eee411c596f6d2a802794', kind: "icon", disabled: this.disableSendButton || this.isSending, onClick: () => this.handleSendMessage(), title: this.t('chat.send_msg') }, this.isSending ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.send }))))), this.isEditing && (h("div", { key: '1e09e8868e4ae048b36bc8198b8aa1de92209a00', class: "edit-buttons" }, h("rtk-tooltip", { key: '29ff7a39bd168169fa7d104357b529a2c9efe0fd', variant: "secondary", label: this.t('cancel'), delay: 2000 }, h("rtk-button", { key: '27cf5353d0e8c2620fd8d4213994a9dcc83f83f3', kind: "icon", variant: "secondary", onClick: () => this.handleEditCancel(), title: this.t('cancel') }, h("rtk-icon", { key: 'aeb4c9df3993c6cebf952f64f6676eb8a3866bb0', icon: this.iconPack.dismiss }))), h("rtk-tooltip", { key: '835195d0f51a1db81e66a1b2d9076a71f2aaee4e', variant: "primary", label: this.t('chat.update_msg'), delay: 2000 }, h("rtk-button", { key: 'd524f01ba5d7ca52224d39e23e7f963972ad80c9', kind: "icon", onClick: () => this.handleEditMessage(), title: this.t('chat.send_msg') }, this.isSending ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.checkmark })))))))))));
900
675
  }
901
676
  };
902
677
  __decorate$e([
@@ -925,6 +700,7 @@ const RtkChatMessagesUiPaginated = class {
925
700
  registerInstance(this, hostRef);
926
701
  this.editMessageInit = createEvent(this, "editMessageInit", 7);
927
702
  this.onPinMessage = createEvent(this, "pinMessage", 7);
703
+ this.onEditMessage = createEvent(this, "editMessage", 7);
928
704
  this.onDeleteMessage = createEvent(this, "deleteMessage", 7);
929
705
  this.stateUpdate = createEvent(this, "rtkStateUpdate", 7);
930
706
  /** Icon pack */
@@ -935,26 +711,14 @@ const RtkChatMessagesUiPaginated = class {
935
711
  this.leftAlign = false;
936
712
  this.permissionsChanged = false;
937
713
  this.pageSize = 25;
938
- this.lastReadMessageIndex = -1;
939
714
  this.permissionsUpdateListener = () => {
940
715
  this.permissionsChanged = !this.permissionsChanged;
941
716
  };
942
- this.maybeMarkChannelAsRead = (messages) => {
943
- if (!this.selectedChannelId)
944
- return;
945
- if (messages.length === 0)
946
- return;
947
- if (this.lastReadMessageIndex !== -1)
948
- return;
949
- const latestMsg = messages.at(0).time > messages.at(-1).time ? messages.at(0) : messages.at(-1);
950
- if (!latestMsg.channelIndex)
951
- return;
952
- this.lastReadMessageIndex = parseInt(latestMsg.channelIndex, 10);
953
- this.meeting.chat.markLastReadMessage(this.selectedChannelId, latestMsg);
954
- };
717
+ // TODO: Implement the logic to mark messages as read. Old usages have been kept as-is.
718
+ this.maybeMarkChatAsRead = (_messages) => { };
955
719
  this.getChatMessages = async (timestamp, size, reversed) => {
956
- const { messages } = await this.meeting.chat.getMessages(timestamp, size, reversed, undefined, this.selectedChannelId);
957
- this.maybeMarkChannelAsRead(messages);
720
+ const { messages } = await this.meeting.chat.getMessages(timestamp, size, reversed, undefined);
721
+ this.maybeMarkChatAsRead(messages);
958
722
  return messages;
959
723
  };
960
724
  this.createChatNodes = (data) => {
@@ -975,22 +739,18 @@ const RtkChatMessagesUiPaginated = class {
975
739
  };
976
740
  this.getMessageActions = (message) => {
977
741
  const actions = [];
978
- // const isSelf = this.meeting.self.userId === message.userId;
979
- // const chatMessagePermissions = this.meeting.self.permissions?.chatMessage;
980
- // const canEdit =
981
- // chatMessagePermissions === undefined
982
- // ? isSelf
983
- // : chatMessagePermissions.canEdit === 'ALL' ||
984
- // (chatMessagePermissions.canEdit === 'SELF' && isSelf);
985
- const canDelete = message.userId === this.meeting.self.userId;
986
- if (this.meeting.self.permissions.pinParticipant) {
742
+ const messageBelongsToSelf = message.userId === this.meeting.self.userId;
743
+ actions.push({
744
+ id: 'pin_message',
745
+ label: message.pinned ? this.t('unpin') : this.t('pin'),
746
+ icon: this.iconPack.pin,
747
+ });
748
+ if (messageBelongsToSelf) {
987
749
  actions.push({
988
- id: 'pin_message',
989
- label: message.pinned ? this.t('unpin') : this.t('pin'),
990
- icon: this.iconPack.pin,
750
+ id: 'edit_message',
751
+ label: this.t('chat.edit_msg'),
752
+ icon: this.iconPack.edit,
991
753
  });
992
- }
993
- if (canDelete) {
994
754
  actions.push({
995
755
  id: 'delete_message',
996
756
  label: this.t('chat.delete_msg'),
@@ -1004,6 +764,9 @@ const RtkChatMessagesUiPaginated = class {
1004
764
  case 'pin_message':
1005
765
  this.onPinMessage.emit(message);
1006
766
  break;
767
+ case 'edit_message':
768
+ this.onEditMessage.emit(message);
769
+ break;
1007
770
  case 'delete_message':
1008
771
  this.onDeleteMessage.emit(message);
1009
772
  break;
@@ -1032,17 +795,14 @@ const RtkChatMessagesUiPaginated = class {
1032
795
  }
1033
796
  const isSelf = message.userId === this.meeting.self.userId;
1034
797
  const viewType = isSelf ? 'outgoing' : 'incoming';
1035
- return (h("div", { class: { pinned: message.pinned } }, h("div", { class: "message-wrapper" }, h("rtk-message-view", { time: message.time, actions: this.getMessageActions(message), authorName: message.displayName, isSelf: isSelf, avatarUrl: displayPicture, hideAuthorName: isContinued, viewType: viewType, variant: "bubble", onAction: (event) => this.onMessageActionHandler(event.detail, message) }, h("div", null, h("div", { class: "body" }, message.type === 'text' && (h("rtk-text-message-view", { text: message.message, isMarkdown: true })), message.type === 'file' && (h("rtk-file-message-view", { name: message.name, url: message.link, size: message.size })), message.type === 'image' && (h("rtk-image-message-view", { url: message.link, onPreview: () => {
798
+ return (h("div", null, h("div", { class: "message-wrapper", id: message.id }, h("rtk-message-view", { messageType: message.type, pinned: message.pinned, isEdited: message.isEdited, time: message.time, actions: this.getMessageActions(message), authorName: message.displayName, isSelf: isSelf, avatarUrl: displayPicture, hideAuthorName: isContinued, viewType: viewType, variant: "bubble", onAction: (event) => this.onMessageActionHandler(event.detail, message) }, h("div", null, h("div", { class: "body" }, message.type === 'text' && (h("rtk-text-message-view", { text: message.message, isMarkdown: true })), message.type === 'file' && (h("rtk-file-message-view", { name: message.name, url: message.link, size: message.size })), message.type === 'image' && (h("rtk-image-message-view", { url: message.link, onPreview: () => {
1036
799
  this.stateUpdate.emit({ image: message });
1037
- } }))), message.pinned && (h("div", { class: "pin-icon", part: "pin-icon" }, h("rtk-icon", { icon: this.iconPack.pin, size: "sm" }))))))));
800
+ } }))))))));
1038
801
  };
1039
802
  this.chatUpdateListener = (data) => {
1040
- if (this.selectedChannelId && data.message.channelId !== this.selectedChannelId)
1041
- return;
1042
803
  if (data.action === 'add') {
1043
804
  this.$paginatedListRef.onNewNode(data.message);
1044
- this.lastReadMessageIndex = -1;
1045
- this.maybeMarkChannelAsRead([data.message]);
805
+ this.maybeMarkChatAsRead([data.message]);
1046
806
  }
1047
807
  else if (data.action === 'delete') {
1048
808
  this.$paginatedListRef.onNodeDelete(data.message.id);
@@ -1076,16 +836,12 @@ const RtkChatMessagesUiPaginated = class {
1076
836
  }
1077
837
  this.permissionsUpdateListener();
1078
838
  }
1079
- channelChanged() {
1080
- this.lastReadMessageIndex = -1;
1081
- }
1082
839
  render() {
1083
- return (h(Host, { key: '732dea776303ba428aedc72608516a4e4dfc1591' }, h("rtk-paginated-list", { key: '6bc3cd1373ff487b897d3ca7a5bfbccfdbaa90da', ref: (el) => (this.$paginatedListRef = el), pageSize: this.pageSize, pagesAllowed: 3, fetchData: this.getChatMessages, createNodes: this.createChatNodes, selectedItemId: this.selectedChannelId, emptyListLabel: this.t('chat.empty_channel') }, h("slot", { key: 'f3cc795b3b39aa48f87f9908e3b205e2db6439b4' }))));
840
+ return (h(Host, { key: 'a574f0d8e0c7b1249568db270c73f45ad81fd8e2' }, h("rtk-paginated-list", { key: '279cf0d1c114c93f009a03779f026f6a7bb6ddf4', ref: (el) => (this.$paginatedListRef = el), pageSize: this.pageSize, pagesAllowed: 3, fetchData: this.getChatMessages, createNodes: this.createChatNodes, emptyListLabel: this.t('chat.empty_chat') }, h("slot", { key: 'cf28a28970c38375cda7492518fa8ed17802580e' }))));
1084
841
  }
1085
842
  get host() { return getElement(this); }
1086
843
  static get watchers() { return {
1087
- "meeting": ["meetingChanged"],
1088
- "selectedChannelId": ["channelChanged"]
844
+ "meeting": ["meetingChanged"]
1089
845
  }; }
1090
846
  };
1091
847
  __decorate$d([
@@ -1153,7 +909,7 @@ const RtkDraftAttachmentView = class {
1153
909
  this.onAttachmentChange();
1154
910
  }
1155
911
  render() {
1156
- return (h(Host, { key: 'b23eb412c60a62f542aec0e3cd3b99fc72de48f0' }, h("div", { key: '04251f8d4b13325f8474110c89733369bd8904f2', class: "preview-overlay" }, h("div", { key: '51963510a704b19e7c591ea177018bae6e0317f5', class: "preview" }, h("rtk-tooltip", { key: '3a2167ea7a02f1d744462826084f0fef5c607ac9', label: this.t('chat.cancel_upload') }, h("rtk-button", { key: '634c9a7e0962ed82c36519e919eb597c9b603f51', variant: "secondary", kind: "icon", onClick: this.onDeleteClickHandler }, h("rtk-icon", { key: 'b936e54ae44e1d54b73adf38a92551fbea0299c5', icon: this.iconPack.dismiss }))), this.attachment.type === 'image' ? (h("img", { class: "preview-image", src: this.filePreview })) : (h("div", { class: "preview-file" }, h("span", null, this.filePreview)))))));
912
+ return (h(Host, { key: '5dc2f4f2904db3b33f3682f353010b7d5d3db2d5' }, h("div", { key: 'b10dfebd718959e55a18db4c31cded17af4fa9fd', class: "preview-overlay" }, h("div", { key: '3c4cff755b989547d7c348271ca8bd02618e50f5', class: "preview" }, h("rtk-tooltip", { key: '172e504a86963d269935a49da8b7a6c51da7dc71', label: this.t('chat.cancel_upload') }, h("rtk-button", { key: '421a172fd744cb65b066a4cb13f81d80e8fc7594', variant: "secondary", kind: "icon", onClick: this.onDeleteClickHandler }, h("rtk-icon", { key: '1b030c644ea7eec33cc760b947fbcc5d679a1abb', icon: this.iconPack.dismiss }))), this.attachment.type === 'image' ? (h("img", { class: "preview-image", src: this.filePreview })) : (h("div", { class: "preview-file" }, h("span", null, this.filePreview)))))));
1157
913
  }
1158
914
  static get watchers() { return {
1159
915
  "attachment": ["onAttachmentChange"]
@@ -1238,7 +994,7 @@ const RtkEmojiPicker = class {
1238
994
  return (h("div", { id: "emoji-grid", class: "scrollbar max-w-40" }, this.filteredEmojis.map((e) => (h("rtk-button", { key: `emoji-button-${e.name}`, class: "emoji", variant: "ghost", kind: "icon", title: e.name, onClick: () => this.handleEmojiClick(e.emoji) }, e.emoji)))));
1239
995
  }
1240
996
  render() {
1241
- return (h(Host, { key: 'e099d5996a16c659de17ca9a36fcd79a9f02f400' }, h("div", { key: '2a3e300c9625b877feb2b6780df7d1a9851cb7f3', class: 'close-parent' }, h("rtk-button", { key: '7ca8421704136d09d107d1f7392ba393d5f59a9a', variant: "ghost", kind: "icon", class: "close", onClick: () => { var _a; return (_a = this.pickerClose) === null || _a === void 0 ? void 0 : _a.emit(); }, "aria-label": this.t('close') }, h("rtk-icon", { key: '040069093f7243bf5075d55b2c081c564d885a8f', icon: this.iconPack.dismiss }))), h("div", { key: '372a32be35dea5200323720e221424b5138cc4ab', class: 'emoji-parent' }, h("input", { key: 'fae2be13d736adbb99212146498f00d4f395636e', value: this.filterVal, onInput: (event) => this.handleInputChange(event.target), placeholder: this.t('search'), ref: (el) => (this.inputElement = el) }), this.mapEmojiList())));
997
+ return (h(Host, { key: '13b76b472a4edf495e7bfdf5ac5d09c02c8c383c' }, h("div", { key: '7cc0a162ffce7699ba8a52a03503b47bb5cf99ef', class: 'close-parent' }, h("rtk-button", { key: '4f42ddea82a1e67e01a05cbb66aa6de0116a424b', variant: "ghost", kind: "icon", class: "close", onClick: () => { var _a; return (_a = this.pickerClose) === null || _a === void 0 ? void 0 : _a.emit(); }, "aria-label": this.t('close') }, h("rtk-icon", { key: '47931529abc70c2cc0799254f7012bc3d622df39', icon: this.iconPack.dismiss }))), h("div", { key: '91c1356be602e7d894c29793df4ea4f83cc3e2a7', class: 'emoji-parent' }, h("input", { key: '2e141a5bf7f4e9376f9d83d443937b39637e1caf', value: this.filterVal, onInput: (event) => this.handleInputChange(event.target), placeholder: this.t('search'), ref: (el) => (this.inputElement = el) }), this.mapEmojiList())));
1242
998
  }
1243
999
  };
1244
1000
  __decorate$b([
@@ -1271,7 +1027,7 @@ const RtkEmojiPickerButton = class {
1271
1027
  this.t = useLanguage();
1272
1028
  }
1273
1029
  render() {
1274
- return (h("rtk-tooltip", { key: 'bcde14fb2c3a6544882502e65ffda7a6b3b6f13d', label: this.t('chat.send_emoji') }, h("rtk-button", { key: 'd82fa78c4ffe48c24131a6e38f087548f540fefa', variant: "ghost", kind: "icon", class: { active: this.isActive }, title: this.t('chat.send_emoji') }, h("rtk-icon", { key: '791bbe2537f1aeb064c5e9ccbbf4af37b706ec2a', icon: this.iconPack.emoji_multiple }))));
1030
+ return (h("rtk-tooltip", { key: '16b0af8b5d8bb121ebbeb80c2f6dd6bc5b53fc06', label: this.t('chat.send_emoji') }, h("rtk-button", { key: 'cb6d682ce5952173cbd2aceeaa9c20bbd7066c79', variant: "ghost", kind: "icon", class: { active: this.isActive }, title: this.t('chat.send_emoji') }, h("rtk-icon", { key: '2f414ed05d6cd4d00393fefbb7d4e745d49210a1', icon: this.iconPack.emoji_multiple }))));
1275
1031
  }
1276
1032
  };
1277
1033
  __decorate$a([
@@ -1302,7 +1058,7 @@ const RtkFileMessageView = class {
1302
1058
  this.iconPack = defaultIconPack;
1303
1059
  }
1304
1060
  render() {
1305
- return (h("div", { key: 'cdd46a1be912f807688dc86671dddd2fa5b9e7c9', class: "file" }, h("rtk-button", { key: '20bd6c448ec64902989cd742a8f18de32e368194', variant: "secondary", kind: "icon", onClick: () => downloadFile(sanitizeLink(this.url), { name: this.name, fallbackName: 'file' }), part: "button" }, h("rtk-icon", { key: '11ac30db5146132be8aaba67a79f66f8aba7bb8d', icon: this.iconPack.download })), h("div", { key: '342dd8daa944a5857a6519339b4d3bfb6c369eda', class: "file-data" }, h("div", { key: 'e161743b75677b1e81d09d7c373be494ccf8411a', class: "name" }, this.name), h("div", { key: '99f2d8d77ef3c129aa0c229260f6e79901ce268c', class: "file-data-split" }, h("div", { key: '7b9beadca2a810c151fb1ad43ee7c47ba451a37a', class: "ext" }, getExtension(this.name)), h("span", { key: 'd55f69a96bbe26c262461fa87f1a0a506854cf59', class: "divider" }), h("div", { key: 'cad33d263ab75aeb3083886e83063b8ccb2ea976', class: "size" }, getFileSize(this.size))))));
1061
+ return (h("div", { key: '8b4778c0c9cff1d4fc5b45e446cd450d7b8b9156', class: "file" }, h("rtk-button", { key: '6c72f68880e3bba50e8e5ebe7abd6127de227178', variant: "secondary", kind: "icon", onClick: () => downloadFile(sanitizeLink(this.url), { name: this.name, fallbackName: 'file' }), part: "button" }, h("rtk-icon", { key: '62be4e65fc87ca1721b3ab1e3e634afb6d45f3b4', icon: this.iconPack.download })), h("div", { key: '407c9ca4a0f1be967f5d2cb08f3c15b814d425bb', class: "file-data" }, h("div", { key: '89fdb171090b4f0500db05bd1ee2908c9f393036', class: "name" }, this.name), h("div", { key: 'fafc637f7077925b9f25dc9615124a18c47ff684', class: "file-data-split" }, h("div", { key: '80f45099fbe958ac7d951af08334509d4bada1e0', class: "ext" }, getExtension(this.name)), h("span", { key: 'befbc0bc7065dbf3cc76c2c20091fa30c2f30a52', class: "divider" }), h("div", { key: '75a2ad121ac602c079eb7e08390a5379ec35f4d8', class: "size" }, getFileSize(this.size))))));
1306
1062
  }
1307
1063
  };
1308
1064
  __decorate$9([
@@ -1358,7 +1114,7 @@ const RtkFilePickerButton = class {
1358
1114
  render() {
1359
1115
  const label = this.label || this.t('chat.send_file');
1360
1116
  const icon = this.iconPack[this.icon];
1361
- return (h("rtk-tooltip", { key: '78ef1fd3a42656601c94561bbfc63f888d8180d3', label: label }, h("rtk-button", { key: 'a0a82e689c2e3a344936db1b3253e36def3a0ce5', variant: "ghost", kind: "icon", onClick: () => this.uploadFile(), title: label }, h("rtk-icon", { key: '1651a9f460e3851ff5296f05cf08554f9da21703', icon: icon }))));
1117
+ return (h("rtk-tooltip", { key: '9a4e6046f0ee0972678b64365e14ed1762a0a23a', label: label }, h("rtk-button", { key: 'e5cdac75458861a2e5258f4bf4af43f818ce599b', variant: "ghost", kind: "icon", onClick: () => this.uploadFile(), title: label }, h("rtk-icon", { key: '17407d82abb9352c64d37e26d1fc4fd407369703', icon: icon }))));
1362
1118
  }
1363
1119
  };
1364
1120
  __decorate$8([
@@ -1389,7 +1145,7 @@ const RtkIcon = class {
1389
1145
  this.size = 'lg';
1390
1146
  }
1391
1147
  render() {
1392
- return (h(Host, { key: 'fbacb1ee3dd4c1ca7aa612f08e938601df73036c' }, h("div", { key: '04c026967cb7aa3acb3fba09fcf5b0d33f45e2b0', class: "icon-wrapper", innerHTML: parseIcon(this.icon), part: "wrapper" })));
1148
+ return (h(Host, { key: 'fdbe6fd9647bae7cfdf02ba6a250aa3c0c39ad85' }, h("div", { key: '114baca2f9ce9376e69073b40170473cc359915f', class: "icon-wrapper", innerHTML: parseIcon(this.icon), part: "wrapper" })));
1393
1149
  }
1394
1150
  };
1395
1151
  RtkIcon.style = RtkIconStyle0;
@@ -1418,7 +1174,7 @@ const RtkImageMessageView = class {
1418
1174
  this.status = 'loading';
1419
1175
  }
1420
1176
  render() {
1421
- return (h("div", { key: '47b2dd8f8dfc0d2aa20e80b513f802e1ebc09153', class: { image: true, loaded: this.status === 'loaded' } }, h("img", { key: 'fba4cfc015beb86040ec74b2a44e2163744a67c6', src: sanitizeLink(this.url), onLoad: () => {
1177
+ return (h("div", { key: 'f74af6a1b2b3b93a7b267cda9e43d232c66ea520', class: { image: true, loaded: this.status === 'loaded' } }, h("img", { key: '779c07d162a10153753f646bca05a1af6f67a070', src: sanitizeLink(this.url), onLoad: () => {
1422
1178
  this.status = 'loaded';
1423
1179
  }, onError: () => {
1424
1180
  this.status = 'errored';
@@ -1426,9 +1182,9 @@ const RtkImageMessageView = class {
1426
1182
  if (this.status === 'loaded') {
1427
1183
  this.onPreview.emit(this.url);
1428
1184
  }
1429
- } }), this.status === 'loading' && (h("div", { key: '4da0a3ab39d782e9affe7702a19232747bb4581c', class: "image-spinner", title: this.t('chat.img.loading'), "aria-label": this.t('chat.img.loading') }, h("rtk-spinner", { key: 'dea7afe2c92dd5c7c71620bc7b9089f743ef1aa2', iconPack: this.iconPack }))), this.status === 'errored' && (h("div", { key: 'ab303ce11b7182d20c64b00638a1c8be59aea774', class: "image-errored", title: this.t('chat.error.img_not_found'), "aria-label": this.t('chat.error.img_not_found') }, h("rtk-icon", { key: 'e14eb63cc4b2d18a5abd921e25ef305095f61c17', icon: this.iconPack.image_off }))), this.status === 'loaded' && (h("div", { key: 'ccceaa5cc5821ce9b4ddab742001cee78135636a', class: "actions" }, h("rtk-button", { key: 'de49516247d9655cc74afcd58bc50771e2594dca', class: "action", variant: "secondary", kind: "icon", onClick: () => {
1185
+ } }), this.status === 'loading' && (h("div", { key: 'c6bb6bf418436dabc1a73d65ad0975d37beb048b', class: "image-spinner", title: this.t('chat.img.loading'), "aria-label": this.t('chat.img.loading') }, h("rtk-spinner", { key: 'ead3419ec79f0593ea13f5093ae2abebd7179a71', iconPack: this.iconPack }))), this.status === 'errored' && (h("div", { key: '871faf9faeba4878c8056d1311773e6b0da5489a', class: "image-errored", title: this.t('chat.error.img_not_found'), "aria-label": this.t('chat.error.img_not_found') }, h("rtk-icon", { key: 'b800d614db9abdefd60bef87133b0ecccee80a5e', icon: this.iconPack.image_off }))), this.status === 'loaded' && (h("div", { key: '75656710da042f44d995f570a3a58d741933095c', class: "actions" }, h("rtk-button", { key: 'bf62519599d17503ebaa2046d932748ad2e0b68f', class: "action", variant: "secondary", kind: "icon", onClick: () => {
1430
1186
  this.onPreview.emit(this.url);
1431
- } }, h("rtk-icon", { key: 'bd1ea608e4846d994a418236dca7856570bd689d', icon: this.iconPack.full_screen_maximize })), h("rtk-button", { key: '266a860a4ab4d6cf76bd89bb35c987efbc89a593', class: "action", variant: "secondary", kind: "icon", onClick: () => downloadFile(this.url, { fallbackName: 'image' }) }, h("rtk-icon", { key: 'ec26862ff95e116d519280c7e62ed7a7e1ede273', icon: this.iconPack.download }))))));
1187
+ } }, h("rtk-icon", { key: '200a6383f044f4744e575ac2bd65a9e6ecf26d4a', icon: this.iconPack.full_screen_maximize })), h("rtk-button", { key: 'ef63418289bf89db7f6ff8ab2a4f5cce44598d14', class: "action", variant: "secondary", kind: "icon", onClick: () => downloadFile(this.url, { fallbackName: 'image' }) }, h("rtk-icon", { key: '296f173d6cd72ec32181487ae74e7231212cd248', icon: this.iconPack.download }))))));
1432
1188
  }
1433
1189
  };
1434
1190
  __decorate$7([
@@ -1519,7 +1275,7 @@ const RtkMarkdownView = class {
1519
1275
  const slicedMessage = this.text.slice(0, this.maxLength);
1520
1276
  const withReply = extractReplyBlock(slicedMessage, true);
1521
1277
  const withoutReply = stripOutReplyBlock(slicedMessage);
1522
- return (h("p", { key: 'c33735507a0798dffc360f01793bc7b0caaac159' }, withReply.length !== 0 && h("blockquote", { key: 'c0a4271ee4c843b6e73c8300a8026a3ec8dd5fe3' }, this.renderMessage(withReply)), withoutReply.length !== 0 && this.renderMessage(withoutReply)));
1278
+ return (h("p", { key: '8ec8d139843454330a7c2a6da1c46fa7c7a6c02f' }, withReply.length !== 0 && h("blockquote", { key: 'a2b2a90ee98f45f1ceb5c15cc327391150245567' }, this.renderMessage(withReply)), withoutReply.length !== 0 && this.renderMessage(withoutReply)));
1523
1279
  }
1524
1280
  };
1525
1281
  RtkMarkdownView.style = RtkMarkdownViewStyle0;
@@ -1606,6 +1362,8 @@ const RtkMeeting = class {
1606
1362
  this.gridLayout = 'row';
1607
1363
  /** Icon pack */
1608
1364
  this.iconPack = defaultIconPack;
1365
+ /** UI Kit Overrides */
1366
+ this.overrides = defaultOverrides;
1609
1367
  this.handleChangingMeeting = (destinationMeetingId) => {
1610
1368
  const currentStates = (this.peerStore || uiStore).state.states;
1611
1369
  this.updateStates({
@@ -1634,6 +1392,7 @@ const RtkMeeting = class {
1634
1392
  this.iconPackChanged(this.iconPack);
1635
1393
  this.tChanged(this.t);
1636
1394
  this.configChanged(this.config);
1395
+ this.overridesChanged(this.overrides);
1637
1396
  this.resizeObserver = new index(() => this.handleResize());
1638
1397
  this.resizeObserver.observe(this.host);
1639
1398
  if (this.applyDesignSystem &&
@@ -1718,6 +1477,7 @@ const RtkMeeting = class {
1718
1477
  iconPack: this.iconPack,
1719
1478
  t: this.t,
1720
1479
  providerId: this.providerId,
1480
+ overrides: deepMerge(Object.assign({}, defaultOverrides), this.overrides),
1721
1481
  });
1722
1482
  // Notify components that peer specific store is now available
1723
1483
  document.dispatchEvent(new CustomEvent('rtkPeerStoreReady', {
@@ -1789,6 +1549,11 @@ const RtkMeeting = class {
1789
1549
  provideRtkDesignSystem(document.documentElement, config.designTokens);
1790
1550
  }
1791
1551
  }
1552
+ overridesChanged(overrides) {
1553
+ if (this.peerStore) {
1554
+ this.peerStore.state.overrides = deepMerge(Object.assign({}, defaultOverrides), overrides);
1555
+ }
1556
+ }
1792
1557
  handleResize() {
1793
1558
  this.size = getSize(this.host.clientWidth);
1794
1559
  }
@@ -1831,7 +1596,8 @@ const RtkMeeting = class {
1831
1596
  "meeting": ["meetingChanged"],
1832
1597
  "iconPack": ["iconPackChanged"],
1833
1598
  "t": ["tChanged"],
1834
- "config": ["configChanged"]
1599
+ "config": ["configChanged"],
1600
+ "overrides": ["overridesChanged"]
1835
1601
  }; }
1836
1602
  };
1837
1603
  RtkMeeting.style = RtkMeetingStyle0;
@@ -1890,7 +1656,7 @@ const RtkMenu$1 = class {
1890
1656
  });
1891
1657
  }
1892
1658
  render() {
1893
- return (h(Host, { key: 'b019210ff85bde38c61855f8ac38aa8b927aa857' }, h("span", { key: '14f689eed0672642c3a181ee5d197d7a9b5c00a8', id: "trigger", ref: (el) => (this.triggerEl = el), onClick: () => {
1659
+ return (h(Host, { key: 'c5de1fb710d48142e20c3ea8144cffb807d56c63' }, h("span", { key: '07cf0464bc09c7e6ab1d05c17ba4b4219e5a229f', id: "trigger", ref: (el) => (this.triggerEl = el), onClick: () => {
1894
1660
  this.clickedThis = true;
1895
1661
  if (this.menuListEl.style.display !== 'block') {
1896
1662
  this.menuListEl.style.display = 'block';
@@ -1899,7 +1665,7 @@ const RtkMenu$1 = class {
1899
1665
  else {
1900
1666
  this.menuListEl.style.display = 'none';
1901
1667
  }
1902
- } }, h("slot", { key: 'f1ab2111e0ad309df5b38e4f189d821b8ab50a4a', name: "trigger" })), h("span", { key: 'ec03b8c7ff60dd21dce3bc1f9b473ab59ec37ace', part: "menu-list", id: "menu-list", ref: (el) => (this.menuListEl = el) }, h("slot", { key: 'bc05fba324ccf4360340b070c8d4f3723a72cf6e' }))));
1668
+ } }, h("slot", { key: 'ee7b8769fa9dd5b8408332c4d467b03962dc396c', name: "trigger" })), h("span", { key: 'ba37ce9d08b3aadc54db3bbb5c397021e8fe7395', part: "menu-list", id: "menu-list", ref: (el) => (this.menuListEl = el) }, h("slot", { key: '22200083796195d51f175f0ffdeab023e732c9e0' }))));
1903
1669
  }
1904
1670
  };
1905
1671
  __decorate$6([
@@ -1910,7 +1676,7 @@ __decorate$6([
1910
1676
  ], RtkMenu$1.prototype, "t", void 0);
1911
1677
  RtkMenu$1.style = RtkMenuStyle0;
1912
1678
 
1913
- const rtkMenuItemCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;align-items:center;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px);cursor:pointer;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;color:rgb(var(--rtk-colors-text-1000, 255 255 255));font-size:14px}::slotted([slot='start']){margin-right:var(--rtk-space-2, 8px)}::slotted([slot='end']){margin-left:var(--rtk-space-2, 8px)}:host(:hover){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}:host(.red){--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}";
1679
+ const rtkMenuItemCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;align-items:center;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px);cursor:pointer;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;color:rgb(var(--rtk-colors-text-1000, 255 255 255));font-size:14px}::slotted([slot='start']){margin-right:var(--rtk-space-2, 8px)}::slotted([slot='end']){margin-left:var(--rtk-space-2, 8px)}:host(:hover){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity))}:host(.primary:hover){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-bg-opacity))}:host(.red){--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}";
1914
1680
  const RtkMenuItemStyle0 = rtkMenuItemCss;
1915
1681
 
1916
1682
  var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -1926,13 +1692,15 @@ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators,
1926
1692
  const RtkMenuItem = class {
1927
1693
  constructor(hostRef) {
1928
1694
  registerInstance(this, hostRef);
1695
+ /** Variant */
1696
+ this.menuVariant = 'secondary';
1929
1697
  /** Icon pack */
1930
1698
  this.iconPack = defaultIconPack;
1931
1699
  /** Language */
1932
1700
  this.t = useLanguage();
1933
1701
  }
1934
1702
  render() {
1935
- return (h(Host, { key: 'a5c802aa2cb8cb235dc1e68d54ec9703c57df0b9' }, h("slot", { key: 'b448160fdd220fd814d471ddc08d7f784af10c49', name: "start" }), h("slot", { key: '0b342d2547a7835ea23d1974c3fd1b2e3507e779' }), h("slot", { key: '6670a8ed947d2bd6fb1651e9c6c1cd52f5ca419c', name: "end" })));
1703
+ return (h(Host, { key: '613d2db512a5ccbdd1c8c9e1da6a15487e3f6811', class: { [this.menuVariant]: true } }, h("slot", { key: '3bb27b46542ed03a01ff77efe1dc69554f9188db', name: "start" }), h("slot", { key: 'efe49fe8df4b2c1e1e3c2d1b87ee0ec9e8380a29' }), h("slot", { key: '83491fef2a3f1ebc846081893b20f2a6e6cb12c9', name: "end" })));
1936
1704
  }
1937
1705
  };
1938
1706
  __decorate$5([
@@ -1943,7 +1711,7 @@ __decorate$5([
1943
1711
  ], RtkMenuItem.prototype, "t", void 0);
1944
1712
  RtkMenuItem.style = RtkMenuItemStyle0;
1945
1713
 
1946
- const rtkMenuListCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;width:-moz-max-content;width:max-content;flex-direction:column;padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;border-radius:var(--rtk-border-radius-sm, 4px);--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}";
1714
+ const rtkMenuListCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;width:-moz-max-content;width:max-content;flex-direction:column;padding:var(--rtk-space-0, 0px);color:rgb(var(--rtk-colors-text-1000, 255 255 255));border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));overflow:hidden;border-radius:var(--rtk-border-radius-sm, 4px);--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-backdrop-filter:blur(60px);backdrop-filter:blur(60px)}:host(.primary){--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / 0.3)}";
1947
1715
  const RtkMenuListStyle0 = rtkMenuListCss;
1948
1716
 
1949
1717
  var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -1961,11 +1729,13 @@ const RtkMenuList = class {
1961
1729
  registerInstance(this, hostRef);
1962
1730
  /** Icon pack */
1963
1731
  this.iconPack = defaultIconPack;
1732
+ /** Variant */
1733
+ this.menuVariant = 'secondary';
1964
1734
  /** Language */
1965
1735
  this.t = useLanguage();
1966
1736
  }
1967
1737
  render() {
1968
- return (h(Host, { key: '1357690e48bef0c8c0e953886f1fd7754f0e4e4d' }, h("slot", { key: 'f3a221b7a4d28f53add6b658a0510294a998d6c1' })));
1738
+ return (h(Host, { key: 'e7b720a26e59508951d35ef90f1b5d4e0cbd4b14', class: { [this.menuVariant]: true } }, h("slot", { key: '344410259db395ccafd311ee00a7575f0c2c746a' })));
1969
1739
  }
1970
1740
  };
1971
1741
  __decorate$4([
@@ -1976,7 +1746,7 @@ __decorate$4([
1976
1746
  ], RtkMenuList.prototype, "t", void 0);
1977
1747
  RtkMenuList.style = RtkMenuListStyle0;
1978
1748
 
1979
- const rtkMessageViewCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{max-width:var(--rtk-space-96, 384px)}.message-wrapper{display:flex;flex-direction:row-reverse;align-items:flex-start;gap:var(--rtk-space-2, 8px)}.message-wrapper.incoming{flex-direction:row}.message{display:flex;flex-direction:column;align-items:flex-end}.incoming .message{display:flex;flex-direction:column;align-items:flex-start}.header{margin-top:var(--rtk-space-1, 4px);margin-bottom:var(--rtk-space-1, 4px);align-self:flex-end;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));font-size:12px;font-weight:600}.incoming .header{align-self:flex-start}.body{display:flex;flex-direction:column;min-width:var(--rtk-space-24, 96px);font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));font-size:14px;line-height:1.375;position:relative}.bubble{max-width:90%;padding:var(--rtk-space-2, 8px);border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));border-radius:var(--rtk-border-radius-md, 8px)}.incoming .bubble{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.metadata{margin-top:var(--rtk-space-2, 8px);align-self:flex-end;font-size:10px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.avatar{display:none}rtk-menu{position:absolute;right:var(--rtk-space-0, 0px);top:var(--rtk-space-0, 0px);border-radius:var(--rtk-border-radius-lg, 12px)}rtk-menu rtk-icon{height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);cursor:pointer}.actions{display:flex;align-items:center;justify-content:center;padding-left:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px);padding-top:var(--rtk-space-1, 4px);padding-right:var(--rtk-space-1, 4px);border-radius:var(--rtk-border-radius-md, 8px);border-width:var(--rtk-border-width-none, 0);border-style:none;background:radial-gradient(\n at top right,\n rgb(var(--rtk-colors-brand-300, 73 124 253)) 60%,\n rgba(255, 255, 255, 0) 80%\n )}.actions rtk-icon{height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)))}.incoming .actions{background:radial-gradient(\n at top right,\n rgb(var(--rtk-colors-background-800, 30 30 30)) 60%,\n rgba(255, 255, 255, 0) 80%\n )}.incoming .actions rtk-icon{color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.incoming rtk-avatar{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}@media (min-width: 400px){.avatar{display:flex;width:var(--rtk-space-6, 24px)}.avatar rtk-avatar{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px);font-size:10px;overflow:clip;border-radius:9999px}}@media (hover: hover){rtk-menu{visibility:hidden}.body:hover rtk-menu{visibility:visible}}";
1749
+ const rtkMessageViewCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{max-width:var(--rtk-space-96, 384px)}.message-wrapper{display:flex;flex-direction:row-reverse;align-items:flex-start;gap:var(--rtk-space-2, 8px)}.message-wrapper.incoming{flex-direction:row}.message{display:flex;flex-direction:column;align-items:flex-end}.incoming .message{display:flex;flex-direction:column;align-items:flex-start}.header{margin-top:var(--rtk-space-1, 4px);margin-bottom:var(--rtk-space-1, 4px);align-self:flex-end;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));font-size:12px;font-weight:600}.incoming .header{align-self:flex-start}.body{display:flex;flex-direction:column;min-width:var(--rtk-space-24, 96px);font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));font-size:14px;line-height:1.375;position:relative}.bubble{max-width:90%;padding:var(--rtk-space-2, 8px);border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));border-radius:var(--rtk-border-radius-md, 8px)}.incoming .bubble{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.metadata{margin-top:var(--rtk-space-2, 8px);display:flex;flex-direction:row;align-items:center;gap:var(--rtk-space-1, 4px);align-self:flex-end;font-size:11px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.metadata-content{display:flex;flex-direction:row;align-items:center;gap:var(--rtk-space-1, 4px)}.avatar{display:none}rtk-menu{position:absolute;right:var(--rtk-space-1, 4px);top:var(--rtk-space-1, 4px);border-radius:var(--rtk-border-radius-lg, 12px)}rtk-menu rtk-icon{height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);cursor:pointer}.actions{display:flex;align-items:center;justify-content:center;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-bg-opacity));padding:var(--rtk-space-1, 4px);border-radius:var(--rtk-border-radius-md, 8px);border-width:var(--rtk-border-width-none, 0);border-style:none}.actions rtk-icon{height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)))}.incoming rtk-avatar{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.incoming .actions{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity))}@media (min-width: 400px){.avatar{display:flex;width:var(--rtk-space-6, 24px)}.avatar rtk-avatar{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px);font-size:10px;overflow:clip;border-radius:9999px}}@media (hover: hover){rtk-menu{visibility:hidden}.body:hover rtk-menu{visibility:visible}}";
1980
1750
  const RtkMessageViewStyle0 = rtkMessageViewCss;
1981
1751
 
1982
1752
  var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -1997,6 +1767,8 @@ const RtkMessageView = class {
1997
1767
  this.actions = [];
1998
1768
  /** Appearance */
1999
1769
  this.variant = 'bubble';
1770
+ /** Is message pinned */
1771
+ this.pinned = false;
2000
1772
  /** Render */
2001
1773
  this.viewType = 'outgoing';
2002
1774
  /** Hides avatar */
@@ -2011,10 +1783,14 @@ const RtkMessageView = class {
2011
1783
  this.iconPack = defaultIconPack;
2012
1784
  }
2013
1785
  renderActions() {
2014
- return (h("rtk-menu", { placement: "top-end", offset: 1 }, h("button", { slot: "trigger", class: "actions" }, h("rtk-icon", { icon: this.iconPack.chevron_down })), h("rtk-menu-list", null, this.actions.map((action) => (h("rtk-menu-item", { onClick: () => this.onAction.emit(action.id) }, action.icon && h("rtk-icon", { icon: action.icon, slot: "start" }), action.label))))));
1786
+ return (h("rtk-menu", { placement: this.isSelf ? 'bottom-start' : 'bottom-end', offset: 1 }, h("button", { slot: "trigger", class: "actions" }, h("rtk-icon", { icon: this.iconPack.chevron_down })), h("rtk-menu-list", { menuVariant: this.isSelf ? 'primary' : 'secondary' }, this.actions.map((action) => {
1787
+ if (action.id === 'edit_message' && this.messageType !== 'text')
1788
+ return;
1789
+ return (h("rtk-menu-item", { menuVariant: this.isSelf ? 'primary' : 'secondary', onClick: () => this.onAction.emit(action.id) }, action.icon && h("rtk-icon", { icon: action.icon, slot: "start" }), action.label));
1790
+ }))));
2015
1791
  }
2016
1792
  render() {
2017
- return (h(Host, { key: '61882011f477f816296277a4f2d5622d224e47f0' }, h("div", { key: 'ae21bfc0c499879da6a2167f0cad5203475de696', class: { 'message-wrapper': true, [this.viewType]: true } }, !this.hideAvatar && (h("aside", { key: '73b10ebb1dccdc4e2c9258f185eb14f07d11d542', class: "avatar", part: "avatar" }, h("rtk-avatar", { key: 'e07971bf9d7738fb2dcc015d339a13d5dca7c6f7', participant: { name: this.authorName, picture: this.avatarUrl }, size: "sm" }))), h("div", { key: '1e24801f717589e598c4160bea7ab10a59acfcc2', class: "message", part: "message" }, !this.hideAuthorName && (h("div", { key: '3178f750ad798b7d83508f82ead36ee5407fee4c', class: "header" }, this.authorName, " ", this.isSelf ? ' (You)' : '')), h("div", { key: '056445ef0c557d7d756330df5778ad8bc2d41e60', class: { body: true, bubble: this.variant === 'bubble' } }, h("slot", { key: '6d5486666ce2238e4387c2621d562b24704a9317' }), !this.hideMetadata && !!this.time && (h("div", { key: '1d4b9bdbb3aaf288dce4b43a31354df3d413b2b4', class: "metadata", title: formatDateTime(this.time) }, elapsedDuration(this.time, new Date(Date.now())))), this.actions.length !== 0 && this.renderActions())))));
1793
+ return (h(Host, { key: '3d53fc59bda6a82e4c4753e34f915c8f62611f6b' }, h("div", { key: '1f9cbd79c9e5526645fafd0c4436b91c6c612f08', class: { 'message-wrapper': true, [this.viewType]: true } }, !this.hideAvatar && (h("aside", { key: '23071b4dff9dd4ecc1385be9a1610ffbab98a9e9', class: "avatar", part: "avatar" }, h("rtk-avatar", { key: '9a4596ea3636188ef391e65f86d6a608b3aa02d5', participant: { name: this.authorName, picture: this.avatarUrl }, size: "sm" }))), h("div", { key: 'eefe1bf5803e371266a0b8ee230dd2f42a193dc2', class: "message", part: "message" }, !this.hideAuthorName && (h("div", { key: '45ba437f7a3ba2b253f22a1885d7e5be954a387e', class: "header" }, this.authorName, " ", this.isSelf ? ' (You)' : '')), h("div", { key: 'e9636fb45358423d5cc4e8144b6b47cf065117cc', class: { body: true, bubble: this.variant === 'bubble' } }, h("slot", { key: '1d6cd92eb8d4514b7ae4266fae8cd060a56ac1e3' }), !this.hideMetadata && !!this.time && (h("div", { key: '77b29974a960e4b4809025305ce005aeab8edebc', class: "metadata", title: formatDateTime(this.time) }, this.pinned && (h("span", { key: 'e6b99085f2cbcbc9505c20e5407a98c382306614', class: "metadata-content" }, h("rtk-icon", { key: '45ad875ef38b1db0105c85659cf938cc9bd792d8', icon: this.iconPack.pin, size: "sm" }), " \u2022")), this.isEdited && (h("span", { key: '48d5ecd659fe2308d8c33e94a2216049a2bea5ef', class: "metadata-content" }, h("span", { key: '9203ff6d3f65b81b875f5bc17231fd2c65c1c2c2' }, "Edited"), " \u2022")), elapsedDuration(this.time, new Date(Date.now())))), this.actions.length !== 0 && this.renderActions())))));
2018
1794
  }
2019
1795
  };
2020
1796
  __decorate$3([
@@ -2022,9 +1798,35 @@ __decorate$3([
2022
1798
  ], RtkMessageView.prototype, "iconPack", void 0);
2023
1799
  RtkMessageView.style = RtkMessageViewStyle0;
2024
1800
 
2025
- const rtkPaginatedListCss = ".scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{position:relative;display:flex;flex-direction:column;flex:1}.container{box-sizing:border-box;display:flex;flex-direction:column-reverse;padding-top:var(--rtk-space-4, 16px);padding-bottom:var(--rtk-space-4, 16px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);flex:1 0 0px;overflow-y:scroll}.file-picker{display:none}.chat *:first-child{margin-top:var(--rtk-space-0, 0px)}.chat .head{display:flex;align-items:center}.chat .head .name{margin-right:var(--rtk-space-4, 16px);font-size:12px;font-weight:700}.chat .head .time{font-size:12px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.chat .body{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);overflow-wrap:break-word;font-size:14px;line-height:1.375}.chat .body .emoji{font-size:24px}p{margin-top:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-3, 12px)}rtk-text-message,rtk-image-message,rtk-file-message{margin-top:var(--rtk-space-4, 16px);display:block;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));box-sizing:border-box}*[is-continued]{margin-top:var(--rtk-space-3, 12px)}rtk-text-message[is-continued]{margin-top:var(--rtk-space-2, 8px)}.chat .image{position:relative;height:var(--rtk-space-40, 160px);max-width:var(--rtk-space-64, 256px);cursor:pointer}.chat .image img{display:none;height:100%;width:100%;border-radius:var(--rtk-border-radius-sm, 4px);-o-object-fit:cover;object-fit:cover}.chat .image .image-spinner{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}.chat .image .image-spinner rtk-spinner{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}.chat .image .image-errored{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);background-color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.1);--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}.chat .image .actions{display:none;height:var(--rtk-space-8, 32px);align-items:center;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action{height:var(--rtk-space-8, 32px);width:var(--rtk-space-8, 32px);border-radius:var(--rtk-border-radius-none, 0);border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.image.loaded img{display:block}.image.loaded .image-spinner{display:none}.image:hover .actions,.image:focus .actions{display:flex}.chat .file{display:flex;align-items:center;gap:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);padding-top:var(--rtk-space-1\\.5, 6px);padding-bottom:var(--rtk-space-1\\.5, 6px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.chat .file .file-data{flex:1 1 0%}.chat .file .file-data .name{word-break:break-all;color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split{margin-top:var(--rtk-space-0\\.5, 2px);display:flex;align-items:center;font-size:12px}.chat .file .file-data .file-data-split .ext{margin-right:var(--rtk-space-2, 8px);text-transform:uppercase;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split .divider{height:var(--rtk-space-4, 16px);width:var(--rtk-space-0\\.5, 2px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.chat .file .file-data .file-data-split .size{margin-left:var(--rtk-space-2, 8px)}.smallest-dom-element{width:1px}#top-scroll{transform:translateY(20vh)}#bottom-scroll{transform:translateY(-20vh)}a{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity));text-decoration-line:none}a:hover{text-decoration-line:underline}.show-new-messages-ctr{pointer-events:none;position:absolute;bottom:var(--rtk-space-2, 8px);right:var(--rtk-space-4, 16px);z-index:10;margin-top:calc(var(--rtk-space-14, 56px) * -1);--tw-translate-y:var(--rtk-space-28, 112px);transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:0;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.show-new-messages-ctr.active{--tw-translate-y:var(--rtk-space-0, 0px);transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:1}.show-new-messages{pointer-events:auto;border-radius:9999px}.show-new-messages:hover{border-radius:9999px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-ring-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}rtk-spinner,.empty-list{margin:auto}.page-wrapper{margin-left:var(--rtk-space-1, 4px);margin-right:var(--rtk-space-1, 4px)}.message-wrapper{margin-bottom:var(--rtk-space-2, 8px)}.pinned .message-wrapper{position:relative}.pinned .pin-icon{position:absolute;right:calc(var(--rtk-space-1, 4px) * -1);top:calc(var(--rtk-space-1, 4px) * -1);display:flex;border-radius:var(--rtk-border-radius-sm, 4px)}.pinned rtk-message-view{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px)}.load-more-on-top-container{pointer-events:none;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-4, 16px);z-index:10}.load-more-icon{pointer-events:auto;border-radius:9999px}.load-more-icon:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-ring-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}";
1801
+ const rtkPaginatedListCss = ".scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{position:relative;display:flex;flex-direction:column;flex:1}.container{box-sizing:border-box;display:flex;flex-direction:column-reverse;padding-top:var(--rtk-space-4, 16px);padding-bottom:var(--rtk-space-4, 16px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);flex:1 0 0px;overflow-y:scroll}.file-picker{display:none}.chat *:first-child{margin-top:var(--rtk-space-0, 0px)}.chat .head{display:flex;align-items:center}.chat .head .name{margin-right:var(--rtk-space-4, 16px);font-size:12px;font-weight:700}.chat .head .time{font-size:12px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.chat .body{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);overflow-wrap:break-word;font-size:14px;line-height:1.375}.chat .body .emoji{font-size:24px}p{margin-top:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-3, 12px)}rtk-text-message,rtk-image-message,rtk-file-message{margin-top:var(--rtk-space-4, 16px);display:block;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));box-sizing:border-box}*[is-continued]{margin-top:var(--rtk-space-3, 12px)}rtk-text-message[is-continued]{margin-top:var(--rtk-space-2, 8px)}.chat .image{position:relative;height:var(--rtk-space-40, 160px);max-width:var(--rtk-space-64, 256px);cursor:pointer}.chat .image img{display:none;height:100%;width:100%;border-radius:var(--rtk-border-radius-sm, 4px);-o-object-fit:cover;object-fit:cover}.chat .image .image-spinner{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}.chat .image .image-spinner rtk-spinner{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}.chat .image .image-errored{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);background-color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.1);--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}.chat .image .actions{display:none;height:var(--rtk-space-8, 32px);align-items:center;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action{height:var(--rtk-space-8, 32px);width:var(--rtk-space-8, 32px);border-radius:var(--rtk-border-radius-none, 0);border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.image.loaded img{display:block}.image.loaded .image-spinner{display:none}.image:hover .actions,.image:focus .actions{display:flex}.chat .file{display:flex;align-items:center;gap:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);padding-top:var(--rtk-space-1\\.5, 6px);padding-bottom:var(--rtk-space-1\\.5, 6px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.chat .file .file-data{flex:1 1 0%}.chat .file .file-data .name{word-break:break-all;color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split{margin-top:var(--rtk-space-0\\.5, 2px);display:flex;align-items:center;font-size:12px}.chat .file .file-data .file-data-split .ext{margin-right:var(--rtk-space-2, 8px);text-transform:uppercase;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split .divider{height:var(--rtk-space-4, 16px);width:var(--rtk-space-0\\.5, 2px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.chat .file .file-data .file-data-split .size{margin-left:var(--rtk-space-2, 8px)}.smallest-dom-element{width:1px}#top-scroll{transform:translateY(20vh);transform:translateY(20px)}a{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity));text-decoration-line:none}a:hover{text-decoration-line:underline}.show-new-messages-ctr{position:absolute;bottom:var(--rtk-space-4, 16px);right:var(--rtk-space-4, 16px);z-index:10;margin-top:calc(var(--rtk-space-14, 56px) * -1);--tw-translate-y:var(--rtk-space-28, 112px);transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:0;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.show-new-messages-ctr.active{--tw-translate-y:var(--rtk-space-0, 0px);transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;opacity:1}.show-new-messages{pointer-events:auto;border-radius:9999px}.show-new-messages:hover{border-radius:9999px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-ring-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}rtk-spinner,.empty-list{margin:auto}.page-wrapper{margin-left:var(--rtk-space-1, 4px);margin-right:var(--rtk-space-1, 4px);display:flex;flex-direction:column-reverse}.message-wrapper{margin-bottom:var(--rtk-space-2, 8px)}.pinned .message-wrapper{position:relative}.pinned .pin-icon{position:absolute;right:calc(var(--rtk-space-1, 4px) * -1);top:calc(var(--rtk-space-1, 4px) * -1);display:flex;border-radius:var(--rtk-border-radius-sm, 4px)}.pinned rtk-message-view{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px)}.load-more-on-top-container{pointer-events:none;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-4, 16px);z-index:10}.load-more-icon{pointer-events:auto;border-radius:9999px}.load-more-icon:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-ring-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}";
2026
1802
  const RtkPaginatedListStyle0 = rtkPaginatedListCss;
2027
1803
 
1804
+ /**
1805
+ * NOTE(ikabra): INFINITE SCROLL IMPLEMENTATION:
1806
+ *
1807
+ * Uses scrollend listener for 2way scrolling.
1808
+ * Empty divs ($topRef, $bottomRef) act as scroll triggers to fetch new messages.
1809
+ *
1810
+ * UPWARD SCROLLING:
1811
+ * - Fetch top anchor (element currently visible to the user near top)
1812
+ * - Fetch older messages, push to end of 2D array
1813
+ * - When exceeding pagesAllowed, delete pages and scroll back to anchor
1814
+ *
1815
+ * DOWNWARD SCROLLING:
1816
+ * - Fetch bottom anchor (element currently visible to the user near bottom)
1817
+ * - Fetch new page, insert at the start
1818
+ * - Update timestamps & firstEmptyIndex, then rerender
1819
+ * - When exceeding pagesAllowed, delete pages and scroll back to anchor
1820
+ *
1821
+ * ADDING NEW NODES:
1822
+ * - If no pages exist, load old page
1823
+ * - If on 1st page, append messages till page size is full and then load new page
1824
+ *
1825
+ * DELETE NODE:
1826
+ * - If deleting the only available node, reset to initial state
1827
+ * - If page is empty, delete it
1828
+ * - Update timestamp curors
1829
+ */
2028
1830
  var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2029
1831
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2030
1832
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -2038,274 +1840,306 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
2038
1840
  const RtkPaginatedList = class {
2039
1841
  constructor(hostRef) {
2040
1842
  registerInstance(this, hostRef);
1843
+ // Timestamp pertaining to the oldest stored message
1844
+ this.oldestPaginatedTimestamp = null;
1845
+ // Timestamp pertaining to the latest stored message
1846
+ this.latestPaginatedTimestamp = null;
1847
+ // Timestamp pertaining to the latest message stored in backend
1848
+ this.latestMessageTimestamp = null;
1849
+ // the length of pages will always be pageSize + 2
1850
+ this.pages = [];
1851
+ // Controls whether to keep auto-scrolling when a new page load.
1852
+ this.shouldScrollToBottom = false;
1853
+ // Shows "scroll to bottom" button when new nodes arrive and autoscroll is off.
1854
+ this.showNewMessagesCTR = false;
1855
+ /** label to show when empty */
1856
+ this.emptyListLabel = null;
2041
1857
  /** Icon pack */
2042
1858
  this.iconPack = defaultIconPack;
2043
1859
  /** Language */
2044
1860
  this.t = useLanguage();
2045
- /** label to show when empty */
2046
- this.emptyListLabel = null;
1861
+ this.rerenderBoolean = false;
1862
+ this.showEmptyListLabel = false;
2047
1863
  this.isLoading = false;
2048
1864
  this.isLoadingTop = false;
2049
1865
  this.isLoadingBottom = false;
2050
- this.hasMoreDataAtTop = false;
2051
- this.rerenderBoolean = false;
2052
- /**
2053
- * This gets disabled when the user scrolls up and the bottom node
2054
- * is not visible anymore.
2055
- */
2056
- this.shouldRenderNewNodes = true;
2057
- /**
2058
- * This gets disabled when the user scrolls up and the bottom node
2059
- * is not visible anymore.
2060
- */
2061
- this.hasNewNodesToRender = false;
2062
- this.showEmptyListLabel = false;
2063
- /**
2064
- * This is a private variable not a state
2065
- * since we want to debounce rerenders
2066
- *
2067
- * A list of pages where each page contains a number of Nodes
2068
- * [
2069
- * [Node 1, Node 2, Node 3.... Node N],
2070
- * [Node 1, Node 2, Node 3.... Node N],
2071
- * ]
2072
- */
2073
- this.pagesToRender = [[]];
2074
- this.currentTime = () => {
2075
- return new Date().getTime();
2076
- };
2077
- this.observe = (el) => {
2078
- if (!el)
2079
- return;
2080
- this.intersectionObserver.observe(el);
1866
+ // Tells us if we need to scroll to a specific anchor after a rerender
1867
+ this.pendingScrollAnchor = null;
1868
+ this.isInView = (el) => {
1869
+ const rect = el.getBoundingClientRect();
1870
+ return rect.top >= 0 && rect.bottom <= window.innerHeight;
2081
1871
  };
2082
1872
  }
2083
1873
  /**
2084
- * On a new node created
1874
+ * Adds a new node to the beginning of the paginated list
1875
+ * @param {DataNode} node - The data node to add to the beginning of the list
2085
1876
  */
2086
1877
  async onNewNode(node) {
2087
- if (!this.shouldRenderNewNodes) {
2088
- this.hasNewNodesToRender = true;
2089
- return;
1878
+ // if there are no pages, append to the first page
1879
+ if (this.pages.length < 1) {
1880
+ this.oldestPaginatedTimestamp = node.timeMs;
1881
+ this.pages.unshift([node]);
1882
+ this.latestPaginatedTimestamp = node.timeMs;
1883
+ this.latestMessageTimestamp = node.timeMs;
1884
+ this.rerender();
1885
+ if (this.autoScroll)
1886
+ this.$bottomRef.scrollIntoView({ behavior: 'smooth' });
2090
1887
  }
2091
- this.addNodeToRender(node, false);
2092
- this.rerender();
1888
+ else if (this.latestMessageTimestamp === this.latestPaginatedTimestamp) {
1889
+ // append messages to the page if page has not reached full capacity
1890
+ if (this.pages[0].length < this.pageSize) {
1891
+ this.pages[0].unshift(node);
1892
+ this.latestPaginatedTimestamp = node.timeMs;
1893
+ this.latestMessageTimestamp = node.timeMs;
1894
+ this.rerender();
1895
+ }
1896
+ else {
1897
+ // if page is at full capacity, load next page
1898
+ this.pages.unshift([node]);
1899
+ this.latestPaginatedTimestamp = node.timeMs;
1900
+ this.latestMessageTimestamp = node.timeMs;
1901
+ // remove pages if out of bounds
1902
+ if (this.pages.length > this.pagesAllowed)
1903
+ this.pages.pop();
1904
+ // update timestamps
1905
+ const lastPage = this.pages[this.pages.length - 1];
1906
+ this.oldestPaginatedTimestamp = lastPage[lastPage.length - 1].timeMs;
1907
+ this.rerender();
1908
+ }
1909
+ if (this.autoScroll)
1910
+ this.$bottomRef.scrollIntoView({ behavior: 'smooth' });
1911
+ }
1912
+ else {
1913
+ if (this.autoScroll)
1914
+ this.scrollToBottom();
1915
+ }
1916
+ this.pendingScrollAnchor = null;
2093
1917
  }
2094
1918
  /**
2095
- * On node deleted
2096
- */
2097
- async onNodeDelete(key) {
2098
- const oldLength = this.pagesToRender.flat().length;
2099
- this.pagesToRender = this.pagesToRender.map((page) => page.filter((item) => item.id !== key));
2100
- if (oldLength !== this.pagesToRender.flat().length) {
1919
+ * Deletes a node anywhere from the list
1920
+ * @param {string} id - The id of the node to delete
1921
+ * */
1922
+ async onNodeDelete(id) {
1923
+ var _a, _b;
1924
+ for (let i = this.pages.length - 1; i >= 0; i--) {
1925
+ const index = this.pages[i].findIndex((node) => node.id === id);
1926
+ // if message not found, move on
1927
+ if (index === -1)
1928
+ continue;
1929
+ // delete message
1930
+ this.pages[i].splice(index, 1);
1931
+ // if page is empty, delete it
1932
+ if (this.pages[i].length === 0)
1933
+ this.pages.splice(i, 1);
1934
+ // update timestamps
1935
+ const firstPage = this.pages[0];
1936
+ const lastPage = this.pages[this.pages.length - 1];
1937
+ this.latestPaginatedTimestamp = (_a = firstPage === null || firstPage === void 0 ? void 0 : firstPage[0]) === null || _a === void 0 ? void 0 : _a.timeMs;
1938
+ this.oldestPaginatedTimestamp = (_b = lastPage === null || lastPage === void 0 ? void 0 : lastPage[lastPage.length - 1]) === null || _b === void 0 ? void 0 : _b.timeMs;
1939
+ // if I have deleted the latest message, update latestMessageTimestamp
1940
+ if (index === 0 && i === 0)
1941
+ this.latestMessageTimestamp = this.latestPaginatedTimestamp;
2101
1942
  this.rerender();
1943
+ break;
2102
1944
  }
2103
1945
  }
2104
1946
  /**
2105
- * On node updated
2106
- */
2107
- async onNodeUpdate(key, newItem) {
2108
- let shouldRerender = false;
2109
- this.pagesToRender = this.pagesToRender.map((page) => page.map((item) => {
2110
- if (item.id === key) {
2111
- shouldRerender = true;
2112
- return newItem;
2113
- }
2114
- return item;
2115
- }));
2116
- if (shouldRerender)
1947
+ * Updates a new node anywhere in the list
1948
+ * @param {string} id - The id of the node to update
1949
+ * @param {DataNode} node - The updated data node
1950
+ * */
1951
+ async onNodeUpdate(id, node) {
1952
+ for (let i = this.pages.length - 1; i >= 0; i--) {
1953
+ const index = this.pages[i].findIndex((node) => node.id === id);
1954
+ // if message not found, move on
1955
+ if (index === -1)
1956
+ continue;
1957
+ // edit message
1958
+ this.pages[i][index] = node;
2117
1959
  this.rerender();
2118
- }
2119
- onItemChanged(newItemId, oldItemId) {
2120
- if (newItemId !== oldItemId) {
2121
- this.pagesToRender = [[]];
2122
- this.loadFirstPage().then(() => this.rerender());
1960
+ break;
2123
1961
  }
2124
1962
  }
2125
1963
  connectedCallback() {
2126
1964
  this.rerender = debounce(this.rerender.bind(this), 50, { maxWait: 200 });
2127
- this.autoScroll = true;
2128
- this.intersectionObserver = new IntersectionObserver((entries) => {
2129
- writeTask(() => {
2130
- for (const entry of entries) {
2131
- if (entry.target.id === 'bottom-scroll') {
2132
- if (entry.isIntersecting)
2133
- this.loadBottom();
2134
- else
2135
- this.shouldRenderNewNodes = false;
2136
- }
2137
- if (entry.target.id === 'top-scroll' && entry.isIntersecting) {
2138
- this.loadTop();
2139
- }
2140
- }
2141
- });
2142
- });
2143
- }
2144
- disconnectedCallback() {
2145
- this.intersectionObserver.disconnect();
2146
1965
  }
2147
1966
  componentDidLoad() {
2148
- /**
2149
- * Adding observes here so that on the first render we scroll down
2150
- * and shouldRenderNewNodes remains true
2151
- */
2152
- this.loadFirstPage();
2153
- this.observe(this.$topRef);
2154
- this.observe(this.$bottomRef);
1967
+ // initial load
1968
+ this.loadPrevPage();
1969
+ if (this.$containerRef) {
1970
+ this.$containerRef.onscrollend = async () => {
1971
+ // do not do anything if we are scrolling to bottom
1972
+ if (this.shouldScrollToBottom)
1973
+ return;
1974
+ // handle top and bottom scroll
1975
+ if (this.isInView(this.$bottomRef) &&
1976
+ this.latestMessageTimestamp > this.latestPaginatedTimestamp) {
1977
+ await this.loadNextPage();
1978
+ }
1979
+ else if (this.isInView(this.$topRef)) {
1980
+ this.showNewMessagesCTR = true;
1981
+ await this.loadPrevPage();
1982
+ }
1983
+ };
1984
+ }
2155
1985
  }
2156
1986
  componentDidRender() {
2157
- if (this.shouldRenderNewNodes && this.autoScroll)
2158
- smoothScrollToBottom(this.$paginatedList);
2159
- }
2160
- loadFirstPage() {
2161
- return this.loadPage(this.currentTime(), this.pageSize, true, (data) => {
2162
- if (data.length === 0) {
2163
- this.showEmptyListLabel = true;
2164
- }
2165
- });
2166
- }
2167
- loadTop() {
2168
- /**
2169
- * If there is only one unfilled page or no page, no need to check
2170
- * for top since it will be empty
2171
- */
2172
- if (this.pagesToRender.length === 0)
1987
+ if (!this.pendingScrollAnchor)
2173
1988
  return;
2174
- if (this.pagesToRender.length === 1 && this.pagesToRender[0].length < this.pageSize)
2175
- return;
2176
- /**
2177
- * TODO: Make this more flexible currently this only works with chat
2178
- */
2179
- const oldestVNode = this.pagesToRender[0][0];
2180
- const oldestTimestamp = oldestVNode.timeMs;
2181
- // TODO: scrollIntoView
2182
- const onPageRendered = () => { }; // oldestVNode.$elm$?.scrollIntoView();
2183
- this.isLoadingTop = true;
2184
- this.loadPage(oldestTimestamp - 1, this.pageSize, true, onPageRendered, 'top');
1989
+ const anchor = this.pendingScrollAnchor;
1990
+ this.pendingScrollAnchor = null;
1991
+ this.restoreScrollToAnchor(anchor);
2185
1992
  }
2186
- loadBottom() {
2187
- /**
2188
- * If there is only one unfilled page or no page, no need to check
2189
- * for top since it will be empty
2190
- */
2191
- if (this.pagesToRender.length === 0) {
2192
- this.shouldRenderNewNodes = true;
1993
+ async loadPrevPage() {
1994
+ if (this.isLoading)
2193
1995
  return;
2194
- }
2195
- if (this.pagesToRender.length === 1 && this.pagesToRender[0].length < this.pageSize) {
2196
- this.shouldRenderNewNodes = true;
1996
+ const scrollAnchor = this.getScrollAnchor('top');
1997
+ // if no old timestamp, it means we are at initial state
1998
+ if (!this.oldestPaginatedTimestamp)
1999
+ this.oldestPaginatedTimestamp = new Date().getTime();
2000
+ // load data
2001
+ this.isLoading = true;
2002
+ this.isLoadingTop = true;
2003
+ const data = await this.fetchData(this.oldestPaginatedTimestamp - 1, this.pageSize, true);
2004
+ this.isLoading = false;
2005
+ this.isLoadingTop = false;
2006
+ // no more old messages to show, we are at the top of the page
2007
+ if (!data.length)
2197
2008
  return;
2009
+ // add old data to the end of the array
2010
+ this.pages.push(data);
2011
+ // clear old pages when we reach the limit
2012
+ if (this.pages.length > this.pagesAllowed)
2013
+ this.pages.shift();
2014
+ // update timestamps
2015
+ const lastPage = this.pages[this.pages.length - 1];
2016
+ this.oldestPaginatedTimestamp = lastPage[lastPage.length - 1].timeMs;
2017
+ this.latestPaginatedTimestamp = this.pages[0][0].timeMs;
2018
+ if (!this.latestMessageTimestamp)
2019
+ this.latestMessageTimestamp = this.latestPaginatedTimestamp;
2020
+ this.rerender();
2021
+ // fix scroll position
2022
+ if (scrollAnchor)
2023
+ this.pendingScrollAnchor = scrollAnchor;
2024
+ }
2025
+ async loadNextPage() {
2026
+ if (this.isLoading)
2027
+ return [];
2028
+ // Do nothing. New timestamp needs to be assigned by loadPrevPage method
2029
+ if (!this.latestPaginatedTimestamp) {
2030
+ this.showNewMessagesCTR = false;
2031
+ return [];
2198
2032
  }
2199
- const newestVNode = this.pagesToRender.at(-1).at(-1);
2200
- const newestTimestamp = newestVNode.timeMs;
2201
- // TODO: scrollIntoView
2202
- const onPageRendered = () => smoothScrollToBottom(this.$paginatedList);
2033
+ this.isLoading = true;
2203
2034
  this.isLoadingBottom = true;
2204
- this.loadPage(newestTimestamp + 1, this.pageSize, false, onPageRendered, 'bottom');
2205
- }
2206
- addNodeToRender(node, addToStart) {
2207
- if (addToStart) {
2208
- const firstPage = this.pagesToRender[0];
2209
- if (firstPage && (firstPage === null || firstPage === void 0 ? void 0 : firstPage.length) < this.pageSize) {
2210
- /**
2211
- * If first page is not full then just add to that page
2212
- */
2213
- firstPage.unshift(node);
2214
- }
2215
- else {
2216
- /**
2217
- * If first page is full then add a new page to the start
2218
- */
2219
- const newPage = [node];
2220
- this.pagesToRender.unshift(newPage);
2221
- this.removeLastPageIfNeeded(false);
2222
- }
2223
- }
2224
- else {
2225
- const [lastPage] = this.pagesToRender.slice(-1);
2226
- if (lastPage && (lastPage === null || lastPage === void 0 ? void 0 : lastPage.length) < this.pageSize) {
2227
- /**
2228
- * If last page is not full then just add it
2229
- */
2230
- lastPage.push(node);
2035
+ const scrollAnchor = this.getScrollAnchor('bottom');
2036
+ const data = await this.fetchData(this.latestPaginatedTimestamp + 1, this.pageSize, false);
2037
+ this.isLoading = false;
2038
+ this.isLoadingBottom = false;
2039
+ // no more new messages to load
2040
+ if (!data.length) {
2041
+ this.latestMessageTimestamp = this.latestPaginatedTimestamp;
2042
+ this.showNewMessagesCTR = false;
2043
+ return [];
2044
+ }
2045
+ // load new messages and append to the start
2046
+ const incoming = [...data].reverse();
2047
+ if (this.pages.length === 0)
2048
+ this.pages.unshift([]);
2049
+ const firstPage = this.pages[0];
2050
+ const spaceInFirstPage = this.pageSize - firstPage.length;
2051
+ if (spaceInFirstPage > 0) {
2052
+ const toFill = incoming.splice(0, spaceInFirstPage);
2053
+ firstPage.unshift(...toFill);
2054
+ }
2055
+ while (incoming.length > 0) {
2056
+ this.pages.unshift(incoming.splice(0, this.pageSize));
2057
+ }
2058
+ // remove pages if out of bounds
2059
+ if (this.pages.length > this.pagesAllowed)
2060
+ this.pages.pop();
2061
+ // update timestamps
2062
+ const lastPage = this.pages[this.pages.length - 1];
2063
+ this.oldestPaginatedTimestamp = lastPage[lastPage.length - 1].timeMs;
2064
+ this.latestPaginatedTimestamp = this.pages[0][0].timeMs;
2065
+ this.rerender();
2066
+ this.pendingScrollAnchor = scrollAnchor;
2067
+ return data;
2068
+ }
2069
+ // Find the element that is closest to the top/bottom of the container
2070
+ getScrollAnchor(edge = 'top') {
2071
+ if (!this.$containerRef)
2072
+ return null;
2073
+ const containerRect = this.$containerRef.getBoundingClientRect();
2074
+ const candidates = Array.from(this.$containerRef.querySelectorAll('[id]')).filter((el) => el.id !== 'top-scroll' && el.id !== 'bottom-scroll');
2075
+ let best = null;
2076
+ for (const el of candidates) {
2077
+ const rect = el.getBoundingClientRect();
2078
+ const isVisibleInContainer = rect.bottom > containerRect.top && rect.top < containerRect.bottom;
2079
+ if (!isVisibleInContainer)
2080
+ continue;
2081
+ if (edge === 'top') {
2082
+ const offsetTop = rect.top - containerRect.top;
2083
+ if (best == null || (best.edge === 'top' && offsetTop < best.offsetTop)) {
2084
+ best = { id: el.id, edge: 'top', offsetTop };
2085
+ }
2231
2086
  }
2232
2087
  else {
2233
- /**
2234
- * If last page is full add a new page with just
2235
- * this node
2236
- */
2237
- const newPage = [node];
2238
- this.pagesToRender.push(newPage);
2239
- this.removeLastPageIfNeeded(true);
2088
+ const offsetBottom = containerRect.bottom - rect.bottom;
2089
+ if (best == null || (best.edge === 'bottom' && offsetBottom < best.offsetBottom)) {
2090
+ best = { id: el.id, edge: 'bottom', offsetBottom };
2091
+ }
2240
2092
  }
2241
2093
  }
2094
+ return best;
2242
2095
  }
2243
- /**
2244
- * @param start
2245
- * @param end
2246
- * @param reversed Defines whether to add the page at the beginning or the end
2247
- * @param onPageLoaded Callback for when all new nodes are rendered
2248
- * @param direction Indicates if loading from 'top' or 'bottom'
2249
- */
2250
- async loadPage(timestamp, size, reversed, onPageRendered = () => { }, direction) {
2251
- this.isLoading = true;
2252
- const data = (await this.fetchData(timestamp, size, reversed));
2253
- this.isLoading = false;
2254
- if (direction === 'top') {
2255
- this.isLoadingTop = false;
2256
- this.hasMoreDataAtTop = (data === null || data === void 0 ? void 0 : data.length) > 0;
2096
+ //instant scroll to anchor to make sure we are at the same position after a rerender
2097
+ restoreScrollToAnchor(anchor) {
2098
+ if (!this.$containerRef)
2099
+ return;
2100
+ // make element id safe to use inside a CSS selector
2101
+ const escapeId = (id) => {
2102
+ var _a;
2103
+ const cssEscape = (_a = globalThis.CSS) === null || _a === void 0 ? void 0 : _a.escape;
2104
+ return typeof cssEscape === 'function'
2105
+ ? cssEscape(id)
2106
+ : id.replace(/[^a-zA-Z0-9_-]/g, '\\$&');
2107
+ };
2108
+ const el = this.$containerRef.querySelector(`#${escapeId(anchor.id)}`);
2109
+ if (!el)
2110
+ return;
2111
+ const containerRect = this.$containerRef.getBoundingClientRect();
2112
+ const rect = el.getBoundingClientRect();
2113
+ if (anchor.edge === 'top') {
2114
+ const newOffsetTop = rect.top - containerRect.top;
2115
+ this.$containerRef.scrollTop += newOffsetTop - anchor.offsetTop;
2257
2116
  }
2258
- if (direction === 'bottom') {
2259
- this.isLoadingBottom = false;
2117
+ else {
2118
+ const newOffsetBottom = containerRect.bottom - rect.bottom;
2119
+ this.$containerRef.scrollTop += anchor.offsetBottom - newOffsetBottom;
2260
2120
  }
2261
- if (!(data === null || data === void 0 ? void 0 : data.length)) {
2262
- /**
2263
- * While scrolling down if there were no new items found
2264
- * then start rendering new nodes;
2265
- */
2266
- if (!reversed) {
2267
- this.hasNewNodesToRender = false;
2268
- this.shouldRenderNewNodes = true;
2269
- }
2270
- onPageRendered([]);
2271
- return;
2121
+ }
2122
+ // this method is called recursively based on shouldScrollToBottom (see loadNextPage)
2123
+ async scrollToBottom() {
2124
+ this.shouldScrollToBottom = true;
2125
+ while (this.shouldScrollToBottom) {
2126
+ const response = await this.loadNextPage();
2127
+ this.$bottomRef.scrollIntoView({ behavior: 'smooth' });
2128
+ if (response.length === 0)
2129
+ this.shouldScrollToBottom = false;
2272
2130
  }
2273
- data.forEach((node) => this.addNodeToRender(node, reversed));
2274
- this.rerender();
2275
- onPageRendered(data);
2276
2131
  }
2277
2132
  rerender() {
2278
2133
  this.rerenderBoolean = !this.rerenderBoolean;
2279
2134
  }
2280
- removeLastPageIfNeeded(removeFromStart) {
2281
- if (this.pagesToRender.length > this.pagesAllowed) {
2282
- if (removeFromStart)
2283
- this.pagesToRender.shift();
2284
- else
2285
- this.pagesToRender.pop();
2286
- }
2287
- }
2288
- onDownArrowClicked() {
2289
- /**
2290
- * Load the freshest pages
2291
- */
2292
- this.loadBottom();
2293
- }
2294
- onLoadMoreOnTopClicked() {
2295
- this.loadTop();
2296
- }
2297
2135
  render() {
2298
- var _a;
2299
2136
  /**
2300
- * div.container is flex=column-reverse
2301
- * which is why div#bottom-scroll comes before div#top-scroll
2302
- * div.page-wrapper prevents reversal of messages
2137
+ * div.container is flex=column-reversewhich is why div#bottom-scroll comes before div#top-scroll
2303
2138
  */
2304
- return (h(Host, { key: '23e10f12b079213650cf9c947d30650ba8c95a4d' }, h("div", { key: 'b5406069fd69ff117b19d437184c38b3c7d2fc28', class: "scrollbar container", part: "container", ref: (el) => (this.$paginatedList = el) }, h("div", { key: '7be947f2409ff810e0d10beea53ace8fdec334ce', class: { 'show-new-messages-ctr': true, active: !this.shouldRenderNewNodes } }, h("rtk-button", { key: '45c43d6ca1cc39376334dffa10f3f2c137d65add', class: "show-new-messages", kind: "icon", variant: "secondary", part: "show-new-messages", onClick: () => this.onDownArrowClicked() }, h("rtk-icon", { key: '519b0db80f7d16cc4d03983e227d4897a5868ec9', icon: this.iconPack.chevron_down }))), h("div", { key: '53691e3943b90ef9e422c8da8f5facaa23f01920', class: "smallest-dom-element", id: "bottom-scroll", ref: (el) => (this.$bottomRef = el) }), this.isLoadingBottom && h("rtk-spinner", { key: '2a393cb0bbb07c356144464dcc7c597f5cc9771b', size: "sm" }), this.isLoading && this.pagesToRender.flat().length === 0 && h("rtk-spinner", { key: '4ce03be69368db0d6d0d4ad079b14f2c7d93f26d', size: "lg" }), this.pagesToRender.flat().length === 0 && this.showEmptyListLabel ? (h("div", { class: "empty-list" }, (_a = this.emptyListLabel) !== null && _a !== void 0 ? _a : this.t('list.empty'))) : (h("div", { class: "page-wrapper" }, this.pagesToRender.map((page) => this.createNodes(page)))), this.hasMoreDataAtTop && !this.isLoadingTop && (h("div", { key: '5c85806854687efe098e4bd6d06d109060445378', class: "load-more-on-top-container" }, h("rtk-button", { key: '6d73a030fad5ba133aa2841b2feb196646592ada', class: "load-more-icon", kind: "icon", variant: "secondary", part: "load-more-icon", onClick: () => this.onLoadMoreOnTopClicked() }, h("rtk-icon", { key: '61a4f376749938df280e5c734dd3fa8a9b0b7201', icon: this.iconPack.chevron_up })))), this.isLoadingTop && h("rtk-spinner", { key: '3e55b99c60ed7bc2cd937091a33663dd19c9ca68', size: "sm" }), h("div", { key: 'a69e0a3a26d295783f4f729b33770b206ab5d46b', class: "smallest-dom-element", id: "top-scroll", ref: (el) => (this.$topRef = el) }))));
2139
+ return (h(Host, { key: '90112894b4d06b91240bcf4c1dfadad784097ec4' }, h("div", { key: '339f02629a39ce0f7d2552325b9f6a7c82ffa036', class: "scrollbar container", part: "container", ref: (el) => (this.$containerRef = el) }, h("div", { key: '10de785a969cac74d840e0311087b85b67e97fb6', class: { 'show-new-messages-ctr': true, active: this.showNewMessagesCTR } }, h("rtk-button", { key: '68991f70a24417ca79d6583cca50f2dd9f55892d', class: "show-new-messages", kind: "icon", variant: "secondary", part: "show-new-messages", onClick: () => {
2140
+ this.scrollToBottom();
2141
+ } }, this.shouldScrollToBottom ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.chevron_down })))), h("div", { key: '24098a445c1a9b1a3ef77436988c36c8f2a8c205', class: "smallest-dom-element", id: "bottom-scroll", ref: (el) => (this.$bottomRef = el) }), this.isLoadingBottom && this.pages.length > 0 && h("rtk-spinner", { key: '93c029599cf61fb61ae57651064f4f0a8c7ac39b', size: "sm" }), this.isLoading && this.pages.length < 1 && h("rtk-spinner", { key: 'd49e8bbbf34036bb6559b5b0e5c54d32513f6bc6', size: "lg" }), !this.isLoading && this.pages.flat().length === 0 ? (h("div", { class: "empty-list" }, this.t('list.empty'))) : (h("div", { class: "page-wrapper" }, this.pages.map((page, pageIndex) => (h("div", { class: "page", "data-page-index": pageIndex }, this.createNodes([...page].reverse())))))), this.isLoadingTop && this.pages.length > 0 && h("rtk-spinner", { key: '067d8da823c27e3c5fb18f138c58eb537a4b67f5', size: "sm" }), h("div", { key: '16fef008d5831bd5f6b4136e2a58cccc34e08064', class: "smallest-dom-element", id: "top-scroll", ref: (el) => (this.$topRef = el) }))));
2305
2142
  }
2306
- static get watchers() { return {
2307
- "selectedItemId": ["onItemChanged"]
2308
- }; }
2309
2143
  };
2310
2144
  __decorate$2([
2311
2145
  SyncWithStore()
@@ -2337,7 +2171,7 @@ const RtkSpinner = class {
2337
2171
  this.size = 'md';
2338
2172
  }
2339
2173
  render() {
2340
- return (h(Host, { key: '2eb8672a849f85e2c207ec9331d1093b7deefaa3' }, h("rtk-icon", { key: '5a2f292ddd7a5c52709ce41f47422f08bdf82852', class: "spinner", icon: this.iconPack.spinner })));
2174
+ return (h(Host, { key: '5f6172eb684feb1d2a1bfa4933c4f3763534d479' }, h("rtk-icon", { key: '32a8707e5447a9e85e42c2aa57b55a46d0208f7e', class: "spinner", icon: this.iconPack.spinner })));
2341
2175
  }
2342
2176
  };
2343
2177
  __decorate$1([
@@ -2415,7 +2249,7 @@ const RtkTextComposerView = class {
2415
2249
  }
2416
2250
  }
2417
2251
  render() {
2418
- return (h("div", { key: '1b51f7d6ffbe8069172a5dc51f291988000c898a', class: "chat-input", part: "chat-input-container" }, this.maxLengthBreached > 0 && (h("div", { key: 'fe75f8333a7643458d5077fec968464327e65ca3', class: 'text-error ' + (this.maxLengthBreached === this.maxLength ? 'breached' : '') }, h("rtk-icon", { key: '669066f9983f226d96baeebdfa10ffb1fc8001b7', id: "warning-indicator", icon: this.iconPack.warning, part: "warning-indicator" }), ' ', this.maxLengthBreached, " / ", this.maxLength, " ", this.t('chat.max_limit_warning'))), this.rateLimitBreached && (h("div", { key: '0024d3b4e8d5eda5f94ff2fe9d8aa18cfb9297a7', class: 'text-error breached' }, h("rtk-icon", { key: 'bc3a0417a81de43b67595cde79dfe7aba21a6601', id: "warning-indicator", icon: this.iconPack.warning, part: "warning-indicator" }), ' ', this.t('chat.rate_limit_error'))), h("textarea", { key: 'c6077b3128eeea4be2358ab557062df322a8ffa9', ref: (el) => (this.$textArea = el), placeholder: this.placeholder, disabled: this.disabled, onInput: this.onInputHandler, onKeyDown: this.keyDownHandler, part: "chat-input", value: this.value })));
2252
+ return (h("div", { key: '3a49d368b3b798a6e423323905c4ca7f18493fd0', class: "chat-input", part: "chat-input-container" }, this.maxLengthBreached > 0 && (h("div", { key: '83c0c1c71fc5cc6f7a6bf1e6bc961665cb989104', class: 'text-error ' + (this.maxLengthBreached === this.maxLength ? 'breached' : '') }, h("rtk-icon", { key: '9fc1147d057011699bbd2ca6cf8240ed6c653e1f', id: "warning-indicator", icon: this.iconPack.warning, part: "warning-indicator" }), ' ', this.maxLengthBreached, " / ", this.maxLength, " ", this.t('chat.max_limit_warning'))), this.rateLimitBreached && (h("div", { key: '82599c564d95896d6b541f98f8167a0c193f4cf5', class: 'text-error breached' }, h("rtk-icon", { key: 'fc8984d07b8ac4aafd16d4f2388b4e93ab8feb69', id: "warning-indicator", icon: this.iconPack.warning, part: "warning-indicator" }), ' ', this.t('chat.rate_limit_error'))), h("textarea", { key: '62c972fdd2b54cf7ccfacadc32cacc8e7ceae1ca', ref: (el) => (this.$textArea = el), placeholder: this.placeholder, disabled: this.disabled, onInput: this.onInputHandler, onKeyDown: this.keyDownHandler, part: "chat-input", value: this.value })));
2419
2253
  }
2420
2254
  };
2421
2255
  __decorate([
@@ -2436,7 +2270,7 @@ const RtkTextMessageView = class {
2436
2270
  this.isMarkdown = false;
2437
2271
  }
2438
2272
  render() {
2439
- return (h("p", { key: '90e03b1cdd7271004b0ba2932d7e00342d0b884d', class: { text: true, emoji: hasOnlyEmojis(this.text) } }, this.isMarkdown ? h("rtk-markdown-view", { text: this.text }) : this.text));
2273
+ return (h("p", { key: 'c10685a8a0339c3b8509fed80b46900c551924e6', class: { text: true, emoji: hasOnlyEmojis(this.text) } }, this.isMarkdown ? h("rtk-markdown-view", { text: this.text }) : this.text));
2440
2274
  }
2441
2275
  };
2442
2276
  RtkTextMessageView.style = RtkTextMessageViewStyle0;
@@ -2542,7 +2376,7 @@ const RtkMenu = class {
2542
2376
  });
2543
2377
  }
2544
2378
  render() {
2545
- return (h(Host, { key: '32f792b447497e62bc776085657de62b8d6213bf' }, h("span", { key: '96f014373662e86cadb00d5a0b981246d3a7cac4', part: "trigger", id: "trigger", ref: (el) => (this.triggerEl = el) }, h("slot", { key: '218a47538fad33071c2ed20d83610b36e8c5a8f4' })), h("div", { key: 'c338da352126320e70333ad8ae814667e53dc5b4', part: "tooltip", class: "tooltip", id: "tooltip", role: "tooltip", ref: (el) => (this.tooltipEl = el) }, h("div", { key: 'bd0fe7c880bf999ba565959e84cc78412d008fb7', id: "arrow", ref: (el) => (this.arrowEl = el), part: "arrow" }), this.label, h("slot", { key: '67fcc99de5f9db145ce832b7eb46aa0e587ed101', name: "tooltip" }))));
2379
+ return (h(Host, { key: 'ce9cb2211743e50c83b7f572b2e9dc5b02fa3ac8' }, h("span", { key: '74f73894f5a62519b3bf8c03a83e7102092ccd5c', part: "trigger", id: "trigger", ref: (el) => (this.triggerEl = el) }, h("slot", { key: '4551b2a438b1c57ca68e4a2973529186063a13c2' })), h("div", { key: 'e3dd196c6ee225cb363bcf54d35836ff17ed5969', part: "tooltip", class: "tooltip", id: "tooltip", role: "tooltip", ref: (el) => (this.tooltipEl = el) }, h("div", { key: '4eb8bb3af588160018ef9d8899afc09edf4b195d', id: "arrow", ref: (el) => (this.arrowEl = el), part: "arrow" }), this.label, h("slot", { key: 'c427ef3ef9953b764f9b1adcb4a8b7eee1fe91cd', name: "tooltip" }))));
2546
2380
  }
2547
2381
  static get watchers() { return {
2548
2382
  "open": ["openChanged"]
@@ -2550,4 +2384,4 @@ const RtkMenu = class {
2550
2384
  };
2551
2385
  RtkMenu.style = RtkTooltipStyle0;
2552
2386
 
2553
- export { RtkAvatar as rtk_avatar, RtkButton as rtk_button, RtkChannelSelectorView as rtk_channel_selector_view, RtkChat as rtk_chat, RtkChatComposerView as rtk_chat_composer_view, RtkChatMessagesUiPaginated as rtk_chat_messages_ui_paginated, RtkDraftAttachmentView as rtk_draft_attachment_view, RtkEmojiPicker as rtk_emoji_picker, RtkEmojiPickerButton as rtk_emoji_picker_button, RtkFileMessageView as rtk_file_message_view, RtkFilePickerButton as rtk_file_picker_button, RtkIcon as rtk_icon, RtkImageMessageView as rtk_image_message_view, RtkMarkdownView as rtk_markdown_view, RtkMeeting as rtk_meeting, RtkMenu$1 as rtk_menu, RtkMenuItem as rtk_menu_item, RtkMenuList as rtk_menu_list, RtkMessageView as rtk_message_view, RtkPaginatedList as rtk_paginated_list, RtkSpinner as rtk_spinner, RtkTextComposerView as rtk_text_composer_view, RtkTextMessageView as rtk_text_message_view, RtkMenu as rtk_tooltip };
2387
+ export { RtkAvatar as rtk_avatar, RtkButton as rtk_button, RtkChat as rtk_chat, RtkChatComposerView as rtk_chat_composer_view, RtkChatMessagesUiPaginated as rtk_chat_messages_ui_paginated, RtkDraftAttachmentView as rtk_draft_attachment_view, RtkEmojiPicker as rtk_emoji_picker, RtkEmojiPickerButton as rtk_emoji_picker_button, RtkFileMessageView as rtk_file_message_view, RtkFilePickerButton as rtk_file_picker_button, RtkIcon as rtk_icon, RtkImageMessageView as rtk_image_message_view, RtkMarkdownView as rtk_markdown_view, RtkMeeting as rtk_meeting, RtkMenu$1 as rtk_menu, RtkMenuItem as rtk_menu_item, RtkMenuList as rtk_menu_list, RtkMessageView as rtk_message_view, RtkPaginatedList as rtk_paginated_list, RtkSpinner as rtk_spinner, RtkTextComposerView as rtk_text_composer_view, RtkTextMessageView as rtk_text_message_view, RtkMenu as rtk_tooltip };