@cloudflare/realtimekit-ui 1.1.0-staging.3 → 1.1.0-staging.5

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 (394) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/realtimekit-ui.cjs.js +1 -1
  4. package/dist/cjs/rtk-ai-transcriptions.cjs.entry.js +1 -1
  5. package/dist/cjs/rtk-audio-grid.cjs.entry.js +1 -1
  6. package/dist/cjs/rtk-audio-visualizer_4.cjs.entry.js +1 -1
  7. package/dist/cjs/rtk-avatar_24.cjs.entry.js +267 -247
  8. package/dist/cjs/rtk-breakout-room-manager_3.cjs.entry.js +4 -4
  9. package/dist/cjs/rtk-breakout-rooms-manager_9.cjs.entry.js +9 -9
  10. package/dist/cjs/rtk-channel-creator.cjs.entry.js +2 -2
  11. package/dist/cjs/rtk-channel-details.cjs.entry.js +1 -1
  12. package/dist/cjs/rtk-channel-selector-ui.cjs.entry.js +2 -2
  13. package/dist/cjs/rtk-chat-message.cjs.entry.js +2 -2
  14. package/dist/cjs/rtk-chat-messages-ui.cjs.entry.js +3 -3
  15. package/dist/cjs/rtk-chat-search-results.cjs.entry.js +1 -1
  16. package/dist/cjs/rtk-chat-toggle.cjs.entry.js +27 -22
  17. package/dist/cjs/rtk-clock.cjs.entry.js +3 -3
  18. package/dist/cjs/rtk-controlbar.cjs.entry.js +1 -1
  19. package/dist/cjs/rtk-debugger-toggle.cjs.entry.js +1 -1
  20. package/dist/cjs/rtk-file-dropzone.cjs.entry.js +1 -1
  21. package/dist/cjs/rtk-file-message_3.cjs.entry.js +8 -8
  22. package/dist/cjs/rtk-header.cjs.entry.js +1 -1
  23. package/dist/cjs/rtk-idle-screen.cjs.entry.js +1 -1
  24. package/dist/cjs/rtk-image-viewer.cjs.entry.js +1 -1
  25. package/dist/cjs/rtk-information-tooltip.cjs.entry.js +1 -1
  26. package/dist/cjs/rtk-leave-button.cjs.entry.js +1 -1
  27. package/dist/cjs/rtk-message-list-view.cjs.entry.js +3 -3
  28. package/dist/cjs/rtk-more-toggle.cjs.entry.js +2 -2
  29. package/dist/cjs/rtk-name-tag.cjs.entry.js +1 -1
  30. package/dist/cjs/rtk-notification.cjs.entry.js +2 -2
  31. package/dist/cjs/rtk-participant-setup.cjs.entry.js +2 -2
  32. package/dist/cjs/rtk-participant_2.cjs.entry.js +14 -14
  33. package/dist/cjs/rtk-participants-audio.cjs.entry.js +1 -1
  34. package/dist/cjs/rtk-participants-stage-list_4.cjs.entry.js +1 -1
  35. package/dist/cjs/rtk-plugins_2.cjs.entry.js +4 -4
  36. package/dist/cjs/rtk-poll_2.cjs.entry.js +3 -3
  37. package/dist/cjs/rtk-recording-indicator.cjs.entry.js +1 -1
  38. package/dist/cjs/rtk-screenshare-view.cjs.entry.js +5 -5
  39. package/dist/cjs/rtk-settings-toggle.cjs.entry.js +1 -1
  40. package/dist/cjs/rtk-spotlight-grid.cjs.entry.js +2 -2
  41. package/dist/cjs/rtk-stage.cjs.entry.js +1 -1
  42. package/dist/cjs/rtk-transcript.cjs.entry.js +1 -1
  43. package/dist/cjs/rtk-waiting-screen.cjs.entry.js +1 -1
  44. package/dist/collection/components/rtk-ai-transcriptions/rtk-ai-transcriptions.js +1 -1
  45. package/dist/collection/components/rtk-audio-grid/rtk-audio-grid.js +1 -1
  46. package/dist/collection/components/rtk-breakout-room-participants/rtk-breakout-room-participants.js +2 -2
  47. package/dist/collection/components/rtk-broadcast-message-modal/rtk-broadcast-message-modal.js +2 -2
  48. package/dist/collection/components/rtk-channel-creator/rtk-channel-creator.js +2 -2
  49. package/dist/collection/components/rtk-channel-details/rtk-channel-details.js +1 -1
  50. package/dist/collection/components/rtk-channel-selector-ui/rtk-channel-selector-ui.js +2 -2
  51. package/dist/collection/components/rtk-channel-selector-view/rtk-channel-selector-view.css +29 -29
  52. package/dist/collection/components/rtk-channel-selector-view/rtk-channel-selector-view.js +2 -2
  53. package/dist/collection/components/rtk-chat/rtk-chat.css +45 -8
  54. package/dist/collection/components/rtk-chat/rtk-chat.js +15 -7
  55. package/dist/collection/components/rtk-chat-message/rtk-chat-message.js +2 -2
  56. package/dist/collection/components/rtk-chat-messages-ui/rtk-chat-messages-ui.js +3 -3
  57. package/dist/collection/components/rtk-chat-messages-ui-paginated/rtk-chat-messages-ui-paginated.js +3 -3
  58. package/dist/collection/components/rtk-chat-search-results/rtk-chat-search-results.js +1 -1
  59. package/dist/collection/components/rtk-chat-toggle/rtk-chat-toggle.css +1 -1
  60. package/dist/collection/components/rtk-chat-toggle/rtk-chat-toggle.js +27 -26
  61. package/dist/collection/components/rtk-clock/rtk-clock.js +3 -3
  62. package/dist/collection/components/rtk-confirmation-modal/rtk-confirmation-modal.js +1 -1
  63. package/dist/collection/components/rtk-controlbar/rtk-controlbar.js +1 -1
  64. package/dist/collection/components/rtk-counter/rtk-counter.js +2 -2
  65. package/dist/collection/components/rtk-debugger-toggle/rtk-debugger-toggle.js +1 -1
  66. package/dist/collection/components/rtk-draft-attachment-view/rtk-draft-attachment-view.js +1 -1
  67. package/dist/collection/components/rtk-emoji-picker/rtk-emoji-picker.js +1 -1
  68. package/dist/collection/components/rtk-emoji-picker-button/rtk-emoji-picker-button.js +1 -1
  69. package/dist/collection/components/rtk-file-dropzone/rtk-file-dropzone.js +1 -1
  70. package/dist/collection/components/rtk-file-message/rtk-file-message.js +2 -2
  71. package/dist/collection/components/rtk-file-message-view/rtk-file-message-view.js +1 -1
  72. package/dist/collection/components/rtk-file-picker-button/rtk-file-picker-button.js +1 -1
  73. package/dist/collection/components/rtk-header/rtk-header.js +1 -1
  74. package/dist/collection/components/rtk-idle-screen/rtk-idle-screen.js +1 -1
  75. package/dist/collection/components/rtk-image-message/rtk-image-message.js +4 -4
  76. package/dist/collection/components/rtk-image-message-view/rtk-image-message-view.js +3 -3
  77. package/dist/collection/components/rtk-image-viewer/rtk-image-viewer.js +1 -1
  78. package/dist/collection/components/rtk-information-tooltip/rtk-information-tooltip.js +1 -1
  79. package/dist/collection/components/rtk-join-stage/rtk-join-stage.js +1 -1
  80. package/dist/collection/components/rtk-leave-button/rtk-leave-button.js +1 -1
  81. package/dist/collection/components/rtk-leave-meeting/rtk-leave-meeting.js +2 -2
  82. package/dist/collection/components/rtk-markdown-view/rtk-markdown-view.js +1 -1
  83. package/dist/collection/components/rtk-menu/rtk-menu.js +2 -2
  84. package/dist/collection/components/rtk-menu-item/rtk-menu-item.js +1 -1
  85. package/dist/collection/components/rtk-menu-list/rtk-menu-list.js +1 -1
  86. package/dist/collection/components/rtk-message-list-view/rtk-message-list-view.js +3 -3
  87. package/dist/collection/components/rtk-message-view/rtk-message-view.css +5 -1
  88. package/dist/collection/components/rtk-message-view/rtk-message-view.js +23 -1
  89. package/dist/collection/components/rtk-more-toggle/rtk-more-toggle.js +2 -2
  90. package/dist/collection/components/rtk-mute-all-confirmation/rtk-mute-all-confirmation.js +1 -1
  91. package/dist/collection/components/rtk-name-tag/rtk-name-tag.js +1 -1
  92. package/dist/collection/components/rtk-notification/rtk-notification.js +2 -2
  93. package/dist/collection/components/rtk-overlay-modal/rtk-overlay-modal.js +1 -1
  94. package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.css +5 -5
  95. package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.js +272 -256
  96. package/dist/collection/components/rtk-participant/rtk-participant.js +12 -12
  97. package/dist/collection/components/rtk-participant-setup/rtk-participant-setup.js +2 -2
  98. package/dist/collection/components/rtk-participants-audio/rtk-participants-audio.js +1 -1
  99. package/dist/collection/components/rtk-participants-stage-list/rtk-participants-stage-list.js +1 -1
  100. package/dist/collection/components/rtk-permissions-message/rtk-permissions-message.js +1 -1
  101. package/dist/collection/components/rtk-plugins/rtk-plugins.js +1 -1
  102. package/dist/collection/components/rtk-poll/rtk-poll.js +1 -1
  103. package/dist/collection/components/rtk-poll-form/rtk-poll-form.js +2 -2
  104. package/dist/collection/components/rtk-polls/rtk-polls.js +3 -3
  105. package/dist/collection/components/rtk-recording-indicator/rtk-recording-indicator.js +1 -1
  106. package/dist/collection/components/rtk-screenshare-view/rtk-screenshare-view.js +5 -5
  107. package/dist/collection/components/rtk-settings-toggle/rtk-settings-toggle.js +1 -1
  108. package/dist/collection/components/rtk-spinner/rtk-spinner.js +1 -1
  109. package/dist/collection/components/rtk-spotlight-grid/rtk-spotlight-grid.js +2 -2
  110. package/dist/collection/components/rtk-stage/rtk-stage.js +1 -1
  111. package/dist/collection/components/rtk-switch/rtk-switch.js +1 -1
  112. package/dist/collection/components/rtk-text-composer-view/rtk-text-composer-view.js +1 -1
  113. package/dist/collection/components/rtk-text-message/rtk-text-message.js +2 -2
  114. package/dist/collection/components/rtk-text-message-view/rtk-text-message-view.js +1 -1
  115. package/dist/collection/components/rtk-tooltip/rtk-tooltip.js +1 -1
  116. package/dist/collection/components/rtk-transcript/rtk-transcript.js +1 -1
  117. package/dist/collection/components/rtk-virtualized-list/rtk-virtualized-participant-list.js +2 -2
  118. package/dist/collection/components/rtk-waiting-screen/rtk-waiting-screen.js +1 -1
  119. package/dist/components/{p-9f7b9764.js → p-00bb4abb.js} +6 -6
  120. package/dist/components/{p-5248ee44.js → p-02b840f8.js} +3 -3
  121. package/dist/components/{p-a54ac879.js → p-0b2b3442.js} +2 -2
  122. package/dist/components/p-0d472019.js +362 -0
  123. package/dist/components/{p-94ba6c49.js → p-0e5cc539.js} +2 -2
  124. package/dist/components/{p-8901c589.js → p-0f2de0f8.js} +10 -7
  125. package/dist/components/{p-3a3650bd.js → p-107e55c1.js} +1 -1
  126. package/dist/components/{p-e62d961a.js → p-1a9e3806.js} +1 -1
  127. package/dist/components/{p-1da75fdd.js → p-1f5a4682.js} +2 -2
  128. package/dist/components/{p-bb55fa0c.js → p-2309fb19.js} +2 -2
  129. package/dist/components/{p-ff320cbb.js → p-241a8245.js} +1 -1
  130. package/dist/components/{p-93069a8c.js → p-2447a26f.js} +2 -2
  131. package/dist/components/{p-3bc68ec4.js → p-28170a8d.js} +9 -9
  132. package/dist/components/{p-ffe562b1.js → p-294cda89.js} +3 -3
  133. package/dist/components/{p-9c88019e.js → p-2a65883d.js} +1 -1
  134. package/dist/components/{p-d9845780.js → p-32c6e86d.js} +36 -28
  135. package/dist/components/{p-0c512fd1.js → p-39e8b34a.js} +1 -1
  136. package/dist/components/{p-ff8753e8.js → p-3e58e0f3.js} +1 -1
  137. package/dist/components/{p-2e6987aa.js → p-43d6a221.js} +2 -2
  138. package/dist/components/{p-7e8d976d.js → p-45220ce9.js} +2 -2
  139. package/dist/components/{p-962c2e24.js → p-46d99dd9.js} +2 -2
  140. package/dist/components/{p-9ff37f98.js → p-48acb953.js} +1 -1
  141. package/dist/components/{p-d9b1945a.js → p-4902c5cf.js} +1 -1
  142. package/dist/components/{p-5ac9b786.js → p-4aede34c.js} +1 -1
  143. package/dist/components/{p-6366df1e.js → p-4e5a54c2.js} +10 -10
  144. package/dist/components/{p-8b4e32b7.js → p-4ebf9684.js} +1 -1
  145. package/dist/components/{p-94bd91b3.js → p-540d8eb9.js} +1 -1
  146. package/dist/components/{p-ad7cabcc.js → p-5476e3f3.js} +2 -2
  147. package/dist/components/{p-471a529a.js → p-5669b6e7.js} +4 -4
  148. package/dist/components/{p-626c7a5f.js → p-598dc3f2.js} +2 -2
  149. package/dist/components/{p-c36a303c.js → p-616ae7ab.js} +2 -2
  150. package/dist/components/{p-a94b2e67.js → p-6739a399.js} +2 -2
  151. package/dist/components/{p-ad331530.js → p-6c9a833e.js} +1 -1
  152. package/dist/components/{p-1614fe8f.js → p-713c7ed7.js} +3 -3
  153. package/dist/components/{p-222454dc.js → p-7148ec6a.js} +1 -1
  154. package/dist/components/{p-ef493e1b.js → p-761c0e78.js} +1 -1
  155. package/dist/components/{p-3b6af603.js → p-7f489600.js} +1 -1
  156. package/dist/components/{p-0e8ff1cc.js → p-819cb785.js} +1 -1
  157. package/dist/components/{p-68af4225.js → p-89025409.js} +3 -3
  158. package/dist/components/{p-7a04f0cc.js → p-8cfdac0d.js} +5 -5
  159. package/dist/components/{p-41224895.js → p-8d6b21d5.js} +3 -3
  160. package/dist/components/{p-6c20da11.js → p-a25f3aca.js} +2 -2
  161. package/dist/components/{p-d0c5e808.js → p-a51db0d6.js} +16 -16
  162. package/dist/components/{p-a48e2cf0.js → p-a73665b4.js} +7 -7
  163. package/dist/components/{p-a24156ce.js → p-a8a6496d.js} +1 -1
  164. package/dist/components/{p-b58a185f.js → p-ae376177.js} +14 -14
  165. package/dist/components/{p-01c968b1.js → p-af3b99f4.js} +2 -2
  166. package/dist/components/{p-d81ba93a.js → p-bb4983b8.js} +2 -2
  167. package/dist/components/{p-c2b64e33.js → p-c334f0e5.js} +2 -2
  168. package/dist/components/{p-88bef213.js → p-cf8f725b.js} +1 -1
  169. package/dist/components/{p-d6146a96.js → p-d765dbe4.js} +6 -6
  170. package/dist/components/{p-6523d14b.js → p-da9018ea.js} +6 -6
  171. package/dist/components/{p-0d582365.js → p-dc3143c0.js} +2 -2
  172. package/dist/components/{p-58b56794.js → p-e0510925.js} +1 -1
  173. package/dist/components/{p-5e67d672.js → p-eeb37b16.js} +1 -1
  174. package/dist/components/{p-f2a47b5b.js → p-fa476519.js} +5 -5
  175. package/dist/components/{p-fa8f6b4a.js → p-fb836f65.js} +1 -1
  176. package/dist/components/{p-ba788f9e.js → p-fb900e8f.js} +2 -2
  177. package/dist/components/{p-262671ff.js → p-fef53de3.js} +1 -1
  178. package/dist/components/rtk-ai-toggle.js +2 -2
  179. package/dist/components/rtk-ai-transcriptions.js +1 -1
  180. package/dist/components/rtk-ai.js +1 -1
  181. package/dist/components/rtk-audio-grid.js +1 -1
  182. package/dist/components/rtk-audio-tile.js +3 -3
  183. package/dist/components/rtk-avatar.js +1 -1
  184. package/dist/components/rtk-breakout-room-manager.js +1 -1
  185. package/dist/components/rtk-breakout-room-participants.js +1 -1
  186. package/dist/components/rtk-breakout-rooms-manager.js +1 -1
  187. package/dist/components/rtk-breakout-rooms-toggle.js +2 -2
  188. package/dist/components/rtk-broadcast-message-modal.js +1 -1
  189. package/dist/components/rtk-camera-toggle.js +3 -3
  190. package/dist/components/rtk-caption-toggle.js +2 -2
  191. package/dist/components/rtk-channel-creator.js +4 -4
  192. package/dist/components/rtk-channel-details.js +1 -1
  193. package/dist/components/rtk-channel-header.js +4 -4
  194. package/dist/components/rtk-channel-selector-ui.js +4 -4
  195. package/dist/components/rtk-channel-selector-view.js +1 -1
  196. package/dist/components/rtk-chat-composer-ui.js +4 -4
  197. package/dist/components/rtk-chat-composer-view.js +1 -1
  198. package/dist/components/rtk-chat-message.js +1 -1
  199. package/dist/components/rtk-chat-messages-ui-paginated.js +1 -1
  200. package/dist/components/rtk-chat-messages-ui.js +14 -14
  201. package/dist/components/rtk-chat-search-results.js +11 -11
  202. package/dist/components/rtk-chat-toggle.js +30 -26
  203. package/dist/components/rtk-chat.js +1 -1
  204. package/dist/components/rtk-clock.js +3 -3
  205. package/dist/components/rtk-confirmation-modal.js +1 -1
  206. package/dist/components/rtk-controlbar-button.js +1 -1
  207. package/dist/components/rtk-controlbar.js +1 -1
  208. package/dist/components/rtk-counter.js +1 -1
  209. package/dist/components/rtk-debugger-toggle.js +3 -3
  210. package/dist/components/rtk-dialog-manager.js +14 -14
  211. package/dist/components/rtk-draft-attachment-view.js +1 -1
  212. package/dist/components/rtk-emoji-picker-button.js +1 -1
  213. package/dist/components/rtk-emoji-picker.js +1 -1
  214. package/dist/components/rtk-file-dropzone.js +1 -1
  215. package/dist/components/rtk-file-message-view.js +1 -1
  216. package/dist/components/rtk-file-message.js +1 -1
  217. package/dist/components/rtk-file-picker-button.js +1 -1
  218. package/dist/components/rtk-fullscreen-toggle.js +1 -1
  219. package/dist/components/rtk-grid-pagination.js +1 -1
  220. package/dist/components/rtk-grid.js +4 -4
  221. package/dist/components/rtk-header.js +1 -1
  222. package/dist/components/rtk-idle-screen.js +2 -2
  223. package/dist/components/rtk-image-message-view.js +1 -1
  224. package/dist/components/rtk-image-message.js +1 -1
  225. package/dist/components/rtk-image-viewer.js +1 -1
  226. package/dist/components/rtk-information-tooltip.js +1 -1
  227. package/dist/components/rtk-join-stage.js +1 -1
  228. package/dist/components/rtk-leave-button.js +3 -3
  229. package/dist/components/rtk-leave-meeting.js +1 -1
  230. package/dist/components/rtk-livestream-player.js +1 -1
  231. package/dist/components/rtk-livestream-toggle.js +2 -2
  232. package/dist/components/rtk-markdown-view.js +1 -1
  233. package/dist/components/rtk-meeting-title.js +1 -1
  234. package/dist/components/rtk-meeting.js +21 -21
  235. package/dist/components/rtk-menu-item.js +1 -1
  236. package/dist/components/rtk-menu-list.js +1 -1
  237. package/dist/components/rtk-menu.js +1 -1
  238. package/dist/components/rtk-message-list-view.js +4 -4
  239. package/dist/components/rtk-message-view.js +1 -1
  240. package/dist/components/rtk-mic-toggle.js +3 -3
  241. package/dist/components/rtk-mixed-grid.js +3 -3
  242. package/dist/components/rtk-more-toggle.js +4 -4
  243. package/dist/components/rtk-mute-all-button.js +3 -3
  244. package/dist/components/rtk-mute-all-confirmation.js +1 -1
  245. package/dist/components/rtk-name-tag.js +1 -1
  246. package/dist/components/rtk-notification.js +1 -1
  247. package/dist/components/rtk-notifications.js +1 -1
  248. package/dist/components/rtk-overlay-modal.js +1 -1
  249. package/dist/components/rtk-paginated-list.js +1 -1
  250. package/dist/components/rtk-participant-setup.js +2 -2
  251. package/dist/components/rtk-participant.js +1 -1
  252. package/dist/components/rtk-participants-audio.js +1 -1
  253. package/dist/components/rtk-participants-stage-list.js +1 -1
  254. package/dist/components/rtk-participants-stage-queue.js +1 -1
  255. package/dist/components/rtk-participants-toggle.js +2 -2
  256. package/dist/components/rtk-participants-viewer-list.js +1 -1
  257. package/dist/components/rtk-participants-waiting-list.js +1 -1
  258. package/dist/components/rtk-participants.js +11 -11
  259. package/dist/components/rtk-permissions-message.js +1 -1
  260. package/dist/components/rtk-pip-toggle.js +2 -2
  261. package/dist/components/rtk-plugins-toggle.js +2 -2
  262. package/dist/components/rtk-plugins.js +1 -1
  263. package/dist/components/rtk-poll-form.js +1 -1
  264. package/dist/components/rtk-poll.js +1 -1
  265. package/dist/components/rtk-polls-toggle.js +2 -2
  266. package/dist/components/rtk-polls.js +1 -1
  267. package/dist/components/rtk-recording-indicator.js +1 -1
  268. package/dist/components/rtk-recording-toggle.js +2 -2
  269. package/dist/components/rtk-screen-share-toggle.js +3 -3
  270. package/dist/components/rtk-screenshare-view.js +6 -6
  271. package/dist/components/rtk-settings-audio.js +1 -1
  272. package/dist/components/rtk-settings-toggle.js +3 -3
  273. package/dist/components/rtk-settings-video.js +1 -1
  274. package/dist/components/rtk-settings.js +3 -3
  275. package/dist/components/rtk-setup-screen.js +1 -1
  276. package/dist/components/rtk-sidebar.js +5 -5
  277. package/dist/components/rtk-spinner.js +1 -1
  278. package/dist/components/rtk-spotlight-grid.js +2 -2
  279. package/dist/components/rtk-spotlight-indicator.js +1 -1
  280. package/dist/components/rtk-stage-toggle.js +3 -3
  281. package/dist/components/rtk-stage.js +1 -1
  282. package/dist/components/rtk-switch.js +1 -1
  283. package/dist/components/rtk-tab-bar.js +1 -1
  284. package/dist/components/rtk-text-composer-view.js +1 -1
  285. package/dist/components/rtk-text-message-view.js +1 -1
  286. package/dist/components/rtk-text-message.js +1 -1
  287. package/dist/components/rtk-tooltip.js +1 -1
  288. package/dist/components/rtk-transcript.js +1 -1
  289. package/dist/components/rtk-transcripts.js +1 -1
  290. package/dist/components/rtk-virtualized-participant-list.js +1 -1
  291. package/dist/components/rtk-waiting-screen.js +1 -1
  292. package/dist/docs/docs-components.json +88 -66
  293. package/dist/docs/docs-vscode.json +4 -0
  294. package/dist/esm/loader.js +397 -371
  295. package/dist/esm/realtimekit-ui.js +1 -1
  296. package/dist/esm/rtk-ai-transcriptions.entry.js +1 -1
  297. package/dist/esm/rtk-audio-grid.entry.js +1 -1
  298. package/dist/esm/rtk-audio-visualizer_4.entry.js +1 -1
  299. package/dist/esm/rtk-avatar_24.entry.js +267 -247
  300. package/dist/esm/rtk-breakout-room-manager_3.entry.js +4 -4
  301. package/dist/esm/rtk-breakout-rooms-manager_9.entry.js +9 -9
  302. package/dist/esm/rtk-channel-creator.entry.js +2 -2
  303. package/dist/esm/rtk-channel-details.entry.js +1 -1
  304. package/dist/esm/rtk-channel-selector-ui.entry.js +2 -2
  305. package/dist/esm/rtk-chat-message.entry.js +2 -2
  306. package/dist/esm/rtk-chat-messages-ui.entry.js +3 -3
  307. package/dist/esm/rtk-chat-search-results.entry.js +1 -1
  308. package/dist/esm/rtk-chat-toggle.entry.js +27 -22
  309. package/dist/esm/rtk-clock.entry.js +3 -3
  310. package/dist/esm/rtk-controlbar.entry.js +1 -1
  311. package/dist/esm/rtk-debugger-toggle.entry.js +1 -1
  312. package/dist/esm/rtk-file-dropzone.entry.js +1 -1
  313. package/dist/esm/rtk-file-message_3.entry.js +8 -8
  314. package/dist/esm/rtk-header.entry.js +1 -1
  315. package/dist/esm/rtk-idle-screen.entry.js +1 -1
  316. package/dist/esm/rtk-image-viewer.entry.js +1 -1
  317. package/dist/esm/rtk-information-tooltip.entry.js +1 -1
  318. package/dist/esm/rtk-leave-button.entry.js +1 -1
  319. package/dist/esm/rtk-message-list-view.entry.js +3 -3
  320. package/dist/esm/rtk-more-toggle.entry.js +2 -2
  321. package/dist/esm/rtk-name-tag.entry.js +1 -1
  322. package/dist/esm/rtk-notification.entry.js +2 -2
  323. package/dist/esm/rtk-participant-setup.entry.js +2 -2
  324. package/dist/esm/rtk-participant_2.entry.js +14 -14
  325. package/dist/esm/rtk-participants-audio.entry.js +1 -1
  326. package/dist/esm/rtk-participants-stage-list_4.entry.js +1 -1
  327. package/dist/esm/rtk-plugins_2.entry.js +4 -4
  328. package/dist/esm/rtk-poll_2.entry.js +3 -3
  329. package/dist/esm/rtk-recording-indicator.entry.js +1 -1
  330. package/dist/esm/rtk-screenshare-view.entry.js +5 -5
  331. package/dist/esm/rtk-settings-toggle.entry.js +1 -1
  332. package/dist/esm/rtk-spotlight-grid.entry.js +2 -2
  333. package/dist/esm/rtk-stage.entry.js +1 -1
  334. package/dist/esm/rtk-transcript.entry.js +1 -1
  335. package/dist/esm/rtk-waiting-screen.entry.js +1 -1
  336. package/dist/realtimekit-ui/{p-d2a92f27.entry.js → p-00445029.entry.js} +1 -1
  337. package/dist/realtimekit-ui/{p-42989f41.entry.js → p-02c6b025.entry.js} +1 -1
  338. package/dist/realtimekit-ui/{p-af6436dd.entry.js → p-0baa78d7.entry.js} +1 -1
  339. package/dist/realtimekit-ui/{p-6ba99cc3.entry.js → p-1fe6003b.entry.js} +1 -1
  340. package/dist/realtimekit-ui/p-21d4bb9c.entry.js +1 -0
  341. package/dist/realtimekit-ui/{p-ed34d8a1.entry.js → p-23784be6.entry.js} +1 -1
  342. package/dist/realtimekit-ui/{p-f19668ba.entry.js → p-2441260e.entry.js} +1 -1
  343. package/dist/realtimekit-ui/p-322957ed.entry.js +1 -0
  344. package/dist/realtimekit-ui/{p-9ac1b986.entry.js → p-323d1aa4.entry.js} +1 -1
  345. package/dist/realtimekit-ui/p-44d69c6b.entry.js +1 -0
  346. package/dist/realtimekit-ui/p-48c87789.entry.js +1 -0
  347. package/dist/realtimekit-ui/{p-c43c2382.entry.js → p-53680d55.entry.js} +1 -1
  348. package/dist/realtimekit-ui/{p-5ebc57f8.entry.js → p-54a88fdf.entry.js} +1 -1
  349. package/dist/realtimekit-ui/{p-beedd1b5.entry.js → p-5892c1e0.entry.js} +1 -1
  350. package/dist/realtimekit-ui/{p-b64eae39.entry.js → p-612a8d25.entry.js} +1 -1
  351. package/dist/realtimekit-ui/{p-6437ff4e.entry.js → p-64206b62.entry.js} +1 -1
  352. package/dist/realtimekit-ui/{p-2f9211b9.entry.js → p-67ead213.entry.js} +1 -1
  353. package/dist/realtimekit-ui/{p-29c11bdb.entry.js → p-6896e819.entry.js} +1 -1
  354. package/dist/realtimekit-ui/{p-73a56e4f.entry.js → p-7a9a226e.entry.js} +1 -1
  355. package/dist/realtimekit-ui/{p-298befae.entry.js → p-80e51a73.entry.js} +1 -1
  356. package/dist/realtimekit-ui/p-820dad23.entry.js +1 -0
  357. package/dist/realtimekit-ui/p-83db4de1.entry.js +1 -0
  358. package/dist/realtimekit-ui/{p-844143f8.entry.js → p-85b3c0c4.entry.js} +1 -1
  359. package/dist/realtimekit-ui/{p-b4975a33.entry.js → p-8778b3e6.entry.js} +1 -1
  360. package/dist/realtimekit-ui/{p-447ffea0.entry.js → p-a1408db4.entry.js} +1 -1
  361. package/dist/realtimekit-ui/{p-1a78c129.entry.js → p-a67e2a25.entry.js} +1 -1
  362. package/dist/realtimekit-ui/{p-3d5ebc77.entry.js → p-a680da64.entry.js} +1 -1
  363. package/dist/realtimekit-ui/{p-b6cee65a.entry.js → p-a7172c2d.entry.js} +1 -1
  364. package/dist/realtimekit-ui/{p-78968008.entry.js → p-a852e0cf.entry.js} +1 -1
  365. package/dist/realtimekit-ui/{p-503371f7.entry.js → p-ac6c8ebe.entry.js} +1 -1
  366. package/dist/realtimekit-ui/{p-132fca40.entry.js → p-b25f7d7b.entry.js} +1 -1
  367. package/dist/realtimekit-ui/p-b51e813e.entry.js +1 -0
  368. package/dist/realtimekit-ui/{p-f6918dd7.entry.js → p-be5bdd0a.entry.js} +1 -1
  369. package/dist/realtimekit-ui/p-c5f704a3.entry.js +1 -0
  370. package/dist/realtimekit-ui/{p-a849f2b3.entry.js → p-cc226b51.entry.js} +1 -1
  371. package/dist/realtimekit-ui/{p-6928aa8e.entry.js → p-cda276d6.entry.js} +1 -1
  372. package/dist/realtimekit-ui/p-d880fb69.entry.js +1 -0
  373. package/dist/realtimekit-ui/p-f457ae6f.entry.js +1 -0
  374. package/dist/realtimekit-ui/{p-3482a231.entry.js → p-f6c82f1b.entry.js} +1 -1
  375. package/dist/realtimekit-ui/p-fa86682c.entry.js +1 -0
  376. package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
  377. package/dist/types/components/rtk-chat/rtk-chat.d.ts +1 -1
  378. package/dist/types/components/rtk-chat-toggle/rtk-chat-toggle.d.ts +4 -6
  379. package/dist/types/components/rtk-message-view/rtk-message-view.d.ts +2 -0
  380. package/dist/types/components/rtk-paginated-list/rtk-paginated-list.d.ts +68 -53
  381. package/dist/types/components.d.ts +17 -5
  382. package/package.json +1 -1
  383. package/dist/components/p-8e160343.js +0 -357
  384. package/dist/realtimekit-ui/p-02889d02.entry.js +0 -1
  385. package/dist/realtimekit-ui/p-0485834f.entry.js +0 -1
  386. package/dist/realtimekit-ui/p-190523f5.entry.js +0 -1
  387. package/dist/realtimekit-ui/p-2f6fd6de.entry.js +0 -1
  388. package/dist/realtimekit-ui/p-3a4e302b.entry.js +0 -1
  389. package/dist/realtimekit-ui/p-93e9fb59.entry.js +0 -1
  390. package/dist/realtimekit-ui/p-a9cb6a16.entry.js +0 -1
  391. package/dist/realtimekit-ui/p-bf234650.entry.js +0 -1
  392. package/dist/realtimekit-ui/p-ce5a911d.entry.js +0 -1
  393. package/dist/realtimekit-ui/p-d5144f9d.entry.js +0 -1
  394. package/dist/realtimekit-ui/p-db831ab6.entry.js +0 -1
