@fiestaboard/ui 6.0.3 → 6.1.1

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/ai/actions.d.ts +17 -0
  2. package/dist/components/ai/actions.js +33 -0
  3. package/dist/components/ai/actions.js.map +1 -0
  4. package/dist/components/ai/conversation.d.ts +44 -0
  5. package/dist/components/ai/conversation.js +91 -0
  6. package/dist/components/ai/conversation.js.map +1 -0
  7. package/dist/components/ai/loader.d.ts +18 -0
  8. package/dist/components/ai/loader.js +26 -0
  9. package/dist/components/ai/loader.js.map +1 -0
  10. package/dist/components/ai/message.d.ts +51 -0
  11. package/dist/components/ai/message.js +48 -0
  12. package/dist/components/ai/message.js.map +1 -0
  13. package/dist/components/ai/prompt-input.d.ts +61 -0
  14. package/dist/components/ai/prompt-input.js +104 -0
  15. package/dist/components/ai/prompt-input.js.map +1 -0
  16. package/dist/components/ai/shimmer.d.ts +14 -0
  17. package/dist/components/ai/shimmer.js +16 -0
  18. package/dist/components/ai/shimmer.js.map +1 -0
  19. package/dist/components/ai/spotlight.d.ts +59 -0
  20. package/dist/components/ai/spotlight.js +74 -0
  21. package/dist/components/ai/spotlight.js.map +1 -0
  22. package/dist/components/ai/suggestion.d.ts +20 -0
  23. package/dist/components/ai/suggestion.js +27 -0
  24. package/dist/components/ai/suggestion.js.map +1 -0
  25. package/dist/components/ai/task.d.ts +36 -0
  26. package/dist/components/ai/task.js +97 -0
  27. package/dist/components/ai/task.js.map +1 -0
  28. package/dist/components/ai/tool.d.ts +59 -0
  29. package/dist/components/ai/tool.js +145 -0
  30. package/dist/components/ai/tool.js.map +1 -0
  31. package/dist/components/chrome/board-selector.d.ts +20 -0
  32. package/dist/components/chrome/board-selector.js +54 -27
  33. package/dist/components/chrome/board-selector.js.map +1 -1
  34. package/dist/components/feedback/status-dot.d.ts +5 -3
  35. package/dist/components/feedback/status-dot.js +7 -6
  36. package/dist/components/feedback/status-dot.js.map +1 -1
  37. package/dist/index.d.ts +10 -0
  38. package/dist/index.js +11 -1
  39. package/dist/theme.css +93 -0
  40. package/package.json +1 -1
