@timbal-ai/timbal-react 1.0.0 → 1.2.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 +35 -0
- package/README.md +55 -8
- package/dist/app.cjs +2369 -1189
- package/dist/app.d.cts +8 -4
- package/dist/app.d.ts +8 -4
- package/dist/app.esm.js +32 -7
- package/dist/{chart-artifact-DOkwSTjQ.d.cts → chart-artifact-E58ve76I.d.cts} +279 -12
- package/dist/{chart-artifact-CBo9x8Ch.d.ts → chart-artifact-_PEJgCpQ.d.ts} +279 -12
- package/dist/{chat-Bed4FQSl.d.cts → chat-ClmzWzCX.d.cts} +33 -4
- package/dist/{chat-Bed4FQSl.d.ts → chat-ClmzWzCX.d.ts} +33 -4
- package/dist/chat.cjs +1446 -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-YEFBANNF.esm.js → chunk-4VULP3CJ.esm.js} +242 -288
- package/dist/{chunk-RZ6QC6RG.esm.js → chunk-AGJKK6R7.esm.js} +2 -2
- package/dist/{chunk-FOD67Z6G.esm.js → chunk-BMXFXLVV.esm.js} +341 -12
- package/dist/chunk-FEYZUVBM.esm.js +52 -0
- package/dist/{chunk-C6IXFM4T.esm.js → chunk-MTYXREHK.esm.js} +4 -4
- package/dist/{chunk-AYHOVAMI.esm.js → chunk-NAMKO2MU.esm.js} +1 -1
- package/dist/{chunk-SNLXVG7H.esm.js → chunk-UY7AKWJL.esm.js} +1108 -656
- package/dist/{chunk-GLPOVYEA.esm.js → chunk-XDIY2WSL.esm.js} +669 -279
- package/dist/index.cjs +2967 -1824
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.esm.js +41 -11
- package/dist/pill-segmented-tabs-BsIOW1Lo.d.cts +528 -0
- package/dist/pill-segmented-tabs-BsIOW1Lo.d.ts +528 -0
- package/dist/studio.cjs +1685 -1015
- 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 +24 -0
- package/dist/ui.cjs +387 -49
- package/dist/ui.d.cts +71 -491
- package/dist/ui.d.ts +71 -491
- package/dist/ui.esm.js +26 -6
- package/dist/{welcome-COOb05a5.d.cts → welcome-BFGRoNfK.d.cts} +1 -1
- package/dist/{welcome-DE08m9ca.d.ts → welcome-DXqsGTwH.d.ts} +1 -1
- package/package.json +7 -3
- package/vite/local-dev.d.ts +5 -1
- package/vite/local-dev.mjs +17 -13
|
@@ -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-ClmzWzCX.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -437,6 +437,11 @@ interface AppShellProps {
|
|
|
437
437
|
chatTriggerLabel?: string;
|
|
438
438
|
/** Hide the built-in floating trigger (use your own + `useAppShellChat`). */
|
|
439
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;
|
|
440
445
|
className?: string;
|
|
441
446
|
mainClassName?: string;
|
|
442
447
|
}
|
|
@@ -480,6 +485,38 @@ interface AppShellChatControls {
|
|
|
480
485
|
}
|
|
481
486
|
declare function useAppShellChat(): AppShellChatControls | null;
|
|
482
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
|
+
|
|
483
520
|
interface PageHeaderProps {
|
|
484
521
|
title: ReactNode;
|
|
485
522
|
description?: ReactNode;
|
|
@@ -549,6 +586,7 @@ declare const statusBadgeToneClass: {
|
|
|
549
586
|
readonly primary: "bg-primary/10 text-primary";
|
|
550
587
|
readonly success: "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400";
|
|
551
588
|
readonly warn: "bg-amber-500/10 text-amber-600 dark:text-amber-400";
|
|
589
|
+
readonly danger: "bg-destructive/10 text-destructive";
|
|
552
590
|
readonly muted: "bg-muted/80 text-muted-foreground";
|
|
553
591
|
};
|
|
554
592
|
type StatusBadgeTone = keyof typeof statusBadgeToneClass;
|
|
@@ -909,6 +947,15 @@ interface FilterBarProps {
|
|
|
909
947
|
}
|
|
910
948
|
declare const FilterBar: FC<FilterBarProps>;
|
|
911
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
|
+
|
|
912
959
|
type DataTableSortDirection = "asc" | "desc";
|
|
913
960
|
interface DataTableSort {
|
|
914
961
|
columnId: string;
|
|
@@ -924,6 +971,8 @@ interface DataTableColumn<T> {
|
|
|
924
971
|
sortable?: boolean;
|
|
925
972
|
/** Value used when sorting; defaults to stringifying `cell(row)`. */
|
|
926
973
|
sortValue?: (row: T) => string | number | boolean | Date | null | undefined;
|
|
974
|
+
/** Ellipsis-overflow long cell content inside the column. */
|
|
975
|
+
truncate?: boolean;
|
|
927
976
|
}
|
|
928
977
|
interface DataTableProps<T> {
|
|
929
978
|
columns: DataTableColumn<T>[];
|
|
@@ -944,8 +993,35 @@ interface DataTableProps<T> {
|
|
|
944
993
|
stickyHeader?: boolean;
|
|
945
994
|
dense?: boolean;
|
|
946
995
|
caption?: string;
|
|
996
|
+
/**
|
|
997
|
+
* Render shaped skeleton rows instead of data — for async loads. Keeps the
|
|
998
|
+
* header and chrome so the table doesn't jump when data arrives.
|
|
999
|
+
*/
|
|
1000
|
+
loading?: boolean;
|
|
1001
|
+
/** Skeleton row count while `loading`. Default: `pageSize ?? 5`. */
|
|
1002
|
+
loadingRows?: number;
|
|
1003
|
+
/**
|
|
1004
|
+
* Enable a leading checkbox column for multi-row selection (bulk actions).
|
|
1005
|
+
* Controlled via `selectedKeys` + `onSelectionChange`, or uncontrolled with
|
|
1006
|
+
* `defaultSelectedKeys`. Keys are produced by `getRowKey`.
|
|
1007
|
+
*/
|
|
1008
|
+
selectable?: boolean;
|
|
1009
|
+
selectedKeys?: string[];
|
|
1010
|
+
defaultSelectedKeys?: string[];
|
|
1011
|
+
onSelectionChange?: (keys: string[]) => void;
|
|
1012
|
+
/** Accessible label for the select-all checkbox. Default: "Select all rows". */
|
|
1013
|
+
selectAllAriaLabel?: string;
|
|
1014
|
+
/**
|
|
1015
|
+
* Rows per page. When set, the table paginates client-side and renders a
|
|
1016
|
+
* pager in the footer. Omit for a single, unpaginated list.
|
|
1017
|
+
*/
|
|
1018
|
+
pageSize?: number;
|
|
1019
|
+
/** Controlled current page (0-based). */
|
|
1020
|
+
pageIndex?: number;
|
|
1021
|
+
defaultPageIndex?: number;
|
|
1022
|
+
onPageChange?: (pageIndex: number) => void;
|
|
947
1023
|
}
|
|
948
|
-
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;
|
|
1024
|
+
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;
|
|
949
1025
|
|
|
950
1026
|
interface ChartPanelProps {
|
|
951
1027
|
title?: ReactNode;
|
|
@@ -956,6 +1032,8 @@ interface ChartPanelProps {
|
|
|
956
1032
|
actions?: ReactNode;
|
|
957
1033
|
/** Plot height in px. Default 300 (same as `MetricChartCard`). */
|
|
958
1034
|
height?: number;
|
|
1035
|
+
/** Render a skeleton at the plot height while data loads. */
|
|
1036
|
+
loading?: boolean;
|
|
959
1037
|
className?: string;
|
|
960
1038
|
}
|
|
961
1039
|
/**
|
|
@@ -1012,6 +1090,8 @@ interface MetricRowProps extends MetricCardHeaderProps {
|
|
|
1012
1090
|
onMetricChange?: (id: string) => void;
|
|
1013
1091
|
/** Accessible name for the KPI tile group (when tiles are selectable). */
|
|
1014
1092
|
metricsAriaLabel?: string;
|
|
1093
|
+
/** Render skeleton tiles while metrics load. Falls back to `metrics.length || 4`. */
|
|
1094
|
+
loading?: boolean;
|
|
1015
1095
|
className?: string;
|
|
1016
1096
|
}
|
|
1017
1097
|
/**
|
|
@@ -1020,8 +1100,37 @@ interface MetricRowProps extends MetricCardHeaderProps {
|
|
|
1020
1100
|
*/
|
|
1021
1101
|
declare const MetricRow: FC<MetricRowProps>;
|
|
1022
1102
|
|
|
1023
|
-
/**
|
|
1024
|
-
|
|
1103
|
+
/** Curve interpolation styles, mirroring recharts/shadcn `type`. */
|
|
1104
|
+
type CurveType = "monotone" | "linear" | "step";
|
|
1105
|
+
|
|
1106
|
+
interface ChartMargin {
|
|
1107
|
+
top: number;
|
|
1108
|
+
right: number;
|
|
1109
|
+
bottom: number;
|
|
1110
|
+
left: number;
|
|
1111
|
+
}
|
|
1112
|
+
/** Recharts `margin` for flush vs default layouts. */
|
|
1113
|
+
declare function resolveChartMargin(options: {
|
|
1114
|
+
flush: boolean;
|
|
1115
|
+
showXAxis: boolean;
|
|
1116
|
+
showYAxis: boolean;
|
|
1117
|
+
}): ChartMargin;
|
|
1118
|
+
/** Whether flush bar charts should use zero category gap (edge labels visible). */
|
|
1119
|
+
declare function flushBarCategoryGap(flush: boolean, showCategoryAxis: boolean): string | undefined;
|
|
1120
|
+
/** Whether flush line/area should use point scale + no-gap (edge-to-edge stroke, labeled x-axis). */
|
|
1121
|
+
declare function flushLineAreaEdgeToEdge(flush: boolean, variant: "area" | "line" | "bar", showXAxis: boolean, showYAxis: boolean): boolean;
|
|
1122
|
+
type TooltipRow = {
|
|
1123
|
+
payload?: Record<string, unknown>;
|
|
1124
|
+
};
|
|
1125
|
+
/** Category label for cartesian tooltips (xKey / horizontal-bar category). */
|
|
1126
|
+
declare function resolveTooltipCategory(label: unknown, payload: TooltipRow[] | undefined, xKey: string, data: Array<Record<string, unknown>>, formatX: (raw: unknown, index: number) => string): string;
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* Theme-aware default series palette. Each entry reads a `--chart-N` token
|
|
1130
|
+
* (defined in `styles.css`, overridable per host app) with a literal fallback,
|
|
1131
|
+
* so charts rebrand automatically when the theme changes.
|
|
1132
|
+
*/
|
|
1133
|
+
declare const CHART_PALETTE: readonly ["var(--chart-1, #4f46e5)", "var(--chart-2, #3b82f6)", "var(--chart-3, #0ea5e9)", "var(--chart-4, #6366f1)", "var(--chart-5, #60a5fa)", "var(--chart-6, #2563eb)"];
|
|
1025
1134
|
interface ChartSeries {
|
|
1026
1135
|
dataKey: string;
|
|
1027
1136
|
label?: string;
|
|
@@ -1031,6 +1140,8 @@ interface ChartSeries {
|
|
|
1031
1140
|
type ChartVariant = "area" | "line" | "bar";
|
|
1032
1141
|
/** `flush` — plot edge-to-edge (no side/bottom inset); axes/legend off by default. */
|
|
1033
1142
|
type ChartLayout = "default" | "flush";
|
|
1143
|
+
/** Tooltip series marker, mirroring shadcn's `ChartTooltipContent` indicators. */
|
|
1144
|
+
type ChartTooltipIndicator = "dot" | "line" | "dashed";
|
|
1034
1145
|
interface LineAreaChartProps {
|
|
1035
1146
|
data: Array<Record<string, unknown>>;
|
|
1036
1147
|
/** Category / x-axis key. Inferred from the first non-numeric field if omitted. */
|
|
@@ -1044,7 +1155,19 @@ interface LineAreaChartProps {
|
|
|
1044
1155
|
unit?: string;
|
|
1045
1156
|
/** Fix the y-domain max (e.g. 100 for percentages). */
|
|
1046
1157
|
yMax?: number;
|
|
1047
|
-
/**
|
|
1158
|
+
/** Line / area interpolation. Default `monotone`. */
|
|
1159
|
+
curve?: CurveType;
|
|
1160
|
+
/** Stack series on top of each other (area + bar). Default false. */
|
|
1161
|
+
stacked?: boolean;
|
|
1162
|
+
/** Draw point markers on line/area series. */
|
|
1163
|
+
dots?: boolean | "active";
|
|
1164
|
+
/** Bar orientation. `horizontal` swaps category to the y-axis. Default `vertical`. */
|
|
1165
|
+
orientation?: "vertical" | "horizontal";
|
|
1166
|
+
/** Corner radius for bars. Default 4. */
|
|
1167
|
+
barRadius?: number;
|
|
1168
|
+
/** Grid line direction. Default `horizontal`. */
|
|
1169
|
+
gridLines?: "horizontal" | "vertical" | "both" | "none";
|
|
1170
|
+
/** `flush` fills the container width/height and hides axes/legend by default. */
|
|
1048
1171
|
layout?: ChartLayout;
|
|
1049
1172
|
showGrid?: boolean;
|
|
1050
1173
|
showXAxis?: boolean;
|
|
@@ -1052,16 +1175,21 @@ interface LineAreaChartProps {
|
|
|
1052
1175
|
/** Series legend below the plot. Default: on when `layout` is `default` and multiple series. */
|
|
1053
1176
|
showLegend?: boolean;
|
|
1054
1177
|
showTooltip?: boolean;
|
|
1178
|
+
/** Tooltip series marker style. Default `dot`. */
|
|
1179
|
+
tooltipIndicator?: ChartTooltipIndicator;
|
|
1055
1180
|
formatValue?: (value: number) => string;
|
|
1056
1181
|
formatX?: (raw: unknown, index: number) => string;
|
|
1182
|
+
/** Truncate long category axis labels (full text in native tooltip). Default true. */
|
|
1183
|
+
clipTicks?: boolean;
|
|
1057
1184
|
className?: string;
|
|
1058
1185
|
/** Accessible label for the chart image. */
|
|
1059
1186
|
ariaLabel?: string;
|
|
1060
1187
|
}
|
|
1061
1188
|
/**
|
|
1062
|
-
*
|
|
1063
|
-
*
|
|
1064
|
-
*
|
|
1189
|
+
* shadcn-style chart built on recharts. A single component renders line, area,
|
|
1190
|
+
* and bar charts (vertical or horizontal), with stacking, curve interpolation,
|
|
1191
|
+
* dots, grid control, and the shared `ChartTooltipContent` / `ChartLegendContent`
|
|
1192
|
+
* chrome. Series colors flow from the theme `--chart-N` tokens via `ChartConfig`.
|
|
1065
1193
|
*/
|
|
1066
1194
|
declare const LineAreaChart: FC<LineAreaChartProps>;
|
|
1067
1195
|
|
|
@@ -1100,6 +1228,8 @@ interface MetricChartCardProps {
|
|
|
1100
1228
|
emptyLabel?: ReactNode;
|
|
1101
1229
|
/** Accessible name for the selectable KPI tile group. */
|
|
1102
1230
|
metricsAriaLabel?: string;
|
|
1231
|
+
/** Render skeleton tiles + chart while data loads. */
|
|
1232
|
+
loading?: boolean;
|
|
1103
1233
|
className?: string;
|
|
1104
1234
|
}
|
|
1105
1235
|
/**
|
|
@@ -1108,6 +1238,142 @@ interface MetricChartCardProps {
|
|
|
1108
1238
|
*/
|
|
1109
1239
|
declare const MetricChartCard: FC<MetricChartCardProps>;
|
|
1110
1240
|
|
|
1241
|
+
/**
|
|
1242
|
+
* Run `callback` every `delayMs`. Pass `null` to pause (the timer is torn down
|
|
1243
|
+
* and restarted when the delay changes). The latest `callback` is always used,
|
|
1244
|
+
* so you can pass an inline function without resetting the interval.
|
|
1245
|
+
*/
|
|
1246
|
+
declare function useInterval(callback: () => void, delayMs: number | null): void;
|
|
1247
|
+
interface UseLiveQueryOptions {
|
|
1248
|
+
/** Poll interval in ms. Omit / `null` for a one-shot fetch (no polling). */
|
|
1249
|
+
intervalMs?: number | null;
|
|
1250
|
+
/** Pause fetching + polling entirely. Default: `true`. */
|
|
1251
|
+
enabled?: boolean;
|
|
1252
|
+
/** Fetch immediately on mount (vs. waiting one interval). Default: `true`. */
|
|
1253
|
+
immediate?: boolean;
|
|
1254
|
+
/**
|
|
1255
|
+
* Pause polling while the tab is hidden and refetch on focus — avoids
|
|
1256
|
+
* burning requests on a backgrounded dashboard. Default: `true`.
|
|
1257
|
+
*/
|
|
1258
|
+
refetchOnFocus?: boolean;
|
|
1259
|
+
}
|
|
1260
|
+
interface UseLiveQueryResult<T> {
|
|
1261
|
+
data: T | undefined;
|
|
1262
|
+
error: unknown;
|
|
1263
|
+
/** True until the first response settles. */
|
|
1264
|
+
loading: boolean;
|
|
1265
|
+
/** True during background refreshes (data already present). */
|
|
1266
|
+
refreshing: boolean;
|
|
1267
|
+
/** Timestamp (ms) of the last successful fetch, or null. */
|
|
1268
|
+
lastUpdated: number | null;
|
|
1269
|
+
/** Manually trigger a refetch (e.g. a "Refresh" button). */
|
|
1270
|
+
refetch: () => void;
|
|
1271
|
+
}
|
|
1272
|
+
/**
|
|
1273
|
+
* Poll an async source on an interval for live dashboards (alerts, metrics,
|
|
1274
|
+
* logs). Handles loading/refreshing/error state, ignores out-of-order and
|
|
1275
|
+
* post-unmount responses, pauses while the tab is hidden, and exposes a manual
|
|
1276
|
+
* `refetch`. Pair with `authFetch` for `/api/*` calls.
|
|
1277
|
+
*
|
|
1278
|
+
* ```ts
|
|
1279
|
+
* const { data, loading, refetch } = useLiveQuery(
|
|
1280
|
+
* () => authFetch("/api/alerts").then((r) => r.json()),
|
|
1281
|
+
* { intervalMs: 15_000 },
|
|
1282
|
+
* );
|
|
1283
|
+
* ```
|
|
1284
|
+
*
|
|
1285
|
+
* `fetcher` is read through a ref, so an inline arrow doesn't reset polling;
|
|
1286
|
+
* change `intervalMs` / `enabled` to control the cadence.
|
|
1287
|
+
*/
|
|
1288
|
+
declare function useLiveQuery<T>(fetcher: () => Promise<T>, options?: UseLiveQueryOptions): UseLiveQueryResult<T>;
|
|
1289
|
+
|
|
1290
|
+
interface PieChartProps {
|
|
1291
|
+
data: Array<Record<string, unknown>>;
|
|
1292
|
+
/** Category / label key. Inferred from the first non-numeric field if omitted. */
|
|
1293
|
+
nameKey?: string;
|
|
1294
|
+
/** Value key. Default "value". */
|
|
1295
|
+
dataKey?: string;
|
|
1296
|
+
/** Donut hole radius as a fraction of the outer radius (0 = full pie). Default 0. */
|
|
1297
|
+
innerRadius?: number;
|
|
1298
|
+
/** Per-slice colors. Defaults to the theme palette. */
|
|
1299
|
+
colors?: string[];
|
|
1300
|
+
/** Plot height in px. Default 260. */
|
|
1301
|
+
height?: number;
|
|
1302
|
+
/** Show the slice legend below the chart. Default true. */
|
|
1303
|
+
showLegend?: boolean;
|
|
1304
|
+
/** Show value labels on each slice. Default false. */
|
|
1305
|
+
showLabels?: boolean;
|
|
1306
|
+
showTooltip?: boolean;
|
|
1307
|
+
tooltipIndicator?: ChartTooltipIndicator;
|
|
1308
|
+
/** Big number drawn in the donut hole (e.g. the total). Requires `innerRadius > 0`. */
|
|
1309
|
+
centerValue?: ReactNode;
|
|
1310
|
+
/** Caption under `centerValue`. */
|
|
1311
|
+
centerLabel?: ReactNode;
|
|
1312
|
+
unit?: string;
|
|
1313
|
+
formatValue?: (value: number) => string;
|
|
1314
|
+
className?: string;
|
|
1315
|
+
ariaLabel?: string;
|
|
1316
|
+
}
|
|
1317
|
+
/**
|
|
1318
|
+
* Pie / donut chart on recharts. Pass `innerRadius` (0–1 fraction) for a donut
|
|
1319
|
+
* and `centerValue` / `centerLabel` to fill the hole with a KPI. Slice colors
|
|
1320
|
+
* come from the theme `--chart-N` palette (or `colors`).
|
|
1321
|
+
*/
|
|
1322
|
+
declare const PieChart: FC<PieChartProps>;
|
|
1323
|
+
|
|
1324
|
+
interface RadialChartProps {
|
|
1325
|
+
data: Array<Record<string, unknown>>;
|
|
1326
|
+
/** Category / label key. Inferred from the first non-numeric field if omitted. */
|
|
1327
|
+
nameKey?: string;
|
|
1328
|
+
/** Value key. Default "value". */
|
|
1329
|
+
dataKey?: string;
|
|
1330
|
+
/** Value that maps to a full ring. Default: the data max (so the largest fills). */
|
|
1331
|
+
maxValue?: number;
|
|
1332
|
+
/** Per-arc colors. Defaults to the theme palette. */
|
|
1333
|
+
colors?: string[];
|
|
1334
|
+
height?: number;
|
|
1335
|
+
/** Thickness of each ring in px. Default 16. */
|
|
1336
|
+
ringWidth?: number;
|
|
1337
|
+
/** Gap between rings in px. Default 4. */
|
|
1338
|
+
ringGap?: number;
|
|
1339
|
+
showLegend?: boolean;
|
|
1340
|
+
/** Big number drawn in the center (e.g. a total or the single value). */
|
|
1341
|
+
centerValue?: ReactNode;
|
|
1342
|
+
centerLabel?: ReactNode;
|
|
1343
|
+
className?: string;
|
|
1344
|
+
ariaLabel?: string;
|
|
1345
|
+
}
|
|
1346
|
+
/**
|
|
1347
|
+
* Radial (progress ring) chart on recharts — one concentric ring per data
|
|
1348
|
+
* point, each filled proportional to its value against `maxValue`. Pass
|
|
1349
|
+
* `centerValue` / `centerLabel` to fill the middle. Theme-driven colors.
|
|
1350
|
+
*/
|
|
1351
|
+
declare const RadialChart: FC<RadialChartProps>;
|
|
1352
|
+
|
|
1353
|
+
interface RadarChartProps {
|
|
1354
|
+
data: Array<Record<string, unknown>>;
|
|
1355
|
+
/** Axis (category) key. Inferred from the first non-numeric field if omitted. */
|
|
1356
|
+
nameKey?: string;
|
|
1357
|
+
/** Series to plot. Strings are shorthand for `{ dataKey }`. Inferred if omitted. */
|
|
1358
|
+
series?: Array<ChartSeries | string>;
|
|
1359
|
+
/** Value at the outer edge. Default: the data max. */
|
|
1360
|
+
maxValue?: number;
|
|
1361
|
+
/** Number of concentric grid rings. Default 4. */
|
|
1362
|
+
rings?: number;
|
|
1363
|
+
height?: number;
|
|
1364
|
+
showLegend?: boolean;
|
|
1365
|
+
/** Fill the series polygons with a soft tint. Default true. */
|
|
1366
|
+
fill?: boolean;
|
|
1367
|
+
className?: string;
|
|
1368
|
+
ariaLabel?: string;
|
|
1369
|
+
}
|
|
1370
|
+
/**
|
|
1371
|
+
* Radar (spider) chart on recharts — one axis per data point, one polygon per
|
|
1372
|
+
* series. Theme-driven colors. Good for comparing a handful of metrics across
|
|
1373
|
+
* two or three entities.
|
|
1374
|
+
*/
|
|
1375
|
+
declare const RadarChart: FC<RadarChartProps>;
|
|
1376
|
+
|
|
1111
1377
|
interface SparklineProps {
|
|
1112
1378
|
/** Numeric values, or objects from which `dataKey` is read. */
|
|
1113
1379
|
data: Array<number | Record<string, unknown>>;
|
|
@@ -1135,10 +1401,11 @@ interface ChartArtifactViewProps {
|
|
|
1135
1401
|
height?: number;
|
|
1136
1402
|
}
|
|
1137
1403
|
/**
|
|
1138
|
-
* Renders a `chart` artifact.
|
|
1139
|
-
*
|
|
1140
|
-
*
|
|
1404
|
+
* Renders a `chart` artifact. Cartesian kinds (bar / horizontalBar / line /
|
|
1405
|
+
* area, including stacked) go through the shared `LineAreaChart` engine; pie,
|
|
1406
|
+
* donut, radial, and radar use their dedicated recharts components. All
|
|
1407
|
+
* inherit the theme `--chart-N` palette.
|
|
1141
1408
|
*/
|
|
1142
1409
|
declare const ChartArtifactView: FC<ChartArtifactViewProps>;
|
|
1143
1410
|
|
|
1144
|
-
export {
|
|
1411
|
+
export { FieldInput as $, APP_KIT_AGENT_INSTRUCTIONS as A, type BreadcrumbEntry as B, CHART_PALETTE as C, type ChartSeries as D, type ChartTooltipIndicator as E, type ChartVariant as F, ConnectionRow as G, ConnectionRowList as H, type ConnectionRowListProps as I, type ConnectionRowProps as J, DangerZone as K, DangerZoneAction as L, type DangerZoneActionProps as M, type DangerZoneProps as N, DataTable as O, type DataTableColumn as P, type DataTableProps as Q, type DataTableSort as R, type DataTableSortDirection as S, type DescriptionItem as T, DescriptionList as U, type DescriptionListProps as V, EmptyState as W, type EmptyStateProps as X, ExpandableSection as Y, type ExpandableSectionProps as Z, Field as _, AppChatPanel as a, type SearchInputProps as a$, type FieldInputProps as a0, type FieldProps as a1, FieldRow as a2, type FieldRowProps as a3, FieldSelect as a4, type FieldSelectProps as a5, FieldSwitch as a6, type FieldSwitchProps as a7, FieldTextarea as a8, type FieldTextareaProps as a9, type MetricChartCardProps as aA, type MetricChartMetric as aB, MetricRow as aC, type MetricRowItem as aD, type MetricRowProps as aE, MetricTile as aF, type MetricTileProps as aG, Page as aH, PageHeader as aI, type PageHeaderProps as aJ, type PageProps as aK, PieChart as aL, type PieChartProps as aM, PlanBadge as aN, type PlanBadgeProps as aO, type PlanBadgeTone as aP, RESERVED_GRADIENT_TOKENS as aQ, RadarChart as aR, type RadarChartProps as aS, RadialChart as aT, type RadialChartProps as aU, ResourceCard as aV, type ResourceCardProps as aW, type ReviewResult as aX, SEMANTIC_COLOR_TOKENS as aY, SLOP_BUDGETS as aZ, SearchInput as a_, FilterBar as aa, type FilterBarProps as ab, FilterField as ac, type FilterFieldProps as ad, FloatingUnsavedChangesBar as ae, type FloatingUnsavedChangesBarProps as af, FormSection as ag, type FormSectionProps as ah, HOUSE_RULES as ai, type HouseRule as aj, INTEGRATION_CATALOG_CARD_HEIGHT_CLASS as ak, InfoCard as al, type InfoCardProps as am, type InfoCardTone as an, IntegrationCard as ao, type IntegrationCardProps as ap, type IntegrationCardStatus as aq, IntegrationsEmptyState as ar, type IntegrationsEmptyStateProps as as, LineAreaChart as at, type LineAreaChartProps as au, type LintFinding as av, type LintOptions as aw, type LintResult as ax, type LintSeverity as ay, MetricChartCard as az, type AppChatPanelProps as b, Section as b0, type SectionProps as b1, type SemanticColorToken as b2, SettingsSection as b3, SettingsSectionHeader as b4, type SettingsSectionHeaderProps as b5, type SettingsSectionProps as b6, Sparkline as b7, type SparklineProps as b8, StatTile as b9, type TimbalThemeTypography as bA, UI_REVIEW_AGENT_INSTRUCTIONS as bB, type UseLiveQueryOptions as bC, type UseLiveQueryResult as bD, applyThemePreset as bE, applyTimbalTheme as bF, clearTimbalTheme as bG, connectionRowListClass as bH, createTimbalTheme as bI, ensureThemeFontLink as bJ, flushBarCategoryGap as bK, flushLineAreaEdgeToEdge as bL, formatLintReport as bM, getStoredThemePreset as bN, getThemePreset as bO, lintGeneratedUi as bP, resolveChartMargin as bQ, resolveTooltipCategory as bR, reviewGeneratedUi as bS, themeToCss as bT, useAppCopilotContext as bU, useAppShellChat as bV, useAppShellNav as bW, useInterval as bX, useLiveQuery as bY, type StatTileProps as ba, StatusBadge as bb, type StatusBadgeProps as bc, type StatusBadgeTone as bd, StatusDot as be, type StatusDotProps as bf, type StatusDotTone as bg, SubNav as bh, type SubNavItem as bi, type SubNavProps as bj, SurfaceCard as bk, type SurfaceCardProps as bl, TAILWIND_PALETTE_COLORS as bm, THEME_AGENT_INSTRUCTIONS as bn, TIMBAL_THEME_PRESETS as bo, ThemePresetGallery as bp, type ThemePresetGalleryProps as bq, type ThemeShadow as br, type ThemeToCssOptions as bs, type ThemeTokenMap as bt, type TimbalThemeIntent as bu, type TimbalThemePreset as bv, type TimbalThemePresetId as bw, TimbalThemeStyle as bx, type TimbalThemeStyleProps as by, type TimbalThemeTokens 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, type ChartMargin as x, ChartPanel as y, type ChartPanelProps as z };
|
|
@@ -204,19 +204,48 @@ 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
|
+
/** Show category / value axis ticks on flush cartesian charts. Default false (tooltips carry labels). */
|
|
245
|
+
showAxes?: boolean;
|
|
246
|
+
/** Per-slice / per-ring colors for pie / donut / radial. */
|
|
247
|
+
colors?: string[];
|
|
248
|
+
/** Optional unit label appended to numeric axis ticks and tooltip values. */
|
|
220
249
|
unit?: string;
|
|
221
250
|
}
|
|
222
251
|
interface QuestionOption {
|
|
@@ -657,4 +686,4 @@ interface TimbalChatProps extends Omit<TimbalRuntimeProviderProps, "children">,
|
|
|
657
686
|
}
|
|
658
687
|
declare function TimbalChat({ workforceId, baseUrl, fetch, attachments, attachmentsUploadUrl, attachmentsAccept, debug, ...threadProps }: TimbalChatProps): react_jsx_runtime.JSX.Element;
|
|
659
688
|
|
|
660
|
-
export {
|
|
689
|
+
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 };
|
|
@@ -204,19 +204,48 @@ 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
|
+
/** Show category / value axis ticks on flush cartesian charts. Default false (tooltips carry labels). */
|
|
245
|
+
showAxes?: boolean;
|
|
246
|
+
/** Per-slice / per-ring colors for pie / donut / radial. */
|
|
247
|
+
colors?: string[];
|
|
248
|
+
/** Optional unit label appended to numeric axis ticks and tooltip values. */
|
|
220
249
|
unit?: string;
|
|
221
250
|
}
|
|
222
251
|
interface QuestionOption {
|
|
@@ -657,4 +686,4 @@ interface TimbalChatProps extends Omit<TimbalRuntimeProviderProps, "children">,
|
|
|
657
686
|
}
|
|
658
687
|
declare function TimbalChat({ workforceId, baseUrl, fetch, attachments, attachmentsUploadUrl, attachmentsAccept, debug, ...threadProps }: TimbalChatProps): react_jsx_runtime.JSX.Element;
|
|
659
688
|
|
|
660
|
-
export {
|
|
689
|
+
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 };
|