payload-canvas 0.6.2 → 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 (60) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +7 -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/defaults.js +17 -1
  39. package/dist/blocks/payload.js +13 -3
  40. package/dist/core/responseError.d.ts +5 -0
  41. package/dist/core/responseError.js +8 -0
  42. package/dist/css/index.d.ts +6 -0
  43. package/dist/css/index.js +40 -1
  44. package/dist/css/shared.js +2 -2
  45. package/dist/live/session.js +18 -0
  46. package/dist/live/storage.d.ts +5 -0
  47. package/dist/live/storage.js +20 -0
  48. package/dist/mcp/shared.js +16 -16
  49. package/dist/plugin/index.d.ts +14 -1
  50. package/dist/plugin/index.js +46 -8
  51. package/dist/react/canvas/BuilderCanvas.js +4 -3
  52. package/dist/react/canvas/thumbnail/ThumbnailCanvas.js +2 -1
  53. package/dist/react/components/AutoplayVideo.d.ts +3 -1
  54. package/dist/react/components/AutoplayVideo.js +4 -3
  55. package/dist/react/components/Video.d.ts +1 -0
  56. package/dist/react/components/Video.js +13 -2
  57. package/dist/react/components/videoPlayback.d.ts +13 -0
  58. package/dist/react/components/videoPlayback.js +10 -0
  59. package/dist/theme/admin/fields.scss +363 -363
  60. package/package.json +1 -1
