@orion-studios/payload-studio 0.6.0-beta.8 → 0.7.0

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 (66) hide show
  1. package/README.md +6 -1
  2. package/bin/init.js +329 -0
  3. package/dist/admin/client.js +2106 -585
  4. package/dist/admin/client.mjs +2161 -653
  5. package/dist/admin/index.d.mts +2 -2
  6. package/dist/admin/index.d.ts +2 -2
  7. package/dist/admin/index.js +201 -37
  8. package/dist/admin/index.mjs +2 -2
  9. package/dist/admin-app/client.js +14 -5
  10. package/dist/admin-app/client.mjs +1 -1
  11. package/dist/admin-app/index.d.mts +2 -2
  12. package/dist/admin-app/index.d.ts +2 -2
  13. package/dist/admin-app/styles.css +361 -41
  14. package/dist/admin.css +98 -2
  15. package/dist/blocks/index.mjs +1 -2
  16. package/dist/builder-v2/client.d.mts +18 -0
  17. package/dist/builder-v2/client.d.ts +18 -0
  18. package/dist/builder-v2/client.js +4287 -0
  19. package/dist/builder-v2/client.mjs +4162 -0
  20. package/dist/builder-v2/index.d.mts +249 -0
  21. package/dist/builder-v2/index.d.ts +249 -0
  22. package/dist/builder-v2/index.js +836 -0
  23. package/dist/builder-v2/index.mjs +786 -0
  24. package/dist/builder-v2/styles.css +2705 -0
  25. package/dist/{chunk-PF3EBZXF.mjs → chunk-7ZMXZRBP.mjs} +39 -3
  26. package/dist/{chunk-XKUTZ7IU.mjs → chunk-DTHBPJXU.mjs} +246 -25
  27. package/dist/{chunk-JQAHXYAM.mjs → chunk-KMYMSR7W.mjs} +163 -3
  28. package/dist/{chunk-5FNTVRCR.mjs → chunk-MMJNHBOF.mjs} +204 -40
  29. package/dist/{chunk-KPIX7OSV.mjs → chunk-NF37A575.mjs} +14 -5
  30. package/dist/{chunk-OTHERBGX.mjs → chunk-OF6BATTO.mjs} +57 -112
  31. package/dist/chunk-VA545CHJ.mjs +202 -0
  32. package/dist/forms/index.d.mts +25 -0
  33. package/dist/forms/index.d.ts +25 -0
  34. package/dist/forms/index.js +237 -0
  35. package/dist/forms/index.mjs +25 -0
  36. package/dist/forms/server.d.mts +35 -0
  37. package/dist/forms/server.d.ts +35 -0
  38. package/dist/forms/server.js +442 -0
  39. package/dist/forms/server.mjs +228 -0
  40. package/dist/{index-Crx_MtPw.d.ts → index-0xXWuOuz.d.ts} +38 -6
  41. package/dist/{index-Cv-6qnrw.d.mts → index-BU82akSL.d.mts} +38 -6
  42. package/dist/{index-DyMmaRfI.d.mts → index-BbTcimgH.d.mts} +5 -2
  43. package/dist/{index-D8BNfUJb.d.mts → index-Cen-9wcc.d.mts} +17 -5
  44. package/dist/{index-52HdVLQq.d.ts → index-DAdN56fM.d.ts} +1 -1
  45. package/dist/{index-QPDAedIX.d.ts → index-DV-nW43e.d.ts} +5 -2
  46. package/dist/{index-DEQC3Dwj.d.mts → index-G_uTNffQ.d.mts} +1 -1
  47. package/dist/{index-DD_E2UfJ.d.ts → index-gxcMPpm-.d.ts} +17 -5
  48. package/dist/index.d.mts +5 -5
  49. package/dist/index.d.ts +5 -5
  50. package/dist/index.js +533 -172
  51. package/dist/index.mjs +10 -11
  52. package/dist/nextjs/index.d.mts +1 -1
  53. package/dist/nextjs/index.d.ts +1 -1
  54. package/dist/nextjs/index.js +95 -114
  55. package/dist/nextjs/index.mjs +2 -2
  56. package/dist/{sitePreviewTypes-BkHCWxNW.d.mts → sitePreviewTypes-BrJwGzJj.d.mts} +1 -1
  57. package/dist/{sitePreviewTypes-BkHCWxNW.d.ts → sitePreviewTypes-BrJwGzJj.d.ts} +1 -1
  58. package/dist/studio-pages/builder.css +66 -5
  59. package/dist/studio-pages/client.js +618 -73
  60. package/dist/studio-pages/client.mjs +641 -96
  61. package/dist/studio-pages/index.d.mts +1 -1
  62. package/dist/studio-pages/index.d.ts +1 -1
  63. package/dist/studio-pages/index.js +1893 -24
  64. package/dist/studio-pages/index.mjs +11 -3
  65. package/package.json +38 -3
  66. package/dist/chunk-OQSEJXC4.mjs +0 -166
