@mgamadeus/ddd-design-studio 0.4.0 → 0.4.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.
@@ -28,7 +28,7 @@ import {
28
28
  viewportOfComment,
29
29
  viewportOfDevice,
30
30
  viewportWithWidth
31
- } from "../chunk-YYKTDLFF.js";
31
+ } from "../chunk-D2DS4FPR.js";
32
32
 
33
33
  // src/canvas/DesignStudioCanvasScreen.tsx
34
34
  import { normalizeDddError as normalizeDddError3 } from "@mgamadeus/ddd-web/api";
@@ -50,7 +50,7 @@ import {
50
50
  FoldVertical,
51
51
  UnfoldVertical
52
52
  } from "lucide-react";
53
- import { useCallback as useCallback2, useEffect as useEffect6, useMemo as useMemo2, useRef as useRef4, useState as useState8 } from "react";
53
+ import { useCallback as useCallback2, useEffect as useEffect6, useMemo as useMemo2, useRef as useRef4, useState as useState9 } from "react";
54
54
 
55
55
  // src/canvas/BoardComments.tsx
56
56
  import { normalizeDddError } from "@mgamadeus/ddd-web/api";
@@ -433,12 +433,12 @@ import {
433
433
  SquareDashedMousePointer,
434
434
  X
435
435
  } from "lucide-react";
436
- import { useEffect as useEffect4, useRef as useRef2, useState as useState6 } from "react";
436
+ import { useEffect as useEffect4, useRef as useRef2, useState as useState7 } from "react";
437
437
 
438
438
  // src/canvas/BoardNode.tsx
439
439
  import { useStore } from "@xyflow/react";
440
440
  import { ClipboardCopy as ClipboardCopy2, Download, Maximize2, MessageSquare } from "lucide-react";
441
- import { memo, useEffect as useEffect3, useRef, useState as useState5 } from "react";
441
+ import { memo, useEffect as useEffect3, useRef, useState as useState6 } from "react";
442
442
 
443
443
  // src/canvas/boardStatus.ts
444
444
  var boardStatusDefinition = (statuses, status) => statuses[status];
@@ -446,10 +446,20 @@ var boardStatusLabel = (statuses, status) => boardStatusDefinition(statuses, sta
446
446
 
447
447
  // src/canvas/boardDetail.ts
448
448
  var SMALL_THUMBNAIL_MAX_RENDERED_WIDTH = 130;
449
+ var PREVIEW_THUMBNAIL_MAX_RENDERED_WIDTH = 800;
449
450
  var LIVE_MIN_RENDERED_WIDTH_RATIO = 0.6;
450
451
  var LIVE_MIN_RENDERED_WIDTH_RATIO_WITHOUT_THUMBNAILS = 0.35;
451
452
  var MAX_LIVE_BOARDS = 6;
452
- var thumbnailVariantForZoom = (zoom, boardWidth) => boardWidth * zoom <= SMALL_THUMBNAIL_MAX_RENDERED_WIDTH ? "small" : "default";
453
+ var thumbnailVariantForZoom = (zoom, boardWidth) => {
454
+ const renderedWidth = boardWidth * zoom;
455
+ if (renderedWidth <= SMALL_THUMBNAIL_MAX_RENDERED_WIDTH) return "small";
456
+ return renderedWidth <= PREVIEW_THUMBNAIL_MAX_RENDERED_WIDTH ? "preview" : "default";
457
+ };
458
+ var thumbnailUrlForVariant = (urls, variant) => {
459
+ if (variant === "small") return urls.thumbnailSmallUrl ?? urls.thumbnailPreviewUrl ?? urls.thumbnailUrl ?? null;
460
+ if (variant === "preview") return urls.thumbnailPreviewUrl ?? urls.thumbnailUrl ?? null;
461
+ return urls.thumbnailUrl ?? null;
462
+ };
453
463
  var isZoomLiveCapable = (zoom, minRatio = LIVE_MIN_RENDERED_WIDTH_RATIO) => zoom >= minRatio;
454
464
  var selectLiveBoardIds = (boards, viewport, screen, maxLiveBoards = MAX_LIVE_BOARDS, minRatio = LIVE_MIN_RENDERED_WIDTH_RATIO) => {
455
465
  if (!isZoomLiveCapable(viewport.zoom, minRatio) || screen.width <= 0 || screen.height <= 0) {
@@ -830,6 +840,9 @@ var useDeferredMount = () => {
830
840
  return isMounted;
831
841
  };
832
842
 
843
+ // src/canvas/CanvasThumbnail.tsx
844
+ import { useState as useState5 } from "react";
845
+
833
846
  // src/canvas/stableContentUrl.ts
834
847
  import { useState as useState4 } from "react";
835
848
  var EXPIRY_MARGIN_SECONDS = 120;
@@ -878,9 +891,55 @@ var useStableContentUrl = (url, isDisplayed = false) => {
878
891
  return nextUrl;
879
892
  };
880
893
 
881
- // src/canvas/BoardNode.tsx
894
+ // src/canvas/CanvasThumbnail.tsx
882
895
  import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
883
896
  var isSameContent = (first, second) => Boolean(first && second) && withoutContentToken(first) === withoutContentToken(second);
897
+ var CanvasThumbnail = ({ urls, variant, title, imageClassName, isCompact }) => {
898
+ const { apiBaseUrl } = useDesignStudio();
899
+ const texts = useDesignStudioTexts();
900
+ const path = thumbnailUrlForVariant(urls, variant);
901
+ const latestUrl = path ? `${apiBaseUrl}${path}` : void 0;
902
+ const [loadedUrl, setLoadedUrl] = useState5(null);
903
+ const url = useStableContentUrl(latestUrl, isSameContent(loadedUrl, latestUrl));
904
+ const retry = useImageRetry(url);
905
+ if (!url) return null;
906
+ const isLoaded = isSameContent(loadedUrl, url);
907
+ return /* @__PURE__ */ jsxs2(Fragment2, { children: [
908
+ !loadedUrl && /* @__PURE__ */ jsx2(
909
+ "span",
910
+ {
911
+ className: cx(
912
+ "pointer-events-none absolute inset-0 flex flex-col items-center justify-start gap-2 bg-tint px-6 pt-16 text-center text-muted-foreground",
913
+ "animate-pulse motion-reduce:animate-none"
914
+ ),
915
+ children: !isCompact && /* @__PURE__ */ jsxs2(Fragment2, { children: [
916
+ /* @__PURE__ */ jsx2("span", { className: "line-clamp-2 text-[19px] font-semibold", children: title }),
917
+ /* @__PURE__ */ jsx2("span", { className: "text-[16px]", children: texts.thumbnailLoading })
918
+ ] })
919
+ }
920
+ ),
921
+ loadedUrl && !isLoaded && // biome-ignore lint/performance/noImgElement: the picture shown before, from the browser cache, under the next one
922
+ /* @__PURE__ */ jsx2("img", { src: loadedUrl, alt: "", draggable: false, className: cx("pointer-events-none select-none", imageClassName) }),
923
+ /* @__PURE__ */ jsx2(
924
+ "img",
925
+ {
926
+ src: url,
927
+ alt: "",
928
+ loading: "lazy",
929
+ decoding: "async",
930
+ draggable: false,
931
+ onError: retry.onError,
932
+ onLoad: () => setLoadedUrl(url),
933
+ className: cx("pointer-events-none select-none", imageClassName, (retry.isFailed || !isLoaded) && "opacity-0")
934
+ },
935
+ retry.imageKey
936
+ )
937
+ ] });
938
+ };
939
+
940
+ // src/canvas/BoardNode.tsx
941
+ import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
942
+ var isSameContent2 = (first, second) => Boolean(first && second) && withoutContentToken(first) === withoutContentToken(second);
884
943
  var designContentUrl = (apiBaseUrl, path) => path ? `${apiBaseUrl}${path}` : void 0;
885
944
  var downloadName = (board, extension) => `${boardCodeOf(board.boardKey ?? "board")}.${extension}`;
886
945
  var CLICK_MAX_MOVE = 5;
@@ -916,40 +975,33 @@ var BoardNodeComponent = ({ id, data }) => {
916
975
  const openThreads = openThreadCounts.get(id) ?? 0;
917
976
  const isReady = useDeferredMount();
918
977
  const isThumbnailMissing = !isResponsive && !board.thumbnailUrl;
919
- const latestThumbnailUrl = designContentUrl(
920
- apiBaseUrl,
921
- thumbnailVariant === "small" ? board.thumbnailSmallUrl ?? board.thumbnailUrl : board.thumbnailUrl
922
- );
923
978
  const latestHtmlUrl = designContentUrl(apiBaseUrl, board.htmlUrl);
924
- const [loadedImageUrl, setLoadedImageUrl] = useState5(null);
925
- const [loadedFrameUrl, setLoadedFrameUrl] = useState5(null);
926
- const thumbnailUrl = useStableContentUrl(latestThumbnailUrl, isSameContent(loadedImageUrl, latestThumbnailUrl));
927
- const htmlUrl = useStableContentUrl(latestHtmlUrl, isSameContent(loadedFrameUrl, latestHtmlUrl));
928
- const isRememberedLive = isThumbnailMissing && thumbnailVariant === "default" && isReady && wasContentUrlLoaded(htmlUrl);
979
+ const [loadedFrameUrl, setLoadedFrameUrl] = useState6(null);
980
+ const htmlUrl = useStableContentUrl(latestHtmlUrl, isSameContent2(loadedFrameUrl, latestHtmlUrl));
981
+ const isRememberedLive = isThumbnailMissing && thumbnailVariant !== "small" && isReady && wasContentUrlLoaded(htmlUrl);
929
982
  const showsLiveHtml = isLive || isRememberedLive;
930
983
  const liveHtmlUrl = useCheckedContentUrl(showsLiveHtml && isReady ? htmlUrl : void 0);
931
- const thumbnailRetry = useImageRetry(thumbnailUrl);
932
984
  useEffect3(() => {
933
985
  if (!liveHtmlUrl) setLoadedFrameUrl(null);
934
986
  }, [liveHtmlUrl]);
935
987
  const title = board.title ?? board.boardKey ?? "";
936
988
  const boardCode = board.code ?? boardCodeOf(board.boardKey ?? "");
937
- const [isDownloadOpen, setIsDownloadOpen] = useState5(false);
989
+ const [isDownloadOpen, setIsDownloadOpen] = useState6(false);
938
990
  const pressPointRef = useRef(null);
939
991
  const isCompact = thumbnailVariant === "small";
940
992
  if (!isReady) {
941
- return /* @__PURE__ */ jsx2("div", { className: cx("h-full w-full", isDimmed && "opacity-15"), style: { paddingTop: BOARD_HEADER_HEIGHT }, children: /* @__PURE__ */ jsx2("div", { className: "rounded-[20px] bg-card/70", style: { width, height: visibleHeight } }) });
993
+ return /* @__PURE__ */ jsx3("div", { className: cx("h-full w-full", isDimmed && "opacity-15"), style: { paddingTop: BOARD_HEADER_HEIGHT }, children: /* @__PURE__ */ jsx3("div", { className: "rounded-[20px] bg-card/70", style: { width, height: visibleHeight } }) });
942
994
  }
943
- return /* @__PURE__ */ jsxs2("div", { className: cx("relative h-full w-full", isDimmed && "opacity-15"), children: [
944
- /* @__PURE__ */ jsxs2("div", { className: "flex flex-col justify-end gap-0.5 pb-1", style: { height: BOARD_HEADER_HEIGHT }, children: [
945
- /* @__PURE__ */ jsx2("span", { className: "line-clamp-2 text-[19px] leading-6 font-medium text-muted-foreground", title, children: title }),
946
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-1", children: [
947
- /* @__PURE__ */ jsx2("span", { className: "min-w-0 flex-1 truncate text-[15px] leading-5 font-semibold text-foreground/70 tabular-nums", title: boardCode, children: isCompact ? "" : boardCode }),
948
- !isCompact && openThreads > 0 && /* @__PURE__ */ jsxs2("span", { className: "inline-flex shrink-0 items-center gap-1 rounded-full bg-primary px-2 py-0.5 text-sm font-semibold text-primary-foreground", children: [
949
- /* @__PURE__ */ jsx2(MessageSquare, { className: "size-3.5", "aria-hidden": true }),
995
+ return /* @__PURE__ */ jsxs3("div", { className: cx("relative h-full w-full", isDimmed && "opacity-15"), children: [
996
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col justify-end gap-0.5 pb-1", style: { height: BOARD_HEADER_HEIGHT }, children: [
997
+ /* @__PURE__ */ jsx3("span", { className: "line-clamp-2 text-[19px] leading-6 font-medium text-muted-foreground", title, children: title }),
998
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-1", children: [
999
+ /* @__PURE__ */ jsx3("span", { className: "min-w-0 flex-1 truncate text-[15px] leading-5 font-semibold text-foreground/70 tabular-nums", title: boardCode, children: isCompact ? "" : boardCode }),
1000
+ !isCompact && openThreads > 0 && /* @__PURE__ */ jsxs3("span", { className: "inline-flex shrink-0 items-center gap-1 rounded-full bg-primary px-2 py-0.5 text-sm font-semibold text-primary-foreground", children: [
1001
+ /* @__PURE__ */ jsx3(MessageSquare, { className: "size-3.5", "aria-hidden": true }),
950
1002
  openThreads
951
1003
  ] }),
952
- !isCompact && board.status && board.status !== defaultStatus && /* @__PURE__ */ jsx2(
1004
+ !isCompact && board.status && board.status !== defaultStatus && /* @__PURE__ */ jsx3(
953
1005
  StatusBadge,
954
1006
  {
955
1007
  tone: statusDefinition?.tone ?? "neutral",
@@ -959,7 +1011,7 @@ var BoardNodeComponent = ({ id, data }) => {
959
1011
  className: "shrink-0"
960
1012
  }
961
1013
  ),
962
- !isCompact && /* @__PURE__ */ jsx2(
1014
+ !isCompact && /* @__PURE__ */ jsx3(
963
1015
  "button",
964
1016
  {
965
1017
  type: "button",
@@ -967,10 +1019,10 @@ var BoardNodeComponent = ({ id, data }) => {
967
1019
  "aria-label": `Copy reference of ${title} for an agent`,
968
1020
  title: "Copy reference (C)",
969
1021
  onClick: () => onCopyReference(id),
970
- children: /* @__PURE__ */ jsx2(ClipboardCopy2, { className: "size-5" })
1022
+ children: /* @__PURE__ */ jsx3(ClipboardCopy2, { className: "size-5" })
971
1023
  }
972
1024
  ),
973
- !isCompact && /* @__PURE__ */ jsx2(
1025
+ !isCompact && /* @__PURE__ */ jsx3(
974
1026
  "button",
975
1027
  {
976
1028
  type: "button",
@@ -978,11 +1030,11 @@ var BoardNodeComponent = ({ id, data }) => {
978
1030
  "aria-label": `Open ${title} large`,
979
1031
  title: "Expand",
980
1032
  onClick: () => onOpenBoard(id),
981
- children: /* @__PURE__ */ jsx2(Maximize2, { className: "size-5" })
1033
+ children: /* @__PURE__ */ jsx3(Maximize2, { className: "size-5" })
982
1034
  }
983
1035
  ),
984
- !isCompact && /* @__PURE__ */ jsxs2("div", { className: "relative", children: [
985
- /* @__PURE__ */ jsx2(
1036
+ !isCompact && /* @__PURE__ */ jsxs3("div", { className: "relative", children: [
1037
+ /* @__PURE__ */ jsx3(
986
1038
  "button",
987
1039
  {
988
1040
  type: "button",
@@ -991,16 +1043,16 @@ var BoardNodeComponent = ({ id, data }) => {
991
1043
  "aria-expanded": isDownloadOpen,
992
1044
  title: "Download",
993
1045
  onClick: () => setIsDownloadOpen((isOpen) => !isOpen),
994
- children: /* @__PURE__ */ jsx2(Download, { className: "size-5" })
1046
+ children: /* @__PURE__ */ jsx3(Download, { className: "size-5" })
995
1047
  }
996
1048
  ),
997
1049
  isDownloadOpen && // a plain menu instead of a Radix one: mounted only while open, nothing per node at rest
998
- /* @__PURE__ */ jsxs2(
1050
+ /* @__PURE__ */ jsxs3(
999
1051
  "div",
1000
1052
  {
1001
1053
  className: "nodrag nopan absolute top-full right-0 z-20 mt-1 flex w-56 flex-col rounded-2xl bg-popover p-1.5 text-[18px] shadow-surface-raised ring-1 ring-foreground/5",
1002
1054
  children: [
1003
- board.thumbnailUrl && /* @__PURE__ */ jsx2(
1055
+ board.thumbnailUrl && /* @__PURE__ */ jsx3(
1004
1056
  "a",
1005
1057
  {
1006
1058
  href: designContentUrl(apiBaseUrl, board.thumbnailUrl),
@@ -1010,7 +1062,7 @@ var BoardNodeComponent = ({ id, data }) => {
1010
1062
  children: "PNG (thumbnail)"
1011
1063
  }
1012
1064
  ),
1013
- board.htmlUrl && /* @__PURE__ */ jsx2(
1065
+ board.htmlUrl && /* @__PURE__ */ jsx3(
1014
1066
  "a",
1015
1067
  {
1016
1068
  href: htmlUrl,
@@ -1026,7 +1078,7 @@ var BoardNodeComponent = ({ id, data }) => {
1026
1078
  ] })
1027
1079
  ] })
1028
1080
  ] }),
1029
- /* @__PURE__ */ jsxs2(
1081
+ /* @__PURE__ */ jsxs3(
1030
1082
  "div",
1031
1083
  {
1032
1084
  className: cx(
@@ -1035,7 +1087,7 @@ var BoardNodeComponent = ({ id, data }) => {
1035
1087
  ),
1036
1088
  style: { width, height: visibleHeight },
1037
1089
  children: [
1038
- isResponsive && /* @__PURE__ */ jsx2(
1090
+ isResponsive && /* @__PURE__ */ jsx3(
1039
1091
  ResponsiveBoardFrames,
1040
1092
  {
1041
1093
  board,
@@ -1047,28 +1099,18 @@ var BoardNodeComponent = ({ id, data }) => {
1047
1099
  title
1048
1100
  }
1049
1101
  ),
1050
- !isResponsive && thumbnailUrl && // biome-ignore lint/performance/noImgElement: canvas thumbnails are API images at canvas scale, next/image cannot optimise them
1051
- /* @__PURE__ */ jsx2(
1052
- "img",
1102
+ !isResponsive && !isThumbnailMissing && /* @__PURE__ */ jsx3(
1103
+ CanvasThumbnail,
1053
1104
  {
1054
- src: thumbnailUrl,
1055
- alt: "",
1056
- width,
1057
- height,
1058
- loading: "lazy",
1059
- decoding: "async",
1060
- draggable: false,
1061
- onError: thumbnailRetry.onError,
1062
- onLoad: () => setLoadedImageUrl(thumbnailUrl),
1063
- className: cx(
1064
- "pointer-events-none absolute inset-0 h-full w-full object-cover object-top select-none",
1065
- thumbnailRetry.isFailed && "invisible"
1066
- )
1067
- },
1068
- thumbnailRetry.imageKey
1105
+ urls: board,
1106
+ variant: thumbnailVariant,
1107
+ title,
1108
+ imageClassName: "absolute inset-0 h-full w-full object-cover object-top",
1109
+ isCompact
1110
+ }
1069
1111
  ),
1070
- isThumbnailMissing && !isCompact && !(showsLiveHtml && liveHtmlUrl) && /* @__PURE__ */ jsx2("span", { className: "pointer-events-none absolute inset-0 flex items-center justify-center px-6 text-center text-[17px] font-semibold text-muted-foreground", children: texts.thumbnailMissing }),
1071
- !isResponsive && showsLiveHtml && liveHtmlUrl && /* @__PURE__ */ jsx2(
1112
+ isThumbnailMissing && !isCompact && !(showsLiveHtml && liveHtmlUrl) && /* @__PURE__ */ jsx3("span", { className: "pointer-events-none absolute inset-0 flex items-center justify-center px-6 text-center text-[17px] font-semibold text-muted-foreground", children: texts.thumbnailMissing }),
1113
+ !isResponsive && showsLiveHtml && liveHtmlUrl && /* @__PURE__ */ jsx3(
1072
1114
  "iframe",
1073
1115
  {
1074
1116
  src: liveHtmlUrl,
@@ -1082,12 +1124,12 @@ var BoardNodeComponent = ({ id, data }) => {
1082
1124
  className: "pointer-events-none absolute inset-0 border-0 bg-transparent"
1083
1125
  }
1084
1126
  ),
1085
- isCut && /* @__PURE__ */ jsxs2("span", { className: "pointer-events-none absolute inset-x-0 bottom-0 flex h-40 items-end justify-center bg-gradient-to-t from-card to-transparent pb-4 text-[16px] font-semibold text-muted-foreground", children: [
1127
+ isCut && /* @__PURE__ */ jsxs3("span", { className: "pointer-events-none absolute inset-x-0 bottom-0 flex h-40 items-end justify-center bg-gradient-to-t from-card to-transparent pb-4 text-[16px] font-semibold text-muted-foreground", children: [
1086
1128
  "\u2193 ",
1087
1129
  Math.round(height),
1088
1130
  " px \u2014 full length in the focus view"
1089
1131
  ] }),
1090
- /* @__PURE__ */ jsx2(
1132
+ /* @__PURE__ */ jsx3(
1091
1133
  "button",
1092
1134
  {
1093
1135
  type: "button",
@@ -1123,10 +1165,10 @@ var ResponsiveBoardFrames = ({
1123
1165
  title
1124
1166
  }) => {
1125
1167
  let left = 0;
1126
- return /* @__PURE__ */ jsx2(Fragment2, { children: framesOf(board).map((frame) => {
1168
+ return /* @__PURE__ */ jsx3(Fragment3, { children: framesOf(board).map((frame) => {
1127
1169
  const frameLeft = left;
1128
1170
  left += (frame.width ?? 0) + FRAME_GAP;
1129
- return /* @__PURE__ */ jsx2(
1171
+ return /* @__PURE__ */ jsx3(
1130
1172
  ResponsiveBoardFrame,
1131
1173
  {
1132
1174
  frame,
@@ -1152,21 +1194,16 @@ var ResponsiveBoardFrame = ({
1152
1194
  htmlUrl,
1153
1195
  title
1154
1196
  }) => {
1155
- const { apiBaseUrl } = useDesignStudio();
1156
1197
  const texts = useDesignStudioTexts();
1157
1198
  const frameWidth = frame.width ?? 0;
1158
1199
  const frameHeight = frameCanvasHeight(frame, frameHeightMode);
1159
- const latestThumbnailUrl = designContentUrl(
1160
- apiBaseUrl,
1161
- thumbnailVariant === "small" ? frame.thumbnailSmallUrl ?? frame.thumbnailUrl : frame.thumbnailUrl
1200
+ const frameThumbnailVariant = useStore(
1201
+ (state) => thumbnailVariant === "small" ? "small" : thumbnailVariantForZoom(state.transform[2], frameWidth)
1162
1202
  );
1163
- const [loadedImageUrl, setLoadedImageUrl] = useState5(null);
1164
- const thumbnailUrl = useStableContentUrl(latestThumbnailUrl, isSameContent(loadedImageUrl, latestThumbnailUrl));
1165
- const thumbnailRetry = useImageRetry(thumbnailUrl);
1166
1203
  const liveHtmlUrl = useCheckedContentUrl(showsLiveHtml ? htmlUrl : void 0);
1167
1204
  const isCut = frameHeightMode === "page" && (frame.pageHeight ?? 0) > frameHeight;
1168
- return /* @__PURE__ */ jsxs2("div", { className: "absolute top-0", style: { left, width: frameWidth }, children: [
1169
- /* @__PURE__ */ jsx2(
1205
+ return /* @__PURE__ */ jsxs3("div", { className: "absolute top-0", style: { left, width: frameWidth }, children: [
1206
+ /* @__PURE__ */ jsx3(
1170
1207
  "div",
1171
1208
  {
1172
1209
  className: "flex items-end truncate pb-2 text-[17px] font-semibold text-muted-foreground tabular-nums",
@@ -1175,32 +1212,24 @@ var ResponsiveBoardFrame = ({
1175
1212
  children: thumbnailVariant === "small" ? "" : `${deviceLabel} \xB7 ${frameWidth}`
1176
1213
  }
1177
1214
  ),
1178
- /* @__PURE__ */ jsxs2(
1215
+ /* @__PURE__ */ jsxs3(
1179
1216
  "div",
1180
1217
  {
1181
1218
  className: "relative overflow-hidden rounded-[20px] bg-card shadow-surface-raised ring-1 ring-foreground/10",
1182
1219
  style: { width: frameWidth, height: frameHeight },
1183
1220
  children: [
1184
- thumbnailUrl && // biome-ignore lint/performance/noImgElement: canvas thumbnails are API images at canvas scale
1185
- /* @__PURE__ */ jsx2(
1186
- "img",
1221
+ frame.thumbnailUrl && /* @__PURE__ */ jsx3(
1222
+ CanvasThumbnail,
1187
1223
  {
1188
- src: thumbnailUrl,
1189
- alt: "",
1190
- loading: "lazy",
1191
- decoding: "async",
1192
- draggable: false,
1193
- onError: thumbnailRetry.onError,
1194
- onLoad: () => setLoadedImageUrl(thumbnailUrl),
1195
- className: cx(
1196
- "pointer-events-none absolute inset-x-0 top-0 w-full select-none",
1197
- thumbnailRetry.isFailed && "invisible"
1198
- )
1199
- },
1200
- thumbnailRetry.imageKey
1224
+ urls: frame,
1225
+ variant: frameThumbnailVariant,
1226
+ title: `${title} \xB7 ${deviceLabel}`,
1227
+ imageClassName: "absolute inset-x-0 top-0 w-full",
1228
+ isCompact: thumbnailVariant === "small"
1229
+ }
1201
1230
  ),
1202
- !frame.thumbnailUrl && !(showsLiveHtml && liveHtmlUrl) && thumbnailVariant !== "small" && /* @__PURE__ */ jsx2("span", { className: "pointer-events-none absolute inset-0 flex items-center justify-center px-6 text-center text-[17px] font-semibold text-muted-foreground", children: texts.thumbnailMissing }),
1203
- showsLiveHtml && liveHtmlUrl && /* @__PURE__ */ jsx2(
1231
+ !frame.thumbnailUrl && !(showsLiveHtml && liveHtmlUrl) && thumbnailVariant !== "small" && /* @__PURE__ */ jsx3("span", { className: "pointer-events-none absolute inset-0 flex items-center justify-center px-6 text-center text-[17px] font-semibold text-muted-foreground", children: texts.thumbnailMissing }),
1232
+ showsLiveHtml && liveHtmlUrl && /* @__PURE__ */ jsx3(
1204
1233
  "iframe",
1205
1234
  {
1206
1235
  src: liveHtmlUrl,
@@ -1213,7 +1242,7 @@ var ResponsiveBoardFrame = ({
1213
1242
  className: "pointer-events-none absolute inset-0 border-0 bg-transparent"
1214
1243
  }
1215
1244
  ),
1216
- isCut && /* @__PURE__ */ jsxs2("span", { className: "pointer-events-none absolute inset-x-0 bottom-0 flex h-40 items-end justify-center bg-gradient-to-t from-card to-transparent pb-4 text-[16px] font-semibold text-muted-foreground", children: [
1245
+ isCut && /* @__PURE__ */ jsxs3("span", { className: "pointer-events-none absolute inset-x-0 bottom-0 flex h-40 items-end justify-center bg-gradient-to-t from-card to-transparent pb-4 text-[16px] font-semibold text-muted-foreground", children: [
1217
1246
  "\u2193 ",
1218
1247
  Math.round(frame.pageHeight ?? 0),
1219
1248
  " px \u2014 full length in the focus view"
@@ -1226,7 +1255,7 @@ var ResponsiveBoardFrame = ({
1226
1255
 
1227
1256
  // src/canvas/BoardStatusChips.tsx
1228
1257
  import { normalizeDddError as normalizeDddError2 } from "@mgamadeus/ddd-web/api";
1229
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1258
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1230
1259
  var BoardStatusChips = ({
1231
1260
  projectKey,
1232
1261
  canvasKey,
@@ -1237,11 +1266,11 @@ var BoardStatusChips = ({
1237
1266
  }) => {
1238
1267
  const { api, notify, statuses: statusDefinitions } = useDesignStudio();
1239
1268
  const [patchStatus, { isLoading }] = api.useSetBoardStatusMutation();
1240
- return /* @__PURE__ */ jsxs3("fieldset", { className: "m-0 flex flex-wrap items-center gap-1.5 border-0 p-0", "aria-label": "Board status", children: [
1269
+ return /* @__PURE__ */ jsxs4("fieldset", { className: "m-0 flex flex-wrap items-center gap-1.5 border-0 p-0", "aria-label": "Board status", children: [
1241
1270
  statuses.map((status) => {
1242
1271
  const Icon = boardStatusDefinition(statusDefinitions, status)?.icon;
1243
1272
  const isActive = board.status === status;
1244
- return /* @__PURE__ */ jsxs3(
1273
+ return /* @__PURE__ */ jsxs4(
1245
1274
  "button",
1246
1275
  {
1247
1276
  type: "button",
@@ -1266,19 +1295,19 @@ var BoardStatusChips = ({
1266
1295
  isActive ? "bg-primary text-primary-foreground" : "bg-tint text-muted-foreground hover:bg-tint-strong hover:text-foreground disabled:opacity-60"
1267
1296
  ),
1268
1297
  children: [
1269
- Icon && /* @__PURE__ */ jsx3(Icon, { className: "size-3.5", "aria-hidden": true }),
1298
+ Icon && /* @__PURE__ */ jsx4(Icon, { className: "size-3.5", "aria-hidden": true }),
1270
1299
  boardStatusLabel(statusDefinitions, status)
1271
1300
  ]
1272
1301
  },
1273
1302
  status
1274
1303
  );
1275
1304
  }),
1276
- board.hasChangedSinceStatus && /* @__PURE__ */ jsx3("span", { className: "text-xs text-muted-foreground", title: "The board file changed after this status was set", children: "changed since" })
1305
+ board.hasChangedSinceStatus && /* @__PURE__ */ jsx4("span", { className: "text-xs text-muted-foreground", title: "The board file changed after this status was set", children: "changed since" })
1277
1306
  ] });
1278
1307
  };
1279
1308
 
1280
1309
  // src/canvas/BoardFocusView.tsx
1281
- import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1310
+ import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1282
1311
  var DEVICE_SCREEN_HEIGHT = 844;
1283
1312
  var BoardFocusView = ({
1284
1313
  projectKey,
@@ -1303,15 +1332,15 @@ var BoardFocusView = ({
1303
1332
  const { apiBaseUrl, components } = useDesignStudio();
1304
1333
  const texts = useDesignStudioTexts();
1305
1334
  const { Button, Dialog, DialogContent, DialogDescription, DialogTitle, Textarea } = components;
1306
- const [isPlacingPin, setIsPlacingPin] = useState6(false);
1307
- const [pendingPin, setPendingPin] = useState6(null);
1308
- const [highlightedCommentId, setHighlightedCommentId] = useState6(null);
1309
- const [showResolved, setShowResolved] = useState6(false);
1310
- const [isMarkingRegion, setIsMarkingRegion] = useState6(false);
1311
- const [region, setRegion] = useState6(null);
1312
- const [regionDraft, setRegionDraft] = useState6(null);
1313
- const [referenceNote, setReferenceNote] = useState6("");
1314
- const [isRegionFlashing, setIsRegionFlashing] = useState6(false);
1335
+ const [isPlacingPin, setIsPlacingPin] = useState7(false);
1336
+ const [pendingPin, setPendingPin] = useState7(null);
1337
+ const [highlightedCommentId, setHighlightedCommentId] = useState7(null);
1338
+ const [showResolved, setShowResolved] = useState7(false);
1339
+ const [isMarkingRegion, setIsMarkingRegion] = useState7(false);
1340
+ const [region, setRegion] = useState7(null);
1341
+ const [regionDraft, setRegionDraft] = useState7(null);
1342
+ const [referenceNote, setReferenceNote] = useState7("");
1343
+ const [isRegionFlashing, setIsRegionFlashing] = useState7(false);
1315
1344
  const boardKey = board?.boardKey ?? null;
1316
1345
  useEffect4(() => {
1317
1346
  if (boardKey === null) return;
@@ -1346,9 +1375,9 @@ var BoardFocusView = ({
1346
1375
  return () => window.removeEventListener("keydown", onKeyDown);
1347
1376
  });
1348
1377
  const isResponsive = isResponsiveBoard(board) && viewport !== null;
1349
- const [showsDeviceFrame, setShowsDeviceFrame] = useState6(true);
1378
+ const [showsDeviceFrame, setShowsDeviceFrame] = useState7(true);
1350
1379
  const stageRef = useRef2(null);
1351
- const [stageWidth, setStageWidth] = useState6(0);
1380
+ const [stageWidth, setStageWidth] = useState7(0);
1352
1381
  useEffect4(() => {
1353
1382
  const stage = stageRef.current;
1354
1383
  if (!stage || typeof ResizeObserver === "undefined") return;
@@ -1425,16 +1454,16 @@ var BoardFocusView = ({
1425
1454
  });
1426
1455
  setIsPlacingPin(false);
1427
1456
  };
1428
- return /* @__PURE__ */ jsx4(Dialog, { open: board !== null, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsx4(
1457
+ return /* @__PURE__ */ jsx5(Dialog, { open: board !== null, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsx5(
1429
1458
  DialogContent,
1430
1459
  {
1431
1460
  showCloseButton: false,
1432
1461
  className: "flex h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-none flex-col gap-0 overflow-hidden rounded-3xl p-0 sm:max-w-none",
1433
- children: board && /* @__PURE__ */ jsxs4(Fragment3, { children: [
1434
- /* @__PURE__ */ jsxs4("header", { className: "flex flex-wrap items-center gap-3 border-b border-border px-5 py-3", children: [
1435
- /* @__PURE__ */ jsxs4("div", { className: "min-w-0 flex-1", children: [
1436
- /* @__PURE__ */ jsx4(DialogTitle, { className: "truncate text-lg font-semibold", children: board.title }),
1437
- /* @__PURE__ */ jsxs4(DialogDescription, { className: "truncate text-xs", children: [
1462
+ children: board && /* @__PURE__ */ jsxs5(Fragment4, { children: [
1463
+ /* @__PURE__ */ jsxs5("header", { className: "flex flex-wrap items-center gap-3 border-b border-border px-5 py-3", children: [
1464
+ /* @__PURE__ */ jsxs5("div", { className: "min-w-0 flex-1", children: [
1465
+ /* @__PURE__ */ jsx5(DialogTitle, { className: "truncate text-lg font-semibold", children: board.title }),
1466
+ /* @__PURE__ */ jsxs5(DialogDescription, { className: "truncate text-xs", children: [
1438
1467
  presentLabel ? "Present \xB7 " : "",
1439
1468
  sectionTitle ? `${sectionTitle} \xB7 ` : "",
1440
1469
  board.boardKey,
@@ -1446,7 +1475,7 @@ var BoardFocusView = ({
1446
1475
  position.count
1447
1476
  ] })
1448
1477
  ] }),
1449
- /* @__PURE__ */ jsx4(
1478
+ /* @__PURE__ */ jsx5(
1450
1479
  BoardStatusChips,
1451
1480
  {
1452
1481
  projectKey,
@@ -1457,15 +1486,15 @@ var BoardFocusView = ({
1457
1486
  onStatusChanged
1458
1487
  }
1459
1488
  ),
1460
- /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-1", children: [
1461
- /* @__PURE__ */ jsx4(Button, { variant: "outline", size: "icon", "aria-label": "Previous board (\u2190)", onClick: onPrevious, children: /* @__PURE__ */ jsx4(ChevronLeft, {}) }),
1462
- /* @__PURE__ */ jsx4(Button, { variant: "outline", size: "icon", "aria-label": "Next board (\u2192)", onClick: onNext, children: /* @__PURE__ */ jsx4(ChevronRight, {}) }),
1463
- /* @__PURE__ */ jsx4(Button, { variant: "ghost", size: "icon", "aria-label": "Close focus view", onClick: onClose, children: /* @__PURE__ */ jsx4(X, {}) })
1489
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-1", children: [
1490
+ /* @__PURE__ */ jsx5(Button, { variant: "outline", size: "icon", "aria-label": "Previous board (\u2190)", onClick: onPrevious, children: /* @__PURE__ */ jsx5(ChevronLeft, {}) }),
1491
+ /* @__PURE__ */ jsx5(Button, { variant: "outline", size: "icon", "aria-label": "Next board (\u2192)", onClick: onNext, children: /* @__PURE__ */ jsx5(ChevronRight, {}) }),
1492
+ /* @__PURE__ */ jsx5(Button, { variant: "ghost", size: "icon", "aria-label": "Close focus view", onClick: onClose, children: /* @__PURE__ */ jsx5(X, {}) })
1464
1493
  ] })
1465
1494
  ] }),
1466
- /* @__PURE__ */ jsxs4("div", { className: "flex min-h-0 flex-1 flex-col lg:flex-row", children: [
1467
- /* @__PURE__ */ jsxs4("div", { className: "flex min-h-0 flex-1 flex-col bg-tint", children: [
1468
- isResponsive && /* @__PURE__ */ jsx4(
1495
+ /* @__PURE__ */ jsxs5("div", { className: "flex min-h-0 flex-1 flex-col lg:flex-row", children: [
1496
+ /* @__PURE__ */ jsxs5("div", { className: "flex min-h-0 flex-1 flex-col bg-tint", children: [
1497
+ isResponsive && /* @__PURE__ */ jsx5(
1469
1498
  ViewportToolbar,
1470
1499
  {
1471
1500
  devices,
@@ -1476,7 +1505,7 @@ var BoardFocusView = ({
1476
1505
  onViewportChange: (nextViewport) => onViewportChange?.(nextViewport)
1477
1506
  }
1478
1507
  ),
1479
- /* @__PURE__ */ jsx4("div", { ref: stageRef, className: "flex min-h-0 flex-1 items-start justify-center overflow-auto p-6", children: /* @__PURE__ */ jsx4("div", { style: { width: (width + bezelPadding) * scale, height: (screenHeight + bezelPadding) * scale }, children: /* @__PURE__ */ jsxs4(
1508
+ /* @__PURE__ */ jsx5("div", { ref: stageRef, className: "flex min-h-0 flex-1 items-start justify-center overflow-auto p-6", children: /* @__PURE__ */ jsx5("div", { style: { width: (width + bezelPadding) * scale, height: (screenHeight + bezelPadding) * scale }, children: /* @__PURE__ */ jsxs5(
1480
1509
  "div",
1481
1510
  {
1482
1511
  className: cx(
@@ -1486,7 +1515,7 @@ var BoardFocusView = ({
1486
1515
  ),
1487
1516
  style: { transform: scale !== 1 ? `scale(${scale})` : void 0, width: width + bezelPadding },
1488
1517
  children: [
1489
- /* @__PURE__ */ jsx4(
1518
+ /* @__PURE__ */ jsx5(
1490
1519
  "div",
1491
1520
  {
1492
1521
  className: cx(
@@ -1494,9 +1523,9 @@ var BoardFocusView = ({
1494
1523
  !isResponsive || showsDeviceFrame ? !isResponsive || viewport.width < 600 ? "rounded-[44px]" : "rounded-[18px]" : "rounded-md ring-1 ring-foreground/10"
1495
1524
  ),
1496
1525
  style: { width, height: screenHeight },
1497
- children: /* @__PURE__ */ jsxs4("div", { className: "relative", style: { width, height }, children: [
1526
+ children: /* @__PURE__ */ jsxs5("div", { className: "relative", style: { width, height }, children: [
1498
1527
  thumbnailUrl && // biome-ignore lint/performance/noImgElement: API thumbnail under the live board while it loads
1499
- /* @__PURE__ */ jsx4(
1528
+ /* @__PURE__ */ jsx5(
1500
1529
  "img",
1501
1530
  {
1502
1531
  src: thumbnailUrl,
@@ -1506,7 +1535,7 @@ var BoardFocusView = ({
1506
1535
  className: "pointer-events-none absolute inset-0 select-none"
1507
1536
  }
1508
1537
  ),
1509
- htmlUrl && /* @__PURE__ */ jsx4(
1538
+ htmlUrl && /* @__PURE__ */ jsx5(
1510
1539
  "iframe",
1511
1540
  {
1512
1541
  src: htmlUrl,
@@ -1519,7 +1548,7 @@ var BoardFocusView = ({
1519
1548
  },
1520
1549
  htmlUrl
1521
1550
  ),
1522
- isPlacingPin && /* @__PURE__ */ jsx4(
1551
+ isPlacingPin && /* @__PURE__ */ jsx5(
1523
1552
  "button",
1524
1553
  {
1525
1554
  type: "button",
@@ -1528,7 +1557,7 @@ var BoardFocusView = ({
1528
1557
  onClick: placePin
1529
1558
  }
1530
1559
  ),
1531
- isMarkingRegion && /* @__PURE__ */ jsx4(
1560
+ isMarkingRegion && /* @__PURE__ */ jsx5(
1532
1561
  "button",
1533
1562
  {
1534
1563
  type: "button",
@@ -1539,7 +1568,7 @@ var BoardFocusView = ({
1539
1568
  onPointerUp: endRegion
1540
1569
  }
1541
1570
  ),
1542
- shownRegion && /* @__PURE__ */ jsx4(
1571
+ shownRegion && /* @__PURE__ */ jsx5(
1543
1572
  "span",
1544
1573
  {
1545
1574
  "aria-hidden": true,
@@ -1555,7 +1584,7 @@ var BoardFocusView = ({
1555
1584
  }
1556
1585
  }
1557
1586
  ),
1558
- pinnedThreads.map((thread) => /* @__PURE__ */ jsx4(
1587
+ pinnedThreads.map((thread) => /* @__PURE__ */ jsx5(
1559
1588
  "button",
1560
1589
  {
1561
1590
  type: "button",
@@ -1572,19 +1601,19 @@ var BoardFocusView = ({
1572
1601
  },
1573
1602
  String(thread.root.id)
1574
1603
  )),
1575
- pendingPin && /* @__PURE__ */ jsx4(
1604
+ pendingPin && /* @__PURE__ */ jsx5(
1576
1605
  "span",
1577
1606
  {
1578
1607
  className: "absolute z-20 flex size-7 -translate-x-1/2 -translate-y-full items-center justify-center rounded-full rounded-bl-none bg-brand text-card shadow-surface-raised ring-2 ring-card",
1579
1608
  style: { left: pendingPin.x, top: pendingPin.y },
1580
1609
  "aria-hidden": true,
1581
- children: /* @__PURE__ */ jsx4(MapPin2, { className: "size-4" })
1610
+ children: /* @__PURE__ */ jsx5(MapPin2, { className: "size-4" })
1582
1611
  }
1583
1612
  )
1584
1613
  ] })
1585
1614
  }
1586
1615
  ),
1587
- isResponsive && /* @__PURE__ */ jsx4(
1616
+ isResponsive && /* @__PURE__ */ jsx5(
1588
1617
  WidthDragHandle,
1589
1618
  {
1590
1619
  scale,
@@ -1596,11 +1625,11 @@ var BoardFocusView = ({
1596
1625
  }
1597
1626
  ) }) })
1598
1627
  ] }),
1599
- /* @__PURE__ */ jsxs4("aside", { className: "flex min-h-0 w-full flex-col border-t border-border lg:w-[400px] lg:border-t-0 lg:border-l", children: [
1600
- /* @__PURE__ */ jsxs4("div", { className: "space-y-2 border-b border-border px-5 py-4", children: [
1601
- /* @__PURE__ */ jsx4("p", { className: "text-sm font-semibold", children: "Reference for an agent" }),
1602
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-wrap items-center gap-2", children: [
1603
- /* @__PURE__ */ jsxs4(
1628
+ /* @__PURE__ */ jsxs5("aside", { className: "flex min-h-0 w-full flex-col border-t border-border lg:w-[400px] lg:border-t-0 lg:border-l", children: [
1629
+ /* @__PURE__ */ jsxs5("div", { className: "space-y-2 border-b border-border px-5 py-4", children: [
1630
+ /* @__PURE__ */ jsx5("p", { className: "text-sm font-semibold", children: "Reference for an agent" }),
1631
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-wrap items-center gap-2", children: [
1632
+ /* @__PURE__ */ jsxs5(
1604
1633
  Button,
1605
1634
  {
1606
1635
  variant: isMarkingRegion ? "default" : "outline",
@@ -1608,19 +1637,19 @@ var BoardFocusView = ({
1608
1637
  "aria-pressed": isMarkingRegion,
1609
1638
  onClick: () => setIsMarkingRegion((marking) => !marking),
1610
1639
  children: [
1611
- /* @__PURE__ */ jsx4(SquareDashedMousePointer, {}),
1640
+ /* @__PURE__ */ jsx5(SquareDashedMousePointer, {}),
1612
1641
  " ",
1613
1642
  isMarkingRegion ? "Drag on the board\u2026" : "Mark region"
1614
1643
  ]
1615
1644
  }
1616
1645
  ),
1617
- region && /* @__PURE__ */ jsx4(Button, { variant: "ghost", size: "sm", onClick: () => setRegion(null), children: "Clear region" }),
1618
- /* @__PURE__ */ jsxs4(Button, { variant: "outline", size: "sm", className: "ml-auto", onClick: copyReference, children: [
1619
- /* @__PURE__ */ jsx4(ClipboardCopy3, {}),
1646
+ region && /* @__PURE__ */ jsx5(Button, { variant: "ghost", size: "sm", onClick: () => setRegion(null), children: "Clear region" }),
1647
+ /* @__PURE__ */ jsxs5(Button, { variant: "outline", size: "sm", className: "ml-auto", onClick: copyReference, children: [
1648
+ /* @__PURE__ */ jsx5(ClipboardCopy3, {}),
1620
1649
  " Copy reference"
1621
1650
  ] })
1622
1651
  ] }),
1623
- region && /* @__PURE__ */ jsxs4("p", { className: "text-xs text-muted-foreground tabular-nums", children: [
1652
+ region && /* @__PURE__ */ jsxs5("p", { className: "text-xs text-muted-foreground tabular-nums", children: [
1624
1653
  "Region ",
1625
1654
  Math.round(region.x),
1626
1655
  ",",
@@ -1632,7 +1661,7 @@ var BoardFocusView = ({
1632
1661
  Math.round(region.height),
1633
1662
  " px"
1634
1663
  ] }),
1635
- /* @__PURE__ */ jsx4(
1664
+ /* @__PURE__ */ jsx5(
1636
1665
  Textarea,
1637
1666
  {
1638
1667
  value: referenceNote,
@@ -1643,8 +1672,8 @@ var BoardFocusView = ({
1643
1672
  }
1644
1673
  )
1645
1674
  ] }),
1646
- /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2 px-5 pt-4", children: [
1647
- /* @__PURE__ */ jsxs4(
1675
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2 px-5 pt-4", children: [
1676
+ /* @__PURE__ */ jsxs5(
1648
1677
  Button,
1649
1678
  {
1650
1679
  variant: isPlacingPin ? "default" : "outline",
@@ -1653,18 +1682,18 @@ var BoardFocusView = ({
1653
1682
  "aria-pressed": isPlacingPin,
1654
1683
  onClick: () => setIsPlacingPin((placing) => !placing),
1655
1684
  children: [
1656
- /* @__PURE__ */ jsx4(MapPinPlus, {}),
1685
+ /* @__PURE__ */ jsx5(MapPinPlus, {}),
1657
1686
  " ",
1658
1687
  isPlacingPin ? "Click on the board\u2026" : "Add pin"
1659
1688
  ]
1660
1689
  }
1661
1690
  ),
1662
- /* @__PURE__ */ jsxs4("span", { className: "text-xs text-muted-foreground", children: [
1691
+ /* @__PURE__ */ jsxs5("span", { className: "text-xs text-muted-foreground", children: [
1663
1692
  threads.filter((thread) => !thread.root.isResolved).length,
1664
1693
  " open"
1665
1694
  ] })
1666
1695
  ] }),
1667
- /* @__PURE__ */ jsx4("div", { className: "min-h-0 flex-1 overflow-y-auto px-5 py-4", children: /* @__PURE__ */ jsx4(
1696
+ /* @__PURE__ */ jsx5("div", { className: "min-h-0 flex-1 overflow-y-auto px-5 py-4", children: /* @__PURE__ */ jsx5(
1668
1697
  BoardComments,
1669
1698
  {
1670
1699
  projectKey,
@@ -1699,10 +1728,10 @@ var ViewportToolbar = ({
1699
1728
  }) => {
1700
1729
  const { components } = useDesignStudio();
1701
1730
  const { Button } = components;
1702
- return /* @__PURE__ */ jsxs4("div", { className: "flex flex-wrap items-center gap-2 border-b border-border px-5 py-2 text-sm", children: [
1703
- /* @__PURE__ */ jsxs4("label", { className: "flex items-center gap-2", children: [
1704
- /* @__PURE__ */ jsx4("span", { className: "sr-only", children: "Device" }),
1705
- /* @__PURE__ */ jsxs4(
1731
+ return /* @__PURE__ */ jsxs5("div", { className: "flex flex-wrap items-center gap-2 border-b border-border px-5 py-2 text-sm", children: [
1732
+ /* @__PURE__ */ jsxs5("label", { className: "flex items-center gap-2", children: [
1733
+ /* @__PURE__ */ jsx5("span", { className: "sr-only", children: "Device" }),
1734
+ /* @__PURE__ */ jsxs5(
1706
1735
  "select",
1707
1736
  {
1708
1737
  className: "h-8 rounded-lg border border-border bg-card px-2 text-sm",
@@ -1712,8 +1741,8 @@ var ViewportToolbar = ({
1712
1741
  if (device) onViewportChange(viewportOfDevice(device));
1713
1742
  },
1714
1743
  children: [
1715
- viewport.deviceKey === null && /* @__PURE__ */ jsx4("option", { value: "", children: "Free width" }),
1716
- devices.map((device) => /* @__PURE__ */ jsxs4("option", { value: device.deviceKey ?? "", children: [
1744
+ viewport.deviceKey === null && /* @__PURE__ */ jsx5("option", { value: "", children: "Free width" }),
1745
+ devices.map((device) => /* @__PURE__ */ jsxs5("option", { value: device.deviceKey ?? "", children: [
1717
1746
  device.label,
1718
1747
  " \xB7 ",
1719
1748
  device.width,
@@ -1724,7 +1753,7 @@ var ViewportToolbar = ({
1724
1753
  }
1725
1754
  )
1726
1755
  ] }),
1727
- /* @__PURE__ */ jsxs4(
1756
+ /* @__PURE__ */ jsxs5(
1728
1757
  Button,
1729
1758
  {
1730
1759
  variant: "outline",
@@ -1732,13 +1761,13 @@ var ViewportToolbar = ({
1732
1761
  "aria-label": "Rotate (landscape / portrait)",
1733
1762
  onClick: () => onViewportChange(rotateViewport(viewport, devices)),
1734
1763
  children: [
1735
- /* @__PURE__ */ jsx4(RotateCw, {}),
1764
+ /* @__PURE__ */ jsx5(RotateCw, {}),
1736
1765
  " Rotate"
1737
1766
  ]
1738
1767
  }
1739
1768
  ),
1740
- /* @__PURE__ */ jsx4("span", { className: "text-muted-foreground tabular-nums", children: viewportLabel(viewport, devices) }),
1741
- /* @__PURE__ */ jsxs4(
1769
+ /* @__PURE__ */ jsx5("span", { className: "text-muted-foreground tabular-nums", children: viewportLabel(viewport, devices) }),
1770
+ /* @__PURE__ */ jsxs5(
1742
1771
  Button,
1743
1772
  {
1744
1773
  variant: showsDeviceFrame ? "default" : "outline",
@@ -1746,12 +1775,12 @@ var ViewportToolbar = ({
1746
1775
  "aria-pressed": showsDeviceFrame,
1747
1776
  onClick: () => onShowsDeviceFrameChange(!showsDeviceFrame),
1748
1777
  children: [
1749
- /* @__PURE__ */ jsx4(Smartphone, {}),
1778
+ /* @__PURE__ */ jsx5(Smartphone, {}),
1750
1779
  " Device frame"
1751
1780
  ]
1752
1781
  }
1753
1782
  ),
1754
- hiddenPinCount > 0 && /* @__PURE__ */ jsxs4("span", { className: "ml-auto text-xs text-muted-foreground", children: [
1783
+ hiddenPinCount > 0 && /* @__PURE__ */ jsxs5("span", { className: "ml-auto text-xs text-muted-foreground", children: [
1755
1784
  hiddenPinCount,
1756
1785
  " open pin(s) in other widths \u2014 pick their size in the comment list"
1757
1786
  ] })
@@ -1759,7 +1788,7 @@ var ViewportToolbar = ({
1759
1788
  };
1760
1789
  var WidthDragHandle = ({ scale, width, onWidthChange }) => {
1761
1790
  const dragStartRef = useRef2(null);
1762
- return /* @__PURE__ */ jsx4(
1791
+ return /* @__PURE__ */ jsx5(
1763
1792
  "button",
1764
1793
  {
1765
1794
  type: "button",
@@ -1798,26 +1827,26 @@ import {
1798
1827
  useStore as useStore3
1799
1828
  } from "@xyflow/react";
1800
1829
  import { ChevronDown, Hand, MousePointer2, Play } from "lucide-react";
1801
- import { useCallback, useEffect as useEffect5, useMemo, useRef as useRef3, useState as useState7 } from "react";
1830
+ import { useCallback, useEffect as useEffect5, useMemo, useRef as useRef3, useState as useState8 } from "react";
1802
1831
 
1803
1832
  // src/canvas/SectionNode.tsx
1804
1833
  import { useStore as useStore2 } from "@xyflow/react";
1805
1834
  import { memo as memo2 } from "react";
1806
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1835
+ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1807
1836
  var OVERVIEW_TITLE_SCREEN_PX = 15;
1808
1837
  var SectionNodeComponent = ({ data }) => {
1809
1838
  const { onZoomToSection } = useCanvasView();
1810
1839
  const zoom = useStore2((state) => data.isOverview ? Math.round(state.transform[2] * 1e3) / 1e3 : 1);
1811
1840
  if (!data.isOverview) {
1812
- return /* @__PURE__ */ jsx5("div", { className: "pointer-events-none h-full w-full rounded-[64px] bg-card/50 ring-2 ring-foreground/5 backdrop-blur-xl", children: /* @__PURE__ */ jsxs5(
1841
+ return /* @__PURE__ */ jsx6("div", { className: "pointer-events-none h-full w-full rounded-[64px] bg-card/50 ring-2 ring-foreground/5 backdrop-blur-xl", children: /* @__PURE__ */ jsxs6(
1813
1842
  "div",
1814
1843
  {
1815
1844
  className: "flex items-baseline gap-4 overflow-hidden text-ellipsis whitespace-nowrap",
1816
1845
  style: { padding: `${SECTION_PADDING}px ${SECTION_PADDING}px 0` },
1817
1846
  title: data.title,
1818
1847
  children: [
1819
- /* @__PURE__ */ jsx5("span", { className: "text-[56px] leading-none font-bold tracking-tight text-foreground", children: data.title }),
1820
- /* @__PURE__ */ jsxs5("span", { className: "text-[28px] leading-none text-muted-foreground", children: [
1848
+ /* @__PURE__ */ jsx6("span", { className: "text-[56px] leading-none font-bold tracking-tight text-foreground", children: data.title }),
1849
+ /* @__PURE__ */ jsxs6("span", { className: "text-[28px] leading-none text-muted-foreground", children: [
1821
1850
  data.boardCount,
1822
1851
  " boards"
1823
1852
  ] })
@@ -1826,7 +1855,7 @@ var SectionNodeComponent = ({ data }) => {
1826
1855
  ) });
1827
1856
  }
1828
1857
  const titleFontSize = Math.min(OVERVIEW_TITLE_SCREEN_PX / zoom, data.width / 7);
1829
- return /* @__PURE__ */ jsxs5(
1858
+ return /* @__PURE__ */ jsxs6(
1830
1859
  "button",
1831
1860
  {
1832
1861
  type: "button",
@@ -1835,21 +1864,21 @@ var SectionNodeComponent = ({ data }) => {
1835
1864
  className: "flex h-full w-full cursor-zoom-in flex-col overflow-hidden rounded-[64px] bg-card text-left shadow-surface-raised ring-1 ring-foreground/10 transition-shadow hover:ring-[24px] hover:ring-brand/40",
1836
1865
  style: { padding: titleFontSize },
1837
1866
  children: [
1838
- /* @__PURE__ */ jsxs5("span", { className: "block w-full", style: { fontSize: titleFontSize, lineHeight: 1.2 }, children: [
1839
- /* @__PURE__ */ jsx5("span", { className: "line-clamp-2 font-bold text-foreground", children: data.title }),
1840
- /* @__PURE__ */ jsxs5("span", { className: "block text-muted-foreground", style: { fontSize: titleFontSize * 0.8 }, children: [
1867
+ /* @__PURE__ */ jsxs6("span", { className: "block w-full", style: { fontSize: titleFontSize, lineHeight: 1.2 }, children: [
1868
+ /* @__PURE__ */ jsx6("span", { className: "line-clamp-2 font-bold text-foreground", children: data.title }),
1869
+ /* @__PURE__ */ jsxs6("span", { className: "block text-muted-foreground", style: { fontSize: titleFontSize * 0.8 }, children: [
1841
1870
  data.boardCount,
1842
1871
  " boards"
1843
1872
  ] })
1844
1873
  ] }),
1845
- /* @__PURE__ */ jsx5(
1874
+ /* @__PURE__ */ jsx6(
1846
1875
  "span",
1847
1876
  {
1848
1877
  className: "mt-auto grid min-h-0 flex-1 grid-cols-2 content-end",
1849
1878
  style: { gap: titleFontSize * 0.6, paddingTop: titleFontSize * 0.6 },
1850
1879
  children: data.coverUrls.map((coverUrl) => (
1851
1880
  // biome-ignore lint/performance/noImgElement: small cover thumbnails from the API at canvas scale
1852
- /* @__PURE__ */ jsx5(
1881
+ /* @__PURE__ */ jsx6(
1853
1882
  "img",
1854
1883
  {
1855
1884
  src: coverUrl,
@@ -1871,7 +1900,7 @@ var SectionNodeComponent = ({ data }) => {
1871
1900
  var SectionNode = memo2(SectionNodeComponent);
1872
1901
 
1873
1902
  // src/canvas/DesignCanvasFlow.tsx
1874
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1903
+ import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1875
1904
  var NODE_TYPES = { board: BoardNode, section: SectionNode };
1876
1905
  var ZOOM_PRESETS = [0.25, 0.5, 1];
1877
1906
  var MIN_ZOOM = 5e-3;
@@ -1897,8 +1926,8 @@ var ZoomMenu = ({ onFitAll }) => {
1897
1926
  const { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } = useDesignStudioComponents();
1898
1927
  const reactFlow = useReactFlow();
1899
1928
  const zoomPercent = useStore3((state) => Math.round(state.transform[2] * 100));
1900
- return /* @__PURE__ */ jsxs6(DropdownMenu, { modal: false, children: [
1901
- /* @__PURE__ */ jsx6(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs6(
1929
+ return /* @__PURE__ */ jsxs7(DropdownMenu, { modal: false, children: [
1930
+ /* @__PURE__ */ jsx7(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs7(
1902
1931
  "button",
1903
1932
  {
1904
1933
  type: "button",
@@ -1907,19 +1936,19 @@ var ZoomMenu = ({ onFitAll }) => {
1907
1936
  children: [
1908
1937
  zoomPercent,
1909
1938
  "%",
1910
- /* @__PURE__ */ jsx6(ChevronDown, { className: "size-3.5 text-muted-foreground", "aria-hidden": true })
1939
+ /* @__PURE__ */ jsx7(ChevronDown, { className: "size-3.5 text-muted-foreground", "aria-hidden": true })
1911
1940
  ]
1912
1941
  }
1913
1942
  ) }),
1914
- /* @__PURE__ */ jsxs6(DropdownMenuContent, { align: "end", children: [
1915
- ZOOM_PRESETS.map((zoom) => /* @__PURE__ */ jsxs6(DropdownMenuItem, { onSelect: () => void reactFlow.zoomTo(zoom, { duration: 250 }), children: [
1943
+ /* @__PURE__ */ jsxs7(DropdownMenuContent, { align: "end", children: [
1944
+ ZOOM_PRESETS.map((zoom) => /* @__PURE__ */ jsxs7(DropdownMenuItem, { onSelect: () => void reactFlow.zoomTo(zoom, { duration: 250 }), children: [
1916
1945
  Math.round(zoom * 100),
1917
1946
  " %"
1918
1947
  ] }, zoom)),
1919
- /* @__PURE__ */ jsx6(DropdownMenuSeparator, {}),
1920
- /* @__PURE__ */ jsx6(DropdownMenuItem, { onSelect: () => void reactFlow.zoomIn({ duration: 200 }), children: "Zoom in" }),
1921
- /* @__PURE__ */ jsx6(DropdownMenuItem, { onSelect: () => void reactFlow.zoomOut({ duration: 200 }), children: "Zoom out" }),
1922
- /* @__PURE__ */ jsx6(DropdownMenuItem, { onSelect: onFitAll, children: "Fit all" })
1948
+ /* @__PURE__ */ jsx7(DropdownMenuSeparator, {}),
1949
+ /* @__PURE__ */ jsx7(DropdownMenuItem, { onSelect: () => void reactFlow.zoomIn({ duration: 200 }), children: "Zoom in" }),
1950
+ /* @__PURE__ */ jsx7(DropdownMenuItem, { onSelect: () => void reactFlow.zoomOut({ duration: 200 }), children: "Zoom out" }),
1951
+ /* @__PURE__ */ jsx7(DropdownMenuItem, { onSelect: onFitAll, children: "Fit all" })
1923
1952
  ] })
1924
1953
  ] });
1925
1954
  };
@@ -2265,7 +2294,7 @@ var FlowCanvas = ({
2265
2294
  const presentationStart = findSectionPresentationStart(layout.sections, selectedNodeId, sectionInView());
2266
2295
  if (presentationStart) onPresentSection(presentationStart.sectionId, presentationStart.boardId);
2267
2296
  };
2268
- const [marquee, setMarquee] = useState7(null);
2297
+ const [marquee, setMarquee] = useState8(null);
2269
2298
  const isMarqueeJustEndedRef = useRef3(false);
2270
2299
  const startMarquee = (event) => {
2271
2300
  const target = event.target;
@@ -2314,14 +2343,14 @@ var FlowCanvas = ({
2314
2343
  const minimapHeight = Math.round(
2315
2344
  Math.min(180, Math.max(60, MINIMAP_WIDTH * layout.bounds.height / Math.max(1, layout.bounds.width)))
2316
2345
  );
2317
- return /* @__PURE__ */ jsxs6(
2346
+ return /* @__PURE__ */ jsxs7(
2318
2347
  "div",
2319
2348
  {
2320
2349
  ref: containerRef,
2321
2350
  className: cx("relative h-full w-full", tool === "hand" && "cursor-grab active:cursor-grabbing"),
2322
2351
  onPointerDownCapture: startMarquee,
2323
2352
  children: [
2324
- marquee && /* @__PURE__ */ jsx6(
2353
+ marquee && /* @__PURE__ */ jsx7(
2325
2354
  "div",
2326
2355
  {
2327
2356
  "aria-hidden": true,
@@ -2334,7 +2363,7 @@ var FlowCanvas = ({
2334
2363
  }
2335
2364
  }
2336
2365
  ),
2337
- /* @__PURE__ */ jsxs6(
2366
+ /* @__PURE__ */ jsxs7(
2338
2367
  ReactFlow,
2339
2368
  {
2340
2369
  nodes,
@@ -2367,13 +2396,13 @@ var FlowCanvas = ({
2367
2396
  selectionOnDrag: false,
2368
2397
  proOptions: { hideAttribution: true },
2369
2398
  children: [
2370
- /* @__PURE__ */ jsx6(Background, { variant: BackgroundVariant.Dots, gap: 32, size: 1.5, color: "var(--tint-strong)" }),
2371
- /* @__PURE__ */ jsxs6(Panel, { position: "top-left", className: "flex max-w-[calc(100%-32rem)] flex-wrap items-center gap-2", children: [
2372
- /* @__PURE__ */ jsx6("div", { className: TOOLBAR_GROUP_CLASS, role: "toolbar", "aria-label": "Canvas tools", children: [
2399
+ /* @__PURE__ */ jsx7(Background, { variant: BackgroundVariant.Dots, gap: 32, size: 1.5, color: "var(--tint-strong)" }),
2400
+ /* @__PURE__ */ jsxs7(Panel, { position: "top-left", className: "flex max-w-[calc(100%-32rem)] flex-wrap items-center gap-2", children: [
2401
+ /* @__PURE__ */ jsx7("div", { className: TOOLBAR_GROUP_CLASS, role: "toolbar", "aria-label": "Canvas tools", children: [
2373
2402
  ["hand", Hand, "Pan (H / Esc) \u2014 drag moves the canvas, click selects a board"],
2374
2403
  ["select", MousePointer2, "Select area (V) \u2014 drag a rectangle to select boards, Space + drag pans"]
2375
- ].map(([toolName, Icon, label]) => /* @__PURE__ */ jsxs6(Tooltip, { children: [
2376
- /* @__PURE__ */ jsx6(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx6(
2404
+ ].map(([toolName, Icon, label]) => /* @__PURE__ */ jsxs7(Tooltip, { children: [
2405
+ /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7(
2377
2406
  "button",
2378
2407
  {
2379
2408
  type: "button",
@@ -2381,32 +2410,32 @@ var FlowCanvas = ({
2381
2410
  "aria-pressed": tool === toolName,
2382
2411
  onClick: () => onToolChange(toolName),
2383
2412
  className: cx(TOOL_BUTTON_CLASS, tool === toolName && "bg-brand-light text-brand-emphasis"),
2384
- children: /* @__PURE__ */ jsx6(Icon, { className: "size-4" })
2413
+ children: /* @__PURE__ */ jsx7(Icon, { className: "size-4" })
2385
2414
  }
2386
2415
  ) }),
2387
- /* @__PURE__ */ jsx6(TooltipContent, { side: "bottom", children: label })
2416
+ /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: label })
2388
2417
  ] }, toolName)) }),
2389
2418
  toolbarStart
2390
2419
  ] }),
2391
- /* @__PURE__ */ jsx6(Panel, { position: "top-right", children: /* @__PURE__ */ jsxs6("div", { className: TOOLBAR_GROUP_CLASS, children: [
2420
+ /* @__PURE__ */ jsx7(Panel, { position: "top-right", children: /* @__PURE__ */ jsxs7("div", { className: TOOLBAR_GROUP_CLASS, children: [
2392
2421
  toolbarEnd,
2393
- /* @__PURE__ */ jsxs6(Tooltip, { children: [
2394
- /* @__PURE__ */ jsx6(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx6(
2422
+ /* @__PURE__ */ jsxs7(Tooltip, { children: [
2423
+ /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7(
2395
2424
  "button",
2396
2425
  {
2397
2426
  type: "button",
2398
2427
  "aria-label": "Present the section in view",
2399
2428
  onClick: presentCurrentSection,
2400
2429
  className: TOOL_BUTTON_CLASS,
2401
- children: /* @__PURE__ */ jsx6(Play, { className: "size-4" })
2430
+ children: /* @__PURE__ */ jsx7(Play, { className: "size-4" })
2402
2431
  }
2403
2432
  ) }),
2404
- /* @__PURE__ */ jsx6(TooltipContent, { side: "bottom", children: "Present this section (\u2190 / \u2192)" })
2433
+ /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: "Present this section (\u2190 / \u2192)" })
2405
2434
  ] }),
2406
- /* @__PURE__ */ jsx6(ZoomMenu, { onFitAll: fitAll })
2435
+ /* @__PURE__ */ jsx7(ZoomMenu, { onFitAll: fitAll })
2407
2436
  ] }) }),
2408
- /* @__PURE__ */ jsx6(Panel, { position: "bottom-left", className: "pointer-events-none", children: /* @__PURE__ */ jsx6("p", { className: "surface-glass-strong rounded-xl px-3 py-1.5 text-xs text-muted-foreground ring-1 ring-foreground/5", children: "Drag to pan \xB7 Scroll or pinch to zoom \xB7 Click selects \xB7 Double-click opens \xB7 + / \u2212 / 0 \xB7 Shift+1 fits all" }) }),
2409
- !isEverythingVisible && /* @__PURE__ */ jsx6(
2437
+ /* @__PURE__ */ jsx7(Panel, { position: "bottom-left", className: "pointer-events-none", children: /* @__PURE__ */ jsx7("p", { className: "surface-glass-strong rounded-xl px-3 py-1.5 text-xs text-muted-foreground ring-1 ring-foreground/5", children: "Drag to pan \xB7 Scroll or pinch to zoom \xB7 Click selects \xB7 Double-click opens \xB7 + / \u2212 / 0 \xB7 Shift+1 fits all" }) }),
2438
+ !isEverythingVisible && /* @__PURE__ */ jsx7(
2410
2439
  MiniMap,
2411
2440
  {
2412
2441
  pannable: true,
@@ -2430,10 +2459,10 @@ var FlowCanvas = ({
2430
2459
  }
2431
2460
  );
2432
2461
  };
2433
- var DesignCanvasFlow = (props) => /* @__PURE__ */ jsx6(ReactFlowProvider, { children: /* @__PURE__ */ jsx6(FlowCanvas, { ...props }) });
2462
+ var DesignCanvasFlow = (props) => /* @__PURE__ */ jsx7(ReactFlowProvider, { children: /* @__PURE__ */ jsx7(FlowCanvas, { ...props }) });
2434
2463
 
2435
2464
  // src/canvas/DesignStudioCanvasScreen.tsx
2436
- import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
2465
+ import { Fragment as Fragment5, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
2437
2466
  var CANVAS_STATE_KEYS = ["q", "section", "status", "theme", "mode", "vp"];
2438
2467
  var UNCOUNTED_CANVAS_STATE_KEYS = ["q", "theme", "mode", "vp"];
2439
2468
  var LIVE_UPDATE_POLL_MS = 15e3;
@@ -2442,7 +2471,7 @@ var OPEN_RENDER_STATUSES = /* @__PURE__ */ new Set(["QUEUED", "RUNNING", "WAITIN
2442
2471
  var MAX_PRIORITY_BOARDS = 200;
2443
2472
  var LIVE_UPDATE_TOAST_ID = "design-canvas-live-update";
2444
2473
  var usePageVisible = () => {
2445
- const [isVisible, setIsVisible] = useState8(true);
2474
+ const [isVisible, setIsVisible] = useState9(true);
2446
2475
  useEffect6(() => {
2447
2476
  const update = () => setIsVisible(document.visibilityState === "visible");
2448
2477
  update();
@@ -2494,17 +2523,17 @@ var SelectedBoardPanel = ({
2494
2523
  }) => {
2495
2524
  const { Button } = useDesignStudioComponents();
2496
2525
  const texts = useDesignStudioTexts();
2497
- const [showResolved, setShowResolved] = useState8(false);
2498
- return /* @__PURE__ */ jsxs7("div", { className: "space-y-5", children: [
2499
- /* @__PURE__ */ jsxs7("div", { className: "space-y-1", children: [
2500
- board.code && /* @__PURE__ */ jsx7("p", { className: "text-sm font-semibold tabular-nums text-foreground/70", children: board.code }),
2501
- /* @__PURE__ */ jsx7("h2", { className: "text-title-card font-semibold break-words", children: board.title }),
2502
- /* @__PURE__ */ jsxs7("p", { className: "text-xs text-muted-foreground", children: [
2526
+ const [showResolved, setShowResolved] = useState9(false);
2527
+ return /* @__PURE__ */ jsxs8("div", { className: "space-y-5", children: [
2528
+ /* @__PURE__ */ jsxs8("div", { className: "space-y-1", children: [
2529
+ board.code && /* @__PURE__ */ jsx8("p", { className: "text-sm font-semibold tabular-nums text-foreground/70", children: board.code }),
2530
+ /* @__PURE__ */ jsx8("h2", { className: "text-title-card font-semibold break-words", children: board.title }),
2531
+ /* @__PURE__ */ jsxs8("p", { className: "text-xs text-muted-foreground", children: [
2503
2532
  sectionTitle ? `${sectionTitle} \xB7 ` : "",
2504
2533
  board.boardKey
2505
2534
  ] })
2506
2535
  ] }),
2507
- /* @__PURE__ */ jsx7(
2536
+ /* @__PURE__ */ jsx8(
2508
2537
  BoardStatusChips,
2509
2538
  {
2510
2539
  projectKey,
@@ -2515,22 +2544,22 @@ var SelectedBoardPanel = ({
2515
2544
  onStatusChanged
2516
2545
  }
2517
2546
  ),
2518
- /* @__PURE__ */ jsxs7("div", { className: "flex gap-2", children: [
2519
- /* @__PURE__ */ jsxs7(Button, { variant: "outline", className: "flex-1", onClick: onOpen, children: [
2520
- /* @__PURE__ */ jsx7(Maximize22, {}),
2547
+ /* @__PURE__ */ jsxs8("div", { className: "flex gap-2", children: [
2548
+ /* @__PURE__ */ jsxs8(Button, { variant: "outline", className: "flex-1", onClick: onOpen, children: [
2549
+ /* @__PURE__ */ jsx8(Maximize22, {}),
2521
2550
  " Open focus view"
2522
2551
  ] }),
2523
- onCopyLink && /* @__PURE__ */ jsxs7(Button, { variant: "outline", onClick: onCopyLink, "aria-label": `${texts.copyBoardLink}: ${board.code ?? ""}`, children: [
2524
- /* @__PURE__ */ jsx7(Link2, {}),
2552
+ onCopyLink && /* @__PURE__ */ jsxs8(Button, { variant: "outline", onClick: onCopyLink, "aria-label": `${texts.copyBoardLink}: ${board.code ?? ""}`, children: [
2553
+ /* @__PURE__ */ jsx8(Link2, {}),
2525
2554
  " ",
2526
2555
  texts.copyBoardLink
2527
2556
  ] })
2528
2557
  ] }),
2529
- board.contentHash && /* @__PURE__ */ jsxs7("p", { className: "text-xs text-muted-foreground", title: `Content hash of the board file: ${board.contentHash}`, children: [
2558
+ board.contentHash && /* @__PURE__ */ jsxs8("p", { className: "text-xs text-muted-foreground", title: `Content hash of the board file: ${board.contentHash}`, children: [
2530
2559
  "Version ",
2531
- /* @__PURE__ */ jsx7("span", { className: "font-mono", children: shortContentHash(board.contentHash) })
2560
+ /* @__PURE__ */ jsx8("span", { className: "font-mono", children: shortContentHash(board.contentHash) })
2532
2561
  ] }),
2533
- /* @__PURE__ */ jsx7(
2562
+ /* @__PURE__ */ jsx8(
2534
2563
  BoardComments,
2535
2564
  {
2536
2565
  projectKey,
@@ -2580,17 +2609,17 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2580
2609
  const writeSearchParams = router.useSearchParamsWriter();
2581
2610
  const writesAllowed = useCanWrite();
2582
2611
  const isPageVisible = usePageVisible();
2583
- const [statusOverrides, setStatusOverrides] = useState8(/* @__PURE__ */ new Map());
2584
- const [liveBoardIds, setLiveBoardIds] = useState8(/* @__PURE__ */ new Set());
2585
- const [selectedBoardId, setSelectedBoardId] = useState8(null);
2586
- const [selectedBoardIds, setSelectedBoardIds] = useState8(/* @__PURE__ */ new Set());
2587
- const [focusedBoardId, setFocusedBoardId] = useState8(null);
2588
- const [frameHeightMode, setFrameHeightMode] = useState8("viewport");
2589
- const [chosenFocusViewport, setChosenFocusViewport] = useState8(null);
2590
- const [presentSectionId, setPresentSectionId] = useState8(null);
2591
- const [fitRequest, setFitRequest] = useState8(null);
2592
- const [tool, setTool] = useState8("hand");
2593
- const [isCommentsPanelOpen, setIsCommentsPanelOpen] = useState8(
2612
+ const [statusOverrides, setStatusOverrides] = useState9(/* @__PURE__ */ new Map());
2613
+ const [liveBoardIds, setLiveBoardIds] = useState9(/* @__PURE__ */ new Set());
2614
+ const [selectedBoardId, setSelectedBoardId] = useState9(null);
2615
+ const [selectedBoardIds, setSelectedBoardIds] = useState9(/* @__PURE__ */ new Set());
2616
+ const [focusedBoardId, setFocusedBoardId] = useState9(null);
2617
+ const [frameHeightMode, setFrameHeightMode] = useState9("viewport");
2618
+ const [chosenFocusViewport, setChosenFocusViewport] = useState9(null);
2619
+ const [presentSectionId, setPresentSectionId] = useState9(null);
2620
+ const [fitRequest, setFitRequest] = useState9(null);
2621
+ const [tool, setTool] = useState9("hand");
2622
+ const [isCommentsPanelOpen, setIsCommentsPanelOpen] = useState9(
2594
2623
  () => Boolean(searchParams.get(CODE_PARAM)) || storage.read("commentsPanelOpen") !== "0"
2595
2624
  );
2596
2625
  const canvasState = router.useUrlState(CANVAS_STATE_KEYS, {
@@ -2607,16 +2636,16 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2607
2636
  const setSearch = useCallback2((value) => setCanvasStateValue("q", value), [setCanvasStateValue]);
2608
2637
  const setSectionFilter = useCallback2((value) => setCanvasStateValue("section", value), [setCanvasStateValue]);
2609
2638
  const setStatusFilter = useCallback2((value) => setCanvasStateValue("status", value), [setCanvasStateValue]);
2610
- const [isFullscreen, setIsFullscreen] = useState8(false);
2639
+ const [isFullscreen, setIsFullscreen] = useState9(false);
2611
2640
  const canvasAreaRef = useRef4(null);
2612
- const [canvasAspectRatio, setCanvasAspectRatio] = useState8(null);
2641
+ const [canvasAspectRatio, setCanvasAspectRatio] = useState9(null);
2613
2642
  useCollapsedSidebarWhileMounted(shell?.useSidebarCollapsed);
2614
2643
  const debouncedSearch = canvasState.debounced.q;
2615
- const [codeAtLoad] = useState8(() => searchParams.get(CODE_PARAM));
2616
- const [initialViewport] = useState8(
2644
+ const [codeAtLoad] = useState9(() => searchParams.get(CODE_PARAM));
2645
+ const [initialViewport] = useState9(
2617
2646
  () => codeAtLoad ? null : parseViewportParam(canvasState.values.vp)
2618
2647
  );
2619
- const [hasInitialFilterWithViewport] = useState8(
2648
+ const [hasInitialFilterWithViewport] = useState9(
2620
2649
  () => initialViewport !== null && Boolean(canvasState.values.q.trim() || canvasState.values.section || canvasState.values.status)
2621
2650
  );
2622
2651
  const currentViewportRef = useRef4(initialViewport ? formatViewportParam(initialViewport) : null);
@@ -2641,7 +2670,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2641
2670
  const themes = useMemo2(() => themesData?.designThemes.elements ?? [], [themesData]);
2642
2671
  const isDefaultLook = chosenThemeId === null && chosenMode === null;
2643
2672
  const isLookResolved = isDefaultLook || (overviewData !== void 0 || isOverviewError) && (!hasThemes || themesData !== void 0 || isThemesError);
2644
- const [loadedReferenceTheme, setLoadedReferenceTheme] = useState8(void 0);
2673
+ const [loadedReferenceTheme, setLoadedReferenceTheme] = useState9(void 0);
2645
2674
  const referenceTheme = loadedReferenceTheme !== void 0 ? loadedReferenceTheme : canvasSummary?.referenceTheme;
2646
2675
  const referenceLook = useMemo2(() => splitThemeReference(referenceTheme), [referenceTheme]);
2647
2676
  const referenceThemeId = referenceLook?.themeId ?? null;
@@ -2656,7 +2685,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2656
2685
  () => ({ projectKey, canvasKey, ...themeArgument ? { theme: themeArgument } : {} }),
2657
2686
  [projectKey, canvasKey, themeArgument]
2658
2687
  );
2659
- const [isRenderPolling, setIsRenderPolling] = useState8(false);
2688
+ const [isRenderPolling, setIsRenderPolling] = useState9(false);
2660
2689
  const {
2661
2690
  data,
2662
2691
  currentData: currentCanvasData,
@@ -2690,7 +2719,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2690
2719
  [statuses, statusDefinitions]
2691
2720
  );
2692
2721
  const canvasBoards = canvas?.boards?.elements;
2693
- const [shownBoards, setShownBoards] = useState8({
2722
+ const [shownBoards, setShownBoards] = useState9({
2694
2723
  source: void 0,
2695
2724
  themeReference: "",
2696
2725
  boards: [],
@@ -3175,10 +3204,10 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3175
3204
  return () => window.removeEventListener("keydown", onKeyDown);
3176
3205
  }, []);
3177
3206
  const activeFilterCount = (sectionFilter ? 1 : 0) + (statusFilter ? 1 : 0);
3178
- const toolbarStart = /* @__PURE__ */ jsxs7("div", { className: cx(TOOLBAR_GROUP_CLASS2, "min-w-0 pl-3"), children: [
3179
- /* @__PURE__ */ jsxs7("div", { className: "min-w-0 pr-1", children: [
3180
- /* @__PURE__ */ jsx7("h1", { className: "max-w-72 truncate text-sm leading-tight font-semibold", title: canvasName, children: canvasName }),
3181
- /* @__PURE__ */ jsxs7("p", { className: "text-xs leading-tight text-muted-foreground", children: [
3207
+ const toolbarStart = /* @__PURE__ */ jsxs8("div", { className: cx(TOOLBAR_GROUP_CLASS2, "min-w-0 pl-3"), children: [
3208
+ /* @__PURE__ */ jsxs8("div", { className: "min-w-0 pr-1", children: [
3209
+ /* @__PURE__ */ jsx8("h1", { className: "max-w-72 truncate text-sm leading-tight font-semibold", title: canvasName, children: canvasName }),
3210
+ /* @__PURE__ */ jsxs8("p", { className: "text-xs leading-tight text-muted-foreground", children: [
3182
3211
  boards.length,
3183
3212
  " boards \xB7 ",
3184
3213
  layout.sections.length,
@@ -3186,7 +3215,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3186
3215
  matchingBoardIds !== null ? ` \xB7 ${matchingBoardIds.size} matching` : ""
3187
3216
  ] })
3188
3217
  ] }),
3189
- /* @__PURE__ */ jsx7(
3218
+ /* @__PURE__ */ jsx8(
3190
3219
  SearchField,
3191
3220
  {
3192
3221
  size: "sm",
@@ -3198,15 +3227,15 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3198
3227
  className: "w-44"
3199
3228
  }
3200
3229
  ),
3201
- /* @__PURE__ */ jsxs7(Popover, { children: [
3202
- /* @__PURE__ */ jsx7(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs7("button", { type: "button", className: cx(TOOL_BUTTON_CLASS2, activeFilterCount > 0 && "text-brand-emphasis"), "aria-label": "Filters", children: [
3203
- /* @__PURE__ */ jsx7(ListFilter, { className: "size-4" }),
3204
- activeFilterCount > 0 && /* @__PURE__ */ jsx7("span", { className: "absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-primary text-[10px] font-bold text-primary-foreground", children: activeFilterCount })
3230
+ /* @__PURE__ */ jsxs8(Popover, { children: [
3231
+ /* @__PURE__ */ jsx8(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs8("button", { type: "button", className: cx(TOOL_BUTTON_CLASS2, activeFilterCount > 0 && "text-brand-emphasis"), "aria-label": "Filters", children: [
3232
+ /* @__PURE__ */ jsx8(ListFilter, { className: "size-4" }),
3233
+ activeFilterCount > 0 && /* @__PURE__ */ jsx8("span", { className: "absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-primary text-[10px] font-bold text-primary-foreground", children: activeFilterCount })
3205
3234
  ] }) }),
3206
- /* @__PURE__ */ jsxs7(PopoverContent, { align: "start", className: "w-[22rem] space-y-4 p-4", children: [
3207
- /* @__PURE__ */ jsxs7("div", { className: "space-y-1.5", children: [
3208
- /* @__PURE__ */ jsx7("p", { className: "text-[12.5px] font-bold text-muted-foreground", children: "Section" }),
3209
- /* @__PURE__ */ jsx7(
3235
+ /* @__PURE__ */ jsxs8(PopoverContent, { align: "start", className: "w-[22rem] space-y-4 p-4", children: [
3236
+ /* @__PURE__ */ jsxs8("div", { className: "space-y-1.5", children: [
3237
+ /* @__PURE__ */ jsx8("p", { className: "text-[12.5px] font-bold text-muted-foreground", children: "Section" }),
3238
+ /* @__PURE__ */ jsx8(
3210
3239
  Combobox,
3211
3240
  {
3212
3241
  size: "sm",
@@ -3220,9 +3249,9 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3220
3249
  }
3221
3250
  )
3222
3251
  ] }),
3223
- /* @__PURE__ */ jsxs7("div", { className: "space-y-1.5", children: [
3224
- /* @__PURE__ */ jsx7("p", { className: "text-[12.5px] font-bold text-muted-foreground", children: "Status" }),
3225
- /* @__PURE__ */ jsx7(
3252
+ /* @__PURE__ */ jsxs8("div", { className: "space-y-1.5", children: [
3253
+ /* @__PURE__ */ jsx8("p", { className: "text-[12.5px] font-bold text-muted-foreground", children: "Status" }),
3254
+ /* @__PURE__ */ jsx8(
3226
3255
  QuickFilterPills,
3227
3256
  {
3228
3257
  options: statusFilterOptions,
@@ -3234,7 +3263,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3234
3263
  }
3235
3264
  )
3236
3265
  ] }),
3237
- activeFilterCount > 0 && /* @__PURE__ */ jsx7(
3266
+ activeFilterCount > 0 && /* @__PURE__ */ jsx8(
3238
3267
  Button,
3239
3268
  {
3240
3269
  size: "sm",
@@ -3249,9 +3278,9 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3249
3278
  ] })
3250
3279
  ] })
3251
3280
  ] });
3252
- const toolbarEnd = /* @__PURE__ */ jsxs7(Fragment4, { children: [
3253
- hasResponsiveBoards && /* @__PURE__ */ jsxs7(Tooltip, { children: [
3254
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7(
3281
+ const toolbarEnd = /* @__PURE__ */ jsxs8(Fragment5, { children: [
3282
+ hasResponsiveBoards && /* @__PURE__ */ jsxs8(Tooltip, { children: [
3283
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx8(
3255
3284
  "button",
3256
3285
  {
3257
3286
  type: "button",
@@ -3259,13 +3288,13 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3259
3288
  "aria-pressed": frameHeightMode === "page",
3260
3289
  "aria-label": frameHeightMode === "page" ? "Device frames: whole page" : "Device frames: one screen",
3261
3290
  onClick: () => setFrameHeightMode((mode) => mode === "page" ? "viewport" : "page"),
3262
- children: frameHeightMode === "page" ? /* @__PURE__ */ jsx7(FoldVertical, { className: "size-4" }) : /* @__PURE__ */ jsx7(UnfoldVertical, { className: "size-4" })
3291
+ children: frameHeightMode === "page" ? /* @__PURE__ */ jsx8(FoldVertical, { className: "size-4" }) : /* @__PURE__ */ jsx8(UnfoldVertical, { className: "size-4" })
3263
3292
  }
3264
3293
  ) }),
3265
- /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: frameHeightMode === "page" ? "Responsive boards: whole page \u2014 show one screen per device" : "Responsive boards: one screen \u2014 show the whole page per device" })
3294
+ /* @__PURE__ */ jsx8(TooltipContent, { side: "bottom", children: frameHeightMode === "page" ? "Responsive boards: whole page \u2014 show one screen per device" : "Responsive boards: one screen \u2014 show the whole page per device" })
3266
3295
  ] }),
3267
- /* @__PURE__ */ jsxs7(Tooltip, { children: [
3268
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7(
3296
+ /* @__PURE__ */ jsxs8(Tooltip, { children: [
3297
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx8(
3269
3298
  "button",
3270
3299
  {
3271
3300
  type: "button",
@@ -3274,13 +3303,13 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3274
3303
  "aria-keyshortcuts": "r",
3275
3304
  "aria-busy": isFetchingCanvas,
3276
3305
  onClick: () => void reloadCanvas(),
3277
- children: /* @__PURE__ */ jsx7(RefreshCw, { className: cx("size-4", isFetchingCanvas && "animate-spin motion-reduce:animate-none") })
3306
+ children: /* @__PURE__ */ jsx8(RefreshCw, { className: cx("size-4", isFetchingCanvas && "animate-spin motion-reduce:animate-none") })
3278
3307
  }
3279
3308
  ) }),
3280
- /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: texts.reload })
3309
+ /* @__PURE__ */ jsx8(TooltipContent, { side: "bottom", children: texts.reload })
3281
3310
  ] }),
3282
- /* @__PURE__ */ jsxs7(Tooltip, { children: [
3283
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7("span", { children: /* @__PURE__ */ jsxs7(
3311
+ /* @__PURE__ */ jsxs8(Tooltip, { children: [
3312
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx8("span", { children: /* @__PURE__ */ jsxs8(
3284
3313
  "button",
3285
3314
  {
3286
3315
  type: "button",
@@ -3289,14 +3318,14 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3289
3318
  "aria-label": `Copy reference of ${selectedBoardIds.size} selected board(s) for an agent (C)`,
3290
3319
  onClick: copySelectedReferences,
3291
3320
  children: [
3292
- /* @__PURE__ */ jsx7(ClipboardCopy4, { className: "size-4" }),
3293
- selectedBoardIds.size > 1 && /* @__PURE__ */ jsx7("span", { className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-brand px-1 text-[10px] font-bold text-foreground", children: selectedBoardIds.size })
3321
+ /* @__PURE__ */ jsx8(ClipboardCopy4, { className: "size-4" }),
3322
+ selectedBoardIds.size > 1 && /* @__PURE__ */ jsx8("span", { className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-brand px-1 text-[10px] font-bold text-foreground", children: selectedBoardIds.size })
3294
3323
  ]
3295
3324
  }
3296
3325
  ) }) }),
3297
- /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: selectedBoardIds.size === 0 ? "Select boards to copy their reference" : "Copy reference for an agent (C)" })
3326
+ /* @__PURE__ */ jsx8(TooltipContent, { side: "bottom", children: selectedBoardIds.size === 0 ? "Select boards to copy their reference" : "Copy reference for an agent (C)" })
3298
3327
  ] }),
3299
- hasThemes && themes.length > 0 && /* @__PURE__ */ jsx7(
3328
+ hasThemes && themes.length > 0 && /* @__PURE__ */ jsx8(
3300
3329
  Combobox,
3301
3330
  {
3302
3331
  shape: "pill",
@@ -3311,8 +3340,8 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3311
3340
  className: "w-44"
3312
3341
  }
3313
3342
  ),
3314
- isRendererEnabled && missingThumbnailCount > 0 && renderStatus !== null && renderStatus !== "DONE" ? /* @__PURE__ */ jsxs7(Tooltip, { children: [
3315
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs7(
3343
+ isRendererEnabled && missingThumbnailCount > 0 && renderStatus !== null && renderStatus !== "DONE" ? /* @__PURE__ */ jsxs8(Tooltip, { children: [
3344
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs8(
3316
3345
  "button",
3317
3346
  {
3318
3347
  type: "button",
@@ -3320,7 +3349,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3320
3349
  className: "flex h-8 shrink-0 items-center gap-1.5 rounded-full bg-tint px-3 text-xs font-semibold text-muted-foreground transition-colors enabled:hover:bg-tint-strong enabled:hover:text-foreground",
3321
3350
  onClick: () => fileRenderRequest(true),
3322
3351
  children: [
3323
- renderStatus === "FAILED" ? /* @__PURE__ */ jsx7(ImageDown, { className: "size-4", "aria-hidden": true }) : /* @__PURE__ */ jsx7(LoaderCircle, { className: "size-4 animate-spin motion-reduce:animate-none", "aria-hidden": true }),
3352
+ renderStatus === "FAILED" ? /* @__PURE__ */ jsx8(ImageDown, { className: "size-4", "aria-hidden": true }) : /* @__PURE__ */ jsx8(LoaderCircle, { className: "size-4 animate-spin motion-reduce:animate-none", "aria-hidden": true }),
3324
3353
  renderStatus === "FAILED" ? texts.thumbnailsFailed : renderStatus === "WAITING_FOR_RENDERER" ? texts.thumbnailsWaitingForRenderer(shownThemeLabel) : texts.thumbnailsRendering(shownThemeLabel),
3325
3354
  " ",
3326
3355
  "\xB7 ",
@@ -3330,13 +3359,13 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3330
3359
  ]
3331
3360
  }
3332
3361
  ) }),
3333
- /* @__PURE__ */ jsxs7(TooltipContent, { side: "bottom", className: "max-w-sm", children: [
3362
+ /* @__PURE__ */ jsxs8(TooltipContent, { side: "bottom", className: "max-w-sm", children: [
3334
3363
  texts.thumbnailsMissing(missingThumbnailCount),
3335
3364
  canvas?.renderRequestError ? ` ${texts.thumbnailsLastError(canvas.renderRequestError)}` : ""
3336
3365
  ] })
3337
3366
  ] }) : null,
3338
- hasThemes && themes.length > 0 && /* @__PURE__ */ jsxs7(Tooltip, { children: [
3339
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7("span", { children: /* @__PURE__ */ jsx7(
3367
+ hasThemes && themes.length > 0 && /* @__PURE__ */ jsxs8(Tooltip, { children: [
3368
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx8("span", { children: /* @__PURE__ */ jsx8(
3340
3369
  "button",
3341
3370
  {
3342
3371
  type: "button",
@@ -3348,13 +3377,13 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3348
3377
  const nextMode = effectiveMode === "dark" ? "light" : "dark";
3349
3378
  setCanvasStateValue("mode", nextMode === defaultMode ? "" : nextMode);
3350
3379
  },
3351
- children: effectiveMode === "dark" ? /* @__PURE__ */ jsx7(Sun, { className: "size-4" }) : /* @__PURE__ */ jsx7(Moon, { className: "size-4" })
3380
+ children: effectiveMode === "dark" ? /* @__PURE__ */ jsx8(Sun, { className: "size-4" }) : /* @__PURE__ */ jsx8(Moon, { className: "size-4" })
3352
3381
  }
3353
3382
  ) }) }),
3354
- /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: supportsDark ? effectiveMode === "dark" ? "Light theme" : "Dark theme" : texts.themeWithoutDarkMode })
3383
+ /* @__PURE__ */ jsx8(TooltipContent, { side: "bottom", children: supportsDark ? effectiveMode === "dark" ? "Light theme" : "Dark theme" : texts.themeWithoutDarkMode })
3355
3384
  ] }),
3356
- /* @__PURE__ */ jsxs7(Tooltip, { children: [
3357
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs7(
3385
+ /* @__PURE__ */ jsxs8(Tooltip, { children: [
3386
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs8(
3358
3387
  "button",
3359
3388
  {
3360
3389
  type: "button",
@@ -3363,15 +3392,15 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3363
3392
  "aria-pressed": isCommentsPanelOpen,
3364
3393
  onClick: toggleCommentsPanel,
3365
3394
  children: [
3366
- isCommentsPanelOpen ? /* @__PURE__ */ jsx7(PanelRightClose, { className: "size-4" }) : /* @__PURE__ */ jsx7(PanelRightOpen, { className: "size-4" }),
3367
- openThreadTotal > 0 && /* @__PURE__ */ jsx7("span", { className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-bold text-primary-foreground", children: openThreadTotal })
3395
+ isCommentsPanelOpen ? /* @__PURE__ */ jsx8(PanelRightClose, { className: "size-4" }) : /* @__PURE__ */ jsx8(PanelRightOpen, { className: "size-4" }),
3396
+ openThreadTotal > 0 && /* @__PURE__ */ jsx8("span", { className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-bold text-primary-foreground", children: openThreadTotal })
3368
3397
  ]
3369
3398
  }
3370
3399
  ) }),
3371
- /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: isCommentsPanelOpen ? "Hide comments" : "Show comments" })
3400
+ /* @__PURE__ */ jsx8(TooltipContent, { side: "bottom", children: isCommentsPanelOpen ? "Hide comments" : "Show comments" })
3372
3401
  ] }),
3373
- /* @__PURE__ */ jsxs7(Tooltip, { children: [
3374
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7(
3402
+ /* @__PURE__ */ jsxs8(Tooltip, { children: [
3403
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx8(
3375
3404
  "button",
3376
3405
  {
3377
3406
  type: "button",
@@ -3379,13 +3408,13 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3379
3408
  "aria-label": isFullscreen ? "Exit fullscreen (F)" : "Fullscreen (F)",
3380
3409
  "aria-pressed": isFullscreen,
3381
3410
  onClick: () => setIsFullscreen((value) => !value),
3382
- children: isFullscreen ? /* @__PURE__ */ jsx7(Minimize, { className: "size-4" }) : /* @__PURE__ */ jsx7(Maximize, { className: "size-4" })
3411
+ children: isFullscreen ? /* @__PURE__ */ jsx8(Minimize, { className: "size-4" }) : /* @__PURE__ */ jsx8(Maximize, { className: "size-4" })
3383
3412
  }
3384
3413
  ) }),
3385
- /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: isFullscreen ? "Exit fullscreen (F)" : "Fullscreen (F)" })
3414
+ /* @__PURE__ */ jsx8(TooltipContent, { side: "bottom", children: isFullscreen ? "Exit fullscreen (F)" : "Fullscreen (F)" })
3386
3415
  ] })
3387
3416
  ] });
3388
- return /* @__PURE__ */ jsxs7(
3417
+ return /* @__PURE__ */ jsxs8(
3389
3418
  "div",
3390
3419
  {
3391
3420
  "data-page-frame": true,
@@ -3396,7 +3425,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3396
3425
  isFullscreen && "fixed inset-0 z-40 h-dvh bg-background"
3397
3426
  ),
3398
3427
  children: [
3399
- error && /* @__PURE__ */ jsx7("div", { className: "p-6", children: /* @__PURE__ */ jsx7(
3428
+ error && /* @__PURE__ */ jsx8("div", { className: "p-6", children: /* @__PURE__ */ jsx8(
3400
3429
  StatusCallout,
3401
3430
  {
3402
3431
  tone: "destructive",
@@ -3404,9 +3433,9 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3404
3433
  description: normalizeDddError3(error, "Request failed").message
3405
3434
  }
3406
3435
  ) }),
3407
- (isLoading || !isLookResolved && !canvas) && /* @__PURE__ */ jsx7(Skeleton, { className: "m-6 flex-1 rounded-2xl" }),
3408
- canvas && /* @__PURE__ */ jsxs7(CanvasViewContext.Provider, { value: canvasView, children: [
3409
- /* @__PURE__ */ jsx7("div", { ref: canvasAreaRef, className: "relative min-h-[480px] min-w-0 flex-1", children: canvasAspectRatio !== null && /* @__PURE__ */ jsx7(
3436
+ (isLoading || !isLookResolved && !canvas) && /* @__PURE__ */ jsx8(Skeleton, { className: "m-6 flex-1 rounded-2xl" }),
3437
+ canvas && /* @__PURE__ */ jsxs8(CanvasViewContext.Provider, { value: canvasView, children: [
3438
+ /* @__PURE__ */ jsx8("div", { ref: canvasAreaRef, className: "relative min-h-[480px] min-w-0 flex-1", children: canvasAspectRatio !== null && /* @__PURE__ */ jsx8(
3410
3439
  DesignCanvasFlow,
3411
3440
  {
3412
3441
  layout,
@@ -3428,7 +3457,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3428
3457
  selectedNodeId: selectedBoardId
3429
3458
  }
3430
3459
  ) }),
3431
- isCommentsPanelOpen && /* @__PURE__ */ jsx7("aside", { className: "surface-glass-strong m-3 shrink-0 overflow-y-auto rounded-3xl p-5 ring-1 ring-foreground/5 lg:my-3 lg:ml-0 lg:w-[380px]", children: selectedBoard ? /* @__PURE__ */ jsx7(
3460
+ isCommentsPanelOpen && /* @__PURE__ */ jsx8("aside", { className: "surface-glass-strong m-3 shrink-0 overflow-y-auto rounded-3xl p-5 ring-1 ring-foreground/5 lg:my-3 lg:ml-0 lg:w-[380px]", children: selectedBoard ? /* @__PURE__ */ jsx8(
3432
3461
  SelectedBoardPanel,
3433
3462
  {
3434
3463
  projectKey,
@@ -3444,13 +3473,13 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3444
3473
  onCopyThreadReference: copyThreadReference
3445
3474
  },
3446
3475
  selectedBoard.boardKey ?? ""
3447
- ) : /* @__PURE__ */ jsxs7("div", { className: "space-y-4", children: [
3448
- /* @__PURE__ */ jsxs7("div", { children: [
3449
- /* @__PURE__ */ jsx7("h2", { className: "text-title-card font-semibold", children: "Open comments" }),
3450
- /* @__PURE__ */ jsx7("p", { className: "text-sm text-muted-foreground", children: "Click a board to see its status and comments, double-click to open it large." })
3476
+ ) : /* @__PURE__ */ jsxs8("div", { className: "space-y-4", children: [
3477
+ /* @__PURE__ */ jsxs8("div", { children: [
3478
+ /* @__PURE__ */ jsx8("h2", { className: "text-title-card font-semibold", children: "Open comments" }),
3479
+ /* @__PURE__ */ jsx8("p", { className: "text-sm text-muted-foreground", children: "Click a board to see its status and comments, double-click to open it large." })
3451
3480
  ] }),
3452
- boardsWithOpenThreads.length === 0 && /* @__PURE__ */ jsx7("p", { className: "text-sm text-muted-foreground", children: "No open comments on this canvas." }),
3453
- /* @__PURE__ */ jsx7("ul", { className: "space-y-1", children: boardsWithOpenThreads.map((nodeId) => /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsxs7(
3481
+ boardsWithOpenThreads.length === 0 && /* @__PURE__ */ jsx8("p", { className: "text-sm text-muted-foreground", children: "No open comments on this canvas." }),
3482
+ /* @__PURE__ */ jsx8("ul", { className: "space-y-1", children: boardsWithOpenThreads.map((nodeId) => /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsxs8(
3454
3483
  "button",
3455
3484
  {
3456
3485
  type: "button",
@@ -3460,9 +3489,9 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3460
3489
  requestFit([nodeId]);
3461
3490
  },
3462
3491
  children: [
3463
- /* @__PURE__ */ jsx7("span", { className: "truncate", children: boardsByNodeId.get(nodeId)?.title }),
3464
- /* @__PURE__ */ jsxs7("span", { className: "inline-flex shrink-0 items-center gap-1 text-xs font-semibold text-muted-foreground", children: [
3465
- /* @__PURE__ */ jsx7(MessageSquare2, { className: "size-3.5", "aria-hidden": true }),
3492
+ /* @__PURE__ */ jsx8("span", { className: "truncate", children: boardsByNodeId.get(nodeId)?.title }),
3493
+ /* @__PURE__ */ jsxs8("span", { className: "inline-flex shrink-0 items-center gap-1 text-xs font-semibold text-muted-foreground", children: [
3494
+ /* @__PURE__ */ jsx8(MessageSquare2, { className: "size-3.5", "aria-hidden": true }),
3466
3495
  " ",
3467
3496
  openThreadCounts.get(nodeId)
3468
3497
  ] })
@@ -3471,7 +3500,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
3471
3500
  ) }, nodeId)) })
3472
3501
  ] }) })
3473
3502
  ] }),
3474
- /* @__PURE__ */ jsx7(
3503
+ /* @__PURE__ */ jsx8(
3475
3504
  BoardFocusView,
3476
3505
  {
3477
3506
  projectKey,