payload-canvas 0.2.0 → 0.3.0-next.1

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 (95) hide show
  1. package/README.md +14 -22
  2. package/dist/admin/BuilderTab.js +1 -1
  3. package/dist/admin/diff/LayoutDiff.js +3 -3
  4. package/dist/admin/diff/layoutDiff.scss +48 -48
  5. package/dist/admin/editor/DragLayer.js +1 -1
  6. package/dist/admin/editor/InlineToolbar.js +1 -1
  7. package/dist/admin/editor/Inspector.js +1 -1
  8. package/dist/admin/editor/Outline.js +1 -1
  9. package/dist/admin/editor/Overlay.js +1 -1
  10. package/dist/admin/editor/assistant/AssistantPanel.js +1 -1
  11. package/dist/admin/editor/assistant/ConnectAgents.js +1 -1
  12. package/dist/admin/editor/assistant/assistant.scss +65 -65
  13. package/dist/admin/editor/dnd/dnd.scss +2 -2
  14. package/dist/admin/editor/editor.scss +134 -134
  15. package/dist/admin/editor/empty/EmptyStart.js +3 -3
  16. package/dist/admin/editor/empty/empty.scss +3 -3
  17. package/dist/admin/editor/fields/ArrayField.js +2 -2
  18. package/dist/admin/editor/fields/access.d.ts +1 -1
  19. package/dist/admin/editor/fields/fields.scss +33 -33
  20. package/dist/admin/editor/generate/GenerateImage.js +1 -1
  21. package/dist/admin/editor/generate/generate.scss +48 -48
  22. package/dist/admin/editor/icons.js +1 -1
  23. package/dist/admin/editor/insert/InsertHandle.js +1 -1
  24. package/dist/admin/editor/layout/FrameResize.js +1 -1
  25. package/dist/admin/editor/layout/LeftPanel.js +1 -1
  26. package/dist/admin/editor/layout/layout.scss +4 -4
  27. package/dist/admin/editor/live/PresenceUI.js +1 -1
  28. package/dist/admin/editor/live/presence.scss +1 -1
  29. package/dist/admin/editor/locale/LocaleField.d.ts +1 -1
  30. package/dist/admin/editor/locale/LocaleField.js +1 -1
  31. package/dist/admin/editor/locale/locale.scss +12 -12
  32. package/dist/admin/editor/media/ImageEditor.js +1 -1
  33. package/dist/admin/editor/media/media.scss +23 -23
  34. package/dist/admin/editor/menu/Menu.js +1 -1
  35. package/dist/admin/editor/menu/menu.scss +16 -16
  36. package/dist/admin/editor/motion/MotionPanel.js +1 -1
  37. package/dist/admin/editor/motion/model.d.ts +2 -2
  38. package/dist/admin/editor/motion/motion.scss +2 -2
  39. package/dist/admin/editor/regions/RegionOverlay.js +1 -1
  40. package/dist/admin/editor/regions/RegionPane.js +1 -1
  41. package/dist/admin/editor/renderField.js +1 -1
  42. package/dist/admin/editor/styles/ColorPicker.js +1 -1
  43. package/dist/admin/editor/styles/VariantBar.js +1 -1
  44. package/dist/admin/editor/styles/controls.js +1 -1
  45. package/dist/admin/editor/styles/sections.js +1 -1
  46. package/dist/admin/editor/styles/styles.scss +93 -93
  47. package/dist/admin/editor/templates/Bindable.d.ts +1 -1
  48. package/dist/admin/editor/templates/Bindable.js +1 -1
  49. package/dist/admin/editor/templates/SamplePicker.js +1 -1
  50. package/dist/admin/editor/templates/templates.scss +90 -90
  51. package/dist/admin/editor/tooltip/tooltip.scss +4 -4
  52. package/dist/admin/editor/topbar/DocumentActions.js +1 -1
  53. package/dist/admin/editor/topbar/DocumentTitle.js +1 -1
  54. package/dist/admin/editor/topbar/screens/DrawerRouter.d.ts +1 -1
  55. package/dist/admin/editor/topbar/screens/ScreenDrawer.js +1 -1
  56. package/dist/admin/editor/topbar/screens/drawerRouterSupport.d.ts +1 -1
  57. package/dist/admin/editor/topbar/screens/screens.scss +20 -20
  58. package/dist/admin/editor/topbar/settingsDrawer.js +3 -3
  59. package/dist/admin/editor/topbar/settingsDrawer.scss +7 -7
  60. package/dist/admin/editor/topbar/topbar.scss +47 -47
  61. package/dist/admin/editor/ui/Select.js +1 -1
  62. package/dist/admin/editor/ui/controls.scss +26 -26
  63. package/dist/admin/screen/BuilderScreen.js +1 -1
  64. package/dist/ai/adapters/anthropic.d.ts +2 -2
  65. package/dist/ai/images/service.js +1 -1
  66. package/dist/ai/loop.d.ts +5 -5
  67. package/dist/blocks/defaults.d.ts +9 -9
  68. package/dist/core/bindings.d.ts +1 -1
  69. package/dist/core/fieldAccess.js +1 -1
  70. package/dist/core/fieldHooks.d.ts +1 -1
  71. package/dist/core/motion.d.ts +7 -7
  72. package/dist/live/draftAccess.js +1 -1
  73. package/dist/live/session.d.ts +1 -1
  74. package/dist/live/storage.js +2 -4
  75. package/dist/mcp/shared.d.ts +31 -31
  76. package/dist/plugin/index.js +4 -4
  77. package/dist/plugin/templates.js +5 -1
  78. package/dist/protocol/index.d.ts +1 -1
  79. package/dist/react/canvas/BuilderCanvas.js +1 -1
  80. package/dist/react/canvas/inline/rich/editor.js +6 -1
  81. package/dist/react/canvas/thumbnail/ThumbnailCanvas.js +1 -1
  82. package/dist/react/motion/style.js +1 -1
  83. package/dist/react/render/PayloadRoot.js +1 -1
  84. package/dist/react/render/RenderLayout.js +1 -1
  85. package/dist/react/render/resolve.js +2 -0
  86. package/dist/react/server.d.ts +3 -1
  87. package/dist/react/server.js +5 -2
  88. package/dist/react/theme/ThemeStyle.js +1 -1
  89. package/dist/theme/admin/ColorField.d.ts +2 -2
  90. package/dist/theme/admin/ColorField.js +2 -2
  91. package/dist/theme/admin/FontField.d.ts +2 -2
  92. package/dist/theme/admin/FontField.js +2 -2
  93. package/dist/theme/admin/SaveSignal.js +2 -2
  94. package/dist/theme/admin/fields.scss +48 -48
  95. package/package.json +28 -23
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  // The empty page's start screen: a card over the canvas with three suggested sections, the
4
4
  // Sections and Blocks tabs, and the assistant (when the plugin has one). A document that the site
