@danxbot/ui 20.4.2 → 20.4.3

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.
@@ -10,7 +10,11 @@ export interface AgentKeysListProps {
10
10
  roleEditor?: KeyRoleEditor;
11
11
  /** Makes each key's grant chips removable (DX-4433). Omit and keys that carry grants show them read-only. */
12
12
  onRevokeGrant?: (keyId: number, grantId: number) => Promise<void>;
13
+ /** Replaces a key's name text, e.g. with a link to the worker the key belongs to (DX-4487). Return `null` to keep the plain name. */
14
+ renderName?: (apiKey: ApiKey) => ReactNode;
15
+ /** One line under a key's name, e.g. the worker's readiness badge (DX-4487). Return `null` for a key with none. */
16
+ renderStatus?: (apiKey: ApiKey) => ReactNode;
13
17
  emptyState?: ReactNode;
14
18
  className?: string;
15
19
  }
16
- export declare function AgentKeysList({ keys, onRevoke, busyId, roleEditor, onRevokeGrant, emptyState, className }: AgentKeysListProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined>;
20
+ export declare function AgentKeysList({ keys, onRevoke, busyId, roleEditor, onRevokeGrant, renderName, renderStatus, emptyState, className }: AgentKeysListProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined>;
@@ -1,3 +1,4 @@
1
+ import { type ReactNode } from "react";
1
2
  import type { Permission, Role } from "./types";
2
3
  export interface ApiKey {
3
4
  id: number;
@@ -48,6 +49,10 @@ export interface ApiKeysTableProps {
48
49
  roleEditor?: KeyRoleEditor;
49
50
  /** Makes each grant's chip removable (DX-4433). Fired only after the confirm dialog. Omit for read-only grant chips. */
50
51
  onRevokeGrant?: (keyId: number, grantId: number) => Promise<void>;
52
+ /** Replaces a key's name text, e.g. with a link to what the key belongs to (DX-4487). Return `null` to keep the plain name. */
53
+ renderName?: (apiKey: ApiKey) => ReactNode;
54
+ /** One line under a key's name, e.g. a live status badge (DX-4487). Return `null` for a key with none. */
55
+ renderStatus?: (apiKey: ApiKey) => ReactNode;
51
56
  className?: string;
52
57
  }
53
- export declare function ApiKeysTable({ keys, onRevoke, busyId, roleEditor, onRevokeGrant, className }: ApiKeysTableProps): import("react").JSX.Element;
58
+ export declare function ApiKeysTable({ keys, onRevoke, busyId, roleEditor, onRevokeGrant, renderName, renderStatus, className }: ApiKeysTableProps): import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "20.4.2",
3
+ "version": "20.4.3",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",