@fiestaboard/ui 6.0.2 → 6.1.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 (34) 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/index.d.ts +10 -0
  32. package/dist/index.js +11 -1
  33. package/dist/theme.css +93 -0
  34. package/package.json +2 -3
@@ -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;GACzE,GAAI;EACL,CAAA;CACmB,CAAA;AAE1B;AAOA,SAAS,EAAY,EAAE,cAAW,UAAO,GAAG,KAA2B;CACrE,OACE,kBAAC,GAAD;EACE,aAAU;EACV,WAAW,EACT,gHACA,qEACA,CACF;EACA,GAAI;EAPN,UAAA,CASE,kBAAC,QAAD;GAAM,WAAU;GAAoB,UAAA;EAAY,CAAA,GAChD,kBAAC,GAAD;GACE,eAAY;GACZ,WAAU;EACX,CAAA,CACiB;;AAExB;AAEA,SAAS,EAAY,EAAE,cAAW,GAAG,KAA0D;CAC7F,OACE,kBAAC,GAAD;EAAoB,aAAU;EAAe,WAAW,EAAG,sBAAsB,CAAS;EAAG,GAAI;EAC/F,UAAA,kBAAC,MAAD;GAAI,aAAU;GAAY,WAAU;GACjC,UAAA,EAAM;EACL,CAAA;CACc,CAAA;AAExB;AAEA,IAAM,IAA+C;CACnD,SAAS;CACT,SAAS;CACT,MAAM;CACN,OAAO;AACT;AAMA,SAAS,EAAS,EAAE,cAAW,YAAS,QAAQ,aAAU,GAAG,KAAwB;CACnF,IAAM,IAAS,EAAM,WAAW,CAAW;CAC3C,OACE,kBAAC,MAAD;EACE,aAAU;EACV,eAAa;EACb,WAAW,EAAG,kCAAkC,MAAW,aAAa,yBAAyB,CAAS;EAC1G,GAAI;EAJN,UAAA;GAME,kBAAC,QAAD;IACE,eAAY;IACZ,WAAW,EAAG,kEAAkE,EAAa,EAAO;IAFtG,UAAA;KAIG,MAAW,YAAY,kBAAC,GAAD;MAAS,MAAK;MAAK,OAAO;KAAO,CAAA,IAAI;KAC5D,MAAW,SAAS,kBAAC,GAAD,EAAO,WAAU,WAAY,CAAA,IAAI;KACrD,MAAW,UAAU,kBAAC,GAAD,EAAG,WAAU,WAAY,CAAA,IAAI;KAClD,MAAW,YAAY,kBAAC,GAAD,EAAQ,WAAU,WAAY,CAAA,IAAI;IACtD;;GACN,kBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CAA2B,EAAO,SAAS,IAAQ,IAAQ;;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":"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"}
package/dist/index.d.ts CHANGED
@@ -122,3 +122,13 @@ export * from "./components/editor/utils/insertion";
122
122
  export * from "./components/editor/utils/length-calculator";
123
123
  export * from "./components/editor/utils/serialization";
124
124
  export * from "./components/editor/utils/stroke-transaction";
125
+ export * from "./components/ai/actions";
126
+ export * from "./components/ai/conversation";
127
+ export * from "./components/ai/loader";
128
+ export * from "./components/ai/message";
129
+ export * from "./components/ai/prompt-input";
130
+ export * from "./components/ai/shimmer";
131
+ export * from "./components/ai/spotlight";
132
+ export * from "./components/ai/suggestion";
133
+ export * from "./components/ai/task";
134
+ export * from "./components/ai/tool";
package/dist/index.js CHANGED
@@ -114,4 +114,14 @@ import { DEFAULT_TEMPLATE_EDITOR_LABELS as $i, TemplateEditor as ea } from "./co
114
114
  import { DEFAULT_FILTER_PICKER_LABELS as ta, FilterPickerContent as na } from "./components/editor/filter-picker-content.js";
115
115
  import { DEFAULT_VARIABLE_PICKER_LABELS as ra, VariablePickerContent as ia, createLucideIconResolver as aa, getPluginsWithNestedArrays as oa } from "./components/editor/variable-picker-content.js";
116
116
  import { calculateLineLength as sa, getOverflowAmount as ca, willOverflow as la } from "./components/editor/utils/length-calculator.js";
117
- export { cr as ALL_COLOR_CODES, lr as AVAILABLE_COLORS, t as Accordion, n as AccordionContent, r as AccordionItem, i as AccordionTrigger, _ as ActionCard, E as Alert, D as AlertDescription, $ as AlertDialog, ee as AlertDialogAction, te as AlertDialogCancel, ne as AlertDialogContent, re as AlertDialogDescription, ie as AlertDialogFooter, ae as AlertDialogHeader, oe as AlertDialogOverlay, se as AlertDialogPortal, ce as AlertDialogTitle, le as AlertDialogTrigger, O as AlertTitle, _r as BOARD_CHARS, ri as BOARD_CODE_TO_COLOR, ur as BOARD_COLORS, ii as BOARD_COLOR_CODES, M as Badge, Jr as BarList, kr as BoardBackdrop, Rr as BoardDisplay, vn as BoardIcon, yn as BoardSelector, Zr as BoardShowcase, Or as BoardTeaser, J as Box, bn as Breadcrumb, xn as BreadcrumbEllipsis, Sn as BreadcrumbItem, Cn as BreadcrumbLink, wn as BreadcrumbList, Tn as BreadcrumbPage, En as BreadcrumbSeparator, A as Button, dr as COLOR_CODE_MAP, fr as COLOR_DISPLAY, ai as CURSOR_ANCHOR, s as Card, c as CardAction, l as CardContent, u as CardDescription, d as CardFooter, f as CardHeader, p as CardTitle, L as Checkbox, P as Chip, Ye as Code, y as Collapsible, b as CollapsibleContent, x as CollapsibleTrigger, Ai as ColorPickerContent, mi as ColorTileNode, fi as ColorTileNodeView, R as Combobox, V as CopyButton, oi as DEFAULT_BOARD_LINES, si as DEFAULT_BOARD_WIDTH, ji as DEFAULT_COLOR_PICKER_LABELS, pi as DEFAULT_COLOR_TILE_NODE_VIEW_LABELS, z as DEFAULT_COMBOBOX_LABELS, zi as DEFAULT_DRAW_CHAR_PICKER_LABELS, hi as DEFAULT_FILL_SPACE_NODE_VIEW_LABELS, ta as DEFAULT_FILTER_PICKER_LABELS, Vi as DEFAULT_FORMATTING_PICKER_LABELS, vi as DEFAULT_FORMULA_NODE_VIEW_LABELS, Wr as DEFAULT_SHAPE_LABELS, Qr as DEFAULT_SHOWCASE_LABELS, $i as DEFAULT_TEMPLATE_EDITOR_LABELS, Yi as DEFAULT_TEMPLATE_EDITOR_TOOLBAR_LABELS, Ui as DEFAULT_TOOLBAR_DROPDOWN_LABELS, wi as DEFAULT_VARIABLE_NODE_VIEW_LABELS, ra as DEFAULT_VARIABLE_PICKER_LABELS, Di as DEFAULT_WRAPPED_TEXT_VIEW_LABELS, jr as DEVICE_DIMENSIONS, Mi as DRAW_CHARS, ue as Dialog, de as DialogClose, fe as DialogContent, pe as DialogDescription, me as DialogFooter, he as DialogHeader, ge as DialogOverlay, _e as DialogPortal, ve as DialogTitle, ye as DialogTrigger, Bi as DrawCharPickerContent, be as DropdownMenu, xe as DropdownMenuCheckboxItem, Se as DropdownMenuContent, Ce as DropdownMenuGroup, we as DropdownMenuItem, Te as DropdownMenuLabel, Ee as DropdownMenuPortal, De as DropdownMenuRadioGroup, Oe as DropdownMenuRadioItem, ke as DropdownMenuSeparator, Ae as DropdownMenuShortcut, je as DropdownMenuSub, Me as DropdownMenuSubContent, Ne as DropdownMenuSubTrigger, Pe as DropdownMenuTrigger, vr as EXTRA_CHARS, I as EmptyState, pr as FIESTABOARD_COLORS, Dn as FIESTA_ICON_DATA_URI, On as FIESTA_ICON_PALETTE, kn as FIESTA_ICON_SVG, ci as FILL_SPACE_REPEAT_VAR, li as FILL_SPACE_VAR, zr as FLAP_SPEED_PRESETS, ht as FadeContent, G as Field, An as FiestaIcon, jn as FiestaLogo, _i as FillSpaceNode, gi as FillSpaceNodeView, na as FilterPickerContent, Y as Flex, Hi as FormattingPickerContent, bi as FormulaNode, yi as FormulaNodeView, Z as Grid, Xe as Heading, h as IconTile, K as Input, S as JsonTree, Qe as Kbd, W as Label, Mn as LanguageSelector, Fe as Lightbox, Ie as LightboxClose, Le as LightboxContent, Re as LightboxFooter, ze as LightboxOverlay, Be as LightboxPortal, Ve as LightboxTrigger, xi as LineNavigation, et as List, tt as ListItem, Mr as MAX_NOTES_PER_AXIS, Nn as MainContent, C as MediaFrame, w as MediaFrameBar, T as MediaFrameMedia, Nr as NOTE_COLS, Pr as NOTE_ROWS, Pn as NavList, Fn as NavListItem, In as NavListLink, Ln as NavListSection, Rn as NavListSectionContent, zn as NavListSectionTrigger, ui as NodeViewInjectionProvider, Hn as PAGE_HUES, $r as PLUGIN_CATEGORIES, Bn as PageCard, Un as PageHeader, Wn as PageIconGradientDefs, Kn as PageInset, qn as PageLayout, Vn as PageSection, Jn as PageToolbar, Yn as Pagination, ni as PluginCard, ei as PluginCategoryBadge, He as Popover, Ue as PopoverClose, We as PopoverContent, Ge as PopoverDescription, Ke as PopoverTitle, qe as PopoverTrigger, Hr as ScaledBoardDisplay, ti as ScaledBoardTeaser, rt as ScrollArea, it as ScrollBar, q as SecretInput, Kt as SegmentedControl, qt as SegmentedControlItem, yt as Select, bt as SelectContent, xt as SelectGroup, St as SelectItem, Ct as SelectLabel, wt as SelectScrollDownButton, Tt as SelectScrollUpButton, Et as SelectSeparator, Dt as SelectTrigger, Ot as SelectValue, nn as Sheet, rn as SheetClose, an as SheetContent, on as SheetDescription, sn as SheetFooter, cn as SheetHeader, ln as SheetOverlay, un as SheetPortal, dn as SheetTitle, fn as SheetTrigger, Zn as Sidebar, Si as SingleParagraphDoc, gt as Skeleton, Qn as SkipToContent, kt as Slider, a as Spinner, en as Stack, Yr as StatStrip, Xr as StatStripItem, Ur as StaticBoardDisplay, _t as StatusDot, At as Swatch, jt as SwatchGroup, Lt as Switch, at as Table, ot as TableBody, st as TableCell, ct as TableHead, lt as TableHeader, ut as TableRow, dt as Tabs, ft as TabsContent, pt as TabsList, mt as TabsTrigger, ea as TemplateEditor, Xi as TemplateEditorToolbar, H as Text, _n as TextLink, Rt as Textarea, $n as ThemeToggle, zt as TimePicker, Bt as TimezonePicker, Ht as Toggle, Jt as ToggleCard, Yt as ToggleCardGroup, Ut as ToggleGroup, Wi as ToolbarDropdown, pn as Tooltip, mn as TooltipContent, hn as TooltipProvider, gn as TooltipTrigger, er as TopNav, tr as TopNavActions, nr as TopNavBrand, rr as TopNavItem, ir as TopNavLink, ar as TopNavList, or as TopNavMenuTrigger, Ci as TrailingNewline, Ei as VariableNode, Ti as VariableNodeView, ia as VariablePickerContent, sr as WizardProgress, Ar as WizardShell, ki as WrappedTextNode, Oi as WrappedTextView, v as actionCardMedallionVariants, k as alertVariants, yr as applyCode62Glyph, N as badgeVariants, Ni as brushToCell, Zi as buildStrokeTransaction, j as buttonVariants, sa as calculateLineLength, m as cardSurfaceClassName, Pi as cellsToLine, F as chipVariants, e as cn, aa as createLucideIconResolver, B as defaultComboboxFilter, Br as deriveFlapTiming, X as flexVariants, mr as getBoardColor, br as getCharFromToken, xr as getCharIndex, ca as getOverflowAmount, oa as getPluginsWithNestedArrays, Q as gridVariants, Ze as headingVariants, g as iconTileVariants, Ji as insertTemplateContent, Sr as isColorTile, Fr as isNoteArray, Fi as isPositionalLine, hr as isValidBoardColor, Qi as lineRanges, Ii as lineToCells, Vt as listTimezones, nt as listVariants, Cr as messageToGrid, wr as messageToText, Ir as noteArrayDimensions, Gn as pageHue, Xn as paginationRange, Li as paintLine, Tr as parseLine, Gi as parseLineContent, Ki as parseTemplateSimple, Gr as previewLabel, Kr as previewLabels, qr as previewMessage, Ri as renderPositionalLine, Er as resolveCode62Glyph, gr as resolveColorCode, Lr as resolveDimensions, Vr as resolveFlapSpeed, Xt as segmentedControlItemVariants, Zt as segmentedControlVariants, qi as serializeTemplateSimple, o as spinnerVariants, tn as stackVariants, vt as statusDotVariants, Mt as swatchFillVariants, Nt as swatchGlyphVariants, Pt as swatchGroupVariants, Ft as swatchIndicatorVariants, It as swatchVariants, U as textVariants, Qt as toggleCardGroupVariants, $t as toggleCardVariants, Wt as toggleGroupVariants, Gt as toggleVariants, Dr as tokensEqual, $e as useKbdPlatform, di as useNodeViewInjection, Je as usePopoverClose, la as willOverflow };
117
+ import { Action as ua, Actions as da } from "./components/ai/actions.js";
118
+ import { Conversation as fa, ConversationContent as pa, ConversationScrollButton as ma, DEFAULT_CONVERSATION_LABELS as ha } from "./components/ai/conversation.js";
119
+ import { Loader as ga } from "./components/ai/loader.js";
120
+ import { Message as _a, MessageAvatar as va, MessageContent as ya, messageContentVariants as ba, messageVariants as xa } from "./components/ai/message.js";
121
+ import { DEFAULT_PROMPT_INPUT_LABELS as Sa, PromptInput as Ca, PromptInputSubmit as wa, PromptInputTextarea as Ta, PromptInputToolbar as Ea, PromptInputTools as Da } from "./components/ai/prompt-input.js";
122
+ import { Shimmer as Oa } from "./components/ai/shimmer.js";
123
+ import { GhostValue as ka, SpotlightCaption as Aa, SpotlightRing as ja, revealedLength as Ma, spotlightRingVariants as Na } from "./components/ai/spotlight.js";
124
+ import { Suggestion as Pa, Suggestions as Fa } from "./components/ai/suggestion.js";
125
+ import { DEFAULT_TASK_LABELS as Ia, Task as La, TaskContent as Ra, TaskItem as za, TaskTrigger as Ba } from "./components/ai/task.js";
126
+ import { DEFAULT_TOOL_LABELS as Va, Tool as Ha, ToolContent as Ua, ToolHeader as Wa, ToolInput as Ga, ToolOutput as Ka } from "./components/ai/tool.js";
127
+ export { cr as ALL_COLOR_CODES, lr as AVAILABLE_COLORS, t as Accordion, n as AccordionContent, r as AccordionItem, i as AccordionTrigger, ua as Action, _ as ActionCard, da as Actions, E as Alert, D as AlertDescription, $ as AlertDialog, ee as AlertDialogAction, te as AlertDialogCancel, ne as AlertDialogContent, re as AlertDialogDescription, ie as AlertDialogFooter, ae as AlertDialogHeader, oe as AlertDialogOverlay, se as AlertDialogPortal, ce as AlertDialogTitle, le as AlertDialogTrigger, O as AlertTitle, _r as BOARD_CHARS, ri as BOARD_CODE_TO_COLOR, ur as BOARD_COLORS, ii as BOARD_COLOR_CODES, M as Badge, Jr as BarList, kr as BoardBackdrop, Rr as BoardDisplay, vn as BoardIcon, yn as BoardSelector, Zr as BoardShowcase, Or as BoardTeaser, J as Box, bn as Breadcrumb, xn as BreadcrumbEllipsis, Sn as BreadcrumbItem, Cn as BreadcrumbLink, wn as BreadcrumbList, Tn as BreadcrumbPage, En as BreadcrumbSeparator, A as Button, dr as COLOR_CODE_MAP, fr as COLOR_DISPLAY, ai as CURSOR_ANCHOR, s as Card, c as CardAction, l as CardContent, u as CardDescription, d as CardFooter, f as CardHeader, p as CardTitle, L as Checkbox, P as Chip, Ye as Code, y as Collapsible, b as CollapsibleContent, x as CollapsibleTrigger, Ai as ColorPickerContent, mi as ColorTileNode, fi as ColorTileNodeView, R as Combobox, fa as Conversation, pa as ConversationContent, ma as ConversationScrollButton, V as CopyButton, oi as DEFAULT_BOARD_LINES, si as DEFAULT_BOARD_WIDTH, ji as DEFAULT_COLOR_PICKER_LABELS, pi as DEFAULT_COLOR_TILE_NODE_VIEW_LABELS, z as DEFAULT_COMBOBOX_LABELS, ha as DEFAULT_CONVERSATION_LABELS, zi as DEFAULT_DRAW_CHAR_PICKER_LABELS, hi as DEFAULT_FILL_SPACE_NODE_VIEW_LABELS, ta as DEFAULT_FILTER_PICKER_LABELS, Vi as DEFAULT_FORMATTING_PICKER_LABELS, vi as DEFAULT_FORMULA_NODE_VIEW_LABELS, Sa as DEFAULT_PROMPT_INPUT_LABELS, Wr as DEFAULT_SHAPE_LABELS, Qr as DEFAULT_SHOWCASE_LABELS, Ia as DEFAULT_TASK_LABELS, $i as DEFAULT_TEMPLATE_EDITOR_LABELS, Yi as DEFAULT_TEMPLATE_EDITOR_TOOLBAR_LABELS, Ui as DEFAULT_TOOLBAR_DROPDOWN_LABELS, Va as DEFAULT_TOOL_LABELS, wi as DEFAULT_VARIABLE_NODE_VIEW_LABELS, ra as DEFAULT_VARIABLE_PICKER_LABELS, Di as DEFAULT_WRAPPED_TEXT_VIEW_LABELS, jr as DEVICE_DIMENSIONS, Mi as DRAW_CHARS, ue as Dialog, de as DialogClose, fe as DialogContent, pe as DialogDescription, me as DialogFooter, he as DialogHeader, ge as DialogOverlay, _e as DialogPortal, ve as DialogTitle, ye as DialogTrigger, Bi as DrawCharPickerContent, be as DropdownMenu, xe as DropdownMenuCheckboxItem, Se as DropdownMenuContent, Ce as DropdownMenuGroup, we as DropdownMenuItem, Te as DropdownMenuLabel, Ee as DropdownMenuPortal, De as DropdownMenuRadioGroup, Oe as DropdownMenuRadioItem, ke as DropdownMenuSeparator, Ae as DropdownMenuShortcut, je as DropdownMenuSub, Me as DropdownMenuSubContent, Ne as DropdownMenuSubTrigger, Pe as DropdownMenuTrigger, vr as EXTRA_CHARS, I as EmptyState, pr as FIESTABOARD_COLORS, Dn as FIESTA_ICON_DATA_URI, On as FIESTA_ICON_PALETTE, kn as FIESTA_ICON_SVG, ci as FILL_SPACE_REPEAT_VAR, li as FILL_SPACE_VAR, zr as FLAP_SPEED_PRESETS, ht as FadeContent, G as Field, An as FiestaIcon, jn as FiestaLogo, _i as FillSpaceNode, gi as FillSpaceNodeView, na as FilterPickerContent, Y as Flex, Hi as FormattingPickerContent, bi as FormulaNode, yi as FormulaNodeView, ka as GhostValue, Z as Grid, Xe as Heading, h as IconTile, K as Input, S as JsonTree, Qe as Kbd, W as Label, Mn as LanguageSelector, Fe as Lightbox, Ie as LightboxClose, Le as LightboxContent, Re as LightboxFooter, ze as LightboxOverlay, Be as LightboxPortal, Ve as LightboxTrigger, xi as LineNavigation, et as List, tt as ListItem, ga as Loader, Mr as MAX_NOTES_PER_AXIS, Nn as MainContent, C as MediaFrame, w as MediaFrameBar, T as MediaFrameMedia, _a as Message, va as MessageAvatar, ya as MessageContent, Nr as NOTE_COLS, Pr as NOTE_ROWS, Pn as NavList, Fn as NavListItem, In as NavListLink, Ln as NavListSection, Rn as NavListSectionContent, zn as NavListSectionTrigger, ui as NodeViewInjectionProvider, Hn as PAGE_HUES, $r as PLUGIN_CATEGORIES, Bn as PageCard, Un as PageHeader, Wn as PageIconGradientDefs, Kn as PageInset, qn as PageLayout, Vn as PageSection, Jn as PageToolbar, Yn as Pagination, ni as PluginCard, ei as PluginCategoryBadge, He as Popover, Ue as PopoverClose, We as PopoverContent, Ge as PopoverDescription, Ke as PopoverTitle, qe as PopoverTrigger, Ca as PromptInput, wa as PromptInputSubmit, Ta as PromptInputTextarea, Ea as PromptInputToolbar, Da as PromptInputTools, Hr as ScaledBoardDisplay, ti as ScaledBoardTeaser, rt as ScrollArea, it as ScrollBar, q as SecretInput, Kt as SegmentedControl, qt as SegmentedControlItem, yt as Select, bt as SelectContent, xt as SelectGroup, St as SelectItem, Ct as SelectLabel, wt as SelectScrollDownButton, Tt as SelectScrollUpButton, Et as SelectSeparator, Dt as SelectTrigger, Ot as SelectValue, nn as Sheet, rn as SheetClose, an as SheetContent, on as SheetDescription, sn as SheetFooter, cn as SheetHeader, ln as SheetOverlay, un as SheetPortal, dn as SheetTitle, fn as SheetTrigger, Oa as Shimmer, Zn as Sidebar, Si as SingleParagraphDoc, gt as Skeleton, Qn as SkipToContent, kt as Slider, a as Spinner, Aa as SpotlightCaption, ja as SpotlightRing, en as Stack, Yr as StatStrip, Xr as StatStripItem, Ur as StaticBoardDisplay, _t as StatusDot, Pa as Suggestion, Fa as Suggestions, At as Swatch, jt as SwatchGroup, Lt as Switch, at as Table, ot as TableBody, st as TableCell, ct as TableHead, lt as TableHeader, ut as TableRow, dt as Tabs, ft as TabsContent, pt as TabsList, mt as TabsTrigger, La as Task, Ra as TaskContent, za as TaskItem, Ba as TaskTrigger, ea as TemplateEditor, Xi as TemplateEditorToolbar, H as Text, _n as TextLink, Rt as Textarea, $n as ThemeToggle, zt as TimePicker, Bt as TimezonePicker, Ht as Toggle, Jt as ToggleCard, Yt as ToggleCardGroup, Ut as ToggleGroup, Ha as Tool, Ua as ToolContent, Wa as ToolHeader, Ga as ToolInput, Ka as ToolOutput, Wi as ToolbarDropdown, pn as Tooltip, mn as TooltipContent, hn as TooltipProvider, gn as TooltipTrigger, er as TopNav, tr as TopNavActions, nr as TopNavBrand, rr as TopNavItem, ir as TopNavLink, ar as TopNavList, or as TopNavMenuTrigger, Ci as TrailingNewline, Ei as VariableNode, Ti as VariableNodeView, ia as VariablePickerContent, sr as WizardProgress, Ar as WizardShell, ki as WrappedTextNode, Oi as WrappedTextView, v as actionCardMedallionVariants, k as alertVariants, yr as applyCode62Glyph, N as badgeVariants, Ni as brushToCell, Zi as buildStrokeTransaction, j as buttonVariants, sa as calculateLineLength, m as cardSurfaceClassName, Pi as cellsToLine, F as chipVariants, e as cn, aa as createLucideIconResolver, B as defaultComboboxFilter, Br as deriveFlapTiming, X as flexVariants, mr as getBoardColor, br as getCharFromToken, xr as getCharIndex, ca as getOverflowAmount, oa as getPluginsWithNestedArrays, Q as gridVariants, Ze as headingVariants, g as iconTileVariants, Ji as insertTemplateContent, Sr as isColorTile, Fr as isNoteArray, Fi as isPositionalLine, hr as isValidBoardColor, Qi as lineRanges, Ii as lineToCells, Vt as listTimezones, nt as listVariants, ba as messageContentVariants, Cr as messageToGrid, wr as messageToText, xa as messageVariants, Ir as noteArrayDimensions, Gn as pageHue, Xn as paginationRange, Li as paintLine, Tr as parseLine, Gi as parseLineContent, Ki as parseTemplateSimple, Gr as previewLabel, Kr as previewLabels, qr as previewMessage, Ri as renderPositionalLine, Er as resolveCode62Glyph, gr as resolveColorCode, Lr as resolveDimensions, Vr as resolveFlapSpeed, Ma as revealedLength, Xt as segmentedControlItemVariants, Zt as segmentedControlVariants, qi as serializeTemplateSimple, o as spinnerVariants, Na as spotlightRingVariants, tn as stackVariants, vt as statusDotVariants, Mt as swatchFillVariants, Nt as swatchGlyphVariants, Pt as swatchGroupVariants, Ft as swatchIndicatorVariants, It as swatchVariants, U as textVariants, Qt as toggleCardGroupVariants, $t as toggleCardVariants, Wt as toggleGroupVariants, Gt as toggleVariants, Dr as tokensEqual, $e as useKbdPlatform, di as useNodeViewInjection, Je as usePopoverClose, la as willOverflow };
package/dist/theme.css CHANGED
@@ -1690,6 +1690,99 @@ html[data-board-switch="backward"]::view-transition-new(board-page) {
1690
1690
  }