5
5
  // shows through a template says so first, with a link to the template.
@@ -114,7 +114,7 @@ function TemplateNotice({ template, titleId, onIgnore }) {
114
114
  const singular = collections.find((c) => c.slug === runtime.config.collection)?.labels?.singular;
115
115
  const noun = typeof singular === 'string' ? singular.toLowerCase() : 'document';
116
116
  const templates = runtime.config.templates;
117
- return (_jsxs(_Fragment, { children: [_jsx("span", { className: "builder-empty-start__icon", children: _jsx(Icon, { name: "template", size: 20 }) }), _jsxs("h2", { id: titleId, className: "builder-empty-start__title", children: ["This ", noun, " uses the template \u201C", template.name, "\u201D"] }), _jsxs("p", { className: "builder-empty-start__text", children: ["The site shows this ", noun, " through the template. Blocks you add here do not show while a template applies."] }), _jsxs("div", { className: "builder-empty-start__actions", children: [templates && (_jsx(Button, { el: "link", url: builderViewPath(routes.admin, templates.collection, template.id), buttonStyle: "primary", size: "small", margin: false, children: "Open the template" })), _jsx(Button, { buttonStyle: "secondary", size: "small", margin: false, onClick: onIgnore, children: "Add blocks here anyway" })] })] }));
117
+ return (_jsxs(_Fragment, { children: [_jsx("span", { className: "builder-empty-start__icon", children: _jsx(Icon, { name: "template", size: 20 }) }), _jsxs("h2", { id: titleId, className: "builder-empty-start__title", children: ["This ", noun, " uses the template \u201C", template.name, "\u201D"] }), _jsxs("p", { className: "builder-empty-start__text", children: ["The site shows this ", noun, " through the template. Blocks you add here do not show while a template applies."] }), _jsxs("div", { className: "builder-empty-start__actions", children: [templates && (_jsx(Button, { el: "link", url: builderViewPath(routes.admin, templates.collection, template.id), buttonStyle: "primary", size: "medium", margin: false, children: "Open the template" })), _jsx(Button, { buttonStyle: "secondary", size: "medium", margin: false, onClick: onIgnore, children: "Add blocks here anyway" })] })] }));
118
118
  }
