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.
- package/LICENSE +21 -21
- package/README.md +3237 -3236
- package/dist/admin/aiKeyField.scss +58 -58
- package/dist/admin/diff/layoutDiff.scss +181 -181
- package/dist/admin/editor/assistant/assistant.scss +944 -944
- package/dist/admin/editor/classes/manager.scss +262 -262
- package/dist/admin/editor/comments/comments.scss +539 -539
- package/dist/admin/editor/dnd/dnd.scss +261 -261
- package/dist/admin/editor/editor.scss +2629 -2629
- package/dist/admin/editor/empty/empty.scss +92 -92
- package/dist/admin/editor/fields/fields.scss +778 -778
- package/dist/admin/editor/generate/generate.scss +276 -276
- package/dist/admin/editor/layout/layout.scss +240 -240
- package/dist/admin/editor/live/presence.scss +24 -24
- package/dist/admin/editor/locale/locale.scss +154 -154
- package/dist/admin/editor/media/media.scss +233 -233
- package/dist/admin/editor/menu/menu.scss +132 -132
- package/dist/admin/editor/motion/motion.scss +84 -84
- package/dist/admin/editor/sections/components.scss +238 -238
- package/dist/admin/editor/sections/variants.scss +90 -90
- package/dist/admin/editor/styles/ClassCss.js +3 -3
- package/dist/admin/editor/styles/classes.scss +381 -381
- package/dist/admin/editor/styles/styles.scss +1123 -1123
- package/dist/admin/editor/styles/tokens.js +2 -1
- package/dist/admin/editor/templates/templates.scss +654 -654
- package/dist/admin/editor/tooltip/tooltip.scss +39 -39
- package/dist/admin/editor/topbar/DocumentActions.js +1 -1
- package/dist/admin/editor/topbar/TopBar.js +2 -1
- package/dist/admin/editor/topbar/contentMode.scss +26 -26
- package/dist/admin/editor/topbar/screens/screens.scss +134 -134
- package/dist/admin/editor/topbar/settingsDrawer.scss +32 -32
- package/dist/admin/editor/topbar/tabTitle.d.ts +6 -0
- package/dist/admin/editor/topbar/tabTitle.js +9 -0
- package/dist/admin/editor/topbar/topbar.scss +645 -645
- package/dist/admin/editor/ui/controls.scss +320 -320
- package/dist/admin/forms/submissions.scss +197 -197
- package/dist/admin/layoutField.scss +69 -69
- package/dist/admin/templateConditions.scss +24 -24
- package/dist/ai/prompt.js +40 -40
- package/dist/blocks/client/marquee.js +14 -14
- package/dist/blocks/payload.js +13 -3
- package/dist/core/payloadBlocks.js +10 -1
- package/dist/core/responseError.d.ts +5 -0
- package/dist/core/responseError.js +8 -0
- package/dist/core/sections.d.ts +2 -0
- package/dist/core/sections.js +8 -0
- package/dist/css/index.d.ts +6 -0
- package/dist/css/index.js +40 -1
- package/dist/css/shared.js +2 -2
- package/dist/live/session.js +18 -0
- package/dist/live/storage.d.ts +5 -0
- package/dist/live/storage.js +20 -0
- package/dist/mcp/index.js +46 -19
- package/dist/mcp/shared.js +16 -16
- package/dist/plugin/index.d.ts +21 -1
- package/dist/plugin/index.js +46 -15
- package/dist/react/canvas/BuilderCanvas.js +76 -75
- package/dist/react/canvas/thumbnail/ThumbnailCanvas.js +8 -7
- package/dist/theme/admin/fields.scss +363 -363
- package/package.json +1 -1
|
@@ -1,261 +1,261 @@
|
|
|
1
|
-
// Smooth drag mode: outline rows that make room, the gap on the canvas and the lifted row.
|
|
2
|
-
// Payload CSS variables only, no Tailwind. `--be-make-room` and `--be-settle` are spring easings
|
|
3
|
-
// (CSS `linear()`) that the editor sets on its root from `protocol/motion.ts`.
|
|
4
|
-
|
|
5
|
-
@layer payload-default {
|
|
6
|
-
@keyframes builder-dnd-lift {
|
|
7
|
-
from {
|
|
8
|
-
transform: scale(1);
|
|
9
|
-
box-shadow: 0 0 0 1px var(--be-border);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.builder-editor__outline {
|
|
14
|
-
position: relative;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.builder-dnd-outline--active {
|
|
18
|
-
// A row moving to a deeper level must not add a sideways scrollbar.
|
|
19
|
-
overflow-x: hidden;
|
|
20
|
-
|
|
21
|
-
.builder-editor__row {
|
|
22
|
-
transition:
|
|
23
|
-
transform 340ms var(--be-make-room, cubic-bezier(0.2, 0.8, 0.2, 1)),
|
|
24
|
-
opacity 160ms ease-out;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.builder-editor__row .builder-editor__row-actions {
|
|
28
|
-
display: none;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// The dragged row stays as the gap: an empty dashed slot where the block will land.
|
|
33
|
-
// Its indent shows the depth it lands at.
|
|
34
|
-
.builder-editor__row[data-dnd-source] {
|
|
35
|
-
opacity: 1;
|
|
36
|
-
background: transparent;
|
|
37
|
-
|
|
38
|
-
> * {
|
|
39
|
-
visibility: hidden;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&::after {
|
|
43
|
-
content: '';
|
|
44
|
-
position: absolute;
|
|
45
|
-
top: 1px;
|
|
46
|
-
right: 0;
|
|
47
|
-
bottom: 1px;
|
|
48
|
-
left: 4px;
|
|
49
|
-
border-radius: var(--be-radius);
|
|
50
|
-
background: color-mix(in srgb, var(--be-accent) 8%, transparent);
|
|
51
|
-
outline: 1px dashed color-mix(in srgb, var(--be-accent) 60%, transparent);
|
|
52
|
-
outline-offset: -1px;
|
|
53
|
-
transform: translateX(var(--dnd-indent, 0px));
|
|
54
|
-
transition: transform 340ms var(--be-make-room, ease-out);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// It goes into a collapsed block: no gap in this list.
|
|
59
|
-
.builder-editor__row[data-dnd-source][data-dnd-gone] {
|
|
60
|
-
opacity: 0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Children of the dragged row travel inside it.
|
|
64
|
-
.builder-editor__row[data-dnd-hidden] {
|
|
65
|
-
opacity: 0;
|
|
66
|
-
pointer-events: none;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// The drop goes into this collapsed block.
|
|
70
|
-
.builder-editor__row[data-dnd-into] {
|
|
71
|
-
background: var(--be-accent-soft);
|
|
72
|
-
box-shadow: inset 0 0 0 2px var(--be-accent);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// The gap for a new block from the library.
|
|
76
|
-
.builder-dnd-gap-row {
|
|
77
|
-
position: absolute;
|
|
78
|
-
top: 0;
|
|
79
|
-
right: 6px;
|
|
80
|
-
left: 6px;
|
|
81
|
-
box-sizing: border-box;
|
|
82
|
-
border-radius: var(--be-radius);
|
|
83
|
-
background: color-mix(in srgb, var(--be-accent) 8%, transparent);
|
|
84
|
-
outline: 1px dashed color-mix(in srgb, var(--be-accent) 60%, transparent);
|
|
85
|
-
outline-offset: -1px;
|
|
86
|
-
pointer-events: none;
|
|
87
|
-
transition: transform 340ms var(--be-make-room, ease-out);
|
|
88
|
-
|
|
89
|
-
@starting-style {
|
|
90
|
-
opacity: 0;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// The gap on the canvas (overlay, iframe coordinates).
|
|
95
|
-
.builder-dnd-scroll {
|
|
96
|
-
position: absolute;
|
|
97
|
-
top: 0;
|
|
98
|
-
left: 0;
|
|
99
|
-
width: 0;
|
|
100
|
-
height: 0;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.builder-dnd-gap {
|
|
104
|
-
position: absolute;
|
|
105
|
-
top: 0;
|
|
106
|
-
left: 0;
|
|
107
|
-
box-sizing: border-box;
|
|
108
|
-
border-radius: calc(var(--be-px, 1px) * 6);
|
|
109
|
-
background: color-mix(in srgb, var(--be-accent) 9%, transparent);
|
|
110
|
-
outline: calc(var(--be-px, 1px) * 1.5) dashed color-mix(in srgb, var(--be-accent) 60%, transparent);
|
|
111
|
-
outline-offset: calc(var(--be-px, 1px) * -1.5);
|
|
112
|
-
pointer-events: none;
|
|
113
|
-
// Only transform and opacity animate: they run on the compositor.
|
|
114
|
-
transition:
|
|
115
|
-
transform 340ms var(--be-make-room, ease-out),
|
|
116
|
-
opacity 160ms ease-out;
|
|
117
|
-
|
|
118
|
-
@starting-style {
|
|
119
|
-
opacity: 0;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&[data-settle] {
|
|
123
|
-
opacity: 0;
|
|
124
|
-
transition-duration: 340ms, 120ms;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.builder-dnd-gap__label {
|
|
129
|
-
&::after {
|
|
130
|
-
content: attr(data-label);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
&[hidden] {
|
|
134
|
-
display: none;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// The lifted row that follows the pointer outside the canvas.
|
|
139
|
-
.builder-dnd-ghost {
|
|
140
|
-
position: fixed;
|
|
141
|
-
top: 0;
|
|
142
|
-
left: 0;
|
|
143
|
-
z-index: 1001;
|
|
144
|
-
pointer-events: none;
|
|
145
|
-
will-change: transform;
|
|
146
|
-
transition: opacity 140ms ease-out;
|
|
147
|
-
|
|
148
|
-
&[data-hidden] {
|
|
149
|
-
opacity: 0;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.builder-dnd-ghost__card {
|
|
154
|
-
display: flex;
|
|
155
|
-
align-items: center;
|
|
156
|
-
gap: 6px;
|
|
157
|
-
box-sizing: border-box;
|
|
158
|
-
min-width: 140px;
|
|
159
|
-
max-width: 320px;
|
|
160
|
-
height: 28px;
|
|
161
|
-
padding: 0 10px 0 8px;
|
|
162
|
-
border-radius: var(--be-radius-m);
|
|
163
|
-
background: var(--be-panel);
|
|
164
|
-
color: var(--theme-text);
|
|
165
|
-
font-family: var(--font-body);
|
|
166
|
-
font-size: var(--be-text-m);
|
|
167
|
-
font-weight: var(--be-weight-strong);
|
|
168
|
-
white-space: nowrap;
|
|
169
|
-
transform: scale(1.03);
|
|
170
|
-
transform-origin: 18px 14px;
|
|
171
|
-
box-shadow:
|
|
172
|
-
0 14px 30px -8px rgb(0 0 0 / 0.32),
|
|
173
|
-
0 3px 8px rgb(0 0 0 / 0.12),
|
|
174
|
-
0 0 0 1px var(--be-border);
|
|
175
|
-
animation: builder-dnd-lift 220ms var(--be-settle, ease-out) both;
|
|
176
|
-
|
|
177
|
-
svg {
|
|
178
|
-
flex: none;
|
|
179
|
-
color: var(--be-accent);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.builder-dnd-ghost__label {
|
|
184
|
-
overflow: hidden;
|
|
185
|
-
text-overflow: ellipsis;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.builder-dnd-ghost__note {
|
|
189
|
-
display: none;
|
|
190
|
-
color: var(--be-muted);
|
|
191
|
-
font-weight: var(--be-weight-regular);
|
|
192
|
-
|
|
193
|
-
&::before {
|
|
194
|
-
content: '·';
|
|
195
|
-
margin-right: 6px;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.builder-dnd-ghost[data-refused] {
|
|
200
|
-
.builder-dnd-ghost__note {
|
|
201
|
-
display: inline;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.builder-dnd-ghost__card svg {
|
|
205
|
-
color: var(--be-muted);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
// Drop outlines (canvas overlay, iframe coordinates): every slot that takes the dragged block.
|
|
210
|
-
// Thin and faint, so they never compete with the drop indicator. `--be-px` is one screen pixel.
|
|
211
|
-
@keyframes builder-dnd-drops-in {
|
|
212
|
-
from {
|
|
213
|
-
opacity: 0;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.builder-dnd-drops {
|
|
218
|
-
position: absolute;
|
|
219
|
-
inset: 0;
|
|
220
|
-
animation: builder-dnd-drops-in 160ms ease-out;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.builder-dnd-drop {
|
|
224
|
-
position: absolute;
|
|
225
|
-
box-sizing: border-box;
|
|
226
|
-
border-radius: 2px;
|
|
227
|
-
outline: var(--be-px) dashed color-mix(in srgb, var(--be-accent) 40%, transparent);
|
|
228
|
-
outline-offset: calc(var(--be-px) * -1);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.builder-dnd-drop--target {
|
|
232
|
-
outline-color: color-mix(in srgb, var(--be-accent) 75%, transparent);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.builder-dnd-drop__label {
|
|
236
|
-
position: absolute;
|
|
237
|
-
top: 0;
|
|
238
|
-
left: 0;
|
|
239
|
-
height: 18px;
|
|
240
|
-
padding: 0 6px;
|
|
241
|
-
border-radius: 0 0 4px;
|
|
242
|
-
background: color-mix(in srgb, var(--be-accent) 16%, var(--be-panel));
|
|
243
|
-
color: var(--be-accent-text);
|
|
244
|
-
font-size: var(--be-text-s);
|
|
245
|
-
line-height: 18px;
|
|
246
|
-
white-space: nowrap;
|
|
247
|
-
transform-origin: 0 0;
|
|
248
|
-
transform: scale(var(--be-inv, 1));
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
@media (prefers-reduced-motion: reduce) {
|
|
252
|
-
.builder-dnd-drops,
|
|
253
|
-
.builder-dnd-outline--active .builder-editor__row,
|
|
254
|
-
.builder-dnd-gap,
|
|
255
|
-
.builder-dnd-gap-row,
|
|
256
|
-
.builder-dnd-ghost__card {
|
|
257
|
-
transition: none;
|
|
258
|
-
animation: none;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
1
|
+
// Smooth drag mode: outline rows that make room, the gap on the canvas and the lifted row.
|
|
2
|
+
// Payload CSS variables only, no Tailwind. `--be-make-room` and `--be-settle` are spring easings
|
|
3
|
+
// (CSS `linear()`) that the editor sets on its root from `protocol/motion.ts`.
|
|
4
|
+
|
|
5
|
+
@layer payload-default {
|
|
6
|
+
@keyframes builder-dnd-lift {
|
|
7
|
+
from {
|
|
8
|
+
transform: scale(1);
|
|
9
|
+
box-shadow: 0 0 0 1px var(--be-border);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.builder-editor__outline {
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.builder-dnd-outline--active {
|
|
18
|
+
// A row moving to a deeper level must not add a sideways scrollbar.
|
|
19
|
+
overflow-x: hidden;
|
|
20
|
+
|
|
21
|
+
.builder-editor__row {
|
|
22
|
+
transition:
|
|
23
|
+
transform 340ms var(--be-make-room, cubic-bezier(0.2, 0.8, 0.2, 1)),
|
|
24
|
+
opacity 160ms ease-out;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.builder-editor__row .builder-editor__row-actions {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// The dragged row stays as the gap: an empty dashed slot where the block will land.
|
|
33
|
+
// Its indent shows the depth it lands at.
|
|
34
|
+
.builder-editor__row[data-dnd-source] {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
background: transparent;
|
|
37
|
+
|
|
38
|
+
> * {
|
|
39
|
+
visibility: hidden;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&::after {
|
|
43
|
+
content: '';
|
|
44
|
+
position: absolute;
|
|
45
|
+
top: 1px;
|
|
46
|
+
right: 0;
|
|
47
|
+
bottom: 1px;
|
|
48
|
+
left: 4px;
|
|
49
|
+
border-radius: var(--be-radius);
|
|
50
|
+
background: color-mix(in srgb, var(--be-accent) 8%, transparent);
|
|
51
|
+
outline: 1px dashed color-mix(in srgb, var(--be-accent) 60%, transparent);
|
|
52
|
+
outline-offset: -1px;
|
|
53
|
+
transform: translateX(var(--dnd-indent, 0px));
|
|
54
|
+
transition: transform 340ms var(--be-make-room, ease-out);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// It goes into a collapsed block: no gap in this list.
|
|
59
|
+
.builder-editor__row[data-dnd-source][data-dnd-gone] {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Children of the dragged row travel inside it.
|
|
64
|
+
.builder-editor__row[data-dnd-hidden] {
|
|
65
|
+
opacity: 0;
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// The drop goes into this collapsed block.
|
|
70
|
+
.builder-editor__row[data-dnd-into] {
|
|
71
|
+
background: var(--be-accent-soft);
|
|
72
|
+
box-shadow: inset 0 0 0 2px var(--be-accent);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// The gap for a new block from the library.
|
|
76
|
+
.builder-dnd-gap-row {
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: 0;
|
|
79
|
+
right: 6px;
|
|
80
|
+
left: 6px;
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
border-radius: var(--be-radius);
|
|
83
|
+
background: color-mix(in srgb, var(--be-accent) 8%, transparent);
|
|
84
|
+
outline: 1px dashed color-mix(in srgb, var(--be-accent) 60%, transparent);
|
|
85
|
+
outline-offset: -1px;
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
transition: transform 340ms var(--be-make-room, ease-out);
|
|
88
|
+
|
|
89
|
+
@starting-style {
|
|
90
|
+
opacity: 0;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// The gap on the canvas (overlay, iframe coordinates).
|
|
95
|
+
.builder-dnd-scroll {
|
|
96
|
+
position: absolute;
|
|
97
|
+
top: 0;
|
|
98
|
+
left: 0;
|
|
99
|
+
width: 0;
|
|
100
|
+
height: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.builder-dnd-gap {
|
|
104
|
+
position: absolute;
|
|
105
|
+
top: 0;
|
|
106
|
+
left: 0;
|
|
107
|
+
box-sizing: border-box;
|
|
108
|
+
border-radius: calc(var(--be-px, 1px) * 6);
|
|
109
|
+
background: color-mix(in srgb, var(--be-accent) 9%, transparent);
|
|
110
|
+
outline: calc(var(--be-px, 1px) * 1.5) dashed color-mix(in srgb, var(--be-accent) 60%, transparent);
|
|
111
|
+
outline-offset: calc(var(--be-px, 1px) * -1.5);
|
|
112
|
+
pointer-events: none;
|
|
113
|
+
// Only transform and opacity animate: they run on the compositor.
|
|
114
|
+
transition:
|
|
115
|
+
transform 340ms var(--be-make-room, ease-out),
|
|
116
|
+
opacity 160ms ease-out;
|
|
117
|
+
|
|
118
|
+
@starting-style {
|
|
119
|
+
opacity: 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&[data-settle] {
|
|
123
|
+
opacity: 0;
|
|
124
|
+
transition-duration: 340ms, 120ms;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.builder-dnd-gap__label {
|
|
129
|
+
&::after {
|
|
130
|
+
content: attr(data-label);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&[hidden] {
|
|
134
|
+
display: none;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// The lifted row that follows the pointer outside the canvas.
|
|
139
|
+
.builder-dnd-ghost {
|
|
140
|
+
position: fixed;
|
|
141
|
+
top: 0;
|
|
142
|
+
left: 0;
|
|
143
|
+
z-index: 1001;
|
|
144
|
+
pointer-events: none;
|
|
145
|
+
will-change: transform;
|
|
146
|
+
transition: opacity 140ms ease-out;
|
|
147
|
+
|
|
148
|
+
&[data-hidden] {
|
|
149
|
+
opacity: 0;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.builder-dnd-ghost__card {
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
gap: 6px;
|
|
157
|
+
box-sizing: border-box;
|
|
158
|
+
min-width: 140px;
|
|
159
|
+
max-width: 320px;
|
|
160
|
+
height: 28px;
|
|
161
|
+
padding: 0 10px 0 8px;
|
|
162
|
+
border-radius: var(--be-radius-m);
|
|
163
|
+
background: var(--be-panel);
|
|
164
|
+
color: var(--theme-text);
|
|
165
|
+
font-family: var(--font-body);
|
|
166
|
+
font-size: var(--be-text-m);
|
|
167
|
+
font-weight: var(--be-weight-strong);
|
|
168
|
+
white-space: nowrap;
|
|
169
|
+
transform: scale(1.03);
|
|
170
|
+
transform-origin: 18px 14px;
|
|
171
|
+
box-shadow:
|
|
172
|
+
0 14px 30px -8px rgb(0 0 0 / 0.32),
|
|
173
|
+
0 3px 8px rgb(0 0 0 / 0.12),
|
|
174
|
+
0 0 0 1px var(--be-border);
|
|
175
|
+
animation: builder-dnd-lift 220ms var(--be-settle, ease-out) both;
|
|
176
|
+
|
|
177
|
+
svg {
|
|
178
|
+
flex: none;
|
|
179
|
+
color: var(--be-accent);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.builder-dnd-ghost__label {
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
text-overflow: ellipsis;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.builder-dnd-ghost__note {
|
|
189
|
+
display: none;
|
|
190
|
+
color: var(--be-muted);
|
|
191
|
+
font-weight: var(--be-weight-regular);
|
|
192
|
+
|
|
193
|
+
&::before {
|
|
194
|
+
content: '·';
|
|
195
|
+
margin-right: 6px;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.builder-dnd-ghost[data-refused] {
|
|
200
|
+
.builder-dnd-ghost__note {
|
|
201
|
+
display: inline;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.builder-dnd-ghost__card svg {
|
|
205
|
+
color: var(--be-muted);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Drop outlines (canvas overlay, iframe coordinates): every slot that takes the dragged block.
|
|
210
|
+
// Thin and faint, so they never compete with the drop indicator. `--be-px` is one screen pixel.
|
|
211
|
+
@keyframes builder-dnd-drops-in {
|
|
212
|
+
from {
|
|
213
|
+
opacity: 0;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.builder-dnd-drops {
|
|
218
|
+
position: absolute;
|
|
219
|
+
inset: 0;
|
|
220
|
+
animation: builder-dnd-drops-in 160ms ease-out;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.builder-dnd-drop {
|
|
224
|
+
position: absolute;
|
|
225
|
+
box-sizing: border-box;
|
|
226
|
+
border-radius: 2px;
|
|
227
|
+
outline: var(--be-px) dashed color-mix(in srgb, var(--be-accent) 40%, transparent);
|
|
228
|
+
outline-offset: calc(var(--be-px) * -1);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.builder-dnd-drop--target {
|
|
232
|
+
outline-color: color-mix(in srgb, var(--be-accent) 75%, transparent);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.builder-dnd-drop__label {
|
|
236
|
+
position: absolute;
|
|
237
|
+
top: 0;
|
|
238
|
+
left: 0;
|
|
239
|
+
height: 18px;
|
|
240
|
+
padding: 0 6px;
|
|
241
|
+
border-radius: 0 0 4px;
|
|
242
|
+
background: color-mix(in srgb, var(--be-accent) 16%, var(--be-panel));
|
|
243
|
+
color: var(--be-accent-text);
|
|
244
|
+
font-size: var(--be-text-s);
|
|
245
|
+
line-height: 18px;
|
|
246
|
+
white-space: nowrap;
|
|
247
|
+
transform-origin: 0 0;
|
|
248
|
+
transform: scale(var(--be-inv, 1));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
@media (prefers-reduced-motion: reduce) {
|
|
252
|
+
.builder-dnd-drops,
|
|
253
|
+
.builder-dnd-outline--active .builder-editor__row,
|
|
254
|
+
.builder-dnd-gap,
|
|
255
|
+
.builder-dnd-gap-row,
|
|
256
|
+
.builder-dnd-ghost__card {
|
|
257
|
+
transition: none;
|
|
258
|
+
animation: none;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|