@emdash-cms/admin 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/{LocaleDirectionProvider-fOl7kU93.js → LocaleDirectionProvider-CK7aJ2Lb.js} +20 -20
  2. package/dist/{LocaleDirectionProvider-fOl7kU93.js.map → LocaleDirectionProvider-CK7aJ2Lb.js.map} +1 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +125 -191
  5. package/dist/index.js.map +1 -1
  6. package/dist/locales/ar/messages.mjs +1 -1
  7. package/dist/locales/de/messages.mjs +1 -1
  8. package/dist/locales/en/messages.mjs +1 -1
  9. package/dist/locales/en-GB/messages.mjs +1 -1
  10. package/dist/locales/es-419/messages.mjs +1 -1
  11. package/dist/locales/es-ES/messages.mjs +1 -1
  12. package/dist/locales/eu/messages.mjs +1 -1
  13. package/dist/locales/fa/messages.mjs +1 -1
  14. package/dist/locales/fr/messages.mjs +1 -1
  15. package/dist/locales/id/messages.mjs +1 -1
  16. package/dist/locales/index.js +1 -1
  17. package/dist/locales/ja/messages.mjs +1 -1
  18. package/dist/locales/ko/messages.mjs +1 -1
  19. package/dist/locales/nb/messages.mjs +1 -1
  20. package/dist/locales/pl/messages.mjs +1 -1
  21. package/dist/locales/pseudo/messages.mjs +1 -1
  22. package/dist/locales/pt-BR/messages.mjs +1 -1
  23. package/dist/locales/th/messages.mjs +1 -1
  24. package/dist/locales/zh-CN/messages.mjs +1 -1
  25. package/dist/locales/zh-TW/messages.mjs +1 -1
  26. package/dist/messages-8fTMJtWA.js +6 -0
  27. package/dist/messages-8fTMJtWA.js.map +1 -0
  28. package/dist/messages-B43-WzBC.js +6 -0
  29. package/dist/messages-B43-WzBC.js.map +1 -0
  30. package/dist/messages-BT9Q9atq.js +6 -0
  31. package/dist/messages-BT9Q9atq.js.map +1 -0
  32. package/dist/messages-BTDhbVyJ.js +6 -0
  33. package/dist/messages-BTDhbVyJ.js.map +1 -0
  34. package/dist/messages-BXAjXbUr.js +6 -0
  35. package/dist/messages-BXAjXbUr.js.map +1 -0
  36. package/dist/messages-BdciNNnG.js +6 -0
  37. package/dist/messages-BdciNNnG.js.map +1 -0
  38. package/dist/messages-Bh2bSu3x.js +6 -0
  39. package/dist/messages-Bh2bSu3x.js.map +1 -0
  40. package/dist/messages-CIm8G_NT.js +6 -0
  41. package/dist/messages-CIm8G_NT.js.map +1 -0
  42. package/dist/messages-Cl5m9q7M.js +6 -0
  43. package/dist/messages-Cl5m9q7M.js.map +1 -0
  44. package/dist/messages-Crei9McK.js +6 -0
  45. package/dist/messages-Crei9McK.js.map +1 -0
  46. package/dist/messages-D6wHPGil.js +6 -0
  47. package/dist/messages-D6wHPGil.js.map +1 -0
  48. package/dist/messages-DjQX9PJY.js +6 -0
  49. package/dist/messages-DjQX9PJY.js.map +1 -0
  50. package/dist/messages-DlzFD1ts.js +6 -0
  51. package/dist/messages-DlzFD1ts.js.map +1 -0
  52. package/dist/messages-DxYrdNN-.js +6 -0
  53. package/dist/messages-DxYrdNN-.js.map +1 -0
  54. package/dist/messages-FkTGnwV-.js +6 -0
  55. package/dist/messages-FkTGnwV-.js.map +1 -0
  56. package/dist/messages-cWzWbWxk.js +6 -0
  57. package/dist/messages-cWzWbWxk.js.map +1 -0
  58. package/dist/messages-n6HQSjDA.js +6 -0
  59. package/dist/messages-n6HQSjDA.js.map +1 -0
  60. package/dist/messages-otHOIv0j.js +6 -0
  61. package/dist/messages-otHOIv0j.js.map +1 -0
  62. package/dist/messages-umZ9RCq_.js +6 -0
  63. package/dist/messages-umZ9RCq_.js.map +1 -0
  64. package/dist/styles.css +1 -1
  65. package/package.json +5 -5
  66. package/dist/messages-B91HIkiy.js +0 -6
  67. package/dist/messages-B91HIkiy.js.map +0 -1
  68. package/dist/messages-BOEd12l5.js +0 -6
  69. package/dist/messages-BOEd12l5.js.map +0 -1
  70. package/dist/messages-Bh7--c7H.js +0 -6
  71. package/dist/messages-Bh7--c7H.js.map +0 -1
  72. package/dist/messages-C9JCAM6J.js +0 -6
  73. package/dist/messages-C9JCAM6J.js.map +0 -1
  74. package/dist/messages-CKojFmcO.js +0 -6
  75. package/dist/messages-CKojFmcO.js.map +0 -1
  76. package/dist/messages-CTN7W8X6.js +0 -6
  77. package/dist/messages-CTN7W8X6.js.map +0 -1
  78. package/dist/messages-CTcbcL86.js +0 -6
  79. package/dist/messages-CTcbcL86.js.map +0 -1
  80. package/dist/messages-C_Y-snWK.js +0 -6
  81. package/dist/messages-C_Y-snWK.js.map +0 -1
  82. package/dist/messages-D-1bL7sJ.js +0 -6
  83. package/dist/messages-D-1bL7sJ.js.map +0 -1
  84. package/dist/messages-D6msZey1.js +0 -6
  85. package/dist/messages-D6msZey1.js.map +0 -1
  86. package/dist/messages-DAQOc58j.js +0 -6
  87. package/dist/messages-DAQOc58j.js.map +0 -1
  88. package/dist/messages-DHstaf6F.js +0 -6
  89. package/dist/messages-DHstaf6F.js.map +0 -1
  90. package/dist/messages-DJzldcRt.js +0 -6
  91. package/dist/messages-DJzldcRt.js.map +0 -1
  92. package/dist/messages-DMTA7nbc.js +0 -6
  93. package/dist/messages-DMTA7nbc.js.map +0 -1
  94. package/dist/messages-DhNaz9ZQ.js +0 -6
  95. package/dist/messages-DhNaz9ZQ.js.map +0 -1
  96. package/dist/messages-Zn7imny3.js +0 -6
  97. package/dist/messages-Zn7imny3.js.map +0 -1
  98. package/dist/messages-bBjRhh9-.js +0 -6
  99. package/dist/messages-bBjRhh9-.js.map +0 -1
  100. package/dist/messages-iAFcsO4r.js +0 -6
  101. package/dist/messages-iAFcsO4r.js.map +0 -1
  102. package/dist/messages-l-vt5csn.js +0 -6
  103. package/dist/messages-l-vt5csn.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { c as fetchAuthMode, d as throwResponseError, i as fetchPlugins, l as fetchManifest, n as enablePlugin, o as API_BASE, r as fetchPlugin, s as apiFetch, t as disablePlugin, u as parseApiResponse } from "./plugins-G9Z9NQ7n.js";