119
119
  function StartOptions({ titleId }) {
120
120
  const runtime = useRuntime();
@@ -123,5 +123,5 @@ function StartOptions({ titleId }) {
123
123
  if (insertBlocks(runtime, section.blocks, sectionPosition(runtime)))
124
124
  runtime.notify(`Added ${section.label}`);
125
125
  };
126
- return (_jsxs(_Fragment, { children: [_jsx("h2", { id: titleId, className: "builder-empty-start__title", children: "Start this page" }), _jsx("p", { className: "builder-empty-start__text", children: picks.length > 0 ? 'Add a section to begin, or build the page block by block.' : 'Add blocks from the Blocks tab, or drag them onto the canvas.' }), picks.length > 0 && (_jsx("ul", { className: "builder-empty-start__sections", "aria-label": "Suggested sections", children: picks.map((section) => (_jsx("li", { children: _jsxs("button", { type: "button", className: "builder-editor__card builder-empty-start__section", onClick: () => insert(section), children: [_jsx(SectionThumb, { section: section }), _jsxs("span", { className: "builder-editor__card-text", children: [_jsx("span", { className: "builder-editor__card-label", children: section.label }), section.category && _jsx("span", { className: "builder-editor__card-desc", children: section.category })] })] }) }, section.id))) })), _jsxs("div", { className: "builder-empty-start__actions", children: [picks.length > 0 && (_jsx(Button, { buttonStyle: "secondary", size: "small", margin: false, onClick: () => selectLeftTab(runtime, 'sections', { focus: true }), children: "Browse sections" })), _jsx(Button, { buttonStyle: "secondary", size: "small", margin: false, onClick: () => selectLeftTab(runtime, 'blocks', { focus: true }), children: "Add a block" }), runtime.assistant && (_jsx(Button, { buttonStyle: "secondary", size: "small", margin: false, icon: _jsx(Icon, { name: "sparkle", size: 14 }), iconPosition: "left", onClick: () => runtime.toggleAssistant(true), children: "Ask the assistant" }))] })] }));
126
+ return (_jsxs(_Fragment, { children: [_jsx("h2", { id: titleId, className: "builder-empty-start__title", children: "Start this page" }), _jsx("p", { className: "builder-empty-start__text", children: picks.length > 0 ? 'Add a section to begin, or build the page block by block.' : 'Add blocks from the Blocks tab, or drag them onto the canvas.' }), picks.length > 0 && (_jsx("ul", { className: "builder-empty-start__sections", "aria-label": "Suggested sections", children: picks.map((section) => (_jsx("li", { children: _jsxs("button", { type: "button", className: "builder-editor__card builder-empty-start__section", onClick: () => insert(section), children: [_jsx(SectionThumb, { section: section }), _jsxs("span", { className: "builder-editor__card-text", children: [_jsx("span", { className: "builder-editor__card-label", children: section.label }), section.category && _jsx("span", { className: "builder-editor__card-desc", children: section.category })] })] }) }, section.id))) })), _jsxs("div", { className: "builder-empty-start__actions", children: [picks.length > 0 && (_jsx(Button, { buttonStyle: "secondary", size: "medium", margin: false, onClick: () => selectLeftTab(runtime, 'sections', { focus: true }), children: "Browse sections" })), _jsx(Button, { buttonStyle: "secondary", size: "medium", margin: false, onClick: () => selectLeftTab(runtime, 'blocks', { focus: true }), children: "Add a block" }), runtime.assistant && (_jsx(Button, { buttonStyle: "secondary", size: "medium", margin: false, icon: _jsx(Icon, { name: "sparkle", size: 14 }), iconPosition: "left", onClick: () => runtime.toggleAssistant(true), children: "Ask the assistant" }))] })] }));
127
127
  }
@@ -24,7 +24,7 @@
24
24
  border: 1px solid var(--be-border);
25
25
  border-radius: var(--be-radius-m);
26
26
  background: var(--be-panel);
27
- color: var(--theme-text);
27
+ color: var(--color-text);
28
28
  box-shadow: var(--be-shadow);
29
29
  text-align: center;
30
30
  pointer-events: auto;
