@nadicodeai/ui 12.1.258 → 12.1.260
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/AGENTS.md +4 -2
- package/README.md +3 -1
- package/dist/components/app-mark.d.ts +12 -7
- package/dist/components/app-mark.d.ts.map +1 -1
- package/dist/components/app-mark.js +18 -7
- package/dist/components/context-menu.d.ts +1 -1
- package/dist/components/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu.js +2 -2
- package/dist/internal/record-grid.d.ts +5 -1
- package/dist/internal/record-grid.d.ts.map +1 -1
- package/dist/internal/record-grid.js +19 -12
- package/dist/showcase/specimens/status.d.ts.map +1 -1
- package/dist/showcase/specimens/status.js +3 -3
- package/dist/showcase/usage.generated.js +2 -2
- package/dist/styles/components.css +3 -3
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -46,8 +46,10 @@ draws it for all of them, never in `DESIGN.md`
|
|
|
46
46
|
compositions; `@nadicodeai/ui/agent-orb` is the React-free entry a native
|
|
47
47
|
startup screen paints an orb with before React loads.
|
|
48
48
|
- **Brand marks** come by name from the catalogue each kind belongs to, never
|
|
49
|
-
drawn or listed here: an app's logo is the URL Composio gives its toolkit
|
|
50
|
-
|
|
49
|
+
drawn or listed here: an app's logo is the URL Composio gives its toolkit,
|
|
50
|
+
and an app nadicode connects itself, which Composio lacks, is its maker's
|
|
51
|
+
icon as the Portal serves it, at `https://portal.nadicode.ai/app-logos/`
|
|
52
|
+
(`appLogo`); a model maker's mark is LobeHub's set looked up by the
|
|
51
53
|
maker's name (`model-mark.tsx` holds the one table of names that differ), and
|
|
52
54
|
an operating system, a messaging channel or a sign-in provider is its icon in
|
|
53
55
|
Iconify's `logos` set (`platform-mark.tsx`).
|
package/README.md
CHANGED
|
@@ -63,7 +63,9 @@ for a consumer that renders without React:
|
|
|
63
63
|
## Brand marks
|
|
64
64
|
|
|
65
65
|
`AppMark` draws a Composio toolkit's logo from Composio's own address, so a
|
|
66
|
-
page that shows one allows `https://logos.composio.dev` in its `img-src
|
|
66
|
+
page that shows one allows `https://logos.composio.dev` in its `img-src`; an
|
|
67
|
+
app nadicode connects itself, such as Business Central, is its maker's icon
|
|
68
|
+
as the Portal serves it, so such a page also allows `https://portal.nadicode.ai`.
|
|
67
69
|
`ModelMark` and `PlatformMark` ship their artwork in the package.
|
|
68
70
|
|
|
69
71
|
## Build
|
|
@@ -5,11 +5,15 @@ type AppLogo = {
|
|
|
5
5
|
light: string;
|
|
6
6
|
dark: string;
|
|
7
7
|
};
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* An app's logo by its slug: the maker's icon the Portal serves for an app nadicode connects
|
|
10
|
+
* itself, otherwise the logo Composio's catalogue gives the toolkit (its `meta.logo`) and the
|
|
11
|
+
* drawing it serves for a dark theme.
|
|
12
|
+
*/
|
|
13
|
+
declare function appLogo(slug: string): AppLogo;
|
|
10
14
|
/** What the tile draws: the logo its catalogue gives, a platform's mark, or neither and the initial. */
|
|
11
15
|
export type AppMarkGlyph = {
|
|
12
|
-
/** The
|
|
16
|
+
/** The app's logo, `appLogo(slug)`. */
|
|
13
17
|
logo?: AppLogo;
|
|
14
18
|
platform?: never;
|
|
15
19
|
} | {
|
|
@@ -36,14 +40,15 @@ type AppMarkProps = Omit<React.ComponentProps<"span">, "children"> & AppMarkGlyp
|
|
|
36
40
|
* on an Agent. 28 px in a row.
|
|
37
41
|
* @instead A model's maker is `ModelMark`. A Library skill is its `IdentityMark` tile. An Agent is
|
|
38
42
|
* her orb. A platform alone, with no tile, is `PlatformMark`.
|
|
39
|
-
* @behaviour Draws the
|
|
40
|
-
*
|
|
41
|
-
*
|
|
43
|
+
* @behaviour Draws the app's logo (`appLogo(slug)`: Composio's, or the maker's icon the Portal
|
|
44
|
+
* serves for an app nadicode connects itself, such as Business Central), else the platform's
|
|
45
|
+
* mark, else the app's initial; never a guessed logo. The logo takes its dark drawing in a dark
|
|
46
|
+
* theme. The glyph is 62% of the tile.
|
|
42
47
|
* @words None of its own; the app's name stands beside it.
|
|
43
48
|
* @access Decorative beside the name. A bare mark takes `label` and becomes `role="img"` with that
|
|
44
49
|
* name.
|
|
45
50
|
*/
|
|
46
51
|
declare function AppMark({ app, logo, platform, size, label, className, style, ...props }: AppMarkProps): React.JSX.Element;
|
|
47
|
-
export { AppMark,
|
|
52
|
+
export { AppMark, appLogo };
|
|
48
53
|
export type { AppLogo, AppMarkProps };
|
|
49
54
|
//# sourceMappingURL=app-mark.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-mark.d.ts","sourceRoot":"","sources":["../../src/components/app-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAOlE,qFAAqF;AACrF,KAAK,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"app-mark.d.ts","sourceRoot":"","sources":["../../src/components/app-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAOlE,qFAAqF;AACrF,KAAK,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAM/C;;;;GAIG;AACH,iBAAS,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOtC;AAYD,wGAAwG;AACxG,MAAM,MAAM,YAAY,GACpB;IACE,uCAAuC;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,GACD;IACE,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,kEAAkE;IAClE,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB,CAAC;AAEN,KAAK,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAChE,YAAY,GAAG;IACb,qFAAqF;IACrF,GAAG,EAAE,MAAM,CAAC;IACZ,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEJ;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,OAAO,CAAC,EACf,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,IAAoB,EACpB,KAAK,EACL,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,YAAY,qBAqDd;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAC5B,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -4,9 +4,19 @@ import { PlatformMark } from "./platform-mark.js";
|
|
|
4
4
|
const APP_MARK_SIZE = 28;
|
|
5
5
|
/** The glyph's share of the tile, the same ratio as `ModelMark`. */
|
|
6
6
|
const APP_MARK_GLYPH_RATIO = 0.62;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const OWN_APPS = new Set(["business_central"]);
|
|
8
|
+
const OWN_APP_LOGOS = "https://portal.nadicode.ai/app-logos/";
|
|
9
|
+
/**
|
|
10
|
+
* An app's logo by its slug: the maker's icon the Portal serves for an app nadicode connects
|
|
11
|
+
* itself, otherwise the logo Composio's catalogue gives the toolkit (its `meta.logo`) and the
|
|
12
|
+
* drawing it serves for a dark theme.
|
|
13
|
+
*/
|
|
14
|
+
function appLogo(slug) {
|
|
15
|
+
if (OWN_APPS.has(slug)) {
|
|
16
|
+
const logo = `${OWN_APP_LOGOS}${slug}.svg`;
|
|
17
|
+
return { light: logo, dark: logo };
|
|
18
|
+
}
|
|
19
|
+
const logo = `https://logos.composio.dev/api/${encodeURIComponent(slug)}`;
|
|
10
20
|
return { light: logo, dark: `${logo}?theme=dark` };
|
|
11
21
|
}
|
|
12
22
|
/** The letter an app without a mark is drawn with: its first letter or digit, or a question mark. */
|
|
@@ -24,9 +34,10 @@ function appInitial(app) {
|
|
|
24
34
|
* on an Agent. 28 px in a row.
|
|
25
35
|
* @instead A model's maker is `ModelMark`. A Library skill is its `IdentityMark` tile. An Agent is
|
|
26
36
|
* her orb. A platform alone, with no tile, is `PlatformMark`.
|
|
27
|
-
* @behaviour Draws the
|
|
28
|
-
*
|
|
29
|
-
*
|
|
37
|
+
* @behaviour Draws the app's logo (`appLogo(slug)`: Composio's, or the maker's icon the Portal
|
|
38
|
+
* serves for an app nadicode connects itself, such as Business Central), else the platform's
|
|
39
|
+
* mark, else the app's initial; never a guessed logo. The logo takes its dark drawing in a dark
|
|
40
|
+
* theme. The glyph is 62% of the tile.
|
|
30
41
|
* @words None of its own; the app's name stands beside it.
|
|
31
42
|
* @access Decorative beside the name. A bare mark takes `label` and becomes `role="img"` with that
|
|
32
43
|
* name.
|
|
@@ -48,4 +59,4 @@ function AppMark({ app, logo, platform, size = APP_MARK_SIZE, label, className,
|
|
|
48
59
|
"--app-mark-logo-dark": `url("${logo.dark}")`,
|
|
49
60
|
} })) : (_jsx("span", { "aria-hidden": "true", className: "font-semibold leading-none text-muted-foreground", "data-slot": "app-mark-monogram", style: { fontSize: Math.max(8, Math.round(size * 0.4)) }, children: appInitial(app) })) }));
|
|
50
61
|
}
|
|
51
|
-
export { AppMark,
|
|
62
|
+
export { AppMark, appLogo };
|
|
@@ -7,7 +7,7 @@ import { DropdownMenuCheckboxItem, DropdownMenuGroup, DropdownMenuItem, Dropdown
|
|
|
7
7
|
* @family Menus
|
|
8
8
|
* @when "Use ContextMenu for power-user shortcuts on right-click or long-press over a row, file, or canvas object." (https://vercel.com/geist/context-menu) "ContextMenu must never be the only entry point for an action. Mirror every item in a visible `Menu` trigger or row button so mouse-only and keyboard-only users have parity." (https://vercel.com/geist/context-menu) Ours: inside `@nadicodeai/ui` only, which does not export it: `ActionContextMenu` draws it for a record. A right-click on a canvas or a surface no record owns, whose commands are also reachable another way, is a composition built on it in this package.
|
|
9
9
|
* @instead "For a global command palette, use `CommandMenu`; for a dropdown opened from a visible trigger, use `Menu`." (https://vercel.com/geist/context-menu) Ours: those are `CommandDialog` and `DropdownMenu`. A record's right-click is `ActionContextMenu`, from the same data as its `ActionMenu`.
|
|
10
|
-
* @behaviour "Bind to right-click on desktop and long-press on touch. Suppress the native browser menu only on the trigger area, not the whole page." (https://vercel.com/geist/context-menu) "Position the menu at the pointer; if it would overflow the viewport, flip horizontally then vertically before clipping." (https://vercel.com/geist/context-menu) "Close on activation, Escape, and outside-click. Don’t close on hover-out." (https://vercel.com/geist/context-menu) Ours: a mouse still selects the trigger's text, so a person can copy an address from a row; on a touch screen, where a long press opens the menu, the text cannot be selected. The dropdown's surface and rows exactly,
|
|
10
|
+
* @behaviour "Bind to right-click on desktop and long-press on touch. Suppress the native browser menu only on the trigger area, not the whole page." (https://vercel.com/geist/context-menu) "Position the menu at the pointer; if it would overflow the viewport, flip horizontally then vertically before clipping." (https://vercel.com/geist/context-menu) "Close on activation, Escape, and outside-click. Don’t close on hover-out." (https://vercel.com/geist/context-menu) Ours: a mouse still selects the trigger's text, so a person can copy an address from a row; on a touch screen, where a long press opens the menu, the text cannot be selected. The dropdown's surface and rows exactly, its least width of 200 px included, opening 2 px right of the pointer and appearing at once, with no entry motion. A row that cannot be chosen keeps its place with its text muted, never dimmed. Destructive last, after a divider.
|
|
11
11
|
* @words "Items follow the same rules as `Menu`: Title Case `Verb + Noun` (`Open in New Tab`, `Copy URL`, `Delete Deployment`). Bare verbs are wrong." (https://vercel.com/geist/context-menu) "End with `…` only when activating opens a follow-up dialog (`Rename…`, `Move to Folder…`)." (https://vercel.com/geist/context-menu) "Group destructive items at the bottom with a divider and keep the destructive label `Verb + Noun`. `Delete` alone never ships." (https://vercel.com/geist/context-menu) Ours: sentence case, "Copy address", not Title Case. Identical to the visible menu's, in the same order; a command reached two ways reads the same both ways.
|
|
12
12
|
* @access "Trigger the keyboard menu key (`Shift+F10` on Windows/Linux, the menu key, or platform equivalent) to open the same menu without right-click." (https://vercel.com/geist/context-menu) "Up/Down arrows move focus, Enter/Space activates, Escape closes and returns focus to the row." (https://vercel.com/geist/context-menu) "Don’t bury destructive items behind nested submenus. One level deep keeps keyboard navigation predictable." (https://vercel.com/geist/context-menu) Ours: the trigger must itself be focusable or hold something that is. The content requires an `aria-label` naming the menu, because nothing visible labels a menu opened at the pointer.
|
|
13
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../src/components/context-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAIlF,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAKpC;;;;;;;;;GASG;AACH,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,EAAE,aAAa,CAAC,qBAEtF;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAAK,qBAEzE;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,qBAQtF;AAED,KAAK,qBAAqB,GAAG,oBAAoB,CAAC,KAAK,CAAC,KAAK,GAC3D,IAAI,CAAC,oBAAoB,CAAC,UAA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B,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,CAAC"}
|
|
@@ -12,7 +12,7 @@ import { DropdownMenuCheckboxItem, DropdownMenuGroup, DropdownMenuItem, Dropdown
|
|
|
12
12
|
* @family Menus
|
|
13
13
|
* @when "Use ContextMenu for power-user shortcuts on right-click or long-press over a row, file, or canvas object." (https://vercel.com/geist/context-menu) "ContextMenu must never be the only entry point for an action. Mirror every item in a visible `Menu` trigger or row button so mouse-only and keyboard-only users have parity." (https://vercel.com/geist/context-menu) Ours: inside `@nadicodeai/ui` only, which does not export it: `ActionContextMenu` draws it for a record. A right-click on a canvas or a surface no record owns, whose commands are also reachable another way, is a composition built on it in this package.
|
|
14
14
|
* @instead "For a global command palette, use `CommandMenu`; for a dropdown opened from a visible trigger, use `Menu`." (https://vercel.com/geist/context-menu) Ours: those are `CommandDialog` and `DropdownMenu`. A record's right-click is `ActionContextMenu`, from the same data as its `ActionMenu`.
|
|
15
|
-
* @behaviour "Bind to right-click on desktop and long-press on touch. Suppress the native browser menu only on the trigger area, not the whole page." (https://vercel.com/geist/context-menu) "Position the menu at the pointer; if it would overflow the viewport, flip horizontally then vertically before clipping." (https://vercel.com/geist/context-menu) "Close on activation, Escape, and outside-click. Don’t close on hover-out." (https://vercel.com/geist/context-menu) Ours: a mouse still selects the trigger's text, so a person can copy an address from a row; on a touch screen, where a long press opens the menu, the text cannot be selected. The dropdown's surface and rows exactly,
|
|
15
|
+
* @behaviour "Bind to right-click on desktop and long-press on touch. Suppress the native browser menu only on the trigger area, not the whole page." (https://vercel.com/geist/context-menu) "Position the menu at the pointer; if it would overflow the viewport, flip horizontally then vertically before clipping." (https://vercel.com/geist/context-menu) "Close on activation, Escape, and outside-click. Don’t close on hover-out." (https://vercel.com/geist/context-menu) Ours: a mouse still selects the trigger's text, so a person can copy an address from a row; on a touch screen, where a long press opens the menu, the text cannot be selected. The dropdown's surface and rows exactly, its least width of 200 px included, opening 2 px right of the pointer and appearing at once, with no entry motion. A row that cannot be chosen keeps its place with its text muted, never dimmed. Destructive last, after a divider.
|
|
16
16
|
* @words "Items follow the same rules as `Menu`: Title Case `Verb + Noun` (`Open in New Tab`, `Copy URL`, `Delete Deployment`). Bare verbs are wrong." (https://vercel.com/geist/context-menu) "End with `…` only when activating opens a follow-up dialog (`Rename…`, `Move to Folder…`)." (https://vercel.com/geist/context-menu) "Group destructive items at the bottom with a divider and keep the destructive label `Verb + Noun`. `Delete` alone never ships." (https://vercel.com/geist/context-menu) Ours: sentence case, "Copy address", not Title Case. Identical to the visible menu's, in the same order; a command reached two ways reads the same both ways.
|
|
17
17
|
* @access "Trigger the keyboard menu key (`Shift+F10` on Windows/Linux, the menu key, or platform equivalent) to open the same menu without right-click." (https://vercel.com/geist/context-menu) "Up/Down arrows move focus, Enter/Space activates, Escape closes and returns focus to the row." (https://vercel.com/geist/context-menu) "Don’t bury destructive items behind nested submenus. One level deep keeps keyboard navigation predictable." (https://vercel.com/geist/context-menu) Ours: the trigger must itself be focusable or hold something that is. The content requires an `aria-label` naming the menu, because nothing visible labels a menu opened at the pointer.
|
|
18
18
|
*/
|
|
@@ -26,7 +26,7 @@ function ContextMenuTrigger({ className, ...props }) {
|
|
|
26
26
|
return (_jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", className: cn("select-none [@media(hover:hover)_and_(pointer:fine)]:select-auto", className), ...props }));
|
|
27
27
|
}
|
|
28
28
|
function ContextMenuPopup({ className, align = "start", alignOffset = 0, density = "comfortable", side = "right", sideOffset = 2, ...props }) {
|
|
29
|
-
return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, collisionPadding: 8, children: _jsx(ContextMenuPrimitive.Popup, { "data-slot": "context-menu-content", "data-density": density, className: cn("pointer-events-auto", menuSurface,
|
|
29
|
+
return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, collisionPadding: 8, children: _jsx(ContextMenuPrimitive.Popup, { "data-slot": "context-menu-content", "data-nc-ui": "", "data-density": density, className: cn("pointer-events-auto", menuSurface, className), ...props }) }) }));
|
|
30
30
|
}
|
|
31
31
|
function ContextMenuContent({ "aria-label": name, ...props }) {
|
|
32
32
|
return _jsx(ContextMenuPopup, { "aria-label": name, ...props });
|
|
@@ -27,7 +27,11 @@ export type RecordGridCell = {
|
|
|
27
27
|
/** The record has no value for it: an `optional` column leaves it off the record's card. */
|
|
28
28
|
empty: boolean;
|
|
29
29
|
};
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* A press anywhere on a row that opens a record presses its one opening control, the element
|
|
32
|
+
* marked `data-row-link`: a link is followed, a button is pressed. A press on a control of the row
|
|
33
|
+
* is that control's alone.
|
|
34
|
+
*/
|
|
31
35
|
export declare function openRowOnClick(href: string | null | undefined): React.MouseEventHandler<HTMLElement> | undefined;
|
|
32
36
|
/**
|
|
33
37
|
* Records a person opens, in aligned columns on a wide card and one card per record on a narrow
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-grid.d.ts","sourceRoot":"","sources":["../../src/internal/record-grid.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,mGAAmG;AACnG,KAAK,oBAAoB,GACrB;IACE,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC,G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AAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAWjF"}
|
|
@@ -16,7 +16,11 @@ function track(column) {
|
|
|
16
16
|
}
|
|
17
17
|
return column.size === undefined ? "minmax(0,1fr)" : `minmax(0,${column.size}px)`;
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* A press anywhere on a row that opens a record presses its one opening control, the element
|
|
21
|
+
* marked `data-row-link`: a link is followed, a button is pressed. A press on a control of the row
|
|
22
|
+
* is that control's alone.
|
|
23
|
+
*/
|
|
20
24
|
export function openRowOnClick(href) {
|
|
21
25
|
if (!href)
|
|
22
26
|
return undefined;
|
|
@@ -24,10 +28,10 @@ export function openRowOnClick(href) {
|
|
|
24
28
|
const target = event.target;
|
|
25
29
|
if (!(target instanceof Element) ||
|
|
26
30
|
!event.currentTarget.contains(target) ||
|
|
27
|
-
target.closest("a, button, input, select, textarea, label, [role='button'], [role='checkbox']")) {
|
|
31
|
+
target.closest("a, button, input, select, textarea, label, [role='button'], [role='checkbox'], [data-row-link]")) {
|
|
28
32
|
return;
|
|
29
33
|
}
|
|
30
|
-
event.currentTarget.querySelector("
|
|
34
|
+
event.currentTarget.querySelector("[data-row-link]")?.click();
|
|
31
35
|
};
|
|
32
36
|
}
|
|
33
37
|
// From 48rem of card the records stand in aligned columns; on a narrower card each record is a
|
|
@@ -54,24 +58,27 @@ const PLACE = {
|
|
|
54
58
|
trail: "order-3 shrink-0",
|
|
55
59
|
fact: "order-5 max-w-full",
|
|
56
60
|
};
|
|
61
|
+
function placeOf(cell, index, identityIndex) {
|
|
62
|
+
if (cell.identity)
|
|
63
|
+
return "identity";
|
|
64
|
+
if (cell.meta?.firstLine !== true)
|
|
65
|
+
return "fact";
|
|
66
|
+
return index < identityIndex ? "lead" : "trail";
|
|
67
|
+
}
|
|
57
68
|
/**
|
|
58
69
|
* One record: its row and, while it is edited, its form under it. A row that opens the record
|
|
59
70
|
* takes `accent` on hover, and any row on focus within and while its menu is open.
|
|
60
71
|
*/
|
|
61
72
|
export function RecordGridRow({ cells, editor, href, className, ...props }) {
|
|
62
73
|
const identityIndex = cells.findIndex((cell) => cell.identity);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
? index < identityIndex
|
|
68
|
-
? "lead"
|
|
69
|
-
: "trail"
|
|
70
|
-
: "fact";
|
|
74
|
+
const placed = cells.map((cell, index) => ({ cell, place: placeOf(cell, index, identityIndex) }));
|
|
75
|
+
// On a narrow card the facts wrap under the name, and an optional one the record lacks is hidden.
|
|
76
|
+
const factsUnder = placed.some(({ cell, place }) => place === "fact" && !(cell.meta?.optional === true && cell.empty));
|
|
77
|
+
return (_jsxs("div", { className: cn("border-b border-border transition-colors last:border-b-0 data-[interactive=true]:hover:bg-accent has-focus-visible:bg-accent has-[[aria-expanded=true]]:bg-accent", WIDE_GRID, className), "data-interactive": Boolean(href), role: "rowgroup", ...props, "data-slot": "record-grid-record", children: [_jsx("div", { className: cn("flex min-h-18 flex-wrap items-center gap-x-3 gap-y-2 px-(--card-spacing) py-4", WIDE_GRID, "@3xl/list:items-center @3xl/list:gap-0 @3xl/list:p-0", href && "cursor-pointer"), "data-href": href ?? undefined, "data-slot": "record-grid-row", onClick: openRowOnClick(href), role: "row", children: placed.map(({ cell, place }) => {
|
|
71
78
|
const wraps = cell.meta?.wraps === true;
|
|
72
79
|
const cut = place === "fact" && !wraps;
|
|
73
80
|
return (_jsxs(React.Fragment, { children: [_jsx("div", { className: cn("min-w-0 @3xl/list:order-none @3xl/list:px-2 @3xl/list:py-4 @3xl/list:first:pl-(--card-spacing) @3xl/list:last:pr-(--card-spacing) @3xl/list:last:text-right", PLACE[place], cut && "truncate", wraps && "whitespace-normal wrap-break-word @3xl/list:last:text-left", cell.meta?.numeric === true && "tabular-nums @3xl/list:text-right", cell.meta?.centered === true &&
|
|
74
|
-
"@3xl/list:text-center @3xl/list:last:text-center", cell.meta?.optional === true && cell.empty && "hidden @3xl/list:block"), "data-slot": "record-grid-cell", onFocus: cut ? titleWhenCut : undefined, onPointerEnter: cut ? titleWhenCut : undefined, role: "cell", children: cell.content }), cell.identity ? (_jsx("div", { "aria-hidden": "true", className: "order-4 h-0 basis-full @3xl/list:hidden" })) : null] }, cell.id));
|
|
81
|
+
"@3xl/list:text-center @3xl/list:last:text-center", cell.meta?.optional === true && cell.empty && "hidden @3xl/list:block"), "data-slot": "record-grid-cell", onFocus: cut ? titleWhenCut : undefined, onPointerEnter: cut ? titleWhenCut : undefined, role: "cell", children: cell.content }), cell.identity && factsUnder ? (_jsx("div", { "aria-hidden": "true", className: "order-4 h-0 basis-full @3xl/list:hidden" })) : null] }, cell.id));
|
|
75
82
|
}) }), editor ? (_jsx("div", { className: "@3xl/list:col-span-full", "data-slot": "table-row-editor", role: "row", children: _jsx("div", { className: "whitespace-normal", role: "cell", children: editor }) })) : null] }));
|
|
76
83
|
}
|
|
77
84
|
/** A section's heading inside the records: the name of the group the records under it belong to. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/status.tsx"],"names":[],"mappings":"AAoEA,iBAAS,oBAAoB,gCAiB5B;AAkBD,iBAAS,aAAa,gCA2DrB;AAWD,iBAAS,gBAAgB,gCAkExB;AAED,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/status.tsx"],"names":[],"mappings":"AAoEA,iBAAS,oBAAoB,gCAiB5B;AAkBD,iBAAS,aAAa,gCA2DrB;AAWD,iBAAS,gBAAgB,gCAkExB;AAED,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;CAqTQ,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { useId, useState } from "react";
|
|
|
4
4
|
import { AudioLines, Boxes, Building2, Check, Clock, Coins, CreditCard, Database, Gauge as GaugeIcon, HandCoins, Info, Lock, OctagonAlert, TriangleAlert, Mail, MonitorDown, Pause, Save, Wrench, } from "lucide-react";
|
|
5
5
|
import { ActionStatus } from "../../components/action-status.js";
|
|
6
6
|
import { AgentOrb } from "../../components/agent-orb.js";
|
|
7
|
-
import { AppMark,
|
|
7
|
+
import { AppMark, appLogo } from "../../components/app-mark.js";
|
|
8
8
|
import { Avatar, AvatarFallback, AvatarGroup, AvatarWithIcon } from "../../components/avatar.js";
|
|
9
9
|
import { Badge } from "../../components/badge.js";
|
|
10
10
|
import { Button } from "../../components/button.js";
|
|
@@ -61,7 +61,7 @@ function AgentOrbSpecimen() {
|
|
|
61
61
|
export const STATUS = {
|
|
62
62
|
ActionStatus: ActionStatusSpecimen,
|
|
63
63
|
AgentOrb: AgentOrbSpecimen,
|
|
64
|
-
AppMark: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-3 text-sm", children: [_jsx(AppMark, { app: "gmail", logo:
|
|
64
|
+
AppMark: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-3 text-sm", children: [_jsx(AppMark, { app: "gmail", logo: appLogo("gmail") }), "Gmail", _jsx(AppMark, { app: "business_central", logo: appLogo("business_central") }), "Business Central", _jsx(AppMark, { app: "telegram", platform: "telegram" }), "Telegram", _jsx(AppMark, { app: "Fatture in Cloud" }), "Fatture in Cloud"] })),
|
|
65
65
|
ArchIcon: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-4 text-sm", children: [_jsxs("span", { className: "flex items-center gap-2", children: [_jsx(ArchIcon, { "aria-hidden": "true", className: "size-5" }), "Company"] }), _jsxs("span", { className: "flex items-center gap-2", children: [_jsx(ApprovalsIcon, { "aria-hidden": "true", className: "size-5" }), "Approvals"] }), _jsxs("span", { className: "flex items-center gap-2", children: [_jsx(AgentIcon, { "aria-hidden": "true", className: "size-5" }), "Agents"] })] })),
|
|
66
66
|
Avatar: () => (_jsxs("div", { className: "grid gap-6", children: [_jsx("div", { className: "flex flex-wrap items-center gap-4", children: ["xs", "sm", "default", "lg"].map((size) => (_jsx(Avatar, { label: "Ada Rossi", size: size, children: _jsx(AvatarFallback, { children: size === "xs" ? "A" : "AR" }) }, size))) }), _jsxs("div", { className: "flex flex-wrap items-center gap-6", children: [_jsx(AvatarGroup, { label: "5 members", limit: 3, members: MEMBERS }), _jsx(AvatarGroup, { label: "5 members, last on top", limit: 3, members: MEMBERS, reverse: true }), _jsx(AvatarGroup, { label: "5 members, tight", limit: 3, members: MEMBERS, overlap: 6 })] }), _jsxs("div", { className: "flex flex-wrap items-center gap-6 text-sm", children: [_jsxs("span", { className: "flex items-center gap-2", children: [_jsx(AvatarWithIcon, { icon: _jsx(Check, {}), iconBackground: true, label: "Ada Rossi, approved", name: "Ada Rossi" }), "Ada Rossi"] }), _jsxs("span", { className: "flex items-center gap-2", children: [_jsx(AvatarWithIcon, { icon: _jsx(Pause, {}), iconBackground: true, label: "Marco Bianchi, paused", name: "Marco Bianchi" }), "Marco Bianchi"] }), _jsx(AvatarWithIcon, { icon: _jsx(Clock, {}), iconBackground: true, label: "Luca Conti, waiting for approval", name: "Luca Conti" })] })] })),
|
|
67
67
|
Badge: () => (_jsxs("div", { className: "grid gap-4", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Badge, { children: "Owner" }), _jsx(Badge, { variant: "secondary", children: "Business plan" }), _jsx(Badge, { variant: "outline", children: "Beta" })] }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Badge, { variant: "teal", children: "Brescia" }), _jsx(Badge, { variant: "purple", children: "Milano" }), _jsx(Badge, { variant: "orange", children: "Roma" }), _jsx(Badge, { variant: "pink", children: "Firenze" })] }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Badge, { size: "sm", variant: "secondary", children: "Small" }), _jsx(Badge, { size: "md", variant: "secondary", children: "Medium" }), _jsx(Badge, { size: "lg", variant: "secondary", children: "Large" })] }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Badge, { icon: Mail, variant: "secondary", children: "Mailbox" }), _jsx(Badge, { icon: Lock, title: "Read only", variant: "secondary" }), _jsx(Badge, { render: _jsx("a", { href: "#release-notes" }), variant: "outline", children: "Release notes" })] })] })),
|
|
@@ -77,7 +77,7 @@ export const STATUS = {
|
|
|
77
77
|
FileTypeIcon: () => (_jsx("div", { className: "grid gap-2 text-sm", children: ["mcp.json", "deploy.sh", "README.md", "schema.sql"].map((path) => (_jsxs("span", { className: "flex items-center gap-2 font-mono", children: [_jsx(FileTypeIcon, { className: "size-4", path: path }), path] }, path))) })),
|
|
78
78
|
Gauge: GaugeSpecimen,
|
|
79
79
|
IconTile: () => (_jsxs("div", { className: "grid gap-4", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [_jsx(IconTile, { icon: GaugeIcon, tone: "blue" }), _jsx(IconTile, { icon: Coins, tone: "purple" }), _jsx(IconTile, { icon: AudioLines, tone: "pink" }), _jsx(IconTile, { icon: HandCoins, tone: "orange" }), _jsx(IconTile, { icon: Boxes, tone: "teal" }), _jsx(IconTile, { icon: CreditCard })] }), _jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [_jsx(IconTile, { icon: OctagonAlert, label: "Blocking", tone: "red" }), _jsx(IconTile, { icon: TriangleAlert, label: "Warning", tone: "yellow" }), _jsx(IconTile, { icon: Info, label: "Info" })] }), _jsxs("div", { className: "flex flex-wrap items-end gap-3", children: [_jsx(IconTile, { icon: Coins, size: 24, tone: "purple" }), _jsx(IconTile, { icon: Coins, size: 32, tone: "purple" }), _jsx(IconTile, { icon: Coins, size: 40, tone: "purple" }), _jsx(IconTile, { icon: Lock, size: 54 })] })] })),
|
|
80
|
-
IdentityMark: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [_jsx(IdentityMark, { kind: "agent", orb: { form: "orbit", color: COBALTO } }), _jsx(IdentityMark, { app: "gmail", kind: "app", logo:
|
|
80
|
+
IdentityMark: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [_jsx(IdentityMark, { kind: "agent", orb: { form: "orbit", color: COBALTO } }), _jsx(IdentityMark, { app: "gmail", kind: "app", logo: appLogo("gmail") }), _jsx(IdentityMark, { kind: "company", name: "Acme Service & Parts" }), _jsx(IdentityMark, { kind: "company", logo: SAMPLE_LOGO, name: "Studio Rossi" }), _jsx(IdentityMark, { kind: "company", logo: SAMPLE_ICON, name: "Polaris Studio" }), _jsx(IdentityMark, { kind: "person", name: "Ada Rossi" }), _jsx(IdentityMark, { icon: Mail, kind: "record" }), _jsx(IdentityMark, { icon: Wrench, kind: "record", size: 40 })] })),
|
|
81
81
|
ModelIdentity: () => (_jsxs("div", { className: "grid gap-2", children: [_jsx(ModelIdentity, { model: "anthropic/claude-opus-5" }), _jsx(ModelIdentity, { model: "openai/gpt-5.6-sol" }), _jsx(ModelIdentity, { model: "x-ai/grok-4.5" })] })),
|
|
82
82
|
ModelMark: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [_jsx(ModelMark, { author: "anthropic", name: "Claude Opus 5" }), _jsx(ModelMark, { author: "mistralai", label: "Mistral" })] })),
|
|
83
83
|
PlatformMark: () => (_jsx("div", { className: "flex flex-wrap items-center gap-4 text-sm", children: ["google", "microsoft", "apple", "telegram", "whatsapp", "slack"].map((platform) => (_jsxs("span", { className: "flex items-center gap-2 capitalize", children: [_jsx(PlatformMark, { platform: platform, size: 20 }), platform] }, platform))) })),
|
|
@@ -879,7 +879,7 @@ export const USAGE = [
|
|
|
879
879
|
summary: "An app, a channel or anything else a record connects, in the tile every such mark shares.",
|
|
880
880
|
when: "A connected app or channel beside its name: a toolkit in the Library, a messaging channel on an Agent. 28 px in a row.",
|
|
881
881
|
instead: "A model's maker is `ModelMark`. A Library skill is its `IdentityMark` tile. An Agent is her orb. A platform alone, with no tile, is `PlatformMark`.",
|
|
882
|
-
behaviour: "Draws the
|
|
882
|
+
behaviour: "Draws the app's logo (`appLogo(slug)`: Composio's, or the maker's icon the Portal serves for an app nadicode connects itself, such as Business Central), else the platform's mark, else the app's initial; never a guessed logo. The logo takes its dark drawing in a dark theme. The glyph is 62% of the tile.",
|
|
883
883
|
words: "None of its own; the app's name stands beside it.",
|
|
884
884
|
access: 'Decorative beside the name. A bare mark takes `label` and becomes `role="img"` with that name.',
|
|
885
885
|
},
|
|
@@ -1847,7 +1847,7 @@ export const USAGE = [
|
|
|
1847
1847
|
summary: "A menu that opens at the pointer on a right-click or a long press, from the dropdown's own parts.",
|
|
1848
1848
|
when: '"Use ContextMenu for power-user shortcuts on right-click or long-press over a row, file, or canvas object." (https://vercel.com/geist/context-menu) "ContextMenu must never be the only entry point for an action. Mirror every item in a visible `Menu` trigger or row button so mouse-only and keyboard-only users have parity." (https://vercel.com/geist/context-menu) Ours: inside `@nadicodeai/ui` only, which does not export it: `ActionContextMenu` draws it for a record. A right-click on a canvas or a surface no record owns, whose commands are also reachable another way, is a composition built on it in this package.',
|
|
1849
1849
|
instead: '"For a global command palette, use `CommandMenu`; for a dropdown opened from a visible trigger, use `Menu`." (https://vercel.com/geist/context-menu) Ours: those are `CommandDialog` and `DropdownMenu`. A record\'s right-click is `ActionContextMenu`, from the same data as its `ActionMenu`.',
|
|
1850
|
-
behaviour: '"Bind to right-click on desktop and long-press on touch. Suppress the native browser menu only on the trigger area, not the whole page." (https://vercel.com/geist/context-menu) "Position the menu at the pointer; if it would overflow the viewport, flip horizontally then vertically before clipping." (https://vercel.com/geist/context-menu) "Close on activation, Escape, and outside-click. Don’t close on hover-out." (https://vercel.com/geist/context-menu) Ours: a mouse still selects the trigger\'s text, so a person can copy an address from a row; on a touch screen, where a long press opens the menu, the text cannot be selected. The dropdown\'s surface and rows exactly,
|
|
1850
|
+
behaviour: '"Bind to right-click on desktop and long-press on touch. Suppress the native browser menu only on the trigger area, not the whole page." (https://vercel.com/geist/context-menu) "Position the menu at the pointer; if it would overflow the viewport, flip horizontally then vertically before clipping." (https://vercel.com/geist/context-menu) "Close on activation, Escape, and outside-click. Don’t close on hover-out." (https://vercel.com/geist/context-menu) Ours: a mouse still selects the trigger\'s text, so a person can copy an address from a row; on a touch screen, where a long press opens the menu, the text cannot be selected. The dropdown\'s surface and rows exactly, its least width of 200 px included, opening 2 px right of the pointer and appearing at once, with no entry motion. A row that cannot be chosen keeps its place with its text muted, never dimmed. Destructive last, after a divider.',
|
|
1851
1851
|
words: '"Items follow the same rules as `Menu`: Title Case `Verb + Noun` (`Open in New Tab`, `Copy URL`, `Delete Deployment`). Bare verbs are wrong." (https://vercel.com/geist/context-menu) "End with `…` only when activating opens a follow-up dialog (`Rename…`, `Move to Folder…`)." (https://vercel.com/geist/context-menu) "Group destructive items at the bottom with a divider and keep the destructive label `Verb + Noun`. `Delete` alone never ships." (https://vercel.com/geist/context-menu) Ours: sentence case, "Copy address", not Title Case. Identical to the visible menu\'s, in the same order; a command reached two ways reads the same both ways.',
|
|
1852
1852
|
access: '"Trigger the keyboard menu key (`Shift+F10` on Windows/Linux, the menu key, or platform equivalent) to open the same menu without right-click." (https://vercel.com/geist/context-menu) "Up/Down arrows move focus, Enter/Space activates, Escape closes and returns focus to the row." (https://vercel.com/geist/context-menu) "Don’t bury destructive items behind nested submenus. One level deep keeps keyboard navigation predictable." (https://vercel.com/geist/context-menu) Ours: the trigger must itself be focusable or hold something that is. The content requires an `aria-label` naming the menu, because nothing visible labels a menu opened at the pointer.',
|
|
1853
1853
|
},
|
|
@@ -204,9 +204,9 @@
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
/*
|
|
207
|
-
* An app's logo is
|
|
208
|
-
*
|
|
209
|
-
* theme needs, and only that one is fetched.
|
|
207
|
+
* An app's logo is drawn for a light ground and again for a dark one, which
|
|
208
|
+
* is the same drawing when the maker gives only one. The tile shows the
|
|
209
|
+
* drawing its theme needs, and only that one is fetched.
|
|
210
210
|
*/
|
|
211
211
|
[data-slot="app-mark-logo"] {
|
|
212
212
|
background: var(--app-mark-logo) center / contain no-repeat;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.260",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#jsx": "./src/jsx/index.ts",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@headless-tree/react": "1.8.0",
|
|
83
83
|
"@iconify-icons/logos": "^2.0.3",
|
|
84
84
|
"@iconify/react": "^6.0.2",
|
|
85
|
-
"@nadicodeai/design-system": "12.1.
|
|
85
|
+
"@nadicodeai/design-system": "12.1.260",
|
|
86
86
|
"@tanstack/react-table": "^9.3.1",
|
|
87
87
|
"@vgpu/wgsl": "0.6.0",
|
|
88
88
|
"class-variance-authority": "^0.7.1",
|