@nadicodeai/ui 12.1.206 → 12.1.207

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 (67) hide show
  1. package/dist/components/account-menu.d.ts.map +1 -1
  2. package/dist/components/account-menu.js +7 -5
  3. package/dist/components/action-menu.d.ts +119 -23
  4. package/dist/components/action-menu.d.ts.map +1 -1
  5. package/dist/components/action-menu.js +52 -24
  6. package/dist/components/catalog-entry.d.ts +3 -2
  7. package/dist/components/catalog-entry.d.ts.map +1 -1
  8. package/dist/components/collection-page.d.ts +6 -3
  9. package/dist/components/collection-page.d.ts.map +1 -1
  10. package/dist/components/collection-page.js +4 -3
  11. package/dist/components/confirm-dialog.d.ts +37 -10
  12. package/dist/components/confirm-dialog.d.ts.map +1 -1
  13. package/dist/components/confirm-dialog.js +63 -11
  14. package/dist/components/data-table.d.ts +2 -2
  15. package/dist/components/data-table.d.ts.map +1 -1
  16. package/dist/components/data-table.js +7 -2
  17. package/dist/components/input-group.d.ts +1 -1
  18. package/dist/components/message-notice.js +1 -1
  19. package/dist/components/notice-banner.d.ts +1 -1
  20. package/dist/components/notice-banner.js +1 -1
  21. package/dist/components/object-page.d.ts +4 -1
  22. package/dist/components/object-page.d.ts.map +1 -1
  23. package/dist/components/object-page.js +3 -2
  24. package/dist/components/overview-page.d.ts +4 -1
  25. package/dist/components/overview-page.d.ts.map +1 -1
  26. package/dist/components/overview-page.js +3 -2
  27. package/dist/components/page-actions.d.ts +12 -61
  28. package/dist/components/page-actions.d.ts.map +1 -1
  29. package/dist/components/page-actions.js +27 -35
  30. package/dist/components/record-commands.d.ts +71 -0
  31. package/dist/components/record-commands.d.ts.map +1 -0
  32. package/dist/components/record-commands.js +92 -0
  33. package/dist/components/record-list.d.ts +32 -64
  34. package/dist/components/record-list.d.ts.map +1 -1
  35. package/dist/components/record-list.js +53 -61
  36. package/dist/components/record-sheet.d.ts +3 -3
  37. package/dist/components/record-sheet.d.ts.map +1 -1
  38. package/dist/components/settings-page.d.ts +5 -2
  39. package/dist/components/settings-page.d.ts.map +1 -1
  40. package/dist/components/settings-page.js +4 -3
  41. package/dist/internal/catalog-list.d.ts.map +1 -1
  42. package/dist/internal/catalog-list.js +2 -4
  43. package/dist/internal/command-runner.d.ts +13 -0
  44. package/dist/internal/command-runner.d.ts.map +1 -0
  45. package/dist/internal/command-runner.js +67 -0
  46. package/dist/internal/page-command-button.d.ts +83 -0
  47. package/dist/internal/page-command-button.d.ts.map +1 -0
  48. package/dist/internal/page-command-button.js +47 -0
  49. package/dist/internal/record-menu-items.d.ts +7 -5
  50. package/dist/internal/record-menu-items.d.ts.map +1 -1
  51. package/dist/internal/record-menu-items.js +1 -9
  52. package/dist/showcase/samples.d.ts +9 -2
  53. package/dist/showcase/samples.d.ts.map +1 -1
  54. package/dist/showcase/samples.js +15 -1
  55. package/dist/showcase/specimens/actions.d.ts +2 -0
  56. package/dist/showcase/specimens/actions.d.ts.map +1 -1
  57. package/dist/showcase/specimens/actions.js +4 -1
  58. package/dist/showcase/specimens/compositions.d.ts.map +1 -1
  59. package/dist/showcase/specimens/compositions.js +17 -14
  60. package/dist/showcase/specimens/index.d.ts +2 -0
  61. package/dist/showcase/specimens/index.d.ts.map +1 -1
  62. package/dist/showcase/specimens/menus.d.ts.map +1 -1
  63. package/dist/showcase/specimens/menus.js +4 -3
  64. package/dist/showcase/usage.generated.d.ts +1 -1
  65. package/dist/showcase/usage.generated.d.ts.map +1 -1
  66. package/dist/showcase/usage.generated.js +51 -29
  67. package/package.json +2 -2
@@ -2,12 +2,11 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { CheckIcon, PlusIcon } from "lucide-react";
4
4
  import { useId } from "react";
5
- import { ActionMenu } from "../components/action-menu.js";
6
5
  import { IdentityMark } from "../components/identity-mark.js";
7
6
  import { PageCommandButton } from "../components/page-actions.js";
7
+ import { RecordCommands } from "../components/record-commands.js";
8
8
  import { Skeleton, SkeletonRegion } from "../components/skeleton.js";
9
9
  import { textLinkVariants } from "../components/text-link.js";
10
- import { soleMenuButton } from "./record-menu-items.js";
11
10
  import { RowMessageActions, RowMessageLine } from "./row-message.js";
12
11
  import { cn } from "../lib/utils.js";
13
12
  const ENTRY_FRAME = "flex min-w-0 items-start gap-3.5 rounded-sm bg-card p-4 nc-elevation-resting";
@@ -29,8 +28,7 @@ function EntryAdd({ add }) {
29
28
  return (_jsx(PageCommandButton, { command: { ...command, icon: _jsx(PlusIcon, { "aria-hidden": "true" }) }, variant: "outline" }));
30
29
  }
