@mgamadeus/ddd-design-studio 0.6.1 → 0.7.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.
@@ -33,10 +33,10 @@ import {
33
33
  viewportOfComment,
34
34
  viewportWithWidth,
35
35
  wasContentUrlLoaded
36
- } from "../chunk-GPHJ2WQ3.js";
36
+ } from "../chunk-BLRROGEA.js";
37
37
 
38
38
  // src/canvas/DesignStudioCanvasScreen.tsx
39
- import { normalizeDddError as normalizeDddError2 } from "@mgamadeus/ddd-web/api";
39
+ import { normalizeDddError as normalizeDddError3 } from "@mgamadeus/ddd-web/api";
40
40
  import {
41
41
  ClipboardCopy as ClipboardCopy3,
42
42
  ImageDown,
@@ -56,7 +56,7 @@ import {
56
56
  Globe,
57
57
  UnfoldVertical
58
58
  } from "lucide-react";
59
- import { useCallback as useCallback2, useEffect as useEffect5, useMemo as useMemo2, useRef as useRef4, useState as useState7 } from "react";
59
+ import { useCallback as useCallback2, useEffect as useEffect6, useMemo as useMemo2, useRef as useRef4, useState as useState8 } from "react";
60
60
 
61
61
  // src/canvas/BoardFocusView.tsx
62
62
  import {
@@ -68,7 +68,7 @@ import {
68
68
  SquareDashedMousePointer,
69
69
  X
70
70
  } from "lucide-react";
71
- import { useEffect as useEffect3, useRef as useRef2, useState as useState5 } from "react";
71
+ import { useEffect as useEffect4, useRef as useRef2, useState as useState6 } from "react";
72
72
 
73
73
  // src/canvas/BoardNode.tsx
74
74
  import { useStore } from "@xyflow/react";
@@ -838,8 +838,99 @@ var BoardStatusChips = ({
838
838
  ] });
839
839
  };
840
840
 
841
- // src/canvas/BoardFocusView.tsx
841
+ // src/canvas/BoardSvgExport.tsx
842
+ import { normalizeDddError as normalizeDddError2 } from "@mgamadeus/ddd-web/api";
843
+ import { FileDown } from "lucide-react";
844
+ import { useEffect as useEffect3, useState as useState5 } from "react";
845
+
846
+ // src/canvas/svgExportFile.ts
847
+ var formatByteSize = (byteSize) => byteSize >= 1024 * 1024 ? `${(byteSize / 1024 / 1024).toFixed(1)} MB` : `${Math.max(1, Math.round(byteSize / 1024))} KB`;
848
+ var formatPixelShare = (ratio) => `${(Math.max(0, ratio) * 100).toFixed(1)} %`;
849
+ var describeRasterSize = (rasterWebpByteSize, rasterPngByteSize) => rasterWebpByteSize != null ? `WebP ${formatByteSize(rasterWebpByteSize)}` : `PNG ${formatByteSize(rasterPngByteSize ?? 0)}`;
850
+ var downloadSvg = (svg, fileName) => {
851
+ const url = URL.createObjectURL(new Blob([svg], { type: "image/svg+xml" }));
852
+ const link = document.createElement("a");
853
+ link.href = url;
854
+ link.download = fileName;
855
+ document.body.appendChild(link);
856
+ link.click();
857
+ link.remove();
858
+ setTimeout(() => URL.revokeObjectURL(url), 0);
859
+ };
860
+
861
+ // src/canvas/BoardSvgExport.tsx
842
862
  import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
863
+ var BoardSvgExport = ({
864
+ useExportBoardAsSvgMutation,
865
+ projectKey,
866
+ canvasKey,
867
+ boardKey,
868
+ themeReference,
869
+ themeLabel,
870
+ region,
871
+ deviceKey
872
+ }) => {
873
+ const { components, notify } = useDesignStudio();
874
+ const texts = useDesignStudioTexts();
875
+ const { Button, Popover, PopoverTrigger, PopoverContent } = components;
876
+ const [exportBoardAsSvg, { isLoading }] = useExportBoardAsSvgMutation();
877
+ const [svgExport, setSvgExport] = useState5(null);
878
+ const scopeKey = `${boardKey}|${themeReference ?? ""}|${region ? `${region.x},${region.y},${region.width},${region.height}` : ""}|${deviceKey ?? ""}`;
879
+ useEffect3(() => {
880
+ void scopeKey;
881
+ setSvgExport(null);
882
+ }, [scopeKey]);
883
+ const startExport = async () => {
884
+ try {
885
+ const response = await exportBoardAsSvg({
886
+ projectKey,
887
+ canvasKey,
888
+ boardKey,
889
+ body: {
890
+ theme: themeReference,
891
+ region: region ? { x: Math.round(region.x), y: Math.round(region.y), width: Math.round(region.width), height: Math.round(region.height) } : null,
892
+ device: deviceKey
893
+ }
894
+ }).unwrap();
895
+ setSvgExport(response.designStudioBoardSvgExport);
896
+ } catch (error) {
897
+ notify.error(normalizeDddError2(error, "Export failed").message);
898
+ }
899
+ };
900
+ return /* @__PURE__ */ jsxs4(Popover, { children: [
901
+ /* @__PURE__ */ jsx4(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs4(Button, { variant: "outline", size: "sm", "aria-label": texts.exportSvgTitle, children: [
902
+ /* @__PURE__ */ jsx4(FileDown, {}),
903
+ texts.exportSvg
904
+ ] }) }),
905
+ /* @__PURE__ */ jsx4(PopoverContent, { align: "end", className: "w-[min(36rem,calc(100vw-2rem))]", children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-3", children: [
906
+ /* @__PURE__ */ jsxs4("div", { children: [
907
+ /* @__PURE__ */ jsx4("p", { className: "text-sm font-semibold", children: texts.exportSvgTitle }),
908
+ /* @__PURE__ */ jsx4("p", { className: "text-xs text-muted-foreground", children: texts.exportSvgScope(themeLabel, region !== null) })
909
+ ] }),
910
+ svgExport ? /* @__PURE__ */ jsxs4(Fragment3, { children: [
911
+ svgExport.comparisonImageDataUrl && // biome-ignore lint/performance/noImgElement: a data URL of the renderer's comparison picture
912
+ /* @__PURE__ */ jsx4("img", { src: svgExport.comparisonImageDataUrl, alt: "", className: "max-h-[50vh] w-full rounded-md object-contain ring-1 ring-foreground/10" }),
913
+ /* @__PURE__ */ jsx4("p", { className: "text-xs text-muted-foreground", children: texts.exportSvgLostEffects }),
914
+ /* @__PURE__ */ jsxs4("p", { className: "text-sm", children: [
915
+ texts.exportSvgSizes(
916
+ formatByteSize(svgExport.svgByteSize ?? 0),
917
+ formatByteSize(svgExport.svgGzipByteSize ?? 0),
918
+ describeRasterSize(svgExport.rasterWebpByteSize, svgExport.rasterPngByteSize)
919
+ ),
920
+ /* @__PURE__ */ jsx4("br", {}),
921
+ texts.exportSvgDiffering(formatPixelShare(svgExport.differingPixelRatio ?? 0))
922
+ ] }),
923
+ /* @__PURE__ */ jsxs4(Button, { size: "sm", onClick: () => svgExport.svg && downloadSvg(svgExport.svg, svgExport.fileName ?? "board.svg"), children: [
924
+ /* @__PURE__ */ jsx4(FileDown, {}),
925
+ texts.exportSvgDownload
926
+ ] })
927
+ ] }) : /* @__PURE__ */ jsx4(Button, { size: "sm", disabled: isLoading, onClick: () => void startExport(), children: isLoading ? texts.exportSvgRunning : texts.exportSvgStart })
928
+ ] }) })
929
+ ] });
930
+ };
931
+
932
+ // src/canvas/BoardFocusView.tsx
933
+ import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
843
934
  var DEVICE_SCREEN_HEIGHT = 844;
