@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.
- package/dist/browser.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/realtimekit-ui.cjs.js +1 -1
- package/dist/cjs/rtk-ai-transcriptions.cjs.entry.js +1 -1
- package/dist/cjs/rtk-audio-grid.cjs.entry.js +1 -1
- package/dist/cjs/rtk-audio-visualizer_4.cjs.entry.js +1 -1
- package/dist/cjs/rtk-avatar_24.cjs.entry.js +267 -247
- package/dist/cjs/rtk-breakout-room-manager_3.cjs.entry.js +4 -4
- package/dist/cjs/rtk-breakout-rooms-manager_9.cjs.entry.js +9 -9
- package/dist/cjs/rtk-channel-creator.cjs.entry.js +2 -2
- package/dist/cjs/rtk-channel-details.cjs.entry.js +1 -1
- package/dist/cjs/rtk-channel-selector-ui.cjs.entry.js +2 -2
- package/dist/cjs/rtk-chat-message.cjs.entry.js +2 -2
- package/dist/cjs/rtk-chat-messages-ui.cjs.entry.js +3 -3
- package/dist/cjs/rtk-chat-search-results.cjs.entry.js +1 -1
- package/dist/cjs/rtk-chat-toggle.cjs.entry.js +27 -22
- package/dist/cjs/rtk-clock.cjs.entry.js +3 -3
- package/dist/cjs/rtk-controlbar.cjs.entry.js +1 -1
- package/dist/cjs/rtk-debugger-toggle.cjs.entry.js +1 -1
- package/dist/cjs/rtk-file-dropzone.cjs.entry.js +1 -1
- package/dist/cjs/rtk-file-message_3.cjs.entry.js +8 -8
- package/dist/cjs/rtk-header.cjs.entry.js +1 -1
- package/dist/cjs/rtk-idle-screen.cjs.entry.js +1 -1
- package/dist/cjs/rtk-image-viewer.cjs.entry.js +1 -1
- package/dist/cjs/rtk-information-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/rtk-leave-button.cjs.entry.js +1 -1
- package/dist/cjs/rtk-message-list-view.cjs.entry.js +3 -3
- package/dist/cjs/rtk-more-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-name-tag.cjs.entry.js +1 -1
- package/dist/cjs/rtk-notification.cjs.entry.js +2 -2
- package/dist/cjs/rtk-participant-setup.cjs.entry.js +2 -2
- package/dist/cjs/rtk-participant_2.cjs.entry.js +14 -14
- package/dist/cjs/rtk-participants-audio.cjs.entry.js +1 -1
- package/dist/cjs/rtk-participants-stage-list_4.cjs.entry.js +1 -1
- package/dist/cjs/rtk-plugins_2.cjs.entry.js +4 -4
- package/dist/cjs/rtk-poll_2.cjs.entry.js +3 -3
- package/dist/cjs/rtk-recording-indicator.cjs.entry.js +1 -1
- package/dist/cjs/rtk-screenshare-view.cjs.entry.js +5 -5
- package/dist/cjs/rtk-settings-toggle.cjs.entry.js +1 -1
- package/dist/cjs/rtk-spotlight-grid.cjs.entry.js +2 -2
- package/dist/cjs/rtk-stage.cjs.entry.js +1 -1
- package/dist/cjs/rtk-transcript.cjs.entry.js +1 -1
- package/dist/cjs/rtk-waiting-screen.cjs.entry.js +1 -1
- package/dist/collection/components/rtk-ai-transcriptions/rtk-ai-transcriptions.js +1 -1
- package/dist/collection/components/rtk-audio-grid/rtk-audio-grid.js +1 -1
- package/dist/collection/components/rtk-breakout-room-participants/rtk-breakout-room-participants.js +2 -2
- package/dist/collection/components/rtk-broadcast-message-modal/rtk-broadcast-message-modal.js +2 -2
- package/dist/collection/components/rtk-channel-creator/rtk-channel-creator.js +2 -2
- package/dist/collection/components/rtk-channel-details/rtk-channel-details.js +1 -1
- package/dist/collection/components/rtk-channel-selector-ui/rtk-channel-selector-ui.js +2 -2
- package/dist/collection/components/rtk-channel-selector-view/rtk-channel-selector-view.css +29 -29
- package/dist/collection/components/rtk-channel-selector-view/rtk-channel-selector-view.js +2 -2
- package/dist/collection/components/rtk-chat/rtk-chat.css +45 -8
- package/dist/collection/components/rtk-chat/rtk-chat.js +15 -7
- package/dist/collection/components/rtk-chat-message/rtk-chat-message.js +2 -2
- package/dist/collection/components/rtk-chat-messages-ui/rtk-chat-messages-ui.js +3 -3
- package/dist/collection/components/rtk-chat-messages-ui-paginated/rtk-chat-messages-ui-paginated.js +3 -3
- package/dist/collection/components/rtk-chat-search-results/rtk-chat-search-results.js +1 -1
- package/dist/collection/components/rtk-chat-toggle/rtk-chat-toggle.css +1 -1
- package/dist/collection/components/rtk-chat-toggle/rtk-chat-toggle.js +27 -26
- package/dist/collection/components/rtk-clock/rtk-clock.js +3 -3
- package/dist/collection/components/rtk-confirmation-modal/rtk-confirmation-modal.js +1 -1
- package/dist/collection/components/rtk-controlbar/rtk-controlbar.js +1 -1
- package/dist/collection/components/rtk-counter/rtk-counter.js +2 -2
- package/dist/collection/components/rtk-debugger-toggle/rtk-debugger-toggle.js +1 -1
- package/dist/collection/components/rtk-draft-attachment-view/rtk-draft-attachment-view.js +1 -1
- package/dist/collection/components/rtk-emoji-picker/rtk-emoji-picker.js +1 -1
- package/dist/collection/components/rtk-emoji-picker-button/rtk-emoji-picker-button.js +1 -1
- package/dist/collection/components/rtk-file-dropzone/rtk-file-dropzone.js +1 -1
- package/dist/collection/components/rtk-file-message/rtk-file-message.js +2 -2
- package/dist/collection/components/rtk-file-message-view/rtk-file-message-view.js +1 -1
- package/dist/collection/components/rtk-file-picker-button/rtk-file-picker-button.js +1 -1
- package/dist/collection/components/rtk-header/rtk-header.js +1 -1
- package/dist/collection/components/rtk-idle-screen/rtk-idle-screen.js +1 -1
- package/dist/collection/components/rtk-image-message/rtk-image-message.js +4 -4
- package/dist/collection/components/rtk-image-message-view/rtk-image-message-view.js +3 -3
- package/dist/collection/components/rtk-image-viewer/rtk-image-viewer.js +1 -1
- package/dist/collection/components/rtk-information-tooltip/rtk-information-tooltip.js +1 -1
- package/dist/collection/components/rtk-join-stage/rtk-join-stage.js +1 -1
- package/dist/collection/components/rtk-leave-button/rtk-leave-button.js +1 -1
- package/dist/collection/components/rtk-leave-meeting/rtk-leave-meeting.js +2 -2
- package/dist/collection/components/rtk-markdown-view/rtk-markdown-view.js +1 -1
- package/dist/collection/components/rtk-menu/rtk-menu.js +2 -2
- package/dist/collection/components/rtk-menu-item/rtk-menu-item.js +1 -1
- package/dist/collection/components/rtk-menu-list/rtk-menu-list.js +1 -1
- package/dist/collection/components/rtk-message-list-view/rtk-message-list-view.js +3 -3
- package/dist/collection/components/rtk-message-view/rtk-message-view.css +5 -1
- package/dist/collection/components/rtk-message-view/rtk-message-view.js +23 -1
- package/dist/collection/components/rtk-more-toggle/rtk-more-toggle.js +2 -2
- package/dist/collection/components/rtk-mute-all-confirmation/rtk-mute-all-confirmation.js +1 -1
- package/dist/collection/components/rtk-name-tag/rtk-name-tag.js +1 -1
- package/dist/collection/components/rtk-notification/rtk-notification.js +2 -2
- package/dist/collection/components/rtk-overlay-modal/rtk-overlay-modal.js +1 -1
- package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.css +5 -5
- package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.js +272 -256
- package/dist/collection/components/rtk-participant/rtk-participant.js +12 -12
- package/dist/collection/components/rtk-participant-setup/rtk-participant-setup.js +2 -2
- package/dist/collection/components/rtk-participants-audio/rtk-participants-audio.js +1 -1
- package/dist/collection/components/rtk-participants-stage-list/rtk-participants-stage-list.js +1 -1
- package/dist/collection/components/rtk-permissions-message/rtk-permissions-message.js +1 -1
- package/dist/collection/components/rtk-plugins/rtk-plugins.js +1 -1
- package/dist/collection/components/rtk-poll/rtk-poll.js +1 -1
- package/dist/collection/components/rtk-poll-form/rtk-poll-form.js +2 -2
- package/dist/collection/components/rtk-polls/rtk-polls.js +3 -3
- package/dist/collection/components/rtk-recording-indicator/rtk-recording-indicator.js +1 -1
- package/dist/collection/components/rtk-screenshare-view/rtk-screenshare-view.js +5 -5
- package/dist/collection/components/rtk-settings-toggle/rtk-settings-toggle.js +1 -1
- package/dist/collection/components/rtk-spinner/rtk-spinner.js +1 -1
- package/dist/collection/components/rtk-spotlight-grid/rtk-spotlight-grid.js +2 -2
- package/dist/collection/components/rtk-stage/rtk-stage.js +1 -1
- package/dist/collection/components/rtk-switch/rtk-switch.js +1 -1
- package/dist/collection/components/rtk-text-composer-view/rtk-text-composer-view.js +1 -1
- package/dist/collection/components/rtk-text-message/rtk-text-message.js +2 -2
- package/dist/collection/components/rtk-text-message-view/rtk-text-message-view.js +1 -1
- package/dist/collection/components/rtk-tooltip/rtk-tooltip.js +1 -1
- package/dist/collection/components/rtk-transcript/rtk-transcript.js +1 -1
- package/dist/collection/components/rtk-virtualized-list/rtk-virtualized-participant-list.js +2 -2
- package/dist/collection/components/rtk-waiting-screen/rtk-waiting-screen.js +1 -1
- package/dist/components/{p-9f7b9764.js → p-00bb4abb.js} +6 -6
- package/dist/components/{p-5248ee44.js → p-02b840f8.js} +3 -3
- package/dist/components/{p-a54ac879.js → p-0b2b3442.js} +2 -2
- package/dist/components/p-0d472019.js +362 -0
- package/dist/components/{p-94ba6c49.js → p-0e5cc539.js} +2 -2
- package/dist/components/{p-8901c589.js → p-0f2de0f8.js} +10 -7
- package/dist/components/{p-3a3650bd.js → p-107e55c1.js} +1 -1
- package/dist/components/{p-e62d961a.js → p-1a9e3806.js} +1 -1
- package/dist/components/{p-1da75fdd.js → p-1f5a4682.js} +2 -2
- package/dist/components/{p-bb55fa0c.js → p-2309fb19.js} +2 -2
- package/dist/components/{p-ff320cbb.js → p-241a8245.js} +1 -1
- package/dist/components/{p-93069a8c.js → p-2447a26f.js} +2 -2
- package/dist/components/{p-3bc68ec4.js → p-28170a8d.js} +9 -9
- package/dist/components/{p-ffe562b1.js → p-294cda89.js} +3 -3
- package/dist/components/{p-9c88019e.js → p-2a65883d.js} +1 -1
- package/dist/components/{p-d9845780.js → p-32c6e86d.js} +36 -28
- package/dist/components/{p-0c512fd1.js → p-39e8b34a.js} +1 -1
- package/dist/components/{p-ff8753e8.js → p-3e58e0f3.js} +1 -1
- package/dist/components/{p-2e6987aa.js → p-43d6a221.js} +2 -2
- package/dist/components/{p-7e8d976d.js → p-45220ce9.js} +2 -2
- package/dist/components/{p-962c2e24.js → p-46d99dd9.js} +2 -2
- package/dist/components/{p-9ff37f98.js → p-48acb953.js} +1 -1
- package/dist/components/{p-d9b1945a.js → p-4902c5cf.js} +1 -1
- package/dist/components/{p-5ac9b786.js → p-4aede34c.js} +1 -1
- package/dist/components/{p-6366df1e.js → p-4e5a54c2.js} +10 -10
- package/dist/components/{p-8b4e32b7.js → p-4ebf9684.js} +1 -1
- package/dist/components/{p-94bd91b3.js → p-540d8eb9.js} +1 -1
- package/dist/components/{p-ad7cabcc.js → p-5476e3f3.js} +2 -2
- package/dist/components/{p-471a529a.js → p-5669b6e7.js} +4 -4
- package/dist/components/{p-626c7a5f.js → p-598dc3f2.js} +2 -2
- package/dist/components/{p-c36a303c.js → p-616ae7ab.js} +2 -2
- package/dist/components/{p-a94b2e67.js → p-6739a399.js} +2 -2
- package/dist/components/{p-ad331530.js → p-6c9a833e.js} +1 -1
- package/dist/components/{p-1614fe8f.js → p-713c7ed7.js} +3 -3
- package/dist/components/{p-222454dc.js → p-7148ec6a.js} +1 -1
- package/dist/components/{p-ef493e1b.js → p-761c0e78.js} +1 -1
- package/dist/components/{p-3b6af603.js → p-7f489600.js} +1 -1
- package/dist/components/{p-0e8ff1cc.js → p-819cb785.js} +1 -1
- package/dist/components/{p-68af4225.js → p-89025409.js} +3 -3
- package/dist/components/{p-7a04f0cc.js → p-8cfdac0d.js} +5 -5
- package/dist/components/{p-41224895.js → p-8d6b21d5.js} +3 -3
- package/dist/components/{p-6c20da11.js → p-a25f3aca.js} +2 -2
- package/dist/components/{p-d0c5e808.js → p-a51db0d6.js} +16 -16
- package/dist/components/{p-a48e2cf0.js → p-a73665b4.js} +7 -7
- package/dist/components/{p-a24156ce.js → p-a8a6496d.js} +1 -1
- package/dist/components/{p-b58a185f.js → p-ae376177.js} +14 -14
- package/dist/components/{p-01c968b1.js → p-af3b99f4.js} +2 -2
- package/dist/components/{p-d81ba93a.js → p-bb4983b8.js} +2 -2
- package/dist/components/{p-c2b64e33.js → p-c334f0e5.js} +2 -2
- package/dist/components/{p-88bef213.js → p-cf8f725b.js} +1 -1
- package/dist/components/{p-d6146a96.js → p-d765dbe4.js} +6 -6
- package/dist/components/{p-6523d14b.js → p-da9018ea.js} +6 -6
- package/dist/components/{p-0d582365.js → p-dc3143c0.js} +2 -2
- package/dist/components/{p-58b56794.js → p-e0510925.js} +1 -1
- package/dist/components/{p-5e67d672.js → p-eeb37b16.js} +1 -1
- package/dist/components/{p-f2a47b5b.js → p-fa476519.js} +5 -5
- package/dist/components/{p-fa8f6b4a.js → p-fb836f65.js} +1 -1
- package/dist/components/{p-ba788f9e.js → p-fb900e8f.js} +2 -2
- package/dist/components/{p-262671ff.js → p-fef53de3.js} +1 -1
- package/dist/components/rtk-ai-toggle.js +2 -2
- package/dist/components/rtk-ai-transcriptions.js +1 -1
- package/dist/components/rtk-ai.js +1 -1
- package/dist/components/rtk-audio-grid.js +1 -1
- package/dist/components/rtk-audio-tile.js +3 -3
- package/dist/components/rtk-avatar.js +1 -1
- package/dist/components/rtk-breakout-room-manager.js +1 -1
- package/dist/components/rtk-breakout-room-participants.js +1 -1
- package/dist/components/rtk-breakout-rooms-manager.js +1 -1
- package/dist/components/rtk-breakout-rooms-toggle.js +2 -2
- package/dist/components/rtk-broadcast-message-modal.js +1 -1
- package/dist/components/rtk-camera-toggle.js +3 -3
- package/dist/components/rtk-caption-toggle.js +2 -2
- package/dist/components/rtk-channel-creator.js +4 -4
- package/dist/components/rtk-channel-details.js +1 -1
- package/dist/components/rtk-channel-header.js +4 -4
- package/dist/components/rtk-channel-selector-ui.js +4 -4
- package/dist/components/rtk-channel-selector-view.js +1 -1
- package/dist/components/rtk-chat-composer-ui.js +4 -4
- package/dist/components/rtk-chat-composer-view.js +1 -1
- package/dist/components/rtk-chat-message.js +1 -1
- package/dist/components/rtk-chat-messages-ui-paginated.js +1 -1
- package/dist/components/rtk-chat-messages-ui.js +14 -14
- package/dist/components/rtk-chat-search-results.js +11 -11
- package/dist/components/rtk-chat-toggle.js +30 -26
- package/dist/components/rtk-chat.js +1 -1
- package/dist/components/rtk-clock.js +3 -3
- package/dist/components/rtk-confirmation-modal.js +1 -1
- package/dist/components/rtk-controlbar-button.js +1 -1
- package/dist/components/rtk-controlbar.js +1 -1
- package/dist/components/rtk-counter.js +1 -1
- package/dist/components/rtk-debugger-toggle.js +3 -3
- package/dist/components/rtk-dialog-manager.js +14 -14
- package/dist/components/rtk-draft-attachment-view.js +1 -1
- package/dist/components/rtk-emoji-picker-button.js +1 -1
- package/dist/components/rtk-emoji-picker.js +1 -1
- package/dist/components/rtk-file-dropzone.js +1 -1
- package/dist/components/rtk-file-message-view.js +1 -1
- package/dist/components/rtk-file-message.js +1 -1
- package/dist/components/rtk-file-picker-button.js +1 -1
- package/dist/components/rtk-fullscreen-toggle.js +1 -1
- package/dist/components/rtk-grid-pagination.js +1 -1
- package/dist/components/rtk-grid.js +4 -4
- package/dist/components/rtk-header.js +1 -1
- package/dist/components/rtk-idle-screen.js +2 -2
- package/dist/components/rtk-image-message-view.js +1 -1
- package/dist/components/rtk-image-message.js +1 -1
- package/dist/components/rtk-image-viewer.js +1 -1
- package/dist/components/rtk-information-tooltip.js +1 -1
- package/dist/components/rtk-join-stage.js +1 -1
- package/dist/components/rtk-leave-button.js +3 -3
- package/dist/components/rtk-leave-meeting.js +1 -1
- package/dist/components/rtk-livestream-player.js +1 -1
- package/dist/components/rtk-livestream-toggle.js +2 -2
- package/dist/components/rtk-markdown-view.js +1 -1
- package/dist/components/rtk-meeting-title.js +1 -1
- package/dist/components/rtk-meeting.js +21 -21
- package/dist/components/rtk-menu-item.js +1 -1
- package/dist/components/rtk-menu-list.js +1 -1
- package/dist/components/rtk-menu.js +1 -1
- package/dist/components/rtk-message-list-view.js +4 -4
- package/dist/components/rtk-message-view.js +1 -1
- package/dist/components/rtk-mic-toggle.js +3 -3
- package/dist/components/rtk-mixed-grid.js +3 -3
- package/dist/components/rtk-more-toggle.js +4 -4
- package/dist/components/rtk-mute-all-button.js +3 -3
- package/dist/components/rtk-mute-all-confirmation.js +1 -1
- package/dist/components/rtk-name-tag.js +1 -1
- package/dist/components/rtk-notification.js +1 -1
- package/dist/components/rtk-notifications.js +1 -1
- package/dist/components/rtk-overlay-modal.js +1 -1
- package/dist/components/rtk-paginated-list.js +1 -1
- package/dist/components/rtk-participant-setup.js +2 -2
- package/dist/components/rtk-participant.js +1 -1
- package/dist/components/rtk-participants-audio.js +1 -1
- package/dist/components/rtk-participants-stage-list.js +1 -1
- package/dist/components/rtk-participants-stage-queue.js +1 -1
- package/dist/components/rtk-participants-toggle.js +2 -2
- package/dist/components/rtk-participants-viewer-list.js +1 -1
- package/dist/components/rtk-participants-waiting-list.js +1 -1
- package/dist/components/rtk-participants.js +11 -11
- package/dist/components/rtk-permissions-message.js +1 -1
- package/dist/components/rtk-pip-toggle.js +2 -2
- package/dist/components/rtk-plugins-toggle.js +2 -2
- package/dist/components/rtk-plugins.js +1 -1
- package/dist/components/rtk-poll-form.js +1 -1
- package/dist/components/rtk-poll.js +1 -1
- package/dist/components/rtk-polls-toggle.js +2 -2
- package/dist/components/rtk-polls.js +1 -1
- package/dist/components/rtk-recording-indicator.js +1 -1
- package/dist/components/rtk-recording-toggle.js +2 -2
- package/dist/components/rtk-screen-share-toggle.js +3 -3
- package/dist/components/rtk-screenshare-view.js +6 -6
- package/dist/components/rtk-settings-audio.js +1 -1
- package/dist/components/rtk-settings-toggle.js +3 -3
- package/dist/components/rtk-settings-video.js +1 -1
- package/dist/components/rtk-settings.js +3 -3
- package/dist/components/rtk-setup-screen.js +1 -1
- package/dist/components/rtk-sidebar.js +5 -5
- package/dist/components/rtk-spinner.js +1 -1
- package/dist/components/rtk-spotlight-grid.js +2 -2
- package/dist/components/rtk-spotlight-indicator.js +1 -1
- package/dist/components/rtk-stage-toggle.js +3 -3
- package/dist/components/rtk-stage.js +1 -1
- package/dist/components/rtk-switch.js +1 -1
- package/dist/components/rtk-tab-bar.js +1 -1
- package/dist/components/rtk-text-composer-view.js +1 -1
- package/dist/components/rtk-text-message-view.js +1 -1
- package/dist/components/rtk-text-message.js +1 -1
- package/dist/components/rtk-tooltip.js +1 -1
- package/dist/components/rtk-transcript.js +1 -1
- package/dist/components/rtk-transcripts.js +1 -1
- package/dist/components/rtk-virtualized-participant-list.js +1 -1
- package/dist/components/rtk-waiting-screen.js +1 -1
- package/dist/docs/docs-components.json +88 -66
- package/dist/docs/docs-vscode.json +4 -0
- package/dist/esm/loader.js +397 -371
- package/dist/esm/realtimekit-ui.js +1 -1
- package/dist/esm/rtk-ai-transcriptions.entry.js +1 -1
- package/dist/esm/rtk-audio-grid.entry.js +1 -1
- package/dist/esm/rtk-audio-visualizer_4.entry.js +1 -1
- package/dist/esm/rtk-avatar_24.entry.js +267 -247
- package/dist/esm/rtk-breakout-room-manager_3.entry.js +4 -4
- package/dist/esm/rtk-breakout-rooms-manager_9.entry.js +9 -9
- package/dist/esm/rtk-channel-creator.entry.js +2 -2
- package/dist/esm/rtk-channel-details.entry.js +1 -1
- package/dist/esm/rtk-channel-selector-ui.entry.js +2 -2
- package/dist/esm/rtk-chat-message.entry.js +2 -2
- package/dist/esm/rtk-chat-messages-ui.entry.js +3 -3
- package/dist/esm/rtk-chat-search-results.entry.js +1 -1
- package/dist/esm/rtk-chat-toggle.entry.js +27 -22
- package/dist/esm/rtk-clock.entry.js +3 -3
- package/dist/esm/rtk-controlbar.entry.js +1 -1
- package/dist/esm/rtk-debugger-toggle.entry.js +1 -1
- package/dist/esm/rtk-file-dropzone.entry.js +1 -1
- package/dist/esm/rtk-file-message_3.entry.js +8 -8
- package/dist/esm/rtk-header.entry.js +1 -1
- package/dist/esm/rtk-idle-screen.entry.js +1 -1
- package/dist/esm/rtk-image-viewer.entry.js +1 -1
- package/dist/esm/rtk-information-tooltip.entry.js +1 -1
- package/dist/esm/rtk-leave-button.entry.js +1 -1
- package/dist/esm/rtk-message-list-view.entry.js +3 -3
- package/dist/esm/rtk-more-toggle.entry.js +2 -2
- package/dist/esm/rtk-name-tag.entry.js +1 -1
- package/dist/esm/rtk-notification.entry.js +2 -2
- package/dist/esm/rtk-participant-setup.entry.js +2 -2
- package/dist/esm/rtk-participant_2.entry.js +14 -14
- package/dist/esm/rtk-participants-audio.entry.js +1 -1
- package/dist/esm/rtk-participants-stage-list_4.entry.js +1 -1
- package/dist/esm/rtk-plugins_2.entry.js +4 -4
- package/dist/esm/rtk-poll_2.entry.js +3 -3
- package/dist/esm/rtk-recording-indicator.entry.js +1 -1
- package/dist/esm/rtk-screenshare-view.entry.js +5 -5
- package/dist/esm/rtk-settings-toggle.entry.js +1 -1
- package/dist/esm/rtk-spotlight-grid.entry.js +2 -2
- package/dist/esm/rtk-stage.entry.js +1 -1
- package/dist/esm/rtk-transcript.entry.js +1 -1
- package/dist/esm/rtk-waiting-screen.entry.js +1 -1
- package/dist/realtimekit-ui/{p-d2a92f27.entry.js → p-00445029.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-42989f41.entry.js → p-02c6b025.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-af6436dd.entry.js → p-0baa78d7.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-6ba99cc3.entry.js → p-1fe6003b.entry.js} +1 -1
- package/dist/realtimekit-ui/p-21d4bb9c.entry.js +1 -0
- package/dist/realtimekit-ui/{p-ed34d8a1.entry.js → p-23784be6.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-f19668ba.entry.js → p-2441260e.entry.js} +1 -1
- package/dist/realtimekit-ui/p-322957ed.entry.js +1 -0
- package/dist/realtimekit-ui/{p-9ac1b986.entry.js → p-323d1aa4.entry.js} +1 -1
- package/dist/realtimekit-ui/p-44d69c6b.entry.js +1 -0
- package/dist/realtimekit-ui/p-48c87789.entry.js +1 -0
- package/dist/realtimekit-ui/{p-c43c2382.entry.js → p-53680d55.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-5ebc57f8.entry.js → p-54a88fdf.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-beedd1b5.entry.js → p-5892c1e0.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-b64eae39.entry.js → p-612a8d25.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-6437ff4e.entry.js → p-64206b62.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-2f9211b9.entry.js → p-67ead213.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-29c11bdb.entry.js → p-6896e819.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-73a56e4f.entry.js → p-7a9a226e.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-298befae.entry.js → p-80e51a73.entry.js} +1 -1
- package/dist/realtimekit-ui/p-820dad23.entry.js +1 -0
- package/dist/realtimekit-ui/p-83db4de1.entry.js +1 -0
- package/dist/realtimekit-ui/{p-844143f8.entry.js → p-85b3c0c4.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-b4975a33.entry.js → p-8778b3e6.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-447ffea0.entry.js → p-a1408db4.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-1a78c129.entry.js → p-a67e2a25.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-3d5ebc77.entry.js → p-a680da64.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-b6cee65a.entry.js → p-a7172c2d.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-78968008.entry.js → p-a852e0cf.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-503371f7.entry.js → p-ac6c8ebe.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-132fca40.entry.js → p-b25f7d7b.entry.js} +1 -1
- package/dist/realtimekit-ui/p-b51e813e.entry.js +1 -0
- package/dist/realtimekit-ui/{p-f6918dd7.entry.js → p-be5bdd0a.entry.js} +1 -1
- package/dist/realtimekit-ui/p-c5f704a3.entry.js +1 -0
- package/dist/realtimekit-ui/{p-a849f2b3.entry.js → p-cc226b51.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-6928aa8e.entry.js → p-cda276d6.entry.js} +1 -1
- package/dist/realtimekit-ui/p-d880fb69.entry.js +1 -0
- package/dist/realtimekit-ui/p-f457ae6f.entry.js +1 -0
- package/dist/realtimekit-ui/{p-3482a231.entry.js → p-f6c82f1b.entry.js} +1 -1
- package/dist/realtimekit-ui/p-fa86682c.entry.js +1 -0
- package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
- package/dist/types/components/rtk-chat/rtk-chat.d.ts +1 -1
- package/dist/types/components/rtk-chat-toggle/rtk-chat-toggle.d.ts +4 -6
- package/dist/types/components/rtk-message-view/rtk-message-view.d.ts +2 -0
- package/dist/types/components/rtk-paginated-list/rtk-paginated-list.d.ts +68 -53
- package/dist/types/components.d.ts +17 -5
- package/package.json +1 -1
- package/dist/components/p-8e160343.js +0 -357
- package/dist/realtimekit-ui/p-02889d02.entry.js +0 -1
- package/dist/realtimekit-ui/p-0485834f.entry.js +0 -1
- package/dist/realtimekit-ui/p-190523f5.entry.js +0 -1
- package/dist/realtimekit-ui/p-2f6fd6de.entry.js +0 -1
- package/dist/realtimekit-ui/p-3a4e302b.entry.js +0 -1
- package/dist/realtimekit-ui/p-93e9fb59.entry.js +0 -1
- package/dist/realtimekit-ui/p-a9cb6a16.entry.js +0 -1
- package/dist/realtimekit-ui/p-bf234650.entry.js +0 -1
- package/dist/realtimekit-ui/p-ce5a911d.entry.js +0 -1
- package/dist/realtimekit-ui/p-d5144f9d.entry.js +0 -1
- 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-
|
|
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: '
|
|
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-
|
|
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.
|
|
527
|
-
|
|
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
|
-
|
|
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",
|
|
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
|
-
} })))
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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:
|
|
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: '
|
|
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)
|
|
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
|
-
*
|
|
2073
|
-
*
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
* is
|
|
2079
|
-
*/
|
|
2080
|
-
this.
|
|
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
|
-
*
|
|
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
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
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
|
-
|
|
2111
|
-
this.
|
|
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
|
-
*
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
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
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
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 =
|
|
2257
|
+
const data = await this.fetchData(this.oldTS - 1, this.pageSize, true);
|
|
2272
2258
|
this.isLoading = false;
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
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
|
-
*
|
|
2283
|
-
*
|
|
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
|
-
|
|
2286
|
-
this.
|
|
2287
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2300
|
-
if (this.
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
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
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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"]
|