payload-canvas 0.6.0 → 0.7.0-next.0

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 (164) hide show
  1. package/README.md +17 -17
  2. package/dist/admin/AiKeyField.d.ts +4 -3
  3. package/dist/admin/AiKeyField.js +3 -3
  4. package/dist/admin/BuilderTab.js +1 -1
  5. package/dist/admin/DocumentEditView.d.ts +1 -1
  6. package/dist/admin/DocumentEditView.js +2 -3
  7. package/dist/admin/LayoutField.d.ts +1 -1
  8. package/dist/admin/LayoutField.js +2 -2
  9. package/dist/admin/TemplateConditionsField.d.ts +2 -2
  10. package/dist/admin/TemplateConditionsField.js +2 -2
  11. package/dist/admin/aiKeyField.css +58 -0
  12. package/dist/admin/diff/LayoutDiff.js +3 -3
  13. package/dist/admin/diff/LayoutJsonDiff.d.ts +1 -1
  14. package/dist/admin/diff/LayoutJsonDiff.js +1 -1
  15. package/dist/admin/diff/layoutDiff.css +180 -0
  16. package/dist/admin/editor/Editor.d.ts +2 -2
  17. package/dist/admin/editor/Editor.js +2 -2
  18. package/dist/admin/editor/Library.js +1 -2
  19. package/dist/admin/editor/assistant/AssistantPanel.d.ts +1 -1
  20. package/dist/admin/editor/assistant/AssistantPanel.js +1 -1
  21. package/dist/admin/editor/assistant/{assistant.scss → assistant.css} +322 -315
  22. package/dist/admin/editor/classes/ClassManager.d.ts +1 -1
  23. package/dist/admin/editor/classes/ClassManager.js +1 -1
  24. package/dist/admin/editor/classes/manager.css +258 -0
  25. package/dist/admin/editor/comments/CommentLayer.d.ts +1 -1
  26. package/dist/admin/editor/comments/CommentLayer.js +1 -1
  27. package/dist/admin/editor/comments/CommentsPanel.d.ts +1 -1
  28. package/dist/admin/editor/comments/CommentsPanel.js +1 -1
  29. package/dist/admin/editor/comments/{comments.scss → comments.css} +121 -140
  30. package/dist/admin/editor/comments/useCommentFromURL.js +1 -1
  31. package/dist/admin/editor/dnd/{dnd.scss → dnd.css} +78 -80
  32. package/dist/admin/editor/{editor.scss → editor.css} +782 -763
  33. package/dist/admin/editor/empty/EmptyStart.d.ts +1 -1
  34. package/dist/admin/editor/empty/EmptyStart.js +3 -3
  35. package/dist/admin/editor/empty/{empty.scss → empty.css} +12 -13
  36. package/dist/admin/editor/fields/FormBlock.js +3 -3
  37. package/dist/admin/editor/fields/fields.css +786 -0
  38. package/dist/admin/editor/generate/GenerateImage.d.ts +1 -1
  39. package/dist/admin/editor/generate/GenerateImage.js +1 -1
  40. package/dist/admin/editor/generate/{generate.scss → generate.css} +83 -82
  41. package/dist/admin/editor/layout/layout.css +243 -0
  42. package/dist/admin/editor/layout/panels.js +1 -1
  43. package/dist/admin/editor/live/PresenceUI.d.ts +1 -1
  44. package/dist/admin/editor/live/PresenceUI.js +2 -2
  45. package/dist/admin/editor/live/{presence.scss → presence.css} +5 -4
  46. package/dist/admin/editor/locale/LocaleField.d.ts +1 -1
  47. package/dist/admin/editor/locale/LocaleField.js +1 -1
  48. package/dist/admin/editor/locale/LocaleSwitcher.d.ts +1 -1
  49. package/dist/admin/editor/locale/LocaleSwitcher.js +1 -1
  50. package/dist/admin/editor/locale/locale.css +153 -0
  51. package/dist/admin/editor/media/ImageEditor.d.ts +1 -1
  52. package/dist/admin/editor/media/ImageEditor.js +1 -1
  53. package/dist/admin/editor/media/{media.scss → media.css} +67 -67
  54. package/dist/admin/editor/menu/Menu.d.ts +1 -1
  55. package/dist/admin/editor/menu/Menu.js +1 -1
  56. package/dist/admin/editor/menu/menu.css +132 -0
  57. package/dist/admin/editor/motion/MotionPanel.d.ts +2 -2
  58. package/dist/admin/editor/motion/MotionPanel.js +2 -2
  59. package/dist/admin/editor/motion/{motion.scss → motion.css} +24 -21
  60. package/dist/admin/editor/regions/RegionPane.js +1 -1
  61. package/dist/admin/editor/renderField.d.ts +1 -1
  62. package/dist/admin/editor/renderField.js +1 -1
  63. package/dist/admin/editor/sections/ComponentFields.d.ts +1 -1
  64. package/dist/admin/editor/sections/ComponentFields.js +2 -3
  65. package/dist/admin/editor/sections/PropertyControls.d.ts +1 -1
  66. package/dist/admin/editor/sections/PropertyControls.js +1 -1
  67. package/dist/admin/editor/sections/components.css +244 -0
  68. package/dist/admin/editor/sections/variants.css +93 -0
  69. package/dist/admin/editor/sections/variants.d.ts +1 -1
  70. package/dist/admin/editor/sections/variants.js +1 -1
  71. package/dist/admin/editor/styles/ClassBar.d.ts +1 -1
  72. package/dist/admin/editor/styles/ClassBar.js +1 -1
  73. package/dist/admin/editor/styles/StylesPanel.d.ts +1 -1
  74. package/dist/admin/editor/styles/StylesPanel.js +1 -1
  75. package/dist/admin/editor/styles/{classes.scss → classes.css} +128 -125
  76. package/dist/admin/editor/styles/{styles.scss → styles.css} +368 -370
  77. package/dist/admin/editor/templates/Bindable.d.ts +1 -1
  78. package/dist/admin/editor/templates/Bindable.js +1 -1
  79. package/dist/admin/editor/templates/binding.js +4 -1
  80. package/dist/admin/editor/templates/{templates.scss → templates.css} +207 -206
  81. package/dist/admin/editor/tooltip/Tooltips.d.ts +1 -1
  82. package/dist/admin/editor/tooltip/Tooltips.js +1 -1
  83. package/dist/admin/editor/tooltip/{tooltip.scss → tooltip.css} +11 -10
  84. package/dist/admin/editor/topbar/ContentModeToggle.d.ts +1 -1
  85. package/dist/admin/editor/topbar/ContentModeToggle.js +1 -1
  86. package/dist/admin/editor/topbar/DocumentActions.js +1 -2
  87. package/dist/admin/editor/topbar/TopBar.d.ts +1 -1
  88. package/dist/admin/editor/topbar/TopBar.js +2 -3
  89. package/dist/admin/editor/topbar/{contentMode.scss → contentMode.css} +7 -8
  90. package/dist/admin/editor/topbar/screens/DrawerRouter.d.ts +1 -1
  91. package/dist/admin/editor/topbar/screens/DrawerRouter.js +52 -40
  92. package/dist/admin/editor/topbar/screens/ScreenDrawer.d.ts +1 -1
  93. package/dist/admin/editor/topbar/screens/ScreenDrawer.js +4 -5
  94. package/dist/admin/editor/topbar/screens/drawerRouterSupport.d.ts +5 -5
  95. package/dist/admin/editor/topbar/screens/drawerRouterSupport.js +7 -7
  96. package/dist/admin/editor/topbar/screens/screens.css +139 -0
  97. package/dist/admin/editor/topbar/settingsDrawer.css +33 -0
  98. package/dist/admin/editor/topbar/settingsDrawer.d.ts +1 -1
  99. package/dist/admin/editor/topbar/settingsDrawer.js +3 -3
  100. package/dist/admin/editor/topbar/{topbar.scss → topbar.css} +189 -191
  101. package/dist/admin/editor/ui/Select.d.ts +1 -1
  102. package/dist/admin/editor/ui/Select.js +1 -1
  103. package/dist/admin/editor/ui/Slider.d.ts +1 -1
  104. package/dist/admin/editor/ui/Slider.js +1 -1
  105. package/dist/admin/editor/ui/controls.css +301 -0
  106. package/dist/admin/forms/SubmissionCells.d.ts +1 -1
  107. package/dist/admin/forms/SubmissionCells.js +1 -1
  108. package/dist/admin/forms/SubmissionView.d.ts +1 -1
  109. package/dist/admin/forms/SubmissionView.js +1 -1
  110. package/dist/admin/forms/submissionData.d.ts +1 -1
  111. package/dist/admin/forms/submissionData.js +1 -1
  112. package/dist/admin/forms/submissions.css +200 -0
  113. package/dist/admin/layoutField.css +70 -0
  114. package/dist/admin/screen/BuilderScreen.d.ts +1 -1
  115. package/dist/admin/screen/BuilderScreen.js +1 -1
  116. package/dist/admin/templateConditions.css +25 -0
  117. package/dist/ai/images/service.js +2 -2
  118. package/dist/ai/settings/index.js +3 -0
  119. package/dist/classes/collection.js +1 -0
  120. package/dist/classes/sheet.js +2 -0
  121. package/dist/comments/collection.js +3 -0
  122. package/dist/core/fieldHooks.d.ts +1 -1
  123. package/dist/forms/submissionsAdmin.js +1 -1
  124. package/dist/forms/uploads.js +2 -2
  125. package/dist/live/draftAccess.js +1 -1
  126. package/dist/plugin/index.js +2 -2
  127. package/dist/plugin/sections.js +3 -0
  128. package/dist/plugin/templates.js +5 -1
  129. package/dist/react/canvas/inline/candidates.js +2 -2
  130. package/dist/react/canvas/inline/rich/editor.js +9 -1
  131. package/dist/react/components/Image.d.ts +1 -1
  132. package/dist/react/components/Image.js +2 -2
  133. package/dist/react/render/resolve.js +2 -0
  134. package/dist/react/render/templates.js +3 -1
  135. package/dist/react/server.js +1 -1
  136. package/dist/react/theme/ThemeStyle.js +1 -1
  137. package/dist/theme/admin/ColorField.d.ts +4 -3
  138. package/dist/theme/admin/ColorField.js +1 -1
  139. package/dist/theme/admin/FontField.d.ts +4 -3
  140. package/dist/theme/admin/FontField.js +1 -1
  141. package/dist/theme/admin/SaveSignal.js +1 -1
  142. package/dist/theme/admin/SliderField.d.ts +1 -1
  143. package/dist/theme/admin/SliderField.js +1 -1
  144. package/dist/theme/admin/Variables.d.ts +4 -3
  145. package/dist/theme/admin/Variables.js +2 -2
  146. package/dist/theme/admin/fields.css +327 -0
  147. package/dist/theme/global.js +2 -0
  148. package/package.json +25 -24
  149. package/dist/admin/aiKeyField.scss +0 -58
  150. package/dist/admin/diff/layoutDiff.scss +0 -181
  151. package/dist/admin/editor/classes/manager.scss +0 -262
  152. package/dist/admin/editor/fields/fields.scss +0 -778
  153. package/dist/admin/editor/layout/layout.scss +0 -240
  154. package/dist/admin/editor/locale/locale.scss +0 -154
  155. package/dist/admin/editor/menu/menu.scss +0 -132
  156. package/dist/admin/editor/sections/components.scss +0 -238
  157. package/dist/admin/editor/sections/variants.scss +0 -90
  158. package/dist/admin/editor/topbar/screens/screens.scss +0 -134
  159. package/dist/admin/editor/topbar/settingsDrawer.scss +0 -32
  160. package/dist/admin/editor/ui/controls.scss +0 -320
  161. package/dist/admin/forms/submissions.scss +0 -197
  162. package/dist/admin/layoutField.scss +0 -69
  163. package/dist/admin/templateConditions.scss +0 -24
  164. package/dist/theme/admin/fields.scss +0 -363
