@orion-studios/payload-studio 0.6.0-beta.7 → 0.6.0-beta.71

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.
Files changed (48) hide show
  1. package/dist/admin/client.js +2076 -618
  2. package/dist/admin/client.mjs +2037 -590
  3. package/dist/admin/index.d.mts +2 -2
  4. package/dist/admin/index.d.ts +2 -2
  5. package/dist/admin/index.js +140 -17
  6. package/dist/admin/index.mjs +2 -2
  7. package/dist/admin-app/client.js +11 -4
  8. package/dist/admin-app/client.mjs +1 -1
  9. package/dist/admin-app/index.d.mts +2 -2
  10. package/dist/admin-app/index.d.ts +2 -2
  11. package/dist/admin-app/styles.css +343 -41
  12. package/dist/admin.css +18 -2
  13. package/dist/builder-v2/client.d.mts +18 -0
  14. package/dist/builder-v2/client.d.ts +18 -0
  15. package/dist/builder-v2/client.js +1673 -0
  16. package/dist/builder-v2/client.mjs +1548 -0
  17. package/dist/builder-v2/index.d.mts +241 -0
  18. package/dist/builder-v2/index.d.ts +241 -0
  19. package/dist/builder-v2/index.js +760 -0
  20. package/dist/builder-v2/index.mjs +710 -0
  21. package/dist/builder-v2/styles.css +1524 -0
  22. package/dist/{chunk-XKUTZ7IU.mjs → chunk-276KAPGM.mjs} +56 -5
  23. package/dist/{chunk-KPIX7OSV.mjs → chunk-2XH7X34N.mjs} +11 -4
  24. package/dist/{chunk-PF3EBZXF.mjs → chunk-7ZMXZRBP.mjs} +39 -3
  25. package/dist/{chunk-5FNTVRCR.mjs → chunk-KHK6RTGC.mjs} +143 -20
  26. package/dist/{chunk-OTHERBGX.mjs → chunk-ZADL33R6.mjs} +1 -1
  27. package/dist/{index-QPDAedIX.d.ts → index-BV0vEGl6.d.ts} +4 -2
  28. package/dist/{index-Cv-6qnrw.d.mts → index-D5zrOdyv.d.mts} +3 -1
  29. package/dist/{index-52HdVLQq.d.ts → index-DAdN56fM.d.ts} +1 -1
  30. package/dist/{index-DyMmaRfI.d.mts → index-DLfPOqYA.d.mts} +4 -2
  31. package/dist/{index-Crx_MtPw.d.ts → index-Dv-Alx4h.d.ts} +3 -1
  32. package/dist/{index-DEQC3Dwj.d.mts → index-G_uTNffQ.d.mts} +1 -1
  33. package/dist/index.d.mts +4 -4
  34. package/dist/index.d.ts +4 -4
  35. package/dist/index.js +231 -21
  36. package/dist/index.mjs +10 -10
  37. package/dist/nextjs/index.js +39 -3
  38. package/dist/nextjs/index.mjs +2 -2
  39. package/dist/{sitePreviewTypes-BkHCWxNW.d.mts → sitePreviewTypes-BrJwGzJj.d.mts} +1 -1
  40. package/dist/{sitePreviewTypes-BkHCWxNW.d.ts → sitePreviewTypes-BrJwGzJj.d.ts} +1 -1
  41. package/dist/studio-pages/builder.css +24 -5
  42. package/dist/studio-pages/client.js +574 -64
  43. package/dist/studio-pages/client.mjs +574 -64
  44. package/dist/studio-pages/index.d.mts +1 -1
  45. package/dist/studio-pages/index.d.ts +1 -1
  46. package/dist/studio-pages/index.js +91 -4
  47. package/dist/studio-pages/index.mjs +3 -3
  48. package/package.json +22 -3