31
30
  function CatalogEntry({ add, description, fact, link, mark, menu, name, state, }) {
32
- const menuButton = add || !menu ? undefined : soleMenuButton(menu.commands);
33
- return (_jsxs("li", { className: ENTRY_FRAME, "data-slot": "catalog-entry", children: [_jsx(IdentityMark, { ...mark, size: 40 }), _jsxs("div", { className: "grid min-w-0 flex-1 gap-0.5", children: [_jsx("span", { className: "truncate text-sm font-medium text-foreground", children: _jsx(EntryName, { link: link, name: name }) }), _jsx("p", { className: cn("text-body-sm text-muted-foreground", !state && "line-clamp-1"), children: state ? _jsx(RowMessageLine, { state: state }) : description })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [fact, state ? _jsx(RowMessageActions, { state: state }) : null, add ? _jsx(EntryAdd, { add: add }) : null, menuButton ? _jsx(PageCommandButton, { command: menuButton, variant: "outline" }) : null, menu && !menuButton ? (_jsx(ActionMenu, { commands: menu.commands, label: menu.label, record: name })) : null] })] }));
31
+ return (_jsxs("li", { className: ENTRY_FRAME, "data-slot": "catalog-entry", children: [_jsx(IdentityMark, { ...mark, size: 40 }), _jsxs("div", { className: "grid min-w-0 flex-1 gap-0.5", children: [_jsx("span", { className: "truncate text-sm font-medium text-foreground", children: _jsx(EntryName, { link: link, name: name }) }), _jsx("p", { className: cn("text-body-sm text-muted-foreground", !state && "line-clamp-1"), children: state ? _jsx(RowMessageLine, { state: state }) : description })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [fact, state ? _jsx(RowMessageActions, { state: state }) : null, add ? _jsx(EntryAdd, { add: add }) : null, menu ? (_jsx(RecordCommands, { commands: menu.commands, moreLabel: menu.label, record: name })) : null] })] }));
34
32
  }
35
33
  function EntryList({ columns, entries, }) {
36
34
  return (_jsx("ul", { className: cn("grid gap-3", columns === 2 && "md:grid-cols-2"), children: entries.map((entry) => (_jsx(CatalogEntry, { ...entry }, entry.id))) }));
@@ -0,0 +1,13 @@
1
+ import { type ReactElement } from "react";
2
+ import type { MenuCommand } from "../components/action-menu.js";
3
+ import type { PageCommandAction } from "../components/page-actions.js";
4
+ export type DrawnCommand<TCommand extends MenuCommand = MenuCommand> = (TCommand extends unknown ? Omit<TCommand, "confirm" | "undo" | "onClick" | "link" | "render"> : never) & PageCommandAction & {
5
+ confirm?: never;
6
+ undo?: never;
7
+ };
8
+ export type CommandRunner = {
9
+ arm: <TCommand extends MenuCommand>(command: TCommand) => DrawnCommand<TCommand>;
10
+ dialog: ReactElement | null;
11
+ };
12
+ export declare function useCommandRunner(): CommandRunner;
13
+ //# sourceMappingURL=command-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-runner.d.ts","sourceRoot":"","sources":["../../src/internal/command-runner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAY,MAAM,OAAO,CAAC;AAEpD,OAAO,KAAK,EAKV,WAAW,EACZ,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAInE,MAAM,MAAM,YAAY,CAAC,QAAQ,SAAS,WAAW,GAAG,WAAW,IAAI,CAAC,QAAQ,SAAS,OAAO,GAC5F,IAAI,CAAC,QAAQ,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC,GAClE,KAAK,CAAC,GACR,iBAAiB,GAAG;IAAE,OAAO,CAAC,EAAE,KAAK,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAmCxD,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,CAAC,QAAQ,SAAS,WAAW,EAAE,OAAO,EAAE,QAAQ,KAAK,YAAY,CAAC,QAAQ,CAAC,CAAC;IACjF,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF,wBAAgB,gBAAgB,IAAI,aAAa,CAgEhD"}
@@ -0,0 +1,67 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { ConfirmDialog } from "../components/confirm-dialog.js";
5
+ import { showMessageToast } from "../components/toast.js";
6
+ function asksFirst(command) {
7
+ return command.confirm !== undefined;
8
+ }
9
+ function undoes(command) {
10
+ return command.undo !== undefined;
11
+ }
12
+ function reportDefect(error) {
13
+ if (typeof globalThis.reportError === "function")
14
+ globalThis.reportError(error);
15
+ else
16
+ setTimeout(() => {
17
+ throw error;
18
+ });
19
+ }
20
+ function withAction(command, onClick) {
21
+ const { confirm: _confirm, undo: _undo, link: _link, render: _render, ...face } = command;
22
+ return { ...face, onClick };
23
+ }
24
+ export function useCommandRunner() {
25
+ const [asked, setAsked] = useState(null);
26
+ async function runAtOnce(command) {
27
+ const failure = await command.onClick();
28
+ if (failure)
29
+ showMessageToast(failure, { tone: "error" });
30
+ else
31
+ showMessageToast(command.undo.message, { tone: "success" });
32
+ }
33
+ async function confirmAsked(current) {
34
+ const settle = (next) => setAsked((state) => (state !== null && state.command === current ? next(state) : state));
35
+ settle((state) => ({ ...state, pending: true, error: null }));
36
+ let failure;
37
+ try {
38
+ failure = await current.onClick();
39
+ }
40
+ catch (defect) {
41
+ settle((state) => ({ ...state, pending: false }));
42
+ throw defect;
43
+ }
44
+ settle((state) => failure
45
+ ? { ...state, pending: false, error: failure }
46
+ : { ...state, open: false, pending: false, error: null });
47
+ }
48
+ function arm(command) {
49
+ if (asksFirst(command)) {
50
+ return withAction(command, () => setAsked({ command, open: true, pending: false, error: null }));
51
+ }
52
+ if (undoes(command)) {
53
+ return withAction(command, () => {
54
+ runAtOnce(command).catch(reportDefect);
55
+ });
56
+ }
57
+ // SAFETY: a command with neither `confirm` nor `undo` is drawn as it was given.
58
+ // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- the narrowing above leaves the union's plain member, which TypeScript does not name.
59
+ return command;
60
+ }
61
+ const shown = asked?.command;
62
+ const dialog = shown ? (_jsx(ConfirmDialog, { confirmLabel: shown.confirm.confirmLabel, confirmPendingLabel: shown.pendingLabel, description: shown.confirm.description, destructive: shown.destructive === true, error: asked.error, irreversible: shown.confirm.irreversible, loading: asked.pending, onCancel: () => setAsked((state) => (state ? { ...state, open: false } : state)), onConfirm: () => {
63
+ if (!asked.pending)
64
+ confirmAsked(shown).catch(reportDefect);
65
+ }, open: asked.open, title: shown.confirm.title, verify: shown.confirm.verify })) : null;
66
+ return { arm, dialog };
67
+ }
@@ -0,0 +1,83 @@
1
+ import { type ComponentProps, type MouseEvent, type ReactElement } from "react";
2
+ import { type TextButtonProps } from "../components/button.js";
3
+ export type PageCommandAction = {
4
+ onClick: (event: MouseEvent<HTMLElement>) => void;
5
+ link?: never;
6
+ render?: never;
7
+ }
8
+ /**
9
+ * The product's router link, such as `<Link href="/agents" />`: it keeps its
10
+ * own behaviour and is drawn as a link with the button's look.
11
+ */
12
+ | {
13
+ link: ReactElement;
14
+ onClick?: never;
15
+ render?: never;
16
+ }
17
+ /**
18
+ * An element that is itself a command, such as a component that renders a
19
+ * `Button` and opens a dialog: it takes the button's look and props.
20
+ */
21
+ | {
22
+ render: ReactElement;
23
+ onClick?: never;
24
+ link?: never;
25
+ };
26
+ /** Running: the pair travels together, so a command that can be pending always has the word to say. */
27
+ export type PendingWord = {
28
+ /** Running: the button keeps its place, size and icon and says `pendingLabel`, with aria-busy. */
29
+ pending?: boolean | undefined;
30
+ pendingLabel: string;
31
+ } | {
32
+ pending?: false | undefined;
33
+ pendingLabel?: string | undefined;
34
+ };
35
+ export type PageCommandFace = PendingWord & {
36
+ label: string;
37
+ icon?: ReactElement | undefined;
38
+ /** Read instead of the label when the label alone does not name the target: "Sign in to Notion". */
39
+ accessibleName?: string | undefined;
40
+ /** Opens outside the product: the arrow after the label. */
41
+ external?: boolean | undefined;
42
+ disabled?: boolean | undefined;
43
+ /** Why it cannot run now: the button stays, disabled, and says why in its tooltip. */
44
+ disabledReason?: string | undefined;
45
+ };
46
+ /** A command drawn as a button: on the title row, in an empty state, in a row. Its icon leads the label. */
47
+ export type PageCommand = PageCommandAction & PageCommandFace;
48
+ type CommandVariant = "default" | "outline" | "ghost" | "link";
49
+ export type CommandLook = {
50
+ shape?: TextButtonProps["shape"];
51
+ size?: TextButtonProps["size"];
52
+ variant: CommandVariant;
53
+ };
54
+ export declare function lookOf(command: PageCommandFace, reasonId: string, { shape, size, variant }: CommandLook): {
55
+ "aria-label": string | undefined;
56
+ "aria-describedby": string | undefined;
57
+ disabled: boolean;
58
+ focusableWhenDisabled: boolean | undefined;
59
+ loading: boolean;
60
+ loadingLabel: string;
61
+ prefix: ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | undefined;
62
+ shape: "square" | "rounded" | undefined;
63
+ size: import("./button-classes").TextSize | undefined;
64
+ suffix: import("react").JSX.Element | undefined;
65
+ variant: CommandVariant;
66
+ };
67
+ /** The props a command's own button takes: its look, then a tooltip trigger's props it passes on. */
68
+ export type CommandButtonProps<TCommand> = {
69
+ command: TCommand;
70
+ look: ReturnType<typeof lookOf>;
71
+ } & Omit<ComponentProps<"button">, "children" | "prefix">;
72
+ /** Draws `button`, and when the command cannot run now, the tooltip that says why. */
73
+ export declare function WithDisabledReason({ button, reason, reasonId, }: {
74
+ button: ReactElement;
75
+ reason: string | undefined;
76
+ reasonId: string;
77
+ }): import("react").JSX.Element;
78
+ /** A `PageCommand`'s button: it runs its `onClick`, follows its `link` or draws its `render`. */
79
+ export declare function PageCommandButton({ command, ...appearance }: CommandLook & {
80
+ command: PageCommand;
81
+ }): import("react").JSX.Element;
82
+ export {};
83
+ //# sourceMappingURL=page-command-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-command-button.d.ts","sourceRoot":"","sources":["../../src/internal/page-command-button.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,UAAU,EACf,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG/E,MAAM,MAAM,iBAAiB,GACzB;IAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE;AACrF;;;GAGG;GACD;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE;AACzD;;;GAGG;GACD;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAE5D,uGAAuG;AACvG,MAAM,MAAM,WAAW,GACnB;IACE,kGAAkG;IAClG,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;CACtB,GACD;IAAE,OAAO,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEvE,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IAChC,oGAAoG;IACpG,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,4DAA4D;IAC5D,QAAQ,CAAC,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
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { ArrowUpRight } from "lucide-react";
4
+ import { isValidElement, useId, } from "react";
5
+ import { Button, ButtonLink } from "../components/button.js";
6
+ import { Tooltip, TooltipContent, TooltipTrigger } from "../components/tooltip.js";
7
+ export function lookOf(command, reasonId, { shape, size, variant }) {
8
+ const reason = command.disabledReason;
9
+ return {
10
+ "aria-label": command.accessibleName,
11
+ "aria-describedby": reason === undefined ? undefined : reasonId,
12
+ disabled: command.disabled === true || reason !== undefined,
13
+ focusableWhenDisabled: reason === undefined ? undefined : true,
14
+ loading: command.pending === true,
15
+ loadingLabel: command.pendingLabel ?? command.label,
16
+ prefix: command.icon,
17
+ shape,
18
+ size,
19
+ suffix: command.external ? _jsx(ArrowUpRight, { "aria-hidden": "true" }) : undefined,
20
+ variant,
21
+ };
22
+ }
23
+ /** Draws `button`, and when the command cannot run now, the tooltip that says why. */
24
+ export function WithDisabledReason({ button, reason, reasonId, }) {
25
+ if (reason === undefined)
26
+ return button;
27
+ return (_jsxs(_Fragment, { children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: button }), _jsx(TooltipContent, { children: reason })] }), _jsx("span", { hidden: true, id: reasonId, children: reason })] }));
28
+ }
29
+ /** A `PageCommand`'s button: it runs its `onClick`, follows its `link` or draws its `render`. */
30
+ export function PageCommandButton({ command, ...appearance }) {
31
+ const reasonId = useId();
32
+ return (_jsx(WithDisabledReason, { button: _jsx(CommandButton, { command: command, look: lookOf(command, reasonId, appearance) }), reason: command.disabledReason, reasonId: reasonId }));
33
+ }
34
+ /** The button itself; a tooltip's trigger renders it with its own props, which it passes on. */
35
+ function CommandButton({ command, look: ownLook, ...trigger }) {
36
+ const look = { ...trigger, ...ownLook };
37
+ const { focusableWhenDisabled: _focusable, ...linkLook } = ownLook;
38
+ const rendersLink = isValidElement(command.render) && command.render.props.href !== undefined;
39
+ const link = command.link ?? (rendersLink ? command.render : undefined);
40
+ if (link) {
41
+ return (_jsx(ButtonLink, { ...linkLook, render: link, children: command.label }));
42
+ }
43
+ if (command.render) {
44
+ return (_jsx(Button, { ...look, render: command.render, children: command.label }));
45
+ }
46
+ return (_jsx(Button, { ...look, onClick: command.onClick, type: "button", children: command.label }));
47
+ }
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
- import type { MenuCommand, RecordMenu } from "../components/action-menu.js";
3
- import type { PageCommand, PageCommandAction } from "../components/page-actions.js";
2
+ import type { DrawnCommand } from "./command-runner.js";
3
+ import type { PageCommandAction } from "../components/page-actions.js";
4
4
  export declare function menuItemAction(action: PageCommandAction): {
5
5
  render: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
6
6
  nativeButton: boolean;
@@ -11,10 +11,12 @@ export declare function menuItemAction(action: PageCommandAction): {
11
11
  nativeButton?: undefined;
12
12
  };
13
13
  export declare function MenuCommandRow({ command, iconEnd, value, }: {
14
- command: MenuCommand;
14
+ command: DrawnCommand;
15
15
  iconEnd?: boolean;
16
16
  value?: ReactNode;
17
17
  }): import("react").JSX.Element;
18
- export declare function soleMenuButton(commands: readonly MenuCommand[]): PageCommand | undefined;
19
- export declare function RecordMenuItems({ record, commands }: Omit<RecordMenu, "label">): import("react").JSX.Element;
18
+ export declare function RecordMenuItems({ record, commands, }: {
19
+ record: string;
20
+ commands: readonly DrawnCommand[];
21
+ }): import("react").JSX.Element;
20
22
  //# sourceMappingURL=record-menu-items.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"record-menu-items.d.ts","sourceRoot":"","sources":["../../src/internal/record-menu-items.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAQxE,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEhF,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB;;;;;;;;EAMvD;AAYD,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,OAAe,EACf,KAAK,GACN,EAAE;IACD,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,+BAuBA;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,GAAG,SAAS,CAKxF;AAED,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,+BAiB9E"}
1
+ {"version":3,"file":"record-menu-items.d.ts","sourceRoot":"","sources":["../../src/internal/record-menu-items.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAQ9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB;;;;;;;;EAMvD;AAYD,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,OAAe,EACf,KAAK,GACN,EAAE;IACD,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,+BAuBA;AAED,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAC;CACnC,+BAiBA"}
@@ -20,15 +20,7 @@ function commandState(command) {
20
20
  export function MenuCommandRow({ command, iconEnd = false, value, }) {
21
21
  return (_jsx(DropdownMenuCommand, { "aria-label": command.accessibleName, icon: command.icon, iconEnd: iconEnd, detail: command.detail, variant: command.destructive ? "destructive" : "default", ...commandState(command), loading: command.pending === true, loadingLabel: command.pendingLabel ?? command.label, ...commandAction(command), children: value === undefined ? (command.label) : (_jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: "min-w-0 flex-1", children: command.label }), " ", _jsx(DropdownMenuShortcut, { children: value })] })) }));
