@orion-studios/payload-studio 0.6.0-beta.6 → 0.6.0-beta.8
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 +1 -0
- package/dist/admin/client.d.ts +1 -0
- package/dist/admin/client.js +1489 -662
- package/dist/admin/client.mjs +1337 -511
- package/dist/admin/index.d.mts +1 -2
- package/dist/admin/index.d.ts +1 -2
- package/dist/admin/index.js +1 -1413
- package/dist/admin/index.mjs +2 -4
- package/dist/admin-app/index.mjs +4 -4
- package/dist/chunk-5FNTVRCR.mjs +910 -0
- package/dist/{chunk-EHUE4LCT.mjs → chunk-RKTIFEUY.mjs} +33 -3
- package/dist/chunk-W2UOCJDX.mjs +32 -0
- package/dist/{index-DEkV-sMs.d.mts → index-DyMmaRfI.d.mts} +2 -7
- package/dist/{index-bbA3HSxa.d.ts → index-QPDAedIX.d.ts} +2 -7
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +63 -1429
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
- package/dist/chunk-NTXOLLDC.mjs +0 -2280
- package/dist/chunk-Z6L5K5MH.mjs +0 -64
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
AdminBreadcrumbs,
|
|
3
|
-
AdminPage,
|
|
4
2
|
navItemIsActive,
|
|
5
3
|
roleCanAccessNav
|
|
6
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-W2UOCJDX.mjs";
|
|
7
5
|
import {
|
|
8
6
|
__export
|
|
9
7
|
} from "./chunk-6BWS3CLP.mjs";
|
|
@@ -23,6 +21,36 @@ __export(admin_app_exports, {
|
|
|
23
21
|
roleCanAccessNav: () => roleCanAccessNav
|
|
24
22
|
});
|
|
25
23
|
|
|
24
|
+
// src/admin-app/components/AdminBreadcrumbs.tsx
|
|
25
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
|
+
function AdminBreadcrumbs({ items }) {
|
|
27
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", className: "orion-admin-breadcrumbs", children: items.map((item, index) => {
|
|
28
|
+
const isLast = index === items.length - 1;
|
|
29
|
+
return /* @__PURE__ */ jsxs("span", { children: [
|
|
30
|
+
item.href && !isLast ? /* @__PURE__ */ jsx("a", { href: item.href, children: item.label }) : /* @__PURE__ */ jsx("span", { children: item.label }),
|
|
31
|
+
!isLast ? /* @__PURE__ */ jsx("span", { className: "orion-admin-breadcrumb-sep", children: "/" }) : null
|
|
32
|
+
] }, `${item.label}-${index}`);
|
|
33
|
+
}) });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// src/admin-app/components/AdminPage.tsx
|
|
37
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
38
|
+
function AdminPage({ title, description, breadcrumbs, actions, children }) {
|
|
39
|
+
return /* @__PURE__ */ jsxs2("div", { className: "orion-admin-page", children: [
|
|
40
|
+
/* @__PURE__ */ jsxs2("div", { className: "orion-admin-page-header", children: [
|
|
41
|
+
/* @__PURE__ */ jsx2(AdminBreadcrumbs, { items: breadcrumbs }),
|
|
42
|
+
/* @__PURE__ */ jsxs2("div", { className: "orion-admin-page-title-row", children: [
|
|
43
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
44
|
+
/* @__PURE__ */ jsx2("h1", { children: title }),
|
|
45
|
+
description ? /* @__PURE__ */ jsx2("p", { children: description }) : null
|
|
46
|
+
] }),
|
|
47
|
+
actions ? /* @__PURE__ */ jsx2("div", { className: "orion-admin-page-actions", children: actions }) : null
|
|
48
|
+
] })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ jsx2("div", { className: "orion-admin-page-content", children })
|
|
51
|
+
] });
|
|
52
|
+
}
|
|
53
|
+
|
|
26
54
|
// src/admin-app/nestedNavigation.ts
|
|
27
55
|
var normalizeNestedNavItems = (items) => {
|
|
28
56
|
const deduped = [];
|
|
@@ -179,6 +207,8 @@ var parseAdminHeaderNavFromForm = (formData, pageOptions, maxRows = 24) => {
|
|
|
179
207
|
};
|
|
180
208
|
|
|
181
209
|
export {
|
|
210
|
+
AdminBreadcrumbs,
|
|
211
|
+
AdminPage,
|
|
182
212
|
normalizeNestedNavItems,
|
|
183
213
|
buildNestedNavTree,
|
|
184
214
|
buildAdminPageLinkOptions,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/admin-app/routeRegistry.ts
|
|
2
|
+
var adminNavIcons = [
|
|
3
|
+
"dashboard",
|
|
4
|
+
"pages",
|
|
5
|
+
"forms",
|
|
6
|
+
"globals",
|
|
7
|
+
"media",
|
|
8
|
+
"tools",
|
|
9
|
+
"account",
|
|
10
|
+
"analytics"
|
|
11
|
+
];
|
|
12
|
+
var roleCanAccessNav = (role, item) => {
|
|
13
|
+
if (!item.roles || item.roles.length === 0) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
if (!role) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return item.roles.includes(role);
|
|
20
|
+
};
|
|
21
|
+
var navItemIsActive = (pathname, item) => {
|
|
22
|
+
if (item.href === "/admin") {
|
|
23
|
+
return pathname === "/admin";
|
|
24
|
+
}
|
|
25
|
+
return item.matchPrefixes.some((prefix) => pathname.startsWith(prefix));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
adminNavIcons,
|
|
30
|
+
roleCanAccessNav,
|
|
31
|
+
navItemIsActive
|
|
32
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Field, CollectionConfig, GlobalConfig } from 'payload';
|
|
2
2
|
import { a as AdminNavIcon, e as SitePreviewLink, f as SitePreviewLocationSummary } from './sitePreviewTypes-BkHCWxNW.mjs';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
3
|
import { a as SocialMediaPlatform, b as SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM, c as SOCIAL_MEDIA_ICON_OPTIONS, d as SOCIAL_MEDIA_PLATFORMS, e as SOCIAL_MEDIA_PLATFORM_LABELS, S as SocialMediaGlobalData, f as SocialMediaIconLibrary, g as SocialMediaIconOption, h as SocialMediaProfileData, i as SocialMediaProfilesData } from './socialMedia-C05Iy-SV.mjs';
|
|
5
4
|
|
|
6
5
|
type ThemeOption = 'light' | 'dark' | 'brand-light' | 'brand-dark';
|
|
@@ -125,9 +124,6 @@ type ConfiguredAdmin = {
|
|
|
125
124
|
};
|
|
126
125
|
declare function configureAdmin(config: AdminConfig): ConfiguredAdmin;
|
|
127
126
|
|
|
128
|
-
type AnyRecord = Record<string, unknown>;
|
|
129
|
-
declare function AdminStudioDashboard(rawProps: AnyRecord): react_jsx_runtime.JSX.Element;
|
|
130
|
-
|
|
131
127
|
declare function withTooltips(fields: Field[], customTooltips?: Record<string, string>): Field[];
|
|
132
128
|
|
|
133
129
|
declare const createHeaderNavItemsField: () => Field;
|
|
@@ -150,7 +146,6 @@ declare const createSocialMediaGlobal: (options?: CreateSocialMediaGlobalOptions
|
|
|
150
146
|
|
|
151
147
|
type index_AdminConfig = AdminConfig;
|
|
152
148
|
type index_AdminStudioConfig = AdminStudioConfig;
|
|
153
|
-
declare const index_AdminStudioDashboard: typeof AdminStudioDashboard;
|
|
154
149
|
type index_AdminStudioFooterPreviewConfig = AdminStudioFooterPreviewConfig;
|
|
155
150
|
type index_AdminStudioHeaderPreviewConfig = AdminStudioHeaderPreviewConfig;
|
|
156
151
|
type index_AdminStudioSitePreviewConfig = AdminStudioSitePreviewConfig;
|
|
@@ -185,7 +180,7 @@ declare const index_socialMediaConnectionsField: typeof socialMediaConnectionsFi
|
|
|
185
180
|
declare const index_themePreferenceField: typeof themePreferenceField;
|
|
186
181
|
declare const index_withTooltips: typeof withTooltips;
|
|
187
182
|
declare namespace index {
|
|
188
|
-
export { type index_AdminConfig as AdminConfig, type index_AdminStudioConfig as AdminStudioConfig,
|
|
183
|
+
export { type index_AdminConfig as AdminConfig, type index_AdminStudioConfig as AdminStudioConfig, type index_AdminStudioFooterPreviewConfig as AdminStudioFooterPreviewConfig, type index_AdminStudioHeaderPreviewConfig as AdminStudioHeaderPreviewConfig, type index_AdminStudioSitePreviewConfig as AdminStudioSitePreviewConfig, type index_CreateSocialMediaConnectionsFieldOptions as CreateSocialMediaConnectionsFieldOptions, type index_CreateSocialMediaGlobalOptions as CreateSocialMediaGlobalOptions, type index_ResolvedStudioDashboardPanel as ResolvedStudioDashboardPanel, type index_ResolvedStudioSection as ResolvedStudioSection, index_SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM as SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM, index_SOCIAL_MEDIA_ICON_OPTIONS as SOCIAL_MEDIA_ICON_OPTIONS, index_SOCIAL_MEDIA_PLATFORMS as SOCIAL_MEDIA_PLATFORMS, index_SOCIAL_MEDIA_PLATFORM_LABELS as SOCIAL_MEDIA_PLATFORM_LABELS, index_SocialMediaGlobalData as SocialMediaGlobalData, index_SocialMediaIconLibrary as SocialMediaIconLibrary, index_SocialMediaIconOption as SocialMediaIconOption, index_SocialMediaPlatform as SocialMediaPlatform, index_SocialMediaProfileData as SocialMediaProfileData, index_SocialMediaProfilesData as SocialMediaProfilesData, type index_StudioDashboardPanel as StudioDashboardPanel, type index_StudioDashboardPanelSpan as StudioDashboardPanelSpan, type index_StudioGlobalLink as StudioGlobalLink, type index_StudioSection as StudioSection, type index_StudioSectionCard as StudioSectionCard, type index_StudioSectionComponent as StudioSectionComponent, type index_StudioSectionRole as StudioSectionRole, type index_StudioSectionView as StudioSectionView, index_configureAdmin as configureAdmin, index_createHeaderNavItemsField as createHeaderNavItemsField, index_createSocialMediaConnectionsField as createSocialMediaConnectionsField, index_createSocialMediaGlobal as createSocialMediaGlobal, index_createThemePreferenceField as createThemePreferenceField, index_socialMediaConnectionsField as socialMediaConnectionsField, index_themePreferenceField as themePreferenceField, index_withTooltips as withTooltips };
|
|
189
184
|
}
|
|
190
185
|
|
|
191
|
-
export { type AdminConfig as A, type CreateSocialMediaConnectionsFieldOptions as C, type ResolvedStudioDashboardPanel as R, type StudioDashboardPanel as S, type AdminStudioConfig as a,
|
|
186
|
+
export { type AdminConfig as A, type CreateSocialMediaConnectionsFieldOptions as C, type ResolvedStudioDashboardPanel as R, type StudioDashboardPanel as S, type AdminStudioConfig as a, type AdminStudioFooterPreviewConfig as b, type AdminStudioHeaderPreviewConfig as c, type AdminStudioSitePreviewConfig as d, type CreateSocialMediaGlobalOptions as e, type ResolvedStudioSection as f, type StudioDashboardPanelSpan as g, type StudioGlobalLink as h, index as i, type StudioSection as j, type StudioSectionCard as k, type StudioSectionComponent as l, type StudioSectionRole as m, type StudioSectionView as n, configureAdmin as o, createHeaderNavItemsField as p, createSocialMediaConnectionsField as q, createSocialMediaGlobal as r, createThemePreferenceField as s, socialMediaConnectionsField as t, themePreferenceField as u, withTooltips as w };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Field, CollectionConfig, GlobalConfig } from 'payload';
|
|
2
2
|
import { a as AdminNavIcon, e as SitePreviewLink, f as SitePreviewLocationSummary } from './sitePreviewTypes-BkHCWxNW.js';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
3
|
import { a as SocialMediaPlatform, b as SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM, c as SOCIAL_MEDIA_ICON_OPTIONS, d as SOCIAL_MEDIA_PLATFORMS, e as SOCIAL_MEDIA_PLATFORM_LABELS, S as SocialMediaGlobalData, f as SocialMediaIconLibrary, g as SocialMediaIconOption, h as SocialMediaProfileData, i as SocialMediaProfilesData } from './socialMedia-C05Iy-SV.js';
|
|
5
4
|
|
|
6
5
|
type ThemeOption = 'light' | 'dark' | 'brand-light' | 'brand-dark';
|
|
@@ -125,9 +124,6 @@ type ConfiguredAdmin = {
|
|
|
125
124
|
};
|
|
126
125
|
declare function configureAdmin(config: AdminConfig): ConfiguredAdmin;
|
|
127
126
|
|
|
128
|
-
type AnyRecord = Record<string, unknown>;
|
|
129
|
-
declare function AdminStudioDashboard(rawProps: AnyRecord): react_jsx_runtime.JSX.Element;
|
|
130
|
-
|
|
131
127
|
declare function withTooltips(fields: Field[], customTooltips?: Record<string, string>): Field[];
|
|
132
128
|
|
|
133
129
|
declare const createHeaderNavItemsField: () => Field;
|
|
@@ -150,7 +146,6 @@ declare const createSocialMediaGlobal: (options?: CreateSocialMediaGlobalOptions
|
|
|
150
146
|
|
|
151
147
|
type index_AdminConfig = AdminConfig;
|
|
152
148
|
type index_AdminStudioConfig = AdminStudioConfig;
|
|
153
|
-
declare const index_AdminStudioDashboard: typeof AdminStudioDashboard;
|
|
154
149
|
type index_AdminStudioFooterPreviewConfig = AdminStudioFooterPreviewConfig;
|
|
155
150
|
type index_AdminStudioHeaderPreviewConfig = AdminStudioHeaderPreviewConfig;
|
|
156
151
|
type index_AdminStudioSitePreviewConfig = AdminStudioSitePreviewConfig;
|
|
@@ -185,7 +180,7 @@ declare const index_socialMediaConnectionsField: typeof socialMediaConnectionsFi
|
|
|
185
180
|
declare const index_themePreferenceField: typeof themePreferenceField;
|
|
186
181
|
declare const index_withTooltips: typeof withTooltips;
|
|
187
182
|
declare namespace index {
|
|
188
|
-
export { type index_AdminConfig as AdminConfig, type index_AdminStudioConfig as AdminStudioConfig,
|
|
183
|
+
export { type index_AdminConfig as AdminConfig, type index_AdminStudioConfig as AdminStudioConfig, type index_AdminStudioFooterPreviewConfig as AdminStudioFooterPreviewConfig, type index_AdminStudioHeaderPreviewConfig as AdminStudioHeaderPreviewConfig, type index_AdminStudioSitePreviewConfig as AdminStudioSitePreviewConfig, type index_CreateSocialMediaConnectionsFieldOptions as CreateSocialMediaConnectionsFieldOptions, type index_CreateSocialMediaGlobalOptions as CreateSocialMediaGlobalOptions, type index_ResolvedStudioDashboardPanel as ResolvedStudioDashboardPanel, type index_ResolvedStudioSection as ResolvedStudioSection, index_SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM as SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM, index_SOCIAL_MEDIA_ICON_OPTIONS as SOCIAL_MEDIA_ICON_OPTIONS, index_SOCIAL_MEDIA_PLATFORMS as SOCIAL_MEDIA_PLATFORMS, index_SOCIAL_MEDIA_PLATFORM_LABELS as SOCIAL_MEDIA_PLATFORM_LABELS, index_SocialMediaGlobalData as SocialMediaGlobalData, index_SocialMediaIconLibrary as SocialMediaIconLibrary, index_SocialMediaIconOption as SocialMediaIconOption, index_SocialMediaPlatform as SocialMediaPlatform, index_SocialMediaProfileData as SocialMediaProfileData, index_SocialMediaProfilesData as SocialMediaProfilesData, type index_StudioDashboardPanel as StudioDashboardPanel, type index_StudioDashboardPanelSpan as StudioDashboardPanelSpan, type index_StudioGlobalLink as StudioGlobalLink, type index_StudioSection as StudioSection, type index_StudioSectionCard as StudioSectionCard, type index_StudioSectionComponent as StudioSectionComponent, type index_StudioSectionRole as StudioSectionRole, type index_StudioSectionView as StudioSectionView, index_configureAdmin as configureAdmin, index_createHeaderNavItemsField as createHeaderNavItemsField, index_createSocialMediaConnectionsField as createSocialMediaConnectionsField, index_createSocialMediaGlobal as createSocialMediaGlobal, index_createThemePreferenceField as createThemePreferenceField, index_socialMediaConnectionsField as socialMediaConnectionsField, index_themePreferenceField as themePreferenceField, index_withTooltips as withTooltips };
|
|
189
184
|
}
|
|
190
185
|
|
|
191
|
-
export { type AdminConfig as A, type CreateSocialMediaConnectionsFieldOptions as C, type ResolvedStudioDashboardPanel as R, type StudioDashboardPanel as S, type AdminStudioConfig as a,
|
|
186
|
+
export { type AdminConfig as A, type CreateSocialMediaConnectionsFieldOptions as C, type ResolvedStudioDashboardPanel as R, type StudioDashboardPanel as S, type AdminStudioConfig as a, type AdminStudioFooterPreviewConfig as b, type AdminStudioHeaderPreviewConfig as c, type AdminStudioSitePreviewConfig as d, type CreateSocialMediaGlobalOptions as e, type ResolvedStudioSection as f, type StudioDashboardPanelSpan as g, type StudioGlobalLink as h, index as i, type StudioSection as j, type StudioSectionCard as k, type StudioSectionComponent as l, type StudioSectionRole as m, type StudioSectionView as n, configureAdmin as o, createHeaderNavItemsField as p, createSocialMediaConnectionsField as q, createSocialMediaGlobal as r, createThemePreferenceField as s, socialMediaConnectionsField as t, themePreferenceField as u, withTooltips as w };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { i as admin } from './index-
|
|
1
|
+
export { i as admin } from './index-DyMmaRfI.mjs';
|
|
2
2
|
export { i as adminApp } from './index-DEQC3Dwj.mjs';
|
|
3
3
|
export { i as blocks } from './index-CluwY0ZQ.mjs';
|
|
4
4
|
export { i as nextjs } from './index-D8BNfUJb.mjs';
|
|
@@ -6,6 +6,6 @@ export { i as studio } from './index-DWmudwDm.mjs';
|
|
|
6
6
|
export { i as studioPages } from './index-Cv-6qnrw.mjs';
|
|
7
7
|
import 'payload';
|
|
8
8
|
import './sitePreviewTypes-BkHCWxNW.mjs';
|
|
9
|
-
import 'react/jsx-runtime';
|
|
10
9
|
import './socialMedia-C05Iy-SV.mjs';
|
|
10
|
+
import 'react/jsx-runtime';
|
|
11
11
|
import 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { i as admin } from './index-
|
|
1
|
+
export { i as admin } from './index-QPDAedIX.js';
|
|
2
2
|
export { i as adminApp } from './index-52HdVLQq.js';
|
|
3
3
|
export { i as blocks } from './index-CluwY0ZQ.js';
|
|
4
4
|
export { i as nextjs } from './index-DD_E2UfJ.js';
|
|
@@ -6,6 +6,6 @@ export { i as studio } from './index-DWmudwDm.js';
|
|
|
6
6
|
export { i as studioPages } from './index-Crx_MtPw.js';
|
|
7
7
|
import 'payload';
|
|
8
8
|
import './sitePreviewTypes-BkHCWxNW.js';
|
|
9
|
-
import 'react/jsx-runtime';
|
|
10
9
|
import './socialMedia-C05Iy-SV.js';
|
|
10
|
+
import 'react/jsx-runtime';
|
|
11
11
|
import 'react';
|