@inf-monkeys-tech/monkeys-design 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -15415,6 +15415,93 @@ var BaseVisuallyHidden = forwardRef(function BaseVisuallyHidden2({
15415
15415
  }
15416
15416
  );
15417
15417
  });
15418
+ var rootTokenStyles = {
15419
+ width: "var(--monkeys-component-app-shell-sidebar-width, 16rem)",
15420
+ borderRadius: "var(--monkeys-component-app-shell-sidebar-radius, var(--radius, 0.75rem))",
15421
+ background: "var(--monkeys-component-app-shell-sidebar-background, hsl(var(--card)))",
15422
+ color: "var(--monkeys-component-app-shell-sidebar-foreground, hsl(var(--card-foreground)))",
15423
+ borderColor: "var(--monkeys-component-app-shell-sidebar-border-color, hsl(var(--border)))",
15424
+ boxShadow: "var(--monkeys-component-app-shell-sidebar-shadow, none)"
15425
+ };
15426
+ var headerTokenStyles = {
15427
+ padding: "var(--monkeys-component-app-shell-sidebar-header-padding, var(--global-spacing, 0.75rem))",
15428
+ borderColor: "var(--monkeys-component-app-shell-sidebar-header-border-color, hsl(var(--border)))"
15429
+ };
15430
+ var navigationTokenStyles = {
15431
+ padding: "var(--monkeys-component-app-shell-sidebar-navigation-padding, var(--global-spacing, 0.75rem))",
15432
+ "--monkeys-component-accordion-item-border-color": "transparent"
15433
+ };
15434
+ var footerTokenStyles = {
15435
+ padding: "var(--monkeys-component-app-shell-sidebar-footer-padding, var(--global-spacing, 0.75rem))",
15436
+ background: "var(--monkeys-component-app-shell-sidebar-footer-background, hsl(var(--muted) / 0.22))",
15437
+ borderColor: "var(--monkeys-component-app-shell-sidebar-footer-border-color, hsl(var(--border)))"
15438
+ };
15439
+ var AppShellSidebar = forwardRef(
15440
+ function AppShellSidebar2({
15441
+ navigation,
15442
+ header,
15443
+ footer,
15444
+ width,
15445
+ className,
15446
+ classNames,
15447
+ style,
15448
+ "aria-label": ariaLabel = "Application navigation",
15449
+ ...props
15450
+ }, ref) {
15451
+ return /* @__PURE__ */ jsxs(
15452
+ "aside",
15453
+ {
15454
+ ref,
15455
+ "aria-label": ariaLabel,
15456
+ "data-app-shell-sidebar": "",
15457
+ className: cn(
15458
+ "relative isolate flex h-full min-h-0 shrink-0 flex-col overflow-hidden border",
15459
+ classNames?.root,
15460
+ className
15461
+ ),
15462
+ style: {
15463
+ ...rootTokenStyles,
15464
+ ...width === void 0 ? null : { width },
15465
+ ...style
15466
+ },
15467
+ ...props,
15468
+ children: [
15469
+ header ? /* @__PURE__ */ jsx(
15470
+ "div",
15471
+ {
15472
+ "data-slot": "header",
15473
+ className: cn("shrink-0 border-b", classNames?.header),
15474
+ style: headerTokenStyles,
15475
+ children: header
15476
+ }
15477
+ ) : null,
15478
+ /* @__PURE__ */ jsx(
15479
+ "div",
15480
+ {
15481
+ "data-slot": "navigation",
15482
+ className: cn(
15483
+ "relative min-h-0 flex-1 overflow-hidden",
15484
+ classNames?.navigation
15485
+ ),
15486
+ style: navigationTokenStyles,
15487
+ children: navigation
15488
+ }
15489
+ ),
15490
+ footer ? /* @__PURE__ */ jsx(
15491
+ "div",
15492
+ {
15493
+ "data-slot": "footer",
15494
+ className: cn("shrink-0 border-t", classNames?.footer),
15495
+ style: footerTokenStyles,
15496
+ children: footer
15497
+ }
15498
+ ) : null
15499
+ ]
15500
+ }
15501
+ );
15502
+ }
15503
+ );
15504
+ AppShellSidebar.displayName = "AppShellSidebar";
15418
15505
  var defaultAppearance = {
15419
15506
  preset: "soft",
15420
15507
  density: "compact",
@@ -15689,7 +15776,14 @@ function UserAccountMenu({
15689
15776
  function cn2(...inputs) {
15690
15777
  return inputs.filter(Boolean).join(" ");
15691
15778
  }
15692
- function NavButton({ active, icon, postfix, onClick, className, children }) {
15779
+ function NavButton({
15780
+ active,
15781
+ icon,
15782
+ postfix,
15783
+ onClick,
15784
+ className,
15785
+ children
15786
+ }) {
15693
15787
  return /* @__PURE__ */ jsxs(
15694
15788
  "div",
15695
15789
  {
@@ -15741,7 +15835,14 @@ function AppHeader({
15741
15835
  "flex h-8 w-8 items-center justify-center rounded-lg overflow-hidden",
15742
15836
  logo.url ? "bg-transparent" : "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]"
15743
15837
  ),
15744
- children: logo.url ? /* @__PURE__ */ jsx("img", { src: logo.url, alt: logo.title, className: "h-full w-full object-contain" }) : /* @__PURE__ */ jsx("span", { className: "text-sm font-bold", children: logo.title.charAt(0) })
15838
+ children: logo.url ? /* @__PURE__ */ jsx(
15839
+ "img",
15840
+ {
15841
+ src: logo.url,
15842
+ alt: logo.title,
15843
+ className: "h-full w-full object-contain"
15844
+ }
15845
+ ) : /* @__PURE__ */ jsx("span", { className: "text-sm font-bold", children: logo.title.charAt(0) })
15745
15846
  }
15746
15847
  ),
15747
15848
  /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold whitespace-nowrap", children: logo.title })
@@ -15767,7 +15868,14 @@ function AppHeader({
15767
15868
  /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-4", children: [
15768
15869
  extra,
15769
15870
  user && /* @__PURE__ */ jsxs(DropdownMenu2.Root, { children: [
15770
- /* @__PURE__ */ jsx(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { className: "flex h-8 w-8 items-center justify-center rounded-full hover:ring-2 hover:ring-[hsl(var(--ring))]/20 transition-all overflow-hidden focus-visible:outline-none", children: user.photo ? /* @__PURE__ */ jsx("img", { src: user.photo, alt: user.name, className: "h-8 w-8 rounded-full object-cover" }) : /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-xs font-medium", children: user.name ? getUserInitials(user.name) : "U" }) }) }),
15871
+ /* @__PURE__ */ jsx(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { className: "flex h-8 w-8 items-center justify-center rounded-full hover:ring-2 hover:ring-[hsl(var(--ring))]/20 transition-all overflow-hidden focus-visible:outline-none", children: user.photo ? /* @__PURE__ */ jsx(
15872
+ "img",
15873
+ {
15874
+ src: user.photo,
15875
+ alt: user.name,
15876
+ className: "h-8 w-8 rounded-full object-cover"
15877
+ }
15878
+ ) : /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-xs font-medium", children: user.name ? getUserInitials(user.name) : "U" }) }) }),
15771
15879
  /* @__PURE__ */ jsx(DropdownMenu2.Portal, { children: /* @__PURE__ */ jsxs(
15772
15880
  DropdownMenu2.Content,
15773
15881
  {
@@ -15776,7 +15884,14 @@ function AppHeader({
15776
15884
  align: "end",
15777
15885
  children: [
15778
15886
  /* @__PURE__ */ jsxs(DropdownMenu2.Label, { className: "flex items-center gap-2 px-2 py-1.5 font-normal", children: [
15779
- user.photo ? /* @__PURE__ */ jsx("img", { src: user.photo, alt: user.name, className: "h-8 w-8 rounded-full object-cover" }) : /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-xs font-medium", children: user.name ? getUserInitials(user.name) : "U" }),
15887
+ user.photo ? /* @__PURE__ */ jsx(
15888
+ "img",
15889
+ {
15890
+ src: user.photo,
15891
+ alt: user.name,
15892
+ className: "h-8 w-8 rounded-full object-cover"
15893
+ }
15894
+ ) : /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-xs font-medium", children: user.name ? getUserInitials(user.name) : "U" }),
15780
15895
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
15781
15896
  /* @__PURE__ */ jsx("span", { className: "text-sm font-medium leading-none", children: user.name }),
15782
15897
  user.email && /* @__PURE__ */ jsx("span", { className: "text-xs text-[hsl(var(--muted-foreground))] leading-none mt-1", children: user.email })
@@ -15791,11 +15906,25 @@ function AppHeader({
15791
15906
  className: "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-[hsl(var(--destructive))] outline-none transition-colors hover:bg-[hsl(var(--accent))]",
15792
15907
  onSelect: () => onLogout?.(),
15793
15908
  children: [
15794
- /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
15795
- /* @__PURE__ */ jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
15796
- /* @__PURE__ */ jsx("polyline", { points: "16 17 21 12 16 7" }),
15797
- /* @__PURE__ */ jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })
15798
- ] }),
15909
+ /* @__PURE__ */ jsxs(
15910
+ "svg",
15911
+ {
15912
+ xmlns: "http://www.w3.org/2000/svg",
15913
+ width: "16",
15914
+ height: "16",
15915
+ viewBox: "0 0 24 24",
15916
+ fill: "none",
15917
+ stroke: "currentColor",
15918
+ strokeWidth: "1.5",
15919
+ strokeLinecap: "round",
15920
+ strokeLinejoin: "round",
15921
+ children: [
15922
+ /* @__PURE__ */ jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
15923
+ /* @__PURE__ */ jsx("polyline", { points: "16 17 21 12 16 7" }),
15924
+ /* @__PURE__ */ jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })
15925
+ ]
15926
+ }
15927
+ ),
15799
15928
  logoutLabel
15800
15929
  ]
15801
15930
  }
@@ -15830,19 +15959,33 @@ function AppSidebar({
15830
15959
  className
15831
15960
  ),
15832
15961
  children: [
15833
- logo && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 cursor-pointer items-center gap-2", onClick: logo.onClick, children: [
15834
- /* @__PURE__ */ jsx(
15835
- "div",
15836
- {
15837
- className: cn2(
15838
- "flex h-8 w-8 items-center justify-center rounded-lg overflow-hidden",
15839
- logo.url ? "bg-transparent" : "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]"
15962
+ logo && /* @__PURE__ */ jsxs(
15963
+ "div",
15964
+ {
15965
+ className: "flex shrink-0 cursor-pointer items-center gap-2",
15966
+ onClick: logo.onClick,
15967
+ children: [
15968
+ /* @__PURE__ */ jsx(
15969
+ "div",
15970
+ {
15971
+ className: cn2(
15972
+ "flex h-8 w-8 items-center justify-center rounded-lg overflow-hidden",
15973
+ logo.url ? "bg-transparent" : "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]"
15974
+ ),
15975
+ children: logo.url ? /* @__PURE__ */ jsx(
15976
+ "img",
15977
+ {
15978
+ src: logo.url,
15979
+ alt: logo.title,
15980
+ className: "h-full w-full object-contain"
15981
+ }
15982
+ ) : /* @__PURE__ */ jsx("span", { className: "text-sm font-bold", children: logo.title.charAt(0) })
15983
+ }
15840
15984
  ),
15841
- children: logo.url ? /* @__PURE__ */ jsx("img", { src: logo.url, alt: logo.title, className: "h-full w-full object-contain" }) : /* @__PURE__ */ jsx("span", { className: "text-sm font-bold", children: logo.title.charAt(0) })
15842
- }
15843
- ),
15844
- /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold whitespace-nowrap", children: logo.title })
15845
- ] }),
15985
+ /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold whitespace-nowrap", children: logo.title })
15986
+ ]
15987
+ }
15988
+ ),
15846
15989
  /* @__PURE__ */ jsx(
15847
15990
  SidebarNavList,
15848
15991
  {
@@ -15855,7 +15998,14 @@ function AppSidebar({
15855
15998
  (account || footer) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
15856
15999
  account && /* @__PURE__ */ jsx("div", { className: "flex w-full flex-col gap-2 rounded-lg bg-[hsl(var(--muted))] p-2 shadow-sm", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full items-center justify-between px-3 py-1", children: [
15857
16000
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
15858
- account.photo ? /* @__PURE__ */ jsx("img", { src: account.photo, alt: account.name, className: "h-5 w-5 rounded-full object-cover" }) : /* @__PURE__ */ jsx("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-[10px] font-medium", children: account.name ? account.name.charAt(0).toUpperCase() : "U" }),
16001
+ account.photo ? /* @__PURE__ */ jsx(
16002
+ "img",
16003
+ {
16004
+ src: account.photo,
16005
+ alt: account.name,
16006
+ className: "h-5 w-5 rounded-full object-cover"
16007
+ }
16008
+ ) : /* @__PURE__ */ jsx("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-[10px] font-medium", children: account.name ? account.name.charAt(0).toUpperCase() : "U" }),
15859
16009
  /* @__PURE__ */ jsx("span", { className: "text-xs font-medium truncate max-w-[100px]", children: account.name })
15860
16010
  ] }),
15861
16011
  onLogout && /* @__PURE__ */ jsx(
@@ -15864,11 +16014,25 @@ function AppSidebar({
15864
16014
  onClick: onLogout,
15865
16015
  className: "flex items-center justify-center text-[hsl(var(--destructive))] hover:opacity-80 transition-opacity",
15866
16016
  title: logoutLabel,
15867
- children: /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
15868
- /* @__PURE__ */ jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
15869
- /* @__PURE__ */ jsx("polyline", { points: "16 17 21 12 16 7" }),
15870
- /* @__PURE__ */ jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })
15871
- ] })
16017
+ children: /* @__PURE__ */ jsxs(
16018
+ "svg",
16019
+ {
16020
+ xmlns: "http://www.w3.org/2000/svg",
16021
+ width: "16",
16022
+ height: "16",
16023
+ viewBox: "0 0 24 24",
16024
+ fill: "none",
16025
+ stroke: "currentColor",
16026
+ strokeWidth: "1.5",
16027
+ strokeLinecap: "round",
16028
+ strokeLinejoin: "round",
16029
+ children: [
16030
+ /* @__PURE__ */ jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
16031
+ /* @__PURE__ */ jsx("polyline", { points: "16 17 21 12 16 7" }),
16032
+ /* @__PURE__ */ jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })
16033
+ ]
16034
+ }
16035
+ )
15872
16036
  }
15873
16037
  )
15874
16038
  ] }) }),
@@ -15878,7 +16042,12 @@ function AppSidebar({
15878
16042
  }
15879
16043
  );
15880
16044
  }
15881
- function SidebarNavList({ items, activeItemId, onNavigate, defaultExpandedGroups }) {
16045
+ function SidebarNavList({
16046
+ items,
16047
+ activeItemId,
16048
+ onNavigate,
16049
+ defaultExpandedGroups
16050
+ }) {
15882
16051
  const [expanded, setExpanded] = useState(() => {
15883
16052
  const map = {};
15884
16053
  (defaultExpandedGroups ?? items.map((i) => i.id)).forEach((id) => {
@@ -15893,84 +16062,115 @@ function SidebarNavList({ items, activeItemId, onNavigate, defaultExpandedGroups
15893
16062
  }
15894
16063
  }, [activeItemId]);
15895
16064
  const toggle = (id) => {
15896
- setExpanded((prev) => ({ ...prev, [id]: !prev[id] }));
16065
+ setExpanded((prev) => ({
16066
+ ...prev,
16067
+ [id]: !prev[id]
16068
+ }));
15897
16069
  };
15898
16070
  const resolvedActiveItemId = activeItemId ?? localActiveItemId;
15899
- return /* @__PURE__ */ jsxs("div", { className: "h-full flex-1 overflow-y-auto", style: { scrollbarWidth: "none", msOverflowStyle: "none" }, children: [
15900
- /* @__PURE__ */ jsx("style", { children: `.monkeys-sidebar-nav::-webkit-scrollbar { display: none; }` }),
15901
- /* @__PURE__ */ jsx("div", { className: "monkeys-sidebar-nav flex w-full flex-col gap-2 text-xs text-[hsl(var(--foreground))]", children: items.map((item) => {
15902
- if (item.children && item.children.length > 0) {
15903
- const isExpanded = expanded[item.id] ?? true;
15904
- return /* @__PURE__ */ jsxs("div", { children: [
15905
- /* @__PURE__ */ jsx(
15906
- NavButton,
15907
- {
15908
- icon: item.icon,
15909
- onClick: () => toggle(item.id),
15910
- postfix: /* @__PURE__ */ jsx("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ jsx(
15911
- "svg",
16071
+ return /* @__PURE__ */ jsxs(
16072
+ "div",
16073
+ {
16074
+ className: "h-full flex-1 overflow-y-auto",
16075
+ style: { scrollbarWidth: "none", msOverflowStyle: "none" },
16076
+ children: [
16077
+ /* @__PURE__ */ jsx("style", { children: `.monkeys-sidebar-nav::-webkit-scrollbar { display: none; }` }),
16078
+ /* @__PURE__ */ jsx("div", { className: "monkeys-sidebar-nav flex w-full flex-col gap-2 text-xs text-[hsl(var(--foreground))]", children: items.map((item) => {
16079
+ if (item.children && item.children.length > 0) {
16080
+ const isExpanded = expanded[item.id] ?? true;
16081
+ return /* @__PURE__ */ jsxs("div", { children: [
16082
+ /* @__PURE__ */ jsx(
16083
+ NavButton,
15912
16084
  {
15913
- xmlns: "http://www.w3.org/2000/svg",
15914
- width: "16",
15915
- height: "16",
15916
- viewBox: "0 0 24 24",
15917
- fill: "none",
15918
- stroke: "currentColor",
15919
- strokeWidth: "2",
15920
- strokeLinecap: "round",
15921
- strokeLinejoin: "round",
15922
- className: "shrink-0 text-[hsl(var(--foreground))] transition-transform duration-200",
15923
- style: { transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)" },
15924
- children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" })
16085
+ icon: item.icon,
16086
+ onClick: () => toggle(item.id),
16087
+ postfix: /* @__PURE__ */ jsx("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ jsx(
16088
+ "svg",
16089
+ {
16090
+ xmlns: "http://www.w3.org/2000/svg",
16091
+ width: "16",
16092
+ height: "16",
16093
+ viewBox: "0 0 24 24",
16094
+ fill: "none",
16095
+ stroke: "currentColor",
16096
+ strokeWidth: "2",
16097
+ strokeLinecap: "round",
16098
+ strokeLinejoin: "round",
16099
+ className: "shrink-0 text-[hsl(var(--foreground))] transition-transform duration-200",
16100
+ style: {
16101
+ transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)"
16102
+ },
16103
+ children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" })
16104
+ }
16105
+ ) }),
16106
+ children: item.label
15925
16107
  }
15926
- ) }),
15927
- children: item.label
15928
- }
15929
- ),
15930
- isExpanded && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1 mt-1", children: item.children.map((child) => /* @__PURE__ */ jsx(
16108
+ ),
16109
+ isExpanded && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1 mt-1", children: item.children.map((child) => /* @__PURE__ */ jsx(
16110
+ NavButton,
16111
+ {
16112
+ active: child.id === resolvedActiveItemId,
16113
+ onClick: () => {
16114
+ setLocalActiveItemId(child.id);
16115
+ onNavigate?.(child.id);
16116
+ },
16117
+ children: child.label
16118
+ },
16119
+ child.id
16120
+ )) })
16121
+ ] }, item.id);
16122
+ }
16123
+ return /* @__PURE__ */ jsx(
15931
16124
  NavButton,
15932
16125
  {
15933
- active: child.id === resolvedActiveItemId,
16126
+ icon: item.icon,
16127
+ active: item.id === resolvedActiveItemId,
15934
16128
  onClick: () => {
15935
- setLocalActiveItemId(child.id);
15936
- onNavigate?.(child.id);
16129
+ setLocalActiveItemId(item.id);
16130
+ onNavigate?.(item.id);
15937
16131
  },
15938
- children: child.label
16132
+ children: item.label
15939
16133
  },
15940
- child.id
15941
- )) })
15942
- ] }, item.id);
15943
- }
15944
- return /* @__PURE__ */ jsx(
15945
- NavButton,
15946
- {
15947
- icon: item.icon,
15948
- active: item.id === resolvedActiveItemId,
15949
- onClick: () => {
15950
- setLocalActiveItemId(item.id);
15951
- onNavigate?.(item.id);
15952
- },
15953
- children: item.label
15954
- },
15955
- item.id
15956
- );
15957
- }) })
15958
- ] });
16134
+ item.id
16135
+ );
16136
+ }) })
16137
+ ]
16138
+ }
16139
+ );
15959
16140
  }
