@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,114 +0,0 @@
|
|
|
1
|
-
import CheckmarkCircle01Icon from "@hugeicons/core-free-icons/dist/esm/CheckmarkCircle01Icon";
|
|
2
|
-
import { HugeiconsIcon } from "@hugeicons/react-native";
|
|
3
|
-
import { Pressable, StyleSheet, Text, View } from "react-native";
|
|
4
|
-
|
|
5
|
-
import { THEME_PALETTES, THEME_TEXTURES, type ThemeMode } from "../../ui/appearance";
|
|
6
|
-
import { useNativeAppearance } from "../../ui/native-appearance-context";
|
|
7
|
-
import { useNativeTheme } from "../../ui/native-theme";
|
|
8
|
-
import { Theme } from "../../ui/theme";
|
|
9
|
-
|
|
10
|
-
export function AppearanceSettings(): React.JSX.Element {
|
|
11
|
-
const { appearance, setPalette, setTexture } = useNativeAppearance();
|
|
12
|
-
const theme = useNativeTheme();
|
|
13
|
-
return (
|
|
14
|
-
<View style={styles.section}>
|
|
15
|
-
<Text style={[styles.intro, { color: theme.colors.ink2 }]}>Choose a complete color family, then layer in a material texture. Every combination is available on mobile.</Text>
|
|
16
|
-
{(["light", "dark"] as const).map((mode) => (
|
|
17
|
-
<PaletteGroup key={mode} mode={mode} selectedPalette={appearance.palette} theme={theme} onSelect={setPalette} />
|
|
18
|
-
))}
|
|
19
|
-
<View style={styles.textureSection}>
|
|
20
|
-
<Text style={styles.groupLabel}>Texture</Text>
|
|
21
|
-
<View style={styles.textureGrid}>
|
|
22
|
-
{THEME_TEXTURES.map((texture) => {
|
|
23
|
-
const selected = texture.value === appearance.texture;
|
|
24
|
-
return (
|
|
25
|
-
<Pressable
|
|
26
|
-
accessibilityLabel={`Use ${texture.label} texture`}
|
|
27
|
-
accessibilityRole="button"
|
|
28
|
-
accessibilityState={{ selected }}
|
|
29
|
-
key={texture.value}
|
|
30
|
-
onPress={() => setTexture(texture.value)}
|
|
31
|
-
style={({ pressed }) => [styles.texture, { backgroundColor: theme.colors.surfaceMuted, borderColor: theme.colors.line }, selected && [styles.selected, { borderColor: theme.colors.primary }], pressed && styles.pressed]}
|
|
32
|
-
>
|
|
33
|
-
<TexturePreview kind={texture.value} background={appearance.tokens.stage} foreground={appearance.tokens.textMuted} />
|
|
34
|
-
<Text numberOfLines={1} style={[styles.textureLabel, { color: theme.colors.ink }]}>
|
|
35
|
-
{texture.label}
|
|
36
|
-
</Text>
|
|
37
|
-
</Pressable>
|
|
38
|
-
);
|
|
39
|
-
})}
|
|
40
|
-
</View>
|
|
41
|
-
</View>
|
|
42
|
-
</View>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function PaletteGroup({ mode, selectedPalette, theme, onSelect }: { readonly mode: ThemeMode; readonly selectedPalette: string; readonly theme: ReturnType<typeof useNativeTheme>; readonly onSelect: (palette: (typeof THEME_PALETTES)[number]["value"]) => void }): React.JSX.Element {
|
|
47
|
-
return (
|
|
48
|
-
<View style={styles.group}>
|
|
49
|
-
<Text style={styles.groupLabel}>{mode === "light" ? "Light palettes" : "Dark palettes"}</Text>
|
|
50
|
-
<View style={styles.paletteGrid}>
|
|
51
|
-
{THEME_PALETTES.filter((palette) => palette.mode === mode).map((palette) => {
|
|
52
|
-
const selected = palette.value === selectedPalette;
|
|
53
|
-
return (
|
|
54
|
-
<Pressable
|
|
55
|
-
accessibilityLabel={`Use ${palette.label} palette`}
|
|
56
|
-
accessibilityRole="button"
|
|
57
|
-
accessibilityState={{ selected }}
|
|
58
|
-
key={palette.value}
|
|
59
|
-
onPress={() => onSelect(palette.value)}
|
|
60
|
-
style={({ pressed }) => [styles.palette, { backgroundColor: theme.colors.surfaceMuted, borderColor: theme.colors.line }, selected && [styles.selected, { borderColor: theme.colors.primary }], pressed && styles.pressed]}
|
|
61
|
-
>
|
|
62
|
-
<View style={styles.swatches}>
|
|
63
|
-
{palette.swatch.map((color) => (
|
|
64
|
-
<View key={color} style={[styles.swatch, { backgroundColor: color }]} />
|
|
65
|
-
))}
|
|
66
|
-
</View>
|
|
67
|
-
<View style={styles.paletteCopy}>
|
|
68
|
-
<Text numberOfLines={1} style={[styles.paletteLabel, { color: theme.colors.ink }]}>
|
|
69
|
-
{palette.label}
|
|
70
|
-
</Text>
|
|
71
|
-
<Text numberOfLines={1} style={[styles.family, { color: theme.colors.ink3 }]}>
|
|
72
|
-
{palette.family}
|
|
73
|
-
</Text>
|
|
74
|
-
</View>
|
|
75
|
-
{selected ? <HugeiconsIcon color={theme.colors.success} icon={CheckmarkCircle01Icon} size={18} /> : null}
|
|
76
|
-
</Pressable>
|
|
77
|
-
);
|
|
78
|
-
})}
|
|
79
|
-
</View>
|
|
80
|
-
</View>
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function TexturePreview({ background, foreground, kind }: { readonly background: string; readonly foreground: string; readonly kind: "none" | "paper" | "slate" }): React.JSX.Element {
|
|
85
|
-
return (
|
|
86
|
-
<View style={[styles.texturePreview, { backgroundColor: background }]}>
|
|
87
|
-
{kind === "paper" ? Array.from({ length: 11 }, (_, index) => <View key={index} style={[styles.grain, { backgroundColor: foreground, left: `${(index * 29) % 91}%`, top: `${(index * 43) % 88}%` }]} />) : null}
|
|
88
|
-
{kind === "slate" ? Array.from({ length: 5 }, (_, index) => <View key={index} style={[styles.slateLine, { backgroundColor: foreground, top: 4 + index * 8 }]} />) : null}
|
|
89
|
-
</View>
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const styles = StyleSheet.create({
|
|
94
|
-
section: { gap: Theme.spacing.xl },
|
|
95
|
-
intro: { color: Theme.colors.ink2, fontSize: 14, lineHeight: 20 },
|
|
96
|
-
group: { gap: Theme.spacing.sm },
|
|
97
|
-
groupLabel: { color: Theme.colors.ink3, fontSize: 11, fontWeight: "800", letterSpacing: 1, textTransform: "uppercase" },
|
|
98
|
-
paletteGrid: { flexDirection: "row", flexWrap: "wrap", gap: Theme.spacing.sm },
|
|
99
|
-
palette: { alignItems: "center", backgroundColor: Theme.colors.surfaceMuted, borderColor: Theme.colors.line, borderRadius: Theme.radius.md, borderWidth: 1, flexDirection: "row", gap: 9, minHeight: 66, padding: 9, width: "48.6%" },
|
|
100
|
-
selected: { borderColor: Theme.colors.chalkBlue, borderWidth: 2, padding: 8 },
|
|
101
|
-
swatches: { borderColor: Theme.colors.line, borderRadius: 7, borderWidth: 1, height: 42, overflow: "hidden", width: 42 },
|
|
102
|
-
swatch: { flex: 1 },
|
|
103
|
-
paletteCopy: { flex: 1, minWidth: 0 },
|
|
104
|
-
paletteLabel: { color: Theme.colors.ink, fontSize: 13, fontWeight: "700" },
|
|
105
|
-
family: { color: Theme.colors.ink3, fontSize: 11, marginTop: 2 },
|
|
106
|
-
textureSection: { gap: Theme.spacing.sm },
|
|
107
|
-
textureGrid: { flexDirection: "row", gap: Theme.spacing.sm },
|
|
108
|
-
texture: { backgroundColor: Theme.colors.surfaceMuted, borderColor: Theme.colors.line, borderRadius: Theme.radius.md, borderWidth: 1, flex: 1, overflow: "hidden", padding: 9 },
|
|
109
|
-
texturePreview: { borderColor: Theme.colors.line, borderRadius: Theme.radius.sm, borderWidth: 1, height: 44, overflow: "hidden", position: "relative" },
|
|
110
|
-
textureLabel: { color: Theme.colors.ink, fontSize: 12, fontWeight: "700", marginTop: 7, textAlign: "center" },
|
|
111
|
-
grain: { borderRadius: 1, height: 2, opacity: 0.18, position: "absolute", width: 2 },
|
|
112
|
-
slateLine: { height: 1, left: -5, opacity: 0.15, position: "absolute", transform: [{ rotate: "7deg" }], width: "120%" },
|
|
113
|
-
pressed: { opacity: 0.7, transform: [{ scale: 0.98 }] },
|
|
114
|
-
});
|
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
import type { FeedbackCategory, FeedbackEvidenceInput, FeedbackPrepared, FeedbackScreenshotCapture, FeedbackScreenshotUnavailable, SpaceClient } from "@q9labsai/chalk-client";
|
|
2
|
-
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
|
-
import { Image, KeyboardAvoidingView, Modal, Platform, Pressable, ScrollView, StyleSheet, Text, TextInput, View } from "react-native";
|
|
4
|
-
|
|
5
|
-
import { useNativeTheme } from "../../ui/native-theme";
|
|
6
|
-
import { Theme } from "../../ui/theme";
|
|
7
|
-
import { createNativeFeedbackEvidence } from "../../feedback/native-evidence";
|
|
8
|
-
import { captureNativeFeedbackView, type FeedbackCaptureSize, type FeedbackCaptureTarget } from "../../feedback/native-capture";
|
|
9
|
-
|
|
10
|
-
type FeedbackScreenshot = FeedbackScreenshotCapture | FeedbackScreenshotUnavailable;
|
|
11
|
-
|
|
12
|
-
export interface FeedbackSheetProps {
|
|
13
|
-
readonly client: SpaceClient;
|
|
14
|
-
readonly requested: boolean;
|
|
15
|
-
readonly captureTarget: FeedbackCaptureTarget;
|
|
16
|
-
readonly captureSize: FeedbackCaptureSize;
|
|
17
|
-
readonly feedbackEvidence?: Partial<FeedbackEvidenceInput>;
|
|
18
|
-
readonly onClose: () => void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const categories: readonly FeedbackCategory[] = ["bug", "feature_request", "other"];
|
|
22
|
-
|
|
23
|
-
export function FeedbackSheet({ client, requested, captureTarget, captureSize, feedbackEvidence, onClose }: FeedbackSheetProps): React.JSX.Element {
|
|
24
|
-
const theme = useNativeTheme();
|
|
25
|
-
const [visible, setVisible] = useState(false);
|
|
26
|
-
const [preparing, setPreparing] = useState(false);
|
|
27
|
-
const [sending, setSending] = useState(false);
|
|
28
|
-
const [category, setCategory] = useState<FeedbackCategory>("bug");
|
|
29
|
-
const [message, setMessage] = useState("");
|
|
30
|
-
const [screenshot, setScreenshot] = useState<FeedbackScreenshot>({ state: "unavailable", failure_code: "capture_failed" });
|
|
31
|
-
const [prepared, setPrepared] = useState<FeedbackPrepared | undefined>();
|
|
32
|
-
const [error, setError] = useState<string | undefined>();
|
|
33
|
-
const [receiptId, setReceiptId] = useState<string | undefined>();
|
|
34
|
-
const evidence = useMemo(() => ({ ...createNativeFeedbackEvidence(), ...feedbackEvidence }), [feedbackEvidence]);
|
|
35
|
-
const prepareScreenshot = useCallback((nextScreenshot: FeedbackScreenshot) => client.feedback.prepare({ evidence, screenshot_provider: () => nextScreenshot }), [client.feedback, evidence]);
|
|
36
|
-
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
if (!requested) {
|
|
39
|
-
setVisible(false);
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
let active = true;
|
|
44
|
-
setPreparing(true);
|
|
45
|
-
setSending(false);
|
|
46
|
-
setCategory("bug");
|
|
47
|
-
setMessage("");
|
|
48
|
-
setError(undefined);
|
|
49
|
-
setReceiptId(undefined);
|
|
50
|
-
setPrepared(undefined);
|
|
51
|
-
|
|
52
|
-
const prepare = async (): Promise<void> => {
|
|
53
|
-
let captured: FeedbackScreenshot;
|
|
54
|
-
try {
|
|
55
|
-
captured = await captureNativeFeedbackView(captureTarget, captureSize);
|
|
56
|
-
} catch {
|
|
57
|
-
captured = { state: "unavailable", failure_code: "capture_failed" };
|
|
58
|
-
}
|
|
59
|
-
if (!active) return;
|
|
60
|
-
setScreenshot(captured);
|
|
61
|
-
try {
|
|
62
|
-
const nextPrepared = await prepareScreenshot(captured);
|
|
63
|
-
if (!active) return;
|
|
64
|
-
setPrepared(nextPrepared);
|
|
65
|
-
} catch (cause) {
|
|
66
|
-
if (!active) return;
|
|
67
|
-
setError(errorMessage(cause));
|
|
68
|
-
} finally {
|
|
69
|
-
if (active) {
|
|
70
|
-
setPreparing(false);
|
|
71
|
-
setVisible(true);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
void prepare();
|
|
77
|
-
return () => {
|
|
78
|
-
active = false;
|
|
79
|
-
};
|
|
80
|
-
}, [captureSize, captureTarget, prepareScreenshot, requested]);
|
|
81
|
-
|
|
82
|
-
const close = useCallback(() => {
|
|
83
|
-
setVisible(false);
|
|
84
|
-
onClose();
|
|
85
|
-
}, [onClose]);
|
|
86
|
-
|
|
87
|
-
const refresh = useCallback(async () => {
|
|
88
|
-
if (preparing || sending) return;
|
|
89
|
-
setPreparing(true);
|
|
90
|
-
setPrepared(undefined);
|
|
91
|
-
setError(undefined);
|
|
92
|
-
let captured: FeedbackScreenshot;
|
|
93
|
-
try {
|
|
94
|
-
captured = await captureNativeFeedbackView(captureTarget, captureSize);
|
|
95
|
-
} catch {
|
|
96
|
-
captured = { state: "unavailable", failure_code: "capture_failed" };
|
|
97
|
-
}
|
|
98
|
-
setScreenshot(captured);
|
|
99
|
-
try {
|
|
100
|
-
setPrepared(await prepareScreenshot(captured));
|
|
101
|
-
} catch (cause) {
|
|
102
|
-
setError(errorMessage(cause));
|
|
103
|
-
} finally {
|
|
104
|
-
setPreparing(false);
|
|
105
|
-
}
|
|
106
|
-
}, [captureSize, captureTarget, prepareScreenshot, preparing, sending]);
|
|
107
|
-
|
|
108
|
-
const removeScreenshot = useCallback(async () => {
|
|
109
|
-
if (preparing || sending) return;
|
|
110
|
-
const removed: FeedbackScreenshot = { state: "removed" };
|
|
111
|
-
setPreparing(true);
|
|
112
|
-
setPrepared(undefined);
|
|
113
|
-
setScreenshot(removed);
|
|
114
|
-
setError(undefined);
|
|
115
|
-
try {
|
|
116
|
-
setPrepared(await prepareScreenshot(removed));
|
|
117
|
-
} catch (cause) {
|
|
118
|
-
setError(errorMessage(cause));
|
|
119
|
-
} finally {
|
|
120
|
-
setPreparing(false);
|
|
121
|
-
}
|
|
122
|
-
}, [prepareScreenshot, preparing, sending]);
|
|
123
|
-
|
|
124
|
-
const submit = useCallback(async () => {
|
|
125
|
-
if (sending || !message.trim()) return;
|
|
126
|
-
setSending(true);
|
|
127
|
-
setError(undefined);
|
|
128
|
-
try {
|
|
129
|
-
const request = prepared ?? (await prepareScreenshot(screenshot));
|
|
130
|
-
setPrepared(request);
|
|
131
|
-
const receipt = await request.send({ category, message });
|
|
132
|
-
setReceiptId(receipt.id);
|
|
133
|
-
} catch (cause) {
|
|
134
|
-
setError(errorMessage(cause));
|
|
135
|
-
} finally {
|
|
136
|
-
setSending(false);
|
|
137
|
-
}
|
|
138
|
-
}, [category, message, prepareScreenshot, prepared, screenshot, sending]);
|
|
139
|
-
|
|
140
|
-
const selectCategory = useCallback((nextCategory: FeedbackCategory) => {
|
|
141
|
-
setCategory(nextCategory);
|
|
142
|
-
setPrepared(undefined);
|
|
143
|
-
}, []);
|
|
144
|
-
|
|
145
|
-
const updateMessage = useCallback((nextMessage: string) => {
|
|
146
|
-
setMessage(nextMessage);
|
|
147
|
-
setPrepared(undefined);
|
|
148
|
-
}, []);
|
|
149
|
-
|
|
150
|
-
const screenshotUri = screenshotDataUri(screenshot);
|
|
151
|
-
const canSubmit = message.trim().length > 0 && !sending && !preparing && !receiptId;
|
|
152
|
-
|
|
153
|
-
return (
|
|
154
|
-
<Modal animationType="slide" onRequestClose={close} transparent visible={visible}>
|
|
155
|
-
<KeyboardAvoidingView behavior={Platform.OS === "ios" ? "padding" : "height"} style={styles.overlay}>
|
|
156
|
-
<Pressable accessibilityLabel="Close Feedback" onPress={close} style={styles.backdrop} />
|
|
157
|
-
<View style={[styles.sheet, { backgroundColor: theme.colors.background }]}>
|
|
158
|
-
<View style={styles.header}>
|
|
159
|
-
<View style={styles.headerCopy}>
|
|
160
|
-
<Text accessibilityRole="header" style={[styles.title, { color: theme.colors.foreground }]}>
|
|
161
|
-
Feedback
|
|
162
|
-
</Text>
|
|
163
|
-
<Text style={[styles.subtitle, { color: theme.colors.mutedForeground }]}>Tell Chalk what happened. We receive this report with safe diagnostic context.</Text>
|
|
164
|
-
</View>
|
|
165
|
-
<Pressable accessibilityLabel="Close Feedback" accessibilityRole="button" disabled={sending} onPress={close} style={styles.closeButton}>
|
|
166
|
-
<Text style={[styles.closeText, { color: theme.colors.foreground }]}>×</Text>
|
|
167
|
-
</Pressable>
|
|
168
|
-
</View>
|
|
169
|
-
|
|
170
|
-
{receiptId ? (
|
|
171
|
-
<View style={styles.success}>
|
|
172
|
-
<Text style={[styles.successTitle, { color: theme.colors.foreground }]}>Feedback sent to Chalk</Text>
|
|
173
|
-
<Text style={[styles.subtitle, { color: theme.colors.mutedForeground }]}>Thanks. Chalk received your report.</Text>
|
|
174
|
-
<Pressable accessibilityRole="button" onPress={close} style={[styles.primaryButton, { backgroundColor: theme.colors.primary }]}>
|
|
175
|
-
<Text style={[styles.primaryButtonText, { color: theme.colors.primaryForeground }]}>Done</Text>
|
|
176
|
-
</Pressable>
|
|
177
|
-
</View>
|
|
178
|
-
) : (
|
|
179
|
-
<ScrollView contentContainerStyle={styles.content} keyboardShouldPersistTaps="handled">
|
|
180
|
-
<Text style={[styles.label, { color: theme.colors.foreground }]}>Category</Text>
|
|
181
|
-
<View style={styles.categoryRow}>
|
|
182
|
-
{categories.map((option) => (
|
|
183
|
-
<Pressable
|
|
184
|
-
accessibilityRole="button"
|
|
185
|
-
accessibilityState={{ selected: category === option }}
|
|
186
|
-
key={option}
|
|
187
|
-
onPress={() => selectCategory(option)}
|
|
188
|
-
style={[styles.categoryButton, { borderColor: theme.colors.border }, category === option && { backgroundColor: theme.colors.primary, borderColor: theme.colors.primary }]}
|
|
189
|
-
>
|
|
190
|
-
<Text style={[styles.categoryText, { color: category === option ? theme.colors.primaryForeground : theme.colors.foreground }]}>{categoryLabel(option)}</Text>
|
|
191
|
-
</Pressable>
|
|
192
|
-
))}
|
|
193
|
-
</View>
|
|
194
|
-
|
|
195
|
-
<Text style={[styles.label, { color: theme.colors.foreground }]}>Message</Text>
|
|
196
|
-
<TextInput
|
|
197
|
-
accessibilityLabel="Feedback message"
|
|
198
|
-
editable={!sending}
|
|
199
|
-
maxLength={8_000}
|
|
200
|
-
multiline
|
|
201
|
-
onChangeText={updateMessage}
|
|
202
|
-
placeholder={category === "bug" ? "What went wrong?" : category === "feature_request" ? "What would help?" : "What should Chalk know?"}
|
|
203
|
-
placeholderTextColor={theme.colors.placeholder}
|
|
204
|
-
style={[styles.messageInput, { borderColor: theme.colors.border, color: theme.colors.foreground }]}
|
|
205
|
-
textAlignVertical="top"
|
|
206
|
-
value={message}
|
|
207
|
-
/>
|
|
208
|
-
|
|
209
|
-
<Text style={[styles.label, { color: theme.colors.foreground }]}>Screenshot</Text>
|
|
210
|
-
{screenshotUri ? (
|
|
211
|
-
<View style={styles.thumbnailFrame}>
|
|
212
|
-
<Image accessibilityLabel="Feedback screenshot preview" source={{ uri: screenshotUri }} style={styles.thumbnail} />
|
|
213
|
-
<View style={styles.thumbnailActions}>
|
|
214
|
-
<Pressable accessibilityRole="button" disabled={preparing || sending} onPress={() => void refresh()} style={styles.smallButton}>
|
|
215
|
-
<Text style={[styles.smallButtonText, { color: theme.colors.primary }]}>Refresh</Text>
|
|
216
|
-
</Pressable>
|
|
217
|
-
<Pressable accessibilityRole="button" disabled={preparing || sending} onPress={() => void removeScreenshot()} style={styles.smallButton}>
|
|
218
|
-
<Text style={[styles.smallButtonText, { color: theme.colors.error }]}>Remove</Text>
|
|
219
|
-
</Pressable>
|
|
220
|
-
</View>
|
|
221
|
-
</View>
|
|
222
|
-
) : (
|
|
223
|
-
<View style={[styles.unavailable, { borderColor: theme.colors.border }]}>
|
|
224
|
-
<Text style={[styles.unavailableText, { color: theme.colors.mutedForeground }]}>Screenshot unavailable. You can still send Feedback.</Text>
|
|
225
|
-
<Pressable accessibilityRole="button" disabled={preparing || sending} onPress={() => void refresh()} style={styles.smallButton}>
|
|
226
|
-
<Text style={[styles.smallButtonText, { color: theme.colors.primary }]}>Refresh</Text>
|
|
227
|
-
</Pressable>
|
|
228
|
-
</View>
|
|
229
|
-
)}
|
|
230
|
-
{screenshot.state === "partial" ? <Text style={[styles.notice, { color: theme.colors.mutedForeground }]}>Some protected content may be missing from this screenshot.</Text> : null}
|
|
231
|
-
{preparing ? <Text style={[styles.notice, { color: theme.colors.mutedForeground }]}>Preparing Feedback…</Text> : null}
|
|
232
|
-
{error ? (
|
|
233
|
-
<Text accessibilityLiveRegion="polite" style={[styles.error, { color: theme.colors.error }]}>
|
|
234
|
-
{error}
|
|
235
|
-
</Text>
|
|
236
|
-
) : null}
|
|
237
|
-
|
|
238
|
-
<Pressable accessibilityRole="button" disabled={!canSubmit} onPress={() => void submit()} style={[styles.primaryButton, { backgroundColor: theme.colors.primary }, !canSubmit && styles.disabledButton]}>
|
|
239
|
-
<Text style={[styles.primaryButtonText, { color: theme.colors.primaryForeground }]}>{sending ? "Sending…" : "Send Feedback"}</Text>
|
|
240
|
-
</Pressable>
|
|
241
|
-
<Text style={[styles.footer, { color: theme.colors.mutedForeground }]}>Chalk includes safe Space state, journey, and diagnostic details. It never includes credentials, names, or message content outside this report. There is no reply channel.</Text>
|
|
242
|
-
</ScrollView>
|
|
243
|
-
)}
|
|
244
|
-
</View>
|
|
245
|
-
</KeyboardAvoidingView>
|
|
246
|
-
</Modal>
|
|
247
|
-
);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
function screenshotDataUri(screenshot: FeedbackScreenshot): string | undefined {
|
|
251
|
-
if (screenshot.state !== "captured" && screenshot.state !== "partial") return undefined;
|
|
252
|
-
return `data:${screenshot.mime_type};base64,${screenshot.data_base64}`;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
function categoryLabel(category: FeedbackCategory): string {
|
|
256
|
-
if (category === "feature_request") return "Feature request";
|
|
257
|
-
if (category === "bug") return "Bug";
|
|
258
|
-
return "Other";
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
function errorMessage(cause: unknown): string {
|
|
262
|
-
return cause instanceof Error ? cause.message : "Chalk could not send Feedback.";
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
const styles = StyleSheet.create({
|
|
266
|
-
overlay: { flex: 1, justifyContent: "flex-end", backgroundColor: Theme.colors.darkOverlay55 },
|
|
267
|
-
backdrop: { ...StyleSheet.absoluteFillObject },
|
|
268
|
-
sheet: { maxHeight: "92%", borderTopLeftRadius: 24, borderTopRightRadius: 24, padding: 24, paddingBottom: 36 },
|
|
269
|
-
header: { flexDirection: "row", alignItems: "flex-start", justifyContent: "space-between", gap: 16, marginBottom: 20 },
|
|
270
|
-
headerCopy: { flex: 1, gap: 4 },
|
|
271
|
-
title: { ...Theme.typography.heading },
|
|
272
|
-
subtitle: { ...Theme.typography.body },
|
|
273
|
-
closeButton: { alignItems: "center", borderColor: Theme.colors.border, borderRadius: Theme.radius.full, borderWidth: 1, height: 36, justifyContent: "center", width: 36 },
|
|
274
|
-
closeText: { fontSize: 24, lineHeight: 26 },
|
|
275
|
-
content: { gap: 12, paddingBottom: 8 },
|
|
276
|
-
label: { ...Theme.typography.label, marginTop: 4 },
|
|
277
|
-
categoryRow: { flexDirection: "row", flexWrap: "wrap", gap: 8 },
|
|
278
|
-
categoryButton: { borderRadius: 14, borderWidth: 1, paddingHorizontal: 13, paddingVertical: 10 },
|
|
279
|
-
categoryText: { fontSize: 14, fontWeight: "700" },
|
|
280
|
-
messageInput: { minHeight: 116, borderRadius: 14, borderWidth: 1, padding: 14, fontSize: 15, lineHeight: 21 },
|
|
281
|
-
thumbnailFrame: { borderRadius: 16, overflow: "hidden", borderWidth: 1, borderColor: Theme.colors.border },
|
|
282
|
-
thumbnail: { width: "100%", height: 170, backgroundColor: Theme.colors.surfaceMuted },
|
|
283
|
-
thumbnailActions: { flexDirection: "row", gap: 16, paddingHorizontal: 12, paddingVertical: 8 },
|
|
284
|
-
unavailable: { borderRadius: 14, borderWidth: 1, padding: 14, gap: 4 },
|
|
285
|
-
unavailableText: { ...Theme.typography.body },
|
|
286
|
-
smallButton: { alignSelf: "flex-start", paddingVertical: 6, paddingHorizontal: 2 },
|
|
287
|
-
smallButtonText: { fontSize: 14, fontWeight: "700" },
|
|
288
|
-
notice: { ...Theme.typography.meta },
|
|
289
|
-
error: { ...Theme.typography.meta, fontWeight: "700" },
|
|
290
|
-
primaryButton: { alignItems: "center", borderRadius: 14, justifyContent: "center", minHeight: 50, marginTop: 8, paddingHorizontal: 16 },
|
|
291
|
-
primaryButtonText: { fontSize: 16, fontWeight: "800" },
|
|
292
|
-
disabledButton: { opacity: 0.45 },
|
|
293
|
-
footer: { ...Theme.typography.meta, marginTop: 4 },
|
|
294
|
-
success: { gap: 12, paddingVertical: 28 },
|
|
295
|
-
successTitle: { ...Theme.typography.subheading },
|
|
296
|
-
});
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import CancelCircleIcon from "@hugeicons/core-free-icons/dist/esm/CancelCircleIcon";
|
|
2
|
-
import MicOff01Icon from "@hugeicons/core-free-icons/dist/esm/MicOff01Icon";
|
|
3
|
-
import UserIcon from "@hugeicons/core-free-icons/dist/esm/UserIcon";
|
|
4
|
-
import Video01Icon from "@hugeicons/core-free-icons/dist/esm/Video01Icon";
|
|
5
|
-
import { HugeiconsIcon } from "@hugeicons/react-native";
|
|
6
|
-
import { Modal, Platform, Pressable, StyleSheet, Text, View } from "react-native";
|
|
7
|
-
|
|
8
|
-
import { Theme } from "../../ui/theme";
|
|
9
|
-
import { buildParticipantActionDescriptors, type ParticipantActionDescriptor } from "./space-progressive-surface-helpers";
|
|
10
|
-
import { CloseButton, IconTile, InitialsAvatar } from "./SpaceSurfacePrimitives";
|
|
11
|
-
import type { SpaceController } from "./space-progressive-surface-types";
|
|
12
|
-
|
|
13
|
-
interface ParticipantActionSheetProps {
|
|
14
|
-
readonly controller: SpaceController;
|
|
15
|
-
readonly participantId: string | null;
|
|
16
|
-
readonly onClose: () => void;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function ParticipantActionSheet({ controller, participantId, onClose }: ParticipantActionSheetProps): React.JSX.Element {
|
|
20
|
-
const participant = participantId ? controller.participants.participants.find((item) => item.id === participantId) : undefined;
|
|
21
|
-
const descriptors = buildParticipantActionDescriptors({
|
|
22
|
-
canMuteParticipants: controller.canMuteParticipants,
|
|
23
|
-
canRequestMedia: controller.canRequestMedia,
|
|
24
|
-
canStopParticipantCamera: controller.canStopParticipantCamera,
|
|
25
|
-
canStopParticipantScreenShare: controller.canStopParticipantScreenShare,
|
|
26
|
-
canRemoveParticipants: controller.canRemoveParticipants,
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
const run = (descriptor: ParticipantActionDescriptor) => {
|
|
30
|
-
if (!participantId) return;
|
|
31
|
-
onClose();
|
|
32
|
-
if (descriptor.kind === "mute") controller.muteParticipant(participantId);
|
|
33
|
-
if (descriptor.kind === "requestUnmute") controller.requestUnmuteParticipant(participantId);
|
|
34
|
-
if (descriptor.kind === "requestCamera") controller.requestStartParticipantCamera(participantId);
|
|
35
|
-
if (descriptor.kind === "stopCamera") controller.stopParticipantCamera(participantId);
|
|
36
|
-
if (descriptor.kind === "stopScreenShare") controller.stopParticipantScreenShare(participantId);
|
|
37
|
-
if (descriptor.kind === "remove") controller.removeParticipant(participantId);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<Modal animationType="fade" onRequestClose={onClose} transparent visible={participantId !== null}>
|
|
42
|
-
<View style={styles.modalRoot}>
|
|
43
|
-
<Pressable accessibilityLabel="Close Participant actions" onPress={onClose} style={styles.backdrop} />
|
|
44
|
-
<View style={styles.card}>
|
|
45
|
-
<View style={styles.cardHeader}>
|
|
46
|
-
{participant ? <InitialsAvatar name={participant.displayName} size={44} /> : <IconTile icon={UserIcon} />}
|
|
47
|
-
<View style={styles.headerCopy}>
|
|
48
|
-
<Text numberOfLines={1} style={styles.name}>
|
|
49
|
-
{participant?.displayName ?? "Participant"}
|
|
50
|
-
</Text>
|
|
51
|
-
</View>
|
|
52
|
-
<CloseButton label="Close Participant actions" onPress={onClose} />
|
|
53
|
-
</View>
|
|
54
|
-
<View style={styles.actions}>
|
|
55
|
-
{descriptors
|
|
56
|
-
.filter((descriptor) => !descriptor.destructive)
|
|
57
|
-
.map((descriptor) => (
|
|
58
|
-
<ParticipantActionRow descriptor={descriptor} key={descriptor.kind} onPress={() => run(descriptor)} />
|
|
59
|
-
))}
|
|
60
|
-
{descriptors.some((descriptor) => descriptor.destructive) ? <View style={styles.divider} /> : null}
|
|
61
|
-
{descriptors
|
|
62
|
-
.filter((descriptor) => descriptor.destructive)
|
|
63
|
-
.map((descriptor) => (
|
|
64
|
-
<ParticipantActionRow descriptor={descriptor} key={descriptor.kind} onPress={() => run(descriptor)} />
|
|
65
|
-
))}
|
|
66
|
-
</View>
|
|
67
|
-
{!descriptors.length ? <Text style={styles.emptyText}>No actions are available for this Participant.</Text> : null}
|
|
68
|
-
</View>
|
|
69
|
-
</View>
|
|
70
|
-
</Modal>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function ParticipantActionRow({ descriptor, onPress }: { readonly descriptor: ParticipantActionDescriptor; readonly onPress: () => void }): React.JSX.Element {
|
|
75
|
-
const icon = descriptor.kind === "mute" || descriptor.kind === "requestUnmute" ? MicOff01Icon : descriptor.kind === "requestCamera" || descriptor.kind === "stopCamera" ? Video01Icon : CancelCircleIcon;
|
|
76
|
-
return (
|
|
77
|
-
<Pressable accessibilityLabel={descriptor.label} accessibilityRole="button" onPress={onPress} style={({ pressed }) => [styles.actionRow, descriptor.destructive && styles.destructiveRow, pressed && styles.pressed]}>
|
|
78
|
-
<HugeiconsIcon color={descriptor.destructive ? Theme.colors.error : Theme.colors.ink} icon={icon} size={21} />
|
|
79
|
-
<Text style={[styles.actionLabel, descriptor.destructive && styles.destructiveText]}>{descriptor.label}</Text>
|
|
80
|
-
</Pressable>
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const styles = StyleSheet.create({
|
|
85
|
-
modalRoot: { alignItems: "center", flex: 1, justifyContent: "flex-end", paddingBottom: Platform.OS === "ios" ? Theme.spacing["2xl"] : Theme.spacing.lg, paddingHorizontal: Theme.spacing.lg, paddingTop: Theme.spacing.lg },
|
|
86
|
-
backdrop: { ...StyleSheet.absoluteFillObject, backgroundColor: Theme.colors.darkOverlay22 },
|
|
87
|
-
card: { backgroundColor: Theme.colors.surface, borderColor: Theme.colors.line, borderRadius: Theme.radius.lg, elevation: 8, maxHeight: "78%", overflow: "hidden", shadowColor: Theme.colors.ink, shadowOffset: { height: 4, width: 0 }, shadowOpacity: 0.14, shadowRadius: 20, width: "100%" },
|
|
88
|
-
cardHeader: { alignItems: "center", borderBottomColor: Theme.colors.line, borderBottomWidth: 1, flexDirection: "row", gap: Theme.spacing.md, minHeight: 78, paddingHorizontal: Theme.spacing.md },
|
|
89
|
-
headerCopy: { flex: 1, minWidth: 0 },
|
|
90
|
-
name: { color: Theme.colors.ink, fontSize: 17, fontWeight: "700" },
|
|
91
|
-
actions: { padding: Theme.spacing.sm },
|
|
92
|
-
actionRow: { alignItems: "center", borderRadius: Theme.radius.sm, flexDirection: "row", gap: Theme.spacing.md, minHeight: 52, paddingHorizontal: Theme.spacing.md },
|
|
93
|
-
actionLabel: { color: Theme.colors.ink, flex: 1, fontSize: 15 },
|
|
94
|
-
destructiveRow: { backgroundColor: Theme.colors.washPink, marginTop: Theme.spacing.xs },
|
|
95
|
-
destructiveText: { color: Theme.colors.error, fontWeight: "700" },
|
|
96
|
-
divider: { backgroundColor: Theme.colors.line, height: 1, marginHorizontal: Theme.spacing.md, marginVertical: Theme.spacing.xs },
|
|
97
|
-
emptyText: { color: Theme.colors.ink2, fontSize: 14, padding: Theme.spacing.lg },
|
|
98
|
-
pressed: { opacity: 0.72, transform: [{ scale: 0.985 }] },
|
|
99
|
-
});
|