@@ -11,7 +11,6 @@ import { g as generateConfig } from './config-325caca3.js';
11
11
  import { i as index } from './ResizeObserver.es-02979d4e.js';
12
12
  import { c as computePosition, o as offset, f as flip, s as shift, a as arrow } from './floating-ui.dom.esm-21c3d54e.js';
13
13
  import { f as formatDateTime, e as elapsedDuration } from './date-b1f78dea.js';
14
- import { s as smoothScrollToBottom } from './scroll-2d8e810c.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;
@@ -86,7 +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";
88
+ 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-1000, 8 8 8) / 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 padding-left: var(--rtk-space-3, 12px);\n padding-right: 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-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: flex-start;\n gap: var(--rtk-space-2, 8px);\n}\n\n.dropdown-trigger rtk-icon {\n margin-left: var(--rtk-space-1, 4px);\n height: var(--rtk-space-4, 16px);\n width: var(--rtk-space-4, 16px);\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 .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\n.dropdown {\n position: absolute;\n width: 100%;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));\n border-bottom-width: var(--rtk-border-width-sm, 1px);\n border-right-width: var(--rtk-border-width-none, 0);\n border-left-width: var(--rtk-border-width-none, 0);\n border-top-width: var(--rtk-border-width-none, 0);\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-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 flex: 1 1 auto;\n overflow-y: auto;\n}\n\nrtk-avatar {\n height: var(--rtk-space-4, 16px) !important;\n width: var(--rtk-space-4, 16px) !important;\n overflow: clip;\n border-radius: 9999px;\n padding: var(--rtk-space-2, 8px);\n font-size: 12px;\n}\n\n.channel {\n flex-shrink: 0;\n padding-top: var(--rtk-space-2, 8px);\n padding-bottom: var(--rtk-space-2, 8px);\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 display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--rtk-space-2, 8px);\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 .avatar-icon {\n height: var(--rtk-space-4, 16px);\n width: var(--rtk-space-4, 16px);\n padding: var(--rtk-space-2, 8px);\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
89
  const RtkChannelSelectorViewStyle0 = rtkChannelSelectorViewCss;
91
90
 
92
91
  var __decorate$g = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -213,8 +212,8 @@ const RtkChannelSelectorView = class {
213
212
  'last-message': true,
214
213
  'no-message': !channel.latestMessage,
215
214
  } }, 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 })))));
