@brainfish-ai/components 0.25.3 → 0.25.5
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.BKCOw7kk.js → header-pane.BV7xKJXV.js} +20 -12
- package/dist/esm/chunks/header-pane.BV7xKJXV.js.map +1 -0
- package/dist/esm/chunks/{review-list.DjtiIcPl.js → review-list.BtSnfpSc.js} +7 -4
- package/dist/esm/chunks/review-list.BtSnfpSc.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/scenes/knowledge-review.js +26 -7
- package/dist/esm/scenes/knowledge-review.js.map +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 +31 -50
- package/dist/knowledge-review.d.ts +4 -1
- 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.BKCOw7kk.js.map +0 -1
- package/dist/esm/chunks/review-list.DjtiIcPl.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 = {
|
|
@@ -1793,9 +1783,10 @@ export declare type ReviewsProviderProps = {
|
|
|
1793
1783
|
onOpenArticleLink?: () => void;
|
|
1794
1784
|
onSourceLinkClick?: () => void;
|
|
1795
1785
|
breadcrumb?: string;
|
|
1786
|
+
suggestionReasonBody?: string;
|
|
1796
1787
|
};
|
|
1797
1788
|
|
|
1798
|
-
export declare function ReviewsSelectionProvider({ children, defaultSelectedItem, onApproveAllSuggestions, onRejectAllSuggestions, onAcceptAndPublish, onOpenArticleLink, onSourceLinkClick, breadcrumb, }: ReviewsProviderProps): default_2.JSX.Element;
|
|
1789
|
+
export declare function ReviewsSelectionProvider({ children, defaultSelectedItem, onApproveAllSuggestions, onRejectAllSuggestions, onAcceptAndPublish, onOpenArticleLink, onSourceLinkClick, breadcrumb, suggestionReasonBody, }: ReviewsProviderProps): default_2.JSX.Element;
|
|
1799
1790
|
|
|
1800
1791
|
declare type ReviewsSelectionValue = {
|
|
1801
1792
|
selectedItem: ReviewListItemProps | null;
|
|
@@ -1810,10 +1801,12 @@ declare type ReviewsSelectionValue = {
|
|
|
1810
1801
|
onOpenArticleLink?: () => void;
|
|
1811
1802
|
onSourceLinkClick?: () => void;
|
|
1812
1803
|
breadcrumb?: string;
|
|
1804
|
+
suggestionReasonBody?: string;
|
|
1813
1805
|
};
|
|
1814
1806
|
|
|
1815
|
-
declare function RightSidebar({ children }: {
|
|
1807
|
+
declare function RightSidebar({ children, scrollable }: {
|
|
1816
1808
|
children?: default_2.ReactNode;
|
|
1809
|
+
scrollable?: boolean;
|
|
1817
1810
|
}): default_2.JSX.Element | null;
|
|
1818
1811
|
|
|
1819
1812
|
declare namespace RightSidebar {
|
|
@@ -2053,6 +2046,12 @@ export declare interface TextareaProps extends React_2.ComponentProps<"textarea"
|
|
|
2053
2046
|
autoResize?: boolean;
|
|
2054
2047
|
}
|
|
2055
2048
|
|
|
2049
|
+
export declare type TextBlock = {
|
|
2050
|
+
type: 'text';
|
|
2051
|
+
text: string;
|
|
2052
|
+
citations?: Citation[];
|
|
2053
|
+
};
|
|
2054
|
+
|
|
2056
2055
|
declare interface TextConfig {
|
|
2057
2056
|
headerText?: string;
|
|
2058
2057
|
searchPlaceholder?: string;
|
|
@@ -2068,24 +2067,6 @@ declare interface TextConfig {
|
|
|
2068
2067
|
uncertaintyFallbackText?: Record<string, string>;
|
|
2069
2068
|
}
|
|
2070
2069
|
|
|
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
2070
|
export declare const Tooltip: React_2.FC<TooltipPrimitive.TooltipProps>;
|
|
2090
2071
|
|
|
2091
2072
|
export declare const TooltipContent: React_2.ForwardRefExoticComponent<TooltipContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -55,6 +55,7 @@ export declare type KnowledgeReviewSceneProps = {
|
|
|
55
55
|
breadcrumb?: string;
|
|
56
56
|
sourceIcon: default_2.ReactNode;
|
|
57
57
|
sourceDescription: string | null;
|
|
58
|
+
suggestionReasonBody?: string;
|
|
58
59
|
};
|
|
59
60
|
|
|
60
61
|
export declare type LoadedDiffDoc = {
|
|
@@ -94,9 +95,10 @@ declare type ReviewsProviderProps = {
|
|
|
94
95
|
onOpenArticleLink?: () => void;
|
|
95
96
|
onSourceLinkClick?: () => void;
|
|
96
97
|
breadcrumb?: string;
|
|
98
|
+
suggestionReasonBody?: string;
|
|
97
99
|
};
|
|
98
100
|
|
|
99
|
-
export declare function ReviewsSelectionProvider({ children, defaultSelectedItem, onApproveAllSuggestions, onRejectAllSuggestions, onAcceptAndPublish, onOpenArticleLink, onSourceLinkClick, breadcrumb, }: ReviewsProviderProps): default_2.JSX.Element;
|
|
101
|
+
export declare function ReviewsSelectionProvider({ children, defaultSelectedItem, onApproveAllSuggestions, onRejectAllSuggestions, onAcceptAndPublish, onOpenArticleLink, onSourceLinkClick, breadcrumb, suggestionReasonBody, }: ReviewsProviderProps): default_2.JSX.Element;
|
|
100
102
|
|
|
101
103
|
declare type ReviewsSelectionValue = {
|
|
102
104
|
selectedItem: ReviewListItemProps | null;
|
|
@@ -111,6 +113,7 @@ declare type ReviewsSelectionValue = {
|
|
|
111
113
|
onOpenArticleLink?: () => void;
|
|
112
114
|
onSourceLinkClick?: () => void;
|
|
113
115
|
breadcrumb?: string;
|
|
116
|
+
suggestionReasonBody?: string;
|
|
114
117
|
};
|
|
115
118
|
|
|
116
119
|
export declare function useReviewsSelection(): ReviewsSelectionValue;
|