@brainfish-ai/components 0.25.2 → 0.25.4
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/chat-search.d.ts +5 -2
- package/dist/conversation.d.ts +14 -42
- package/dist/esm/chunks/{ChatSearch.C7aXA1pe.js → ChatSearch.CL2VnSod.js} +28 -2
- package/dist/esm/chunks/ChatSearch.CL2VnSod.js.map +1 -0
- package/dist/esm/chunks/{Conversation.BEDav4lr.js → Conversation.BriXFYqU.js} +71 -66
- package/dist/esm/chunks/Conversation.BriXFYqU.js.map +1 -0
- package/dist/esm/chunks/{header-nav.BNurn_vB.js → header-nav.b4hvOsKc.js} +1 -6
- package/dist/esm/chunks/{header-nav.BNurn_vB.js.map → header-nav.b4hvOsKc.js.map} +1 -1
- package/dist/esm/chunks/{header-pane.HHU1VCEo.js → header-pane.BV7xKJXV.js} +21 -13
- package/dist/esm/chunks/header-pane.BV7xKJXV.js.map +1 -0
- package/dist/esm/chunks/{sidebar.4LrKRtiC.js → sidebar.PfXKnt9J.js} +8 -2
- package/dist/esm/chunks/sidebar.PfXKnt9J.js.map +1 -0
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/components/conversation.js +1 -1
- package/dist/esm/global.css +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/layouts/full-layout.js +1 -1
- package/dist/esm/layouts/header-nav.js +1 -1
- package/dist/esm/layouts/sidebar.js +1 -1
- package/dist/esm/tailwind.preset.js +8 -2
- package/dist/esm/tailwind.preset.js.map +1 -1
- package/dist/full-layout.d.ts +5 -1
- package/dist/index.d.ts +28 -49
- package/dist/stats.html +1 -1
- package/package.json +1 -1
- package/tailwind.preset.ts +7 -0
- package/dist/esm/chunks/ChatSearch.C7aXA1pe.js.map +0 -1
- package/dist/esm/chunks/Conversation.BEDav4lr.js.map +0 -1
- package/dist/esm/chunks/header-pane.HHU1VCEo.js.map +0 -1
- package/dist/esm/chunks/sidebar.4LrKRtiC.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { ColumnDef } from '@tanstack/react-table';
|
|
|
7
7
|
import { ComponentProps } from 'react';
|
|
8
8
|
import { ConversationActionsProps } from './ConversationActions';
|
|
9
9
|
import { ConversationInputProps } from './ConversationInput';
|
|
10
|
-
import { ConversationLoadingProps } from './ConversationLoading';
|
|
11
10
|
import { ConversationMessagesProps } from './ConversationMessages';
|
|
11
|
+
import { ConversationStatusProps } from './ConversationStatus';
|
|
12
12
|
import { ConversationSuggestionsProps } from './ConversationSuggestions';
|
|
13
13
|
import { DayPicker } from 'react-day-picker';
|
|
14
14
|
import { default as default_2 } from 'react';
|
|
@@ -134,11 +134,6 @@ declare type ActionButtonsBlock = {
|
|
|
134
134
|
type: 'action-buttons';
|
|
135
135
|
};
|
|
136
136
|
|
|
137
|
-
export declare type ActionButtonsPart = {
|
|
138
|
-
type: 'action-buttons';
|
|
139
|
-
actions: ConversationAction[];
|
|
140
|
-
};
|
|
141
|
-
|
|
142
137
|
declare type ActionInput = {
|
|
143
138
|
name: string;
|
|
144
139
|
required: boolean;
|
|
@@ -183,7 +178,8 @@ declare enum ActionType {
|
|
|
183
178
|
LaunchZendeskChat = "launch_zendesk_chat",
|
|
184
179
|
LaunchZendeskMessenger = "launch_zendesk_messenger",
|
|
185
180
|
LaunchFreshdesk = "launch_freshdesk",
|
|
186
|
-
LaunchSupportTicketForm = "launch_support_ticket_form"
|
|
181
|
+
LaunchSupportTicketForm = "launch_support_ticket_form",
|
|
182
|
+
LaunchZendeskSunshineChat = "launch_zendesk_sunshine_chat"
|
|
187
183
|
}
|
|
188
184
|
|
|
189
185
|
declare type AddActionButtons = {
|
|
@@ -711,6 +707,7 @@ export declare interface ChatSearchProps {
|
|
|
711
707
|
isAgentAssist?: boolean;
|
|
712
708
|
isSearchWidget?: boolean;
|
|
713
709
|
hideCitations?: boolean;
|
|
710
|
+
conversationInlineSlot?: ReactNode;
|
|
714
711
|
}
|
|
715
712
|
|
|
716
713
|
export declare const ChatSearchProvider: default_2.FC<{
|
|
@@ -734,11 +731,6 @@ export declare type Citation = {
|
|
|
734
731
|
url: string;
|
|
735
732
|
};
|
|
736
733
|
|
|
737
|
-
export declare type CitationPart = {
|
|
738
|
-
type: 'citation';
|
|
739
|
-
citations: Citation[];
|
|
740
|
-
};
|
|
741
|
-
|
|
742
734
|
declare type ClearAll = {
|
|
743
735
|
type: typeof AnswersActions.CLEAR_ALL;
|
|
744
736
|
};
|
|
@@ -925,6 +917,8 @@ declare namespace Compounds {
|
|
|
925
917
|
}
|
|
926
918
|
}
|
|
927
919
|
|
|
920
|
+
export declare type ContentBlock = TextBlock;
|
|
921
|
+
|
|
928
922
|
export declare type ContextPill = {
|
|
929
923
|
id: string;
|
|
930
924
|
label: string;
|
|
@@ -943,7 +937,7 @@ export declare const Conversation: (({ messages, callbacks, children, suggestion
|
|
|
943
937
|
Input: ({ placeholder, attachments, collections, contextPills, disabled, isElevated, className, }: ConversationInputProps) => default_2.JSX.Element;
|
|
944
938
|
Suggestions: ({ items, className }: ConversationSuggestionsProps) => default_2.JSX.Element | null;
|
|
945
939
|
Actions: ({ actions, onActionClick, className }: ConversationActionsProps) => default_2.JSX.Element | null;
|
|
946
|
-
Loading: ({ className }:
|
|
940
|
+
Loading: ({ className }: ConversationStatusProps) => default_2.JSX.Element;
|
|
947
941
|
};
|
|
948
942
|
|
|
949
943
|
export declare type ConversationAction = {
|
|
@@ -996,12 +990,6 @@ declare interface ConversationInputProps_2 {
|
|
|
996
990
|
className?: string;
|
|
997
991
|
}
|
|
998
992
|
|
|
999
|
-
export declare const ConversationLoading: ({ className }: ConversationLoadingProps_2) => default_2.JSX.Element;
|
|
1000
|
-
|
|
1001
|
-
declare interface ConversationLoadingProps_2 {
|
|
1002
|
-
className?: string;
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
993
|
export declare type ConversationMessage = {
|
|
1006
994
|
question: string;
|
|
1007
995
|
answer: string;
|
|
@@ -1051,6 +1039,12 @@ declare interface ConversationProviderProps {
|
|
|
1051
1039
|
children: default_2.ReactNode;
|
|
1052
1040
|
}
|
|
1053
1041
|
|
|
1042
|
+
export declare const ConversationStatus: ({ className }: ConversationStatusProps_2) => default_2.JSX.Element;
|
|
1043
|
+
|
|
1044
|
+
declare interface ConversationStatusProps_2 {
|
|
1045
|
+
className?: string;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1054
1048
|
export declare const ConversationSuggestions: ({ items, className }: ConversationSuggestionsProps_2) => default_2.JSX.Element | null;
|
|
1055
1049
|
|
|
1056
1050
|
declare interface ConversationSuggestionsProps_2 {
|
|
@@ -1412,6 +1406,7 @@ export declare const FullLayoutRightSidebar: default_2.ForwardRefExoticComponent
|
|
|
1412
1406
|
export declare interface FullLayoutRightSidebarProps extends Omit<default_2.ComponentPropsWithoutRef<'aside'>, 'children'> {
|
|
1413
1407
|
open: boolean;
|
|
1414
1408
|
children: default_2.ReactNode;
|
|
1409
|
+
scrollable?: boolean;
|
|
1415
1410
|
}
|
|
1416
1411
|
|
|
1417
1412
|
export declare interface FullLayoutRootProps {
|
|
@@ -1420,6 +1415,8 @@ export declare interface FullLayoutRootProps {
|
|
|
1420
1415
|
/** When true, main column uses a plain div (no Radix ScrollArea); viewport height is applied on `FullLayout.Main`. */
|
|
1421
1416
|
disableMainScrollArea?: boolean;
|
|
1422
1417
|
className?: string;
|
|
1418
|
+
/** When true, the right sidebar is always open and cannot be toggled. */
|
|
1419
|
+
forceRightSidebarOpen?: boolean;
|
|
1423
1420
|
}
|
|
1424
1421
|
|
|
1425
1422
|
declare function FullLayoutWithFlags(props: FullLayoutProps): default_2.JSX.Element;
|
|
@@ -1471,12 +1468,6 @@ declare interface HeaderNavProps extends React_2.ComponentPropsWithoutRef<'heade
|
|
|
1471
1468
|
|
|
1472
1469
|
export declare const Icon: default_2.ForwardRefExoticComponent<Omit<PhosphorIconProps, "ref"> & default_2.RefAttributes<SVGSVGElement>>;
|
|
1473
1470
|
|
|
1474
|
-
export declare type ImagePart = {
|
|
1475
|
-
type: 'image';
|
|
1476
|
-
url: string;
|
|
1477
|
-
alt?: string;
|
|
1478
|
-
};
|
|
1479
|
-
|
|
1480
1471
|
export declare const Input: default_2.ForwardRefExoticComponent<InputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
1481
1472
|
|
|
1482
1473
|
export declare interface InputProps extends default_2.InputHTMLAttributes<HTMLInputElement> {
|
|
@@ -1632,7 +1623,7 @@ declare interface MermaidDiagramProps {
|
|
|
1632
1623
|
export declare type Message = {
|
|
1633
1624
|
id: string;
|
|
1634
1625
|
role: MessageRole;
|
|
1635
|
-
|
|
1626
|
+
content: ContentBlock[];
|
|
1636
1627
|
status: MessageStatus;
|
|
1637
1628
|
createdAt?: Date;
|
|
1638
1629
|
feedback?: 'positive' | 'negative';
|
|
@@ -1643,9 +1634,7 @@ declare type Message_2 = {
|
|
|
1643
1634
|
uncertaintyFallbackText?: Record<string, string>;
|
|
1644
1635
|
};
|
|
1645
1636
|
|
|
1646
|
-
export declare type
|
|
1647
|
-
|
|
1648
|
-
export declare type MessageRole = 'user' | 'assistant';
|
|
1637
|
+
export declare type MessageRole = 'user' | 'ai';
|
|
1649
1638
|
|
|
1650
1639
|
export declare type MessageStatus = 'pending' | 'streaming' | 'completed' | 'error';
|
|
1651
1640
|
|
|
@@ -1686,7 +1675,8 @@ declare enum NextBestActionType {
|
|
|
1686
1675
|
ZendeskChat = "zendesk_chat",
|
|
1687
1676
|
ZendeskMessenger = "zendesk_messenger",
|
|
1688
1677
|
IntercomChat = "intercom_chat",
|
|
1689
|
-
Freshdesk = "freshdesk"
|
|
1678
|
+
Freshdesk = "freshdesk",
|
|
1679
|
+
ZendeskSunshineChat = "zendesk_sunshine_chat"
|
|
1690
1680
|
}
|
|
1691
1681
|
|
|
1692
1682
|
declare type NoArticlesFound = {
|
|
@@ -1812,8 +1802,9 @@ declare type ReviewsSelectionValue = {
|
|
|
1812
1802
|
breadcrumb?: string;
|
|
1813
1803
|
};
|
|
1814
1804
|
|
|
1815
|
-
declare function RightSidebar({ children }: {
|
|
1805
|
+
declare function RightSidebar({ children, scrollable }: {
|
|
1816
1806
|
children?: default_2.ReactNode;
|
|
1807
|
+
scrollable?: boolean;
|
|
1817
1808
|
}): default_2.JSX.Element | null;
|
|
1818
1809
|
|
|
1819
1810
|
declare namespace RightSidebar {
|
|
@@ -2053,6 +2044,12 @@ export declare interface TextareaProps extends React_2.ComponentProps<"textarea"
|
|
|
2053
2044
|
autoResize?: boolean;
|
|
2054
2045
|
}
|
|
2055
2046
|
|
|
2047
|
+
export declare type TextBlock = {
|
|
2048
|
+
type: 'text';
|
|
2049
|
+
text: string;
|
|
2050
|
+
citations?: Citation[];
|
|
2051
|
+
};
|
|
2052
|
+
|
|
2056
2053
|
declare interface TextConfig {
|
|
2057
2054
|
headerText?: string;
|
|
2058
2055
|
searchPlaceholder?: string;
|
|
@@ -2068,24 +2065,6 @@ declare interface TextConfig {
|
|
|
2068
2065
|
uncertaintyFallbackText?: Record<string, string>;
|
|
2069
2066
|
}
|
|
2070
2067
|
|
|
2071
|
-
export declare type TextPart = {
|
|
2072
|
-
type: 'text';
|
|
2073
|
-
text: string;
|
|
2074
|
-
};
|
|
2075
|
-
|
|
2076
|
-
export declare type ThinkingPart = {
|
|
2077
|
-
type: 'thinking';
|
|
2078
|
-
text: string;
|
|
2079
|
-
};
|
|
2080
|
-
|
|
2081
|
-
export declare type ToolCallPart = {
|
|
2082
|
-
type: 'tool-call';
|
|
2083
|
-
toolName: string;
|
|
2084
|
-
status: 'pending' | 'running' | 'completed' | 'error';
|
|
2085
|
-
args?: Record<string, unknown>;
|
|
2086
|
-
result?: string;
|
|
2087
|
-
};
|
|
2088
|
-
|
|
2089
2068
|
export declare const Tooltip: React_2.FC<TooltipPrimitive.TooltipProps>;
|
|
2090
2069
|
|
|
2091
2070
|
export declare const TooltipContent: React_2.ForwardRefExoticComponent<TooltipContentProps & React_2.RefAttributes<HTMLDivElement>>;
|