@@ -44,7 +44,7 @@
44
44
  .builder-empty-start__title {
45
45
  margin: 0;
46
46
  // Payload's h4 size (16px): the start card's title is a page-level heading, not panel text.
47
- font-size: calc(var(--base) * 0.8);
47
+ font-size: calc(var(--spacer-3) * 0.8);
48
48
  font-weight: var(--be-weight-strong);
49
49
  line-height: 1.35;
50
50
  text-wrap: balance;
@@ -53,7 +53,7 @@
53
53
  .builder-empty-start__text {
54
54
  max-width: 48ch;
55
55
  margin: 0;
56
- color: var(--theme-elevation-650);
56
+ color: var(--color-text-secondary);
57
57
  font-size: var(--be-text-m);
58
58
  line-height: 1.5;
59
59
  text-wrap: balance;
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { Button, Collapsible, DraggableSortable, FieldLabel, useDraggableSortable } from '@payloadcms/ui';
4
4
  import { memo, use, useLayoutEffect, useMemo, useRef } from 'react';
5
5
  import { createId } from '../../../core/ids.js';
@@ -57,7 +57,7 @@ export function ArrayField({ fields, label, singular, description, maxRows, path
57
57
  };
58
58
  }, []);
59
59
  const ids = rows.map((row) => row.id);
60
- return (_jsxs("div", { className: "builder-field-array", children: [_jsxs("div", { className: "builder-field-array__head", children: [_jsx(FieldLabel, { label: label, path: path }), rows.length > 0 && (_jsxs("div", { className: "builder-field-array__head-actions", children: [_jsx("button", { type: "button", onClick: () => setCollapsedRows(stateKey, new Set(ids)), children: "Collapse all" }), _jsx("button", { type: "button", onClick: () => setCollapsedRows(stateKey, new Set()), children: "Show all" })] }))] }), description && _jsx("p", { className: "builder-field-group__description", children: description }), rows.length > 0 && (_jsx(DraggableSortable, { className: "builder-field-array__rows", ids: ids, onDragEnd: ({ moveFromIndex, moveToIndex }) => actions.move(moveFromIndex, moveToIndex), children: rows.map((row, index) => (_jsx(ArrayFieldRow, { actions: actions, collapsed: collapsed.has(row.id), fields: fields, full: full, index: index, itemLabel: itemLabel, path: path, row: row, rowCount: rows.length, stateKey: stateKey }, row.id))) })), _jsx(Button, { buttonStyle: "secondary", disabled: full, icon: "plus", iconPosition: "left", iconStyle: "with-border", margin: false, onClick: () => actions.addBelow(rows.length - 1), size: "small", children: singular ? `Add ${singular}` : 'Add item' })] }));
60
+ return (_jsxs("div", { className: "builder-field-array", children: [_jsxs("div", { className: "builder-field-array__head", children: [_jsx(FieldLabel, { label: label, path: path }), rows.length > 0 && (_jsxs("div", { className: "builder-field-array__head-actions", children: [_jsx("button", { type: "button", onClick: () => setCollapsedRows(stateKey, new Set(ids)), children: "Collapse all" }), _jsx("button", { type: "button", onClick: () => setCollapsedRows(stateKey, new Set()), children: "Show all" })] }))] }), description && _jsx("p", { className: "builder-field-group__description", children: description }), rows.length > 0 && (_jsx(DraggableSortable, { className: "builder-field-array__rows", ids: ids, onDragEnd: ({ moveFromIndex, moveToIndex }) => actions.move(moveFromIndex, moveToIndex), children: rows.map((row, index) => (_jsx(ArrayFieldRow, { actions: actions, collapsed: collapsed.has(row.id), fields: fields, full: full, index: index, itemLabel: itemLabel, path: path, row: row, rowCount: rows.length, stateKey: stateKey }, row.id))) })), _jsx(Button, { buttonStyle: "secondary", disabled: full, icon: "plus", iconPosition: "left", margin: false, onClick: () => actions.addBelow(rows.length - 1), size: "medium", children: singular ? `Add ${singular}` : 'Add item' })] }));
61
61
  }
62
62
  /** One row. Memoized: typing in one row does not re-render the others. */