2
- import { a as SUPPORTED_LOCALES, i as DEFAULT_LOCALE, l as resolveLocale, n as useLocale, o as SUPPORTED_LOCALE_CODES, t as LocaleDirectionProvider } from "./LocaleDirectionProvider-fOl7kU93.js";
2
+ import { a as SUPPORTED_LOCALES, i as DEFAULT_LOCALE, l as resolveLocale, n as useLocale, o as SUPPORTED_LOCALE_CODES, s as getLocaleDir, t as LocaleDirectionProvider } from "./LocaleDirectionProvider-CK7aJ2Lb.js";
3
3
  import "./locales/index.js";
4
- import { Autocomplete, Badge, Button, Checkbox, ClipboardText, CommandPalette, Dialog, Input, InputArea, Label, LinkButton, Loader, Popover, Select, Sidebar as KumoSidebar, Switch, Tabs, Toast, Toasty, Tooltip, buttonVariants, useSidebar } from "@cloudflare/kumo";
4
+ import { Autocomplete, Badge, Button, Checkbox, ClipboardText, CommandPalette, Dialog, Input, InputArea, Label, LinkButton, LinkProvider, Loader, Popover, Select, Sidebar as KumoSidebar, Switch, Tabs, Toast, Toasty, Tooltip, buttonVariants, useSidebar } from "@cloudflare/kumo";
5
5
  import { i18n } from "@lingui/core";
