@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,309 +0,0 @@
|
|
|
1
|
-
import { useEffect, useId, useRef, useState } from "react";
|
|
2
|
-
import { AccessibilityInfo, Animated, Pressable } from "react-native";
|
|
3
|
-
import Svg, { Defs, Ellipse, G, LinearGradient, Path, Stop, Text as SvgText } from "react-native-svg";
|
|
4
|
-
|
|
5
|
-
const AnimatedG = Animated.createAnimatedComponent(G);
|
|
6
|
-
|
|
7
|
-
export type LogoMotion = "orbit-burst" | "none";
|
|
8
|
-
export type LogoVariant = "mark" | "wordmark";
|
|
9
|
-
|
|
10
|
-
export interface LogoProps {
|
|
11
|
-
readonly accessibilityLabel?: string | null;
|
|
12
|
-
readonly color?: string;
|
|
13
|
-
readonly height?: number;
|
|
14
|
-
readonly motion?: LogoMotion;
|
|
15
|
-
readonly variant?: LogoVariant;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface InteractionState {
|
|
19
|
-
readonly focus: boolean;
|
|
20
|
-
readonly hover: boolean;
|
|
21
|
-
readonly press: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
interface StickAnimationValues {
|
|
25
|
-
readonly rotation: Animated.Value;
|
|
26
|
-
readonly scaleX: Animated.Value;
|
|
27
|
-
readonly scaleY: Animated.Value;
|
|
28
|
-
readonly translateX: Animated.Value;
|
|
29
|
-
readonly translateY: Animated.Value;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
type StickAnimationValuesTuple = readonly [StickAnimationValues, StickAnimationValues, StickAnimationValues, StickAnimationValues];
|
|
33
|
-
|
|
34
|
-
interface StickMotion {
|
|
35
|
-
readonly burstRotation: number;
|
|
36
|
-
readonly burstScale: number;
|
|
37
|
-
readonly burstSettleRotation: number;
|
|
38
|
-
readonly burstSettleScale: number;
|
|
39
|
-
readonly burstSettleX: number;
|
|
40
|
-
readonly burstSettleY: number;
|
|
41
|
-
readonly burstX: number;
|
|
42
|
-
readonly burstY: number;
|
|
43
|
-
readonly orbitRotation: readonly [number, number, number, number];
|
|
44
|
-
readonly orbitX: readonly [number, number, number, number];
|
|
45
|
-
readonly orbitY: readonly [number, number, number, number];
|
|
46
|
-
readonly originX: number;
|
|
47
|
-
readonly originY: number;
|
|
48
|
-
readonly transform: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const STICK_MOTIONS: readonly [StickMotion, StickMotion, StickMotion, StickMotion] = [
|
|
52
|
-
{
|
|
53
|
-
transform: "rotate(-15 20 60)",
|
|
54
|
-
originX: 15,
|
|
55
|
-
originY: 42,
|
|
56
|
-
orbitRotation: [0, -5, 0, 0],
|
|
57
|
-
orbitX: [0, -4, 0, 0],
|
|
58
|
-
orbitY: [0, 3, 0, 0],
|
|
59
|
-
burstRotation: -8,
|
|
60
|
-
burstScale: 1.14,
|
|
61
|
-
burstSettleRotation: 2,
|
|
62
|
-
burstSettleScale: 0.98,
|
|
63
|
-
burstSettleX: -2,
|
|
64
|
-
burstSettleY: 2,
|
|
65
|
-
burstX: -14,
|
|
66
|
-
burstY: -9,
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
transform: "rotate(-8 32 55)",
|
|
70
|
-
originX: 29,
|
|
71
|
-
originY: 38,
|
|
72
|
-
orbitRotation: [0, 4, 0, 0],
|
|
73
|
-
orbitX: [0, 3, 0, 0],
|
|
74
|
-
orbitY: [0, -4, 0, 0],
|
|
75
|
-
burstRotation: -4,
|
|
76
|
-
burstScale: 1.14,
|
|
77
|
-
burstSettleRotation: 1,
|
|
78
|
-
burstSettleScale: 0.98,
|
|
79
|
-
burstSettleX: 1,
|
|
80
|
-
burstSettleY: 1,
|
|
81
|
-
burstX: -4,
|
|
82
|
-
burstY: -14,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
transform: "rotate(12 60 30)",
|
|
86
|
-
originX: 42,
|
|
87
|
-
originY: 32,
|
|
88
|
-
orbitRotation: [0, 5, 0, 0],
|
|
89
|
-
orbitX: [0, 5, 0, 0],
|
|
90
|
-
orbitY: [0, 2, 0, 0],
|
|
91
|
-
burstRotation: 8,
|
|
92
|
-
burstScale: 1.16,
|
|
93
|
-
burstSettleRotation: -2,
|
|
94
|
-
burstSettleScale: 0.98,
|
|
95
|
-
burstSettleX: 2,
|
|
96
|
-
burstSettleY: 1,
|
|
97
|
-
burstX: 14,
|
|
98
|
-
burstY: -6,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
transform: "rotate(5 55 50)",
|
|
102
|
-
originX: 55,
|
|
103
|
-
originY: 50,
|
|
104
|
-
orbitRotation: [0, -4, 0, 0],
|
|
105
|
-
orbitX: [0, -3, 0, 0],
|
|
106
|
-
orbitY: [0, -3, 0, 0],
|
|
107
|
-
burstRotation: 7,
|
|
108
|
-
burstScale: 1.13,
|
|
109
|
-
burstSettleRotation: -1,
|
|
110
|
-
burstSettleScale: 0.98,
|
|
111
|
-
burstSettleX: 1,
|
|
112
|
-
burstSettleY: -1,
|
|
113
|
-
burstX: 11,
|
|
114
|
-
burstY: 12,
|
|
115
|
-
},
|
|
116
|
-
];
|
|
117
|
-
|
|
118
|
-
const ORBIT_DURATION = 4800;
|
|
119
|
-
const BURST_DURATION = 1100;
|
|
120
|
-
const DEFAULT_COLOR = "#1A332B";
|
|
121
|
-
const DEFAULT_HEIGHT = 32;
|
|
122
|
-
const DEFAULT_MOTION: LogoMotion = "orbit-burst";
|
|
123
|
-
const DEFAULT_VARIANT: LogoVariant = "wordmark";
|
|
124
|
-
const WORDMARK_VIEW_BOX = "0 0 200 80";
|
|
125
|
-
const MARK_VIEW_BOX = "0 0 68 80";
|
|
126
|
-
|
|
127
|
-
function createStickAnimationValues(): StickAnimationValuesTuple {
|
|
128
|
-
return [
|
|
129
|
-
{ rotation: new Animated.Value(0), scaleX: new Animated.Value(1), scaleY: new Animated.Value(1), translateX: new Animated.Value(0), translateY: new Animated.Value(0) },
|
|
130
|
-
{ rotation: new Animated.Value(0), scaleX: new Animated.Value(1), scaleY: new Animated.Value(1), translateX: new Animated.Value(0), translateY: new Animated.Value(0) },
|
|
131
|
-
{ rotation: new Animated.Value(0), scaleX: new Animated.Value(1), scaleY: new Animated.Value(1), translateX: new Animated.Value(0), translateY: new Animated.Value(0) },
|
|
132
|
-
{ rotation: new Animated.Value(0), scaleX: new Animated.Value(1), scaleY: new Animated.Value(1), translateX: new Animated.Value(0), translateY: new Animated.Value(0) },
|
|
133
|
-
];
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function createOrbitAnimation(stick: StickAnimationValues, motion: StickMotion, index: number): Animated.CompositeAnimation {
|
|
137
|
-
const keyframes = [
|
|
138
|
-
Animated.parallel([
|
|
139
|
-
Animated.timing(stick.rotation, { duration: ORBIT_DURATION / 2, toValue: motion.orbitRotation[1], useNativeDriver: true }),
|
|
140
|
-
Animated.timing(stick.translateX, { duration: ORBIT_DURATION / 2, toValue: motion.orbitX[1], useNativeDriver: true }),
|
|
141
|
-
Animated.timing(stick.translateY, { duration: ORBIT_DURATION / 2, toValue: motion.orbitY[1], useNativeDriver: true }),
|
|
142
|
-
]),
|
|
143
|
-
Animated.parallel([
|
|
144
|
-
Animated.timing(stick.rotation, { duration: ORBIT_DURATION / 2, toValue: motion.orbitRotation[2], useNativeDriver: true }),
|
|
145
|
-
Animated.timing(stick.translateX, { duration: ORBIT_DURATION / 2, toValue: motion.orbitX[2], useNativeDriver: true }),
|
|
146
|
-
Animated.timing(stick.translateY, { duration: ORBIT_DURATION / 2, toValue: motion.orbitY[2], useNativeDriver: true }),
|
|
147
|
-
]),
|
|
148
|
-
];
|
|
149
|
-
|
|
150
|
-
return Animated.sequence([Animated.delay(index * 90), Animated.loop(Animated.sequence(keyframes))]);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function createBurstAnimation(stick: StickAnimationValues, motion: StickMotion): Animated.CompositeAnimation {
|
|
154
|
-
return Animated.loop(
|
|
155
|
-
Animated.sequence([
|
|
156
|
-
Animated.parallel([
|
|
157
|
-
Animated.timing(stick.rotation, { duration: BURST_DURATION * 0.24, toValue: motion.burstRotation, useNativeDriver: true }),
|
|
158
|
-
Animated.timing(stick.scaleX, { duration: BURST_DURATION * 0.24, toValue: motion.burstScale, useNativeDriver: true }),
|
|
159
|
-
Animated.timing(stick.scaleY, { duration: BURST_DURATION * 0.24, toValue: motion.burstScale, useNativeDriver: true }),
|
|
160
|
-
Animated.timing(stick.translateX, { duration: BURST_DURATION * 0.24, toValue: motion.burstX, useNativeDriver: true }),
|
|
161
|
-
Animated.timing(stick.translateY, { duration: BURST_DURATION * 0.24, toValue: motion.burstY, useNativeDriver: true }),
|
|
162
|
-
]),
|
|
163
|
-
Animated.parallel([
|
|
164
|
-
Animated.timing(stick.rotation, { duration: BURST_DURATION * 0.25, toValue: motion.burstSettleRotation, useNativeDriver: true }),
|
|
165
|
-
Animated.timing(stick.scaleX, { duration: BURST_DURATION * 0.25, toValue: motion.burstSettleScale, useNativeDriver: true }),
|
|
166
|
-
Animated.timing(stick.scaleY, { duration: BURST_DURATION * 0.25, toValue: motion.burstSettleScale, useNativeDriver: true }),
|
|
167
|
-
Animated.timing(stick.translateX, { duration: BURST_DURATION * 0.25, toValue: motion.burstSettleX, useNativeDriver: true }),
|
|
168
|
-
Animated.timing(stick.translateY, { duration: BURST_DURATION * 0.25, toValue: motion.burstSettleY, useNativeDriver: true }),
|
|
169
|
-
]),
|
|
170
|
-
Animated.parallel([
|
|
171
|
-
Animated.timing(stick.rotation, { duration: BURST_DURATION * 0.33, toValue: 0, useNativeDriver: true }),
|
|
172
|
-
Animated.timing(stick.scaleX, { duration: BURST_DURATION * 0.33, toValue: 1, useNativeDriver: true }),
|
|
173
|
-
Animated.timing(stick.scaleY, { duration: BURST_DURATION * 0.33, toValue: 1, useNativeDriver: true }),
|
|
174
|
-
Animated.timing(stick.translateX, { duration: BURST_DURATION * 0.33, toValue: 0, useNativeDriver: true }),
|
|
175
|
-
Animated.timing(stick.translateY, { duration: BURST_DURATION * 0.33, toValue: 0, useNativeDriver: true }),
|
|
176
|
-
]),
|
|
177
|
-
]),
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
function resetStickAnimationValues(values: readonly StickAnimationValues[]): void {
|
|
182
|
-
for (const stick of values) {
|
|
183
|
-
stick.rotation.stopAnimation();
|
|
184
|
-
stick.scaleX.stopAnimation();
|
|
185
|
-
stick.scaleY.stopAnimation();
|
|
186
|
-
stick.translateX.stopAnimation();
|
|
187
|
-
stick.translateY.stopAnimation();
|
|
188
|
-
stick.rotation.setValue(0);
|
|
189
|
-
stick.scaleX.setValue(1);
|
|
190
|
-
stick.scaleY.setValue(1);
|
|
191
|
-
stick.translateX.setValue(0);
|
|
192
|
-
stick.translateY.setValue(0);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export function Logo({ accessibilityLabel = "Chalk", color = DEFAULT_COLOR, height = DEFAULT_HEIGHT, motion = DEFAULT_MOTION, variant = DEFAULT_VARIANT }: LogoProps): React.JSX.Element {
|
|
197
|
-
const [reducedMotion, setReducedMotion] = useState<boolean | null>(null);
|
|
198
|
-
const [interaction, setInteraction] = useState<InteractionState>({ focus: false, hover: false, press: false });
|
|
199
|
-
const idPrefix = `chalk-logo-${useId().replace(/[^a-zA-Z0-9_-]/gu, "")}`;
|
|
200
|
-
const animationValues = useRef<StickAnimationValuesTuple | null>(null);
|
|
201
|
-
if (animationValues.current === null) {
|
|
202
|
-
animationValues.current = createStickAnimationValues();
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
const sticks = animationValues.current;
|
|
206
|
-
const interactionActive = interaction.focus || interaction.hover || interaction.press;
|
|
207
|
-
const animate = motion === "orbit-burst" && reducedMotion === false;
|
|
208
|
-
|
|
209
|
-
useEffect(() => {
|
|
210
|
-
let cancelled = false;
|
|
211
|
-
const subscription = AccessibilityInfo.addEventListener("reduceMotionChanged", setReducedMotion);
|
|
212
|
-
|
|
213
|
-
void AccessibilityInfo.isReduceMotionEnabled().then((enabled) => {
|
|
214
|
-
if (!cancelled) {
|
|
215
|
-
setReducedMotion(enabled);
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
return () => {
|
|
220
|
-
cancelled = true;
|
|
221
|
-
subscription.remove();
|
|
222
|
-
};
|
|
223
|
-
}, []);
|
|
224
|
-
|
|
225
|
-
useEffect(() => {
|
|
226
|
-
if (!animate) {
|
|
227
|
-
resetStickAnimationValues(sticks);
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
const animations = interactionActive
|
|
232
|
-
? [createBurstAnimation(sticks[0], STICK_MOTIONS[0]), createBurstAnimation(sticks[1], STICK_MOTIONS[1]), createBurstAnimation(sticks[2], STICK_MOTIONS[2]), createBurstAnimation(sticks[3], STICK_MOTIONS[3])]
|
|
233
|
-
: [createOrbitAnimation(sticks[0], STICK_MOTIONS[0], 0), createOrbitAnimation(sticks[1], STICK_MOTIONS[1], 1), createOrbitAnimation(sticks[2], STICK_MOTIONS[2], 2), createOrbitAnimation(sticks[3], STICK_MOTIONS[3], 3)];
|
|
234
|
-
const animation = Animated.parallel(animations);
|
|
235
|
-
animation.start();
|
|
236
|
-
|
|
237
|
-
return () => {
|
|
238
|
-
animation.stop();
|
|
239
|
-
};
|
|
240
|
-
}, [animate, interactionActive, sticks]);
|
|
241
|
-
|
|
242
|
-
const setInteractionFlag = (key: keyof InteractionState, value: boolean): void => {
|
|
243
|
-
setInteraction((current) => (current[key] === value ? current : { ...current, [key]: value }));
|
|
244
|
-
};
|
|
245
|
-
const width = variant === "wordmark" ? height * 2.5 : height * (68 / 80);
|
|
246
|
-
const viewBox = variant === "wordmark" ? WORDMARK_VIEW_BOX : MARK_VIEW_BOX;
|
|
247
|
-
const accessible = accessibilityLabel !== null;
|
|
248
|
-
|
|
249
|
-
return (
|
|
250
|
-
<Pressable
|
|
251
|
-
accessible={false}
|
|
252
|
-
onBlur={() => setInteractionFlag("focus", false)}
|
|
253
|
-
onFocus={() => setInteractionFlag("focus", true)}
|
|
254
|
-
onHoverIn={() => setInteractionFlag("hover", true)}
|
|
255
|
-
onHoverOut={() => setInteractionFlag("hover", false)}
|
|
256
|
-
onPressIn={() => setInteractionFlag("press", true)}
|
|
257
|
-
onPressOut={() => setInteractionFlag("press", false)}
|
|
258
|
-
>
|
|
259
|
-
<Svg accessibilityLabel={accessible ? (accessibilityLabel ?? undefined) : undefined} accessible={accessible} color={color} fill="none" focusable={false} height={height} viewBox={viewBox} width={width}>
|
|
260
|
-
<Defs>
|
|
261
|
-
<LinearGradient id={`${idPrefix}-green`} x1="0%" x2="100%" y1="0%" y2="0%">
|
|
262
|
-
<Stop offset="0%" stopColor="#C5E5C0" />
|
|
263
|
-
<Stop offset="100%" stopColor="#80B879" />
|
|
264
|
-
</LinearGradient>
|
|
265
|
-
<LinearGradient id={`${idPrefix}-yellow`} x1="0%" x2="100%" y1="0%" y2="0%">
|
|
266
|
-
<Stop offset="0%" stopColor="#FCEAB3" />
|
|
267
|
-
<Stop offset="100%" stopColor="#D9B641" />
|
|
268
|
-
</LinearGradient>
|
|
269
|
-
<LinearGradient id={`${idPrefix}-blue`} x1="0%" x2="100%" y1="0%" y2="0%">
|
|
270
|
-
<Stop offset="0%" stopColor="#B2E0F0" />
|
|
271
|
-
<Stop offset="100%" stopColor="#55AAC9" />
|
|
272
|
-
</LinearGradient>
|
|
273
|
-
<LinearGradient id={`${idPrefix}-pink`} x1="0%" x2="100%" y1="0%" y2="0%">
|
|
274
|
-
<Stop offset="0%" stopColor="#F8CACA" />
|
|
275
|
-
<Stop offset="100%" stopColor="#D67B7B" />
|
|
276
|
-
</LinearGradient>
|
|
277
|
-
</Defs>
|
|
278
|
-
|
|
279
|
-
<G transform="translate(2, 2) scale(0.95)">
|
|
280
|
-
<AnimatedG originX={STICK_MOTIONS[0].originX} originY={STICK_MOTIONS[0].originY} rotation={sticks[0].rotation} scaleX={sticks[0].scaleX} scaleY={sticks[0].scaleY} transform={STICK_MOTIONS[0].transform} translateX={sticks[0].translateX} translateY={sticks[0].translateY}>
|
|
281
|
-
<Path d="M9,20 L21,20 L22,63 A7,7 0 0 1 8,63 Z" fill={`url(#${idPrefix}-green)`} />
|
|
282
|
-
<Ellipse cx="15" cy="20" fill="#D8ECD4" rx="6" ry="2.5" />
|
|
283
|
-
</AnimatedG>
|
|
284
|
-
|
|
285
|
-
<AnimatedG originX={STICK_MOTIONS[1].originX} originY={STICK_MOTIONS[1].originY} rotation={sticks[1].rotation} scaleX={sticks[1].scaleX} scaleY={sticks[1].scaleY} transform={STICK_MOTIONS[1].transform} translateX={sticks[1].translateX} translateY={sticks[1].translateY}>
|
|
286
|
-
<Path d="M23,15 L35,15 L36,60 A7,7 0 0 1 22,60 Z" fill={`url(#${idPrefix}-yellow)`} />
|
|
287
|
-
<Ellipse cx="29" cy="15" fill="#FEF3D1" rx="6" ry="2.5" />
|
|
288
|
-
</AnimatedG>
|
|
289
|
-
|
|
290
|
-
<AnimatedG originX={STICK_MOTIONS[2].originX} originY={STICK_MOTIONS[2].originY} rotation={sticks[2].rotation} scaleX={sticks[2].scaleX} scaleY={sticks[2].scaleY} transform={STICK_MOTIONS[2].transform} translateX={sticks[2].translateX} translateY={sticks[2].translateY}>
|
|
291
|
-
<Path d="M36,8 L48,8 L49,56 A7,7 0 0 1 35,56 Z" fill={`url(#${idPrefix}-blue)`} />
|
|
292
|
-
<Ellipse cx="42" cy="8" fill="#D0EDF8" rx="6" ry="2.5" />
|
|
293
|
-
</AnimatedG>
|
|
294
|
-
|
|
295
|
-
<AnimatedG originX={STICK_MOTIONS[3].originX} originY={STICK_MOTIONS[3].originY} rotation={sticks[3].rotation} scaleX={sticks[3].scaleX} scaleY={sticks[3].scaleY} transform={STICK_MOTIONS[3].transform} translateX={sticks[3].translateX} translateY={sticks[3].translateY}>
|
|
296
|
-
<Path d="M49,70 L61,70 L62,29 A7,7 0 0 0 48,29 Z" fill={`url(#${idPrefix}-pink)`} />
|
|
297
|
-
<Ellipse cx="55" cy="70" fill="#FBE4E4" rx="6" ry="2.5" />
|
|
298
|
-
</AnimatedG>
|
|
299
|
-
</G>
|
|
300
|
-
|
|
301
|
-
{variant === "wordmark" ? (
|
|
302
|
-
<SvgText fill="currentColor" fontFamily="system-ui, -apple-system, BlinkMacSystemFont, sans-serif" fontSize="38" fontWeight="600" letterSpacing="-0.02em" x="90" y="52">
|
|
303
|
-
chalk
|
|
304
|
-
</SvgText>
|
|
305
|
-
) : null}
|
|
306
|
-
</Svg>
|
|
307
|
-
</Pressable>
|
|
308
|
-
);
|
|
309
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export interface StoppableAnimation {
|
|
2
|
-
start(): void;
|
|
3
|
-
stop(): void;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export type AnimationRefCallback<Node> = (node: Node | null) => void;
|
|
7
|
-
|
|
8
|
-
export function createAnimationRefController<Node>(createAnimations: () => readonly StoppableAnimation[]): AnimationRefCallback<Node> {
|
|
9
|
-
let attached = false;
|
|
10
|
-
let animations: readonly StoppableAnimation[] = [];
|
|
11
|
-
|
|
12
|
-
return (node) => {
|
|
13
|
-
if (node === null) {
|
|
14
|
-
if (!attached) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
attached = false;
|
|
19
|
-
for (const animation of animations) {
|
|
20
|
-
animation.stop();
|
|
21
|
-
}
|
|
22
|
-
animations = [];
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (attached) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
attached = true;
|
|
31
|
-
animations = createAnimations();
|
|
32
|
-
for (const animation of animations) {
|
|
33
|
-
animation.start();
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface NativeChatViewport {
|
|
2
|
-
readonly contentHeight: number;
|
|
3
|
-
readonly viewportHeight: number;
|
|
4
|
-
readonly scrollOffset: number;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
const LATEST_MESSAGE_VISIBILITY_TOLERANCE = 8;
|
|
8
|
-
|
|
9
|
-
export function isLatestChatMessageVisible({ contentHeight, viewportHeight, scrollOffset }: NativeChatViewport): boolean {
|
|
10
|
-
if (contentHeight <= 0 || viewportHeight <= 0) return false;
|
|
11
|
-
return scrollOffset + viewportHeight >= contentHeight - LATEST_MESSAGE_VISIBILITY_TOLERANCE;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function formatChatAttachmentSize(byteLength: number): string {
|
|
15
|
-
if (byteLength < 1024) return `${byteLength} B`;
|
|
16
|
-
if (byteLength < 1024 * 1024) return `${formatUnit(byteLength / 1024)} KB`;
|
|
17
|
-
if (byteLength < 1024 * 1024 * 1024) return `${formatUnit(byteLength / (1024 * 1024))} MB`;
|
|
18
|
-
return `${formatUnit(byteLength / (1024 * 1024 * 1024))} GB`;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function formatUnit(value: number): string {
|
|
22
|
-
return value >= 10 ? value.toFixed(0) : value.toFixed(1);
|
|
23
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import type { EntranceViewSettings } from "../EntranceView";
|
|
2
|
-
|
|
3
|
-
export interface EntranceControllerSnapshot {
|
|
4
|
-
readonly displayName: string;
|
|
5
|
-
readonly audioEnabled: boolean;
|
|
6
|
-
readonly videoEnabled: boolean;
|
|
7
|
-
readonly isSubmitting: boolean;
|
|
8
|
-
readonly isInputFocused: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface EntranceControllerStoreOptions {
|
|
12
|
-
readonly displayName: string;
|
|
13
|
-
readonly initialAudioEnabled: boolean;
|
|
14
|
-
readonly initialVideoEnabled: boolean;
|
|
15
|
-
readonly simulatorMediaDisabled: boolean;
|
|
16
|
-
readonly joinDisabled: boolean;
|
|
17
|
-
readonly onJoin: (settings: EntranceViewSettings) => void;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface EntranceControllerStoreUpdate {
|
|
21
|
-
readonly simulatorMediaDisabled: boolean;
|
|
22
|
-
readonly joinDisabled: boolean;
|
|
23
|
-
readonly onJoin: (settings: EntranceViewSettings) => void;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export class EntranceControllerStore {
|
|
27
|
-
#snapshot: EntranceControllerSnapshot;
|
|
28
|
-
#listeners = new Set<() => void>();
|
|
29
|
-
#simulatorMediaDisabled: boolean;
|
|
30
|
-
#joinDisabled: boolean;
|
|
31
|
-
#submitLatch = false;
|
|
32
|
-
#onJoin: EntranceControllerStoreOptions["onJoin"];
|
|
33
|
-
|
|
34
|
-
constructor({ displayName, initialAudioEnabled, initialVideoEnabled, simulatorMediaDisabled, joinDisabled, onJoin }: EntranceControllerStoreOptions) {
|
|
35
|
-
this.#simulatorMediaDisabled = simulatorMediaDisabled;
|
|
36
|
-
this.#joinDisabled = joinDisabled;
|
|
37
|
-
this.#onJoin = onJoin;
|
|
38
|
-
this.#snapshot = {
|
|
39
|
-
displayName,
|
|
40
|
-
audioEnabled: initialAudioEnabled && !simulatorMediaDisabled,
|
|
41
|
-
videoEnabled: initialVideoEnabled && !simulatorMediaDisabled,
|
|
42
|
-
isSubmitting: false,
|
|
43
|
-
isInputFocused: false,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
readonly getSnapshot = (): EntranceControllerSnapshot => this.#snapshot;
|
|
48
|
-
|
|
49
|
-
readonly subscribe = (listener: () => void): (() => void) => {
|
|
50
|
-
this.#listeners.add(listener);
|
|
51
|
-
return () => {
|
|
52
|
-
this.#listeners.delete(listener);
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
readonly update = ({ simulatorMediaDisabled, joinDisabled, onJoin }: EntranceControllerStoreUpdate): void => {
|
|
57
|
-
this.#onJoin = onJoin;
|
|
58
|
-
|
|
59
|
-
if (!this.#simulatorMediaDisabled && simulatorMediaDisabled) {
|
|
60
|
-
this.#update({ audioEnabled: false, videoEnabled: false });
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (this.#joinDisabled && !joinDisabled) {
|
|
64
|
-
this.#submitLatch = false;
|
|
65
|
-
this.#update({ isSubmitting: false });
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
this.#simulatorMediaDisabled = simulatorMediaDisabled;
|
|
69
|
-
this.#joinDisabled = joinDisabled;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
readonly setDisplayName = (displayName: string): void => {
|
|
73
|
-
this.#update({ displayName });
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
readonly setInputFocused = (isInputFocused: boolean): void => {
|
|
77
|
-
this.#update({ isInputFocused });
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
readonly toggleAudio = (): void => {
|
|
81
|
-
if (this.#simulatorMediaDisabled) return;
|
|
82
|
-
this.#update({ audioEnabled: !this.#snapshot.audioEnabled });
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
readonly toggleVideo = (): void => {
|
|
86
|
-
if (this.#simulatorMediaDisabled) return;
|
|
87
|
-
this.#update({ videoEnabled: !this.#snapshot.videoEnabled });
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
readonly handleJoin = (): void => {
|
|
91
|
-
const displayName = this.#snapshot.displayName.trim();
|
|
92
|
-
if (!displayName || this.#joinDisabled || this.#snapshot.isSubmitting || this.#submitLatch) return;
|
|
93
|
-
|
|
94
|
-
this.#submitLatch = true;
|
|
95
|
-
this.#update({ isSubmitting: true });
|
|
96
|
-
this.#onJoin({
|
|
97
|
-
displayName,
|
|
98
|
-
microphoneEnabled: this.#snapshot.audioEnabled,
|
|
99
|
-
cameraEnabled: this.#snapshot.videoEnabled,
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
#update(next: Partial<EntranceControllerSnapshot>): void {
|
|
104
|
-
const snapshot = { ...this.#snapshot, ...next };
|
|
105
|
-
if (snapshot.displayName === this.#snapshot.displayName && snapshot.audioEnabled === this.#snapshot.audioEnabled && snapshot.videoEnabled === this.#snapshot.videoEnabled && snapshot.isSubmitting === this.#snapshot.isSubmitting && snapshot.isInputFocused === this.#snapshot.isInputFocused) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
this.#snapshot = snapshot;
|
|
110
|
-
for (const listener of this.#listeners) listener();
|
|
111
|
-
}
|
|
112
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { useMemo, useSyncExternalStore } from "react";
|
|
2
|
-
import { useEntrancePreview } from "../../hooks/useEntrancePreview";
|
|
3
|
-
import { isIosSimulator } from "../../utils/ios-simulator";
|
|
4
|
-
import type { EntranceViewProps } from "../EntranceView";
|
|
5
|
-
import { EntranceControllerStore } from "./entrance-controller-store";
|
|
6
|
-
|
|
7
|
-
export interface UseEntranceControllerResult {
|
|
8
|
-
displayName: string;
|
|
9
|
-
audioEnabled: boolean;
|
|
10
|
-
videoEnabled: boolean;
|
|
11
|
-
isSubmitting: boolean;
|
|
12
|
-
isInputFocused: boolean;
|
|
13
|
-
previewError: string | null;
|
|
14
|
-
previewStream: ReturnType<typeof useEntrancePreview>["previewStream"];
|
|
15
|
-
simulatorMediaDisabled: boolean;
|
|
16
|
-
setDisplayName: (value: string) => void;
|
|
17
|
-
setInputFocused: (focused: boolean) => void;
|
|
18
|
-
toggleAudio: () => void;
|
|
19
|
-
toggleVideo: () => void;
|
|
20
|
-
handleJoin: () => void;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function useEntranceController({ displayName = "", initialAudioEnabled = false, initialVideoEnabled = false, joinDisabled = false, onJoin }: Pick<EntranceViewProps, "displayName" | "initialAudioEnabled" | "initialVideoEnabled" | "joinDisabled" | "onJoin">): UseEntranceControllerResult {
|
|
24
|
-
const simulatorMediaDisabled = isIosSimulator();
|
|
25
|
-
const store = useMemo(
|
|
26
|
-
() =>
|
|
27
|
-
new EntranceControllerStore({
|
|
28
|
-
displayName,
|
|
29
|
-
initialAudioEnabled,
|
|
30
|
-
initialVideoEnabled,
|
|
31
|
-
simulatorMediaDisabled,
|
|
32
|
-
joinDisabled,
|
|
33
|
-
onJoin,
|
|
34
|
-
}),
|
|
35
|
-
[],
|
|
36
|
-
);
|
|
37
|
-
store.update({
|
|
38
|
-
simulatorMediaDisabled,
|
|
39
|
-
joinDisabled,
|
|
40
|
-
onJoin,
|
|
41
|
-
});
|
|
42
|
-
const snapshot = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
|
|
43
|
-
const { previewError, previewStream } = useEntrancePreview(snapshot.videoEnabled);
|
|
44
|
-
|
|
45
|
-
return {
|
|
46
|
-
displayName: snapshot.displayName,
|
|
47
|
-
audioEnabled: snapshot.audioEnabled,
|
|
48
|
-
videoEnabled: snapshot.videoEnabled,
|
|
49
|
-
isSubmitting: snapshot.isSubmitting,
|
|
50
|
-
isInputFocused: snapshot.isInputFocused,
|
|
51
|
-
previewError,
|
|
52
|
-
previewStream,
|
|
53
|
-
simulatorMediaDisabled,
|
|
54
|
-
setDisplayName: store.setDisplayName,
|
|
55
|
-
setInputFocused: store.setInputFocused,
|
|
56
|
-
toggleAudio: store.toggleAudio,
|
|
57
|
-
toggleVideo: store.toggleVideo,
|
|
58
|
-
handleJoin: store.handleJoin,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Animated, Easing } from "react-native";
|
|
2
|
-
import { createAnimationRefController, type AnimationRefCallback } from "./native-animation-controller";
|
|
3
|
-
|
|
4
|
-
export interface NativeJoiningLoadingAnimation {
|
|
5
|
-
readonly pulseAnim: Animated.Value;
|
|
6
|
-
readonly fadeAnim: Animated.Value;
|
|
7
|
-
readonly ref: AnimationRefCallback<unknown>;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function createNativeJoiningLoadingAnimation(): NativeJoiningLoadingAnimation {
|
|
11
|
-
const pulseAnim = new Animated.Value(1);
|
|
12
|
-
const fadeAnim = new Animated.Value(0);
|
|
13
|
-
const pulseAnimation = Animated.sequence([Animated.timing(pulseAnim, { toValue: 1.035, duration: 180, easing: Easing.out(Easing.cubic), useNativeDriver: true }), Animated.timing(pulseAnim, { toValue: 1, duration: 220, easing: Easing.out(Easing.cubic), useNativeDriver: true })]);
|
|
14
|
-
const fadeAnimation = Animated.timing(fadeAnim, {
|
|
15
|
-
toValue: 1,
|
|
16
|
-
duration: 280,
|
|
17
|
-
easing: Easing.out(Easing.cubic),
|
|
18
|
-
useNativeDriver: true,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
return {
|
|
22
|
-
pulseAnim,
|
|
23
|
-
fadeAnim,
|
|
24
|
-
ref: createAnimationRefController(() => [pulseAnimation, fadeAnimation]),
|
|
25
|
-
};
|
|
26
|
-
}
|