22
22
  }
23
- export function soleMenuButton(commands) {
24
- const [only] = commands;
25
- if (commands.length !== 1 || !only || only.destructive)
26
- return undefined;
27
- if (only.locked === true || only.disabledReason !== undefined)
28
- return undefined;
29
- return only;
30
- }
31
- export function RecordMenuItems({ record, commands }) {
23
+ export function RecordMenuItems({ record, commands, }) {
32
24
  const kept = commands.filter((command) => !command.destructive);
33
25
  const destructive = commands.filter((command) => command.destructive);
34
26
  return (_jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { className: "truncate", title: record, children: record }), kept.map((command) => (_jsx(MenuCommandRow, { command: command }, command.label))), kept.length > 0 && destructive.length > 0 ? _jsx(DropdownMenuSeparator, {}) : null, destructive.map((command) => (_jsx(MenuCommandRow, { command: command }, command.label)))] }));
@@ -1,13 +1,20 @@
1
- import type { MenuCommand } from "../components/action-menu.js";
1
+ import type { MenuCommands } from "../components/action-menu.js";
2
2
  import type { PageCommand, PageMenu } from "../components/page-actions.js";
3
3
  import { type ResolvedMessage } from "../components/product-message.js";
4
4
  export declare const nothing: () => undefined;