15960
- function AppLayout({ header, sidebar, children, flush = false, className }) {
15961
- return /* @__PURE__ */ jsxs("div", { className: cn2(
15962
- "flex h-screen flex-col gap-[var(--global-spacing,0.75rem)] overflow-hidden p-[var(--global-spacing,0.75rem)]",
15963
- className
15964
- ), style: { backgroundColor: "hsl(var(--muted))" }, children: [
15965
- header ? header : null,
15966
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 gap-[var(--global-spacing,0.75rem)] overflow-hidden min-h-0", children: [
15967
- sidebar ? sidebar : null,
15968
- /* @__PURE__ */ jsx("main", { className: cn2(
15969
- "flex-1 min-h-0 overflow-hidden rounded-xl border border-[hsl(var(--input))] bg-[hsl(var(--background))]",
15970
- !flush && "overflow-y-auto"
15971
- ), children: flush ? children : /* @__PURE__ */ jsx("div", { className: "h-full overflow-y-auto", children }) })
15972
- ] })
15973
- ] });
16141
+ function AppLayout({
16142
+ header,
16143
+ sidebar,
16144
+ children,
16145
+ flush = false,
16146
+ className
16147
+ }) {
16148
+ return /* @__PURE__ */ jsxs(
16149
+ "div",
16150
+ {
16151
+ className: cn2(
16152
+ "flex h-screen flex-col gap-[var(--global-spacing,0.75rem)] overflow-hidden p-[var(--global-spacing,0.75rem)]",
16153
+ className
16154
+ ),
16155
+ style: { backgroundColor: "hsl(var(--muted))" },
16156
+ children: [
16157
+ header ? header : null,
16158
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 gap-[var(--global-spacing,0.75rem)] overflow-hidden min-h-0", children: [
16159
+ sidebar ? sidebar : null,
16160
+ /* @__PURE__ */ jsx(
16161
+ "main",
16162
+ {
16163
+ className: cn2(
16164
+ "flex-1 min-h-0 overflow-hidden rounded-xl border border-[hsl(var(--input))] bg-[hsl(var(--background))]",
16165
+ !flush && "overflow-y-auto"
16166
+ ),
16167
+ children: flush ? children : /* @__PURE__ */ jsx("div", { className: "h-full overflow-y-auto", children })
16168
+ }
16169
+ )
16170
+ ] })
16171
+ ]
16172
+ }
16173
+ );
15974
16174
  }