215
+ })))), this.viewAs === 'dropdown' && (h("button", { key: '0c87f90d6d0fe22284995ab7259689f80a862829', class: "dropdown-trigger", onClick: this.toggleDropdown }, h("span", { key: 'd1a364f2c5c57d19702d0b8707ca661c1dc4c14f' }, h("rtk-icon", { key: 'a4a028e536459fab6de2884e25b0312d2a36bc32', icon: this.iconPack.participants }), this.selectedChannelId &&
216
+ `${this.t('to')} ${this.getChannelById(this.selectedChannelId).name}`, this.getTotalUnreads() > 0 && (h("div", { key: '83c8efae8daed7dce4c4fdb55b523876c71a9a85', class: "unread-count" }, this.getTotalUnreads()))), h("rtk-icon", { key: '855ff62e593c7c14f448bbd5b8cf898e13d5d391', icon: this.showDropdown ? this.iconPack.chevron_up : this.iconPack.chevron_down })))));
218
217
  }
219
218
  get $el() { return getElement(this); }
220
219
  };
@@ -226,7 +225,7 @@ __decorate$g([
226
225
  ], RtkChannelSelectorView.prototype, "t", void 0);
227
226
  RtkChannelSelectorView.style = RtkChannelSelectorViewStyle0;
228
227
 
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";
228
+ 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 {\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.pinned-messages-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--rtk-space-2, 8px);\n padding: var(--rtk-space-4, 16px);\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 cursor: pointer;\n}\n\n.pinned-messages-header div {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--rtk-space-2, 8px);\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-content {\n --tw-border-opacity: 1;\n border-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));\n position: absolute;\n left: var(--rtk-space-0, 0px);\n top: 100%;\n z-index: 50;\n width: 100%;\n}\n\n.pinned-message {\n display: flex;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n gap: var(--rtk-space-2, 8px);\n --tw-border-opacity: 1;\n border-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));\n padding: var(--rtk-space-4, 16px);\n border-bottom-width: var(--rtk-border-width-sm, 1px);\n border-right-width: var(--rtk-border-width-none, 0);\n border-left-width: var(--rtk-border-width-none, 0);\n border-top-width: var(--rtk-border-width-none, 0);\n border-style: solid;\n}\n\n.pinned-message-avatar {\n height: var(--rtk-space-6, 24px) !important;\n width: var(--rtk-space-6, 24px) !important;\n}\n\n@keyframes swipe-in {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(0);\n }\n}\n";
230
229
  const RtkChatStyle0 = rtkChatCss;