@@ -1,13 +1,13 @@
1
- import {
2
- sectionStyleDefaults
3
- } from "./chunk-OQSEJXC4.mjs";
4
1
  import {
5
2
  createDefaultStudioDocument,
6
3
  defaultBuilderThemeTokens,
7
4
  layoutToStudioDocument,
8
5
  migrateBlockToSettingsV2,
9
6
  studioDocumentToLayout
10
- } from "./chunk-PF3EBZXF.mjs";
7
+ } from "./chunk-7ZMXZRBP.mjs";
8
+ import {
9
+ sectionStyleDefaults
10
+ } from "./chunk-OQSEJXC4.mjs";
11
11
  import {
12
12
  assertStudioDocumentV1,
13
13
  compileStudioDocument,
@@ -66,8 +66,52 @@ var alignOptions = [
66
66
  { label: "Right", value: "right" },
67
67
  { label: "Justify", value: "justify" }
68
68
  ];
69
- var layoutFieldSet = [];
69
+ var layoutFieldSet = [
70
+ {
71
+ group: "layout",
72
+ key: "settings.layout.linkVerticalPadding",
73
+ label: "Link Top/Bottom Padding",
74
+ tags: ["spacing", "padding", "vertical"],
75
+ type: "checkbox"
76
+ },
77
+ {
78
+ group: "layout",
79
+ key: "settings.layout.paddingTopPt",
80
+ label: "Top Padding (pt)",
81
+ max: 240,
82
+ min: 0,
83
+ tags: ["spacing", "padding", "top"],
84
+ type: "number"
85
+ },
86
+ {
87
+ group: "layout",
88
+ key: "settings.layout.paddingBottomPt",
89
+ label: "Bottom Padding (pt)",
90
+ max: 240,
91
+ min: 0,
92
+ tags: ["spacing", "padding", "bottom"],
93
+ type: "number"
94
+ }
95
+ ];
70
96
  var typographyFieldSet = [
97
+ {
98
+ group: "typography",
99
+ key: "settings.typography.headingSizePt",
100
+ label: "Heading Text Size (pt)",
101
+ max: 120,
102
+ min: 6,
103
+ tags: ["text", "size", "heading", "font"],
104
+ type: "number"
105
+ },
106
+ {
107
+ group: "typography",
108
+ key: "settings.typography.bodySizePt",
109
+ label: "Body Text Size (pt)",
110
+ max: 72,
111
+ min: 6,
112
+ tags: ["text", "size", "body", "paragraph", "font"],
113
+ type: "number"
114
+ },
71
115
  {
72
116
  group: "typography",
73
117
  key: "settings.typography.headingAlign",
@@ -284,6 +328,13 @@ var inspectorDefinitionByBlockType = {
284
328
  { group: "basics", inlineEditable: true, key: "kicker", label: "Kicker", type: "text" },
285
329
  { group: "basics", inlineEditable: true, key: "headline", label: "Headline", type: "text" },
286
330
  { group: "basics", inlineEditable: true, key: "subheadline", label: "Subheadline", type: "textarea" },
331
+ {
332
+ group: "basics",
333
+ key: "settings.marquee.itemsText",
334
+ label: "Scrolling Bar Options",
335
+ tags: ["marquee", "scrolling", "bar", "categories"],
336
+ type: "textarea"
337
+ },
287
338
  {
288
339
  group: "basics",
289
340
  key: "variant",
@@ -103,14 +103,21 @@ function AdminShellClient({
103
103
  onLogout,
104
104
  storageKey = "orion-admin-shell-collapsed"
105
105
  }) {
106
- const [collapsed, setCollapsed] = useState(false);
106
+ const [collapsed, setCollapsed] = useState(() => {
107
+ if (typeof window === "undefined") {
108
+ return true;
109
+ }
110
+ try {
111
+ return window.localStorage.getItem(storageKey) === "1";
112
+ } catch {
113
+ return false;
114
+ }
115
+ });
107
116
  const [loggingOut, setLoggingOut] = useState(false);
108
117
  useEffect(() => {
109
118
  try {
110
119
  const stored = window.localStorage.getItem(storageKey);
111
- if (stored === "1") {
112
- setCollapsed(true);
113
- }
120
+ setCollapsed(stored === "1");
114
121
  } catch {
115
122
  }
116
123
  }, [storageKey]);
@@ -40,7 +40,9 @@ var defaultBuilderBlockSettingsV2 = {
40
40
  },
41
41
  typography: {
42
42
  bodyAlign: "left",
43
+ bodySizePt: null,
43
44
  headingAlign: "left",
45
+ headingSizePt: null,
44
46
  letterSpacingPreset: "normal",
45
47
  lineHeightPreset: "normal",
46
48
  maxTextWidth: "auto"
@@ -69,7 +71,9 @@ var defaultBuilderItemSettingsV2 = {
69
71
  },
70
72
  typography: {
71
73
  bodyAlign: "left",
74
+ bodySizePt: null,
72
75
  headingAlign: "left",
76
+ headingSizePt: null,
73
77
  letterSpacingPreset: "normal",
74
78
  lineHeightPreset: "normal",
75
79
  maxTextWidth: "auto"
@@ -99,6 +103,7 @@ var defaultBuilderThemeTokens = {
99
103
 
100
104
  // src/studio-pages/builder/adapters/settingsV2.ts
101
105
  var isRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
106
+ var isTextAlign = (value) => value === "left" || value === "center" || value === "right" || value === "justify";
102
107
  var parsePercent = (value) => {
103
108
  if (typeof value === "number" && Number.isFinite(value)) {
104
109
  return Math.max(0, Math.min(100, value));
@@ -123,6 +128,18 @@ var parsePixel = (value) => {
123
128
  }
124
129
  return null;
125
130
  };
131
+ var parsePoint = (value) => {
132
+ if (typeof value === "number" && Number.isFinite(value)) {
133
+ return Math.max(6, Math.min(120, Math.round(value)));
134
+ }
135
+ if (typeof value === "string" && value.trim().length > 0) {
136
+ const parsed = Number(value);
137
+ if (Number.isFinite(parsed)) {
138
+ return Math.max(6, Math.min(120, Math.round(parsed)));
139
+ }
140
+ }
141
+ return null;
142
+ };
126
143
  var mergeSettings = (defaults, input) => {
127
144
  if (!isRecord(input)) {
128
145
  return structuredClone(defaults);
@@ -141,6 +158,10 @@ var mergeSettings = (defaults, input) => {
141
158
  };
142
159
  var legacyBlockToV2Settings = (block) => {
143
160
  const current = structuredClone(defaultBuilderBlockSettingsV2);
161
+ if (block.blockType === "hero" && block.variant === "centered") {
162
+ current.typography.headingAlign = "center";
163
+ current.typography.bodyAlign = "center";
164
+ }
144
165
  current.layout.contentWidth = block.contentWidth === "narrow" || block.contentWidth === "content" || block.contentWidth === "wide" || block.contentWidth === "full" || block.contentWidth === "inherit" ? block.contentWidth : current.layout.contentWidth;
145
166
  current.layout.sectionPaddingX = block.sectionPaddingX === "none" || block.sectionPaddingX === "sm" || block.sectionPaddingX === "md" || block.sectionPaddingX === "lg" || block.sectionPaddingX === "inherit" ? block.sectionPaddingX : current.layout.sectionPaddingX;
146
167
  current.layout.sectionPaddingY = block.sectionPaddingY === "none" || block.sectionPaddingY === "sm" || block.sectionPaddingY === "lg" ? block.sectionPaddingY : current.layout.sectionPaddingY;
@@ -177,15 +198,28 @@ var legacyBlockToV2Settings = (block) => {
177
198
  current.media.positionX = parsePercent(block.imagePositionX ?? block.backgroundImagePositionX);
178
199
  current.media.positionY = parsePercent(block.imagePositionY ?? block.backgroundImagePositionY);
179
200
  current.media.height = parsePixel(block.imageHeight);
180
- current.typography.headingAlign = block.textHeadingAlign === "left" || block.textHeadingAlign === "center" || block.textHeadingAlign === "right" || block.textHeadingAlign === "justify" ? block.textHeadingAlign : current.typography.headingAlign;
181
- current.typography.bodyAlign = block.textBodyAlign === "left" || block.textBodyAlign === "center" || block.textBodyAlign === "right" || block.textBodyAlign === "justify" ? block.textBodyAlign : current.typography.bodyAlign;
201
+ current.typography.headingAlign = isTextAlign(block.textHeadingAlign) ? block.textHeadingAlign : current.typography.headingAlign;
202
+ current.typography.bodyAlign = isTextAlign(block.textBodyAlign) ? block.textBodyAlign : current.typography.bodyAlign;
203
+ current.typography.headingSizePt = parsePoint(block.textHeadingSizePt);
204
+ current.typography.bodySizePt = parsePoint(block.textBodySizePt);
182
205
  current.typography.maxTextWidth = block.textMaxWidth === "auto" || block.textMaxWidth === "sm" || block.textMaxWidth === "md" || block.textMaxWidth === "lg" || block.textMaxWidth === "full" ? block.textMaxWidth : current.typography.maxTextWidth;
183
206
  current.typography.lineHeightPreset = block.textLineHeightPreset === "tight" || block.textLineHeightPreset === "normal" || block.textLineHeightPreset === "relaxed" ? block.textLineHeightPreset : current.typography.lineHeightPreset;
184
207
  current.typography.letterSpacingPreset = block.textLetterSpacingPreset === "tight" || block.textLetterSpacingPreset === "normal" || block.textLetterSpacingPreset === "relaxed" ? block.textLetterSpacingPreset : current.typography.letterSpacingPreset;
185
208
  current.advanced.editCopyInPanel = Boolean(block.editCopyInPanel ?? current.advanced.editCopyInPanel);
186
209
  current.advanced.customClassName = typeof block.customClassName === "string" ? block.customClassName : current.advanced.customClassName;
187
210
  current.advanced.hideOnMobile = Boolean(block.hideOnMobile ?? current.advanced.hideOnMobile);
188
- return mergeSettings(current, block.settings);
211
+ const settings = mergeSettings(current, block.settings);
212
+ if (block.blockType === "hero") {
213
+ const top = settings.layout.paddingTopPt;
214
+ const bottom = settings.layout.paddingBottomPt;
215
+ const hasLegacyLinkedHeroPadding = settings.layout.linkVerticalPadding !== false && (top === null || typeof top === "undefined" || top === 30) && (bottom === null || typeof bottom === "undefined" || bottom === 30 || bottom === 20);
216
+ if (hasLegacyLinkedHeroPadding) {
217
+ settings.layout.linkVerticalPadding = false;
218
+ settings.layout.paddingTopPt = 30;
219
+ settings.layout.paddingBottomPt = 20;
220
+ }
221
+ }
222
+ return settings;
189
223
  };
190
224
  var v2SettingsToLegacyBlock = (blockWithSettings) => {
191
225
  const settings = legacyBlockToV2Settings(blockWithSettings);
@@ -211,6 +245,8 @@ var v2SettingsToLegacyBlock = (blockWithSettings) => {
211
245
  next.contentGradientAngle = settings.appearance.contentGradientAngle;
212
246
  next.textHeadingAlign = settings.typography.headingAlign;
213
247
  next.textBodyAlign = settings.typography.bodyAlign;
248
+ next.textHeadingSizePt = settings.typography.headingSizePt;
249
+ next.textBodySizePt = settings.typography.bodySizePt;
214
250
  next.textMaxWidth = settings.typography.maxTextWidth;
215
251
  next.textLineHeightPreset = settings.typography.lineHeightPreset;
216
252
  next.textLetterSpacingPreset = settings.typography.letterSpacingPreset;
@@ -1,12 +1,12 @@
1
- import {
2
- adminNavIcons
3
- } from "./chunk-W2UOCJDX.mjs";
4
1
  import {
5
2
  SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM,
6
3
  SOCIAL_MEDIA_ICON_OPTIONS,
7
4
  SOCIAL_MEDIA_PLATFORMS,
8
5
  SOCIAL_MEDIA_PLATFORM_LABELS
9
6
  } from "./chunk-ZTXJG4K5.mjs";
7
+ import {
8
+ adminNavIcons
9
+ } from "./chunk-W2UOCJDX.mjs";
10
10
  import {
11
11
  __export,
12
12
  __require
@@ -53,7 +53,7 @@ var createThemePreferenceField = (defaultTheme = "brand-light") => ({
53
53
  var themePreferenceField = createThemePreferenceField("brand-light");
54
54
 
55
55
  // src/shared/studioSections.ts
56
- var studioRoles = /* @__PURE__ */ new Set(["admin", "editor", "client"]);
56
+ var studioRoles = /* @__PURE__ */ new Set(["admin", "developer", "editor", "client"]);
57
57
  var studioIcons = new Set(adminNavIcons);
58
58
  var isRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
59
59
  var isAbsoluteExternalURL = (value) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(value) || value.startsWith("//");
@@ -186,8 +186,10 @@ function configureAdmin(config) {
186
186
  brandPrimary = "#3b82f6",
187
187
  brandSecondary = "#8b5cf6",
188
188
  defaultTheme = "brand-light",
189
+ logoOnDarkUrl,
189
190
  logoUrl,
190
- allowThemePreference = false
191
+ allowThemePreference = false,
192
+ userSessionDurationSeconds = 60 * 60 * 24
191
193
  } = config;
192
194
  const studioEnabled = config.studio?.enabled ?? true;
193
195
  const formsEnabled = config.studio?.forms?.enabled ?? false;
@@ -292,6 +294,49 @@ function configureAdmin(config) {
292
294
  }
293
295
  };
294
296
  };
297
+ const attachStudioEditRedirectToCollection = (collection, options) => {
298
+ if (!studioEnabled) {
299
+ return collection;
300
+ }
301
+ const collectionWithBreadcrumb = attachStudioBackBreadcrumbToCollection(collection);
302
+ const existingViews = collectionWithBreadcrumb.admin?.components?.views;
303
+ const existingEditViews = existingViews?.edit;
304
+ const hasCustomEditView = Boolean(
305
+ existingEditViews?.root || existingEditViews?.default && typeof existingEditViews.default === "object" && existingEditViews.default.Component
306
+ );
307
+ if (hasCustomEditView) {
308
+ return collectionWithBreadcrumb;
309
+ }
310
+ return {
311
+ ...collectionWithBreadcrumb,
312
+ admin: {
313
+ ...collectionWithBreadcrumb.admin,
314
+ components: {
315
+ ...collectionWithBreadcrumb.admin?.components,
316
+ views: {
317
+ ...existingViews,
318
+ edit: {
319
+ ...existingEditViews,
320
+ default: {
321
+ ...typeof existingEditViews?.default === "object" ? existingEditViews.default : {},
322
+ Component: {
323
+ exportName: "StudioDocumentRedirect",
324
+ path: clientPath,
325
+ clientProps: {
326
+ description: options.description,
327
+ ...options.emptyHref ? { emptyHref: options.emptyHref } : {},
328
+ ...options.emptyLabel ? { emptyLabel: options.emptyLabel } : {},
329
+ pathBase: options.pathBase,
330
+ title: options.title
331
+ }
332
+ }
333
+ }
334
+ }
335
+ }
336
+ }
337
+ }
338
+ };
339
+ };
295
340
  return {
296
341
  admin: {
297
342
  css: cssPath,
@@ -309,6 +354,7 @@ function configureAdmin(config) {
309
354
  path: clientPath,
310
355
  clientProps: {
311
356
  brandName,
357
+ logoOnDarkUrl,
312
358
  logoUrl
313
359
  }
314
360
  },
@@ -317,6 +363,7 @@ function configureAdmin(config) {
317
363
  path: clientPath,
318
364
  clientProps: {
319
365
  brandName,
366
+ logoOnDarkUrl,
320
367
  logoUrl
321
368
  }
322
369
  }
@@ -331,6 +378,7 @@ function configureAdmin(config) {
331
378
  },
332
379
  ...studioEnabled ? {
333
380
  studioGlobals: {
381
+ exact: true,
334
382
  path: globalsBasePath,
335
383
  Component: {
336
384
  exportName: "AdminStudioGlobalsView",
@@ -342,10 +390,11 @@ function configureAdmin(config) {
342
390
  }
343
391
  }
344
392
  },
345
- studioPages: {
346
- path: pagesBasePath,
393
+ studioPageNew: {
394
+ exact: true,
395
+ path: `${pagesBasePath}/new`,
347
396
  Component: {
348
- exportName: "AdminStudioPagesListView",
397
+ exportName: "AdminStudioNewPageView",
349
398
  path: clientPath,
350
399
  clientProps: {
351
400
  ...studioNavClientProps,
@@ -354,6 +403,7 @@ function configureAdmin(config) {
354
403
  }
355
404
  },
356
405
  studioPageEditor: {
406
+ exact: true,
357
407
  path: `${pagesBasePath}/:id`,
358
408
  Component: {
359
409
  exportName: "AdminStudioPageEditView",
@@ -364,10 +414,11 @@ function configureAdmin(config) {
364
414
  }
365
415
  }
366
416
  },
367
- studioPageNew: {
368
- path: `${pagesBasePath}/new`,
417
+ studioPages: {
418
+ exact: true,
419
+ path: pagesBasePath,
369
420
  Component: {
370
- exportName: "AdminStudioNewPageView",
421
+ exportName: "AdminStudioPagesListView",
371
422
  path: clientPath,
372
423
  clientProps: {
373
424
  ...studioNavClientProps,
@@ -376,6 +427,7 @@ function configureAdmin(config) {
376
427
  }
377
428
  },
378
429
  studioContactForm: {
430
+ exact: true,
379
431
  path: contactFormStudioPath,
380
432
  Component: {
381
433
  exportName: "AdminStudioContactFormView",
@@ -388,7 +440,47 @@ function configureAdmin(config) {
388
440
  }
389
441
  },
390
442
  ...formsEnabled ? {
443
+ studioFormSubmission: {
444
+ exact: true,
445
+ path: `${formsBasePath}/submissions/:id`,
446
+ Component: {
447
+ exportName: "AdminStudioFormSubmissionView",
448
+ path: clientPath,
449
+ clientProps: {
450
+ ...studioNavClientProps,
451
+ formsCollectionSlug,
452
+ formSubmissionsCollectionSlug,
453
+ formUploadsCollectionSlug
454
+ }
455
+ }
456
+ },
457
+ studioFormUpload: {
458
+ exact: true,
459
+ path: `${formsBasePath}/uploads/:id`,
460
+ Component: {
461
+ exportName: "AdminStudioFormUploadView",
462
+ path: clientPath,
463
+ clientProps: {
464
+ ...studioNavClientProps,
465
+ formUploadsCollectionSlug
466
+ }
467
+ }
468
+ },
469
+ studioFormDetail: {
470
+ exact: true,
471
+ path: `${formsBasePath}/:id`,
472
+ Component: {
473
+ exportName: "AdminStudioFormDetailView",
474
+ path: clientPath,
475
+ clientProps: {
476
+ ...studioNavClientProps,
477
+ formsCollectionSlug,
478
+ formSubmissionsCollectionSlug
479
+ }
480
+ }
481
+ },
391
482
  studioForms: {
483
+ exact: true,
392
484
  path: formsBasePath,
393
485
  Component: {
394
486
  exportName: "AdminStudioFormsView",
@@ -402,10 +494,11 @@ function configureAdmin(config) {
402
494
  }
403
495
  }
404
496
  } : {},
405
- studioMedia: {
406
- path: mediaBasePath,
497
+ studioMediaItem: {
498
+ exact: true,
499
+ path: `${mediaBasePath}/:id`,
407
500
  Component: {
408
- exportName: "AdminStudioMediaView",
501
+ exportName: "AdminStudioMediaItemView",
409
502
  path: clientPath,
410
503
  clientProps: {
411
504
  ...studioNavClientProps,
@@ -413,10 +506,11 @@ function configureAdmin(config) {
413
506
  }
414
507
  }
415
508
  },
416
- studioMediaItem: {
417
- path: `${mediaBasePath}/:id`,
509
+ studioMedia: {
510
+ exact: true,
511
+ path: mediaBasePath,
418
512
  Component: {
419
- exportName: "AdminStudioMediaItemView",
513
+ exportName: "AdminStudioMediaView",
420
514
  path: clientPath,
421
515
  clientProps: {
422
516
  ...studioNavClientProps,
@@ -425,6 +519,7 @@ function configureAdmin(config) {
425
519
  }
426
520
  },
427
521
  studioTools: {
522
+ exact: true,
428
523
  path: toolsBasePath,
429
524
  Component: {
430
525
  exportName: "AdminStudioToolsView",
@@ -469,6 +564,7 @@ function configureAdmin(config) {
469
564
  path: clientPath,
470
565
  clientProps: {
471
566
  brandName,
567
+ logoOnDarkUrl,
472
568
  logoUrl
473
569
  }
474
570
  }
@@ -505,8 +601,17 @@ function configureAdmin(config) {
505
601
  const hasThemePreference = existingFields.some(
506
602
  (field) => typeof field === "object" && field !== null && "name" in field && field.name === "themePreference"
507
603
  );
604
+ const normalizedAuth = usersCollection.auth === true ? {
605
+ tokenExpiration: userSessionDurationSeconds,
606
+ useSessions: true
607
+ } : usersCollection.auth && typeof usersCollection.auth === "object" ? {
608
+ ...usersCollection.auth,
609
+ tokenExpiration: usersCollection.auth.tokenExpiration ?? userSessionDurationSeconds,
610
+ useSessions: usersCollection.auth.useSessions ?? true
611
+ } : usersCollection.auth;
508
612
  const nextCollection = {
509
613
  ...usersCollection,
614
+ auth: normalizedAuth,
510
615
  fields: !allowThemePreference || hasThemePreference ? existingFields : [...existingFields, createThemePreferenceField(defaultTheme)]
511
616
  };
512
617
  return attachStudioBackBreadcrumbToCollection(nextCollection);
@@ -568,13 +673,31 @@ function configureAdmin(config) {
568
673
  return attachStudioBackBreadcrumbToCollection(mediaCollection);
569
674
  },
570
675
  wrapFormsCollection(formsCollection) {
571
- return attachStudioBackBreadcrumbToCollection(formsCollection);
676
+ return attachStudioEditRedirectToCollection(formsCollection, {
677
+ description: "Redirecting to the Studio form workspace.",
678
+ emptyHref: formsBasePath,
679
+ emptyLabel: "Open Forms",
680
+ pathBase: formsBasePath,
681
+ title: "Opening Form..."
682
+ });
572
683
  },
573
684
  wrapFormSubmissionsCollection(formSubmissionsCollection) {
574
- return attachStudioBackBreadcrumbToCollection(formSubmissionsCollection);
685
+ return attachStudioEditRedirectToCollection(formSubmissionsCollection, {
686
+ description: "Redirecting to the Studio submission workspace.",
687
+ emptyHref: formsBasePath,
688
+ emptyLabel: "Open Forms",
689
+ pathBase: `${formsBasePath}/submissions`,
690
+ title: "Opening Submission..."
691
+ });
575
692
  },
576
693
  wrapFormUploadsCollection(formUploadsCollection) {
577
- return attachStudioBackBreadcrumbToCollection(formUploadsCollection);
694
+ return attachStudioEditRedirectToCollection(formUploadsCollection, {
695
+ description: "Redirecting to the Studio upload workspace.",
696
+ emptyHref: formsBasePath,
697
+ emptyLabel: "Open Forms",
698
+ pathBase: `${formsBasePath}/uploads`,
699
+ title: "Opening Upload..."
700
+ });
578
701
  },
579
702
  wrapGlobals(globals2) {
580
703
  const labelMap = {
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-ZTXJG4K5.mjs";
6
6
  import {
7
7
  studioDocumentToLayout
8
- } from "./chunk-PF3EBZXF.mjs";
8
+ } from "./chunk-7ZMXZRBP.mjs";
9
9
  import {
10
10
  assertStudioDocumentV1
11
11
  } from "./chunk-ADIIWIYL.mjs";
@@ -1,12 +1,12 @@
1
1
  import { Field, CollectionConfig, GlobalConfig } from 'payload';
2
- import { a as AdminNavIcon, e as SitePreviewLink, f as SitePreviewLocationSummary } from './sitePreviewTypes-BkHCWxNW.js';
2
+ import { a as AdminNavIcon, e as SitePreviewLink, f as SitePreviewLocationSummary } from './sitePreviewTypes-BrJwGzJj.js';
3
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
4
 
5
5
  type ThemeOption = 'light' | 'dark' | 'brand-light' | 'brand-dark';
6
6
  declare const createThemePreferenceField: (defaultTheme?: ThemeOption) => Field;
7
7
  declare const themePreferenceField: Field;
8
8
 
9
- type StudioSectionRole = 'admin' | 'editor' | 'client';
9
+ type StudioSectionRole = 'admin' | 'developer' | 'editor' | 'client';
10
10
  type StudioSectionCard = {
11
11
  description?: string;
12
12
  title: string;
@@ -104,9 +104,11 @@ interface AdminConfig {
104
104
  brandPrimary?: string;
105
105
  brandSecondary?: string;
106
106
  defaultTheme?: ThemeOption;
107
+ logoOnDarkUrl?: string;
107
108
  logoUrl?: string;
108
109
  basePath?: string;
109
110
  studio?: AdminStudioConfig;
111
+ userSessionDurationSeconds?: number;
110
112
  }
111
113
  type ConfiguredAdmin = {
112
114
  admin: Record<string, unknown>;
@@ -2,7 +2,7 @@ import { S as StudioDocumentV1, a as StudioModuleManifest, b as StudioPageServic
2
2
  import { Payload } from 'payload';
3
3
  import { ComponentType, CSSProperties, ReactNode } from 'react';
4
4
 
5
- type InspectorGroupKey = 'advanced' | 'basics' | 'media' | 'typography';
5
+ type InspectorGroupKey = 'advanced' | 'basics' | 'layout' | 'media' | 'typography';
6
6
  type InspectorFieldType = 'checkbox' | 'color' | 'number' | 'search' | 'select' | 'text' | 'textarea';
7
7
 
8
8
  type BuilderSettingsPanelMode = 'advanced' | 'basic';
@@ -21,7 +21,9 @@ type BuilderLayoutSettingsV2 = {
21
21
  };
22
22
  type BuilderTypographySettingsV2 = {
23
23
  bodyAlign?: BuilderTextAlign;
24
+ bodySizePt?: number | null;
24
25
  headingAlign?: BuilderTextAlign;
26
+ headingSizePt?: number | null;
25
27
  letterSpacingPreset?: BuilderTypographySpacingPreset;
26
28
  lineHeightPreset?: BuilderTypographySpacingPreset;
27
29
  maxTextWidth?: 'auto' | 'full' | 'lg' | 'md' | 'sm';
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { A as AdminBreadcrumbItem, a as AdminNavIcon, b as AdminNavItem, c as AdminRole, S as SiteFooterPreviewData, d as SiteHeaderPreviewData, e as SitePreviewLink, f as SitePreviewLocationSummary, g as SitePreviewSocialLink, n as navItemIsActive, r as roleCanAccessNav } from './sitePreviewTypes-BkHCWxNW.js';
2
+ import { A as AdminBreadcrumbItem, a as AdminNavIcon, b as AdminNavItem, c as AdminRole, S as SiteFooterPreviewData, d as SiteHeaderPreviewData, e as SitePreviewLink, f as SitePreviewLocationSummary, g as SitePreviewSocialLink, n as navItemIsActive, r as roleCanAccessNav } from './sitePreviewTypes-BrJwGzJj.js';
3
3
  import { ReactNode } from 'react';
4
4
 
5
5
  type AdminBreadcrumbsProps = {
@@ -1,12 +1,12 @@
1
1
  import { Field, CollectionConfig, GlobalConfig } from 'payload';
2
- import { a as AdminNavIcon, e as SitePreviewLink, f as SitePreviewLocationSummary } from './sitePreviewTypes-BkHCWxNW.mjs';
2
+ import { a as AdminNavIcon, e as SitePreviewLink, f as SitePreviewLocationSummary } from './sitePreviewTypes-BrJwGzJj.mjs';
3
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
4
 
5
5
  type ThemeOption = 'light' | 'dark' | 'brand-light' | 'brand-dark';
6
6
  declare const createThemePreferenceField: (defaultTheme?: ThemeOption) => Field;
7
7
  declare const themePreferenceField: Field;
8
8
 
9
- type StudioSectionRole = 'admin' | 'editor' | 'client';
9
+ type StudioSectionRole = 'admin' | 'developer' | 'editor' | 'client';
10
10
  type StudioSectionCard = {
11
11
  description?: string;
12
12
  title: string;
@@ -104,9 +104,11 @@ interface AdminConfig {
104
104
  brandPrimary?: string;
105
105
  brandSecondary?: string;
106
106
  defaultTheme?: ThemeOption;
107
+ logoOnDarkUrl?: string;
107
108
  logoUrl?: string;
108
109
  basePath?: string;
109
110
  studio?: AdminStudioConfig;
111
+ userSessionDurationSeconds?: number;
110
112
  }
111
113
  type ConfiguredAdmin = {
112
114
  admin: Record<string, unknown>;
@@ -2,7 +2,7 @@ import { S as StudioDocumentV1, a as StudioModuleManifest, b as StudioPageServic
2
2
  import { Payload } from 'payload';
3
3
  import { ComponentType, CSSProperties, ReactNode } from 'react';
4
4
 
5
- type InspectorGroupKey = 'advanced' | 'basics' | 'media' | 'typography';
5
+ type InspectorGroupKey = 'advanced' | 'basics' | 'layout' | 'media' | 'typography';
6
6
  type InspectorFieldType = 'checkbox' | 'color' | 'number' | 'search' | 'select' | 'text' | 'textarea';
7
7
 
8
8
  type BuilderSettingsPanelMode = 'advanced' | 'basic';
@@ -21,7 +21,9 @@ type BuilderLayoutSettingsV2 = {
21
21
  };
22
22
  type BuilderTypographySettingsV2 = {
23
23
  bodyAlign?: BuilderTextAlign;
24
+ bodySizePt?: number | null;
24
25
  headingAlign?: BuilderTextAlign;
26
+ headingSizePt?: number | null;
25
27
  letterSpacingPreset?: BuilderTypographySpacingPreset;
26
28
  lineHeightPreset?: BuilderTypographySpacingPreset;
27
29
  maxTextWidth?: 'auto' | 'full' | 'lg' | 'md' | 'sm';
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { A as AdminBreadcrumbItem, a as AdminNavIcon, b as AdminNavItem, c as AdminRole, S as SiteFooterPreviewData, d as SiteHeaderPreviewData, e as SitePreviewLink, f as SitePreviewLocationSummary, g as SitePreviewSocialLink, n as navItemIsActive, r as roleCanAccessNav } from './sitePreviewTypes-BkHCWxNW.mjs';
2
+ import { A as AdminBreadcrumbItem, a as AdminNavIcon, b as AdminNavItem, c as AdminRole, S as SiteFooterPreviewData, d as SiteHeaderPreviewData, e as SitePreviewLink, f as SitePreviewLocationSummary, g as SitePreviewSocialLink, n as navItemIsActive, r as roleCanAccessNav } from './sitePreviewTypes-BrJwGzJj.mjs';
3
3
  import { ReactNode } from 'react';
4
4
 
5
5
  type AdminBreadcrumbsProps = {
package/dist/index.d.mts CHANGED
@@ -1,11 +1,11 @@
1
- export { i as admin } from './index-DyMmaRfI.mjs';
2
- export { i as adminApp } from './index-DEQC3Dwj.mjs';
1
+ export { i as admin } from './index-DLfPOqYA.mjs';
2
+ export { i as adminApp } from './index-G_uTNffQ.mjs';
3
3
  export { i as blocks } from './index-CluwY0ZQ.mjs';
4
4
  export { i as nextjs } from './index-D8BNfUJb.mjs';
5
5
  export { i as studio } from './index-DWmudwDm.mjs';
6
- export { i as studioPages } from './index-Cv-6qnrw.mjs';
6
+ export { i as studioPages } from './index-D5zrOdyv.mjs';
7
7
  import 'payload';
8
- import './sitePreviewTypes-BkHCWxNW.mjs';
8
+ import './sitePreviewTypes-BrJwGzJj.mjs';
9
9
  import './socialMedia-C05Iy-SV.mjs';
10
10
  import 'react/jsx-runtime';
11
11
  import 'react';
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export { i as admin } from './index-QPDAedIX.js';
2
- export { i as adminApp } from './index-52HdVLQq.js';
1
+ export { i as admin } from './index-BV0vEGl6.js';
2
+ export { i as adminApp } from './index-DAdN56fM.js';
3
3
  export { i as blocks } from './index-CluwY0ZQ.js';
4
4
  export { i as nextjs } from './index-DD_E2UfJ.js';
5
5
  export { i as studio } from './index-DWmudwDm.js';
6
- export { i as studioPages } from './index-Crx_MtPw.js';
6
+ export { i as studioPages } from './index-Dv-Alx4h.js';
7
7
  import 'payload';
8
- import './sitePreviewTypes-BkHCWxNW.js';
8
+ import './sitePreviewTypes-BrJwGzJj.js';
9
9
  import './socialMedia-C05Iy-SV.js';
10
10
  import 'react/jsx-runtime';
11
11
  import 'react';