payload-canvas 0.6.3 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +3237 -3236
  3. package/dist/admin/aiKeyField.scss +58 -58
  4. package/dist/admin/diff/layoutDiff.scss +181 -181
  5. package/dist/admin/editor/assistant/assistant.scss +944 -944
  6. package/dist/admin/editor/classes/manager.scss +262 -262
  7. package/dist/admin/editor/comments/comments.scss +539 -539
  8. package/dist/admin/editor/dnd/dnd.scss +261 -261
  9. package/dist/admin/editor/editor.scss +2629 -2629
  10. package/dist/admin/editor/empty/empty.scss +92 -92
  11. package/dist/admin/editor/fields/fields.scss +778 -778
  12. package/dist/admin/editor/generate/generate.scss +276 -276
  13. package/dist/admin/editor/layout/layout.scss +240 -240
  14. package/dist/admin/editor/live/presence.scss +24 -24
  15. package/dist/admin/editor/locale/locale.scss +154 -154
  16. package/dist/admin/editor/media/media.scss +233 -233
  17. package/dist/admin/editor/menu/menu.scss +132 -132
  18. package/dist/admin/editor/motion/motion.scss +84 -84
  19. package/dist/admin/editor/sections/components.scss +238 -238
  20. package/dist/admin/editor/sections/variants.scss +90 -90
  21. package/dist/admin/editor/styles/ClassCss.js +3 -3
  22. package/dist/admin/editor/styles/classes.scss +381 -381
  23. package/dist/admin/editor/styles/styles.scss +1123 -1123
  24. package/dist/admin/editor/styles/tokens.js +2 -1
  25. package/dist/admin/editor/templates/templates.scss +654 -654
  26. package/dist/admin/editor/tooltip/tooltip.scss +39 -39
  27. package/dist/admin/editor/topbar/DocumentActions.js +1 -1
  28. package/dist/admin/editor/topbar/TopBar.js +2 -1
  29. package/dist/admin/editor/topbar/contentMode.scss +26 -26
  30. package/dist/admin/editor/topbar/screens/screens.scss +134 -134
  31. package/dist/admin/editor/topbar/settingsDrawer.scss +32 -32
  32. package/dist/admin/editor/topbar/tabTitle.d.ts +6 -0
  33. package/dist/admin/editor/topbar/tabTitle.js +9 -0
  34. package/dist/admin/editor/topbar/topbar.scss +645 -645
  35. package/dist/admin/editor/ui/controls.scss +320 -320
  36. package/dist/admin/forms/submissions.scss +197 -197
  37. package/dist/admin/layoutField.scss +69 -69
  38. package/dist/admin/templateConditions.scss +24 -24
  39. package/dist/ai/prompt.js +40 -40
  40. package/dist/blocks/client/marquee.js +14 -14
  41. package/dist/blocks/payload.js +13 -3
  42. package/dist/core/payloadBlocks.js +10 -1
  43. package/dist/core/responseError.d.ts +5 -0
  44. package/dist/core/responseError.js +8 -0
  45. package/dist/core/sections.d.ts +2 -0
  46. package/dist/core/sections.js +8 -0
  47. package/dist/css/index.d.ts +6 -0
  48. package/dist/css/index.js +40 -1
  49. package/dist/css/shared.js +2 -2
  50. package/dist/live/session.js +18 -0
  51. package/dist/live/storage.d.ts +5 -0
  52. package/dist/live/storage.js +20 -0
  53. package/dist/mcp/index.js +46 -19
  54. package/dist/mcp/shared.js +16 -16
  55. package/dist/plugin/index.d.ts +21 -1
  56. package/dist/plugin/index.js +46 -15
  57. package/dist/react/canvas/BuilderCanvas.js +76 -75
  58. package/dist/react/canvas/thumbnail/ThumbnailCanvas.js +8 -7
  59. package/dist/theme/admin/fields.scss +363 -363
  60. package/package.json +1 -1