@@ -1,4 +1,4 @@
1
- export { A as AdminConfig, a as AdminStudioConfig, b as AdminStudioFooterPreviewConfig, c as AdminStudioHeaderPreviewConfig, d as AdminStudioSitePreviewConfig, C as CreateSocialMediaConnectionsFieldOptions, e as CreateSocialMediaGlobalOptions, R as ResolvedStudioDashboardPanel, f as ResolvedStudioSection, S as StudioDashboardPanel, g as StudioDashboardPanelSpan, h as StudioGlobalLink, j as StudioSection, k as StudioSectionCard, l as StudioSectionComponent, m as StudioSectionRole, n as StudioSectionView, o as configureAdmin, p as createHeaderNavItemsField, q as createSocialMediaConnectionsField, r as createSocialMediaGlobal, s as createThemePreferenceField, t as socialMediaConnectionsField, u as themePreferenceField, w as withTooltips } from '../index-DyMmaRfI.mjs';
1
+ export { A as AdminConfig, a as AdminStudioConfig, b as AdminStudioFooterPreviewConfig, c as AdminStudioHeaderPreviewConfig, d as AdminStudioSitePreviewConfig, C as CreateSocialMediaConnectionsFieldOptions, e as CreateSocialMediaGlobalOptions, R as ResolvedStudioDashboardPanel, f as ResolvedStudioSection, S as StudioDashboardPanel, g as StudioDashboardPanelSpan, h as StudioGlobalLink, j as StudioSection, k as StudioSectionCard, l as StudioSectionComponent, m as StudioSectionRole, n as StudioSectionView, o as configureAdmin, p as createHeaderNavItemsField, q as createSocialMediaConnectionsField, r as createSocialMediaGlobal, s as createThemePreferenceField, t as socialMediaConnectionsField, u as themePreferenceField, w as withTooltips } from '../index-BbTcimgH.mjs';
2
2
  export { 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, a as SocialMediaPlatform, h as SocialMediaProfileData, i as SocialMediaProfilesData } from '../socialMedia-C05Iy-SV.mjs';
3
3
  import 'payload';
