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,262 +1,262 @@
1
- // The class manager drawer. Payload CSS variables and the editor's type scale only, no Tailwind.
2
-
3
- @layer payload-default {
4
- .builder-class-manager {
5
- &__body {
6
- display: flex;
7
- flex-direction: column;
8
- gap: calc(var(--base) * 0.5);
9
- max-width: 720px;
10
- padding-bottom: calc(var(--base) * 2);
11
- }
12
-
13
- &__toolbar {
14
- display: flex;
15
- align-items: center;
16
- gap: calc(var(--base) * 0.5);
17
- }
18
-
19
- &__search {
20
- display: flex;
21
- flex: 1;
22
- align-items: center;
23
- gap: 6px;
24
- height: calc(var(--base) * 2);
25
- padding: 0 calc(var(--base) * 0.5);
26
- border: 1px solid var(--theme-elevation-150);
27
- border-radius: var(--style-radius-s, 4px);
28
- background: var(--theme-input-bg, var(--theme-elevation-0));
29
- color: var(--theme-elevation-500);
30
-
31
- &:focus-within {
32
- border-color: var(--theme-elevation-400);
33
- }
34
-
35
- input {
36
- flex: 1;
37
- min-width: 0;
38
- height: 100%;
39
- padding: 0;
40
- border: 0;
41
- background: none;
42
- color: var(--theme-text);
43
- font: inherit;
44
- font-size: var(--be-text-m, 13px);
45
- outline: none;
46
- }
47
- }
48
-
49
- &__button {
50
- flex-shrink: 0;
51
- height: calc(var(--base) * 2);
52
- padding: 0 calc(var(--base) * 0.75);
53
- border: 1px solid var(--theme-elevation-150);
54
- border-radius: var(--style-radius-s, 4px);
55
- background: var(--theme-elevation-0);
56
- color: var(--theme-text);
57
- font: inherit;
58
- font-size: var(--be-text-m, 13px);
59
- cursor: pointer;
60
-
61
- &:hover:not(:disabled) {
62
- border-color: var(--theme-elevation-300);
63
- background: var(--theme-elevation-50);
64
- }
65
-
66
- &:disabled {
67
- color: var(--theme-elevation-400);
68
- cursor: default;
69
- }
70
-
71
- &:focus-visible {
72
- outline: 2px solid var(--theme-elevation-500);
73
- outline-offset: 1px;
74
- }
75
- }
76
-
77
- &__summary {
78
- margin: 0;
79
- color: var(--theme-elevation-500);
80
- font-size: var(--be-text-s, 11px);
81
- }
82
-
83
- &__empty {
84
- margin: calc(var(--base) * 1.5) 0;
85
- color: var(--theme-elevation-600);
86
- font-size: var(--be-text-m, 13px);
87
- }
88
-
89
- &__list {
90
- margin: 0;
91
- padding: 0;
92
- border-top: 1px solid var(--theme-elevation-100);
93
- list-style: none;
94
- }
95
-
96
- &__row {
97
- border-bottom: 1px solid var(--theme-elevation-100);
98
- }
99
-
100
- &__line {
101
- display: flex;
102
- align-items: center;
103
- gap: 4px;
104
- min-height: 36px;
105
-
106
- &:hover,
107
- &:focus-within {
108
- .builder-class-manager__actions {
109
- opacity: 1;
110
- }
111
- }
112
- }
113
-
114
- &__main {
115
- display: flex;
116
- flex: 1;
117
- align-items: baseline;
118
- gap: calc(var(--base) * 0.5);
119
- min-width: 0;
120
- padding: 8px 6px;
121
- border: 0;
122
- border-radius: var(--style-radius-s, 4px);
123
- background: none;
124
- color: var(--theme-text);
125
- font: inherit;
126
- font-size: var(--be-text-m, 13px);
127
- text-align: left;
128
- cursor: pointer;
129
-
130
- &:hover:not(:disabled) {
131
- background: var(--theme-elevation-50);
132
- }
133
-
134
- &:disabled {
135
- cursor: default;
136
- }
137
-
138
- &:focus-visible {
139
- outline: 2px solid var(--theme-elevation-500);
140
- outline-offset: -2px;
141
- }
142
- }
143
-
144
- &__name {
145
- flex-shrink: 0;
146
- font-family: var(--font-mono, monospace);
147
- font-weight: var(--be-weight-medium, 500);
148
- }
149
-
150
- &__label {
151
- overflow: hidden;
152
- color: var(--theme-elevation-600);
153
- text-overflow: ellipsis;
154
- white-space: nowrap;
155
- }
156
-
157
- &__usage {
158
- flex-shrink: 0;
159
- margin-left: auto;
160
- color: var(--theme-elevation-600);
161
- font-size: var(--be-text-s, 11px);
162
- font-variant-numeric: tabular-nums;
163
-
164
- &[data-unused] {
165
- color: var(--theme-elevation-400);
166
- }
167
- }
168
-
169
- &__badge {
170
- flex-shrink: 0;
171
- padding: 1px 6px;
172
- border-radius: 999px;
173
- background: var(--theme-warning-100);
174
- color: var(--theme-warning-800);
175
- font-size: var(--be-text-s, 11px);
176
- }
177
-
178
- &__actions {
179
- display: flex;
180
- flex-shrink: 0;
181
- gap: 2px;
182
- opacity: 0;
183
- transition: opacity 120ms ease-out;
184
-
185
- @media (hover: none) {
186
- opacity: 1;
187
- }
188
-
189
- button {
190
- display: grid;
191
- place-items: center;
192
- width: 26px;
193
- height: 26px;
194
- padding: 0;
195
- border: 0;
196
- border-radius: var(--style-radius-s, 4px);
197
- background: none;
198
- color: var(--theme-elevation-600);
199
- cursor: pointer;
200
-
201
- &:hover {
202
- background: var(--theme-elevation-100);
203
- color: var(--theme-text);
204
- }
205
-
206
- &[data-danger]:hover {
207
- background: var(--theme-error-50);
208
- color: var(--theme-error-600);
209
- }
210
-
211
- &:focus-visible {
212
- outline: 2px solid var(--theme-elevation-500);
213
- outline-offset: 1px;
214
- }
215
- }
216
- }
217
-
218
- &__docs {
219
- margin: 0 0 8px;
220
- padding: 0 0 0 calc(var(--base) * 0.75);
221
- list-style: none;
222
-
223
- a {
224
- display: flex;
225
- align-items: center;
226
- gap: calc(var(--base) * 0.5);
227
- padding: 5px 6px;
228
- border-radius: var(--style-radius-s, 4px);
229
- color: var(--theme-text);
230
- font-size: var(--be-text-m, 13px);
231
- text-decoration: none;
232
-
233
- &:hover {
234
- background: var(--theme-elevation-50);
235
-
236
- .builder-class-manager__doc-title {
237
- text-decoration: underline;
238
- text-underline-offset: 2px;
239
- }
240
- }
241
-
242
- svg {
243
- flex-shrink: 0;
244
- color: var(--theme-elevation-500);
245
- }
246
- }
247
- }
248
-
249
- &__doc-title {
250
- overflow: hidden;
251
- text-overflow: ellipsis;
252
- white-space: nowrap;
253
- }
254
-
255
- &__doc-meta {
256
- flex-shrink: 0;
257
- margin-left: auto;
258
- color: var(--theme-elevation-500);
259
- font-size: var(--be-text-s, 11px);
260
- }
261
- }
262
- }
1
+ // The class manager drawer. Payload CSS variables and the editor's type scale only, no Tailwind.
2
+
3
+ @layer payload-default {
4
+ .builder-class-manager {
5
+ &__body {
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: calc(var(--base) * 0.5);
9
+ max-width: 720px;
10
+ padding-bottom: calc(var(--base) * 2);
11
+ }
12
+
13
+ &__toolbar {
14
+ display: flex;
15
+ align-items: center;
16
+ gap: calc(var(--base) * 0.5);
17
+ }
18
+
19
+ &__search {
20
+ display: flex;
21
+ flex: 1;
22
+ align-items: center;
23
+ gap: 6px;
24
+ height: calc(var(--base) * 2);
25
+ padding: 0 calc(var(--base) * 0.5);
26
+ border: 1px solid var(--theme-elevation-150);
27
+ border-radius: var(--style-radius-s, 4px);
28
+ background: var(--theme-input-bg, var(--theme-elevation-0));
29
+ color: var(--theme-elevation-500);
30
+
31
+ &:focus-within {
32
+ border-color: var(--theme-elevation-400);
33
+ }
34
+
35
+ input {
36
+ flex: 1;
37
+ min-width: 0;
38
+ height: 100%;
39
+ padding: 0;
40
+ border: 0;
41
+ background: none;
42
+ color: var(--theme-text);
43
+ font: inherit;
44
+ font-size: var(--be-text-m, 13px);
45
+ outline: none;
46
+ }
47
+ }
48
+
49
+ &__button {
50
+ flex-shrink: 0;
51
+ height: calc(var(--base) * 2);
52
+ padding: 0 calc(var(--base) * 0.75);
53
+ border: 1px solid var(--theme-elevation-150);
54
+ border-radius: var(--style-radius-s, 4px);
55
+ background: var(--theme-elevation-0);
56
+ color: var(--theme-text);
57
+ font: inherit;
58
+ font-size: var(--be-text-m, 13px);
59
+ cursor: pointer;
60
+
61
+ &:hover:not(:disabled) {
62
+ border-color: var(--theme-elevation-300);
63
+ background: var(--theme-elevation-50);
64
+ }
65
+
66
+ &:disabled {
67
+ color: var(--theme-elevation-400);
68
+ cursor: default;
69
+ }
70
+
71
+ &:focus-visible {
72
+ outline: 2px solid var(--theme-elevation-500);
73
+ outline-offset: 1px;
74
+ }
75
+ }
76
+
77
+ &__summary {
78
+ margin: 0;
79
+ color: var(--theme-elevation-500);
80
+ font-size: var(--be-text-s, 11px);
81
+ }
82
+
83
+ &__empty {
84
+ margin: calc(var(--base) * 1.5) 0;
85
+ color: var(--theme-elevation-600);
86
+ font-size: var(--be-text-m, 13px);
87
+ }
88
+
89
+ &__list {
90
+ margin: 0;
91
+ padding: 0;
92
+ border-top: 1px solid var(--theme-elevation-100);
93
+ list-style: none;
94
+ }
95
+
96
+ &__row {
97
+ border-bottom: 1px solid var(--theme-elevation-100);
98
+ }
99
+
100
+ &__line {
101
+ display: flex;
102
+ align-items: center;
103
+ gap: 4px;
104
+ min-height: 36px;
105
+
106
+ &:hover,
107
+ &:focus-within {
108
+ .builder-class-manager__actions {
109
+ opacity: 1;
110
+ }
111
+ }
112
+ }
113
+
114
+ &__main {
115
+ display: flex;
116
+ flex: 1;
117
+ align-items: baseline;
118
+ gap: calc(var(--base) * 0.5);
119
+ min-width: 0;
120
+ padding: 8px 6px;
121
+ border: 0;
122
+ border-radius: var(--style-radius-s, 4px);
123
+ background: none;
124
+ color: var(--theme-text);
125
+ font: inherit;
126
+ font-size: var(--be-text-m, 13px);
127
+ text-align: left;
128
+ cursor: pointer;
129
+
130
+ &:hover:not(:disabled) {
131
+ background: var(--theme-elevation-50);
132
+ }
133
+
134
+ &:disabled {
135
+ cursor: default;
136
+ }
137
+
138
+ &:focus-visible {
139
+ outline: 2px solid var(--theme-elevation-500);
140
+ outline-offset: -2px;
141
+ }
142
+ }
143
+
144
+ &__name {
145
+ flex-shrink: 0;
146
+ font-family: var(--font-mono, monospace);
147
+ font-weight: var(--be-weight-medium, 500);
148
+ }
149
+
150
+ &__label {
151
+ overflow: hidden;
152
+ color: var(--theme-elevation-600);
153
+ text-overflow: ellipsis;
154
+ white-space: nowrap;
155
+ }
156
+
157
+ &__usage {
158
+ flex-shrink: 0;
159
+ margin-left: auto;
160
+ color: var(--theme-elevation-600);
161
+ font-size: var(--be-text-s, 11px);
162
+ font-variant-numeric: tabular-nums;
163
+
164
+ &[data-unused] {
165
+ color: var(--theme-elevation-400);
166
+ }
167
+ }
168
+
169
+ &__badge {
170
+ flex-shrink: 0;
171
+ padding: 1px 6px;
172
+ border-radius: 999px;
173
+ background: var(--theme-warning-100);
174
+ color: var(--theme-warning-800);
175
+ font-size: var(--be-text-s, 11px);
176
+ }
177
+
178
+ &__actions {
179
+ display: flex;
180
+ flex-shrink: 0;
181
+ gap: 2px;
182
+ opacity: 0;
183
+ transition: opacity 120ms ease-out;
184
+
185
+ @media (hover: none) {
186
+ opacity: 1;
187
+ }
188
+
189
+ button {
190
+ display: grid;
191
+ place-items: center;
192
+ width: 26px;
193
+ height: 26px;
194
+ padding: 0;
195
+ border: 0;
196
+ border-radius: var(--style-radius-s, 4px);
197
+ background: none;
198
+ color: var(--theme-elevation-600);
199
+ cursor: pointer;
200
+
201
+ &:hover {
202
+ background: var(--theme-elevation-100);
203
+ color: var(--theme-text);
204
+ }
205
+
206
+ &[data-danger]:hover {
207
+ background: var(--theme-error-50);
208
+ color: var(--theme-error-600);
209
+ }
210
+
211
+ &:focus-visible {
212
+ outline: 2px solid var(--theme-elevation-500);
213
+ outline-offset: 1px;
214
+ }
215
+ }
216
+ }
217
+
218
+ &__docs {
219
+ margin: 0 0 8px;
220
+ padding: 0 0 0 calc(var(--base) * 0.75);
221
+ list-style: none;
222
+
223
+ a {
224
+ display: flex;
225
+ align-items: center;
226
+ gap: calc(var(--base) * 0.5);
227
+ padding: 5px 6px;
228
+ border-radius: var(--style-radius-s, 4px);
229
+ color: var(--theme-text);
230
+ font-size: var(--be-text-m, 13px);
231
+ text-decoration: none;
232
+
233
+ &:hover {
234
+ background: var(--theme-elevation-50);
235
+
236
+ .builder-class-manager__doc-title {
237
+ text-decoration: underline;
238
+ text-underline-offset: 2px;
239
+ }
240
+ }
241
+
242
+ svg {
243
+ flex-shrink: 0;
244
+ color: var(--theme-elevation-500);
245
+ }
246
+ }
247
+ }
248
+
249
+ &__doc-title {
250
+ overflow: hidden;
251
+ text-overflow: ellipsis;
252
+ white-space: nowrap;
253
+ }
254
+
255
+ &__doc-meta {
256
+ flex-shrink: 0;
257
+ margin-left: auto;
258
+ color: var(--theme-elevation-500);
259
+ font-size: var(--be-text-s, 11px);
260
+ }
261
+ }
262
+ }