@@ -1,10 +1,11 @@
1
- // The AI assistant panel in the inspector. Payload CSS variables only, inside Payload's layer,
2
- // so it follows the admin's light and dark theme. It uses the editor's accent (Payload's success
3
- // color) and Payload's neutral scale. Violet belongs to the AI's presence on the canvas, not here.
4
-
1
+ /*
2
+ * The AI assistant panel in the inspector. Payload CSS variables only, inside Payload's layer,
3
+ * so it follows the admin's light and dark theme. It uses the editor's accent (Payload's success
4
+ * color) and Payload's neutral scale. Violet belongs to the AI's presence on the canvas, not here.
5
+ */
5
6
  @layer payload-default {
6
7
  .builder-editor {
7
- --ba-accent: var(--be-accent, var(--theme-success-500));
8
+ --ba-accent: var(--be-accent, var(--color-bg-brand));
8
9
  --ba-accent-soft: color-mix(in srgb, var(--ba-accent) 12%, transparent);
9
10
  --ba-accent-line: color-mix(in srgb, var(--ba-accent) 35%, transparent);
10
11
  }
@@ -23,9 +24,7 @@
23
24
  }
24
25
 
25
26
  @keyframes builder-assistant-dot {
26
- 0%,
27
- 80%,
28
- 100% {
27
+ 0%, 80%, 100% {
29
28
  opacity: 0.25;
30
29
  transform: translateY(0);
31
30
  }
@@ -47,10 +46,10 @@
47
46
  flex: 1;
48
47
  flex-direction: column;
49
48
  min-height: 0;
49
+ }
50
50
 
51
- &[hidden] {
52
- display: none;
53
- }
51
+ .builder-assistant[hidden] {
52
+ display: none;
54
53
  }
55
54
 
56
55
  .builder-assistant__sr-only {
@@ -62,10 +61,11 @@
62
61
  white-space: nowrap;
63
62
  }
64
63
 
65
- // ---------------------------------------------------------------------------
66
- // Use Claude Code or Codex
67
- // ---------------------------------------------------------------------------
68
-
64
+ /*
65
+ * ---------------------------------------------------------------------------
66
+ * Use Claude Code or Codex
67
+ * ---------------------------------------------------------------------------
68
+ */
69
69
  .builder-assistant__connect-head {
70
70
  display: flex;
71
71
  align-items: center;
@@ -83,16 +83,16 @@
83
83
  align-items: stretch;
84
84
  gap: 6px;
85
85
  font-size: var(--be-text-m);
86
+ }
86
87
 
87
- code {
88
- padding: 1px 4px;
89
- border-radius: 4px;
90
- background: var(--theme-elevation-100);
91
- }
88
+ .builder-assistant__step code {
89
+ padding: 1px 4px;
90
+ border-radius: 4px;
91
+ background: var(--color-bg-hover);
92
+ }
92
93
 
93
- > .builder-assistant__link {
94
- align-self: flex-start;
95
- }
94
+ .builder-assistant__step > .builder-assistant__link {
95
+ align-self: flex-start;
96
96
  }
97
97
 
98
98
  .builder-assistant__tabpanel {
@@ -107,49 +107,53 @@
107
107
  }
108
108
 
109
109
  .builder-assistant__step-text {
110
- color: var(--theme-elevation-800);
110
+ color: var(--color-text);
111
111
  line-height: 1.5;
112
112
  }
113
113
 
114
- // The box holds the command and its copy button (top right). The command scrolls sideways and
115
- // fades out at the right edge, so a cut line reads as "more to scroll".
114
+ /*
115
+ * The box holds the command and its copy button (top right). The command scrolls sideways and
116
+ * fades out at the right edge, so a cut line reads as "more to scroll".
117
+ */
116
118
  .builder-assistant__copy-code {
117
- --ba-code-bg: var(--theme-elevation-100);
119
+ --ba-code-bg: var(--color-bg-hover);
118
120
  position: relative;
119
121
  align-self: stretch;
120
122
  border-radius: var(--be-radius);
121
123
  background: var(--ba-code-bg);
124
+ /*
125
+ * Commands never wrap: a broken line would copy wrong and read worse. They scroll sideways.
126
+ * The right padding keeps the end of the command clear of the button and the fade.
127
+ */
128
+ }
122
129
 
123
- // Commands never wrap: a broken line would copy wrong and read worse. They scroll sideways.
124
- // The right padding keeps the end of the command clear of the button and the fade.
125
- .builder-assistant__card-code {
126
- min-width: 0;
127
- padding-right: 40px;
128
- overflow-x: auto;
129
- background: none;
130
- white-space: pre;
131
- scrollbar-width: thin;
132
- }
130
+ .builder-assistant__copy-code .builder-assistant__card-code {
131
+ min-width: 0;
132
+ padding-right: 40px;
133
+ overflow-x: auto;
134
+ background: none;
135
+ white-space: pre;
136
+ scrollbar-width: thin;
137
+ }
133
138
 
134
- &::after {
135
- content: '';
136
- position: absolute;
137
- top: 0;
138
- right: 0;
139
- bottom: 0;
140
- width: 56px;
141
- border-radius: 0 var(--be-radius) var(--be-radius) 0;
142
- background: linear-gradient(to right, transparent, var(--ba-code-bg) 70%);
143
- pointer-events: none;
144
- }
139
+ .builder-assistant__copy-code::after {
140
+ content: "";
141
+ position: absolute;
142
+ top: 0;
143
+ right: 0;
144
+ bottom: 0;
145
+ width: 56px;
146
+ border-radius: 0 var(--be-radius) var(--be-radius) 0;
147
+ background: linear-gradient(to right, transparent, var(--ba-code-bg) 70%);
148
+ pointer-events: none;
149
+ }
145
150
 
146
- .builder-editor__icon-button {
147
- position: absolute;
148
- top: 2px;
149
- right: 2px;
150
- z-index: 1;
151
- background: var(--ba-code-bg);
152
- }
151
+ .builder-assistant__copy-code .builder-editor__icon-button {
152
+ position: absolute;
153
+ top: 2px;
154
+ right: 2px;
155
+ z-index: 1;
156
+ background: var(--ba-code-bg);
153
157
  }
154
158
 
155
159
  .builder-assistant__badge {
@@ -159,7 +163,7 @@
159
163
  width: 22px;
160
164
  height: 22px;
161
165
  border-radius: 6px;
162
- background: var(--theme-elevation-100);
166
+ background: var(--color-bg-hover);
163
167
  color: var(--be-muted);
164
168
  }
165
169
 
@@ -169,10 +173,11 @@
169
173
  border-radius: 5px;
170
174
  }
