@orion-studios/payload-studio 0.6.0-beta.21 → 0.6.0-beta.23
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
|
@@ -4042,6 +4042,7 @@ function AdminStudioDashboard(rawProps) {
|
|
|
4042
4042
|
// src/admin/components/studio/AdminStudioPagesListView.tsx
|
|
4043
4043
|
var import_react19 = require("react");
|
|
4044
4044
|
var import_link2 = __toESM(require("next/link"));
|
|
4045
|
+
var import_navigation3 = require("next/navigation");
|
|
4045
4046
|
var import_ui7 = require("@payloadcms/ui");
|
|
4046
4047
|
|
|
4047
4048
|
// src/admin/components/studio/AdminStudioNewPageView.tsx
|
|
@@ -4533,13 +4534,7 @@ var getPropString5 = (props, key, fallback) => {
|
|
|
4533
4534
|
};
|
|
4534
4535
|
function AdminStudioPagesListView(props) {
|
|
4535
4536
|
const adminBasePath = useAdminBasePath();
|
|
4536
|
-
const
|
|
4537
|
-
(0, import_react19.useEffect)(() => {
|
|
4538
|
-
const updatePathname = () => setPathname(window.location.pathname);
|
|
4539
|
-
updatePathname();
|
|
4540
|
-
window.addEventListener("popstate", updatePathname);
|
|
4541
|
-
return () => window.removeEventListener("popstate", updatePathname);
|
|
4542
|
-
}, []);
|
|
4537
|
+
const pathname = (0, import_navigation3.usePathname)();
|
|
4543
4538
|
const pagesPath = resolveAdminPath(adminBasePath, "/pages");
|
|
4544
4539
|
const nestedPagePath = pathname && pathname.startsWith(`${pagesPath}/`) ? pathname.slice(`${pagesPath}/`.length).split("/")[0] : "";
|
|
4545
4540
|
if (nestedPagePath === "new") {
|
|
@@ -6897,7 +6892,7 @@ function MediaListItem({
|
|
|
6897
6892
|
|
|
6898
6893
|
// src/admin-app/components/MediaUploadForm.tsx
|
|
6899
6894
|
var import_react27 = require("react");
|
|
6900
|
-
var
|
|
6895
|
+
var import_navigation4 = require("next/navigation");
|
|
6901
6896
|
|
|
6902
6897
|
// src/shared/clientImageUploadOptimization.ts
|
|
6903
6898
|
var MAX_DIRECT_UPLOAD_BYTES = 4e6;
|
|
@@ -7032,7 +7027,7 @@ var parseUploadError = async (response) => {
|
|
|
7032
7027
|
return fallback;
|
|
7033
7028
|
};
|
|
7034
7029
|
function MediaUploadForm() {
|
|
7035
|
-
const router = (0,
|
|
7030
|
+
const router = (0, import_navigation4.useRouter)();
|
|
7036
7031
|
const fileInputRef = (0, import_react27.useRef)(null);
|
|
7037
7032
|
const [alt, setAlt] = (0, import_react27.useState)("");
|
|
7038
7033
|
const [file, setFile] = (0, import_react27.useState)(null);
|
package/dist/admin/client.mjs
CHANGED
|
@@ -2669,6 +2669,7 @@ function AdminStudioDashboard(rawProps) {
|
|
|
2669
2669
|
// src/admin/components/studio/AdminStudioPagesListView.tsx
|
|
2670
2670
|
import { useEffect as useEffect9, useMemo as useMemo5, useState as useState10 } from "react";
|
|
2671
2671
|
import Link2 from "next/link";
|
|
2672
|
+
import { usePathname as usePathname3 } from "next/navigation";
|
|
2672
2673
|
import { useAuth as useAuth5 } from "@payloadcms/ui";
|
|
2673
2674
|
|
|
2674
2675
|
// src/admin/components/studio/AdminStudioNewPageView.tsx
|
|
@@ -3160,13 +3161,7 @@ var getPropString5 = (props, key, fallback) => {
|
|
|
3160
3161
|
};
|
|
3161
3162
|
function AdminStudioPagesListView(props) {
|
|
3162
3163
|
const adminBasePath = useAdminBasePath();
|
|
3163
|
-
const
|
|
3164
|
-
useEffect9(() => {
|
|
3165
|
-
const updatePathname = () => setPathname(window.location.pathname);
|
|
3166
|
-
updatePathname();
|
|
3167
|
-
window.addEventListener("popstate", updatePathname);
|
|
3168
|
-
return () => window.removeEventListener("popstate", updatePathname);
|
|
3169
|
-
}, []);
|
|
3164
|
+
const pathname = usePathname3();
|
|
3170
3165
|
const pagesPath = resolveAdminPath(adminBasePath, "/pages");
|
|
3171
3166
|
const nestedPagePath = pathname && pathname.startsWith(`${pagesPath}/`) ? pathname.slice(`${pagesPath}/`.length).split("/")[0] : "";
|
|
3172
3167
|
if (nestedPagePath === "new") {
|
package/dist/index.mjs
CHANGED
|
@@ -116,6 +116,12 @@ h4 {
|
|
|
116
116
|
--orion-shell-max: 100%;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
@media (max-width: 767px) {
|
|
120
|
+
.orion-builder-hide-mobile {
|
|
121
|
+
display: none !important;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
119
125
|
.orion-builder-content {
|
|
120
126
|
width: min(var(--orion-shell-max), calc(100% - (var(--orion-shell-inline) * 2)));
|
|
121
127
|
margin-inline: auto;
|
|
@@ -3883,6 +3883,12 @@ function getThemeColorOverride(tokens, colorKey) {
|
|
|
3883
3883
|
const normalized = value.trim();
|
|
3884
3884
|
return normalized.length > 0 ? normalized : null;
|
|
3885
3885
|
}
|
|
3886
|
+
function normalizeCustomClassName(value) {
|
|
3887
|
+
if (typeof value !== "string") {
|
|
3888
|
+
return "";
|
|
3889
|
+
}
|
|
3890
|
+
return value.split(/\s+/).map((className) => className.trim()).filter(Boolean).join(" ");
|
|
3891
|
+
}
|
|
3886
3892
|
var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
3887
3893
|
const settings = isRecord6(block.settings) ? block.settings : {};
|
|
3888
3894
|
const layoutSettings = isRecord6(settings.layout) ? settings.layout : {};
|
|
@@ -4702,6 +4708,7 @@ function BuilderPageEditor({
|
|
|
4702
4708
|
const inheritProjectStyles = options?.inheritProjectStyles === true;
|
|
4703
4709
|
const shell = sectionStyleFromBlock(block, pageDefaults);
|
|
4704
4710
|
const blockSettings = isRecord6(block.settings) ? block.settings : {};
|
|
4711
|
+
const blockAdvanced = isRecord6(blockSettings.advanced) ? blockSettings.advanced : {};
|
|
4705
4712
|
const blockTypography = isRecord6(blockSettings.typography) ? blockSettings.typography : {};
|
|
4706
4713
|
const blockTheme = isRecord6(blockSettings.theme) ? blockSettings.theme : {};
|
|
4707
4714
|
const heroBackgroundColor = normalizeText2(block.backgroundColor).trim();
|
|
@@ -4719,16 +4726,24 @@ function BuilderPageEditor({
|
|
|
4719
4726
|
const headingAlign = blockTypography.headingAlign === "center" || blockTypography.headingAlign === "justify" || blockTypography.headingAlign === "right" ? blockTypography.headingAlign : "left";
|
|
4720
4727
|
const headingColor = getThemeColorOverride(blockTheme, "headingText") || getThemeColorOverride(pageDefaults.themePage, "headingText") || getThemeColorOverride(siteThemeTokens, "headingText") || heroTextColor || resolvedThemeTokens.colors.headingText;
|
|
4721
4728
|
const bodyColor = getThemeColorOverride(blockTheme, "bodyText") || getThemeColorOverride(pageDefaults.themePage, "bodyText") || getThemeColorOverride(siteThemeTokens, "bodyText") || heroTextColor || resolvedThemeTokens.colors.bodyText;
|
|
4722
|
-
|
|
4729
|
+
const customClassName = normalizeCustomClassName(blockAdvanced.customClassName ?? block.customClassName);
|
|
4730
|
+
const hideOnMobile = Boolean(blockAdvanced.hideOnMobile ?? block.hideOnMobile);
|
|
4731
|
+
const sectionClassName = [
|
|
4732
|
+
className,
|
|
4733
|
+
shell.sectionClass,
|
|
4734
|
+
customClassName,
|
|
4735
|
+
hideOnMobile ? "orion-builder-hide-mobile" : ""
|
|
4736
|
+
].filter(Boolean).join(" ");
|
|
4737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("section", { className: sectionClassName, style: shell.sectionStyle, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: shell.sectionInnerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
4723
4738
|
"div",
|
|
4724
4739
|
{
|
|
4725
4740
|
className: shell.contentClass,
|
|
4726
4741
|
style: {
|
|
4727
4742
|
...shell.contentStyle,
|
|
4743
|
+
"--orion-builder-heading-align": headingAlign,
|
|
4744
|
+
"--orion-builder-body-align": bodyAlign,
|
|
4745
|
+
"--orion-builder-actions-align": bodyAlign === "center" ? "center" : bodyAlign === "right" ? "flex-end" : "flex-start",
|
|
4728
4746
|
...inheritProjectStyles ? {} : {
|
|
4729
|
-
"--orion-builder-heading-align": headingAlign,
|
|
4730
|
-
"--orion-builder-body-align": bodyAlign,
|
|
4731
|
-
"--orion-builder-actions-align": bodyAlign === "center" ? "center" : bodyAlign === "right" ? "flex-end" : "flex-start",
|
|
4732
4747
|
"--orion-builder-heading-color": headingColor,
|
|
4733
4748
|
color: bodyColor,
|
|
4734
4749
|
...typographyStyle
|
|
@@ -3763,6 +3763,12 @@ function getThemeColorOverride(tokens, colorKey) {
|
|
|
3763
3763
|
const normalized = value.trim();
|
|
3764
3764
|
return normalized.length > 0 ? normalized : null;
|
|
3765
3765
|
}
|
|
3766
|
+
function normalizeCustomClassName(value) {
|
|
3767
|
+
if (typeof value !== "string") {
|
|
3768
|
+
return "";
|
|
3769
|
+
}
|
|
3770
|
+
return value.split(/\s+/).map((className) => className.trim()).filter(Boolean).join(" ");
|
|
3771
|
+
}
|
|
3766
3772
|
var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
3767
3773
|
const settings = isRecord6(block.settings) ? block.settings : {};
|
|
3768
3774
|
const layoutSettings = isRecord6(settings.layout) ? settings.layout : {};
|
|
@@ -4582,6 +4588,7 @@ function BuilderPageEditor({
|
|
|
4582
4588
|
const inheritProjectStyles = options?.inheritProjectStyles === true;
|
|
4583
4589
|
const shell = sectionStyleFromBlock(block, pageDefaults);
|
|
4584
4590
|
const blockSettings = isRecord6(block.settings) ? block.settings : {};
|
|
4591
|
+
const blockAdvanced = isRecord6(blockSettings.advanced) ? blockSettings.advanced : {};
|
|
4585
4592
|
const blockTypography = isRecord6(blockSettings.typography) ? blockSettings.typography : {};
|
|
4586
4593
|
const blockTheme = isRecord6(blockSettings.theme) ? blockSettings.theme : {};
|
|
4587
4594
|
const heroBackgroundColor = normalizeText2(block.backgroundColor).trim();
|
|
@@ -4599,16 +4606,24 @@ function BuilderPageEditor({
|
|
|
4599
4606
|
const headingAlign = blockTypography.headingAlign === "center" || blockTypography.headingAlign === "justify" || blockTypography.headingAlign === "right" ? blockTypography.headingAlign : "left";
|
|
4600
4607
|
const headingColor = getThemeColorOverride(blockTheme, "headingText") || getThemeColorOverride(pageDefaults.themePage, "headingText") || getThemeColorOverride(siteThemeTokens, "headingText") || heroTextColor || resolvedThemeTokens.colors.headingText;
|
|
4601
4608
|
const bodyColor = getThemeColorOverride(blockTheme, "bodyText") || getThemeColorOverride(pageDefaults.themePage, "bodyText") || getThemeColorOverride(siteThemeTokens, "bodyText") || heroTextColor || resolvedThemeTokens.colors.bodyText;
|
|
4602
|
-
|
|
4609
|
+
const customClassName = normalizeCustomClassName(blockAdvanced.customClassName ?? block.customClassName);
|
|
4610
|
+
const hideOnMobile = Boolean(blockAdvanced.hideOnMobile ?? block.hideOnMobile);
|
|
4611
|
+
const sectionClassName = [
|
|
4612
|
+
className,
|
|
4613
|
+
shell.sectionClass,
|
|
4614
|
+
customClassName,
|
|
4615
|
+
hideOnMobile ? "orion-builder-hide-mobile" : ""
|
|
4616
|
+
].filter(Boolean).join(" ");
|
|
4617
|
+
return /* @__PURE__ */ jsx13("section", { className: sectionClassName, style: shell.sectionStyle, children: /* @__PURE__ */ jsx13("div", { style: shell.sectionInnerStyle, children: /* @__PURE__ */ jsx13(
|
|
4603
4618
|
"div",
|
|
4604
4619
|
{
|
|
4605
4620
|
className: shell.contentClass,
|
|
4606
4621
|
style: {
|
|
4607
4622
|
...shell.contentStyle,
|
|
4623
|
+
"--orion-builder-heading-align": headingAlign,
|
|
4624
|
+
"--orion-builder-body-align": bodyAlign,
|
|
4625
|
+
"--orion-builder-actions-align": bodyAlign === "center" ? "center" : bodyAlign === "right" ? "flex-end" : "flex-start",
|
|
4608
4626
|
...inheritProjectStyles ? {} : {
|
|
4609
|
-
"--orion-builder-heading-align": headingAlign,
|
|
4610
|
-
"--orion-builder-body-align": bodyAlign,
|
|
4611
|
-
"--orion-builder-actions-align": bodyAlign === "center" ? "center" : bodyAlign === "right" ? "flex-end" : "flex-start",
|
|
4612
4627
|
"--orion-builder-heading-color": headingColor,
|
|
4613
4628
|
color: bodyColor,
|
|
4614
4629
|
...typographyStyle
|
package/package.json
CHANGED