@timbal-ai/timbal-react 0.6.1 → 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 +45 -3
- 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/dist/studio.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { M as ModeToggle, a as ModeToggleProps, b as ModeToggleTheme, S as STUDIO_NAV_MODE, c as StudioModeSwitch, d as StudioModeSwitchProps, e as StudioNavMode, f as StudioSidebar, g as StudioSidebarProps, h as StudioWelcome, i as StudioWelcomeProps, T as TimbalChatShell, j as TimbalChatShellProps, k as TimbalMark, l as TimbalMarkProps, m as TimbalStudioShell, n as TimbalStudioShellProps } from './welcome
|
|
1
|
+
export { M as ModeToggle, a as ModeToggleProps, b as ModeToggleTheme, S as STUDIO_NAV_MODE, c as StudioModeSwitch, d as StudioModeSwitchProps, e as StudioNavMode, f as StudioSidebar, g as StudioSidebarProps, h as StudioWelcome, i as StudioWelcomeProps, T as TimbalChatShell, j as TimbalChatShellProps, k as TimbalMark, l as TimbalMarkProps, m as TimbalStudioShell, n as TimbalStudioShellProps } from './welcome-C89Mgdaw.cjs';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
import './chat-CWtQWDtJ.cjs';
|
|
4
4
|
import 'react/jsx-runtime';
|
package/dist/studio.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { M as ModeToggle, a as ModeToggleProps, b as ModeToggleTheme, S as STUDIO_NAV_MODE, c as StudioModeSwitch, d as StudioModeSwitchProps, e as StudioNavMode, f as StudioSidebar, g as StudioSidebarProps, h as StudioWelcome, i as StudioWelcomeProps, T as TimbalChatShell, j as TimbalChatShellProps, k as TimbalMark, l as TimbalMarkProps, m as TimbalStudioShell, n as TimbalStudioShellProps } from './welcome-
|
|
1
|
+
export { M as ModeToggle, a as ModeToggleProps, b as ModeToggleTheme, S as STUDIO_NAV_MODE, c as StudioModeSwitch, d as StudioModeSwitchProps, e as StudioNavMode, f as StudioSidebar, g as StudioSidebarProps, h as StudioWelcome, i as StudioWelcomeProps, T as TimbalChatShell, j as TimbalChatShellProps, k as TimbalMark, l as TimbalMarkProps, m as TimbalStudioShell, n as TimbalStudioShellProps } from './welcome-BBmB3tl7.js';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
import './chat-CWtQWDtJ.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
package/dist/studio.esm.js
CHANGED
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
TimbalChatShell,
|
|
9
9
|
TimbalMark,
|
|
10
10
|
TimbalStudioShell
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-7O5VY3TP.esm.js";
|
|
12
|
+
import "./chunk-Z27GBSOT.esm.js";
|
|
13
|
+
import "./chunk-N3PYVTY5.esm.js";
|
|
14
|
+
import "./chunk-TLUF2RUL.esm.js";
|
|
15
|
+
import "./chunk-TDIJHV4I.esm.js";
|
|
16
|
+
import "./chunk-2XZ3S4OP.esm.js";
|
|
17
17
|
export {
|
|
18
18
|
ModeToggle,
|
|
19
19
|
STUDIO_NAV_MODE,
|
|
@@ -22,7 +22,7 @@ interface TimbalV2ButtonProps extends React.ComponentProps<"button"> {
|
|
|
22
22
|
isIconOnly?: boolean;
|
|
23
23
|
isLoading?: boolean;
|
|
24
24
|
fullWidth?: boolean;
|
|
25
|
-
/**
|
|
25
|
+
/** Kept for API compatibility — all shapes render fully rounded (`rounded-full`). */
|
|
26
26
|
shape?: "pill" | "rect";
|
|
27
27
|
/**
|
|
28
28
|
* When true, merges props onto the single child element (Radix Slot).
|
|
@@ -22,7 +22,7 @@ interface TimbalV2ButtonProps extends React.ComponentProps<"button"> {
|
|
|
22
22
|
isIconOnly?: boolean;
|
|
23
23
|
isLoading?: boolean;
|
|
24
24
|
fullWidth?: boolean;
|
|
25
|
-
/**
|
|
25
|
+
/** Kept for API compatibility — all shapes render fully rounded (`rounded-full`). */
|
|
26
26
|
shape?: "pill" | "rect";
|
|
27
27
|
/**
|
|
28
28
|
* When true, merges props onto the single child element (Radix Slot).
|
package/dist/ui.cjs
CHANGED
|
@@ -156,6 +156,10 @@ var TIMBAL_V2_SWITCH_THUMB = cn(
|
|
|
156
156
|
TIMBAL_V2_ELEVATED_GRADIENT,
|
|
157
157
|
"border border-border/80 shadow-sm"
|
|
158
158
|
);
|
|
159
|
+
var TIMBAL_V2_ELEVATED_SURFACE = cn(
|
|
160
|
+
TIMBAL_V2_ELEVATED_GRADIENT,
|
|
161
|
+
"border border-border shadow-card"
|
|
162
|
+
);
|
|
159
163
|
var TIMBAL_V2_SECONDARY_CHROME = [
|
|
160
164
|
TIMBAL_V2_ELEVATED_GRADIENT,
|
|
161
165
|
"border border-border shadow-card",
|
|
@@ -163,6 +167,11 @@ var TIMBAL_V2_SECONDARY_CHROME = [
|
|
|
163
167
|
"hover:from-secondary-fill-hover-from hover:to-secondary-fill-hover-to",
|
|
164
168
|
"active:from-secondary-fill-active-from active:to-secondary-fill-active-to"
|
|
165
169
|
].join(" ");
|
|
170
|
+
var TIMBAL_V2_LOGO_TILE = cn(
|
|
171
|
+
"bg-gradient-to-b from-white to-neutral-100",
|
|
172
|
+
"border border-neutral-200",
|
|
173
|
+
"shadow-[0_1px_2px_-0.5px_rgba(0,0,0,0.08)]"
|
|
174
|
+
);
|
|
166
175
|
|
|
167
176
|
// src/ui/timbal-v2-button.tsx
|
|
168
177
|
var React = __toESM(require("react"), 1);
|
|
@@ -207,7 +216,7 @@ var TimbalV2Button = React.forwardRef(function TimbalV2Button2({
|
|
|
207
216
|
isIconOnly = false,
|
|
208
217
|
isLoading = false,
|
|
209
218
|
fullWidth = false,
|
|
210
|
-
shape = "pill",
|
|
219
|
+
shape: _shape = "pill",
|
|
211
220
|
asChild = false,
|
|
212
221
|
className,
|
|
213
222
|
disabled,
|
|
@@ -217,7 +226,7 @@ var TimbalV2Button = React.forwardRef(function TimbalV2Button2({
|
|
|
217
226
|
}, ref) {
|
|
218
227
|
const isDisabled = disabled || isLoading;
|
|
219
228
|
const sizeClass = isIconOnly ? TIMBAL_V2_SIZE_ICON[size] : TIMBAL_V2_SIZE_HEIGHT[size];
|
|
220
|
-
const radiusClass =
|
|
229
|
+
const radiusClass = "rounded-full";
|
|
221
230
|
const sharedRootClass = cn(
|
|
222
231
|
"relative box-border inline-flex items-center justify-center gap-2 whitespace-nowrap border-0 text-sm font-normal shadow-none transition duration-200 ease-in-out",
|
|
223
232
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-1 focus-visible:ring-offset-background",
|
|
@@ -347,7 +356,7 @@ function Button({
|
|
|
347
356
|
"data-size": size,
|
|
348
357
|
variant: v2Variant,
|
|
349
358
|
size: v2Size,
|
|
350
|
-
shape: "
|
|
359
|
+
shape: "pill",
|
|
351
360
|
isIconOnly,
|
|
352
361
|
asChild,
|
|
353
362
|
className: cn(buttonVariants({ variant, size, className })),
|
package/dist/ui.d.cts
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
|
+
export { B as Button } from './button-CIKzUrJI.cjs';
|
|
1
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ElementType, ReactNode, FC } from 'react';
|
|
5
|
-
import { VariantProps } from 'class-variance-authority';
|
|
6
5
|
import { Tooltip as Tooltip$1, Avatar as Avatar$1, Dialog as Dialog$1 } from 'radix-ui';
|
|
7
|
-
export { a as TimbalV2Button } from './timbal-v2-button-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* Layout-only variants for consumers that compose `buttonVariants` directly.
|
|
11
|
-
* Fill / border / shadow come from `button-tokens` via `TimbalV2Button`.
|
|
12
|
-
*/
|
|
13
|
-
declare const buttonVariants: (props?: ({
|
|
14
|
-
variant?: "secondary" | "ghost" | "destructive" | "link" | "default" | "outline" | null | undefined;
|
|
15
|
-
size?: "xs" | "sm" | "lg" | "default" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
16
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
17
|
-
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
18
|
-
asChild?: boolean;
|
|
19
|
-
}): react_jsx_runtime.JSX.Element;
|
|
6
|
+
export { a as TimbalV2Button } from './timbal-v2-button-CNfdwGq4.cjs';
|
|
7
|
+
import 'class-variance-authority/types';
|
|
8
|
+
import 'class-variance-authority';
|
|
20
9
|
|
|
21
10
|
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof Tooltip$1.Provider>): react_jsx_runtime.JSX.Element;
|
|
22
11
|
declare function Tooltip({ ...props }: React.ComponentProps<typeof Tooltip$1.Root>): react_jsx_runtime.JSX.Element;
|
|
@@ -71,4 +60,4 @@ interface PillSegmentedTabsProps {
|
|
|
71
60
|
declare const PillSegmentedTabs: FC<PillSegmentedTabsProps>;
|
|
72
61
|
declare const MemoPillSegmentedTabs: React.NamedExoticComponent<PillSegmentedTabsProps>;
|
|
73
62
|
|
|
74
|
-
export { Avatar, AvatarFallback, AvatarImage,
|
|
63
|
+
export { Avatar, AvatarFallback, AvatarImage, Dialog, DialogClose, DialogContent, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, MemoPillSegmentedTabs, type PillSegmentedTab, PillSegmentedTabs, type PillSegmentedTabsProps, Shimmer, type TextShimmerProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
|
+
export { B as Button } from './button-CIKzUrJI.js';
|
|
1
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ElementType, ReactNode, FC } from 'react';
|
|
5
|
-
import { VariantProps } from 'class-variance-authority';
|
|
6
5
|
import { Tooltip as Tooltip$1, Avatar as Avatar$1, Dialog as Dialog$1 } from 'radix-ui';
|
|
7
|
-
export { a as TimbalV2Button } from './timbal-v2-button-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* Layout-only variants for consumers that compose `buttonVariants` directly.
|
|
11
|
-
* Fill / border / shadow come from `button-tokens` via `TimbalV2Button`.
|
|
12
|
-
*/
|
|
13
|
-
declare const buttonVariants: (props?: ({
|
|
14
|
-
variant?: "secondary" | "ghost" | "destructive" | "link" | "default" | "outline" | null | undefined;
|
|
15
|
-
size?: "xs" | "sm" | "lg" | "default" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
16
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
17
|
-
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
18
|
-
asChild?: boolean;
|
|
19
|
-
}): react_jsx_runtime.JSX.Element;
|
|
6
|
+
export { a as TimbalV2Button } from './timbal-v2-button-CNfdwGq4.js';
|
|
7
|
+
import 'class-variance-authority/types';
|
|
8
|
+
import 'class-variance-authority';
|
|
20
9
|
|
|
21
10
|
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof Tooltip$1.Provider>): react_jsx_runtime.JSX.Element;
|
|
22
11
|
declare function Tooltip({ ...props }: React.ComponentProps<typeof Tooltip$1.Root>): react_jsx_runtime.JSX.Element;
|
|
@@ -71,4 +60,4 @@ interface PillSegmentedTabsProps {
|
|
|
71
60
|
declare const PillSegmentedTabs: FC<PillSegmentedTabsProps>;
|
|
72
61
|
declare const MemoPillSegmentedTabs: React.NamedExoticComponent<PillSegmentedTabsProps>;
|
|
73
62
|
|
|
74
|
-
export { Avatar, AvatarFallback, AvatarImage,
|
|
63
|
+
export { Avatar, AvatarFallback, AvatarImage, Dialog, DialogClose, DialogContent, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, MemoPillSegmentedTabs, type PillSegmentedTab, PillSegmentedTabs, type PillSegmentedTabsProps, Shimmer, type TextShimmerProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
package/dist/ui.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MemoPillSegmentedTabs,
|
|
3
3
|
PillSegmentedTabs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TDIJHV4I.esm.js";
|
|
5
5
|
import {
|
|
6
6
|
Avatar,
|
|
7
7
|
AvatarFallback,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
TooltipContent,
|
|
21
21
|
TooltipProvider,
|
|
22
22
|
TooltipTrigger
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2XZ3S4OP.esm.js";
|
|
24
24
|
export {
|
|
25
25
|
Avatar,
|
|
26
26
|
AvatarFallback,
|
|
@@ -151,9 +151,10 @@ interface ModeToggleProps {
|
|
|
151
151
|
*
|
|
152
152
|
* 1. Pass `theme` + `setTheme` (e.g. from `next-themes`'s `useTheme`).
|
|
153
153
|
* The component is then fully controlled.
|
|
154
|
-
* 2. Omit both. The toggle reads
|
|
155
|
-
*
|
|
156
|
-
*
|
|
154
|
+
* 2. Omit both. The toggle reads/writes `.dark` on `<html>` and persists
|
|
155
|
+
* the choice to `localStorage` under `STORAGE_KEYS.theme`. For SSR or
|
|
156
|
+
* zero flash on first paint, mirror that key in a blocking `<script>` in
|
|
157
|
+
* `index.html` before your bundle loads.
|
|
157
158
|
*/
|
|
158
159
|
declare const ModeToggle: FC<ModeToggleProps>;
|
|
159
160
|
|
|
@@ -151,9 +151,10 @@ interface ModeToggleProps {
|
|
|
151
151
|
*
|
|
152
152
|
* 1. Pass `theme` + `setTheme` (e.g. from `next-themes`'s `useTheme`).
|
|
153
153
|
* The component is then fully controlled.
|
|
154
|
-
* 2. Omit both. The toggle reads
|
|
155
|
-
*
|
|
156
|
-
*
|
|
154
|
+
* 2. Omit both. The toggle reads/writes `.dark` on `<html>` and persists
|
|
155
|
+
* the choice to `localStorage` under `STORAGE_KEYS.theme`. For SSR or
|
|
156
|
+
* zero flash on first paint, mirror that key in a blocking `<script>` in
|
|
157
|
+
* `index.html` before your bundle loads.
|
|
157
158
|
*/
|
|
158
159
|
declare const ModeToggle: FC<ModeToggleProps>;
|
|
159
160
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@timbal-ai/timbal-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "React components and runtime for building Timbal chat and studio apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"vite",
|
|
44
44
|
"scripts/dev-linked.mjs",
|
|
45
45
|
"README.md",
|
|
46
|
+
"CHANGELOG.md",
|
|
46
47
|
"LICENSE"
|
|
47
48
|
],
|
|
48
49
|
"scripts": {
|
package/vite/local-dev.mjs
CHANGED
|
@@ -23,6 +23,24 @@ const TIMBAL_REACT_EXPORTS = [
|
|
|
23
23
|
"@timbal-ai/timbal-react/app",
|
|
24
24
|
];
|
|
25
25
|
|
|
26
|
+
/** Subpath → source entry (used when `dist/*.esm.js` is missing). */
|
|
27
|
+
const SOURCE_ENTRIES = {
|
|
28
|
+
"@timbal-ai/timbal-react": "src/index.ts",
|
|
29
|
+
"@timbal-ai/timbal-react/chat": "src/chat.ts",
|
|
30
|
+
"@timbal-ai/timbal-react/studio": "src/studio.ts",
|
|
31
|
+
"@timbal-ai/timbal-react/ui": "src/ui.ts",
|
|
32
|
+
"@timbal-ai/timbal-react/app": "src/app.ts",
|
|
33
|
+
"@timbal-ai/timbal-react/styles.css": "src/styles.css",
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
function distIsBuilt(distDir) {
|
|
37
|
+
try {
|
|
38
|
+
return fs.statSync(path.join(distDir, "index.esm.js")).isFile();
|
|
39
|
+
} catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
26
44
|
/**
|
|
27
45
|
* CJS-only transitive deps that must be pre-bundled even when the package itself
|
|
28
46
|
* is excluded, so their `useSyncExternalStore` named imports resolve as ESM.
|
|
@@ -82,22 +100,46 @@ export function timbalReactLocalDev() {
|
|
|
82
100
|
if (!pkgRoot) return {};
|
|
83
101
|
|
|
84
102
|
distDir = path.join(pkgRoot, "dist");
|
|
85
|
-
const
|
|
103
|
+
const built = distIsBuilt(distDir);
|
|
104
|
+
const srcDir = path.join(pkgRoot, "src");
|
|
105
|
+
const watchGlob = built
|
|
106
|
+
? `${distDir.replace(/\\/g, "/")}/**`
|
|
107
|
+
: `${srcDir.replace(/\\/g, "/")}/**`;
|
|
108
|
+
|
|
109
|
+
if (!built) {
|
|
110
|
+
console.warn(
|
|
111
|
+
"[timbal-react] dist/ is missing (404 on *.esm.js) — aliasing to src/. " +
|
|
112
|
+
"Run `bun run build` in timbal-react for production-like dev, or `bun run example:app` from the repo root.",
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** @type {Record<string, string>} */
|
|
117
|
+
const alias = {};
|
|
118
|
+
if (!built) {
|
|
119
|
+
for (const [pkg, rel] of Object.entries(SOURCE_ENTRIES)) {
|
|
120
|
+
alias[pkg] = path.join(pkgRoot, rel);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
86
123
|
|
|
87
124
|
return {
|
|
125
|
+
resolve: Object.keys(alias).length ? { alias } : undefined,
|
|
88
126
|
optimizeDeps: {
|
|
89
127
|
exclude: TIMBAL_REACT_EXPORTS,
|
|
90
128
|
include: CJS_INTEROP_DEPS,
|
|
91
129
|
},
|
|
92
130
|
server: {
|
|
93
131
|
watch: {
|
|
94
|
-
ignored: ["**/.git/**", "**/node_modules/**", `!${
|
|
132
|
+
ignored: ["**/.git/**", "**/node_modules/**", `!${watchGlob}`],
|
|
95
133
|
},
|
|
96
134
|
},
|
|
97
135
|
};
|
|
98
136
|
},
|
|
99
137
|
handleHotUpdate({ file, server }) {
|
|
100
|
-
if (!distDir
|
|
138
|
+
if (!distDir) return;
|
|
139
|
+
const srcDir = path.join(path.dirname(distDir), "src");
|
|
140
|
+
const isDist = file.startsWith(distDir);
|
|
141
|
+
const isSrc = file.startsWith(srcDir);
|
|
142
|
+
if (!isDist && !isSrc) return;
|
|
101
143
|
|
|
102
144
|
for (const mod of server.moduleGraph.idToModuleMap.values()) {
|
|
103
145
|
if (
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes } from 'react';
|
|
2
|
-
import { w as TimbalRuntimeProviderProps, q as ThreadProps, C as ChartArtifact } from './chat-CWtQWDtJ.js';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
interface AppShellProps {
|
|
6
|
-
/** Primary navigation (e.g. StudioSidebar or custom rail). */
|
|
7
|
-
sidebar?: ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* Global top bar (login, theme, account) — spans the full shell width (not
|
|
10
|
-
* the page `max-w-6xl` column). Use `<AppShellTopbar start actions />`.
|
|
11
|
-
*/
|
|
12
|
-
topbar?: ReactNode;
|
|
13
|
-
/** @deprecated Use `topbar`. */
|
|
14
|
-
header?: ReactNode;
|
|
15
|
-
/** Main routed content. */
|
|
16
|
-
children: ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
* Floating copilot panel (e.g. `<AppChatPanel />`). Overlays the dashboard;
|
|
19
|
-
* does not shrink the main column.
|
|
20
|
-
*/
|
|
21
|
-
chat?: ReactNode;
|
|
22
|
-
/** Floating panel width. Default: `24rem`. */
|
|
23
|
-
chatWidth?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Floating panel height. Omit to stretch between vertical shell insets
|
|
26
|
-
* (full page height with `top` / `bottom` margins).
|
|
27
|
-
*/
|
|
28
|
-
chatHeight?: string;
|
|
29
|
-
/** Controlled open state for the floating panel. */
|
|
30
|
-
chatOpen?: boolean;
|
|
31
|
-
/** Uncontrolled initial open state. Default: `false`. */
|
|
32
|
-
defaultChatOpen?: boolean;
|
|
33
|
-
onChatOpenChange?: (open: boolean) => void;
|
|
34
|
-
/** Show floating open/close control. Default: `true`. */
|
|
35
|
-
chatCollapsible?: boolean;
|
|
36
|
-
/** Label on the floating open trigger. Default: `Assistant`. */
|
|
37
|
-
chatTriggerLabel?: string;
|
|
38
|
-
/** Hide the built-in floating trigger (use your own + `useAppShellChat`). */
|
|
39
|
-
hideChatTrigger?: boolean;
|
|
40
|
-
className?: string;
|
|
41
|
-
mainClassName?: string;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* App-first layout: sidebar + topbar + main, with optional **floating** copilot.
|
|
45
|
-
*/
|
|
46
|
-
declare const AppShell: FC<AppShellProps>;
|
|
47
|
-
|
|
48
|
-
interface AppShellTopbarProps {
|
|
49
|
-
/** Leading cluster — mobile menu, product mark, org switcher. */
|
|
50
|
-
start?: ReactNode;
|
|
51
|
-
/** Trailing cluster — theme toggle, login, account menu. */
|
|
52
|
-
actions?: ReactNode;
|
|
53
|
-
/** Optional center content between start and actions. */
|
|
54
|
-
children?: ReactNode;
|
|
55
|
-
className?: string;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Global app chrome row inside `AppShell` — auth, theme, and account actions.
|
|
59
|
-
* Spans the full shell width via the shell’s `topbar` slot (wider than `<Page />`).
|
|
60
|
-
*/
|
|
61
|
-
declare const AppShellTopbar: FC<AppShellTopbarProps>;
|
|
62
|
-
|
|
63
|
-
interface AppShellChatTriggerProps {
|
|
64
|
-
className?: string;
|
|
65
|
-
label?: string;
|
|
66
|
-
/**
|
|
67
|
-
* `floating` — primary pill fixed bottom-right (matches shell default).
|
|
68
|
-
* `inline` — for topbar/actions rows; text only, no icons.
|
|
69
|
-
*/
|
|
70
|
-
placement?: "floating" | "inline";
|
|
71
|
-
}
|
|
72
|
-
/** Opens the floating copilot. Text only — no icons. */
|
|
73
|
-
declare const AppShellChatTrigger: FC<AppShellChatTriggerProps>;
|
|
74
|
-
|
|
75
|
-
interface AppShellChatControls {
|
|
76
|
-
open: boolean;
|
|
77
|
-
setOpen: (open: boolean) => void;
|
|
78
|
-
toggle: () => void;
|
|
79
|
-
collapsible: boolean;
|
|
80
|
-
}
|
|
81
|
-
declare function useAppShellChat(): AppShellChatControls | null;
|
|
82
|
-
|
|
83
|
-
interface PageHeaderProps {
|
|
84
|
-
title: ReactNode;
|
|
85
|
-
description?: ReactNode;
|
|
86
|
-
actions?: ReactNode;
|
|
87
|
-
className?: string;
|
|
88
|
-
}
|
|
89
|
-
declare const PageHeader: FC<PageHeaderProps>;
|
|
90
|
-
|
|
91
|
-
interface PageProps extends PageHeaderProps {
|
|
92
|
-
children: ReactNode;
|
|
93
|
-
/** Slot above the title (breadcrumbs). */
|
|
94
|
-
breadcrumbs?: ReactNode;
|
|
95
|
-
className?: string;
|
|
96
|
-
}
|
|
97
|
-
declare const Page: FC<PageProps>;
|
|
98
|
-
|
|
99
|
-
interface SectionProps {
|
|
100
|
-
title?: ReactNode;
|
|
101
|
-
description?: ReactNode;
|
|
102
|
-
children: ReactNode;
|
|
103
|
-
className?: string;
|
|
104
|
-
}
|
|
105
|
-
declare const Section: FC<SectionProps>;
|
|
106
|
-
|
|
107
|
-
type AppCopilotContextValue = Record<string, unknown>;
|
|
108
|
-
interface AppCopilotProviderProps {
|
|
109
|
-
value: AppCopilotContextValue;
|
|
110
|
-
children: ReactNode;
|
|
111
|
-
}
|
|
112
|
-
/** Supplies page/dashboard context for `AppChatPanel` and agent tools. */
|
|
113
|
-
declare const AppCopilotProvider: FC<AppCopilotProviderProps>;
|
|
114
|
-
declare function useAppCopilotContext(): AppCopilotContextValue;
|
|
115
|
-
|
|
116
|
-
interface AppChatPanelProps extends Omit<TimbalRuntimeProviderProps, "children">, Omit<ThreadProps, "variant" | "maxWidth"> {
|
|
117
|
-
className?: string;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Floating copilot body — `TimbalRuntimeProvider` + compact `Thread`.
|
|
121
|
-
* Render inside `AppShell` `chat`; open/close via shell trigger or `useAppShellChat`.
|
|
122
|
-
*/
|
|
123
|
-
declare const AppChatPanel: FC<AppChatPanelProps>;
|
|
124
|
-
|
|
125
|
-
interface SurfaceCardProps {
|
|
126
|
-
children: ReactNode;
|
|
127
|
-
className?: string;
|
|
128
|
-
}
|
|
129
|
-
declare const SurfaceCard: FC<SurfaceCardProps>;
|
|
130
|
-
|
|
131
|
-
interface StatTileProps {
|
|
132
|
-
label: ReactNode;
|
|
133
|
-
value: ReactNode;
|
|
134
|
-
hint?: ReactNode;
|
|
135
|
-
className?: string;
|
|
136
|
-
}
|
|
137
|
-
declare const StatTile: FC<StatTileProps>;
|
|
138
|
-
|
|
139
|
-
interface EmptyStateProps {
|
|
140
|
-
title: ReactNode;
|
|
141
|
-
description?: ReactNode;
|
|
142
|
-
action?: ReactNode;
|
|
143
|
-
className?: string;
|
|
144
|
-
}
|
|
145
|
-
declare const EmptyState: FC<EmptyStateProps>;
|
|
146
|
-
|
|
147
|
-
declare const statusBadgeToneClass: {
|
|
148
|
-
readonly default: "bg-muted text-foreground";
|
|
149
|
-
readonly primary: "bg-primary/10 text-primary";
|
|
150
|
-
readonly success: "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400";
|
|
151
|
-
readonly warn: "bg-amber-500/10 text-amber-600 dark:text-amber-400";
|
|
152
|
-
readonly muted: "bg-muted/80 text-muted-foreground";
|
|
153
|
-
};
|
|
154
|
-
type StatusBadgeTone = keyof typeof statusBadgeToneClass;
|
|
155
|
-
interface StatusBadgeProps {
|
|
156
|
-
children: ReactNode;
|
|
157
|
-
tone?: StatusBadgeTone;
|
|
158
|
-
className?: string;
|
|
159
|
-
}
|
|
160
|
-
declare const StatusBadge: FC<StatusBadgeProps>;
|
|
161
|
-
|
|
162
|
-
interface AppConfirmDialogProps {
|
|
163
|
-
open: boolean;
|
|
164
|
-
onOpenChange: (open: boolean) => void;
|
|
165
|
-
title: ReactNode;
|
|
166
|
-
description?: ReactNode;
|
|
167
|
-
confirmLabel?: string;
|
|
168
|
-
cancelLabel?: string;
|
|
169
|
-
onConfirm: () => void;
|
|
170
|
-
destructive?: boolean;
|
|
171
|
-
className?: string;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Confirm/cancel dialog for app flows (delete row, discard changes, etc.).
|
|
175
|
-
*/
|
|
176
|
-
declare const AppConfirmDialog: FC<AppConfirmDialogProps>;
|
|
177
|
-
|
|
178
|
-
interface SubNavItem {
|
|
179
|
-
id: string;
|
|
180
|
-
label: ReactNode;
|
|
181
|
-
}
|
|
182
|
-
interface SubNavProps {
|
|
183
|
-
items: SubNavItem[];
|
|
184
|
-
activeId: string;
|
|
185
|
-
onChange: (id: string) => void;
|
|
186
|
-
className?: string;
|
|
187
|
-
"aria-label"?: string;
|
|
188
|
-
/** Passed to the underlying pill control for shared-layout animation. */
|
|
189
|
-
layoutId?: string;
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Section tabs using the same pill segmented control as timbal-platform
|
|
193
|
-
* (Build/Manage, dashboard section bars).
|
|
194
|
-
*/
|
|
195
|
-
declare const SubNav: FC<SubNavProps>;
|
|
196
|
-
|
|
197
|
-
interface BreadcrumbItem {
|
|
198
|
-
label: ReactNode;
|
|
199
|
-
href?: string;
|
|
200
|
-
onClick?: () => void;
|
|
201
|
-
}
|
|
202
|
-
interface BreadcrumbsProps {
|
|
203
|
-
items: BreadcrumbItem[];
|
|
204
|
-
className?: string;
|
|
205
|
-
}
|
|
206
|
-
declare const Breadcrumbs: FC<BreadcrumbsProps>;
|
|
207
|
-
|
|
208
|
-
interface FieldProps {
|
|
209
|
-
label: ReactNode;
|
|
210
|
-
hint?: ReactNode;
|
|
211
|
-
error?: ReactNode;
|
|
212
|
-
children?: ReactNode;
|
|
213
|
-
className?: string;
|
|
214
|
-
htmlFor?: string;
|
|
215
|
-
}
|
|
216
|
-
declare const Field: FC<FieldProps>;
|
|
217
|
-
interface FieldInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
218
|
-
label: ReactNode;
|
|
219
|
-
hint?: ReactNode;
|
|
220
|
-
error?: ReactNode;
|
|
221
|
-
fieldClassName?: string;
|
|
222
|
-
}
|
|
223
|
-
declare const FieldInput: FC<FieldInputProps>;
|
|
224
|
-
|
|
225
|
-
interface FieldTextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
226
|
-
label: FieldProps["label"];
|
|
227
|
-
hint?: FieldProps["hint"];
|
|
228
|
-
error?: FieldProps["error"];
|
|
229
|
-
fieldClassName?: string;
|
|
230
|
-
}
|
|
231
|
-
declare const FieldTextarea: FC<FieldTextareaProps>;
|
|
232
|
-
|
|
233
|
-
interface FieldSelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|
234
|
-
label: FieldProps["label"];
|
|
235
|
-
hint?: FieldProps["hint"];
|
|
236
|
-
error?: FieldProps["error"];
|
|
237
|
-
fieldClassName?: string;
|
|
238
|
-
children: ReactNode;
|
|
239
|
-
}
|
|
240
|
-
declare const FieldSelect: FC<FieldSelectProps>;
|
|
241
|
-
|
|
242
|
-
interface FieldSwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
243
|
-
label: ReactNode;
|
|
244
|
-
description?: ReactNode;
|
|
245
|
-
className?: string;
|
|
246
|
-
}
|
|
247
|
-
declare const FieldSwitch: FC<FieldSwitchProps>;
|
|
248
|
-
|
|
249
|
-
interface SearchInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
250
|
-
className?: string;
|
|
251
|
-
}
|
|
252
|
-
declare const SearchInput: FC<SearchInputProps>;
|
|
253
|
-
|
|
254
|
-
interface FormSectionProps {
|
|
255
|
-
title?: ReactNode;
|
|
256
|
-
children: ReactNode;
|
|
257
|
-
className?: string;
|
|
258
|
-
}
|
|
259
|
-
declare const FormSection: FC<FormSectionProps>;
|
|
260
|
-
|
|
261
|
-
interface FilterBarProps {
|
|
262
|
-
children: ReactNode;
|
|
263
|
-
className?: string;
|
|
264
|
-
}
|
|
265
|
-
declare const FilterBar: FC<FilterBarProps>;
|
|
266
|
-
|
|
267
|
-
type DataTableSortDirection = "asc" | "desc";
|
|
268
|
-
interface DataTableSort {
|
|
269
|
-
columnId: string;
|
|
270
|
-
direction: DataTableSortDirection;
|
|
271
|
-
}
|
|
272
|
-
interface DataTableColumn<T> {
|
|
273
|
-
id: string;
|
|
274
|
-
header: ReactNode;
|
|
275
|
-
cell: (row: T) => ReactNode;
|
|
276
|
-
className?: string;
|
|
277
|
-
headerClassName?: string;
|
|
278
|
-
align?: "left" | "center" | "right";
|
|
279
|
-
sortable?: boolean;
|
|
280
|
-
/** Value used when sorting; defaults to stringifying `cell(row)`. */
|
|
281
|
-
sortValue?: (row: T) => string | number | boolean | Date | null | undefined;
|
|
282
|
-
}
|
|
283
|
-
interface DataTableProps<T> {
|
|
284
|
-
columns: DataTableColumn<T>[];
|
|
285
|
-
rows: T[];
|
|
286
|
-
getRowKey: (row: T) => string;
|
|
287
|
-
emptyTitle?: ReactNode;
|
|
288
|
-
emptyDescription?: ReactNode;
|
|
289
|
-
/** When `inline`, keeps the table chrome and shows an in-body empty message. */
|
|
290
|
-
emptyMode?: "replace" | "inline";
|
|
291
|
-
className?: string;
|
|
292
|
-
sort?: DataTableSort | null;
|
|
293
|
-
defaultSort?: DataTableSort | null;
|
|
294
|
-
onSortChange?: (sort: DataTableSort | null) => void;
|
|
295
|
-
showRowCount?: boolean;
|
|
296
|
-
rowCountLabel?: (count: number) => ReactNode;
|
|
297
|
-
footer?: ReactNode;
|
|
298
|
-
onRowClick?: (row: T) => void;
|
|
299
|
-
stickyHeader?: boolean;
|
|
300
|
-
dense?: boolean;
|
|
301
|
-
caption?: string;
|
|
302
|
-
}
|
|
303
|
-
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;
|
|
304
|
-
|
|
305
|
-
interface ChartPanelProps {
|
|
306
|
-
title?: ReactNode;
|
|
307
|
-
/** Built-in SVG chart — alternative to custom `children`. */
|
|
308
|
-
artifact?: ChartArtifact;
|
|
309
|
-
children?: ReactNode;
|
|
310
|
-
actions?: ReactNode;
|
|
311
|
-
className?: string;
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* Chrome for charts — pass `artifact` for the built-in renderer or any chart in `children`.
|
|
315
|
-
*/
|
|
316
|
-
declare const ChartPanel: FC<ChartPanelProps>;
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Lightweight SVG chart for the four basic chart types. We deliberately don't
|
|
320
|
-
* pull in `recharts` or similar — most artifact charts are small and these
|
|
321
|
-
* render fine at the cost of a few hundred lines of SVG. Apps that need
|
|
322
|
-
* production-grade charting can register a custom renderer that wraps their
|
|
323
|
-
* preferred lib.
|
|
324
|
-
*/
|
|
325
|
-
declare const ChartArtifactView: FC<{
|
|
326
|
-
artifact: ChartArtifact;
|
|
327
|
-
}>;
|
|
328
|
-
|
|
329
|
-
export { type StatusBadgeTone as $, AppChatPanel as A, type BreadcrumbItem as B, ChartArtifactView as C, DataTable as D, EmptyState as E, Field as F, type FieldSelectProps as G, FieldSwitch as H, type FieldSwitchProps as I, FieldTextarea as J, type FieldTextareaProps as K, FilterBar as L, type FilterBarProps as M, FormSection as N, type FormSectionProps as O, Page as P, PageHeader as Q, type PageHeaderProps as R, type PageProps as S, SearchInput as T, type SearchInputProps as U, Section as V, type SectionProps as W, StatTile as X, type StatTileProps as Y, StatusBadge as Z, type StatusBadgeProps as _, type AppChatPanelProps as a, SubNav as a0, type SubNavItem as a1, type SubNavProps as a2, SurfaceCard as a3, type SurfaceCardProps as a4, useAppCopilotContext as a5, useAppShellChat as a6, AppConfirmDialog as b, type AppConfirmDialogProps as c, type AppCopilotContextValue as d, AppCopilotProvider as e, type AppCopilotProviderProps as f, AppShell as g, type AppShellChatControls as h, AppShellChatTrigger as i, type AppShellChatTriggerProps as j, type AppShellProps as k, AppShellTopbar as l, type AppShellTopbarProps as m, Breadcrumbs as n, type BreadcrumbsProps as o, ChartPanel as p, type ChartPanelProps as q, type DataTableColumn as r, type DataTableProps as s, type DataTableSort as t, type DataTableSortDirection as u, type EmptyStateProps as v, FieldInput as w, type FieldInputProps as x, type FieldProps as y, FieldSelect as z };
|