@timbal-ai/timbal-react 0.5.0 → 0.5.2
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/dist/index.cjs +10 -10
- package/dist/index.esm.js +10 -10
- package/dist/styles.css +14 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1866,7 +1866,7 @@ var studioTopbarPillHeightClass = "h-[var(--studio-chrome-pill-height)] min-h-[v
|
|
|
1866
1866
|
var studioTopbarIconPillClass = "shrink-0 flex-none size-[var(--studio-chrome-pill-height)] min-h-[var(--studio-chrome-pill-height)] min-w-[var(--studio-chrome-pill-height)]";
|
|
1867
1867
|
var studioPlaygroundGradientClass = "bg-gradient-to-b from-playground-from via-playground-via to-playground-to";
|
|
1868
1868
|
var studioComposeInputShellClass = cn(
|
|
1869
|
-
"flex w-full flex-col rounded-2xl bg-composer-bg shadow-card-elevated outline-none",
|
|
1869
|
+
"aui-composer-shell flex w-full flex-col rounded-2xl bg-composer-bg shadow-card-elevated outline-none",
|
|
1870
1870
|
"border border-composer-border",
|
|
1871
1871
|
"transition-[box-shadow,border-color]",
|
|
1872
1872
|
"focus-within:border-composer-border-focus focus-within:ring-2 focus-within:ring-foreground/5"
|
|
@@ -3510,7 +3510,7 @@ var ComposerInput = ({
|
|
|
3510
3510
|
import_react22.ComposerPrimitive.Input,
|
|
3511
3511
|
{
|
|
3512
3512
|
placeholder,
|
|
3513
|
-
className: "aui-composer-input max-h-60 min-h-14 w-full resize-none bg-
|
|
3513
|
+
className: "aui-composer-input max-h-60 min-h-14 w-full resize-none bg-composer-bg px-3 pt-3 pb-1 text-sm outline-none placeholder:text-muted-foreground/70 focus-visible:ring-0",
|
|
3514
3514
|
rows: 1,
|
|
3515
3515
|
autoFocus,
|
|
3516
3516
|
"aria-label": "Message input",
|
|
@@ -3520,7 +3520,7 @@ var ComposerInput = ({
|
|
|
3520
3520
|
);
|
|
3521
3521
|
};
|
|
3522
3522
|
var ComposerToolbar = ({ showAttachments, toolbar, sendTooltip }) => {
|
|
3523
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "aui-composer-action-wrapper flex items-center justify-between gap-1 px-2.5 pb-2.5", children: [
|
|
3523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "aui-composer-action-wrapper relative z-[1] flex items-center justify-between gap-1 bg-composer-bg px-2.5 pb-2.5", children: [
|
|
3524
3524
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
3525
3525
|
showAttachments && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ComposerAddAttachment, {}),
|
|
3526
3526
|
toolbar
|
|
@@ -3736,7 +3736,7 @@ var Thread = ({
|
|
|
3736
3736
|
import_react26.ThreadPrimitive.Viewport,
|
|
3737
3737
|
{
|
|
3738
3738
|
turnAnchor: "bottom",
|
|
3739
|
-
className: "aui-thread-viewport relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll px-4 pt-4",
|
|
3739
|
+
className: "aui-thread-viewport relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll scroll-pb-4 px-4 pt-4",
|
|
3740
3740
|
children: [
|
|
3741
3741
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3742
3742
|
WelcomeSlot,
|
|
@@ -3756,7 +3756,7 @@ var Thread = ({
|
|
|
3756
3756
|
}
|
|
3757
3757
|
}
|
|
3758
3758
|
),
|
|
3759
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react26.ThreadPrimitive.ViewportFooter, { className: "aui-thread-viewport-footer sticky bottom-0 mx-auto mt-auto flex w-full max-w-(--thread-max-width) flex-col gap-4
|
|
3759
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react26.ThreadPrimitive.ViewportFooter, { className: "aui-thread-viewport-footer sticky bottom-0 z-10 mx-auto mt-auto flex w-full max-w-(--thread-max-width) isolate flex-col gap-4 bg-background pt-2 pb-4 md:pb-6", children: [
|
|
3760
3760
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ScrollToBottomSlot, {}),
|
|
3761
3761
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ComposerSlot, { placeholder: composerPlaceholder })
|
|
3762
3762
|
] })
|
|
@@ -3865,7 +3865,7 @@ var AssistantMessage = () => {
|
|
|
3865
3865
|
),
|
|
3866
3866
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MessageError, {})
|
|
3867
3867
|
] }),
|
|
3868
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "aui-assistant-message-footer mt-
|
|
3868
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "aui-assistant-message-footer mt-1 mb-3 ml-1 flex", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AssistantActionBar, {}) })
|
|
3869
3869
|
]
|
|
3870
3870
|
}
|
|
3871
3871
|
);
|
|
@@ -3882,7 +3882,7 @@ var AssistantActionBar = () => {
|
|
|
3882
3882
|
import_react26.ActionBarPrimitive.Root,
|
|
3883
3883
|
{
|
|
3884
3884
|
hideWhenRunning: true,
|
|
3885
|
-
autohide: "
|
|
3885
|
+
autohide: "never",
|
|
3886
3886
|
className: "aui-assistant-action-bar-root flex items-center gap-0 bg-transparent px-0 py-0.5 text-muted-foreground/60",
|
|
3887
3887
|
children: [
|
|
3888
3888
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react26.ActionBarPrimitive.Copy, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
@@ -3969,7 +3969,7 @@ var UserActionBar = () => {
|
|
|
3969
3969
|
import_react26.ActionBarPrimitive.Root,
|
|
3970
3970
|
{
|
|
3971
3971
|
hideWhenRunning: true,
|
|
3972
|
-
autohide: "
|
|
3972
|
+
autohide: "never",
|
|
3973
3973
|
className: "aui-user-action-bar-root flex flex-col items-end",
|
|
3974
3974
|
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react26.ActionBarPrimitive.Edit, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3975
3975
|
TooltipIconButton,
|
|
@@ -4252,7 +4252,7 @@ var TimbalChatShell = ({
|
|
|
4252
4252
|
workforceId: effectiveId,
|
|
4253
4253
|
baseUrl,
|
|
4254
4254
|
fetch: fetch2,
|
|
4255
|
-
className: "relative z-10 min-h-0 flex-1
|
|
4255
|
+
className: "relative z-10 min-h-0 flex-1",
|
|
4256
4256
|
...chatProps
|
|
4257
4257
|
},
|
|
4258
4258
|
effectiveId
|
|
@@ -5539,7 +5539,7 @@ var TimbalStudioShell = ({
|
|
|
5539
5539
|
key: activeWorkforceId,
|
|
5540
5540
|
welcome,
|
|
5541
5541
|
components: resolvedComponents,
|
|
5542
|
-
className: cn("min-h-0 flex-1
|
|
5542
|
+
className: cn("min-h-0 flex-1", chatProps.className)
|
|
5543
5543
|
}
|
|
5544
5544
|
) : null
|
|
5545
5545
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -1776,7 +1776,7 @@ var studioTopbarPillHeightClass = "h-[var(--studio-chrome-pill-height)] min-h-[v
|
|
|
1776
1776
|
var studioTopbarIconPillClass = "shrink-0 flex-none size-[var(--studio-chrome-pill-height)] min-h-[var(--studio-chrome-pill-height)] min-w-[var(--studio-chrome-pill-height)]";
|
|
1777
1777
|
var studioPlaygroundGradientClass = "bg-gradient-to-b from-playground-from via-playground-via to-playground-to";
|
|
1778
1778
|
var studioComposeInputShellClass = cn(
|
|
1779
|
-
"flex w-full flex-col rounded-2xl bg-composer-bg shadow-card-elevated outline-none",
|
|
1779
|
+
"aui-composer-shell flex w-full flex-col rounded-2xl bg-composer-bg shadow-card-elevated outline-none",
|
|
1780
1780
|
"border border-composer-border",
|
|
1781
1781
|
"transition-[box-shadow,border-color]",
|
|
1782
1782
|
"focus-within:border-composer-border-focus focus-within:ring-2 focus-within:ring-foreground/5"
|
|
@@ -3432,7 +3432,7 @@ var ComposerInput = ({
|
|
|
3432
3432
|
ComposerPrimitive2.Input,
|
|
3433
3433
|
{
|
|
3434
3434
|
placeholder,
|
|
3435
|
-
className: "aui-composer-input max-h-60 min-h-14 w-full resize-none bg-
|
|
3435
|
+
className: "aui-composer-input max-h-60 min-h-14 w-full resize-none bg-composer-bg px-3 pt-3 pb-1 text-sm outline-none placeholder:text-muted-foreground/70 focus-visible:ring-0",
|
|
3436
3436
|
rows: 1,
|
|
3437
3437
|
autoFocus,
|
|
3438
3438
|
"aria-label": "Message input",
|
|
@@ -3442,7 +3442,7 @@ var ComposerInput = ({
|
|
|
3442
3442
|
);
|
|
3443
3443
|
};
|
|
3444
3444
|
var ComposerToolbar = ({ showAttachments, toolbar, sendTooltip }) => {
|
|
3445
|
-
return /* @__PURE__ */ jsxs13("div", { className: "aui-composer-action-wrapper flex items-center justify-between gap-1 px-2.5 pb-2.5", children: [
|
|
3445
|
+
return /* @__PURE__ */ jsxs13("div", { className: "aui-composer-action-wrapper relative z-[1] flex items-center justify-between gap-1 bg-composer-bg px-2.5 pb-2.5", children: [
|
|
3446
3446
|
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-1", children: [
|
|
3447
3447
|
showAttachments && /* @__PURE__ */ jsx25(ComposerAddAttachment, {}),
|
|
3448
3448
|
toolbar
|
|
@@ -3662,7 +3662,7 @@ var Thread = ({
|
|
|
3662
3662
|
ThreadPrimitive.Viewport,
|
|
3663
3663
|
{
|
|
3664
3664
|
turnAnchor: "bottom",
|
|
3665
|
-
className: "aui-thread-viewport relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll px-4 pt-4",
|
|
3665
|
+
className: "aui-thread-viewport relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll scroll-pb-4 px-4 pt-4",
|
|
3666
3666
|
children: [
|
|
3667
3667
|
/* @__PURE__ */ jsx27(
|
|
3668
3668
|
WelcomeSlot,
|
|
@@ -3682,7 +3682,7 @@ var Thread = ({
|
|
|
3682
3682
|
}
|
|
3683
3683
|
}
|
|
3684
3684
|
),
|
|
3685
|
-
/* @__PURE__ */ jsxs15(ThreadPrimitive.ViewportFooter, { className: "aui-thread-viewport-footer sticky bottom-0 mx-auto mt-auto flex w-full max-w-(--thread-max-width) flex-col gap-4
|
|
3685
|
+
/* @__PURE__ */ jsxs15(ThreadPrimitive.ViewportFooter, { className: "aui-thread-viewport-footer sticky bottom-0 z-10 mx-auto mt-auto flex w-full max-w-(--thread-max-width) isolate flex-col gap-4 bg-background pt-2 pb-4 md:pb-6", children: [
|
|
3686
3686
|
/* @__PURE__ */ jsx27(ScrollToBottomSlot, {}),
|
|
3687
3687
|
/* @__PURE__ */ jsx27(ComposerSlot, { placeholder: composerPlaceholder })
|
|
3688
3688
|
] })
|
|
@@ -3791,7 +3791,7 @@ var AssistantMessage = () => {
|
|
|
3791
3791
|
),
|
|
3792
3792
|
/* @__PURE__ */ jsx27(MessageError, {})
|
|
3793
3793
|
] }),
|
|
3794
|
-
/* @__PURE__ */ jsx27("div", { className: "aui-assistant-message-footer mt-
|
|
3794
|
+
/* @__PURE__ */ jsx27("div", { className: "aui-assistant-message-footer mt-1 mb-3 ml-1 flex", children: /* @__PURE__ */ jsx27(AssistantActionBar, {}) })
|
|
3795
3795
|
]
|
|
3796
3796
|
}
|
|
3797
3797
|
);
|
|
@@ -3808,7 +3808,7 @@ var AssistantActionBar = () => {
|
|
|
3808
3808
|
ActionBarPrimitive.Root,
|
|
3809
3809
|
{
|
|
3810
3810
|
hideWhenRunning: true,
|
|
3811
|
-
autohide: "
|
|
3811
|
+
autohide: "never",
|
|
3812
3812
|
className: "aui-assistant-action-bar-root flex items-center gap-0 bg-transparent px-0 py-0.5 text-muted-foreground/60",
|
|
3813
3813
|
children: [
|
|
3814
3814
|
/* @__PURE__ */ jsx27(ActionBarPrimitive.Copy, { asChild: true, children: /* @__PURE__ */ jsxs15(
|
|
@@ -3895,7 +3895,7 @@ var UserActionBar = () => {
|
|
|
3895
3895
|
ActionBarPrimitive.Root,
|
|
3896
3896
|
{
|
|
3897
3897
|
hideWhenRunning: true,
|
|
3898
|
-
autohide: "
|
|
3898
|
+
autohide: "never",
|
|
3899
3899
|
className: "aui-user-action-bar-root flex flex-col items-end",
|
|
3900
3900
|
children: /* @__PURE__ */ jsx27(ActionBarPrimitive.Edit, { asChild: true, children: /* @__PURE__ */ jsx27(
|
|
3901
3901
|
TooltipIconButton,
|
|
@@ -4178,7 +4178,7 @@ var TimbalChatShell = ({
|
|
|
4178
4178
|
workforceId: effectiveId,
|
|
4179
4179
|
baseUrl,
|
|
4180
4180
|
fetch: fetch2,
|
|
4181
|
-
className: "relative z-10 min-h-0 flex-1
|
|
4181
|
+
className: "relative z-10 min-h-0 flex-1",
|
|
4182
4182
|
...chatProps
|
|
4183
4183
|
},
|
|
4184
4184
|
effectiveId
|
|
@@ -5481,7 +5481,7 @@ var TimbalStudioShell = ({
|
|
|
5481
5481
|
key: activeWorkforceId,
|
|
5482
5482
|
welcome,
|
|
5483
5483
|
components: resolvedComponents,
|
|
5484
|
-
className: cn("min-h-0 flex-1
|
|
5484
|
+
className: cn("min-h-0 flex-1", chatProps.className)
|
|
5485
5485
|
}
|
|
5486
5486
|
) : null
|
|
5487
5487
|
}
|
package/dist/styles.css
CHANGED
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
|
|
70
70
|
/* Composer shell — opaque card with stronger focus border. */
|
|
71
71
|
--composer-bg: oklch(1 0 0);
|
|
72
|
-
--composer-border: oklch(0.91 0.004 260
|
|
73
|
-
--composer-border-focus: oklch(0.62 0.005 260
|
|
72
|
+
--composer-border: oklch(0.91 0.004 260);
|
|
73
|
+
--composer-border-focus: oklch(0.62 0.005 260);
|
|
74
74
|
|
|
75
75
|
/* User message bubble — neutral-200 on light, neutral-700 on dark. */
|
|
76
76
|
--bubble-user: oklch(0.922 0 0);
|
|
@@ -460,11 +460,18 @@
|
|
|
460
460
|
* Component fixes — baked in so consumers don't need overrides *
|
|
461
461
|
* =============================================================== */
|
|
462
462
|
|
|
463
|
-
/*
|
|
464
|
-
|
|
465
|
-
stay transparent — otherwise a token mismatch surfaces as a coloured
|
|
466
|
-
strip behind the composer. */
|
|
463
|
+
/* Opaque sticky footer so scrolled messages and the playground gradient do
|
|
464
|
+
not bleed through the composer. */
|
|
467
465
|
.aui-thread-viewport-footer {
|
|
468
|
-
background:
|
|
466
|
+
background-color: var(--background) !important;
|
|
469
467
|
border-radius: 0 !important;
|
|
468
|
+
isolation: isolate;
|
|
469
|
+
z-index: 10;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/* Scrolled assistant action bars must not show through the composer shell. */
|
|
473
|
+
.aui-composer-shell,
|
|
474
|
+
.aui-composer-input,
|
|
475
|
+
.aui-composer-action-wrapper {
|
|
476
|
+
background-color: var(--composer-bg);
|
|
470
477
|
}
|