@orion-studios/payload-studio 0.6.0-beta.39 → 0.6.0-beta.40

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.
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-ZTXJG4K5.mjs";
6
6
  import {
7
7
  studioDocumentToLayout
8
- } from "./chunk-4LSIUED5.mjs";
8
+ } from "./chunk-CUPMTHGX.mjs";
9
9
  import {
10
10
  assertStudioDocumentV1
11
11
  } from "./chunk-ADIIWIYL.mjs";
@@ -190,7 +190,18 @@ var legacyBlockToV2Settings = (block) => {
190
190
  current.advanced.editCopyInPanel = Boolean(block.editCopyInPanel ?? current.advanced.editCopyInPanel);
191
191
  current.advanced.customClassName = typeof block.customClassName === "string" ? block.customClassName : current.advanced.customClassName;
192
192
  current.advanced.hideOnMobile = Boolean(block.hideOnMobile ?? current.advanced.hideOnMobile);
193
- return mergeSettings(current, block.settings);
193
+ const settings = mergeSettings(current, block.settings);
194
+ if (block.blockType === "hero") {
195
+ const top = settings.layout.paddingTopPt;
196
+ const bottom = settings.layout.paddingBottomPt;
197
+ const hasLegacyLinkedHeroPadding = settings.layout.linkVerticalPadding !== false && (top === null || typeof top === "undefined" || top === 30) && (bottom === null || typeof bottom === "undefined" || bottom === 30 || bottom === 20);
198
+ if (hasLegacyLinkedHeroPadding) {
199
+ settings.layout.linkVerticalPadding = false;
200
+ settings.layout.paddingTopPt = 30;
201
+ settings.layout.paddingBottomPt = 20;
202
+ }
203
+ }
204
+ return settings;
194
205
  };
195
206
  var v2SettingsToLegacyBlock = (blockWithSettings) => {
196
207
  const settings = legacyBlockToV2Settings(blockWithSettings);
@@ -1,19 +1,19 @@
1
- import {
2
- sectionStyleDefaults
3
- } from "./chunk-OQSEJXC4.mjs";
4
1
  import {
5
2
  createDefaultStudioDocument,
6
3
  defaultBuilderThemeTokens,
7
4
  layoutToStudioDocument,
8
5
  migrateBlockToSettingsV2,
9
6
  studioDocumentToLayout
10
- } from "./chunk-4LSIUED5.mjs";
7
+ } from "./chunk-CUPMTHGX.mjs";
11
8
  import {
12
9
  assertStudioDocumentV1,
13
10
  compileStudioDocument,
14
11
  createEmptyStudioDocument,
15
12
  validateStudioDocument
16
13
  } from "./chunk-ADIIWIYL.mjs";
14
+ import {
15
+ sectionStyleDefaults
16
+ } from "./chunk-OQSEJXC4.mjs";
17
17
  import {
18
18
  __export
19
19
  } from "./chunk-6BWS3CLP.mjs";
package/dist/index.js CHANGED
@@ -3843,7 +3843,18 @@ var legacyBlockToV2Settings = (block) => {
3843
3843
  current.advanced.editCopyInPanel = Boolean(block.editCopyInPanel ?? current.advanced.editCopyInPanel);
3844
3844
  current.advanced.customClassName = typeof block.customClassName === "string" ? block.customClassName : current.advanced.customClassName;
3845
3845
  current.advanced.hideOnMobile = Boolean(block.hideOnMobile ?? current.advanced.hideOnMobile);
3846
- return mergeSettings(current, block.settings);
3846
+ const settings = mergeSettings(current, block.settings);
3847
+ if (block.blockType === "hero") {
3848
+ const top = settings.layout.paddingTopPt;
3849
+ const bottom = settings.layout.paddingBottomPt;
3850
+ const hasLegacyLinkedHeroPadding = settings.layout.linkVerticalPadding !== false && (top === null || typeof top === "undefined" || top === 30) && (bottom === null || typeof bottom === "undefined" || bottom === 30 || bottom === 20);
3851
+ if (hasLegacyLinkedHeroPadding) {
3852
+ settings.layout.linkVerticalPadding = false;
3853
+ settings.layout.paddingTopPt = 30;
3854
+ settings.layout.paddingBottomPt = 20;
3855
+ }
3856
+ }
3857
+ return settings;
3847
3858
  };