844
935
  var BoardFocusView = ({
845
936
  projectKey,
@@ -859,22 +950,25 @@ var BoardFocusView = ({
859
950
  onNext,
860
951
  onStatusChanged,
861
952
  onCopyReference,
862
- onCopyThreadReference
953
+ onCopyThreadReference,
954
+ themeReference = null,
955
+ themeLabel = "",
956
+ isRendererEnabled = false
863
957
  }) => {
864
- const { apiBaseUrl, components } = useDesignStudio();
958
+ const { api, apiBaseUrl, components } = useDesignStudio();
865
959
  const texts = useDesignStudioTexts();
866
960
  const { Button, Dialog, DialogContent, DialogDescription, DialogTitle, Textarea } = components;
867
- const [isPlacingPin, setIsPlacingPin] = useState5(false);
868
- const [pendingPin, setPendingPin] = useState5(null);
869
- const [highlightedCommentId, setHighlightedCommentId] = useState5(null);
870
- const [showResolved, setShowResolved] = useState5(false);
871
- const [isMarkingRegion, setIsMarkingRegion] = useState5(false);
872
- const [region, setRegion] = useState5(null);
873
- const [regionDraft, setRegionDraft] = useState5(null);
874
- const [referenceNote, setReferenceNote] = useState5("");
875
- const [isRegionFlashing, setIsRegionFlashing] = useState5(false);
961
+ const [isPlacingPin, setIsPlacingPin] = useState6(false);
962
+ const [pendingPin, setPendingPin] = useState6(null);
963
+ const [highlightedCommentId, setHighlightedCommentId] = useState6(null);
964
+ const [showResolved, setShowResolved] = useState6(false);
965
+ const [isMarkingRegion, setIsMarkingRegion] = useState6(false);
966
+ const [region, setRegion] = useState6(null);
967
+ const [regionDraft, setRegionDraft] = useState6(null);
968
+ const [referenceNote, setReferenceNote] = useState6("");
969
+ const [isRegionFlashing, setIsRegionFlashing] = useState6(false);
876
970
  const boardKey = board?.boardKey ?? null;
877
- useEffect3(() => {
971
+ useEffect4(() => {
878
972
  if (boardKey === null) return;
879
973
  setPendingPin(null);
880
974
  setIsPlacingPin(false);
@@ -884,7 +978,7 @@ var BoardFocusView = ({
884
978
  setIsMarkingRegion(false);
885
979
  setReferenceNote("");
886
980
  }, [boardKey]);
887
- useEffect3(() => {
981
+ useEffect4(() => {
888
982
  if (!board) return;
889
983
  const onKeyDown = (event) => {
890
984
  const target = event.target;
@@ -907,10 +1001,10 @@ var BoardFocusView = ({
907
1001
  return () => window.removeEventListener("keydown", onKeyDown);
908
1002
  });
909
1003
  const isResponsive = isResponsiveBoard(board) && viewport !== null;
910
- const [showsDeviceFrame, setShowsDeviceFrame] = useState5(true);
1004
+ const [showsDeviceFrame, setShowsDeviceFrame] = useState6(true);
911
1005
  const stageRef = useRef2(null);
912
- const [stageWidth, setStageWidth] = useState5(0);
913
- useEffect3(() => {
1006
+ const [stageWidth, setStageWidth] = useState6(0);
1007
+ useEffect4(() => {
914
1008
  const stage = stageRef.current;
915
1009
  if (!stage || typeof ResizeObserver === "undefined") return;
916
1010
  const observer = new ResizeObserver(() => setStageWidth(stage.clientWidth));
@@ -927,9 +1021,9 @@ var BoardFocusView = ({
927
1021
  const boardHtmlPath = board?.htmlUrl ? isResponsive ? `${board.htmlUrl}&site=1` : board.htmlUrl : null;
928
1022
  const htmlUrl = useCheckedContentUrl(useStableContentUrl(designContentUrl(apiBaseUrl, boardHtmlPath), true));
929
1023
  const frameRef = useRef2(null);
930
- const [frameScrollTop, setFrameScrollTop] = useState5(0);
931
- useEffect3(() => setFrameScrollTop(0), [htmlUrl, width]);
932
- useEffect3(() => {
1024
+ const [frameScrollTop, setFrameScrollTop] = useState6(0);
1025
+ useEffect4(() => setFrameScrollTop(0), [htmlUrl, width]);
1026
+ useEffect4(() => {
933
1027
  if (!isResponsive) return;
934
1028
  const onMessage = (event) => {
935
1029
  if (!frameRef.current || event.source !== frameRef.current.contentWindow) return;
@@ -1002,16 +1096,16 @@ var BoardFocusView = ({
1002
1096
  });
1003
1097
  setIsPlacingPin(false);
1004
1098
  };
1005
- return /* @__PURE__ */ jsx4(Dialog, { open: board !== null, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsx4(
1099
+ return /* @__PURE__ */ jsx5(Dialog, { open: board !== null, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsx5(
1006
1100
  DialogContent,
1007
1101
  {
1008
1102
  showCloseButton: false,
1009
1103
  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",
1010
- children: board && /* @__PURE__ */ jsxs4(Fragment3, { children: [
1011
- /* @__PURE__ */ jsxs4("header", { className: "flex flex-wrap items-center gap-3 border-b border-border px-5 py-3", children: [
1012
- /* @__PURE__ */ jsxs4("div", { className: "min-w-0 flex-1", children: [
1013
- /* @__PURE__ */ jsx4(DialogTitle, { className: "truncate text-lg font-semibold", children: board.title }),
1014
- /* @__PURE__ */ jsxs4(DialogDescription, { className: "truncate text-xs", children: [
1104
+ children: board && /* @__PURE__ */ jsxs5(Fragment4, { children: [
1105
+ /* @__PURE__ */ jsxs5("header", { className: "flex flex-wrap items-center gap-3 border-b border-border px-5 py-3", children: [
1106
+ /* @__PURE__ */ jsxs5("div", { className: "min-w-0 flex-1", children: [
1107
+ /* @__PURE__ */ jsx5(DialogTitle, { className: "truncate text-lg font-semibold", children: board.title }),
1108
+ /* @__PURE__ */ jsxs5(DialogDescription, { className: "truncate text-xs", children: [
1015
1109
  presentLabel ? "Present \xB7 " : "",
1016
1110
  sectionTitle ? `${sectionTitle} \xB7 ` : "",
1017
1111
  board.boardKey,
@@ -1023,7 +1117,7 @@ var BoardFocusView = ({
1023
1117
  position.count
1024
1118
  ] })
1025
1119
  ] }),
1026
- /* @__PURE__ */ jsx4(
1120
+ /* @__PURE__ */ jsx5(
1027
1121
  BoardStatusChips,
1028
1122
  {
1029
1123
  projectKey,
@@ -1034,15 +1128,28 @@ var BoardFocusView = ({
1034
1128
  onStatusChanged
1035
1129
  }
1036
1130
  ),
1037
- /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-1", children: [
1038
- /* @__PURE__ */ jsx4(Button, { variant: "outline", size: "icon", "aria-label": "Previous board (\u2190)", onClick: onPrevious, children: /* @__PURE__ */ jsx4(ChevronLeft, {}) }),
1039
- /* @__PURE__ */ jsx4(Button, { variant: "outline", size: "icon", "aria-label": "Next board (\u2192)", onClick: onNext, children: /* @__PURE__ */ jsx4(ChevronRight, {}) }),
1040
- /* @__PURE__ */ jsx4(Button, { variant: "ghost", size: "icon", "aria-label": "Close focus view", onClick: onClose, children: /* @__PURE__ */ jsx4(X, {}) })
1131
+ isRendererEnabled && api.useExportBoardAsSvgMutation && board.boardKey && /* @__PURE__ */ jsx5(
1132
+ BoardSvgExport,
1133
+ {
1134
+ useExportBoardAsSvgMutation: api.useExportBoardAsSvgMutation,
1135
+ projectKey,
1136
+ canvasKey,
1137
+ boardKey: board.boardKey,
1138
+ themeReference,
1139
+ themeLabel: themeLabel || texts.thumbnailsFallbackThemeLabel,
1140
+ region,
1141
+ deviceKey: isResponsive ? viewport.deviceKey : null
1142
+ }
1143
+ ),
1144
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-1", children: [
1145
+ /* @__PURE__ */ jsx5(Button, { variant: "outline", size: "icon", "aria-label": "Previous board (\u2190)", onClick: onPrevious, children: /* @__PURE__ */ jsx5(ChevronLeft, {}) }),
1146
+ /* @__PURE__ */ jsx5(Button, { variant: "outline", size: "icon", "aria-label": "Next board (\u2192)", onClick: onNext, children: /* @__PURE__ */ jsx5(ChevronRight, {}) }),
1147
+ /* @__PURE__ */ jsx5(Button, { variant: "ghost", size: "icon", "aria-label": "Close focus view", onClick: onClose, children: /* @__PURE__ */ jsx5(X, {}) })
1041
1148
  ] })
1042
1149
  ] }),
1043
- /* @__PURE__ */ jsxs4("div", { className: "flex min-h-0 flex-1 flex-col lg:flex-row", children: [
1044
- /* @__PURE__ */ jsxs4("div", { className: "flex min-h-0 flex-1 flex-col bg-tint", children: [
1045
- isResponsive && /* @__PURE__ */ jsx4(
1150
+ /* @__PURE__ */ jsxs5("div", { className: "flex min-h-0 flex-1 flex-col lg:flex-row", children: [
1151
+ /* @__PURE__ */ jsxs5("div", { className: "flex min-h-0 flex-1 flex-col bg-tint", children: [
1152
+ isResponsive && /* @__PURE__ */ jsx5(
1046
1153
  ViewportToolbar,
1047
1154
  {
1048
1155
  devices,
@@ -1053,7 +1160,7 @@ var BoardFocusView = ({
1053
1160
  onViewportChange: (nextViewport) => onViewportChange?.(nextViewport)
1054
1161
  }
1055
1162
  ),
1056
- /* @__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(
1163
+ /* @__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(
1057
1164
  "div",
1058
1165
  {
1059
1166
  className: cx(
@@ -1063,7 +1170,7 @@ var BoardFocusView = ({
1063
1170
  ),
1064
1171
  style: { transform: scale !== 1 ? `scale(${scale})` : void 0, width: width + bezelPadding },
1065
1172
  children: [
1066
- /* @__PURE__ */ jsx4(
1173
+ /* @__PURE__ */ jsx5(
1067
1174
  "div",
1068
1175
  {
1069
1176
  className: cx(
@@ -1072,9 +1179,9 @@ var BoardFocusView = ({
1072
1179
  !isResponsive || showsDeviceFrame ? !isResponsive || viewport.width < 600 ? "rounded-[44px]" : "rounded-[18px]" : "rounded-md ring-1 ring-foreground/10"
1073
1180
  ),
1074
1181
  style: { width, height: screenHeight },
1075
- children: /* @__PURE__ */ jsxs4("div", { className: "relative overflow-hidden", style: { width, height: contentHeight }, children: [
1182
+ children: /* @__PURE__ */ jsxs5("div", { className: "relative overflow-hidden", style: { width, height: contentHeight }, children: [
1076
1183
  thumbnailUrl && // biome-ignore lint/performance/noImgElement: API thumbnail under the live board while it loads
1077
- /* @__PURE__ */ jsx4(
1184
+ /* @__PURE__ */ jsx5(
1078
1185
  "img",
1079
1186
  {
1080
1187
  src: thumbnailUrl,
@@ -1085,7 +1192,7 @@ var BoardFocusView = ({
1085
1192
  style: { top: -scrollOffset, width }
1086
1193
  }
1087
1194
  ),
1088
- htmlUrl && /* @__PURE__ */ jsx4(
1195
+ htmlUrl && /* @__PURE__ */ jsx5(
1089
1196
  "iframe",
1090
1197
  {
1091
1198
  ref: frameRef,
@@ -1099,7 +1206,7 @@ var BoardFocusView = ({
1099
1206
  },
1100
1207
  htmlUrl
1101
1208
  ),
1102
- isPlacingPin && /* @__PURE__ */ jsx4(
1209
+ isPlacingPin && /* @__PURE__ */ jsx5(
1103
1210
  "button",
1104
1211
  {
1105
1212
  type: "button",
@@ -1108,7 +1215,7 @@ var BoardFocusView = ({
1108
1215
  onClick: placePin
1109
1216
  }
1110
1217
  ),
1111
- isMarkingRegion && /* @__PURE__ */ jsx4(
1218
+ isMarkingRegion && /* @__PURE__ */ jsx5(
1112
1219
  "button",
1113
1220
  {
1114
1221
  type: "button",
@@ -1119,7 +1226,7 @@ var BoardFocusView = ({
1119
1226
  onPointerUp: endRegion
1120
1227
  }
1121
1228
  ),
1122
- shownRegion && /* @__PURE__ */ jsx4(
1229
+ shownRegion && /* @__PURE__ */ jsx5(
1123
1230
  "span",
1124
1231
  {
1125
1232
  "aria-hidden": true,
@@ -1135,7 +1242,7 @@ var BoardFocusView = ({
1135
1242
  }
1136
1243
  }
1137
1244
  ),
1138
- pinnedThreads.map((thread) => /* @__PURE__ */ jsx4(
1245
+ pinnedThreads.map((thread) => /* @__PURE__ */ jsx5(
1139
1246
  "button",
1140
1247
  {
1141
1248
  type: "button",
@@ -1152,19 +1259,19 @@ var BoardFocusView = ({
1152
1259
  },
1153
1260
  String(thread.root.id)
1154
1261
  )),
1155
- pendingPin && /* @__PURE__ */ jsx4(
1262
+ pendingPin && /* @__PURE__ */ jsx5(
1156
1263
  "span",
1157
1264
  {
1158
1265
  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",
1159
1266
  style: { left: pendingPin.x, top: pendingPin.y - scrollOffset },
1160
1267
  "aria-hidden": true,
1161
- children: /* @__PURE__ */ jsx4(MapPin, { className: "size-4" })
1268
+ children: /* @__PURE__ */ jsx5(MapPin, { className: "size-4" })
1162
1269
  }
1163
1270
  )
1164
1271
  ] })
1165
1272
  }
1166
1273
  ),
1167
- isResponsive && /* @__PURE__ */ jsx4(
1274
+ isResponsive && /* @__PURE__ */ jsx5(
1168
1275
  WidthDragHandle,
1169
1276
  {
1170
1277
  scale,
@@ -1176,11 +1283,11 @@ var BoardFocusView = ({
1176
1283
  }
1177
1284
  ) }) })
1178
1285
  ] }),
1179
- /* @__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: [
1180
- /* @__PURE__ */ jsxs4("div", { className: "space-y-2 border-b border-border px-5 py-4", children: [
1181
- /* @__PURE__ */ jsx4("p", { className: "text-sm font-semibold", children: "Reference for an agent" }),
1182
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-wrap items-center gap-2", children: [
1183
- /* @__PURE__ */ jsxs4(
1286
+ /* @__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: [
1287
+ /* @__PURE__ */ jsxs5("div", { className: "space-y-2 border-b border-border px-5 py-4", children: [
1288
+ /* @__PURE__ */ jsx5("p", { className: "text-sm font-semibold", children: "Reference for an agent" }),
1289
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-wrap items-center gap-2", children: [
1290
+ /* @__PURE__ */ jsxs5(
1184
1291
  Button,
1185
1292
  {
1186
1293
  variant: isMarkingRegion ? "default" : "outline",
@@ -1188,19 +1295,19 @@ var BoardFocusView = ({
1188
1295
  "aria-pressed": isMarkingRegion,
1189
1296
  onClick: () => setIsMarkingRegion((marking) => !marking),
1190
1297
  children: [
1191
- /* @__PURE__ */ jsx4(SquareDashedMousePointer, {}),
1298
+ /* @__PURE__ */ jsx5(SquareDashedMousePointer, {}),
1192
1299
  " ",
1193
1300
  isMarkingRegion ? "Drag on the board\u2026" : "Mark region"
1194
1301
  ]
1195
1302
  }
1196
1303
  ),
1197
- region && /* @__PURE__ */ jsx4(Button, { variant: "ghost", size: "sm", onClick: () => setRegion(null), children: "Clear region" }),
1198
- /* @__PURE__ */ jsxs4(Button, { variant: "outline", size: "sm", className: "ml-auto", onClick: copyReference, children: [
1199
- /* @__PURE__ */ jsx4(ClipboardCopy2, {}),
1304
+ region && /* @__PURE__ */ jsx5(Button, { variant: "ghost", size: "sm", onClick: () => setRegion(null), children: "Clear region" }),
1305
+ /* @__PURE__ */ jsxs5(Button, { variant: "outline", size: "sm", className: "ml-auto", onClick: copyReference, children: [
1306
+ /* @__PURE__ */ jsx5(ClipboardCopy2, {}),
1200
1307
  " Copy reference"
1201
1308
  ] })
1202
1309
  ] }),
1203
- region && /* @__PURE__ */ jsxs4("p", { className: "text-xs text-muted-foreground tabular-nums", children: [
1310
+ region && /* @__PURE__ */ jsxs5("p", { className: "text-xs text-muted-foreground tabular-nums", children: [
1204
1311
  "Region ",
1205
1312
  Math.round(region.x),
1206
1313
  ",",
@@ -1212,7 +1319,7 @@ var BoardFocusView = ({
1212
1319
  Math.round(region.height),
1213
1320
  " px"
1214
1321
  ] }),
1215
- /* @__PURE__ */ jsx4(
1322
+ /* @__PURE__ */ jsx5(
1216
1323
  Textarea,
1217
1324
  {
1218
1325
  value: referenceNote,
@@ -1223,8 +1330,8 @@ var BoardFocusView = ({
1223
1330
  }
1224
1331
  )
1225
1332
  ] }),
1226
- /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2 px-5 pt-4", children: [
1227
- /* @__PURE__ */ jsxs4(
1333
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2 px-5 pt-4", children: [
1334
+ /* @__PURE__ */ jsxs5(
1228
1335
  Button,
1229
1336
  {
1230
1337
  variant: isPlacingPin ? "default" : "outline",
@@ -1233,18 +1340,18 @@ var BoardFocusView = ({
1233
1340
  "aria-pressed": isPlacingPin,
1234
1341
  onClick: () => setIsPlacingPin((placing) => !placing),
1235
1342
  children: [
1236
- /* @__PURE__ */ jsx4(MapPinPlus, {}),
1343
+ /* @__PURE__ */ jsx5(MapPinPlus, {}),
1237
1344
  " ",
1238
1345
  isPlacingPin ? "Click on the board\u2026" : "Add pin"
1239
1346
  ]
1240
1347
  }
1241
1348
  ),
1242
- /* @__PURE__ */ jsxs4("span", { className: "text-xs text-muted-foreground", children: [
1349
+ /* @__PURE__ */ jsxs5("span", { className: "text-xs text-muted-foreground", children: [
1243
1350
  threads.filter((thread) => !thread.root.isResolved).length,
1244
1351
  " open"
1245
1352
  ] })
1246
1353
  ] }),
1247
- /* @__PURE__ */ jsx4("div", { className: "min-h-0 flex-1 overflow-y-auto px-5 py-4", children: /* @__PURE__ */ jsx4(
1354
+ /* @__PURE__ */ jsx5("div", { className: "min-h-0 flex-1 overflow-y-auto px-5 py-4", children: /* @__PURE__ */ jsx5(
1248
1355
  BoardComments,
1249
1356
  {
1250
1357
  projectKey,
@@ -1283,26 +1390,26 @@ import {
1283
1390
  useStore as useStore3
1284
1391
  } from "@xyflow/react";
1285
1392
  import { ChevronDown, Hand, MousePointer2, Play } from "lucide-react";
1286
- import { useCallback, useEffect as useEffect4, useMemo, useRef as useRef3, useState as useState6 } from "react";
1393
+ import { useCallback, useEffect as useEffect5, useMemo, useRef as useRef3, useState as useState7 } from "react";
1287
1394
 
1288
1395
  // src/canvas/SectionNode.tsx
1289
1396
  import { useStore as useStore2 } from "@xyflow/react";
1290
1397
  import { memo as memo2 } from "react";
1291
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1398
+ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1292
1399
  var OVERVIEW_TITLE_SCREEN_PX = 15;
1293
1400
  var SectionNodeComponent = ({ data }) => {
1294
1401
  const { onZoomToSection } = useCanvasView();
1295
1402
  const zoom = useStore2((state) => data.isOverview ? Math.round(state.transform[2] * 1e3) / 1e3 : 1);
1296
1403
  if (!data.isOverview) {
1297
- 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(
1404
+ 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(
1298
1405
  "div",
1299
1406
  {
1300
1407
  className: "flex items-baseline gap-4 overflow-hidden text-ellipsis whitespace-nowrap",
1301
1408
  style: { padding: `${SECTION_PADDING}px ${SECTION_PADDING}px 0` },
1302
1409
  title: data.title,
1303
1410
  children: [
1304
- /* @__PURE__ */ jsx5("span", { className: "text-[56px] leading-none font-bold tracking-tight text-foreground", children: data.title }),
1305
- /* @__PURE__ */ jsxs5("span", { className: "text-[28px] leading-none text-muted-foreground", children: [
1411
+ /* @__PURE__ */ jsx6("span", { className: "text-[56px] leading-none font-bold tracking-tight text-foreground", children: data.title }),
1412
+ /* @__PURE__ */ jsxs6("span", { className: "text-[28px] leading-none text-muted-foreground", children: [
1306
1413
  data.boardCount,
1307
1414
  " boards"
1308
1415
  ] })
@@ -1311,7 +1418,7 @@ var SectionNodeComponent = ({ data }) => {
1311
1418
  ) });
1312
1419
  }
1313
1420
  const titleFontSize = Math.min(OVERVIEW_TITLE_SCREEN_PX / zoom, data.width / 7);
1314
- return /* @__PURE__ */ jsxs5(
1421
+ return /* @__PURE__ */ jsxs6(
1315
1422
  "button",
1316
1423
  {
1317
1424
  type: "button",
@@ -1320,21 +1427,21 @@ var SectionNodeComponent = ({ data }) => {
1320
1427
  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",
1321
1428
  style: { padding: titleFontSize },
1322
1429
  children: [
1323
- /* @__PURE__ */ jsxs5("span", { className: "block w-full", style: { fontSize: titleFontSize, lineHeight: 1.2 }, children: [
1324
- /* @__PURE__ */ jsx5("span", { className: "line-clamp-2 font-bold text-foreground", children: data.title }),
1325
- /* @__PURE__ */ jsxs5("span", { className: "block text-muted-foreground", style: { fontSize: titleFontSize * 0.8 }, children: [
1430
+ /* @__PURE__ */ jsxs6("span", { className: "block w-full", style: { fontSize: titleFontSize, lineHeight: 1.2 }, children: [
1431
+ /* @__PURE__ */ jsx6("span", { className: "line-clamp-2 font-bold text-foreground", children: data.title }),
1432
+ /* @__PURE__ */ jsxs6("span", { className: "block text-muted-foreground", style: { fontSize: titleFontSize * 0.8 }, children: [
1326
1433
  data.boardCount,
1327
1434
  " boards"
1328
1435
  ] })
1329
1436
  ] }),
1330
- /* @__PURE__ */ jsx5(
1437
+ /* @__PURE__ */ jsx6(
1331
1438
  "span",
1332
1439
  {
1333
1440
  className: "mt-auto grid min-h-0 flex-1 grid-cols-2 content-end",
1334
1441
  style: { gap: titleFontSize * 0.6, paddingTop: titleFontSize * 0.6 },
1335
1442
  children: data.coverUrls.map((coverUrl) => (
1336
1443
  // biome-ignore lint/performance/noImgElement: small cover thumbnails from the API at canvas scale
1337
- /* @__PURE__ */ jsx5(
1444
+ /* @__PURE__ */ jsx6(
1338
1445
  "img",
1339
1446
  {
1340
1447
  src: coverUrl,
@@ -1356,7 +1463,7 @@ var SectionNodeComponent = ({ data }) => {
1356
1463
  var SectionNode = memo2(SectionNodeComponent);
1357
1464
 
1358
1465
  // src/canvas/DesignCanvasFlow.tsx
1359
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1466
+ import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1360
1467
  var NODE_TYPES = { board: BoardNode, section: SectionNode };
1361
1468
  var ZOOM_PRESETS = [0.25, 0.5, 1];
1362
1469
  var MIN_ZOOM = 5e-3;
@@ -1382,8 +1489,8 @@ var ZoomMenu = ({ onFitAll }) => {
1382
1489
  const { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } = useDesignStudioComponents();
1383
1490
  const reactFlow = useReactFlow();
1384
1491
  const zoomPercent = useStore3((state) => Math.round(state.transform[2] * 100));
1385
- return /* @__PURE__ */ jsxs6(DropdownMenu, { modal: false, children: [
1386
- /* @__PURE__ */ jsx6(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs6(
1492
+ return /* @__PURE__ */ jsxs7(DropdownMenu, { modal: false, children: [
1493
+ /* @__PURE__ */ jsx7(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs7(
1387
1494
  "button",
1388
1495
  {
1389
1496
  type: "button",
@@ -1392,19 +1499,19 @@ var ZoomMenu = ({ onFitAll }) => {
1392
1499
  children: [
1393
1500
  zoomPercent,
1394
1501
  "%",
1395
- /* @__PURE__ */ jsx6(ChevronDown, { className: "size-3.5 text-muted-foreground", "aria-hidden": true })
1502
+ /* @__PURE__ */ jsx7(ChevronDown, { className: "size-3.5 text-muted-foreground", "aria-hidden": true })
1396
1503
  ]
1397
1504
  }
1398
1505
  ) }),
1399
- /* @__PURE__ */ jsxs6(DropdownMenuContent, { align: "end", children: [
1400
- ZOOM_PRESETS.map((zoom) => /* @__PURE__ */ jsxs6(DropdownMenuItem, { onSelect: () => void reactFlow.zoomTo(zoom, { duration: 250 }), children: [
1506
+ /* @__PURE__ */ jsxs7(DropdownMenuContent, { align: "end", children: [
1507
+ ZOOM_PRESETS.map((zoom) => /* @__PURE__ */ jsxs7(DropdownMenuItem, { onSelect: () => void reactFlow.zoomTo(zoom, { duration: 250 }), children: [
1401
1508
  Math.round(zoom * 100),
1402
1509
  " %"
1403
1510
  ] }, zoom)),
1404
- /* @__PURE__ */ jsx6(DropdownMenuSeparator, {}),
1405
- /* @__PURE__ */ jsx6(DropdownMenuItem, { onSelect: () => void reactFlow.zoomIn({ duration: 200 }), children: "Zoom in" }),
1406
- /* @__PURE__ */ jsx6(DropdownMenuItem, { onSelect: () => void reactFlow.zoomOut({ duration: 200 }), children: "Zoom out" }),
1407
- /* @__PURE__ */ jsx6(DropdownMenuItem, { onSelect: onFitAll, children: "Fit all" })
1511
+ /* @__PURE__ */ jsx7(DropdownMenuSeparator, {}),
1512
+ /* @__PURE__ */ jsx7(DropdownMenuItem, { onSelect: () => void reactFlow.zoomIn({ duration: 200 }), children: "Zoom in" }),
1513
+ /* @__PURE__ */ jsx7(DropdownMenuItem, { onSelect: () => void reactFlow.zoomOut({ duration: 200 }), children: "Zoom out" }),
1514
+ /* @__PURE__ */ jsx7(DropdownMenuItem, { onSelect: onFitAll, children: "Fit all" })
1408
1515
  ] })
1409
1516
  ] });
1410
1517
  };
@@ -1481,7 +1588,7 @@ var reuseUnchangedNodes = (previousNodes, nextNodes) => {
1481
1588
  };
1482
1589
  var useWheelZoom = (containerRef) => {
1483
1590
  const reactFlow = useReactFlow();
1484
- useEffect4(() => {
1591
+ useEffect5(() => {
1485
1592
  const container = containerRef.current;
1486
1593
  if (!container) return;
1487
1594
  const minLogZoom = Math.log(MIN_ZOOM);
@@ -1600,7 +1707,7 @@ var FlowCanvas = ({
1600
1707
  if (liveBoardsTimerRef.current) clearTimeout(liveBoardsTimerRef.current);
1601
1708
  liveBoardsTimerRef.current = null;
1602
1709
  }, []);
1603
- useEffect4(() => cancelLiveBoardsUpdate, [cancelLiveBoardsUpdate]);
1710
+ useEffect5(() => cancelLiveBoardsUpdate, [cancelLiveBoardsUpdate]);
1604
1711
  const updateLiveBoards = useCallback(
1605
1712
  (viewport) => {
1606
1713
  const container = containerRef.current;
@@ -1654,7 +1761,7 @@ var FlowCanvas = ({
1654
1761
  fitRect(layout.bounds, 400);
1655
1762
  }, [fitRect, layout]);
1656
1763
  const handledFitKeyRef = useRef3(null);
1657
- useEffect4(() => {
1764
+ useEffect5(() => {
1658
1765
  if (!fitRequest || handledFitKeyRef.current === fitRequest.key) return;
1659
1766
  handledFitKeyRef.current = fitRequest.key;
1660
1767
  fitNodes(fitRequest.nodeIds);
@@ -1680,7 +1787,7 @@ var FlowCanvas = ({
1680
1787
  }
1681
1788
  }, [layout, initialFitNodeIds, fitNodes, fitRect, reactFlow, updateLiveBoards]);
1682
1789
  const viewportCommitTimerRef = useRef3(null);
1683
- useEffect4(
1790
+ useEffect5(
1684
1791
  () => () => {
1685
1792
  if (viewportCommitTimerRef.current) clearTimeout(viewportCommitTimerRef.current);
1686
1793
  },
@@ -1697,13 +1804,13 @@ var FlowCanvas = ({
1697
1804
  onViewportCommit?.(viewport);
1698
1805
  }, VIEWPORT_COMMIT_MS);
1699
1806
  };
1700
- useEffect4(() => {
1807
+ useEffect5(() => {
1701
1808
  fitInitialView();
1702
1809
  }, [fitInitialView]);
1703
- useEffect4(() => {
1810
+ useEffect5(() => {
1704
1811
  if (hasInitialFitRef.current) updateLiveBoards(reactFlow.getViewport());
1705
1812
  }, [reactFlow, updateLiveBoards]);
1706
- useEffect4(() => {
1813
+ useEffect5(() => {
1707
1814
  const container = containerRef.current;
1708
1815
  if (!container) return;
1709
1816
  const resizeObserver = new ResizeObserver(() => {
@@ -1713,7 +1820,7 @@ var FlowCanvas = ({
1713
1820
  resizeObserver.observe(container);
1714
1821
  return () => resizeObserver.disconnect();
1715
1822
  }, [reactFlow, updateLiveBoards, fitInitialView]);
1716
- useEffect4(() => {
1823
+ useEffect5(() => {
1717
1824
  const onKeyDown = (event) => {
1718
1825
  const target = event.target;
1719
1826
  if (target && (target.tagName === "TEXTAREA" || target.tagName === "INPUT" || target.isContentEditable)) return;
@@ -1750,7 +1857,7 @@ var FlowCanvas = ({
1750
1857
  const presentationStart = findSectionPresentationStart(layout.sections, selectedNodeId, sectionInView());
1751
1858
  if (presentationStart) onPresentSection(presentationStart.sectionId, presentationStart.boardId);
1752
1859
  };
1753
- const [marquee, setMarquee] = useState6(null);
1860
+ const [marquee, setMarquee] = useState7(null);
1754
1861
  const isMarqueeJustEndedRef = useRef3(false);
1755
1862
  const startMarquee = (event) => {
1756
1863
  const target = event.target;
@@ -1799,14 +1906,14 @@ var FlowCanvas = ({
1799
1906
  const minimapHeight = Math.round(
1800
1907
  Math.min(180, Math.max(60, MINIMAP_WIDTH * layout.bounds.height / Math.max(1, layout.bounds.width)))
1801
1908
  );
1802
- return /* @__PURE__ */ jsxs6(
1909
+ return /* @__PURE__ */ jsxs7(
1803
1910
  "div",
1804
1911
  {
1805
1912
  ref: containerRef,
1806
1913
  className: cx("relative h-full w-full", tool === "hand" && "cursor-grab active:cursor-grabbing"),
1807
1914
  onPointerDownCapture: startMarquee,
1808
1915
  children: [
1809
- marquee && /* @__PURE__ */ jsx6(
1916
+ marquee && /* @__PURE__ */ jsx7(
1810
1917
  "div",
1811
1918
  {
1812
1919
  "aria-hidden": true,
@@ -1819,7 +1926,7 @@ var FlowCanvas = ({
1819
1926
  }
1820
1927
  }
1821
1928
  ),
1822
- /* @__PURE__ */ jsxs6(
1929
+ /* @__PURE__ */ jsxs7(
1823
1930
  ReactFlow,
1824
1931
  {
1825
1932
  nodes,
@@ -1852,13 +1959,13 @@ var FlowCanvas = ({
1852
1959
  selectionOnDrag: false,
1853
1960
  proOptions: { hideAttribution: true },
1854
1961
  children: [
1855
- /* @__PURE__ */ jsx6(Background, { variant: BackgroundVariant.Dots, gap: 32, size: 1.5, color: "var(--tint-strong)" }),
1856
- /* @__PURE__ */ jsxs6(Panel, { position: "top-left", className: "flex max-w-[calc(100%-32rem)] flex-wrap items-center gap-2", children: [
1857
- /* @__PURE__ */ jsx6("div", { className: TOOLBAR_GROUP_CLASS, role: "toolbar", "aria-label": "Canvas tools", children: [
1962
+ /* @__PURE__ */ jsx7(Background, { variant: BackgroundVariant.Dots, gap: 32, size: 1.5, color: "var(--tint-strong)" }),
1963
+ /* @__PURE__ */ jsxs7(Panel, { position: "top-left", className: "flex max-w-[calc(100%-32rem)] flex-wrap items-center gap-2", children: [
1964
+ /* @__PURE__ */ jsx7("div", { className: TOOLBAR_GROUP_CLASS, role: "toolbar", "aria-label": "Canvas tools", children: [
1858
1965
  ["hand", Hand, "Pan (H / Esc) \u2014 drag moves the canvas, click selects a board"],
1859
1966
  ["select", MousePointer2, "Select area (V) \u2014 drag a rectangle to select boards, Space + drag pans"]
1860
- ].map(([toolName, Icon, label]) => /* @__PURE__ */ jsxs6(Tooltip, { children: [
1861
- /* @__PURE__ */ jsx6(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx6(
1967
+ ].map(([toolName, Icon, label]) => /* @__PURE__ */ jsxs7(Tooltip, { children: [
1968
+ /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7(
1862
1969
  "button",
1863
1970
  {
1864
1971
  type: "button",
@@ -1866,32 +1973,32 @@ var FlowCanvas = ({
1866
1973
  "aria-pressed": tool === toolName,
1867
1974
  onClick: () => onToolChange(toolName),
1868
1975
  className: cx(TOOL_BUTTON_CLASS, tool === toolName && "bg-brand-light text-brand-emphasis"),
1869
- children: /* @__PURE__ */ jsx6(Icon, { className: "size-4" })
1976
+ children: /* @__PURE__ */ jsx7(Icon, { className: "size-4" })
1870
1977
  }
1871
1978
  ) }),
1872
- /* @__PURE__ */ jsx6(TooltipContent, { side: "bottom", children: label })
1979
+ /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: label })
1873
1980
  ] }, toolName)) }),
1874
1981
  toolbarStart
1875
1982
  ] }),
1876
- /* @__PURE__ */ jsx6(Panel, { position: "top-right", children: /* @__PURE__ */ jsxs6("div", { className: TOOLBAR_GROUP_CLASS, children: [
1983
+ /* @__PURE__ */ jsx7(Panel, { position: "top-right", children: /* @__PURE__ */ jsxs7("div", { className: TOOLBAR_GROUP_CLASS, children: [
1877
1984
  toolbarEnd,
1878
- /* @__PURE__ */ jsxs6(Tooltip, { children: [
1879
- /* @__PURE__ */ jsx6(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx6(
1985
+ /* @__PURE__ */ jsxs7(Tooltip, { children: [
1986
+ /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7(
1880
1987
  "button",
1881
1988
  {
1882
1989
  type: "button",
1883
1990
  "aria-label": "Present the section in view",
1884
1991
  onClick: presentCurrentSection,
1885
1992
  className: TOOL_BUTTON_CLASS,
1886
- children: /* @__PURE__ */ jsx6(Play, { className: "size-4" })
1993
+ children: /* @__PURE__ */ jsx7(Play, { className: "size-4" })
1887
1994
  }
1888
1995
  ) }),
1889
- /* @__PURE__ */ jsx6(TooltipContent, { side: "bottom", children: "Present this section (\u2190 / \u2192)" })
1996
+ /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: "Present this section (\u2190 / \u2192)" })
1890
1997
  ] }),
1891
- /* @__PURE__ */ jsx6(ZoomMenu, { onFitAll: fitAll })
1998
+ /* @__PURE__ */ jsx7(ZoomMenu, { onFitAll: fitAll })
1892
1999
  ] }) }),
1893
- /* @__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" }) }),
1894
- !isEverythingVisible && /* @__PURE__ */ jsx6(
2000
+ /* @__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" }) }),
2001
+ !isEverythingVisible && /* @__PURE__ */ jsx7(
1895
2002
  MiniMap,
1896
2003
  {
1897
2004
  pannable: true,
@@ -1915,10 +2022,10 @@ var FlowCanvas = ({
1915
2022
  }
1916
2023
  );
1917
2024
  };
1918
- var DesignCanvasFlow = (props) => /* @__PURE__ */ jsx6(ReactFlowProvider, { children: /* @__PURE__ */ jsx6(FlowCanvas, { ...props }) });
2025
+ var DesignCanvasFlow = (props) => /* @__PURE__ */ jsx7(ReactFlowProvider, { children: /* @__PURE__ */ jsx7(FlowCanvas, { ...props }) });
1919
2026
 
1920
2027
  // src/canvas/DesignStudioCanvasScreen.tsx
1921
- import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
2028
+ import { Fragment as Fragment5, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1922
2029
  var CANVAS_STATE_KEYS = ["q", "section", "status", "theme", "mode", "vp"];
1923
2030
  var UNCOUNTED_CANVAS_STATE_KEYS = ["q", "theme", "mode", "vp"];
1924
2031
  var LIVE_UPDATE_POLL_MS = 15e3;
@@ -1927,8 +2034,8 @@ var OPEN_RENDER_STATUSES = /* @__PURE__ */ new Set(["QUEUED", "RUNNING", "WAITIN
1927
2034
  var MAX_PRIORITY_BOARDS = 200;
1928
2035
  var LIVE_UPDATE_TOAST_ID = "design-canvas-live-update";
1929
2036
  var usePageVisible = () => {
1930
- const [isVisible, setIsVisible] = useState7(true);
1931
- useEffect5(() => {
2037
+ const [isVisible, setIsVisible] = useState8(true);
2038
+ useEffect6(() => {
1932
2039
  const update = () => setIsVisible(document.visibilityState === "visible");
1933
2040
  update();
1934
2041
  document.addEventListener("visibilitychange", update);
@@ -1947,7 +2054,7 @@ var useCollapsedSidebarWhileMounted = (useSidebarCollapsed = useNoSidebar) => {
1947
2054
  const collapsedByCanvasRef = useRef4(false);
1948
2055
  const toggleRef = useRef4(toggleCollapsed);
1949
2056
  toggleRef.current = toggleCollapsed;
1950
- useEffect5(() => {
2057
+ useEffect6(() => {
1951
2058
  if (!isCollapsed) {
1952
2059
  collapsedByCanvasRef.current = true;
1953
2060
  toggleRef.current();
@@ -1979,17 +2086,17 @@ var SelectedBoardPanel = ({
1979
2086
  }) => {
1980
2087
  const { Button } = useDesignStudioComponents();
1981
2088
  const texts = useDesignStudioTexts();
1982
- const [showResolved, setShowResolved] = useState7(false);
1983
- return /* @__PURE__ */ jsxs7("div", { className: "space-y-5", children: [
1984
- /* @__PURE__ */ jsxs7("div", { className: "space-y-1", children: [
1985
- board.code && /* @__PURE__ */ jsx7("p", { className: "text-sm font-semibold tabular-nums text-foreground/70", children: board.code }),
1986
- /* @__PURE__ */ jsx7("h2", { className: "text-title-card font-semibold break-words", children: board.title }),
1987
- /* @__PURE__ */ jsxs7("p", { className: "text-xs text-muted-foreground", children: [
2089
+ const [showResolved, setShowResolved] = useState8(false);
2090
+ return /* @__PURE__ */ jsxs8("div", { className: "space-y-5", children: [
2091
+ /* @__PURE__ */ jsxs8("div", { className: "space-y-1", children: [
2092
+ board.code && /* @__PURE__ */ jsx8("p", { className: "text-sm font-semibold tabular-nums text-foreground/70", children: board.code }),
2093
+ /* @__PURE__ */ jsx8("h2", { className: "text-title-card font-semibold break-words", children: board.title }),
2094
+ /* @__PURE__ */ jsxs8("p", { className: "text-xs text-muted-foreground", children: [
1988
2095
  sectionTitle ? `${sectionTitle} \xB7 ` : "",
1989
2096
  board.boardKey
1990
2097
  ] })
1991
2098
  ] }),
1992
- /* @__PURE__ */ jsx7(
2099
+ /* @__PURE__ */ jsx8(
1993
2100
  BoardStatusChips,
1994
2101
  {
1995
2102
  projectKey,
@@ -2000,22 +2107,22 @@ var SelectedBoardPanel = ({
2000
2107
  onStatusChanged
2001
2108
  }
2002
2109
  ),
2003
- /* @__PURE__ */ jsxs7("div", { className: "flex gap-2", children: [
2004
- /* @__PURE__ */ jsxs7(Button, { variant: "outline", className: "flex-1", onClick: onOpen, children: [
2005
- /* @__PURE__ */ jsx7(Maximize22, {}),
2110
+ /* @__PURE__ */ jsxs8("div", { className: "flex gap-2", children: [
2111
+ /* @__PURE__ */ jsxs8(Button, { variant: "outline", className: "flex-1", onClick: onOpen, children: [
2112
+ /* @__PURE__ */ jsx8(Maximize22, {}),
2006
2113
  " Open focus view"
2007
2114
  ] }),
2008
- onCopyLink && /* @__PURE__ */ jsxs7(Button, { variant: "outline", onClick: onCopyLink, "aria-label": `${texts.copyBoardLink}: ${board.code ?? ""}`, children: [
2009
- /* @__PURE__ */ jsx7(Link2, {}),
2115
+ onCopyLink && /* @__PURE__ */ jsxs8(Button, { variant: "outline", onClick: onCopyLink, "aria-label": `${texts.copyBoardLink}: ${board.code ?? ""}`, children: [
2116
+ /* @__PURE__ */ jsx8(Link2, {}),
2010
2117
  " ",
2011
2118
  texts.copyBoardLink
2012
2119
  ] })
2013
2120
  ] }),
2014
- board.contentHash && /* @__PURE__ */ jsxs7("p", { className: "text-xs text-muted-foreground", title: `Content hash of the board file: ${board.contentHash}`, children: [
2121
+ board.contentHash && /* @__PURE__ */ jsxs8("p", { className: "text-xs text-muted-foreground", title: `Content hash of the board file: ${board.contentHash}`, children: [
2015
2122
  "Version ",
2016
- /* @__PURE__ */ jsx7("span", { className: "font-mono", children: shortContentHash(board.contentHash) })
2123
+ /* @__PURE__ */ jsx8("span", { className: "font-mono", children: shortContentHash(board.contentHash) })
2017
2124
  ] }),
2018
- /* @__PURE__ */ jsx7(
2125
+ /* @__PURE__ */ jsx8(
2019
2126
  BoardComments,
2020
2127
  {
2021
2128
  projectKey,
@@ -2066,17 +2173,17 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2066
2173
  const writeSearchParams = router.useSearchParamsWriter();
2067
2174
  const writesAllowed = useCanWrite();
2068
2175
  const isPageVisible = usePageVisible();
2069
- const [statusOverrides, setStatusOverrides] = useState7(/* @__PURE__ */ new Map());
2070
- const [liveBoardIds, setLiveBoardIds] = useState7(/* @__PURE__ */ new Set());
2071
- const [selectedBoardId, setSelectedBoardId] = useState7(null);
2072
- const [selectedBoardIds, setSelectedBoardIds] = useState7(/* @__PURE__ */ new Set());
2073
- const [focusedBoardId, setFocusedBoardId] = useState7(null);
2074
- const [frameHeightMode, setFrameHeightMode] = useState7("viewport");
2075
- const [chosenFocusViewport, setChosenFocusViewport] = useState7(null);
2076
- const [presentSectionId, setPresentSectionId] = useState7(null);
2077
- const [fitRequest, setFitRequest] = useState7(null);
2078
- const [tool, setTool] = useState7("hand");
2079
- const [isCommentsPanelOpen, setIsCommentsPanelOpen] = useState7(
2176
+ const [statusOverrides, setStatusOverrides] = useState8(/* @__PURE__ */ new Map());
2177
+ const [liveBoardIds, setLiveBoardIds] = useState8(/* @__PURE__ */ new Set());
2178
+ const [selectedBoardId, setSelectedBoardId] = useState8(null);
2179
+ const [selectedBoardIds, setSelectedBoardIds] = useState8(/* @__PURE__ */ new Set());
2180
+ const [focusedBoardId, setFocusedBoardId] = useState8(null);
2181
+ const [frameHeightMode, setFrameHeightMode] = useState8("viewport");
2182
+ const [chosenFocusViewport, setChosenFocusViewport] = useState8(null);
2183
+ const [presentSectionId, setPresentSectionId] = useState8(null);
2184
+ const [fitRequest, setFitRequest] = useState8(null);
2185
+ const [tool, setTool] = useState8("hand");
2186
+ const [isCommentsPanelOpen, setIsCommentsPanelOpen] = useState8(
2080
2187
  () => Boolean(searchParams.get(CODE_PARAM)) || storage.read("commentsPanelOpen") !== "0"
2081
2188
  );
2082
2189
  const canvasState = router.useUrlState(CANVAS_STATE_KEYS, {
@@ -2093,16 +2200,16 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2093
2200
  const setSearch = useCallback2((value) => setCanvasStateValue("q", value), [setCanvasStateValue]);
2094
2201
  const setSectionFilter = useCallback2((value) => setCanvasStateValue("section", value), [setCanvasStateValue]);
2095
2202
  const setStatusFilter = useCallback2((value) => setCanvasStateValue("status", value), [setCanvasStateValue]);
2096
- const [isFullscreen, setIsFullscreen] = useState7(false);
2203
+ const [isFullscreen, setIsFullscreen] = useState8(false);
2097
2204
  const canvasAreaRef = useRef4(null);
2098
- const [canvasAspectRatio, setCanvasAspectRatio] = useState7(null);
2205
+ const [canvasAspectRatio, setCanvasAspectRatio] = useState8(null);
2099
2206
  useCollapsedSidebarWhileMounted(shell?.useSidebarCollapsed);
2100
2207
  const debouncedSearch = canvasState.debounced.q;
2101
- const [codeAtLoad] = useState7(() => searchParams.get(CODE_PARAM));
2102
- const [initialViewport] = useState7(
2208
+ const [codeAtLoad] = useState8(() => searchParams.get(CODE_PARAM));
2209
+ const [initialViewport] = useState8(
2103
2210
  () => codeAtLoad ? null : parseViewportParam(canvasState.values.vp)
2104
2211
  );
2105
- const [hasInitialFilterWithViewport] = useState7(
2212
+ const [hasInitialFilterWithViewport] = useState8(
2106
2213
  () => initialViewport !== null && Boolean(canvasState.values.q.trim() || canvasState.values.section || canvasState.values.status)
2107
2214
  );
2108
2215
  const currentViewportRef = useRef4(initialViewport ? formatViewportParam(initialViewport) : null);
@@ -2127,7 +2234,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2127
2234
  const themes = useMemo2(() => themesData?.designThemes.elements ?? [], [themesData]);
2128
2235
  const isDefaultLook = chosenThemeId === null && chosenMode === null;
2129
2236
  const isLookResolved = isDefaultLook || (overviewData !== void 0 || isOverviewError) && (!hasThemes || themesData !== void 0 || isThemesError);
2130
- const [loadedReferenceTheme, setLoadedReferenceTheme] = useState7(void 0);
2237
+ const [loadedReferenceTheme, setLoadedReferenceTheme] = useState8(void 0);
2131
2238
  const referenceTheme = loadedReferenceTheme !== void 0 ? loadedReferenceTheme : canvasSummary?.referenceTheme;
2132
2239
  const referenceLook = useMemo2(() => splitThemeReference(referenceTheme), [referenceTheme]);
2133
2240
  const referenceThemeId = referenceLook?.themeId ?? null;
@@ -2142,7 +2249,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2142
2249
  () => ({ projectKey, canvasKey, ...themeArgument ? { theme: themeArgument } : {} }),
2143
2250
  [projectKey, canvasKey, themeArgument]
2144
2251
  );
2145
- const [isRenderPolling, setIsRenderPolling] = useState7(false);
2252
+ const [isRenderPolling, setIsRenderPolling] = useState8(false);
2146
2253
  const {
2147
2254
  data,
2148
2255
  currentData: currentCanvasData,
@@ -2176,7 +2283,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2176
2283
  [statuses, statusDefinitions]
2177
2284
  );
2178
2285
  const canvasBoards = canvas?.boards?.elements;
2179
- const [shownBoards, setShownBoards] = useState7({
2286
+ const [shownBoards, setShownBoards] = useState8({
2180
2287
  source: void 0,
2181
2288
  themeReference: "",
2182
2289
  boards: [],
@@ -2236,7 +2343,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2236
2343
  const devices = useMemo2(() => canvas?.devices?.elements ?? [], [canvas?.devices]);
2237
2344
  const hasResponsiveBoards = useMemo2(() => shownBoardList.some((board) => isResponsiveBoard(board)), [shownBoardList]);
2238
2345
  const hasCanvas = Boolean(canvas);
2239
- useEffect5(() => {
2346
+ useEffect6(() => {
2240
2347
  const canvasArea = canvasAreaRef.current;
2241
2348
  if (!canvasArea) return;
2242
2349
  const measure = () => {
@@ -2255,7 +2362,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2255
2362
  const missingThumbnailCount = canvas?.missingThumbnailCount ?? 0;
2256
2363
  const renderStatus = canvas?.renderRequestStatus ?? null;
2257
2364
  const isRenderOpen = renderStatus !== null && OPEN_RENDER_STATUSES.has(renderStatus);
2258
- useEffect5(() => setIsRenderPolling(isRenderOpen), [isRenderOpen]);
2365
+ useEffect6(() => setIsRenderPolling(isRenderOpen), [isRenderOpen]);
2259
2366
  const [requestThumbnailRendering] = api.useRequestThumbnailRenderingMutation();
2260
2367
  const visibleBoardIdsRef = useRef4([]);
2261
2368
  const rememberVisibleBoardIds = useCallback2((visibleBoardIds) => {
@@ -2284,7 +2391,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2284
2391
  },
2285
2392
  [writesAllowed, currentCanvas, themeArgument, projectKey, canvasKey, requestThumbnailRendering]
2286
2393
  );
2287
- useEffect5(() => {
2394
+ useEffect6(() => {
2288
2395
  if (!currentCanvas?.isRendererEnabled || !currentCanvas.missingThumbnailCount) return;
2289
2396
  const currentStatus = currentCanvas.renderRequestStatus ?? null;
2290
2397
  if (currentStatus === "FAILED" || currentStatus !== null && OPEN_RENDER_STATUSES.has(currentStatus)) return;
@@ -2353,7 +2460,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2353
2460
  const filterKey = matchingBoardIds === null ? null : `${debouncedSearch.trim()}|${sectionFilter}|${statusFilter}`;
2354
2461
  const fittedFilterKeyRef = useRef4(null);
2355
2462
  const skipInitialFilterFitRef = useRef4(hasInitialFilterWithViewport);
2356
- useEffect5(() => {
2463
+ useEffect6(() => {
2357
2464
  if (filterKey === null || matchingBoardIds === null) {
2358
2465
  fittedFilterKeyRef.current = null;
2359
2466
  return;
@@ -2402,7 +2509,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2402
2509
  );
2403
2510
  const boardParam = searchParams.get(BOARD_PARAM);
2404
2511
  const isDeepLinkHandledRef = useRef4(false);
2405
- useEffect5(() => {
2512
+ useEffect6(() => {
2406
2513
  if (isDeepLinkHandledRef.current || !boardParam || boards.length === 0) return;
2407
2514
  isDeepLinkHandledRef.current = true;
2408
2515
  const nodeId = boardNodeId(boardParam);
@@ -2413,7 +2520,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2413
2520
  }, [boardParam, boards.length, boardsByNodeId, requestFit, initialViewport]);
2414
2521
  const codeParam = searchParams.get(CODE_PARAM);
2415
2522
  const handledCodeRef = useRef4(null);
2416
- useEffect5(() => {
2523
+ useEffect6(() => {
2417
2524
  if (!codeParam) {
2418
2525
  if (handledCodeRef.current !== null) handledCodeRef.current = "";
2419
2526
  return;
@@ -2439,7 +2546,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2439
2546
  }
2440
2547
  }, [codeParam, codeAtLoad, boards, isCommentsPanelOpen, writeSearchParams, notify, texts, requestFit]);
2441
2548
  const pendingCodeFitRef = useRef4(null);
2442
- useEffect5(() => {
2549
+ useEffect6(() => {
2443
2550
  const nodeId = pendingCodeFitRef.current;
2444
2551
  if (!nodeId || layout.sections.length === 0) return;
2445
2552
  pendingCodeFitRef.current = null;
@@ -2551,7 +2658,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2551
2658
  const seenRevisionRef = useRef4(null);
2552
2659
  const revision = currentRevisionData?.revision;
2553
2660
  const revisionLook = themeArgument ?? "";
2554
- useEffect5(() => {
2661
+ useEffect6(() => {
2555
2662
  if (!revision) return;
2556
2663
  const seen = seenRevisionRef.current;
2557
2664
  seenRevisionRef.current = { look: revisionLook, revision };
@@ -2559,7 +2666,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2559
2666
  void refetchCanvas();
2560
2667
  void refetchComments();
2561
2668
  }, [revision, revisionLook, refetchCanvas, refetchComments]);
2562
- useEffect5(() => {
2669
+ useEffect6(() => {
2563
2670
  if (isPageVisible && seenRevisionRef.current) void refetchRevision();
2564
2671
  }, [isPageVisible, refetchRevision]);
2565
2672
  const showBoard = useCallback2(
@@ -2572,7 +2679,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2572
2679
  );
2573
2680
  const layoutOrderRef = useRef4(layoutOrder);
2574
2681
  layoutOrderRef.current = layoutOrder;
2575
- useEffect5(() => {
2682
+ useEffect6(() => {
2576
2683
  const changedBoardKeys = shownBoards.changedBoardKeys;
2577
2684
  if (changedBoardKeys.length === 0) return;
2578
2685
  const changedNodeIds = new Set(changedBoardKeys.map((boardKey) => boardNodeId(boardKey)));
@@ -2647,7 +2754,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2647
2754
  const presentedSectionTitle = presentSectionId ? layout.sections.find((section) => section.id === presentSectionId)?.title ?? null : null;
2648
2755
  const copySelectedRef = useRef4(copySelectedReferences);
2649
2756
  copySelectedRef.current = copySelectedReferences;
2650
- useEffect5(() => {
2757
+ useEffect6(() => {
2651
2758
  const onKeyDown = (event) => {
2652
2759
  const target = event.target;
2653
2760
  if (target && (target.tagName === "TEXTAREA" || target.tagName === "INPUT" || target.isContentEditable)) return;
@@ -2661,10 +2768,10 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2661
2768
  return () => window.removeEventListener("keydown", onKeyDown);
2662
2769
  }, []);
2663
2770
  const activeFilterCount = (sectionFilter ? 1 : 0) + (statusFilter ? 1 : 0);
2664
- const toolbarStart = /* @__PURE__ */ jsxs7("div", { className: cx(TOOLBAR_GROUP_CLASS2, "min-w-0 pl-3"), children: [
2665
- /* @__PURE__ */ jsxs7("div", { className: "min-w-0 pr-1", children: [
2666
- /* @__PURE__ */ jsx7("h1", { className: "max-w-72 truncate text-sm leading-tight font-semibold", title: canvasName, children: canvasName }),
2667
- /* @__PURE__ */ jsxs7("p", { className: "text-xs leading-tight text-muted-foreground", children: [
2771
+ const toolbarStart = /* @__PURE__ */ jsxs8("div", { className: cx(TOOLBAR_GROUP_CLASS2, "min-w-0 pl-3"), children: [
2772
+ /* @__PURE__ */ jsxs8("div", { className: "min-w-0 pr-1", children: [
2773
+ /* @__PURE__ */ jsx8("h1", { className: "max-w-72 truncate text-sm leading-tight font-semibold", title: canvasName, children: canvasName }),
2774
+ /* @__PURE__ */ jsxs8("p", { className: "text-xs leading-tight text-muted-foreground", children: [
2668
2775
  boards.length,
2669
2776
  " boards \xB7 ",
2670
2777
  layout.sections.length,
@@ -2672,7 +2779,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2672
2779
  matchingBoardIds !== null ? ` \xB7 ${matchingBoardIds.size} matching` : ""
2673
2780
  ] })
2674
2781
  ] }),
2675
- /* @__PURE__ */ jsx7(
2782
+ /* @__PURE__ */ jsx8(
2676
2783
  SearchField,
2677
2784
  {
2678
2785
  size: "sm",
@@ -2684,15 +2791,15 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2684
2791
  className: "w-44"
2685
2792
  }
2686
2793
  ),
2687
- /* @__PURE__ */ jsxs7(Popover, { children: [
2688
- /* @__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: [
2689
- /* @__PURE__ */ jsx7(ListFilter, { className: "size-4" }),
2690
- 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 })
2794
+ /* @__PURE__ */ jsxs8(Popover, { children: [
2795
+ /* @__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: [
2796
+ /* @__PURE__ */ jsx8(ListFilter, { className: "size-4" }),
2797
+ 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 })
2691
2798
  ] }) }),
2692
- /* @__PURE__ */ jsxs7(PopoverContent, { align: "start", className: "w-[22rem] space-y-4 p-4", children: [
2693
- /* @__PURE__ */ jsxs7("div", { className: "space-y-1.5", children: [
2694
- /* @__PURE__ */ jsx7("p", { className: "text-[12.5px] font-bold text-muted-foreground", children: "Section" }),
2695
- /* @__PURE__ */ jsx7(
2799
+ /* @__PURE__ */ jsxs8(PopoverContent, { align: "start", className: "w-[22rem] space-y-4 p-4", children: [
2800
+ /* @__PURE__ */ jsxs8("div", { className: "space-y-1.5", children: [
2801
+ /* @__PURE__ */ jsx8("p", { className: "text-[12.5px] font-bold text-muted-foreground", children: "Section" }),
2802
+ /* @__PURE__ */ jsx8(
2696
2803
  Combobox,
2697
2804
  {
2698
2805
  size: "sm",
@@ -2706,9 +2813,9 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2706
2813
  }
2707
2814
  )
2708
2815
  ] }),
2709
- /* @__PURE__ */ jsxs7("div", { className: "space-y-1.5", children: [
2710
- /* @__PURE__ */ jsx7("p", { className: "text-[12.5px] font-bold text-muted-foreground", children: "Status" }),
2711
- /* @__PURE__ */ jsx7(
2816
+ /* @__PURE__ */ jsxs8("div", { className: "space-y-1.5", children: [
2817
+ /* @__PURE__ */ jsx8("p", { className: "text-[12.5px] font-bold text-muted-foreground", children: "Status" }),
2818
+ /* @__PURE__ */ jsx8(
2712
2819
  QuickFilterPills,
2713
2820
  {
2714
2821
  options: statusFilterOptions,
@@ -2720,7 +2827,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2720
2827
  }
2721
2828
  )
2722
2829
  ] }),
2723
- activeFilterCount > 0 && /* @__PURE__ */ jsx7(
2830
+ activeFilterCount > 0 && /* @__PURE__ */ jsx8(
2724
2831
  Button,
2725
2832
  {
2726
2833
  size: "sm",
@@ -2737,13 +2844,13 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2737
2844
  ] });
2738
2845
  const siteStartRoute = selectedBoard?.route ?? (shownBoardList.some((board) => board.route) ? "/" : null);
2739
2846
  const siteHref = paths.site && siteStartRoute !== null ? `${paths.site(projectKey, canvasKey, siteStartRoute)}${shownLook?.themeId ? `?theme=${encodeURIComponent(shownLook.themeId)}&mode=${shownLook.mode}` : ""}` : null;
2740
- const toolbarEnd = /* @__PURE__ */ jsxs7(Fragment4, { children: [
2741
- siteHref && /* @__PURE__ */ jsxs7(Tooltip, { children: [
2742
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7("span", { children: /* @__PURE__ */ jsx7(router.Link, { href: siteHref, className: TOOL_BUTTON_CLASS2, children: /* @__PURE__ */ jsx7(Globe, { className: "size-4", "aria-label": texts.openAsWebsite }) }) }) }),
2743
- /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: texts.openAsWebsite })
2847
+ const toolbarEnd = /* @__PURE__ */ jsxs8(Fragment5, { children: [
2848
+ siteHref && /* @__PURE__ */ jsxs8(Tooltip, { children: [
2849
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx8("span", { children: /* @__PURE__ */ jsx8(router.Link, { href: siteHref, className: TOOL_BUTTON_CLASS2, children: /* @__PURE__ */ jsx8(Globe, { className: "size-4", "aria-label": texts.openAsWebsite }) }) }) }),
2850
+ /* @__PURE__ */ jsx8(TooltipContent, { side: "bottom", children: texts.openAsWebsite })
2744
2851
  ] }),
2745
- hasResponsiveBoards && /* @__PURE__ */ jsxs7(Tooltip, { children: [
2746
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7(
2852
+ hasResponsiveBoards && /* @__PURE__ */ jsxs8(Tooltip, { children: [
2853
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx8(
2747
2854
  "button",
2748
2855
  {
2749
2856
  type: "button",
@@ -2751,13 +2858,13 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2751
2858
  "aria-pressed": frameHeightMode === "page",
2752
2859
  "aria-label": frameHeightMode === "page" ? "Device frames: whole page" : "Device frames: one screen",
2753
2860
  onClick: () => setFrameHeightMode((mode) => mode === "page" ? "viewport" : "page"),
2754
- children: frameHeightMode === "page" ? /* @__PURE__ */ jsx7(FoldVertical, { className: "size-4" }) : /* @__PURE__ */ jsx7(UnfoldVertical, { className: "size-4" })
2861
+ children: frameHeightMode === "page" ? /* @__PURE__ */ jsx8(FoldVertical, { className: "size-4" }) : /* @__PURE__ */ jsx8(UnfoldVertical, { className: "size-4" })
2755
2862
  }
2756
2863
  ) }),
2757
- /* @__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" })
2864
+ /* @__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" })
2758
2865
  ] }),
2759
- /* @__PURE__ */ jsxs7(Tooltip, { children: [
2760
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7(
2866
+ /* @__PURE__ */ jsxs8(Tooltip, { children: [
2867
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx8(
2761
2868
  "button",
2762
2869
  {
2763
2870
  type: "button",
@@ -2766,13 +2873,13 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2766
2873
  "aria-keyshortcuts": "r",
2767
2874
  "aria-busy": isFetchingCanvas,
2768
2875
  onClick: () => void reloadCanvas(),
2769
- children: /* @__PURE__ */ jsx7(RefreshCw, { className: cx("size-4", isFetchingCanvas && "animate-spin motion-reduce:animate-none") })
2876
+ children: /* @__PURE__ */ jsx8(RefreshCw, { className: cx("size-4", isFetchingCanvas && "animate-spin motion-reduce:animate-none") })
2770
2877
  }
2771
2878
  ) }),
2772
- /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: texts.reload })
2879
+ /* @__PURE__ */ jsx8(TooltipContent, { side: "bottom", children: texts.reload })
2773
2880
  ] }),
2774
- /* @__PURE__ */ jsxs7(Tooltip, { children: [
2775
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7("span", { children: /* @__PURE__ */ jsxs7(
2881
+ /* @__PURE__ */ jsxs8(Tooltip, { children: [
2882
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx8("span", { children: /* @__PURE__ */ jsxs8(
2776
2883
  "button",
2777
2884
  {
2778
2885
  type: "button",
@@ -2781,14 +2888,14 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2781
2888
  "aria-label": `Copy reference of ${selectedBoardIds.size} selected board(s) for an agent (C)`,
2782
2889
  onClick: copySelectedReferences,
2783
2890
  children: [
2784
- /* @__PURE__ */ jsx7(ClipboardCopy3, { className: "size-4" }),
2785
- 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 })
2891
+ /* @__PURE__ */ jsx8(ClipboardCopy3, { className: "size-4" }),
2892
+ 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 })
2786
2893
  ]
2787
2894
  }
2788
2895
  ) }) }),
2789
- /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: selectedBoardIds.size === 0 ? "Select boards to copy their reference" : "Copy reference for an agent (C)" })
2896
+ /* @__PURE__ */ jsx8(TooltipContent, { side: "bottom", children: selectedBoardIds.size === 0 ? "Select boards to copy their reference" : "Copy reference for an agent (C)" })
2790
2897
  ] }),
2791
- hasThemes && themes.length > 0 && /* @__PURE__ */ jsx7(
2898
+ hasThemes && themes.length > 0 && /* @__PURE__ */ jsx8(
2792
2899
  Combobox,
2793
2900
  {
2794
2901
  shape: "pill",
@@ -2803,8 +2910,8 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2803
2910
  className: "w-44"
2804
2911
  }
2805
2912
  ),
2806
- isRendererEnabled && missingThumbnailCount > 0 && renderStatus !== null && renderStatus !== "DONE" ? /* @__PURE__ */ jsxs7(Tooltip, { children: [
2807
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs7(
2913
+ isRendererEnabled && missingThumbnailCount > 0 && renderStatus !== null && renderStatus !== "DONE" ? /* @__PURE__ */ jsxs8(Tooltip, { children: [
2914
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs8(
2808
2915
  "button",
2809
2916
  {
2810
2917
  type: "button",
@@ -2812,7 +2919,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2812
2919
  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",
2813
2920
  onClick: () => fileRenderRequest(true),
2814
2921
  children: [
2815
- 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 }),
2922
+ 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 }),
2816
2923
  renderStatus === "FAILED" ? texts.thumbnailsFailed : renderStatus === "WAITING_FOR_RENDERER" ? texts.thumbnailsWaitingForRenderer(shownThemeLabel) : texts.thumbnailsRendering(shownThemeLabel),
2817
2924
  " ",
2818
2925
  "\xB7 ",
@@ -2822,13 +2929,13 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2822
2929
  ]
2823
2930
  }
2824
2931
  ) }),
2825
- /* @__PURE__ */ jsxs7(TooltipContent, { side: "bottom", className: "max-w-sm", children: [
2932
+ /* @__PURE__ */ jsxs8(TooltipContent, { side: "bottom", className: "max-w-sm", children: [
2826
2933
  texts.thumbnailsMissing(missingThumbnailCount),
2827
2934
  canvas?.renderRequestError ? ` ${texts.thumbnailsLastError(canvas.renderRequestError)}` : ""
2828
2935
  ] })
2829
2936
  ] }) : null,
2830
- hasThemes && themes.length > 0 && /* @__PURE__ */ jsxs7(Tooltip, { children: [
2831
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7("span", { children: /* @__PURE__ */ jsx7(
2937
+ hasThemes && themes.length > 0 && /* @__PURE__ */ jsxs8(Tooltip, { children: [
2938
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx8("span", { children: /* @__PURE__ */ jsx8(
2832
2939
  "button",
2833
2940
  {
2834
2941
  type: "button",
@@ -2840,13 +2947,13 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2840
2947
  const nextMode = effectiveMode === "dark" ? "light" : "dark";
2841
2948
  setCanvasStateValue("mode", nextMode === defaultMode ? "" : nextMode);
2842
2949
  },
2843
- children: effectiveMode === "dark" ? /* @__PURE__ */ jsx7(Sun, { className: "size-4" }) : /* @__PURE__ */ jsx7(Moon, { className: "size-4" })
2950
+ children: effectiveMode === "dark" ? /* @__PURE__ */ jsx8(Sun, { className: "size-4" }) : /* @__PURE__ */ jsx8(Moon, { className: "size-4" })
2844
2951
  }
2845
2952
  ) }) }),
2846
- /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: supportsDark ? effectiveMode === "dark" ? "Light theme" : "Dark theme" : texts.themeWithoutDarkMode })
2953
+ /* @__PURE__ */ jsx8(TooltipContent, { side: "bottom", children: supportsDark ? effectiveMode === "dark" ? "Light theme" : "Dark theme" : texts.themeWithoutDarkMode })
2847
2954
  ] }),
2848
- /* @__PURE__ */ jsxs7(Tooltip, { children: [
2849
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs7(
2955
+ /* @__PURE__ */ jsxs8(Tooltip, { children: [
2956
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs8(
2850
2957
  "button",
2851
2958
  {
2852
2959
  type: "button",
@@ -2855,15 +2962,15 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2855
2962
  "aria-pressed": isCommentsPanelOpen,
2856
2963
  onClick: toggleCommentsPanel,
2857
2964
  children: [
2858
- isCommentsPanelOpen ? /* @__PURE__ */ jsx7(PanelRightClose, { className: "size-4" }) : /* @__PURE__ */ jsx7(PanelRightOpen, { className: "size-4" }),
2859
- 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 })
2965
+ isCommentsPanelOpen ? /* @__PURE__ */ jsx8(PanelRightClose, { className: "size-4" }) : /* @__PURE__ */ jsx8(PanelRightOpen, { className: "size-4" }),
2966
+ 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 })
2860
2967
  ]
2861
2968
  }
2862
2969
  ) }),
2863
- /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: isCommentsPanelOpen ? "Hide comments" : "Show comments" })
2970
+ /* @__PURE__ */ jsx8(TooltipContent, { side: "bottom", children: isCommentsPanelOpen ? "Hide comments" : "Show comments" })
2864
2971
  ] }),
2865
- /* @__PURE__ */ jsxs7(Tooltip, { children: [
2866
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7(
2972
+ /* @__PURE__ */ jsxs8(Tooltip, { children: [
2973
+ /* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx8(
2867
2974
  "button",
2868
2975
  {
2869
2976
  type: "button",
@@ -2871,13 +2978,13 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2871
2978
  "aria-label": isFullscreen ? "Exit fullscreen (F)" : "Fullscreen (F)",
2872
2979
  "aria-pressed": isFullscreen,
2873
2980
  onClick: () => setIsFullscreen((value) => !value),
2874
- children: isFullscreen ? /* @__PURE__ */ jsx7(Minimize, { className: "size-4" }) : /* @__PURE__ */ jsx7(Maximize, { className: "size-4" })
2981
+ children: isFullscreen ? /* @__PURE__ */ jsx8(Minimize, { className: "size-4" }) : /* @__PURE__ */ jsx8(Maximize, { className: "size-4" })
2875
2982
  }
2876
2983
  ) }),
2877
- /* @__PURE__ */ jsx7(TooltipContent, { side: "bottom", children: isFullscreen ? "Exit fullscreen (F)" : "Fullscreen (F)" })
2984
+ /* @__PURE__ */ jsx8(TooltipContent, { side: "bottom", children: isFullscreen ? "Exit fullscreen (F)" : "Fullscreen (F)" })
2878
2985
  ] })
2879
2986
  ] });
2880
- return /* @__PURE__ */ jsxs7(
2987
+ return /* @__PURE__ */ jsxs8(
2881
2988
  "div",
2882
2989
  {
2883
2990
  "data-page-frame": true,
@@ -2888,17 +2995,17 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2888
2995
  isFullscreen && "fixed inset-0 z-40 h-dvh bg-background"
2889
2996
  ),
2890
2997
  children: [
2891
- error && /* @__PURE__ */ jsx7("div", { className: "p-6", children: /* @__PURE__ */ jsx7(
2998
+ error && /* @__PURE__ */ jsx8("div", { className: "p-6", children: /* @__PURE__ */ jsx8(
2892
2999
  StatusCallout,
2893
3000
  {
2894
3001
  tone: "destructive",
2895
3002
  title: "The canvas could not be loaded",
2896
- description: normalizeDddError2(error, "Request failed").message
3003
+ description: normalizeDddError3(error, "Request failed").message
2897
3004
  }
2898
3005
  ) }),
2899
- (isLoading || !isLookResolved && !canvas) && /* @__PURE__ */ jsx7(Skeleton, { className: "m-6 flex-1 rounded-2xl" }),
2900
- canvas && /* @__PURE__ */ jsxs7(CanvasViewContext.Provider, { value: canvasView, children: [
2901
- /* @__PURE__ */ jsx7("div", { ref: canvasAreaRef, className: "relative min-h-[480px] min-w-0 flex-1", children: canvasAspectRatio !== null && /* @__PURE__ */ jsx7(
3006
+ (isLoading || !isLookResolved && !canvas) && /* @__PURE__ */ jsx8(Skeleton, { className: "m-6 flex-1 rounded-2xl" }),
3007
+ canvas && /* @__PURE__ */ jsxs8(CanvasViewContext.Provider, { value: canvasView, children: [
3008
+ /* @__PURE__ */ jsx8("div", { ref: canvasAreaRef, className: "relative min-h-[480px] min-w-0 flex-1", children: canvasAspectRatio !== null && /* @__PURE__ */ jsx8(
2902
3009
  DesignCanvasFlow,
2903
3010
  {
2904
3011
  layout,
@@ -2920,7 +3027,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2920
3027
  selectedNodeId: selectedBoardId
2921
3028
  }
2922
3029
  ) }),
2923
- 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(
3030
+ 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(
2924
3031
  SelectedBoardPanel,
2925
3032
  {
2926
3033
  projectKey,
@@ -2936,13 +3043,13 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2936
3043
  onCopyThreadReference: copyThreadReference
2937
3044
  },
2938
3045
  selectedBoard.boardKey ?? ""
2939
- ) : /* @__PURE__ */ jsxs7("div", { className: "space-y-4", children: [
2940
- /* @__PURE__ */ jsxs7("div", { children: [
2941
- /* @__PURE__ */ jsx7("h2", { className: "text-title-card font-semibold", children: "Open comments" }),
2942
- /* @__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." })
3046
+ ) : /* @__PURE__ */ jsxs8("div", { className: "space-y-4", children: [
3047
+ /* @__PURE__ */ jsxs8("div", { children: [
3048
+ /* @__PURE__ */ jsx8("h2", { className: "text-title-card font-semibold", children: "Open comments" }),
3049
+ /* @__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." })
2943
3050
  ] }),
2944
- boardsWithOpenThreads.length === 0 && /* @__PURE__ */ jsx7("p", { className: "text-sm text-muted-foreground", children: "No open comments on this canvas." }),
2945
- /* @__PURE__ */ jsx7("ul", { className: "space-y-1", children: boardsWithOpenThreads.map((nodeId) => /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsxs7(
3051
+ boardsWithOpenThreads.length === 0 && /* @__PURE__ */ jsx8("p", { className: "text-sm text-muted-foreground", children: "No open comments on this canvas." }),
3052
+ /* @__PURE__ */ jsx8("ul", { className: "space-y-1", children: boardsWithOpenThreads.map((nodeId) => /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsxs8(
2946
3053
  "button",
2947
3054
  {
2948
3055
  type: "button",
@@ -2952,9 +3059,9 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2952
3059
  requestFit([nodeId]);
2953
3060
  },
2954
3061
  children: [
2955
- /* @__PURE__ */ jsx7("span", { className: "truncate", children: boardsByNodeId.get(nodeId)?.title }),
2956
- /* @__PURE__ */ jsxs7("span", { className: "inline-flex shrink-0 items-center gap-1 text-xs font-semibold text-muted-foreground", children: [
2957
- /* @__PURE__ */ jsx7(MessageSquare2, { className: "size-3.5", "aria-hidden": true }),
3062
+ /* @__PURE__ */ jsx8("span", { className: "truncate", children: boardsByNodeId.get(nodeId)?.title }),
3063
+ /* @__PURE__ */ jsxs8("span", { className: "inline-flex shrink-0 items-center gap-1 text-xs font-semibold text-muted-foreground", children: [
3064
+ /* @__PURE__ */ jsx8(MessageSquare2, { className: "size-3.5", "aria-hidden": true }),
2958
3065
  " ",
2959
3066
  openThreadCounts.get(nodeId)
2960
3067
  ] })
@@ -2963,7 +3070,7 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2963
3070
  ) }, nodeId)) })
2964
3071
  ] }) })
2965
3072
  ] }),
2966
- /* @__PURE__ */ jsx7(
3073
+ /* @__PURE__ */ jsx8(
2967
3074
  BoardFocusView,
2968
3075
  {
2969
3076
  projectKey,
@@ -2986,7 +3093,10 @@ var DesignStudioCanvasScreen = ({ projectKey, canvasKey }) => {
2986
3093
  viewport: focusViewport,
2987
3094
  onViewportChange: setChosenFocusViewport,
2988
3095
  onCopyReference: ({ region, note }) => focusedBoardId && void copyReferences([buildReferenceFor(focusedBoardId, { region, note, viewport: focusViewport })]),
2989
- onCopyThreadReference: copyThreadReference
3096
+ onCopyThreadReference: copyThreadReference,
3097
+ themeReference: canvas?.themeReference ?? null,
3098
+ themeLabel: shownThemeLabel,
3099
+ isRendererEnabled
2990
3100
  }
2991
3101
  )
2992
3102
  ]