@orion-studios/payload-studio 0.5.0-beta.99 → 0.6.0-beta.2
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 +58 -68
- package/dist/admin/client.d.mts +6 -0
- package/dist/admin/client.d.ts +6 -0
- package/dist/admin/client.js +4533 -799
- package/dist/admin/client.mjs +3349 -756
- package/dist/admin/index.d.mts +2 -1
- package/dist/admin/index.d.ts +2 -1
- package/dist/admin/index.js +386 -55
- package/dist/admin/index.mjs +2 -1
- package/dist/admin-app/client.d.mts +1 -0
- package/dist/admin-app/client.d.ts +1 -0
- package/dist/admin-app/client.js +285 -109
- package/dist/admin-app/client.mjs +59 -871
- package/dist/admin-app/index.d.mts +2 -1
- package/dist/admin-app/index.d.ts +2 -1
- package/dist/admin-app/index.mjs +5 -3
- package/dist/admin-app/styles.css +1767 -56
- package/dist/admin.css +158 -35
- package/dist/blocks/index.js +415 -200
- package/dist/blocks/index.mjs +2 -2
- package/dist/{chunk-XK3K5GRP.mjs → chunk-JQAHXYAM.mjs} +271 -67
- package/dist/chunk-KPIX7OSV.mjs +1051 -0
- package/dist/chunk-OQSEJXC4.mjs +166 -0
- package/dist/{chunk-XHWQJUX5.mjs → chunk-OTHERBGX.mjs} +3 -3
- package/dist/chunk-PF3EBZXF.mjs +326 -0
- package/dist/{chunk-74XFAVXU.mjs → chunk-QJAWO6K3.mjs} +377 -55
- package/dist/{chunk-XVH5SCBD.mjs → chunk-RKTIFEUY.mjs} +4 -19
- package/dist/chunk-W2UOCJDX.mjs +32 -0
- package/dist/{chunk-C4J35SPJ.mjs → chunk-XKUTZ7IU.mjs} +257 -452
- package/dist/{index-ZbOx4OCF.d.mts → index-52HdVLQq.d.ts} +12 -22
- package/dist/index-B6_D4Hm4.d.ts +439 -0
- package/dist/index-CYaWadBl.d.mts +439 -0
- package/dist/index-Crx_MtPw.d.ts +223 -0
- package/dist/index-Cv-6qnrw.d.mts +223 -0
- package/dist/{index-ZbOx4OCF.d.ts → index-DEQC3Dwj.d.mts} +12 -22
- package/dist/{index-BIwu3qIH.d.mts → index-DWmudwDm.d.mts} +2 -1
- package/dist/{index-BIwu3qIH.d.ts → index-DWmudwDm.d.ts} +2 -1
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1858 -1202
- package/dist/index.mjs +10 -8
- package/dist/nextjs/index.js +5 -684
- package/dist/nextjs/index.mjs +2 -3
- package/dist/sitePreviewTypes-BkHCWxNW.d.mts +58 -0
- package/dist/sitePreviewTypes-BkHCWxNW.d.ts +58 -0
- package/dist/studio/index.d.mts +1 -1
- package/dist/studio/index.d.ts +1 -1
- package/dist/studio-pages/builder.css +125 -83
- package/dist/studio-pages/client.d.mts +58 -1
- package/dist/studio-pages/client.d.ts +58 -1
- package/dist/studio-pages/client.js +450 -241
- package/dist/studio-pages/client.mjs +455 -247
- package/dist/studio-pages/index.d.mts +3 -2
- package/dist/studio-pages/index.d.ts +3 -2
- package/dist/studio-pages/index.js +418 -183
- package/dist/studio-pages/index.mjs +15 -6
- package/package.json +10 -4
- package/dist/chunk-SIL2J5MF.mjs +0 -155
- package/dist/index-BnoqmQDP.d.mts +0 -219
- package/dist/index-CTpik6fR.d.ts +0 -219
- package/dist/index-R7hA134j.d.mts +0 -140
- package/dist/index-vjrjy0P4.d.ts +0 -140
|
@@ -0,0 +1,439 @@
|
|
|
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 StudioSection = {
|
|
24
|
+
card?: StudioSectionCard;
|
|
25
|
+
href?: string;
|
|
26
|
+
id: string;
|
|
27
|
+
icon?: AdminNavIcon;
|
|
28
|
+
label: string;
|
|
29
|
+
matchPrefixes?: string[];
|
|
30
|
+
roles?: StudioSectionRole[];
|
|
31
|
+
view?: StudioSectionView;
|
|
32
|
+
};
|
|
33
|
+
type ResolvedStudioSection = {
|
|
34
|
+
card?: StudioSectionCard;
|
|
35
|
+
href: string;
|
|
36
|
+
id: string;
|
|
37
|
+
icon?: AdminNavIcon;
|
|
38
|
+
label: string;
|
|
39
|
+
matchPrefixes: string[];
|
|
40
|
+
roles?: StudioSectionRole[];
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
type StudioGlobalLink = {
|
|
44
|
+
description?: string;
|
|
45
|
+
href?: string;
|
|
46
|
+
label: string;
|
|
47
|
+
slug: string;
|
|
48
|
+
};
|
|
49
|
+
type AdminStudioHeaderPreviewConfig = {
|
|
50
|
+
actionHref?: string;
|
|
51
|
+
actionLabel?: string;
|
|
52
|
+
};
|
|
53
|
+
type AdminStudioFooterPreviewConfig = {
|
|
54
|
+
builtByHref?: string;
|
|
55
|
+
builtByLabel?: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
footerCategories?: string[];
|
|
58
|
+
footerLinks?: SitePreviewLink[];
|
|
59
|
+
};
|
|
60
|
+
type AdminStudioSitePreviewConfig = {
|
|
61
|
+
footer?: AdminStudioFooterPreviewConfig;
|
|
62
|
+
header?: AdminStudioHeaderPreviewConfig;
|
|
63
|
+
locationSummary?: SitePreviewLocationSummary;
|
|
64
|
+
};
|
|
65
|
+
interface AdminStudioConfig {
|
|
66
|
+
enabled?: boolean;
|
|
67
|
+
forms?: {
|
|
68
|
+
collectionSlug?: string;
|
|
69
|
+
enabled?: boolean;
|
|
70
|
+
submissionsCollectionSlug?: string;
|
|
71
|
+
uploadsCollectionSlug?: string;
|
|
72
|
+
};
|
|
73
|
+
globals?: StudioGlobalLink[];
|
|
74
|
+
media?: {
|
|
75
|
+
collectionSlug?: string;
|
|
76
|
+
};
|
|
77
|
+
pages?: {
|
|
78
|
+
builderBasePath?: string;
|
|
79
|
+
collectionSlug?: string;
|
|
80
|
+
};
|
|
81
|
+
sitePreview?: AdminStudioSitePreviewConfig;
|
|
82
|
+
sections?: StudioSection[];
|
|
83
|
+
}
|
|
84
|
+
interface AdminConfig {
|
|
85
|
+
allowThemePreference?: boolean;
|
|
86
|
+
brandName: string;
|
|
87
|
+
brandPrimary?: string;
|
|
88
|
+
brandSecondary?: string;
|
|
89
|
+
defaultTheme?: ThemeOption;
|
|
90
|
+
logoUrl?: string;
|
|
91
|
+
basePath?: string;
|
|
92
|
+
studio?: AdminStudioConfig;
|
|
93
|
+
}
|
|
94
|
+
declare function configureAdmin(config: AdminConfig): {
|
|
95
|
+
admin: {
|
|
96
|
+
css: string;
|
|
97
|
+
components: {
|
|
98
|
+
afterNavLinks?: {
|
|
99
|
+
exportName: string;
|
|
100
|
+
path: string;
|
|
101
|
+
clientProps: {
|
|
102
|
+
allowThemePreference: true;
|
|
103
|
+
defaultTheme: ThemeOption;
|
|
104
|
+
};
|
|
105
|
+
}[] | undefined;
|
|
106
|
+
graphics: {
|
|
107
|
+
Logo: {
|
|
108
|
+
exportName: string;
|
|
109
|
+
path: string;
|
|
110
|
+
clientProps: {
|
|
111
|
+
brandName: string;
|
|
112
|
+
logoUrl: string | undefined;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
Icon: {
|
|
116
|
+
exportName: string;
|
|
117
|
+
path: string;
|
|
118
|
+
clientProps: {
|
|
119
|
+
brandName: string;
|
|
120
|
+
logoUrl: string | undefined;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
views: {
|
|
125
|
+
studioMedia?: {
|
|
126
|
+
path: `/${string}`;
|
|
127
|
+
Component: {
|
|
128
|
+
exportName: string;
|
|
129
|
+
path: string;
|
|
130
|
+
clientProps: {
|
|
131
|
+
mediaCollectionSlug: string;
|
|
132
|
+
brandName: string;
|
|
133
|
+
formSubmissionsCollectionSlug: string;
|
|
134
|
+
formsCollectionSlug: string;
|
|
135
|
+
formsEnabled: boolean;
|
|
136
|
+
formUploadsCollectionSlug: string;
|
|
137
|
+
globalsBasePath: `/${string}`;
|
|
138
|
+
globalsExtraMatchPrefixes: `/${string}`[];
|
|
139
|
+
logoUrl: string | undefined;
|
|
140
|
+
pagesCollectionSlug: string;
|
|
141
|
+
sections: ResolvedStudioSection[];
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
} | undefined;
|
|
145
|
+
studioMediaItem?: {
|
|
146
|
+
path: `/${string}`;
|
|
147
|
+
Component: {
|
|
148
|
+
exportName: string;
|
|
149
|
+
path: string;
|
|
150
|
+
clientProps: {
|
|
151
|
+
mediaCollectionSlug: string;
|
|
152
|
+
brandName: string;
|
|
153
|
+
formSubmissionsCollectionSlug: string;
|
|
154
|
+
formsCollectionSlug: string;
|
|
155
|
+
formsEnabled: boolean;
|
|
156
|
+
formUploadsCollectionSlug: string;
|
|
157
|
+
globalsBasePath: `/${string}`;
|
|
158
|
+
globalsExtraMatchPrefixes: `/${string}`[];
|
|
159
|
+
logoUrl: string | undefined;
|
|
160
|
+
pagesCollectionSlug: string;
|
|
161
|
+
sections: ResolvedStudioSection[];
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
} | undefined;
|
|
165
|
+
studioTools?: {
|
|
166
|
+
path: `/${string}`;
|
|
167
|
+
Component: {
|
|
168
|
+
exportName: string;
|
|
169
|
+
path: string;
|
|
170
|
+
clientProps: {
|
|
171
|
+
mediaCollectionSlug: string;
|
|
172
|
+
pagesCollectionSlug: string;
|
|
173
|
+
brandName: string;
|
|
174
|
+
formSubmissionsCollectionSlug: string;
|
|
175
|
+
formsCollectionSlug: string;
|
|
176
|
+
formsEnabled: boolean;
|
|
177
|
+
formUploadsCollectionSlug: string;
|
|
178
|
+
globalsBasePath: `/${string}`;
|
|
179
|
+
globalsExtraMatchPrefixes: `/${string}`[];
|
|
180
|
+
logoUrl: string | undefined;
|
|
181
|
+
sections: ResolvedStudioSection[];
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
} | undefined;
|
|
185
|
+
studioForms?: {
|
|
186
|
+
path: `/${string}`;
|
|
187
|
+
Component: {
|
|
188
|
+
exportName: string;
|
|
189
|
+
path: string;
|
|
190
|
+
clientProps: {
|
|
191
|
+
formsCollectionSlug: string;
|
|
192
|
+
formSubmissionsCollectionSlug: string;
|
|
193
|
+
formUploadsCollectionSlug: string;
|
|
194
|
+
brandName: string;
|
|
195
|
+
formsEnabled: boolean;
|
|
196
|
+
globalsBasePath: `/${string}`;
|
|
197
|
+
globalsExtraMatchPrefixes: `/${string}`[];
|
|
198
|
+
logoUrl: string | undefined;
|
|
199
|
+
mediaCollectionSlug: string;
|
|
200
|
+
pagesCollectionSlug: string;
|
|
201
|
+
sections: ResolvedStudioSection[];
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
} | undefined;
|
|
205
|
+
studioGlobals?: {
|
|
206
|
+
path: `/${string}`;
|
|
207
|
+
Component: {
|
|
208
|
+
exportName: string;
|
|
209
|
+
path: string;
|
|
210
|
+
clientProps: {
|
|
211
|
+
globals: StudioGlobalLink[];
|
|
212
|
+
globalsBasePath: `/${string}`;
|
|
213
|
+
brandName: string;
|
|
214
|
+
formSubmissionsCollectionSlug: string;
|
|
215
|
+
formsCollectionSlug: string;
|
|
216
|
+
formsEnabled: boolean;
|
|
217
|
+
formUploadsCollectionSlug: string;
|
|
218
|
+
globalsExtraMatchPrefixes: `/${string}`[];
|
|
219
|
+
logoUrl: string | undefined;
|
|
220
|
+
mediaCollectionSlug: string;
|
|
221
|
+
pagesCollectionSlug: string;
|
|
222
|
+
sections: ResolvedStudioSection[];
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
} | undefined;
|
|
226
|
+
studioPages?: {
|
|
227
|
+
path: `/${string}`;
|
|
228
|
+
Component: {
|
|
229
|
+
exportName: string;
|
|
230
|
+
path: string;
|
|
231
|
+
clientProps: {
|
|
232
|
+
pagesCollectionSlug: string;
|
|
233
|
+
brandName: string;
|
|
234
|
+
formSubmissionsCollectionSlug: string;
|
|
235
|
+
formsCollectionSlug: string;
|
|
236
|
+
formsEnabled: boolean;
|
|
237
|
+
formUploadsCollectionSlug: string;
|
|
238
|
+
globalsBasePath: `/${string}`;
|
|
239
|
+
globalsExtraMatchPrefixes: `/${string}`[];
|
|
240
|
+
logoUrl: string | undefined;
|
|
241
|
+
mediaCollectionSlug: string;
|
|
242
|
+
sections: ResolvedStudioSection[];
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
} | undefined;
|
|
246
|
+
studioPageEditor?: {
|
|
247
|
+
path: `/${string}`;
|
|
248
|
+
Component: {
|
|
249
|
+
exportName: string;
|
|
250
|
+
path: string;
|
|
251
|
+
clientProps: {
|
|
252
|
+
builderBasePath: string;
|
|
253
|
+
brandName: string;
|
|
254
|
+
formSubmissionsCollectionSlug: string;
|
|
255
|
+
formsCollectionSlug: string;
|
|
256
|
+
formsEnabled: boolean;
|
|
257
|
+
formUploadsCollectionSlug: string;
|
|
258
|
+
globalsBasePath: `/${string}`;
|
|
259
|
+
globalsExtraMatchPrefixes: `/${string}`[];
|
|
260
|
+
logoUrl: string | undefined;
|
|
261
|
+
mediaCollectionSlug: string;
|
|
262
|
+
pagesCollectionSlug: string;
|
|
263
|
+
sections: ResolvedStudioSection[];
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
} | undefined;
|
|
267
|
+
studioPageNew?: {
|
|
268
|
+
path: `/${string}`;
|
|
269
|
+
Component: {
|
|
270
|
+
exportName: string;
|
|
271
|
+
path: string;
|
|
272
|
+
clientProps: {
|
|
273
|
+
pagesCollectionSlug: string;
|
|
274
|
+
brandName: string;
|
|
275
|
+
formSubmissionsCollectionSlug: string;
|
|
276
|
+
formsCollectionSlug: string;
|
|
277
|
+
formsEnabled: boolean;
|
|
278
|
+
formUploadsCollectionSlug: string;
|
|
279
|
+
globalsBasePath: `/${string}`;
|
|
280
|
+
globalsExtraMatchPrefixes: `/${string}`[];
|
|
281
|
+
logoUrl: string | undefined;
|
|
282
|
+
mediaCollectionSlug: string;
|
|
283
|
+
sections: ResolvedStudioSection[];
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
} | undefined;
|
|
287
|
+
studioContactForm?: {
|
|
288
|
+
path: `/${string}`;
|
|
289
|
+
Component: {
|
|
290
|
+
exportName: string;
|
|
291
|
+
path: string;
|
|
292
|
+
clientProps: {
|
|
293
|
+
globalSlug: string;
|
|
294
|
+
globalsBasePath: `/${string}`;
|
|
295
|
+
brandName: string;
|
|
296
|
+
formSubmissionsCollectionSlug: string;
|
|
297
|
+
formsCollectionSlug: string;
|
|
298
|
+
formsEnabled: boolean;
|
|
299
|
+
formUploadsCollectionSlug: string;
|
|
300
|
+
globalsExtraMatchPrefixes: `/${string}`[];
|
|
301
|
+
logoUrl: string | undefined;
|
|
302
|
+
mediaCollectionSlug: string;
|
|
303
|
+
pagesCollectionSlug: string;
|
|
304
|
+
sections: ResolvedStudioSection[];
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
} | undefined;
|
|
308
|
+
dashboard: {
|
|
309
|
+
Component: {
|
|
310
|
+
exportName: string;
|
|
311
|
+
path: string;
|
|
312
|
+
clientProps: {
|
|
313
|
+
brandName: string;
|
|
314
|
+
formSubmissionsCollectionSlug: string;
|
|
315
|
+
formsCollectionSlug: string;
|
|
316
|
+
formsEnabled: boolean;
|
|
317
|
+
formUploadsCollectionSlug: string;
|
|
318
|
+
globalsBasePath: `/${string}`;
|
|
319
|
+
globalsExtraMatchPrefixes: `/${string}`[];
|
|
320
|
+
logoUrl: string | undefined;
|
|
321
|
+
mediaCollectionSlug: string;
|
|
322
|
+
pagesCollectionSlug: string;
|
|
323
|
+
sections: ResolvedStudioSection[];
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
providers: {
|
|
329
|
+
exportName: string;
|
|
330
|
+
path: string;
|
|
331
|
+
clientProps: {
|
|
332
|
+
allowThemePreference: boolean;
|
|
333
|
+
defaultTheme: ThemeOption;
|
|
334
|
+
};
|
|
335
|
+
}[];
|
|
336
|
+
beforeLogin: {
|
|
337
|
+
exportName: string;
|
|
338
|
+
path: string;
|
|
339
|
+
clientProps: {
|
|
340
|
+
brandName: string;
|
|
341
|
+
logoUrl: string | undefined;
|
|
342
|
+
};
|
|
343
|
+
}[];
|
|
344
|
+
afterLogin: {
|
|
345
|
+
exportName: string;
|
|
346
|
+
path: string;
|
|
347
|
+
}[];
|
|
348
|
+
Nav?: {
|
|
349
|
+
exportName: string;
|
|
350
|
+
path: string;
|
|
351
|
+
clientProps: {
|
|
352
|
+
brandName: string;
|
|
353
|
+
formSubmissionsCollectionSlug: string;
|
|
354
|
+
formsCollectionSlug: string;
|
|
355
|
+
formsEnabled: boolean;
|
|
356
|
+
formUploadsCollectionSlug: string;
|
|
357
|
+
globalsBasePath: `/${string}`;
|
|
358
|
+
globalsExtraMatchPrefixes: `/${string}`[];
|
|
359
|
+
logoUrl: string | undefined;
|
|
360
|
+
mediaCollectionSlug: string;
|
|
361
|
+
pagesCollectionSlug: string;
|
|
362
|
+
sections: ResolvedStudioSection[];
|
|
363
|
+
};
|
|
364
|
+
} | undefined;
|
|
365
|
+
};
|
|
366
|
+
meta: {
|
|
367
|
+
titleSuffix: string;
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
brandName: string;
|
|
371
|
+
brandPrimary: string;
|
|
372
|
+
brandSecondary: string;
|
|
373
|
+
defaultTheme: ThemeOption;
|
|
374
|
+
wrapUsers(usersCollection: CollectionConfig): CollectionConfig;
|
|
375
|
+
wrapPagesCollection(pagesCollection: CollectionConfig): CollectionConfig;
|
|
376
|
+
wrapMediaCollection(mediaCollection: CollectionConfig): CollectionConfig;
|
|
377
|
+
wrapFormsCollection(formsCollection: CollectionConfig): CollectionConfig;
|
|
378
|
+
wrapFormSubmissionsCollection(formSubmissionsCollection: CollectionConfig): CollectionConfig;
|
|
379
|
+
wrapFormUploadsCollection(formUploadsCollection: CollectionConfig): CollectionConfig;
|
|
380
|
+
wrapGlobals(globals: GlobalConfig[]): GlobalConfig[];
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
declare function withTooltips(fields: Field[], customTooltips?: Record<string, string>): Field[];
|
|
384
|
+
|
|
385
|
+
declare const createHeaderNavItemsField: () => Field;
|
|
386
|
+
|
|
387
|
+
type CreateSocialMediaConnectionsFieldOptions = {
|
|
388
|
+
description?: string;
|
|
389
|
+
label?: string;
|
|
390
|
+
name?: string;
|
|
391
|
+
platforms?: SocialMediaPlatform[];
|
|
392
|
+
};
|
|
393
|
+
declare const createSocialMediaConnectionsField: (options?: CreateSocialMediaConnectionsFieldOptions) => Field;
|
|
394
|
+
declare const socialMediaConnectionsField: Field;
|
|
395
|
+
|
|
396
|
+
type CreateSocialMediaGlobalOptions = {
|
|
397
|
+
description?: string;
|
|
398
|
+
fieldOptions?: Omit<CreateSocialMediaConnectionsFieldOptions, 'label' | 'name'>;
|
|
399
|
+
slug?: string;
|
|
400
|
+
};
|
|
401
|
+
declare const createSocialMediaGlobal: (options?: CreateSocialMediaGlobalOptions) => GlobalConfig;
|
|
402
|
+
|
|
403
|
+
type index_AdminConfig = AdminConfig;
|
|
404
|
+
type index_AdminStudioConfig = AdminStudioConfig;
|
|
405
|
+
type index_AdminStudioFooterPreviewConfig = AdminStudioFooterPreviewConfig;
|
|
406
|
+
type index_AdminStudioHeaderPreviewConfig = AdminStudioHeaderPreviewConfig;
|
|
407
|
+
type index_AdminStudioSitePreviewConfig = AdminStudioSitePreviewConfig;
|
|
408
|
+
type index_CreateSocialMediaConnectionsFieldOptions = CreateSocialMediaConnectionsFieldOptions;
|
|
409
|
+
type index_CreateSocialMediaGlobalOptions = CreateSocialMediaGlobalOptions;
|
|
410
|
+
type index_ResolvedStudioSection = ResolvedStudioSection;
|
|
411
|
+
declare const index_SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM: typeof SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM;
|
|
412
|
+
declare const index_SOCIAL_MEDIA_ICON_OPTIONS: typeof SOCIAL_MEDIA_ICON_OPTIONS;
|
|
413
|
+
declare const index_SOCIAL_MEDIA_PLATFORMS: typeof SOCIAL_MEDIA_PLATFORMS;
|
|
414
|
+
declare const index_SOCIAL_MEDIA_PLATFORM_LABELS: typeof SOCIAL_MEDIA_PLATFORM_LABELS;
|
|
415
|
+
declare const index_SocialMediaGlobalData: typeof SocialMediaGlobalData;
|
|
416
|
+
declare const index_SocialMediaIconLibrary: typeof SocialMediaIconLibrary;
|
|
417
|
+
declare const index_SocialMediaIconOption: typeof SocialMediaIconOption;
|
|
418
|
+
declare const index_SocialMediaPlatform: typeof SocialMediaPlatform;
|
|
419
|
+
declare const index_SocialMediaProfileData: typeof SocialMediaProfileData;
|
|
420
|
+
declare const index_SocialMediaProfilesData: typeof SocialMediaProfilesData;
|
|
421
|
+
type index_StudioGlobalLink = StudioGlobalLink;
|
|
422
|
+
type index_StudioSection = StudioSection;
|
|
423
|
+
type index_StudioSectionCard = StudioSectionCard;
|
|
424
|
+
type index_StudioSectionComponent = StudioSectionComponent;
|
|
425
|
+
type index_StudioSectionRole = StudioSectionRole;
|
|
426
|
+
type index_StudioSectionView = StudioSectionView;
|
|
427
|
+
declare const index_configureAdmin: typeof configureAdmin;
|
|
428
|
+
declare const index_createHeaderNavItemsField: typeof createHeaderNavItemsField;
|
|
429
|
+
declare const index_createSocialMediaConnectionsField: typeof createSocialMediaConnectionsField;
|
|
430
|
+
declare const index_createSocialMediaGlobal: typeof createSocialMediaGlobal;
|
|
431
|
+
declare const index_createThemePreferenceField: typeof createThemePreferenceField;
|
|
432
|
+
declare const index_socialMediaConnectionsField: typeof socialMediaConnectionsField;
|
|
433
|
+
declare const index_themePreferenceField: typeof themePreferenceField;
|
|
434
|
+
declare const index_withTooltips: typeof withTooltips;
|
|
435
|
+
declare namespace index {
|
|
436
|
+
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_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_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 };
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export { type AdminConfig as A, type CreateSocialMediaConnectionsFieldOptions as C, type ResolvedStudioSection as R, type StudioGlobalLink as S, type AdminStudioConfig as a, type AdminStudioFooterPreviewConfig as b, type AdminStudioHeaderPreviewConfig as c, type AdminStudioSitePreviewConfig as d, type CreateSocialMediaGlobalOptions as e, type StudioSection as f, type StudioSectionCard as g, type StudioSectionComponent as h, index as i, type StudioSectionRole as j, type StudioSectionView as k, configureAdmin as l, createHeaderNavItemsField as m, createSocialMediaConnectionsField as n, createSocialMediaGlobal as o, createThemePreferenceField as p, socialMediaConnectionsField as s, themePreferenceField as t, withTooltips as w };
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { S as StudioDocumentV1, a as StudioModuleManifest, b as StudioPageService, c as StudioNodeTypeDefinition } from './index-DWmudwDm.js';
|
|
2
|
+
import { Payload } from 'payload';
|
|
3
|
+
import { ComponentType, CSSProperties, ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
type InspectorGroupKey = 'advanced' | 'basics' | 'media' | 'typography';
|
|
6
|
+
type InspectorFieldType = 'checkbox' | 'color' | 'number' | 'search' | 'select' | 'text' | 'textarea';
|
|
7
|
+
|
|
8
|
+
type BuilderSettingsPanelMode = 'advanced' | 'basic';
|
|
9
|
+
type BuilderTextAlign = 'center' | 'justify' | 'left' | 'right';
|
|
10
|
+
type BuilderTypographySpacingPreset = 'normal' | 'relaxed' | 'tight';
|
|
11
|
+
type BuilderLayoutSettingsV2 = {
|
|
12
|
+
contentWidth?: 'content' | 'full' | 'inherit' | 'narrow' | 'wide';
|
|
13
|
+
linkHorizontalPadding?: boolean;
|
|
14
|
+
linkVerticalPadding?: boolean;
|
|
15
|
+
paddingBottomPt?: number | null;
|
|
16
|
+
paddingLeftPt?: number | null;
|
|
17
|
+
paddingRightPt?: number | null;
|
|
18
|
+
paddingTopPt?: number | null;
|
|
19
|
+
sectionPaddingX?: 'inherit' | 'lg' | 'md' | 'none' | 'sm';
|
|
20
|
+
sectionPaddingY?: 'lg' | 'md' | 'none' | 'sm';
|
|
21
|
+
};
|
|
22
|
+
type BuilderTypographySettingsV2 = {
|
|
23
|
+
bodyAlign?: BuilderTextAlign;
|
|
24
|
+
headingAlign?: BuilderTextAlign;
|
|
25
|
+
letterSpacingPreset?: BuilderTypographySpacingPreset;
|
|
26
|
+
lineHeightPreset?: BuilderTypographySpacingPreset;
|
|
27
|
+
maxTextWidth?: 'auto' | 'full' | 'lg' | 'md' | 'sm';
|
|
28
|
+
};
|
|
29
|
+
type BuilderMediaSettingsV2 = {
|
|
30
|
+
cornerStyle?: 'rounded' | 'square';
|
|
31
|
+
fit?: 'contain' | 'cover';
|
|
32
|
+
height?: number | null;
|
|
33
|
+
position?: 'bottom' | 'center' | 'left' | 'right' | 'top';
|
|
34
|
+
positionX?: number | null;
|
|
35
|
+
positionY?: number | null;
|
|
36
|
+
};
|
|
37
|
+
type BuilderAppearanceSettingsV2 = {
|
|
38
|
+
contentBackgroundColor?: string;
|
|
39
|
+
contentBackgroundMode?: 'color' | 'gradient' | 'none';
|
|
40
|
+
contentGradientAngle?: string;
|
|
41
|
+
contentGradientFrom?: string;
|
|
42
|
+
contentGradientPreset?: string;
|
|
43
|
+
contentGradientTo?: string;
|
|
44
|
+
sectionBackgroundColor?: string;
|
|
45
|
+
sectionBackgroundMode?: 'color' | 'gradient' | 'none';
|
|
46
|
+
sectionGradientAngle?: string;
|
|
47
|
+
sectionGradientFrom?: string;
|
|
48
|
+
sectionGradientPreset?: string;
|
|
49
|
+
sectionGradientTo?: string;
|
|
50
|
+
};
|
|
51
|
+
type BuilderAdvancedSettingsV2 = {
|
|
52
|
+
customClassName?: string;
|
|
53
|
+
editCopyInPanel?: boolean;
|
|
54
|
+
hideOnMobile?: boolean;
|
|
55
|
+
};
|
|
56
|
+
type BuilderBlockSettingsV2 = {
|
|
57
|
+
advanced: BuilderAdvancedSettingsV2;
|
|
58
|
+
appearance: BuilderAppearanceSettingsV2;
|
|
59
|
+
layout: BuilderLayoutSettingsV2;
|
|
60
|
+
media: BuilderMediaSettingsV2;
|
|
61
|
+
typography: BuilderTypographySettingsV2;
|
|
62
|
+
version: 2;
|
|
63
|
+
};
|
|
64
|
+
type BuilderThemeScale = 'lg' | 'md' | 'sm' | 'xl';
|
|
65
|
+
type BuilderThemeTokens = {
|
|
66
|
+
colors: {
|
|
67
|
+
accent: string;
|
|
68
|
+
bodyText: string;
|
|
69
|
+
headingText: string;
|
|
70
|
+
surface: string;
|
|
71
|
+
};
|
|
72
|
+
radii: {
|
|
73
|
+
card: number;
|
|
74
|
+
panel: number;
|
|
75
|
+
};
|
|
76
|
+
spacing: {
|
|
77
|
+
sectionGap: BuilderThemeScale;
|
|
78
|
+
sectionPadding: BuilderThemeScale;
|
|
79
|
+
};
|
|
80
|
+
typography: {
|
|
81
|
+
bodySize: BuilderThemeScale;
|
|
82
|
+
headingSize: BuilderThemeScale;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
type BuilderThemeTokenOverrides = {
|
|
86
|
+
[K in keyof BuilderThemeTokens]?: BuilderThemeTokens[K] extends Record<string, unknown> ? Partial<BuilderThemeTokens[K]> : BuilderThemeTokens[K];
|
|
87
|
+
};
|
|
88
|
+
type BuilderThemeTokenLayers = {
|
|
89
|
+
block?: BuilderThemeTokenOverrides;
|
|
90
|
+
page?: BuilderThemeTokenOverrides;
|
|
91
|
+
site?: BuilderThemeTokenOverrides;
|
|
92
|
+
};
|
|
93
|
+
declare const defaultBuilderThemeTokens: BuilderThemeTokens;
|
|
94
|
+
|
|
95
|
+
declare const resolveBuilderThemeTokens: (layers: BuilderThemeTokenLayers) => BuilderThemeTokens;
|
|
96
|
+
|
|
97
|
+
declare const layoutToStudioDocument: (layout: Array<Record<string, unknown>>, title?: string, metadata?: Record<string, unknown>) => StudioDocumentV1;
|
|
98
|
+
declare const studioDocumentToLayout: (document: StudioDocumentV1) => Array<Record<string, unknown>>;
|
|
99
|
+
declare const createDefaultStudioDocument: (title?: string) => StudioDocumentV1;
|
|
100
|
+
|
|
101
|
+
type StudioPagePayloadDoc = {
|
|
102
|
+
id: number | string;
|
|
103
|
+
layout?: unknown;
|
|
104
|
+
slug?: unknown;
|
|
105
|
+
studioDocument?: unknown;
|
|
106
|
+
title?: unknown;
|
|
107
|
+
};
|
|
108
|
+
type CreateStudioPageServiceArgs = {
|
|
109
|
+
collectionSlug?: string;
|
|
110
|
+
modules: StudioModuleManifest[];
|
|
111
|
+
payload: Payload;
|
|
112
|
+
user: Record<string, unknown>;
|
|
113
|
+
};
|
|
114
|
+
declare const getStudioDocumentFromPage: (doc: StudioPagePayloadDoc) => StudioDocumentV1;
|
|
115
|
+
declare const createStudioPageService: ({ collectionSlug, modules, payload, user, }: CreateStudioPageServiceArgs) => StudioPageService;
|
|
116
|
+
declare const toEditorInitialDoc: (payloadPage: {
|
|
117
|
+
slug?: string;
|
|
118
|
+
studioDocument: StudioDocumentV1;
|
|
119
|
+
title: string;
|
|
120
|
+
}) => {
|
|
121
|
+
layout: Record<string, unknown>[];
|
|
122
|
+
slug: string;
|
|
123
|
+
studioDocument: StudioDocumentV1;
|
|
124
|
+
title: string;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
type BuilderBlock$1 = {
|
|
128
|
+
blockType: string;
|
|
129
|
+
[key: string]: unknown;
|
|
130
|
+
};
|
|
131
|
+
type SectionPreset = {
|
|
132
|
+
id: string;
|
|
133
|
+
title: string;
|
|
134
|
+
description: string;
|
|
135
|
+
blocks: BuilderBlock$1[];
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
type BuilderBlock = {
|
|
139
|
+
blockType?: string;
|
|
140
|
+
[key: string]: unknown;
|
|
141
|
+
};
|
|
142
|
+
type BuilderRenderWithSectionShell = (block: BuilderBlock, className: string, content: ReactNode, options?: {
|
|
143
|
+
inheritProjectStyles?: boolean;
|
|
144
|
+
}) => ReactNode;
|
|
145
|
+
type BuilderInlineTextComponentProps = {
|
|
146
|
+
as?: 'h1' | 'h2' | 'h3' | 'p' | 'span';
|
|
147
|
+
className?: string;
|
|
148
|
+
multiline?: boolean;
|
|
149
|
+
onCommit: (value: string) => void;
|
|
150
|
+
placeholder?: string;
|
|
151
|
+
style?: CSSProperties;
|
|
152
|
+
value?: string;
|
|
153
|
+
};
|
|
154
|
+
type BuilderPreviewTextFieldOptions = Omit<BuilderInlineTextComponentProps, 'onCommit' | 'value'>;
|
|
155
|
+
type BuilderPreviewEditingHelpers = {
|
|
156
|
+
InlineText: ComponentType<BuilderInlineTextComponentProps>;
|
|
157
|
+
readText: (value: unknown, fallback?: string) => string;
|
|
158
|
+
updateArrayItemText: (arrayField: string, itemIndex: number, fieldName: string, value: string) => void;
|
|
159
|
+
updateBlockText: (fieldName: string, value: string) => void;
|
|
160
|
+
};
|
|
161
|
+
type BuilderBlockPreviewRenderArgs = {
|
|
162
|
+
block: BuilderBlock;
|
|
163
|
+
editing: BuilderPreviewEditingHelpers;
|
|
164
|
+
index: number;
|
|
165
|
+
renderWithSectionShell: BuilderRenderWithSectionShell;
|
|
166
|
+
resolvedThemeTokens: BuilderThemeTokens;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
type BuilderBlockPreviewRenderer = (args: BuilderBlockPreviewRenderArgs) => ReactNode | null;
|
|
170
|
+
|
|
171
|
+
declare const pageNodeTypes: StudioNodeTypeDefinition[];
|
|
172
|
+
declare const pagePaletteGroups: {
|
|
173
|
+
id: string;
|
|
174
|
+
label: string;
|
|
175
|
+
items: {
|
|
176
|
+
nodeType: string;
|
|
177
|
+
title: string;
|
|
178
|
+
description: string;
|
|
179
|
+
}[];
|
|
180
|
+
}[];
|
|
181
|
+
declare const pageInspectorPanels: {
|
|
182
|
+
fields: {
|
|
183
|
+
advanced: boolean | undefined;
|
|
184
|
+
group: InspectorGroupKey;
|
|
185
|
+
inlineEditable: boolean | undefined;
|
|
186
|
+
key: string;
|
|
187
|
+
label: string;
|
|
188
|
+
type: InspectorFieldType;
|
|
189
|
+
}[];
|
|
190
|
+
id: string;
|
|
191
|
+
label: string;
|
|
192
|
+
nodeType: string;
|
|
193
|
+
}[];
|
|
194
|
+
declare const pageStudioModuleManifest: StudioModuleManifest;
|
|
195
|
+
|
|
196
|
+
type index_BuilderBlockPreviewRenderArgs = BuilderBlockPreviewRenderArgs;
|
|
197
|
+
type index_BuilderBlockPreviewRenderer = BuilderBlockPreviewRenderer;
|
|
198
|
+
type index_BuilderBlockSettingsV2 = BuilderBlockSettingsV2;
|
|
199
|
+
type index_BuilderInlineTextComponentProps = BuilderInlineTextComponentProps;
|
|
200
|
+
type index_BuilderPreviewEditingHelpers = BuilderPreviewEditingHelpers;
|
|
201
|
+
type index_BuilderPreviewTextFieldOptions = BuilderPreviewTextFieldOptions;
|
|
202
|
+
type index_BuilderRenderWithSectionShell = BuilderRenderWithSectionShell;
|
|
203
|
+
type index_BuilderSettingsPanelMode = BuilderSettingsPanelMode;
|
|
204
|
+
type index_BuilderThemeTokenOverrides = BuilderThemeTokenOverrides;
|
|
205
|
+
type index_BuilderThemeTokens = BuilderThemeTokens;
|
|
206
|
+
type index_SectionPreset = SectionPreset;
|
|
207
|
+
declare const index_createDefaultStudioDocument: typeof createDefaultStudioDocument;
|
|
208
|
+
declare const index_createStudioPageService: typeof createStudioPageService;
|
|
209
|
+
declare const index_defaultBuilderThemeTokens: typeof defaultBuilderThemeTokens;
|
|
210
|
+
declare const index_getStudioDocumentFromPage: typeof getStudioDocumentFromPage;
|
|
211
|
+
declare const index_layoutToStudioDocument: typeof layoutToStudioDocument;
|
|
212
|
+
declare const index_pageInspectorPanels: typeof pageInspectorPanels;
|
|
213
|
+
declare const index_pageNodeTypes: typeof pageNodeTypes;
|
|
214
|
+
declare const index_pagePaletteGroups: typeof pagePaletteGroups;
|
|
215
|
+
declare const index_pageStudioModuleManifest: typeof pageStudioModuleManifest;
|
|
216
|
+
declare const index_resolveBuilderThemeTokens: typeof resolveBuilderThemeTokens;
|
|
217
|
+
declare const index_studioDocumentToLayout: typeof studioDocumentToLayout;
|
|
218
|
+
declare const index_toEditorInitialDoc: typeof toEditorInitialDoc;
|
|
219
|
+
declare namespace index {
|
|
220
|
+
export { type BuilderBlock$1 as BuilderBlock, type index_BuilderBlockPreviewRenderArgs as BuilderBlockPreviewRenderArgs, type index_BuilderBlockPreviewRenderer as BuilderBlockPreviewRenderer, type index_BuilderBlockSettingsV2 as BuilderBlockSettingsV2, type index_BuilderInlineTextComponentProps as BuilderInlineTextComponentProps, type index_BuilderPreviewEditingHelpers as BuilderPreviewEditingHelpers, type index_BuilderPreviewTextFieldOptions as BuilderPreviewTextFieldOptions, type index_BuilderRenderWithSectionShell as BuilderRenderWithSectionShell, type index_BuilderSettingsPanelMode as BuilderSettingsPanelMode, type index_BuilderThemeTokenOverrides as BuilderThemeTokenOverrides, type index_BuilderThemeTokens as BuilderThemeTokens, type index_SectionPreset as SectionPreset, index_createDefaultStudioDocument as createDefaultStudioDocument, index_createStudioPageService as createStudioPageService, index_defaultBuilderThemeTokens as defaultBuilderThemeTokens, index_getStudioDocumentFromPage as getStudioDocumentFromPage, index_layoutToStudioDocument as layoutToStudioDocument, index_pageInspectorPanels as pageInspectorPanels, index_pageNodeTypes as pageNodeTypes, index_pagePaletteGroups as pagePaletteGroups, index_pageStudioModuleManifest as pageStudioModuleManifest, index_resolveBuilderThemeTokens as resolveBuilderThemeTokens, index_studioDocumentToLayout as studioDocumentToLayout, index_toEditorInitialDoc as toEditorInitialDoc };
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export { type BuilderBlock$1 as B, type SectionPreset as S, type BuilderBlockPreviewRenderArgs as a, type BuilderBlockPreviewRenderer as b, type BuilderBlockSettingsV2 as c, type BuilderInlineTextComponentProps as d, type BuilderPreviewEditingHelpers as e, type BuilderPreviewTextFieldOptions as f, type BuilderRenderWithSectionShell as g, type BuilderSettingsPanelMode as h, index as i, type BuilderThemeTokenOverrides as j, type BuilderThemeTokens as k, createDefaultStudioDocument as l, createStudioPageService as m, defaultBuilderThemeTokens as n, getStudioDocumentFromPage as o, layoutToStudioDocument as p, pageInspectorPanels as q, pageNodeTypes as r, pagePaletteGroups as s, pageStudioModuleManifest as t, resolveBuilderThemeTokens as u, studioDocumentToLayout as v, toEditorInitialDoc as w };
|