@timbal-ai/timbal-react 1.4.0 → 1.6.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 (57) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +43 -4
  3. package/dist/app.cjs +3770 -1506
  4. package/dist/app.d.cts +76 -31
  5. package/dist/app.d.ts +76 -31
  6. package/dist/app.esm.js +30 -8
  7. package/dist/{chart-artifact-C8-Py6lc.d.cts → chart-artifact-C2pZQsaP.d.ts} +247 -41
  8. package/dist/{chart-artifact-CMnDys2t.d.ts → chart-artifact-VAqgH-My.d.cts} +247 -41
  9. package/dist/{chat-ClmzWzCX.d.cts → chat-DDsp-Vzz.d.cts} +1 -1
  10. package/dist/{chat-ClmzWzCX.d.ts → chat-DDsp-Vzz.d.ts} +1 -1
  11. package/dist/chat.cjs +280 -123
  12. package/dist/chat.d.cts +3 -3
  13. package/dist/chat.d.ts +3 -3
  14. package/dist/chat.esm.js +4 -3
  15. package/dist/chunk-24B4I4XC.esm.js +232 -0
  16. package/dist/{chunk-VOWNCS3F.esm.js → chunk-6SQMTBPL.esm.js} +1669 -504
  17. package/dist/chunk-EDEKQYSU.esm.js +10 -0
  18. package/dist/{chunk-QIABF4KB.esm.js → chunk-ELEY66OH.esm.js} +2 -2
  19. package/dist/{chunk-THBA27QY.esm.js → chunk-HSL36SJ4.esm.js} +243 -124
  20. package/dist/chunk-JJOO4PR5.esm.js +391 -0
  21. package/dist/{chunk-QU7ET55D.esm.js → chunk-MBS7XHV2.esm.js} +335 -192
  22. package/dist/chunk-NO5AWNWT.esm.js +1066 -0
  23. package/dist/{chunk-VXMM2HX7.esm.js → chunk-R4RQT2XQ.esm.js} +3 -3
  24. package/dist/{chunk-OFWC4MIY.esm.js → chunk-TMP7RIA7.esm.js} +5 -3
  25. package/dist/{chunk-GQBYZRD7.esm.js → chunk-WQIQW7EM.esm.js} +40 -28
  26. package/dist/{chunk-OH23AX2V.esm.js → chunk-YYEI6XME.esm.js} +441 -957
  27. package/dist/{circular-progress-Ci8L-Hfa.d.cts → circular-progress-B9nnwzCu.d.cts} +20 -78
  28. package/dist/{circular-progress-Ci8L-Hfa.d.ts → circular-progress-B9nnwzCu.d.ts} +20 -78
  29. package/dist/index.cjs +5547 -3192
  30. package/dist/index.d.cts +10 -8
  31. package/dist/index.d.ts +10 -8
  32. package/dist/index.esm.js +76 -44
  33. package/dist/kanban-FFBeaZPS.d.cts +212 -0
  34. package/dist/kanban-FFBeaZPS.d.ts +212 -0
  35. package/dist/{layout-BTJyU8wd.d.ts → layout-CuKeSY74.d.ts} +1 -1
  36. package/dist/{layout-C2G-FcER.d.cts → layout-PzVwkJyL.d.cts} +1 -1
  37. package/dist/site.cjs +429 -0
  38. package/dist/site.d.cts +198 -0
  39. package/dist/site.d.ts +198 -0
  40. package/dist/site.esm.js +23 -0
  41. package/dist/studio.cjs +722 -363
  42. package/dist/studio.d.cts +2 -2
  43. package/dist/studio.d.ts +2 -2
  44. package/dist/studio.esm.js +8 -6
  45. package/dist/styles.css +56 -0
  46. package/dist/{timbal-v2-button-CNfdwGq4.d.cts → timbal-v2-button-DCAZNyUx.d.cts} +3 -3
  47. package/dist/{timbal-v2-button-CNfdwGq4.d.ts → timbal-v2-button-DCAZNyUx.d.ts} +3 -3
  48. package/dist/ui.cjs +1553 -708
  49. package/dist/ui.d.cts +11 -4
  50. package/dist/ui.d.ts +11 -4
  51. package/dist/ui.esm.js +45 -36
  52. package/dist/{welcome-DXqsGTwH.d.ts → welcome-B00oH5Io.d.cts} +5 -1
  53. package/dist/{welcome-BFGRoNfK.d.cts → welcome-DU-4NTjZ.d.ts} +5 -1
  54. package/package.json +9 -1
  55. package/dist/button-BoyX5pM_.d.cts +0 -18
  56. package/dist/button-BoyX5pM_.d.ts +0 -18
  57. package/dist/chunk-UCGVL7ZY.esm.js +0 -52
