@orion-studios/payload-studio 0.5.0-beta.11 → 0.5.0-beta.110
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/README.md +54 -0
- package/dist/admin/client.d.mts +3 -0
- package/dist/admin/client.d.ts +3 -0
- package/dist/admin/client.js +1745 -200
- package/dist/admin/client.mjs +1756 -214
- package/dist/admin/index.d.mts +2 -1
- package/dist/admin/index.d.ts +2 -1
- package/dist/admin/index.js +424 -11
- package/dist/admin/index.mjs +19 -1
- package/dist/admin-app/client.d.mts +7 -0
- package/dist/admin-app/client.d.ts +7 -0
- package/dist/admin-app/client.js +1262 -3
- package/dist/admin-app/client.mjs +1164 -2
- package/dist/admin-app/index.d.mts +1 -1
- package/dist/admin-app/index.d.ts +1 -1
- package/dist/admin-app/index.js +167 -0
- package/dist/admin-app/index.mjs +13 -1
- package/dist/admin-app/styles.css +247 -0
- package/dist/admin.css +8 -0
- package/dist/blocks/index.js +1011 -191
- package/dist/blocks/index.mjs +2 -2
- package/dist/chunk-ADIIWIYL.mjs +322 -0
- package/dist/{chunk-ZLLNO5FM.mjs → chunk-BET2YLAS.mjs} +104 -15
- package/dist/chunk-DAIZDGHL.mjs +614 -0
- package/dist/chunk-GKMBYYXF.mjs +776 -0
- package/dist/chunk-JQAHXYAM.mjs +1829 -0
- package/dist/chunk-OQSEJXC4.mjs +166 -0
- package/dist/chunk-PF3EBZXF.mjs +326 -0
- package/dist/chunk-ROTPP5CU.mjs +99 -0
- package/dist/chunk-XVH5SCBD.mjs +234 -0
- package/dist/chunk-ZTXJG4K5.mjs +85 -0
- package/dist/index-B7QvY3yF.d.mts +245 -0
- package/dist/index-BK03FiEM.d.ts +245 -0
- package/dist/{index-CmR6NInu.d.ts → index-BzKOThsI.d.mts} +30 -3
- package/dist/{index-CmR6NInu.d.mts → index-BzKOThsI.d.ts} +30 -3
- package/dist/{index-DbH0Ljwp.d.mts → index-D8BNfUJb.d.mts} +17 -2
- package/dist/{index-DbH0Ljwp.d.ts → index-DD_E2UfJ.d.ts} +17 -2
- package/dist/index-DUi_XND6.d.ts +193 -0
- package/dist/index-ZbOx4OCF.d.mts +128 -0
- package/dist/index-ZbOx4OCF.d.ts +128 -0
- package/dist/index-gLl_358v.d.mts +193 -0
- package/dist/index.d.mts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +2876 -460
- package/dist/index.mjs +12 -10
- package/dist/nextjs/index.d.mts +2 -1
- package/dist/nextjs/index.d.ts +2 -1
- package/dist/nextjs/index.js +497 -16
- package/dist/nextjs/index.mjs +8 -3
- package/dist/socialMedia-C05Iy-SV.d.mts +21 -0
- package/dist/socialMedia-C05Iy-SV.d.ts +21 -0
- package/dist/studio/index.d.mts +2 -1
- package/dist/studio/index.d.ts +2 -1
- package/dist/studio/index.js +171 -5
- package/dist/studio/index.mjs +7 -3
- package/dist/studio-pages/builder.css +517 -32
- package/dist/studio-pages/client.d.mts +75 -1
- package/dist/studio-pages/client.d.ts +75 -1
- package/dist/studio-pages/client.js +5662 -2759
- package/dist/studio-pages/client.mjs +5578 -2767
- package/dist/studio-pages/index.d.mts +4 -2
- package/dist/studio-pages/index.d.ts +4 -2
- package/dist/studio-pages/index.js +859 -71
- package/dist/studio-pages/index.mjs +10 -4
- package/package.json +35 -13
- package/dist/chunk-AAOHJDNS.mjs +0 -67
- package/dist/chunk-ETRRXURT.mjs +0 -141
- package/dist/chunk-J7W5EE3B.mjs +0 -278
- package/dist/chunk-N67KVM2S.mjs +0 -156
- package/dist/chunk-NESLJZFE.mjs +0 -303
- package/dist/chunk-U5BSPWAD.mjs +0 -1034
- package/dist/index-B9N5MyjF.d.mts +0 -39
- package/dist/index-BallJs-K.d.mts +0 -43
- package/dist/index-BallJs-K.d.ts +0 -43
- package/dist/index-DJFhANvJ.d.mts +0 -128
- package/dist/index-DJFhANvJ.d.ts +0 -128
- package/dist/index-g8tBHLKD.d.ts +0 -39
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { Field, CollectionConfig, GlobalConfig } from 'payload';
|
|
2
|
+
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';
|
|
3
|
+
|
|
4
|
+
type ThemeOption = 'light' | 'dark' | 'brand-light' | 'brand-dark';
|
|
5
|
+
declare const createThemePreferenceField: (defaultTheme?: ThemeOption) => Field;
|
|
6
|
+
declare const themePreferenceField: Field;
|
|
7
|
+
|
|
8
|
+
type StudioSectionRole = 'admin' | 'editor' | 'client';
|
|
9
|
+
type StudioSectionCard = {
|
|
10
|
+
description?: string;
|
|
11
|
+
title: string;
|
|
12
|
+
};
|
|
13
|
+
type StudioSectionComponent = {
|
|
14
|
+
clientProps?: Record<string, unknown>;
|
|
15
|
+
exportName: string;
|
|
16
|
+
path: string;
|
|
17
|
+
};
|
|
18
|
+
type StudioSectionView = {
|
|
19
|
+
Component: StudioSectionComponent;
|
|
20
|
+
path: string;
|
|
21
|
+
};
|
|
22
|
+
type StudioSection = {
|
|
23
|
+
card?: StudioSectionCard;
|
|
24
|
+
href?: string;
|
|
25
|
+
id: string;
|
|
26
|
+
label: string;
|
|
27
|
+
matchPrefixes?: string[];
|
|
28
|
+
roles?: StudioSectionRole[];
|
|
29
|
+
view?: StudioSectionView;
|
|
30
|
+
};
|
|
31
|
+
type ResolvedStudioSection = {
|
|
32
|
+
card?: StudioSectionCard;
|
|
33
|
+
href: string;
|
|
34
|
+
id: string;
|
|
35
|
+
label: string;
|
|
36
|
+
matchPrefixes: string[];
|
|
37
|
+
roles?: StudioSectionRole[];
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type StudioGlobalLink = {
|
|
41
|
+
description?: string;
|
|
42
|
+
href?: string;
|
|
43
|
+
label: string;
|
|
44
|
+
slug: string;
|
|
45
|
+
};
|
|
46
|
+
interface AdminStudioConfig {
|
|
47
|
+
enabled?: boolean;
|
|
48
|
+
forms?: {
|
|
49
|
+
collectionSlug?: string;
|
|
50
|
+
enabled?: boolean;
|
|
51
|
+
submissionsCollectionSlug?: string;
|
|
52
|
+
uploadsCollectionSlug?: string;
|
|
53
|
+
};
|
|
54
|
+
globals?: StudioGlobalLink[];
|
|
55
|
+
media?: {
|
|
56
|
+
collectionSlug?: string;
|
|
57
|
+
};
|
|
58
|
+
pages?: {
|
|
59
|
+
builderBasePath?: string;
|
|
60
|
+
collectionSlug?: string;
|
|
61
|
+
};
|
|
62
|
+
sections?: StudioSection[];
|
|
63
|
+
}
|
|
64
|
+
interface AdminConfig {
|
|
65
|
+
brandName: string;
|
|
66
|
+
brandPrimary?: string;
|
|
67
|
+
brandSecondary?: string;
|
|
68
|
+
defaultTheme?: ThemeOption;
|
|
69
|
+
logoUrl?: string;
|
|
70
|
+
basePath?: string;
|
|
71
|
+
studio?: AdminStudioConfig;
|
|
72
|
+
}
|
|
73
|
+
declare function configureAdmin(config: AdminConfig): {
|
|
74
|
+
admin: {
|
|
75
|
+
css: string;
|
|
76
|
+
components: {
|
|
77
|
+
graphics: {
|
|
78
|
+
Logo: {
|
|
79
|
+
exportName: string;
|
|
80
|
+
path: string;
|
|
81
|
+
clientProps: {
|
|
82
|
+
brandName: string;
|
|
83
|
+
logoUrl: string | undefined;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
Icon: {
|
|
87
|
+
exportName: string;
|
|
88
|
+
path: string;
|
|
89
|
+
clientProps: {
|
|
90
|
+
brandName: string;
|
|
91
|
+
logoUrl: string | undefined;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
views: {
|
|
96
|
+
studioForms?: {
|
|
97
|
+
path: "/studio-forms";
|
|
98
|
+
Component: {
|
|
99
|
+
exportName: string;
|
|
100
|
+
path: string;
|
|
101
|
+
clientProps: {
|
|
102
|
+
formsCollectionSlug: string;
|
|
103
|
+
formSubmissionsCollectionSlug: string;
|
|
104
|
+
formUploadsCollectionSlug: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
} | undefined;
|
|
108
|
+
studioGlobals?: {
|
|
109
|
+
path: "/studio-globals";
|
|
110
|
+
Component: {
|
|
111
|
+
exportName: string;
|
|
112
|
+
path: string;
|
|
113
|
+
clientProps: {
|
|
114
|
+
globals: StudioGlobalLink[];
|
|
115
|
+
globalsBasePath: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
} | undefined;
|
|
119
|
+
studioContactForm?: {
|
|
120
|
+
path: "/studio-contact-form";
|
|
121
|
+
Component: {
|
|
122
|
+
exportName: string;
|
|
123
|
+
path: string;
|
|
124
|
+
clientProps: {
|
|
125
|
+
globalSlug: string;
|
|
126
|
+
globalsBasePath: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
} | undefined;
|
|
130
|
+
dashboard: {
|
|
131
|
+
Component: {
|
|
132
|
+
exportName: string;
|
|
133
|
+
path: string;
|
|
134
|
+
clientProps: {
|
|
135
|
+
brandName: string;
|
|
136
|
+
logoUrl: string | undefined;
|
|
137
|
+
globalsBasePath: string;
|
|
138
|
+
globalsExtraMatchPrefixes: string[];
|
|
139
|
+
formSubmissionsCollectionSlug: string;
|
|
140
|
+
formsCollectionSlug: string;
|
|
141
|
+
formsEnabled: boolean;
|
|
142
|
+
formUploadsCollectionSlug: string;
|
|
143
|
+
mediaCollectionSlug: string;
|
|
144
|
+
pagesCollectionSlug: string;
|
|
145
|
+
sections: ResolvedStudioSection[];
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
providers: {
|
|
151
|
+
exportName: string;
|
|
152
|
+
path: string;
|
|
153
|
+
clientProps: {
|
|
154
|
+
defaultTheme: ThemeOption;
|
|
155
|
+
};
|
|
156
|
+
}[];
|
|
157
|
+
afterNavLinks: {
|
|
158
|
+
exportName: string;
|
|
159
|
+
path: string;
|
|
160
|
+
clientProps: {
|
|
161
|
+
defaultTheme: ThemeOption;
|
|
162
|
+
};
|
|
163
|
+
}[];
|
|
164
|
+
Nav?: {
|
|
165
|
+
exportName: string;
|
|
166
|
+
path: string;
|
|
167
|
+
clientProps: {
|
|
168
|
+
brandName: string;
|
|
169
|
+
logoUrl: string | undefined;
|
|
170
|
+
globalsBasePath: string;
|
|
171
|
+
globalsExtraMatchPrefixes: string[];
|
|
172
|
+
formSubmissionsCollectionSlug: string;
|
|
173
|
+
formsCollectionSlug: string;
|
|
174
|
+
formsEnabled: boolean;
|
|
175
|
+
formUploadsCollectionSlug: string;
|
|
176
|
+
mediaCollectionSlug: string;
|
|
177
|
+
pagesCollectionSlug: string;
|
|
178
|
+
sections: ResolvedStudioSection[];
|
|
179
|
+
};
|
|
180
|
+
} | undefined;
|
|
181
|
+
};
|
|
182
|
+
meta: {
|
|
183
|
+
titleSuffix: string;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
brandName: string;
|
|
187
|
+
brandPrimary: string;
|
|
188
|
+
brandSecondary: string;
|
|
189
|
+
defaultTheme: ThemeOption;
|
|
190
|
+
wrapUsers(usersCollection: CollectionConfig): CollectionConfig;
|
|
191
|
+
wrapGlobals(globals: GlobalConfig[]): GlobalConfig[];
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
declare function withTooltips(fields: Field[], customTooltips?: Record<string, string>): Field[];
|
|
195
|
+
|
|
196
|
+
declare const createHeaderNavItemsField: () => Field;
|
|
197
|
+
|
|
198
|
+
type CreateSocialMediaConnectionsFieldOptions = {
|
|
199
|
+
description?: string;
|
|
200
|
+
label?: string;
|
|
201
|
+
name?: string;
|
|
202
|
+
platforms?: SocialMediaPlatform[];
|
|
203
|
+
};
|
|
204
|
+
declare const createSocialMediaConnectionsField: (options?: CreateSocialMediaConnectionsFieldOptions) => Field;
|
|
205
|
+
declare const socialMediaConnectionsField: Field;
|
|
206
|
+
|
|
207
|
+
type CreateSocialMediaGlobalOptions = {
|
|
208
|
+
description?: string;
|
|
209
|
+
fieldOptions?: Omit<CreateSocialMediaConnectionsFieldOptions, 'label' | 'name'>;
|
|
210
|
+
slug?: string;
|
|
211
|
+
};
|
|
212
|
+
declare const createSocialMediaGlobal: (options?: CreateSocialMediaGlobalOptions) => GlobalConfig;
|
|
213
|
+
|
|
214
|
+
type index_AdminConfig = AdminConfig;
|
|
215
|
+
type index_CreateSocialMediaConnectionsFieldOptions = CreateSocialMediaConnectionsFieldOptions;
|
|
216
|
+
type index_CreateSocialMediaGlobalOptions = CreateSocialMediaGlobalOptions;
|
|
217
|
+
type index_ResolvedStudioSection = ResolvedStudioSection;
|
|
218
|
+
declare const index_SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM: typeof SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM;
|
|
219
|
+
declare const index_SOCIAL_MEDIA_ICON_OPTIONS: typeof SOCIAL_MEDIA_ICON_OPTIONS;
|
|
220
|
+
declare const index_SOCIAL_MEDIA_PLATFORMS: typeof SOCIAL_MEDIA_PLATFORMS;
|
|
221
|
+
declare const index_SOCIAL_MEDIA_PLATFORM_LABELS: typeof SOCIAL_MEDIA_PLATFORM_LABELS;
|
|
222
|
+
declare const index_SocialMediaGlobalData: typeof SocialMediaGlobalData;
|
|
223
|
+
declare const index_SocialMediaIconLibrary: typeof SocialMediaIconLibrary;
|
|
224
|
+
declare const index_SocialMediaIconOption: typeof SocialMediaIconOption;
|
|
225
|
+
declare const index_SocialMediaPlatform: typeof SocialMediaPlatform;
|
|
226
|
+
declare const index_SocialMediaProfileData: typeof SocialMediaProfileData;
|
|
227
|
+
declare const index_SocialMediaProfilesData: typeof SocialMediaProfilesData;
|
|
228
|
+
type index_StudioSection = StudioSection;
|
|
229
|
+
type index_StudioSectionCard = StudioSectionCard;
|
|
230
|
+
type index_StudioSectionComponent = StudioSectionComponent;
|
|
231
|
+
type index_StudioSectionRole = StudioSectionRole;
|
|
232
|
+
type index_StudioSectionView = StudioSectionView;
|
|
233
|
+
declare const index_configureAdmin: typeof configureAdmin;
|
|
234
|
+
declare const index_createHeaderNavItemsField: typeof createHeaderNavItemsField;
|
|
235
|
+
declare const index_createSocialMediaConnectionsField: typeof createSocialMediaConnectionsField;
|
|
236
|
+
declare const index_createSocialMediaGlobal: typeof createSocialMediaGlobal;
|
|
237
|
+
declare const index_createThemePreferenceField: typeof createThemePreferenceField;
|
|
238
|
+
declare const index_socialMediaConnectionsField: typeof socialMediaConnectionsField;
|
|
239
|
+
declare const index_themePreferenceField: typeof themePreferenceField;
|
|
240
|
+
declare const index_withTooltips: typeof withTooltips;
|
|
241
|
+
declare namespace index {
|
|
242
|
+
export { type index_AdminConfig as AdminConfig, type index_CreateSocialMediaConnectionsFieldOptions as CreateSocialMediaConnectionsFieldOptions, type index_CreateSocialMediaGlobalOptions as CreateSocialMediaGlobalOptions, 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_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 };
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export { type AdminConfig as A, type CreateSocialMediaConnectionsFieldOptions as C, type ResolvedStudioSection as R, type StudioSection as S, type CreateSocialMediaGlobalOptions as a, type StudioSectionCard as b, type StudioSectionComponent as c, type StudioSectionRole as d, type StudioSectionView as e, configureAdmin as f, createHeaderNavItemsField as g, createSocialMediaConnectionsField as h, index as i, createSocialMediaGlobal as j, createThemePreferenceField as k, socialMediaConnectionsField as s, themePreferenceField as t, withTooltips as w };
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
import { CollectionBeforeOperationHook, CollectionConfig } from 'payload';
|
|
2
|
+
|
|
3
|
+
type SupportedImageMimeType = 'image/avif' | 'image/jpeg' | 'image/jpg' | 'image/png' | 'image/tiff' | 'image/webp';
|
|
4
|
+
type ImageUploadOptimizationOptions = {
|
|
5
|
+
avifQuality?: number;
|
|
6
|
+
enforceSmallerForLossy?: boolean;
|
|
7
|
+
jpegQuality?: number;
|
|
8
|
+
minQualityFloor?: number;
|
|
9
|
+
pngCompressionLevel?: number;
|
|
10
|
+
skipAnimated?: boolean;
|
|
11
|
+
supportedMimeTypes?: SupportedImageMimeType[];
|
|
12
|
+
tiffQuality?: number;
|
|
13
|
+
webpQuality?: number;
|
|
14
|
+
minBytes?: number;
|
|
15
|
+
onlyIfSmaller?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const createImageUploadOptimizationHook: (options?: ImageUploadOptimizationOptions) => CollectionBeforeOperationHook;
|
|
18
|
+
declare const withImageUploadOptimization: <T extends CollectionConfig>(collection: T, options?: ImageUploadOptimizationOptions) => T;
|
|
19
|
+
|
|
1
20
|
type StudioNodeData = Record<string, unknown>;
|
|
2
21
|
type StudioNode = {
|
|
3
22
|
id: string;
|
|
@@ -41,9 +60,12 @@ type StudioPaletteGroup = {
|
|
|
41
60
|
label: string;
|
|
42
61
|
};
|
|
43
62
|
type StudioInspectorField = {
|
|
63
|
+
advanced?: boolean;
|
|
64
|
+
group?: 'advanced' | 'basics' | 'layout' | 'media' | 'style' | 'typography' | string;
|
|
65
|
+
inlineEditable?: boolean;
|
|
44
66
|
key: string;
|
|
45
67
|
label: string;
|
|
46
|
-
type: 'array' | 'checkbox' | 'number' | 'select' | 'text' | 'textarea';
|
|
68
|
+
type: 'array' | 'checkbox' | 'color' | 'number' | 'search' | 'select' | 'text' | 'textarea';
|
|
47
69
|
};
|
|
48
70
|
type StudioInspectorPanel = {
|
|
49
71
|
fields: StudioInspectorField[];
|
|
@@ -82,6 +104,7 @@ type StudioRegistry = {
|
|
|
82
104
|
type StudioPageService = {
|
|
83
105
|
getPageForStudio: (pageID: string) => Promise<{
|
|
84
106
|
id: string;
|
|
107
|
+
slug?: string;
|
|
85
108
|
studioDocument: StudioDocumentV1;
|
|
86
109
|
title: string;
|
|
87
110
|
}>;
|
|
@@ -102,6 +125,7 @@ declare function validateStudioDocument(document: StudioDocumentV1, modules: Stu
|
|
|
102
125
|
declare function compileStudioDocument(document: StudioDocumentV1, modules: StudioModuleManifest[]): StudioCompileResult;
|
|
103
126
|
declare function migrateStudioDocument(value: unknown, migrations: StudioMigration[]): StudioDocumentV1;
|
|
104
127
|
|
|
128
|
+
type index_ImageUploadOptimizationOptions = ImageUploadOptimizationOptions;
|
|
105
129
|
type index_StudioCompileResult = StudioCompileResult;
|
|
106
130
|
type index_StudioDocumentV1 = StudioDocumentV1;
|
|
107
131
|
type index_StudioInspectorField = StudioInspectorField;
|
|
@@ -117,14 +141,17 @@ type index_StudioPaletteItem = StudioPaletteItem;
|
|
|
117
141
|
type index_StudioPermission = StudioPermission;
|
|
118
142
|
type index_StudioRegistry = StudioRegistry;
|
|
119
143
|
type index_StudioValidationIssue = StudioValidationIssue;
|
|
144
|
+
type index_SupportedImageMimeType = SupportedImageMimeType;
|
|
120
145
|
declare const index_assertStudioDocumentV1: typeof assertStudioDocumentV1;
|
|
121
146
|
declare const index_compileStudioDocument: typeof compileStudioDocument;
|
|
122
147
|
declare const index_createEmptyStudioDocument: typeof createEmptyStudioDocument;
|
|
148
|
+
declare const index_createImageUploadOptimizationHook: typeof createImageUploadOptimizationHook;
|
|
123
149
|
declare const index_createStudioRegistry: typeof createStudioRegistry;
|
|
124
150
|
declare const index_migrateStudioDocument: typeof migrateStudioDocument;
|
|
125
151
|
declare const index_validateStudioDocument: typeof validateStudioDocument;
|
|
152
|
+
declare const index_withImageUploadOptimization: typeof withImageUploadOptimization;
|
|
126
153
|
declare namespace index {
|
|
127
|
-
export { type index_StudioCompileResult as StudioCompileResult, type index_StudioDocumentV1 as StudioDocumentV1, type index_StudioInspectorField as StudioInspectorField, type index_StudioInspectorPanel as StudioInspectorPanel, type index_StudioMigration as StudioMigration, type index_StudioModuleManifest as StudioModuleManifest, type index_StudioNode as StudioNode, type index_StudioNodeData as StudioNodeData, type index_StudioNodeTypeDefinition as StudioNodeTypeDefinition, type index_StudioPageService as StudioPageService, type index_StudioPaletteGroup as StudioPaletteGroup, type index_StudioPaletteItem as StudioPaletteItem, type index_StudioPermission as StudioPermission, type index_StudioRegistry as StudioRegistry, type index_StudioValidationIssue as StudioValidationIssue, index_assertStudioDocumentV1 as assertStudioDocumentV1, index_compileStudioDocument as compileStudioDocument, index_createEmptyStudioDocument as createEmptyStudioDocument, index_createStudioRegistry as createStudioRegistry, index_migrateStudioDocument as migrateStudioDocument, index_validateStudioDocument as validateStudioDocument };
|
|
154
|
+
export { type index_ImageUploadOptimizationOptions as ImageUploadOptimizationOptions, type index_StudioCompileResult as StudioCompileResult, type index_StudioDocumentV1 as StudioDocumentV1, type index_StudioInspectorField as StudioInspectorField, type index_StudioInspectorPanel as StudioInspectorPanel, type index_StudioMigration as StudioMigration, type index_StudioModuleManifest as StudioModuleManifest, type index_StudioNode as StudioNode, type index_StudioNodeData as StudioNodeData, type index_StudioNodeTypeDefinition as StudioNodeTypeDefinition, type index_StudioPageService as StudioPageService, type index_StudioPaletteGroup as StudioPaletteGroup, type index_StudioPaletteItem as StudioPaletteItem, type index_StudioPermission as StudioPermission, type index_StudioRegistry as StudioRegistry, type index_StudioValidationIssue as StudioValidationIssue, type index_SupportedImageMimeType as SupportedImageMimeType, index_assertStudioDocumentV1 as assertStudioDocumentV1, index_compileStudioDocument as compileStudioDocument, index_createEmptyStudioDocument as createEmptyStudioDocument, index_createImageUploadOptimizationHook as createImageUploadOptimizationHook, index_createStudioRegistry as createStudioRegistry, index_migrateStudioDocument as migrateStudioDocument, index_validateStudioDocument as validateStudioDocument, index_withImageUploadOptimization as withImageUploadOptimization };
|
|
128
155
|
}
|
|
129
156
|
|
|
130
|
-
export { type StudioDocumentV1 as S, type StudioNodeTypeDefinition as a, type StudioModuleManifest as b, type StudioCompileResult as c, type StudioInspectorField as d, type StudioInspectorPanel as e, type StudioMigration as f, type StudioNode as g, type StudioNodeData as h, index as i, type StudioPageService as j, type StudioPaletteGroup as k, type StudioPaletteItem as l, type StudioPermission as m, type StudioRegistry as n, type StudioValidationIssue as o,
|
|
157
|
+
export { type ImageUploadOptimizationOptions as I, type StudioDocumentV1 as S, type StudioNodeTypeDefinition as a, type StudioModuleManifest as b, type StudioCompileResult as c, type StudioInspectorField as d, type StudioInspectorPanel as e, type StudioMigration as f, type StudioNode as g, type StudioNodeData as h, index as i, type StudioPageService as j, type StudioPaletteGroup as k, type StudioPaletteItem as l, type StudioPermission as m, type StudioRegistry as n, type StudioValidationIssue as o, type SupportedImageMimeType as p, assertStudioDocumentV1 as q, compileStudioDocument as r, createEmptyStudioDocument as s, createImageUploadOptimizationHook as t, createStudioRegistry as u, migrateStudioDocument as v, validateStudioDocument as w, withImageUploadOptimization as x };
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
import { CollectionBeforeOperationHook, CollectionConfig } from 'payload';
|
|
2
|
+
|
|
3
|
+
type SupportedImageMimeType = 'image/avif' | 'image/jpeg' | 'image/jpg' | 'image/png' | 'image/tiff' | 'image/webp';
|
|
4
|
+
type ImageUploadOptimizationOptions = {
|
|
5
|
+
avifQuality?: number;
|
|
6
|
+
enforceSmallerForLossy?: boolean;
|
|
7
|
+
jpegQuality?: number;
|
|
8
|
+
minQualityFloor?: number;
|
|
9
|
+
pngCompressionLevel?: number;
|
|
10
|
+
skipAnimated?: boolean;
|
|
11
|
+
supportedMimeTypes?: SupportedImageMimeType[];
|
|
12
|
+
tiffQuality?: number;
|
|
13
|
+
webpQuality?: number;
|
|
14
|
+
minBytes?: number;
|
|
15
|
+
onlyIfSmaller?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const createImageUploadOptimizationHook: (options?: ImageUploadOptimizationOptions) => CollectionBeforeOperationHook;
|
|
18
|
+
declare const withImageUploadOptimization: <T extends CollectionConfig>(collection: T, options?: ImageUploadOptimizationOptions) => T;
|
|
19
|
+
|
|
1
20
|
type StudioNodeData = Record<string, unknown>;
|
|
2
21
|
type StudioNode = {
|
|
3
22
|
id: string;
|
|
@@ -41,9 +60,12 @@ type StudioPaletteGroup = {
|
|
|
41
60
|
label: string;
|
|
42
61
|
};
|
|
43
62
|
type StudioInspectorField = {
|
|
63
|
+
advanced?: boolean;
|
|
64
|
+
group?: 'advanced' | 'basics' | 'layout' | 'media' | 'style' | 'typography' | string;
|
|
65
|
+
inlineEditable?: boolean;
|
|
44
66
|
key: string;
|
|
45
67
|
label: string;
|
|
46
|
-
type: 'array' | 'checkbox' | 'number' | 'select' | 'text' | 'textarea';
|
|
68
|
+
type: 'array' | 'checkbox' | 'color' | 'number' | 'search' | 'select' | 'text' | 'textarea';
|
|
47
69
|
};
|
|
48
70
|
type StudioInspectorPanel = {
|
|
49
71
|
fields: StudioInspectorField[];
|
|
@@ -82,6 +104,7 @@ type StudioRegistry = {
|
|
|
82
104
|
type StudioPageService = {
|
|
83
105
|
getPageForStudio: (pageID: string) => Promise<{
|
|
84
106
|
id: string;
|
|
107
|
+
slug?: string;
|
|
85
108
|
studioDocument: StudioDocumentV1;
|
|
86
109
|
title: string;
|
|
87
110
|
}>;
|
|
@@ -102,6 +125,7 @@ declare function validateStudioDocument(document: StudioDocumentV1, modules: Stu
|
|
|
102
125
|
declare function compileStudioDocument(document: StudioDocumentV1, modules: StudioModuleManifest[]): StudioCompileResult;
|
|
103
126
|
declare function migrateStudioDocument(value: unknown, migrations: StudioMigration[]): StudioDocumentV1;
|
|
104
127
|
|
|
128
|
+
type index_ImageUploadOptimizationOptions = ImageUploadOptimizationOptions;
|
|
105
129
|
type index_StudioCompileResult = StudioCompileResult;
|
|
106
130
|
type index_StudioDocumentV1 = StudioDocumentV1;
|
|
107
131
|
type index_StudioInspectorField = StudioInspectorField;
|
|
@@ -117,14 +141,17 @@ type index_StudioPaletteItem = StudioPaletteItem;
|
|
|
117
141
|
type index_StudioPermission = StudioPermission;
|
|
118
142
|
type index_StudioRegistry = StudioRegistry;
|
|
119
143
|
type index_StudioValidationIssue = StudioValidationIssue;
|
|
144
|
+
type index_SupportedImageMimeType = SupportedImageMimeType;
|
|
120
145
|
declare const index_assertStudioDocumentV1: typeof assertStudioDocumentV1;
|
|
121
146
|
declare const index_compileStudioDocument: typeof compileStudioDocument;
|
|
122
147
|
declare const index_createEmptyStudioDocument: typeof createEmptyStudioDocument;
|
|
148
|
+
declare const index_createImageUploadOptimizationHook: typeof createImageUploadOptimizationHook;
|
|
123
149
|
declare const index_createStudioRegistry: typeof createStudioRegistry;
|
|
124
150
|
declare const index_migrateStudioDocument: typeof migrateStudioDocument;
|
|
125
151
|
declare const index_validateStudioDocument: typeof validateStudioDocument;
|
|
152
|
+
declare const index_withImageUploadOptimization: typeof withImageUploadOptimization;
|
|
126
153
|
declare namespace index {
|
|
127
|
-
export { type index_StudioCompileResult as StudioCompileResult, type index_StudioDocumentV1 as StudioDocumentV1, type index_StudioInspectorField as StudioInspectorField, type index_StudioInspectorPanel as StudioInspectorPanel, type index_StudioMigration as StudioMigration, type index_StudioModuleManifest as StudioModuleManifest, type index_StudioNode as StudioNode, type index_StudioNodeData as StudioNodeData, type index_StudioNodeTypeDefinition as StudioNodeTypeDefinition, type index_StudioPageService as StudioPageService, type index_StudioPaletteGroup as StudioPaletteGroup, type index_StudioPaletteItem as StudioPaletteItem, type index_StudioPermission as StudioPermission, type index_StudioRegistry as StudioRegistry, type index_StudioValidationIssue as StudioValidationIssue, index_assertStudioDocumentV1 as assertStudioDocumentV1, index_compileStudioDocument as compileStudioDocument, index_createEmptyStudioDocument as createEmptyStudioDocument, index_createStudioRegistry as createStudioRegistry, index_migrateStudioDocument as migrateStudioDocument, index_validateStudioDocument as validateStudioDocument };
|
|
154
|
+
export { type index_ImageUploadOptimizationOptions as ImageUploadOptimizationOptions, type index_StudioCompileResult as StudioCompileResult, type index_StudioDocumentV1 as StudioDocumentV1, type index_StudioInspectorField as StudioInspectorField, type index_StudioInspectorPanel as StudioInspectorPanel, type index_StudioMigration as StudioMigration, type index_StudioModuleManifest as StudioModuleManifest, type index_StudioNode as StudioNode, type index_StudioNodeData as StudioNodeData, type index_StudioNodeTypeDefinition as StudioNodeTypeDefinition, type index_StudioPageService as StudioPageService, type index_StudioPaletteGroup as StudioPaletteGroup, type index_StudioPaletteItem as StudioPaletteItem, type index_StudioPermission as StudioPermission, type index_StudioRegistry as StudioRegistry, type index_StudioValidationIssue as StudioValidationIssue, type index_SupportedImageMimeType as SupportedImageMimeType, index_assertStudioDocumentV1 as assertStudioDocumentV1, index_compileStudioDocument as compileStudioDocument, index_createEmptyStudioDocument as createEmptyStudioDocument, index_createImageUploadOptimizationHook as createImageUploadOptimizationHook, index_createStudioRegistry as createStudioRegistry, index_migrateStudioDocument as migrateStudioDocument, index_validateStudioDocument as validateStudioDocument, index_withImageUploadOptimization as withImageUploadOptimization };
|
|
128
155
|
}
|
|
129
156
|
|
|
130
|
-
export { type StudioDocumentV1 as S, type StudioNodeTypeDefinition as a, type StudioModuleManifest as b, type StudioCompileResult as c, type StudioInspectorField as d, type StudioInspectorPanel as e, type StudioMigration as f, type StudioNode as g, type StudioNodeData as h, index as i, type StudioPageService as j, type StudioPaletteGroup as k, type StudioPaletteItem as l, type StudioPermission as m, type StudioRegistry as n, type StudioValidationIssue as o,
|
|
157
|
+
export { type ImageUploadOptimizationOptions as I, type StudioDocumentV1 as S, type StudioNodeTypeDefinition as a, type StudioModuleManifest as b, type StudioCompileResult as c, type StudioInspectorField as d, type StudioInspectorPanel as e, type StudioMigration as f, type StudioNode as g, type StudioNodeData as h, index as i, type StudioPageService as j, type StudioPaletteGroup as k, type StudioPaletteItem as l, type StudioPermission as m, type StudioRegistry as n, type StudioValidationIssue as o, type SupportedImageMimeType as p, assertStudioDocumentV1 as q, compileStudioDocument as r, createEmptyStudioDocument as s, createImageUploadOptimizationHook as t, createStudioRegistry as u, migrateStudioDocument as v, validateStudioDocument as w, withImageUploadOptimization as x };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as payload from 'payload';
|
|
2
2
|
import { Payload } from 'payload';
|
|
3
|
+
import { S as SocialMediaGlobalData, a as SocialMediaPlatform } from './socialMedia-C05Iy-SV.mjs';
|
|
3
4
|
|
|
4
5
|
declare const WEBSITE_CONTENT_TAG = "website-content";
|
|
5
6
|
declare function createPayloadClient(config: any): () => Promise<payload.BasePayload>;
|
|
@@ -29,6 +30,7 @@ type SiteNavItem = {
|
|
|
29
30
|
id?: string;
|
|
30
31
|
label: string;
|
|
31
32
|
href: string;
|
|
33
|
+
parentHref?: string;
|
|
32
34
|
};
|
|
33
35
|
type SiteSettingsData = {
|
|
34
36
|
siteName?: string;
|
|
@@ -49,10 +51,12 @@ type FooterData = {
|
|
|
49
51
|
contactEmail?: string;
|
|
50
52
|
contactPhone?: string;
|
|
51
53
|
};
|
|
54
|
+
|
|
52
55
|
declare function createSiteQueries(getPayloadClient: () => Promise<Payload>, contentTag?: string): {
|
|
53
56
|
getSiteSettings: (draft?: boolean) => Promise<SiteSettingsData>;
|
|
54
57
|
getHeader: (draft?: boolean) => Promise<HeaderData>;
|
|
55
58
|
getFooter: (draft?: boolean) => Promise<FooterData>;
|
|
59
|
+
getSocialMedia: (draft?: boolean) => Promise<SocialMediaGlobalData>;
|
|
56
60
|
};
|
|
57
61
|
|
|
58
62
|
type MediaValue = number | string | {
|
|
@@ -66,17 +70,28 @@ declare function resolveMedia(media: MediaValue): {
|
|
|
66
70
|
alt: string;
|
|
67
71
|
} | null;
|
|
68
72
|
|
|
73
|
+
type ResolvedSocialMediaLink = {
|
|
74
|
+
icon: string;
|
|
75
|
+
label: string;
|
|
76
|
+
platform: SocialMediaPlatform;
|
|
77
|
+
url: string;
|
|
78
|
+
};
|
|
79
|
+
declare function resolveSocialMediaLinks(data: SocialMediaGlobalData | null | undefined): ResolvedSocialMediaLink[];
|
|
80
|
+
|
|
69
81
|
type index_FooterData = FooterData;
|
|
70
82
|
type index_HeaderData = HeaderData;
|
|
83
|
+
type index_ResolvedSocialMediaLink = ResolvedSocialMediaLink;
|
|
71
84
|
type index_SiteNavItem = SiteNavItem;
|
|
72
85
|
type index_SiteSettingsData = SiteSettingsData;
|
|
86
|
+
declare const index_SocialMediaGlobalData: typeof SocialMediaGlobalData;
|
|
73
87
|
declare const index_WEBSITE_CONTENT_TAG: typeof WEBSITE_CONTENT_TAG;
|
|
74
88
|
declare const index_createPageQueries: typeof createPageQueries;
|
|
75
89
|
declare const index_createPayloadClient: typeof createPayloadClient;
|
|
76
90
|
declare const index_createSiteQueries: typeof createSiteQueries;
|
|
77
91
|
declare const index_resolveMedia: typeof resolveMedia;
|
|
92
|
+
declare const index_resolveSocialMediaLinks: typeof resolveSocialMediaLinks;
|
|
78
93
|
declare namespace index {
|
|
79
|
-
export { type index_FooterData as FooterData, type index_HeaderData as HeaderData, type index_SiteNavItem as SiteNavItem, type index_SiteSettingsData as SiteSettingsData, index_WEBSITE_CONTENT_TAG as WEBSITE_CONTENT_TAG, index_createPageQueries as createPageQueries, index_createPayloadClient as createPayloadClient, index_createSiteQueries as createSiteQueries, index_resolveMedia as resolveMedia };
|
|
94
|
+
export { type index_FooterData as FooterData, type index_HeaderData as HeaderData, type index_ResolvedSocialMediaLink as ResolvedSocialMediaLink, type index_SiteNavItem as SiteNavItem, type index_SiteSettingsData as SiteSettingsData, index_SocialMediaGlobalData as SocialMediaGlobalData, index_WEBSITE_CONTENT_TAG as WEBSITE_CONTENT_TAG, index_createPageQueries as createPageQueries, index_createPayloadClient as createPayloadClient, index_createSiteQueries as createSiteQueries, index_resolveMedia as resolveMedia, index_resolveSocialMediaLinks as resolveSocialMediaLinks };
|
|
80
95
|
}
|
|
81
96
|
|
|
82
|
-
export { type FooterData as F, type HeaderData as H, type SiteNavItem as S, WEBSITE_CONTENT_TAG as W, type SiteSettingsData as a, createPayloadClient as b, createPageQueries as c, createSiteQueries as d, index as i, resolveMedia as r };
|
|
97
|
+
export { type FooterData as F, type HeaderData as H, type ResolvedSocialMediaLink as R, type SiteNavItem as S, WEBSITE_CONTENT_TAG as W, type SiteSettingsData as a, createPayloadClient as b, createPageQueries as c, createSiteQueries as d, resolveSocialMediaLinks as e, index as i, resolveMedia as r };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as payload from 'payload';
|
|
2
2
|
import { Payload } from 'payload';
|
|
3
|
+
import { S as SocialMediaGlobalData, a as SocialMediaPlatform } from './socialMedia-C05Iy-SV.js';
|
|
3
4
|
|
|
4
5
|
declare const WEBSITE_CONTENT_TAG = "website-content";
|
|
5
6
|
declare function createPayloadClient(config: any): () => Promise<payload.BasePayload>;
|
|
@@ -29,6 +30,7 @@ type SiteNavItem = {
|
|
|
29
30
|
id?: string;
|
|
30
31
|
label: string;
|
|
31
32
|
href: string;
|
|
33
|
+
parentHref?: string;
|
|
32
34
|
};
|
|
33
35
|
type SiteSettingsData = {
|
|
34
36
|
siteName?: string;
|
|
@@ -49,10 +51,12 @@ type FooterData = {
|
|
|
49
51
|
contactEmail?: string;
|
|
50
52
|
contactPhone?: string;
|
|
51
53
|
};
|
|
54
|
+
|
|
52
55
|
declare function createSiteQueries(getPayloadClient: () => Promise<Payload>, contentTag?: string): {
|
|
53
56
|
getSiteSettings: (draft?: boolean) => Promise<SiteSettingsData>;
|
|
54
57
|
getHeader: (draft?: boolean) => Promise<HeaderData>;
|
|
55
58
|
getFooter: (draft?: boolean) => Promise<FooterData>;
|
|
59
|
+
getSocialMedia: (draft?: boolean) => Promise<SocialMediaGlobalData>;
|
|
56
60
|
};
|
|
57
61
|
|
|
58
62
|
type MediaValue = number | string | {
|
|
@@ -66,17 +70,28 @@ declare function resolveMedia(media: MediaValue): {
|
|
|
66
70
|
alt: string;
|
|
67
71
|
} | null;
|
|
68
72
|
|
|
73
|
+
type ResolvedSocialMediaLink = {
|
|
74
|
+
icon: string;
|
|
75
|
+
label: string;
|
|
76
|
+
platform: SocialMediaPlatform;
|
|
77
|
+
url: string;
|
|
78
|
+
};
|
|
79
|
+
declare function resolveSocialMediaLinks(data: SocialMediaGlobalData | null | undefined): ResolvedSocialMediaLink[];
|
|
80
|
+
|
|
69
81
|
type index_FooterData = FooterData;
|
|
70
82
|
type index_HeaderData = HeaderData;
|
|
83
|
+
type index_ResolvedSocialMediaLink = ResolvedSocialMediaLink;
|
|
71
84
|
type index_SiteNavItem = SiteNavItem;
|
|
72
85
|
type index_SiteSettingsData = SiteSettingsData;
|
|
86
|
+
declare const index_SocialMediaGlobalData: typeof SocialMediaGlobalData;
|
|
73
87
|
declare const index_WEBSITE_CONTENT_TAG: typeof WEBSITE_CONTENT_TAG;
|
|
74
88
|
declare const index_createPageQueries: typeof createPageQueries;
|
|
75
89
|
declare const index_createPayloadClient: typeof createPayloadClient;
|
|
76
90
|
declare const index_createSiteQueries: typeof createSiteQueries;
|
|
77
91
|
declare const index_resolveMedia: typeof resolveMedia;
|
|
92
|
+
declare const index_resolveSocialMediaLinks: typeof resolveSocialMediaLinks;
|
|
78
93
|
declare namespace index {
|
|
79
|
-
export { type index_FooterData as FooterData, type index_HeaderData as HeaderData, type index_SiteNavItem as SiteNavItem, type index_SiteSettingsData as SiteSettingsData, index_WEBSITE_CONTENT_TAG as WEBSITE_CONTENT_TAG, index_createPageQueries as createPageQueries, index_createPayloadClient as createPayloadClient, index_createSiteQueries as createSiteQueries, index_resolveMedia as resolveMedia };
|
|
94
|
+
export { type index_FooterData as FooterData, type index_HeaderData as HeaderData, type index_ResolvedSocialMediaLink as ResolvedSocialMediaLink, type index_SiteNavItem as SiteNavItem, type index_SiteSettingsData as SiteSettingsData, index_SocialMediaGlobalData as SocialMediaGlobalData, index_WEBSITE_CONTENT_TAG as WEBSITE_CONTENT_TAG, index_createPageQueries as createPageQueries, index_createPayloadClient as createPayloadClient, index_createSiteQueries as createSiteQueries, index_resolveMedia as resolveMedia, index_resolveSocialMediaLinks as resolveSocialMediaLinks };
|
|
80
95
|
}
|
|
81
96
|
|
|
82
|
-
export { type FooterData as F, type HeaderData as H, type SiteNavItem as S, WEBSITE_CONTENT_TAG as W, type SiteSettingsData as a, createPayloadClient as b, createPageQueries as c, createSiteQueries as d, index as i, resolveMedia as r };
|
|
97
|
+
export { type FooterData as F, type HeaderData as H, type ResolvedSocialMediaLink as R, type SiteNavItem as S, WEBSITE_CONTENT_TAG as W, type SiteSettingsData as a, createPayloadClient as b, createPageQueries as c, createSiteQueries as d, resolveSocialMediaLinks as e, index as i, resolveMedia as r };
|