63
63
  const ArrayFieldRow = memo(function ArrayFieldRow({ actions, collapsed, fields, full, index, itemLabel, path, row, rowCount, stateKey, }) {
@@ -21,7 +21,7 @@ export declare function useFieldAccessCheck(): (path: string) => {
21
21
  export declare function FieldAccessFrame({ locked, children }: {
22
22
  locked: boolean;
23
23
  children: ReactNode;
24
- }): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
24
+ }): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
25
25
  /** How many top-level props of the block the user may not read. */
26
26
  export declare function useHiddenCount(block: Block): number;
27
27
  /** A line under the fields when some are hidden from this user. */
@@ -7,25 +7,25 @@
7
7
  .builder-editor__fields {
8
8
  .field-description,
9
9
  .upload-relationship-details__meta {
10
- color: var(--theme-elevation-600);
10
+ color: var(--color-text-secondary);
11
11
  }
12
12
  }
13
13
 
14
14
  .builder-field-group {
15
15
  display: flex;
16
16
  flex-direction: column;
17
- gap: calc(var(--base) * 0.5);
17
+ gap: calc(var(--spacer-3) * 0.5);
18
18
  min-width: 0;
19
19
  margin: 0;
20
- padding: calc(var(--base) * 0.5) 0 0 calc(var(--base) * 0.6);
20
+ padding: calc(var(--spacer-3) * 0.5) 0 0 calc(var(--spacer-3) * 0.6);
21
21
  border: 0;
22
- border-left: 2px solid var(--theme-elevation-100);
22
+ border-left: 2px solid var(--color-bg-hover);
23
23
  }
24
24
 
25
25
  .builder-field-group__label {
26
- margin: 0 0 calc(var(--base) * 0.25);
26
+ margin: 0 0 calc(var(--spacer-3) * 0.25);
27
27
  padding: 0;
28
- color: var(--theme-elevation-600);
28
+ color: var(--color-text-secondary);
29
29
  font-size: var(--be-text-s);
30
30
  font-weight: var(--be-weight-strong);
31
31
  letter-spacing: 0.04em;
@@ -34,27 +34,27 @@
34
34
 
35
35
  .builder-field-group__description {
36
36
  margin: 0;
37
- color: var(--theme-elevation-600);
37
+ color: var(--color-text-secondary);
38
38
  font-size: var(--be-text-m);
39
39
  }
40
40
 
41
41
  .builder-field-group__fields {
42
42
  display: flex;
43
43
  flex-direction: column;
44
- gap: calc(var(--base) * 0.75);
44
+ gap: calc(var(--spacer-3) * 0.75);
45
45
  }
46
46
 
47
47
  // Point field: longitude and latitude side by side.
48
48
  .builder-field-point {
49
49
  display: flex;
50
50
  flex-direction: column;
51
- gap: calc(var(--base) * 0.25);
51
+ gap: calc(var(--spacer-3) * 0.25);
52
52
  }
53
53
 
54
54
  .builder-field-point__inputs {
55
55
  display: grid;
56
56
  grid-template-columns: repeat(2, minmax(0, 1fr));
57
- gap: calc(var(--base) * 0.5);
57
+ gap: calc(var(--spacer-3) * 0.5);
58
58
  }
59
59
 
60
60
  // Array field: Payload's look (Collapsible rows, drag handle, "..." row menu), sized for the
@@ -63,7 +63,7 @@
63
63
  display: flex;
64
64
  flex-direction: column;
65
65
  align-items: flex-start;
66
- gap: calc(var(--base) * 0.4);
66
+ gap: calc(var(--spacer-3) * 0.4);
67
67
 
68
68
  > * {
69
69
  align-self: stretch;
@@ -94,14 +94,14 @@
94
94
  padding: 0;
95
95
  border: 0;
96
96
  background: none;
97
- color: var(--theme-elevation-800);
97
+ color: var(--color-text);
98
98
  font: inherit;
99
99
  font-size: var(--be-text-m);
100
100
  cursor: pointer;
101
101
 
102
102
  &:hover,
103
103
  &:focus-visible {
104
- color: var(--theme-elevation-600);
104
+ color: var(--color-text-secondary);
105
105
  text-decoration: underline;
106
106
  }
107
107
  }
@@ -122,24 +122,24 @@
122
122
  }
123
123
 
124
124
  .builder-field-array .builder-field-array__collapsible {
125
- border-radius: var(--style-radius-s, 4px);
126
- background: var(--theme-elevation-0);
125
+ border-radius: var(--radius-medium, 4px);
126
+ background: var(--color-bg);
127
127
 
128
128
  > .collapsible__toggle-wrap {
129
129
  gap: 2px;
130
130
  padding: 2px 4px;
131
- border-top-left-radius: var(--style-radius-s, 4px);
132
- border-top-right-radius: var(--style-radius-s, 4px);
131
+ border-top-left-radius: var(--radius-medium, 4px);
132
+ border-top-right-radius: var(--radius-medium, 4px);
133
133
  line-height: 24px;
134
134
 
135
135
  > .collapsible__toggle {
136
- border-radius: var(--style-radius-s, 4px);
136
+ border-radius: var(--radius-medium, 4px);
137
137
  }
138
138
  }
139
139
 
140
140
  &.collapsible--collapsed > .collapsible__toggle-wrap {
141
- border-bottom-left-radius: var(--style-radius-s, 4px);
142
- border-bottom-right-radius: var(--style-radius-s, 4px);
141
+ border-bottom-left-radius: var(--radius-medium, 4px);
142
+ border-bottom-right-radius: var(--radius-medium, 4px);
143
143
  }
144
144
 
145
145
  // The toggle button covers the whole header. The handle sits above it, so a drag starts there.
@@ -152,8 +152,8 @@
152
152
  width: 20px;
153
153
  height: 20px;
154
154
  padding: 2px;
155
- border-radius: var(--style-radius-s, 4px);
156
- color: var(--theme-elevation-800);
155
+ border-radius: var(--radius-medium, 4px);
156
+ color: var(--color-text);
157
157
 
158
158
  &:hover {
159
159
  opacity: 1;
@@ -161,7 +161,7 @@
161
161
 
162
162
  &:focus-visible {
163
163
  opacity: 1;
164
- outline: 2px solid var(--theme-elevation-400);
164
+ outline: 2px solid var(--color-text-tertiary);
165
165
  }
166
166
  }
167
167
 
@@ -181,15 +181,15 @@
181
181
 
182
182
  .collapsible__content {
183
183
  padding: 0;
184
- border-bottom-left-radius: var(--style-radius-s, 4px);
185
- border-bottom-right-radius: var(--style-radius-s, 4px);
184
+ border-bottom-left-radius: var(--radius-medium, 4px);
185
+ border-bottom-right-radius: var(--radius-medium, 4px);
186
186
  }
187
187
  }
188
188
 
189
189
  .builder-field-array__title {
190
190
  display: block;
191
191
  overflow: hidden;
192
- color: var(--theme-text);
192
+ color: var(--color-text);
193
193
  font-size: var(--be-text-m);
194
194
  text-overflow: ellipsis;
195
195
  white-space: nowrap;
@@ -206,12 +206,12 @@
206
206
  border: 0;
207
207
  border-radius: 50%;
208
208
  background: none;
209
- color: var(--theme-elevation-800);
209
+ color: var(--color-text);
210
210
  cursor: pointer;
211
211
 
212
212
  &:hover,
213
213
  &[aria-expanded='true'] {
214
- background: var(--theme-elevation-0);
214
+ background: var(--color-bg);
215
215
  }
216
216
 
217
217
  // Near the inspector's right edge: the tooltip opens to the left.
@@ -225,14 +225,14 @@
225
225
  .builder-field-array__fields {
226
226
  display: flex;
227
227
  flex-direction: column;
228
- gap: calc(var(--base) * 0.75);
228
+ gap: calc(var(--spacer-3) * 0.75);
229
229
  padding: 10px;
230
230
  }
231
231
 
232
232
  // The message under an input (`InputError`).
233
233
  .builder-field-error {
234
234
  margin: 4px 0 0;
235
- color: var(--theme-error-500);
235
+ color: var(--color-bg-danger);
236
236
  font-size: var(--be-text-m);
237
237
  }
238
238
 
@@ -286,9 +286,9 @@
286
286
  justify-content: center;
287
287
  width: 20px;
288
288
  height: 20px;
289
- border-radius: var(--style-radius-s);
290
- color: var(--theme-elevation-600);
291
- background: var(--theme-elevation-50);
289
+ border-radius: var(--radius-medium);
290
+ color: var(--color-text-secondary);
291
+ background: var(--color-bg-secondary);
292
292
  cursor: help;
293
293
  }
294
294
 
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  // "Generate image" under an upload field of the inspector: a prompt, an aspect ratio and alt text.
4
4
  // The server generates the image with the site's image adapter, saves it in the media collection
5
5
  // as the signed-in user, and the field gets the new media id. Hidden when no image adapter is ready.
@@ -9,21 +9,21 @@
9
9
  gap: 6px;
10
10
  margin-top: 6px;
11
11
  padding: 4px 8px;
12
- border: 1px dashed var(--theme-elevation-250);
13
- border-radius: var(--style-radius-s, 4px);
12
+ border: 1px dashed var(--color-border);
13
+ border-radius: var(--radius-medium, 4px);
14
14
  background: none;
15
- color: var(--theme-elevation-700);
15
+ color: var(--color-text);
16
16
  font: inherit;
17
17
  font-size: var(--be-text-m);
18
18
  cursor: pointer;
19
19
 
20
20
  &:hover {
21
- border-color: var(--theme-elevation-400);
22
- color: var(--theme-text);
21
+ border-color: var(--color-text-tertiary);
22
+ color: var(--color-text);
23
23
  }
24
24
 
25
25
  &:focus-visible {
26
- outline: 2px solid var(--theme-success-500);
26
+ outline: 2px solid var(--color-bg-success);
27
27
  outline-offset: 1px;
28
28
  }
29
29
  }