15975
16175
  var NAVIGATION_LAYOUT_SIDEBAR_EXPANDED_WIDTH = "13.7rem";
15976
16176
  var NAVIGATION_LAYOUT_SIDEBAR_COLLAPSED_WIDTH = "4.25rem";
@@ -15992,15 +16192,39 @@ var NAVIGATION_LAYOUT_DEFAULT_APPEARANCE = {
15992
16192
  };
15993
16193
  var NAVIGATION_LAYOUT_MENU_RADIUS_CLASS_MAP = {
15994
16194
  none: { all: "rounded-none", left: "!rounded-none", right: "!rounded-none" },
15995
- sm: { all: "rounded-sm", left: "!rounded-l-sm !rounded-r-none", right: "!rounded-l-none !rounded-r-sm" },
15996
- md: { all: "rounded-md", left: "!rounded-l-md !rounded-r-none", right: "!rounded-l-none !rounded-r-md" },
15997
- lg: { all: "rounded-lg", left: "!rounded-l-lg !rounded-r-none", right: "!rounded-l-none !rounded-r-lg" },
15998
- xl: { all: "rounded-xl", left: "!rounded-l-xl !rounded-r-none", right: "!rounded-l-none !rounded-r-xl" },
15999
- full: { all: "rounded-full", left: "!rounded-l-full !rounded-r-none", right: "!rounded-l-none !rounded-r-full" }
16195
+ sm: {
16196
+ all: "rounded-sm",
16197
+ left: "!rounded-l-sm !rounded-r-none",
16198
+ right: "!rounded-l-none !rounded-r-sm"
16199
+ },
16200
+ md: {
16201
+ all: "rounded-md",
16202
+ left: "!rounded-l-md !rounded-r-none",
16203
+ right: "!rounded-l-none !rounded-r-md"
16204
+ },
16205
+ lg: {
16206
+ all: "rounded-lg",
16207
+ left: "!rounded-l-lg !rounded-r-none",
16208
+ right: "!rounded-l-none !rounded-r-lg"
16209
+ },
16210
+ xl: {
16211
+ all: "rounded-xl",
16212
+ left: "!rounded-l-xl !rounded-r-none",
16213
+ right: "!rounded-l-none !rounded-r-xl"
16214
+ },
16215
+ full: {
16216
+ all: "rounded-full",
16217
+ left: "!rounded-l-full !rounded-r-none",
16218
+ right: "!rounded-l-none !rounded-r-full"
16219
+ }
16000
16220
  };
