@activecollab/components 2.0.586 → 2.0.587
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/presentation/whiteboard/boardTools.js +45 -0
- package/dist/cjs/presentation/whiteboard/boardTools.js.map +1 -0
- package/dist/cjs/presentation/whiteboard/canvasElements.js +46 -38
- package/dist/cjs/presentation/whiteboard/canvasElements.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/elementToolbars.js +166 -0
- package/dist/cjs/presentation/whiteboard/elementToolbars.js.map +1 -0
- package/dist/cjs/presentation/whiteboard/elements.js +6 -429
- package/dist/cjs/presentation/whiteboard/elements.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/entityCardActions.js +12 -18
- package/dist/cjs/presentation/whiteboard/entityCardActions.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/fileElement.js +66 -58
- package/dist/cjs/presentation/whiteboard/fileElement.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/linkElement.js +22 -45
- package/dist/cjs/presentation/whiteboard/linkElement.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/paletteReview.js +10 -4
- package/dist/cjs/presentation/whiteboard/paletteReview.js.map +1 -1
- package/dist/cjs/presentation/whiteboardModern/contextToolbar.js +408 -0
- package/dist/cjs/presentation/whiteboardModern/contextToolbar.js.map +1 -0
- package/dist/cjs/presentation/whiteboardModern/surface.js +119 -0
- package/dist/cjs/presentation/whiteboardModern/surface.js.map +1 -0
- package/dist/cjs/presentation/whiteboardModern/toolDock.js +274 -0
- package/dist/cjs/presentation/whiteboardModern/toolDock.js.map +1 -0
- package/dist/cjs/presentation/whiteboardModern/topBars.js +223 -0
- package/dist/cjs/presentation/whiteboardModern/topBars.js.map +1 -0
- package/dist/esm/presentation/whiteboard/boardTools.d.ts +18 -0
- package/dist/esm/presentation/whiteboard/boardTools.d.ts.map +1 -0
- package/dist/esm/presentation/whiteboard/boardTools.js +37 -0
- package/dist/esm/presentation/whiteboard/boardTools.js.map +1 -0
- package/dist/esm/presentation/whiteboard/canvasElements.d.ts +5 -2
- package/dist/esm/presentation/whiteboard/canvasElements.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/canvasElements.js +35 -26
- package/dist/esm/presentation/whiteboard/canvasElements.js.map +1 -1
- package/dist/esm/presentation/whiteboard/elementToolbars.d.ts +22 -0
- package/dist/esm/presentation/whiteboard/elementToolbars.d.ts.map +1 -0
- package/dist/esm/presentation/whiteboard/elementToolbars.js +130 -0
- package/dist/esm/presentation/whiteboard/elementToolbars.js.map +1 -0
- package/dist/esm/presentation/whiteboard/elements.d.ts +1 -70
- package/dist/esm/presentation/whiteboard/elements.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/elements.js +7 -369
- package/dist/esm/presentation/whiteboard/elements.js.map +1 -1
- package/dist/esm/presentation/whiteboard/entityCardActions.d.ts +2 -3
- package/dist/esm/presentation/whiteboard/entityCardActions.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/entityCardActions.js +12 -18
- package/dist/esm/presentation/whiteboard/entityCardActions.js.map +1 -1
- package/dist/esm/presentation/whiteboard/fileElement.d.ts +1 -1
- package/dist/esm/presentation/whiteboard/fileElement.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/fileElement.js +66 -59
- package/dist/esm/presentation/whiteboard/fileElement.js.map +1 -1
- package/dist/esm/presentation/whiteboard/linkElement.d.ts +2 -2
- package/dist/esm/presentation/whiteboard/linkElement.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/linkElement.js +24 -47
- package/dist/esm/presentation/whiteboard/linkElement.js.map +1 -1
- package/dist/esm/presentation/whiteboard/paletteReview.js +11 -5
- package/dist/esm/presentation/whiteboard/paletteReview.js.map +1 -1
- package/dist/esm/presentation/whiteboardModern/contextToolbar.d.ts +76 -0
- package/dist/esm/presentation/whiteboardModern/contextToolbar.d.ts.map +1 -0
- package/dist/esm/presentation/whiteboardModern/contextToolbar.js +343 -0
- package/dist/esm/presentation/whiteboardModern/contextToolbar.js.map +1 -0
- package/dist/esm/presentation/whiteboardModern/surface.d.ts +29 -0
- package/dist/esm/presentation/whiteboardModern/surface.d.ts.map +1 -0
- package/dist/esm/presentation/whiteboardModern/surface.js +111 -0
- package/dist/esm/presentation/whiteboardModern/surface.js.map +1 -0
- package/dist/esm/presentation/whiteboardModern/toolDock.d.ts +20 -0
- package/dist/esm/presentation/whiteboardModern/toolDock.d.ts.map +1 -0
- package/dist/esm/presentation/whiteboardModern/toolDock.js +245 -0
- package/dist/esm/presentation/whiteboardModern/toolDock.js.map +1 -0
- package/dist/esm/presentation/whiteboardModern/topBars.d.ts +42 -0
- package/dist/esm/presentation/whiteboardModern/topBars.d.ts.map +1 -0
- package/dist/esm/presentation/whiteboardModern/topBars.js +197 -0
- package/dist/esm/presentation/whiteboardModern/topBars.js.map +1 -0
- package/package.json +1 -1
- package/dist/cjs/presentation/whiteboard/bottomDock.js +0 -264
- package/dist/cjs/presentation/whiteboard/bottomDock.js.map +0 -1
- package/dist/esm/presentation/whiteboard/bottomDock.d.ts +0 -75
- package/dist/esm/presentation/whiteboard/bottomDock.d.ts.map +0 -1
- package/dist/esm/presentation/whiteboard/bottomDock.js +0 -214
- package/dist/esm/presentation/whiteboard/bottomDock.js.map +0 -1
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { CapsuleButton, StyledCapsule, StyledCapsuleDivider } from "./surface";
|
|
5
|
+
import { Button } from "../../components/Button";
|
|
6
|
+
import { EditableText } from "../../components/EditableText";
|
|
7
|
+
import { ArrowDownSmallIcon, ArrowLeftIcon, DownloadIcon, PersonPlusIcon, ShapesIcon, SidebarLeftIcon, SidebarRightIcon } from "../../components/Icons";
|
|
8
|
+
import { Tooltip } from "../../components/Tooltip";
|
|
9
|
+
import { Caption1, Caption2 } from "../../components/Typography";
|
|
10
|
+
import { AVATAR_COLORS, RoundAvatar, SANS } from "../shared";
|
|
11
|
+
import { BoardSettingsMenu } from "../whiteboard/settingsMenu";
|
|
12
|
+
|
|
13
|
+
// mirrors: new-activecollab-front Whiteboards/components/toolbar/WhiteboardPresence.jsx (present users: display_name + avatar; initials stand in for avatar_url)
|
|
14
|
+
|
|
15
|
+
export const PRESENT_USERS = [{
|
|
16
|
+
id: 1,
|
|
17
|
+
display_name: "Janko S.",
|
|
18
|
+
initials: "JS",
|
|
19
|
+
color: AVATAR_COLORS.purple
|
|
20
|
+
}, {
|
|
21
|
+
id: 4,
|
|
22
|
+
display_name: "Maja A.",
|
|
23
|
+
initials: "MA",
|
|
24
|
+
color: AVATAR_COLORS.blue
|
|
25
|
+
}, {
|
|
26
|
+
id: 3,
|
|
27
|
+
display_name: "Dino K.",
|
|
28
|
+
initials: "DK",
|
|
29
|
+
color: AVATAR_COLORS.green
|
|
30
|
+
}, {
|
|
31
|
+
id: 6,
|
|
32
|
+
display_name: "Ana P.",
|
|
33
|
+
initials: "AP",
|
|
34
|
+
color: AVATAR_COLORS.orange
|
|
35
|
+
}];
|
|
36
|
+
const ICON_20 = {
|
|
37
|
+
width: 20,
|
|
38
|
+
height: 20
|
|
39
|
+
};
|
|
40
|
+
const StyledTopLeft = styled(StyledCapsule).withConfig({
|
|
41
|
+
displayName: "topBars__StyledTopLeft",
|
|
42
|
+
componentId: "sc-5pe7yl-0"
|
|
43
|
+
})(["position:absolute;top:16px;left:16px;z-index:60;max-width:calc(100% - 32px);padding:4px 6px 4px 4px;.identity{display:flex;align-items:center;gap:10px;min-width:0;height:36px;padding:0 8px 0 4px;border-radius:10px;cursor:text;transition:background-color 120ms ease;&:hover{background-color:var(--color-theme-transparent-200);}}.tile{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background-color:var(--color-primary-opaque-200);flex-shrink:0;}.tile svg{fill:var(--color-primary);}.names{display:flex;flex-direction:column;min-width:0;line-height:1;}.names .c-typography{line-height:16px;white-space:nowrap;}.crumb{display:flex;align-items:center;gap:4px;}.saved{width:6px;height:6px;border-radius:50%;background-color:var(--green-success);}.extra{display:inline-flex;align-items:center;}"]);
|
|
44
|
+
export const ModernTopLeftBar = _ref => {
|
|
45
|
+
let boardName = _ref.boardName,
|
|
46
|
+
onRenameBoard = _ref.onRenameBoard,
|
|
47
|
+
sidebarOpen = _ref.sidebarOpen,
|
|
48
|
+
onSidebarToggle = _ref.onSidebarToggle,
|
|
49
|
+
children = _ref.children;
|
|
50
|
+
return /*#__PURE__*/React.createElement(StyledTopLeft, null, /*#__PURE__*/React.createElement(CapsuleButton, {
|
|
51
|
+
label: "Back to Whiteboards"
|
|
52
|
+
}, /*#__PURE__*/React.createElement(ArrowLeftIcon, ICON_20)), /*#__PURE__*/React.createElement(StyledCapsuleDivider, null), /*#__PURE__*/React.createElement(Tooltip, {
|
|
53
|
+
title: "Rename board"
|
|
54
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
55
|
+
className: "identity"
|
|
56
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
57
|
+
className: "tile"
|
|
58
|
+
}, /*#__PURE__*/React.createElement(ShapesIcon, {
|
|
59
|
+
width: 18,
|
|
60
|
+
height: 18
|
|
61
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
62
|
+
className: "names"
|
|
63
|
+
}, /*#__PURE__*/React.createElement(EditableText, {
|
|
64
|
+
value: boardName,
|
|
65
|
+
variant: "Body 1",
|
|
66
|
+
weight: "bold",
|
|
67
|
+
onSave: event => onRenameBoard(event.target.value),
|
|
68
|
+
inputProps: {
|
|
69
|
+
maxLength: 150
|
|
70
|
+
}
|
|
71
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
72
|
+
className: "crumb"
|
|
73
|
+
}, /*#__PURE__*/React.createElement(Caption2, {
|
|
74
|
+
color: "secondary"
|
|
75
|
+
}, "Product Redesign"), /*#__PURE__*/React.createElement("span", {
|
|
76
|
+
className: "saved"
|
|
77
|
+
}), /*#__PURE__*/React.createElement(Caption2, {
|
|
78
|
+
color: "tertiary"
|
|
79
|
+
}, "Saved"))), /*#__PURE__*/React.createElement(ArrowDownSmallIcon, {
|
|
80
|
+
width: 16,
|
|
81
|
+
height: 16
|
|
82
|
+
}))), /*#__PURE__*/React.createElement(StyledCapsuleDivider, null), /*#__PURE__*/React.createElement(CapsuleButton, {
|
|
83
|
+
label: sidebarOpen ? "Hide sidebar" : "Show sidebar",
|
|
84
|
+
keys: ["⌘", "\\"],
|
|
85
|
+
on: sidebarOpen,
|
|
86
|
+
onClick: onSidebarToggle
|
|
87
|
+
}, /*#__PURE__*/React.createElement(SidebarLeftIcon, ICON_20)), children ? /*#__PURE__*/React.createElement("span", {
|
|
88
|
+
className: "extra"
|
|
89
|
+
}, children) : null);
|
|
90
|
+
};
|
|
91
|
+
const StyledTopRight = styled.div.withConfig({
|
|
92
|
+
displayName: "topBars__StyledTopRight",
|
|
93
|
+
componentId: "sc-5pe7yl-1"
|
|
94
|
+
})(["position:absolute;top:16px;right:16px;z-index:60;display:flex;align-items:center;gap:8px;.presence{display:flex;align-items:center;padding:0 6px 0 4px;font-family:", ";}.presence ", "{border-color:var(--surface-raised);}.presence .live{position:relative;}.presence .live::after{content:\"\";position:absolute;right:-1px;bottom:-1px;width:8px;height:8px;box-sizing:border-box;border-radius:50%;background-color:var(--green-success);border:2px solid var(--surface-raised);}.share{&&{height:32px;padding:0 14px 0 10px;gap:6px;border-radius:10px;margin:0 2px;}&& svg{width:18px;height:18px;fill:var(--page-paper-main);}}.settings .c-btn{width:36px;height:36px;border-radius:10px;}"], SANS, RoundAvatar);
|
|
95
|
+
export const ModernTopRightBar = _ref2 => {
|
|
96
|
+
let inspectorOpen = _ref2.inspectorOpen,
|
|
97
|
+
onInspectorToggle = _ref2.onInspectorToggle,
|
|
98
|
+
gridSize = _ref2.gridSize,
|
|
99
|
+
snapToGrid = _ref2.snapToGrid,
|
|
100
|
+
onGridSizeChange = _ref2.onGridSizeChange,
|
|
101
|
+
onSnapToGridChange = _ref2.onSnapToGridChange;
|
|
102
|
+
return /*#__PURE__*/React.createElement(StyledTopRight, null, /*#__PURE__*/React.createElement(StyledCapsule, null, /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
className: "presence"
|
|
104
|
+
}, PRESENT_USERS.map((user, position) => /*#__PURE__*/React.createElement(Tooltip, {
|
|
105
|
+
key: user.id,
|
|
106
|
+
title: user.display_name
|
|
107
|
+
}, /*#__PURE__*/React.createElement(RoundAvatar, {
|
|
108
|
+
className: position === 0 ? "live" : undefined,
|
|
109
|
+
$bg: user.color,
|
|
110
|
+
$size: 28,
|
|
111
|
+
$overlap: true,
|
|
112
|
+
$bordered: true
|
|
113
|
+
}, user.initials)))), /*#__PURE__*/React.createElement(Button, {
|
|
114
|
+
variant: "primary",
|
|
115
|
+
className: "share"
|
|
116
|
+
}, /*#__PURE__*/React.createElement(PersonPlusIcon, null), /*#__PURE__*/React.createElement(Caption1, {
|
|
117
|
+
color: "page-paper",
|
|
118
|
+
weight: "bold"
|
|
119
|
+
}, "Share")), /*#__PURE__*/React.createElement(StyledCapsuleDivider, null), /*#__PURE__*/React.createElement(CapsuleButton, {
|
|
120
|
+
label: "Export",
|
|
121
|
+
keys: ["⇧", "⌘", "E"]
|
|
122
|
+
}, /*#__PURE__*/React.createElement(DownloadIcon, ICON_20)), /*#__PURE__*/React.createElement(CapsuleButton, {
|
|
123
|
+
label: inspectorOpen ? "Hide inspector" : "Show inspector",
|
|
124
|
+
keys: ["⌘", "."],
|
|
125
|
+
on: inspectorOpen,
|
|
126
|
+
onClick: onInspectorToggle
|
|
127
|
+
}, /*#__PURE__*/React.createElement(SidebarRightIcon, ICON_20)), /*#__PURE__*/React.createElement("span", {
|
|
128
|
+
className: "settings"
|
|
129
|
+
}, /*#__PURE__*/React.createElement(BoardSettingsMenu, {
|
|
130
|
+
gridSize: gridSize,
|
|
131
|
+
snapToGrid: snapToGrid,
|
|
132
|
+
onGridSizeChange: onGridSizeChange,
|
|
133
|
+
onSnapToGridChange: onSnapToGridChange
|
|
134
|
+
}))));
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/* ------------------------------------------------------------------ */
|
|
138
|
+
/* Minimap */
|
|
139
|
+
/* ------------------------------------------------------------------ */
|
|
140
|
+
|
|
141
|
+
const MINIMAP_WIDTH = 176;
|
|
142
|
+
const MAP_INNER_WIDTH = MINIMAP_WIDTH - 24;
|
|
143
|
+
const MAP_MAX_INNER_HEIGHT = 104;
|
|
144
|
+
const MAP_INSET_X = 4;
|
|
145
|
+
const MAP_INSET_Y = 8;
|
|
146
|
+
const StyledMinimap = styled(StyledCapsule).withConfig({
|
|
147
|
+
displayName: "topBars__StyledMinimap",
|
|
148
|
+
componentId: "sc-5pe7yl-2"
|
|
149
|
+
})(["position:absolute;right:16px;bottom:20px;z-index:60;flex-direction:column;align-items:stretch;gap:6px;width:", "px;padding:8px 12px 10px;.map{position:relative;margin:0 -4px;border-radius:8px;background-color:var(--color-theme-transparent-200);}.item{position:absolute;border-radius:1.5px;}.viewport{position:absolute;box-sizing:border-box;border-radius:4px;border:1.5px solid var(--color-primary);background-color:color-mix(in srgb,var(--color-primary) 8%,transparent);}.meta{display:flex;justify-content:space-between;}"], MINIMAP_WIDTH);
|
|
150
|
+
const unionRect = rects => {
|
|
151
|
+
const left = Math.min(...rects.map(rect => rect.x));
|
|
152
|
+
const top = Math.min(...rects.map(rect => rect.y));
|
|
153
|
+
const right = Math.max(...rects.map(rect => rect.x + rect.width));
|
|
154
|
+
const bottom = Math.max(...rects.map(rect => rect.y + rect.height));
|
|
155
|
+
return {
|
|
156
|
+
x: left,
|
|
157
|
+
y: top,
|
|
158
|
+
width: right - left,
|
|
159
|
+
height: bottom - top
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
/* The whole board and the viewport over it, fitted into the minimap box. */
|
|
163
|
+
export const ModernMinimap = _ref3 => {
|
|
164
|
+
let items = _ref3.items,
|
|
165
|
+
viewport = _ref3.viewport;
|
|
166
|
+
const world = unionRect([viewport, ...items]);
|
|
167
|
+
const scale = Math.min(MAP_INNER_WIDTH / Math.max(world.width, 1), MAP_MAX_INNER_HEIGHT / Math.max(world.height, 1));
|
|
168
|
+
const offsetX = MAP_INSET_X + (MAP_INNER_WIDTH - world.width * scale) / 2;
|
|
169
|
+
const place = rect => ({
|
|
170
|
+
left: offsetX + (rect.x - world.x) * scale,
|
|
171
|
+
top: MAP_INSET_Y + (rect.y - world.y) * scale,
|
|
172
|
+
width: rect.width * scale,
|
|
173
|
+
height: rect.height * scale
|
|
174
|
+
});
|
|
175
|
+
return /*#__PURE__*/React.createElement(StyledMinimap, null, /*#__PURE__*/React.createElement("div", {
|
|
176
|
+
className: "map",
|
|
177
|
+
style: {
|
|
178
|
+
height: Math.round(world.height * scale) + MAP_INSET_Y * 2
|
|
179
|
+
}
|
|
180
|
+
}, items.map(item => /*#__PURE__*/React.createElement("span", {
|
|
181
|
+
key: item.id,
|
|
182
|
+
className: "item",
|
|
183
|
+
style: _extends({}, place(item), {
|
|
184
|
+
background: item.background
|
|
185
|
+
})
|
|
186
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
187
|
+
className: "viewport",
|
|
188
|
+
style: place(viewport)
|
|
189
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
190
|
+
className: "meta"
|
|
191
|
+
}, /*#__PURE__*/React.createElement(Caption2, {
|
|
192
|
+
color: "secondary"
|
|
193
|
+
}, "Minimap"), /*#__PURE__*/React.createElement(Caption2, {
|
|
194
|
+
color: "tertiary"
|
|
195
|
+
}, items.length, " elements")));
|
|
196
|
+
};
|
|
197
|
+
//# sourceMappingURL=topBars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topBars.js","names":["React","styled","CapsuleButton","StyledCapsule","StyledCapsuleDivider","Button","EditableText","ArrowDownSmallIcon","ArrowLeftIcon","DownloadIcon","PersonPlusIcon","ShapesIcon","SidebarLeftIcon","SidebarRightIcon","Tooltip","Caption1","Caption2","AVATAR_COLORS","RoundAvatar","SANS","BoardSettingsMenu","PRESENT_USERS","id","display_name","initials","color","purple","blue","green","orange","ICON_20","width","height","StyledTopLeft","withConfig","displayName","componentId","ModernTopLeftBar","_ref","boardName","onRenameBoard","sidebarOpen","onSidebarToggle","children","createElement","label","title","className","value","variant","weight","onSave","event","target","inputProps","maxLength","keys","on","onClick","StyledTopRight","div","ModernTopRightBar","_ref2","inspectorOpen","onInspectorToggle","gridSize","snapToGrid","onGridSizeChange","onSnapToGridChange","map","user","position","key","undefined","$bg","$size","$overlap","$bordered","MINIMAP_WIDTH","MAP_INNER_WIDTH","MAP_MAX_INNER_HEIGHT","MAP_INSET_X","MAP_INSET_Y","StyledMinimap","unionRect","rects","left","Math","min","rect","x","top","y","right","max","bottom","ModernMinimap","_ref3","items","viewport","world","scale","offsetX","place","style","round","item","_extends","background","length"],"sources":["../../../../src/presentation/whiteboardModern/topBars.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { CapsuleButton, StyledCapsule, StyledCapsuleDivider } from \"./surface\";\nimport { Button } from \"../../components/Button\";\nimport { EditableText } from \"../../components/EditableText\";\nimport {\n ArrowDownSmallIcon,\n ArrowLeftIcon,\n DownloadIcon,\n PersonPlusIcon,\n ShapesIcon,\n SidebarLeftIcon,\n SidebarRightIcon,\n} from \"../../components/Icons\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Caption1, Caption2 } from \"../../components/Typography\";\nimport { AVATAR_COLORS, RoundAvatar, SANS } from \"../shared\";\nimport { GridSize } from \"../whiteboard/elements\";\nimport { BoardSettingsMenu } from \"../whiteboard/settingsMenu\";\n\n// mirrors: new-activecollab-front Whiteboards/components/toolbar/WhiteboardPresence.jsx (present users: display_name + avatar; initials stand in for avatar_url)\nexport interface ModernPresentUser {\n id: number;\n display_name: string;\n initials: string;\n color: string;\n}\n\nexport const PRESENT_USERS: ModernPresentUser[] = [\n {\n id: 1,\n display_name: \"Janko S.\",\n initials: \"JS\",\n color: AVATAR_COLORS.purple,\n },\n { id: 4, display_name: \"Maja A.\", initials: \"MA\", color: AVATAR_COLORS.blue },\n {\n id: 3,\n display_name: \"Dino K.\",\n initials: \"DK\",\n color: AVATAR_COLORS.green,\n },\n {\n id: 6,\n display_name: \"Ana P.\",\n initials: \"AP\",\n color: AVATAR_COLORS.orange,\n },\n];\n\nconst ICON_20 = { width: 20, height: 20 };\n\nconst StyledTopLeft = styled(StyledCapsule)`\n position: absolute;\n top: 16px;\n left: 16px;\n z-index: 60;\n max-width: calc(100% - 32px);\n padding: 4px 6px 4px 4px;\n\n .identity {\n display: flex;\n align-items: center;\n gap: 10px;\n min-width: 0;\n height: 36px;\n padding: 0 8px 0 4px;\n border-radius: 10px;\n cursor: text;\n transition: background-color 120ms ease;\n\n &:hover {\n background-color: var(--color-theme-transparent-200);\n }\n }\n\n .tile {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border-radius: 8px;\n background-color: var(--color-primary-opaque-200);\n flex-shrink: 0;\n }\n\n .tile svg {\n fill: var(--color-primary);\n }\n\n .names {\n display: flex;\n flex-direction: column;\n min-width: 0;\n line-height: 1;\n }\n\n .names .c-typography {\n line-height: 16px;\n white-space: nowrap;\n }\n\n .crumb {\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .saved {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: var(--green-success);\n }\n\n /* Controls a caller adds to the capsule (a people menu) bring the DS 32px\n buttons; centre them on the capsule's 36px row. */\n .extra {\n display: inline-flex;\n align-items: center;\n }\n`;\n\nexport interface ModernTopLeftBarProps {\n boardName: string;\n onRenameBoard: (name: string) => void;\n sidebarOpen: boolean;\n onSidebarToggle: () => void;\n /* Extra controls at the end of the capsule. */\n children?: ReactNode;\n}\n\nexport const ModernTopLeftBar = ({\n boardName,\n onRenameBoard,\n sidebarOpen,\n onSidebarToggle,\n children,\n}: ModernTopLeftBarProps): ReactElement => (\n <StyledTopLeft>\n <CapsuleButton label=\"Back to Whiteboards\">\n <ArrowLeftIcon {...ICON_20} />\n </CapsuleButton>\n <StyledCapsuleDivider />\n <Tooltip title=\"Rename board\">\n <div className=\"identity\">\n <span className=\"tile\">\n <ShapesIcon width={18} height={18} />\n </span>\n <span className=\"names\">\n <EditableText\n value={boardName}\n variant=\"Body 1\"\n weight=\"bold\"\n onSave={(event) => onRenameBoard(event.target.value)}\n inputProps={{ maxLength: 150 }}\n />\n <span className=\"crumb\">\n <Caption2 color=\"secondary\">Product Redesign</Caption2>\n <span className=\"saved\" />\n <Caption2 color=\"tertiary\">Saved</Caption2>\n </span>\n </span>\n <ArrowDownSmallIcon width={16} height={16} />\n </div>\n </Tooltip>\n <StyledCapsuleDivider />\n <CapsuleButton\n label={sidebarOpen ? \"Hide sidebar\" : \"Show sidebar\"}\n keys={[\"⌘\", \"\\\\\"]}\n on={sidebarOpen}\n onClick={onSidebarToggle}\n >\n <SidebarLeftIcon {...ICON_20} />\n </CapsuleButton>\n {children ? <span className=\"extra\">{children}</span> : null}\n </StyledTopLeft>\n);\n\nconst StyledTopRight = styled.div`\n position: absolute;\n top: 16px;\n right: 16px;\n z-index: 60;\n display: flex;\n align-items: center;\n gap: 8px;\n\n .presence {\n display: flex;\n align-items: center;\n padding: 0 6px 0 4px;\n /* ds-exception: shared RoundAvatar prints its initials as raw text; the stack sets the DS sans stack so they do not fall back to serif */\n font-family: ${SANS};\n }\n\n .presence ${RoundAvatar} {\n border-color: var(--surface-raised);\n }\n\n .presence .live {\n position: relative;\n }\n\n .presence .live::after {\n content: \"\";\n position: absolute;\n right: -1px;\n bottom: -1px;\n width: 8px;\n height: 8px;\n box-sizing: border-box;\n border-radius: 50%;\n background-color: var(--green-success);\n border: 2px solid var(--surface-raised);\n }\n\n .share {\n && {\n height: 32px;\n padding: 0 14px 0 10px;\n gap: 6px;\n border-radius: 10px;\n margin: 0 2px;\n }\n\n && svg {\n width: 18px;\n height: 18px;\n fill: var(--page-paper-main);\n }\n }\n\n /* The reused board settings menu brings a 32px DS IconButton; size it to\n the capsule's 36px squares. */\n .settings .c-btn {\n width: 36px;\n height: 36px;\n border-radius: 10px;\n }\n`;\n\nexport interface ModernTopRightBarProps {\n inspectorOpen: boolean;\n onInspectorToggle: () => void;\n gridSize: GridSize;\n snapToGrid: boolean;\n onGridSizeChange: (size: GridSize) => void;\n onSnapToGridChange: (snap: boolean) => void;\n}\n\nexport const ModernTopRightBar = ({\n inspectorOpen,\n onInspectorToggle,\n gridSize,\n snapToGrid,\n onGridSizeChange,\n onSnapToGridChange,\n}: ModernTopRightBarProps): ReactElement => (\n <StyledTopRight>\n <StyledCapsule>\n <div className=\"presence\">\n {PRESENT_USERS.map((user, position) => (\n <Tooltip key={user.id} title={user.display_name}>\n <RoundAvatar\n className={position === 0 ? \"live\" : undefined}\n $bg={user.color}\n $size={28}\n $overlap\n $bordered\n >\n {user.initials}\n </RoundAvatar>\n </Tooltip>\n ))}\n </div>\n <Button variant=\"primary\" className=\"share\">\n <PersonPlusIcon />\n <Caption1 color=\"page-paper\" weight=\"bold\">\n Share\n </Caption1>\n </Button>\n <StyledCapsuleDivider />\n <CapsuleButton label=\"Export\" keys={[\"⇧\", \"⌘\", \"E\"]}>\n <DownloadIcon {...ICON_20} />\n </CapsuleButton>\n <CapsuleButton\n label={inspectorOpen ? \"Hide inspector\" : \"Show inspector\"}\n keys={[\"⌘\", \".\"]}\n on={inspectorOpen}\n onClick={onInspectorToggle}\n >\n <SidebarRightIcon {...ICON_20} />\n </CapsuleButton>\n <span className=\"settings\">\n <BoardSettingsMenu\n gridSize={gridSize}\n snapToGrid={snapToGrid}\n onGridSizeChange={onGridSizeChange}\n onSnapToGridChange={onSnapToGridChange}\n />\n </span>\n </StyledCapsule>\n </StyledTopRight>\n);\n\n/* ------------------------------------------------------------------ */\n/* Minimap */\n/* ------------------------------------------------------------------ */\n\nexport interface MinimapRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface MinimapItem extends MinimapRect {\n id: string;\n background: string;\n}\n\nconst MINIMAP_WIDTH = 176;\nconst MAP_INNER_WIDTH = MINIMAP_WIDTH - 24;\nconst MAP_MAX_INNER_HEIGHT = 104;\nconst MAP_INSET_X = 4;\nconst MAP_INSET_Y = 8;\n\nconst StyledMinimap = styled(StyledCapsule)`\n position: absolute;\n right: 16px;\n bottom: 20px;\n z-index: 60;\n flex-direction: column;\n align-items: stretch;\n gap: 6px;\n width: ${MINIMAP_WIDTH}px;\n padding: 8px 12px 10px;\n\n .map {\n position: relative;\n margin: 0 -4px;\n border-radius: 8px;\n background-color: var(--color-theme-transparent-200);\n }\n\n .item {\n position: absolute;\n border-radius: 1.5px;\n }\n\n .viewport {\n position: absolute;\n box-sizing: border-box;\n border-radius: 4px;\n border: 1.5px solid var(--color-primary);\n background-color: color-mix(in srgb, var(--color-primary) 8%, transparent);\n }\n\n .meta {\n display: flex;\n justify-content: space-between;\n }\n`;\n\nconst unionRect = (rects: MinimapRect[]): MinimapRect => {\n const left = Math.min(...rects.map((rect) => rect.x));\n const top = Math.min(...rects.map((rect) => rect.y));\n const right = Math.max(...rects.map((rect) => rect.x + rect.width));\n const bottom = Math.max(...rects.map((rect) => rect.y + rect.height));\n\n return { x: left, y: top, width: right - left, height: bottom - top };\n};\n\nexport interface ModernMinimapProps {\n items: MinimapItem[];\n /* The part of the board on screen, in board coordinates. */\n viewport: MinimapRect;\n}\n\n/* The whole board and the viewport over it, fitted into the minimap box. */\nexport const ModernMinimap = ({\n items,\n viewport,\n}: ModernMinimapProps): ReactElement => {\n const world = unionRect([viewport, ...items]);\n const scale = Math.min(\n MAP_INNER_WIDTH / Math.max(world.width, 1),\n MAP_MAX_INNER_HEIGHT / Math.max(world.height, 1)\n );\n const offsetX = MAP_INSET_X + (MAP_INNER_WIDTH - world.width * scale) / 2;\n const place = (rect: MinimapRect): React.CSSProperties => ({\n left: offsetX + (rect.x - world.x) * scale,\n top: MAP_INSET_Y + (rect.y - world.y) * scale,\n width: rect.width * scale,\n height: rect.height * scale,\n });\n\n return (\n <StyledMinimap>\n <div\n className=\"map\"\n style={{ height: Math.round(world.height * scale) + MAP_INSET_Y * 2 }}\n >\n {items.map((item) => (\n <span\n key={item.id}\n className=\"item\"\n style={{ ...place(item), background: item.background }}\n />\n ))}\n <span className=\"viewport\" style={place(viewport)} />\n </div>\n <div className=\"meta\">\n <Caption2 color=\"secondary\">Minimap</Caption2>\n <Caption2 color=\"tertiary\">{items.length} elements</Caption2>\n </div>\n </StyledMinimap>\n );\n};\n"],"mappings":";AAAA,OAAOA,KAAK,MAAmC,OAAO;AAEtD,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,aAAa,EAAEC,aAAa,EAAEC,oBAAoB,QAAQ,WAAW;AAC9E,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SACEC,kBAAkB,EAClBC,aAAa,EACbC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,eAAe,EACfC,gBAAgB,QACX,wBAAwB;AAC/B,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,6BAA6B;AAChE,SAASC,aAAa,EAAEC,WAAW,EAAEC,IAAI,QAAQ,WAAW;AAE5D,SAASC,iBAAiB,QAAQ,4BAA4B;;AAE9D;;AAQA,OAAO,MAAMC,aAAkC,GAAG,CAChD;EACEC,EAAE,EAAE,CAAC;EACLC,YAAY,EAAE,UAAU;EACxBC,QAAQ,EAAE,IAAI;EACdC,KAAK,EAAER,aAAa,CAACS;AACvB,CAAC,EACD;EAAEJ,EAAE,EAAE,CAAC;EAAEC,YAAY,EAAE,SAAS;EAAEC,QAAQ,EAAE,IAAI;EAAEC,KAAK,EAAER,aAAa,CAACU;AAAK,CAAC,EAC7E;EACEL,EAAE,EAAE,CAAC;EACLC,YAAY,EAAE,SAAS;EACvBC,QAAQ,EAAE,IAAI;EACdC,KAAK,EAAER,aAAa,CAACW;AACvB,CAAC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|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.verticalDivider = exports.isShapeTool = exports.ToolSurface = exports.ToolButton = exports.TOOL_HINTS = exports.StyledToolPill = exports.StyledHint = exports.StyledBottomDock = exports.SHAPE_TOOLS = exports.SHAPE_DEFAULT_SIZES = exports.DEFAULT_SHAPE_TOOL = exports.DEFAULT_PROJECT_ELEMENT_TOOL = exports.CARD_PREVIEW_HEIGHT = exports.BottomDock = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
var _IconButton = require("../../components/IconButton");
|
|
10
|
-
var _Icons = require("../../components/Icons");
|
|
11
|
-
var _Tooltip = require("../../components/Tooltip");
|
|
12
|
-
var _Typography = require("../../components/Typography");
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
15
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
17
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
18
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
19
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
20
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
21
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
22
|
-
/* ------------------------------------------------------------------ */
|
|
23
|
-
/* Floating toolbar surfaces */
|
|
24
|
-
/* ------------------------------------------------------------------ */
|
|
25
|
-
|
|
26
|
-
/* A floating, rounded toolbar surface (paper + shadow). */
|
|
27
|
-
var ToolSurface = exports.ToolSurface = _styledComponents.default.div.withConfig({
|
|
28
|
-
displayName: "bottomDock__ToolSurface",
|
|
29
|
-
componentId: "sc-1xsxwg0-0"
|
|
30
|
-
})(["display:flex;align-items:center;gap:2px;padding:6px;border-radius:14px;background-color:var(--page-paper-main);box-shadow:0 6px 24px rgba(0,0,0,0.16);border:1px solid var(--border-primary);svg > [stroke],svg > g [stroke]{stroke:currentColor;}"]);
|
|
31
|
-
|
|
32
|
-
/* vertical separator used inside the toolbars */
|
|
33
|
-
var verticalDivider = exports.verticalDivider = "\n .divider {\n width: 1px;\n height: 24px;\n background-color: var(--color-theme-400);\n margin: 0 6px;\n flex-shrink: 0;\n }\n";
|
|
34
|
-
var StyledBottomDock = exports.StyledBottomDock = _styledComponents.default.div.withConfig({
|
|
35
|
-
displayName: "bottomDock__StyledBottomDock",
|
|
36
|
-
componentId: "sc-1xsxwg0-1"
|
|
37
|
-
})(["position:absolute;left:50%;bottom:18px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:10px;max-width:calc(100% - 32px);"]);
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* The floating second toolbar row — a small pill above the dock that holds the
|
|
41
|
-
* members of one tool family (Circle / Rectangle / Triangle, or Task / Project).
|
|
42
|
-
*
|
|
43
|
-
* It is the same surface as the dock itself, so a family reads as an extension
|
|
44
|
-
* of the button that opened it rather than as a different kind of UI. Only one
|
|
45
|
-
* pill is ever up, because only one tool is ever armed.
|
|
46
|
-
*/
|
|
47
|
-
var StyledToolPill = exports.StyledToolPill = (0, _styledComponents.default)(ToolSurface).withConfig({
|
|
48
|
-
displayName: "bottomDock__StyledToolPill",
|
|
49
|
-
componentId: "sc-1xsxwg0-2"
|
|
50
|
-
})([""]);
|
|
51
|
-
|
|
52
|
-
/* Reserve two Caption1 lines (2 × 16px) so showing/hiding the hint never
|
|
53
|
-
shifts the dock; visibility keeps the reserved space when hidden. */
|
|
54
|
-
var StyledHint = exports.StyledHint = (0, _styledComponents.default)(_Typography.Caption1).withConfig({
|
|
55
|
-
displayName: "bottomDock__StyledHint",
|
|
56
|
-
componentId: "sc-1xsxwg0-3"
|
|
57
|
-
})(["text-align:center;padding:0 16px;min-height:32px;&.hint-hidden{visibility:hidden;}"]);
|
|
58
|
-
|
|
59
|
-
/* Per-tool hint shown under the dock only while that tool is hovered. */
|
|
60
|
-
var TOOL_HINTS = exports.TOOL_HINTS = {
|
|
61
|
-
circle: "Click to drop a default circle, or draw one to size. Press O for a circle.",
|
|
62
|
-
roundedRectangle: "Click to drop a default rectangle, or draw one to size. Press R for a rectangle.",
|
|
63
|
-
triangle: "Click to drop a default triangle, or draw one to size. Press Y for a triangle.",
|
|
64
|
-
connector: "Drag from one element to another to connect them. Press C to connect.",
|
|
65
|
-
projectElements: "Put a task, a project or a person on the board — pick which above, then draw it.",
|
|
66
|
-
project: "Draw a box to place a project card, then pick the project it shows.",
|
|
67
|
-
task: "Draw a box to place a task card, then pick the task it shows.",
|
|
68
|
-
person: "Draw a circle to place a person, then pick who it shows.",
|
|
69
|
-
link: "Draw a box to place a link, or paste a URL anywhere. Press L for link.",
|
|
70
|
-
file: "Draw a box to place a file, or drop one on the board. Press F for file.",
|
|
71
|
-
sticky: "Click anywhere on the canvas to drop a sticky note. Press S for a sticky note.",
|
|
72
|
-
text: "Click anywhere on the canvas to start typing. Press T for text.",
|
|
73
|
-
draw: "Click and drag to draw freehand. Press D for the pen.",
|
|
74
|
-
shapes: "Pick a shape above, then draw it on the board. Press R for a rectangle."
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* The armed board tool. Link, File, Project, Task and the three shapes are
|
|
79
|
-
* wired — arming one turns the next canvas click into "drop the default-size
|
|
80
|
-
* element here" and a drag into "draw one this big"; everything else stays a
|
|
81
|
-
* mock, so the board is otherwise always in select mode.
|
|
82
|
-
*/
|
|
83
|
-
|
|
84
|
-
var SHAPE_TOOLS = exports.SHAPE_TOOLS = ["circle", "roundedRectangle", "triangle"];
|
|
85
|
-
var isShapeTool = exports.isShapeTool = function isShapeTool(tool) {
|
|
86
|
-
return SHAPE_TOOLS.includes(tool);
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* What a dock button arms the instant its pill opens.
|
|
91
|
-
*
|
|
92
|
-
* Opening a family and choosing inside it are two separate decisions, and the
|
|
93
|
-
* second one has a right answer often enough that asking for it every time is
|
|
94
|
-
* just a toll: a shape is usually a rectangle, and the thing people put on a
|
|
95
|
-
* board is usually a task. So the pill opens with that member already armed and
|
|
96
|
-
* the gesture can start immediately — picking another member is a correction,
|
|
97
|
-
* not a required step.
|
|
98
|
-
*/
|
|
99
|
-
var DEFAULT_SHAPE_TOOL = exports.DEFAULT_SHAPE_TOOL = "roundedRectangle";
|
|
100
|
-
var DEFAULT_PROJECT_ELEMENT_TOOL = exports.DEFAULT_PROJECT_ELEMENT_TOOL = "task";
|
|
101
|
-
|
|
102
|
-
/* What a plain click drops — mirrors DEFAULT_SHAPE_SIZES in
|
|
103
|
-
new-activecollab-front, and is exactly what the hover preview promises. */
|
|
104
|
-
var SHAPE_DEFAULT_SIZES = exports.SHAPE_DEFAULT_SIZES = {
|
|
105
|
-
roundedRectangle: {
|
|
106
|
-
width: 100,
|
|
107
|
-
height: 60
|
|
108
|
-
},
|
|
109
|
-
circle: {
|
|
110
|
-
width: 80,
|
|
111
|
-
height: 80
|
|
112
|
-
},
|
|
113
|
-
triangle: {
|
|
114
|
-
width: 80,
|
|
115
|
-
height: 80
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
/* Cards are auto-height, so their hover preview uses the app's nominal wire
|
|
120
|
-
height (DEFAULT_LINK_CARD_SIZE / DEFAULT_FILE_CARD_SIZE). */
|
|
121
|
-
var CARD_PREVIEW_HEIGHT = exports.CARD_PREVIEW_HEIGHT = 240;
|
|
122
|
-
|
|
123
|
-
/** The kinds of card the draw gesture can place. */
|
|
124
|
-
|
|
125
|
-
var ToolButton = exports.ToolButton = function ToolButton(_ref) {
|
|
126
|
-
var tip = _ref.tip,
|
|
127
|
-
active = _ref.active,
|
|
128
|
-
children = _ref.children,
|
|
129
|
-
onClick = _ref.onClick,
|
|
130
|
-
onMouseEnter = _ref.onMouseEnter,
|
|
131
|
-
onMouseLeave = _ref.onMouseLeave;
|
|
132
|
-
return /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
|
|
133
|
-
title: tip
|
|
134
|
-
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
|
|
135
|
-
variant: "text gray",
|
|
136
|
-
active: active,
|
|
137
|
-
onClick: onClick,
|
|
138
|
-
onMouseEnter: onMouseEnter,
|
|
139
|
-
onMouseLeave: onMouseLeave
|
|
140
|
-
}, children));
|
|
141
|
-
};
|
|
142
|
-
/* Bottom-centre tool dock: the family pill (when one is open), the main
|
|
143
|
-
toolbar, and the shared hint line. The dock is anchored by its BOTTOM edge,
|
|
144
|
-
so a pill appearing or disappearing grows the stack upwards and never moves
|
|
145
|
-
the toolbar itself. */
|
|
146
|
-
var BottomDock = exports.BottomDock = function BottomDock(_ref2) {
|
|
147
|
-
var activeTool = _ref2.activeTool,
|
|
148
|
-
onToolChange = _ref2.onToolChange;
|
|
149
|
-
var _useState = (0, _react.useState)(null),
|
|
150
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
151
|
-
hoverHint = _useState2[0],
|
|
152
|
-
setHoverHint = _useState2[1];
|
|
153
|
-
var hoverProps = function hoverProps(tool) {
|
|
154
|
-
return {
|
|
155
|
-
onMouseEnter: function onMouseEnter() {
|
|
156
|
-
return setHoverHint(TOOL_HINTS[tool]);
|
|
157
|
-
},
|
|
158
|
-
onMouseLeave: function onMouseLeave() {
|
|
159
|
-
return setHoverHint(null);
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
/* An armed tool keeps its hint up after the pointer leaves the dock — the
|
|
165
|
-
gesture happens on the canvas, so that is exactly when the instruction is
|
|
166
|
-
needed. */
|
|
167
|
-
var hint = hoverHint !== null && hoverHint !== void 0 ? hoverHint : activeTool === "select" ? null : TOOL_HINTS[activeTool];
|
|
168
|
-
|
|
169
|
-
/* Which pill is up. Both are DERIVED from the armed tool rather than kept as
|
|
170
|
-
their own open/closed state: opening a pill always arms one of its members,
|
|
171
|
-
so "a member of this family is armed" and "this pill is showing" are the
|
|
172
|
-
same fact. Deriving it is what makes every way of leaving the family close
|
|
173
|
-
the pill for free — another dock tool, Esc on the canvas, or the gesture
|
|
174
|
-
finishing and disarming the tool. Two states could disagree; one cannot. */
|
|
175
|
-
var shapesOpen = isShapeTool(activeTool);
|
|
176
|
-
var projectElementsOpen = activeTool === "task" || activeTool === "project" || activeTool === "person";
|
|
177
|
-
return /*#__PURE__*/_react.default.createElement(StyledBottomDock, null, shapesOpen ? /*#__PURE__*/_react.default.createElement(StyledToolPill, null, /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
178
|
-
tip: "Circle",
|
|
179
|
-
active: activeTool === "circle",
|
|
180
|
-
onClick: function onClick() {
|
|
181
|
-
return onToolChange("circle");
|
|
182
|
-
}
|
|
183
|
-
}, hoverProps("circle")), /*#__PURE__*/_react.default.createElement(_Icons.CircleIcon, null)), /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
184
|
-
tip: "Rectangle",
|
|
185
|
-
active: activeTool === "roundedRectangle",
|
|
186
|
-
onClick: function onClick() {
|
|
187
|
-
return onToolChange("roundedRectangle");
|
|
188
|
-
}
|
|
189
|
-
}, hoverProps("roundedRectangle")), /*#__PURE__*/_react.default.createElement(_Icons.RoundedRectangleIcon, null)), /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
190
|
-
tip: "Triangle",
|
|
191
|
-
active: activeTool === "triangle",
|
|
192
|
-
onClick: function onClick() {
|
|
193
|
-
return onToolChange("triangle");
|
|
194
|
-
}
|
|
195
|
-
}, hoverProps("triangle")), /*#__PURE__*/_react.default.createElement(_Icons.TriangleIcon, null))) : null, projectElementsOpen ? /*#__PURE__*/_react.default.createElement(StyledToolPill, null, /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
196
|
-
tip: "Task",
|
|
197
|
-
active: activeTool === "task",
|
|
198
|
-
onClick: function onClick() {
|
|
199
|
-
return onToolChange("task");
|
|
200
|
-
}
|
|
201
|
-
}, hoverProps("task")), /*#__PURE__*/_react.default.createElement(_Icons.TaskIcon, null)), /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
202
|
-
tip: "Project",
|
|
203
|
-
active: activeTool === "project",
|
|
204
|
-
onClick: function onClick() {
|
|
205
|
-
return onToolChange("project");
|
|
206
|
-
}
|
|
207
|
-
}, hoverProps("project")), /*#__PURE__*/_react.default.createElement(_Icons.ProjectIcon, null)), /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
208
|
-
tip: "User",
|
|
209
|
-
active: activeTool === "person",
|
|
210
|
-
onClick: function onClick() {
|
|
211
|
-
return onToolChange("person");
|
|
212
|
-
}
|
|
213
|
-
}, hoverProps("person")), /*#__PURE__*/_react.default.createElement(_Icons.PersonIcon, null))) : null, /*#__PURE__*/_react.default.createElement(ToolSurface, null, /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
|
|
214
|
-
title: "Sticky Note"
|
|
215
|
-
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, _extends({
|
|
216
|
-
variant: "text gray",
|
|
217
|
-
onClick: function onClick() {
|
|
218
|
-
return onToolChange("select");
|
|
219
|
-
}
|
|
220
|
-
}, hoverProps("sticky")), /*#__PURE__*/_react.default.createElement(_Icons.NoteIcon, null))), /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
221
|
-
tip: "Text",
|
|
222
|
-
onClick: function onClick() {
|
|
223
|
-
return onToolChange("select");
|
|
224
|
-
}
|
|
225
|
-
}, hoverProps("text")), /*#__PURE__*/_react.default.createElement(_Icons.TextIcon, null)), /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
226
|
-
tip: "Draw",
|
|
227
|
-
onClick: function onClick() {
|
|
228
|
-
return onToolChange("select");
|
|
229
|
-
}
|
|
230
|
-
}, hoverProps("draw")), /*#__PURE__*/_react.default.createElement(_Icons.DrawIcon, null)), /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
231
|
-
tip: "Shape",
|
|
232
|
-
active: shapesOpen,
|
|
233
|
-
onClick: function onClick() {
|
|
234
|
-
return onToolChange(shapesOpen ? "select" : DEFAULT_SHAPE_TOOL);
|
|
235
|
-
}
|
|
236
|
-
}, hoverProps("shapes")), /*#__PURE__*/_react.default.createElement(_Icons.ShapesIcon, null)), /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
237
|
-
tip: "Connect",
|
|
238
|
-
onClick: function onClick() {
|
|
239
|
-
return onToolChange("select");
|
|
240
|
-
}
|
|
241
|
-
}, hoverProps("connector")), /*#__PURE__*/_react.default.createElement(_Icons.ConnectionIcon, null)), /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
242
|
-
tip: "Project Elements",
|
|
243
|
-
active: projectElementsOpen,
|
|
244
|
-
onClick: function onClick() {
|
|
245
|
-
return onToolChange(projectElementsOpen ? "select" : DEFAULT_PROJECT_ELEMENT_TOOL);
|
|
246
|
-
}
|
|
247
|
-
}, hoverProps("projectElements")), /*#__PURE__*/_react.default.createElement(_Icons.ProjectStarIcon, null)), /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
248
|
-
tip: "Link",
|
|
249
|
-
active: activeTool === "link",
|
|
250
|
-
onClick: function onClick() {
|
|
251
|
-
return onToolChange(activeTool === "link" ? "select" : "link");
|
|
252
|
-
}
|
|
253
|
-
}, hoverProps("link")), /*#__PURE__*/_react.default.createElement(_Icons.InsertLinkIcon, null)), /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
254
|
-
tip: "File",
|
|
255
|
-
active: activeTool === "file",
|
|
256
|
-
onClick: function onClick() {
|
|
257
|
-
return onToolChange(activeTool === "file" ? "select" : "file");
|
|
258
|
-
}
|
|
259
|
-
}, hoverProps("file")), /*#__PURE__*/_react.default.createElement(_Icons.AttachmentIcon, null))), /*#__PURE__*/_react.default.createElement(StyledHint, {
|
|
260
|
-
color: "tertiary",
|
|
261
|
-
className: hint ? undefined : "hint-hidden"
|
|
262
|
-
}, hint !== null && hint !== void 0 ? hint : " "));
|
|
263
|
-
};
|
|
264
|
-
//# sourceMappingURL=bottomDock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bottomDock.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_IconButton","_Icons","_Tooltip","_Typography","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","l","Symbol","iterator","u","next","done","push","value","return","isArray","ToolSurface","exports","styled","div","withConfig","displayName","componentId","verticalDivider","StyledBottomDock","StyledToolPill","StyledHint","Caption1","TOOL_HINTS","circle","roundedRectangle","triangle","connector","projectElements","project","task","person","link","file","sticky","text","draw","shapes","SHAPE_TOOLS","isShapeTool","tool","includes","DEFAULT_SHAPE_TOOL","DEFAULT_PROJECT_ELEMENT_TOOL","SHAPE_DEFAULT_SIZES","width","height","CARD_PREVIEW_HEIGHT","ToolButton","_ref","tip","active","children","onClick","onMouseEnter","onMouseLeave","createElement","Tooltip","title","IconButton","variant","BottomDock","_ref2","activeTool","onToolChange","_useState","useState","_useState2","hoverHint","setHoverHint","hoverProps","hint","shapesOpen","projectElementsOpen","CircleIcon","RoundedRectangleIcon","TriangleIcon","TaskIcon","ProjectIcon","PersonIcon","NoteIcon","TextIcon","DrawIcon","ShapesIcon","ConnectionIcon","ProjectStarIcon","InsertLinkIcon","AttachmentIcon","color","className","undefined"],"sources":["../../../../src/presentation/whiteboard/bottomDock.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n AttachmentIcon,\n CircleIcon,\n ConnectionIcon,\n DrawIcon,\n InsertLinkIcon,\n PersonIcon,\n ProjectIcon,\n ProjectStarIcon,\n RoundedRectangleIcon,\n ShapesIcon,\n NoteIcon,\n TaskIcon,\n TextIcon,\n TriangleIcon,\n} from \"../../components/Icons\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Caption1 } from \"../../components/Typography\";\n\n/* ------------------------------------------------------------------ */\n/* Floating toolbar surfaces */\n/* ------------------------------------------------------------------ */\n\n/* A floating, rounded toolbar surface (paper + shadow). */\nexport const ToolSurface = styled.div`\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 6px;\n border-radius: 14px;\n background-color: var(--page-paper-main);\n box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);\n border: 1px solid var(--border-primary);\n\n /* A DS button colours its icon by declaring svg { fill: currentColor }, so\n every FILLED glyph follows the button's active and hover states for free.\n Three glyphs here are not filled: RoundedRectangleIcon and TriangleIcon are\n outlines with a stroke of var(--color-theme-600) baked into the path, and\n ProjectIcon draws its ruler as a stroked rect. Nothing about the button\n could ever reach them — an armed rectangle stayed exactly as grey as an\n unarmed one. This extends the same currentColor contract to a declared\n stroke.\n\n Scoped to direct children and to shapes inside a <g>, NOT to every\n descendant: ProjectIcon cuts its ruler with a <mask> whose <line> is\n stroked BLACK on purpose. In a mask only luminance matters, so recolouring\n that line would turn a clean diagonal cut into a half-transparent smear. */\n svg > [stroke],\n svg > g [stroke] {\n stroke: currentColor;\n }\n`;\n\n/* vertical separator used inside the toolbars */\nexport const verticalDivider = `\n .divider {\n width: 1px;\n height: 24px;\n background-color: var(--color-theme-400);\n margin: 0 6px;\n flex-shrink: 0;\n }\n`;\n\nexport const StyledBottomDock = styled.div`\n position: absolute;\n left: 50%;\n bottom: 18px;\n transform: translateX(-50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n max-width: calc(100% - 32px);\n`;\n\n/**\n * The floating second toolbar row — a small pill above the dock that holds the\n * members of one tool family (Circle / Rectangle / Triangle, or Task / Project).\n *\n * It is the same surface as the dock itself, so a family reads as an extension\n * of the button that opened it rather than as a different kind of UI. Only one\n * pill is ever up, because only one tool is ever armed.\n */\nexport const StyledToolPill = styled(ToolSurface)``;\n\n/* Reserve two Caption1 lines (2 × 16px) so showing/hiding the hint never\n shifts the dock; visibility keeps the reserved space when hidden. */\nexport const StyledHint = styled(Caption1)`\n text-align: center;\n padding: 0 16px;\n min-height: 32px;\n\n &.hint-hidden {\n visibility: hidden;\n }\n`;\n\n/* Per-tool hint shown under the dock only while that tool is hovered. */\nexport const TOOL_HINTS = {\n circle:\n \"Click to drop a default circle, or draw one to size. Press O for a circle.\",\n roundedRectangle:\n \"Click to drop a default rectangle, or draw one to size. Press R for a rectangle.\",\n triangle:\n \"Click to drop a default triangle, or draw one to size. Press Y for a triangle.\",\n connector:\n \"Drag from one element to another to connect them. Press C to connect.\",\n projectElements:\n \"Put a task, a project or a person on the board — pick which above, then draw it.\",\n project:\n \"Draw a box to place a project card, then pick the project it shows.\",\n task: \"Draw a box to place a task card, then pick the task it shows.\",\n person: \"Draw a circle to place a person, then pick who it shows.\",\n link: \"Draw a box to place a link, or paste a URL anywhere. Press L for link.\",\n file: \"Draw a box to place a file, or drop one on the board. Press F for file.\",\n sticky:\n \"Click anywhere on the canvas to drop a sticky note. Press S for a sticky note.\",\n text: \"Click anywhere on the canvas to start typing. Press T for text.\",\n draw: \"Click and drag to draw freehand. Press D for the pen.\",\n shapes:\n \"Pick a shape above, then draw it on the board. Press R for a rectangle.\",\n} as const;\n\nexport type ToolHintKey = keyof typeof TOOL_HINTS;\n\nexport type ShapeTool = \"circle\" | \"roundedRectangle\" | \"triangle\";\n\n/**\n * The armed board tool. Link, File, Project, Task and the three shapes are\n * wired — arming one turns the next canvas click into \"drop the default-size\n * element here\" and a drag into \"draw one this big\"; everything else stays a\n * mock, so the board is otherwise always in select mode.\n */\nexport type BoardTool =\n | \"select\"\n | \"link\"\n | \"file\"\n | \"project\"\n | \"task\"\n | \"person\"\n | ShapeTool;\n\nexport const SHAPE_TOOLS: readonly ShapeTool[] = [\n \"circle\",\n \"roundedRectangle\",\n \"triangle\",\n];\n\nexport const isShapeTool = (tool: BoardTool): tool is ShapeTool =>\n (SHAPE_TOOLS as readonly string[]).includes(tool);\n\n/**\n * What a dock button arms the instant its pill opens.\n *\n * Opening a family and choosing inside it are two separate decisions, and the\n * second one has a right answer often enough that asking for it every time is\n * just a toll: a shape is usually a rectangle, and the thing people put on a\n * board is usually a task. So the pill opens with that member already armed and\n * the gesture can start immediately — picking another member is a correction,\n * not a required step.\n */\nexport const DEFAULT_SHAPE_TOOL: ShapeTool = \"roundedRectangle\";\nexport const DEFAULT_PROJECT_ELEMENT_TOOL: BoardTool = \"task\";\n\n/* What a plain click drops — mirrors DEFAULT_SHAPE_SIZES in\n new-activecollab-front, and is exactly what the hover preview promises. */\nexport const SHAPE_DEFAULT_SIZES: Record<\n ShapeTool,\n { width: number; height: number }\n> = {\n roundedRectangle: { width: 100, height: 60 },\n circle: { width: 80, height: 80 },\n triangle: { width: 80, height: 80 },\n};\n\n/* Cards are auto-height, so their hover preview uses the app's nominal wire\n height (DEFAULT_LINK_CARD_SIZE / DEFAULT_FILE_CARD_SIZE). */\nexport const CARD_PREVIEW_HEIGHT = 240;\n\n/** The kinds of card the draw gesture can place. */\nexport type DrawableTool = Exclude<BoardTool, \"select\">;\n\nexport interface ToolButtonProps {\n tip: string;\n active?: boolean;\n children: ReactNode;\n onClick?: () => void;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n}\n\nexport const ToolButton = ({\n tip,\n active,\n children,\n onClick,\n onMouseEnter,\n onMouseLeave,\n}: ToolButtonProps): ReactElement => (\n <Tooltip title={tip}>\n <IconButton\n variant=\"text gray\"\n active={active}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {children}\n </IconButton>\n </Tooltip>\n);\n\nexport interface BottomDockProps {\n activeTool: BoardTool;\n onToolChange: (tool: BoardTool) => void;\n}\n\n/* Bottom-centre tool dock: the family pill (when one is open), the main\n toolbar, and the shared hint line. The dock is anchored by its BOTTOM edge,\n so a pill appearing or disappearing grows the stack upwards and never moves\n the toolbar itself. */\nexport const BottomDock = ({\n activeTool,\n onToolChange,\n}: BottomDockProps): ReactElement => {\n const [hoverHint, setHoverHint] = useState<string | null>(null);\n\n const hoverProps = (tool: ToolHintKey): Record<string, () => void> => ({\n onMouseEnter: () => setHoverHint(TOOL_HINTS[tool]),\n onMouseLeave: () => setHoverHint(null),\n });\n\n /* An armed tool keeps its hint up after the pointer leaves the dock — the\n gesture happens on the canvas, so that is exactly when the instruction is\n needed. */\n const hint =\n hoverHint ?? (activeTool === \"select\" ? null : TOOL_HINTS[activeTool]);\n\n /* Which pill is up. Both are DERIVED from the armed tool rather than kept as\n their own open/closed state: opening a pill always arms one of its members,\n so \"a member of this family is armed\" and \"this pill is showing\" are the\n same fact. Deriving it is what makes every way of leaving the family close\n the pill for free — another dock tool, Esc on the canvas, or the gesture\n finishing and disarming the tool. Two states could disagree; one cannot. */\n const shapesOpen = isShapeTool(activeTool);\n const projectElementsOpen =\n activeTool === \"task\" ||\n activeTool === \"project\" ||\n activeTool === \"person\";\n\n return (\n <StyledBottomDock>\n {/* Shapes pill — hidden until the Shape dock button opens it. Inside a\n pill a click is a plain choice, never a toggle off: the dock button is\n what closes the family, so clicking the armed shape again must not\n make the row that is being used disappear. */}\n {shapesOpen ? (\n <StyledToolPill>\n <ToolButton\n tip=\"Circle\"\n active={activeTool === \"circle\"}\n onClick={() => onToolChange(\"circle\")}\n {...hoverProps(\"circle\")}\n >\n <CircleIcon />\n </ToolButton>\n <ToolButton\n tip=\"Rectangle\"\n active={activeTool === \"roundedRectangle\"}\n onClick={() => onToolChange(\"roundedRectangle\")}\n {...hoverProps(\"roundedRectangle\")}\n >\n <RoundedRectangleIcon />\n </ToolButton>\n <ToolButton\n tip=\"Triangle\"\n active={activeTool === \"triangle\"}\n onClick={() => onToolChange(\"triangle\")}\n {...hoverProps(\"triangle\")}\n >\n <TriangleIcon />\n </ToolButton>\n </StyledToolPill>\n ) : null}\n\n {/* Project Elements pill — the same surface, the same button size and\n spacing, in the same slot above the dock. Task comes first because it\n is what the button arms by default; User is third, beside Task and\n Project, and arms the same draw gesture with a person placeholder. */}\n {projectElementsOpen ? (\n <StyledToolPill>\n <ToolButton\n tip=\"Task\"\n active={activeTool === \"task\"}\n onClick={() => onToolChange(\"task\")}\n {...hoverProps(\"task\")}\n >\n <TaskIcon />\n </ToolButton>\n <ToolButton\n tip=\"Project\"\n active={activeTool === \"project\"}\n onClick={() => onToolChange(\"project\")}\n {...hoverProps(\"project\")}\n >\n <ProjectIcon />\n </ToolButton>\n <ToolButton\n tip=\"User\"\n active={activeTool === \"person\"}\n onClick={() => onToolChange(\"person\")}\n {...hoverProps(\"person\")}\n >\n <PersonIcon />\n </ToolButton>\n </StyledToolPill>\n ) : null}\n\n <ToolSurface>\n {/* The tools that are still mocks arm nothing — but they do DISARM, so\n reaching for one closes whatever pill is up and ends the gesture the\n board was waiting for. A dead button that also leaves the previous\n tool armed would be the confusing half of \"not implemented yet\". */}\n <Tooltip title=\"Sticky Note\">\n <IconButton\n variant=\"text gray\"\n onClick={() => onToolChange(\"select\")}\n {...hoverProps(\"sticky\")}\n >\n <NoteIcon />\n </IconButton>\n </Tooltip>\n <ToolButton\n tip=\"Text\"\n onClick={() => onToolChange(\"select\")}\n {...hoverProps(\"text\")}\n >\n <TextIcon />\n </ToolButton>\n <ToolButton\n tip=\"Draw\"\n onClick={() => onToolChange(\"select\")}\n {...hoverProps(\"draw\")}\n >\n <DrawIcon />\n </ToolButton>\n {/* Opening the family and arming its default member are one click: the\n pill appears with Rectangle already armed, so the next thing the\n pointer does can be the drawing itself. */}\n <ToolButton\n tip=\"Shape\"\n active={shapesOpen}\n onClick={() =>\n onToolChange(shapesOpen ? \"select\" : DEFAULT_SHAPE_TOOL)\n }\n {...hoverProps(\"shapes\")}\n >\n <ShapesIcon />\n </ToolButton>\n <ToolButton\n tip=\"Connect\"\n onClick={() => onToolChange(\"select\")}\n {...hoverProps(\"connector\")}\n >\n <ConnectionIcon />\n </ToolButton>\n <ToolButton\n tip=\"Project Elements\"\n active={projectElementsOpen}\n onClick={() =>\n onToolChange(\n projectElementsOpen ? \"select\" : DEFAULT_PROJECT_ELEMENT_TOOL\n )\n }\n {...hoverProps(\"projectElements\")}\n >\n <ProjectStarIcon />\n </ToolButton>\n <ToolButton\n tip=\"Link\"\n active={activeTool === \"link\"}\n onClick={() =>\n onToolChange(activeTool === \"link\" ? \"select\" : \"link\")\n }\n {...hoverProps(\"link\")}\n >\n <InsertLinkIcon />\n </ToolButton>\n <ToolButton\n tip=\"File\"\n active={activeTool === \"file\"}\n onClick={() =>\n onToolChange(activeTool === \"file\" ? \"select\" : \"file\")\n }\n {...hoverProps(\"file\")}\n >\n <AttachmentIcon />\n </ToolButton>\n </ToolSurface>\n\n <StyledHint color=\"tertiary\" className={hint ? undefined : \"hint-hidden\"}>\n {hint ?? \" \"}\n </StyledHint>\n </StyledBottomDock>\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAgBA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAAuD,SAAAE,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,wBAAAQ,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAA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