@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.
- package/dist/blocks/index.js +12 -0
- package/dist/blocks/index.mjs +1 -1
- package/dist/{chunk-NESLJZFE.mjs → chunk-NIRXZKDV.mjs} +1 -0
- package/dist/{chunk-U5BSPWAD.mjs → chunk-Y43T3R2L.mjs} +12 -0
- package/dist/index.js +13 -0
- package/dist/index.mjs +7 -7
- package/dist/studio-pages/builder.css +5 -2
- package/dist/studio-pages/client.js +46 -3
- package/dist/studio-pages/client.mjs +46 -3
- package/dist/studio-pages/index.js +1 -0
- package/dist/studio-pages/index.mjs +1 -1
- package/package.json +1 -1
package/dist/blocks/index.js
CHANGED
|
@@ -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",
|
package/dist/blocks/index.mjs
CHANGED
|
@@ -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
|
-
|
|
12
|
-
} from "./chunk-
|
|
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
|
-
|
|
18
|
-
} from "./chunk-
|
|
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
|
|
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) =>
|
|
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
|
-
|
|
1870
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
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) =>
|
|
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
|
-
|
|
1842
|
-
/* @__PURE__ */ jsxs(
|
|
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(
|