171
175
 
172
- // ---------------------------------------------------------------------------
173
- // Message list
174
- // ---------------------------------------------------------------------------
175
-
176
+ /*
177
+ * ---------------------------------------------------------------------------
178
+ * Message list
179
+ * ---------------------------------------------------------------------------
180
+ */
176
181
  .builder-assistant__scroll {
177
182
  flex: 1;
178
183
  min-height: 0;
@@ -207,8 +212,8 @@
207
212
  margin: 0;
208
213
  padding: 8px 12px;
209
214
  border-radius: 14px 14px 4px;
210
- background: var(--theme-elevation-100);
211
- color: var(--theme-text);
215
+ background: var(--color-bg-hover);
216
+ color: var(--color-text);
212
217
  font-size: var(--be-text-m);
213
218
  line-height: 1.5;
214
219
  white-space: pre-wrap;
@@ -239,10 +244,10 @@
239
244
  color: var(--be-muted);
240
245
  font-size: var(--be-text-s);
241
246
  font-weight: var(--be-weight-medium);
247
+ }
242
248
 
243
- > span:nth-child(2) {
244
- flex: 1;
245
- }
249
+ .builder-assistant__turn-head > span:nth-child(2) {
250
+ flex: 1;
246
251
  }
247
252
 
248
253
  .builder-assistant__copy {
@@ -255,89 +260,86 @@
255
260
  opacity: 1;
256
261
  }
257
262
 
258
- // Markdown
263
+ /* Markdown */
259
264
  .builder-assistant__md {
260
- color: var(--theme-text);
265
+ color: var(--color-text);
261
266
  font-size: var(--be-text-m);
262
267
  line-height: 1.6;
263
268
  overflow-wrap: anywhere;
269
+ }
264
270
 
265
- > * {
266
- margin: 0;
267
- }
271
+ .builder-assistant__md > * {
272
+ margin: 0;
273
+ }
268
274
 
269
- > * + * {
270
- margin-top: 8px;
271
- }
275
+ .builder-assistant__md > * + * {
276
+ margin-top: 8px;
277
+ }
272
278
 
273
- ul,
274
- ol {
275
- padding-left: 20px;
276
- }
279
+ .builder-assistant__md ul,
280
+ .builder-assistant__md ol {
281
+ padding-left: 20px;
282
+ }
277
283
 
278
- li + li {
279
- margin-top: 2px;
280
- }
284
+ .builder-assistant__md li + li {
285
+ margin-top: 2px;
286
+ }
281
287
 
282
- li::marker {
283
- color: var(--be-muted);
284
- }
288
+ .builder-assistant__md li::marker {
289
+ color: var(--be-muted);
290
+ }
285
291
 
286
- strong {
287
- font-weight: var(--be-weight-strong);
288
- }
292
+ .builder-assistant__md strong {
293
+ font-weight: var(--be-weight-strong);
294
+ }
289
295
 
290
- code {
291
- padding: 1px 4px;
292
- border-radius: 4px;
293
- background: var(--theme-elevation-100);
294
- font-size: var(--be-text-s);
295
- }
296
+ .builder-assistant__md code {
297
+ padding: 1px 4px;
298
+ border-radius: 4px;
299
+ background: var(--color-bg-hover);
300
+ font-size: var(--be-text-s);
301
+ }
296
302
 
297
- pre {
298
- padding: 8px 10px;
299
- border-radius: var(--be-radius-m);
300
- background: var(--theme-elevation-50);
301
- border: 1px solid var(--be-border-soft);
302
- overflow-x: auto;
303
- white-space: pre;
304
-
305
- code {
306
- padding: 0;
307
- background: none;
308
- }
309
- }
303
+ .builder-assistant__md pre {
304
+ padding: 8px 10px;
305
+ border-radius: var(--be-radius-m);
306
+ background: var(--color-bg-secondary);
307
+ border: 1px solid var(--be-border-soft);
308
+ overflow-x: auto;
309
+ white-space: pre;
310
+ }
310
311
 
311
- a {
312
- color: var(--theme-text);
313
- text-decoration: underline;
314
- text-underline-offset: 2px;
315
- }
312
+ .builder-assistant__md pre code {
313
+ padding: 0;
314
+ background: none;
315
+ }
316
+
317
+ .builder-assistant__md a {
318
+ color: var(--color-text);
319
+ text-decoration: underline;
320
+ text-underline-offset: 2px;
316
321
  }
317
322
 
318
323
  .builder-assistant__md-heading {
319
324
  font-weight: var(--be-weight-strong);
320
325
  }
321
326
 