@@ -1,240 +1,240 @@
1
- // Editor layout: the separators between the sidebars and the canvas, the left sidebar's tabs,
2
- // the canvas frame's resize handles and the scrollbar space of the panels.
3
- // Payload CSS variables only, no Tailwind.
4
-
5
- @layer payload-default {
6
- // A separator takes no space. Its hit area (::before) reaches 4 px into both neighbours.
7
- // An <hr>: no border, margin or clipping of its own.
8
- .builder-split {
9
- position: relative;
10
- z-index: 6;
11
- flex: none;
12
- width: 0;
13
- margin: 0;
14
- padding: 0;
15
- border: 0;
16
- overflow: visible;
17
- background: none;
18
- cursor: col-resize;
19
- touch-action: none;
20
- outline: none;
21
-
22
- &::before {
23
- content: '';
24
- position: absolute;
25
- inset: 0 -4px;
26
- }
27
-
28
- // The line shows on hover, on keyboard focus and while dragging.
29
- &::after {
30
- content: '';
31
- position: absolute;
32
- inset: 0 -1px;
33
- background: var(--be-accent);
34
- opacity: 0;
35
- transition: opacity 120ms ease;
36
- pointer-events: none;
37
- }
38
-
39
- &:hover::after,
40
- &:focus-visible::after {
41
- opacity: 1;
42
- transition-delay: 150ms;
43
- }
44
-
45
- &:focus-visible::after {
46
- transition-delay: 0ms;
47
- }
48
- }
49
-
50
- // While a separator or a frame handle is dragged: the resize cursor everywhere, no text
51
- // selection, no eased frame zoom (the frame must follow the pointer), and the line stays visible.
52
- .builder-editor[data-resizing] {
53
- cursor: col-resize;
54
- user-select: none;
55
-
56
- .builder-split::after {
57
- transition: none;
58
- }
59
-
60
- .builder-split:active::after {
61
- opacity: 1;
62
- }
63
-
64
- .builder-editor__frame {
65
- transition: none;
66
- }
67
- }
68
-
69
- // ---------------------------------------------------------------------------
70
- // Left sidebar: Layers, Blocks and Sections tabs (LeftPanel.tsx)
71
- // ---------------------------------------------------------------------------
72
-
73
- .builder-left__head {
74
- flex: none;
75
- padding: 8px 12px;
76
- border-bottom: 1px solid var(--be-border);
77
- // A narrow sidebar drops the tab icons first.
78
- container-type: inline-size;
79
-
80
- // Widths follow the labels, so "Sections 18" gets the room it needs.
81
- .builder-editor__segment {
82
- flex: 1 1 auto;
83
- gap: 5px;
84
- min-width: 0;
85
- padding: 0 6px;
86
- white-space: nowrap;
87
-
88
- svg {
89
- flex: none;
90
- }
91
- }
92
-
93
- // A drag rests on the tab: it opens in a moment.
94
- .builder-editor__segment[data-drag-over] {
95
- background: var(--be-accent-soft);
96
- color: var(--theme-text);
97
- box-shadow: inset 0 0 0 1px var(--be-accent);
98
- }
99
-
100
- // After the rules above, so it wins over them.
101
- @container (max-width: 250px) {
102
- .builder-editor__segment {
103
- padding: 0 4px;
104
- }
105
-
106
- .builder-editor__segment svg {
107
- display: none;
108
- }
109
- }
110
- }
111
-
112
- .builder-left__panel {
113
- display: flex;
114
- flex: 1;
115
- flex-direction: column;
116
- min-height: 0;
117
-
118
- &[hidden] {
119
- display: none;
120
- }
121
-
122
- // Blocks and Sections: the search field under the tabs.
123
- .builder-editor__insert > .builder-editor__search {
124
- margin-top: 10px;
125
- }
126
- }
127
-
128
- // Layers: the block count and the tree tools, in a slim row.
129
- .builder-editor__panel-head.builder-left__tools {
130
- height: 34px;
131
- padding: 0 8px 0 12px;
132
- }
133
-
134
- .builder-left__note {
135
- color: var(--be-muted);
136
- font-size: var(--be-text-s);
137
- font-variant-numeric: tabular-nums;
138
- }
139
-
140
- // ---------------------------------------------------------------------------
141
- // Canvas frame resize handles (FrameResize.tsx). In the frame wrapper, which has the frame's
142
- // size on screen: the handles sit in the stage padding, centered on each edge.
143
- // ---------------------------------------------------------------------------
144
-
145
- // `[data-tooltip]` and the wrapper: wins over `.builder-editor [data-tooltip] { position: relative }`.
146
- .builder-editor__frame-wrap .builder-frame-handle[data-tooltip] {
147
- position: absolute;
148
- z-index: 4;
149
- top: 50%;
150
- width: 6px;
151
- height: 44px;
152
- margin: 0;
153
- padding: 0;
154
- border: 0;
155
- border-radius: 3px;
156
- background: var(--theme-elevation-300);
157
- cursor: ew-resize;
158
- touch-action: none;
159
- transform: translateY(-50%);
160
- transition:
161
- background-color 120ms ease,
162
- height 120ms var(--be-ease);
163
-
164
- // A larger hit area than the bar.
165
- &::before {
166
- content: '';
167
- position: absolute;
168
- inset: -10px -5px;
169
- }
170
-
171
- &:hover,
172
- &:focus-visible,
173
- &:active {
174
- height: 64px;
175
- background: var(--be-accent);
176
- }
177
-
178
- &:focus-visible {
179
- outline: 2px solid var(--be-accent);
180
- outline-offset: 2px;
181
- }
182
- }
183
-
184
- .builder-frame-handle--left {
185
- left: -15px;
186
- }
187
-
188
- .builder-frame-handle--right {
189
- right: -15px;
190
- }
191
-
192
- .builder-editor[data-resizing] .builder-frame-handle {
193
- transition: none;
194
- }
195
-
196
- // The live width and breakpoint while a handle is dragged.
197
- .builder-frame-handle__label {
198
- position: absolute;
199
- z-index: 5;
200
- top: 12px;
201
- left: 50%;
202
- padding: 4px 10px;
203
- border-radius: 12px;
204
- background: var(--theme-elevation-900);
205
- color: var(--theme-elevation-0);
206
- font-size: var(--be-text-s);
207
- font-weight: var(--be-weight-medium);
208
- font-variant-numeric: tabular-nums;
209
- white-space: nowrap;
210
- pointer-events: none;
211
- transform: translateX(-50%);
212
- box-shadow: var(--be-shadow);
213
-
214
- &[hidden] {
215
- display: none;
216
- }
217
- }
218
-
219
- // ---------------------------------------------------------------------------
220
- // Scrollbar space. The scrolling panels keep room for the scrollbar, so content does not shift
221
- // when a collapse removes the scrollbar. The right padding gives up the scrollbar's width.
222
- // ---------------------------------------------------------------------------
223
-
224
- .builder-editor__outline,
225
- .builder-editor__insert-body,
226
- .builder-editor__inspector-body,
227
- .builder-assistant__scroll {
228
- scrollbar-gutter: stable;
229
- }
230
-
231
- // Two classes: wins over the padding in editor.scss, whichever stylesheet loads first.
232
- .builder-editor__left .builder-editor__insert-body,
233
- .builder-editor__right .builder-editor__inspector-body {
234
- padding-right: 4px;
235
- }
236
-
237
- .builder-editor__left .builder-editor__outline {
238
- padding-right: 0;
239
- }
240
- }
1
+ // Editor layout: the separators between the sidebars and the canvas, the left sidebar's tabs,
2
+ // the canvas frame's resize handles and the scrollbar space of the panels.
3
+ // Payload CSS variables only, no Tailwind.
4
+
5
+ @layer payload-default {
6
+ // A separator takes no space. Its hit area (::before) reaches 4 px into both neighbours.
7
+ // An <hr>: no border, margin or clipping of its own.
8
+ .builder-split {
9
+ position: relative;
10
+ z-index: 6;
11
+ flex: none;
12
+ width: 0;
13
+ margin: 0;
14
+ padding: 0;
15
+ border: 0;
16
+ overflow: visible;
17
+ background: none;
18
+ cursor: col-resize;
19
+ touch-action: none;
20
+ outline: none;
21
+
22
+ &::before {
23
+ content: '';
24
+ position: absolute;
25
+ inset: 0 -4px;
26
+ }
27
+
28
+ // The line shows on hover, on keyboard focus and while dragging.
29
+ &::after {
30
+ content: '';
31
+ position: absolute;
32
+ inset: 0 -1px;
33
+ background: var(--be-accent);
34
+ opacity: 0;
35
+ transition: opacity 120ms ease;
36
+ pointer-events: none;
37
+ }
38
+
39
+ &:hover::after,
40
+ &:focus-visible::after {
41
+ opacity: 1;
42
+ transition-delay: 150ms;
43
+ }
44
+
45
+ &:focus-visible::after {
46
+ transition-delay: 0ms;
47
+ }
48
+ }
49
+
50
+ // While a separator or a frame handle is dragged: the resize cursor everywhere, no text
51
+ // selection, no eased frame zoom (the frame must follow the pointer), and the line stays visible.
52
+ .builder-editor[data-resizing] {
53
+ cursor: col-resize;
54
+ user-select: none;
55
+
56
+ .builder-split::after {
57
+ transition: none;
58
+ }
59
+
60
+ .builder-split:active::after {
61
+ opacity: 1;
62
+ }
63
+
64
+ .builder-editor__frame {
65
+ transition: none;
66
+ }
67
+ }
68
+
69
+ // ---------------------------------------------------------------------------
70
+ // Left sidebar: Layers, Blocks and Sections tabs (LeftPanel.tsx)
71
+ // ---------------------------------------------------------------------------
72
+
73
+ .builder-left__head {
74
+ flex: none;
75
+ padding: 8px 12px;
76
+ border-bottom: 1px solid var(--be-border);
77
+ // A narrow sidebar drops the tab icons first.
78
+ container-type: inline-size;
79
+
80
+ // Widths follow the labels, so "Sections 18" gets the room it needs.
81
+ .builder-editor__segment {
82
+ flex: 1 1 auto;
83
+ gap: 5px;
84
+ min-width: 0;
85
+ padding: 0 6px;
86
+ white-space: nowrap;
87
+
88
+ svg {
89
+ flex: none;
90
+ }
91
+ }
92
+
93
+ // A drag rests on the tab: it opens in a moment.
94
+ .builder-editor__segment[data-drag-over] {
95
+ background: var(--be-accent-soft);
96
+ color: var(--theme-text);
97
+ box-shadow: inset 0 0 0 1px var(--be-accent);
98
+ }
99
+
100
+ // After the rules above, so it wins over them.
101
+ @container (max-width: 250px) {
102
+ .builder-editor__segment {
103
+ padding: 0 4px;
104
+ }
105
+
106
+ .builder-editor__segment svg {
107
+ display: none;
108
+ }
109
+ }
110
+ }
111
+
112
+ .builder-left__panel {
113
+ display: flex;
114
+ flex: 1;
115
+ flex-direction: column;
116
+ min-height: 0;
117
+
118
+ &[hidden] {
119
+ display: none;
120
+ }
121
+
122
+ // Blocks and Sections: the search field under the tabs.
123
+ .builder-editor__insert > .builder-editor__search {
124
+ margin-top: 10px;
125
+ }
126
+ }
127
+
128
+ // Layers: the block count and the tree tools, in a slim row.
129
+ .builder-editor__panel-head.builder-left__tools {
130
+ height: 34px;
131
+ padding: 0 8px 0 12px;
132
+ }
133
+
134
+ .builder-left__note {
135
+ color: var(--be-muted);
136
+ font-size: var(--be-text-s);
137
+ font-variant-numeric: tabular-nums;
138
+ }
139
+
140
+ // ---------------------------------------------------------------------------
141
+ // Canvas frame resize handles (FrameResize.tsx). In the frame wrapper, which has the frame's
142
+ // size on screen: the handles sit in the stage padding, centered on each edge.
143
+ // ---------------------------------------------------------------------------
144
+
145
+ // `[data-tooltip]` and the wrapper: wins over `.builder-editor [data-tooltip] { position: relative }`.
146
+ .builder-editor__frame-wrap .builder-frame-handle[data-tooltip] {
147
+ position: absolute;
148
+ z-index: 4;
149
+ top: 50%;
150
+ width: 6px;
151
+ height: 44px;
152
+ margin: 0;
153
+ padding: 0;
154
+ border: 0;
155
+ border-radius: 3px;
156
+ background: var(--theme-elevation-300);
157
+ cursor: ew-resize;
158
+ touch-action: none;
159
+ transform: translateY(-50%);
160
+ transition:
161
+ background-color 120ms ease,
162
+ height 120ms var(--be-ease);
163
+
164
+ // A larger hit area than the bar.
165
+ &::before {
166
+ content: '';
167
+ position: absolute;
168
+ inset: -10px -5px;
169
+ }
170
+
171
+ &:hover,
172
+ &:focus-visible,
173
+ &:active {
174
+ height: 64px;
175
+ background: var(--be-accent);
176
+ }
177
+
178
+ &:focus-visible {
179
+ outline: 2px solid var(--be-accent);
180
+ outline-offset: 2px;
181
+ }
182
+ }
183
+
184
+ .builder-frame-handle--left {
185
+ left: -15px;
186
+ }
187
+
188
+ .builder-frame-handle--right {
189
+ right: -15px;
190
+ }
191
+
192
+ .builder-editor[data-resizing] .builder-frame-handle {
193
+ transition: none;
194
+ }
195
+
196
+ // The live width and breakpoint while a handle is dragged.
197
+ .builder-frame-handle__label {
198
+ position: absolute;
199
+ z-index: 5;
200
+ top: 12px;
201
+ left: 50%;
202
+ padding: 4px 10px;
203
+ border-radius: 12px;
204
+ background: var(--theme-elevation-900);
205
+ color: var(--theme-elevation-0);
206
+ font-size: var(--be-text-s);
207
+ font-weight: var(--be-weight-medium);
208
+ font-variant-numeric: tabular-nums;
209
+ white-space: nowrap;
210
+ pointer-events: none;
211
+ transform: translateX(-50%);
212
+ box-shadow: var(--be-shadow);
213
+
214
+ &[hidden] {
215
+ display: none;
216
+ }
217
+ }
218
+
219
+ // ---------------------------------------------------------------------------
220
+ // Scrollbar space. The scrolling panels keep room for the scrollbar, so content does not shift
221
+ // when a collapse removes the scrollbar. The right padding gives up the scrollbar's width.
222
+ // ---------------------------------------------------------------------------
223
+
224
+ .builder-editor__outline,
225
+ .builder-editor__insert-body,
226
+ .builder-editor__inspector-body,
227
+ .builder-assistant__scroll {
228
+ scrollbar-gutter: stable;
229
+ }
230
+
231
+ // Two classes: wins over the padding in editor.scss, whichever stylesheet loads first.
232
+ .builder-editor__left .builder-editor__insert-body,
233
+ .builder-editor__right .builder-editor__inspector-body {
234
+ padding-right: 4px;
235
+ }
236
+
237
+ .builder-editor__left .builder-editor__outline {
238
+ padding-right: 0;
239
+ }
240
+ }
@@ -1,24 +1,24 @@
1
- // "Anna is editing this field" under an inspector field. Payload CSS variables only, inside
2
- // Payload's own layer. The rest of the presence styles are in editor.scss ("Multiplayer").
3
-
4
- @layer payload-default {
5
- .builder-peer-field {
6
- display: flex;
7
- align-items: center;
8
- gap: 6px;
9
- margin: 4px 0 0;
10
- color: var(--theme-elevation-800);
11
- font-size: var(--be-text-s, 11px);
12
- line-height: 1.35;
13
- animation: builder-fade-in 160ms var(--be-ease, ease-out);
14
- }
15
-
16
- .builder-peer-field__dot {
17
- flex: none;
18
- width: 8px;
19
- height: 8px;
20
- border-radius: 50%;
21
- background: var(--be-peer);
22
- box-shadow: 0 0 0 3px color-mix(in srgb, var(--be-peer) 25%, transparent);
23
- }
24
- }
1
+ // "Anna is editing this field" under an inspector field. Payload CSS variables only, inside
2
+ // Payload's own layer. The rest of the presence styles are in editor.scss ("Multiplayer").
3
+
4
+ @layer payload-default {
5
+ .builder-peer-field {
6
+ display: flex;
7
+ align-items: center;
8
+ gap: 6px;
9
+ margin: 4px 0 0;
10
+ color: var(--theme-elevation-800);
11
+ font-size: var(--be-text-s, 11px);
12
+ line-height: 1.35;
13
+ animation: builder-fade-in 160ms var(--be-ease, ease-out);
14
+ }
15
+
16
+ .builder-peer-field__dot {
17
+ flex: none;
18
+ width: 8px;
19
+ height: 8px;
20
+ border-radius: 50%;
21
+ background: var(--be-peer);
22
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--be-peer) 25%, transparent);
23
+ }
24
+ }