@timbal-ai/timbal-react 1.1.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/README.md +13 -7
  3. package/dist/app.cjs +1234 -867
  4. package/dist/app.d.cts +2 -2
  5. package/dist/app.d.ts +2 -2
  6. package/dist/app.esm.js +14 -6
  7. package/dist/{chart-artifact-CX-rh9nq.d.cts → chart-artifact-E58ve76I.d.cts} +29 -3
  8. package/dist/{chart-artifact-BZp7nmaf.d.ts → chart-artifact-_PEJgCpQ.d.ts} +29 -3
  9. package/dist/{chat-DCms8pJ_.d.cts → chat-ClmzWzCX.d.cts} +2 -0
  10. package/dist/{chat-DCms8pJ_.d.ts → chat-ClmzWzCX.d.ts} +2 -0
  11. package/dist/chat.cjs +868 -511
  12. package/dist/chat.d.cts +1 -1
  13. package/dist/chat.d.ts +1 -1
  14. package/dist/chat.esm.js +3 -3
  15. package/dist/{chunk-6HWMJNZT.esm.js → chunk-4VULP3CJ.esm.js} +1 -1
  16. package/dist/{chunk-XCM3V6RK.esm.js → chunk-AGJKK6R7.esm.js} +2 -2
  17. package/dist/{chunk-4AKJ6FKE.esm.js → chunk-BMXFXLVV.esm.js} +120 -22
  18. package/dist/{chunk-JEAUF54A.esm.js → chunk-FEYZUVBM.esm.js} +1 -1
  19. package/dist/{chunk-FRZOEYBO.esm.js → chunk-MTYXREHK.esm.js} +4 -4
  20. package/dist/{chunk-P3KDAYX6.esm.js → chunk-NAMKO2MU.esm.js} +1 -1
  21. package/dist/{chunk-YXZ22OJN.esm.js → chunk-UY7AKWJL.esm.js} +670 -402
  22. package/dist/{chunk-TK2AGIME.esm.js → chunk-XDIY2WSL.esm.js} +15 -13
  23. package/dist/index.cjs +1871 -1497
  24. package/dist/index.d.cts +5 -5
  25. package/dist/index.d.ts +5 -5
  26. package/dist/index.esm.js +21 -9
  27. package/dist/{pill-segmented-tabs-Ba5q0feL.d.cts → pill-segmented-tabs-BsIOW1Lo.d.cts} +32 -4
  28. package/dist/{pill-segmented-tabs-Ba5q0feL.d.ts → pill-segmented-tabs-BsIOW1Lo.d.ts} +32 -4
  29. package/dist/studio.cjs +1089 -732
  30. package/dist/studio.d.cts +2 -2
  31. package/dist/studio.d.ts +2 -2
  32. package/dist/studio.esm.js +5 -5
  33. package/dist/styles.css +14 -16
  34. package/dist/ui.cjs +122 -22
  35. package/dist/ui.d.cts +1 -1
  36. package/dist/ui.d.ts +1 -1
  37. package/dist/ui.esm.js +8 -4
  38. package/dist/{welcome-CRqOPKMp.d.cts → welcome-BFGRoNfK.d.cts} +1 -1
  39. package/dist/{welcome-DlHUa3OL.d.ts → welcome-DXqsGTwH.d.ts} +1 -1
  40. package/package.json +1 -1
  41. package/vite/local-dev.d.ts +5 -1
  42. package/vite/local-dev.mjs +17 -13
@@ -15,14 +15,14 @@ import {
15
15
  studioIntegrationCardClass,
16
16
  studioTopbarPillHeightClass,
17
17
  toNum
18
- } from "./chunk-YXZ22OJN.esm.js";
18
+ } from "./chunk-UY7AKWJL.esm.js";
19
19
  import {
20
20
  Checkbox,
21
21
  Skeleton
22
- } from "./chunk-JEAUF54A.esm.js";
22
+ } from "./chunk-FEYZUVBM.esm.js";
23
23
  import {
24
24
  PillSegmentedTabs
25
- } from "./chunk-P3KDAYX6.esm.js";
25
+ } from "./chunk-NAMKO2MU.esm.js";
26
26
  import {
27
27
  Button,
28
28
  Dialog,
@@ -35,7 +35,7 @@ import {
35
35
  TimbalV2Button,
36
36
  cn,
37
37
  controlClass
38
- } from "./chunk-4AKJ6FKE.esm.js";
38
+ } from "./chunk-BMXFXLVV.esm.js";
39
39
 