4
- import '../sitePreviewTypes-BkHCWxNW.mjs';
4
+ import '../sitePreviewTypes-BrJwGzJj.mjs';
@@ -1,4 +1,4 @@
1
- export { A as AdminConfig, a as AdminStudioConfig, b as AdminStudioFooterPreviewConfig, c as AdminStudioHeaderPreviewConfig, d as AdminStudioSitePreviewConfig, C as CreateSocialMediaConnectionsFieldOptions, e as CreateSocialMediaGlobalOptions, R as ResolvedStudioDashboardPanel, f as ResolvedStudioSection, S as StudioDashboardPanel, g as StudioDashboardPanelSpan, h as StudioGlobalLink, j as StudioSection, k as StudioSectionCard, l as StudioSectionComponent, m as StudioSectionRole, n as StudioSectionView, o as configureAdmin, p as createHeaderNavItemsField, q as createSocialMediaConnectionsField, r as createSocialMediaGlobal, s as createThemePreferenceField, t as socialMediaConnectionsField, u as themePreferenceField, w as withTooltips } from '../index-QPDAedIX.js';
1
+ export { A as AdminConfig, a as AdminStudioConfig, b as AdminStudioFooterPreviewConfig, c as AdminStudioHeaderPreviewConfig, d as AdminStudioSitePreviewConfig, C as CreateSocialMediaConnectionsFieldOptions, e as CreateSocialMediaGlobalOptions, R as ResolvedStudioDashboardPanel, f as ResolvedStudioSection, S as StudioDashboardPanel, g as StudioDashboardPanelSpan, h as StudioGlobalLink, j as StudioSection, k as StudioSectionCard, l as StudioSectionComponent, m as StudioSectionRole, n as StudioSectionView, o as configureAdmin, p as createHeaderNavItemsField, q as createSocialMediaConnectionsField, r as createSocialMediaGlobal, s as createThemePreferenceField, t as socialMediaConnectionsField, u as themePreferenceField, w as withTooltips } from '../index-DV-nW43e.js';
2
2
  export { 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, a as SocialMediaPlatform, h as SocialMediaProfileData, i as SocialMediaProfilesData } from '../socialMedia-C05Iy-SV.js';
3
3
  import 'payload';
4
- import '../sitePreviewTypes-BkHCWxNW.js';
4
+ import '../sitePreviewTypes-BrJwGzJj.js';
@@ -81,7 +81,7 @@ var adminNavIcons = [
81
81
  ];
82
82
 
83
83
  // src/shared/studioSections.ts
84
- var studioRoles = /* @__PURE__ */ new Set(["admin", "editor", "client"]);
84
+ var studioRoles = /* @__PURE__ */ new Set(["admin", "developer", "editor", "client"]);
85
85
  var studioIcons = new Set(adminNavIcons);
86
86
  var isRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
87
87
  var isAbsoluteExternalURL = (value) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(value) || value.startsWith("//");
@@ -215,8 +215,10 @@ function configureAdmin(config) {
215
215
  brandPrimary = "#3b82f6",
216
216
  brandSecondary = "#8b5cf6",
217
217
  defaultTheme = "brand-light",
218
+ logoOnDarkUrl,
218
219
  logoUrl,
219
- allowThemePreference = false
220
+ allowThemePreference = false,
221
+ userSessionDurationSeconds = 60 * 60 * 24
220
222
  } = config;
221
223
  const studioEnabled = config.studio?.enabled ?? true;
222
224
  const formsEnabled = config.studio?.forms?.enabled ?? false;
