react-zoom-pan-pinch 3.7.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +785 -310
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +117 -23
- package/dist/index.esm.js +781 -302
- package/dist/index.esm.js.map +1 -1
- package/package.json +73 -62
- package/src/components/index.ts +5 -0
- package/src/components/keep-scale/keep-scale.tsx +28 -0
- package/src/components/mini-map/mini-map.tsx +292 -0
- package/src/components/mini-map/use-resize.hook.ts +74 -0
- package/src/components/transform-component/transform-component.module.css +43 -0
- package/src/components/transform-component/transform-component.tsx +96 -0
- package/src/components/transform-wrapper/transform-wrapper.tsx +39 -0
- package/src/components/virtualize/virtualize.tsx +133 -0
- package/src/components/virtualize/virtualize.utils.ts +104 -0
- package/src/constants/state.constants.ts +99 -0
- package/src/core/animations/animations.constants.ts +78 -0
- package/src/core/animations/animations.utils.ts +115 -0
- package/src/core/bounds/bounds.types.ts +8 -0
- package/src/core/bounds/bounds.utils.ts +226 -0
- package/src/core/double-click/double-click.logic.ts +127 -0
- package/src/core/handlers/handlers.logic.ts +122 -0
- package/src/core/handlers/handlers.utils.ts +243 -0
- package/src/core/instance.core.ts +704 -0
- package/src/core/pan/panning.logic.ts +122 -0
- package/src/core/pan/panning.utils.ts +216 -0
- package/src/core/pan/velocity.logic.ts +187 -0
- package/src/core/pan/velocity.utils.ts +83 -0
- package/src/core/pinch/pinch.logic.ts +139 -0
- package/src/core/pinch/pinch.utils.ts +95 -0
- package/src/core/wheel/wheel.logic.ts +161 -0
- package/src/core/wheel/wheel.utils.ts +157 -0
- package/src/core/zoom/zoom.logic.ts +71 -0
- package/src/core/zoom/zoom.utils.ts +62 -0
- package/src/hooks/index.ts +5 -0
- package/src/hooks/use-controls.tsx +9 -0
- package/src/hooks/use-transform-component.tsx +30 -0
- package/src/hooks/use-transform-context.tsx +13 -0
- package/src/hooks/use-transform-effect.tsx +22 -0
- package/src/hooks/use-transform-init.tsx +28 -0
- package/src/hooks/use-zoom-pan-pinch.tsx +48 -0
- package/src/index.ts +6 -0
- package/src/models/calculations.model.ts +34 -0
- package/src/models/context.model.ts +218 -0
- package/src/models/helpers.model.ts +15 -0
- package/src/models/index.ts +3 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/stories/assets/big-image.jpeg +0 -0
- package/src/stories/assets/map.jpg +0 -0
- package/src/stories/assets/medium-image.jpg +0 -0
- package/src/stories/assets/pin.svg +1 -0
- package/src/stories/assets/small-image.jpg +0 -0
- package/src/stories/assets/svg-example.svg +14 -0
- package/src/stories/docs/DocTable.tsx +59 -0
- package/src/stories/docs/HandlerCards.tsx +102 -0
- package/src/stories/docs/Introduction.stories.mdx +135 -0
- package/src/stories/docs/PropTable.tsx +116 -0
- package/src/stories/docs/docs.module.css +370 -0
- package/src/stories/docs/handlers.stories.mdx +7 -0
- package/src/stories/docs/handlers.tsx +111 -0
- package/src/stories/docs/props.stories.mdx +11 -0
- package/src/stories/docs/props.tsx +571 -0
- package/src/stories/examples/axis-lock/axis-lock.stories.mdx +35 -0
- package/src/stories/examples/axis-lock/example.tsx +114 -0
- package/src/stories/examples/bounds/bounds.data.tsx +191 -0
- package/src/stories/examples/bounds/bounds.stories.mdx +99 -0
- package/src/stories/examples/center-zoomed-out/center-zoomed-out.stories.mdx +206 -0
- package/src/stories/examples/cinema/cinema-data.tsx +578 -0
- package/src/stories/examples/cinema/cinema.stories.mdx +30 -0
- package/src/stories/examples/cinema/example.tsx +378 -0
- package/src/stories/examples/cinema/image.png +0 -0
- package/src/stories/examples/content/content.stories.mdx +172 -0
- package/src/stories/examples/content/mixed-content.data.tsx +624 -0
- package/src/stories/examples/content-rerendering/content-updating.stories.mdx +34 -0
- package/src/stories/examples/content-rerendering/example.tsx +631 -0
- package/src/stories/examples/controls/controls.stories.mdx +120 -0
- package/src/stories/examples/image/example.tsx +149 -0
- package/src/stories/examples/image/image.stories.mdx +46 -0
- package/src/stories/examples/image-annotations/example.tsx +1442 -0
- package/src/stories/examples/image-annotations/image-annotations.stories.mdx +39 -0
- package/src/stories/examples/image-responsive/example.tsx +152 -0
- package/src/stories/examples/image-responsive/image-responsive.stories.mdx +51 -0
- package/src/stories/examples/image-zoomed-out/image-zoomed-out.stories.mdx +107 -0
- package/src/stories/examples/initial-transform/example.tsx +233 -0
- package/src/stories/examples/initial-transform/initial-transform.stories.mdx +37 -0
- package/src/stories/examples/keep-scale/example.tsx +882 -0
- package/src/stories/examples/keep-scale/keep-scale.stories.mdx +30 -0
- package/src/stories/examples/keep-scale/map.stories.mdx +28 -0
- package/src/stories/examples/medical-viewer/chest-xray.tsx +246 -0
- package/src/stories/examples/medical-viewer/example.tsx +690 -0
- package/src/stories/examples/medical-viewer/medical-viewer.stories.mdx +49 -0
- package/src/stories/examples/mini-map/example.tsx +122 -0
- package/src/stories/examples/mini-map/mini-map.stories.mdx +26 -0
- package/src/stories/examples/miro/example.tsx +1573 -0
- package/src/stories/examples/miro/miro.stories.mdx +31 -0
- package/src/stories/examples/padding/example.tsx +147 -0
- package/src/stories/examples/padding/padding.stories.mdx +35 -0
- package/src/stories/examples/product-card/example.tsx +594 -0
- package/src/stories/examples/product-card/product-card.stories.mdx +29 -0
- package/src/stories/examples/stadium/example.tsx +1040 -0
- package/src/stories/examples/stadium/stadium-data.ts +224 -0
- package/src/stories/examples/stadium/stadium.stories.mdx +32 -0
- package/src/stories/examples/stress/example.tsx +59 -0
- package/src/stories/examples/stress/stress-test.stories.mdx +28 -0
- package/src/stories/examples/svg-zoom-to-element/creativity.svg +143 -0
- package/src/stories/examples/svg-zoom-to-element/example.tsx +95 -0
- package/src/stories/examples/svg-zoom-to-element/svg-zoom-to-element.stories.mdx +28 -0
- package/src/stories/examples/text-selection/example.tsx +221 -0
- package/src/stories/examples/text-selection/text-selection.stories.mdx +31 -0
- package/src/stories/examples/velocity/example.tsx +908 -0
- package/src/stories/examples/velocity/velocity.stories.mdx +35 -0
- package/src/stories/examples/virtualize/example.tsx +239 -0
- package/src/stories/examples/virtualize/virtualize.stories.mdx +84 -0
- package/src/stories/examples/zoom-to-element/example.tsx +219 -0
- package/src/stories/examples/zoom-to-element/zoom-to-element.stories.mdx +31 -0
- package/src/stories/hooks/use-controls.stories.mdx +86 -0
- package/src/stories/hooks/use-transform-component.stories.mdx +108 -0
- package/src/stories/hooks/use-transform-context.stories.mdx +92 -0
- package/src/stories/hooks/use-transform-effect.stories.mdx +114 -0
- package/src/stories/hooks/use-transform-init.stories.mdx +105 -0
- package/src/stories/types/args.types.ts +192 -0
- package/src/stories/utils/args.utils.ts +35 -0
- package/src/stories/utils/bounds-overlay.tsx +168 -0
- package/src/stories/utils/code.utils.tsx +22 -0
- package/src/stories/utils/controls.utils.tsx +347 -0
- package/src/stories/utils/index.ts +5 -0
- package/src/stories/utils/styles.module.css +223 -0
- package/src/stories/utils/viewer.styles.ts +34 -0
- package/src/styles.css +8 -0
- package/src/typings.d.ts +21 -0
- package/src/utils/calculations.utils.ts +16 -0
- package/src/utils/callback.utils.ts +11 -0
- package/src/utils/context.utils.ts +49 -0
- package/src/utils/event.utils.ts +38 -0
- package/src/utils/helpers.utils.ts +22 -0
- package/src/utils/index.ts +8 -0
- package/src/utils/ref.utils.ts +32 -0
- package/src/utils/state.utils.ts +77 -0
- package/src/utils/styles.utils.ts +49 -0
|
@@ -0,0 +1,1573 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { TransformWrapper, TransformComponent } from "../../../components";
|
|
4
|
+
import { normalizeArgs } from "../../utils";
|
|
5
|
+
|
|
6
|
+
const CANVAS_W = 4800;
|
|
7
|
+
const CANVAS_H = 3200;
|
|
8
|
+
|
|
9
|
+
const font = 'Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif';
|
|
10
|
+
|
|
11
|
+
const canvasBase: React.CSSProperties = {
|
|
12
|
+
position: "relative",
|
|
13
|
+
width: CANVAS_W,
|
|
14
|
+
height: CANVAS_H,
|
|
15
|
+
fontFamily: font,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/* ── Primitives ────────────────────────────────────────────── */
|
|
19
|
+
|
|
20
|
+
function Sticky({
|
|
21
|
+
x,
|
|
22
|
+
y,
|
|
23
|
+
w,
|
|
24
|
+
h,
|
|
25
|
+
bg,
|
|
26
|
+
rot = 0,
|
|
27
|
+
title,
|
|
28
|
+
body,
|
|
29
|
+
votes = [],
|
|
30
|
+
emoji = "",
|
|
31
|
+
}: {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
w: number;
|
|
35
|
+
h: number;
|
|
36
|
+
bg: string;
|
|
37
|
+
rot: number;
|
|
38
|
+
title: string;
|
|
39
|
+
body: string;
|
|
40
|
+
votes: string[];
|
|
41
|
+
emoji: string;
|
|
42
|
+
}) {
|
|
43
|
+
return (
|
|
44
|
+
<div
|
|
45
|
+
style={{
|
|
46
|
+
position: "absolute",
|
|
47
|
+
left: x,
|
|
48
|
+
top: y,
|
|
49
|
+
width: w,
|
|
50
|
+
minHeight: h,
|
|
51
|
+
background: bg,
|
|
52
|
+
borderRadius: 3,
|
|
53
|
+
boxShadow:
|
|
54
|
+
"0 1px 2px rgba(0,0,0,0.06), 0 4px 14px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04)",
|
|
55
|
+
transform: `rotate(${rot}deg)`,
|
|
56
|
+
transformOrigin: "center center",
|
|
57
|
+
color: "#1a1a1a",
|
|
58
|
+
overflow: "hidden",
|
|
59
|
+
}}
|
|
60
|
+
>
|
|
61
|
+
{/* Tape strip */}
|
|
62
|
+
<div
|
|
63
|
+
style={{
|
|
64
|
+
position: "absolute",
|
|
65
|
+
top: -4,
|
|
66
|
+
left: "50%",
|
|
67
|
+
transform: `translateX(-50%) rotate(${-rot * 0.3}deg)`,
|
|
68
|
+
width: 48,
|
|
69
|
+
height: 14,
|
|
70
|
+
background: "rgba(255,255,255,0.45)",
|
|
71
|
+
borderRadius: 1,
|
|
72
|
+
boxShadow: "0 1px 2px rgba(0,0,0,0.06)",
|
|
73
|
+
}}
|
|
74
|
+
/>
|
|
75
|
+
<div style={{ padding: "16px 16px 12px" }}>
|
|
76
|
+
<div
|
|
77
|
+
style={{
|
|
78
|
+
fontSize: 15,
|
|
79
|
+
fontWeight: 700,
|
|
80
|
+
lineHeight: 1.35,
|
|
81
|
+
marginBottom: 8,
|
|
82
|
+
letterSpacing: "-0.01em",
|
|
83
|
+
}}
|
|
84
|
+
>
|
|
85
|
+
{title}
|
|
86
|
+
</div>
|
|
87
|
+
<div style={{ fontSize: 13, lineHeight: 1.5, opacity: 0.82 }}>
|
|
88
|
+
{body}
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
{(votes.length > 0 || emoji) && (
|
|
92
|
+
<div
|
|
93
|
+
style={{
|
|
94
|
+
display: "flex",
|
|
95
|
+
alignItems: "center",
|
|
96
|
+
gap: 6,
|
|
97
|
+
padding: "0 14px 10px",
|
|
98
|
+
}}
|
|
99
|
+
>
|
|
100
|
+
{votes.map((c, i) => (
|
|
101
|
+
<div
|
|
102
|
+
key={c}
|
|
103
|
+
style={{
|
|
104
|
+
width: 10,
|
|
105
|
+
height: 10,
|
|
106
|
+
borderRadius: "50%",
|
|
107
|
+
background: c,
|
|
108
|
+
border: "1.5px solid rgba(255,255,255,0.6)",
|
|
109
|
+
boxShadow: "0 1px 3px rgba(0,0,0,0.12)",
|
|
110
|
+
marginLeft: i > 0 ? -4 : 0,
|
|
111
|
+
}}
|
|
112
|
+
/>
|
|
113
|
+
))}
|
|
114
|
+
{emoji && (
|
|
115
|
+
<span
|
|
116
|
+
style={{
|
|
117
|
+
fontSize: 14,
|
|
118
|
+
marginLeft: votes.length > 0 ? 4 : 0,
|
|
119
|
+
filter: "drop-shadow(0 1px 1px rgba(0,0,0,0.1))",
|
|
120
|
+
}}
|
|
121
|
+
>
|
|
122
|
+
{emoji}
|
|
123
|
+
</span>
|
|
124
|
+
)}
|
|
125
|
+
</div>
|
|
126
|
+
)}
|
|
127
|
+
</div>
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function Frame({
|
|
132
|
+
x,
|
|
133
|
+
y,
|
|
134
|
+
w,
|
|
135
|
+
h,
|
|
136
|
+
title,
|
|
137
|
+
accent = "#5c6bc0",
|
|
138
|
+
children = null,
|
|
139
|
+
}: {
|
|
140
|
+
x: number;
|
|
141
|
+
y: number;
|
|
142
|
+
w: number;
|
|
143
|
+
h: number;
|
|
144
|
+
title: string;
|
|
145
|
+
accent: string;
|
|
146
|
+
children: React.ReactNode;
|
|
147
|
+
}) {
|
|
148
|
+
return (
|
|
149
|
+
<div
|
|
150
|
+
style={{
|
|
151
|
+
position: "absolute",
|
|
152
|
+
left: x,
|
|
153
|
+
top: y,
|
|
154
|
+
width: w,
|
|
155
|
+
height: h,
|
|
156
|
+
borderRadius: 6,
|
|
157
|
+
background: "#fff",
|
|
158
|
+
boxShadow: `0 0 0 1px ${accent}44, 0 8px 32px rgba(40, 50, 120, 0.1)`,
|
|
159
|
+
overflow: "hidden",
|
|
160
|
+
display: "flex",
|
|
161
|
+
flexDirection: "column",
|
|
162
|
+
}}
|
|
163
|
+
>
|
|
164
|
+
<div
|
|
165
|
+
style={{
|
|
166
|
+
flexShrink: 0,
|
|
167
|
+
height: 40,
|
|
168
|
+
padding: "0 14px",
|
|
169
|
+
display: "flex",
|
|
170
|
+
alignItems: "center",
|
|
171
|
+
gap: 8,
|
|
172
|
+
background: `linear-gradient(180deg, ${accent}0a 0%, ${accent}05 100%)`,
|
|
173
|
+
borderBottom: `1px solid ${accent}22`,
|
|
174
|
+
color: accent,
|
|
175
|
+
fontSize: 13,
|
|
176
|
+
fontWeight: 700,
|
|
177
|
+
letterSpacing: "-0.02em",
|
|
178
|
+
}}
|
|
179
|
+
>
|
|
180
|
+
<span
|
|
181
|
+
style={{
|
|
182
|
+
width: 8,
|
|
183
|
+
height: 8,
|
|
184
|
+
borderRadius: 2,
|
|
185
|
+
background: accent,
|
|
186
|
+
opacity: 0.7,
|
|
187
|
+
}}
|
|
188
|
+
/>
|
|
189
|
+
{title}
|
|
190
|
+
</div>
|
|
191
|
+
<div style={{ flex: 1, position: "relative", background: "#fff" }}>
|
|
192
|
+
{children}
|
|
193
|
+
</div>
|
|
194
|
+
</div>
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function SectionLabel({
|
|
199
|
+
x,
|
|
200
|
+
y,
|
|
201
|
+
text,
|
|
202
|
+
sub = "",
|
|
203
|
+
}: {
|
|
204
|
+
x: number;
|
|
205
|
+
y: number;
|
|
206
|
+
text: string;
|
|
207
|
+
sub: string;
|
|
208
|
+
}) {
|
|
209
|
+
return (
|
|
210
|
+
<div style={{ position: "absolute", left: x, top: y }}>
|
|
211
|
+
<div
|
|
212
|
+
style={{
|
|
213
|
+
fontSize: 14,
|
|
214
|
+
fontWeight: 800,
|
|
215
|
+
letterSpacing: "0.06em",
|
|
216
|
+
textTransform: "uppercase",
|
|
217
|
+
color: "rgba(0,0,0,0.22)",
|
|
218
|
+
}}
|
|
219
|
+
>
|
|
220
|
+
{text}
|
|
221
|
+
</div>
|
|
222
|
+
{sub && (
|
|
223
|
+
<div style={{ fontSize: 11, color: "rgba(0,0,0,0.14)", marginTop: 2 }}>
|
|
224
|
+
{sub}
|
|
225
|
+
</div>
|
|
226
|
+
)}
|
|
227
|
+
</div>
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function PersonaCard({
|
|
232
|
+
x,
|
|
233
|
+
y,
|
|
234
|
+
name,
|
|
235
|
+
jobTitle,
|
|
236
|
+
avatar,
|
|
237
|
+
traits,
|
|
238
|
+
quote,
|
|
239
|
+
}: {
|
|
240
|
+
x: number;
|
|
241
|
+
y: number;
|
|
242
|
+
name: string;
|
|
243
|
+
jobTitle: string;
|
|
244
|
+
avatar: string;
|
|
245
|
+
traits: string[];
|
|
246
|
+
quote: string;
|
|
247
|
+
}) {
|
|
248
|
+
return (
|
|
249
|
+
<div
|
|
250
|
+
style={{
|
|
251
|
+
position: "absolute",
|
|
252
|
+
left: x,
|
|
253
|
+
top: y,
|
|
254
|
+
width: 220,
|
|
255
|
+
padding: 16,
|
|
256
|
+
borderRadius: 10,
|
|
257
|
+
background: "#fff",
|
|
258
|
+
boxShadow: "0 2px 12px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.05)",
|
|
259
|
+
}}
|
|
260
|
+
>
|
|
261
|
+
<div
|
|
262
|
+
style={{
|
|
263
|
+
display: "flex",
|
|
264
|
+
alignItems: "center",
|
|
265
|
+
gap: 10,
|
|
266
|
+
marginBottom: 10,
|
|
267
|
+
}}
|
|
268
|
+
>
|
|
269
|
+
<div
|
|
270
|
+
style={{
|
|
271
|
+
width: 38,
|
|
272
|
+
height: 38,
|
|
273
|
+
borderRadius: "50%",
|
|
274
|
+
background: avatar,
|
|
275
|
+
display: "flex",
|
|
276
|
+
alignItems: "center",
|
|
277
|
+
justifyContent: "center",
|
|
278
|
+
fontSize: 16,
|
|
279
|
+
color: "#fff",
|
|
280
|
+
fontWeight: 700,
|
|
281
|
+
boxShadow: "0 2px 8px rgba(0,0,0,0.12)",
|
|
282
|
+
}}
|
|
283
|
+
>
|
|
284
|
+
{name[0]}
|
|
285
|
+
</div>
|
|
286
|
+
<div>
|
|
287
|
+
<div style={{ fontSize: 13, fontWeight: 700, color: "#1a1a1a" }}>
|
|
288
|
+
{name}
|
|
289
|
+
</div>
|
|
290
|
+
<div style={{ fontSize: 11, color: "#78909c" }}>{jobTitle}</div>
|
|
291
|
+
</div>
|
|
292
|
+
</div>
|
|
293
|
+
<div
|
|
294
|
+
style={{ display: "flex", gap: 4, flexWrap: "wrap", marginBottom: 8 }}
|
|
295
|
+
>
|
|
296
|
+
{traits.map((t) => (
|
|
297
|
+
<span
|
|
298
|
+
key={t}
|
|
299
|
+
style={{
|
|
300
|
+
padding: "2px 8px",
|
|
301
|
+
borderRadius: 4,
|
|
302
|
+
background: "#f5f5f5",
|
|
303
|
+
fontSize: 10,
|
|
304
|
+
fontWeight: 600,
|
|
305
|
+
color: "#78909c",
|
|
306
|
+
}}
|
|
307
|
+
>
|
|
308
|
+
{t}
|
|
309
|
+
</span>
|
|
310
|
+
))}
|
|
311
|
+
</div>
|
|
312
|
+
<div
|
|
313
|
+
style={{
|
|
314
|
+
fontSize: 11,
|
|
315
|
+
color: "#90a4ae",
|
|
316
|
+
fontStyle: "italic",
|
|
317
|
+
lineHeight: 1.5,
|
|
318
|
+
}}
|
|
319
|
+
>
|
|
320
|
+
"{quote}"
|
|
321
|
+
</div>
|
|
322
|
+
</div>
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
function KanbanColumn({
|
|
327
|
+
title,
|
|
328
|
+
color,
|
|
329
|
+
cards,
|
|
330
|
+
}: {
|
|
331
|
+
title: string;
|
|
332
|
+
color: string;
|
|
333
|
+
cards: { text: string; tag?: string; tagColor?: string }[];
|
|
334
|
+
}) {
|
|
335
|
+
return (
|
|
336
|
+
<div style={{ flex: 1, minWidth: 0 }}>
|
|
337
|
+
<div
|
|
338
|
+
style={{
|
|
339
|
+
fontSize: 11,
|
|
340
|
+
fontWeight: 700,
|
|
341
|
+
color,
|
|
342
|
+
textTransform: "uppercase",
|
|
343
|
+
letterSpacing: "0.05em",
|
|
344
|
+
marginBottom: 8,
|
|
345
|
+
display: "flex",
|
|
346
|
+
alignItems: "center",
|
|
347
|
+
gap: 6,
|
|
348
|
+
}}
|
|
349
|
+
>
|
|
350
|
+
<span
|
|
351
|
+
style={{
|
|
352
|
+
width: 6,
|
|
353
|
+
height: 6,
|
|
354
|
+
borderRadius: "50%",
|
|
355
|
+
background: color,
|
|
356
|
+
}}
|
|
357
|
+
/>
|
|
358
|
+
{title}
|
|
359
|
+
<span style={{ fontSize: 10, color: "#b0bec5", fontWeight: 500 }}>
|
|
360
|
+
{cards.length}
|
|
361
|
+
</span>
|
|
362
|
+
</div>
|
|
363
|
+
<div style={{ display: "flex", flexDirection: "column", gap: 6 }}>
|
|
364
|
+
{cards.map((c) => (
|
|
365
|
+
<div
|
|
366
|
+
key={c.text}
|
|
367
|
+
style={{
|
|
368
|
+
padding: "8px 10px",
|
|
369
|
+
borderRadius: 6,
|
|
370
|
+
background: "#fafbfc",
|
|
371
|
+
border: "1px solid rgba(0,0,0,0.05)",
|
|
372
|
+
fontSize: 11,
|
|
373
|
+
fontWeight: 500,
|
|
374
|
+
color: "#37474f",
|
|
375
|
+
lineHeight: 1.4,
|
|
376
|
+
}}
|
|
377
|
+
>
|
|
378
|
+
{c.text}
|
|
379
|
+
{c.tag && (
|
|
380
|
+
<span
|
|
381
|
+
style={{
|
|
382
|
+
display: "inline-block",
|
|
383
|
+
marginTop: 4,
|
|
384
|
+
padding: "1px 6px",
|
|
385
|
+
borderRadius: 3,
|
|
386
|
+
background: c.tagColor ?? "#e8eaf6",
|
|
387
|
+
fontSize: 9,
|
|
388
|
+
fontWeight: 700,
|
|
389
|
+
color: "#5c6bc0",
|
|
390
|
+
}}
|
|
391
|
+
>
|
|
392
|
+
{c.tag}
|
|
393
|
+
</span>
|
|
394
|
+
)}
|
|
395
|
+
</div>
|
|
396
|
+
))}
|
|
397
|
+
</div>
|
|
398
|
+
</div>
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
function WireframeBlock({
|
|
403
|
+
x,
|
|
404
|
+
y,
|
|
405
|
+
w,
|
|
406
|
+
h,
|
|
407
|
+
}: {
|
|
408
|
+
x: number;
|
|
409
|
+
y: number;
|
|
410
|
+
w: number;
|
|
411
|
+
h: number;
|
|
412
|
+
}) {
|
|
413
|
+
return (
|
|
414
|
+
<div
|
|
415
|
+
style={{
|
|
416
|
+
position: "absolute",
|
|
417
|
+
left: x,
|
|
418
|
+
top: y,
|
|
419
|
+
width: w,
|
|
420
|
+
height: h,
|
|
421
|
+
padding: 12,
|
|
422
|
+
borderRadius: 8,
|
|
423
|
+
background: "#fafafa",
|
|
424
|
+
border: "1.5px dashed rgba(0,0,0,0.08)",
|
|
425
|
+
}}
|
|
426
|
+
>
|
|
427
|
+
{/* Nav bar */}
|
|
428
|
+
<div style={{ display: "flex", gap: 6, marginBottom: 10 }}>
|
|
429
|
+
<div
|
|
430
|
+
style={{
|
|
431
|
+
width: 40,
|
|
432
|
+
height: 6,
|
|
433
|
+
borderRadius: 3,
|
|
434
|
+
background: "#e0e0e0",
|
|
435
|
+
}}
|
|
436
|
+
/>
|
|
437
|
+
<div style={{ flex: 1 }} />
|
|
438
|
+
{[1, 2, 3].map((n) => (
|
|
439
|
+
<div
|
|
440
|
+
key={n}
|
|
441
|
+
style={{
|
|
442
|
+
width: 24,
|
|
443
|
+
height: 6,
|
|
444
|
+
borderRadius: 3,
|
|
445
|
+
background: "#e8e8e8",
|
|
446
|
+
}}
|
|
447
|
+
/>
|
|
448
|
+
))}
|
|
449
|
+
</div>
|
|
450
|
+
{/* Hero */}
|
|
451
|
+
<div
|
|
452
|
+
style={{
|
|
453
|
+
height: h * 0.35,
|
|
454
|
+
borderRadius: 6,
|
|
455
|
+
background: "linear-gradient(135deg, #e3f2fd, #ede7f6)",
|
|
456
|
+
marginBottom: 8,
|
|
457
|
+
display: "flex",
|
|
458
|
+
alignItems: "center",
|
|
459
|
+
justifyContent: "center",
|
|
460
|
+
}}
|
|
461
|
+
>
|
|
462
|
+
<div
|
|
463
|
+
style={{
|
|
464
|
+
width: "60%",
|
|
465
|
+
height: 6,
|
|
466
|
+
borderRadius: 3,
|
|
467
|
+
background: "rgba(0,0,0,0.06)",
|
|
468
|
+
}}
|
|
469
|
+
/>
|
|
470
|
+
</div>
|
|
471
|
+
{/* Grid */}
|
|
472
|
+
<div style={{ display: "flex", gap: 6 }}>
|
|
473
|
+
{[1, 2, 3].map((n) => (
|
|
474
|
+
<div
|
|
475
|
+
key={n}
|
|
476
|
+
style={{
|
|
477
|
+
flex: 1,
|
|
478
|
+
height: h * 0.2,
|
|
479
|
+
borderRadius: 4,
|
|
480
|
+
background: n === 2 ? "#f3e5f5" : "#f5f5f5",
|
|
481
|
+
border: "1px solid rgba(0,0,0,0.04)",
|
|
482
|
+
}}
|
|
483
|
+
/>
|
|
484
|
+
))}
|
|
485
|
+
</div>
|
|
486
|
+
</div>
|
|
487
|
+
);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
function RemoteCursor({
|
|
491
|
+
x,
|
|
492
|
+
y,
|
|
493
|
+
name,
|
|
494
|
+
color,
|
|
495
|
+
}: {
|
|
496
|
+
x: number;
|
|
497
|
+
y: number;
|
|
498
|
+
name: string;
|
|
499
|
+
color: string;
|
|
500
|
+
}) {
|
|
501
|
+
return (
|
|
502
|
+
<div
|
|
503
|
+
style={{
|
|
504
|
+
position: "absolute",
|
|
505
|
+
left: x,
|
|
506
|
+
top: y,
|
|
507
|
+
pointerEvents: "none",
|
|
508
|
+
zIndex: 20,
|
|
509
|
+
}}
|
|
510
|
+
>
|
|
511
|
+
<svg width="16" height="20" viewBox="0 0 16 20" fill="none">
|
|
512
|
+
<path
|
|
513
|
+
d="M1 1L6 18L8.5 10.5L15 8L1 1Z"
|
|
514
|
+
fill={color}
|
|
515
|
+
stroke="#fff"
|
|
516
|
+
strokeWidth="1.5"
|
|
517
|
+
/>
|
|
518
|
+
</svg>
|
|
519
|
+
<span
|
|
520
|
+
style={{
|
|
521
|
+
display: "inline-block",
|
|
522
|
+
marginLeft: 12,
|
|
523
|
+
marginTop: -2,
|
|
524
|
+
padding: "2px 8px",
|
|
525
|
+
borderRadius: 4,
|
|
526
|
+
background: color,
|
|
527
|
+
fontSize: 10,
|
|
528
|
+
fontWeight: 700,
|
|
529
|
+
color: "#fff",
|
|
530
|
+
whiteSpace: "nowrap",
|
|
531
|
+
boxShadow: "0 2px 6px rgba(0,0,0,0.15)",
|
|
532
|
+
}}
|
|
533
|
+
>
|
|
534
|
+
{name}
|
|
535
|
+
</span>
|
|
536
|
+
</div>
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/* ── Board ─────────────────────────────────────────────────── */
|
|
541
|
+
|
|
542
|
+
function MiroBoard() {
|
|
543
|
+
return (
|
|
544
|
+
<div style={canvasBase}>
|
|
545
|
+
{/* ── Section 1: Brainstorm ────────────────────────── */}
|
|
546
|
+
<SectionLabel
|
|
547
|
+
x={120}
|
|
548
|
+
y={100}
|
|
549
|
+
text="Brainstorm"
|
|
550
|
+
sub="Sprint 14 kick-off"
|
|
551
|
+
/>
|
|
552
|
+
|
|
553
|
+
<Sticky
|
|
554
|
+
x={140}
|
|
555
|
+
y={180}
|
|
556
|
+
w={240}
|
|
557
|
+
h={170}
|
|
558
|
+
bg="#fff59d"
|
|
559
|
+
rot={-2}
|
|
560
|
+
title="🔥 Pain points"
|
|
561
|
+
body="Checkout drops off 34% on mobile — form fields are too small and load time > 3s."
|
|
562
|
+
votes={["#ef5350", "#42a5f5", "#66bb6a"]}
|
|
563
|
+
emoji="👍"
|
|
564
|
+
/>
|
|
565
|
+
<Sticky
|
|
566
|
+
x={410}
|
|
567
|
+
y={220}
|
|
568
|
+
w={220}
|
|
569
|
+
h={155}
|
|
570
|
+
bg="#ffccbc"
|
|
571
|
+
rot={1.5}
|
|
572
|
+
title="Competitor scan"
|
|
573
|
+
body="Notion's onboarding: 3 steps. FigJam: instant canvas. We need < 2 clicks."
|
|
574
|
+
votes={["#7e57c2"]}
|
|
575
|
+
emoji=""
|
|
576
|
+
/>
|
|
577
|
+
<Sticky
|
|
578
|
+
x={140}
|
|
579
|
+
y={420}
|
|
580
|
+
w={230}
|
|
581
|
+
h={165}
|
|
582
|
+
bg="#c5e1a5"
|
|
583
|
+
rot={-1}
|
|
584
|
+
title="Next sprint"
|
|
585
|
+
body="Prototype sticky grid + keyboard panning. Ship velocity story."
|
|
586
|
+
votes={[]}
|
|
587
|
+
emoji="🚀"
|
|
588
|
+
/>
|
|
589
|
+
<Sticky
|
|
590
|
+
x={400}
|
|
591
|
+
y={440}
|
|
592
|
+
w={215}
|
|
593
|
+
h={150}
|
|
594
|
+
bg="#b3e5fc"
|
|
595
|
+
rot={2.5}
|
|
596
|
+
title="Tech debt"
|
|
597
|
+
body="Remove legacy transform fallback. Migrate tests to vitest."
|
|
598
|
+
votes={["#ef5350", "#ff7043"]}
|
|
599
|
+
emoji="⚠️"
|
|
600
|
+
/>
|
|
601
|
+
<Sticky
|
|
602
|
+
x={260}
|
|
603
|
+
y={640}
|
|
604
|
+
w={250}
|
|
605
|
+
h={140}
|
|
606
|
+
bg="#f8bbd0"
|
|
607
|
+
rot={-0.5}
|
|
608
|
+
title="Quick wins"
|
|
609
|
+
body="Add double-tap reset, improve trackpad detection on Firefox."
|
|
610
|
+
votes={[]}
|
|
611
|
+
emoji="✨"
|
|
612
|
+
/>
|
|
613
|
+
|
|
614
|
+
{/* ── Section 2: Research ──────────────────────────── */}
|
|
615
|
+
<SectionLabel x={720} y={100} text="User Research" sub="Q2 interviews" />
|
|
616
|
+
|
|
617
|
+
<Frame x={720} y={160} w={640} h={680} title="Personas" accent="#26a69a">
|
|
618
|
+
<PersonaCard
|
|
619
|
+
x={24}
|
|
620
|
+
y={16}
|
|
621
|
+
name="Sarah Chen"
|
|
622
|
+
jobTitle="Product Designer"
|
|
623
|
+
avatar="linear-gradient(135deg, #26a69a, #00897b)"
|
|
624
|
+
traits={["Figma power user", "Remote", "IC"]}
|
|
625
|
+
quote="I need zoom-to-element to present specific frames during reviews."
|
|
626
|
+
/>
|
|
627
|
+
<PersonaCard
|
|
628
|
+
x={280}
|
|
629
|
+
y={16}
|
|
630
|
+
name="Alex Rivera"
|
|
631
|
+
jobTitle="Engineering Lead"
|
|
632
|
+
avatar="linear-gradient(135deg, #5c6bc0, #3949ab)"
|
|
633
|
+
traits={["React", "Performance", "Mobile"]}
|
|
634
|
+
quote="The library must handle 10k nodes without jank."
|
|
635
|
+
/>
|
|
636
|
+
<PersonaCard
|
|
637
|
+
x={24}
|
|
638
|
+
y={260}
|
|
639
|
+
name="Mika Patel"
|
|
640
|
+
jobTitle="Event Coordinator"
|
|
641
|
+
avatar="linear-gradient(135deg, #ef5350, #d32f2f)"
|
|
642
|
+
traits={["Non-technical", "iPad", "Venue maps"]}
|
|
643
|
+
quote="I just need to tap a seat and it zooms in. That's it."
|
|
644
|
+
/>
|
|
645
|
+
<PersonaCard
|
|
646
|
+
x={280}
|
|
647
|
+
y={260}
|
|
648
|
+
name="Jordan Lee"
|
|
649
|
+
jobTitle="Data Analyst"
|
|
650
|
+
avatar="linear-gradient(135deg, #ff9800, #f57c00)"
|
|
651
|
+
traits={["Dashboards", "Chrome", "Accessibility"]}
|
|
652
|
+
quote="Keyboard navigation is non-negotiable for our team."
|
|
653
|
+
/>
|
|
654
|
+
<div style={{ position: "absolute", left: 24, bottom: 16, right: 24 }}>
|
|
655
|
+
<div style={{ display: "flex", gap: 8 }}>
|
|
656
|
+
{["Pain points", "Goals", "Behaviors", "Frustrations"].map(
|
|
657
|
+
(label) => (
|
|
658
|
+
<div
|
|
659
|
+
key={label}
|
|
660
|
+
style={{
|
|
661
|
+
flex: 1,
|
|
662
|
+
padding: "6px 8px",
|
|
663
|
+
borderRadius: 6,
|
|
664
|
+
background: "#f0fdf4",
|
|
665
|
+
textAlign: "center",
|
|
666
|
+
fontSize: 10,
|
|
667
|
+
fontWeight: 600,
|
|
668
|
+
color: "#26a69a",
|
|
669
|
+
}}
|
|
670
|
+
>
|
|
671
|
+
{label}
|
|
672
|
+
</div>
|
|
673
|
+
),
|
|
674
|
+
)}
|
|
675
|
+
</div>
|
|
676
|
+
</div>
|
|
677
|
+
</Frame>
|
|
678
|
+
|
|
679
|
+
{/* ── Section 3: Journey Map ───────────────────────── */}
|
|
680
|
+
<SectionLabel
|
|
681
|
+
x={1440}
|
|
682
|
+
y={100}
|
|
683
|
+
text="Journey Map"
|
|
684
|
+
sub="Onboarding flow v2"
|
|
685
|
+
/>
|
|
686
|
+
|
|
687
|
+
<Frame
|
|
688
|
+
x={1440}
|
|
689
|
+
y={160}
|
|
690
|
+
w={1160}
|
|
691
|
+
h={420}
|
|
692
|
+
title="User onboarding"
|
|
693
|
+
accent="#7e57c2"
|
|
694
|
+
>
|
|
695
|
+
<div style={{ padding: "24px 32px" }}>
|
|
696
|
+
<div style={{ display: "flex", alignItems: "flex-start", gap: 0 }}>
|
|
697
|
+
{[
|
|
698
|
+
{
|
|
699
|
+
step: "Sign up",
|
|
700
|
+
emotion: "😊",
|
|
701
|
+
desc: "Quick OAuth flow",
|
|
702
|
+
metric: "92% complete",
|
|
703
|
+
bg: "#ede7f6",
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
step: "First board",
|
|
707
|
+
emotion: "🤔",
|
|
708
|
+
desc: "Blank canvas confusion",
|
|
709
|
+
metric: "61% drop-off",
|
|
710
|
+
bg: "#fce4ec",
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
step: "Add content",
|
|
714
|
+
emotion: "😐",
|
|
715
|
+
desc: "Toolbar discovery",
|
|
716
|
+
metric: "45% use stickies",
|
|
717
|
+
bg: "#fff3e0",
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
step: "Collaborate",
|
|
721
|
+
emotion: "😊",
|
|
722
|
+
desc: "Share link works well",
|
|
723
|
+
metric: "78% invite 1+",
|
|
724
|
+
bg: "#e8f5e9",
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
step: "Return",
|
|
728
|
+
emotion: "😍",
|
|
729
|
+
desc: "Template gallery helps",
|
|
730
|
+
metric: "38% D7 retention",
|
|
731
|
+
bg: "#e3f2fd",
|
|
732
|
+
},
|
|
733
|
+
].map((s, i, arr) => (
|
|
734
|
+
<React.Fragment key={s.step}>
|
|
735
|
+
<div style={{ flex: 1, textAlign: "center" }}>
|
|
736
|
+
<div
|
|
737
|
+
style={{
|
|
738
|
+
width: 48,
|
|
739
|
+
height: 48,
|
|
740
|
+
borderRadius: "50%",
|
|
741
|
+
background: s.bg,
|
|
742
|
+
margin: "0 auto 8px",
|
|
743
|
+
display: "flex",
|
|
744
|
+
alignItems: "center",
|
|
745
|
+
justifyContent: "center",
|
|
746
|
+
fontSize: 22,
|
|
747
|
+
boxShadow: "0 2px 8px rgba(0,0,0,0.06)",
|
|
748
|
+
}}
|
|
749
|
+
>
|
|
750
|
+
{s.emotion}
|
|
751
|
+
</div>
|
|
752
|
+
<div
|
|
753
|
+
style={{
|
|
754
|
+
fontSize: 13,
|
|
755
|
+
fontWeight: 700,
|
|
756
|
+
color: "#263238",
|
|
757
|
+
marginBottom: 4,
|
|
758
|
+
}}
|
|
759
|
+
>
|
|
760
|
+
{s.step}
|
|
761
|
+
</div>
|
|
762
|
+
<div
|
|
763
|
+
style={{
|
|
764
|
+
fontSize: 11,
|
|
765
|
+
color: "#78909c",
|
|
766
|
+
lineHeight: 1.4,
|
|
767
|
+
marginBottom: 6,
|
|
768
|
+
}}
|
|
769
|
+
>
|
|
770
|
+
{s.desc}
|
|
771
|
+
</div>
|
|
772
|
+
<div
|
|
773
|
+
style={{
|
|
774
|
+
display: "inline-block",
|
|
775
|
+
padding: "2px 8px",
|
|
776
|
+
borderRadius: 4,
|
|
777
|
+
background: s.bg,
|
|
778
|
+
fontSize: 10,
|
|
779
|
+
fontWeight: 700,
|
|
780
|
+
color: "#546e7a",
|
|
781
|
+
}}
|
|
782
|
+
>
|
|
783
|
+
{s.metric}
|
|
784
|
+
</div>
|
|
785
|
+
</div>
|
|
786
|
+
{i < arr.length - 1 && (
|
|
787
|
+
<div
|
|
788
|
+
style={{
|
|
789
|
+
width: 40,
|
|
790
|
+
flexShrink: 0,
|
|
791
|
+
display: "flex",
|
|
792
|
+
alignItems: "center",
|
|
793
|
+
justifyContent: "center",
|
|
794
|
+
paddingTop: 18,
|
|
795
|
+
}}
|
|
796
|
+
>
|
|
797
|
+
<div
|
|
798
|
+
style={{
|
|
799
|
+
width: 28,
|
|
800
|
+
height: 2,
|
|
801
|
+
background: "#b0bec5",
|
|
802
|
+
position: "relative",
|
|
803
|
+
}}
|
|
804
|
+
>
|
|
805
|
+
<div
|
|
806
|
+
style={{
|
|
807
|
+
position: "absolute",
|
|
808
|
+
right: -3,
|
|
809
|
+
top: -3,
|
|
810
|
+
width: 0,
|
|
811
|
+
height: 0,
|
|
812
|
+
borderTop: "4px solid transparent",
|
|
813
|
+
borderBottom: "4px solid transparent",
|
|
814
|
+
borderLeft: "6px solid #b0bec5",
|
|
815
|
+
}}
|
|
816
|
+
/>
|
|
817
|
+
</div>
|
|
818
|
+
</div>
|
|
819
|
+
)}
|
|
820
|
+
</React.Fragment>
|
|
821
|
+
))}
|
|
822
|
+
</div>
|
|
823
|
+
{/* Opportunity row */}
|
|
824
|
+
<div
|
|
825
|
+
style={{
|
|
826
|
+
marginTop: 20,
|
|
827
|
+
padding: "10px 16px",
|
|
828
|
+
borderRadius: 8,
|
|
829
|
+
background: "#faf9ff",
|
|
830
|
+
border: "1px dashed rgba(126,87,194,0.2)",
|
|
831
|
+
display: "flex",
|
|
832
|
+
alignItems: "center",
|
|
833
|
+
gap: 8,
|
|
834
|
+
}}
|
|
835
|
+
>
|
|
836
|
+
<span style={{ fontSize: 14 }}>💡</span>
|
|
837
|
+
<span style={{ fontSize: 12, color: "#5c6bc0", fontWeight: 600 }}>
|
|
838
|
+
Biggest opportunity: guided first-board experience reduces
|
|
839
|
+
drop-off by ~25%
|
|
840
|
+
</span>
|
|
841
|
+
</div>
|
|
842
|
+
</div>
|
|
843
|
+
</Frame>
|
|
844
|
+
|
|
845
|
+
{/* ── Section 4: Kanban ────────────────────────────── */}
|
|
846
|
+
<SectionLabel x={720} y={900} text="Sprint Board" sub="Week 3 of 4" />
|
|
847
|
+
|
|
848
|
+
<Frame
|
|
849
|
+
x={720}
|
|
850
|
+
y={960}
|
|
851
|
+
w={880}
|
|
852
|
+
h={440}
|
|
853
|
+
title="Sprint 14 · In progress"
|
|
854
|
+
accent="#ff7043"
|
|
855
|
+
>
|
|
856
|
+
<div
|
|
857
|
+
style={{
|
|
858
|
+
display: "flex",
|
|
859
|
+
gap: 14,
|
|
860
|
+
padding: "12px 14px",
|
|
861
|
+
height: "100%",
|
|
862
|
+
}}
|
|
863
|
+
>
|
|
864
|
+
<KanbanColumn
|
|
865
|
+
title="Todo"
|
|
866
|
+
color="#90a4ae"
|
|
867
|
+
cards={[
|
|
868
|
+
{
|
|
869
|
+
text: "Keyboard arrow-key panning",
|
|
870
|
+
tag: "feat",
|
|
871
|
+
tagColor: "#e8eaf6",
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
text: "Safari pinch regression",
|
|
875
|
+
tag: "bug",
|
|
876
|
+
tagColor: "#fce4ec",
|
|
877
|
+
},
|
|
878
|
+
{ text: "Docs: migration guide v4" },
|
|
879
|
+
]}
|
|
880
|
+
/>
|
|
881
|
+
<KanbanColumn
|
|
882
|
+
title="In progress"
|
|
883
|
+
color="#42a5f5"
|
|
884
|
+
cards={[
|
|
885
|
+
{
|
|
886
|
+
text: "Infinite canvas background",
|
|
887
|
+
tag: "feat",
|
|
888
|
+
tagColor: "#e8eaf6",
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
text: "Velocity animation refactor",
|
|
892
|
+
tag: "perf",
|
|
893
|
+
tagColor: "#fff3e0",
|
|
894
|
+
},
|
|
895
|
+
]}
|
|
896
|
+
/>
|
|
897
|
+
<KanbanColumn
|
|
898
|
+
title="Review"
|
|
899
|
+
color="#ab47bc"
|
|
900
|
+
cards={[
|
|
901
|
+
{
|
|
902
|
+
text: "KeepScale observer cleanup",
|
|
903
|
+
tag: "fix",
|
|
904
|
+
tagColor: "#fce4ec",
|
|
905
|
+
},
|
|
906
|
+
]}
|
|
907
|
+
/>
|
|
908
|
+
<KanbanColumn
|
|
909
|
+
title="Done"
|
|
910
|
+
color="#66bb6a"
|
|
911
|
+
cards={[
|
|
912
|
+
{
|
|
913
|
+
text: "MiniMap custom classNames",
|
|
914
|
+
tag: "feat",
|
|
915
|
+
tagColor: "#e8eaf6",
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
text: "Stadium example perf",
|
|
919
|
+
tag: "perf",
|
|
920
|
+
tagColor: "#fff3e0",
|
|
921
|
+
},
|
|
922
|
+
{ text: "Product card example" },
|
|
923
|
+
]}
|
|
924
|
+
/>
|
|
925
|
+
</div>
|
|
926
|
+
</Frame>
|
|
927
|
+
|
|
928
|
+
{/* ── Section 5: Wireframes ────────────────────────── */}
|
|
929
|
+
<SectionLabel x={1700} y={640} text="Wireframes" sub="Homepage v3" />
|
|
930
|
+
|
|
931
|
+
<Frame
|
|
932
|
+
x={1700}
|
|
933
|
+
y={700}
|
|
934
|
+
w={540}
|
|
935
|
+
h={460}
|
|
936
|
+
title="Landing page"
|
|
937
|
+
accent="#42a5f5"
|
|
938
|
+
>
|
|
939
|
+
<WireframeBlock x={20} y={12} w={480} h={400} />
|
|
940
|
+
</Frame>
|
|
941
|
+
|
|
942
|
+
<Frame
|
|
943
|
+
x={2300}
|
|
944
|
+
y={700}
|
|
945
|
+
w={540}
|
|
946
|
+
h={460}
|
|
947
|
+
title="Dashboard"
|
|
948
|
+
accent="#ef5350"
|
|
949
|
+
>
|
|
950
|
+
<div
|
|
951
|
+
style={{
|
|
952
|
+
position: "absolute",
|
|
953
|
+
left: 20,
|
|
954
|
+
top: 12,
|
|
955
|
+
right: 20,
|
|
956
|
+
bottom: 12,
|
|
957
|
+
padding: 12,
|
|
958
|
+
borderRadius: 8,
|
|
959
|
+
background: "#fafafa",
|
|
960
|
+
border: "1.5px dashed rgba(0,0,0,0.06)",
|
|
961
|
+
}}
|
|
962
|
+
>
|
|
963
|
+
{/* Sidebar */}
|
|
964
|
+
<div
|
|
965
|
+
style={{
|
|
966
|
+
position: "absolute",
|
|
967
|
+
left: 0,
|
|
968
|
+
top: 0,
|
|
969
|
+
bottom: 0,
|
|
970
|
+
width: 50,
|
|
971
|
+
background: "#263238",
|
|
972
|
+
borderRadius: "8px 0 0 8px",
|
|
973
|
+
}}
|
|
974
|
+
>
|
|
975
|
+
{[0, 1, 2, 3].map((n) => (
|
|
976
|
+
<div
|
|
977
|
+
key={n}
|
|
978
|
+
style={{
|
|
979
|
+
width: 22,
|
|
980
|
+
height: 22,
|
|
981
|
+
borderRadius: 4,
|
|
982
|
+
background:
|
|
983
|
+
n === 0
|
|
984
|
+
? "rgba(255,255,255,0.2)"
|
|
985
|
+
: "rgba(255,255,255,0.06)",
|
|
986
|
+
margin: "10px auto 0",
|
|
987
|
+
}}
|
|
988
|
+
/>
|
|
989
|
+
))}
|
|
990
|
+
</div>
|
|
991
|
+
{/* Content */}
|
|
992
|
+
<div style={{ marginLeft: 60 }}>
|
|
993
|
+
<div style={{ display: "flex", gap: 6, marginBottom: 10 }}>
|
|
994
|
+
{[1, 2, 3, 4].map((n) => (
|
|
995
|
+
<div
|
|
996
|
+
key={n}
|
|
997
|
+
style={{
|
|
998
|
+
flex: 1,
|
|
999
|
+
height: 60,
|
|
1000
|
+
borderRadius: 6,
|
|
1001
|
+
background:
|
|
1002
|
+
(
|
|
1003
|
+
{ 1: "#e3f2fd", 2: "#fce4ec", 3: "#e8f5e9" } as Record<
|
|
1004
|
+
number,
|
|
1005
|
+
string
|
|
1006
|
+
>
|
|
1007
|
+
)[n] ?? "#fff3e0",
|
|
1008
|
+
border: "1px solid rgba(0,0,0,0.04)",
|
|
1009
|
+
}}
|
|
1010
|
+
>
|
|
1011
|
+
<div
|
|
1012
|
+
style={{
|
|
1013
|
+
padding: "8px",
|
|
1014
|
+
fontSize: 8,
|
|
1015
|
+
color: "#78909c",
|
|
1016
|
+
fontWeight: 700,
|
|
1017
|
+
}}
|
|
1018
|
+
>
|
|
1019
|
+
{["Users", "Revenue", "Sessions", "NPS"][n - 1]}
|
|
1020
|
+
</div>
|
|
1021
|
+
<div
|
|
1022
|
+
style={{
|
|
1023
|
+
padding: "0 8px",
|
|
1024
|
+
fontSize: 14,
|
|
1025
|
+
fontWeight: 800,
|
|
1026
|
+
color: "#263238",
|
|
1027
|
+
}}
|
|
1028
|
+
>
|
|
1029
|
+
{["12.4k", "$84k", "3.2m", "72"][n - 1]}
|
|
1030
|
+
</div>
|
|
1031
|
+
</div>
|
|
1032
|
+
))}
|
|
1033
|
+
</div>
|
|
1034
|
+
{/* Chart placeholder */}
|
|
1035
|
+
<div
|
|
1036
|
+
style={{
|
|
1037
|
+
height: 120,
|
|
1038
|
+
borderRadius: 6,
|
|
1039
|
+
background: "#fafbfc",
|
|
1040
|
+
border: "1px solid rgba(0,0,0,0.04)",
|
|
1041
|
+
display: "flex",
|
|
1042
|
+
alignItems: "flex-end",
|
|
1043
|
+
padding: "8px 12px",
|
|
1044
|
+
gap: 8,
|
|
1045
|
+
}}
|
|
1046
|
+
>
|
|
1047
|
+
{[65, 45, 80, 55, 90, 70, 85, 60, 95, 75, 88, 72].map((h, i) => (
|
|
1048
|
+
<div
|
|
1049
|
+
key={h}
|
|
1050
|
+
style={{
|
|
1051
|
+
flex: 1,
|
|
1052
|
+
height: `${h}%`,
|
|
1053
|
+
borderRadius: "3px 3px 0 0",
|
|
1054
|
+
background:
|
|
1055
|
+
i >= 10
|
|
1056
|
+
? "#e3f2fd"
|
|
1057
|
+
: `rgba(66, 165, 245, ${0.2 + (h / 100) * 0.6})`,
|
|
1058
|
+
}}
|
|
1059
|
+
/>
|
|
1060
|
+
))}
|
|
1061
|
+
</div>
|
|
1062
|
+
<div style={{ display: "flex", gap: 6, marginTop: 8 }}>
|
|
1063
|
+
{[1, 2].map((n) => (
|
|
1064
|
+
<div
|
|
1065
|
+
key={n}
|
|
1066
|
+
style={{
|
|
1067
|
+
flex: 1,
|
|
1068
|
+
height: 50,
|
|
1069
|
+
borderRadius: 6,
|
|
1070
|
+
background: "#fafbfc",
|
|
1071
|
+
border: "1px solid rgba(0,0,0,0.04)",
|
|
1072
|
+
}}
|
|
1073
|
+
/>
|
|
1074
|
+
))}
|
|
1075
|
+
</div>
|
|
1076
|
+
</div>
|
|
1077
|
+
</div>
|
|
1078
|
+
</Frame>
|
|
1079
|
+
|
|
1080
|
+
{/* ── Section 6: Metrics ───────────────────────────── */}
|
|
1081
|
+
<SectionLabel x={1700} y={1220} text="Key Metrics" sub="Week over week" />
|
|
1082
|
+
|
|
1083
|
+
<Frame
|
|
1084
|
+
x={1700}
|
|
1085
|
+
y={1280}
|
|
1086
|
+
w={500}
|
|
1087
|
+
h={300}
|
|
1088
|
+
title="Performance"
|
|
1089
|
+
accent="#66bb6a"
|
|
1090
|
+
>
|
|
1091
|
+
<div style={{ padding: 16, display: "flex", gap: 12 }}>
|
|
1092
|
+
{[
|
|
1093
|
+
{ label: "LCP", value: "1.2s", delta: "-18%", good: true },
|
|
1094
|
+
{ label: "FID", value: "42ms", delta: "-12%", good: true },
|
|
1095
|
+
{ label: "CLS", value: "0.04", delta: "+2%", good: false },
|
|
1096
|
+
{ label: "Bundle", value: "14kb", delta: "—", good: true },
|
|
1097
|
+
].map((m) => (
|
|
1098
|
+
<div
|
|
1099
|
+
key={m.label}
|
|
1100
|
+
style={{
|
|
1101
|
+
flex: 1,
|
|
1102
|
+
padding: 12,
|
|
1103
|
+
borderRadius: 8,
|
|
1104
|
+
background: "#fafbfc",
|
|
1105
|
+
border: "1px solid rgba(0,0,0,0.04)",
|
|
1106
|
+
textAlign: "center",
|
|
1107
|
+
}}
|
|
1108
|
+
>
|
|
1109
|
+
<div
|
|
1110
|
+
style={{
|
|
1111
|
+
fontSize: 10,
|
|
1112
|
+
fontWeight: 700,
|
|
1113
|
+
color: "#90a4ae",
|
|
1114
|
+
textTransform: "uppercase",
|
|
1115
|
+
letterSpacing: "0.05em",
|
|
1116
|
+
marginBottom: 6,
|
|
1117
|
+
}}
|
|
1118
|
+
>
|
|
1119
|
+
{m.label}
|
|
1120
|
+
</div>
|
|
1121
|
+
<div
|
|
1122
|
+
style={{
|
|
1123
|
+
fontSize: 20,
|
|
1124
|
+
fontWeight: 800,
|
|
1125
|
+
color: "#263238",
|
|
1126
|
+
marginBottom: 4,
|
|
1127
|
+
}}
|
|
1128
|
+
>
|
|
1129
|
+
{m.value}
|
|
1130
|
+
</div>
|
|
1131
|
+
<div
|
|
1132
|
+
style={{
|
|
1133
|
+
fontSize: 11,
|
|
1134
|
+
fontWeight: 700,
|
|
1135
|
+
color: m.good ? "#43a047" : "#e53935",
|
|
1136
|
+
}}
|
|
1137
|
+
>
|
|
1138
|
+
{m.delta}
|
|
1139
|
+
</div>
|
|
1140
|
+
</div>
|
|
1141
|
+
))}
|
|
1142
|
+
</div>
|
|
1143
|
+
<div style={{ padding: "0 16px 12px", display: "flex", gap: 8 }}>
|
|
1144
|
+
<div
|
|
1145
|
+
style={{
|
|
1146
|
+
flex: 2,
|
|
1147
|
+
height: 80,
|
|
1148
|
+
borderRadius: 6,
|
|
1149
|
+
background: "#f1f8e9",
|
|
1150
|
+
border: "1px solid rgba(0,0,0,0.03)",
|
|
1151
|
+
}}
|
|
1152
|
+
/>
|
|
1153
|
+
<div
|
|
1154
|
+
style={{
|
|
1155
|
+
flex: 1,
|
|
1156
|
+
height: 80,
|
|
1157
|
+
borderRadius: 6,
|
|
1158
|
+
background: "#fff3e0",
|
|
1159
|
+
border: "1px solid rgba(0,0,0,0.03)",
|
|
1160
|
+
}}
|
|
1161
|
+
/>
|
|
1162
|
+
</div>
|
|
1163
|
+
</Frame>
|
|
1164
|
+
|
|
1165
|
+
{/* ── Loose stickies ───────────────────────────────── */}
|
|
1166
|
+
<Sticky
|
|
1167
|
+
x={120}
|
|
1168
|
+
y={840}
|
|
1169
|
+
w={260}
|
|
1170
|
+
h={160}
|
|
1171
|
+
bg="#ffe082"
|
|
1172
|
+
rot={2.2}
|
|
1173
|
+
title="🚀 Ship checklist"
|
|
1174
|
+
body="Docs · Storybook · regression on wheel + trackpad split · changelog."
|
|
1175
|
+
votes={["#5c6bc0", "#26a69a"]}
|
|
1176
|
+
emoji=""
|
|
1177
|
+
/>
|
|
1178
|
+
<Sticky
|
|
1179
|
+
x={380}
|
|
1180
|
+
y={880}
|
|
1181
|
+
w={230}
|
|
1182
|
+
h={140}
|
|
1183
|
+
bg="#b2dfdb"
|
|
1184
|
+
rot={-1.5}
|
|
1185
|
+
title="📊 Analytics"
|
|
1186
|
+
body="Track zoom/pan gesture frequency for UX insights."
|
|
1187
|
+
votes={[]}
|
|
1188
|
+
emoji="📈"
|
|
1189
|
+
/>
|
|
1190
|
+
|
|
1191
|
+
{/* ── Connector arrows (SVG) ───────────────────────── */}
|
|
1192
|
+
<svg
|
|
1193
|
+
width={CANVAS_W}
|
|
1194
|
+
height={CANVAS_H}
|
|
1195
|
+
style={{ position: "absolute", left: 0, top: 0, pointerEvents: "none" }}
|
|
1196
|
+
aria-hidden
|
|
1197
|
+
>
|
|
1198
|
+
<defs>
|
|
1199
|
+
<marker
|
|
1200
|
+
id="arrow-end"
|
|
1201
|
+
markerWidth="8"
|
|
1202
|
+
markerHeight="8"
|
|
1203
|
+
refX="7"
|
|
1204
|
+
refY="4"
|
|
1205
|
+
orient="auto"
|
|
1206
|
+
>
|
|
1207
|
+
<path d="M0,0 L8,4 L0,8 L2,4 Z" fill="#90a4ae" />
|
|
1208
|
+
</marker>
|
|
1209
|
+
<marker
|
|
1210
|
+
id="arrow-purple"
|
|
1211
|
+
markerWidth="8"
|
|
1212
|
+
markerHeight="8"
|
|
1213
|
+
refX="7"
|
|
1214
|
+
refY="4"
|
|
1215
|
+
orient="auto"
|
|
1216
|
+
>
|
|
1217
|
+
<path d="M0,0 L8,4 L0,8 L2,4 Z" fill="#7e57c2" />
|
|
1218
|
+
</marker>
|
|
1219
|
+
</defs>
|
|
1220
|
+
{/* Brainstorm → Research */}
|
|
1221
|
+
<path
|
|
1222
|
+
d="M 630 340 Q 680 300 720 320"
|
|
1223
|
+
fill="none"
|
|
1224
|
+
stroke="#90a4ae"
|
|
1225
|
+
strokeWidth={2}
|
|
1226
|
+
markerEnd="url(#arrow-end)"
|
|
1227
|
+
/>
|
|
1228
|
+
{/* Research → Journey map */}
|
|
1229
|
+
<path
|
|
1230
|
+
d="M 1360 500 Q 1400 440 1440 460"
|
|
1231
|
+
fill="none"
|
|
1232
|
+
stroke="#90a4ae"
|
|
1233
|
+
strokeWidth={2}
|
|
1234
|
+
markerEnd="url(#arrow-end)"
|
|
1235
|
+
strokeDasharray="6 6"
|
|
1236
|
+
/>
|
|
1237
|
+
{/* Stickies → Sprint board */}
|
|
1238
|
+
<path
|
|
1239
|
+
d="M 500 780 Q 600 860 720 960"
|
|
1240
|
+
fill="none"
|
|
1241
|
+
stroke="#90a4ae"
|
|
1242
|
+
strokeWidth={1.5}
|
|
1243
|
+
markerEnd="url(#arrow-end)"
|
|
1244
|
+
strokeDasharray="4 6"
|
|
1245
|
+
/>
|
|
1246
|
+
{/* Journey → Wireframes */}
|
|
1247
|
+
<path
|
|
1248
|
+
d="M 2000 580 Q 2020 640 1970 700"
|
|
1249
|
+
fill="none"
|
|
1250
|
+
stroke="#7e57c2"
|
|
1251
|
+
strokeWidth={2}
|
|
1252
|
+
markerEnd="url(#arrow-purple)"
|
|
1253
|
+
/>
|
|
1254
|
+
</svg>
|
|
1255
|
+
|
|
1256
|
+
{/* ── Remote cursors ───────────────────────────────── */}
|
|
1257
|
+
<RemoteCursor x={900} y={400} name="Sarah" color="#26a69a" />
|
|
1258
|
+
<RemoteCursor x={2200} y={350} name="Alex" color="#5c6bc0" />
|
|
1259
|
+
|
|
1260
|
+
{/* ── Comment bubble ───────────────────────────────── */}
|
|
1261
|
+
<div
|
|
1262
|
+
style={{
|
|
1263
|
+
position: "absolute",
|
|
1264
|
+
left: 1380,
|
|
1265
|
+
top: 440,
|
|
1266
|
+
padding: "6px 12px",
|
|
1267
|
+
borderRadius: "12px 12px 12px 2px",
|
|
1268
|
+
background: "#1a73e8",
|
|
1269
|
+
color: "#fff",
|
|
1270
|
+
fontSize: 11,
|
|
1271
|
+
fontWeight: 600,
|
|
1272
|
+
boxShadow: "0 2px 8px rgba(26,115,232,0.3)",
|
|
1273
|
+
maxWidth: 180,
|
|
1274
|
+
lineHeight: 1.4,
|
|
1275
|
+
}}
|
|
1276
|
+
>
|
|
1277
|
+
Should we add a template picker here? 💬
|
|
1278
|
+
</div>
|
|
1279
|
+
|
|
1280
|
+
{/* ── Active users strip ───────────────────────────── */}
|
|
1281
|
+
<div
|
|
1282
|
+
style={{
|
|
1283
|
+
position: "absolute",
|
|
1284
|
+
left: CANVAS_W - 340,
|
|
1285
|
+
top: CANVAS_H - 80,
|
|
1286
|
+
display: "flex",
|
|
1287
|
+
alignItems: "center",
|
|
1288
|
+
gap: 8,
|
|
1289
|
+
padding: "8px 14px",
|
|
1290
|
+
borderRadius: 10,
|
|
1291
|
+
background: "rgba(255,255,255,0.95)",
|
|
1292
|
+
boxShadow: "0 2px 12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.06)",
|
|
1293
|
+
fontSize: 12,
|
|
1294
|
+
color: "#546e7a",
|
|
1295
|
+
fontWeight: 600,
|
|
1296
|
+
}}
|
|
1297
|
+
>
|
|
1298
|
+
{[
|
|
1299
|
+
{ bg: "linear-gradient(135deg, #26a69a, #00897b)", name: "S" },
|
|
1300
|
+
{ bg: "linear-gradient(135deg, #5c6bc0, #3949ab)", name: "A" },
|
|
1301
|
+
{ bg: "linear-gradient(135deg, #ef5350, #d32f2f)", name: "M" },
|
|
1302
|
+
].map((u, i) => (
|
|
1303
|
+
<span
|
|
1304
|
+
key={u.name}
|
|
1305
|
+
style={{
|
|
1306
|
+
width: 28,
|
|
1307
|
+
height: 28,
|
|
1308
|
+
borderRadius: "50%",
|
|
1309
|
+
background: u.bg,
|
|
1310
|
+
display: "flex",
|
|
1311
|
+
alignItems: "center",
|
|
1312
|
+
justifyContent: "center",
|
|
1313
|
+
fontSize: 11,
|
|
1314
|
+
fontWeight: 700,
|
|
1315
|
+
color: "#fff",
|
|
1316
|
+
marginLeft: i > 0 ? -12 : 0,
|
|
1317
|
+
border: "2px solid #fff",
|
|
1318
|
+
boxShadow: "0 1px 4px rgba(0,0,0,0.1)",
|
|
1319
|
+
}}
|
|
1320
|
+
>
|
|
1321
|
+
{u.name}
|
|
1322
|
+
</span>
|
|
1323
|
+
))}
|
|
1324
|
+
<span style={{ marginLeft: 4, fontSize: 11 }}>3 active now</span>
|
|
1325
|
+
<span
|
|
1326
|
+
style={{
|
|
1327
|
+
width: 8,
|
|
1328
|
+
height: 8,
|
|
1329
|
+
borderRadius: "50%",
|
|
1330
|
+
background: "#4caf50",
|
|
1331
|
+
boxShadow: "0 0 6px rgba(76,175,80,0.4)",
|
|
1332
|
+
}}
|
|
1333
|
+
/>
|
|
1334
|
+
</div>
|
|
1335
|
+
</div>
|
|
1336
|
+
);
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
const miroViewer: React.CSSProperties = {
|
|
1340
|
+
width: "100%",
|
|
1341
|
+
height: "100%",
|
|
1342
|
+
borderRadius: 0,
|
|
1343
|
+
border: "none",
|
|
1344
|
+
background: "#f5f4f1",
|
|
1345
|
+
overflow: "hidden",
|
|
1346
|
+
};
|
|
1347
|
+
|
|
1348
|
+
const shellShadow: React.CSSProperties = {
|
|
1349
|
+
borderRadius: 14,
|
|
1350
|
+
overflow: "hidden",
|
|
1351
|
+
boxShadow:
|
|
1352
|
+
"0 4px 6px rgba(0,0,0,0.04), 0 24px 48px rgba(15, 20, 40, 0.12), 0 0 0 1px rgba(0,0,0,0.06)",
|
|
1353
|
+
background: "#fff",
|
|
1354
|
+
maxWidth: "min(1400px, calc(100vw - 48px))",
|
|
1355
|
+
margin: "0 auto",
|
|
1356
|
+
};
|
|
1357
|
+
|
|
1358
|
+
function HintChip({ kbd, text }: { kbd: string; text: string }) {
|
|
1359
|
+
return (
|
|
1360
|
+
<div
|
|
1361
|
+
style={{
|
|
1362
|
+
display: "inline-flex",
|
|
1363
|
+
alignItems: "center",
|
|
1364
|
+
gap: 8,
|
|
1365
|
+
padding: "7px 14px",
|
|
1366
|
+
borderRadius: 10,
|
|
1367
|
+
background: "rgba(255,255,255,0.92)",
|
|
1368
|
+
border: "1px solid rgba(0,0,0,0.08)",
|
|
1369
|
+
boxShadow: "0 2px 8px rgba(0,0,0,0.06)",
|
|
1370
|
+
fontSize: 12,
|
|
1371
|
+
fontWeight: 600,
|
|
1372
|
+
color: "#424242",
|
|
1373
|
+
}}
|
|
1374
|
+
>
|
|
1375
|
+
{kbd && (
|
|
1376
|
+
<kbd
|
|
1377
|
+
style={{
|
|
1378
|
+
padding: "3px 8px",
|
|
1379
|
+
borderRadius: 6,
|
|
1380
|
+
background: "#f0f0f0",
|
|
1381
|
+
border: "1px solid #ddd",
|
|
1382
|
+
fontSize: 11,
|
|
1383
|
+
fontWeight: 700,
|
|
1384
|
+
fontFamily: "inherit",
|
|
1385
|
+
}}
|
|
1386
|
+
>
|
|
1387
|
+
{kbd}
|
|
1388
|
+
</kbd>
|
|
1389
|
+
)}
|
|
1390
|
+
<span>{text}</span>
|
|
1391
|
+
</div>
|
|
1392
|
+
);
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
export const Example: React.FC<Record<string, unknown>> = (args) => {
|
|
1396
|
+
return (
|
|
1397
|
+
<div style={{ fontFamily: font }}>
|
|
1398
|
+
<div
|
|
1399
|
+
style={{
|
|
1400
|
+
display: "flex",
|
|
1401
|
+
flexWrap: "wrap",
|
|
1402
|
+
gap: 8,
|
|
1403
|
+
marginBottom: 14,
|
|
1404
|
+
alignItems: "center",
|
|
1405
|
+
}}
|
|
1406
|
+
>
|
|
1407
|
+
<HintChip kbd="⌘ / Ctrl" text="scroll to zoom" />
|
|
1408
|
+
<HintChip kbd="" text="Trackpad / drag to pan" />
|
|
1409
|
+
</div>
|
|
1410
|
+
|
|
1411
|
+
<div style={shellShadow}>
|
|
1412
|
+
<header
|
|
1413
|
+
style={{
|
|
1414
|
+
height: 52,
|
|
1415
|
+
padding: "0 20px",
|
|
1416
|
+
display: "flex",
|
|
1417
|
+
alignItems: "center",
|
|
1418
|
+
justifyContent: "space-between",
|
|
1419
|
+
borderBottom: "1px solid #e8eaed",
|
|
1420
|
+
background: "#fff",
|
|
1421
|
+
}}
|
|
1422
|
+
>
|
|
1423
|
+
<div style={{ display: "flex", alignItems: "center", gap: 14 }}>
|
|
1424
|
+
<span
|
|
1425
|
+
style={{
|
|
1426
|
+
fontWeight: 700,
|
|
1427
|
+
fontSize: 16,
|
|
1428
|
+
color: "#1a1a1a",
|
|
1429
|
+
letterSpacing: "-0.02em",
|
|
1430
|
+
}}
|
|
1431
|
+
>
|
|
1432
|
+
Workshop board
|
|
1433
|
+
</span>
|
|
1434
|
+
<span
|
|
1435
|
+
style={{
|
|
1436
|
+
fontSize: 13,
|
|
1437
|
+
color: "#757575",
|
|
1438
|
+
padding: "4px 10px",
|
|
1439
|
+
borderRadius: 6,
|
|
1440
|
+
background: "#f5f5f5",
|
|
1441
|
+
}}
|
|
1442
|
+
>
|
|
1443
|
+
Team space · Editable
|
|
1444
|
+
</span>
|
|
1445
|
+
</div>
|
|
1446
|
+
<div style={{ display: "flex", alignItems: "center", gap: 8 }}>
|
|
1447
|
+
{["Share", "Present", "⋯"].map((t) => (
|
|
1448
|
+
<span
|
|
1449
|
+
key={t}
|
|
1450
|
+
style={{
|
|
1451
|
+
fontSize: 13,
|
|
1452
|
+
fontWeight: 600,
|
|
1453
|
+
color: t === "Share" ? "#fff" : "#5f6368",
|
|
1454
|
+
padding: t === "Share" ? "8px 18px" : "8px 12px",
|
|
1455
|
+
borderRadius: 8,
|
|
1456
|
+
background: t === "Share" ? "#1a73e8" : "transparent",
|
|
1457
|
+
cursor: "default",
|
|
1458
|
+
}}
|
|
1459
|
+
>
|
|
1460
|
+
{t}
|
|
1461
|
+
</span>
|
|
1462
|
+
))}
|
|
1463
|
+
</div>
|
|
1464
|
+
</header>
|
|
1465
|
+
|
|
1466
|
+
<div
|
|
1467
|
+
style={{
|
|
1468
|
+
height: "clamp(620px, calc(100vh - 280px), 920px)",
|
|
1469
|
+
position: "relative",
|
|
1470
|
+
background: "#e4e6ea",
|
|
1471
|
+
}}
|
|
1472
|
+
>
|
|
1473
|
+
<aside
|
|
1474
|
+
style={{
|
|
1475
|
+
position: "absolute",
|
|
1476
|
+
left: 12,
|
|
1477
|
+
top: "50%",
|
|
1478
|
+
transform: "translateY(-50%)",
|
|
1479
|
+
zIndex: 5,
|
|
1480
|
+
display: "flex",
|
|
1481
|
+
flexDirection: "column",
|
|
1482
|
+
gap: 4,
|
|
1483
|
+
padding: 6,
|
|
1484
|
+
borderRadius: 12,
|
|
1485
|
+
background: "rgba(255,255,255,0.95)",
|
|
1486
|
+
boxShadow:
|
|
1487
|
+
"0 2px 12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.06)",
|
|
1488
|
+
pointerEvents: "none",
|
|
1489
|
+
}}
|
|
1490
|
+
aria-hidden
|
|
1491
|
+
>
|
|
1492
|
+
{[
|
|
1493
|
+
{ c: "#5c6bc0", tip: "Select" },
|
|
1494
|
+
{ c: "#78909c", tip: "Pan" },
|
|
1495
|
+
{ c: "#ef5350", tip: "Pen" },
|
|
1496
|
+
{ c: "#ffb74d", tip: "Note" },
|
|
1497
|
+
{ c: "#4fc3f7", tip: "Shape" },
|
|
1498
|
+
{ c: "#9575cd", tip: "Frame" },
|
|
1499
|
+
].map((tool, i) => (
|
|
1500
|
+
<div
|
|
1501
|
+
key={tool.tip}
|
|
1502
|
+
style={{
|
|
1503
|
+
width: 40,
|
|
1504
|
+
height: 40,
|
|
1505
|
+
borderRadius: 10,
|
|
1506
|
+
display: "flex",
|
|
1507
|
+
alignItems: "center",
|
|
1508
|
+
justifyContent: "center",
|
|
1509
|
+
background: i === 1 ? "rgba(92,107,192,0.12)" : "transparent",
|
|
1510
|
+
border:
|
|
1511
|
+
i === 1
|
|
1512
|
+
? "1px solid rgba(92,107,192,0.35)"
|
|
1513
|
+
: "1px solid transparent",
|
|
1514
|
+
}}
|
|
1515
|
+
title={tool.tip}
|
|
1516
|
+
>
|
|
1517
|
+
<span
|
|
1518
|
+
style={{
|
|
1519
|
+
width: 22,
|
|
1520
|
+
height: 22,
|
|
1521
|
+
borderRadius:
|
|
1522
|
+
({ 4: 4, 5: 2 } as Record<number, number | string>)[i] ??
|
|
1523
|
+
"50%",
|
|
1524
|
+
background:
|
|
1525
|
+
i === 0
|
|
1526
|
+
? `linear-gradient(135deg, ${tool.c}, ${tool.c}cc)`
|
|
1527
|
+
: tool.c,
|
|
1528
|
+
opacity: i === 0 ? 1 : 0.85,
|
|
1529
|
+
}}
|
|
1530
|
+
/>
|
|
1531
|
+
</div>
|
|
1532
|
+
))}
|
|
1533
|
+
</aside>
|
|
1534
|
+
|
|
1535
|
+
<div
|
|
1536
|
+
style={{
|
|
1537
|
+
position: "absolute",
|
|
1538
|
+
inset: 0,
|
|
1539
|
+
}}
|
|
1540
|
+
>
|
|
1541
|
+
<TransformWrapper
|
|
1542
|
+
{...normalizeArgs(args)}
|
|
1543
|
+
initialScale={0.45}
|
|
1544
|
+
minScale={0.1}
|
|
1545
|
+
maxScale={4}
|
|
1546
|
+
limitToBounds={false}
|
|
1547
|
+
wheel={{
|
|
1548
|
+
activationKeys: (keys) =>
|
|
1549
|
+
["Meta", "Ctrl"].some((key) => keys.includes(key)),
|
|
1550
|
+
}}
|
|
1551
|
+
trackPadPanning={{
|
|
1552
|
+
disabled: false,
|
|
1553
|
+
activationKeys: (keys) =>
|
|
1554
|
+
!["Meta", "Ctrl"].some((key) => keys.includes(key)),
|
|
1555
|
+
}}
|
|
1556
|
+
>
|
|
1557
|
+
<TransformComponent
|
|
1558
|
+
wrapperStyle={miroViewer}
|
|
1559
|
+
contentStyle={{
|
|
1560
|
+
width: CANVAS_W,
|
|
1561
|
+
height: CANVAS_H,
|
|
1562
|
+
}}
|
|
1563
|
+
infinite
|
|
1564
|
+
>
|
|
1565
|
+
<MiroBoard />
|
|
1566
|
+
</TransformComponent>
|
|
1567
|
+
</TransformWrapper>
|
|
1568
|
+
</div>
|
|
1569
|
+
</div>
|
|
1570
|
+
</div>
|
|
1571
|
+
</div>
|
|
1572
|
+
);
|
|
1573
|
+
};
|