@@ -34,9 +34,9 @@
34
34
  gap: 6px;
35
35
  margin-top: 8px;
36
36
  padding: 10px;
37
- border: 1px solid var(--theme-elevation-150);
38
- border-radius: var(--style-radius-m, 6px);
39
- background: var(--theme-elevation-50);
37
+ border: 1px solid var(--color-border);
38
+ border-radius: var(--radius-large, 6px);
39
+ background: var(--color-bg-secondary);
40
40
  }
41
41
 
42
42
  .builder-generate__head {
@@ -49,7 +49,7 @@
49
49
  display: inline-flex;
50
50
  align-items: center;
51
51
  gap: 6px;
52
- color: var(--theme-text);
52
+ color: var(--color-text);
53
53
  font-size: var(--be-text-m);
54
54
  font-weight: var(--be-weight-strong);
55
55
  }
@@ -61,27 +61,27 @@
61
61
  height: 22px;
62
62
  padding: 0;
63
63
  border: 0;
64
- border-radius: var(--style-radius-s, 4px);
64
+ border-radius: var(--radius-medium, 4px);
65
65
  background: none;
66
- color: var(--theme-elevation-600);
66
+ color: var(--color-text-secondary);
67
67
  cursor: pointer;
68
68
 
69
69
  &:hover:not(:disabled) {
70
- background: var(--theme-elevation-100);
71
- color: var(--theme-text);
70
+ background: var(--color-bg-hover);
71
+ color: var(--color-text);
72
72
  }
73
73
  }
74
74
 
75
75
  .builder-generate__label {
76
76
  margin: 4px 0 0;
77
77
  padding: 0;
78
- color: var(--theme-elevation-600);
78
+ color: var(--color-text-secondary);
79
79
  font-size: var(--be-text-s);
80
80
  font-weight: var(--be-weight-medium);
81
81
  }
82
82
 
