@orion-studios/payload-studio 0.6.0-beta.1 → 0.6.0-beta.10
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 +2 -1
- package/dist/admin/client.d.ts +2 -1
- package/dist/admin/client.js +2243 -1416
- package/dist/admin/client.mjs +1795 -971
- package/dist/admin/index.d.mts +1 -1
- package/dist/admin/index.d.ts +1 -1
- package/dist/admin/index.js +17 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin-app/styles.css +448 -38
- package/dist/{chunk-Q2HGC67S.mjs → chunk-WLOPFFN2.mjs} +17 -1
- package/dist/index-Bm2SaC3r.d.mts +187 -0
- package/dist/index-CkT_eyhK.d.ts +187 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/index-BMitiKK8.d.ts +0 -435
- package/dist/index-D_b24Gef.d.mts +0 -435
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Field, CollectionConfig, GlobalConfig } from 'payload';
|
|
2
|
+
import { a as AdminNavIcon, e as SitePreviewLink, f as SitePreviewLocationSummary } from './sitePreviewTypes-BkHCWxNW.mjs';
|
|
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';
|
|
4
|
+
|
|
5
|
+
type ThemeOption = 'light' | 'dark' | 'brand-light' | 'brand-dark';
|
|
6
|
+
declare const createThemePreferenceField: (defaultTheme?: ThemeOption) => Field;
|
|
7
|
+
declare const themePreferenceField: Field;
|
|
8
|
+
|
|
9
|
+
type StudioSectionRole = 'admin' | 'editor' | 'client';
|
|
10
|
+
type StudioSectionCard = {
|
|
11
|
+
description?: string;
|
|
12
|
+
title: string;
|
|
13
|
+
};
|
|
14
|
+
type StudioSectionComponent = {
|
|
15
|
+
clientProps?: Record<string, unknown>;
|
|
16
|
+
exportName: string;
|
|
17
|
+
path: string;
|
|
18
|
+
};
|
|
19
|
+
type StudioSectionView = {
|
|
20
|
+
Component: StudioSectionComponent;
|
|
21
|
+
path: string;
|
|
22
|
+
};
|
|
23
|
+
type StudioDashboardPanelSpan = 'full' | 'half';
|
|
24
|
+
type StudioDashboardPanel = {
|
|
25
|
+
Component: StudioSectionComponent;
|
|
26
|
+
priority?: number;
|
|
27
|
+
roles?: StudioSectionRole[];
|
|
28
|
+
span?: StudioDashboardPanelSpan;
|
|
29
|
+
};
|
|
30
|
+
type StudioSection = {
|
|
31
|
+
card?: StudioSectionCard;
|
|
32
|
+
dashboard?: StudioDashboardPanel;
|
|
33
|
+
href?: string;
|
|
34
|
+
id: string;
|
|
35
|
+
icon?: AdminNavIcon;
|
|
36
|
+
label: string;
|
|
37
|
+
matchPrefixes?: string[];
|
|
38
|
+
roles?: StudioSectionRole[];
|
|
39
|
+
view?: StudioSectionView;
|
|
40
|
+
};
|
|
41
|
+
type ResolvedStudioSection = {
|
|
42
|
+
card?: StudioSectionCard;
|
|
43
|
+
href: string;
|
|
44
|
+
id: string;
|
|
45
|
+
icon?: AdminNavIcon;
|
|
46
|
+
label: string;
|
|
47
|
+
matchPrefixes: string[];
|
|
48
|
+
roles?: StudioSectionRole[];
|
|
49
|
+
};
|
|
50
|
+
type ResolvedStudioDashboardPanel = {
|
|
51
|
+
Component: StudioSectionComponent;
|
|
52
|
+
href: string;
|
|
53
|
+
id: string;
|
|
54
|
+
label: string;
|
|
55
|
+
priority: number;
|
|
56
|
+
roles?: StudioSectionRole[];
|
|
57
|
+
span: StudioDashboardPanelSpan;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
type StudioGlobalLink = {
|
|
61
|
+
description?: string;
|
|
62
|
+
href?: string;
|
|
63
|
+
label: string;
|
|
64
|
+
slug: string;
|
|
65
|
+
};
|
|
66
|
+
type AdminStudioHeaderPreviewConfig = {
|
|
67
|
+
actionHref?: string;
|
|
68
|
+
actionLabel?: string;
|
|
69
|
+
};
|
|
70
|
+
type AdminStudioFooterPreviewConfig = {
|
|
71
|
+
builtByHref?: string;
|
|
72
|
+
builtByLabel?: string;
|
|
73
|
+
description?: string;
|
|
74
|
+
footerCategories?: string[];
|
|
75
|
+
footerLinks?: SitePreviewLink[];
|
|
76
|
+
};
|
|
77
|
+
type AdminStudioSitePreviewConfig = {
|
|
78
|
+
footer?: AdminStudioFooterPreviewConfig;
|
|
79
|
+
header?: AdminStudioHeaderPreviewConfig;
|
|
80
|
+
locationSummary?: SitePreviewLocationSummary;
|
|
81
|
+
};
|
|
82
|
+
interface AdminStudioConfig {
|
|
83
|
+
enabled?: boolean;
|
|
84
|
+
forms?: {
|
|
85
|
+
collectionSlug?: string;
|
|
86
|
+
enabled?: boolean;
|
|
87
|
+
submissionsCollectionSlug?: string;
|
|
88
|
+
uploadsCollectionSlug?: string;
|
|
89
|
+
};
|
|
90
|
+
globals?: StudioGlobalLink[];
|
|
91
|
+
media?: {
|
|
92
|
+
collectionSlug?: string;
|
|
93
|
+
};
|
|
94
|
+
pages?: {
|
|
95
|
+
builderBasePath?: string;
|
|
96
|
+
collectionSlug?: string;
|
|
97
|
+
};
|
|
98
|
+
sitePreview?: AdminStudioSitePreviewConfig;
|
|
99
|
+
sections?: StudioSection[];
|
|
100
|
+
}
|
|
101
|
+
interface AdminConfig {
|
|
102
|
+
allowThemePreference?: boolean;
|
|
103
|
+
brandName: string;
|
|
104
|
+
brandPrimary?: string;
|
|
105
|
+
brandSecondary?: string;
|
|
106
|
+
defaultTheme?: ThemeOption;
|
|
107
|
+
logoUrl?: string;
|
|
108
|
+
basePath?: string;
|
|
109
|
+
studio?: AdminStudioConfig;
|
|
110
|
+
userSessionDurationSeconds?: number;
|
|
111
|
+
}
|
|
112
|
+
type ConfiguredAdmin = {
|
|
113
|
+
admin: Record<string, unknown>;
|
|
114
|
+
brandName: string;
|
|
115
|
+
brandPrimary: string;
|
|
116
|
+
brandSecondary: string;
|
|
117
|
+
defaultTheme: ThemeOption;
|
|
118
|
+
wrapUsers(usersCollection: CollectionConfig): CollectionConfig;
|
|
119
|
+
wrapPagesCollection(pagesCollection: CollectionConfig): CollectionConfig;
|
|
120
|
+
wrapMediaCollection(mediaCollection: CollectionConfig): CollectionConfig;
|
|
121
|
+
wrapFormsCollection(formsCollection: CollectionConfig): CollectionConfig;
|
|
122
|
+
wrapFormSubmissionsCollection(formSubmissionsCollection: CollectionConfig): CollectionConfig;
|
|
123
|
+
wrapFormUploadsCollection(formUploadsCollection: CollectionConfig): CollectionConfig;
|
|
124
|
+
wrapGlobals(globals: GlobalConfig[]): GlobalConfig[];
|
|
125
|
+
};
|
|
126
|
+
declare function configureAdmin(config: AdminConfig): ConfiguredAdmin;
|
|
127
|
+
|
|
128
|
+
declare function withTooltips(fields: Field[], customTooltips?: Record<string, string>): Field[];
|
|
129
|
+
|
|
130
|
+
declare const createHeaderNavItemsField: () => Field;
|
|
131
|
+
|
|
132
|
+
type CreateSocialMediaConnectionsFieldOptions = {
|
|
133
|
+
description?: string;
|
|
134
|
+
label?: string;
|
|
135
|
+
name?: string;
|
|
136
|
+
platforms?: SocialMediaPlatform[];
|
|
137
|
+
};
|
|
138
|
+
declare const createSocialMediaConnectionsField: (options?: CreateSocialMediaConnectionsFieldOptions) => Field;
|
|
139
|
+
declare const socialMediaConnectionsField: Field;
|
|
140
|
+
|
|
141
|
+
type CreateSocialMediaGlobalOptions = {
|
|
142
|
+
description?: string;
|
|
143
|
+
fieldOptions?: Omit<CreateSocialMediaConnectionsFieldOptions, 'label' | 'name'>;
|
|
144
|
+
slug?: string;
|
|
145
|
+
};
|
|
146
|
+
declare const createSocialMediaGlobal: (options?: CreateSocialMediaGlobalOptions) => GlobalConfig;
|
|
147
|
+
|
|
148
|
+
type index_AdminConfig = AdminConfig;
|
|
149
|
+
type index_AdminStudioConfig = AdminStudioConfig;
|
|
150
|
+
type index_AdminStudioFooterPreviewConfig = AdminStudioFooterPreviewConfig;
|
|
151
|
+
type index_AdminStudioHeaderPreviewConfig = AdminStudioHeaderPreviewConfig;
|
|
152
|
+
type index_AdminStudioSitePreviewConfig = AdminStudioSitePreviewConfig;
|
|
153
|
+
type index_CreateSocialMediaConnectionsFieldOptions = CreateSocialMediaConnectionsFieldOptions;
|
|
154
|
+
type index_CreateSocialMediaGlobalOptions = CreateSocialMediaGlobalOptions;
|
|
155
|
+
type index_ResolvedStudioDashboardPanel = ResolvedStudioDashboardPanel;
|
|
156
|
+
type index_ResolvedStudioSection = ResolvedStudioSection;
|
|
157
|
+
declare const index_SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM: typeof SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM;
|
|
158
|
+
declare const index_SOCIAL_MEDIA_ICON_OPTIONS: typeof SOCIAL_MEDIA_ICON_OPTIONS;
|
|
159
|
+
declare const index_SOCIAL_MEDIA_PLATFORMS: typeof SOCIAL_MEDIA_PLATFORMS;
|
|
160
|
+
declare const index_SOCIAL_MEDIA_PLATFORM_LABELS: typeof SOCIAL_MEDIA_PLATFORM_LABELS;
|
|
161
|
+
declare const index_SocialMediaGlobalData: typeof SocialMediaGlobalData;
|
|
162
|
+
declare const index_SocialMediaIconLibrary: typeof SocialMediaIconLibrary;
|
|
163
|
+
declare const index_SocialMediaIconOption: typeof SocialMediaIconOption;
|
|
164
|
+
declare const index_SocialMediaPlatform: typeof SocialMediaPlatform;
|
|
165
|
+
declare const index_SocialMediaProfileData: typeof SocialMediaProfileData;
|
|
166
|
+
declare const index_SocialMediaProfilesData: typeof SocialMediaProfilesData;
|
|
167
|
+
type index_StudioDashboardPanel = StudioDashboardPanel;
|
|
168
|
+
type index_StudioDashboardPanelSpan = StudioDashboardPanelSpan;
|
|
169
|
+
type index_StudioGlobalLink = StudioGlobalLink;
|
|
170
|
+
type index_StudioSection = StudioSection;
|
|
171
|
+
type index_StudioSectionCard = StudioSectionCard;
|
|
172
|
+
type index_StudioSectionComponent = StudioSectionComponent;
|
|
173
|
+
type index_StudioSectionRole = StudioSectionRole;
|
|
174
|
+
type index_StudioSectionView = StudioSectionView;
|
|
175
|
+
declare const index_configureAdmin: typeof configureAdmin;
|
|
176
|
+
declare const index_createHeaderNavItemsField: typeof createHeaderNavItemsField;
|
|
177
|
+
declare const index_createSocialMediaConnectionsField: typeof createSocialMediaConnectionsField;
|
|
178
|
+
declare const index_createSocialMediaGlobal: typeof createSocialMediaGlobal;
|
|
179
|
+
declare const index_createThemePreferenceField: typeof createThemePreferenceField;
|
|
180
|
+
declare const index_socialMediaConnectionsField: typeof socialMediaConnectionsField;
|
|
181
|
+
declare const index_themePreferenceField: typeof themePreferenceField;
|
|
182
|
+
declare const index_withTooltips: typeof withTooltips;
|
|
183
|
+
declare namespace index {
|
|
184
|
+
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 };
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
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 };
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Field, CollectionConfig, GlobalConfig } from 'payload';
|
|
2
|
+
import { a as AdminNavIcon, e as SitePreviewLink, f as SitePreviewLocationSummary } from './sitePreviewTypes-BkHCWxNW.js';
|
|
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';
|
|
4
|
+
|
|
5
|
+
type ThemeOption = 'light' | 'dark' | 'brand-light' | 'brand-dark';
|
|
6
|
+
declare const createThemePreferenceField: (defaultTheme?: ThemeOption) => Field;
|
|
7
|
+
declare const themePreferenceField: Field;
|
|
8
|
+
|
|
9
|
+
type StudioSectionRole = 'admin' | 'editor' | 'client';
|
|
10
|
+
type StudioSectionCard = {
|
|
11
|
+
description?: string;
|
|
12
|
+
title: string;
|
|
13
|
+
};
|
|
14
|
+
type StudioSectionComponent = {
|
|
15
|
+
clientProps?: Record<string, unknown>;
|
|
16
|
+
exportName: string;
|
|
17
|
+
path: string;
|
|
18
|
+
};
|
|
19
|
+
type StudioSectionView = {
|
|
20
|
+
Component: StudioSectionComponent;
|
|
21
|
+
path: string;
|
|
22
|
+
};
|
|
23
|
+
type StudioDashboardPanelSpan = 'full' | 'half';
|
|
24
|
+
type StudioDashboardPanel = {
|
|
25
|
+
Component: StudioSectionComponent;
|
|
26
|
+
priority?: number;
|
|
27
|
+
roles?: StudioSectionRole[];
|
|
28
|
+
span?: StudioDashboardPanelSpan;
|
|
29
|
+
};
|
|
30
|
+
type StudioSection = {
|
|
31
|
+
card?: StudioSectionCard;
|
|
32
|
+
dashboard?: StudioDashboardPanel;
|
|
33
|
+
href?: string;
|
|
34
|
+
id: string;
|
|
35
|
+
icon?: AdminNavIcon;
|
|
36
|
+
label: string;
|
|
37
|
+
matchPrefixes?: string[];
|
|
38
|
+
roles?: StudioSectionRole[];
|
|
39
|
+
view?: StudioSectionView;
|
|
40
|
+
};
|
|
41
|
+
type ResolvedStudioSection = {
|
|
42
|
+
card?: StudioSectionCard;
|
|
43
|
+
href: string;
|
|
44
|
+
id: string;
|
|
45
|
+
icon?: AdminNavIcon;
|
|
46
|
+
label: string;
|
|
47
|
+
matchPrefixes: string[];
|
|
48
|
+
roles?: StudioSectionRole[];
|
|
49
|
+
};
|
|
50
|
+
type ResolvedStudioDashboardPanel = {
|
|
51
|
+
Component: StudioSectionComponent;
|
|
52
|
+
href: string;
|
|
53
|
+
id: string;
|
|
54
|
+
label: string;
|
|
55
|
+
priority: number;
|
|
56
|
+
roles?: StudioSectionRole[];
|
|
57
|
+
span: StudioDashboardPanelSpan;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
type StudioGlobalLink = {
|
|
61
|
+
description?: string;
|
|
62
|
+
href?: string;
|
|
63
|
+
label: string;
|
|
64
|
+
slug: string;
|
|
65
|
+
};
|
|
66
|
+
type AdminStudioHeaderPreviewConfig = {
|
|
67
|
+
actionHref?: string;
|
|
68
|
+
actionLabel?: string;
|
|
69
|
+
};
|
|
70
|
+
type AdminStudioFooterPreviewConfig = {
|
|
71
|
+
builtByHref?: string;
|
|
72
|
+
builtByLabel?: string;
|
|
73
|
+
description?: string;
|
|
74
|
+
footerCategories?: string[];
|
|
75
|
+
footerLinks?: SitePreviewLink[];
|
|
76
|
+
};
|
|
77
|
+
type AdminStudioSitePreviewConfig = {
|
|
78
|
+
footer?: AdminStudioFooterPreviewConfig;
|
|
79
|
+
header?: AdminStudioHeaderPreviewConfig;
|
|
80
|
+
locationSummary?: SitePreviewLocationSummary;
|
|
81
|
+
};
|
|
82
|
+
interface AdminStudioConfig {
|
|
83
|
+
enabled?: boolean;
|
|
84
|
+
forms?: {
|
|
85
|
+
collectionSlug?: string;
|
|
86
|
+
enabled?: boolean;
|
|
87
|
+
submissionsCollectionSlug?: string;
|
|
88
|
+
uploadsCollectionSlug?: string;
|
|
89
|
+
};
|
|
90
|
+
globals?: StudioGlobalLink[];
|
|
91
|
+
media?: {
|
|
92
|
+
collectionSlug?: string;
|
|
93
|
+
};
|
|
94
|
+
pages?: {
|
|
95
|
+
builderBasePath?: string;
|
|
96
|
+
collectionSlug?: string;
|
|
97
|
+
};
|
|
98
|
+
sitePreview?: AdminStudioSitePreviewConfig;
|
|
99
|
+
sections?: StudioSection[];
|
|
100
|
+
}
|
|
101
|
+
interface AdminConfig {
|
|
102
|
+
allowThemePreference?: boolean;
|
|
103
|
+
brandName: string;
|
|
104
|
+
brandPrimary?: string;
|
|
105
|
+
brandSecondary?: string;
|
|
106
|
+
defaultTheme?: ThemeOption;
|
|
107
|
+
logoUrl?: string;
|
|
108
|
+
basePath?: string;
|
|
109
|
+
studio?: AdminStudioConfig;
|
|
110
|
+
userSessionDurationSeconds?: number;
|
|
111
|
+
}
|
|
112
|
+
type ConfiguredAdmin = {
|
|
113
|
+
admin: Record<string, unknown>;
|
|
114
|
+
brandName: string;
|
|
115
|
+
brandPrimary: string;
|
|
116
|
+
brandSecondary: string;
|
|
117
|
+
defaultTheme: ThemeOption;
|
|
118
|
+
wrapUsers(usersCollection: CollectionConfig): CollectionConfig;
|
|
119
|
+
wrapPagesCollection(pagesCollection: CollectionConfig): CollectionConfig;
|
|
120
|
+
wrapMediaCollection(mediaCollection: CollectionConfig): CollectionConfig;
|
|
121
|
+
wrapFormsCollection(formsCollection: CollectionConfig): CollectionConfig;
|
|
122
|
+
wrapFormSubmissionsCollection(formSubmissionsCollection: CollectionConfig): CollectionConfig;
|
|
123
|
+
wrapFormUploadsCollection(formUploadsCollection: CollectionConfig): CollectionConfig;
|
|
124
|
+
wrapGlobals(globals: GlobalConfig[]): GlobalConfig[];
|
|
125
|
+
};
|
|
126
|
+
declare function configureAdmin(config: AdminConfig): ConfiguredAdmin;
|
|
127
|
+
|
|
128
|
+
declare function withTooltips(fields: Field[], customTooltips?: Record<string, string>): Field[];
|
|
129
|
+
|
|
130
|
+
declare const createHeaderNavItemsField: () => Field;
|
|
131
|
+
|
|
132
|
+
type CreateSocialMediaConnectionsFieldOptions = {
|
|
133
|
+
description?: string;
|
|
134
|
+
label?: string;
|
|
135
|
+
name?: string;
|
|
136
|
+
platforms?: SocialMediaPlatform[];
|
|
137
|
+
};
|
|
138
|
+
declare const createSocialMediaConnectionsField: (options?: CreateSocialMediaConnectionsFieldOptions) => Field;
|
|
139
|
+
declare const socialMediaConnectionsField: Field;
|
|
140
|
+
|
|
141
|
+
type CreateSocialMediaGlobalOptions = {
|
|
142
|
+
description?: string;
|
|
143
|
+
fieldOptions?: Omit<CreateSocialMediaConnectionsFieldOptions, 'label' | 'name'>;
|
|
144
|
+
slug?: string;
|
|
145
|
+
};
|
|
146
|
+
declare const createSocialMediaGlobal: (options?: CreateSocialMediaGlobalOptions) => GlobalConfig;
|
|
147
|
+
|
|
148
|
+
type index_AdminConfig = AdminConfig;
|
|
149
|
+
type index_AdminStudioConfig = AdminStudioConfig;
|
|
150
|
+
type index_AdminStudioFooterPreviewConfig = AdminStudioFooterPreviewConfig;
|
|
151
|
+
type index_AdminStudioHeaderPreviewConfig = AdminStudioHeaderPreviewConfig;
|
|
152
|
+
type index_AdminStudioSitePreviewConfig = AdminStudioSitePreviewConfig;
|
|
153
|
+
type index_CreateSocialMediaConnectionsFieldOptions = CreateSocialMediaConnectionsFieldOptions;
|
|
154
|
+
type index_CreateSocialMediaGlobalOptions = CreateSocialMediaGlobalOptions;
|
|
155
|
+
type index_ResolvedStudioDashboardPanel = ResolvedStudioDashboardPanel;
|
|
156
|
+
type index_ResolvedStudioSection = ResolvedStudioSection;
|
|
157
|
+
declare const index_SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM: typeof SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM;
|
|
158
|
+
declare const index_SOCIAL_MEDIA_ICON_OPTIONS: typeof SOCIAL_MEDIA_ICON_OPTIONS;
|
|
159
|
+
declare const index_SOCIAL_MEDIA_PLATFORMS: typeof SOCIAL_MEDIA_PLATFORMS;
|
|
160
|
+
declare const index_SOCIAL_MEDIA_PLATFORM_LABELS: typeof SOCIAL_MEDIA_PLATFORM_LABELS;
|
|
161
|
+
declare const index_SocialMediaGlobalData: typeof SocialMediaGlobalData;
|
|
162
|
+
declare const index_SocialMediaIconLibrary: typeof SocialMediaIconLibrary;
|
|
163
|
+
declare const index_SocialMediaIconOption: typeof SocialMediaIconOption;
|
|
164
|
+
declare const index_SocialMediaPlatform: typeof SocialMediaPlatform;
|
|
165
|
+
declare const index_SocialMediaProfileData: typeof SocialMediaProfileData;
|
|
166
|
+
declare const index_SocialMediaProfilesData: typeof SocialMediaProfilesData;
|
|
167
|
+
type index_StudioDashboardPanel = StudioDashboardPanel;
|
|
168
|
+
type index_StudioDashboardPanelSpan = StudioDashboardPanelSpan;
|
|
169
|
+
type index_StudioGlobalLink = StudioGlobalLink;
|
|
170
|
+
type index_StudioSection = StudioSection;
|
|
171
|
+
type index_StudioSectionCard = StudioSectionCard;
|
|
172
|
+
type index_StudioSectionComponent = StudioSectionComponent;
|
|
173
|
+
type index_StudioSectionRole = StudioSectionRole;
|
|
174
|
+
type index_StudioSectionView = StudioSectionView;
|
|
175
|
+
declare const index_configureAdmin: typeof configureAdmin;
|
|
176
|
+
declare const index_createHeaderNavItemsField: typeof createHeaderNavItemsField;
|
|
177
|
+
declare const index_createSocialMediaConnectionsField: typeof createSocialMediaConnectionsField;
|
|
178
|
+
declare const index_createSocialMediaGlobal: typeof createSocialMediaGlobal;
|
|
179
|
+
declare const index_createThemePreferenceField: typeof createThemePreferenceField;
|
|
180
|
+
declare const index_socialMediaConnectionsField: typeof socialMediaConnectionsField;
|
|
181
|
+
declare const index_themePreferenceField: typeof themePreferenceField;
|
|
182
|
+
declare const index_withTooltips: typeof withTooltips;
|
|
183
|
+
declare namespace index {
|
|
184
|
+
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 };
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
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
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -242,7 +242,8 @@ function configureAdmin(config) {
|
|
|
242
242
|
brandSecondary = "#8b5cf6",
|
|
243
243
|
defaultTheme = "brand-light",
|
|
244
244
|
logoUrl,
|
|
245
|
-
allowThemePreference = false
|
|
245
|
+
allowThemePreference = false,
|
|
246
|
+
userSessionDurationSeconds = 60 * 60 * 24
|
|
246
247
|
} = config;
|
|
247
248
|
const studioEnabled = config.studio?.enabled ?? true;
|
|
248
249
|
const formsEnabled = config.studio?.forms?.enabled ?? false;
|
|
@@ -528,6 +529,12 @@ function configureAdmin(config) {
|
|
|
528
529
|
}
|
|
529
530
|
}
|
|
530
531
|
],
|
|
532
|
+
afterLogin: [
|
|
533
|
+
{
|
|
534
|
+
exportName: "AdminLoginPasswordToggle",
|
|
535
|
+
path: clientPath
|
|
536
|
+
}
|
|
537
|
+
],
|
|
531
538
|
...allowThemePreference ? {
|
|
532
539
|
afterNavLinks: [
|
|
533
540
|
{
|
|
@@ -554,8 +561,17 @@ function configureAdmin(config) {
|
|
|
554
561
|
const hasThemePreference = existingFields.some(
|
|
555
562
|
(field) => typeof field === "object" && field !== null && "name" in field && field.name === "themePreference"
|
|
556
563
|
);
|
|
564
|
+
const normalizedAuth = usersCollection.auth === true ? {
|
|
565
|
+
tokenExpiration: userSessionDurationSeconds,
|
|
566
|
+
useSessions: true
|
|
567
|
+
} : usersCollection.auth && typeof usersCollection.auth === "object" ? {
|
|
568
|
+
...usersCollection.auth,
|
|
569
|
+
tokenExpiration: usersCollection.auth.tokenExpiration ?? userSessionDurationSeconds,
|
|
570
|
+
useSessions: usersCollection.auth.useSessions ?? true
|
|
571
|
+
} : usersCollection.auth;
|
|
557
572
|
const nextCollection = {
|
|
558
573
|
...usersCollection,
|
|
574
|
+
auth: normalizedAuth,
|
|
559
575
|
fields: !allowThemePreference || hasThemePreference ? existingFields : [...existingFields, createThemePreferenceField(defaultTheme)]
|
|
560
576
|
};
|
|
561
577
|
return attachStudioBackBreadcrumbToCollection(nextCollection);
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED