@nadicodeai/ui 12.1.198 → 12.1.200

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 (43) hide show
  1. package/dist/components/agent-card.d.ts +54 -22
  2. package/dist/components/agent-card.d.ts.map +1 -1
  3. package/dist/components/agent-card.js +47 -20
  4. package/dist/components/agent-orb.d.ts +2 -2
  5. package/dist/components/agent-orb.js +2 -2
  6. package/dist/components/document-tabs.d.ts +46 -0
  7. package/dist/components/document-tabs.d.ts.map +1 -0
  8. package/dist/components/document-tabs.js +54 -0
  9. package/dist/components/drawer-steps.d.ts +31 -0
  10. package/dist/components/drawer-steps.d.ts.map +1 -0
  11. package/dist/components/drawer-steps.js +27 -0
  12. package/dist/components/file-tree.d.ts +42 -0
  13. package/dist/components/file-tree.d.ts.map +1 -0
  14. package/dist/components/file-tree.js +93 -0
  15. package/dist/components/file-type-icon.d.ts +6 -3
  16. package/dist/components/file-type-icon.d.ts.map +1 -1
  17. package/dist/components/file-type-icon.js +79 -5
  18. package/dist/components/form-drawer.d.ts +11 -6
  19. package/dist/components/form-drawer.d.ts.map +1 -1
  20. package/dist/components/form-drawer.js +2 -2
  21. package/dist/components/library-shelf.d.ts +8 -3
  22. package/dist/components/library-shelf.d.ts.map +1 -1
  23. package/dist/components/library-shelf.js +14 -6
  24. package/dist/components/object-workspace.d.ts.map +1 -1
  25. package/dist/components/object-workspace.js +3 -1
  26. package/dist/internal/form-drawer-frame.d.ts +2 -0
  27. package/dist/internal/form-drawer-frame.d.ts.map +1 -1
  28. package/dist/internal/form-drawer-frame.js +3 -1
  29. package/dist/showcase/specimens/compositions.d.ts +2 -0
  30. package/dist/showcase/specimens/compositions.d.ts.map +1 -1
  31. package/dist/showcase/specimens/compositions.js +20 -1
  32. package/dist/showcase/specimens/data.d.ts +1 -0
  33. package/dist/showcase/specimens/data.d.ts.map +1 -1
  34. package/dist/showcase/specimens/data.js +4 -3
  35. package/dist/showcase/specimens/index.d.ts +4 -0
  36. package/dist/showcase/specimens/index.d.ts.map +1 -1
  37. package/dist/showcase/specimens/navigation.d.ts +2 -0
  38. package/dist/showcase/specimens/navigation.d.ts.map +1 -1
  39. package/dist/showcase/specimens/navigation.js +52 -0
  40. package/dist/showcase/usage.generated.d.ts +1 -1
  41. package/dist/showcase/usage.generated.d.ts.map +1 -1
  42. package/dist/showcase/usage.generated.js +56 -12
  43. package/package.json +4 -2
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { BracesIcon, CodeIcon, DatabaseIcon, FileCogIcon, FileDiffIcon, FileTextIcon, GlobeIcon, PackageIcon, PaletteIcon, RegexIcon, Share2Icon, TerminalIcon, } from "lucide-react";
2
+ import { BracesIcon, CodeIcon, DatabaseIcon, FileArchiveIcon, FileAudioIcon, FileCogIcon, FileDiffIcon, FileImageIcon, FileSpreadsheetIcon, FileTextIcon, FileVideoIcon, GlobeIcon, PackageIcon, PaletteIcon, PresentationIcon, RegexIcon, Share2Icon, TerminalIcon, } from "lucide-react";
3
3
  import { cn } from "../lib/utils.js";
