@timbal-ai/timbal-react 0.6.0 → 0.7.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 +37 -0
- package/README.md +24 -5
- package/dist/app.cjs +2282 -738
- package/dist/app.d.cts +4 -1
- package/dist/app.d.ts +4 -1
- package/dist/app.esm.js +58 -5
- package/dist/button-CIKzUrJI.d.cts +18 -0
- package/dist/button-CIKzUrJI.d.ts +18 -0
- package/dist/chart-artifact-BFDz8Tf9.d.ts +756 -0
- package/dist/chart-artifact-bWUa-iSG.d.cts +756 -0
- package/dist/chat.cjs +872 -562
- package/dist/chat.d.cts +2 -2
- package/dist/chat.d.ts +2 -2
- package/dist/chat.esm.js +3 -3
- package/dist/{chunk-4TCJQSIX.esm.js → chunk-2XZ3S4OP.esm.js} +14 -3
- package/dist/chunk-533MK5EA.esm.js +2294 -0
- package/dist/{chunk-OVHR7J3J.esm.js → chunk-7O5VY3TP.esm.js} +38 -11
- package/dist/{chunk-WLTW56MC.esm.js → chunk-N3PYVTY5.esm.js} +2 -2
- package/dist/{chunk-IYENDIRY.esm.js → chunk-TDIJHV4I.esm.js} +1 -1
- package/dist/{chunk-YJQLLFKP.esm.js → chunk-TLUF2RUL.esm.js} +813 -507
- package/dist/{chunk-OFHLFNJH.esm.js → chunk-Z27GBSOT.esm.js} +3 -1
- package/dist/index.cjs +2587 -1016
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.esm.js +57 -7
- package/dist/{layout-CQWngNQ7.d.ts → layout-BTJyU8wd.d.ts} +1 -1
- package/dist/{layout-B9VayJhZ.d.cts → layout-C2G-FcER.d.cts} +1 -1
- package/dist/studio.cjs +1127 -788
- package/dist/studio.d.cts +1 -1
- package/dist/studio.d.ts +1 -1
- package/dist/studio.esm.js +6 -6
- package/dist/{timbal-v2-button-F4-z7m33.d.ts → timbal-v2-button-CNfdwGq4.d.cts} +1 -1
- package/dist/{timbal-v2-button-F4-z7m33.d.cts → timbal-v2-button-CNfdwGq4.d.ts} +1 -1
- package/dist/ui.cjs +12 -3
- package/dist/ui.d.cts +5 -16
- package/dist/ui.d.ts +5 -16
- package/dist/ui.esm.js +2 -2
- package/dist/{welcome-BOizSp5h.d.ts → welcome-BBmB3tl7.d.ts} +4 -3
- package/dist/{welcome--80i_O0p.d.cts → welcome-C89Mgdaw.d.cts} +4 -3
- package/package.json +2 -1
- package/vite/local-dev.mjs +91 -5
- package/dist/chart-artifact-C71dk4xI.d.ts +0 -329
- package/dist/chart-artifact-CPEpOmtV.d.cts +0 -329
- package/dist/chunk-M4V6Q6XO.esm.js +0 -1082
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@timbal-ai/timbal-react` are documented here.
|
|
4
|
+
|
|
5
|
+
## [0.7.0] — 2026-05-29
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **App kit premade components** under `@timbal-ai/timbal-react/app`:
|
|
10
|
+
- **Metrics:** `MetricRow`, `MetricChartCard`, `MetricTile` (platform-style KPI strip + flush chart)
|
|
11
|
+
- **Integrations:** `IntegrationCard`, `ConnectionRow`, `ConnectionRowList`, `IntegrationsEmptyState`, `PlanBadge`
|
|
12
|
+
- **Settings:** `SettingsSection`, `FieldRow`, `DangerZone`, `FloatingUnsavedChangesBar`
|
|
13
|
+
- **Surfaces:** `InfoCard`, `DescriptionList`, `ExpandableSection`, `ResourceCard`, `StatusDot`
|
|
14
|
+
- **Charts engine** (`LineAreaChart`, `Sparkline`, `CHART_PALETTE`) — dependency-free SVG + motion; shared by app kit and chart artifacts
|
|
15
|
+
- **`APP_KIT_AGENT_INSTRUCTIONS`** — codegen system-prompt text (component menu, recipes, accessibility)
|
|
16
|
+
- **`TIMBAL_V2_ELEVATED_SURFACE`** and **`TIMBAL_V2_LOGO_TILE`** design tokens for catalog/resource cards
|
|
17
|
+
- **`@timbal-ai/timbal-react/vite`** — `timbalReactLocalDev()` plugin: linked-package dev, `dist/` watch, src alias when `dist/` is missing
|
|
18
|
+
- **`examples/app-kit`** recipe gallery and reference dashboard
|
|
19
|
+
- **`AGENTS.md`** section for app kit + recipes
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- **`ChartPanel`** — same shell as `MetricChartCard` (title row + flush plot); `ChartArtifactView` supports `embedded` mode
|
|
24
|
+
- **Chart artifacts** — area/line/bar route through `LineAreaChart` with flush layout and improved styling
|
|
25
|
+
- **`Button`** — pill shape by default; re-exported from `/app` for catalog CTAs
|
|
26
|
+
- **`StatTile`** — typography aligned with platform metrics (normal weight, compact labels)
|
|
27
|
+
- **Integration / resource / metric cards** — elevated secondary chrome; no background flash on card click (reserved for `Button`)
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- Local dev **404 on `*.esm.js`** when `dist/` is empty — vite plugin falls back to `src/` with a console warning
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## [0.6.1]
|
|
36
|
+
|
|
37
|
+
Subpath exports (`/chat`, `/studio`, `/ui`, `/app`), layered package architecture, initial app kit (`AppShell`, `Page`, `DataTable`, …).
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
React components and runtime for building Timbal chat UIs and studio apps. Drop in a single component to get a fully-featured streaming chat interface connected to a Timbal workforce agent, or compose dashboards with the **app kit**.
|
|
4
4
|
|
|
5
|
-
## Package structure (0.
|
|
5
|
+
## Package structure (0.7+)
|
|
6
6
|
|
|
7
7
|
| Subpath | Use when |
|
|
8
8
|
|---------|----------|
|
|
@@ -49,7 +49,7 @@ The package ships pre-built Tailwind class names **plus a complete light + dark
|
|
|
49
49
|
@source "../node_modules/@timbal-ai/timbal-react/dist";
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
That's it — no `@theme`, `:root`, or `.dark` blocks of your own. Toggling dark mode is a single `document.documentElement.classList.toggle("dark")` (or `next-themes` `attribute="class"`).
|
|
52
|
+
That's it — no `@theme`, `:root`, or `.dark` blocks of your own. Toggling dark mode is a single `document.documentElement.classList.toggle("dark")` (or `next-themes` `attribute="class"`). The built-in `ModeToggle` (uncontrolled) persists to `localStorage` key `timbal-theme` and restores on reload.
|
|
53
53
|
|
|
54
54
|
> Adjust the `@source` path if your CSS file lives at a different depth relative to `node_modules`.
|
|
55
55
|
|
|
@@ -905,11 +905,30 @@ The shell renders a rounded floating panel (bottom-right) and a **text-only** pi
|
|
|
905
905
|
| `AppCopilotProvider` | Page context via `useAppCopilotContext` (not shown in UI) |
|
|
906
906
|
| `AppChatPanel` | Full-height floating thread; dismiss via **X** in the corner |
|
|
907
907
|
| `AppShell` `chat` | Floating overlay — `chatWidth`; optional `chatHeight` (default: stretch top–bottom) |
|
|
908
|
-
| `
|
|
908
|
+
| `LineAreaChart` / `Sparkline` | Dependency-free charts (smooth area/line/bar, hover tooltip, responsive) |
|
|
909
|
+
| `MetricRow` | Platform KPI strip in one card (overview metrics, no chart) |
|
|
910
|
+
| `MetricChartCard` | `MetricRow` + selectable flush chart (Analytics / Infrastructure) |
|
|
911
|
+
| `ChartPanel` `artifact` | Chrome around a `ChartArtifact` or any chart |
|
|
912
|
+
| `SettingsSection` / `FieldRow` / `DangerZone` / `FloatingUnsavedChangesBar` | Two-column settings page building blocks |
|
|
913
|
+
| `IntegrationCard` / `ConnectionRow` / `PlanBadge` / `IntegrationsEmptyState` | Integration catalog + connected list |
|
|
914
|
+
| `InfoCard` / `DescriptionList` / `ExpandableSection` / `ResourceCard` / `StatusDot` | Surfaces & detail views |
|
|
909
915
|
| `FieldTextarea` / `FieldSelect` / `FieldSwitch` | Settings forms matching `FieldInput` |
|
|
910
916
|
| `AppConfirmDialog` | Delete/export confirmations |
|
|
911
917
|
|
|
912
|
-
|
|
918
|
+
Inject `APP_KIT_AGENT_INSTRUCTIONS` into codegen / workforce prompts (same idea as `ARTIFACT_AGENT_INSTRUCTIONS`). Agents should compose **creatively** from the component menu — not clone a single demo layout.
|
|
919
|
+
|
|
920
|
+
```ts
|
|
921
|
+
import { APP_KIT_AGENT_INSTRUCTIONS } from "@timbal-ai/timbal-react/app";
|
|
922
|
+
|
|
923
|
+
const systemPrompt = `${basePrompt}\n\n${APP_KIT_AGENT_INSTRUCTIONS}`;
|
|
924
|
+
```
|
|
925
|
+
|
|
926
|
+
| Examples | Purpose |
|
|
927
|
+
|----------|---------|
|
|
928
|
+
| [`examples/app-kit/src/recipes/`](examples/app-kit/src/recipes/) | Short patterns (metrics, table, forms, copilot, …) — **preferred for agents** |
|
|
929
|
+
| [`examples/app-kit/src/reference/`](examples/app-kit/src/reference/) | One full wired dashboard — **reference only** |
|
|
930
|
+
|
|
931
|
+
Browse locally: [`examples/app-kit`](examples/app-kit) (`bun run example:app`).
|
|
913
932
|
|
|
914
933
|
---
|
|
915
934
|
|
|
@@ -958,7 +977,7 @@ Everything else (the three shells, primitives, hooks, auth, artifact API, design
|
|
|
958
977
|
## Examples
|
|
959
978
|
|
|
960
979
|
- [`examples/mock-ui`](examples/mock-ui) — chat + artifact gallery (mock `fetch`).
|
|
961
|
-
- [`examples/app-kit`](examples/app-kit) —
|
|
980
|
+
- [`examples/app-kit`](examples/app-kit) — app kit **recipes** + optional **reference** dashboard (see `APP_KIT_AGENT_INSTRUCTIONS`).
|
|
962
981
|
|
|
963
982
|
## Mock UI demo
|
|
964
983
|
|