payload-canvas 0.6.3 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +3237 -3236
  3. package/dist/admin/aiKeyField.scss +58 -58
  4. package/dist/admin/diff/layoutDiff.scss +181 -181
  5. package/dist/admin/editor/assistant/assistant.scss +944 -944
  6. package/dist/admin/editor/classes/manager.scss +262 -262
  7. package/dist/admin/editor/comments/comments.scss +539 -539
  8. package/dist/admin/editor/dnd/dnd.scss +261 -261
  9. package/dist/admin/editor/editor.scss +2629 -2629
  10. package/dist/admin/editor/empty/empty.scss +92 -92
  11. package/dist/admin/editor/fields/fields.scss +778 -778
  12. package/dist/admin/editor/generate/generate.scss +276 -276
  13. package/dist/admin/editor/layout/layout.scss +240 -240
  14. package/dist/admin/editor/live/presence.scss +24 -24
  15. package/dist/admin/editor/locale/locale.scss +154 -154
  16. package/dist/admin/editor/media/media.scss +233 -233
  17. package/dist/admin/editor/menu/menu.scss +132 -132
  18. package/dist/admin/editor/motion/motion.scss +84 -84
  19. package/dist/admin/editor/sections/components.scss +238 -238
  20. package/dist/admin/editor/sections/variants.scss +90 -90
  21. package/dist/admin/editor/styles/ClassCss.js +3 -3
  22. package/dist/admin/editor/styles/classes.scss +381 -381
  23. package/dist/admin/editor/styles/styles.scss +1123 -1123
  24. package/dist/admin/editor/styles/tokens.js +2 -1
  25. package/dist/admin/editor/templates/templates.scss +654 -654
  26. package/dist/admin/editor/tooltip/tooltip.scss +39 -39
  27. package/dist/admin/editor/topbar/DocumentActions.js +1 -1
  28. package/dist/admin/editor/topbar/TopBar.js +2 -1
  29. package/dist/admin/editor/topbar/contentMode.scss +26 -26
  30. package/dist/admin/editor/topbar/screens/screens.scss +134 -134
  31. package/dist/admin/editor/topbar/settingsDrawer.scss +32 -32
  32. package/dist/admin/editor/topbar/tabTitle.d.ts +6 -0
  33. package/dist/admin/editor/topbar/tabTitle.js +9 -0
  34. package/dist/admin/editor/topbar/topbar.scss +645 -645
  35. package/dist/admin/editor/ui/controls.scss +320 -320
  36. package/dist/admin/forms/submissions.scss +197 -197
  37. package/dist/admin/layoutField.scss +69 -69
  38. package/dist/admin/templateConditions.scss +24 -24
  39. package/dist/ai/prompt.js +40 -40
  40. package/dist/blocks/client/marquee.js +14 -14
  41. package/dist/blocks/payload.js +13 -3
  42. package/dist/core/payloadBlocks.js +10 -1
  43. package/dist/core/responseError.d.ts +5 -0
  44. package/dist/core/responseError.js +8 -0
  45. package/dist/core/sections.d.ts +2 -0
  46. package/dist/core/sections.js +8 -0
  47. package/dist/css/index.d.ts +6 -0
  48. package/dist/css/index.js +40 -1
  49. package/dist/css/shared.js +2 -2
  50. package/dist/live/session.js +18 -0
  51. package/dist/live/storage.d.ts +5 -0
  52. package/dist/live/storage.js +20 -0
  53. package/dist/mcp/index.js +46 -19
  54. package/dist/mcp/shared.js +16 -16
  55. package/dist/plugin/index.d.ts +21 -1
  56. package/dist/plugin/index.js +46 -15
  57. package/dist/react/canvas/BuilderCanvas.js +76 -75
  58. package/dist/react/canvas/thumbnail/ThumbnailCanvas.js +8 -7
  59. package/dist/theme/admin/fields.scss +363 -363
  60. package/package.json +1 -1
