@cloudflare/realtimekit-ui 1.1.0-staging.4 → 1.1.0-staging.6
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 +255 -232
- package/dist/cjs/rtk-breakout-room-manager_3.cjs.entry.js +4 -4
- package/dist/cjs/rtk-breakout-rooms-manager_9.cjs.entry.js +8 -8
- 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-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-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 +1 -1
- 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-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-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-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 +285 -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-8479343e.js → p-00bb4abb.js} +6 -6
- package/dist/components/{p-12ae623e.js → p-02b840f8.js} +3 -3
- package/dist/components/{p-20290ade.js → p-0b2b3442.js} +2 -2
- package/dist/components/{p-b74221b4.js → p-0e5cc539.js} +2 -2
- package/dist/components/{p-7b344a65.js → p-0f2de0f8.js} +5 -5
- package/dist/components/{p-b30f3c49.js → p-107e55c1.js} +1 -1
- package/dist/components/{p-7965a1a6.js → p-1a9e3806.js} +1 -1
- package/dist/components/{p-e31889d3.js → p-1f5a4682.js} +2 -2
- package/dist/components/{p-b9b8697d.js → p-2309fb19.js} +2 -2
- package/dist/components/{p-95e51bef.js → p-241a8245.js} +1 -1
- package/dist/components/{p-402db72e.js → p-2447a26f.js} +2 -2
- package/dist/components/{p-4a84c913.js → p-28170a8d.js} +9 -9
- package/dist/components/{p-86f18b68.js → p-294cda89.js} +3 -3
- package/dist/components/{p-cd790a43.js → p-2a65883d.js} +1 -1
- package/dist/components/{p-020800ee.js → p-39e8b34a.js} +1 -1
- package/dist/components/{p-8f381eef.js → p-3e58e0f3.js} +1 -1
- package/dist/components/{p-c8583d9b.js → p-43d6a221.js} +2 -2
- package/dist/components/{p-828db489.js → p-45220ce9.js} +2 -2
- package/dist/components/{p-011adf66.js → p-46d99dd9.js} +2 -2
- package/dist/components/{p-578d73e5.js → p-48acb953.js} +1 -1
- package/dist/components/{p-89cfd513.js → p-4902c5cf.js} +1 -1
- package/dist/components/{p-40589702.js → p-4aede34c.js} +1 -1
- package/dist/components/{p-0e80bae4.js → p-4e5a54c2.js} +10 -10
- package/dist/components/{p-5b66b8f3.js → p-4ebf9684.js} +1 -1
- package/dist/components/{p-28d51137.js → p-540d8eb9.js} +1 -1
- package/dist/components/{p-4bfb4f60.js → p-5476e3f3.js} +2 -2
- package/dist/components/{p-40b1fef2.js → p-5669b6e7.js} +4 -4
- package/dist/components/{p-9d40e041.js → p-598dc3f2.js} +2 -2
- package/dist/components/{p-ea6b5bf5.js → p-616ae7ab.js} +2 -2
- package/dist/components/{p-9c3ca56e.js → p-6739a399.js} +2 -2
- package/dist/components/{p-597543af.js → p-713c7ed7.js} +3 -3
- package/dist/components/{p-966273a8.js → p-7148ec6a.js} +1 -1
- package/dist/components/{p-ce77fdfc.js → p-761c0e78.js} +1 -1
- package/dist/components/{p-a0a0867a.js → p-7f489600.js} +1 -1
- package/dist/components/{p-520dccab.js → p-819cb785.js} +1 -1
- package/dist/components/{p-9936031d.js → p-85872241.js} +20 -20
- package/dist/components/{p-2e3c0084.js → p-89025409.js} +3 -3
- package/dist/components/{p-bed61d79.js → p-8cfdac0d.js} +5 -5
- package/dist/components/{p-757856f4.js → p-8d6b21d5.js} +3 -3
- package/dist/components/{p-35af8a84.js → p-a25f3aca.js} +2 -2
- package/dist/components/{p-5f0f8967.js → p-a51db0d6.js} +16 -16
- package/dist/components/{p-c544502e.js → p-a73665b4.js} +4 -4
- package/dist/components/{p-b3447e0c.js → p-a8a6496d.js} +1 -1
- package/dist/components/{p-5739b5f1.js → p-af3b99f4.js} +2 -2
- package/dist/components/{p-53332481.js → p-b6781e91.js} +12 -12
- package/dist/components/{p-11a16ac3.js → p-bb4983b8.js} +2 -2
- package/dist/components/{p-3a1dbc0d.js → p-c334f0e5.js} +2 -2
- package/dist/components/{p-d2ce1170.js → p-cf8f725b.js} +1 -1
- package/dist/components/{p-157c1dc9.js → p-d765dbe4.js} +6 -6
- package/dist/components/{p-2eb35b99.js → p-da9018ea.js} +6 -6
- package/dist/components/{p-0ca31fce.js → p-dc3143c0.js} +2 -2
- package/dist/components/{p-ab842e10.js → p-e0510925.js} +1 -1
- package/dist/components/p-e7e2156a.js +375 -0
- package/dist/components/{p-09d1805e.js → p-eeb37b16.js} +1 -1
- package/dist/components/{p-d3588666.js → p-fa476519.js} +5 -5
- package/dist/components/{p-85990be7.js → p-fb836f65.js} +1 -1
- package/dist/components/{p-668f57d0.js → p-fb900e8f.js} +2 -2
- 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 +2 -2
- 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 +13 -13
- 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-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-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 +44 -33
- package/dist/esm/loader.js +383 -354
- 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 +255 -232
- package/dist/esm/rtk-breakout-room-manager_3.entry.js +4 -4
- package/dist/esm/rtk-breakout-rooms-manager_9.entry.js +8 -8
- 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-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-7660a4c1.entry.js → p-00445029.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-bb369808.entry.js → p-02c6b025.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-0fed7daa.entry.js → p-0baa78d7.entry.js} +1 -1
- package/dist/realtimekit-ui/p-19587963.entry.js +1 -0
- package/dist/realtimekit-ui/{p-0e2d6b1b.entry.js → p-1fe6003b.entry.js} +1 -1
- package/dist/realtimekit-ui/p-21d4bb9c.entry.js +1 -0
- package/dist/realtimekit-ui/{p-87f3b9a6.entry.js → p-2441260e.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-4822dc9f.entry.js → p-322957ed.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-f42c50db.entry.js → p-323d1aa4.entry.js} +1 -1
- package/dist/realtimekit-ui/p-421e4c6f.entry.js +1 -0
- package/dist/realtimekit-ui/{p-39410e81.entry.js → p-44d69c6b.entry.js} +1 -1
- package/dist/realtimekit-ui/p-48c87789.entry.js +1 -0
- package/dist/realtimekit-ui/{p-cea6c6ac.entry.js → p-53680d55.entry.js} +1 -1
- package/dist/realtimekit-ui/p-54a88fdf.entry.js +1 -0
- package/dist/realtimekit-ui/{p-9cab7a57.entry.js → p-5892c1e0.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-73f489be.entry.js → p-612a8d25.entry.js} +1 -1
- package/dist/realtimekit-ui/p-64206b62.entry.js +1 -0
- package/dist/realtimekit-ui/{p-a62e84f9.entry.js → p-67ead213.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-f2ce302b.entry.js → p-6896e819.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-fea05f1c.entry.js → p-7a9a226e.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-9cad5a6d.entry.js → p-80e51a73.entry.js} +1 -1
- package/dist/realtimekit-ui/p-820dad23.entry.js +1 -0
- package/dist/realtimekit-ui/{p-61d3e2d4.entry.js → p-85b3c0c4.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-0c071f00.entry.js → p-8778b3e6.entry.js} +1 -1
- package/dist/realtimekit-ui/p-a1408db4.entry.js +1 -0
- package/dist/realtimekit-ui/{p-c50f4cab.entry.js → p-a67e2a25.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-3e12d77a.entry.js → p-a680da64.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-bd226f59.entry.js → p-a7172c2d.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-cda80e2c.entry.js → p-a852e0cf.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-9dcd9e30.entry.js → p-ac6c8ebe.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-1dfe0269.entry.js → p-b25f7d7b.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-2c71cc53.entry.js → p-b51e813e.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-dded6ad0.entry.js → p-be5bdd0a.entry.js} +1 -1
- package/dist/realtimekit-ui/p-c5f704a3.entry.js +1 -0
- package/dist/realtimekit-ui/{p-d7a78f65.entry.js → p-cc226b51.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-a25bb0ad.entry.js → p-cda276d6.entry.js} +1 -1
- package/dist/realtimekit-ui/p-d880fb69.entry.js +1 -0
- package/dist/realtimekit-ui/{p-a867b984.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-toggle/rtk-chat-toggle.d.ts +4 -6
- package/dist/types/components/rtk-paginated-list/rtk-paginated-list.d.ts +68 -53
- package/dist/types/components.d.ts +9 -5
- package/package.json +1 -1
- package/dist/components/p-78f91ffe.js +0 -357
- package/dist/realtimekit-ui/p-02889d02.entry.js +0 -1
- package/dist/realtimekit-ui/p-09fb29e7.entry.js +0 -1
- package/dist/realtimekit-ui/p-260fc2ed.entry.js +0 -1
- package/dist/realtimekit-ui/p-32211408.entry.js +0 -1
- package/dist/realtimekit-ui/p-48c76360.entry.js +0 -1
- package/dist/realtimekit-ui/p-4d31d165.entry.js +0 -1
- package/dist/realtimekit-ui/p-51c72bc8.entry.js +0 -1
- package/dist/realtimekit-ui/p-b58dc07c.entry.js +0 -1
- package/dist/realtimekit-ui/p-c96e2a96.entry.js +0 -1
- package/dist/realtimekit-ui/p-d194317d.entry.js +0 -1
- package/dist/realtimekit-ui/p-ff9bc5b0.entry.js +0 -1
|
@@ -31,20 +31,18 @@ export declare class RtkChatToggle {
|
|
|
31
31
|
t: RtkI18n;
|
|
32
32
|
chatActive: boolean;
|
|
33
33
|
canViewChat: boolean;
|
|
34
|
-
|
|
35
|
-
* Only used when paginated chat is enabled
|
|
36
|
-
*/
|
|
37
|
-
hasNewMessages: boolean;
|
|
34
|
+
private pageSize;
|
|
38
35
|
connectedCallback(): void;
|
|
39
36
|
disconnectedCallback(): void;
|
|
40
37
|
meetingChanged(meeting: Meeting): void;
|
|
41
38
|
statesChanged(states: States): void;
|
|
39
|
+
private setUnreadMessageCount;
|
|
42
40
|
private onChatUpdate;
|
|
43
|
-
/** Emits updated state data */
|
|
44
|
-
stateUpdate: EventEmitter<States>;
|
|
45
41
|
private toggleChat;
|
|
46
42
|
private updateCanView;
|
|
47
43
|
handleChatActiveChange(): void;
|
|
44
|
+
/** Emits updated state data */
|
|
45
|
+
stateUpdate: EventEmitter<States>;
|
|
48
46
|
private buttonEl;
|
|
49
47
|
render(): any;
|
|
50
48
|
}
|
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HOW INFINITE SCROLL WORKS:
|
|
3
|
+
*
|
|
4
|
+
* We use intersectionObserver to scroll up.
|
|
5
|
+
* We use scrollEnd listener to scroll down.
|
|
6
|
+
*
|
|
7
|
+
* Why?
|
|
8
|
+
* intersectionObserver doesn't work reliably for 2 way scrolling but has great ux,
|
|
9
|
+
* so we use it to smoothly scroll up.
|
|
10
|
+
*
|
|
11
|
+
* We have empty divs at the top and bottom ($topRef, $bottomRef)
|
|
12
|
+
* which act as triggers to tell that we have reached the top or end of our messages and need to fetch new messages,
|
|
13
|
+
*
|
|
14
|
+
* When scrolling up, we can't remove pages as intersectionObserver relies on
|
|
15
|
+
* the index of dom elements to work properly.
|
|
16
|
+
* So instead, we fetch older messages and push them to the end of the 2d array
|
|
17
|
+
* if length exceeds pagesAllowed, we free up the pages and keep the first empty index in memory (firstEmptyIndex).
|
|
18
|
+
*
|
|
19
|
+
* For scrolling down, when scroll ends we see if the bottomRef is in view.
|
|
20
|
+
* If yes, we fetch the new page and insert it at the firstEmptyIndex.
|
|
21
|
+
* We update timestamps & firstEmptyIndex, then we rerender.
|
|
22
|
+
*
|
|
23
|
+
* If we have exceeded our page allowance we delete old pages.
|
|
24
|
+
*
|
|
25
|
+
* In this case deleting pages is okay as we are not relying on the index of dom elements to detect page end.
|
|
26
|
+
*
|
|
27
|
+
* This also simplifies the code because when a user scrolls up we do not need to manage a lastEmptyIndex.
|
|
28
|
+
*/
|
|
1
29
|
import { VNode } from '../../stencil-public-runtime';
|
|
2
30
|
import { IconPack } from '../../lib/icons';
|
|
3
31
|
import { RtkI18n } from '../../lib/lang';
|
|
@@ -7,15 +35,27 @@ export interface DataNode {
|
|
|
7
35
|
}
|
|
8
36
|
export declare class RtkPaginatedList {
|
|
9
37
|
private intersectionObserver;
|
|
10
|
-
private $
|
|
38
|
+
private $containerRef;
|
|
11
39
|
private $topRef;
|
|
12
40
|
private $bottomRef;
|
|
41
|
+
/**
|
|
42
|
+
* when scrolling up, we can't remove pages as intersectionObserver relies on
|
|
43
|
+
* the index of dom elements to stay stable.
|
|
44
|
+
* So, instead we free up the pages and keep the last empty index in memory.
|
|
45
|
+
*/
|
|
46
|
+
private firstEmptyIndex;
|
|
47
|
+
private oldTS;
|
|
48
|
+
private newTS;
|
|
49
|
+
private maxTS;
|
|
13
50
|
/** Page Size */
|
|
14
51
|
pageSize: number;
|
|
52
|
+
private pages;
|
|
15
53
|
/**
|
|
16
54
|
* Number of pages allowed to be shown
|
|
17
55
|
*/
|
|
18
56
|
pagesAllowed: number;
|
|
57
|
+
/** label to show when empty */
|
|
58
|
+
emptyListLabel: string;
|
|
19
59
|
/** Fetch the data */
|
|
20
60
|
fetchData: (timestamp: number, size: number, reversed: boolean) => Promise<unknown[]>;
|
|
21
61
|
/** Create nodes */
|
|
@@ -24,73 +64,48 @@ export declare class RtkPaginatedList {
|
|
|
24
64
|
selectedItemId?: string;
|
|
25
65
|
/** auto scroll list to bottom */
|
|
26
66
|
autoScroll: boolean;
|
|
67
|
+
rerenderBoolean: boolean;
|
|
68
|
+
showEmptyListLabel: boolean;
|
|
27
69
|
/** Icon pack */
|
|
28
70
|
iconPack: IconPack;
|
|
29
71
|
/** Language */
|
|
30
72
|
t: RtkI18n;
|
|
31
|
-
/** label to show when empty */
|
|
32
|
-
emptyListLabel: string;
|
|
33
73
|
isLoading: boolean;
|
|
34
74
|
isLoadingTop: boolean;
|
|
35
75
|
isLoadingBottom: boolean;
|
|
36
|
-
hasMoreDataAtTop: boolean;
|
|
37
|
-
rerenderBoolean: boolean;
|
|
38
76
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
|
|
42
|
-
|
|
77
|
+
* Even when auto scroll is enabled, we only want to scroll if a new realtime message has arrived.
|
|
78
|
+
* This variable tells us if we should respect auto scroll after a new page has been loaded.
|
|
79
|
+
* It is also used by the scroll to bottom button.
|
|
80
|
+
* */
|
|
81
|
+
private shouldScrollToBottom;
|
|
82
|
+
/** UI Indicator for the "scroll to bottom" button.
|
|
83
|
+
* Toggles on when a new node is added and autoscroll is disabled.
|
|
84
|
+
* Toggles off when all nodes are loaded */
|
|
85
|
+
private showNewMessagesCTR;
|
|
43
86
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*/
|
|
47
|
-
hasNewNodesToRender: boolean;
|
|
48
|
-
showEmptyListLabel: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* This is a private variable not a state
|
|
51
|
-
* since we want to debounce rerenders
|
|
52
|
-
*
|
|
53
|
-
* A list of pages where each page contains a number of Nodes
|
|
54
|
-
* [
|
|
55
|
-
* [Node 1, Node 2, Node 3.... Node N],
|
|
56
|
-
* [Node 1, Node 2, Node 3.... Node N],
|
|
57
|
-
* ]
|
|
58
|
-
*/
|
|
59
|
-
private pagesToRender;
|
|
60
|
-
/**
|
|
61
|
-
* On a new node created
|
|
87
|
+
* Adds a new node to the beginning of the paginated list
|
|
88
|
+
* @param {DataNode} node - The data node to add to the beginning of the list
|
|
62
89
|
*/
|
|
63
90
|
onNewNode(node: DataNode): Promise<void>;
|
|
91
|
+
private scrollToBottom;
|
|
64
92
|
/**
|
|
65
|
-
*
|
|
66
|
-
|
|
67
|
-
|
|
93
|
+
* Deletes a node anywhere from the list
|
|
94
|
+
* @param {string} id - The id of the node to delete
|
|
95
|
+
* */
|
|
96
|
+
onNodeDelete(id: string): Promise<void>;
|
|
68
97
|
/**
|
|
69
|
-
*
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
98
|
+
* Updates a new node anywhere in the list
|
|
99
|
+
* @param {string} _id - The id of the node to update
|
|
100
|
+
* @param {DataNode} _node - The updated data node
|
|
101
|
+
* */
|
|
102
|
+
onNodeUpdate(_id: string, _node: DataNode): Promise<void>;
|
|
103
|
+
private rerender;
|
|
73
104
|
connectedCallback(): void;
|
|
74
|
-
disconnectedCallback(): void;
|
|
75
105
|
componentDidLoad(): void;
|
|
76
|
-
componentDidRender(): void;
|
|
77
|
-
private currentTime;
|
|
78
106
|
private observe;
|
|
79
|
-
private
|
|
80
|
-
private
|
|
81
|
-
private
|
|
82
|
-
private addNodeToRender;
|
|
83
|
-
/**
|
|
84
|
-
* @param start
|
|
85
|
-
* @param end
|
|
86
|
-
* @param reversed Defines whether to add the page at the beginning or the end
|
|
87
|
-
* @param onPageLoaded Callback for when all new nodes are rendered
|
|
88
|
-
* @param direction Indicates if loading from 'top' or 'bottom'
|
|
89
|
-
*/
|
|
90
|
-
private loadPage;
|
|
91
|
-
private rerender;
|
|
92
|
-
private removeLastPageIfNeeded;
|
|
93
|
-
private onDownArrowClicked;
|
|
94
|
-
private onLoadMoreOnTopClicked;
|
|
107
|
+
private loadPrevPage;
|
|
108
|
+
private loadNextPage;
|
|
109
|
+
private isAtBottom;
|
|
95
110
|
render(): any;
|
|
96
111
|
}
|
|
@@ -2510,17 +2510,21 @@ export namespace Components {
|
|
|
2510
2510
|
*/
|
|
2511
2511
|
"iconPack": IconPack;
|
|
2512
2512
|
/**
|
|
2513
|
-
*
|
|
2513
|
+
* Adds a new node to the beginning of the paginated list
|
|
2514
|
+
* @param node - The data node to add to the beginning of the list
|
|
2514
2515
|
*/
|
|
2515
2516
|
"onNewNode": (node: DataNode) => Promise<void>;
|
|
2516
2517
|
/**
|
|
2517
|
-
*
|
|
2518
|
+
* Deletes a node anywhere from the list
|
|
2519
|
+
* @param id - The id of the node to delete
|
|
2518
2520
|
*/
|
|
2519
|
-
"onNodeDelete": (
|
|
2521
|
+
"onNodeDelete": (id: string) => Promise<void>;
|
|
2520
2522
|
/**
|
|
2521
|
-
*
|
|
2523
|
+
* Updates a new node anywhere in the list
|
|
2524
|
+
* @param _id - The id of the node to update
|
|
2525
|
+
* @param _node - The updated data node
|
|
2522
2526
|
*/
|
|
2523
|
-
"onNodeUpdate": (
|
|
2527
|
+
"onNodeUpdate": (_id: string, _node: DataNode) => Promise<void>;
|
|
2524
2528
|
/**
|
|
2525
2529
|
* Page Size
|
|
2526
2530
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/realtimekit-ui",
|
|
3
|
-
"version": "1.1.0-staging.
|
|
3
|
+
"version": "1.1.0-staging.6",
|
|
4
4
|
"description": "Pre-built, ready-to-use UI components and utilities for integrating with Cloudflare RealtimeKit",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, w as writeTask, h, e as Host } from './p-c3592601.js';
|
|
2
|
-
import { e as defaultIconPack, i as useLanguage } from './p-e847fee9.js';
|
|
3
|
-
import { S as SyncWithStore } from './p-6f7c46d2.js';
|
|
4
|
-
import { s as smoothScrollToBottom } from './p-0752f2ba.js';
|
|
5
|
-
import { d as defineCustomElement$3 } from './p-1391bef0.js';
|
|
6
|
-
import { d as defineCustomElement$2 } from './p-3b29dda1.js';
|
|
7
|
-
import { d as defineCustomElement$1 } from './p-5b66b8f3.js';
|
|
8
|
-
import { d as debounce } from './p-1dca17d1.js';
|
|
9
|
-
|
|
10
|
-
const rtkPaginatedListCss = ".scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{position:relative;display:flex;flex-direction:column;flex:1}.container{box-sizing:border-box;display:flex;flex-direction:column-reverse;padding-top:var(--rtk-space-4, 16px);padding-bottom:var(--rtk-space-4, 16px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);flex:1 0 0px;overflow-y:scroll}.file-picker{display:none}.chat *:first-child{margin-top:var(--rtk-space-0, 0px)}.chat .head{display:flex;align-items:center}.chat .head .name{margin-right:var(--rtk-space-4, 16px);font-size:12px;font-weight:700}.chat .head .time{font-size:12px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.chat .body{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);overflow-wrap:break-word;font-size:14px;line-height:1.375}.chat .body .emoji{font-size:24px}p{margin-top:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-3, 12px)}rtk-text-message,rtk-image-message,rtk-file-message{margin-top:var(--rtk-space-4, 16px);display:block;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));box-sizing:border-box}*[is-continued]{margin-top:var(--rtk-space-3, 12px)}rtk-text-message[is-continued]{margin-top:var(--rtk-space-2, 8px)}.chat .image{position:relative;height:var(--rtk-space-40, 160px);max-width:var(--rtk-space-64, 256px);cursor:pointer}.chat .image img{display:none;height:100%;width:100%;border-radius:var(--rtk-border-radius-sm, 4px);-o-object-fit:cover;object-fit:cover}.chat .image .image-spinner{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}.chat .image .image-spinner rtk-spinner{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}.chat .image .image-errored{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);background-color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.1);--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}.chat .image .actions{display:none;height:var(--rtk-space-8, 32px);align-items:center;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action{height:var(--rtk-space-8, 32px);width:var(--rtk-space-8, 32px);border-radius:var(--rtk-border-radius-none, 0);border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.image.loaded img{display:block}.image.loaded .image-spinner{display:none}.image:hover .actions,.image:focus .actions{display:flex}.chat .file{display:flex;align-items:center;gap:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);padding-top:var(--rtk-space-1\\.5, 6px);padding-bottom:var(--rtk-space-1\\.5, 6px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.chat .file .file-data{flex:1 1 0%}.chat .file .file-data .name{word-break:break-all;color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split{margin-top:var(--rtk-space-0\\.5, 2px);display:flex;align-items:center;font-size:12px}.chat .file .file-data .file-data-split .ext{margin-right:var(--rtk-space-2, 8px);text-transform:uppercase;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split .divider{height:var(--rtk-space-4, 16px);width:var(--rtk-space-0\\.5, 2px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.chat .file .file-data .file-data-split .size{margin-left:var(--rtk-space-2, 8px)}.smallest-dom-element{width:1px}#top-scroll{transform:translateY(20vh)}#bottom-scroll{transform:translateY(-20vh)}a{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity));text-decoration-line:none}a:hover{text-decoration-line:underline}.show-new-messages-ctr{pointer-events:none;position:absolute;bottom:var(--rtk-space-2, 8px);right:var(--rtk-space-4, 16px);z-index:10;margin-top:calc(var(--rtk-space-14, 56px) * -1);--tw-translate-y:var(--rtk-space-28, 112px);transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:0;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.show-new-messages-ctr.active{--tw-translate-y:var(--rtk-space-0, 0px);transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:1}.show-new-messages{pointer-events:auto;border-radius:9999px}.show-new-messages:hover{border-radius:9999px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-ring-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}rtk-spinner,.empty-list{margin:auto}.page-wrapper{margin-left:var(--rtk-space-1, 4px);margin-right:var(--rtk-space-1, 4px)}.message-wrapper{margin-bottom:var(--rtk-space-2, 8px)}.pinned .message-wrapper{position:relative}.pinned .pin-icon{position:absolute;right:calc(var(--rtk-space-1, 4px) * -1);top:calc(var(--rtk-space-1, 4px) * -1);display:flex;border-radius:var(--rtk-border-radius-sm, 4px)}.pinned rtk-message-view{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px)}.load-more-on-top-container{pointer-events:none;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-4, 16px);z-index:10}.load-more-icon{pointer-events:auto;border-radius:9999px}.load-more-icon:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-ring-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}";
|
|
11
|
-
const RtkPaginatedListStyle0 = rtkPaginatedListCss;
|
|
12
|
-
|
|
13
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
16
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
-
else
|
|
18
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
19
|
-
if (d = decorators[i])
|
|
20
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
const RtkPaginatedList = /*@__PURE__*/ proxyCustomElement(class RtkPaginatedList extends H {
|
|
24
|
-
constructor() {
|
|
25
|
-
super();
|
|
26
|
-
this.__registerHost();
|
|
27
|
-
this.__attachShadow();
|
|
28
|
-
/** Icon pack */
|
|
29
|
-
this.iconPack = defaultIconPack;
|
|
30
|
-
/** Language */
|
|
31
|
-
this.t = useLanguage();
|
|
32
|
-
/** label to show when empty */
|
|
33
|
-
this.emptyListLabel = null;
|
|
34
|
-
this.isLoading = false;
|
|
35
|
-
this.isLoadingTop = false;
|
|
36
|
-
this.isLoadingBottom = false;
|
|
37
|
-
this.hasMoreDataAtTop = false;
|
|
38
|
-
this.rerenderBoolean = false;
|
|
39
|
-
/**
|
|
40
|
-
* This gets disabled when the user scrolls up and the bottom node
|
|
41
|
-
* is not visible anymore.
|
|
42
|
-
*/
|
|
43
|
-
this.shouldRenderNewNodes = true;
|
|
44
|
-
/**
|
|
45
|
-
* This gets disabled when the user scrolls up and the bottom node
|
|
46
|
-
* is not visible anymore.
|
|
47
|
-
*/
|
|
48
|
-
this.hasNewNodesToRender = false;
|
|
49
|
-
this.showEmptyListLabel = false;
|
|
50
|
-
/**
|
|
51
|
-
* This is a private variable not a state
|
|
52
|
-
* since we want to debounce rerenders
|
|
53
|
-
*
|
|
54
|
-
* A list of pages where each page contains a number of Nodes
|
|
55
|
-
* [
|
|
56
|
-
* [Node 1, Node 2, Node 3.... Node N],
|
|
57
|
-
* [Node 1, Node 2, Node 3.... Node N],
|
|
58
|
-
* ]
|
|
59
|
-
*/
|
|
60
|
-
this.pagesToRender = [[]];
|
|
61
|
-
this.currentTime = () => {
|
|
62
|
-
return new Date().getTime();
|
|
63
|
-
};
|
|
64
|
-
this.observe = (el) => {
|
|
65
|
-
if (!el)
|
|
66
|
-
return;
|
|
67
|
-
this.intersectionObserver.observe(el);
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* On a new node created
|
|
72
|
-
*/
|
|
73
|
-
async onNewNode(node) {
|
|
74
|
-
if (!this.shouldRenderNewNodes) {
|
|
75
|
-
this.hasNewNodesToRender = true;
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
this.addNodeToRender(node, false);
|
|
79
|
-
this.rerender();
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* On node deleted
|
|
83
|
-
*/
|
|
84
|
-
async onNodeDelete(key) {
|
|
85
|
-
const oldLength = this.pagesToRender.flat().length;
|
|
86
|
-
this.pagesToRender = this.pagesToRender.map((page) => page.filter((item) => item.id !== key));
|
|
87
|
-
if (oldLength !== this.pagesToRender.flat().length) {
|
|
88
|
-
this.rerender();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* On node updated
|
|
93
|
-
*/
|
|
94
|
-
async onNodeUpdate(key, newItem) {
|
|
95
|
-
let shouldRerender = false;
|
|
96
|
-
this.pagesToRender = this.pagesToRender.map((page) => page.map((item) => {
|
|
97
|
-
if (item.id === key) {
|
|
98
|
-
shouldRerender = true;
|
|
99
|
-
return newItem;
|
|
100
|
-
}
|
|
101
|
-
return item;
|
|
102
|
-
}));
|
|
103
|
-
if (shouldRerender)
|
|
104
|
-
this.rerender();
|
|
105
|
-
}
|
|
106
|
-
onItemChanged(newItemId, oldItemId) {
|
|
107
|
-
if (newItemId !== oldItemId) {
|
|
108
|
-
this.pagesToRender = [[]];
|
|
109
|
-
this.loadFirstPage().then(() => this.rerender());
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
connectedCallback() {
|
|
113
|
-
this.rerender = debounce(this.rerender.bind(this), 50, { maxWait: 200 });
|
|
114
|
-
this.autoScroll = true;
|
|
115
|
-
this.intersectionObserver = new IntersectionObserver((entries) => {
|
|
116
|
-
writeTask(() => {
|
|
117
|
-
for (const entry of entries) {
|
|
118
|
-
if (entry.target.id === 'bottom-scroll') {
|
|
119
|
-
if (entry.isIntersecting)
|
|
120
|
-
this.loadBottom();
|
|
121
|
-
else
|
|
122
|
-
this.shouldRenderNewNodes = false;
|
|
123
|
-
}
|
|
124
|
-
if (entry.target.id === 'top-scroll' && entry.isIntersecting) {
|
|
125
|
-
this.loadTop();
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
disconnectedCallback() {
|
|
132
|
-
this.intersectionObserver.disconnect();
|
|
133
|
-
}
|
|
134
|
-
componentDidLoad() {
|
|
135
|
-
/**
|
|
136
|
-
* Adding observes here so that on the first render we scroll down
|
|
137
|
-
* and shouldRenderNewNodes remains true
|
|
138
|
-
*/
|
|
139
|
-
this.loadFirstPage();
|
|
140
|
-
this.observe(this.$topRef);
|
|
141
|
-
this.observe(this.$bottomRef);
|
|
142
|
-
}
|
|
143
|
-
componentDidRender() {
|
|
144
|
-
if (this.shouldRenderNewNodes && this.autoScroll)
|
|
145
|
-
smoothScrollToBottom(this.$paginatedList);
|
|
146
|
-
}
|
|
147
|
-
loadFirstPage() {
|
|
148
|
-
return this.loadPage(this.currentTime(), this.pageSize, true, (data) => {
|
|
149
|
-
if (data.length === 0) {
|
|
150
|
-
this.showEmptyListLabel = true;
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
loadTop() {
|
|
155
|
-
/**
|
|
156
|
-
* If there is only one unfilled page or no page, no need to check
|
|
157
|
-
* for top since it will be empty
|
|
158
|
-
*/
|
|
159
|
-
if (this.pagesToRender.length === 0)
|
|
160
|
-
return;
|
|
161
|
-
if (this.pagesToRender.length === 1 && this.pagesToRender[0].length < this.pageSize)
|
|
162
|
-
return;
|
|
163
|
-
/**
|
|
164
|
-
* TODO: Make this more flexible currently this only works with chat
|
|
165
|
-
*/
|
|
166
|
-
const oldestVNode = this.pagesToRender[0][0];
|
|
167
|
-
const oldestTimestamp = oldestVNode.timeMs;
|
|
168
|
-
// TODO: scrollIntoView
|
|
169
|
-
const onPageRendered = () => { }; // oldestVNode.$elm$?.scrollIntoView();
|
|
170
|
-
this.isLoadingTop = true;
|
|
171
|
-
this.loadPage(oldestTimestamp - 1, this.pageSize, true, onPageRendered, 'top');
|
|
172
|
-
}
|
|
173
|
-
loadBottom() {
|
|
174
|
-
/**
|
|
175
|
-
* If there is only one unfilled page or no page, no need to check
|
|
176
|
-
* for top since it will be empty
|
|
177
|
-
*/
|
|
178
|
-
if (this.pagesToRender.length === 0) {
|
|
179
|
-
this.shouldRenderNewNodes = true;
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
if (this.pagesToRender.length === 1 && this.pagesToRender[0].length < this.pageSize) {
|
|
183
|
-
this.shouldRenderNewNodes = true;
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
const newestVNode = this.pagesToRender.at(-1).at(-1);
|
|
187
|
-
const newestTimestamp = newestVNode.timeMs;
|
|
188
|
-
// TODO: scrollIntoView
|
|
189
|
-
const onPageRendered = () => smoothScrollToBottom(this.$paginatedList);
|
|
190
|
-
this.isLoadingBottom = true;
|
|
191
|
-
this.loadPage(newestTimestamp + 1, this.pageSize, false, onPageRendered, 'bottom');
|
|
192
|
-
}
|
|
193
|
-
addNodeToRender(node, addToStart) {
|
|
194
|
-
if (addToStart) {
|
|
195
|
-
const firstPage = this.pagesToRender[0];
|
|
196
|
-
if (firstPage && (firstPage === null || firstPage === void 0 ? void 0 : firstPage.length) < this.pageSize) {
|
|
197
|
-
/**
|
|
198
|
-
* If first page is not full then just add to that page
|
|
199
|
-
*/
|
|
200
|
-
firstPage.unshift(node);
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
/**
|
|
204
|
-
* If first page is full then add a new page to the start
|
|
205
|
-
*/
|
|
206
|
-
const newPage = [node];
|
|
207
|
-
this.pagesToRender.unshift(newPage);
|
|
208
|
-
this.removeLastPageIfNeeded(false);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
else {
|
|
212
|
-
const [lastPage] = this.pagesToRender.slice(-1);
|
|
213
|
-
if (lastPage && (lastPage === null || lastPage === void 0 ? void 0 : lastPage.length) < this.pageSize) {
|
|
214
|
-
/**
|
|
215
|
-
* If last page is not full then just add it
|
|
216
|
-
*/
|
|
217
|
-
lastPage.push(node);
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
/**
|
|
221
|
-
* If last page is full add a new page with just
|
|
222
|
-
* this node
|
|
223
|
-
*/
|
|
224
|
-
const newPage = [node];
|
|
225
|
-
this.pagesToRender.push(newPage);
|
|
226
|
-
this.removeLastPageIfNeeded(true);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* @param start
|
|
232
|
-
* @param end
|
|
233
|
-
* @param reversed Defines whether to add the page at the beginning or the end
|
|
234
|
-
* @param onPageLoaded Callback for when all new nodes are rendered
|
|
235
|
-
* @param direction Indicates if loading from 'top' or 'bottom'
|
|
236
|
-
*/
|
|
237
|
-
async loadPage(timestamp, size, reversed, onPageRendered = () => { }, direction) {
|
|
238
|
-
this.isLoading = true;
|
|
239
|
-
const data = (await this.fetchData(timestamp, size, reversed));
|
|
240
|
-
this.isLoading = false;
|
|
241
|
-
if (direction === 'top') {
|
|
242
|
-
this.isLoadingTop = false;
|
|
243
|
-
this.hasMoreDataAtTop = (data === null || data === void 0 ? void 0 : data.length) > 0;
|
|
244
|
-
}
|
|
245
|
-
if (direction === 'bottom') {
|
|
246
|
-
this.isLoadingBottom = false;
|
|
247
|
-
}
|
|
248
|
-
if (!(data === null || data === void 0 ? void 0 : data.length)) {
|
|
249
|
-
/**
|
|
250
|
-
* While scrolling down if there were no new items found
|
|
251
|
-
* then start rendering new nodes;
|
|
252
|
-
*/
|
|
253
|
-
if (!reversed) {
|
|
254
|
-
this.hasNewNodesToRender = false;
|
|
255
|
-
this.shouldRenderNewNodes = true;
|
|
256
|
-
}
|
|
257
|
-
onPageRendered([]);
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
data.forEach((node) => this.addNodeToRender(node, reversed));
|
|
261
|
-
this.rerender();
|
|
262
|
-
onPageRendered(data);
|
|
263
|
-
}
|
|
264
|
-
rerender() {
|
|
265
|
-
this.rerenderBoolean = !this.rerenderBoolean;
|
|
266
|
-
}
|
|
267
|
-
removeLastPageIfNeeded(removeFromStart) {
|
|
268
|
-
if (this.pagesToRender.length > this.pagesAllowed) {
|
|
269
|
-
if (removeFromStart)
|
|
270
|
-
this.pagesToRender.shift();
|
|
271
|
-
else
|
|
272
|
-
this.pagesToRender.pop();
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
onDownArrowClicked() {
|
|
276
|
-
/**
|
|
277
|
-
* Load the freshest pages
|
|
278
|
-
*/
|
|
279
|
-
this.loadBottom();
|
|
280
|
-
}
|
|
281
|
-
onLoadMoreOnTopClicked() {
|
|
282
|
-
this.loadTop();
|
|
283
|
-
}
|
|
284
|
-
render() {
|
|
285
|
-
var _a;
|
|
286
|
-
/**
|
|
287
|
-
* div.container is flex=column-reverse
|
|
288
|
-
* which is why div#bottom-scroll comes before div#top-scroll
|
|
289
|
-
* div.page-wrapper prevents reversal of messages
|
|
290
|
-
*/
|
|
291
|
-
return (h(Host, { key: '2ee90baa6b1b9f88829d04632c129287b936ba30' }, h("div", { key: 'd68db998539fd1df12e92d61828a04628f7d9f0a', class: "scrollbar container", part: "container", ref: (el) => (this.$paginatedList = el) }, h("div", { key: '4fe1ae2b1aa961242ba6be8ca3b8b6c6e504ef5c', class: { 'show-new-messages-ctr': true, active: !this.shouldRenderNewNodes } }, h("rtk-button", { key: '5c7ad4c553eb6f1b7f14bad406e49fe18f63d100', class: "show-new-messages", kind: "icon", variant: "secondary", part: "show-new-messages", onClick: () => this.onDownArrowClicked() }, h("rtk-icon", { key: 'dacfc24e3fb9ec34e40447b606e256eefaefdc6e', icon: this.iconPack.chevron_down }))), h("div", { key: '569ffce0c198638b831a3eb0bac9a032c863ed9d', class: "smallest-dom-element", id: "bottom-scroll", ref: (el) => (this.$bottomRef = el) }), this.isLoadingBottom && h("rtk-spinner", { key: '06f571694e1877d8eba4ec939bc6a74f68f16caa', size: "sm" }), this.isLoading && this.pagesToRender.flat().length === 0 && h("rtk-spinner", { key: '628c0eef27fe29d2c3cbf6f0da7d10a12560c127', size: "lg" }), this.pagesToRender.flat().length === 0 && this.showEmptyListLabel ? (h("div", { class: "empty-list" }, (_a = this.emptyListLabel) !== null && _a !== void 0 ? _a : this.t('list.empty'))) : (h("div", { class: "page-wrapper" }, this.pagesToRender.map((page) => this.createNodes(page)))), this.hasMoreDataAtTop && !this.isLoadingTop && (h("div", { key: 'fc5207945ed0949074e3460d9943130eb4289409', class: "load-more-on-top-container" }, h("rtk-button", { key: '4fff7d14798340dc576e4aeeebfe9e3946cbcf6a', class: "load-more-icon", kind: "icon", variant: "secondary", part: "load-more-icon", onClick: () => this.onLoadMoreOnTopClicked() }, h("rtk-icon", { key: '87b2abaf1c850189246d1b9aa84b55c374b31d1d', icon: this.iconPack.chevron_up })))), this.isLoadingTop && h("rtk-spinner", { key: '766ac48eebaa236a9a44f770d777c2c31fabe10e', size: "sm" }), h("div", { key: '6a5287556030f9f426ac2d8b6063b13a966135ff', class: "smallest-dom-element", id: "top-scroll", ref: (el) => (this.$topRef = el) }))));
|
|
292
|
-
}
|
|
293
|
-
static get watchers() { return {
|
|
294
|
-
"selectedItemId": ["onItemChanged"]
|
|
295
|
-
}; }
|
|
296
|
-
static get style() { return RtkPaginatedListStyle0; }
|
|
297
|
-
}, [1, "rtk-paginated-list", {
|
|
298
|
-
"pageSize": [2, "page-size"],
|
|
299
|
-
"pagesAllowed": [2, "pages-allowed"],
|
|
300
|
-
"fetchData": [16],
|
|
301
|
-
"createNodes": [16],
|
|
302
|
-
"selectedItemId": [1, "selected-item-id"],
|
|
303
|
-
"autoScroll": [4, "auto-scroll"],
|
|
304
|
-
"iconPack": [16],
|
|
305
|
-
"t": [16],
|
|
306
|
-
"emptyListLabel": [1, "empty-list-label"],
|
|
307
|
-
"isLoading": [32],
|
|
308
|
-
"isLoadingTop": [32],
|
|
309
|
-
"isLoadingBottom": [32],
|
|
310
|
-
"hasMoreDataAtTop": [32],
|
|
311
|
-
"rerenderBoolean": [32],
|
|
312
|
-
"shouldRenderNewNodes": [32],
|
|
313
|
-
"hasNewNodesToRender": [32],
|
|
314
|
-
"showEmptyListLabel": [32],
|
|
315
|
-
"onNewNode": [64],
|
|
316
|
-
"onNodeDelete": [64],
|
|
317
|
-
"onNodeUpdate": [64]
|
|
318
|
-
}, undefined, {
|
|
319
|
-
"selectedItemId": ["onItemChanged"]
|
|
320
|
-
}]);
|
|
321
|
-
__decorate([
|
|
322
|
-
SyncWithStore()
|
|
323
|
-
], RtkPaginatedList.prototype, "iconPack", void 0);
|
|
324
|
-
__decorate([
|
|
325
|
-
SyncWithStore()
|
|
326
|
-
], RtkPaginatedList.prototype, "t", void 0);
|
|
327
|
-
function defineCustomElement() {
|
|
328
|
-
if (typeof customElements === "undefined") {
|
|
329
|
-
return;
|
|
330
|
-
}
|
|
331
|
-
const components = ["rtk-paginated-list", "rtk-button", "rtk-icon", "rtk-spinner"];
|
|
332
|
-
components.forEach(tagName => { switch (tagName) {
|
|
333
|
-
case "rtk-paginated-list":
|
|
334
|
-
if (!customElements.get(tagName)) {
|
|
335
|
-
customElements.define(tagName, RtkPaginatedList);
|
|
336
|
-
}
|
|
337
|
-
break;
|
|
338
|
-
case "rtk-button":
|
|
339
|
-
if (!customElements.get(tagName)) {
|
|
340
|
-
defineCustomElement$3();
|
|
341
|
-
}
|
|
342
|
-
break;
|
|
343
|
-
case "rtk-icon":
|
|
344
|
-
if (!customElements.get(tagName)) {
|
|
345
|
-
defineCustomElement$2();
|
|
346
|
-
}
|
|
347
|
-
break;
|
|
348
|
-
case "rtk-spinner":
|
|
349
|
-
if (!customElements.get(tagName)) {
|
|
350
|
-
defineCustomElement$1();
|
|
351
|
-
}
|
|
352
|
-
break;
|
|
353
|
-
} });
|
|
354
|
-
}
|
|
355
|
-
defineCustomElement();
|
|
356
|
-
|
|
357
|
-
export { RtkPaginatedList as R, defineCustomElement as d };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as a,H as s}from"./p-0ee570cd.js";import{e,i as o}from"./p-25c4d10f.js";import{c as n}from"./p-11a469d9.js";import{S as r}from"./p-9b550ec4.js";var h=function(t,i,a,s){var e,o=arguments.length,n=o<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,a,s);else for(var r=t.length-1;r>=0;r--)(e=t[r])&&(n=(o<3?e(n):o>3?e(i,a,n):e(i,a))||n);return o>3&&n&&Object.defineProperty(i,a,n),n};const l=class{constructor(a){t(this,a),this.stateUpdate=i(this,"rtkStateUpdate",7),this.unreadMessageCount=0,this.variant="button",this.iconPack=e,this.t=o(),this.chatActive=!1,this.canViewChat=!1,this.hasNewMessages=!1,this.onChatUpdate=({action:t,message:i})=>{var a;this.chatActive||"add"===t&&i.userId!==(null===(a=this.meeting)||void 0===a?void 0:a.self.userId)&&(this.hasNewMessages=!0,this.unreadMessageCount+=1)},this.toggleChat=()=>{const t=this.states;this.chatActive=!((null==t?void 0:t.activeSidebar)&&"chat"===(null==t?void 0:t.sidebar)),this.chatActive&&(this.unreadMessageCount=0,this.hasNewMessages=!1),this.stateUpdate.emit({activeSidebar:this.chatActive,sidebar:this.chatActive?"chat":void 0,activeMoreMenu:!1,activeAI:!1})},this.updateCanView=()=>{this.canViewChat=n(this.meeting)}}connectedCallback(){this.meetingChanged(this.meeting),this.statesChanged(this.states)}disconnectedCallback(){var t,i,a,s,e,o;null===(i=null===(t=this.meeting)||void 0===t?void 0:t.chat)||void 0===i||i.removeListener("chatUpdate",this.onChatUpdate),null===(s=null===(a=this.meeting)||void 0===a?void 0:a.stage)||void 0===s||s.removeListener("stageStatusUpdate",this.updateCanView),null===(o=null===(e=this.meeting)||void 0===e?void 0:e.self)||void 0===o||o.permissions.removeListener("chatUpdate",this.updateCanView)}meetingChanged(t){var i,a,s,e,o,r,h;if(!t)return;null===(i=t.chat)||void 0===i||i.getMessages((new Date).getTime(),1,!0).then((t=>{var i;(null===(i=null==t?void 0:t.messages)||void 0===i?void 0:i.length)&&(this.hasNewMessages=!0)}));const l=null!==(s=null===(a=t.meta)||void 0===a?void 0:a.meetingStartedTimestamp.getTime())&&void 0!==s?s:0,c=null===(e=t.chat)||void 0===e?void 0:e.messages.filter((t=>t.timeMs>l));this.unreadMessageCount=c.length||0,null===(o=t.chat)||void 0===o||o.addListener("chatUpdate",this.onChatUpdate),this.canViewChat=n(t),null===(r=null==t?void 0:t.stage)||void 0===r||r.on("stageStatusUpdate",this.updateCanView),null===(h=null==t?void 0:t.self)||void 0===h||h.permissions.on("chatUpdate",this.updateCanView)}statesChanged(t){null!=t&&(this.chatActive=!0===t.activeSidebar&&"chat"===t.sidebar)}handleChatActiveChange(){this.chatActive||this.states.activeSidebar||this.buttonEl.focus()}render(){return this.meeting?this.canViewChat?a(s,{title:this.t("chat")},this.hasNewMessages&&a("div",{class:"unread-count-dot",part:"unread-count-dot"}),a("rtk-controlbar-button",{ref:t=>this.buttonEl=t,part:"controlbar-button",size:this.size,iconPack:this.iconPack,class:{active:this.chatActive},onClick:this.toggleChat,icon:this.iconPack.chat,label:this.t("chat"),variant:this.variant})):a(s,{"data-hidden":!0}):null}static get watchers(){return{meeting:["meetingChanged"],states:["statesChanged"],chatActive:["handleChatActiveChange"]}}};h([r()],l.prototype,"meeting",void 0),h([r()],l.prototype,"states",void 0),h([r()],l.prototype,"iconPack",void 0),h([r()],l.prototype,"t",void 0),l.style=":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{position:relative;display:block}:host([data-hidden]){display:none}.unread-count{position:absolute;right:var(--rtk-space-3, 12px);box-sizing:border-box;padding:var(--rtk-space-0\\.5, 2px);-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));font-size:12px;color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));display:flex;height:var(--rtk-space-5, 20px);min-width:var(--rtk-space-5, 20px);align-items:center;justify-content:center;border-radius:9999px;z-index:1}.unread-count-dot{position:absolute;right:var(--rtk-space-3, 12px);z-index:10;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));border-radius:50%;display:flex;height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);align-items:center;justify-content:center}:host([variant='horizontal']) .unread-count{right:var(--rtk-space-4, 16px);top:50%;transform:translateY(-50%)}";export{l as rtk_chat_toggle}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,w as s,h as i}from"./p-0ee570cd.js";import{e}from"./p-25c4d10f.js";import{S as r}from"./p-9b550ec4.js";import{d as h}from"./p-45f90b95.js";const a=class{constructor(i){t(this,i),this.visibleItemsCount=20,this.estimateItemSize=100,this.iconPack=e,this.isFetching=!1,this.autoScroll=!0,this.totalHeight=0,this.sizes=new Map,this.lastScrollTop=0,this.scrollToBottomRetries=0,this.elementObserver=(()=>{let t=null;const s=()=>t||("undefined"!=typeof ResizeObserver?t=new ResizeObserver((t=>{t.forEach((t=>{this.measureElement(t.target,t)}))})):null);return{disconnect:()=>{var t;return null===(t=s())||void 0===t?void 0:t.disconnect()},observe:t=>{var i;return null===(i=s())||void 0===i?void 0:i.observe(t,{box:"border-box"})},unobserve:t=>{var i;return null===(i=s())||void 0===i?void 0:i.unobserve(t)}}})(),this.measureElement=(t,s)=>{if(!t)return;const i=t.dataset.id;if(this.sizes.has(i))return void this.elementObserver.unobserve(t);if(s){const e=s.borderBoxSize[0];if(e&&e.blockSize>0)return this.saveItemSize(i,e.blockSize),void this.elementObserver.unobserve(t)}const e=t.getBoundingClientRect();e.height>0&&this.saveItemSize(i,e.height)},this.getVisibleItems=()=>this.messages.slice(this.range.start,this.range.end+1),this.updateVisibleItems=(t,s)=>{const i=this.messages.length;let e=t,r=s;i<=this.visibleItemsCount?(e=0,r=i-1):s-t<this.visibleItemsCount-1&&(e=this.range.end-this.visibleItemsCount+1),this.range.start!==e&&(this.range={start:e,end:r},this.totalHeight=this.getRangeSize(0,i))},this.getEstimatedItemSize=()=>this.estimateItemSize,this.getRangeSize=(t,s)=>{let i=0,e=0;for(let r=t;r<s;r++)e=this.sizes.get(this.messages[r].id),i+=e||this.getEstimatedItemSize();return i},this.getScrollTop=()=>this.$listRef?Math.ceil(this.$listRef.scrollTop):0,this.getClientHeight=()=>this.$listRef?Math.ceil(this.$listRef.clientHeight):0,this.getScrollHeight=()=>this.$listRef?Math.ceil(this.$listRef.scrollHeight):0,this.getItemsScrolled=()=>{const t=this.lastScrollTop;if(t<=0)return 0;let s=0,i=0,e=0,r=this.messages.length;for(;s<=r;){if(i=s+r>>>1,e=this.getRangeSize(0,i),e===t)return i;e<t?s=i+1:e>t&&(r=i-1)}return s>0?--s:0},this.getEndByStart=t=>Math.min(t+this.visibleItemsCount,this.messages.length-1),this.scrollToOffset=t=>{this.$listRef&&(this.$listRef.scrollTop=t)},this.scrollToIndex=t=>{if(t>=this.messages.length-1)this.scrollToBottom();else{const s=t<1?0:this.getRangeSize(0,t);this.scrollToOffset(s)}},this.scrollToBottom=()=>{this.$listEndRef&&s((()=>{this.$listEndRef.scrollIntoView(),this.getScrollHeight()-(this.getScrollTop()+this.getClientHeight())>0&&this.scrollToBottomRetries<10?setTimeout((()=>{this.scrollToBottom()}),1e3/60):(this.scrollToBottomRetries=0,this.autoScroll=!0)}))},this.handleScroll=async()=>{if(this.isFetching)return;const t=this.getScrollTop(),s=t<this.lastScrollTop||0===t?"UP":"DOWN";if(this.lastScrollTop=t,this.loadMore&&0===t&&"UP"===s&&!1===this.isFetching){this.isFetching=!0;const t=await this.loadMore(this.messages[0]);t&&t.length&&(this.messages=[...t,...this.messages]),this.isFetching=!1}"UP"===s?this.handleTop():"DOWN"===s&&this.handleBottom()},this.handleTop=()=>{const t=this.getItemsScrolled();if(t<=this.range.end-5&&(this.autoScroll=!1),t>this.range.start+5)return;const s=Math.max(this.range.start-5,0);this.updateVisibleItems(s,this.getEndByStart(s))},this.handleBottom=()=>{if(this.getItemsScrolled()<this.range.start+5)return;const t=this.range.start+5,s=this.getEndByStart(t);this.updateVisibleItems(s===this.messages.length-1?s-this.visibleItemsCount:t,s)},this.updateTotalHeight=h((()=>{this.totalHeight=this.getRangeSize(0,this.messages.length)}),1e3/30,{leading:!0}),this.rendererInternal=(t,s,i)=>{if(!t)return;if(t.dataset.id===s.id)return;const e=this.renderer(s,i);t.hasChildNodes&&(t.innerHTML=""),this.elementObserver.observe(t),t.dataset.id=s.id,t.appendChild(e)}}connectedCallback(){const t=this.messages.length-1;this.range={start:t-this.visibleItemsCount,end:t},this.updateVisibleItems(this.range.start,this.range.end),this.totalHeight=this.getRangeSize(0,t)}componentDidLoad(){this.autoScroll&&this.scrollToBottom()}messagesUpdated(t,s){if(t.length>s.length){const i=t.length-s.length;this.updateVisibleItems(i,this.getEndByStart(i)),this.scrollToIndex(this.range.start)}}saveItemSize(t,s){this.sizes.set(t,Math.round(s)),this.updateTotalHeight()}render(){return i("div",{key:"592cc96edd18a6c3f9bb18650d4a3c0969302ba9",class:"scrollbar content-wrapper",ref:t=>this.$listRef=t,onScroll:this.handleScroll},i("div",{key:"c720432351e2a051502deaeedb10e4d911776d86",class:"scroller"},i("div",{key:"7a7aafb1dc0589059bd467258cf46640f1dc2966",style:{height:`${this.totalHeight}px`}}),i("div",{key:"ee9e8a1819a66d73e67860615f580511ee34b31c",class:"smallest-dom-element",id:"list-end",ref:t=>this.$listEndRef=t})),i("div",{key:"e055b8db2ae6796797074e26f4ca4ef564006ece",class:"content",style:{transform:`translateY(${this.getRangeSize(0,this.range.start)}px)`}},this.isFetching&&i("div",{key:"fea9260948b5127ccd0e510ae55a01f4adbfcbbc",class:"loader"},i("rtk-spinner",{key:"7af2be1f15773fdf4b467d7ceee8902c61cb8ca7",size:"md"})),this.getVisibleItems().map(((t,s)=>i("div",{key:t.id,ref:i=>this.rendererInternal(i,t,s)})))))}static get watchers(){return{messages:["messagesUpdated"]}}};(function(t,s,i,e){var r,h=arguments.length,a=h<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,s,i,e);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(h<3?r(a):h>3?r(s,i,a):r(s,i))||a);h>3&&a&&Object.defineProperty(s,i,a)})([r()],a.prototype,"iconPack",void 0),a.style=":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)))}.loading{cursor:wait}.content-wrapper{height:100%;overflow-y:auto;position:relative;contain:strict}.scroller{width:1px;opacity:0}.content{position:absolute;top:0;width:100%}.smallest-dom-element{width:100%;height:2px;background:red}.loader{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);display:flex;justify-content:center}";export{a as rtk_message_list_view}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as r,H as a}from"./p-0ee570cd.js";import{e as o,i as c}from"./p-25c4d10f.js";import{S as i}from"./p-9b550ec4.js";var s=function(e,t,r,a){var o,c=arguments.length,i=c<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,a);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(c<3?o(i):c>3?o(t,r,i):o(t,r))||i);return c>3&&i&&Object.defineProperty(t,r,i),i};const n=class{constructor(r){e(this,r),this.onDropCallback=t(this,"dropCallback",7),this.iconPack=o,this.t=c(),this.dropzoneActivated=!1}connectedCallback(){if(!this.hostEl)throw new Error("hostEl prop is required");this.hostEl.addEventListener("dragover",(e=>{e.preventDefault(),this.dropzoneActivated=!0})),this.hostEl.addEventListener("dragleave",(()=>{this.dropzoneActivated=!1})),this.hostEl.addEventListener("drop",(e=>{e.preventDefault(),this.dropzoneActivated=!1,this.onDropCallback.emit(e)}))}render(){return r(a,{key:"9525e4e25630d45a8945e0cd169ac7830eb131b2"},r("div",{key:"1be56002e1adecfaf2f9b6216e2551929bcac4e2",id:"dropzone",class:{active:this.dropzoneActivated},part:"dropzone"},r("rtk-icon",{key:"e7d366446b6714ad64d2b95da7f08f67a1429333",icon:this.iconPack.attach}),r("p",{key:"ab3b2e3a048ee8bd812ece1ad5a9afcc03d00c67"},this.t("chat.send_attachment"))))}};s([i()],n.prototype,"iconPack",void 0),s([i()],n.prototype,"t",void 0),n.style="#dropzone{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);z-index:10;display:none;flex-direction:column;align-items:center;justify-content:center;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}#dropzone.active{display:flex;animation:0.2s slide-up ease-in}";export{n as rtk_file_dropzone}
|