@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,74 +0,0 @@
|
|
|
1
|
-
import { createContext, useCallback, useContext, useEffect, useMemo, useState, type PropsWithChildren } from "react";
|
|
2
|
-
import { StyleSheet, View } from "react-native";
|
|
3
|
-
|
|
4
|
-
import { resolveNativeAppearance, type NativeAppearance, type ThemeAppearance, type ThemePalette, type ThemeTexture } from "./appearance";
|
|
5
|
-
|
|
6
|
-
interface NativeAppearanceContextValue {
|
|
7
|
-
readonly appearance: NativeAppearance;
|
|
8
|
-
readonly setPalette: (palette: ThemePalette) => void;
|
|
9
|
-
readonly setTexture: (texture: ThemeTexture) => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const NativeAppearanceContext = createContext<NativeAppearanceContextValue | null>(null);
|
|
13
|
-
|
|
14
|
-
interface NativeAppearanceProviderProps extends PropsWithChildren {
|
|
15
|
-
readonly initialAppearance?: Partial<ThemeAppearance>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function NativeAppearanceProvider({ children, initialAppearance }: NativeAppearanceProviderProps): React.JSX.Element {
|
|
19
|
-
const [selection, setSelection] = useState<ThemeAppearance>({ palette: initialAppearance?.palette ?? "light", texture: initialAppearance?.texture ?? "none" });
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
if (initialAppearance?.palette === undefined && initialAppearance?.texture === undefined) return;
|
|
22
|
-
setSelection((current) => {
|
|
23
|
-
const next = {
|
|
24
|
-
palette: initialAppearance?.palette ?? current.palette,
|
|
25
|
-
texture: initialAppearance?.texture ?? current.texture,
|
|
26
|
-
} satisfies ThemeAppearance;
|
|
27
|
-
return next.palette === current.palette && next.texture === current.texture ? current : next;
|
|
28
|
-
});
|
|
29
|
-
}, [initialAppearance?.palette, initialAppearance?.texture]);
|
|
30
|
-
const appearance = useMemo(() => resolveNativeAppearance(selection), [selection]);
|
|
31
|
-
|
|
32
|
-
const updateSelection = useCallback((next: ThemeAppearance) => {
|
|
33
|
-
setSelection(next);
|
|
34
|
-
}, []);
|
|
35
|
-
|
|
36
|
-
const value = useMemo<NativeAppearanceContextValue>(
|
|
37
|
-
() => ({
|
|
38
|
-
appearance,
|
|
39
|
-
setPalette: (palette) => updateSelection({ ...selection, palette }),
|
|
40
|
-
setTexture: (texture) => updateSelection({ ...selection, texture }),
|
|
41
|
-
}),
|
|
42
|
-
[appearance, selection, updateSelection],
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
return <NativeAppearanceContext.Provider value={value}>{children}</NativeAppearanceContext.Provider>;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function useNativeAppearance(): NativeAppearanceContextValue {
|
|
49
|
-
const value = useContext(NativeAppearanceContext);
|
|
50
|
-
if (!value) throw new Error("useNativeAppearance must be used inside NativeAppearanceProvider");
|
|
51
|
-
return value;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function NativeTextureOverlay(): React.JSX.Element | null {
|
|
55
|
-
const { appearance } = useNativeAppearance();
|
|
56
|
-
const descriptor = appearance.textureDescriptor;
|
|
57
|
-
if (descriptor.kind === "none") return null;
|
|
58
|
-
|
|
59
|
-
const marks = descriptor.kind === "paper-grain" ? 44 : 26;
|
|
60
|
-
return (
|
|
61
|
-
<View accessibilityElementsHidden importantForAccessibility="no-hide-descendants" pointerEvents="none" style={[StyleSheet.absoluteFill, styles.overlay, { opacity: descriptor.opacity }]}>
|
|
62
|
-
{Array.from({ length: marks }, (_, index) => {
|
|
63
|
-
const size = descriptor.kind === "paper-grain" ? 1 + (index % 2) : 1;
|
|
64
|
-
return <View key={index} style={[styles.mark, descriptor.kind === "slate" && styles.slateMark, { backgroundColor: appearance.tokens.text, height: size, left: `${(index * 37) % 97}%`, top: `${(index * 53) % 96}%`, width: descriptor.kind === "slate" ? 38 : size }]} />;
|
|
65
|
-
})}
|
|
66
|
-
</View>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const styles = StyleSheet.create({
|
|
71
|
-
overlay: { overflow: "hidden" },
|
|
72
|
-
mark: { borderRadius: 2, position: "absolute" },
|
|
73
|
-
slateMark: { opacity: 0.48, transform: [{ rotate: "7deg" }] },
|
|
74
|
-
});
|
package/src/ui/native-theme.tsx
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext, useMemo, type ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
import type { NativeAppearance } from "./appearance";
|
|
4
|
-
import { createNativeTheme, Theme, type NativeColorScheme, type NativeTheme } from "./theme";
|
|
5
|
-
import { DEFAULT_CHALK_THEME_TOKENS, LIGHT_CHALK_THEME_TOKENS, type ChalkThemeTokenValues } from "./theme-tokens";
|
|
6
|
-
|
|
7
|
-
export interface NativeThemeInput {
|
|
8
|
-
readonly colorScheme?: NativeColorScheme;
|
|
9
|
-
readonly accent?: string;
|
|
10
|
-
readonly tokens?: Partial<ChalkThemeTokenValues>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const NativeThemeContext = createContext<NativeTheme>(Theme);
|
|
14
|
-
|
|
15
|
-
export function resolveNativeTheme(input?: NativeThemeInput, appearance?: NativeAppearance): NativeTheme {
|
|
16
|
-
const colorScheme = input?.colorScheme ?? appearance?.mode ?? "dark";
|
|
17
|
-
const base = appearance ? themeTokensFromAppearance(appearance) : colorScheme === "light" ? LIGHT_CHALK_THEME_TOKENS : DEFAULT_CHALK_THEME_TOKENS;
|
|
18
|
-
const accent = input?.accent;
|
|
19
|
-
return createNativeTheme(
|
|
20
|
-
{
|
|
21
|
-
...base,
|
|
22
|
-
...input?.tokens,
|
|
23
|
-
...(accent ? { accent, focus: accent } : {}),
|
|
24
|
-
},
|
|
25
|
-
colorScheme,
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function NativeThemeProvider({ appearance, children, theme }: { readonly appearance?: NativeAppearance; readonly children: ReactNode; readonly theme?: NativeThemeInput }): React.JSX.Element {
|
|
30
|
-
const value = useMemo(() => resolveNativeTheme(theme, appearance), [appearance, theme?.accent, theme?.colorScheme, theme?.tokens]);
|
|
31
|
-
return <NativeThemeContext.Provider value={value}>{children}</NativeThemeContext.Provider>;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export function useNativeTheme(): NativeTheme {
|
|
35
|
-
return useContext(NativeThemeContext);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function themeTokensFromAppearance(appearance: NativeAppearance): ChalkThemeTokenValues {
|
|
39
|
-
const tokens = appearance.tokens;
|
|
40
|
-
const base = appearance.mode === "light" ? LIGHT_CHALK_THEME_TOKENS : DEFAULT_CHALK_THEME_TOKENS;
|
|
41
|
-
return {
|
|
42
|
-
...base,
|
|
43
|
-
canvas: tokens.canvas,
|
|
44
|
-
chrome: tokens.panel,
|
|
45
|
-
surface: tokens.panel,
|
|
46
|
-
stage: tokens.stage,
|
|
47
|
-
text: tokens.text,
|
|
48
|
-
mutedText: tokens.textMuted,
|
|
49
|
-
line: tokens.line,
|
|
50
|
-
focus: tokens.controlActiveLine,
|
|
51
|
-
accent: tokens.controlPrimary,
|
|
52
|
-
accentText: tokens.messageLocalText,
|
|
53
|
-
};
|
|
54
|
-
}
|
package/src/ui/native-types.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { ChatAttachment, ChatReadReceipt, Participant, Reaction } from "@q9labsai/chalk-client";
|
|
2
|
-
|
|
3
|
-
export type Layout = "grid" | "focus" | "presentation";
|
|
4
|
-
export type NativePanel = "chat" | "participants" | "whiteboard" | null;
|
|
5
|
-
export type ParticipantGradientPreference = "auto" | "subtle" | "vivid" | "mono";
|
|
6
|
-
|
|
7
|
-
export type NativeParticipant = Participant & {
|
|
8
|
-
readonly id: string;
|
|
9
|
-
readonly audioEnabled: boolean;
|
|
10
|
-
readonly videoEnabled: boolean;
|
|
11
|
-
readonly audioTrack: MediaStreamTrack | null;
|
|
12
|
-
readonly videoTrack: MediaStreamTrack | null;
|
|
13
|
-
readonly screenShareTrack: MediaStreamTrack | null;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export type NativeParticipantState = {
|
|
17
|
-
readonly participants: readonly NativeParticipant[];
|
|
18
|
-
readonly localParticipant: NativeParticipant | null;
|
|
19
|
-
readonly activeSpeaker: NativeParticipant | null;
|
|
20
|
-
readonly count: number;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export type NativeChatMessage = {
|
|
24
|
-
readonly id: string;
|
|
25
|
-
readonly sequence: string;
|
|
26
|
-
readonly senderId: string;
|
|
27
|
-
readonly senderName: string;
|
|
28
|
-
readonly text: string;
|
|
29
|
-
readonly content: string;
|
|
30
|
-
readonly attachments: readonly ChatAttachment[];
|
|
31
|
-
readonly readBy: readonly (ChatReadReceipt & { readonly displayName: string })[];
|
|
32
|
-
readonly timestamp: number;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export type NativeReaction = {
|
|
36
|
-
readonly id: string;
|
|
37
|
-
readonly emoji: Reaction;
|
|
38
|
-
readonly participantId: string;
|
|
39
|
-
readonly participantName: string;
|
|
40
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { ParticipantGradientPreference } from "./native-types";
|
|
2
|
-
import { Theme } from "./theme";
|
|
3
|
-
|
|
4
|
-
const palettes = Theme.avatarPalettes;
|
|
5
|
-
|
|
6
|
-
export interface ParticipantColor {
|
|
7
|
-
readonly primary: string;
|
|
8
|
-
readonly gradientEnd: string;
|
|
9
|
-
readonly surface: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const PARTICIPANT_AVATAR_PALETTE = palettes.map(([primary, , surface]) => ({ primary, surface })) as readonly { readonly primary: string; readonly surface: string }[];
|
|
13
|
-
|
|
14
|
-
export function getParticipantInitials(name?: string): string {
|
|
15
|
-
const parts = (name ?? "").trim().split(/\s+/).filter(Boolean);
|
|
16
|
-
if (parts.length === 0) return "?";
|
|
17
|
-
return `${parts[0]?.[0] ?? "?"}${parts[1]?.[0] ?? ""}`.toUpperCase();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function getParticipantColor(seed = "guest", _preference?: ParticipantGradientPreference): ParticipantColor {
|
|
21
|
-
const palette = palettes[hashString(seed) % palettes.length] ?? palettes[0];
|
|
22
|
-
return {
|
|
23
|
-
primary: palette[0],
|
|
24
|
-
gradientEnd: palette[0],
|
|
25
|
-
surface: palette[2],
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function getParticipantAvatarRecipe(seed = "guest", preference?: ParticipantGradientPreference) {
|
|
30
|
-
const colors = getParticipantColor(seed, preference);
|
|
31
|
-
return {
|
|
32
|
-
colors,
|
|
33
|
-
gradientStops: [
|
|
34
|
-
{ color: colors.primary, offset: "0%" },
|
|
35
|
-
{ color: colors.primary, offset: "100%" },
|
|
36
|
-
],
|
|
37
|
-
facehashColors: [colors.primary, colors.primary, colors.primary],
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function hashString(value: string): number {
|
|
42
|
-
let hash = 0;
|
|
43
|
-
for (let index = 0; index < value.length; index += 1) {
|
|
44
|
-
hash = (hash * 31 + value.charCodeAt(index)) >>> 0;
|
|
45
|
-
}
|
|
46
|
-
return hash;
|
|
47
|
-
}
|
package/src/ui/theme-tokens.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The one default token set shared by the public Chalk theme and native styles.
|
|
3
|
-
* Components consume semantic aliases from `Theme`, never raw color literals.
|
|
4
|
-
*/
|
|
5
|
-
export const DEFAULT_CHALK_THEME_TOKENS = {
|
|
6
|
-
canvas: "#0a0a0b",
|
|
7
|
-
chrome: "#141418",
|
|
8
|
-
surface: "#141418",
|
|
9
|
-
stage: "#101314",
|
|
10
|
-
text: "#fbffff",
|
|
11
|
-
mutedText: "#71717a",
|
|
12
|
-
line: "#1c1c1f",
|
|
13
|
-
accent: "#1bb6a6",
|
|
14
|
-
accentText: "#ffffff",
|
|
15
|
-
positive: "#22c55e",
|
|
16
|
-
danger: "#ef4444",
|
|
17
|
-
dangerSurface: "#7f1d1d",
|
|
18
|
-
focus: "#1bb6a6",
|
|
19
|
-
shadow: "#000000",
|
|
20
|
-
} as const;
|
|
21
|
-
|
|
22
|
-
/** Light-mode defaults for the same public token contract. */
|
|
23
|
-
export const LIGHT_CHALK_THEME_TOKENS: ChalkThemeTokenValues = {
|
|
24
|
-
canvas: "#f8fafc",
|
|
25
|
-
chrome: "#ffffff",
|
|
26
|
-
surface: "#f1f5f9",
|
|
27
|
-
stage: "#e2e8f0",
|
|
28
|
-
text: "#0f172a",
|
|
29
|
-
mutedText: "#475569",
|
|
30
|
-
line: "#cbd5e1",
|
|
31
|
-
accent: "#0f766e",
|
|
32
|
-
accentText: "#ffffff",
|
|
33
|
-
positive: "#15803d",
|
|
34
|
-
danger: "#b91c1c",
|
|
35
|
-
dangerSurface: "#fee2e2",
|
|
36
|
-
focus: "#0f766e",
|
|
37
|
-
shadow: "#0f172a",
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export type ChalkThemeTokenName = keyof typeof DEFAULT_CHALK_THEME_TOKENS;
|
|
41
|
-
export type ChalkThemeTokenValues = Readonly<Record<ChalkThemeTokenName, string>>;
|
package/src/ui/theme.ts
DELETED
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_CHALK_THEME_TOKENS, type ChalkThemeTokenValues } from "./theme-tokens";
|
|
2
|
-
|
|
3
|
-
const tokens = DEFAULT_CHALK_THEME_TOKENS;
|
|
4
|
-
|
|
5
|
-
export type NativeColorScheme = "dark" | "light";
|
|
6
|
-
|
|
7
|
-
export function createNativeTheme(themeTokens: ChalkThemeTokenValues = tokens, colorScheme: NativeColorScheme = "dark") {
|
|
8
|
-
const tokens = themeTokens;
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
colorScheme,
|
|
12
|
-
colors: {
|
|
13
|
-
// Stable aliases keep the progressive native surfaces on the same
|
|
14
|
-
// light/dark token set as the canonical Space renderer.
|
|
15
|
-
paper: tokens.canvas,
|
|
16
|
-
paper2: tokens.chrome,
|
|
17
|
-
surfaceMuted: tokens.surface,
|
|
18
|
-
ink: tokens.text,
|
|
19
|
-
ink2: tokens.mutedText,
|
|
20
|
-
ink3: tokens.mutedText,
|
|
21
|
-
inkSecondary: tokens.mutedText,
|
|
22
|
-
inkTertiary: tokens.mutedText,
|
|
23
|
-
line: tokens.line,
|
|
24
|
-
lineStrong: tokens.line,
|
|
25
|
-
chalkGreen: tokens.positive,
|
|
26
|
-
washGreen: tokens.chrome,
|
|
27
|
-
chalkYellow: tokens.accent,
|
|
28
|
-
washYellow: tokens.chrome,
|
|
29
|
-
chalkBlue: tokens.accent,
|
|
30
|
-
washBlue: tokens.chrome,
|
|
31
|
-
chalkPink: tokens.danger,
|
|
32
|
-
washPink: tokens.dangerSurface,
|
|
33
|
-
successBackground: tokens.chrome,
|
|
34
|
-
warningBackground: tokens.chrome,
|
|
35
|
-
information: tokens.accent,
|
|
36
|
-
informationBackground: tokens.chrome,
|
|
37
|
-
dangerBackground: tokens.dangerSurface,
|
|
38
|
-
background: tokens.canvas,
|
|
39
|
-
foreground: tokens.text,
|
|
40
|
-
card: tokens.chrome,
|
|
41
|
-
cardForeground: tokens.text,
|
|
42
|
-
surface: tokens.surface,
|
|
43
|
-
popover: tokens.surface,
|
|
44
|
-
popoverForeground: tokens.text,
|
|
45
|
-
primary: tokens.accent,
|
|
46
|
-
primaryForeground: tokens.accentText,
|
|
47
|
-
secondary: tokens.chrome,
|
|
48
|
-
secondaryForeground: tokens.text,
|
|
49
|
-
muted: tokens.chrome,
|
|
50
|
-
mutedForeground: tokens.mutedText,
|
|
51
|
-
accent: tokens.chrome,
|
|
52
|
-
accentForeground: tokens.text,
|
|
53
|
-
destructive: tokens.dangerSurface,
|
|
54
|
-
destructiveForeground: tokens.danger,
|
|
55
|
-
border: tokens.line,
|
|
56
|
-
input: tokens.line,
|
|
57
|
-
ring: tokens.focus,
|
|
58
|
-
success: tokens.positive,
|
|
59
|
-
danger: tokens.danger,
|
|
60
|
-
error: tokens.danger,
|
|
61
|
-
stageBackground: tokens.stage,
|
|
62
|
-
stageAccent: tokens.positive,
|
|
63
|
-
tileBackground: tokens.chrome,
|
|
64
|
-
controlsBackground: tokens.chrome,
|
|
65
|
-
glassSurface: tokens.surface,
|
|
66
|
-
transparent: "transparent",
|
|
67
|
-
onDark: tokens.text,
|
|
68
|
-
darkCanvas: tokens.canvas,
|
|
69
|
-
raisedSurface: tokens.chrome,
|
|
70
|
-
insetSurface: tokens.surface,
|
|
71
|
-
elevatedSurface: tokens.chrome,
|
|
72
|
-
nearDarkSurface: tokens.stage,
|
|
73
|
-
lightSurface: tokens.chrome,
|
|
74
|
-
lightText: tokens.text,
|
|
75
|
-
lightMutedText: tokens.mutedText,
|
|
76
|
-
lightSubtleText: tokens.mutedText,
|
|
77
|
-
info: tokens.accent,
|
|
78
|
-
dangerStrong: tokens.danger,
|
|
79
|
-
warning: tokens.positive,
|
|
80
|
-
placeholder: tokens.mutedText,
|
|
81
|
-
brandTeal: tokens.accent,
|
|
82
|
-
brandCyan: tokens.accent,
|
|
83
|
-
statusOffline: tokens.mutedText,
|
|
84
|
-
speakingAccent: tokens.positive,
|
|
85
|
-
whiteOverlay04: "rgba(255,255,255,0.04)",
|
|
86
|
-
whiteOverlay05: "rgba(255,255,255,0.05)",
|
|
87
|
-
whiteOverlay06: "rgba(255,255,255,0.06)",
|
|
88
|
-
whiteOverlay08: "rgba(255,255,255,0.08)",
|
|
89
|
-
whiteOverlay10: "rgba(255,255,255,0.1)",
|
|
90
|
-
whiteOverlay12: "rgba(255,255,255,0.12)",
|
|
91
|
-
whiteOverlay16: "rgba(255,255,255,0.16)",
|
|
92
|
-
whiteOverlay20: "rgba(255,255,255,0.2)",
|
|
93
|
-
whiteOverlay25: "rgba(255,255,255,0.25)",
|
|
94
|
-
whiteOverlay40: "rgba(255,255,255,0.4)",
|
|
95
|
-
whiteOverlay50: "rgba(255,255,255,0.5)",
|
|
96
|
-
whiteOverlay60: "rgba(255,255,255,0.6)",
|
|
97
|
-
whiteOverlay68: "rgba(255,255,255,0.68)",
|
|
98
|
-
whiteOverlay72: "rgba(255,255,255,0.72)",
|
|
99
|
-
darkOverlay16: "rgba(0,0,0,0.16)",
|
|
100
|
-
darkOverlay22: "rgba(12,14,18,0.22)",
|
|
101
|
-
darkOverlay30: "rgba(0,0,0,0.3)",
|
|
102
|
-
darkOverlay40: "rgba(0,0,0,0.4)",
|
|
103
|
-
darkOverlay45: "rgba(0,0,0,0.45)",
|
|
104
|
-
darkOverlay50: "rgba(0,0,0,0.5)",
|
|
105
|
-
darkOverlay55: "rgba(0,0,0,0.55)",
|
|
106
|
-
canvasOverlay85: "rgba(10,10,10,0.85)",
|
|
107
|
-
chromeOverlay82: "rgba(10,10,12,0.82)",
|
|
108
|
-
accentOverlay04: "rgba(27,182,166,0.04)",
|
|
109
|
-
dangerSurfaceOverlay94: "rgba(127,29,29,0.94)",
|
|
110
|
-
},
|
|
111
|
-
avatarPalettes: [
|
|
112
|
-
["#14b8a6", "#0f766e", "#99f6e4"],
|
|
113
|
-
["#f59e0b", "#b45309", "#fde68a"],
|
|
114
|
-
["#ec4899", "#be185d", "#fbcfe8"],
|
|
115
|
-
["#8b5cf6", "#6d28d9", "#ddd6fe"],
|
|
116
|
-
["#06b6d4", "#0e7490", "#cffafe"],
|
|
117
|
-
["#22c55e", "#15803d", "#bbf7d0"],
|
|
118
|
-
] as const,
|
|
119
|
-
logo: {
|
|
120
|
-
arc: "#7EC8E3",
|
|
121
|
-
mint: "#A8D5A2",
|
|
122
|
-
mintDark: "#8BC585",
|
|
123
|
-
gold: "#F5D76E",
|
|
124
|
-
goldDark: "#E8C85A",
|
|
125
|
-
sky: "#7EC8E3",
|
|
126
|
-
skyDark: "#5FB8D9",
|
|
127
|
-
coral: "#F0A0A0",
|
|
128
|
-
coralDark: "#E88888",
|
|
129
|
-
},
|
|
130
|
-
radius: {
|
|
131
|
-
xs: 4,
|
|
132
|
-
sm: 8,
|
|
133
|
-
md: 10,
|
|
134
|
-
lg: 12,
|
|
135
|
-
xl: 16,
|
|
136
|
-
"2xl": 24,
|
|
137
|
-
full: 9999,
|
|
138
|
-
},
|
|
139
|
-
spacing: {
|
|
140
|
-
xs: 4,
|
|
141
|
-
sm: 8,
|
|
142
|
-
md: 12,
|
|
143
|
-
lg: 16,
|
|
144
|
-
xl: 20,
|
|
145
|
-
"2xl": 24,
|
|
146
|
-
"3xl": 32,
|
|
147
|
-
"4xl": 40,
|
|
148
|
-
"5xl": 48,
|
|
149
|
-
"6xl": 64,
|
|
150
|
-
},
|
|
151
|
-
typography: {
|
|
152
|
-
eyebrow: {
|
|
153
|
-
fontSize: 12,
|
|
154
|
-
fontWeight: "700" as const,
|
|
155
|
-
textTransform: "uppercase" as const,
|
|
156
|
-
letterSpacing: 1.2,
|
|
157
|
-
},
|
|
158
|
-
title: {
|
|
159
|
-
fontSize: 32,
|
|
160
|
-
fontWeight: "800" as const,
|
|
161
|
-
lineHeight: 40,
|
|
162
|
-
},
|
|
163
|
-
heading: {
|
|
164
|
-
fontSize: 22,
|
|
165
|
-
fontWeight: "700" as const,
|
|
166
|
-
lineHeight: 28,
|
|
167
|
-
},
|
|
168
|
-
subheading: {
|
|
169
|
-
fontSize: 18,
|
|
170
|
-
fontWeight: "700" as const,
|
|
171
|
-
lineHeight: 24,
|
|
172
|
-
},
|
|
173
|
-
body: {
|
|
174
|
-
fontSize: 15,
|
|
175
|
-
lineHeight: 22,
|
|
176
|
-
},
|
|
177
|
-
label: {
|
|
178
|
-
fontSize: 14,
|
|
179
|
-
fontWeight: "600" as const,
|
|
180
|
-
},
|
|
181
|
-
meta: {
|
|
182
|
-
fontSize: 13,
|
|
183
|
-
lineHeight: 18,
|
|
184
|
-
},
|
|
185
|
-
},
|
|
186
|
-
shadows: {
|
|
187
|
-
sm: {
|
|
188
|
-
shadowColor: tokens.shadow,
|
|
189
|
-
shadowOffset: { width: 0, height: 1 },
|
|
190
|
-
shadowOpacity: 0.1,
|
|
191
|
-
shadowRadius: 2,
|
|
192
|
-
elevation: 2,
|
|
193
|
-
},
|
|
194
|
-
md: {
|
|
195
|
-
shadowColor: tokens.shadow,
|
|
196
|
-
shadowOffset: { width: 0, height: 4 },
|
|
197
|
-
shadowOpacity: 0.2,
|
|
198
|
-
shadowRadius: 8,
|
|
199
|
-
elevation: 4,
|
|
200
|
-
},
|
|
201
|
-
lg: {
|
|
202
|
-
shadowColor: tokens.shadow,
|
|
203
|
-
shadowOffset: { width: 0, height: 12 },
|
|
204
|
-
shadowOpacity: 0.3,
|
|
205
|
-
shadowRadius: 24,
|
|
206
|
-
elevation: 8,
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export type NativeTheme = ReturnType<typeof createNativeTheme>;
|
|
213
|
-
|
|
214
|
-
export const Theme = createNativeTheme();
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import type { NativeParticipantState } from "../ui/native-types";
|
|
2
|
-
|
|
3
|
-
type SpaceParticipant = NativeParticipantState["participants"][number];
|
|
4
|
-
|
|
5
|
-
export const NATIVE_COMPACT_VIEWPORT_MAX_WIDTH = 768;
|
|
6
|
-
export const NATIVE_COMPACT_GRID_PAGE_SIZE = 4;
|
|
7
|
-
|
|
8
|
-
export type SpacePrimaryContent = "grid" | "screen-share" | "screen-share-placeholder" | "whiteboard" | "split";
|
|
9
|
-
|
|
10
|
-
export interface NativeScreenShareStateLike {
|
|
11
|
-
isActive: boolean;
|
|
12
|
-
isLocalSharing: boolean;
|
|
13
|
-
sharerParticipantId: string | null;
|
|
14
|
-
videoTrack: MediaStreamTrack | null;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface ResolveNativeSpaceLayoutOptions {
|
|
18
|
-
participants: readonly SpaceParticipant[];
|
|
19
|
-
localParticipant: SpaceParticipant | null;
|
|
20
|
-
screenShare: NativeScreenShareStateLike;
|
|
21
|
-
isWhiteboardOpen: boolean;
|
|
22
|
-
isCompactViewport: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface ResolvedNativeSpaceLayout {
|
|
26
|
-
allParticipants: readonly SpaceParticipant[];
|
|
27
|
-
gridPages: readonly (readonly SpaceParticipant[])[];
|
|
28
|
-
primaryContent: SpacePrimaryContent;
|
|
29
|
-
isStageMode: boolean;
|
|
30
|
-
isSplit: boolean;
|
|
31
|
-
showScreenShare: boolean;
|
|
32
|
-
isCompactViewport: boolean;
|
|
33
|
-
screenSharer: SpaceParticipant | null;
|
|
34
|
-
screenShareTrack: MediaStreamTrack | null;
|
|
35
|
-
isLocalScreenShare: boolean;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function isSameParticipant(a: SpaceParticipant | null, b: SpaceParticipant | null): boolean {
|
|
39
|
-
return Boolean(a && b && a.id === b.id);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function isRenderableTrack(track: MediaStreamTrack | null | undefined): track is MediaStreamTrack {
|
|
43
|
-
if (!track) {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const readyState = "readyState" in track ? track.readyState : undefined;
|
|
48
|
-
return readyState == null || readyState === "live";
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function normalizeStageParticipants(participants: readonly SpaceParticipant[], localParticipant: SpaceParticipant | null): SpaceParticipant[] {
|
|
52
|
-
const seen = new Set<string>();
|
|
53
|
-
const normalized: SpaceParticipant[] = [];
|
|
54
|
-
|
|
55
|
-
if (localParticipant) {
|
|
56
|
-
normalized.push(localParticipant);
|
|
57
|
-
seen.add(localParticipant.id);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
for (const participant of participants) {
|
|
61
|
-
if (seen.has(participant.id)) {
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
normalized.push(participant);
|
|
66
|
-
seen.add(participant.id);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return normalized;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export function buildCompactParticipantPages(participants: readonly SpaceParticipant[], pageSize = NATIVE_COMPACT_GRID_PAGE_SIZE): SpaceParticipant[][] {
|
|
73
|
-
if (participants.length === 0) {
|
|
74
|
-
return [];
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const pages: SpaceParticipant[][] = [];
|
|
78
|
-
for (let index = 0; index < participants.length; index += pageSize) {
|
|
79
|
-
pages.push(participants.slice(index, index + pageSize));
|
|
80
|
-
}
|
|
81
|
-
return pages;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export function resolveScreenShareSource(
|
|
85
|
-
participants: readonly SpaceParticipant[],
|
|
86
|
-
localParticipant: SpaceParticipant | null,
|
|
87
|
-
screenShare: NativeScreenShareStateLike,
|
|
88
|
-
): {
|
|
89
|
-
screenSharer: SpaceParticipant | null;
|
|
90
|
-
screenShareTrack: MediaStreamTrack | null;
|
|
91
|
-
isLocalScreenShare: boolean;
|
|
92
|
-
showScreenShare: boolean;
|
|
93
|
-
} {
|
|
94
|
-
const sharerById = screenShare.sharerParticipantId ? (participants.find((participant) => participant.id === screenShare.sharerParticipantId) ?? (localParticipant?.id === screenShare.sharerParticipantId ? localParticipant : null)) : null;
|
|
95
|
-
const localIsSharer = screenShare.isLocalSharing || isSameParticipant(sharerById, localParticipant);
|
|
96
|
-
const fallbackTrack = sharerById?.screenShareTrack ?? null;
|
|
97
|
-
const screenShareTrack = isRenderableTrack(screenShare.videoTrack) ? screenShare.videoTrack : isRenderableTrack(fallbackTrack) ? fallbackTrack : null;
|
|
98
|
-
const screenSharer = sharerById ?? (localIsSharer ? localParticipant : null);
|
|
99
|
-
|
|
100
|
-
return {
|
|
101
|
-
screenSharer,
|
|
102
|
-
screenShareTrack,
|
|
103
|
-
isLocalScreenShare: Boolean(localIsSharer && screenShareTrack),
|
|
104
|
-
showScreenShare: Boolean(screenShare.isActive && screenShareTrack),
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export function resolveNativeSpaceLayout({ participants, localParticipant, screenShare, isWhiteboardOpen, isCompactViewport }: ResolveNativeSpaceLayoutOptions): ResolvedNativeSpaceLayout {
|
|
109
|
-
const allParticipants = normalizeStageParticipants(participants, localParticipant);
|
|
110
|
-
const gridPages = buildCompactParticipantPages(allParticipants);
|
|
111
|
-
const { screenSharer, screenShareTrack, isLocalScreenShare, showScreenShare } = resolveScreenShareSource(participants, localParticipant, screenShare);
|
|
112
|
-
const isSplit = !isCompactViewport && isWhiteboardOpen && showScreenShare;
|
|
113
|
-
|
|
114
|
-
let primaryContent: SpacePrimaryContent = "grid";
|
|
115
|
-
if (isSplit) {
|
|
116
|
-
primaryContent = "split";
|
|
117
|
-
} else if (isWhiteboardOpen) {
|
|
118
|
-
primaryContent = "whiteboard";
|
|
119
|
-
} else if (showScreenShare) {
|
|
120
|
-
primaryContent = isLocalScreenShare ? "screen-share-placeholder" : "screen-share";
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return {
|
|
124
|
-
allParticipants,
|
|
125
|
-
gridPages,
|
|
126
|
-
primaryContent,
|
|
127
|
-
isStageMode: primaryContent !== "grid",
|
|
128
|
-
isSplit,
|
|
129
|
-
showScreenShare,
|
|
130
|
-
isCompactViewport,
|
|
131
|
-
screenSharer,
|
|
132
|
-
screenShareTrack,
|
|
133
|
-
isLocalScreenShare,
|
|
134
|
-
};
|
|
135
|
-
}
|