@@ -258,23 +260,33 @@ function configureAdmin(config) {
258
260
  if (cssSources.length === 0) {
259
261
  cssPath = sourceCssPath;
260
262
  } else {
261
- let css = cssSources.map((filePath) => import_fs.default.readFileSync(filePath, "utf-8")).join("\n\n");
262
- css = css.replace(
263
- "--orion-cms-brand-primary-fallback: #3b82f6;",
264
- `--orion-cms-brand-primary-fallback: ${brandPrimary};`
265
- );
266
- css = css.replace(
267
- "--orion-cms-brand-secondary-fallback: #8b5cf6;",
268
- `--orion-cms-brand-secondary-fallback: ${brandSecondary};`
269
- );
270
- const outputBasePath = config.basePath || process.cwd();
271
- const genDir = import_path.default.resolve(outputBasePath, ".generated");
272
- if (!import_fs.default.existsSync(genDir)) {
273
- import_fs.default.mkdirSync(genDir, { recursive: true });
263
+ try {
264
+ let css = cssSources.map((filePath) => import_fs.default.readFileSync(filePath, "utf-8")).join("\n\n");
265
+ css = css.replace(
266
+ "--orion-cms-brand-primary-fallback: #3b82f6;",
267
+ `--orion-cms-brand-primary-fallback: ${brandPrimary};`
268
+ );
269
+ css = css.replace(
270
+ "--orion-cms-brand-secondary-fallback: #8b5cf6;",
271
+ `--orion-cms-brand-secondary-fallback: ${brandSecondary};`
272
+ );
273
+ const outputBasePath = config.basePath || process.cwd();
274
+ const genDir = import_path.default.resolve(outputBasePath, ".generated");
275
+ const genPath = import_path.default.resolve(genDir, "admin.css");
276
+ let existing = null;
277
+ try {
278
+ existing = import_fs.default.readFileSync(genPath, "utf-8");
279
+ } catch {
280
+ existing = null;
281
+ }
282
+ if (existing !== css) {
283
+ import_fs.default.mkdirSync(genDir, { recursive: true });
284
+ import_fs.default.writeFileSync(genPath, css);
285
+ }
286
+ cssPath = genPath;
287
+ } catch {
288
+ cssPath = sourceCssPath;
274
289
  }
275
- const genPath = import_path.default.resolve(genDir, "admin.css");
276
- import_fs.default.writeFileSync(genPath, css);
277
- cssPath = genPath;
278
290
  }
279
291
  const clientPath = "@orion-studios/payload-studio/admin/client";
280
292
  const studioNavClientProps = {
@@ -321,6 +333,49 @@ function configureAdmin(config) {
321
333
  }
322
334
  };
323
335
  };
336
+ const attachStudioEditRedirectToCollection = (collection, options) => {
337
+ if (!studioEnabled) {
338
+ return collection;
339
+ }
340
+ const collectionWithBreadcrumb = attachStudioBackBreadcrumbToCollection(collection);
341
+ const existingViews = collectionWithBreadcrumb.admin?.components?.views;
342
+ const existingEditViews = existingViews?.edit;
343
+ const hasCustomEditView = Boolean(
344
+ existingEditViews?.root || existingEditViews?.default && typeof existingEditViews.default === "object" && existingEditViews.default.Component
345
+ );
346
+ if (hasCustomEditView) {
347
+ return collectionWithBreadcrumb;
348
+ }
349
+ return {
350
+ ...collectionWithBreadcrumb,
351
+ admin: {
352
+ ...collectionWithBreadcrumb.admin,
353
+ components: {
354
+ ...collectionWithBreadcrumb.admin?.components,
355
+ views: {
356
+ ...existingViews,
357
+ edit: {
358
+ ...existingEditViews,
359
+ default: {
360
+ ...typeof existingEditViews?.default === "object" ? existingEditViews.default : {},
361
+ Component: {
362
+ exportName: "StudioDocumentRedirect",
363
+ path: clientPath,
364
+ clientProps: {
365
+ description: options.description,
366
+ ...options.emptyHref ? { emptyHref: options.emptyHref } : {},
367
+ ...options.emptyLabel ? { emptyLabel: options.emptyLabel } : {},
368
+ pathBase: options.pathBase,
369
+ title: options.title
370
+ }
371
+ }
372
+ }
373
+ }
374
+ }
375
+ }
376
+ }
377
+ };
378
+ };
324
379
  return {
325
380
  admin: {
326
381
  css: cssPath,
@@ -338,6 +393,7 @@ function configureAdmin(config) {
338
393
  path: clientPath,
339
394
  clientProps: {
340
395
  brandName,
396
+ logoOnDarkUrl,
341
397
  logoUrl
342
398
  }
343
399
  },
@@ -346,6 +402,7 @@ function configureAdmin(config) {
346
402
  path: clientPath,
347
403
  clientProps: {
348
404
  brandName,
405
+ logoOnDarkUrl,
349
406
  logoUrl
350
407
  }
351
408
  }
@@ -360,6 +417,7 @@ function configureAdmin(config) {
360
417
  },
361
418
  ...studioEnabled ? {
362
419
  studioGlobals: {
420
+ exact: true,
363
421
  path: globalsBasePath,
364
422
  Component: {
365
423
  exportName: "AdminStudioGlobalsView",
@@ -371,10 +429,11 @@ function configureAdmin(config) {
371
429
  }
372
430
  }
373
431
  },
374
- studioPages: {
375
- path: pagesBasePath,
432
+ studioPageNew: {
433
+ exact: true,
434
+ path: `${pagesBasePath}/new`,
376
435
  Component: {
377
- exportName: "AdminStudioPagesListView",
436
+ exportName: "AdminStudioNewPageView",
378
437
  path: clientPath,
379
438
  clientProps: {
380
439
  ...studioNavClientProps,
@@ -383,6 +442,7 @@ function configureAdmin(config) {
383
442
  }
384
443
  },
385
444
  studioPageEditor: {
445
+ exact: true,
386
446
  path: `${pagesBasePath}/:id`,
387
447
  Component: {
388
448
  exportName: "AdminStudioPageEditView",
@@ -393,10 +453,11 @@ function configureAdmin(config) {
393
453
  }
394
454
  }
395
455
  },
396
- studioPageNew: {
397
- path: `${pagesBasePath}/new`,
456
+ studioPages: {
457
+ exact: true,
458
+ path: pagesBasePath,
398
459
  Component: {
399
- exportName: "AdminStudioNewPageView",
460
+ exportName: "AdminStudioPagesListView",
400
461
  path: clientPath,
401
462
  clientProps: {
402
463
  ...studioNavClientProps,
@@ -405,6 +466,7 @@ function configureAdmin(config) {
405
466
  }
406
467
  },
407
468
  studioContactForm: {
469
+ exact: true,
408
470
  path: contactFormStudioPath,
409
471
  Component: {
410
472
  exportName: "AdminStudioContactFormView",
@@ -417,7 +479,47 @@ function configureAdmin(config) {
417
479
  }
418
480
  },
419
481
  ...formsEnabled ? {
482
+ studioFormSubmission: {
483
+ exact: true,
484
+ path: `${formsBasePath}/submissions/:id`,
485
+ Component: {
486
+ exportName: "AdminStudioFormSubmissionView",
487
+ path: clientPath,
488
+ clientProps: {
489
+ ...studioNavClientProps,
490
+ formsCollectionSlug,
491
+ formSubmissionsCollectionSlug,
492
+ formUploadsCollectionSlug
493
+ }
494
+ }
495
+ },
496
+ studioFormUpload: {
497
+ exact: true,
498
+ path: `${formsBasePath}/uploads/:id`,
499
+ Component: {
500
+ exportName: "AdminStudioFormUploadView",
501
+ path: clientPath,
502
+ clientProps: {
503
+ ...studioNavClientProps,
504
+ formUploadsCollectionSlug
505
+ }
506
+ }
507
+ },
508
+ studioFormDetail: {
509
+ exact: true,
510
+ path: `${formsBasePath}/:id`,
511
+ Component: {
512
+ exportName: "AdminStudioFormDetailView",
513
+ path: clientPath,
514
+ clientProps: {
515
+ ...studioNavClientProps,
516
+ formsCollectionSlug,
517
+ formSubmissionsCollectionSlug
518
+ }
519
+ }
520
+ },
420
521
  studioForms: {
522
+ exact: true,
421
523
  path: formsBasePath,
422
524
  Component: {
423
525
  exportName: "AdminStudioFormsView",
@@ -431,10 +533,11 @@ function configureAdmin(config) {
431
533
  }
432
534
  }
433
535
  } : {},
434
- studioMedia: {
435
- path: mediaBasePath,
536
+ studioMediaItem: {
537
+ exact: true,
538
+ path: `${mediaBasePath}/:id`,
436
539
  Component: {
437
- exportName: "AdminStudioMediaView",
540
+ exportName: "AdminStudioMediaItemView",
438
541
  path: clientPath,
439
542
  clientProps: {
440
543
  ...studioNavClientProps,
@@ -442,10 +545,11 @@ function configureAdmin(config) {
442
545
  }
443
546
  }
444
547
  },
445
- studioMediaItem: {
446
- path: `${mediaBasePath}/:id`,
548
+ studioMedia: {
549
+ exact: true,
550
+ path: mediaBasePath,
447
551
  Component: {
448
- exportName: "AdminStudioMediaItemView",
552
+ exportName: "AdminStudioMediaView",
449
553
  path: clientPath,
450
554
  clientProps: {
451
555
  ...studioNavClientProps,
@@ -454,6 +558,7 @@ function configureAdmin(config) {
454
558
  }
455
559
  },
456
560
  studioTools: {
561
+ exact: true,
457
562
  path: toolsBasePath,
458
563
  Component: {
459
564
  exportName: "AdminStudioToolsView",
@@ -498,6 +603,7 @@ function configureAdmin(config) {
498
603
  path: clientPath,
499
604
  clientProps: {
500
605
  brandName,
606
+ logoOnDarkUrl,
501
607
  logoUrl
502
608
  }
503
609
  }
@@ -534,8 +640,17 @@ function configureAdmin(config) {
534
640
  const hasThemePreference = existingFields.some(
535
641
  (field) => typeof field === "object" && field !== null && "name" in field && field.name === "themePreference"
536
642
  );
643
+ const normalizedAuth = usersCollection.auth === true ? {
644
+ tokenExpiration: userSessionDurationSeconds,
645
+ useSessions: true
646
+ } : usersCollection.auth && typeof usersCollection.auth === "object" ? {
647
+ ...usersCollection.auth,
648
+ tokenExpiration: usersCollection.auth.tokenExpiration ?? userSessionDurationSeconds,
649
+ useSessions: usersCollection.auth.useSessions ?? true
650
+ } : usersCollection.auth;
537
651
  const nextCollection = {
538
652
  ...usersCollection,
653
+ auth: normalizedAuth,
539
654
  fields: !allowThemePreference || hasThemePreference ? existingFields : [...existingFields, createThemePreferenceField(defaultTheme)]
540
655
  };
541
656
  return attachStudioBackBreadcrumbToCollection(nextCollection);
@@ -597,25 +712,74 @@ function configureAdmin(config) {
597
712
  return attachStudioBackBreadcrumbToCollection(mediaCollection);
598
713
  },
599
714
  wrapFormsCollection(formsCollection) {
600
- return attachStudioBackBreadcrumbToCollection(formsCollection);
715
+ return attachStudioEditRedirectToCollection(formsCollection, {
716
+ description: "Redirecting to the Studio form workspace.",
717
+ emptyHref: formsBasePath,
718
+ emptyLabel: "Open Forms",
719
+ pathBase: formsBasePath,
720
+ title: "Opening Form..."
721
+ });
601
722
  },
602
723
  wrapFormSubmissionsCollection(formSubmissionsCollection) {
603
- return attachStudioBackBreadcrumbToCollection(formSubmissionsCollection);
724
+ return attachStudioEditRedirectToCollection(formSubmissionsCollection, {
725
+ description: "Redirecting to the Studio submission workspace.",
726
+ emptyHref: formsBasePath,
727
+ emptyLabel: "Open Forms",
728
+ pathBase: `${formsBasePath}/submissions`,
729
+ title: "Opening Submission..."
730
+ });
604
731
  },
605
732
  wrapFormUploadsCollection(formUploadsCollection) {
606
- return attachStudioBackBreadcrumbToCollection(formUploadsCollection);
733
+ return attachStudioEditRedirectToCollection(formUploadsCollection, {
734
+ description: "Redirecting to the Studio upload workspace.",
735
+ emptyHref: formsBasePath,
736
+ emptyLabel: "Open Forms",
737
+ pathBase: `${formsBasePath}/uploads`,
738
+ title: "Opening Upload..."
739
+ });
607
740
  },
608
741
  wrapGlobals(globals2) {
609
- const labelMap = {
742
+ const defaultLabelMap = {
610
743
  header: { group: "Site Design", label: "Header & Navigation" },
611
744
  footer: { group: "Site Design", label: "Footer" },
612
745
  "site-settings": { group: "Site Design", label: "Website Settings" },
613
746
  "social-media": { group: "Site Design", label: "Social Media" },
614
747
  "contact-form": { group: "Lead Forms", label: "Contact Form" }
615
748
  };
749
+ const configuredBySlug = new Map(
750
+ (config.studio?.globals || []).map((link) => [link.slug, link])
751
+ );
752
+ const attachBreadcrumbToGlobal = (global) => {
753
+ if (!studioEnabled) {
754
+ return global;
755
+ }
756
+ const existingControls = global.admin?.components?.elements?.beforeDocumentControls;
757
+ return {
758
+ ...global,
759
+ admin: {
760
+ ...global.admin,
761
+ components: {
762
+ ...global.admin?.components,
763
+ elements: {
764
+ ...global.admin?.components?.elements,
765
+ beforeDocumentControls: appendComponent(
766
+ existingControls,
767
+ studioBackBreadcrumbComponent,
768
+ "StudioBackBreadcrumb"
769
+ )
770
+ }
771
+ }
772
+ }
773
+ };
774
+ };
616
775
  return globals2.map((global) => {
617
- const mapping = labelMap[global.slug];
618
- if (!mapping) return global;
776
+ const configured = configuredBySlug.get(global.slug);
777
+ const defaults = defaultLabelMap[global.slug];
778
+ const mapping = configured || defaults ? {
779
+ group: configured?.group || defaults?.group,
780
+ label: configured?.label || defaults?.label || global.slug
781
+ } : void 0;
782
+ if (!mapping) return attachBreadcrumbToGlobal(global);
619
783
  const shouldAttachSiteSettingsEditView = studioEnabled && global.slug === "site-settings";
620
784
  const shouldAttachSocialMediaEditView = studioEnabled && global.slug === "social-media";
621
785
  const shouldAttachContactFormRedirect = studioEnabled && global.slug === "contact-form";
@@ -724,7 +888,7 @@ function configureAdmin(config) {
724
888
  ...global,
725
889
  admin: {
726
890
  ...global.admin,
727
- group: mapping.group,
891
+ ...mapping.group ? { group: mapping.group } : {},
728
892
  components: {
729
893
  ...global.admin?.components,
730
894
  elements: {
@@ -7,14 +7,14 @@ import {
7
7
  socialMediaConnectionsField,
8
8
  themePreferenceField,
9
9
  withTooltips
10
- } from "../chunk-5FNTVRCR.mjs";
11
- import "../chunk-W2UOCJDX.mjs";
10
+ } from "../chunk-MMJNHBOF.mjs";
12
11
  import {
13
12
  SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM,
14
13
  SOCIAL_MEDIA_ICON_OPTIONS,
15
14
  SOCIAL_MEDIA_PLATFORMS,
16
15
  SOCIAL_MEDIA_PLATFORM_LABELS
17
16
  } from "../chunk-ZTXJG4K5.mjs";
17
+ import "../chunk-W2UOCJDX.mjs";
18
18
  import "../chunk-6BWS3CLP.mjs";
19
19
  export {
20
20
  SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM,
@@ -111,6 +111,14 @@ function NavIcon({ name }) {
111
111
  return null;
112
112
  }
113
113
  }
114
+ function LogoutIcon() {
115
+ const props = { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", style: iconStyle };
116
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...props, "aria-hidden": "true", children: [
117
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" }),
118
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "10 17 5 12 10 7" }),
119
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "5", y1: "12", x2: "17", y2: "12" })
120
+ ] });
121
+ }
114
122
  function AdminShellClient({
115
123
  children,
116
124
  brandName,
@@ -122,14 +130,12 @@ function AdminShellClient({
122
130
  onLogout,
123
131
  storageKey = "orion-admin-shell-collapsed"
124
132
  }) {
125
- const [collapsed, setCollapsed] = (0, import_react.useState)(false);
133
+ const [collapsed, setCollapsed] = (0, import_react.useState)(true);
126
134
  const [loggingOut, setLoggingOut] = (0, import_react.useState)(false);
127
135
  (0, import_react.useEffect)(() => {
128
136
  try {
129
137
  const stored = window.localStorage.getItem(storageKey);
130
- if (stored === "1") {
131
- setCollapsed(true);
132
- }
138
+ setCollapsed(stored === "1");
133
139
  } catch {
134
140
  }
135
141
  }, [storageKey]);
@@ -191,7 +197,10 @@ function AdminShellClient({
191
197
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "orion-admin-user-label", children: "Signed in as" }),
192
198
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "orion-admin-user-email", children: userEmail })
193
199
  ] }) : null,
194
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "orion-admin-logout", disabled: loggingOut, onClick: handleLogout, type: "button", children: loggingOut ? "..." : "Log out" })
200
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { className: "orion-admin-logout", disabled: loggingOut, onClick: handleLogout, type: "button", children: [
201
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LogoutIcon, {}),
202
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: loggingOut ? "Logging out..." : "Log out" })
203
+ ] })
195
204
  ] })
196
205
  ] }),
197
206
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("main", { className: "orion-admin-main", children })
@@ -8,7 +8,7 @@ import {
8
8
  MediaUploadForm,
9
9
  SiteFooterPreview,
10
10
  SiteHeaderPreview
11
- } from "../chunk-KPIX7OSV.mjs";
11
+ } from "../chunk-NF37A575.mjs";
12
12
  import "../chunk-ROTPP5CU.mjs";
13
13
 
14
14
  // src/admin-app/components/PageEditorFrame.tsx
@@ -1,4 +1,4 @@
1
- export { A as AdminBreadcrumbs, a as AdminNavInput, b as AdminNavLinkItem, c as AdminPage, d as AdminPageLinkOption, e as AdminPageRecord, M as MediaDetailPanelProps, f as MediaListItemProps, N as NestedNavItem, g as NestedNavItemInput, h as NestedNavTree, j as buildAdminPageLinkOptions, k as buildNestedNavTree, l as getAdminNavRows, n as normalizeAdminNavInputs, m as normalizeNestedNavItems, p as parseAdminHeaderNavFromForm } from '../index-DEQC3Dwj.mjs';
2
- export { 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';
1
+ export { A as AdminBreadcrumbs, a as AdminNavInput, b as AdminNavLinkItem, c as AdminPage, d as AdminPageLinkOption, e as AdminPageRecord, M as MediaDetailPanelProps, f as MediaListItemProps, N as NestedNavItem, g as NestedNavItemInput, h as NestedNavTree, j as buildAdminPageLinkOptions, k as buildNestedNavTree, l as getAdminNavRows, n as normalizeAdminNavInputs, m as normalizeNestedNavItems, p as parseAdminHeaderNavFromForm } from '../index-G_uTNffQ.mjs';
2
+ export { 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 'react/jsx-runtime';
4
4
  import 'react';
@@ -1,4 +1,4 @@
1
- export { A as AdminBreadcrumbs, a as AdminNavInput, b as AdminNavLinkItem, c as AdminPage, d as AdminPageLinkOption, e as AdminPageRecord, M as MediaDetailPanelProps, f as MediaListItemProps, N as NestedNavItem, g as NestedNavItemInput, h as NestedNavTree, j as buildAdminPageLinkOptions, k as buildNestedNavTree, l as getAdminNavRows, n as normalizeAdminNavInputs, m as normalizeNestedNavItems, p as parseAdminHeaderNavFromForm } from '../index-52HdVLQq.js';
2
- export { 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';
1
+ export { A as AdminBreadcrumbs, a as AdminNavInput, b as AdminNavLinkItem, c as AdminPage, d as AdminPageLinkOption, e as AdminPageRecord, M as MediaDetailPanelProps, f as MediaListItemProps, N as NestedNavItem, g as NestedNavItemInput, h as NestedNavTree, j as buildAdminPageLinkOptions, k as buildNestedNavTree, l as getAdminNavRows, n as normalizeAdminNavInputs, m as normalizeNestedNavItems, p as parseAdminHeaderNavFromForm } from '../index-DAdN56fM.js';
2
+ export { 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 'react/jsx-runtime';
4
4
  import 'react';