@owlmeans/web-panel 0.1.18-rc.32 → 0.1.18-rc.34

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 (54) hide show
  1. package/README.md +11 -6
  2. package/agent-meta/manifest.json +2 -2
  3. package/agent-meta/skills/web-panel/SKILL.md +64 -5
  4. package/build/@/components/ui/dropdown-menu.d.ts +26 -0
  5. package/build/@/components/ui/dropdown-menu.d.ts.map +1 -0
  6. package/build/@/components/ui/dropdown-menu.js +51 -0
  7. package/build/@/components/ui/dropdown-menu.js.map +1 -0
  8. package/build/components/footer/component.d.ts.map +1 -1
  9. package/build/components/footer/component.js +4 -2
  10. package/build/components/footer/component.js.map +1 -1
  11. package/build/components/index.d.ts +1 -0
  12. package/build/components/index.d.ts.map +1 -1
  13. package/build/components/index.js +1 -0
  14. package/build/components/index.js.map +1 -1
  15. package/build/components/link.d.ts.map +1 -1
  16. package/build/components/link.js +6 -3
  17. package/build/components/link.js.map +1 -1
  18. package/build/components/menu/component.d.ts +15 -0
  19. package/build/components/menu/component.d.ts.map +1 -0
  20. package/build/components/menu/component.js +146 -0
  21. package/build/components/menu/component.js.map +1 -0
  22. package/build/components/menu/index.d.ts +3 -0
  23. package/build/components/menu/index.d.ts.map +1 -0
  24. package/build/components/menu/index.js +3 -0
  25. package/build/components/menu/index.js.map +1 -0
  26. package/build/components/menu/types.d.ts +138 -0
  27. package/build/components/menu/types.d.ts.map +1 -0
  28. package/build/components/menu/types.js +17 -0
  29. package/build/components/menu/types.js.map +1 -0
  30. package/build/components/nav/side.d.ts.map +1 -1
  31. package/build/components/nav/side.js +4 -2
  32. package/build/components/nav/side.js.map +1 -1
  33. package/build/components/nav/types.d.ts +2 -1
  34. package/build/components/nav/types.d.ts.map +1 -1
  35. package/build/components/types.d.ts +2 -1
  36. package/build/components/types.d.ts.map +1 -1
  37. package/build/exports.d.ts +1 -1
  38. package/build/exports.d.ts.map +1 -1
  39. package/build/exports.js +1 -1
  40. package/build/exports.js.map +1 -1
  41. package/package.json +30 -28
  42. package/src/@/components/ui/dropdown-menu.tsx +256 -0
  43. package/src/components/footer/component.tsx +4 -2
  44. package/src/components/index.ts +1 -0
  45. package/src/components/link.tsx +6 -3
  46. package/src/components/menu/component.tsx +248 -0
  47. package/src/components/menu/index.ts +2 -0
  48. package/src/components/menu/types.ts +144 -0
  49. package/src/components/nav/side.tsx +4 -2
  50. package/src/components/nav/types.ts +2 -1
  51. package/src/components/types.ts +2 -1
  52. package/src/exports.ts +1 -1
  53. package/tests/harness/mount.tsx +50 -1
  54. package/tests/menu.spec.ts +102 -0
package/README.md CHANGED
@@ -76,17 +76,22 @@ resolve: { alias: { '@': fileURLToPath(new URL('./src/@', import.meta.url)) } }
76
76
 
77
77
  Tailwind's scanner reads your CSS root plus its `@source` directives, and it
78
78
  excludes `node_modules`. Classes that exist only inside this package's
79
- components — the whole navigation shell and footer — therefore never reach your
80
- stylesheet unless you point Tailwind at the built package:
79
+ components — the whole navigation shell, the menu and the footer — therefore
80
+ never reach your stylesheet unless you point Tailwind at the package's sources:
81
81
 
82
82
  ```css
83
83
  @import "tailwindcss";
84
84
 
85
- @source "../../../node_modules/@owlmeans/web-panel/build";
85
+ @source "../../../node_modules/@owlmeans/web-panel/src";
86
86
  ```
87
87
 
88
- Adjust the relative depth to your own layout; the target is this package's
89
- installed `build` directory.
88
+ Adjust the relative depth to your own layout. Point at **`src`, never `build`**:
89
+ the scanner applies the `.gitignore` of whatever repository a path resolves
90
+ into, and a linked `node_modules` entry resolves into a monorepo whose
91
+ `.gitignore` covers every package build directory — a `build` source there scans
92
+ zero files and reports nothing, while the UI renders half-styled with nothing to
93
+ blame. `src` is tracked in the repository and ships in the published tarball, so
94
+ one path serves a linked checkout and an npm install alike.
90
95
 
