@q9labsai/chalk-react 5.3.0 → 5.4.0

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.
@@ -36,7 +36,7 @@ import {
36
36
  useRecording,
37
37
  useSpaceClient,
38
38
  useWhiteboard
39
- } from "./chunk-RCHBFOCR.js";
39
+ } from "./chunk-LYZ7EBFF.js";
40
40
  import {
41
41
  WHITEBOARD_ITEM_ID,
42
42
  screenShareItemId
@@ -1427,6 +1427,7 @@ function TileShell({ label, accentColor, pinned = false, ring = false, speaking
1427
1427
  }
1428
1428
 
1429
1429
  // src/components/participant-tile/useVideoTrack.ts
1430
+ import { setVideoRenderSize } from "@q9labsai/chalk-client";
1430
1431
  import { useEffect as useEffect6, useRef as useRef5, useState as useState10 } from "react";
1431
1432
  function useVideoTrack(videoRef, track, enabled) {
1432
1433
  const [status, setStatus] = useState10("idle");
@@ -1453,11 +1454,18 @@ function useVideoTrack(videoRef, track, enabled) {
1453
1454
  track.addEventListener("mute", onMute);
1454
1455
  track.addEventListener("unmute", onUnmute);
1455
1456
  track.addEventListener("ended", onEnded);
1457
+ const sizeObserver = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(([entry]) => {
1458
+ const scale = window.devicePixelRatio || 1;
1459
+ if (entry) setVideoRenderSize(track, { width: entry.contentRect.width * scale, height: entry.contentRect.height * scale });
1460
+ });
1461
+ sizeObserver?.observe(video);
1456
1462
  video.play().catch((cause) => {
1457
1463
  if (cause instanceof DOMException && cause.name === "AbortError") return;
1458
1464
  setStatus("error");
1459
1465
  });
1460
1466
  return () => {
1467
+ sizeObserver?.disconnect();
1468
+ setVideoRenderSize(track, null);
1461
1469
  video.removeEventListener("loadeddata", onLoaded);
1462
1470
  track.removeEventListener("mute", onMute);
1463
1471
  track.removeEventListener("unmute", onUnmute);
@@ -6114,6 +6122,7 @@ function LayoutMenu({ layout, onLayoutChange }) {
6114
6122
 
6115
6123
  // src/components/space-header/CallDetails.tsx
6116
6124
  import { Dialog as Dialog2 } from "@base-ui/react/dialog";
6125
+ import { currentSessionId } from "@q9labsai/chalk-client";
6117
6126
  import { useRef as useRef16, useState as useState28 } from "react";
6118
6127
 
6119
6128
  // src/components/space-header/share-qr.ts
@@ -6410,6 +6419,7 @@ function CallDetails({
6410
6419
  const link = shareUrl ?? (typeof location === "undefined" ? "" : location.href);
6411
6420
  const qr = shareQr(link);
6412
6421
  const [details, setDetails] = useState28(false);
6422
+ const sessionId = currentSessionId();
6413
6423
  return /* @__PURE__ */ jsxs32("div", { className: "chalk-details", children: [
6414
6424
  /* @__PURE__ */ jsxs32("div", { className: "chalk-shell-details-heading", children: [
6415
6425
  /* @__PURE__ */ jsx51("h2", { children: spaceName }),
@@ -6476,7 +6486,14 @@ function CallDetails({
6476
6486
  "Report a problem",
6477
6487
  /* @__PURE__ */ jsx51(ShellIcon, { name: "right", size: 18 })
6478
6488
  ] }) : null
6479
- ] })
6489
+ ] }),
6490
+ sessionId ? /* @__PURE__ */ jsxs32("section", { className: "chalk-shell-section", children: [
6491
+ /* @__PURE__ */ jsx51("h3", { className: "chalk-shell-label", children: "Session ID" }),
6492
+ /* @__PURE__ */ jsxs32("div", { className: "chalk-shell-link", children: [
6493
+ /* @__PURE__ */ jsx51("span", { dir: "ltr", children: sessionId }),
6494
+ /* @__PURE__ */ jsx51(ChalkCopyButton, { text: sessionId, label: "Copy session ID" })
6495
+ ] })
6496
+ ] }) : null
6480
6497
  ] });
6481
6498
  }
6482
6499
 
@@ -5,7 +5,7 @@ import {
5
5
  RecordingHistoryPanel,
6
6
  RecordingSpaceView,
7
7
  RecordingWhiteboardView
8
- } from "../chunk-HJVAN33K.js";
8
+ } from "../chunk-K5DV2OTY.js";
9
9
  import {
10
10
  loadRecordingWhiteboardFiles,
11
11
  parseRecordingWhiteboardStateV1,
@@ -47,7 +47,7 @@ import {
47
47
  ReactionsOverlay,
48
48
  ScreenShareView,
49
49
  Stage
50
- } from "../chunk-RCHBFOCR.js";
50
+ } from "../chunk-LYZ7EBFF.js";
51
51
  import {
52
52
  buildStageItems
53
53
  } from "../chunk-ES7AECAD.js";
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  RecordingHistoryPanel,
6
6
  RecordingSpaceView,
7
7
  RecordingWhiteboardView
8
- } from "./chunk-HJVAN33K.js";
8
+ } from "./chunk-K5DV2OTY.js";
9
9
  import {
10
10
  loadRecordingWhiteboardFiles,
11
11
  parseRecordingWhiteboardStateV1,
@@ -59,7 +59,7 @@ import {
59
59
  useSelf,
60
60
  useSpaceClient,
61
61
  useWhiteboard
62
- } from "./chunk-RCHBFOCR.js";
62
+ } from "./chunk-LYZ7EBFF.js";
63
63
  import "./chunk-ES7AECAD.js";
64
64
  import "./chunk-4U7QZC72.js";
65
65
 
@@ -6,7 +6,7 @@ import {
6
6
  SpaceView,
7
7
  ToastStack,
8
8
  WhiteboardView
9
- } from "../chunk-RCHBFOCR.js";
9
+ } from "../chunk-LYZ7EBFF.js";
10
10
  import "../chunk-ES7AECAD.js";
11
11
  import "../chunk-4U7QZC72.js";
12
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@q9labsai/chalk-react",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -75,10 +75,10 @@
75
75
  "@base-ui/react": "^1.7.0",
76
76
  "@hugeicons/core-free-icons": "^4.2.3",
77
77
  "@hugeicons/react": "^1.1.9",
78
- "@q9labsai/chalk-client": "^5.3.0",
79
- "@q9labsai/chalk-ui": "^5.3.0",
80
- "@q9labsai/chalk-whiteboard": "^5.3.0",
81
- "@q9labsai/facehash": "^5.3.0",
78
+ "@q9labsai/chalk-client": "^5.4.0",
79
+ "@q9labsai/chalk-ui": "^5.4.0",
80
+ "@q9labsai/chalk-whiteboard": "^5.4.0",
81
+ "@q9labsai/facehash": "^5.4.0",
82
82
  "@q9labsai/recording-presentation": "^0.1.1",
83
83
  "class-variance-authority": "^0.7.1",
84
84
  "clsx": "^2.1.1",