@q9labsai/chalk-react-native 4.1.17 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +134 -29
- package/android/build.gradle +35 -0
- package/android/compatibility/ModuleApiCompatibility.java +215 -0
- package/android/src/main/AndroidManifest.xml +2 -1
- package/android/src/main/java/ai/q9labs/chalk/reactnative/ChalkSpaceForegroundService.java +105 -31
- package/android/src/main/kotlin/ai/q9labs/chalk/reactnative/ChalkAndroidConnectionServicePackage.kt +2 -0
- package/android/src/main/kotlin/ai/q9labs/chalk/reactnative/ChalkAudioRouteModule.kt +137 -0
- package/android/src/main/kotlin/ai/q9labs/chalk/reactnative/ChalkCallServiceModule.kt +32 -0
- package/android/src/main/kotlin/ai/q9labs/chalk/reactnative/CommunicationDeviceListener.kt +23 -0
- package/android/src/test/kotlin/ai/q9labs/chalk/compatibility/UnsafeSignatures.kt +29 -0
- package/dist/android/call-service.d.ts +4 -0
- package/dist/android/call-service.d.ts.map +1 -0
- package/dist/avatar/FaceAvatar.d.ts +19 -0
- package/dist/avatar/FaceAvatar.d.ts.map +1 -0
- package/dist/avatar/tile-avatar-size.d.ts +3 -0
- package/dist/avatar/tile-avatar-size.d.ts.map +1 -0
- package/dist/chunk-GYVZSOGQ.js +30 -0
- package/dist/chunk-IHE6EA3T.js +25 -0
- package/dist/chunk-OIBT2FNM.js +1479 -0
- package/dist/client.d.ts +1 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +185 -2
- package/dist/components/EmbeddedWhiteboard.d.ts.map +1 -1
- package/dist/components/native-media-visibility.d.ts +3 -2
- package/dist/components/native-media-visibility.d.ts.map +1 -1
- package/dist/components/useAndroidCallService.d.ts +8 -0
- package/dist/components/useAndroidCallService.d.ts.map +1 -0
- package/dist/dev.d.ts +10 -0
- package/dist/dev.d.ts.map +1 -0
- package/dist/dev.js +10 -0
- package/dist/dock/Dock.d.ts +23 -0
- package/dist/dock/Dock.d.ts.map +1 -0
- package/dist/dock/LeaveMenu.d.ts +12 -0
- package/dist/dock/LeaveMenu.d.ts.map +1 -0
- package/dist/dock/MoreSheet.d.ts +17 -0
- package/dist/dock/MoreSheet.d.ts.map +1 -0
- package/dist/dock/ReactionBurst.d.ts +8 -0
- package/dist/dock/ReactionBurst.d.ts.map +1 -0
- package/dist/dock/RoutePicker.d.ts +16 -0
- package/dist/dock/RoutePicker.d.ts.map +1 -0
- package/dist/dock/audio-route.d.ts +25 -0
- package/dist/dock/audio-route.d.ts.map +1 -0
- package/dist/error-YOPTEH5N.wav +0 -0
- package/dist/frame/CallFrame.d.ts +17 -0
- package/dist/frame/CallFrame.d.ts.map +1 -0
- package/dist/frame/Chalk.d.ts +40 -0
- package/dist/frame/Chalk.d.ts.map +1 -0
- package/dist/frame/back-handler.d.ts +6 -0
- package/dist/frame/back-handler.d.ts.map +1 -0
- package/dist/frame/dev-scenario.d.ts +28 -0
- package/dist/frame/dev-scenario.d.ts.map +1 -0
- package/dist/frame/device-layout.d.ts +16 -0
- package/dist/frame/device-layout.d.ts.map +1 -0
- package/dist/frame/measurement.d.ts +28 -0
- package/dist/frame/measurement.d.ts.map +1 -0
- package/dist/frame/portal.d.ts +24 -0
- package/dist/frame/portal.d.ts.map +1 -0
- package/dist/frame/preferences.d.ts +21 -0
- package/dist/frame/preferences.d.ts.map +1 -0
- package/dist/frame/regions.d.ts +25 -0
- package/dist/frame/regions.d.ts.map +1 -0
- package/dist/hand-DFWVXPH2.wav +0 -0
- package/dist/haptics/haptics.d.ts +12 -0
- package/dist/haptics/haptics.d.ts.map +1 -0
- package/dist/header/CallDetailsSheet.d.ts +18 -0
- package/dist/header/CallDetailsSheet.d.ts.map +1 -0
- package/dist/header/Header.d.ts +17 -0
- package/dist/header/Header.d.ts.map +1 -0
- package/dist/header/QrCode.d.ts +6 -0
- package/dist/header/QrCode.d.ts.map +1 -0
- package/dist/icons/Icon.d.ts +12 -0
- package/dist/icons/Icon.d.ts.map +1 -0
- package/dist/icons/icon-element.d.ts +24 -0
- package/dist/icons/icon-element.d.ts.map +1 -0
- package/dist/icons/icon-paths.d.ts +530 -0
- package/dist/icons/icon-paths.d.ts.map +1 -0
- package/dist/index.d.ts +6 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2956 -38
- package/dist/join-Z6RL5AHE.wav +0 -0
- package/dist/knock-4VBQSHK4.wav +0 -0
- package/dist/leave-MQLZOWQD.wav +0 -0
- package/dist/limbo/Limbo.d.ts +25 -0
- package/dist/limbo/Limbo.d.ts.map +1 -0
- package/dist/limbo/Veil.d.ts +10 -0
- package/dist/limbo/Veil.d.ts.map +1 -0
- package/dist/media/native-capture-error.d.ts +7 -0
- package/dist/media/native-capture-error.d.ts.map +1 -0
- package/dist/message-6Y6WJGTB.wav +0 -0
- package/dist/motion/MovingFrame.d.ts +36 -0
- package/dist/motion/MovingFrame.d.ts.map +1 -0
- package/dist/motion/motion.d.ts +82 -0
- package/dist/motion/motion.d.ts.map +1 -0
- package/dist/motion/presence.d.ts +6 -0
- package/dist/motion/presence.d.ts.map +1 -0
- package/dist/motion/press.d.ts +15 -0
- package/dist/motion/press.d.ts.map +1 -0
- package/dist/mute-H5SJFXVI.wav +0 -0
- package/dist/primitives/BottomSheet.d.ts +36 -0
- package/dist/primitives/BottomSheet.d.ts.map +1 -0
- package/dist/primitives/ChalkText.d.ts +13 -0
- package/dist/primitives/ChalkText.d.ts.map +1 -0
- package/dist/primitives/CopyButton.d.ts +11 -0
- package/dist/primitives/CopyButton.d.ts.map +1 -0
- package/dist/primitives/IconButton.d.ts +26 -0
- package/dist/primitives/IconButton.d.ts.map +1 -0
- package/dist/primitives/Menu.d.ts +39 -0
- package/dist/primitives/Menu.d.ts.map +1 -0
- package/dist/primitives/NameTag.d.ts +19 -0
- package/dist/primitives/NameTag.d.ts.map +1 -0
- package/dist/primitives/PillButton.d.ts +19 -0
- package/dist/primitives/PillButton.d.ts.map +1 -0
- package/dist/primitives/SegmentedControl.d.ts +17 -0
- package/dist/primitives/SegmentedControl.d.ts.map +1 -0
- package/dist/primitives/SheetGroup.d.ts +24 -0
- package/dist/primitives/SheetGroup.d.ts.map +1 -0
- package/dist/primitives/Switch.d.ts +9 -0
- package/dist/primitives/Switch.d.ts.map +1 -0
- package/dist/primitives/TileShell.d.ts +18 -0
- package/dist/primitives/TileShell.d.ts.map +1 -0
- package/dist/primitives/announce.d.ts +3 -0
- package/dist/primitives/announce.d.ts.map +1 -0
- package/dist/primitives/menu-placement.d.ts +32 -0
- package/dist/primitives/menu-placement.d.ts.map +1 -0
- package/dist/primitives/toast/Toast.d.ts +8 -0
- package/dist/primitives/toast/Toast.d.ts.map +1 -0
- package/dist/primitives/toast/ToastStack.d.ts +18 -0
- package/dist/primitives/toast/ToastStack.d.ts.map +1 -0
- package/dist/primitives/toast/toast-store.d.ts +39 -0
- package/dist/primitives/toast/toast-store.d.ts.map +1 -0
- package/dist/recording-Q4GB77Y4.wav +0 -0
- package/dist/sheets/people-chat/ChatNotices.d.ts +14 -0
- package/dist/sheets/people-chat/ChatNotices.d.ts.map +1 -0
- package/dist/sheets/people-chat/ChatTab.d.ts +6 -0
- package/dist/sheets/people-chat/ChatTab.d.ts.map +1 -0
- package/dist/sheets/people-chat/Composer.d.ts +7 -0
- package/dist/sheets/people-chat/Composer.d.ts.map +1 -0
- package/dist/sheets/people-chat/PeopleChatSheet.d.ts +17 -0
- package/dist/sheets/people-chat/PeopleChatSheet.d.ts.map +1 -0
- package/dist/sheets/people-chat/PeopleTab.d.ts +3 -0
- package/dist/sheets/people-chat/PeopleTab.d.ts.map +1 -0
- package/dist/sheets/people-chat/PhotoViewer.d.ts +19 -0
- package/dist/sheets/people-chat/PhotoViewer.d.ts.map +1 -0
- package/dist/sheets/people-chat/TextField.d.ts +4 -0
- package/dist/sheets/people-chat/TextField.d.ts.map +1 -0
- package/dist/sheets/people-chat/attachments.d.ts +33 -0
- package/dist/sheets/people-chat/attachments.d.ts.map +1 -0
- package/dist/sheets/people-chat/chat-model.d.ts +64 -0
- package/dist/sheets/people-chat/chat-model.d.ts.map +1 -0
- package/dist/sheets/people-chat/people-model.d.ts +43 -0
- package/dist/sheets/people-chat/people-model.d.ts.map +1 -0
- package/dist/sounds/sounds.d.ts +33 -0
- package/dist/sounds/sounds.d.ts.map +1 -0
- package/dist/space-client/create-native-space-client.d.ts +0 -4
- package/dist/space-client/create-native-space-client.d.ts.map +1 -1
- package/dist/space-client/random-uuid.d.ts +7 -0
- package/dist/space-client/random-uuid.d.ts.map +1 -0
- package/dist/stage/ContentTile.d.ts +18 -0
- package/dist/stage/ContentTile.d.ts.map +1 -0
- package/dist/stage/ParticipantTile.d.ts +18 -0
- package/dist/stage/ParticipantTile.d.ts.map +1 -0
- package/dist/stage/Stage.d.ts +14 -0
- package/dist/stage/Stage.d.ts.map +1 -0
- package/dist/stage/TileSheet.d.ts +12 -0
- package/dist/stage/TileSheet.d.ts.map +1 -0
- package/dist/stage/camera.d.ts +7 -0
- package/dist/stage/camera.d.ts.map +1 -0
- package/dist/stage/layout.d.ts +57 -0
- package/dist/stage/layout.d.ts.map +1 -0
- package/dist/stage/space-selector.d.ts +10 -0
- package/dist/stage/space-selector.d.ts.map +1 -0
- package/dist/stage/stage-view.d.ts +23 -0
- package/dist/stage/stage-view.d.ts.map +1 -0
- package/dist/status/CallOverlays.d.ts +17 -0
- package/dist/status/CallOverlays.d.ts.map +1 -0
- package/dist/status/ChalkArrival.d.ts +24 -0
- package/dist/status/ChalkArrival.d.ts.map +1 -0
- package/dist/status/StatusPage.d.ts +14 -0
- package/dist/status/StatusPage.d.ts.map +1 -0
- package/dist/status/call-screen.d.ts +20 -0
- package/dist/status/call-screen.d.ts.map +1 -0
- package/dist/test-VD2KAM4D.wav +0 -0
- package/dist/theme/theme.d.ts +15 -0
- package/dist/theme/theme.d.ts.map +1 -0
- package/dist/theme/tokens.d.ts +248 -0
- package/dist/theme/tokens.d.ts.map +1 -0
- package/dist/toasts/CallEventToasts.d.ts +21 -0
- package/dist/toasts/CallEventToasts.d.ts.map +1 -0
- package/dist/toasts/notices.d.ts +34 -0
- package/dist/toasts/notices.d.ts.map +1 -0
- package/dist/ui/ChalkUI.d.ts +12 -0
- package/dist/ui/ChalkUI.d.ts.map +1 -0
- package/dist/ui.d.ts +25 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +77 -0
- package/dist/unmute-2XR2LICU.wav +0 -0
- package/embedded/chalk-whiteboard/asset-manifest.json +2 -2
- package/embedded/chalk-whiteboard/renderer.js +510 -510
- package/ios/ChalkAudioRouteModule.swift +93 -0
- package/ios/ChalkAudioRouteModuleBridge.m +9 -0
- package/package.json +46 -76
- package/src/android/call-service.ts +19 -0
- package/src/avatar/FaceAvatar.tsx +145 -0
- package/src/avatar/tile-avatar-size.ts +4 -0
- package/src/client.ts +1 -5
- package/src/components/EmbeddedWhiteboard.tsx +14 -71
- package/src/components/native-media-visibility.ts +1 -2
- package/src/components/useAndroidCallService.ts +41 -0
- package/src/dev.ts +9 -0
- package/src/dock/Dock.tsx +95 -0
- package/src/dock/LeaveMenu.tsx +21 -0
- package/src/dock/MoreSheet.tsx +233 -0
- package/src/dock/ReactionBurst.tsx +55 -0
- package/src/dock/RoutePicker.tsx +42 -0
- package/src/dock/audio-route.ts +69 -0
- package/src/frame/CallFrame.tsx +209 -0
- package/src/frame/Chalk.tsx +83 -0
- package/src/frame/back-handler.ts +19 -0
- package/src/frame/dev-scenario.ts +48 -0
- package/src/frame/device-layout.tsx +31 -0
- package/src/frame/measurement.ts +44 -0
- package/src/frame/portal.tsx +107 -0
- package/src/frame/preferences.tsx +48 -0
- package/src/frame/regions.test.ts +38 -0
- package/src/frame/regions.ts +60 -0
- package/src/haptics/haptics.ts +19 -0
- package/src/header/CallDetailsSheet.tsx +139 -0
- package/src/header/Header.tsx +107 -0
- package/src/header/QrCode.tsx +34 -0
- package/src/icons/Icon.tsx +35 -0
- package/src/icons/icon-element.ts +11 -0
- package/src/icons/icon-paths.ts +199 -0
- package/src/index.ts +6 -9
- package/src/limbo/Limbo.tsx +159 -0
- package/src/limbo/Veil.tsx +36 -0
- package/src/media/native-capture-error.test.ts +19 -0
- package/src/media/native-capture-error.ts +13 -0
- package/src/motion/MovingFrame.tsx +101 -0
- package/src/motion/motion.ts +33 -0
- package/src/motion/presence.ts +20 -0
- package/src/motion/press.ts +35 -0
- package/src/primitives/BottomSheet.tsx +211 -0
- package/src/primitives/ChalkText.tsx +23 -0
- package/src/primitives/CopyButton.tsx +78 -0
- package/src/primitives/IconButton.tsx +90 -0
- package/src/primitives/Menu.tsx +212 -0
- package/src/primitives/NameTag.tsx +68 -0
- package/src/primitives/PillButton.tsx +56 -0
- package/src/primitives/SegmentedControl.tsx +55 -0
- package/src/primitives/SheetGroup.tsx +72 -0
- package/src/primitives/Switch.tsx +39 -0
- package/src/primitives/TileShell.tsx +53 -0
- package/src/primitives/announce.ts +7 -0
- package/src/primitives/menu-placement.test.ts +50 -0
- package/src/primitives/menu-placement.ts +43 -0
- package/src/primitives/toast/Toast.tsx +50 -0
- package/src/primitives/toast/ToastStack.tsx +89 -0
- package/src/primitives/toast/toast-store.ts +86 -0
- package/src/sheets/people-chat/ChatNotices.tsx +69 -0
- package/src/sheets/people-chat/ChatTab.tsx +186 -0
- package/src/sheets/people-chat/Composer.tsx +182 -0
- package/src/sheets/people-chat/PeopleChatSheet.tsx +100 -0
- package/src/sheets/people-chat/PeopleTab.tsx +326 -0
- package/src/sheets/people-chat/PhotoViewer.tsx +132 -0
- package/src/sheets/people-chat/TextField.tsx +14 -0
- package/src/sheets/people-chat/attachments.tsx +183 -0
- package/src/sheets/people-chat/chat-model.ts +157 -0
- package/src/sheets/people-chat/people-chat-model.test.ts +98 -0
- package/src/sheets/people-chat/people-model.ts +68 -0
- package/src/sounds/assets/error.wav +0 -0
- package/src/sounds/assets/hand.wav +0 -0
- package/src/sounds/assets/join.wav +0 -0
- package/src/sounds/assets/knock.wav +0 -0
- package/src/sounds/assets/leave.wav +0 -0
- package/src/sounds/assets/message.wav +0 -0
- package/src/sounds/assets/mute.wav +0 -0
- package/src/sounds/assets/recording.wav +0 -0
- package/src/sounds/assets/test.wav +0 -0
- package/src/sounds/assets/unmute.wav +0 -0
- package/src/sounds/assets.d.ts +5 -0
- package/src/sounds/sounds.ts +50 -0
- package/src/space-client/create-native-space-client.ts +20 -181
- package/src/space-client/random-uuid.ts +17 -0
- package/src/space-client/whiteboard-watchdog.test.ts +23 -0
- package/src/stage/ContentTile.tsx +100 -0
- package/src/stage/ParticipantTile.tsx +140 -0
- package/src/stage/Stage.tsx +152 -0
- package/src/stage/TileSheet.tsx +116 -0
- package/src/stage/camera.ts +20 -0
- package/src/stage/layout.test.ts +77 -0
- package/src/stage/layout.ts +226 -0
- package/src/stage/space-selector.ts +31 -0
- package/src/stage/stage-view.tsx +68 -0
- package/src/status/CallOverlays.tsx +47 -0
- package/src/status/ChalkArrival.tsx +53 -0
- package/src/status/StatusPage.tsx +123 -0
- package/src/status/call-screen.test.ts +42 -0
- package/src/status/call-screen.ts +29 -0
- package/src/theme/theme.tsx +28 -0
- package/src/theme/tokens.ts +247 -0
- package/src/toasts/CallEventToasts.tsx +192 -0
- package/src/toasts/notices.test.ts +92 -0
- package/src/toasts/notices.ts +62 -0
- package/src/ui/ChalkUI.tsx +49 -0
- package/src/ui.ts +24 -0
- package/dist/android.d.ts +0 -2
- package/dist/android.d.ts.map +0 -1
- package/dist/android.js +0 -62
- package/dist/chunk-2OS7SSXE.js +0 -552
- package/dist/chunk-5DQ4KBRH.js +0 -690
- package/dist/chunk-ITLUHTVS.js +0 -5271
- package/dist/chunk-JB4LNWVP.js +0 -247
- package/dist/components/Chalk.d.ts +0 -79
- package/dist/components/Chalk.d.ts.map +0 -1
- package/dist/components/ChatMessageList.d.ts +0 -11
- package/dist/components/ChatMessageList.d.ts.map +0 -1
- package/dist/components/Entrance.d.ts +0 -22
- package/dist/components/Entrance.d.ts.map +0 -1
- package/dist/components/EntranceView.android.d.ts +0 -4
- package/dist/components/EntranceView.android.d.ts.map +0 -1
- package/dist/components/EntranceView.d.ts +0 -18
- package/dist/components/EntranceView.d.ts.map +0 -1
- package/dist/components/EntranceView.ios-pad.d.ts +0 -3
- package/dist/components/EntranceView.ios-pad.d.ts.map +0 -1
- package/dist/components/EntranceView.ios-phone.d.ts +0 -3
- package/dist/components/EntranceView.ios-phone.d.ts.map +0 -1
- package/dist/components/EntranceView.macos.d.ts +0 -4
- package/dist/components/EntranceView.macos.d.ts.map +0 -1
- package/dist/components/FaceAvatar.d.ts +0 -16
- package/dist/components/FaceAvatar.d.ts.map +0 -1
- package/dist/components/GradientSurface.d.ts +0 -14
- package/dist/components/GradientSurface.d.ts.map +0 -1
- package/dist/components/MediaView.d.ts +0 -14
- package/dist/components/MediaView.d.ts.map +0 -1
- package/dist/components/ReactionPicker.d.ts +0 -10
- package/dist/components/ReactionPicker.d.ts.map +0 -1
- package/dist/components/SpaceView.android.d.ts +0 -2
- package/dist/components/SpaceView.android.d.ts.map +0 -1
- package/dist/components/SpaceView.d.ts +0 -33
- package/dist/components/SpaceView.d.ts.map +0 -1
- package/dist/components/SpaceView.ios-pad.d.ts +0 -2
- package/dist/components/SpaceView.ios-pad.d.ts.map +0 -1
- package/dist/components/SpaceView.ios-phone.d.ts +0 -2
- package/dist/components/SpaceView.ios-phone.d.ts.map +0 -1
- package/dist/components/SpaceView.macos.d.ts +0 -2
- package/dist/components/SpaceView.macos.d.ts.map +0 -1
- package/dist/components/SpaceView.shared.d.ts +0 -3
- package/dist/components/SpaceView.shared.d.ts.map +0 -1
- package/dist/components/episode-diagnostic-render-observer.d.ts +0 -2
- package/dist/components/episode-diagnostic-render-observer.d.ts.map +0 -1
- package/dist/components/logo/Logo.d.ts +0 -11
- package/dist/components/logo/Logo.d.ts.map +0 -1
- package/dist/components/native-animation-controller.d.ts +0 -7
- package/dist/components/native-animation-controller.d.ts.map +0 -1
- package/dist/components/native-chat.d.ts +0 -8
- package/dist/components/native-chat.d.ts.map +0 -1
- package/dist/components/native-entrance/entrance-controller-store.d.ts +0 -34
- package/dist/components/native-entrance/entrance-controller-store.d.ts.map +0 -1
- package/dist/components/native-entrance/useEntranceController.d.ts +0 -19
- package/dist/components/native-entrance/useEntranceController.d.ts.map +0 -1
- package/dist/components/native-joining-loading-animation.d.ts +0 -9
- package/dist/components/native-joining-loading-animation.d.ts.map +0 -1
- package/dist/components/native-space-view/AppearanceSettings.d.ts +0 -2
- package/dist/components/native-space-view/AppearanceSettings.d.ts.map +0 -1
- package/dist/components/native-space-view/FeedbackSheet.d.ts +0 -12
- package/dist/components/native-space-view/FeedbackSheet.d.ts.map +0 -1
- package/dist/components/native-space-view/ParticipantActionSheet.d.ts +0 -9
- package/dist/components/native-space-view/ParticipantActionSheet.d.ts.map +0 -1
- package/dist/components/native-space-view/SettingsSheet.d.ts +0 -7
- package/dist/components/native-space-view/SettingsSheet.d.ts.map +0 -1
- package/dist/components/native-space-view/SpaceActionMenu.d.ts +0 -10
- package/dist/components/native-space-view/SpaceActionMenu.d.ts.map +0 -1
- package/dist/components/native-space-view/SpaceBottomDock.android.d.ts +0 -4
- package/dist/components/native-space-view/SpaceBottomDock.android.d.ts.map +0 -1
- package/dist/components/native-space-view/SpaceChatAttachment.d.ts +0 -8
- package/dist/components/native-space-view/SpaceChatAttachment.d.ts.map +0 -1
- package/dist/components/native-space-view/SpaceChatSheet.d.ts +0 -5
- package/dist/components/native-space-view/SpaceChatSheet.d.ts.map +0 -1
- package/dist/components/native-space-view/SpaceGrid.android.d.ts +0 -8
- package/dist/components/native-space-view/SpaceGrid.android.d.ts.map +0 -1
- package/dist/components/native-space-view/SpaceMoreSheet.d.ts +0 -7
- package/dist/components/native-space-view/SpaceMoreSheet.d.ts.map +0 -1
- package/dist/components/native-space-view/SpacePanelSheet.d.ts +0 -5
- package/dist/components/native-space-view/SpacePanelSheet.d.ts.map +0 -1
- package/dist/components/native-space-view/SpacePeopleSheet.d.ts +0 -5
- package/dist/components/native-space-view/SpacePeopleSheet.d.ts.map +0 -1
- package/dist/components/native-space-view/SpaceStage.android.d.ts +0 -29
- package/dist/components/native-space-view/SpaceStage.android.d.ts.map +0 -1
- package/dist/components/native-space-view/SpaceSurfacePrimitives.d.ts +0 -30
- package/dist/components/native-space-view/SpaceSurfacePrimitives.d.ts.map +0 -1
- package/dist/components/native-space-view/SpaceTopBar.android.d.ts +0 -11
- package/dist/components/native-space-view/SpaceTopBar.android.d.ts.map +0 -1
- package/dist/components/native-space-view/SpaceWhiteboardSurface.d.ts +0 -15
- package/dist/components/native-space-view/SpaceWhiteboardSurface.d.ts.map +0 -1
- package/dist/components/native-space-view/diagnostics.d.ts +0 -48
- package/dist/components/native-space-view/diagnostics.d.ts.map +0 -1
- package/dist/components/native-space-view/format-space-duration.d.ts +0 -2
- package/dist/components/native-space-view/format-space-duration.d.ts.map +0 -1
- package/dist/components/native-space-view/native-space-grid-keys.d.ts +0 -3
- package/dist/components/native-space-view/native-space-grid-keys.d.ts.map +0 -1
- package/dist/components/native-space-view/native-space-page-store.d.ts +0 -8
- package/dist/components/native-space-view/native-space-page-store.d.ts.map +0 -1
- package/dist/components/native-space-view/space-chat-attachments.d.ts +0 -15
- package/dist/components/native-space-view/space-chat-attachments.d.ts.map +0 -1
- package/dist/components/native-space-view/space-panel-layout.d.ts +0 -10
- package/dist/components/native-space-view/space-panel-layout.d.ts.map +0 -1
- package/dist/components/native-space-view/space-progressive-surface-helpers.d.ts +0 -16
- package/dist/components/native-space-view/space-progressive-surface-helpers.d.ts.map +0 -1
- package/dist/components/native-space-view/space-progressive-surface-types.d.ts +0 -3
- package/dist/components/native-space-view/space-progressive-surface-types.d.ts.map +0 -1
- package/dist/components/native-space-view/types.d.ts +0 -24
- package/dist/components/native-space-view/types.d.ts.map +0 -1
- package/dist/components/native-space-view/useSpaceViewController.contract.d.ts +0 -41
- package/dist/components/native-space-view/useSpaceViewController.contract.d.ts.map +0 -1
- package/dist/components/native-space-view/useSpaceViewController.d.ts +0 -156
- package/dist/components/native-space-view/useSpaceViewController.d.ts.map +0 -1
- package/dist/components/native-space-view/useSpaceViewDerived.d.ts +0 -12
- package/dist/components/native-space-view/useSpaceViewDerived.d.ts.map +0 -1
- package/dist/components/native-space-view/useSpaceViewPanels.d.ts +0 -70
- package/dist/components/native-space-view/useSpaceViewPanels.d.ts.map +0 -1
- package/dist/feedback/native-capture.d.ts +0 -9
- package/dist/feedback/native-capture.d.ts.map +0 -1
- package/dist/feedback/native-evidence.d.ts +0 -3
- package/dist/feedback/native-evidence.d.ts.map +0 -1
- package/dist/hooks/entrance-preview-store.d.ts +0 -16
- package/dist/hooks/entrance-preview-store.d.ts.map +0 -1
- package/dist/hooks/useEntrancePreview.d.ts +0 -7
- package/dist/hooks/useEntrancePreview.d.ts.map +0 -1
- package/dist/hooks/useLayout.d.ts +0 -16
- package/dist/hooks/useLayout.d.ts.map +0 -1
- package/dist/hooks/usePanels.d.ts +0 -12
- package/dist/hooks/usePanels.d.ts.map +0 -1
- package/dist/ios-pad.d.ts +0 -2
- package/dist/ios-pad.d.ts.map +0 -1
- package/dist/ios-pad.js +0 -62
- package/dist/ios-phone.d.ts +0 -2
- package/dist/ios-phone.d.ts.map +0 -1
- package/dist/ios-phone.js +0 -62
- package/dist/ios.d.ts +0 -2
- package/dist/ios.d.ts.map +0 -1
- package/dist/ios.js +0 -62
- package/dist/macos.d.ts +0 -2
- package/dist/macos.d.ts.map +0 -1
- package/dist/macos.js +0 -62
- package/dist/space-client/cloudflare-rtk-native.d.ts +0 -3
- package/dist/space-client/cloudflare-rtk-native.d.ts.map +0 -1
- package/dist/telemetry.d.ts +0 -63
- package/dist/telemetry.d.ts.map +0 -1
- package/dist/ui/appearance.d.ts +0 -246
- package/dist/ui/appearance.d.ts.map +0 -1
- package/dist/ui/appearance.js +0 -14
- package/dist/ui/native-appearance-context.d.ts +0 -15
- package/dist/ui/native-appearance-context.d.ts.map +0 -1
- package/dist/ui/native-theme.d.ts +0 -17
- package/dist/ui/native-theme.d.ts.map +0 -1
- package/dist/ui/native-types.d.ts +0 -38
- package/dist/ui/native-types.d.ts.map +0 -1
- package/dist/ui/participant-avatar.d.ts +0 -21
- package/dist/ui/participant-avatar.d.ts.map +0 -1
- package/dist/ui/theme-tokens.d.ts +0 -25
- package/dist/ui/theme-tokens.d.ts.map +0 -1
- package/dist/ui/theme.d.ts +0 -404
- package/dist/ui/theme.d.ts.map +0 -1
- package/dist/ui/theme.js +0 -8
- package/dist/utils/native-space-layout.d.ts +0 -42
- package/dist/utils/native-space-layout.d.ts.map +0 -1
- package/src/android.ts +0 -1
- package/src/components/Chalk.tsx +0 -363
- package/src/components/ChatMessageList.tsx +0 -209
- package/src/components/Entrance.tsx +0 -42
- package/src/components/EntranceView.android.tsx +0 -274
- package/src/components/EntranceView.ios-pad.tsx +0 -326
- package/src/components/EntranceView.ios-phone.tsx +0 -271
- package/src/components/EntranceView.macos.tsx +0 -278
- package/src/components/EntranceView.tsx +0 -38
- package/src/components/FaceAvatar.tsx +0 -120
- package/src/components/GradientSurface.tsx +0 -23
- package/src/components/MediaView.tsx +0 -76
- package/src/components/ReactionPicker.tsx +0 -98
- package/src/components/SpaceView.android.tsx +0 -1
- package/src/components/SpaceView.ios-pad.tsx +0 -1
- package/src/components/SpaceView.ios-phone.tsx +0 -1
- package/src/components/SpaceView.macos.tsx +0 -1
- package/src/components/SpaceView.shared.tsx +0 -98
- package/src/components/SpaceView.tsx +0 -54
- package/src/components/episode-diagnostic-render-observer.ts +0 -12
- package/src/components/logo/Logo.tsx +0 -309
- package/src/components/native-animation-controller.ts +0 -36
- package/src/components/native-chat.ts +0 -23
- package/src/components/native-entrance/entrance-controller-store.ts +0 -112
- package/src/components/native-entrance/useEntranceController.ts +0 -60
- package/src/components/native-joining-loading-animation.ts +0 -26
- package/src/components/native-space-view/AppearanceSettings.tsx +0 -114
- package/src/components/native-space-view/FeedbackSheet.tsx +0 -296
- package/src/components/native-space-view/ParticipantActionSheet.tsx +0 -99
- package/src/components/native-space-view/SettingsSheet.tsx +0 -164
- package/src/components/native-space-view/SpaceActionMenu.tsx +0 -109
- package/src/components/native-space-view/SpaceBottomDock.android.tsx +0 -115
- package/src/components/native-space-view/SpaceChatAttachment.tsx +0 -105
- package/src/components/native-space-view/SpaceChatSheet.tsx +0 -184
- package/src/components/native-space-view/SpaceGrid.android.tsx +0 -323
- package/src/components/native-space-view/SpaceMoreSheet.tsx +0 -190
- package/src/components/native-space-view/SpacePanelSheet.tsx +0 -45
- package/src/components/native-space-view/SpacePeopleSheet.tsx +0 -116
- package/src/components/native-space-view/SpaceStage.android.tsx +0 -372
- package/src/components/native-space-view/SpaceSurfacePrimitives.tsx +0 -75
- package/src/components/native-space-view/SpaceTopBar.android.tsx +0 -113
- package/src/components/native-space-view/SpaceWhiteboardSurface.tsx +0 -69
- package/src/components/native-space-view/diagnostics.ts +0 -84
- package/src/components/native-space-view/format-space-duration.ts +0 -3
- package/src/components/native-space-view/native-space-grid-keys.ts +0 -6
- package/src/components/native-space-view/native-space-page-store.ts +0 -41
- package/src/components/native-space-view/space-chat-attachments.test.ts +0 -26
- package/src/components/native-space-view/space-chat-attachments.ts +0 -37
- package/src/components/native-space-view/space-panel-layout.ts +0 -10
- package/src/components/native-space-view/space-progressive-surface-helpers.ts +0 -33
- package/src/components/native-space-view/space-progressive-surface-types.ts +0 -3
- package/src/components/native-space-view/types.ts +0 -25
- package/src/components/native-space-view/useSpaceViewController.contract.ts +0 -34
- package/src/components/native-space-view/useSpaceViewController.ts +0 -416
- package/src/components/native-space-view/useSpaceViewDerived.ts +0 -29
- package/src/components/native-space-view/useSpaceViewPanels.ts +0 -170
- package/src/feedback/native-capture.ts +0 -62
- package/src/feedback/native-evidence.ts +0 -37
- package/src/hooks/entrance-preview-store.ts +0 -99
- package/src/hooks/useEntrancePreview.ts +0 -26
- package/src/hooks/useLayout.ts +0 -37
- package/src/hooks/usePanels.ts +0 -30
- package/src/ios-pad.ts +0 -1
- package/src/ios-phone.ts +0 -1
- package/src/ios.ts +0 -1
- package/src/macos.ts +0 -1
- package/src/space-client/cloudflare-rtk-native.ts +0 -104
- package/src/telemetry.ts +0 -234
- package/src/types/hugeicons-direct.d.ts +0 -4
- package/src/types/react-native-safe-area-context.d.ts +0 -8
- package/src/ui/appearance.ts +0 -808
- package/src/ui/native-appearance-context.tsx +0 -74
- package/src/ui/native-theme.tsx +0 -54
- package/src/ui/native-types.ts +0 -40
- package/src/ui/participant-avatar.ts +0 -47
- package/src/ui/theme-tokens.ts +0 -41
- package/src/ui/theme.ts +0 -214
- package/src/utils/native-space-layout.ts +0 -135
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import Message01Icon from "@hugeicons/core-free-icons/dist/esm/Message01Icon";
|
|
2
|
-
import Navigation03Icon from "@hugeicons/core-free-icons/dist/esm/Navigation03Icon";
|
|
3
|
-
import { HugeiconsIcon } from "@hugeicons/react-native";
|
|
4
|
-
import { useMemo } from "react";
|
|
5
|
-
import { FlatList, KeyboardAvoidingView, Platform, Pressable, StyleSheet, Text, TextInput, View } from "react-native";
|
|
6
|
-
|
|
7
|
-
import { Theme } from "../../ui/theme";
|
|
8
|
-
import { formatChatTimestamp } from "./space-progressive-surface-helpers";
|
|
9
|
-
import { SpaceChatAttachment } from "./SpaceChatAttachment";
|
|
10
|
-
import { InitialsAvatar } from "./SpaceSurfacePrimitives";
|
|
11
|
-
import type { SpaceController } from "./space-progressive-surface-types";
|
|
12
|
-
|
|
13
|
-
export function SpaceChatSheet({ controller }: { readonly controller: SpaceController }): React.JSX.Element {
|
|
14
|
-
const localParticipantId = controller.participants.localParticipant?.id ?? null;
|
|
15
|
-
const sendDisabled = (!controller.chatDraft.trim() && controller.chatAttachments.length === 0) || controller.chatAttachmentUploading;
|
|
16
|
-
const messages = useMemo(() => controller.chat.messages, [controller.chat.messages]);
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<View style={styles.content}>
|
|
20
|
-
{controller.chat.hasMore ? (
|
|
21
|
-
<Pressable accessibilityRole="button" disabled={controller.chat.isLoadingOlder} onPress={() => void controller.chat.loadOlderMessages()} style={({ pressed }) => [styles.loadOlder, pressed && styles.pressed]}>
|
|
22
|
-
<Text style={styles.loadOlderText}>{controller.chat.isLoadingOlder ? "Loading…" : "Load earlier messages"}</Text>
|
|
23
|
-
</Pressable>
|
|
24
|
-
) : null}
|
|
25
|
-
<FlatList
|
|
26
|
-
accessibilityLabel="Chat messages"
|
|
27
|
-
contentContainerStyle={styles.messageList}
|
|
28
|
-
data={messages}
|
|
29
|
-
keyExtractor={(message) => message.id}
|
|
30
|
-
ListEmptyComponent={<EmptyChat />}
|
|
31
|
-
onViewableItemsChanged={({ viewableItems }) => {
|
|
32
|
-
const sequence = viewableItems.at(-1)?.item.sequence;
|
|
33
|
-
if (sequence) controller.markChatMessageVisible(sequence);
|
|
34
|
-
}}
|
|
35
|
-
renderItem={({ item }) => <ChatMessage isLocal={item.senderId === localParticipantId} message={item} onOpenAttachment={controller.openChatAttachment} resolveAttachmentUrl={controller.resolveChatAttachmentUrl} />}
|
|
36
|
-
showsVerticalScrollIndicator={false}
|
|
37
|
-
/>
|
|
38
|
-
{controller.chat.pendingMessages.map((message) => (
|
|
39
|
-
<View key={message.clientMessageId} style={styles.pendingMessage}>
|
|
40
|
-
<Text style={styles.pendingText}>{message.text}</Text>
|
|
41
|
-
<Text style={styles.pendingMeta}>{message.state === "sending" ? "Sending…" : (message.error?.message ?? "Send failed")}</Text>
|
|
42
|
-
{message.state === "failed" ? (
|
|
43
|
-
<Pressable accessibilityRole="button" onPress={() => void controller.chat.retryMessage(message.clientMessageId)}>
|
|
44
|
-
<Text style={styles.retry}>Retry</Text>
|
|
45
|
-
</Pressable>
|
|
46
|
-
) : null}
|
|
47
|
-
</View>
|
|
48
|
-
))}
|
|
49
|
-
{controller.chatAttachments.length ? (
|
|
50
|
-
<View accessibilityLabel="Selected attachments" style={styles.selectedAttachments}>
|
|
51
|
-
{controller.chatAttachments.map((attachment, index) => (
|
|
52
|
-
<View key={`${attachment.fileName}-${index}`} style={styles.selectedAttachment}>
|
|
53
|
-
<Text numberOfLines={1} style={styles.selectedAttachmentText}>
|
|
54
|
-
{attachment.fileName}
|
|
55
|
-
</Text>
|
|
56
|
-
<Pressable accessibilityLabel={`Remove ${attachment.fileName}`} accessibilityRole="button" disabled={controller.chatAttachmentUploading} onPress={() => controller.removeChatAttachment(index)}>
|
|
57
|
-
<Text style={styles.removeAttachment}>Remove</Text>
|
|
58
|
-
</Pressable>
|
|
59
|
-
</View>
|
|
60
|
-
))}
|
|
61
|
-
</View>
|
|
62
|
-
) : null}
|
|
63
|
-
{controller.chatAttachmentError ? (
|
|
64
|
-
<Text accessibilityLiveRegion="polite" style={styles.attachmentError}>
|
|
65
|
-
{controller.chatAttachmentError}
|
|
66
|
-
</Text>
|
|
67
|
-
) : null}
|
|
68
|
-
<KeyboardAvoidingView behavior={Platform.OS === "ios" ? "padding" : undefined} keyboardVerticalOffset={Platform.OS === "ios" ? 12 : 0}>
|
|
69
|
-
<View style={styles.composer}>
|
|
70
|
-
{controller.canPickChatFiles ? (
|
|
71
|
-
<Pressable
|
|
72
|
-
accessibilityLabel="Attach file"
|
|
73
|
-
accessibilityRole="button"
|
|
74
|
-
disabled={controller.chatAttachmentPicking || controller.chatAttachmentUploading}
|
|
75
|
-
onPress={() => void controller.pickChatFiles()}
|
|
76
|
-
style={({ pressed }) => [styles.composerButton, (controller.chatAttachmentPicking || controller.chatAttachmentUploading) && styles.sendDisabled, pressed && styles.pressed]}
|
|
77
|
-
>
|
|
78
|
-
<Text style={styles.composerButtonText}>{controller.chatAttachmentPicking ? "Choosing…" : "Attach"}</Text>
|
|
79
|
-
</Pressable>
|
|
80
|
-
) : null}
|
|
81
|
-
<TextInput
|
|
82
|
-
accessibilityLabel="Message the Space"
|
|
83
|
-
editable={!controller.chatAttachmentUploading}
|
|
84
|
-
multiline
|
|
85
|
-
onChangeText={controller.setChatDraft}
|
|
86
|
-
onSubmitEditing={controller.sendChatMessage}
|
|
87
|
-
placeholder="Message the Space"
|
|
88
|
-
placeholderTextColor={Theme.colors.placeholder}
|
|
89
|
-
style={styles.input}
|
|
90
|
-
value={controller.chatDraft}
|
|
91
|
-
/>
|
|
92
|
-
<Pressable accessibilityLabel="Send message" accessibilityRole="button" disabled={sendDisabled} onPress={controller.sendChatMessage} style={({ pressed }) => [styles.sendButton, sendDisabled && styles.sendDisabled, pressed && styles.pressed]}>
|
|
93
|
-
{controller.chatAttachmentUploading ? <Text style={styles.uploadingText}>…</Text> : <HugeiconsIcon color={Theme.colors.primaryForeground} icon={Navigation03Icon} size={21} />}
|
|
94
|
-
</Pressable>
|
|
95
|
-
</View>
|
|
96
|
-
</KeyboardAvoidingView>
|
|
97
|
-
</View>
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function ChatMessage({
|
|
102
|
-
isLocal,
|
|
103
|
-
message,
|
|
104
|
-
onOpenAttachment,
|
|
105
|
-
resolveAttachmentUrl,
|
|
106
|
-
}: {
|
|
107
|
-
readonly isLocal: boolean;
|
|
108
|
-
readonly message: SpaceController["chat"]["messages"][number];
|
|
109
|
-
readonly onOpenAttachment: (attachmentId: string) => void;
|
|
110
|
-
readonly resolveAttachmentUrl: (attachmentId: string) => Promise<string | null>;
|
|
111
|
-
}): React.JSX.Element {
|
|
112
|
-
const timestamp = formatChatTimestamp(message.timestamp);
|
|
113
|
-
return (
|
|
114
|
-
<View style={[styles.messageRow, isLocal && styles.messageRowLocal]}>
|
|
115
|
-
{!isLocal ? <InitialsAvatar name={message.senderName} size={42} /> : null}
|
|
116
|
-
<View style={[styles.messageCopy, isLocal && styles.messageCopyLocal]}>
|
|
117
|
-
<Text style={[styles.sender, isLocal && styles.senderLocal]}>{isLocal ? `${message.senderName} (You)` : message.senderName}</Text>
|
|
118
|
-
<View style={[styles.bubble, isLocal ? styles.localBubble : styles.remoteBubble]}>
|
|
119
|
-
{message.text ? <Text style={[styles.messageText, isLocal && styles.localMessageText]}>{message.text}</Text> : null}
|
|
120
|
-
{message.attachments.map((attachment) => (
|
|
121
|
-
<SpaceChatAttachment attachment={attachment} isLocal={isLocal} key={attachment.attachmentId} onOpen={onOpenAttachment} resolveUrl={resolveAttachmentUrl} />
|
|
122
|
-
))}
|
|
123
|
-
</View>
|
|
124
|
-
<Text style={[styles.timestamp, isLocal && styles.timestampLocal]}>{timestamp}</Text>
|
|
125
|
-
{message.readBy.length ? <Text style={[styles.readBy, isLocal && styles.timestampLocal]}>Read by {message.readBy.map((reader) => reader.displayName).join(", ")}</Text> : null}
|
|
126
|
-
</View>
|
|
127
|
-
{isLocal ? <InitialsAvatar name={message.senderName} size={42} /> : null}
|
|
128
|
-
</View>
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function EmptyChat(): React.JSX.Element {
|
|
133
|
-
return (
|
|
134
|
-
<View style={styles.emptyState}>
|
|
135
|
-
<View style={styles.emptyIcon}>
|
|
136
|
-
<HugeiconsIcon color={Theme.colors.ink2} icon={Message01Icon} size={26} />
|
|
137
|
-
</View>
|
|
138
|
-
<Text style={styles.emptyTitle}>No messages yet</Text>
|
|
139
|
-
<Text style={styles.emptyText}>Send a message to start the conversation.</Text>
|
|
140
|
-
</View>
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
const styles = StyleSheet.create({
|
|
145
|
-
content: { flex: 1, minHeight: 0 },
|
|
146
|
-
loadOlder: { alignSelf: "center", minHeight: 44, paddingHorizontal: Theme.spacing.md, paddingVertical: Theme.spacing.sm, justifyContent: "center" },
|
|
147
|
-
loadOlderText: { color: Theme.colors.information, fontSize: 14, fontWeight: "700" },
|
|
148
|
-
messageList: { flexGrow: 1, gap: Theme.spacing.lg, paddingHorizontal: Theme.spacing.lg, paddingVertical: Theme.spacing.lg },
|
|
149
|
-
messageRow: { alignItems: "flex-start", flexDirection: "row", gap: Theme.spacing.sm, maxWidth: "92%" },
|
|
150
|
-
messageRowLocal: { alignSelf: "flex-end", justifyContent: "flex-end" },
|
|
151
|
-
messageCopy: { flexShrink: 1, minWidth: 0 },
|
|
152
|
-
messageCopyLocal: { alignItems: "flex-end" },
|
|
153
|
-
sender: { color: Theme.colors.ink, fontSize: 15, fontWeight: "600", marginBottom: 6, paddingHorizontal: 4 },
|
|
154
|
-
senderLocal: { textAlign: "right" },
|
|
155
|
-
bubble: { borderRadius: Theme.radius.md, borderWidth: 1, maxWidth: "100%", paddingHorizontal: Theme.spacing.md, paddingVertical: Theme.spacing.md },
|
|
156
|
-
remoteBubble: { backgroundColor: Theme.colors.surfaceMuted, borderColor: Theme.colors.line, borderTopLeftRadius: 5 },
|
|
157
|
-
localBubble: { backgroundColor: Theme.colors.ink, borderColor: Theme.colors.ink, borderTopRightRadius: 5 },
|
|
158
|
-
messageText: { color: Theme.colors.ink, fontSize: 17, lineHeight: 24 },
|
|
159
|
-
localMessageText: { color: Theme.colors.surface },
|
|
160
|
-
timestamp: { color: Theme.colors.ink3, fontSize: 12, marginTop: 5, paddingHorizontal: 4 },
|
|
161
|
-
timestampLocal: { textAlign: "right" },
|
|
162
|
-
readBy: { color: Theme.colors.ink3, fontSize: 11, marginTop: 3, paddingHorizontal: 4 },
|
|
163
|
-
pendingMessage: { borderColor: Theme.colors.line, borderRadius: Theme.radius.md, borderWidth: 1, marginHorizontal: Theme.spacing.lg, marginBottom: Theme.spacing.sm, padding: Theme.spacing.md },
|
|
164
|
-
pendingText: { color: Theme.colors.ink, fontSize: 14 },
|
|
165
|
-
pendingMeta: { color: Theme.colors.ink2, fontSize: 12, marginTop: 4 },
|
|
166
|
-
retry: { color: Theme.colors.information, fontSize: 13, fontWeight: "700", marginTop: 6 },
|
|
167
|
-
selectedAttachments: { flexDirection: "row", flexWrap: "wrap", gap: Theme.spacing.sm, paddingHorizontal: Theme.spacing.lg, paddingBottom: Theme.spacing.sm },
|
|
168
|
-
selectedAttachment: { backgroundColor: Theme.colors.paper2, borderColor: Theme.colors.line, borderRadius: Theme.radius.sm, borderWidth: 1, maxWidth: "100%", minHeight: 36, paddingHorizontal: Theme.spacing.sm, paddingVertical: 8 },
|
|
169
|
-
selectedAttachmentText: { color: Theme.colors.ink2, fontSize: 13 },
|
|
170
|
-
removeAttachment: { color: Theme.colors.information, fontSize: 12, fontWeight: "700", marginTop: 4 },
|
|
171
|
-
attachmentError: { color: Theme.colors.danger, fontSize: 13, paddingHorizontal: Theme.spacing.lg, paddingBottom: Theme.spacing.sm },
|
|
172
|
-
composer: { alignItems: "flex-end", borderTopColor: Theme.colors.line, borderTopWidth: 1, flexDirection: "row", gap: Theme.spacing.sm, padding: Theme.spacing.md },
|
|
173
|
-
composerButton: { alignItems: "center", borderColor: Theme.colors.line, borderRadius: Theme.radius.md, borderWidth: 1, height: 50, justifyContent: "center", width: 50 },
|
|
174
|
-
composerButtonText: { color: Theme.colors.ink2, fontSize: 12, fontWeight: "700" },
|
|
175
|
-
uploadingText: { color: Theme.colors.primaryForeground, fontSize: 18, fontWeight: "700" },
|
|
176
|
-
input: { backgroundColor: Theme.colors.surfaceMuted, borderColor: Theme.colors.lineStrong, borderRadius: Theme.radius.md, borderWidth: 1, color: Theme.colors.ink, flex: 1, fontSize: 16, maxHeight: 112, minHeight: 50, paddingHorizontal: Theme.spacing.md, paddingVertical: 12 },
|
|
177
|
-
sendButton: { alignItems: "center", backgroundColor: Theme.colors.ink, borderRadius: Theme.radius.full, height: 50, justifyContent: "center", width: 50 },
|
|
178
|
-
sendDisabled: { backgroundColor: Theme.colors.lineStrong },
|
|
179
|
-
emptyState: { alignItems: "center", flex: 1, justifyContent: "center", minHeight: 220, paddingHorizontal: Theme.spacing["3xl"] },
|
|
180
|
-
emptyIcon: { alignItems: "center", backgroundColor: Theme.colors.washBlue, borderRadius: Theme.radius.full, height: 58, justifyContent: "center", marginBottom: Theme.spacing.md, width: 58 },
|
|
181
|
-
emptyTitle: { color: Theme.colors.ink, fontSize: 16, fontWeight: "700" },
|
|
182
|
-
emptyText: { color: Theme.colors.ink2, fontSize: 14, marginTop: 6, textAlign: "center" },
|
|
183
|
-
pressed: { opacity: 0.72, transform: [{ scale: 0.98 }] },
|
|
184
|
-
});
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
import { useCallback, useMemo, useRef, useSyncExternalStore } from "react";
|
|
2
|
-
import { FlatList, StyleSheet, Text, View, useWindowDimensions, type DimensionValue } from "react-native";
|
|
3
|
-
import MicOff01Icon from "@hugeicons/core-free-icons/dist/esm/MicOff01Icon";
|
|
4
|
-
import { HugeiconsIcon } from "@hugeicons/react-native";
|
|
5
|
-
import { Theme } from "../../ui/theme";
|
|
6
|
-
import { useNativeTheme } from "../../ui/native-theme";
|
|
7
|
-
import { MediaView } from "../MediaView";
|
|
8
|
-
import type { SpaceParticipant } from "./types";
|
|
9
|
-
import { createSpacePageStore, type SpacePageStore } from "./native-space-page-store";
|
|
10
|
-
import { nativeSpaceGridKey } from "./native-space-grid-keys";
|
|
11
|
-
|
|
12
|
-
export interface SpaceGridProps {
|
|
13
|
-
participants: readonly SpaceParticipant[];
|
|
14
|
-
gridPages: readonly (readonly SpaceParticipant[])[];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function buildWideParticipantRows(participants: readonly SpaceParticipant[], columnCount: number): SpaceParticipant[][] {
|
|
18
|
-
if (participants.length === 0) {
|
|
19
|
-
return [];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const rows: SpaceParticipant[][] = [];
|
|
23
|
-
for (let index = 0; index < participants.length; index += columnCount) {
|
|
24
|
-
rows.push(participants.slice(index, index + columnCount));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return rows;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function SpaceGridAndroid({ participants, gridPages }: SpaceGridProps): React.JSX.Element {
|
|
31
|
-
const theme = useNativeTheme();
|
|
32
|
-
const { width, height } = useWindowDimensions();
|
|
33
|
-
const isTablet = width >= 768;
|
|
34
|
-
const pageStoreRef = useRef<SpacePageStore | null>(null);
|
|
35
|
-
const pageStore = pageStoreRef.current ?? (pageStoreRef.current = createSpacePageStore());
|
|
36
|
-
|
|
37
|
-
const finalPages = useMemo(() => {
|
|
38
|
-
if (!isTablet) {
|
|
39
|
-
return gridPages;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const perPage = 6;
|
|
43
|
-
const pages: SpaceParticipant[][] = [];
|
|
44
|
-
for (let index = 0; index < participants.length; index += perPage) {
|
|
45
|
-
pages.push(participants.slice(index, index + perPage));
|
|
46
|
-
}
|
|
47
|
-
return pages;
|
|
48
|
-
}, [gridPages, isTablet, participants]);
|
|
49
|
-
|
|
50
|
-
const requestedPage = useSyncExternalStore(pageStore.subscribe, pageStore.getSnapshot, pageStore.getSnapshot);
|
|
51
|
-
const activePage = Math.min(requestedPage, Math.max(0, finalPages.length - 1));
|
|
52
|
-
const activePageKey = nativeSpaceGridKey("indicator", finalPages[activePage] ?? []);
|
|
53
|
-
const clampPageRef = useCallback(
|
|
54
|
-
(node: View | null) => {
|
|
55
|
-
if (node !== null) {
|
|
56
|
-
pageStore.clampToPageCount(finalPages.length);
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
[finalPages.length, pageStore],
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
if (participants.length === 0) {
|
|
63
|
-
return (
|
|
64
|
-
<View ref={clampPageRef} style={[styles.emptyState, { backgroundColor: theme.colors.darkCanvas }]}>
|
|
65
|
-
<Text style={[styles.emptyEyebrow, { color: theme.colors.primary }]}>Space ready</Text>
|
|
66
|
-
<Text style={[styles.emptyTitle, { color: theme.colors.foreground }]}>You're the first one here</Text>
|
|
67
|
-
<Text style={[styles.emptyCopy, { color: theme.colors.mutedForeground }]}>Others will appear when they join. Invite someone to get started.</Text>
|
|
68
|
-
</View>
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (participants.length === 1) {
|
|
73
|
-
return (
|
|
74
|
-
<View ref={clampPageRef} style={styles.singleTile}>
|
|
75
|
-
<ParticipantTile participant={participants[0]!} />
|
|
76
|
-
</View>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (!isTablet && participants.length <= 4) {
|
|
81
|
-
if (participants.length === 2) {
|
|
82
|
-
return (
|
|
83
|
-
<View ref={clampPageRef} style={styles.compactTwoUp}>
|
|
84
|
-
{participants.map((participant) => (
|
|
85
|
-
<ParticipantTile key={participant.id} participant={participant} />
|
|
86
|
-
))}
|
|
87
|
-
</View>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if (participants.length === 3) {
|
|
92
|
-
return (
|
|
93
|
-
<View ref={clampPageRef} style={styles.compactThree}>
|
|
94
|
-
<View style={styles.compactThreeTop}>
|
|
95
|
-
<ParticipantTile participant={participants[0]!} />
|
|
96
|
-
</View>
|
|
97
|
-
<View style={styles.compactThreeBottom}>
|
|
98
|
-
<ParticipantTile participant={participants[1]!} />
|
|
99
|
-
<ParticipantTile participant={participants[2]!} />
|
|
100
|
-
</View>
|
|
101
|
-
</View>
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (participants.length === 4) {
|
|
106
|
-
return (
|
|
107
|
-
<View ref={clampPageRef} style={styles.compactFour}>
|
|
108
|
-
<View style={styles.gridRow}>
|
|
109
|
-
<ParticipantTile participant={participants[0]!} />
|
|
110
|
-
<ParticipantTile participant={participants[1]!} />
|
|
111
|
-
</View>
|
|
112
|
-
<View style={styles.gridRow}>
|
|
113
|
-
<ParticipantTile participant={participants[2]!} />
|
|
114
|
-
<ParticipantTile participant={participants[3]!} />
|
|
115
|
-
</View>
|
|
116
|
-
</View>
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
return (
|
|
122
|
-
<View ref={clampPageRef} style={styles.pagedContainer}>
|
|
123
|
-
<FlatList
|
|
124
|
-
data={finalPages}
|
|
125
|
-
horizontal
|
|
126
|
-
keyExtractor={(page) => nativeSpaceGridKey("page", page)}
|
|
127
|
-
onMomentumScrollEnd={(event) => {
|
|
128
|
-
const measuredPageWidth = Math.max(1, event.nativeEvent.layoutMeasurement.width);
|
|
129
|
-
pageStore.setPage(Math.round(event.nativeEvent.contentOffset.x / measuredPageWidth));
|
|
130
|
-
}}
|
|
131
|
-
pagingEnabled
|
|
132
|
-
snapToInterval={width}
|
|
133
|
-
snapToAlignment="center"
|
|
134
|
-
decelerationRate="fast"
|
|
135
|
-
disableIntervalMomentum
|
|
136
|
-
scrollEventThrottle={16}
|
|
137
|
-
removeClippedSubviews={false}
|
|
138
|
-
showsHorizontalScrollIndicator={false}
|
|
139
|
-
windowSize={3}
|
|
140
|
-
renderItem={({ item: page }) => {
|
|
141
|
-
const columns = isTablet ? (width > height ? 3 : 2) : 2;
|
|
142
|
-
const rows = buildWideParticipantRows(page, columns);
|
|
143
|
-
|
|
144
|
-
return (
|
|
145
|
-
<View style={[styles.page, { width }]}>
|
|
146
|
-
<View style={styles.gridContainer}>
|
|
147
|
-
{rows.map((row) => (
|
|
148
|
-
<View key={nativeSpaceGridKey("row", row)} style={styles.gridRow}>
|
|
149
|
-
{row.map((participant) => (
|
|
150
|
-
<ParticipantTile key={participant.id} participant={participant} />
|
|
151
|
-
))}
|
|
152
|
-
{row.length < columns && Array.from({ length: columns - row.length }, (_, fillerSlot) => fillerSlot + row.length).map((slot) => <View key={nativeSpaceGridKey(`filler-${slot}`, row)} style={[styles.gridTile, { backgroundColor: theme.colors.transparent }]} />)}
|
|
153
|
-
</View>
|
|
154
|
-
))}
|
|
155
|
-
{isTablet && rows.length < (width > height ? 2 : 3) ? <View style={{ flex: (width > height ? 2 : 3) - rows.length }} /> : null}
|
|
156
|
-
</View>
|
|
157
|
-
</View>
|
|
158
|
-
);
|
|
159
|
-
}}
|
|
160
|
-
/>
|
|
161
|
-
|
|
162
|
-
{finalPages.length > 1 ? (
|
|
163
|
-
<View style={styles.pageIndicators}>
|
|
164
|
-
{finalPages.map((page) => (
|
|
165
|
-
<View key={nativeSpaceGridKey("indicator", page)} style={[styles.pageIndicator, { backgroundColor: theme.colors.mutedForeground }, nativeSpaceGridKey("indicator", page) === activePageKey && { backgroundColor: theme.colors.primary }]} />
|
|
166
|
-
))}
|
|
167
|
-
</View>
|
|
168
|
-
) : null}
|
|
169
|
-
</View>
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
function ParticipantTile({ participant, width, height }: { participant: SpaceParticipant; width?: DimensionValue; height?: DimensionValue }) {
|
|
174
|
-
const theme = useNativeTheme();
|
|
175
|
-
return (
|
|
176
|
-
<View style={[styles.tile, { backgroundColor: theme.colors.tileBackground, borderColor: theme.colors.border }, width !== undefined && { width }, height !== undefined && { height }]}>
|
|
177
|
-
<MediaView participant={participant} track={participant.videoTrack ?? null} />
|
|
178
|
-
<View style={[styles.identityPuck, { backgroundColor: theme.colors.surface, borderColor: theme.colors.border, shadowColor: theme.colors.darkCanvas }]}>
|
|
179
|
-
<Text style={[styles.participantName, { color: theme.colors.foreground }]} numberOfLines={1}>
|
|
180
|
-
{participant.displayName || "Participant"}
|
|
181
|
-
</Text>
|
|
182
|
-
{!participant.audioEnabled && (
|
|
183
|
-
<View style={styles.muteDot}>
|
|
184
|
-
<HugeiconsIcon icon={MicOff01Icon} size={10} color={theme.colors.primaryForeground} />
|
|
185
|
-
</View>
|
|
186
|
-
)}
|
|
187
|
-
</View>
|
|
188
|
-
</View>
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export { SpaceGridAndroid as SpaceGrid };
|
|
193
|
-
|
|
194
|
-
const styles = StyleSheet.create({
|
|
195
|
-
emptyState: {
|
|
196
|
-
flex: 1,
|
|
197
|
-
alignItems: "center",
|
|
198
|
-
justifyContent: "center",
|
|
199
|
-
paddingHorizontal: Theme.spacing["3xl"],
|
|
200
|
-
gap: Theme.spacing.sm,
|
|
201
|
-
},
|
|
202
|
-
emptyEyebrow: {
|
|
203
|
-
...Theme.typography.eyebrow,
|
|
204
|
-
color: Theme.colors.primary,
|
|
205
|
-
},
|
|
206
|
-
emptyTitle: {
|
|
207
|
-
...Theme.typography.heading,
|
|
208
|
-
color: Theme.colors.foreground,
|
|
209
|
-
},
|
|
210
|
-
emptyCopy: {
|
|
211
|
-
...Theme.typography.body,
|
|
212
|
-
color: Theme.colors.mutedForeground,
|
|
213
|
-
textAlign: "center",
|
|
214
|
-
},
|
|
215
|
-
singleTile: {
|
|
216
|
-
flex: 1,
|
|
217
|
-
padding: 10,
|
|
218
|
-
},
|
|
219
|
-
compactTwoUp: {
|
|
220
|
-
flex: 1,
|
|
221
|
-
gap: 10,
|
|
222
|
-
padding: 10,
|
|
223
|
-
},
|
|
224
|
-
compactThree: {
|
|
225
|
-
flex: 1,
|
|
226
|
-
gap: 10,
|
|
227
|
-
padding: 10,
|
|
228
|
-
},
|
|
229
|
-
compactThreeTop: {
|
|
230
|
-
flex: 3,
|
|
231
|
-
minHeight: 0,
|
|
232
|
-
overflow: "hidden",
|
|
233
|
-
},
|
|
234
|
-
compactThreeBottom: {
|
|
235
|
-
flex: 2,
|
|
236
|
-
flexDirection: "row",
|
|
237
|
-
gap: 10,
|
|
238
|
-
minHeight: 0,
|
|
239
|
-
},
|
|
240
|
-
compactFour: {
|
|
241
|
-
flex: 1,
|
|
242
|
-
gap: 10,
|
|
243
|
-
padding: 10,
|
|
244
|
-
},
|
|
245
|
-
pagedContainer: {
|
|
246
|
-
flex: 1,
|
|
247
|
-
width: "100%",
|
|
248
|
-
paddingBottom: 20,
|
|
249
|
-
},
|
|
250
|
-
page: {
|
|
251
|
-
flex: 1,
|
|
252
|
-
},
|
|
253
|
-
gridContainer: {
|
|
254
|
-
flex: 1,
|
|
255
|
-
gap: 10,
|
|
256
|
-
paddingHorizontal: 12,
|
|
257
|
-
paddingVertical: 10,
|
|
258
|
-
},
|
|
259
|
-
gridRow: {
|
|
260
|
-
flex: 1,
|
|
261
|
-
flexDirection: "row",
|
|
262
|
-
gap: 10,
|
|
263
|
-
},
|
|
264
|
-
gridTile: {
|
|
265
|
-
flex: 1,
|
|
266
|
-
},
|
|
267
|
-
pageIndicators: {
|
|
268
|
-
flexDirection: "row",
|
|
269
|
-
alignSelf: "center",
|
|
270
|
-
gap: 6,
|
|
271
|
-
paddingTop: 4,
|
|
272
|
-
},
|
|
273
|
-
pageIndicator: {
|
|
274
|
-
width: 6,
|
|
275
|
-
height: 6,
|
|
276
|
-
borderRadius: 3,
|
|
277
|
-
backgroundColor: Theme.colors.whiteOverlay20,
|
|
278
|
-
},
|
|
279
|
-
pageIndicatorActive: {
|
|
280
|
-
width: 18,
|
|
281
|
-
backgroundColor: Theme.colors.primary,
|
|
282
|
-
},
|
|
283
|
-
tile: {
|
|
284
|
-
borderRadius: 32,
|
|
285
|
-
overflow: "hidden",
|
|
286
|
-
backgroundColor: Theme.colors.nearDarkSurface,
|
|
287
|
-
borderWidth: 1,
|
|
288
|
-
borderColor: Theme.colors.whiteOverlay08,
|
|
289
|
-
flex: 1,
|
|
290
|
-
},
|
|
291
|
-
identityPuck: {
|
|
292
|
-
position: "absolute",
|
|
293
|
-
left: 16,
|
|
294
|
-
bottom: 16,
|
|
295
|
-
flexDirection: "row",
|
|
296
|
-
alignItems: "center",
|
|
297
|
-
backgroundColor: Theme.colors.chromeOverlay82,
|
|
298
|
-
paddingHorizontal: 14,
|
|
299
|
-
paddingVertical: 8,
|
|
300
|
-
borderRadius: 20,
|
|
301
|
-
gap: 8,
|
|
302
|
-
borderWidth: 1,
|
|
303
|
-
borderColor: Theme.colors.whiteOverlay12,
|
|
304
|
-
shadowColor: Theme.colors.darkCanvas,
|
|
305
|
-
shadowOffset: { width: 0, height: 4 },
|
|
306
|
-
shadowOpacity: 0.3,
|
|
307
|
-
shadowRadius: 8,
|
|
308
|
-
},
|
|
309
|
-
participantName: {
|
|
310
|
-
color: Theme.colors.onDark,
|
|
311
|
-
fontSize: 13,
|
|
312
|
-
fontWeight: "800",
|
|
313
|
-
maxWidth: 140,
|
|
314
|
-
},
|
|
315
|
-
muteDot: {
|
|
316
|
-
width: 20,
|
|
317
|
-
height: 20,
|
|
318
|
-
borderRadius: 10,
|
|
319
|
-
backgroundColor: Theme.colors.error,
|
|
320
|
-
alignItems: "center",
|
|
321
|
-
justifyContent: "center",
|
|
322
|
-
},
|
|
323
|
-
});
|