@brainfish-ai/components 0.13.5 → 0.13.7

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.
Files changed (184) hide show
  1. package/dist/colors/blue.d.ts +13 -0
  2. package/dist/colors/customColor.d.ts +4 -0
  3. package/dist/colors/dark.d.ts +13 -0
  4. package/dist/colors/green.d.ts +13 -0
  5. package/dist/colors/index.d.ts +128 -0
  6. package/dist/colors/orange.d.ts +13 -0
  7. package/dist/colors/pink.d.ts +13 -0
  8. package/dist/colors/primary.d.ts +20 -0
  9. package/dist/colors/purple.d.ts +13 -0
  10. package/dist/colors/red.d.ts +13 -0
  11. package/dist/colors/yellow.d.ts +13 -0
  12. package/dist/components/chat-search/Answer.d.ts +29 -0
  13. package/dist/components/chat-search/AnswerActions.d.ts +13 -0
  14. package/dist/components/chat-search/AnswerBlock.d.ts +8 -0
  15. package/dist/components/chat-search/ChatSearch.d.ts +11 -0
  16. package/dist/components/chat-search/ChatSearchContext.d.ts +34 -0
  17. package/dist/components/chat-search/FollowUpQuestions.d.ts +7 -0
  18. package/dist/components/chat-search/FollowUpSearchBar.d.ts +11 -0
  19. package/dist/components/chat-search/Header.d.ts +9 -0
  20. package/dist/components/chat-search/LoadingConversation.d.ts +2 -0
  21. package/dist/components/chat-search/LoadingSkeleton.d.ts +6 -0
  22. package/dist/components/chat-search/NextBestActions.d.ts +8 -0
  23. package/dist/components/chat-search/PrimarySearch.d.ts +29 -0
  24. package/dist/components/chat-search/ScrollToBottomArrow.d.ts +6 -0
  25. package/dist/components/chat-search/Suggestions.d.ts +9 -0
  26. package/dist/components/chat-search/TimelineNavigation.d.ts +9 -0
  27. package/dist/components/chat-search/blocks/ActionButtons.d.ts +5 -0
  28. package/dist/components/chat-search/blocks/ActionInputForm.d.ts +20 -0
  29. package/dist/components/chat-search/blocks/MarkdownText.d.ts +8 -0
  30. package/dist/components/chat-search/blocks/utils.d.ts +15 -0
  31. package/dist/components/chat-search/helpers/excuteClientAction.d.ts +9 -0
  32. package/dist/components/chat-search/helpers/nextBestActions.d.ts +7 -0
  33. package/dist/components/chat-search/hooks/index.d.ts +7 -0
  34. package/dist/components/chat-search/hooks/useAccessibleColor.d.ts +1 -0
  35. package/dist/components/chat-search/hooks/useAnswerList.d.ts +217 -0
  36. package/dist/components/chat-search/hooks/useConversationId.d.ts +5 -0
  37. package/dist/components/chat-search/hooks/useConversationLoader.d.ts +17 -0
  38. package/dist/components/chat-search/hooks/useDarkMode.d.ts +1 -0
  39. package/dist/components/chat-search/hooks/useIsChatSearchDirty.d.ts +1 -0
  40. package/dist/components/chat-search/hooks/useScrollManager.d.ts +5 -0
  41. package/dist/components/chat-search/hooks/useSubscriptionManager.d.ts +4 -0
  42. package/dist/components/chat-search/hooks/useUrlManager.d.ts +8 -0
  43. package/dist/components/chat-search/index.d.ts +5 -0
  44. package/dist/components/chat-search/text-config.d.ts +3 -0
  45. package/dist/components/chat-search/theme.d.ts +0 -0
  46. package/dist/components/chat-search/types.d.ts +253 -0
  47. package/dist/{combobox.d.ts → components/combobox/combobox.d.ts} +14 -18
  48. package/dist/components/combobox/index.d.ts +1 -0
  49. package/dist/components/data-table/data-table.d.ts +17 -0
  50. package/dist/components/data-table/index.d.ts +2 -0
  51. package/dist/{date-picker.d.ts → components/date-picker/date-picker.d.ts} +9 -12
  52. package/dist/components/date-picker/index.d.ts +1 -0
  53. package/dist/components/feedback/feedback-reason.d.ts +10 -0
  54. package/dist/{feedback.d.ts → components/feedback/feedback.d.ts} +17 -21
  55. package/dist/components/feedback/index.d.ts +1 -0
  56. package/dist/components/file-upload/file-upload-status.d.ts +17 -0
  57. package/dist/components/file-upload/file-upload.d.ts +4 -0
  58. package/dist/components/file-upload/index.d.ts +4 -0
  59. package/dist/components/file-upload/types.d.ts +18 -0
  60. package/dist/components/file-upload/utils.d.ts +1 -0
  61. package/dist/components/filter/components/CustomValueInput.d.ts +11 -0
  62. package/dist/components/filter/components/MultiSelectDropdown.d.ts +10 -0
  63. package/dist/components/filter/components/SingleSelectDropdown.d.ts +9 -0
  64. package/dist/components/filter/filter.d.ts +6 -0
  65. package/dist/components/filter/filters.d.ts +12 -0
  66. package/dist/components/filter/hooks.d.ts +9 -0
  67. package/dist/components/filter/index.d.ts +3 -0
  68. package/dist/{filter.d.ts → components/filter/types.d.ts} +59 -82
  69. package/dist/components/generating-star/generating-star.d.ts +6 -0
  70. package/dist/components/generating-star/index.d.ts +2 -0
  71. package/dist/components/markdown/CodeBlock.d.ts +7 -0
  72. package/dist/components/markdown/FormattedMessage.d.ts +14 -0
  73. package/dist/components/markdown/Frame.d.ts +10 -0
  74. package/dist/components/markdown/MemoizedReactMarkdown.d.ts +6 -0
  75. package/dist/components/markdown/MermaidDiagram.d.ts +6 -0
  76. package/dist/components/markdown/ZoomableImage.d.ts +7 -0
  77. package/dist/components/markdown/embeds/Loom.d.ts +7 -0
  78. package/dist/components/markdown/embeds/NativeVideo.d.ts +6 -0
  79. package/dist/components/markdown/embeds/Supademo.d.ts +7 -0
  80. package/dist/components/markdown/embeds/Typeform.d.ts +7 -0
  81. package/dist/components/markdown/embeds/Vimeo.d.ts +7 -0
  82. package/dist/components/markdown/embeds/Wistia.d.ts +7 -0
  83. package/dist/components/markdown/embeds/Youtube.d.ts +7 -0
  84. package/dist/components/markdown/embeds/index.d.ts +9 -0
  85. package/dist/components/markdown/index.d.ts +6 -0
  86. package/dist/components/markdown/utils/codeblock.d.ts +6 -0
  87. package/dist/components/markdown/utils/stripNewLines.d.ts +1 -0
  88. package/dist/components/select/index.d.ts +1 -0
  89. package/dist/{select.d.ts → components/select/simpleSelect.d.ts} +15 -20
  90. package/dist/env.d.ts +5 -0
  91. package/dist/esm/chunks/{ChatSearch.BsztdMaK.js → ChatSearch.CxwRDkGx.js} +72 -29
  92. package/dist/esm/chunks/ChatSearch.CxwRDkGx.js.map +1 -0
  93. package/dist/esm/chunks/{FormattedMessage.D94rlhro.js → FormattedMessage.CpTetIzd.js} +146 -14
  94. package/dist/esm/chunks/FormattedMessage.CpTetIzd.js.map +1 -0
  95. package/dist/esm/chunks/{combobox.D30-HM1I.js → combobox.B5aw7PrS.js} +2 -2
  96. package/dist/esm/chunks/{combobox.D30-HM1I.js.map → combobox.B5aw7PrS.js.map} +1 -1
  97. package/dist/esm/chunks/{data-table.CeeSYokg.js → data-table.qS51pU0z.js} +2 -2
  98. package/dist/esm/chunks/{data-table.CeeSYokg.js.map → data-table.qS51pU0z.js.map} +1 -1
  99. package/dist/esm/chunks/{date-picker.WGre3lsB.js → date-picker.DqcdwXZS.js} +2 -2
  100. package/dist/esm/chunks/{date-picker.WGre3lsB.js.map → date-picker.DqcdwXZS.js.map} +1 -1
  101. package/dist/esm/chunks/{filters.Dx9TXuJ4.js → filters.Bd9OruMH.js} +2 -2
  102. package/dist/esm/chunks/{filters.Dx9TXuJ4.js.map → filters.Bd9OruMH.js.map} +1 -1
  103. package/dist/esm/chunks/{generating-star.C6eGHpse.js → generating-star.B0RUXRff.js} +2 -2
  104. package/dist/esm/chunks/{generating-star.C6eGHpse.js.map → generating-star.B0RUXRff.js.map} +1 -1
  105. package/dist/esm/chunks/{simpleSelect.Bzw8xrbM.js → simpleSelect.BfAgKOea.js} +2 -2
  106. package/dist/esm/chunks/{simpleSelect.Bzw8xrbM.js.map → simpleSelect.BfAgKOea.js.map} +1 -1
  107. package/dist/esm/chunks/{utils.DmKr1Ojo.js → utils.DaMF_LVC.js} +2 -3
  108. package/dist/esm/chunks/utils.DaMF_LVC.js.map +1 -0
  109. package/dist/esm/components/chat-search.js +1 -1
  110. package/dist/esm/components/combobox.js +1 -1
  111. package/dist/esm/components/data-table.js +1 -1
  112. package/dist/esm/components/date-picker.js +1 -1
  113. package/dist/esm/components/filter.js +1 -1
  114. package/dist/esm/components/generating-star.js +1 -1
  115. package/dist/esm/components/markdown.js +1 -1
  116. package/dist/esm/components/select.js +1 -1
  117. package/dist/esm/components/ui/accordion.js +1 -1
  118. package/dist/esm/components/ui/accordion.js.map +1 -1
  119. package/dist/esm/components/ui/badge.js +1 -1
  120. package/dist/esm/components/ui/button.js +1 -1
  121. package/dist/esm/components/ui/calendar.js +1 -1
  122. package/dist/esm/components/ui/card.js +1 -1
  123. package/dist/esm/components/ui/command.js +1 -1
  124. package/dist/esm/components/ui/dialog.js +1 -1
  125. package/dist/esm/components/ui/dialog.js.map +1 -1
  126. package/dist/esm/components/ui/dropdown-menu.js +1 -1
  127. package/dist/esm/components/ui/input.js +1 -1
  128. package/dist/esm/components/ui/label.js +1 -1
  129. package/dist/esm/components/ui/popover.js +1 -1
  130. package/dist/esm/components/ui/progress.js +1 -1
  131. package/dist/esm/components/ui/scroll-area.js +1 -1
  132. package/dist/esm/components/ui/select.js +1 -1
  133. package/dist/esm/components/ui/switch.js +1 -1
  134. package/dist/esm/components/ui/table.js +1 -1
  135. package/dist/esm/components/ui/textarea.js +1 -1
  136. package/dist/esm/components/ui/tooltip.js +1 -1
  137. package/dist/esm/index.css +1 -1
  138. package/dist/esm/index.js +8 -8
  139. package/dist/index.d.ts +27 -1062
  140. package/dist/lib/addUtmParams.d.ts +20 -0
  141. package/dist/lib/api.d.ts +96 -0
  142. package/dist/lib/feature-flags.d.ts +9 -0
  143. package/dist/lib/features.d.ts +3 -0
  144. package/dist/lib/fetchClient.d.ts +19 -0
  145. package/dist/lib/getContentType.d.ts +1 -0
  146. package/dist/lib/hooks.d.ts +15 -0
  147. package/dist/lib/utils.d.ts +8 -0
  148. package/dist/stats.html +1 -1
  149. package/package.json +8 -2
  150. package/dist/accordion.d.ts +0 -12
  151. package/dist/badge.d.ts +0 -14
  152. package/dist/button.d.ts +0 -16
  153. package/dist/calendar.d.ts +0 -12
  154. package/dist/card.d.ts +0 -17
  155. package/dist/chat-search.d.ts +0 -413
  156. package/dist/collapsible.d.ts +0 -10
  157. package/dist/command.d.ts +0 -90
  158. package/dist/components/chat-search.d.ts +0 -2
  159. package/dist/components/combobox.d.ts +0 -2
  160. package/dist/components/data-table.d.ts +0 -2
  161. package/dist/components/date-picker.d.ts +0 -2
  162. package/dist/components/feedback.d.ts +0 -2
  163. package/dist/components/filter.d.ts +0 -2
  164. package/dist/components/generating-star.d.ts +0 -6
  165. package/dist/components/markdown.d.ts +0 -2
  166. package/dist/components/select.d.ts +0 -2
  167. package/dist/data-table.d.ts +0 -23
  168. package/dist/dialog.d.ts +0 -30
  169. package/dist/dropdown-menu.d.ts +0 -43
  170. package/dist/esm/chunks/ChatSearch.BsztdMaK.js.map +0 -1
  171. package/dist/esm/chunks/FormattedMessage.D94rlhro.js.map +0 -1
  172. package/dist/esm/chunks/utils.DmKr1Ojo.js.map +0 -1
  173. package/dist/generating-star.d.ts +0 -10
  174. package/dist/icon.d.ts +0 -26
  175. package/dist/input.d.ts +0 -11
  176. package/dist/label.d.ts +0 -8
  177. package/dist/markdown.d.ts +0 -54
  178. package/dist/popover.d.ts +0 -12
  179. package/dist/progress.d.ts +0 -8
  180. package/dist/scroll-area.d.ts +0 -8
  181. package/dist/switch.d.ts +0 -6
  182. package/dist/table.d.ts +0 -19
  183. package/dist/textarea.d.ts +0 -5
  184. package/dist/tooltip.d.ts +0 -18
@@ -0,0 +1,13 @@
1
+ export declare const blue: {
2
+ 50: string;
3
+ 100: string;
4
+ 200: string;
5
+ 300: string;
6
+ 400: string;
7
+ 500: string;
8
+ 600: string;
9
+ 700: string;
10
+ 800: string;
11
+ 900: string;
12
+ DEFAULT: string;
13
+ };
@@ -0,0 +1,4 @@
1
+ export declare function customColor(cssVariable: string, fallbackColor?: string): ({ opacityVariable, opacityValue }: {
2
+ opacityVariable: string;
3
+ opacityValue: string;
4
+ }) => string;
@@ -0,0 +1,13 @@
1
+ export declare const dark: {
2
+ 50: string;
3
+ 100: string;
4
+ 200: string;
5
+ 300: string;
6
+ 400: string;
7
+ 500: string;
8
+ 600: string;
9
+ 700: string;
10
+ 800: string;
11
+ 900: string;
12
+ DEFAULT: string;
13
+ };
@@ -0,0 +1,13 @@
1
+ export declare const green: {
2
+ 50: string;
3
+ 100: string;
4
+ 200: string;
5
+ 300: string;
6
+ 400: string;
7
+ 500: string;
8
+ 600: string;
9
+ 700: string;
10
+ 800: string;
11
+ 900: string;
12
+ DEFAULT: string;
13
+ };
@@ -0,0 +1,128 @@
1
+ import { customColor } from './customColor';
2
+ export declare const BrainfishColors: {
3
+ primary: {
4
+ 50: string;
5
+ 100: string;
6
+ 200: string;
7
+ 300: string;
8
+ 400: string;
9
+ 500: string;
10
+ 600: string;
11
+ 700: string;
12
+ 800: string;
13
+ 900: string;
14
+ DEFAULT: ({ opacityVariable, opacityValue }: {
15
+ opacityVariable: string;
16
+ opacityValue: string;
17
+ }) => string;
18
+ foreground: ({ opacityVariable, opacityValue }: {
19
+ opacityVariable: string;
20
+ opacityValue: string;
21
+ }) => string;
22
+ };
23
+ dark: {
24
+ 50: string;
25
+ 100: string;
26
+ 200: string;
27
+ 300: string;
28
+ 400: string;
29
+ 500: string;
30
+ 600: string;
31
+ 700: string;
32
+ 800: string;
33
+ 900: string;
34
+ DEFAULT: string;
35
+ };
36
+ orange: {
37
+ 50: string;
38
+ 100: string;
39
+ 200: string;
40
+ 300: string;
41
+ 400: string;
42
+ 500: string;
43
+ 600: string;
44
+ 700: string;
45
+ 800: string;
46
+ 900: string;
47
+ DEFAULT: string;
48
+ };
49
+ yellow: {
50
+ 50: string;
51
+ 100: string;
52
+ 200: string;
53
+ 300: string;
54
+ 400: string;
55
+ 500: string;
56
+ 600: string;
57
+ 700: string;
58
+ 800: string;
59
+ 900: string;
60
+ DEFAULT: string;
61
+ };
62
+ green: {
63
+ 50: string;
64
+ 100: string;
65
+ 200: string;
66
+ 300: string;
67
+ 400: string;
68
+ 500: string;
69
+ 600: string;
70
+ 700: string;
71
+ 800: string;
72
+ 900: string;
73
+ DEFAULT: string;
74
+ };
75
+ blue: {
76
+ 50: string;
77
+ 100: string;
78
+ 200: string;
79
+ 300: string;
80
+ 400: string;
81
+ 500: string;
82
+ 600: string;
83
+ 700: string;
84
+ 800: string;
85
+ 900: string;
86
+ DEFAULT: string;
87
+ };
88
+ purple: {
89
+ 50: string;
90
+ 100: string;
91
+ 200: string;
92
+ 300: string;
93
+ 400: string;
94
+ 500: string;
95
+ 600: string;
96
+ 700: string;
97
+ 800: string;
98
+ 900: string;
99
+ DEFAULT: string;
100
+ };
101
+ pink: {
102
+ 50: string;
103
+ 100: string;
104
+ 200: string;
105
+ 300: string;
106
+ 400: string;
107
+ 500: string;
108
+ 600: string;
109
+ 700: string;
110
+ 800: string;
111
+ 900: string;
112
+ DEFAULT: string;
113
+ };
114
+ red: {
115
+ 50: string;
116
+ 100: string;
117
+ 200: string;
118
+ 300: string;
119
+ 400: string;
120
+ 500: string;
121
+ 600: string;
122
+ 700: string;
123
+ 800: string;
124
+ 900: string;
125
+ DEFAULT: string;
126
+ };
127
+ };
128
+ export { customColor };
@@ -0,0 +1,13 @@
1
+ export declare const orange: {
2
+ 50: string;
3
+ 100: string;
4
+ 200: string;
5
+ 300: string;
6
+ 400: string;
7
+ 500: string;
8
+ 600: string;
9
+ 700: string;
10
+ 800: string;
11
+ 900: string;
12
+ DEFAULT: string;
13
+ };
@@ -0,0 +1,13 @@
1
+ export declare const pink: {
2
+ 50: string;
3
+ 100: string;
4
+ 200: string;
5
+ 300: string;
6
+ 400: string;
7
+ 500: string;
8
+ 600: string;
9
+ 700: string;
10
+ 800: string;
11
+ 900: string;
12
+ DEFAULT: string;
13
+ };
@@ -0,0 +1,20 @@
1
+ export declare const primary: {
2
+ 50: string;
3
+ 100: string;
4
+ 200: string;
5
+ 300: string;
6
+ 400: string;
7
+ 500: string;
8
+ 600: string;
9
+ 700: string;
10
+ 800: string;
11
+ 900: string;
12
+ DEFAULT: ({ opacityVariable, opacityValue }: {
13
+ opacityVariable: string;
14
+ opacityValue: string;
15
+ }) => string;
16
+ foreground: ({ opacityVariable, opacityValue }: {
17
+ opacityVariable: string;
18
+ opacityValue: string;
19
+ }) => string;
20
+ };
@@ -0,0 +1,13 @@
1
+ export declare const purple: {
2
+ 50: string;
3
+ 100: string;
4
+ 200: string;
5
+ 300: string;
6
+ 400: string;
7
+ 500: string;
8
+ 600: string;
9
+ 700: string;
10
+ 800: string;
11
+ 900: string;
12
+ DEFAULT: string;
13
+ };
@@ -0,0 +1,13 @@
1
+ export declare const red: {
2
+ 50: string;
3
+ 100: string;
4
+ 200: string;
5
+ 300: string;
6
+ 400: string;
7
+ 500: string;
8
+ 600: string;
9
+ 700: string;
10
+ 800: string;
11
+ 900: string;
12
+ DEFAULT: string;
13
+ };
@@ -0,0 +1,13 @@
1
+ export declare const yellow: {
2
+ 50: string;
3
+ 100: string;
4
+ 200: string;
5
+ 300: string;
6
+ 400: string;
7
+ 500: string;
8
+ 600: string;
9
+ 700: string;
10
+ 800: string;
11
+ 900: string;
12
+ DEFAULT: string;
13
+ };
@@ -0,0 +1,29 @@
1
+ import { default as React } from 'react';
2
+ import { SearchResult, FeedbackResponse, AnswerBlock as AnswerBlockType, AnswerState, RedirectRule, Action, NextBestAction, ActionClick } from './types';
3
+ interface AnswerProps {
4
+ index: number;
5
+ blocks?: AnswerBlockType[];
6
+ state?: AnswerState;
7
+ question: string;
8
+ searchResults?: SearchResult[];
9
+ searchQueryId?: string;
10
+ feedback?: FeedbackResponse;
11
+ onFeedback?: (response: FeedbackResponse) => void;
12
+ disableFeedback?: boolean;
13
+ textConfig?: {
14
+ positiveAnswerText?: string;
15
+ negativeAnswerText?: string;
16
+ loadingSearchText?: string;
17
+ loadingAnswerText?: string;
18
+ uncertaintyFallbackText?: Record<string, string>;
19
+ };
20
+ searchIntentId?: string;
21
+ redirectRules?: RedirectRule[];
22
+ actions?: Action[];
23
+ handleActionClick?: (action: ActionClick) => void;
24
+ nextBestActions?: NextBestAction[];
25
+ isLastAnswer?: boolean;
26
+ onFeedbackReasonSubmit?: (reason: string) => void;
27
+ }
28
+ export declare function Answer({ index, blocks, question, searchResults, state, searchQueryId, feedback, onFeedback, disableFeedback, textConfig, redirectRules, actions, handleActionClick, nextBestActions, isLastAnswer, onFeedbackReasonSubmit, }: AnswerProps): React.JSX.Element;
29
+ export {};
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { Action, NextBestAction, ActionClick } from './types';
3
+ interface AnswerActionsProps {
4
+ actions?: Action[];
5
+ nextBestActions?: NextBestAction[];
6
+ isLastAnswer?: boolean;
7
+ handleActionClick?: (action: ActionClick) => void;
8
+ searchQueryId: string;
9
+ question: string;
10
+ answer: string;
11
+ }
12
+ declare const AnswerActions: React.FC<AnswerActionsProps>;
13
+ export default AnswerActions;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { AnswerBlock, AnswerState, RedirectRule } from './types';
3
+ export interface AnswerBlockProps {
4
+ block: AnswerBlock;
5
+ redirectRules?: RedirectRule[];
6
+ state: AnswerState;
7
+ }
8
+ export declare function AnswerBlock({ block, redirectRules, state }: AnswerBlockProps): React.JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { ChatSearchState, ChatSearchProps } from './types';
3
+ export interface ChatSearchHandle {
4
+ createNewThread: (firstQuery?: string) => void;
5
+ showFollowUpThread: (show: boolean) => void;
6
+ subscribeToStateChanges: (callback: (state: ChatSearchState) => void) => () => void;
7
+ focusSearchField: () => void;
8
+ showCloseButton: (showButton: boolean) => void;
9
+ }
10
+ declare const ChatSearch: React.ForwardRefExoticComponent<ChatSearchProps & React.RefAttributes<ChatSearchHandle>>;
11
+ export default ChatSearch;
@@ -0,0 +1,34 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ import { Answer } from './types';
3
+ import { AnswerListAction } from './hooks/useAnswerList';
4
+ interface ChatSearchContextProps {
5
+ query: string;
6
+ setQuery: React.Dispatch<React.SetStateAction<string>>;
7
+ queryId: string;
8
+ setQueryId: React.Dispatch<React.SetStateAction<string>>;
9
+ followUpQuery: string;
10
+ setFollowUpQuery: React.Dispatch<React.SetStateAction<string>>;
11
+ isSearching: boolean;
12
+ setIsSearching: React.Dispatch<React.SetStateAction<boolean>>;
13
+ showResults: boolean;
14
+ setShowResults: React.Dispatch<React.SetStateAction<boolean>>;
15
+ answers: Answer[];
16
+ answerListDispatch: React.Dispatch<AnswerListAction>;
17
+ activeAnswerIndex: number;
18
+ setActiveAnswerIndex: React.Dispatch<React.SetStateAction<number>>;
19
+ conversationId: string | undefined;
20
+ setConversationId: (id: string) => void;
21
+ clearConversationId: () => void;
22
+ isLoadingConversation: boolean;
23
+ setIsLoadingConversation: React.Dispatch<React.SetStateAction<boolean>>;
24
+ loadError: string;
25
+ setLoadError: React.Dispatch<React.SetStateAction<string>>;
26
+ showMobileCloseWidgetButton: boolean;
27
+ setShowMobileCloseWidgetButton: React.Dispatch<React.SetStateAction<boolean>>;
28
+ }
29
+ export declare const ChatSearchProvider: React.FC<{
30
+ children: ReactNode;
31
+ searchPath?: string;
32
+ }>;
33
+ export declare const useChatSearch: () => ChatSearchContextProps;
34
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface FollowUpQuestionsProps {
3
+ questions: string[];
4
+ onQuestionClick: (question: string) => void;
5
+ }
6
+ export declare function FollowUpQuestions({ questions, onQuestionClick }: FollowUpQuestionsProps): React.JSX.Element | null;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { TextConfig } from './types';
3
+ interface FollowUpSearchBarProps {
4
+ initialQuery?: string;
5
+ onQueryChange: (query: string) => void;
6
+ isSearching: boolean;
7
+ handleFollowUpSearch: (query: string) => void;
8
+ textConfig: TextConfig;
9
+ }
10
+ export declare const FollowUpSearchBar: React.ForwardRefExoticComponent<FollowUpSearchBarProps & React.RefAttributes<HTMLTextAreaElement>>;
11
+ export {};
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ type HeaderProps = React.HTMLAttributes<HTMLDivElement> & {
3
+ headerText: string;
4
+ onToggleSizeButtonClick: () => void;
5
+ onBackButtonClick: () => void;
6
+ onCloseWidgetClick: () => void;
7
+ };
8
+ export declare function Header({ headerText, onToggleSizeButtonClick, onBackButtonClick, onCloseWidgetClick, className, ...props }: HeaderProps): React.JSX.Element;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const LoadingConversation: () => React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface LoadingSkeletonProps {
3
+ loadingText?: string;
4
+ }
5
+ export declare function LoadingSkeleton({ loadingText }: LoadingSkeletonProps): React.JSX.Element;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { NextBestAction } from './types';
3
+ interface NextBestActionsProps {
4
+ nextBestActions: NextBestAction[];
5
+ onActionClick: (action: NextBestAction) => void;
6
+ }
7
+ declare const NextBestActions: React.FC<NextBestActionsProps>;
8
+ export { NextBestActions };
@@ -0,0 +1,29 @@
1
+ import { default as React } from 'react';
2
+ import { Suggestion } from './types';
3
+ export declare const PrimarySearch: React.ForwardRefExoticComponent<{
4
+ query: string;
5
+ onQueryChange: (query: string) => void;
6
+ onSearch: () => void;
7
+ textConfig: {
8
+ searchPlaceholder?: string;
9
+ attachImageText?: string;
10
+ allDocumentsText?: string;
11
+ };
12
+ collections?: {
13
+ id: string;
14
+ name: string;
15
+ }[] | undefined;
16
+ currentCollectionId?: string | undefined;
17
+ onCollectionChange?: ((collectionId: string) => void) | undefined;
18
+ disableImageAttachment?: boolean | undefined;
19
+ attachedImages?: {
20
+ file: File;
21
+ preview: string;
22
+ }[] | undefined;
23
+ onImageUpload?: ((event: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
24
+ onRemoveImage?: ((index: number) => void) | undefined;
25
+ isSearching?: boolean | undefined;
26
+ autocompleteSuggestions?: Suggestion[] | undefined;
27
+ onAutocompleteSuggestionSelect?: ((suggestion: Suggestion) => void) | undefined;
28
+ } & React.RefAttributes<HTMLTextAreaElement>>;
29
+ export default PrimarySearch;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface ScrollToBottomArrowProps {
3
+ onClick: () => void;
4
+ }
5
+ export declare function ScrollToBottomArrow({ onClick }: ScrollToBottomArrowProps): React.JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { Suggestion } from './types';
3
+ interface SuggestionsProps {
4
+ suggestions: Suggestion[];
5
+ onQuestionClick: (suggestion: Suggestion) => void;
6
+ title?: string;
7
+ }
8
+ export declare function Suggestions({ suggestions, onQuestionClick, title }: SuggestionsProps): React.JSX.Element | null;
9
+ export default Suggestions;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ interface TimelineNavigationProps {
3
+ questions: string[];
4
+ activeIndex: number;
5
+ onNavigate: (index: number) => void;
6
+ offset: number;
7
+ }
8
+ export declare function TimelineNavigation({ questions, activeIndex, onNavigate, offset }: TimelineNavigationProps): React.JSX.Element;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ import { ActionButtonsBlock as ActionButtonsBlockType } from '../types';
2
+ export declare function ActionButtonsBlock({ block }: {
3
+ block: ActionButtonsBlockType;
4
+ }): null;
5
+ export default ActionButtonsBlock;
@@ -0,0 +1,20 @@
1
+ import { default as React } from 'react';
2
+ import { ActionInputFormBlock, ActionInputsSchema } from '../types';
3
+ export interface ActionInputFormBlockProps {
4
+ block: ActionInputFormBlock;
5
+ }
6
+ /**
7
+ * Patches the schema for AJV resolver to correctly validate required string fields.
8
+ *
9
+ * This function addresses a limitation in AJV validation:
10
+ * By default, AJV only checks if a field exists but doesn't consider empty strings invalid.
11
+ * For form validation, we need to ensure required string fields are non-empty.
12
+ * This function adds `minLength: 1` to all required string fields that don't already
13
+ * have a minLength constraint, ensuring empty strings fail validation.
14
+ * see https://github.com/react-hook-form/resolvers/blob/master/README.md#ajv
15
+ *
16
+ * @param schema - The original JSON schema to enhance
17
+ * @returns A new schema with minLength constraints added to required string fields
18
+ */
19
+ export declare function patchSchemaForAjvResolver(schema: ActionInputsSchema): ActionInputsSchema;
20
+ export declare function ActionInputFormBlock({ block }: ActionInputFormBlockProps): React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { MarkdownTextBlock, RedirectRule, AnswerState } from '../types';
3
+ export interface MarkdownTextBlockProps {
4
+ block: MarkdownTextBlock;
5
+ redirectRules?: RedirectRule[];
6
+ state: AnswerState;
7
+ }
8
+ export declare function MarkdownTextBlock({ block, redirectRules, state }: MarkdownTextBlockProps): React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { ActionButtonsBlock, ActionInputFormBlock, ActionInputs, ActionInput, AnswerBlock, MarkdownTextBlock, ActionInputsSchema } from '../types';
2
+ export declare const markdownTextBlock: ({ text }?: {
3
+ text?: string | undefined;
4
+ }) => MarkdownTextBlock;
5
+ export declare const actionInputFormBlock: ({ actionId, initialValues, onSubmit, inputs, schema, }: {
6
+ actionId: string;
7
+ initialValues: ActionInputs;
8
+ onSubmit: (inputs: ActionInputs) => void;
9
+ inputs: ActionInput[];
10
+ schema: ActionInputsSchema;
11
+ }) => ActionInputFormBlock;
12
+ export declare const actionButtonsBlock: () => ActionButtonsBlock;
13
+ export declare const isMarkdownTextBlock: (block: AnswerBlock) => block is MarkdownTextBlock;
14
+ export declare const isActionInputFormBlock: (block: AnswerBlock) => block is ActionInputFormBlock;
15
+ export declare const isActionButtonsBlock: (block: AnswerBlock) => block is ActionButtonsBlock;
@@ -0,0 +1,9 @@
1
+ type ClientActionExecutionResult = {
2
+ success: true;
3
+ data: Record<string, any>;
4
+ } | {
5
+ reason: string;
6
+ success: false;
7
+ };
8
+ export declare const executeClientAction: (key: string, inputs: Record<string, any>) => Promise<ClientActionExecutionResult>;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import { NextBestActionType, Action } from '../types';
2
+ export declare const getActionMapping: (action: Action) => {
3
+ type: NextBestActionType;
4
+ icon: string;
5
+ getValue: (action: any) => string;
6
+ getLabel: (action: any) => string;
7
+ };
@@ -0,0 +1,7 @@
1
+ export { useIsChatSearchDirty } from './useIsChatSearchDirty';
2
+ export { useScrollManager } from './useScrollManager';
3
+ export { useUrlManager } from './useUrlManager';
4
+ export { useConversationLoader } from './useConversationLoader';
5
+ export { useSubscriptionManager } from './useSubscriptionManager';
6
+ export { useDarkMode } from './useDarkMode';
7
+ export { useAccessibleColor } from './useAccessibleColor';
@@ -0,0 +1 @@
1
+ export declare const useAccessibleColor: (primaryColorVar: string, primaryForegroundVar: string) => string;