91
96
  ## Navigation shell
92
97
 
@@ -213,7 +218,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
213
218
  your project's skill store (`.agents/skills/`):
214
219
 
215
220
  ```sh
216
- npx @owlmeans/agent-skills@^0.1.18-rc.12
221
+ npx @owlmeans/agent-skills@^0.1.18-rc.14
217
222
  ```
218
223
 
219
224
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/web-panel",
4
- "version": "0.1.18-rc.32",
5
- "generatedAt": "2026-09-04T22:43:25.453Z",
4
+ "version": "0.1.18-rc.34",
5
+ "generatedAt": "2026-09-10T23:12:07.519Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -8,7 +8,7 @@ user-invocable: false
8
8
  # @owlmeans/web-panel
9
9
 
10
10
  **Layer:** Web (React)
11
- **Install:** `"@owlmeans/web-panel": "^0.1.18-rc.32"` in `dependencies`
11
+ **Install:** `"@owlmeans/web-panel": "^0.1.18-rc.34"` in `dependencies`
12
12
 
13
13
  ## Key Exports
14
14
 
@@ -18,6 +18,7 @@ user-invocable: false
18
18
  | `NavLayout` | The application shell — header, section menu, screen menu, content, footer |
19
19
  | `TopNav` / `SideNav` / `Footer` | The shell's pieces, mountable on their own |
20
20
  | `Toaster` | The application's toast surface — mounted once, in the layout |
21
+ | `PanelMenu` | The dropdown menu, described as data — items, arbitrary widget rows, labels, separators and one level of submenu. `PanelMenuEntry` / `PanelMenuEntryKind` / `PanelMenuProps` come with it |
21
22
  | `Link` | An `<a>` addressing an entrypoint alias (or a literal `src`), with the label taken from i18n |
22
23
  | `LoginScreen` / `LocalizedLoginScreen` / `appendLoginScreen` | The identity-provider choice screen — see `login-methods` |
23
24
  | `render(context, opts?)` | Mounts the tree inside `PanelApp`, with the browser language detector installed on the i18n instance. `opts` is `RenderOptions` plus `rootClassName` |
@@ -168,6 +169,62 @@ Rules that make the shell behave:
168
169
  - **Vendor `navigation-menu`.** `SideNav` builds on the existing `Button`; `TopNav` uses the shadcn
169
170
  `navigation-menu` primitive — see the `@` contract below.
170
171
 
172
+ ### Menus — `PanelMenu`
173
+
174
+ One dropdown, described as an ENTRY LIST rather than as children. Every kind has its own focus,
175
+ keyboard and close-on-select behaviour, so children would silently lose all three; and the same
176
+ description then serves a collapsed toolbar, a header overflow and a mobile shell without any of
177
+ them re-deriving it.
178
+
179
+ ```tsx
180
+ import { PanelMenu, PanelMenuEntryKind } from '@owlmeans/web-panel'
181
+ import type { PanelMenuEntry } from '@owlmeans/web-panel'
182
+
183
+ const entries: PanelMenuEntry[] = [
184
+ { kind: PanelMenuEntryKind.Widget, key: 'credits', render: <AccountCredits /> },
185
+ { kind: PanelMenuEntryKind.Separator, key: 'sep' },
186
+ { kind: PanelMenuEntryKind.Label, key: 'app', label: 'MyApp' },
187
+ { kind: PanelMenuEntryKind.Item, key: 'home', alias: HOME, Icon: House },
188
+ { kind: PanelMenuEntryKind.Item, key: 'docs', href: DOCS, open: true, hint: <ExternalLink className="size-3.5" /> },
189
+ { kind: PanelMenuEntryKind.Sub, key: 'lang', label: 'Language', hint: 'EN', entries: languages },
190
+ ]
191
+
192
+ <PanelMenu entries={entries} translate={t} triggerLabel="Menu" indicator={dot} align="end" />
193
+ ```
194
+
195
+ | Kind | What it is |
196
+ |---|---|
197
+ | `Item` | A focusable row that closes the menu. Exactly one of `alias` (an entrypoint) or `href`, the same union `PanelNavLink` uses; neither makes it a pure `onSelect` action. Also `Icon`, `hint` (right-aligned), `active`, `disabled`, `variant` |
198
+ | `Widget` | Arbitrary content as a plain ROW — see below |
199
+ | `Label` | A section heading |
200
+ | `Separator` | A rule between blocks |
201
+ | `Sub` | One nested level. A `Sub` inside a `Sub` renders nothing — a dropdown that nests further is a navigation tree, not this |
202
+
203
+ Rules the component owns, each of which was a real failure:
204
+
205
+ - **A `Widget` is a row, never a `DropdownMenuItem`.** An item takes both the focus and the
206
+ activation from the controls inside it: Radix's roving tabindex swallows the inner button's
207
+ keyboard access, and `onSelect` fires on any click that lands on the row — so a "Top up" button
208
+ inside an item dismisses the menu before its own handler is observed. The row takes no roving
209
+ focus and does not close the menu; the widget's own buttons are the click targets.
210
+ - **An in-app link cannot use `onSelect`.** The anchor must call `preventDefault()` or the browser
211
+ performs a full page load, and Radix composes its click handler with `checkForDefaultPrevented`
212
+ — so preventing the default also cancels `onSelect`, and with it the automatic close. `PanelMenu`
213
+ therefore navigates and closes explicitly from the anchor's own handler, and keeps its own open
214
+ state for that (a caller's `open`/`onOpenChange` still wins).
215
+ - **The href resolves synchronously.** `Link` asks `entrypoint.url()` and settles a frame later,
216
+ which is fine for a link already on screen; a menu's content mounts at the moment it opens, so an
217
+ href that arrives afterwards is missing exactly while the row is being read. `PanelMenu` uses
218
+ `entrypoint.path()` — a lookup — and answers `undefined` for a path carrying route parameters.
219
+ Never drop the `href`: an `<a>` without one is not focusable, does not answer the keyboard,
220
+ cannot be opened in a new tab, and does not carry the `link` role.
221
+ - **`hidden` takes the separators it orphans with it.** A caller composes the menu from optional
222
+ blocks; filtering the entries alone leaves a leading rule, a doubled rule, or one under the last
223
+ item. Normalisation is the whole reason the entries are data.
224
+ - **`translate` is a prop**, defaulting to `defaultNavTranslate` — same reason as the nav shell.
225
+ - `indicator` is a slot on the trigger's corner (a notification dot, a count), not a `tone` enum:
226
+ what deserves attention is the application's judgement.
227
+
171
228
  ### Toasts — `Toaster`
172
229
 
173
230
  An action that succeeded or failed says so in a toast. The surface is `Toaster`; the messages are
@@ -298,9 +355,10 @@ under *Consumer setup* below. Without it the dialog renders half-styled.
298
355
  ## Consumer setup — the `@` contract and Tailwind
299
356
 
300
357
  `web-panel` emits `@/components/ui/*` and `@/lib/utils` verbatim; the app's bundler resolves `@` to
301
- its own shadcn copy. Vendor every primitive the package imports: `alert`, `button`, `card`, `input`,
302
- `label`, `navigation-menu`, `progress` (plus `separator` if you use it), and add
303
- `@radix-ui/react-navigation-menu` alongside the other Radix peers.
358
+ its own shadcn copy. Vendor every primitive the package imports: `alert`, `button`, `card`,
359
+ `dropdown-menu`, `input`, `label`, `navigation-menu`, `progress` (plus `separator` if you use it),
360
+ and add `@radix-ui/react-navigation-menu` and `@radix-ui/react-dropdown-menu` alongside the other
361
+ Radix peers.
304
362
 
305
363
  The vendored `@/lib/utils` stays — the package's own components resolve `cn` through it — but the
306
364
  app's own components import `cn` from `@owlmeans/web-panel` instead of declaring a third copy. The
@@ -331,7 +389,8 @@ linked checkout and an npm install alike.
331
389
  - `@owlmeans/queue` — `JobRecord` / `JobState`, read by the `./jobs` subpath
332
390
  - Peers (app-provided): `react`, `react-dom`, `react-hook-form`, `tailwindcss`, `tailwind-merge`,
333
391
  `clsx`, `class-variance-authority`, `lucide-react`, `ajv`, and the `@radix-ui/react-*` primitives
334
- (`label`, `navigation-menu`, `progress`, `separator`, `slot`). No MUI, no react-router.
392
+ (`dropdown-menu`, `label`, `navigation-menu`, `progress`, `separator`, `slot`). No MUI, no
393
+ react-router.
335
394
  - `ajv-formats` is imported at module scope by the form model but is declared in no dependency
336
395
  section of the manifest, which lists `ajv` alone. An install that does not otherwise pull it in
337
396
  fails at import time, so declare `ajv-formats` next to `ajv` in the consuming application.
@@ -0,0 +1,26 @@
1
+ import * as React from "react";
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
4
+ declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
5
+ declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React.JSX.Element;
6
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): React.JSX.Element;
7
+ declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): React.JSX.Element;
8
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
9
+ inset?: boolean;
10
+ variant?: "default" | "destructive";
11
+ }): React.JSX.Element;
12
+ declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): React.JSX.Element;
13
+ declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): React.JSX.Element;
14
+ declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): React.JSX.Element;
15
+ declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
16
+ inset?: boolean;
17
+ }): React.JSX.Element;
18
+ declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): React.JSX.Element;
19
+ declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
20
+ declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
21
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
22
+ inset?: boolean;
23
+ }): React.JSX.Element;
24
+ declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): React.JSX.Element;
25
+ export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
26
+ //# sourceMappingURL=dropdown-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../../src/@/components/ui/dropdown-menu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,qBAAqB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+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
4
+ import { cn } from "@/lib/utils";
5
+ function DropdownMenu({ ...props }) {
6
+ return _jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
7
+ }
8
+ function DropdownMenuPortal({ ...props }) {
9
+ return (_jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props }));
10
+ }
11
+ function DropdownMenuTrigger({ ...props }) {
12
+ return (_jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props }));
13
+ }
14
+ function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
15
+ return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className), ...props }) }));
16
+ }
17
+ function DropdownMenuGroup({ ...props }) {
18
+ return (_jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props }));
19
+ }
20
+ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
21
+ return (_jsx(DropdownMenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
22
+ }
23
+ function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
24
+ return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
25
+ }
26
+ function DropdownMenuRadioGroup({ ...props }) {
27
+ return (_jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }));
28
+ }
29
+ function DropdownMenuRadioItem({ className, children, ...props }) {
30
+ return (_jsxs(DropdownMenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
31
+ }
32
+ function DropdownMenuLabel({ className, inset, ...props }) {
33
+ return (_jsx(DropdownMenuPrimitive.Label, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className), ...props }));
34
+ }
35
+ function DropdownMenuSeparator({ className, ...props }) {
36
+ return (_jsx(DropdownMenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn("bg-border -mx-1 my-1 h-px", className), ...props }));
37
+ }
38
+ function DropdownMenuShortcut({ className, ...props }) {
39
+ return (_jsx("span", { "data-slot": "dropdown-menu-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...props }));
40
+ }
41
+ function DropdownMenuSub({ ...props }) {
42
+ return _jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
43
+ }
44
+ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
45
+ return (_jsxs(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] }));
46
+ }
47
+ function DropdownMenuSubContent({ className, ...props }) {
48
+ return (_jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className), ...props }));
49
+ }
50
+ export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
51
+ //# sourceMappingURL=dropdown-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../../src/@/components/ui/dropdown-menu.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEtE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAEhC,SAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACgD;IACxD,OAAO,KAAC,qBAAqB,CAAC,IAAI,iBAAW,eAAe,KAAK,KAAK,GAAI,CAAA;AAC5E,CAAC;AAED,SAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACkD;IAC1D,OAAO,CACL,KAAC,qBAAqB,CAAC,MAAM,iBAAW,sBAAsB,KAAK,KAAK,GAAI,CAC7E,CAAA;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,EAC3B,GAAG,KAAK,EACmD;IAC3D,OAAO,CACL,KAAC,qBAAqB,CAAC,OAAO,iBAClB,uBAAuB,KAC7B,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,UAAU,GAAG,CAAC,EACd,GAAG,KAAK,EACmD;IAC3D,OAAO,CACL,KAAC,qBAAqB,CAAC,MAAM,cAC3B,KAAC,qBAAqB,CAAC,OAAO,iBAClB,uBAAuB,EACjC,UAAU,EAAE,UAAU,EACtB,SAAS,EA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S,EAAC,gBAAgB,GAAG,IACd,CACpC,CAAA;AACH,CAAC;AAED,SAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACsD;IAC9D,OAAO,CACL,KAAC,qBAAqB,CAAC,UAAU,iBACrB,2BAA2B,EACrC,SAAS,EAAE,EAAE,CACX,+eAA+e,EAC/e,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/footer/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAK/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAqBlC,CAAA"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/footer/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAM/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAsBlC,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { defaultNavTranslate, resolveNavLabel } from '@owlmeans/client-panel';
3
+ import { aliasOf } from '@owlmeans/entrypoint';
3
4
  import { cn } from '@/lib/utils';
