@q9labsai/chalk-react-native 5.2.1 → 5.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +5 -4
- package/dist/index.js +7 -4
- package/dist/status/StatusPage.d.ts +3 -1
- package/embedded/chalk-whiteboard/asset-manifest.json +2 -2
- package/embedded/chalk-whiteboard/renderer.js +473 -473
- package/package.json +4 -4
- package/src/avatar/FaceAvatar.tsx +2 -0
- package/src/components/EmbeddedWhiteboard.tsx +5 -0
- package/src/components/useAndroidCallService.ts +2 -0
- package/src/dock/Dock.tsx +1 -0
- package/src/dock/MoreSheet.tsx +1 -0
- package/src/dock/ReactionBurst.tsx +1 -0
- package/src/dock/audio-route.ts +1 -0
- package/src/frame/CallFrame.tsx +3 -0
- package/src/frame/Chalk.tsx +1 -0
- package/src/frame/back-handler.ts +1 -0
- package/src/frame/measurement.ts +1 -0
- package/src/frame/use-landscape-chrome.ts +1 -0
- package/src/header/Header.tsx +1 -0
- package/src/limbo/Limbo.tsx +2 -0
- package/src/limbo/Veil.tsx +1 -0
- package/src/motion/MovingFrame.tsx +1 -0
- package/src/primitives/BottomSheet.tsx +2 -0
- package/src/primitives/CopyButton.tsx +2 -0
- package/src/primitives/Menu.tsx +5 -0
- package/src/primitives/Switch.tsx +1 -0
- package/src/primitives/TileShell.tsx +1 -0
- package/src/sheets/people-chat/ChatNotices.tsx +1 -0
- package/src/sheets/people-chat/PeopleChatSheet.tsx +1 -0
- package/src/sheets/people-chat/PhotoViewer.tsx +1 -0
- package/src/sheets/people-chat/attachments.tsx +1 -0
- package/src/space-client/create-native-space-client.ts +5 -4
- package/src/stage/ContentTile.tsx +1 -0
- package/src/stage/ParticipantTile.tsx +1 -0
- package/src/stage/Stage.tsx +3 -0
- package/src/stage/stage-view.tsx +1 -0
- package/src/status/CallOverlays.tsx +2 -1
- package/src/status/StatusPage.tsx +13 -4
- package/src/toasts/CallEventToasts.tsx +2 -0
package/dist/client.js
CHANGED
|
@@ -39,7 +39,7 @@ function ensureRandomUUID() {
|
|
|
39
39
|
function createNativeSpaceClient(options) {
|
|
40
40
|
ensureRandomUUID();
|
|
41
41
|
const { storage } = options;
|
|
42
|
-
const
|
|
42
|
+
const syncDialTimeoutMs = options.syncStartupTimeoutMs ?? 3e4;
|
|
43
43
|
const apiBaseURL = options.baseUrl ?? "https://api.chalkmeet.com";
|
|
44
44
|
const syncURL = options.syncUrl ?? defaultSyncURL(apiBaseURL);
|
|
45
45
|
const fetch = globalThis.fetch;
|
|
@@ -62,9 +62,9 @@ function createNativeSpaceClient(options) {
|
|
|
62
62
|
getDisplayMedia: async () => await mediaDevices.getDisplayMedia()
|
|
63
63
|
},
|
|
64
64
|
createMediaClient: (input) => createMediaClient(apiBaseURL, input, fetch),
|
|
65
|
-
createSyncClient: (input) => createSyncClient(syncURL, input, lifecycle, webSocket, storage,
|
|
65
|
+
createSyncClient: (input) => createSyncClient(syncURL, input, lifecycle, webSocket, storage, syncDialTimeoutMs),
|
|
66
66
|
createChatFileTransport: (input) => createChatFileTransport(apiBaseURL, input, fetch),
|
|
67
|
-
createWhiteboardClient: options.whiteboardURL === null ? void 0 : (input) => createWhiteboardClient(apiBaseURL, options.whiteboardURL ?? whiteboardURL(syncURL), input, fetch, lifecycle, webSocket,
|
|
67
|
+
createWhiteboardClient: options.whiteboardURL === null ? void 0 : (input) => createWhiteboardClient(apiBaseURL, options.whiteboardURL ?? whiteboardURL(syncURL), input, fetch, lifecycle, webSocket, syncDialTimeoutMs),
|
|
68
68
|
subscribeForeground: (listener) => {
|
|
69
69
|
const subscription = AppState.addEventListener("change", (state) => {
|
|
70
70
|
if (state === "active") listener();
|
|
@@ -80,7 +80,8 @@ function createNativeSpaceClient(options) {
|
|
|
80
80
|
whiteboardUrl: options.whiteboardURL,
|
|
81
81
|
dependencies,
|
|
82
82
|
fetch,
|
|
83
|
-
|
|
83
|
+
// Keep the 30s native dial allowance, plus time for its replacement.
|
|
84
|
+
syncStartupTimeoutMs: options.syncStartupTimeoutMs ?? 6e4,
|
|
84
85
|
initialMicrophoneEnabled: options.microphone,
|
|
85
86
|
initialCameraEnabled: options.camera
|
|
86
87
|
}
|
package/dist/index.js
CHANGED
|
@@ -2776,6 +2776,7 @@ function Veil({ level }) {
|
|
|
2776
2776
|
|
|
2777
2777
|
// src/status/StatusPage.tsx
|
|
2778
2778
|
import { forwardRef as forwardRef3, memo as memo12, useEffect as useEffect19, useRef as useRef11 } from "react";
|
|
2779
|
+
import { formatSyncConnectDiagnostic, getConnectionFailureDetail } from "@q9labsai/chalk-client";
|
|
2779
2780
|
import { AccessibilityInfo as AccessibilityInfo2, findNodeHandle as findNodeHandle2, Pressable as Pressable14, StyleSheet as StyleSheet20, View as View19 } from "react-native";
|
|
2780
2781
|
import Animated11, { useAnimatedStyle as useAnimatedStyle6 } from "react-native-reanimated";
|
|
2781
2782
|
import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
@@ -2786,7 +2787,7 @@ function pageFor(outcome, callName) {
|
|
|
2786
2787
|
case "ended":
|
|
2787
2788
|
return { title: "The call ended", actions: ["rejoin", "home"] };
|
|
2788
2789
|
case "failed":
|
|
2789
|
-
return { title: `Couldn\u2019t connect to ${callName}`,
|
|
2790
|
+
return { title: `Couldn\u2019t connect to ${callName}`, actions: ["rejoin", "home"], rejoinLabel: "Try again" };
|
|
2790
2791
|
case "removed":
|
|
2791
2792
|
return { title: `You were removed from ${callName}`, detail: "The host removed you from this call.", actions: ["home"] };
|
|
2792
2793
|
case "exited":
|
|
@@ -2795,9 +2796,10 @@ function pageFor(outcome, callName) {
|
|
|
2795
2796
|
return { title: "This call is full", detail: `${callName} has reached 100 people. Ask the host to make room, then try again.`, actions: ["rejoin", "home"], rejoinLabel: "Try again" };
|
|
2796
2797
|
}
|
|
2797
2798
|
}
|
|
2798
|
-
function StatusPage({ outcome, callName, onRejoin, onHome }) {
|
|
2799
|
+
function StatusPage({ outcome, callName, failure, onRejoin, onHome }) {
|
|
2799
2800
|
const { colors } = useTheme();
|
|
2800
2801
|
const page = pageFor(outcome, callName);
|
|
2802
|
+
const detail = outcome === "failed" ? getConnectionFailureDetail({ code: failure?.code, sync: failure?.sync }) : page.detail;
|
|
2801
2803
|
const pageStyle = [styles19.page, { backgroundColor: colors.canvas }];
|
|
2802
2804
|
const ref = useMeasuredRef("status.page", pageStyle);
|
|
2803
2805
|
const firstAction = useRef11(null);
|
|
@@ -2807,7 +2809,8 @@ function StatusPage({ outcome, callName, onRejoin, onHome }) {
|
|
|
2807
2809
|
}, [outcome]);
|
|
2808
2810
|
return /* @__PURE__ */ jsxs20(View19, { accessibilityViewIsModal: true, ref, style: pageStyle, testID: "status.page", children: [
|
|
2809
2811
|
/* @__PURE__ */ jsx29(ChalkText, { accessibilityRole: "header", style: styles19.center, testID: "status.title", variant: "statusTitle", children: page.title }),
|
|
2810
|
-
|
|
2812
|
+
detail ? /* @__PURE__ */ jsx29(ChalkText, { style: styles19.center, testID: "status.detail", tone: "textMuted", children: detail }) : null,
|
|
2813
|
+
outcome === "failed" && failure ? /* @__PURE__ */ jsx29(ChalkText, { style: styles19.center, testID: "status.reference", tone: "textMuted", variant: "caption", children: `Reference: ${failure.code}${failure.sync ? ` ${formatSyncConnectDiagnostic(failure.sync)}` : ""}` }) : null,
|
|
2811
2814
|
/* @__PURE__ */ jsx29(View19, { style: styles19.actions, children: page.actions.map(
|
|
2812
2815
|
(action, index) => action === "rejoin" ? /* @__PURE__ */ jsx29(StatusAction, { icon: "retry", label: page.rejoinLabel ?? "Rejoin", onPress: onRejoin, ref: index === 0 ? firstAction : void 0, testID: "status.rejoin" }, action) : /* @__PURE__ */ jsx29(StatusAction, { icon: "home", label: "Home", onPress: onHome, ref: index === 0 ? firstAction : void 0, testID: "status.home" }, action)
|
|
2813
2816
|
) })
|
|
@@ -2863,7 +2866,7 @@ function CallOverlays({ screen, callName, rejoining, onHold, onRejoin, onHome })
|
|
|
2863
2866
|
/* @__PURE__ */ jsx30(Veil, { level: screen.kind === "status" ? "none" : veil }),
|
|
2864
2867
|
screen.kind === "reconnecting" || screen.kind === "call" && connection.syncHealth === "degraded" ? /* @__PURE__ */ jsx30(View20, { pointerEvents: "none", style: { position: "absolute", top: header.y + header.height + 4, left: layout.insets.left + 16, right: layout.insets.right + 16, alignItems: "center" }, testID: "connection.notice", children: /* @__PURE__ */ jsx30(ChalkText, { accessibilityLiveRegion: "polite", variant: "caption", style: { backgroundColor: colors.surface, borderRadius: 12, paddingHorizontal: 12, paddingVertical: 6 }, children: screen.kind === "reconnecting" ? `Reconnecting\u2026${queuedMessages ? ` ${queuedMessages} messages waiting to send.` : ""}` : "Connection is slow" }) }) : null,
|
|
2865
2868
|
limbo ? /* @__PURE__ */ jsx30(Limbo, { callName, recording: recording2, state: limbo }) : null,
|
|
2866
|
-
screen.kind === "status" ? /* @__PURE__ */ jsx30(StatusPage, { callName, onHome, onRejoin, outcome: screen.outcome }) : null
|
|
2869
|
+
screen.kind === "status" ? /* @__PURE__ */ jsx30(StatusPage, { callName, failure: connection.lastError, onHome, onRejoin, outcome: screen.outcome }) : null
|
|
2867
2870
|
] });
|
|
2868
2871
|
}
|
|
2869
2872
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { type ClientFailure } from "@q9labsai/chalk-client";
|
|
1
2
|
/** The ways a call ends for you (A3 to A7). */
|
|
2
3
|
export type CallOutcome = "left" | "ended" | "failed" | "removed" | "exited" | "full";
|
|
3
4
|
export type StatusPageProps = {
|
|
4
5
|
readonly outcome: CallOutcome;
|
|
5
6
|
readonly callName: string;
|
|
7
|
+
readonly failure?: ClientFailure | null;
|
|
6
8
|
readonly onRejoin: () => void;
|
|
7
9
|
readonly onHome: () => void;
|
|
8
10
|
};
|
|
@@ -10,4 +12,4 @@ export type StatusPageProps = {
|
|
|
10
12
|
* A full-screen status page on the canvas (`.status`): a title, an optional line saying what to do,
|
|
11
13
|
* and the ways forward as round actions with their names under them.
|
|
12
14
|
*/
|
|
13
|
-
export declare function StatusPage({ outcome, callName, onRejoin, onHome }: StatusPageProps): React.JSX.Element;
|
|
15
|
+
export declare function StatusPage({ outcome, callName, failure, onRejoin, onHome }: StatusPageProps): React.JSX.Element;
|
|
@@ -1231,8 +1231,8 @@
|
|
|
1231
1231
|
},
|
|
1232
1232
|
{
|
|
1233
1233
|
"path": "renderer.js",
|
|
1234
|
-
"bytes":
|
|
1235
|
-
"sha256": "
|
|
1234
|
+
"bytes": 9145533,
|
|
1235
|
+
"sha256": "47e69c8b09bb3d90d0792b2f96838ab4c4c11c1f8ef009c5fd92adaea69c8009"
|
|
1236
1236
|
},
|
|
1237
1237
|
{
|
|
1238
1238
|
"path": "THIRD_PARTY_NOTICES.json",
|