@orion-studios/payload-studio 0.3.0-beta.4 → 0.3.0-beta.6
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.d.mts +27 -116
- package/dist/admin/client.d.ts +27 -116
- package/dist/admin/client.js +41 -24
- package/dist/admin/client.mjs +42 -25
- package/dist/admin.css +11 -1
- package/dist/index.mjs +6 -6
- package/dist/studio-pages/client.d.mts +19 -20
- package/dist/studio-pages/client.d.ts +19 -20
- package/package.json +2 -2
package/dist/admin/client.d.mts
CHANGED
|
@@ -1,120 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { FC } from 'react'
|
|
3
2
|
|
|
4
|
-
type
|
|
5
|
-
brandName?: string;
|
|
6
|
-
logoUrl?: string;
|
|
7
|
-
};
|
|
8
|
-
declare function Logo({ brandName, logoUrl }?: LogoProps): react_jsx_runtime.JSX.Element;
|
|
3
|
+
export type ThemeOption = 'light' | 'dark' | 'brand-light' | 'brand-dark'
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
declare function Icon({ brandName, logoUrl }?: IconProps): react_jsx_runtime.JSX.Element;
|
|
15
|
-
|
|
16
|
-
declare function Dashboard(): react_jsx_runtime.JSX.Element;
|
|
17
|
-
|
|
18
|
-
type ThemeOption = 'light' | 'dark' | 'brand-light' | 'brand-dark';
|
|
19
|
-
declare function useTheme(defaultTheme?: ThemeOption): {
|
|
20
|
-
theme: ThemeOption;
|
|
21
|
-
setTheme: (newTheme: ThemeOption) => void;
|
|
22
|
-
isDark: boolean;
|
|
23
|
-
isBrand: boolean;
|
|
24
|
-
isLoading: boolean;
|
|
25
|
-
hasMounted: boolean;
|
|
26
|
-
toggleDarkMode: () => void;
|
|
27
|
-
toggleBrandMode: () => void;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
type ThemeComponentProps = {
|
|
31
|
-
defaultTheme?: ThemeOption;
|
|
32
|
-
};
|
|
33
|
-
declare function ThemeSwitcher({ defaultTheme }: ThemeComponentProps): react_jsx_runtime.JSX.Element;
|
|
34
|
-
declare function ThemeProvider({ children, defaultTheme }: {
|
|
35
|
-
children: React.ReactNode;
|
|
36
|
-
defaultTheme?: ThemeOption;
|
|
37
|
-
}): react_jsx_runtime.JSX.Element;
|
|
38
|
-
|
|
39
|
-
declare function HelpTooltip({ content, position, }: {
|
|
40
|
-
content: string;
|
|
41
|
-
position?: 'top' | 'right' | 'bottom' | 'left';
|
|
42
|
-
}): react_jsx_runtime.JSX.Element;
|
|
43
|
-
|
|
44
|
-
type BadgeStatus = 'draft' | 'published' | 'changed';
|
|
45
|
-
declare function StatusBadge({ status, size, }: {
|
|
46
|
-
status: BadgeStatus;
|
|
47
|
-
size?: 'sm' | 'md';
|
|
48
|
-
}): react_jsx_runtime.JSX.Element;
|
|
49
|
-
|
|
50
|
-
declare function EmptyState({ icon, title, description, actionLabel, actionHref, }: {
|
|
51
|
-
icon?: ReactNode;
|
|
52
|
-
title: string;
|
|
53
|
-
description: string;
|
|
54
|
-
actionLabel?: string;
|
|
55
|
-
actionHref?: string;
|
|
56
|
-
}): react_jsx_runtime.JSX.Element;
|
|
57
|
-
|
|
58
|
-
interface BlockOption {
|
|
59
|
-
slug: string;
|
|
60
|
-
label: string;
|
|
61
|
-
description?: string;
|
|
62
|
-
icon?: React.ReactNode;
|
|
63
|
-
imageURL?: string;
|
|
64
|
-
}
|
|
65
|
-
declare function BlockPicker({ blocks, onSelect, }: {
|
|
66
|
-
blocks: BlockOption[];
|
|
67
|
-
onSelect: (slug: string) => void;
|
|
68
|
-
}): react_jsx_runtime.JSX.Element;
|
|
69
|
-
|
|
70
|
-
interface TabConfig {
|
|
71
|
-
label: string;
|
|
72
|
-
icon?: React.ReactNode;
|
|
73
|
-
content: React.ReactNode;
|
|
5
|
+
export declare function useTheme(): {
|
|
6
|
+
setTheme: (theme: ThemeOption) => void
|
|
7
|
+
theme: ThemeOption
|
|
74
8
|
}
|
|
75
|
-
declare function SectionTabs({ tabs, defaultTab, }: {
|
|
76
|
-
tabs: TabConfig[];
|
|
77
|
-
defaultTab?: number;
|
|
78
|
-
}): react_jsx_runtime.JSX.Element | null;
|
|
79
|
-
|
|
80
|
-
declare function OrionBlocksField(props: Record<string, unknown>): react_jsx_runtime.JSX.Element;
|
|
81
|
-
|
|
82
|
-
declare function WelcomeHeader({ title, description, tooltip, actions, }: {
|
|
83
|
-
title: string;
|
|
84
|
-
description?: string;
|
|
85
|
-
tooltip?: string;
|
|
86
|
-
actions?: React.ReactNode;
|
|
87
|
-
}): react_jsx_runtime.JSX.Element;
|
|
88
|
-
|
|
89
|
-
declare function AdminStudioDashboard(): react_jsx_runtime.JSX.Element;
|
|
90
|
-
|
|
91
|
-
declare function AdminStudioNav(props: Record<string, unknown>): react_jsx_runtime.JSX.Element;
|
|
92
|
-
|
|
93
|
-
type AnyRecord$4 = Record<string, unknown>;
|
|
94
|
-
declare function AdminStudioPagesListView(props: AnyRecord$4): react_jsx_runtime.JSX.Element;
|
|
95
|
-
|
|
96
|
-
type AnyRecord$3 = Record<string, unknown>;
|
|
97
|
-
declare function AdminStudioPageEditView(props: AnyRecord$3): react_jsx_runtime.JSX.Element;
|
|
98
|
-
|
|
99
|
-
type AnyRecord$2 = Record<string, unknown>;
|
|
100
|
-
declare function AdminStudioGlobalsView(props: AnyRecord$2): react_jsx_runtime.JSX.Element;
|
|
101
|
-
|
|
102
|
-
type AnyRecord$1 = Record<string, unknown>;
|
|
103
|
-
declare function AdminStudioMediaView(props: AnyRecord$1): react_jsx_runtime.JSX.Element;
|
|
104
|
-
|
|
105
|
-
type AnyRecord = Record<string, unknown>;
|
|
106
|
-
declare function AdminStudioToolsView(props: AnyRecord): react_jsx_runtime.JSX.Element;
|
|
107
|
-
|
|
108
|
-
type Props$1 = {
|
|
109
|
-
pagesPathBase?: string;
|
|
110
|
-
};
|
|
111
|
-
declare function OpenInStudioMenuItem({ pagesPathBase }: Props$1): react_jsx_runtime.JSX.Element | null;
|
|
112
|
-
|
|
113
|
-
type Props = {
|
|
114
|
-
pagesPathBase?: string;
|
|
115
|
-
};
|
|
116
|
-
declare function PageEditRedirectToStudio({ pagesPathBase }: Props): react_jsx_runtime.JSX.Element;
|
|
117
|
-
|
|
118
|
-
declare function StudioBackBreadcrumb(): react_jsx_runtime.JSX.Element | null;
|
|
119
9
|
|
|
120
|
-
export
|
|
10
|
+
export declare const Logo: FC<any>
|
|
11
|
+
export declare const Icon: FC<any>
|
|
12
|
+
export declare const Dashboard: FC<any>
|
|
13
|
+
export declare const ThemeSwitcher: FC<any>
|
|
14
|
+
export declare const ThemeProvider: FC<any>
|
|
15
|
+
export declare const HelpTooltip: FC<any>
|
|
16
|
+
export declare const StatusBadge: FC<any>
|
|
17
|
+
export declare const EmptyState: FC<any>
|
|
18
|
+
export declare const BlockPicker: FC<any>
|
|
19
|
+
export declare const SectionTabs: FC<any>
|
|
20
|
+
export declare const OrionBlocksField: FC<any>
|
|
21
|
+
export declare const WelcomeHeader: FC<any>
|
|
22
|
+
export declare const AdminStudioDashboard: FC<any>
|
|
23
|
+
export declare const AdminStudioNav: FC<any>
|
|
24
|
+
export declare const AdminStudioPagesListView: FC<any>
|
|
25
|
+
export declare const AdminStudioPageEditView: FC<any>
|
|
26
|
+
export declare const AdminStudioGlobalsView: FC<any>
|
|
27
|
+
export declare const AdminStudioMediaView: FC<any>
|
|
28
|
+
export declare const AdminStudioToolsView: FC<any>
|
|
29
|
+
export declare const OpenInStudioMenuItem: FC<any>
|
|
30
|
+
export declare const PageEditRedirectToStudio: FC<any>
|
|
31
|
+
export declare const StudioBackBreadcrumb: FC<any>
|
package/dist/admin/client.d.ts
CHANGED
|
@@ -1,120 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { FC } from 'react'
|
|
3
2
|
|
|
4
|
-
type
|
|
5
|
-
brandName?: string;
|
|
6
|
-
logoUrl?: string;
|
|
7
|
-
};
|
|
8
|
-
declare function Logo({ brandName, logoUrl }?: LogoProps): react_jsx_runtime.JSX.Element;
|
|
3
|
+
export type ThemeOption = 'light' | 'dark' | 'brand-light' | 'brand-dark'
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
declare function Icon({ brandName, logoUrl }?: IconProps): react_jsx_runtime.JSX.Element;
|
|
15
|
-
|
|
16
|
-
declare function Dashboard(): react_jsx_runtime.JSX.Element;
|
|
17
|
-
|
|
18
|
-
type ThemeOption = 'light' | 'dark' | 'brand-light' | 'brand-dark';
|
|
19
|
-
declare function useTheme(defaultTheme?: ThemeOption): {
|
|
20
|
-
theme: ThemeOption;
|
|
21
|
-
setTheme: (newTheme: ThemeOption) => void;
|
|
22
|
-
isDark: boolean;
|
|
23
|
-
isBrand: boolean;
|
|
24
|
-
isLoading: boolean;
|
|
25
|
-
hasMounted: boolean;
|
|
26
|
-
toggleDarkMode: () => void;
|
|
27
|
-
toggleBrandMode: () => void;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
type ThemeComponentProps = {
|
|
31
|
-
defaultTheme?: ThemeOption;
|
|
32
|
-
};
|
|
33
|
-
declare function ThemeSwitcher({ defaultTheme }: ThemeComponentProps): react_jsx_runtime.JSX.Element;
|
|
34
|
-
declare function ThemeProvider({ children, defaultTheme }: {
|
|
35
|
-
children: React.ReactNode;
|
|
36
|
-
defaultTheme?: ThemeOption;
|
|
37
|
-
}): react_jsx_runtime.JSX.Element;
|
|
38
|
-
|
|
39
|
-
declare function HelpTooltip({ content, position, }: {
|
|
40
|
-
content: string;
|
|
41
|
-
position?: 'top' | 'right' | 'bottom' | 'left';
|
|
42
|
-
}): react_jsx_runtime.JSX.Element;
|
|
43
|
-
|
|
44
|
-
type BadgeStatus = 'draft' | 'published' | 'changed';
|
|
45
|
-
declare function StatusBadge({ status, size, }: {
|
|
46
|
-
status: BadgeStatus;
|
|
47
|
-
size?: 'sm' | 'md';
|
|
48
|
-
}): react_jsx_runtime.JSX.Element;
|
|
49
|
-
|
|
50
|
-
declare function EmptyState({ icon, title, description, actionLabel, actionHref, }: {
|
|
51
|
-
icon?: ReactNode;
|
|
52
|
-
title: string;
|
|
53
|
-
description: string;
|
|
54
|
-
actionLabel?: string;
|
|
55
|
-
actionHref?: string;
|
|
56
|
-
}): react_jsx_runtime.JSX.Element;
|
|
57
|
-
|
|
58
|
-
interface BlockOption {
|
|
59
|
-
slug: string;
|
|
60
|
-
label: string;
|
|
61
|
-
description?: string;
|
|
62
|
-
icon?: React.ReactNode;
|
|
63
|
-
imageURL?: string;
|
|
64
|
-
}
|
|
65
|
-
declare function BlockPicker({ blocks, onSelect, }: {
|
|
66
|
-
blocks: BlockOption[];
|
|
67
|
-
onSelect: (slug: string) => void;
|
|
68
|
-
}): react_jsx_runtime.JSX.Element;
|
|
69
|
-
|
|
70
|
-
interface TabConfig {
|
|
71
|
-
label: string;
|
|
72
|
-
icon?: React.ReactNode;
|
|
73
|
-
content: React.ReactNode;
|
|
5
|
+
export declare function useTheme(): {
|
|
6
|
+
setTheme: (theme: ThemeOption) => void
|
|
7
|
+
theme: ThemeOption
|
|
74
8
|
}
|
|
75
|
-
declare function SectionTabs({ tabs, defaultTab, }: {
|
|
76
|
-
tabs: TabConfig[];
|
|
77
|
-
defaultTab?: number;
|
|
78
|
-
}): react_jsx_runtime.JSX.Element | null;
|
|
79
|
-
|
|
80
|
-
declare function OrionBlocksField(props: Record<string, unknown>): react_jsx_runtime.JSX.Element;
|
|
81
|
-
|
|
82
|
-
declare function WelcomeHeader({ title, description, tooltip, actions, }: {
|
|
83
|
-
title: string;
|
|
84
|
-
description?: string;
|
|
85
|
-
tooltip?: string;
|
|
86
|
-
actions?: React.ReactNode;
|
|
87
|
-
}): react_jsx_runtime.JSX.Element;
|
|
88
|
-
|
|
89
|
-
declare function AdminStudioDashboard(): react_jsx_runtime.JSX.Element;
|
|
90
|
-
|
|
91
|
-
declare function AdminStudioNav(props: Record<string, unknown>): react_jsx_runtime.JSX.Element;
|
|
92
|
-
|
|
93
|
-
type AnyRecord$4 = Record<string, unknown>;
|
|
94
|
-
declare function AdminStudioPagesListView(props: AnyRecord$4): react_jsx_runtime.JSX.Element;
|
|
95
|
-
|
|
96
|
-
type AnyRecord$3 = Record<string, unknown>;
|
|
97
|
-
declare function AdminStudioPageEditView(props: AnyRecord$3): react_jsx_runtime.JSX.Element;
|
|
98
|
-
|
|
99
|
-
type AnyRecord$2 = Record<string, unknown>;
|
|
100
|
-
declare function AdminStudioGlobalsView(props: AnyRecord$2): react_jsx_runtime.JSX.Element;
|
|
101
|
-
|
|
102
|
-
type AnyRecord$1 = Record<string, unknown>;
|
|
103
|
-
declare function AdminStudioMediaView(props: AnyRecord$1): react_jsx_runtime.JSX.Element;
|
|
104
|
-
|
|
105
|
-
type AnyRecord = Record<string, unknown>;
|
|
106
|
-
declare function AdminStudioToolsView(props: AnyRecord): react_jsx_runtime.JSX.Element;
|
|
107
|
-
|
|
108
|
-
type Props$1 = {
|
|
109
|
-
pagesPathBase?: string;
|
|
110
|
-
};
|
|
111
|
-
declare function OpenInStudioMenuItem({ pagesPathBase }: Props$1): react_jsx_runtime.JSX.Element | null;
|
|
112
|
-
|
|
113
|
-
type Props = {
|
|
114
|
-
pagesPathBase?: string;
|
|
115
|
-
};
|
|
116
|
-
declare function PageEditRedirectToStudio({ pagesPathBase }: Props): react_jsx_runtime.JSX.Element;
|
|
117
|
-
|
|
118
|
-
declare function StudioBackBreadcrumb(): react_jsx_runtime.JSX.Element | null;
|
|
119
9
|
|
|
120
|
-
export
|
|
10
|
+
export declare const Logo: FC<any>
|
|
11
|
+
export declare const Icon: FC<any>
|
|
12
|
+
export declare const Dashboard: FC<any>
|
|
13
|
+
export declare const ThemeSwitcher: FC<any>
|
|
14
|
+
export declare const ThemeProvider: FC<any>
|
|
15
|
+
export declare const HelpTooltip: FC<any>
|
|
16
|
+
export declare const StatusBadge: FC<any>
|
|
17
|
+
export declare const EmptyState: FC<any>
|
|
18
|
+
export declare const BlockPicker: FC<any>
|
|
19
|
+
export declare const SectionTabs: FC<any>
|
|
20
|
+
export declare const OrionBlocksField: FC<any>
|
|
21
|
+
export declare const WelcomeHeader: FC<any>
|
|
22
|
+
export declare const AdminStudioDashboard: FC<any>
|
|
23
|
+
export declare const AdminStudioNav: FC<any>
|
|
24
|
+
export declare const AdminStudioPagesListView: FC<any>
|
|
25
|
+
export declare const AdminStudioPageEditView: FC<any>
|
|
26
|
+
export declare const AdminStudioGlobalsView: FC<any>
|
|
27
|
+
export declare const AdminStudioMediaView: FC<any>
|
|
28
|
+
export declare const AdminStudioToolsView: FC<any>
|
|
29
|
+
export declare const OpenInStudioMenuItem: FC<any>
|
|
30
|
+
export declare const PageEditRedirectToStudio: FC<any>
|
|
31
|
+
export declare const StudioBackBreadcrumb: FC<any>
|
package/dist/admin/client.js
CHANGED
|
@@ -2516,7 +2516,7 @@ function StudioSectionLayout({ children, navProps }) {
|
|
|
2516
2516
|
style: {
|
|
2517
2517
|
background: "var(--theme-elevation-0)",
|
|
2518
2518
|
display: "grid",
|
|
2519
|
-
gridTemplateColumns: collapsed ? "84px 1fr" : "260px 1fr",
|
|
2519
|
+
gridTemplateColumns: collapsed ? "84px minmax(0, 1fr)" : "260px minmax(0, 1fr)",
|
|
2520
2520
|
minHeight: "100vh"
|
|
2521
2521
|
},
|
|
2522
2522
|
children: [
|
|
@@ -2527,9 +2527,10 @@ function StudioSectionLayout({ children, navProps }) {
|
|
|
2527
2527
|
style: {
|
|
2528
2528
|
borderRight: "1px solid var(--theme-elevation-150)",
|
|
2529
2529
|
height: "100vh",
|
|
2530
|
-
|
|
2530
|
+
overflow: "visible",
|
|
2531
2531
|
position: "sticky",
|
|
2532
|
-
top: 0
|
|
2532
|
+
top: 0,
|
|
2533
|
+
zIndex: 2
|
|
2533
2534
|
},
|
|
2534
2535
|
children: [
|
|
2535
2536
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
@@ -2547,7 +2548,7 @@ function StudioSectionLayout({ children, navProps }) {
|
|
|
2547
2548
|
height: 30,
|
|
2548
2549
|
justifyContent: "center",
|
|
2549
2550
|
position: "absolute",
|
|
2550
|
-
right:
|
|
2551
|
+
right: -15,
|
|
2551
2552
|
top: 10,
|
|
2552
2553
|
width: 30,
|
|
2553
2554
|
zIndex: 5
|
|
@@ -2556,7 +2557,7 @@ function StudioSectionLayout({ children, navProps }) {
|
|
|
2556
2557
|
children: collapsed ? ">" : "<"
|
|
2557
2558
|
}
|
|
2558
2559
|
),
|
|
2559
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AdminStudioNav, { ...navProps, compact: collapsed })
|
|
2560
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { height: "100%", overflowY: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AdminStudioNav, { ...navProps, compact: collapsed }) })
|
|
2560
2561
|
]
|
|
2561
2562
|
}
|
|
2562
2563
|
),
|
|
@@ -3159,39 +3160,55 @@ function PageEditRedirectToStudio({ pagesPathBase = "/admin/pages" }) {
|
|
|
3159
3160
|
}
|
|
3160
3161
|
|
|
3161
3162
|
// src/admin/components/studio/StudioBackBreadcrumb.tsx
|
|
3163
|
+
var import_ui9 = require("@payloadcms/ui");
|
|
3162
3164
|
var import_navigation = require("next/navigation");
|
|
3165
|
+
var import_react16 = require("react");
|
|
3163
3166
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3164
|
-
var
|
|
3167
|
+
var resolveSectionLink = (pathname) => {
|
|
3165
3168
|
if (pathname.includes("/globals/")) {
|
|
3166
|
-
return { href: "/admin/studio-globals", label: "
|
|
3169
|
+
return { href: "/admin/studio-globals", label: "Globals" };
|
|
3167
3170
|
}
|
|
3168
3171
|
if (pathname.includes("/collections/pages") || pathname.startsWith("/admin/pages/")) {
|
|
3169
|
-
return { href: "/admin/pages", label: "
|
|
3172
|
+
return { href: "/admin/pages", label: "Pages" };
|
|
3170
3173
|
}
|
|
3171
3174
|
if (pathname.includes("/collections/media")) {
|
|
3172
|
-
return { href: "/admin/media", label: "
|
|
3175
|
+
return { href: "/admin/media", label: "Media" };
|
|
3173
3176
|
}
|
|
3174
3177
|
if (pathname.startsWith("/admin/tools")) {
|
|
3175
|
-
return { href: "/admin/tools", label: "
|
|
3178
|
+
return { href: "/admin/tools", label: "Admin Tools" };
|
|
3176
3179
|
}
|
|
3177
3180
|
return null;
|
|
3178
3181
|
};
|
|
3179
3182
|
function StudioBackBreadcrumb() {
|
|
3180
3183
|
const pathname = (0, import_navigation.usePathname)();
|
|
3181
|
-
const
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
{
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
}
|
|
3194
|
-
|
|
3184
|
+
const { stepNav } = (0, import_ui9.useStepNav)();
|
|
3185
|
+
const section = resolveSectionLink(pathname);
|
|
3186
|
+
const mergedNav = (0, import_react16.useMemo)(() => {
|
|
3187
|
+
if (!section) return stepNav;
|
|
3188
|
+
const rest = stepNav.filter((item) => {
|
|
3189
|
+
return !(typeof item.label === "string" && item.label.toLowerCase() === section.label.toLowerCase());
|
|
3190
|
+
});
|
|
3191
|
+
return [{ label: section.label, url: section.href }, ...rest];
|
|
3192
|
+
}, [section, stepNav]);
|
|
3193
|
+
if (!section) return null;
|
|
3194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
3195
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ui9.SetStepNav, { nav: mergedNav }),
|
|
3196
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { style: { marginBottom: "0.75rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3197
|
+
"a",
|
|
3198
|
+
{
|
|
3199
|
+
href: section.href,
|
|
3200
|
+
style: {
|
|
3201
|
+
color: "var(--theme-elevation-700)",
|
|
3202
|
+
fontSize: "0.9rem",
|
|
3203
|
+
textDecoration: "none"
|
|
3204
|
+
},
|
|
3205
|
+
children: [
|
|
3206
|
+
"Back to ",
|
|
3207
|
+
section.label
|
|
3208
|
+
]
|
|
3209
|
+
}
|
|
3210
|
+
) })
|
|
3211
|
+
] });
|
|
3195
3212
|
}
|
|
3196
3213
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3197
3214
|
0 && (module.exports = {
|
package/dist/admin/client.mjs
CHANGED
|
@@ -1335,7 +1335,7 @@ function StudioSectionLayout({ children, navProps }) {
|
|
|
1335
1335
|
style: {
|
|
1336
1336
|
background: "var(--theme-elevation-0)",
|
|
1337
1337
|
display: "grid",
|
|
1338
|
-
gridTemplateColumns: collapsed ? "84px 1fr" : "260px 1fr",
|
|
1338
|
+
gridTemplateColumns: collapsed ? "84px minmax(0, 1fr)" : "260px minmax(0, 1fr)",
|
|
1339
1339
|
minHeight: "100vh"
|
|
1340
1340
|
},
|
|
1341
1341
|
children: [
|
|
@@ -1346,9 +1346,10 @@ function StudioSectionLayout({ children, navProps }) {
|
|
|
1346
1346
|
style: {
|
|
1347
1347
|
borderRight: "1px solid var(--theme-elevation-150)",
|
|
1348
1348
|
height: "100vh",
|
|
1349
|
-
|
|
1349
|
+
overflow: "visible",
|
|
1350
1350
|
position: "sticky",
|
|
1351
|
-
top: 0
|
|
1351
|
+
top: 0,
|
|
1352
|
+
zIndex: 2
|
|
1352
1353
|
},
|
|
1353
1354
|
children: [
|
|
1354
1355
|
/* @__PURE__ */ jsx12(
|
|
@@ -1366,7 +1367,7 @@ function StudioSectionLayout({ children, navProps }) {
|
|
|
1366
1367
|
height: 30,
|
|
1367
1368
|
justifyContent: "center",
|
|
1368
1369
|
position: "absolute",
|
|
1369
|
-
right:
|
|
1370
|
+
right: -15,
|
|
1370
1371
|
top: 10,
|
|
1371
1372
|
width: 30,
|
|
1372
1373
|
zIndex: 5
|
|
@@ -1375,7 +1376,7 @@ function StudioSectionLayout({ children, navProps }) {
|
|
|
1375
1376
|
children: collapsed ? ">" : "<"
|
|
1376
1377
|
}
|
|
1377
1378
|
),
|
|
1378
|
-
/* @__PURE__ */ jsx12(AdminStudioNav, { ...navProps, compact: collapsed })
|
|
1379
|
+
/* @__PURE__ */ jsx12("div", { style: { height: "100%", overflowY: "auto" }, children: /* @__PURE__ */ jsx12(AdminStudioNav, { ...navProps, compact: collapsed }) })
|
|
1379
1380
|
]
|
|
1380
1381
|
}
|
|
1381
1382
|
),
|
|
@@ -1978,39 +1979,55 @@ function PageEditRedirectToStudio({ pagesPathBase = "/admin/pages" }) {
|
|
|
1978
1979
|
}
|
|
1979
1980
|
|
|
1980
1981
|
// src/admin/components/studio/StudioBackBreadcrumb.tsx
|
|
1982
|
+
import { SetStepNav, useStepNav } from "@payloadcms/ui";
|
|
1981
1983
|
import { usePathname } from "next/navigation";
|
|
1982
|
-
import {
|
|
1983
|
-
|
|
1984
|
+
import { useMemo as useMemo4 } from "react";
|
|
1985
|
+
import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1986
|
+
var resolveSectionLink = (pathname) => {
|
|
1984
1987
|
if (pathname.includes("/globals/")) {
|
|
1985
|
-
return { href: "/admin/studio-globals", label: "
|
|
1988
|
+
return { href: "/admin/studio-globals", label: "Globals" };
|
|
1986
1989
|
}
|
|
1987
1990
|
if (pathname.includes("/collections/pages") || pathname.startsWith("/admin/pages/")) {
|
|
1988
|
-
return { href: "/admin/pages", label: "
|
|
1991
|
+
return { href: "/admin/pages", label: "Pages" };
|
|
1989
1992
|
}
|
|
1990
1993
|
if (pathname.includes("/collections/media")) {
|
|
1991
|
-
return { href: "/admin/media", label: "
|
|
1994
|
+
return { href: "/admin/media", label: "Media" };
|
|
1992
1995
|
}
|
|
1993
1996
|
if (pathname.startsWith("/admin/tools")) {
|
|
1994
|
-
return { href: "/admin/tools", label: "
|
|
1997
|
+
return { href: "/admin/tools", label: "Admin Tools" };
|
|
1995
1998
|
}
|
|
1996
1999
|
return null;
|
|
1997
2000
|
};
|
|
1998
2001
|
function StudioBackBreadcrumb() {
|
|
1999
2002
|
const pathname = usePathname();
|
|
2000
|
-
const
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
{
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
}
|
|
2013
|
-
|
|
2003
|
+
const { stepNav } = useStepNav();
|
|
2004
|
+
const section = resolveSectionLink(pathname);
|
|
2005
|
+
const mergedNav = useMemo4(() => {
|
|
2006
|
+
if (!section) return stepNav;
|
|
2007
|
+
const rest = stepNav.filter((item) => {
|
|
2008
|
+
return !(typeof item.label === "string" && item.label.toLowerCase() === section.label.toLowerCase());
|
|
2009
|
+
});
|
|
2010
|
+
return [{ label: section.label, url: section.href }, ...rest];
|
|
2011
|
+
}, [section, stepNav]);
|
|
2012
|
+
if (!section) return null;
|
|
2013
|
+
return /* @__PURE__ */ jsxs18(Fragment3, { children: [
|
|
2014
|
+
/* @__PURE__ */ jsx20(SetStepNav, { nav: mergedNav }),
|
|
2015
|
+
/* @__PURE__ */ jsx20("div", { style: { marginBottom: "0.75rem" }, children: /* @__PURE__ */ jsxs18(
|
|
2016
|
+
"a",
|
|
2017
|
+
{
|
|
2018
|
+
href: section.href,
|
|
2019
|
+
style: {
|
|
2020
|
+
color: "var(--theme-elevation-700)",
|
|
2021
|
+
fontSize: "0.9rem",
|
|
2022
|
+
textDecoration: "none"
|
|
2023
|
+
},
|
|
2024
|
+
children: [
|
|
2025
|
+
"Back to ",
|
|
2026
|
+
section.label
|
|
2027
|
+
]
|
|
2028
|
+
}
|
|
2029
|
+
) })
|
|
2030
|
+
] });
|
|
2014
2031
|
}
|
|
2015
2032
|
export {
|
|
2016
2033
|
AdminStudioDashboard,
|
package/dist/admin.css
CHANGED
|
@@ -335,6 +335,7 @@ html {
|
|
|
335
335
|
--orion-sidebar-bg: var(--theme-elevation-50);
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
+
.template-default__nav,
|
|
338
339
|
.nav,
|
|
339
340
|
.orion-studio-sidebar {
|
|
340
341
|
background: var(--orion-sidebar-bg) !important;
|
|
@@ -342,10 +343,13 @@ html {
|
|
|
342
343
|
|
|
343
344
|
/* Keep toggle visible, docked on right edge of sidebar */
|
|
344
345
|
.template-default__nav-toggler-wrapper {
|
|
346
|
+
align-items: center;
|
|
347
|
+
display: flex !important;
|
|
345
348
|
height: 0 !important;
|
|
346
|
-
left: calc(var(--nav-width) - 14px) !important;
|
|
349
|
+
left: calc(var(--nav-width, 270px) - 14px) !important;
|
|
347
350
|
pointer-events: none;
|
|
348
351
|
position: fixed !important;
|
|
352
|
+
right: auto !important;
|
|
349
353
|
top: 12px !important;
|
|
350
354
|
width: 0 !important;
|
|
351
355
|
z-index: calc(var(--z-nav) + 5) !important;
|
|
@@ -369,6 +373,12 @@ html {
|
|
|
369
373
|
padding: 0;
|
|
370
374
|
}
|
|
371
375
|
|
|
376
|
+
@media (max-width: 1024px) {
|
|
377
|
+
.template-default__nav-toggler-wrapper {
|
|
378
|
+
left: 12px !important;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
372
382
|
/* Ensure main content fills remaining width cleanly */
|
|
373
383
|
.template-default .template-default__wrap {
|
|
374
384
|
min-width: 0 !important;
|
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
admin_exports
|
|
3
3
|
} from "./chunk-J6HM2LPT.mjs";
|
|
4
|
-
import {
|
|
5
|
-
nextjs_exports
|
|
6
|
-
} from "./chunk-ZLLNO5FM.mjs";
|
|
7
|
-
import {
|
|
8
|
-
blocks_exports
|
|
9
|
-
} from "./chunk-L62FYT57.mjs";
|
|
10
4
|
import {
|
|
11
5
|
studio_exports
|
|
12
6
|
} from "./chunk-WLXZDMK3.mjs";
|
|
13
7
|
import {
|
|
14
8
|
studio_pages_exports
|
|
15
9
|
} from "./chunk-Q76U4Z53.mjs";
|
|
10
|
+
import {
|
|
11
|
+
blocks_exports
|
|
12
|
+
} from "./chunk-L62FYT57.mjs";
|
|
13
|
+
import {
|
|
14
|
+
nextjs_exports
|
|
15
|
+
} from "./chunk-ZLLNO5FM.mjs";
|
|
16
16
|
import "./chunk-6BWS3CLP.mjs";
|
|
17
17
|
export {
|
|
18
18
|
admin_exports as admin,
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react'
|
|
2
2
|
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
declare function BuilderPageEditor({ initialDoc, pageID }: Props): react_jsx_runtime.JSX.Element;
|
|
3
|
+
export type BuilderBlock = {
|
|
4
|
+
blockType: string
|
|
5
|
+
[key: string]: unknown
|
|
6
|
+
}
|
|
8
7
|
|
|
9
|
-
type
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
title: string;
|
|
16
|
-
description: string;
|
|
17
|
-
blocks: BuilderBlock[];
|
|
18
|
-
};
|
|
19
|
-
declare const sectionPresets: SectionPreset[];
|
|
20
|
-
declare const templateStarterPresets: Record<string, BuilderBlock[]>;
|
|
21
|
-
declare function clonePresetBlocks(blocks: BuilderBlock[]): BuilderBlock[];
|
|
8
|
+
export type SectionPreset = {
|
|
9
|
+
id: string
|
|
10
|
+
title: string
|
|
11
|
+
description: string
|
|
12
|
+
blocks: BuilderBlock[]
|
|
13
|
+
}
|
|
22
14
|
|
|
23
|
-
export
|
|
15
|
+
export declare const BuilderPageEditor: FC<{
|
|
16
|
+
initialDoc?: Record<string, unknown>
|
|
17
|
+
pageID: string
|
|
18
|
+
}>
|
|
19
|
+
|
|
20
|
+
export declare const sectionPresets: SectionPreset[]
|
|
21
|
+
export declare const templateStarterPresets: Record<string, BuilderBlock[]>
|
|
22
|
+
export declare function clonePresetBlocks(blocks: BuilderBlock[]): BuilderBlock[]
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react'
|
|
2
2
|
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
declare function BuilderPageEditor({ initialDoc, pageID }: Props): react_jsx_runtime.JSX.Element;
|
|
3
|
+
export type BuilderBlock = {
|
|
4
|
+
blockType: string
|
|
5
|
+
[key: string]: unknown
|
|
6
|
+
}
|
|
8
7
|
|
|
9
|
-
type
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
title: string;
|
|
16
|
-
description: string;
|
|
17
|
-
blocks: BuilderBlock[];
|
|
18
|
-
};
|
|
19
|
-
declare const sectionPresets: SectionPreset[];
|
|
20
|
-
declare const templateStarterPresets: Record<string, BuilderBlock[]>;
|
|
21
|
-
declare function clonePresetBlocks(blocks: BuilderBlock[]): BuilderBlock[];
|
|
8
|
+
export type SectionPreset = {
|
|
9
|
+
id: string
|
|
10
|
+
title: string
|
|
11
|
+
description: string
|
|
12
|
+
blocks: BuilderBlock[]
|
|
13
|
+
}
|
|
22
14
|
|
|
23
|
-
export
|
|
15
|
+
export declare const BuilderPageEditor: FC<{
|
|
16
|
+
initialDoc?: Record<string, unknown>
|
|
17
|
+
pageID: string
|
|
18
|
+
}>
|
|
19
|
+
|
|
20
|
+
export declare const sectionPresets: SectionPreset[]
|
|
21
|
+
export declare const templateStarterPresets: Record<string, BuilderBlock[]>
|
|
22
|
+
export declare function clonePresetBlocks(blocks: BuilderBlock[]): BuilderBlock[]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-studios/payload-studio",
|
|
3
|
-
"version": "0.3.0-beta.
|
|
3
|
+
"version": "0.3.0-beta.6",
|
|
4
4
|
"description": "Unified Payload CMS toolkit for Orion Studios",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"dist"
|
|
53
53
|
],
|
|
54
54
|
"scripts": {
|
|
55
|
-
"build": "tsup && node -e \"const fs=require('fs'); fs.copyFileSync('src/admin/styles/admin.css','dist/admin.css'); fs.mkdirSync('dist/studio-pages',{recursive:true}); fs.copyFileSync('src/studio-pages/styles/builder.css','dist/studio-pages/builder.css')\"",
|
|
55
|
+
"build": "tsup && node -e \"const fs=require('fs'); fs.copyFileSync('src/admin/styles/admin.css','dist/admin.css'); fs.mkdirSync('dist/studio-pages',{recursive:true}); fs.copyFileSync('src/studio-pages/styles/builder.css','dist/studio-pages/builder.css'); fs.mkdirSync('dist/admin',{recursive:true}); fs.copyFileSync('src/admin/client.d.ts','dist/admin/client.d.ts'); fs.copyFileSync('src/admin/client.d.ts','dist/admin/client.d.mts'); fs.copyFileSync('src/studio-pages/client.d.ts','dist/studio-pages/client.d.ts'); fs.copyFileSync('src/studio-pages/client.d.ts','dist/studio-pages/client.d.mts')\"",
|
|
56
56
|
"dev": "tsup --watch",
|
|
57
57
|
"typecheck": "tsc --noEmit"
|
|
58
58
|
},
|