16001
16221
  function clampHeadbarHeight(value) {
16002
- if (typeof value !== "number" || !Number.isFinite(value)) return NAVIGATION_LAYOUT_HEADBAR_DEFAULT_HEIGHT_PX;
16003
- return Math.min(NAVIGATION_LAYOUT_HEADBAR_MAX_HEIGHT_PX, Math.max(NAVIGATION_LAYOUT_HEADBAR_MIN_HEIGHT_PX, Math.round(value)));
16222
+ if (typeof value !== "number" || !Number.isFinite(value))
16223
+ return NAVIGATION_LAYOUT_HEADBAR_DEFAULT_HEIGHT_PX;
16224
+ return Math.min(
16225
+ NAVIGATION_LAYOUT_HEADBAR_MAX_HEIGHT_PX,
16226
+ Math.max(NAVIGATION_LAYOUT_HEADBAR_MIN_HEIGHT_PX, Math.round(value))
16227
+ );
16004
16228
  }
16005
16229
  function getHeadbarVerticalPaddingPx(heightPx) {
16006
16230
  return heightPx <= NAVIGATION_LAYOUT_HEADBAR_COMPACT_HEIGHT_THRESHOLD_PX ? NAVIGATION_LAYOUT_HEADBAR_COMPACT_VERTICAL_PADDING_PX : NAVIGATION_LAYOUT_HEADBAR_BOXED_VERTICAL_PADDING_PX;
@@ -16018,7 +16242,13 @@ function getHeadbarMenuRadiusClass(menuRadius = "default", part = "all") {
16018
16242
  }
16019
16243
  function getHeadbarFrameClass(layoutMode = "boxed", navPosition = "center") {
16020
16244
  const columns = navPosition === "center" ? "grid-cols-[minmax(max-content,1fr)_minmax(0,max-content)_minmax(max-content,1fr)]" : "grid-cols-[max-content_minmax(0,1fr)_max-content]";
16021
- return layoutMode === "full-bleed" ? cn2("sticky top-0 z-40 grid w-full shrink-0 items-center gap-4 rounded-none border-b border-x-0 border-t-0 border-[hsl(var(--input))] bg-[hsl(var(--background))] p-[var(--global-spacing,0.75rem)]", columns) : cn2("sticky top-0 z-40 grid w-full shrink-0 items-center gap-4 rounded-xl border border-[hsl(var(--input))] bg-[hsl(var(--background))] p-[var(--global-spacing,0.75rem)]", columns);
16245
+ return layoutMode === "full-bleed" ? cn2(
16246
+ "sticky top-0 z-40 grid w-full shrink-0 items-center gap-4 rounded-none border-b border-x-0 border-t-0 border-[hsl(var(--input))] bg-[hsl(var(--background))] p-[var(--global-spacing,0.75rem)]",
16247
+ columns
16248
+ ) : cn2(
16249
+ "sticky top-0 z-40 grid w-full shrink-0 items-center gap-4 rounded-xl border border-[hsl(var(--input))] bg-[hsl(var(--background))] p-[var(--global-spacing,0.75rem)]",
16250
+ columns
16251
+ );
16022
16252
  }
16023
16253
  function getHeadbarFrameStyle(layoutMode = "boxed", heightPx, surface = "card") {
16024
16254
  const verticalPaddingPx = getHeadbarVerticalPaddingPx(heightPx);
@@ -16064,7 +16294,8 @@ function getHeadbarItemStyle(active, useTokenRadius = true) {
16064
16294
  function findNavigationRootId(items, activeItemId) {
16065
16295
  for (const item of items) {
16066
16296
  if (item.id === activeItemId) return item.id;
16067
- if (item.children?.some((child) => child.id === activeItemId)) return item.id;
16297
+ if (item.children?.some((child) => child.id === activeItemId))
16298
+ return item.id;
16068
16299
  }
16069
16300
  return activeItemId;
16070
16301
  }
@@ -16133,7 +16364,9 @@ function SidebarNavigationList({
16133
16364
  revealRequest
16134
16365
  }) {
16135
16366
  const navRef = useRef(null);
16136
- const [expandedByRoot, setExpandedByRoot] = useState({});
16367
+ const [expandedByRoot, setExpandedByRoot] = useState(
16368
+ {}
16369
+ );
16137
16370
  const toggleRoot = (id) => {
16138
16371
  setExpandedByRoot((current) => ({
16139
16372
  ...current,
@@ -16151,65 +16384,86 @@ function SidebarNavigationList({
16151
16384
  `[data-navigation-sidebar-root-id="${CSS.escape(revealRequest.id)}"]`
16152
16385
  );
16153
16386
  if (targetElement instanceof HTMLElement) {
16154
- targetElement.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" });
16387
+ targetElement.scrollIntoView({
16388
+ behavior: "auto",
16389
+ block: "nearest",
16390
+ inline: "nearest"
16391
+ });
16155
16392
  }
16156
16393
  });
16157
16394
  return () => window.cancelAnimationFrame(frameId);
16158
16395
  }, [revealRequest]);
16159
- return /* @__PURE__ */ jsxs("div", { className: "h-full flex-1 overflow-y-auto", style: { scrollbarWidth: "none", msOverflowStyle: "none" }, children: [
16160
- /* @__PURE__ */ jsx("style", { children: `.monkeys-navigation-sidebar-nav::-webkit-scrollbar { display: none; }` }),
16161
- /* @__PURE__ */ jsx(
16162
- "div",
16163
- {
16164
- ref: navRef,
16165
- className: "monkeys-navigation-sidebar-nav flex w-full flex-col gap-2 text-xs text-[hsl(var(--foreground))]",
16166
- children: items.map((item) => {
16167
- const isGroup = Boolean(item.children?.length);
16168
- const isExpanded = Boolean(expandedByRoot[item.id]);
16169
- const isActive = activeItemId === item.id;
16170
- if (isGroup) {
16171
- return /* @__PURE__ */ jsxs("div", { "data-navigation-sidebar-root-id": item.id, children: [
16172
- /* @__PURE__ */ jsx(
16396
+ return /* @__PURE__ */ jsxs(
16397
+ "div",
16398
+ {
16399
+ className: "h-full flex-1 overflow-y-auto",
16400
+ style: { scrollbarWidth: "none", msOverflowStyle: "none" },
16401
+ children: [
16402
+ /* @__PURE__ */ jsx("style", { children: `.monkeys-navigation-sidebar-nav::-webkit-scrollbar { display: none; }` }),
16403
+ /* @__PURE__ */ jsx(
16404
+ "div",
16405
+ {
16406
+ ref: navRef,
16407
+ className: "monkeys-navigation-sidebar-nav flex w-full flex-col gap-2 text-xs text-[hsl(var(--foreground))]",
16408
+ children: items.map((item) => {
16409
+ const isGroup = Boolean(item.children?.length);
16410
+ const isExpanded = Boolean(expandedByRoot[item.id]);
16411
+ const isActive = activeItemId === item.id;
16412
+ if (isGroup) {
16413
+ return /* @__PURE__ */ jsxs("div", { "data-navigation-sidebar-root-id": item.id, children: [
16414
+ /* @__PURE__ */ jsx(
16415
+ NavButton,
16416
+ {
16417
+ icon: item.icon,
16418
+ onClick: () => toggleRoot(item.id),
16419
+ postfix: /* @__PURE__ */ jsx("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ jsx(
16420
+ "svg",
16421
+ {
16422
+ xmlns: "http://www.w3.org/2000/svg",
16423
+ width: "16",
16424
+ height: "16",
16425
+ viewBox: "0 0 24 24",
16426
+ fill: "none",
16427
+ stroke: "currentColor",
16428
+ strokeWidth: "2",
16429
+ strokeLinecap: "round",
16430
+ strokeLinejoin: "round",
16431
+ className: "shrink-0 text-[hsl(var(--foreground))] transition-transform duration-200",
16432
+ style: {
16433
+ transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)"
16434
+ },
16435
+ children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" })
16436
+ }
16437
+ ) }),
16438
+ children: item.label
16439
+ }
16440
+ ),
16441
+ isExpanded ? /* @__PURE__ */ jsx("div", { className: "mt-1 flex flex-col gap-1", children: item.children?.map((child) => /* @__PURE__ */ jsx(
16442
+ NavButton,
16443
+ {
16444
+ active: activeItemId === child.id,
16445
+ onClick: () => onNavigate?.(child.id),
16446
+ children: child.label
16447
+ },
16448
+ child.id
16449
+ )) }) : null
16450
+ ] }, item.id);
16451
+ }
16452
+ return /* @__PURE__ */ jsx("div", { "data-navigation-sidebar-root-id": item.id, children: /* @__PURE__ */ jsx(
16173
16453
  NavButton,
16174
16454
  {
16455
+ active: isActive,
16175
16456
  icon: item.icon,
16176
- onClick: () => toggleRoot(item.id),
16177
- postfix: /* @__PURE__ */ jsx("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ jsx(
16178
- "svg",
16179
- {
16180
- xmlns: "http://www.w3.org/2000/svg",
16181
- width: "16",
16182
- height: "16",
16183
- viewBox: "0 0 24 24",
16184
- fill: "none",
16185
- stroke: "currentColor",
16186
- strokeWidth: "2",
16187
- strokeLinecap: "round",
16188
- strokeLinejoin: "round",
16189
- className: "shrink-0 text-[hsl(var(--foreground))] transition-transform duration-200",
16190
- style: { transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)" },
16191
- children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" })
16192
- }
16193
- ) }),
16457
+ onClick: () => onNavigate?.(item.id),
16194
16458
  children: item.label
16195
16459
  }
16196
- ),
16197
- isExpanded ? /* @__PURE__ */ jsx("div", { className: "mt-1 flex flex-col gap-1", children: item.children?.map((child) => /* @__PURE__ */ jsx(
16198
- NavButton,
16199
- {
16200
- active: activeItemId === child.id,
16201
- onClick: () => onNavigate?.(child.id),
16202
- children: child.label
16203
- },
16204
- child.id
16205
- )) }) : null
16206
- ] }, item.id);
16460
+ ) }, item.id);
16461
+ })
16207
16462
  }
16208
- return /* @__PURE__ */ jsx("div", { "data-navigation-sidebar-root-id": item.id, children: /* @__PURE__ */ jsx(NavButton, { active: isActive, icon: item.icon, onClick: () => onNavigate?.(item.id), children: item.label }) }, item.id);
16209
- })
16210
- }
16211
- )
16212
- ] });
16463
+ )
16464
+ ]
16465
+ }
16466
+ );
16213
16467
  }