@@ -1,58 +1,58 @@
1
- // The API key field of the AI settings global. Payload CSS variables only, no Tailwind.
2
- @layer payload-default {
3
- .ai-key-field {
4
- margin-bottom: var(--spacing-field, calc(var(--base) * 1.5));
5
- }
6
-
7
- .ai-key-field__status {
8
- margin: 0 0 calc(var(--base) * 0.25);
9
- color: var(--theme-text);
10
- font-size: var(--font-body-size-m, 13px);
11
- }
12
-
13
- .ai-key-field__status--error {
14
- color: var(--theme-error-500);
15
- }
16
-
17
- .ai-key-field__note {
18
- margin: 0 0 calc(var(--base) * 0.5);
19
- color: var(--theme-elevation-500);
20
- font-size: var(--font-body-size-s, 12px);
21
- }
22
-
23
- .ai-key-field__row {
24
- display: flex;
25
- flex-wrap: wrap;
26
- align-items: center;
27
- gap: calc(var(--base) * 0.5);
28
- margin-bottom: calc(var(--base) * 0.5);
29
- }
30
-
31
- .ai-key-field__input {
32
- flex: 1 1 calc(var(--base) * 16);
33
- min-width: 0;
34
- height: calc(var(--base) * 2);
35
- padding: 0 calc(var(--base) * 0.5);
36
- border: 1px solid var(--theme-elevation-150);
37
- border-radius: var(--style-radius-s, var(--border-radius-m));
38
- background: var(--theme-input-bg);
39
- color: var(--theme-text);
40
- font: inherit;
41
- font-size: var(--font-body-size-m, 13px);
42
- box-sizing: border-box;
43
- outline: none;
44
-
45
- &:hover {
46
- border-color: var(--theme-elevation-250);
47
- }
48
-
49
- &:focus {
50
- border-color: var(--theme-elevation-400);
51
- }
52
- }
53
-
54
- .ai-key-field__link {
55
- color: var(--theme-elevation-800);
56
- font-size: var(--font-body-size-s, 12px);
57
- }
58
- }
1
+ // The API key field of the AI settings global. Payload CSS variables only, no Tailwind.
2
+ @layer payload-default {
3
+ .ai-key-field {
4
+ margin-bottom: var(--spacing-field, calc(var(--base) * 1.5));
5
+ }
6
+
7
+ .ai-key-field__status {
8
+ margin: 0 0 calc(var(--base) * 0.25);
9
+ color: var(--theme-text);
10
+ font-size: var(--font-body-size-m, 13px);
11
+ }
12
+
13
+ .ai-key-field__status--error {
14
+ color: var(--theme-error-500);
15
+ }
16
+
17
+ .ai-key-field__note {
18
+ margin: 0 0 calc(var(--base) * 0.5);
19
+ color: var(--theme-elevation-500);
20
+ font-size: var(--font-body-size-s, 12px);
21
+ }
22
+
23
+ .ai-key-field__row {
24
+ display: flex;
25
+ flex-wrap: wrap;
26
+ align-items: center;
27
+ gap: calc(var(--base) * 0.5);
28
+ margin-bottom: calc(var(--base) * 0.5);
29
+ }
30
+
31
+ .ai-key-field__input {
32
+ flex: 1 1 calc(var(--base) * 16);
33
+ min-width: 0;
34
+ height: calc(var(--base) * 2);
35
+ padding: 0 calc(var(--base) * 0.5);
36
+ border: 1px solid var(--theme-elevation-150);
37
+ border-radius: var(--style-radius-s, var(--border-radius-m));
38
+ background: var(--theme-input-bg);
39
+ color: var(--theme-text);
40
+ font: inherit;
41
+ font-size: var(--font-body-size-m, 13px);
42
+ box-sizing: border-box;
43
+ outline: none;
44
+
45
+ &:hover {
46
+ border-color: var(--theme-elevation-250);
47
+ }
48
+
49
+ &:focus {
50
+ border-color: var(--theme-elevation-400);
51
+ }
52
+ }
53
+
54
+ .ai-key-field__link {
55
+ color: var(--theme-elevation-800);
56
+ font-size: var(--font-body-size-s, 12px);
57
+ }
58
+ }
@@ -1,181 +1,181 @@
1
- // The builder layout diff in Payload's Versions > compare view. Payload CSS variables only, no
2
- // Tailwind. Colors come from Payload's own diff variables (`--diff-create-*`, `--diff-delete-*`),
3
- // with theme fallbacks, so it matches the other fields' diffs in light and dark theme.
4
-
5
- @layer payload-default {
6
- .layout-diff {
7
- position: relative;
8
-
9
- &__content {
10
- display: flex;
11
- flex-direction: column;
12
- gap: calc(var(--base) * 0.5);
13
- background: var(--theme-elevation-50);
14
- padding: calc(var(--base) * 0.5);
15
- }
16
-
17
- &__summary {
18
- margin: 0;
19
- color: var(--theme-elevation-800);
20
- font-weight: 500;
21
- }
22
-
23
- &__list,
24
- &__details {
25
- list-style: none;
26
- margin: 0;
27
- padding: 0;
28
- }
29
-
30
- &__list {
31
- display: flex;
32
- flex-direction: column;
33
- gap: calc(var(--base) * 0.25);
34
- }
35
-
36
- &__change {
37
- padding: calc(var(--base) * 0.4) calc(var(--base) * 0.5);
38
- border: 1px solid var(--theme-elevation-100);
39
- border-radius: var(--style-radius-s);
40
- background: var(--theme-elevation-0);
41
- }
42
-
43
- &__head {
44
- display: flex;
45
- flex-wrap: wrap;
46
- align-items: baseline;
47
- gap: calc(var(--base) * 0.3);
48
- min-width: 0;
49
- }
50
-
51
- &__pill {
52
- flex: none;
53
- padding: 0 calc(var(--base) * 0.25);
54
- border: 1px solid var(--theme-elevation-150);
55
- border-radius: var(--style-radius-s);
56
- background: var(--theme-elevation-100);
57
- color: var(--theme-elevation-800);
58
- font-size: calc(var(--base) * 0.55);
59
- font-weight: 600;
60
- line-height: 1.6;
61
- text-transform: uppercase;
62
- letter-spacing: 0.04em;
63
-
64
- &--added {
65
- border-color: var(--diff-create-pill-border, var(--theme-success-400));
66
- background: var(--diff-create-pill-bg, var(--theme-success-200));
67
- color: var(--diff-create-pill-color, var(--theme-success-600));
68
- }
69
-
70
- &--removed {
71
- border-color: var(--diff-delete-pill-border, var(--theme-error-400));
72
- background: var(--diff-delete-pill-bg, var(--theme-error-200));
73
- color: var(--diff-delete-pill-color, var(--theme-error-600));
74
- }
75
- }
76
-
77
- &__name {
78
- min-width: 0;
79
- overflow-wrap: anywhere;
80
- }
81
-
82
- &__where {
83
- color: var(--theme-elevation-600);
84
- }
85
-
86
- &__details {
87
- display: flex;
88
- flex-direction: column;
89
- gap: calc(var(--base) * 0.2);
90
- margin-top: calc(var(--base) * 0.3);
91
- padding-inline-start: calc(var(--base) * 0.5);
92
- border-inline-start: 2px solid var(--theme-elevation-100);
93
- }
94
-
95
- &__detail {
96
- display: flex;
97
- flex-wrap: wrap;
98
- align-items: baseline;
99
- gap: calc(var(--base) * 0.25);
100
- min-width: 0;
101
- }
102
-
103
- &__detail-label {
104
- display: inline-flex;
105
- align-items: baseline;
106
- gap: calc(var(--base) * 0.2);
107
- color: var(--theme-elevation-600);
108
-
109
- &::after {
110
- content: ':';
111
- }
112
-
113
- .field-diff__locale-label {
114
- margin: 0;
115
- }
116
- }
117
-
118
- &__value,
119
- &__class {
120
- padding: 0 calc(var(--base) * 0.15);
121
- border-radius: var(--style-radius-s);
122
- text-decoration: none;
123
- overflow-wrap: anywhere;
124
- }
125
-
126
- &__value--del {
127
- background: var(--diff-delete-parent-bg, var(--theme-error-100));
128
- color: var(--diff-delete-parent-color, var(--theme-error-800));
129
- text-decoration: line-through;
130
- text-decoration-color: var(--diff-delete-pill-border, var(--theme-error-400));
131
- }
132
-
133
- &__value--ins {
134
- background: var(--diff-create-parent-bg, var(--theme-success-100));
135
- color: var(--diff-create-parent-color, var(--theme-success-800));
136
- }
137
-
138
- &__class {
139
- font-family: var(--font-mono, ui-monospace, monospace);
140
- font-size: calc(var(--base) * 0.55);
141
- }
142
-
143
- &__empty {
144
- color: var(--theme-elevation-400);
145
- font-style: italic;
146
- }
147
-
148
- &__arrow {
149
- color: var(--theme-elevation-400);
150
- }
151
-
152
- &__json {
153
- border-top: 1px solid var(--theme-elevation-100);
154
- padding-top: calc(var(--base) * 0.4);
155
- }
156
-
157
- &__json-summary {
158
- cursor: pointer;
159
- color: var(--theme-elevation-600);
160
- width: fit-content;
161
-
162
- &:hover {
163
- color: var(--theme-elevation-900);
164
- }
165
- }
166
-
167
- &__json-content {
168
- display: grid;
169
- // Same columns as Payload's field diffs: old on the left, new on the right.
170
- grid-template-columns: calc(50% - var(--base) * 0.5) calc(50% - var(--base) * 0.5);
171
- gap: var(--base);
172
- margin-top: calc(var(--base) * 0.5);
173
- overflow-x: auto;
174
-
175
- pre {
176
- white-space: pre-wrap;
177
- overflow-wrap: anywhere;
178
- }
179
- }
180
- }
181
- }
1
+ // The builder layout diff in Payload's Versions > compare view. Payload CSS variables only, no
2
+ // Tailwind. Colors come from Payload's own diff variables (`--diff-create-*`, `--diff-delete-*`),
3
+ // with theme fallbacks, so it matches the other fields' diffs in light and dark theme.
4
+
5
+ @layer payload-default {
6
+ .layout-diff {
7
+ position: relative;
8
+
9
+ &__content {
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: calc(var(--base) * 0.5);
13
+ background: var(--theme-elevation-50);
14
+ padding: calc(var(--base) * 0.5);
15
+ }
16
+
17
+ &__summary {
18
+ margin: 0;
19
+ color: var(--theme-elevation-800);
20
+ font-weight: 500;
21
+ }
22
+
23
+ &__list,
24
+ &__details {
25
+ list-style: none;
26
+ margin: 0;
27
+ padding: 0;
28
+ }
29
+
30
+ &__list {
31
+ display: flex;
32
+ flex-direction: column;
33
+ gap: calc(var(--base) * 0.25);
34
+ }
35
+
36
+ &__change {
37
+ padding: calc(var(--base) * 0.4) calc(var(--base) * 0.5);
38
+ border: 1px solid var(--theme-elevation-100);
39
+ border-radius: var(--style-radius-s);
40
+ background: var(--theme-elevation-0);
41
+ }
42
+
43
+ &__head {
44
+ display: flex;
45
+ flex-wrap: wrap;
46
+ align-items: baseline;
47
+ gap: calc(var(--base) * 0.3);
48
+ min-width: 0;
49
+ }
50
+
51
+ &__pill {
52
+ flex: none;
53
+ padding: 0 calc(var(--base) * 0.25);
54
+ border: 1px solid var(--theme-elevation-150);
55
+ border-radius: var(--style-radius-s);
56
+ background: var(--theme-elevation-100);
57
+ color: var(--theme-elevation-800);
58
+ font-size: calc(var(--base) * 0.55);
59
+ font-weight: 600;
60
+ line-height: 1.6;
61
+ text-transform: uppercase;
62
+ letter-spacing: 0.04em;
63
+
64
+ &--added {
65
+ border-color: var(--diff-create-pill-border, var(--theme-success-400));
66
+ background: var(--diff-create-pill-bg, var(--theme-success-200));
67
+ color: var(--diff-create-pill-color, var(--theme-success-600));
68
+ }
69
+
70
+ &--removed {
71
+ border-color: var(--diff-delete-pill-border, var(--theme-error-400));
72
+ background: var(--diff-delete-pill-bg, var(--theme-error-200));
73
+ color: var(--diff-delete-pill-color, var(--theme-error-600));
74
+ }
75
+ }
76
+
77
+ &__name {
78
+ min-width: 0;
79
+ overflow-wrap: anywhere;
80
+ }
81
+
82
+ &__where {
83
+ color: var(--theme-elevation-600);
84
+ }
85
+
86
+ &__details {
87
+ display: flex;
88
+ flex-direction: column;
89
+ gap: calc(var(--base) * 0.2);
90
+ margin-top: calc(var(--base) * 0.3);
91
+ padding-inline-start: calc(var(--base) * 0.5);
92
+ border-inline-start: 2px solid var(--theme-elevation-100);
93
+ }
94
+
95
+ &__detail {
96
+ display: flex;
97
+ flex-wrap: wrap;
98
+ align-items: baseline;
99
+ gap: calc(var(--base) * 0.25);
100
+ min-width: 0;
101
+ }
102
+
103
+ &__detail-label {
104
+ display: inline-flex;
105
+ align-items: baseline;
106
+ gap: calc(var(--base) * 0.2);
107
+ color: var(--theme-elevation-600);
108
+
109
+ &::after {
110
+ content: ':';
111
+ }
112
+
113
+ .field-diff__locale-label {
114
+ margin: 0;
115
+ }
116
+ }
117
+
118
+ &__value,
119
+ &__class {
120
+ padding: 0 calc(var(--base) * 0.15);
121
+ border-radius: var(--style-radius-s);
122
+ text-decoration: none;
123
+ overflow-wrap: anywhere;
124
+ }
125
+
126
+ &__value--del {
127
+ background: var(--diff-delete-parent-bg, var(--theme-error-100));
128
+ color: var(--diff-delete-parent-color, var(--theme-error-800));
129
+ text-decoration: line-through;
130
+ text-decoration-color: var(--diff-delete-pill-border, var(--theme-error-400));
131
+ }
132
+
133
+ &__value--ins {
134
+ background: var(--diff-create-parent-bg, var(--theme-success-100));
135
+ color: var(--diff-create-parent-color, var(--theme-success-800));
136
+ }
137
+
138
+ &__class {
139
+ font-family: var(--font-mono, ui-monospace, monospace);
140
+ font-size: calc(var(--base) * 0.55);
141
+ }
142
+
143
+ &__empty {
144
+ color: var(--theme-elevation-400);
145
+ font-style: italic;
146
+ }
147
+
148
+ &__arrow {
149
+ color: var(--theme-elevation-400);
150
+ }
151
+
152
+ &__json {
153
+ border-top: 1px solid var(--theme-elevation-100);
154
+ padding-top: calc(var(--base) * 0.4);
155
+ }
156
+
157
+ &__json-summary {
158
+ cursor: pointer;
159
+ color: var(--theme-elevation-600);
160
+ width: fit-content;
161
+
162
+ &:hover {
163
+ color: var(--theme-elevation-900);
164
+ }
165
+ }
166
+
167
+ &__json-content {
168
+ display: grid;
169
+ // Same columns as Payload's field diffs: old on the left, new on the right.
170
+ grid-template-columns: calc(50% - var(--base) * 0.5) calc(50% - var(--base) * 0.5);
171
+ gap: var(--base);
172
+ margin-top: calc(var(--base) * 0.5);
173
+ overflow-x: auto;
174
+
175
+ pre {
176
+ white-space: pre-wrap;
177
+ overflow-wrap: anywhere;
178
+ }
179
+ }
180
+ }
181
+ }