@orion-studios/payload-studio 0.6.0-beta.36 → 0.6.0-beta.38
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/admin/client.js
CHANGED
|
@@ -4213,6 +4213,42 @@ var getPageIDFromPathname = (pathname) => {
|
|
|
4213
4213
|
const pagePart = pathname.slice(markerIndex + marker.length).split("/")[0];
|
|
4214
4214
|
return pagePart ? decodeURIComponent(pagePart) : null;
|
|
4215
4215
|
};
|
|
4216
|
+
function PageEditorBreadcrumbs({
|
|
4217
|
+
pageID,
|
|
4218
|
+
pagesPath
|
|
4219
|
+
}) {
|
|
4220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
4221
|
+
"nav",
|
|
4222
|
+
{
|
|
4223
|
+
"aria-label": "Breadcrumb",
|
|
4224
|
+
style: {
|
|
4225
|
+
alignItems: "center",
|
|
4226
|
+
color: "var(--orion-admin-muted)",
|
|
4227
|
+
display: "flex",
|
|
4228
|
+
flexWrap: "wrap",
|
|
4229
|
+
fontSize: "0.8rem",
|
|
4230
|
+
fontWeight: 800,
|
|
4231
|
+
gap: "0.35rem",
|
|
4232
|
+
marginBottom: "0.25rem"
|
|
4233
|
+
},
|
|
4234
|
+
children: [
|
|
4235
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4236
|
+
"a",
|
|
4237
|
+
{
|
|
4238
|
+
href: pagesPath,
|
|
4239
|
+
style: {
|
|
4240
|
+
color: "var(--orion-admin-accent)",
|
|
4241
|
+
textDecoration: "none"
|
|
4242
|
+
},
|
|
4243
|
+
children: "Pages"
|
|
4244
|
+
}
|
|
4245
|
+
),
|
|
4246
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { "aria-hidden": "true", children: "/" }),
|
|
4247
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: pageID ? `Page ${pageID}` : "Page Editor" })
|
|
4248
|
+
]
|
|
4249
|
+
}
|
|
4250
|
+
);
|
|
4251
|
+
}
|
|
4216
4252
|
function AdminStudioPageEditView(props) {
|
|
4217
4253
|
const { user } = (0, import_ui6.useAuth)();
|
|
4218
4254
|
const adminBasePath = useAdminBasePath();
|
|
@@ -4389,6 +4425,7 @@ function AdminStudioPageEditView(props) {
|
|
|
4389
4425
|
},
|
|
4390
4426
|
children: [
|
|
4391
4427
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { style: { minWidth: 0 }, children: [
|
|
4428
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PageEditorBreadcrumbs, { pageID, pagesPath }),
|
|
4392
4429
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { style: { color: "var(--orion-admin-text)", fontWeight: 900 }, children: "Page Editor" }),
|
|
4393
4430
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
4394
4431
|
"div",
|
package/dist/admin/client.mjs
CHANGED
|
@@ -2833,6 +2833,42 @@ var getPageIDFromPathname = (pathname) => {
|
|
|
2833
2833
|
const pagePart = pathname.slice(markerIndex + marker.length).split("/")[0];
|
|
2834
2834
|
return pagePart ? decodeURIComponent(pagePart) : null;
|
|
2835
2835
|
};
|
|
2836
|
+
function PageEditorBreadcrumbs({
|
|
2837
|
+
pageID,
|
|
2838
|
+
pagesPath
|
|
2839
|
+
}) {
|
|
2840
|
+
return /* @__PURE__ */ jsxs16(
|
|
2841
|
+
"nav",
|
|
2842
|
+
{
|
|
2843
|
+
"aria-label": "Breadcrumb",
|
|
2844
|
+
style: {
|
|
2845
|
+
alignItems: "center",
|
|
2846
|
+
color: "var(--orion-admin-muted)",
|
|
2847
|
+
display: "flex",
|
|
2848
|
+
flexWrap: "wrap",
|
|
2849
|
+
fontSize: "0.8rem",
|
|
2850
|
+
fontWeight: 800,
|
|
2851
|
+
gap: "0.35rem",
|
|
2852
|
+
marginBottom: "0.25rem"
|
|
2853
|
+
},
|
|
2854
|
+
children: [
|
|
2855
|
+
/* @__PURE__ */ jsx19(
|
|
2856
|
+
"a",
|
|
2857
|
+
{
|
|
2858
|
+
href: pagesPath,
|
|
2859
|
+
style: {
|
|
2860
|
+
color: "var(--orion-admin-accent)",
|
|
2861
|
+
textDecoration: "none"
|
|
2862
|
+
},
|
|
2863
|
+
children: "Pages"
|
|
2864
|
+
}
|
|
2865
|
+
),
|
|
2866
|
+
/* @__PURE__ */ jsx19("span", { "aria-hidden": "true", children: "/" }),
|
|
2867
|
+
/* @__PURE__ */ jsx19("span", { children: pageID ? `Page ${pageID}` : "Page Editor" })
|
|
2868
|
+
]
|
|
2869
|
+
}
|
|
2870
|
+
);
|
|
2871
|
+
}
|
|
2836
2872
|
function AdminStudioPageEditView(props) {
|
|
2837
2873
|
const { user } = useAuth4();
|
|
2838
2874
|
const adminBasePath = useAdminBasePath();
|
|
@@ -3009,6 +3045,7 @@ function AdminStudioPageEditView(props) {
|
|
|
3009
3045
|
},
|
|
3010
3046
|
children: [
|
|
3011
3047
|
/* @__PURE__ */ jsxs16("div", { style: { minWidth: 0 }, children: [
|
|
3048
|
+
/* @__PURE__ */ jsx19(PageEditorBreadcrumbs, { pageID, pagesPath }),
|
|
3012
3049
|
/* @__PURE__ */ jsx19("div", { style: { color: "var(--orion-admin-text)", fontWeight: 900 }, children: "Page Editor" }),
|
|
3013
3050
|
/* @__PURE__ */ jsxs16(
|
|
3014
3051
|
"div",
|
|
@@ -962,6 +962,7 @@ var sectionPaddingPointMap = {
|
|
|
962
962
|
md: 31,
|
|
963
963
|
lg: 41
|
|
964
964
|
};
|
|
965
|
+
var heroDefaultPaddingPt = 30;
|
|
965
966
|
var normalizeSectionPaddingY = (value) => value === "none" || value === "sm" || value === "lg" ? value : "md";
|
|
966
967
|
var normalizePaddingPointValue = (value) => {
|
|
967
968
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
@@ -982,7 +983,7 @@ var getEffectiveVerticalPaddingValue = (block, key) => {
|
|
|
982
983
|
}
|
|
983
984
|
const layoutSectionPaddingY = getByPath(block, "settings.layout.sectionPaddingY");
|
|
984
985
|
const legacySectionPaddingY = block.sectionPaddingY;
|
|
985
|
-
const inherited = sectionPaddingPointMap[normalizeSectionPaddingY(layoutSectionPaddingY || legacySectionPaddingY)];
|
|
986
|
+
const inherited = block.blockType === "hero" ? heroDefaultPaddingPt : sectionPaddingPointMap[normalizeSectionPaddingY(layoutSectionPaddingY || legacySectionPaddingY)];
|
|
986
987
|
return inherited;
|
|
987
988
|
};
|
|
988
989
|
var getRelationID = (value) => {
|
|
@@ -3965,6 +3966,7 @@ var sectionPaddingMap = {
|
|
|
3965
3966
|
md: "2.6rem",
|
|
3966
3967
|
lg: "3.4rem"
|
|
3967
3968
|
};
|
|
3969
|
+
var heroDefaultPadding = "30pt";
|
|
3968
3970
|
var quickAddBlockTypes = [
|
|
3969
3971
|
"hero",
|
|
3970
3972
|
"featureGrid",
|
|
@@ -4319,10 +4321,10 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
|
4319
4321
|
} : {},
|
|
4320
4322
|
sectionClass: `orion-builder-shell is-${pageDefaults.pageWidthDefault} padx-${resolvedSectionPaddingX}`,
|
|
4321
4323
|
sectionInnerStyle: {
|
|
4322
|
-
paddingBottom: customPaddingBottom === null ? sectionPaddingMap[sectionPaddingY] : `${customPaddingBottom}pt`,
|
|
4324
|
+
paddingBottom: customPaddingBottom === null ? block.blockType === "hero" ? heroDefaultPadding : sectionPaddingMap[sectionPaddingY] : `${customPaddingBottom}pt`,
|
|
4323
4325
|
paddingLeft: customPaddingLeft === null ? void 0 : `${customPaddingLeft}pt`,
|
|
4324
4326
|
paddingRight: customPaddingRight === null ? void 0 : `${customPaddingRight}pt`,
|
|
4325
|
-
paddingTop: customPaddingTop === null ? sectionPaddingMap[sectionPaddingY] : `${customPaddingTop}pt`
|
|
4327
|
+
paddingTop: customPaddingTop === null ? block.blockType === "hero" ? heroDefaultPadding : sectionPaddingMap[sectionPaddingY] : `${customPaddingTop}pt`
|
|
4326
4328
|
},
|
|
4327
4329
|
sectionStyle: sectionMode === "color" ? { background: sectionColor } : sectionMode === "gradient" ? { background: sectionGradient } : block.blockType === "hero" ? { background: "transparent" } : {}
|
|
4328
4330
|
};
|
|
@@ -935,6 +935,7 @@ var sectionPaddingPointMap = {
|
|
|
935
935
|
md: 31,
|
|
936
936
|
lg: 41
|
|
937
937
|
};
|
|
938
|
+
var heroDefaultPaddingPt = 30;
|
|
938
939
|
var normalizeSectionPaddingY = (value) => value === "none" || value === "sm" || value === "lg" ? value : "md";
|
|
939
940
|
var normalizePaddingPointValue = (value) => {
|
|
940
941
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
@@ -955,7 +956,7 @@ var getEffectiveVerticalPaddingValue = (block, key) => {
|
|
|
955
956
|
}
|
|
956
957
|
const layoutSectionPaddingY = getByPath(block, "settings.layout.sectionPaddingY");
|
|
957
958
|
const legacySectionPaddingY = block.sectionPaddingY;
|
|
958
|
-
const inherited = sectionPaddingPointMap[normalizeSectionPaddingY(layoutSectionPaddingY || legacySectionPaddingY)];
|
|
959
|
+
const inherited = block.blockType === "hero" ? heroDefaultPaddingPt : sectionPaddingPointMap[normalizeSectionPaddingY(layoutSectionPaddingY || legacySectionPaddingY)];
|
|
959
960
|
return inherited;
|
|
960
961
|
};
|
|
961
962
|
var getRelationID = (value) => {
|
|
@@ -3845,6 +3846,7 @@ var sectionPaddingMap = {
|
|
|
3845
3846
|
md: "2.6rem",
|
|
3846
3847
|
lg: "3.4rem"
|
|
3847
3848
|
};
|
|
3849
|
+
var heroDefaultPadding = "30pt";
|
|
3848
3850
|
var quickAddBlockTypes = [
|
|
3849
3851
|
"hero",
|
|
3850
3852
|
"featureGrid",
|
|
@@ -4199,10 +4201,10 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
|
4199
4201
|
} : {},
|
|
4200
4202
|
sectionClass: `orion-builder-shell is-${pageDefaults.pageWidthDefault} padx-${resolvedSectionPaddingX}`,
|
|
4201
4203
|
sectionInnerStyle: {
|
|
4202
|
-
paddingBottom: customPaddingBottom === null ? sectionPaddingMap[sectionPaddingY] : `${customPaddingBottom}pt`,
|
|
4204
|
+
paddingBottom: customPaddingBottom === null ? block.blockType === "hero" ? heroDefaultPadding : sectionPaddingMap[sectionPaddingY] : `${customPaddingBottom}pt`,
|
|
4203
4205
|
paddingLeft: customPaddingLeft === null ? void 0 : `${customPaddingLeft}pt`,
|
|
4204
4206
|
paddingRight: customPaddingRight === null ? void 0 : `${customPaddingRight}pt`,
|
|
4205
|
-
paddingTop: customPaddingTop === null ? sectionPaddingMap[sectionPaddingY] : `${customPaddingTop}pt`
|
|
4207
|
+
paddingTop: customPaddingTop === null ? block.blockType === "hero" ? heroDefaultPadding : sectionPaddingMap[sectionPaddingY] : `${customPaddingTop}pt`
|
|
4206
4208
|
},
|
|
4207
4209
|
sectionStyle: sectionMode === "color" ? { background: sectionColor } : sectionMode === "gradient" ? { background: sectionGradient } : block.blockType === "hero" ? { background: "transparent" } : {}
|
|
4208
4210
|
};
|
package/package.json
CHANGED