16214
16468
  function SidebarBrand({
16215
16469
  collapsed,
@@ -16225,7 +16479,14 @@ function SidebarBrand({
16225
16479
  "flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",
16226
16480
  logo.url ? "bg-transparent" : "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]"
16227
16481
  ),
16228
- children: logo.url ? /* @__PURE__ */ jsx("img", { src: logo.url, alt: logo.title, className: "h-full w-full object-contain" }) : /* @__PURE__ */ jsx("span", { className: "text-sm font-bold", children: logo.title.charAt(0) })
16482
+ children: logo.url ? /* @__PURE__ */ jsx(
16483
+ "img",
16484
+ {
16485
+ src: logo.url,
16486
+ alt: logo.title,
16487
+ className: "h-full w-full object-contain"
16488
+ }
16489
+ ) : /* @__PURE__ */ jsx("span", { className: "text-sm font-bold", children: logo.title.charAt(0) })
16229
16490
  }
16230
16491
  );
16231
16492
  if (collapsed) {
@@ -16359,7 +16620,10 @@ function HeadbarChevronIcon({ open }) {
16359
16620
  "svg",
16360
16621
  {
16361
16622
  "aria-hidden": "true",
16362
- className: cn2("h-4 w-4 shrink-0 transition-transform duration-200", open && "rotate-180"),
16623
+ className: cn2(
16624
+ "h-4 w-4 shrink-0 transition-transform duration-200",
16625
+ open && "rotate-180"
16626
+ ),
16363
16627
  viewBox: "0 0 24 24",
16364
16628
  fill: "none",
16365
16629
  stroke: "currentColor",
@@ -16453,7 +16717,10 @@ function HeadbarNavMenuItem({
16453
16717
  "relative flex cursor-pointer select-none items-center gap-2.5 px-3 py-2 text-sm outline-none transition-colors hover:bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--accent)))]",
16454
16718
  menuItemRadiusClass
16455
16719
  ),
16456
- style: getHeadbarItemStyle(child.id === activeItemId, useTokenRadius),
16720
+ style: getHeadbarItemStyle(
16721
+ child.id === activeItemId,
16722
+ useTokenRadius
16723
+ ),
16457
16724
  onSelect: () => {
16458
16725
  if (child.disabled) return;
16459
16726
  setOpen(false);
@@ -16554,7 +16821,10 @@ function NavigationHeadbar({
16554
16821
  return /* @__PURE__ */ jsxs(
16555
16822
  "header",
16556
16823
  {
16557
- className: cn2(getHeadbarFrameClass(layoutMode, layout?.navPosition), className),
16824
+ className: cn2(
16825
+ getHeadbarFrameClass(layoutMode, layout?.navPosition),
16826
+ className
16827
+ ),
16558
16828
  "data-navigation-headbar": "",
16559
16829
  "data-navigation-headbar-surface": surface,
16560
16830
  style: frameStyle,
@@ -16572,7 +16842,14 @@ function NavigationHeadbar({
16572
16842
  logo.url ? "w-auto max-w-[min(22rem,30vw)] bg-transparent" : "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]"
16573
16843
  ),
16574
16844
  style: logo.url ? { height: logoHeightPx } : { width: logoHeightPx, height: logoHeightPx },
16575
- children: logo.url ? /* @__PURE__ */ jsx("img", { src: logo.url, alt: logo.title, className: "block h-full w-auto object-contain" }) : /* @__PURE__ */ jsx("span", { className: "text-base font-bold", children: logo.title.charAt(0) })
16845
+ children: logo.url ? /* @__PURE__ */ jsx(
16846
+ "img",
16847
+ {
16848
+ src: logo.url,
16849
+ alt: logo.title,
16850
+ className: "block h-full w-auto object-contain"
16851
+ }
16852
+ ) : /* @__PURE__ */ jsx("span", { className: "text-base font-bold", children: logo.title.charAt(0) })
16576
16853
  }
16577
16854
  ),
16578
16855
  label: showBrandTitle ? /* @__PURE__ */ jsx("span", { className: "truncate whitespace-nowrap text-base font-medium text-[hsl(var(--foreground))]", children: layout?.brandTitle }) : null,
@@ -16583,16 +16860,25 @@ function NavigationHeadbar({
16583
16860
  onClick: logo.onClick
16584
16861
  }
16585
16862
  ) : null) }),
16586
- /* @__PURE__ */ jsx("div", { className: cn2("flex min-w-0 items-center", getHeadbarNavClass(layout?.navPosition)), children: /* @__PURE__ */ jsx("div", { className: "no-scrollbar flex max-w-full min-w-0 items-center overflow-x-auto overscroll-x-contain", children: navigation ?? /* @__PURE__ */ jsx(
16587
- NavigationHeadbarMenu,
16863
+ /* @__PURE__ */ jsx(
16864
+ "div",
16588
16865
  {
16589
- activeItemId,
16590
- activeRootId,
16591
- items: navItems,
16592
- menuRadius,
16593
- onNavigate
16866
+ className: cn2(
16867
+ "flex min-w-0 items-center",
16868
+ getHeadbarNavClass(layout?.navPosition)
16869
+ ),
16870
+ children: /* @__PURE__ */ jsx("div", { className: "no-scrollbar flex max-w-full min-w-0 items-center overflow-x-auto overscroll-x-contain", children: navigation ?? /* @__PURE__ */ jsx(
16871
+ NavigationHeadbarMenu,
16872
+ {
16873
+ activeItemId,
16874
+ activeRootId,
16875
+ items: navItems,
16876
+ menuRadius,
16877
+ onNavigate
16878
+ }
16879
+ ) })
16594
16880
  }
16595
- ) }) }),
16881
+ ),
16596
16882
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center justify-end gap-3", children: [
16597
16883
  actions,
16598
16884
  extra,
@@ -16670,21 +16956,47 @@ function NavigationLayout({
16670
16956
  id: "toggle-headbar",
16671
16957
  label: switchToHeadbarLabel,
16672
16958
  onClick: () => setNavigationMode("headbar"),
16673
- icon: /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-[18px] w-[18px] rotate-180", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [
16674
- /* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
16675
- /* @__PURE__ */ jsx("path", { d: "M3 9h18" })
16676
- ] })
16959
+ icon: /* @__PURE__ */ jsxs(
16960
+ "svg",
16961
+ {
16962
+ xmlns: "http://www.w3.org/2000/svg",
16963
+ className: "h-[18px] w-[18px] rotate-180",
16964
+ viewBox: "0 0 24 24",
16965
+ fill: "none",
16966
+ stroke: "currentColor",
16967
+ strokeWidth: "1.8",
16968
+ strokeLinecap: "round",
16969
+ strokeLinejoin: "round",
16970
+ children: [
16971
+ /* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
16972
+ /* @__PURE__ */ jsx("path", { d: "M3 9h18" })
16973
+ ]
16974
+ }
16975
+ )
16677
16976
  });
16678
16977
  }
16679
16978
  navigationActions.push({
16680
16979
  id: "toggle-sidebar",
16681
16980
  label: sidebarCollapsed ? expandSidebarLabel : collapseSidebarLabel,
16682
16981
  onClick: () => setCollapsed(!sidebarCollapsed),
16683
- icon: /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-[18px] w-[18px]", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [
16684
- /* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
16685
- /* @__PURE__ */ jsx("path", { d: "M9 3v18" }),
16686
- /* @__PURE__ */ jsx("path", { d: sidebarCollapsed ? "m14 9 3 3-3 3" : "m16 15-3-3 3-3" })
16687
- ] })
16982
+ icon: /* @__PURE__ */ jsxs(
16983
+ "svg",
16984
+ {
16985
+ xmlns: "http://www.w3.org/2000/svg",
16986
+ className: "h-[18px] w-[18px]",
16987
+ viewBox: "0 0 24 24",
16988
+ fill: "none",
16989
+ stroke: "currentColor",
16990
+ strokeWidth: "1.8",
16991
+ strokeLinecap: "round",
16992
+ strokeLinejoin: "round",
16993
+ children: [
16994
+ /* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
16995
+ /* @__PURE__ */ jsx("path", { d: "M9 3v18" }),
16996
+ /* @__PURE__ */ jsx("path", { d: sidebarCollapsed ? "m14 9 3 3-3 3" : "m16 15-3-3 3-3" })
16997
+ ]
16998
+ }
16999
+ )
16688
17000
  });
