@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.
- package/CHANGELOG.md +30 -0
- package/README.md +43 -4
- package/dist/app.cjs +3770 -1506
- package/dist/app.d.cts +76 -31
- package/dist/app.d.ts +76 -31
- package/dist/app.esm.js +30 -8
- package/dist/{chart-artifact-C8-Py6lc.d.cts → chart-artifact-C2pZQsaP.d.ts} +247 -41
- package/dist/{chart-artifact-CMnDys2t.d.ts → chart-artifact-VAqgH-My.d.cts} +247 -41
- package/dist/{chat-ClmzWzCX.d.cts → chat-DDsp-Vzz.d.cts} +1 -1
- package/dist/{chat-ClmzWzCX.d.ts → chat-DDsp-Vzz.d.ts} +1 -1
- package/dist/chat.cjs +280 -123
- package/dist/chat.d.cts +3 -3
- package/dist/chat.d.ts +3 -3
- package/dist/chat.esm.js +4 -3
- package/dist/chunk-24B4I4XC.esm.js +232 -0
- package/dist/{chunk-VOWNCS3F.esm.js → chunk-6SQMTBPL.esm.js} +1669 -504
- package/dist/chunk-EDEKQYSU.esm.js +10 -0
- package/dist/{chunk-QIABF4KB.esm.js → chunk-ELEY66OH.esm.js} +2 -2
- package/dist/{chunk-THBA27QY.esm.js → chunk-HSL36SJ4.esm.js} +243 -124
- package/dist/chunk-JJOO4PR5.esm.js +391 -0
- package/dist/{chunk-QU7ET55D.esm.js → chunk-MBS7XHV2.esm.js} +335 -192
- package/dist/chunk-NO5AWNWT.esm.js +1066 -0
- package/dist/{chunk-VXMM2HX7.esm.js → chunk-R4RQT2XQ.esm.js} +3 -3
- package/dist/{chunk-OFWC4MIY.esm.js → chunk-TMP7RIA7.esm.js} +5 -3
- package/dist/{chunk-GQBYZRD7.esm.js → chunk-WQIQW7EM.esm.js} +40 -28
- package/dist/{chunk-OH23AX2V.esm.js → chunk-YYEI6XME.esm.js} +441 -957
- package/dist/{circular-progress-Ci8L-Hfa.d.cts → circular-progress-B9nnwzCu.d.cts} +20 -78
- package/dist/{circular-progress-Ci8L-Hfa.d.ts → circular-progress-B9nnwzCu.d.ts} +20 -78
- package/dist/index.cjs +5547 -3192
- package/dist/index.d.cts +10 -8
- package/dist/index.d.ts +10 -8
- package/dist/index.esm.js +76 -44
- package/dist/kanban-FFBeaZPS.d.cts +212 -0
- package/dist/kanban-FFBeaZPS.d.ts +212 -0
- package/dist/{layout-BTJyU8wd.d.ts → layout-CuKeSY74.d.ts} +1 -1
- package/dist/{layout-C2G-FcER.d.cts → layout-PzVwkJyL.d.cts} +1 -1
- package/dist/site.cjs +429 -0
- package/dist/site.d.cts +198 -0
- package/dist/site.d.ts +198 -0
- package/dist/site.esm.js +23 -0
- package/dist/studio.cjs +722 -363
- package/dist/studio.d.cts +2 -2
- package/dist/studio.d.ts +2 -2
- package/dist/studio.esm.js +8 -6
- package/dist/styles.css +56 -0
- package/dist/{timbal-v2-button-CNfdwGq4.d.cts → timbal-v2-button-DCAZNyUx.d.cts} +3 -3
- package/dist/{timbal-v2-button-CNfdwGq4.d.ts → timbal-v2-button-DCAZNyUx.d.ts} +3 -3
- package/dist/ui.cjs +1553 -708
- package/dist/ui.d.cts +11 -4
- package/dist/ui.d.ts +11 -4
- package/dist/ui.esm.js +45 -36
- package/dist/{welcome-DXqsGTwH.d.ts → welcome-B00oH5Io.d.cts} +5 -1
- package/dist/{welcome-BFGRoNfK.d.cts → welcome-DU-4NTjZ.d.ts} +5 -1
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cn
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EDEKQYSU.esm.js";
|
|
4
4
|
|
|
5
5
|
// src/ui/pill-segmented-tabs.tsx
|
|
6
6
|
import {
|
|
@@ -27,10 +27,10 @@ var pillSegmentedTrackFlushClass = cn(
|
|
|
27
27
|
"h-[var(--studio-chrome-pill-height)] items-center gap-0.5 overflow-visible p-0.5"
|
|
28
28
|
);
|
|
29
29
|
var pillSegmentedSegmentClass = cn(
|
|
30
|
-
"relative flex items-center gap-1.5 rounded-full px-
|
|
30
|
+
"relative flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-normal transition-colors"
|
|
31
31
|
);
|
|
32
32
|
var pillSegmentedFlushSegmentClass = cn(
|
|
33
|
-
"relative box-border inline-flex h-
|
|
33
|
+
"relative box-border inline-flex h-8 min-h-8 items-center justify-center gap-1.5 rounded-full px-3 py-0",
|
|
34
34
|
"text-sm font-normal leading-tight transition-colors"
|
|
35
35
|
);
|
|
36
36
|
var pillSegmentedActiveIndicatorClass = cn(
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
studioTopbarPillHeightClass
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WQIQW7EM.esm.js";
|
|
4
4
|
import {
|
|
5
|
-
cn,
|
|
6
5
|
controlSurfaceClass
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MBS7XHV2.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";
|
|
@@ -21,9 +21,11 @@ import {
|
|
|
21
21
|
Tooltip,
|
|
22
22
|
TooltipContent,
|
|
23
23
|
TooltipProvider,
|
|
24
|
-
TooltipTrigger
|
|
24
|
+
TooltipTrigger
|
|
25
|
+
} from "./chunk-MBS7XHV2.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(
|
|
@@ -1813,7 +1824,7 @@ var BadgeNode = ({ node }) => {
|
|
|
1813
1824
|
"span",
|
|
1814
1825
|
{
|
|
1815
1826
|
className: cn(
|
|
1816
|
-
"aui-ui-badge inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",
|
|
1827
|
+
"aui-ui-badge inline-flex w-fit shrink-0 items-center rounded-full px-2 py-0.5 text-xs font-medium",
|
|
1817
1828
|
BADGE_TONE[node.tone ?? "default"],
|
|
1818
1829
|
node.className
|
|
1819
1830
|
),
|
|
@@ -4360,13 +4371,14 @@ export {
|
|
|
4360
4371
|
studioSidebarCollapsedRailItemIdleClass,
|
|
4361
4372
|
studioSidebarCollapsedRailItemActiveClass,
|
|
4362
4373
|
studioSidebarNavItemActiveClass,
|
|
4374
|
+
toNum,
|
|
4375
|
+
monotoneLinePath,
|
|
4376
|
+
monotoneAreaPath,
|
|
4377
|
+
formatCompact,
|
|
4363
4378
|
TooltipIconButton,
|
|
4364
4379
|
UserMessageAttachments,
|
|
4365
4380
|
ComposerAttachments,
|
|
4366
4381
|
ComposerAddAttachment,
|
|
4367
|
-
toNum,
|
|
4368
|
-
monotoneLinePath,
|
|
4369
|
-
monotoneAreaPath,
|
|
4370
4382
|
resolveChartMargin,
|
|
4371
4383
|
flushBarCategoryGap,
|
|
4372
4384
|
flushLineAreaEdgeToEdge,
|