5
+ /** A confirmed sample command that succeeds: it answers that nothing failed. */
6
+ export declare const answered: () => Promise<null>;
5
7
  export declare const COBALTO: string;
6
8
  export declare const VERDE: string;
7
9
  export declare const ARANCIO: string;
8
10
  export declare const sampleMessage: (title: string, body?: string, actions?: PageCommand[]) => ResolvedMessage;
9
11
  export declare const FAILED_READ: ResolvedMessage;
10
- export declare const RECORD_COMMANDS: readonly MenuCommand[];
12
+ export declare const REMOVE_MAILBOX: {
13
+ title: string;
14
+ description: string;
15
+ confirmLabel: string;
16
+ };
17
+ export declare const RECORD_COMMANDS: MenuCommands;
11
18
  export declare const PAGE_MENU: PageMenu;
12
19
  export type Mailbox = {
13
20
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"samples.d.ts","sourceRoot":"","sources":["../../src/showcase/samples.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,KAAK,eAAe,EAAe,MAAM,8BAA8B,CAAC;AAEjF,eAAO,MAAM,OAAO,iBAAkB,CAAC;AAEvC,eAAO,MAAM,OAAO,QAA8B,CAAC;AACnD,eAAO,MAAM,KAAK,QAA4B,CAAC;AAC/C,eAAO,MAAM,OAAO,QAA8B,CAAC;AAEnD,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,EAAE,aAAS,EAAE,UAAS,WAAW,EAAO,oBACnB,CAAC;AAEjE,eAAO,MAAM,WAAW,EAAE,eAIzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SAAS,WAAW,EAIjD,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,QAOvB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAAS,OAAO,EAsBvC,CAAC;AAEF,eAAO,MAAM,GAAG,QAAqC,CAAC"}
1
+ {"version":3,"file":"samples.d.ts","sourceRoot":"","sources":["../../src/showcase/samples.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,KAAK,eAAe,EAAe,MAAM,8BAA8B,CAAC;AAEjF,eAAO,MAAM,OAAO,iBAAkB,CAAC;AACvC,gFAAgF;AAChF,eAAO,MAAM,QAAQ,QAAa,OAAO,CAAC,IAAI,CAAS,CAAC;AAExD,eAAO,MAAM,OAAO,QAA8B,CAAC;AACnD,eAAO,MAAM,KAAK,QAA4B,CAAC;AAC/C,eAAO,MAAM,OAAO,QAA8B,CAAC;AAEnD,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,EAAE,aAAS,EAAE,UAAS,WAAW,EAAO,oBACnB,CAAC;AAEjE,eAAO,MAAM,WAAW,EAAE,eAIzB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;CAI1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,YAW7B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,QAOvB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAAS,OAAO,EAsBvC,CAAC;AAEF,eAAO,MAAM,GAAG,QAAqC,CAAC"}
@@ -4,15 +4,29 @@ import { agentOrbColorTokens } from "../components/agent-orb-appearance.js";
4
4
  // oxlint-disable-next-line nadicodeai/product-message-imports -- the showcase words its own sample messages, which no product shows
5
5
  import { wordMessage } from "../components/product-message.js";
6
6
  export const nothing = () => undefined;
7
+ /** A confirmed sample command that succeeds: it answers that nothing failed. */
8
+ export const answered = async () => null;
7
9
  export const COBALTO = agentOrbColorTokens.cobalto;
8
10
  export const VERDE = agentOrbColorTokens.verde;
9
11
  export const ARANCIO = agentOrbColorTokens.arancio;
10
12
  export const sampleMessage = (title, body = "", actions = []) => wordMessage({ code: "showcase.sample", title, body, actions });
11
13
  export const FAILED_READ = sampleMessage("Couldn't load the mailboxes", "Check your connection, then try again.", [{ label: "Try again", onClick: nothing }]);
14
+ export const REMOVE_MAILBOX = {
15
+ title: "Remove pec@acme.it",
16
+ description: "Agents stop reading and sending from this address.",
17
+ confirmLabel: "Remove mailbox",
18
+ };
12
19
  export const RECORD_COMMANDS = [
13
20
  { label: "Rename mailbox", icon: _jsx(Pencil, {}), onClick: nothing },
14
21
  { label: "Copy address", icon: _jsx(Copy, {}), onClick: nothing },
15
- { label: "Remove mailbox", icon: _jsx(Trash2, {}), destructive: true, onClick: nothing },
22
+ {
23
+ label: "Remove mailbox",
24
+ pendingLabel: "Removing mailbox",
25
+ icon: _jsx(Trash2, {}),
26
+ destructive: true,
27
+ confirm: REMOVE_MAILBOX,
28
+ onClick: answered,
29
+ },
16
30
  ];
17
31
  export const PAGE_MENU = {
18
32
  label: "More for Customers",
@@ -6,5 +6,7 @@ export declare const ACTIONS: {
6
6
  CopyButton: () => import("react").JSX.Element;
7
7
  CardActionsRow: () => import("react").JSX.Element;
8
8
  PageActions: () => import("react").JSX.Element;
9
+ RecordCommands: () => import("react").JSX.Element;
10
+ RecordContextMenu: () => import("react").JSX.Element;
9
11
  };
10
12
  //# sourceMappingURL=actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/actions.tsx"],"names":[],"mappings":"AAmDA,eAAO,MAAM,OAAO;;;;;;;;CAsOO,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/actions.tsx"],"names":[],"mappings":"AAoDA,eAAO,MAAM,OAAO;;;;;;;;;;CAqQO,CAAC"}
@@ -7,7 +7,8 @@ import { Card } from "../../components/card.js";
7
7
  import { CopyButton } from "../../components/copy-button.js";
8
8
  import { LoadMoreButton } from "../../components/load-more-button.js";
9
9
  import { CardActionsRow, PageActionsRow } from "../../components/page-actions.js";
10
- import { nothing, PAGE_MENU } from "../samples.js";
10
+ import { RecordCommands, RecordContextMenu } from "../../components/record-commands.js";
11
+ import { nothing, PAGE_MENU, RECORD_COMMANDS } from "../samples.js";
11
12
  const TEXT_SIZES = ["xs", "sm", "default", "lg"];
12
13
  const LOOKS = [
13
14
  { look: "default", label: "New Agent" },
@@ -41,4 +42,6 @@ export const ACTIONS = {
41
42
  { label: "Buy Extra usage for Customers", onClick: nothing },
42
43
  ] })),
43
44
  PageActions: () => (_jsx(PageActionsRow, { menu: PAGE_MENU, primary: { label: "Invite customer", icon: _jsx(Plus, {}), onClick: nothing }, secondary: { label: "Import", onClick: nothing } })),
45
+ RecordCommands: () => (_jsxs("div", { className: "grid max-w-md gap-3 text-sm", children: [_jsx(Row, { label: "One", children: _jsx(RecordCommands, { commands: RECORD_COMMANDS.slice(2), moreLabel: "More for pec@acme.it", record: "pec@acme.it" }) }), _jsx(Row, { label: "Three", children: _jsx(RecordCommands, { commands: RECORD_COMMANDS.map((command, index) => index === 0 ? { ...command, main: true } : command), moreLabel: "More for pec@acme.it", record: "pec@acme.it" }) })] })),
46
+ RecordContextMenu: () => (_jsx(RecordContextMenu, { commands: RECORD_COMMANDS, moreLabel: "More for pec@acme.it", record: "pec@acme.it", children: _jsx("div", { className: "max-w-sm rounded-md border border-dashed border-border p-6 text-sm text-muted-foreground", children: "Right-click pec@acme.it" }) })),
44
47
  };
