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.
- package/README.md +14 -22
- package/dist/admin/BuilderTab.js +1 -1
- package/dist/admin/diff/LayoutDiff.js +3 -3
- package/dist/admin/diff/layoutDiff.scss +48 -48
- package/dist/admin/editor/DragLayer.js +1 -1
- package/dist/admin/editor/InlineToolbar.js +1 -1
- package/dist/admin/editor/Inspector.js +1 -1
- package/dist/admin/editor/Outline.js +1 -1
- package/dist/admin/editor/Overlay.js +1 -1
- package/dist/admin/editor/assistant/AssistantPanel.js +1 -1
- package/dist/admin/editor/assistant/ConnectAgents.js +1 -1
- package/dist/admin/editor/assistant/assistant.scss +65 -65
- package/dist/admin/editor/dnd/dnd.scss +2 -2
- package/dist/admin/editor/editor.scss +134 -134
- package/dist/admin/editor/empty/EmptyStart.js +3 -3
- package/dist/admin/editor/empty/empty.scss +3 -3
- package/dist/admin/editor/fields/ArrayField.js +2 -2
- package/dist/admin/editor/fields/access.d.ts +1 -1
- package/dist/admin/editor/fields/fields.scss +33 -33
- package/dist/admin/editor/generate/GenerateImage.js +1 -1
- package/dist/admin/editor/generate/generate.scss +48 -48
- package/dist/admin/editor/icons.js +1 -1
- package/dist/admin/editor/insert/InsertHandle.js +1 -1
- package/dist/admin/editor/layout/FrameResize.js +1 -1
- package/dist/admin/editor/layout/LeftPanel.js +1 -1
- package/dist/admin/editor/layout/layout.scss +4 -4
- package/dist/admin/editor/live/PresenceUI.js +1 -1
- package/dist/admin/editor/live/presence.scss +1 -1
- package/dist/admin/editor/locale/LocaleField.d.ts +1 -1
- package/dist/admin/editor/locale/LocaleField.js +1 -1
- package/dist/admin/editor/locale/locale.scss +12 -12
- package/dist/admin/editor/media/ImageEditor.js +1 -1
- package/dist/admin/editor/media/media.scss +23 -23
- package/dist/admin/editor/menu/Menu.js +1 -1
- package/dist/admin/editor/menu/menu.scss +16 -16
- package/dist/admin/editor/motion/MotionPanel.js +1 -1
- package/dist/admin/editor/motion/model.d.ts +2 -2
- package/dist/admin/editor/motion/motion.scss +2 -2
- package/dist/admin/editor/regions/RegionOverlay.js +1 -1
- package/dist/admin/editor/regions/RegionPane.js +1 -1
- package/dist/admin/editor/renderField.js +1 -1
- package/dist/admin/editor/styles/ColorPicker.js +1 -1
- package/dist/admin/editor/styles/VariantBar.js +1 -1
- package/dist/admin/editor/styles/controls.js +1 -1
- package/dist/admin/editor/styles/sections.js +1 -1
- package/dist/admin/editor/styles/styles.scss +93 -93
- package/dist/admin/editor/templates/Bindable.d.ts +1 -1
- package/dist/admin/editor/templates/Bindable.js +1 -1
- package/dist/admin/editor/templates/SamplePicker.js +1 -1
- package/dist/admin/editor/templates/templates.scss +90 -90
- package/dist/admin/editor/tooltip/tooltip.scss +4 -4
- package/dist/admin/editor/topbar/DocumentActions.js +1 -1
- package/dist/admin/editor/topbar/DocumentTitle.js +1 -1
- package/dist/admin/editor/topbar/screens/DrawerRouter.d.ts +1 -1
- package/dist/admin/editor/topbar/screens/ScreenDrawer.js +1 -1
- package/dist/admin/editor/topbar/screens/drawerRouterSupport.d.ts +1 -1
- package/dist/admin/editor/topbar/screens/screens.scss +20 -20
- package/dist/admin/editor/topbar/settingsDrawer.js +3 -3
- package/dist/admin/editor/topbar/settingsDrawer.scss +7 -7
- package/dist/admin/editor/topbar/topbar.scss +47 -47
- package/dist/admin/editor/ui/Select.js +1 -1
- package/dist/admin/editor/ui/controls.scss +26 -26
- package/dist/admin/screen/BuilderScreen.js +1 -1
- package/dist/ai/adapters/anthropic.d.ts +2 -2
- package/dist/ai/images/service.js +1 -1
- package/dist/ai/loop.d.ts +5 -5
- package/dist/blocks/defaults.d.ts +9 -9
- package/dist/core/bindings.d.ts +1 -1
- package/dist/core/fieldAccess.js +1 -1
- package/dist/core/fieldHooks.d.ts +1 -1
- package/dist/core/motion.d.ts +7 -7
- package/dist/live/draftAccess.js +1 -1
- package/dist/live/session.d.ts +1 -1
- package/dist/live/storage.js +2 -4
- package/dist/mcp/shared.d.ts +31 -31
- package/dist/plugin/index.js +4 -4
- package/dist/plugin/templates.js +5 -1
- package/dist/protocol/index.d.ts +1 -1
- package/dist/react/canvas/BuilderCanvas.js +1 -1
- package/dist/react/canvas/inline/rich/editor.js +6 -1
- package/dist/react/canvas/thumbnail/ThumbnailCanvas.js +1 -1
- package/dist/react/motion/style.js +1 -1
- package/dist/react/render/PayloadRoot.js +1 -1
- package/dist/react/render/RenderLayout.js +1 -1
- package/dist/react/render/resolve.js +2 -0
- package/dist/react/server.d.ts +3 -1
- package/dist/react/server.js +5 -2
- package/dist/react/theme/ThemeStyle.js +1 -1
- package/dist/theme/admin/ColorField.d.ts +2 -2
- package/dist/theme/admin/ColorField.js +2 -2
- package/dist/theme/admin/FontField.d.ts +2 -2
- package/dist/theme/admin/FontField.js +2 -2
- package/dist/theme/admin/SaveSignal.js +2 -2
- package/dist/theme/admin/fields.scss +48 -48
- package/package.json +28 -23
package/README.md
CHANGED
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
</tr>
|
|
16
16
|
</table>
|
|
17
17
|
|
|
18
|
-
A visual page builder for Payload CMS
|
|
18
|
+
A visual page builder for Payload CMS 4 beta. It adds a full-screen builder to the collections you choose. Editors drag blocks onto a live canvas, nest them without limit, and style them with Tailwind classes. AI agents can build and edit the same pages over MCP, and an open editor shows each AI change as it happens.
|
|
19
19
|
|
|
20
20
|
The npm package is `payload-canvas`.
|
|
21
21
|
|
|
22
|
-
-
|
|
22
|
+
- This prerelease targets Payload `4.0.0-beta.3`, Next.js `16.4+` and React 19.
|
|
23
23
|
- The layout is one JSON field per document. Nothing changes in your other fields.
|
|
24
24
|
- The site renders the layout with `payload-canvas/react` (React Server Components), or with your own renderer.
|
|
25
25
|
- Save, drafts, autosave, versions and access control stay Payload's own.
|
|
@@ -27,11 +27,9 @@ The npm package is `payload-canvas`.
|
|
|
27
27
|
|
|
28
28
|
One package holds everything: the Payload plugin and admin editor (`payload-canvas`), and the React renderer and canvas runtime for your site (`payload-canvas/react`). See [Entry points](#entry-points).
|
|
29
29
|
|
|
30
|
-
**Quick start.** Add
|
|
30
|
+
**Quick start.** Add `payload-canvas@next` to an existing Payload `4.0.0-beta.3` app with the [install guide](#install).
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
npx create-payload-canvas my-website
|
|
34
|
-
```
|
|
32
|
+
The bundled starter and `create-payload-canvas@latest` still target Payload 3. This prerelease publishes only the plugin.
|
|
35
33
|
|
|
36
34
|
## Contents
|
|
37
35
|
|
|
@@ -64,43 +62,37 @@ npx create-payload-canvas my-website
|
|
|
64
62
|
|
|
65
63
|
## Requirements
|
|
66
64
|
|
|
67
|
-
- `payload`, `@payloadcms/ui`, `@payloadcms/richtext-lexical`
|
|
68
|
-
- `next` 16.
|
|
65
|
+
- `payload`, `@payloadcms/ui`, `@payloadcms/richtext-lexical` exactly `4.0.0-beta.3`
|
|
66
|
+
- `next` 16.4 or later, `react` and `react-dom` 19.2 or later
|
|
69
67
|
- `tailwindcss` 4.3 or later (the plugin compiles your Tailwind entry CSS)
|
|
70
|
-
- Node.js
|
|
68
|
+
- Node.js 24.15 or later; TypeScript 6.0.3 or later for source development
|
|
71
69
|
- Any Payload database adapter. Postgres and SQLite store the layout as `jsonb`/JSON.
|
|
72
70
|
|
|
73
|
-
|
|
71
|
+
The package ships compiled JavaScript. Its admin styles remain SCSS and use Payload 4 semantic tokens. Payload 4's own admin uses CSS. Install `sass` if your app does not already provide it.
|
|
74
72
|
|
|
75
73
|
Peer dependencies:
|
|
76
74
|
|
|
77
75
|
| Package | Range | Needed for |
|
|
78
76
|
|---|---|---|
|
|
79
|
-
| `payload`, `@payloadcms/ui`, `@payloadcms/richtext-lexical` |
|
|
80
|
-
| `next` | `^16.
|
|
77
|
+
| `payload`, `@payloadcms/ui`, `@payloadcms/richtext-lexical` | `4.0.0-beta.3` | everything |
|
|
78
|
+
| `next` | `^16.4.0` | everything |
|
|
81
79
|
| `react`, `react-dom` | `^19.2.0` | everything |
|
|
82
80
|
| `tailwindcss` | `^4.3.0` | the CSS compile on save and in the canvas |
|
|
83
81
|
| `@anthropic-ai/sdk` | `>=0.131.0`, optional | only the `/ai/anthropic` adapter |
|
|
84
|
-
| `payload-mcp-toolkit` |
|
|
82
|
+
| `payload-mcp-toolkit` | `0.10.0-next.1`, optional | only `builderMcpTools()` (`/mcp`) |
|
|
85
83
|
| `zod` | `^3.25 \|\| ^4`, optional | only `builderMcpTools()` (`/mcp`) |
|
|
86
84
|
|
|
87
85
|
## Install
|
|
88
86
|
|
|
89
|
-
These steps start from
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
npx create-payload-app@latest -n my-site -t blank --db postgres --use-pnpm
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
They were tested step by step on such an app with Payload 3.90.2, Next.js 16.3.3, React 19.2.6, Tailwind 4.3.3, TypeScript 5.7 and pnpm 10, in `next dev` and in `next build` + `next start`. An existing Payload app works the same way: skip what you already have.
|
|
87
|
+
These steps start from an existing Payload `4.0.0-beta.3` app. Keep every `@payloadcms/*` package on that exact beta version.
|
|
96
88
|
|
|
97
89
|
### 1. Add the package
|
|
98
90
|
|
|
99
91
|
```bash
|
|
100
|
-
pnpm add payload-canvas tailwindcss @tailwindcss/postcss postcss
|
|
92
|
+
pnpm add payload-canvas@next tailwindcss @tailwindcss/postcss postcss sass
|
|
101
93
|
```
|
|
102
94
|
|
|
103
|
-
With npm: `npm install payload-canvas tailwindcss @tailwindcss/postcss postcss`.
|
|
95
|
+
With npm: `npm install payload-canvas@next tailwindcss @tailwindcss/postcss postcss sass`.
|
|
104
96
|
|
|
105
97
|
### 2. Add a collection with pages
|
|
106
98
|
|
package/dist/admin/BuilderTab.js
CHANGED
|
@@ -11,5 +11,5 @@ export function BuilderTab() {
|
|
|
11
11
|
const { config: { routes }, } = useConfig();
|
|
12
12
|
if (id === undefined || id === null || !collectionSlug)
|
|
13
13
|
return null;
|
|
14
|
-
return (_jsx(Button, { buttonStyle: "
|
|
14
|
+
return (_jsx(Button, { buttonStyle: "ghost", className: "doc-tab", el: "link", margin: false, size: "medium", to: builderViewPath(routes.admin, collectionSlug, id), children: _jsx("span", { className: "doc-tab__label", children: "Builder" }) }));
|
|
15
15
|
}
|
|
@@ -51,12 +51,12 @@ function ChangeRow({ change, settings }) {
|
|
|
51
51
|
return (_jsxs("li", { className: `${base}__change ${base}__change--${change.kind}`, children: [_jsxs("div", { className: `${base}__head`, children: [_jsx("span", { className: `${base}__pill ${base}__pill--${change.kind}`, children: KIND_LABELS[change.kind] }), _jsx("strong", { className: `${base}__name`, children: change.name }), (change.kind === 'added' || change.kind === 'removed') && change.where ? (_jsxs("span", { className: `${base}__where`, children: ["in ", change.where] })) : null, (change.kind === 'added' || change.kind === 'removed') && change.inside > 0 ? (_jsxs("span", { className: `${base}__where`, children: ["with ", change.inside, " ", change.inside === 1 ? 'block' : 'blocks', " inside"] })) : null, change.kind === 'moved' ? (_jsxs("span", { className: `${base}__where`, children: ["from ", change.from, " to ", change.to] })) : null] }), change.kind === 'changed' ? (_jsx("ul", { className: `${base}__details`, children: change.details.map((detail, index) => (_jsx(Detail, { detail: detail, settings: settings }, index))) })) : null] }));
|
|
52
52
|
}
|
|
53
53
|
export function LayoutDiff(props) {
|
|
54
|
-
const {
|
|
54
|
+
const { valueFrom, valueTo, field, clientField, i18n, locale, nestingLevel, selectedLocales } = props;
|
|
55
55
|
const builder = field.admin?.custom?.builder;
|
|
56
56
|
const settings = builder?.localization ?? null;
|
|
57
57
|
// Translations follow the locales picked in the compare view; all of them when none are picked.
|
|
58
58
|
const locales = settings && selectedLocales?.length ? selectedLocales : undefined;
|
|
59
|
-
const changes = diffLayouts(
|
|
59
|
+
const changes = diffLayouts(valueFrom, valueTo, { blocks: builder?.blocks ?? [], ...(locales ? { locales } : {}) });
|
|
60
60
|
const label = fieldLabel(clientField?.label ?? field.label, i18n?.language ?? 'en', field.name);
|
|
61
|
-
return (_jsxs("div", { className: `${base} nested-level-${nestingLevel ?? 0}`, children: [_jsxs(FieldDiffLabel, { children: [locale ? _jsx("span", { className: "field-diff__locale-label", children: locale }) : null, label] }), _jsxs("div", { className: `${base}__content`, children: [_jsx("p", { className: `${base}__summary`, children: summarizeLayoutChanges(changes) }), changes.length > 0 ? (_jsx("ul", { className: `${base}__list`, children: changes.map((change) => (_jsx(ChangeRow, { change: change, settings: settings }, `${change.kind}:${change.id}`))) })) : null, _jsx(LayoutJsonDiff, { from:
|
|
61
|
+
return (_jsxs("div", { className: `${base} nested-level-${nestingLevel ?? 0}`, children: [_jsxs(FieldDiffLabel, { children: [locale ? _jsx("span", { className: "field-diff__locale-label", children: locale }) : null, label] }), _jsxs("div", { className: `${base}__content`, children: [_jsx("p", { className: `${base}__summary`, children: summarizeLayoutChanges(changes) }), changes.length > 0 ? (_jsx("ul", { className: `${base}__list`, children: changes.map((change) => (_jsx(ChangeRow, { change: change, settings: settings }, `${change.kind}:${change.id}`))) })) : null, _jsx(LayoutJsonDiff, { from: valueFrom, to: valueTo })] })] }));
|
|
62
62
|
}
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
&__content {
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
|
-
gap: calc(var(--
|
|
13
|
-
background: var(--
|
|
14
|
-
padding: calc(var(--
|
|
12
|
+
gap: calc(var(--spacer-3) * 0.5);
|
|
13
|
+
background: var(--color-bg-secondary);
|
|
14
|
+
padding: calc(var(--spacer-3) * 0.5);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
&__summary {
|
|
18
18
|
margin: 0;
|
|
19
|
-
color: var(--
|
|
19
|
+
color: var(--color-text);
|
|
20
20
|
font-weight: 500;
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -30,47 +30,47 @@
|
|
|
30
30
|
&__list {
|
|
31
31
|
display: flex;
|
|
32
32
|
flex-direction: column;
|
|
33
|
-
gap: calc(var(--
|
|
33
|
+
gap: calc(var(--spacer-3) * 0.25);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&__change {
|
|
37
|
-
padding: calc(var(--
|
|
38
|
-
border: 1px solid var(--
|
|
39
|
-
border-radius: var(--
|
|
40
|
-
background: var(--
|
|
37
|
+
padding: calc(var(--spacer-3) * 0.4) calc(var(--spacer-3) * 0.5);
|
|
38
|
+
border: 1px solid var(--color-bg-hover);
|
|
39
|
+
border-radius: var(--radius-medium);
|
|
40
|
+
background: var(--color-bg);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&__head {
|
|
44
44
|
display: flex;
|
|
45
45
|
flex-wrap: wrap;
|
|
46
46
|
align-items: baseline;
|
|
47
|
-
gap: calc(var(--
|
|
47
|
+
gap: calc(var(--spacer-3) * 0.3);
|
|
48
48
|
min-width: 0;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
&__pill {
|
|
52
52
|
flex: none;
|
|
53
|
-
padding: 0 calc(var(--
|
|
54
|
-
border: 1px solid var(--
|
|
55
|
-
border-radius: var(--
|
|
56
|
-
background: var(--
|
|
57
|
-
color: var(--
|
|
58
|
-
font-size: calc(var(--
|
|
53
|
+
padding: 0 calc(var(--spacer-3) * 0.25);
|
|
54
|
+
border: 1px solid var(--color-border);
|
|
55
|
+
border-radius: var(--radius-medium);
|
|
56
|
+
background: var(--color-bg-hover);
|
|
57
|
+
color: var(--color-text);
|
|
58
|
+
font-size: calc(var(--spacer-3) * 0.55);
|
|
59
59
|
font-weight: 600;
|
|
60
60
|
line-height: 1.6;
|
|
61
61
|
text-transform: uppercase;
|
|
62
62
|
letter-spacing: 0.04em;
|
|
63
63
|
|
|
64
64
|
&--added {
|
|
65
|
-
border-color: var(--diff-create-pill-border, var(--
|
|
66
|
-
background: var(--diff-create-pill-bg, var(--
|
|
67
|
-
color: var(--diff-create-pill-color, var(--
|
|
65
|
+
border-color: var(--diff-create-pill-border, var(--color-border-success-strong));
|
|
66
|
+
background: var(--diff-create-pill-bg, var(--color-border-success));
|
|
67
|
+
color: var(--diff-create-pill-color, var(--color-text-success));
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
&--removed {
|
|
71
|
-
border-color: var(--diff-delete-pill-border, var(--
|
|
72
|
-
background: var(--diff-delete-pill-bg, var(--
|
|
73
|
-
color: var(--diff-delete-pill-color, var(--
|
|
71
|
+
border-color: var(--diff-delete-pill-border, var(--color-border-danger-strong));
|
|
72
|
+
background: var(--diff-delete-pill-bg, var(--color-border-danger));
|
|
73
|
+
color: var(--diff-delete-pill-color, var(--color-text-danger));
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -80,31 +80,31 @@
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
&__where {
|
|
83
|
-
color: var(--
|
|
83
|
+
color: var(--color-text-secondary);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
&__details {
|
|
87
87
|
display: flex;
|
|
88
88
|
flex-direction: column;
|
|
89
|
-
gap: calc(var(--
|
|
90
|
-
margin-top: calc(var(--
|
|
91
|
-
padding-inline-start: calc(var(--
|
|
92
|
-
border-inline-start: 2px solid var(--
|
|
89
|
+
gap: calc(var(--spacer-3) * 0.2);
|
|
90
|
+
margin-top: calc(var(--spacer-3) * 0.3);
|
|
91
|
+
padding-inline-start: calc(var(--spacer-3) * 0.5);
|
|
92
|
+
border-inline-start: 2px solid var(--color-bg-hover);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
&__detail {
|
|
96
96
|
display: flex;
|
|
97
97
|
flex-wrap: wrap;
|
|
98
98
|
align-items: baseline;
|
|
99
|
-
gap: calc(var(--
|
|
99
|
+
gap: calc(var(--spacer-3) * 0.25);
|
|
100
100
|
min-width: 0;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
&__detail-label {
|
|
104
104
|
display: inline-flex;
|
|
105
105
|
align-items: baseline;
|
|
106
|
-
gap: calc(var(--
|
|
107
|
-
color: var(--
|
|
106
|
+
gap: calc(var(--spacer-3) * 0.2);
|
|
107
|
+
color: var(--color-text-secondary);
|
|
108
108
|
|
|
109
109
|
&::after {
|
|
110
110
|
content: ':';
|
|
@@ -117,59 +117,59 @@
|
|
|
117
117
|
|
|
118
118
|
&__value,
|
|
119
119
|
&__class {
|
|
120
|
-
padding: 0 calc(var(--
|
|
121
|
-
border-radius: var(--
|
|
120
|
+
padding: 0 calc(var(--spacer-3) * 0.15);
|
|
121
|
+
border-radius: var(--radius-medium);
|
|
122
122
|
text-decoration: none;
|
|
123
123
|
overflow-wrap: anywhere;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
&__value--del {
|
|
127
|
-
background: var(--diff-delete-parent-bg, var(--
|
|
128
|
-
color: var(--diff-delete-parent-color, var(--
|
|
127
|
+
background: var(--diff-delete-parent-bg, var(--color-bg-danger-tertiary));
|
|
128
|
+
color: var(--diff-delete-parent-color, var(--color-text-danger));
|
|
129
129
|
text-decoration: line-through;
|
|
130
|
-
text-decoration-color: var(--diff-delete-pill-border, var(--
|
|
130
|
+
text-decoration-color: var(--diff-delete-pill-border, var(--color-border-danger-strong));
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
&__value--ins {
|
|
134
|
-
background: var(--diff-create-parent-bg, var(--
|
|
135
|
-
color: var(--diff-create-parent-color, var(--
|
|
134
|
+
background: var(--diff-create-parent-bg, var(--color-bg-success-tertiary));
|
|
135
|
+
color: var(--diff-create-parent-color, var(--color-text-success));
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
&__class {
|
|
139
|
-
font-family: var(--
|
|
140
|
-
font-size: calc(var(--
|
|
139
|
+
font-family: var(--text-mono-family, ui-monospace, monospace);
|
|
140
|
+
font-size: calc(var(--spacer-3) * 0.55);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
&__empty {
|
|
144
|
-
color: var(--
|
|
144
|
+
color: var(--color-text-tertiary);
|
|
145
145
|
font-style: italic;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
&__arrow {
|
|
149
|
-
color: var(--
|
|
149
|
+
color: var(--color-text-tertiary);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
&__json {
|
|
153
|
-
border-top: 1px solid var(--
|
|
154
|
-
padding-top: calc(var(--
|
|
153
|
+
border-top: 1px solid var(--color-bg-hover);
|
|
154
|
+
padding-top: calc(var(--spacer-3) * 0.4);
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
&__json-summary {
|
|
158
158
|
cursor: pointer;
|
|
159
|
-
color: var(--
|
|
159
|
+
color: var(--color-text-secondary);
|
|
160
160
|
width: fit-content;
|
|
161
161
|
|
|
162
162
|
&:hover {
|
|
163
|
-
color: var(--
|
|
163
|
+
color: var(--color-text);
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
&__json-content {
|
|
168
168
|
display: grid;
|
|
169
169
|
// Same columns as Payload's field diffs: old on the left, new on the right.
|
|
170
|
-
grid-template-columns: calc(50% - var(--
|
|
171
|
-
gap: var(--
|
|
172
|
-
margin-top: calc(var(--
|
|
170
|
+
grid-template-columns: calc(50% - var(--spacer-3) * 0.5) calc(50% - var(--spacer-3) * 0.5);
|
|
171
|
+
gap: var(--spacer-3);
|
|
172
|
+
margin-top: calc(var(--spacer-3) * 0.5);
|
|
173
173
|
overflow-x: auto;
|
|
174
174
|
|
|
175
175
|
pre {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
4
|
import { registerGhost, smoothView } from './dnd/smooth.js';
|
|
5
5
|
import { BlockIcon } from './icons.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
// The rich text toolbar shown over a rich text block while it is edited on the canvas. It lives
|
|
4
4
|
// in the admin overlay (Payload's look, never the site's CSS) and sends commands to the Lexical
|
|
5
5
|
// editor in the canvas iframe. Buttons keep the keyboard focus in the iframe (no focus on press).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { CheckboxInput } from '@payloadcms/ui';
|
|
4
4
|
import { useDeferredValue, useEffect, useState } from 'react';
|
|
5
5
|
import { findBlock, getBlockDefinition } from '../../core/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useDraggable } from '@dnd-kit/core';
|
|
4
4
|
import { memo, useCallback, useEffect, useMemo, useRef, useState, } from 'react';
|
|
5
5
|
import { describeMotion, findLocation, getBlockDefinition, slotNames, walkBlocks } from '../../core/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useDraggable } from '@dnd-kit/core';
|
|
4
4
|
import { findBlock, findLocation } from '../../core/index.js';
|
|
5
5
|
import { smoothView } from './dnd/smooth.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
// The Assistant tab of the inspector: the chat with the AI that edits this layout.
|
|
4
4
|
// State lives in the runtime's assistant controller; this file only renders it.
|
|
5
5
|
import { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
// "Use Claude Code or Codex": connect the official CLIs (signed in with a Claude Pro/Max or
|
|
4
4
|
// ChatGPT plan) to this site's MCP endpoint. They edit pages through the live channel, so changes
|
|
5
5
|
// appear in the open editor. Subscriptions are never used as API keys: the CLIs are the MCP clients.
|