@activecollab/components 2.0.482 → 2.0.483

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.
Files changed (40) hide show
  1. package/dist/cjs/presentation/whiteboard/canvasElements.js +2 -1
  2. package/dist/cjs/presentation/whiteboard/canvasElements.js.map +1 -1
  3. package/dist/cjs/presentation/whiteboard/elements.js +88 -95
  4. package/dist/cjs/presentation/whiteboard/elements.js.map +1 -1
  5. package/dist/cjs/presentation/whiteboard/inspector.js +17 -38
  6. package/dist/cjs/presentation/whiteboard/inspector.js.map +1 -1
  7. package/dist/cjs/presentation/whiteboard/linkElement.js +1 -1
  8. package/dist/cjs/presentation/whiteboard/linkElement.js.map +1 -1
  9. package/dist/cjs/presentation/whiteboard/palette.js +230 -0
  10. package/dist/cjs/presentation/whiteboard/palette.js.map +1 -0
  11. package/dist/cjs/presentation/whiteboard/paletteReview.js +342 -0
  12. package/dist/cjs/presentation/whiteboard/paletteReview.js.map +1 -0
  13. package/dist/cjs/presentation/whiteboard/projectElements.js +1 -1
  14. package/dist/cjs/presentation/whiteboard/projectElements.js.map +1 -1
  15. package/dist/esm/presentation/whiteboard/canvasElements.d.ts.map +1 -1
  16. package/dist/esm/presentation/whiteboard/canvasElements.js +2 -1
  17. package/dist/esm/presentation/whiteboard/canvasElements.js.map +1 -1
  18. package/dist/esm/presentation/whiteboard/elements.d.ts +11 -12
  19. package/dist/esm/presentation/whiteboard/elements.d.ts.map +1 -1
  20. package/dist/esm/presentation/whiteboard/elements.js +83 -84
  21. package/dist/esm/presentation/whiteboard/elements.js.map +1 -1
  22. package/dist/esm/presentation/whiteboard/inspector.d.ts +5 -10
  23. package/dist/esm/presentation/whiteboard/inspector.d.ts.map +1 -1
  24. package/dist/esm/presentation/whiteboard/inspector.js +18 -35
  25. package/dist/esm/presentation/whiteboard/inspector.js.map +1 -1
  26. package/dist/esm/presentation/whiteboard/linkElement.d.ts.map +1 -1
  27. package/dist/esm/presentation/whiteboard/linkElement.js +2 -2
  28. package/dist/esm/presentation/whiteboard/linkElement.js.map +1 -1
  29. package/dist/esm/presentation/whiteboard/palette.d.ts +45 -0
  30. package/dist/esm/presentation/whiteboard/palette.d.ts.map +1 -0
  31. package/dist/esm/presentation/whiteboard/palette.js +160 -0
  32. package/dist/esm/presentation/whiteboard/palette.js.map +1 -0
  33. package/dist/esm/presentation/whiteboard/paletteReview.d.ts +3 -0
  34. package/dist/esm/presentation/whiteboard/paletteReview.d.ts.map +1 -0
  35. package/dist/esm/presentation/whiteboard/paletteReview.js +308 -0
  36. package/dist/esm/presentation/whiteboard/paletteReview.js.map +1 -0
  37. package/dist/esm/presentation/whiteboard/projectElements.d.ts.map +1 -1
  38. package/dist/esm/presentation/whiteboard/projectElements.js +2 -2
  39. package/dist/esm/presentation/whiteboard/projectElements.js.map +1 -1
  40. package/package.json +1 -1
@@ -1,15 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import React, { useState } from "react";
3
3
  import styled from "styled-components";
4
- import { Dot } from "../../components/Dot";
4
+ import { BoardColorSwatch, DEFAULT_COLOR, DEFAULT_STICKY_KEY, boardColorOptions, resolveBoardColor } from "./palette";
5
5
  import { IconButton } from "../../components/IconButton";
6
- import { ArrowRefreshIcon, CircleIcon, CircleSlashIcon, LockIcon, RoundedRectangleIcon, TextAlignCenterIcon, TextAlignJustifyIcon, TextAlignLeftIcon, TextAlignRightIcon, TextStyleBoldIcon, TextStyleItalicIcon, TextStyleStrikeIcon, TextStyleUnderlineIcon, TrashIcon, TriangleIcon } from "../../components/Icons";
6
+ import { ArrowRefreshIcon, CircleIcon, LockIcon, RoundedRectangleIcon, TextAlignCenterIcon, TextAlignJustifyIcon, TextAlignLeftIcon, TextAlignRightIcon, TextStyleBoldIcon, TextStyleItalicIcon, TextStyleStrikeIcon, TextStyleUnderlineIcon, TrashIcon, TriangleIcon } from "../../components/Icons";
7
7
  import { List, ListItem } from "../../components/List";
8
8
  import { Menu } from "../../components/Menu";
9
9
  import { Select } from "../../components/Select";
10
10
  import { SelectTrigger } from "../../components/SelectTrigger";
11
11
  import { Tooltip } from "../../components/Tooltip";
12
- import { colors } from "../../utils/colors";
13
12
 
14
13
  /* ------------------------------------------------------------------ */
15
14
  /* Canvas elements (1:1 with new-activecollab-front */
@@ -18,12 +17,12 @@ import { colors } from "../../utils/colors";
18
17
  /* FormattingToolbarContainer.jsx + the two formatting toolbars) */
19
18
  /* ------------------------------------------------------------------ */
20
19
 
21
- /* element colors are canvas DATA (app constants), not theme — hardcoded */
22
- export const ELEMENT_FILL = "#ffffff";
23
- export const ELEMENT_STROKE = "#374151";
24
- export const ELEMENT_TEXT = "#1f2937";
25
- export const STICKY_FILL = "#fbbf24";
26
- export const SELECTION_BLUE = "#3b82f6";
20
+ export const ELEMENT_FILL = DEFAULT_COLOR;
21
+ export const ELEMENT_STROKE = DEFAULT_COLOR;
22
+ export const ELEMENT_TEXT = DEFAULT_COLOR;
23
+ export const STICKY_FILL = DEFAULT_STICKY_KEY;
24
+ export const SELECTION_BLUE = "var(--selectable-active)";
25
+ export const SELECTION_WASH = "color-mix(in srgb, var(--selectable-active) 8%, transparent)";
27
26
 
28
27
  /* Discrete option sets for the right Inspector — mirror the app's fixed
29
28
  font-size ladder and the border-thickness steps offered in the toolbar. */
@@ -45,17 +44,6 @@ export const ELEMENT_BODIES = {
45
44
  "shape-circle": "<p>The <strong>discovery</strong> loop for this initiative.</p><p>We collect signals from support, sales and analytics, then cluster them into themes before committing to a direction.</p><ul><li>Owner: research</li><li>Inputs: interviews, tickets, funnel data</li><li>Output: a prioritised opportunity list</li></ul><p>See the <em>retro notes</em> and last quarter's readout for the full context and prior decisions.</p>"
46
45
  };
47
46
 
48
- /* Named-colour options for the Inspector fill/stroke pickers, built from the
49
- design system's shared data colours (utils/colors). Shaped for the DS Select
50
- (id + name + color + textColor) so it renders the standard dot-and-radio menu
51
- used by the label dialogs. */
52
- export const COLOR_OPTIONS = Object.values(colors).map(entry => ({
53
- id: entry.color,
54
- name: entry.name,
55
- color: entry.color,
56
- textColor: entry.color
57
- }));
58
-
59
47
  /* per-shape editable state (the app bakes opacity into rgba via
60
48
  hexToRgba/parseOpacity; the mock keeps opacity separate and rebuilds
61
49
  the color when rendering) */
@@ -93,7 +81,10 @@ export const withOpacity = (color, opacityPct) => {
93
81
  if (color.startsWith("hsl(")) {
94
82
  return color.replace("hsl(", "hsla(").replace(")", ", " + alpha + ")");
95
83
  }
96
- return color;
84
+ if (color === "transparent") {
85
+ return color;
86
+ }
87
+ return "color-mix(in srgb, " + color + " " + opacityPct + "%, transparent)";
97
88
  };
98
89
 
99
90
  /* getShapeBorder from ShapeElement.jsx */
@@ -102,7 +93,7 @@ export const shapeBorder = state => {
102
93
  return "none";
103
94
  }
104
95
  const lineStyle = state.strokeDash === "5,5" ? "dashed" : state.strokeDash === "2,2" ? "dotted" : "solid";
105
- return state.strokeWidth + "px " + lineStyle + " " + withOpacity(state.stroke, state.strokeOpacity);
96
+ return state.strokeWidth + "px " + lineStyle + " " + withOpacity(resolveBoardColor(state.stroke, "stroke"), state.strokeOpacity);
106
97
  };
107
98
 
108
99
  /* PostitElement gradient: color → same color at ~87% alpha */
@@ -110,8 +101,9 @@ export const stickyGradient = function (color, opacity) {
110
101
  if (opacity === void 0) {
111
102
  opacity = 100;
112
103
  }
113
- const main = withOpacity(color, opacity);
114
- const faded = withOpacity(color, Math.max(0, opacity - 13));
104
+ const resolved = resolveBoardColor(color, "sticky");
105
+ const main = withOpacity(resolved, opacity);
106
+ const faded = withOpacity(resolved, Math.max(0, opacity - 13));
115
107
  return "linear-gradient(135deg, " + main + " 0%, " + faded + " 100%)";
116
108
  };
117
109
  /* Grid config, aligned to the 8px design-system grid. dotSpacing drives the
@@ -171,10 +163,26 @@ export const CANVAS_ELEMENTS = [{
171
163
  y: 430,
172
164
  width: 120,
173
165
  height: 120
166
+ }, {
167
+ id: "shape-legacy",
168
+ kind: "shape",
169
+ initialType: "rectangle",
170
+ x: 980,
171
+ y: 300,
172
+ width: 100,
173
+ height: 60
174
174
  }];
175
+
176
+ // mirrors: new-activecollab-front Whiteboards/utils/templates.js createStyle("#10b981", "#059669")
177
+ export const LEGACY_SHAPE_STYLES = {
178
+ "shape-legacy": {
179
+ fill: "#10b981",
180
+ stroke: "#059669"
181
+ }
182
+ };
175
183
  export const INITIAL_SHAPES = CANVAS_ELEMENTS.reduce((acc, element) => {
176
184
  if (element.kind === "shape" && element.initialType) {
177
- acc[element.id] = defaultShapeState(element.initialType);
185
+ acc[element.id] = _extends({}, defaultShapeState(element.initialType), LEGACY_SHAPE_STYLES[element.id]);
178
186
  }
179
187
  return acc;
180
188
  }, {});
@@ -198,7 +206,7 @@ export const StyledCanvasLayer = styled.div.withConfig({
198
206
  export const StyledCanvasElement = styled.div.withConfig({
199
207
  displayName: "elements__StyledCanvasElement",
200
208
  componentId: "sc-ohnju4-1"
201
- })(["position:absolute;cursor:move;&:hover:not(.selected){box-shadow:0 0 0 4px rgba(96,165,250,0.7);}&.selected{box-shadow:0 0 0 2px rgba(59,130,246,0.5);}&.is-card{cursor:grab;height:auto;&:hover:not(.selected),&.selected{box-shadow:none;}}.shape-fill{width:100%;height:100%;box-sizing:border-box;}"]);
209
+ })(["position:absolute;cursor:move;&:hover:not(.selected){box-shadow:0 0 0 4px color-mix(in srgb,var(--selectable-active) 70%,transparent);}&.selected{box-shadow:0 0 0 2px color-mix(in srgb,var(--selectable-active) 50%,transparent);}&.is-card{cursor:grab;height:auto;&:hover:not(.selected),&.selected{box-shadow:none;}}.shape-fill{width:100%;height:100%;box-sizing:border-box;}"]);
202
210
 
203
211
  /* PostitElement: 12px padding, shadow-lg, 1deg tilt that straightens on
204
212
  hover, diagonal gradient to ~87% alpha, Comic Sans */
