@a4ui/core 0.31.1 → 0.33.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 (60) hide show
  1. package/dist/NumberInput-Bnh2u7pp.js +381 -0
  2. package/dist/charts/BarList.d.ts +33 -0
  3. package/dist/charts/CategoryBar.d.ts +23 -0
  4. package/dist/charts/GaugeChart.d.ts +43 -0
  5. package/dist/charts/LineChart.d.ts +39 -0
  6. package/dist/charts/RadarChart.d.ts +34 -0
  7. package/dist/charts/StatusTracker.d.ts +27 -0
  8. package/dist/charts/index.d.ts +6 -0
  9. package/dist/charts.js +693 -100
  10. package/dist/commerce.js +2 -2
  11. package/dist/elements.css +206 -0
  12. package/dist/full.css +206 -0
  13. package/dist/index.d.ts +18 -1
  14. package/dist/index.js +5086 -3915
  15. package/dist/motion-jYMWmZqB.js +119 -0
  16. package/dist/ui/AnimatedBeam.d.ts +34 -0
  17. package/dist/ui/BentoGrid.d.ts +39 -0
  18. package/dist/ui/BorderBeam.d.ts +27 -0
  19. package/dist/ui/Callout.d.ts +27 -0
  20. package/dist/ui/Confetti.d.ts +46 -0
  21. package/dist/ui/CursorTrail.d.ts +25 -0
  22. package/dist/ui/DiffViewer.d.ts +33 -0
  23. package/dist/ui/Dock.d.ts +31 -0
  24. package/dist/ui/Globe.d.ts +44 -0
  25. package/dist/ui/Meteors.d.ts +23 -0
  26. package/dist/ui/ModelPicker.d.ts +38 -0
  27. package/dist/ui/ReasoningTrace.d.ts +28 -0
  28. package/dist/ui/Snippet.d.ts +19 -0
  29. package/dist/ui/SuggestionChips.d.ts +25 -0
  30. package/dist/ui/ToolCallTimeline.d.ts +34 -0
  31. package/dist/ui/UsageMeter.d.ts +26 -0
  32. package/dist/ui/WorldMap.d.ts +36 -0
  33. package/package.json +1 -1
  34. package/src/charts/BarList.tsx +83 -0
  35. package/src/charts/CategoryBar.tsx +95 -0
  36. package/src/charts/GaugeChart.tsx +175 -0
  37. package/src/charts/LineChart.tsx +264 -0
  38. package/src/charts/RadarChart.tsx +215 -0
  39. package/src/charts/StatusTracker.tsx +81 -0
  40. package/src/charts/index.ts +6 -0
  41. package/src/index.ts +31 -1
  42. package/src/ui/AnimatedBeam.tsx +187 -0
  43. package/src/ui/BentoGrid.tsx +89 -0
  44. package/src/ui/BorderBeam.tsx +96 -0
  45. package/src/ui/Callout.tsx +66 -0
  46. package/src/ui/Confetti.tsx +131 -0
  47. package/src/ui/CursorTrail.tsx +88 -0
  48. package/src/ui/DiffViewer.tsx +166 -0
  49. package/src/ui/Dock.tsx +124 -0
  50. package/src/ui/Globe.tsx +317 -0
  51. package/src/ui/Meteors.tsx +109 -0
  52. package/src/ui/ModelPicker.tsx +119 -0
  53. package/src/ui/ReasoningTrace.tsx +83 -0
  54. package/src/ui/Snippet.tsx +64 -0
  55. package/src/ui/SuggestionChips.tsx +65 -0
  56. package/src/ui/ToolCallTimeline.tsx +137 -0
  57. package/src/ui/UsageMeter.tsx +71 -0
  58. package/src/ui/WorldMap.tsx +191 -0
  59. package/dist/NumberInput-BQhVucw-.js +0 -491
  60. package/dist/cn-B6yFEsav.js +0 -8
@@ -0,0 +1,119 @@
1
+ import { clsx as M } from "clsx";
2
+ import { twMerge as h } from "tailwind-merge";
3
+ import { animate as a, inView as I } from "motion";
4
+ import { createSignal as i, createEffect as R, untrack as m, onCleanup as C } from "solid-js";
5
+ function N(...e) {
6
+ return h(M(e));
7
+ }
8
+ const l = "a4ui-effects";
9
+ function p() {
10
+ try {
11
+ return window.localStorage;
12
+ } catch {
13
+ return null;
14
+ }
15
+ }
16
+ function F() {
17
+ var t;
18
+ try {
19
+ if (new URLSearchParams(window.location.search).get("calm") === "1") return !1;
20
+ } catch {
21
+ }
22
+ const e = (t = p()) == null ? void 0 : t.getItem(l);
23
+ return e === null ? !0 : e === "1";
24
+ }
25
+ function y(e) {
26
+ typeof document > "u" || document.documentElement.classList.toggle("calm", !e);
27
+ }
28
+ const w = F();
29
+ y(w);
30
+ const [g, U] = i(w);
31
+ function V() {
32
+ return g;
33
+ }
34
+ function _() {
35
+ return !g();
36
+ }
37
+ function b(e) {
38
+ var t;
39
+ (t = p()) == null || t.setItem(l, e ? "1" : "0"), y(e), U(e);
40
+ }
41
+ const L = "(prefers-reduced-motion: reduce)";
42
+ function T() {
43
+ return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(L).matches;
44
+ }
45
+ const E = "a4ui-motion-forced";
46
+ function O() {
47
+ try {
48
+ return window.localStorage;
49
+ } catch {
50
+ return null;
51
+ }
52
+ }
53
+ var d;
54
+ const [u, Y] = i(((d = O()) == null ? void 0 : d.getItem(E)) === "1");
55
+ typeof document < "u" && document.documentElement.classList.toggle("force-motion", m(u));
56
+ function k() {
57
+ return u;
58
+ }
59
+ function A(e) {
60
+ var t;
61
+ (t = O()) == null || t.setItem(E, e ? "1" : "0"), typeof document < "u" && document.documentElement.classList.toggle("force-motion", e), Y(e);
62
+ }
63
+ function c() {
64
+ return _() || T() && !u();
65
+ }
66
+ function G(e, t = 600) {
67
+ const [o, f] = i(0);
68
+ let n;
69
+ return R(() => {
70
+ const r = e();
71
+ if (n == null || n.stop(), c()) {
72
+ f(r);
73
+ return;
74
+ }
75
+ const s = m(o);
76
+ s !== r && (n = a(s, r, {
77
+ duration: t / 1e3,
78
+ ease: "easeOut",
79
+ onUpdate: (S) => f(S)
80
+ }));
81
+ }), C(() => n == null ? void 0 : n.stop()), o;
82
+ }
83
+ function P(e, t = {}) {
84
+ c() || a(
85
+ e,
86
+ { opacity: [0, 1], y: [t.y ?? 8, 0] },
87
+ { duration: t.duration ?? 0.32, delay: t.delay ?? 0, ease: "easeOut" }
88
+ );
89
+ }
90
+ function Q(e, t = {}) {
91
+ if (c()) return () => {
92
+ };
93
+ e.style.opacity = "0";
94
+ let o = !1;
95
+ return I(
96
+ e,
97
+ () => {
98
+ o || (o = !0, a(
99
+ e,
100
+ { opacity: [0, 1], y: [t.y ?? 16, 0] },
101
+ { duration: t.duration ?? 0.5, ease: "easeOut" }
102
+ ));
103
+ },
104
+ { amount: t.amount ?? 0.2 }
105
+ );
106
+ }
107
+ export {
108
+ G as a,
109
+ P as b,
110
+ N as c,
111
+ A as d,
112
+ k as e,
113
+ _ as i,
114
+ c as m,
115
+ T as p,
116
+ Q as r,
117
+ b as s,
118
+ V as u
119
+ };
@@ -0,0 +1,34 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface AnimatedBeamProps {
3
+ containerRef: HTMLElement | undefined;
4
+ fromRef: HTMLElement | undefined;
5
+ toRef: HTMLElement | undefined;
6
+ /** Px the curve bows away from a straight line. @default 0 (straight) */
7
+ curvature?: number;
8
+ /** Travel from `toRef` to `fromRef` instead of the default direction. */
9
+ reverse?: boolean;
10
+ /** Seconds for one travel of the gradient segment. @default 3 */
11
+ duration?: number;
12
+ class?: string;
13
+ }
14
+ /**
15
+ * Renders an animated SVG "beam" connecting two elements: a faint static
16
+ * base stroke under a traveling gradient segment that loops from `fromRef`
17
+ * to `toRef` (or the reverse, with `reverse`). Absolutely positioned over
18
+ * `containerRef`, whose bounds establish the coordinate space both
19
+ * endpoints are measured against. Static (no travel) under reduced motion.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * let container: HTMLDivElement | undefined
24
+ * let fromEl: HTMLDivElement | undefined
25
+ * let toEl: HTMLDivElement | undefined
26
+ *
27
+ * <div ref={container} class="relative flex items-center justify-between p-8">
28
+ * <div ref={fromEl} class="size-10 rounded-full bg-card" />
29
+ * <div ref={toEl} class="size-10 rounded-full bg-card" />
30
+ * <AnimatedBeam containerRef={container} fromRef={fromEl} toRef={toEl} curvature={40} />
31
+ * </div>
32
+ * ```
33
+ */
34
+ export declare function AnimatedBeam(props: AnimatedBeamProps): JSX.Element;
@@ -0,0 +1,39 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface BentoGridProps {
3
+ children: JSX.Element;
4
+ class?: string;
5
+ }
6
+ export interface BentoCardProps {
7
+ children: JSX.Element;
8
+ /** Number of grid columns to span at `sm`+ (2) and `lg`+ (3). Defaults to 1. */
9
+ colSpan?: 1 | 2 | 3;
10
+ /** Number of grid rows to span. Defaults to 1. */
11
+ rowSpan?: 1 | 2;
12
+ class?: string;
13
+ }
14
+ /**
15
+ * Responsive CSS grid for bento-style layouts — 1 column on mobile, 2 at
16
+ * `sm`, 3 at `lg`. Compose with {@link BentoCard} tiles, using `colSpan`/
17
+ * `rowSpan` on each tile to create the varied-size bento look.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <BentoGrid>
22
+ * <BentoCard colSpan={2} rowSpan={2}>
23
+ * <h3 class="text-lg font-semibold">Overview</h3>
24
+ * </BentoCard>
25
+ * <BentoCard>
26
+ * <h3 class="text-lg font-semibold">Uptime</h3>
27
+ * </BentoCard>
28
+ * <BentoCard>
29
+ * <h3 class="text-lg font-semibold">Latency</h3>
30
+ * </BentoCard>
31
+ * <BentoCard colSpan={3}>
32
+ * <h3 class="text-lg font-semibold">Recent activity</h3>
33
+ * </BentoCard>
34
+ * </BentoGrid>
35
+ * ```
36
+ */
37
+ export declare function BentoGrid(props: BentoGridProps): JSX.Element;
38
+ /** Glass tile for a {@link BentoGrid}, spanning columns/rows via `colSpan`/`rowSpan`. */
39
+ export declare function BentoCard(props: BentoCardProps): JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface BorderBeamProps {
3
+ /** Length of the traveling gradient segment, in px. @default 60 */
4
+ size?: number;
5
+ /** Full trip duration around the border, in seconds. @default 6 */
6
+ duration?: number;
7
+ /** Animation start offset, in seconds. @default 0 */
8
+ delay?: number;
9
+ class?: string;
10
+ }
11
+ /**
12
+ * Decorative light segment that travels continuously around the border of
13
+ * its parent. The parent must be `position: relative` (or similar) — this
14
+ * renders an absolutely-positioned, `pointer-events-none` layer (`inset-0`,
15
+ * `rounded-[inherit]`) tracking the parent's own box. Purely cosmetic
16
+ * (`aria-hidden`); under reduced motion the moving beam is replaced with a
17
+ * static edge glow instead of animating.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <div class="relative overflow-hidden rounded-2xl border border-border p-6">
22
+ * <BorderBeam />
23
+ * <p>Card content</p>
24
+ * </div>
25
+ * ```
26
+ */
27
+ export declare function BorderBeam(props: BorderBeamProps): JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { JSX } from 'solid-js';
2
+ /** Semantic tone of a {@link Callout}; drives the accent border, tint, and default icon. */
3
+ export type CalloutTone = 'info' | 'success' | 'warning' | 'danger' | 'neutral';
4
+ export interface CalloutProps {
5
+ /** Visual/semantic tone. Defaults to `'info'`. */
6
+ tone?: 'info' | 'success' | 'warning' | 'danger' | 'neutral';
7
+ /** Optional bold heading shown above the body. */
8
+ title?: JSX.Element;
9
+ /** Overrides the tone's default icon. */
10
+ icon?: JSX.Element;
11
+ children: JSX.Element;
12
+ class?: string;
13
+ }
14
+ /**
15
+ * Inline highlighted block for embedding guidance/notes inside prose (docs,
16
+ * READMEs, long-form content) — a left accent border, a faint tone-tinted
17
+ * background, and an icon. Unlike {@link Alert} it isn't a dismissible
18
+ * notification; it's part of the content flow.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * <Callout tone="warning" title="Before you continue">
23
+ * This action can't be undone once the migration starts.
24
+ * </Callout>
25
+ * ```
26
+ */
27
+ export declare function Callout(props: CalloutProps): JSX.Element;
@@ -0,0 +1,46 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface ConfettiProps {
3
+ /** Bump this (e.g. a counter) to fire a burst. Mount does not count. */
4
+ trigger?: number;
5
+ /** Number of pieces per burst. @default 80 */
6
+ count?: number;
7
+ class?: string;
8
+ }
9
+ /**
10
+ * Fires one burst of confetti pieces from the bottom-center of `container`,
11
+ * flying up and outward in a fan, rotating, then falling with gravity and
12
+ * fading out — each piece removes itself once its animation finishes. Angle,
13
+ * speed, fall distance and spin are derived deterministically from each
14
+ * piece's index (Math.sin), so the same `count` always produces the same
15
+ * fan. `container` should be `position: relative` (or already positioned)
16
+ * with `overflow: hidden` so pieces don't affect layout. No-op under
17
+ * {@link motionReduced}. This is the primitive behind {@link Confetti}.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * fireConfetti(cardEl, { count: 120 })
22
+ * ```
23
+ */
24
+ export declare function fireConfetti(container: HTMLElement, opts?: {
25
+ count?: number;
26
+ }): void;
27
+ /**
28
+ * Absolutely-positioned confetti layer: fires a burst of colored pieces from
29
+ * the bottom-center whenever `trigger` changes (the initial mount does not
30
+ * fire one). Purely decorative — `pointer-events-none` and `aria-hidden`.
31
+ * Place it inside a `position: relative` container; pair with a `count`
32
+ * prop, or reach for {@link fireConfetti} directly to fire into an
33
+ * arbitrary element outside Solid's render tree.
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * const [bursts, setBursts] = createSignal(0)
38
+ * return (
39
+ * <div class="relative h-64">
40
+ * <Confetti trigger={bursts()} count={100} />
41
+ * <Button onClick={() => setBursts((n) => n + 1)}>Celebrate</Button>
42
+ * </div>
43
+ * )
44
+ * ```
45
+ */
46
+ export declare function Confetti(props: ConfettiProps): JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface CursorTrailProps {
3
+ /** Blob tone. @default 'primary' */
4
+ color?: 'primary' | 'accent';
5
+ /** Blob diameter in px. @default 24 */
6
+ size?: number;
7
+ class?: string;
8
+ }
9
+ /**
10
+ * Layer that spawns a soft, blurred blob at the cursor position on every
11
+ * throttled `pointermove` over its parent, scaling down and fading out as
12
+ * it removes itself — leaving a trail. Must sit inside a `position:
13
+ * relative` parent (the layer listens on `parentElement`, since it is
14
+ * itself `pointer-events-none`). Purely decorative — `pointer-events-none`
15
+ * and `aria-hidden`. No-op under {@link motionReduced}; listeners are
16
+ * cleaned up on unmount.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <div class="relative h-48 rounded-lg border">
21
+ * <CursorTrail color="accent" size={32} />
22
+ * </div>
23
+ * ```
24
+ */
25
+ export declare function CursorTrail(props: CursorTrailProps): JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { JSX } from 'solid-js';
2
+ /** A single rendered row of a diff. */
3
+ export interface DiffLine {
4
+ type: 'add' | 'remove' | 'context';
5
+ content: string;
6
+ /** Line number in the old file. Present for `'remove'` and `'context'` rows. */
7
+ oldNum?: number;
8
+ /** Line number in the new file. Present for `'add'` and `'context'` rows. */
9
+ newNum?: number;
10
+ }
11
+ export interface DiffViewerProps {
12
+ /** Unified diff text (as produced by `git diff`/`diff -u`). Ignored if `lines` is set. */
13
+ diff?: string;
14
+ /** Pre-parsed diff rows. Takes precedence over `diff`. */
15
+ lines?: DiffLine[];
16
+ /** Header label. If omitted, inferred from the `+++`/`---` headers of `diff`, when present. */
17
+ filename?: string;
18
+ class?: string;
19
+ }
20
+ /**
21
+ * Read-only diff block: renders added/removed/context lines with a line-number
22
+ * gutter and a +/-/space marker. Accepts either a raw unified-diff string
23
+ * (parsed internally) or pre-parsed {@link DiffLine} rows.
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * <DiffViewer
28
+ * filename="src/lib/cn.ts"
29
+ * diff={`@@ -1,3 +1,3 @@\n-export const cn = (a) => a\n+export const cn = (a, b) => a + b\n context line`}
30
+ * />
31
+ * ```
32
+ */
33
+ export declare function DiffViewer(props: DiffViewerProps): JSX.Element;
@@ -0,0 +1,31 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface DockItem {
3
+ icon: JSX.Element;
4
+ label?: string;
5
+ onClick?: (e: MouseEvent) => void;
6
+ href?: string;
7
+ }
8
+ export interface DockProps {
9
+ items: DockItem[];
10
+ class?: string;
11
+ }
12
+ /**
13
+ * macOS-style dock: a glass pill of icon buttons that magnify based on
14
+ * horizontal distance to the cursor. Scale-only transform (`transform-origin:
15
+ * bottom`), reset to 1× on pointerleave. Respects `prefers-reduced-motion`
16
+ * (renders static, still fully clickable/keyboard-focusable).
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * import { Home, Search, Settings } from 'lucide-solid'
21
+ *
22
+ * <Dock
23
+ * items={[
24
+ * { icon: <Home size={22} />, label: 'Home', onClick: () => {} },
25
+ * { icon: <Search size={22} />, label: 'Search', onClick: () => {} },
26
+ * { icon: <Settings size={22} />, label: 'Settings', href: '/settings' },
27
+ * ]}
28
+ * />
29
+ * ```
30
+ */
31
+ export declare function Dock(props: DockProps): JSX.Element;
@@ -0,0 +1,44 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface GlobeMarker {
3
+ lat: number;
4
+ lng: number;
5
+ label?: string;
6
+ }
7
+ export interface GlobeArc {
8
+ /** [lat, lng] */
9
+ from: [number, number];
10
+ /** [lat, lng] */
11
+ to: [number, number];
12
+ }
13
+ export interface GlobeProps {
14
+ markers?: GlobeMarker[];
15
+ arcs?: GlobeArc[];
16
+ /** Canvas size in CSS px (square). @default 400 */
17
+ size?: number;
18
+ /** Spin automatically. @default true (ignored under reduced motion). */
19
+ autoRotate?: boolean;
20
+ class?: string;
21
+ }
22
+ /**
23
+ * A dotted 3D globe drawn on `<canvas>` with plain Canvas 2D (no three.js,
24
+ * no WebGL): dots come from a deterministic Fibonacci-sphere distribution,
25
+ * rotate around the Y axis, and project orthographically with depth-scaled
26
+ * alpha/size. `markers` render as brighter glowing dots (title = label);
27
+ * `arcs` draw as outward-bulging curves between two front-facing markers,
28
+ * with a small traveling highlight. Auto-rotates unless `autoRotate={false}`;
29
+ * drag with the pointer to spin manually. Renders a single static frame
30
+ * under `motionReduced()` (no auto-rotation; drag still works).
31
+ *
32
+ * @example
33
+ * ```tsx
34
+ * <Globe
35
+ * size={360}
36
+ * markers={[
37
+ * { lat: 40.7, lng: -74.0, label: 'New York' },
38
+ * { lat: 35.7, lng: 139.7, label: 'Tokyo' },
39
+ * ]}
40
+ * arcs={[{ from: [40.7, -74.0], to: [35.7, 139.7] }]}
41
+ * />
42
+ * ```
43
+ */
44
+ export declare function Globe(props: GlobeProps): JSX.Element;
@@ -0,0 +1,23 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface MeteorsProps {
3
+ /** Number of meteor streaks to render. @default 20 */
4
+ count?: number;
5
+ class?: string;
6
+ }
7
+ /**
8
+ * Decorative full-cover meteor shower: thin diagonal streaks that fall
9
+ * down-left and fade, looping with staggered delays and varied start
10
+ * positions/durations. Purely visual — absolute, `pointer-events-none`,
11
+ * `aria-hidden` — so it layers behind/inside a `relative overflow-hidden`
12
+ * container without affecting layout or a11y. Under {@link motionReduced} it
13
+ * swaps the falling streaks for a handful of static, faint dots.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <div class="relative overflow-hidden rounded-2xl border border-border p-8">
18
+ * <Meteors count={20} />
19
+ * <p class="relative">Content sits above the meteors.</p>
20
+ * </div>
21
+ * ```
22
+ */
23
+ export declare function Meteors(props: MeteorsProps): JSX.Element;
@@ -0,0 +1,38 @@
1
+ import { JSX } from 'solid-js';
2
+ /** A single selectable model in a {@link ModelPicker} menu. */
3
+ export interface ModelOption {
4
+ id: string;
5
+ name: string;
6
+ icon?: JSX.Element;
7
+ description?: string;
8
+ badge?: JSX.Element;
9
+ }
10
+ export interface ModelPickerProps {
11
+ models: ModelOption[];
12
+ /** Controlled selected model id. Omit and use `defaultValue` for uncontrolled use. */
13
+ value?: string;
14
+ /** Initial selected model id when uncontrolled. Ignored if `value` is passed. */
15
+ defaultValue?: string;
16
+ onChange?: (id: string) => void;
17
+ class?: string;
18
+ }
19
+ /**
20
+ * Dropdown trigger showing the selected model's icon + name + a chevron; the
21
+ * menu lists every model with icon, name, description, and optional badge,
22
+ * checkmarking the current selection. Controlled via `value`/`onChange` or
23
+ * uncontrolled via `defaultValue`, and fully keyboard-navigable (arrow keys,
24
+ * typeahead, Escape) via Kobalte's `DropdownMenu`.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <ModelPicker
29
+ * models={[
30
+ * { id: 'sonnet', name: 'Claude Sonnet', description: 'Balanced speed and quality' },
31
+ * { id: 'opus', name: 'Claude Opus', description: 'Most capable', badge: <Badge tone="info">New</Badge> },
32
+ * ]}
33
+ * defaultValue="sonnet"
34
+ * onChange={(id) => console.log('selected', id)}
35
+ * />
36
+ * ```
37
+ */
38
+ export declare function ModelPicker(props: ModelPickerProps): JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface ReasoningTraceProps {
3
+ /** Reasoning body content; takes precedence over `text` when both are given. */
4
+ children?: JSX.Element;
5
+ /** Plain-text reasoning body, rendered with preserved whitespace. */
6
+ text?: string;
7
+ /** Header label. Defaults to `'Reasoning'`. */
8
+ label?: JSX.Element;
9
+ /** Whether the panel starts expanded. Defaults to `false`. */
10
+ defaultOpen?: boolean;
11
+ /** Show a pulsing dot in the header to indicate reasoning is still streaming. */
12
+ streaming?: boolean;
13
+ class?: string;
14
+ }
15
+ /**
16
+ * Collapsible panel for surfacing a model's intermediate "thinking"/reasoning
17
+ * trace. The header is a toggle button (brain icon + label + rotating
18
+ * chevron, plus a pulsing dot while `streaming`); the body is a muted,
19
+ * smaller-text block showing `text` or `children` with whitespace preserved.
20
+ * Collapsed by default unless `defaultOpen`. Height/opacity transition,
21
+ * instant under reduced motion.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * <ReasoningTrace streaming text={reasoningSoFar()} />
26
+ * ```
27
+ */
28
+ export declare function ReasoningTrace(props: ReasoningTraceProps): JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface SnippetProps {
3
+ /** Source text to display and copy. */
4
+ code: string;
5
+ /** Optional language tag shown as a small badge, e.g. `'tsx'`. Informational only, no highlighting. */
6
+ language?: string;
7
+ class?: string;
8
+ }
9
+ /**
10
+ * Single inline code block (mono, bordered, scrollable) with a copy button
11
+ * that morphs into a checkmark for 1.5s after copying. For one code sample —
12
+ * use {@link CodeTabs} instead when you need several tabs/languages.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <Snippet language="bash" code="pnpm add @a4ui/core" />
17
+ * ```
18
+ */
19
+ export declare function Snippet(props: SnippetProps): JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface SuggestionChipsProps {
3
+ suggestions: string[];
4
+ onSelect?: (s: string) => void;
5
+ onDismiss?: (s: string) => void;
6
+ class?: string;
7
+ }
8
+ /**
9
+ * Wrapping row of pill chips, e.g. AI-suggested follow-up prompts. Clicking a
10
+ * chip calls `onSelect`; if `onDismiss` is passed, each chip also shows a
11
+ * small "x" that removes it without triggering `onSelect`. The select and
12
+ * dismiss controls are real sibling `<button>`s (not nested — a `<button>`
13
+ * can't validly contain another interactive element), so both are reachable
14
+ * and operable independently via Tab/Enter/Space with no extra ARIA wiring.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * <SuggestionChips
19
+ * suggestions={['Summarize this', 'Explain like I\'m 5', 'Write tests']}
20
+ * onSelect={(s) => sendMessage(s)}
21
+ * onDismiss={(s) => setSuggestions((prev) => prev.filter((x) => x !== s))}
22
+ * />
23
+ * ```
24
+ */
25
+ export declare function SuggestionChips(props: SuggestionChipsProps): JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { JSX } from 'solid-js';
2
+ /** Status of a single tool call rendered by {@link ToolCallTimeline}. */
3
+ export type ToolCallStatus = 'pending' | 'success' | 'error';
4
+ /** A single tool invocation rendered by {@link ToolCallTimeline}. */
5
+ export interface ToolCall {
6
+ /** Tool/function name, rendered in mono. */
7
+ name: string;
8
+ status: ToolCallStatus;
9
+ /** Arguments passed to the call. Shown in a collapsible details area when present. */
10
+ args?: JSX.Element | string;
11
+ /** Result returned by the call. Shown in a collapsible details area when present. */
12
+ result?: JSX.Element | string;
13
+ }
14
+ export interface ToolCallTimelineProps {
15
+ calls: ToolCall[];
16
+ class?: string;
17
+ }
18
+ /**
19
+ * Vertical timeline of AI tool calls: a connector line runs down the left with
20
+ * a status node per call (spinner while `pending`, check when `success`, x when
21
+ * `error`), the tool name in mono, and — when `args`/`result` are given — a
22
+ * collapsible details panel underneath.
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * <ToolCallTimeline
27
+ * calls={[
28
+ * { name: 'search_docs', status: 'success', args: 'query: "refunds"', result: '3 matches' },
29
+ * { name: 'update_ticket', status: 'pending' },
30
+ * ]}
31
+ * />
32
+ * ```
33
+ */
34
+ export declare function ToolCallTimeline(props: ToolCallTimelineProps): JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface UsageMeterProps {
3
+ used: number;
4
+ limit: number;
5
+ /** Header content shown before the "{used}/{limit}{unit}" count. */
6
+ label?: JSX.Element;
7
+ /** Appended to displayed numbers, e.g. `' tokens'` or `'%'`. */
8
+ unit?: string;
9
+ /** Fraction of `limit` (0–1) at which the fill switches to the warning tone. @default 0.85 */
10
+ warnAt?: number;
11
+ class?: string;
12
+ }
13
+ /**
14
+ * Labeled consumption bar: a header row with `label` and the raw
15
+ * "{used}/{limit}{unit}" count, a track whose fill width is `used / limit`
16
+ * (clamped to 0–100%) and switches to a warning tone once that ratio reaches
17
+ * `warnAt`, and a small "{remaining} left" line underneath. Built on Kobalte's
18
+ * `Meter` primitive, so it carries the same `role="meter"` a11y semantics as
19
+ * {@link Meter}.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <UsageMeter used={92} limit={100} label="API requests" unit=" req" warnAt={0.9} />
24
+ * ```
25
+ */
26
+ export declare function UsageMeter(props: UsageMeterProps): JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface WorldMapPoint {
3
+ lat: number;
4
+ lng: number;
5
+ label?: string;
6
+ }
7
+ export interface WorldMapConnection {
8
+ from: WorldMapPoint;
9
+ to: WorldMapPoint;
10
+ }
11
+ export interface WorldMapProps {
12
+ /** Arcs to draw between projected points. @default [] */
13
+ connections?: WorldMapConnection[];
14
+ class?: string;
15
+ }
16
+ /**
17
+ * A decorative, dependency-free SVG "world map": an evenly spaced dotted-grid
18
+ * backdrop (a stylized map, not accurate coastlines) with connection arcs
19
+ * projected from lat/lng via equirectangular mapping. Each arc bulges upward
20
+ * and carries a traveling primary→accent gradient segment (reusing
21
+ * {@link AnimatedBeam}'s technique); arcs render static under reduced motion.
22
+ * Responsive — scales to its container via the 2:1 `viewBox`.
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * <WorldMap
27
+ * class="w-full"
28
+ * connections={[
29
+ * { from: { lat: 40.7128, lng: -74.006, label: 'New York' }, to: { lat: 51.5074, lng: -0.1278, label: 'London' } },
30
+ * { from: { lat: 51.5074, lng: -0.1278 }, to: { lat: 35.6762, lng: 139.6503, label: 'Tokyo' } },
31
+ * { from: { lat: 40.7128, lng: -74.006 }, to: { lat: -23.5505, lng: -46.6333, label: 'São Paulo' } },
32
+ * ]}
33
+ * />
34
+ * ```
35
+ */
36
+ export declare function WorldMap(props: WorldMapProps): JSX.Element;