322
- // The caret at the end of streaming text.
323
- .builder-assistant__text--streaming .builder-assistant__md {
324
- > p:last-child::after,
325
- > ul:last-child > li:last-child::after,
326
- > ol:last-child > li:last-child::after,
327
- &:empty::after {
328
- content: '';
329
- display: inline-block;
330
- width: 2px;
331
- height: 1.1em;
332
- margin-left: 2px;
333
- border-radius: 1px;
334
- background: var(--theme-text);
335
- vertical-align: text-bottom;
336
- animation: builder-assistant-blink 1s steps(1) infinite;
337
- }
327
+ /* The caret at the end of streaming text. */
328
+ .builder-assistant__text--streaming .builder-assistant__md > p:last-child::after,
329
+ .builder-assistant__text--streaming .builder-assistant__md > ul:last-child > li:last-child::after,
330
+ .builder-assistant__text--streaming .builder-assistant__md > ol:last-child > li:last-child::after, .builder-assistant__text--streaming .builder-assistant__md:empty::after {
331
+ content: "";
332
+ display: inline-block;
333
+ width: 2px;
334
+ height: 1.1em;
335
+ margin-left: 2px;
336
+ border-radius: 1px;
337
+ background: var(--color-bg-inverse);
338
+ vertical-align: text-bottom;
339
+ animation: builder-assistant-blink 1s steps(1) infinite;
338
340
  }
339
341
 
340
- // Tool chips
342
+ /* Tool chips */
341
343
  .builder-assistant__tools {
342
344
  display: flex;
343
345
  flex-direction: column;
@@ -355,7 +357,7 @@
355
357
  padding: 5px 8px;
356
358
  border: 1px solid var(--be-border-soft);
357
359
  border-radius: var(--be-radius-m);
358
- background: var(--theme-elevation-50);
360
+ background: var(--color-bg-secondary);
359
361
  animation: builder-assistant-in 180ms var(--be-ease) both;
360
362
  }
361
363
 
@@ -379,74 +381,74 @@
379
381
 
380
382
  .builder-assistant__chip-label {
381
383
  overflow: hidden;
382
- color: var(--theme-elevation-800);
384
+ color: var(--color-text);
383
385
  font-size: var(--be-text-s);
384
386
  text-overflow: ellipsis;
385
387
  white-space: nowrap;
386
388
  }
387
389
 
388
390
  .builder-assistant__chip--running {
389
- border-color: var(--theme-elevation-300);
391
+ border-color: var(--color-border-control-strong);
392
+ }
390
393
 
391
- .builder-assistant__chip-icon {
392
- background: none;
393
- }
394
+ .builder-assistant__chip--running .builder-assistant__chip-icon {
395
+ background: none;
396
+ }
394
397
 
395
- .builder-assistant__chip-label {
396
- color: var(--theme-text);
397
- }
398
+ .builder-assistant__chip--running .builder-assistant__chip-label {
399
+ color: var(--color-text);
398
400
  }
399
401
 
400
- // Started but never ran (the model dropped it, Stop, an error): quiet, not an alarm.
402
+ /* Started but never ran (the model dropped it, Stop, an error): quiet, not an alarm. */
401
403
  .builder-assistant__chip--cancelled {
402
404
  border-style: dashed;
403
405
  background: none;
406
+ }
404
407
 
405
- .builder-assistant__chip-icon {
406
- background: var(--theme-elevation-100);
407
- color: var(--theme-elevation-600);
408
- }
408
+ .builder-assistant__chip--cancelled .builder-assistant__chip-icon {
409
+ background: var(--color-bg-hover);
410
+ color: var(--color-text-secondary);
411
+ }
409
412
 
410
- .builder-assistant__chip-label {
411
- color: var(--theme-elevation-600);
412
- }
413
+ .builder-assistant__chip--cancelled .builder-assistant__chip-label {
414
+ color: var(--color-text-secondary);
413
415
  }
414
416
 
415
- // A failed call the model retried and fixed: as quiet as a call that never ran.
417
+ /* A failed call the model retried and fixed: as quiet as a call that never ran. */
416
418
  .builder-assistant__chip--retried {
417
419
  border-style: dashed;
418
420
  background: none;
421
+ }
419
422
 
420
- .builder-assistant__chip-icon {
421
- background: var(--theme-elevation-100);
422
- color: var(--theme-elevation-600);
423
- }
423
+ .builder-assistant__chip--retried .builder-assistant__chip-icon {
424
+ background: var(--color-bg-hover);
425
+ color: var(--color-text-secondary);
426
+ }
424
427
 
425
- .builder-assistant__chip-label {
426
- color: var(--theme-elevation-700);
427
- }
428
+ .builder-assistant__chip--retried .builder-assistant__chip-label {
429
+ color: var(--color-text-secondary);
428
430
  }
429
431
 
430
432
  .builder-assistant__chip--error {
431
- border-color: color-mix(in srgb, var(--theme-error-500) 35%, transparent);
433
+ border-color: color-mix(in srgb, var(--color-border-danger-strong) 35%, transparent);
434
+ }
432
435
 
433
- .builder-assistant__chip-icon {
434
- background: color-mix(in srgb, var(--theme-error-500) 14%, transparent);
435
- color: var(--theme-error-500);
436
- }
436
+ .builder-assistant__chip--error .builder-assistant__chip-icon {
437
+ background: color-mix(in srgb, var(--color-bg-danger) 14%, transparent);
438
+ color: var(--color-text-danger);
437
439
  }
438
440
 
439
441
  .builder-assistant__chip--warn {
440
- border-color: color-mix(in srgb, var(--theme-warning-500) 40%, transparent);
442
+ border-color: color-mix(in srgb, var(--color-border-warning-strong) 40%, transparent);
443
+ }
441
444
 
442
- .builder-assistant__chip-icon {
443
- background: color-mix(in srgb, var(--theme-warning-500) 16%, transparent);
444
- color: var(--theme-warning-500);
445
- }
445
+ .builder-assistant__chip--warn .builder-assistant__chip-icon {
446
+ background: color-mix(in srgb, var(--color-bg-warning) 16%, transparent);
447
+ color: var(--color-text-warning);
448
+ }
446
449
 
447
- .builder-assistant__chip-note {
448
- color: var(--theme-elevation-700);
449
- }
450
+ .builder-assistant__chip--warn .builder-assistant__chip-note {
451
+ color: var(--color-text-secondary);
450
452
  }
451
453
 
452
454
  .builder-assistant__chip-image {
@@ -456,30 +458,30 @@
456
458
  max-height: 160px;
457
459
  margin: 4px 0 2px 24px;
458
460
  border-radius: var(--be-radius);
459
- background: var(--theme-elevation-100);
461
+ background: var(--color-bg-hover);
460
462
  object-fit: cover;
461
463
  }
462
464
 
463
- // "Show" on a change: pushed to the right end of the chip.
465
+ /* "Show" on a change: pushed to the right end of the chip. */
464
466
  .builder-assistant__chip-show {
465
467
  flex: none;
466
468
  margin-left: auto;
467
469
  }
468
470
 
469
- // The raw error of a failed call, behind "Details".
471
+ /* The raw error of a failed call, behind "Details". */
470
472
  .builder-assistant__chip-details {
471
473
  padding-left: 24px;
474
+ }
472
475
 
473
- summary {
474
- color: var(--be-muted);
475
- font-size: var(--be-text-s);
476
- font-weight: var(--be-weight-regular);
477
- }
476
+ .builder-assistant__chip-details summary {
477
+ color: var(--be-muted);
478
+ font-size: var(--be-text-s);
479
+ font-weight: var(--be-weight-regular);
478
480
  }
479
481
 
480
482
  .builder-assistant__chip-detail {
481
483
  margin: 4px 0 0;
482
- color: var(--theme-elevation-700);
484
+ color: var(--color-text-secondary);
483
485
  font-size: var(--be-text-s);
484
486
  line-height: 1.4;
485
487
  overflow-wrap: anywhere;
@@ -487,7 +489,7 @@
487
489
 
488
490
  .builder-assistant__chip-note {
489
491
  padding-left: 24px;
490
- color: var(--theme-error-500);
492
+ color: var(--color-text-danger);
491
493
  font-size: var(--be-text-s);
492
494
  line-height: 1.4;
493
495
  }
@@ -495,8 +497,8 @@
495
497
  .builder-assistant__spinner {
496
498
  width: 12px;
497
499
  height: 12px;
498
- border: 1.5px solid var(--theme-elevation-200);
499
- border-top-color: var(--theme-elevation-700);
500
+ border: 1.5px solid var(--color-border-control-strong);
501
+ border-top-color: var(--color-border-strong);
500
502
  border-radius: 50%;
501
503
  animation: builder-assistant-spin 700ms linear infinite;
502
504
  }
@@ -513,25 +515,25 @@
513
515
  .builder-assistant__dots {
514
516
  display: inline-flex;
515
517
  gap: 3px;
518
+ }
516
519
 
517
- span {
518
- width: 4px;
519
- height: 4px;
520
- border-radius: 50%;
521
- background: var(--theme-elevation-500);
522
- animation: builder-assistant-dot 1.2s ease-in-out infinite;
523
- }
520
+ .builder-assistant__dots span {
521
+ width: 4px;
522
+ height: 4px;
523
+ border-radius: 50%;
524
+ background: var(--color-bg-disabled);
525
+ animation: builder-assistant-dot 1.2s ease-in-out infinite;
526
+ }
524
527
 
525
- span:nth-child(2) {
526
- animation-delay: 150ms;
527
- }
528
+ .builder-assistant__dots span:nth-child(2) {
529
+ animation-delay: 150ms;
530
+ }
528
531
 
529
- span:nth-child(3) {
530
- animation-delay: 300ms;
531
- }
532
+ .builder-assistant__dots span:nth-child(3) {
533
+ animation-delay: 300ms;
532
534
  }
533
535
 
534
- // Notices
536
+ /* Notices */
535
537
  .builder-assistant__info {
536
538
  margin: 0;
537
539
  color: var(--be-muted);
@@ -546,23 +548,23 @@
546
548
  padding: 12px;
547
549
  border: 1px solid var(--be-border);
548
550
  border-radius: var(--be-radius-m);
549
- background: var(--theme-elevation-50);
551
+ background: var(--color-bg-secondary);
550
552
  }
551
553
 
552
554
  .builder-assistant__details {
553
555
  font-size: var(--be-text-m);
556
+ }
554
557
 
555
- summary {
556
- width: fit-content;
557
- color: var(--theme-elevation-800);
558
- font-weight: var(--be-weight-medium);
559
- cursor: pointer;
558
+ .builder-assistant__details summary {
559
+ width: fit-content;
560
+ color: var(--color-text);
561
+ font-weight: var(--be-weight-medium);
562
+ cursor: pointer;
563
+ }
560
564
 
561
- &:focus-visible {
562
- outline: 2px solid var(--be-accent);
563
- outline-offset: 2px;
564
- }
565
- }
565
+ .builder-assistant__details summary:focus-visible {
566
+ outline: 2px solid var(--be-accent);
567
+ outline-offset: 2px;
566
568
  }
567
569
 
568
570
  .builder-assistant__details-body {
@@ -572,22 +574,22 @@
572
574
  margin-top: 8px;
573
575
  padding-top: 8px;
574
576
  border-top: 1px solid var(--be-border-soft);
577
+ }
575
578
 
576
- .builder-assistant__card-code {
577
- overflow-x: auto;
578
- white-space: pre;
579
- }
579
+ .builder-assistant__details-body .builder-assistant__card-code {
580
+ overflow-x: auto;
581
+ white-space: pre;
580
582
  }
581
583
 
582
584
  .builder-assistant__card--error {
583
- border-color: color-mix(in srgb, var(--theme-error-500) 35%, transparent);
584
- background: color-mix(in srgb, var(--theme-error-500) 6%, var(--theme-bg));
585
+ border-color: color-mix(in srgb, var(--color-border-danger-strong) 35%, transparent);
586
+ background: color-mix(in srgb, var(--color-bg-danger) 6%, var(--color-bg));
587
+ }
585
588
 
586
- .builder-assistant__card-text svg {
587
- flex: none;
588
- margin-top: 2px;
589
- color: var(--theme-error-500);
590
- }
589
+ .builder-assistant__card--error .builder-assistant__card-text svg {
590
+ flex: none;
591
+ margin-top: 2px;
592
+ color: var(--color-text-danger);
591
593
  }
592
594
 
593
595
  .builder-assistant__card-title {
@@ -600,22 +602,22 @@
600
602
  display: flex;
601
603
  gap: 6px;
602
604
  margin: 0;
603
- color: var(--theme-elevation-800);
605
+ color: var(--color-text);
604
606
  font-size: var(--be-text-m);
605
607
  line-height: 1.5;
608
+ }
606
609
 
607
- code {
608
- padding: 1px 4px;
609
- border-radius: 4px;
610
- background: var(--theme-elevation-100);
611
- }
610
+ .builder-assistant__card-text code {
611
+ padding: 1px 4px;
612
+ border-radius: 4px;
613
+ background: var(--color-bg-hover);
612
614
  }
613
615
 
614
616
  .builder-assistant__card-code {
615
617
  margin: 0;
616
618
  padding: 6px 8px;
617
619
  border-radius: var(--be-radius);
618
- background: var(--theme-elevation-100);
620
+ background: var(--color-bg-hover);
619
621
  font-family: var(--font-mono, ui-monospace, monospace);
620
622
  font-size: var(--be-text-s);
621
623
  }
@@ -635,28 +637,31 @@
635
637
  padding: 0;
636
638
  border: 0;
637
639
  background: none;
638
- color: var(--theme-text);
640
+ color: var(--color-text);
639
641
  font-size: var(--be-text-m);
640
642
  font-weight: var(--be-weight-medium);
641
643
  text-decoration: none;
642
644
  cursor: pointer;
645
+ }
643
646
 
644
- &:hover {
645
- color: var(--be-accent-strong);
646
- text-decoration: underline;
647
- }
648
-
649
- &:focus-visible {
650
- outline: 2px solid var(--be-accent);
651
- outline-offset: 2px;
652
- border-radius: var(--be-radius);
653
- }
647
+ .builder-assistant__link:hover,
648
+ .builder-assistant__ghost:hover {
649
+ color: var(--be-accent-strong);
650
+ text-decoration: underline;
654
651
  }
655
652
 
656
- // ---------------------------------------------------------------------------
657
- // Empty state
658
- // ---------------------------------------------------------------------------
653
+ .builder-assistant__link:focus-visible,
654
+ .builder-assistant__ghost:focus-visible {
655
+ outline: 2px solid var(--be-accent);
656
+ outline-offset: 2px;
657
+ border-radius: var(--be-radius);
658
+ }
659
659
 
660
+ /*
661
+ * ---------------------------------------------------------------------------
662
+ * Empty state
663
+ * ---------------------------------------------------------------------------
664
+ */
660
665
  .builder-assistant__welcome,
661
666
  .builder-assistant__empty {
662
667
  display: flex;
@@ -666,10 +671,11 @@
666
671
  padding: 40px 16px 16px;
667
672
  text-align: center;
668
673
  animation: builder-assistant-in 260ms var(--be-ease) both;
674
+ }
669
675
 
670
- .builder-editor__hint {
671
- max-width: 260px;
672
- }
676
+ .builder-assistant__welcome .builder-editor__hint,
677
+ .builder-assistant__empty .builder-editor__hint {
678
+ max-width: 260px;
673
679
  }
674
680
 
675
681
  .builder-assistant__mark {
@@ -679,7 +685,7 @@
679
685
  height: 44px;
680
686
  margin-bottom: 6px;
681
687
  border-radius: 12px;
682
- background: var(--theme-elevation-100);
688
+ background: var(--color-bg-hover);
683
689
  color: var(--be-muted);
684
690
  }
685
691
 
@@ -705,30 +711,31 @@
705
711
  padding: 8px 10px;
706
712
  border: 1px solid var(--be-border);
707
713
  border-radius: var(--be-radius-m);
708
- background: var(--theme-bg);
709
- color: var(--theme-elevation-800);
714
+ background: var(--color-bg);
715
+ color: var(--color-text);
710
716
  font-size: var(--be-text-m);
711
717
  line-height: 1.35;
712
718
  text-align: left;
713
719
  cursor: pointer;
714
720
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
721
+ }
715
722
 
