@nadicodeai/ui 12.1.198 → 12.1.199
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/document-tabs.d.ts +46 -0
- package/dist/components/document-tabs.d.ts.map +1 -0
- package/dist/components/document-tabs.js +54 -0
- package/dist/components/file-tree.d.ts +42 -0
- package/dist/components/file-tree.d.ts.map +1 -0
- package/dist/components/file-tree.js +93 -0
- package/dist/components/file-type-icon.d.ts +6 -3
- package/dist/components/file-type-icon.d.ts.map +1 -1
- package/dist/components/file-type-icon.js +79 -5
- package/dist/showcase/specimens/index.d.ts +2 -0
- package/dist/showcase/specimens/index.d.ts.map +1 -1
- package/dist/showcase/specimens/navigation.d.ts +2 -0
- package/dist/showcase/specimens/navigation.d.ts.map +1 -1
- package/dist/showcase/specimens/navigation.js +52 -0
- package/dist/showcase/usage.generated.d.ts +1 -1
- package/dist/showcase/usage.generated.d.ts.map +1 -1
- package/dist/showcase/usage.generated.js +24 -2
- package/package.json +4 -2
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface DocumentTab {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon: React.ReactNode;
|
|
6
|
+
/** A longer name shown on hover: the file's path or the page's address. */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** The ×'s hover title, in the product's words: "Close Notes.md". */
|
|
9
|
+
closeLabel: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DocumentTabsProps {
|
|
12
|
+
tabs: readonly DocumentTab[];
|
|
13
|
+
value: string;
|
|
14
|
+
onValueChange: (value: string) => void;
|
|
15
|
+
onClose: (value: string) => void;
|
|
16
|
+
/** Builds the ids that tie each tab to the panel the page draws for it. */
|
|
17
|
+
idBase: string;
|
|
18
|
+
"aria-label": string;
|
|
19
|
+
/** Controls after the tabs, such as the button that opens a new one. */
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
/** The id of a tab and of the panel it shows, for a page that draws its panels itself. */
|
|
24
|
+
declare function documentTabIds(idBase: string, value: string): {
|
|
25
|
+
tab: string;
|
|
26
|
+
panel: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Open documents side by side, as a browser's tabs: each a name with its icon and a close button, one of them shown.
|
|
30
|
+
*
|
|
31
|
+
* @family Navigation
|
|
32
|
+
* @when The things a person opened and switches between beside their work, each one closable: the files and web pages
|
|
33
|
+
* of Nadia's side panel. The set changes as they open and close things.
|
|
34
|
+
* @instead A fixed set of sibling views of one object is `Tabs`; a list of records to open is `ItemGroup`.
|
|
35
|
+
* @behaviour One tab stop: the arrow keys move between tabs, Home and End go to the first and the last, and moving
|
|
36
|
+
* selects. Delete or Backspace closes the focused tab and moves the focus to the tab shown next. A click on a tab's ×,
|
|
37
|
+
* which shows `closeLabel` on hover, closes that tab only and does not select it; the × is the pointer's, never a tab stop. Each tab is as wide as its name, from 7rem to 14rem, ending in an
|
|
38
|
+
* ellipsis; a row wider than its space scrolls sideways without a bar, and the tab shown scrolls into view. The tab
|
|
39
|
+
* shown takes the `accent` fill and ink text; the others are muted text that takes a lighter accent on hover.
|
|
40
|
+
* @words Each tab is the document's own name, a file's or a page's title. `closeLabel` is "Close <name>".
|
|
41
|
+
* @access A `tablist` named by `aria-label` of `tab`s, each declaring Delete in `aria-keyshortcuts` and an `aria-controls` naming the panel the page draws with
|
|
42
|
+
* `documentTabIds(idBase, value).panel`, which the panel takes as its id beside `aria-labelledby` set to `.tab`.
|
|
43
|
+
*/
|
|
44
|
+
declare function DocumentTabs({ tabs, value, onValueChange, onClose, idBase, children, className, ...props }: DocumentTabsProps): React.JSX.Element;
|
|
45
|
+
export { DocumentTabs, documentTabIds };
|
|
46
|
+
//# sourceMappingURL=document-tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-tabs.d.ts","sourceRoot":"","sources":["../../src/components/document-tabs.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,SAAS,WAAW,EAAE,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,0FAA0F;AAC1F,iBAAS,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;EAEpD;AAED;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,YAAY,CAAC,EACpB,IAAI,EACJ,KAAK,EACL,aAAa,EACb,OAAO,EACP,MAAM,EACN,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,qBA2EnB;AAED,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
|
|
4
|
+
import { XIcon } from "lucide-react";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { cn } from "../lib/utils.js";
|
|
7
|
+
const idPart = (value) => encodeURIComponent(value).replaceAll("%", "_");
|
|
8
|
+
/** The id of a tab and of the panel it shows, for a page that draws its panels itself. */
|
|
9
|
+
function documentTabIds(idBase, value) {
|
|
10
|
+
return { tab: `${idBase}-tab-${idPart(value)}`, panel: `${idBase}-panel-${idPart(value)}` };
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Open documents side by side, as a browser's tabs: each a name with its icon and a close button, one of them shown.
|
|
14
|
+
*
|
|
15
|
+
* @family Navigation
|
|
16
|
+
* @when The things a person opened and switches between beside their work, each one closable: the files and web pages
|
|
17
|
+
* of Nadia's side panel. The set changes as they open and close things.
|
|
18
|
+
* @instead A fixed set of sibling views of one object is `Tabs`; a list of records to open is `ItemGroup`.
|
|
19
|
+
* @behaviour One tab stop: the arrow keys move between tabs, Home and End go to the first and the last, and moving
|
|
20
|
+
* selects. Delete or Backspace closes the focused tab and moves the focus to the tab shown next. A click on a tab's ×,
|
|
21
|
+
* which shows `closeLabel` on hover, closes that tab only and does not select it; the × is the pointer's, never a tab stop. Each tab is as wide as its name, from 7rem to 14rem, ending in an
|
|
22
|
+
* ellipsis; a row wider than its space scrolls sideways without a bar, and the tab shown scrolls into view. The tab
|
|
23
|
+
* shown takes the `accent` fill and ink text; the others are muted text that takes a lighter accent on hover.
|
|
24
|
+
* @words Each tab is the document's own name, a file's or a page's title. `closeLabel` is "Close <name>".
|
|
25
|
+
* @access A `tablist` named by `aria-label` of `tab`s, each declaring Delete in `aria-keyshortcuts` and an `aria-controls` naming the panel the page draws with
|
|
26
|
+
* `documentTabIds(idBase, value).panel`, which the panel takes as its id beside `aria-labelledby` set to `.tab`.
|
|
27
|
+
*/
|
|
28
|
+
function DocumentTabs({ tabs, value, onValueChange, onClose, idBase, children, className, ...props }) {
|
|
29
|
+
const list = React.useRef(null);
|
|
30
|
+
const focusShown = React.useRef(false);
|
|
31
|
+
React.useEffect(() => {
|
|
32
|
+
const shown = list.current?.querySelector(`#${CSS.escape(documentTabIds(idBase, value).tab)}`);
|
|
33
|
+
shown?.scrollIntoView?.({ block: "nearest", inline: "nearest" });
|
|
34
|
+
if (focusShown.current) {
|
|
35
|
+
focusShown.current = false;
|
|
36
|
+
shown?.focus();
|
|
37
|
+
}
|
|
38
|
+
}, [idBase, value]);
|
|
39
|
+
const closeByKey = (event, tab) => {
|
|
40
|
+
if (event.key === "Delete" || event.key === "Backspace") {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
focusShown.current = true;
|
|
43
|
+
onClose(tab.value);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
return (_jsxs(TabsPrimitive.Root, { className: cn("flex min-w-0 items-center gap-1", className), "data-slot": "document-tabs", onValueChange: (next) => onValueChange(String(next)), value: value, children: [_jsx(TabsPrimitive.List, { activateOnFocus: true, "aria-label": props["aria-label"], className: "flex min-w-0 items-center gap-0.5 overflow-x-auto scrollbar-none", ref: list, children: tabs.map((tab) => {
|
|
47
|
+
const ids = documentTabIds(idBase, tab.value);
|
|
48
|
+
return (_jsxs(TabsPrimitive.Tab, { "aria-controls": ids.panel, "aria-keyshortcuts": "Delete", className: cn("group/document-tab nc-transition-paint flex h-7 max-w-56 min-w-28 shrink items-center gap-1.5 rounded-md ps-2 pe-1 text-sm text-muted-foreground hover:bg-accent/60 data-active:bg-accent data-active:text-foreground [&_svg]:size-4 [&_svg]:shrink-0"), id: ids.tab, onKeyDown: (event) => closeByKey(event, tab), title: tab.title, value: tab.value, children: [tab.icon, _jsx("span", { className: "min-w-0 flex-1 truncate text-start", children: tab.label }), _jsx("span", { "aria-hidden": "true", className: "nc-transition-paint grid size-5 shrink-0 place-items-center rounded-sm hover:bg-accent [&_svg]:size-3.5", "data-slot": "document-tab-close", onClick: (event) => {
|
|
49
|
+
event.stopPropagation();
|
|
50
|
+
onClose(tab.value);
|
|
51
|
+
}, title: tab.closeLabel, children: _jsx(XIcon, {}) })] }, tab.value));
|
|
52
|
+
}) }), children] }));
|
|
53
|
+
}
|
|
54
|
+
export { DocumentTabs, documentTabIds };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface FileTreeEntry {
|
|
3
|
+
name: string;
|
|
4
|
+
path: string;
|
|
5
|
+
isFolder: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface FileTreeProps {
|
|
8
|
+
/** The folder the tree shows the inside of; it is not drawn as a row. */
|
|
9
|
+
root: FileTreeEntry;
|
|
10
|
+
/** Reads one folder's entries, in the order to show them. */
|
|
11
|
+
readFolder: (path: string) => Promise<FileTreeEntry[]>;
|
|
12
|
+
/** The paths of the folders open in the tree. */
|
|
13
|
+
expanded: readonly string[];
|
|
14
|
+
onExpandedChange: (expanded: string[]) => void;
|
|
15
|
+
/** The file shown elsewhere, marked in the tree. */
|
|
16
|
+
selected?: null | string;
|
|
17
|
+
onOpenFile: (entry: FileTreeEntry) => void;
|
|
18
|
+
/** Called when a folder cannot be read; the folder keeps what it last listed. */
|
|
19
|
+
onReadError?: (error: unknown, path: string) => void;
|
|
20
|
+
/** Changes whenever the folder may have changed on disk; each open folder is read again. */
|
|
21
|
+
changed?: number;
|
|
22
|
+
"aria-label": string;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A folder and everything in it, as a tree of folders that open in place, each file with its kind's coloured icon.
|
|
27
|
+
*
|
|
28
|
+
* @family Navigation
|
|
29
|
+
* @when The files a person browses beside the thing they work on: an Agent's folder in Nadia's side panel. It is ReUI's
|
|
30
|
+
* file-explorer tree (`@reui/c-tree-5`) on Headless Tree, which reads each folder only when it opens.
|
|
31
|
+
* @instead One list of records is `ItemGroup`; a choice of one file to send is a file picker.
|
|
32
|
+
* @behaviour Folders first, then files, in the order `readFolder` gives. A click on a folder opens or closes it; a click
|
|
33
|
+
* on a file calls `onOpenFile`, and the file `selected` names is marked. The arrow keys move between rows, Right and Left
|
|
34
|
+
* open and close a folder, and Enter opens a file. Each level is indented 16 px. When
|
|
35
|
+
* `changed` changes, every open folder is read again and the tree keeps what is open. A folder that cannot be read keeps
|
|
36
|
+
* what it last listed and calls `onReadError`, so the page can say so and offer to read it again.
|
|
37
|
+
* @words Each row is the file's or the folder's own name. `aria-label` names whose folder it is: "Nadia's folder".
|
|
38
|
+
* @access A `tree` of `treeitem`s, with `aria-expanded` on a folder and `aria-current` on the file shown.
|
|
39
|
+
*/
|
|
40
|
+
declare function FileTree({ root, readFolder, expanded, onExpandedChange, selected, onOpenFile, onReadError, changed, className, ...props }: FileTreeProps): React.JSX.Element;
|
|
41
|
+
export { FileTree };
|
|
42
|
+
//# sourceMappingURL=file-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-tree.d.ts","sourceRoot":"","sources":["../../src/components/file-tree.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,yEAAyE;IACzE,IAAI,EAAE,aAAa,CAAC;IACpB,6DAA6D;IAC7D,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACvD,iDAAiD;IACjD,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC/C,oDAAoD;IACpD,QAAQ,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACzB,UAAU,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC3C,iFAAiF;IACjF,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,4FAA4F;IAC5F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAoDD;;;;;;;;;;;;;;GAcG;AACH,iBAAS,QAAQ,CAAC,EAChB,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,QAAe,EACf,UAAU,EACV,WAAW,EACX,OAAW,EACX,SAAS,EACT,GAAG,KAAK,EACT,EAAE,aAAa,qBAyFf;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { asyncDataLoaderFeature, hotkeysCoreFeature, selectionFeature, } from "@headless-tree/core";
|
|
4
|
+
import { useTree } from "@headless-tree/react";
|
|
5
|
+
import { ChevronDownIcon, FolderIcon, FolderOpenIcon } from "lucide-react";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { cn } from "../lib/utils.js";
|
|
8
|
+
import { FileTypeIcon } from "./file-type-icon.js";
|
|
9
|
+
const INDENT = 16;
|
|
10
|
+
function FileTreeRow({ item, selected }) {
|
|
11
|
+
const entry = item.getItemData();
|
|
12
|
+
const folder = item.isFolder();
|
|
13
|
+
const open = item.isExpanded();
|
|
14
|
+
const props = item.getProps();
|
|
15
|
+
return (_jsx("button", { ...props, "aria-current": selected || undefined, className: "w-full rounded-sm text-start select-none", "data-slot": "file-tree-row", style: { paddingInlineStart: item.getItemMeta().level * INDENT }, title: entry?.name, type: "button", children: _jsxs("span", { className: cn("nc-transition-paint flex h-7 min-w-0 items-center gap-1.5 rounded-sm px-1.5 text-sm text-foreground hover:bg-accent", selected && "bg-accent font-medium"), children: [folder ? (_jsx(ChevronDownIcon, { "aria-hidden": "true", className: cn("size-4 shrink-0 text-muted-foreground transition-transform", !open && "-rotate-90 rtl:rotate-90") })) : (_jsx("span", { "aria-hidden": "true", className: "size-4 shrink-0" })), folder ? (open ? (_jsx(FolderOpenIcon, { "aria-hidden": "true", className: "size-4 shrink-0 text-label-yellow" })) : (_jsx(FolderIcon, { "aria-hidden": "true", className: "size-4 shrink-0 text-label-yellow" }))) : (_jsx(FileTypeIcon, { path: entry?.name })), _jsx("span", { className: "truncate", children: entry?.name })] }) }));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A folder and everything in it, as a tree of folders that open in place, each file with its kind's coloured icon.
|
|
19
|
+
*
|
|
20
|
+
* @family Navigation
|
|
21
|
+
* @when The files a person browses beside the thing they work on: an Agent's folder in Nadia's side panel. It is ReUI's
|
|
22
|
+
* file-explorer tree (`@reui/c-tree-5`) on Headless Tree, which reads each folder only when it opens.
|
|
23
|
+
* @instead One list of records is `ItemGroup`; a choice of one file to send is a file picker.
|
|
24
|
+
* @behaviour Folders first, then files, in the order `readFolder` gives. A click on a folder opens or closes it; a click
|
|
25
|
+
* on a file calls `onOpenFile`, and the file `selected` names is marked. The arrow keys move between rows, Right and Left
|
|
26
|
+
* open and close a folder, and Enter opens a file. Each level is indented 16 px. When
|
|
27
|
+
* `changed` changes, every open folder is read again and the tree keeps what is open. A folder that cannot be read keeps
|
|
28
|
+
* what it last listed and calls `onReadError`, so the page can say so and offer to read it again.
|
|
29
|
+
* @words Each row is the file's or the folder's own name. `aria-label` names whose folder it is: "Nadia's folder".
|
|
30
|
+
* @access A `tree` of `treeitem`s, with `aria-expanded` on a folder and `aria-current` on the file shown.
|
|
31
|
+
*/
|
|
32
|
+
function FileTree({ root, readFolder, expanded, onExpandedChange, selected = null, onOpenFile, onReadError, changed = 0, className, ...props }) {
|
|
33
|
+
const read = React.useRef(readFolder);
|
|
34
|
+
const open = React.useRef(onOpenFile);
|
|
35
|
+
const failed = React.useRef(onReadError);
|
|
36
|
+
const listed = React.useRef(new Map());
|
|
37
|
+
React.useLayoutEffect(() => {
|
|
38
|
+
read.current = readFolder;
|
|
39
|
+
open.current = onOpenFile;
|
|
40
|
+
failed.current = onReadError;
|
|
41
|
+
});
|
|
42
|
+
const known = React.useRef(new Map([[root.path, root]]));
|
|
43
|
+
const state = React.useMemo(() => ({ expandedItems: [...expanded], selectedItems: selected ? [selected] : [] }), [expanded, selected]);
|
|
44
|
+
const tree = useTree({
|
|
45
|
+
rootItemId: root.path,
|
|
46
|
+
indent: INDENT,
|
|
47
|
+
state,
|
|
48
|
+
setExpandedItems: (next) => onExpandedChange(typeof next === "function" ? next([...expanded]) : next),
|
|
49
|
+
setSelectedItems: () => undefined,
|
|
50
|
+
getItemName: (item) => item.getItemData()?.name ?? "",
|
|
51
|
+
isItemFolder: (item) => item.getItemData()?.isFolder ?? false,
|
|
52
|
+
onPrimaryAction: (item) => {
|
|
53
|
+
const entry = item.getItemData();
|
|
54
|
+
if (entry && !entry.isFolder) {
|
|
55
|
+
open.current(entry);
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
dataLoader: {
|
|
59
|
+
getItem: (id) => known.current.get(id) ?? { isFolder: true, name: id.split(/[\\/]/).at(-1) ?? id, path: id },
|
|
60
|
+
getChildrenWithData: async (id) => {
|
|
61
|
+
let entries;
|
|
62
|
+
try {
|
|
63
|
+
entries = await read.current(id);
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
failed.current?.(error, id);
|
|
67
|
+
entries = listed.current.get(id) ?? [];
|
|
68
|
+
}
|
|
69
|
+
listed.current.set(id, entries);
|
|
70
|
+
for (const entry of entries) {
|
|
71
|
+
known.current.set(entry.path, entry);
|
|
72
|
+
}
|
|
73
|
+
return entries.map((entry) => ({ id: entry.path, data: entry }));
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
features: [asyncDataLoaderFeature, selectionFeature, hotkeysCoreFeature],
|
|
77
|
+
});
|
|
78
|
+
const shown = React.useRef(changed);
|
|
79
|
+
React.useEffect(() => {
|
|
80
|
+
if (shown.current === changed) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
shown.current = changed;
|
|
84
|
+
for (const id of [root.path, ...expanded]) {
|
|
85
|
+
tree
|
|
86
|
+
.getItemInstance(id)
|
|
87
|
+
?.invalidateChildrenIds(true)
|
|
88
|
+
.catch(() => undefined);
|
|
89
|
+
}
|
|
90
|
+
}, [changed, expanded, root.path, tree]);
|
|
91
|
+
return (_jsx("div", { ...tree.getContainerProps(props["aria-label"]), "aria-label": props["aria-label"], className: cn("flex flex-col gap-px", className), "data-slot": "file-tree", children: tree.getItems().map((item) => (_jsx(FileTreeRow, { item: item, selected: item.getId() === selected }, item.getId()))) }));
|
|
92
|
+
}
|
|
93
|
+
export { FileTree };
|
|
@@ -7,11 +7,14 @@ export interface FileTypeIconProps extends Omit<React.ComponentProps<"svg">, "ch
|
|
|
7
7
|
* A file's kind as a Lucide icon, from its path or its language.
|
|
8
8
|
*
|
|
9
9
|
* @family Status
|
|
10
|
-
* @when Beside a file's name: a file an Agent wrote, a code block's language, an attachment.
|
|
10
|
+
* @when Beside a file's name: a file an Agent wrote, a code block's language, an attachment, a row of a folder.
|
|
11
11
|
* @instead An app is `AppMark`; a Library entry is its `IdentityMark`. A file's content is
|
|
12
12
|
* `CodeBlock` or `FileDiff`.
|
|
13
|
-
* @behaviour Maps a path's extension or a language name to one icon: terminal, document,
|
|
14
|
-
* settings, database, diff, palette, regex, globe, package,
|
|
13
|
+
* @behaviour Maps a path's extension or a language name to one icon: terminal, document, PDF, spreadsheet,
|
|
14
|
+
* slides, image, audio, video, archive, braces, settings, database, diff, palette, regex, globe, package,
|
|
15
|
+
* share; anything else is the code icon. The files people keep take their kind's category colour, as a file
|
|
16
|
+
* manager draws them: documents and Markdown blue, PDFs red, spreadsheets green, slides orange, pictures purple, audio pink,
|
|
17
|
+
* video teal, archives yellow; the others stay in the text colour.
|
|
15
18
|
* @words None; the file's name stands beside it.
|
|
16
19
|
* @access Always `aria-hidden`.
|
|
17
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-type-icon.d.ts","sourceRoot":"","sources":["../../src/components/file-type-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"file-type-icon.d.ts","sourceRoot":"","sources":["../../src/components/file-type-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AA0LpC,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;GAcG;AACH,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,qBAY/E;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -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,
|
|
96
|
-
* settings, database, diff, palette, regex, globe, package,
|
|
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
|
-
|
|
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 };
|
|
@@ -80,6 +80,8 @@ export declare const SPECIMENS: {
|
|
|
80
80
|
TextWithCopyButton: () => import("react").JSX.Element;
|
|
81
81
|
UsageMeter: () => import("react").JSX.Element;
|
|
82
82
|
AgentListRow: () => import("react").JSX.Element;
|
|
83
|
+
DocumentTabs: () => import("react").JSX.Element;
|
|
84
|
+
FileTree: () => import("react").JSX.Element;
|
|
83
85
|
Breadcrumb: () => import("react").JSX.Element;
|
|
84
86
|
CommandDialog: () => import("react").JSX.Element;
|
|
85
87
|
Footer: () => 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
|
|
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":"
|
|
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" })] }) })),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type UsageName = "ActivityFeed" | "AgentProfileCard" | "CatalogDrawer" | "CollectionFilters" | "CollectionPage" | "CollectionToolbar" | "ConfirmDialog" | "EntryPicture" | "EntryScene" | "FormDialog" | "FormDrawer" | "InviteCard" | "LibraryShelf" | "ObjectPage" | "ObjectSection" | "OverviewPage" | "PageHeader" | "RecordList" | "RecordSheet" | "RowEditForm" | "SettingsPage" | "SettingsSection" | "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" | "Footer" | "PortalSidebarFrame" | "ScopeSwitcher" | "Sidebar" | "SidebarBrand" | "SidebarEntryCard" | "SidebarFind" | "SidebarFrame" | "SidebarMenuChevron" | "SidebarSections" | "Tabs" | "TabsNav" | "textLinkVariants" | "AgentCard" | "Card" | "CardRow" | "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" | "EntryPicture" | "EntryScene" | "FormDialog" | "FormDrawer" | "InviteCard" | "LibraryShelf" | "ObjectPage" | "ObjectSection" | "OverviewPage" | "PageHeader" | "RecordList" | "RecordSheet" | "RowEditForm" | "SettingsPage" | "SettingsSection" | "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" | "Card" | "CardRow" | "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":"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
|
|
1
|
+
{"version":3,"file":"usage.generated.d.ts","sourceRoot":"","sources":["../../src/showcase/usage.generated.ts"],"names":[],"mappings":"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"}
|
|
@@ -778,9 +778,9 @@ export const USAGE = [
|
|
|
778
778
|
module: "file-type-icon",
|
|
779
779
|
family: "Status",
|
|
780
780
|
summary: "A file's kind as a Lucide icon, from its path or its language.",
|
|
781
|
-
when: "Beside a file's name: a file an Agent wrote, a code block's language, an attachment.",
|
|
781
|
+
when: "Beside a file's name: a file an Agent wrote, a code block's language, an attachment, a row of a folder.",
|
|
782
782
|
instead: "An app is `AppMark`; a Library entry is its `IdentityMark`. A file's content is `CodeBlock` or `FileDiff`.",
|
|
783
|
-
behaviour: "Maps a path's extension or a language name to one icon: terminal, document, braces, settings, database, diff, palette, regex, globe, package, share; anything else is the code icon.",
|
|
783
|
+
behaviour: "Maps a path's extension or a language name to one icon: terminal, document, PDF, spreadsheet, slides, image, audio, video, archive, braces, settings, database, diff, palette, regex, globe, package, share; anything else is the code icon. The files people keep take their kind's category colour, as a file manager draws them: documents and Markdown blue, PDFs red, spreadsheets green, slides orange, pictures purple, audio pink, video teal, archives yellow; the others stay in the text colour.",
|
|
784
784
|
words: "None; the file's name stands beside it.",
|
|
785
785
|
access: "Always `aria-hidden`.",
|
|
786
786
|
},
|
|
@@ -927,6 +927,28 @@ export const USAGE = [
|
|
|
927
927
|
words: '"`<CommandMenu.Item>` children are Title Case verb phrases (`Deploy Project`, `Invite Team Member`). Avoid navigation phrasing like `Go to project page`; CommandMenu commands act, not browse." (https://vercel.com/geist/command-menu) "`CommandMenuPage.label` is Title Case and names the scope (`Projects`, `Team Settings`)." (https://vercel.com/geist/command-menu) "`CommandMenuPage.placeholder` is sentence case, action-oriented, and ends with `…` (`Search projects…`, `Type a command or search…`). Bare `Search…` is wrong because it doesn’t name the scope." (https://vercel.com/geist/command-menu) "`<CommandMenu.Group heading>` is Title Case, 1–2 words (`Actions`, `Recent`)." (https://vercel.com/geist/command-menu) Ours: groups are plural nouns in sentence case (*Agents*, *Go to*), one or two words. Items are names, or verb and noun for a creation page (*New Agent*), because the dialog goes to places. The placeholder names what is searched, never a bare "Search". No match quotes the query.',
|
|
928
928
|
access: '"Use `aria-live="polite"` on the result count so screen readers hear how the list narrows as the user types." (https://vercel.com/geist/command-menu) "Up/Down arrows move highlight, Enter activates, Escape closes. Backspace at an empty input pops the page stack." (https://vercel.com/geist/command-menu) "Display each item’s `keybind` as a `Kbd` slot so the shortcut is discoverable to sighted users and announced as a label to screen readers." (https://vercel.com/geist/command-menu) Ours: a dialog with a screen-reader `title` and `description`, both required; the *Esc* key is a button named by `closeLabel`, which is required; the field is a combobox over a listbox; the highlighted item is `aria-selected`. A polite live region reads `resultCount` as the list narrows, and it is required. `CommandInput` requires its `placeholder`, `CommandGroup` its `heading` and `CommandItem` its `onSelect`, so no field, group or row is left unnamed or inert; a row with no group stands outside a `CommandGroup`. A shortcut is a `CommandShortcut`, drawn as `kbd` elements. With no pages there is no stack for Backspace to pop.',
|
|
929
929
|
},
|
|
930
|
+
{
|
|
931
|
+
name: "DocumentTabs",
|
|
932
|
+
module: "document-tabs",
|
|
933
|
+
family: "Navigation",
|
|
934
|
+
summary: "Open documents side by side, as a browser's tabs: each a name with its icon and a close button, one of them shown.",
|
|
935
|
+
when: "The things a person opened and switches between beside their work, each one closable: the files and web pages of Nadia's side panel. The set changes as they open and close things.",
|
|
936
|
+
instead: "A fixed set of sibling views of one object is `Tabs`; a list of records to open is `ItemGroup`.",
|
|
937
|
+
behaviour: "One tab stop: the arrow keys move between tabs, Home and End go to the first and the last, and moving selects. Delete or Backspace closes the focused tab and moves the focus to the tab shown next. A click on a tab's ×, which shows `closeLabel` on hover, closes that tab only and does not select it; the × is the pointer's, never a tab stop. Each tab is as wide as its name, from 7rem to 14rem, ending in an ellipsis; a row wider than its space scrolls sideways without a bar, and the tab shown scrolls into view. The tab shown takes the `accent` fill and ink text; the others are muted text that takes a lighter accent on hover.",
|
|
938
|
+
words: "Each tab is the document's own name, a file's or a page's title. `closeLabel` is \"Close <name>\".",
|
|
939
|
+
access: "A `tablist` named by `aria-label` of `tab`s, each declaring Delete in `aria-keyshortcuts` and an `aria-controls` naming the panel the page draws with `documentTabIds(idBase, value).panel`, which the panel takes as its id beside `aria-labelledby` set to `.tab`.",
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
name: "FileTree",
|
|
943
|
+
module: "file-tree",
|
|
944
|
+
family: "Navigation",
|
|
945
|
+
summary: "A folder and everything in it, as a tree of folders that open in place, each file with its kind's coloured icon.",
|
|
946
|
+
when: "The files a person browses beside the thing they work on: an Agent's folder in Nadia's side panel. It is ReUI's file-explorer tree (`@reui/c-tree-5`) on Headless Tree, which reads each folder only when it opens.",
|
|
947
|
+
instead: "One list of records is `ItemGroup`; a choice of one file to send is a file picker.",
|
|
948
|
+
behaviour: "Folders first, then files, in the order `readFolder` gives. A click on a folder opens or closes it; a click on a file calls `onOpenFile`, and the file `selected` names is marked. The arrow keys move between rows, Right and Left open and close a folder, and Enter opens a file. Each level is indented 16 px. When `changed` changes, every open folder is read again and the tree keeps what is open. A folder that cannot be read keeps what it last listed and calls `onReadError`, so the page can say so and offer to read it again.",
|
|
949
|
+
words: "Each row is the file's or the folder's own name. `aria-label` names whose folder it is: \"Nadia's folder\".",
|
|
950
|
+
access: "A `tree` of `treeitem`s, with `aria-expanded` on a folder and `aria-current` on the file shown.",
|
|
951
|
+
},
|
|
930
952
|
{
|
|
931
953
|
name: "Footer",
|
|
932
954
|
module: "footer",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.199",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#jsx": "./src/jsx/index.ts",
|
|
@@ -74,9 +74,11 @@
|
|
|
74
74
|
"@assistant-ui/react": "0.15.29",
|
|
75
75
|
"@assistant-ui/react-markdown": "0.14.23",
|
|
76
76
|
"@base-ui/react": "^1.9.0",
|
|
77
|
+
"@headless-tree/core": "1.8.0",
|
|
78
|
+
"@headless-tree/react": "1.8.0",
|
|
77
79
|
"@iconify-icons/logos": "^2.0.3",
|
|
78
80
|
"@iconify/react": "^6.0.2",
|
|
79
|
-
"@nadicodeai/design-system": "12.1.
|
|
81
|
+
"@nadicodeai/design-system": "12.1.199",
|
|
80
82
|
"@tanstack/react-table": "^9.3.1",
|
|
81
83
|
"@vgpu/wgsl": "0.6.0",
|
|
82
84
|
"class-variance-authority": "^0.7.1",
|