@orion-studios/payload-studio 0.5.0-beta.3 → 0.5.0-beta.5
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/index.mjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
admin_exports
|
|
3
3
|
} from "./chunk-J7W5EE3B.mjs";
|
|
4
|
+
import {
|
|
5
|
+
admin_app_exports
|
|
6
|
+
} from "./chunk-AAOHJDNS.mjs";
|
|
4
7
|
import {
|
|
5
8
|
studio_exports
|
|
6
9
|
} from "./chunk-N67KVM2S.mjs";
|
|
@@ -10,9 +13,6 @@ import {
|
|
|
10
13
|
import {
|
|
11
14
|
nextjs_exports
|
|
12
15
|
} from "./chunk-ZLLNO5FM.mjs";
|
|
13
|
-
import {
|
|
14
|
-
admin_app_exports
|
|
15
|
-
} from "./chunk-AAOHJDNS.mjs";
|
|
16
16
|
import {
|
|
17
17
|
blocks_exports
|
|
18
18
|
} from "./chunk-PC5622T7.mjs";
|
|
@@ -742,11 +742,13 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
|
742
742
|
contentStyle: contentMode === "color" ? {
|
|
743
743
|
background: contentColor,
|
|
744
744
|
borderRadius: 20,
|
|
745
|
-
boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)"
|
|
745
|
+
boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)",
|
|
746
|
+
padding: "1rem"
|
|
746
747
|
} : contentMode === "gradient" ? {
|
|
747
748
|
background: contentGradient,
|
|
748
749
|
borderRadius: 20,
|
|
749
|
-
boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)"
|
|
750
|
+
boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)",
|
|
751
|
+
padding: "1rem"
|
|
750
752
|
} : {},
|
|
751
753
|
sectionClass: `orion-builder-shell is-${pageDefaults.pageWidthDefault}`,
|
|
752
754
|
sectionInnerStyle: {
|
|
@@ -1386,7 +1388,7 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
1386
1388
|
});
|
|
1387
1389
|
const renderWithSectionShell = (block, className, content) => {
|
|
1388
1390
|
const shell = sectionStyleFromBlock(block, pageDefaults);
|
|
1389
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { className: `${className} ${shell.sectionClass}`, style: shell.sectionStyle, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
1391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { className: `${className} ${shell.sectionClass}`, style: shell.sectionStyle, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: shell.sectionInnerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: shell.contentClass, style: shell.contentStyle, children: content }) }) });
|
|
1390
1392
|
};
|
|
1391
1393
|
const sidebarSectionStyle = {
|
|
1392
1394
|
border: "1px solid rgba(13, 74, 55, 0.15)",
|
|
@@ -1728,15 +1730,20 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
1728
1730
|
if (type === "hero") {
|
|
1729
1731
|
const media = resolveMedia(block.media);
|
|
1730
1732
|
const variant = normalizeText(block.variant, "default");
|
|
1731
|
-
const backgroundColor = normalizeText(block.backgroundColor);
|
|
1733
|
+
const backgroundColor = normalizeText(block.backgroundColor).trim();
|
|
1734
|
+
const sectionBackgroundMode = normalizeText(
|
|
1735
|
+
block.sectionBackgroundMode,
|
|
1736
|
+
defaultSectionStyle.sectionBackgroundMode
|
|
1737
|
+
);
|
|
1732
1738
|
const backgroundImageURL = normalizeText(block.backgroundImageURL);
|
|
1733
1739
|
const backgroundImage = backgroundImageURL || media?.url;
|
|
1740
|
+
const hasCustomHeroColor = backgroundColor.length > 0 && backgroundColor.toLowerCase() !== "#124a37";
|
|
1734
1741
|
const mediaStyle = backgroundImage && variant === "default" ? {
|
|
1735
|
-
|
|
1742
|
+
...hasCustomHeroColor ? { backgroundColor } : {},
|
|
1736
1743
|
backgroundImage: `linear-gradient(145deg, rgba(13, 74, 55, 0.34), rgba(13, 74, 55, 0.74)), url('${backgroundImage}')`
|
|
1737
|
-
} : {
|
|
1738
|
-
backgroundColor
|
|
1739
|
-
};
|
|
1744
|
+
} : hasCustomHeroColor && sectionBackgroundMode !== "none" ? {
|
|
1745
|
+
backgroundColor
|
|
1746
|
+
} : {};
|
|
1740
1747
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1741
1748
|
BlockFrame,
|
|
1742
1749
|
{
|
|
@@ -3162,10 +3169,19 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
3162
3169
|
onChange: (event) => updateSelectedField("backgroundColor", event.target.value),
|
|
3163
3170
|
style: { ...sidebarInputStyle, height: 36, padding: 4 },
|
|
3164
3171
|
type: "color",
|
|
3165
|
-
value: parseColor(selectedBlock.backgroundColor, "#
|
|
3172
|
+
value: parseColor(selectedBlock.backgroundColor, "#ffffff")
|
|
3166
3173
|
}
|
|
3167
3174
|
)
|
|
3168
3175
|
] }),
|
|
3176
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
3177
|
+
"button",
|
|
3178
|
+
{
|
|
3179
|
+
onClick: () => updateSelectedField("backgroundColor", ""),
|
|
3180
|
+
style: { borderRadius: 999, cursor: "pointer", fontSize: 12, padding: "7px 10px" },
|
|
3181
|
+
type: "button",
|
|
3182
|
+
children: "Clear Hero Background Color"
|
|
3183
|
+
}
|
|
3184
|
+
),
|
|
3169
3185
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { style: sidebarLabelStyle, children: [
|
|
3170
3186
|
"Upload Hero Background Image",
|
|
3171
3187
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -714,11 +714,13 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
|
714
714
|
contentStyle: contentMode === "color" ? {
|
|
715
715
|
background: contentColor,
|
|
716
716
|
borderRadius: 20,
|
|
717
|
-
boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)"
|
|
717
|
+
boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)",
|
|
718
|
+
padding: "1rem"
|
|
718
719
|
} : contentMode === "gradient" ? {
|
|
719
720
|
background: contentGradient,
|
|
720
721
|
borderRadius: 20,
|
|
721
|
-
boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)"
|
|
722
|
+
boxShadow: "0 8px 20px rgba(13, 74, 55, 0.08)",
|
|
723
|
+
padding: "1rem"
|
|
722
724
|
} : {},
|
|
723
725
|
sectionClass: `orion-builder-shell is-${pageDefaults.pageWidthDefault}`,
|
|
724
726
|
sectionInnerStyle: {
|
|
@@ -1358,7 +1360,7 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
1358
1360
|
});
|
|
1359
1361
|
const renderWithSectionShell = (block, className, content) => {
|
|
1360
1362
|
const shell = sectionStyleFromBlock(block, pageDefaults);
|
|
1361
|
-
return /* @__PURE__ */ jsx("section", { className: `${className} ${shell.sectionClass}`, style: shell.sectionStyle, children: /* @__PURE__ */ jsx("div", {
|
|
1363
|
+
return /* @__PURE__ */ jsx("section", { className: `${className} ${shell.sectionClass}`, style: shell.sectionStyle, children: /* @__PURE__ */ jsx("div", { style: shell.sectionInnerStyle, children: /* @__PURE__ */ jsx("div", { className: shell.contentClass, style: shell.contentStyle, children: content }) }) });
|
|
1362
1364
|
};
|
|
1363
1365
|
const sidebarSectionStyle = {
|
|
1364
1366
|
border: "1px solid rgba(13, 74, 55, 0.15)",
|
|
@@ -1700,15 +1702,20 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
1700
1702
|
if (type === "hero") {
|
|
1701
1703
|
const media = resolveMedia(block.media);
|
|
1702
1704
|
const variant = normalizeText(block.variant, "default");
|
|
1703
|
-
const backgroundColor = normalizeText(block.backgroundColor);
|
|
1705
|
+
const backgroundColor = normalizeText(block.backgroundColor).trim();
|
|
1706
|
+
const sectionBackgroundMode = normalizeText(
|
|
1707
|
+
block.sectionBackgroundMode,
|
|
1708
|
+
defaultSectionStyle.sectionBackgroundMode
|
|
1709
|
+
);
|
|
1704
1710
|
const backgroundImageURL = normalizeText(block.backgroundImageURL);
|
|
1705
1711
|
const backgroundImage = backgroundImageURL || media?.url;
|
|
1712
|
+
const hasCustomHeroColor = backgroundColor.length > 0 && backgroundColor.toLowerCase() !== "#124a37";
|
|
1706
1713
|
const mediaStyle = backgroundImage && variant === "default" ? {
|
|
1707
|
-
|
|
1714
|
+
...hasCustomHeroColor ? { backgroundColor } : {},
|
|
1708
1715
|
backgroundImage: `linear-gradient(145deg, rgba(13, 74, 55, 0.34), rgba(13, 74, 55, 0.74)), url('${backgroundImage}')`
|
|
1709
|
-
} : {
|
|
1710
|
-
backgroundColor
|
|
1711
|
-
};
|
|
1716
|
+
} : hasCustomHeroColor && sectionBackgroundMode !== "none" ? {
|
|
1717
|
+
backgroundColor
|
|
1718
|
+
} : {};
|
|
1712
1719
|
return /* @__PURE__ */ jsx(
|
|
1713
1720
|
BlockFrame,
|
|
1714
1721
|
{
|
|
@@ -3134,10 +3141,19 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
3134
3141
|
onChange: (event) => updateSelectedField("backgroundColor", event.target.value),
|
|
3135
3142
|
style: { ...sidebarInputStyle, height: 36, padding: 4 },
|
|
3136
3143
|
type: "color",
|
|
3137
|
-
value: parseColor(selectedBlock.backgroundColor, "#
|
|
3144
|
+
value: parseColor(selectedBlock.backgroundColor, "#ffffff")
|
|
3138
3145
|
}
|
|
3139
3146
|
)
|
|
3140
3147
|
] }),
|
|
3148
|
+
/* @__PURE__ */ jsx(
|
|
3149
|
+
"button",
|
|
3150
|
+
{
|
|
3151
|
+
onClick: () => updateSelectedField("backgroundColor", ""),
|
|
3152
|
+
style: { borderRadius: 999, cursor: "pointer", fontSize: 12, padding: "7px 10px" },
|
|
3153
|
+
type: "button",
|
|
3154
|
+
children: "Clear Hero Background Color"
|
|
3155
|
+
}
|
|
3156
|
+
),
|
|
3141
3157
|
/* @__PURE__ */ jsxs("label", { style: sidebarLabelStyle, children: [
|
|
3142
3158
|
"Upload Hero Background Image",
|
|
3143
3159
|
/* @__PURE__ */ jsx(
|