4
5
  import { Link } from '../link.js';
5
6
  /**
@@ -15,10 +16,11 @@ export const Footer = ({ links, translate = defaultNavTranslate, children, class
15
16
  return null;
16
17
  }
17
18
  return _jsx("footer", { className: cn('border-t py-6', className), style: style, children: _jsxs("div", { className: cn('flex flex-wrap items-center gap-4 text-sm px-4', containerClassName), children: [links?.map((link, idx) => {
18
- const label = resolveNavLabel(translate, link.label, `modules.${link.alias ?? link.href ?? ''}`, link.alias ?? link.href);
19
+ const alias = link.alias == null ? undefined : aliasOf(link.alias);
20
+ const label = resolveNavLabel(translate, link.label, `modules.${alias ?? link.href ?? ''}`, alias ?? link.href);
19
21
  return link.href != null
20
22
  ? _jsx(Link, { src: link.href, open: link.open, children: label }, `${link.href}:${idx}`)
21
- : _jsx(Link, { module: link.alias, open: link.open, children: label }, `${link.alias}:${idx}`);
23
+ : _jsx(Link, { module: link.alias, open: link.open, children: label }, `${alias}:${idx}`);
22
24
  }), children] }) });
23
25
  };
24
26
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/footer/component.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7E,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAIjC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,MAAM,GAAoB,CAAC,EACtC,KAAK,EAAE,SAAS,GAAG,mBAAmB,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,kBAAkB,EACvF,EAAE,EAAE;IACH,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;QAC5D,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,iBAAQ,SAAS,EAAE,EAAE,CAAC,eAAe,EA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  export * from './panel-app/index.js';
3
3
  export * from './layout/index.js';
4
4
  export * from './nav/index.js';
5
+ export * from './menu/index.js';
5
6
  export * from './footer/index.js';
6
7
  export * from './login/index.js';
7
8
  export * from './form/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAE/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AAEnC,cAAc,mBAAmB,CAAA;AAEjC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAE/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AAEnC,cAAc,mBAAmB,CAAA;AAEjC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -1,6 +1,7 @@
1
1
  export * from './panel-app/index.js';
2
2
  export * from './layout/index.js';
3
3
  export * from './nav/index.js';
4
+ export * from './menu/index.js';
4
5
  export * from './footer/index.js';
5
6
  export * from './login/index.js';
6
7
  export * from './form/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AAEnC,cAAc,mBAAmB,CAAA;AAEjC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AAEnC,cAAc,mBAAmB,CAAA;AAEjC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/components/link.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAM3C,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAmC9B,CAAA"}
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/components/link.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAO3C,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAqC9B,CAAA"}
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { usePanelI18n } from '@owlmeans/client-panel';
3
3
  import { useValue } from '@owlmeans/client';
4
4
  import { useContext } from '@owlmeans/web-client';
5
+ import { aliasOf } from '@owlmeans/entrypoint';
5
6
  import { cn } from '@/lib/utils';
6
7
  export const Link = ({ src, module, name, children, center, open, className, style }) => {
7
8
  const t = usePanelI18n();
@@ -11,8 +12,10 @@ export const Link = ({ src, module, name, children, center, open, className, sty
11
12
  return src;
12
13
  }
13
14
  if (module != null) {
14
- module = typeof module === 'string' ? context.entrypoint(module) : module;
15
- const url = await module.url();
15
+ const entrypoint = typeof module === 'object' && '_entrypoint' in module
16
+ ? module
17
+ : context.entrypoint(module);
18
+ const url = await entrypoint.url();
16
19
  return url;
17
20
  }
18
21
  return null;
@@ -21,7 +24,7 @@ export const Link = ({ src, module, name, children, center, open, className, sty
21
24
  ? t(name)
22
25
  : children != null || module == null
23
26
  ? undefined
24
- : t(`modules.${typeof module === 'string' ? module : module.alias}`);
27
+ : t(`modules.${aliasOf(module)}`);
25
28
  const target = open ? '_blank' : undefined;
26
29
  const rel = open ? 'noopener noreferrer' : undefined;
27
30
  return _jsx("a", { href: href ?? undefined, target: target, rel: rel, className: cn('text-primary underline-offset-4 hover:underline', center && 'text-center', className), style: style, children: label ?? children });
@@ -1 +1 @@
1
- {"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/components/link.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAGrD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAEhC,MAAM,CAAC,MAAM,IAAI,GAAkB,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;IACrG,MAAM,CAAC,GAAG,YAAY,EAAE,CAAA;IACxB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAE5B,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,IAAI,EAAE;QAC/B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YAChB,OAAO,GAAG,CAAA;QACZ,CAAC;QACD,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;YACnB,MAAM,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAA2B,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;YACnG,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,EAAE,CAAA;YAC9B,OAAO,GAAG,CAAA;QACZ,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAA;IAEjB,MAAM,KAAK,GAAG,IAAI,IAAI,IAAI;QACxB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACT,CAAC,CAAC,QAAQ,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI;YAClC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,CAAC,C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QACZ,CAAC;QACD,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;YACnB,MAAM,UAAU,GAAG,OAAO,MAAM,KAAK,QAAQ,IAAI,aAAa,IAAI,MAAM;gBACtE,CAAC,CAAC,MAAM;gBACR,CAAC,CAAC,OAAO,CAAC,UAAU,CAA2B,MAAM,CAAC,CAAA;YACxD,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,GAAG,EAAE,CAAA;YAClC,OAAO,GAAG,CAAA;QACZ,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAA;IAEjB,MAAM,KAAK,GAAG,IAAI,IAAI,IAAI;QACxB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACT,CAAC,CAAC,QAAQ,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI;YAClC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,CAAC,CAAC,WAAW,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IACrC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAA;IAC1C,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAA;IAEpD,OAAO,YACL,IAAI,EAAE,IAAI,IAAI,SAAS,EACvB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,iDAAiD,EACjD,MAAM,IAAI,aAAa,EACvB,SAAS,CACV,EACD,KAAK,EAAE,KAAK,YACZ,KAAK,IAAI,QAAQ,GAAK,CAAA;AAC1B,CAAC,CAAA"}
@@ -0,0 +1,15 @@
1
+ import type { FC } from 'react';
2
+ import type { PanelMenuProps } from './types.js';
3
+ /**
4
+ * The application menu — one dropdown, described as data.
5
+ *
6
+ * Built on the shadcn `dropdown-menu` primitive under the `@` contract: the specifier is emitted
7
+ * verbatim and resolves to the CONSUMING app's own copy, so an app must vendor
8
+ * `dropdown-menu.tsx` and declare `@radix-ui/react-dropdown-menu` alongside the other Radix peers.
9
+ *
10
+ * Entries are a closed union rather than children because every kind has different focus,
11
+ * keyboard and close-on-select behaviour, and because the same description then serves a
12
+ * collapsed toolbar, a header overflow and a mobile shell without any of them re-deriving it.
13
+ */
14
+ export declare const PanelMenu: FC<PanelMenuProps>;
15
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/menu/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAA;AAsB1C,OAAO,KAAK,EAC0B,cAAc,EACnD,MAAM,YAAY,CAAA;AAkDnB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAkKxC,CAAA"}
@@ -0,0 +1,146 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { isValidElement, useCallback, useMemo, useState } from 'react';
3
+ import { Menu } from 'lucide-react';
4
+ import { defaultNavTranslate, resolveNavLabel } from '@owlmeans/client-panel';
5
+ import { useContext, useNavigate } from '@owlmeans/client';
6
+ import { cn } from '@/lib/utils';
7
+ import { Button } from '@/components/ui/button';
8
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu';
9
+ import { PanelMenuEntryKind } from './types.js';
10
+ /**
11
+ * Drop the entries nobody asked to see, then the rules those leave behind.
12
+ *
13
+ * A caller composes a menu from optional blocks — a project section that only exists on a
14
+ * project screen, an auth row that only exists while signed in — and expresses "not now" as
15
+ * `hidden`. Filtering the entries alone leaves the separators that framed them, so the menu
16
+ * opens onto a leading rule, a doubled rule, or a rule under the last item. Normalising here
17
+ * rather than at every call site is the whole reason the entries are data.
18
+ */
19
+ const usable = (entries) => {
20
+ const visible = entries.filter(entry => entry.hidden !== true);
21
+ const kept = [];
22
+ for (const entry of visible) {
23
+ if (entry.kind !== PanelMenuEntryKind.Separator) {
24
+ kept.push(entry);
25
+ continue;
26
+ }
27
+ const previous = kept[kept.length - 1];
28
+ if (previous != null && previous.kind !== PanelMenuEntryKind.Separator) {
29
+ kept.push(entry);
30
+ }
31
+ }
32
+ while (kept.length > 0 && kept[kept.length - 1].kind === PanelMenuEntryKind.Separator) {
33
+ kept.pop();
34
+ }
35
+ return kept;
36
+ };
37
+ const labelOf = (translate, entry) => resolveNavLabel(translate, entry.label, entry.labelKey ?? (entry.alias != null ? `modules.${entry.alias}` : `menu.${entry.key}`), entry.alias ?? entry.key);
38
+ const renderWidget = (entry, className) => {
39
+ if (isValidElement(entry.render) || typeof entry.render !== 'function') {
40
+ return entry.render;
41
+ }
42
+ const Widget = entry.render;
43
+ return _jsx(Widget, { className: className });
44
+ };
45
+ /**
46
+ * The application menu — one dropdown, described as data.
47
+ *
48
+ * Built on the shadcn `dropdown-menu` primitive under the `@` contract: the specifier is emitted
49
+ * verbatim and resolves to the CONSUMING app's own copy, so an app must vendor
50
+ * `dropdown-menu.tsx` and declare `@radix-ui/react-dropdown-menu` alongside the other Radix peers.
51
+ *
52
+ * Entries are a closed union rather than children because every kind has different focus,
53
+ * keyboard and close-on-select behaviour, and because the same description then serves a
54
+ * collapsed toolbar, a header overflow and a mobile shell without any of them re-deriving it.
55
+ */
56
+ export const PanelMenu = ({ entries, translate = defaultNavTranslate, trigger, triggerLabel, indicator, align = 'end', side, triggerClassName, contentClassName, open, onOpenChange, testId, className, style, }) => {
57
+ const context = useContext();
58
+ const nav = useNavigate();
59
+ const [selfOpen, setSelfOpen] = useState(false);
60
+ const isOpen = open ?? selfOpen;
61
+ const setOpen = useCallback((next) => {
62
+ setSelfOpen(next);
63
+ onOpenChange?.(next);
64
+ }, [onOpenChange]);
65
+ /**
66
+ * The path an alias addresses, resolved SYNCHRONOUSLY.
67
+ *
68
+ * `Link` asks `entrypoint.url()` and settles a frame later, which is fine for a link that is
69
+ * already on screen. A menu's content mounts at the moment it opens, so an href that arrives
70
+ * afterwards is missing exactly while the user is reading the row: not focusable as a link,
71
+ * not middle-clickable, no status-bar target. `path()` is a lookup against the entrypoint's own
72
+ * declaration, so it answers immediately — and answers `undefined` for a path carrying route
73
+ * parameters, where there is no honest URL to show yet.
74
+ */
75
+ const hrefOf = useMemo(() => (alias) => {
76
+ try {
77
+ const path = context.entrypoint(alias).path();
78
+ return path.includes(':') ? undefined : path;
79
+ }
80
+ catch {
81
+ // An alias the app never elevated addresses nothing. It must not take the menu down.
82
+ return undefined;
83
+ }
84
+ }, [context]);
85
+ const select = (entry) => {
86
+ entry.onSelect?.();
87
+ if (entry.href == null && entry.alias != null) {
88
+ nav.press(entry.alias)();
89
+ }
90
+ };
91
+ const renderItem = (entry) => {
92
+ const external = entry.href != null;
93
+ const href = entry.href ?? (entry.alias != null ? hrefOf(entry.alias) : undefined);
94
+ // An in-app link is the one case that cannot use Radix's `onSelect`. The anchor must call
95
+ // `preventDefault()` or the browser performs a full page load, and Radix composes its own
96
+ // click handler with `checkForDefaultPrevented: true` — so preventing the default also
97
+ // cancels `onSelect`, and with it the automatic close. Both are driven explicitly below.
98
+ // Left implicit, the row navigated nowhere and the menu stayed open.
99
+ const inApp = !external && href != null;
100
+ const body = _jsxs(_Fragment, { children: [entry.Icon != null ? _jsx(entry.Icon, { className: "size-4 shrink-0" }) : null, _jsx("span", { className: "flex-1 truncate", children: labelOf(translate, entry) }), entry.hint != null
101
+ ? _jsx("span", { className: "ml-auto shrink-0 text-xs text-muted-foreground", children: entry.hint })
102
+ : null] });
103
+ // `key` stays OUT of this bag — React refuses a key arriving through a spread.
104
+ const shared = {
105
+ disabled: entry.disabled,
106
+ variant: entry.variant,
107
+ 'aria-current': entry.active === true ? 'true' : undefined,
108
+ className: cn(entry.active === true && 'bg-accent text-accent-foreground'),
109
+ };
110
+ // A menu entry is a real link wherever it addresses something. An `<a>` without `href` is
111
+ // not focusable, does not answer the keyboard, cannot be opened in a new tab, and does not
112
+ // even carry the `link` role.
113
+ return href != null
114
+ ? _jsx(DropdownMenuItem, { ...shared, onSelect: inApp ? undefined : () => select(entry), asChild: true, children: _jsx("a", { href: href, target: external && entry.open === true ? '_blank' : undefined, rel: external && entry.open === true ? 'noopener noreferrer' : undefined, onClick: inApp
115
+ ? event => { event.preventDefault(); select(entry); setOpen(false); }
116
+ : undefined, children: body }) }, entry.key)
117
+ : _jsx(DropdownMenuItem, { ...shared, onSelect: () => select(entry), children: body }, entry.key);
118
+ };
119
+ const renderSub = (entry) => _jsxs(DropdownMenuSub, { children: [_jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [entry.Icon != null ? _jsx(entry.Icon, { className: "size-4 shrink-0" }) : null, _jsx("span", { className: "flex-1 truncate", children: labelOf(translate, entry) }), entry.hint != null
120
+ ? _jsx("span", { className: "ml-auto shrink-0 text-xs text-muted-foreground", children: entry.hint })
121
+ : null] }), _jsx(DropdownMenuSubContent, { children: usable(entry.entries).map(nested => renderEntry(nested, true)) })] }, entry.key);
122
+ const renderEntry = (entry, nested = false) => {
123
+ switch (entry.kind) {
124
+ case PanelMenuEntryKind.Separator:
125
+ return _jsx(DropdownMenuSeparator, {}, entry.key);
126
+ case PanelMenuEntryKind.Label:
127
+ return _jsx(DropdownMenuLabel, { className: "truncate text-xs text-muted-foreground", children: labelOf(translate, entry) }, entry.key);
128
+ case PanelMenuEntryKind.Sub:
129
+ // One level. A dropdown that nests further is a navigation tree, not this primitive.
130
+ return nested ? null : renderSub(entry);
131
+ case PanelMenuEntryKind.Widget: {
132
+ const caption = entry.label != null || entry.labelKey != null
133
+ // Inline, the caption names a control on the same line and reads as an item's label;
134
+ // stacked, it is a heading over the widget below it.
135
+ ? _jsx("span", { className: cn('shrink-0', entry.inline === true ? 'text-sm' : 'text-xs text-muted-foreground'), children: labelOf(translate, entry) })
136
+ : null;
137
+ return _jsxs("div", { "data-panel-menu-row": entry.key, className: cn('flex min-w-0 gap-2 px-2 py-1.5 text-sm', entry.inline === true ? 'items-center' : 'flex-col items-stretch', entry.className), children: [caption, renderWidget(entry, 'min-w-0 flex-1')] }, entry.key);
138
+ }
139
+ default:
140
+ return renderItem(entry);
141
+ }
142
+ };
143
+ const rows = usable(entries);
144
+ return _jsxs(DropdownMenu, { open: isOpen, onOpenChange: setOpen, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: trigger ?? _jsxs(Button, { variant: "outline", size: "icon", "aria-label": triggerLabel, title: triggerLabel, "data-testid": testId, className: cn('relative', triggerClassName, className), style: style, children: [_jsx(Menu, { className: "size-4" }), indicator] }) }), _jsx(DropdownMenuContent, { align: align, side: side, className: cn('w-72', contentClassName), children: rows.map(entry => renderEntry(entry)) })] });
145
+ };
146
+ //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/menu/component.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAE7E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE1D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EAAE,kBAAkB,EAAE,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C,SAAS,EAAC,QAAQ,GAAG,EAC1B,SAAS,IACH,GACW,EACtB,KAAC,mBAAmB,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,gBAAgB,CAAC,YACnF,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,GAClB,IACT,CAAA;AACjB,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './types.js';
2
+ export * from './component.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './types.js';
2
+ export * from './component.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}