@@ -1 +1 @@
1
- {"version":3,"file":"compositions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/compositions.tsx"],"names":[],"mappings":"AA0IA,iBAAS,oBAAoB,gCA+B5B;AAMD,iBAAS,wBAAwB,gCAahC;AAED,iBAAS,qBAAqB,gCA0B7B;AAED,iBAAS,yBAAyB,gCAGjC;AAwBD,iBAAS,mBAAmB,gCAoC3B;AAED,iBAAS,sBAAsB,gCAyD9B;AAED,iBAAS,yBAAyB,gCAUjC;AAED,iBAAS,qBAAqB,gCAwC7B;AAED,iBAAS,kBAAkB,gCAiB1B;AAED,iBAAS,oBAAoB,gCAS5B;AAED,iBAAS,kBAAkB,gCA0B1B;AAED,iBAAS,kBAAkB,gCAuE1B;AAED,iBAAS,kBAAkB,gCAwB1B;AAED,iBAAS,mBAAmB,gCA6B3B;AAED,iBAAS,oBAAoB,gCAkD5B;AAED,iBAAS,oBAAoB,gCAqC5B;AAED,iBAAS,mBAAmB,gCA2B3B;AAED,iBAAS,mBAAmB,gCAoB3B;AAwBD,iBAAS,uBAAuB,gCAkD/B;AAmCD,iBAAS,mBAAmB,gCAW3B;AAED,iBAAS,iBAAiB,gCAkBzB;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGE,CAAC"}
1
+ {"version":3,"file":"compositions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/compositions.tsx"],"names":[],"mappings":"AA2IA,iBAAS,oBAAoB,gCA+B5B;AAMD,iBAAS,wBAAwB,gCAahC;AAED,iBAAS,qBAAqB,gCA0B7B;AAED,iBAAS,yBAAyB,gCAGjC;AAwBD,iBAAS,mBAAmB,gCAoC3B;AAED,iBAAS,sBAAsB,gCAyD9B;AAED,iBAAS,yBAAyB,gCAUjC;AAED,iBAAS,qBAAqB,gCAsC7B;AAED,iBAAS,kBAAkB,gCAiB1B;AAED,iBAAS,oBAAoB,gCAS5B;AAED,iBAAS,kBAAkB,gCA0B1B;AAED,iBAAS,kBAAkB,gCAsE1B;AAED,iBAAS,kBAAkB,gCAwB1B;AAED,iBAAS,mBAAmB,gCA6B3B;AAED,iBAAS,oBAAoB,gCAkD5B;AAED,iBAAS,oBAAoB,gCAqC5B;AAED,iBAAS,mBAAmB,gCA2B3B;AAED,iBAAS,mBAAmB,gCAoB3B;AAwBD,iBAAS,uBAAuB,gCAkD/B;AAwCD,iBAAS,mBAAmB,gCAW3B;AAED,iBAAS,iBAAiB,gCAkBzB;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8FE,CAAC"}
@@ -60,7 +60,8 @@ const MAILBOX_LIST = {
60
60
  of: (mailbox) => mailbox.status === "failed" ? { label: "Can't sign in", tone: "danger" } : null,
61
61
  size: 150,
62
62
  },
63
- menu: (mailbox) => ({ label: `More for ${mailbox.address}`, commands: RECORD_COMMANDS }),
63
+ commands: () => RECORD_COMMANDS,
64
+ moreLabel: (mailbox) => `More for ${mailbox.address}`,
64
65
  commandsHeader: "Actions",
65
66
  };
