@timbal-ai/timbal-react 0.8.2 → 1.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.
- package/CHANGELOG.md +49 -0
- package/README.md +100 -6
- package/dist/app.cjs +2538 -1262
- package/dist/app.d.cts +11 -6
- package/dist/app.d.ts +11 -6
- package/dist/app.esm.js +43 -6
- package/dist/{button-ClSgD6OF.d.cts → button-BoyX5pM_.d.cts} +1 -1
- package/dist/{button-ClSgD6OF.d.ts → button-BoyX5pM_.d.ts} +1 -1
- package/dist/{chart-artifact-Bl67kre7.d.ts → chart-artifact-BZp7nmaf.d.ts} +430 -14
- package/dist/{chart-artifact-BzcvblDe.d.cts → chart-artifact-CX-rh9nq.d.cts} +430 -14
- package/dist/{chat-Bed4FQSl.d.cts → chat-DCms8pJ_.d.cts} +31 -4
- package/dist/{chat-Bed4FQSl.d.ts → chat-DCms8pJ_.d.ts} +31 -4
- package/dist/chat.cjs +1111 -776
- package/dist/chat.d.cts +1 -1
- package/dist/chat.d.ts +1 -1
- package/dist/chat.esm.js +3 -3
- package/dist/{chunk-QVAUCVQA.esm.js → chunk-4AKJ6FKE.esm.js} +277 -4
- package/dist/chunk-6HWMJNZT.esm.js +3439 -0
- package/dist/{chunk-VWHHKAHN.esm.js → chunk-FRZOEYBO.esm.js} +4 -4
- package/dist/chunk-JEAUF54A.esm.js +52 -0
- package/dist/{chunk-OISVICYF.esm.js → chunk-P3KDAYX6.esm.js} +1 -1
- package/dist/{chunk-6YVKCVEP.esm.js → chunk-TK2AGIME.esm.js} +1106 -298
- package/dist/{chunk-CFU3YDTV.esm.js → chunk-XCM3V6RK.esm.js} +5 -5
- package/dist/{chunk-5ZKLPWVN.esm.js → chunk-YXZ22OJN.esm.js} +849 -667
- package/dist/index.cjs +6070 -1605
- package/dist/index.d.cts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.esm.js +427 -11
- package/dist/pill-segmented-tabs-Ba5q0feL.d.cts +500 -0
- package/dist/pill-segmented-tabs-Ba5q0feL.d.ts +500 -0
- package/dist/studio.cjs +1333 -998
- package/dist/studio.d.cts +2 -2
- package/dist/studio.d.ts +2 -2
- package/dist/studio.esm.js +5 -5
- package/dist/styles.css +220 -0
- package/dist/ui.cjs +3592 -89
- package/dist/ui.d.cts +72 -96
- package/dist/ui.d.ts +72 -96
- package/dist/ui.esm.js +400 -6
- package/dist/{welcome-COOb05a5.d.cts → welcome-CRqOPKMp.d.cts} +1 -1
- package/dist/{welcome-DE08m9ca.d.ts → welcome-DlHUa3OL.d.ts} +1 -1
- package/package.json +9 -3
- package/dist/chunk-P4SN7M67.esm.js +0 -435
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC, ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { x as TimbalRuntimeProviderProps, r as ThreadProps, C as ChartArtifact } from './chat-DCms8pJ_.cjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -16,6 +16,179 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
16
16
|
*/
|
|
17
17
|
declare const APP_KIT_AGENT_INSTRUCTIONS: string;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* The single source of truth for what generated Timbal UIs are *allowed* to
|
|
21
|
+
* look like — the anti-slop constraint, encoded as data.
|
|
22
|
+
*
|
|
23
|
+
* Both the deterministic linter (`ui-lint.ts`) and the agent prompt
|
|
24
|
+
* (`APP_KIT_AGENT_INSTRUCTIONS`) read from this module, so the rules a model is
|
|
25
|
+
* told and the rules it is checked against can never drift apart.
|
|
26
|
+
*
|
|
27
|
+
* "Slop" = the generic AI-dashboard look: a decorative icon on every tile,
|
|
28
|
+
* loud green/red trend pills, arbitrary palette colors, gratuitous dividers,
|
|
29
|
+
* card-in-card nesting, bold giant numbers. Taste lives here, not in prose.
|
|
30
|
+
*
|
|
31
|
+
* This is a **public, documented** API (exported from the package root and
|
|
32
|
+
* `/app`), in the same tier as the theme generator — not an internal class
|
|
33
|
+
* composite.
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* Semantic color token roots the design system defines (see `styles.css`).
|
|
37
|
+
* Generated code may only reach for colors through these — `bg-background`,
|
|
38
|
+
* `text-muted-foreground`, `border-border`, `text-primary`, `bg-destructive`,
|
|
39
|
+
* the timbal chrome extensions, etc. Anything else is slop.
|
|
40
|
+
*/
|
|
41
|
+
declare const SEMANTIC_COLOR_TOKENS: readonly ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "destructive-foreground", "border", "input", "ring", "sidebar", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring", "elevated-from", "elevated-to", "modal-from", "modal-to", "playground-from", "playground-via", "playground-to", "composer-bg", "composer-border", "composer-border-focus", "bubble-user", "bubble-user-foreground", "code-block-bg", "code-header-bg"];
|
|
42
|
+
type SemanticColorToken = (typeof SEMANTIC_COLOR_TOKENS)[number];
|
|
43
|
+
/**
|
|
44
|
+
* Gradient / fill tokens reserved for **chrome only** (buttons, the elevated
|
|
45
|
+
* surface, the modal shell, the playground backdrop). They must never decorate
|
|
46
|
+
* a data card, a stat tile, or a list — that is the canonical "slop gradient".
|
|
47
|
+
*/
|
|
48
|
+
declare const RESERVED_GRADIENT_TOKENS: readonly ["primary-fill-from", "primary-fill-to", "primary-fill-hover-from", "primary-fill-hover-to", "primary-fill-active-from", "primary-fill-active-to", "secondary-fill-hover-from", "secondary-fill-hover-to", "secondary-fill-active-from", "secondary-fill-active-to", "destructive-fill-hover-from", "destructive-fill-hover-to", "destructive-fill-active-from", "destructive-fill-active-to", "ghost-fill-hover", "ghost-fill-active", "elevated-from", "elevated-to", "modal-from", "modal-to", "playground-from", "playground-via", "playground-to"];
|
|
49
|
+
/**
|
|
50
|
+
* The Tailwind named palette. Any of these followed by a numeric shade
|
|
51
|
+
* (`-50`..`-950`) in a color utility is a hardcoded color — not a token —
|
|
52
|
+
* and is rejected by the linter.
|
|
53
|
+
*/
|
|
54
|
+
declare const TAILWIND_PALETTE_COLORS: readonly ["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"];
|
|
55
|
+
/** Tailwind color-bearing utility prefixes the linter inspects. */
|
|
56
|
+
declare const COLOR_UTILITY_PREFIXES: readonly ["bg", "text", "border", "ring", "from", "via", "to", "fill", "stroke", "decoration", "outline", "shadow", "divide", "accent", "caret"];
|
|
57
|
+
/**
|
|
58
|
+
* Numeric budgets the linter enforces. Tuned for "tasteful dashboard", not
|
|
59
|
+
* "icon confetti". A view that needs more icons than this is almost always
|
|
60
|
+
* decorating instead of communicating.
|
|
61
|
+
*/
|
|
62
|
+
declare const SLOP_BUDGETS: {
|
|
63
|
+
/** Max decorative/standalone icons rendered in a single generated file. */
|
|
64
|
+
readonly maxIconsPerView: 6;
|
|
65
|
+
/** Max consecutive list rows separated by an explicit border/divider before
|
|
66
|
+
* it reads as a "ruled table" — prefer spacing or zebra instead. */
|
|
67
|
+
readonly maxRowDividers: 2;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* House-style rules in plain language. The prompt renders these verbatim and
|
|
71
|
+
* the linter maps each `id` to a check, so the model is told and tested on the
|
|
72
|
+
* exact same list.
|
|
73
|
+
*/
|
|
74
|
+
interface HouseRule {
|
|
75
|
+
id: string;
|
|
76
|
+
/** One-line imperative the agent reads. */
|
|
77
|
+
rule: string;
|
|
78
|
+
/** Why it matters (kept short — models follow rules with rationale better). */
|
|
79
|
+
why: string;
|
|
80
|
+
/** A wrong example (kept to a fragment). */
|
|
81
|
+
slop?: string;
|
|
82
|
+
/** The tasteful equivalent. */
|
|
83
|
+
good?: string;
|
|
84
|
+
}
|
|
85
|
+
declare const HOUSE_RULES: readonly HouseRule[];
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Deterministic anti-slop linter for generated Timbal UI code.
|
|
89
|
+
*
|
|
90
|
+
* Runs a dependency-free line scan over a `.tsx` string and flags the patterns
|
|
91
|
+
* that turn a clean dashboard into generic AI slop: hardcoded colors, icon
|
|
92
|
+
* spam, bold giant numbers, divider-per-row lists, gradients on data cards.
|
|
93
|
+
*
|
|
94
|
+
* It intentionally avoids a full AST/parser dependency — the checks are
|
|
95
|
+
* line/regex heuristics tuned for high precision on the patterns that actually
|
|
96
|
+
* recur in generated output. Feed `formatLintReport(findings)` back to the
|
|
97
|
+
* generating agent (see `reviewGeneratedUi`) so it can self-correct.
|
|
98
|
+
*
|
|
99
|
+
* Public, documented API — exported from the package root and `/app`.
|
|
100
|
+
*/
|
|
101
|
+
type LintSeverity = "error" | "warn";
|
|
102
|
+
interface LintFinding {
|
|
103
|
+
/** Stable rule id (maps to a HouseRule where applicable). */
|
|
104
|
+
rule: string;
|
|
105
|
+
severity: LintSeverity;
|
|
106
|
+
/** 1-based line number in the supplied source. */
|
|
107
|
+
line: number;
|
|
108
|
+
/** Human-readable explanation + fix. */
|
|
109
|
+
message: string;
|
|
110
|
+
/** The offending source fragment (trimmed). */
|
|
111
|
+
snippet: string;
|
|
112
|
+
}
|
|
113
|
+
interface LintResult {
|
|
114
|
+
findings: LintFinding[];
|
|
115
|
+
errorCount: number;
|
|
116
|
+
warnCount: number;
|
|
117
|
+
/** True when there are no `error`-severity findings. */
|
|
118
|
+
ok: boolean;
|
|
119
|
+
}
|
|
120
|
+
interface LintOptions {
|
|
121
|
+
/** Max standalone icons before `icon-spam` fires. Defaults to the budget. */
|
|
122
|
+
maxIconsPerView?: number;
|
|
123
|
+
/** Max bordered list rows before `row-divider` fires. Defaults to the budget. */
|
|
124
|
+
maxRowDividers?: number;
|
|
125
|
+
/** Treat warnings as errors (so `ok` reflects them too). */
|
|
126
|
+
strict?: boolean;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Lint a single generated `.tsx` (or fragment) string for slop.
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```ts
|
|
133
|
+
* const { ok, findings } = lintGeneratedUi(generatedTsx);
|
|
134
|
+
* if (!ok) sendBackToAgent(formatLintReport(findings));
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
declare function lintGeneratedUi(source: string, options?: LintOptions): LintResult;
|
|
138
|
+
/**
|
|
139
|
+
* Render lint findings as a compact, agent- and human-readable report.
|
|
140
|
+
* Empty string when there are no findings.
|
|
141
|
+
*/
|
|
142
|
+
declare function formatLintReport(findings: LintFinding[]): string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Layer 4 of the anti-slop system: the critique loop.
|
|
146
|
+
*
|
|
147
|
+
* `reviewGeneratedUi` runs the deterministic linter (Layer 2) and packages the
|
|
148
|
+
* result into something a generating agent can act on in one round-trip — a
|
|
149
|
+
* pass/fail verdict plus a ready-to-send revision prompt that names the exact
|
|
150
|
+
* lines and fixes. The system prompt string (`UI_REVIEW_AGENT_INSTRUCTIONS`)
|
|
151
|
+
* teaches the model to self-review *before* it returns code, so the loop is
|
|
152
|
+
* usually closed without a second model call.
|
|
153
|
+
*
|
|
154
|
+
* Public, documented API — exported from the package root and `/app`.
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
interface ReviewResult {
|
|
158
|
+
/** Raw linter output. */
|
|
159
|
+
lint: LintResult;
|
|
160
|
+
/** True when no blocking (error-severity, or any warning in strict mode) findings remain. */
|
|
161
|
+
passed: boolean;
|
|
162
|
+
/** Compact human/agent-readable report ("" when clean). */
|
|
163
|
+
report: string;
|
|
164
|
+
/**
|
|
165
|
+
* A ready-to-send follow-up prompt instructing the agent to fix the findings,
|
|
166
|
+
* or `null` when the UI passed. Send this back to the model and re-run
|
|
167
|
+
* `reviewGeneratedUi` on its next output until `passed` is true.
|
|
168
|
+
*/
|
|
169
|
+
revisionPrompt: string | null;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Review a generated `.tsx` string for slop and produce an actionable verdict.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```ts
|
|
176
|
+
* let code = await generate(userPrompt);
|
|
177
|
+
* for (let i = 0; i < 2; i++) {
|
|
178
|
+
* const review = reviewGeneratedUi(code, { strict: true });
|
|
179
|
+
* if (review.passed) break;
|
|
180
|
+
* code = await generate(review.revisionPrompt!); // agent fixes named issues
|
|
181
|
+
* }
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
declare function reviewGeneratedUi(source: string, options?: LintOptions): ReviewResult;
|
|
185
|
+
/**
|
|
186
|
+
* Append to a UI-generation agent's system prompt so it self-reviews before
|
|
187
|
+
* returning code. Pairs with `APP_KIT_AGENT_INSTRUCTIONS` and
|
|
188
|
+
* `THEME_AGENT_INSTRUCTIONS`.
|
|
189
|
+
*/
|
|
190
|
+
declare const UI_REVIEW_AGENT_INSTRUCTIONS: string;
|
|
191
|
+
|
|
19
192
|
/**
|
|
20
193
|
* Theme generator — turn brand *intent* into a complete, paired light + dark
|
|
21
194
|
* token set, so agents and apps never hand-author `oklch(...)` or risk a
|
|
@@ -264,6 +437,11 @@ interface AppShellProps {
|
|
|
264
437
|
chatTriggerLabel?: string;
|
|
265
438
|
/** Hide the built-in floating trigger (use your own + `useAppShellChat`). */
|
|
266
439
|
hideChatTrigger?: boolean;
|
|
440
|
+
/** Controlled mobile-nav drawer open state. */
|
|
441
|
+
navOpen?: boolean;
|
|
442
|
+
/** Uncontrolled initial mobile-nav open state. Default: `false`. */
|
|
443
|
+
defaultNavOpen?: boolean;
|
|
444
|
+
onNavOpenChange?: (open: boolean) => void;
|
|
267
445
|
className?: string;
|
|
268
446
|
mainClassName?: string;
|
|
269
447
|
}
|
|
@@ -307,6 +485,38 @@ interface AppShellChatControls {
|
|
|
307
485
|
}
|
|
308
486
|
declare function useAppShellChat(): AppShellChatControls | null;
|
|
309
487
|
|
|
488
|
+
interface AppShellNavControls {
|
|
489
|
+
/** Mobile nav drawer open state. */
|
|
490
|
+
open: boolean;
|
|
491
|
+
setOpen: (open: boolean) => void;
|
|
492
|
+
toggle: () => void;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Read the `AppShell`-owned mobile nav controls. Use to wire `StudioSidebar`'s
|
|
496
|
+
* `mobileOpen` / `onMobileOpenChange` (and any custom trigger) without
|
|
497
|
+
* re-implementing the open-state + resize boilerplate:
|
|
498
|
+
*
|
|
499
|
+
* ```tsx
|
|
500
|
+
* const nav = useAppShellNav();
|
|
501
|
+
* <StudioSidebar mobileOpen={nav.open} onMobileOpenChange={nav.setOpen} … />
|
|
502
|
+
* ```
|
|
503
|
+
*
|
|
504
|
+
* Returns a no-op fallback when used outside `AppShell`, so it's always safe to call.
|
|
505
|
+
*/
|
|
506
|
+
declare function useAppShellNav(): AppShellNavControls;
|
|
507
|
+
|
|
508
|
+
interface AppShellSidebarTriggerProps {
|
|
509
|
+
/** Accessible label. Default: "Open navigation". */
|
|
510
|
+
label?: string;
|
|
511
|
+
className?: string;
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Hamburger that opens the `AppShell` mobile nav drawer. Hidden on `md+`
|
|
515
|
+
* (the sidebar is persistent there). Drop it in `AppShellTopbar`'s `start`
|
|
516
|
+
* slot — it reads the shell nav controls, so no wiring is needed.
|
|
517
|
+
*/
|
|
518
|
+
declare const AppShellSidebarTrigger: FC<AppShellSidebarTriggerProps>;
|
|
519
|
+
|
|
310
520
|
interface PageHeaderProps {
|
|
311
521
|
title: ReactNode;
|
|
312
522
|
description?: ReactNode;
|
|
@@ -376,6 +586,7 @@ declare const statusBadgeToneClass: {
|
|
|
376
586
|
readonly primary: "bg-primary/10 text-primary";
|
|
377
587
|
readonly success: "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400";
|
|
378
588
|
readonly warn: "bg-amber-500/10 text-amber-600 dark:text-amber-400";
|
|
589
|
+
readonly danger: "bg-destructive/10 text-destructive";
|
|
379
590
|
readonly muted: "bg-muted/80 text-muted-foreground";
|
|
380
591
|
};
|
|
381
592
|
type StatusBadgeTone = keyof typeof statusBadgeToneClass;
|
|
@@ -664,13 +875,15 @@ interface SubNavProps {
|
|
|
664
875
|
*/
|
|
665
876
|
declare const SubNav: FC<SubNavProps>;
|
|
666
877
|
|
|
667
|
-
interface
|
|
878
|
+
interface BreadcrumbEntry {
|
|
668
879
|
label: ReactNode;
|
|
669
880
|
href?: string;
|
|
670
881
|
onClick?: () => void;
|
|
671
882
|
}
|
|
883
|
+
/** @deprecated Use `BreadcrumbEntry` — avoids clashing with the UI `BreadcrumbItem` primitive. */
|
|
884
|
+
type BreadcrumbItem = BreadcrumbEntry;
|
|
672
885
|
interface BreadcrumbsProps {
|
|
673
|
-
items:
|
|
886
|
+
items: BreadcrumbEntry[];
|
|
674
887
|
className?: string;
|
|
675
888
|
}
|
|
676
889
|
declare const Breadcrumbs: FC<BreadcrumbsProps>;
|
|
@@ -734,6 +947,15 @@ interface FilterBarProps {
|
|
|
734
947
|
}
|
|
735
948
|
declare const FilterBar: FC<FilterBarProps>;
|
|
736
949
|
|
|
950
|
+
interface FilterFieldProps {
|
|
951
|
+
/** Visible label above the control. Omit for unlabeled fields (e.g. search). */
|
|
952
|
+
label?: ReactNode;
|
|
953
|
+
children: ReactNode;
|
|
954
|
+
className?: string;
|
|
955
|
+
}
|
|
956
|
+
/** Single filter control with an optional label — use inside `FilterBar`. */
|
|
957
|
+
declare const FilterField: FC<FilterFieldProps>;
|
|
958
|
+
|
|
737
959
|
type DataTableSortDirection = "asc" | "desc";
|
|
738
960
|
interface DataTableSort {
|
|
739
961
|
columnId: string;
|
|
@@ -769,8 +991,35 @@ interface DataTableProps<T> {
|
|
|
769
991
|
stickyHeader?: boolean;
|
|
770
992
|
dense?: boolean;
|
|
771
993
|
caption?: string;
|
|
994
|
+
/**
|
|
995
|
+
* Render shaped skeleton rows instead of data — for async loads. Keeps the
|
|
996
|
+
* header and chrome so the table doesn't jump when data arrives.
|
|
997
|
+
*/
|
|
998
|
+
loading?: boolean;
|
|
999
|
+
/** Skeleton row count while `loading`. Default: `pageSize ?? 5`. */
|
|
1000
|
+
loadingRows?: number;
|
|
1001
|
+
/**
|
|
1002
|
+
* Enable a leading checkbox column for multi-row selection (bulk actions).
|
|
1003
|
+
* Controlled via `selectedKeys` + `onSelectionChange`, or uncontrolled with
|
|
1004
|
+
* `defaultSelectedKeys`. Keys are produced by `getRowKey`.
|
|
1005
|
+
*/
|
|
1006
|
+
selectable?: boolean;
|
|
1007
|
+
selectedKeys?: string[];
|
|
1008
|
+
defaultSelectedKeys?: string[];
|
|
1009
|
+
onSelectionChange?: (keys: string[]) => void;
|
|
1010
|
+
/** Accessible label for the select-all checkbox. Default: "Select all rows". */
|
|
1011
|
+
selectAllAriaLabel?: string;
|
|
1012
|
+
/**
|
|
1013
|
+
* Rows per page. When set, the table paginates client-side and renders a
|
|
1014
|
+
* pager in the footer. Omit for a single, unpaginated list.
|
|
1015
|
+
*/
|
|
1016
|
+
pageSize?: number;
|
|
1017
|
+
/** Controlled current page (0-based). */
|
|
1018
|
+
pageIndex?: number;
|
|
1019
|
+
defaultPageIndex?: number;
|
|
1020
|
+
onPageChange?: (pageIndex: number) => void;
|
|
772
1021
|
}
|
|
773
|
-
declare function DataTable<T>({ columns, rows, getRowKey, emptyTitle, emptyDescription, emptyMode, className, sort: sortProp, defaultSort, onSortChange, showRowCount, rowCountLabel, footer, onRowClick, stickyHeader, dense, caption, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1022
|
+
declare function DataTable<T>({ columns, rows, getRowKey, emptyTitle, emptyDescription, emptyMode, className, sort: sortProp, defaultSort, onSortChange, showRowCount, rowCountLabel, footer, onRowClick, stickyHeader, dense, caption, loading, loadingRows, selectable, selectedKeys: selectedKeysProp, defaultSelectedKeys, onSelectionChange, selectAllAriaLabel, pageSize, pageIndex: pageIndexProp, defaultPageIndex, onPageChange, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
774
1023
|
|
|
775
1024
|
interface ChartPanelProps {
|
|
776
1025
|
title?: ReactNode;
|
|
@@ -781,6 +1030,8 @@ interface ChartPanelProps {
|
|
|
781
1030
|
actions?: ReactNode;
|
|
782
1031
|
/** Plot height in px. Default 300 (same as `MetricChartCard`). */
|
|
783
1032
|
height?: number;
|
|
1033
|
+
/** Render a skeleton at the plot height while data loads. */
|
|
1034
|
+
loading?: boolean;
|
|
784
1035
|
className?: string;
|
|
785
1036
|
}
|
|
786
1037
|
/**
|
|
@@ -837,6 +1088,8 @@ interface MetricRowProps extends MetricCardHeaderProps {
|
|
|
837
1088
|
onMetricChange?: (id: string) => void;
|
|
838
1089
|
/** Accessible name for the KPI tile group (when tiles are selectable). */
|
|
839
1090
|
metricsAriaLabel?: string;
|
|
1091
|
+
/** Render skeleton tiles while metrics load. Falls back to `metrics.length || 4`. */
|
|
1092
|
+
loading?: boolean;
|
|
840
1093
|
className?: string;
|
|
841
1094
|
}
|
|
842
1095
|
/**
|
|
@@ -845,8 +1098,15 @@ interface MetricRowProps extends MetricCardHeaderProps {
|
|
|
845
1098
|
*/
|
|
846
1099
|
declare const MetricRow: FC<MetricRowProps>;
|
|
847
1100
|
|
|
848
|
-
/**
|
|
849
|
-
|
|
1101
|
+
/** Curve interpolation styles, mirroring recharts/shadcn `type`. */
|
|
1102
|
+
type CurveType = "monotone" | "linear" | "step";
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* Theme-aware default series palette. Each entry reads a `--chart-N` token
|
|
1106
|
+
* (defined in `styles.css`, overridable per host app) with a literal fallback,
|
|
1107
|
+
* so charts rebrand automatically when the theme changes.
|
|
1108
|
+
*/
|
|
1109
|
+
declare const CHART_PALETTE: readonly ["var(--chart-1, #6366f1)", "var(--chart-2, #10b981)", "var(--chart-3, #f59e0b)", "var(--chart-4, #a855f7)", "var(--chart-5, #ef4444)", "var(--chart-6, #06b6d4)"];
|
|
850
1110
|
interface ChartSeries {
|
|
851
1111
|
dataKey: string;
|
|
852
1112
|
label?: string;
|
|
@@ -856,6 +1116,8 @@ interface ChartSeries {
|
|
|
856
1116
|
type ChartVariant = "area" | "line" | "bar";
|
|
857
1117
|
/** `flush` — plot edge-to-edge (no side/bottom inset); axes/legend off by default. */
|
|
858
1118
|
type ChartLayout = "default" | "flush";
|
|
1119
|
+
/** Tooltip series marker, mirroring shadcn's `ChartTooltipContent` indicators. */
|
|
1120
|
+
type ChartTooltipIndicator = "dot" | "line" | "dashed";
|
|
859
1121
|
interface LineAreaChartProps {
|
|
860
1122
|
data: Array<Record<string, unknown>>;
|
|
861
1123
|
/** Category / x-axis key. Inferred from the first non-numeric field if omitted. */
|
|
@@ -869,7 +1131,19 @@ interface LineAreaChartProps {
|
|
|
869
1131
|
unit?: string;
|
|
870
1132
|
/** Fix the y-domain max (e.g. 100 for percentages). */
|
|
871
1133
|
yMax?: number;
|
|
872
|
-
/**
|
|
1134
|
+
/** Line / area interpolation. Default `monotone`. */
|
|
1135
|
+
curve?: CurveType;
|
|
1136
|
+
/** Stack series on top of each other (area + bar). Default false. */
|
|
1137
|
+
stacked?: boolean;
|
|
1138
|
+
/** Draw point markers on line/area series. */
|
|
1139
|
+
dots?: boolean | "active";
|
|
1140
|
+
/** Bar orientation. `horizontal` swaps category to the y-axis. Default `vertical`. */
|
|
1141
|
+
orientation?: "vertical" | "horizontal";
|
|
1142
|
+
/** Corner radius for bars. Default 4. */
|
|
1143
|
+
barRadius?: number;
|
|
1144
|
+
/** Grid line direction. Default `horizontal`. */
|
|
1145
|
+
gridLines?: "horizontal" | "vertical" | "both" | "none";
|
|
1146
|
+
/** `flush` fills the container width/height and hides axes/legend by default. */
|
|
873
1147
|
layout?: ChartLayout;
|
|
874
1148
|
showGrid?: boolean;
|
|
875
1149
|
showXAxis?: boolean;
|
|
@@ -877,6 +1151,8 @@ interface LineAreaChartProps {
|
|
|
877
1151
|
/** Series legend below the plot. Default: on when `layout` is `default` and multiple series. */
|
|
878
1152
|
showLegend?: boolean;
|
|
879
1153
|
showTooltip?: boolean;
|
|
1154
|
+
/** Tooltip series marker style. Default `dot`. */
|
|
1155
|
+
tooltipIndicator?: ChartTooltipIndicator;
|
|
880
1156
|
formatValue?: (value: number) => string;
|
|
881
1157
|
formatX?: (raw: unknown, index: number) => string;
|
|
882
1158
|
className?: string;
|
|
@@ -884,9 +1160,10 @@ interface LineAreaChartProps {
|
|
|
884
1160
|
ariaLabel?: string;
|
|
885
1161
|
}
|
|
886
1162
|
/**
|
|
887
|
-
*
|
|
888
|
-
*
|
|
889
|
-
*
|
|
1163
|
+
* shadcn-style chart built on recharts. A single component renders line, area,
|
|
1164
|
+
* and bar charts (vertical or horizontal), with stacking, curve interpolation,
|
|
1165
|
+
* dots, grid control, and the shared `ChartTooltipContent` / `ChartLegendContent`
|
|
1166
|
+
* chrome. Series colors flow from the theme `--chart-N` tokens via `ChartConfig`.
|
|
890
1167
|
*/
|
|
891
1168
|
declare const LineAreaChart: FC<LineAreaChartProps>;
|
|
892
1169
|
|
|
@@ -925,6 +1202,8 @@ interface MetricChartCardProps {
|
|
|
925
1202
|
emptyLabel?: ReactNode;
|
|
926
1203
|
/** Accessible name for the selectable KPI tile group. */
|
|
927
1204
|
metricsAriaLabel?: string;
|
|
1205
|
+
/** Render skeleton tiles + chart while data loads. */
|
|
1206
|
+
loading?: boolean;
|
|
928
1207
|
className?: string;
|
|
929
1208
|
}
|
|
930
1209
|
/**
|
|
@@ -933,6 +1212,142 @@ interface MetricChartCardProps {
|
|
|
933
1212
|
*/
|
|
934
1213
|
declare const MetricChartCard: FC<MetricChartCardProps>;
|
|
935
1214
|
|
|
1215
|
+
/**
|
|
1216
|
+
* Run `callback` every `delayMs`. Pass `null` to pause (the timer is torn down
|
|
1217
|
+
* and restarted when the delay changes). The latest `callback` is always used,
|
|
1218
|
+
* so you can pass an inline function without resetting the interval.
|
|
1219
|
+
*/
|
|
1220
|
+
declare function useInterval(callback: () => void, delayMs: number | null): void;
|
|
1221
|
+
interface UseLiveQueryOptions {
|
|
1222
|
+
/** Poll interval in ms. Omit / `null` for a one-shot fetch (no polling). */
|
|
1223
|
+
intervalMs?: number | null;
|
|
1224
|
+
/** Pause fetching + polling entirely. Default: `true`. */
|
|
1225
|
+
enabled?: boolean;
|
|
1226
|
+
/** Fetch immediately on mount (vs. waiting one interval). Default: `true`. */
|
|
1227
|
+
immediate?: boolean;
|
|
1228
|
+
/**
|
|
1229
|
+
* Pause polling while the tab is hidden and refetch on focus — avoids
|
|
1230
|
+
* burning requests on a backgrounded dashboard. Default: `true`.
|
|
1231
|
+
*/
|
|
1232
|
+
refetchOnFocus?: boolean;
|
|
1233
|
+
}
|
|
1234
|
+
interface UseLiveQueryResult<T> {
|
|
1235
|
+
data: T | undefined;
|
|
1236
|
+
error: unknown;
|
|
1237
|
+
/** True until the first response settles. */
|
|
1238
|
+
loading: boolean;
|
|
1239
|
+
/** True during background refreshes (data already present). */
|
|
1240
|
+
refreshing: boolean;
|
|
1241
|
+
/** Timestamp (ms) of the last successful fetch, or null. */
|
|
1242
|
+
lastUpdated: number | null;
|
|
1243
|
+
/** Manually trigger a refetch (e.g. a "Refresh" button). */
|
|
1244
|
+
refetch: () => void;
|
|
1245
|
+
}
|
|
1246
|
+
/**
|
|
1247
|
+
* Poll an async source on an interval for live dashboards (alerts, metrics,
|
|
1248
|
+
* logs). Handles loading/refreshing/error state, ignores out-of-order and
|
|
1249
|
+
* post-unmount responses, pauses while the tab is hidden, and exposes a manual
|
|
1250
|
+
* `refetch`. Pair with `authFetch` for `/api/*` calls.
|
|
1251
|
+
*
|
|
1252
|
+
* ```ts
|
|
1253
|
+
* const { data, loading, refetch } = useLiveQuery(
|
|
1254
|
+
* () => authFetch("/api/alerts").then((r) => r.json()),
|
|
1255
|
+
* { intervalMs: 15_000 },
|
|
1256
|
+
* );
|
|
1257
|
+
* ```
|
|
1258
|
+
*
|
|
1259
|
+
* `fetcher` is read through a ref, so an inline arrow doesn't reset polling;
|
|
1260
|
+
* change `intervalMs` / `enabled` to control the cadence.
|
|
1261
|
+
*/
|
|
1262
|
+
declare function useLiveQuery<T>(fetcher: () => Promise<T>, options?: UseLiveQueryOptions): UseLiveQueryResult<T>;
|
|
1263
|
+
|
|
1264
|
+
interface PieChartProps {
|
|
1265
|
+
data: Array<Record<string, unknown>>;
|
|
1266
|
+
/** Category / label key. Inferred from the first non-numeric field if omitted. */
|
|
1267
|
+
nameKey?: string;
|
|
1268
|
+
/** Value key. Default "value". */
|
|
1269
|
+
dataKey?: string;
|
|
1270
|
+
/** Donut hole radius as a fraction of the outer radius (0 = full pie). Default 0. */
|
|
1271
|
+
innerRadius?: number;
|
|
1272
|
+
/** Per-slice colors. Defaults to the theme palette. */
|
|
1273
|
+
colors?: string[];
|
|
1274
|
+
/** Plot height in px. Default 260. */
|
|
1275
|
+
height?: number;
|
|
1276
|
+
/** Show the slice legend below the chart. Default true. */
|
|
1277
|
+
showLegend?: boolean;
|
|
1278
|
+
/** Show value labels on each slice. Default false. */
|
|
1279
|
+
showLabels?: boolean;
|
|
1280
|
+
showTooltip?: boolean;
|
|
1281
|
+
tooltipIndicator?: ChartTooltipIndicator;
|
|
1282
|
+
/** Big number drawn in the donut hole (e.g. the total). Requires `innerRadius > 0`. */
|
|
1283
|
+
centerValue?: ReactNode;
|
|
1284
|
+
/** Caption under `centerValue`. */
|
|
1285
|
+
centerLabel?: ReactNode;
|
|
1286
|
+
unit?: string;
|
|
1287
|
+
formatValue?: (value: number) => string;
|
|
1288
|
+
className?: string;
|
|
1289
|
+
ariaLabel?: string;
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* Pie / donut chart on recharts. Pass `innerRadius` (0–1 fraction) for a donut
|
|
1293
|
+
* and `centerValue` / `centerLabel` to fill the hole with a KPI. Slice colors
|
|
1294
|
+
* come from the theme `--chart-N` palette (or `colors`).
|
|
1295
|
+
*/
|
|
1296
|
+
declare const PieChart: FC<PieChartProps>;
|
|
1297
|
+
|
|
1298
|
+
interface RadialChartProps {
|
|
1299
|
+
data: Array<Record<string, unknown>>;
|
|
1300
|
+
/** Category / label key. Inferred from the first non-numeric field if omitted. */
|
|
1301
|
+
nameKey?: string;
|
|
1302
|
+
/** Value key. Default "value". */
|
|
1303
|
+
dataKey?: string;
|
|
1304
|
+
/** Value that maps to a full ring. Default: the data max (so the largest fills). */
|
|
1305
|
+
maxValue?: number;
|
|
1306
|
+
/** Per-arc colors. Defaults to the theme palette. */
|
|
1307
|
+
colors?: string[];
|
|
1308
|
+
height?: number;
|
|
1309
|
+
/** Thickness of each ring in px. Default 16. */
|
|
1310
|
+
ringWidth?: number;
|
|
1311
|
+
/** Gap between rings in px. Default 4. */
|
|
1312
|
+
ringGap?: number;
|
|
1313
|
+
showLegend?: boolean;
|
|
1314
|
+
/** Big number drawn in the center (e.g. a total or the single value). */
|
|
1315
|
+
centerValue?: ReactNode;
|
|
1316
|
+
centerLabel?: ReactNode;
|
|
1317
|
+
className?: string;
|
|
1318
|
+
ariaLabel?: string;
|
|
1319
|
+
}
|
|
1320
|
+
/**
|
|
1321
|
+
* Radial (progress ring) chart on recharts — one concentric ring per data
|
|
1322
|
+
* point, each filled proportional to its value against `maxValue`. Pass
|
|
1323
|
+
* `centerValue` / `centerLabel` to fill the middle. Theme-driven colors.
|
|
1324
|
+
*/
|
|
1325
|
+
declare const RadialChart: FC<RadialChartProps>;
|
|
1326
|
+
|
|
1327
|
+
interface RadarChartProps {
|
|
1328
|
+
data: Array<Record<string, unknown>>;
|
|
1329
|
+
/** Axis (category) key. Inferred from the first non-numeric field if omitted. */
|
|
1330
|
+
nameKey?: string;
|
|
1331
|
+
/** Series to plot. Strings are shorthand for `{ dataKey }`. Inferred if omitted. */
|
|
1332
|
+
series?: Array<ChartSeries | string>;
|
|
1333
|
+
/** Value at the outer edge. Default: the data max. */
|
|
1334
|
+
maxValue?: number;
|
|
1335
|
+
/** Number of concentric grid rings. Default 4. */
|
|
1336
|
+
rings?: number;
|
|
1337
|
+
height?: number;
|
|
1338
|
+
showLegend?: boolean;
|
|
1339
|
+
/** Fill the series polygons with a soft tint. Default true. */
|
|
1340
|
+
fill?: boolean;
|
|
1341
|
+
className?: string;
|
|
1342
|
+
ariaLabel?: string;
|
|
1343
|
+
}
|
|
1344
|
+
/**
|
|
1345
|
+
* Radar (spider) chart on recharts — one axis per data point, one polygon per
|
|
1346
|
+
* series. Theme-driven colors. Good for comparing a handful of metrics across
|
|
1347
|
+
* two or three entities.
|
|
1348
|
+
*/
|
|
1349
|
+
declare const RadarChart: FC<RadarChartProps>;
|
|
1350
|
+
|
|
936
1351
|
interface SparklineProps {
|
|
937
1352
|
/** Numeric values, or objects from which `dataKey` is read. */
|
|
938
1353
|
data: Array<number | Record<string, unknown>>;
|
|
@@ -960,10 +1375,11 @@ interface ChartArtifactViewProps {
|
|
|
960
1375
|
height?: number;
|
|
961
1376
|
}
|
|
962
1377
|
/**
|
|
963
|
-
* Renders a `chart` artifact.
|
|
964
|
-
*
|
|
965
|
-
*
|
|
1378
|
+
* Renders a `chart` artifact. Cartesian kinds (bar / horizontalBar / line /
|
|
1379
|
+
* area, including stacked) go through the shared `LineAreaChart` engine; pie,
|
|
1380
|
+
* donut, radial, and radar use their dedicated recharts components. All
|
|
1381
|
+
* inherit the theme `--chart-N` palette.
|
|
966
1382
|
*/
|
|
967
1383
|
declare const ChartArtifactView: FC<ChartArtifactViewProps>;
|
|
968
1384
|
|
|
969
|
-
export {
|
|
1385
|
+
export { type FieldInputProps as $, APP_KIT_AGENT_INSTRUCTIONS as A, type BreadcrumbEntry as B, CHART_PALETTE as C, type ChartTooltipIndicator as D, type ChartVariant as E, ConnectionRow as F, ConnectionRowList as G, type ConnectionRowListProps as H, type ConnectionRowProps as I, DangerZone as J, DangerZoneAction as K, type DangerZoneActionProps as L, type DangerZoneProps as M, DataTable as N, type DataTableColumn as O, type DataTableProps as P, type DataTableSort as Q, type DataTableSortDirection as R, type DescriptionItem as S, DescriptionList as T, type DescriptionListProps as U, EmptyState as V, type EmptyStateProps as W, ExpandableSection as X, type ExpandableSectionProps as Y, Field as Z, FieldInput as _, AppChatPanel as a, Section as a$, type FieldProps as a0, FieldRow as a1, type FieldRowProps as a2, FieldSelect as a3, type FieldSelectProps as a4, FieldSwitch as a5, type FieldSwitchProps as a6, FieldTextarea as a7, type FieldTextareaProps as a8, FilterBar as a9, type MetricChartMetric as aA, MetricRow as aB, type MetricRowItem as aC, type MetricRowProps as aD, MetricTile as aE, type MetricTileProps as aF, Page as aG, PageHeader as aH, type PageHeaderProps as aI, type PageProps as aJ, PieChart as aK, type PieChartProps as aL, PlanBadge as aM, type PlanBadgeProps as aN, type PlanBadgeTone as aO, RESERVED_GRADIENT_TOKENS as aP, RadarChart as aQ, type RadarChartProps as aR, RadialChart as aS, type RadialChartProps as aT, ResourceCard as aU, type ResourceCardProps as aV, type ReviewResult as aW, SEMANTIC_COLOR_TOKENS as aX, SLOP_BUDGETS as aY, SearchInput as aZ, type SearchInputProps as a_, type FilterBarProps as aa, FilterField as ab, type FilterFieldProps as ac, FloatingUnsavedChangesBar as ad, type FloatingUnsavedChangesBarProps as ae, FormSection as af, type FormSectionProps as ag, HOUSE_RULES as ah, type HouseRule as ai, INTEGRATION_CATALOG_CARD_HEIGHT_CLASS as aj, InfoCard as ak, type InfoCardProps as al, type InfoCardTone as am, IntegrationCard as an, type IntegrationCardProps as ao, type IntegrationCardStatus as ap, IntegrationsEmptyState as aq, type IntegrationsEmptyStateProps as ar, LineAreaChart as as, type LineAreaChartProps as at, type LintFinding as au, type LintOptions as av, type LintResult as aw, type LintSeverity as ax, MetricChartCard as ay, type MetricChartCardProps as az, type AppChatPanelProps as b, type SectionProps as b0, type SemanticColorToken as b1, SettingsSection as b2, SettingsSectionHeader as b3, type SettingsSectionHeaderProps as b4, type SettingsSectionProps as b5, Sparkline as b6, type SparklineProps as b7, StatTile as b8, type StatTileProps as b9, UI_REVIEW_AGENT_INSTRUCTIONS as bA, type UseLiveQueryOptions as bB, type UseLiveQueryResult as bC, applyThemePreset as bD, applyTimbalTheme as bE, clearTimbalTheme as bF, connectionRowListClass as bG, createTimbalTheme as bH, ensureThemeFontLink as bI, formatLintReport as bJ, getStoredThemePreset as bK, getThemePreset as bL, lintGeneratedUi as bM, reviewGeneratedUi as bN, themeToCss as bO, useAppCopilotContext as bP, useAppShellChat as bQ, useAppShellNav as bR, useInterval as bS, useLiveQuery as bT, StatusBadge as ba, type StatusBadgeProps as bb, type StatusBadgeTone as bc, StatusDot as bd, type StatusDotProps as be, type StatusDotTone as bf, SubNav as bg, type SubNavItem as bh, type SubNavProps as bi, SurfaceCard as bj, type SurfaceCardProps as bk, TAILWIND_PALETTE_COLORS as bl, THEME_AGENT_INSTRUCTIONS as bm, TIMBAL_THEME_PRESETS as bn, ThemePresetGallery as bo, type ThemePresetGalleryProps as bp, type ThemeShadow as bq, type ThemeToCssOptions as br, type ThemeTokenMap as bs, type TimbalThemeIntent as bt, type TimbalThemePreset as bu, type TimbalThemePresetId as bv, TimbalThemeStyle as bw, type TimbalThemeStyleProps as bx, type TimbalThemeTokens as by, type TimbalThemeTypography as bz, AppConfirmDialog as c, type AppConfirmDialogProps as d, type AppCopilotContextValue as e, AppCopilotProvider as f, type AppCopilotProviderProps as g, AppShell as h, type AppShellChatControls as i, AppShellChatTrigger as j, type AppShellChatTriggerProps as k, type AppShellNavControls as l, type AppShellProps as m, AppShellSidebarTrigger as n, type AppShellSidebarTriggerProps as o, AppShellTopbar as p, type AppShellTopbarProps as q, type BreadcrumbItem as r, Breadcrumbs as s, type BreadcrumbsProps as t, COLOR_UTILITY_PREFIXES as u, ChartArtifactView as v, type ChartLayout as w, ChartPanel as x, type ChartPanelProps as y, type ChartSeries as z };
|
|
@@ -204,19 +204,46 @@ declare function isUiBinding(value: unknown): value is {
|
|
|
204
204
|
$bind: string;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
+
/** Per-series presentation config (shadcn `ChartConfig` analog). */
|
|
208
|
+
interface ChartSeriesConfig {
|
|
209
|
+
dataKey: string;
|
|
210
|
+
/** Legend / tooltip label. Defaults to `dataKey`. */
|
|
211
|
+
label?: string;
|
|
212
|
+
/** CSS color (token or literal). Defaults to the theme `--chart-N` palette. */
|
|
213
|
+
color?: string;
|
|
214
|
+
}
|
|
207
215
|
interface ChartArtifact {
|
|
208
216
|
type: "chart";
|
|
209
|
-
/** Chart kind.
|
|
210
|
-
chartType?: "bar" | "line" | "area" | "pie";
|
|
217
|
+
/** Chart kind. Cartesian kinds share one SVG engine; pie/donut/radial/radar are radial. */
|
|
218
|
+
chartType?: "bar" | "horizontalBar" | "line" | "area" | "pie" | "donut" | "radial" | "radar";
|
|
211
219
|
/** Optional title rendered above the chart. */
|
|
212
220
|
title?: string;
|
|
221
|
+
/** Optional sub-title / caption rendered under the title. */
|
|
222
|
+
description?: string;
|
|
213
223
|
/** Array of data points. Keys map to series via `dataKey` / `xKey`. */
|
|
214
224
|
data: Array<Record<string, unknown>>;
|
|
215
225
|
/** Field name on each data point used for the X axis / category. */
|
|
216
226
|
xKey?: string;
|
|
217
227
|
/** Field name(s) used for series. Defaults to all keys except `xKey`. */
|
|
218
228
|
dataKey?: string | string[];
|
|
219
|
-
/**
|
|
229
|
+
/**
|
|
230
|
+
* Rich per-series config (labels + colors). Takes precedence over `dataKey`.
|
|
231
|
+
* Mirrors shadcn's `ChartConfig`.
|
|
232
|
+
*/
|
|
233
|
+
series?: ChartSeriesConfig[];
|
|
234
|
+
/** Stack bar / area series on top of each other. */
|
|
235
|
+
stacked?: boolean;
|
|
236
|
+
/** Line / area interpolation. Default `monotone`. */
|
|
237
|
+
curve?: "monotone" | "linear" | "step";
|
|
238
|
+
/** Draw point markers on line / area series. */
|
|
239
|
+
dots?: boolean;
|
|
240
|
+
/** Tooltip series marker style. Default `dot`. */
|
|
241
|
+
tooltipIndicator?: "dot" | "line" | "dashed";
|
|
242
|
+
/** Show the series legend. */
|
|
243
|
+
legend?: boolean;
|
|
244
|
+
/** Per-slice / per-ring colors for pie / donut / radial. */
|
|
245
|
+
colors?: string[];
|
|
246
|
+
/** Optional unit label appended to numeric axis ticks and tooltip values. */
|
|
220
247
|
unit?: string;
|
|
221
248
|
}
|
|
222
249
|
interface QuestionOption {
|
|
@@ -657,4 +684,4 @@ interface TimbalChatProps extends Omit<TimbalRuntimeProviderProps, "children">,
|
|
|
657
684
|
}
|
|
658
685
|
declare function TimbalChat({ workforceId, baseUrl, fetch, attachments, attachmentsUploadUrl, attachmentsAccept, debug, ...threadProps }: TimbalChatProps): react_jsx_runtime.JSX.Element;
|
|
659
686
|
|
|
660
|
-
export {
|
|
687
|
+
export { type UiAction as $, useResolvedSuggestions as A, useTimbalRuntime as B, type ChartArtifact as C, useTimbalStream as D, type UiArtifact as E, type UiNode as F, type AnyArtifact as G, type HtmlArtifact as H, type TableArtifact as I, type JsonArtifact as J, type ArtifactRegistry as K, ArtifactRegistryProvider as L, type ArtifactRenderer as M, type ArtifactRendererProps as N, ArtifactView as O, type CreateDefaultAttachmentAdapterOptions as P, type QuestionArtifact as Q, type CreateUploadAttachmentAdapterOptions as R, type SendOptions as S, type ThreadVariant as T, type UseTimbalStreamOptions as U, DEFAULT_UPLOAD_ACCEPT as V, type QuestionOption as W, type ResolveAttachmentAdapterOptions as X, type TimbalArtifact as Y, type TimbalAttachmentsConfig as Z, type TimbalAttachmentsProp as _, type ChartSeriesConfig as a, UiCustomNodeRegistryProvider as a0, type UiEventEnvelope as a1, UiEventProvider as a2, type UploadFetchFn as a3, createDefaultAttachmentAdapter as a4, createUploadAttachmentAdapter as a5, defaultArtifactRenderers as a6, getPath as a7, isArtifact as a8, isUiBinding as a9, resolveAttachmentAdapter as aa, resolveBindable as ab, setPath as ac, useArtifactRegistry as ad, useUiCustomNodeRegistry as ae, useUiDispatch as af, useUiEventEmitter as ag, useUiState as ah, TimbalChat as b, type TimbalChatProps as c, type ChatAttachment as d, type ChatMessage as e, Composer as f, type ComposerProps as g, type ContentPart as h, Suggestions as i, type SuggestionsComponent as j, type SuggestionsSlotProps as k, type SuggestionsSource as l, type TextContentPart as m, type ThinkingContentPart as n, Thread as o, type ThreadArtifactsConfig as p, type ThreadComponents as q, type ThreadProps as r, type ThreadSuggestion as s, type ThreadSuggestionsProps as t, type ThreadWelcomeConfig as u, type ThreadWelcomeProps as v, TimbalRuntimeProvider as w, type TimbalRuntimeProviderProps as x, type TimbalStreamApi as y, type ToolCallContentPart as z };
|