@orion-studios/payload-studio 0.5.0-beta.11 → 0.5.0-beta.12

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.
@@ -565,6 +565,18 @@ var HeroBlock = {
565
565
  description: "How the hero image should be sized within the section."
566
566
  }
567
567
  },
568
+ {
569
+ name: "backgroundImageCornerStyle",
570
+ type: "select",
571
+ defaultValue: "rounded",
572
+ options: [
573
+ { label: "Rounded", value: "rounded" },
574
+ { label: "Square", value: "square" }
575
+ ],
576
+ admin: {
577
+ description: "How the hero image corners should appear."
578
+ }
579
+ },
568
580
  {
569
581
  name: "backgroundImagePosition",
570
582
  type: "select",
@@ -17,7 +17,7 @@ import {
17
17
  defaultPageLayoutBlocks,
18
18
  sectionPresets,
19
19
  templateStarterPresets
20
- } from "../chunk-U5BSPWAD.mjs";
20
+ } from "../chunk-Y43T3R2L.mjs";
21
21
  import "../chunk-ETRRXURT.mjs";
22
22
  import "../chunk-6BWS3CLP.mjs";
23
23
  export {
@@ -71,6 +71,7 @@ var defaultNodeData = {
71
71
  hero: {
72
72
  ...withSectionStyleDefaults({}),
73
73
  backgroundColor: "",
74
+ backgroundImageCornerStyle: "rounded",
74
75
  backgroundImageFit: "cover",
75
76
  backgroundImagePosition: "center",
76
77
  headline: "New Hero Section",
@@ -415,6 +415,18 @@ var HeroBlock = {
415
415
  description: "How the hero image should be sized within the section."
416
416
  }
417
417
  },
418
+ {
419
+ name: "backgroundImageCornerStyle",
420
+ type: "select",
421
+ defaultValue: "rounded",
422
+ options: [
423
+ { label: "Rounded", value: "rounded" },
424
+ { label: "Square", value: "square" }
425
+ ],
426
+ admin: {
427
+ description: "How the hero image corners should appear."
428
+ }
429
+ },
418
430
  {
419
431
  name: "backgroundImagePosition",
420
432
  type: "select",
package/dist/index.js CHANGED
@@ -909,6 +909,18 @@ var HeroBlock = {
909
909
  description: "How the hero image should be sized within the section."
910
910
  }
911
911
  },
912
+ {
913
+ name: "backgroundImageCornerStyle",
914
+ type: "select",
915
+ defaultValue: "rounded",
916
+ options: [
917
+ { label: "Rounded", value: "rounded" },
918
+ { label: "Square", value: "square" }
919
+ ],
920
+ admin: {
921
+ description: "How the hero image corners should appear."
922
+ }
923
+ },
912
924
  {
913
925
  name: "backgroundImagePosition",
914
926
  type: "select",
@@ -1931,6 +1943,7 @@ var defaultNodeData = {
1931
1943
  hero: {
1932
1944
  ...withSectionStyleDefaults({}),
1933
1945
  backgroundColor: "",
1946
+ backgroundImageCornerStyle: "rounded",
1934
1947
  backgroundImageFit: "cover",
1935
1948
  backgroundImagePosition: "center",
1936
1949
  headline: "New Hero Section",
package/dist/index.mjs CHANGED
@@ -1,6 +1,3 @@
1
- import {
2
- admin_app_exports
3
- } from "./chunk-AAOHJDNS.mjs";
4
1
  import {
5
2
  admin_exports
6
3
  } from "./chunk-J7W5EE3B.mjs";
@@ -8,14 +5,17 @@ import {
8
5
  studio_exports
9
6
  } from "./chunk-N67KVM2S.mjs";
10
7
  import {
11
- blocks_exports
12
- } from "./chunk-U5BSPWAD.mjs";
8
+ admin_app_exports
9
+ } from "./chunk-AAOHJDNS.mjs";
10
+ import {
11
+ studio_pages_exports
12
+ } from "./chunk-NIRXZKDV.mjs";
13
13
  import {
14
14
  nextjs_exports
15
15
  } from "./chunk-ZLLNO5FM.mjs";
16
16
  import {
17
- studio_pages_exports
18
- } from "./chunk-NESLJZFE.mjs";
17
+ blocks_exports
18
+ } from "./chunk-Y43T3R2L.mjs";
19
19
  import "./chunk-ETRRXURT.mjs";
20
20
  import "./chunk-6BWS3CLP.mjs";
21
21
  export {
@@ -88,12 +88,12 @@ h4 {
88
88
  padding: 0;
89
89
  }
90
90
 
91
- .orion-builder-shell.hero {
91
+ .orion-builder-shell .hero {
92
92
  margin: 0;
93
93
  background: transparent;
94
94
  }
95
95
 
96
- .orion-builder-shell.hero .hero-media {
96
+ .orion-builder-shell .hero-media {
97
97
  background: transparent;
98
98
  }
99
99
 
@@ -154,11 +154,14 @@ h4 {
154
154
 
155
155
  .hero-grid {
156
156
  display: grid;
157
+ border-radius: inherit;
158
+ overflow: hidden;
157
159
  }
158
160
 
159
161
  .hero-media {
160
162
  min-height: 360px;
161
163
  background: transparent;
164
+ border-radius: inherit;
162
165
  }
163
166
 
164
167
  .hero-content {
@@ -108,6 +108,7 @@ var defaultNodeData = {
108
108
  hero: {
109
109
  ...withSectionStyleDefaults({}),
110
110
  backgroundColor: "",
111
+ backgroundImageCornerStyle: "rounded",
111
112
  backgroundImageFit: "cover",
112
113
  backgroundImagePosition: "center",
113
114
  headline: "New Hero Section",
@@ -455,7 +456,22 @@ var resolveMedia = (value) => {
455
456
  }
456
457
  return null;
457
458
  };
458
- var normalizeHeroImageFit = (value) => value === "contain" ? "contain" : "cover";
459
+ var normalizeHeroImageFit = (value) => {
460
+ if (value === "contain" || value === "contain-square") {
461
+ return "contain";
462
+ }
463
+ return "cover";
464
+ };
465
+ var normalizeHeroImageCornerStyle = (value, legacyFitValue) => {
466
+ if (value === "rounded" || value === "square") {
467
+ return value;
468
+ }
469
+ if (legacyFitValue === "cover-square" || legacyFitValue === "contain-square") {
470
+ return "square";
471
+ }
472
+ return "rounded";
473
+ };
474
+ var getHeroImageCornerRadius = (cornerStyle) => cornerStyle === "square" ? "0px" : "var(--orion-studio-radius-lg)";
459
475
  var normalizeHeroImagePosition = (value) => {
460
476
  if (value === "top" || value === "bottom" || value === "left" || value === "right") {
461
477
  return value;
@@ -600,6 +616,7 @@ function getDefaultBlock(blockType) {
600
616
  case "hero":
601
617
  return withSectionStyleDefaults2({
602
618
  backgroundColor: "",
619
+ backgroundImageCornerStyle: "rounded",
603
620
  backgroundImageFit: "cover",
604
621
  backgroundImagePosition: "center",
605
622
  blockType: "hero",
@@ -1837,7 +1854,12 @@ function BuilderPageEditor({ initialDoc, pageID }) {
1837
1854
  const variant = normalizeText(block.variant, "default");
1838
1855
  const backgroundColor = normalizeText(block.backgroundColor).trim();
1839
1856
  const backgroundImageFit = normalizeHeroImageFit(block.backgroundImageFit);
1857
+ const backgroundImageCornerStyle = normalizeHeroImageCornerStyle(
1858
+ block.backgroundImageCornerStyle,
1859
+ block.backgroundImageFit
1860
+ );
1840
1861
  const backgroundImagePosition = normalizeHeroImagePosition(block.backgroundImagePosition);
1862
+ const heroCornerRadius = getHeroImageCornerRadius(backgroundImageCornerStyle);
1841
1863
  const sectionBackgroundMode = normalizeText(
1842
1864
  block.sectionBackgroundMode,
1843
1865
  defaultSectionStyle.sectionBackgroundMode
@@ -1854,6 +1876,9 @@ function BuilderPageEditor({ initialDoc, pageID }) {
1854
1876
  } : hasCustomHeroColor && sectionBackgroundMode !== "none" ? {
1855
1877
  backgroundColor
1856
1878
  } : {};
1879
+ const heroStyle = {
1880
+ borderRadius: heroCornerRadius
1881
+ };
1857
1882
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1858
1883
  BlockFrame,
1859
1884
  {
@@ -1866,8 +1891,8 @@ function BuilderPageEditor({ initialDoc, pageID }) {
1866
1891
  setDragIndex,
1867
1892
  children: renderWithSectionShell(
1868
1893
  block,
1869
- `hero ${variant === "centered" ? "hero-centered" : ""}`,
1870
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1894
+ "",
1895
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: `hero ${variant === "centered" ? "hero-centered" : ""}`, style: heroStyle, children: [
1871
1896
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "hero-grid", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "hero-media", role: "img", style: mediaStyle }) }),
1872
1897
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "hero-content", children: [
1873
1898
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "kicker", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -3327,6 +3352,24 @@ function BuilderPageEditor({ initialDoc, pageID }) {
3327
3352
  }
3328
3353
  )
3329
3354
  ] }),
3355
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { style: sidebarLabelStyle, children: [
3356
+ "Image Corners",
3357
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
3358
+ "select",
3359
+ {
3360
+ onChange: (event) => updateSelectedField("backgroundImageCornerStyle", event.target.value),
3361
+ style: sidebarInputStyle,
3362
+ value: normalizeHeroImageCornerStyle(
3363
+ selectedBlock.backgroundImageCornerStyle,
3364
+ selectedBlock.backgroundImageFit
3365
+ ),
3366
+ children: [
3367
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "rounded", children: "Rounded" }),
3368
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "square", children: "Square" })
3369
+ ]
3370
+ }
3371
+ )
3372
+ ] }),
3330
3373
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { style: sidebarLabelStyle, children: [
3331
3374
  "Image Position",
3332
3375
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
@@ -80,6 +80,7 @@ var defaultNodeData = {
80
80
  hero: {
81
81
  ...withSectionStyleDefaults({}),
82
82
  backgroundColor: "",
83
+ backgroundImageCornerStyle: "rounded",
83
84
  backgroundImageFit: "cover",
84
85
  backgroundImagePosition: "center",
85
86
  headline: "New Hero Section",
@@ -427,7 +428,22 @@ var resolveMedia = (value) => {
427
428
  }
428
429
  return null;
429
430
  };
430
- var normalizeHeroImageFit = (value) => value === "contain" ? "contain" : "cover";
431
+ var normalizeHeroImageFit = (value) => {
432
+ if (value === "contain" || value === "contain-square") {
433
+ return "contain";
434
+ }
435
+ return "cover";
436
+ };
437
+ var normalizeHeroImageCornerStyle = (value, legacyFitValue) => {
438
+ if (value === "rounded" || value === "square") {
439
+ return value;
440
+ }
441
+ if (legacyFitValue === "cover-square" || legacyFitValue === "contain-square") {
442
+ return "square";
443
+ }
444
+ return "rounded";
445
+ };
446
+ var getHeroImageCornerRadius = (cornerStyle) => cornerStyle === "square" ? "0px" : "var(--orion-studio-radius-lg)";
431
447
  var normalizeHeroImagePosition = (value) => {
432
448
  if (value === "top" || value === "bottom" || value === "left" || value === "right") {
433
449
  return value;
@@ -572,6 +588,7 @@ function getDefaultBlock(blockType) {
572
588
  case "hero":
573
589
  return withSectionStyleDefaults2({
574
590
  backgroundColor: "",
591
+ backgroundImageCornerStyle: "rounded",
575
592
  backgroundImageFit: "cover",
576
593
  backgroundImagePosition: "center",
577
594
  blockType: "hero",
@@ -1809,7 +1826,12 @@ function BuilderPageEditor({ initialDoc, pageID }) {
1809
1826
  const variant = normalizeText(block.variant, "default");
1810
1827
  const backgroundColor = normalizeText(block.backgroundColor).trim();
1811
1828
  const backgroundImageFit = normalizeHeroImageFit(block.backgroundImageFit);
1829
+ const backgroundImageCornerStyle = normalizeHeroImageCornerStyle(
1830
+ block.backgroundImageCornerStyle,
1831
+ block.backgroundImageFit
1832
+ );
1812
1833
  const backgroundImagePosition = normalizeHeroImagePosition(block.backgroundImagePosition);
1834
+ const heroCornerRadius = getHeroImageCornerRadius(backgroundImageCornerStyle);
1813
1835
  const sectionBackgroundMode = normalizeText(
1814
1836
  block.sectionBackgroundMode,
1815
1837
  defaultSectionStyle.sectionBackgroundMode
@@ -1826,6 +1848,9 @@ function BuilderPageEditor({ initialDoc, pageID }) {
1826
1848
  } : hasCustomHeroColor && sectionBackgroundMode !== "none" ? {
1827
1849
  backgroundColor
1828
1850
  } : {};
1851
+ const heroStyle = {
1852
+ borderRadius: heroCornerRadius
1853
+ };
1829
1854
  return /* @__PURE__ */ jsx(
1830
1855
  BlockFrame,
1831
1856
  {
@@ -1838,8 +1863,8 @@ function BuilderPageEditor({ initialDoc, pageID }) {
1838
1863
  setDragIndex,
1839
1864
  children: renderWithSectionShell(
1840
1865
  block,
1841
- `hero ${variant === "centered" ? "hero-centered" : ""}`,
1842
- /* @__PURE__ */ jsxs(Fragment, { children: [
1866
+ "",
1867
+ /* @__PURE__ */ jsxs("section", { className: `hero ${variant === "centered" ? "hero-centered" : ""}`, style: heroStyle, children: [
1843
1868
  /* @__PURE__ */ jsx("div", { className: "hero-grid", children: /* @__PURE__ */ jsx("div", { className: "hero-media", role: "img", style: mediaStyle }) }),
1844
1869
  /* @__PURE__ */ jsxs("div", { className: "hero-content", children: [
1845
1870
  /* @__PURE__ */ jsx("div", { className: "kicker", children: /* @__PURE__ */ jsx(
@@ -3299,6 +3324,24 @@ function BuilderPageEditor({ initialDoc, pageID }) {
3299
3324
  }
3300
3325
  )
3301
3326
  ] }),
3327
+ /* @__PURE__ */ jsxs("label", { style: sidebarLabelStyle, children: [
3328
+ "Image Corners",
3329
+ /* @__PURE__ */ jsxs(
3330
+ "select",
3331
+ {
3332
+ onChange: (event) => updateSelectedField("backgroundImageCornerStyle", event.target.value),
3333
+ style: sidebarInputStyle,
3334
+ value: normalizeHeroImageCornerStyle(
3335
+ selectedBlock.backgroundImageCornerStyle,
3336
+ selectedBlock.backgroundImageFit
3337
+ ),
3338
+ children: [
3339
+ /* @__PURE__ */ jsx("option", { value: "rounded", children: "Rounded" }),
3340
+ /* @__PURE__ */ jsx("option", { value: "square", children: "Square" })
3341
+ ]
3342
+ }
3343
+ )
3344
+ ] }),
3302
3345
  /* @__PURE__ */ jsxs("label", { style: sidebarLabelStyle, children: [
3303
3346
  "Image Position",
3304
3347
  /* @__PURE__ */ jsxs(
@@ -105,6 +105,7 @@ var defaultNodeData = {
105
105
  hero: {
106
106
  ...withSectionStyleDefaults({}),
107
107
  backgroundColor: "",
108
+ backgroundImageCornerStyle: "rounded",
108
109
  backgroundImageFit: "cover",
109
110
  backgroundImagePosition: "center",
110
111
  headline: "New Hero Section",
@@ -6,7 +6,7 @@ import {
6
6
  pagePaletteGroups,
7
7
  pageStudioModuleManifest,
8
8
  studioDocumentToLayout
9
- } from "../chunk-NESLJZFE.mjs";
9
+ } from "../chunk-NIRXZKDV.mjs";
10
10
  import "../chunk-ETRRXURT.mjs";
11
11
  import "../chunk-6BWS3CLP.mjs";
12
12
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-studios/payload-studio",
3
- "version": "0.5.0-beta.11",
3
+ "version": "0.5.0-beta.12",
4
4
  "description": "Unified Payload CMS toolkit for Orion Studios",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {