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,363 +1,363 @@
1
- // Theme fields in Payload's admin. Payload CSS variables only, no Tailwind.
2
- @layer payload-default {
3
- .theme-field {
4
- margin-bottom: var(--spacing-field, calc(var(--base) * 1.5));
5
- }
6
-
7
- // Shared look of the text inputs, close to Payload's own inputs.
8
- %theme-input {
9
- height: calc(var(--base) * 2);
10
- padding: 0 calc(var(--base) * 0.5);
11
- border: 1px solid var(--theme-elevation-150);
12
- border-radius: var(--style-radius-s, var(--border-radius-m));
13
- background: var(--theme-input-bg);
14
- color: var(--theme-text);
15
- font: inherit;
16
- font-size: var(--font-body-size-m, 13px);
17
- box-sizing: border-box;
18
- outline: none;
19
-
20
- &:hover {
21
- border-color: var(--theme-elevation-250);
22
- }
23
-
24
- &:focus {
25
- border-color: var(--theme-elevation-400);
26
- }
27
-
28
- &:disabled {
29
- background: var(--theme-elevation-50);
30
- color: var(--theme-elevation-500);
31
- }
32
- }
33
-
34
- %theme-quiet-button {
35
- flex-shrink: 0;
36
- padding: calc(var(--base) * 0.25) calc(var(--base) * 0.5);
37
- border: none;
38
- border-radius: var(--style-radius-s, var(--border-radius-m));
39
- background: none;
40
- color: var(--theme-elevation-600);
41
- font: inherit;
42
- font-size: var(--font-body-size-s, 12px);
43
- cursor: pointer;
44
-
45
- &:hover {
46
- background: var(--theme-elevation-100);
47
- color: var(--theme-text);
48
- }
49
- }
50
-
51
- // Popups render in a portal at the end of <body>: above Payload's drawers and modals.
52
- .theme-popover {
53
- z-index: 10000;
54
- }
55
-
56
- %theme-popup {
57
- border: 1px solid var(--theme-elevation-150);
58
- border-radius: var(--style-radius-m, var(--border-radius-m));
59
- background: var(--theme-elevation-0);
60
- box-shadow: 0 6px 20px rgb(0 0 0 / 14%);
61
- }
62
-
63
- // Color ---------------------------------------------------------------------------------------
64
-
65
- .theme-color {
66
- &__controls {
67
- display: flex;
68
- align-items: center;
69
- gap: calc(var(--base) * 0.5);
70
- }
71
-
72
- &__swatch {
73
- flex-shrink: 0;
74
- width: calc(var(--base) * 2);
75
- height: calc(var(--base) * 2);
76
- padding: 0;
77
- border: 1px solid var(--theme-elevation-200);
78
- border-radius: var(--style-radius-s, var(--border-radius-m));
79
- cursor: pointer;
80
-
81
- &:hover {
82
- box-shadow: 0 0 0 2px var(--theme-elevation-150);
83
- }
84
-
85
- &:focus-visible {
86
- outline: 2px solid var(--theme-elevation-500);
87
- outline-offset: 2px;
88
- }
89
-
90
- // "Not set": a diagonal line over the input background.
91
- &--empty {
92
- background: linear-gradient(
93
- to top right,
94
- transparent calc(50% - 1px),
95
- var(--theme-error-500) calc(50% - 1px),
96
- var(--theme-error-500) calc(50% + 1px),
97
- transparent calc(50% + 1px)
98
- ),
99
- var(--theme-input-bg);
100
- }
101
- }
102
-
103
- &__hex {
104
- @extend %theme-input;
105
- width: calc(var(--base) * 6);
106
- font-family: var(--font-mono, monospace);
107
- }
108
-
109
- &__popup {
110
- @extend %theme-popup;
111
- width: 224px;
112
- padding: calc(var(--base) * 0.5);
113
-
114
- .react-colorful {
115
- width: 100%;
116
- height: 150px;
117
- }
118
-
119
- .react-colorful__saturation {
120
- border-radius: 4px 4px 0 0;
121
- }
122
-
123
- .react-colorful__hue {
124
- height: 12px;
125
- border-radius: 0 0 4px 4px;
126
- }
127
-
128
- .react-colorful__pointer {
129
- width: 16px;
130
- height: 16px;
131
- }
132
- }
133
-
134
- &__presets {
135
- display: grid;
136
- grid-template-columns: repeat(6, 1fr);
137
- gap: 4px;
138
- margin: calc(var(--base) * 0.5) 0;
139
- }
140
-
141
- &__preset {
142
- width: 100%;
143
- aspect-ratio: 1;
144
- padding: 0;
145
- border: 1px solid var(--theme-elevation-150);
146
- border-radius: 4px;
147
- cursor: pointer;
148
-
149
- &:hover,
150
- &:focus-visible {
151
- border-color: var(--theme-elevation-500);
152
- outline: none;
153
- }
154
- }
155
-
156
- &__clear {
157
- @extend %theme-quiet-button;
158
- width: 100%;
159
- }
160
- }
161
-
162
- // Font ----------------------------------------------------------------------------------------
163
-
164
- .theme-font {
165
- &__row {
166
- display: flex;
167
- align-items: center;
168
- gap: calc(var(--base) * 0.5);
169
- }
170
-
171
- &__input {
172
- @extend %theme-input;
173
- flex: 1;
174
- min-width: 0;
175
- }
176
-
177
- &__clear {
178
- @extend %theme-quiet-button;
179
- }
180
-
181
- &__popup {
182
- @extend %theme-popup;
183
- width: var(--anchor-width);
184
- min-width: 220px;
185
- overflow: hidden;
186
- }
187
-
188
- &__list {
189
- max-height: 280px;
190
- overflow-y: auto;
191
- padding: 4px 0;
192
- }
193
-
194
- &__option {
195
- display: block;
196
- padding: 6px 10px;
197
- color: var(--theme-text);
198
- font-size: 15px;
199
- cursor: pointer;
200
-
201
- &[data-highlighted] {
202
- background: var(--theme-elevation-100);
203
- }
204
-
205
- &[data-selected] {
206
- font-weight: 600;
207
- }
208
- }
209
-
210
- &__empty:not(:empty) {
211
- padding: 8px 10px;
212
- color: var(--theme-elevation-500);
213
- font-size: var(--font-body-size-s, 12px);
214
- }
215
-
216
- &__preview {
217
- margin-top: calc(var(--base) * 0.5);
218
- color: var(--theme-text);
219
- font-size: 16px;
220
- }
221
- }
222
-
223
- // Slider --------------------------------------------------------------------------------------
224
-
225
- .theme-slider {
226
- &__controls {
227
- display: flex;
228
- align-items: center;
229
- gap: calc(var(--base) * 0.5);
230
- max-width: 480px;
231
- }
232
-
233
- // The slider itself is the shared one (`admin/editor/ui/Slider.tsx`).
234
-
235
- &__number {
236
- @extend %theme-input;
237
- width: calc(var(--base) * 3.5);
238
- text-align: right;
239
- }
240
-
241
- &__unit {
242
- color: var(--theme-elevation-500);
243
- font-size: var(--font-body-size-s, 12px);
244
- }
245
-
246
- &__reset {
247
- @extend %theme-quiet-button;
248
- }
249
- }
250
-
251
- // Variables ------------------------------------------------------------------------------------
252
-
253
- .theme-variable-size {
254
- &__bar {
255
- display: block;
256
- max-width: 100%;
257
- height: 4px;
258
- margin-top: calc(var(--base) * 0.375);
259
- border-radius: 2px;
260
- background: var(--theme-elevation-300);
261
- }
262
- }
263
-
264
- .theme-variable-label {
265
- display: inline-flex;
266
- align-items: center;
267
- gap: calc(var(--base) * 0.5);
268
- min-width: 0;
269
-
270
- &__preview {
271
- display: inline-grid;
272
- flex-shrink: 0;
273
- place-items: center;
274
- width: 18px;
275
- height: 18px;
276
- overflow: hidden;
277
- border: 1px solid var(--theme-elevation-200);
278
- border-radius: 4px;
279
- background: var(--theme-elevation-50);
280
-
281
- &[data-empty] {
282
- background: repeating-conic-gradient(var(--theme-elevation-100) 0 25%, var(--theme-elevation-0) 0 50%) 0 0 / 8px 8px;
283
- }
284
-
285
- &--font {
286
- color: var(--theme-text);
287
- font-size: 11px;
288
- line-height: 1;
289
- }
290
-
291
- &--size {
292
- justify-items: start;
293
- padding: 0 2px;
294
-
295
- > span {
296
- display: block;
297
- max-width: 100%;
298
- height: 4px;
299
- border-radius: 2px;
300
- background: var(--theme-elevation-500);
301
- }
302
- }
303
- }
304
-
305
- &__name {
306
- color: var(--theme-text);
307
- font-family: var(--font-mono, monospace);
308
- font-weight: 500;
309
- }
310
-
311
- &__meta {
312
- overflow: hidden;
313
- color: var(--theme-elevation-500);
314
- text-overflow: ellipsis;
315
- white-space: nowrap;
316
- }
317
- }
318
-
319
- .theme-variables-warning {
320
- margin: calc(var(--base) * -0.5) 0 var(--spacing-field, calc(var(--base) * 1.5));
321
- padding: calc(var(--base) * 0.75) var(--base);
322
- border: 1px solid var(--theme-warning-250);
323
- border-radius: var(--style-radius-m, var(--border-radius-m));
324
- background: var(--theme-warning-50);
325
- color: var(--theme-warning-800);
326
- font-size: var(--font-body-size-m, 13px);
327
-
328
- p {
329
- margin: 0;
330
- }
331
-
332
- code {
333
- padding: 0 3px;
334
- border-radius: 3px;
335
- background: var(--theme-warning-100);
336
- font-size: 0.95em;
337
- }
338
-
339
- a {
340
- color: inherit;
341
- text-decoration: underline;
342
- text-underline-offset: 2px;
343
- }
344
-
345
- &__title {
346
- font-weight: 600;
347
- }
348
-
349
- &__list {
350
- display: flex;
351
- flex-direction: column;
352
- gap: calc(var(--base) * 0.5);
353
- margin: calc(var(--base) * 0.5) 0;
354
- padding: 0;
355
- list-style: none;
356
- }
357
-
358
- &__where,
359
- &__hint {
360
- color: var(--theme-warning-650);
361
- }
362
- }
363
- }
1
+ // Theme fields in Payload's admin. Payload CSS variables only, no Tailwind.
2
+ @layer payload-default {
3
+ .theme-field {
4
+ margin-bottom: var(--spacing-field, calc(var(--base) * 1.5));
5
+ }
6
+
7
+ // Shared look of the text inputs, close to Payload's own inputs.
8
+ %theme-input {
9
+ height: calc(var(--base) * 2);
10
+ padding: 0 calc(var(--base) * 0.5);
11
+ border: 1px solid var(--theme-elevation-150);
12
+ border-radius: var(--style-radius-s, var(--border-radius-m));
13
+ background: var(--theme-input-bg);
14
+ color: var(--theme-text);
15
+ font: inherit;
16
+ font-size: var(--font-body-size-m, 13px);
17
+ box-sizing: border-box;
18
+ outline: none;
19
+
20
+ &:hover {
21
+ border-color: var(--theme-elevation-250);
22
+ }
23
+
24
+ &:focus {
25
+ border-color: var(--theme-elevation-400);
26
+ }
27
+
28
+ &:disabled {
29
+ background: var(--theme-elevation-50);
30
+ color: var(--theme-elevation-500);
31
+ }
32
+ }
33
+
34
+ %theme-quiet-button {
35
+ flex-shrink: 0;
36
+ padding: calc(var(--base) * 0.25) calc(var(--base) * 0.5);
37
+ border: none;
38
+ border-radius: var(--style-radius-s, var(--border-radius-m));
39
+ background: none;
40
+ color: var(--theme-elevation-600);
41
+ font: inherit;
42
+ font-size: var(--font-body-size-s, 12px);
43
+ cursor: pointer;
44
+
45
+ &:hover {
46
+ background: var(--theme-elevation-100);
47
+ color: var(--theme-text);
48
+ }
49
+ }
50
+
51
+ // Popups render in a portal at the end of <body>: above Payload's drawers and modals.
52
+ .theme-popover {
53
+ z-index: 10000;
54
+ }
55
+
56
+ %theme-popup {
57
+ border: 1px solid var(--theme-elevation-150);
58
+ border-radius: var(--style-radius-m, var(--border-radius-m));
59
+ background: var(--theme-elevation-0);
60
+ box-shadow: 0 6px 20px rgb(0 0 0 / 14%);
61
+ }
62
+
63
+ // Color ---------------------------------------------------------------------------------------
64
+
65
+ .theme-color {
66
+ &__controls {
67
+ display: flex;
68
+ align-items: center;
69
+ gap: calc(var(--base) * 0.5);
70
+ }
71
+
72
+ &__swatch {
73
+ flex-shrink: 0;
74
+ width: calc(var(--base) * 2);
75
+ height: calc(var(--base) * 2);
76
+ padding: 0;
77
+ border: 1px solid var(--theme-elevation-200);
78
+ border-radius: var(--style-radius-s, var(--border-radius-m));
79
+ cursor: pointer;
80
+
81
+ &:hover {
82
+ box-shadow: 0 0 0 2px var(--theme-elevation-150);
83
+ }
84
+
85
+ &:focus-visible {
86
+ outline: 2px solid var(--theme-elevation-500);
87
+ outline-offset: 2px;
88
+ }
89
+
90
+ // "Not set": a diagonal line over the input background.
91
+ &--empty {
92
+ background: linear-gradient(
93
+ to top right,
94
+ transparent calc(50% - 1px),
95
+ var(--theme-error-500) calc(50% - 1px),
96
+ var(--theme-error-500) calc(50% + 1px),
97
+ transparent calc(50% + 1px)
98
+ ),
99
+ var(--theme-input-bg);
100
+ }
101
+ }
102
+
103
+ &__hex {
104
+ @extend %theme-input;
105
+ width: calc(var(--base) * 6);
106
+ font-family: var(--font-mono, monospace);
107
+ }
108
+
109
+ &__popup {
110
+ @extend %theme-popup;
111
+ width: 224px;
112
+ padding: calc(var(--base) * 0.5);
113
+
114
+ .react-colorful {
115
+ width: 100%;
116
+ height: 150px;
117
+ }
118
+
119
+ .react-colorful__saturation {
120
+ border-radius: 4px 4px 0 0;
121
+ }
122
+
123
+ .react-colorful__hue {
124
+ height: 12px;
125
+ border-radius: 0 0 4px 4px;
126
+ }
127
+
128
+ .react-colorful__pointer {
129
+ width: 16px;
130
+ height: 16px;
131
+ }
132
+ }
133
+
134
+ &__presets {
135
+ display: grid;
136
+ grid-template-columns: repeat(6, 1fr);
137
+ gap: 4px;
138
+ margin: calc(var(--base) * 0.5) 0;
139
+ }
140
+
141
+ &__preset {
142
+ width: 100%;
143
+ aspect-ratio: 1;
144
+ padding: 0;
145
+ border: 1px solid var(--theme-elevation-150);
146
+ border-radius: 4px;
147
+ cursor: pointer;
148
+
149
+ &:hover,
150
+ &:focus-visible {
151
+ border-color: var(--theme-elevation-500);
152
+ outline: none;
153
+ }
154
+ }
155
+
156
+ &__clear {
157
+ @extend %theme-quiet-button;
158
+ width: 100%;
159
+ }
160
+ }
161
+
162
+ // Font ----------------------------------------------------------------------------------------
163
+
164
+ .theme-font {
165
+ &__row {
166
+ display: flex;
167
+ align-items: center;
168
+ gap: calc(var(--base) * 0.5);
169
+ }
170
+
171
+ &__input {
172
+ @extend %theme-input;
173
+ flex: 1;
174
+ min-width: 0;
175
+ }
176
+
177
+ &__clear {
178
+ @extend %theme-quiet-button;
179
+ }
180
+
181
+ &__popup {
182
+ @extend %theme-popup;
183
+ width: var(--anchor-width);
184
+ min-width: 220px;
185
+ overflow: hidden;
186
+ }
187
+
188
+ &__list {
189
+ max-height: 280px;
190
+ overflow-y: auto;
191
+ padding: 4px 0;
192
+ }
193
+
194
+ &__option {
195
+ display: block;
196
+ padding: 6px 10px;
197
+ color: var(--theme-text);
198
+ font-size: 15px;
199
+ cursor: pointer;
200
+
201
+ &[data-highlighted] {
202
+ background: var(--theme-elevation-100);
203
+ }
204
+
205
+ &[data-selected] {
206
+ font-weight: 600;
207
+ }
208
+ }
209
+
210
+ &__empty:not(:empty) {
211
+ padding: 8px 10px;
212
+ color: var(--theme-elevation-500);
213
+ font-size: var(--font-body-size-s, 12px);
214
+ }
215
+
216
+ &__preview {
217
+ margin-top: calc(var(--base) * 0.5);
218
+ color: var(--theme-text);
219
+ font-size: 16px;
220
+ }
221
+ }
222
+
223
+ // Slider --------------------------------------------------------------------------------------
224
+
225
+ .theme-slider {
226
+ &__controls {
227
+ display: flex;
228
+ align-items: center;
229
+ gap: calc(var(--base) * 0.5);
230
+ max-width: 480px;
231
+ }
232
+
233
+ // The slider itself is the shared one (`admin/editor/ui/Slider.tsx`).
234
+
235
+ &__number {
236
+ @extend %theme-input;
237
+ width: calc(var(--base) * 3.5);
238
+ text-align: right;
239
+ }
240
+
241
+ &__unit {
242
+ color: var(--theme-elevation-500);
243
+ font-size: var(--font-body-size-s, 12px);
244
+ }
245
+
246
+ &__reset {
247
+ @extend %theme-quiet-button;
248
+ }
249
+ }
250
+
251
+ // Variables ------------------------------------------------------------------------------------
252
+
253
+ .theme-variable-size {
254
+ &__bar {
255
+ display: block;
256
+ max-width: 100%;
257
+ height: 4px;
258
+ margin-top: calc(var(--base) * 0.375);
259
+ border-radius: 2px;
260
+ background: var(--theme-elevation-300);
261
+ }
262
+ }
263
+
264
+ .theme-variable-label {
265
+ display: inline-flex;
266
+ align-items: center;
267
+ gap: calc(var(--base) * 0.5);
268
+ min-width: 0;
269
+
270
+ &__preview {
271
+ display: inline-grid;
272
+ flex-shrink: 0;
273
+ place-items: center;
274
+ width: 18px;
275
+ height: 18px;
276
+ overflow: hidden;
277
+ border: 1px solid var(--theme-elevation-200);
278
+ border-radius: 4px;
279
+ background: var(--theme-elevation-50);
280
+
281
+ &[data-empty] {
282
+ background: repeating-conic-gradient(var(--theme-elevation-100) 0 25%, var(--theme-elevation-0) 0 50%) 0 0 / 8px 8px;
283
+ }
284
+
285
+ &--font {
286
+ color: var(--theme-text);
287
+ font-size: 11px;
288
+ line-height: 1;
289
+ }
290
+
291
+ &--size {
292
+ justify-items: start;
293
+ padding: 0 2px;
294
+
295
+ > span {
296
+ display: block;
297
+ max-width: 100%;
298
+ height: 4px;
299
+ border-radius: 2px;
300
+ background: var(--theme-elevation-500);
301
+ }
302
+ }
303
+ }
304
+
305
+ &__name {
306
+ color: var(--theme-text);
307
+ font-family: var(--font-mono, monospace);
308
+ font-weight: 500;
309
+ }
310
+
311
+ &__meta {
312
+ overflow: hidden;
313
+ color: var(--theme-elevation-500);
314
+ text-overflow: ellipsis;
315
+ white-space: nowrap;
316
+ }
317
+ }
318
+
319
+ .theme-variables-warning {
320
+ margin: calc(var(--base) * -0.5) 0 var(--spacing-field, calc(var(--base) * 1.5));
321
+ padding: calc(var(--base) * 0.75) var(--base);
322
+ border: 1px solid var(--theme-warning-250);
323
+ border-radius: var(--style-radius-m, var(--border-radius-m));
324
+ background: var(--theme-warning-50);
325
+ color: var(--theme-warning-800);
326
+ font-size: var(--font-body-size-m, 13px);
327
+
328
+ p {
329
+ margin: 0;
330
+ }
331
+
332
+ code {
333
+ padding: 0 3px;
334
+ border-radius: 3px;
335
+ background: var(--theme-warning-100);
336
+ font-size: 0.95em;
337
+ }
338
+
339
+ a {
340
+ color: inherit;
341
+ text-decoration: underline;
342
+ text-underline-offset: 2px;
343
+ }
344
+
345
+ &__title {
346
+ font-weight: 600;
347
+ }
348
+
349
+ &__list {
350
+ display: flex;
351
+ flex-direction: column;
352
+ gap: calc(var(--base) * 0.5);
353
+ margin: calc(var(--base) * 0.5) 0;
354
+ padding: 0;
355
+ list-style: none;
356
+ }
357
+
358
+ &__where,
359
+ &__hint {
360
+ color: var(--theme-warning-650);
361
+ }
362
+ }
363
+ }