6
6
  import { I18nProvider, Trans, useLingui } from "@lingui/react";
7
7
  import { QueryClient, QueryClientProvider, keepPreviousData, useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
@@ -30267,41 +30267,37 @@ function resolveNavIcon(name) {
30267
30267
  return icon;
30268
30268
  }
30269
30269
  /**
30270
- * Navigation item rendered as a TanStack Router <Link> inside kumo's
30271
- * Sidebar.MenuItem. Styled to match kumo MenuButton appearance.
30272
- * This approach guarantees client-side navigation works correctly.
30270
+ * Navigation item rendered with Kumo's native Sidebar.MenuButton. Kumo's
30271
+ * LinkProvider maps the href to TanStack Router for client-side navigation.
30273
30272
  */
30274
30273
  function NavMenuLink({ item, isActive }) {
30275
30274
  const { state } = useSidebar();
30276
30275
  const Icon = item.icon;
30277
- const iconClassName = cn("emdash-nav-icon size-[18px] shrink-0 transition-colors duration-200", isActive ? "text-white" : "text-white/60 group-hover/menu-button:text-white/90");
30278
- const link = /* @__PURE__ */ jsxs(Link$1, {
30279
- to: item.to,
30280
- params: item.params,
30281
- "aria-current": isActive ? "page" : void 0,
30282
- "data-active": isActive || void 0,
30283
- "data-sidebar": "menu-button",
30284
- className: cn("emdash-nav-link group/menu-button flex w-full min-w-0 items-center gap-2.5 rounded-md no-underline outline-none cursor-pointer", "min-h-[36px] px-3 py-1.5 text-[13px]", "transition-all duration-200 ease-out", isActive ? "bg-kumo-brand text-white" : "text-white/70 hover:text-white hover:bg-white/8", "focus-visible:ring-2 focus-visible:ring-kumo-brand/50"),
30285
- children: [/* @__PURE__ */ jsx(React$1.Suspense, {
30286
- fallback: /* @__PURE__ */ jsx(PuzzlePiece, {
30287
- className: iconClassName,
30288
- "aria-hidden": "true"
30289
- }),
30290
- children: /* @__PURE__ */ jsx(Icon, {
30291
- className: iconClassName,
30292
- "aria-hidden": "true"
30293
- })
30294
- }), /* @__PURE__ */ jsxs("span", {
30295
- className: "emdash-nav-label flex flex-1 items-center min-w-0 text-start overflow-hidden",
30296
- children: [item.label, item.badge != null && item.badge > 0 && /* @__PURE__ */ jsx(KumoSidebar.MenuBadge, { children: item.badge })]
30297
- })]
30276
+ function IconComponent({ className }) {
30277
+ return /* @__PURE__ */ jsx(NavIcon, {
30278
+ icon: Icon,
30279
+ className
30280
+ });
30281
+ }
30282
+ return /* @__PURE__ */ jsxs(KumoSidebar.MenuButton, {
30283
+ href: resolveItemPath(item),
30284
+ active: isActive,
30285
+ tooltip: state === "collapsed" ? item.label : void 0,
30286
+ icon: IconComponent,
30287
+ children: [item.label, item.badge != null && item.badge > 0 && /* @__PURE__ */ jsx(KumoSidebar.MenuBadge, { children: item.badge })]
30288
+ });
30289
+ }
30290
+ function NavIcon({ icon: Icon, className }) {
30291
+ return /* @__PURE__ */ jsx(React$1.Suspense, {
30292
+ fallback: /* @__PURE__ */ jsx(PuzzlePiece, {
30293
+ className,
30294
+ "aria-hidden": "true"
30295
+ }),
30296
+ children: /* @__PURE__ */ jsx(Icon, {
30297
+ className,
30298
+ "aria-hidden": "true"
30299
+ })
30298
30300
  });
30299
- return /* @__PURE__ */ jsx(KumoSidebar.MenuItem, { children: state === "collapsed" ? /* @__PURE__ */ jsx(Tooltip, {
30300
- content: item.label,
30301
- side: "right",
30302
- asChild: true,
30303
- children: link
30304
- }) : link });
30305
30301
  }
30306
30302
  /** Resolves a nav item's route path by substituting $param placeholders. */
30307
30303
  function resolveItemPath(item) {
@@ -30425,6 +30421,14 @@ function SidebarNav({ manifest }) {
30425
30421
  icon: Database,
30426
30422
  minRole: ROLE_ADMIN$2
30427
30423
  },
30424
+ {
30425
+ ...BYLINE_SCHEMA_NAV_ITEM,
30426
+ label: _t({
30427
+ id: "EWaYRd",
30428
+ message: "Byline Schema"
30429
+ }),
30430
+ icon: FileText
30431
+ },
30428
30432
  {
30429
30433
  to: "/users",
30430
30434
  label: _t({
@@ -30517,103 +30521,7 @@ function SidebarNav({ manifest }) {
30517
30521
  }, `${item.to}-${index}`);
30518
30522
  });
30519
30523
  }
30520
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: `
30521
- /* Classic dark chrome — override kumo tokens within the sidebar */
30522
- .emdash-sidebar {
30523
- --color-kumo-base: #1d2327;
30524
- /* Kumo 2.4 paints the surface via bg-(--sidebar-bg) on an inner
30525
- container, resolved from the wrapper's light --color-kumo-base. */
30526
- --sidebar-bg: #1d2327;
30527
- --color-kumo-tint: rgba(255,255,255,0.1);
30528
- --color-kumo-line: rgba(255,255,255,0.08);
30529
- --color-kumo-brand: #2271b1;
30530
- --text-color-kumo-default: #fff;
30531
- --text-color-kumo-subtle: rgba(255,255,255,0.7);
30532
- --text-color-kumo-strong: #fff;
30533
- background-color: #1d2327 !important;
30534
- color: #fff !important;
30535
- border-color: rgba(255,255,255,0.08) !important;
30536
- }
30537
- /* Group labels — uppercase muted style */
30538
- .emdash-sidebar [data-sidebar="group-label"] {
30539
- color: rgba(255,255,255,0.45) !important;
30540
- font-size: 11px !important;
30541
- text-transform: uppercase;
30542
- letter-spacing: 0.06em;
30543
- font-weight: 600;
30544
- padding-left: 0.75rem;
30545
- padding-right: 0.75rem;
30546
- }
30547
- .emdash-sidebar [data-sidebar="group-label"] svg {
30548
- color: rgba(255,255,255,0.3);
30549
- }
30550
- .emdash-sidebar [data-sidebar="group-label"]:hover svg {
30551
- color: rgba(255,255,255,0.6);
30552
- }
30553
- /* Separators */
30554
- .emdash-sidebar [data-sidebar="separator"] {
30555
- border-color: rgba(255,255,255,0.06) !important;
30556
- margin: 0.5rem 0.75rem;
30557
- }
30558
- /* Header/footer borders */
30559
- .emdash-sidebar [data-sidebar="header"] {
30560
- border-bottom: 1px solid rgba(255,255,255,0.08);
30561
- }
30562
- .emdash-sidebar [data-sidebar="footer"] {
30563
- border-top: 1px solid rgba(255,255,255,0.08);
30564
- }
30565
-
30566
- /* Collapsed separators — thin centered line */
30567
- .emdash-sidebar[data-state="collapsed"] [data-sidebar="separator"] {
30568
- margin: 0.375rem 0.625rem;
30569
- }
30570
- /* Collapsed: tighten group spacing */
30571
- .emdash-sidebar[data-state="collapsed"] [data-sidebar="group"] {
30572
- gap: 0.125rem;
30573
- }
30574
- .emdash-sidebar[data-state="collapsed"] [data-sidebar="menu"] {
30575
- gap: 0.125rem;
30576
- }
30577
-
30578
- /* Collapsed: nav links — center icon, hide text */
30579
- .emdash-sidebar[data-state="collapsed"] .emdash-nav-link {
30580
- justify-content: center;
30581
- padding: 0.5rem 0;
30582
- gap: 0;
30583
- min-height: 36px;
30584
- }
30585
- .emdash-sidebar[data-state="collapsed"] .emdash-nav-label {
30586
- display: none !important;
30587
- }
30588
- /* Collapsed: brand link */
30589
- .emdash-sidebar[data-state="collapsed"] .emdash-brand-link {
30590
- justify-content: center;
30591
- padding-left: 0;
30592
- padding-right: 0;
30593
- }
30594
- .emdash-sidebar[data-state="collapsed"] .emdash-brand-text {
30595
- display: none !important;
30596
- }
30597
-
30598
- /* Mobile drawer slide animation from left (LTR) */
30599
- [data-starting-style]:has(> .emdash-sidebar[data-mobile="true"]),
30600
- [data-ending-style]:has(> .emdash-sidebar[data-mobile="true"]) {
30601
- transform: translateX(-100%);
30602
- }
30603
-
30604
- /* Mobile drawer slide animation from right (RTL) */
30605
- [dir="rtl"] [data-starting-style]:has(> .emdash-sidebar[data-mobile="true"]),
30606
- [dir="rtl"] [data-ending-style]:has(> .emdash-sidebar[data-mobile="true"]) {
30607
- transform: translateX(100%);
30608
- --tw-translate-x: 100%;
30609
- }
30610
-
30611
- /* RTL: Position drawer on right side */
30612
- [dir="rtl"] :has(> .emdash-sidebar[data-mobile="true"]) {
30613
- left: auto;
30614
- right: 0;
30615
- }
30616
- ` } }), /* @__PURE__ */ jsxs(KumoSidebar, {
30524
+ return /* @__PURE__ */ jsxs(KumoSidebar, {
30617
30525
  className: "emdash-sidebar",
30618
30526
  "aria-label": _t({
30619
30527
  id: "M0SYyg",
@@ -30622,63 +30530,51 @@ function SidebarNav({ manifest }) {
30622
30530
  children: [
30623
30531
  /* @__PURE__ */ jsx(KumoSidebar.Header, { children: /* @__PURE__ */ jsxs(Link$1, {
30624
30532
  to: "/",
30625
- className: "emdash-brand-link flex w-full min-w-0 items-center gap-2 px-3 py-1",
30533
+ className: "flex w-full min-w-0 items-center gap-2 px-3 py-1 group-data-[state=collapsed]/sidebar:justify-center group-data-[state=collapsed]/sidebar:px-0",
30626
30534
  children: [/* @__PURE__ */ jsx(BrandIcon, {
30627
30535
  logoUrl: manifest.admin?.logo,
30628
30536
  siteName: manifest.admin?.siteName,
30629
30537
  className: "size-5 shrink-0",
30630
30538
  "aria-hidden": "true"
30631
30539
  }), /* @__PURE__ */ jsx("span", {
30632
- className: "emdash-brand-text font-semibold truncate",
30540
+ className: "font-semibold truncate group-data-[state=collapsed]/sidebar:hidden",
30633
30541
  children: manifest.admin?.siteName || "EmDash"
30634
30542
  })]
30635
30543
  }) }),
30636
30544
  /* @__PURE__ */ jsxs(KumoSidebar.Content, { children: [
30637
- /* @__PURE__ */ jsx(KumoSidebar.Group, { children: /* @__PURE__ */ jsx(KumoSidebar.Menu, { children: /* @__PURE__ */ jsx(NavMenuLink, {
30638
- item: {
30639
- to: "/",
30640
- label: _t({
30641
- id: "7p5kLi",
30642
- message: "Dashboard"
30643
- }),
30644
- icon: SquaresFour
30645
- },
30646
- isActive: isItemActive("/", currentPath)
30647
- }) }) }),
30648
- /* @__PURE__ */ jsx(KumoSidebar.Separator, {}),
30649
- visibleContent.length > 1 && /* @__PURE__ */ jsxs(KumoSidebar.Group, { children: [/* @__PURE__ */ jsx(KumoSidebar.GroupLabel, {
30650
- className: "[&>span]:text-start [&_svg]:rtl:-scale-x-100 [&_svg]:rtl:-scale-y-100",
30651
- children: _t({
30652
- id: "4b3oEV",
30653
- message: "Content"
30654
- })
30655
- }), /* @__PURE__ */ jsx(KumoSidebar.Menu, { children: renderNavItems(visibleContent.filter((i) => i.to !== "/")) })] }),
30656
- /* @__PURE__ */ jsx(KumoSidebar.Separator, {}),
30657
- visibleManage.length > 0 && /* @__PURE__ */ jsxs(KumoSidebar.Group, { children: [/* @__PURE__ */ jsx(KumoSidebar.GroupLabel, {
30658
- className: "[&>span]:text-start [&_svg]:rtl:-scale-x-100 [&_svg]:rtl:-scale-y-100",
30659
- children: _t({
30660
- id: "wckWOP",
30661
- message: "Manage"
30662
- })
30663
- }), /* @__PURE__ */ jsx(KumoSidebar.Menu, { children: renderNavItems(visibleManage) })] }),
30664
- /* @__PURE__ */ jsx(KumoSidebar.Separator, {}),
30665
- visibleAdmin.length > 0 && /* @__PURE__ */ jsxs(KumoSidebar.Group, { children: [/* @__PURE__ */ jsx(KumoSidebar.GroupLabel, {
30666
- className: "[&>span]:text-start [&_svg]:rtl:-scale-x-100 [&_svg]:rtl:-scale-y-100",
30667
- children: _t({
30668
- id: "U3pytU",
30669
- message: "Admin"
30670
- })
30671
- }), /* @__PURE__ */ jsx(KumoSidebar.Menu, { children: renderNavItems(visibleAdmin) })] }),
30672
- visiblePlugins.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(KumoSidebar.Separator, {}), /* @__PURE__ */ jsxs(KumoSidebar.Group, { children: [/* @__PURE__ */ jsx(KumoSidebar.GroupLabel, {
30673
- className: "[&>span]:text-start [&_svg]:rtl:-scale-x-100 [&_svg]:rtl:-scale-y-100",
30674
- children: _t({
30675
- id: "ohUJJM",
30676
- message: "Plugins"
30677
- })
30678
- }), /* @__PURE__ */ jsx(KumoSidebar.Menu, { children: renderNavItems(visiblePlugins) })] })] })
30545
+ /* @__PURE__ */ jsx(KumoSidebar.Group, {
30546
+ className: "mt-2 md:mt-1.5",
30547
+ children: /* @__PURE__ */ jsx(KumoSidebar.Menu, { children: /* @__PURE__ */ jsx(NavMenuLink, {
30548
+ item: {
30549
+ to: "/",
30550
+ label: _t({
30551
+ id: "7p5kLi",
30552
+ message: "Dashboard"
30553
+ }),
30554
+ icon: SquaresFour
30555
+ },
30556
+ isActive: isItemActive("/", currentPath)
30557
+ }) })
30558
+ }),
30559
+ visibleContent.length > 1 && /* @__PURE__ */ jsxs(KumoSidebar.Group, { children: [/* @__PURE__ */ jsx(KumoSidebar.GroupLabel, { children: _t({
30560
+ id: "4b3oEV",
30561
+ message: "Content"
30562
+ }) }), /* @__PURE__ */ jsx(KumoSidebar.Menu, { children: renderNavItems(visibleContent.filter((i) => i.to !== "/")) })] }),
30563
+ visibleManage.length > 0 && /* @__PURE__ */ jsxs(KumoSidebar.Group, { children: [/* @__PURE__ */ jsx(KumoSidebar.GroupLabel, { children: _t({
30564
+ id: "wckWOP",
30565
+ message: "Manage"
30566
+ }) }), /* @__PURE__ */ jsx(KumoSidebar.Menu, { children: renderNavItems(visibleManage) })] }),
30567
+ visibleAdmin.length > 0 && /* @__PURE__ */ jsxs(KumoSidebar.Group, { children: [/* @__PURE__ */ jsx(KumoSidebar.GroupLabel, { children: _t({
30568
+ id: "U3pytU",
30569
+ message: "Admin"
30570
+ }) }), /* @__PURE__ */ jsx(KumoSidebar.Menu, { children: renderNavItems(visibleAdmin) })] }),
30571
+ visiblePlugins.length > 0 && /* @__PURE__ */ jsxs(KumoSidebar.Group, { children: [/* @__PURE__ */ jsx(KumoSidebar.GroupLabel, { children: _t({
30572
+ id: "ohUJJM",
30573
+ message: "Plugins"
30574
+ }) }), /* @__PURE__ */ jsx(KumoSidebar.Menu, { children: renderNavItems(visiblePlugins) })] })
30679
30575
  ] }),
30680
30576
  /* @__PURE__ */ jsx(KumoSidebar.Footer, { children: /* @__PURE__ */ jsxs("p", {
30681
- className: "emdash-nav-label px-3 py-2 text-[11px] text-white/30",
30577
+ className: "px-3 py-2 text-[11px] text-kumo-subtle group-data-[state=collapsed]/sidebar:hidden",
30682
30578
  children: [
30683
30579
  manifest.admin?.siteName || "EmDash CMS",
30684
30580
  " v",
@@ -30687,7 +30583,7 @@ function SidebarNav({ manifest }) {
30687
30583
  ]
30688
30584
  }) })
30689
30585
  ]
30690
- })] });
30586
+ });
30691
30587
  }
30692
30588
 
30693
30589
  //#endregion
@@ -30773,7 +30669,7 @@ function Header() {
30773
30669
  });
30774
30670
  const initials = ((user?.name || user?.email || "U")[0] ?? "U").toUpperCase();
30775
30671
  return /* @__PURE__ */ jsxs("header", {
30776
- className: "sticky top-0 z-10 flex h-16 items-center justify-between border-b bg-kumo-base px-4",
30672
+ className: "sticky top-0 z-10 flex h-[58px] items-center justify-between border-b bg-kumo-elevated px-4",
30777
30673
  children: [/* @__PURE__ */ jsx(KumoSidebar.Trigger, { className: "cursor-pointer rtl:rotate-180" }), /* @__PURE__ */ jsxs("div", {
30778
30674
  className: "flex items-center gap-2",
30779
30675
  children: [
@@ -31073,16 +30969,19 @@ function WelcomeModal({ open, onClose, userName, userRole }) {
31073
30969
  function Shell({ children, manifest }) {
31074
30970
  const [welcomeModalOpen, setWelcomeModalOpen] = React$1.useState(false);
31075
30971
  const { data: user } = useCurrentUser();
30972
+ const { locale } = useLocale();
30973
+ const sidebarSide = getLocaleDir(locale) === "rtl" ? "right" : "left";
31076
30974
  React$1.useEffect(() => {
31077
30975
  if (user?.isFirstLogin) setWelcomeModalOpen(true);
31078
30976
  }, [user?.isFirstLogin]);
31079
30977
  return /* @__PURE__ */ jsxs(KumoSidebar.Provider, {
31080
30978
  defaultOpen: true,
30979
+ side: sidebarSide,
31081
30980
  style: {
30981
+ "--sidebar-bg": "var(--color-kumo-elevated)",
31082
30982
  height: "100svh",
31083
30983
  minHeight: "0",
31084
- overflow: "hidden",
31085
- "--sidebar-width-icon": "53px"
30984
+ overflow: "hidden"
31086
30985
  },
31087
30986
  children: [
31088
30987
  /* @__PURE__ */ jsx(SidebarNav, { manifest }),
@@ -39926,8 +39825,7 @@ function ContentEditPage() {
39926
39825
  queryClient.invalidateQueries({ queryKey: [
39927
39826
  "content",
39928
39827
  collection,
39929
- id,
39930
- { locale: rawItem?.locale ?? activeLocale }
39828
+ id
39931
39829
  ] });
39932
39830
  queryClient.invalidateQueries({ queryKey: [
39933
39831
  "revisions",
@@ -39989,8 +39887,7 @@ function ContentEditPage() {
39989
39887
  queryClient.invalidateQueries({ queryKey: [
39990
39888
  "content",
39991
39889
  collection,
39992
- id,
39993
- { locale: rawItem?.locale ?? activeLocale }
39890
+ id
39994
39891
  ] });
39995
39892
  queryClient.invalidateQueries({ queryKey: [
39996
39893
  "revisions",
@@ -40028,8 +39925,7 @@ function ContentEditPage() {
40028
39925
  queryClient.invalidateQueries({ queryKey: [
40029
39926
  "content",
40030
39927
  collection,
40031
- id,
40032
- { locale: rawItem?.locale ?? activeLocale }
39928
+ id
40033
39929
  ] });
40034
39930
  queryClient.invalidateQueries({ queryKey: [
40035
39931
  "revisions",
@@ -40067,8 +39963,7 @@ function ContentEditPage() {
40067
39963
  queryClient.invalidateQueries({ queryKey: [
40068
39964
  "content",
40069
39965
  collection,
40070
- id,
40071
- { locale: rawItem?.locale ?? activeLocale }
39966
+ id
40072
39967
  ] });
40073
39968
  queryClient.invalidateQueries({ queryKey: [
40074
39969
  "revisions",
@@ -40106,8 +40001,7 @@ function ContentEditPage() {
40106
40001
  queryClient.invalidateQueries({ queryKey: [
40107
40002
  "content",
40108
40003
  collection,
40109
- id,
40110
- { locale: rawItem?.locale ?? activeLocale }
40004
+ id
40111
40005
  ] });
40112
40006
  toastManager.add({
40113
40007
  title: _t3({
@@ -40140,8 +40034,7 @@ function ContentEditPage() {
40140
40034
  queryClient.invalidateQueries({ queryKey: [
40141
40035
  "content",
40142
40036
  collection,
40143
- id,
40144
- { locale: rawItem?.locale ?? activeLocale }
40037
+ id
40145
40038
  ] });
40146
40039
  toastManager.add({
40147
40040
  title: _t3({
@@ -41079,6 +40972,44 @@ const queryClient = new QueryClient({ defaultOptions: { queries: {
41079
40972
  retry: 1
41080
40973
  } } });
41081
40974
  const router = createAdminRouter(queryClient);
40975
+ const ADMIN_BASEPATH = "/_emdash/admin";
40976
+ function normalizeAdminHref(href) {
40977
+ if (href === ADMIN_BASEPATH) return "/";
40978
+ if (href.startsWith(`${ADMIN_BASEPATH}/`)) return href.slice(14);
40979
+ if (href.startsWith(`${ADMIN_BASEPATH}?`) || href.startsWith(`${ADMIN_BASEPATH}#`)) return `/${href.slice(14)}`;
40980
+ return href;
40981
+ }
40982
+ function getAnchorHref(destination, routerDestination) {
40983
+ if (routerDestination.startsWith("/") && !routerDestination.startsWith("//")) {
40984
+ if (routerDestination === "/" || routerDestination.startsWith("/?") || routerDestination.startsWith("/#")) return `${ADMIN_BASEPATH}${routerDestination.slice(1)}`;
40985
+ return `${ADMIN_BASEPATH}${routerDestination}`;
40986
+ }
40987
+ return destination;
40988
+ }
40989
+ const KumoRouterLink = React$1.forwardRef(({ href, to, target, download, children, ...props }, ref) => {
40990
+ const destination = href ?? to ?? "";
40991
+ const hasSearchOrHash = destination.includes("?") || destination.includes("#");
40992
+ const routerDestination = normalizeAdminHref(destination);
40993
+ const shouldUseAnchor = !(routerDestination.startsWith("/") && !routerDestination.startsWith("//")) || hasSearchOrHash || target || download != null;
40994
+ const linkProps = props;
40995
+ const ariaCurrent = linkProps["aria-current"] ?? (linkProps["data-active"] ? "page" : void 0);
40996
+ if (shouldUseAnchor) return /* @__PURE__ */ jsx("a", {
40997
+ ref,
40998
+ href: hasSearchOrHash && !target && download == null ? getAnchorHref(destination, routerDestination) : destination,
40999
+ target,
41000
+ download,
41001
+ ...props,
41002
+ children
41003
+ });
41004
+ return /* @__PURE__ */ jsx(Link$1, {
41005
+ ...props,
41006
+ ref,
41007
+ to: routerDestination,
41008
+ "aria-current": ariaCurrent,
41009
+ children
41010
+ });
41011
+ });
41012
+ KumoRouterLink.displayName = "KumoRouterLink";
41082
41013
  /**
41083
41014
  * Main Admin Application
41084
41015
  */
@@ -41104,7 +41035,10 @@ function AdminApp({ pluginAdmins = EMPTY_PLUGINS, authProviders = EMPTY_AUTH_PRO
41104
41035
  pluginAdmins,
41105
41036
  children: /* @__PURE__ */ jsx(QueryClientProvider, {
41106
41037
  client: queryClient,
41107
- children: /* @__PURE__ */ jsx(RouterProvider, { router })
41038
+ children: /* @__PURE__ */ jsx(LinkProvider, {
41039
+ component: KumoRouterLink,
41040
+ children: /* @__PURE__ */ jsx(RouterProvider, { router })
41041
+ })
41108
41042
  })
41109
41043
  })
41110
41044
  }) }) })