payload-canvas 0.6.3 → 0.6.4

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 (53) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +6 -5
  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/contentMode.scss +26 -26
  29. package/dist/admin/editor/topbar/screens/screens.scss +134 -134
  30. package/dist/admin/editor/topbar/settingsDrawer.scss +32 -32
  31. package/dist/admin/editor/topbar/topbar.scss +645 -645
  32. package/dist/admin/editor/ui/controls.scss +320 -320
  33. package/dist/admin/forms/submissions.scss +197 -197
  34. package/dist/admin/layoutField.scss +69 -69
  35. package/dist/admin/templateConditions.scss +24 -24
  36. package/dist/ai/prompt.js +40 -40
  37. package/dist/blocks/client/marquee.js +14 -14
  38. package/dist/blocks/payload.js +13 -3
  39. package/dist/core/responseError.d.ts +5 -0
  40. package/dist/core/responseError.js +8 -0
  41. package/dist/css/index.d.ts +6 -0
  42. package/dist/css/index.js +40 -1
  43. package/dist/css/shared.js +2 -2
  44. package/dist/live/session.js +18 -0
  45. package/dist/live/storage.d.ts +5 -0
  46. package/dist/live/storage.js +20 -0
  47. package/dist/mcp/shared.js +16 -16
  48. package/dist/plugin/index.d.ts +14 -1
  49. package/dist/plugin/index.js +46 -8
  50. package/dist/react/canvas/BuilderCanvas.js +4 -3
  51. package/dist/react/canvas/thumbnail/ThumbnailCanvas.js +2 -1
  52. package/dist/theme/admin/fields.scss +363 -363
  53. package/package.json +1 -1
