@brainfish-ai/components 0.22.11 → 0.23.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/avatar.d.ts +18 -0
- package/dist/chat-search.d.ts +14 -1
- package/dist/components/ui/avatar.d.ts +2 -0
- package/dist/dropdown-menu.d.ts +4 -0
- package/dist/esm/chunks/{ChatSearch.CgxpBVrd.js → ChatSearch.C6RERao6.js} +546 -188
- package/dist/esm/chunks/ChatSearch.C6RERao6.js.map +1 -0
- package/dist/esm/chunks/{FormattedMessage.ieoe4jPf.js → FormattedMessage.DFWDPJoI.js} +224 -224
- package/dist/esm/chunks/{FormattedMessage.ieoe4jPf.js.map → FormattedMessage.DFWDPJoI.js.map} +1 -1
- package/dist/esm/chunks/header-nav.gQJ2Hh5z.js +173 -0
- package/dist/esm/chunks/header-nav.gQJ2Hh5z.js.map +1 -0
- package/dist/esm/chunks/{hooks.CKojclfe.js → hooks.DI5ftshU.js} +29 -2
- package/dist/esm/chunks/hooks.DI5ftshU.js.map +1 -0
- package/dist/esm/chunks/{layout.Cxgg3kfZ.js → layout.Cw9KlzMD.js} +4 -4
- package/dist/esm/chunks/{layout.Cxgg3kfZ.js.map → layout.Cw9KlzMD.js.map} +1 -1
- package/dist/esm/chunks/{review-list.B1IHUfFS.js → review-list.CVJB3TFg.js} +3 -3
- package/dist/esm/chunks/{review-list.B1IHUfFS.js.map → review-list.CVJB3TFg.js.map} +1 -1
- package/dist/esm/chunks/{sidebar.Cfrsif7V.js → sidebar.BejmvpB3.js} +14 -13
- package/dist/esm/chunks/sidebar.BejmvpB3.js.map +1 -0
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/components/convos.js +4 -3
- package/dist/esm/components/convos.js.map +1 -1
- package/dist/esm/components/markdown.js +1 -1
- package/dist/esm/components/ui/avatar.js +90 -0
- package/dist/esm/components/ui/avatar.js.map +1 -0
- package/dist/esm/components/ui/dropdown-menu.js +8 -6
- package/dist/esm/components/ui/dropdown-menu.js.map +1 -1
- package/dist/esm/global.css +1 -1
- package/dist/esm/index.js +8 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/layouts/full-layout.js +2 -2
- package/dist/esm/layouts/header-nav.js +1 -1
- package/dist/esm/layouts/sidebar.js +1 -1
- package/dist/esm/scenes/knowledge-review.js +1 -1
- package/dist/esm/tailwind.preset.js +12 -12
- package/dist/esm/tailwind.preset.js.map +1 -1
- package/dist/full-layout.d.ts +26 -1
- package/dist/header-nav.d.ts +26 -1
- package/dist/index.d.ts +59 -2
- package/dist/stats.html +1 -1
- package/package.json +10 -9
- package/dist/esm/chunks/ChatSearch.CgxpBVrd.js.map +0 -1
- package/dist/esm/chunks/header-nav.DSUAniYA.js +0 -73
- package/dist/esm/chunks/header-nav.DSUAniYA.js.map +0 -1
- package/dist/esm/chunks/hooks.CKojclfe.js.map +0 -1
- package/dist/esm/chunks/sidebar.Cfrsif7V.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
2
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
3
4
|
import { ClassProp } from 'class-variance-authority/types';
|
|
4
5
|
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
5
6
|
import { ColumnDef } from '@tanstack/react-table';
|
|
@@ -42,6 +43,12 @@ export declare type AccountDropdownActionItem = {
|
|
|
42
43
|
label: string;
|
|
43
44
|
icon?: React_2.ReactNode;
|
|
44
45
|
onClick: () => void;
|
|
46
|
+
/** Second line (e.g. "ID: xyz"); copy button shown when copyValue is set. */
|
|
47
|
+
secondaryLabel?: React_2.ReactNode;
|
|
48
|
+
copyValue?: string;
|
|
49
|
+
onCopy?: (value: string) => void;
|
|
50
|
+
/** Keyboard shortcut hint (e.g. "⌘K") shown on the right. */
|
|
51
|
+
shortcut?: string;
|
|
45
52
|
};
|
|
46
53
|
|
|
47
54
|
export declare type AccountDropdownItem = AccountDropdownActionItem | AccountDropdownSubmenuItem;
|
|
@@ -49,11 +56,14 @@ export declare type AccountDropdownItem = AccountDropdownActionItem | AccountDro
|
|
|
49
56
|
declare interface AccountDropdownProps extends React_2.ComponentPropsWithoutRef<typeof DropdownMenu> {
|
|
50
57
|
accountPhoto: string;
|
|
51
58
|
accountName: string;
|
|
52
|
-
|
|
59
|
+
/** Pass a flat array for a single group, or an array of arrays for multiple groups separated by dividers. */
|
|
60
|
+
accountDropdownItems: AccountDropdownItem[] | AccountDropdownItem[][];
|
|
61
|
+
teams: AccountDropdownTeam[];
|
|
53
62
|
/** Side the dropdown opens on relative to the trigger. Defaults to 'bottom'. */
|
|
54
63
|
side?: React_2.ComponentPropsWithoutRef<typeof DropdownMenuContent>['side'];
|
|
55
64
|
/** Alignment of the dropdown relative to the trigger. Defaults to 'end'. */
|
|
56
65
|
align?: React_2.ComponentPropsWithoutRef<typeof DropdownMenuContent>['align'];
|
|
66
|
+
isSuperAdmin?: boolean;
|
|
57
67
|
}
|
|
58
68
|
|
|
59
69
|
/** Sub-option with a required `value`, used in radio-mode submenus. */
|
|
@@ -66,6 +76,10 @@ declare type AccountDropdownSubmenuBase = {
|
|
|
66
76
|
id: string;
|
|
67
77
|
label: string;
|
|
68
78
|
icon?: React_2.ReactNode;
|
|
79
|
+
/** Second line on the submenu trigger (e.g. "ID: xyz"); copy button when copyValue is set. */
|
|
80
|
+
secondaryLabel?: React_2.ReactNode;
|
|
81
|
+
copyValue?: string;
|
|
82
|
+
onCopy?: (value: string) => void;
|
|
69
83
|
};
|
|
70
84
|
|
|
71
85
|
export declare type AccountDropdownSubmenuItem = AccountDropdownSubmenuBase & ({
|
|
@@ -87,6 +101,15 @@ export declare type AccountDropdownSubOption = {
|
|
|
87
101
|
value?: string;
|
|
88
102
|
/** Used in plain (non-radio) mode. */
|
|
89
103
|
onClick?: () => void;
|
|
104
|
+
/** Keyboard shortcut hint (e.g. "⌘K") shown on the right. */
|
|
105
|
+
shortcut?: string;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export declare type AccountDropdownTeam = {
|
|
109
|
+
id: string;
|
|
110
|
+
name: string;
|
|
111
|
+
isCurrent: boolean;
|
|
112
|
+
logoUrl?: string;
|
|
90
113
|
};
|
|
91
114
|
|
|
92
115
|
declare type Action = {
|
|
@@ -262,6 +285,13 @@ export declare interface Answer {
|
|
|
262
285
|
searchIntentId?: string;
|
|
263
286
|
actions?: Action[];
|
|
264
287
|
hasError?: boolean;
|
|
288
|
+
attachments?: AnswerAttachment[];
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
declare interface AnswerAttachment {
|
|
292
|
+
type: AttachmentType;
|
|
293
|
+
url: string;
|
|
294
|
+
filename?: string;
|
|
265
295
|
}
|
|
266
296
|
|
|
267
297
|
declare type AnswerBlock = MarkdownTextBlock | ActionButtonsBlock | ActionInputFormBlock;
|
|
@@ -310,6 +340,7 @@ declare type AppendNewAnswer = {
|
|
|
310
340
|
payload: {
|
|
311
341
|
id?: string;
|
|
312
342
|
query: string;
|
|
343
|
+
attachments?: AnswerAttachment[];
|
|
313
344
|
};
|
|
314
345
|
};
|
|
315
346
|
|
|
@@ -318,6 +349,22 @@ export declare interface ArticleNavItem extends Omit<SidebarNavItem, 'Icon' | 'i
|
|
|
318
349
|
items?: ArticleNavItem[];
|
|
319
350
|
}
|
|
320
351
|
|
|
352
|
+
declare type AttachmentType = 'image' | 'file';
|
|
353
|
+
|
|
354
|
+
export declare function Avatar({ className, size, ...props }: React_2.ComponentProps<typeof AvatarPrimitive.Root> & {
|
|
355
|
+
size?: 'default' | 'sm' | 'lg';
|
|
356
|
+
}): React_2.JSX.Element;
|
|
357
|
+
|
|
358
|
+
export declare function AvatarBadge({ className, ...props }: React_2.ComponentProps<'span'>): React_2.JSX.Element;
|
|
359
|
+
|
|
360
|
+
export declare function AvatarFallback({ className, ...props }: React_2.ComponentProps<typeof AvatarPrimitive.Fallback>): React_2.JSX.Element;
|
|
361
|
+
|
|
362
|
+
export declare function AvatarGroup({ className, ...props }: React_2.ComponentProps<'div'>): React_2.JSX.Element;
|
|
363
|
+
|
|
364
|
+
export declare function AvatarGroupCount({ className, ...props }: React_2.ComponentProps<'div'>): React_2.JSX.Element;
|
|
365
|
+
|
|
366
|
+
export declare function AvatarImage({ className, ...props }: React_2.ComponentProps<typeof AvatarPrimitive.Image>): React_2.JSX.Element;
|
|
367
|
+
|
|
321
368
|
export declare function Badge({ className, variant, ...props }: BadgeProps): React_2.JSX.Element;
|
|
322
369
|
|
|
323
370
|
export declare interface BadgeProps extends React_2.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
@@ -574,6 +621,7 @@ export declare interface ChatSearchHandle {
|
|
|
574
621
|
subscribeToStateChanges: (callback: (state: ChatSearchState) => void) => () => void;
|
|
575
622
|
focusSearchField: () => void;
|
|
576
623
|
showCloseButton: (showButton: boolean) => void;
|
|
624
|
+
loadConversation: (conversationId: string) => void;
|
|
577
625
|
}
|
|
578
626
|
|
|
579
627
|
export declare interface ChatSearchProps {
|
|
@@ -592,6 +640,7 @@ export declare interface ChatSearchProps {
|
|
|
592
640
|
searchEndpoint: string;
|
|
593
641
|
answerEndpoint: string;
|
|
594
642
|
answerStreamEndpoint: string;
|
|
643
|
+
presignedUrlEndpoint?: string;
|
|
595
644
|
feedbackEndpoint?: string;
|
|
596
645
|
feedbackReasonEndpoint?: string;
|
|
597
646
|
loadConversationEndpoint?: string;
|
|
@@ -599,7 +648,7 @@ export declare interface ChatSearchProps {
|
|
|
599
648
|
autocompleteEndpoint?: string;
|
|
600
649
|
contentTypeEndpoint?: string;
|
|
601
650
|
disableFollowUpQuestions?: boolean;
|
|
602
|
-
|
|
651
|
+
enableFileAttachment?: boolean;
|
|
603
652
|
disableFeedback?: boolean;
|
|
604
653
|
disclaimer?: string;
|
|
605
654
|
offset?: number;
|
|
@@ -635,6 +684,7 @@ export declare const ChatSearchProvider: default_2.FC<{
|
|
|
635
684
|
children: ReactNode;
|
|
636
685
|
searchPath?: string;
|
|
637
686
|
contentTypeEndpoint?: string;
|
|
687
|
+
widgetKey?: string;
|
|
638
688
|
}>;
|
|
639
689
|
|
|
640
690
|
export declare interface ChatSearchState {
|
|
@@ -900,6 +950,8 @@ export declare const DropdownMenuGroup: React_2.ForwardRefExoticComponent<Dropdo
|
|
|
900
950
|
|
|
901
951
|
export declare const DropdownMenuItem: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
902
952
|
inset?: boolean | undefined;
|
|
953
|
+
/** Optional second row (e.g. ID + copy); consumer supplies full content as ReactNode. */
|
|
954
|
+
secondaryRow?: React_2.ReactNode;
|
|
903
955
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
904
956
|
|
|
905
957
|
export declare const DropdownMenuLabel: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
@@ -925,6 +977,8 @@ export declare const DropdownMenuSubContent: React_2.ForwardRefExoticComponent<O
|
|
|
925
977
|
|
|
926
978
|
export declare const DropdownMenuSubTrigger: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
927
979
|
inset?: boolean | undefined;
|
|
980
|
+
/** Optional second row (e.g. ID + copy); consumer supplies full content as ReactNode. */
|
|
981
|
+
secondaryRow?: React_2.ReactNode;
|
|
928
982
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
929
983
|
|
|
930
984
|
export declare const DropdownMenuTrigger: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1215,10 +1269,13 @@ declare interface HeaderNavProps extends React_2.ComponentPropsWithoutRef<'heade
|
|
|
1215
1269
|
isSideNavOpen?: boolean;
|
|
1216
1270
|
onSideNavigationToggle: () => void;
|
|
1217
1271
|
onHelpClick: () => void;
|
|
1272
|
+
onLogoNav: () => void;
|
|
1273
|
+
isHomePath?: boolean;
|
|
1218
1274
|
showSuggestionAction?: boolean;
|
|
1219
1275
|
suggestionAction?: React_2.ReactNode;
|
|
1220
1276
|
onSuggestionActionClick?: () => void;
|
|
1221
1277
|
showSidebarToggle?: boolean;
|
|
1278
|
+
isSuperAdmin?: boolean;
|
|
1222
1279
|
/** Ref for the sidebar toggle button; used by layout to move focus here when sidebar is collapsed. */
|
|
1223
1280
|
sidebarToggleRef?: React_2.Ref<HTMLButtonElement>;
|
|
1224
1281
|
}
|