@columenlabs/lumen-ui 0.1.146 → 0.1.147

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.
@@ -42,7 +42,7 @@ export function LumenAppSwitcher({ current, apps, product, menuLabel = 'Apps', }
42
42
  else
43
43
  groups.unshift({ label, apps: [a] });
44
44
  }
45
- return (_jsx(SidebarMenu, { children: _jsx(SidebarMenuItem, { children: _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(SidebarMenuButton, { size: "lg", tooltip: current.name, className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground", children: [current.tile ? (_jsx(AppMark, { app: current, className: "aspect-square size-8 shrink-0 rounded-lg" })) : (_jsx("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground", children: _jsx(AppMark, { app: current, className: "size-4" }) })), _jsxs("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [_jsx("span", { className: "truncate font-semibold", children: current.label ?? current.name }), product && (_jsx("span", { className: "truncate text-xs text-muted-foreground", children: product }))] }), _jsx(ChevronsUpDownIcon, { className: "ml-auto" })] }) }), _jsx(DropdownMenuContent, { className: "min-w-56 max-w-96 rounded-lg", align: "start", side: isMobile ? 'bottom' : 'right', sideOffset: 4, children: groups.map((g, i) => (_jsxs(Fragment, { children: [i > 0 && _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuLabel, { className: "text-xs text-muted-foreground", children: g.label }), g.apps.map((a) => (_jsx(DropdownMenuItem, { asChild: true, className: cn('gap-2 p-2', a.id === current.id && 'bg-muted'), children: _jsxs("a", { href: a.href, "aria-current": a.id === current.id ? 'page' : undefined, children: [a.tile ? (_jsx(AppMark, { app: a, className: "size-6 shrink-0 rounded-md" })) : (_jsx("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-md border", children: _jsx(AppMark, { app: a, className: "size-3.5 shrink-0" }) })), _jsx("span", { className: cn('truncate', a.external && 'shrink-0'), children: a.label ?? a.name }), a.external && (_jsxs(_Fragment, { children: [_jsx("span", { className: "ml-auto min-w-0 truncate text-xs text-muted-foreground", children: hostOf(a.href) }), _jsx(ArrowUpRightIcon, { className: "size-3.5 shrink-0 text-muted-foreground" })] }))] }) }, a.id)))] }, g.label))) })] }) }) }));
45
+ return (_jsx(SidebarMenu, { children: _jsx(SidebarMenuItem, { children: _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(SidebarMenuButton, { size: "lg", tooltip: current.name, className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground", children: [current.tile ? (_jsx(AppMark, { app: current, className: "aspect-square size-8! shrink-0 rounded-lg" })) : (_jsx("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground", children: _jsx(AppMark, { app: current, className: "size-4" }) })), _jsxs("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [_jsx("span", { className: "truncate font-semibold", children: current.label ?? current.name }), product && (_jsx("span", { className: "truncate text-xs text-muted-foreground", children: product }))] }), _jsx(ChevronsUpDownIcon, { className: "ml-auto" })] }) }), _jsx(DropdownMenuContent, { className: "min-w-56 max-w-96 rounded-lg", align: "start", side: isMobile ? 'bottom' : 'right', sideOffset: 4, children: groups.map((g, i) => (_jsxs(Fragment, { children: [i > 0 && _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuLabel, { className: "text-xs text-muted-foreground", children: g.label }), g.apps.map((a) => (_jsx(DropdownMenuItem, { asChild: true, className: cn('gap-2 p-2', a.id === current.id && 'bg-muted'), children: _jsxs("a", { href: a.href, "aria-current": a.id === current.id ? 'page' : undefined, children: [a.tile ? (_jsx(AppMark, { app: a, className: "size-6 shrink-0 rounded-md" })) : (_jsx("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-md border", children: _jsx(AppMark, { app: a, className: "size-3.5 shrink-0" }) })), _jsx("span", { className: cn('truncate', a.external && 'shrink-0'), children: a.label ?? a.name }), a.external && (_jsxs(_Fragment, { children: [_jsx("span", { className: "ml-auto min-w-0 truncate text-xs text-muted-foreground", children: hostOf(a.href) }), _jsx(ArrowUpRightIcon, { className: "size-3.5 shrink-0 text-muted-foreground" })] }))] }) }, a.id)))] }, g.label))) })] }) }) }));
46
46
  }
47
47
  /** How far `url` matches this page: its host, then the longest path it starts. */
48
48
  const matchLength = (url, here) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@columenlabs/lumen-ui",
3
- "version": "0.1.146",
3
+ "version": "0.1.147",
4
4
  "description": "Lumen: shared React components (frame, views, widgets, charts, drawers).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -49,7 +49,7 @@
49
49
  "@codemirror/lang-javascript": "6.2.5",
50
50
  "@codemirror/lang-json": "6.0.2",
51
51
  "@codemirror/lang-sql": "6.10.0",
52
- "@columenlabs/lumen-ui-types": "0.1.146",
52
+ "@columenlabs/lumen-ui-types": "0.1.147",
53
53
  "@dnd-kit/core": "6.3.1",
54
54
  "@dnd-kit/sortable": "10.0.0",
55
55
  "@dnd-kit/utilities": "3.2.2",