@@ -1,645 +1,645 @@
1
- // The full-screen builder's top bar. Payload CSS variables only, no Tailwind. Light and dark theme.
2
- // Uses the editor's variables (`--be-*`, set on `.builder-editor` in editor.scss).
3
-
4
- @layer payload-default {
5
- .builder-bar {
6
- display: grid;
7
- grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
8
- align-items: center;
9
- gap: 12px;
10
- flex: none;
11
- height: 48px;
12
- padding: 0 10px 0 8px;
13
- border-bottom: 1px solid var(--be-border);
14
- background: var(--theme-bg);
15
- }
16
-
17
- .builder-bar__start,
18
- .builder-bar__center,
19
- .builder-bar__end,
20
- .builder-bar__group {
21
- display: flex;
22
- align-items: center;
23
- min-width: 0;
24
- }
25
-
26
- .builder-bar__start {
27
- gap: 4px;
28
- }
29
-
30
- .builder-bar__center {
31
- gap: 8px;
32
- }
33
-
34
- .builder-bar__group {
35
- gap: 6px;
36
- }
37
-
38
- .builder-bar__end {
39
- justify-content: flex-end;
40
- gap: 6px;
41
- }
42
-
43
- .builder-bar__divider {
44
- flex: none;
45
- width: 1px;
46
- height: 20px;
47
- margin: 0 2px;
48
- background: var(--be-border);
49
- }
50
-
51
- // Controls near the left edge open their tooltip to the right.
52
- .builder-bar__start [data-tooltip]:hover::after {
53
- left: 0;
54
- transform: none;
55
- }
56
-
57
- // ---- Left: back, home, breadcrumb, status ------------------------------------------------
58
-
59
- .builder-bar__home {
60
- display: inline-grid;
61
- flex: none;
62
- place-items: center;
63
- width: 32px;
64
- height: 32px;
65
- border-radius: var(--be-radius);
66
- color: var(--theme-text);
67
-
68
- &:hover {
69
- background: var(--be-hover);
70
- }
71
-
72
- svg,
73
- img {
74
- width: 20px;
75
- height: 20px;
76
- }
77
- }
78
-
79
- .builder-bar__crumbs {
80
- display: flex;
81
- align-items: center;
82
- gap: 2px;
83
- min-width: 0;
84
- margin-left: 4px;
85
- font-size: var(--be-text-m);
86
- }
87
-
88
- .builder-bar__crumb {
89
- flex: none;
90
- padding: 4px 4px;
91
- border-radius: var(--be-radius);
92
- color: var(--be-muted);
93
- text-decoration: none;
94
-
95
- &:hover {
96
- color: var(--theme-text);
97
- }
98
- }
99
-
100
- // A saved section's category after its name ("· Hero"): plain muted text, editable in place.
101
- .builder-bar__category {
102
- min-width: 0;
103
- max-width: 200px;
104
- height: 26px;
105
- margin: 0;
106
- padding: 0 6px;
107
- border: 1px solid transparent;
108
- border-radius: var(--be-radius);
109
- background: transparent;
110
- color: var(--be-muted);
111
- font: inherit;
112
- font-size: var(--be-text-s);
113
- field-sizing: content;
114
-
115
- &::placeholder {
116
- color: var(--be-subtle);
117
- }
118
-
119
- &:hover:not(:disabled) {
120
- border-color: var(--be-border);
121
- }
122
-
123
- &:focus {
124
- border-color: var(--be-accent);
125
- outline: 0;
126
- color: var(--theme-text);
127
- background: var(--theme-input-bg, var(--theme-elevation-0));
128
- }
129
- }
130
-
131
- .builder-bar__category--static {
132
- display: inline-flex;
133
- align-items: center;
134
- }
135
-
136
- // A saved section's info icon: its tooltip says that pages keep their own copy. The right
137
- // margin keeps it clear of Undo.
138
- .builder-bar__note {
139
- display: inline-grid;
140
- flex: none;
141
- place-items: center;
142
- width: 24px;
143
- height: 24px;
144
- margin: 0 4px 0 2px;
145
- padding: 0;
146
- border: 0;
147
- border-radius: var(--be-radius);
148
- background: none;
149
- color: var(--be-muted);
150
- cursor: help;
151
-
152
- &:hover,
153
- &:focus-visible {
154
- color: var(--theme-text);
155
- }
156
- }
157
-
158
- // "Details" (dates, versions) of a document without a status, e.g. a saved section.
159
- .builder-bar__details {
160
- position: relative;
161
- display: inline-flex;
162
- flex: none;
163
- margin-left: 4px;
164
- }
165
-
166
- // Always with its text: an icon alone does not say that it opens the dates.
167
- .builder-bar__details-button {
168
- display: inline-flex;
169
- align-items: center;
170
- gap: 5px;
171
- height: 26px;
172
- padding: 0 8px;
173
- border: 1px solid var(--be-border);
174
- border-radius: var(--be-radius);
175
- background: transparent;
176
- color: var(--be-muted);
177
- font: inherit;
178
- font-size: var(--be-text-s);
179
- white-space: nowrap;
180
- cursor: pointer;
181
-
182
- &:hover,
183
- &[aria-expanded='true'] {
184
- color: var(--theme-text);
185
- background: var(--be-hover);
186
- }
187
- }
188
-
189
- .builder-bar__crumb-sep {
190
- flex: none;
191
- color: var(--be-subtle);
192
- }
193
-
194
- .builder-bar__title {
195
- min-width: 0;
196
- max-width: min(28vw, 420px);
197
- height: 30px;
198
- margin: 0;
199
- padding: 0 6px;
200
- overflow: hidden;
201
- border: 1px solid transparent;
202
- border-radius: var(--be-radius);
203
- background: transparent;
204
- color: var(--theme-text);
205
- font: inherit;
206
- font-size: var(--be-text-l);
207
- font-weight: var(--be-weight-strong);
208
- text-overflow: ellipsis;
209
- white-space: nowrap;
210
- }
211
-
212
- input.builder-bar__title {
213
- field-sizing: content;
214
-
215
- &:hover:not(:disabled) {
216
- border-color: var(--be-border);
217
- }
218
-
219
- &:focus {
220
- border-color: var(--be-accent);
221
- outline: 0;
222
- background: var(--theme-input-bg, var(--theme-elevation-0));
223
- text-overflow: clip;
224
- }
225
-
226
- &:disabled {
227
- opacity: 0.6;
228
- }
229
- }
230
-
231
- .builder-bar__title--static {
232
- display: inline-flex;
233
- align-items: center;
234
- }
235
-
236
- .builder-bar__status {
237
- --status: var(--theme-elevation-400);
238
-
239
- position: relative;
240
- display: inline-flex;
241
- flex: none;
242
- align-items: center;
243
- gap: 6px;
244
- height: 24px;
245
- margin-left: 4px;
246
- padding: 0 9px;
247
- border-radius: 12px;
248
- background: color-mix(in srgb, var(--status) 14%, transparent);
249
- color: var(--theme-elevation-800);
250
- font-size: var(--be-text-s);
251
- font-weight: var(--be-weight-strong);
252
- cursor: default;
253
-
254
- &[data-status='published'] {
255
- --status: var(--theme-success-500);
256
- }
257
-
258
- &[data-status='changed'] {
259
- --status: var(--theme-warning-500, #f59e0b);
260
- }
261
- }
262
-
263
- .builder-bar__status-dot {
264
- width: 7px;
265
- height: 7px;
266
- border-radius: 50%;
267
- background: var(--status);
268
- }
269
-
270
- .builder-bar__card {
271
- position: absolute;
272
- z-index: 110;
273
- top: 100%;
274
- left: 0;
275
- width: 270px;
276
- // The padding bridges the gap, so the pointer can move into the card.
277
- padding-top: 8px;
278
- color: var(--theme-text);
279
- font-size: var(--be-text-m);
280
- font-weight: var(--be-weight-regular);
281
- cursor: auto;
282
- animation: builder-fade-in 140ms var(--be-ease);
283
-
284
- dl {
285
- display: flex;
286
- flex-direction: column;
287
- gap: 6px;
288
- margin: 0;
289
- }
290
-
291
- dl > div {
292
- display: flex;
293
- justify-content: space-between;
294
- gap: 12px;
295
- }
296
-
297
- dt {
298
- color: var(--be-muted);
299
- }
300
-
301
- dd {
302
- margin: 0;
303
- font-variant-numeric: tabular-nums;
304
- text-align: right;
305
- }
306
-
307
- a {
308
- color: var(--theme-text);
309
- text-decoration: underline;
310
- text-underline-offset: 2px;
311
- }
312
- }
313
-
314
- .builder-bar__card-box {
315
- padding: 12px 14px;
316
- border: 1px solid var(--be-border);
317
- border-radius: var(--be-radius-m);
318
- background: var(--be-panel);
319
- box-shadow: var(--be-shadow);
320
- }
321
-
322
- .builder-bar__card-title {
323
- margin: 0 0 10px;
324
- color: var(--theme-elevation-800);
325
- font-weight: var(--be-weight-strong);
326
- }
327
-
328
- // Looks like a link; opens the Versions drawer.
329
- .builder-bar__card-link {
330
- padding: 0;
331
- border: 0;
332
- background: none;
333
- color: inherit;
334
- font: inherit;
335
- text-decoration: underline;
336
- text-underline-offset: 2px;
337
- cursor: pointer;
338
-
339
- &:hover {
340
- color: var(--theme-text);
341
- }
342
- }
343
-
344
- // ---- Right: save state, buttons, publish ---------------------------------------------------
345
-
346
- .builder-bar__save-wrap {
347
- display: inline-flex;
348
- flex: 0 1 auto;
349
- align-items: center;
350
- gap: 6px;
351
- min-width: 0;
352
- }
353
-
354
- .builder-bar__save {
355
- display: inline-flex;
356
- flex: 0 1 auto;
357
- align-items: center;
358
- justify-content: flex-start;
359
- gap: 6px;
360
- // Wide enough for "Saved · 12:04 PM", so the bar does not move between the normal states.
361
- // Error texts are longer: the box grows, then truncates (the tooltip has the full text).
362
- // When the bar is narrow, the wrapper shrinks below 124px and the text truncates instead of
363
- // running under the buttons next to it.
364
- min-width: min(124px, 100%);
365
- max-width: 300px;
366
- color: var(--be-muted);
367
- font-size: var(--be-text-m);
368
- font-variant-numeric: tabular-nums;
369
- white-space: nowrap;
370
- }
371
-
372
- .builder-bar__save-text {
373
- min-width: 0;
374
- overflow: hidden;
375
- text-overflow: ellipsis;
376
- }
377
-
378
- .builder-bar__save-dot {
379
- flex: none;
380
- width: 7px;
381
- height: 7px;
382
- border-radius: 50%;
383
- background: var(--theme-success-500);
384
- }
385
-
386
- .builder-bar__save[data-state='saving'] .builder-bar__save-dot,
387
- .builder-bar__save[data-state='connecting'] .builder-bar__save-dot {
388
- background: var(--theme-elevation-400);
389
- animation: builder-bar-pulse 1s ease-in-out infinite alternate;
390
- }
391
-
392
- .builder-bar__save[data-state='offline'],
393
- .builder-bar__save[data-state='reconnecting'] {
394
- color: var(--theme-warning-600, #d97706);
395
-
396
- .builder-bar__save-dot {
397
- background: var(--theme-warning-500, #f59e0b);
398
- }
399
- }
400
-
401
- .builder-bar__save[data-state='failed'] {
402
- color: var(--theme-error-600, #dc2626);
403
- font-weight: var(--be-weight-medium);
404
-
405
- .builder-bar__save-dot {
406
- background: var(--theme-error-500, #ef4444);
407
- }
408
- }
409
-
410
- // The reasons can be long: wrap the tooltip, and keep its line breaks.
411
- .builder-bar .builder-bar__save[data-state='failed'],
412
- .builder-bar .builder-bar__save[data-state='offline'] {
413
- &:hover::after {
414
- width: max-content;
415
- max-width: 320px;
416
- white-space: pre-line;
417
- }
418
- }
419
-
420
- .builder-bar__save-retry {
421
- flex: none;
422
- height: 24px;
423
- padding: 0 8px;
424
- border: 1px solid var(--theme-error-400, #f87171);
425
- border-radius: var(--be-radius-m);
426
- background: transparent;
427
- color: var(--theme-error-600, #dc2626);
428
- font: inherit;
429
- font-size: var(--be-text-m);
430
- font-weight: var(--be-weight-medium);
431
- white-space: nowrap;
432
- cursor: pointer;
433
-
434
- &:hover:not(:disabled) {
435
- background: var(--theme-error-50, #fef2f2);
436
- }
437
-
438
- &:disabled {
439
- opacity: 0.6;
440
- cursor: default;
441
- }
442
-
443
- &:focus-visible {
444
- outline: 2px solid var(--theme-error-500, #ef4444);
445
- outline-offset: 1px;
446
- }
447
- }
448
-
449
- @keyframes builder-bar-pulse {
450
- to {
451
- opacity: 0.3;
452
- }
453
- }
454
-
455
- // Laptop screens.
456
- @media (max-width: 1700px) {
457
- // The avatars already say who is here; the "is editing" chip would push the save state.
458
- .builder-editor__live-activity {
459
- display: none;
460
- }
461
- }
462
-
463
- .builder-bar__publish {
464
- display: inline-flex;
465
- flex: none;
466
- align-items: center;
467
- margin-left: 2px;
468
- }
469
-
470
- // Payload's primary button colors.
471
- .builder-bar__publish-main,
472
- .builder-bar__publish-more {
473
- display: inline-flex;
474
- align-items: center;
475
- justify-content: center;
476
- height: 30px;
477
- border: 0;
478
- background: var(--theme-elevation-800);
479
- color: var(--theme-elevation-0);
480
- font: inherit;
481
- font-size: var(--be-text-m);
482
- font-weight: var(--be-weight-medium);
483
- white-space: nowrap;
484
- cursor: pointer;
485
- transition: background-color 120ms ease;
486
-
487
- &:hover:not(:disabled) {
488
- background: var(--theme-elevation-1000);
489
- }
490
-
491
- &:disabled {
492
- background: var(--theme-elevation-200);
493
- color: var(--theme-elevation-600);
494
- cursor: default;
495
- }
496
- }
497
-
498
- .builder-bar__publish-main {
499
- min-width: 128px;
500
- padding: 0 14px;
501
- border-radius: var(--be-radius-m) 0 0 var(--be-radius-m);
502
- }
503
-
504
- .builder-bar__publish-more {
505
- width: 28px;
506
- border-left: 1px solid color-mix(in srgb, var(--theme-elevation-0) 30%, transparent);
507
- border-radius: 0 var(--be-radius-m) var(--be-radius-m) 0;
508
-
509
- &[aria-expanded='true'] {
510
- background: var(--theme-elevation-1000);
511
- }
512
- }
513
-
514
- // ---- Publish problems ---------------------------------------------------------------------------
515
-
516
- .builder-bar__problems {
517
- display: inline-flex;
518
- flex: none;
519
- align-items: center;
520
- gap: 4px;
521
- height: 30px;
522
- margin-right: 6px;
523
- padding: 0 8px;
524
- border: 1px solid color-mix(in srgb, var(--theme-error-500) 45%, transparent);
525
- border-radius: var(--be-radius-m);
526
- background: color-mix(in srgb, var(--theme-error-500) 10%, transparent);
527
- color: var(--theme-error-500);
528
- font: inherit;
529
- font-size: var(--be-text-m);
530
- font-weight: var(--be-weight-strong);
531
- font-variant-numeric: tabular-nums;
532
- cursor: pointer;
533
-
534
- &:hover {
535
- background: color-mix(in srgb, var(--theme-error-500) 16%, transparent);
536
- }
537
- }
538
-
539
- .builder-styles__popover.builder-bar__problems-popover {
540
- width: 340px;
541
- padding: 6px;
542
- border-color: var(--be-border);
543
- box-shadow: var(--be-shadow);
544
- }
545
-
546
- .builder-bar__problems-title {
547
- margin: 2px 6px 6px;
548
- color: var(--theme-text);
549
- font-size: var(--be-text-m);
550
- font-weight: var(--be-weight-strong);
551
- }
552
-
553
- .builder-bar__problems-list {
554
- display: flex;
555
- flex-direction: column;
556
- gap: 2px;
557
- margin: 0;
558
- padding: 0;
559
- list-style: none;
560
- }
561
-
562
- .builder-bar__problem {
563
- display: flex;
564
- align-items: flex-start;
565
- gap: 8px;
566
- width: 100%;
567
- padding: 6px;
568
- border: 0;
569
- border-radius: var(--be-radius);
570
- background: none;
571
- color: var(--theme-text);
572
- font: inherit;
573
- text-align: left;
574
- cursor: pointer;
575
-
576
- &:hover,
577
- &:focus-visible {
578
- background: var(--be-hover);
579
- }
580
-
581
- &:hover .builder-bar__problem-action {
582
- color: var(--theme-text);
583
- }
584
- }
585
-
586
- .builder-bar__problem-icon {
587
- display: inline-flex;
588
- flex: none;
589
- padding-top: 1px;
590
- color: var(--theme-error-500);
591
- }
592
-
593
- .builder-bar__problem-text {
594
- display: flex;
595
- flex: 1;
596
- flex-direction: column;
597
- gap: 1px;
598
- min-width: 0;
599
- }
600
-
601
- .builder-bar__problem-where {
602
- overflow: hidden;
603
- font-size: var(--be-text-m);
604
- font-weight: var(--be-weight-medium);
605
- text-overflow: ellipsis;
606
- white-space: nowrap;
607
- }
608
-
609
- .builder-bar__problem-message {
610
- color: var(--theme-elevation-650, var(--theme-elevation-600));
611
- font-size: var(--be-text-m);
612
- line-height: 1.4;
613
- }
614
-
615
- .builder-bar__problem-action {
616
- flex: none;
617
- padding-top: 1px;
618
- color: var(--be-muted);
619
- font-size: var(--be-text-m);
620
- }
621
-
622
- // ---- Loading skeleton below the bar ------------------------------------------------------------
623
-
624
- .builder-editor__body--loading {
625
- .builder-editor__left,
626
- .builder-editor__right {
627
- gap: 10px;
628
- padding: 12px;
629
- }
630
-
631
- .builder-editor__stage {
632
- padding: 24px;
633
- background: var(--theme-elevation-50);
634
- }
635
- }
636
-
637
- // Payload opens its lock dialogs ("Document locked", "taken over", "modified by another user")
638
- // with z-index var(--z-modal) = 30, but drawers get 100 + depth. Inside the settings drawer the
639
- // dialog would open hidden behind the drawer. Lift it above any drawer.
640
- .payload__modal-item.document-locked,
641
- .payload__modal-item.document-take-over,
642
- .payload__modal-item.document-stale-data {
643
- z-index: 200;
644
- }
645
- }
1
+ // The full-screen builder's top bar. Payload CSS variables only, no Tailwind. Light and dark theme.
2
+ // Uses the editor's variables (`--be-*`, set on `.builder-editor` in editor.scss).
3
+
4
+ @layer payload-default {
5
+ .builder-bar {
6
+ display: grid;
7
+ grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
8
+ align-items: center;
9
+ gap: 12px;
10
+ flex: none;
11
+ height: 48px;
12
+ padding: 0 10px 0 8px;
13
+ border-bottom: 1px solid var(--be-border);
14
+ background: var(--theme-bg);
15
+ }
16
+
17
+ .builder-bar__start,
18
+ .builder-bar__center,
19
+ .builder-bar__end,
20
+ .builder-bar__group {
21
+ display: flex;
22
+ align-items: center;
23
+ min-width: 0;
24
+ }
25
+
26
+ .builder-bar__start {
27
+ gap: 4px;
28
+ }
29
+
30
+ .builder-bar__center {
31
+ gap: 8px;
32
+ }
33
+
34
+ .builder-bar__group {
35
+ gap: 6px;
36
+ }
37
+
38
+ .builder-bar__end {
39
+ justify-content: flex-end;
40
+ gap: 6px;
41
+ }
42
+
43
+ .builder-bar__divider {
44
+ flex: none;
45
+ width: 1px;
46
+ height: 20px;
47
+ margin: 0 2px;
48
+ background: var(--be-border);
49
+ }
50
+
51
+ // Controls near the left edge open their tooltip to the right.
52
+ .builder-bar__start [data-tooltip]:hover::after {
53
+ left: 0;
54
+ transform: none;
55
+ }
56
+
57
+ // ---- Left: back, home, breadcrumb, status ------------------------------------------------
58
+
59
+ .builder-bar__home {
60
+ display: inline-grid;
61
+ flex: none;
62
+ place-items: center;
63
+ width: 32px;
64
+ height: 32px;
65
+ border-radius: var(--be-radius);
66
+ color: var(--theme-text);
67
+
68
+ &:hover {
69
+ background: var(--be-hover);
70
+ }
71
+
72
+ svg,
73
+ img {
74
+ width: 20px;
75
+ height: 20px;
76
+ }
77
+ }
78
+
79
+ .builder-bar__crumbs {
80
+ display: flex;
81
+ align-items: center;
82
+ gap: 2px;
83
+ min-width: 0;
84
+ margin-left: 4px;
85
+ font-size: var(--be-text-m);
86
+ }
87
+
88
+ .builder-bar__crumb {
89
+ flex: none;
90
+ padding: 4px 4px;
91
+ border-radius: var(--be-radius);
92
+ color: var(--be-muted);
93
+ text-decoration: none;
94
+
95
+ &:hover {
96
+ color: var(--theme-text);
97
+ }
98
+ }
99
+
100
+ // A saved section's category after its name ("· Hero"): plain muted text, editable in place.
101
+ .builder-bar__category {
102
+ min-width: 0;
103
+ max-width: 200px;
104
+ height: 26px;
105
+ margin: 0;
106
+ padding: 0 6px;
107
+ border: 1px solid transparent;
108
+ border-radius: var(--be-radius);
109
+ background: transparent;
110
+ color: var(--be-muted);
111
+ font: inherit;
112
+ font-size: var(--be-text-s);
113
+ field-sizing: content;
114
+
115
+ &::placeholder {
116
+ color: var(--be-subtle);
117
+ }
118
+
119
+ &:hover:not(:disabled) {
120
+ border-color: var(--be-border);
121
+ }
122
+
123
+ &:focus {
124
+ border-color: var(--be-accent);
125
+ outline: 0;
126
+ color: var(--theme-text);
127
+ background: var(--theme-input-bg, var(--theme-elevation-0));
128
+ }
129
+ }
130
+
131
+ .builder-bar__category--static {
132
+ display: inline-flex;
133
+ align-items: center;
134
+ }
135
+
136
+ // A saved section's info icon: its tooltip says that pages keep their own copy. The right
137
+ // margin keeps it clear of Undo.
138
+ .builder-bar__note {
139
+ display: inline-grid;
140
+ flex: none;
141
+ place-items: center;
142
+ width: 24px;
143
+ height: 24px;
144
+ margin: 0 4px 0 2px;
145
+ padding: 0;
146
+ border: 0;
147
+ border-radius: var(--be-radius);
148
+ background: none;
149
+ color: var(--be-muted);
150
+ cursor: help;
151
+
152
+ &:hover,
153
+ &:focus-visible {
154
+ color: var(--theme-text);
155
+ }
156
+ }
157
+
158
+ // "Details" (dates, versions) of a document without a status, e.g. a saved section.
159
+ .builder-bar__details {
160
+ position: relative;
161
+ display: inline-flex;
162
+ flex: none;
163
+ margin-left: 4px;
164
+ }
165
+
166
+ // Always with its text: an icon alone does not say that it opens the dates.
167
+ .builder-bar__details-button {
168
+ display: inline-flex;
169
+ align-items: center;
170
+ gap: 5px;
171
+ height: 26px;
172
+ padding: 0 8px;
173
+ border: 1px solid var(--be-border);
174
+ border-radius: var(--be-radius);
175
+ background: transparent;
176
+ color: var(--be-muted);
177
+ font: inherit;
178
+ font-size: var(--be-text-s);
179
+ white-space: nowrap;
180
+ cursor: pointer;
181
+
182
+ &:hover,
183
+ &[aria-expanded='true'] {
184
+ color: var(--theme-text);
185
+ background: var(--be-hover);
186
+ }
187
+ }
188
+
189
+ .builder-bar__crumb-sep {
190
+ flex: none;
191
+ color: var(--be-subtle);
192
+ }
193
+
194
+ .builder-bar__title {
195
+ min-width: 0;
196
+ max-width: min(28vw, 420px);
197
+ height: 30px;
198
+ margin: 0;
199
+ padding: 0 6px;
200
+ overflow: hidden;
201
+ border: 1px solid transparent;
202
+ border-radius: var(--be-radius);
203
+ background: transparent;
204
+ color: var(--theme-text);
205
+ font: inherit;
206
+ font-size: var(--be-text-l);
207
+ font-weight: var(--be-weight-strong);
208
+ text-overflow: ellipsis;
209
+ white-space: nowrap;
210
+ }
211
+
212
+ input.builder-bar__title {
213
+ field-sizing: content;
214
+
215
+ &:hover:not(:disabled) {
216
+ border-color: var(--be-border);
217
+ }
218
+
219
+ &:focus {
220
+ border-color: var(--be-accent);
221
+ outline: 0;
222
+ background: var(--theme-input-bg, var(--theme-elevation-0));
223
+ text-overflow: clip;
224
+ }
225
+
226
+ &:disabled {
227
+ opacity: 0.6;
228
+ }
229
+ }
230
+
231
+ .builder-bar__title--static {
232
+ display: inline-flex;
233
+ align-items: center;
234
+ }
235
+
236
+ .builder-bar__status {
237
+ --status: var(--theme-elevation-400);
238
+
239
+ position: relative;
240
+ display: inline-flex;
241
+ flex: none;
242
+ align-items: center;
243
+ gap: 6px;
244
+ height: 24px;
245
+ margin-left: 4px;
246
+ padding: 0 9px;
247
+ border-radius: 12px;
248
+ background: color-mix(in srgb, var(--status) 14%, transparent);
249
+ color: var(--theme-elevation-800);
250
+ font-size: var(--be-text-s);
251
+ font-weight: var(--be-weight-strong);
252
+ cursor: default;
253
+
254
+ &[data-status='published'] {
255
+ --status: var(--theme-success-500);
256
+ }
257
+
258
+ &[data-status='changed'] {
259
+ --status: var(--theme-warning-500, #f59e0b);
260
+ }
261
+ }
262
+
263
+ .builder-bar__status-dot {
264
+ width: 7px;
265
+ height: 7px;
266
+ border-radius: 50%;
267
+ background: var(--status);
268
+ }
269
+
270
+ .builder-bar__card {
271
+ position: absolute;
272
+ z-index: 110;
273
+ top: 100%;
274
+ left: 0;
275
+ width: 270px;
276
+ // The padding bridges the gap, so the pointer can move into the card.
277
+ padding-top: 8px;
278
+ color: var(--theme-text);
279
+ font-size: var(--be-text-m);
280
+ font-weight: var(--be-weight-regular);
281
+ cursor: auto;
282
+ animation: builder-fade-in 140ms var(--be-ease);
283
+
284
+ dl {
285
+ display: flex;
286
+ flex-direction: column;
287
+ gap: 6px;
288
+ margin: 0;
289
+ }
290
+
291
+ dl > div {
292
+ display: flex;
293
+ justify-content: space-between;
294
+ gap: 12px;
295
+ }
296
+
297
+ dt {
298
+ color: var(--be-muted);
299
+ }
300
+
301
+ dd {
302
+ margin: 0;
303
+ font-variant-numeric: tabular-nums;
304
+ text-align: right;
305
+ }
306
+
307
+ a {
308
+ color: var(--theme-text);
309
+ text-decoration: underline;
310
+ text-underline-offset: 2px;
311
+ }
312
+ }
313
+
314
+ .builder-bar__card-box {
315
+ padding: 12px 14px;
316
+ border: 1px solid var(--be-border);
317
+ border-radius: var(--be-radius-m);
318
+ background: var(--be-panel);
319
+ box-shadow: var(--be-shadow);
320
+ }
321
+
322
+ .builder-bar__card-title {
323
+ margin: 0 0 10px;
324
+ color: var(--theme-elevation-800);
325
+ font-weight: var(--be-weight-strong);
326
+ }
327
+
328
+ // Looks like a link; opens the Versions drawer.
329
+ .builder-bar__card-link {
330
+ padding: 0;
331
+ border: 0;
332
+ background: none;
333
+ color: inherit;
334
+ font: inherit;
335
+ text-decoration: underline;
336
+ text-underline-offset: 2px;
337
+ cursor: pointer;
338
+
339
+ &:hover {
340
+ color: var(--theme-text);
341
+ }
342
+ }
343
+
344
+ // ---- Right: save state, buttons, publish ---------------------------------------------------
345
+
346
+ .builder-bar__save-wrap {
347
+ display: inline-flex;
348
+ flex: 0 1 auto;
349
+ align-items: center;
350
+ gap: 6px;
351
+ min-width: 0;
352
+ }
353
+
354
+ .builder-bar__save {
355
+ display: inline-flex;
356
+ flex: 0 1 auto;
357
+ align-items: center;
358
+ justify-content: flex-start;
359
+ gap: 6px;
360
+ // Wide enough for "Saved · 12:04 PM", so the bar does not move between the normal states.
361
+ // Error texts are longer: the box grows, then truncates (the tooltip has the full text).
362
+ // When the bar is narrow, the wrapper shrinks below 124px and the text truncates instead of
363
+ // running under the buttons next to it.
364
+ min-width: min(124px, 100%);
365
+ max-width: 300px;
366
+ color: var(--be-muted);
367
+ font-size: var(--be-text-m);
368
+ font-variant-numeric: tabular-nums;
369
+ white-space: nowrap;
370
+ }
371
+
372
+ .builder-bar__save-text {
373
+ min-width: 0;
374
+ overflow: hidden;
375
+ text-overflow: ellipsis;
376
+ }
377
+
378
+ .builder-bar__save-dot {
379
+ flex: none;
380
+ width: 7px;
381
+ height: 7px;
382
+ border-radius: 50%;
383
+ background: var(--theme-success-500);
384
+ }
385
+
386
+ .builder-bar__save[data-state='saving'] .builder-bar__save-dot,
387
+ .builder-bar__save[data-state='connecting'] .builder-bar__save-dot {
388
+ background: var(--theme-elevation-400);
389
+ animation: builder-bar-pulse 1s ease-in-out infinite alternate;
390
+ }
391
+
392
+ .builder-bar__save[data-state='offline'],
393
+ .builder-bar__save[data-state='reconnecting'] {
394
+ color: var(--theme-warning-600, #d97706);
395
+
396
+ .builder-bar__save-dot {
397
+ background: var(--theme-warning-500, #f59e0b);
398
+ }
399
+ }
400
+
401
+ .builder-bar__save[data-state='failed'] {
402
+ color: var(--theme-error-600, #dc2626);
403
+ font-weight: var(--be-weight-medium);
404
+
405
+ .builder-bar__save-dot {
406
+ background: var(--theme-error-500, #ef4444);
407
+ }
408
+ }
409
+
410
+ // The reasons can be long: wrap the tooltip, and keep its line breaks.
411
+ .builder-bar .builder-bar__save[data-state='failed'],
412
+ .builder-bar .builder-bar__save[data-state='offline'] {
413
+ &:hover::after {
414
+ width: max-content;
415
+ max-width: 320px;
416
+ white-space: pre-line;
417
+ }
418
+ }
419
+
420
+ .builder-bar__save-retry {
421
+ flex: none;
422
+ height: 24px;
423
+ padding: 0 8px;
424
+ border: 1px solid var(--theme-error-400, #f87171);
425
+ border-radius: var(--be-radius-m);
426
+ background: transparent;
427
+ color: var(--theme-error-600, #dc2626);
428
+ font: inherit;
429
+ font-size: var(--be-text-m);
430
+ font-weight: var(--be-weight-medium);
431
+ white-space: nowrap;
432
+ cursor: pointer;
433
+
434
+ &:hover:not(:disabled) {
435
+ background: var(--theme-error-50, #fef2f2);
436
+ }
437
+
438
+ &:disabled {
439
+ opacity: 0.6;
440
+ cursor: default;
441
+ }
442
+
443
+ &:focus-visible {
444
+ outline: 2px solid var(--theme-error-500, #ef4444);
445
+ outline-offset: 1px;
446
+ }
447
+ }
448
+
449
+ @keyframes builder-bar-pulse {
450
+ to {
451
+ opacity: 0.3;
452
+ }
453
+ }
454
+
455
+ // Laptop screens.
456
+ @media (max-width: 1700px) {
457
+ // The avatars already say who is here; the "is editing" chip would push the save state.
458
+ .builder-editor__live-activity {
459
+ display: none;
460
+ }
461
+ }
462
+
463
+ .builder-bar__publish {
464
+ display: inline-flex;
465
+ flex: none;
466
+ align-items: center;
467
+ margin-left: 2px;
468
+ }
469
+
470
+ // Payload's primary button colors.
471
+ .builder-bar__publish-main,
472
+ .builder-bar__publish-more {
473
+ display: inline-flex;
474
+ align-items: center;
475
+ justify-content: center;
476
+ height: 30px;
477
+ border: 0;
478
+ background: var(--theme-elevation-800);
479
+ color: var(--theme-elevation-0);
480
+ font: inherit;
481
+ font-size: var(--be-text-m);
482
+ font-weight: var(--be-weight-medium);
483
+ white-space: nowrap;
484
+ cursor: pointer;
485
+ transition: background-color 120ms ease;
486
+
487
+ &:hover:not(:disabled) {
488
+ background: var(--theme-elevation-1000);
489
+ }
490
+
491
+ &:disabled {
492
+ background: var(--theme-elevation-200);
493
+ color: var(--theme-elevation-600);
494
+ cursor: default;
495
+ }
496
+ }
497
+
498
+ .builder-bar__publish-main {
499
+ min-width: 128px;
500
+ padding: 0 14px;
501
+ border-radius: var(--be-radius-m) 0 0 var(--be-radius-m);
502
+ }
503
+
504
+ .builder-bar__publish-more {
505
+ width: 28px;
506
+ border-left: 1px solid color-mix(in srgb, var(--theme-elevation-0) 30%, transparent);
507
+ border-radius: 0 var(--be-radius-m) var(--be-radius-m) 0;
508
+
509
+ &[aria-expanded='true'] {
510
+ background: var(--theme-elevation-1000);
511
+ }
512
+ }
513
+
514
+ // ---- Publish problems ---------------------------------------------------------------------------
515
+
516
+ .builder-bar__problems {
517
+ display: inline-flex;
518
+ flex: none;
519
+ align-items: center;
520
+ gap: 4px;
521
+ height: 30px;
522
+ margin-right: 6px;
523
+ padding: 0 8px;
524
+ border: 1px solid color-mix(in srgb, var(--theme-error-500) 45%, transparent);
525
+ border-radius: var(--be-radius-m);
526
+ background: color-mix(in srgb, var(--theme-error-500) 10%, transparent);
527
+ color: var(--theme-error-500);
528
+ font: inherit;
529
+ font-size: var(--be-text-m);
530
+ font-weight: var(--be-weight-strong);
531
+ font-variant-numeric: tabular-nums;
532
+ cursor: pointer;
533
+
534
+ &:hover {
535
+ background: color-mix(in srgb, var(--theme-error-500) 16%, transparent);
536
+ }
537
+ }
538
+
539
+ .builder-styles__popover.builder-bar__problems-popover {
540
+ width: 340px;
541
+ padding: 6px;
542
+ border-color: var(--be-border);
543
+ box-shadow: var(--be-shadow);
544
+ }
545
+
546
+ .builder-bar__problems-title {
547
+ margin: 2px 6px 6px;
548
+ color: var(--theme-text);
549
+ font-size: var(--be-text-m);
550
+ font-weight: var(--be-weight-strong);
551
+ }
552
+
553
+ .builder-bar__problems-list {
554
+ display: flex;
555
+ flex-direction: column;
556
+ gap: 2px;
557
+ margin: 0;
558
+ padding: 0;
559
+ list-style: none;
560
+ }
561
+
562
+ .builder-bar__problem {
563
+ display: flex;
564
+ align-items: flex-start;
565
+ gap: 8px;
566
+ width: 100%;
567
+ padding: 6px;
568
+ border: 0;
569
+ border-radius: var(--be-radius);
570
+ background: none;
571
+ color: var(--theme-text);
572
+ font: inherit;
573
+ text-align: left;
574
+ cursor: pointer;
575
+
576
+ &:hover,
577
+ &:focus-visible {
578
+ background: var(--be-hover);
579
+ }
580
+
581
+ &:hover .builder-bar__problem-action {
582
+ color: var(--theme-text);
583
+ }
584
+ }
585
+
586
+ .builder-bar__problem-icon {
587
+ display: inline-flex;
588
+ flex: none;
589
+ padding-top: 1px;
590
+ color: var(--theme-error-500);
591
+ }
592
+
593
+ .builder-bar__problem-text {
594
+ display: flex;
595
+ flex: 1;
596
+ flex-direction: column;
597
+ gap: 1px;
598
+ min-width: 0;
599
+ }
600
+
601
+ .builder-bar__problem-where {
602
+ overflow: hidden;
603
+ font-size: var(--be-text-m);
604
+ font-weight: var(--be-weight-medium);
605
+ text-overflow: ellipsis;
606
+ white-space: nowrap;
607
+ }
608
+
609
+ .builder-bar__problem-message {
610
+ color: var(--theme-elevation-650, var(--theme-elevation-600));
611
+ font-size: var(--be-text-m);
612
+ line-height: 1.4;
613
+ }
614
+
615
+ .builder-bar__problem-action {
616
+ flex: none;
617
+ padding-top: 1px;
618
+ color: var(--be-muted);
619
+ font-size: var(--be-text-m);
620
+ }
621
+
622
+ // ---- Loading skeleton below the bar ------------------------------------------------------------
623
+
624
+ .builder-editor__body--loading {
625
+ .builder-editor__left,
626
+ .builder-editor__right {
627
+ gap: 10px;
628
+ padding: 12px;
629
+ }
630
+
631
+ .builder-editor__stage {
632
+ padding: 24px;
633
+ background: var(--theme-elevation-50);
634
+ }
635
+ }
636
+
637
+ // Payload opens its lock dialogs ("Document locked", "taken over", "modified by another user")
638
+ // with z-index var(--z-modal) = 30, but drawers get 100 + depth. Inside the settings drawer the
639
+ // dialog would open hidden behind the drawer. Lift it above any drawer.
640
+ .payload__modal-item.document-locked,
641
+ .payload__modal-item.document-take-over,
642
+ .payload__modal-item.document-stale-data {
643
+ z-index: 200;
644
+ }
645
+ }