@orion-studios/payload-studio 0.5.0-beta.108 → 0.5.0-beta.109

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 CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  Unified Payload CMS toolkit for Orion Studios projects.
4
4
 
5
+ ## Editor Scope
6
+
7
+ `payload-studio` now treats block authoring as content-first by default.
8
+
9
+ - Generic block-level Layout and Style controls are hidden in the CMS and Studio builder.
10
+ - Internal layout/style fields still remain in the schema for compile compatibility with existing pages.
11
+ - Editors should focus on content, media, typography, and a small set of block-specific variants.
12
+
5
13
  ## Install
6
14
 
7
15
  ```bash
@@ -66,138 +66,148 @@ var sectionStyleDefaults = {
66
66
  sectionPaddingY: "md",
67
67
  sectionWidth: "content"
68
68
  };
69
- var sectionStyleFields = () => [
70
- {
71
- name: "sectionWidth",
72
- type: "select",
73
- defaultValue: sectionStyleDefaults.sectionWidth,
74
- options: [
75
- { label: "Content", value: "content" },
76
- { label: "Wide", value: "wide" },
77
- { label: "Full", value: "full" }
78
- ]
79
- },
80
- {
81
- name: "contentWidth",
82
- type: "select",
83
- defaultValue: sectionStyleDefaults.contentWidth,
84
- options: [
85
- { label: "Inherit", value: "inherit" },
86
- { label: "Narrow", value: "narrow" },
87
- { label: "Content", value: "content" },
88
- { label: "Wide", value: "wide" },
89
- { label: "Full", value: "full" }
90
- ]
91
- },
92
- {
93
- name: "sectionPaddingY",
94
- type: "select",
95
- defaultValue: sectionStyleDefaults.sectionPaddingY,
96
- options: [
97
- { label: "None", value: "none" },
98
- { label: "Small", value: "sm" },
99
- { label: "Medium", value: "md" },
100
- { label: "Large", value: "lg" }
101
- ]
102
- },
103
- {
104
- name: "sectionPaddingX",
105
- type: "select",
106
- defaultValue: sectionStyleDefaults.sectionPaddingX,
107
- options: [
108
- { label: "Inherit", value: "inherit" },
109
- { label: "None", value: "none" },
110
- { label: "Small", value: "sm" },
111
- { label: "Medium", value: "md" },
112
- { label: "Large", value: "lg" }
113
- ]
114
- },
115
- {
116
- name: "sectionBackgroundMode",
117
- type: "select",
118
- defaultValue: sectionStyleDefaults.sectionBackgroundMode,
119
- options: [
120
- { label: "None", value: "none" },
121
- { label: "Color", value: "color" },
122
- { label: "Gradient", value: "gradient" }
123
- ]
124
- },
125
- {
126
- name: "sectionBackgroundColor",
127
- type: "text",
128
- defaultValue: sectionStyleDefaults.sectionBackgroundColor
129
- },
130
- {
131
- name: "sectionGradientPreset",
132
- type: "select",
133
- defaultValue: sectionStyleDefaults.sectionGradientPreset,
134
- options: [
135
- { label: "None", value: "none" },
136
- { label: "Brand", value: "brand" },
137
- { label: "Forest", value: "forest" },
138
- { label: "Moss", value: "moss" },
139
- { label: "Cream", value: "cream" },
140
- { label: "Slate", value: "slate" }
141
- ]
142
- },
143
- {
144
- name: "sectionGradientFrom",
145
- type: "text",
146
- defaultValue: sectionStyleDefaults.sectionGradientFrom
147
- },
148
- {
149
- name: "sectionGradientTo",
150
- type: "text",
151
- defaultValue: sectionStyleDefaults.sectionGradientTo
152
- },
153
- {
154
- name: "sectionGradientAngle",
155
- type: "text",
156
- defaultValue: sectionStyleDefaults.sectionGradientAngle
157
- },
158
- {
159
- name: "contentBackgroundMode",
160
- type: "select",
161
- defaultValue: sectionStyleDefaults.contentBackgroundMode,
162
- options: [
163
- { label: "None", value: "none" },
164
- { label: "Color", value: "color" },
165
- { label: "Gradient", value: "gradient" }
166
- ]
167
- },
168
- {
169
- name: "contentBackgroundColor",
170
- type: "text",
171
- defaultValue: sectionStyleDefaults.contentBackgroundColor
172
- },
173
- {
174
- name: "contentGradientPreset",
175
- type: "select",
176
- defaultValue: sectionStyleDefaults.contentGradientPreset,
177
- options: [
178
- { label: "None", value: "none" },
179
- { label: "Cloud", value: "cloud" },
180
- { label: "Sand", value: "sand" },
181
- { label: "Mint", value: "mint" },
182
- { label: "Night", value: "night" }
183
- ]
184
- },
185
- {
186
- name: "contentGradientFrom",
187
- type: "text",
188
- defaultValue: sectionStyleDefaults.contentGradientFrom
189
- },
190
- {
191
- name: "contentGradientTo",
192
- type: "text",
193
- defaultValue: sectionStyleDefaults.contentGradientTo
194
- },
195
- {
196
- name: "contentGradientAngle",
197
- type: "text",
198
- defaultValue: sectionStyleDefaults.contentGradientAngle
69
+ var hideFromCMS = (field) => ({
70
+ ...field,
71
+ admin: {
72
+ ...field.admin || {},
73
+ hidden: true
199
74
  }
200
- ];
75
+ });
76
+ var sectionStyleFields = () => {
77
+ const fields = [
78
+ {
79
+ name: "sectionWidth",
80
+ type: "select",
81
+ defaultValue: sectionStyleDefaults.sectionWidth,
82
+ options: [
83
+ { label: "Content", value: "content" },
84
+ { label: "Wide", value: "wide" },
85
+ { label: "Full", value: "full" }
86
+ ]
87
+ },
88
+ {
89
+ name: "contentWidth",
90
+ type: "select",
91
+ defaultValue: sectionStyleDefaults.contentWidth,
92
+ options: [
93
+ { label: "Inherit", value: "inherit" },
94
+ { label: "Narrow", value: "narrow" },
95
+ { label: "Content", value: "content" },
96
+ { label: "Wide", value: "wide" },
97
+ { label: "Full", value: "full" }
98
+ ]
99
+ },
100
+ {
101
+ name: "sectionPaddingY",
102
+ type: "select",
103
+ defaultValue: sectionStyleDefaults.sectionPaddingY,
104
+ options: [
105
+ { label: "None", value: "none" },
106
+ { label: "Small", value: "sm" },
107
+ { label: "Medium", value: "md" },
108
+ { label: "Large", value: "lg" }
109
+ ]
110
+ },
111
+ {
112
+ name: "sectionPaddingX",
113
+ type: "select",
114
+ defaultValue: sectionStyleDefaults.sectionPaddingX,
115
+ options: [
116
+ { label: "Inherit", value: "inherit" },
117
+ { label: "None", value: "none" },
118
+ { label: "Small", value: "sm" },
119
+ { label: "Medium", value: "md" },
120
+ { label: "Large", value: "lg" }
121
+ ]
122
+ },
123
+ {
124
+ name: "sectionBackgroundMode",
125
+ type: "select",
126
+ defaultValue: sectionStyleDefaults.sectionBackgroundMode,
127
+ options: [
128
+ { label: "None", value: "none" },
129
+ { label: "Color", value: "color" },
130
+ { label: "Gradient", value: "gradient" }
131
+ ]
132
+ },
133
+ {
134
+ name: "sectionBackgroundColor",
135
+ type: "text",
136
+ defaultValue: sectionStyleDefaults.sectionBackgroundColor
137
+ },
138
+ {
139
+ name: "sectionGradientPreset",
140
+ type: "select",
141
+ defaultValue: sectionStyleDefaults.sectionGradientPreset,
142
+ options: [
143
+ { label: "None", value: "none" },
144
+ { label: "Brand", value: "brand" },
145
+ { label: "Forest", value: "forest" },
146
+ { label: "Moss", value: "moss" },
147
+ { label: "Cream", value: "cream" },
148
+ { label: "Slate", value: "slate" }
149
+ ]
150
+ },
151
+ {
152
+ name: "sectionGradientFrom",
153
+ type: "text",
154
+ defaultValue: sectionStyleDefaults.sectionGradientFrom
155
+ },
156
+ {
157
+ name: "sectionGradientTo",
158
+ type: "text",
159
+ defaultValue: sectionStyleDefaults.sectionGradientTo
160
+ },
161
+ {
162
+ name: "sectionGradientAngle",
163
+ type: "text",
164
+ defaultValue: sectionStyleDefaults.sectionGradientAngle
165
+ },
166
+ {
167
+ name: "contentBackgroundMode",
168
+ type: "select",
169
+ defaultValue: sectionStyleDefaults.contentBackgroundMode,
170
+ options: [
171
+ { label: "None", value: "none" },
172
+ { label: "Color", value: "color" },
173
+ { label: "Gradient", value: "gradient" }
174
+ ]
175
+ },
176
+ {
177
+ name: "contentBackgroundColor",
178
+ type: "text",
179
+ defaultValue: sectionStyleDefaults.contentBackgroundColor
180
+ },
181
+ {
182
+ name: "contentGradientPreset",
183
+ type: "select",
184
+ defaultValue: sectionStyleDefaults.contentGradientPreset,
185
+ options: [
186
+ { label: "None", value: "none" },
187
+ { label: "Cloud", value: "cloud" },
188
+ { label: "Sand", value: "sand" },
189
+ { label: "Mint", value: "mint" },
190
+ { label: "Night", value: "night" }
191
+ ]
192
+ },
193
+ {
194
+ name: "contentGradientFrom",
195
+ type: "text",
196
+ defaultValue: sectionStyleDefaults.contentGradientFrom
197
+ },
198
+ {
199
+ name: "contentGradientTo",
200
+ type: "text",
201
+ defaultValue: sectionStyleDefaults.contentGradientTo
202
+ },
203
+ {
204
+ name: "contentGradientAngle",
205
+ type: "text",
206
+ defaultValue: sectionStyleDefaults.contentGradientAngle
207
+ }
208
+ ];
209
+ return fields.map(hideFromCMS);
210
+ };
201
211
 
202
212
  // src/blocks/blocks/BeforeAfter.ts
203
213
  var BeforeAfterBlock = {
@@ -17,8 +17,8 @@ import {
17
17
  defaultPageLayoutBlocks,
18
18
  sectionPresets,
19
19
  templateStarterPresets
20
- } from "../chunk-G7QOJ4AB.mjs";
21
- import "../chunk-WY7RQGSN.mjs";
20
+ } from "../chunk-JQAHXYAM.mjs";
21
+ import "../chunk-OQSEJXC4.mjs";
22
22
  import "../chunk-6BWS3CLP.mjs";
23
23
  export {
24
24
  BeforeAfterBlock,
@@ -1,6 +1,3 @@
1
- import {
2
- sectionStyleDefaults
3
- } from "./chunk-WY7RQGSN.mjs";
4
1
  import {
5
2
  createDefaultStudioDocument,
6
3
  defaultBuilderThemeTokens,
@@ -8,6 +5,9 @@ import {
8
5
  migrateBlockToSettingsV2,
9
6
  studioDocumentToLayout
10
7
  } from "./chunk-PF3EBZXF.mjs";
8
+ import {
9
+ sectionStyleDefaults
10
+ } from "./chunk-OQSEJXC4.mjs";
11
11
  import {
12
12
  __export
13
13
  } from "./chunk-6BWS3CLP.mjs";
@@ -67,72 +67,7 @@ var alignOptions = [
67
67
  { label: "Right", value: "right" },
68
68
  { label: "Justify", value: "justify" }
69
69
  ];
70
- var layoutFieldSet = [
71
- {
72
- group: "layout",
73
- key: "settings.layout.contentWidth",
74
- label: "Content Width",
75
- options: [
76
- { label: "Inherit Page Default", value: "inherit" },
77
- { label: "Narrow", value: "narrow" },
78
- { label: "Content", value: "content" },
79
- { label: "Wide", value: "wide" },
80
- { label: "Full", value: "full" }
81
- ],
82
- tags: ["width", "container"],
83
- type: "select"
84
- },
85
- {
86
- group: "layout",
87
- key: "settings.layout.linkVerticalPadding",
88
- label: "Keep Top and Bottom Equal",
89
- tags: ["spacing", "padding", "equal", "lock", "vertical"],
90
- type: "checkbox"
91
- },
92
- {
93
- group: "layout",
94
- key: "settings.layout.paddingTopPt",
95
- label: "Top Padding (pt)",
96
- max: 240,
97
- min: 0,
98
- tags: ["spacing", "padding", "top", "vertical"],
99
- type: "number"
100
- },
101
- {
102
- group: "layout",
103
- key: "settings.layout.paddingBottomPt",
104
- label: "Bottom Padding (pt)",
105
- max: 240,
106
- min: 0,
107
- tags: ["spacing", "padding", "bottom", "vertical"],
108
- type: "number"
109
- },
110
- {
111
- group: "layout",
112
- key: "settings.layout.linkHorizontalPadding",
113
- label: "Keep Left and Right Equal",
114
- tags: ["spacing", "padding", "equal", "lock", "horizontal"],
115
- type: "checkbox"
116
- },
117
- {
118
- group: "layout",
119
- key: "settings.layout.paddingLeftPt",
120
- label: "Left Padding (pt)",
121
- max: 240,
122
- min: 0,
123
- tags: ["spacing", "padding", "left", "horizontal"],
124
- type: "number"
125
- },
126
- {
127
- group: "layout",
128
- key: "settings.layout.paddingRightPt",
129
- label: "Right Padding (pt)",
130
- max: 240,
131
- min: 0,
132
- tags: ["spacing", "padding", "right", "horizontal"],
133
- type: "number"
134
- }
135
- ];
70
+ var layoutFieldSet = [];
136
71
  var typographyFieldSet = [
137
72
  {
138
73
  group: "typography",
@@ -189,44 +124,7 @@ var typographyFieldSet = [
189
124
  type: "select"
190
125
  }
191
126
  ];
192
- var styleFieldSet = [
193
- {
194
- group: "style",
195
- key: "settings.appearance.sectionBackgroundMode",
196
- label: "Section Background",
197
- options: [
198
- { label: "None", value: "none" },
199
- { label: "Color", value: "color" },
200
- { label: "Gradient", value: "gradient" }
201
- ],
202
- tags: ["background", "section"],
203
- type: "select"
204
- },
205
- {
206
- group: "style",
207
- key: "settings.appearance.sectionBackgroundColor",
208
- label: "Section Background Color",
209
- type: "color"
210
- },
211
- {
212
- group: "style",
213
- key: "settings.appearance.contentBackgroundMode",
214
- label: "Content Background",
215
- options: [
216
- { label: "None", value: "none" },
217
- { label: "Color", value: "color" },
218
- { label: "Gradient", value: "gradient" }
219
- ],
220
- tags: ["background", "content"],
221
- type: "select"
222
- },
223
- {
224
- group: "style",
225
- key: "settings.appearance.contentBackgroundColor",
226
- label: "Content Background Color",
227
- type: "color"
228
- }
229
- ];
127
+ var styleFieldSet = [];
230
128
  var commonAdvanced = [
231
129
  {
232
130
  group: "advanced",
@@ -398,7 +296,7 @@ var inspectorDefinitionByBlockType = {
398
296
  type: "select"
399
297
  },
400
298
  {
401
- group: "layout",
299
+ group: "basics",
402
300
  key: "heroHeight",
403
301
  label: "Hero Height",
404
302
  options: [
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sectionStyleFields
3
- } from "./chunk-WY7RQGSN.mjs";
3
+ } from "./chunk-OQSEJXC4.mjs";
4
4
  import {
5
5
  __export
6
6
  } from "./chunk-6BWS3CLP.mjs";
@@ -0,0 +1,166 @@
1
+ // src/blocks/blocks/sectionStyleFields.ts
2
+ var sectionStyleDefaults = {
3
+ contentBackgroundColor: "#ffffff",
4
+ contentBackgroundMode: "none",
5
+ contentGradientAngle: "135",
6
+ contentGradientFrom: "#ffffff",
7
+ contentGradientPreset: "none",
8
+ contentGradientTo: "#f4f6f8",
9
+ contentWidth: "inherit",
10
+ sectionPaddingX: "inherit",
11
+ sectionBackgroundColor: "#ffffff",
12
+ sectionBackgroundMode: "none",
13
+ sectionGradientAngle: "135",
14
+ sectionGradientFrom: "#334b63",
15
+ sectionGradientPreset: "slate",
16
+ sectionGradientTo: "#496582",
17
+ sectionPaddingY: "md",
18
+ sectionWidth: "content"
19
+ };
20
+ var hideFromCMS = (field) => ({
21
+ ...field,
22
+ admin: {
23
+ ...field.admin || {},
24
+ hidden: true
25
+ }
26
+ });
27
+ var sectionStyleFields = () => {
28
+ const fields = [
29
+ {
30
+ name: "sectionWidth",
31
+ type: "select",
32
+ defaultValue: sectionStyleDefaults.sectionWidth,
33
+ options: [
34
+ { label: "Content", value: "content" },
35
+ { label: "Wide", value: "wide" },
36
+ { label: "Full", value: "full" }
37
+ ]
38
+ },
39
+ {
40
+ name: "contentWidth",
41
+ type: "select",
42
+ defaultValue: sectionStyleDefaults.contentWidth,
43
+ options: [
44
+ { label: "Inherit", value: "inherit" },
45
+ { label: "Narrow", value: "narrow" },
46
+ { label: "Content", value: "content" },
47
+ { label: "Wide", value: "wide" },
48
+ { label: "Full", value: "full" }
49
+ ]
50
+ },
51
+ {
52
+ name: "sectionPaddingY",
53
+ type: "select",
54
+ defaultValue: sectionStyleDefaults.sectionPaddingY,
55
+ options: [
56
+ { label: "None", value: "none" },
57
+ { label: "Small", value: "sm" },
58
+ { label: "Medium", value: "md" },
59
+ { label: "Large", value: "lg" }
60
+ ]
61
+ },
62
+ {
63
+ name: "sectionPaddingX",
64
+ type: "select",
65
+ defaultValue: sectionStyleDefaults.sectionPaddingX,
66
+ options: [
67
+ { label: "Inherit", value: "inherit" },
68
+ { label: "None", value: "none" },
69
+ { label: "Small", value: "sm" },
70
+ { label: "Medium", value: "md" },
71
+ { label: "Large", value: "lg" }
72
+ ]
73
+ },
74
+ {
75
+ name: "sectionBackgroundMode",
76
+ type: "select",
77
+ defaultValue: sectionStyleDefaults.sectionBackgroundMode,
78
+ options: [
79
+ { label: "None", value: "none" },
80
+ { label: "Color", value: "color" },
81
+ { label: "Gradient", value: "gradient" }
82
+ ]
83
+ },
84
+ {
85
+ name: "sectionBackgroundColor",
86
+ type: "text",
87
+ defaultValue: sectionStyleDefaults.sectionBackgroundColor
88
+ },
89
+ {
90
+ name: "sectionGradientPreset",
91
+ type: "select",
92
+ defaultValue: sectionStyleDefaults.sectionGradientPreset,
93
+ options: [
94
+ { label: "None", value: "none" },
95
+ { label: "Brand", value: "brand" },
96
+ { label: "Forest", value: "forest" },
97
+ { label: "Moss", value: "moss" },
98
+ { label: "Cream", value: "cream" },
99
+ { label: "Slate", value: "slate" }
100
+ ]
101
+ },
102
+ {
103
+ name: "sectionGradientFrom",
104
+ type: "text",
105
+ defaultValue: sectionStyleDefaults.sectionGradientFrom
106
+ },
107
+ {
108
+ name: "sectionGradientTo",
109
+ type: "text",
110
+ defaultValue: sectionStyleDefaults.sectionGradientTo
111
+ },
112
+ {
113
+ name: "sectionGradientAngle",
114
+ type: "text",
115
+ defaultValue: sectionStyleDefaults.sectionGradientAngle
116
+ },
117
+ {
118
+ name: "contentBackgroundMode",
119
+ type: "select",
120
+ defaultValue: sectionStyleDefaults.contentBackgroundMode,
121
+ options: [
122
+ { label: "None", value: "none" },
123
+ { label: "Color", value: "color" },
124
+ { label: "Gradient", value: "gradient" }
125
+ ]
126
+ },
127
+ {
128
+ name: "contentBackgroundColor",
129
+ type: "text",
130
+ defaultValue: sectionStyleDefaults.contentBackgroundColor
131
+ },
132
+ {
133
+ name: "contentGradientPreset",
134
+ type: "select",
135
+ defaultValue: sectionStyleDefaults.contentGradientPreset,
136
+ options: [
137
+ { label: "None", value: "none" },
138
+ { label: "Cloud", value: "cloud" },
139
+ { label: "Sand", value: "sand" },
140
+ { label: "Mint", value: "mint" },
141
+ { label: "Night", value: "night" }
142
+ ]
143
+ },
144
+ {
145
+ name: "contentGradientFrom",
146
+ type: "text",
147
+ defaultValue: sectionStyleDefaults.contentGradientFrom
148
+ },
149
+ {
150
+ name: "contentGradientTo",
151
+ type: "text",
152
+ defaultValue: sectionStyleDefaults.contentGradientTo
153
+ },
154
+ {
155
+ name: "contentGradientAngle",
156
+ type: "text",
157
+ defaultValue: sectionStyleDefaults.contentGradientAngle
158
+ }
159
+ ];
160
+ return fields.map(hideFromCMS);
161
+ };
162
+
163
+ export {
164
+ sectionStyleDefaults,
165
+ sectionStyleFields
166
+ };
@@ -1,7 +1,7 @@
1
1
  import { S as StudioDocumentV1, a as StudioNodeTypeDefinition, b as StudioModuleManifest } from './index-BzKOThsI.js';
2
2
  import { ComponentType, CSSProperties, ReactNode } from 'react';
3
3
 
4
- type InspectorGroupKey = 'advanced' | 'basics' | 'layout' | 'media' | 'style' | 'typography';
4
+ type InspectorGroupKey = 'advanced' | 'basics' | 'media' | 'typography';
5
5
  type InspectorFieldType = 'checkbox' | 'color' | 'number' | 'search' | 'select' | 'text' | 'textarea';
6
6
 
7
7
  type BuilderSettingsPanelMode = 'advanced' | 'basic';
@@ -1,7 +1,7 @@
1
1
  import { S as StudioDocumentV1, a as StudioNodeTypeDefinition, b as StudioModuleManifest } from './index-BzKOThsI.mjs';
2
2
  import { ComponentType, CSSProperties, ReactNode } from 'react';
3
3
 
4
- type InspectorGroupKey = 'advanced' | 'basics' | 'layout' | 'media' | 'style' | 'typography';
4
+ type InspectorGroupKey = 'advanced' | 'basics' | 'media' | 'typography';
5
5
  type InspectorFieldType = 'checkbox' | 'color' | 'number' | 'search' | 'select' | 'text' | 'textarea';
6
6
 
7
7
  type BuilderSettingsPanelMode = 'advanced' | 'basic';
package/dist/index.d.mts CHANGED
@@ -3,7 +3,7 @@ export { i as adminApp } from './index-ZbOx4OCF.mjs';
3
3
  export { i as blocks } from './index-CluwY0ZQ.mjs';
4
4
  export { i as nextjs } from './index-D8BNfUJb.mjs';
5
5
  export { i as studio } from './index-BzKOThsI.mjs';
6
- export { i as studioPages } from './index-DkmB6hR5.mjs';
6
+ export { i as studioPages } from './index-gLl_358v.mjs';
7
7
  import 'payload';
8
8
  import './socialMedia-C05Iy-SV.mjs';
9
9
  import 'react/jsx-runtime';
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { i as adminApp } from './index-ZbOx4OCF.js';
3
3
  export { i as blocks } from './index-CluwY0ZQ.js';
4
4
  export { i as nextjs } from './index-DD_E2UfJ.js';
5
5
  export { i as studio } from './index-BzKOThsI.js';
6
- export { i as studioPages } from './index-BHS4jJf8.js';
6
+ export { i as studioPages } from './index-DUi_XND6.js';
7
7
  import 'payload';
8
8
  import './socialMedia-C05Iy-SV.js';
9
9
  import 'react/jsx-runtime';