3848
3859
  var v2SettingsToLegacyBlock = (blockWithSettings) => {
3849
3860
  const settings = legacyBlockToV2Settings(blockWithSettings);
package/dist/index.mjs CHANGED
@@ -5,21 +5,21 @@ import {
5
5
  admin_app_exports
6
6
  } from "./chunk-RKTIFEUY.mjs";
7
7
  import "./chunk-W2UOCJDX.mjs";
8
- import {
9
- blocks_exports
10
- } from "./chunk-JQAHXYAM.mjs";
11
8
  import {
12
9
  nextjs_exports
13
- } from "./chunk-H4GTEY24.mjs";
10
+ } from "./chunk-AWL7TIEI.mjs";
14
11
  import "./chunk-ZTXJG4K5.mjs";
15
12
  import {
16
13
  studio_pages_exports
17
- } from "./chunk-6PJ5N4FK.mjs";
18
- import "./chunk-OQSEJXC4.mjs";
19
- import "./chunk-4LSIUED5.mjs";
14
+ } from "./chunk-LUF62ZWF.mjs";
15
+ import "./chunk-CUPMTHGX.mjs";
20
16
  import {
21
17
  studio_exports
22
18
  } from "./chunk-ADIIWIYL.mjs";
19
+ import {
20
+ blocks_exports
21
+ } from "./chunk-JQAHXYAM.mjs";
22
+ import "./chunk-OQSEJXC4.mjs";
23
23
  import "./chunk-6BWS3CLP.mjs";
