@streamplace/components 0.8.8 → 0.8.11
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 +1 -0
- 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 +1 -0
- 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 +8 -6
- 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 +1 -0
- 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 +35 -38
- 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/i18next-config.d.ts +41 -0
- package/dist/i18n/i18next-config.d.ts.map +1 -0
- package/dist/i18n/i18next-config.js +264 -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 +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -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 +1 -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/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/locales/en-US/common.ftl +41 -0
- package/locales/en-US/settings.ftl +122 -0
- package/locales/es-ES/common.ftl +41 -0
- package/locales/es-ES/settings.ftl +161 -0
- package/locales/fr-FR/common.ftl +41 -0
- package/locales/fr-FR/settings.ftl +158 -0
- package/locales/manifest.json +36 -0
- package/locales/pt-BR/common.ftl +41 -0
- package/locales/pt-BR/settings.ftl +159 -0
- package/locales/zh-Hant/common.ftl +41 -0
- package/locales/zh-Hant/settings.ftl +154 -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/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 +49 -26
- package/src/components/mobile-player/ui/viewer-count.tsx +39 -0
- package/src/components/mobile-player/ui/viewers.tsx +10 -14
- package/src/components/ui/button.tsx +22 -4
- package/src/components/ui/dropdown.native.tsx +696 -0
- package/src/components/ui/dropdown.tsx +76 -96
- 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/i18next-config.ts +301 -0
- package/src/i18n/index.ts +50 -0
- package/src/i18n/provider.tsx +70 -0
- package/src/index.tsx +7 -0
- package/src/streamplace-store/streamplace-store.tsx +184 -2
- package/tsconfig.json +11 -2
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
// TypeScript i18next configuration with Fluent and manifest integration
|
|
2
|
+
// modified from https://github.com/inaturalist/iNaturalistReactNative/blob/main/src/i18n/initI18next.js
|
|
3
|
+
|
|
4
|
+
import i18next from "i18next";
|
|
5
|
+
import Fluent from "i18next-fluent";
|
|
6
|
+
import resourcesToBackend from "i18next-resources-to-backend";
|
|
7
|
+
import "intl-pluralrules";
|
|
8
|
+
import { initReactI18next } from "react-i18next";
|
|
9
|
+
|
|
10
|
+
// Import our manifest directly to avoid circular dependency
|
|
11
|
+
import manifest from "../../locales/manifest.json";
|
|
12
|
+
import storage from "../storage";
|
|
13
|
+
|
|
14
|
+
const LOCALE_STORAGE_KEY = "@streamplace/locale";
|
|
15
|
+
|
|
16
|
+
// Try to import expo-localization, but make it optional
|
|
17
|
+
let Localization: typeof import("expo-localization") | null = null;
|
|
18
|
+
try {
|
|
19
|
+
const localizationModule = require("expo-localization");
|
|
20
|
+
// Handle both default and named exports
|
|
21
|
+
Localization = localizationModule.default
|
|
22
|
+
? localizationModule.default
|
|
23
|
+
: localizationModule;
|
|
24
|
+
} catch {
|
|
25
|
+
// expo-localization not available, will use browser/fallback detection
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function cleanLocaleName(locale: string): string {
|
|
29
|
+
return locale.replace("_", "-").replace(/@.*/, "");
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function getLocaleFromSystemLocale(): string {
|
|
33
|
+
let systemLocale = "en";
|
|
34
|
+
|
|
35
|
+
// Try to get locale from expo-localization if available
|
|
36
|
+
if (Localization && typeof Localization.getLocales === "function") {
|
|
37
|
+
try {
|
|
38
|
+
const locales = Localization.getLocales();
|
|
39
|
+
systemLocale = locales?.[0]?.languageTag || "en";
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.warn("Failed to get locales from expo-localization:", error);
|
|
42
|
+
}
|
|
43
|
+
} else if (typeof navigator !== "undefined" && navigator.language) {
|
|
44
|
+
// Fallback to browser navigator.language
|
|
45
|
+
systemLocale = navigator.language;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const candidateLocale = cleanLocaleName(systemLocale);
|
|
49
|
+
|
|
50
|
+
// Check if the full locale is supported (e.g., "en-US")
|
|
51
|
+
if (manifest.supportedLocales.includes(candidateLocale)) {
|
|
52
|
+
return candidateLocale;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Check if the language part is supported (e.g., "en" from "en-GB")
|
|
56
|
+
const lang = candidateLocale.split("-")[0];
|
|
57
|
+
const matchingLocale = manifest.supportedLocales.find((locale) =>
|
|
58
|
+
locale.startsWith(lang + "-"),
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
if (matchingLocale) {
|
|
62
|
+
return matchingLocale;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Fall back to default locale from manifest
|
|
66
|
+
return manifest.fallbackChain[0];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Cache for the current locale to avoid async lookups
|
|
70
|
+
let cachedLocale: string | null = null;
|
|
71
|
+
|
|
72
|
+
export async function getCurrentLocale(): Promise<string> {
|
|
73
|
+
if (cachedLocale) {
|
|
74
|
+
return cachedLocale;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const stored = await storage.getItem(LOCALE_STORAGE_KEY);
|
|
78
|
+
if (stored && manifest.supportedLocales.includes(stored)) {
|
|
79
|
+
cachedLocale = stored;
|
|
80
|
+
return stored;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const systemLocale = getLocaleFromSystemLocale();
|
|
84
|
+
cachedLocale = systemLocale;
|
|
85
|
+
return systemLocale;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Synchronous version for initial load - returns cached or system locale
|
|
89
|
+
export function getCurrentLocaleSync(): string {
|
|
90
|
+
return cachedLocale || getLocaleFromSystemLocale();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Enhanced fallback logic using manifest
|
|
94
|
+
function getFallbackChain(code: string): string[] {
|
|
95
|
+
const fallbacks: string[] = [];
|
|
96
|
+
|
|
97
|
+
if (!code) return manifest.fallbackChain;
|
|
98
|
+
|
|
99
|
+
// Regional fallbacks
|
|
100
|
+
if (code.match(/^es-/)) {
|
|
101
|
+
fallbacks.push("es-ES"); // Spanish fallback
|
|
102
|
+
} else if (code.match(/^fr-/)) {
|
|
103
|
+
fallbacks.push("fr-FR"); // French fallback
|
|
104
|
+
} else if (code.match(/^pt-/)) {
|
|
105
|
+
fallbacks.push("pt-BR"); // Portuguese fallback
|
|
106
|
+
} else if (code.match(/^zh-/)) {
|
|
107
|
+
fallbacks.push("zh-Hant"); // Chinese fallback
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Add manifest fallback chain
|
|
111
|
+
return [...fallbacks, ...manifest.fallbackChain];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Use sync version for initial config - will be updated when storage loads
|
|
115
|
+
const LOCALE = getCurrentLocaleSync();
|
|
116
|
+
|
|
117
|
+
export const I18NEXT_CONFIG = {
|
|
118
|
+
lng: LOCALE,
|
|
119
|
+
ns: ["common", "settings"], // Common should be first as it's most frequently used
|
|
120
|
+
defaultNS: "common",
|
|
121
|
+
interpolation: {
|
|
122
|
+
escapeValue: false, // React already safes from XSS
|
|
123
|
+
},
|
|
124
|
+
react: {
|
|
125
|
+
useSuspense: false, // Prevent Android crashes
|
|
126
|
+
},
|
|
127
|
+
i18nFormat: {
|
|
128
|
+
fluentBundleOptions: {
|
|
129
|
+
useIsolating: false,
|
|
130
|
+
functions: {
|
|
131
|
+
VOWORCON: ([txt]: [string]) =>
|
|
132
|
+
"aeiou".indexOf(txt[0].toLowerCase()) >= 0 ? "vow" : "con",
|
|
133
|
+
JOIN: (args: string[], opts: { separator?: string } = {}) =>
|
|
134
|
+
args
|
|
135
|
+
.filter(Boolean)
|
|
136
|
+
.filter((s) => typeof s === "string")
|
|
137
|
+
.join(opts.separator || ""),
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
load: "currentOnly",
|
|
142
|
+
cleanCode: true,
|
|
143
|
+
fallbackLng: getFallbackChain,
|
|
144
|
+
supportedLngs: [...manifest.supportedLocales],
|
|
145
|
+
debug: process.env.NODE_ENV === "development",
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
// Translation loading function that loads compiled JSON files per namespace
|
|
149
|
+
async function loadTranslationData(
|
|
150
|
+
locale: string,
|
|
151
|
+
namespace: string,
|
|
152
|
+
): Promise<any> {
|
|
153
|
+
try {
|
|
154
|
+
let translations: any = {};
|
|
155
|
+
|
|
156
|
+
try {
|
|
157
|
+
// For web environments, load from public directory
|
|
158
|
+
if (typeof window !== "undefined") {
|
|
159
|
+
const response = await fetch(`/locales/${locale}/${namespace}.json`);
|
|
160
|
+
if (!response.ok) {
|
|
161
|
+
throw new Error(`HTTP ${response.status}`);
|
|
162
|
+
}
|
|
163
|
+
translations = await response.json();
|
|
164
|
+
} else {
|
|
165
|
+
// For React Native, use static requires for bundler compatibility
|
|
166
|
+
// Map base language codes to full locales
|
|
167
|
+
const fullLocale = locale.includes("-")
|
|
168
|
+
? locale
|
|
169
|
+
: {
|
|
170
|
+
en: "en-US",
|
|
171
|
+
pt: "pt-BR",
|
|
172
|
+
es: "es-ES",
|
|
173
|
+
zh: "zh-Hant",
|
|
174
|
+
fr: "fr-FR",
|
|
175
|
+
}[locale] || locale;
|
|
176
|
+
|
|
177
|
+
// Static requires for React Native bundler
|
|
178
|
+
const localeNamespaceKey = `${fullLocale}/${namespace}`;
|
|
179
|
+
const translationMap: Record<string, any> = {
|
|
180
|
+
"en-US/common": require("../../public/locales/en-US/common.json"),
|
|
181
|
+
"pt-BR/common": require("../../public/locales/pt-BR/common.json"),
|
|
182
|
+
"es-ES/common": require("../../public/locales/es-ES/common.json"),
|
|
183
|
+
"zh-Hant/common": require("../../public/locales/zh-Hant/common.json"),
|
|
184
|
+
"fr-FR/common": require("../../public/locales/fr-FR/common.json"),
|
|
185
|
+
"en-US/settings": require("../../public/locales/en-US/settings.json"),
|
|
186
|
+
"pt-BR/settings": require("../../public/locales/pt-BR/settings.json"),
|
|
187
|
+
"es-ES/settings": require("../../public/locales/es-ES/settings.json"),
|
|
188
|
+
"zh-Hant/settings": require("../../public/locales/zh-Hant/settings.json"),
|
|
189
|
+
"fr-FR/settings": require("../../public/locales/fr-FR/settings.json"),
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
translations = translationMap[localeNamespaceKey];
|
|
193
|
+
|
|
194
|
+
if (!translations) {
|
|
195
|
+
throw new Error(
|
|
196
|
+
`No static translation mapping for ${localeNamespaceKey}`,
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
} catch (loadError: any) {
|
|
201
|
+
throw new Error(
|
|
202
|
+
`Failed to load ${namespace} translations for ${locale}: ${loadError.message}`,
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (!translations || Object.keys(translations).length === 0) {
|
|
207
|
+
throw new Error("No translations found in file");
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return translations;
|
|
211
|
+
} catch (error: any) {
|
|
212
|
+
console.error(
|
|
213
|
+
`Failed to load ${namespace} translations for ${locale}:`,
|
|
214
|
+
error,
|
|
215
|
+
);
|
|
216
|
+
// Return minimal fallback
|
|
217
|
+
return {
|
|
218
|
+
loading: "Loading...",
|
|
219
|
+
error: "Error",
|
|
220
|
+
cancel: "Cancel",
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Initialize i18next with our configuration
|
|
226
|
+
let initPromise: Promise<typeof i18next> | null = null;
|
|
227
|
+
|
|
228
|
+
export default async function initI18next(
|
|
229
|
+
config: any = {},
|
|
230
|
+
): Promise<typeof i18next> {
|
|
231
|
+
// Return existing promise if already initializing
|
|
232
|
+
if (initPromise) {
|
|
233
|
+
return initPromise;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// Load stored locale from storage first
|
|
237
|
+
const storedLocale = await getCurrentLocale();
|
|
238
|
+
|
|
239
|
+
const finalConfig = {
|
|
240
|
+
...I18NEXT_CONFIG,
|
|
241
|
+
lng: storedLocale,
|
|
242
|
+
...config,
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
initPromise = i18next
|
|
246
|
+
.use(initReactI18next)
|
|
247
|
+
.use(Fluent)
|
|
248
|
+
.use(
|
|
249
|
+
resourcesToBackend((locale: string, namespace: string, callback: any) => {
|
|
250
|
+
// Load translations using our manifest-based namespace system
|
|
251
|
+
loadTranslationData(locale, namespace)
|
|
252
|
+
.then((translations) => callback(null, translations))
|
|
253
|
+
.catch((error) => callback(error, null));
|
|
254
|
+
}),
|
|
255
|
+
)
|
|
256
|
+
.init(finalConfig)
|
|
257
|
+
.then(() => {
|
|
258
|
+
// Automatically persist language changes to storage
|
|
259
|
+
i18next.on("languageChanged", (lng) => {
|
|
260
|
+
if (lng && manifest.supportedLocales.includes(lng)) {
|
|
261
|
+
cachedLocale = lng;
|
|
262
|
+
storage.setItem(LOCALE_STORAGE_KEY, lng);
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
return i18next;
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
return initPromise;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// Utility functions for language management
|
|
272
|
+
export async function changeLanguage(locale: string): Promise<void> {
|
|
273
|
+
// Storage is handled automatically via languageChanged event
|
|
274
|
+
await i18next.changeLanguage(locale);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export function getCurrentLanguage(): string {
|
|
278
|
+
// Return the cached locale preference, not i18next's resolved language
|
|
279
|
+
// i18next.language may return just "zh" instead of "zh-Hant"
|
|
280
|
+
return getCurrentLocaleSync();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export function getSupportedLocales(): string[] {
|
|
284
|
+
return [...manifest.supportedLocales];
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export function getLanguageInfo(locale: string): any {
|
|
288
|
+
return manifest.languages[locale] || null;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export function isLocaleSupported(locale: string): boolean {
|
|
292
|
+
return manifest.supportedLocales.includes(locale);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// Auto-initialize i18next on module load
|
|
296
|
+
// This ensures the instance is ready when used in providers
|
|
297
|
+
initI18next().catch((error) => {
|
|
298
|
+
console.error("Failed to auto-initialize i18n:", error);
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
export { i18next };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Simple i18n infrastructure exports for Streamplace components
|
|
2
|
+
// Re-exports i18next tools for app-level customization
|
|
3
|
+
|
|
4
|
+
// Core i18next exports
|
|
5
|
+
export { default as i18n } from "i18next";
|
|
6
|
+
export {
|
|
7
|
+
I18nextProvider,
|
|
8
|
+
Trans,
|
|
9
|
+
Translation,
|
|
10
|
+
initReactI18next,
|
|
11
|
+
useTranslation,
|
|
12
|
+
withTranslation,
|
|
13
|
+
} from "react-i18next";
|
|
14
|
+
|
|
15
|
+
// i18next plugins for common use cases
|
|
16
|
+
export { default as LanguageDetector } from "i18next-browser-languagedetector";
|
|
17
|
+
export { default as Backend } from "i18next-http-backend";
|
|
18
|
+
export { default as resourcesToBackend } from "i18next-resources-to-backend";
|
|
19
|
+
|
|
20
|
+
// Fluent support
|
|
21
|
+
export { default as Fluent } from "i18next-fluent";
|
|
22
|
+
|
|
23
|
+
// Basic provider components for consistent setup
|
|
24
|
+
export { I18nProvider } from "./provider";
|
|
25
|
+
|
|
26
|
+
// Bootstrap configuration and utilities
|
|
27
|
+
export {
|
|
28
|
+
I18NEXT_CONFIG,
|
|
29
|
+
changeLanguage,
|
|
30
|
+
getCurrentLanguage,
|
|
31
|
+
getCurrentLocale,
|
|
32
|
+
getLanguageInfo,
|
|
33
|
+
getLocaleFromSystemLocale,
|
|
34
|
+
getSupportedLocales,
|
|
35
|
+
i18next,
|
|
36
|
+
default as initI18next,
|
|
37
|
+
isLocaleSupported,
|
|
38
|
+
} from "./i18next-config";
|
|
39
|
+
|
|
40
|
+
// Manifest data
|
|
41
|
+
export { default as manifest } from "../../locales/manifest.json";
|
|
42
|
+
|
|
43
|
+
// TypeScript types
|
|
44
|
+
export type {
|
|
45
|
+
i18n as I18nInstance,
|
|
46
|
+
InitOptions,
|
|
47
|
+
Resource,
|
|
48
|
+
ResourceLanguage,
|
|
49
|
+
TFunction,
|
|
50
|
+
} from "i18next";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// Simple i18n provider wrapper for consistent setup
|
|
2
|
+
import type { i18n } from "i18next";
|
|
3
|
+
import { ReactNode, useEffect, useState } from "react";
|
|
4
|
+
import { I18nextProvider } from "react-i18next";
|
|
5
|
+
|
|
6
|
+
interface I18nProviderProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
i18n: i18n;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Simple wrapper around I18nextProvider for consistent setup
|
|
13
|
+
* The actual i18n instance should be configured at the app level
|
|
14
|
+
* Waits for i18next to be initialized AND language loaded to prevent FOUC
|
|
15
|
+
*/
|
|
16
|
+
export function I18nProvider({ children, i18n }: I18nProviderProps) {
|
|
17
|
+
const [isReady, setIsReady] = useState(false);
|
|
18
|
+
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
// Check if both initialized and language is loaded
|
|
21
|
+
const checkReady = () => {
|
|
22
|
+
const initialized = i18n.isInitialized;
|
|
23
|
+
const hasCommon = i18n.hasLoadedNamespace("common");
|
|
24
|
+
console.log("i18n ready check:", {
|
|
25
|
+
initialized,
|
|
26
|
+
hasCommon,
|
|
27
|
+
language: i18n.language,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
if (initialized && hasCommon) {
|
|
31
|
+
setIsReady(true);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
checkReady();
|
|
36
|
+
|
|
37
|
+
// Fallback: if not ready after 300ms, just proceed anyway
|
|
38
|
+
const fallbackTimeout = setTimeout(() => {
|
|
39
|
+
if (!isReady) {
|
|
40
|
+
console.log("i18n ready timeout - proceeding anyway");
|
|
41
|
+
setIsReady(true);
|
|
42
|
+
}
|
|
43
|
+
}, 300);
|
|
44
|
+
|
|
45
|
+
// Listen for both initialization and language loaded events
|
|
46
|
+
const handleInitialized = () => {
|
|
47
|
+
checkReady();
|
|
48
|
+
};
|
|
49
|
+
const handleLanguageLoaded = () => {
|
|
50
|
+
checkReady();
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
i18n.on("initialized", handleInitialized);
|
|
54
|
+
i18n.on("languageChanged", handleLanguageLoaded);
|
|
55
|
+
i18n.on("loaded", handleLanguageLoaded);
|
|
56
|
+
|
|
57
|
+
return () => {
|
|
58
|
+
clearTimeout(fallbackTimeout);
|
|
59
|
+
i18n.off("initialized", handleInitialized);
|
|
60
|
+
i18n.off("languageChanged", handleLanguageLoaded);
|
|
61
|
+
i18n.off("loaded", handleLanguageLoaded);
|
|
62
|
+
};
|
|
63
|
+
}, [i18n, isReady]);
|
|
64
|
+
|
|
65
|
+
if (!isReady) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return <I18nextProvider i18n={i18n}>{children}</I18nextProvider>;
|
|
70
|
+
}
|
package/src/index.tsx
CHANGED
|
@@ -24,6 +24,10 @@ export * as zero from "./ui";
|
|
|
24
24
|
|
|
25
25
|
export * from "./hooks";
|
|
26
26
|
|
|
27
|
+
// Internationalization system exports
|
|
28
|
+
export * from "./i18n";
|
|
29
|
+
export * as I18n from "./i18n";
|
|
30
|
+
|
|
27
31
|
// Theme system exports
|
|
28
32
|
export * from "./lib/theme";
|
|
29
33
|
|
|
@@ -33,6 +37,9 @@ export * from "./components/chat/system-message";
|
|
|
33
37
|
export { default as VideoRetry } from "./components/mobile-player/video-retry";
|
|
34
38
|
export * from "./lib/system-messages";
|
|
35
39
|
|
|
40
|
+
export { DanmuOverlay } from "./components/danmu/danmu-overlay";
|
|
41
|
+
export { DanmuOverlayOBS } from "./components/danmu/danmu-overlay-obs";
|
|
42
|
+
|
|
36
43
|
// Rotation lock system exports
|
|
37
44
|
export {
|
|
38
45
|
RotationProvider,
|
|
@@ -54,6 +54,20 @@ export interface StreamplaceState {
|
|
|
54
54
|
muted: boolean;
|
|
55
55
|
setVolume: (volume: number) => void;
|
|
56
56
|
setMuted: (muted: boolean) => void;
|
|
57
|
+
|
|
58
|
+
// Danmu settings
|
|
59
|
+
danmuUnlocked: boolean;
|
|
60
|
+
danmuEnabled: boolean;
|
|
61
|
+
danmuOpacity: number;
|
|
62
|
+
danmuSpeed: number;
|
|
63
|
+
danmuLaneCount: number;
|
|
64
|
+
danmuMaxMessages: number;
|
|
65
|
+
setDanmuUnlocked: (unlocked: boolean) => void;
|
|
66
|
+
setDanmuEnabled: (enabled: boolean) => void;
|
|
67
|
+
setDanmuOpacity: (opacity: number) => void;
|
|
68
|
+
setDanmuSpeed: (speed: number) => void;
|
|
69
|
+
setDanmuLaneCount: (laneCount: number) => void;
|
|
70
|
+
setDanmuMaxMessages: (maxMessages: number) => void;
|
|
57
71
|
}
|
|
58
72
|
|
|
59
73
|
export type StreamplaceStore = StoreApi<StreamplaceState>;
|
|
@@ -65,6 +79,12 @@ export const makeStreamplaceStore = ({
|
|
|
65
79
|
}): StoreApi<StreamplaceState> => {
|
|
66
80
|
const VOLUME_STORAGE_KEY = "globalVolume";
|
|
67
81
|
const MUTED_STORAGE_KEY = "globalMuted";
|
|
82
|
+
const DANMU_UNLOCKED_KEY = "danmuUnlocked";
|
|
83
|
+
const DANMU_ENABLED_KEY = "danmuEnabled";
|
|
84
|
+
const DANMU_OPACITY_KEY = "danmuOpacity";
|
|
85
|
+
const DANMU_SPEED_KEY = "danmuSpeed";
|
|
86
|
+
const DANMU_LANE_COUNT_KEY = "danmuLaneCount";
|
|
87
|
+
const DANMU_MAX_MESSAGES_KEY = "danmuMaxMessages";
|
|
68
88
|
|
|
69
89
|
const store = createStore<StreamplaceState>()((set) => ({
|
|
70
90
|
url,
|
|
@@ -125,16 +145,82 @@ export const makeStreamplaceStore = ({
|
|
|
125
145
|
set({ muted });
|
|
126
146
|
storage.setItem(MUTED_STORAGE_KEY, muted.toString()).catch(console.error);
|
|
127
147
|
},
|
|
148
|
+
|
|
149
|
+
// Danmu settings - start with defaults
|
|
150
|
+
danmuUnlocked: false,
|
|
151
|
+
danmuEnabled: false,
|
|
152
|
+
danmuOpacity: 80,
|
|
153
|
+
danmuSpeed: 1,
|
|
154
|
+
danmuLaneCount: 12,
|
|
155
|
+
danmuMaxMessages: 50,
|
|
156
|
+
|
|
157
|
+
setDanmuUnlocked: (unlocked: boolean) => {
|
|
158
|
+
set({ danmuUnlocked: unlocked });
|
|
159
|
+
storage
|
|
160
|
+
.setItem(DANMU_UNLOCKED_KEY, unlocked.toString())
|
|
161
|
+
.catch(console.error);
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
setDanmuEnabled: (enabled: boolean) => {
|
|
165
|
+
set({ danmuEnabled: enabled });
|
|
166
|
+
storage
|
|
167
|
+
.setItem(DANMU_ENABLED_KEY, enabled.toString())
|
|
168
|
+
.catch(console.error);
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
setDanmuOpacity: (opacity: number) => {
|
|
172
|
+
const clamped = Math.max(0, Math.min(100, opacity));
|
|
173
|
+
set({ danmuOpacity: clamped });
|
|
174
|
+
storage
|
|
175
|
+
.setItem(DANMU_OPACITY_KEY, clamped.toString())
|
|
176
|
+
.catch(console.error);
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
setDanmuSpeed: (speed: number) => {
|
|
180
|
+
const clamped = Math.max(0.1, Math.min(3, speed));
|
|
181
|
+
set({ danmuSpeed: clamped });
|
|
182
|
+
storage.setItem(DANMU_SPEED_KEY, clamped.toString()).catch(console.error);
|
|
183
|
+
},
|
|
184
|
+
|
|
185
|
+
setDanmuLaneCount: (laneCount: number) => {
|
|
186
|
+
const clamped = Math.max(4, Math.min(20, laneCount));
|
|
187
|
+
set({ danmuLaneCount: clamped });
|
|
188
|
+
storage
|
|
189
|
+
.setItem(DANMU_LANE_COUNT_KEY, clamped.toString())
|
|
190
|
+
.catch(console.error);
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
setDanmuMaxMessages: (maxMessages: number) => {
|
|
194
|
+
const clamped = Math.max(5, Math.min(200, maxMessages));
|
|
195
|
+
set({ danmuMaxMessages: clamped });
|
|
196
|
+
storage
|
|
197
|
+
.setItem(DANMU_MAX_MESSAGES_KEY, clamped.toString())
|
|
198
|
+
.catch(console.error);
|
|
199
|
+
},
|
|
128
200
|
}));
|
|
129
201
|
|
|
130
|
-
// Load initial volume state from storage asynchronously
|
|
202
|
+
// Load initial volume and danmu state from storage asynchronously
|
|
131
203
|
(async () => {
|
|
132
204
|
try {
|
|
133
205
|
const storedVolume = await storage.getItem(VOLUME_STORAGE_KEY);
|
|
134
206
|
const storedMuted = await storage.getItem(MUTED_STORAGE_KEY);
|
|
207
|
+
const storedDanmuUnlocked = await storage.getItem(DANMU_UNLOCKED_KEY);
|
|
208
|
+
const storedDanmuEnabled = await storage.getItem(DANMU_ENABLED_KEY);
|
|
209
|
+
const storedDanmuOpacity = await storage.getItem(DANMU_OPACITY_KEY);
|
|
210
|
+
const storedDanmuSpeed = await storage.getItem(DANMU_SPEED_KEY);
|
|
211
|
+
const storedDanmuLaneCount = await storage.getItem(DANMU_LANE_COUNT_KEY);
|
|
212
|
+
const storedDanmuMaxMessages = await storage.getItem(
|
|
213
|
+
DANMU_MAX_MESSAGES_KEY,
|
|
214
|
+
);
|
|
135
215
|
|
|
136
216
|
let initialVolume = 1.0;
|
|
137
217
|
let initialMuted = false;
|
|
218
|
+
let initialDanmuUnlocked = false;
|
|
219
|
+
let initialDanmuEnabled = false;
|
|
220
|
+
let initialDanmuOpacity = 80;
|
|
221
|
+
let initialDanmuSpeed = 1;
|
|
222
|
+
let initialDanmuLaneCount = 12;
|
|
223
|
+
let initialDanmuMaxMessages = 50;
|
|
138
224
|
|
|
139
225
|
if (storedVolume) {
|
|
140
226
|
const parsedVolume = parseFloat(storedVolume);
|
|
@@ -151,12 +237,54 @@ export const makeStreamplaceStore = ({
|
|
|
151
237
|
initialMuted = storedMuted === "true";
|
|
152
238
|
}
|
|
153
239
|
|
|
240
|
+
if (storedDanmuUnlocked) {
|
|
241
|
+
initialDanmuUnlocked = storedDanmuUnlocked === "true";
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
if (storedDanmuEnabled) {
|
|
245
|
+
initialDanmuEnabled = storedDanmuEnabled === "true";
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
if (storedDanmuOpacity) {
|
|
249
|
+
const parsed = parseInt(storedDanmuOpacity);
|
|
250
|
+
if (Number.isFinite(parsed) && parsed >= 0 && parsed <= 100) {
|
|
251
|
+
initialDanmuOpacity = parsed;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (storedDanmuSpeed) {
|
|
256
|
+
const parsed = parseFloat(storedDanmuSpeed);
|
|
257
|
+
if (Number.isFinite(parsed) && parsed >= 0.1 && parsed <= 3) {
|
|
258
|
+
initialDanmuSpeed = parsed;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (storedDanmuLaneCount) {
|
|
263
|
+
const parsed = parseInt(storedDanmuLaneCount);
|
|
264
|
+
if (Number.isFinite(parsed) && parsed >= 4 && parsed <= 20) {
|
|
265
|
+
initialDanmuLaneCount = parsed;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if (storedDanmuMaxMessages) {
|
|
270
|
+
const parsed = parseInt(storedDanmuMaxMessages);
|
|
271
|
+
if (Number.isFinite(parsed) && parsed >= 5 && parsed <= 200) {
|
|
272
|
+
initialDanmuMaxMessages = parsed;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
154
276
|
store.setState({
|
|
155
277
|
volume: initialVolume,
|
|
156
278
|
muted: initialMuted,
|
|
279
|
+
danmuUnlocked: initialDanmuUnlocked,
|
|
280
|
+
danmuEnabled: initialDanmuEnabled,
|
|
281
|
+
danmuOpacity: initialDanmuOpacity,
|
|
282
|
+
danmuSpeed: initialDanmuSpeed,
|
|
283
|
+
danmuLaneCount: initialDanmuLaneCount,
|
|
284
|
+
danmuMaxMessages: initialDanmuMaxMessages,
|
|
157
285
|
});
|
|
158
286
|
} catch (error) {
|
|
159
|
-
console.error("Failed to load
|
|
287
|
+
console.error("Failed to load state from storage:", error);
|
|
160
288
|
}
|
|
161
289
|
})();
|
|
162
290
|
|
|
@@ -213,4 +341,58 @@ export const useEffectiveVolume = () =>
|
|
|
213
341
|
return Number.isFinite(effectiveVolume) ? effectiveVolume : 1.0;
|
|
214
342
|
});
|
|
215
343
|
|
|
344
|
+
// Danmu convenience hooks
|
|
345
|
+
export const useDanmuUnlocked = () =>
|
|
346
|
+
useStreamplaceStore((x) => x.danmuUnlocked);
|
|
347
|
+
export const useDanmuEnabled = () => useStreamplaceStore((x) => x.danmuEnabled);
|
|
348
|
+
export const useDanmuOpacity = () => useStreamplaceStore((x) => x.danmuOpacity);
|
|
349
|
+
export const useDanmuSpeed = () => useStreamplaceStore((x) => x.danmuSpeed);
|
|
350
|
+
export const useDanmuLaneCount = () =>
|
|
351
|
+
useStreamplaceStore((x) => x.danmuLaneCount);
|
|
352
|
+
export const useDanmuMaxMessages = () =>
|
|
353
|
+
useStreamplaceStore((x) => x.danmuMaxMessages);
|
|
354
|
+
export const useSetDanmuUnlocked = () =>
|
|
355
|
+
useStreamplaceStore((x) => x.setDanmuUnlocked);
|
|
356
|
+
export const useSetDanmuEnabled = () =>
|
|
357
|
+
useStreamplaceStore((x) => x.setDanmuEnabled);
|
|
358
|
+
export const useSetDanmuOpacity = () =>
|
|
359
|
+
useStreamplaceStore((x) => x.setDanmuOpacity);
|
|
360
|
+
export const useSetDanmuSpeed = () =>
|
|
361
|
+
useStreamplaceStore((x) => x.setDanmuSpeed);
|
|
362
|
+
export const useSetDanmuLaneCount = () =>
|
|
363
|
+
useStreamplaceStore((x) => x.setDanmuLaneCount);
|
|
364
|
+
export const useSetDanmuMaxMessages = () =>
|
|
365
|
+
useStreamplaceStore((x) => x.setDanmuMaxMessages);
|
|
366
|
+
|
|
367
|
+
// Composite hook that calls all individual hooks
|
|
368
|
+
export const useDanmuSettings = () => {
|
|
369
|
+
const danmuUnlocked = useDanmuUnlocked();
|
|
370
|
+
const danmuEnabled = useDanmuEnabled();
|
|
371
|
+
const danmuOpacity = useDanmuOpacity();
|
|
372
|
+
const danmuSpeed = useDanmuSpeed();
|
|
373
|
+
const danmuLaneCount = useDanmuLaneCount();
|
|
374
|
+
const danmuMaxMessages = useDanmuMaxMessages();
|
|
375
|
+
const setDanmuUnlocked = useSetDanmuUnlocked();
|
|
376
|
+
const setDanmuEnabled = useSetDanmuEnabled();
|
|
377
|
+
const setDanmuOpacity = useSetDanmuOpacity();
|
|
378
|
+
const setDanmuSpeed = useSetDanmuSpeed();
|
|
379
|
+
const setDanmuLaneCount = useSetDanmuLaneCount();
|
|
380
|
+
const setDanmuMaxMessages = useSetDanmuMaxMessages();
|
|
381
|
+
|
|
382
|
+
return {
|
|
383
|
+
danmuUnlocked,
|
|
384
|
+
danmuEnabled,
|
|
385
|
+
danmuOpacity,
|
|
386
|
+
danmuSpeed,
|
|
387
|
+
danmuLaneCount,
|
|
388
|
+
danmuMaxMessages,
|
|
389
|
+
setDanmuUnlocked,
|
|
390
|
+
setDanmuEnabled,
|
|
391
|
+
setDanmuOpacity,
|
|
392
|
+
setDanmuSpeed,
|
|
393
|
+
setDanmuLaneCount,
|
|
394
|
+
setDanmuMaxMessages,
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
|
|
216
398
|
export { useCreateStreamRecord, useUpdateStreamRecord } from "./stream";
|
package/tsconfig.json
CHANGED
|
@@ -5,7 +5,16 @@
|
|
|
5
5
|
"outDir": "./dist",
|
|
6
6
|
"jsx": "react-jsx",
|
|
7
7
|
"module": "commonjs",
|
|
8
|
-
"
|
|
8
|
+
"noEmit": false,
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"declarationMap": true,
|
|
11
|
+
"sourceMap": true,
|
|
12
|
+
"resolveJsonModule": true
|
|
9
13
|
},
|
|
10
|
-
"include": ["./src"]
|
|
14
|
+
"include": ["./src"],
|
|
15
|
+
"ts-node": {
|
|
16
|
+
"compilerOptions": {
|
|
17
|
+
"resolveJsonModule": true
|
|
18
|
+
}
|
|
19
|
+
}
|
|
11
20
|
}
|