@@ -212,7 +220,7 @@ export const StyledSticky = styled.div.withConfig({
212
220
  export const StyledHandles = styled.div.withConfig({
213
221
  displayName: "elements__StyledHandles",
214
222
  componentId: "sc-ohnju4-3"
215
- })([".rh{position:absolute;width:12px;height:12px;box-sizing:border-box;background-color:", ";border:2px solid #ffffff;border-radius:2px;z-index:10;&:hover{background-color:#2563eb;}}.rh-nw{top:-6px;left:-6px;cursor:nw-resize;}.rh-n{top:-6px;left:50%;margin-left:-6px;cursor:n-resize;}.rh-ne{top:-6px;right:-6px;cursor:ne-resize;}.rh-w{top:50%;left:-6px;margin-top:-6px;cursor:w-resize;}.rh-e{top:50%;right:-6px;margin-top:-6px;cursor:e-resize;}.rh-sw{bottom:-6px;left:-6px;cursor:sw-resize;}.rh-s{bottom:-6px;left:50%;margin-left:-6px;cursor:s-resize;}.rh-se{bottom:-6px;right:-6px;cursor:se-resize;}.rotate-handle{position:absolute;bottom:-35px;left:-35px;width:24px;height:24px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;background-color:#ffffff;border:2px solid ", ";border-radius:50%;cursor:grab;z-index:11;svg{width:16px;height:16px;}}"], SELECTION_BLUE, SELECTION_BLUE);
223
+ })([".rh{position:absolute;width:12px;height:12px;box-sizing:border-box;background-color:", ";border:2px solid var(--page-paper-main);border-radius:2px;z-index:10;&:hover{background-color:color-mix( in srgb,var(--selectable-active) 80%,var(--only-black) );}}.rh-nw{top:-6px;left:-6px;cursor:nw-resize;}.rh-n{top:-6px;left:50%;margin-left:-6px;cursor:n-resize;}.rh-ne{top:-6px;right:-6px;cursor:ne-resize;}.rh-w{top:50%;left:-6px;margin-top:-6px;cursor:w-resize;}.rh-e{top:50%;right:-6px;margin-top:-6px;cursor:e-resize;}.rh-sw{bottom:-6px;left:-6px;cursor:sw-resize;}.rh-s{bottom:-6px;left:50%;margin-left:-6px;cursor:s-resize;}.rh-se{bottom:-6px;right:-6px;cursor:se-resize;}.rotate-handle{position:absolute;bottom:-35px;left:-35px;width:24px;height:24px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;background-color:var(--page-paper-main);border:2px solid ", ";border-radius:50%;cursor:grab;z-index:11;svg{width:16px;height:16px;}}"], SELECTION_BLUE, SELECTION_BLUE);
216
224
  export const RESIZE_DIRECTIONS = ["nw", "n", "ne", "w", "e", "sw", "s", "se"];
217
225
  export const ResizeHandles = () => /*#__PURE__*/React.createElement(StyledHandles, {
218
226
  onMouseDown: event => event.stopPropagation()
@@ -222,7 +230,9 @@ export const ResizeHandles = () => /*#__PURE__*/React.createElement(StyledHandle
222
230
  })), /*#__PURE__*/React.createElement("span", {
223
231
  className: "rotate-handle"
224
232
  }, /*#__PURE__*/React.createElement(ArrowRefreshIcon, {
225
- fill: SELECTION_BLUE
233
+ style: {
234
+ fill: SELECTION_BLUE
235
+ }
226
236
  })));
227
237
 
228
238
  /* FormattingToolbarContainer: Paper paper-2 (bg + 8px radius + shadow,
@@ -424,32 +434,17 @@ export const AlignmentMenu = _ref3 => {
424
434
  uses, minus the name on the trigger. `includeTransparent` adds "Transparent"
425
435
  first: shape fill opts in, sticky fill and text colour do not. */
426
436
 