@@ -0,0 +1,74 @@
1
+ "use client";
2
+ import { cn as e } from "../../lib/utils.js";
3
+ import "react";
4
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
+ import { cva as r } from "class-variance-authority";
6
+ //#region src/components/ai/spotlight.tsx
7
+ var i = r("pointer-events-none absolute rounded-lg ring-2 ring-offset-2 ring-offset-background transition-[top,left,width,height] duration-base", {
8
+ variants: { tone: {
9
+ driving: "ring-brand ai-spotlight-pulse",
10
+ landed: "ring-success",
11
+ error: "ring-destructive"
12
+ } },
13
+ defaultVariants: { tone: "driving" }
14
+ });
15
+ function a({ className: n, tone: r = "driving", ...a }) {
16
+ return /* @__PURE__ */ t("div", {
17
+ "data-slot": "spotlight-ring",
18
+ "data-tone": r,
19
+ "aria-hidden": "true",
20
+ className: e(i({ tone: r }), n),
21
+ ...a
22
+ });
23
+ }
24
+ var o = {
25
+ driving: "border-brand/40",
26
+ landed: "border-success/50",
27
+ error: "border-destructive/50"
28
+ };
29
+ function s({ className: r, tone: i = "driving", controls: a, children: s, ...c }) {
30
+ return /* @__PURE__ */ n("div", {
31
+ "data-slot": "spotlight-caption",
32
+ "data-tone": i,
33
+ role: "status",
34
+ "aria-live": "polite",
35
+ className: e("absolute z-[var(--z-tooltip)] flex max-w-xs items-center gap-2 rounded-lg border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md", o[i], r),
36
+ ...c,
37
+ children: [/* @__PURE__ */ t("span", {
38
+ "data-slot": "spotlight-caption-text",
39
+ className: "min-w-0",
40
+ children: s
41
+ }), a ? /* @__PURE__ */ t("span", {
42
+ "data-slot": "spotlight-caption-controls",
43
+ className: "flex shrink-0 items-center gap-1",
44
+ children: a
45
+ }) : null]
46
+ });
47
+ }
48
+ function c(e, t) {
49
+ let n = Math.min(1, Math.max(0, Number.isFinite(t) ? t : 1));
50
+ return Math.min(e.length, Math.ceil(n * e.length));
51
+ }
52
+ function l({ className: r, value: i, progress: a = 1, variant: o = "replica", ...s }) {
53
+ let l = o === "badge" ? i : i.slice(0, c(i, a)), u = o === "replica" && l.length < i.length;
54
+ return /* @__PURE__ */ n("span", {
55
+ "data-slot": "ghost-value",
56
+ "data-variant": o,
57
+ "data-typing": u || void 0,
58
+ "aria-hidden": "true",
59
+ className: e("pointer-events-none absolute", o === "replica" && "whitespace-pre text-foreground", o === "badge" && "inline-flex items-center rounded-md border border-brand/40 bg-popover px-2 py-0.5 text-xs font-medium text-foreground shadow-sm", r),
60
+ ...s,
61
+ children: [
62
+ o === "badge" ? "→ " : null,
63
+ l,
64
+ o === "replica" ? /* @__PURE__ */ t("span", {
65
+ "data-slot": "ghost-caret",
66
+ className: "ai-caret"
67
+ }) : null
68
+ ]
69
+ });
70
+ }
71
+ //#endregion
72
+ export { l as GhostValue, s as SpotlightCaption, a as SpotlightRing, c as revealedLength, i as spotlightRingVariants };
73
+
74
+ //# sourceMappingURL=spotlight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spotlight.js","names":[],"sources":["../../../src/components/ai/spotlight.tsx"],"mappings":";;;;;;AAqCA,IAAM,IAAwB,EAC5B,wIACA;CACE,UAAU,EACR,MAAM;EACJ,SAAS;EACT,QAAQ;EACR,OAAO;CACT,EACF;CACA,iBAAiB,EACf,MAAM,UACR;AACF,CACF;AAMA,SAAS,EAAc,EAAE,cAAW,UAAO,WAAW,GAAG,KAA6B;CACpF,OACE,kBAAC,OAAD;EACE,aAAU;EACV,aAAW;EACX,eAAY;EACZ,WAAW,EAAG,EAAsB,EAAE,QAAK,CAAC,GAAG,CAAS;EACxD,GAAI;CACL,CAAA;AAEL;AAQA,IAAM,IAA+C;CACnD,SAAS;CACT,QAAQ;CACR,OAAO;AACT;AAEA,SAAS,EAAiB,EAAE,cAAW,UAAO,WAAW,aAAU,aAAU,GAAG,KAAgC;CAC9G,OACE,kBAAC,OAAD;EACE,aAAU;EACV,aAAW;EACX,MAAK;EACL,aAAU;EACV,WAAW,EACT,qJACA,EAAc,IACd,CACF;EACA,GAAI;EAVN,UAAA,CAYE,kBAAC,QAAD;GAAM,aAAU;GAAyB,WAAU;GAChD;EACG,CAAA,GACL,IACC,kBAAC,QAAD;GAAM,aAAU;GAA6B,WAAU;GACpD,UAAA;EACG,CAAA,IACJ,IACD;;AAET;AAgBA,SAAgB,EAAe,GAAe,GAA0B;CACtE,IAAM,IAAU,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,OAAO,SAAS,CAAQ,IAAI,IAAW,CAAC,CAAC;CACjF,OAAO,KAAK,IAAI,EAAM,QAAQ,KAAK,KAAK,IAAU,EAAM,MAAM,CAAC;AACjE;AAEA,SAAS,EAAW,EAAE,cAAW,UAAO,cAAW,GAAG,aAAU,WAAW,GAAG,KAA0B;CACtG,IAAM,IAAQ,MAAY,UAAU,IAAQ,EAAM,MAAM,GAAG,EAAe,GAAO,CAAQ,CAAC,GACpF,IAAS,MAAY,aAAa,EAAM,SAAS,EAAM;CAC7D,OACE,kBAAC,QAAD;EACE,aAAU;EACV,gBAAc;EACd,eAAa,KAAU,KAAA;EACvB,eAAY;EACZ,WAAW,EACT,gCACA,MAAY,aAAa,kCACzB,MAAY,WACV,mIACF,CACF;EACA,GAAI;EAZN,UAAA;GAcG,MAAY,UAAU,OAAO;GAC7B;GACA,MAAY,YAAY,kBAAC,QAAD;IAAM,aAAU;IAAc,WAAU;GAAY,CAAA,IAAI;EAC7E;;AAEV"}
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import { Chip } from "../feedback/chip";
3
+ /**
4
+ * Suggestions — a row of one-click prompts or answers.
5
+ *
6
+ * Two jobs in a chat: the empty-state starters ("Make a weather page"),
7
+ * and the choices the assistant offers when it asks a question. Both are
8
+ * {@link Chip}s — real buttons, 24px-plus targets, the shared focus ring —
9
+ * in a row that scrolls sideways rather than wrapping, so a long list of
10
+ * options never pushes the composer down.
11
+ */
12
+ declare function Suggestions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
13
+ export interface SuggestionProps extends Omit<React.ComponentProps<typeof Chip>, "onClick" | "children"> {
14
+ /** The text sent when chosen; also the label unless `children` is given. */
15
+ suggestion: string;
16
+ onClick?: (suggestion: string) => void;
17
+ children?: React.ReactNode;
18
+ }
19
+ declare function Suggestion({ className, suggestion, onClick, children, ...props }: SuggestionProps): React.JSX.Element;
20
+ export { Suggestion, Suggestions };
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { cn as e } from "../../lib/utils.js";
3
+ import { Chip as t } from "../feedback/chip.js";
4
+ import "react";
5
+ import { jsx as n } from "react/jsx-runtime";
6
+ //#region src/components/ai/suggestion.tsx
7
+ function r({ className: t, ...r }) {
8
+ return /* @__PURE__ */ n("div", {
9
+ "data-slot": "suggestions",
10
+ className: e("flex w-full gap-2 overflow-x-auto overscroll-x-contain whitespace-nowrap py-1", t),
11
+ ...r
12
+ });
13
+ }
14
+ function i({ className: r, suggestion: i, onClick: a, children: o, ...s }) {
15
+ return /* @__PURE__ */ n(t, {
16
+ "data-slot": "suggestion",
17
+ type: "button",
18
+ className: e("shrink-0", r),
19
+ onClick: () => a?.(i),
20
+ ...s,
21
+ children: o ?? i
22
+ });
23
+ }
24
+ //#endregion
25
+ export { i as Suggestion, r as Suggestions };
26
+
27
+ //# sourceMappingURL=suggestion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suggestion.js","names":[],"sources":["../../../src/components/ai/suggestion.tsx"],"mappings":";;;;;;AAiBA,SAAS,EAAY,EAAE,cAAW,GAAG,KAAsC;CACzE,OACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAW,EAAG,iFAAiF,CAAS;EACxG,GAAI;CACL,CAAA;AAEL;AASA,SAAS,EAAW,EAAE,cAAW,eAAY,YAAS,aAAU,GAAG,KAA0B;CAC3F,OACE,kBAAC,GAAD;EACE,aAAU;EACV,MAAK;EACL,WAAW,EAAG,YAAY,CAAS;EACnC,eAAe,IAAU,CAAU;EACnC,GAAI;EAEH,UAAA,KAAY;CACT,CAAA;AAEV"}
@@ -0,0 +1,36 @@
1
+ import * as React from "react";
2
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../containment/collapsible";
3
+ /**
4
+ * Task — a collapsible list of steps with a status each.
5
+ *
6
+ * "AI Elements" ships Task for a model's self-reported plan. Here it is the
7
+ * OBSERVED step timeline: an entry per status event and tool call the
8
+ * server actually emitted, so what the user sees is what happened, not
9
+ * what the model said it would do.
10
+ *
11
+ * Every status has a glyph and a visually-hidden label, so a list of
12
+ * "Listing pages … done / Creating page … running" reads the same to a
13
+ * screen reader as it looks.
14
+ */
15
+ export type TaskItemStatus = "pending" | "running" | "done" | "error";
16
+ export interface TaskLabels {
17
+ statuses: Record<TaskItemStatus, string>;
18
+ }
19
+ export declare const DEFAULT_TASK_LABELS: TaskLabels;
20
+ export interface TaskProps extends React.ComponentProps<typeof Collapsible> {
21
+ labels?: {
22
+ statuses?: Partial<TaskLabels["statuses"]>;
23
+ };
24
+ }
25
+ declare function Task({ className, labels, defaultOpen, ...props }: TaskProps): React.JSX.Element;
26
+ export interface TaskTriggerProps extends Omit<React.ComponentProps<typeof CollapsibleTrigger>, "children" | "title"> {
27
+ /** The heading: "3 of 4 steps". */
28
+ title: React.ReactNode;
29
+ }
30
+ declare function TaskTrigger({ className, title, ...props }: TaskTriggerProps): React.JSX.Element;
31
+ declare function TaskContent({ className, ...props }: React.ComponentProps<typeof CollapsibleContent>): React.JSX.Element;
32
+ export interface TaskItemProps extends React.ComponentProps<"li"> {
33
+ status?: TaskItemStatus;
34
+ }
35
+ declare function TaskItem({ className, status, children, ...props }: TaskItemProps): React.JSX.Element;
36
+ export { Task, TaskContent, TaskItem, TaskTrigger };
@@ -0,0 +1,97 @@
1
+ "use client";
2
+ import { cn as e } from "../../lib/utils.js";
3
+ import { Spinner as t } from "../feedback/spinner.js";
4
+ import { Collapsible as n, CollapsibleContent as r, CollapsibleTrigger as i } from "../containment/collapsible.js";
5
+ import { Check as a, ChevronDown as o, Circle as s, X as c } from "lucide-react";
6
+ import * as l from "react";
7
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
8
+ //#region src/components/ai/task.tsx
9
+ var f = { statuses: {
10
+ pending: "Pending",
11
+ running: "In progress",
12
+ done: "Done",
13
+ error: "Failed"
14
+ } }, p = l.createContext(f);
15
+ function m({ className: t, labels: r, defaultOpen: i = !0, ...a }) {
16
+ let o = { statuses: {
17
+ ...f.statuses,
18
+ ...r?.statuses
19
+ } };
20
+ return /* @__PURE__ */ u(p.Provider, {
21
+ value: o,
22
+ children: /* @__PURE__ */ u(n, {
23
+ "data-slot": "task",
24
+ defaultOpen: i,
25
+ className: e("rounded-lg border bg-card text-card-foreground", t),
26
+ ...a
27
+ })
28
+ });
29
+ }
30
+ function h({ className: t, title: n, ...r }) {
31
+ return /* @__PURE__ */ d(i, {
32
+ "data-slot": "task-trigger",
33
+ className: e("flex w-full items-center justify-between gap-2 rounded-lg px-3 py-2 text-left text-sm font-medium focus-ring", "hover:bg-accent/50 transition-[background-color] duration-control", t),
34
+ ...r,
35
+ children: [/* @__PURE__ */ u("span", {
36
+ className: "min-w-0 truncate",
37
+ children: n
38
+ }), /* @__PURE__ */ u(o, {
39
+ "aria-hidden": "true",
40
+ className: "size-4 shrink-0 text-muted-foreground transition-transform duration-control [[data-open]_&]:rotate-180"
41
+ })]
42
+ });
43
+ }
44
+ function g({ className: t, ...n }) {
45
+ return /* @__PURE__ */ u(r, {
46
+ "data-slot": "task-content",
47
+ className: e("border-t px-3 py-2", t),
48
+ ...n,
49
+ children: /* @__PURE__ */ u("ol", {
50
+ "data-slot": "task-list",
51
+ className: "flex flex-col gap-1.5",
52
+ children: n.children
53
+ })
54
+ });
55
+ }
56
+ var _ = {
57
+ pending: "text-muted-foreground",
58
+ running: "text-brand",
59
+ done: "text-success",
60
+ error: "text-destructive"
61
+ };
62
+ function v({ className: n, status: r = "done", children: i, ...o }) {
63
+ let f = l.useContext(p);
64
+ return /* @__PURE__ */ d("li", {
65
+ "data-slot": "task-item",
66
+ "data-status": r,
67
+ className: e("flex items-start gap-2 text-sm", r === "pending" && "text-muted-foreground", n),
68
+ ...o,
69
+ children: [
70
+ /* @__PURE__ */ d("span", {
71
+ "aria-hidden": "true",
72
+ className: e("mt-0.5 inline-flex size-4 shrink-0 items-center justify-center", _[r]),
73
+ children: [
74
+ r === "running" ? /* @__PURE__ */ u(t, {
75
+ size: "sm",
76
+ label: null
77
+ }) : null,
78
+ r === "done" ? /* @__PURE__ */ u(a, { className: "size-3.5" }) : null,
79
+ r === "error" ? /* @__PURE__ */ u(c, { className: "size-3.5" }) : null,
80
+ r === "pending" ? /* @__PURE__ */ u(s, { className: "size-2.5" }) : null
81
+ ]
82
+ }),
83
+ /* @__PURE__ */ d("span", {
84
+ className: "sr-only",
85
+ children: [f.statuses[r], ": "]
86
+ }),
87
+ /* @__PURE__ */ u("span", {
88
+ className: "min-w-0 flex-1",
89
+ children: i
90
+ })
91
+ ]
92
+ });
93
+ }
94
+ //#endregion
95
+ export { f as DEFAULT_TASK_LABELS, m as Task, g as TaskContent, v as TaskItem, h as TaskTrigger };
96
+
97
+ //# sourceMappingURL=task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task.js","names":[],"sources":["../../../src/components/ai/task.tsx"],"mappings":";;;;;;;;AA4BA,IAAa,IAAkC,EAC7C,UAAU;CACR,SAAS;CACT,SAAS;CACT,MAAM;CACN,OAAO;AACT,EACF,GAEM,IAAc,EAAM,cAA0B,CAAmB;AAMvE,SAAS,EAAK,EAAE,cAAW,WAAQ,iBAAc,IAAM,GAAG,KAAoB;CAC5E,IAAM,IAAgB,EAAE,UAAU;EAAE,GAAG,EAAoB;EAAU,GAAG,GAAQ;CAAS,EAAE;CAC3F,OACE,kBAAC,EAAY,UAAb;EAAsB,OAAO;EAC3B,UAAA,kBAAC,GAAD;GACE,aAAU;GACG;GACb,WAAW,EAAG,kDAAkD,CAAS;GACz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AAQ;;GAC3D,kBAAC,QAAD;IAAM,WAAU;IAAkB;GAAe,CAAA;EAC/C;;AAER"}
@@ -0,0 +1,59 @@
1
+ import * as React from "react";
2
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../containment/collapsible";
3
+ /**
4
+ * Tool — one tool call the assistant made, as a collapsible card.
5
+ *
6
+ * The state vocabulary is "AI Elements"' four (`input-streaming`,
7
+ * `input-available`, `output-available`, `output-error`) plus the three a
8
+ * human-in-the-loop chat needs: `approval-requested` (the call waits on the
9
+ * user), `denied` (the user said no), `stopped` (the user ended the turn
10
+ * while it ran). The state is stamped as `data-state` on the root, next to
11
+ * Base UI's own `data-open`, so consumers and VRT select on it.
12
+ *
13
+ * Every state has an icon AND a label: colour and glyph alone would fail
14
+ * anyone who cannot see them, and the label is what the header announces.
15
+ */
16
+ export type ToolState = "input-streaming" | "input-available" | "output-available" | "output-error" | "approval-requested" | "denied" | "stopped";
17
+ export interface ToolLabels {
18
+ states: Record<ToolState, string>;
19
+ /** Heading of the arguments block. */
20
+ input: string;
21
+ /** Heading of the result block. */
22
+ output: string;
23
+ }
24
+ export declare const DEFAULT_TOOL_LABELS: ToolLabels;
25
+ export interface ToolProps extends React.ComponentProps<typeof Collapsible> {
26
+ state: ToolState;
27
+ labels?: {
28
+ states?: Partial<ToolLabels["states"]>;
29
+ input?: string;
30
+ output?: string;
31
+ };
32
+ }
33
+ declare function Tool({ className, state, labels, defaultOpen, ...props }: ToolProps): React.JSX.Element;
34
+ export interface ToolHeaderProps extends Omit<React.ComponentProps<typeof CollapsibleTrigger>, "children" | "title"> {
35
+ /** What the call is, in the user's words: "Create page". */
36
+ title: React.ReactNode;
37
+ /** A short detail after the title: the page name, the setting changed. */
38
+ detail?: React.ReactNode;
39
+ }
40
+ /**
41
+ * The always-visible row: state glyph, title, state label, chevron. It is
42
+ * the Collapsible's trigger, so the whole row is one button with
43
+ * `aria-expanded`, named by its title and state.
44
+ */
45
+ declare function ToolHeader({ className, title, detail, ...props }: ToolHeaderProps): React.JSX.Element;
46
+ declare function ToolContent({ className, ...props }: React.ComponentProps<typeof CollapsibleContent>): React.JSX.Element;
47
+ export interface ToolInputProps extends Omit<React.ComponentProps<"div">, "children"> {
48
+ /** The call's arguments; rendered as pretty JSON. */
49
+ input: unknown;
50
+ }
51
+ declare function ToolInput({ className, input, ...props }: ToolInputProps): React.JSX.Element;
52
+ export interface ToolOutputProps extends Omit<React.ComponentProps<"div">, "children"> {
53
+ /** The rendered result — a summary line, a board preview, a JSON tree. */
54
+ output?: React.ReactNode;
55
+ /** The failure text for `output-error`; rendered in the destructive tone. */
56
+ errorText?: string;
57
+ }
58
+ declare function ToolOutput({ className, output, errorText, ...props }: ToolOutputProps): React.JSX.Element | null;
59
+ export { Tool, ToolContent, ToolHeader, ToolInput, ToolOutput };
@@ -0,0 +1,145 @@
1
+ "use client";
2
+ import { cn as e } from "../../lib/utils.js";
3
+ import { Spinner as t } from "../feedback/spinner.js";
4
+ import { Collapsible as n, CollapsibleContent as r, CollapsibleTrigger as i } from "../containment/collapsible.js";
5
+ import { AlertTriangle as a, Check as o, ChevronDown as s, CircleSlash as c, Hand as l, Octagon as u, Wrench as d } from "lucide-react";
6
+ import * as f from "react";
7
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
8
+ //#region src/components/ai/tool.tsx
9
+ var h = {
10
+ states: {
11
+ "input-streaming": "Preparing",
12
+ "input-available": "Running",
13
+ "output-available": "Done",
14
+ "output-error": "Failed",
15
+ "approval-requested": "Waiting for your approval",
16
+ denied: "Not run",
17
+ stopped: "Stopped"
18
+ },
19
+ input: "Arguments",
20
+ output: "Result"
21
+ }, g = f.createContext({
22
+ state: "input-available",
23
+ labels: h
24
+ });
25
+ function _({ className: t, state: r, labels: i, defaultOpen: a, ...o }) {
26
+ let s = {
27
+ state: r,
28
+ labels: {
29
+ ...h,
30
+ ...i,
31
+ states: {
32
+ ...h.states,
33
+ ...i?.states
34
+ }
35
+ }
36
+ };
37
+ return /* @__PURE__ */ p(g.Provider, {
38
+ value: s,
39
+ children: /* @__PURE__ */ p(n, {
40
+ "data-slot": "tool",
41
+ "data-state": r,
42
+ defaultOpen: a ?? (r === "output-error" || r === "approval-requested"),
43
+ className: e("rounded-lg border bg-card text-card-foreground", t),
44
+ ...o
45
+ })
46
+ });
47
+ }
48
+ var v = {
49
+ "input-streaming": d,
50
+ "input-available": d,
51
+ "output-available": o,
52
+ "output-error": a,
53
+ "approval-requested": l,
54
+ denied: c,
55
+ stopped: u
56
+ }, y = {
57
+ "input-streaming": "text-muted-foreground",
58
+ "input-available": "text-muted-foreground",
59
+ "output-available": "text-success",
60
+ "output-error": "text-destructive",
61
+ "approval-requested": "text-hue-yellow",
62
+ denied: "text-muted-foreground",
63
+ stopped: "text-muted-foreground"
64
+ };
65
+ function b({ className: n, title: r, detail: a, ...o }) {
66
+ let { state: c, labels: l } = f.useContext(g), u = v[c], d = c === "input-available" || c === "input-streaming";
67
+ return /* @__PURE__ */ m(i, {
68
+ "data-slot": "tool-header",
69
+ className: e("flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-sm focus-ring", "hover:bg-accent/50 transition-[background-color] duration-control", n),
70
+ ...o,
71
+ children: [
72
+ /* @__PURE__ */ p("span", {
73
+ "data-slot": "tool-state-icon",
74
+ "aria-hidden": "true",
75
+ className: e("inline-flex shrink-0", y[c]),
76
+ children: d ? /* @__PURE__ */ p(t, {
77
+ size: "sm",
78
+ label: null
79
+ }) : /* @__PURE__ */ p(u, { className: "size-4" })
80
+ }),
81
+ /* @__PURE__ */ m("span", {
82
+ "data-slot": "tool-title",
83
+ className: "min-w-0 flex-1 truncate font-medium",
84
+ children: [r, a ? /* @__PURE__ */ p("span", {
85
+ className: "ml-1.5 font-normal text-muted-foreground",
86
+ children: a
87
+ }) : null]
88
+ }),
89
+ /* @__PURE__ */ p("span", {
90
+ "data-slot": "tool-state-label",
91
+ className: e("shrink-0 text-xs", y[c]),
92
+ children: l.states[c]
93
+ }),
94
+ /* @__PURE__ */ p(s, {
95
+ "aria-hidden": "true",
96
+ className: "size-4 shrink-0 text-muted-foreground transition-transform duration-control group-data-[open]:rotate-180 [[data-open]_&]:rotate-180"
97
+ })
98
+ ]
99
+ });
100
+ }
101
+ function x({ className: t, ...n }) {
102
+ return /* @__PURE__ */ p(r, {
103
+ "data-slot": "tool-content",
104
+ className: e("flex flex-col gap-2 border-t px-3 py-2 text-sm", t),
105
+ ...n
106
+ });
107
+ }
108
+ function S({ className: t, input: n, ...r }) {
109
+ let { labels: i } = f.useContext(g);
110
+ return /* @__PURE__ */ m("div", {
111
+ "data-slot": "tool-input",
112
+ className: e("flex flex-col gap-1", t),
113
+ ...r,
114
+ children: [/* @__PURE__ */ p("span", {
115
+ className: "text-xs font-medium text-muted-foreground",
116
+ children: i.input
117
+ }), /* @__PURE__ */ p("pre", {
118
+ className: "overflow-x-auto rounded-md bg-muted p-2 font-mono text-xs leading-relaxed",
119
+ children: JSON.stringify(n, null, 2)
120
+ })]
121
+ });
122
+ }
123
+ function C({ className: t, output: n, errorText: r, ...i }) {
124
+ let { labels: a } = f.useContext(g);
125
+ return n === void 0 && !r ? null : /* @__PURE__ */ m("div", {
126
+ "data-slot": "tool-output",
127
+ className: e("flex flex-col gap-1", t),
128
+ ...i,
129
+ children: [/* @__PURE__ */ p("span", {
130
+ className: "text-xs font-medium text-muted-foreground",
131
+ children: a.output
132
+ }), r ? /* @__PURE__ */ p("p", {
133
+ "data-slot": "tool-error",
134
+ className: "text-destructive",
135
+ children: r
136
+ }) : /* @__PURE__ */ p("div", {
137
+ "data-slot": "tool-result",
138
+ children: n
139
+ })]
140
+ });
141
+ }
142
+ //#endregion
143
+ export { h as DEFAULT_TOOL_LABELS, _ as Tool, x as ToolContent, b as ToolHeader, S as ToolInput, C as ToolOutput };
144
+
145
+ //# sourceMappingURL=tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool.js","names":[],"sources":["../../../src/components/ai/tool.tsx"],"mappings":";;;;;;;;AAwCA,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IAEH,kBAAC,OAAD;GAAK,aAAU;GAAe,UAAA;EAAY,CAAA,CAEzC;;AAET"}
@@ -1,6 +1,15 @@
1
1
  export interface BoardOption {
2
2
  id: string;
3
3
  name?: string;
4
+ /**
5
+ * Per-board health, surfaced as a small destructive dot beside the name —
6
+ * and in the trigger while this board is the selected one. Presentational
7
+ * only: the wiring side decides what "error" means (a board whose client
8
+ * failed to initialize, say) and supplies the words for it as
9
+ * `BoardSelectorLabels.boardError`, which the option and the trigger are
10
+ * then DESCRIBED by (`aria-describedby`). Omit for a healthy board.
11
+ */
12
+ status?: "error";
4
13
  }
