@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.
- package/CHANGELOG.md +8 -1
- package/README.md +13 -7
- package/dist/app.cjs +1234 -867
- package/dist/app.d.cts +2 -2
- package/dist/app.d.ts +2 -2
- package/dist/app.esm.js +14 -6
- package/dist/{chart-artifact-CX-rh9nq.d.cts → chart-artifact-E58ve76I.d.cts} +29 -3
- package/dist/{chart-artifact-BZp7nmaf.d.ts → chart-artifact-_PEJgCpQ.d.ts} +29 -3
- package/dist/{chat-DCms8pJ_.d.cts → chat-ClmzWzCX.d.cts} +2 -0
- package/dist/{chat-DCms8pJ_.d.ts → chat-ClmzWzCX.d.ts} +2 -0
- package/dist/chat.cjs +868 -511
- package/dist/chat.d.cts +1 -1
- package/dist/chat.d.ts +1 -1
- package/dist/chat.esm.js +3 -3
- package/dist/{chunk-6HWMJNZT.esm.js → chunk-4VULP3CJ.esm.js} +1 -1
- package/dist/{chunk-XCM3V6RK.esm.js → chunk-AGJKK6R7.esm.js} +2 -2
- package/dist/{chunk-4AKJ6FKE.esm.js → chunk-BMXFXLVV.esm.js} +120 -22
- package/dist/{chunk-JEAUF54A.esm.js → chunk-FEYZUVBM.esm.js} +1 -1
- package/dist/{chunk-FRZOEYBO.esm.js → chunk-MTYXREHK.esm.js} +4 -4
- package/dist/{chunk-P3KDAYX6.esm.js → chunk-NAMKO2MU.esm.js} +1 -1
- package/dist/{chunk-YXZ22OJN.esm.js → chunk-UY7AKWJL.esm.js} +670 -402
- package/dist/{chunk-TK2AGIME.esm.js → chunk-XDIY2WSL.esm.js} +15 -13
- package/dist/index.cjs +1871 -1497
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.esm.js +21 -9
- package/dist/{pill-segmented-tabs-Ba5q0feL.d.cts → pill-segmented-tabs-BsIOW1Lo.d.cts} +32 -4
- package/dist/{pill-segmented-tabs-Ba5q0feL.d.ts → pill-segmented-tabs-BsIOW1Lo.d.ts} +32 -4
- package/dist/studio.cjs +1089 -732
- 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 +14 -16
- package/dist/ui.cjs +122 -22
- package/dist/ui.d.cts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.esm.js +8 -4
- package/dist/{welcome-CRqOPKMp.d.cts → welcome-BFGRoNfK.d.cts} +1 -1
- package/dist/{welcome-DlHUa3OL.d.ts → welcome-DXqsGTwH.d.ts} +1 -1
- package/package.json +1 -1
- package/vite/local-dev.d.ts +5 -1
- package/vite/local-dev.mjs +17 -13
package/dist/studio.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-BFGRoNfK.cjs';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
import './chat-
|
|
3
|
+
import './chat-ClmzWzCX.cjs';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import '@assistant-ui/react';
|
|
6
6
|
import '@timbal-ai/timbal-sdk';
|
package/dist/studio.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-DXqsGTwH.js';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
import './chat-
|
|
3
|
+
import './chat-ClmzWzCX.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import '@assistant-ui/react';
|
|
6
6
|
import '@timbal-ai/timbal-sdk';
|
package/dist/studio.esm.js
CHANGED
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
TimbalChatShell,
|
|
9
9
|
TimbalMark,
|
|
10
10
|
TimbalStudioShell
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MTYXREHK.esm.js";
|
|
12
12
|
import "./chunk-QIABF4KB.esm.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-AGJKK6R7.esm.js";
|
|
14
|
+
import "./chunk-UY7AKWJL.esm.js";
|
|
15
|
+
import "./chunk-NAMKO2MU.esm.js";
|
|
16
|
+
import "./chunk-BMXFXLVV.esm.js";
|
|
17
17
|
export {
|
|
18
18
|
ModeToggle,
|
|
19
19
|
STUDIO_NAV_MODE,
|
package/dist/styles.css
CHANGED
|
@@ -106,15 +106,14 @@
|
|
|
106
106
|
--ghost-fill-hover: oklch(0.965 0.002 260 / 0.7);
|
|
107
107
|
--ghost-fill-active: oklch(0.91 0.004 260 / 0.7);
|
|
108
108
|
|
|
109
|
-
/* Chart series palette —
|
|
110
|
-
the brand primary so single-series charts feel native; 2–6 are distinct.
|
|
109
|
+
/* Chart series palette — cohesive blue / indigo / cyan family.
|
|
111
110
|
Override any of these in your host app's :root to rebrand every chart. */
|
|
112
|
-
--chart-1:
|
|
113
|
-
--chart-2: oklch(0.
|
|
114
|
-
--chart-3: oklch(0.
|
|
115
|
-
--chart-4: oklch(0.
|
|
116
|
-
--chart-5: oklch(0.
|
|
117
|
-
--chart-6: oklch(0.
|
|
111
|
+
--chart-1: oklch(0.50 0.19 264);
|
|
112
|
+
--chart-2: oklch(0.58 0.14 230);
|
|
113
|
+
--chart-3: oklch(0.62 0.12 215);
|
|
114
|
+
--chart-4: oklch(0.54 0.17 278);
|
|
115
|
+
--chart-5: oklch(0.66 0.11 248);
|
|
116
|
+
--chart-6: oklch(0.44 0.11 252);
|
|
118
117
|
|
|
119
118
|
/* Code block surface (markdown). */
|
|
120
119
|
--code-block-bg: oklch(0.98 0 0);
|
|
@@ -245,14 +244,13 @@
|
|
|
245
244
|
--ghost-fill-hover: oklch(1 0 0 / 0.10);
|
|
246
245
|
--ghost-fill-active: oklch(1 0 0 / 0.15);
|
|
247
246
|
|
|
248
|
-
/* Chart series palette (dark) — brighter
|
|
249
|
-
|
|
250
|
-
--chart-
|
|
251
|
-
--chart-
|
|
252
|
-
--chart-
|
|
253
|
-
--chart-
|
|
254
|
-
--chart-
|
|
255
|
-
--chart-6: oklch(0.68 0.13 233);
|
|
247
|
+
/* Chart series palette (dark) — brighter blues for contrast on dark surfaces. */
|
|
248
|
+
--chart-1: oklch(0.68 0.17 264);
|
|
249
|
+
--chart-2: oklch(0.72 0.13 230);
|
|
250
|
+
--chart-3: oklch(0.76 0.11 215);
|
|
251
|
+
--chart-4: oklch(0.70 0.15 278);
|
|
252
|
+
--chart-5: oklch(0.78 0.10 248);
|
|
253
|
+
--chart-6: oklch(0.62 0.10 252);
|
|
256
254
|
|
|
257
255
|
--code-block-bg: oklch(0.19 0 0);
|
|
258
256
|
--code-header-bg: oklch(0.22 0 0 / 0.8);
|
package/dist/ui.cjs
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/ui.ts
|
|
31
31
|
var ui_exports = {};
|
|
32
32
|
__export(ui_exports, {
|
|
33
|
+
AVATAR_PRIMARY_FALLBACK_CLASS: () => AVATAR_PRIMARY_FALLBACK_CLASS,
|
|
33
34
|
Accordion: () => Accordion,
|
|
34
35
|
AccordionContent: () => AccordionContent,
|
|
35
36
|
AccordionItem: () => AccordionItem,
|
|
@@ -263,6 +264,7 @@ __export(ui_exports, {
|
|
|
263
264
|
TooltipProvider: () => TooltipProvider,
|
|
264
265
|
TooltipTrigger: () => TooltipTrigger,
|
|
265
266
|
alertVariants: () => alertVariants,
|
|
267
|
+
avatarChartVariantClass: () => avatarChartVariantClass,
|
|
266
268
|
badgeVariants: () => badgeVariants,
|
|
267
269
|
controlClass: () => controlClass,
|
|
268
270
|
controlSurfaceClass: () => controlSurfaceClass,
|
|
@@ -375,6 +377,33 @@ var TIMBAL_V2_SHADOW = {
|
|
|
375
377
|
ghost: "",
|
|
376
378
|
link: ""
|
|
377
379
|
};
|
|
380
|
+
var TIMBAL_V2_PRIMARY_SURFACE = cn(
|
|
381
|
+
TIMBAL_V2_PRIMARY_GRADIENT,
|
|
382
|
+
TIMBAL_V2_SHADOW.primary,
|
|
383
|
+
TIMBAL_V2_BORDER.primary
|
|
384
|
+
);
|
|
385
|
+
var TIMBAL_V2_PRIMARY_PILL_ROOT = cn(
|
|
386
|
+
"relative box-border inline-flex items-center justify-center overflow-hidden rounded-full border-0 bg-transparent p-0 font-normal shadow-none transition duration-200 ease-in-out",
|
|
387
|
+
TIMBAL_V2_SHADOW.primary,
|
|
388
|
+
TIMBAL_V2_BORDER.primary
|
|
389
|
+
);
|
|
390
|
+
var TIMBAL_V2_PRIMARY_PILL_FILL_LAYER = cn(
|
|
391
|
+
"pointer-events-none absolute inset-0 transition duration-200 ease-in-out",
|
|
392
|
+
"bg-gradient-to-b from-primary-fill-from to-primary-fill-to",
|
|
393
|
+
"group-hover/avatar:from-primary-fill-hover-from group-hover/avatar:to-primary-fill-hover-to",
|
|
394
|
+
"group-active/avatar:from-primary-fill-active-from group-active/avatar:to-primary-fill-active-to"
|
|
395
|
+
);
|
|
396
|
+
var TIMBAL_V2_SECONDARY_PILL_ROOT = cn(
|
|
397
|
+
"relative box-border inline-flex items-center justify-center overflow-hidden rounded-full bg-transparent p-0 font-normal shadow-none transition duration-200 ease-in-out",
|
|
398
|
+
TIMBAL_V2_SHADOW.secondary,
|
|
399
|
+
TIMBAL_V2_BORDER.secondary
|
|
400
|
+
);
|
|
401
|
+
var TIMBAL_V2_SECONDARY_PILL_FILL_LAYER = cn(
|
|
402
|
+
"pointer-events-none absolute inset-0 transition duration-200 ease-in-out",
|
|
403
|
+
TIMBAL_V2_ELEVATED_GRADIENT,
|
|
404
|
+
"group-hover/avatar:from-secondary-fill-hover-from group-hover/avatar:to-secondary-fill-hover-to",
|
|
405
|
+
"group-active/avatar:from-secondary-fill-active-from group-active/avatar:to-secondary-fill-active-to"
|
|
406
|
+
);
|
|
378
407
|
var TIMBAL_V2_SWITCH_TRACK_OFF = cn(
|
|
379
408
|
TIMBAL_V2_ELEVATED_GRADIENT,
|
|
380
409
|
"border border-border shadow-card"
|
|
@@ -643,25 +672,74 @@ function TooltipContent({
|
|
|
643
672
|
}
|
|
644
673
|
|
|
645
674
|
// src/ui/avatar.tsx
|
|
675
|
+
var React2 = __toESM(require("react"), 1);
|
|
646
676
|
var import_radix_ui3 = require("radix-ui");
|
|
647
677
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
678
|
+
var AVATAR_PRIMARY_FALLBACK_CLASS = cn(
|
|
679
|
+
TIMBAL_V2_SECONDARY_PILL_ROOT,
|
|
680
|
+
TIMBAL_V2_LABEL.secondary,
|
|
681
|
+
"font-medium"
|
|
682
|
+
);
|
|
683
|
+
var AVATAR_SECONDARY_FILL_STYLE = {
|
|
684
|
+
backgroundImage: "linear-gradient(to bottom, var(--elevated-from), var(--elevated-to))"
|
|
685
|
+
};
|
|
686
|
+
var AvatarChromeContext = React2.createContext(
|
|
687
|
+
null
|
|
688
|
+
);
|
|
689
|
+
function useAvatarChrome() {
|
|
690
|
+
return React2.useContext(AvatarChromeContext);
|
|
691
|
+
}
|
|
692
|
+
function isBrandedVariant(variant) {
|
|
693
|
+
return variant === "secondary" || variant === "primary" || variant === "chart";
|
|
694
|
+
}
|
|
695
|
+
function avatarChartVariantClass(_seed) {
|
|
696
|
+
return AVATAR_PRIMARY_FALLBACK_CLASS;
|
|
697
|
+
}
|
|
698
|
+
var AVATAR_SIZE_CLASS = {
|
|
699
|
+
default: "size-8",
|
|
700
|
+
sm: "size-6",
|
|
701
|
+
lg: "size-10"
|
|
702
|
+
};
|
|
648
703
|
function Avatar({
|
|
649
704
|
className,
|
|
650
705
|
size = "default",
|
|
706
|
+
variant: rootVariant,
|
|
707
|
+
children,
|
|
651
708
|
...props
|
|
652
709
|
}) {
|
|
653
|
-
|
|
710
|
+
const [chrome, setChrome] = React2.useState(rootVariant ?? "muted");
|
|
711
|
+
React2.useLayoutEffect(() => {
|
|
712
|
+
if (rootVariant !== void 0) {
|
|
713
|
+
setChrome(rootVariant);
|
|
714
|
+
}
|
|
715
|
+
}, [rootVariant]);
|
|
716
|
+
const branded = isBrandedVariant(chrome);
|
|
717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AvatarChromeContext.Provider, { value: { chrome, setChrome }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
654
718
|
import_radix_ui3.Avatar.Root,
|
|
655
719
|
{
|
|
656
720
|
"data-slot": "avatar",
|
|
657
721
|
"data-size": size,
|
|
722
|
+
"data-variant": branded ? "secondary" : chrome,
|
|
658
723
|
className: cn(
|
|
659
|
-
"group/avatar relative
|
|
724
|
+
"group/avatar relative shrink-0 select-none",
|
|
725
|
+
AVATAR_SIZE_CLASS[size],
|
|
726
|
+
branded ? TIMBAL_V2_SECONDARY_PILL_ROOT : "flex overflow-hidden rounded-full",
|
|
660
727
|
className
|
|
661
728
|
),
|
|
662
|
-
...props
|
|
729
|
+
...props,
|
|
730
|
+
children: [
|
|
731
|
+
branded ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
732
|
+
"span",
|
|
733
|
+
{
|
|
734
|
+
"aria-hidden": true,
|
|
735
|
+
className: TIMBAL_V2_SECONDARY_PILL_FILL_LAYER,
|
|
736
|
+
style: AVATAR_SECONDARY_FILL_STYLE
|
|
737
|
+
}
|
|
738
|
+
) : null,
|
|
739
|
+
children
|
|
740
|
+
]
|
|
663
741
|
}
|
|
664
|
-
);
|
|
742
|
+
) });
|
|
665
743
|
}
|
|
666
744
|
function AvatarImage({
|
|
667
745
|
className,
|
|
@@ -671,24 +749,44 @@ function AvatarImage({
|
|
|
671
749
|
import_radix_ui3.Avatar.Image,
|
|
672
750
|
{
|
|
673
751
|
"data-slot": "avatar-image",
|
|
674
|
-
className: cn(
|
|
752
|
+
className: cn(
|
|
753
|
+
"relative z-10 aspect-square size-full rounded-full object-cover",
|
|
754
|
+
className
|
|
755
|
+
),
|
|
675
756
|
...props
|
|
676
757
|
}
|
|
677
758
|
);
|
|
678
759
|
}
|
|
679
760
|
function AvatarFallback({
|
|
680
761
|
className,
|
|
762
|
+
variant = "muted",
|
|
763
|
+
seed: _seed,
|
|
764
|
+
children,
|
|
765
|
+
style,
|
|
681
766
|
...props
|
|
682
767
|
}) {
|
|
768
|
+
const chromeCtx = useAvatarChrome();
|
|
769
|
+
React2.useLayoutEffect(() => {
|
|
770
|
+
chromeCtx?.setChrome(variant);
|
|
771
|
+
}, [chromeCtx, variant]);
|
|
772
|
+
const branded = isBrandedVariant(variant);
|
|
683
773
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
684
774
|
import_radix_ui3.Avatar.Fallback,
|
|
685
775
|
{
|
|
686
776
|
"data-slot": "avatar-fallback",
|
|
777
|
+
"data-variant": branded ? "secondary" : variant,
|
|
687
778
|
className: cn(
|
|
688
|
-
"
|
|
779
|
+
"relative z-10 flex size-full items-center justify-center rounded-full",
|
|
780
|
+
branded ? cn(
|
|
781
|
+
"bg-transparent font-medium",
|
|
782
|
+
TIMBAL_V2_LABEL.secondary,
|
|
783
|
+
"text-sm group-data-[size=sm]/avatar:text-xs"
|
|
784
|
+
) : "bg-muted font-normal text-muted-foreground text-sm group-data-[size=sm]/avatar:text-xs",
|
|
689
785
|
className
|
|
690
786
|
),
|
|
691
|
-
|
|
787
|
+
style,
|
|
788
|
+
...props,
|
|
789
|
+
children
|
|
692
790
|
}
|
|
693
791
|
);
|
|
694
792
|
}
|
|
@@ -2317,7 +2415,7 @@ function CommandShortcut({
|
|
|
2317
2415
|
}
|
|
2318
2416
|
|
|
2319
2417
|
// src/ui/calendar.tsx
|
|
2320
|
-
var
|
|
2418
|
+
var React3 = __toESM(require("react"), 1);
|
|
2321
2419
|
var import_lucide_react11 = require("lucide-react");
|
|
2322
2420
|
var import_react_day_picker = require("react-day-picker");
|
|
2323
2421
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
@@ -2390,8 +2488,8 @@ function CalendarDayButton({
|
|
|
2390
2488
|
modifiers,
|
|
2391
2489
|
...props
|
|
2392
2490
|
}) {
|
|
2393
|
-
const ref =
|
|
2394
|
-
|
|
2491
|
+
const ref = React3.useRef(null);
|
|
2492
|
+
React3.useEffect(() => {
|
|
2395
2493
|
if (modifiers.focused) ref.current?.focus();
|
|
2396
2494
|
}, [modifiers.focused]);
|
|
2397
2495
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
@@ -2901,7 +2999,7 @@ function Separator({
|
|
|
2901
2999
|
}
|
|
2902
3000
|
|
|
2903
3001
|
// src/ui/slider.tsx
|
|
2904
|
-
var
|
|
3002
|
+
var React4 = __toESM(require("react"), 1);
|
|
2905
3003
|
var import_radix_ui21 = require("radix-ui");
|
|
2906
3004
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2907
3005
|
function Slider({
|
|
@@ -2912,7 +3010,7 @@ function Slider({
|
|
|
2912
3010
|
max = 100,
|
|
2913
3011
|
...props
|
|
2914
3012
|
}) {
|
|
2915
|
-
const thumbs =
|
|
3013
|
+
const thumbs = React4.useMemo(() => {
|
|
2916
3014
|
if (Array.isArray(value)) return value;
|
|
2917
3015
|
if (Array.isArray(defaultValue)) return defaultValue;
|
|
2918
3016
|
return [min];
|
|
@@ -3815,13 +3913,13 @@ function Skeleton({ className, ...props }) {
|
|
|
3815
3913
|
}
|
|
3816
3914
|
|
|
3817
3915
|
// src/ui/chart.tsx
|
|
3818
|
-
var
|
|
3916
|
+
var React5 = __toESM(require("react"), 1);
|
|
3819
3917
|
var RechartsPrimitive = __toESM(require("recharts"), 1);
|
|
3820
3918
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3821
3919
|
var THEMES = { light: "", dark: ".dark" };
|
|
3822
|
-
var ChartContext =
|
|
3920
|
+
var ChartContext = React5.createContext(null);
|
|
3823
3921
|
function useChart() {
|
|
3824
|
-
const context =
|
|
3922
|
+
const context = React5.useContext(ChartContext);
|
|
3825
3923
|
if (!context) {
|
|
3826
3924
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
3827
3925
|
}
|
|
@@ -3834,7 +3932,7 @@ function ChartContainer({
|
|
|
3834
3932
|
config,
|
|
3835
3933
|
...props
|
|
3836
3934
|
}) {
|
|
3837
|
-
const uniqueId =
|
|
3935
|
+
const uniqueId = React5.useId();
|
|
3838
3936
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
3839
3937
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
3840
3938
|
"div",
|
|
@@ -3895,7 +3993,7 @@ function ChartTooltipContent({
|
|
|
3895
3993
|
labelKey
|
|
3896
3994
|
}) {
|
|
3897
3995
|
const { config } = useChart();
|
|
3898
|
-
const tooltipLabel =
|
|
3996
|
+
const tooltipLabel = React5.useMemo(() => {
|
|
3899
3997
|
if (hideLabel || !payload?.length) {
|
|
3900
3998
|
return null;
|
|
3901
3999
|
}
|
|
@@ -4006,7 +4104,7 @@ function ChartLegendContent({
|
|
|
4006
4104
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
4007
4105
|
"div",
|
|
4008
4106
|
{
|
|
4009
|
-
className: "[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3",
|
|
4107
|
+
className: "[&>svg]:text-muted-foreground flex min-w-0 max-w-[8rem] items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3",
|
|
4010
4108
|
children: [
|
|
4011
4109
|
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(itemConfig.icon, {}) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4012
4110
|
"div",
|
|
@@ -4015,7 +4113,7 @@ function ChartLegendContent({
|
|
|
4015
4113
|
style: { backgroundColor: item.color }
|
|
4016
4114
|
}
|
|
4017
4115
|
),
|
|
4018
|
-
itemConfig?.label
|
|
4116
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "min-w-0 truncate", children: itemConfig?.label ?? (item.value != null ? String(item.value) : null) })
|
|
4019
4117
|
]
|
|
4020
4118
|
},
|
|
4021
4119
|
`${item.value ?? index}`
|
|
@@ -4240,7 +4338,7 @@ function ToastDescription({
|
|
|
4240
4338
|
}
|
|
4241
4339
|
|
|
4242
4340
|
// src/ui/use-toast.ts
|
|
4243
|
-
var
|
|
4341
|
+
var React6 = __toESM(require("react"), 1);
|
|
4244
4342
|
var TOAST_LIMIT = 3;
|
|
4245
4343
|
var TOAST_REMOVE_DELAY = 5e3;
|
|
4246
4344
|
var listeners = /* @__PURE__ */ new Set();
|
|
@@ -4293,8 +4391,8 @@ function toast(input) {
|
|
|
4293
4391
|
return memoryState.add(input);
|
|
4294
4392
|
}
|
|
4295
4393
|
function useToast() {
|
|
4296
|
-
const [state, setState] =
|
|
4297
|
-
|
|
4394
|
+
const [state, setState] = React6.useState(memoryState);
|
|
4395
|
+
React6.useEffect(() => {
|
|
4298
4396
|
listeners.add(setState);
|
|
4299
4397
|
return () => {
|
|
4300
4398
|
listeners.delete(setState);
|
|
@@ -4482,6 +4580,7 @@ var PillSegmentedTabs = ({
|
|
|
4482
4580
|
var MemoPillSegmentedTabs = (0, import_react3.memo)(PillSegmentedTabs);
|
|
4483
4581
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4484
4582
|
0 && (module.exports = {
|
|
4583
|
+
AVATAR_PRIMARY_FALLBACK_CLASS,
|
|
4485
4584
|
Accordion,
|
|
4486
4585
|
AccordionContent,
|
|
4487
4586
|
AccordionItem,
|
|
@@ -4715,6 +4814,7 @@ var MemoPillSegmentedTabs = (0, import_react3.memo)(PillSegmentedTabs);
|
|
|
4715
4814
|
TooltipProvider,
|
|
4716
4815
|
TooltipTrigger,
|
|
4717
4816
|
alertVariants,
|
|
4817
|
+
avatarChartVariantClass,
|
|
4718
4818
|
badgeVariants,
|
|
4719
4819
|
controlClass,
|
|
4720
4820
|
controlSurfaceClass,
|
package/dist/ui.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { B as Button } from './button-BoyX5pM_.cjs';
|
|
2
|
-
export { A as
|
|
2
|
+
export { A as AVATAR_PRIMARY_FALLBACK_CLASS, a as Accordion, b as AccordionContent, c as AccordionItem, d as AccordionTrigger, e as Alert, f as AlertDescription, g as AlertDialog, h as AlertDialogAction, i as AlertDialogCancel, j as AlertDialogContent, k as AlertDialogDescription, l as AlertDialogFooter, m as AlertDialogHeader, n as AlertDialogOverlay, o as AlertDialogPortal, p as AlertDialogTitle, q as AlertDialogTrigger, r as AlertTitle, s as AspectRatio, t as Avatar, u as AvatarFallback, v as AvatarImage, B as Badge, w as Breadcrumb, x as BreadcrumbEllipsis, y as BreadcrumbItem, z as BreadcrumbLink, C as BreadcrumbList, D as BreadcrumbPage, E as BreadcrumbSeparator, F as CONTROL_SIZE, G as Calendar, H as CalendarDayButton, I as Card, J as CardContent, K as CardDescription, L as CardFooter, M as CardHeader, N as CardTitle, O as Checkbox, P as Collapsible, Q as CollapsibleContent, R as CollapsibleTrigger, S as Combobox, T as ComboboxAnchor, U as ComboboxCommand, V as ComboboxContent, W as ComboboxEmpty, X as ComboboxGroup, Y as ComboboxInput, Z as ComboboxItem, _ as ComboboxList, $ as ComboboxSeparator, a0 as ComboboxShortcut, a1 as ComboboxTrigger, a2 as Command, a3 as CommandDialog, a4 as CommandEmpty, a5 as CommandGroup, a6 as CommandInput, a7 as CommandItem, a8 as CommandList, a9 as CommandSeparator, aa as CommandShortcut, ab as ContextMenu, ac as ContextMenuCheckboxItem, ad as ContextMenuContent, ae as ContextMenuGroup, af as ContextMenuItem, ag as ContextMenuLabel, ah as ContextMenuRadioGroup, ai as ContextMenuRadioItem, aj as ContextMenuSeparator, ak as ContextMenuShortcut, al as ContextMenuSub, am as ContextMenuSubContent, an as ContextMenuSubTrigger, ao as ContextMenuTrigger, ap as ControlClassOptions, aq as ControlShape, ar as ControlSize, as as DatePicker, at as DatePickerButton, au as DatePickerCalendar, av as DatePickerContent, aw as DatePickerTrigger, ax as Dialog, ay as DialogClose, az as DialogContent, aA as DialogDescription, aB as DialogFooter, aC as DialogHeader, aD as DialogOverlay, aE as DialogPortal, aF as DialogTitle, aG as DialogTrigger, aH as DropdownMenu, aI as DropdownMenuCheckboxItem, aJ as DropdownMenuContent, aK as DropdownMenuGroup, aL as DropdownMenuItem, aM as DropdownMenuLabel, aN as DropdownMenuRadioGroup, aO as DropdownMenuRadioItem, aP as DropdownMenuSeparator, aQ as DropdownMenuShortcut, aR as DropdownMenuSub, aS as DropdownMenuSubContent, aT as DropdownMenuSubTrigger, aU as DropdownMenuTrigger, aV as Form, aW as FormControl, aX as FormField, aY as FormItem, aZ as FormLabel, a_ as FormMessage, a$ as FormSubmit, b0 as HoverCard, b1 as HoverCardContent, b2 as HoverCardTrigger, b3 as Input, b4 as InputGroup, b5 as InputGroupAddon, b6 as InputGroupInput, b7 as InputGroupText, b8 as InputOTP, b9 as InputOTPGroup, ba as InputOTPHiddenInput, bb as InputOTPSeparator, bc as InputOTPSlot, bd as Kbd, be as KbdGroup, bf as Label, bg as MemoPillSegmentedTabs, bh as Menubar, bi as MenubarCheckboxItem, bj as MenubarContent, bk as MenubarItem, bl as MenubarLabel, bm as MenubarMenu, bn as MenubarRadioGroup, bo as MenubarRadioItem, bp as MenubarSeparator, bq as MenubarShortcut, br as MenubarSub, bs as MenubarSubContent, bt as MenubarSubTrigger, bu as MenubarTrigger, bv as NavigationMenu, bw as NavigationMenuContent, bx as NavigationMenuIndicator, by as NavigationMenuItem, bz as NavigationMenuLink, bA as NavigationMenuList, bB as NavigationMenuTrigger, bC as NavigationMenuViewport, bD as Pagination, bE as PaginationContent, bF as PaginationEllipsis, bG as PaginationItem, bH as PaginationLink, bI as PaginationNext, bJ as PaginationPrevious, bK as PillSegmentedTab, bL as PillSegmentedTabs, bM as PillSegmentedTabsProps, bN as Popover, bO as PopoverAnchor, bP as PopoverContent, bQ as PopoverTrigger, bR as Progress, bS as RadioGroup, bT as RadioGroupItem, bU as ScrollArea, bV as ScrollBar, bW as Select, bX as SelectContent, bY as SelectGroup, bZ as SelectItem, b_ as SelectLabel, b$ as SelectScrollDownButton, c0 as SelectScrollUpButton, c1 as SelectSeparator, c2 as SelectTrigger, c3 as SelectValue, c4 as Separator, c5 as Sheet, c6 as SheetClose, c7 as SheetContent, c8 as SheetDescription, c9 as SheetFooter, ca as SheetHeader, cb as SheetTitle, cc as SheetTrigger, cd as Shimmer, ce as Skeleton, cf as Slider, cg as Spinner, ch as Switch, ci as Table, cj as TableBody, ck as TableCaption, cl as TableCell, cm as TableFooter, cn as TableHead, co as TableHeader, cp as TableRow, cq as TextShimmerProps, cr as Textarea, cs as Toast, ct as ToastAction, cu as ToastClose, cv as ToastDescription, cw as ToastProps, cx as ToastProvider, cy as ToastTitle, cz as ToastViewport, cA as Toaster, cB as Toggle, cC as ToggleGroup, cD as ToggleGroupItem, cE as Toolbar, cF as ToolbarButton, cG as ToolbarLink, cH as ToolbarSeparator, cI as ToolbarToggleGroup, cJ as ToolbarToggleItem, cK as Tooltip, cL as TooltipContent, cM as TooltipProvider, cN as TooltipTrigger, cO as alertVariants, cP as avatarChartVariantClass, cQ as badgeVariants, cR as controlClass, cS as controlSurfaceClass, cT as formatPickerDate, cU as navigationMenuTriggerStyle, cV as overlayAnimationClass, cW as overlayItemClass, cX as overlayListPanelClass, cY as overlaySurfaceClass, cZ as toast, c_ as toggleVariants, c$ as useToast } from './pill-segmented-tabs-BsIOW1Lo.cjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import * as RechartsPrimitive from 'recharts';
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { B as Button } from './button-BoyX5pM_.js';
|
|
2
|
-
export { A as
|
|
2
|
+
export { A as AVATAR_PRIMARY_FALLBACK_CLASS, a as Accordion, b as AccordionContent, c as AccordionItem, d as AccordionTrigger, e as Alert, f as AlertDescription, g as AlertDialog, h as AlertDialogAction, i as AlertDialogCancel, j as AlertDialogContent, k as AlertDialogDescription, l as AlertDialogFooter, m as AlertDialogHeader, n as AlertDialogOverlay, o as AlertDialogPortal, p as AlertDialogTitle, q as AlertDialogTrigger, r as AlertTitle, s as AspectRatio, t as Avatar, u as AvatarFallback, v as AvatarImage, B as Badge, w as Breadcrumb, x as BreadcrumbEllipsis, y as BreadcrumbItem, z as BreadcrumbLink, C as BreadcrumbList, D as BreadcrumbPage, E as BreadcrumbSeparator, F as CONTROL_SIZE, G as Calendar, H as CalendarDayButton, I as Card, J as CardContent, K as CardDescription, L as CardFooter, M as CardHeader, N as CardTitle, O as Checkbox, P as Collapsible, Q as CollapsibleContent, R as CollapsibleTrigger, S as Combobox, T as ComboboxAnchor, U as ComboboxCommand, V as ComboboxContent, W as ComboboxEmpty, X as ComboboxGroup, Y as ComboboxInput, Z as ComboboxItem, _ as ComboboxList, $ as ComboboxSeparator, a0 as ComboboxShortcut, a1 as ComboboxTrigger, a2 as Command, a3 as CommandDialog, a4 as CommandEmpty, a5 as CommandGroup, a6 as CommandInput, a7 as CommandItem, a8 as CommandList, a9 as CommandSeparator, aa as CommandShortcut, ab as ContextMenu, ac as ContextMenuCheckboxItem, ad as ContextMenuContent, ae as ContextMenuGroup, af as ContextMenuItem, ag as ContextMenuLabel, ah as ContextMenuRadioGroup, ai as ContextMenuRadioItem, aj as ContextMenuSeparator, ak as ContextMenuShortcut, al as ContextMenuSub, am as ContextMenuSubContent, an as ContextMenuSubTrigger, ao as ContextMenuTrigger, ap as ControlClassOptions, aq as ControlShape, ar as ControlSize, as as DatePicker, at as DatePickerButton, au as DatePickerCalendar, av as DatePickerContent, aw as DatePickerTrigger, ax as Dialog, ay as DialogClose, az as DialogContent, aA as DialogDescription, aB as DialogFooter, aC as DialogHeader, aD as DialogOverlay, aE as DialogPortal, aF as DialogTitle, aG as DialogTrigger, aH as DropdownMenu, aI as DropdownMenuCheckboxItem, aJ as DropdownMenuContent, aK as DropdownMenuGroup, aL as DropdownMenuItem, aM as DropdownMenuLabel, aN as DropdownMenuRadioGroup, aO as DropdownMenuRadioItem, aP as DropdownMenuSeparator, aQ as DropdownMenuShortcut, aR as DropdownMenuSub, aS as DropdownMenuSubContent, aT as DropdownMenuSubTrigger, aU as DropdownMenuTrigger, aV as Form, aW as FormControl, aX as FormField, aY as FormItem, aZ as FormLabel, a_ as FormMessage, a$ as FormSubmit, b0 as HoverCard, b1 as HoverCardContent, b2 as HoverCardTrigger, b3 as Input, b4 as InputGroup, b5 as InputGroupAddon, b6 as InputGroupInput, b7 as InputGroupText, b8 as InputOTP, b9 as InputOTPGroup, ba as InputOTPHiddenInput, bb as InputOTPSeparator, bc as InputOTPSlot, bd as Kbd, be as KbdGroup, bf as Label, bg as MemoPillSegmentedTabs, bh as Menubar, bi as MenubarCheckboxItem, bj as MenubarContent, bk as MenubarItem, bl as MenubarLabel, bm as MenubarMenu, bn as MenubarRadioGroup, bo as MenubarRadioItem, bp as MenubarSeparator, bq as MenubarShortcut, br as MenubarSub, bs as MenubarSubContent, bt as MenubarSubTrigger, bu as MenubarTrigger, bv as NavigationMenu, bw as NavigationMenuContent, bx as NavigationMenuIndicator, by as NavigationMenuItem, bz as NavigationMenuLink, bA as NavigationMenuList, bB as NavigationMenuTrigger, bC as NavigationMenuViewport, bD as Pagination, bE as PaginationContent, bF as PaginationEllipsis, bG as PaginationItem, bH as PaginationLink, bI as PaginationNext, bJ as PaginationPrevious, bK as PillSegmentedTab, bL as PillSegmentedTabs, bM as PillSegmentedTabsProps, bN as Popover, bO as PopoverAnchor, bP as PopoverContent, bQ as PopoverTrigger, bR as Progress, bS as RadioGroup, bT as RadioGroupItem, bU as ScrollArea, bV as ScrollBar, bW as Select, bX as SelectContent, bY as SelectGroup, bZ as SelectItem, b_ as SelectLabel, b$ as SelectScrollDownButton, c0 as SelectScrollUpButton, c1 as SelectSeparator, c2 as SelectTrigger, c3 as SelectValue, c4 as Separator, c5 as Sheet, c6 as SheetClose, c7 as SheetContent, c8 as SheetDescription, c9 as SheetFooter, ca as SheetHeader, cb as SheetTitle, cc as SheetTrigger, cd as Shimmer, ce as Skeleton, cf as Slider, cg as Spinner, ch as Switch, ci as Table, cj as TableBody, ck as TableCaption, cl as TableCell, cm as TableFooter, cn as TableHead, co as TableHeader, cp as TableRow, cq as TextShimmerProps, cr as Textarea, cs as Toast, ct as ToastAction, cu as ToastClose, cv as ToastDescription, cw as ToastProps, cx as ToastProvider, cy as ToastTitle, cz as ToastViewport, cA as Toaster, cB as Toggle, cC as ToggleGroup, cD as ToggleGroupItem, cE as Toolbar, cF as ToolbarButton, cG as ToolbarLink, cH as ToolbarSeparator, cI as ToolbarToggleGroup, cJ as ToolbarToggleItem, cK as Tooltip, cL as TooltipContent, cM as TooltipProvider, cN as TooltipTrigger, cO as alertVariants, cP as avatarChartVariantClass, cQ as badgeVariants, cR as controlClass, cS as controlSurfaceClass, cT as formatPickerDate, cU as navigationMenuTriggerStyle, cV as overlayAnimationClass, cW as overlayItemClass, cX as overlayListPanelClass, cY as overlaySurfaceClass, cZ as toast, c_ as toggleVariants, c$ as useToast } from './pill-segmented-tabs-BsIOW1Lo.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import * as RechartsPrimitive from 'recharts';
|
package/dist/ui.esm.js
CHANGED
|
@@ -207,16 +207,17 @@ import {
|
|
|
207
207
|
toast,
|
|
208
208
|
toggleVariants,
|
|
209
209
|
useToast
|
|
210
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-4VULP3CJ.esm.js";
|
|
211
211
|
import {
|
|
212
212
|
Checkbox,
|
|
213
213
|
Skeleton
|
|
214
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-FEYZUVBM.esm.js";
|
|
215
215
|
import {
|
|
216
216
|
MemoPillSegmentedTabs,
|
|
217
217
|
PillSegmentedTabs
|
|
218
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-NAMKO2MU.esm.js";
|
|
219
219
|
import {
|
|
220
|
+
AVATAR_PRIMARY_FALLBACK_CLASS,
|
|
220
221
|
Avatar,
|
|
221
222
|
AvatarFallback,
|
|
222
223
|
AvatarImage,
|
|
@@ -244,6 +245,7 @@ import {
|
|
|
244
245
|
TooltipContent,
|
|
245
246
|
TooltipProvider,
|
|
246
247
|
TooltipTrigger,
|
|
248
|
+
avatarChartVariantClass,
|
|
247
249
|
controlClass,
|
|
248
250
|
controlSurfaceClass,
|
|
249
251
|
overlayAnimationClass,
|
|
@@ -251,8 +253,9 @@ import {
|
|
|
251
253
|
overlayListPanelClass,
|
|
252
254
|
overlaySurfaceClass,
|
|
253
255
|
useChart
|
|
254
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-BMXFXLVV.esm.js";
|
|
255
257
|
export {
|
|
258
|
+
AVATAR_PRIMARY_FALLBACK_CLASS,
|
|
256
259
|
Accordion,
|
|
257
260
|
AccordionContent,
|
|
258
261
|
AccordionItem,
|
|
@@ -486,6 +489,7 @@ export {
|
|
|
486
489
|
TooltipProvider,
|
|
487
490
|
TooltipTrigger,
|
|
488
491
|
alertVariants,
|
|
492
|
+
avatarChartVariantClass,
|
|
489
493
|
badgeVariants,
|
|
490
494
|
controlClass,
|
|
491
495
|
controlSurfaceClass,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
-
import { c as TimbalChatProps, v as ThreadWelcomeProps } from './chat-
|
|
2
|
+
import { c as TimbalChatProps, v as ThreadWelcomeProps } from './chat-ClmzWzCX.cjs';
|
|
3
3
|
import { WorkforceItem } from '@timbal-ai/timbal-sdk';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
-
import { c as TimbalChatProps, v as ThreadWelcomeProps } from './chat-
|
|
2
|
+
import { c as TimbalChatProps, v as ThreadWelcomeProps } from './chat-ClmzWzCX.js';
|
|
3
3
|
import { WorkforceItem } from '@timbal-ai/timbal-sdk';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
|
package/package.json
CHANGED
package/vite/local-dev.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { Plugin } from "vite";
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Vite plugin for apps that link `@timbal-ai/timbal-react` via `file:../timbal-react`.
|
|
5
|
+
* Aliases package entrypoints to `src/`, excludes the package from `optimizeDeps`, and
|
|
6
|
+
* reloads when `src/` or `dist/` changes.
|
|
7
|
+
*/
|
|
4
8
|
export function timbalReactLocalDev(): Plugin;
|
package/vite/local-dev.mjs
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Vite plugin for apps that depend on `@timbal-ai/timbal-react` via `file:../timbal-react`.
|
|
3
3
|
*
|
|
4
4
|
* - Skips pre-bundling so `dist/` updates are not stuck in `node_modules/.vite/deps`
|
|
5
|
-
* -
|
|
5
|
+
* - Aliases package entrypoints to `src/` so gallery apps pick up source edits without rebuilding `dist/`
|
|
6
|
+
* - Watches `src/` and `dist/` and triggers a full reload when either changes
|
|
6
7
|
*
|
|
7
8
|
* IMPORTANT: this is a no-op for normal npm installs. Excluding the package from
|
|
8
9
|
* `optimizeDeps` only makes sense when it is `file:`-linked (a symlink in
|
|
@@ -23,7 +24,7 @@ const TIMBAL_REACT_EXPORTS = [
|
|
|
23
24
|
"@timbal-ai/timbal-react/app",
|
|
24
25
|
];
|
|
25
26
|
|
|
26
|
-
/** Subpath → source entry (
|
|
27
|
+
/** Subpath → source entry (linked `file:` dev always resolves here). */
|
|
27
28
|
const SOURCE_ENTRIES = {
|
|
28
29
|
"@timbal-ai/timbal-react": "src/index.ts",
|
|
29
30
|
"@timbal-ai/timbal-react/chat": "src/chat.ts",
|
|
@@ -102,34 +103,37 @@ export function timbalReactLocalDev() {
|
|
|
102
103
|
distDir = path.join(pkgRoot, "dist");
|
|
103
104
|
const built = distIsBuilt(distDir);
|
|
104
105
|
const srcDir = path.join(pkgRoot, "src");
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
const watchGlobs = [
|
|
107
|
+
`${srcDir.replace(/\\/g, "/")}/**`,
|
|
108
|
+
`${distDir.replace(/\\/g, "/")}/**`,
|
|
109
|
+
];
|
|
108
110
|
|
|
109
111
|
if (!built) {
|
|
110
112
|
console.warn(
|
|
111
|
-
"[timbal-react] dist/ is missing
|
|
112
|
-
"Run `bun run build` in timbal-react
|
|
113
|
+
"[timbal-react] dist/ is missing — dev uses src/ only. " +
|
|
114
|
+
"Run `bun run build` in timbal-react to verify the production bundle.",
|
|
113
115
|
);
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
/** @type {Record<string, string>} */
|
|
117
119
|
const alias = {};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
alias[pkg] = path.join(pkgRoot, rel);
|
|
121
|
-
}
|
|
120
|
+
for (const [pkg, rel] of Object.entries(SOURCE_ENTRIES)) {
|
|
121
|
+
alias[pkg] = path.join(pkgRoot, rel);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
return {
|
|
125
|
-
resolve:
|
|
125
|
+
resolve: { alias },
|
|
126
126
|
optimizeDeps: {
|
|
127
127
|
exclude: TIMBAL_REACT_EXPORTS,
|
|
128
128
|
include: CJS_INTEROP_DEPS,
|
|
129
129
|
},
|
|
130
130
|
server: {
|
|
131
131
|
watch: {
|
|
132
|
-
ignored: [
|
|
132
|
+
ignored: [
|
|
133
|
+
"**/.git/**",
|
|
134
|
+
"**/node_modules/**",
|
|
135
|
+
...watchGlobs.map((g) => `!${g}`),
|
|
136
|
+
],
|
|
133
137
|
},
|
|
134
138
|
},
|
|
135
139
|
};
|