16689
17001
  const sidebar = isHeadbarMode ? null : /* @__PURE__ */ jsx(
16690
17002
  "div",
@@ -16693,7 +17005,10 @@ function NavigationLayout({
16693
17005
  "relative h-full min-h-0 shrink-0 transition-[width] duration-260",
16694
17006
  sidebarCollapsed ? "z-20 overflow-visible" : "z-10 overflow-hidden"
16695
17007
  ),
16696
- style: { width: sidebarWidth, transitionTimingFunction: NAVIGATION_LAYOUT_TRANSITION_TIMING },
17008
+ style: {
17009
+ width: sidebarWidth,
17010
+ transitionTimingFunction: NAVIGATION_LAYOUT_TRANSITION_TIMING
17011
+ },
16697
17012
  children: /* @__PURE__ */ jsx(
16698
17013
  Sidebar,
16699
17014
  {
@@ -16708,7 +17023,10 @@ function NavigationLayout({
16708
17023
  logo,
16709
17024
  onCollapsedChange: setCollapsed,
16710
17025
  onNavigate,
16711
- onRevealRoot: (rootId) => setRevealRequest((prev) => ({ id: rootId, nonce: (prev?.nonce ?? 0) + 1 })),
17026
+ onRevealRoot: (rootId) => setRevealRequest((prev) => ({
17027
+ id: rootId,
17028
+ nonce: (prev?.nonce ?? 0) + 1
17029
+ })),
16712
17030
  revealRequest,
16713
17031
  title: headbarLayout?.brandTitle
16714
17032
  }
@@ -16727,11 +17045,24 @@ function NavigationLayout({
16727
17045
  {
16728
17046
  appearance: NAVIGATION_LAYOUT_DEFAULT_APPEARANCE,
16729
17047
  tone: "muted",
16730
- icon: /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [
16731
- /* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
16732
- /* @__PURE__ */ jsx("path", { d: "M9 3v18" }),
16733
- /* @__PURE__ */ jsx("path", { d: "m14 9 3 3-3 3" })
16734
- ] }),
17048
+ icon: /* @__PURE__ */ jsxs(
17049
+ "svg",
17050
+ {
17051
+ xmlns: "http://www.w3.org/2000/svg",
17052
+ className: "h-4 w-4 shrink-0",
17053
+ viewBox: "0 0 24 24",
17054
+ fill: "none",
17055
+ stroke: "currentColor",
17056
+ strokeWidth: "1.8",
17057
+ strokeLinecap: "round",
17058
+ strokeLinejoin: "round",
17059
+ children: [
17060
+ /* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
17061
+ /* @__PURE__ */ jsx("path", { d: "M9 3v18" }),
17062
+ /* @__PURE__ */ jsx("path", { d: "m14 9 3 3-3 3" })
17063
+ ]
17064
+ }
17065
+ ),
16735
17066
  label: /* @__PURE__ */ jsx("span", { className: "truncate whitespace-nowrap", children: switchToSidebarLabel }),
16736
17067
  onClick: () => setNavigationMode("sidebar"),
16737
17068
  className: cn2(
@@ -16749,7 +17080,16 @@ function NavigationLayout({
16749
17080
  onNavigate
16750
17081
  }
16751
17082
  ) : null;
16752
- return /* @__PURE__ */ jsx(AppLayout, { header, sidebar, flush, className, children });
17083
+ return /* @__PURE__ */ jsx(
17084
+ AppLayout,
17085
+ {
17086
+ header,
17087
+ sidebar,
17088
+ flush,
17089
+ className,
17090
+ children
17091
+ }
17092
+ );
16753
17093
  }
16754
17094
  function ClampIcon({ expanded }) {
16755
17095
  return /* @__PURE__ */ jsxs("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "h-4 w-4", fill: "none", children: [
@@ -16822,6 +17162,7 @@ var WorkbenchResizableSidebar = forwardRef(
16822
17162
  function WorkbenchResizableSidebar2({
16823
17163
  title,
16824
17164
  items,
17165
+ sections = [],
16825
17166
  activeItemId,
16826
17167
  itemAs,
16827
17168
  collapsed,
@@ -16938,6 +17279,7 @@ var WorkbenchResizableSidebar = forwardRef(
16938
17279
  document.body.style.userSelect = "";
16939
17280
  };
16940
17281
  }, [collapseThreshold, collapsible, isResizing, maxWidth, minWidth, resolvedWidth, resolvedCollapsed]);
17282
+ const resolvedItems = sections.length ? [...items, ...sections.flatMap((section) => section.items)] : items;
16941
17283
  const renderItem = (item, mobile = false) => {
16942
17284
  const active = item.active ?? item.id === activeItemId;
16943
17285
  const ItemComponent = itemAs ?? (item.href ? "a" : "button");
@@ -16974,7 +17316,7 @@ var WorkbenchResizableSidebar = forwardRef(
16974
17316
  children: [
16975
17317
  /* @__PURE__ */ jsx("span", { className: cn("inline-flex h-4 w-4 shrink-0 items-center justify-center [&_svg]:h-3.5 [&_svg]:w-3.5", classNames?.itemIcon), children: item.icon }),
16976
17318
  mobile || !resolvedCollapsed ? /* @__PURE__ */ jsx("span", { className: cn("min-w-0 flex-1 truncate", classNames?.itemLabel), children: item.label }) : null,
16977
- !mobile && !resolvedCollapsed && item.endContent ? /* @__PURE__ */ jsx("span", { className: "shrink-0", children: item.endContent }) : null
17319
+ !mobile && !resolvedCollapsed && item.endContent !== void 0 && item.endContent !== null ? /* @__PURE__ */ jsx("span", { className: "shrink-0", children: item.endContent }) : null
16978
17320
  ]
16979
17321
  },
16980
17322
  item.id
@@ -17028,12 +17370,35 @@ var WorkbenchResizableSidebar = forwardRef(
17028
17370
  }
17029
17371
  ) : null
17030
17372
  ] }),
17031
- /* @__PURE__ */ jsx("div", { className: cn("min-h-0 flex-1 space-y-2 overflow-y-auto", resolvedCollapsed && "flex w-full flex-col items-center", classNames?.list), children: items.map((item) => renderItem(item)) })
17373
+ /* @__PURE__ */ jsxs("div", { className: cn("min-h-0 flex-1 space-y-2 overflow-y-auto", resolvedCollapsed && "flex w-full flex-col items-center", classNames?.list), children: [
17374
+ items.map((item) => renderItem(item)),
17375
+ sections.map((section) => /* @__PURE__ */ jsxs(
17376
+ "div",
17377
+ {
17378
+ className: cn("flex w-full flex-col gap-2", classNames?.section, section.className),
17379
+ children: [
17380
+ !resolvedCollapsed && section.label ? /* @__PURE__ */ jsx(
17381
+ "div",
17382
+ {
17383
+ className: cn(
17384
+ "px-2 text-[11px] font-medium text-muted-foreground",
17385
+ classNames?.sectionLabel,
17386
+ section.labelClassName
17387
+ ),
17388
+ children: section.label
17389
+ }
17390
+ ) : null,
17391
+ section.items.map((item) => renderItem(item))
17392
+ ]
17393
+ },
17394
+ section.id
17395
+ ))
17396
+ ] })
17032
17397
  ] })
17033
17398
  ]
17034
17399
  }
17035
17400
  ),
