@timbal-ai/timbal-react 1.4.0 → 1.5.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 +14 -0
- package/README.md +18 -4
- package/dist/app.cjs +3532 -1483
- package/dist/app.d.cts +75 -30
- package/dist/app.d.ts +75 -30
- package/dist/app.esm.js +29 -7
- package/dist/{chart-artifact-CMnDys2t.d.ts → chart-artifact-2OTDTRwM.d.ts} +194 -40
- package/dist/{chart-artifact-C8-Py6lc.d.cts → chart-artifact-CS3qyGIY.d.cts} +194 -40
- package/dist/chat.cjs +264 -107
- package/dist/chat.d.cts +2 -2
- package/dist/chat.d.ts +2 -2
- package/dist/chat.esm.js +4 -3
- package/dist/chunk-5ECRZ5O7.esm.js +899 -0
- package/dist/{chunk-QU7ET55D.esm.js → chunk-AZL2WANO.esm.js} +320 -177
- package/dist/{chunk-OH23AX2V.esm.js → chunk-B4XAC4G7.esm.js} +430 -780
- package/dist/chunk-EDEKQYSU.esm.js +10 -0
- package/dist/{chunk-GQBYZRD7.esm.js → chunk-IGHBLJV3.esm.js} +38 -27
- package/dist/{chunk-OFWC4MIY.esm.js → chunk-JYDJRGDE.esm.js} +5 -3
- package/dist/{chunk-VOWNCS3F.esm.js → chunk-SZDYIRMB.esm.js} +1567 -490
- package/dist/chunk-TZI3ID3C.esm.js +232 -0
- package/dist/{chunk-THBA27QY.esm.js → chunk-WMKPT5BV.esm.js} +242 -123
- package/dist/{chunk-VXMM2HX7.esm.js → chunk-ZNYAETFD.esm.js} +1 -1
- package/dist/{circular-progress-Ci8L-Hfa.d.cts → circular-progress-CDsJwIPF.d.cts} +19 -77
- package/dist/{circular-progress-Ci8L-Hfa.d.ts → circular-progress-CDsJwIPF.d.ts} +19 -77
- package/dist/index.cjs +5506 -3626
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.esm.js +45 -33
- package/dist/kanban-U5xNe9py.d.cts +212 -0
- package/dist/kanban-U5xNe9py.d.ts +212 -0
- package/dist/{layout-BTJyU8wd.d.ts → layout-B8r6Jbat.d.ts} +1 -1
- package/dist/{layout-C2G-FcER.d.cts → layout-Cu7Ijn04.d.cts} +1 -1
- package/dist/site.cjs +358 -0
- package/dist/site.d.cts +184 -0
- package/dist/site.d.ts +184 -0
- package/dist/site.esm.js +322 -0
- package/dist/studio.cjs +702 -343
- package/dist/studio.d.cts +1 -1
- package/dist/studio.d.ts +1 -1
- package/dist/studio.esm.js +7 -5
- package/dist/styles.css +56 -0
- package/dist/{timbal-v2-button-CNfdwGq4.d.cts → timbal-v2-button-B7vPs7gg.d.cts} +2 -2
- package/dist/{timbal-v2-button-CNfdwGq4.d.ts → timbal-v2-button-B7vPs7gg.d.ts} +2 -2
- package/dist/ui.cjs +1504 -659
- package/dist/ui.d.cts +11 -4
- package/dist/ui.d.ts +11 -4
- package/dist/ui.esm.js +35 -26
- package/dist/{welcome-DXqsGTwH.d.ts → welcome-DduQAC4K.d.ts} +4 -0
- package/dist/{welcome-BFGRoNfK.d.cts → welcome-NXZlcihe.d.cts} +4 -0
- package/package.json +9 -1
- package/dist/button-BoyX5pM_.d.cts +0 -18
- package/dist/button-BoyX5pM_.d.ts +0 -18
- package/dist/chunk-UCGVL7ZY.esm.js +0 -52
|
@@ -21,9 +21,11 @@ import {
|
|
|
21
21
|
Tooltip,
|
|
22
22
|
TooltipContent,
|
|
23
23
|
TooltipProvider,
|
|
24
|
-
TooltipTrigger
|
|
24
|
+
TooltipTrigger
|
|
25
|
+
} from "./chunk-AZL2WANO.esm.js";
|
|
26
|
+
import {
|
|
25
27
|
cn
|
|
26
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-EDEKQYSU.esm.js";
|
|
27
29
|
|
|
28
30
|
// src/chat/tooltip-icon-button.tsx
|
|
29
31
|
import { forwardRef } from "react";
|
|
@@ -215,13 +217,13 @@ function resolveChartMargin(options) {
|
|
|
215
217
|
}
|
|
216
218
|
const anyAxis = showXAxis || showYAxis;
|
|
217
219
|
if (!anyAxis) {
|
|
218
|
-
return { top: 8, right:
|
|
220
|
+
return { top: 8, right: 0, bottom: 0, left: 0 };
|
|
219
221
|
}
|
|
220
222
|
return {
|
|
221
223
|
top: 8,
|
|
222
|
-
right: 12,
|
|
223
|
-
bottom: showXAxis ? 24 :
|
|
224
|
-
left: showYAxis ? 8 :
|
|
224
|
+
right: showYAxis ? 12 : 0,
|
|
225
|
+
bottom: showXAxis ? 24 : 0,
|
|
226
|
+
left: showYAxis ? 8 : 0
|
|
225
227
|
};
|
|
226
228
|
}
|
|
227
229
|
function flushBarCategoryGap(flush, showCategoryAxis) {
|
|
@@ -250,6 +252,7 @@ import {
|
|
|
250
252
|
AreaChart,
|
|
251
253
|
Bar,
|
|
252
254
|
BarChart,
|
|
255
|
+
BarStack,
|
|
253
256
|
CartesianGrid,
|
|
254
257
|
Line,
|
|
255
258
|
LineChart,
|
|
@@ -442,7 +445,7 @@ var LineAreaChart = ({
|
|
|
442
445
|
barRadius = 4,
|
|
443
446
|
gridLines,
|
|
444
447
|
layout = "default",
|
|
445
|
-
showGrid
|
|
448
|
+
showGrid: showGridProp,
|
|
446
449
|
showXAxis: showXAxisProp,
|
|
447
450
|
showYAxis: showYAxisProp,
|
|
448
451
|
showLegend: showLegendProp,
|
|
@@ -458,6 +461,7 @@ var LineAreaChart = ({
|
|
|
458
461
|
const xKey = xKeyProp ?? inferXKey(data);
|
|
459
462
|
const series = resolveSeries(seriesProp, data, xKey);
|
|
460
463
|
const flush = layout === "flush";
|
|
464
|
+
const showGrid = showGridProp ?? !flush;
|
|
461
465
|
const horizontal = orientation === "horizontal" && variant === "bar";
|
|
462
466
|
const showXAxis = showXAxisProp ?? !flush;
|
|
463
467
|
const showYAxis = showYAxisProp ?? !flush;
|
|
@@ -498,14 +502,7 @@ var LineAreaChart = ({
|
|
|
498
502
|
const category = resolveTooltipCategory(label, items, xKey, data, xFmt);
|
|
499
503
|
return category || null;
|
|
500
504
|
},
|
|
501
|
-
|
|
502
|
-
const key = String(item.dataKey ?? name ?? "value");
|
|
503
|
-
const seriesLabel = config[key]?.label ?? name;
|
|
504
|
-
return /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 items-center justify-between leading-none", children: [
|
|
505
|
-
/* @__PURE__ */ jsx5("span", { className: "text-muted-foreground", children: seriesLabel }),
|
|
506
|
-
value != null ? /* @__PURE__ */ jsx5("span", { className: "text-foreground font-mono font-medium tabular-nums", children: valueFmt(value) }) : null
|
|
507
|
-
] });
|
|
508
|
-
}
|
|
505
|
+
valueFormatter: (value) => value != null ? valueFmt(value) : null
|
|
509
506
|
}
|
|
510
507
|
)
|
|
511
508
|
}
|
|
@@ -516,13 +513,27 @@ var LineAreaChart = ({
|
|
|
516
513
|
if (variant === "bar") {
|
|
517
514
|
const dataKeys = series.map((s) => s.dataKey);
|
|
518
515
|
const barDefs = /* @__PURE__ */ jsx5(BarGradientDefs, { scopeId: gradientScopeId, dataKeys, horizontal });
|
|
519
|
-
const bars =
|
|
516
|
+
const bars = stacked ? /* @__PURE__ */ jsx5(
|
|
517
|
+
BarStack,
|
|
518
|
+
{
|
|
519
|
+
radius: barCornerRadius(barRadius, horizontal, false),
|
|
520
|
+
stackId: "stack",
|
|
521
|
+
children: series.map((s) => /* @__PURE__ */ jsx5(
|
|
522
|
+
Bar,
|
|
523
|
+
{
|
|
524
|
+
dataKey: s.dataKey,
|
|
525
|
+
fill: `url(#${barGradientId(gradientScopeId, s.dataKey)})`,
|
|
526
|
+
isAnimationActive: true
|
|
527
|
+
},
|
|
528
|
+
s.dataKey
|
|
529
|
+
))
|
|
530
|
+
}
|
|
531
|
+
) : series.map((s) => /* @__PURE__ */ jsx5(
|
|
520
532
|
Bar,
|
|
521
533
|
{
|
|
522
534
|
dataKey: s.dataKey,
|
|
523
535
|
fill: `url(#${barGradientId(gradientScopeId, s.dataKey)})`,
|
|
524
|
-
radius: barCornerRadius(barRadius, horizontal,
|
|
525
|
-
stackId: stacked ? "stack" : void 0,
|
|
536
|
+
radius: barCornerRadius(barRadius, horizontal, false),
|
|
526
537
|
isAnimationActive: true
|
|
527
538
|
},
|
|
528
539
|
s.dataKey
|
|
@@ -595,7 +606,7 @@ var LineAreaChart = ({
|
|
|
595
606
|
tick: categoryTick("middle"),
|
|
596
607
|
...flushCategoryXAxisProps
|
|
597
608
|
}
|
|
598
|
-
) : /* @__PURE__ */ jsx5(XAxis, { dataKey: xKey, hide: true }),
|
|
609
|
+
) : /* @__PURE__ */ jsx5(XAxis, { dataKey: xKey, hide: true, height: 0 }),
|
|
599
610
|
showYAxis ? /* @__PURE__ */ jsx5(
|
|
600
611
|
YAxis,
|
|
601
612
|
{
|
|
@@ -606,7 +617,7 @@ var LineAreaChart = ({
|
|
|
606
617
|
tickFormatter: (v) => valueFmt(v),
|
|
607
618
|
domain: yDomain
|
|
608
619
|
}
|
|
609
|
-
) :
|
|
620
|
+
) : /* @__PURE__ */ jsx5(YAxis, { hide: true, width: 0, domain: yDomain }),
|
|
610
621
|
tooltipEl,
|
|
611
622
|
legendEl,
|
|
612
623
|
bars
|
|
@@ -642,7 +653,7 @@ var LineAreaChart = ({
|
|
|
642
653
|
tickFormatter: (v, i) => xFmt(v, i),
|
|
643
654
|
...flushCategoryXAxisProps
|
|
644
655
|
}
|
|
645
|
-
) : /* @__PURE__ */ jsx5(XAxis, { dataKey: chartXKey, hide: true }),
|
|
656
|
+
) : /* @__PURE__ */ jsx5(XAxis, { dataKey: chartXKey, hide: true, height: 0 }),
|
|
646
657
|
showYAxis ? /* @__PURE__ */ jsx5(
|
|
647
658
|
YAxis,
|
|
648
659
|
{
|
|
@@ -653,7 +664,7 @@ var LineAreaChart = ({
|
|
|
653
664
|
tickFormatter: (v) => valueFmt(v),
|
|
654
665
|
domain: yDomain
|
|
655
666
|
}
|
|
656
|
-
) :
|
|
667
|
+
) : /* @__PURE__ */ jsx5(YAxis, { hide: true, width: 0, domain: yDomain })
|
|
657
668
|
] });
|
|
658
669
|
const chartA11y = flush ? {} : { accessibilityLayer: true };
|
|
659
670
|
if (variant === "area") {
|
|
@@ -832,7 +843,7 @@ var PieChart = ({
|
|
|
832
843
|
fill: palette[i % palette.length]
|
|
833
844
|
}));
|
|
834
845
|
const config = {};
|
|
835
|
-
for (const s of slices) config[s.name] = { label: s.name };
|
|
846
|
+
for (const s of slices) config[s.name] = { label: s.name, color: s.fill };
|
|
836
847
|
const innerPct = innerRadius > 0 ? `${Math.round(innerRadius * 75)}%` : 0;
|
|
837
848
|
const hasCenter = innerRadius > 0 && (centerValue != null || centerLabel != null);
|
|
838
849
|
return /* @__PURE__ */ jsx7(
|
|
@@ -959,7 +970,7 @@ var RadialChart = ({
|
|
|
959
970
|
}));
|
|
960
971
|
const max = maxValue ?? Math.max(...rows.map((r) => r.value), 1);
|
|
961
972
|
const config = {};
|
|
962
|
-
for (const r of rows) config[r.name] = { label: r.name };
|
|
973
|
+
for (const r of rows) config[r.name] = { label: r.name, color: r.fill };
|
|
963
974
|
const hasCenter = centerValue != null || centerLabel != null;
|
|
964
975
|
return /* @__PURE__ */ jsxs8("div", { className: cn("flex w-full flex-col items-center gap-3", className), children: [
|
|
965
976
|
/* @__PURE__ */ jsx8(
|
|
@@ -4360,13 +4371,13 @@ export {
|
|
|
4360
4371
|
studioSidebarCollapsedRailItemIdleClass,
|
|
4361
4372
|
studioSidebarCollapsedRailItemActiveClass,
|
|
4362
4373
|
studioSidebarNavItemActiveClass,
|
|
4374
|
+
toNum,
|
|
4375
|
+
monotoneLinePath,
|
|
4376
|
+
monotoneAreaPath,
|
|
4363
4377
|
TooltipIconButton,
|
|
4364
4378
|
UserMessageAttachments,
|
|
4365
4379
|
ComposerAttachments,
|
|
4366
4380
|
ComposerAddAttachment,
|
|
4367
|
-
toNum,
|
|
4368
|
-
monotoneLinePath,
|
|
4369
|
-
monotoneAreaPath,
|
|
4370
4381
|
resolveChartMargin,
|
|
4371
4382
|
flushBarCategoryGap,
|
|
4372
4383
|
flushLineAreaEdgeToEdge,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
studioTopbarPillHeightClass
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IGHBLJV3.esm.js";
|
|
4
4
|
import {
|
|
5
|
-
cn,
|
|
6
5
|
controlSurfaceClass
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AZL2WANO.esm.js";
|
|
7
|
+
import {
|
|
8
|
+
cn
|
|
9
|
+
} from "./chunk-EDEKQYSU.esm.js";
|
|
8
10
|
|
|
9
11
|
// src/chat/workforce-selector.tsx
|
|
10
12
|
import { ChevronDownIcon } from "lucide-react";
|