@mithrl/design-system 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/components/approval-card/ApprovalCard.d.ts +70 -0
  2. package/dist/components/button/Button.d.ts +4 -0
  3. package/dist/components/code-block/CodeBlock.d.ts +64 -0
  4. package/dist/components/command-search/CommandSearch.d.ts +57 -0
  5. package/dist/components/composer/ComposerAttachmentView.d.ts +48 -0
  6. package/dist/components/context-cards/ContextCards.d.ts +53 -0
  7. package/dist/components/disclosure/Disclosure.d.ts +38 -0
  8. package/dist/components/explorer/Explorer.d.ts +99 -0
  9. package/dist/components/field-message/FieldMessage.d.ts +12 -0
  10. package/dist/components/filter-table/FilterTable.d.ts +61 -0
  11. package/dist/components/flap-text/FlapText.d.ts +68 -0
  12. package/dist/components/flowchart/Flowchart.d.ts +140 -0
  13. package/dist/components/global-app-bar/GlobalAppBar.d.ts +14 -4
  14. package/dist/components/icon-swap/IconSwap.d.ts +30 -0
  15. package/dist/components/insight-cards/InsightCards.d.ts +97 -0
  16. package/dist/components/navigation-item/NavigationItem.d.ts +2 -0
  17. package/dist/components/number-flow/NumberFlow.d.ts +93 -0
  18. package/dist/components/panel-tabs/PanelTabs.d.ts +2 -0
  19. package/dist/components/progress-indicator/ProgressIndicator.d.ts +9 -1
  20. package/dist/components/prompt-bar/PromptBar.d.ts +103 -0
  21. package/dist/components/recommendation-card/RecommendationCard.d.ts +77 -0
  22. package/dist/components/records-table/RecordsTable.d.ts +87 -0
  23. package/dist/components/resizable-panels/ResizablePanels.d.ts +38 -0
  24. package/dist/components/secondary-panel/SecondaryPanel.d.ts +69 -0
  25. package/dist/components/selection-actions/SelectionActions.d.ts +72 -0
  26. package/dist/components/skeleton-reveal/SkeletonReveal.d.ts +33 -0
  27. package/dist/components/status-orb/StatusOrb.d.ts +51 -0
  28. package/dist/components/streaming-text/StreamingText.d.ts +85 -0
  29. package/dist/components/task-rows/TaskRows.d.ts +77 -0
  30. package/dist/components/upload-queue/UploadQueue.d.ts +10 -0
  31. package/dist/components/workspace-navigation/WorkspaceNavigation.d.ts +22 -1
  32. package/dist/index.d.ts +52 -2
  33. package/dist/index.js +5693 -1787
  34. package/dist/internal/useStaggerBatch.d.ts +22 -0
  35. package/dist/patterns/notifications/Notifications.d.ts +159 -0
  36. package/dist/patterns/workspace-app-shell/WorkspaceAppShell.d.ts +93 -4
  37. package/dist/patterns/workspace-app-shell/WorkspaceNewQuestionDialog.d.ts +24 -0
  38. package/dist/patterns/workspace-app-shell/WorkspaceQuestionSurface.d.ts +49 -0
  39. package/dist/styles.css +1 -1
  40. package/package.json +4 -2
@@ -0,0 +1,140 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ import { type IconGlyphComponent } from "../icon/Icon";
3
+
4
+ export type FlowchartCanvasProps = HTMLAttributes<HTMLDivElement> & {
5
+ /** Flow nodes and connectors, composed top to bottom. */
6
+ children: ReactNode;
7
+ /** Hides the dotted grid when the flow sits inside an already-textured surface. */
8
+ grid?: boolean;
9
+ /** Horizontal alignment of the node column. @default "center" */
10
+ align?: "center" | "start";
11
+ };
12
+ /**
13
+ * A static presentation surface for a vertically-connected workflow.
14
+ * Flowchart never owns drag, drop, or node editing: it renders an already
15
+ * decided pipeline so a reader can follow it top to bottom.
16
+ */
17
+ export declare const FlowchartCanvas: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
18
+ /** Flow nodes and connectors, composed top to bottom. */
19
+ children: ReactNode;
20
+ /** Hides the dotted grid when the flow sits inside an already-textured surface. */
21
+ grid?: boolean;
22
+ /** Horizontal alignment of the node column. @default "center" */
23
+ align?: "center" | "start";
24
+ } & import("react").RefAttributes<HTMLDivElement>>;
25
+ export type FlowchartConnectorVariant = "line" | "elbow-left" | "elbow-right";
26
+ export type FlowchartConnectorProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
27
+ /** Straight run, or an elbow that steps the flow into a branch column. */
28
+ variant?: FlowchartConnectorVariant;
29
+ /** Short branch caption such as `Yes`, `No`, or `On failure`. */
30
+ label?: string;
31
+ /** Draws the run dashed to signal a conditional or deferred path. */
32
+ dashed?: boolean;
33
+ };
34
+ /**
35
+ * The visual run between two flow nodes. Decorative by default; the label,
36
+ * when present, is the only readable content and is exposed to assistive tech.
37
+ */
38
+ export declare const FlowchartConnector: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
39
+ /** Straight run, or an elbow that steps the flow into a branch column. */
40
+ variant?: FlowchartConnectorVariant;
41
+ /** Short branch caption such as `Yes`, `No`, or `On failure`. */
42
+ label?: string;
43
+ /** Draws the run dashed to signal a conditional or deferred path. */
44
+ dashed?: boolean;
45
+ } & import("react").RefAttributes<HTMLDivElement>>;
46
+ export type FlowchartTriggerProps = Omit<HTMLAttributes<HTMLDivElement>, "title" | "children"> & {
47
+ /** Approved Lucide glyph naming the event source. */
48
+ icon?: IconGlyphComponent;
49
+ /** What starts the flow, phrased as an event. */
50
+ title: ReactNode;
51
+ /** One sentence of supporting detail about the event. */
52
+ description?: ReactNode;
53
+ /** Overrides the default `Trigger` eyebrow. */
54
+ eyebrow?: string;
55
+ /** Optional metadata slot, typically a `Tag`. */
56
+ trailing?: ReactNode;
57
+ };
58
+ /** The entry node of a flow. Carries an accent left treatment. */
59
+ export declare const FlowchartTrigger: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children" | "title"> & {
60
+ /** Approved Lucide glyph naming the event source. */
61
+ icon?: IconGlyphComponent;
62
+ /** What starts the flow, phrased as an event. */
63
+ title: ReactNode;
64
+ /** One sentence of supporting detail about the event. */
65
+ description?: ReactNode;
66
+ /** Overrides the default `Trigger` eyebrow. */
67
+ eyebrow?: string;
68
+ /** Optional metadata slot, typically a `Tag`. */
69
+ trailing?: ReactNode;
70
+ } & import("react").RefAttributes<HTMLDivElement>>;
71
+ export type FlowchartActionProps = Omit<HTMLAttributes<HTMLDivElement>, "title"> & {
72
+ icon?: IconGlyphComponent;
73
+ /** What the step does. */
74
+ title: ReactNode;
75
+ description?: ReactNode;
76
+ /** Overrides the default `Action` eyebrow, e.g. `Step 2`. */
77
+ eyebrow?: string;
78
+ /** Optional metadata slot, typically a `Tag` or a duration. */
79
+ trailing?: ReactNode;
80
+ /** Extra detail rendered beneath the header. */
81
+ children?: ReactNode;
82
+ };
83
+ /** A generic executed step in the flow. */
84
+ export declare const FlowchartAction: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "title"> & {
85
+ icon?: IconGlyphComponent;
86
+ /** What the step does. */
87
+ title: ReactNode;
88
+ description?: ReactNode;
89
+ /** Overrides the default `Action` eyebrow, e.g. `Step 2`. */
90
+ eyebrow?: string;
91
+ /** Optional metadata slot, typically a `Tag` or a duration. */
92
+ trailing?: ReactNode;
93
+ /** Extra detail rendered beneath the header. */
94
+ children?: ReactNode;
95
+ } & import("react").RefAttributes<HTMLDivElement>>;
96
+ export type FlowchartClauseJoin = "and" | "or";
97
+ export type FlowchartConditionClause = {
98
+ /** The measured entity, e.g. `run QC score`. */
99
+ entity: string;
100
+ /** The comparison, e.g. `is below`. */
101
+ operator: string;
102
+ /** The compared value, e.g. `0.8`. */
103
+ value: string;
104
+ /**
105
+ * How this clause joins the previous one. Ignored on the first clause.
106
+ * @default "and"
107
+ */
108
+ join?: FlowchartClauseJoin;
109
+ };
110
+ export type FlowchartConditionProps = Omit<HTMLAttributes<HTMLDivElement>, "title"> & {
111
+ icon?: IconGlyphComponent;
112
+ /** Short name for the decision, e.g. `Route low-quality runs`. */
113
+ title: ReactNode;
114
+ /** The clauses evaluated together, rendered as entity / operator / value chips. */
115
+ clauses: readonly FlowchartConditionClause[];
116
+ /** Overrides the default `If / Else` eyebrow. */
117
+ eyebrow?: string;
118
+ /** Caption for the true outcome. */
119
+ thenLabel?: string;
120
+ /** Caption for the false outcome. Omit for an if-only condition. */
121
+ elseLabel?: string;
122
+ /** Optional metadata slot, typically a `Tag`. */
123
+ trailing?: ReactNode;
124
+ };
125
+ /** A branching If/Else node whose clauses read as inline chips. */
126
+ export declare const FlowchartCondition: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "title"> & {
127
+ icon?: IconGlyphComponent;
128
+ /** Short name for the decision, e.g. `Route low-quality runs`. */
129
+ title: ReactNode;
130
+ /** The clauses evaluated together, rendered as entity / operator / value chips. */
131
+ clauses: readonly FlowchartConditionClause[];
132
+ /** Overrides the default `If / Else` eyebrow. */
133
+ eyebrow?: string;
134
+ /** Caption for the true outcome. */
135
+ thenLabel?: string;
136
+ /** Caption for the false outcome. Omit for an if-only condition. */
137
+ elseLabel?: string;
138
+ /** Optional metadata slot, typically a `Tag`. */
139
+ trailing?: ReactNode;
140
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,4 @@
1
- import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type HTMLAttributes, type MouseEventHandler, type ReactElement } from "react";
1
+ import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type HTMLAttributes, type MouseEventHandler, type ReactElement, type ReactNode } from "react";
2
2
  import { type AccountMenuProps } from "../account-menu/AccountMenu";
