@orion-studios/payload-studio 0.5.0-beta.90 → 0.5.0-beta.91

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.
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-ADIIWIYL.mjs";
4
4
  import {
5
5
  studioDocumentToLayout
6
- } from "./chunk-2BWLRH75.mjs";
6
+ } from "./chunk-SHC2KLT3.mjs";
7
7
  import {
8
8
  __export
9
9
  } from "./chunk-6BWS3CLP.mjs";
@@ -42,6 +42,12 @@ var defaultBuilderBlockSettingsV2 = {
42
42
  },
43
43
  layout: {
44
44
  contentWidth: "inherit",
45
+ linkHorizontalPadding: true,
46
+ linkVerticalPadding: true,
47
+ paddingBottomPt: null,
48
+ paddingLeftPt: null,
49
+ paddingRightPt: null,
50
+ paddingTopPt: null,
45
51
  sectionPaddingX: "inherit",
46
52
  sectionPaddingY: "md"
47
53
  },
@@ -65,6 +71,12 @@ var defaultBuilderBlockSettingsV2 = {
65
71
  var defaultBuilderItemSettingsV2 = {
66
72
  layout: {
67
73
  contentWidth: "inherit",
74
+ linkHorizontalPadding: true,
75
+ linkVerticalPadding: true,
76
+ paddingBottomPt: null,
77
+ paddingLeftPt: null,
78
+ paddingRightPt: null,
79
+ paddingTopPt: null,
68
80
  sectionPaddingX: "inherit",
69
81
  sectionPaddingY: "md"
70
82
  },
@@ -342,30 +354,53 @@ var layoutFieldSet = [
342
354
  },
343
355
  {
344
356
  group: "layout",
345
- key: "settings.layout.sectionPaddingY",
346
- label: "Section Vertical Spacing",
347
- options: [
348
- { label: "None", value: "none" },
349
- { label: "Small", value: "sm" },
350
- { label: "Medium", value: "md" },
351
- { label: "Large", value: "lg" }
352
- ],
353
- tags: ["spacing", "padding"],
354
- type: "select"
357
+ key: "settings.layout.linkVerticalPadding",
358
+ label: "Keep Top and Bottom Equal",
359
+ tags: ["spacing", "padding", "equal", "lock", "vertical"],
360
+ type: "checkbox"
355
361
  },
356
362
  {
357
363
  group: "layout",
358
- key: "settings.layout.sectionPaddingX",
359
- label: "Section Horizontal Spacing",
360
- options: [
361
- { label: "Inherit", value: "inherit" },
362
- { label: "None", value: "none" },
363
- { label: "Small", value: "sm" },
364
- { label: "Medium", value: "md" },
365
- { label: "Large", value: "lg" }
366
- ],
367
- tags: ["spacing", "padding"],
368
- type: "select"
364
+ key: "settings.layout.paddingTopPt",
365
+ label: "Top Padding (pt)",
366
+ max: 240,
367
+ min: 0,
368
+ tags: ["spacing", "padding", "top", "vertical"],
369
+ type: "number"
370
+ },
371
+ {
372
+ group: "layout",
373
+ key: "settings.layout.paddingBottomPt",
374
+ label: "Bottom Padding (pt)",
375
+ max: 240,
376
+ min: 0,
377
+ tags: ["spacing", "padding", "bottom", "vertical"],
378
+ type: "number"
379
+ },
380
+ {
381
+ group: "layout",
382
+ key: "settings.layout.linkHorizontalPadding",
383
+ label: "Keep Left and Right Equal",
384
+ tags: ["spacing", "padding", "equal", "lock", "horizontal"],
385
+ type: "checkbox"
386
+ },
387
+ {
388
+ group: "layout",
389
+ key: "settings.layout.paddingLeftPt",
390
+ label: "Left Padding (pt)",
391
+ max: 240,
392
+ min: 0,
393
+ tags: ["spacing", "padding", "left", "horizontal"],
394
+ type: "number"
395
+ },
396
+ {
397
+ group: "layout",
398
+ key: "settings.layout.paddingRightPt",
399
+ label: "Right Padding (pt)",
400
+ max: 240,
401
+ min: 0,
402
+ tags: ["spacing", "padding", "right", "horizontal"],
403
+ type: "number"
369
404
  }
370
405
  ];
371
406
  var typographyFieldSet = [
@@ -8,6 +8,12 @@ type BuilderTextAlign = 'center' | 'justify' | 'left' | 'right';
8
8
  type BuilderTypographySpacingPreset = 'normal' | 'relaxed' | 'tight';
9
9
  type BuilderLayoutSettingsV2 = {
10
10
  contentWidth?: 'content' | 'full' | 'inherit' | 'narrow' | 'wide';
11
+ linkHorizontalPadding?: boolean;
12
+ linkVerticalPadding?: boolean;
13
+ paddingBottomPt?: number | null;
14
+ paddingLeftPt?: number | null;
15
+ paddingRightPt?: number | null;
16
+ paddingTopPt?: number | null;
11
17
  sectionPaddingX?: 'inherit' | 'lg' | 'md' | 'none' | 'sm';
12
18
  sectionPaddingY?: 'lg' | 'md' | 'none' | 'sm';
13
19
  };
@@ -8,6 +8,12 @@ type BuilderTextAlign = 'center' | 'justify' | 'left' | 'right';
8
8
  type BuilderTypographySpacingPreset = 'normal' | 'relaxed' | 'tight';
9
9
  type BuilderLayoutSettingsV2 = {
10
10
  contentWidth?: 'content' | 'full' | 'inherit' | 'narrow' | 'wide';
11
+ linkHorizontalPadding?: boolean;
12
+ linkVerticalPadding?: boolean;
13
+ paddingBottomPt?: number | null;
14
+ paddingLeftPt?: number | null;
15
+ paddingRightPt?: number | null;
16
+ paddingTopPt?: number | null;
11
17
  sectionPaddingX?: 'inherit' | 'lg' | 'md' | 'none' | 'sm';
12
18
  sectionPaddingY?: 'lg' | 'md' | 'none' | 'sm';
13
19
  };
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-CpG3UHcS.mjs';
5
5
  export { i as studio } from './index-BIwu3qIH.mjs';
6
- export { i as studioPages } from './index-DT_Vorvh.mjs';
6
+ export { i as studioPages } from './index-R7hA134j.mjs';
7
7
  import 'payload';
8
8
  import 'react/jsx-runtime';
9
9
  import 'react';
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-CpG3UHcS.js';
5
5
  export { i as studio } from './index-BIwu3qIH.js';
6
- export { i as studioPages } from './index-BBp-3l6M.js';
6
+ export { i as studioPages } from './index-vjrjy0P4.js';
7
7
  import 'payload';
8
8
  import 'react/jsx-runtime';
9
9
  import 'react';
package/dist/index.js CHANGED
@@ -2732,6 +2732,12 @@ var defaultBuilderBlockSettingsV2 = {
2732
2732
  },
2733
2733
  layout: {
2734
2734
  contentWidth: "inherit",
2735
+ linkHorizontalPadding: true,
2736
+ linkVerticalPadding: true,
2737
+ paddingBottomPt: null,
2738
+ paddingLeftPt: null,
2739
+ paddingRightPt: null,
2740
+ paddingTopPt: null,
2735
2741
  sectionPaddingX: "inherit",
2736
2742
  sectionPaddingY: "md"
2737
2743
  },
@@ -2755,6 +2761,12 @@ var defaultBuilderBlockSettingsV2 = {
2755
2761
  var defaultBuilderItemSettingsV2 = {
2756
2762
  layout: {
2757
2763
  contentWidth: "inherit",
2764
+ linkHorizontalPadding: true,
2765
+ linkVerticalPadding: true,
2766
+ paddingBottomPt: null,
2767
+ paddingLeftPt: null,
2768
+ paddingRightPt: null,
2769
+ paddingTopPt: null,
2758
2770
  sectionPaddingX: "inherit",
2759
2771
  sectionPaddingY: "md"
2760
2772
  },
@@ -3032,30 +3044,53 @@ var layoutFieldSet = [
3032
3044
  },
3033
3045
  {
3034
3046
  group: "layout",
3035
- key: "settings.layout.sectionPaddingY",
3036
- label: "Section Vertical Spacing",
3037
- options: [
3038
- { label: "None", value: "none" },
3039
- { label: "Small", value: "sm" },
3040
- { label: "Medium", value: "md" },
3041
- { label: "Large", value: "lg" }
3042
- ],
3043
- tags: ["spacing", "padding"],
3044
- type: "select"
3047
+ key: "settings.layout.linkVerticalPadding",
3048
+ label: "Keep Top and Bottom Equal",
3049
+ tags: ["spacing", "padding", "equal", "lock", "vertical"],
3050
+ type: "checkbox"
3045
3051
  },
3046
3052
  {
3047
3053
  group: "layout",
3048
- key: "settings.layout.sectionPaddingX",
3049
- label: "Section Horizontal Spacing",
3050
- options: [
3051
- { label: "Inherit", value: "inherit" },
3052
- { label: "None", value: "none" },
3053
- { label: "Small", value: "sm" },
3054
- { label: "Medium", value: "md" },
3055
- { label: "Large", value: "lg" }
3056
- ],
3057
- tags: ["spacing", "padding"],
3058
- type: "select"
3054
+ key: "settings.layout.paddingTopPt",
3055
+ label: "Top Padding (pt)",
3056
+ max: 240,
3057
+ min: 0,
3058
+ tags: ["spacing", "padding", "top", "vertical"],
3059
+ type: "number"
3060
+ },
3061
+ {
3062
+ group: "layout",
3063
+ key: "settings.layout.paddingBottomPt",
3064
+ label: "Bottom Padding (pt)",
3065
+ max: 240,
3066
+ min: 0,
3067
+ tags: ["spacing", "padding", "bottom", "vertical"],
3068
+ type: "number"
3069
+ },
3070
+ {
3071
+ group: "layout",
3072
+ key: "settings.layout.linkHorizontalPadding",
3073
+ label: "Keep Left and Right Equal",
3074
+ tags: ["spacing", "padding", "equal", "lock", "horizontal"],
3075
+ type: "checkbox"
3076
+ },
3077
+ {
3078
+ group: "layout",
3079
+ key: "settings.layout.paddingLeftPt",
3080
+ label: "Left Padding (pt)",
3081
+ max: 240,
3082
+ min: 0,
3083
+ tags: ["spacing", "padding", "left", "horizontal"],
3084
+ type: "number"
3085
+ },
3086
+ {
3087
+ group: "layout",
3088
+ key: "settings.layout.paddingRightPt",
3089
+ label: "Right Padding (pt)",
3090
+ max: 240,
3091
+ min: 0,
3092
+ tags: ["spacing", "padding", "right", "horizontal"],
3093
+ type: "number"
3059
3094
  }
3060
3095
  ];
3061
3096
  var typographyFieldSet = [
package/dist/index.mjs CHANGED
@@ -4,18 +4,18 @@ import {
4
4
  import {
5
5
  admin_app_exports
6
6
  } from "./chunk-XVH5SCBD.mjs";
7
- import {
8
- blocks_exports
9
- } from "./chunk-XK3K5GRP.mjs";
10
7
  import {
11
8
  nextjs_exports
12
- } from "./chunk-QWLMYY4E.mjs";
9
+ } from "./chunk-H3UCUO3C.mjs";
13
10
  import {
14
11
  studio_exports
15
12
  } from "./chunk-ADIIWIYL.mjs";
16
13
  import {
17
14
  studio_pages_exports
18
- } from "./chunk-2BWLRH75.mjs";
15
+ } from "./chunk-SHC2KLT3.mjs";
16
+ import {
17
+ blocks_exports
18
+ } from "./chunk-XK3K5GRP.mjs";
19
19
  import "./chunk-SIL2J5MF.mjs";
20
20
  import "./chunk-6BWS3CLP.mjs";
21
21
  export {
@@ -142,6 +142,12 @@ var defaultBuilderBlockSettingsV2 = {
142
142
  },
143
143
  layout: {
144
144
  contentWidth: "inherit",
145
+ linkHorizontalPadding: true,
146
+ linkVerticalPadding: true,
147
+ paddingBottomPt: null,
148
+ paddingLeftPt: null,
149
+ paddingRightPt: null,
150
+ paddingTopPt: null,
145
151
  sectionPaddingX: "inherit",
146
152
  sectionPaddingY: "md"
147
153
  },
@@ -165,6 +171,12 @@ var defaultBuilderBlockSettingsV2 = {
165
171
  var defaultBuilderItemSettingsV2 = {
166
172
  layout: {
167
173
  contentWidth: "inherit",
174
+ linkHorizontalPadding: true,
175
+ linkVerticalPadding: true,
176
+ paddingBottomPt: null,
177
+ paddingLeftPt: null,
178
+ paddingRightPt: null,
179
+ paddingTopPt: null,
168
180
  sectionPaddingX: "inherit",
169
181
  sectionPaddingY: "md"
170
182
  },
@@ -398,30 +410,53 @@ var layoutFieldSet = [
398
410
  },
399
411
  {
400
412
  group: "layout",
401
- key: "settings.layout.sectionPaddingY",
402
- label: "Section Vertical Spacing",
403
- options: [
404
- { label: "None", value: "none" },
405
- { label: "Small", value: "sm" },
406
- { label: "Medium", value: "md" },
407
- { label: "Large", value: "lg" }
408
- ],
409
- tags: ["spacing", "padding"],
410
- type: "select"
413
+ key: "settings.layout.linkVerticalPadding",
414
+ label: "Keep Top and Bottom Equal",
415
+ tags: ["spacing", "padding", "equal", "lock", "vertical"],
416
+ type: "checkbox"
411
417
  },
412
418
  {
413
419
  group: "layout",
414
- key: "settings.layout.sectionPaddingX",
415
- label: "Section Horizontal Spacing",
416
- options: [
417
- { label: "Inherit", value: "inherit" },
418
- { label: "None", value: "none" },
419
- { label: "Small", value: "sm" },
420
- { label: "Medium", value: "md" },
421
- { label: "Large", value: "lg" }
422
- ],
423
- tags: ["spacing", "padding"],
424
- type: "select"
420
+ key: "settings.layout.paddingTopPt",
421
+ label: "Top Padding (pt)",
422
+ max: 240,
423
+ min: 0,
424
+ tags: ["spacing", "padding", "top", "vertical"],
425
+ type: "number"
426
+ },
427
+ {
428
+ group: "layout",
429
+ key: "settings.layout.paddingBottomPt",
430
+ label: "Bottom Padding (pt)",
431
+ max: 240,
432
+ min: 0,
433
+ tags: ["spacing", "padding", "bottom", "vertical"],
434
+ type: "number"
435
+ },
436
+ {
437
+ group: "layout",
438
+ key: "settings.layout.linkHorizontalPadding",
439
+ label: "Keep Left and Right Equal",
440
+ tags: ["spacing", "padding", "equal", "lock", "horizontal"],
441
+ type: "checkbox"
442
+ },
443
+ {
444
+ group: "layout",
445
+ key: "settings.layout.paddingLeftPt",
446
+ label: "Left Padding (pt)",
447
+ max: 240,
448
+ min: 0,
449
+ tags: ["spacing", "padding", "left", "horizontal"],
450
+ type: "number"
451
+ },
452
+ {
453
+ group: "layout",
454
+ key: "settings.layout.paddingRightPt",
455
+ label: "Right Padding (pt)",
456
+ max: 240,
457
+ min: 0,
458
+ tags: ["spacing", "padding", "right", "horizontal"],
459
+ type: "number"
425
460
  }
426
461
  ];
427
462
  var typographyFieldSet = [
@@ -4,9 +4,9 @@ import {
4
4
  createPayloadClient,
5
5
  createSiteQueries,
6
6
  resolveMedia
7
- } from "../chunk-QWLMYY4E.mjs";
7
+ } from "../chunk-H3UCUO3C.mjs";
8
8
  import "../chunk-ADIIWIYL.mjs";
9
- import "../chunk-2BWLRH75.mjs";
9
+ import "../chunk-SHC2KLT3.mjs";
10
10
  import "../chunk-SIL2J5MF.mjs";
11
11
  import "../chunk-6BWS3CLP.mjs";
12
12
  export {
@@ -77,6 +77,12 @@ var defaultBuilderBlockSettingsV2 = {
77
77
  },
78
78
  layout: {
79
79
  contentWidth: "inherit",
80
+ linkHorizontalPadding: true,
81
+ linkVerticalPadding: true,
82
+ paddingBottomPt: null,
83
+ paddingLeftPt: null,
84
+ paddingRightPt: null,
85
+ paddingTopPt: null,
80
86
  sectionPaddingX: "inherit",
81
87
  sectionPaddingY: "md"
82
88
  },
@@ -100,6 +106,12 @@ var defaultBuilderBlockSettingsV2 = {
100
106
  var defaultBuilderItemSettingsV2 = {
101
107
  layout: {
102
108
  contentWidth: "inherit",
109
+ linkHorizontalPadding: true,
110
+ linkVerticalPadding: true,
111
+ paddingBottomPt: null,
112
+ paddingLeftPt: null,
113
+ paddingRightPt: null,
114
+ paddingTopPt: null,
103
115
  sectionPaddingX: "inherit",
104
116
  sectionPaddingY: "md"
105
117
  },
@@ -521,30 +533,53 @@ var layoutFieldSet = [
521
533
  },
522
534
  {
523
535
  group: "layout",
524
- key: "settings.layout.sectionPaddingY",
525
- label: "Section Vertical Spacing",
526
- options: [
527
- { label: "None", value: "none" },
528
- { label: "Small", value: "sm" },
529
- { label: "Medium", value: "md" },
530
- { label: "Large", value: "lg" }
531
- ],
532
- tags: ["spacing", "padding"],
533
- type: "select"
536
+ key: "settings.layout.linkVerticalPadding",
537
+ label: "Keep Top and Bottom Equal",
538
+ tags: ["spacing", "padding", "equal", "lock", "vertical"],
539
+ type: "checkbox"
534
540
  },
535
541
  {
536
542
  group: "layout",
537
- key: "settings.layout.sectionPaddingX",
538
- label: "Section Horizontal Spacing",
539
- options: [
540
- { label: "Inherit", value: "inherit" },
541
- { label: "None", value: "none" },
542
- { label: "Small", value: "sm" },
543
- { label: "Medium", value: "md" },
544
- { label: "Large", value: "lg" }
545
- ],
546
- tags: ["spacing", "padding"],
547
- type: "select"
543
+ key: "settings.layout.paddingTopPt",
544
+ label: "Top Padding (pt)",
545
+ max: 240,
546
+ min: 0,
547
+ tags: ["spacing", "padding", "top", "vertical"],
548
+ type: "number"
549
+ },
550
+ {
551
+ group: "layout",
552
+ key: "settings.layout.paddingBottomPt",
553
+ label: "Bottom Padding (pt)",
554
+ max: 240,
555
+ min: 0,
556
+ tags: ["spacing", "padding", "bottom", "vertical"],
557
+ type: "number"
558
+ },
559
+ {
560
+ group: "layout",
561
+ key: "settings.layout.linkHorizontalPadding",
562
+ label: "Keep Left and Right Equal",
563
+ tags: ["spacing", "padding", "equal", "lock", "horizontal"],
564
+ type: "checkbox"
565
+ },
566
+ {
567
+ group: "layout",
568
+ key: "settings.layout.paddingLeftPt",
569
+ label: "Left Padding (pt)",
570
+ max: 240,
571
+ min: 0,
572
+ tags: ["spacing", "padding", "left", "horizontal"],
573
+ type: "number"
574
+ },
575
+ {
576
+ group: "layout",
577
+ key: "settings.layout.paddingRightPt",
578
+ label: "Right Padding (pt)",
579
+ max: 240,
580
+ min: 0,
581
+ tags: ["spacing", "padding", "right", "horizontal"],
582
+ type: "number"
548
583
  }
549
584
  ];
550
585
  var typographyFieldSet = [
@@ -1199,6 +1234,12 @@ function BlockInspectorRenderer({
1199
1234
  }
1200
1235
  ) : null,
1201
1236
  (hasMediaGroupContent ? group.fields.filter((field) => !(group.key === "media" && field.key.startsWith("settings.media."))) : group.fields).map((field) => {
1237
+ if (field.key === "settings.layout.paddingBottomPt" && Boolean(getByPath(block, "settings.layout.linkVerticalPadding"))) {
1238
+ return null;
1239
+ }
1240
+ if (field.key === "settings.layout.paddingRightPt" && Boolean(getByPath(block, "settings.layout.linkHorizontalPadding"))) {
1241
+ return null;
1242
+ }
1202
1243
  const fieldValue = getByPath(block, field.key);
1203
1244
  if (field.type === "checkbox") {
1204
1245
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "orion-builder-settings-label is-checkbox", children: [
@@ -1228,6 +1269,8 @@ function BlockInspectorRenderer({
1228
1269
  ] }, field.key);
1229
1270
  }
1230
1271
  if (field.type === "number") {
1272
+ const numberValue = typeof fieldValue === "number" ? fieldValue : typeof fieldValue === "string" && fieldValue.trim().length > 0 ? Number(fieldValue) : null;
1273
+ const resolvedValue = typeof numberValue === "number" && Number.isFinite(numberValue) ? numberValue : "";
1231
1274
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "orion-builder-settings-label", children: [
1232
1275
  field.label,
1233
1276
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
@@ -1236,9 +1279,21 @@ function BlockInspectorRenderer({
1236
1279
  className: "orion-builder-settings-input",
1237
1280
  max: field.max,
1238
1281
  min: field.min,
1239
- onChange: (event) => updateForKey(field.key, event.target.value === "" ? null : Number(event.target.value)),
1282
+ onChange: (event) => {
1283
+ if (event.target.value === "") {
1284
+ updateForKey(field.key, null);
1285
+ return;
1286
+ }
1287
+ const parsed = Number(event.target.value);
1288
+ if (!Number.isFinite(parsed)) {
1289
+ return;
1290
+ }
1291
+ const withMin = typeof field.min === "number" ? Math.max(field.min, parsed) : parsed;
1292
+ const bounded = typeof field.max === "number" ? Math.min(field.max, withMin) : withMin;
1293
+ updateForKey(field.key, bounded);
1294
+ },
1240
1295
  type: "number",
1241
- value: typeof fieldValue === "number" ? fieldValue : ""
1296
+ value: resolvedValue
1242
1297
  }
1243
1298
  )
1244
1299
  ] }, field.key);
@@ -3461,6 +3516,12 @@ var defaultSectionStyle = {
3461
3516
  contentGradientPreset: "none",
3462
3517
  contentGradientTo: "#f4f6f2",
3463
3518
  contentWidth: "inherit",
3519
+ linkHorizontalPadding: true,
3520
+ linkVerticalPadding: true,
3521
+ paddingBottomPt: null,
3522
+ paddingLeftPt: null,
3523
+ paddingRightPt: null,
3524
+ paddingTopPt: null,
3464
3525
  sectionPaddingX: "inherit",
3465
3526
  sectionBackgroundColor: "#ffffff",
3466
3527
  sectionBackgroundMode: "none",
@@ -3676,6 +3737,22 @@ function parseOptionalPercentNumber2(value) {
3676
3737
  }
3677
3738
  return void 0;
3678
3739
  }
3740
+ function parseOptionalPointNumber(value) {
3741
+ if (typeof value === "number" && Number.isFinite(value)) {
3742
+ return Math.max(0, Math.min(240, Math.round(value)));
3743
+ }
3744
+ if (typeof value === "string") {
3745
+ const trimmed = value.trim();
3746
+ if (!trimmed) {
3747
+ return null;
3748
+ }
3749
+ const parsed = Number(trimmed);
3750
+ if (Number.isFinite(parsed)) {
3751
+ return Math.max(0, Math.min(240, Math.round(parsed)));
3752
+ }
3753
+ }
3754
+ return null;
3755
+ }
3679
3756
  function hexToRgb(value) {
3680
3757
  const normalized = value.trim();
3681
3758
  if (!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(normalized)) {
@@ -3717,13 +3794,41 @@ function getThemeColorOverride(tokens, colorKey) {
3717
3794
  return normalized.length > 0 ? normalized : null;
3718
3795
  }
3719
3796
  var sectionStyleFromBlock = (block, pageDefaults) => {
3797
+ const settings = isRecord6(block.settings) ? block.settings : {};
3798
+ const layoutSettings = isRecord6(settings.layout) ? settings.layout : {};
3799
+ const settingContentWidth = normalizeText2(layoutSettings.contentWidth, "");
3800
+ const settingSectionPaddingY = normalizeText2(layoutSettings.sectionPaddingY, "");
3801
+ const settingSectionPaddingX = normalizeText2(layoutSettings.sectionPaddingX, "");
3720
3802
  const contentWidthRaw = normalizeText2(block.contentWidth, defaultSectionStyle.contentWidth);
3721
- const sectionPaddingRaw = normalizeText2(block.sectionPaddingY, defaultSectionStyle.sectionPaddingY);
3722
- const sectionPaddingXRaw = normalizeText2(block.sectionPaddingX, defaultSectionStyle.sectionPaddingX);
3803
+ const sectionPaddingRaw = normalizeText2(
3804
+ settingSectionPaddingY || block.sectionPaddingY,
3805
+ defaultSectionStyle.sectionPaddingY
3806
+ );
3807
+ const sectionPaddingXRaw = normalizeText2(
3808
+ settingSectionPaddingX || block.sectionPaddingX,
3809
+ defaultSectionStyle.sectionPaddingX
3810
+ );
3723
3811
  const sectionPaddingY = sectionPaddingRaw === "none" || sectionPaddingRaw === "sm" || sectionPaddingRaw === "lg" ? sectionPaddingRaw : "md";
3724
3812
  const sectionPaddingX = sectionPaddingXRaw === "none" || sectionPaddingXRaw === "sm" || sectionPaddingXRaw === "md" || sectionPaddingXRaw === "lg" ? sectionPaddingXRaw : pageDefaults.pageWidthDefault === "full" ? "none" : "md";
3725
- const contentWidth = contentWidthRaw === "narrow" || contentWidthRaw === "content" || contentWidthRaw === "wide" || contentWidthRaw === "full" || contentWidthRaw === "inherit" ? contentWidthRaw : "inherit";
3813
+ const contentWidth = settingContentWidth === "narrow" || settingContentWidth === "content" || settingContentWidth === "wide" || settingContentWidth === "full" || settingContentWidth === "inherit" ? settingContentWidth : contentWidthRaw === "narrow" || contentWidthRaw === "content" || contentWidthRaw === "wide" || contentWidthRaw === "full" || contentWidthRaw === "inherit" ? contentWidthRaw : "inherit";
3726
3814
  const resolvedContentWidth = contentWidth === "inherit" ? pageDefaults.pageWidthDefault : contentWidth;
3815
+ const linkVerticalPadding = typeof layoutSettings.linkVerticalPadding === "boolean" ? layoutSettings.linkVerticalPadding : defaultSectionStyle.linkVerticalPadding;
3816
+ const linkHorizontalPadding = typeof layoutSettings.linkHorizontalPadding === "boolean" ? layoutSettings.linkHorizontalPadding : defaultSectionStyle.linkHorizontalPadding;
3817
+ let customPaddingTop = parseOptionalPointNumber(layoutSettings.paddingTopPt);
3818
+ let customPaddingBottom = parseOptionalPointNumber(layoutSettings.paddingBottomPt);
3819
+ let customPaddingLeft = parseOptionalPointNumber(layoutSettings.paddingLeftPt);
3820
+ let customPaddingRight = parseOptionalPointNumber(layoutSettings.paddingRightPt);
3821
+ if (linkVerticalPadding) {
3822
+ const linkedVertical = customPaddingTop ?? customPaddingBottom;
3823
+ customPaddingTop = linkedVertical;
3824
+ customPaddingBottom = linkedVertical;
3825
+ }
3826
+ if (linkHorizontalPadding) {
3827
+ const linkedHorizontal = customPaddingLeft ?? customPaddingRight;
3828
+ customPaddingLeft = linkedHorizontal;
3829
+ customPaddingRight = linkedHorizontal;
3830
+ }
3831
+ const resolvedSectionPaddingX = customPaddingLeft !== null || customPaddingRight !== null ? "none" : sectionPaddingX;
3727
3832
  const sectionMode = normalizeText2(block.sectionBackgroundMode, defaultSectionStyle.sectionBackgroundMode);
3728
3833
  const sectionColor = parseColor(
3729
3834
  normalizeText2(block.sectionBackgroundColor, ""),
@@ -3771,10 +3876,12 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
3771
3876
  boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)",
3772
3877
  padding: "1rem"
3773
3878
  } : {},
3774
- sectionClass: `orion-builder-shell is-${pageDefaults.pageWidthDefault} padx-${sectionPaddingX}`,
3879
+ sectionClass: `orion-builder-shell is-${pageDefaults.pageWidthDefault} padx-${resolvedSectionPaddingX}`,
3775
3880
  sectionInnerStyle: {
3776
- paddingBottom: sectionPaddingMap[sectionPaddingY],
3777
- paddingTop: sectionPaddingMap[sectionPaddingY]
3881
+ paddingBottom: customPaddingBottom === null ? sectionPaddingMap[sectionPaddingY] : `${customPaddingBottom}pt`,
3882
+ paddingLeft: customPaddingLeft === null ? void 0 : `${customPaddingLeft}pt`,
3883
+ paddingRight: customPaddingRight === null ? void 0 : `${customPaddingRight}pt`,
3884
+ paddingTop: customPaddingTop === null ? sectionPaddingMap[sectionPaddingY] : `${customPaddingTop}pt`
3778
3885
  },
3779
3886
  sectionStyle: sectionMode === "color" ? { background: sectionColor } : sectionMode === "gradient" ? { background: sectionGradient } : block.blockType === "hero" ? { background: "transparent" } : {}
3780
3887
  };
@@ -4528,6 +4635,84 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
4528
4635
  }
4529
4636
  return next;
4530
4637
  };
4638
+ const getByPath2 = (source, path) => {
4639
+ const keys = path.split(".");
4640
+ let cursor = source;
4641
+ for (const key of keys) {
4642
+ if (!isRecord6(cursor)) {
4643
+ return void 0;
4644
+ }
4645
+ cursor = cursor[key];
4646
+ }
4647
+ return cursor;
4648
+ };
4649
+ const clampPaddingPointValue = (value) => {
4650
+ if (value === null || typeof value === "undefined" || value === "") {
4651
+ return null;
4652
+ }
4653
+ if (typeof value === "number" && Number.isFinite(value)) {
4654
+ return Math.max(0, Math.min(240, Math.round(value)));
4655
+ }
4656
+ if (typeof value === "string") {
4657
+ const trimmed = value.trim();
4658
+ if (!trimmed) {
4659
+ return null;
4660
+ }
4661
+ const parsed = Number(trimmed);
4662
+ if (Number.isFinite(parsed)) {
4663
+ return Math.max(0, Math.min(240, Math.round(parsed)));
4664
+ }
4665
+ }
4666
+ return null;
4667
+ };
4668
+ const syncPaddingFields = (settingsSource, path, value) => {
4669
+ let nextSettings = setByPath(settingsSource, path, value);
4670
+ const writePadding = (targetPath, nextValue) => {
4671
+ nextSettings = setByPath(nextSettings, targetPath, clampPaddingPointValue(nextValue));
4672
+ };
4673
+ const readPadding = (targetPath) => clampPaddingPointValue(getByPath2(nextSettings, targetPath));
4674
+ const readLinked = (targetPath) => {
4675
+ const linkedValue = getByPath2(nextSettings, targetPath);
4676
+ return typeof linkedValue === "boolean" ? linkedValue : true;
4677
+ };
4678
+ if (path === "layout.paddingTopPt" || path === "layout.paddingBottomPt") {
4679
+ const normalized = clampPaddingPointValue(value);
4680
+ if (readLinked("layout.linkVerticalPadding")) {
4681
+ writePadding("layout.paddingTopPt", normalized);
4682
+ writePadding("layout.paddingBottomPt", normalized);
4683
+ } else {
4684
+ writePadding(path, normalized);
4685
+ }
4686
+ return nextSettings;
4687
+ }
4688
+ if (path === "layout.paddingLeftPt" || path === "layout.paddingRightPt") {
4689
+ const normalized = clampPaddingPointValue(value);
4690
+ if (readLinked("layout.linkHorizontalPadding")) {
4691
+ writePadding("layout.paddingLeftPt", normalized);
4692
+ writePadding("layout.paddingRightPt", normalized);
4693
+ } else {
4694
+ writePadding(path, normalized);
4695
+ }
4696
+ return nextSettings;
4697
+ }
4698
+ if (path === "layout.linkVerticalPadding") {
4699
+ if (Boolean(value)) {
4700
+ const linkedValue = readPadding("layout.paddingTopPt") ?? readPadding("layout.paddingBottomPt");
4701
+ writePadding("layout.paddingTopPt", linkedValue);
4702
+ writePadding("layout.paddingBottomPt", linkedValue);
4703
+ }
4704
+ return nextSettings;
4705
+ }
4706
+ if (path === "layout.linkHorizontalPadding") {
4707
+ if (Boolean(value)) {
4708
+ const linkedValue = readPadding("layout.paddingLeftPt") ?? readPadding("layout.paddingRightPt");
4709
+ writePadding("layout.paddingLeftPt", linkedValue);
4710
+ writePadding("layout.paddingRightPt", linkedValue);
4711
+ }
4712
+ return nextSettings;
4713
+ }
4714
+ return nextSettings;
4715
+ };
4531
4716
  const updateBlockField = (blockIndex, fieldName, value) => {
4532
4717
  setLayout((current) => {
4533
4718
  const next = cloneBlockLayout(current);
@@ -4544,7 +4729,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
4544
4729
  const next = cloneBlockLayout(current);
4545
4730
  const currentBlock = isRecord6(next[blockIndex]) ? next[blockIndex] : {};
4546
4731
  const currentSettings = isRecord6(currentBlock.settings) ? currentBlock.settings : {};
4547
- const nextSettings = setByPath(currentSettings, path, value);
4732
+ const nextSettings = syncPaddingFields(currentSettings, path, value);
4548
4733
  next[blockIndex] = migrateBlockToSettingsV2({
4549
4734
  ...currentBlock,
4550
4735
  settings: nextSettings
@@ -51,6 +51,12 @@ var defaultBuilderBlockSettingsV2 = {
51
51
  },
52
52
  layout: {
53
53
  contentWidth: "inherit",
54
+ linkHorizontalPadding: true,
55
+ linkVerticalPadding: true,
56
+ paddingBottomPt: null,
57
+ paddingLeftPt: null,
58
+ paddingRightPt: null,
59
+ paddingTopPt: null,
54
60
  sectionPaddingX: "inherit",
55
61
  sectionPaddingY: "md"
56
62
  },
@@ -74,6 +80,12 @@ var defaultBuilderBlockSettingsV2 = {
74
80
  var defaultBuilderItemSettingsV2 = {
75
81
  layout: {
76
82
  contentWidth: "inherit",
83
+ linkHorizontalPadding: true,
84
+ linkVerticalPadding: true,
85
+ paddingBottomPt: null,
86
+ paddingLeftPt: null,
87
+ paddingRightPt: null,
88
+ paddingTopPt: null,
77
89
  sectionPaddingX: "inherit",
78
90
  sectionPaddingY: "md"
79
91
  },
@@ -495,30 +507,53 @@ var layoutFieldSet = [
495
507
  },
496
508
  {
497
509
  group: "layout",
498
- key: "settings.layout.sectionPaddingY",
499
- label: "Section Vertical Spacing",
500
- options: [
501
- { label: "None", value: "none" },
502
- { label: "Small", value: "sm" },
503
- { label: "Medium", value: "md" },
504
- { label: "Large", value: "lg" }
505
- ],
506
- tags: ["spacing", "padding"],
507
- type: "select"
510
+ key: "settings.layout.linkVerticalPadding",
511
+ label: "Keep Top and Bottom Equal",
512
+ tags: ["spacing", "padding", "equal", "lock", "vertical"],
513
+ type: "checkbox"
508
514
  },
509
515
  {
510
516
  group: "layout",
511
- key: "settings.layout.sectionPaddingX",
512
- label: "Section Horizontal Spacing",
513
- options: [
514
- { label: "Inherit", value: "inherit" },
515
- { label: "None", value: "none" },
516
- { label: "Small", value: "sm" },
517
- { label: "Medium", value: "md" },
518
- { label: "Large", value: "lg" }
519
- ],
520
- tags: ["spacing", "padding"],
521
- type: "select"
517
+ key: "settings.layout.paddingTopPt",
518
+ label: "Top Padding (pt)",
519
+ max: 240,
520
+ min: 0,
521
+ tags: ["spacing", "padding", "top", "vertical"],
522
+ type: "number"
523
+ },
524
+ {
525
+ group: "layout",
526
+ key: "settings.layout.paddingBottomPt",
527
+ label: "Bottom Padding (pt)",
528
+ max: 240,
529
+ min: 0,
530
+ tags: ["spacing", "padding", "bottom", "vertical"],
531
+ type: "number"
532
+ },
533
+ {
534
+ group: "layout",
535
+ key: "settings.layout.linkHorizontalPadding",
536
+ label: "Keep Left and Right Equal",
537
+ tags: ["spacing", "padding", "equal", "lock", "horizontal"],
538
+ type: "checkbox"
539
+ },
540
+ {
541
+ group: "layout",
542
+ key: "settings.layout.paddingLeftPt",
543
+ label: "Left Padding (pt)",
544
+ max: 240,
545
+ min: 0,
546
+ tags: ["spacing", "padding", "left", "horizontal"],
547
+ type: "number"
548
+ },
549
+ {
550
+ group: "layout",
551
+ key: "settings.layout.paddingRightPt",
552
+ label: "Right Padding (pt)",
553
+ max: 240,
554
+ min: 0,
555
+ tags: ["spacing", "padding", "right", "horizontal"],
556
+ type: "number"
522
557
  }
523
558
  ];
524
559
  var typographyFieldSet = [
@@ -1173,6 +1208,12 @@ function BlockInspectorRenderer({
1173
1208
  }
1174
1209
  ) : null,
1175
1210
  (hasMediaGroupContent ? group.fields.filter((field) => !(group.key === "media" && field.key.startsWith("settings.media."))) : group.fields).map((field) => {
1211
+ if (field.key === "settings.layout.paddingBottomPt" && Boolean(getByPath(block, "settings.layout.linkVerticalPadding"))) {
1212
+ return null;
1213
+ }
1214
+ if (field.key === "settings.layout.paddingRightPt" && Boolean(getByPath(block, "settings.layout.linkHorizontalPadding"))) {
1215
+ return null;
1216
+ }
1176
1217
  const fieldValue = getByPath(block, field.key);
1177
1218
  if (field.type === "checkbox") {
1178
1219
  return /* @__PURE__ */ jsxs3("label", { className: "orion-builder-settings-label is-checkbox", children: [
@@ -1202,6 +1243,8 @@ function BlockInspectorRenderer({
1202
1243
  ] }, field.key);
1203
1244
  }
1204
1245
  if (field.type === "number") {
1246
+ const numberValue = typeof fieldValue === "number" ? fieldValue : typeof fieldValue === "string" && fieldValue.trim().length > 0 ? Number(fieldValue) : null;
1247
+ const resolvedValue = typeof numberValue === "number" && Number.isFinite(numberValue) ? numberValue : "";
1205
1248
  return /* @__PURE__ */ jsxs3("label", { className: "orion-builder-settings-label", children: [
1206
1249
  field.label,
1207
1250
  /* @__PURE__ */ jsx3(
@@ -1210,9 +1253,21 @@ function BlockInspectorRenderer({
1210
1253
  className: "orion-builder-settings-input",
1211
1254
  max: field.max,
1212
1255
  min: field.min,
1213
- onChange: (event) => updateForKey(field.key, event.target.value === "" ? null : Number(event.target.value)),
1256
+ onChange: (event) => {
1257
+ if (event.target.value === "") {
1258
+ updateForKey(field.key, null);
1259
+ return;
1260
+ }
1261
+ const parsed = Number(event.target.value);
1262
+ if (!Number.isFinite(parsed)) {
1263
+ return;
1264
+ }
1265
+ const withMin = typeof field.min === "number" ? Math.max(field.min, parsed) : parsed;
1266
+ const bounded = typeof field.max === "number" ? Math.min(field.max, withMin) : withMin;
1267
+ updateForKey(field.key, bounded);
1268
+ },
1214
1269
  type: "number",
1215
- value: typeof fieldValue === "number" ? fieldValue : ""
1270
+ value: resolvedValue
1216
1271
  }
1217
1272
  )
1218
1273
  ] }, field.key);
@@ -3342,6 +3397,12 @@ var defaultSectionStyle = {
3342
3397
  contentGradientPreset: "none",
3343
3398
  contentGradientTo: "#f4f6f2",
3344
3399
  contentWidth: "inherit",
3400
+ linkHorizontalPadding: true,
3401
+ linkVerticalPadding: true,
3402
+ paddingBottomPt: null,
3403
+ paddingLeftPt: null,
3404
+ paddingRightPt: null,
3405
+ paddingTopPt: null,
3345
3406
  sectionPaddingX: "inherit",
3346
3407
  sectionBackgroundColor: "#ffffff",
3347
3408
  sectionBackgroundMode: "none",
@@ -3557,6 +3618,22 @@ function parseOptionalPercentNumber2(value) {
3557
3618
  }
3558
3619
  return void 0;
3559
3620
  }
3621
+ function parseOptionalPointNumber(value) {
3622
+ if (typeof value === "number" && Number.isFinite(value)) {
3623
+ return Math.max(0, Math.min(240, Math.round(value)));
3624
+ }
3625
+ if (typeof value === "string") {
3626
+ const trimmed = value.trim();
3627
+ if (!trimmed) {
3628
+ return null;
3629
+ }
3630
+ const parsed = Number(trimmed);
3631
+ if (Number.isFinite(parsed)) {
3632
+ return Math.max(0, Math.min(240, Math.round(parsed)));
3633
+ }
3634
+ }
3635
+ return null;
3636
+ }
3560
3637
  function hexToRgb(value) {
3561
3638
  const normalized = value.trim();
3562
3639
  if (!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(normalized)) {
@@ -3598,13 +3675,41 @@ function getThemeColorOverride(tokens, colorKey) {
3598
3675
  return normalized.length > 0 ? normalized : null;
3599
3676
  }
3600
3677
  var sectionStyleFromBlock = (block, pageDefaults) => {
3678
+ const settings = isRecord6(block.settings) ? block.settings : {};
3679
+ const layoutSettings = isRecord6(settings.layout) ? settings.layout : {};
3680
+ const settingContentWidth = normalizeText2(layoutSettings.contentWidth, "");
3681
+ const settingSectionPaddingY = normalizeText2(layoutSettings.sectionPaddingY, "");
3682
+ const settingSectionPaddingX = normalizeText2(layoutSettings.sectionPaddingX, "");
3601
3683
  const contentWidthRaw = normalizeText2(block.contentWidth, defaultSectionStyle.contentWidth);
3602
- const sectionPaddingRaw = normalizeText2(block.sectionPaddingY, defaultSectionStyle.sectionPaddingY);
3603
- const sectionPaddingXRaw = normalizeText2(block.sectionPaddingX, defaultSectionStyle.sectionPaddingX);
3684
+ const sectionPaddingRaw = normalizeText2(
3685
+ settingSectionPaddingY || block.sectionPaddingY,
3686
+ defaultSectionStyle.sectionPaddingY
3687
+ );
3688
+ const sectionPaddingXRaw = normalizeText2(
3689
+ settingSectionPaddingX || block.sectionPaddingX,
3690
+ defaultSectionStyle.sectionPaddingX
3691
+ );
3604
3692
  const sectionPaddingY = sectionPaddingRaw === "none" || sectionPaddingRaw === "sm" || sectionPaddingRaw === "lg" ? sectionPaddingRaw : "md";
3605
3693
  const sectionPaddingX = sectionPaddingXRaw === "none" || sectionPaddingXRaw === "sm" || sectionPaddingXRaw === "md" || sectionPaddingXRaw === "lg" ? sectionPaddingXRaw : pageDefaults.pageWidthDefault === "full" ? "none" : "md";
3606
- const contentWidth = contentWidthRaw === "narrow" || contentWidthRaw === "content" || contentWidthRaw === "wide" || contentWidthRaw === "full" || contentWidthRaw === "inherit" ? contentWidthRaw : "inherit";
3694
+ const contentWidth = settingContentWidth === "narrow" || settingContentWidth === "content" || settingContentWidth === "wide" || settingContentWidth === "full" || settingContentWidth === "inherit" ? settingContentWidth : contentWidthRaw === "narrow" || contentWidthRaw === "content" || contentWidthRaw === "wide" || contentWidthRaw === "full" || contentWidthRaw === "inherit" ? contentWidthRaw : "inherit";
3607
3695
  const resolvedContentWidth = contentWidth === "inherit" ? pageDefaults.pageWidthDefault : contentWidth;
3696
+ const linkVerticalPadding = typeof layoutSettings.linkVerticalPadding === "boolean" ? layoutSettings.linkVerticalPadding : defaultSectionStyle.linkVerticalPadding;
3697
+ const linkHorizontalPadding = typeof layoutSettings.linkHorizontalPadding === "boolean" ? layoutSettings.linkHorizontalPadding : defaultSectionStyle.linkHorizontalPadding;
3698
+ let customPaddingTop = parseOptionalPointNumber(layoutSettings.paddingTopPt);
3699
+ let customPaddingBottom = parseOptionalPointNumber(layoutSettings.paddingBottomPt);
3700
+ let customPaddingLeft = parseOptionalPointNumber(layoutSettings.paddingLeftPt);
3701
+ let customPaddingRight = parseOptionalPointNumber(layoutSettings.paddingRightPt);
3702
+ if (linkVerticalPadding) {
3703
+ const linkedVertical = customPaddingTop ?? customPaddingBottom;
3704
+ customPaddingTop = linkedVertical;
3705
+ customPaddingBottom = linkedVertical;
3706
+ }
3707
+ if (linkHorizontalPadding) {
3708
+ const linkedHorizontal = customPaddingLeft ?? customPaddingRight;
3709
+ customPaddingLeft = linkedHorizontal;
3710
+ customPaddingRight = linkedHorizontal;
3711
+ }
3712
+ const resolvedSectionPaddingX = customPaddingLeft !== null || customPaddingRight !== null ? "none" : sectionPaddingX;
3608
3713
  const sectionMode = normalizeText2(block.sectionBackgroundMode, defaultSectionStyle.sectionBackgroundMode);
3609
3714
  const sectionColor = parseColor(
3610
3715
  normalizeText2(block.sectionBackgroundColor, ""),
@@ -3652,10 +3757,12 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
3652
3757
  boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)",
3653
3758
  padding: "1rem"
3654
3759
  } : {},
3655
- sectionClass: `orion-builder-shell is-${pageDefaults.pageWidthDefault} padx-${sectionPaddingX}`,
3760
+ sectionClass: `orion-builder-shell is-${pageDefaults.pageWidthDefault} padx-${resolvedSectionPaddingX}`,
3656
3761
  sectionInnerStyle: {
3657
- paddingBottom: sectionPaddingMap[sectionPaddingY],
3658
- paddingTop: sectionPaddingMap[sectionPaddingY]
3762
+ paddingBottom: customPaddingBottom === null ? sectionPaddingMap[sectionPaddingY] : `${customPaddingBottom}pt`,
3763
+ paddingLeft: customPaddingLeft === null ? void 0 : `${customPaddingLeft}pt`,
3764
+ paddingRight: customPaddingRight === null ? void 0 : `${customPaddingRight}pt`,
3765
+ paddingTop: customPaddingTop === null ? sectionPaddingMap[sectionPaddingY] : `${customPaddingTop}pt`
3659
3766
  },
3660
3767
  sectionStyle: sectionMode === "color" ? { background: sectionColor } : sectionMode === "gradient" ? { background: sectionGradient } : block.blockType === "hero" ? { background: "transparent" } : {}
3661
3768
  };
@@ -4409,6 +4516,84 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
4409
4516
  }
4410
4517
  return next;
4411
4518
  };
4519
+ const getByPath2 = (source, path) => {
4520
+ const keys = path.split(".");
4521
+ let cursor = source;
4522
+ for (const key of keys) {
4523
+ if (!isRecord6(cursor)) {
4524
+ return void 0;
4525
+ }
4526
+ cursor = cursor[key];
4527
+ }
4528
+ return cursor;
4529
+ };
4530
+ const clampPaddingPointValue = (value) => {
4531
+ if (value === null || typeof value === "undefined" || value === "") {
4532
+ return null;
4533
+ }
4534
+ if (typeof value === "number" && Number.isFinite(value)) {
4535
+ return Math.max(0, Math.min(240, Math.round(value)));
4536
+ }
4537
+ if (typeof value === "string") {
4538
+ const trimmed = value.trim();
4539
+ if (!trimmed) {
4540
+ return null;
4541
+ }
4542
+ const parsed = Number(trimmed);
4543
+ if (Number.isFinite(parsed)) {
4544
+ return Math.max(0, Math.min(240, Math.round(parsed)));
4545
+ }
4546
+ }
4547
+ return null;
4548
+ };
4549
+ const syncPaddingFields = (settingsSource, path, value) => {
4550
+ let nextSettings = setByPath(settingsSource, path, value);
4551
+ const writePadding = (targetPath, nextValue) => {
4552
+ nextSettings = setByPath(nextSettings, targetPath, clampPaddingPointValue(nextValue));
4553
+ };
4554
+ const readPadding = (targetPath) => clampPaddingPointValue(getByPath2(nextSettings, targetPath));
4555
+ const readLinked = (targetPath) => {
4556
+ const linkedValue = getByPath2(nextSettings, targetPath);
4557
+ return typeof linkedValue === "boolean" ? linkedValue : true;
4558
+ };
4559
+ if (path === "layout.paddingTopPt" || path === "layout.paddingBottomPt") {
4560
+ const normalized = clampPaddingPointValue(value);
4561
+ if (readLinked("layout.linkVerticalPadding")) {
4562
+ writePadding("layout.paddingTopPt", normalized);
4563
+ writePadding("layout.paddingBottomPt", normalized);
4564
+ } else {
4565
+ writePadding(path, normalized);
4566
+ }
4567
+ return nextSettings;
4568
+ }
4569
+ if (path === "layout.paddingLeftPt" || path === "layout.paddingRightPt") {
4570
+ const normalized = clampPaddingPointValue(value);
4571
+ if (readLinked("layout.linkHorizontalPadding")) {
4572
+ writePadding("layout.paddingLeftPt", normalized);
4573
+ writePadding("layout.paddingRightPt", normalized);
4574
+ } else {
4575
+ writePadding(path, normalized);
4576
+ }
4577
+ return nextSettings;
4578
+ }
4579
+ if (path === "layout.linkVerticalPadding") {
4580
+ if (Boolean(value)) {
4581
+ const linkedValue = readPadding("layout.paddingTopPt") ?? readPadding("layout.paddingBottomPt");
4582
+ writePadding("layout.paddingTopPt", linkedValue);
4583
+ writePadding("layout.paddingBottomPt", linkedValue);
4584
+ }
4585
+ return nextSettings;
4586
+ }
4587
+ if (path === "layout.linkHorizontalPadding") {
4588
+ if (Boolean(value)) {
4589
+ const linkedValue = readPadding("layout.paddingLeftPt") ?? readPadding("layout.paddingRightPt");
4590
+ writePadding("layout.paddingLeftPt", linkedValue);
4591
+ writePadding("layout.paddingRightPt", linkedValue);
4592
+ }
4593
+ return nextSettings;
4594
+ }
4595
+ return nextSettings;
4596
+ };
4412
4597
  const updateBlockField = (blockIndex, fieldName, value) => {
4413
4598
  setLayout((current) => {
4414
4599
  const next = cloneBlockLayout(current);
@@ -4425,7 +4610,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
4425
4610
  const next = cloneBlockLayout(current);
4426
4611
  const currentBlock = isRecord6(next[blockIndex]) ? next[blockIndex] : {};
4427
4612
  const currentSettings = isRecord6(currentBlock.settings) ? currentBlock.settings : {};
4428
- const nextSettings = setByPath(currentSettings, path, value);
4613
+ const nextSettings = syncPaddingFields(currentSettings, path, value);
4429
4614
  next[blockIndex] = migrateBlockToSettingsV2({
4430
4615
  ...currentBlock,
4431
4616
  settings: nextSettings
@@ -1,3 +1,3 @@
1
- export { B as BuilderBlockSettingsV2, a as BuilderSettingsPanelMode, b as BuilderThemeTokenOverrides, c as BuilderThemeTokens, d as createDefaultStudioDocument, e as defaultBuilderThemeTokens, l as layoutToStudioDocument, p as pageInspectorPanels, f as pageNodeTypes, g as pagePaletteGroups, h as pageStudioModuleManifest, r as resolveBuilderThemeTokens, s as studioDocumentToLayout } from '../index-DT_Vorvh.mjs';
1
+ export { B as BuilderBlockSettingsV2, a as BuilderSettingsPanelMode, b as BuilderThemeTokenOverrides, c as BuilderThemeTokens, d as createDefaultStudioDocument, e as defaultBuilderThemeTokens, l as layoutToStudioDocument, p as pageInspectorPanels, f as pageNodeTypes, g as pagePaletteGroups, h as pageStudioModuleManifest, r as resolveBuilderThemeTokens, s as studioDocumentToLayout } from '../index-R7hA134j.mjs';
2
2
  import '../index-BIwu3qIH.mjs';
3
3
  import 'payload';
@@ -1,3 +1,3 @@
1
- export { B as BuilderBlockSettingsV2, a as BuilderSettingsPanelMode, b as BuilderThemeTokenOverrides, c as BuilderThemeTokens, d as createDefaultStudioDocument, e as defaultBuilderThemeTokens, l as layoutToStudioDocument, p as pageInspectorPanels, f as pageNodeTypes, g as pagePaletteGroups, h as pageStudioModuleManifest, r as resolveBuilderThemeTokens, s as studioDocumentToLayout } from '../index-BBp-3l6M.js';
1
+ export { B as BuilderBlockSettingsV2, a as BuilderSettingsPanelMode, b as BuilderThemeTokenOverrides, c as BuilderThemeTokens, d as createDefaultStudioDocument, e as defaultBuilderThemeTokens, l as layoutToStudioDocument, p as pageInspectorPanels, f as pageNodeTypes, g as pagePaletteGroups, h as pageStudioModuleManifest, r as resolveBuilderThemeTokens, s as studioDocumentToLayout } from '../index-vjrjy0P4.js';
2
2
  import '../index-BIwu3qIH.js';
3
3
  import 'payload';
@@ -75,6 +75,12 @@ var defaultBuilderBlockSettingsV2 = {
75
75
  },
76
76
  layout: {
77
77
  contentWidth: "inherit",
78
+ linkHorizontalPadding: true,
79
+ linkVerticalPadding: true,
80
+ paddingBottomPt: null,
81
+ paddingLeftPt: null,
82
+ paddingRightPt: null,
83
+ paddingTopPt: null,
78
84
  sectionPaddingX: "inherit",
79
85
  sectionPaddingY: "md"
80
86
  },
@@ -98,6 +104,12 @@ var defaultBuilderBlockSettingsV2 = {
98
104
  var defaultBuilderItemSettingsV2 = {
99
105
  layout: {
100
106
  contentWidth: "inherit",
107
+ linkHorizontalPadding: true,
108
+ linkVerticalPadding: true,
109
+ paddingBottomPt: null,
110
+ paddingLeftPt: null,
111
+ paddingRightPt: null,
112
+ paddingTopPt: null,
101
113
  sectionPaddingX: "inherit",
102
114
  sectionPaddingY: "md"
103
115
  },
@@ -375,30 +387,53 @@ var layoutFieldSet = [
375
387
  },
376
388
  {
377
389
  group: "layout",
378
- key: "settings.layout.sectionPaddingY",
379
- label: "Section Vertical Spacing",
380
- options: [
381
- { label: "None", value: "none" },
382
- { label: "Small", value: "sm" },
383
- { label: "Medium", value: "md" },
384
- { label: "Large", value: "lg" }
385
- ],
386
- tags: ["spacing", "padding"],
387
- type: "select"
390
+ key: "settings.layout.linkVerticalPadding",
391
+ label: "Keep Top and Bottom Equal",
392
+ tags: ["spacing", "padding", "equal", "lock", "vertical"],
393
+ type: "checkbox"
388
394
  },
389
395
  {
390
396
  group: "layout",
391
- key: "settings.layout.sectionPaddingX",
392
- label: "Section Horizontal Spacing",
393
- options: [
394
- { label: "Inherit", value: "inherit" },
395
- { label: "None", value: "none" },
396
- { label: "Small", value: "sm" },
397
- { label: "Medium", value: "md" },
398
- { label: "Large", value: "lg" }
399
- ],
400
- tags: ["spacing", "padding"],
401
- type: "select"
397
+ key: "settings.layout.paddingTopPt",
398
+ label: "Top Padding (pt)",
399
+ max: 240,
400
+ min: 0,
401
+ tags: ["spacing", "padding", "top", "vertical"],
402
+ type: "number"
403
+ },
404
+ {
405
+ group: "layout",
406
+ key: "settings.layout.paddingBottomPt",
407
+ label: "Bottom Padding (pt)",
408
+ max: 240,
409
+ min: 0,
410
+ tags: ["spacing", "padding", "bottom", "vertical"],
411
+ type: "number"
412
+ },
413
+ {
414
+ group: "layout",
415
+ key: "settings.layout.linkHorizontalPadding",
416
+ label: "Keep Left and Right Equal",
417
+ tags: ["spacing", "padding", "equal", "lock", "horizontal"],
418
+ type: "checkbox"
419
+ },
420
+ {
421
+ group: "layout",
422
+ key: "settings.layout.paddingLeftPt",
423
+ label: "Left Padding (pt)",
424
+ max: 240,
425
+ min: 0,
426
+ tags: ["spacing", "padding", "left", "horizontal"],
427
+ type: "number"
428
+ },
429
+ {
430
+ group: "layout",
431
+ key: "settings.layout.paddingRightPt",
432
+ label: "Right Padding (pt)",
433
+ max: 240,
434
+ min: 0,
435
+ tags: ["spacing", "padding", "right", "horizontal"],
436
+ type: "number"
402
437
  }
403
438
  ];
404
439
  var typographyFieldSet = [
@@ -8,7 +8,7 @@ import {
8
8
  pageStudioModuleManifest,
9
9
  resolveBuilderThemeTokens,
10
10
  studioDocumentToLayout
11
- } from "../chunk-2BWLRH75.mjs";
11
+ } from "../chunk-SHC2KLT3.mjs";
12
12
  import "../chunk-SIL2J5MF.mjs";
13
13
  import "../chunk-6BWS3CLP.mjs";
14
14
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-studios/payload-studio",
3
- "version": "0.5.0-beta.90",
3
+ "version": "0.5.0-beta.91",
4
4
  "description": "Unified Payload CMS toolkit for Orion Studios",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",