40
40
  // src/design/ui-vocabulary.ts
41
41
  var SEMANTIC_COLOR_TOKENS = [
@@ -198,8 +198,8 @@ var HOUSE_RULES = [
198
198
  },
199
199
  {
200
200
  id: "no-data-gradient",
201
- rule: "Gradients are reserved for chrome (composer, elevated surface, playground). Never on a data card, tile, or table.",
202
- why: "Gradient stat cards are the canonical 'AI dashboard' look."
201
+ rule: "Gradients are reserved for chrome (composer, elevated surface, playground) and built-in chart/avatar fills \u2014 never on a data card shell, stat tile, or table row background.",
202
+ why: `Gradient stat cards are the canonical 'AI dashboard' look; SVG bar/pie fills and AvatarFallback variant="secondary" (Action button chrome) are kit-owned exceptions.`
203
203
  },
204
204
  {
205
205
  id: "compose-from-blocks",
@@ -312,8 +312,9 @@ The cause of slop is dropping **below** the curated block layer into raw primiti
312
312
  | \`FilterBar\` | Horizontal filter row \u2014 bottom-aligns controls. Mix \`SearchInput\` with labeled \`FilterField\` + \`Select\` (or \`Field\` + \`Select\`); labels sit above, control baselines match. |
313
313
  | \`FilterField\` | Optional label wrapper for a filter control inside \`FilterBar\` (severity, status, \u2026). Omit \`label\` for search-only fields. |
314
314
  | \`SearchInput\` | Filter field with consistent app styling. |
315
- | \`DataTable\` | Sortable table: \`columns\`, \`rows\`, \`getRowKey\`, optional \`sort\` / \`onSortChange\`, \`emptyTitle\`, \`showRowCount\`, \`caption\`. **Scales:** \`pageSize\` (built-in client pager), \`selectable\` + \`onSelectionChange\` (checkbox column for bulk actions), \`loading\` (skeleton rows). \`onRowClick\` for row \u2192 detail (open a \`Sheet\`). |
316
- | \`ChartPanel\` | Same shell as \`MetricChartCard\`: title row (\`px-4 pt-4\`), flush plot (\`pt-2\` only). Pass \`title\` + \`artifact\` (omit \`artifact.title\` to avoid duplicates) or \`children\`. \`loading\` renders a plot-height skeleton. |
315
+ | \`DataTable\` | Sortable table: \`columns\`, \`rows\`, \`getRowKey\`, optional \`sort\` / \`onSortChange\`, \`emptyTitle\`, \`showRowCount\`, \`caption\`, \`truncate: true\` on columns with long text. **Scales:** \`pageSize\` (built-in client pager), \`selectable\` + \`onSelectionChange\` (checkbox column for bulk actions), \`loading\` (skeleton rows). \`onRowClick\` for row \u2192 detail (open a \`Sheet\`). |
316
+ | \`Avatar\` / \`AvatarFallback\` | User initials: \`variant="secondary"\` (or \`primary\` / \`chart\` alias) on **both** \`Avatar\` and \`AvatarFallback\` \u2014 same chrome as catalog **Action** buttons (\`Button variant="secondary"\`: elevated gradient, \`border-border\`, \`shadow-card\`, \`text-foreground\`). Never dark primary CTA fill or raw \`bg-blue-600\`. |
317
+ | \`ChartPanel\` | Same shell as \`MetricChartCard\`: title row (\`px-4 pt-4\`), flush plot (\`pt-2\` only) with **no axis ticks** \u2014 hover tooltips show category + value. Pass \`title\` + \`artifact\` (omit \`artifact.title\` to avoid duplicates) or \`children\`. \`loading\` renders a plot-height skeleton. |
317
318
  | \`FieldInput\`, \`FieldTextarea\`, \`FieldSelect\`, \`FieldSwitch\` | Settings-style forms with labels and hints. |
318
319
  | \`FormSection\` | Grouped form block. |
319
320
  | \`AppConfirmDialog\` | Confirm/cancel modal: \`open\`, \`onOpenChange\`, \`title\`, \`description\`, \`onConfirm\`. |
@@ -326,7 +327,7 @@ Charts run on **recharts** with shadcn \`ChartContainer\` / \`ChartTooltipConten
326
327
 
327
328
  | Component | Use for |
328
329
  |-----------|---------|
329
- | \`LineAreaChart\` | Cartesian engine (shadcn-style chrome). Props: \`data\`, \`xKey\`, \`series: [{ dataKey, label?, color? }]\`, \`variant\` (\`area\`\\|\`line\`\\|\`bar\`), \`orientation\` (\`horizontal\` for horizontal bars), \`stacked\`, \`curve\` (\`monotone\`\\|\`linear\`\\|\`step\`), \`dots\`, \`gridLines\`, \`tooltipIndicator\` (\`dot\`\\|\`line\`\\|\`dashed\`), \`layout\` (\`flush\`), \`height\`, \`showLegend\`, \`formatX\`, \`formatValue\`, \`ariaLabel\`. |
330
+ | \`LineAreaChart\` | Cartesian engine (shadcn-style chrome). Bar fills use theme gradients automatically. Props: \`data\`, \`xKey\`, \`series: [{ dataKey, label?, color? }]\`, \`variant\` (\`area\`\\|\`line\`\\|\`bar\`), \`orientation\` (\`horizontal\` for horizontal bars), \`stacked\`, \`curve\`, \`dots\`, \`gridLines\`, \`tooltipIndicator\`, \`layout\` (\`flush\` \u2014 hides axes by default; category + values on hover tooltip), \`showXAxis\` / \`showYAxis\` to opt back in, \`clipTicks\` (truncates long axis labels when axes are on), \`height\`, \`showLegend\`, \`formatX\`, \`formatValue\`, \`ariaLabel\`. |
330
331
  | \`PieChart\` | Pie / donut: \`data\`, \`nameKey\`, \`dataKey\`, \`innerRadius\` (>0 = donut), \`centerValue\`/\`centerLabel\` (donut hole KPI), \`showLabels\`, \`colors\`. |
331
332
  | \`RadialChart\` | Concentric progress rings: \`data\`, \`nameKey\`, \`dataKey\`, \`maxValue\`, \`centerValue\`/\`centerLabel\`. Good for gauges / share-of-target. |
332
333
  | \`RadarChart\` | Spider chart (\u22653 axes): \`data\`, \`nameKey\`, \`series\`, \`maxValue\`. Compare a few metrics across entities. |
@@ -1325,8 +1326,8 @@ var metricCardShellClass = cn(
1325
1326
  );
1326
1327
  var metricCardHeaderClass = "flex items-start justify-between gap-3 px-4 pb-1 pt-3";
1327
1328
  var metricTilesRowClass = "grid w-full min-w-0";
1328
- var metricChartRegionClass = "relative min-h-0 w-full border-t border-border/40 pt-2";
1329
- var metricChartPlotRegionClass = "relative min-h-0 w-full border-t border-border/40 px-0 pt-5 pb-3";
1329
+ var metricChartRegionClass = "relative min-h-0 w-full overflow-x-hidden border-t border-border/40 pt-2";
1330
+ var metricChartPlotRegionClass = "relative min-h-0 w-full overflow-x-hidden border-t border-border/40 px-0 pt-5 pb-3";
1330
1331
  var metricCellDividerClass = "border-r border-border/40";
1331
1332
  var MetricCardHeader = ({
1332
1333
  title,
@@ -1516,7 +1517,7 @@ var appShellTopbarRowClass = cn(
1516
1517
  "flex w-full items-center justify-between gap-2"
1517
1518
  );
1518
1519
  var appShellTopbarStickyClass = cn(
1519
- "sticky top-0 z-20 shrink-0 bg-background pb-2",
1520
+ "shrink-0 bg-background pb-2",
1520
1521
  appShellInsetTopClass
1521
1522
  );
1522
1523
  var appPageHeaderClass = cn(
@@ -3285,10 +3286,11 @@ function DataTable({
3285
3286
  className: cn(
3286
3287
  bodyCellClass,
3287
3288
  cellPad,
3289
+ col.truncate && "max-w-0",
3288
3290
  col.align && alignClass[col.align],
3289
3291
  col.className
3290
3292
  ),
3291
- children: col.cell(row)
3293
+ children: col.truncate ? /* @__PURE__ */ jsx43("div", { className: "truncate", children: col.cell(row) }) : col.cell(row)
3292
3294
  },
3293
3295
  col.id
3294
3296
  ))