3
3
  import { type DropdownMenuProps } from "../dropdown-menu/DropdownMenu";
4
4
  import { type ThemeMode } from "../switch/Switch";
@@ -59,6 +59,11 @@ export type GlobalAppBarProps = Omit<HTMLAttributes<HTMLElement>, "children"> &
59
59
  onAccountMenuOpenChange?: DropdownMenuProps["onOpenChange"];
60
60
  /** Additional native attributes for the account-menu button. */
61
61
  accountButtonProps?: AccountButtonProps;
62
+ /**
63
+ * Product-wide utility controls rendered before Theme Switch. Use for
64
+ * persistent utilities such as Notifications, never page-specific actions.
65
+ */
66
+ utilityActions?: ReactNode;
62
67
  /**
63
68
  * Workspace-only App Shell controls. Each control keeps its own semantics;
64
69
  * Global App Bar owns only their approved order and alignment.
@@ -70,9 +75,9 @@ export type GlobalAppBarProps = Omit<HTMLAttributes<HTMLElement>, "children"> &
70
75
  };
71
76
  };
72
77
  /**
73
- * Persistent application anchor. Home keeps the minimal brand, theme, and
74
- * account contract; Workspace adds structural panel controls and project
75
- * context without introducing a second App Bar component.
78
+ * Persistent application anchor. Home keeps brand, optional product-wide
79
+ * utilities, theme, and account; Workspace adds structural panel controls and
80
+ * project context without introducing a second App Bar component.
76
81
  */
77
82
  export declare const GlobalAppBar: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children"> & {
78
83
  /** Home destination used by the official Mithrl brand action. */
@@ -105,6 +110,11 @@ export declare const GlobalAppBar: import("react").ForwardRefExoticComponent<Omi
105
110
  onAccountMenuOpenChange?: DropdownMenuProps["onOpenChange"];
106
111
  /** Additional native attributes for the account-menu button. */
107
112
  accountButtonProps?: AccountButtonProps;