@@ -1,539 +1,539 @@
1
- // Comments on the canvas: pins, the composer and thread popover, the panel and the top bar button.
2
- // Payload CSS variables and the editor's own `--be-*` variables only, no Tailwind.
3
-
4
- @layer payload-default {
5
- @keyframes builder-pin-in {
6
- from {
7
- opacity: 0;
8
- scale: 0.6;
9
- }
10
- }
11
-
12
- // The inspector stays mounted while the comments panel shows.
13
- .builder-comments-keep {
14
- display: contents;
15
-
16
- &[hidden] {
17
- display: none;
18
- }
19
- }
20
-
21
- // ---- Top bar button -------------------------------------------------------
22
-
23
- .builder-comments-button {
24
- position: relative;
25
- }
26
-
27
- .builder-comments-button__badge {
28
- position: absolute;
29
- top: 0;
30
- right: -2px;
31
- min-width: 15px;
32
- height: 15px;
33
- padding: 0 4px;
34
- border-radius: 8px;
35
- background: var(--be-accent-solid, var(--be-accent));
36
- box-shadow: 0 0 0 2px var(--theme-bg);
37
- color: var(--be-accent-fg);
38
- font-size: 10px;
39
- font-weight: var(--be-weight-strong);
40
- font-variant-numeric: tabular-nums;
41
- line-height: 15px;
42
- text-align: center;
43
- pointer-events: none;
44
- }
45
-
46
- // ---- Canvas layer (inside the zoomed frame, iframe coordinates) -----------
47
-
48
- .builder-comments-layer {
49
- --be-px: calc(1px * var(--be-inv, 1));
50
-
51
- position: absolute;
52
- z-index: 7;
53
- inset: 0;
54
- overflow: hidden;
55
- }
56
-
57
- .builder-comments-layer__capture {
58
- position: absolute;
59
- inset: 0;
60
- // A comment bubble with its point at the bottom left: the pin lands where the point is.
61
- cursor:
62
- url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M2 22V12a10 10 0 1 1 10 10Z' fill='%23fff' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E")
63
- 2 22,
64
- crosshair;
65
- }
66
-
67
- .builder-comments-layer__hover {
68
- position: absolute;
69
- border: var(--be-px) dashed var(--be-accent);
70
- border-radius: 2px;
71
- background: color-mix(in srgb, var(--be-accent) 5%, transparent);
72
- pointer-events: none;
73
- }
74
-
75
- // A teardrop: round, with its point (bottom left) on the comment's spot. Screen size at any zoom.
76
- .builder-comment-pin {
77
- position: absolute;
78
- z-index: 1;
79
- display: grid;
80
- place-items: center;
81
- width: 30px;
82
- height: 30px;
83
- padding: 0;
84
- border: 0;
85
- border-radius: 50% 50% 50% 3px;
86
- background: var(--theme-bg);
87
- box-shadow:
88
- 0 2px 8px rgb(0 0 0 / 0.18),
89
- 0 0 0 1px rgb(0 0 0 / 0.06);
90
- color: var(--theme-text);
91
- cursor: pointer;
92
- transform: scale(var(--be-inv, 1)) translateY(-100%);
93
- transform-origin: 0 0;
94
- transition:
95
- scale 160ms var(--be-ease),
96
- box-shadow 160ms var(--be-ease);
97
- animation: builder-pin-in 200ms var(--be-ease);
98
-
99
- .builder-comment__avatar {
100
- width: 24px;
101
- height: 24px;
102
- background: var(--be-accent-solid, var(--be-accent));
103
- color: var(--be-accent-fg);
104
- }
105
-
106
- &:hover {
107
- scale: 1.08;
108
- }
109
-
110
- &:focus-visible {
111
- outline: 2px solid var(--be-accent);
112
- outline-offset: 2px;
113
- }
114
- }
115
-
116
- .builder-comment-pin--open {
117
- z-index: 2;
118
- box-shadow:
119
- 0 2px 8px rgb(0 0 0 / 0.18),
120
- 0 0 0 2px var(--be-accent);
121
- }
122
-
123
- .builder-comment-pin--resolved {
124
- width: 24px;
125
- height: 24px;
126
- background: var(--theme-elevation-100);
127
- color: var(--be-muted);
128
- }
129
-
130
- .builder-comment-pin--draft {
131
- z-index: 3;
132
- background: var(--be-accent-solid, var(--be-accent));
133
- color: var(--be-accent-fg);
134
- cursor: default;
135
- pointer-events: none;
136
- }
137
-
138
- @media (prefers-reduced-motion: reduce) {
139
- .builder-comment-pin {
140
- transition: none;
141
- animation: none;
142
- }
143
- }
144
-
145
- // ---- Popover (editor root, screen coordinates) -----------------------------
146
-
147
- .builder-comments-popover {
148
- position: fixed;
149
- z-index: 90;
150
- inset: auto;
151
- margin: 0;
152
- padding: 0;
153
- border: 0;
154
- display: flex;
155
- flex-direction: column;
156
- max-height: min(480px, calc(100vh - 24px));
157
- overflow: hidden;
158
- border-radius: var(--be-radius-m);
159
- background: var(--be-panel);
160
- box-shadow: var(--be-shadow);
161
- color: var(--theme-text);
162
- font-size: var(--be-text-m);
163
- animation: builder-fade-in 140ms var(--be-ease);
164
- }
165
-
166
- // ---- Thread -----------------------------------------------------------------
167
-
168
- .builder-thread {
169
- display: flex;
170
- flex-direction: column;
171
- min-height: 0;
172
- }
173
-
174
- .builder-thread--new {
175
- padding: 8px;
176
- }
177
-
178
- .builder-thread__head {
179
- display: flex;
180
- flex: none;
181
- align-items: center;
182
- gap: 2px;
183
- padding: 4px 4px 4px 12px;
184
- border-bottom: 1px solid var(--be-border-soft);
185
- }
186
-
187
- .builder-thread__status {
188
- flex: 1;
189
- min-width: 0;
190
- overflow: hidden;
191
- color: var(--be-muted);
192
- font-size: var(--be-text-s);
193
- text-overflow: ellipsis;
194
- white-space: nowrap;
195
- }
196
-
197
- .builder-thread__items {
198
- flex: 1 1 auto;
199
- min-height: 0;
200
- padding: 4px 0;
201
- overflow-y: auto;
202
- overscroll-behavior: contain;
203
- }
204
-
205
- .builder-thread__reply {
206
- flex: none;
207
- padding: 8px;
208
- border-top: 1px solid var(--be-border-soft);
209
- }
210
-
211
- .builder-comment {
212
- display: grid;
213
- grid-template-columns: 22px minmax(0, 1fr);
214
- gap: 8px;
215
- padding: 6px 12px;
216
-
217
- &:hover .builder-comment__tools,
218
- &:focus-within .builder-comment__tools {
219
- opacity: 1;
220
- }
221
- }
222
-
223
- .builder-comment__avatar {
224
- display: grid;
225
- flex: none;
226
- place-items: center;
227
- width: 22px;
228
- height: 22px;
229
- border-radius: 50%;
230
- background: var(--theme-elevation-150);
231
- color: var(--theme-elevation-800);
232
- font-size: 10px;
233
- font-weight: var(--be-weight-strong);
234
- letter-spacing: 0.02em;
235
- line-height: 1;
236
- }
237
-
238
- .builder-comment__main {
239
- min-width: 0;
240
- }
241
-
242
- .builder-comment__head {
243
- display: flex;
244
- align-items: center;
245
- gap: 6px;
246
- min-width: 0;
247
- min-height: 22px;
248
- }
249
-
250
- .builder-comment__name {
251
- overflow: hidden;
252
- font-weight: var(--be-weight-strong);
253
- text-overflow: ellipsis;
254
- white-space: nowrap;
255
- }
256
-
257
- .builder-comment__time {
258
- flex: none;
259
- color: var(--be-muted);
260
- font-size: var(--be-text-s);
261
- font-variant-numeric: tabular-nums;
262
- white-space: nowrap;
263
- }
264
-
265
- .builder-comment__tools {
266
- display: flex;
267
- margin-left: auto;
268
- opacity: 0;
269
- transition: opacity 120ms ease;
270
- }
271
-
272
- .builder-comment__body {
273
- margin: 2px 0 0;
274
- line-height: 1.45;
275
- overflow-wrap: anywhere;
276
- white-space: pre-wrap;
277
- }
278
-
279
- .builder-comment__confirm {
280
- display: flex;
281
- align-items: center;
282
- gap: 4px;
283
- margin-top: 6px;
284
- padding: 4px 4px 4px 8px;
285
- border-radius: var(--be-radius);
286
- background: color-mix(in srgb, var(--theme-error-500) 10%, transparent);
287
- font-size: var(--be-text-s);
288
-
289
- > span {
290
- flex: 1;
291
- }
292
- }
293
-
294
- .builder-comment__text-button {
295
- padding: 3px 8px;
296
- border: 0;
297
- border-radius: var(--be-radius);
298
- background: transparent;
299
- color: var(--theme-elevation-800);
300
- font: inherit;
301
- font-size: var(--be-text-s);
302
- font-weight: var(--be-weight-medium);
303
- cursor: pointer;
304
-
305
- &:hover {
306
- background: var(--be-hover);
307
- color: var(--theme-text);
308
- }
309
-
310
- &:focus-visible {
311
- outline: 2px solid var(--be-accent);
312
- outline-offset: -2px;
313
- }
314
- }
315
-
316
- .builder-comment__text-button--danger {
317
- color: var(--theme-error-500);
318
-
319
- &:hover {
320
- color: var(--theme-error-500);
321
- }
322
- }
323
-
324
- // ---- Text box ---------------------------------------------------------------
325
-
326
- .builder-comment-input {
327
- display: flex;
328
- align-items: flex-end;
329
- gap: 6px;
330
- padding: 3px 3px 3px 10px;
331
- border: 1px solid var(--be-border);
332
- border-radius: var(--be-radius-m);
333
- background: var(--theme-input-bg, var(--theme-elevation-0));
334
- transition: border-color 120ms ease;
335
-
336
- &:focus-within {
337
- border-color: var(--be-accent);
338
- }
339
-
340
- textarea {
341
- flex: 1;
342
- min-width: 0;
343
- min-height: 26px;
344
- max-height: 160px;
345
- padding: 4px 0;
346
- border: 0;
347
- outline: 0;
348
- background: transparent;
349
- color: var(--theme-text);
350
- font: inherit;
351
- font-size: var(--be-text-m);
352
- line-height: 1.45;
353
- resize: none;
354
- field-sizing: content;
355
-
356
- // The box around the text area shows the focus.
357
- &:focus,
358
- &:focus-visible {
359
- outline: 0;
360
- box-shadow: none;
361
- }
362
-
363
- &::placeholder {
364
- color: var(--be-muted);
365
- }
366
- }
367
-
368
- .builder-comment__main & {
369
- margin-top: 4px;
370
- }
371
- }
372
-
373
- .builder-comment-input__actions {
374
- display: flex;
375
- flex: none;
376
- align-items: center;
377
- gap: 2px;
378
- }
379
-
380
- .builder-comment__send {
381
- display: grid;
382
- place-items: center;
383
- width: 26px;
384
- height: 26px;
385
- padding: 0;
386
- border: 0;
387
- border-radius: 50%;
388
- background: var(--be-accent-solid, var(--be-accent));
389
- color: var(--be-accent-fg);
390
- cursor: pointer;
391
- transition: background-color 120ms ease;
392
-
393
- &:disabled {
394
- background: var(--theme-elevation-150);
395
- color: var(--be-subtle);
396
- cursor: default;
397
- }
398
-
399
- &:focus-visible {
400
- outline: 2px solid var(--be-accent);
401
- outline-offset: 2px;
402
- }
403
- }
404
-
405
- // ---- Panel ------------------------------------------------------------------
406
-
407
- .builder-comments-panel {
408
- display: flex;
409
- flex: 1;
410
- flex-direction: column;
411
- min-height: 0;
412
- }
413
-
414
- .builder-comments-panel__head {
415
- display: flex;
416
- flex: none;
417
- align-items: center;
418
- gap: 4px;
419
- padding: 8px 8px 8px 12px;
420
- border-bottom: 1px solid var(--be-border);
421
- }
422
-
423
- .builder-comments-panel__title {
424
- flex: 1;
425
- margin: 0;
426
- font-size: var(--be-text-l);
427
- font-weight: var(--be-weight-strong);
428
- line-height: 28px;
429
- }
430
-
431
- .builder-comments-panel__filter {
432
- flex: none;
433
- padding: 10px 12px 8px;
434
- }
435
-
436
- .builder-comments-panel__list {
437
- display: flex;
438
- flex: 1;
439
- flex-direction: column;
440
- gap: 2px;
441
- min-height: 0;
442
- padding: 0 8px 12px;
443
- overflow-y: auto;
444
- }
445
-
446
- .builder-comment-card {
447
- flex: none;
448
- border-radius: var(--be-radius-m);
449
-
450
- .builder-thread {
451
- border-top: 1px solid var(--be-border-soft);
452
- }
453
- }
454
-
455
- .builder-comment-card--open {
456
- background: var(--be-raised);
457
- box-shadow: inset 0 0 0 1px var(--be-border);
458
- }
459
-
460
- .builder-comment-card__summary {
461
- display: grid;
462
- grid-template-columns: 22px minmax(0, 1fr);
463
- gap: 8px;
464
- width: 100%;
465
- padding: 8px;
466
- border: 0;
467
- border-radius: var(--be-radius-m);
468
- background: transparent;
469
- color: var(--theme-text);
470
- font: inherit;
471
- font-size: var(--be-text-m);
472
- text-align: left;
473
- cursor: pointer;
474
-
475
- &:hover {
476
- background: var(--be-hover);
477
- }
478
-
479
- &:focus-visible {
480
- outline: 2px solid var(--be-accent);
481
- outline-offset: -2px;
482
- }
483
- }
484
-
485
- .builder-comment-card__main {
486
- display: flex;
487
- flex-direction: column;
488
- gap: 2px;
489
- min-width: 0;
490
- }
491
-
492
- .builder-comment-card__body {
493
- display: -webkit-box;
494
- overflow: hidden;
495
- line-height: 1.45;
496
- overflow-wrap: anywhere;
497
- white-space: pre-wrap;
498
- -webkit-box-orient: vertical;
499
- -webkit-line-clamp: 3;
500
- }
501
-
502
- .builder-comment-card__meta {
503
- display: flex;
504
- flex-wrap: wrap;
505
- gap: 2px 10px;
506
- margin-top: 2px;
507
- color: var(--be-muted);
508
- font-size: var(--be-text-s);
509
- }
510
-
511
- .builder-comment-card__where {
512
- max-width: 100%;
513
- overflow: hidden;
514
- text-overflow: ellipsis;
515
- white-space: nowrap;
516
- }
517
-
518
- .builder-comment-card__deleted {
519
- color: var(--theme-warning-650, var(--theme-warning-500));
520
- font-weight: var(--be-weight-medium);
521
- }
522
-
523
- .builder-comment-card__resolved {
524
- display: inline-grid;
525
- margin-left: auto;
526
- color: var(--be-accent-text);
527
- }
528
-
529
- .builder-comment-card--resolved {
530
- .builder-comment-card__body,
531
- .builder-comment__name {
532
- color: var(--be-muted);
533
- }
534
-
535
- .builder-comment__avatar {
536
- opacity: 0.6;
537
- }
538
- }
539
- }
1
+ // Comments on the canvas: pins, the composer and thread popover, the panel and the top bar button.
2
+ // Payload CSS variables and the editor's own `--be-*` variables only, no Tailwind.
3
+
4
+ @layer payload-default {
5
+ @keyframes builder-pin-in {
6
+ from {
7
+ opacity: 0;
8
+ scale: 0.6;
9
+ }
10
+ }
11
+
12
+ // The inspector stays mounted while the comments panel shows.
13
+ .builder-comments-keep {
14
+ display: contents;
15
+
16
+ &[hidden] {
17
+ display: none;
18
+ }
19
+ }
20
+
21
+ // ---- Top bar button -------------------------------------------------------
22
+
23
+ .builder-comments-button {
24
+ position: relative;
25
+ }
26
+
27
+ .builder-comments-button__badge {
28
+ position: absolute;
29
+ top: 0;
30
+ right: -2px;
31
+ min-width: 15px;
32
+ height: 15px;
33
+ padding: 0 4px;
34
+ border-radius: 8px;
35
+ background: var(--be-accent-solid, var(--be-accent));
36
+ box-shadow: 0 0 0 2px var(--theme-bg);
37
+ color: var(--be-accent-fg);
38
+ font-size: 10px;
39
+ font-weight: var(--be-weight-strong);
40
+ font-variant-numeric: tabular-nums;
41
+ line-height: 15px;
42
+ text-align: center;
43
+ pointer-events: none;
44
+ }
45
+
46
+ // ---- Canvas layer (inside the zoomed frame, iframe coordinates) -----------
47
+
48
+ .builder-comments-layer {
49
+ --be-px: calc(1px * var(--be-inv, 1));
50
+
51
+ position: absolute;
52
+ z-index: 7;
53
+ inset: 0;
54
+ overflow: hidden;
55
+ }
56
+
57
+ .builder-comments-layer__capture {
58
+ position: absolute;
59
+ inset: 0;
60
+ // A comment bubble with its point at the bottom left: the pin lands where the point is.
61
+ cursor:
62
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M2 22V12a10 10 0 1 1 10 10Z' fill='%23fff' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E")
63
+ 2 22,
64
+ crosshair;
65
+ }
66
+
67
+ .builder-comments-layer__hover {
68
+ position: absolute;
69
+ border: var(--be-px) dashed var(--be-accent);
70
+ border-radius: 2px;
71
+ background: color-mix(in srgb, var(--be-accent) 5%, transparent);
72
+ pointer-events: none;
73
+ }
74
+
75
+ // A teardrop: round, with its point (bottom left) on the comment's spot. Screen size at any zoom.
76
+ .builder-comment-pin {
77
+ position: absolute;
78
+ z-index: 1;
79
+ display: grid;
80
+ place-items: center;
81
+ width: 30px;
82
+ height: 30px;
83
+ padding: 0;
84
+ border: 0;
85
+ border-radius: 50% 50% 50% 3px;
86
+ background: var(--theme-bg);
87
+ box-shadow:
88
+ 0 2px 8px rgb(0 0 0 / 0.18),
89
+ 0 0 0 1px rgb(0 0 0 / 0.06);
90
+ color: var(--theme-text);
91
+ cursor: pointer;
92
+ transform: scale(var(--be-inv, 1)) translateY(-100%);
93
+ transform-origin: 0 0;
94
+ transition:
95
+ scale 160ms var(--be-ease),
96
+ box-shadow 160ms var(--be-ease);
97
+ animation: builder-pin-in 200ms var(--be-ease);
98
+
99
+ .builder-comment__avatar {
100
+ width: 24px;
101
+ height: 24px;
102
+ background: var(--be-accent-solid, var(--be-accent));
103
+ color: var(--be-accent-fg);
104
+ }
105
+
106
+ &:hover {
107
+ scale: 1.08;
108
+ }
109
+
110
+ &:focus-visible {
111
+ outline: 2px solid var(--be-accent);
112
+ outline-offset: 2px;
113
+ }
114
+ }
115
+
116
+ .builder-comment-pin--open {
117
+ z-index: 2;
118
+ box-shadow:
119
+ 0 2px 8px rgb(0 0 0 / 0.18),
120
+ 0 0 0 2px var(--be-accent);
121
+ }
122
+
123
+ .builder-comment-pin--resolved {
124
+ width: 24px;
125
+ height: 24px;
126
+ background: var(--theme-elevation-100);
127
+ color: var(--be-muted);
128
+ }
129
+
130
+ .builder-comment-pin--draft {
131
+ z-index: 3;
132
+ background: var(--be-accent-solid, var(--be-accent));
133
+ color: var(--be-accent-fg);
134
+ cursor: default;
135
+ pointer-events: none;
136
+ }
137
+
138
+ @media (prefers-reduced-motion: reduce) {
139
+ .builder-comment-pin {
140
+ transition: none;
141
+ animation: none;
142
+ }
143
+ }
144
+
145
+ // ---- Popover (editor root, screen coordinates) -----------------------------
146
+
147
+ .builder-comments-popover {
148
+ position: fixed;
149
+ z-index: 90;
150
+ inset: auto;
151
+ margin: 0;
152
+ padding: 0;
153
+ border: 0;
154
+ display: flex;
155
+ flex-direction: column;
156
+ max-height: min(480px, calc(100vh - 24px));
157
+ overflow: hidden;
158
+ border-radius: var(--be-radius-m);
159
+ background: var(--be-panel);
160
+ box-shadow: var(--be-shadow);
161
+ color: var(--theme-text);
162
+ font-size: var(--be-text-m);
163
+ animation: builder-fade-in 140ms var(--be-ease);
164
+ }
165
+
166
+ // ---- Thread -----------------------------------------------------------------
167
+
168
+ .builder-thread {
169
+ display: flex;
170
+ flex-direction: column;
171
+ min-height: 0;
172
+ }
173
+
174
+ .builder-thread--new {
175
+ padding: 8px;
176
+ }
177
+
178
+ .builder-thread__head {
179
+ display: flex;
180
+ flex: none;
181
+ align-items: center;
182
+ gap: 2px;
183
+ padding: 4px 4px 4px 12px;
184
+ border-bottom: 1px solid var(--be-border-soft);
185
+ }
186
+
187
+ .builder-thread__status {
188
+ flex: 1;
189
+ min-width: 0;
190
+ overflow: hidden;
191
+ color: var(--be-muted);
192
+ font-size: var(--be-text-s);
193
+ text-overflow: ellipsis;
194
+ white-space: nowrap;
195
+ }
196
+
197
+ .builder-thread__items {
198
+ flex: 1 1 auto;
199
+ min-height: 0;
200
+ padding: 4px 0;
201
+ overflow-y: auto;
202
+ overscroll-behavior: contain;
203
+ }
204
+
205
+ .builder-thread__reply {
206
+ flex: none;
207
+ padding: 8px;
208
+ border-top: 1px solid var(--be-border-soft);
209
+ }
210
+
211
+ .builder-comment {
212
+ display: grid;
213
+ grid-template-columns: 22px minmax(0, 1fr);
214
+ gap: 8px;
215
+ padding: 6px 12px;
216
+
217
+ &:hover .builder-comment__tools,
218
+ &:focus-within .builder-comment__tools {
219
+ opacity: 1;
220
+ }
221
+ }
222
+
223
+ .builder-comment__avatar {
224
+ display: grid;
225
+ flex: none;
226
+ place-items: center;
227
+ width: 22px;
228
+ height: 22px;
229
+ border-radius: 50%;
230
+ background: var(--theme-elevation-150);
231
+ color: var(--theme-elevation-800);
232
+ font-size: 10px;
233
+ font-weight: var(--be-weight-strong);
234
+ letter-spacing: 0.02em;
235
+ line-height: 1;
236
+ }
237
+
238
+ .builder-comment__main {
239
+ min-width: 0;
240
+ }
241
+
242
+ .builder-comment__head {
243
+ display: flex;
244
+ align-items: center;
245
+ gap: 6px;
246
+ min-width: 0;
247
+ min-height: 22px;
248
+ }
249
+
250
+ .builder-comment__name {
251
+ overflow: hidden;
252
+ font-weight: var(--be-weight-strong);
253
+ text-overflow: ellipsis;
254
+ white-space: nowrap;
255
+ }
256
+
257
+ .builder-comment__time {
258
+ flex: none;
259
+ color: var(--be-muted);
260
+ font-size: var(--be-text-s);
261
+ font-variant-numeric: tabular-nums;
262
+ white-space: nowrap;
263
+ }
264
+
265
+ .builder-comment__tools {
266
+ display: flex;
267
+ margin-left: auto;
268
+ opacity: 0;
269
+ transition: opacity 120ms ease;
270
+ }
271
+
272
+ .builder-comment__body {
273
+ margin: 2px 0 0;
274
+ line-height: 1.45;
275
+ overflow-wrap: anywhere;
276
+ white-space: pre-wrap;
277
+ }
278
+
279
+ .builder-comment__confirm {
280
+ display: flex;
281
+ align-items: center;
282
+ gap: 4px;
283
+ margin-top: 6px;
284
+ padding: 4px 4px 4px 8px;
285
+ border-radius: var(--be-radius);
286
+ background: color-mix(in srgb, var(--theme-error-500) 10%, transparent);
287
+ font-size: var(--be-text-s);
288
+
289
+ > span {
290
+ flex: 1;
291
+ }
292
+ }
293
+
294
+ .builder-comment__text-button {
295
+ padding: 3px 8px;
296
+ border: 0;
297
+ border-radius: var(--be-radius);
298
+ background: transparent;
299
+ color: var(--theme-elevation-800);
300
+ font: inherit;
301
+ font-size: var(--be-text-s);
302
+ font-weight: var(--be-weight-medium);
303
+ cursor: pointer;
304
+
305
+ &:hover {
306
+ background: var(--be-hover);
307
+ color: var(--theme-text);
308
+ }
309
+
310
+ &:focus-visible {
311
+ outline: 2px solid var(--be-accent);
312
+ outline-offset: -2px;
313
+ }
314
+ }
315
+
316
+ .builder-comment__text-button--danger {
317
+ color: var(--theme-error-500);
318
+
319
+ &:hover {
320
+ color: var(--theme-error-500);
321
+ }
322
+ }
323
+
324
+ // ---- Text box ---------------------------------------------------------------
325
+
326
+ .builder-comment-input {
327
+ display: flex;
328
+ align-items: flex-end;
329
+ gap: 6px;
330
+ padding: 3px 3px 3px 10px;
331
+ border: 1px solid var(--be-border);
332
+ border-radius: var(--be-radius-m);
333
+ background: var(--theme-input-bg, var(--theme-elevation-0));
334
+ transition: border-color 120ms ease;
335
+
336
+ &:focus-within {
337
+ border-color: var(--be-accent);
338
+ }
339
+
340
+ textarea {
341
+ flex: 1;
342
+ min-width: 0;
343
+ min-height: 26px;
344
+ max-height: 160px;
345
+ padding: 4px 0;
346
+ border: 0;
347
+ outline: 0;
348
+ background: transparent;
349
+ color: var(--theme-text);
350
+ font: inherit;
351
+ font-size: var(--be-text-m);
352
+ line-height: 1.45;
353
+ resize: none;
354
+ field-sizing: content;
355
+
356
+ // The box around the text area shows the focus.
357
+ &:focus,
358
+ &:focus-visible {
359
+ outline: 0;
360
+ box-shadow: none;
361
+ }
362
+
363
+ &::placeholder {
364
+ color: var(--be-muted);
365
+ }
366
+ }
367
+
368
+ .builder-comment__main & {
369
+ margin-top: 4px;
370
+ }
371
+ }
372
+
373
+ .builder-comment-input__actions {
374
+ display: flex;
375
+ flex: none;
376
+ align-items: center;
377
+ gap: 2px;
378
+ }
379
+
380
+ .builder-comment__send {
381
+ display: grid;
382
+ place-items: center;
383
+ width: 26px;
384
+ height: 26px;
385
+ padding: 0;
386
+ border: 0;
387
+ border-radius: 50%;
388
+ background: var(--be-accent-solid, var(--be-accent));
389
+ color: var(--be-accent-fg);
390
+ cursor: pointer;
391
+ transition: background-color 120ms ease;
392
+
393
+ &:disabled {
394
+ background: var(--theme-elevation-150);
395
+ color: var(--be-subtle);
396
+ cursor: default;
397
+ }
398
+
399
+ &:focus-visible {
400
+ outline: 2px solid var(--be-accent);
401
+ outline-offset: 2px;
402
+ }
403
+ }
404
+
405
+ // ---- Panel ------------------------------------------------------------------
406
+
407
+ .builder-comments-panel {
408
+ display: flex;
409
+ flex: 1;
410
+ flex-direction: column;
411
+ min-height: 0;
412
+ }
413
+
414
+ .builder-comments-panel__head {
415
+ display: flex;
416
+ flex: none;
417
+ align-items: center;
418
+ gap: 4px;
419
+ padding: 8px 8px 8px 12px;
420
+ border-bottom: 1px solid var(--be-border);
421
+ }
422
+
423
+ .builder-comments-panel__title {
424
+ flex: 1;
425
+ margin: 0;
426
+ font-size: var(--be-text-l);
427
+ font-weight: var(--be-weight-strong);
428
+ line-height: 28px;
429
+ }
430
+
431
+ .builder-comments-panel__filter {
432
+ flex: none;
433
+ padding: 10px 12px 8px;
434
+ }
435
+
436
+ .builder-comments-panel__list {
437
+ display: flex;
438
+ flex: 1;
439
+ flex-direction: column;
440
+ gap: 2px;
441
+ min-height: 0;
442
+ padding: 0 8px 12px;
443
+ overflow-y: auto;
444
+ }
445
+
446
+ .builder-comment-card {
447
+ flex: none;
448
+ border-radius: var(--be-radius-m);
449
+
450
+ .builder-thread {
451
+ border-top: 1px solid var(--be-border-soft);
452
+ }
453
+ }
454
+
455
+ .builder-comment-card--open {
456
+ background: var(--be-raised);
457
+ box-shadow: inset 0 0 0 1px var(--be-border);
458
+ }
459
+
460
+ .builder-comment-card__summary {
461
+ display: grid;
462
+ grid-template-columns: 22px minmax(0, 1fr);
463
+ gap: 8px;
464
+ width: 100%;
465
+ padding: 8px;
466
+ border: 0;
467
+ border-radius: var(--be-radius-m);
468
+ background: transparent;
469
+ color: var(--theme-text);
470
+ font: inherit;
471
+ font-size: var(--be-text-m);
472
+ text-align: left;
473
+ cursor: pointer;
474
+
475
+ &:hover {
476
+ background: var(--be-hover);
477
+ }
478
+
479
+ &:focus-visible {
480
+ outline: 2px solid var(--be-accent);
481
+ outline-offset: -2px;
482
+ }
483
+ }
484
+
485
+ .builder-comment-card__main {
486
+ display: flex;
487
+ flex-direction: column;
488
+ gap: 2px;
489
+ min-width: 0;
490
+ }
491
+
492
+ .builder-comment-card__body {
493
+ display: -webkit-box;
494
+ overflow: hidden;
495
+ line-height: 1.45;
496
+ overflow-wrap: anywhere;
497
+ white-space: pre-wrap;
498
+ -webkit-box-orient: vertical;
499
+ -webkit-line-clamp: 3;
500
+ }
501
+
502
+ .builder-comment-card__meta {
503
+ display: flex;
504
+ flex-wrap: wrap;
505
+ gap: 2px 10px;
506
+ margin-top: 2px;
507
+ color: var(--be-muted);
508
+ font-size: var(--be-text-s);
509
+ }
510
+
511
+ .builder-comment-card__where {
512
+ max-width: 100%;
513
+ overflow: hidden;
514
+ text-overflow: ellipsis;
515
+ white-space: nowrap;
516
+ }
517
+
518
+ .builder-comment-card__deleted {
519
+ color: var(--theme-warning-650, var(--theme-warning-500));
520
+ font-weight: var(--be-weight-medium);
521
+ }
522
+
523
+ .builder-comment-card__resolved {
524
+ display: inline-grid;
525
+ margin-left: auto;
526
+ color: var(--be-accent-text);
527
+ }
528
+
529
+ .builder-comment-card--resolved {
530
+ .builder-comment-card__body,
531
+ .builder-comment__name {
532
+ color: var(--be-muted);
533
+ }
534
+
535
+ .builder-comment__avatar {
536
+ opacity: 0.6;
537
+ }
538
+ }
539
+ }