package/CHANGELOG.md CHANGED
@@ -4,6 +4,36 @@ All notable changes to `@timbal-ai/timbal-react` are documented here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [1.6.0] — 2026-06-26
8
+
9
+ ### Changed
10
+
11
+ - **Condensed layout density across all UI primitives** — heights, paddings, and gaps were stepped down one notch library-wide for a tighter, more data-dense default. Driven from the shared tokens (`CONTROL_SIZE` h-10→h-9 / h-9→h-8 in `src/design/control-surface.ts`, `TOPBAR_HEIGHT_PX` 48→44 and `PILL_HEIGHT_PX` 40→36 in `src/design/tokens.ts`, `TIMBAL_V2_SIZE_HEIGHT`/`SIZE_ICON`/`SIZE_LABEL_PX` in `src/design/button-tokens.ts`, segmented-control paddings in `src/design/pill-segmented-classes.ts`) and applied consistently to `Button`, `UntitledButton`, `Card`, `Table`, `Alert`, `Dialog`, `Sheet`, `Popover`, `Accordion`, `Select`, `DropdownMenu`, `Menubar`, `Command`, `TagInput`, `Toolbar`, `Toast`, `Avatar`, `Calendar`, `Textarea`, `CopyButton`, `Snippet`, `InputOTP`, and `Breadcrumb`. Non-breaking: all component APIs and size variant names are unchanged.
12
+
13
+ ### Fixed
14
+
15
+ - **Badges no longer stretch inside flex-column layouts** — `StatusBadge` (`src/app/surfaces/StatusBadge.tsx`) and the artifact `badge` node (`src/artifacts/ui/nodes.tsx`) now carry `w-fit shrink-0`, so a badge placed in a vertical flex container (e.g. a `Kanban` card) hugs its label instead of expanding to the full column width.
16
+
17
+ ## [1.5.0] — 2026-06-26
18
+
19
+ ### Added
20
+
21
+ - **`Kanban` board primitive** (`src/ui/kanban.tsx`) — A fully-featured, highly accessible Kanban board with column customization, drag-and-drop capabilities powered by `@dnd-kit`, and a read-only mode for static board rendering.
22
+ - **App density system** (`src/app/layout/app-density-context.tsx`, `src/design/app-density.ts`) — Context-driven density controls supporting "standard" and "compact" layouts. Compact mode cascades tighter padding, smaller text, and lower default heights to descendant components (pages, charts, tables).
23
+ - **Advanced filtering** (`src/app/data/FilterDropdown.tsx`, `src/app/data/FilterField.tsx`) — `FilterDropdown` is a **data-driven** multi-facet filter popover: pass `fields` describing your actual columns (`multiselect` / `text` / `daterange` / `numeric`) and it adapts to the table's content. State is keyed by field `id`, controlled (`value` + `onChange`) or uncontrolled (`defaultValue`); every control is on the shared control-surface contract. It renders **removable active-filter pills** (with "Clear all") next to the trigger by default (`showActiveChips`). `FilterField` is the labeled single-control wrapper for `FilterBar`.
24
+ - **Site/Marketing primitives** (`src/site/`) — A brand new `./site` subpath export containing five high-quality interactive and marketing-grade components:
25
+ - **`Magnetic`** — magnetic hover effect that pulls elements toward the cursor.
26
+ - **`Marquee`** — high-performance, infinite scrolling marquee.
27
+ - **`Parallax`** — scroll-driven parallax container with custom speed factors.
28
+ - **`Reveal`** — scroll or entrance fade-in reveal with custom directions and delays.
29
+ - **`TextReveal`** — character-by-character or word-by-word scroll-reveal animations.
30
+
31
+ ### Agent instructions & exports
32
+
33
+ - **`SITE_AGENT_INSTRUCTIONS`** — a new codegen prompt (exported from `./site` and the package root) documenting the `/site` motion primitives, their props, reduced-motion/SSR guarantees, and dosing/anti-overuse guidance.
34
+ - **`/site` primitives re-exported from the package root** — `Reveal`, `TextReveal`, `Parallax`, `Marquee`, `Magnetic` (plus the `EASE` / `DURATION` / `SPRING` motion tokens) are now reachable from both `@timbal-ai/timbal-react` and `@timbal-ai/timbal-react/site`, matching `/studio`, `/app`, and `/ui`.
35
+ - **`APP_KIT_AGENT_INSTRUCTIONS` expanded** — documents `FilterDropdown` and surfaces the new dependency-free `/ui` primitives (`Stepper`, `Rating`, `NumberField`, `TagInput`, `AvatarGroup`, `CircularProgress`, `CopyButton`, `Snippet`) so codegen agents discover them.
36
+
7
37
  ## [1.4.0] — 2026-06-05