66
67
  const CATALOG = [
@@ -258,7 +259,7 @@ function CollectionToolbarSpecimen() {
258
259
  function ConfirmDialogSpecimen() {
259
260
  const [open, setOpen] = useState(null);
260
261
  const close = () => setOpen(null);
261
- return (_jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Button, { onClick: () => setOpen("reversible"), variant: "outline", children: "Remove mailbox" }), _jsx(Button, { onClick: () => setOpen("typed"), variant: "outline", children: "Remove mailbox, typed" }), _jsx(ConfirmDialog, { cancelLabel: "Cancel", confirmLabel: "Remove mailbox", confirmPendingLabel: "Removing mailbox", description: "Agents stop reading and sending from this address.", destructive: true, onCancel: close, onConfirm: close, open: open === "reversible", title: "Remove pec@acme.it" }), _jsx(ConfirmDialog, { cancelLabel: "Cancel", confirmLabel: "Remove mailbox", confirmPendingLabel: "Removing mailbox", description: "Agents stop reading and sending from this address.", destructive: true, irreversible: "Removing pec@acme.it cannot be undone.", onCancel: close, onConfirm: close, open: open === "typed", title: "Remove pec@acme.it", verify: {
262
+ return (_jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Button, { onClick: () => setOpen("reversible"), variant: "outline", children: "Remove mailbox" }), _jsx(Button, { onClick: () => setOpen("typed"), variant: "outline", children: "Remove mailbox, typed" }), _jsx(ConfirmDialog, { confirmLabel: "Remove mailbox", confirmPendingLabel: "Removing mailbox", description: "Agents stop reading and sending from this address.", destructive: true, onCancel: close, onConfirm: close, open: open === "reversible", title: "Remove pec@acme.it" }), _jsx(ConfirmDialog, { confirmLabel: "Remove mailbox", confirmPendingLabel: "Removing mailbox", description: "Agents stop reading and sending from this address.", destructive: true, irreversible: "Removing pec@acme.it cannot be undone.", onCancel: close, onConfirm: close, open: open === "typed", title: "Remove pec@acme.it", verify: {
262
263
  phrase: "pec@acme.it",
263
264
  prompt: "To confirm, type the mailbox address pec@acme.it",
264
265
  } })] }));
@@ -303,7 +304,7 @@ function FormDialogSpecimen() {
303
304
  }, submit: { label: "Create customer", pendingLabel: "Creating customer" }, children: _jsx(Input, { id: "showcase-customer", label: "Company name", placeholder: "Bizeta Arredamenti" }) }) }), _jsx(FormDialog, { closeLabel: "Close", onOpenChange: (next) => setOpen(next ? "guarded" : null), open: open === "guarded", title: "Create customer", unsaved: { dirty: name !== "", onDismissBlocked: () => setDiscardOpen(true) }, children: _jsx(FormDialogForm, { cancelLabel: "Cancel", onSubmit: (event) => {
304
305
  event.preventDefault();
305
306
  close();
306
- }, submit: { label: "Create customer", pendingLabel: "Creating customer" }, children: _jsx(Input, { id: "showcase-customer-guarded", label: "Company name", onChange: (event) => setName(event.target.value), placeholder: "Bizeta Arredamenti", value: name }) }) }), _jsx(ConfirmDialog, { cancelLabel: "Keep editing", confirmLabel: "Discard changes", description: "The company name you typed is not saved.", onCancel: () => setDiscardOpen(false), onConfirm: () => {
307
+ }, submit: { label: "Create customer", pendingLabel: "Creating customer" }, children: _jsx(Input, { id: "showcase-customer-guarded", label: "Company name", onChange: (event) => setName(event.target.value), placeholder: "Bizeta Arredamenti", value: name }) }) }), _jsx(ConfirmDialog, { confirmLabel: "Discard changes", description: "The company name you typed is not saved.", onCancel: () => setDiscardOpen(false), onConfirm: () => {
307
308
  setDiscardOpen(false);
308
309
  close();
309
310
  }, open: discardOpen, title: "Discard the new customer" })] }));
@@ -444,10 +445,15 @@ function SelectableRecordListSpecimen() {
444
445
  }),
445
446
  } }));
446
447
  }
447
- const reconnectMenu = (mailbox) => ({
448
- label: `More for ${mailbox.address}`,
449
- commands: [{ label: "Reconnect", icon: _jsx(RefreshCw, {}), onClick: nothing }],
450
- });
448
+ const reconnect = (mailbox) => [
449
+ {
450
+ label: "Reconnect mailbox",
451
+ pendingLabel: "Reconnecting mailbox",
452
+ icon: _jsx(RefreshCw, {}),
453
+ accessibleName: `Reconnect ${mailbox.address}`,
454
+ onClick: nothing,
455
+ },
456
+ ];
451
457
  function CatalogCardSpecimen() {
452
458
  return (_jsx("div", { className: "max-w-sm", children: _jsx(CatalogCard, { description: "Send, read and sort email from your Gmail accounts.", mark: { kind: "record", icon: Mail }, name: "Gmail", onOpen: () => { } }) }));
453
459
  }
@@ -496,13 +502,10 @@ export const COMPOSITIONS = {
496
502
  ] }) })),
497
503
  OverviewPage: OverviewPageSpecimen,
498
504
  PageHeader: () => (_jsxs(PageActionsHostProvider, { children: [_jsx(PageHeader, { title: "Customers" }), _jsx(PageActions, { primary: { label: "Invite customer", icon: _jsx(Plus, {}), onClick: nothing } })] })),
499
- RecordList: () => (_jsxs("div", { className: "grid gap-6", children: [_jsx(RecordList, { ...MAILBOX_LIST, footer: { count: "3 mailboxes" }, label: "Mailboxes", records: MAILBOXES }), _jsx(RecordList, { ...MAILBOX_LIST, label: "Mailboxes with one command", menu: reconnectMenu, records: MAILBOXES }), _jsx(RecordList, { ...MAILBOX_LIST, commands: {
500
- reconnect: { label: "Reconnect", pendingLabel: "Reconnecting…", icon: _jsx(RefreshCw, {}) },
501
- }, command: (mailbox) => ({
502
- use: "reconnect",
503
- accessibleName: `Reconnect ${mailbox.address}`,
504
- onClick: nothing,
505
- }), label: "Mailboxes with a row command", records: MAILBOXES }), _jsx(SelectableRecordListSpecimen, {})] })),
505
+ RecordList: () => (_jsxs("div", { className: "grid gap-6", children: [_jsx(RecordList, { ...MAILBOX_LIST, footer: { count: "3 mailboxes" }, label: "Mailboxes", records: MAILBOXES }), _jsx(RecordList, { ...MAILBOX_LIST, commands: reconnect, label: "Mailboxes with one command", records: MAILBOXES }), _jsx(RecordList, { ...MAILBOX_LIST, commands: (mailbox) => [
506
+ ...reconnect(mailbox).map((command) => ({ ...command, main: true })),
507
+ ...RECORD_COMMANDS,
508
+ ], label: "Mailboxes with a main command", records: MAILBOXES }), _jsx(SelectableRecordListSpecimen, {})] })),
506
509
  RecordSheet: RecordSheetSpecimen,
507
510
  RowEditForm: RowEditFormSpecimen,
508
511
  SettingsPage: () => (_jsx(SettingsPage, { children: _jsx(SenderSection, {}) })),
@@ -156,6 +156,8 @@ export declare const SPECIMENS: {
156
156
  CopyButton: () => import("react").JSX.Element;
157
157
  CardActionsRow: () => import("react").JSX.Element;
158
158
  PageActions: () => import("react").JSX.Element;
159
+ RecordCommands: () => import("react").JSX.Element;
160
+ RecordContextMenu: () => import("react").JSX.Element;
159
161
  CatalogCard: () => import("react").JSX.Element;
160
162
  StepCards: () => import("react").JSX.Element;
161
163
  ActivityFeed: () => import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"menus.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/menus.tsx"],"names":[],"mappings":"AAoHA,iBAAS,mBAAmB,gCA8B3B;AAED,iBAAS,gBAAgB,gCA0BxB;AAqDD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;CA+NS,CAAC"}
1
+ {"version":3,"file":"menus.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/menus.tsx"],"names":[],"mappings":"AA4HA,iBAAS,mBAAmB,gCA8B3B;AAED,iBAAS,gBAAgB,gCA0BxB;AAqDD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;CAqOS,CAAC"}
@@ -20,7 +20,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from ".
20
20
  import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, } from "../../components/sheet.js";
21
21
  import { SiteMenu } from "../../components/site-menu.js";
22
22
  import { ThemeModeMenu } from "../../components/theme-mode-switcher.js";
23
- import { COBALTO, nothing, RECORD_COMMANDS, VERDE } from "../samples.js";
23
+ import { answered, COBALTO, nothing, RECORD_COMMANDS, REMOVE_MAILBOX, VERDE, } from "../samples.js";
24
24
  const THEME_LABELS = { light: "Light", dark: "Dark", system: "System" };
