@q9labsai/chalk-react 5.2.5 → 5.2.6
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/{chunk-6AUMKXPU.js → chunk-26BQBCEI.js} +12 -10
- package/dist/{chunk-WRKIKIXF.js → chunk-JK4JXOGC.js} +374 -353
- package/dist/components/control-bar/command-failure.d.ts +6 -6
- package/dist/components/index.js +2 -2
- package/dist/index.js +2 -2
- package/dist/test-support/index.js +1 -1
- package/package.json +5 -5
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
useRecording,
|
|
37
37
|
useSpaceClient,
|
|
38
38
|
useWhiteboard
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-JK4JXOGC.js";
|
|
40
40
|
import {
|
|
41
41
|
WHITEBOARD_ITEM_ID,
|
|
42
42
|
screenShareItemId
|
|
@@ -262,15 +262,21 @@ function SpaceExperience(props) {
|
|
|
262
262
|
const previousStatus = useRef(connection.status);
|
|
263
263
|
const hasObservedStatus = useRef(false);
|
|
264
264
|
const autoJoinAttempted = useRef(false);
|
|
265
|
-
const previousClient =
|
|
265
|
+
const [previousClient, setPreviousClient] = useState2(client);
|
|
266
266
|
const [joinError, setJoinError] = useState2(null);
|
|
267
267
|
const [retryPending, setRetryPending] = useState2(false);
|
|
268
|
-
const [episodeEnded, setEpisodeEnded] = useState2(
|
|
268
|
+
const [episodeEnded, setEpisodeEnded] = useState2(false);
|
|
269
269
|
const [handledTerminal, setHandledTerminal] = useState2(void 0);
|
|
270
|
-
|
|
270
|
+
const [previousTerminal, setPreviousTerminal] = useState2(props.terminalState);
|
|
271
|
+
if (previousTerminal !== props.terminalState) {
|
|
272
|
+
setPreviousTerminal(props.terminalState);
|
|
273
|
+
setHandledTerminal(void 0);
|
|
274
|
+
}
|
|
271
275
|
const spaceName = props.spaceName ?? props.space ?? "Space";
|
|
272
|
-
if (previousClient
|
|
273
|
-
|
|
276
|
+
if (previousClient !== client) {
|
|
277
|
+
setPreviousClient(client);
|
|
278
|
+
setJoinError(null);
|
|
279
|
+
setEpisodeEnded(false);
|
|
274
280
|
previousStatus.current = connection.status;
|
|
275
281
|
hasObservedStatus.current = false;
|
|
276
282
|
autoJoinAttempted.current = false;
|
|
@@ -293,10 +299,6 @@ function SpaceExperience(props) {
|
|
|
293
299
|
setRetryPending(true);
|
|
294
300
|
void join(defaultJoinOptions(props)).finally(() => setRetryPending(false));
|
|
295
301
|
}, [join, props]);
|
|
296
|
-
useEffect2(() => setJoinError(null), [client]);
|
|
297
|
-
useEffect2(() => {
|
|
298
|
-
setEpisodeEnded(false);
|
|
299
|
-
}, [client]);
|
|
300
302
|
useEffect2(
|
|
301
303
|
() => client.on("episodeEnded", () => {
|
|
302
304
|
setEpisodeEnded(true);
|