@orion-studios/payload-studio 0.6.0-beta.3 → 0.6.0-beta.5

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.
@@ -1169,7 +1169,6 @@ __export(client_exports, {
1169
1169
  AdminLoginIntro: () => AdminLoginIntro,
1170
1170
  AdminLoginPasswordToggle: () => AdminLoginPasswordToggle,
1171
1171
  AdminStudioContactFormView: () => AdminStudioContactFormView,
1172
- AdminStudioDashboard: () => AdminStudioDashboard,
1173
1172
  AdminStudioFooterGlobalView: () => AdminStudioFooterGlobalView,
1174
1173
  AdminStudioFormsView: () => AdminStudioFormsView,
1175
1174
  AdminStudioGlobalsView: () => AdminStudioGlobalsView,
@@ -1249,7 +1248,7 @@ function useSiteBranding(defaultName, defaultLogoUrl) {
1249
1248
  let cancelled = false;
1250
1249
  const run = async () => {
1251
1250
  try {
1252
- const res = await fetch("/api/globals/site-settings?depth=1&draft=true", {
1251
+ const res = await fetch("/api/globals/site-settings?depth=1", {
1253
1252
  credentials: "include"
1254
1253
  });
1255
1254
  if (!res.ok) return;
@@ -2460,38 +2459,85 @@ function WelcomeHeader({
2460
2459
  );
2461
2460
  }
2462
2461
 
2463
- // src/admin/components/studio/AdminStudioDashboard.tsx
2464
- var import_link = __toESM(require("next/link"));
2465
-
2466
- // src/admin-app/components/AdminBreadcrumbs.tsx
2467
- var import_jsx_runtime16 = require("react/jsx-runtime");
2468
- function AdminBreadcrumbs({ items }) {
2469
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("nav", { "aria-label": "Breadcrumb", className: "orion-admin-breadcrumbs", children: items.map((item, index) => {
2470
- const isLast = index === items.length - 1;
2471
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
2472
- item.href && !isLast ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("a", { href: item.href, children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: item.label }),
2473
- !isLast ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "orion-admin-breadcrumb-sep", children: "/" }) : null
2474
- ] }, `${item.label}-${index}`);
2475
- }) });
2476
- }
2462
+ // src/admin/components/studio/AdminStudioNav.tsx
2463
+ var import_react13 = require("react");
2464
+ var import_navigation = require("next/navigation");
2465
+ var import_ui3 = require("@payloadcms/ui");
2477
2466
 
2478
- // src/admin-app/components/AdminPage.tsx
2479
- var import_jsx_runtime17 = require("react/jsx-runtime");
2480
- function AdminPage({ title, description, breadcrumbs, actions, children }) {
2481
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "orion-admin-page", children: [
2482
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "orion-admin-page-header", children: [
2483
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AdminBreadcrumbs, { items: breadcrumbs }),
2484
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "orion-admin-page-title-row", children: [
2485
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
2486
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h1", { children: title }),
2487
- description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: description }) : null
2488
- ] }),
2489
- actions ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-page-actions", children: actions }) : null
2490
- ] })
2491
- ] }),
2492
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-page-content", children })
2493
- ] });
2494
- }
2467
+ // src/admin/components/studio/adminPathUtils.ts
2468
+ var import_react12 = require("react");
2469
+ var DEFAULT_ADMIN_BASE_PATH = "/admin";
2470
+ var normalizePath = (value) => {
2471
+ if (!value || value === "/") return "/";
2472
+ const withLeadingSlash = value.startsWith("/") ? value : `/${value}`;
2473
+ const trimmed = withLeadingSlash.replace(/\/+$/, "");
2474
+ return trimmed.length > 0 ? trimmed : "/";
2475
+ };
2476
+ var normalizeAdminBasePath = (value) => {
2477
+ const normalized = normalizePath(value);
2478
+ return normalized === "/" ? DEFAULT_ADMIN_BASE_PATH : normalized;
2479
+ };
2480
+ var detectAdminBasePath = (pathname, fallback = DEFAULT_ADMIN_BASE_PATH) => {
2481
+ const normalizedPathname = normalizePath(pathname);
2482
+ const normalizedFallback = normalizeAdminBasePath(fallback);
2483
+ const markers = [
2484
+ "/contact-form",
2485
+ "/collections/",
2486
+ "/globals/",
2487
+ "/forms",
2488
+ "/pages/",
2489
+ "/tools",
2490
+ "/media",
2491
+ "/logout",
2492
+ "/login"
2493
+ ];
2494
+ for (const marker of markers) {
2495
+ const index = normalizedPathname.indexOf(marker);
2496
+ if (index > 0) {
2497
+ return normalizeAdminBasePath(normalizedPathname.slice(0, index));
2498
+ }
2499
+ }
2500
+ if (normalizedPathname === normalizedFallback || normalizedPathname.startsWith(`${normalizedFallback}/`)) {
2501
+ return normalizedFallback;
2502
+ }
2503
+ const segments = normalizedPathname.split("/").filter(Boolean);
2504
+ if (segments.length > 0) {
2505
+ return normalizeAdminBasePath(`/${segments[0]}`);
2506
+ }
2507
+ return normalizedFallback;
2508
+ };
2509
+ var isAbsoluteExternalURL = (value) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(value) || value.startsWith("//");
2510
+ var resolveAdminPath = (adminBasePath, targetPath) => {
2511
+ if (!targetPath) return adminBasePath;
2512
+ if (isAbsoluteExternalURL(targetPath)) return targetPath;
2513
+ const normalizedBasePath = normalizeAdminBasePath(adminBasePath);
2514
+ const normalizedTargetPath = normalizePath(targetPath);
2515
+ if (normalizedTargetPath === "/admin") {
2516
+ return normalizedBasePath;
2517
+ }
2518
+ if (normalizedTargetPath.startsWith("/admin/")) {
2519
+ return `${normalizedBasePath}${normalizedTargetPath.slice("/admin".length)}`;
2520
+ }
2521
+ if (normalizedTargetPath === normalizedBasePath || normalizedTargetPath.startsWith(`${normalizedBasePath}/`)) {
2522
+ return normalizedTargetPath;
2523
+ }
2524
+ if (normalizedTargetPath === "/") {
2525
+ return normalizedBasePath;
2526
+ }
2527
+ return `${normalizedBasePath}${normalizedTargetPath}`;
2528
+ };
2529
+ var useAdminBasePath = (fallback = DEFAULT_ADMIN_BASE_PATH) => {
2530
+ const [adminBasePath, setAdminBasePath] = (0, import_react12.useState)(normalizeAdminBasePath(fallback));
2531
+ (0, import_react12.useEffect)(() => {
2532
+ const update = () => {
2533
+ setAdminBasePath(detectAdminBasePath(window.location.pathname, fallback));
2534
+ };
2535
+ update();
2536
+ window.addEventListener("popstate", update);
2537
+ return () => window.removeEventListener("popstate", update);
2538
+ }, [fallback]);
2539
+ return adminBasePath;
2540
+ };
2495
2541
 
2496
2542
  // src/admin-app/routeRegistry.ts
2497
2543
  var adminNavIcons = [
@@ -2524,13 +2570,13 @@ var navItemIsActive = (pathname, item) => {
2524
2570
  var studioRoles = /* @__PURE__ */ new Set(["admin", "editor", "client"]);
2525
2571
  var studioIcons = new Set(adminNavIcons);
2526
2572
  var isRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
2527
- var isAbsoluteExternalURL = (value) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(value) || value.startsWith("//");
2573
+ var isAbsoluteExternalURL2 = (value) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(value) || value.startsWith("//");
2528
2574
  var normalizePathLikeValue = (value) => {
2529
2575
  const trimmed = value.trim();
2530
2576
  if (!trimmed) {
2531
2577
  return "";
2532
2578
  }
2533
- if (isAbsoluteExternalURL(trimmed)) {
2579
+ if (isAbsoluteExternalURL2(trimmed)) {
2534
2580
  return trimmed;
2535
2581
  }
2536
2582
  const withLeadingSlash = trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
@@ -2598,232 +2644,6 @@ var resolveStudioSections = (value) => {
2598
2644
  return sections;
2599
2645
  };
2600
2646
 
2601
- // src/admin/components/studio/adminPathUtils.ts
2602
- var import_react12 = require("react");
2603
- var DEFAULT_ADMIN_BASE_PATH = "/admin";
2604
- var normalizePath = (value) => {
2605
- if (!value || value === "/") return "/";
2606
- const withLeadingSlash = value.startsWith("/") ? value : `/${value}`;
2607
- const trimmed = withLeadingSlash.replace(/\/+$/, "");
2608
- return trimmed.length > 0 ? trimmed : "/";
2609
- };
2610
- var normalizeAdminBasePath = (value) => {
2611
- const normalized = normalizePath(value);
2612
- return normalized === "/" ? DEFAULT_ADMIN_BASE_PATH : normalized;
2613
- };
2614
- var detectAdminBasePath = (pathname, fallback = DEFAULT_ADMIN_BASE_PATH) => {
2615
- const normalizedPathname = normalizePath(pathname);
2616
- const normalizedFallback = normalizeAdminBasePath(fallback);
2617
- const markers = [
2618
- "/contact-form",
2619
- "/collections/",
2620
- "/globals/",
2621
- "/forms",
2622
- "/pages/",
2623
- "/tools",
2624
- "/media",
2625
- "/logout",
2626
- "/login"
2627
- ];
2628
- for (const marker of markers) {
2629
- const index = normalizedPathname.indexOf(marker);
2630
- if (index > 0) {
2631
- return normalizeAdminBasePath(normalizedPathname.slice(0, index));
2632
- }
2633
- }
2634
- if (normalizedPathname === normalizedFallback || normalizedPathname.startsWith(`${normalizedFallback}/`)) {
2635
- return normalizedFallback;
2636
- }
2637
- const segments = normalizedPathname.split("/").filter(Boolean);
2638
- if (segments.length > 0) {
2639
- return normalizeAdminBasePath(`/${segments[0]}`);
2640
- }
2641
- return normalizedFallback;
2642
- };
2643
- var isAbsoluteExternalURL2 = (value) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(value) || value.startsWith("//");
2644
- var resolveAdminPath = (adminBasePath, targetPath) => {
2645
- if (!targetPath) return adminBasePath;
2646
- if (isAbsoluteExternalURL2(targetPath)) return targetPath;
2647
- const normalizedBasePath = normalizeAdminBasePath(adminBasePath);
2648
- const normalizedTargetPath = normalizePath(targetPath);
2649
- if (normalizedTargetPath === "/admin") {
2650
- return normalizedBasePath;
2651
- }
2652
- if (normalizedTargetPath.startsWith("/admin/")) {
2653
- return `${normalizedBasePath}${normalizedTargetPath.slice("/admin".length)}`;
2654
- }
2655
- if (normalizedTargetPath === normalizedBasePath || normalizedTargetPath.startsWith(`${normalizedBasePath}/`)) {
2656
- return normalizedTargetPath;
2657
- }
2658
- if (normalizedTargetPath === "/") {
2659
- return normalizedBasePath;
2660
- }
2661
- return `${normalizedBasePath}${normalizedTargetPath}`;
2662
- };
2663
- var useAdminBasePath = (fallback = DEFAULT_ADMIN_BASE_PATH) => {
2664
- const [adminBasePath, setAdminBasePath] = (0, import_react12.useState)(normalizeAdminBasePath(fallback));
2665
- (0, import_react12.useEffect)(() => {
2666
- const update = () => {
2667
- setAdminBasePath(detectAdminBasePath(window.location.pathname, fallback));
2668
- };
2669
- update();
2670
- window.addEventListener("popstate", update);
2671
- return () => window.removeEventListener("popstate", update);
2672
- }, [fallback]);
2673
- return adminBasePath;
2674
- };
2675
-
2676
- // src/admin/components/studio/StudioSectionLayout.tsx
2677
- var import_react14 = require("react");
2678
- var import_navigation = require("next/navigation");
2679
- var import_ui3 = require("@payloadcms/ui");
2680
-
2681
- // src/admin-app/components/AdminShellClient.tsx
2682
- var import_react13 = require("react");
2683
- var import_jsx_runtime18 = require("react/jsx-runtime");
2684
- var iconSize2 = 20;
2685
- var iconStyle = { display: "block", flexShrink: 0 };
2686
- function NavIcon({ name }) {
2687
- const props = { width: iconSize2, height: iconSize2, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", style: iconStyle };
2688
- switch (name) {
2689
- case "dashboard":
2690
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2691
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { x: "3", y: "3", width: "7", height: "9", rx: "1" }),
2692
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { x: "14", y: "3", width: "7", height: "5", rx: "1" }),
2693
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { x: "14", y: "12", width: "7", height: "9", rx: "1" }),
2694
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { x: "3", y: "16", width: "7", height: "5", rx: "1" })
2695
- ] });
2696
- case "pages":
2697
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2698
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
2699
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("polyline", { points: "14 2 14 8 20 8" }),
2700
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("line", { x1: "8", y1: "13", x2: "16", y2: "13" }),
2701
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("line", { x1: "8", y1: "17", x2: "12", y2: "17" })
2702
- ] });
2703
- case "forms":
2704
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2705
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M9 3h6" }),
2706
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M12 3v18" }),
2707
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M5 7h14a2 2 0 0 1 2 2v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a2 2 0 0 1 2-2Z" }),
2708
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M7 11h10" }),
2709
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M7 15h6" })
2710
- ] });
2711
- case "globals":
2712
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2713
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
2714
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
2715
- ] });
2716
- case "media":
2717
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2718
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
2719
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
2720
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("polyline", { points: "21 15 16 10 5 21" })
2721
- ] });
2722
- case "tools":
2723
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76Z" }) });
2724
- case "analytics":
2725
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2726
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M4 19V5" }),
2727
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M10 19V10" }),
2728
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M16 19v-6" }),
2729
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M22 19V3" })
2730
- ] });
2731
- case "account":
2732
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2733
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
2734
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("circle", { cx: "12", cy: "7", r: "4" })
2735
- ] });
2736
- default:
2737
- return null;
2738
- }
2739
- }
2740
- function AdminShellClient({
2741
- children,
2742
- brandName,
2743
- logoUrl,
2744
- userEmail,
2745
- userRole,
2746
- pathname,
2747
- navItems,
2748
- onLogout,
2749
- storageKey = "orion-admin-shell-collapsed"
2750
- }) {
2751
- const [collapsed, setCollapsed] = (0, import_react13.useState)(false);
2752
- const [loggingOut, setLoggingOut] = (0, import_react13.useState)(false);
2753
- (0, import_react13.useEffect)(() => {
2754
- try {
2755
- const stored = window.localStorage.getItem(storageKey);
2756
- if (stored === "1") {
2757
- setCollapsed(true);
2758
- }
2759
- } catch {
2760
- }
2761
- }, [storageKey]);
2762
- const toggleSidebar = () => {
2763
- setCollapsed((current) => {
2764
- const next = !current;
2765
- try {
2766
- window.localStorage.setItem(storageKey, next ? "1" : "0");
2767
- } catch {
2768
- }
2769
- return next;
2770
- });
2771
- };
2772
- const handleLogout = async () => {
2773
- setLoggingOut(true);
2774
- try {
2775
- await onLogout();
2776
- } finally {
2777
- setLoggingOut(false);
2778
- }
2779
- };
2780
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: `orion-admin-shell ${collapsed ? "is-collapsed" : ""}`, children: [
2781
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("aside", { className: "orion-admin-sidebar", children: [
2782
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2783
- "button",
2784
- {
2785
- "aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
2786
- className: "orion-admin-sidebar-toggle",
2787
- onClick: toggleSidebar,
2788
- type: "button",
2789
- children: collapsed ? ">" : "<"
2790
- }
2791
- ),
2792
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "orion-admin-brand-wrap", children: [
2793
- logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "orion-admin-brand-logo", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { alt: `${brandName} logo`, src: logoUrl }) }) : null,
2794
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "orion-admin-brand-text", children: [
2795
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "orion-admin-brand-name", title: brandName, children: collapsed ? brandName.slice(0, 1).toUpperCase() : brandName }),
2796
- !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "orion-admin-brand-subtitle", children: "Studio" }) : null
2797
- ] })
2798
- ] }),
2799
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("nav", { className: "orion-admin-nav", children: navItems.filter((item) => roleCanAccessNav(userRole, item)).map((item) => {
2800
- const active = navItemIsActive(pathname, item);
2801
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2802
- "a",
2803
- {
2804
- className: `orion-admin-nav-link ${active ? "is-active" : ""}`,
2805
- href: item.href,
2806
- title: item.label,
2807
- children: item.icon ? collapsed ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(NavIcon, { name: item.icon }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { style: { alignItems: "center", display: "flex", gap: "0.6rem" }, children: [
2808
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(NavIcon, { name: item.icon }),
2809
- item.label
2810
- ] }) : collapsed ? item.label.slice(0, 1) : item.label
2811
- },
2812
- item.href
2813
- );
2814
- }) }),
2815
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "orion-admin-sidebar-footer", children: [
2816
- !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
2817
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "orion-admin-user-label", children: "Signed in as" }),
2818
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "orion-admin-user-email", children: userEmail })
2819
- ] }) : null,
2820
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "orion-admin-logout", disabled: loggingOut, onClick: handleLogout, type: "button", children: loggingOut ? "..." : "Log out" })
2821
- ] })
2822
- ] }),
2823
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("main", { className: "orion-admin-main", children })
2824
- ] });
2825
- }
2826
-
2827
2647
  // src/admin/components/studio/studioNavModel.ts