716
- &:hover {
717
- border-color: var(--theme-elevation-300);
718
- background: var(--be-hover);
719
- color: var(--theme-text);
720
- }
721
-
722
- &:focus-visible {
723
- outline: 2px solid var(--be-accent);
724
- outline-offset: 2px;
725
- }
723
+ .builder-assistant__suggestion:hover {
724
+ border-color: var(--color-border-control-strong);
725
+ background: var(--be-hover);
726
+ color: var(--color-text);
726
727
  }
727
728
 
728
- // ---------------------------------------------------------------------------
729
- // Composer
730
- // ---------------------------------------------------------------------------
729
+ .builder-assistant__suggestion:focus-visible {
730
+ outline: 2px solid var(--be-accent);
731
+ outline-offset: 2px;
732
+ }
731
733
 
734
+ /*
735
+ * ---------------------------------------------------------------------------
736
+ * Composer
737
+ * ---------------------------------------------------------------------------
738
+ */
732
739
  .builder-assistant__composer {
733
740
  display: flex;
734
741
  flex: none;
@@ -753,7 +760,7 @@
753
760
  height: 22px;
754
761
  padding: 0 8px;
755
762
  border-radius: 11px;
756
- background: var(--theme-elevation-100);
763
+ background: var(--color-bg-hover);
757
764
  color: var(--be-muted);
758
765
  font-size: var(--be-text-s);
759
766
  font-weight: var(--be-weight-medium);
@@ -762,11 +769,11 @@
762
769
  .builder-assistant__context-chip--selected {
763
770
  padding-right: 3px;
764
771
  background: var(--be-accent-soft);
765
- color: var(--theme-text);
772
+ color: var(--color-text);
773
+ }
766
774
 
767
- > svg {
768
- color: var(--be-accent-text);
769
- }
775
+ .builder-assistant__context-chip--selected > svg {
776
+ color: var(--be-accent-text);
770
777
  }
771
778
 
772
779
  .builder-assistant__context-text {
@@ -788,16 +795,16 @@
788
795
  background: transparent;
789
796
  color: var(--be-muted);
790
797
  cursor: pointer;
798
+ }
791
799
 
792
- &:hover {
793
- background: var(--theme-elevation-150);
794
- color: var(--theme-text);
795
- }
800
+ .builder-assistant__context-clear:hover {
801
+ background: var(--color-bg-tertiary);
802
+ color: var(--color-text);
803
+ }
796
804
 
797
- &:focus-visible {
798
- outline: 2px solid var(--be-accent);
799
- outline-offset: 1px;
800
- }
805
+ .builder-assistant__context-clear:focus-visible {
806
+ outline: 2px solid var(--be-accent);
807
+ outline-offset: 1px;
801
808
  }
802
809
 
803
810
  .builder-assistant__field {
@@ -805,19 +812,19 @@
805
812
  align-items: flex-end;
806
813
  gap: 6px;
807
814
  padding: 6px 6px 6px 10px;
808
- border: 1px solid var(--theme-elevation-150);
815
+ border: 1px solid var(--color-border);
809
816
  border-radius: 10px;
810
- background: var(--theme-input-bg, var(--theme-elevation-0));
817
+ background: var(--field-color-bg, var(--color-bg));
811
818
  transition: border-color 120ms ease, box-shadow 120ms ease;
819
+ }
812
820
 
813
- &:focus-within {
814
- border-color: var(--ba-accent);
815
- box-shadow: 0 0 0 3px var(--ba-accent-soft);
816
- }
821
+ .builder-assistant__field:focus-within {
822
+ border-color: var(--ba-accent);
823
+ box-shadow: 0 0 0 3px var(--ba-accent-soft);
824
+ }
817
825
 
818
- &[data-disabled] {
819
- background: var(--theme-elevation-50);
820
- }
826
+ .builder-assistant__field[data-disabled] {
827
+ background: var(--color-bg-secondary);
821
828
  }
822
829
 
823
830
  .builder-assistant__input {
@@ -829,27 +836,27 @@
829
836
  padding: 3px 0;
830
837
  border: 0;
831
838
  background: transparent;
832
- color: var(--theme-text);
839
+ color: var(--color-text);
833
840
  font-family: inherit;
834
841
  font-size: var(--be-text-m);
835
842
  line-height: 18px;
836
843
  resize: none;
837
844
  outline: none;
845
+ }
838
846
 
839
- &::placeholder {
840
- color: var(--be-subtle);
841
- }
847
+ .builder-assistant__input::placeholder {
848
+ color: var(--be-subtle);
849
+ }
842
850
 
843
- &:focus-visible {
844
- outline: none;
845
- }
851
+ .builder-assistant__input:focus-visible {
852
+ outline: none;
853
+ }
846
854
 
847
- &:disabled {
848
- cursor: default;
849
- }
855
+ .builder-assistant__input:disabled {
856
+ cursor: default;
850
857
  }
851
858
 
852
- // The primary button, as Payload colors it: solid text color on the page color.
859
+ /* The primary button, as Payload colors it: solid text color on the page color. */
853
860
  .builder-assistant__send {
854
861
  display: inline-grid;
855
862
  flex: none;
@@ -859,38 +866,38 @@
859
866
  padding: 0;
860
867
  border: 0;
861
868
  border-radius: 8px;
862
- background: var(--theme-elevation-800);
863
- color: var(--theme-elevation-0);
869
+ background: var(--color-bg-inverse);
870
+ color: var(--color-text-oninverse);
864
871
  cursor: pointer;
865
872
  transition: opacity 120ms ease, background-color 120ms ease, transform 120ms ease;
873
+ }
866
874
 
867
- &:hover:not(:disabled) {
868
- background: var(--theme-text);
869
- }
875
+ .builder-assistant__send:hover:not(:disabled) {
876
+ background: var(--color-bg-inverse);
877
+ }
870
878
 
871
- &:active:not(:disabled) {
872
- transform: scale(0.94);
873
- }
879
+ .builder-assistant__send:active:not(:disabled) {
880
+ transform: scale(0.94);
881
+ }
874
882
 
875
- &:disabled {
876
- background: var(--theme-elevation-150);
877
- color: var(--be-subtle);
878
- cursor: default;
879
- }
883
+ .builder-assistant__send:disabled {
884
+ background: var(--color-bg-tertiary);
885
+ color: var(--be-subtle);
886
+ cursor: default;
887
+ }
880
888
 
881
- &:focus-visible {
882
- outline: 2px solid var(--be-accent);
883
- outline-offset: 2px;
884
- }
889
+ .builder-assistant__send:focus-visible {
890
+ outline: 2px solid var(--be-accent);
891
+ outline-offset: 2px;
885
892
  }
886
893
 
887
894
  .builder-assistant__send--stop {
888
- background: var(--theme-elevation-150);
889
- color: var(--theme-text);
895
+ background: var(--color-bg-tertiary);
896
+ color: var(--color-text);
897
+ }
890
898
 
891
- &:hover:not(:disabled) {
892
- background: var(--theme-elevation-250, var(--theme-elevation-200));
893
- }
899
+ .builder-assistant__send--stop:hover:not(:disabled) {
900
+ background: var(--color-bg-pressed, var(--color-bg-pressed));
894
901
  }
895
902
 
896
903
  .builder-assistant__foot {
@@ -911,14 +918,14 @@
911
918
  margin: 0;
912
919
  color: var(--be-muted);
913
920
  font-size: var(--be-text-s);
921
+ }
914
922
 
915
- kbd {
916
- min-width: 0;
917
- height: 16px;
918
- padding: 0 4px;
919
- border-bottom-width: 1px;
920
- font-size: var(--be-text-s);
921
- }
923
+ .builder-assistant__footnote kbd {
924
+ min-width: 0;
925
+ height: 16px;
926
+ padding: 0 4px;
927
+ border-bottom-width: 1px;
928
+ font-size: var(--be-text-s);
922
929
  }
923
930
 
924
931
  @media (prefers-reduced-motion: reduce) {