231
230
 
232
231
  var __decorate$f = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -523,13 +522,25 @@ const RtkChat = class {
523
522
  };
524
523
  return [everyone, ...participants];
525
524
  };
526
- this.onTogglePinnedMessages = () => {
527
- this.showPinnedMessages = !this.showPinnedMessages;
525
+ this.getPinnedMessageLabel = (message) => {
526
+ if (message.type === 'text')
527
+ return message.message;
528
+ if (message.type === 'image')
529
+ return 'Image';
530
+ if (message.type === 'file')
531
+ return 'File';
532
+ return '';
528
533
  };
529
534
  this.renderPinnedMessagesHeader = () => {
530
535
  if (this.meeting.chat.pinned.length === 0)
531
536
  return null;
532
- 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})`)));
537
+ /**
538
+ * We do not display a picture against the avatar because the chatMessage API does not provide it.
539
+ */
540
+ 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" }, this.meeting.chat.pinned.map((message) => {
541
+ const label = this.getPinnedMessageLabel(message);
542
+ 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)));
543
+ })))));
533
544
  };
534
545
  }
535
546
  connectedCallback() {
@@ -683,10 +694,6 @@ const RtkChat = class {
683
694
  if (!this.meeting) {
684
695
  return null;
685
696
  }
686
- let chatMessages = this.chatGroups[this.selectedGroup] || [];
687
- if (this.showPinnedMessages && this.meeting.chat.pinned.length !== 0) {
688
- chatMessages = chatMessages.filter((chat) => chat.type === 'chat' && chat.message.pinned);
689
- }
690
697
  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()))));
691
698
  }
692
699
  get host() { return getElement(this); }
@@ -1037,9 +1044,9 @@ const RtkChatMessagesUiPaginated = class {
1037
1044
  }
1038
1045
  const isSelf = message.userId === this.meeting.self.userId;
1039
1046
  const viewType = isSelf ? 'outgoing' : 'incoming';
1040
- 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: () => {
1047
+ return (h("div", null, h("div", { class: "message-wrapper" }, h("rtk-message-view", { pinned: message.pinned, 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: () => {
1041
1048
  this.stateUpdate.emit({ image: message });
1042
- } }))), message.pinned && (h("div", { class: "pin-icon", part: "pin-icon" }, h("rtk-icon", { icon: this.iconPack.pin, size: "sm" }))))))));
1049
+ } }))))))));
1043
1050
  };
1044
1051
  this.chatUpdateListener = (data) => {
1045
1052
  if (this.selectedChannelId && data.message.channelId !== this.selectedChannelId)
@@ -1085,7 +1092,7 @@ const RtkChatMessagesUiPaginated = class {
1085
1092
  this.lastReadMessageIndex = -1;
1086
1093
  }
1087
1094
  render() {
1088
- 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' }))));
1095
+ return (h(Host, { key: '012b7189dfbdccfd8017cc9023263e6a7e9afd44' }, h("rtk-paginated-list", { key: '0ea37ee880fda0acdd7460b6da5f03e11ac304bf', 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: '53cb197b6d9319f470e87fe73d7ca0d158778e3f' }))));
1089
1096
  }
1090
1097
  get host() { return getElement(this); }
1091
1098
  static get watchers() { return {
@@ -1158,7 +1165,7 @@ const RtkDraftAttachmentView = class {
1158
1165
  this.onAttachmentChange();
1159
1166
  }
1160
1167
  render() {
1161
- 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)))))));
1168
+ return (h(Host, { key: 'f6ede093bcdf8100807baab4de2a296fc4960a07' }, h("div", { key: 'b19bbe9b2ea58ea4adccc2028a1b24ea6bc9f0a9', class: "preview-overlay" }, h("div", { key: 'cbb2bfcb3a50e6e7fbfd4109eb340ba51d6a162d', class: "preview" }, h("rtk-tooltip", { key: '15b50c547470b0fa22014e0992a1c7e26b234573', label: this.t('chat.cancel_upload') }, h("rtk-button", { key: '940332a51747af3368ffec497d5ef76fa64ecf75', variant: "secondary", kind: "icon", onClick: this.onDeleteClickHandler }, h("rtk-icon", { key: 'cc04b0ac70753e970ff638f187ad5f702dc3656b', 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)))))));
1162
1169
  }
1163
1170
  static get watchers() { return {
1164
1171
  "attachment": ["onAttachmentChange"]
@@ -1243,7 +1250,7 @@ const RtkEmojiPicker = class {
1243
1250
  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)))));
1244
1251
  }
1245
1252
  render() {
1246
- 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())));
1253
+ return (h(Host, { key: '6581d26d75a7b869d0ba00243ec74ee06b927e7d' }, h("div", { key: '3705d8c557ac3e05769171998e9176e7e40a232c', class: 'close-parent' }, h("rtk-button", { key: 'b437e579cb828a709de255ddfa6b751e4bdfbe51', 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: '7fac79a21c6be57156d17ceeff9ceb2834bbf709', icon: this.iconPack.dismiss }))), h("div", { key: '46cb2af6654ef36b7258baf47e3cd9e5bd60bf89', class: 'emoji-parent' }, h("input", { key: 'cfde33638d531f9bac1b1bf25d966a369f4dfb38', value: this.filterVal, onInput: (event) => this.handleInputChange(event.target), placeholder: this.t('search'), ref: (el) => (this.inputElement = el) }), this.mapEmojiList())));
1247
1254
  }
1248
1255
  };
1249
1256
  __decorate$b([
@@ -1276,7 +1283,7 @@ const RtkEmojiPickerButton = class {
1276
1283
  this.t = useLanguage();
1277
1284
  }
1278
1285
  render() {
1279
- 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 }))));
1286
+ return (h("rtk-tooltip", { key: '45ef1f18da6d1ecc3c02882590cd22e930461562', label: this.t('chat.send_emoji') }, h("rtk-button", { key: '6504abab2f1c6537443699c53a8cbdcf13530cba', variant: "ghost", kind: "icon", class: { active: this.isActive }, title: this.t('chat.send_emoji') }, h("rtk-icon", { key: 'd730c81abce72d9c3226f1f666941e1136bee77f', icon: this.iconPack.emoji_multiple }))));
1280
1287
  }
1281
1288
  };
1282
1289
  __decorate$a([
@@ -1307,7 +1314,7 @@ const RtkFileMessageView = class {
1307
1314
  this.iconPack = defaultIconPack;
1308
1315
  }
1309
1316
  render() {
1310
- 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))))));
1317
+ return (h("div", { key: '5cc29b4780f581a2f8b045e5051bcc66f3fdaf55', class: "file" }, h("rtk-button", { key: '4100b47bc1d72f08ec5fe645291bfbb58e3a6486', variant: "secondary", kind: "icon", onClick: () => downloadFile(sanitizeLink(this.url), { name: this.name, fallbackName: 'file' }), part: "button" }, h("rtk-icon", { key: '52ae14abb7c27b89861d5ba4c907d606257628c9', icon: this.iconPack.download })), h("div", { key: '02c9ad8d173172a85cc474273a966607d456360e', class: "file-data" }, h("div", { key: '6ceca21685d04f175006ba35a6de194cc98879ad', class: "name" }, this.name), h("div", { key: 'b07d07bcaedee3fd6fbcfe81ce2f6bf757655b5f', class: "file-data-split" }, h("div", { key: '280635ef486de02bc68ca3e774be14fa5a461d1c', class: "ext" }, getExtension(this.name)), h("span", { key: '84f72d8b37b7d15c257faed036b76c737eec780b', class: "divider" }), h("div", { key: '1b88f48f51afe3fceb57920c3d17f586e848a25f', class: "size" }, getFileSize(this.size))))));
1311
1318
  }
1312
1319
  };
1313
1320
  __decorate$9([
@@ -1363,7 +1370,7 @@ const RtkFilePickerButton = class {
1363
1370
  render() {
1364
1371
  const label = this.label || this.t('chat.send_file');
1365
1372
  const icon = this.iconPack[this.icon];
1366
- 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 }))));
1373
+ return (h("rtk-tooltip", { key: '057a0a5a714dbbde228e3481e53adea4f88fb3ad', label: label }, h("rtk-button", { key: '04193df1053b14687fb9464a122b9158707bdda1', variant: "ghost", kind: "icon", onClick: () => this.uploadFile(), title: label }, h("rtk-icon", { key: 'ed2fce30b93dfce9dd6b967d5993c93496cf3388', icon: icon }))));
1367
1374
  }
1368
1375
  };
1369
1376
  __decorate$8([
@@ -1423,7 +1430,7 @@ const RtkImageMessageView = class {
1423
1430
  this.status = 'loading';
1424
1431
  }
1425
1432
  render() {
1426
- return (h("div", { key: '47b2dd8f8dfc0d2aa20e80b513f802e1ebc09153', class: { image: true, loaded: this.status === 'loaded' } }, h("img", { key: 'fba4cfc015beb86040ec74b2a44e2163744a67c6', src: sanitizeLink(this.url), onLoad: () => {
1433
+ return (h("div", { key: '066606e6ae62634b2466bb46b453e0c2d91b17ea', class: { image: true, loaded: this.status === 'loaded' } }, h("img", { key: 'f042e5d3c1a6341e9fc0845e6643016f1be5b5f7', src: sanitizeLink(this.url), onLoad: () => {
1427
1434
  this.status = 'loaded';
1428
1435
  }, onError: () => {
1429
1436
  this.status = 'errored';
@@ -1431,9 +1438,9 @@ const RtkImageMessageView = class {
1431
1438
  if (this.status === 'loaded') {
1432
1439
  this.onPreview.emit(this.url);
1433
1440
  }
1434
- } }), 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: () => {
1441
+ } }), this.status === 'loading' && (h("div", { key: 'd4a5030468fbf70afae62bd55ae4d0fa989e15c2', class: "image-spinner", title: this.t('chat.img.loading'), "aria-label": this.t('chat.img.loading') }, h("rtk-spinner", { key: '216aba361a46cc100e7d26cc2daf1ffb0948d695', iconPack: this.iconPack }))), this.status === 'errored' && (h("div", { key: '01f5da8f70872c9fa22dc9a9b70b046b0001d05b', class: "image-errored", title: this.t('chat.error.img_not_found'), "aria-label": this.t('chat.error.img_not_found') }, h("rtk-icon", { key: '0f7e6fed2730f6366d07fc6afddb2b247e9b7d3a', icon: this.iconPack.image_off }))), this.status === 'loaded' && (h("div", { key: '5ac0e61c65a88a8d6b9ee54c900b856854d1b84b', class: "actions" }, h("rtk-button", { key: 'fd83dfecd7b5d9c3976374c3c55731b1f026fc0a', class: "action", variant: "secondary", kind: "icon", onClick: () => {
1435
1442
  this.onPreview.emit(this.url);
1436
- } }, 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 }))))));
1443
+ } }, h("rtk-icon", { key: '3ca7384fa28e6716345acacf9225ae9471ff8d63', icon: this.iconPack.full_screen_maximize })), h("rtk-button", { key: '198787808c389e4df48d3609a53c2d27cf2e7fb3', class: "action", variant: "secondary", kind: "icon", onClick: () => downloadFile(this.url, { fallbackName: 'image' }) }, h("rtk-icon", { key: 'f38fe3da48d1fc854001c719164c95f0673808c5', icon: this.iconPack.download }))))));
1437
1444
  }
1438
1445
  };
1439
1446
  __decorate$7([
@@ -1524,7 +1531,7 @@ const RtkMarkdownView = class {
1524
1531
  const slicedMessage = this.text.slice(0, this.maxLength);
1525
1532
  const withReply = extractReplyBlock(slicedMessage, true);
1526
1533
  const withoutReply = stripOutReplyBlock(slicedMessage);
1527
- return (h("p", { key: 'c33735507a0798dffc360f01793bc7b0caaac159' }, withReply.length !== 0 && h("blockquote", { key: 'c0a4271ee4c843b6e73c8300a8026a3ec8dd5fe3' }, this.renderMessage(withReply)), withoutReply.length !== 0 && this.renderMessage(withoutReply)));
1534
+ return (h("p", { key: '787e6d3177f4faf1c8dcd7c73d83a6de9c57b42b' }, withReply.length !== 0 && h("blockquote", { key: '1c4b82fb870994e6707d35adcd5e6f2f0e65dd26' }, this.renderMessage(withReply)), withoutReply.length !== 0 && this.renderMessage(withoutReply)));
1528
1535
  }
1529
1536
  };
1530
1537
  RtkMarkdownView.style = RtkMarkdownViewStyle0;
@@ -1905,7 +1912,7 @@ const RtkMenu$1 = class {
1905
1912
  });
1906
1913
  }
1907
1914
  render() {
1908
- return (h(Host, { key: 'b019210ff85bde38c61855f8ac38aa8b927aa857' }, h("span", { key: '14f689eed0672642c3a181ee5d197d7a9b5c00a8', id: "trigger", ref: (el) => (this.triggerEl = el), onClick: () => {
1915
+ return (h(Host, { key: '15461c803838be1651df6116a61598ce8ab988f9' }, h("span", { key: 'f36cdd2f1141f46a993daa880682382904a72509', id: "trigger", ref: (el) => (this.triggerEl = el), onClick: () => {
1909
1916
  this.clickedThis = true;
1910
1917
  if (this.menuListEl.style.display !== 'block') {
1911
1918
  this.menuListEl.style.display = 'block';
@@ -1914,7 +1921,7 @@ const RtkMenu$1 = class {
1914
1921
  else {
1915
1922
  this.menuListEl.style.display = 'none';
1916
1923
  }
1917
- } }, 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' }))));
1924
+ } }, h("slot", { key: 'af622c9dbb3394cb46a6bb909a45c5e3248b1a09', name: "trigger" })), h("span", { key: '445258e31b4b775fbc22b268234fe15a33f809c9', part: "menu-list", id: "menu-list", ref: (el) => (this.menuListEl = el) }, h("slot", { key: '87396622c6078253736cbe43a1cac55c6f90754f' }))));
1918
1925
  }
1919
1926
  };
1920
1927
  __decorate$6([
@@ -1949,7 +1956,7 @@ const RtkMenuItem = class {
1949
1956
  this.t = useLanguage();
1950
1957
  }
1951
1958
  render() {
1952
- return (h(Host, { key: '7ae0e75aa59e0ce3b6a919eb258f218d84033bdd', class: { [this.menuVariant]: true } }, h("slot", { key: '4fd6d31e2ecb9f99bdc7442e796c5dadcb8bcf74', name: "start" }), h("slot", { key: '04ef7d82759ff42015480b3cd789d941ffa574f0' }), h("slot", { key: 'ad3c22309470a6b71d6b6b9f0f8b58cde7f76f3c', name: "end" })));
1959
+ return (h(Host, { key: '8679dae05e846bb8b83a1dbc9580aa2dcad18ccd', class: { [this.menuVariant]: true } }, h("slot", { key: 'da53376b8188bfc47f904d348212fedff932b03a', name: "start" }), h("slot", { key: '4394a3afa13bd298880c1be5255f5a004c5ed42e' }), h("slot", { key: '2be62c70172912e6516ce207b571ea4794aa4f6c', name: "end" })));
1953
1960
  }
1954
1961
  };
1955
1962
  __decorate$5([
@@ -1984,7 +1991,7 @@ const RtkMenuList = class {
1984
1991
  this.t = useLanguage();
1985
1992
  }
1986
1993
  render() {
1987
- return (h(Host, { key: '1dd2702af95e0270488e6be1813b5979bd676697', class: { [this.menuVariant]: true } }, h("slot", { key: 'cbe97d571726800ad4a3e25b8c0e261b9a0cd40a' })));
1994
+ return (h(Host, { key: 'b743da0bae39c93cff7896968a64c84166b8a751', class: { [this.menuVariant]: true } }, h("slot", { key: '46ca973e68fccbf5c8c7544f61bb9745840d0054' })));
1988
1995
  }
1989
1996
  };
1990
1997
  __decorate$4([
@@ -1995,7 +2002,7 @@ __decorate$4([
1995
2002
  ], RtkMenuList.prototype, "t", void 0);
1996
2003
  RtkMenuList.style = RtkMenuListStyle0;
1997
2004
 
1998
- 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-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}}";
2005
+ 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-2, 8px);align-self:flex-end;font-size:11px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.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}}";
1999
2006
  const RtkMessageViewStyle0 = rtkMessageViewCss;
2000
2007
 
2001
2008
  var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -2016,6 +2023,8 @@ const RtkMessageView = class {
2016
2023
  this.actions = [];
2017
2024
  /** Appearance */
2018
2025
  this.variant = 'bubble';
2026
+ /** Is message pinned */
2027
+ this.pinned = false;
2019
2028
  /** Render */
2020
2029
  this.viewType = 'outgoing';
2021
2030
  /** Hides avatar */
@@ -2033,7 +2042,7 @@ const RtkMessageView = class {
2033
2042
  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) => (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))))));
2034
2043
  }
2035
2044
  render() {
2036
- return (h(Host, { key: '96feddf08120ae0e2aa89e955a16e8e4a43c78fb' }, h("div", { key: '79184165b5312ea52f0cbb57e25cfd4a757fc65f', class: { 'message-wrapper': true, [this.viewType]: true } }, !this.hideAvatar && (h("aside", { key: 'a2ccd72fbec0153282db018fb3473bf10f2176e9', class: "avatar", part: "avatar" }, h("rtk-avatar", { key: 'ecc9f5f77de0a47dfb5985c6f48e5f117c64b45e', participant: { name: this.authorName, picture: this.avatarUrl }, size: "sm" }))), h("div", { key: '3a72dc77c04eeb4d6015bf46dd9cc0bc9f533943', class: "message", part: "message" }, !this.hideAuthorName && (h("div", { key: '153a94b9fa6b23dac3fe4da62a22cbf66e4e73dc', class: "header" }, this.authorName, " ", this.isSelf ? ' (You)' : '')), h("div", { key: 'a36d44da27ea1a4d18feb91726d22e7adf983914', class: { body: true, bubble: this.variant === 'bubble' } }, h("slot", { key: '4ef8ca3766b562201e4e4443438c91679f09d471' }), !this.hideMetadata && !!this.time && (h("div", { key: '66754f1dd1a65ebdcda24449475b1f603db3ff1e', class: "metadata", title: formatDateTime(this.time) }, elapsedDuration(this.time, new Date(Date.now())))), this.actions.length !== 0 && this.renderActions())))));
2045
+ return (h(Host, { key: '7a4f7b9cd801a12871077b56c96213d6c7f53685' }, h("div", { key: '2b1731b82f709cf90f6d7ab239a8a516886de227', class: { 'message-wrapper': true, [this.viewType]: true } }, !this.hideAvatar && (h("aside", { key: '9963f792a5475c74e8170c0baec328162828163d', class: "avatar", part: "avatar" }, h("rtk-avatar", { key: 'e09b73fbba38f108809e6444940e8053c71a0276', participant: { name: this.authorName, picture: this.avatarUrl }, size: "sm" }))), h("div", { key: 'cdd752fa1553c5977251dcb0a32ecc5b65984514', class: "message", part: "message" }, !this.hideAuthorName && (h("div", { key: 'd0a758ac727a0a9b1757e8a61caf57bfadc20d08', class: "header" }, this.authorName, " ", this.isSelf ? ' (You)' : '')), h("div", { key: '32687e9a0462eaad2d625eb93d82205a23f99f51', class: { body: true, bubble: this.variant === 'bubble' } }, h("slot", { key: 'ca2022939cb8becf5d81655a37e344ff930a3251' }), !this.hideMetadata && !!this.time && (h("div", { key: '11dec318a44909b3080dcd29b3a6c4074ce394e3', class: "metadata", title: formatDateTime(this.time) }, this.pinned && h("rtk-icon", { key: '7a68a35c7113407f3676ee09de42fcab50485f39', icon: this.iconPack.pin, size: "sm" }), elapsedDuration(this.time, new Date(Date.now())))), this.actions.length !== 0 && this.renderActions())))));
2037
2046
  }
2038
2047
  };
2039
2048
  __decorate$3([
@@ -2041,9 +2050,37 @@ __decorate$3([
2041
2050
  ], RtkMessageView.prototype, "iconPack", void 0);
2042
2051
  RtkMessageView.style = RtkMessageViewStyle0;
2043
2052
 
2044
- 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))}";
2053
+ 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))}";
2045
2054
  const RtkPaginatedListStyle0 = rtkPaginatedListCss;
2046
2055
 
2056
+ /**
2057
+ * HOW INFINITE SCROLL WORKS:
2058
+ *
2059
+ * We use intersectionObserver to scroll up.
2060
+ * We use scrollEnd listener to scroll down.
2061
+ *
2062
+ * Why?
2063
+ * intersectionObserver doesn't work reliably for 2 way scrolling but has great ux,
2064
+ * so we use it to smoothly scroll up.
2065
+ *
2066
+ * We have empty divs at the top and bottom ($topRef, $bottomRef)
2067
+ * which act as triggers to tell that we have reached the top or end of our messages and need to fetch new messages,
2068
+ *
2069
+ * When scrolling up, we can't remove pages as intersectionObserver relies on
2070
+ * the index of dom elements to work properly.
2071
+ * So instead, we fetch older messages and push them to the end of the 2d array
2072
+ * if length exceeds pagesAllowed, we free up the pages and keep the first empty index in memory (firstEmptyIndex).
2073
+ *
2074
+ * For scrolling down, when scroll ends we see if the bottomRef is in view.
2075
+ * If yes, we fetch the new page and insert it at the firstEmptyIndex.
2076
+ * We update timestamps & firstEmptyIndex, then we rerender.
2077
+ *
2078
+ * If we have exceeded our page allowance we delete old pages.
2079
+ *
2080
+ * In this case deleting pages is okay as we are not relying on the index of dom elements to detect page end.
2081
+ *
2082
+ * This also simplifies the code because when a user scrolls up we do not need to manage a lastEmptyIndex.
2083
+ */
2047
2084
  var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2048
2085
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2049
2086
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -2057,274 +2094,257 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
2057
2094
  const RtkPaginatedList = class {
2058
2095
  constructor(hostRef) {
2059
2096
  registerInstance(this, hostRef);
2097
+ /**
2098
+ * when scrolling up, we can't remove pages as intersectionObserver relies on
2099
+ * the index of dom elements to stay stable.
2100
+ * So, instead we free up the pages and keep the last empty index in memory.
2101
+ */
2102
+ this.firstEmptyIndex = -1;
2103
+ this.maxTS = 0;
2104
+ // the length of pages will always be pageSize + 2
2105
+ this.pages = [];
2106
+ /** label to show when empty */
2107
+ this.emptyListLabel = null;
2108
+ this.rerenderBoolean = false;
2109
+ this.showEmptyListLabel = false;
2060
2110
  /** Icon pack */
2061
2111
  this.iconPack = defaultIconPack;
2062
2112
  /** Language */
2063
2113
  this.t = useLanguage();
2064
- /** label to show when empty */
2065
- this.emptyListLabel = null;
2066
2114
  this.isLoading = false;
2067
2115
  this.isLoadingTop = false;
2068
2116
  this.isLoadingBottom = false;
2069
- this.hasMoreDataAtTop = false;
2070
- this.rerenderBoolean = false;
2071
2117
  /**
2072
- * This gets disabled when the user scrolls up and the bottom node
2073
- * is not visible anymore.
2074
- */
2075
- this.shouldRenderNewNodes = true;
2076
- /**
2077
- * This gets disabled when the user scrolls up and the bottom node
2078
- * is not visible anymore.
2079
- */
2080
- this.hasNewNodesToRender = false;
2081
- this.showEmptyListLabel = false;
2082
- /**
2083
- * This is a private variable not a state
2084
- * since we want to debounce rerenders
2085
- *
2086
- * A list of pages where each page contains a number of Nodes
2087
- * [
2088
- * [Node 1, Node 2, Node 3.... Node N],
2089
- * [Node 1, Node 2, Node 3.... Node N],
2090
- * ]
2091
- */
2092
- this.pagesToRender = [[]];
2093
- this.currentTime = () => {
2094
- return new Date().getTime();
2095
- };
2118
+ * Even when auto scroll is enabled, we only want to scroll if a new realtime message has arrived.
2119
+ * This variable tells us if we should respect auto scroll after a new page has been loaded.
2120
+ * It is also used by the scroll to bottom button.
2121
+ * */
2122
+ this.shouldScrollToBottom = false;
2123
+ /** UI Indicator for the "scroll to bottom" button.
2124
+ * Toggles on when a new node is added and autoscroll is disabled.
2125
+ * Toggles off when all nodes are loaded */
2126
+ this.showNewMessagesCTR = false;
2096
2127
  this.observe = (el) => {
2097
2128
  if (!el)
2098
2129
  return;
2099
2130
  this.intersectionObserver.observe(el);
2100
2131
  };
2132
+ this.isAtBottom = () => {
2133
+ const rect = this.$bottomRef.getBoundingClientRect();
2134
+ return rect.top >= 0 && rect.bottom <= window.innerHeight;
2135
+ };
2101
2136
  }
2102
2137
  /**
2103
- * On a new node created
2138
+ * Adds a new node to the beginning of the paginated list
2139
+ * @param {DataNode} node - The data node to add to the beginning of the list
2104
2140
  */
2105
2141
  async onNewNode(node) {
2106
- if (!this.shouldRenderNewNodes) {
2107
- this.hasNewNodesToRender = true;
2108
- return;
2142
+ // Always update the maxTS. New messages will load on scroll till the end cursor (newTS) reaches this value.
2143
+ this.maxTS = Math.max(this.maxTS, node.timeMs);
2144
+ // if we are at the bottom of the page
2145
+ if (this.firstEmptyIndex === -1) {
2146
+ // append messages to the page if page has not reached full capacity
2147
+ if (this.pages[0].length < this.pageSize) {
2148
+ this.pages[0].unshift(node);
2149
+ this.newTS = node.timeMs;
2150
+ this.rerender();
2151
+ }
2152
+ else {
2153
+ // if page is at full capacity, load next page
2154
+ this.loadNextPage();
2155
+ }
2109
2156
  }
2110
- this.addNodeToRender(node, false);
2111
- this.rerender();
2112
- }
2113
- /**
2114
- * On node deleted
2115
- */
2116
- async onNodeDelete(key) {
2117
- const oldLength = this.pagesToRender.flat().length;
2118
- this.pagesToRender = this.pagesToRender.map((page) => page.filter((item) => item.id !== key));
2119
- if (oldLength !== this.pagesToRender.flat().length) {
2120
- this.rerender();
2157
+ // If autoscroll is enabled, this method will scroll to the bottom
2158
+ if (this.autoScroll) {
2159
+ this.shouldScrollToBottom = true;
2160
+ this.scrollToBottom();
2121
2161
  }
2162
+ else {
2163
+ this.showNewMessagesCTR = true;
2164
+ }
2165
+ }
2166
+ // this method is called recursively based on shouldScrollToBottom (see scrollEnd listener)
2167
+ scrollToBottom() {
2168
+ this.$bottomRef.scrollIntoView({ behavior: 'smooth' });
2122
2169
  }
2123
2170
  /**
2124
- * On node updated
2125
- */
2126
- async onNodeUpdate(key, newItem) {
2127
- let shouldRerender = false;
2128
- this.pagesToRender = this.pagesToRender.map((page) => page.map((item) => {
2129
- if (item.id === key) {
2130
- shouldRerender = true;
2131
- return newItem;
2171
+ * Deletes a node anywhere from the list
2172
+ * @param {string} id - The id of the node to delete
2173
+ * */
2174
+ async onNodeDelete(id) {
2175
+ // Iterate only over pages that have content (not empty)
2176
+ for (let i = this.pages.length - 1; i > this.firstEmptyIndex; i--) {
2177
+ const index = this.pages[i].findIndex((node) => node.id === id);
2178
+ // message in view
2179
+ if (index !== -1) {
2180
+ // delete message
2181
+ this.pages[i].splice(index, 1);
2182
+ if (i === this.firstEmptyIndex + 1) {
2183
+ // if newest page is empty, update first empty index
2184
+ if (this.pages[i].length === 0)
2185
+ this.firstEmptyIndex++;
2186
+ // update timestamp, first empty index could be -1, so we need to cap it at 0
2187
+ this.newTS = this.pages[Math.max(this.firstEmptyIndex, 0)][0].timeMs;
2188
+ }
2189
+ else if (i === this.firstEmptyIndex + this.pagesAllowed) {
2190
+ // if oldest page is empty, remove it
2191
+ if (this.pages[i].length === 0)
2192
+ this.pages.pop();
2193
+ // update timestamp
2194
+ const lastPage = this.pages[this.firstEmptyIndex + this.pagesAllowed];
2195
+ this.oldTS = lastPage[lastPage.length - 1].timeMs;
2196
+ }
2197
+ this.rerender();
2132
2198
  }
2133
- return item;
2134
- }));
2135
- if (shouldRerender)
2136
- this.rerender();
2137
- }
2138
- onItemChanged(newItemId, oldItemId) {
2139
- if (newItemId !== oldItemId) {
2140
- this.pagesToRender = [[]];
2141
- this.loadFirstPage().then(() => this.rerender());
2142
2199
  }
2143
2200
  }
2201
+ /**
2202
+ * Updates a new node anywhere in the list
2203
+ * @param {string} _id - The id of the node to update
2204
+ * @param {DataNode} _node - The updated data node
2205
+ * */
2206
+ async onNodeUpdate(_id, _node) { }
2207
+ rerender() {
2208
+ this.rerenderBoolean = !this.rerenderBoolean;
2209
+ }
2144
2210
  connectedCallback() {
2145
2211
  this.rerender = debounce(this.rerender.bind(this), 50, { maxWait: 200 });
2146
- this.autoScroll = true;
2147
2212
  this.intersectionObserver = new IntersectionObserver((entries) => {
2148
- writeTask(() => {
2213
+ writeTask(async () => {
2149
2214
  for (const entry of entries) {
2150
- if (entry.target.id === 'bottom-scroll') {
2151
- if (entry.isIntersecting)
2152
- this.loadBottom();
2153
- else
2154
- this.shouldRenderNewNodes = false;
2155
- }
2156
2215
  if (entry.target.id === 'top-scroll' && entry.isIntersecting) {
2157
- this.loadTop();
2216
+ this.isLoadingTop = true;
2217
+ await this.loadPrevPage();
2218
+ this.isLoadingTop = false;
2158
2219
  }
2159
2220
  }
2160
2221
  });
2161
2222
  });
2162
2223
  }
2163
- disconnectedCallback() {
2164
- this.intersectionObserver.disconnect();
2165
- }
2166
2224
  componentDidLoad() {
2167
- /**
2168
- * Adding observes here so that on the first render we scroll down
2169
- * and shouldRenderNewNodes remains true
2170
- */
2171
- this.loadFirstPage();
2172
2225
  this.observe(this.$topRef);
2173
- this.observe(this.$bottomRef);
2174
- }
2175
- componentDidRender() {
2176
- if (this.shouldRenderNewNodes && this.autoScroll)
2177
- smoothScrollToBottom(this.$paginatedList);
2178
- }
2179
- loadFirstPage() {
2180
- return this.loadPage(this.currentTime(), this.pageSize, true, (data) => {
2181
- if (data.length === 0) {
2182
- this.showEmptyListLabel = true;
2183
- }
2184
- });
2185
- }
2186
- loadTop() {
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
- return;
2193
- if (this.pagesToRender.length === 1 && this.pagesToRender[0].length < this.pageSize)
2194
- return;
2195
- /**
2196
- * TODO: Make this more flexible currently this only works with chat
2197
- */
2198
- const oldestVNode = this.pagesToRender[0][0];
2199
- const oldestTimestamp = oldestVNode.timeMs;
2200
- // TODO: scrollIntoView
2201
- const onPageRendered = () => { }; // oldestVNode.$elm$?.scrollIntoView();
2202
- this.isLoadingTop = true;
2203
- this.loadPage(oldestTimestamp - 1, this.pageSize, true, onPageRendered, 'top');
2204
- }
2205
- loadBottom() {
2206
- /**
2207
- * If there is only one unfilled page or no page, no need to check
2208
- * for top since it will be empty
2209
- */
2210
- if (this.pagesToRender.length === 0) {
2211
- this.shouldRenderNewNodes = true;
2212
- return;
2213
- }
2214
- if (this.pagesToRender.length === 1 && this.pagesToRender[0].length < this.pageSize) {
2215
- this.shouldRenderNewNodes = true;
2216
- return;
2217
- }
2218
- const newestVNode = this.pagesToRender.at(-1).at(-1);
2219
- const newestTimestamp = newestVNode.timeMs;
2220
- // TODO: scrollIntoView
2221
- const onPageRendered = () => smoothScrollToBottom(this.$paginatedList);
2222
- this.isLoadingBottom = true;
2223
- this.loadPage(newestTimestamp + 1, this.pageSize, false, onPageRendered, 'bottom');
2224
- }
2225
- addNodeToRender(node, addToStart) {
2226
- if (addToStart) {
2227
- const firstPage = this.pagesToRender[0];
2228
- if (firstPage && (firstPage === null || firstPage === void 0 ? void 0 : firstPage.length) < this.pageSize) {
2226
+ if (this.$containerRef) {
2227
+ this.$containerRef.onscrollend = async () => {
2229
2228
  /**
2230
- * If first page is not full then just add to that page
2229
+ * Load new page if:
2230
+ * if there are nodes to load at the bottom (maxTS > newTS)
2231
+ * or if there are pages to fill at the bottom (firstEmptyIndex > -1)
2231
2232
  */
2232
- firstPage.unshift(node);
2233
- }
2234
- else {
2235
- /**
2236
- * If first page is full then add a new page to the start
2237
- */
2238
- const newPage = [node];
2239
- this.pagesToRender.unshift(newPage);
2240
- this.removeLastPageIfNeeded(false);
2241
- }
2242
- }
2243
- else {
2244
- const [lastPage] = this.pagesToRender.slice(-1);
2245
- if (lastPage && (lastPage === null || lastPage === void 0 ? void 0 : lastPage.length) < this.pageSize) {
2246
- /**
2247
- * If last page is not full then just add it
2248
- */
2249
- lastPage.push(node);
2250
- }
2251
- else {
2252
- /**
2253
- * If last page is full add a new page with just
2254
- * this node
2255
- */
2256
- const newPage = [node];
2257
- this.pagesToRender.push(newPage);
2258
- this.removeLastPageIfNeeded(true);
2259
- }
2233
+ if (this.isAtBottom() && (this.maxTS > this.newTS || this.firstEmptyIndex > -1)) {
2234
+ this.isLoadingBottom = true;
2235
+ await this.loadNextPage();
2236
+ this.isLoadingBottom = false;
2237
+ if (this.shouldScrollToBottom)
2238
+ this.scrollToBottom();
2239
+ }
2240
+ };
2260
2241
  }
2261
2242
  }
2262
- /**
2263
- * @param start
2264
- * @param end
2265
- * @param reversed Defines whether to add the page at the beginning or the end
2266
- * @param onPageLoaded Callback for when all new nodes are rendered
2267
- * @param direction Indicates if loading from 'top' or 'bottom'
2268
- */
2269
- async loadPage(timestamp, size, reversed, onPageRendered = () => { }, direction) {
2243
+ async loadPrevPage() {
2244
+ if (this.isLoading)
2245
+ return;
2246
+ /**
2247
+ * NOTE(ikabra): this case also runs on initial load
2248
+ * if scrolling up ->
2249
+ * fetch older messages and push to the end of the array
2250
+ * cleanup 1st non empty page from the array if length exceeds pagesAllowed
2251
+ */
2252
+ // if no old timestamp, it means we are at initial state
2253
+ if (!this.oldTS)
2254
+ this.oldTS = new Date().getTime();
2255
+ // load data
2270
2256
  this.isLoading = true;
2271
- const data = (await this.fetchData(timestamp, size, reversed));
2257
+ const data = await this.fetchData(this.oldTS - 1, this.pageSize, true);
2272
2258
  this.isLoading = false;
2273
- if (direction === 'top') {
2274
- this.isLoadingTop = false;
2275
- this.hasMoreDataAtTop = (data === null || data === void 0 ? void 0 : data.length) > 0;
2276
- }
2277
- if (direction === 'bottom') {
2278
- this.isLoadingBottom = false;
2279
- }
2280
- if (!(data === null || data === void 0 ? void 0 : data.length)) {
2259
+ // no more old messages to show, we are at the top of the page
2260
+ if (!data.length)
2261
+ return;
2262
+ // add old data to the end of the array
2263
+ this.pages.push(data);
2264
+ // clear old pages when we reach the limit
2265
+ if (this.pages.length > this.pagesAllowed) {
2266
+ this.pages[this.pages.length - this.pagesAllowed - 1] = [];
2281
2267
  /**
2282
- * While scrolling down if there were no new items found
2283
- * then start rendering new nodes;
2268
+ * find last non empty page in range (this.pages.length, this.firstEmptyIndex)
2269
+ * we are doing this because any of the middle pages in the currently rendered pages
2270
+ * could be empty as we allow deleting messages.
2271
+ * This helps us set the first empty index correctly.
2284
2272
  */
2285
- if (!reversed) {
2286
- this.hasNewNodesToRender = false;
2287
- this.shouldRenderNewNodes = true;
2273
+ for (let i = this.firstEmptyIndex + 1; i < this.pages.length; i++) {
2274
+ if (this.pages[i].length > 0)
2275
+ break;
2276
+ this.firstEmptyIndex = i;
2288
2277
  }
2289
- onPageRendered([]);
2290
- return;
2291
2278
  }
2292
- data.forEach((node) => this.addNodeToRender(node, reversed));
2279
+ // update the old timestamp
2280
+ const lastPage = this.pages[this.pages.length - 1];
2281
+ this.oldTS = lastPage[lastPage.length - 1].timeMs;
2282
+ // update the new timestamp
2283
+ this.newTS = this.pages[this.firstEmptyIndex + 1][0].timeMs;
2293
2284
  this.rerender();
2294
- onPageRendered(data);
2295
- }
2296
- rerender() {
2297
- this.rerenderBoolean = !this.rerenderBoolean;
2298
2285
  }
2299
- removeLastPageIfNeeded(removeFromStart) {
2300
- if (this.pagesToRender.length > this.pagesAllowed) {
2301
- if (removeFromStart)
2302
- this.pagesToRender.shift();
2303
- else
2304
- this.pagesToRender.pop();
2286
+ async loadNextPage() {
2287
+ if (this.isLoading)
2288
+ return;
2289
+ // new timestamp needs to be assigned by loadPrevPage method
2290
+ if (!this.newTS) {
2291
+ this.showNewMessagesCTR = false;
2292
+ this.shouldScrollToBottom = false;
2293
+ return;
2305
2294
  }
2306
- }
2307
- onDownArrowClicked() {
2308
- /**
2309
- * Load the freshest pages
2310
- */
2311
- this.loadBottom();
2312
- }
2313
- onLoadMoreOnTopClicked() {
2314
- this.loadTop();
2295
+ // load data
2296
+ this.isLoading = true;
2297
+ const data = await this.fetchData(this.newTS + 1, this.pageSize, false);
2298
+ this.isLoading = false;
2299
+ // no more new messages to load
2300
+ if (!data.length) {
2301
+ this.showNewMessagesCTR = false;
2302
+ this.shouldScrollToBottom = false;
2303
+ // remove extra pages from the start if any (could be due to users deleting messages)
2304
+ this.pages = this.pages.filter((page) => page.length > 0);
2305
+ this.firstEmptyIndex = -1;
2306
+ return;
2307
+ }
2308
+ // when filling empty pages
2309
+ if (this.firstEmptyIndex > -1) {
2310
+ this.pages[this.firstEmptyIndex] = data.reverse();
2311
+ }
2312
+ else {
2313
+ // when already at the bottom and loading messages in realtime
2314
+ this.pages.unshift(data.reverse());
2315
+ }
2316
+ if (this.pages.length > this.pagesAllowed) {
2317
+ this.pages.pop();
2318
+ }
2319
+ // smallest value for firstEmptyIndex can be -1, so we cap the index at 0
2320
+ this.newTS = this.pages[Math.max(0, this.firstEmptyIndex)][0].timeMs;
2321
+ // remove all empty pages from the end
2322
+ for (let i = this.pages.length - 1; i > this.firstEmptyIndex; i--) {
2323
+ if (this.pages[i].length > 0)
2324
+ break;
2325
+ // if page is empty, remove it
2326
+ this.pages.pop();
2327
+ }
2328
+ // update the old timestamp
2329
+ const lastPage = this.pages[this.pages.length - 1];
2330
+ this.oldTS = lastPage[lastPage.length - 1].timeMs;
2331
+ // when scrolling too fast scroll a bit to the top to be able to load new messages when you scroll down
2332
+ if (this.$containerRef.scrollTop === 0)
2333
+ this.$containerRef.scrollTop = -60;
2334
+ // smallest value for this index can be -1 (indicates we are at the bottom of the page).
2335
+ this.firstEmptyIndex = Math.max(-1, this.firstEmptyIndex - 1);
2336
+ this.rerender();
2315
2337
  }
2316
2338
  render() {
2317
- var _a;
2318
2339
  /**
2319
2340
  * div.container is flex=column-reverse
2320
2341
  * which is why div#bottom-scroll comes before div#top-scroll
2321
- * div.page-wrapper prevents reversal of messages
2322
2342
  */
2323
- 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) }))));
2343
+ return (h(Host, { key: '91ac7d0ca3fb720259945ffaa97f465b34c694fa' }, h("div", { key: '33896c19ecc4359ae163c65b5c71b9f17673e765', class: "scrollbar container", part: "container", ref: (el) => (this.$containerRef = el) }, h("div", { key: 'e26a5ef3979ec132277b9598afc17ea65683f6c8', class: { 'show-new-messages-ctr': true, active: this.showNewMessagesCTR } }, h("rtk-button", { key: 'e769a8f54a298af456552733dc9de27d059e5138', class: "show-new-messages", kind: "icon", variant: "secondary", part: "show-new-messages", onClick: () => {
2344
+ this.shouldScrollToBottom = true;
2345
+ this.scrollToBottom();
2346
+ } }, h("rtk-icon", { key: '6fb4cbc2247eb971004a94926b95ebd0f90ab0fd', icon: this.iconPack.chevron_down }))), h("div", { key: 'e91dd8f25012e4509e0ff3cb4d6b65aa9467d427', class: "smallest-dom-element", id: "bottom-scroll", ref: (el) => (this.$bottomRef = el) }), this.isLoadingBottom && this.pages.length > 0 && h("rtk-spinner", { key: '199c0ccffd57716bd5a05dcef8610113d3c58d3d', size: "sm" }), this.isLoading && this.pages.length < 1 && h("rtk-spinner", { key: 'b8a3e08a25b2bc1d50b5a9b1b2deda802ae5eb28', 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: '2cb56b4f70d37548fd9aa71b961559b43c54a922', size: "sm" }), h("div", { key: '4b183c49bfe60fd63af40e02b9b46215c08bb484', class: "smallest-dom-element", id: "top-scroll", ref: (el) => (this.$topRef = el) }))));
2324
2347
  }
2325
- static get watchers() { return {
2326
- "selectedItemId": ["onItemChanged"]
2327
- }; }
2328
2348
  };
2329
2349
  __decorate$2([
2330
2350
  SyncWithStore()
@@ -2356,7 +2376,7 @@ const RtkSpinner = class {
2356
2376
  this.size = 'md';
2357
2377
  }
2358
2378
  render() {
2359
- return (h(Host, { key: '2eb8672a849f85e2c207ec9331d1093b7deefaa3' }, h("rtk-icon", { key: '5a2f292ddd7a5c52709ce41f47422f08bdf82852', class: "spinner", icon: this.iconPack.spinner })));
2379
+ return (h(Host, { key: 'c042cbd31d8fa9e58c0cbbc5646575a3172fc824' }, h("rtk-icon", { key: '0171ba3d5f7506e2c67eb813c5ad5b263352088d', class: "spinner", icon: this.iconPack.spinner })));
2360
2380
  }
2361
2381
  };
2362
2382
  __decorate$1([
@@ -2434,7 +2454,7 @@ const RtkTextComposerView = class {
2434
2454
  }
2435
2455
  }
2436
2456
  render() {
2437
- 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 })));
2457
+ return (h("div", { key: 'e5f7fa2bd4a2386ff5185001981477ccacf24556', class: "chat-input", part: "chat-input-container" }, this.maxLengthBreached > 0 && (h("div", { key: '4c06c853ddc7bebafe45fdb2e2c5c9e1c20021fe', class: 'text-error ' + (this.maxLengthBreached === this.maxLength ? 'breached' : '') }, h("rtk-icon", { key: '524037dc257f0aea206fbc3503d1fe1cb03449be', 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: 'cf975664f367f2621593239ab1cf2e73f5acdb45', class: 'text-error breached' }, h("rtk-icon", { key: '70a6555f1fa9752f91951181b46e0ed0e7eb8679', id: "warning-indicator", icon: this.iconPack.warning, part: "warning-indicator" }), ' ', this.t('chat.rate_limit_error'))), h("textarea", { key: '7fc7280dd143cd701d5037e04c2b36c3ea8ec023', ref: (el) => (this.$textArea = el), placeholder: this.placeholder, disabled: this.disabled, onInput: this.onInputHandler, onKeyDown: this.keyDownHandler, part: "chat-input", value: this.value })));
2438
2458
  }
2439
2459
  };
2440
2460
  __decorate([
@@ -2455,7 +2475,7 @@ const RtkTextMessageView = class {
2455
2475
  this.isMarkdown = false;
2456
2476
  }
2457
2477
  render() {
2458
- return (h("p", { key: '90e03b1cdd7271004b0ba2932d7e00342d0b884d', class: { text: true, emoji: hasOnlyEmojis(this.text) } }, this.isMarkdown ? h("rtk-markdown-view", { text: this.text }) : this.text));
2478
+ return (h("p", { key: 'b4cbabb44d32f96a23cd72f108d6a36b05491c97', class: { text: true, emoji: hasOnlyEmojis(this.text) } }, this.isMarkdown ? h("rtk-markdown-view", { text: this.text }) : this.text));
2459
2479
  }
2460
2480
  };
2461
2481
  RtkTextMessageView.style = RtkTextMessageViewStyle0;
@@ -2561,7 +2581,7 @@ const RtkMenu = class {
2561
2581
  });
2562
2582
  }
2563
2583
  render() {
2564
- 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" }))));
2584
+ return (h(Host, { key: '5278137bc9b99d9fe9ffeb0fc30bd887d600494d' }, h("span", { key: 'cbefda068a15340dad76668c3696a10bd94cb8e9', part: "trigger", id: "trigger", ref: (el) => (this.triggerEl = el) }, h("slot", { key: 'f160cf29ece64145e795a9a11459bd458482c446' })), h("div", { key: '1056b2bbc8cbacd3c32280d334d9f703a578b5ef', part: "tooltip", class: "tooltip", id: "tooltip", role: "tooltip", ref: (el) => (this.tooltipEl = el) }, h("div", { key: '6c6816fa1b18d49fa22ab6ffb600aaa23c5b9ec5', id: "arrow", ref: (el) => (this.arrowEl = el), part: "arrow" }), this.label, h("slot", { key: '3c2d3425b2e8b4d810de2ce40394491c4698aede', name: "tooltip" }))));
2565
2585
  }
2566
2586
  static get watchers() { return {
2567
2587
  "open": ["openChanged"]