2828
2648
  var getPropString = (props, key, fallback) => {
2829
2649
  if (!props || typeof props !== "object") return fallback;
@@ -2981,214 +2801,79 @@ var isStudioShellRoute = (pathname, props, adminBasePath) => {
2981
2801
  return shellPrefixes.some((prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`));
2982
2802
  };
2983
2803
 
2984
- // src/admin/components/studio/StudioSectionLayout.tsx
2985
- var import_jsx_runtime19 = require("react/jsx-runtime");
2986
- function StudioSectionLayout({ children, navProps }) {
2987
- const { user } = (0, import_ui3.useAuth)();
2988
- const pathname = (0, import_navigation.usePathname)() || "";
2989
- const router = (0, import_navigation.useRouter)();
2990
- const adminBasePath = useAdminBasePath();
2991
- const defaultBrandName = getPropString(navProps, "brandName", "Orion Studio");
2992
- const defaultLogoUrl = getPropString(navProps, "logoUrl", "");
2993
- const navItems = (0, import_react14.useMemo)(
2994
- () => buildStudioNavItems(navProps, adminBasePath),
2995
- [adminBasePath, navProps]
2996
- );
2997
- const branding = useSiteBranding(defaultBrandName, defaultLogoUrl || void 0);
2998
- (0, import_react14.useLayoutEffect)(() => {
2999
- document.body.classList.add("orion-studio-shell-active");
3000
- return () => {
3001
- document.body.classList.remove("orion-studio-shell-active");
3002
- };
3003
- }, []);
3004
- const logout = (0, import_react14.useMemo)(
3005
- () => async () => {
3006
- await fetch("/api/users/logout", {
3007
- credentials: "include",
3008
- method: "POST"
3009
- });
3010
- router.push(resolveAdminPath(adminBasePath, "/login"));
3011
- router.refresh();
3012
- },
3013
- [adminBasePath, router]
3014
- );
3015
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3016
- AdminShellClient,
3017
- {
3018
- brandName: branding.siteName || defaultBrandName,
3019
- logoUrl: branding.logoUrl || defaultLogoUrl || void 0,
3020
- navItems,
3021
- onLogout: logout,
3022
- pathname,
3023
- storageKey: "orion-admin-sidebar-collapsed-v1",
3024
- userEmail: typeof user?.email === "string" ? user.email : "user",
3025
- userRole: readUserRole(user),
3026
- children
3027
- }
3028
- );
3029
- }
3030
-
3031
- // src/admin/components/studio/AdminStudioDashboard.tsx
3032
- var import_jsx_runtime20 = require("react/jsx-runtime");
3033
- var getPropString2 = (props, key, fallback) => {
3034
- if (!props || typeof props !== "object") return fallback;
3035
- const direct = props[key];
3036
- if (typeof direct === "string" && direct.length > 0) return direct;
3037
- const clientProps = props.clientProps;
3038
- if (clientProps && typeof clientProps === "object") {
3039
- const nested = clientProps[key];
3040
- if (typeof nested === "string" && nested.length > 0) return nested;
3041
- }
3042
- return fallback;
3043
- };
3044
- var getPropBoolean2 = (props, key, fallback) => {
3045
- if (!props || typeof props !== "object") return fallback;
3046
- const direct = props[key];
3047
- if (typeof direct === "boolean") return direct;
3048
- const clientProps = props.clientProps;
3049
- if (clientProps && typeof clientProps === "object") {
3050
- const nested = clientProps[key];
3051
- if (typeof nested === "boolean") return nested;
3052
- }
3053
- return fallback;
3054
- };
3055
- var getPropSections2 = (props) => {
3056
- if (!props || typeof props !== "object") return [];
3057
- const direct = resolveStudioSections(props.sections);
3058
- if (direct.length > 0) return direct;
3059
- const clientProps = props.clientProps;
3060
- if (clientProps && typeof clientProps === "object") {
3061
- return resolveStudioSections(clientProps.sections);
3062
- }
3063
- return [];
3064
- };
3065
- function AdminStudioDashboard(props) {
3066
- const formsEnabled = getPropBoolean2(props, "formsEnabled", false);
3067
- const globalsBasePath = getPropString2(props, "globalsBasePath", "/globals");
3068
- const sections = getPropSections2(props);
3069
- const adminBasePath = useAdminBasePath();
3070
- const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
3071
- const formsPath = resolveAdminPath(adminBasePath, "/forms");
3072
- const pagesPath = resolveAdminPath(adminBasePath, "/pages");
3073
- const mediaPath = resolveAdminPath(adminBasePath, "/media");
3074
- const toolsPath = resolveAdminPath(adminBasePath, "/tools");
3075
- const extensionCards = sections.filter((section) => section.card).map((section) => ({
3076
- href: resolveAdminPath(adminBasePath, section.href),
3077
- title: section.card?.title || section.label,
3078
- description: section.card?.description || ""
3079
- }));
3080
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3081
- AdminPage,
3082
- {
3083
- breadcrumbs: [{ label: "Dashboard" }],
3084
- description: "Pick what you want to manage.",
3085
- title: "Studio",
3086
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "orion-admin-grid", children: [
3087
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_link.default, { className: "orion-admin-card", href: pagesPath, children: [
3088
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "Pages" }),
3089
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Manage and edit site pages in the custom builder." })
3090
- ] }),
3091
- formsEnabled ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_link.default, { className: "orion-admin-card", href: formsPath, children: [
3092
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "Forms" }),
3093
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Review forms, submissions, and uploaded files." })
3094
- ] }) : null,
3095
- extensionCards.map((card) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_link.default, { className: "orion-admin-card", href: card.href, children: [
3096
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: card.title }),
3097
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: card.description })
3098
- ] }, card.href)),
3099
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_link.default, { className: "orion-admin-card", href: resolvedGlobalsBasePath, children: [
3100
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "Globals" }),
3101
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Update site settings, navigation, footer, social links, and form settings." })
3102
- ] }),
3103
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_link.default, { className: "orion-admin-card", href: mediaPath, children: [
3104
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "Media" }),
3105
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Upload and manage all site media assets." })
3106
- ] }),
3107
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_link.default, { className: "orion-admin-card", href: toolsPath, children: [
3108
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "Admin Tools" }),
3109
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Manage users, roles, and system fallback links." })
3110
- ] })
3111
- ] })
3112
- }
3113
- ) });
3114
- }
3115
-
3116
2804
  // src/admin/components/studio/AdminStudioNav.tsx
3117
- var import_react15 = require("react");
3118
- var import_navigation2 = require("next/navigation");
3119
- var import_ui4 = require("@payloadcms/ui");
3120
- var import_jsx_runtime21 = require("react/jsx-runtime");
3121
- var iconSize3 = 18;
3122
- function NavIcon2({ sectionID }) {
2805
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2806
+ var iconSize2 = 18;
2807
+ function NavIcon({ sectionID }) {
3123
2808
  const props = {
3124
2809
  fill: "none",
3125
- height: iconSize3,
2810
+ height: iconSize2,
3126
2811
  stroke: "currentColor",
3127
2812
  strokeLinecap: "round",
3128
2813
  strokeLinejoin: "round",
3129
2814
  strokeWidth: 2,
3130
2815
  viewBox: "0 0 24 24",
3131
- width: iconSize3
2816
+ width: iconSize2
3132
2817
  };
3133
2818
  switch (sectionID) {
3134
2819
  case "dashboard":
3135
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { ...props, children: [
3136
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "3", y: "3", width: "7", height: "9", rx: "1" }),
3137
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "14", y: "3", width: "7", height: "5", rx: "1" }),
3138
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "14", y: "12", width: "7", height: "9", rx: "1" }),
3139
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "3", y: "16", width: "7", height: "5", rx: "1" })
2820
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { ...props, children: [
2821
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "3", y: "3", width: "7", height: "9", rx: "1" }),
2822
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "14", y: "3", width: "7", height: "5", rx: "1" }),
2823
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "14", y: "12", width: "7", height: "9", rx: "1" }),
2824
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "3", y: "16", width: "7", height: "5", rx: "1" })
3140
2825
  ] });
3141
2826
  case "pages":
3142
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { ...props, children: [
3143
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
3144
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("polyline", { points: "14 2 14 8 20 8" }),
3145
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("line", { x1: "8", y1: "13", x2: "16", y2: "13" }),
3146
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("line", { x1: "8", y1: "17", x2: "12", y2: "17" })
2827
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { ...props, children: [
2828
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
2829
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("polyline", { points: "14 2 14 8 20 8" }),
2830
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("line", { x1: "8", y1: "13", x2: "16", y2: "13" }),
2831
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("line", { x1: "8", y1: "17", x2: "12", y2: "17" })
3147
2832
  ] });
3148
2833
  case "forms":
3149
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { ...props, children: [
3150
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M9 3h6" }),
3151
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M12 3v18" }),
3152
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M5 7h14a2 2 0 0 1 2 2v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a2 2 0 0 1 2-2Z" }),
3153
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M7 11h10" }),
3154
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M7 15h6" })
2834
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { ...props, children: [
2835
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M9 3h6" }),
2836
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M12 3v18" }),
2837
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M5 7h14a2 2 0 0 1 2 2v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a2 2 0 0 1 2-2Z" }),
2838
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M7 11h10" }),
2839
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M7 15h6" })
3155
2840
  ] });
3156
2841
  case "globals":
3157
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { ...props, children: [
3158
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
3159
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
2842
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { ...props, children: [
2843
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
2844
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
3160
2845
  ] });
3161
2846
  case "media":
3162
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { ...props, children: [
3163
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
3164
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
3165
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("polyline", { points: "21 15 16 10 5 21" })
2847
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { ...props, children: [
2848
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
2849
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
2850
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("polyline", { points: "21 15 16 10 5 21" })
3166
2851
  ] });
3167
2852
  case "analytics":
3168
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { ...props, children: [
3169
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M4 19V5" }),
3170
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M10 19V10" }),
3171
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M16 19v-6" }),
3172
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M22 19V3" })
2853
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { ...props, children: [
2854
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M4 19V5" }),
2855
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M10 19V10" }),
2856
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M16 19v-6" }),
2857
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M22 19V3" })
3173
2858
  ] });
3174
2859
  case "admin-tools":
3175
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76Z" }) });
2860
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76Z" }) });
3176
2861
  default:
3177
2862
  return null;
3178
2863
  }
3179
2864
  }
3180
2865
  function AdminStudioNav(props) {
3181
- const { user } = (0, import_ui4.useAuth)();
2866
+ const { user } = (0, import_ui3.useAuth)();
3182
2867
  const brandName = getPropString(props, "brandName", "Orion Studio");
3183
2868
  const logoUrl = getPropString(props, "logoUrl", "");
3184
2869
  const compact = getPropBoolean(props, "compact", false);
3185
2870
  const adminBasePath = useAdminBasePath();
3186
- const pathname = (0, import_navigation2.usePathname)() || "";
2871
+ const pathname = (0, import_navigation.usePathname)() || "";
3187
2872
  const branding = useSiteBranding(brandName, logoUrl || void 0);
3188
2873
  const resolvedName = branding.siteName || brandName;
3189
2874
  const dashboardPath = adminBasePath;
3190
2875
  const userRole = readUserRole(user);
3191
- const links = (0, import_react15.useMemo)(() => buildStudioNavItems(props, adminBasePath), [adminBasePath, props]);
2876
+ const links = (0, import_react13.useMemo)(() => buildStudioNavItems(props, adminBasePath), [adminBasePath, props]);
3192
2877
  if (isStudioShellRoute(pathname, props, adminBasePath)) {
3193
2878
  return null;
3194
2879
  }
@@ -3205,7 +2890,7 @@ function AdminStudioNav(props) {
3205
2890
  padding: compact ? "0.6rem" : "0.6rem 0.75rem",
3206
2891
  textDecoration: "none"
3207
2892
  });
3208
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2893
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3209
2894
  "div",
3210
2895
  {
3211
2896
  style: {
@@ -3216,8 +2901,8 @@ function AdminStudioNav(props) {
3216
2901
  padding: compact ? "0.8rem 0.5rem" : "1rem 0.85rem"
3217
2902
  },
3218
2903
  children: [
3219
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "admin-studio-brand", style: { padding: compact ? "0" : "0 0.35rem 0 2.4rem" }, children: [
3220
- branding.logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2904
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "admin-studio-brand", style: { padding: compact ? "0" : "0 0.35rem 0 2.4rem" }, children: [
2905
+ branding.logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3221
2906
  "div",
3222
2907
  {
3223
2908
  style: {
@@ -3227,10 +2912,10 @@ function AdminStudioNav(props) {
3227
2912
  overflow: "hidden",
3228
2913
  width: compact ? 34 : 40
3229
2914
  },
3230
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { alt: `${resolvedName} logo`, src: branding.logoUrl, style: { height: "100%", objectFit: "cover", width: "100%" } })
2915
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { alt: `${resolvedName} logo`, src: branding.logoUrl, style: { height: "100%", objectFit: "cover", width: "100%" } })
3231
2916
  }
3232
2917
  ) : null,
3233
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2918
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3234
2919
  "div",
3235
2920
  {
3236
2921
  style: {
@@ -3245,13 +2930,13 @@ function AdminStudioNav(props) {
3245
2930
  children: compact ? resolvedName.slice(0, 1).toUpperCase() : resolvedName
3246
2931
  }
3247
2932
  ),
3248
- !compact ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { color: "var(--theme-elevation-600)", fontSize: "0.85rem" }, children: "Studio" }) : null
2933
+ !compact ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { color: "var(--theme-elevation-600)", fontSize: "0.85rem" }, children: "Studio" }) : null
3249
2934
  ] }),
3250
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("nav", { style: { display: "grid", gap: "0.25rem" }, children: links.filter((link) => !link.roles || userRole && link.roles.includes(userRole)).map((link) => {
2935
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("nav", { style: { display: "grid", gap: "0.25rem" }, children: links.filter((link) => !link.roles || userRole && link.roles.includes(userRole)).map((link) => {
3251
2936
  const active = link.href === dashboardPath ? pathname === dashboardPath : link.matchPrefixes.some((prefix) => pathname.startsWith(prefix));
3252
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("a", { href: link.href, style: linkStyle(active), title: link.label, children: (() => {
3253
- const icon = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3254
- NavIcon2,
2937
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("a", { href: link.href, style: linkStyle(active), title: link.label, children: (() => {
2938
+ const icon = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2939
+ NavIcon,
3255
2940
  {
3256
2941
  sectionID: link.icon === "tools" ? "admin-tools" : link.icon || ""
3257
2942
  }
@@ -3259,46 +2944,276 @@ function AdminStudioNav(props) {
3259
2944
  if (compact) {
3260
2945
  return icon || link.label.slice(0, 1);
3261
2946
  }
3262
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { style: { alignItems: "center", display: "inline-flex", gap: "0.6rem" }, children: [
2947
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { style: { alignItems: "center", display: "inline-flex", gap: "0.6rem" }, children: [
3263
2948
  icon,
3264
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: link.label })
2949
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: link.label })
3265
2950
  ] });
3266
2951
  })() }, link.href);
3267
2952
  }) }),
3268
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { flex: 1 } }),
3269
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2953
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { flex: 1 } }),
2954
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3270
2955
  "div",
3271
2956
  {
3272
- style: {
3273
- borderTop: "1px solid var(--theme-elevation-150)",
3274
- paddingTop: "0.85rem",
3275
- textAlign: compact ? "center" : "left"
3276
- },
3277
- children: [
3278
- !compact ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
3279
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { color: "var(--theme-elevation-700)", fontSize: "0.85rem" }, children: "Signed in as" }),
3280
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { fontWeight: 800, marginBottom: "0.55rem" }, children: typeof user?.email === "string" ? user.email : "User" })
3281
- ] }) : null,
3282
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_ui4.Logout, {})
3283
- ]
3284
- }
3285
- )
3286
- ]
2957
+ style: {
2958
+ borderTop: "1px solid var(--theme-elevation-150)",
2959
+ paddingTop: "0.85rem",
2960
+ textAlign: compact ? "center" : "left"
2961
+ },
2962
+ children: [
2963
+ !compact ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
2964
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { color: "var(--theme-elevation-700)", fontSize: "0.85rem" }, children: "Signed in as" }),
2965
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { fontWeight: 800, marginBottom: "0.55rem" }, children: typeof user?.email === "string" ? user.email : "User" })
2966
+ ] }) : null,
2967
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ui3.Logout, {})
2968
+ ]
2969
+ }
2970
+ )
2971
+ ]
2972
+ }
2973
+ );
2974
+ }
2975
+
2976
+ // src/admin/components/studio/StudioSectionLayout.tsx
2977
+ var import_react15 = require("react");
2978
+ var import_navigation2 = require("next/navigation");
2979
+ var import_ui4 = require("@payloadcms/ui");
2980
+
2981
+ // src/admin-app/components/AdminShellClient.tsx
2982
+ var import_react14 = require("react");
2983
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2984
+ var iconSize3 = 20;
2985
+ var iconStyle = { display: "block", flexShrink: 0 };
2986
+ function NavIcon2({ name }) {
2987
+ const props = { width: iconSize3, height: iconSize3, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", style: iconStyle };
2988
+ switch (name) {
2989
+ case "dashboard":
2990
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
2991
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { x: "3", y: "3", width: "7", height: "9", rx: "1" }),
2992
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { x: "14", y: "3", width: "7", height: "5", rx: "1" }),
2993
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { x: "14", y: "12", width: "7", height: "9", rx: "1" }),
2994
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { x: "3", y: "16", width: "7", height: "5", rx: "1" })
2995
+ ] });
2996
+ case "pages":
2997
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
2998
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
2999
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("polyline", { points: "14 2 14 8 20 8" }),
3000
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("line", { x1: "8", y1: "13", x2: "16", y2: "13" }),
3001
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("line", { x1: "8", y1: "17", x2: "12", y2: "17" })
3002
+ ] });
3003
+ case "forms":
3004
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
3005
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M9 3h6" }),
3006
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M12 3v18" }),
3007
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M5 7h14a2 2 0 0 1 2 2v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a2 2 0 0 1 2-2Z" }),
3008
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M7 11h10" }),
3009
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M7 15h6" })
3010
+ ] });
3011
+ case "globals":
3012
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
3013
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
3014
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
3015
+ ] });
3016
+ case "media":
3017
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
3018
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
3019
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
3020
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("polyline", { points: "21 15 16 10 5 21" })
3021
+ ] });
3022
+ case "tools":
3023
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76Z" }) });
3024
+ case "analytics":
3025
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
3026
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M4 19V5" }),
3027
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M10 19V10" }),
3028
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M16 19v-6" }),
3029
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M22 19V3" })
3030
+ ] });
3031
+ case "account":
3032
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
3033
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
3034
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "12", cy: "7", r: "4" })
3035
+ ] });
3036
+ default:
3037
+ return null;
3038
+ }
3039
+ }
3040
+ function AdminShellClient({
3041
+ children,
3042
+ brandName,
3043
+ logoUrl,
3044
+ userEmail,
3045
+ userRole,
3046
+ pathname,
3047
+ navItems,
3048
+ onLogout,
3049
+ storageKey = "orion-admin-shell-collapsed"
3050
+ }) {
3051
+ const [collapsed, setCollapsed] = (0, import_react14.useState)(false);
3052
+ const [loggingOut, setLoggingOut] = (0, import_react14.useState)(false);
3053
+ (0, import_react14.useEffect)(() => {
3054
+ try {
3055
+ const stored = window.localStorage.getItem(storageKey);
3056
+ if (stored === "1") {
3057
+ setCollapsed(true);
3058
+ }
3059
+ } catch {
3060
+ }
3061
+ }, [storageKey]);
3062
+ const toggleSidebar = () => {
3063
+ setCollapsed((current) => {
3064
+ const next = !current;
3065
+ try {
3066
+ window.localStorage.setItem(storageKey, next ? "1" : "0");
3067
+ } catch {
3068
+ }
3069
+ return next;
3070
+ });
3071
+ };
3072
+ const handleLogout = async () => {
3073
+ setLoggingOut(true);
3074
+ try {
3075
+ await onLogout();
3076
+ } finally {
3077
+ setLoggingOut(false);
3078
+ }
3079
+ };
3080
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: `orion-admin-shell ${collapsed ? "is-collapsed" : ""}`, children: [
3081
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("aside", { className: "orion-admin-sidebar", children: [
3082
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3083
+ "button",
3084
+ {
3085
+ "aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
3086
+ className: "orion-admin-sidebar-toggle",
3087
+ onClick: toggleSidebar,
3088
+ type: "button",
3089
+ children: collapsed ? ">" : "<"
3090
+ }
3091
+ ),
3092
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "orion-admin-brand-wrap", children: [
3093
+ logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-brand-logo", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { alt: `${brandName} logo`, src: logoUrl }) }) : null,
3094
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "orion-admin-brand-text", children: [
3095
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-brand-name", title: brandName, children: collapsed ? brandName.slice(0, 1).toUpperCase() : brandName }),
3096
+ !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-brand-subtitle", children: "Studio" }) : null
3097
+ ] })
3098
+ ] }),
3099
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("nav", { className: "orion-admin-nav", children: navItems.filter((item) => roleCanAccessNav(userRole, item)).map((item) => {
3100
+ const active = navItemIsActive(pathname, item);
3101
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3102
+ "a",
3103
+ {
3104
+ className: `orion-admin-nav-link ${active ? "is-active" : ""}`,
3105
+ href: item.href,
3106
+ title: item.label,
3107
+ children: item.icon ? collapsed ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NavIcon2, { name: item.icon }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { style: { alignItems: "center", display: "flex", gap: "0.6rem" }, children: [
3108
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NavIcon2, { name: item.icon }),
3109
+ item.label
3110
+ ] }) : collapsed ? item.label.slice(0, 1) : item.label
3111
+ },
3112
+ item.href
3113
+ );
3114
+ }) }),
3115
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "orion-admin-sidebar-footer", children: [
3116
+ !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
3117
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-user-label", children: "Signed in as" }),
3118
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-user-email", children: userEmail })
3119
+ ] }) : null,
3120
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "orion-admin-logout", disabled: loggingOut, onClick: handleLogout, type: "button", children: loggingOut ? "..." : "Log out" })
3121
+ ] })
3122
+ ] }),
3123
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("main", { className: "orion-admin-main", children })
3124
+ ] });
3125
+ }
3126
+
3127
+ // src/admin/components/studio/StudioSectionLayout.tsx
3128
+ var import_jsx_runtime18 = require("react/jsx-runtime");
3129
+ function StudioSectionLayout({ children, navProps }) {
3130
+ const { user } = (0, import_ui4.useAuth)();
3131
+ const pathname = (0, import_navigation2.usePathname)() || "";
3132
+ const router = (0, import_navigation2.useRouter)();
3133
+ const adminBasePath = useAdminBasePath();
3134
+ const defaultBrandName = getPropString(navProps, "brandName", "Orion Studio");
3135
+ const defaultLogoUrl = getPropString(navProps, "logoUrl", "");
3136
+ const navItems = (0, import_react15.useMemo)(
3137
+ () => buildStudioNavItems(navProps, adminBasePath),
3138
+ [adminBasePath, navProps]
3139
+ );
3140
+ const branding = useSiteBranding(defaultBrandName, defaultLogoUrl || void 0);
3141
+ (0, import_react15.useLayoutEffect)(() => {
3142
+ document.body.classList.add("orion-studio-shell-active");
3143
+ return () => {
3144
+ document.body.classList.remove("orion-studio-shell-active");
3145
+ };
3146
+ }, []);
3147
+ const logout = (0, import_react15.useMemo)(
3148
+ () => async () => {
3149
+ await fetch("/api/users/logout", {
3150
+ credentials: "include",
3151
+ method: "POST"
3152
+ });
3153
+ router.push(resolveAdminPath(adminBasePath, "/login"));
3154
+ router.refresh();
3155
+ },
3156
+ [adminBasePath, router]
3157
+ );
3158
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3159
+ AdminShellClient,
3160
+ {
3161
+ brandName: branding.siteName || defaultBrandName,
3162
+ logoUrl: branding.logoUrl || defaultLogoUrl || void 0,
3163
+ navItems,
3164
+ onLogout: logout,
3165
+ pathname,
3166
+ storageKey: "orion-admin-sidebar-collapsed-v1",
3167
+ userEmail: typeof user?.email === "string" ? user.email : "user",
3168
+ userRole: readUserRole(user),
3169
+ children
3287
3170
  }
3288
3171
  );
3289
3172
  }
3290
3173
 
3291
3174
  // src/admin/components/studio/AdminStudioPagesListView.tsx
3292
3175
  var import_react16 = require("react");
3293
- var import_link2 = __toESM(require("next/link"));
3176
+ var import_link = __toESM(require("next/link"));
3294
3177
  var import_ui5 = require("@payloadcms/ui");
3295
- var import_jsx_runtime22 = require("react/jsx-runtime");
3178
+
3179
+ // src/admin-app/components/AdminBreadcrumbs.tsx
3180
+ var import_jsx_runtime19 = require("react/jsx-runtime");
3181
+ function AdminBreadcrumbs({ items }) {
3182
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("nav", { "aria-label": "Breadcrumb", className: "orion-admin-breadcrumbs", children: items.map((item, index) => {
3183
+ const isLast = index === items.length - 1;
3184
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
3185
+ item.href && !isLast ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("a", { href: item.href, children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: item.label }),
3186
+ !isLast ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "orion-admin-breadcrumb-sep", children: "/" }) : null
3187
+ ] }, `${item.label}-${index}`);
3188
+ }) });
3189
+ }
3190
+
3191
+ // src/admin-app/components/AdminPage.tsx
3192
+ var import_jsx_runtime20 = require("react/jsx-runtime");
3193
+ function AdminPage({ title, description, breadcrumbs, actions, children }) {
3194
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "orion-admin-page", children: [
3195
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "orion-admin-page-header", children: [
3196
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AdminBreadcrumbs, { items: breadcrumbs }),
3197
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "orion-admin-page-title-row", children: [
3198
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
3199
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h1", { children: title }),
3200
+ description ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: description }) : null
3201
+ ] }),
3202
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "orion-admin-page-actions", children: actions }) : null
3203
+ ] })
3204
+ ] }),
3205
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "orion-admin-page-content", children })
3206
+ ] });
3207
+ }
3208
+
3209
+ // src/admin/components/studio/AdminStudioPagesListView.tsx
3210
+ var import_jsx_runtime21 = require("react/jsx-runtime");
3296
3211
  var isAdmin = (user) => {
3297
3212
  if (!user || typeof user !== "object") return false;
3298
3213
  const role = user.role;
3299
3214
  return typeof role === "string" && role === "admin";
3300
3215
  };
3301
- var getPropString3 = (props, key, fallback) => {
3216
+ var getPropString2 = (props, key, fallback) => {
3302
3217
  if (!props || typeof props !== "object") return fallback;
3303
3218
  const direct = props[key];
3304
3219
  if (typeof direct === "string" && direct.length > 0) return direct;
@@ -3311,7 +3226,7 @@ var getPropString3 = (props, key, fallback) => {
3311
3226
  };
3312
3227
  function AdminStudioPagesListView(props) {
3313
3228
  const { user } = (0, import_ui5.useAuth)();
3314
- const pagesCollectionSlug = getPropString3(props, "pagesCollectionSlug", "pages");
3229
+ const pagesCollectionSlug = getPropString2(props, "pagesCollectionSlug", "pages");
3315
3230
  const adminBasePath = useAdminBasePath();
3316
3231
  const newPagePath = resolveAdminPath(adminBasePath, "/pages/new");
3317
3232
  const [loading, setLoading] = (0, import_react16.useState)(true);
@@ -3356,10 +3271,10 @@ function AdminStudioPagesListView(props) {
3356
3271
  cancelled = true;
3357
3272
  };
3358
3273
  }, [apiURL]);
3359
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3274
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
3360
3275
  AdminPage,
3361
3276
  {
3362
- actions: isAdmin(user) ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_link2.default, { className: "orion-admin-action-button", href: newPagePath, children: "New Page" }) : null,
3277
+ actions: isAdmin(user) ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_link.default, { className: "orion-admin-action-button", href: newPagePath, children: "New Page" }) : null,
3363
3278
  breadcrumbs: [
3364
3279
  { label: "Dashboard", href: adminBasePath },
3365
3280
  { label: "Pages" }
@@ -3367,21 +3282,21 @@ function AdminStudioPagesListView(props) {
3367
3282
  description: "Open a page to edit it in the inline custom builder.",
3368
3283
  title: "Pages",
3369
3284
  children: [
3370
- loading ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
3371
- error ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "orion-admin-error", children: error }) : null,
3372
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "orion-admin-list", children: [
3373
- !loading && !error && docs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "orion-admin-card", children: [
3374
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("strong", { children: "No pages yet" }),
3375
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: "Create the first page to start building content." })
3285
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
3286
+ error ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "orion-admin-error", children: error }) : null,
3287
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "orion-admin-list", children: [
3288
+ !loading && !error && docs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "orion-admin-card", children: [
3289
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("strong", { children: "No pages yet" }),
3290
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Create the first page to start building content." })
3376
3291
  ] }) : null,
3377
3292
  docs.map((doc) => {
3378
3293
  const id = typeof doc.id === "string" || typeof doc.id === "number" ? String(doc.id) : "";
3379
3294
  if (!id) return null;
3380
3295
  const title = typeof doc.title === "string" ? doc.title : "Untitled Page";
3381
3296
  const status = typeof doc._status === "string" ? doc._status : "draft";
3382
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_link2.default, { className: "orion-admin-list-item", href: resolveAdminPath(adminBasePath, `/pages/${id}`), children: [
3383
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("strong", { children: title }) }),
3384
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "orion-admin-pill", children: status })
3297
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_link.default, { className: "orion-admin-list-item", href: resolveAdminPath(adminBasePath, `/pages/${id}`), children: [
3298
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("strong", { children: title }) }),
3299
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "orion-admin-pill", children: status })
3385
3300
  ] }, id);
3386
3301
  })
3387
3302
  ] })
@@ -3393,7 +3308,7 @@ function AdminStudioPagesListView(props) {
3393
3308
  // src/admin/components/studio/AdminStudioPageEditView.tsx
3394
3309
  var import_react17 = require("react");
3395
3310
  var import_ui6 = require("@payloadcms/ui");
3396
- var import_jsx_runtime23 = require("react/jsx-runtime");
3311
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3397
3312
  var isAdmin2 = (user) => {
3398
3313
  if (!user || typeof user !== "object") return false;
3399
3314
  const role = user.role;
@@ -3404,7 +3319,7 @@ var isEditor = (user) => {
3404
3319
  const role = user.role;
3405
3320
  return typeof role === "string" && role === "editor";
3406
3321
  };
3407
- var getPropString4 = (props, key, fallback) => {
3322
+ var getPropString3 = (props, key, fallback) => {
3408
3323
  if (!props || typeof props !== "object") return fallback;
3409
3324
  const direct = props[key];
3410
3325
  if (typeof direct === "string" && direct.length > 0) return direct;
@@ -3439,7 +3354,7 @@ function AdminStudioPageEditView(props) {
3439
3354
  const [hasUnpublishedChanges, setHasUnpublishedChanges] = (0, import_react17.useState)(false);
3440
3355
  const [canUndo, setCanUndo] = (0, import_react17.useState)(false);
3441
3356
  const [canRedo, setCanRedo] = (0, import_react17.useState)(false);
3442
- const builderBasePath = getPropString4(props, "builderBasePath", "/builder");
3357
+ const builderBasePath = getPropString3(props, "builderBasePath", "/builder");
3443
3358
  const pagesPath = resolveAdminPath(adminBasePath, "/pages");
3444
3359
  const pageIDFromParams = (0, import_react17.useMemo)(() => getParam(props.params, "id"), [props.params]);
3445
3360
  const [pageID, setPageID] = (0, import_react17.useState)(pageIDFromParams);
@@ -3546,8 +3461,8 @@ function AdminStudioPageEditView(props) {
3546
3461
  return () => window.removeEventListener("message", onMessage);
3547
3462
  }, []);
3548
3463
  if (!pageID && !didResolvePathFallback) {
3549
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
3550
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3464
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
3465
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3551
3466
  import_ui6.SetStepNav,
3552
3467
  {
3553
3468
  nav: [
@@ -3556,13 +3471,13 @@ function AdminStudioPageEditView(props) {
3556
3471
  ]
3557
3472
  }
3558
3473
  ),
3559
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h1", { style: { margin: 0 }, children: "Page Editor" }),
3560
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading page editor..." })
3474
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h1", { style: { margin: 0 }, children: "Page Editor" }),
3475
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading page editor..." })
3561
3476
  ] }) });
3562
3477
  }
3563
3478
  if (!pageID) {
3564
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
3565
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3479
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
3480
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3566
3481
  import_ui6.SetStepNav,
3567
3482
  {
3568
3483
  nav: [
@@ -3571,12 +3486,12 @@ function AdminStudioPageEditView(props) {
3571
3486
  ]
3572
3487
  }
3573
3488
  ),
3574
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h1", { style: { margin: 0 }, children: "Page Editor" }),
3575
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Missing page ID." })
3489
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h1", { style: { margin: 0 }, children: "Page Editor" }),
3490
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Missing page ID." })
3576
3491
  ] }) });
3577
3492
  }
3578
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
3579
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3493
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
3494
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3580
3495
  import_ui6.SetStepNav,
3581
3496
  {
3582
3497
  nav: [
@@ -3585,8 +3500,8 @@ function AdminStudioPageEditView(props) {
3585
3500
  ]
3586
3501
  }
3587
3502
  ),
3588
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { display: "grid", gridTemplateRows: "auto 1fr", height: "calc(100vh - 120px)" }, children: [
3589
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3503
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "grid", gridTemplateRows: "auto 1fr", height: "calc(100vh - 120px)" }, children: [
3504
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3590
3505
  "div",
3591
3506
  {
3592
3507
  style: {
@@ -3602,9 +3517,9 @@ function AdminStudioPageEditView(props) {
3602
3517
  zIndex: 20
3603
3518
  },
3604
3519
  children: [
3605
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { minWidth: 0 }, children: [
3606
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { fontWeight: 900 }, children: "Page Editor" }),
3607
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3520
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { minWidth: 0 }, children: [
3521
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { fontWeight: 900 }, children: "Page Editor" }),
3522
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3608
3523
  "div",
3609
3524
  {
3610
3525
  style: {
@@ -3620,9 +3535,9 @@ function AdminStudioPageEditView(props) {
3620
3535
  }
3621
3536
  )
3622
3537
  ] }),
3623
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { alignItems: "center", display: "flex", gap: "0.5rem" }, children: [
3624
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { color: dirty ? "var(--theme-elevation-900)" : "var(--theme-elevation-600)", fontSize: "0.85rem", fontWeight: 700 }, children: dirty ? "Unsaved changes" : "All changes saved" }),
3625
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3538
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { alignItems: "center", display: "flex", gap: "0.5rem" }, children: [
3539
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { color: dirty ? "var(--theme-elevation-900)" : "var(--theme-elevation-600)", fontSize: "0.85rem", fontWeight: 700 }, children: dirty ? "Unsaved changes" : "All changes saved" }),
3540
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3626
3541
  "div",
3627
3542
  {
3628
3543
  style: {
@@ -3639,7 +3554,7 @@ function AdminStudioPageEditView(props) {
3639
3554
  children: hasUnpublishedChanges ? "Unpublished draft changes" : "Live is up to date"
3640
3555
  }
3641
3556
  ),
3642
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3557
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3643
3558
  "button",
3644
3559
  {
3645
3560
  disabled: !canUndo,
@@ -3655,7 +3570,7 @@ function AdminStudioPageEditView(props) {
3655
3570
  children: "Undo"
3656
3571
  }
3657
3572
  ),
3658
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3573
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3659
3574
  "button",
3660
3575
  {
3661
3576
  disabled: !canRedo,
@@ -3671,7 +3586,7 @@ function AdminStudioPageEditView(props) {
3671
3586
  children: "Redo"
3672
3587
  }
3673
3588
  ),
3674
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3589
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3675
3590
  "button",
3676
3591
  {
3677
3592
  disabled: saving !== null,
@@ -3687,7 +3602,7 @@ function AdminStudioPageEditView(props) {
3687
3602
  children: saving === "draft" ? "Saving\u2026" : "Save Draft"
3688
3603
  }
3689
3604
  ),
3690
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3605
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3691
3606
  "button",
3692
3607
  {
3693
3608
  disabled: !canPublish || saving !== null,
@@ -3710,7 +3625,7 @@ function AdminStudioPageEditView(props) {
3710
3625
  ]
3711
3626
  }
3712
3627
  ),
3713
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3628
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3714
3629
  "iframe",
3715
3630
  {
3716
3631
  ref: iframeRef,
@@ -3732,9 +3647,9 @@ function AdminStudioPageEditView(props) {
3732
3647
  // src/admin/components/studio/AdminStudioNewPageView.tsx
3733
3648
  var import_react18 = require("react");
3734
3649
  var import_ui7 = require("@payloadcms/ui");
3735
- var import_jsx_runtime24 = require("react/jsx-runtime");
3650
+ var import_jsx_runtime23 = require("react/jsx-runtime");
3736
3651
  var pageTemplates = ["standard", "landing", "services", "contact"];
3737
- var getPropString5 = (props, key, fallback) => {
3652
+ var getPropString4 = (props, key, fallback) => {
3738
3653
  if (!props || typeof props !== "object") return fallback;
3739
3654
  const direct = props[key];
3740
3655
  if (typeof direct === "string" && direct.length > 0) return direct;
@@ -3754,11 +3669,11 @@ var slugify = (value) => value.toLowerCase().trim().replace(/[^a-z0-9\s-]/g, "")
3754
3669
  function AdminStudioNewPageView(props) {
3755
3670
  const { user } = (0, import_ui7.useAuth)();
3756
3671
  const adminBasePath = useAdminBasePath();
3757
- const pagesCollectionSlug = getPropString5(props, "pagesCollectionSlug", "pages");
3672
+ const pagesCollectionSlug = getPropString4(props, "pagesCollectionSlug", "pages");
3758
3673
  const [submitting, setSubmitting] = (0, import_react18.useState)(false);
3759
3674
  const [error, setError] = (0, import_react18.useState)(null);
3760
3675
  if (!canManagePages(user)) {
3761
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3676
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3762
3677
  AdminPage,
3763
3678
  {
3764
3679
  breadcrumbs: [
@@ -3768,9 +3683,9 @@ function AdminStudioNewPageView(props) {
3768
3683
  ],
3769
3684
  description: "You do not have access to create pages.",
3770
3685
  title: "New Page",
3771
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "orion-admin-card", children: [
3772
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("strong", { children: "Access denied" }),
3773
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "This section is restricted to administrator and editor accounts." })
3686
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "orion-admin-card", children: [
3687
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("strong", { children: "Access denied" }),
3688
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "This section is restricted to administrator and editor accounts." })
3774
3689
  ] })
3775
3690
  }
3776
3691
  ) });
@@ -3815,7 +3730,7 @@ function AdminStudioNewPageView(props) {
3815
3730
  setSubmitting(false);
3816
3731
  }
3817
3732
  };
3818
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3733
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3819
3734
  AdminPage,
3820
3735
  {
3821
3736
  breadcrumbs: [
@@ -3825,33 +3740,33 @@ function AdminStudioNewPageView(props) {
3825
3740
  ],
3826
3741
  description: "Create a new page and open it in the custom editor.",
3827
3742
  title: "New Page",
3828
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("form", { className: "orion-admin-form", onSubmit: createPage, children: [
3829
- error ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "orion-admin-error", children: error }) : null,
3830
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { children: [
3743
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("form", { className: "orion-admin-form", onSubmit: createPage, children: [
3744
+ error ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "orion-admin-error", children: error }) : null,
3745
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { children: [
3831
3746
  "Title",
3832
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { name: "title", placeholder: "Services", required: true, type: "text" })
3747
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { name: "title", placeholder: "Services", required: true, type: "text" })
3833
3748
  ] }),
3834
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { children: [
3749
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { children: [
3835
3750
  "Slug",
3836
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { name: "slug", placeholder: "services", type: "text" })
3751
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { name: "slug", placeholder: "services", type: "text" })
3837
3752
  ] }),
3838
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { children: [
3753
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { children: [
3839
3754
  "Template",
3840
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("select", { defaultValue: "standard", name: "template", children: [
3841
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("option", { value: "standard", children: "Standard" }),
3842
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("option", { value: "landing", children: "Landing" }),
3843
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("option", { value: "contact", children: "Contact" }),
3844
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("option", { value: "services", children: "Services" })
3755
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("select", { defaultValue: "standard", name: "template", children: [
3756
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "standard", children: "Standard" }),
3757
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "landing", children: "Landing" }),
3758
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "contact", children: "Contact" }),
3759
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "services", children: "Services" })
3845
3760
  ] })
3846
3761
  ] }),
3847
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", { disabled: submitting, type: "submit", children: submitting ? "Creating..." : "Create Page" })
3762
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { disabled: submitting, type: "submit", children: submitting ? "Creating..." : "Create Page" })
3848
3763
  ] })
3849
3764
  }
3850
3765
  ) });
3851
3766
  }
3852
3767
 
3853
3768
  // src/admin/components/studio/AdminStudioGlobalsView.tsx
3854
- var import_jsx_runtime25 = require("react/jsx-runtime");
3769
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3855
3770
  var getPropGlobals = (props) => {
3856
3771
  if (!props || typeof props !== "object") return null;
3857
3772
  const direct = props.globals;
@@ -3871,7 +3786,7 @@ function AdminStudioGlobalsView(props) {
3871
3786
  { slug: "footer", label: "Footer" },
3872
3787
  { slug: "social-media", label: "Social Media" }
3873
3788
  ];
3874
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3789
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3875
3790
  AdminPage,
3876
3791
  {
3877
3792
  breadcrumbs: [
@@ -3880,17 +3795,17 @@ function AdminStudioGlobalsView(props) {
3880
3795
  ],
3881
3796
  description: "Site-wide content and branding settings.",
3882
3797
  title: "Globals",
3883
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "orion-admin-list", children: globals.map((global) => {
3798
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "orion-admin-list", children: globals.map((global) => {
3884
3799
  const href = resolveAdminPath(
3885
3800
  adminBasePath,
3886
3801
  typeof global.href === "string" ? global.href : `/globals/${global.slug}`
3887
3802
  );
3888
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("a", { className: "orion-admin-list-item", href, children: [
3889
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
3890
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("strong", { children: global.label }),
3891
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "orion-admin-list-meta", children: typeof global.description === "string" && global.description.length > 0 ? global.description : href })
3803
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("a", { className: "orion-admin-list-item", href, children: [
3804
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
3805
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("strong", { children: global.label }),
3806
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "orion-admin-list-meta", children: typeof global.description === "string" && global.description.length > 0 ? global.description : href })
3892
3807
  ] }),
3893
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "orion-admin-list-meta", children: "Open" })
3808
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "orion-admin-list-meta", children: "Open" })
3894
3809
  ] }, global.slug);
3895
3810
  }) })
3896
3811
  }
@@ -3899,8 +3814,8 @@ function AdminStudioGlobalsView(props) {
3899
3814
 
3900
3815
  // src/admin/components/studio/AdminStudioSiteSettingsGlobalView.tsx
3901
3816
  var import_react19 = require("react");
3902
- var import_jsx_runtime26 = require("react/jsx-runtime");
3903
- var getPropString6 = (props, key, fallback) => {
3817
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3818
+ var getPropString5 = (props, key, fallback) => {
3904
3819
  if (!props || typeof props !== "object") return fallback;
3905
3820
  const direct = props[key];
3906
3821
  if (typeof direct === "string" && direct.length > 0) return direct;
@@ -3979,9 +3894,9 @@ var serializeRows = (value, formatter) => {
3979
3894
  return value.filter((item) => Boolean(item) && typeof item === "object").map((item) => formatter(item)).filter((item) => Boolean(item)).join("\n");
3980
3895
  };
3981
3896
  function AdminStudioSiteSettingsGlobalView(props) {
3982
- const globalSlug = getPropString6(props, "globalSlug", "site-settings");
3983
- const globalsBasePath = getPropString6(props, "globalsBasePath", "/globals");
3984
- const mediaCollectionSlug = getPropString6(props, "mediaCollectionSlug", "media");
3897
+ const globalSlug = getPropString5(props, "globalSlug", "site-settings");
3898
+ const globalsBasePath = getPropString5(props, "globalsBasePath", "/globals");
3899
+ const mediaCollectionSlug = getPropString5(props, "mediaCollectionSlug", "media");
3985
3900
  const adminBasePath = useAdminBasePath();
3986
3901
  const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
3987
3902
  const [loading, setLoading] = (0, import_react19.useState)(true);
@@ -4136,7 +4051,7 @@ function AdminStudioSiteSettingsGlobalView(props) {
4136
4051
  };
4137
4052
  const logoID = getRelationID(globalData.logo);
4138
4053
  const ogImageID = getRelationID(defaultSeo.ogImage);
4139
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
4054
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
4140
4055
  AdminPage,
4141
4056
  {
4142
4057
  breadcrumbs: [
@@ -4147,126 +4062,126 @@ function AdminStudioSiteSettingsGlobalView(props) {
4147
4062
  description: "Manage site-wide brand, SEO, and business metadata.",
4148
4063
  title: "Website Settings",
4149
4064
  children: [
4150
- loading ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
4151
- !loading ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("form", { className: "orion-admin-form", onSubmit: save, children: [
4152
- error ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "orion-admin-error", children: error }) : null,
4153
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "orion-admin-success", children: savedMessage }) : null,
4154
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4065
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
4066
+ !loading ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("form", { className: "orion-admin-form", onSubmit: save, children: [
4067
+ error ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "orion-admin-error", children: error }) : null,
4068
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "orion-admin-success", children: savedMessage }) : null,
4069
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4155
4070
  "Site Name",
4156
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(globalData.siteName || ""), name: "siteName", required: true, type: "text" })
4071
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(globalData.siteName || ""), name: "siteName", required: true, type: "text" })
4157
4072
  ] }),
4158
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4073
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4159
4074
  "Tagline",
4160
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(globalData.tagline || ""), name: "tagline", type: "text" })
4075
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(globalData.tagline || ""), name: "tagline", type: "text" })
4161
4076
  ] }),
4162
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4077
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4163
4078
  "Logo (media ID)",
4164
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("select", { defaultValue: logoID ? String(logoID) : "", name: "logo", children: [
4165
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: "", children: "No logo" }),
4079
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("select", { defaultValue: logoID ? String(logoID) : "", name: "logo", children: [
4080
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "", children: "No logo" }),
4166
4081
  mediaOptions.map((asset) => {
4167
4082
  const id = typeof asset.id === "string" || typeof asset.id === "number" ? String(asset.id) : "";
4168
4083
  if (!id) return null;
4169
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: id, children: asset.filename || `Media ${id}` }, id);
4084
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: id, children: asset.filename || `Media ${id}` }, id);
4170
4085
  })
4171
4086
  ] })
4172
4087
  ] }),
4173
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4088
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4174
4089
  "SEO Meta Title",
4175
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(defaultSeo.metaTitle || ""), name: "metaTitle", type: "text" })
4090
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(defaultSeo.metaTitle || ""), name: "metaTitle", type: "text" })
4176
4091
  ] }),
4177
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4092
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4178
4093
  "SEO Meta Description",
4179
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("textarea", { defaultValue: String(defaultSeo.metaDescription || ""), name: "metaDescription", rows: 3 })
4094
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("textarea", { defaultValue: String(defaultSeo.metaDescription || ""), name: "metaDescription", rows: 3 })
4180
4095
  ] }),
4181
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4096
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4182
4097
  "Canonical Base URL",
4183
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(defaultSeo.canonicalBaseUrl || ""), name: "canonicalBaseUrl", type: "text" })
4098
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(defaultSeo.canonicalBaseUrl || ""), name: "canonicalBaseUrl", type: "text" })
4184
4099
  ] }),
4185
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4100
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4186
4101
  "SEO OG Image (media ID)",
4187
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("select", { defaultValue: ogImageID ? String(ogImageID) : "", name: "ogImage", children: [
4188
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: "", children: "No image" }),
4102
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("select", { defaultValue: ogImageID ? String(ogImageID) : "", name: "ogImage", children: [
4103
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "", children: "No image" }),
4189
4104
  mediaOptions.map((asset) => {
4190
4105
  const id = typeof asset.id === "string" || typeof asset.id === "number" ? String(asset.id) : "";
4191
4106
  if (!id) return null;
4192
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: id, children: asset.filename || `Media ${id}` }, id);
4107
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: id, children: asset.filename || `Media ${id}` }, id);
4193
4108
  })
4194
4109
  ] })
4195
4110
  ] }),
4196
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4111
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4197
4112
  "Business Schema Type",
4198
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.schemaType || "Store"), name: "schemaType", type: "text" })
4113
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.schemaType || "Store"), name: "schemaType", type: "text" })
4199
4114
  ] }),
4200
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4115
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4201
4116
  "Business Description",
4202
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("textarea", { defaultValue: String(businessProfile.description || ""), name: "businessDescription", rows: 4 })
4117
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("textarea", { defaultValue: String(businessProfile.description || ""), name: "businessDescription", rows: 4 })
4203
4118
  ] }),
4204
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4119
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4205
4120
  "Street Address",
4206
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.streetAddress || ""), name: "streetAddress", type: "text" })
4121
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.streetAddress || ""), name: "streetAddress", type: "text" })
4207
4122
  ] }),
4208
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4123
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4209
4124
  "City",
4210
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.addressLocality || ""), name: "addressLocality", type: "text" })
4125
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.addressLocality || ""), name: "addressLocality", type: "text" })
4211
4126
  ] }),
4212
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4127
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4213
4128
  "State / Region",
4214
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.addressRegion || ""), name: "addressRegion", type: "text" })
4129
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.addressRegion || ""), name: "addressRegion", type: "text" })
4215
4130
  ] }),
4216
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4131
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4217
4132
  "Postal Code",
4218
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.postalCode || ""), name: "postalCode", type: "text" })
4133
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.postalCode || ""), name: "postalCode", type: "text" })
4219
4134
  ] }),
4220
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4135
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4221
4136
  "Country Code",
4222
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.addressCountry || "US"), name: "addressCountry", type: "text" })
4137
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.addressCountry || "US"), name: "addressCountry", type: "text" })
4223
4138
  ] }),
4224
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4139
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4225
4140
  "Neighborhood",
4226
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.neighborhood || ""), name: "neighborhood", type: "text" })
4141
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.neighborhood || ""), name: "neighborhood", type: "text" })
4227
4142
  ] }),
4228
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4143
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4229
4144
  "Latitude",
4230
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.latitude || ""), name: "latitude", type: "text" })
4145
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.latitude || ""), name: "latitude", type: "text" })
4231
4146
  ] }),
4232
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4147
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4233
4148
  "Longitude",
4234
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.longitude || ""), name: "longitude", type: "text" })
4149
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.longitude || ""), name: "longitude", type: "text" })
4235
4150
  ] }),
4236
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4151
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4237
4152
  "Price Range",
4238
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.priceRange || ""), name: "priceRange", type: "text" })
4153
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.priceRange || ""), name: "priceRange", type: "text" })
4239
4154
  ] }),
4240
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4155
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4241
4156
  "Map URL",
4242
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.mapUrl || ""), name: "mapUrl", type: "text" })
4157
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.mapUrl || ""), name: "mapUrl", type: "text" })
4243
4158
  ] }),
4244
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4159
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4245
4160
  "LLM Summary",
4246
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("textarea", { defaultValue: String(businessProfile.llmsSummary || ""), name: "llmsSummary", rows: 4 })
4161
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("textarea", { defaultValue: String(businessProfile.llmsSummary || ""), name: "llmsSummary", rows: 4 })
4247
4162
  ] }),
4248
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4163
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4249
4164
  "Opening Hours Rows",
4250
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("textarea", { defaultValue: openingHoursRows, name: "openingHoursRows", rows: 4 }),
4251
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: [
4165
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("textarea", { defaultValue: openingHoursRows, name: "openingHoursRows", rows: 4 }),
4166
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: [
4252
4167
  "One row per line: ",
4253
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("code", { children: "Monday,Tuesday,Wednesday|10:00|19:00" })
4168
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("code", { children: "Monday,Tuesday,Wednesday|10:00|19:00" })
4254
4169
  ] })
4255
4170
  ] }),
4256
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4171
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4257
4172
  "Citation / SameAs URLs",
4258
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("textarea", { defaultValue: sameAsRows, name: "sameAsRows", rows: 4 }),
4259
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: "One absolute URL per line. Social links still come from the Social Media global." })
4173
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("textarea", { defaultValue: sameAsRows, name: "sameAsRows", rows: 4 }),
4174
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: "One absolute URL per line. Social links still come from the Social Media global." })
4260
4175
  ] }),
4261
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4176
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4262
4177
  "Service Schema Rows",
4263
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("textarea", { defaultValue: serviceCatalogRows, name: "serviceCatalogRows", rows: 6 }),
4264
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: [
4178
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("textarea", { defaultValue: serviceCatalogRows, name: "serviceCatalogRows", rows: 6 }),
4179
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: [
4265
4180
  "One row per line: ",
4266
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("code", { children: "Name|Description|Optional price range|/page-path" })
4181
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("code", { children: "Name|Description|Optional price range|/page-path" })
4267
4182
  ] })
4268
4183
  ] }),
4269
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("button", { disabled: saving, type: "submit", children: saving ? "Saving..." : "Save Global" })
4184
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("button", { disabled: saving, type: "submit", children: saving ? "Saving..." : "Save Global" })
4270
4185
  ] }) : null
4271
4186
  ]
4272
4187
  }
@@ -4356,10 +4271,10 @@ var SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM = SOCIAL_MEDIA_PLATFORMS.reduce(
4356
4271
  );
4357
4272
 
4358
4273
  // src/admin/components/studio/AdminStudioSocialMediaGlobalView.tsx
4359
- var import_jsx_runtime27 = require("react/jsx-runtime");
4274
+ var import_jsx_runtime26 = require("react/jsx-runtime");
4360
4275
  var getSocialUrlFieldName = (platform) => `social-${platform}-url`;
4361
4276
  var getSocialIconFieldName = (platform) => `social-${platform}-icon`;
4362
- var getPropString7 = (props, key, fallback) => {
4277
+ var getPropString6 = (props, key, fallback) => {
4363
4278
  if (!props || typeof props !== "object") return fallback;
4364
4279
  const direct = props[key];
4365
4280
  if (typeof direct === "string" && direct.length > 0) return direct;
@@ -4407,8 +4322,8 @@ var normalizeOptionalProfileUrl = (value, platformLabel) => {
4407
4322
  return parsed.toString();
4408
4323
  };
4409
4324
  function AdminStudioSocialMediaGlobalView(props) {
4410
- const globalSlug = getPropString7(props, "globalSlug", "social-media");
4411
- const globalsBasePath = getPropString7(props, "globalsBasePath", "/globals");
4325
+ const globalSlug = getPropString6(props, "globalSlug", "social-media");
4326
+ const globalsBasePath = getPropString6(props, "globalsBasePath", "/globals");
4412
4327
  const adminBasePath = useAdminBasePath();
4413
4328
  const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
4414
4329
  const [loading, setLoading] = (0, import_react20.useState)(true);
@@ -4493,7 +4408,7 @@ function AdminStudioSocialMediaGlobalView(props) {
4493
4408
  setSaving(false);
4494
4409
  }
4495
4410
  };
4496
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4411
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
4497
4412
  AdminPage,
4498
4413
  {
4499
4414
  breadcrumbs: [
@@ -4504,16 +4419,16 @@ function AdminStudioSocialMediaGlobalView(props) {
4504
4419
  description: "Control which social profiles appear across the site.",
4505
4420
  title: "Social Media",
4506
4421
  children: [
4507
- loading ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
4508
- !loading ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("form", { className: "orion-admin-form", onSubmit: save, children: [
4509
- error ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-error", children: error }) : null,
4510
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-success", children: savedMessage }) : null,
4511
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { color: "var(--orion-admin-muted)", fontSize: "0.88rem", fontWeight: 700 }, children: "Add URLs for the platforms you use. Leave a URL blank to hide that platform." }),
4422
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
4423
+ !loading ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("form", { className: "orion-admin-form", onSubmit: save, children: [
4424
+ error ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "orion-admin-error", children: error }) : null,
4425
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "orion-admin-success", children: savedMessage }) : null,
4426
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: { color: "var(--orion-admin-muted)", fontSize: "0.88rem", fontWeight: 700 }, children: "Add URLs for the platforms you use. Leave a URL blank to hide that platform." }),
4512
4427
  SOCIAL_MEDIA_PLATFORMS.map((platform) => {
4513
4428
  const profile = socialProfiles[platform];
4514
4429
  const platformLabel = SOCIAL_MEDIA_PLATFORM_LABELS[platform];
4515
4430
  const placeholderDomain = platform === "x" ? "x.com" : `${platform}.com`;
4516
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4431
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
4517
4432
  "fieldset",
4518
4433
  {
4519
4434
  style: {
@@ -4524,10 +4439,10 @@ function AdminStudioSocialMediaGlobalView(props) {
4524
4439
  padding: "0.85rem"
4525
4440
  },
4526
4441
  children: [
4527
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("legend", { style: { fontWeight: 700, padding: "0 0.3rem" }, children: platformLabel }),
4528
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { children: [
4442
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("legend", { style: { fontWeight: 700, padding: "0 0.3rem" }, children: platformLabel }),
4443
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4529
4444
  "Profile URL",
4530
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4445
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4531
4446
  "input",
4532
4447
  {
4533
4448
  defaultValue: profile.url,
@@ -4538,16 +4453,16 @@ function AdminStudioSocialMediaGlobalView(props) {
4538
4453
  }
4539
4454
  )
4540
4455
  ] }),
4541
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { children: [
4456
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4542
4457
  "Icon Style",
4543
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("select", { defaultValue: profile.icon, name: getSocialIconFieldName(platform), children: SOCIAL_MEDIA_ICON_OPTIONS[platform].map((option) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: option.value, children: option.label }, option.value)) })
4458
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("select", { defaultValue: profile.icon, name: getSocialIconFieldName(platform), children: SOCIAL_MEDIA_ICON_OPTIONS[platform].map((option) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: option.value, children: option.label }, option.value)) })
4544
4459
  ] })
4545
4460
  ]
4546
4461
  },
4547
4462
  platform
4548
4463
  );
4549
4464
  }),
4550
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("button", { disabled: saving, type: "submit", children: saving ? "Saving..." : "Save Global" })
4465
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("button", { disabled: saving, type: "submit", children: saving ? "Saving..." : "Save Global" })
4551
4466
  ] }) : null
4552
4467
  ]
4553
4468
  }
@@ -4687,7 +4602,7 @@ var normalizeAdminNavInputs = (rows, pageOptions) => {
4687
4602
  };
4688
4603
 
4689
4604
  // src/admin-app/components/HeaderNavItemsEditor.tsx
4690
- var import_jsx_runtime28 = require("react/jsx-runtime");
4605
+ var import_jsx_runtime27 = require("react/jsx-runtime");
4691
4606
  var toRow = (item, index) => ({
4692
4607
  id: `row-${index}-${item.href || "empty"}`,
4693
4608
  href: item.href || "",
@@ -4766,15 +4681,15 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4766
4681
  ]);
4767
4682
  setNextRowID((current) => current + 1);
4768
4683
  };
4769
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-nav-editor", children: [
4770
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("input", { name: "navItemsState", readOnly: true, type: "hidden", value: serializedState }),
4771
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-nav-editor-head", children: [
4772
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-nav-editor-title", children: "Navigation Items" }),
4773
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("button", { className: "orion-admin-nav-editor-add", onClick: addRow, type: "button", children: "Add Item" })
4684
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "orion-admin-nav-editor", children: [
4685
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("input", { name: "navItemsState", readOnly: true, type: "hidden", value: serializedState }),
4686
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "orion-admin-nav-editor-head", children: [
4687
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-nav-editor-title", children: "Navigation Items" }),
4688
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("button", { className: "orion-admin-nav-editor-add", onClick: addRow, type: "button", children: "Add Item" })
4774
4689
  ] }),
4775
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-nav-editor-help", children: "Add only links you want in the menu. Drag rows to reorder. Set a parent to create dropdown items." }),
4776
- rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-nav-editor-empty", children: 'No navigation items yet. Click "Add Item" to start.' }) : null,
4777
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-nav-editor-list", children: rows.map((row, rowIndex) => {
4690
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-nav-editor-help", children: "Add only links you want in the menu. Drag rows to reorder. Set a parent to create dropdown items." }),
4691
+ rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-nav-editor-empty", children: 'No navigation items yet. Click "Add Item" to start.' }) : null,
4692
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-nav-editor-list", children: rows.map((row, rowIndex) => {
4778
4693
  const parentCandidates = rows.filter((candidate) => candidate.id !== row.id && candidate.href.trim().length > 0).map((candidate) => {
4779
4694
  const resolved = pageOptionByHref.get(candidate.href);
4780
4695
  return {
@@ -4784,7 +4699,7 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4784
4699
  });
4785
4700
  const selectedPage = pageOptionByHref.get(row.href);
4786
4701
  const labelPlaceholder = selectedPage?.title || "Navigation Label";
4787
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4702
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4788
4703
  "div",
4789
4704
  {
4790
4705
  className: `orion-admin-nav-editor-row${draggingRowID === row.id ? " is-dragging" : ""}${dragOverRowID === row.id && draggingRowID !== row.id ? " is-drop-target" : ""}`,
@@ -4827,18 +4742,18 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4827
4742
  setDragOverRowID(null);
4828
4743
  },
4829
4744
  children: [
4830
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-nav-editor-row-head", children: [
4831
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "orion-admin-nav-editor-drag", children: "Drag" }),
4832
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "orion-admin-nav-editor-row-index", children: [
4745
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "orion-admin-nav-editor-row-head", children: [
4746
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "orion-admin-nav-editor-drag", children: "Drag" }),
4747
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "orion-admin-nav-editor-row-index", children: [
4833
4748
  "#",
4834
4749
  rowIndex + 1
4835
4750
  ] }),
4836
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("button", { className: "orion-admin-nav-editor-remove", onClick: () => removeRow(row.id), type: "button", children: "Remove" })
4751
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("button", { className: "orion-admin-nav-editor-remove", onClick: () => removeRow(row.id), type: "button", children: "Remove" })
4837
4752
  ] }),
4838
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-nav-editor-row-grid", children: [
4839
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { children: [
4753
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "orion-admin-nav-editor-row-grid", children: [
4754
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { children: [
4840
4755
  "Label",
4841
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4756
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4842
4757
  "input",
4843
4758
  {
4844
4759
  name: `navLabel_${rowIndex}`,
@@ -4849,9 +4764,9 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4849
4764
  }
4850
4765
  )
4851
4766
  ] }),
4852
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { children: [
4767
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { children: [
4853
4768
  "Page",
4854
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4769
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4855
4770
  "select",
4856
4771
  {
4857
4772
  name: `navPage_${rowIndex}`,
@@ -4862,23 +4777,23 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4862
4777
  },
4863
4778
  value: row.href,
4864
4779
  children: [
4865
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: "", children: "Select page..." }),
4866
- pageOptions.map((pageOption) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: pageOption.href, children: pageOption.label }, `${pageOption.href}-${pageOption.title}`))
4780
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: "", children: "Select page..." }),
4781
+ pageOptions.map((pageOption) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: pageOption.href, children: pageOption.label }, `${pageOption.href}-${pageOption.title}`))
4867
4782
  ]
4868
4783
  }
4869
4784
  )
4870
4785
  ] }),
4871
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { children: [
4786
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { children: [
4872
4787
  "Parent (dropdown under)",
4873
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4788
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4874
4789
  "select",
4875
4790
  {
4876
4791
  name: `navParentHref_${rowIndex}`,
4877
4792
  onChange: (event) => setRowValue(row.id, { parentHref: event.target.value }),
4878
4793
  value: row.parentHref,
4879
4794
  children: [
4880
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: "", children: "Top-level item" }),
4881
- parentCandidates.map((candidate) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: candidate.href, children: candidate.label }, `${row.id}-parent-${candidate.href}`))
4795
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: "", children: "Top-level item" }),
4796
+ parentCandidates.map((candidate) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: candidate.href, children: candidate.label }, `${row.id}-parent-${candidate.href}`))
4882
4797
  ]
4883
4798
  }
4884
4799
  )
@@ -4893,7 +4808,7 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4893
4808
  }
4894
4809
 
4895
4810
  // src/admin-app/components/SitePreview.tsx
4896
- var import_jsx_runtime29 = require("react/jsx-runtime");
4811
+ var import_jsx_runtime28 = require("react/jsx-runtime");
4897
4812
  var fallbackHeaderNav = [{ href: "/", label: "Home" }];
4898
4813
  var socialGlyphByPlatform = {
4899
4814
  facebook: "f",
@@ -4926,11 +4841,11 @@ function PreviewSocialLinks({
4926
4841
  if (links.length === 0) {
4927
4842
  return null;
4928
4843
  }
4929
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4844
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4930
4845
  "div",
4931
4846
  {
4932
4847
  className: variant === "header" ? "orion-admin-site-preview-social-list" : "orion-admin-site-preview-social-list orion-admin-site-preview-social-list--footer",
4933
- children: links.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4848
+ children: links.map((item) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4934
4849
  "a",
4935
4850
  {
4936
4851
  className: variant === "header" ? "orion-admin-site-preview-social-badge" : "orion-admin-site-preview-social-badge orion-admin-site-preview-social-badge--footer",
@@ -4949,27 +4864,27 @@ function PreviewLogo({
4949
4864
  siteName
4950
4865
  }) {
4951
4866
  if (logoUrl && logoUrl.trim().length > 0) {
4952
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("img", { alt: `${siteName} logo`, className, src: logoUrl });
4867
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("img", { alt: `${siteName} logo`, className, src: logoUrl });
4953
4868
  }
4954
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: `${className} orion-admin-site-preview-logo-fallback`, children: getInitials(siteName) });
4869
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `${className} orion-admin-site-preview-logo-fallback`, children: getInitials(siteName) });
4955
4870
  }
4956
4871
  function SiteHeaderPreview({ site }) {
4957
4872
  const navItems = site.navItems.length > 0 ? site.navItems : fallbackHeaderNav;
4958
4873
  const [taglineLineOne, taglineLineTwo] = getTaglineLines(site.tagline);
4959
4874
  const socialLinks = site.socialLinks?.slice(0, 4) || [];
4960
4875
  const activePath = site.activePath || navItems[0]?.href || "/";
4961
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { "aria-hidden": "true", className: "orion-admin-site-preview orion-admin-site-preview--header", children: [
4962
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-site-preview-header-bar", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-shell orion-admin-site-preview-shell--utility", children: [
4963
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-utility-copy", children: site.locationSummary?.address?.trim() || "Neighborhood gift shop" }),
4964
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-utility-meta", children: [
4965
- site.locationSummary?.hours?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-utility-copy", children: site.locationSummary.hours.trim() }) : null,
4966
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PreviewSocialLinks, { links: socialLinks, variant: "header" }),
4967
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { className: "orion-admin-site-preview-header-action", href: site.actionHref || "/contact", tabIndex: -1, children: site.actionLabel || "Visit Today" })
4876
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { "aria-hidden": "true", className: "orion-admin-site-preview orion-admin-site-preview--header", children: [
4877
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-site-preview-header-bar", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-shell orion-admin-site-preview-shell--utility", children: [
4878
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-utility-copy", children: site.locationSummary?.address?.trim() || "Neighborhood gift shop" }),
4879
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-utility-meta", children: [
4880
+ site.locationSummary?.hours?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-utility-copy", children: site.locationSummary.hours.trim() }) : null,
4881
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PreviewSocialLinks, { links: socialLinks, variant: "header" }),
4882
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { className: "orion-admin-site-preview-header-action", href: site.actionHref || "/contact", tabIndex: -1, children: site.actionLabel || "Visit Today" })
4968
4883
  ] })
4969
4884
  ] }) }),
4970
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-site-preview-header-main", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-shell orion-admin-site-preview-shell--main", children: [
4971
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("a", { className: "orion-admin-site-preview-brand", href: "/", tabIndex: -1, children: [
4972
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4885
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-site-preview-header-main", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-shell orion-admin-site-preview-shell--main", children: [
4886
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("a", { className: "orion-admin-site-preview-brand", href: "/", tabIndex: -1, children: [
4887
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4973
4888
  PreviewLogo,
4974
4889
  {
4975
4890
  className: "orion-admin-site-preview-header-logo",
@@ -4977,12 +4892,12 @@ function SiteHeaderPreview({ site }) {
4977
4892
  siteName: site.siteName
4978
4893
  }
4979
4894
  ),
4980
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-tagline", children: [
4981
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-tagline-line", children: taglineLineOne }),
4982
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-tagline-line", children: taglineLineTwo })
4895
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-tagline", children: [
4896
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-tagline-line", children: taglineLineOne }),
4897
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-tagline-line", children: taglineLineTwo })
4983
4898
  ] })
4984
4899
  ] }),
4985
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("nav", { className: "orion-admin-site-preview-nav", children: navItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4900
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("nav", { className: "orion-admin-site-preview-nav", children: navItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4986
4901
  "a",
4987
4902
  {
4988
4903
  className: item.href === activePath ? "is-active" : void 0,
@@ -4992,10 +4907,10 @@ function SiteHeaderPreview({ site }) {
4992
4907
  },
4993
4908
  `${item.href}-${item.label}`
4994
4909
  )) }),
4995
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-mobile-toggle", children: [
4996
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", {}),
4997
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", {}),
4998
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", {})
4910
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-mobile-toggle", children: [
4911
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", {}),
4912
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", {}),
4913
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", {})
4999
4914
  ] })
5000
4915
  ] }) })
5001
4916
  ] });
@@ -5005,11 +4920,11 @@ function SiteFooterPreview({ site }) {
5005
4920
  const socialLinks = site.socialLinks?.slice(0, 4) || [];
5006
4921
  const builtByLabel = site.builtByLabel || "Built by Orion Studios";
5007
4922
  const builtByHref = site.builtByHref || "https://orionstudios.dev";
5008
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { "aria-hidden": "true", className: "orion-admin-site-preview orion-admin-site-preview--footer", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-footer-shell", children: [
5009
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-footer-grid", children: [
5010
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
5011
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-footer-brand", children: [
5012
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4923
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { "aria-hidden": "true", className: "orion-admin-site-preview orion-admin-site-preview--footer", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-footer-shell", children: [
4924
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-footer-grid", children: [
4925
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
4926
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-footer-brand", children: [
4927
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5013
4928
  PreviewLogo,
5014
4929
  {
5015
4930
  className: "orion-admin-site-preview-footer-logo",
@@ -5017,38 +4932,38 @@ function SiteFooterPreview({ site }) {
5017
4932
  siteName: site.siteName
5018
4933
  }
5019
4934
  ),
5020
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-footer-name", children: site.siteName })
4935
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-footer-name", children: site.siteName })
5021
4936
  ] }),
5022
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-footer-description", children: description })
4937
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-footer-description", children: description })
5023
4938
  ] }),
5024
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
5025
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Shop focus" }),
5026
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-site-preview-footer-list", children: site.footerCategories.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: item }, item)) })
4939
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
4940
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Shop focus" }),
4941
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-site-preview-footer-list", children: site.footerCategories.map((item) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: item }, item)) })
5027
4942
  ] }),
5028
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
5029
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Explore" }),
5030
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-site-preview-footer-list", children: site.footerLinks.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { href: item.href, tabIndex: -1, children: item.label }, `${item.href}-${item.label}`)) })
4943
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
4944
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Explore" }),
4945
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-site-preview-footer-list", children: site.footerLinks.map((item) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { href: item.href, tabIndex: -1, children: item.label }, `${item.href}-${item.label}`)) })
5031
4946
  ] }),
5032
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
5033
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Visit" }),
5034
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-footer-contact", children: [
5035
- site.locationSummary.address?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: site.locationSummary.address.trim() }) : null,
5036
- site.locationSummary.hours?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: site.locationSummary.hours.trim() }) : null,
5037
- site.locationSummary.phone?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { href: `tel:${site.locationSummary.phone.trim()}`, tabIndex: -1, children: site.locationSummary.phone.trim() }) : null,
5038
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { href: `mailto:${site.contactEmail}`, tabIndex: -1, children: site.contactEmail })
4947
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
4948
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Visit" }),
4949
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-footer-contact", children: [
4950
+ site.locationSummary.address?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: site.locationSummary.address.trim() }) : null,
4951
+ site.locationSummary.hours?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: site.locationSummary.hours.trim() }) : null,
4952
+ site.locationSummary.phone?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { href: `tel:${site.locationSummary.phone.trim()}`, tabIndex: -1, children: site.locationSummary.phone.trim() }) : null,
4953
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { href: `mailto:${site.contactEmail}`, tabIndex: -1, children: site.contactEmail })
5039
4954
  ] }),
5040
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PreviewSocialLinks, { links: socialLinks, variant: "footer" })
4955
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PreviewSocialLinks, { links: socialLinks, variant: "footer" })
5041
4956
  ] })
5042
4957
  ] }),
5043
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-footer-meta", children: [
5044
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: site.copyright }),
5045
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { href: builtByHref, tabIndex: -1, children: builtByLabel })
4958
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-footer-meta", children: [
4959
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: site.copyright }),
4960
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { href: builtByHref, tabIndex: -1, children: builtByLabel })
5046
4961
  ] })
5047
4962
  ] }) });
5048
4963
  }
5049
4964
 
5050
4965
  // src/admin-app/components/HeaderNavEditorWithPreview.tsx
5051
- var import_jsx_runtime30 = require("react/jsx-runtime");
4966
+ var import_jsx_runtime29 = require("react/jsx-runtime");
5052
4967
  var fallbackNav = [{ href: "/", label: "Home" }];
5053
4968
  function HeaderNavEditorWithPreview({
5054
4969
  activePath,
@@ -5069,8 +4984,8 @@ function HeaderNavEditorWithPreview({
5069
4984
  const tree = buildNestedNavTree(normalized);
5070
4985
  return tree.topLevel.length > 0 ? tree : buildNestedNavTree(fallbackNav);
5071
4986
  }, [liveItems]);
5072
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
5073
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4987
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
4988
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5074
4989
  HeaderNavItemsEditor,
5075
4990
  {
5076
4991
  initialItems,
@@ -5081,8 +4996,8 @@ function HeaderNavEditorWithPreview({
5081
4996
  pageOptions
5082
4997
  }
5083
4998
  ),
5084
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "orion-admin-preview-label", children: "Header Preview" }),
5085
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "orion-admin-preview-frame", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "orion-admin-preview-surface", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4999
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-preview-label", children: "Header Preview" }),
5000
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-preview-frame", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-preview-surface", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5086
5001
  SiteHeaderPreview,
5087
5002
  {
5088
5003
  site: {
@@ -5131,8 +5046,8 @@ function resolveSocialMediaLinks(data) {
5131
5046
  }
5132
5047
 
5133
5048
  // src/admin/components/studio/AdminStudioHeaderGlobalView.tsx
5134
- var import_jsx_runtime31 = require("react/jsx-runtime");
5135
- var getPropString8 = (props, key, fallback) => {
5049
+ var import_jsx_runtime30 = require("react/jsx-runtime");
5050
+ var getPropString7 = (props, key, fallback) => {
5136
5051
  if (!props || typeof props !== "object") return fallback;
5137
5052
  const direct = props[key];
5138
5053
  if (typeof direct === "string" && direct.length > 0) return direct;
@@ -5188,11 +5103,11 @@ var resolveMediaURL = (value) => {
5188
5103
  return "";
5189
5104
  };
5190
5105
  function AdminStudioHeaderGlobalView(props) {
5191
- const globalSlug = getPropString8(props, "globalSlug", "header");
5192
- const globalsBasePath = getPropString8(props, "globalsBasePath", "/globals");
5193
- const pagesCollectionSlug = getPropString8(props, "pagesCollectionSlug", "pages");
5194
- const actionHref = getPropString8(props, "actionHref", "/contact");
5195
- const actionLabel = getPropString8(props, "actionLabel", "Visit Today");
5106
+ const globalSlug = getPropString7(props, "globalSlug", "header");
5107
+ const globalsBasePath = getPropString7(props, "globalsBasePath", "/globals");
5108
+ const pagesCollectionSlug = getPropString7(props, "pagesCollectionSlug", "pages");
5109
+ const actionHref = getPropString7(props, "actionHref", "/contact");
5110
+ const actionLabel = getPropString7(props, "actionLabel", "Visit Today");
5196
5111
  const locationSummary = getPropLocationSummary(props, "locationSummary");
5197
5112
  const adminBasePath = useAdminBasePath();
5198
5113
  const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
@@ -5315,8 +5230,8 @@ function AdminStudioHeaderGlobalView(props) {
5315
5230
  setSaving(false);
5316
5231
  }
5317
5232
  };
5318
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { paddingBottom: "2rem" }, children: [
5319
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5233
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: { paddingBottom: "2rem" }, children: [
5234
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5320
5235
  import_ui8.SetStepNav,
5321
5236
  {
5322
5237
  nav: [
@@ -5325,13 +5240,13 @@ function AdminStudioHeaderGlobalView(props) {
5325
5240
  ]
5326
5241
  }
5327
5242
  ),
5328
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h1", { style: { margin: 0 }, children: "Header & Navigation" }),
5329
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Manage the main website navigation and preview it in place." }),
5330
- loading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading header settings\u2026" }) : null,
5331
- error ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
5332
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
5333
- !loading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem" }, children: [
5334
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5243
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h1", { style: { margin: 0 }, children: "Header & Navigation" }),
5244
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Manage the main website navigation and preview it in place." }),
5245
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading header settings\u2026" }) : null,
5246
+ error ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
5247
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
5248
+ !loading ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem" }, children: [
5249
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5335
5250
  HeaderNavEditorWithPreview,
5336
5251
  {
5337
5252
  actionHref,
@@ -5348,7 +5263,7 @@ function AdminStudioHeaderGlobalView(props) {
5348
5263
  },
5349
5264
  editorKey
5350
5265
  ),
5351
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { style: { display: "flex", gap: "0.6rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5266
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: { display: "flex", gap: "0.6rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5352
5267
  "button",
5353
5268
  {
5354
5269
  disabled: saving,
@@ -5374,8 +5289,8 @@ function AdminStudioHeaderGlobalView(props) {
5374
5289
  // src/admin/components/studio/AdminStudioFooterGlobalView.tsx
5375
5290
  var import_react24 = require("react");
5376
5291
  var import_ui9 = require("@payloadcms/ui");
5377
- var import_jsx_runtime32 = require("react/jsx-runtime");
5378
- var getPropString9 = (props, key, fallback) => {
5292
+ var import_jsx_runtime31 = require("react/jsx-runtime");
5293
+ var getPropString8 = (props, key, fallback) => {
5379
5294
  if (!props || typeof props !== "object") return fallback;
5380
5295
  const direct = props[key];
5381
5296
  if (typeof direct === "string") return direct;
@@ -5469,11 +5384,11 @@ var deriveHours = (siteSettings) => {
5469
5384
  return `${dayOfWeek} \u2022 ${opens} - ${closes}`;
5470
5385
  };
5471
5386
  function AdminStudioFooterGlobalView(props) {
5472
- const globalSlug = getPropString9(props, "globalSlug", "footer");
5473
- const globalsBasePath = getPropString9(props, "globalsBasePath", "/globals");
5474
- const builtByHref = getPropString9(props, "builtByHref", "");
5475
- const builtByLabel = getPropString9(props, "builtByLabel", "");
5476
- const description = getPropString9(props, "description", "");
5387
+ const globalSlug = getPropString8(props, "globalSlug", "footer");
5388
+ const globalsBasePath = getPropString8(props, "globalsBasePath", "/globals");
5389
+ const builtByHref = getPropString8(props, "builtByHref", "");
5390
+ const builtByLabel = getPropString8(props, "builtByLabel", "");
5391
+ const description = getPropString8(props, "description", "");
5477
5392
  const footerCategories = getPropStringArray2(props, "footerCategories");
5478
5393
  const footerLinks = getPropLinks(props, "footerLinks");
5479
5394
  const configuredLocationSummary = getPropLocationSummary2(props, "locationSummary");
@@ -5588,8 +5503,8 @@ function AdminStudioFooterGlobalView(props) {
5588
5503
  setSaving(false);
5589
5504
  }
5590
5505
  };
5591
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { paddingBottom: "2rem" }, children: [
5592
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5506
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { paddingBottom: "2rem" }, children: [
5507
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5593
5508
  import_ui9.SetStepNav,
5594
5509
  {
5595
5510
  nav: [
@@ -5598,13 +5513,13 @@ function AdminStudioFooterGlobalView(props) {
5598
5513
  ]
5599
5514
  }
5600
5515
  ),
5601
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h1", { style: { margin: 0 }, children: "Footer" }),
5602
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Manage footer contact details and preview the package footer in place." }),
5603
- loading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading footer settings\u2026" }) : null,
5604
- error ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
5605
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
5606
- !loading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem" }, children: [
5607
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
5516
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h1", { style: { margin: 0 }, children: "Footer" }),
5517
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Manage footer contact details and preview the package footer in place." }),
5518
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading footer settings\u2026" }) : null,
5519
+ error ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
5520
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
5521
+ !loading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem" }, children: [
5522
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5608
5523
  "label",
5609
5524
  {
5610
5525
  style: {
@@ -5616,7 +5531,7 @@ function AdminStudioFooterGlobalView(props) {
5616
5531
  },
5617
5532
  children: [
5618
5533
  "Copyright",
5619
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5534
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5620
5535
  "input",
5621
5536
  {
5622
5537
  onChange: (event) => setDoc((current) => ({ ...current, copyright: event.target.value })),
@@ -5637,7 +5552,7 @@ function AdminStudioFooterGlobalView(props) {
5637
5552
  ]
5638
5553
  }
5639
5554
  ),
5640
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
5555
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5641
5556
  "label",
5642
5557
  {
5643
5558
  style: {
@@ -5649,7 +5564,7 @@ function AdminStudioFooterGlobalView(props) {
5649
5564
  },
5650
5565
  children: [
5651
5566
  "Contact Email",
5652
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5567
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5653
5568
  "input",
5654
5569
  {
5655
5570
  onChange: (event) => setDoc((current) => ({ ...current, contactEmail: event.target.value })),
@@ -5670,7 +5585,7 @@ function AdminStudioFooterGlobalView(props) {
5670
5585
  ]
5671
5586
  }
5672
5587
  ),
5673
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
5588
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5674
5589
  "label",
5675
5590
  {
5676
5591
  style: {
@@ -5682,7 +5597,7 @@ function AdminStudioFooterGlobalView(props) {
5682
5597
  },
5683
5598
  children: [
5684
5599
  "Contact Phone",
5685
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5600
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5686
5601
  "input",
5687
5602
  {
5688
5603
  onChange: (event) => setDoc((current) => ({ ...current, contactPhone: event.target.value })),
@@ -5703,8 +5618,8 @@ function AdminStudioFooterGlobalView(props) {
5703
5618
  ]
5704
5619
  }
5705
5620
  ),
5706
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "orion-admin-preview-label", children: "Footer Preview" }),
5707
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "orion-admin-preview-frame", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "orion-admin-preview-surface", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5621
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "orion-admin-preview-label", children: "Footer Preview" }),
5622
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "orion-admin-preview-frame", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "orion-admin-preview-surface", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5708
5623
  SiteFooterPreview,
5709
5624
  {
5710
5625
  site: {
@@ -5723,7 +5638,7 @@ function AdminStudioFooterGlobalView(props) {
5723
5638
  }
5724
5639
  }
5725
5640
  ) }) }),
5726
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { display: "flex", gap: "0.6rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5641
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { style: { display: "flex", gap: "0.6rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5727
5642
  "button",
5728
5643
  {
5729
5644
  disabled: saving,
@@ -5749,7 +5664,7 @@ function AdminStudioFooterGlobalView(props) {
5749
5664
  // src/admin/components/studio/AdminStudioContactFormView.tsx
5750
5665
  var import_react25 = require("react");
5751
5666
  var import_ui10 = require("@payloadcms/ui");
5752
- var import_jsx_runtime33 = require("react/jsx-runtime");
5667
+ var import_jsx_runtime32 = require("react/jsx-runtime");
5753
5668
  var defaultDoc = {
5754
5669
  disabledMessage: "This form is temporarily unavailable. Please call us for immediate service.",
5755
5670
  enabled: true,
@@ -5764,7 +5679,7 @@ var defaultDoc = {
5764
5679
  submitButtonLabel: "Send Request",
5765
5680
  successMessage: "Thanks, your request has been received. We will follow up shortly."
5766
5681
  };
5767
- var getPropString10 = (props, key, fallback) => {
5682
+ var getPropString9 = (props, key, fallback) => {
5768
5683
  if (!props || typeof props !== "object") return fallback;
5769
5684
  const direct = props[key];
5770
5685
  if (typeof direct === "string" && direct.length > 0) return direct;
@@ -5833,8 +5748,8 @@ var ghostButtonStyle = {
5833
5748
  color: "var(--theme-elevation-900)"
5834
5749
  };
5835
5750
  function AdminStudioContactFormView(props) {
5836
- const globalSlug = getPropString10(props, "globalSlug", "contact-form");
5837
- const globalsBasePath = getPropString10(props, "globalsBasePath", "/globals");
5751
+ const globalSlug = getPropString9(props, "globalSlug", "contact-form");
5752
+ const globalsBasePath = getPropString9(props, "globalsBasePath", "/globals");
5838
5753
  const adminBasePath = useAdminBasePath();
5839
5754
  const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
5840
5755
  const rawGlobalPath = resolveAdminPath(adminBasePath, `/globals/${globalSlug}`);
@@ -5910,8 +5825,8 @@ function AdminStudioContactFormView(props) {
5910
5825
  setIsSaving(false);
5911
5826
  }
5912
5827
  };
5913
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { paddingBottom: "2rem" }, children: [
5914
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5828
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { paddingBottom: "2rem" }, children: [
5829
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5915
5830
  import_ui10.SetStepNav,
5916
5831
  {
5917
5832
  nav: [
@@ -5920,14 +5835,14 @@ function AdminStudioContactFormView(props) {
5920
5835
  ]
5921
5836
  }
5922
5837
  ),
5923
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h1", { style: { margin: 0 }, children: "Contact Form" }),
5924
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Edit form behavior and submission messaging without leaving Studio." }),
5925
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading form settings\u2026" }) : null,
5926
- error ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
5927
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
5928
- !isLoading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem", maxWidth: 900 }, children: [
5929
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { style: { ...fieldLabelStyle, alignItems: "center", display: "flex", gap: "0.6rem" }, children: [
5930
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5838
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h1", { style: { margin: 0 }, children: "Contact Form" }),
5839
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Edit form behavior and submission messaging without leaving Studio." }),
5840
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading form settings\u2026" }) : null,
5841
+ error ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
5842
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
5843
+ !isLoading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem", maxWidth: 900 }, children: [
5844
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { style: { ...fieldLabelStyle, alignItems: "center", display: "flex", gap: "0.6rem" }, children: [
5845
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5931
5846
  "input",
5932
5847
  {
5933
5848
  checked: doc.enabled,
@@ -5937,9 +5852,9 @@ function AdminStudioContactFormView(props) {
5937
5852
  ),
5938
5853
  "Form enabled"
5939
5854
  ] }),
5940
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { style: fieldLabelStyle, children: [
5855
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { style: fieldLabelStyle, children: [
5941
5856
  "Notification Email",
5942
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5857
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5943
5858
  "input",
5944
5859
  {
5945
5860
  onChange: (event) => setDoc((prev) => ({ ...prev, notificationEmail: event.target.value })),
@@ -5949,9 +5864,9 @@ function AdminStudioContactFormView(props) {
5949
5864
  }
5950
5865
  )
5951
5866
  ] }),
5952
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { style: fieldLabelStyle, children: [
5867
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { style: fieldLabelStyle, children: [
5953
5868
  "Submit Button Label",
5954
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5869
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5955
5870
  "input",
5956
5871
  {
5957
5872
  onChange: (event) => setDoc((prev) => ({ ...prev, submitButtonLabel: event.target.value })),
@@ -5961,9 +5876,9 @@ function AdminStudioContactFormView(props) {
5961
5876
  }
5962
5877
  )
5963
5878
  ] }),
5964
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { style: fieldLabelStyle, children: [
5879
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { style: fieldLabelStyle, children: [
5965
5880
  "Success Message",
5966
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5881
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5967
5882
  "input",
5968
5883
  {
5969
5884
  onChange: (event) => setDoc((prev) => ({ ...prev, successMessage: event.target.value })),
@@ -5973,9 +5888,9 @@ function AdminStudioContactFormView(props) {
5973
5888
  }
5974
5889
  )
5975
5890
  ] }),
5976
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { style: fieldLabelStyle, children: [
5891
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { style: fieldLabelStyle, children: [
5977
5892
  "Error Message",
5978
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5893
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5979
5894
  "input",
5980
5895
  {
5981
5896
  onChange: (event) => setDoc((prev) => ({ ...prev, errorMessage: event.target.value })),
@@ -5985,9 +5900,9 @@ function AdminStudioContactFormView(props) {
5985
5900
  }
5986
5901
  )
5987
5902
  ] }),
5988
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { style: fieldLabelStyle, children: [
5903
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { style: fieldLabelStyle, children: [
5989
5904
  "Disabled Message",
5990
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5905
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5991
5906
  "input",
5992
5907
  {
5993
5908
  onChange: (event) => setDoc((prev) => ({ ...prev, disabledMessage: event.target.value })),
@@ -5997,7 +5912,7 @@ function AdminStudioContactFormView(props) {
5997
5912
  }
5998
5913
  )
5999
5914
  ] }),
6000
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
5915
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
6001
5916
  "div",
6002
5917
  {
6003
5918
  style: {
@@ -6007,9 +5922,9 @@ function AdminStudioContactFormView(props) {
6007
5922
  padding: "0.85rem"
6008
5923
  },
6009
5924
  children: [
6010
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { fontWeight: 900, marginBottom: "0.65rem" }, children: "Service Options" }),
6011
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { display: "grid", gap: "0.55rem" }, children: doc.serviceOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { display: "flex", gap: "0.5rem" }, children: [
6012
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5925
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { fontWeight: 900, marginBottom: "0.65rem" }, children: "Service Options" }),
5926
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { display: "grid", gap: "0.55rem" }, children: doc.serviceOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { display: "flex", gap: "0.5rem" }, children: [
5927
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6013
5928
  "input",
6014
5929
  {
6015
5930
  onChange: (event) => setDoc((prev) => ({
@@ -6023,7 +5938,7 @@ function AdminStudioContactFormView(props) {
6023
5938
  value: option.label
6024
5939
  }
6025
5940
  ),
6026
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5941
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6027
5942
  "button",
6028
5943
  {
6029
5944
  onClick: () => setDoc((prev) => ({
@@ -6036,7 +5951,7 @@ function AdminStudioContactFormView(props) {
6036
5951
  }
6037
5952
  )
6038
5953
  ] }, `${index}-${option.label}`)) }),
6039
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5954
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6040
5955
  "button",
6041
5956
  {
6042
5957
  onClick: () => setDoc((prev) => ({
@@ -6051,9 +5966,9 @@ function AdminStudioContactFormView(props) {
6051
5966
  ]
6052
5967
  }
6053
5968
  ),
6054
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { display: "flex", gap: "0.6rem" }, children: [
6055
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { disabled: isSaving, onClick: () => void save(), style: buttonStyle, type: "button", children: isSaving ? "Saving\u2026" : "Save Form Settings" }),
6056
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5969
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { display: "flex", gap: "0.6rem" }, children: [
5970
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("button", { disabled: isSaving, onClick: () => void save(), style: buttonStyle, type: "button", children: isSaving ? "Saving\u2026" : "Save Form Settings" }),
5971
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6057
5972
  "a",
6058
5973
  {
6059
5974
  href: rawGlobalPath,
@@ -6076,7 +5991,7 @@ function AdminStudioContactFormView(props) {
6076
5991
  var import_react27 = require("react");
6077
5992
 
6078
5993
  // src/admin-app/components/MediaListItem.tsx
6079
- var import_jsx_runtime34 = require("react/jsx-runtime");
5994
+ var import_jsx_runtime33 = require("react/jsx-runtime");
6080
5995
  function formatFileSize(bytes) {
6081
5996
  if (bytes < 1024) return `${bytes} B`;
6082
5997
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
@@ -6099,16 +6014,16 @@ function MediaListItem({
6099
6014
  if (typeof filesize === "number") metaParts.push(formatFileSize(filesize));
6100
6015
  if (typeof width === "number" && typeof height === "number") metaParts.push(`${width}\xD7${height}`);
6101
6016
  if (typeof mimeType === "string") metaParts.push(mimeType);
6102
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("a", { className: "orion-admin-list-item", href, children: [
6103
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { style: { alignItems: "center", display: "flex", gap: "0.8rem" }, children: [
6104
- url ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { alt: altText || label, className: "orion-admin-media-preview", src: url }) : null,
6105
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
6106
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("strong", { children: label }),
6107
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "orion-admin-list-meta", children: altText || "No alt text" }),
6108
- metaParts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "orion-admin-list-meta", style: { marginTop: "0.15rem" }, children: metaParts.join(" \xB7 ") }) : null
6017
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("a", { className: "orion-admin-list-item", href, children: [
6018
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { alignItems: "center", display: "flex", gap: "0.8rem" }, children: [
6019
+ url ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("img", { alt: altText || label, className: "orion-admin-media-preview", src: url }) : null,
6020
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
6021
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("strong", { children: label }),
6022
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "orion-admin-list-meta", children: altText || "No alt text" }),
6023
+ metaParts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "orion-admin-list-meta", style: { marginTop: "0.15rem" }, children: metaParts.join(" \xB7 ") }) : null
6109
6024
  ] })
6110
6025
  ] }),
6111
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "orion-admin-list-meta", children: "Edit" })
6026
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "orion-admin-list-meta", children: "Edit" })
6112
6027
  ] });
6113
6028
  }
6114
6029
 
@@ -6210,7 +6125,7 @@ async function optimizeImageForUpload(file) {
6210
6125
  }
6211
6126
 
6212
6127
  // src/admin-app/components/MediaUploadForm.tsx
6213
- var import_jsx_runtime35 = require("react/jsx-runtime");
6128
+ var import_jsx_runtime34 = require("react/jsx-runtime");
6214
6129
  var MEDIA_LIBRARY_SYNC_EVENT = "orion-media-library-updated";
6215
6130
  var notifyMediaLibraryUpdated = () => {
6216
6131
  if (typeof window === "undefined") {
@@ -6324,10 +6239,10 @@ function MediaUploadForm() {
6324
6239
  setSubmitting(false);
6325
6240
  }
6326
6241
  };
6327
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("form", { className: "orion-admin-upload-form", onSubmit: upload, children: [
6328
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("label", { children: [
6242
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("form", { className: "orion-admin-upload-form", onSubmit: upload, children: [
6243
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { children: [
6329
6244
  "Alt text",
6330
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
6245
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6331
6246
  "input",
6332
6247
  {
6333
6248
  onChange: (event) => setAlt(event.target.value),
@@ -6337,7 +6252,7 @@ function MediaUploadForm() {
6337
6252
  }
6338
6253
  )
6339
6254
  ] }),
6340
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
6255
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
6341
6256
  "div",
6342
6257
  {
6343
6258
  className: `orion-admin-dropzone${dragging ? " is-dragging" : ""}${file ? " has-file" : ""}`,
@@ -6346,14 +6261,14 @@ function MediaUploadForm() {
6346
6261
  onDragOver,
6347
6262
  onDrop,
6348
6263
  children: [
6349
- preview ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "orion-admin-dropzone-preview", children: [
6350
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("img", { alt: "Upload preview", src: preview }),
6351
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: file?.name })
6352
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "orion-admin-dropzone-label", children: [
6353
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("strong", { children: "Drop an image here" }),
6354
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: "or click to browse" })
6264
+ preview ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "orion-admin-dropzone-preview", children: [
6265
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { alt: "Upload preview", src: preview }),
6266
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: file?.name })
6267
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "orion-admin-dropzone-label", children: [
6268
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("strong", { children: "Drop an image here" }),
6269
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: "or click to browse" })
6355
6270
  ] }),
6356
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
6271
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6357
6272
  "input",
6358
6273
  {
6359
6274
  accept: "image/*",
@@ -6366,15 +6281,15 @@ function MediaUploadForm() {
6366
6281
  ]
6367
6282
  }
6368
6283
  ),
6369
- error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "orion-admin-upload-error", children: error }) : null,
6370
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("button", { disabled: submitting, type: "submit", children: submitting ? "Uploading..." : "Upload" })
6284
+ error ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "orion-admin-upload-error", children: error }) : null,
6285
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("button", { disabled: submitting, type: "submit", children: submitting ? "Uploading..." : "Upload" })
6371
6286
  ] });
6372
6287
  }
6373
6288
 
6374
6289
  // src/admin/components/studio/AdminStudioMediaView.tsx
6375
- var import_jsx_runtime36 = require("react/jsx-runtime");
6290
+ var import_jsx_runtime35 = require("react/jsx-runtime");
6376
6291
  var MEDIA_LIBRARY_SYNC_EVENT2 = "orion-media-library-updated";
6377
- var getPropString11 = (props, key, fallback) => {
6292
+ var getPropString10 = (props, key, fallback) => {
6378
6293
  if (!props || typeof props !== "object") return fallback;
6379
6294
  const direct = props[key];
6380
6295
  if (typeof direct === "string" && direct.length > 0) return direct;
@@ -6386,7 +6301,7 @@ var getPropString11 = (props, key, fallback) => {
6386
6301
  return fallback;
6387
6302
  };
6388
6303
  function AdminStudioMediaView(props) {
6389
- const mediaCollectionSlug = getPropString11(props, "mediaCollectionSlug", "media");
6304
+ const mediaCollectionSlug = getPropString10(props, "mediaCollectionSlug", "media");
6390
6305
  const adminBasePath = useAdminBasePath();
6391
6306
  const [docs, setDocs] = (0, import_react27.useState)([]);
6392
6307
  const [loading, setLoading] = (0, import_react27.useState)(true);
@@ -6436,7 +6351,7 @@ function AdminStudioMediaView(props) {
6436
6351
  window.removeEventListener("storage", rerun);
6437
6352
  };
6438
6353
  }, [apiURL]);
6439
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
6354
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
6440
6355
  AdminPage,
6441
6356
  {
6442
6357
  breadcrumbs: [
@@ -6446,18 +6361,18 @@ function AdminStudioMediaView(props) {
6446
6361
  description: `${docs.length} asset${docs.length === 1 ? "" : "s"} \u2014 Upload assets here, including logos used in Site Settings branding.`,
6447
6362
  title: "Media",
6448
6363
  children: [
6449
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(MediaUploadForm, {}),
6450
- loading ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "orion-admin-list-meta", style: { marginTop: "1rem" }, children: "Loading..." }) : null,
6451
- error ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "orion-admin-error", style: { marginTop: "1rem" }, children: error }) : null,
6452
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "orion-admin-list", style: { marginTop: "1rem" }, children: [
6453
- !loading && !error && docs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "orion-admin-card", children: [
6454
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("strong", { children: "No media found" }),
6455
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: "Upload an image to get started." })
6364
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(MediaUploadForm, {}),
6365
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "orion-admin-list-meta", style: { marginTop: "1rem" }, children: "Loading..." }) : null,
6366
+ error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "orion-admin-error", style: { marginTop: "1rem" }, children: error }) : null,
6367
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "orion-admin-list", style: { marginTop: "1rem" }, children: [
6368
+ !loading && !error && docs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "orion-admin-card", children: [
6369
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("strong", { children: "No media found" }),
6370
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: "Upload an image to get started." })
6456
6371
  ] }) : null,
6457
6372
  docs.map((doc) => {
6458
6373
  const id = typeof doc.id === "string" || typeof doc.id === "number" ? String(doc.id) : "";
6459
6374
  if (!id) return null;
6460
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
6375
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
6461
6376
  MediaListItem,
6462
6377
  {
6463
6378
  alt: doc.alt,
@@ -6484,7 +6399,7 @@ var import_react29 = require("react");
6484
6399
 
6485
6400
  // src/admin-app/components/MediaDetailPanel.tsx
6486
6401
  var import_react28 = require("react");
6487
- var import_jsx_runtime37 = require("react/jsx-runtime");
6402
+ var import_jsx_runtime36 = require("react/jsx-runtime");
6488
6403
  function formatFileSize2(bytes) {
6489
6404
  if (bytes < 1024) return `${bytes} B`;
6490
6405
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
@@ -6534,10 +6449,10 @@ function MediaDetailPanel({
6534
6449
  metaRows.push({ label: "Uploaded", value: createdAt });
6535
6450
  }
6536
6451
  }
6537
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "orion-admin-grid", style: { alignItems: "start" }, children: [
6538
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
6539
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "orion-admin-card", children: url ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("img", { alt: alt || filename || "Media", src: url, style: { borderRadius: 12, width: "100%" } }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: "No preview available." }) }),
6540
- url ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6452
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "orion-admin-grid", style: { alignItems: "start" }, children: [
6453
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { children: [
6454
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "orion-admin-card", children: url ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("img", { alt: alt || filename || "Media", src: url, style: { borderRadius: 12, width: "100%" } }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: "No preview available." }) }),
6455
+ url ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
6541
6456
  "button",
6542
6457
  {
6543
6458
  className: "orion-admin-action-button",
@@ -6548,28 +6463,28 @@ function MediaDetailPanel({
6548
6463
  }
6549
6464
  ) : null
6550
6465
  ] }),
6551
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { display: "grid", gap: "0.8rem" }, children: [
6552
- metaRows.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "orion-admin-card orion-admin-meta-table", children: metaRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "orion-admin-meta-row", children: [
6553
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "orion-admin-meta-label", children: row.label }),
6554
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "orion-admin-meta-value", children: row.value })
6466
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { style: { display: "grid", gap: "0.8rem" }, children: [
6467
+ metaRows.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "orion-admin-card orion-admin-meta-table", children: metaRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "orion-admin-meta-row", children: [
6468
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "orion-admin-meta-label", children: row.label }),
6469
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "orion-admin-meta-value", children: row.value })
6555
6470
  ] }, row.label)) }) : null,
6556
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("form", { action: updateAction, className: "orion-admin-form", children: [
6557
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("input", { name: "id", type: "hidden", value: id }),
6558
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("label", { children: [
6471
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("form", { action: updateAction, className: "orion-admin-form", children: [
6472
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("input", { name: "id", type: "hidden", value: id }),
6473
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("label", { children: [
6559
6474
  "Alt text",
6560
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("input", { defaultValue: alt || "", name: "alt", required: true, type: "text" })
6475
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("input", { defaultValue: alt || "", name: "alt", required: true, type: "text" })
6561
6476
  ] }),
6562
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { type: "submit", children: "Save" })
6477
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("button", { type: "submit", children: "Save" })
6563
6478
  ] }),
6564
- confirmDelete ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "orion-admin-form", style: { borderColor: "#b42318" }, children: [
6565
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { style: { fontWeight: 700, margin: 0 }, children: "Are you sure you want to delete this asset?" }),
6566
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { style: { color: "var(--orion-admin-muted)", fontSize: "0.9rem", margin: 0 }, children: "This action cannot be undone." }),
6567
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { display: "flex", gap: "0.5rem" }, children: [
6568
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("form", { action: deleteAction, style: { flex: 1 }, children: [
6569
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("input", { name: "id", type: "hidden", value: id }),
6570
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { style: { background: "#b42318", border: 0, borderRadius: 10, color: "#fff", cursor: "pointer", fontWeight: 800, padding: "0.55rem 0.8rem", width: "100%" }, type: "submit", children: "Yes, Delete" })
6479
+ confirmDelete ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "orion-admin-form", style: { borderColor: "#b42318" }, children: [
6480
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { style: { fontWeight: 700, margin: 0 }, children: "Are you sure you want to delete this asset?" }),
6481
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { style: { color: "var(--orion-admin-muted)", fontSize: "0.9rem", margin: 0 }, children: "This action cannot be undone." }),
6482
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { style: { display: "flex", gap: "0.5rem" }, children: [
6483
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("form", { action: deleteAction, style: { flex: 1 }, children: [
6484
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("input", { name: "id", type: "hidden", value: id }),
6485
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("button", { style: { background: "#b42318", border: 0, borderRadius: 10, color: "#fff", cursor: "pointer", fontWeight: 800, padding: "0.55rem 0.8rem", width: "100%" }, type: "submit", children: "Yes, Delete" })
6571
6486
  ] }),
6572
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6487
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
6573
6488
  "button",
6574
6489
  {
6575
6490
  onClick: () => setConfirmDelete(false),
@@ -6579,7 +6494,7 @@ function MediaDetailPanel({
6579
6494
  }
6580
6495
  )
6581
6496
  ] })
6582
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6497
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
6583
6498
  "button",
6584
6499
  {
6585
6500
  className: "orion-admin-action-button",
@@ -6594,8 +6509,8 @@ function MediaDetailPanel({
6594
6509
  }
6595
6510
 
6596
6511
  // src/admin/components/studio/AdminStudioMediaItemView.tsx
6597
- var import_jsx_runtime38 = require("react/jsx-runtime");
6598
- var getPropString12 = (props, key, fallback) => {
6512
+ var import_jsx_runtime37 = require("react/jsx-runtime");
6513
+ var getPropString11 = (props, key, fallback) => {
6599
6514
  if (!props || typeof props !== "object") return fallback;
6600
6515
  const direct = props[key];
6601
6516
  if (typeof direct === "string" && direct.length > 0) return direct;
@@ -6621,7 +6536,7 @@ var getMediaIDFromPathname = (pathname) => {
6621
6536
  return id ? decodeURIComponent(id) : null;
6622
6537
  };
6623
6538
  function AdminStudioMediaItemView(props) {
6624
- const mediaCollectionSlug = getPropString12(props, "mediaCollectionSlug", "media");
6539
+ const mediaCollectionSlug = getPropString11(props, "mediaCollectionSlug", "media");
6625
6540
  const adminBasePath = useAdminBasePath();
6626
6541
  const mediaPath = resolveAdminPath(adminBasePath, "/media");
6627
6542
  const mediaIDFromParams = (0, import_react29.useMemo)(() => getParam2(props.params, "id"), [props.params]);
@@ -6704,7 +6619,7 @@ function AdminStudioMediaItemView(props) {
6704
6619
  setError(deleteError instanceof Error ? deleteError.message : "Failed to delete media item.");
6705
6620
  }
6706
6621
  };
6707
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
6622
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
6708
6623
  AdminPage,
6709
6624
  {
6710
6625
  breadcrumbs: [
@@ -6715,10 +6630,10 @@ function AdminStudioMediaItemView(props) {
6715
6630
  description: "Update metadata or remove the selected asset.",
6716
6631
  title: "Media Asset",
6717
6632
  children: [
6718
- loading ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
6719
- error ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-error", children: error }) : null,
6720
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-success", children: savedMessage }) : null,
6721
- !loading && !error && doc && mediaID ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
6633
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
6634
+ error ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "orion-admin-error", children: error }) : null,
6635
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "orion-admin-success", children: savedMessage }) : null,
6636
+ !loading && !error && doc && mediaID ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6722
6637
  MediaDetailPanel,
6723
6638
  {
6724
6639
  alt: doc.alt,
@@ -6740,10 +6655,10 @@ function AdminStudioMediaItemView(props) {
6740
6655
  }
6741
6656
 
6742
6657
  // src/admin/components/studio/AdminStudioFormsView.tsx
6743
- var import_link3 = __toESM(require("next/link"));
6658
+ var import_link2 = __toESM(require("next/link"));
6744
6659
  var import_react30 = require("react");
6745
6660
  var import_ui11 = require("@payloadcms/ui");
6746
- var import_jsx_runtime39 = require("react/jsx-runtime");
6661
+ var import_jsx_runtime38 = require("react/jsx-runtime");
6747
6662
  var FORM_TONES = [
6748
6663
  {
6749
6664
  accent: "var(--orion-cms-tone-1, var(--orion-cms-accent, var(--orion-admin-accent)))",
@@ -6795,7 +6710,7 @@ var isEditor2 = (user) => {
6795
6710
  return typeof role === "string" && role === "editor";
6796
6711
  };
6797
6712
  var canReviewForms = (user) => isAdmin3(user) || isEditor2(user);
6798
- var getPropString13 = (props, key, fallback) => {
6713
+ var getPropString12 = (props, key, fallback) => {
6799
6714
  if (!props || typeof props !== "object") return fallback;
6800
6715
  const direct = props[key];
6801
6716
  if (typeof direct === "string" && direct.length > 0) return direct;
@@ -6955,19 +6870,19 @@ var loadCollection = async (slug, params) => {
6955
6870
  const payload = await response.json();
6956
6871
  return Array.isArray(payload.docs) ? payload.docs : [];
6957
6872
  };
6958
- var renderEmptyMessage = (message) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-empty-state", children: [
6959
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "No responses yet" }),
6960
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: message })
6873
+ var renderEmptyMessage = (message) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-empty-state", children: [
6874
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: "No responses yet" }),
6875
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: message })
6961
6876
  ] });
6962
6877
  function AdminStudioFormsView(props) {
6963
6878
  const { user } = (0, import_ui11.useAuth)();
6964
- const formsCollectionSlug = getPropString13(props, "formsCollectionSlug", "forms");
6965
- const formSubmissionsCollectionSlug = getPropString13(
6879
+ const formsCollectionSlug = getPropString12(props, "formsCollectionSlug", "forms");
6880
+ const formSubmissionsCollectionSlug = getPropString12(
6966
6881
  props,
6967
6882
  "formSubmissionsCollectionSlug",
6968
6883
  "form-submissions"
6969
6884
  );
6970
- const formUploadsCollectionSlug = getPropString13(props, "formUploadsCollectionSlug", "form-uploads");
6885
+ const formUploadsCollectionSlug = getPropString12(props, "formUploadsCollectionSlug", "form-uploads");
6971
6886
  const adminBasePath = useAdminBasePath();
6972
6887
  const rawFormsPath = resolveAdminPath(adminBasePath, `/collections/${formsCollectionSlug}`);
6973
6888
  const rawSubmissionsPath = resolveAdminPath(
@@ -7043,7 +6958,7 @@ function AdminStudioFormsView(props) {
7043
6958
  [forms, submissionsByForm]
7044
6959
  );
7045
6960
  if (!canReviewForms(user)) {
7046
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
6961
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7047
6962
  AdminPage,
7048
6963
  {
7049
6964
  breadcrumbs: [
@@ -7052,14 +6967,14 @@ function AdminStudioFormsView(props) {
7052
6967
  ],
7053
6968
  description: "You do not have access to this section.",
7054
6969
  title: "Forms",
7055
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-card", children: [
7056
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "Access denied" }),
7057
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: "This section is restricted to editor and administrator accounts." })
6970
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-card", children: [
6971
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: "Access denied" }),
6972
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: "This section is restricted to editor and administrator accounts." })
7058
6973
  ] })
7059
6974
  }
7060
6975
  ) });
7061
6976
  }
7062
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
6977
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
7063
6978
  AdminPage,
7064
6979
  {
7065
6980
  breadcrumbs: [
@@ -7069,30 +6984,30 @@ function AdminStudioFormsView(props) {
7069
6984
  description: "Review live forms, recent responses, and uploaded files.",
7070
6985
  title: "Forms",
7071
6986
  children: [
7072
- loading ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
7073
- error ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-error", children: error }) : null,
7074
- !loading && !error ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-forms-dashboard", children: [
7075
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-forms-summary-grid", children: [
7076
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-overview-stat", children: [
7077
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-overview-stat-label", children: "Configured forms" }),
7078
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: forms.length }),
7079
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { children: "Published or draft forms currently available inside the CMS." })
6987
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
6988
+ error ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-error", children: error }) : null,
6989
+ !loading && !error ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-forms-dashboard", children: [
6990
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-forms-summary-grid", children: [
6991
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-overview-stat", children: [
6992
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-overview-stat-label", children: "Configured forms" }),
6993
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: forms.length }),
6994
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { children: "Published or draft forms currently available inside the CMS." })
7080
6995
  ] }),
7081
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-overview-stat", children: [
7082
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-overview-stat-label", children: "Recent submissions" }),
7083
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: submissions.length }),
7084
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { children: "Latest 200 responses collected across every form." })
6996
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-overview-stat", children: [
6997
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-overview-stat-label", children: "Recent submissions" }),
6998
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: submissions.length }),
6999
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { children: "Latest 200 responses collected across every form." })
7085
7000
  ] }),
7086
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-overview-stat", children: [
7087
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-overview-stat-label", children: "Most active form" }),
7088
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: busiestForm && busiestForm.count > 0 ? busiestForm.title : "No activity yet" }),
7089
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { children: busiestForm && busiestForm.count > 0 ? `${busiestForm.count} response${busiestForm.count === 1 ? "" : "s"} in this view.` : "Submissions will surface here once a form starts receiving traffic." })
7001
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-overview-stat", children: [
7002
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-overview-stat-label", children: "Most active form" }),
7003
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: busiestForm && busiestForm.count > 0 ? busiestForm.title : "No activity yet" }),
7004
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { children: busiestForm && busiestForm.count > 0 ? `${busiestForm.count} response${busiestForm.count === 1 ? "" : "s"} in this view.` : "Submissions will surface here once a form starts receiving traffic." })
7090
7005
  ] })
7091
7006
  ] }),
7092
- forms.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-card", children: [
7093
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "No forms found" }),
7094
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: "Create a form in Payload to start collecting responses." })
7095
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-forms-board-list", children: forms.map((form) => {
7007
+ forms.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-card", children: [
7008
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: "No forms found" }),
7009
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: "Create a form in Payload to start collecting responses." })
7010
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-forms-board-list", children: forms.map((form) => {
7096
7011
  const id = typeof form.id === "string" || typeof form.id === "number" ? String(form.id) : "";
7097
7012
  if (!id) return null;
7098
7013
  const title = typeof form.title === "string" && form.title.trim().length > 0 ? form.title : "Untitled Form";
@@ -7107,31 +7022,31 @@ function AdminStudioFormsView(props) {
7107
7022
  const updatedMeta = form.updatedAt ? `Updated ${formatDate(form.updatedAt)}` : "Update time unavailable";
7108
7023
  const toneStyle = getFormToneStyle(slug, title || id);
7109
7024
  const isResponsePanelScrollable = formSubmissions.length > RESPONSE_SCROLL_THRESHOLD;
7110
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("section", { className: "orion-admin-form-board", style: toneStyle, children: [
7111
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-header", children: [
7112
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-heading", children: [
7113
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-kicker-row", children: [
7114
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-board-kicker", children: slug || "No slug set" }),
7115
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-board-meta", children: updatedMeta })
7025
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("section", { className: "orion-admin-form-board", style: toneStyle, children: [
7026
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-header", children: [
7027
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-heading", children: [
7028
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-kicker-row", children: [
7029
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-board-kicker", children: slug || "No slug set" }),
7030
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-board-meta", children: updatedMeta })
7116
7031
  ] }),
7117
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-title-row", children: [
7118
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-form-board-mark", children: getInitials2(title, slug) }),
7119
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-copy", children: [
7120
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h2", { className: "orion-admin-form-board-title", children: title }),
7121
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "orion-admin-form-board-subtitle", children: latestResponse ? `Latest response ${latestResponseLabel}` : "Awaiting the first submission" })
7032
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-title-row", children: [
7033
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-form-board-mark", children: getInitials2(title, slug) }),
7034
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-copy", children: [
7035
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h2", { className: "orion-admin-form-board-title", children: title }),
7036
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "orion-admin-form-board-subtitle", children: latestResponse ? `Latest response ${latestResponseLabel}` : "Awaiting the first submission" })
7122
7037
  ] })
7123
7038
  ] })
7124
7039
  ] }),
7125
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-actions", children: [
7126
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-count", children: [
7127
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-board-count-value", children: formSubmissions.length }),
7128
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "orion-admin-form-board-count-label", children: [
7040
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-actions", children: [
7041
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-count", children: [
7042
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-board-count-value", children: formSubmissions.length }),
7043
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "orion-admin-form-board-count-label", children: [
7129
7044
  "response",
7130
7045
  formSubmissions.length === 1 ? "" : "s"
7131
7046
  ] })
7132
7047
  ] }),
7133
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7134
- import_link3.default,
7048
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7049
+ import_link2.default,
7135
7050
  {
7136
7051
  className: "orion-admin-action-button orion-admin-action-button--soft",
7137
7052
  href: `${rawFormsPath}/${id}`,
@@ -7140,35 +7055,35 @@ function AdminStudioFormsView(props) {
7140
7055
  )
7141
7056
  ] })
7142
7057
  ] }),
7143
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-metrics", children: [
7144
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-form-metric", children: [
7145
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-metric-label", children: "Workflow steps" }),
7146
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { className: "orion-admin-form-metric-value", children: stepCount })
7058
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-metrics", children: [
7059
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-form-metric", children: [
7060
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-metric-label", children: "Workflow steps" }),
7061
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { className: "orion-admin-form-metric-value", children: stepCount })
7147
7062
  ] }),
7148
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-form-metric", children: [
7149
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-metric-label", children: "Fields" }),
7150
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { className: "orion-admin-form-metric-value", children: fieldCount })
7063
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-form-metric", children: [
7064
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-metric-label", children: "Fields" }),
7065
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { className: "orion-admin-form-metric-value", children: fieldCount })
7151
7066
  ] }),
7152
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-form-metric", children: [
7153
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-metric-label", children: "Submit button" }),
7154
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { className: "orion-admin-form-metric-value is-copy", children: submitLabel })
7067
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-form-metric", children: [
7068
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-metric-label", children: "Submit button" }),
7069
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { className: "orion-admin-form-metric-value is-copy", children: submitLabel })
7155
7070
  ] }),
7156
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-form-metric", children: [
7157
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-metric-label", children: "Latest response" }),
7158
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { className: "orion-admin-form-metric-value is-copy", children: latestResponseLabel })
7071
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-form-metric", children: [
7072
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-metric-label", children: "Latest response" }),
7073
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { className: "orion-admin-form-metric-value is-copy", children: latestResponseLabel })
7159
7074
  ] })
7160
7075
  ] }),
7161
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-response-panel", children: [
7162
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-response-panel-header", children: [
7163
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { children: [
7164
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-section-label", children: "Response stream" }),
7165
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: formSubmissions.length > 0 ? `${formSubmissions.length} recent submission${formSubmissions.length === 1 ? "" : "s"}` : "No responses yet" })
7076
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-response-panel", children: [
7077
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-response-panel-header", children: [
7078
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { children: [
7079
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-section-label", children: "Response stream" }),
7080
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: formSubmissions.length > 0 ? `${formSubmissions.length} recent submission${formSubmissions.length === 1 ? "" : "s"}` : "No responses yet" })
7166
7081
  ] }),
7167
- isResponsePanelScrollable ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-panel-note", children: "Latest 3 visible. Scroll for older responses." }) : formSubmissions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-panel-note", children: "Showing all recent activity" }) : null
7082
+ isResponsePanelScrollable ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-panel-note", children: "Latest 3 visible. Scroll for older responses." }) : formSubmissions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-panel-note", children: "Showing all recent activity" }) : null
7168
7083
  ] }),
7169
7084
  formSubmissions.length === 0 ? renderEmptyMessage(
7170
7085
  "This form will start filling this lane as soon as the first submission arrives."
7171
- ) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7086
+ ) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7172
7087
  "div",
7173
7088
  {
7174
7089
  className: [
@@ -7192,33 +7107,33 @@ function AdminStudioFormsView(props) {
7192
7107
  );
7193
7108
  const visibleUploads = uploads.slice(0, 2);
7194
7109
  const hiddenUploadCount = uploads.length - visibleUploads.length;
7195
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
7110
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
7196
7111
  "article",
7197
7112
  {
7198
7113
  className: "orion-admin-response-card",
7199
7114
  children: [
7200
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-response-card-main", children: [
7201
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-response-card-top", children: [
7202
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-response-badge", children: getInitials2(identity.name, identity.email, title) }),
7203
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-response-heading", children: [
7204
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: primaryIdentity }),
7205
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-response-secondary", children: secondaryIdentity })
7115
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-response-card-main", children: [
7116
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-response-card-top", children: [
7117
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-response-badge", children: getInitials2(identity.name, identity.email, title) }),
7118
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-response-heading", children: [
7119
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: primaryIdentity }),
7120
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-response-secondary", children: secondaryIdentity })
7206
7121
  ] }),
7207
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-response-date", children: formatDate(submission.submittedAt) })
7122
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-response-date", children: formatDate(submission.submittedAt) })
7208
7123
  ] }),
7209
- previewFields.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-response-chip-row", children: previewFields.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
7124
+ previewFields.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-response-chip-row", children: previewFields.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
7210
7125
  "div",
7211
7126
  {
7212
7127
  className: "orion-admin-response-chip",
7213
7128
  children: [
7214
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-response-chip-label", children: field.label }),
7215
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-response-chip-value", children: field.value })
7129
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-response-chip-label", children: field.label }),
7130
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-response-chip-value", children: field.value })
7216
7131
  ]
7217
7132
  },
7218
7133
  `${submissionID}-${field.label}-${index}`
7219
- )) }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-response-empty", children: "No preview fields are available for this submission." }),
7220
- uploads.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-response-upload-row", children: [
7221
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-upload-label", children: "Uploads" }),
7134
+ )) }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-response-empty", children: "No preview fields are available for this submission." }),
7135
+ uploads.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-response-upload-row", children: [
7136
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-upload-label", children: "Uploads" }),
7222
7137
  visibleUploads.map((upload) => {
7223
7138
  const uploadID = typeof upload.id === "string" || typeof upload.id === "number" ? String(upload.id) : "";
7224
7139
  if (!uploadID) return null;
@@ -7232,8 +7147,8 @@ function AdminStudioFormsView(props) {
7232
7147
  ),
7233
7148
  38
7234
7149
  );
7235
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7236
- import_link3.default,
7150
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7151
+ import_link2.default,
7237
7152
  {
7238
7153
  className: "orion-admin-upload-chip",
7239
7154
  href: `${rawUploadsPath}/${uploadID}`,
@@ -7242,15 +7157,15 @@ function AdminStudioFormsView(props) {
7242
7157
  uploadID
7243
7158
  );
7244
7159
  }),
7245
- hiddenUploadCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "orion-admin-upload-chip is-passive", children: [
7160
+ hiddenUploadCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "orion-admin-upload-chip is-passive", children: [
7246
7161
  "+",
7247
7162
  hiddenUploadCount,
7248
7163
  " more"
7249
7164
  ] }) : null
7250
7165
  ] }) : null
7251
7166
  ] }),
7252
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7253
- import_link3.default,
7167
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7168
+ import_link2.default,
7254
7169
  {
7255
7170
  className: "orion-admin-action-button orion-admin-action-button--ghost",
7256
7171
  href: `${rawSubmissionsPath}/${submissionID}`,
@@ -7276,7 +7191,7 @@ function AdminStudioFormsView(props) {
7276
7191
  // src/admin/components/studio/AdminStudioToolsView.tsx
7277
7192
  var import_react31 = require("react");
7278
7193
  var import_ui12 = require("@payloadcms/ui");
7279
- var import_jsx_runtime40 = require("react/jsx-runtime");
7194
+ var import_jsx_runtime39 = require("react/jsx-runtime");
7280
7195
  var userRoles = ["admin", "client", "editor"];
7281
7196
  var isAdmin4 = (user) => {
7282
7197
  if (!user || typeof user !== "object") return false;
@@ -7294,7 +7209,7 @@ function AdminStudioToolsView(props) {
7294
7209
  const [createSubmitting, setCreateSubmitting] = (0, import_react31.useState)(false);
7295
7210
  const [updatingUserID, setUpdatingUserID] = (0, import_react31.useState)(null);
7296
7211
  if (!isAdmin4(user)) {
7297
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7212
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7298
7213
  AdminPage,
7299
7214
  {
7300
7215
  breadcrumbs: [
@@ -7303,9 +7218,9 @@ function AdminStudioToolsView(props) {
7303
7218
  ],
7304
7219
  description: "You do not have access to this section.",
7305
7220
  title: "Admin Tools",
7306
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "orion-admin-card", children: [
7307
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("strong", { children: "Access denied" }),
7308
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: "This section is restricted to administrator accounts." })
7221
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-card", children: [
7222
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "Access denied" }),
7223
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: "This section is restricted to administrator accounts." })
7309
7224
  ] })
7310
7225
  }
7311
7226
  ) });
@@ -7405,7 +7320,7 @@ function AdminStudioToolsView(props) {
7405
7320
  setUpdatingUserID(null);
7406
7321
  }
7407
7322
  };
7408
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
7323
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
7409
7324
  AdminPage,
7410
7325
  {
7411
7326
  breadcrumbs: [
@@ -7415,53 +7330,53 @@ function AdminStudioToolsView(props) {
7415
7330
  description: "Manage users and fallback links to Payload native admin.",
7416
7331
  title: "Admin Tools",
7417
7332
  children: [
7418
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "orion-admin-inline-actions", style: { marginBottom: "1rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("a", { className: "orion-admin-action-button", href: "/admin-core", target: "_blank", children: "Open Payload Core Admin" }) }),
7419
- error ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "orion-admin-error", style: { marginBottom: "1rem" }, children: error }) : null,
7420
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "orion-admin-success", style: { marginBottom: "1rem" }, children: savedMessage }) : null,
7421
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("form", { className: "orion-admin-form", onSubmit: createUser, style: { marginBottom: "1rem" }, children: [
7422
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("strong", { children: "Create User" }),
7423
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("label", { children: [
7333
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-inline-actions", style: { marginBottom: "1rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("a", { className: "orion-admin-action-button", href: "/admin-core", target: "_blank", children: "Open Payload Core Admin" }) }),
7334
+ error ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-error", style: { marginBottom: "1rem" }, children: error }) : null,
7335
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-success", style: { marginBottom: "1rem" }, children: savedMessage }) : null,
7336
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("form", { className: "orion-admin-form", onSubmit: createUser, style: { marginBottom: "1rem" }, children: [
7337
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "Create User" }),
7338
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { children: [
7424
7339
  "Email",
7425
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("input", { name: "email", required: true, type: "email" })
7340
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("input", { name: "email", required: true, type: "email" })
7426
7341
  ] }),
7427
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("label", { children: [
7342
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { children: [
7428
7343
  "Full Name",
7429
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("input", { name: "fullName", type: "text" })
7344
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("input", { name: "fullName", type: "text" })
7430
7345
  ] }),
7431
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("label", { children: [
7346
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { children: [
7432
7347
  "Password",
7433
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("input", { name: "password", required: true, type: "password" })
7348
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("input", { name: "password", required: true, type: "password" })
7434
7349
  ] }),
7435
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("label", { children: [
7350
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { children: [
7436
7351
  "Role",
7437
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("select", { defaultValue: "editor", name: "role", children: [
7438
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value: "admin", children: "admin" }),
7439
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value: "editor", children: "editor" }),
7440
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value: "client", children: "client" })
7352
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("select", { defaultValue: "editor", name: "role", children: [
7353
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: "admin", children: "admin" }),
7354
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: "editor", children: "editor" }),
7355
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: "client", children: "client" })
7441
7356
  ] })
7442
7357
  ] }),
7443
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("button", { disabled: createSubmitting, type: "submit", children: createSubmitting ? "Creating..." : "Create User" })
7358
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("button", { disabled: createSubmitting, type: "submit", children: createSubmitting ? "Creating..." : "Create User" })
7444
7359
  ] }),
7445
- loading ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
7446
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "orion-admin-list", children: docs.map((doc) => {
7360
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
7361
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-list", children: docs.map((doc) => {
7447
7362
  const id = typeof doc.id === "string" || typeof doc.id === "number" ? String(doc.id) : "";
7448
7363
  if (!id) return null;
7449
7364
  const email = typeof doc.email === "string" ? doc.email : `user-${id}`;
7450
7365
  const fullName = typeof doc.fullName === "string" ? doc.fullName : "";
7451
7366
  const currentRole = typeof doc.role === "string" ? normalizeRole(doc.role) : "editor";
7452
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "orion-admin-list-item", children: [
7453
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
7454
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("strong", { children: email }),
7455
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "orion-admin-list-meta", children: fullName || "No full name set" })
7367
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-list-item", children: [
7368
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { children: [
7369
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: email }),
7370
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-list-meta", children: fullName || "No full name set" })
7456
7371
  ] }),
7457
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("form", { className: "orion-admin-inline-actions", onSubmit: updateUserRole, children: [
7458
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("input", { name: "id", type: "hidden", value: id }),
7459
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("select", { defaultValue: currentRole, name: "role", children: [
7460
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value: "admin", children: "admin" }),
7461
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value: "editor", children: "editor" }),
7462
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value: "client", children: "client" })
7372
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("form", { className: "orion-admin-inline-actions", onSubmit: updateUserRole, children: [
7373
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("input", { name: "id", type: "hidden", value: id }),
7374
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("select", { defaultValue: currentRole, name: "role", children: [
7375
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: "admin", children: "admin" }),
7376
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: "editor", children: "editor" }),
7377
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: "client", children: "client" })
7463
7378
  ] }),
7464
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("button", { disabled: updatingUserID === id, type: "submit", children: updatingUserID === id ? "Updating..." : "Update" })
7379
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("button", { disabled: updatingUserID === id, type: "submit", children: updatingUserID === id ? "Updating..." : "Update" })
7465
7380
  ] })
7466
7381
  ] }, id);
7467
7382
  }) })
@@ -7472,14 +7387,14 @@ function AdminStudioToolsView(props) {
7472
7387
 
7473
7388
  // src/admin/components/studio/OpenInStudioMenuItem.tsx
7474
7389
  var import_ui13 = require("@payloadcms/ui");
7475
- var import_jsx_runtime41 = require("react/jsx-runtime");
7390
+ var import_jsx_runtime40 = require("react/jsx-runtime");
7476
7391
  function OpenInStudioMenuItem({ pagesPathBase = "/pages" }) {
7477
7392
  const documentInfo = (0, import_ui13.useDocumentInfo)();
7478
7393
  const id = documentInfo?.id;
7479
7394
  if (!id) {
7480
7395
  return null;
7481
7396
  }
7482
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7397
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7483
7398
  "a",
7484
7399
  {
7485
7400
  href: `${pagesPathBase}/${id}`,
@@ -7500,7 +7415,7 @@ function OpenInStudioMenuItem({ pagesPathBase = "/pages" }) {
7500
7415
  // src/admin/components/studio/PageEditRedirectToStudio.tsx
7501
7416
  var import_react32 = require("react");
7502
7417
  var import_ui14 = require("@payloadcms/ui");
7503
- var import_jsx_runtime42 = require("react/jsx-runtime");
7418
+ var import_jsx_runtime41 = require("react/jsx-runtime");
7504
7419
  function PageEditRedirectToStudio({ pagesPathBase = "/pages" }) {
7505
7420
  const documentInfo = (0, import_ui14.useDocumentInfo)();
7506
7421
  const id = documentInfo?.id;
@@ -7510,7 +7425,7 @@ function PageEditRedirectToStudio({ pagesPathBase = "/pages" }) {
7510
7425
  }
7511
7426
  window.location.replace(`${pagesPathBase}/${id}`);
7512
7427
  }, [id, pagesPathBase]);
7513
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
7428
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
7514
7429
  "div",
7515
7430
  {
7516
7431
  style: {
@@ -7522,9 +7437,9 @@ function PageEditRedirectToStudio({ pagesPathBase = "/pages" }) {
7522
7437
  minHeight: "50vh"
7523
7438
  },
7524
7439
  children: [
7525
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h2", { style: { margin: 0 }, children: "Opening Editor..." }),
7526
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { style: { color: "var(--theme-elevation-600)", margin: 0 }, children: "Redirecting to the custom page editor." }),
7527
- id ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("a", { href: `${pagesPathBase}/${id}`, children: "Continue to Editor" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("a", { href: pagesPathBase, children: "Open Pages" })
7440
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h2", { style: { margin: 0 }, children: "Opening Editor..." }),
7441
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { style: { color: "var(--theme-elevation-600)", margin: 0 }, children: "Redirecting to the custom page editor." }),
7442
+ id ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("a", { href: `${pagesPathBase}/${id}`, children: "Continue to Editor" }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("a", { href: pagesPathBase, children: "Open Pages" })
7528
7443
  ]
7529
7444
  }
7530
7445
  );
@@ -7533,7 +7448,7 @@ function PageEditRedirectToStudio({ pagesPathBase = "/pages" }) {
7533
7448
  // src/admin/components/studio/StudioBackBreadcrumb.tsx
7534
7449
  var import_react33 = require("react");
7535
7450
  var import_ui15 = require("@payloadcms/ui");
7536
- var import_jsx_runtime43 = require("react/jsx-runtime");
7451
+ var import_jsx_runtime42 = require("react/jsx-runtime");
7537
7452
  var toTitle = (slug) => slug.split("-").filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
7538
7453
  var buildNav = (pathname, adminBasePath) => {
7539
7454
  if (pathname.includes("/globals/")) {
@@ -7587,13 +7502,13 @@ function StudioBackBreadcrumb() {
7587
7502
  }, []);
7588
7503
  const nav = buildNav(pathname, adminBasePath);
7589
7504
  if (!nav) return null;
7590
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_ui15.SetStepNav, { nav });
7505
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_ui15.SetStepNav, { nav });
7591
7506
  }
7592
7507
 
7593
7508
  // src/admin/components/studio/StudioContactFormRedirect.tsx
7594
7509
  var import_react34 = require("react");
7595
- var import_jsx_runtime44 = require("react/jsx-runtime");
7596
- var getPropString14 = (props, key, fallback) => {
7510
+ var import_jsx_runtime43 = require("react/jsx-runtime");
7511
+ var getPropString13 = (props, key, fallback) => {
7597
7512
  if (!props || typeof props !== "object") return fallback;
7598
7513
  const direct = props[key];
7599
7514
  if (typeof direct === "string" && direct.length > 0) return direct;
@@ -7606,13 +7521,13 @@ var getPropString14 = (props, key, fallback) => {
7606
7521
  };
7607
7522
  function StudioContactFormRedirect(props) {
7608
7523
  const adminBasePath = useAdminBasePath();
7609
- const studioContactFormPath = getPropString14(props, "studioContactFormPath", "/contact-form");
7524
+ const studioContactFormPath = getPropString13(props, "studioContactFormPath", "/contact-form");
7610
7525
  const targetPath = resolveAdminPath(adminBasePath, studioContactFormPath);
7611
7526
  (0, import_react34.useEffect)(() => {
7612
7527
  if (window.location.pathname === targetPath) return;
7613
7528
  window.location.replace(targetPath);
7614
7529
  }, [targetPath]);
7615
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
7530
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
7616
7531
  "div",
7617
7532
  {
7618
7533
  style: {
@@ -7625,8 +7540,8 @@ function StudioContactFormRedirect(props) {
7625
7540
  minHeight: "40vh"
7626
7541
  },
7627
7542
  children: [
7628
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("h2", { style: { margin: 0 }, children: "Opening Contact Form Editor..." }),
7629
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("a", { href: targetPath, children: "Continue" })
7543
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h2", { style: { margin: 0 }, children: "Opening Contact Form Editor..." }),
7544
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("a", { href: targetPath, children: "Continue" })
7630
7545
  ]
7631
7546
  }
7632
7547
  );
@@ -7636,7 +7551,6 @@ function StudioContactFormRedirect(props) {
7636
7551
  AdminLoginIntro,
7637
7552
  AdminLoginPasswordToggle,
7638
7553
  AdminStudioContactFormView,
7639
- AdminStudioDashboard,
7640
7554
  AdminStudioFooterGlobalView,
7641
7555
  AdminStudioFormsView,
7642
7556
  AdminStudioGlobalsView,