24
24
  export {
25
25
  admin_exports as admin,
@@ -257,7 +257,18 @@ var legacyBlockToV2Settings = (block) => {
257
257
  current.advanced.editCopyInPanel = Boolean(block.editCopyInPanel ?? current.advanced.editCopyInPanel);
258
258
  current.advanced.customClassName = typeof block.customClassName === "string" ? block.customClassName : current.advanced.customClassName;
259
259
  current.advanced.hideOnMobile = Boolean(block.hideOnMobile ?? current.advanced.hideOnMobile);
260
- return mergeSettings(current, block.settings);
260
+ const settings = mergeSettings(current, block.settings);
261
+ if (block.blockType === "hero") {
262
+ const top = settings.layout.paddingTopPt;
263
+ const bottom = settings.layout.paddingBottomPt;
264
+ const hasLegacyLinkedHeroPadding = settings.layout.linkVerticalPadding !== false && (top === null || typeof top === "undefined" || top === 30) && (bottom === null || typeof bottom === "undefined" || bottom === 30 || bottom === 20);
265
+ if (hasLegacyLinkedHeroPadding) {
266
+ settings.layout.linkVerticalPadding = false;
267
+ settings.layout.paddingTopPt = 30;
268
+ settings.layout.paddingBottomPt = 20;
269
+ }
270
+ }
271
+ return settings;
261
272
  };
262
273
  var v2SettingsToLegacyBlock = (blockWithSettings) => {
263
274
  const settings = legacyBlockToV2Settings(blockWithSettings);
@@ -5,9 +5,9 @@ import {
5
5
  createSiteQueries,
6
6
  resolveMedia,
7
7
  resolveSocialMediaLinks
8
- } from "../chunk-H4GTEY24.mjs";
8
+ } from "../chunk-AWL7TIEI.mjs";
9
9
  import "../chunk-ZTXJG4K5.mjs";
10
- import "../chunk-4LSIUED5.mjs";
10
+ import "../chunk-CUPMTHGX.mjs";
11
11
  import "../chunk-ADIIWIYL.mjs";
12
12
  import "../chunk-6BWS3CLP.mjs";
13
13
  export {
@@ -247,7 +247,18 @@ var legacyBlockToV2Settings = (block) => {
247
247
  current.advanced.editCopyInPanel = Boolean(block.editCopyInPanel ?? current.advanced.editCopyInPanel);
248
248
  current.advanced.customClassName = typeof block.customClassName === "string" ? block.customClassName : current.advanced.customClassName;
249
249
  current.advanced.hideOnMobile = Boolean(block.hideOnMobile ?? current.advanced.hideOnMobile);
250
- return mergeSettings(current, block.settings);
250
+ const settings = mergeSettings(current, block.settings);
251
+ if (block.blockType === "hero") {
252
+ const top = settings.layout.paddingTopPt;
253
+ const bottom = settings.layout.paddingBottomPt;
254
+ const hasLegacyLinkedHeroPadding = settings.layout.linkVerticalPadding !== false && (top === null || typeof top === "undefined" || top === 30) && (bottom === null || typeof bottom === "undefined" || bottom === 30 || bottom === 20);
255
+ if (hasLegacyLinkedHeroPadding) {
256
+ settings.layout.linkVerticalPadding = false;
257
+ settings.layout.paddingTopPt = 30;
258
+ settings.layout.paddingBottomPt = 20;
259
+ }
260
+ }
261
+ return settings;
251
262
  };
252
263
  var v2SettingsToLegacyBlock = (blockWithSettings) => {
253
264
  const settings = legacyBlockToV2Settings(blockWithSettings);
@@ -1231,7 +1242,7 @@ function BlockInspectorRenderer({
1231
1242
  }
1232
1243
  ) : null,
1233
1244
  (hasMediaGroupContent ? group.fields.filter((field) => !(group.key === "media" && field.key.startsWith("settings.media."))) : group.fields).map((field) => {
1234
- if (field.key === "settings.layout.paddingBottomPt" && getByPath(block, "settings.layout.linkVerticalPadding") !== false) {
1245
+ if (field.key === "settings.layout.paddingBottomPt" && getByPath(block, "settings.layout.linkVerticalPadding") !== false && block.blockType !== "hero") {
1235
1246
  return null;
1236
1247
  }
1237
1248
  if (field.key === "settings.layout.paddingRightPt" && getByPath(block, "settings.layout.linkHorizontalPadding") !== false) {
@@ -1239,7 +1250,7 @@ function BlockInspectorRenderer({
1239
1250
  }
1240
1251
  const fieldValue = getByPath(block, field.key);
1241
1252
  if (field.type === "checkbox") {
1242
- const checked = field.key === "settings.layout.linkVerticalPadding" || field.key === "settings.layout.linkHorizontalPadding" ? typeof fieldValue === "boolean" ? fieldValue : true : Boolean(fieldValue);
1253
+ const checked = field.key === "settings.layout.linkVerticalPadding" || field.key === "settings.layout.linkHorizontalPadding" ? typeof fieldValue === "boolean" ? fieldValue : block.blockType === "hero" ? false : true : Boolean(fieldValue);
1243
1254
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "orion-builder-settings-label is-checkbox", children: [
1244
1255
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1245
1256
  "input",
@@ -220,7 +220,18 @@ var legacyBlockToV2Settings = (block) => {
220
220
  current.advanced.editCopyInPanel = Boolean(block.editCopyInPanel ?? current.advanced.editCopyInPanel);
221
221
  current.advanced.customClassName = typeof block.customClassName === "string" ? block.customClassName : current.advanced.customClassName;
222
222
  current.advanced.hideOnMobile = Boolean(block.hideOnMobile ?? current.advanced.hideOnMobile);
223
- return mergeSettings(current, block.settings);
223
+ const settings = mergeSettings(current, block.settings);
224
+ if (block.blockType === "hero") {
225
+ const top = settings.layout.paddingTopPt;
226
+ const bottom = settings.layout.paddingBottomPt;
227
+ const hasLegacyLinkedHeroPadding = settings.layout.linkVerticalPadding !== false && (top === null || typeof top === "undefined" || top === 30) && (bottom === null || typeof bottom === "undefined" || bottom === 30 || bottom === 20);
228
+ if (hasLegacyLinkedHeroPadding) {
229
+ settings.layout.linkVerticalPadding = false;
230
+ settings.layout.paddingTopPt = 30;
231
+ settings.layout.paddingBottomPt = 20;
232
+ }
233
+ }
234
+ return settings;
224
235
  };
225
236
  var v2SettingsToLegacyBlock = (blockWithSettings) => {
226
237
  const settings = legacyBlockToV2Settings(blockWithSettings);
@@ -1204,7 +1215,7 @@ function BlockInspectorRenderer({
1204
1215
  }
1205
1216
  ) : null,
1206
1217
  (hasMediaGroupContent ? group.fields.filter((field) => !(group.key === "media" && field.key.startsWith("settings.media."))) : group.fields).map((field) => {
1207
- if (field.key === "settings.layout.paddingBottomPt" && getByPath(block, "settings.layout.linkVerticalPadding") !== false) {
1218
+ if (field.key === "settings.layout.paddingBottomPt" && getByPath(block, "settings.layout.linkVerticalPadding") !== false && block.blockType !== "hero") {
1208
1219
  return null;
1209
1220
  }
1210
1221
  if (field.key === "settings.layout.paddingRightPt" && getByPath(block, "settings.layout.linkHorizontalPadding") !== false) {
@@ -1212,7 +1223,7 @@ function BlockInspectorRenderer({
1212
1223
  }
1213
1224
  const fieldValue = getByPath(block, field.key);
1214
1225
  if (field.type === "checkbox") {
1215
- const checked = field.key === "settings.layout.linkVerticalPadding" || field.key === "settings.layout.linkHorizontalPadding" ? typeof fieldValue === "boolean" ? fieldValue : true : Boolean(fieldValue);
1226
+ const checked = field.key === "settings.layout.linkVerticalPadding" || field.key === "settings.layout.linkHorizontalPadding" ? typeof fieldValue === "boolean" ? fieldValue : block.blockType === "hero" ? false : true : Boolean(fieldValue);
1216
1227
  return /* @__PURE__ */ jsxs3("label", { className: "orion-builder-settings-label is-checkbox", children: [
1217
1228
  /* @__PURE__ */ jsx3(
1218
1229
  "input",
@@ -247,7 +247,18 @@ var legacyBlockToV2Settings = (block) => {
247
247
  current.advanced.editCopyInPanel = Boolean(block.editCopyInPanel ?? current.advanced.editCopyInPanel);
248
248
  current.advanced.customClassName = typeof block.customClassName === "string" ? block.customClassName : current.advanced.customClassName;
249
249
  current.advanced.hideOnMobile = Boolean(block.hideOnMobile ?? current.advanced.hideOnMobile);
250
- return mergeSettings(current, block.settings);
250
+ const settings = mergeSettings(current, block.settings);
251
+ if (block.blockType === "hero") {
252
+ const top = settings.layout.paddingTopPt;
253
+ const bottom = settings.layout.paddingBottomPt;
254
+ const hasLegacyLinkedHeroPadding = settings.layout.linkVerticalPadding !== false && (top === null || typeof top === "undefined" || top === 30) && (bottom === null || typeof bottom === "undefined" || bottom === 30 || bottom === 20);
255
+ if (hasLegacyLinkedHeroPadding) {
256
+ settings.layout.linkVerticalPadding = false;
257
+ settings.layout.paddingTopPt = 30;
258
+ settings.layout.paddingBottomPt = 20;
259
+ }
260
+ }
261
+ return settings;
251
262
  };
252
263
  var v2SettingsToLegacyBlock = (blockWithSettings) => {
253
264
  const settings = legacyBlockToV2Settings(blockWithSettings);
@@ -7,15 +7,15 @@ import {
7
7
  pageStudioModuleManifest,
8
8
  resolveBuilderThemeTokens,
9
9
  toEditorInitialDoc
10
- } from "../chunk-6PJ5N4FK.mjs";
11
- import "../chunk-OQSEJXC4.mjs";
10
+ } from "../chunk-LUF62ZWF.mjs";
12
11
  import {
13
12
  createDefaultStudioDocument,
14
13
  defaultBuilderThemeTokens,
15
14
  layoutToStudioDocument,
16
15
  studioDocumentToLayout
17
- } from "../chunk-4LSIUED5.mjs";
16
+ } from "../chunk-CUPMTHGX.mjs";
18
17
  import "../chunk-ADIIWIYL.mjs";
18
+ import "../chunk-OQSEJXC4.mjs";
19
19
  import "../chunk-6BWS3CLP.mjs";
20
20
  export {
21
21
  createDefaultStudioDocument,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-studios/payload-studio",
3
- "version": "0.6.0-beta.39",
3
+ "version": "0.6.0-beta.40",
4
4
  "description": "Base CMS, builder, and custom admin toolkit for Orion Studios websites",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",