8
38
 
9
39
  ### Added
package/README.md CHANGED
@@ -11,6 +11,7 @@ React components and runtime for building Timbal chat UIs and studio apps. Drop
11
11
  | `@timbal-ai/timbal-react/studio` | Studio chrome — `TimbalChatShell`, `TimbalStudioShell`, sidebar |
12
12
  | `@timbal-ai/timbal-react/ui` | Primitives — `Button`, `Dialog`, `DropdownMenu`, `Popover`, `Select`, `Tooltip`, `Avatar`, `Shimmer` |
13
13
  | `@timbal-ai/timbal-react/app` | Dashboards — `AppShell`, `Page`, `DataTable`, `StatTile`, … |
14
+ | `@timbal-ai/timbal-react/site` | Marketing/brand motion — `Reveal`, `TextReveal`, `Parallax`, `Marquee`, `Magnetic` |
14
15
  | `@timbal-ai/timbal-react/styles.css` | Theme tokens (required once) |
15
16
 
16
17
  ### API tiers
@@ -342,12 +343,26 @@ function MyShell() {
342
343
  To inset a main column that follows the sidebar as it collapses, use `AppShell`, which wires the tracking automatically:
343
344
 
344
345
  ```tsx
345
- import { AppShell, StudioSidebar } from "@timbal-ai/timbal-react";
346
+ import { AppShell, StudioSidebar, useAppShellNav } from "@timbal-ai/timbal-react";
347
+
348
+ // Rendered inside AppShell, so it can read the shell's mobile-nav controls and
349
+ // wire the drawer. The sidebar already closes itself on selection (mobile).
350
+ function Sidebar({ agent, onSelect }: { agent: string; onSelect: (id: string) => void }) {
351
+ const nav = useAppShellNav();
352
+ return (
353
+ <StudioSidebar
354
+ selectedId={agent}
355
+ onSelect={onSelect}
356
+ mobileOpen={nav.open}
357
+ onMobileOpenChange={nav.setOpen}
358
+ />
359
+ );
360
+ }
346
361
 
347
362
  function MyShell() {
348
363
  const [agent, setAgent] = useState("agent-a");
349
364
  return (
350
- <AppShell sidebar={<StudioSidebar selectedId={agent} onSelect={setAgent} />}>
365
+ <AppShell sidebar={<Sidebar agent={agent} onSelect={setAgent} />}>
351
366
  {/* main content insets + animates with the sidebar */}
352
367
  </AppShell>
353
368
  );
@@ -961,6 +976,7 @@ import { controlClass, overlaySurfaceClass, overlayItemClass } from "@timbal-ai/
961
976
  - **Layout / disclosure:** `Accordion` · `AccordionItem` · `AccordionTrigger` · `AccordionContent` · `Separator` · `AspectRatio`
962
977
  - **Input chrome:** `InputGroup` (+ addon/control/text) · `Spinner`
963
978
  - **More primitives:** `AvatarGroup` (overflow stack) · `Stepper` (wizard progress) · `Timeline` (event rail) · `Rating` (stars) · `NumberField` (stepper input) · `TagInput` (chips) · `Banner` (page notice) · `CopyButton` · `Snippet` (code + copy) · `CircularProgress` (SVG ring) — all dependency-free, on the shared tokens / control surface
979
+ - **`Kanban`** (drag-and-drop board) — accessible columns + cards on `@dnd-kit` (pointer **and** keyboard sensors, cross-column moves, empty-column drop zones, drag overlay). Controlled (`columns` + `onColumnsChange`) or uncontrolled (`defaultColumns`); `onMove` reports `{ card, from, to }`. Variants: `density`, column `tone`, `cardVariant`. Requires the peer deps `@dnd-kit/core`, `@dnd-kit/sortable`, `@dnd-kit/utilities`.
964
980
 
965
981
  **Motion is built in.** Dialog, AlertDialog, Sheet, Popover, DropdownMenu, Select, Tooltip, Toast, NavigationMenu, and Accordion / Collapsible animate out of the box (fade / zoom / slide / height). The animation engine is **inlined in `styles.css`** — no `tailwindcss-animate` / `tw-animate-css` dependency and no consumer config. Duration flows from any `duration-*` utility (`--tw-duration`, default 150ms). When composing a custom overlay, reuse `overlayAnimationClass` rather than adding another animation library.
966
982
 
@@ -968,6 +984,30 @@ All primitives are Radix-backed (via the unified `radix-ui` package) or thin wra
968
984
 
969
985
  ---
970
986
 
987
+ ## Site kit (`@timbal-ai/timbal-react/site`)
988
+
989
+ Expressive **motion & interaction primitives** for marketing, brand, landing, and editorial pages — the counterpart to the `/app` dashboard kit. They animate whatever you put inside them (mechanics, not art direction), are **reduced-motion-aware** and **SSR-safe**, and build on the bundled `motion` engine (no extra dependencies).
990
+
991
+ ```tsx
992
+ import { Reveal, TextReveal, Parallax, Marquee, Magnetic } from "@timbal-ai/timbal-react/site";
993
+ ```
994
+
995
+ - **`Reveal`** — fade/slide a block in as it scrolls into view. `variant` (`fade` / `fade-up` / `fade-down` / `fade-left` / `fade-right` / `blur` / `scale` / `mask-up`), `delay`, `duration`, `distance`, `amount`, `repeat`, `as`.
996
+ - **`TextReveal`** — editorial headline entrance; a **string** child rides up token-by-token from a clip. `splitBy` (`words` / `lines`), `stagger`, `delay`, `duration`, `amount`, `repeat`, `as` (`span` / `h1`–`h4` / `p`).
997
+ - **`Parallax`** — translate a layer relative to scroll for depth. `speed` (-0.6…0.6), `axis` (`x` / `y`), `smooth`.
998
+ - **`Marquee`** — seamless infinite scrolling row (logo walls, tickers). `speed`, `direction`, `pauseOnHover`, `gap`.
999
+ - **`Magnetic`** — pointer-following affordance for a single interactive child (primary CTA / nav). `strength`, `max`, `spring`.
1000
+
1001
+ Motion tokens `EASE`, `DURATION`, and `SPRING` are exported for custom `motion` work that should match the kit's feel. For codegen agents, inject **`SITE_AGENT_INSTRUCTIONS`** (component menu + dosing guidance) into the system prompt:
1002
+
1003
+ ```ts
1004
+ import { SITE_AGENT_INSTRUCTIONS } from "@timbal-ai/timbal-react/site";
1005
+ ```
1006
+
1007
+ Use `/site` for the marketing/brand surface — not dashboards (`/app`) or in-chat widgets (artifacts).
1008
+
1009
+ ---
1010
+
971
1011
  ## Full example
972
1012
 
973
1013
  App shell with optional auth, using `TimbalChatShell` (agent list + chat in one component):
@@ -1045,7 +1085,6 @@ Compose a data UI with a **floating** copilot — main content stays full width:
1045
1085
  ```tsx
1046
1086
  import {
1047
1087
  AppShell,
1048
- AppShellTopbar,
1049
1088
  AppCopilotProvider,
1050
1089
  AppChatPanel,
1051
1090
  Page,
@@ -1057,7 +1096,7 @@ export function OperationsApp() {
1057
1096
  <AppCopilotProvider value={{ page: "Operations", tab: "overview" }}>
1058
1097
  <AppShell
1059
1098
  sidebar={<StudioSidebar /* … */ />}
1060
- topbar={<AppShellTopbar actions={<ModeToggle />} />}
1099
+ topbar={<div className="flex justify-end p-4"><ModeToggle /></div>}
1061
1100
  chat={
1062
1101
  <AppChatPanel workforceId="your-workforce-id" />
1063
1102
  }