4
4
  const ICON_BY_LANGUAGE = {
5
5
  bash: TerminalIcon,
@@ -13,6 +13,14 @@ const ICON_BY_LANGUAGE = {
13
13
  zsh: TerminalIcon,
14
14
  md: FileTextIcon,
15
15
  markdown: FileTextIcon,
16
+ document: FileTextIcon,
17
+ pdf: FileTextIcon,
18
+ spreadsheet: FileSpreadsheetIcon,
19
+ slides: PresentationIcon,
20
+ image: FileImageIcon,
21
+ audio: FileAudioIcon,
22
+ video: FileVideoIcon,
23
+ archive: FileArchiveIcon,
16
24
  json: BracesIcon,
17
25
  json5: BracesIcon,
18
26
  ini: FileCogIcon,
@@ -44,6 +52,56 @@ const ICON_BY_LANGUAGE = {
44
52
  mermaid: Share2Icon,
45
53
  };
46
54
  const LANGUAGE_BY_EXTENSION = new Map([
55
+ ["txt", "document"],
56
+ ["text", "document"],
57
+ ["pdf", "pdf"],
58
+ ["doc", "document"],
59
+ ["docx", "document"],
60
+ ["rtf", "document"],
61
+ ["odt", "document"],
62
+ ["pages", "document"],
63
+ ["eml", "document"],
64
+ ["msg", "document"],
65
+ ["csv", "spreadsheet"],
66
+ ["tsv", "spreadsheet"],
67
+ ["xls", "spreadsheet"],
68
+ ["xlsx", "spreadsheet"],
69
+ ["xlsm", "spreadsheet"],
70
+ ["ods", "spreadsheet"],
71
+ ["numbers", "spreadsheet"],
72
+ ["ppt", "slides"],
73
+ ["pptx", "slides"],
74
+ ["odp", "slides"],
75
+ ["key", "slides"],
76
+ ["png", "image"],
77
+ ["jpg", "image"],
78
+ ["jpeg", "image"],
79
+ ["gif", "image"],
80
+ ["webp", "image"],
81
+ ["heic", "image"],
82
+ ["bmp", "image"],
83
+ ["tif", "image"],
84
+ ["tiff", "image"],
85
+ ["mp3", "audio"],
86
+ ["wav", "audio"],
87
+ ["m4a", "audio"],
88
+ ["ogg", "audio"],
89
+ ["oga", "audio"],
90
+ ["opus", "audio"],
91
+ ["flac", "audio"],
92
+ ["aac", "audio"],
93
+ ["mp4", "video"],
94
+ ["mov", "video"],
95
+ ["m4v", "video"],
96
+ ["webm", "video"],
97
+ ["avi", "video"],
98
+ ["mkv", "video"],
99
+ ["zip", "archive"],
100
+ ["rar", "archive"],
101
+ ["7z", "archive"],
102
+ ["tar", "archive"],
103
+ ["gz", "archive"],
104
+ ["tgz", "archive"],
47
105
  ["bash", "bash"],
48
106
  ["cfg", "ini"],
49
107
  ["conf", "ini"],
@@ -72,6 +130,18 @@ const LANGUAGE_BY_EXTENSION = new Map([
72
130
  ["yml", "yml"],
73
131
  ["zsh", "zsh"],
74
132
  ]);
133
+ const COLOR_BY_LANGUAGE = {
134
+ document: "text-label-blue",
135
+ md: "text-label-blue",
136
+ markdown: "text-label-blue",
137
+ pdf: "text-label-red",
138
+ spreadsheet: "text-label-green",
139
+ slides: "text-label-orange",
140
+ image: "text-label-purple",
141
+ audio: "text-label-pink",
142
+ video: "text-label-teal",
143
+ archive: "text-label-yellow",
144
+ };
75
145
  function isIconLanguage(key) {
76
146
  return Object.hasOwn(ICON_BY_LANGUAGE, key);
77
147
  }
@@ -89,17 +159,21 @@ function languageForPath(path) {
89
159
  * A file's kind as a Lucide icon, from its path or its language.
90
160
  *
91
161
  * @family Status
92
- * @when Beside a file's name: a file an Agent wrote, a code block's language, an attachment.
162
+ * @when Beside a file's name: a file an Agent wrote, a code block's language, an attachment, a row of a folder.
93
163
  * @instead An app is `AppMark`; a Library entry is its `IdentityMark`. A file's content is
94
164
  * `CodeBlock` or `FileDiff`.
95
- * @behaviour Maps a path's extension or a language name to one icon: terminal, document, braces,
96
- * settings, database, diff, palette, regex, globe, package, share; anything else is the code icon.
165
+ * @behaviour Maps a path's extension or a language name to one icon: terminal, document, PDF, spreadsheet,
166
+ * slides, image, audio, video, archive, braces, settings, database, diff, palette, regex, globe, package,
167
+ * share; anything else is the code icon. The files people keep take their kind's category colour, as a file
168
+ * manager draws them: documents and Markdown blue, PDFs red, spreadsheets green, slides orange, pictures purple, audio pink,
169
+ * video teal, archives yellow; the others stay in the text colour.
97
170
  * @words None; the file's name stands beside it.
98
171
  * @access Always `aria-hidden`.
99
172
  */
100
173
  function FileTypeIcon({ className, language, path, ...props }) {
101
174
  const key = normalizeLanguage(path ? languageForPath(path) : language);
102
175
  const Icon = isIconLanguage(key) ? ICON_BY_LANGUAGE[key] : CodeIcon;
103
- return (_jsx(Icon, { "aria-hidden": "true", className: cn("size-4 shrink-0", className), "data-slot": "file-type-icon", ...props }));
176
+ const color = isIconLanguage(key) ? COLOR_BY_LANGUAGE[key] : undefined;
177
+ return (_jsx(Icon, { "aria-hidden": "true", className: cn("size-4 shrink-0", color, className), "data-slot": "file-type-icon", ...props }));
104
178
  }
105
179
  export { FileTypeIcon };
@@ -25,22 +25,27 @@ export type FormSurfaceProps = {
25
25
  };
26
26
  /**
27
27
  * Why this is a drawer and not a dialog: it sets something up over several
28
- * steps, with a wait; a list too long for a dialog is a `CatalogDrawer`. A form
29
- * of a few fields is a `FormDialog`, and a record already on screen edits
28
+ * steps, with a wait, or it shows what was chosen from a shelf above the few
29
+ * fields that make it; a list too long for a dialog is a `CatalogDrawer`. A form
30
+ * of a few fields alone is a `FormDialog`, and a record already on screen edits
30
31
  * inside its row.
31
32
  */
32
- export type FormDrawerProps = FormSurfaceProps & {
33
+ export type FormDrawerProps = FormSurfaceProps & ({
33
34
  job: "steps";
34
35
  /** "Step 2 of 3", worded by the product, drawn over the title, which stays the job's name. */
35
36
  progress: string;
36
- };
37
+ }
38
+ /** Every step in sight: a `DrawerSteps` in a `FormDrawerBody`, each step with its own actions, wider than the other drawers and with no footer of its own. */
39
+ | {
40
+ job: "stack";
41
+ });
37
42
  /**
38
43
  * The right-side sheet for a catalogue or a setup in steps, at one width.
39
44
  *
40
45
  * @family Compositions
41
- * @when Ours: choosing from a catalogue too long for a dialog (through `CatalogDrawer`), or setting something up in several steps with a wait: connect a messaging channel, Telegram's code.
46
+ * @when Ours: choosing from a catalogue too long for a dialog (through `CatalogDrawer`), or setting something up in several steps with a wait: connect a messaging channel, Telegram's code; or, with `job="stack"` and a `DrawerSteps`, making something from a shelf's card with what it holds in sight, as Vercel's Add Connection: an Agent from an Agent template.
42
47
  * @instead "Don’t use Sheet to confirm destructive actions. The default `modal=false` keeps the page interactive, which weakens severity for a delete or revoke." (https://vercel.com/geist/sheet) Ours: a new record from a few fields is a `FormDialog`; a record already in a list edits in its row with `RowEditForm`; a fact on the record's own page changes in place in its section; a consequence is confirmed in a `ConfirmDialog`; a phone's short job is a `Drawer`.
43
- * @behaviour "Sheet defaults to `modal=false` so toasts and other high-z elements stay reachable. Keep that default unless the sheet owns the screen." (https://vercel.com/geist/sheet) "Pick `side` from the trigger location: a row inspector slides from `right`, a global filter from `left`. Don’t change sides mid-session." (https://vercel.com/geist/sheet) "Outside-click does not auto-close, so always render an explicit close affordance and honor Escape." (https://vercel.com/geist/sheet) Ours: a modal `Sheet` from the right edge over the scrim, because the drawer owns the screen, at the Sheet's one width that no caller sets. The header holds the step ("Step 2 of 3", in mono) over the title, which stays the job's name, then the description and Close; the body scrolls between the header and a footer that stays, with no fill or rule of its own, Cancel then the primary at its trailing edge. A press outside does not close it; Escape does, unless `unsaved.dirty` holds it back. Cancel holds while a save runs. How long it stays open while work goes on follows the product-design skill's rule/wait-shows-where-it-lives and living-elements.md "System waits".
48
+ * @behaviour "Sheet defaults to `modal=false` so toasts and other high-z elements stay reachable. Keep that default unless the sheet owns the screen." (https://vercel.com/geist/sheet) "Pick `side` from the trigger location: a row inspector slides from `right`, a global filter from `left`. Don’t change sides mid-session." (https://vercel.com/geist/sheet) "Outside-click does not auto-close, so always render an explicit close affordance and honor Escape." (https://vercel.com/geist/sheet) Ours: a modal `Sheet` from the right edge over the scrim, because the drawer owns the screen, at the Sheet's one width that no caller sets. The header holds the step ("Step 2 of 3", in mono) over the title, which stays the job's name, then the description and Close; the body scrolls between the header and a footer that stays, with no fill or rule of its own, Cancel then the primary at its trailing edge. A press outside does not close it; Escape does, unless `unsaved.dirty` holds it back. Cancel holds while a save runs. With `job="stack"` it is 658 px wide from `lg`, for the cards it holds, with no step line over the title and no footer: each card has its own actions. How long it stays open while work goes on follows the product-design skill's rule/wait-shows-where-it-lives and living-elements.md "System waits".
44
49
  * @words "Title is Title Case and names the entity (`Deployment Details`, `Member Profile`), not the page action." (https://vercel.com/geist/sheet) "Body is read-mostly: sentence case prose with Title Case sub-headings. Action buttons are optional; when present, follow `Verb + Noun`." (https://vercel.com/geist/sheet) Ours: the title is sentence case and names the job and its object: "Connect Telegram", "Add a skill". The step reads "Step N of M". The primary says what it does: "Connect", "Continue", never "OK".
45
50
  * @access "Trap focus inside the sheet while it’s open and return focus to the trigger row on close so keyboard users keep their place in the list." (https://vercel.com/geist/sheet) "Provide a visible close button labeled `Close` (or an icon button with `aria-label="Close"`) since clicking outside doesn’t dismiss." (https://vercel.com/geist/sheet) "Announce the sheet with `aria-labelledby` pointing at the title; pair it with `aria-describedby` only when the body is short and load-bearing." (https://vercel.com/geist/sheet) Ours: a modal dialog named by its title; focus returns to the opener on close, or to `finalFocus` when the opener is gone. The step is read before the title.
46
51
  */
@@ -1 +1 @@
1
- {"version":3,"file":"form-drawer.d.ts","sourceRoot":"","sources":["../../src/components/form-drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvD,OAAO,EAAc,YAAY,EAAe,MAAM,oBAAoB,CAAC;AAG3E,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG7D,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpE,wFAAwF;AACxF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,qFAAqF;IACrF,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,6FAA6F;IAC7F,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAC;IACnB,wGAAwG;IACxG,QAAQ,EAAE,SAAS,CAAC;IACpB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,cAAc,CAAC,CAAC;IACnE,2EAA2E;IAC3E,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,YAAY,CAAC,CAAC;IAC/D,qGAAqG;IACrG,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG;IAC/C,GAAG,EAAE,OAAO,CAAC;IACb,8FAA8F;IAC9F,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAEhD;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,+BAW5E;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,+DAA+D;IAC/D,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC/C,qEAAqE;IACrE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,iIAAiI;AACjI,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,+BAW3E;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,+BAqB3F"}
1
+ {"version":3,"file":"form-drawer.d.ts","sourceRoot":"","sources":["../../src/components/form-drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvD,OAAO,EAAc,YAAY,EAAe,MAAM,oBAAoB,CAAC;AAG3E,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG7D,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpE,wFAAwF;AACxF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,qFAAqF;IACrF,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,6FAA6F;IAC7F,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAC;IACnB,wGAAwG;IACxG,QAAQ,EAAE,SAAS,CAAC;IACpB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,cAAc,CAAC,CAAC;IACnE,2EAA2E;IAC3E,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,YAAY,CAAC,CAAC;IAC/D,qGAAqG;IACrG,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAC5C,CACI;IACE,GAAG,EAAE,OAAO,CAAC;IACb,8FAA8F;IAC9F,QAAQ,EAAE,MAAM,CAAC;CAClB;AACH,8JAA8J;GAC5J;IAAE,GAAG,EAAE,OAAO,CAAA;CAAE,CACnB,CAAC;AAEJ;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAEhD;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,+BAW5E;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,+DAA+D;IAC/D,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC/C,qEAAqE;IACrE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,iIAAiI;AACjI,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,+BAW3E;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,+BAqB3F"}
@@ -11,9 +11,9 @@ import { cn } from "../lib/utils.js";
11
11
  * The right-side sheet for a catalogue or a setup in steps, at one width.
12
12
  *
13
13
  * @family Compositions
14
- * @when Ours: choosing from a catalogue too long for a dialog (through `CatalogDrawer`), or setting something up in several steps with a wait: connect a messaging channel, Telegram's code.
14
+ * @when Ours: choosing from a catalogue too long for a dialog (through `CatalogDrawer`), or setting something up in several steps with a wait: connect a messaging channel, Telegram's code; or, with `job="stack"` and a `DrawerSteps`, making something from a shelf's card with what it holds in sight, as Vercel's Add Connection: an Agent from an Agent template.
15
15
  * @instead "Don’t use Sheet to confirm destructive actions. The default `modal=false` keeps the page interactive, which weakens severity for a delete or revoke." (https://vercel.com/geist/sheet) Ours: a new record from a few fields is a `FormDialog`; a record already in a list edits in its row with `RowEditForm`; a fact on the record's own page changes in place in its section; a consequence is confirmed in a `ConfirmDialog`; a phone's short job is a `Drawer`.
16
- * @behaviour "Sheet defaults to `modal=false` so toasts and other high-z elements stay reachable. Keep that default unless the sheet owns the screen." (https://vercel.com/geist/sheet) "Pick `side` from the trigger location: a row inspector slides from `right`, a global filter from `left`. Don’t change sides mid-session." (https://vercel.com/geist/sheet) "Outside-click does not auto-close, so always render an explicit close affordance and honor Escape." (https://vercel.com/geist/sheet) Ours: a modal `Sheet` from the right edge over the scrim, because the drawer owns the screen, at the Sheet's one width that no caller sets. The header holds the step ("Step 2 of 3", in mono) over the title, which stays the job's name, then the description and Close; the body scrolls between the header and a footer that stays, with no fill or rule of its own, Cancel then the primary at its trailing edge. A press outside does not close it; Escape does, unless `unsaved.dirty` holds it back. Cancel holds while a save runs. How long it stays open while work goes on follows the product-design skill's rule/wait-shows-where-it-lives and living-elements.md "System waits".
16
+ * @behaviour "Sheet defaults to `modal=false` so toasts and other high-z elements stay reachable. Keep that default unless the sheet owns the screen." (https://vercel.com/geist/sheet) "Pick `side` from the trigger location: a row inspector slides from `right`, a global filter from `left`. Don’t change sides mid-session." (https://vercel.com/geist/sheet) "Outside-click does not auto-close, so always render an explicit close affordance and honor Escape." (https://vercel.com/geist/sheet) Ours: a modal `Sheet` from the right edge over the scrim, because the drawer owns the screen, at the Sheet's one width that no caller sets. The header holds the step ("Step 2 of 3", in mono) over the title, which stays the job's name, then the description and Close; the body scrolls between the header and a footer that stays, with no fill or rule of its own, Cancel then the primary at its trailing edge. A press outside does not close it; Escape does, unless `unsaved.dirty` holds it back. Cancel holds while a save runs. With `job="stack"` it is 658 px wide from `lg`, for the cards it holds, with no step line over the title and no footer: each card has its own actions. How long it stays open while work goes on follows the product-design skill's rule/wait-shows-where-it-lives and living-elements.md "System waits".
17
17
  * @words "Title is Title Case and names the entity (`Deployment Details`, `Member Profile`), not the page action." (https://vercel.com/geist/sheet) "Body is read-mostly: sentence case prose with Title Case sub-headings. Action buttons are optional; when present, follow `Verb + Noun`." (https://vercel.com/geist/sheet) Ours: the title is sentence case and names the job and its object: "Connect Telegram", "Add a skill". The step reads "Step N of M". The primary says what it does: "Connect", "Continue", never "OK".
18
18
  * @access "Trap focus inside the sheet while it’s open and return focus to the trigger row on close so keyboard users keep their place in the list." (https://vercel.com/geist/sheet) "Provide a visible close button labeled `Close` (or an icon button with `aria-label="Close"`) since clicking outside doesn’t dismiss." (https://vercel.com/geist/sheet) "Announce the sheet with `aria-labelledby` pointing at the title; pair it with `aria-describedby` only when the body is short and load-bearing." (https://vercel.com/geist/sheet) Ours: a modal dialog named by its title; focus returns to the opener on close, or to `finalFocus` when the opener is gone. The step is read before the title.
19
19
  */
@@ -8,6 +8,8 @@ export type LibraryShelfProps = {
8
8
  /** Above the search, for the people who keep the shelf: the hub's sync. */
9
9
  notice?: ReactNode;
10
10
  search?: CollectionSearchProps;
11
+ /** At the end of the search's row: the switch between a shelf's two views. */
12
+ searchEnd?: ReactNode;
11
13
  loadingLabel: string;
12
14
  empty: EmptyStateKind<"firstUse"> | EmptyStateKind<"nothingYet">;
13
15
  /** Offered only while the search holds text; otherwise a shelf with nothing in it is `empty`. */
@@ -16,18 +18,21 @@ export type LibraryShelfProps = {
16
18
  } & ({
17
19
  sections: readonly CatalogSection[] | undefined;
18
20
  }
19
- /** The Agent templates shelf: AgentCard elements, three to a row. */
21
+ /** The Agent templates shelf: AgentCard elements, or AgentRow elements with `view="rows"`. */
20
22
  | {
21
23
  templates: readonly ReactElement[] | undefined;
24
+ /** Cards to a row from md: three by default. */
25
+ columns?: 2 | 3;
26
+ view?: "cards" | "rows";
22
27
  });
23
28
  /**
24
29
  * A Library shelf: the one line saying what it holds, the search, then the
25
- * reusable things a person adds, as two-column entries or Agent template cards.
30
+ * reusable things a person adds, as two-column entries, or Agent template cards or rows.
26
31
  *
27
32
  * @family Compositions
28
33
  * @when A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery.
29
34
  * @instead The Portal's Skills and Plugins are entity rows a person finds, opens and adds, a CollectionPage; records a person already has and acts on are a CollectionPage too; choosing from a catalogue without leaving the page is a CatalogDrawer.
30
- * @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates three to a row. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty.
35
+ * @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view="rows"`. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty, with `searchEnd` at the end of its row.
31
36
  * @words The product words every string: the optional definition (one sentence on what the shelf holds), the search's label ("Search skills"), the loading label, each entry's name, line, Add label and added word, the empty, noMatch and failed messages.
32
37
  * @access Each section is a region named by its h2; entries are list items; loading is a status named by loadingLabel and aria-busy; a failed add is announced as an alert; each entry's menu is named by its label.
33
38
  */
@@ -1 +1 @@
1
- {"version":3,"file":"library-shelf.d.ts","sourceRoot":"","sources":["../../src/components/library-shelf.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG3E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,iIAAiI;IACjI,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IACjE,iGAAiG;IACjG,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;CACnC,GAAG,CACA;IAAE,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,CAAA;CAAE;AACrD,qEAAqE;GACnE;IAAE,SAAS,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,CAAA;CAAE,CACrD,CAAC;AA0BF;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,+BAyBpD"}
1
+ {"version":3,"file":"library-shelf.d.ts","sourceRoot":"","sources":["../../src/components/library-shelf.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG3E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,iIAAiI;IACjI,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,8EAA8E;IAC9E,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IACjE,iGAAiG;IACjG,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;CACnC,GAAG,CACA;IAAE,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,CAAA;CAAE;AACrD,8FAA8F;GAC5F;IACE,SAAS,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,CAAC;IAC/C,gDAAgD;IAChD,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACzB,CACJ,CAAC;AA6CF;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,+BAgCpD"}
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Card } from "./card.js";
3
4
  import { CardRow } from "./card-row.js";
4
5
  import { CollectionSearch } from "./collection-search.js";
5
6
  import { EmptyState } from "./empty-state.js";
@@ -7,7 +8,11 @@ import { CatalogList, CatalogSkeleton, catalogIsEmpty } from "../internal/catalo
7
8
  function loadedShelf(props) {
8
9
  if ("sections" in props)
9
10
  return props.sections && { sections: props.sections };
10
- return props.templates && { templates: props.templates };
11
+ return (props.templates && {
12
+ templates: props.templates,
13
+ columns: props.columns ?? 3,
14
+ view: props.view ?? "cards",
15
+ });
11
16
  }
12
17
  function holdsNothing(shelf) {
13
18
  return "sections" in shelf ? catalogIsEmpty(shelf.sections) : shelf.templates.length === 0;
@@ -16,25 +21,28 @@ function ShelfContents({ shelf }) {
16
21
  if ("sections" in shelf) {
17
22
  return _jsx(CatalogList, { columns: 2, headingLevel: 2, sections: shelf.sections });
18
23
  }
19
- return (_jsx(CardRow, { className: "gap-3", columns: 3, render: _jsx("ul", {}), children: shelf.templates.map((template, index) => (_jsx("li", { children: template }, template.key ?? index))) }));
24
+ if (shelf.view === "rows") {
25
+ return (_jsx(Card, { className: "gap-0 overflow-hidden py-0", render: _jsx("ul", {}), children: shelf.templates.map((template, index) => (_jsx("li", { className: "not-last:border-b not-last:border-border", children: template }, template.key ?? index))) }));
26
+ }
27
+ return (_jsx(CardRow, { className: "gap-4", columns: shelf.columns, render: _jsx("ul", {}), children: shelf.templates.map((template, index) => (_jsx("li", { children: template }, template.key ?? index))) }));
20
28
  }
21
29
  /**
22
30
  * A Library shelf: the one line saying what it holds, the search, then the
23
- * reusable things a person adds, as two-column entries or Agent template cards.
31
+ * reusable things a person adds, as two-column entries, or Agent template cards or rows.
24
32
  *
25
33
  * @family Compositions
26
34
  * @when A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery.
27
35
  * @instead The Portal's Skills and Plugins are entity rows a person finds, opens and adds, a CollectionPage; records a person already has and acts on are a CollectionPage too; choosing from a catalogue without leaving the page is a CatalogDrawer.
28
- * @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates three to a row. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty.
36
+ * @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view="rows"`. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty, with `searchEnd` at the end of its row.
29
37
  * @words The product words every string: the optional definition (one sentence on what the shelf holds), the search's label ("Search skills"), the loading label, each entry's name, line, Add label and added word, the empty, noMatch and failed messages.
30
38
  * @access Each section is a region named by its h2; entries are list items; loading is a status named by loadingLabel and aria-busy; a failed add is announced as an alert; each entry's menu is named by its label.
31
39
  */
32
40
  export function LibraryShelf(props) {
33
- const { definition, empty, failed, loadingLabel, notice, search } = props;
41
+ const { definition, empty, failed, loadingLabel, notice, search, searchEnd } = props;
34
42
  const noMatch = search?.value ? props.noMatch : undefined;
35
43
  const shelf = loadedShelf(props);
36
44
  const nothing = shelf !== undefined && holdsNothing(shelf);
37
45
  const body = failed ? (_jsx(EmptyState, { ...failed, scope: "page" })) : !shelf ? (_jsx(CatalogSkeleton, { columns: 2, label: loadingLabel })) : nothing && noMatch ? (_jsx(EmptyState, { kind: "noResults", ...noMatch, scope: "page" })) : nothing ? (_jsx(EmptyState, { ...empty, scope: "page" })) : (_jsx(ShelfContents, { shelf: shelf }));
38
46
  const showsEmpty = !failed && nothing && !noMatch;
39
- return (_jsxs("div", { className: "grid min-w-0 gap-6", "data-slot": "library-shelf", children: [definition ? _jsx("p", { className: "text-body-md text-muted-foreground", children: definition }) : null, notice, search && !showsEmpty ? _jsx(CollectionSearch, { ...search }) : null, body] }));
47
+ return (_jsxs("div", { className: "grid min-w-0 gap-6", "data-slot": "library-shelf", children: [definition ? _jsx("p", { className: "text-body-md text-muted-foreground", children: definition }) : null, notice, search && !showsEmpty ? (_jsxs("div", { className: "flex min-w-0 items-center gap-2", "data-slot": "library-shelf-search", children: [_jsx("div", { className: "min-w-0 flex-1", children: _jsx(CollectionSearch, { ...search }) }), searchEnd] })) : null, body] }));
40
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"object-workspace.d.ts","sourceRoot":"","sources":["../../src/components/object-workspace.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAK9C,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,WAAW,EAEjB,MAAM,gBAAgB,CAAC;AAGxB,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,gGAAgG;IAChG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,eAAe,GACtC,CACI;IACE;;;OAGG;IACH,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,GACD;IACE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,oJAAoJ;IACpJ,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CACJ,CAAC;AAEJ,8FAA8F;AAC9F,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,WAAW,CAAA;CAAE,GACvC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,WAAW,CAAA;CAAE,CAAC;AAE5C;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,QAAQ,EACR,YAAgB,GACjB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,WAAW,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACpC,8FAA8F;IAC9F,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,mGAAmG;IACnG,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,sFAAsF;IACtF,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAC1B,+BAsBA;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAmB,GACpB,EAAE;IACD,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC,+BAuDA"}
1
+ {"version":3,"file":"object-workspace.d.ts","sourceRoot":"","sources":["../../src/components/object-workspace.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAK9C,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,WAAW,EAEjB,MAAM,gBAAgB,CAAC;AAGxB,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,gGAAgG;IAChG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,eAAe,GACtC,CACI;IACE;;;OAGG;IACH,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,GACD;IACE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,oJAAoJ;IACpJ,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CACJ,CAAC;AAEJ,8FAA8F;AAC9F,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,WAAW,CAAA;CAAE,GACvC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,WAAW,CAAA;CAAE,CAAC;AAE5C;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,QAAQ,EACR,YAAgB,GACjB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,WAAW,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACpC,8FAA8F;IAC9F,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,mGAAmG;IACnG,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,sFAAsF;IACtF,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAC1B,+BAsBA;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAmB,GACpB,EAAE;IACD,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC,+BAyDA"}
@@ -39,5 +39,7 @@ export function ObjectFacts({ facts, density = "default", }) {
39
39
  const termId = useId();
40
40
  return (_jsx("dl", { "data-density": density, "data-slot": "object-facts", className: density === "compact"
41
41
  ? "grid min-w-0 grid-cols-2 gap-x-6 gap-y-2"
42
- : "grid min-w-0 gap-x-6 gap-y-5 sm:grid-cols-2", children: facts.map((fact, index) => (_jsxs("div", { className: cn(density === "compact" ? "grid min-w-0 gap-0.5" : "grid min-w-0 gap-2", fact.block && "col-span-full", fact.right && "text-right"), children: [_jsxs("dt", { className: cn("min-h-4 text-sm/3.5 text-muted-foreground", fact.ellipsis && "truncate"), children: [_jsx("span", { id: `${termId}-${index}`, children: fact.label }), fact.tooltip ? (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { "aria-label": fact.label, className: "ml-1 inline-flex size-3.5 cursor-help align-text-bottom", children: _jsx(Info, { "aria-hidden": "true", className: "size-3.5" }) }), _jsx(TooltipContent, { children: fact.tooltip })] })) : null] }), _jsx("dd", { "aria-labelledby": `${termId}-${index}`, className: cn("min-w-0 text-sm", fact.block ? "font-normal leading-5 whitespace-pre-wrap" : "font-medium leading-4", fact.ellipsis ? "truncate" : "wrap-break-word"), title: fact.ellipsis && typeof fact.value === "string" ? fact.value : undefined, children: fact.value })] }, fact.label))) }));
42
+ : "grid min-w-0 gap-x-6 gap-y-5 sm:grid-cols-2", children: facts.map((fact, index) => (_jsxs("div", { className: cn(density === "compact"
43
+ ? "grid min-w-0 content-start gap-0.5"
44
+ : "grid min-w-0 content-start gap-2", fact.block && "col-span-full", fact.right && "text-right"), children: [_jsxs("dt", { className: cn("min-h-4 text-sm/3.5 text-muted-foreground", fact.ellipsis && "truncate"), children: [_jsx("span", { id: `${termId}-${index}`, children: fact.label }), fact.tooltip ? (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { "aria-label": fact.label, className: "ml-1 inline-flex size-3.5 cursor-help align-text-bottom", children: _jsx(Info, { "aria-hidden": "true", className: "size-3.5" }) }), _jsx(TooltipContent, { children: fact.tooltip })] })) : null] }), _jsx("dd", { "aria-labelledby": `${termId}-${index}`, className: cn("min-w-0 text-sm", fact.block ? "font-normal leading-5 whitespace-pre-wrap" : "font-medium leading-4", fact.ellipsis ? "truncate" : "wrap-break-word"), title: fact.ellipsis && typeof fact.value === "string" ? fact.value : undefined, children: fact.value })] }, fact.label))) }));
43
45
  }
@@ -1,6 +1,8 @@
1
1
  import type { FormSurfaceProps } from "../components/form-drawer.js";
2
2
  export type FormDrawerFrameProps = FormSurfaceProps & ({
3
3
  job: "catalog";
4
+ } | {
5
+ job: "stack";
4
6
  } | {
5
7
  job: "steps";
6
8
  progress: string;
@@ -1 +1 @@
1
- {"version":3,"file":"form-drawer-frame.d.ts","sourceRoot":"","sources":["../../src/internal/form-drawer-frame.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GACjD,CAAC;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE5D,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,+BA0C1D"}
1
+ {"version":3,"file":"form-drawer-frame.d.ts","sourceRoot":"","sources":["../../src/internal/form-drawer-frame.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GACjD,CAAC;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE/E,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,+BA+C1D"}
@@ -5,5 +5,7 @@ import { guardUnsaved } from "./unsaved-guard.js";
5
5
  /** The right-side sheet that `FormDrawer` and `CatalogDrawer` both draw. */
6
6
  export function FormDrawerFrame(props) {
7
7
  const { open, onOpenChange, onOpenChangeComplete, title, description, closeLabel, children, initialFocus, finalFocus = true, unsaved, } = props;
8
- return (_jsx(Sheet, { modal: true, open: open, onOpenChange: guardUnsaved(onOpenChange, unsaved), onOpenChangeComplete: onOpenChangeComplete, children: _jsxs(SheetContent, { closeLabel: closeLabel, finalFocus: finalFocus, initialFocus: initialFocus, side: "right", children: [_jsxs(SheetHeader, { className: "pr-12", children: [props.job === "steps" ? (_jsx("p", { className: "font-label-mono text-label-mono text-muted-foreground", "data-slot": "form-drawer-progress", children: props.progress })) : null, _jsx(SheetTitle, { className: "wrap-break-word", children: title }), description ? _jsx(SheetDescription, { children: description }) : null] }), children] }) }));
8
+ return (_jsx(Sheet, { modal: true, open: open, onOpenChange: guardUnsaved(onOpenChange, unsaved), onOpenChangeComplete: onOpenChangeComplete, children: _jsxs(SheetContent, { className: props.job === "stack"
9
+ ? "data-[side=right]:lg:w-[658px] data-[side=right]:sm:max-w-[calc(100%-var(--nc-lg))] [&>[data-slot=sheet-close]]:top-[22px]"
10
+ : undefined, closeLabel: closeLabel, finalFocus: finalFocus, initialFocus: initialFocus, side: "right", children: [_jsxs(SheetHeader, { className: props.job === "stack" ? "pr-12 pb-0" : "pr-12", children: [props.job === "steps" ? (_jsx("p", { className: "font-label-mono text-label-mono text-muted-foreground", "data-slot": "form-drawer-progress", children: props.progress })) : null, _jsx(SheetTitle, { className: "wrap-break-word", children: title }), description ? _jsx(SheetDescription, { children: description }) : null] }), children] }) }));
9
11
  }
@@ -11,6 +11,7 @@ declare function EntryPictureSpecimen(): import("react").JSX.Element;
11
11
  declare function InviteCardSpecimen(): import("react").JSX.Element;
12
12
  declare function FormDialogSpecimen(): import("react").JSX.Element;
13
13
  declare function FormDrawerSpecimen(): import("react").JSX.Element;
14
+ declare function DrawerStepsSpecimen(): import("react").JSX.Element;
14
15
  declare function LibraryShelfSpecimen(): import("react").JSX.Element;
15
16
  declare function OverviewPageSpecimen(): import("react").JSX.Element;
16
17
  declare function RecordSheetSpecimen(): import("react").JSX.Element;
@@ -30,6 +31,7 @@ export declare const COMPOSITIONS: {
30
31
  InviteCard: typeof InviteCardSpecimen;
31
32
  FormDialog: typeof FormDialogSpecimen;
32
33
  FormDrawer: typeof FormDrawerSpecimen;
34
+ DrawerSteps: typeof DrawerStepsSpecimen;
33
35
  LibraryShelf: typeof LibraryShelfSpecimen;
34
36
  ObjectPage: () => import("react").JSX.Element;
35
37
  ObjectSection: () => import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"compositions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/compositions.tsx"],"names":[],"mappings":"AAuIA,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,oBAAoB,gCAkD5B;AAED,iBAAS,oBAAoB,gCAqC5B;AAED,iBAAS,mBAAmB,gCA2B3B;AAED,iBAAS,mBAAmB,gCAoB3B;AAwBD,iBAAS,uBAAuB,gCAkD/B;AAmCD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;CA+FE,CAAC"}
1
+ {"version":3,"file":"compositions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/compositions.tsx"],"names":[],"mappings":"AAwIA,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,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;CAgGE,CAAC"}
@@ -4,6 +4,7 @@ import { Mail, Plus, Puzzle, RefreshCw, Wrench } from "lucide-react";
4
4
  import { useState } from "react";
5
5
  import { ActivityFeed } from "../../components/activity-feed.js";
6
6
  import { AgentCard } from "../../components/agent-card.js";
7
+ import { DrawerStepBody, DrawerStepFooter, DrawerSteps } from "../../components/drawer-steps.js";
7
8
  import { AgentOrb } from "../../components/agent-orb.js";
8
9
  import { AgentProfileCard } from "../../components/agent-profile.js";
9
10
  import { BrandWordmark } from "../../components/brand.js";
@@ -309,6 +310,23 @@ function FormDrawerSpecimen() {
309
310
  const [open, setOpen] = useState(false);
310
311
  return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: () => setOpen(true), variant: "outline", children: "Connect Telegram" }), _jsxs(FormDrawer, { closeLabel: "Close", job: "steps", onOpenChange: setOpen, open: open, progress: "Step 1 of 2", title: "Connect Telegram", children: [_jsx(FormDrawerBody, { children: _jsx("p", { className: "text-sm", children: "Open the bot on your phone and send it the code 4821." }) }), _jsx(FormDrawerFooter, { cancel: { label: "Cancel" }, children: _jsx(Button, { onClick: () => setOpen(false), children: "Continue" }) })] })] }));
311
312
  }
313
+ function DrawerStepsSpecimen() {
314
+ return (_jsx("div", { className: "max-w-xl", children: _jsx(DrawerSteps, { steps: [
315
+ {
316
+ id: "chosen",
317
+ state: "chosen",
318
+ title: "Acme Quotes",
319
+ mark: _jsx(AgentOrb, { color: COBALTO, decorative: true, form: "orbit", size: 32 }),
320
+ children: _jsx(DrawerStepBody, { children: "Writes quotes from the price list." }),
321
+ },
322
+ {
323
+ id: "configure",
324
+ state: "current",
325
+ title: "Configure",
326
+ children: (_jsxs(_Fragment, { children: [_jsx(DrawerStepBody, { children: "The fields of this step." }), _jsx(DrawerStepFooter, { children: _jsx(Button, { children: "Create Agent" }) })] })),
327
+ },
328
+ ] }) }));
329
+ }
312
330
  function LibraryShelfSpecimen() {
313
331
  const art = useEmptyArt();
314
332
  const [search, setSearch] = useState("");
@@ -342,7 +360,7 @@ function LibraryShelfSpecimen() {
342
360
  clearLabel: "Clear search",
343
361
  value: search,
344
362
  onValueChange: setSearch,
345
- }, templates: templates.map((template) => (_jsx(AgentCard, { action: _jsx(Button, { prefix: _jsx(Plus, {}), children: "Create agent" }), job: template.job, meta: template.meta, name: template.name, visual: _jsx(AgentOrb, { color: COBALTO, decorative: true, form: template.form, size: 96 }) }, template.name))) }));
363
+ }, templates: templates.map((template) => (_jsx(AgentCard, { job: template.job, meta: template.meta, name: template.name, onOpen: () => undefined, visual: _jsx(AgentOrb, { color: COBALTO, decorative: true, form: template.form, size: 64 }) }, template.name))) }));
346
364
  }
