@brainfish-ai/components 0.30.9 → 0.31.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/dist/conversation.d.ts +46 -2
- package/dist/esm/ChatSearch.css +1 -1
- package/dist/esm/chunks/{ChatSearch.DvJtrQld.js → ChatSearch.CcpQJlxZ.js} +84 -87
- package/dist/esm/chunks/ChatSearch.CcpQJlxZ.js.map +1 -0
- package/dist/esm/chunks/Conversation.DpHoC6se.js +29 -0
- package/dist/esm/chunks/Conversation.DpHoC6se.js.map +1 -0
- package/dist/esm/chunks/{header-pane.CMHPm65L.js → header-pane.D7hpI7mt.js} +2 -2
- package/dist/esm/chunks/{header-pane.CMHPm65L.js.map → header-pane.D7hpI7mt.js.map} +1 -1
- package/dist/esm/chunks/ripple-status.C20jzXjF.js +6 -0
- package/dist/esm/chunks/ripple-status.C20jzXjF.js.map +1 -0
- package/dist/esm/chunks/{sidebar.cdQIaDi5.js → sidebar.DNJ1Iufi.js} +15 -15
- package/dist/esm/chunks/sidebar.DNJ1Iufi.js.map +1 -0
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/components/conversation.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/layouts/full-layout.js +1 -1
- package/dist/esm/layouts/sidebar.js +1 -1
- package/dist/esm/ripple-status.css +1 -0
- package/dist/index.d.ts +73 -2
- package/dist/stats.html +1 -1
- package/package.json +1 -1
- package/dist/esm/chunks/ChatSearch.DvJtrQld.js.map +0 -1
- package/dist/esm/chunks/Conversation.CCfPtVz8.js +0 -29
- package/dist/esm/chunks/Conversation.CCfPtVz8.js.map +0 -1
- package/dist/esm/chunks/ConversationStatus.BhdnM1uS.js +0 -2
- package/dist/esm/chunks/ConversationStatus.BhdnM1uS.js.map +0 -1
- package/dist/esm/chunks/sidebar.cdQIaDi5.js.map +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './global.css';/* empty css */export{BrainfishColors}from"./colors.js";export{C as ChatSearch,a as ChatSearchProvider,R as ResolvedConversationFooter,u as useChatSearch,b as useIsChatSearchDirty}from"./chunks/ChatSearch.
|
|
1
|
+
import './global.css';/* empty css */export{BrainfishColors}from"./colors.js";export{C as ChatSearch,a as ChatSearchProvider,R as ResolvedConversationFooter,u as useChatSearch,b as useIsChatSearchDirty}from"./chunks/ChatSearch.CcpQJlxZ.js";export{C as ContextPillBadge,a as Conversation,b as ConversationActions,c as ConversationInput,d as ConversationMessageAssistant,e as ConversationMessageUser,f as ConversationMessages,g as ConversationProvider,h as ConversationStatus,i as ConversationSuggestions,j as getConversationStatusLabel,u as useConversation}from"./chunks/Conversation.DpHoC6se.js";export{C as CodeBlock,F as FormattedMessage,M as MemoizedReactMarkdown,Z as ZoomableImage,a as addPopupWidgetUtm,b as addUtmParameters}from"./chunks/FormattedMessage.D_knqVl-.js";export{MermaidDiagram}from"./chunks/MermaidDiagram.PRgXQ5Yh.js";export{Avatar,AvatarBadge,AvatarFallback,AvatarGroup,AvatarGroupCount,AvatarImage}from"./components/ui/avatar.js";export{B as Button,b as buttonVariants}from"./chunks/button.D_2SonNs.js";export{Collapsible,CollapsibleContent,CollapsibleTrigger}from"./components/ui/collapsible.js";export{DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger}from"./components/ui/dropdown-menu.js";export{Switch}from"./components/ui/switch.js";export{Tooltip,TooltipContent,TooltipProvider,TooltipTrigger}from"./components/ui/tooltip.js";export{Textarea}from"./components/ui/textarea.js";export{ScrollArea,ScrollBar}from"./components/ui/scroll-area.js";export{Label}from"./components/ui/label.js";export{Input}from"./components/ui/input.js";export{Popover,PopoverAnchor,PopoverContent,PopoverTrigger}from"./components/ui/popover.js";export{Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut}from"./components/ui/command.js";export{Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger}from"./components/ui/dialog.js";export{Card,CardContent,CardDescription,CardFooter,CardHeader,CardTitle}from"./components/ui/card.js";export{Table,TableBody,TableCaption,TableCell,TableFooter,TableHead,TableHeader,TableRow}from"./components/ui/table.js";export{Badge,badgeVariants}from"./components/ui/badge.js";export{Progress}from"./components/ui/progress.js";export{Accordion,AccordionContent,AccordionItem,AccordionTrigger}from"./components/ui/accordion.js";export{AlertDialog,AlertDialogAction,AlertDialogCancel,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogHeader,AlertDialogOverlay,AlertDialogPortal,AlertDialogTitle,AlertDialogTrigger}from"./components/ui/alert-dialog.js";export{Alert,AlertAction,AlertContent,AlertDescription,AlertTitle}from"./components/ui/alert.js";export{ButtonGroup,ButtonGroupSeparator,ButtonGroupText,buttonGroupVariants}from"./components/ui/button-group.js";export{Calendar}from"./components/ui/calendar.js";export{DivButton,divButtonVariants}from"./components/ui/div-button.js";export{Icon,MemoizedIcon}from"./components/ui/icon.js";export{Item,ItemActions,ItemContent,ItemDescription,ItemFooter,ItemGroup,ItemHeader,ItemMedia,ItemSeparator,ItemTitle}from"./components/ui/item.js";export{Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectSeparator,SelectTrigger,SelectValue}from"./components/ui/select.js";export{Separator}from"./components/ui/separator.js";export{Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger}from"./components/ui/sheet.js";export{Spinner}from"./components/ui/spinner.js";export{R as Ripple,a as RippleStatus,S as SweepText}from"./chunks/ripple-status.C20jzXjF.js";export{S as SimpleSelect}from"./chunks/simpleSelect.CEUUfl3O.js";export{D as DatePicker}from"./chunks/date-picker.C2VT_rZ9.js";export{C as Combobox}from"./chunks/combobox.MyoPH18G.js";export{T as TwoLevelCombobox}from"./chunks/two-level-combobox.DJYP--W9.js";export{F as Filter,a as Filters,O as Operator}from"./chunks/filters.BHp3ukNW.js";export{F as FileUpload,a as FileUploadStatus,f as formatFileSize}from"./chunks/file-upload-status.D8RhMcbO.js";export{D as DataTable}from"./chunks/data-table.bjvbLk2u.js";export{I as InputWithTags}from"./chunks/input-with-tags.DLv9e0XI.js";export{L as Logo}from"./chunks/logo.DtwFGMBj.js";export{C as ChatLogo}from"./chunks/chat-logo.CqPppEb9.js";export{A as AILogo,a as AILogoPaths}from"./chunks/ai-logo.Bh2bhNcG.js";export{T as Trend,a as TrendValue}from"./chunks/trend-value.BPBDBsk2.js";export{F as FontPicker,a as FontPickerItem,c as clearFontCache,g as getCachedFonts,l as loadFont,s as setCachedFonts,u as useFontOptions}from"./chunks/font-picker.YAE99idL.js";export{F as FullLayout,a as FullLayoutHeader,b as FullLayoutLeftSidebar,c as FullLayoutNavStateContext,d as FullLayoutProvider,e as FullLayoutRightSidebar,u as useFullLayoutContext,f as useRightSidebar}from"./chunks/header-pane.D7hpI7mt.js";export{H as HEADER_NAV_HEIGHT,a as HeaderNav}from"./chunks/header-nav.BfblRKoS.js";export{S as Sidebar,u as useSidebar}from"./chunks/sidebar.DNJ1Iufi.js";export{MicrosoftTeamsLogo}from"./logos/microsoft-teams-logo.js";export{SlackLogo}from"./logos/slack-logo.js";export{MicrosoftLogo}from"./logos/microsoft-logo.js";export{R as ReviewList,a as ReviewListItem,b as ReviewsSelectionProvider,S as SuggestionCard,u as useReviewsSelection}from"./chunks/suggestion-card.D-AsG_yB.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{F as FullLayout,a as FullLayoutHeader,b as FullLayoutLeftSidebar,c as FullLayoutNavStateContext,d as FullLayoutProvider,e as FullLayoutRightSidebar,u as useFullLayoutContext,f as useRightSidebar}from"../chunks/header-pane.
|
|
1
|
+
export{F as FullLayout,a as FullLayoutHeader,b as FullLayoutLeftSidebar,c as FullLayoutNavStateContext,d as FullLayoutProvider,e as FullLayoutRightSidebar,u as useFullLayoutContext,f as useRightSidebar}from"../chunks/header-pane.D7hpI7mt.js";
|
|
2
2
|
//# sourceMappingURL=full-layout.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{S as Sidebar,u as useSidebar}from"../chunks/sidebar.
|
|
1
|
+
export{S as Sidebar,u as useSidebar}from"../chunks/sidebar.DNJ1Iufi.js";
|
|
2
2
|
//# sourceMappingURL=sidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._loader_bghon_1 path{transform-box:view-box;transform-origin:36px 36px;transform:scale(1);animation:_ripple_bghon_1 1.6s ease-in-out infinite}._loader_bghon_1._monochrome_bghon_8 path{fill:var(--bfc-foreground)}._loader_bghon_1 path:nth-of-type(1){animation-delay:0s}._loader_bghon_1 path:nth-of-type(2){animation-delay:.22s}._loader_bghon_1 path:nth-of-type(3){animation-delay:.45s}._loader_bghon_1 path:nth-of-type(4){animation-delay:.67s}@keyframes _ripple_bghon_1{0%,to{opacity:.16;transform:scale(1)}16%{opacity:1;transform:scale(.74)}}@media(prefers-reduced-motion:reduce){._loader_bghon_1 path{animation:none;opacity:1;transform:scale(1)}}
|
package/dist/index.d.ts
CHANGED
|
@@ -186,6 +186,8 @@ declare enum ActionType {
|
|
|
186
186
|
LaunchZendeskSunshineChat = "launch_zendesk_sunshine_chat"
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
export declare type ActivityBlock = ThinkingBlock | ToolUseBlock | ToolResultBlock;
|
|
190
|
+
|
|
189
191
|
declare type AddActionButtons = {
|
|
190
192
|
type: typeof AnswersActions.ADD_ACTION_BUTTONS;
|
|
191
193
|
payload: {
|
|
@@ -975,7 +977,7 @@ declare namespace Compounds {
|
|
|
975
977
|
}
|
|
976
978
|
}
|
|
977
979
|
|
|
978
|
-
export declare type ContentBlock = TextBlock | AttachmentBlock;
|
|
980
|
+
export declare type ContentBlock = TextBlock | AttachmentBlock | ActivityBlock;
|
|
979
981
|
|
|
980
982
|
declare type ContextPill = {
|
|
981
983
|
id: string;
|
|
@@ -1107,7 +1109,7 @@ export declare const ConversationStatus: ({ className, children, variant, }: Con
|
|
|
1107
1109
|
declare interface ConversationStatusProps_2 {
|
|
1108
1110
|
className?: string;
|
|
1109
1111
|
children?: default_2.ReactNode;
|
|
1110
|
-
variant?:
|
|
1112
|
+
variant?: SweepTextVariant;
|
|
1111
1113
|
}
|
|
1112
1114
|
|
|
1113
1115
|
export declare const ConversationSuggestions: ({ items, className }: ConversationSuggestionsProps_2) => default_2.JSX.Element | null;
|
|
@@ -1537,6 +1539,21 @@ declare type GetActionInputs = {
|
|
|
1537
1539
|
*/
|
|
1538
1540
|
export declare const getCachedFonts: () => FontOption[] | null;
|
|
1539
1541
|
|
|
1542
|
+
/**
|
|
1543
|
+
* Derive the live status label from a message's latest content block, or `null`
|
|
1544
|
+
* when no status should be shown.
|
|
1545
|
+
*
|
|
1546
|
+
* The status reflects only the most recent activity ("latest only"): a tool
|
|
1547
|
+
* call shows its mapped label, thinking shows "Thinking", and a tool result
|
|
1548
|
+
* keeps the originating tool's label so it doesn't flicker to generic between
|
|
1549
|
+
* the result arriving and the next block.
|
|
1550
|
+
*
|
|
1551
|
+
* It is shown before the first answer text and while tools/thinking are in
|
|
1552
|
+
* flight, but hidden once answer text is actively streaming — returning `null`
|
|
1553
|
+
* when the latest block is a text block that already has content.
|
|
1554
|
+
*/
|
|
1555
|
+
export declare function getConversationStatusLabel(message: Message): string | null;
|
|
1556
|
+
|
|
1540
1557
|
declare function Header(props: ComponentProps<typeof HeaderNav>): default_2.JSX.Element | null;
|
|
1541
1558
|
|
|
1542
1559
|
declare namespace Header {
|
|
@@ -1950,6 +1967,26 @@ declare namespace RightSidebar {
|
|
|
1950
1967
|
var displayName: string;
|
|
1951
1968
|
}
|
|
1952
1969
|
|
|
1970
|
+
export declare function Ripple({ className, colored, ...props }: RippleProps): default_2.JSX.Element;
|
|
1971
|
+
|
|
1972
|
+
export declare interface RippleProps extends default_2.SVGAttributes<SVGSVGElement> {
|
|
1973
|
+
colored?: boolean;
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
/**
|
|
1977
|
+
* Presentational loading status: an animated ripple glyph alongside shimmer
|
|
1978
|
+
* status text that cross-fades whenever the text changes. Purely presentational
|
|
1979
|
+
* — callers populate `text` with their own logic.
|
|
1980
|
+
*/
|
|
1981
|
+
export declare function RippleStatus({ text, className, variant }: RippleStatusProps): default_2.JSX.Element;
|
|
1982
|
+
|
|
1983
|
+
export declare interface RippleStatusProps {
|
|
1984
|
+
/** The status text to display. Each caller supplies its own. */
|
|
1985
|
+
text: string;
|
|
1986
|
+
className?: string;
|
|
1987
|
+
variant?: SweepTextVariant;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1953
1990
|
export declare const ScrollArea: React_2.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1954
1991
|
|
|
1955
1992
|
export declare const ScrollBar: React_2.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -2266,6 +2303,21 @@ export declare interface SuggestionCardSource {
|
|
|
2266
2303
|
icon?: React_2.ReactNode;
|
|
2267
2304
|
}
|
|
2268
2305
|
|
|
2306
|
+
/** Shimmer/sweep status text. The animated gradient sweeps across the text. */
|
|
2307
|
+
export declare const SweepText: ({ className, children, variant }: SweepTextProps) => default_2.JSX.Element;
|
|
2308
|
+
|
|
2309
|
+
export declare interface SweepTextProps {
|
|
2310
|
+
className?: string;
|
|
2311
|
+
children?: default_2.ReactNode;
|
|
2312
|
+
variant?: SweepTextVariant;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
export declare type SweepTextVariant = NonNullable<VariantProps<typeof sweepTextVariants>['variant']>;
|
|
2316
|
+
|
|
2317
|
+
declare const sweepTextVariants: (props?: ({
|
|
2318
|
+
variant?: "dark" | "yellowfin" | "dark-subtle" | null | undefined;
|
|
2319
|
+
} & ClassProp) | undefined) => string;
|
|
2320
|
+
|
|
2269
2321
|
export declare const Switch: React_2.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
2270
2322
|
|
|
2271
2323
|
export declare const Table: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableElement> & React_2.RefAttributes<HTMLTableElement>>;
|
|
@@ -2316,6 +2368,17 @@ declare interface TextConfig {
|
|
|
2316
2368
|
uncertaintyFallbackText?: Record<string, string>;
|
|
2317
2369
|
}
|
|
2318
2370
|
|
|
2371
|
+
export declare type ThinkingBlock = {
|
|
2372
|
+
type: 'thinking';
|
|
2373
|
+
thinking: string;
|
|
2374
|
+
};
|
|
2375
|
+
|
|
2376
|
+
export declare type ToolResultBlock = {
|
|
2377
|
+
type: 'tool_result';
|
|
2378
|
+
toolUseId: string;
|
|
2379
|
+
content: string;
|
|
2380
|
+
};
|
|
2381
|
+
|
|
2319
2382
|
export declare const Tooltip: React_2.FC<TooltipPrimitive.TooltipProps>;
|
|
2320
2383
|
|
|
2321
2384
|
export declare const TooltipContent: React_2.ForwardRefExoticComponent<TooltipContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -2328,6 +2391,14 @@ export declare const TooltipProvider: ({ delayDuration, ...props }: TooltipPrimi
|
|
|
2328
2391
|
|
|
2329
2392
|
export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
2330
2393
|
|
|
2394
|
+
/** A tool invocation. `input` holds the raw (possibly partial) JSON arguments string. */
|
|
2395
|
+
export declare type ToolUseBlock = {
|
|
2396
|
+
type: 'tool_use';
|
|
2397
|
+
id: string;
|
|
2398
|
+
name: string;
|
|
2399
|
+
input: string;
|
|
2400
|
+
};
|
|
2401
|
+
|
|
2331
2402
|
export declare enum Trend {
|
|
2332
2403
|
UP = "up",
|
|
2333
2404
|
DOWN = "down",
|