83
83
  .builder-generate__optional {
84
- color: var(--theme-elevation-600);
84
+ color: var(--color-text-secondary);
85
85
  font-weight: var(--be-weight-regular);
86
86
  }
87
87
 
@@ -89,15 +89,15 @@
89
89
  box-sizing: border-box;
90
90
  width: 100%;
91
91
  padding: 6px 8px;
92
- border: 1px solid var(--theme-elevation-150);
93
- border-radius: var(--style-radius-s, 4px);
94
- background: var(--theme-input-bg, var(--theme-bg));
95
- color: var(--theme-text);
92
+ border: 1px solid var(--color-border);
93
+ border-radius: var(--radius-medium, 4px);
94
+ background: var(--color-bg, var(--color-bg));
95
+ color: var(--color-text);
96
96
  font: inherit;
97
97
  font-size: var(--be-text-m);
98
98
 
99
99
  &:focus {
100
- border-color: var(--theme-elevation-400);
100
+ border-color: var(--color-text-tertiary);
101
101
  outline: none;
102
102
  }
103
103
 
@@ -131,27 +131,27 @@
131
131
  align-items: center;
132
132
  gap: 5px;
133
133
  padding: 3px 6px;
134
- border: 1px solid var(--theme-elevation-150);
135
- border-radius: var(--style-radius-s, 4px);
136
- background: var(--theme-bg);
137
- color: var(--theme-elevation-700);
134
+ border: 1px solid var(--color-border);
135
+ border-radius: var(--radius-medium, 4px);
136
+ background: var(--color-bg);
137
+ color: var(--color-text);
138
138
  font: inherit;
139
139
  font-size: var(--be-text-s);
140
140
  font-variant-numeric: tabular-nums;
141
141
  cursor: pointer;
142
142
 
143
143
  &:hover:not(:disabled) {
144
- border-color: var(--theme-elevation-300);
144
+ border-color: var(--color-border);
145
145
  }
146
146
 
147
147
  &[aria-pressed='true'] {
148
- border-color: var(--theme-success-500);
149
- background: color-mix(in srgb, var(--theme-success-500) 12%, transparent);
150
- color: var(--theme-text);
148
+ border-color: var(--color-bg-success);
149
+ background: color-mix(in srgb, var(--color-bg-success) 12%, transparent);
150
+ color: var(--color-text);
151
151
  }
152
152
 
153
153
  &:focus-visible {
154
- outline: 2px solid var(--theme-success-500);
154
+ outline: 2px solid var(--color-bg-success);
155
155
  outline-offset: 1px;
156
156
  }
157
157
  }
@@ -177,7 +177,7 @@
177
177
  .builder-generate__model {
178
178
  overflow: hidden;
179
179
  min-width: 0;
180
- color: var(--theme-elevation-600);
180
+ color: var(--color-text-secondary);
181
181
  font-size: var(--be-text-s);
182
182
  text-overflow: ellipsis;
183
183
  white-space: nowrap;
@@ -186,16 +186,16 @@
186
186
  .builder-generate__button {
187
187
  flex: none;
188
188
  padding: 5px 12px;
189
- border: 1px solid var(--theme-elevation-200);
190
- border-radius: var(--style-radius-s, 4px);
191
- background: var(--theme-bg);
192
- color: var(--theme-text);
189
+ border: 1px solid var(--color-border);
190
+ border-radius: var(--radius-medium, 4px);
191
+ background: var(--color-bg);
192
+ color: var(--color-text);
193
193
  font: inherit;
194
194
  font-size: var(--be-text-m);
195
195
  cursor: pointer;
196
196
 
197
197
  &:hover:not(:disabled) {
198
- border-color: var(--theme-elevation-400);
198
+ border-color: var(--color-text-tertiary);
199
199
  }
200
200
 
201
201
  &:disabled {
@@ -205,13 +205,13 @@
205
205
  }
206
206
 
207
207
  .builder-generate__button--primary {
208
- border-color: var(--theme-elevation-800);
209
- background: var(--theme-elevation-800);
210
- color: var(--theme-bg);
208
+ border-color: var(--color-text);
209
+ background: var(--color-text);
210
+ color: var(--color-bg);
211
211
 
212
212
  &:hover:not(:disabled) {
213
- border-color: var(--theme-elevation-1000);
214
- background: var(--theme-elevation-1000);
213
+ border-color: var(--color-text);
214
+ background: var(--color-text);
215
215
  }
216
216
  }
217
217
 
@@ -219,7 +219,7 @@
219
219
  display: inline-flex;
220
220
  align-items: center;
221
221
  gap: 8px;
222
- color: var(--theme-elevation-700);
222
+ color: var(--color-text);
223
223
  font-size: var(--be-text-m);
224
224
  font-variant-numeric: tabular-nums;
225
225
  }
@@ -227,15 +227,15 @@
227
227
  .builder-generate__spinner {
228
228
  width: 12px;
229
229
  height: 12px;
230
- border: 2px solid var(--theme-elevation-200);
231
- border-top-color: var(--theme-success-500);
230
+ border: 2px solid var(--color-border);
231
+ border-top-color: var(--color-bg-success);
232
232
  border-radius: 50%;
233
233
  animation: builder-generate-spin 0.8s linear infinite;
234
234
  }
235
235
 
236
236
  .builder-generate__error {
237
237
  margin: 0;
238
- color: var(--theme-error-500);
238
+ color: var(--color-bg-danger);
239
239
  font-size: var(--be-text-m);
240
240
  line-height: 1.4;
241
241
  }
@@ -250,14 +250,14 @@
250
250
  flex: none;
251
251
  width: 56px;
252
252
  height: 56px;
253
- border-radius: var(--style-radius-s, 4px);
253
+ border-radius: var(--radius-medium, 4px);
254
254
  object-fit: cover;
255
- background: var(--theme-elevation-100);
255
+ background: var(--color-bg-hover);
256
256
  }
