@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
|
@@ -0,0 +1,696 @@
|
|
|
1
|
+
import BottomSheet, { BottomSheetScrollView } from "@gorhom/bottom-sheet";
|
|
2
|
+
import * as DropdownMenuPrimitive from "@rn-primitives/dropdown-menu";
|
|
3
|
+
import {
|
|
4
|
+
Check,
|
|
5
|
+
CheckCircle,
|
|
6
|
+
ChevronLeft,
|
|
7
|
+
ChevronRight,
|
|
8
|
+
Circle,
|
|
9
|
+
} from "lucide-react-native";
|
|
10
|
+
import React, {
|
|
11
|
+
createContext,
|
|
12
|
+
forwardRef,
|
|
13
|
+
ReactNode,
|
|
14
|
+
startTransition,
|
|
15
|
+
useContext,
|
|
16
|
+
useRef,
|
|
17
|
+
useState,
|
|
18
|
+
} from "react";
|
|
19
|
+
import { Pressable, StyleSheet, useWindowDimensions, View } from "react-native";
|
|
20
|
+
import Animated, {
|
|
21
|
+
runOnJS,
|
|
22
|
+
useAnimatedStyle,
|
|
23
|
+
useSharedValue,
|
|
24
|
+
withTiming,
|
|
25
|
+
} from "react-native-reanimated";
|
|
26
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
27
|
+
import {
|
|
28
|
+
a,
|
|
29
|
+
borderRadius,
|
|
30
|
+
fontSize,
|
|
31
|
+
gap,
|
|
32
|
+
layout,
|
|
33
|
+
ml,
|
|
34
|
+
p,
|
|
35
|
+
pb,
|
|
36
|
+
pl,
|
|
37
|
+
pr,
|
|
38
|
+
pt,
|
|
39
|
+
px,
|
|
40
|
+
py,
|
|
41
|
+
right,
|
|
42
|
+
} from "../../lib/theme/atoms";
|
|
43
|
+
import { useTheme } from "../../ui";
|
|
44
|
+
import {
|
|
45
|
+
objectFromObjects,
|
|
46
|
+
TextContext as TextClassContext,
|
|
47
|
+
} from "./primitives/text";
|
|
48
|
+
import { Text } from "./text";
|
|
49
|
+
|
|
50
|
+
// Navigation stack context for bottom sheet menus
|
|
51
|
+
interface NavigationStackItem {
|
|
52
|
+
key: string;
|
|
53
|
+
title?: string;
|
|
54
|
+
content: ReactNode | ((state: { pressed: boolean }) => ReactNode);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
interface NavigationStackContextValue {
|
|
58
|
+
stack: NavigationStackItem[];
|
|
59
|
+
push: (item: NavigationStackItem) => void;
|
|
60
|
+
pop: () => void;
|
|
61
|
+
isNested: boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const NavigationStackContext =
|
|
65
|
+
createContext<NavigationStackContextValue | null>(null);
|
|
66
|
+
|
|
67
|
+
const useNavigationStack = () => {
|
|
68
|
+
const context = useContext(NavigationStackContext);
|
|
69
|
+
return context;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// Context to capture submenu content for mobile navigation
|
|
73
|
+
interface SubMenuContextValue {
|
|
74
|
+
title?: string;
|
|
75
|
+
renderContent: () => ReactNode;
|
|
76
|
+
setRenderContent: (renderer: () => ReactNode) => void;
|
|
77
|
+
setTitle: (title: string) => void;
|
|
78
|
+
trigger: () => void;
|
|
79
|
+
key: string | null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const SubMenuContext = createContext<SubMenuContextValue | null>(null);
|
|
83
|
+
|
|
84
|
+
// Context for RadioGroup on native
|
|
85
|
+
interface RadioGroupContextValue {
|
|
86
|
+
value?: string;
|
|
87
|
+
onValueChange?: (value: string) => void;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const RadioGroupContext = createContext<RadioGroupContextValue | null>(null);
|
|
91
|
+
|
|
92
|
+
export const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
93
|
+
export const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
94
|
+
export const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
95
|
+
|
|
96
|
+
export const DropdownMenuRadioGroup = forwardRef<
|
|
97
|
+
React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>,
|
|
98
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>
|
|
99
|
+
>(({ children, value, onValueChange, ...props }, ref) => {
|
|
100
|
+
return (
|
|
101
|
+
<RadioGroupContext.Provider value={{ value, onValueChange }}>
|
|
102
|
+
{children}
|
|
103
|
+
</RadioGroupContext.Provider>
|
|
104
|
+
);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
export const DropdownMenuSub = forwardRef<any, any>(
|
|
108
|
+
({ children, ...props }, ref) => {
|
|
109
|
+
const navStack = useNavigationStack();
|
|
110
|
+
const [subMenuTitle, setSubMenuTitle] = useState<string | undefined>();
|
|
111
|
+
const renderContentRef = useRef<(() => ReactNode) | null>(null);
|
|
112
|
+
const [subMenuKey, setSubMenuKey] = useState<string | null>(null);
|
|
113
|
+
|
|
114
|
+
const trigger = () => {
|
|
115
|
+
if (renderContentRef.current && navStack) {
|
|
116
|
+
const key = `submenu-${Date.now()}`;
|
|
117
|
+
setSubMenuKey(key);
|
|
118
|
+
navStack.push({
|
|
119
|
+
key,
|
|
120
|
+
title: subMenuTitle,
|
|
121
|
+
content: (props: any) => {
|
|
122
|
+
const renderFn = renderContentRef.current;
|
|
123
|
+
return renderFn ? renderFn() : null;
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const setRenderContent = (renderer: () => ReactNode) => {
|
|
130
|
+
renderContentRef.current = renderer;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const contextValue = React.useMemo(
|
|
134
|
+
() => ({
|
|
135
|
+
renderContent: () => renderContentRef.current?.(),
|
|
136
|
+
setRenderContent,
|
|
137
|
+
title: subMenuTitle,
|
|
138
|
+
setTitle: setSubMenuTitle,
|
|
139
|
+
trigger,
|
|
140
|
+
key: subMenuKey,
|
|
141
|
+
}),
|
|
142
|
+
[subMenuTitle, subMenuKey, navStack],
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
<SubMenuContext.Provider value={contextValue}>
|
|
147
|
+
{children}
|
|
148
|
+
</SubMenuContext.Provider>
|
|
149
|
+
);
|
|
150
|
+
},
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
export const DropdownMenuBottomSheet = forwardRef<
|
|
154
|
+
any,
|
|
155
|
+
DropdownMenuPrimitive.ContentProps & {
|
|
156
|
+
overlayStyle?: any;
|
|
157
|
+
portalHost?: string;
|
|
158
|
+
}
|
|
159
|
+
>(function DropdownMenuBottomSheet(
|
|
160
|
+
{ overlayStyle, portalHost, children, ...rest },
|
|
161
|
+
_ref,
|
|
162
|
+
) {
|
|
163
|
+
const { onOpenChange } = DropdownMenuPrimitive.useRootContext();
|
|
164
|
+
const { zero: zt, theme } = useTheme();
|
|
165
|
+
const sheetRef = useRef<BottomSheet>(null);
|
|
166
|
+
const { width } = useWindowDimensions();
|
|
167
|
+
const isWide = width >= 450;
|
|
168
|
+
const sheetWidth = isWide ? 450 : width;
|
|
169
|
+
const horizontalMargin = isWide ? (width - sheetWidth) / 2 : 0;
|
|
170
|
+
|
|
171
|
+
const insets = useSafeAreaInsets();
|
|
172
|
+
|
|
173
|
+
const [stack, setStack] = useState<NavigationStackItem[]>([
|
|
174
|
+
{ key: "root", content: children },
|
|
175
|
+
]);
|
|
176
|
+
|
|
177
|
+
React.useEffect(() => {
|
|
178
|
+
setStack((prev) => {
|
|
179
|
+
if (!Array.isArray(prev) || prev.length === 0) {
|
|
180
|
+
return [{ key: "root", content: children }];
|
|
181
|
+
}
|
|
182
|
+
const newStack = [...prev];
|
|
183
|
+
newStack[0] = { ...newStack[0], content: children };
|
|
184
|
+
return newStack;
|
|
185
|
+
});
|
|
186
|
+
}, [children]);
|
|
187
|
+
|
|
188
|
+
const slideAnim = useSharedValue(0);
|
|
189
|
+
const fadeAnim = useSharedValue(1);
|
|
190
|
+
|
|
191
|
+
const push = (item: NavigationStackItem) => {
|
|
192
|
+
setStack((prev) => {
|
|
193
|
+
if (!Array.isArray(prev))
|
|
194
|
+
return [{ key: "root", content: children }, item];
|
|
195
|
+
return [...prev, item];
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
slideAnim.value = 40;
|
|
199
|
+
fadeAnim.value = 0;
|
|
200
|
+
slideAnim.value = withTiming(0, { duration: 350 });
|
|
201
|
+
fadeAnim.value = withTiming(1, { duration: 350 });
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
const popStack = () => {
|
|
205
|
+
startTransition(() => {
|
|
206
|
+
setStack((prev) => {
|
|
207
|
+
if (!Array.isArray(prev) || prev.length <= 1) {
|
|
208
|
+
return [{ key: "root", content: children }];
|
|
209
|
+
}
|
|
210
|
+
return prev.slice(0, -1);
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
const resetAnimationValues = () => {
|
|
216
|
+
setTimeout(() => {
|
|
217
|
+
slideAnim.value = 0;
|
|
218
|
+
fadeAnim.value = 1;
|
|
219
|
+
}, 5);
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
const pop = () => {
|
|
223
|
+
if (stack.length <= 1) return;
|
|
224
|
+
|
|
225
|
+
slideAnim.value = withTiming(40, { duration: 150 });
|
|
226
|
+
fadeAnim.value = withTiming(0, { duration: 150 }, (finished) => {
|
|
227
|
+
if (finished) {
|
|
228
|
+
runOnJS(popStack)();
|
|
229
|
+
runOnJS(resetAnimationValues)();
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
const animatedStyle = useAnimatedStyle(() => ({
|
|
235
|
+
transform: [{ translateX: slideAnim.value }],
|
|
236
|
+
opacity: fadeAnim.value,
|
|
237
|
+
}));
|
|
238
|
+
|
|
239
|
+
const headerAnimatedStyle = useAnimatedStyle(() => ({
|
|
240
|
+
opacity: fadeAnim.value,
|
|
241
|
+
}));
|
|
242
|
+
|
|
243
|
+
const currentLevel = stack[stack.length - 1];
|
|
244
|
+
const isNested = stack.length > 1;
|
|
245
|
+
|
|
246
|
+
const onBackgroundTap = () => {
|
|
247
|
+
if (sheetRef.current) sheetRef.current?.close();
|
|
248
|
+
|
|
249
|
+
setTimeout(() => {
|
|
250
|
+
onOpenChange?.(false);
|
|
251
|
+
}, 300);
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
if (!currentLevel) {
|
|
255
|
+
return null;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return (
|
|
259
|
+
<DropdownMenuPrimitive.Portal hostName={portalHost}>
|
|
260
|
+
<NavigationStackContext.Provider value={{ stack, push, pop, isNested }}>
|
|
261
|
+
<BottomSheet
|
|
262
|
+
ref={sheetRef}
|
|
263
|
+
enablePanDownToClose
|
|
264
|
+
enableDynamicSizing
|
|
265
|
+
detached={isWide}
|
|
266
|
+
bottomInset={isWide ? 0 : 0}
|
|
267
|
+
backdropComponent={({ style }) => (
|
|
268
|
+
<Pressable
|
|
269
|
+
style={[style, StyleSheet.absoluteFill]}
|
|
270
|
+
onPress={() => onBackgroundTap()}
|
|
271
|
+
/>
|
|
272
|
+
)}
|
|
273
|
+
onClose={() => onOpenChange?.(false)}
|
|
274
|
+
style={[
|
|
275
|
+
overlayStyle,
|
|
276
|
+
StyleSheet.flatten(rest.style),
|
|
277
|
+
isWide && { marginHorizontal: horizontalMargin },
|
|
278
|
+
]}
|
|
279
|
+
backgroundStyle={[zt.bg.popover, a.radius.all.md, a.shadows.md, p[1]]}
|
|
280
|
+
handleIndicatorStyle={[
|
|
281
|
+
a.sizes.width[12],
|
|
282
|
+
a.sizes.height[1],
|
|
283
|
+
zt.bg.mutedForeground,
|
|
284
|
+
]}
|
|
285
|
+
>
|
|
286
|
+
{isNested && (
|
|
287
|
+
<Animated.View
|
|
288
|
+
style={[
|
|
289
|
+
headerAnimatedStyle,
|
|
290
|
+
a.layout.flex.row,
|
|
291
|
+
a.layout.flex.alignCenter,
|
|
292
|
+
px[4],
|
|
293
|
+
pb[2],
|
|
294
|
+
{
|
|
295
|
+
borderBottomWidth: 1,
|
|
296
|
+
borderBottomColor: theme.colors.border,
|
|
297
|
+
},
|
|
298
|
+
]}
|
|
299
|
+
>
|
|
300
|
+
<Pressable
|
|
301
|
+
onPress={pop}
|
|
302
|
+
style={[
|
|
303
|
+
a.layout.flex.row,
|
|
304
|
+
a.layout.flex.alignCenter,
|
|
305
|
+
gap.all[2],
|
|
306
|
+
]}
|
|
307
|
+
hitSlop={80}
|
|
308
|
+
>
|
|
309
|
+
<ChevronLeft size={20} color={theme.colors.foreground} />
|
|
310
|
+
{currentLevel?.title ? (
|
|
311
|
+
<Text size="lg">{currentLevel.title}</Text>
|
|
312
|
+
) : null}
|
|
313
|
+
</Pressable>
|
|
314
|
+
</Animated.View>
|
|
315
|
+
)}
|
|
316
|
+
<Animated.View style={animatedStyle}>
|
|
317
|
+
<BottomSheetScrollView
|
|
318
|
+
style={[px[4]]}
|
|
319
|
+
contentContainerStyle={{
|
|
320
|
+
paddingBottom: insets.bottom + 50,
|
|
321
|
+
overflow: "hidden",
|
|
322
|
+
}}
|
|
323
|
+
>
|
|
324
|
+
{stack.map((level, index) => {
|
|
325
|
+
const isCurrent = index === stack.length - 1;
|
|
326
|
+
return (
|
|
327
|
+
<View
|
|
328
|
+
key={level.key}
|
|
329
|
+
style={[{ display: isCurrent ? "flex" : "none" }]}
|
|
330
|
+
>
|
|
331
|
+
{typeof level.content === "function"
|
|
332
|
+
? level.content({ pressed: true })
|
|
333
|
+
: level.content}
|
|
334
|
+
</View>
|
|
335
|
+
);
|
|
336
|
+
})}
|
|
337
|
+
</BottomSheetScrollView>
|
|
338
|
+
</Animated.View>
|
|
339
|
+
</BottomSheet>
|
|
340
|
+
</NavigationStackContext.Provider>
|
|
341
|
+
</DropdownMenuPrimitive.Portal>
|
|
342
|
+
);
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
export const DropdownMenuSubTrigger = forwardRef<
|
|
346
|
+
any,
|
|
347
|
+
DropdownMenuPrimitive.SubTriggerProps & {
|
|
348
|
+
inset?: boolean;
|
|
349
|
+
subMenuTitle?: string;
|
|
350
|
+
} & {
|
|
351
|
+
ref?: React.RefObject<DropdownMenuPrimitive.SubTriggerRef>;
|
|
352
|
+
className?: string;
|
|
353
|
+
inset?: boolean;
|
|
354
|
+
children?: React.ReactNode;
|
|
355
|
+
}
|
|
356
|
+
>(({ inset, children, subMenuTitle, ...props }, ref) => {
|
|
357
|
+
const subMenuContext = useContext(SubMenuContext);
|
|
358
|
+
const { icons } = useTheme();
|
|
359
|
+
|
|
360
|
+
React.useEffect(() => {
|
|
361
|
+
if (subMenuContext && subMenuTitle) {
|
|
362
|
+
subMenuContext.setTitle(subMenuTitle);
|
|
363
|
+
}
|
|
364
|
+
}, [subMenuContext, subMenuTitle]);
|
|
365
|
+
|
|
366
|
+
return (
|
|
367
|
+
<Pressable
|
|
368
|
+
onPress={() => {
|
|
369
|
+
subMenuContext?.trigger();
|
|
370
|
+
}}
|
|
371
|
+
{...props}
|
|
372
|
+
>
|
|
373
|
+
<View
|
|
374
|
+
style={[
|
|
375
|
+
inset && gap[2],
|
|
376
|
+
layout.flex.row,
|
|
377
|
+
layout.flex.alignCenter,
|
|
378
|
+
a.radius.all.sm,
|
|
379
|
+
py[1],
|
|
380
|
+
pl[2],
|
|
381
|
+
pr[2],
|
|
382
|
+
]}
|
|
383
|
+
>
|
|
384
|
+
{typeof children === "function" ? (
|
|
385
|
+
children({ pressed: true })
|
|
386
|
+
) : typeof children === "string" ? (
|
|
387
|
+
<Text>{children}</Text>
|
|
388
|
+
) : (
|
|
389
|
+
children
|
|
390
|
+
)}
|
|
391
|
+
<View style={[a.layout.position.absolute, a.position.right[1]]}>
|
|
392
|
+
<ChevronRight size={18} color={icons.color.muted} />
|
|
393
|
+
</View>
|
|
394
|
+
</View>
|
|
395
|
+
</Pressable>
|
|
396
|
+
);
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
export const DropdownMenuSubContent = forwardRef<
|
|
400
|
+
any,
|
|
401
|
+
DropdownMenuPrimitive.SubContentProps & { children?: ReactNode }
|
|
402
|
+
>(({ children, ...props }, ref) => {
|
|
403
|
+
const subMenuContext = useContext(SubMenuContext);
|
|
404
|
+
const navStack = useNavigationStack();
|
|
405
|
+
const prevChildrenRef = useRef<ReactNode>(null);
|
|
406
|
+
|
|
407
|
+
React.useEffect(() => {
|
|
408
|
+
if (subMenuContext && navStack) {
|
|
409
|
+
if (prevChildrenRef.current === children) {
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
prevChildrenRef.current = children;
|
|
414
|
+
subMenuContext.setRenderContent(() => children);
|
|
415
|
+
}
|
|
416
|
+
}, [children, subMenuContext, navStack]);
|
|
417
|
+
|
|
418
|
+
return null;
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
export const DropdownMenuContent = forwardRef<
|
|
422
|
+
any,
|
|
423
|
+
DropdownMenuPrimitive.ContentProps & {
|
|
424
|
+
overlayStyle?: any;
|
|
425
|
+
portalHost?: string;
|
|
426
|
+
}
|
|
427
|
+
>(({ overlayStyle, portalHost, style, children, ...props }, ref) => {
|
|
428
|
+
return (
|
|
429
|
+
<DropdownMenuBottomSheet {...props}>{children}</DropdownMenuBottomSheet>
|
|
430
|
+
);
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
export const DropdownMenuContentWithoutPortal = forwardRef<
|
|
434
|
+
any,
|
|
435
|
+
DropdownMenuPrimitive.ContentProps & {
|
|
436
|
+
overlayStyle?: any;
|
|
437
|
+
maxHeightPercentage?: number;
|
|
438
|
+
}
|
|
439
|
+
>(
|
|
440
|
+
(
|
|
441
|
+
{ overlayStyle, maxHeightPercentage = 0.8, children, style, ...props },
|
|
442
|
+
ref,
|
|
443
|
+
) => {
|
|
444
|
+
return (
|
|
445
|
+
<DropdownMenuBottomSheet {...props}>{children}</DropdownMenuBottomSheet>
|
|
446
|
+
);
|
|
447
|
+
},
|
|
448
|
+
);
|
|
449
|
+
|
|
450
|
+
export const ResponsiveDropdownMenuContent = forwardRef<
|
|
451
|
+
any,
|
|
452
|
+
any & { onModeChange?: (isSheet: boolean) => void }
|
|
453
|
+
>(({ children, onModeChange, ...props }, ref) => {
|
|
454
|
+
React.useEffect(() => {
|
|
455
|
+
onModeChange?.(true);
|
|
456
|
+
}, [onModeChange]);
|
|
457
|
+
|
|
458
|
+
return (
|
|
459
|
+
<DropdownMenuBottomSheet ref={ref} {...props}>
|
|
460
|
+
{children}
|
|
461
|
+
</DropdownMenuBottomSheet>
|
|
462
|
+
);
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
export const DropdownMenuItem = forwardRef<
|
|
466
|
+
any,
|
|
467
|
+
DropdownMenuPrimitive.ItemProps & { inset?: boolean; disabled?: boolean }
|
|
468
|
+
>(({ inset, disabled, style, children, ...props }, ref) => {
|
|
469
|
+
const { theme } = useTheme();
|
|
470
|
+
return (
|
|
471
|
+
<Pressable {...props}>
|
|
472
|
+
<TextClassContext.Provider
|
|
473
|
+
value={objectFromObjects([
|
|
474
|
+
{ color: theme.colors.popoverForeground },
|
|
475
|
+
a.fontSize.base,
|
|
476
|
+
])}
|
|
477
|
+
>
|
|
478
|
+
<View
|
|
479
|
+
style={[
|
|
480
|
+
a.layout.flex.row,
|
|
481
|
+
a.layout.flex.alignCenter,
|
|
482
|
+
a.radius.all.sm,
|
|
483
|
+
py[1],
|
|
484
|
+
pl[2],
|
|
485
|
+
pr[2],
|
|
486
|
+
]}
|
|
487
|
+
>
|
|
488
|
+
{typeof children === "function" ? (
|
|
489
|
+
children({ pressed: true })
|
|
490
|
+
) : typeof children === "string" ? (
|
|
491
|
+
<Text style={[inset && gap[2], disabled && { opacity: 0.5 }]}>
|
|
492
|
+
{children}
|
|
493
|
+
</Text>
|
|
494
|
+
) : (
|
|
495
|
+
children
|
|
496
|
+
)}
|
|
497
|
+
</View>
|
|
498
|
+
</TextClassContext.Provider>
|
|
499
|
+
</Pressable>
|
|
500
|
+
);
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
export const DropdownMenuCheckboxItem = forwardRef<
|
|
504
|
+
any,
|
|
505
|
+
DropdownMenuPrimitive.CheckboxItemProps & {
|
|
506
|
+
ref?: React.RefObject<DropdownMenuPrimitive.CheckboxItemRef>;
|
|
507
|
+
children?: React.ReactNode;
|
|
508
|
+
}
|
|
509
|
+
>(({ children, checked, ...props }, ref) => {
|
|
510
|
+
const { theme } = useTheme();
|
|
511
|
+
|
|
512
|
+
return (
|
|
513
|
+
<Pressable
|
|
514
|
+
onPress={(e) => {
|
|
515
|
+
props.onCheckedChange?.(!checked);
|
|
516
|
+
props.onPress?.(e);
|
|
517
|
+
}}
|
|
518
|
+
{...props}
|
|
519
|
+
>
|
|
520
|
+
<View
|
|
521
|
+
style={[
|
|
522
|
+
a.layout.flex.row,
|
|
523
|
+
a.layout.flex.alignCenter,
|
|
524
|
+
a.radius.all.sm,
|
|
525
|
+
py[1],
|
|
526
|
+
pl[2],
|
|
527
|
+
pr[2],
|
|
528
|
+
pr[8],
|
|
529
|
+
]}
|
|
530
|
+
>
|
|
531
|
+
{children}
|
|
532
|
+
<View style={[pl[1], layout.position.absolute, right[1]]}>
|
|
533
|
+
{checked ? (
|
|
534
|
+
<CheckCircle
|
|
535
|
+
size={14}
|
|
536
|
+
strokeWidth={3}
|
|
537
|
+
color={theme.colors.foreground}
|
|
538
|
+
/>
|
|
539
|
+
) : (
|
|
540
|
+
<Circle
|
|
541
|
+
size={14}
|
|
542
|
+
strokeWidth={3}
|
|
543
|
+
color={theme.colors.mutedForeground}
|
|
544
|
+
/>
|
|
545
|
+
)}
|
|
546
|
+
</View>
|
|
547
|
+
</View>
|
|
548
|
+
</Pressable>
|
|
549
|
+
);
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
export const DropdownMenuRadioItem = forwardRef<
|
|
553
|
+
any,
|
|
554
|
+
DropdownMenuPrimitive.RadioItemProps & {
|
|
555
|
+
ref?: React.RefObject<DropdownMenuPrimitive.RadioItemRef>;
|
|
556
|
+
children?: React.ReactNode;
|
|
557
|
+
value?: string;
|
|
558
|
+
}
|
|
559
|
+
>(({ children, value, ...props }, ref) => {
|
|
560
|
+
const { theme } = useTheme();
|
|
561
|
+
const radioGroupContext = useContext(RadioGroupContext);
|
|
562
|
+
const isSelected = radioGroupContext?.value === value;
|
|
563
|
+
|
|
564
|
+
return (
|
|
565
|
+
<Pressable
|
|
566
|
+
onPress={(e) => {
|
|
567
|
+
if (value && radioGroupContext?.onValueChange) {
|
|
568
|
+
radioGroupContext.onValueChange(value);
|
|
569
|
+
}
|
|
570
|
+
props.onPress?.(e);
|
|
571
|
+
}}
|
|
572
|
+
{...props}
|
|
573
|
+
>
|
|
574
|
+
<View
|
|
575
|
+
style={[
|
|
576
|
+
a.layout.flex.row,
|
|
577
|
+
a.layout.flex.alignCenter,
|
|
578
|
+
a.radius.all.sm,
|
|
579
|
+
py[1],
|
|
580
|
+
pl[2],
|
|
581
|
+
pr[8],
|
|
582
|
+
]}
|
|
583
|
+
>
|
|
584
|
+
{children}
|
|
585
|
+
{isSelected && (
|
|
586
|
+
<View style={[pl[1], layout.position.absolute, right[1]]}>
|
|
587
|
+
<Check size={14} strokeWidth={3} color={theme.colors.foreground} />
|
|
588
|
+
</View>
|
|
589
|
+
)}
|
|
590
|
+
</View>
|
|
591
|
+
</Pressable>
|
|
592
|
+
);
|
|
593
|
+
});
|
|
594
|
+
|
|
595
|
+
export const DropdownMenuLabel = forwardRef<
|
|
596
|
+
any,
|
|
597
|
+
DropdownMenuPrimitive.LabelProps & { inset?: boolean }
|
|
598
|
+
>(({ inset, ...props }, ref) => {
|
|
599
|
+
const { theme } = useTheme();
|
|
600
|
+
return (
|
|
601
|
+
<Text
|
|
602
|
+
ref={ref}
|
|
603
|
+
style={
|
|
604
|
+
[
|
|
605
|
+
px[2],
|
|
606
|
+
py[2],
|
|
607
|
+
{ color: theme.colors.textMuted },
|
|
608
|
+
a.fontSize.base,
|
|
609
|
+
(inset && gap[2]) as any,
|
|
610
|
+
] as any
|
|
611
|
+
}
|
|
612
|
+
{...props}
|
|
613
|
+
/>
|
|
614
|
+
);
|
|
615
|
+
});
|
|
616
|
+
|
|
617
|
+
export const DropdownMenuSeparator = forwardRef<
|
|
618
|
+
any,
|
|
619
|
+
DropdownMenuPrimitive.SeparatorProps
|
|
620
|
+
>((props, ref) => {
|
|
621
|
+
const { theme } = useTheme();
|
|
622
|
+
return (
|
|
623
|
+
<View
|
|
624
|
+
ref={ref}
|
|
625
|
+
style={[
|
|
626
|
+
{
|
|
627
|
+
borderBottomWidth: 1,
|
|
628
|
+
borderBottomColor: theme.colors.border,
|
|
629
|
+
marginVertical: -0.5,
|
|
630
|
+
},
|
|
631
|
+
]}
|
|
632
|
+
{...props}
|
|
633
|
+
/>
|
|
634
|
+
);
|
|
635
|
+
});
|
|
636
|
+
|
|
637
|
+
export function DropdownMenuShortcut(props: any) {
|
|
638
|
+
const { theme } = useTheme();
|
|
639
|
+
return (
|
|
640
|
+
<Text
|
|
641
|
+
style={[
|
|
642
|
+
ml.auto,
|
|
643
|
+
{ color: theme.colors.textMuted },
|
|
644
|
+
a.fontSize.sm,
|
|
645
|
+
a.letterSpacing.widest,
|
|
646
|
+
]}
|
|
647
|
+
{...props}
|
|
648
|
+
/>
|
|
649
|
+
);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
export const DropdownMenuGroup = forwardRef<
|
|
653
|
+
any,
|
|
654
|
+
{ inset?: boolean; title?: string; children: ReactNode }
|
|
655
|
+
>((props, ref) => {
|
|
656
|
+
const { theme } = useTheme();
|
|
657
|
+
const { inset, title, children, ...rest } = props;
|
|
658
|
+
return (
|
|
659
|
+
<View style={[pt[2], inset && gap[2]]} ref={ref} {...rest}>
|
|
660
|
+
{title && (
|
|
661
|
+
<Text style={[{ color: theme.colors.textMuted }, pb[1], pl[2]]}>
|
|
662
|
+
{title}
|
|
663
|
+
</Text>
|
|
664
|
+
)}
|
|
665
|
+
<View
|
|
666
|
+
style={[
|
|
667
|
+
{ backgroundColor: theme.colors.muted },
|
|
668
|
+
p[2],
|
|
669
|
+
gap.all[1],
|
|
670
|
+
{ borderRadius: borderRadius.lg },
|
|
671
|
+
]}
|
|
672
|
+
>
|
|
673
|
+
{children}
|
|
674
|
+
</View>
|
|
675
|
+
</View>
|
|
676
|
+
);
|
|
677
|
+
});
|
|
678
|
+
|
|
679
|
+
export const DropdownMenuInfo = forwardRef<any, any>(
|
|
680
|
+
({ description, ...props }, ref) => {
|
|
681
|
+
const { theme } = useTheme();
|
|
682
|
+
return (
|
|
683
|
+
<Text
|
|
684
|
+
style={[
|
|
685
|
+
{ color: theme.colors.textMuted },
|
|
686
|
+
pt[1],
|
|
687
|
+
pl[2],
|
|
688
|
+
pb[2],
|
|
689
|
+
fontSize.sm,
|
|
690
|
+
]}
|
|
691
|
+
>
|
|
692
|
+
{description}
|
|
693
|
+
</Text>
|
|
694
|
+
);
|
|
695
|
+
},
|
|
696
|
+
);
|