@cloudflare/realtimekit-ui 0.0.0 → 1.0.0-staging.2
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/README.md +61 -0
- package/dist/browser.js +1 -0
- package/dist/cjs/ChatHead-94cee2c7.js +46 -0
- package/dist/cjs/ResizeObserver.es-ba961f16.js +930 -0
- package/dist/cjs/TextMessage-4b80b4f5.js +69 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/chat-7e13b43e.js +217 -0
- package/dist/cjs/clone-2e9a4cae.js +754 -0
- package/dist/cjs/config-a123c409.js +1177 -0
- package/dist/cjs/debounce-6080cc73.js +544 -0
- package/dist/cjs/debounce-6dabb441.js +331 -0
- package/dist/cjs/file-33e9ed90.js +61 -0
- package/dist/cjs/floating-ui.dom.esm-c3c35b98.js +1900 -0
- package/dist/cjs/full-screen-de3e9caf.js +55 -0
- package/dist/cjs/grid-edc342a7.js +99 -0
- package/dist/cjs/hark-c97d0a59.js +301 -0
- package/dist/cjs/index-2154d3c1.js +26 -0
- package/dist/cjs/index-333077f7.js +227 -0
- package/dist/cjs/index-d3eba4b9.js +2188 -0
- package/dist/cjs/index.cjs.js +268 -0
- package/dist/cjs/isObjectLike-73d13a39.js +171 -0
- package/dist/cjs/keysIn-8bdbe83d.js +1438 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/logger-3df9c75d.js +5 -0
- package/dist/cjs/notification-30f14d01.js +44 -0
- package/dist/cjs/realtimekit-ui.cjs.js +25 -0
- package/dist/cjs/rtk-ai-toggle.cjs.entry.js +76 -0
- package/dist/cjs/rtk-ai-transcriptions.cjs.entry.js +138 -0
- package/dist/cjs/rtk-ai.cjs.entry.js +91 -0
- package/dist/cjs/rtk-audio-grid.cjs.entry.js +116 -0
- package/dist/cjs/rtk-audio-tile.cjs.entry.js +130 -0
- package/dist/cjs/rtk-audio-visualizer_4.cjs.entry.js +501 -0
- package/dist/cjs/rtk-avatar_54.cjs.entry.js +6355 -0
- package/dist/cjs/rtk-breakout-rooms-toggle.cjs.entry.js +86 -0
- package/dist/cjs/rtk-camera-selector_2.cjs.entry.js +281 -0
- package/dist/cjs/rtk-camera-toggle.cjs.entry.js +186 -0
- package/dist/cjs/rtk-caption-toggle.cjs.entry.js +84 -0
- package/dist/cjs/rtk-channel-selector-ui.cjs.entry.js +147 -0
- package/dist/cjs/rtk-chat-composer-ui.cjs.entry.js +315 -0
- package/dist/cjs/rtk-chat-selector-ui.cjs.entry.js +78 -0
- package/dist/cjs/rtk-chat-toggle.cjs.entry.js +131 -0
- package/dist/cjs/rtk-clock.cjs.entry.js +97 -0
- package/dist/cjs/rtk-controlbar-button.cjs.entry.js +48 -0
- package/dist/cjs/rtk-controlbar.cjs.entry.js +66 -0
- package/dist/cjs/rtk-debugger-toggle.cjs.entry.js +61 -0
- package/dist/cjs/rtk-ended-screen.cjs.entry.js +109 -0
- package/dist/cjs/rtk-file-dropzone.cjs.entry.js +60 -0
- package/dist/cjs/rtk-fullscreen-toggle.cjs.entry.js +86 -0
- package/dist/cjs/rtk-grid-pagination.cjs.entry.js +159 -0
- package/dist/cjs/rtk-grid.cjs.entry.js +362 -0
- package/dist/cjs/rtk-header.cjs.entry.js +66 -0
- package/dist/cjs/rtk-idle-screen.cjs.entry.js +47 -0
- package/dist/cjs/rtk-image-viewer.cjs.entry.js +62 -0
- package/dist/cjs/rtk-information-tooltip.cjs.entry.js +37 -0
- package/dist/cjs/rtk-leave-button.cjs.entry.js +52 -0
- package/dist/cjs/rtk-livestream-indicator_3.cjs.entry.js +29148 -0
- package/dist/cjs/rtk-livestream-toggle.cjs.entry.js +142 -0
- package/dist/cjs/rtk-meeting-title.cjs.entry.js +49 -0
- package/dist/cjs/rtk-message-list-view.cjs.entry.js +285 -0
- package/dist/cjs/rtk-mic-toggle.cjs.entry.js +184 -0
- package/dist/cjs/rtk-mixed-grid.cjs.entry.js +226 -0
- package/dist/cjs/rtk-more-toggle.cjs.entry.js +77 -0
- package/dist/cjs/rtk-mute-all-button.cjs.entry.js +79 -0
- package/dist/cjs/rtk-name-tag.cjs.entry.js +72 -0
- package/dist/cjs/rtk-network-indicator.cjs.entry.js +86 -0
- package/dist/cjs/rtk-participant-count.cjs.entry.js +91 -0
- package/dist/cjs/rtk-participant-setup.cjs.entry.js +118 -0
- package/dist/cjs/rtk-participant_2.cjs.entry.js +419 -0
- package/dist/cjs/rtk-participants-audio.cjs.entry.js +207 -0
- package/dist/cjs/rtk-participants-stage-list_4.cjs.entry.js +467 -0
- package/dist/cjs/rtk-participants-toggle.cjs.entry.js +144 -0
- package/dist/cjs/rtk-participants.cjs.entry.js +190 -0
- package/dist/cjs/rtk-pip-toggle.cjs.entry.js +88 -0
- package/dist/cjs/rtk-plugin-main_2.cjs.entry.js +196 -0
- package/dist/cjs/rtk-plugins-toggle.cjs.entry.js +99 -0
- package/dist/cjs/rtk-plugins_2.cjs.entry.js +181 -0
- package/dist/cjs/rtk-poll_2.cjs.entry.js +142 -0
- package/dist/cjs/rtk-polls-toggle.cjs.entry.js +110 -0
- package/dist/cjs/rtk-recording-indicator.cjs.entry.js +70 -0
- package/dist/cjs/rtk-recording-toggle.cjs.entry.js +162 -0
- package/dist/cjs/rtk-screen-share-toggle.cjs.entry.js +266 -0
- package/dist/cjs/rtk-screenshare-view.cjs.entry.js +149 -0
- package/dist/cjs/rtk-settings-audio_2.cjs.entry.js +150 -0
- package/dist/cjs/rtk-settings-toggle.cjs.entry.js +57 -0
- package/dist/cjs/rtk-settings.cjs.entry.js +124 -0
- package/dist/cjs/rtk-setup-screen.cjs.entry.js +120 -0
- package/dist/cjs/rtk-sidebar-ui.cjs.entry.js +58 -0
- package/dist/cjs/rtk-sidebar.cjs.entry.js +158 -0
- package/dist/cjs/rtk-simple-grid.cjs.entry.js +118 -0
- package/dist/cjs/rtk-spotlight-grid.cjs.entry.js +107 -0
- package/dist/cjs/rtk-spotlight-indicator.cjs.entry.js +85 -0
- package/dist/cjs/rtk-stage-toggle.cjs.entry.js +147 -0
- package/dist/cjs/rtk-stage.cjs.entry.js +43 -0
- package/dist/cjs/rtk-transcript.cjs.entry.js +58 -0
- package/dist/cjs/rtk-transcripts.cjs.entry.js +167 -0
- package/dist/cjs/rtk-ui-provider.cjs.entry.js +168 -0
- package/dist/cjs/rtk-waiting-screen.cjs.entry.js +47 -0
- package/dist/cjs/scroll-c6404609.js +15 -0
- package/dist/cjs/sidebar-864a0b7a.js +50 -0
- package/dist/cjs/size-2a406e36.js +28 -0
- package/dist/cjs/string-a410fab6.js +64 -0
- package/dist/cjs/ui-store-790d3fec.js +1602 -0
- package/dist/collection/collection-manifest.json +149 -0
- package/dist/collection/components/rtk-ai/rtk-ai.css +69 -0
- package/dist/collection/components/rtk-ai/rtk-ai.js +292 -0
- package/dist/collection/components/rtk-ai-toggle/rtk-ai-toggle.css +8 -0
- package/dist/collection/components/rtk-ai-toggle/rtk-ai-toggle.js +257 -0
- package/dist/collection/components/rtk-ai-transcriptions/rtk-ai-transcriptions.css +139 -0
- package/dist/collection/components/rtk-ai-transcriptions/rtk-ai-transcriptions.js +221 -0
- package/dist/collection/components/rtk-audio-grid/rtk-audio-grid.css +102 -0
- package/dist/collection/components/rtk-audio-grid/rtk-audio-grid.js +292 -0
- package/dist/collection/components/rtk-audio-tile/rtk-audio-tile.css +118 -0
- package/dist/collection/components/rtk-audio-tile/rtk-audio-tile.js +308 -0
- package/dist/collection/components/rtk-audio-visualizer/rtk-audio-visualizer.css +46 -0
- package/dist/collection/components/rtk-audio-visualizer/rtk-audio-visualizer.js +324 -0
- package/dist/collection/components/rtk-avatar/rtk-avatar.css +117 -0
- package/dist/collection/components/rtk-avatar/rtk-avatar.js +202 -0
- package/dist/collection/components/rtk-breakout-room-manager/rtk-breakout-room-manager.css +272 -0
- package/dist/collection/components/rtk-breakout-room-manager/rtk-breakout-room-manager.js +509 -0
- package/dist/collection/components/rtk-breakout-room-participants/rtk-breakout-room-participants.css +269 -0
- package/dist/collection/components/rtk-breakout-room-participants/rtk-breakout-room-participants.js +305 -0
- package/dist/collection/components/rtk-breakout-room-toggle/rtk-breakout-rooms-toggle.css +17 -0
- package/dist/collection/components/rtk-breakout-room-toggle/rtk-breakout-rooms-toggle.js +273 -0
- package/dist/collection/components/rtk-breakout-rooms-manager/rtk-breakout-rooms-manager.css +379 -0
- package/dist/collection/components/rtk-breakout-rooms-manager/rtk-breakout-rooms-manager.js +481 -0
- package/dist/collection/components/rtk-broadcast-message-modal/rtk-broadcast-message-modal.css +111 -0
- package/dist/collection/components/rtk-broadcast-message-modal/rtk-broadcast-message-modal.js +198 -0
- package/dist/collection/components/rtk-button/rtk-button.css +185 -0
- package/dist/collection/components/rtk-button/rtk-button.js +197 -0
- package/dist/collection/components/rtk-camera-selector/rtk-camera-selector.css +146 -0
- package/dist/collection/components/rtk-camera-selector/rtk-camera-selector.js +263 -0
- package/dist/collection/components/rtk-camera-toggle/rtk-camera-toggle.css +22 -0
- package/dist/collection/components/rtk-camera-toggle/rtk-camera-toggle.js +350 -0
- package/dist/collection/components/rtk-caption-toggle/rtk-caption-toggle.css +17 -0
- package/dist/collection/components/rtk-caption-toggle/rtk-caption-toggle.js +289 -0
- package/dist/collection/components/rtk-channel-creator/rtk-channel-creator.css +210 -0
- package/dist/collection/components/rtk-channel-creator/rtk-channel-creator.js +287 -0
- package/dist/collection/components/rtk-channel-details/rtk-channel-details.css +93 -0
- package/dist/collection/components/rtk-channel-details/rtk-channel-details.js +148 -0
- package/dist/collection/components/rtk-channel-header/rtk-channel-header.css +99 -0
- package/dist/collection/components/rtk-channel-header/rtk-channel-header.js +255 -0
- package/dist/collection/components/rtk-channel-selector-ui/rtk-channel-selector-ui.css +330 -0
- package/dist/collection/components/rtk-channel-selector-ui/rtk-channel-selector-ui.js +283 -0
- package/dist/collection/components/rtk-channel-selector-view/rtk-channel-selector-view.css +306 -0
- package/dist/collection/components/rtk-channel-selector-view/rtk-channel-selector-view.js +341 -0
- package/dist/collection/components/rtk-chat/components/ChatHead.js +6 -0
- package/dist/collection/components/rtk-chat/rtk-chat.css +224 -0
- package/dist/collection/components/rtk-chat/rtk-chat.js +866 -0
- package/dist/collection/components/rtk-chat-composer-ui/rtk-chat-composer-ui.css +304 -0
- package/dist/collection/components/rtk-chat-composer-ui/rtk-chat-composer-ui.js +583 -0
- package/dist/collection/components/rtk-chat-composer-view/rtk-chat-composer-view.css +111 -0
- package/dist/collection/components/rtk-chat-composer-view/rtk-chat-composer-view.js +535 -0
- package/dist/collection/components/rtk-chat-message/rtk-chat-message.css +428 -0
- package/dist/collection/components/rtk-chat-message/rtk-chat-message.js +569 -0
- package/dist/collection/components/rtk-chat-messages-ui/rtk-chat-messages-ui.css +191 -0
- package/dist/collection/components/rtk-chat-messages-ui/rtk-chat-messages-ui.js +420 -0
- package/dist/collection/components/rtk-chat-messages-ui-paginated/rtk-chat-messages-ui-paginated.css +7 -0
- package/dist/collection/components/rtk-chat-messages-ui-paginated/rtk-chat-messages-ui-paginated.js +465 -0
- package/dist/collection/components/rtk-chat-search-results/rtk-chat-search-results.css +22 -0
- package/dist/collection/components/rtk-chat-search-results/rtk-chat-search-results.js +170 -0
- package/dist/collection/components/rtk-chat-selector-ui/rtk-chat-selector-ui.css +219 -0
- package/dist/collection/components/rtk-chat-selector-ui/rtk-chat-selector-ui.js +245 -0
- package/dist/collection/components/rtk-chat-toggle/rtk-chat-toggle.css +63 -0
- package/dist/collection/components/rtk-chat-toggle/rtk-chat-toggle.js +329 -0
- package/dist/collection/components/rtk-clock/rtk-clock.css +45 -0
- package/dist/collection/components/rtk-clock/rtk-clock.js +162 -0
- package/dist/collection/components/rtk-confirmation-modal/rtk-confirmation-modal.css +72 -0
- package/dist/collection/components/rtk-confirmation-modal/rtk-confirmation-modal.js +198 -0
- package/dist/collection/components/rtk-controlbar/rtk-controlbar.css +32 -0
- package/dist/collection/components/rtk-controlbar/rtk-controlbar.js +259 -0
- package/dist/collection/components/rtk-controlbar-button/rtk-controlbar-button.css +187 -0
- package/dist/collection/components/rtk-controlbar-button/rtk-controlbar-button.js +247 -0
- package/dist/collection/components/rtk-counter/rtk-counter.css +64 -0
- package/dist/collection/components/rtk-counter/rtk-counter.js +219 -0
- package/dist/collection/components/rtk-debugger/rtk-debugger.css +262 -0
- package/dist/collection/components/rtk-debugger/rtk-debugger.js +271 -0
- package/dist/collection/components/rtk-debugger-audio/rtk-debugger-audio.css +180 -0
- package/dist/collection/components/rtk-debugger-audio/rtk-debugger-audio.js +294 -0
- package/dist/collection/components/rtk-debugger-screenshare/rtk-debugger-screenshare.css +175 -0
- package/dist/collection/components/rtk-debugger-screenshare/rtk-debugger-screenshare.js +339 -0
- package/dist/collection/components/rtk-debugger-system/rtk-debugger-system.css +176 -0
- package/dist/collection/components/rtk-debugger-system/rtk-debugger-system.js +260 -0
- package/dist/collection/components/rtk-debugger-toggle/rtk-debugger-toggle.css +17 -0
- package/dist/collection/components/rtk-debugger-toggle/rtk-debugger-toggle.js +234 -0
- package/dist/collection/components/rtk-debugger-video/rtk-debugger-video.css +180 -0
- package/dist/collection/components/rtk-debugger-video/rtk-debugger-video.js +306 -0
- package/dist/collection/components/rtk-dialog/rtk-dialog.css +76 -0
- package/dist/collection/components/rtk-dialog/rtk-dialog.js +307 -0
- package/dist/collection/components/rtk-dialog-manager/rtk-dialog-manager.css +17 -0
- package/dist/collection/components/rtk-dialog-manager/rtk-dialog-manager.js +343 -0
- package/dist/collection/components/rtk-draft-attachment-view/rtk-draft-attachment-view.css +81 -0
- package/dist/collection/components/rtk-draft-attachment-view/rtk-draft-attachment-view.js +180 -0
- package/dist/collection/components/rtk-emoji-picker/rtk-emoji-picker.css +141 -0
- package/dist/collection/components/rtk-emoji-picker/rtk-emoji-picker.js +192 -0
- package/dist/collection/components/rtk-emoji-picker-button/rtk-emoji-picker-button.css +3 -0
- package/dist/collection/components/rtk-emoji-picker-button/rtk-emoji-picker-button.js +113 -0
- package/dist/collection/components/rtk-ended-screen/rtk-ended-screen.css +80 -0
- package/dist/collection/components/rtk-ended-screen/rtk-ended-screen.js +270 -0
- package/dist/collection/components/rtk-file-dropzone/rtk-file-dropzone.css +20 -0
- package/dist/collection/components/rtk-file-dropzone/rtk-file-dropzone.js +162 -0
- package/dist/collection/components/rtk-file-message/rtk-file-message.js +186 -0
- package/dist/collection/components/rtk-file-message-view/rtk-file-message-view.css +76 -0
- package/dist/collection/components/rtk-file-message-view/rtk-file-message-view.js +127 -0
- package/dist/collection/components/rtk-file-picker-button/rtk-file-picker-button.css +3 -0
- package/dist/collection/components/rtk-file-picker-button/rtk-file-picker-button.js +206 -0
- package/dist/collection/components/rtk-fullscreen-toggle/rtk-fullscreen-toggle.css +22 -0
- package/dist/collection/components/rtk-fullscreen-toggle/rtk-fullscreen-toggle.js +268 -0
- package/dist/collection/components/rtk-grid/rtk-grid.css +122 -0
- package/dist/collection/components/rtk-grid/rtk-grid.js +678 -0
- package/dist/collection/components/rtk-grid-pagination/rtk-grid-pagination.css +178 -0
- package/dist/collection/components/rtk-grid-pagination/rtk-grid-pagination.js +327 -0
- package/dist/collection/components/rtk-header/rtk-header.css +35 -0
- package/dist/collection/components/rtk-header/rtk-header.js +259 -0
- package/dist/collection/components/rtk-icon/rtk-icon.css +73 -0
- package/dist/collection/components/rtk-icon/rtk-icon.js +124 -0
- package/dist/collection/components/rtk-idle-screen/rtk-idle-screen.css +40 -0
- package/dist/collection/components/rtk-idle-screen/rtk-idle-screen.js +152 -0
- package/dist/collection/components/rtk-image-message/rtk-image-message.css +21 -0
- package/dist/collection/components/rtk-image-message/rtk-image-message.js +235 -0
- package/dist/collection/components/rtk-image-message-view/rtk-image-message-view.css +117 -0
- package/dist/collection/components/rtk-image-message-view/rtk-image-message-view.js +152 -0
- package/dist/collection/components/rtk-image-viewer/rtk-image-viewer.css +99 -0
- package/dist/collection/components/rtk-image-viewer/rtk-image-viewer.js +183 -0
- package/dist/collection/components/rtk-information-tooltip/rtk-information-tooltip.css +41 -0
- package/dist/collection/components/rtk-information-tooltip/rtk-information-tooltip.js +65 -0
- package/dist/collection/components/rtk-join-stage/rtk-join-stage.css +131 -0
- package/dist/collection/components/rtk-join-stage/rtk-join-stage.js +310 -0
- package/dist/collection/components/rtk-leave-button/rtk-leave-button.css +17 -0
- package/dist/collection/components/rtk-leave-button/rtk-leave-button.js +182 -0
- package/dist/collection/components/rtk-leave-meeting/rtk-leave-meeting.css +75 -0
- package/dist/collection/components/rtk-leave-meeting/rtk-leave-meeting.js +242 -0
- package/dist/collection/components/rtk-livestream-indicator/rtk-livestream-indicator.css +60 -0
- package/dist/collection/components/rtk-livestream-indicator/rtk-livestream-indicator.js +180 -0
- package/dist/collection/components/rtk-livestream-player/rtk-livestream-player.css +177 -0
- package/dist/collection/components/rtk-livestream-player/rtk-livestream-player.js +485 -0
- package/dist/collection/components/rtk-livestream-toggle/rtk-livestream-toggle.css +22 -0
- package/dist/collection/components/rtk-livestream-toggle/rtk-livestream-toggle.js +315 -0
- package/dist/collection/components/rtk-logo/rtk-logo.css +34 -0
- package/dist/collection/components/rtk-logo/rtk-logo.js +177 -0
- package/dist/collection/components/rtk-markdown-view/rtk-markdown-view.css +44 -0
- package/dist/collection/components/rtk-markdown-view/rtk-markdown-view.js +136 -0
- package/dist/collection/components/rtk-meeting/rtk-meeting.css +43 -0
- package/dist/collection/components/rtk-meeting/rtk-meeting.js +520 -0
- package/dist/collection/components/rtk-meeting-title/rtk-meeting-title.css +35 -0
- package/dist/collection/components/rtk-meeting-title/rtk-meeting-title.js +128 -0
- package/dist/collection/components/rtk-menu/rtk-menu.css +25 -0
- package/dist/collection/components/rtk-menu/rtk-menu.js +217 -0
- package/dist/collection/components/rtk-menu-item/rtk-menu-item.css +46 -0
- package/dist/collection/components/rtk-menu-item/rtk-menu-item.js +130 -0
- package/dist/collection/components/rtk-menu-list/rtk-menu-list.css +30 -0
- package/dist/collection/components/rtk-menu-list/rtk-menu-list.js +100 -0
- package/dist/collection/components/rtk-message-list-view/rtk-message-list-view.css +68 -0
- package/dist/collection/components/rtk-message-list-view/rtk-message-list-view.js +439 -0
- package/dist/collection/components/rtk-message-view/rtk-message-view.css +169 -0
- package/dist/collection/components/rtk-message-view/rtk-message-view.js +283 -0
- package/dist/collection/components/rtk-mic-toggle/rtk-mic-toggle.css +27 -0
- package/dist/collection/components/rtk-mic-toggle/rtk-mic-toggle.js +348 -0
- package/dist/collection/components/rtk-microphone-selector/rtk-microphone-selector.css +146 -0
- package/dist/collection/components/rtk-microphone-selector/rtk-microphone-selector.js +276 -0
- package/dist/collection/components/rtk-mixed-grid/rtk-mixed-grid.css +257 -0
- package/dist/collection/components/rtk-mixed-grid/rtk-mixed-grid.js +577 -0
- package/dist/collection/components/rtk-more-toggle/rtk-more-toggle.css +61 -0
- package/dist/collection/components/rtk-more-toggle/rtk-more-toggle.js +210 -0
- package/dist/collection/components/rtk-mute-all-button/rtk-mute-all-button.css +17 -0
- package/dist/collection/components/rtk-mute-all-button/rtk-mute-all-button.js +237 -0
- package/dist/collection/components/rtk-mute-all-confirmation/rtk-mute-all-confirmation.css +74 -0
- package/dist/collection/components/rtk-mute-all-confirmation/rtk-mute-all-confirmation.js +185 -0
- package/dist/collection/components/rtk-name-tag/rtk-name-tag.css +55 -0
- package/dist/collection/components/rtk-name-tag/rtk-name-tag.js +253 -0
- package/dist/collection/components/rtk-network-indicator/rtk-network-indicator.css +68 -0
- package/dist/collection/components/rtk-network-indicator/rtk-network-indicator.js +213 -0
- package/dist/collection/components/rtk-notification/rtk-notification.css +153 -0
- package/dist/collection/components/rtk-notification/rtk-notification.js +196 -0
- package/dist/collection/components/rtk-notifications/rtk-notifications.css +30 -0
- package/dist/collection/components/rtk-notifications/rtk-notifications.js +734 -0
- package/dist/collection/components/rtk-overlay-modal/rtk-overlay-modal.css +41 -0
- package/dist/collection/components/rtk-overlay-modal/rtk-overlay-modal.js +181 -0
- package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.css +337 -0
- package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.js +591 -0
- package/dist/collection/components/rtk-participant/rtk-participant.css +91 -0
- package/dist/collection/components/rtk-participant/rtk-participant.js +503 -0
- package/dist/collection/components/rtk-participant-count/rtk-participant-count.css +41 -0
- package/dist/collection/components/rtk-participant-count/rtk-participant-count.js +205 -0
- package/dist/collection/components/rtk-participant-setup/rtk-participant-setup.css +111 -0
- package/dist/collection/components/rtk-participant-setup/rtk-participant-setup.js +338 -0
- package/dist/collection/components/rtk-participant-tile/rtk-participant-tile.css +283 -0
- package/dist/collection/components/rtk-participant-tile/rtk-participant-tile.js +464 -0
- package/dist/collection/components/rtk-participants/rtk-participants.css +127 -0
- package/dist/collection/components/rtk-participants/rtk-participants.js +404 -0
- package/dist/collection/components/rtk-participants-audio/rtk-participants-audio.css +46 -0
- package/dist/collection/components/rtk-participants-audio/rtk-participants-audio.js +282 -0
- package/dist/collection/components/rtk-participants-stage-list/rtk-participants-stage-list.css +61 -0
- package/dist/collection/components/rtk-participants-stage-list/rtk-participants-stage-list.js +364 -0
- package/dist/collection/components/rtk-participants-stage-queue/rtk-participants-stage-queue.css +116 -0
- package/dist/collection/components/rtk-participants-stage-queue/rtk-participants-stage-queue.js +286 -0
- package/dist/collection/components/rtk-participants-toggle/rtk-participants-toggle.css +48 -0
- package/dist/collection/components/rtk-participants-toggle/rtk-participants-toggle.js +340 -0
- package/dist/collection/components/rtk-participants-viewer-list/rtk-participants-viewer-list.css +58 -0
- package/dist/collection/components/rtk-participants-viewer-list/rtk-participants-viewer-list.js +326 -0
- package/dist/collection/components/rtk-participants-waiting-list/rtk-participants-waiting-list.css +107 -0
- package/dist/collection/components/rtk-participants-waiting-list/rtk-participants-waiting-list.js +263 -0
- package/dist/collection/components/rtk-permissions-message/rtk-permissions-message.css +110 -0
- package/dist/collection/components/rtk-permissions-message/rtk-permissions-message.js +325 -0
- package/dist/collection/components/rtk-pip-toggle/rtk-pip-toggle.css +22 -0
- package/dist/collection/components/rtk-pip-toggle/rtk-pip-toggle.js +293 -0
- package/dist/collection/components/rtk-plugin-main/rtk-plugin-main.css +89 -0
- package/dist/collection/components/rtk-plugin-main/rtk-plugin-main.js +232 -0
- package/dist/collection/components/rtk-plugins/rtk-plugins.css +105 -0
- package/dist/collection/components/rtk-plugins/rtk-plugins.js +251 -0
- package/dist/collection/components/rtk-plugins-toggle/rtk-plugins-toggle.css +22 -0
- package/dist/collection/components/rtk-plugins-toggle/rtk-plugins-toggle.js +292 -0
- package/dist/collection/components/rtk-poll/rtk-poll.css +153 -0
- package/dist/collection/components/rtk-poll/rtk-poll.js +202 -0
- package/dist/collection/components/rtk-poll-form/rtk-poll-form.css +121 -0
- package/dist/collection/components/rtk-poll-form/rtk-poll-form.js +175 -0
- package/dist/collection/components/rtk-polls/rtk-polls.css +69 -0
- package/dist/collection/components/rtk-polls/rtk-polls.js +242 -0
- package/dist/collection/components/rtk-polls-toggle/rtk-polls-toggle.css +49 -0
- package/dist/collection/components/rtk-polls-toggle/rtk-polls-toggle.js +306 -0
- package/dist/collection/components/rtk-recording-indicator/rtk-recording-indicator.css +60 -0
- package/dist/collection/components/rtk-recording-indicator/rtk-recording-indicator.js +184 -0
- package/dist/collection/components/rtk-recording-toggle/rtk-recording-toggle.css +17 -0
- package/dist/collection/components/rtk-recording-toggle/rtk-recording-toggle.js +342 -0
- package/dist/collection/components/rtk-screen-share-toggle/rtk-screen-share-toggle.css +22 -0
- package/dist/collection/components/rtk-screen-share-toggle/rtk-screen-share-toggle.js +470 -0
- package/dist/collection/components/rtk-screenshare-view/rtk-screenshare-view.css +294 -0
- package/dist/collection/components/rtk-screenshare-view/rtk-screenshare-view.js +394 -0
- package/dist/collection/components/rtk-settings/rtk-settings.css +241 -0
- package/dist/collection/components/rtk-settings/rtk-settings.js +286 -0
- package/dist/collection/components/rtk-settings-audio/rtk-settings-audio.css +59 -0
- package/dist/collection/components/rtk-settings-audio/rtk-settings-audio.js +230 -0
- package/dist/collection/components/rtk-settings-toggle/rtk-settings-toggle.css +17 -0
- package/dist/collection/components/rtk-settings-toggle/rtk-settings-toggle.js +216 -0
- package/dist/collection/components/rtk-settings-video/rtk-settings-video.css +135 -0
- package/dist/collection/components/rtk-settings-video/rtk-settings-video.js +256 -0
- package/dist/collection/components/rtk-setup-screen/rtk-setup-screen.css +175 -0
- package/dist/collection/components/rtk-setup-screen/rtk-setup-screen.js +309 -0
- package/dist/collection/components/rtk-sidebar/rtk-sidebar.css +65 -0
- package/dist/collection/components/rtk-sidebar/rtk-sidebar.js +424 -0
- package/dist/collection/components/rtk-sidebar-ui/rtk-sidebar-ui.css +135 -0
- package/dist/collection/components/rtk-sidebar-ui/rtk-sidebar-ui.js +244 -0
- package/dist/collection/components/rtk-simple-grid/rtk-simple-grid.css +20 -0
- package/dist/collection/components/rtk-simple-grid/rtk-simple-grid.js +343 -0
- package/dist/collection/components/rtk-speaker-selector/rtk-speaker-selector.css +144 -0
- package/dist/collection/components/rtk-speaker-selector/rtk-speaker-selector.js +299 -0
- package/dist/collection/components/rtk-spinner/rtk-spinner.css +52 -0
- package/dist/collection/components/rtk-spinner/rtk-spinner.js +99 -0
- package/dist/collection/components/rtk-spotlight-grid/rtk-spotlight-grid.css +88 -0
- package/dist/collection/components/rtk-spotlight-grid/rtk-spotlight-grid.js +402 -0
- package/dist/collection/components/rtk-spotlight-indicator/rtk-spotlight-indicator.css +102 -0
- package/dist/collection/components/rtk-spotlight-indicator/rtk-spotlight-indicator.js +195 -0
- package/dist/collection/components/rtk-stage/rtk-stage.css +19 -0
- package/dist/collection/components/rtk-stage/rtk-stage.js +125 -0
- package/dist/collection/components/rtk-stage-toggle/rtk-stage-toggle.css +22 -0
- package/dist/collection/components/rtk-stage-toggle/rtk-stage-toggle.js +321 -0
- package/dist/collection/components/rtk-switch/rtk-switch.css +51 -0
- package/dist/collection/components/rtk-switch/rtk-switch.js +211 -0
- package/dist/collection/components/rtk-tab-bar/rtk-tab-bar.css +194 -0
- package/dist/collection/components/rtk-tab-bar/rtk-tab-bar.js +330 -0
- package/dist/collection/components/rtk-text-composer-view/rtk-text-composer-view.css +81 -0
- package/dist/collection/components/rtk-text-composer-view/rtk-text-composer-view.js +316 -0
- package/dist/collection/components/rtk-text-message/components/TextMessage.js +62 -0
- package/dist/collection/components/rtk-text-message/rtk-text-message.js +185 -0
- package/dist/collection/components/rtk-text-message-view/rtk-text-message-view.css +25 -0
- package/dist/collection/components/rtk-text-message-view/rtk-text-message-view.js +68 -0
- package/dist/collection/components/rtk-tooltip/rtk-tooltip.css +67 -0
- package/dist/collection/components/rtk-tooltip/rtk-tooltip.js +349 -0
- package/dist/collection/components/rtk-transcript/rtk-transcript.css +96 -0
- package/dist/collection/components/rtk-transcript/rtk-transcript.js +140 -0
- package/dist/collection/components/rtk-transcripts/rtk-transcripts.css +32 -0
- package/dist/collection/components/rtk-transcripts/rtk-transcripts.js +281 -0
- package/dist/collection/components/rtk-ui-provider/rtk-ui-provider.css +5 -0
- package/dist/collection/components/rtk-ui-provider/rtk-ui-provider.js +374 -0
- package/dist/collection/components/rtk-viewer-count/rtk-viewer-count.css +60 -0
- package/dist/collection/components/rtk-viewer-count/rtk-viewer-count.js +191 -0
- package/dist/collection/components/rtk-virtualized-list/rtk-virtualized-participant-list.css +4 -0
- package/dist/collection/components/rtk-virtualized-list/rtk-virtualized-participant-list.js +264 -0
- package/dist/collection/components/rtk-waiting-screen/rtk-waiting-screen.css +45 -0
- package/dist/collection/components/rtk-waiting-screen/rtk-waiting-screen.js +148 -0
- package/dist/collection/exports.js +16 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/lib/addons/index.js +19 -0
- package/dist/collection/lib/audio.js +54 -0
- package/dist/collection/lib/builder/index.js +203 -0
- package/dist/collection/lib/default-ui-config.js +318 -0
- package/dist/collection/lib/grid.js +94 -0
- package/dist/collection/lib/icons/default-icon-pack.js +87 -0
- package/dist/collection/lib/icons/index.js +20 -0
- package/dist/collection/lib/lang/default-language.js +415 -0
- package/dist/collection/lib/lang/index.js +17 -0
- package/dist/collection/lib/notification.js +39 -0
- package/dist/collection/lib/render/index.js +97 -0
- package/dist/collection/lib/render/utils.js +115 -0
- package/dist/collection/lib/visualizer.js +42 -0
- package/dist/collection/theme/colors.js +130 -0
- package/dist/collection/theme/index.js +65 -0
- package/dist/collection/theme/presets/border.js +46 -0
- package/dist/collection/theme/presets/themes.js +35 -0
- package/dist/collection/theme/space.js +17 -0
- package/dist/collection/theme/tests/space.spec.js +17 -0
- package/dist/collection/types/floating-ui.js +1 -0
- package/dist/collection/types/props.js +1 -0
- package/dist/collection/types/rtk-ai.js +1 -0
- package/dist/collection/types/rtk-client.js +10 -0
- package/dist/collection/types/ui-config/config.js +35 -0
- package/dist/collection/types/ui-config/design-tokens.js +1 -0
- package/dist/collection/types/ui-config/index.js +1 -0
- package/dist/collection/types/ui-config/root.js +1 -0
- package/dist/collection/utils/assets.js +13 -0
- package/dist/collection/utils/breakout-rooms-manager.js +299 -0
- package/dist/collection/utils/breakout-rooms.js +69 -0
- package/dist/collection/utils/chat.js +198 -0
- package/dist/collection/utils/clone.js +7 -0
- package/dist/collection/utils/color.js +175 -0
- package/dist/collection/utils/config.js +353 -0
- package/dist/collection/utils/date.js +30 -0
- package/dist/collection/utils/debugger-utils.js +83 -0
- package/dist/collection/utils/file.js +54 -0
- package/dist/collection/utils/flags.js +24 -0
- package/dist/collection/utils/full-screen.js +48 -0
- package/dist/collection/utils/graceful-storage.js +18 -0
- package/dist/collection/utils/livestream.js +100 -0
- package/dist/collection/utils/logger.js +1 -0
- package/dist/collection/utils/notification.js +15 -0
- package/dist/collection/utils/provide-design-system.js +114 -0
- package/dist/collection/utils/scroll.js +11 -0
- package/dist/collection/utils/sidebar.js +42 -0
- package/dist/collection/utils/size.js +14 -0
- package/dist/collection/utils/stage.js +9 -0
- package/dist/collection/utils/string.js +56 -0
- package/dist/collection/utils/sync-with-store/index.js +21 -0
- package/dist/collection/utils/sync-with-store/ui-store.js +56 -0
- package/dist/collection/utils/time.js +9 -0
- package/dist/collection/utils/troubleshooter.js +469 -0
- package/dist/collection/utils/user-prefs.js +20 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +246 -0
- package/dist/components/p-028999b4.js +103 -0
- package/dist/components/p-02f19345.js +50 -0
- package/dist/components/p-0646bdc7.js +227 -0
- package/dist/components/p-0752f2ba.js +13 -0
- package/dist/components/p-09e6eab9.js +125 -0
- package/dist/components/p-0abe4b8a.js +200 -0
- package/dist/components/p-0d6af270.js +42 -0
- package/dist/components/p-0e02697c.js +85 -0
- package/dist/components/p-12aa04c2.js +168 -0
- package/dist/components/p-13ca3cc7.js +148 -0
- package/dist/components/p-158fc95d.js +92 -0
- package/dist/components/p-174eea40.js +149 -0
- package/dist/components/p-1ca992c5.js +95 -0
- package/dist/components/p-1cda12a9.js +11 -0
- package/dist/components/p-1d055d3f.js +57 -0
- package/dist/components/p-1d8ecb94.js +77 -0
- package/dist/components/p-1dcb723e.js +91 -0
- package/dist/components/p-1f633de4.js +101 -0
- package/dist/components/p-212ce4b8.js +95 -0
- package/dist/components/p-22605d4a.js +120 -0
- package/dist/components/p-25969351.js +153 -0
- package/dist/components/p-2c3cda13.js +164 -0
- package/dist/components/p-2f01fa36.js +161 -0
- package/dist/components/p-2f0318c7.js +150 -0
- package/dist/components/p-31964573.js +1892 -0
- package/dist/components/p-338c7261.js +58 -0
- package/dist/components/p-382270d8.js +32 -0
- package/dist/components/p-39af1790.js +316 -0
- package/dist/components/p-3b8741ca.js +67 -0
- package/dist/components/p-3bfd5b6d.js +1638 -0
- package/dist/components/p-3e2ba737.js +29080 -0
- package/dist/components/p-3f882e7c.js +299 -0
- package/dist/components/p-4611af78.js +97 -0
- package/dist/components/p-46923b34.js +1409 -0
- package/dist/components/p-46ab4375.js +180 -0
- package/dist/components/p-46ff9ad9.js +114 -0
- package/dist/components/p-483752a4.js +178 -0
- package/dist/components/p-4b5caa33.js +125 -0
- package/dist/components/p-512c3bef.js +156 -0
- package/dist/components/p-51b56b52.js +159 -0
- package/dist/components/p-53b020e2.js +1538 -0
- package/dist/components/p-550aa089.js +1172 -0
- package/dist/components/p-5605a420.js +3 -0
- package/dist/components/p-5c0da120.js +182 -0
- package/dist/components/p-5d2cf697.js +76 -0
- package/dist/components/p-60db99e3.js +215 -0
- package/dist/components/p-613b7d98.js +353 -0
- package/dist/components/p-624f14ef.js +951 -0
- package/dist/components/p-63e92eda.js +264 -0
- package/dist/components/p-641ba920.js +61 -0
- package/dist/components/p-6453124f.js +211 -0
- package/dist/components/p-64a6ea33.js +194 -0
- package/dist/components/p-65bf60df.js +81 -0
- package/dist/components/p-6fa3c2fa.js +93 -0
- package/dist/components/p-71133697.js +112 -0
- package/dist/components/p-746ae804.js +103 -0
- package/dist/components/p-749efee6.js +85 -0
- package/dist/components/p-77167e1b.js +162 -0
- package/dist/components/p-78349933.js +213 -0
- package/dist/components/p-7ad5bf75.js +82 -0
- package/dist/components/p-82fbdbf4.js +105 -0
- package/dist/components/p-87480646.js +309 -0
- package/dist/components/p-87d8706e.js +114 -0
- package/dist/components/p-89bbfe71.js +203 -0
- package/dist/components/p-906cb5bf.js +82 -0
- package/dist/components/p-90bd27de.js +199 -0
- package/dist/components/p-915562c0.js +307 -0
- package/dist/components/p-9217dbe9.js +115 -0
- package/dist/components/p-94443423.js +45 -0
- package/dist/components/p-963d619f.js +626 -0
- package/dist/components/p-96be234f.js +26 -0
- package/dist/components/p-971097d5.js +108 -0
- package/dist/components/p-98ae3e41.js +86 -0
- package/dist/components/p-9c2796e3.js +68 -0
- package/dist/components/p-9fc565cf.js +57 -0
- package/dist/components/p-a08b5a59.js +329 -0
- package/dist/components/p-a4182a97.js +118 -0
- package/dist/components/p-a83ccdbd.js +40 -0
- package/dist/components/p-abbbb5f3.js +69 -0
- package/dist/components/p-ad50fcdc.js +95 -0
- package/dist/components/p-ae1931dd.js +79 -0
- package/dist/components/p-aec1ab2d.js +96 -0
- package/dist/components/p-b13ddb7d.js +96 -0
- package/dist/components/p-ba1a0ebf.js +63 -0
- package/dist/components/p-baea3e90.js +119 -0
- package/dist/components/p-bb4322af.js +131 -0
- package/dist/components/p-bb7c5e38.js +134 -0
- package/dist/components/p-bc68e74e.js +128 -0
- package/dist/components/p-bed2e1b5.js +62 -0
- package/dist/components/p-bffc1ba5.js +155 -0
- package/dist/components/p-c15d924f.js +752 -0
- package/dist/components/p-c4482ff1.js +157 -0
- package/dist/components/p-c8a6dfb8.js +305 -0
- package/dist/components/p-cbdd7a99.js +542 -0
- package/dist/components/p-cdfe8250.js +390 -0
- package/dist/components/p-d17beb97.js +223 -0
- package/dist/components/p-d978ca76.js +124 -0
- package/dist/components/p-da00b09a.js +148 -0
- package/dist/components/p-dca85942.js +108 -0
- package/dist/components/p-de7f1269.js +224 -0
- package/dist/components/p-df1632fd.js +204 -0
- package/dist/components/p-df6f9a3f.js +24 -0
- package/dist/components/p-eb0fc611.js +43 -0
- package/dist/components/p-eebae590.js +357 -0
- package/dist/components/p-efc19d8d.js +63 -0
- package/dist/components/p-f22929f5.js +105 -0
- package/dist/components/p-f47d4fe8.js +928 -0
- package/dist/components/p-f5e4f0bb.js +168 -0
- package/dist/components/p-f9aece94.js +96 -0
- package/dist/components/p-fb535f2c.js +157 -0
- package/dist/components/p-fd0abb3e.js +134 -0
- package/dist/components/rtk-ai-toggle.d.ts +11 -0
- package/dist/components/rtk-ai-toggle.js +119 -0
- package/dist/components/rtk-ai-transcriptions.d.ts +11 -0
- package/dist/components/rtk-ai-transcriptions.js +6 -0
- package/dist/components/rtk-ai.d.ts +11 -0
- package/dist/components/rtk-ai.js +134 -0
- package/dist/components/rtk-audio-grid.d.ts +11 -0
- package/dist/components/rtk-audio-grid.js +145 -0
- package/dist/components/rtk-audio-tile.d.ts +11 -0
- package/dist/components/rtk-audio-tile.js +182 -0
- package/dist/components/rtk-audio-visualizer.d.ts +11 -0
- package/dist/components/rtk-audio-visualizer.js +6 -0
- package/dist/components/rtk-avatar.d.ts +11 -0
- package/dist/components/rtk-avatar.js +6 -0
- package/dist/components/rtk-breakout-room-manager.d.ts +11 -0
- package/dist/components/rtk-breakout-room-manager.js +6 -0
- package/dist/components/rtk-breakout-room-participants.d.ts +11 -0
- package/dist/components/rtk-breakout-room-participants.js +6 -0
- package/dist/components/rtk-breakout-rooms-manager.d.ts +11 -0
- package/dist/components/rtk-breakout-rooms-manager.js +6 -0
- package/dist/components/rtk-breakout-rooms-toggle.d.ts +11 -0
- package/dist/components/rtk-breakout-rooms-toggle.js +129 -0
- package/dist/components/rtk-broadcast-message-modal.d.ts +11 -0
- package/dist/components/rtk-broadcast-message-modal.js +6 -0
- package/dist/components/rtk-button.d.ts +11 -0
- package/dist/components/rtk-button.js +6 -0
- package/dist/components/rtk-camera-selector.d.ts +11 -0
- package/dist/components/rtk-camera-selector.js +6 -0
- package/dist/components/rtk-camera-toggle.d.ts +11 -0
- package/dist/components/rtk-camera-toggle.js +237 -0
- package/dist/components/rtk-caption-toggle.d.ts +11 -0
- package/dist/components/rtk-caption-toggle.js +129 -0
- package/dist/components/rtk-channel-creator.d.ts +11 -0
- package/dist/components/rtk-channel-creator.js +6 -0
- package/dist/components/rtk-channel-details.d.ts +11 -0
- package/dist/components/rtk-channel-details.js +6 -0
- package/dist/components/rtk-channel-header.d.ts +11 -0
- package/dist/components/rtk-channel-header.js +6 -0
- package/dist/components/rtk-channel-selector-ui.d.ts +11 -0
- package/dist/components/rtk-channel-selector-ui.js +194 -0
- package/dist/components/rtk-channel-selector-view.d.ts +11 -0
- package/dist/components/rtk-channel-selector-view.js +6 -0
- package/dist/components/rtk-chat-composer-ui.d.ts +11 -0
- package/dist/components/rtk-chat-composer-ui.js +383 -0
- package/dist/components/rtk-chat-composer-view.d.ts +11 -0
- package/dist/components/rtk-chat-composer-view.js +6 -0
- package/dist/components/rtk-chat-message.d.ts +11 -0
- package/dist/components/rtk-chat-message.js +6 -0
- package/dist/components/rtk-chat-messages-ui-paginated.d.ts +11 -0
- package/dist/components/rtk-chat-messages-ui-paginated.js +6 -0
- package/dist/components/rtk-chat-messages-ui.d.ts +11 -0
- package/dist/components/rtk-chat-messages-ui.js +6 -0
- package/dist/components/rtk-chat-search-results.d.ts +11 -0
- package/dist/components/rtk-chat-search-results.js +6 -0
- package/dist/components/rtk-chat-selector-ui.d.ts +11 -0
- package/dist/components/rtk-chat-selector-ui.js +108 -0
- package/dist/components/rtk-chat-toggle.d.ts +11 -0
- package/dist/components/rtk-chat-toggle.js +178 -0
- package/dist/components/rtk-chat.d.ts +11 -0
- package/dist/components/rtk-chat.js +6 -0
- package/dist/components/rtk-clock.d.ts +11 -0
- package/dist/components/rtk-clock.js +126 -0
- package/dist/components/rtk-confirmation-modal.d.ts +11 -0
- package/dist/components/rtk-confirmation-modal.js +6 -0
- package/dist/components/rtk-controlbar-button.d.ts +11 -0
- package/dist/components/rtk-controlbar-button.js +6 -0
- package/dist/components/rtk-controlbar.d.ts +11 -0
- package/dist/components/rtk-controlbar.js +91 -0
- package/dist/components/rtk-counter.d.ts +11 -0
- package/dist/components/rtk-counter.js +6 -0
- package/dist/components/rtk-debugger-audio.d.ts +11 -0
- package/dist/components/rtk-debugger-audio.js +6 -0
- package/dist/components/rtk-debugger-screenshare.d.ts +11 -0
- package/dist/components/rtk-debugger-screenshare.js +6 -0
- package/dist/components/rtk-debugger-system.d.ts +11 -0
- package/dist/components/rtk-debugger-system.js +6 -0
- package/dist/components/rtk-debugger-toggle.d.ts +11 -0
- package/dist/components/rtk-debugger-toggle.js +101 -0
- package/dist/components/rtk-debugger-video.d.ts +11 -0
- package/dist/components/rtk-debugger-video.js +6 -0
- package/dist/components/rtk-debugger.d.ts +11 -0
- package/dist/components/rtk-debugger.js +6 -0
- package/dist/components/rtk-dialog-manager.d.ts +11 -0
- package/dist/components/rtk-dialog-manager.js +6 -0
- package/dist/components/rtk-dialog.d.ts +11 -0
- package/dist/components/rtk-dialog.js +6 -0
- package/dist/components/rtk-draft-attachment-view.d.ts +11 -0
- package/dist/components/rtk-draft-attachment-view.js +6 -0
- package/dist/components/rtk-emoji-picker-button.d.ts +11 -0
- package/dist/components/rtk-emoji-picker-button.js +6 -0
- package/dist/components/rtk-emoji-picker.d.ts +11 -0
- package/dist/components/rtk-emoji-picker.js +6 -0
- package/dist/components/rtk-ended-screen.d.ts +11 -0
- package/dist/components/rtk-ended-screen.js +148 -0
- package/dist/components/rtk-file-dropzone.d.ts +11 -0
- package/dist/components/rtk-file-dropzone.js +87 -0
- package/dist/components/rtk-file-message-view.d.ts +11 -0
- package/dist/components/rtk-file-message-view.js +6 -0
- package/dist/components/rtk-file-message.d.ts +11 -0
- package/dist/components/rtk-file-message.js +6 -0
- package/dist/components/rtk-file-picker-button.d.ts +11 -0
- package/dist/components/rtk-file-picker-button.js +6 -0
- package/dist/components/rtk-fullscreen-toggle.d.ts +11 -0
- package/dist/components/rtk-fullscreen-toggle.js +6 -0
- package/dist/components/rtk-grid-pagination.d.ts +11 -0
- package/dist/components/rtk-grid-pagination.js +207 -0
- package/dist/components/rtk-grid.d.ts +11 -0
- package/dist/components/rtk-grid.js +454 -0
- package/dist/components/rtk-header.d.ts +11 -0
- package/dist/components/rtk-header.js +91 -0
- package/dist/components/rtk-icon.d.ts +11 -0
- package/dist/components/rtk-icon.js +6 -0
- package/dist/components/rtk-idle-screen.d.ts +11 -0
- package/dist/components/rtk-idle-screen.js +86 -0
- package/dist/components/rtk-image-message-view.d.ts +11 -0
- package/dist/components/rtk-image-message-view.js +6 -0
- package/dist/components/rtk-image-message.d.ts +11 -0
- package/dist/components/rtk-image-message.js +6 -0
- package/dist/components/rtk-image-viewer.d.ts +11 -0
- package/dist/components/rtk-image-viewer.js +94 -0
- package/dist/components/rtk-information-tooltip.d.ts +11 -0
- package/dist/components/rtk-information-tooltip.js +61 -0
- package/dist/components/rtk-join-stage.d.ts +11 -0
- package/dist/components/rtk-join-stage.js +6 -0
- package/dist/components/rtk-leave-button.d.ts +11 -0
- package/dist/components/rtk-leave-button.js +90 -0
- package/dist/components/rtk-leave-meeting.d.ts +11 -0
- package/dist/components/rtk-leave-meeting.js +6 -0
- package/dist/components/rtk-livestream-indicator.d.ts +11 -0
- package/dist/components/rtk-livestream-indicator.js +6 -0
- package/dist/components/rtk-livestream-player.d.ts +11 -0
- package/dist/components/rtk-livestream-player.js +6 -0
- package/dist/components/rtk-livestream-toggle.d.ts +11 -0
- package/dist/components/rtk-livestream-toggle.js +184 -0
- package/dist/components/rtk-logo.d.ts +11 -0
- package/dist/components/rtk-logo.js +6 -0
- package/dist/components/rtk-markdown-view.d.ts +11 -0
- package/dist/components/rtk-markdown-view.js +6 -0
- package/dist/components/rtk-meeting-title.d.ts +11 -0
- package/dist/components/rtk-meeting-title.js +74 -0
- package/dist/components/rtk-meeting.d.ts +11 -0
- package/dist/components/rtk-meeting.js +566 -0
- package/dist/components/rtk-menu-item.d.ts +11 -0
- package/dist/components/rtk-menu-item.js +6 -0
- package/dist/components/rtk-menu-list.d.ts +11 -0
- package/dist/components/rtk-menu-list.js +6 -0
- package/dist/components/rtk-menu.d.ts +11 -0
- package/dist/components/rtk-menu.js +6 -0
- package/dist/components/rtk-message-list-view.d.ts +11 -0
- package/dist/components/rtk-message-list-view.js +324 -0
- package/dist/components/rtk-message-view.d.ts +11 -0
- package/dist/components/rtk-message-view.js +6 -0
- package/dist/components/rtk-mic-toggle.d.ts +11 -0
- package/dist/components/rtk-mic-toggle.js +235 -0
- package/dist/components/rtk-microphone-selector.d.ts +11 -0
- package/dist/components/rtk-microphone-selector.js +6 -0
- package/dist/components/rtk-mixed-grid.d.ts +11 -0
- package/dist/components/rtk-mixed-grid.js +298 -0
- package/dist/components/rtk-more-toggle.d.ts +11 -0
- package/dist/components/rtk-more-toggle.js +115 -0
- package/dist/components/rtk-mute-all-button.d.ts +11 -0
- package/dist/components/rtk-mute-all-button.js +128 -0
- package/dist/components/rtk-mute-all-confirmation.d.ts +11 -0
- package/dist/components/rtk-mute-all-confirmation.js +6 -0
- package/dist/components/rtk-name-tag.d.ts +11 -0
- package/dist/components/rtk-name-tag.js +6 -0
- package/dist/components/rtk-network-indicator.d.ts +11 -0
- package/dist/components/rtk-network-indicator.js +117 -0
- package/dist/components/rtk-notification.d.ts +11 -0
- package/dist/components/rtk-notification.js +6 -0
- package/dist/components/rtk-notifications.d.ts +11 -0
- package/dist/components/rtk-notifications.js +6 -0
- package/dist/components/rtk-overlay-modal.d.ts +11 -0
- package/dist/components/rtk-overlay-modal.js +6 -0
- package/dist/components/rtk-paginated-list.d.ts +11 -0
- package/dist/components/rtk-paginated-list.js +6 -0
- package/dist/components/rtk-participant-count.d.ts +11 -0
- package/dist/components/rtk-participant-count.js +121 -0
- package/dist/components/rtk-participant-setup.d.ts +11 -0
- package/dist/components/rtk-participant-setup.js +149 -0
- package/dist/components/rtk-participant-tile.d.ts +11 -0
- package/dist/components/rtk-participant-tile.js +6 -0
- package/dist/components/rtk-participant.d.ts +11 -0
- package/dist/components/rtk-participant.js +6 -0
- package/dist/components/rtk-participants-audio.d.ts +11 -0
- package/dist/components/rtk-participants-audio.js +248 -0
- package/dist/components/rtk-participants-stage-list.d.ts +11 -0
- package/dist/components/rtk-participants-stage-list.js +6 -0
- package/dist/components/rtk-participants-stage-queue.d.ts +11 -0
- package/dist/components/rtk-participants-stage-queue.js +6 -0
- package/dist/components/rtk-participants-toggle.d.ts +11 -0
- package/dist/components/rtk-participants-toggle.js +192 -0
- package/dist/components/rtk-participants-viewer-list.d.ts +11 -0
- package/dist/components/rtk-participants-viewer-list.js +6 -0
- package/dist/components/rtk-participants-waiting-list.d.ts +11 -0
- package/dist/components/rtk-participants-waiting-list.js +6 -0
- package/dist/components/rtk-participants.d.ts +11 -0
- package/dist/components/rtk-participants.js +304 -0
- package/dist/components/rtk-permissions-message.d.ts +11 -0
- package/dist/components/rtk-permissions-message.js +6 -0
- package/dist/components/rtk-pip-toggle.d.ts +11 -0
- package/dist/components/rtk-pip-toggle.js +133 -0
- package/dist/components/rtk-plugin-main.d.ts +11 -0
- package/dist/components/rtk-plugin-main.js +6 -0
- package/dist/components/rtk-plugins-toggle.d.ts +11 -0
- package/dist/components/rtk-plugins-toggle.js +144 -0
- package/dist/components/rtk-plugins.d.ts +11 -0
- package/dist/components/rtk-plugins.js +6 -0
- package/dist/components/rtk-poll-form.d.ts +11 -0
- package/dist/components/rtk-poll-form.js +6 -0
- package/dist/components/rtk-poll.d.ts +11 -0
- package/dist/components/rtk-poll.js +6 -0
- package/dist/components/rtk-polls-toggle.d.ts +11 -0
- package/dist/components/rtk-polls-toggle.js +156 -0
- package/dist/components/rtk-polls.d.ts +11 -0
- package/dist/components/rtk-polls.js +6 -0
- package/dist/components/rtk-recording-indicator.d.ts +11 -0
- package/dist/components/rtk-recording-indicator.js +99 -0
- package/dist/components/rtk-recording-toggle.d.ts +11 -0
- package/dist/components/rtk-recording-toggle.js +206 -0
- package/dist/components/rtk-screen-share-toggle.d.ts +11 -0
- package/dist/components/rtk-screen-share-toggle.js +321 -0
- package/dist/components/rtk-screenshare-view.d.ts +11 -0
- package/dist/components/rtk-screenshare-view.js +197 -0
- package/dist/components/rtk-settings-audio.d.ts +11 -0
- package/dist/components/rtk-settings-audio.js +6 -0
- package/dist/components/rtk-settings-toggle.d.ts +11 -0
- package/dist/components/rtk-settings-toggle.js +96 -0
- package/dist/components/rtk-settings-video.d.ts +11 -0
- package/dist/components/rtk-settings-video.js +6 -0
- package/dist/components/rtk-settings.d.ts +11 -0
- package/dist/components/rtk-settings.js +211 -0
- package/dist/components/rtk-setup-screen.d.ts +11 -0
- package/dist/components/rtk-setup-screen.js +186 -0
- package/dist/components/rtk-sidebar-ui.d.ts +11 -0
- package/dist/components/rtk-sidebar-ui.js +6 -0
- package/dist/components/rtk-sidebar.d.ts +11 -0
- package/dist/components/rtk-sidebar.js +238 -0
- package/dist/components/rtk-simple-grid.d.ts +11 -0
- package/dist/components/rtk-simple-grid.js +147 -0
- package/dist/components/rtk-speaker-selector.d.ts +11 -0
- package/dist/components/rtk-speaker-selector.js +6 -0
- package/dist/components/rtk-spinner.d.ts +11 -0
- package/dist/components/rtk-spinner.js +6 -0
- package/dist/components/rtk-spotlight-grid.d.ts +11 -0
- package/dist/components/rtk-spotlight-grid.js +135 -0
- package/dist/components/rtk-spotlight-indicator.d.ts +11 -0
- package/dist/components/rtk-spotlight-indicator.js +6 -0
- package/dist/components/rtk-stage-toggle.d.ts +11 -0
- package/dist/components/rtk-stage-toggle.js +198 -0
- package/dist/components/rtk-stage.d.ts +11 -0
- package/dist/components/rtk-stage.js +61 -0
- package/dist/components/rtk-switch.d.ts +11 -0
- package/dist/components/rtk-switch.js +6 -0
- package/dist/components/rtk-tab-bar.d.ts +11 -0
- package/dist/components/rtk-tab-bar.js +6 -0
- package/dist/components/rtk-text-composer-view.d.ts +11 -0
- package/dist/components/rtk-text-composer-view.js +6 -0
- package/dist/components/rtk-text-message-view.d.ts +11 -0
- package/dist/components/rtk-text-message-view.js +6 -0
- package/dist/components/rtk-text-message.d.ts +11 -0
- package/dist/components/rtk-text-message.js +6 -0
- package/dist/components/rtk-tooltip.d.ts +11 -0
- package/dist/components/rtk-tooltip.js +6 -0
- package/dist/components/rtk-transcript.d.ts +11 -0
- package/dist/components/rtk-transcript.js +6 -0
- package/dist/components/rtk-transcripts.d.ts +11 -0
- package/dist/components/rtk-transcripts.js +197 -0
- package/dist/components/rtk-ui-provider.d.ts +11 -0
- package/dist/components/rtk-ui-provider.js +195 -0
- package/dist/components/rtk-viewer-count.d.ts +11 -0
- package/dist/components/rtk-viewer-count.js +6 -0
- package/dist/components/rtk-virtualized-participant-list.d.ts +11 -0
- package/dist/components/rtk-virtualized-participant-list.js +6 -0
- package/dist/components/rtk-waiting-screen.d.ts +11 -0
- package/dist/components/rtk-waiting-screen.js +74 -0
- package/dist/docs/docs-components.d.ts +443 -0
- package/dist/docs/docs-components.json +239216 -0
- package/dist/docs/docs-vscode.json +4421 -0
- package/dist/esm/ChatHead-4ef9f354.js +41 -0
- package/dist/esm/ResizeObserver.es-02979d4e.js +928 -0
- package/dist/esm/TextMessage-0683cfdd.js +67 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/chat-d82f457b.js +200 -0
- package/dist/esm/clone-acd4af50.js +752 -0
- package/dist/esm/config-233d8f24.js +1172 -0
- package/dist/esm/debounce-0169a54d.js +542 -0
- package/dist/esm/debounce-ea0579b2.js +329 -0
- package/dist/esm/file-1d408324.js +57 -0
- package/dist/esm/floating-ui.dom.esm-cf1488a2.js +1892 -0
- package/dist/esm/full-screen-1f58c594.js +50 -0
- package/dist/esm/grid-a3ca5a3e.js +96 -0
- package/dist/esm/hark-6327d91e.js +299 -0
- package/dist/esm/index-25a91036.js +2155 -0
- package/dist/esm/index-27e158ce.js +24 -0
- package/dist/esm/index-3f9d8968.js +224 -0
- package/dist/esm/index.js +249 -0
- package/dist/esm/isObjectLike-773b9473.js +164 -0
- package/dist/esm/keysIn-310f65c1.js +1409 -0
- package/dist/esm/loader.js +56184 -0
- package/dist/esm/logger-31448943.js +3 -0
- package/dist/esm/notification-90f2d20b.js +42 -0
- package/dist/esm/realtimekit-ui.js +20 -0
- package/dist/esm/rtk-ai-toggle.entry.js +72 -0
- package/dist/esm/rtk-ai-transcriptions.entry.js +134 -0
- package/dist/esm/rtk-ai.entry.js +87 -0
- package/dist/esm/rtk-audio-grid.entry.js +112 -0
- package/dist/esm/rtk-audio-tile.entry.js +126 -0
- package/dist/esm/rtk-audio-visualizer_4.entry.js +494 -0
- package/dist/esm/rtk-avatar_54.entry.js +6298 -0
- package/dist/esm/rtk-breakout-rooms-toggle.entry.js +82 -0
- package/dist/esm/rtk-camera-selector_2.entry.js +276 -0
- package/dist/esm/rtk-camera-toggle.entry.js +182 -0
- package/dist/esm/rtk-caption-toggle.entry.js +80 -0
- package/dist/esm/rtk-channel-selector-ui.entry.js +143 -0
- package/dist/esm/rtk-chat-composer-ui.entry.js +311 -0
- package/dist/esm/rtk-chat-selector-ui.entry.js +74 -0
- package/dist/esm/rtk-chat-toggle.entry.js +127 -0
- package/dist/esm/rtk-clock.entry.js +93 -0
- package/dist/esm/rtk-controlbar-button.entry.js +44 -0
- package/dist/esm/rtk-controlbar.entry.js +62 -0
- package/dist/esm/rtk-debugger-toggle.entry.js +57 -0
- package/dist/esm/rtk-ended-screen.entry.js +105 -0
- package/dist/esm/rtk-file-dropzone.entry.js +56 -0
- package/dist/esm/rtk-fullscreen-toggle.entry.js +82 -0
- package/dist/esm/rtk-grid-pagination.entry.js +155 -0
- package/dist/esm/rtk-grid.entry.js +358 -0
- package/dist/esm/rtk-header.entry.js +62 -0
- package/dist/esm/rtk-idle-screen.entry.js +43 -0
- package/dist/esm/rtk-image-viewer.entry.js +58 -0
- package/dist/esm/rtk-information-tooltip.entry.js +33 -0
- package/dist/esm/rtk-leave-button.entry.js +48 -0
- package/dist/esm/rtk-livestream-indicator_3.entry.js +29142 -0
- package/dist/esm/rtk-livestream-toggle.entry.js +138 -0
- package/dist/esm/rtk-meeting-title.entry.js +45 -0
- package/dist/esm/rtk-message-list-view.entry.js +281 -0
- package/dist/esm/rtk-mic-toggle.entry.js +180 -0
- package/dist/esm/rtk-mixed-grid.entry.js +222 -0
- package/dist/esm/rtk-more-toggle.entry.js +73 -0
- package/dist/esm/rtk-mute-all-button.entry.js +75 -0
- package/dist/esm/rtk-name-tag.entry.js +68 -0
- package/dist/esm/rtk-network-indicator.entry.js +82 -0
- package/dist/esm/rtk-participant-count.entry.js +87 -0
- package/dist/esm/rtk-participant-setup.entry.js +114 -0
- package/dist/esm/rtk-participant_2.entry.js +414 -0
- package/dist/esm/rtk-participants-audio.entry.js +203 -0
- package/dist/esm/rtk-participants-stage-list_4.entry.js +460 -0
- package/dist/esm/rtk-participants-toggle.entry.js +140 -0
- package/dist/esm/rtk-participants.entry.js +186 -0
- package/dist/esm/rtk-pip-toggle.entry.js +84 -0
- package/dist/esm/rtk-plugin-main_2.entry.js +191 -0
- package/dist/esm/rtk-plugins-toggle.entry.js +95 -0
- package/dist/esm/rtk-plugins_2.entry.js +176 -0
- package/dist/esm/rtk-poll_2.entry.js +137 -0
- package/dist/esm/rtk-polls-toggle.entry.js +106 -0
- package/dist/esm/rtk-recording-indicator.entry.js +66 -0
- package/dist/esm/rtk-recording-toggle.entry.js +158 -0
- package/dist/esm/rtk-screen-share-toggle.entry.js +262 -0
- package/dist/esm/rtk-screenshare-view.entry.js +145 -0
- package/dist/esm/rtk-settings-audio_2.entry.js +145 -0
- package/dist/esm/rtk-settings-toggle.entry.js +53 -0
- package/dist/esm/rtk-settings.entry.js +120 -0
- package/dist/esm/rtk-setup-screen.entry.js +116 -0
- package/dist/esm/rtk-sidebar-ui.entry.js +54 -0
- package/dist/esm/rtk-sidebar.entry.js +154 -0
- package/dist/esm/rtk-simple-grid.entry.js +114 -0
- package/dist/esm/rtk-spotlight-grid.entry.js +103 -0
- package/dist/esm/rtk-spotlight-indicator.entry.js +81 -0
- package/dist/esm/rtk-stage-toggle.entry.js +143 -0
- package/dist/esm/rtk-stage.entry.js +39 -0
- package/dist/esm/rtk-transcript.entry.js +54 -0
- package/dist/esm/rtk-transcripts.entry.js +163 -0
- package/dist/esm/rtk-ui-provider.entry.js +164 -0
- package/dist/esm/rtk-waiting-screen.entry.js +43 -0
- package/dist/esm/scroll-2d8e810c.js +13 -0
- package/dist/esm/sidebar-aa5e43a2.js +45 -0
- package/dist/esm/size-505ade24.js +26 -0
- package/dist/esm/string-ed1380fb.js +58 -0
- package/dist/esm/ui-store-5383d525.js +1576 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/realtimekit-ui/index.esm.js +1 -0
- package/dist/realtimekit-ui/p-0218a56b.js +1 -0
- package/dist/realtimekit-ui/p-02f19345.js +1 -0
- package/dist/realtimekit-ui/p-0336caf2.entry.js +1 -0
- package/dist/realtimekit-ui/p-03ac511d.entry.js +1 -0
- package/dist/realtimekit-ui/p-06f1ed80.entry.js +1 -0
- package/dist/realtimekit-ui/p-0752f2ba.js +1 -0
- package/dist/realtimekit-ui/p-0c011730.entry.js +1 -0
- package/dist/realtimekit-ui/p-0d9929ac.js +1 -0
- package/dist/realtimekit-ui/p-0e8213ad.entry.js +1 -0
- package/dist/realtimekit-ui/p-0ec000c9.entry.js +1 -0
- package/dist/realtimekit-ui/p-0f5a23ce.entry.js +1 -0
- package/dist/realtimekit-ui/p-1206b9a4.entry.js +1 -0
- package/dist/realtimekit-ui/p-1567a135.js +1 -0
- package/dist/realtimekit-ui/p-15b14b92.entry.js +1 -0
- package/dist/realtimekit-ui/p-1b0b0f2d.js +1 -0
- package/dist/realtimekit-ui/p-1be4070c.entry.js +1 -0
- package/dist/realtimekit-ui/p-1fac5c7d.entry.js +1 -0
- package/dist/realtimekit-ui/p-24905c85.entry.js +1 -0
- package/dist/realtimekit-ui/p-2573cda1.entry.js +1 -0
- package/dist/realtimekit-ui/p-2738468d.entry.js +1 -0
- package/dist/realtimekit-ui/p-2c3cda13.js +1 -0
- package/dist/realtimekit-ui/p-31964573.js +1 -0
- package/dist/realtimekit-ui/p-31cb9664.entry.js +1 -0
- package/dist/realtimekit-ui/p-3207575b.entry.js +1 -0
- package/dist/realtimekit-ui/p-338c7261.js +1 -0
- package/dist/realtimekit-ui/p-36990601.entry.js +1 -0
- package/dist/realtimekit-ui/p-3cf531c1.js +1 -0
- package/dist/realtimekit-ui/p-3e83ff84.js +1 -0
- package/dist/realtimekit-ui/p-3f882e7c.js +1 -0
- package/dist/realtimekit-ui/p-46923b34.js +1 -0
- package/dist/realtimekit-ui/p-46c3367c.entry.js +1 -0
- package/dist/realtimekit-ui/p-46ea4a0d.entry.js +1 -0
- package/dist/realtimekit-ui/p-4caa353f.entry.js +1 -0
- package/dist/realtimekit-ui/p-533ce032.entry.js +1 -0
- package/dist/realtimekit-ui/p-533ecbf2.js +2 -0
- package/dist/realtimekit-ui/p-5359c5bf.entry.js +1 -0
- package/dist/realtimekit-ui/p-551b32ce.entry.js +1 -0
- package/dist/realtimekit-ui/p-5605a420.js +1 -0
- package/dist/realtimekit-ui/p-59f22e0a.entry.js +1 -0
- package/dist/realtimekit-ui/p-5a7d71b0.entry.js +1 -0
- package/dist/realtimekit-ui/p-5da1339e.entry.js +1 -0
- package/dist/realtimekit-ui/p-61f4443f.entry.js +1 -0
- package/dist/realtimekit-ui/p-63fabdb8.entry.js +1 -0
- package/dist/realtimekit-ui/p-646b89d6.entry.js +1 -0
- package/dist/realtimekit-ui/p-6481cc88.entry.js +1 -0
- package/dist/realtimekit-ui/p-6964a8f6.entry.js +1 -0
- package/dist/realtimekit-ui/p-6a4fb57a.entry.js +1 -0
- package/dist/realtimekit-ui/p-6ad690e8.entry.js +1 -0
- package/dist/realtimekit-ui/p-6b50f9b5.entry.js +1 -0
- package/dist/realtimekit-ui/p-6c894b6b.entry.js +1 -0
- package/dist/realtimekit-ui/p-6e0f9e5d.entry.js +1 -0
- package/dist/realtimekit-ui/p-701e8cc1.entry.js +1 -0
- package/dist/realtimekit-ui/p-7895b888.entry.js +1 -0
- package/dist/realtimekit-ui/p-7d970fe1.entry.js +1 -0
- package/dist/realtimekit-ui/p-7edbcd5e.entry.js +1 -0
- package/dist/realtimekit-ui/p-8d04a9a1.entry.js +1 -0
- package/dist/realtimekit-ui/p-8edd80c2.entry.js +1 -0
- package/dist/realtimekit-ui/p-93f69d20.entry.js +1 -0
- package/dist/realtimekit-ui/p-96be234f.js +1 -0
- package/dist/realtimekit-ui/p-997830fd.entry.js +1 -0
- package/dist/realtimekit-ui/p-9c378706.entry.js +1 -0
- package/dist/realtimekit-ui/p-9fc565cf.js +1 -0
- package/dist/realtimekit-ui/p-a08b5a59.js +1 -0
- package/dist/realtimekit-ui/p-a268fabd.entry.js +1 -0
- package/dist/realtimekit-ui/p-a467c711.entry.js +1 -0
- package/dist/realtimekit-ui/p-a7ec3e7f.js +1 -0
- package/dist/realtimekit-ui/p-b13ddb7d.js +1 -0
- package/dist/realtimekit-ui/p-b2ad78a0.entry.js +1 -0
- package/dist/realtimekit-ui/p-b7183272.entry.js +1 -0
- package/dist/realtimekit-ui/p-b8ea8298.entry.js +1 -0
- package/dist/realtimekit-ui/p-bac4d3cc.entry.js +1 -0
- package/dist/realtimekit-ui/p-badcfa98.entry.js +1 -0
- package/dist/realtimekit-ui/p-bfe04e6b.entry.js +1 -0
- package/dist/realtimekit-ui/p-c15d924f.js +1 -0
- package/dist/realtimekit-ui/p-c1c88e62.entry.js +1 -0
- package/dist/realtimekit-ui/p-c5aabfb2.entry.js +1 -0
- package/dist/realtimekit-ui/p-c9474ab6.entry.js +1 -0
- package/dist/realtimekit-ui/p-ca1a26a8.entry.js +1 -0
- package/dist/realtimekit-ui/p-cadc29e0.entry.js +1 -0
- package/dist/realtimekit-ui/p-cbdd7a99.js +1 -0
- package/dist/realtimekit-ui/p-cc0c49b8.entry.js +1 -0
- package/dist/realtimekit-ui/p-cdb45819.entry.js +1 -0
- package/dist/realtimekit-ui/p-d4ad4027.entry.js +1 -0
- package/dist/realtimekit-ui/p-d7509ae5.entry.js +1 -0
- package/dist/realtimekit-ui/p-d9a0b571.entry.js +1 -0
- package/dist/realtimekit-ui/p-db9371e5.js +1 -0
- package/dist/realtimekit-ui/p-e05e4c26.entry.js +1 -0
- package/dist/realtimekit-ui/p-e1255160.js +1 -0
- package/dist/realtimekit-ui/p-e1b5df5c.entry.js +1 -0
- package/dist/realtimekit-ui/p-e4686e58.entry.js +1 -0
- package/dist/realtimekit-ui/p-e9a4f3d2.entry.js +1 -0
- package/dist/realtimekit-ui/p-eb3c426f.entry.js +1 -0
- package/dist/realtimekit-ui/p-f0d98e40.entry.js +1 -0
- package/dist/realtimekit-ui/p-f47d4fe8.js +1 -0
- package/dist/realtimekit-ui/p-faf1d40a.js +1 -0
- package/dist/realtimekit-ui/p-fb2ddda7.entry.js +1 -0
- package/dist/realtimekit-ui/p-fdad06d2.entry.js +1 -0
- package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -0
- package/dist/types/components/rtk-ai/rtk-ai.d.ts +31 -0
- package/dist/types/components/rtk-ai-toggle/rtk-ai-toggle.d.ts +26 -0
- package/dist/types/components/rtk-ai-transcriptions/rtk-ai-transcriptions.d.ts +26 -0
- package/dist/types/components/rtk-audio-grid/rtk-audio-grid.d.ts +29 -0
- package/dist/types/components/rtk-audio-tile/rtk-audio-tile.d.ts +33 -0
- package/dist/types/components/rtk-audio-visualizer/rtk-audio-visualizer.d.ts +42 -0
- package/dist/types/components/rtk-avatar/rtk-avatar.d.ts +26 -0
- package/dist/types/components/rtk-breakout-room-manager/rtk-breakout-room-manager.d.ts +70 -0
- package/dist/types/components/rtk-breakout-room-participants/rtk-breakout-room-participants.d.ts +46 -0
- package/dist/types/components/rtk-breakout-room-toggle/rtk-breakout-rooms-toggle.d.ts +34 -0
- package/dist/types/components/rtk-breakout-rooms-manager/rtk-breakout-rooms-manager.d.ts +82 -0
- package/dist/types/components/rtk-broadcast-message-modal/rtk-broadcast-message-modal.d.ts +26 -0
- package/dist/types/components/rtk-button/rtk-button.d.ts +25 -0
- package/dist/types/components/rtk-camera-selector/rtk-camera-selector.d.ts +40 -0
- package/dist/types/components/rtk-camera-toggle/rtk-camera-toggle.d.ts +39 -0
- package/dist/types/components/rtk-caption-toggle/rtk-caption-toggle.d.ts +30 -0
- package/dist/types/components/rtk-channel-creator/rtk-channel-creator.d.ts +34 -0
- package/dist/types/components/rtk-channel-details/rtk-channel-details.d.ts +15 -0
- package/dist/types/components/rtk-channel-header/rtk-channel-header.d.ts +31 -0
- package/dist/types/components/rtk-channel-selector-ui/rtk-channel-selector-ui.d.ts +32 -0
- package/dist/types/components/rtk-channel-selector-view/rtk-channel-selector-view.d.ts +62 -0
- package/dist/types/components/rtk-chat/components/ChatHead.d.ts +8 -0
- package/dist/types/components/rtk-chat/rtk-chat.d.ts +122 -0
- package/dist/types/components/rtk-chat-composer-ui/rtk-chat-composer-ui.d.ts +84 -0
- package/dist/types/components/rtk-chat-composer-view/rtk-chat-composer-view.d.ts +73 -0
- package/dist/types/components/rtk-chat-message/rtk-chat-message.d.ts +67 -0
- package/dist/types/components/rtk-chat-messages-ui/rtk-chat-messages-ui.d.ts +46 -0
- package/dist/types/components/rtk-chat-messages-ui-paginated/rtk-chat-messages-ui-paginated.d.ts +61 -0
- package/dist/types/components/rtk-chat-search-results/rtk-chat-search-results.d.ts +18 -0
- package/dist/types/components/rtk-chat-selector-ui/rtk-chat-selector-ui.d.ts +29 -0
- package/dist/types/components/rtk-chat-toggle/rtk-chat-toggle.d.ts +48 -0
- package/dist/types/components/rtk-clock/rtk-clock.d.ts +23 -0
- package/dist/types/components/rtk-confirmation-modal/rtk-confirmation-modal.d.ts +27 -0
- package/dist/types/components/rtk-controlbar/rtk-controlbar.d.ts +28 -0
- package/dist/types/components/rtk-controlbar-button/rtk-controlbar-button.d.ts +30 -0
- package/dist/types/components/rtk-counter/rtk-counter.d.ts +27 -0
- package/dist/types/components/rtk-debugger/rtk-debugger.d.ts +34 -0
- package/dist/types/components/rtk-debugger-audio/rtk-debugger-audio.d.ts +36 -0
- package/dist/types/components/rtk-debugger-screenshare/rtk-debugger-screenshare.d.ts +38 -0
- package/dist/types/components/rtk-debugger-system/rtk-debugger-system.d.ts +40 -0
- package/dist/types/components/rtk-debugger-toggle/rtk-debugger-toggle.d.ts +24 -0
- package/dist/types/components/rtk-debugger-video/rtk-debugger-video.d.ts +36 -0
- package/dist/types/components/rtk-dialog/rtk-dialog.d.ts +36 -0
- package/dist/types/components/rtk-dialog-manager/rtk-dialog-manager.d.ts +41 -0
- package/dist/types/components/rtk-draft-attachment-view/rtk-draft-attachment-view.d.ts +26 -0
- package/dist/types/components/rtk-emoji-picker/rtk-emoji-picker.d.ts +32 -0
- package/dist/types/components/rtk-emoji-picker-button/rtk-emoji-picker-button.d.ts +10 -0
- package/dist/types/components/rtk-ended-screen/rtk-ended-screen.d.ts +30 -0
- package/dist/types/components/rtk-file-dropzone/rtk-file-dropzone.d.ts +15 -0
- package/dist/types/components/rtk-file-message/rtk-file-message.d.ts +21 -0
- package/dist/types/components/rtk-file-message-view/rtk-file-message-view.d.ts +15 -0
- package/dist/types/components/rtk-file-picker-button/rtk-file-picker-button.d.ts +21 -0
- package/dist/types/components/rtk-fullscreen-toggle/rtk-fullscreen-toggle.d.ts +32 -0
- package/dist/types/components/rtk-grid/rtk-grid.d.ts +83 -0
- package/dist/types/components/rtk-grid-pagination/rtk-grid-pagination.d.ts +40 -0
- package/dist/types/components/rtk-header/rtk-header.d.ts +28 -0
- package/dist/types/components/rtk-icon/rtk-icon.d.ts +14 -0
- package/dist/types/components/rtk-idle-screen/rtk-idle-screen.d.ts +19 -0
- package/dist/types/components/rtk-image-message/rtk-image-message.d.ts +26 -0
- package/dist/types/components/rtk-image-message-view/rtk-image-message-view.d.ts +17 -0
- package/dist/types/components/rtk-image-viewer/rtk-image-viewer.d.ts +25 -0
- package/dist/types/components/rtk-information-tooltip/rtk-information-tooltip.d.ts +6 -0
- package/dist/types/components/rtk-join-stage/rtk-join-stage.d.ts +38 -0
- package/dist/types/components/rtk-leave-button/rtk-leave-button.d.ts +22 -0
- package/dist/types/components/rtk-leave-meeting/rtk-leave-meeting.d.ts +35 -0
- package/dist/types/components/rtk-livestream-indicator/rtk-livestream-indicator.d.ts +18 -0
- package/dist/types/components/rtk-livestream-player/rtk-livestream-player.d.ts +60 -0
- package/dist/types/components/rtk-livestream-toggle/rtk-livestream-toggle.d.ts +40 -0
- package/dist/types/components/rtk-logo/rtk-logo.d.ts +20 -0
- package/dist/types/components/rtk-markdown-view/rtk-markdown-view.d.ts +15 -0
- package/dist/types/components/rtk-meeting/rtk-meeting.d.ts +59 -0
- package/dist/types/components/rtk-meeting-title/rtk-meeting-title.d.ts +15 -0
- package/dist/types/components/rtk-menu/rtk-menu.d.ts +30 -0
- package/dist/types/components/rtk-menu-item/rtk-menu-item.d.ts +19 -0
- package/dist/types/components/rtk-menu-list/rtk-menu-list.d.ts +14 -0
- package/dist/types/components/rtk-message-list-view/rtk-message-list-view.d.ts +62 -0
- package/dist/types/components/rtk-message-view/rtk-message-view.d.ts +33 -0
- package/dist/types/components/rtk-mic-toggle/rtk-mic-toggle.d.ts +39 -0
- package/dist/types/components/rtk-microphone-selector/rtk-microphone-selector.d.ts +42 -0
- package/dist/types/components/rtk-mixed-grid/rtk-mixed-grid.d.ts +61 -0
- package/dist/types/components/rtk-more-toggle/rtk-more-toggle.d.ts +32 -0
- package/dist/types/components/rtk-mute-all-button/rtk-mute-all-button.d.ts +26 -0
- package/dist/types/components/rtk-mute-all-confirmation/rtk-mute-all-confirmation.d.ts +21 -0
- package/dist/types/components/rtk-name-tag/rtk-name-tag.d.ts +28 -0
- package/dist/types/components/rtk-network-indicator/rtk-network-indicator.d.ts +20 -0
- package/dist/types/components/rtk-notification/rtk-notification.d.ts +26 -0
- package/dist/types/components/rtk-notifications/rtk-notifications.d.ts +68 -0
- package/dist/types/components/rtk-overlay-modal/rtk-overlay-modal.d.ts +22 -0
- package/dist/types/components/rtk-paginated-list/rtk-paginated-list.d.ts +91 -0
- package/dist/types/components/rtk-participant/rtk-participant.d.ts +62 -0
- package/dist/types/components/rtk-participant-count/rtk-participant-count.d.ts +26 -0
- package/dist/types/components/rtk-participant-setup/rtk-participant-setup.d.ts +37 -0
- package/dist/types/components/rtk-participant-tile/rtk-participant-tile.d.ts +55 -0
- package/dist/types/components/rtk-participants/rtk-participants.d.ts +48 -0
- package/dist/types/components/rtk-participants-audio/rtk-participants-audio.d.ts +34 -0
- package/dist/types/components/rtk-participants-stage-list/rtk-participants-stage-list.d.ts +42 -0
- package/dist/types/components/rtk-participants-stage-queue/rtk-participants-stage-queue.d.ts +29 -0
- package/dist/types/components/rtk-participants-toggle/rtk-participants-toggle.d.ts +47 -0
- package/dist/types/components/rtk-participants-viewer-list/rtk-participants-viewer-list.d.ts +33 -0
- package/dist/types/components/rtk-participants-waiting-list/rtk-participants-waiting-list.d.ts +29 -0
- package/dist/types/components/rtk-permissions-message/rtk-permissions-message.d.ts +40 -0
- package/dist/types/components/rtk-pip-toggle/rtk-pip-toggle.d.ts +28 -0
- package/dist/types/components/rtk-plugin-main/rtk-plugin-main.d.ts +28 -0
- package/dist/types/components/rtk-plugins/rtk-plugins.d.ts +35 -0
- package/dist/types/components/rtk-plugins-toggle/rtk-plugins-toggle.d.ts +40 -0
- package/dist/types/components/rtk-poll/rtk-poll.d.ts +30 -0
- package/dist/types/components/rtk-poll-form/rtk-poll-form.d.ts +30 -0
- package/dist/types/components/rtk-polls/rtk-polls.d.ts +38 -0
- package/dist/types/components/rtk-polls-toggle/rtk-polls-toggle.d.ts +44 -0
- package/dist/types/components/rtk-recording-indicator/rtk-recording-indicator.d.ts +26 -0
- package/dist/types/components/rtk-recording-toggle/rtk-recording-toggle.d.ts +47 -0
- package/dist/types/components/rtk-screen-share-toggle/rtk-screen-share-toggle.d.ts +67 -0
- package/dist/types/components/rtk-screenshare-view/rtk-screenshare-view.d.ts +52 -0
- package/dist/types/components/rtk-settings/rtk-settings.d.ts +38 -0
- package/dist/types/components/rtk-settings-audio/rtk-settings-audio.d.ts +32 -0
- package/dist/types/components/rtk-settings-toggle/rtk-settings-toggle.d.ts +30 -0
- package/dist/types/components/rtk-settings-video/rtk-settings-video.d.ts +37 -0
- package/dist/types/components/rtk-setup-screen/rtk-setup-screen.d.ts +40 -0
- package/dist/types/components/rtk-sidebar/rtk-sidebar.d.ts +50 -0
- package/dist/types/components/rtk-sidebar-ui/rtk-sidebar-ui.d.ts +112 -0
- package/dist/types/components/rtk-simple-grid/rtk-simple-grid.d.ts +43 -0
- package/dist/types/components/rtk-speaker-selector/rtk-speaker-selector.d.ts +44 -0
- package/dist/types/components/rtk-spinner/rtk-spinner.d.ts +12 -0
- package/dist/types/components/rtk-spotlight-grid/rtk-spotlight-grid.d.ts +47 -0
- package/dist/types/components/rtk-spotlight-indicator/rtk-spotlight-indicator.d.ts +22 -0
- package/dist/types/components/rtk-stage/rtk-stage.d.ts +19 -0
- package/dist/types/components/rtk-stage-toggle/rtk-stage-toggle.d.ts +36 -0
- package/dist/types/components/rtk-switch/rtk-switch.d.ts +25 -0
- package/dist/types/components/rtk-tab-bar/rtk-tab-bar.d.ts +37 -0
- package/dist/types/components/rtk-text-composer-view/rtk-text-composer-view.d.ts +34 -0
- package/dist/types/components/rtk-text-message/components/TextMessage.d.ts +6 -0
- package/dist/types/components/rtk-text-message/rtk-text-message.d.ts +21 -0
- package/dist/types/components/rtk-text-message-view/rtk-text-message-view.d.ts +10 -0
- package/dist/types/components/rtk-tooltip/rtk-tooltip.d.ts +42 -0
- package/dist/types/components/rtk-transcript/rtk-transcript.d.ts +30 -0
- package/dist/types/components/rtk-transcripts/rtk-transcripts.d.ts +39 -0
- package/dist/types/components/rtk-ui-provider/rtk-ui-provider.d.ts +45 -0
- package/dist/types/components/rtk-viewer-count/rtk-viewer-count.d.ts +24 -0
- package/dist/types/components/rtk-virtualized-list/rtk-virtualized-participant-list.d.ts +30 -0
- package/dist/types/components/rtk-waiting-screen/rtk-waiting-screen.d.ts +15 -0
- package/dist/types/components.d.ts +11528 -0
- package/dist/types/exports.d.ts +20 -0
- package/dist/types/globals.d.ts +15 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/lib/addons/index.d.ts +27 -0
- package/dist/types/lib/audio.d.ts +17 -0
- package/dist/types/lib/builder/index.d.ts +42 -0
- package/dist/types/lib/default-ui-config.d.ts +5 -0
- package/dist/types/lib/grid.d.ts +43 -0
- package/dist/types/lib/icons/default-icon-pack.d.ts +88 -0
- package/dist/types/lib/icons/index.d.ts +9 -0
- package/dist/types/lib/lang/default-language.d.ts +415 -0
- package/dist/types/lib/lang/index.d.ts +16 -0
- package/dist/types/lib/notification.d.ts +19 -0
- package/dist/types/lib/render/index.d.ts +45 -0
- package/dist/types/lib/render/utils.d.ts +31 -0
- package/dist/types/lib/visualizer.d.ts +6 -0
- package/dist/types/stencil-public-runtime.d.ts +1680 -0
- package/dist/types/theme/presets/border.d.ts +13 -0
- package/dist/types/theme/presets/themes.d.ts +2 -0
- package/dist/types/types/floating-ui.d.ts +1 -0
- package/dist/types/types/props.d.ts +175 -0
- package/dist/types/types/rtk-ai.d.ts +9 -0
- package/dist/types/types/rtk-client.d.ts +16 -0
- package/dist/types/types/ui-config/config.d.ts +25 -0
- package/dist/types/types/ui-config/design-tokens.d.ts +41 -0
- package/dist/types/types/ui-config/index.d.ts +15 -0
- package/dist/types/types/ui-config/root.d.ts +23 -0
- package/dist/types/types/web-core.d.ts +9 -0
- package/dist/types/utils/assets.d.ts +6 -0
- package/dist/types/utils/breakout-rooms-manager.d.ts +100 -0
- package/dist/types/utils/breakout-rooms.d.ts +24 -0
- package/dist/types/utils/chat.d.ts +49 -0
- package/dist/types/utils/clone.d.ts +1 -0
- package/dist/types/utils/color.d.ts +69 -0
- package/dist/types/utils/config.d.ts +28 -0
- package/dist/types/utils/date.d.ts +3 -0
- package/dist/types/utils/debugger-utils.d.ts +40 -0
- package/dist/types/utils/file.d.ts +23 -0
- package/dist/types/utils/full-screen.d.ts +4 -0
- package/dist/types/utils/graceful-storage.d.ts +2 -0
- package/dist/types/utils/logger.d.ts +1 -0
- package/dist/types/utils/notification.d.ts +9 -0
- package/dist/types/utils/provide-design-system.d.ts +7 -0
- package/dist/types/utils/scroll.d.ts +7 -0
- package/dist/types/utils/sidebar.d.ts +5 -0
- package/dist/types/utils/size.d.ts +7 -0
- package/dist/types/utils/stage.d.ts +3 -0
- package/dist/types/utils/string.d.ts +24 -0
- package/dist/types/utils/sync-with-store/index.d.ts +3 -0
- package/dist/types/utils/sync-with-store/ui-store.d.ts +20 -0
- package/dist/types/utils/time.d.ts +1 -0
- package/dist/types/utils/troubleshooter.d.ts +151 -0
- package/dist/types/utils/user-prefs.d.ts +7 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +58 -3
|
@@ -0,0 +1,1900 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Custom positioning reference element.
|
|
5
|
+
* @see https://floating-ui.com/docs/virtual-elements
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const sides = ['top', 'right', 'bottom', 'left'];
|
|
9
|
+
const alignments = ['start', 'end'];
|
|
10
|
+
const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
11
|
+
const min = Math.min;
|
|
12
|
+
const max = Math.max;
|
|
13
|
+
const round = Math.round;
|
|
14
|
+
const createCoords = v => ({
|
|
15
|
+
x: v,
|
|
16
|
+
y: v
|
|
17
|
+
});
|
|
18
|
+
const oppositeSideMap = {
|
|
19
|
+
left: 'right',
|
|
20
|
+
right: 'left',
|
|
21
|
+
bottom: 'top',
|
|
22
|
+
top: 'bottom'
|
|
23
|
+
};
|
|
24
|
+
const oppositeAlignmentMap = {
|
|
25
|
+
start: 'end',
|
|
26
|
+
end: 'start'
|
|
27
|
+
};
|
|
28
|
+
function clamp(start, value, end) {
|
|
29
|
+
return max(start, min(value, end));
|
|
30
|
+
}
|
|
31
|
+
function evaluate(value, param) {
|
|
32
|
+
return typeof value === 'function' ? value(param) : value;
|
|
33
|
+
}
|
|
34
|
+
function getSide(placement) {
|
|
35
|
+
return placement.split('-')[0];
|
|
36
|
+
}
|
|
37
|
+
function getAlignment(placement) {
|
|
38
|
+
return placement.split('-')[1];
|
|
39
|
+
}
|
|
40
|
+
function getOppositeAxis(axis) {
|
|
41
|
+
return axis === 'x' ? 'y' : 'x';
|
|
42
|
+
}
|
|
43
|
+
function getAxisLength(axis) {
|
|
44
|
+
return axis === 'y' ? 'height' : 'width';
|
|
45
|
+
}
|
|
46
|
+
function getSideAxis(placement) {
|
|
47
|
+
return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
|
|
48
|
+
}
|
|
49
|
+
function getAlignmentAxis(placement) {
|
|
50
|
+
return getOppositeAxis(getSideAxis(placement));
|
|
51
|
+
}
|
|
52
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
53
|
+
if (rtl === void 0) {
|
|
54
|
+
rtl = false;
|
|
55
|
+
}
|
|
56
|
+
const alignment = getAlignment(placement);
|
|
57
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
58
|
+
const length = getAxisLength(alignmentAxis);
|
|
59
|
+
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
60
|
+
if (rects.reference[length] > rects.floating[length]) {
|
|
61
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
62
|
+
}
|
|
63
|
+
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
64
|
+
}
|
|
65
|
+
function getExpandedPlacements(placement) {
|
|
66
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
67
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
68
|
+
}
|
|
69
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
70
|
+
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
71
|
+
}
|
|
72
|
+
function getSideList(side, isStart, rtl) {
|
|
73
|
+
const lr = ['left', 'right'];
|
|
74
|
+
const rl = ['right', 'left'];
|
|
75
|
+
const tb = ['top', 'bottom'];
|
|
76
|
+
const bt = ['bottom', 'top'];
|
|
77
|
+
switch (side) {
|
|
78
|
+
case 'top':
|
|
79
|
+
case 'bottom':
|
|
80
|
+
if (rtl) return isStart ? rl : lr;
|
|
81
|
+
return isStart ? lr : rl;
|
|
82
|
+
case 'left':
|
|
83
|
+
case 'right':
|
|
84
|
+
return isStart ? tb : bt;
|
|
85
|
+
default:
|
|
86
|
+
return [];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
90
|
+
const alignment = getAlignment(placement);
|
|
91
|
+
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
92
|
+
if (alignment) {
|
|
93
|
+
list = list.map(side => side + "-" + alignment);
|
|
94
|
+
if (flipAlignment) {
|
|
95
|
+
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return list;
|
|
99
|
+
}
|
|
100
|
+
function getOppositePlacement(placement) {
|
|
101
|
+
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
102
|
+
}
|
|
103
|
+
function expandPaddingObject(padding) {
|
|
104
|
+
return {
|
|
105
|
+
top: 0,
|
|
106
|
+
right: 0,
|
|
107
|
+
bottom: 0,
|
|
108
|
+
left: 0,
|
|
109
|
+
...padding
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function getPaddingObject(padding) {
|
|
113
|
+
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
114
|
+
top: padding,
|
|
115
|
+
right: padding,
|
|
116
|
+
bottom: padding,
|
|
117
|
+
left: padding
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
function rectToClientRect(rect) {
|
|
121
|
+
const {
|
|
122
|
+
x,
|
|
123
|
+
y,
|
|
124
|
+
width,
|
|
125
|
+
height
|
|
126
|
+
} = rect;
|
|
127
|
+
return {
|
|
128
|
+
width,
|
|
129
|
+
height,
|
|
130
|
+
top: y,
|
|
131
|
+
left: x,
|
|
132
|
+
right: x + width,
|
|
133
|
+
bottom: y + height,
|
|
134
|
+
x,
|
|
135
|
+
y
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
140
|
+
let {
|
|
141
|
+
reference,
|
|
142
|
+
floating
|
|
143
|
+
} = _ref;
|
|
144
|
+
const sideAxis = getSideAxis(placement);
|
|
145
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
146
|
+
const alignLength = getAxisLength(alignmentAxis);
|
|
147
|
+
const side = getSide(placement);
|
|
148
|
+
const isVertical = sideAxis === 'y';
|
|
149
|
+
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
150
|
+
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
151
|
+
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
152
|
+
let coords;
|
|
153
|
+
switch (side) {
|
|
154
|
+
case 'top':
|
|
155
|
+
coords = {
|
|
156
|
+
x: commonX,
|
|
157
|
+
y: reference.y - floating.height
|
|
158
|
+
};
|
|
159
|
+
break;
|
|
160
|
+
case 'bottom':
|
|
161
|
+
coords = {
|
|
162
|
+
x: commonX,
|
|
163
|
+
y: reference.y + reference.height
|
|
164
|
+
};
|
|
165
|
+
break;
|
|
166
|
+
case 'right':
|
|
167
|
+
coords = {
|
|
168
|
+
x: reference.x + reference.width,
|
|
169
|
+
y: commonY
|
|
170
|
+
};
|
|
171
|
+
break;
|
|
172
|
+
case 'left':
|
|
173
|
+
coords = {
|
|
174
|
+
x: reference.x - floating.width,
|
|
175
|
+
y: commonY
|
|
176
|
+
};
|
|
177
|
+
break;
|
|
178
|
+
default:
|
|
179
|
+
coords = {
|
|
180
|
+
x: reference.x,
|
|
181
|
+
y: reference.y
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
switch (getAlignment(placement)) {
|
|
185
|
+
case 'start':
|
|
186
|
+
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
187
|
+
break;
|
|
188
|
+
case 'end':
|
|
189
|
+
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
return coords;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
197
|
+
* next to a given reference element.
|
|
198
|
+
*
|
|
199
|
+
* This export does not have any `platform` interface logic. You will need to
|
|
200
|
+
* write one for the platform you are using Floating UI with.
|
|
201
|
+
*/
|
|
202
|
+
const computePosition$1 = async (reference, floating, config) => {
|
|
203
|
+
const {
|
|
204
|
+
placement = 'bottom',
|
|
205
|
+
strategy = 'absolute',
|
|
206
|
+
middleware = [],
|
|
207
|
+
platform
|
|
208
|
+
} = config;
|
|
209
|
+
const validMiddleware = middleware.filter(Boolean);
|
|
210
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
211
|
+
let rects = await platform.getElementRects({
|
|
212
|
+
reference,
|
|
213
|
+
floating,
|
|
214
|
+
strategy
|
|
215
|
+
});
|
|
216
|
+
let {
|
|
217
|
+
x,
|
|
218
|
+
y
|
|
219
|
+
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
220
|
+
let statefulPlacement = placement;
|
|
221
|
+
let middlewareData = {};
|
|
222
|
+
let resetCount = 0;
|
|
223
|
+
for (let i = 0; i < validMiddleware.length; i++) {
|
|
224
|
+
const {
|
|
225
|
+
name,
|
|
226
|
+
fn
|
|
227
|
+
} = validMiddleware[i];
|
|
228
|
+
const {
|
|
229
|
+
x: nextX,
|
|
230
|
+
y: nextY,
|
|
231
|
+
data,
|
|
232
|
+
reset
|
|
233
|
+
} = await fn({
|
|
234
|
+
x,
|
|
235
|
+
y,
|
|
236
|
+
initialPlacement: placement,
|
|
237
|
+
placement: statefulPlacement,
|
|
238
|
+
strategy,
|
|
239
|
+
middlewareData,
|
|
240
|
+
rects,
|
|
241
|
+
platform,
|
|
242
|
+
elements: {
|
|
243
|
+
reference,
|
|
244
|
+
floating
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
x = nextX != null ? nextX : x;
|
|
248
|
+
y = nextY != null ? nextY : y;
|
|
249
|
+
middlewareData = {
|
|
250
|
+
...middlewareData,
|
|
251
|
+
[name]: {
|
|
252
|
+
...middlewareData[name],
|
|
253
|
+
...data
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
if (reset && resetCount <= 50) {
|
|
257
|
+
resetCount++;
|
|
258
|
+
if (typeof reset === 'object') {
|
|
259
|
+
if (reset.placement) {
|
|
260
|
+
statefulPlacement = reset.placement;
|
|
261
|
+
}
|
|
262
|
+
if (reset.rects) {
|
|
263
|
+
rects = reset.rects === true ? await platform.getElementRects({
|
|
264
|
+
reference,
|
|
265
|
+
floating,
|
|
266
|
+
strategy
|
|
267
|
+
}) : reset.rects;
|
|
268
|
+
}
|
|
269
|
+
({
|
|
270
|
+
x,
|
|
271
|
+
y
|
|
272
|
+
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
273
|
+
}
|
|
274
|
+
i = -1;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
return {
|
|
278
|
+
x,
|
|
279
|
+
y,
|
|
280
|
+
placement: statefulPlacement,
|
|
281
|
+
strategy,
|
|
282
|
+
middlewareData
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Resolves with an object of overflow side offsets that determine how much the
|
|
288
|
+
* element is overflowing a given clipping boundary on each side.
|
|
289
|
+
* - positive = overflowing the boundary by that number of pixels
|
|
290
|
+
* - negative = how many pixels left before it will overflow
|
|
291
|
+
* - 0 = lies flush with the boundary
|
|
292
|
+
* @see https://floating-ui.com/docs/detectOverflow
|
|
293
|
+
*/
|
|
294
|
+
async function detectOverflow(state, options) {
|
|
295
|
+
var _await$platform$isEle;
|
|
296
|
+
if (options === void 0) {
|
|
297
|
+
options = {};
|
|
298
|
+
}
|
|
299
|
+
const {
|
|
300
|
+
x,
|
|
301
|
+
y,
|
|
302
|
+
platform,
|
|
303
|
+
rects,
|
|
304
|
+
elements,
|
|
305
|
+
strategy
|
|
306
|
+
} = state;
|
|
307
|
+
const {
|
|
308
|
+
boundary = 'clippingAncestors',
|
|
309
|
+
rootBoundary = 'viewport',
|
|
310
|
+
elementContext = 'floating',
|
|
311
|
+
altBoundary = false,
|
|
312
|
+
padding = 0
|
|
313
|
+
} = evaluate(options, state);
|
|
314
|
+
const paddingObject = getPaddingObject(padding);
|
|
315
|
+
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
316
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
|
317
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
318
|
+
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
|
|
319
|
+
boundary,
|
|
320
|
+
rootBoundary,
|
|
321
|
+
strategy
|
|
322
|
+
}));
|
|
323
|
+
const rect = elementContext === 'floating' ? {
|
|
324
|
+
x,
|
|
325
|
+
y,
|
|
326
|
+
width: rects.floating.width,
|
|
327
|
+
height: rects.floating.height
|
|
328
|
+
} : rects.reference;
|
|
329
|
+
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
330
|
+
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
331
|
+
x: 1,
|
|
332
|
+
y: 1
|
|
333
|
+
} : {
|
|
334
|
+
x: 1,
|
|
335
|
+
y: 1
|
|
336
|
+
};
|
|
337
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
338
|
+
elements,
|
|
339
|
+
rect,
|
|
340
|
+
offsetParent,
|
|
341
|
+
strategy
|
|
342
|
+
}) : rect);
|
|
343
|
+
return {
|
|
344
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
345
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
346
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
347
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Provides data to position an inner element of the floating element so that it
|
|
353
|
+
* appears centered to the reference element.
|
|
354
|
+
* @see https://floating-ui.com/docs/arrow
|
|
355
|
+
*/
|
|
356
|
+
const arrow$1 = options => ({
|
|
357
|
+
name: 'arrow',
|
|
358
|
+
options,
|
|
359
|
+
async fn(state) {
|
|
360
|
+
const {
|
|
361
|
+
x,
|
|
362
|
+
y,
|
|
363
|
+
placement,
|
|
364
|
+
rects,
|
|
365
|
+
platform,
|
|
366
|
+
elements,
|
|
367
|
+
middlewareData
|
|
368
|
+
} = state;
|
|
369
|
+
// Since `element` is required, we don't Partial<> the type.
|
|
370
|
+
const {
|
|
371
|
+
element,
|
|
372
|
+
padding = 0
|
|
373
|
+
} = evaluate(options, state) || {};
|
|
374
|
+
if (element == null) {
|
|
375
|
+
return {};
|
|
376
|
+
}
|
|
377
|
+
const paddingObject = getPaddingObject(padding);
|
|
378
|
+
const coords = {
|
|
379
|
+
x,
|
|
380
|
+
y
|
|
381
|
+
};
|
|
382
|
+
const axis = getAlignmentAxis(placement);
|
|
383
|
+
const length = getAxisLength(axis);
|
|
384
|
+
const arrowDimensions = await platform.getDimensions(element);
|
|
385
|
+
const isYAxis = axis === 'y';
|
|
386
|
+
const minProp = isYAxis ? 'top' : 'left';
|
|
387
|
+
const maxProp = isYAxis ? 'bottom' : 'right';
|
|
388
|
+
const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
|
|
389
|
+
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
390
|
+
const startDiff = coords[axis] - rects.reference[axis];
|
|
391
|
+
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
|
392
|
+
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
393
|
+
|
|
394
|
+
// DOM platform can return `window` as the `offsetParent`.
|
|
395
|
+
if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
|
|
396
|
+
clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
397
|
+
}
|
|
398
|
+
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
399
|
+
|
|
400
|
+
// If the padding is large enough that it causes the arrow to no longer be
|
|
401
|
+
// centered, modify the padding so that it is centered.
|
|
402
|
+
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
403
|
+
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
404
|
+
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
405
|
+
|
|
406
|
+
// Make sure the arrow doesn't overflow the floating element if the center
|
|
407
|
+
// point is outside the floating element's bounds.
|
|
408
|
+
const min$1 = minPadding;
|
|
409
|
+
const max = clientSize - arrowDimensions[length] - maxPadding;
|
|
410
|
+
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
411
|
+
const offset = clamp(min$1, center, max);
|
|
412
|
+
|
|
413
|
+
// If the reference is small enough that the arrow's padding causes it to
|
|
414
|
+
// to point to nothing for an aligned placement, adjust the offset of the
|
|
415
|
+
// floating element itself. To ensure `shift()` continues to take action,
|
|
416
|
+
// a single reset is performed when this is true.
|
|
417
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
418
|
+
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
|
|
419
|
+
return {
|
|
420
|
+
[axis]: coords[axis] + alignmentOffset,
|
|
421
|
+
data: {
|
|
422
|
+
[axis]: offset,
|
|
423
|
+
centerOffset: center - offset - alignmentOffset,
|
|
424
|
+
...(shouldAddOffset && {
|
|
425
|
+
alignmentOffset
|
|
426
|
+
})
|
|
427
|
+
},
|
|
428
|
+
reset: shouldAddOffset
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
434
|
+
const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
|
|
435
|
+
return allowedPlacementsSortedByAlignment.filter(placement => {
|
|
436
|
+
if (alignment) {
|
|
437
|
+
return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
|
|
438
|
+
}
|
|
439
|
+
return true;
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Optimizes the visibility of the floating element by choosing the placement
|
|
444
|
+
* that has the most space available automatically, without needing to specify a
|
|
445
|
+
* preferred placement. Alternative to `flip`.
|
|
446
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
447
|
+
*/
|
|
448
|
+
const autoPlacement$1 = function (options) {
|
|
449
|
+
if (options === void 0) {
|
|
450
|
+
options = {};
|
|
451
|
+
}
|
|
452
|
+
return {
|
|
453
|
+
name: 'autoPlacement',
|
|
454
|
+
options,
|
|
455
|
+
async fn(state) {
|
|
456
|
+
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
|
|
457
|
+
const {
|
|
458
|
+
rects,
|
|
459
|
+
middlewareData,
|
|
460
|
+
placement,
|
|
461
|
+
platform,
|
|
462
|
+
elements
|
|
463
|
+
} = state;
|
|
464
|
+
const {
|
|
465
|
+
crossAxis = false,
|
|
466
|
+
alignment,
|
|
467
|
+
allowedPlacements = placements,
|
|
468
|
+
autoAlignment = true,
|
|
469
|
+
...detectOverflowOptions
|
|
470
|
+
} = evaluate(options, state);
|
|
471
|
+
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
472
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
473
|
+
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
|
|
474
|
+
const currentPlacement = placements$1[currentIndex];
|
|
475
|
+
if (currentPlacement == null) {
|
|
476
|
+
return {};
|
|
477
|
+
}
|
|
478
|
+
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
|
479
|
+
|
|
480
|
+
// Make `computeCoords` start from the right place.
|
|
481
|
+
if (placement !== currentPlacement) {
|
|
482
|
+
return {
|
|
483
|
+
reset: {
|
|
484
|
+
placement: placements$1[0]
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
|
489
|
+
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
|
|
490
|
+
placement: currentPlacement,
|
|
491
|
+
overflows: currentOverflows
|
|
492
|
+
}];
|
|
493
|
+
const nextPlacement = placements$1[currentIndex + 1];
|
|
494
|
+
|
|
495
|
+
// There are more placements to check.
|
|
496
|
+
if (nextPlacement) {
|
|
497
|
+
return {
|
|
498
|
+
data: {
|
|
499
|
+
index: currentIndex + 1,
|
|
500
|
+
overflows: allOverflows
|
|
501
|
+
},
|
|
502
|
+
reset: {
|
|
503
|
+
placement: nextPlacement
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
const placementsSortedByMostSpace = allOverflows.map(d => {
|
|
508
|
+
const alignment = getAlignment(d.placement);
|
|
509
|
+
return [d.placement, alignment && crossAxis ?
|
|
510
|
+
// Check along the mainAxis and main crossAxis side.
|
|
511
|
+
d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
|
|
512
|
+
// Check only the mainAxis.
|
|
513
|
+
d.overflows[0], d.overflows];
|
|
514
|
+
}).sort((a, b) => a[1] - b[1]);
|
|
515
|
+
const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
|
|
516
|
+
// Aligned placements should not check their opposite crossAxis
|
|
517
|
+
// side.
|
|
518
|
+
getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
|
|
519
|
+
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
520
|
+
if (resetPlacement !== placement) {
|
|
521
|
+
return {
|
|
522
|
+
data: {
|
|
523
|
+
index: currentIndex + 1,
|
|
524
|
+
overflows: allOverflows
|
|
525
|
+
},
|
|
526
|
+
reset: {
|
|
527
|
+
placement: resetPlacement
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
return {};
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
538
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
539
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
540
|
+
* @see https://floating-ui.com/docs/flip
|
|
541
|
+
*/
|
|
542
|
+
const flip$1 = function (options) {
|
|
543
|
+
if (options === void 0) {
|
|
544
|
+
options = {};
|
|
545
|
+
}
|
|
546
|
+
return {
|
|
547
|
+
name: 'flip',
|
|
548
|
+
options,
|
|
549
|
+
async fn(state) {
|
|
550
|
+
var _middlewareData$arrow, _middlewareData$flip;
|
|
551
|
+
const {
|
|
552
|
+
placement,
|
|
553
|
+
middlewareData,
|
|
554
|
+
rects,
|
|
555
|
+
initialPlacement,
|
|
556
|
+
platform,
|
|
557
|
+
elements
|
|
558
|
+
} = state;
|
|
559
|
+
const {
|
|
560
|
+
mainAxis: checkMainAxis = true,
|
|
561
|
+
crossAxis: checkCrossAxis = true,
|
|
562
|
+
fallbackPlacements: specifiedFallbackPlacements,
|
|
563
|
+
fallbackStrategy = 'bestFit',
|
|
564
|
+
fallbackAxisSideDirection = 'none',
|
|
565
|
+
flipAlignment = true,
|
|
566
|
+
...detectOverflowOptions
|
|
567
|
+
} = evaluate(options, state);
|
|
568
|
+
|
|
569
|
+
// If a reset by the arrow was caused due to an alignment offset being
|
|
570
|
+
// added, we should skip any logic now since `flip()` has already done its
|
|
571
|
+
// work.
|
|
572
|
+
// https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
|
|
573
|
+
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
574
|
+
return {};
|
|
575
|
+
}
|
|
576
|
+
const side = getSide(placement);
|
|
577
|
+
const initialSideAxis = getSideAxis(initialPlacement);
|
|
578
|
+
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
579
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
580
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
581
|
+
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
582
|
+
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
583
|
+
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
584
|
+
}
|
|
585
|
+
const placements = [initialPlacement, ...fallbackPlacements];
|
|
586
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
587
|
+
const overflows = [];
|
|
588
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
589
|
+
if (checkMainAxis) {
|
|
590
|
+
overflows.push(overflow[side]);
|
|
591
|
+
}
|
|
592
|
+
if (checkCrossAxis) {
|
|
593
|
+
const sides = getAlignmentSides(placement, rects, rtl);
|
|
594
|
+
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
595
|
+
}
|
|
596
|
+
overflowsData = [...overflowsData, {
|
|
597
|
+
placement,
|
|
598
|
+
overflows
|
|
599
|
+
}];
|
|
600
|
+
|
|
601
|
+
// One or more sides is overflowing.
|
|
602
|
+
if (!overflows.every(side => side <= 0)) {
|
|
603
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
|
604
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
605
|
+
const nextPlacement = placements[nextIndex];
|
|
606
|
+
if (nextPlacement) {
|
|
607
|
+
// Try next placement and re-run the lifecycle.
|
|
608
|
+
return {
|
|
609
|
+
data: {
|
|
610
|
+
index: nextIndex,
|
|
611
|
+
overflows: overflowsData
|
|
612
|
+
},
|
|
613
|
+
reset: {
|
|
614
|
+
placement: nextPlacement
|
|
615
|
+
}
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
620
|
+
// then find the placement that fits the best on the main crossAxis side.
|
|
621
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
622
|
+
|
|
623
|
+
// Otherwise fallback.
|
|
624
|
+
if (!resetPlacement) {
|
|
625
|
+
switch (fallbackStrategy) {
|
|
626
|
+
case 'bestFit':
|
|
627
|
+
{
|
|
628
|
+
var _overflowsData$filter2;
|
|
629
|
+
const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
|
|
630
|
+
if (hasFallbackAxisSideDirection) {
|
|
631
|
+
const currentSideAxis = getSideAxis(d.placement);
|
|
632
|
+
return currentSideAxis === initialSideAxis ||
|
|
633
|
+
// Create a bias to the `y` side axis due to horizontal
|
|
634
|
+
// reading directions favoring greater width.
|
|
635
|
+
currentSideAxis === 'y';
|
|
636
|
+
}
|
|
637
|
+
return true;
|
|
638
|
+
}).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
639
|
+
if (placement) {
|
|
640
|
+
resetPlacement = placement;
|
|
641
|
+
}
|
|
642
|
+
break;
|
|
643
|
+
}
|
|
644
|
+
case 'initialPlacement':
|
|
645
|
+
resetPlacement = initialPlacement;
|
|
646
|
+
break;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
if (placement !== resetPlacement) {
|
|
650
|
+
return {
|
|
651
|
+
reset: {
|
|
652
|
+
placement: resetPlacement
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
return {};
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
|
|
662
|
+
function getSideOffsets(overflow, rect) {
|
|
663
|
+
return {
|
|
664
|
+
top: overflow.top - rect.height,
|
|
665
|
+
right: overflow.right - rect.width,
|
|
666
|
+
bottom: overflow.bottom - rect.height,
|
|
667
|
+
left: overflow.left - rect.width
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
function isAnySideFullyClipped(overflow) {
|
|
671
|
+
return sides.some(side => overflow[side] >= 0);
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
675
|
+
* when it is not in the same clipping context as the reference element.
|
|
676
|
+
* @see https://floating-ui.com/docs/hide
|
|
677
|
+
*/
|
|
678
|
+
const hide$1 = function (options) {
|
|
679
|
+
if (options === void 0) {
|
|
680
|
+
options = {};
|
|
681
|
+
}
|
|
682
|
+
return {
|
|
683
|
+
name: 'hide',
|
|
684
|
+
options,
|
|
685
|
+
async fn(state) {
|
|
686
|
+
const {
|
|
687
|
+
rects
|
|
688
|
+
} = state;
|
|
689
|
+
const {
|
|
690
|
+
strategy = 'referenceHidden',
|
|
691
|
+
...detectOverflowOptions
|
|
692
|
+
} = evaluate(options, state);
|
|
693
|
+
switch (strategy) {
|
|
694
|
+
case 'referenceHidden':
|
|
695
|
+
{
|
|
696
|
+
const overflow = await detectOverflow(state, {
|
|
697
|
+
...detectOverflowOptions,
|
|
698
|
+
elementContext: 'reference'
|
|
699
|
+
});
|
|
700
|
+
const offsets = getSideOffsets(overflow, rects.reference);
|
|
701
|
+
return {
|
|
702
|
+
data: {
|
|
703
|
+
referenceHiddenOffsets: offsets,
|
|
704
|
+
referenceHidden: isAnySideFullyClipped(offsets)
|
|
705
|
+
}
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
case 'escaped':
|
|
709
|
+
{
|
|
710
|
+
const overflow = await detectOverflow(state, {
|
|
711
|
+
...detectOverflowOptions,
|
|
712
|
+
altBoundary: true
|
|
713
|
+
});
|
|
714
|
+
const offsets = getSideOffsets(overflow, rects.floating);
|
|
715
|
+
return {
|
|
716
|
+
data: {
|
|
717
|
+
escapedOffsets: offsets,
|
|
718
|
+
escaped: isAnySideFullyClipped(offsets)
|
|
719
|
+
}
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
default:
|
|
723
|
+
{
|
|
724
|
+
return {};
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
};
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
function getBoundingRect(rects) {
|
|
732
|
+
const minX = min(...rects.map(rect => rect.left));
|
|
733
|
+
const minY = min(...rects.map(rect => rect.top));
|
|
734
|
+
const maxX = max(...rects.map(rect => rect.right));
|
|
735
|
+
const maxY = max(...rects.map(rect => rect.bottom));
|
|
736
|
+
return {
|
|
737
|
+
x: minX,
|
|
738
|
+
y: minY,
|
|
739
|
+
width: maxX - minX,
|
|
740
|
+
height: maxY - minY
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
function getRectsByLine(rects) {
|
|
744
|
+
const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
|
|
745
|
+
const groups = [];
|
|
746
|
+
let prevRect = null;
|
|
747
|
+
for (let i = 0; i < sortedRects.length; i++) {
|
|
748
|
+
const rect = sortedRects[i];
|
|
749
|
+
if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
|
|
750
|
+
groups.push([rect]);
|
|
751
|
+
} else {
|
|
752
|
+
groups[groups.length - 1].push(rect);
|
|
753
|
+
}
|
|
754
|
+
prevRect = rect;
|
|
755
|
+
}
|
|
756
|
+
return groups.map(rect => rectToClientRect(getBoundingRect(rect)));
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* Provides improved positioning for inline reference elements that can span
|
|
760
|
+
* over multiple lines, such as hyperlinks or range selections.
|
|
761
|
+
* @see https://floating-ui.com/docs/inline
|
|
762
|
+
*/
|
|
763
|
+
const inline = function (options) {
|
|
764
|
+
if (options === void 0) {
|
|
765
|
+
options = {};
|
|
766
|
+
}
|
|
767
|
+
return {
|
|
768
|
+
name: 'inline',
|
|
769
|
+
options,
|
|
770
|
+
async fn(state) {
|
|
771
|
+
const {
|
|
772
|
+
placement,
|
|
773
|
+
elements,
|
|
774
|
+
rects,
|
|
775
|
+
platform,
|
|
776
|
+
strategy
|
|
777
|
+
} = state;
|
|
778
|
+
// A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
|
|
779
|
+
// ClientRect's bounds, despite the event listener being triggered. A
|
|
780
|
+
// padding of 2 seems to handle this issue.
|
|
781
|
+
const {
|
|
782
|
+
padding = 2,
|
|
783
|
+
x,
|
|
784
|
+
y
|
|
785
|
+
} = evaluate(options, state);
|
|
786
|
+
const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
|
|
787
|
+
const clientRects = getRectsByLine(nativeClientRects);
|
|
788
|
+
const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
|
|
789
|
+
const paddingObject = getPaddingObject(padding);
|
|
790
|
+
function getBoundingClientRect() {
|
|
791
|
+
// There are two rects and they are disjoined.
|
|
792
|
+
if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
|
|
793
|
+
// Find the first rect in which the point is fully inside.
|
|
794
|
+
return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
// There are 2 or more connected rects.
|
|
798
|
+
if (clientRects.length >= 2) {
|
|
799
|
+
if (getSideAxis(placement) === 'y') {
|
|
800
|
+
const firstRect = clientRects[0];
|
|
801
|
+
const lastRect = clientRects[clientRects.length - 1];
|
|
802
|
+
const isTop = getSide(placement) === 'top';
|
|
803
|
+
const top = firstRect.top;
|
|
804
|
+
const bottom = lastRect.bottom;
|
|
805
|
+
const left = isTop ? firstRect.left : lastRect.left;
|
|
806
|
+
const right = isTop ? firstRect.right : lastRect.right;
|
|
807
|
+
const width = right - left;
|
|
808
|
+
const height = bottom - top;
|
|
809
|
+
return {
|
|
810
|
+
top,
|
|
811
|
+
bottom,
|
|
812
|
+
left,
|
|
813
|
+
right,
|
|
814
|
+
width,
|
|
815
|
+
height,
|
|
816
|
+
x: left,
|
|
817
|
+
y: top
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
const isLeftSide = getSide(placement) === 'left';
|
|
821
|
+
const maxRight = max(...clientRects.map(rect => rect.right));
|
|
822
|
+
const minLeft = min(...clientRects.map(rect => rect.left));
|
|
823
|
+
const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
|
|
824
|
+
const top = measureRects[0].top;
|
|
825
|
+
const bottom = measureRects[measureRects.length - 1].bottom;
|
|
826
|
+
const left = minLeft;
|
|
827
|
+
const right = maxRight;
|
|
828
|
+
const width = right - left;
|
|
829
|
+
const height = bottom - top;
|
|
830
|
+
return {
|
|
831
|
+
top,
|
|
832
|
+
bottom,
|
|
833
|
+
left,
|
|
834
|
+
right,
|
|
835
|
+
width,
|
|
836
|
+
height,
|
|
837
|
+
x: left,
|
|
838
|
+
y: top
|
|
839
|
+
};
|
|
840
|
+
}
|
|
841
|
+
return fallback;
|
|
842
|
+
}
|
|
843
|
+
const resetRects = await platform.getElementRects({
|
|
844
|
+
reference: {
|
|
845
|
+
getBoundingClientRect
|
|
846
|
+
},
|
|
847
|
+
floating: elements.floating,
|
|
848
|
+
strategy
|
|
849
|
+
});
|
|
850
|
+
if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
|
|
851
|
+
return {
|
|
852
|
+
reset: {
|
|
853
|
+
rects: resetRects
|
|
854
|
+
}
|
|
855
|
+
};
|
|
856
|
+
}
|
|
857
|
+
return {};
|
|
858
|
+
}
|
|
859
|
+
};
|
|
860
|
+
};
|
|
861
|
+
|
|
862
|
+
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
863
|
+
// Derivable.
|
|
864
|
+
|
|
865
|
+
async function convertValueToCoords(state, options) {
|
|
866
|
+
const {
|
|
867
|
+
placement,
|
|
868
|
+
platform,
|
|
869
|
+
elements
|
|
870
|
+
} = state;
|
|
871
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
872
|
+
const side = getSide(placement);
|
|
873
|
+
const alignment = getAlignment(placement);
|
|
874
|
+
const isVertical = getSideAxis(placement) === 'y';
|
|
875
|
+
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
876
|
+
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
877
|
+
const rawValue = evaluate(options, state);
|
|
878
|
+
|
|
879
|
+
// eslint-disable-next-line prefer-const
|
|
880
|
+
let {
|
|
881
|
+
mainAxis,
|
|
882
|
+
crossAxis,
|
|
883
|
+
alignmentAxis
|
|
884
|
+
} = typeof rawValue === 'number' ? {
|
|
885
|
+
mainAxis: rawValue,
|
|
886
|
+
crossAxis: 0,
|
|
887
|
+
alignmentAxis: null
|
|
888
|
+
} : {
|
|
889
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
890
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
891
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
892
|
+
};
|
|
893
|
+
if (alignment && typeof alignmentAxis === 'number') {
|
|
894
|
+
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
895
|
+
}
|
|
896
|
+
return isVertical ? {
|
|
897
|
+
x: crossAxis * crossAxisMulti,
|
|
898
|
+
y: mainAxis * mainAxisMulti
|
|
899
|
+
} : {
|
|
900
|
+
x: mainAxis * mainAxisMulti,
|
|
901
|
+
y: crossAxis * crossAxisMulti
|
|
902
|
+
};
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* Modifies the placement by translating the floating element along the
|
|
907
|
+
* specified axes.
|
|
908
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
909
|
+
* object may be passed.
|
|
910
|
+
* @see https://floating-ui.com/docs/offset
|
|
911
|
+
*/
|
|
912
|
+
const offset$1 = function (options) {
|
|
913
|
+
if (options === void 0) {
|
|
914
|
+
options = 0;
|
|
915
|
+
}
|
|
916
|
+
return {
|
|
917
|
+
name: 'offset',
|
|
918
|
+
options,
|
|
919
|
+
async fn(state) {
|
|
920
|
+
var _middlewareData$offse, _middlewareData$arrow;
|
|
921
|
+
const {
|
|
922
|
+
x,
|
|
923
|
+
y,
|
|
924
|
+
placement,
|
|
925
|
+
middlewareData
|
|
926
|
+
} = state;
|
|
927
|
+
const diffCoords = await convertValueToCoords(state, options);
|
|
928
|
+
|
|
929
|
+
// If the placement is the same and the arrow caused an alignment offset
|
|
930
|
+
// then we don't need to change the positioning coordinates.
|
|
931
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
932
|
+
return {};
|
|
933
|
+
}
|
|
934
|
+
return {
|
|
935
|
+
x: x + diffCoords.x,
|
|
936
|
+
y: y + diffCoords.y,
|
|
937
|
+
data: {
|
|
938
|
+
...diffCoords,
|
|
939
|
+
placement
|
|
940
|
+
}
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
};
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
948
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
949
|
+
* @see https://floating-ui.com/docs/shift
|
|
950
|
+
*/
|
|
951
|
+
const shift$1 = function (options) {
|
|
952
|
+
if (options === void 0) {
|
|
953
|
+
options = {};
|
|
954
|
+
}
|
|
955
|
+
return {
|
|
956
|
+
name: 'shift',
|
|
957
|
+
options,
|
|
958
|
+
async fn(state) {
|
|
959
|
+
const {
|
|
960
|
+
x,
|
|
961
|
+
y,
|
|
962
|
+
placement
|
|
963
|
+
} = state;
|
|
964
|
+
const {
|
|
965
|
+
mainAxis: checkMainAxis = true,
|
|
966
|
+
crossAxis: checkCrossAxis = false,
|
|
967
|
+
limiter = {
|
|
968
|
+
fn: _ref => {
|
|
969
|
+
let {
|
|
970
|
+
x,
|
|
971
|
+
y
|
|
972
|
+
} = _ref;
|
|
973
|
+
return {
|
|
974
|
+
x,
|
|
975
|
+
y
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
},
|
|
979
|
+
...detectOverflowOptions
|
|
980
|
+
} = evaluate(options, state);
|
|
981
|
+
const coords = {
|
|
982
|
+
x,
|
|
983
|
+
y
|
|
984
|
+
};
|
|
985
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
986
|
+
const crossAxis = getSideAxis(getSide(placement));
|
|
987
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
988
|
+
let mainAxisCoord = coords[mainAxis];
|
|
989
|
+
let crossAxisCoord = coords[crossAxis];
|
|
990
|
+
if (checkMainAxis) {
|
|
991
|
+
const minSide = mainAxis === 'y' ? 'top' : 'left';
|
|
992
|
+
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
993
|
+
const min = mainAxisCoord + overflow[minSide];
|
|
994
|
+
const max = mainAxisCoord - overflow[maxSide];
|
|
995
|
+
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
996
|
+
}
|
|
997
|
+
if (checkCrossAxis) {
|
|
998
|
+
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
|
999
|
+
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
1000
|
+
const min = crossAxisCoord + overflow[minSide];
|
|
1001
|
+
const max = crossAxisCoord - overflow[maxSide];
|
|
1002
|
+
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
1003
|
+
}
|
|
1004
|
+
const limitedCoords = limiter.fn({
|
|
1005
|
+
...state,
|
|
1006
|
+
[mainAxis]: mainAxisCoord,
|
|
1007
|
+
[crossAxis]: crossAxisCoord
|
|
1008
|
+
});
|
|
1009
|
+
return {
|
|
1010
|
+
...limitedCoords,
|
|
1011
|
+
data: {
|
|
1012
|
+
x: limitedCoords.x - x,
|
|
1013
|
+
y: limitedCoords.y - y,
|
|
1014
|
+
enabled: {
|
|
1015
|
+
[mainAxis]: checkMainAxis,
|
|
1016
|
+
[crossAxis]: checkCrossAxis
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
};
|
|
1022
|
+
};
|
|
1023
|
+
/**
|
|
1024
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
1025
|
+
*/
|
|
1026
|
+
const limitShift = function (options) {
|
|
1027
|
+
if (options === void 0) {
|
|
1028
|
+
options = {};
|
|
1029
|
+
}
|
|
1030
|
+
return {
|
|
1031
|
+
options,
|
|
1032
|
+
fn(state) {
|
|
1033
|
+
const {
|
|
1034
|
+
x,
|
|
1035
|
+
y,
|
|
1036
|
+
placement,
|
|
1037
|
+
rects,
|
|
1038
|
+
middlewareData
|
|
1039
|
+
} = state;
|
|
1040
|
+
const {
|
|
1041
|
+
offset = 0,
|
|
1042
|
+
mainAxis: checkMainAxis = true,
|
|
1043
|
+
crossAxis: checkCrossAxis = true
|
|
1044
|
+
} = evaluate(options, state);
|
|
1045
|
+
const coords = {
|
|
1046
|
+
x,
|
|
1047
|
+
y
|
|
1048
|
+
};
|
|
1049
|
+
const crossAxis = getSideAxis(placement);
|
|
1050
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
1051
|
+
let mainAxisCoord = coords[mainAxis];
|
|
1052
|
+
let crossAxisCoord = coords[crossAxis];
|
|
1053
|
+
const rawOffset = evaluate(offset, state);
|
|
1054
|
+
const computedOffset = typeof rawOffset === 'number' ? {
|
|
1055
|
+
mainAxis: rawOffset,
|
|
1056
|
+
crossAxis: 0
|
|
1057
|
+
} : {
|
|
1058
|
+
mainAxis: 0,
|
|
1059
|
+
crossAxis: 0,
|
|
1060
|
+
...rawOffset
|
|
1061
|
+
};
|
|
1062
|
+
if (checkMainAxis) {
|
|
1063
|
+
const len = mainAxis === 'y' ? 'height' : 'width';
|
|
1064
|
+
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
|
|
1065
|
+
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
|
|
1066
|
+
if (mainAxisCoord < limitMin) {
|
|
1067
|
+
mainAxisCoord = limitMin;
|
|
1068
|
+
} else if (mainAxisCoord > limitMax) {
|
|
1069
|
+
mainAxisCoord = limitMax;
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
if (checkCrossAxis) {
|
|
1073
|
+
var _middlewareData$offse, _middlewareData$offse2;
|
|
1074
|
+
const len = mainAxis === 'y' ? 'width' : 'height';
|
|
1075
|
+
const isOriginSide = ['top', 'left'].includes(getSide(placement));
|
|
1076
|
+
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
1077
|
+
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
1078
|
+
if (crossAxisCoord < limitMin) {
|
|
1079
|
+
crossAxisCoord = limitMin;
|
|
1080
|
+
} else if (crossAxisCoord > limitMax) {
|
|
1081
|
+
crossAxisCoord = limitMax;
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
return {
|
|
1085
|
+
[mainAxis]: mainAxisCoord,
|
|
1086
|
+
[crossAxis]: crossAxisCoord
|
|
1087
|
+
};
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
};
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* Provides data that allows you to change the size of the floating element —
|
|
1094
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
1095
|
+
* width of the reference element.
|
|
1096
|
+
* @see https://floating-ui.com/docs/size
|
|
1097
|
+
*/
|
|
1098
|
+
const size = function (options) {
|
|
1099
|
+
if (options === void 0) {
|
|
1100
|
+
options = {};
|
|
1101
|
+
}
|
|
1102
|
+
return {
|
|
1103
|
+
name: 'size',
|
|
1104
|
+
options,
|
|
1105
|
+
async fn(state) {
|
|
1106
|
+
var _state$middlewareData, _state$middlewareData2;
|
|
1107
|
+
const {
|
|
1108
|
+
placement,
|
|
1109
|
+
rects,
|
|
1110
|
+
platform,
|
|
1111
|
+
elements
|
|
1112
|
+
} = state;
|
|
1113
|
+
const {
|
|
1114
|
+
apply = () => {},
|
|
1115
|
+
...detectOverflowOptions
|
|
1116
|
+
} = evaluate(options, state);
|
|
1117
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
1118
|
+
const side = getSide(placement);
|
|
1119
|
+
const alignment = getAlignment(placement);
|
|
1120
|
+
const isYAxis = getSideAxis(placement) === 'y';
|
|
1121
|
+
const {
|
|
1122
|
+
width,
|
|
1123
|
+
height
|
|
1124
|
+
} = rects.floating;
|
|
1125
|
+
let heightSide;
|
|
1126
|
+
let widthSide;
|
|
1127
|
+
if (side === 'top' || side === 'bottom') {
|
|
1128
|
+
heightSide = side;
|
|
1129
|
+
widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
|
|
1130
|
+
} else {
|
|
1131
|
+
widthSide = side;
|
|
1132
|
+
heightSide = alignment === 'end' ? 'top' : 'bottom';
|
|
1133
|
+
}
|
|
1134
|
+
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
1135
|
+
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
1136
|
+
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
1137
|
+
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
1138
|
+
const noShift = !state.middlewareData.shift;
|
|
1139
|
+
let availableHeight = overflowAvailableHeight;
|
|
1140
|
+
let availableWidth = overflowAvailableWidth;
|
|
1141
|
+
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
1142
|
+
availableWidth = maximumClippingWidth;
|
|
1143
|
+
}
|
|
1144
|
+
if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
1145
|
+
availableHeight = maximumClippingHeight;
|
|
1146
|
+
}
|
|
1147
|
+
if (noShift && !alignment) {
|
|
1148
|
+
const xMin = max(overflow.left, 0);
|
|
1149
|
+
const xMax = max(overflow.right, 0);
|
|
1150
|
+
const yMin = max(overflow.top, 0);
|
|
1151
|
+
const yMax = max(overflow.bottom, 0);
|
|
1152
|
+
if (isYAxis) {
|
|
1153
|
+
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
1154
|
+
} else {
|
|
1155
|
+
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
await apply({
|
|
1159
|
+
...state,
|
|
1160
|
+
availableWidth,
|
|
1161
|
+
availableHeight
|
|
1162
|
+
});
|
|
1163
|
+
const nextDimensions = await platform.getDimensions(elements.floating);
|
|
1164
|
+
if (width !== nextDimensions.width || height !== nextDimensions.height) {
|
|
1165
|
+
return {
|
|
1166
|
+
reset: {
|
|
1167
|
+
rects: true
|
|
1168
|
+
}
|
|
1169
|
+
};
|
|
1170
|
+
}
|
|
1171
|
+
return {};
|
|
1172
|
+
}
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1175
|
+
|
|
1176
|
+
function hasWindow() {
|
|
1177
|
+
return typeof window !== 'undefined';
|
|
1178
|
+
}
|
|
1179
|
+
function getNodeName(node) {
|
|
1180
|
+
if (isNode(node)) {
|
|
1181
|
+
return (node.nodeName || '').toLowerCase();
|
|
1182
|
+
}
|
|
1183
|
+
// Mocked nodes in testing environments may not be instances of Node. By
|
|
1184
|
+
// returning `#document` an infinite loop won't occur.
|
|
1185
|
+
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
1186
|
+
return '#document';
|
|
1187
|
+
}
|
|
1188
|
+
function getWindow(node) {
|
|
1189
|
+
var _node$ownerDocument;
|
|
1190
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
1191
|
+
}
|
|
1192
|
+
function getDocumentElement(node) {
|
|
1193
|
+
var _ref;
|
|
1194
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
1195
|
+
}
|
|
1196
|
+
function isNode(value) {
|
|
1197
|
+
if (!hasWindow()) {
|
|
1198
|
+
return false;
|
|
1199
|
+
}
|
|
1200
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
1201
|
+
}
|
|
1202
|
+
function isElement(value) {
|
|
1203
|
+
if (!hasWindow()) {
|
|
1204
|
+
return false;
|
|
1205
|
+
}
|
|
1206
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
1207
|
+
}
|
|
1208
|
+
function isHTMLElement(value) {
|
|
1209
|
+
if (!hasWindow()) {
|
|
1210
|
+
return false;
|
|
1211
|
+
}
|
|
1212
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
1213
|
+
}
|
|
1214
|
+
function isShadowRoot(value) {
|
|
1215
|
+
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
1216
|
+
return false;
|
|
1217
|
+
}
|
|
1218
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
1219
|
+
}
|
|
1220
|
+
function isOverflowElement(element) {
|
|
1221
|
+
const {
|
|
1222
|
+
overflow,
|
|
1223
|
+
overflowX,
|
|
1224
|
+
overflowY,
|
|
1225
|
+
display
|
|
1226
|
+
} = getComputedStyle(element);
|
|
1227
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
|
|
1228
|
+
}
|
|
1229
|
+
function isTableElement(element) {
|
|
1230
|
+
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
1231
|
+
}
|
|
1232
|
+
function isTopLayer(element) {
|
|
1233
|
+
return [':popover-open', ':modal'].some(selector => {
|
|
1234
|
+
try {
|
|
1235
|
+
return element.matches(selector);
|
|
1236
|
+
} catch (e) {
|
|
1237
|
+
return false;
|
|
1238
|
+
}
|
|
1239
|
+
});
|
|
1240
|
+
}
|
|
1241
|
+
function isContainingBlock(elementOrCss) {
|
|
1242
|
+
const webkit = isWebKit();
|
|
1243
|
+
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
1244
|
+
|
|
1245
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1246
|
+
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
1247
|
+
return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
1248
|
+
}
|
|
1249
|
+
function getContainingBlock(element) {
|
|
1250
|
+
let currentNode = getParentNode(element);
|
|
1251
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1252
|
+
if (isContainingBlock(currentNode)) {
|
|
1253
|
+
return currentNode;
|
|
1254
|
+
} else if (isTopLayer(currentNode)) {
|
|
1255
|
+
return null;
|
|
1256
|
+
}
|
|
1257
|
+
currentNode = getParentNode(currentNode);
|
|
1258
|
+
}
|
|
1259
|
+
return null;
|
|
1260
|
+
}
|
|
1261
|
+
function isWebKit() {
|
|
1262
|
+
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
1263
|
+
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
1264
|
+
}
|
|
1265
|
+
function isLastTraversableNode(node) {
|
|
1266
|
+
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
1267
|
+
}
|
|
1268
|
+
function getComputedStyle(element) {
|
|
1269
|
+
return getWindow(element).getComputedStyle(element);
|
|
1270
|
+
}
|
|
1271
|
+
function getNodeScroll(element) {
|
|
1272
|
+
if (isElement(element)) {
|
|
1273
|
+
return {
|
|
1274
|
+
scrollLeft: element.scrollLeft,
|
|
1275
|
+
scrollTop: element.scrollTop
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
return {
|
|
1279
|
+
scrollLeft: element.scrollX,
|
|
1280
|
+
scrollTop: element.scrollY
|
|
1281
|
+
};
|
|
1282
|
+
}
|
|
1283
|
+
function getParentNode(node) {
|
|
1284
|
+
if (getNodeName(node) === 'html') {
|
|
1285
|
+
return node;
|
|
1286
|
+
}
|
|
1287
|
+
const result =
|
|
1288
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
1289
|
+
node.assignedSlot ||
|
|
1290
|
+
// DOM Element detected.
|
|
1291
|
+
node.parentNode ||
|
|
1292
|
+
// ShadowRoot detected.
|
|
1293
|
+
isShadowRoot(node) && node.host ||
|
|
1294
|
+
// Fallback.
|
|
1295
|
+
getDocumentElement(node);
|
|
1296
|
+
return isShadowRoot(result) ? result.host : result;
|
|
1297
|
+
}
|
|
1298
|
+
function getNearestOverflowAncestor(node) {
|
|
1299
|
+
const parentNode = getParentNode(node);
|
|
1300
|
+
if (isLastTraversableNode(parentNode)) {
|
|
1301
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
1302
|
+
}
|
|
1303
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
1304
|
+
return parentNode;
|
|
1305
|
+
}
|
|
1306
|
+
return getNearestOverflowAncestor(parentNode);
|
|
1307
|
+
}
|
|
1308
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
1309
|
+
var _node$ownerDocument2;
|
|
1310
|
+
if (list === void 0) {
|
|
1311
|
+
list = [];
|
|
1312
|
+
}
|
|
1313
|
+
if (traverseIframes === void 0) {
|
|
1314
|
+
traverseIframes = true;
|
|
1315
|
+
}
|
|
1316
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1317
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
1318
|
+
const win = getWindow(scrollableAncestor);
|
|
1319
|
+
if (isBody) {
|
|
1320
|
+
const frameElement = getFrameElement(win);
|
|
1321
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
1322
|
+
}
|
|
1323
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
1324
|
+
}
|
|
1325
|
+
function getFrameElement(win) {
|
|
1326
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
function getCssDimensions(element) {
|
|
1330
|
+
const css = getComputedStyle(element);
|
|
1331
|
+
// In testing environments, the `width` and `height` properties are empty
|
|
1332
|
+
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
1333
|
+
let width = parseFloat(css.width) || 0;
|
|
1334
|
+
let height = parseFloat(css.height) || 0;
|
|
1335
|
+
const hasOffset = isHTMLElement(element);
|
|
1336
|
+
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
1337
|
+
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
1338
|
+
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
1339
|
+
if (shouldFallback) {
|
|
1340
|
+
width = offsetWidth;
|
|
1341
|
+
height = offsetHeight;
|
|
1342
|
+
}
|
|
1343
|
+
return {
|
|
1344
|
+
width,
|
|
1345
|
+
height,
|
|
1346
|
+
$: shouldFallback
|
|
1347
|
+
};
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
function unwrapElement(element) {
|
|
1351
|
+
return !isElement(element) ? element.contextElement : element;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
function getScale(element) {
|
|
1355
|
+
const domElement = unwrapElement(element);
|
|
1356
|
+
if (!isHTMLElement(domElement)) {
|
|
1357
|
+
return createCoords(1);
|
|
1358
|
+
}
|
|
1359
|
+
const rect = domElement.getBoundingClientRect();
|
|
1360
|
+
const {
|
|
1361
|
+
width,
|
|
1362
|
+
height,
|
|
1363
|
+
$
|
|
1364
|
+
} = getCssDimensions(domElement);
|
|
1365
|
+
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
1366
|
+
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
1367
|
+
|
|
1368
|
+
// 0, NaN, or Infinity should always fallback to 1.
|
|
1369
|
+
|
|
1370
|
+
if (!x || !Number.isFinite(x)) {
|
|
1371
|
+
x = 1;
|
|
1372
|
+
}
|
|
1373
|
+
if (!y || !Number.isFinite(y)) {
|
|
1374
|
+
y = 1;
|
|
1375
|
+
}
|
|
1376
|
+
return {
|
|
1377
|
+
x,
|
|
1378
|
+
y
|
|
1379
|
+
};
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
1383
|
+
function getVisualOffsets(element) {
|
|
1384
|
+
const win = getWindow(element);
|
|
1385
|
+
if (!isWebKit() || !win.visualViewport) {
|
|
1386
|
+
return noOffsets;
|
|
1387
|
+
}
|
|
1388
|
+
return {
|
|
1389
|
+
x: win.visualViewport.offsetLeft,
|
|
1390
|
+
y: win.visualViewport.offsetTop
|
|
1391
|
+
};
|
|
1392
|
+
}
|
|
1393
|
+
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
1394
|
+
if (isFixed === void 0) {
|
|
1395
|
+
isFixed = false;
|
|
1396
|
+
}
|
|
1397
|
+
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
1398
|
+
return false;
|
|
1399
|
+
}
|
|
1400
|
+
return isFixed;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
1404
|
+
if (includeScale === void 0) {
|
|
1405
|
+
includeScale = false;
|
|
1406
|
+
}
|
|
1407
|
+
if (isFixedStrategy === void 0) {
|
|
1408
|
+
isFixedStrategy = false;
|
|
1409
|
+
}
|
|
1410
|
+
const clientRect = element.getBoundingClientRect();
|
|
1411
|
+
const domElement = unwrapElement(element);
|
|
1412
|
+
let scale = createCoords(1);
|
|
1413
|
+
if (includeScale) {
|
|
1414
|
+
if (offsetParent) {
|
|
1415
|
+
if (isElement(offsetParent)) {
|
|
1416
|
+
scale = getScale(offsetParent);
|
|
1417
|
+
}
|
|
1418
|
+
} else {
|
|
1419
|
+
scale = getScale(element);
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
1423
|
+
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
1424
|
+
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
1425
|
+
let width = clientRect.width / scale.x;
|
|
1426
|
+
let height = clientRect.height / scale.y;
|
|
1427
|
+
if (domElement) {
|
|
1428
|
+
const win = getWindow(domElement);
|
|
1429
|
+
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
1430
|
+
let currentWin = win;
|
|
1431
|
+
let currentIFrame = getFrameElement(currentWin);
|
|
1432
|
+
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
1433
|
+
const iframeScale = getScale(currentIFrame);
|
|
1434
|
+
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1435
|
+
const css = getComputedStyle(currentIFrame);
|
|
1436
|
+
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
1437
|
+
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
1438
|
+
x *= iframeScale.x;
|
|
1439
|
+
y *= iframeScale.y;
|
|
1440
|
+
width *= iframeScale.x;
|
|
1441
|
+
height *= iframeScale.y;
|
|
1442
|
+
x += left;
|
|
1443
|
+
y += top;
|
|
1444
|
+
currentWin = getWindow(currentIFrame);
|
|
1445
|
+
currentIFrame = getFrameElement(currentWin);
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
return rectToClientRect({
|
|
1449
|
+
width,
|
|
1450
|
+
height,
|
|
1451
|
+
x,
|
|
1452
|
+
y
|
|
1453
|
+
});
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
|
1457
|
+
// incorrect for RTL.
|
|
1458
|
+
function getWindowScrollBarX(element, rect) {
|
|
1459
|
+
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
1460
|
+
if (!rect) {
|
|
1461
|
+
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
1462
|
+
}
|
|
1463
|
+
return rect.left + leftScroll;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
1467
|
+
if (ignoreScrollbarX === void 0) {
|
|
1468
|
+
ignoreScrollbarX = false;
|
|
1469
|
+
}
|
|
1470
|
+
const htmlRect = documentElement.getBoundingClientRect();
|
|
1471
|
+
const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
|
|
1472
|
+
// RTL <body> scrollbar.
|
|
1473
|
+
getWindowScrollBarX(documentElement, htmlRect));
|
|
1474
|
+
const y = htmlRect.top + scroll.scrollTop;
|
|
1475
|
+
return {
|
|
1476
|
+
x,
|
|
1477
|
+
y
|
|
1478
|
+
};
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
1482
|
+
let {
|
|
1483
|
+
elements,
|
|
1484
|
+
rect,
|
|
1485
|
+
offsetParent,
|
|
1486
|
+
strategy
|
|
1487
|
+
} = _ref;
|
|
1488
|
+
const isFixed = strategy === 'fixed';
|
|
1489
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
1490
|
+
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
1491
|
+
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
1492
|
+
return rect;
|
|
1493
|
+
}
|
|
1494
|
+
let scroll = {
|
|
1495
|
+
scrollLeft: 0,
|
|
1496
|
+
scrollTop: 0
|
|
1497
|
+
};
|
|
1498
|
+
let scale = createCoords(1);
|
|
1499
|
+
const offsets = createCoords(0);
|
|
1500
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1501
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1502
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1503
|
+
scroll = getNodeScroll(offsetParent);
|
|
1504
|
+
}
|
|
1505
|
+
if (isHTMLElement(offsetParent)) {
|
|
1506
|
+
const offsetRect = getBoundingClientRect(offsetParent);
|
|
1507
|
+
scale = getScale(offsetParent);
|
|
1508
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1509
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
|
|
1513
|
+
return {
|
|
1514
|
+
width: rect.width * scale.x,
|
|
1515
|
+
height: rect.height * scale.y,
|
|
1516
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
1517
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
1518
|
+
};
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
function getClientRects(element) {
|
|
1522
|
+
return Array.from(element.getClientRects());
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
// Gets the entire size of the scrollable document area, even extending outside
|
|
1526
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
1527
|
+
function getDocumentRect(element) {
|
|
1528
|
+
const html = getDocumentElement(element);
|
|
1529
|
+
const scroll = getNodeScroll(element);
|
|
1530
|
+
const body = element.ownerDocument.body;
|
|
1531
|
+
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
1532
|
+
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1533
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
1534
|
+
const y = -scroll.scrollTop;
|
|
1535
|
+
if (getComputedStyle(body).direction === 'rtl') {
|
|
1536
|
+
x += max(html.clientWidth, body.clientWidth) - width;
|
|
1537
|
+
}
|
|
1538
|
+
return {
|
|
1539
|
+
width,
|
|
1540
|
+
height,
|
|
1541
|
+
x,
|
|
1542
|
+
y
|
|
1543
|
+
};
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
function getViewportRect(element, strategy) {
|
|
1547
|
+
const win = getWindow(element);
|
|
1548
|
+
const html = getDocumentElement(element);
|
|
1549
|
+
const visualViewport = win.visualViewport;
|
|
1550
|
+
let width = html.clientWidth;
|
|
1551
|
+
let height = html.clientHeight;
|
|
1552
|
+
let x = 0;
|
|
1553
|
+
let y = 0;
|
|
1554
|
+
if (visualViewport) {
|
|
1555
|
+
width = visualViewport.width;
|
|
1556
|
+
height = visualViewport.height;
|
|
1557
|
+
const visualViewportBased = isWebKit();
|
|
1558
|
+
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
|
1559
|
+
x = visualViewport.offsetLeft;
|
|
1560
|
+
y = visualViewport.offsetTop;
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
return {
|
|
1564
|
+
width,
|
|
1565
|
+
height,
|
|
1566
|
+
x,
|
|
1567
|
+
y
|
|
1568
|
+
};
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
// Returns the inner client rect, subtracting scrollbars if present.
|
|
1572
|
+
function getInnerBoundingClientRect(element, strategy) {
|
|
1573
|
+
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
1574
|
+
const top = clientRect.top + element.clientTop;
|
|
1575
|
+
const left = clientRect.left + element.clientLeft;
|
|
1576
|
+
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
1577
|
+
const width = element.clientWidth * scale.x;
|
|
1578
|
+
const height = element.clientHeight * scale.y;
|
|
1579
|
+
const x = left * scale.x;
|
|
1580
|
+
const y = top * scale.y;
|
|
1581
|
+
return {
|
|
1582
|
+
width,
|
|
1583
|
+
height,
|
|
1584
|
+
x,
|
|
1585
|
+
y
|
|
1586
|
+
};
|
|
1587
|
+
}
|
|
1588
|
+
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
1589
|
+
let rect;
|
|
1590
|
+
if (clippingAncestor === 'viewport') {
|
|
1591
|
+
rect = getViewportRect(element, strategy);
|
|
1592
|
+
} else if (clippingAncestor === 'document') {
|
|
1593
|
+
rect = getDocumentRect(getDocumentElement(element));
|
|
1594
|
+
} else if (isElement(clippingAncestor)) {
|
|
1595
|
+
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
1596
|
+
} else {
|
|
1597
|
+
const visualOffsets = getVisualOffsets(element);
|
|
1598
|
+
rect = {
|
|
1599
|
+
x: clippingAncestor.x - visualOffsets.x,
|
|
1600
|
+
y: clippingAncestor.y - visualOffsets.y,
|
|
1601
|
+
width: clippingAncestor.width,
|
|
1602
|
+
height: clippingAncestor.height
|
|
1603
|
+
};
|
|
1604
|
+
}
|
|
1605
|
+
return rectToClientRect(rect);
|
|
1606
|
+
}
|
|
1607
|
+
function hasFixedPositionAncestor(element, stopNode) {
|
|
1608
|
+
const parentNode = getParentNode(element);
|
|
1609
|
+
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
1610
|
+
return false;
|
|
1611
|
+
}
|
|
1612
|
+
return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
1616
|
+
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
1617
|
+
// of the given element up the tree.
|
|
1618
|
+
function getClippingElementAncestors(element, cache) {
|
|
1619
|
+
const cachedResult = cache.get(element);
|
|
1620
|
+
if (cachedResult) {
|
|
1621
|
+
return cachedResult;
|
|
1622
|
+
}
|
|
1623
|
+
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
1624
|
+
let currentContainingBlockComputedStyle = null;
|
|
1625
|
+
const elementIsFixed = getComputedStyle(element).position === 'fixed';
|
|
1626
|
+
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
1627
|
+
|
|
1628
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1629
|
+
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1630
|
+
const computedStyle = getComputedStyle(currentNode);
|
|
1631
|
+
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1632
|
+
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
1633
|
+
currentContainingBlockComputedStyle = null;
|
|
1634
|
+
}
|
|
1635
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
1636
|
+
if (shouldDropCurrentNode) {
|
|
1637
|
+
// Drop non-containing blocks.
|
|
1638
|
+
result = result.filter(ancestor => ancestor !== currentNode);
|
|
1639
|
+
} else {
|
|
1640
|
+
// Record last containing block for next iteration.
|
|
1641
|
+
currentContainingBlockComputedStyle = computedStyle;
|
|
1642
|
+
}
|
|
1643
|
+
currentNode = getParentNode(currentNode);
|
|
1644
|
+
}
|
|
1645
|
+
cache.set(element, result);
|
|
1646
|
+
return result;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
// Gets the maximum area that the element is visible in due to any number of
|
|
1650
|
+
// clipping ancestors.
|
|
1651
|
+
function getClippingRect(_ref) {
|
|
1652
|
+
let {
|
|
1653
|
+
element,
|
|
1654
|
+
boundary,
|
|
1655
|
+
rootBoundary,
|
|
1656
|
+
strategy
|
|
1657
|
+
} = _ref;
|
|
1658
|
+
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
1659
|
+
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
1660
|
+
const firstClippingAncestor = clippingAncestors[0];
|
|
1661
|
+
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
1662
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
1663
|
+
accRect.top = max(rect.top, accRect.top);
|
|
1664
|
+
accRect.right = min(rect.right, accRect.right);
|
|
1665
|
+
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
1666
|
+
accRect.left = max(rect.left, accRect.left);
|
|
1667
|
+
return accRect;
|
|
1668
|
+
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
1669
|
+
return {
|
|
1670
|
+
width: clippingRect.right - clippingRect.left,
|
|
1671
|
+
height: clippingRect.bottom - clippingRect.top,
|
|
1672
|
+
x: clippingRect.left,
|
|
1673
|
+
y: clippingRect.top
|
|
1674
|
+
};
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
function getDimensions(element) {
|
|
1678
|
+
const {
|
|
1679
|
+
width,
|
|
1680
|
+
height
|
|
1681
|
+
} = getCssDimensions(element);
|
|
1682
|
+
return {
|
|
1683
|
+
width,
|
|
1684
|
+
height
|
|
1685
|
+
};
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
1689
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1690
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
1691
|
+
const isFixed = strategy === 'fixed';
|
|
1692
|
+
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
1693
|
+
let scroll = {
|
|
1694
|
+
scrollLeft: 0,
|
|
1695
|
+
scrollTop: 0
|
|
1696
|
+
};
|
|
1697
|
+
const offsets = createCoords(0);
|
|
1698
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1699
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1700
|
+
scroll = getNodeScroll(offsetParent);
|
|
1701
|
+
}
|
|
1702
|
+
if (isOffsetParentAnElement) {
|
|
1703
|
+
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
1704
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1705
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1706
|
+
} else if (documentElement) {
|
|
1707
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1708
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1709
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1713
|
+
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
1714
|
+
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
1715
|
+
return {
|
|
1716
|
+
x,
|
|
1717
|
+
y,
|
|
1718
|
+
width: rect.width,
|
|
1719
|
+
height: rect.height
|
|
1720
|
+
};
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
function isStaticPositioned(element) {
|
|
1724
|
+
return getComputedStyle(element).position === 'static';
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
function getTrueOffsetParent(element, polyfill) {
|
|
1728
|
+
if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
|
|
1729
|
+
return null;
|
|
1730
|
+
}
|
|
1731
|
+
if (polyfill) {
|
|
1732
|
+
return polyfill(element);
|
|
1733
|
+
}
|
|
1734
|
+
let rawOffsetParent = element.offsetParent;
|
|
1735
|
+
|
|
1736
|
+
// Firefox returns the <html> element as the offsetParent if it's non-static,
|
|
1737
|
+
// while Chrome and Safari return the <body> element. The <body> element must
|
|
1738
|
+
// be used to perform the correct calculations even if the <html> element is
|
|
1739
|
+
// non-static.
|
|
1740
|
+
if (getDocumentElement(element) === rawOffsetParent) {
|
|
1741
|
+
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
1742
|
+
}
|
|
1743
|
+
return rawOffsetParent;
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1747
|
+
// such as table ancestors and cross browser bugs.
|
|
1748
|
+
function getOffsetParent(element, polyfill) {
|
|
1749
|
+
const win = getWindow(element);
|
|
1750
|
+
if (isTopLayer(element)) {
|
|
1751
|
+
return win;
|
|
1752
|
+
}
|
|
1753
|
+
if (!isHTMLElement(element)) {
|
|
1754
|
+
let svgOffsetParent = getParentNode(element);
|
|
1755
|
+
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
1756
|
+
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
1757
|
+
return svgOffsetParent;
|
|
1758
|
+
}
|
|
1759
|
+
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
1760
|
+
}
|
|
1761
|
+
return win;
|
|
1762
|
+
}
|
|
1763
|
+
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
1764
|
+
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
|
1765
|
+
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
1766
|
+
}
|
|
1767
|
+
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
|
|
1768
|
+
return win;
|
|
1769
|
+
}
|
|
1770
|
+
return offsetParent || getContainingBlock(element) || win;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
const getElementRects = async function (data) {
|
|
1774
|
+
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
1775
|
+
const getDimensionsFn = this.getDimensions;
|
|
1776
|
+
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
1777
|
+
return {
|
|
1778
|
+
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
1779
|
+
floating: {
|
|
1780
|
+
x: 0,
|
|
1781
|
+
y: 0,
|
|
1782
|
+
width: floatingDimensions.width,
|
|
1783
|
+
height: floatingDimensions.height
|
|
1784
|
+
}
|
|
1785
|
+
};
|
|
1786
|
+
};
|
|
1787
|
+
|
|
1788
|
+
function isRTL(element) {
|
|
1789
|
+
return getComputedStyle(element).direction === 'rtl';
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
const platform = {
|
|
1793
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1794
|
+
getDocumentElement,
|
|
1795
|
+
getClippingRect,
|
|
1796
|
+
getOffsetParent,
|
|
1797
|
+
getElementRects,
|
|
1798
|
+
getClientRects,
|
|
1799
|
+
getDimensions,
|
|
1800
|
+
getScale,
|
|
1801
|
+
isElement,
|
|
1802
|
+
isRTL
|
|
1803
|
+
};
|
|
1804
|
+
|
|
1805
|
+
/**
|
|
1806
|
+
* Modifies the placement by translating the floating element along the
|
|
1807
|
+
* specified axes.
|
|
1808
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
1809
|
+
* object may be passed.
|
|
1810
|
+
* @see https://floating-ui.com/docs/offset
|
|
1811
|
+
*/
|
|
1812
|
+
const offset = offset$1;
|
|
1813
|
+
|
|
1814
|
+
/**
|
|
1815
|
+
* Optimizes the visibility of the floating element by choosing the placement
|
|
1816
|
+
* that has the most space available automatically, without needing to specify a
|
|
1817
|
+
* preferred placement. Alternative to `flip`.
|
|
1818
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
1819
|
+
*/
|
|
1820
|
+
const autoPlacement = autoPlacement$1;
|
|
1821
|
+
|
|
1822
|
+
/**
|
|
1823
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
1824
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
1825
|
+
* @see https://floating-ui.com/docs/shift
|
|
1826
|
+
*/
|
|
1827
|
+
const shift = shift$1;
|
|
1828
|
+
|
|
1829
|
+
/**
|
|
1830
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
1831
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
1832
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
1833
|
+
* @see https://floating-ui.com/docs/flip
|
|
1834
|
+
*/
|
|
1835
|
+
const flip = flip$1;
|
|
1836
|
+
|
|
1837
|
+
/**
|
|
1838
|
+
* Provides data that allows you to change the size of the floating element —
|
|
1839
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
1840
|
+
* width of the reference element.
|
|
1841
|
+
* @see https://floating-ui.com/docs/size
|
|
1842
|
+
*/
|
|
1843
|
+
size;
|
|
1844
|
+
|
|
1845
|
+
/**
|
|
1846
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
1847
|
+
* when it is not in the same clipping context as the reference element.
|
|
1848
|
+
* @see https://floating-ui.com/docs/hide
|
|
1849
|
+
*/
|
|
1850
|
+
const hide = hide$1;
|
|
1851
|
+
|
|
1852
|
+
/**
|
|
1853
|
+
* Provides data to position an inner element of the floating element so that it
|
|
1854
|
+
* appears centered to the reference element.
|
|
1855
|
+
* @see https://floating-ui.com/docs/arrow
|
|
1856
|
+
*/
|
|
1857
|
+
const arrow = arrow$1;
|
|
1858
|
+
|
|
1859
|
+
/**
|
|
1860
|
+
* Provides improved positioning for inline reference elements that can span
|
|
1861
|
+
* over multiple lines, such as hyperlinks or range selections.
|
|
1862
|
+
* @see https://floating-ui.com/docs/inline
|
|
1863
|
+
*/
|
|
1864
|
+
inline;
|
|
1865
|
+
|
|
1866
|
+
/**
|
|
1867
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
1868
|
+
*/
|
|
1869
|
+
limitShift;
|
|
1870
|
+
|
|
1871
|
+
/**
|
|
1872
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
1873
|
+
* next to a given reference element.
|
|
1874
|
+
*/
|
|
1875
|
+
const computePosition = (reference, floating, options) => {
|
|
1876
|
+
// This caches the expensive `getClippingElementAncestors` function so that
|
|
1877
|
+
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
1878
|
+
// single call. If other functions become expensive, we can add them as well.
|
|
1879
|
+
const cache = new Map();
|
|
1880
|
+
const mergedOptions = {
|
|
1881
|
+
platform,
|
|
1882
|
+
...options
|
|
1883
|
+
};
|
|
1884
|
+
const platformWithCache = {
|
|
1885
|
+
...mergedOptions.platform,
|
|
1886
|
+
_c: cache
|
|
1887
|
+
};
|
|
1888
|
+
return computePosition$1(reference, floating, {
|
|
1889
|
+
...mergedOptions,
|
|
1890
|
+
platform: platformWithCache
|
|
1891
|
+
});
|
|
1892
|
+
};
|
|
1893
|
+
|
|
1894
|
+
exports.arrow = arrow;
|
|
1895
|
+
exports.autoPlacement = autoPlacement;
|
|
1896
|
+
exports.computePosition = computePosition;
|
|
1897
|
+
exports.flip = flip;
|
|
1898
|
+
exports.hide = hide;
|
|
1899
|
+
exports.offset = offset;
|
|
1900
|
+
exports.shift = shift;
|