17036
- /* @__PURE__ */ jsx("nav", { className: cn("gap-2 overflow-x-auto pb-1", mobileClassName, classNames?.mobileNav), "aria-label": typeof title === "string" ? title : void 0, children: items.map((item) => renderItem(item, true)) })
17401
+ /* @__PURE__ */ jsx("nav", { className: cn("gap-2 overflow-x-auto pb-1", mobileClassName, classNames?.mobileNav), "aria-label": typeof title === "string" ? title : void 0, children: resolvedItems.map((item) => renderItem(item, true)) })
17037
17402
  ] });
17038
17403
  }
17039
17404
  );
@@ -27162,6 +27527,6 @@ function useDarkMode() {
27162
27527
  return { mode, setMode, resolvedMode };
27163
27528
  }
27164
27529
 
27165
- export { AppHeader, AppLayout, AppSidebar, ApplicationHandoffLink, BaseAccordion, BaseAspectRatio, BaseAvatar, BaseBadge, BaseBreadcrumb, BaseButton, BaseCheckbox, BaseCode, BaseContainer, BaseContextMenu, BaseContextMenuCheckboxItem, BaseContextMenuContent, BaseContextMenuItem, BaseContextMenuLabel, BaseContextMenuRadioGroup, BaseContextMenuRadioItem, BaseContextMenuSeparator, BaseContextMenuSub, BaseContextMenuSubContent, BaseContextMenuSubTrigger, BaseContextMenuTrigger, BaseDescriptionList, BaseDialog, BaseDivider, BaseDropdownMenu, BaseEmptyState, BaseField, BaseFieldset, BaseGrid, BaseHeading, BaseInline, BaseInput, BaseInputGroup, BaseKbd, BaseLayout, BaseLayoutPane, BaseLayoutResizeHandle, BaseLayoutSplit, BaseLink, BaseList, BaseListItem, BaseLoadingState, BaseMultiSelect, BaseNotice, BaseNumberInput, BasePagination, BasePanel, BasePasswordInput, BasePortal, BaseProgress, BaseRadioGroup, BaseScrollArea, BaseSectionHeader, BaseSegmentedControl, BaseSelect, BaseSkeleton, BaseSpinner, BaseStack, BaseSteps, BaseSwitch, BaseTable, BaseTableBody, BaseTableCaption, BaseTableCell, BaseTableContainer, BaseTableEmpty, BaseTableFooter, BaseTableFooterBar, BaseTableHead, BaseTableHeader, BaseTableLoading, BaseTableRow, BaseTabs, BaseText, BaseTextarea, BaseToolbar, BaseTooltip, BaseVisuallyHidden, DarkModeSelector, DarkModeSubMenu, DataExplorerActionBar, DataExplorerButton, DataExplorerCheckbox, DataExplorerCollectionFooter, DataExplorerDetailField, DataExplorerDetailSection, DataExplorerDetailShell, DataExplorerDisplayActionMenu, DataExplorerDisplayCard, DataExplorerDisplayCollectionView, DataExplorerDisplayListItem, DataExplorerDisplayMedia, DataExplorerImagePreview, DataExplorerPage, DataExplorerRecordCard, DataExplorerSelect, DataExplorerToolbarActions, DataExplorerToolbarShell, DataExplorerTree, DataExplorerTreeShell, DataExplorerView, DataExplorerViewCollection, DataExplorerViewItem, DataExplorerViewItemShell, DataExplorerViewShell, DataExplorerViewTree, I18nSelector, InteractiveTable, InteractiveTableEditableTextCell, InteractiveTableReadonlyCell, InteractiveTableSelectCell, LoginPage, MonkeysProvider, MonkeysToastProvider, MonkeysToaster, NavButton, NavigationLayout, OverlayNodeHost, RenderNodeHost, MonkeysToastProvider as ToastProvider, MonkeysToaster as Toaster, UserAccountMenu, WorkbenchAssetGallery, WorkbenchContentPane, WorkbenchContentToolbar, WorkbenchDetailSidebar, WorkbenchEvidenceList, WorkbenchGalleryCard, WorkbenchGallerySettingsButton, WorkbenchGallerySettingsPanel, WorkbenchGalleryView, WorkbenchJourneyNavigation, WorkbenchLaneView, WorkbenchMasonryLayout, WorkbenchMetricGrid, WorkbenchRadarFilterChip, WorkbenchRadarInspectorSection, WorkbenchRadarMatrix, WorkbenchRadarWorkspace, WorkbenchRankedList, WorkbenchRelationshipGraph, WorkbenchResizableSidebar, WorkbenchScatterPlot, WorkbenchSelectionTray, WorkbenchTableView, applyThemeTokens, browserOverlayHistoryAdapter, buildOverlayUrl, calculateHue, calculateLightness, calculateSaturation, cn2 as cn, compileThemeTokens, createSolidColorScale, defaultMonkeysLocale, enUS, extractToastMessage, genTailwindTheme, getBaseBadgeToneClassName, getBaseButtonToneClassName, getBaseMenuItemToneClassName, getBaseNoticeToneClassName, getDataExplorerActionToneClassName, getDataExplorerMenuItemToneClassName, getOverlayPresentationClassNames, getOverlayZIndex, getRenderNodeDataAttributes, getThemeTokenCssValue, isOverlayUrlActive, markDarkColor, mergeMonkeysLocaleMessages, resolveBaseAppearance, resolveDataExplorerAppearance, resolveMonkeysLocale, resolveRenderNodePolicyState, resolveToastVariantForMessage, sessionRenderNodeScrollRestoration, setTailwindTheme, toast, useDarkMode, useMonkeysBaseAppearance, useMonkeysComponentAttributes, useMonkeysDataExplorerAppearance, useMonkeysDirection, useMonkeysEnvironment, useMonkeysLocale, useMonkeysLocaleMessages, useMonkeysPortalOptions, useMonkeysResolvedTheme, useToastFeed, useToastOnValue, zhCN };
27530
+ export { AppHeader, AppLayout, AppShellSidebar, AppSidebar, ApplicationHandoffLink, BaseAccordion, BaseAspectRatio, BaseAvatar, BaseBadge, BaseBreadcrumb, BaseButton, BaseCheckbox, BaseCode, BaseContainer, BaseContextMenu, BaseContextMenuCheckboxItem, BaseContextMenuContent, BaseContextMenuItem, BaseContextMenuLabel, BaseContextMenuRadioGroup, BaseContextMenuRadioItem, BaseContextMenuSeparator, BaseContextMenuSub, BaseContextMenuSubContent, BaseContextMenuSubTrigger, BaseContextMenuTrigger, BaseDescriptionList, BaseDialog, BaseDivider, BaseDropdownMenu, BaseEmptyState, BaseField, BaseFieldset, BaseGrid, BaseHeading, BaseInline, BaseInput, BaseInputGroup, BaseKbd, BaseLayout, BaseLayoutPane, BaseLayoutResizeHandle, BaseLayoutSplit, BaseLink, BaseList, BaseListItem, BaseLoadingState, BaseMultiSelect, BaseNotice, BaseNumberInput, BasePagination, BasePanel, BasePasswordInput, BasePortal, BaseProgress, BaseRadioGroup, BaseScrollArea, BaseSectionHeader, BaseSegmentedControl, BaseSelect, BaseSkeleton, BaseSpinner, BaseStack, BaseSteps, BaseSwitch, BaseTable, BaseTableBody, BaseTableCaption, BaseTableCell, BaseTableContainer, BaseTableEmpty, BaseTableFooter, BaseTableFooterBar, BaseTableHead, BaseTableHeader, BaseTableLoading, BaseTableRow, BaseTabs, BaseText, BaseTextarea, BaseToolbar, BaseTooltip, BaseVisuallyHidden, DarkModeSelector, DarkModeSubMenu, DataExplorerActionBar, DataExplorerButton, DataExplorerCheckbox, DataExplorerCollectionFooter, DataExplorerDetailField, DataExplorerDetailSection, DataExplorerDetailShell, DataExplorerDisplayActionMenu, DataExplorerDisplayCard, DataExplorerDisplayCollectionView, DataExplorerDisplayListItem, DataExplorerDisplayMedia, DataExplorerImagePreview, DataExplorerPage, DataExplorerRecordCard, DataExplorerSelect, DataExplorerToolbarActions, DataExplorerToolbarShell, DataExplorerTree, DataExplorerTreeShell, DataExplorerView, DataExplorerViewCollection, DataExplorerViewItem, DataExplorerViewItemShell, DataExplorerViewShell, DataExplorerViewTree, I18nSelector, InteractiveTable, InteractiveTableEditableTextCell, InteractiveTableReadonlyCell, InteractiveTableSelectCell, LoginPage, MonkeysProvider, MonkeysToastProvider, MonkeysToaster, NavButton, NavigationLayout, OverlayNodeHost, RenderNodeHost, MonkeysToastProvider as ToastProvider, MonkeysToaster as Toaster, UserAccountMenu, WorkbenchAssetGallery, WorkbenchContentPane, WorkbenchContentToolbar, WorkbenchDetailSidebar, WorkbenchEvidenceList, WorkbenchGalleryCard, WorkbenchGallerySettingsButton, WorkbenchGallerySettingsPanel, WorkbenchGalleryView, WorkbenchJourneyNavigation, WorkbenchLaneView, WorkbenchMasonryLayout, WorkbenchMetricGrid, WorkbenchRadarFilterChip, WorkbenchRadarInspectorSection, WorkbenchRadarMatrix, WorkbenchRadarWorkspace, WorkbenchRankedList, WorkbenchRelationshipGraph, WorkbenchResizableSidebar, WorkbenchScatterPlot, WorkbenchSelectionTray, WorkbenchTableView, applyThemeTokens, browserOverlayHistoryAdapter, buildOverlayUrl, calculateHue, calculateLightness, calculateSaturation, cn2 as cn, compileThemeTokens, createSolidColorScale, defaultMonkeysLocale, enUS, extractToastMessage, genTailwindTheme, getBaseBadgeToneClassName, getBaseButtonToneClassName, getBaseMenuItemToneClassName, getBaseNoticeToneClassName, getDataExplorerActionToneClassName, getDataExplorerMenuItemToneClassName, getOverlayPresentationClassNames, getOverlayZIndex, getRenderNodeDataAttributes, getThemeTokenCssValue, isOverlayUrlActive, markDarkColor, mergeMonkeysLocaleMessages, resolveBaseAppearance, resolveDataExplorerAppearance, resolveMonkeysLocale, resolveRenderNodePolicyState, resolveToastVariantForMessage, sessionRenderNodeScrollRestoration, setTailwindTheme, toast, useDarkMode, useMonkeysBaseAppearance, useMonkeysComponentAttributes, useMonkeysDataExplorerAppearance, useMonkeysDirection, useMonkeysEnvironment, useMonkeysLocale, useMonkeysLocaleMessages, useMonkeysPortalOptions, useMonkeysResolvedTheme, useToastFeed, useToastOnValue, zhCN };
27166
27531
  //# sourceMappingURL=index.mjs.map
27167
27532
  //# sourceMappingURL=index.mjs.map