25
25
  const REGIONS = [
26
26
  { value: "fra1", label: "Frankfurt" },
@@ -40,9 +40,10 @@ const LOCKED_RECORD_COMMANDS = [
40
40
  label: "Remove mailbox",
41
41
  icon: _jsx(Trash2, {}),
42
42
  destructive: true,
43
+ confirm: REMOVE_MAILBOX,
43
44
  locked: true,
44
45
  reason: "Only an owner can remove a mailbox",
45
- onClick: nothing,
46
+ onClick: answered,
46
47
  },
47
48
  ];
48
49
  function AccountMenuSpecimen() {
@@ -82,7 +83,7 @@ function RossiOtticaSheet() {
82
83
  export const MENUS = {
83
84
  AccountMenu: AccountMenuSpecimen,
84
85
  ActionContextMenu: () => (_jsx(ActionContextMenu, { commands: RECORD_COMMANDS, label: "More for pec@acme.it", record: "pec@acme.it", children: _jsx("div", { className: "max-w-sm rounded-md border border-dashed border-border p-6 text-sm text-muted-foreground", children: "Right-click pec@acme.it" }) })),
85
- ActionMenu: () => (_jsxs("div", { className: "grid gap-2 text-sm", children: [_jsxs("div", { className: "flex items-center gap-2", children: ["pec@acme.it", _jsx(ActionMenu, { commands: RECORD_COMMANDS, label: "More for pec@acme.it", record: "pec@acme.it" })] }), _jsxs("div", { className: "flex items-center gap-2", children: ["fatture@acme.it", _jsx(ActionMenu, { commands: LOCKED_RECORD_COMMANDS, label: "More for fatture@acme.it", record: "fatture@acme.it" })] })] })),
86
+ ActionMenu: () => (_jsxs("div", { className: "grid gap-2 text-sm", children: [_jsxs("div", { className: "flex items-center gap-2", children: ["pec@acme.it", _jsx(ActionMenu, { commands: RECORD_COMMANDS, label: "More for pec@acme.it", record: "pec@acme.it", size: "row" })] }), _jsxs("div", { className: "flex items-center gap-2", children: ["fatture@acme.it", _jsx(ActionMenu, { commands: LOCKED_RECORD_COMMANDS, label: "More for fatture@acme.it", record: "fatture@acme.it", size: "row" })] })] })),
86
87
  AlertDialog: () => (_jsxs(AlertDialog, { children: [_jsx(AlertDialogTrigger, { render: _jsx(Button, { variant: "outline", children: "Remove mailbox" }) }), _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: "Remove pec@acme.it" }), _jsx(AlertDialogDescription, { children: "Agents stop reading and sending from this address." })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: "Cancel" }), _jsx(AlertDialogAction, { variant: "destructive", children: "Remove mailbox" })] })] })] })),
87
88
  ContextMenu: () => (_jsxs(ContextMenu, { children: [_jsx(ContextMenuTrigger, { className: "block max-w-sm rounded-md border border-dashed border-border p-6 text-sm text-muted-foreground", children: "Right-click the canvas" }), _jsxs(ContextMenuContent, { "aria-label": "Canvas", children: [_jsx(ContextMenuItem, { children: "Paste" }), _jsx(ContextMenuItem, { children: "Select all" }), _jsx(ContextMenuLink, { href: "#canvas-guide", children: "Open canvas guide" })] })] })),