257
257
 
258
258
  .builder-generate__note {
259
259
  margin: 0;
260
- color: var(--theme-elevation-600);
260
+ color: var(--color-text-secondary);
261
261
  font-size: var(--be-text-s);
262
262
  line-height: 1.4;
263
263
  }
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  const dot = (cx, cy, r = 0.9) => _jsx("circle", { cx: cx, cy: cy, r: r, fill: "currentColor", stroke: "none" });
4
4
  const PATHS = {
5
5
  // Blocks
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  /* oxlint-disable jsx-a11y/prefer-tag-over-role, jsx-a11y/click-events-have-key-events -- a combobox: the search input keeps the focus and handles the keys (arrows, Enter, Escape) for the listbox, which a native select cannot do */
4
4
  // The canvas "+" button: on the edge between blocks next to the pointer, or inside an empty slot.
5
5
  // A click opens a small picker (blocks and sections that fit there, searchable, keyboard
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  // Handles on the left and right edge of the canvas frame (Webflow-style). Drag one to resize the
4
4
  // frame: it stays centered, so both edges move. Shift snaps to breakpoint and device widths. A
5
5
  // double-click (or Enter) goes back to the device the drag started from, else to fluid.
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  // The left sidebar: three tabs at the top (Layers, Blocks, Sections), each panel full height.
4
4
  // Panels stay mounted once opened and hide with the `hidden` attribute: a library item that is
5
5
  // being dragged must stay mounted (dnd-kit tracks its node) when the tab changes mid-drag.
@@ -93,7 +93,7 @@
93
93
  // A drag rests on the tab: it opens in a moment.
94
94
  .builder-editor__segment[data-drag-over] {
95
95
  background: var(--be-accent-soft);
96
- color: var(--theme-text);
96
+ color: var(--color-text);
97
97
  box-shadow: inset 0 0 0 1px var(--be-accent);
98
98
  }
99
99
 
@@ -153,7 +153,7 @@
153
153
  padding: 0;
154
154
  border: 0;
155
155
  border-radius: 3px;
156
- background: var(--theme-elevation-300);
156
+ background: var(--color-border);
157
157
  cursor: ew-resize;
158
158
  touch-action: none;
159
159
  transform: translateY(-50%);
@@ -201,8 +201,8 @@
201
201
  left: 50%;
202
202
  padding: 4px 10px;
203
203
  border-radius: 12px;
204
- background: var(--theme-elevation-900);
205
- color: var(--theme-elevation-0);
204
+ background: var(--color-text);
205
+ color: var(--color-bg);
206
206
  font-size: var(--be-text-s);
207
207
  font-weight: var(--be-weight-medium);
208
208
  font-variant-numeric: tabular-nums;
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  // Presence UI: avatars in the toolbar, other editors' cursors and selections on the canvas,
4
4
  // colored dots in the outline, the "is editing this block" banner and the follow frame.
5
5
  // Admin code: Payload CSS variables and SCSS only (editor.scss, "Multiplayer" section).
@@ -7,7 +7,7 @@
7
7
  align-items: center;
8
8
  gap: 6px;
9
9
  margin: 4px 0 0;
10
- color: var(--theme-elevation-800);
10
+ color: var(--color-text);
11
11
  font-size: var(--be-text-s, 11px);
12
12
  line-height: 1.35;
13
13
  animation: builder-fade-in 160ms var(--be-ease, ease-out);
@@ -17,7 +17,7 @@ export declare function LocaleFieldFrame({ path, name, children }: {
17
17
  path: string;
18
18
  name: string;
19
19
  children: ReactNode;
20
- }): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
20
+ }): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
21
21
  /**
22
22
  * Above the inspector tabs. In a locale other than the default: which language you edit and what
23
23
  * changes every language; on the Content tab, "Copy N fields from English" fills every
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  // The inspector's language marks:
4
4
  // - `LocaleNote` above the tabs: which language you edit, what changes every language, and
5
5
  // "Copy N fields from English" for the selected block. In the default language it shows only