427
- const TOOLBAR_TRANSPARENT_OPTION = {
428
- id: "transparent",
429
- name: "Transparent",
430
- color: "transparent",
431
- textColor: "transparent"
432
- };
433
- const sameHex = (a, b) => a.toLowerCase() === b.toLowerCase();
434
- const ColorDot = _ref4 => {
435
- let color = _ref4.color;
436
- return sameHex(color, "transparent") ? /*#__PURE__*/React.createElement(CircleSlashIcon, {
437
- width: 16,
438
- height: 16,
439
- fill: "currentColor"
440
- }) : /*#__PURE__*/React.createElement(Dot, {
441
- color: color,
442
- size: 16
437
+ export const ToolbarColorSwatch = _ref4 => {
438
+ let value = _ref4.value,
439
+ role = _ref4.role,
440
+ includeTransparent = _ref4.includeTransparent,
441
+ includeDefault = _ref4.includeDefault,
442
+ label = _ref4.label,
443
+ onChange = _ref4.onChange;
444
+ const options = boardColorOptions(role, value, {
445
+ includeTransparent,
446
+ includeDefault
443
447
  });
444
- };
445
- export const ToolbarColorSwatch = _ref5 => {
446
- var _options$find$id, _options$find;
447
- let value = _ref5.value,
448
- includeTransparent = _ref5.includeTransparent,
449
- label = _ref5.label,
450
- onChange = _ref5.onChange;
451
- const options = includeTransparent ? [TOOLBAR_TRANSPARENT_OPTION, ...COLOR_OPTIONS] : COLOR_OPTIONS;
452
- const selected = (_options$find$id = (_options$find = options.find(option => sameHex(option.id, value))) == null ? void 0 : _options$find.id) != null ? _options$find$id : value;
453
448
  return /*#__PURE__*/React.createElement(Tooltip, {
454
449
  title: label
455
450
  }, /*#__PURE__*/React.createElement("span", {
@@ -460,13 +455,11 @@ export const ToolbarColorSwatch = _ref5 => {
460
455
  forceCloseMenu: true,
461
456
  keepSameOptionsOrder: true,
462
457
  options: options,
463
- selected: selected,
458
+ selected: value,
464
459
  onChange: next => onChange(String(Array.isArray(next) ? next[0] : next)),
465
460
  renderOption: option => /*#__PURE__*/React.createElement("span", {
466
461
  className: "tb-color-option"
467
- }, /*#__PURE__*/React.createElement(ColorDot, {
468
- color: String(option.id)
469
- }), option.name),
462
+ }, option.icon, option.name),
470
463
  target: /*#__PURE__*/React.createElement(SelectTrigger, {
471
464
  "aria-label": label,
472
465
  style: {
@@ -476,8 +469,9 @@ export const ToolbarColorSwatch = _ref5 => {
476
469
  }
477
470
  }, /*#__PURE__*/React.createElement("span", {
478
471
  className: "tb-color-value"
479
- }, /*#__PURE__*/React.createElement(ColorDot, {
480
- color: value
472
+ }, /*#__PURE__*/React.createElement(BoardColorSwatch, {
473
+ value: value,
474
+ role: role
481
475
  })))
482
476
  })));
483
477
  };
@@ -485,9 +479,9 @@ export const ToolbarColorSwatch = _ref5 => {
485
479
  /* The app's `ValuePicker` for the font size: a DS `Select` over the fixed size
486
480
  ladder, its trigger reading "16 pt". */
487
481
 
488
- export const ToolbarFontSizeSelect = _ref6 => {
489
- let value = _ref6.value,
490
- onChange = _ref6.onChange;
482
+ export const ToolbarFontSizeSelect = _ref5 => {
483
+ let value = _ref5.value,
484
+ onChange = _ref5.onChange;
491
485
  return /*#__PURE__*/React.createElement(Tooltip, {
492
486
  title: "Font Size"
493
487
  }, /*#__PURE__*/React.createElement("span", {
@@ -517,13 +511,13 @@ export const ToolbarFontSizeSelect = _ref6 => {
517
511
  and shape toolbars share (font-size picker, TextStyleButtons, AlignmentMenu).
518
512
  Kept generic so both element shapes can drive it. */
519
513
 
520
- export const ToolbarTextControls = _ref7 => {
521
- let fontSize = _ref7.fontSize,
522
- styleFlags = _ref7.styleFlags,
523
- align = _ref7.align,
524
- onFontSize = _ref7.onFontSize,
525
- onToggleStyle = _ref7.onToggleStyle,
526
- onAlign = _ref7.onAlign;
514
+ export const ToolbarTextControls = _ref6 => {
515
+ let fontSize = _ref6.fontSize,
516
+ styleFlags = _ref6.styleFlags,
517
+ align = _ref6.align,
518
+ onFontSize = _ref6.onFontSize,
519
+ onToggleStyle = _ref6.onToggleStyle,
520
+ onAlign = _ref6.onAlign;
527
521
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ToolbarFontSizeSelect, {
528
522
  value: fontSize,
529
523
  onChange: onFontSize
@@ -544,13 +538,13 @@ export const ToolbarTextControls = _ref7 => {
544
538
  fill colour → the same text controls as the sticky toolbar → Lock / Delete.
545
539
  Stroke is no longer edited here — it lives only in the Inspector's Stroke
546
540
  group now. Mirrors the app's ShapeFormattingToolbar. */
547
- export const ShapeFormattingToolbar = _ref8 => {
541
+ export const ShapeFormattingToolbar = _ref7 => {
548
542
  var _element$align;
549
- let element = _ref8.element,
550
- onUpdate = _ref8.onUpdate,
551
- onDelete = _ref8.onDelete,
552
- locked = _ref8.locked,
553
- onToggleLock = _ref8.onToggleLock;
543
+ let element = _ref7.element,
544
+ onUpdate = _ref7.onUpdate,
545
+ onDelete = _ref7.onDelete,
546
+ locked = _ref7.locked,
547
+ onToggleLock = _ref7.onToggleLock;
554
548
  return /*#__PURE__*/React.createElement(StyledFormattingToolbar, {
555
549
  onClick: stopClick,
556
550
  onMouseDown: stopClick
@@ -561,6 +555,7 @@ export const ShapeFormattingToolbar = _ref8 => {
561
555
  })
562
556
  }), /*#__PURE__*/React.createElement(ToolbarColorSwatch, {
563
557
  value: element.fill,
558
+ role: "fill",
564
559
  includeTransparent: true,
565
560
  label: "Fill color",
566
561
  onChange: fill => onUpdate({
@@ -589,17 +584,19 @@ export const ShapeFormattingToolbar = _ref8 => {
589
584
  controls (font-size, B/I/U/S, alignment menu) → Lock / Delete. The note's
590
585
  colour is its whole point, so its fill swatch does NOT offer Transparent.
591
586
  Mirrors the app's PostitFormattingToolbar. */
592
- export const PostitFormattingToolbar = _ref9 => {
593
- let value = _ref9.value,
594
- onChange = _ref9.onChange,
595
- onDelete = _ref9.onDelete,
596
- locked = _ref9.locked,
597
- onToggleLock = _ref9.onToggleLock;
587
+ export const PostitFormattingToolbar = _ref8 => {
588
+ let value = _ref8.value,
589
+ onChange = _ref8.onChange,
590
+ onDelete = _ref8.onDelete,
591
+ locked = _ref8.locked,
592
+ onToggleLock = _ref8.onToggleLock;
598
593
  return /*#__PURE__*/React.createElement(StyledFormattingToolbar, {
599
594
  onClick: stopClick,
600
595
  onMouseDown: stopClick
601
596
  }, /*#__PURE__*/React.createElement(ToolbarColorSwatch, {
602
597
  value: value.color,
598
+ role: "sticky",
599
+ includeDefault: false,
603
600
  label: "Note color",
604
601
  onChange: color => onChange(_extends({}, value, {
605
602
  color
@@ -647,14 +644,16 @@ width, height) {
647
644
  }
648
645
  }, /*#__PURE__*/React.createElement("polygon", {
649
646
  points: width / 2 + ",0 " + width + "," + height + " 0," + height,
650
- fill: withOpacity(state.fill, state.fillOpacity),
651
- stroke: withOpacity(state.stroke, state.strokeOpacity),
647
+ style: {
648
+ fill: withOpacity(resolveBoardColor(state.fill, "fill"), state.fillOpacity),
649
+ stroke: withOpacity(resolveBoardColor(state.stroke, "stroke"), state.strokeOpacity)
650
+ },
652
651
  strokeWidth: state.strokeWidth,
653
652
  strokeDasharray: state.strokeDash
654
653
  })) : /*#__PURE__*/React.createElement("div", {
655
654
  className: "shape-fill",
656
655
  style: {
657
- backgroundColor: withOpacity(state.fill, state.fillOpacity),
656
+ backgroundColor: withOpacity(resolveBoardColor(state.fill, "fill"), state.fillOpacity),
658
657
  border: shapeBorder(state),
659
658
  borderRadius: state.type === "circle" ? "50%" : state.borderRadius
660
659
  }
@@ -1 +1 @@
1
- {"version":3,"file":"elements.js","names":["React","useState","styled","Dot","IconButton","ArrowRefreshIcon","CircleIcon","CircleSlashIcon","LockIcon","RoundedRectangleIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextStyleBoldIcon","TextStyleItalicIcon","TextStyleStrikeIcon","TextStyleUnderlineIcon","TrashIcon","TriangleIcon","List","ListItem","Menu","Select","SelectTrigger","Tooltip","colors","ELEMENT_FILL","ELEMENT_STROKE","ELEMENT_TEXT","STICKY_FILL","SELECTION_BLUE","FONT_SIZE_OPTIONS","THICKNESS_OPTIONS","OPACITY_OPTIONS","RADIUS_OPTIONS","ELEMENT_BODIES","COLOR_OPTIONS","Object","values","map","entry","id","color","name","textColor","defaultShapeState","type","fill","fillOpacity","stroke","strokeOpacity","strokeWidth","strokeDash","undefined","borderRadius","fontSize","bold","italic","underline","strikethrough","align","withOpacity","opacityPct","alpha","startsWith","r","parseInt","slice","g","b","replace","shapeBorder","state","lineStyle","stickyGradient","opacity","main","faded","Math","max","GRID_LEVELS","value","label","dotSpacing","snapStep","gridLevel","_GRID_LEVELS$find","find","level","CANVAS_ELEMENTS","kind","initialType","x","y","width","height","INITIAL_SHAPES","reduce","acc","element","INITIAL_POSITIONS","snapValue","step","round","StyledCanvasLayer","div","withConfig","displayName","componentId","StyledCanvasElement","StyledSticky","StyledHandles","RESIZE_DIRECTIONS","ResizeHandles","createElement","onMouseDown","event","stopPropagation","direction","key","className","StyledFormattingToolbar","StyledToolbarButton","button","StyledToolbarLink","withComponent","stopClick","TOOLBAR_SELECT_WIDTH","TOOLBAR_COLOR_TRIGGER_WIDTH","RoundedRectangleOutline","span","SHAPE_TYPE_ICON","rectangle","roundedRectangle","circle","triangle","SHAPE_TYPE_OPTIONS","BORDER_STYLE_OPTIONS","ToolbarActions","_ref","locked","onToggleLock","onDelete","Fragment","title","onClick","ShapeTypeMenu","_ref2","onChange","_useState","open","setOpen","onOpen","onClose","position","target","variant","active","style","padding","tabIndex","option","AlignmentMenu","_ref3","_ALIGN_OPTIONS$find","disabled","_useState2","selected","ALIGN_OPTIONS","icon","TOOLBAR_TRANSPARENT_OPTION","sameHex","a","toLowerCase","ColorDot","_ref4","size","ToolbarColorSwatch","_ref5","_options$find$id","_options$find","includeTransparent","options","disableSearch","forceCloseMenu","keepSameOptionsOrder","next","String","Array","isArray","renderOption","paddingLeft","paddingRight","ToolbarFontSizeSelect","_ref6","Number","ToolbarTextControls","_ref7","styleFlags","onFontSize","onToggleStyle","onAlign","STYLE_OPTIONS","ShapeFormattingToolbar","_ref8","_element$align","onUpdate","PostitFormattingToolbar","_ref9","_extends","renderShapeBody","def","display","overflow","points","strokeDasharray","backgroundColor","border"],"sources":["../../../../src/presentation/whiteboard/elements.tsx"],"sourcesContent":["import React, { ReactElement, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { Dot } from \"../../components/Dot\";\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n ArrowRefreshIcon,\n CircleIcon,\n CircleSlashIcon,\n LockIcon,\n RoundedRectangleIcon,\n TextAlignCenterIcon,\n TextAlignJustifyIcon,\n TextAlignLeftIcon,\n TextAlignRightIcon,\n TextStyleBoldIcon,\n TextStyleItalicIcon,\n TextStyleStrikeIcon,\n TextStyleUnderlineIcon,\n TrashIcon,\n TriangleIcon,\n} from \"../../components/Icons\";\nimport { List, ListItem } from \"../../components/List\";\nimport { Menu } from \"../../components/Menu\";\nimport { Select } from \"../../components/Select\";\nimport { SelectTrigger } from \"../../components/SelectTrigger\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { colors } from \"../../utils/colors\";\n\n/* ------------------------------------------------------------------ */\n/* Canvas elements (1:1 with new-activecollab-front */\n/* src/components/Whiteboards/ — constants.js, ShapeElement.jsx, */\n/* PostitElement.jsx, ResizableWrapper.jsx, ResizeHandles.jsx, */\n/* FormattingToolbarContainer.jsx + the two formatting toolbars) */\n/* ------------------------------------------------------------------ */\n\n/* element colors are canvas DATA (app constants), not theme — hardcoded */\nexport const ELEMENT_FILL = \"#ffffff\";\nexport const ELEMENT_STROKE = \"#374151\";\nexport const ELEMENT_TEXT = \"#1f2937\";\nexport const STICKY_FILL = \"#fbbf24\";\nexport const SELECTION_BLUE = \"#3b82f6\";\n\n/* Discrete option sets for the right Inspector — mirror the app's fixed\n font-size ladder and the border-thickness steps offered in the toolbar. */\nexport const FONT_SIZE_OPTIONS = [\n 10, 13, 16, 20, 24, 30, 36, 48, 72, 96, 144, 216, 288,\n];\nexport const THICKNESS_OPTIONS = [1, 2, 3, 4, 5];\n\nexport const OPACITY_OPTIONS = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100];\n\n/* Corner radii scaled to the board: shapes are drawn at ~100–300px, so the jump\n from a crisp corner to a pill reads across 0–64px. */\nexport const RADIUS_OPTIONS = [0, 4, 8, 12, 16, 24, 32, 48, 64];\n\n/* Element bodies are HTML, as the API returns them (the `body` field). The\n Inspector renders them read-only; when a body is empty the field is omitted.\n Mock the three cases across the canvas: a short body (shape-rounded, the\n default selection), a long one that scrolls (shape-circle), and none at all\n (shape-triangle / sticky). */\nexport const ELEMENT_BODIES: Record<string, string> = {\n \"shape-rounded\": \"<p>Marks the <strong>Kickoff</strong> phase.</p>\",\n \"shape-circle\":\n \"<p>The <strong>discovery</strong> loop for this initiative.</p><p>We collect signals from support, sales and analytics, then cluster them into themes before committing to a direction.</p><ul><li>Owner: research</li><li>Inputs: interviews, tickets, funnel data</li><li>Output: a prioritised opportunity list</li></ul><p>See the <em>retro notes</em> and last quarter's readout for the full context and prior decisions.</p>\",\n};\n\n/* Named-colour options for the Inspector fill/stroke pickers, built from the\n design system's shared data colours (utils/colors). Shaped for the DS Select\n (id + name + color + textColor) so it renders the standard dot-and-radio menu\n used by the label dialogs. */\nexport const COLOR_OPTIONS = Object.values(colors).map((entry) => ({\n id: entry.color,\n name: entry.name,\n color: entry.color,\n textColor: entry.color,\n}));\n\nexport type ShapeType =\n | \"rectangle\"\n | \"roundedRectangle\"\n | \"circle\"\n | \"triangle\";\n\nexport type TextAlign = \"left\" | \"center\" | \"right\" | \"justify\";\n\n/* per-shape editable state (the app bakes opacity into rgba via\n hexToRgba/parseOpacity; the mock keeps opacity separate and rebuilds\n the color when rendering) */\nexport interface ShapeElementState {\n type: ShapeType;\n fill: string;\n fillOpacity: number;\n stroke: string;\n strokeOpacity: number;\n strokeWidth: number;\n strokeDash?: \"5,5\" | \"2,2\";\n borderRadius: number;\n fontSize: number;\n bold: boolean;\n italic: boolean;\n underline: boolean;\n strikethrough: boolean;\n textColor: string;\n /* Text alignment — surfaced in the Inspector's Text group (the floating\n toolbar does not expose it, so it defaults to left). */\n align?: TextAlign;\n}\n\nexport const defaultShapeState = (type: ShapeType): ShapeElementState => ({\n type,\n fill: ELEMENT_FILL,\n fillOpacity: 100,\n stroke: ELEMENT_STROKE,\n strokeOpacity: 100,\n strokeWidth: 2,\n strokeDash: undefined,\n borderRadius: type === \"roundedRectangle\" ? 12 : 0,\n fontSize: 16,\n bold: false,\n italic: false,\n underline: false,\n strikethrough: false,\n textColor: ELEMENT_TEXT,\n align: \"left\",\n});\n\n/* swatches are 6-digit hex, the color wheel returns hsl(...) */\nexport const withOpacity = (color: string, opacityPct: number): string => {\n if (opacityPct >= 100) {\n return color;\n }\n\n const alpha = opacityPct / 100;\n\n if (color.startsWith(\"#\")) {\n const r = parseInt(color.slice(1, 3), 16);\n const g = parseInt(color.slice(3, 5), 16);\n const b = parseInt(color.slice(5, 7), 16);\n\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n }\n\n if (color.startsWith(\"hsl(\")) {\n return color.replace(\"hsl(\", \"hsla(\").replace(\")\", `, ${alpha})`);\n }\n\n return color;\n};\n\n/* getShapeBorder from ShapeElement.jsx */\nexport const shapeBorder = (state: ShapeElementState): string => {\n if (state.strokeWidth === 0) {\n return \"none\";\n }\n\n const lineStyle =\n state.strokeDash === \"5,5\"\n ? \"dashed\"\n : state.strokeDash === \"2,2\"\n ? \"dotted\"\n : \"solid\";\n\n return `${state.strokeWidth}px ${lineStyle} ${withOpacity(\n state.stroke,\n state.strokeOpacity\n )}`;\n};\n\n/* PostitElement gradient: color → same color at ~87% alpha */\nexport const stickyGradient = (color: string, opacity = 100): string => {\n const main = withOpacity(color, opacity);\n const faded = withOpacity(color, Math.max(0, opacity - 13));\n\n return `linear-gradient(135deg, ${main} 0%, ${faded} 100%)`;\n};\n\nexport type GridSize = \"off\" | \"small\" | \"large\";\n\n/* Grid config, aligned to the 8px design-system grid. dotSpacing drives the\n dot layer; snapStep drives snapping — decoupled, so each level snaps finer\n than its dots (Small: 16px dots / 8px snap; Large: 32px dots / 16px snap,\n i.e. dots and half-dots). */\nexport const GRID_LEVELS: {\n value: GridSize;\n label: string;\n dotSpacing: number | null;\n snapStep: number | null;\n}[] = [\n { value: \"off\", label: \"Off\", dotSpacing: null, snapStep: null },\n { value: \"small\", label: \"Small\", dotSpacing: 16, snapStep: 8 },\n { value: \"large\", label: \"Large\", dotSpacing: 32, snapStep: 16 },\n];\n\nexport const gridLevel = (value: GridSize): (typeof GRID_LEVELS)[number] =>\n GRID_LEVELS.find((level) => level.value === value) ?? GRID_LEVELS[0];\n\nexport interface CanvasElementDef {\n id: string;\n kind: \"shape\" | \"sticky\";\n initialType?: ShapeType;\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\n/* default sizes from DEFAULT_SHAPE_SIZES / DEFAULT_STICKY_SIZE; positions are\n board-space pixels (top-left) so dragging can snap to the pixel grid */\nexport const CANVAS_ELEMENTS: CanvasElementDef[] = [\n {\n id: \"shape-circle\",\n kind: \"shape\",\n initialType: \"circle\",\n x: 320,\n y: 180,\n width: 80,\n height: 80,\n },\n {\n id: \"shape-rounded\",\n kind: \"shape\",\n initialType: \"roundedRectangle\",\n x: 560,\n y: 300,\n width: 100,\n height: 60,\n },\n {\n id: \"shape-triangle\",\n kind: \"shape\",\n initialType: \"triangle\",\n x: 820,\n y: 170,\n width: 80,\n height: 80,\n },\n {\n id: \"sticky\",\n kind: \"sticky\",\n x: 430,\n y: 430,\n width: 120,\n height: 120,\n },\n];\n\nexport const INITIAL_SHAPES = CANVAS_ELEMENTS.reduce<\n Record<string, ShapeElementState>\n>((acc, element) => {\n if (element.kind === \"shape\" && element.initialType) {\n acc[element.id] = defaultShapeState(element.initialType);\n }\n\n return acc;\n}, {});\n\nexport const INITIAL_POSITIONS = CANVAS_ELEMENTS.reduce<\n Record<string, { x: number; y: number }>\n>((acc, element) => {\n acc[element.id] = { x: element.x, y: element.y };\n\n return acc;\n}, {});\n\nexport const snapValue = (value: number, step: number | null): number =>\n step ? Math.round(value / step) * step : value;\n\n/* deselect happens on canvas-background click (layer under the bars) */\nexport const StyledCanvasLayer = styled.div`\n position: absolute;\n inset: 0;\n\n /* the Link tool is armed: the next drag draws a card box */\n &.drawing {\n cursor: crosshair;\n }\n`;\n\n/* ResizableWrapper: selected = 2px blue-500 ring @50%, hover = 4px\n blue-400 ring @70% (Tailwind rings are box-shadows) */\nexport const StyledCanvasElement = styled.div`\n position: absolute;\n cursor: move;\n\n &:hover:not(.selected) {\n box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.7);\n }\n\n &.selected {\n box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);\n }\n\n /* A StackedCard draws its own ring (from --sc-selection-ring, set on the\n canvas to the board blue), so the wrapper's ring would double it. The card\n is also auto-height: the wrapper sets width only and lets the box grow. */\n &.is-card {\n cursor: grab;\n height: auto;\n\n &:hover:not(.selected),\n &.selected {\n box-shadow: none;\n }\n }\n\n /* fill/border/radius come from the element's editable state (inline) */\n .shape-fill {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\n/* PostitElement: 12px padding, shadow-lg, 1deg tilt that straightens on\n hover, diagonal gradient to ~87% alpha, Comic Sans */\nexport const StyledSticky = styled.div`\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n padding: 12px;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),\n 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n transform: rotate(1deg);\n transition: transform 200ms;\n font-family: \"Comic Sans MS\", cursive, system-ui, sans-serif;\n line-height: 1.4;\n word-break: break-word;\n white-space: pre-wrap;\n\n ${StyledCanvasElement}:hover & {\n transform: rotate(0deg);\n }\n`;\n\n/* ResizeHandles: 8 12px blue squares w/ 2px white border on the box,\n plus the 24px rotate handle outside the bottom-left corner */\nexport const StyledHandles = styled.div`\n .rh {\n position: absolute;\n width: 12px;\n height: 12px;\n box-sizing: border-box;\n background-color: ${SELECTION_BLUE};\n border: 2px solid #ffffff;\n border-radius: 2px;\n z-index: 10;\n\n &:hover {\n background-color: #2563eb;\n }\n }\n\n .rh-nw {\n top: -6px;\n left: -6px;\n cursor: nw-resize;\n }\n .rh-n {\n top: -6px;\n left: 50%;\n margin-left: -6px;\n cursor: n-resize;\n }\n .rh-ne {\n top: -6px;\n right: -6px;\n cursor: ne-resize;\n }\n .rh-w {\n top: 50%;\n left: -6px;\n margin-top: -6px;\n cursor: w-resize;\n }\n .rh-e {\n top: 50%;\n right: -6px;\n margin-top: -6px;\n cursor: e-resize;\n }\n .rh-sw {\n bottom: -6px;\n left: -6px;\n cursor: sw-resize;\n }\n .rh-s {\n bottom: -6px;\n left: 50%;\n margin-left: -6px;\n cursor: s-resize;\n }\n .rh-se {\n bottom: -6px;\n right: -6px;\n cursor: se-resize;\n }\n\n .rotate-handle {\n position: absolute;\n bottom: -35px;\n left: -35px;\n width: 24px;\n height: 24px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #ffffff;\n border: 2px solid ${SELECTION_BLUE};\n border-radius: 50%;\n cursor: grab;\n z-index: 11;\n\n svg {\n width: 16px;\n height: 16px;\n }\n }\n`;\n\nexport const RESIZE_DIRECTIONS = [\"nw\", \"n\", \"ne\", \"w\", \"e\", \"sw\", \"s\", \"se\"];\n\nexport const ResizeHandles = (): ReactElement => (\n <StyledHandles onMouseDown={(event) => event.stopPropagation()}>\n {RESIZE_DIRECTIONS.map((direction) => (\n <span key={direction} className={`rh rh-${direction}`} />\n ))}\n <span className=\"rotate-handle\">\n <ArrowRefreshIcon fill={SELECTION_BLUE} />\n </span>\n </StyledHandles>\n);\n\n/* FormattingToolbarContainer: Paper paper-2 (bg + 8px radius + shadow,\n no border), 8px padding, 4px gap, centered 10px above the element */\nexport const StyledFormattingToolbar = styled.div`\n position: absolute;\n bottom: calc(100% + 10px);\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 8px;\n border-radius: 8px;\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-tertiary);\n white-space: nowrap;\n cursor: auto;\n z-index: 20;\n\n .tb-group {\n position: relative;\n display: flex;\n align-items: center;\n gap: 4px;\n padding-right: 8px;\n margin-right: 8px;\n border-right: 1px solid var(--border-primary);\n }\n\n /* submenu/popover anchor around a single trigger */\n .tb-rel {\n position: relative;\n display: inline-flex;\n }\n\n .tb-color-value {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n }\n\n .divider {\n width: 1px;\n height: 20px;\n background-color: var(--border-primary);\n margin: 0 4px;\n flex-shrink: 0;\n }\n`;\n\n/* The app's toolbar buttons are DS `Button` / `IconButton` variant=\"option\",\n size small, h-8 px-2: grey text (theme-700) that darkens on hover over a\n theme-300 wash, and the primary colour only for a PRESSED state (an armed\n lock, an active text style). Same palette here, so the story's bars read as\n the app's and not as a row of links. */\nexport const StyledToolbarButton = styled.button`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n height: 32px;\n box-sizing: border-box;\n padding: 0 8px;\n border: 0;\n border-radius: var(--ac-br-6);\n background-color: transparent;\n color: var(--color-theme-700);\n font-family: -apple-system, BlinkMacSystemFont, \"Roboto\", \"Helvetica Neue\",\n Arial, sans-serif;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n\n &:hover,\n &:focus-visible {\n background-color: var(--color-theme-300);\n color: var(--color-theme-900);\n }\n\n &.active,\n &.active:hover {\n color: var(--color-primary);\n }\n\n &.icon-only {\n width: 32px;\n padding: 0;\n }\n\n &:disabled {\n opacity: 0.45;\n cursor: default;\n\n &:hover {\n background-color: transparent;\n }\n }\n\n svg {\n fill: currentColor;\n flex-shrink: 0;\n }\n\n svg.i16 {\n width: 16px;\n height: 16px;\n }\n\n svg.i12 {\n width: 12px;\n height: 12px;\n }\n`;\n\n/* Same chrome as a toolbar button, but an <a> — used where the action is a real\n navigation (Visit). `withComponent` keeps the styles and swaps the element, so\n the props type becomes the anchor's. */\nexport const StyledToolbarLink = styled(StyledToolbarButton.withComponent(\"a\"))`\n text-decoration: none;\n`;\n\nexport const stopClick = (event: React.MouseEvent): void =>\n event.stopPropagation();\n\n/* The trigger widths the app gives its toolbar selects: `tw-w-20` for the font\n size (\"16 pt\"), `tw-w-16 tw-px-2` for the swatch-only colour trigger. */\nconst TOOLBAR_SELECT_WIDTH = 80;\nconst TOOLBAR_COLOR_TRIGGER_WIDTH = 64;\n\n/* Hollow rounded rectangle, the app's own glyph for the \"Rounded Rectangle\"\n shape option (its ShapeTypeMenu draws a bordered span, because the icon set\n has one rectangle glyph and it is already taken by \"Rectangle\"). */\nconst RoundedRectangleOutline = styled.span`\n display: block;\n width: 16px;\n height: 16px;\n box-sizing: border-box;\n border: 1px solid currentColor;\n border-radius: 4px;\n`;\n\nexport const SHAPE_TYPE_ICON: Record<ShapeType, ReactElement> = {\n rectangle: <RoundedRectangleIcon className=\"i16\" />,\n roundedRectangle: <RoundedRectangleOutline aria-hidden=\"true\" />,\n circle: <CircleIcon className=\"i16\" />,\n triangle: <TriangleIcon className=\"i16\" />,\n};\n\n/* The four shape types, in the order the shape-type menu lists them. */\nexport const SHAPE_TYPE_OPTIONS: { type: ShapeType; label: string }[] = [\n { type: \"rectangle\", label: \"Rectangle\" },\n { type: \"roundedRectangle\", label: \"Rounded Rectangle\" },\n { type: \"circle\", label: \"Circle\" },\n { type: \"triangle\", label: \"Triangle\" },\n];\n\n/* Stroke pattern options — now only the Inspector's Stroke group renders these\n (the shape floating toolbar no longer edits stroke). Mirrors the app's\n STROKE_PATTERN_OPTIONS dash enum: solid | dashed | dotted. */\nexport const BORDER_STYLE_OPTIONS: {\n value?: ShapeElementState[\"strokeDash\"];\n label: string;\n}[] = [\n { value: undefined, label: \"Solid\" },\n { value: \"5,5\", label: \"Dashed\" },\n { value: \"2,2\", label: \"Dotted\" },\n];\n\n/* ── Shared floating-toolbar controls ───────────────────────────────────────\n The floating toolbars were flattened this session to match the app: compact,\n collapsed controls (single-button dropdowns) with uniform 4px spacing and a\n single hairline separator only before Lock / Delete. These mirror the shared\n controls in the app's Inspector/Controls (ShapeTypeMenu, AlignmentMenu,\n ColorPicker compact, ToolbarActions). */\n\n/* ToolbarActions — the trailing block shared by EVERY floating toolbar:\n separator → Lock → Delete, in the standard control colour (not red). Mirrors\n app `toolbar/ToolbarActions.jsx`. */\nexport interface ToolbarActionsProps {\n locked: boolean;\n onToggleLock: () => void;\n onDelete: () => void;\n}\n\nexport const ToolbarActions = ({\n locked,\n onToggleLock,\n onDelete,\n}: ToolbarActionsProps): ReactElement => (\n <>\n <span className=\"divider\" />\n <Tooltip title={locked ? \"Unlock\" : \"Lock\"}>\n <StyledToolbarButton\n className={locked ? \"icon-only active\" : \"icon-only\"}\n aria-pressed={locked}\n onClick={onToggleLock}\n >\n <LockIcon className=\"i16\" />\n </StyledToolbarButton>\n </Tooltip>\n <Tooltip title=\"Delete\">\n <StyledToolbarButton className=\"icon-only\" onClick={onDelete}>\n <TrashIcon className=\"i16\" />\n </StyledToolbarButton>\n </Tooltip>\n </>\n);\n\n/* ShapeTypeMenu — collapsed shape-type picker: one icon button showing the\n current shape, opening a dropdown of the four types. Modeled on the app's\n ShapeTypeMenu (DS Menu + List). */\nexport interface ToolbarShapeTypeMenuProps {\n value: ShapeType;\n onChange: (type: ShapeType) => void;\n}\n\nexport const ShapeTypeMenu = ({\n value,\n onChange,\n}: ToolbarShapeTypeMenuProps): ReactElement => {\n const [open, setOpen] = useState(false);\n\n return (\n <Menu\n open={open}\n onOpen={() => setOpen(true)}\n onClose={() => setOpen(false)}\n position=\"bottom-start\"\n target={\n <IconButton\n type=\"button\"\n variant=\"option\"\n active={open}\n aria-label=\"Shape\"\n >\n {SHAPE_TYPE_ICON[value]}\n </IconButton>\n }\n >\n <List style={{ padding: \"8px 0\" }} tabIndex={-1}>\n {SHAPE_TYPE_OPTIONS.map((option) => (\n <ListItem\n key={option.type}\n aria-label={option.label}\n onClick={() => {\n onChange(option.type);\n setOpen(false);\n }}\n >\n {SHAPE_TYPE_ICON[option.type]}\n {option.label}\n </ListItem>\n ))}\n </List>\n </Menu>\n );\n};\n\n/* AlignmentMenu — collapsed alignment picker (single button + dropdown), the\n compact-toolbar counterpart to the Inspector's expanded four-button row.\n Mirrors the app's AlignmentMenu. */\nexport interface ToolbarAlignmentMenuProps {\n value: TextAlign;\n onChange: (align: TextAlign) => void;\n disabled?: boolean;\n}\n\nexport const AlignmentMenu = ({\n value,\n onChange,\n disabled,\n}: ToolbarAlignmentMenuProps): ReactElement => {\n const [open, setOpen] = useState(false);\n const selected =\n ALIGN_OPTIONS.find((option) => option.value === value) ?? ALIGN_OPTIONS[0];\n\n return (\n <Menu\n open={open}\n onOpen={() => setOpen(true)}\n onClose={() => setOpen(false)}\n position=\"bottom-start\"\n target={\n <IconButton\n type=\"button\"\n variant=\"option\"\n active={open}\n disabled={disabled}\n aria-label=\"Alignment\"\n >\n {selected.icon}\n </IconButton>\n }\n >\n <List style={{ padding: \"8px 0\" }} tabIndex={-1}>\n {ALIGN_OPTIONS.map((option) => (\n <ListItem\n key={option.value}\n aria-label={option.label}\n onClick={() => {\n onChange(option.value);\n setOpen(false);\n }}\n >\n {option.icon}\n {option.label}\n </ListItem>\n ))}\n </List>\n </Menu>\n );\n};\n\n/* The app's compact `ColorPicker`: a DS `Select` whose trigger is the swatch\n alone (a Dot, or the CircleSlash chip when transparent) and whose menu is the\n standard dot-and-name list — the same control the Inspector's colour field\n uses, minus the name on the trigger. `includeTransparent` adds \"Transparent\"\n first: shape fill opts in, sticky fill and text colour do not. */\nexport interface ToolbarColorSwatchProps {\n value: string;\n includeTransparent?: boolean;\n label: string;\n onChange: (color: string) => void;\n}\n\nconst TOOLBAR_TRANSPARENT_OPTION = {\n id: \"transparent\",\n name: \"Transparent\",\n color: \"transparent\",\n textColor: \"transparent\",\n};\n\nconst sameHex = (a: string, b: string): boolean =>\n a.toLowerCase() === b.toLowerCase();\n\nconst ColorDot = ({ color }: { color: string }): ReactElement =>\n sameHex(color, \"transparent\") ? (\n <CircleSlashIcon width={16} height={16} fill=\"currentColor\" />\n ) : (\n <Dot color={color} size={16} />\n );\n\nexport const ToolbarColorSwatch = ({\n value,\n includeTransparent,\n label,\n onChange,\n}: ToolbarColorSwatchProps): ReactElement => {\n const options = includeTransparent\n ? [TOOLBAR_TRANSPARENT_OPTION, ...COLOR_OPTIONS]\n : COLOR_OPTIONS;\n const selected =\n options.find((option) => sameHex(option.id, value))?.id ?? value;\n\n return (\n <Tooltip title={label}>\n <span className=\"tb-rel\">\n <Select\n type=\"single\"\n disableSearch\n forceCloseMenu\n keepSameOptionsOrder\n options={options}\n selected={selected}\n onChange={(next) =>\n onChange(String(Array.isArray(next) ? next[0] : next))\n }\n renderOption={(option) => (\n <span className=\"tb-color-option\">\n <ColorDot color={String(option.id)} />\n {option.name}\n </span>\n )}\n target={\n <SelectTrigger\n aria-label={label}\n style={{\n width: TOOLBAR_COLOR_TRIGGER_WIDTH,\n paddingLeft: 8,\n paddingRight: 8,\n }}\n >\n <span className=\"tb-color-value\">\n <ColorDot color={value} />\n </span>\n </SelectTrigger>\n }\n />\n </span>\n </Tooltip>\n );\n};\n\n/* The app's `ValuePicker` for the font size: a DS `Select` over the fixed size\n ladder, its trigger reading \"16 pt\". */\nexport interface ToolbarFontSizeSelectProps {\n value: number;\n onChange: (size: number) => void;\n}\n\nexport const ToolbarFontSizeSelect = ({\n value,\n onChange,\n}: ToolbarFontSizeSelectProps): ReactElement => (\n <Tooltip title=\"Font Size\">\n <span className=\"tb-rel\">\n <Select\n type=\"single\"\n disableSearch\n forceCloseMenu\n keepSameOptionsOrder\n options={FONT_SIZE_OPTIONS.map((size) => ({\n id: size,\n name: `${size} pt`,\n }))}\n selected={value}\n onChange={(next) =>\n onChange(Number(Array.isArray(next) ? next[0] : next))\n }\n target={\n <SelectTrigger\n aria-label=\"Font Size\"\n style={{ width: TOOLBAR_SELECT_WIDTH }}\n >\n {value} pt\n </SelectTrigger>\n }\n />\n </span>\n </Tooltip>\n);\n\n/* The text controls shared by the shape and sticky toolbars: font-size select,\n B / I / U / S, and the collapsed alignment menu. Same set the app's sticky\n and shape toolbars share (font-size picker, TextStyleButtons, AlignmentMenu).\n Kept generic so both element shapes can drive it. */\nexport interface ToolbarTextControlsProps {\n fontSize: number;\n styleFlags: {\n bold: boolean;\n italic: boolean;\n underline: boolean;\n strikethrough: boolean;\n };\n align: TextAlign;\n onFontSize: (size: number) => void;\n onToggleStyle: (key: TextStyleKey) => void;\n onAlign: (align: TextAlign) => void;\n}\n\nexport const ToolbarTextControls = ({\n fontSize,\n styleFlags,\n align,\n onFontSize,\n onToggleStyle,\n onAlign,\n}: ToolbarTextControlsProps): ReactElement => (\n <>\n <ToolbarFontSizeSelect value={fontSize} onChange={onFontSize} />\n {STYLE_OPTIONS.map((option) => (\n <Tooltip key={option.key} title={option.label}>\n <StyledToolbarButton\n className={styleFlags[option.key] ? \"icon-only active\" : \"icon-only\"}\n aria-label={option.label}\n aria-pressed={styleFlags[option.key]}\n onClick={() => onToggleStyle(option.key)}\n >\n {option.icon}\n </StyledToolbarButton>\n </Tooltip>\n ))}\n <AlignmentMenu value={align} onChange={onAlign} />\n </>\n);\n\nexport interface ShapeFormattingToolbarProps {\n element: ShapeElementState;\n onUpdate: (partial: Partial<ShapeElementState>) => void;\n onDelete: () => void;\n locked: boolean;\n onToggleLock: () => void;\n}\n\n/* ShapeFormattingToolbar — flat layout (was submenu-based): shape-type menu →\n fill colour → the same text controls as the sticky toolbar → Lock / Delete.\n Stroke is no longer edited here — it lives only in the Inspector's Stroke\n group now. Mirrors the app's ShapeFormattingToolbar. */\nexport const ShapeFormattingToolbar = ({\n element,\n onUpdate,\n onDelete,\n locked,\n onToggleLock,\n}: ShapeFormattingToolbarProps): ReactElement => (\n <StyledFormattingToolbar onClick={stopClick} onMouseDown={stopClick}>\n <ShapeTypeMenu\n value={element.type}\n onChange={(type) => onUpdate({ type })}\n />\n <ToolbarColorSwatch\n value={element.fill}\n includeTransparent\n label=\"Fill color\"\n onChange={(fill) => onUpdate({ fill })}\n />\n <ToolbarTextControls\n fontSize={element.fontSize}\n styleFlags={element}\n align={element.align ?? \"left\"}\n onFontSize={(fontSize) => onUpdate({ fontSize })}\n onToggleStyle={(key) => onUpdate({ [key]: !element[key] })}\n onAlign={(align) => onUpdate({ align })}\n />\n <ToolbarActions\n locked={locked}\n onToggleLock={onToggleLock}\n onDelete={onDelete}\n />\n </StyledFormattingToolbar>\n);\n\nexport interface StickyTextStyle {\n fontSize: number;\n bold: boolean;\n italic: boolean;\n strikethrough: boolean;\n underline: boolean;\n align: TextAlign;\n textColor: string;\n color: string;\n fillOpacity: number;\n}\n\nexport interface PostitFormattingToolbarProps {\n value: StickyTextStyle;\n onChange: (next: StickyTextStyle) => void;\n onDelete: () => void;\n locked: boolean;\n onToggleLock: () => void;\n}\n\n/* PostitFormattingToolbar — flat layout: note (fill) colour → the shared text\n controls (font-size, B/I/U/S, alignment menu) → Lock / Delete. The note's\n colour is its whole point, so its fill swatch does NOT offer Transparent.\n Mirrors the app's PostitFormattingToolbar. */\nexport const PostitFormattingToolbar = ({\n value,\n onChange,\n onDelete,\n locked,\n onToggleLock,\n}: PostitFormattingToolbarProps): ReactElement => (\n <StyledFormattingToolbar onClick={stopClick} onMouseDown={stopClick}>\n <ToolbarColorSwatch\n value={value.color}\n label=\"Note color\"\n onChange={(color) => onChange({ ...value, color })}\n />\n <ToolbarTextControls\n fontSize={value.fontSize}\n styleFlags={value}\n align={value.align}\n onFontSize={(fontSize) => onChange({ ...value, fontSize })}\n onToggleStyle={(key) => onChange({ ...value, [key]: !value[key] })}\n onAlign={(align) => onChange({ ...value, align })}\n />\n <ToolbarActions\n locked={locked}\n onToggleLock={onToggleLock}\n onDelete={onDelete}\n />\n </StyledFormattingToolbar>\n);\n\n/* shape body per current (editable) type */\nexport const renderShapeBody = (\n def: CanvasElementDef,\n state: ShapeElementState,\n /* Effective size — the Inspector can override the element's default width /\n height, so the triangle polygon is drawn from the live size, not the def. */\n width: number = def.width,\n height: number = def.height\n): ReactElement =>\n state.type === \"triangle\" ? (\n /* TriangleElement: SVG polygon, apex top-center */\n <svg\n width=\"100%\"\n height=\"100%\"\n style={{ display: \"block\", overflow: \"visible\" }}\n >\n <polygon\n points={`${width / 2},0 ${width},${height} 0,${height}`}\n fill={withOpacity(state.fill, state.fillOpacity)}\n stroke={withOpacity(state.stroke, state.strokeOpacity)}\n strokeWidth={state.strokeWidth}\n strokeDasharray={state.strokeDash}\n />\n </svg>\n ) : (\n <div\n className=\"shape-fill\"\n style={{\n backgroundColor: withOpacity(state.fill, state.fillOpacity),\n border: shapeBorder(state),\n borderRadius: state.type === \"circle\" ? \"50%\" : state.borderRadius,\n }}\n />\n );\n\nexport const ALIGN_OPTIONS: {\n value: TextAlign;\n label: string;\n icon: ReactElement;\n}[] = [\n { value: \"left\", label: \"Align Left\", icon: <TextAlignLeftIcon /> },\n { value: \"center\", label: \"Align Center\", icon: <TextAlignCenterIcon /> },\n { value: \"right\", label: \"Align Right\", icon: <TextAlignRightIcon /> },\n { value: \"justify\", label: \"Justify\", icon: <TextAlignJustifyIcon /> },\n];\n\nexport type TextStyleKey = \"bold\" | \"italic\" | \"underline\" | \"strikethrough\";\n\nexport const STYLE_OPTIONS: {\n key: TextStyleKey;\n label: string;\n icon: ReactElement;\n}[] = [\n { key: \"bold\", label: \"Bold\", icon: <TextStyleBoldIcon /> },\n { key: \"italic\", label: \"Italic\", icon: <TextStyleItalicIcon /> },\n { key: \"underline\", label: \"Underline\", icon: <TextStyleUnderlineIcon /> },\n {\n key: \"strikethrough\",\n label: \"Strikethrough\",\n icon: <TextStyleStrikeIcon />,\n },\n];\n"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,QAAQ,QAAQ,OAAO;AAErD,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,GAAG,QAAQ,sBAAsB;AAC1C,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SACEC,gBAAgB,EAChBC,UAAU,EACVC,eAAe,EACfC,QAAQ,EACRC,oBAAoB,EACpBC,mBAAmB,EACnBC,oBAAoB,EACpBC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,mBAAmB,EACnBC,mBAAmB,EACnBC,sBAAsB,EACtBC,SAAS,EACTC,YAAY,QACP,wBAAwB;AAC/B,SAASC,IAAI,EAAEC,QAAQ,QAAQ,uBAAuB;AACtD,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,aAAa,QAAQ,gCAAgC;AAC9D,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,MAAM,QAAQ,oBAAoB;;AAE3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,MAAMC,YAAY,GAAG,SAAS;AACrC,OAAO,MAAMC,cAAc,GAAG,SAAS;AACvC,OAAO,MAAMC,YAAY,GAAG,SAAS;AACrC,OAAO,MAAMC,WAAW,GAAG,SAAS;AACpC,OAAO,MAAMC,cAAc,GAAG,SAAS;;AAEvC;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAG,CAC/B,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAA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orSwatch","DEFAULT_COLOR","DEFAULT_STICKY_KEY","boardColorOptions","resolveBoardColor","IconButton","ArrowRefreshIcon","CircleIcon","LockIcon","RoundedRectangleIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextStyleBoldIcon","TextStyleItalicIcon","TextStyleStrikeIcon","TextStyleUnderlineIcon","TrashIcon","TriangleIcon","List","ListItem","Menu","Select","SelectTrigger","Tooltip","ELEMENT_FILL","ELEMENT_STROKE","ELEMENT_TEXT","STICKY_FILL","SELECTION_BLUE","SELECTION_WASH","FONT_SIZE_OPTIONS","THICKNESS_OPTIONS","OPACITY_OPTIONS","RADIUS_OPTIONS","ELEMENT_BODIES","defaultShapeState","type","fill","fillOpacity","stroke","strokeOpacity","strokeWidth","strokeDash","undefined","borderRadius","fontSize","bold","italic","underline","strikethrough","textColor","align","withOpacity","color","opacityPct","alpha","startsWith","r","parseInt","slice","g","b","replace","shapeBorder","state","lineStyle","stickyGradient","opacity","resolved","main","faded","Math","max","GRID_LEVELS","value","label","dotSpacing","snapStep","gridLevel","_GRID_LEVELS$find","find","level","CANVAS_ELEMENTS","id","kind","initialType","x","y","width","height","LEGACY_SHAPE_STYLES","INITIAL_SHAPES","reduce","acc","element","_extends","INITIAL_POSITIONS","snapValue","step","round","StyledCanvasLayer","div","withConfig","displayName","componentId","StyledCanvasElement","StyledSticky","StyledHandles","RESIZE_DIRECTIONS","ResizeHandles","createElement","onMouseDown","event","stopPropagation","map","direction","key","className","style","StyledFormattingToolbar","StyledToolbarButton","button","StyledToolbarLink","withComponent","stopClick","TOOLBAR_SELECT_WIDTH","TOOLBAR_COLOR_TRIGGER_WIDTH","RoundedRectangleOutline","span","SHAPE_TYPE_ICON","rectangle","roundedRectangle","circle","triangle","SHAPE_TYPE_OPTIONS","BORDER_STYLE_OPTIONS","ToolbarActions","_ref","locked","onToggleLock","onDelete","Fragment","title","onClick","ShapeTypeMenu","_ref2","onChange","_useState","open","setOpen","onOpen","onClose","position","target","variant","active","padding","tabIndex","option","AlignmentMenu","_ref3","_ALIGN_OPTIONS$find","disabled","_useState2","selected","ALIGN_OPTIONS","icon","ToolbarColorSwatch","_ref4","role","includeTransparent","includeDefault","options","disableSearch","forceCloseMenu","keepSameOptionsOrder","next","String","Array","isArray","renderOption","name","paddingLeft","paddingRight","ToolbarFontSizeSelect","_ref5","size","Number","ToolbarTextControls","_ref6","styleFlags","onFontSize","onToggleStyle","onAlign","STYLE_OPTIONS","ShapeFormattingToolbar","_ref7","_element$align","onUpdate","PostitFormattingToolbar","_ref8","renderShapeBody","def","display","overflow","points","strokeDasharray","backgroundColor","border"],"sources":["../../../../src/presentation/whiteboard/elements.tsx"],"sourcesContent":["import React, { ReactElement, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport {\n BoardColorSwatch,\n ColorRole,\n DEFAULT_COLOR,\n DEFAULT_STICKY_KEY,\n boardColorOptions,\n resolveBoardColor,\n} from \"./palette\";\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n ArrowRefreshIcon,\n CircleIcon,\n LockIcon,\n RoundedRectangleIcon,\n TextAlignCenterIcon,\n TextAlignJustifyIcon,\n TextAlignLeftIcon,\n TextAlignRightIcon,\n TextStyleBoldIcon,\n TextStyleItalicIcon,\n TextStyleStrikeIcon,\n TextStyleUnderlineIcon,\n TrashIcon,\n TriangleIcon,\n} from \"../../components/Icons\";\nimport { List, ListItem } from \"../../components/List\";\nimport { Menu } from \"../../components/Menu\";\nimport { Select } from \"../../components/Select\";\nimport { SelectTrigger } from \"../../components/SelectTrigger\";\nimport { Tooltip } from \"../../components/Tooltip\";\n\n/* ------------------------------------------------------------------ */\n/* Canvas elements (1:1 with new-activecollab-front */\n/* src/components/Whiteboards/ — constants.js, ShapeElement.jsx, */\n/* PostitElement.jsx, ResizableWrapper.jsx, ResizeHandles.jsx, */\n/* FormattingToolbarContainer.jsx + the two formatting toolbars) */\n/* ------------------------------------------------------------------ */\n\nexport const ELEMENT_FILL = DEFAULT_COLOR;\nexport const ELEMENT_STROKE = DEFAULT_COLOR;\nexport const ELEMENT_TEXT = DEFAULT_COLOR;\nexport const STICKY_FILL = DEFAULT_STICKY_KEY;\nexport const SELECTION_BLUE = \"var(--selectable-active)\";\nexport const SELECTION_WASH =\n \"color-mix(in srgb, var(--selectable-active) 8%, transparent)\";\n\n/* Discrete option sets for the right Inspector — mirror the app's fixed\n font-size ladder and the border-thickness steps offered in the toolbar. */\nexport const FONT_SIZE_OPTIONS = [\n 10, 13, 16, 20, 24, 30, 36, 48, 72, 96, 144, 216, 288,\n];\nexport const THICKNESS_OPTIONS = [1, 2, 3, 4, 5];\n\nexport const OPACITY_OPTIONS = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100];\n\n/* Corner radii scaled to the board: shapes are drawn at ~100–300px, so the jump\n from a crisp corner to a pill reads across 0–64px. */\nexport const RADIUS_OPTIONS = [0, 4, 8, 12, 16, 24, 32, 48, 64];\n\n/* Element bodies are HTML, as the API returns them (the `body` field). The\n Inspector renders them read-only; when a body is empty the field is omitted.\n Mock the three cases across the canvas: a short body (shape-rounded, the\n default selection), a long one that scrolls (shape-circle), and none at all\n (shape-triangle / sticky). */\nexport const ELEMENT_BODIES: Record<string, string> = {\n \"shape-rounded\": \"<p>Marks the <strong>Kickoff</strong> phase.</p>\",\n \"shape-circle\":\n \"<p>The <strong>discovery</strong> loop for this initiative.</p><p>We collect signals from support, sales and analytics, then cluster them into themes before committing to a direction.</p><ul><li>Owner: research</li><li>Inputs: interviews, tickets, funnel data</li><li>Output: a prioritised opportunity list</li></ul><p>See the <em>retro notes</em> and last quarter's readout for the full context and prior decisions.</p>\",\n};\n\nexport type ShapeType =\n | \"rectangle\"\n | \"roundedRectangle\"\n | \"circle\"\n | \"triangle\";\n\nexport type TextAlign = \"left\" | \"center\" | \"right\" | \"justify\";\n\n/* per-shape editable state (the app bakes opacity into rgba via\n hexToRgba/parseOpacity; the mock keeps opacity separate and rebuilds\n the color when rendering) */\nexport interface ShapeElementState {\n type: ShapeType;\n fill: string;\n fillOpacity: number;\n stroke: string;\n strokeOpacity: number;\n strokeWidth: number;\n strokeDash?: \"5,5\" | \"2,2\";\n borderRadius: number;\n fontSize: number;\n bold: boolean;\n italic: boolean;\n underline: boolean;\n strikethrough: boolean;\n textColor: string;\n /* Text alignment — surfaced in the Inspector's Text group (the floating\n toolbar does not expose it, so it defaults to left). */\n align?: TextAlign;\n}\n\nexport const defaultShapeState = (type: ShapeType): ShapeElementState => ({\n type,\n fill: ELEMENT_FILL,\n fillOpacity: 100,\n stroke: ELEMENT_STROKE,\n strokeOpacity: 100,\n strokeWidth: 2,\n strokeDash: undefined,\n borderRadius: type === \"roundedRectangle\" ? 12 : 0,\n fontSize: 16,\n bold: false,\n italic: false,\n underline: false,\n strikethrough: false,\n textColor: ELEMENT_TEXT,\n align: \"left\",\n});\n\n/* swatches are 6-digit hex, the color wheel returns hsl(...) */\nexport const withOpacity = (color: string, opacityPct: number): string => {\n if (opacityPct >= 100) {\n return color;\n }\n\n const alpha = opacityPct / 100;\n\n if (color.startsWith(\"#\")) {\n const r = parseInt(color.slice(1, 3), 16);\n const g = parseInt(color.slice(3, 5), 16);\n const b = parseInt(color.slice(5, 7), 16);\n\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n }\n\n if (color.startsWith(\"hsl(\")) {\n return color.replace(\"hsl(\", \"hsla(\").replace(\")\", `, ${alpha})`);\n }\n\n if (color === \"transparent\") {\n return color;\n }\n\n return `color-mix(in srgb, ${color} ${opacityPct}%, transparent)`;\n};\n\n/* getShapeBorder from ShapeElement.jsx */\nexport const shapeBorder = (state: ShapeElementState): string => {\n if (state.strokeWidth === 0) {\n return \"none\";\n }\n\n const lineStyle =\n state.strokeDash === \"5,5\"\n ? \"dashed\"\n : state.strokeDash === \"2,2\"\n ? \"dotted\"\n : \"solid\";\n\n return `${state.strokeWidth}px ${lineStyle} ${withOpacity(\n resolveBoardColor(state.stroke, \"stroke\"),\n state.strokeOpacity\n )}`;\n};\n\n/* PostitElement gradient: color → same color at ~87% alpha */\nexport const stickyGradient = (color: string, opacity = 100): string => {\n const resolved = resolveBoardColor(color, \"sticky\");\n const main = withOpacity(resolved, opacity);\n const faded = withOpacity(resolved, Math.max(0, opacity - 13));\n\n return `linear-gradient(135deg, ${main} 0%, ${faded} 100%)`;\n};\n\nexport type GridSize = \"off\" | \"small\" | \"large\";\n\n/* Grid config, aligned to the 8px design-system grid. dotSpacing drives the\n dot layer; snapStep drives snapping — decoupled, so each level snaps finer\n than its dots (Small: 16px dots / 8px snap; Large: 32px dots / 16px snap,\n i.e. dots and half-dots). */\nexport const GRID_LEVELS: {\n value: GridSize;\n label: string;\n dotSpacing: number | null;\n snapStep: number | null;\n}[] = [\n { value: \"off\", label: \"Off\", dotSpacing: null, snapStep: null },\n { value: \"small\", label: \"Small\", dotSpacing: 16, snapStep: 8 },\n { value: \"large\", label: \"Large\", dotSpacing: 32, snapStep: 16 },\n];\n\nexport const gridLevel = (value: GridSize): (typeof GRID_LEVELS)[number] =>\n GRID_LEVELS.find((level) => level.value === value) ?? GRID_LEVELS[0];\n\nexport interface CanvasElementDef {\n id: string;\n kind: \"shape\" | \"sticky\";\n initialType?: ShapeType;\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\n/* default sizes from DEFAULT_SHAPE_SIZES / DEFAULT_STICKY_SIZE; positions are\n board-space pixels (top-left) so dragging can snap to the pixel grid */\nexport const CANVAS_ELEMENTS: CanvasElementDef[] = [\n {\n id: \"shape-circle\",\n kind: \"shape\",\n initialType: \"circle\",\n x: 320,\n y: 180,\n width: 80,\n height: 80,\n },\n {\n id: \"shape-rounded\",\n kind: \"shape\",\n initialType: \"roundedRectangle\",\n x: 560,\n y: 300,\n width: 100,\n height: 60,\n },\n {\n id: \"shape-triangle\",\n kind: \"shape\",\n initialType: \"triangle\",\n x: 820,\n y: 170,\n width: 80,\n height: 80,\n },\n {\n id: \"sticky\",\n kind: \"sticky\",\n x: 430,\n y: 430,\n width: 120,\n height: 120,\n },\n {\n id: \"shape-legacy\",\n kind: \"shape\",\n initialType: \"rectangle\",\n x: 980,\n y: 300,\n width: 100,\n height: 60,\n },\n];\n\n// mirrors: new-activecollab-front Whiteboards/utils/templates.js createStyle(\"#10b981\", \"#059669\")\nexport const LEGACY_SHAPE_STYLES: Record<string, Partial<ShapeElementState>> = {\n \"shape-legacy\": { fill: \"#10b981\", stroke: \"#059669\" },\n};\n\nexport const INITIAL_SHAPES = CANVAS_ELEMENTS.reduce<\n Record<string, ShapeElementState>\n>((acc, element) => {\n if (element.kind === \"shape\" && element.initialType) {\n acc[element.id] = {\n ...defaultShapeState(element.initialType),\n ...LEGACY_SHAPE_STYLES[element.id],\n };\n }\n\n return acc;\n}, {});\n\nexport const INITIAL_POSITIONS = CANVAS_ELEMENTS.reduce<\n Record<string, { x: number; y: number }>\n>((acc, element) => {\n acc[element.id] = { x: element.x, y: element.y };\n\n return acc;\n}, {});\n\nexport const snapValue = (value: number, step: number | null): number =>\n step ? Math.round(value / step) * step : value;\n\n/* deselect happens on canvas-background click (layer under the bars) */\nexport const StyledCanvasLayer = styled.div`\n position: absolute;\n inset: 0;\n\n /* the Link tool is armed: the next drag draws a card box */\n &.drawing {\n cursor: crosshair;\n }\n`;\n\n/* ResizableWrapper: selected = 2px blue-500 ring @50%, hover = 4px\n blue-400 ring @70% (Tailwind rings are box-shadows) */\nexport const StyledCanvasElement = styled.div`\n position: absolute;\n cursor: move;\n\n &:hover:not(.selected) {\n box-shadow: 0 0 0 4px\n color-mix(in srgb, var(--selectable-active) 70%, transparent);\n }\n\n &.selected {\n box-shadow: 0 0 0 2px\n color-mix(in srgb, var(--selectable-active) 50%, transparent);\n }\n\n /* A StackedCard draws its own ring (from --sc-selection-ring, set on the\n canvas to the board blue), so the wrapper's ring would double it. The card\n is also auto-height: the wrapper sets width only and lets the box grow. */\n &.is-card {\n cursor: grab;\n height: auto;\n\n &:hover:not(.selected),\n &.selected {\n box-shadow: none;\n }\n }\n\n /* fill/border/radius come from the element's editable state (inline) */\n .shape-fill {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\n/* PostitElement: 12px padding, shadow-lg, 1deg tilt that straightens on\n hover, diagonal gradient to ~87% alpha, Comic Sans */\nexport const StyledSticky = styled.div`\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n padding: 12px;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),\n 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n transform: rotate(1deg);\n transition: transform 200ms;\n font-family: \"Comic Sans MS\", cursive, system-ui, sans-serif;\n line-height: 1.4;\n word-break: break-word;\n white-space: pre-wrap;\n\n ${StyledCanvasElement}:hover & {\n transform: rotate(0deg);\n }\n`;\n\n/* ResizeHandles: 8 12px blue squares w/ 2px white border on the box,\n plus the 24px rotate handle outside the bottom-left corner */\nexport const StyledHandles = styled.div`\n .rh {\n position: absolute;\n width: 12px;\n height: 12px;\n box-sizing: border-box;\n background-color: ${SELECTION_BLUE};\n border: 2px solid var(--page-paper-main);\n border-radius: 2px;\n z-index: 10;\n\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--selectable-active) 80%,\n var(--only-black)\n );\n }\n }\n\n .rh-nw {\n top: -6px;\n left: -6px;\n cursor: nw-resize;\n }\n .rh-n {\n top: -6px;\n left: 50%;\n margin-left: -6px;\n cursor: n-resize;\n }\n .rh-ne {\n top: -6px;\n right: -6px;\n cursor: ne-resize;\n }\n .rh-w {\n top: 50%;\n left: -6px;\n margin-top: -6px;\n cursor: w-resize;\n }\n .rh-e {\n top: 50%;\n right: -6px;\n margin-top: -6px;\n cursor: e-resize;\n }\n .rh-sw {\n bottom: -6px;\n left: -6px;\n cursor: sw-resize;\n }\n .rh-s {\n bottom: -6px;\n left: 50%;\n margin-left: -6px;\n cursor: s-resize;\n }\n .rh-se {\n bottom: -6px;\n right: -6px;\n cursor: se-resize;\n }\n\n .rotate-handle {\n position: absolute;\n bottom: -35px;\n left: -35px;\n width: 24px;\n height: 24px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--page-paper-main);\n border: 2px solid ${SELECTION_BLUE};\n border-radius: 50%;\n cursor: grab;\n z-index: 11;\n\n svg {\n width: 16px;\n height: 16px;\n }\n }\n`;\n\nexport const RESIZE_DIRECTIONS = [\"nw\", \"n\", \"ne\", \"w\", \"e\", \"sw\", \"s\", \"se\"];\n\nexport const ResizeHandles = (): ReactElement => (\n <StyledHandles onMouseDown={(event) => event.stopPropagation()}>\n {RESIZE_DIRECTIONS.map((direction) => (\n <span key={direction} className={`rh rh-${direction}`} />\n ))}\n <span className=\"rotate-handle\">\n <ArrowRefreshIcon style={{ fill: SELECTION_BLUE }} />\n </span>\n </StyledHandles>\n);\n\n/* FormattingToolbarContainer: Paper paper-2 (bg + 8px radius + shadow,\n no border), 8px padding, 4px gap, centered 10px above the element */\nexport const StyledFormattingToolbar = styled.div`\n position: absolute;\n bottom: calc(100% + 10px);\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 8px;\n border-radius: 8px;\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-tertiary);\n white-space: nowrap;\n cursor: auto;\n z-index: 20;\n\n .tb-group {\n position: relative;\n display: flex;\n align-items: center;\n gap: 4px;\n padding-right: 8px;\n margin-right: 8px;\n border-right: 1px solid var(--border-primary);\n }\n\n /* submenu/popover anchor around a single trigger */\n .tb-rel {\n position: relative;\n display: inline-flex;\n }\n\n .tb-color-value {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n }\n\n .divider {\n width: 1px;\n height: 20px;\n background-color: var(--border-primary);\n margin: 0 4px;\n flex-shrink: 0;\n }\n`;\n\n/* The app's toolbar buttons are DS `Button` / `IconButton` variant=\"option\",\n size small, h-8 px-2: grey text (theme-700) that darkens on hover over a\n theme-300 wash, and the primary colour only for a PRESSED state (an armed\n lock, an active text style). Same palette here, so the story's bars read as\n the app's and not as a row of links. */\nexport const StyledToolbarButton = styled.button`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n height: 32px;\n box-sizing: border-box;\n padding: 0 8px;\n border: 0;\n border-radius: var(--ac-br-6);\n background-color: transparent;\n color: var(--color-theme-700);\n font-family: -apple-system, BlinkMacSystemFont, \"Roboto\", \"Helvetica Neue\",\n Arial, sans-serif;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n\n &:hover,\n &:focus-visible {\n background-color: var(--color-theme-300);\n color: var(--color-theme-900);\n }\n\n &.active,\n &.active:hover {\n color: var(--color-primary);\n }\n\n &.icon-only {\n width: 32px;\n padding: 0;\n }\n\n &:disabled {\n opacity: 0.45;\n cursor: default;\n\n &:hover {\n background-color: transparent;\n }\n }\n\n svg {\n fill: currentColor;\n flex-shrink: 0;\n }\n\n svg.i16 {\n width: 16px;\n height: 16px;\n }\n\n svg.i12 {\n width: 12px;\n height: 12px;\n }\n`;\n\n/* Same chrome as a toolbar button, but an <a> — used where the action is a real\n navigation (Visit). `withComponent` keeps the styles and swaps the element, so\n the props type becomes the anchor's. */\nexport const StyledToolbarLink = styled(StyledToolbarButton.withComponent(\"a\"))`\n text-decoration: none;\n`;\n\nexport const stopClick = (event: React.MouseEvent): void =>\n event.stopPropagation();\n\n/* The trigger widths the app gives its toolbar selects: `tw-w-20` for the font\n size (\"16 pt\"), `tw-w-16 tw-px-2` for the swatch-only colour trigger. */\nconst TOOLBAR_SELECT_WIDTH = 80;\nconst TOOLBAR_COLOR_TRIGGER_WIDTH = 64;\n\n/* Hollow rounded rectangle, the app's own glyph for the \"Rounded Rectangle\"\n shape option (its ShapeTypeMenu draws a bordered span, because the icon set\n has one rectangle glyph and it is already taken by \"Rectangle\"). */\nconst RoundedRectangleOutline = styled.span`\n display: block;\n width: 16px;\n height: 16px;\n box-sizing: border-box;\n border: 1px solid currentColor;\n border-radius: 4px;\n`;\n\nexport const SHAPE_TYPE_ICON: Record<ShapeType, ReactElement> = {\n rectangle: <RoundedRectangleIcon className=\"i16\" />,\n roundedRectangle: <RoundedRectangleOutline aria-hidden=\"true\" />,\n circle: <CircleIcon className=\"i16\" />,\n triangle: <TriangleIcon className=\"i16\" />,\n};\n\n/* The four shape types, in the order the shape-type menu lists them. */\nexport const SHAPE_TYPE_OPTIONS: { type: ShapeType; label: string }[] = [\n { type: \"rectangle\", label: \"Rectangle\" },\n { type: \"roundedRectangle\", label: \"Rounded Rectangle\" },\n { type: \"circle\", label: \"Circle\" },\n { type: \"triangle\", label: \"Triangle\" },\n];\n\n/* Stroke pattern options — now only the Inspector's Stroke group renders these\n (the shape floating toolbar no longer edits stroke). Mirrors the app's\n STROKE_PATTERN_OPTIONS dash enum: solid | dashed | dotted. */\nexport const BORDER_STYLE_OPTIONS: {\n value?: ShapeElementState[\"strokeDash\"];\n label: string;\n}[] = [\n { value: undefined, label: \"Solid\" },\n { value: \"5,5\", label: \"Dashed\" },\n { value: \"2,2\", label: \"Dotted\" },\n];\n\n/* ── Shared floating-toolbar controls ───────────────────────────────────────\n The floating toolbars were flattened this session to match the app: compact,\n collapsed controls (single-button dropdowns) with uniform 4px spacing and a\n single hairline separator only before Lock / Delete. These mirror the shared\n controls in the app's Inspector/Controls (ShapeTypeMenu, AlignmentMenu,\n ColorPicker compact, ToolbarActions). */\n\n/* ToolbarActions — the trailing block shared by EVERY floating toolbar:\n separator → Lock → Delete, in the standard control colour (not red). Mirrors\n app `toolbar/ToolbarActions.jsx`. */\nexport interface ToolbarActionsProps {\n locked: boolean;\n onToggleLock: () => void;\n onDelete: () => void;\n}\n\nexport const ToolbarActions = ({\n locked,\n onToggleLock,\n onDelete,\n}: ToolbarActionsProps): ReactElement => (\n <>\n <span className=\"divider\" />\n <Tooltip title={locked ? \"Unlock\" : \"Lock\"}>\n <StyledToolbarButton\n className={locked ? \"icon-only active\" : \"icon-only\"}\n aria-pressed={locked}\n onClick={onToggleLock}\n >\n <LockIcon className=\"i16\" />\n </StyledToolbarButton>\n </Tooltip>\n <Tooltip title=\"Delete\">\n <StyledToolbarButton className=\"icon-only\" onClick={onDelete}>\n <TrashIcon className=\"i16\" />\n </StyledToolbarButton>\n </Tooltip>\n </>\n);\n\n/* ShapeTypeMenu — collapsed shape-type picker: one icon button showing the\n current shape, opening a dropdown of the four types. Modeled on the app's\n ShapeTypeMenu (DS Menu + List). */\nexport interface ToolbarShapeTypeMenuProps {\n value: ShapeType;\n onChange: (type: ShapeType) => void;\n}\n\nexport const ShapeTypeMenu = ({\n value,\n onChange,\n}: ToolbarShapeTypeMenuProps): ReactElement => {\n const [open, setOpen] = useState(false);\n\n return (\n <Menu\n open={open}\n onOpen={() => setOpen(true)}\n onClose={() => setOpen(false)}\n position=\"bottom-start\"\n target={\n <IconButton\n type=\"button\"\n variant=\"option\"\n active={open}\n aria-label=\"Shape\"\n >\n {SHAPE_TYPE_ICON[value]}\n </IconButton>\n }\n >\n <List style={{ padding: \"8px 0\" }} tabIndex={-1}>\n {SHAPE_TYPE_OPTIONS.map((option) => (\n <ListItem\n key={option.type}\n aria-label={option.label}\n onClick={() => {\n onChange(option.type);\n setOpen(false);\n }}\n >\n {SHAPE_TYPE_ICON[option.type]}\n {option.label}\n </ListItem>\n ))}\n </List>\n </Menu>\n );\n};\n\n/* AlignmentMenu — collapsed alignment picker (single button + dropdown), the\n compact-toolbar counterpart to the Inspector's expanded four-button row.\n Mirrors the app's AlignmentMenu. */\nexport interface ToolbarAlignmentMenuProps {\n value: TextAlign;\n onChange: (align: TextAlign) => void;\n disabled?: boolean;\n}\n\nexport const AlignmentMenu = ({\n value,\n onChange,\n disabled,\n}: ToolbarAlignmentMenuProps): ReactElement => {\n const [open, setOpen] = useState(false);\n const selected =\n ALIGN_OPTIONS.find((option) => option.value === value) ?? ALIGN_OPTIONS[0];\n\n return (\n <Menu\n open={open}\n onOpen={() => setOpen(true)}\n onClose={() => setOpen(false)}\n position=\"bottom-start\"\n target={\n <IconButton\n type=\"button\"\n variant=\"option\"\n active={open}\n disabled={disabled}\n aria-label=\"Alignment\"\n >\n {selected.icon}\n </IconButton>\n }\n >\n <List style={{ padding: \"8px 0\" }} tabIndex={-1}>\n {ALIGN_OPTIONS.map((option) => (\n <ListItem\n key={option.value}\n aria-label={option.label}\n onClick={() => {\n onChange(option.value);\n setOpen(false);\n }}\n >\n {option.icon}\n {option.label}\n </ListItem>\n ))}\n </List>\n </Menu>\n );\n};\n\n/* The app's compact `ColorPicker`: a DS `Select` whose trigger is the swatch\n alone (a Dot, or the CircleSlash chip when transparent) and whose menu is the\n standard dot-and-name list — the same control the Inspector's colour field\n uses, minus the name on the trigger. `includeTransparent` adds \"Transparent\"\n first: shape fill opts in, sticky fill and text colour do not. */\nexport interface ToolbarColorSwatchProps {\n value: string;\n role: ColorRole;\n includeTransparent?: boolean;\n includeDefault?: boolean;\n label: string;\n onChange: (color: string) => void;\n}\n\nexport const ToolbarColorSwatch = ({\n value,\n role,\n includeTransparent,\n includeDefault,\n label,\n onChange,\n}: ToolbarColorSwatchProps): ReactElement => {\n const options = boardColorOptions(role, value, {\n includeTransparent,\n includeDefault,\n });\n\n return (\n <Tooltip title={label}>\n <span className=\"tb-rel\">\n <Select\n type=\"single\"\n disableSearch\n forceCloseMenu\n keepSameOptionsOrder\n options={options}\n selected={value}\n onChange={(next) =>\n onChange(String(Array.isArray(next) ? next[0] : next))\n }\n renderOption={(option) => (\n <span className=\"tb-color-option\">\n {option.icon}\n {option.name}\n </span>\n )}\n target={\n <SelectTrigger\n aria-label={label}\n style={{\n width: TOOLBAR_COLOR_TRIGGER_WIDTH,\n paddingLeft: 8,\n paddingRight: 8,\n }}\n >\n <span className=\"tb-color-value\">\n <BoardColorSwatch value={value} role={role} />\n </span>\n </SelectTrigger>\n }\n />\n </span>\n </Tooltip>\n );\n};\n\n/* The app's `ValuePicker` for the font size: a DS `Select` over the fixed size\n ladder, its trigger reading \"16 pt\". */\nexport interface ToolbarFontSizeSelectProps {\n value: number;\n onChange: (size: number) => void;\n}\n\nexport const ToolbarFontSizeSelect = ({\n value,\n onChange,\n}: ToolbarFontSizeSelectProps): ReactElement => (\n <Tooltip title=\"Font Size\">\n <span className=\"tb-rel\">\n <Select\n type=\"single\"\n disableSearch\n forceCloseMenu\n keepSameOptionsOrder\n options={FONT_SIZE_OPTIONS.map((size) => ({\n id: size,\n name: `${size} pt`,\n }))}\n selected={value}\n onChange={(next) =>\n onChange(Number(Array.isArray(next) ? next[0] : next))\n }\n target={\n <SelectTrigger\n aria-label=\"Font Size\"\n style={{ width: TOOLBAR_SELECT_WIDTH }}\n >\n {value} pt\n </SelectTrigger>\n }\n />\n </span>\n </Tooltip>\n);\n\n/* The text controls shared by the shape and sticky toolbars: font-size select,\n B / I / U / S, and the collapsed alignment menu. Same set the app's sticky\n and shape toolbars share (font-size picker, TextStyleButtons, AlignmentMenu).\n Kept generic so both element shapes can drive it. */\nexport interface ToolbarTextControlsProps {\n fontSize: number;\n styleFlags: {\n bold: boolean;\n italic: boolean;\n underline: boolean;\n strikethrough: boolean;\n };\n align: TextAlign;\n onFontSize: (size: number) => void;\n onToggleStyle: (key: TextStyleKey) => void;\n onAlign: (align: TextAlign) => void;\n}\n\nexport const ToolbarTextControls = ({\n fontSize,\n styleFlags,\n align,\n onFontSize,\n onToggleStyle,\n onAlign,\n}: ToolbarTextControlsProps): ReactElement => (\n <>\n <ToolbarFontSizeSelect value={fontSize} onChange={onFontSize} />\n {STYLE_OPTIONS.map((option) => (\n <Tooltip key={option.key} title={option.label}>\n <StyledToolbarButton\n className={styleFlags[option.key] ? \"icon-only active\" : \"icon-only\"}\n aria-label={option.label}\n aria-pressed={styleFlags[option.key]}\n onClick={() => onToggleStyle(option.key)}\n >\n {option.icon}\n </StyledToolbarButton>\n </Tooltip>\n ))}\n <AlignmentMenu value={align} onChange={onAlign} />\n </>\n);\n\nexport interface ShapeFormattingToolbarProps {\n element: ShapeElementState;\n onUpdate: (partial: Partial<ShapeElementState>) => void;\n onDelete: () => void;\n locked: boolean;\n onToggleLock: () => void;\n}\n\n/* ShapeFormattingToolbar — flat layout (was submenu-based): shape-type menu →\n fill colour → the same text controls as the sticky toolbar → Lock / Delete.\n Stroke is no longer edited here — it lives only in the Inspector's Stroke\n group now. Mirrors the app's ShapeFormattingToolbar. */\nexport const ShapeFormattingToolbar = ({\n element,\n onUpdate,\n onDelete,\n locked,\n onToggleLock,\n}: ShapeFormattingToolbarProps): ReactElement => (\n <StyledFormattingToolbar onClick={stopClick} onMouseDown={stopClick}>\n <ShapeTypeMenu\n value={element.type}\n onChange={(type) => onUpdate({ type })}\n />\n <ToolbarColorSwatch\n value={element.fill}\n role=\"fill\"\n includeTransparent\n label=\"Fill color\"\n onChange={(fill) => onUpdate({ fill })}\n />\n <ToolbarTextControls\n fontSize={element.fontSize}\n styleFlags={element}\n align={element.align ?? \"left\"}\n onFontSize={(fontSize) => onUpdate({ fontSize })}\n onToggleStyle={(key) => onUpdate({ [key]: !element[key] })}\n onAlign={(align) => onUpdate({ align })}\n />\n <ToolbarActions\n locked={locked}\n onToggleLock={onToggleLock}\n onDelete={onDelete}\n />\n </StyledFormattingToolbar>\n);\n\nexport interface StickyTextStyle {\n fontSize: number;\n bold: boolean;\n italic: boolean;\n strikethrough: boolean;\n underline: boolean;\n align: TextAlign;\n textColor: string;\n color: string;\n fillOpacity: number;\n}\n\nexport interface PostitFormattingToolbarProps {\n value: StickyTextStyle;\n onChange: (next: StickyTextStyle) => void;\n onDelete: () => void;\n locked: boolean;\n onToggleLock: () => void;\n}\n\n/* PostitFormattingToolbar — flat layout: note (fill) colour → the shared text\n controls (font-size, B/I/U/S, alignment menu) → Lock / Delete. The note's\n colour is its whole point, so its fill swatch does NOT offer Transparent.\n Mirrors the app's PostitFormattingToolbar. */\nexport const PostitFormattingToolbar = ({\n value,\n onChange,\n onDelete,\n locked,\n onToggleLock,\n}: PostitFormattingToolbarProps): ReactElement => (\n <StyledFormattingToolbar onClick={stopClick} onMouseDown={stopClick}>\n <ToolbarColorSwatch\n value={value.color}\n role=\"sticky\"\n includeDefault={false}\n label=\"Note color\"\n onChange={(color) => onChange({ ...value, color })}\n />\n <ToolbarTextControls\n fontSize={value.fontSize}\n styleFlags={value}\n align={value.align}\n onFontSize={(fontSize) => onChange({ ...value, fontSize })}\n onToggleStyle={(key) => onChange({ ...value, [key]: !value[key] })}\n onAlign={(align) => onChange({ ...value, align })}\n />\n <ToolbarActions\n locked={locked}\n onToggleLock={onToggleLock}\n onDelete={onDelete}\n />\n </StyledFormattingToolbar>\n);\n\n/* shape body per current (editable) type */\nexport const renderShapeBody = (\n def: CanvasElementDef,\n state: ShapeElementState,\n /* Effective size — the Inspector can override the element's default width /\n height, so the triangle polygon is drawn from the live size, not the def. */\n width: number = def.width,\n height: number = def.height\n): ReactElement =>\n state.type === \"triangle\" ? (\n /* TriangleElement: SVG polygon, apex top-center */\n <svg\n width=\"100%\"\n height=\"100%\"\n style={{ display: \"block\", overflow: \"visible\" }}\n >\n <polygon\n points={`${width / 2},0 ${width},${height} 0,${height}`}\n style={{\n fill: withOpacity(\n resolveBoardColor(state.fill, \"fill\"),\n state.fillOpacity\n ),\n stroke: withOpacity(\n resolveBoardColor(state.stroke, \"stroke\"),\n state.strokeOpacity\n ),\n }}\n strokeWidth={state.strokeWidth}\n strokeDasharray={state.strokeDash}\n />\n </svg>\n ) : (\n <div\n className=\"shape-fill\"\n style={{\n backgroundColor: withOpacity(\n resolveBoardColor(state.fill, \"fill\"),\n state.fillOpacity\n ),\n border: shapeBorder(state),\n borderRadius: state.type === \"circle\" ? \"50%\" : state.borderRadius,\n }}\n />\n );\n\nexport const ALIGN_OPTIONS: {\n value: TextAlign;\n label: string;\n icon: ReactElement;\n}[] = [\n { value: \"left\", label: \"Align Left\", icon: <TextAlignLeftIcon /> },\n { value: \"center\", label: \"Align Center\", icon: <TextAlignCenterIcon /> },\n { value: \"right\", label: \"Align Right\", icon: <TextAlignRightIcon /> },\n { value: \"justify\", label: \"Justify\", icon: <TextAlignJustifyIcon /> },\n];\n\nexport type TextStyleKey = \"bold\" | \"italic\" | \"underline\" | \"strikethrough\";\n\nexport const STYLE_OPTIONS: {\n key: TextStyleKey;\n label: string;\n icon: ReactElement;\n}[] = [\n { key: \"bold\", label: \"Bold\", icon: <TextStyleBoldIcon /> },\n { key: \"italic\", label: \"Italic\", icon: <TextStyleItalicIcon /> },\n { key: \"underline\", label: \"Underline\", icon: <TextStyleUnderlineIcon /> },\n {\n key: \"strikethrough\",\n label: \"Strikethrough\",\n icon: <TextStyleStrikeIcon />,\n },\n];\n"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,QAAQ,QAAQ,OAAO;AAErD,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SACEC,gBAAgB,EAEhBC,aAAa,EACbC,kBAAkB,EAClBC,iBAAiB,EACjBC,iBAAiB,QACZ,WAAW;AAClB,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SACEC,gBAAgB,EAChBC,UAAU,EACVC,QAAQ,EACRC,oBAAoB,EACpBC,mBAAmB,EACnBC,oBAAoB,EACpBC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,mBAAmB,EACnBC,mBAAmB,EACnBC,sBAAsB,EACtBC,SAAS,EACTC,YAAY,QACP,wBAAwB;AAC/B,SAASC,IAAI,EAAEC,QAAQ,QAAQ,uBAAuB;AACtD,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,aAAa,QAAQ,gCAAgC;AAC9D,SAASC,OAAO,QAAQ,0BAA0B;;AAElD;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,YAAY,GAAGzB,aAAa;AACzC,OAAO,MAAM0B,cAAc,GAAG1B,aAAa;AAC3C,OAAO,MAAM2B,YAAY,GAAG3B,aAAa;AACzC,OAAO,MAAM4B,WAAW,GAAG3B,kBAAkB;AAC7C,OAAO,MAAM4B,cAAc,GAAG,0BAA0B;AACxD,OAAO,MAAMC,cAAc,GACzB,8DAA8D;;AAEhE;AACA;AACA,OAAO,MAAMC,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