88
89
  Dialog: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsxs(Dialog, { children: [_jsx(DialogTrigger, { render: _jsx(Button, { variant: "outline", children: "Add MCP server" }) }), _jsxs(DialogContent, { closeLabel: "Close", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Add MCP server" }), _jsx(DialogDescription, { children: "Agents can call its tools once it is added." })] }), _jsx(DialogBody, { children: _jsx(Input, { id: "showcase-mcp-url", label: "Address", placeholder: "https://mcp.acme.it", type: "url" }) }), _jsxs(DialogFooter, { children: [_jsx(DialogClose, { render: _jsx(Button, { variant: "outline", children: "Cancel" }) }), _jsx(Button, { children: "Add server" })] })] })] }), _jsx(CreateDatabaseDialog, {}), _jsxs(Dialog, { children: [_jsx(DialogTrigger, { render: _jsx(Button, { variant: "outline", children: "Connect mailbox" }) }), _jsxs(DialogContent, { closeLabel: "Close", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "pec@acme.it is connected" }), _jsx(DialogDescription, { children: "Agents can read and send from this address." })] }), _jsx(DialogFooter, { children: _jsx(DialogClose, { render: _jsx(Button, { children: "Done" }) }) })] })] })] })),
@@ -1,4 +1,4 @@
1
- export type UsageName = "ActivityFeed" | "AgentProfileCard" | "CatalogDrawer" | "CollectionFilters" | "CollectionPage" | "CollectionToolbar" | "ConfirmDialog" | "DrawerSteps" | "EntryPicture" | "EntryScene" | "FormDialog" | "FormDrawer" | "InviteCard" | "LibraryShelf" | "ObjectPage" | "ObjectSection" | "OverviewPage" | "PageHeader" | "RecordList" | "RecordSheet" | "RowEditForm" | "SettingsPage" | "SettingsSection" | "StepCards" | "useCatalogRows" | "Button" | "ButtonGroup" | "ButtonLink" | "CardActionsRow" | "CopyButton" | "LoadMoreButton" | "PageActions" | "Calendar" | "ClearableInput" | "CollectionSearch" | "Field" | "Form" | "Input" | "InputGroup" | "InputOTP" | "Label" | "NativeSelect" | "SettingsField" | "SettingsRows" | "Slider" | "Textarea" | "Checkbox" | "ChoiceboxGroup" | "CollectionSort" | "Combobox" | "ModelSelect" | "MultiSelect" | "RadioGroup" | "SegmentedChoice" | "SegmentedControl" | "Select" | "Switch" | "ThemeModeSegments" | "ThemeModeSwitcher" | "Toggle" | "ToggleGroup" | "ActionStatus" | "AgentOrb" | "AppIcon" | "AppMark" | "ArchIcon" | "Avatar" | "Badge" | "BrandWordmark" | "CategoryTag" | "CheckCounts" | "FileTypeIcon" | "IdentityMark" | "ModelIdentity" | "ModelMark" | "ObjectFactValue" | "PlatformMark" | "ProductWordmark" | "ProgressChecklist" | "RecordIdentity" | "StatusBadge" | "Tag" | "AgentListRow" | "Breadcrumb" | "CommandDialog" | "DocumentTabs" | "FileTree" | "Footer" | "PortalSidebarFrame" | "ScopeSwitcher" | "Sidebar" | "SidebarBrand" | "SidebarEntryCard" | "SidebarFind" | "SidebarFrame" | "SidebarMenuChevron" | "SidebarSections" | "Tabs" | "TabsNav" | "textLinkVariants" | "AgentCard" | "AgentRow" | "Card" | "CardRow" | "CatalogCard" | "CodeBlock" | "DataTable" | "DiffCount" | "DisclosureRow" | "FileDiff" | "Gauge" | "Item" | "Kbd" | "MiddleTruncate" | "ObjectFacts" | "PairingCode" | "Progress" | "QrCode" | "RecordTime" | "RunTimeline" | "SettingsFactsSection" | "Snippet" | "Table" | "TableCard" | "TableValue" | "TextWithCopyButton" | "UsageMeter" | "Alert" | "EmptyState" | "EntryProgress" | "EntryStageList" | "HoverCard" | "MessageNotice" | "NoticeBanner" | "PendingLabel" | "Skeleton" | "SkeletonRegion" | "Toaster" | "Tooltip" | "UpdateCard" | "WaitingLine" | "AccountMenu" | "ActionContextMenu" | "ActionMenu" | "AlertDialog" | "ContextMenu" | "Dialog" | "Drawer" | "DropdownMenu" | "GlassControl" | "MenuChoiceRow" | "Popover" | "Sheet" | "SiteMenu" | "ThemeModeMenu" | "ActivityCalendar" | "ChartAreaStacked" | "ChartBarHorizontal" | "ChartBarMultiple" | "ChartBarStacked" | "ChartCard" | "ChartContainer" | "ChartRanking" | "ChartSparkline" | "DateRangeControl" | "KpiCard" | "TrendBadge" | "createEntityColorMap" | "Accordion" | "AspectRatio" | "BrandField" | "Collapsible" | "CompanyCard" | "Disclosure" | "HiveScene" | "NadiaPresence" | "NumberedSteps" | "Prose" | "ReadingColumn" | "ResizablePanelGroup" | "ScrollArea" | "Separator" | "ToolIcon";
1
+ export type UsageName = "ActivityFeed" | "AgentProfileCard" | "CatalogDrawer" | "CollectionFilters" | "CollectionPage" | "CollectionToolbar" | "ConfirmDialog" | "DrawerSteps" | "EntryPicture" | "EntryScene" | "FormDialog" | "FormDrawer" | "InviteCard" | "LibraryShelf" | "ObjectPage" | "ObjectSection" | "OverviewPage" | "PageHeader" | "RecordList" | "RecordSheet" | "RowEditForm" | "SettingsPage" | "SettingsSection" | "StepCards" | "useCatalogRows" | "Button" | "ButtonGroup" | "ButtonLink" | "CardActionsRow" | "CopyButton" | "LoadMoreButton" | "PageActions" | "RecordCommands" | "RecordContextMenu" | "Calendar" | "ClearableInput" | "CollectionSearch" | "Field" | "Form" | "Input" | "InputGroup" | "InputOTP" | "Label" | "NativeSelect" | "SettingsField" | "SettingsRows" | "Slider" | "Textarea" | "Checkbox" | "ChoiceboxGroup" | "CollectionSort" | "Combobox" | "ModelSelect" | "MultiSelect" | "RadioGroup" | "SegmentedChoice" | "SegmentedControl" | "Select" | "Switch" | "ThemeModeSegments" | "ThemeModeSwitcher" | "Toggle" | "ToggleGroup" | "ActionStatus" | "AgentOrb" | "AppIcon" | "AppMark" | "ArchIcon" | "Avatar" | "Badge" | "BrandWordmark" | "CategoryTag" | "CheckCounts" | "FileTypeIcon" | "IdentityMark" | "ModelIdentity" | "ModelMark" | "ObjectFactValue" | "PlatformMark" | "ProductWordmark" | "ProgressChecklist" | "RecordIdentity" | "StatusBadge" | "Tag" | "AgentListRow" | "Breadcrumb" | "CommandDialog" | "DocumentTabs" | "FileTree" | "Footer" | "PortalSidebarFrame" | "ScopeSwitcher" | "Sidebar" | "SidebarBrand" | "SidebarEntryCard" | "SidebarFind" | "SidebarFrame" | "SidebarMenuChevron" | "SidebarSections" | "Tabs" | "TabsNav" | "textLinkVariants" | "AgentCard" | "AgentRow" | "Card" | "CardRow" | "CatalogCard" | "CodeBlock" | "DataTable" | "DiffCount" | "DisclosureRow" | "FileDiff" | "Gauge" | "Item" | "Kbd" | "MiddleTruncate" | "ObjectFacts" | "PairingCode" | "Progress" | "QrCode" | "RecordTime" | "RunTimeline" | "SettingsFactsSection" | "Snippet" | "Table" | "TableCard" | "TableValue" | "TextWithCopyButton" | "UsageMeter" | "Alert" | "EmptyState" | "EntryProgress" | "EntryStageList" | "HoverCard" | "MessageNotice" | "NoticeBanner" | "PendingLabel" | "Skeleton" | "SkeletonRegion" | "Toaster" | "Tooltip" | "UpdateCard" | "WaitingLine" | "AccountMenu" | "ActionContextMenu" | "ActionMenu" | "AlertDialog" | "ContextMenu" | "Dialog" | "Drawer" | "DropdownMenu" | "GlassControl" | "MenuChoiceRow" | "Popover" | "Sheet" | "SiteMenu" | "ThemeModeMenu" | "ActivityCalendar" | "ChartAreaStacked" | "ChartBarHorizontal" | "ChartBarMultiple" | "ChartBarStacked" | "ChartCard" | "ChartContainer" | "ChartRanking" | "ChartSparkline" | "DateRangeControl" | "KpiCard" | "TrendBadge" | "createEntityColorMap" | "Accordion" | "AspectRatio" | "BrandField" | "Collapsible" | "CompanyCard" | "Disclosure" | "HiveScene" | "NadiaPresence" | "NumberedSteps" | "Prose" | "ReadingColumn" | "ResizablePanelGroup" | "ScrollArea" | "Separator" | "ToolIcon";
2
2
  export type UsageFamily = "Compositions" | "Actions" | "Inputs" | "Choices" | "Status" | "Navigation" | "Data" | "Feedback" | "Menus" | "Charts" | "Other";
3
3
  export type ComponentUsage = {
4
4
  name: UsageName;
@@ -1 +1 @@
1
- {"version":3,"file":"usage.generated.d.ts","sourceRoot":"","sources":["../../src/showcase/usage.generated.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,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OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,SAAS,WAAW,EAYhD,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,SAAS,cAAc,EAgqF1C,CAAC"}
1
+ {"version":3,"file":"usage.generated.d.ts","sourceRoot":"","sources":["../../src/showcase/usage.generated.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,SAAS,GACjB,cAAc,GACd,kBAAkB,GAClB,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,mBAAmB,GACnB,eAAe,GACf,aAAa,GACb,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,eAAe,GACf,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,gBAAgB,GAChB,QAAQ,GACR,aAAa,GACb,YAAY,GACZ,gBAAgB,GAChB,YAAY,GACZ,gBAAgB,GAChB,aAAa,GACb,gBAAgB,GAChB,mBAAmB,GACnB,UAAU,GACV,gBAAgB,GAChB,kBAAkB,GAClB,OAAO,GACP,MAAM,GACN,OAAO,GACP,YAAY,GACZ,UAAU,GACV,OAAO,GACP,cAAc,GACd,eAAe,GACf,cAAc,GACd,QAAQ,GACR,UAAU,GACV,UAAU,GACV,gBAAgB,GAChB,gBAAgB,GAChB,UAAU,GACV,aAAa,GACb,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,GAClB,QAAQ,GACR,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,QAAQ,GACR,aAAa,GACb,cAAc,GACd,UAAU,GACV,SAAS,GACT,SAAS,GACT,UAAU,GACV,Q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