@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
|
@@ -15,7 +15,6 @@ const config = require('./config-0a88d50b.js');
|
|
|
15
15
|
const ResizeObserver_es = require('./ResizeObserver.es-ba961f16.js');
|
|
16
16
|
const floatingUi_dom_esm = require('./floating-ui.dom.esm-705e65f3.js');
|
|
17
17
|
const date = require('./date-61ffcd0a.js');
|
|
18
|
-
const scroll = require('./scroll-c6404609.js');
|
|
19
18
|
|
|
20
19
|
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)}";
|
|
21
20
|
const RtkAvatarStyle0 = rtkAvatarCss;
|
|
@@ -90,7 +89,7 @@ const RtkButton = class {
|
|
|
90
89
|
};
|
|
91
90
|
RtkButton.style = RtkButtonStyle0;
|
|
92
91
|
|
|
93
|
-
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-
|
|
92
|
+
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";
|
|
94
93
|
const RtkChannelSelectorViewStyle0 = rtkChannelSelectorViewCss;
|
|
95
94
|
|
|
96
95
|
var __decorate$g = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -217,8 +216,8 @@ const RtkChannelSelectorView = class {
|
|
|
217
216
|
'last-message': true,
|
|
218
217
|
'no-message': !channel.latestMessage,
|
|
219
218
|
} }, index$1.h("rtk-text-message-view", { isMarkdown: true, text: channel.latestMessage })))), index$1.h("div", { class: "col channel-meta" }, channel.latestMessageTime && (index$1.h("time", { class: "time" }, this.getTimeLabel(channel.latestMessageTime))), channel.unreadCount > 0 && (index$1.h("div", { class: "unread-count" }, channel.unreadCount))))));
|
|
220
|
-
})))), this.viewAs === 'dropdown' && (index$1.h("button", { key: '0c87f90d6d0fe22284995ab7259689f80a862829', class: "dropdown-trigger", onClick: this.toggleDropdown }, index$1.h("span", { key: 'd1a364f2c5c57d19702d0b8707ca661c1dc4c14f' }, this.selectedChannelId &&
|
|
221
|
-
`${this.t('to')} ${this.getChannelById(this.selectedChannelId).name}`, this.getTotalUnreads() > 0 && (index$1.h("div", { key: '
|
|
219
|
+
})))), this.viewAs === 'dropdown' && (index$1.h("button", { key: '0c87f90d6d0fe22284995ab7259689f80a862829', class: "dropdown-trigger", onClick: this.toggleDropdown }, index$1.h("span", { key: 'd1a364f2c5c57d19702d0b8707ca661c1dc4c14f' }, index$1.h("rtk-icon", { key: 'a4a028e536459fab6de2884e25b0312d2a36bc32', icon: this.iconPack.participants }), this.selectedChannelId &&
|
|
220
|
+
`${this.t('to')} ${this.getChannelById(this.selectedChannelId).name}`, this.getTotalUnreads() > 0 && (index$1.h("div", { key: '83c8efae8daed7dce4c4fdb55b523876c71a9a85', class: "unread-count" }, this.getTotalUnreads()))), index$1.h("rtk-icon", { key: '855ff62e593c7c14f448bbd5b8cf898e13d5d391', icon: this.showDropdown ? this.iconPack.chevron_up : this.iconPack.chevron_down })))));
|
|
222
221
|
}
|
|
223
222
|
get $el() { return index$1.getElement(this); }
|
|
224
223
|
};
|
|
@@ -230,7 +229,7 @@ __decorate$g([
|
|
|
230
229
|
], RtkChannelSelectorView.prototype, "t", void 0);
|
|
231
230
|
RtkChannelSelectorView.style = RtkChannelSelectorViewStyle0;
|
|
232
231
|
|
|
233
|
-
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-
|
|
232
|
+
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";
|
|
234
233
|
const RtkChatStyle0 = rtkChatCss;
|
|
235
234
|
|
|
236
235
|
var __decorate$f = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -527,13 +526,25 @@ const RtkChat = class {
|
|
|
527
526
|
};
|
|
528
527
|
return [everyone, ...participants];
|
|
529
528
|
};
|
|
530
|
-
this.
|
|
531
|
-
|
|
529
|
+
this.getPinnedMessageLabel = (message) => {
|
|
530
|
+
if (message.type === 'text')
|
|
531
|
+
return message.message;
|
|
532
|
+
if (message.type === 'image')
|
|
533
|
+
return 'Image';
|
|
534
|
+
if (message.type === 'file')
|
|
535
|
+
return 'File';
|
|
536
|
+
return '';
|
|
532
537
|
};
|
|
533
538
|
this.renderPinnedMessagesHeader = () => {
|
|
534
539
|
if (this.meeting.chat.pinned.length === 0)
|
|
535
540
|
return null;
|
|
536
|
-
|
|
541
|
+
/**
|
|
542
|
+
* We do not display a picture against the avatar because the chatMessage API does not provide it.
|
|
543
|
+
*/
|
|
544
|
+
return (index$1.h("div", { class: "pinned-messages" }, index$1.h("div", { class: "pinned-messages-header", onClick: () => (this.showPinnedMessages = !this.showPinnedMessages) }, index$1.h("div", null, index$1.h("rtk-icon", { icon: this.iconPack.pin, size: "sm" }), this.t('chat.pinned_msgs'), ` (${this.meeting.chat.pinned.length})`), index$1.h("rtk-icon", { icon: this.showPinnedMessages ? this.iconPack.chevron_up : this.iconPack.chevron_down, size: "sm" })), this.showPinnedMessages && (index$1.h("div", { class: "pinned-messages-content" }, this.meeting.chat.pinned.map((message) => {
|
|
545
|
+
const label = this.getPinnedMessageLabel(message);
|
|
546
|
+
return (index$1.h("div", { class: "pinned-message" }, index$1.h("rtk-avatar", { class: "pinned-message-avatar", participant: { name: message.displayName, picture: '' }, size: "sm" }), index$1.h("span", null, label.length > 20 ? `${label.substring(0, 20)}...` : label)));
|
|
547
|
+
})))));
|
|
537
548
|
};
|
|
538
549
|
}
|
|
539
550
|
connectedCallback() {
|
|
@@ -687,10 +698,6 @@ const RtkChat = class {
|
|
|
687
698
|
if (!this.meeting) {
|
|
688
699
|
return null;
|
|
689
700
|
}
|
|
690
|
-
let chatMessages = this.chatGroups[this.selectedGroup] || [];
|
|
691
|
-
if (this.showPinnedMessages && this.meeting.chat.pinned.length !== 0) {
|
|
692
|
-
chatMessages = chatMessages.filter((chat) => chat.type === 'chat' && chat.message.pinned);
|
|
693
|
-
}
|
|
694
701
|
return (index$1.h(index$1.Host, null, index$1.h("div", { class: "chat-container" }, index$1.h("div", { class: "chat" }, this.isFileMessagingAllowed() && (index$1.h("div", { id: "dropzone", class: { active: this.dropzoneActivated }, part: "dropzone" }, index$1.h("rtk-icon", { icon: this.iconPack.attach }), index$1.h("p", null, this.t('chat.send_attachment')))), this.renderPinnedMessagesHeader(), this.isPrivateChatSupported() && (index$1.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" })), index$1.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()))));
|
|
695
702
|
}
|
|
696
703
|
get host() { return index$1.getElement(this); }
|
|
@@ -1041,9 +1048,9 @@ const RtkChatMessagesUiPaginated = class {
|
|
|
1041
1048
|
}
|
|
1042
1049
|
const isSelf = message.userId === this.meeting.self.userId;
|
|
1043
1050
|
const viewType = isSelf ? 'outgoing' : 'incoming';
|
|
1044
|
-
return (index$1.h("div",
|
|
1051
|
+
return (index$1.h("div", null, index$1.h("div", { class: "message-wrapper" }, index$1.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) }, index$1.h("div", null, index$1.h("div", { class: "body" }, message.type === 'text' && (index$1.h("rtk-text-message-view", { text: message.message, isMarkdown: true })), message.type === 'file' && (index$1.h("rtk-file-message-view", { name: message.name, url: message.link, size: message.size })), message.type === 'image' && (index$1.h("rtk-image-message-view", { url: message.link, onPreview: () => {
|
|
1045
1052
|
this.stateUpdate.emit({ image: message });
|
|
1046
|
-
} })))
|
|
1053
|
+
} }))))))));
|
|
1047
1054
|
};
|
|
1048
1055
|
this.chatUpdateListener = (data) => {
|
|
1049
1056
|
if (this.selectedChannelId && data.message.channelId !== this.selectedChannelId)
|
|
@@ -1089,7 +1096,7 @@ const RtkChatMessagesUiPaginated = class {
|
|
|
1089
1096
|
this.lastReadMessageIndex = -1;
|
|
1090
1097
|
}
|
|
1091
1098
|
render() {
|
|
1092
|
-
return (index$1.h(index$1.Host, { key: '
|
|
1099
|
+
return (index$1.h(index$1.Host, { key: '012b7189dfbdccfd8017cc9023263e6a7e9afd44' }, index$1.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') }, index$1.h("slot", { key: '53cb197b6d9319f470e87fe73d7ca0d158778e3f' }))));
|
|
1093
1100
|
}
|
|
1094
1101
|
get host() { return index$1.getElement(this); }
|
|
1095
1102
|
static get watchers() { return {
|
|
@@ -1162,7 +1169,7 @@ const RtkDraftAttachmentView = class {
|
|
|
1162
1169
|
this.onAttachmentChange();
|
|
1163
1170
|
}
|
|
1164
1171
|
render() {
|
|
1165
|
-
return (index$1.h(index$1.Host, { key: '
|
|
1172
|
+
return (index$1.h(index$1.Host, { key: 'f6ede093bcdf8100807baab4de2a296fc4960a07' }, index$1.h("div", { key: 'b19bbe9b2ea58ea4adccc2028a1b24ea6bc9f0a9', class: "preview-overlay" }, index$1.h("div", { key: 'cbb2bfcb3a50e6e7fbfd4109eb340ba51d6a162d', class: "preview" }, index$1.h("rtk-tooltip", { key: '15b50c547470b0fa22014e0992a1c7e26b234573', label: this.t('chat.cancel_upload') }, index$1.h("rtk-button", { key: '940332a51747af3368ffec497d5ef76fa64ecf75', variant: "secondary", kind: "icon", onClick: this.onDeleteClickHandler }, index$1.h("rtk-icon", { key: 'cc04b0ac70753e970ff638f187ad5f702dc3656b', icon: this.iconPack.dismiss }))), this.attachment.type === 'image' ? (index$1.h("img", { class: "preview-image", src: this.filePreview })) : (index$1.h("div", { class: "preview-file" }, index$1.h("span", null, this.filePreview)))))));
|
|
1166
1173
|
}
|
|
1167
1174
|
static get watchers() { return {
|
|
1168
1175
|
"attachment": ["onAttachmentChange"]
|
|
@@ -1247,7 +1254,7 @@ const RtkEmojiPicker = class {
|
|
|
1247
1254
|
return (index$1.h("div", { id: "emoji-grid", class: "scrollbar max-w-40" }, this.filteredEmojis.map((e) => (index$1.h("rtk-button", { key: `emoji-button-${e.name}`, class: "emoji", variant: "ghost", kind: "icon", title: e.name, onClick: () => this.handleEmojiClick(e.emoji) }, e.emoji)))));
|
|
1248
1255
|
}
|
|
1249
1256
|
render() {
|
|
1250
|
-
return (index$1.h(index$1.Host, { key: '
|
|
1257
|
+
return (index$1.h(index$1.Host, { key: '6581d26d75a7b869d0ba00243ec74ee06b927e7d' }, index$1.h("div", { key: '3705d8c557ac3e05769171998e9176e7e40a232c', class: 'close-parent' }, index$1.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') }, index$1.h("rtk-icon", { key: '7fac79a21c6be57156d17ceeff9ceb2834bbf709', icon: this.iconPack.dismiss }))), index$1.h("div", { key: '46cb2af6654ef36b7258baf47e3cd9e5bd60bf89', class: 'emoji-parent' }, index$1.h("input", { key: 'cfde33638d531f9bac1b1bf25d966a369f4dfb38', value: this.filterVal, onInput: (event) => this.handleInputChange(event.target), placeholder: this.t('search'), ref: (el) => (this.inputElement = el) }), this.mapEmojiList())));
|
|
1251
1258
|
}
|
|
1252
1259
|
};
|
|
1253
1260
|
__decorate$b([
|
|
@@ -1280,7 +1287,7 @@ const RtkEmojiPickerButton = class {
|
|
|
1280
1287
|
this.t = uiStore.useLanguage();
|
|
1281
1288
|
}
|
|
1282
1289
|
render() {
|
|
1283
|
-
return (index$1.h("rtk-tooltip", { key: '
|
|
1290
|
+
return (index$1.h("rtk-tooltip", { key: '45ef1f18da6d1ecc3c02882590cd22e930461562', label: this.t('chat.send_emoji') }, index$1.h("rtk-button", { key: '6504abab2f1c6537443699c53a8cbdcf13530cba', variant: "ghost", kind: "icon", class: { active: this.isActive }, title: this.t('chat.send_emoji') }, index$1.h("rtk-icon", { key: 'd730c81abce72d9c3226f1f666941e1136bee77f', icon: this.iconPack.emoji_multiple }))));
|
|
1284
1291
|
}
|
|
1285
1292
|
};
|
|
1286
1293
|
__decorate$a([
|
|
@@ -1311,7 +1318,7 @@ const RtkFileMessageView = class {
|
|
|
1311
1318
|
this.iconPack = uiStore.defaultIconPack;
|
|
1312
1319
|
}
|
|
1313
1320
|
render() {
|
|
1314
|
-
return (index$1.h("div", { key: '
|
|
1321
|
+
return (index$1.h("div", { key: '5cc29b4780f581a2f8b045e5051bcc66f3fdaf55', class: "file" }, index$1.h("rtk-button", { key: '4100b47bc1d72f08ec5fe645291bfbb58e3a6486', variant: "secondary", kind: "icon", onClick: () => file.downloadFile(string.sanitizeLink(this.url), { name: this.name, fallbackName: 'file' }), part: "button" }, index$1.h("rtk-icon", { key: '52ae14abb7c27b89861d5ba4c907d606257628c9', icon: this.iconPack.download })), index$1.h("div", { key: '02c9ad8d173172a85cc474273a966607d456360e', class: "file-data" }, index$1.h("div", { key: '6ceca21685d04f175006ba35a6de194cc98879ad', class: "name" }, this.name), index$1.h("div", { key: 'b07d07bcaedee3fd6fbcfe81ce2f6bf757655b5f', class: "file-data-split" }, index$1.h("div", { key: '280635ef486de02bc68ca3e774be14fa5a461d1c', class: "ext" }, file.getExtension(this.name)), index$1.h("span", { key: '84f72d8b37b7d15c257faed036b76c737eec780b', class: "divider" }), index$1.h("div", { key: '1b88f48f51afe3fceb57920c3d17f586e848a25f', class: "size" }, file.getFileSize(this.size))))));
|
|
1315
1322
|
}
|
|
1316
1323
|
};
|
|
1317
1324
|
__decorate$9([
|
|
@@ -1367,7 +1374,7 @@ const RtkFilePickerButton = class {
|
|
|
1367
1374
|
render() {
|
|
1368
1375
|
const label = this.label || this.t('chat.send_file');
|
|
1369
1376
|
const icon = this.iconPack[this.icon];
|
|
1370
|
-
return (index$1.h("rtk-tooltip", { key: '
|
|
1377
|
+
return (index$1.h("rtk-tooltip", { key: '057a0a5a714dbbde228e3481e53adea4f88fb3ad', label: label }, index$1.h("rtk-button", { key: '04193df1053b14687fb9464a122b9158707bdda1', variant: "ghost", kind: "icon", onClick: () => this.uploadFile(), title: label }, index$1.h("rtk-icon", { key: 'ed2fce30b93dfce9dd6b967d5993c93496cf3388', icon: icon }))));
|
|
1371
1378
|
}
|
|
1372
1379
|
};
|
|
1373
1380
|
__decorate$8([
|
|
@@ -1427,7 +1434,7 @@ const RtkImageMessageView = class {
|
|
|
1427
1434
|
this.status = 'loading';
|
|
1428
1435
|
}
|
|
1429
1436
|
render() {
|
|
1430
|
-
return (index$1.h("div", { key: '
|
|
1437
|
+
return (index$1.h("div", { key: '066606e6ae62634b2466bb46b453e0c2d91b17ea', class: { image: true, loaded: this.status === 'loaded' } }, index$1.h("img", { key: 'f042e5d3c1a6341e9fc0845e6643016f1be5b5f7', src: string.sanitizeLink(this.url), onLoad: () => {
|
|
1431
1438
|
this.status = 'loaded';
|
|
1432
1439
|
}, onError: () => {
|
|
1433
1440
|
this.status = 'errored';
|
|
@@ -1435,9 +1442,9 @@ const RtkImageMessageView = class {
|
|
|
1435
1442
|
if (this.status === 'loaded') {
|
|
1436
1443
|
this.onPreview.emit(this.url);
|
|
1437
1444
|
}
|
|
1438
|
-
} }), this.status === 'loading' && (index$1.h("div", { key: '
|
|
1445
|
+
} }), this.status === 'loading' && (index$1.h("div", { key: 'd4a5030468fbf70afae62bd55ae4d0fa989e15c2', class: "image-spinner", title: this.t('chat.img.loading'), "aria-label": this.t('chat.img.loading') }, index$1.h("rtk-spinner", { key: '216aba361a46cc100e7d26cc2daf1ffb0948d695', iconPack: this.iconPack }))), this.status === 'errored' && (index$1.h("div", { key: '01f5da8f70872c9fa22dc9a9b70b046b0001d05b', class: "image-errored", title: this.t('chat.error.img_not_found'), "aria-label": this.t('chat.error.img_not_found') }, index$1.h("rtk-icon", { key: '0f7e6fed2730f6366d07fc6afddb2b247e9b7d3a', icon: this.iconPack.image_off }))), this.status === 'loaded' && (index$1.h("div", { key: '5ac0e61c65a88a8d6b9ee54c900b856854d1b84b', class: "actions" }, index$1.h("rtk-button", { key: 'fd83dfecd7b5d9c3976374c3c55731b1f026fc0a', class: "action", variant: "secondary", kind: "icon", onClick: () => {
|
|
1439
1446
|
this.onPreview.emit(this.url);
|
|
1440
|
-
} }, index$1.h("rtk-icon", { key: '
|
|
1447
|
+
} }, index$1.h("rtk-icon", { key: '3ca7384fa28e6716345acacf9225ae9471ff8d63', icon: this.iconPack.full_screen_maximize })), index$1.h("rtk-button", { key: '198787808c389e4df48d3609a53c2d27cf2e7fb3', class: "action", variant: "secondary", kind: "icon", onClick: () => file.downloadFile(this.url, { fallbackName: 'image' }) }, index$1.h("rtk-icon", { key: 'f38fe3da48d1fc854001c719164c95f0673808c5', icon: this.iconPack.download }))))));
|
|
1441
1448
|
}
|
|
1442
1449
|
};
|
|
1443
1450
|
__decorate$7([
|
|
@@ -1528,7 +1535,7 @@ const RtkMarkdownView = class {
|
|
|
1528
1535
|
const slicedMessage = this.text.slice(0, this.maxLength);
|
|
1529
1536
|
const withReply = chat.extractReplyBlock(slicedMessage, true);
|
|
1530
1537
|
const withoutReply = chat.stripOutReplyBlock(slicedMessage);
|
|
1531
|
-
return (index$1.h("p", { key: '
|
|
1538
|
+
return (index$1.h("p", { key: '787e6d3177f4faf1c8dcd7c73d83a6de9c57b42b' }, withReply.length !== 0 && index$1.h("blockquote", { key: '1c4b82fb870994e6707d35adcd5e6f2f0e65dd26' }, this.renderMessage(withReply)), withoutReply.length !== 0 && this.renderMessage(withoutReply)));
|
|
1532
1539
|
}
|
|
1533
1540
|
};
|
|
1534
1541
|
RtkMarkdownView.style = RtkMarkdownViewStyle0;
|
|
@@ -1909,7 +1916,7 @@ const RtkMenu$1 = class {
|
|
|
1909
1916
|
});
|
|
1910
1917
|
}
|
|
1911
1918
|
render() {
|
|
1912
|
-
return (index$1.h(index$1.Host, { key: '
|
|
1919
|
+
return (index$1.h(index$1.Host, { key: '15461c803838be1651df6116a61598ce8ab988f9' }, index$1.h("span", { key: 'f36cdd2f1141f46a993daa880682382904a72509', id: "trigger", ref: (el) => (this.triggerEl = el), onClick: () => {
|
|
1913
1920
|
this.clickedThis = true;
|
|
1914
1921
|
if (this.menuListEl.style.display !== 'block') {
|
|
1915
1922
|
this.menuListEl.style.display = 'block';
|
|
@@ -1918,7 +1925,7 @@ const RtkMenu$1 = class {
|
|
|
1918
1925
|
else {
|
|
1919
1926
|
this.menuListEl.style.display = 'none';
|
|
1920
1927
|
}
|
|
1921
|
-
} }, index$1.h("slot", { key: '
|
|
1928
|
+
} }, index$1.h("slot", { key: 'af622c9dbb3394cb46a6bb909a45c5e3248b1a09', name: "trigger" })), index$1.h("span", { key: '445258e31b4b775fbc22b268234fe15a33f809c9', part: "menu-list", id: "menu-list", ref: (el) => (this.menuListEl = el) }, index$1.h("slot", { key: '87396622c6078253736cbe43a1cac55c6f90754f' }))));
|
|
1922
1929
|
}
|
|
1923
1930
|
};
|
|
1924
1931
|
__decorate$6([
|
|
@@ -1953,7 +1960,7 @@ const RtkMenuItem = class {
|
|
|
1953
1960
|
this.t = uiStore.useLanguage();
|
|
1954
1961
|
}
|
|
1955
1962
|
render() {
|
|
1956
|
-
return (index$1.h(index$1.Host, { key: '
|
|
1963
|
+
return (index$1.h(index$1.Host, { key: '8679dae05e846bb8b83a1dbc9580aa2dcad18ccd', class: { [this.menuVariant]: true } }, index$1.h("slot", { key: 'da53376b8188bfc47f904d348212fedff932b03a', name: "start" }), index$1.h("slot", { key: '4394a3afa13bd298880c1be5255f5a004c5ed42e' }), index$1.h("slot", { key: '2be62c70172912e6516ce207b571ea4794aa4f6c', name: "end" })));
|
|
1957
1964
|
}
|
|
1958
1965
|
};
|
|
1959
1966
|
__decorate$5([
|
|
@@ -1988,7 +1995,7 @@ const RtkMenuList = class {
|
|
|
1988
1995
|
this.t = uiStore.useLanguage();
|
|
1989
1996
|
}
|
|
1990
1997
|
render() {
|
|
1991
|
-
return (index$1.h(index$1.Host, { key: '
|
|
1998
|
+
return (index$1.h(index$1.Host, { key: 'b743da0bae39c93cff7896968a64c84166b8a751', class: { [this.menuVariant]: true } }, index$1.h("slot", { key: '46ca973e68fccbf5c8c7544f61bb9745840d0054' })));
|
|
1992
1999
|
}
|
|
1993
2000
|
};
|
|
1994
2001
|
__decorate$4([
|
|
@@ -1999,7 +2006,7 @@ __decorate$4([
|
|
|
1999
2006
|
], RtkMenuList.prototype, "t", void 0);
|
|
2000
2007
|
RtkMenuList.style = RtkMenuListStyle0;
|
|
2001
2008
|
|
|
2002
|
-
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:
|
|
2009
|
+
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}}";
|
|
2003
2010
|
const RtkMessageViewStyle0 = rtkMessageViewCss;
|
|
2004
2011
|
|
|
2005
2012
|
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -2020,6 +2027,8 @@ const RtkMessageView = class {
|
|
|
2020
2027
|
this.actions = [];
|
|
2021
2028
|
/** Appearance */
|
|
2022
2029
|
this.variant = 'bubble';
|
|
2030
|
+
/** Is message pinned */
|
|
2031
|
+
this.pinned = false;
|
|
2023
2032
|
/** Render */
|
|
2024
2033
|
this.viewType = 'outgoing';
|
|
2025
2034
|
/** Hides avatar */
|
|
@@ -2037,7 +2046,7 @@ const RtkMessageView = class {
|
|
|
2037
2046
|
return (index$1.h("rtk-menu", { placement: this.isSelf ? 'bottom-start' : 'bottom-end', offset: 1 }, index$1.h("button", { slot: "trigger", class: "actions" }, index$1.h("rtk-icon", { icon: this.iconPack.chevron_down })), index$1.h("rtk-menu-list", { menuVariant: this.isSelf ? 'primary' : 'secondary' }, this.actions.map((action) => (index$1.h("rtk-menu-item", { menuVariant: this.isSelf ? 'primary' : 'secondary', onClick: () => this.onAction.emit(action.id) }, action.icon && index$1.h("rtk-icon", { icon: action.icon, slot: "start" }), action.label))))));
|
|
2038
2047
|
}
|
|
2039
2048
|
render() {
|
|
2040
|
-
return (index$1.h(index$1.Host, { key: '
|
|
2049
|
+
return (index$1.h(index$1.Host, { key: '7a4f7b9cd801a12871077b56c96213d6c7f53685' }, index$1.h("div", { key: '2b1731b82f709cf90f6d7ab239a8a516886de227', class: { 'message-wrapper': true, [this.viewType]: true } }, !this.hideAvatar && (index$1.h("aside", { key: '9963f792a5475c74e8170c0baec328162828163d', class: "avatar", part: "avatar" }, index$1.h("rtk-avatar", { key: 'e09b73fbba38f108809e6444940e8053c71a0276', participant: { name: this.authorName, picture: this.avatarUrl }, size: "sm" }))), index$1.h("div", { key: 'cdd752fa1553c5977251dcb0a32ecc5b65984514', class: "message", part: "message" }, !this.hideAuthorName && (index$1.h("div", { key: 'd0a758ac727a0a9b1757e8a61caf57bfadc20d08', class: "header" }, this.authorName, " ", this.isSelf ? ' (You)' : '')), index$1.h("div", { key: '32687e9a0462eaad2d625eb93d82205a23f99f51', class: { body: true, bubble: this.variant === 'bubble' } }, index$1.h("slot", { key: 'ca2022939cb8becf5d81655a37e344ff930a3251' }), !this.hideMetadata && !!this.time && (index$1.h("div", { key: '11dec318a44909b3080dcd29b3a6c4074ce394e3', class: "metadata", title: date.formatDateTime(this.time) }, this.pinned && index$1.h("rtk-icon", { key: '7a68a35c7113407f3676ee09de42fcab50485f39', icon: this.iconPack.pin, size: "sm" }), date.elapsedDuration(this.time, new Date(Date.now())))), this.actions.length !== 0 && this.renderActions())))));
|
|
2041
2050
|
}
|
|
2042
2051
|
};
|
|
2043
2052
|
__decorate$3([
|
|
@@ -2045,9 +2054,37 @@ __decorate$3([
|
|
|
2045
2054
|
], RtkMessageView.prototype, "iconPack", void 0);
|
|
2046
2055
|
RtkMessageView.style = RtkMessageViewStyle0;
|
|
2047
2056
|
|
|
2048
|
-
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)
|
|
2057
|
+
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))}";
|
|
2049
2058
|
const RtkPaginatedListStyle0 = rtkPaginatedListCss;
|
|
2050
2059
|
|
|
2060
|
+
/**
|
|
2061
|
+
* HOW INFINITE SCROLL WORKS:
|
|
2062
|
+
*
|
|
2063
|
+
* We use intersectionObserver to scroll up.
|
|
2064
|
+
* We use scrollEnd listener to scroll down.
|
|
2065
|
+
*
|
|
2066
|
+
* Why?
|
|
2067
|
+
* intersectionObserver doesn't work reliably for 2 way scrolling but has great ux,
|
|
2068
|
+
* so we use it to smoothly scroll up.
|
|
2069
|
+
*
|
|
2070
|
+
* We have empty divs at the top and bottom ($topRef, $bottomRef)
|
|
2071
|
+
* which act as triggers to tell that we have reached the top or end of our messages and need to fetch new messages,
|
|
2072
|
+
*
|
|
2073
|
+
* When scrolling up, we can't remove pages as intersectionObserver relies on
|
|
2074
|
+
* the index of dom elements to work properly.
|
|
2075
|
+
* So instead, we fetch older messages and push them to the end of the 2d array
|
|
2076
|
+
* if length exceeds pagesAllowed, we free up the pages and keep the first empty index in memory (firstEmptyIndex).
|
|
2077
|
+
*
|
|
2078
|
+
* For scrolling down, when scroll ends we see if the bottomRef is in view.
|
|
2079
|
+
* If yes, we fetch the new page and insert it at the firstEmptyIndex.
|
|
2080
|
+
* We update timestamps & firstEmptyIndex, then we rerender.
|
|
2081
|
+
*
|
|
2082
|
+
* If we have exceeded our page allowance we delete old pages.
|
|
2083
|
+
*
|
|
2084
|
+
* In this case deleting pages is okay as we are not relying on the index of dom elements to detect page end.
|
|
2085
|
+
*
|
|
2086
|
+
* This also simplifies the code because when a user scrolls up we do not need to manage a lastEmptyIndex.
|
|
2087
|
+
*/
|
|
2051
2088
|
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2052
2089
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2053
2090
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -2061,274 +2098,257 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
2061
2098
|
const RtkPaginatedList = class {
|
|
2062
2099
|
constructor(hostRef) {
|
|
2063
2100
|
index$1.registerInstance(this, hostRef);
|
|
2101
|
+
/**
|
|
2102
|
+
* when scrolling up, we can't remove pages as intersectionObserver relies on
|
|
2103
|
+
* the index of dom elements to stay stable.
|
|
2104
|
+
* So, instead we free up the pages and keep the last empty index in memory.
|
|
2105
|
+
*/
|
|
2106
|
+
this.firstEmptyIndex = -1;
|
|
2107
|
+
this.maxTS = 0;
|
|
2108
|
+
// the length of pages will always be pageSize + 2
|
|
2109
|
+
this.pages = [];
|
|
2110
|
+
/** label to show when empty */
|
|
2111
|
+
this.emptyListLabel = null;
|
|
2112
|
+
this.rerenderBoolean = false;
|
|
2113
|
+
this.showEmptyListLabel = false;
|
|
2064
2114
|
/** Icon pack */
|
|
2065
2115
|
this.iconPack = uiStore.defaultIconPack;
|
|
2066
2116
|
/** Language */
|
|
2067
2117
|
this.t = uiStore.useLanguage();
|
|
2068
|
-
/** label to show when empty */
|
|
2069
|
-
this.emptyListLabel = null;
|
|
2070
2118
|
this.isLoading = false;
|
|
2071
2119
|
this.isLoadingTop = false;
|
|
2072
2120
|
this.isLoadingBottom = false;
|
|
2073
|
-
this.hasMoreDataAtTop = false;
|
|
2074
|
-
this.rerenderBoolean = false;
|
|
2075
2121
|
/**
|
|
2076
|
-
*
|
|
2077
|
-
*
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
* is
|
|
2083
|
-
*/
|
|
2084
|
-
this.
|
|
2085
|
-
this.showEmptyListLabel = false;
|
|
2086
|
-
/**
|
|
2087
|
-
* This is a private variable not a state
|
|
2088
|
-
* since we want to debounce rerenders
|
|
2089
|
-
*
|
|
2090
|
-
* A list of pages where each page contains a number of Nodes
|
|
2091
|
-
* [
|
|
2092
|
-
* [Node 1, Node 2, Node 3.... Node N],
|
|
2093
|
-
* [Node 1, Node 2, Node 3.... Node N],
|
|
2094
|
-
* ]
|
|
2095
|
-
*/
|
|
2096
|
-
this.pagesToRender = [[]];
|
|
2097
|
-
this.currentTime = () => {
|
|
2098
|
-
return new Date().getTime();
|
|
2099
|
-
};
|
|
2122
|
+
* Even when auto scroll is enabled, we only want to scroll if a new realtime message has arrived.
|
|
2123
|
+
* This variable tells us if we should respect auto scroll after a new page has been loaded.
|
|
2124
|
+
* It is also used by the scroll to bottom button.
|
|
2125
|
+
* */
|
|
2126
|
+
this.shouldScrollToBottom = false;
|
|
2127
|
+
/** UI Indicator for the "scroll to bottom" button.
|
|
2128
|
+
* Toggles on when a new node is added and autoscroll is disabled.
|
|
2129
|
+
* Toggles off when all nodes are loaded */
|
|
2130
|
+
this.showNewMessagesCTR = false;
|
|
2100
2131
|
this.observe = (el) => {
|
|
2101
2132
|
if (!el)
|
|
2102
2133
|
return;
|
|
2103
2134
|
this.intersectionObserver.observe(el);
|
|
2104
2135
|
};
|
|
2136
|
+
this.isAtBottom = () => {
|
|
2137
|
+
const rect = this.$bottomRef.getBoundingClientRect();
|
|
2138
|
+
return rect.top >= 0 && rect.bottom <= window.innerHeight;
|
|
2139
|
+
};
|
|
2105
2140
|
}
|
|
2106
2141
|
/**
|
|
2107
|
-
*
|
|
2142
|
+
* Adds a new node to the beginning of the paginated list
|
|
2143
|
+
* @param {DataNode} node - The data node to add to the beginning of the list
|
|
2108
2144
|
*/
|
|
2109
2145
|
async onNewNode(node) {
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2146
|
+
// Always update the maxTS. New messages will load on scroll till the end cursor (newTS) reaches this value.
|
|
2147
|
+
this.maxTS = Math.max(this.maxTS, node.timeMs);
|
|
2148
|
+
// if we are at the bottom of the page
|
|
2149
|
+
if (this.firstEmptyIndex === -1) {
|
|
2150
|
+
// append messages to the page if page has not reached full capacity
|
|
2151
|
+
if (this.pages[0].length < this.pageSize) {
|
|
2152
|
+
this.pages[0].unshift(node);
|
|
2153
|
+
this.newTS = node.timeMs;
|
|
2154
|
+
this.rerender();
|
|
2155
|
+
}
|
|
2156
|
+
else {
|
|
2157
|
+
// if page is at full capacity, load next page
|
|
2158
|
+
this.loadNextPage();
|
|
2159
|
+
}
|
|
2113
2160
|
}
|
|
2114
|
-
|
|
2115
|
-
this.
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
* On node deleted
|
|
2119
|
-
*/
|
|
2120
|
-
async onNodeDelete(key) {
|
|
2121
|
-
const oldLength = this.pagesToRender.flat().length;
|
|
2122
|
-
this.pagesToRender = this.pagesToRender.map((page) => page.filter((item) => item.id !== key));
|
|
2123
|
-
if (oldLength !== this.pagesToRender.flat().length) {
|
|
2124
|
-
this.rerender();
|
|
2161
|
+
// If autoscroll is enabled, this method will scroll to the bottom
|
|
2162
|
+
if (this.autoScroll) {
|
|
2163
|
+
this.shouldScrollToBottom = true;
|
|
2164
|
+
this.scrollToBottom();
|
|
2125
2165
|
}
|
|
2166
|
+
else {
|
|
2167
|
+
this.showNewMessagesCTR = true;
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
// this method is called recursively based on shouldScrollToBottom (see scrollEnd listener)
|
|
2171
|
+
scrollToBottom() {
|
|
2172
|
+
this.$bottomRef.scrollIntoView({ behavior: 'smooth' });
|
|
2126
2173
|
}
|
|
2127
2174
|
/**
|
|
2128
|
-
*
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2175
|
+
* Deletes a node anywhere from the list
|
|
2176
|
+
* @param {string} id - The id of the node to delete
|
|
2177
|
+
* */
|
|
2178
|
+
async onNodeDelete(id) {
|
|
2179
|
+
// Iterate only over pages that have content (not empty)
|
|
2180
|
+
for (let i = this.pages.length - 1; i > this.firstEmptyIndex; i--) {
|
|
2181
|
+
const index = this.pages[i].findIndex((node) => node.id === id);
|
|
2182
|
+
// message in view
|
|
2183
|
+
if (index !== -1) {
|
|
2184
|
+
// delete message
|
|
2185
|
+
this.pages[i].splice(index, 1);
|
|
2186
|
+
if (i === this.firstEmptyIndex + 1) {
|
|
2187
|
+
// if newest page is empty, update first empty index
|
|
2188
|
+
if (this.pages[i].length === 0)
|
|
2189
|
+
this.firstEmptyIndex++;
|
|
2190
|
+
// update timestamp, first empty index could be -1, so we need to cap it at 0
|
|
2191
|
+
this.newTS = this.pages[Math.max(this.firstEmptyIndex, 0)][0].timeMs;
|
|
2192
|
+
}
|
|
2193
|
+
else if (i === this.firstEmptyIndex + this.pagesAllowed) {
|
|
2194
|
+
// if oldest page is empty, remove it
|
|
2195
|
+
if (this.pages[i].length === 0)
|
|
2196
|
+
this.pages.pop();
|
|
2197
|
+
// update timestamp
|
|
2198
|
+
const lastPage = this.pages[this.firstEmptyIndex + this.pagesAllowed];
|
|
2199
|
+
this.oldTS = lastPage[lastPage.length - 1].timeMs;
|
|
2200
|
+
}
|
|
2201
|
+
this.rerender();
|
|
2136
2202
|
}
|
|
2137
|
-
return item;
|
|
2138
|
-
}));
|
|
2139
|
-
if (shouldRerender)
|
|
2140
|
-
this.rerender();
|
|
2141
|
-
}
|
|
2142
|
-
onItemChanged(newItemId, oldItemId) {
|
|
2143
|
-
if (newItemId !== oldItemId) {
|
|
2144
|
-
this.pagesToRender = [[]];
|
|
2145
|
-
this.loadFirstPage().then(() => this.rerender());
|
|
2146
2203
|
}
|
|
2147
2204
|
}
|
|
2205
|
+
/**
|
|
2206
|
+
* Updates a new node anywhere in the list
|
|
2207
|
+
* @param {string} _id - The id of the node to update
|
|
2208
|
+
* @param {DataNode} _node - The updated data node
|
|
2209
|
+
* */
|
|
2210
|
+
async onNodeUpdate(_id, _node) { }
|
|
2211
|
+
rerender() {
|
|
2212
|
+
this.rerenderBoolean = !this.rerenderBoolean;
|
|
2213
|
+
}
|
|
2148
2214
|
connectedCallback() {
|
|
2149
2215
|
this.rerender = debounce.debounce(this.rerender.bind(this), 50, { maxWait: 200 });
|
|
2150
|
-
this.autoScroll = true;
|
|
2151
2216
|
this.intersectionObserver = new IntersectionObserver((entries) => {
|
|
2152
|
-
index$1.writeTask(() => {
|
|
2217
|
+
index$1.writeTask(async () => {
|
|
2153
2218
|
for (const entry of entries) {
|
|
2154
|
-
if (entry.target.id === 'bottom-scroll') {
|
|
2155
|
-
if (entry.isIntersecting)
|
|
2156
|
-
this.loadBottom();
|
|
2157
|
-
else
|
|
2158
|
-
this.shouldRenderNewNodes = false;
|
|
2159
|
-
}
|
|
2160
2219
|
if (entry.target.id === 'top-scroll' && entry.isIntersecting) {
|
|
2161
|
-
this.
|
|
2220
|
+
this.isLoadingTop = true;
|
|
2221
|
+
await this.loadPrevPage();
|
|
2222
|
+
this.isLoadingTop = false;
|
|
2162
2223
|
}
|
|
2163
2224
|
}
|
|
2164
2225
|
});
|
|
2165
2226
|
});
|
|
2166
2227
|
}
|
|
2167
|
-
disconnectedCallback() {
|
|
2168
|
-
this.intersectionObserver.disconnect();
|
|
2169
|
-
}
|
|
2170
2228
|
componentDidLoad() {
|
|
2171
|
-
/**
|
|
2172
|
-
* Adding observes here so that on the first render we scroll down
|
|
2173
|
-
* and shouldRenderNewNodes remains true
|
|
2174
|
-
*/
|
|
2175
|
-
this.loadFirstPage();
|
|
2176
2229
|
this.observe(this.$topRef);
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
componentDidRender() {
|
|
2180
|
-
if (this.shouldRenderNewNodes && this.autoScroll)
|
|
2181
|
-
scroll.smoothScrollToBottom(this.$paginatedList);
|
|
2182
|
-
}
|
|
2183
|
-
loadFirstPage() {
|
|
2184
|
-
return this.loadPage(this.currentTime(), this.pageSize, true, (data) => {
|
|
2185
|
-
if (data.length === 0) {
|
|
2186
|
-
this.showEmptyListLabel = true;
|
|
2187
|
-
}
|
|
2188
|
-
});
|
|
2189
|
-
}
|
|
2190
|
-
loadTop() {
|
|
2191
|
-
/**
|
|
2192
|
-
* If there is only one unfilled page or no page, no need to check
|
|
2193
|
-
* for top since it will be empty
|
|
2194
|
-
*/
|
|
2195
|
-
if (this.pagesToRender.length === 0)
|
|
2196
|
-
return;
|
|
2197
|
-
if (this.pagesToRender.length === 1 && this.pagesToRender[0].length < this.pageSize)
|
|
2198
|
-
return;
|
|
2199
|
-
/**
|
|
2200
|
-
* TODO: Make this more flexible currently this only works with chat
|
|
2201
|
-
*/
|
|
2202
|
-
const oldestVNode = this.pagesToRender[0][0];
|
|
2203
|
-
const oldestTimestamp = oldestVNode.timeMs;
|
|
2204
|
-
// TODO: scrollIntoView
|
|
2205
|
-
const onPageRendered = () => { }; // oldestVNode.$elm$?.scrollIntoView();
|
|
2206
|
-
this.isLoadingTop = true;
|
|
2207
|
-
this.loadPage(oldestTimestamp - 1, this.pageSize, true, onPageRendered, 'top');
|
|
2208
|
-
}
|
|
2209
|
-
loadBottom() {
|
|
2210
|
-
/**
|
|
2211
|
-
* If there is only one unfilled page or no page, no need to check
|
|
2212
|
-
* for top since it will be empty
|
|
2213
|
-
*/
|
|
2214
|
-
if (this.pagesToRender.length === 0) {
|
|
2215
|
-
this.shouldRenderNewNodes = true;
|
|
2216
|
-
return;
|
|
2217
|
-
}
|
|
2218
|
-
if (this.pagesToRender.length === 1 && this.pagesToRender[0].length < this.pageSize) {
|
|
2219
|
-
this.shouldRenderNewNodes = true;
|
|
2220
|
-
return;
|
|
2221
|
-
}
|
|
2222
|
-
const newestVNode = this.pagesToRender.at(-1).at(-1);
|
|
2223
|
-
const newestTimestamp = newestVNode.timeMs;
|
|
2224
|
-
// TODO: scrollIntoView
|
|
2225
|
-
const onPageRendered = () => scroll.smoothScrollToBottom(this.$paginatedList);
|
|
2226
|
-
this.isLoadingBottom = true;
|
|
2227
|
-
this.loadPage(newestTimestamp + 1, this.pageSize, false, onPageRendered, 'bottom');
|
|
2228
|
-
}
|
|
2229
|
-
addNodeToRender(node, addToStart) {
|
|
2230
|
-
if (addToStart) {
|
|
2231
|
-
const firstPage = this.pagesToRender[0];
|
|
2232
|
-
if (firstPage && (firstPage === null || firstPage === void 0 ? void 0 : firstPage.length) < this.pageSize) {
|
|
2230
|
+
if (this.$containerRef) {
|
|
2231
|
+
this.$containerRef.onscrollend = async () => {
|
|
2233
2232
|
/**
|
|
2234
|
-
*
|
|
2233
|
+
* Load new page if:
|
|
2234
|
+
* if there are nodes to load at the bottom (maxTS > newTS)
|
|
2235
|
+
* or if there are pages to fill at the bottom (firstEmptyIndex > -1)
|
|
2235
2236
|
*/
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
this.removeLastPageIfNeeded(false);
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
else {
|
|
2248
|
-
const [lastPage] = this.pagesToRender.slice(-1);
|
|
2249
|
-
if (lastPage && (lastPage === null || lastPage === void 0 ? void 0 : lastPage.length) < this.pageSize) {
|
|
2250
|
-
/**
|
|
2251
|
-
* If last page is not full then just add it
|
|
2252
|
-
*/
|
|
2253
|
-
lastPage.push(node);
|
|
2254
|
-
}
|
|
2255
|
-
else {
|
|
2256
|
-
/**
|
|
2257
|
-
* If last page is full add a new page with just
|
|
2258
|
-
* this node
|
|
2259
|
-
*/
|
|
2260
|
-
const newPage = [node];
|
|
2261
|
-
this.pagesToRender.push(newPage);
|
|
2262
|
-
this.removeLastPageIfNeeded(true);
|
|
2263
|
-
}
|
|
2237
|
+
if (this.isAtBottom() && (this.maxTS > this.newTS || this.firstEmptyIndex > -1)) {
|
|
2238
|
+
this.isLoadingBottom = true;
|
|
2239
|
+
await this.loadNextPage();
|
|
2240
|
+
this.isLoadingBottom = false;
|
|
2241
|
+
if (this.shouldScrollToBottom)
|
|
2242
|
+
this.scrollToBottom();
|
|
2243
|
+
}
|
|
2244
|
+
};
|
|
2264
2245
|
}
|
|
2265
2246
|
}
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2247
|
+
async loadPrevPage() {
|
|
2248
|
+
if (this.isLoading)
|
|
2249
|
+
return;
|
|
2250
|
+
/**
|
|
2251
|
+
* NOTE(ikabra): this case also runs on initial load
|
|
2252
|
+
* if scrolling up ->
|
|
2253
|
+
* fetch older messages and push to the end of the array
|
|
2254
|
+
* cleanup 1st non empty page from the array if length exceeds pagesAllowed
|
|
2255
|
+
*/
|
|
2256
|
+
// if no old timestamp, it means we are at initial state
|
|
2257
|
+
if (!this.oldTS)
|
|
2258
|
+
this.oldTS = new Date().getTime();
|
|
2259
|
+
// load data
|
|
2274
2260
|
this.isLoading = true;
|
|
2275
|
-
const data =
|
|
2261
|
+
const data = await this.fetchData(this.oldTS - 1, this.pageSize, true);
|
|
2276
2262
|
this.isLoading = false;
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2263
|
+
// no more old messages to show, we are at the top of the page
|
|
2264
|
+
if (!data.length)
|
|
2265
|
+
return;
|
|
2266
|
+
// add old data to the end of the array
|
|
2267
|
+
this.pages.push(data);
|
|
2268
|
+
// clear old pages when we reach the limit
|
|
2269
|
+
if (this.pages.length > this.pagesAllowed) {
|
|
2270
|
+
this.pages[this.pages.length - this.pagesAllowed - 1] = [];
|
|
2285
2271
|
/**
|
|
2286
|
-
*
|
|
2287
|
-
*
|
|
2272
|
+
* find last non empty page in range (this.pages.length, this.firstEmptyIndex)
|
|
2273
|
+
* we are doing this because any of the middle pages in the currently rendered pages
|
|
2274
|
+
* could be empty as we allow deleting messages.
|
|
2275
|
+
* This helps us set the first empty index correctly.
|
|
2288
2276
|
*/
|
|
2289
|
-
|
|
2290
|
-
this.
|
|
2291
|
-
|
|
2277
|
+
for (let i = this.firstEmptyIndex + 1; i < this.pages.length; i++) {
|
|
2278
|
+
if (this.pages[i].length > 0)
|
|
2279
|
+
break;
|
|
2280
|
+
this.firstEmptyIndex = i;
|
|
2292
2281
|
}
|
|
2293
|
-
onPageRendered([]);
|
|
2294
|
-
return;
|
|
2295
2282
|
}
|
|
2296
|
-
|
|
2283
|
+
// update the old timestamp
|
|
2284
|
+
const lastPage = this.pages[this.pages.length - 1];
|
|
2285
|
+
this.oldTS = lastPage[lastPage.length - 1].timeMs;
|
|
2286
|
+
// update the new timestamp
|
|
2287
|
+
this.newTS = this.pages[this.firstEmptyIndex + 1][0].timeMs;
|
|
2297
2288
|
this.rerender();
|
|
2298
|
-
onPageRendered(data);
|
|
2299
|
-
}
|
|
2300
|
-
rerender() {
|
|
2301
|
-
this.rerenderBoolean = !this.rerenderBoolean;
|
|
2302
2289
|
}
|
|
2303
|
-
|
|
2304
|
-
if (this.
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2290
|
+
async loadNextPage() {
|
|
2291
|
+
if (this.isLoading)
|
|
2292
|
+
return;
|
|
2293
|
+
// new timestamp needs to be assigned by loadPrevPage method
|
|
2294
|
+
if (!this.newTS) {
|
|
2295
|
+
this.showNewMessagesCTR = false;
|
|
2296
|
+
this.shouldScrollToBottom = false;
|
|
2297
|
+
return;
|
|
2309
2298
|
}
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2299
|
+
// load data
|
|
2300
|
+
this.isLoading = true;
|
|
2301
|
+
const data = await this.fetchData(this.newTS + 1, this.pageSize, false);
|
|
2302
|
+
this.isLoading = false;
|
|
2303
|
+
// no more new messages to load
|
|
2304
|
+
if (!data.length) {
|
|
2305
|
+
this.showNewMessagesCTR = false;
|
|
2306
|
+
this.shouldScrollToBottom = false;
|
|
2307
|
+
// remove extra pages from the start if any (could be due to users deleting messages)
|
|
2308
|
+
this.pages = this.pages.filter((page) => page.length > 0);
|
|
2309
|
+
this.firstEmptyIndex = -1;
|
|
2310
|
+
return;
|
|
2311
|
+
}
|
|
2312
|
+
// when filling empty pages
|
|
2313
|
+
if (this.firstEmptyIndex > -1) {
|
|
2314
|
+
this.pages[this.firstEmptyIndex] = data.reverse();
|
|
2315
|
+
}
|
|
2316
|
+
else {
|
|
2317
|
+
// when already at the bottom and loading messages in realtime
|
|
2318
|
+
this.pages.unshift(data.reverse());
|
|
2319
|
+
}
|
|
2320
|
+
if (this.pages.length > this.pagesAllowed) {
|
|
2321
|
+
this.pages.pop();
|
|
2322
|
+
}
|
|
2323
|
+
// smallest value for firstEmptyIndex can be -1, so we cap the index at 0
|
|
2324
|
+
this.newTS = this.pages[Math.max(0, this.firstEmptyIndex)][0].timeMs;
|
|
2325
|
+
// remove all empty pages from the end
|
|
2326
|
+
for (let i = this.pages.length - 1; i > this.firstEmptyIndex; i--) {
|
|
2327
|
+
if (this.pages[i].length > 0)
|
|
2328
|
+
break;
|
|
2329
|
+
// if page is empty, remove it
|
|
2330
|
+
this.pages.pop();
|
|
2331
|
+
}
|
|
2332
|
+
// update the old timestamp
|
|
2333
|
+
const lastPage = this.pages[this.pages.length - 1];
|
|
2334
|
+
this.oldTS = lastPage[lastPage.length - 1].timeMs;
|
|
2335
|
+
// when scrolling too fast scroll a bit to the top to be able to load new messages when you scroll down
|
|
2336
|
+
if (this.$containerRef.scrollTop === 0)
|
|
2337
|
+
this.$containerRef.scrollTop = -60;
|
|
2338
|
+
// smallest value for this index can be -1 (indicates we are at the bottom of the page).
|
|
2339
|
+
this.firstEmptyIndex = Math.max(-1, this.firstEmptyIndex - 1);
|
|
2340
|
+
this.rerender();
|
|
2319
2341
|
}
|
|
2320
2342
|
render() {
|
|
2321
|
-
var _a;
|
|
2322
2343
|
/**
|
|
2323
2344
|
* div.container is flex=column-reverse
|
|
2324
2345
|
* which is why div#bottom-scroll comes before div#top-scroll
|
|
2325
|
-
* div.page-wrapper prevents reversal of messages
|
|
2326
2346
|
*/
|
|
2327
|
-
return (index$1.h(index$1.Host, { key: '
|
|
2347
|
+
return (index$1.h(index$1.Host, { key: '91ac7d0ca3fb720259945ffaa97f465b34c694fa' }, index$1.h("div", { key: '33896c19ecc4359ae163c65b5c71b9f17673e765', class: "scrollbar container", part: "container", ref: (el) => (this.$containerRef = el) }, index$1.h("div", { key: 'e26a5ef3979ec132277b9598afc17ea65683f6c8', class: { 'show-new-messages-ctr': true, active: this.showNewMessagesCTR } }, index$1.h("rtk-button", { key: 'e769a8f54a298af456552733dc9de27d059e5138', class: "show-new-messages", kind: "icon", variant: "secondary", part: "show-new-messages", onClick: () => {
|
|
2348
|
+
this.shouldScrollToBottom = true;
|
|
2349
|
+
this.scrollToBottom();
|
|
2350
|
+
} }, index$1.h("rtk-icon", { key: '6fb4cbc2247eb971004a94926b95ebd0f90ab0fd', icon: this.iconPack.chevron_down }))), index$1.h("div", { key: 'e91dd8f25012e4509e0ff3cb4d6b65aa9467d427', class: "smallest-dom-element", id: "bottom-scroll", ref: (el) => (this.$bottomRef = el) }), this.isLoadingBottom && this.pages.length > 0 && index$1.h("rtk-spinner", { key: '199c0ccffd57716bd5a05dcef8610113d3c58d3d', size: "sm" }), this.isLoading && this.pages.length < 1 && index$1.h("rtk-spinner", { key: 'b8a3e08a25b2bc1d50b5a9b1b2deda802ae5eb28', size: "lg" }), !this.isLoading && this.pages.flat().length === 0 ? (index$1.h("div", { class: "empty-list" }, this.t('list.empty'))) : (index$1.h("div", { class: "page-wrapper" }, this.pages.map((page, pageIndex) => (index$1.h("div", { class: "page", "data-page-index": pageIndex }, this.createNodes([...page].reverse())))))), this.isLoadingTop && this.pages.length > 0 && index$1.h("rtk-spinner", { key: '2cb56b4f70d37548fd9aa71b961559b43c54a922', size: "sm" }), index$1.h("div", { key: '4b183c49bfe60fd63af40e02b9b46215c08bb484', class: "smallest-dom-element", id: "top-scroll", ref: (el) => (this.$topRef = el) }))));
|
|
2328
2351
|
}
|
|
2329
|
-
static get watchers() { return {
|
|
2330
|
-
"selectedItemId": ["onItemChanged"]
|
|
2331
|
-
}; }
|
|
2332
2352
|
};
|
|
2333
2353
|
__decorate$2([
|
|
2334
2354
|
index.SyncWithStore()
|
|
@@ -2360,7 +2380,7 @@ const RtkSpinner = class {
|
|
|
2360
2380
|
this.size = 'md';
|
|
2361
2381
|
}
|
|
2362
2382
|
render() {
|
|
2363
|
-
return (index$1.h(index$1.Host, { key: '
|
|
2383
|
+
return (index$1.h(index$1.Host, { key: 'c042cbd31d8fa9e58c0cbbc5646575a3172fc824' }, index$1.h("rtk-icon", { key: '0171ba3d5f7506e2c67eb813c5ad5b263352088d', class: "spinner", icon: this.iconPack.spinner })));
|
|
2364
2384
|
}
|
|
2365
2385
|
};
|
|
2366
2386
|
__decorate$1([
|
|
@@ -2438,7 +2458,7 @@ const RtkTextComposerView = class {
|
|
|
2438
2458
|
}
|
|
2439
2459
|
}
|
|
2440
2460
|
render() {
|
|
2441
|
-
return (index$1.h("div", { key: '
|
|
2461
|
+
return (index$1.h("div", { key: 'e5f7fa2bd4a2386ff5185001981477ccacf24556', class: "chat-input", part: "chat-input-container" }, this.maxLengthBreached > 0 && (index$1.h("div", { key: '4c06c853ddc7bebafe45fdb2e2c5c9e1c20021fe', class: 'text-error ' + (this.maxLengthBreached === this.maxLength ? 'breached' : '') }, index$1.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 && (index$1.h("div", { key: 'cf975664f367f2621593239ab1cf2e73f5acdb45', class: 'text-error breached' }, index$1.h("rtk-icon", { key: '70a6555f1fa9752f91951181b46e0ed0e7eb8679', id: "warning-indicator", icon: this.iconPack.warning, part: "warning-indicator" }), ' ', this.t('chat.rate_limit_error'))), index$1.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 })));
|
|
2442
2462
|
}
|
|
2443
2463
|
};
|
|
2444
2464
|
__decorate([
|
|
@@ -2459,7 +2479,7 @@ const RtkTextMessageView = class {
|
|
|
2459
2479
|
this.isMarkdown = false;
|
|
2460
2480
|
}
|
|
2461
2481
|
render() {
|
|
2462
|
-
return (index$1.h("p", { key: '
|
|
2482
|
+
return (index$1.h("p", { key: 'b4cbabb44d32f96a23cd72f108d6a36b05491c97', class: { text: true, emoji: string.hasOnlyEmojis(this.text) } }, this.isMarkdown ? index$1.h("rtk-markdown-view", { text: this.text }) : this.text));
|
|
2463
2483
|
}
|
|
2464
2484
|
};
|
|
2465
2485
|
RtkTextMessageView.style = RtkTextMessageViewStyle0;
|
|
@@ -2565,7 +2585,7 @@ const RtkMenu = class {
|
|
|
2565
2585
|
});
|
|
2566
2586
|
}
|
|
2567
2587
|
render() {
|
|
2568
|
-
return (index$1.h(index$1.Host, { key: '
|
|
2588
|
+
return (index$1.h(index$1.Host, { key: '5278137bc9b99d9fe9ffeb0fc30bd887d600494d' }, index$1.h("span", { key: 'cbefda068a15340dad76668c3696a10bd94cb8e9', part: "trigger", id: "trigger", ref: (el) => (this.triggerEl = el) }, index$1.h("slot", { key: 'f160cf29ece64145e795a9a11459bd458482c446' })), index$1.h("div", { key: '1056b2bbc8cbacd3c32280d334d9f703a578b5ef', part: "tooltip", class: "tooltip", id: "tooltip", role: "tooltip", ref: (el) => (this.tooltipEl = el) }, index$1.h("div", { key: '6c6816fa1b18d49fa22ab6ffb600aaa23c5b9ec5', id: "arrow", ref: (el) => (this.arrowEl = el), part: "arrow" }), this.label, index$1.h("slot", { key: '3c2d3425b2e8b4d810de2ce40394491c4698aede', name: "tooltip" }))));
|
|
2569
2589
|
}
|
|
2570
2590
|
static get watchers() { return {
|
|
2571
2591
|
"open": ["openChanged"]
|