5
14
  export interface BoardSelectorLabels {
6
15
  /** aria-label for the trigger, e.g. "Select board". */
@@ -9,6 +18,17 @@ export interface BoardSelectorLabels {
9
18
  selectBoard: string;
10
19
  /** Fallback display name for unnamed boards. */
11
20
  unnamedBoard: string;
21
+ /**
22
+ * What `status: "error"` means, in words — e.g. "Unavailable". Rendered
23
+ * once as an sr-only description that every errored option, and the
24
+ * trigger while an errored board is selected, points at with
25
+ * `aria-describedby`; the dot itself stays decorative. That is what keeps
26
+ * the state off colour alone (WCAG 1.4.1) without folding the word into
27
+ * the option's NAME, so "Kitchen" is still announced as "Kitchen", then
28
+ * described. Only consulted when at least one board sets `status`, but
29
+ * provide it whenever you do: without it the dot is the only signal.
30
+ */
31
+ boardError?: string;
12
32
  }
13
33
  interface BoardSelectorProps {
14
34
  boards: BoardOption[];
@@ -1,37 +1,64 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
- import { Select as t, SelectContent as n, SelectItem as r, SelectTrigger as i, SelectValue as a } from "../forms/select.js";
4
- import { Tooltip as o, TooltipContent as s, TooltipTrigger as c } from "../overlays/tooltip.js";
5
- import { BoardIcon as l } from "./board-icon.js";
6
- import { memo as u, useMemo as d } from "react";
7
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
3
+ import { StatusDot as t } from "../feedback/status-dot.js";
4
+ import { Select as n, SelectContent as r, SelectItem as i, SelectTrigger as a, SelectValue as o } from "../forms/select.js";
5
+ import { Tooltip as s, TooltipContent as c, TooltipTrigger as l } from "../overlays/tooltip.js";
6
+ import { BoardIcon as u } from "./board-icon.js";
7
+ import { memo as d, useId as f, useMemo as p } from "react";
8
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
8
9
  //#region src/components/chrome/board-selector.tsx
9
- var m = u(function({ boards: u, value: m, onChange: h, labels: g, collapsed: _ = !1, variant: v = "sidebar" }) {
10
- let y = d(() => u.map((e) => /* @__PURE__ */ f(r, {
11
- value: e.id,
12
- children: e.name || g.unnamedBoard
13
- }, e.id)), [u, g.unnamedBoard]), b = /* @__PURE__ */ p(i, {
14
- "aria-label": g.boardSelector,
15
- className: e("gap-2 border-sidebar-border/70 bg-sidebar-accent/40 font-medium text-sidebar-foreground shadow-none transition-[width,padding] duration-fast hover:bg-sidebar-accent/70", v === "mobileHeader" && "h-9 w-auto min-w-0 max-w-[170px] px-2.5 max-[479px]:gap-1 max-[479px]:px-2", v === "sidebar" && (_ ? "h-9 w-full justify-center gap-0 px-0 [&>span:last-child]:hidden" : "h-10 w-full")),
16
- children: [/* @__PURE__ */ f(l, { className: "h-5 w-5 flex-shrink-0 text-sidebar-foreground/70" }), /* @__PURE__ */ f("span", {
17
- className: e("min-w-0 flex-1 overflow-hidden whitespace-nowrap text-left transition-opacity duration-fast", v === "sidebar" && _ ? "max-w-0 opacity-0" : "max-w-48 opacity-100 delay-150", v === "mobileHeader" && "max-[479px]:hidden!"),
18
- children: /* @__PURE__ */ f(a, { placeholder: g.selectBoard })
10
+ var g = d(function({ boards: d, value: g, onChange: _, labels: v, collapsed: y = !1, variant: b = "sidebar" }) {
11
+ let x = f(), S = v.boardError && d.some((e) => e.status === "error") ? x : void 0, C = d.find((e) => e.id === g), w = p(() => d.map((e) => {
12
+ let n = e.name || v.unnamedBoard, r = e.status === "error";
13
+ return /* @__PURE__ */ m(i, {
14
+ value: e.id,
15
+ "aria-describedby": r ? S : void 0,
16
+ children: r ? /* @__PURE__ */ h("span", {
17
+ className: "flex min-w-0 items-center gap-2",
18
+ children: [/* @__PURE__ */ m("span", {
19
+ className: "min-w-0 flex-1 truncate",
20
+ children: n
21
+ }), /* @__PURE__ */ m(t, {
22
+ status: "danger",
23
+ size: "sm"
24
+ })]
25
+ }) : n
26
+ }, e.id);
27
+ }), [
28
+ d,
29
+ v.unnamedBoard,
30
+ S
31
+ ]), T = /* @__PURE__ */ h(a, {
32
+ "aria-label": v.boardSelector,
33
+ "aria-describedby": C?.status === "error" ? S : void 0,
34
+ className: e("gap-2 border-sidebar-border/70 bg-sidebar-accent/40 font-medium text-sidebar-foreground shadow-none transition-[width,padding] duration-fast hover:bg-sidebar-accent/70", b === "mobileHeader" && "h-9 w-auto min-w-0 max-w-[170px] px-2.5 max-[479px]:gap-1 max-[479px]:px-2", b === "sidebar" && (y ? "h-9 w-full justify-center gap-0 px-0 [&>span:last-child]:hidden" : "h-10 w-full")),
35
+ children: [/* @__PURE__ */ m(u, { className: "h-5 w-5 flex-shrink-0 text-sidebar-foreground/70" }), /* @__PURE__ */ m("span", {
36
+ className: e("min-w-0 flex-1 overflow-hidden whitespace-nowrap text-left transition-opacity duration-fast", b === "sidebar" && y ? "max-w-0 opacity-0" : "max-w-48 opacity-100 delay-150", b === "mobileHeader" && "max-[479px]:hidden!"),
37
+ children: /* @__PURE__ */ m(o, { placeholder: v.selectBoard })
19
38
  })]
20
39
  });
21
- return /* @__PURE__ */ p(t, {
22
- value: m,
23
- onValueChange: h,
24
- children: [_ ? /* @__PURE__ */ p(o, { children: [/* @__PURE__ */ f(c, {
25
- asChild: !0,
26
- children: b
27
- }), /* @__PURE__ */ f(s, {
28
- side: "right",
29
- className: "font-medium",
30
- children: u.find((e) => e.id === m)?.name || g.unnamedBoard
31
- })] }) : b, /* @__PURE__ */ f(n, { children: y })]
40
+ return /* @__PURE__ */ h(n, {
41
+ value: g,
42
+ onValueChange: _,
43
+ children: [
44
+ y ? /* @__PURE__ */ h(s, { children: [/* @__PURE__ */ m(l, {
45
+ asChild: !0,
46
+ children: T
47
+ }), /* @__PURE__ */ m(c, {
48
+ side: "right",
49
+ className: "font-medium",
50
+ children: C?.name || v.unnamedBoard
51
+ })] }) : T,
52
+ S ? /* @__PURE__ */ m("span", {
53
+ id: S,
54
+ className: "sr-only",
55
+ children: v.boardError
56
+ }) : null,
57
+ /* @__PURE__ */ m(r, { children: w })
58
+ ]
32
59
  });
33
60
  });
34
61
  //#endregion
35
- export { m as BoardSelector };
62
+ export { g as BoardSelector };
36
63
 
37
64
  //# sourceMappingURL=board-selector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"board-selector.js","names":[],"sources":["../../../src/components/chrome/board-selector.tsx"],"mappings":";;;;;;;;AAwCA,IAAa,IAAgB,EAAK,SAAuB,EACvD,WACA,UACA,aACA,WACA,eAAY,IACZ,aAAU,aACW;CAIrB,IAAM,IAAQ,QAEV,EAAO,KAAK,MACV,kBAAC,GAAD;EAA2B,OAAO,EAAM;EACrC,UAAA,EAAM,QAAQ,EAAO;CACZ,GAFK,EAAM,EAEX,CACb,GACH,CAAC,GAAQ,EAAO,YAAY,CAC9B,GAEM,IACJ,kBAAC,GAAD;EACE,cAAY,EAAO;EACnB,WAAW,EACT,2KAGA,MAAY,kBAAkB,8EAC9B,MAAY,cACT,IAQG,oEACA,cACR;EAlBF,UAAA,CAoBE,kBAAC,GAAD,EAAW,WAAU,mDAAoD,CAAA,GACzE,kBAAC,QAAD;GACE,WAAW,EACT,+FACA,MAAY,aAAa,IAAY,sBAAsB,kCAG3D,MAAY,kBAAkB,qBAChC;GAEA,UAAA,kBAAC,GAAD,EAAa,aAAa,EAAO,YAAc,CAAA;EAC3C,CAAA,CACO;;CAGjB,OACE,kBAAC,GAAD;EAAe;EAAO,eAAe;EAArC,UAAA,CACG,IACC,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;GAAgB,SAAA;GAAS,UAAA;EAAwB,CAAA,GACjD,kBAAC,GAAD;G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MAAY,aAAa,IAAY,sBAAsB,kCAG3D,MAAY,kBAAkB,qBAChC;GAEA,UAAA,kBAAC,GAAD,EAAa,aAAa,EAAO,YAAc,CAAA;EAC3C,CAAA,CACO;;CAGjB,OACE,kBAAC,GAAD;EAAe;EAAO,eAAe;EAArC,UAAA;GACG,IACC,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;IAAgB,SAAA;IAAS,UAAA;GAAwB,CAAA,GACjD,kBAAC,GAAD;IAAgB,MAAK;IAAQ,WAAU;IACpC,UAAA,GAAe,QAAQ,EAAO;GACjB,CAAA,CACT,EAAA,CAAA,IAET;GAED,IACC,kBAAC,QAAD;IAAM,IAAI;IAAa,WAAU;IAC9B,UAAA,EAAO;GACJ,CAAA,IACJ;GACJ,kBAAC,GAAD,EAAA,UAAgB,EAAqB,CAAA;EAC/B;;AAEZ,CAAC"}
@@ -42,8 +42,10 @@ export interface StatusDotProps extends Omit<React.ComponentProps<"span">, "chil
42
42
  * `role="status"` is a polite live region: the label is announced when it
43
43
  * changes, which is the right behaviour for a dot tracking a connection. For
44
44
  * a dot describing something static (a legend swatch, a row that never
45
- * updates in place) pass `role="img"` props spread over the computed
46
- * attributes, so the override lands.
45
+ * updates in place) pass `role="img"`. That role makes the dot's children
46
+ * presentational, so the label then goes out as `aria-label` instead of the
47
+ * sr-only span — an sr-only child inside `role="img"` is not a name, and axe
48
+ * fails it as `role-img-alt`.
47
49
  */
48
- declare function StatusDot({ className, status, size, pulse, glow, label, style, ...props }: StatusDotProps): React.JSX.Element;
50
+ declare function StatusDot({ className, status, size, pulse, glow, label, style, role, ...props }: StatusDotProps): React.JSX.Element;
49
51
  export { StatusDot, statusDotVariants };