113
+ /**
114
+ * Product-wide utility controls rendered before Theme Switch. Use for
115
+ * persistent utilities such as Notifications, never page-specific actions.
116
+ */
117
+ utilityActions?: ReactNode;
108
118
  /**
109
119
  * Workspace-only App Shell controls. Each control keeps its own semantics;
110
120
  * Global App Bar owns only their approved order and alignment.
@@ -0,0 +1,30 @@
1
+ import { type HTMLAttributes } from "react";
2
+ import { type IconGlyphComponent, type IconSize } from "../icon/Icon";
3
+
4
+ export type IconSwapProps = Omit<HTMLAttributes<HTMLSpanElement>, "aria-label" | "aria-hidden" | "children" | "role"> & {
5
+ /**
6
+ * Approved glyph to display. Changing the component identity swaps the
7
+ * glyph in place; the caller never manages two children.
8
+ */
9
+ icon: IconGlyphComponent;
10
+ /** Icon Foundation size token. Matches the `Icon` contract exactly. */
11
+ size?: IconSize;
12
+ };
13
+ /**
14
+ * Cross-fades two glyphs through one slot.
15
+ *
16
+ * IconSwap is a single-slot component: pass one `icon`, and whenever that
17
+ * component identity changes the outgoing glyph fades out while the incoming
18
+ * glyph fades in over it. Both share one grid cell so the slot never reflows.
19
+ *
20
+ * Motion — `--motion-duration-standard` on `--motion-easing-standard`, with
21
+ * the incoming glyph rising from `--motion-scale-enter` and
22
+ * `--motion-blur-soft` to rest. Under `prefers-reduced-motion: reduce` the
23
+ * scale and blur are dropped and the two glyphs cross-fade on opacity alone at
24
+ * `--motion-duration-fast`.
25
+ *
26
+ * Boundary — the swap is decorative. IconSwap announces nothing: the root and
27
+ * every glyph are hidden from assistive technology, exactly as a bare `Icon`
28
+ * without a `label` is. The accessible name belongs to the owning control.
29
+ */
30
+ export declare function IconSwap({ icon, size, className, ...props }: IconSwapProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,97 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+
3
+ /** Direction of a change, mapped to semantic color. */
4
+ export type InsightTone = "neutral" | "success" | "danger";
5
+ /**
6
+ * One run of an insight sentence. `text` reads as prose, `entity` names a
7
+ * cohort, gene, batch, or assay, and `metric` carries a figure or delta.
8
+ */
9
+ export type InsightSegment = {
10
+ kind: "text";
11
+ text: string;
12
+ } | {
13
+ kind: "entity";
14
+ text: string;
15
+ } | {
16
+ kind: "metric";
17
+ text: string;
18
+ tone?: InsightTone;
19
+ };
20
+ /** A compact before/after row rendered beneath the sentence. */
21
+ export type InsightComparison = {
22
+ /** What is being compared, e.g. `Median TPM, responders`. */
23
+ label: string;
24
+ /** Signed relative change, already formatted, e.g. `+18.4%`. */
25
+ delta: string;
26
+ /** Absolute value, already formatted, e.g. `412.6 TPM`. */
27
+ value: string;
28
+ /** Semantic direction. @default "neutral" */
29
+ tone?: InsightTone;
30
+ };
31
+ /** A single plotted observation for the embedded mini chart. */
32
+ export type InsightChartPoint = {
33
+ /** Axis label for the scrub readout, e.g. `Day 14`. */
34
+ label: string;
35
+ /** Plotted magnitude in the series' own units. */
36
+ value: number;
37
+ };
38
+ export type InsightChart = {
39
+ points: readonly InsightChartPoint[];
40
+ /** Unit suffix shown in the scrub readout, e.g. `TPM`. */
41
+ unit?: string;
42
+ /** Accessible summary of the series. Required — the SVG carries no text. */
43
+ ariaLabel: string;
44
+ };
45
+ export type InsightFollowUp = {
46
+ /** The suggested next question, phrased as the agent would ask it. */
47
+ label: string;
48
+ /** Stable identifier handed back to `onFollowUpSelect`. */
49
+ id?: string;
50
+ };
51
+ export type Insight = {
52
+ /** Stable identity for the page. */
53
+ id: string;
54
+ /** Short headline for the insight. */
55
+ title: string;
56
+ /** The insight itself, composed of prose, entity, and metric runs. */
57
+ sentence: readonly InsightSegment[];
58
+ /** Optional comparison rows. */
59
+ comparisons?: readonly InsightComparison[];
60
+ /** Optional embedded trend chart. */
61
+ chart?: InsightChart;
62
+ /** Optional suggested follow-up rendered in the footer. */
63
+ followUp?: InsightFollowUp;
64
+ };
65
+ export type InsightCardsProps = Omit<HTMLAttributes<HTMLElement>, "children" | "onSelect"> & {
66
+ /** The pages, in reading order. At least one is required. */
67
+ insights: readonly Insight[];
68
+ /** Header title. @default "Insights" */
69
+ heading?: ReactNode;
70
+ /** Controlled page index. */
71
+ page?: number;
72
+ /** Initial page index for uncontrolled use. @default 0 */
73
+ defaultPage?: number;
74
+ /** Called with the next index whenever the page changes. */
75
+ onPageChange?: (page: number) => void;
76
+ /** Called when the footer follow-up chip is activated. */
77
+ onFollowUpSelect?: (followUp: InsightFollowUp, insight: Insight) => void;
78
+ };
79
+ /**
80
+ * A paged carousel of agent-authored insights. Each page states one finding
81
+ * in a sentence built from entity and metric chips, supports it with
82
+ * comparison rows and a mini trend chart, and offers one follow-up question.
83
+ */
84
+ export declare const InsightCards: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children" | "onSelect"> & {
85
+ /** The pages, in reading order. At least one is required. */
86
+ insights: readonly Insight[];
87
+ /** Header title. @default "Insights" */
88
+ heading?: ReactNode;
89
+ /** Controlled page index. */
90
+ page?: number;
91
+ /** Initial page index for uncontrolled use. @default 0 */
92
+ defaultPage?: number;
93
+ /** Called with the next index whenever the page changes. */
94
+ onPageChange?: (page: number) => void;
95
+ /** Called when the footer follow-up chip is activated. */
96
+ onFollowUpSelect?: (followUp: InsightFollowUp, insight: Insight) => void;
97
+ } & import("react").RefAttributes<HTMLElement>>;
@@ -18,6 +18,8 @@ type NavigationItemCommonProps = (LeadingIcon | LeadingQuestion) & {
18
18
  label: string;
19
19
  /** Controlled current/selected state supplied by the owning navigation. */
20
20
  selected?: boolean;
21
+ /** Controlled active-panel state. It may coexist across multiple Questions. */
22
+ active?: boolean;
21
23
  /** Shows the approved text shimmer and trailing Progress Indicator. */
22
24
  loading?: boolean;
23
25
  /** Adds the question-row overflow action as a sibling interactive control. */
@@ -0,0 +1,93 @@
1
+ import { type CSSProperties } from "react";
2
+
3
+ /**
4
+ * Milliseconds one digit spends rolling. Mirrors `--motion-duration-moderate`;
5
+ * the CSS reads the token directly and only falls back to this number when the
6
+ * caller overrides `rollDuration`.
7
+ */
8
+ export declare const NUMBER_FLOW_DEFAULT_DURATION_MS = 220;
9
+ /** Milliseconds each successive cell waits before it starts rolling. */
10
+ export declare const NUMBER_FLOW_DEFAULT_STAGGER_MS = 18;
11
+ export type NumberFlowElement = "span" | "div" | "p" | "strong" | "em";
12
+ export type NumberFlowSize = "small" | "medium" | "large";
13
+ export interface NumberFlowProps {
14
+ /** The number to display. Changing it rolls the digits that differ. */
15
+ value: number;
16
+ /** `Intl.NumberFormat` options. Changing them reformats and animates. */
17
+ format?: Intl.NumberFormatOptions;
18
+ /** BCP 47 locale(s) for formatting. Defaults to the runtime locale. */
19
+ locale?: string | string[];
20
+ /**
21
+ * Height of the clipped roll window, as a multiple of the inherited line box.
22
+ * This is the only size NumberFlow owns — it never sets a font property.
23
+ * @default "medium"
24
+ */
25
+ size?: NumberFlowSize;
26
+ /** Host element. @default "span" */
27
+ as?: NumberFlowElement;
28
+ /** Per-digit delay, in milliseconds. @default 18 */
29
+ stagger?: number;
30
+ /** Roll duration, in milliseconds. @default `--motion-duration-moderate` */
31
+ rollDuration?: number;
32
+ className?: string;
33
+ style?: CSSProperties;
34
+ }
35
+ export type NumberFlowDirection = "up" | "down";
36
+ export type NumberFlowCell = {
37
+ /** Glyph shown once the cell settles. */
38
+ char: string;
39
+ /** Glyph leaving the window, or `null` when the cell is new or unchanged. */
40
+ previous: string | null;
41
+ /** Digit-to-digit change: a clipped vertical roll. */
42
+ roll: boolean;
43
+ /** Any other change (separator, sign, or a brand new place): a crossfade. */
44
+ fade: boolean;
45
+ /** Roll direction, taken from the sign of the value delta. */
46
+ direction: NumberFlowDirection;
47
+ };
48
+ /**
49
+ * Cells are aligned from the RIGHT, not the left: in a number the units column
50
+ * is the fixed point, so 99 -> 100 must roll the two nines against the new
51
+ * tens and units rather than sliding every place one column over.
52
+ *
53
+ * Only cells whose glyph actually changed move — the same rule FlapText
54
+ * applies to characters. A digit replacing a digit rolls; anything else
55
+ * (a separator appearing, a sign flipping, a brand new leading place) is a
56
+ * quiet crossfade, because rolling a comma into a digit reads as noise.
57
+ */
58
+ export declare function numberFlowCells(previous: string, next: string, direction?: NumberFlowDirection): NumberFlowCell[];
59
+ /**
60
+ * A number that resolves instead of blinking.
61
+ *
62
+ * Each character of the formatted value is its own cell. When `value` changes,
63
+ * only the cells whose glyph differs move: a digit rolls vertically through a
64
+ * clipped window — the outgoing glyph leaves through one edge as the incoming
65
+ * one arrives from the other, softened by `--motion-blur-soft` — while
66
+ * separators and new leading places simply crossfade. Cells are staggered left
67
+ * to right so the least significant digit is the last to settle.
68
+ *
69
+ * This is a short roll, not a slot machine. The spinning-counter recipe's
70
+ * multi-revolution 0-9 strip, its directional SVG blur filter and its masked
71
+ * window edges are all deliberately absent: a scientific workspace wants a
72
+ * number that has clearly *changed*, not one that celebrates.
73
+ *
74
+ * Sharpness: settled cells carry `transform: none` exactly — never an identity
75
+ * matrix — `will-change` is present only while a cell is in flight, no scale is
76
+ * ever applied, and the component sets no font property, so text metrics are
77
+ * the caller's. `font-variant-numeric: tabular-nums` keeps the box from
78
+ * wobbling as digits change width.
79
+ *
80
+ * Accessibility: cells are `aria-hidden`, the host carries the formatted value
81
+ * as `aria-label`, and a visually hidden polite live region announces one clean
82
+ * string.
83
+ *
84
+ * Reduced motion: no roll and no blur — the value swaps instantly behind a
85
+ * `--motion-duration-fast` opacity crossfade.
86
+ */
87
+ export declare function NumberFlow({ value, format, locale, size, as, stagger, rollDuration, className, style, }: NumberFlowProps): import("react").DetailedReactHTMLElement<{
88
+ className: string;
89
+ style: CSSProperties | undefined;
90
+ "aria-label": string;
91
+ "data-size": NumberFlowSize;
92
+ "data-animating": string;
93
+ }, HTMLElement>;
@@ -16,6 +16,8 @@ export type PanelTabItem = {
16
16
  panelId?: string;
17
17
  /** Optional explicit tab ID used by the associated panel. */
18
18
  id?: string;
19
+ /** Uses the Design System Tooltip when the visible presentation is icon-only. */
20
+ tooltip?: boolean;
19
21
  };
20
22
  export type PanelTabsProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> & {
21
23
  items: readonly PanelTabItem[];
@@ -7,8 +7,16 @@ export declare const progressIndicatorVariants: (props?: ({
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  export type ProgressIndicatorSize = NonNullable<VariantProps<typeof progressIndicatorVariants>["size"]>;
9
9
  export type ProgressIndicatorTone = NonNullable<VariantProps<typeof progressIndicatorVariants>["tone"]>;
10
+ /**
11
+ * Loading is the default so every existing usage keeps its current behavior.
12
+ * Done resolves the same indicator into a drawn completion check.
13
+ */
14
+ export type ProgressIndicatorState = "loading" | "done";
10
15
  type RestrictedProgressIndicatorAttribute = "aria-atomic" | "aria-busy" | "aria-hidden" | "aria-label" | "aria-live" | "children" | "onClick" | "onDoubleClick" | "onKeyDown" | "onKeyUp" | "role" | "tabIndex";
11
- type ProgressIndicatorBaseProps = Omit<HTMLAttributes<HTMLSpanElement>, RestrictedProgressIndicatorAttribute> & VariantProps<typeof progressIndicatorVariants>;
16
+ type ProgressIndicatorBaseProps = Omit<HTMLAttributes<HTMLSpanElement>, RestrictedProgressIndicatorAttribute> & VariantProps<typeof progressIndicatorVariants> & {
17
+ /** Completion state. Defaults to `"loading"`. */
18
+ state?: ProgressIndicatorState;
19
+ };
12
20
  type InformativeProgressIndicatorProps = {
13
21
  /** Concise accessible name announced through the status live region. */
14
22
  label: string;
@@ -0,0 +1,103 @@
1
+ import { type IconGlyphComponent } from "../icon/Icon";
2
+
3
+
4
+ export type PromptBarShape = "rounded" | "pill";
5
+ /** Trigger characters that open the anchored suggestion popover. */
6
+ export type PromptBarTrigger = "@" | "/";
7
+ export type PromptBarSource = {
8
+ /** Stable identity used for selection and de-duplication. */
9
+ id: string;
10
+ /** Visible row label and entity chip label. */
11
+ label: string;
12
+ /** Short qualifier rendered beside the label, e.g. "dataset". */
13
+ kind?: string;
14
+ /** Optional approved Lucide glyph for the row and the chip. */
15
+ icon?: IconGlyphComponent;
16
+ };
17
+ export type PromptBarCommand = {
18
+ /** Stable identity, also inserted as `/{id}` unless `insert` is provided. */
19
+ id: string;
20
+ /** Visible row label. */
21
+ label: string;
22
+ /** Short qualifier rendered beside the label, e.g. "analysis". */
23
+ kind?: string;
24
+ /** Optional approved Lucide glyph for the row. */
25
+ icon?: IconGlyphComponent;
26
+ /** Text inserted in place of the `/` token. Defaults to `/{id}`. */
27
+ insert?: string;
28
+ };
29
+ export type PromptBarModel = {
30
+ /** Stable identity used for selection. */
31
+ id: string;
32
+ /** Visible label in the trigger and in the option list. */
33
+ label: string;
34
+ /** Optional short qualifier shown under the label in the option list. */
35
+ description?: string;
36
+ };
37
+ export type PromptBarLabels = {
38
+ input: string;
39
+ submit: string;
40
+ dictate: string;
41
+ model: string;
42
+ attachments: string;
43
+ removeSource: string;
44
+ sourceSuggestions: string;
45
+ commandSuggestions: string;
46
+ emptySuggestions: string;
47
+ };
48
+ export type PromptBarProps = {
49
+ /** Controlled prompt text. */
50
+ value: string;
51
+ /** Called on every keystroke and on suggestion insertion. */
52
+ onValueChange: (value: string) => void;
53
+ /** Called with the trimmed prompt and the sources attached to it. */
54
+ onSubmit?: (value: string, sources: readonly PromptBarSource[]) => void;
55
+ /** Rows offered by the `@` popover. */
56
+ sources?: readonly PromptBarSource[];
57
+ /** Rows offered by the `/` popover. */
58
+ commands?: readonly PromptBarCommand[];
59
+ /** Controlled attachment chips. Omit to let PromptBar own them. */
60
+ selectedSources?: readonly PromptBarSource[];
61
+ /** Initial attachment chips for uncontrolled use. */
62
+ defaultSelectedSources?: readonly PromptBarSource[];
63
+ /** Called whenever the attachment row changes. */
64
+ onSelectedSourcesChange?: (sources: readonly PromptBarSource[]) => void;
65
+ /** Models offered by the footer model picker. */
66
+ models?: readonly PromptBarModel[];
67
+ /** Controlled model id. */
68
+ selectedModel?: string;
69
+ /** Called with the newly chosen model id. */
70
+ onModelChange?: (modelId: string) => void;
71
+ /** Renders the dictation microphone slot. Presentation only. */
72
+ onDictate?: () => void;
73
+ /** Geometry of the bar. */
74
+ shape?: PromptBarShape;
75
+ placeholder?: string;
76
+ disabled?: boolean;
77
+ autoFocus?: boolean;
78
+ name?: string;
79
+ labels?: Partial<PromptBarLabels>;
80
+ className?: string;
81
+ /** Storybook-only hook that forces the popover open for review. */
82
+ "data-preview-trigger"?: PromptBarTrigger;
83
+ };
84
+ type TriggerMatch = {
85
+ trigger: PromptBarTrigger;
86
+ query: string;
87
+ start: number;
88
+ end: number;
89
+ };
90
+ /**
91
+ * Reads the token immediately before the caret. A token qualifies when it
92
+ * starts at the beginning of the value or after whitespace, is introduced by
93
+ * `@` or `/`, and contains no whitespace of its own.
94
+ */
95
+ export declare function readTriggerAtCaret(value: string, caret: number): TriggerMatch | null;
96
+ /**
97
+ * Command-style prompt entry with `@` source mentions, `/` commands, an
98
+ * attachment chip row, and a model rail. PromptBar is a sibling of Composer,
99
+ * not a replacement: Composer owns conversational entry, PromptBar owns
100
+ * command-shaped prompting where sources and commands are addressable.
101
+ */
102
+ export declare const PromptBar: import("react").ForwardRefExoticComponent<PromptBarProps & import("react").RefAttributes<HTMLTextAreaElement>>;
103
+ export {};
@@ -0,0 +1,77 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ import type { MetadataTone } from "../badge/Badge";
3
+
4
+ /** How sure the agent is about the action it is proposing. */
5
+ export type RecommendationConfidence = "low" | "medium" | "high";
6
+ /** A path the agent considered but did not lead with. */
7
+ export interface RecommendationAlternative {
8
+ id: string;
9
+ label: string;
10
+ /** One sentence on what this path would do differently. */
11
+ description?: string;
12
+ /** Short status Tag, e.g. "Needs review" or "No signal". */
13
+ statusLabel?: string;
14
+ statusTone?: MetadataTone;
15
+ disabled?: boolean;
16
+ }
17
+ export interface RecommendationEntityChipProps {
18
+ children: ReactNode;
19
+ /** Optional kind shown to assistive tech, e.g. "dataset" or "gene". */
20
+ kind?: string;
21
+ className?: string;
22
+ }
23
+ /**
24
+ * Inline reference to a real object — a dataset, a run, a gene — set inside
25
+ * the recommendation body so the sentence stays readable.
26
+ */
27
+ export declare function RecommendationEntityChip({ children, kind, className, }: RecommendationEntityChipProps): import("react/jsx-runtime").JSX.Element;
28
+ type RestrictedRecommendationCardAttribute = "children" | "role" | "title";
29
+ export type RecommendationCardProps = Omit<HTMLAttributes<HTMLElement>, RestrictedRecommendationCardAttribute> & {
30
+ /** The suggestion, phrased as a question the scientist can answer. */
31
+ headline: ReactNode;
32
+ /** What the agent would actually do. Inline entity chips belong here. */
33
+ body?: ReactNode;
34
+ confidence: RecommendationConfidence;
35
+ /** Overrides the default "High confidence" style label. */
36
+ confidenceLabel?: string;
37
+ /** Why the agent is this confident. Shown next to the meter. */
38
+ confidenceReason?: ReactNode;
39
+ alternatives?: RecommendationAlternative[];
40
+ alternativesLabel?: string;
41
+ /** Controlled disclosure state for the alternatives list. */
42
+ alternativesOpen?: boolean;
43
+ defaultAlternativesOpen?: boolean;
44
+ onAlternativesOpenChange?: (open: boolean) => void;
45
+ onAlternativeSelect?: (alternative: RecommendationAlternative) => void;
46
+ onAccept?: () => void;
47
+ acceptLabel?: string;
48
+ /** Disables the primary action while the proposal is still resolving. */
49
+ acceptDisabled?: boolean;
50
+ };
51
+ /**
52
+ * An agent suggestion with its confidence shown plainly, the alternatives it
53
+ * weighed kept one click away, and a single primary action to accept.
54
+ */
55
+ export declare const RecommendationCard: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, RestrictedRecommendationCardAttribute> & {
56
+ /** The suggestion, phrased as a question the scientist can answer. */
57
+ headline: ReactNode;
58
+ /** What the agent would actually do. Inline entity chips belong here. */
59
+ body?: ReactNode;
60
+ confidence: RecommendationConfidence;
61
+ /** Overrides the default "High confidence" style label. */
62
+ confidenceLabel?: string;
63
+ /** Why the agent is this confident. Shown next to the meter. */
64
+ confidenceReason?: ReactNode;
65
+ alternatives?: RecommendationAlternative[];
66
+ alternativesLabel?: string;
67
+ /** Controlled disclosure state for the alternatives list. */
68
+ alternativesOpen?: boolean;
69
+ defaultAlternativesOpen?: boolean;
70
+ onAlternativesOpenChange?: (open: boolean) => void;
71
+ onAlternativeSelect?: (alternative: RecommendationAlternative) => void;
72
+ onAccept?: () => void;
73
+ acceptLabel?: string;
74
+ /** Disables the primary action while the proposal is still resolving. */
75
+ acceptDisabled?: boolean;
76
+ } & import("react").RefAttributes<HTMLElement>>;
77
+ export {};