@streamplace/components 0.8.9 → 0.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/chat/chat-box.d.ts +8 -0
- package/dist/components/chat/chat-box.d.ts.map +1 -0
- package/dist/components/chat/chat-box.js +19 -2
- package/dist/components/chat/chat-box.js.map +1 -0
- package/dist/components/chat/chat-message.d.ts +8 -0
- package/dist/components/chat/chat-message.d.ts.map +1 -0
- package/dist/components/chat/chat-message.js +6 -4
- package/dist/components/chat/chat-message.js.map +1 -0
- package/dist/components/chat/chat.d.ts +7 -0
- package/dist/components/chat/chat.d.ts.map +1 -0
- package/dist/components/chat/chat.js +1 -0
- package/dist/components/chat/chat.js.map +1 -0
- package/dist/components/chat/emoji-suggestions.d.ts +38 -0
- package/dist/components/chat/emoji-suggestions.d.ts.map +1 -0
- package/dist/components/chat/emoji-suggestions.js +1 -0
- package/dist/components/chat/emoji-suggestions.js.map +1 -0
- package/dist/components/chat/mention-suggestions.d.ts +9 -0
- package/dist/components/chat/mention-suggestions.d.ts.map +1 -0
- package/dist/components/chat/mention-suggestions.js +1 -0
- package/dist/components/chat/mention-suggestions.js.map +1 -0
- package/dist/components/chat/mod-view.d.ts +20 -0
- package/dist/components/chat/mod-view.d.ts.map +1 -0
- package/dist/components/chat/mod-view.js +5 -3
- package/dist/components/chat/mod-view.js.map +1 -0
- package/dist/components/chat/system-message.d.ts +7 -0
- package/dist/components/chat/system-message.d.ts.map +1 -0
- package/dist/components/chat/system-message.js +1 -0
- package/dist/components/chat/system-message.js.map +1 -0
- package/dist/components/content-metadata/content-metadata-form.d.ts +9 -0
- package/dist/components/content-metadata/content-metadata-form.d.ts.map +1 -0
- package/dist/components/content-metadata/content-metadata-form.js +4 -2
- package/dist/components/content-metadata/content-metadata-form.js.map +1 -0
- package/dist/components/content-metadata/content-rights.d.ts +14 -0
- package/dist/components/content-metadata/content-rights.d.ts.map +1 -0
- package/dist/components/content-metadata/content-rights.js +1 -0
- package/dist/components/content-metadata/content-rights.js.map +1 -0
- package/dist/components/content-metadata/content-warning-badge.d.ts +5 -0
- package/dist/components/content-metadata/content-warning-badge.d.ts.map +1 -0
- package/dist/components/content-metadata/content-warning-badge.js +1 -0
- package/dist/components/content-metadata/content-warning-badge.js.map +1 -0
- package/dist/components/content-metadata/content-warnings.d.ts +7 -0
- package/dist/components/content-metadata/content-warnings.d.ts.map +1 -0
- package/dist/components/content-metadata/content-warnings.js +1 -0
- package/dist/components/content-metadata/content-warnings.js.map +1 -0
- package/dist/components/content-metadata/index.d.ts +8 -0
- package/dist/components/content-metadata/index.d.ts.map +1 -0
- package/dist/components/content-metadata/index.js +1 -0
- package/dist/components/content-metadata/index.js.map +1 -0
- package/dist/components/danmu/danmu-message.d.ts +17 -0
- package/dist/components/danmu/danmu-message.d.ts.map +1 -0
- package/dist/components/danmu/danmu-message.js +112 -0
- package/dist/components/danmu/danmu-message.js.map +1 -0
- package/dist/components/danmu/danmu-overlay-obs.d.ts +11 -0
- package/dist/components/danmu/danmu-overlay-obs.d.ts.map +1 -0
- package/dist/components/danmu/danmu-overlay-obs.js +21 -0
- package/dist/components/danmu/danmu-overlay-obs.js.map +1 -0
- package/dist/components/danmu/danmu-overlay.d.ts +10 -0
- package/dist/components/danmu/danmu-overlay.d.ts.map +1 -0
- package/dist/components/danmu/danmu-overlay.js +150 -0
- package/dist/components/danmu/danmu-overlay.js.map +1 -0
- package/dist/components/danmu/math.d.ts +10 -0
- package/dist/components/danmu/math.d.ts.map +1 -0
- package/dist/components/danmu/math.js +16 -0
- package/dist/components/danmu/math.js.map +1 -0
- package/dist/components/danmu/mu.d.ts +9 -0
- package/dist/components/danmu/mu.d.ts.map +1 -0
- package/dist/components/danmu/mu.js +9 -0
- package/dist/components/danmu/mu.js.map +1 -0
- package/dist/components/danmu/use-danmu-lanes.d.ts +19 -0
- package/dist/components/danmu/use-danmu-lanes.d.ts.map +1 -0
- package/dist/components/danmu/use-danmu-lanes.js +77 -0
- package/dist/components/danmu/use-danmu-lanes.js.map +1 -0
- package/dist/components/dashboard/chat-panel.d.ts +9 -0
- package/dist/components/dashboard/chat-panel.d.ts.map +1 -0
- package/dist/components/dashboard/chat-panel.js +1 -0
- package/dist/components/dashboard/chat-panel.js.map +1 -0
- package/dist/components/dashboard/header.d.ts +14 -0
- package/dist/components/dashboard/header.d.ts.map +1 -0
- package/dist/components/dashboard/header.js +1 -0
- package/dist/components/dashboard/header.js.map +1 -0
- package/dist/components/dashboard/index.d.ts +6 -0
- package/dist/components/dashboard/index.d.ts.map +1 -0
- package/dist/components/dashboard/index.js +1 -0
- package/dist/components/dashboard/index.js.map +1 -0
- package/dist/components/dashboard/information-widget.d.ts +9 -0
- package/dist/components/dashboard/information-widget.d.ts.map +1 -0
- package/dist/components/dashboard/information-widget.js +1 -0
- package/dist/components/dashboard/information-widget.js.map +1 -0
- package/dist/components/dashboard/mod-actions.d.ts +15 -0
- package/dist/components/dashboard/mod-actions.d.ts.map +1 -0
- package/dist/components/dashboard/mod-actions.js +1 -0
- package/dist/components/dashboard/mod-actions.js.map +1 -0
- package/dist/components/dashboard/problems.d.ts +13 -0
- package/dist/components/dashboard/problems.d.ts.map +1 -0
- package/dist/components/dashboard/problems.js +1 -0
- package/dist/components/dashboard/problems.js.map +1 -0
- package/dist/components/icons/bluesky-icon.d.ts +5 -0
- package/dist/components/icons/bluesky-icon.d.ts.map +1 -0
- package/dist/components/icons/bluesky-icon.js +1 -0
- package/dist/components/icons/bluesky-icon.js.map +1 -0
- package/dist/components/keep-awake.d.ts +2 -0
- package/dist/components/keep-awake.d.ts.map +1 -0
- package/dist/components/keep-awake.js +1 -0
- package/dist/components/keep-awake.js.map +1 -0
- package/dist/components/keep-awake.native.d.ts +2 -0
- package/dist/components/keep-awake.native.d.ts.map +1 -0
- package/dist/components/keep-awake.native.js +1 -0
- package/dist/components/keep-awake.native.js.map +1 -0
- package/dist/components/mobile-player/fullscreen.d.ts +7 -0
- package/dist/components/mobile-player/fullscreen.d.ts.map +1 -0
- package/dist/components/mobile-player/fullscreen.js +7 -1
- package/dist/components/mobile-player/fullscreen.js.map +1 -0
- package/dist/components/mobile-player/fullscreen.native.d.ts +7 -0
- package/dist/components/mobile-player/fullscreen.native.d.ts.map +1 -0
- package/dist/components/mobile-player/fullscreen.native.js +8 -2
- package/dist/components/mobile-player/fullscreen.native.js.map +1 -0
- package/dist/components/mobile-player/player.d.ts +8 -0
- package/dist/components/mobile-player/player.d.ts.map +1 -0
- package/dist/components/mobile-player/player.js +1 -0
- package/dist/components/mobile-player/player.js.map +1 -0
- package/dist/components/mobile-player/props.d.ts +19 -0
- package/dist/components/mobile-player/props.d.ts.map +1 -0
- package/dist/components/mobile-player/props.js +1 -0
- package/dist/components/mobile-player/props.js.map +1 -0
- package/dist/components/mobile-player/rotation-async.native.d.ts +4 -0
- package/dist/components/mobile-player/rotation-async.native.d.ts.map +1 -0
- package/dist/components/mobile-player/rotation-async.native.js +1 -0
- package/dist/components/mobile-player/rotation-async.native.js.map +1 -0
- package/dist/components/mobile-player/rotation-lock.d.ts +18 -0
- package/dist/components/mobile-player/rotation-lock.d.ts.map +1 -0
- package/dist/components/mobile-player/rotation-lock.js +1 -0
- package/dist/components/mobile-player/rotation-lock.js.map +1 -0
- package/dist/components/mobile-player/shared.d.ts +9 -0
- package/dist/components/mobile-player/shared.d.ts.map +1 -0
- package/dist/components/mobile-player/shared.js +1 -0
- package/dist/components/mobile-player/shared.js.map +1 -0
- package/dist/components/mobile-player/ui/autoplay-button.d.ts +2 -0
- package/dist/components/mobile-player/ui/autoplay-button.d.ts.map +1 -0
- package/dist/components/mobile-player/ui/autoplay-button.js +1 -0
- package/dist/components/mobile-player/ui/autoplay-button.js.map +1 -0
- package/dist/components/mobile-player/ui/countdown.d.ts +10 -0
- package/dist/components/mobile-player/ui/countdown.d.ts.map +1 -0
- package/dist/components/mobile-player/ui/countdown.js +1 -0
- package/dist/components/mobile-player/ui/countdown.js.map +1 -0
- package/dist/components/mobile-player/ui/index.d.ts +11 -0
- package/dist/components/mobile-player/ui/index.d.ts.map +1 -0
- package/dist/components/mobile-player/ui/index.js +2 -0
- package/dist/components/mobile-player/ui/index.js.map +1 -0
- package/dist/components/mobile-player/ui/input.d.ts +9 -0
- package/dist/components/mobile-player/ui/input.d.ts.map +1 -0
- package/dist/components/mobile-player/ui/input.js +1 -0
- package/dist/components/mobile-player/ui/input.js.map +1 -0
- package/dist/components/mobile-player/ui/metrics.d.ts +6 -0
- package/dist/components/mobile-player/ui/metrics.d.ts.map +1 -0
- package/dist/components/mobile-player/ui/metrics.js +1 -0
- package/dist/components/mobile-player/ui/metrics.js.map +1 -0
- package/dist/components/mobile-player/ui/report-modal.d.ts +13 -0
- package/dist/components/mobile-player/ui/report-modal.d.ts.map +1 -0
- package/dist/components/mobile-player/ui/report-modal.js +1 -0
- package/dist/components/mobile-player/ui/report-modal.js.map +1 -0
- package/dist/components/mobile-player/ui/streamer-context-menu.d.ts +2 -0
- package/dist/components/mobile-player/ui/streamer-context-menu.d.ts.map +1 -0
- package/dist/components/mobile-player/ui/streamer-context-menu.js +1 -0
- package/dist/components/mobile-player/ui/streamer-context-menu.js.map +1 -0
- package/dist/components/mobile-player/ui/streamer-loading-overlay.d.ts +11 -0
- package/dist/components/mobile-player/ui/streamer-loading-overlay.d.ts.map +1 -0
- package/dist/components/mobile-player/ui/streamer-loading-overlay.js +1 -0
- package/dist/components/mobile-player/ui/streamer-loading-overlay.js.map +1 -0
- package/dist/components/mobile-player/ui/viewer-context-menu.d.ts +9 -0
- package/dist/components/mobile-player/ui/viewer-context-menu.d.ts.map +1 -0
- package/dist/components/mobile-player/ui/viewer-context-menu.js +6 -5
- package/dist/components/mobile-player/ui/viewer-context-menu.js.map +1 -0
- package/dist/components/mobile-player/ui/viewer-count.d.ts +10 -0
- package/dist/components/mobile-player/ui/viewer-count.d.ts.map +1 -0
- package/dist/components/mobile-player/ui/viewer-count.js +24 -0
- package/dist/components/mobile-player/ui/viewer-count.js.map +1 -0
- package/dist/components/mobile-player/ui/viewer-loading-overlay.d.ts +2 -0
- package/dist/components/mobile-player/ui/viewer-loading-overlay.d.ts.map +1 -0
- package/dist/components/mobile-player/ui/viewer-loading-overlay.js +1 -0
- package/dist/components/mobile-player/ui/viewer-loading-overlay.js.map +1 -0
- package/dist/components/mobile-player/ui/viewers.d.ts +6 -0
- package/dist/components/mobile-player/ui/viewers.d.ts.map +1 -0
- package/dist/components/mobile-player/ui/viewers.js +9 -7
- package/dist/components/mobile-player/ui/viewers.js.map +1 -0
- package/dist/components/mobile-player/use-webrtc.d.ts +19 -0
- package/dist/components/mobile-player/use-webrtc.d.ts.map +1 -0
- package/dist/components/mobile-player/use-webrtc.js +1 -0
- package/dist/components/mobile-player/use-webrtc.js.map +1 -0
- package/dist/components/mobile-player/video-async.native.d.ts +16 -0
- package/dist/components/mobile-player/video-async.native.d.ts.map +1 -0
- package/dist/components/mobile-player/video-async.native.js +1 -0
- package/dist/components/mobile-player/video-async.native.js.map +1 -0
- package/dist/components/mobile-player/video-retry.d.ts +5 -0
- package/dist/components/mobile-player/video-retry.d.ts.map +1 -0
- package/dist/components/mobile-player/video-retry.js +1 -0
- package/dist/components/mobile-player/video-retry.js.map +1 -0
- package/dist/components/mobile-player/video.d.ts +25 -0
- package/dist/components/mobile-player/video.d.ts.map +1 -0
- package/dist/components/mobile-player/video.js +1 -0
- package/dist/components/mobile-player/video.js.map +1 -0
- package/dist/components/mobile-player/video.native.d.ts +3 -0
- package/dist/components/mobile-player/video.native.d.ts.map +1 -0
- package/dist/components/mobile-player/video.native.js +1 -0
- package/dist/components/mobile-player/video.native.js.map +1 -0
- package/dist/components/mobile-player/webrtc-diagnostics.d.ts +14 -0
- package/dist/components/mobile-player/webrtc-diagnostics.d.ts.map +1 -0
- package/dist/components/mobile-player/webrtc-diagnostics.js +1 -0
- package/dist/components/mobile-player/webrtc-diagnostics.js.map +1 -0
- package/dist/components/mobile-player/webrtc-primitives.d.ts +19 -0
- package/dist/components/mobile-player/webrtc-primitives.d.ts.map +1 -0
- package/dist/components/mobile-player/webrtc-primitives.js +1 -0
- package/dist/components/mobile-player/webrtc-primitives.js.map +1 -0
- package/dist/components/mobile-player/webrtc-primitives.native.d.ts +2 -0
- package/dist/components/mobile-player/webrtc-primitives.native.d.ts.map +1 -0
- package/dist/components/mobile-player/webrtc-primitives.native.js +1 -0
- package/dist/components/mobile-player/webrtc-primitives.native.js.map +1 -0
- package/dist/components/share/sharesheet.d.ts +5 -0
- package/dist/components/share/sharesheet.d.ts.map +1 -0
- package/dist/components/share/sharesheet.js +6 -14
- package/dist/components/share/sharesheet.js.map +1 -0
- package/dist/components/ui/button.d.ts +18 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +14 -2
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +11 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +1 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +38 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +1 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dropdown.d.ts +132 -0
- package/dist/components/ui/dropdown.d.ts.map +1 -0
- package/dist/components/ui/dropdown.js +28 -238
- package/dist/components/ui/dropdown.js.map +1 -0
- package/dist/components/ui/dropdown.native.d.ts +132 -0
- package/dist/components/ui/dropdown.native.d.ts.map +1 -0
- package/dist/components/ui/dropdown.native.js +319 -0
- package/dist/components/ui/dropdown.native.js.map +1 -0
- package/dist/components/ui/icons.d.ts +12 -0
- package/dist/components/ui/icons.d.ts.map +1 -0
- package/dist/components/ui/icons.js +1 -0
- package/dist/components/ui/icons.js.map +1 -0
- package/dist/components/ui/index.d.ts +33 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/index.js +2 -0
- package/dist/components/ui/index.js.map +1 -0
- package/dist/components/ui/info-box.d.ts +9 -0
- package/dist/components/ui/info-box.d.ts.map +1 -0
- package/dist/components/ui/info-box.js +1 -0
- package/dist/components/ui/info-box.js.map +1 -0
- package/dist/components/ui/info-row.d.ts +9 -0
- package/dist/components/ui/info-row.d.ts.map +1 -0
- package/dist/components/ui/info-row.js +1 -0
- package/dist/components/ui/info-row.js.map +1 -0
- package/dist/components/ui/input.d.ts +20 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +1 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/loader.d.ts +3 -0
- package/dist/components/ui/loader.d.ts.map +1 -0
- package/dist/components/ui/loader.js +1 -0
- package/dist/components/ui/loader.js.map +1 -0
- package/dist/components/ui/menu.d.ts +34 -0
- package/dist/components/ui/menu.d.ts.map +1 -0
- package/dist/components/ui/menu.js +57 -0
- package/dist/components/ui/menu.js.map +1 -0
- package/dist/components/ui/primitives/button.d.ts +41 -0
- package/dist/components/ui/primitives/button.d.ts.map +1 -0
- package/dist/components/ui/primitives/button.js +1 -0
- package/dist/components/ui/primitives/button.js.map +1 -0
- package/dist/components/ui/primitives/input.d.ts +52 -0
- package/dist/components/ui/primitives/input.d.ts.map +1 -0
- package/dist/components/ui/primitives/input.js +1 -0
- package/dist/components/ui/primitives/input.js.map +1 -0
- package/dist/components/ui/primitives/modal.d.ts +46 -0
- package/dist/components/ui/primitives/modal.d.ts.map +1 -0
- package/dist/components/ui/primitives/modal.js +1 -0
- package/dist/components/ui/primitives/modal.js.map +1 -0
- package/dist/components/ui/primitives/text.d.ts +48 -0
- package/dist/components/ui/primitives/text.d.ts.map +1 -0
- package/dist/components/ui/primitives/text.js +1 -0
- package/dist/components/ui/primitives/text.js.map +1 -0
- package/dist/components/ui/resizeable.d.ts +14 -0
- package/dist/components/ui/resizeable.d.ts.map +1 -0
- package/dist/components/ui/resizeable.js +2 -1
- package/dist/components/ui/resizeable.js.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +1 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/slider.d.ts +2 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +1 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/text.d.ts +45 -0
- package/dist/components/ui/text.d.ts.map +1 -0
- package/dist/components/ui/text.js +1 -0
- package/dist/components/ui/text.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +1 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.d.ts +92 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +2 -1
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +1 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/view.d.ts +33 -0
- package/dist/components/ui/view.d.ts.map +1 -0
- package/dist/components/ui/view.js +1 -0
- package/dist/components/ui/view.js.map +1 -0
- package/dist/crypto-polyfill.d.ts +1 -0
- package/dist/crypto-polyfill.d.ts.map +1 -0
- package/dist/crypto-polyfill.js +1 -0
- package/dist/crypto-polyfill.js.map +1 -0
- package/dist/crypto-polyfill.native.d.ts +3 -0
- package/dist/crypto-polyfill.native.d.ts.map +1 -0
- package/dist/crypto-polyfill.native.js +1 -0
- package/dist/crypto-polyfill.native.js.map +1 -0
- package/dist/hooks/index.d.ts +11 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useAvatars.d.ts +3 -0
- package/dist/hooks/useAvatars.d.ts.map +1 -0
- package/dist/hooks/useAvatars.js +1 -0
- package/dist/hooks/useAvatars.js.map +1 -0
- package/dist/hooks/useCameraToggle.d.ts +5 -0
- package/dist/hooks/useCameraToggle.d.ts.map +1 -0
- package/dist/hooks/useCameraToggle.js +1 -0
- package/dist/hooks/useCameraToggle.js.map +1 -0
- package/dist/hooks/useKeyboard.d.ts +5 -0
- package/dist/hooks/useKeyboard.d.ts.map +1 -0
- package/dist/hooks/useKeyboard.js +1 -0
- package/dist/hooks/useKeyboard.js.map +1 -0
- package/dist/hooks/useKeyboardSlide.d.ts +5 -0
- package/dist/hooks/useKeyboardSlide.d.ts.map +1 -0
- package/dist/hooks/useKeyboardSlide.js +1 -0
- package/dist/hooks/useKeyboardSlide.js.map +1 -0
- package/dist/hooks/useLivestreamInfo.d.ts +15 -0
- package/dist/hooks/useLivestreamInfo.d.ts.map +1 -0
- package/dist/hooks/useLivestreamInfo.js +1 -0
- package/dist/hooks/useLivestreamInfo.js.map +1 -0
- package/dist/hooks/useOuterAndInnerDimensions.d.ts +10 -0
- package/dist/hooks/useOuterAndInnerDimensions.d.ts.map +1 -0
- package/dist/hooks/useOuterAndInnerDimensions.js +1 -0
- package/dist/hooks/useOuterAndInnerDimensions.js.map +1 -0
- package/dist/hooks/usePlayerDimensions.d.ts +12 -0
- package/dist/hooks/usePlayerDimensions.d.ts.map +1 -0
- package/dist/hooks/usePlayerDimensions.js +1 -0
- package/dist/hooks/usePlayerDimensions.js.map +1 -0
- package/dist/hooks/usePointerDevice.d.ts +12 -0
- package/dist/hooks/usePointerDevice.d.ts.map +1 -0
- package/dist/hooks/usePointerDevice.js +1 -0
- package/dist/hooks/usePointerDevice.js.map +1 -0
- package/dist/hooks/useSegmentDimensions.d.ts +6 -0
- package/dist/hooks/useSegmentDimensions.d.ts.map +1 -0
- package/dist/hooks/useSegmentDimensions.js +1 -0
- package/dist/hooks/useSegmentDimensions.js.map +1 -0
- package/dist/hooks/useSegmentTiming.d.ts +9 -0
- package/dist/hooks/useSegmentTiming.d.ts.map +1 -0
- package/dist/hooks/useSegmentTiming.js +1 -0
- package/dist/hooks/useSegmentTiming.js.map +1 -0
- package/dist/i18n/i18n-loader.d.ts +2 -0
- package/dist/i18n/i18n-loader.d.ts.map +1 -0
- package/dist/i18n/i18n-loader.js +17 -0
- package/dist/i18n/i18n-loader.js.map +1 -0
- package/dist/i18n/i18n-loader.native.d.ts +2 -0
- package/dist/i18n/i18n-loader.native.d.ts.map +1 -0
- package/dist/i18n/i18n-loader.native.js +51 -0
- package/dist/i18n/i18n-loader.native.js.map +1 -0
- package/dist/i18n/i18next-config.d.ts +41 -0
- package/dist/i18n/i18next-config.d.ts.map +1 -0
- package/dist/i18n/i18next-config.js +220 -0
- package/dist/i18n/i18next-config.js.map +1 -0
- package/dist/i18n/index.d.ts +11 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +45 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/provider.d.ts +14 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +58 -0
- package/dist/i18n/provider.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -0
- package/dist/lib/browser.d.ts +2 -0
- package/dist/lib/browser.d.ts.map +1 -0
- package/dist/lib/browser.js +1 -0
- package/dist/lib/browser.js.map +1 -0
- package/dist/lib/facet.d.ts +11 -0
- package/dist/lib/facet.d.ts.map +1 -0
- package/dist/lib/facet.js +1 -0
- package/dist/lib/facet.js.map +1 -0
- package/dist/lib/metadata-constants.d.ts +13 -0
- package/dist/lib/metadata-constants.d.ts.map +1 -0
- package/dist/lib/metadata-constants.js +1 -0
- package/dist/lib/metadata-constants.js.map +1 -0
- package/dist/lib/system-messages.d.ts +49 -0
- package/dist/lib/system-messages.d.ts.map +1 -0
- package/dist/lib/system-messages.js +1 -0
- package/dist/lib/system-messages.js.map +1 -0
- package/dist/lib/theme/atoms.d.ts +4226 -0
- package/dist/lib/theme/atoms.d.ts.map +1 -0
- package/dist/lib/theme/atoms.js +1 -0
- package/dist/lib/theme/atoms.js.map +1 -0
- package/dist/lib/theme/atoms.types.d.ts +228 -0
- package/dist/lib/theme/atoms.types.d.ts.map +1 -0
- package/dist/lib/theme/atoms.types.js +1 -0
- package/dist/lib/theme/atoms.types.js.map +1 -0
- package/dist/lib/theme/index.d.ts +6 -0
- package/dist/lib/theme/index.d.ts.map +1 -0
- package/dist/lib/theme/index.js +1 -0
- package/dist/lib/theme/index.js.map +1 -0
- package/dist/lib/theme/theme.d.ts +327 -0
- package/dist/lib/theme/theme.d.ts.map +1 -0
- package/dist/lib/theme/theme.js +1 -0
- package/dist/lib/theme/theme.js.map +1 -0
- package/dist/lib/theme/tokens.d.ts +766 -0
- package/dist/lib/theme/tokens.d.ts.map +1 -0
- package/dist/lib/theme/tokens.js +1 -0
- package/dist/lib/theme/tokens.js.map +1 -0
- package/dist/lib/utils.d.ts +53 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +1 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/livestream-provider/index.d.ts +13 -0
- package/dist/livestream-provider/index.d.ts.map +1 -0
- package/dist/livestream-provider/index.js +1 -0
- package/dist/livestream-provider/index.js.map +1 -0
- package/dist/livestream-provider/websocket.d.ts +2 -0
- package/dist/livestream-provider/websocket.d.ts.map +1 -0
- package/dist/livestream-provider/websocket.js +1 -0
- package/dist/livestream-provider/websocket.js.map +1 -0
- package/dist/livestream-store/chat.d.ts +21 -0
- package/dist/livestream-store/chat.d.ts.map +1 -0
- package/dist/livestream-store/chat.js +1 -0
- package/dist/livestream-store/chat.js.map +1 -0
- package/dist/livestream-store/context.d.ts +7 -0
- package/dist/livestream-store/context.d.ts.map +1 -0
- package/dist/livestream-store/context.js +1 -0
- package/dist/livestream-store/context.js.map +1 -0
- package/dist/livestream-store/index.d.ts +5 -0
- package/dist/livestream-store/index.d.ts.map +1 -0
- package/dist/livestream-store/index.js +1 -0
- package/dist/livestream-store/index.js.map +1 -0
- package/dist/livestream-store/livestream-state.d.ts +29 -0
- package/dist/livestream-store/livestream-state.d.ts.map +1 -0
- package/dist/livestream-store/livestream-state.js +1 -0
- package/dist/livestream-store/livestream-state.js.map +1 -0
- package/dist/livestream-store/livestream-store.d.ts +14 -0
- package/dist/livestream-store/livestream-store.d.ts.map +1 -0
- package/dist/livestream-store/livestream-store.js +1 -0
- package/dist/livestream-store/livestream-store.js.map +1 -0
- package/dist/livestream-store/problems.d.ts +4 -0
- package/dist/livestream-store/problems.d.ts.map +1 -0
- package/dist/livestream-store/problems.js +1 -0
- package/dist/livestream-store/problems.js.map +1 -0
- package/dist/livestream-store/stream-key.d.ts +9 -0
- package/dist/livestream-store/stream-key.d.ts.map +1 -0
- package/dist/livestream-store/stream-key.js +1 -0
- package/dist/livestream-store/stream-key.js.map +1 -0
- package/dist/livestream-store/websocket-consumer.d.ts +3 -0
- package/dist/livestream-store/websocket-consumer.d.ts.map +1 -0
- package/dist/livestream-store/websocket-consumer.js +1 -0
- package/dist/livestream-store/websocket-consumer.js.map +1 -0
- package/dist/player-store/context.d.ts +10 -0
- package/dist/player-store/context.d.ts.map +1 -0
- package/dist/player-store/context.js +1 -0
- package/dist/player-store/context.js.map +1 -0
- package/dist/player-store/index.d.ts +6 -0
- package/dist/player-store/index.d.ts.map +1 -0
- package/dist/player-store/index.js +1 -0
- package/dist/player-store/index.js.map +1 -0
- package/dist/player-store/player-provider.d.ts +12 -0
- package/dist/player-store/player-provider.d.ts.map +1 -0
- package/dist/player-store/player-provider.js +1 -0
- package/dist/player-store/player-provider.js.map +1 -0
- package/dist/player-store/player-state.d.ts +138 -0
- package/dist/player-store/player-state.d.ts.map +1 -0
- package/dist/player-store/player-state.js +1 -0
- package/dist/player-store/player-state.js.map +1 -0
- package/dist/player-store/player-store.d.ts +18 -0
- package/dist/player-store/player-store.d.ts.map +1 -0
- package/dist/player-store/player-store.js +1 -0
- package/dist/player-store/player-store.js.map +1 -0
- package/dist/player-store/single-player-provider.d.ts +61 -0
- package/dist/player-store/single-player-provider.d.ts.map +1 -0
- package/dist/player-store/single-player-provider.js +1 -0
- package/dist/player-store/single-player-provider.js.map +1 -0
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +1 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/lock.d.ts +8 -0
- package/dist/storage/lock.d.ts.map +1 -0
- package/dist/storage/lock.js +1 -0
- package/dist/storage/lock.js.map +1 -0
- package/dist/storage/storage.d.ts +7 -0
- package/dist/storage/storage.d.ts.map +1 -0
- package/dist/storage/storage.js +1 -0
- package/dist/storage/storage.js.map +1 -0
- package/dist/storage/storage.native.d.ts +7 -0
- package/dist/storage/storage.native.d.ts.map +1 -0
- package/dist/storage/storage.native.js +1 -0
- package/dist/storage/storage.native.js.map +1 -0
- package/dist/storage/storage.shared.d.ts +6 -0
- package/dist/storage/storage.shared.d.ts.map +1 -0
- package/dist/storage/storage.shared.js +1 -0
- package/dist/storage/storage.shared.js.map +1 -0
- package/dist/streamplace-provider/context.d.ts +7 -0
- package/dist/streamplace-provider/context.d.ts.map +1 -0
- package/dist/streamplace-provider/context.js +1 -0
- package/dist/streamplace-provider/context.js.map +1 -0
- package/dist/streamplace-provider/index.d.ts +11 -0
- package/dist/streamplace-provider/index.d.ts.map +1 -0
- package/dist/streamplace-provider/index.js +1 -0
- package/dist/streamplace-provider/index.js.map +1 -0
- package/dist/streamplace-provider/poller.d.ts +5 -0
- package/dist/streamplace-provider/poller.d.ts.map +1 -0
- package/dist/streamplace-provider/poller.js +3 -0
- package/dist/streamplace-provider/poller.js.map +1 -0
- package/dist/streamplace-provider/xrpc.d.ts +1 -0
- package/dist/streamplace-provider/xrpc.d.ts.map +1 -0
- package/dist/streamplace-provider/xrpc.js +1 -0
- package/dist/streamplace-provider/xrpc.js.map +1 -0
- package/dist/streamplace-store/block.d.ts +9 -0
- package/dist/streamplace-store/block.d.ts.map +1 -0
- package/dist/streamplace-store/block.js +1 -0
- package/dist/streamplace-store/block.js.map +1 -0
- package/dist/streamplace-store/content-metadata-actions.d.ts +9 -0
- package/dist/streamplace-store/content-metadata-actions.d.ts.map +1 -0
- package/dist/streamplace-store/content-metadata-actions.js +1 -0
- package/dist/streamplace-store/content-metadata-actions.js.map +1 -0
- package/dist/streamplace-store/graph.d.ts +22 -0
- package/dist/streamplace-store/graph.d.ts.map +1 -0
- package/dist/streamplace-store/graph.js +1 -0
- package/dist/streamplace-store/graph.js.map +1 -0
- package/dist/streamplace-store/index.d.ts +4 -0
- package/dist/streamplace-store/index.d.ts.map +1 -0
- package/dist/streamplace-store/index.js +1 -0
- package/dist/streamplace-store/index.js.map +1 -0
- package/dist/streamplace-store/stream.d.ts +11 -0
- package/dist/streamplace-store/stream.d.ts.map +1 -0
- package/dist/streamplace-store/stream.js +1 -0
- package/dist/streamplace-store/stream.js.map +1 -0
- package/dist/streamplace-store/streamplace-store.d.ts +92 -0
- package/dist/streamplace-store/streamplace-store.d.ts.map +1 -0
- package/dist/streamplace-store/streamplace-store.js +158 -3
- package/dist/streamplace-store/streamplace-store.js.map +1 -0
- package/dist/streamplace-store/user.d.ts +6 -0
- package/dist/streamplace-store/user.d.ts.map +1 -0
- package/dist/streamplace-store/user.js +1 -0
- package/dist/streamplace-store/user.js.map +1 -0
- package/dist/streamplace-store/xrpc.d.ts +3 -0
- package/dist/streamplace-store/xrpc.d.ts.map +1 -0
- package/dist/streamplace-store/xrpc.js +1 -0
- package/dist/streamplace-store/xrpc.js.map +1 -0
- package/dist/time-sync/index.d.ts +3 -0
- package/dist/time-sync/index.d.ts.map +1 -0
- package/dist/time-sync/index.js +15 -0
- package/dist/time-sync/index.js.map +1 -0
- package/dist/time-sync/time-sync.d.ts +13 -0
- package/dist/time-sync/time-sync.d.ts.map +1 -0
- package/dist/time-sync/time-sync.js +95 -0
- package/dist/time-sync/time-sync.js.map +1 -0
- package/dist/time-sync/useTimeSync.d.ts +2 -0
- package/dist/time-sync/useTimeSync.d.ts.map +1 -0
- package/dist/time-sync/useTimeSync.js +49 -0
- package/dist/time-sync/useTimeSync.js.map +1 -0
- package/dist/ui/index.d.ts +15 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/utils/format-handle.d.ts +11 -0
- package/dist/utils/format-handle.d.ts.map +1 -0
- package/dist/utils/format-handle.js +21 -0
- package/dist/utils/format-handle.js.map +1 -0
- package/locales/en-US/common.ftl +46 -0
- package/locales/en-US/settings.ftl +129 -0
- package/locales/es-ES/common.ftl +46 -0
- package/locales/es-ES/settings.ftl +168 -0
- package/locales/fr-FR/common.ftl +46 -0
- package/locales/fr-FR/settings.ftl +165 -0
- package/locales/manifest.json +36 -0
- package/locales/pt-BR/common.ftl +46 -0
- package/locales/pt-BR/settings.ftl +166 -0
- package/locales/zh-Hant/common.ftl +46 -0
- package/locales/zh-Hant/settings.ftl +161 -0
- package/node-compile-cache/v22.15.0-x64-efe9a9df-0/37be0eec +0 -0
- package/package.json +24 -3
- package/scripts/compile-translations.js +254 -0
- package/scripts/extract-i18n.js +336 -0
- package/src/components/chat/chat-box.tsx +28 -9
- package/src/components/chat/chat-message.tsx +3 -2
- package/src/components/chat/mod-view.tsx +4 -3
- package/src/components/content-metadata/content-metadata-form.tsx +3 -1
- package/src/components/danmu/danmu-message.tsx +182 -0
- package/src/components/danmu/danmu-overlay-obs.tsx +44 -0
- package/src/components/danmu/danmu-overlay.tsx +225 -0
- package/src/components/danmu/math.ts +27 -0
- package/src/components/danmu/mu.tsx +28 -0
- package/src/components/danmu/use-danmu-lanes.ts +114 -0
- package/src/components/mobile-player/fullscreen.native.tsx +26 -0
- package/src/components/mobile-player/fullscreen.tsx +23 -1
- package/src/components/mobile-player/ui/index.ts +1 -0
- package/src/components/mobile-player/ui/viewer-context-menu.tsx +9 -7
- package/src/components/mobile-player/ui/viewer-count.tsx +39 -0
- package/src/components/mobile-player/ui/viewers.tsx +10 -14
- package/src/components/share/sharesheet.tsx +11 -27
- package/src/components/ui/button.tsx +22 -4
- package/src/components/ui/dropdown.native.tsx +696 -0
- package/src/components/ui/dropdown.tsx +57 -427
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/menu.tsx +171 -0
- package/src/components/ui/resizeable.tsx +1 -1
- package/src/components/ui/toast.tsx +6 -1
- package/src/i18n/i18n-loader.native.ts +56 -0
- package/src/i18n/i18n-loader.ts +19 -0
- package/src/i18n/i18next-config.ts +250 -0
- package/src/i18n/index.ts +50 -0
- package/src/i18n/provider.tsx +70 -0
- package/src/index.tsx +9 -0
- package/src/streamplace-provider/poller.tsx +3 -0
- package/src/streamplace-store/streamplace-store.tsx +184 -2
- package/src/time-sync/index.ts +12 -0
- package/src/time-sync/time-sync.ts +112 -0
- package/src/time-sync/useTimeSync.tsx +58 -0
- package/src/utils/format-handle.ts +24 -0
- package/tsconfig.json +11 -2
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -1,38 +1,18 @@
|
|
|
1
|
-
import BottomSheet, { BottomSheetScrollView } from "@gorhom/bottom-sheet";
|
|
2
1
|
import * as DropdownMenuPrimitive from "@rn-primitives/dropdown-menu";
|
|
3
2
|
import {
|
|
4
3
|
Check,
|
|
5
|
-
CheckCircle,
|
|
6
4
|
ChevronDown,
|
|
7
|
-
ChevronLeft,
|
|
8
5
|
ChevronRight,
|
|
9
6
|
ChevronUp,
|
|
10
|
-
Circle,
|
|
11
7
|
} from "lucide-react-native";
|
|
12
|
-
import React, {
|
|
13
|
-
createContext,
|
|
14
|
-
forwardRef,
|
|
15
|
-
ReactNode,
|
|
16
|
-
startTransition,
|
|
17
|
-
useContext,
|
|
18
|
-
useRef,
|
|
19
|
-
useState,
|
|
20
|
-
} from "react";
|
|
8
|
+
import React, { forwardRef, ReactNode } from "react";
|
|
21
9
|
import {
|
|
22
10
|
Platform,
|
|
23
|
-
Pressable,
|
|
24
11
|
ScrollView,
|
|
25
12
|
StyleSheet,
|
|
26
13
|
useWindowDimensions,
|
|
27
14
|
View,
|
|
28
15
|
} from "react-native";
|
|
29
|
-
import Animated, {
|
|
30
|
-
runOnJS,
|
|
31
|
-
useAnimatedStyle,
|
|
32
|
-
useSharedValue,
|
|
33
|
-
withTiming,
|
|
34
|
-
} from "react-native-reanimated";
|
|
35
|
-
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
36
16
|
import {
|
|
37
17
|
a,
|
|
38
18
|
borderRadius,
|
|
@@ -57,95 +37,23 @@ import {
|
|
|
57
37
|
} from "./primitives/text";
|
|
58
38
|
import { Text } from "./text";
|
|
59
39
|
|
|
60
|
-
// Navigation stack context for bottom sheet menus
|
|
61
|
-
interface NavigationStackItem {
|
|
62
|
-
key: string;
|
|
63
|
-
title?: string;
|
|
64
|
-
content: ReactNode | ((state: { pressed: boolean }) => ReactNode);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
interface NavigationStackContextValue {
|
|
68
|
-
stack: NavigationStackItem[];
|
|
69
|
-
push: (item: NavigationStackItem) => void;
|
|
70
|
-
pop: () => void;
|
|
71
|
-
isNested: boolean;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const NavigationStackContext =
|
|
75
|
-
createContext<NavigationStackContextValue | null>(null);
|
|
76
|
-
|
|
77
|
-
const useNavigationStack = () => {
|
|
78
|
-
const context = useContext(NavigationStackContext);
|
|
79
|
-
return context;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
// Context to capture submenu content for mobile navigation
|
|
83
|
-
interface SubMenuContextValue {
|
|
84
|
-
title?: string;
|
|
85
|
-
renderContent: () => ReactNode;
|
|
86
|
-
setRenderContent: (renderer: () => ReactNode) => void;
|
|
87
|
-
setTitle: (title: string) => void;
|
|
88
|
-
trigger: () => void;
|
|
89
|
-
key: string | null;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const SubMenuContext = createContext<SubMenuContextValue | null>(null);
|
|
93
|
-
|
|
94
40
|
export const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
95
41
|
export const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
96
42
|
export const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
97
|
-
export const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
98
43
|
|
|
99
|
-
|
|
44
|
+
export const DropdownMenuRadioGroup = forwardRef<
|
|
45
|
+
React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>,
|
|
46
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>
|
|
47
|
+
>(({ children, ...props }, ref) => {
|
|
48
|
+
return (
|
|
49
|
+
<DropdownMenuPrimitive.RadioGroup ref={ref} {...props}>
|
|
50
|
+
{children}
|
|
51
|
+
</DropdownMenuPrimitive.RadioGroup>
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
|
|
100
55
|
export const DropdownMenuSub = forwardRef<any, any>(
|
|
101
56
|
({ children, ...props }, ref) => {
|
|
102
|
-
const navStack = useNavigationStack();
|
|
103
|
-
const [subMenuTitle, setSubMenuTitle] = useState<string | undefined>();
|
|
104
|
-
const renderContentRef = useRef<(() => ReactNode) | null>(null);
|
|
105
|
-
const [subMenuKey, setSubMenuKey] = useState<string | null>(null);
|
|
106
|
-
|
|
107
|
-
// If we're in a mobile navigation stack, use custom context
|
|
108
|
-
if (navStack) {
|
|
109
|
-
const trigger = () => {
|
|
110
|
-
if (renderContentRef.current) {
|
|
111
|
-
const key = `submenu-${Date.now()}`;
|
|
112
|
-
setSubMenuKey(key);
|
|
113
|
-
navStack.push({
|
|
114
|
-
key,
|
|
115
|
-
title: subMenuTitle,
|
|
116
|
-
// Store a function that always reads the latest content from the ref
|
|
117
|
-
content: (props: any) => {
|
|
118
|
-
const renderFn = renderContentRef.current;
|
|
119
|
-
return renderFn ? renderFn() : null;
|
|
120
|
-
},
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
const setRenderContent = (renderer: () => ReactNode) => {
|
|
126
|
-
renderContentRef.current = renderer;
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
const contextValue = React.useMemo(
|
|
130
|
-
() => ({
|
|
131
|
-
renderContent: () => renderContentRef.current?.(),
|
|
132
|
-
setRenderContent,
|
|
133
|
-
title: subMenuTitle,
|
|
134
|
-
setTitle: setSubMenuTitle,
|
|
135
|
-
trigger,
|
|
136
|
-
key: subMenuKey,
|
|
137
|
-
}),
|
|
138
|
-
[subMenuTitle, subMenuKey],
|
|
139
|
-
);
|
|
140
|
-
|
|
141
|
-
return (
|
|
142
|
-
<SubMenuContext.Provider value={contextValue}>
|
|
143
|
-
{children}
|
|
144
|
-
</SubMenuContext.Provider>
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// Web - use primitive
|
|
149
57
|
return (
|
|
150
58
|
<DropdownMenuPrimitive.Sub ref={ref} {...props}>
|
|
151
59
|
{children}
|
|
@@ -154,210 +62,6 @@ export const DropdownMenuSub = forwardRef<any, any>(
|
|
|
154
62
|
},
|
|
155
63
|
);
|
|
156
64
|
|
|
157
|
-
export const DropdownMenuBottomSheet = forwardRef<
|
|
158
|
-
any,
|
|
159
|
-
DropdownMenuPrimitive.ContentProps & {
|
|
160
|
-
overlayStyle?: any;
|
|
161
|
-
portalHost?: string;
|
|
162
|
-
}
|
|
163
|
-
>(function DropdownMenuBottomSheet(
|
|
164
|
-
{ overlayStyle, portalHost, children, ...rest },
|
|
165
|
-
_ref,
|
|
166
|
-
) {
|
|
167
|
-
// Use the primitives' context to know if open
|
|
168
|
-
const { onOpenChange } = DropdownMenuPrimitive.useRootContext();
|
|
169
|
-
const { zero: zt, theme } = useTheme();
|
|
170
|
-
const sheetRef = useRef<BottomSheet>(null);
|
|
171
|
-
const { width } = useWindowDimensions();
|
|
172
|
-
const isWide = Platform.OS !== "web" && width >= 800;
|
|
173
|
-
const sheetWidth = isWide ? 450 : width;
|
|
174
|
-
const horizontalMargin = isWide ? (width - sheetWidth) / 2 : 0;
|
|
175
|
-
|
|
176
|
-
const insets = useSafeAreaInsets();
|
|
177
|
-
|
|
178
|
-
// Navigation stack state
|
|
179
|
-
const [stack, setStack] = useState<NavigationStackItem[]>([
|
|
180
|
-
{ key: "root", content: children },
|
|
181
|
-
]);
|
|
182
|
-
|
|
183
|
-
// Update root content when children changes
|
|
184
|
-
React.useEffect(() => {
|
|
185
|
-
setStack((prev) => {
|
|
186
|
-
if (!Array.isArray(prev) || prev.length === 0) {
|
|
187
|
-
return [{ key: "root", content: children }];
|
|
188
|
-
}
|
|
189
|
-
// Update the root item content
|
|
190
|
-
const newStack = [...prev];
|
|
191
|
-
newStack[0] = { ...newStack[0], content: children };
|
|
192
|
-
return newStack;
|
|
193
|
-
});
|
|
194
|
-
}, [children]);
|
|
195
|
-
|
|
196
|
-
const slideAnim = useSharedValue(0);
|
|
197
|
-
const fadeAnim = useSharedValue(1);
|
|
198
|
-
|
|
199
|
-
const push = (item: NavigationStackItem) => {
|
|
200
|
-
// First, update the stack
|
|
201
|
-
setStack((prev) => {
|
|
202
|
-
if (!Array.isArray(prev))
|
|
203
|
-
return [{ key: "root", content: children }, item];
|
|
204
|
-
return [...prev, item];
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
// Then animate from right to center with fade
|
|
208
|
-
slideAnim.value = 40;
|
|
209
|
-
fadeAnim.value = 0;
|
|
210
|
-
slideAnim.value = withTiming(0, { duration: 350 });
|
|
211
|
-
fadeAnim.value = withTiming(1, { duration: 350 });
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
const popStack = () => {
|
|
215
|
-
startTransition(() => {
|
|
216
|
-
setStack((prev) => {
|
|
217
|
-
if (!Array.isArray(prev) || prev.length <= 1) {
|
|
218
|
-
return [{ key: "root", content: children }];
|
|
219
|
-
}
|
|
220
|
-
return prev.slice(0, -1);
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
const resetAnimationValues = () => {
|
|
226
|
-
setTimeout(() => {
|
|
227
|
-
slideAnim.value = 0;
|
|
228
|
-
fadeAnim.value = 1;
|
|
229
|
-
}, 5);
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
const pop = () => {
|
|
233
|
-
if (stack.length <= 1) return;
|
|
234
|
-
|
|
235
|
-
// Animate out to the right with fade
|
|
236
|
-
slideAnim.value = withTiming(40, { duration: 150 });
|
|
237
|
-
fadeAnim.value = withTiming(0, { duration: 150 }, (finished) => {
|
|
238
|
-
if (finished) {
|
|
239
|
-
// Update stack first with startTransition for smoother render
|
|
240
|
-
runOnJS(popStack)();
|
|
241
|
-
|
|
242
|
-
// Then reset animation position after a brief delay to ensure component has unmounted
|
|
243
|
-
runOnJS(resetAnimationValues)();
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
const animatedStyle = useAnimatedStyle(() => ({
|
|
249
|
-
transform: [{ translateX: slideAnim.value }],
|
|
250
|
-
opacity: fadeAnim.value,
|
|
251
|
-
}));
|
|
252
|
-
|
|
253
|
-
const headerAnimatedStyle = useAnimatedStyle(() => ({
|
|
254
|
-
opacity: fadeAnim.value,
|
|
255
|
-
}));
|
|
256
|
-
|
|
257
|
-
const currentLevel = stack[stack.length - 1];
|
|
258
|
-
const isNested = stack.length > 1;
|
|
259
|
-
|
|
260
|
-
const onBackgroundTap = () => {
|
|
261
|
-
if (sheetRef.current) sheetRef.current?.close();
|
|
262
|
-
|
|
263
|
-
setTimeout(() => {
|
|
264
|
-
onOpenChange?.(false);
|
|
265
|
-
}, 300);
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
// Safety check - if no current level, don't render
|
|
269
|
-
if (!currentLevel) {
|
|
270
|
-
return null;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
return (
|
|
274
|
-
<DropdownMenuPrimitive.Portal hostName={portalHost}>
|
|
275
|
-
<NavigationStackContext.Provider value={{ stack, push, pop, isNested }}>
|
|
276
|
-
<BottomSheet
|
|
277
|
-
ref={sheetRef}
|
|
278
|
-
enablePanDownToClose
|
|
279
|
-
enableDynamicSizing
|
|
280
|
-
detached={isWide}
|
|
281
|
-
bottomInset={isWide ? 0 : 0}
|
|
282
|
-
backdropComponent={({ style }) => (
|
|
283
|
-
<Pressable
|
|
284
|
-
style={[style, StyleSheet.absoluteFill]}
|
|
285
|
-
onPress={() => onBackgroundTap()}
|
|
286
|
-
/>
|
|
287
|
-
)}
|
|
288
|
-
onClose={() => onOpenChange?.(false)}
|
|
289
|
-
style={[
|
|
290
|
-
overlayStyle,
|
|
291
|
-
StyleSheet.flatten(rest.style),
|
|
292
|
-
isWide && { marginHorizontal: horizontalMargin },
|
|
293
|
-
]}
|
|
294
|
-
backgroundStyle={[zt.bg.popover, a.radius.all.md, a.shadows.md, p[1]]}
|
|
295
|
-
handleIndicatorStyle={[
|
|
296
|
-
a.sizes.width[12],
|
|
297
|
-
a.sizes.height[1],
|
|
298
|
-
zt.bg.mutedForeground,
|
|
299
|
-
]}
|
|
300
|
-
>
|
|
301
|
-
{isNested && (
|
|
302
|
-
<Animated.View
|
|
303
|
-
style={[
|
|
304
|
-
headerAnimatedStyle,
|
|
305
|
-
a.layout.flex.row,
|
|
306
|
-
a.layout.flex.alignCenter,
|
|
307
|
-
px[4],
|
|
308
|
-
pb[2],
|
|
309
|
-
{
|
|
310
|
-
borderBottomWidth: 1,
|
|
311
|
-
borderBottomColor: theme.colors.border,
|
|
312
|
-
},
|
|
313
|
-
]}
|
|
314
|
-
>
|
|
315
|
-
<Pressable
|
|
316
|
-
onPress={pop}
|
|
317
|
-
style={[
|
|
318
|
-
a.layout.flex.row,
|
|
319
|
-
a.layout.flex.alignCenter,
|
|
320
|
-
gap.all[2],
|
|
321
|
-
]}
|
|
322
|
-
hitSlop={80}
|
|
323
|
-
>
|
|
324
|
-
<ChevronLeft size={20} color={theme.colors.foreground} />
|
|
325
|
-
{currentLevel?.title ? (
|
|
326
|
-
<Text size="lg">{currentLevel.title}</Text>
|
|
327
|
-
) : null}
|
|
328
|
-
</Pressable>
|
|
329
|
-
</Animated.View>
|
|
330
|
-
)}
|
|
331
|
-
<Animated.View style={animatedStyle}>
|
|
332
|
-
<BottomSheetScrollView
|
|
333
|
-
style={[px[4]]}
|
|
334
|
-
contentContainerStyle={{
|
|
335
|
-
paddingBottom: insets.bottom + 50,
|
|
336
|
-
overflow: "hidden",
|
|
337
|
-
}}
|
|
338
|
-
>
|
|
339
|
-
{/* Render all stack levels to keep components mounted, but hide non-current ones */}
|
|
340
|
-
{stack.map((level, index) => {
|
|
341
|
-
const isCurrent = index === stack.length - 1;
|
|
342
|
-
return (
|
|
343
|
-
<View
|
|
344
|
-
key={level.key}
|
|
345
|
-
style={[{ display: isCurrent ? "flex" : "none" }]}
|
|
346
|
-
>
|
|
347
|
-
{typeof level.content === "function"
|
|
348
|
-
? level.content({ pressed: true })
|
|
349
|
-
: level.content}
|
|
350
|
-
</View>
|
|
351
|
-
);
|
|
352
|
-
})}
|
|
353
|
-
</BottomSheetScrollView>
|
|
354
|
-
</Animated.View>
|
|
355
|
-
</BottomSheet>
|
|
356
|
-
</NavigationStackContext.Provider>
|
|
357
|
-
</DropdownMenuPrimitive.Portal>
|
|
358
|
-
);
|
|
359
|
-
});
|
|
360
|
-
|
|
361
65
|
export const DropdownMenuSubTrigger = forwardRef<
|
|
362
66
|
any,
|
|
363
67
|
DropdownMenuPrimitive.SubTriggerProps & {
|
|
@@ -370,56 +74,11 @@ export const DropdownMenuSubTrigger = forwardRef<
|
|
|
370
74
|
children?: React.ReactNode;
|
|
371
75
|
}
|
|
372
76
|
>(({ inset, children, subMenuTitle, ...props }, ref) => {
|
|
373
|
-
const
|
|
374
|
-
const subMenuContext = useContext(SubMenuContext);
|
|
375
|
-
const { icons, theme } = useTheme();
|
|
376
|
-
|
|
377
|
-
// Set the title in the submenu context if provided
|
|
378
|
-
React.useEffect(() => {
|
|
379
|
-
if (subMenuContext && subMenuTitle) {
|
|
380
|
-
subMenuContext.setTitle(subMenuTitle);
|
|
381
|
-
}
|
|
382
|
-
}, [subMenuContext, subMenuTitle]);
|
|
383
|
-
|
|
384
|
-
// If we're in a navigation stack (mobile bottom sheet), handle differently
|
|
385
|
-
if (navStack && subMenuContext) {
|
|
386
|
-
return (
|
|
387
|
-
<Pressable
|
|
388
|
-
onPress={() => {
|
|
389
|
-
subMenuContext.trigger();
|
|
390
|
-
}}
|
|
391
|
-
{...props}
|
|
392
|
-
>
|
|
393
|
-
<View
|
|
394
|
-
style={[
|
|
395
|
-
inset && gap[2],
|
|
396
|
-
layout.flex.row,
|
|
397
|
-
layout.flex.alignCenter,
|
|
398
|
-
a.radius.all.sm,
|
|
399
|
-
py[1],
|
|
400
|
-
pl[2],
|
|
401
|
-
pr[2],
|
|
402
|
-
]}
|
|
403
|
-
>
|
|
404
|
-
{typeof children === "function" ? (
|
|
405
|
-
children({ pressed: true })
|
|
406
|
-
) : typeof children === "string" ? (
|
|
407
|
-
<Text>{children}</Text>
|
|
408
|
-
) : (
|
|
409
|
-
children
|
|
410
|
-
)}
|
|
411
|
-
<View style={[a.layout.position.absolute, a.position.right[1]]}>
|
|
412
|
-
<ChevronRight size={18} color={icons.color.muted} />
|
|
413
|
-
</View>
|
|
414
|
-
</View>
|
|
415
|
-
</Pressable>
|
|
416
|
-
);
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
// Web behavior - use primitive
|
|
77
|
+
const { icons } = useTheme();
|
|
420
78
|
const { open } = DropdownMenuPrimitive.useSubContext();
|
|
421
79
|
const Icon =
|
|
422
80
|
Platform.OS === "web" ? ChevronRight : open ? ChevronUp : ChevronDown;
|
|
81
|
+
|
|
423
82
|
return (
|
|
424
83
|
<TextClassContext.Provider
|
|
425
84
|
value={objectFromObjects([
|
|
@@ -453,45 +112,14 @@ export const DropdownMenuSubContent = forwardRef<
|
|
|
453
112
|
DropdownMenuPrimitive.SubContentProps & { children?: ReactNode }
|
|
454
113
|
>(({ children, ...props }, ref) => {
|
|
455
114
|
const { zero: zt } = useTheme();
|
|
456
|
-
const subMenuContext = useContext(SubMenuContext);
|
|
457
|
-
const navStack = useNavigationStack();
|
|
458
|
-
const prevChildrenRef = useRef<ReactNode>(null);
|
|
459
|
-
|
|
460
|
-
// Register a render function that will be called fresh each time
|
|
461
|
-
React.useEffect(() => {
|
|
462
|
-
if (subMenuContext && navStack) {
|
|
463
|
-
// Only update if children reference actually changed
|
|
464
|
-
if (prevChildrenRef.current === children) {
|
|
465
|
-
return;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
prevChildrenRef.current = children;
|
|
469
|
-
|
|
470
|
-
// Pass a function that returns the current children
|
|
471
|
-
subMenuContext.setRenderContent(() => children);
|
|
472
|
-
|
|
473
|
-
// Force a stack update to trigger rerender with the actual children
|
|
474
|
-
if (subMenuContext.key) {
|
|
475
|
-
// Store the children directly so React can handle updates
|
|
476
|
-
//navStack.updateContent(subMenuContext.key, children);
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
}, [children, subMenuContext, navStack]);
|
|
480
|
-
|
|
481
|
-
// On mobile, don't render the subcontent here - it'll be rendered in the nav stack
|
|
482
|
-
// But keep the component mounted so effects run when children change
|
|
483
|
-
if (navStack && subMenuContext) {
|
|
484
|
-
// Component stays mounted to track prop changes, but renders nothing
|
|
485
|
-
return null;
|
|
486
|
-
}
|
|
487
115
|
|
|
488
|
-
// Web - use primitive
|
|
489
116
|
return (
|
|
490
117
|
<DropdownMenuPrimitive.SubContent
|
|
491
118
|
ref={ref}
|
|
492
119
|
style={[
|
|
493
120
|
a.zIndex[50],
|
|
494
|
-
a.sizes.minWidth[
|
|
121
|
+
a.sizes.minWidth[64],
|
|
122
|
+
a.sizes.maxWidth[64],
|
|
495
123
|
a.overflow.hidden,
|
|
496
124
|
a.radius.all.md,
|
|
497
125
|
a.borders.width.thin,
|
|
@@ -517,7 +145,7 @@ export const DropdownMenuContent = forwardRef<
|
|
|
517
145
|
>(({ overlayStyle, portalHost, style, children, ...props }, ref) => {
|
|
518
146
|
const { zero: zt } = useTheme();
|
|
519
147
|
const { height } = useWindowDimensions();
|
|
520
|
-
const maxHeight = height * 0.
|
|
148
|
+
const maxHeight = height * 0.9;
|
|
521
149
|
|
|
522
150
|
return (
|
|
523
151
|
<DropdownMenuPrimitive.Portal hostName={portalHost}>
|
|
@@ -532,8 +160,9 @@ export const DropdownMenuContent = forwardRef<
|
|
|
532
160
|
style={
|
|
533
161
|
[
|
|
534
162
|
a.zIndex[50],
|
|
535
|
-
a.sizes.minWidth[
|
|
163
|
+
a.sizes.minWidth[64],
|
|
536
164
|
a.sizes.maxWidth[64],
|
|
165
|
+
{ maxHeight: maxHeight },
|
|
537
166
|
a.overflow.hidden,
|
|
538
167
|
a.radius.all.md,
|
|
539
168
|
a.borders.width.thin,
|
|
@@ -546,7 +175,7 @@ export const DropdownMenuContent = forwardRef<
|
|
|
546
175
|
}
|
|
547
176
|
{...props}
|
|
548
177
|
>
|
|
549
|
-
<ScrollView
|
|
178
|
+
<ScrollView showsVerticalScrollIndicator={false}>
|
|
550
179
|
{typeof children === "function"
|
|
551
180
|
? children({ pressed: false })
|
|
552
181
|
: children}
|
|
@@ -565,7 +194,7 @@ export const DropdownMenuContentWithoutPortal = forwardRef<
|
|
|
565
194
|
}
|
|
566
195
|
>(
|
|
567
196
|
(
|
|
568
|
-
{ overlayStyle, maxHeightPercentage = 0.
|
|
197
|
+
{ overlayStyle, maxHeightPercentage = 0.9, children, style, ...props },
|
|
569
198
|
ref,
|
|
570
199
|
) => {
|
|
571
200
|
const { theme } = useTheme();
|
|
@@ -584,8 +213,9 @@ export const DropdownMenuContentWithoutPortal = forwardRef<
|
|
|
584
213
|
style={
|
|
585
214
|
[
|
|
586
215
|
{ zIndex: 999999 },
|
|
587
|
-
a.sizes.minWidth[
|
|
216
|
+
a.sizes.minWidth[64],
|
|
588
217
|
a.sizes.maxWidth[64],
|
|
218
|
+
{ maxHeight: maxHeight },
|
|
589
219
|
a.radius.all.md,
|
|
590
220
|
a.borders.width.thin,
|
|
591
221
|
{ borderColor: theme.colors.border },
|
|
@@ -597,7 +227,7 @@ export const DropdownMenuContentWithoutPortal = forwardRef<
|
|
|
597
227
|
}
|
|
598
228
|
{...props}
|
|
599
229
|
>
|
|
600
|
-
<ScrollView
|
|
230
|
+
<ScrollView showsVerticalScrollIndicator={false}>
|
|
601
231
|
{typeof children === "function"
|
|
602
232
|
? children({ pressed: false })
|
|
603
233
|
: children}
|
|
@@ -608,29 +238,32 @@ export const DropdownMenuContentWithoutPortal = forwardRef<
|
|
|
608
238
|
},
|
|
609
239
|
);
|
|
610
240
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
241
|
+
export const ResponsiveDropdownMenuContent = forwardRef<
|
|
242
|
+
any,
|
|
243
|
+
any & { onModeChange?: (isSheet: boolean) => void }
|
|
244
|
+
>(({ children, onModeChange, ...props }, ref) => {
|
|
245
|
+
const { width } = useWindowDimensions();
|
|
616
246
|
|
|
617
|
-
|
|
618
|
-
|
|
247
|
+
const isBottomSheet =
|
|
248
|
+
Platform.OS !== "web" || (Platform.OS === "web" && width <= 980);
|
|
619
249
|
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
);
|
|
626
|
-
}
|
|
250
|
+
React.useEffect(() => {
|
|
251
|
+
onModeChange?.(isBottomSheet);
|
|
252
|
+
}, [isBottomSheet, onModeChange]);
|
|
253
|
+
|
|
254
|
+
if (isBottomSheet) {
|
|
627
255
|
return (
|
|
628
|
-
<DropdownMenuContent ref={ref} {...props}>
|
|
256
|
+
<DropdownMenuContent align="start" ref={ref} {...props}>
|
|
629
257
|
{children}
|
|
630
258
|
</DropdownMenuContent>
|
|
631
259
|
);
|
|
632
|
-
}
|
|
633
|
-
|
|
260
|
+
}
|
|
261
|
+
return (
|
|
262
|
+
<DropdownMenuContent ref={ref} {...props}>
|
|
263
|
+
{children}
|
|
264
|
+
</DropdownMenuContent>
|
|
265
|
+
);
|
|
266
|
+
});
|
|
634
267
|
|
|
635
268
|
export const DropdownMenuItem = forwardRef<
|
|
636
269
|
any,
|
|
@@ -638,7 +271,7 @@ export const DropdownMenuItem = forwardRef<
|
|
|
638
271
|
>(({ inset, disabled, style, children, ...props }, ref) => {
|
|
639
272
|
const { theme } = useTheme();
|
|
640
273
|
return (
|
|
641
|
-
<
|
|
274
|
+
<DropdownMenuPrimitive.Item ref={ref} {...props}>
|
|
642
275
|
<TextClassContext.Provider
|
|
643
276
|
value={objectFromObjects([
|
|
644
277
|
{ color: theme.colors.popoverForeground },
|
|
@@ -666,7 +299,7 @@ export const DropdownMenuItem = forwardRef<
|
|
|
666
299
|
)}
|
|
667
300
|
</View>
|
|
668
301
|
</TextClassContext.Provider>
|
|
669
|
-
</
|
|
302
|
+
</DropdownMenuPrimitive.Item>
|
|
670
303
|
);
|
|
671
304
|
});
|
|
672
305
|
|
|
@@ -678,6 +311,7 @@ export const DropdownMenuCheckboxItem = forwardRef<
|
|
|
678
311
|
}
|
|
679
312
|
>(({ children, checked, ...props }, ref) => {
|
|
680
313
|
const { theme } = useTheme();
|
|
314
|
+
|
|
681
315
|
return (
|
|
682
316
|
<DropdownMenuPrimitive.CheckboxItem
|
|
683
317
|
ref={ref}
|
|
@@ -698,19 +332,9 @@ export const DropdownMenuCheckboxItem = forwardRef<
|
|
|
698
332
|
>
|
|
699
333
|
{children}
|
|
700
334
|
<View style={[pl[1], layout.position.absolute, right[1]]}>
|
|
701
|
-
|
|
702
|
-
<
|
|
703
|
-
|
|
704
|
-
strokeWidth={3}
|
|
705
|
-
color={theme.colors.foreground}
|
|
706
|
-
/>
|
|
707
|
-
) : (
|
|
708
|
-
<Circle
|
|
709
|
-
size={14}
|
|
710
|
-
strokeWidth={3}
|
|
711
|
-
color={theme.colors.mutedForeground}
|
|
712
|
-
/>
|
|
713
|
-
)}
|
|
335
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
336
|
+
<Check size={14} strokeWidth={3} color={theme.colors.foreground} />
|
|
337
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
714
338
|
</View>
|
|
715
339
|
</View>
|
|
716
340
|
</DropdownMenuPrimitive.CheckboxItem>
|
|
@@ -722,13 +346,16 @@ export const DropdownMenuRadioItem = forwardRef<
|
|
|
722
346
|
DropdownMenuPrimitive.RadioItemProps & {
|
|
723
347
|
ref?: React.RefObject<DropdownMenuPrimitive.RadioItemRef>;
|
|
724
348
|
children?: React.ReactNode;
|
|
349
|
+
value?: string;
|
|
725
350
|
}
|
|
726
|
-
>(({ children, ...props }, ref) => {
|
|
351
|
+
>(({ children, value, ...props }, ref) => {
|
|
727
352
|
const { theme } = useTheme();
|
|
353
|
+
|
|
728
354
|
return (
|
|
729
355
|
<DropdownMenuPrimitive.RadioItem
|
|
730
356
|
ref={ref}
|
|
731
357
|
closeOnPress={props.closeOnPress || false}
|
|
358
|
+
value={value}
|
|
732
359
|
{...props}
|
|
733
360
|
>
|
|
734
361
|
<View
|
|
@@ -854,3 +481,6 @@ export const DropdownMenuInfo = forwardRef<any, any>(
|
|
|
854
481
|
);
|
|
855
482
|
},
|
|
856
483
|
);
|
|
484
|
+
|
|
485
|
+
// Re-export DropdownMenuBottomSheet for compatibility with native
|
|
486
|
+
export const DropdownMenuBottomSheet = DropdownMenuContent;
|