347
365
  function OverviewPageSpecimen() {
348
366
  return (_jsx(OverviewPage, { exceptions: _jsx(RecordList, { ...MAILBOX_LIST, heading: { title: "Needs attention", actions: { meta: "1 of 3 mailboxes" } }, label: "Needs attention", records: MAILBOXES.filter((mailbox) => mailbox.status === "failed") }), figures: [
@@ -442,6 +460,7 @@ export const COMPOSITIONS = {
442
460
  InviteCard: InviteCardSpecimen,
443
461
  FormDialog: FormDialogSpecimen,
444
462
  FormDrawer: FormDrawerSpecimen,
463
+ DrawerSteps: DrawerStepsSpecimen,
445
464
  LibraryShelf: LibraryShelfSpecimen,
446
465
  ObjectPage: () => (_jsx(ObjectPage, { actions: { secondary: { label: "Edit", onClick: nothing }, menu: PAGE_MENU }, description: "Optician \u00B7 partner since March 2026", facts: [
447
466
  { label: "Customers", value: "4" },
@@ -8,6 +8,7 @@ declare function DisclosureRowSpecimen(): import("react").JSX.Element;
8
8
  declare function UsageTable(): import("react").JSX.Element;
9
9
  export declare const DATA: {
10
10
  AgentCard: () => import("react").JSX.Element;
11
+ AgentRow: () => import("react").JSX.Element;
11
12
  Card: () => import("react").JSX.Element;
12
13
  CardRow: () => import("react").JSX.Element;
13
14
  CodeBlock: typeof CodeBlockSpecimen;
@@ -1 +1 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/data.tsx"],"names":[],"mappings":"AA4HA,iBAAS,iBAAiB,gCAczB;AAsCD,iBAAS,iBAAiB,gCAkDzB;AAUD,iBAAS,eAAe,gCASvB;AAED,iBAAS,YAAY,gCAoCpB;AAED,iBAAS,WAAW,gCAuBnB;AAQD,iBAAS,gBAAgB,gCAqBxB;AAED,iBAAS,qBAAqB,gCAc7B;AAED,iBAAS,UAAU,gCAqClB;AAED,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;CAgOU,CAAC"}
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/data.tsx"],"names":[],"mappings":"AA4HA,iBAAS,iBAAiB,gCAczB;AAsCD,iBAAS,iBAAiB,gCAkDzB;AAUD,iBAAS,eAAe,gCASvB;AAED,iBAAS,YAAY,gCAoCpB;AAED,iBAAS,WAAW,gCAuBnB;AAQD,iBAAS,gBAAgB,gCAqBxB;AAED,iBAAS,qBAAqB,gCAc7B;AAED,iBAAS,UAAU,gCAqClB;AAED,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CAyOU,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { MessageCircle, Plus, RotateCw } from "lucide-react";
3
+ import { MessageCircle, RotateCw } from "lucide-react";
4
4
  import { useState } from "react";
5
- import { AgentCard } from "../../components/agent-card.js";
5
+ import { AgentCard, AgentRow } from "../../components/agent-card.js";
6
6
  import { AgentOrb } from "../../components/agent-orb.js";
7
7
  import { Button } from "../../components/button.js";
8
8
  import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "../../components/card.js";
@@ -155,7 +155,8 @@ function UsageTable() {
155
155
  return (_jsxs(Table, { "aria-label": "Usage by Agent", children: [_jsxs(TableColgroup, { children: [_jsx(TableCol, {}), _jsx(TableCol, { className: "w-36" }), _jsx(TableCol, { className: "w-32" })] }), _jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { scope: "col", children: "Agent" }), _jsx(TableHead, { className: "text-right", scope: "col", children: "Tokens" }), _jsx(TableHead, { className: "text-right", scope: "col", children: "Cost (\u20AC)" })] }) }), _jsx(TableBody, { interactive: true, striped: true, children: USAGE_ROWS.map((row) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: row.agent }), _jsx(TableCell, { className: "text-right tabular-nums", children: row.tokens }), _jsx(TableCell, { className: "text-right tabular-nums", children: row.cost })] }, row.agent))) }), _jsx(TableFooter, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Total" }), _jsx(TableCell, { className: "text-right tabular-nums", children: "3,850,352" }), _jsx(TableCell, { className: "text-right tabular-nums", children: "\u20AC 59.27" })] }) })] }));
156
156
  }
157
157
  export const DATA = {
158
- AgentCard: () => (_jsx("div", { className: "max-w-xs", children: _jsx(AgentCard, { action: _jsx(Button, { prefix: _jsx(Plus, {}), children: "Create agent" }), job: "Writes quotes from the price list", meta: "3 skills \u00B7 2 tasks \u00B7 v1.2.0", name: "Acme Quotes", visual: _jsx(AgentOrb, { color: COBALTO, decorative: true, form: "orbit", size: 96 }) }) })),
158
+ AgentCard: () => (_jsx("div", { className: "max-w-xs", children: _jsx(AgentCard, { job: "Writes quotes from the price list", meta: "3 skills \u00B7 2 tasks", name: "Acme Quotes", onOpen: () => undefined, visual: _jsx(AgentOrb, { color: COBALTO, decorative: true, form: "orbit", size: 64 }) }) })),
159
+ AgentRow: () => (_jsx(AgentRow, { job: "Writes quotes from the price list", meta: "3 skills \u00B7 2 tasks", name: "Acme Quotes", onOpen: () => undefined, visual: _jsx(AgentOrb, { color: COBALTO, decorative: true, form: "orbit", size: 40 }) })),
159
160
  Card: () => (_jsxs("div", { className: "grid max-w-md gap-6", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Billing contact" }), _jsx(CardDescription, { children: "Who receives invoices and payment reminders." }), _jsx(CardAction, { children: _jsx(Button, { size: "sm", variant: "outline", children: "Edit" }) })] }), _jsx(CardContent, { className: "text-sm", children: "amministrazione@acme.it" }), _jsx(CardFooter, { children: "Changed on 2 October" })] }), _jsxs(Card, { surface: "raised", children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Payment method" }), _jsx(CardDescription, { children: "The card charged for Agents and extra seats." }), _jsx(CardAction, { children: _jsx(Button, { size: "sm", variant: "outline", children: "Change" }) })] }), _jsx(CardContent, { className: "text-sm", children: "Visa ending 4242" })] }), _jsx("div", { className: "max-w-72", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Personalizzazione" }), _jsx(CardDescription, { children: "Il nome e i colori che vedono i Clienti." }), _jsx(CardAction, { children: _jsx(Button, { size: "sm", variant: "outline", children: "Modifica" }) })] }), _jsx(CardContent, { className: "text-sm", children: "Acme Servizi" })] }) })] })),
160
161
  CardRow: () => (_jsx(CardRow, { columns: 5, children: ["Runs", "Approvals", "Cost", "Tokens", "Cache hit rate"].map((title, index) => (_jsx(Card, { children: _jsxs(CardHeader, { children: [_jsx(CardTitle, { children: title }), _jsx(CardDescription, { children: index === 1 ? "A longer line shows every card keeps the tallest's height." : "—" })] }) }, title))) })),
161
162
  CodeBlock: CodeBlockSpecimen,
@@ -56,6 +56,7 @@ export declare const SPECIMENS: {
56
56
  UpdateCard: () => import("react").JSX.Element;
57
57
  WaitingLine: () => import("react").JSX.Element;
58
58
  AgentCard: () => import("react").JSX.Element;
59
+ AgentRow: () => import("react").JSX.Element;
59
60
  Card: () => import("react").JSX.Element;
60
61
  CardRow: () => import("react").JSX.Element;
61
62
  CodeBlock: () => import("react").JSX.Element;
@@ -80,6 +81,8 @@ export declare const SPECIMENS: {
80
81
  TextWithCopyButton: () => import("react").JSX.Element;
81
82
  UsageMeter: () => import("react").JSX.Element;
82
83
  AgentListRow: () => import("react").JSX.Element;
84
+ DocumentTabs: () => import("react").JSX.Element;
85
+ FileTree: () => import("react").JSX.Element;
83
86
  Breadcrumb: () => import("react").JSX.Element;
84
87
  CommandDialog: () => import("react").JSX.Element;
85
88
  Footer: () => import("react").JSX.Element;
@@ -166,6 +169,7 @@ export declare const SPECIMENS: {
166
169
  InviteCard: () => import("react").JSX.Element;
167
170
  FormDialog: () => import("react").JSX.Element;
168
171
  FormDrawer: () => import("react").JSX.Element;
172
+ DrawerSteps: () => import("react").JSX.Element;
169
173
  LibraryShelf: () => import("react").JSX.Element;
170
174
  ObjectPage: () => import("react").JSX.Element;
171
175
  ObjectSection: () => 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"}
@@ -4,6 +4,8 @@ declare function SidebarSectionsSpecimen(): import("react").JSX.Element;
4
4
  declare function TabsSpecimen(): import("react").JSX.Element;
5
5
  export declare const NAVIGATION: {
6
6
  AgentListRow: () => import("react").JSX.Element;
7
+ DocumentTabs: () => import("react").JSX.Element;
8
+ FileTree: () => import("react").JSX.Element;
7
9
  Breadcrumb: () => import("react").JSX.Element;
8
10
  CommandDialog: typeof CommandDialogSpecimen;
9
11
  Footer: () => import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/navigation.tsx"],"names":[],"mappings":"AAsEA,iBAAS,qBAAqB,gCAkC7B;AAED,iBAAS,qBAAqB,gCAmB7B;AAED,iBAAS,uBAAuB,gCAiE/B;AAED,iBAAS,YAAY,gCAqCpB;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CA2RI,CAAC"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/navigation.tsx"],"names":[],"mappings":"AAwEA,iBAAS,qBAAqB,gCAkC7B;AAED,iBAAS,qBAAqB,gCAmB7B;AAED,iBAAS,uBAAuB,gCAiE/B;AAED,iBAAS,YAAY,gCAqCpB;AA6ED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;CA6RI,CAAC"}
@@ -5,6 +5,8 @@ import { useState } from "react";
5
5
  import { AccountMenuIdentity } from "../../components/account-menu.js";
6
6
  import { AgentListRow } from "../../components/agent-list-row.js";
7
7
  import { BrandWordmark } from "../../components/brand.js";
8
+ import { DocumentTabs } from "../../components/document-tabs.js";
9
+ import { FileTree } from "../../components/file-tree.js";
8
10
  import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from "../../components/breadcrumb.js";
9
11
  import { Button } from "../../components/button.js";
10
12
  import { CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandShortcut, } from "../../components/command.js";
@@ -86,8 +88,58 @@ function TabsSpecimen() {
86
88
  const [lined, setLined] = useState("overview");
87
89
  return (_jsxs("div", { className: "grid gap-8", children: [_jsxs(Tabs, { onValueChange: setPlain, value: plain, children: [_jsxs(TabsList, { "aria-label": "Rossi Ottica", children: [_jsx(TabsTrigger, { value: "overview", children: "Overview" }), _jsx(TabsTrigger, { value: "installations", children: "Installations" }), _jsx(TabsTrigger, { disabled: true, disabledReason: "Only owners see billing", value: "billing", children: "Billing" })] }), _jsx(TabsContent, { className: "pt-3 text-sm text-muted-foreground", value: "overview", children: "What the customer runs, at a glance." }), _jsx(TabsContent, { className: "pt-3 text-sm text-muted-foreground", value: "installations", children: "Every machine Nadia is installed on." })] }), _jsxs(Tabs, { onValueChange: setLined, value: lined, children: [_jsxs(TabsList, { "aria-label": "Rossi Ottica, with a rule", variant: "line", children: [_jsx(TabsTrigger, { value: "overview", children: "Overview" }), _jsx(TabsTrigger, { value: "installations", children: "Installations" }), _jsx(TabsTrigger, { disabled: true, disabledReason: "Only owners see billing", value: "billing", children: "Billing" })] }), _jsx(TabsContent, { className: "pt-3 text-sm text-muted-foreground", value: "overview", children: "What the customer runs, at a glance." }), _jsx(TabsContent, { className: "pt-3 text-sm text-muted-foreground", value: "installations", children: "Every machine Nadia is installed on." })] })] }));
88
90
  }
91
+ const SAMPLE_FOLDER = new Map([
92
+ [
93
+ "/nadia",
94
+ [
95
+ { isFolder: true, name: "Offers", path: "/nadia/Offers" },
96
+ { isFolder: true, name: "Invoices", path: "/nadia/Invoices" },
97
+ { isFolder: false, name: "Customer list.csv", path: "/nadia/Customer list.csv" },
98
+ { isFolder: false, name: "Notes.md", path: "/nadia/Notes.md" },
99
+ ],
100
+ ],
101
+ [
102
+ "/nadia/Offers",
103
+ [
104
+ {
105
+ isFolder: false,
106
+ name: "Rossi Srl - offer.pdf",
107
+ path: "/nadia/Offers/Rossi Srl - offer.pdf",
108
+ },
109
+ {
110
+ isFolder: false,
111
+ name: "Bianchi Spa - offer.docx",
112
+ path: "/nadia/Offers/Bianchi Spa - offer.docx",
113
+ },
114
+ ],
115
+ ],
116
+ [
117
+ "/nadia/Invoices",
118
+ [{ isFolder: false, name: "Invoice 118.xlsx", path: "/nadia/Invoices/Invoice 118.xlsx" }],
119
+ ],
120
+ ]);
121
+ const OPEN_DOCUMENTS = [
122
+ { value: "file", label: "Price list November.csv", closeLabel: "Close Price list November.csv" },
123
+ { value: "page", label: "Supplier prices", closeLabel: "Close Supplier prices" },
124
+ ];
125
+ function DocumentTabsSpecimen() {
126
+ const [tabs, setTabs] = useState(OPEN_DOCUMENTS);
127
+ const [value, setValue] = useState("file");
128
+ return (_jsx(DocumentTabs, { "aria-label": "Open in the side panel", idBase: "specimen", onClose: (closed) => {
129
+ const rest = tabs.filter((tab) => tab.value !== closed);
130
+ setTabs(rest.length > 0 ? rest : OPEN_DOCUMENTS);
131
+ setValue((rest[0] ?? OPEN_DOCUMENTS[0])?.value ?? "file");
132
+ }, onValueChange: setValue, tabs: tabs.map((tab) => ({ ...tab, icon: _jsx(LayoutDashboard, { "aria-hidden": "true" }) })), value: value }));
133
+ }
134
+ function FileTreeSpecimen() {
135
+ const [expanded, setExpanded] = useState(["/nadia/Offers"]);
136
+ const [selected, setSelected] = useState("/nadia/Offers/Rossi Srl - offer.pdf");
137
+ return (_jsx("div", { className: "max-w-xs", children: _jsx(FileTree, { "aria-label": "Nadia's folder", expanded: expanded, onExpandedChange: setExpanded, onOpenFile: (entry) => setSelected(entry.path), readFolder: (path) => Promise.resolve(SAMPLE_FOLDER.get(path) ?? []), root: { isFolder: true, name: "Nadia", path: "/nadia" }, selected: selected }) }));
138
+ }
89
139
  export const NAVIGATION = {
90
140
  AgentListRow: () => (_jsxs("ul", { className: "grid max-w-xs gap-1", children: [_jsx("li", { children: _jsx(AgentListRow, { color: COBALTO, current: true, form: "orbit", name: "Invoices", state: "working", stateLine: "Drafting October's invoices" }) }), _jsx("li", { children: _jsx(AgentListRow, { color: VERDE, form: "lattice", name: "Orders", state: "waiting", stateLine: "Waiting for you" }) })] })),
141
+ DocumentTabs: () => _jsx(DocumentTabsSpecimen, {}),
142
+ FileTree: () => _jsx(FileTreeSpecimen, {}),
91
143
  Breadcrumb: () => (_jsxs("div", { className: "grid gap-4", children: [_jsx(Breadcrumb, { "aria-label": "Path", children: _jsxs(BreadcrumbList, { children: [_jsx(BreadcrumbItem, { children: _jsx(BreadcrumbLink, { href: "#customers", children: "Customers" }) }), _jsx(BreadcrumbSeparator, {}), _jsx(BreadcrumbItem, { children: _jsx(BreadcrumbPage, { children: "Rossi Ottica" }) })] }) }), _jsx(Breadcrumb, { "aria-label": "Path with a closed ancestor", children: _jsxs(BreadcrumbList, { children: [_jsx(BreadcrumbItem, { children: _jsx(BreadcrumbLink, { disabled: true, children: "Partners" }) }), _jsx(BreadcrumbSeparator, {}), _jsx(BreadcrumbItem, { children: _jsx(BreadcrumbLink, { href: "#customers", children: "Customers" }) }), _jsx(BreadcrumbSeparator, {}), _jsx(BreadcrumbItem, { children: _jsx(BreadcrumbPage, { children: "Rossi Ottica" }) })] }) }), _jsx(Breadcrumb, { "aria-label": "Long path", children: _jsxs(BreadcrumbList, { children: [_jsx(BreadcrumbItem, { children: _jsx(BreadcrumbLink, { href: "#customers", children: "Customers" }) }), _jsx(BreadcrumbSeparator, {}), _jsx(BreadcrumbItem, { children: _jsx(BreadcrumbEllipsis, { label: "More" }) }), _jsx(BreadcrumbSeparator, {}), _jsx(BreadcrumbItem, { children: _jsx(BreadcrumbLink, { href: "#installations", children: "Installations" }) }), _jsx(BreadcrumbSeparator, {}), _jsx(BreadcrumbItem, { children: _jsx(BreadcrumbPage, { children: "Rossi Ottica, Milano" }) })] }) })] })),
92
144
  CommandDialog: CommandDialogSpecimen,
93
145
  Footer: () => (_jsx(Footer, { children: _jsxs(FooterInner, { children: [_jsx(FooterBrand, { "aria-label": "nadicode", href: "#top", children: _jsx(BrandWordmark, { alt: "" }) }), _jsx(FooterIdentity, { children: "Agents that do the work, for Italian companies." }), _jsxs(FooterNav, { "aria-label": "Company", children: [_jsx("a", { href: "#privacy", children: "Privacy" }), _jsx("a", { href: "#terms", children: "Terms" })] }), _jsx(FooterMeta, { children: "\u00A9 2026 nadicode" })] }) })),