1691
1691
  }
1692
1692
 
1693
+ /* ============================================================
1694
+ * AI family — shimmer, spotlight pulse, ghost caret
1695
+ *
1696
+ * Owned by src/components/ai/. Each has its own reduced-motion pose rather
1697
+ * than relying on the 1ms backstop below: a shimmer frozen mid-sweep leaves
1698
+ * half the text at 30% opacity, a pulse frozen at its widest reads as a
1699
+ * second border, a caret frozen invisible reads as nothing being typed.
1700
+ * ============================================================ */
1701
+ @keyframes ai-shimmer {
1702
+ from {
1703
+ background-position: 200% center;
1704
+ }
1705
+ to {
1706
+ background-position: -200% center;
1707
+ }
1708
+ }
1709
+
1710
+ .ai-shimmer {
1711
+ color: transparent;
1712
+ background-image: linear-gradient(
1713
+ 90deg,
1714
+ var(--muted-foreground) 0%,
1715
+ var(--foreground) 50%,
1716
+ var(--muted-foreground) 100%
1717
+ );
1718
+ background-size: 200% auto;
1719
+ background-clip: text;
1720
+ -webkit-background-clip: text;
1721
+ animation: ai-shimmer 2s linear infinite;
1722
+ }
1723
+
1724
+ @keyframes ai-spotlight-pulse {
1725
+ 0%,
1726
+ 100% {
1727
+ box-shadow: 0 0 0 0 color-mix(in oklch, var(--brand) 45%, transparent);
1728
+ }
1729
+ 50% {
1730
+ box-shadow: 0 0 0 6px color-mix(in oklch, var(--brand) 0%, transparent);
1731
+ }
1732
+ }
1733
+
1734
+ .ai-spotlight-pulse {
1735
+ animation: ai-spotlight-pulse 1.6s ease-out infinite;
1736
+ }
1737
+
1738
+ @keyframes ai-caret-blink {
1739
+ 0%,
1740
+ 49% {
1741
+ opacity: 1;
1742
+ }
1743
+ 50%,
1744
+ 100% {
1745
+ opacity: 0;
1746
+ }
1747
+ }
1748
+
1749
+ .ai-caret {
1750
+ display: inline-block;
1751
+ width: 1px;
1752
+ height: 1em;
1753
+ margin-left: 1px;
1754
+ vertical-align: -0.15em;
1755
+ background-color: var(--brand);
1756
+ animation: ai-caret-blink 1s steps(1) infinite;
1757
+ }
1758
+
1759
+ @media (prefers-reduced-motion: reduce) {
1760
+ .ai-shimmer {
1761
+ animation: none;
1762
+ color: var(--muted-foreground);
1763
+ background-image: none;
1764
+ }
1765
+
1766
+ .ai-spotlight-pulse {
1767
+ animation: none;
1768
+ }
1769
+
1770
+ .ai-caret {
1771
+ animation: none;
1772
+ }
1773
+ }
1774
+
1775
+ .reduce-motion .ai-shimmer {
1776
+ animation: none;
1777
+ color: var(--muted-foreground);
1778
+ background-image: none;
1779
+ }
1780
+
1781
+ .reduce-motion .ai-spotlight-pulse,
1782
+ .reduce-motion .ai-caret {
1783
+ animation: none;
1784
+ }
1785
+
1693
1786
  /* ============================================================
1694
1787
  * Reduced-motion backstop (issue #180)
1695
1788
  *