cmcts-c-agent-embedding-react 1.0.24 → 1.0.25-cagent

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 (181) hide show
  1. package/.idea/modules.xml +1 -1
  2. package/.idea/vcs.xml +5 -3
  3. package/dist/BubbleChat.d.ts +1 -4
  4. package/dist/BubbleChat.d.ts.map +1 -1
  5. package/dist/components/Badge.d.ts +10 -0
  6. package/dist/components/Badge.d.ts.map +1 -0
  7. package/dist/components/Bot.d.ts +130 -0
  8. package/dist/components/Bot.d.ts.map +1 -0
  9. package/dist/components/FeedbackContentDialog.d.ts +13 -0
  10. package/dist/components/FeedbackContentDialog.d.ts.map +1 -0
  11. package/dist/components/Toast.d.ts +10 -0
  12. package/dist/components/Toast.d.ts.map +1 -0
  13. package/dist/components/TypingBubble.d.ts +2 -0
  14. package/dist/components/TypingBubble.d.ts.map +1 -0
  15. package/dist/components/avatars/Avatar.d.ts +4 -0
  16. package/dist/components/avatars/Avatar.d.ts.map +1 -0
  17. package/dist/components/avatars/DefaultAvatar.d.ts +2 -0
  18. package/dist/components/avatars/DefaultAvatar.d.ts.map +1 -0
  19. package/dist/components/bubbles/AgentReasoningBubble.d.ts +16 -0
  20. package/dist/components/bubbles/AgentReasoningBubble.d.ts.map +1 -0
  21. package/dist/components/bubbles/BotBubble.d.ts +38 -0
  22. package/dist/components/bubbles/BotBubble.d.ts.map +1 -0
  23. package/dist/components/bubbles/ChartBubble.d.ts +9 -0
  24. package/dist/components/bubbles/ChartBubble.d.ts.map +1 -0
  25. package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts +8 -0
  26. package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts.map +1 -0
  27. package/dist/components/bubbles/ChartPlaceholder.d.ts +16 -0
  28. package/dist/components/bubbles/ChartPlaceholder.d.ts.map +1 -0
  29. package/dist/components/bubbles/ChartPortalContainer.d.ts +12 -0
  30. package/dist/components/bubbles/ChartPortalContainer.d.ts.map +1 -0
  31. package/dist/components/bubbles/FollowUpPromptBubble.d.ts +8 -0
  32. package/dist/components/bubbles/FollowUpPromptBubble.d.ts.map +1 -0
  33. package/dist/components/bubbles/GuestBubble.d.ts +16 -0
  34. package/dist/components/bubbles/GuestBubble.d.ts.map +1 -0
  35. package/dist/components/bubbles/LeadCaptureBubble.d.ts +20 -0
  36. package/dist/components/bubbles/LeadCaptureBubble.d.ts.map +1 -0
  37. package/dist/components/bubbles/LoadingBubble.d.ts +8 -0
  38. package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -0
  39. package/dist/components/bubbles/SourceBubble.d.ts +9 -0
  40. package/dist/components/bubbles/SourceBubble.d.ts.map +1 -0
  41. package/dist/components/bubbles/StableChartWrapper.d.ts +16 -0
  42. package/dist/components/bubbles/StableChartWrapper.d.ts.map +1 -0
  43. package/dist/components/bubbles/StarterPromptBubble.d.ts +8 -0
  44. package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -0
  45. package/dist/components/buttons/AttachmentUploadButton.d.ts +11 -0
  46. package/dist/components/buttons/AttachmentUploadButton.d.ts.map +1 -0
  47. package/dist/components/buttons/CancelButton.d.ts +10 -0
  48. package/dist/components/buttons/CancelButton.d.ts.map +1 -0
  49. package/dist/components/buttons/CopyMessageButton.d.ts +10 -0
  50. package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
  51. package/dist/components/buttons/EditMessageButton.d.ts +8 -0
  52. package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
  53. package/dist/components/buttons/FeedbackButtons.d.ts +14 -0
  54. package/dist/components/buttons/FeedbackButtons.d.ts.map +1 -0
  55. package/dist/components/buttons/ImageUploadButton.d.ts +11 -0
  56. package/dist/components/buttons/ImageUploadButton.d.ts.map +1 -0
  57. package/dist/components/buttons/LeadCaptureButtons.d.ts +11 -0
  58. package/dist/components/buttons/LeadCaptureButtons.d.ts.map +1 -0
  59. package/dist/components/buttons/PopupToast.d.ts +7 -0
  60. package/dist/components/buttons/PopupToast.d.ts.map +1 -0
  61. package/dist/components/buttons/RecordAudioButton.d.ts +11 -0
  62. package/dist/components/buttons/RecordAudioButton.d.ts.map +1 -0
  63. package/dist/components/buttons/SendButton.d.ts +13 -0
  64. package/dist/components/buttons/SendButton.d.ts.map +1 -0
  65. package/dist/components/dialogs/EditMessageDialog.d.ts +9 -0
  66. package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
  67. package/dist/components/icons/AddImageIcon.d.ts +3 -0
  68. package/dist/components/icons/AddImageIcon.d.ts.map +1 -0
  69. package/dist/components/icons/AttachmentIcon.d.ts +3 -0
  70. package/dist/components/icons/AttachmentIcon.d.ts.map +1 -0
  71. package/dist/components/icons/CheckIcon.d.ts +3 -0
  72. package/dist/components/icons/CheckIcon.d.ts.map +1 -0
  73. package/dist/components/icons/CircleDotIcon.d.ts +3 -0
  74. package/dist/components/icons/CircleDotIcon.d.ts.map +1 -0
  75. package/dist/components/icons/ClipboardIcon.d.ts +3 -0
  76. package/dist/components/icons/ClipboardIcon.d.ts.map +1 -0
  77. package/dist/components/icons/CopyIcon.d.ts +5 -0
  78. package/dist/components/icons/CopyIcon.d.ts.map +1 -0
  79. package/dist/components/icons/DeleteIcon.d.ts +3 -0
  80. package/dist/components/icons/DeleteIcon.d.ts.map +1 -0
  81. package/dist/components/icons/EditIcon.d.ts +5 -0
  82. package/dist/components/icons/EditIcon.d.ts.map +1 -0
  83. package/dist/components/icons/FullScreenIcon.d.ts +3 -0
  84. package/dist/components/icons/FullScreenIcon.d.ts.map +1 -0
  85. package/dist/components/icons/RecordIcon.d.ts +3 -0
  86. package/dist/components/icons/RecordIcon.d.ts.map +1 -0
  87. package/dist/components/icons/SendIcon.d.ts +3 -0
  88. package/dist/components/icons/SendIcon.d.ts.map +1 -0
  89. package/dist/components/icons/SparklesIcon.d.ts +3 -0
  90. package/dist/components/icons/SparklesIcon.d.ts.map +1 -0
  91. package/dist/components/icons/ThumbsDownIcon.d.ts +5 -0
  92. package/dist/components/icons/ThumbsDownIcon.d.ts.map +1 -0
  93. package/dist/components/icons/ThumbsUpIcon.d.ts +5 -0
  94. package/dist/components/icons/ThumbsUpIcon.d.ts.map +1 -0
  95. package/dist/components/icons/TickIcon.d.ts +2 -0
  96. package/dist/components/icons/TickIcon.d.ts.map +1 -0
  97. package/dist/components/icons/TrashIcon.d.ts +3 -0
  98. package/dist/components/icons/TrashIcon.d.ts.map +1 -0
  99. package/dist/components/icons/XIcon.d.ts +5 -0
  100. package/dist/components/icons/XIcon.d.ts.map +1 -0
  101. package/dist/components/icons/index.d.ts +18 -0
  102. package/dist/components/icons/index.d.ts.map +1 -0
  103. package/dist/components/image/PreviewImage.d.ts +5 -0
  104. package/dist/components/image/PreviewImage.d.ts.map +1 -0
  105. package/dist/components/index.d.ts +3 -0
  106. package/dist/components/index.d.ts.map +1 -0
  107. package/dist/components/inputs/textInput/components/FilePreview.d.ts +12 -0
  108. package/dist/components/inputs/textInput/components/FilePreview.d.ts.map +1 -0
  109. package/dist/components/inputs/textInput/components/ShortTextInput.d.ts +14 -0
  110. package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -0
  111. package/dist/components/inputs/textInput/components/TextInput.d.ts +48 -0
  112. package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -0
  113. package/dist/components/inputs/textInput/index.d.ts +3 -0
  114. package/dist/components/inputs/textInput/index.d.ts.map +1 -0
  115. package/dist/constants.d.ts +3 -0
  116. package/dist/constants.d.ts.map +1 -0
  117. package/dist/features/bubble/components/Bubble.d.ts +5 -0
  118. package/dist/features/bubble/components/Bubble.d.ts.map +1 -0
  119. package/dist/features/bubble/components/BubbleButton.d.ts +16 -0
  120. package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -0
  121. package/dist/features/bubble/components/Tooltip.d.ts +15 -0
  122. package/dist/features/bubble/components/Tooltip.d.ts.map +1 -0
  123. package/dist/features/bubble/components/index.d.ts +2 -0
  124. package/dist/features/bubble/components/index.d.ts.map +1 -0
  125. package/dist/features/bubble/index.d.ts +2 -0
  126. package/dist/features/bubble/index.d.ts.map +1 -0
  127. package/dist/features/bubble/types.d.ts +108 -0
  128. package/dist/features/bubble/types.d.ts.map +1 -0
  129. package/dist/features/full/components/Full.d.ts +7 -0
  130. package/dist/features/full/components/Full.d.ts.map +1 -0
  131. package/dist/features/full/components/index.d.ts +2 -0
  132. package/dist/features/full/components/index.d.ts.map +1 -0
  133. package/dist/features/full/index.d.ts +2 -0
  134. package/dist/features/full/index.d.ts.map +1 -0
  135. package/dist/features/popup/components/DisclaimerPopup.d.ts +14 -0
  136. package/dist/features/popup/components/DisclaimerPopup.d.ts.map +1 -0
  137. package/dist/features/popup/components/Popup.d.ts +8 -0
  138. package/dist/features/popup/components/Popup.d.ts.map +1 -0
  139. package/dist/features/popup/components/index.d.ts +3 -0
  140. package/dist/features/popup/components/index.d.ts.map +1 -0
  141. package/dist/features/popup/index.d.ts +2 -0
  142. package/dist/features/popup/index.d.ts.map +1 -0
  143. package/dist/features/popup/types.d.ts +8 -0
  144. package/dist/features/popup/types.d.ts.map +1 -0
  145. package/dist/index.js +1 -1
  146. package/dist/queries/sendMessageQuery.d.ts +143 -0
  147. package/dist/queries/sendMessageQuery.d.ts.map +1 -0
  148. package/dist/register.d.ts +2 -0
  149. package/dist/register.d.ts.map +1 -0
  150. package/dist/types/chart.d.ts +70 -0
  151. package/dist/types/chart.d.ts.map +1 -0
  152. package/dist/types.d.ts +1 -0
  153. package/dist/types.d.ts.map +1 -0
  154. package/dist/utils/audioRecording.d.ts +21 -0
  155. package/dist/utils/audioRecording.d.ts.map +1 -0
  156. package/dist/utils/chartInstanceManager.d.ts +43 -0
  157. package/dist/utils/chartInstanceManager.d.ts.map +1 -0
  158. package/dist/utils/chartPortalManager.d.ts +76 -0
  159. package/dist/utils/chartPortalManager.d.ts.map +1 -0
  160. package/dist/utils/chartTagParser.d.ts +39 -0
  161. package/dist/utils/chartTagParser.d.ts.map +1 -0
  162. package/dist/utils/chatInputHistory.d.ts +22 -0
  163. package/dist/utils/chatInputHistory.d.ts.map +1 -0
  164. package/dist/utils/index.d.ts +27 -0
  165. package/dist/utils/index.d.ts.map +1 -0
  166. package/dist/utils/isMobileSignal.d.ts +2 -0
  167. package/dist/utils/isMobileSignal.d.ts.map +1 -0
  168. package/dist/utils/textStreamSmoother.d.ts +40 -0
  169. package/dist/utils/textStreamSmoother.d.ts.map +1 -0
  170. package/dist/utils/transcriptApi.d.ts +8 -0
  171. package/dist/utils/transcriptApi.d.ts.map +1 -0
  172. package/dist/utils/ultimateJsonParser.d.ts +2 -0
  173. package/dist/utils/ultimateJsonParser.d.ts.map +1 -0
  174. package/dist/web.d.ts +31 -0
  175. package/dist/web.d.ts.map +1 -0
  176. package/dist/web.js +1 -0
  177. package/dist/window.d.ts +34 -0
  178. package/dist/window.d.ts.map +1 -0
  179. package/package.json +48 -43
  180. package/.idea/workspace.xml +0 -4
  181. /package/.idea/{Flowise-share-chatbox-main.iml → flowise-chatbox.iml} +0 -0
@@ -0,0 +1,143 @@
1
+ import { FileUpload, IAction } from '@/components/Bot';
2
+ export type IncomingInput = {
3
+ question: string;
4
+ uploads?: FileUpload[];
5
+ overrideConfig?: Record<string, unknown>;
6
+ socketIOClientId?: string;
7
+ chatId?: string;
8
+ fileName?: string;
9
+ leadEmail?: string;
10
+ action?: IAction;
11
+ stored?: Record<string, any>;
12
+ fetch?: boolean;
13
+ faqId?: string;
14
+ useId?: string;
15
+ };
16
+ type BaseRequest = {
17
+ apiHost?: string;
18
+ onRequest?: (request: RequestInit) => Promise<void>;
19
+ };
20
+ export type MessageRequest = BaseRequest & {
21
+ chatflowid?: string;
22
+ body?: IncomingInput;
23
+ };
24
+ export type FeedbackRatingType = 'THUMBS_UP' | 'THUMBS_DOWN';
25
+ export type FeedbackInput = {
26
+ chatId: string;
27
+ messageId: string;
28
+ rating: any;
29
+ content?: string;
30
+ };
31
+ export type CreateFeedbackRequest = BaseRequest & {
32
+ chatflowid?: string;
33
+ body?: FeedbackInput;
34
+ };
35
+ export type UpdateFeedbackRequest = BaseRequest & {
36
+ id: string;
37
+ body?: Partial<FeedbackInput>;
38
+ };
39
+ export type UpsertRequest = BaseRequest & {
40
+ chatflowid: string;
41
+ apiHost?: string;
42
+ formData: FormData;
43
+ };
44
+ export type LeadCaptureInput = {
45
+ chatflowid: string;
46
+ chatId: string;
47
+ name?: string;
48
+ email?: string;
49
+ phone?: string;
50
+ };
51
+ export type GetFeedbackByMessageIdRequest = BaseRequest & {
52
+ messageId: string;
53
+ };
54
+ export type LeadCaptureRequest = BaseRequest & {
55
+ body: Partial<LeadCaptureInput>;
56
+ };
57
+ export declare const getUserFromLocalStorage: () => any | null;
58
+ export declare const sendFeedbackQuery: ({ chatflowid, apiHost, body, onRequest }: CreateFeedbackRequest) => Promise<{
59
+ data?: unknown;
60
+ error?: Error | undefined;
61
+ }>;
62
+ export declare const getFeedbackByMessageId: ({ messageId, apiHost, onRequest }: GetFeedbackByMessageIdRequest) => Promise<{
63
+ data?: unknown;
64
+ error?: Error | undefined;
65
+ }>;
66
+ export declare const updateFeedbackQuery: ({ id, apiHost, body, onRequest }: UpdateFeedbackRequest) => Promise<{
67
+ data?: unknown;
68
+ error?: Error | undefined;
69
+ }>;
70
+ export declare const sendMessageQuery: ({ chatflowid, apiHost, body, onRequest }: MessageRequest) => Promise<{
71
+ data?: any;
72
+ error?: Error | undefined;
73
+ }>;
74
+ export declare const createAttachmentWithFormData: ({ chatflowid, apiHost, formData, onRequest }: UpsertRequest) => Promise<{
75
+ data?: unknown;
76
+ error?: Error | undefined;
77
+ }>;
78
+ export declare const upsertVectorStoreWithFormData: ({ chatflowid, apiHost, formData, onRequest }: UpsertRequest) => Promise<{
79
+ data?: unknown;
80
+ error?: Error | undefined;
81
+ }>;
82
+ export declare const getChatbotConfig: ({ chatflowid, apiHost, onRequest }: MessageRequest) => Promise<{
83
+ data?: any;
84
+ error?: Error | undefined;
85
+ }>;
86
+ export declare const getMessageById: ({ chatflowid, apiHost, messageId }: BaseRequest & {
87
+ chatflowid?: string | undefined;
88
+ body?: IncomingInput | undefined;
89
+ } & {
90
+ messageId: string;
91
+ }) => Promise<import("axios").AxiosResponse<any, any>>;
92
+ export declare const updateMessage: ({ apiHost, body, onRequest }: MessageRequest) => Promise<{
93
+ data?: any;
94
+ error?: Error | undefined;
95
+ }>;
96
+ export declare const isStreamAvailableQuery: ({ chatflowid, apiHost, onRequest }: MessageRequest) => Promise<{
97
+ data?: any;
98
+ error?: Error | undefined;
99
+ }>;
100
+ export declare const sendFileDownloadQuery: ({ apiHost, body, onRequest }: MessageRequest) => Promise<{
101
+ data?: any;
102
+ error?: Error | undefined;
103
+ }>;
104
+ export declare const popDataFromCache: ({ apiHost, key, onRequest, }: {
105
+ apiHost?: string | undefined;
106
+ key: string;
107
+ onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
108
+ }) => Promise<{
109
+ data?: any;
110
+ error?: Error | undefined;
111
+ }>;
112
+ export declare const addLeadQuery: ({ apiHost, body, onRequest }: LeadCaptureRequest) => Promise<{
113
+ data?: any;
114
+ error?: Error | undefined;
115
+ }>;
116
+ export declare const searchFaqsQuery: ({ chatflowid, apiHost, query, onRequest, }: {
117
+ chatflowid?: string | undefined;
118
+ apiHost?: string | undefined;
119
+ query: string;
120
+ onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
121
+ }) => Promise<{
122
+ data?: any;
123
+ error?: Error | undefined;
124
+ }>;
125
+ export declare const vectorSearchFaqsQuery: ({ chatflowid, apiHost, query, onRequest, }: {
126
+ chatflowid: string;
127
+ apiHost?: string | undefined;
128
+ query: string;
129
+ onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
130
+ }) => Promise<{
131
+ data?: any;
132
+ error?: Error | undefined;
133
+ }>;
134
+ export declare const getFileContent: ({ apiHost, path, onRequest, }: {
135
+ apiHost?: string | undefined;
136
+ path: string;
137
+ onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
138
+ }) => Promise<{
139
+ data?: any;
140
+ error?: Error | undefined;
141
+ }>;
142
+ export {};
143
+ //# sourceMappingURL=sendMessageQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendMessageQuery.d.ts","sourceRoot":"","sources":["../../src/queries/sendMessageQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIvD,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,aAAa,CAAC;AAE7D,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,WAAW,GAAG;IACxD,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG;IAC7C,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAAO,GAAG,GAAG,IAYhD,CAAC;AAEF,eAAO,MAAM,iBAAiB,6CAAwE,qBAAqB;;;EASvH,CAAC;AAEL,eAAO,MAAM,sBAAsB,sCAAiE,6BAA6B;;;EAQ7H,CAAC;AAEL,eAAO,MAAM,mBAAmB,qCAAgE,qBAAqB;;;EASjH,CAAC;AAEL,eAAO,MAAM,gBAAgB,6CAAwE,cAAc;;;EAUlH,CAAC;AAEF,eAAO,MAAM,4BAA4B,iDAA4E,aAAa;;;EAU9H,CAAC;AAEL,eAAO,MAAM,6BAA6B,iDAA4E,aAAa;;;EAU/H,CAAC;AAEL,eAAO,MAAM,gBAAgB,uCAAkE,cAAc;;;EAQzG,CAAC;AAEL,eAAO,MAAM,cAAc;;;;eAAgG,MAAM;sDAShI,CAAC;AAEF,eAAO,MAAM,aAAa,iCAA4D,cAAc;;;EAUnG,CAAC;AAEF,eAAO,MAAM,sBAAsB,uCAAkE,cAAc;;;EAQ/G,CAAC;AAEL,eAAO,MAAM,qBAAqB,iCAA4D,cAAc;;;EAUxG,CAAC;AAEL,eAAO,MAAM,gBAAgB;;SAMtB,MAAM;2BACW,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAMjD,CAAC;AAEL,eAAO,MAAM,YAAY,iCAA4D,kBAAkB;;;EASnG,CAAC;AAEL,eAAO,MAAM,eAAe;;;WAQnB,MAAM;2BACS,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAUpD,CAAC;AAEF,eAAO,MAAM,qBAAqB;gBAMpB,MAAM;;WAEX,MAAM;2BACS,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAUpD,CAAC;AAEF,eAAO,MAAM,cAAc;;UAMnB,MAAM;2BACU,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAUpD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const registerWebComponents: () => void;
2
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../src/register.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,YAKjC,CAAC"}
@@ -0,0 +1,70 @@
1
+ import type { ChartData, ChartOptions, ChartType } from 'chart.js';
2
+ /**
3
+ * Supported chart types for the XML tag parser
4
+ */
5
+ export type SupportedChartType = 'line' | 'bar' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter';
6
+ /**
7
+ * Chart configuration parsed from XML tag
8
+ */
9
+ export interface ChartConfig {
10
+ id: string;
11
+ type: SupportedChartType;
12
+ title?: string;
13
+ data: ChartData<ChartType>;
14
+ options?: ChartOptions<ChartType>;
15
+ }
16
+ /**
17
+ * Result from processing a token through the chart parser
18
+ */
19
+ export interface ChartParseResult {
20
+ /** Regular text content to render (non-chart content) */
21
+ textContent: string;
22
+ /** IDs of chart placeholders that were added */
23
+ chartPlaceholders: string[];
24
+ /** Fully parsed chart configurations ready to render */
25
+ completedCharts: ChartConfig[];
26
+ }
27
+ /**
28
+ * Parser state machine states
29
+ */
30
+ export declare enum ChartParserState {
31
+ /** Normal text parsing mode */
32
+ IDLE = "IDLE",
33
+ /** Detected potential opening tag, buffering */
34
+ OPENING_TAG = "OPENING_TAG",
35
+ /** Inside chart tag, buffering JSON content */
36
+ INSIDE_TAG = "INSIDE_TAG",
37
+ /** Detected potential closing tag */
38
+ CLOSING_TAG = "CLOSING_TAG"
39
+ }
40
+ /**
41
+ * Chart tag attributes extracted from opening tag
42
+ */
43
+ export interface ChartTagAttributes {
44
+ type: SupportedChartType;
45
+ title?: string;
46
+ }
47
+ /**
48
+ * Partial chart config for pending charts (streaming)
49
+ */
50
+ export interface PendingChart {
51
+ id: string;
52
+ attributes?: ChartTagAttributes;
53
+ buffer?: string;
54
+ }
55
+ /**
56
+ * Props for ChartBubble component
57
+ */
58
+ export interface ChartBubbleProps {
59
+ config: ChartConfig;
60
+ backgroundColor?: string;
61
+ textColor?: string;
62
+ }
63
+ /**
64
+ * Props for ChartLoadingPlaceholder component
65
+ */
66
+ export interface ChartLoadingPlaceholderProps {
67
+ chartId: string;
68
+ backgroundColor?: string;
69
+ }
70
+ //# sourceMappingURL=chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/types/chart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEpH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,kBAAkB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,wDAAwD;IACxD,eAAe,EAAE,WAAW,EAAE,CAAC;CAChC;AAED;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,+BAA+B;IAC/B,IAAI,SAAS;IACb,gDAAgD;IAChD,WAAW,gBAAgB;IAC3B,+CAA+C;IAC/C,UAAU,eAAe;IACzB,qCAAqC;IACrC,WAAW,gBAAgB;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,kBAAkB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,WAAW,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ export declare function getElaspedTime(): string;
2
+ /** Starts the audio recording*/
3
+ export declare function startAudioRecording(onRecordingStart: (value: boolean) => void, onUnsupportedBrowser: (value: boolean) => void, setElapsedTime: (value: string) => void): void;
4
+ /** Stop the currently started audio recording & sends it
5
+ */
6
+ export declare function stopAudioRecording(addRecordingToPreviews: null | ((blob: Blob) => void)): void;
7
+ /** Cancel the currently started audio recording */
8
+ export declare function cancelAudioRecording(): void;
9
+ type AudioRecorder = {
10
+ audioBlobs: Blob[];
11
+ mediaRecorder: MediaRecorder | null;
12
+ streamBeingCaptured: MediaStream | null;
13
+ start: () => Promise<void>;
14
+ stop: () => Promise<unknown>;
15
+ cancel: () => void;
16
+ stopStream: () => void;
17
+ resetRecordingProperties: () => void;
18
+ };
19
+ export declare const audioRecorder: AudioRecorder;
20
+ export {};
21
+ //# sourceMappingURL=audioRecording.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audioRecording.d.ts","sourceRoot":"","sources":["../../src/utils/audioRecording.ts"],"names":[],"mappings":"AAmBA,wBAAgB,cAAc,WAE7B;AAED,gCAAgC;AAChC,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EAC1C,oBAAoB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EAC9C,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,QAkExC;AACD;GACG;AACH,wBAAgB,kBAAkB,CAAC,sBAAsB,EAAE,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC,QAuBvF;AAED,mDAAmD;AACnD,wBAAgB,oBAAoB,SAMnC;AA8FD,KAAK,aAAa,GAAG;IACnB,UAAU,EAAE,IAAI,EAAE,CAAC;IACnB,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,mBAAmB,EAAE,WAAW,GAAG,IAAI,CAAC;IACxC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,wBAAwB,EAAE,MAAM,IAAI,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,aA6G3B,CAAC"}
@@ -0,0 +1,43 @@
1
+ import type { Chart } from 'chart.js';
2
+ /**
3
+ * Singleton manager for Chart.js instances.
4
+ * Tracks all created chart instances and handles proper cleanup to prevent memory leaks.
5
+ */
6
+ declare class ChartInstanceManager {
7
+ private instances;
8
+ /**
9
+ * Register a new Chart.js instance
10
+ */
11
+ register(id: string, chart: Chart): void;
12
+ /**
13
+ * Get a Chart.js instance by ID
14
+ */
15
+ get(id: string): Chart | undefined;
16
+ /**
17
+ * Check if an instance exists
18
+ */
19
+ has(id: string): boolean;
20
+ /**
21
+ * Destroy a Chart.js instance by ID
22
+ */
23
+ destroy(id: string): void;
24
+ /**
25
+ * Destroy multiple Chart.js instances by their IDs
26
+ */
27
+ destroyMany(ids: string[]): void;
28
+ /**
29
+ * Destroy all registered Chart.js instances
30
+ */
31
+ destroyAll(): void;
32
+ /**
33
+ * Get count of registered instances
34
+ */
35
+ get count(): number;
36
+ /**
37
+ * Get all registered instance IDs
38
+ */
39
+ getIds(): string[];
40
+ }
41
+ export declare const chartManager: ChartInstanceManager;
42
+ export {};
43
+ //# sourceMappingURL=chartInstanceManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartInstanceManager.d.ts","sourceRoot":"","sources":["../../src/utils/chartInstanceManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;;GAGG;AACH,cAAM,oBAAoB;IACxB,OAAO,CAAC,SAAS,CAAiC;IAElD;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAQxC;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS;IAIlC;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIxB;;OAEG;IACH,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAYzB;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI;IAIhC;;OAEG;IACH,UAAU,IAAI,IAAI;IAWlB;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IAED;;OAEG;IACH,MAAM,IAAI,MAAM,EAAE;CAGnB;AAGD,eAAO,MAAM,YAAY,sBAA6B,CAAC"}
@@ -0,0 +1,76 @@
1
+ import type { ChartConfig } from '@/types/chart';
2
+ /**
3
+ * Position and visibility information for a chart placeholder
4
+ */
5
+ export interface ChartPlaceholderInfo {
6
+ chartId: string;
7
+ rect: DOMRect | null;
8
+ isVisible: boolean;
9
+ config: ChartConfig | null;
10
+ isLoading: boolean;
11
+ }
12
+ /**
13
+ * Singleton manager for portal-based chart rendering.
14
+ * Coordinates between inline placeholders and portal-rendered charts.
15
+ * Uses SolidJS signals to manage state outside the streaming reactive flow.
16
+ */
17
+ declare class ChartPortalManager {
18
+ private placeholderInfoMap;
19
+ private chartRegistrySignal;
20
+ private renderedChartIds;
21
+ private updateScheduled;
22
+ private lastUpdateTime;
23
+ constructor();
24
+ /**
25
+ * Get the signal accessor for chart registry
26
+ */
27
+ getChartRegistry(): import("solid-js").Accessor<Map<string, ChartPlaceholderInfo>>;
28
+ /**
29
+ * Register a chart placeholder
30
+ */
31
+ registerPlaceholder(chartId: string, isLoading?: boolean): void;
32
+ /**
33
+ * Update placeholder position and visibility
34
+ * Uses throttling to prevent excessive signal updates during scroll
35
+ */
36
+ updatePlaceholderPosition(chartId: string, rect: DOMRect | null, isVisible: boolean): void;
37
+ /**
38
+ * Schedule a throttled signal update
39
+ */
40
+ private scheduleUpdate;
41
+ /**
42
+ * Perform the actual signal update
43
+ */
44
+ private performUpdate;
45
+ /**
46
+ * Set chart config when data is complete
47
+ */
48
+ setChartConfig(chartId: string, config: ChartConfig): void;
49
+ /**
50
+ * Check if a chart has already been rendered
51
+ */
52
+ isChartRendered(chartId: string): boolean;
53
+ /**
54
+ * Mark a chart as rendered
55
+ */
56
+ markChartRendered(chartId: string): void;
57
+ /**
58
+ * Unregister a chart placeholder
59
+ */
60
+ unregisterPlaceholder(chartId: string): void;
61
+ /**
62
+ * Get placeholder info
63
+ */
64
+ getPlaceholderInfo(chartId: string): ChartPlaceholderInfo | undefined;
65
+ /**
66
+ * Clear all placeholders
67
+ */
68
+ clearAll(): void;
69
+ /**
70
+ * Notify signal subscribers of update
71
+ */
72
+ private notifyUpdate;
73
+ }
74
+ export declare const chartPortalManager: ChartPortalManager;
75
+ export {};
76
+ //# sourceMappingURL=chartPortalManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartPortalManager.d.ts","sourceRoot":"","sources":["../../src/utils/chartPortalManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;CACpB;AAKD;;;;GAIG;AACH,cAAM,kBAAkB;IAEtB,OAAO,CAAC,kBAAkB,CAA2C;IAGrE,OAAO,CAAC,mBAAmB,CAAsE;IAGjG,OAAO,CAAC,gBAAgB,CAAqB;IAG7C,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,cAAc,CAAK;;IAS3B;;OAEG;IACH,gBAAgB;IAIhB;;OAEG;IACH,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,UAAO,GAAG,IAAI;IAe5D;;;OAGG;IACH,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI;IAqB1F;;OAEG;IACH,OAAO,CAAC,cAAc;IAoBtB;;OAEG;IACH,OAAO,CAAC,aAAa;IAMrB;;OAEG;IACH,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI;IAoB1D;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAIzC;;OAEG;IACH,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIxC;;OAEG;IACH,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAM5C;;OAEG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS;IAIrE;;OAEG;IACH,QAAQ,IAAI,IAAI;IAMhB;;OAEG;IACH,OAAO,CAAC,YAAY;CAIrB;AAGD,eAAO,MAAM,kBAAkB,oBAA2B,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { ChartParseResult } from '@/types/chart';
2
+ /**
3
+ * State machine parser for extracting chart XML tags from streaming tokens.
4
+ * Handles partial tags split across multiple tokens.
5
+ */
6
+ export declare class ChartTagParser {
7
+ private state;
8
+ private buffer;
9
+ private pendingChart;
10
+ private textOutput;
11
+ private chartPlaceholders;
12
+ private completedCharts;
13
+ /**
14
+ * Process a single token from the SSE stream
15
+ */
16
+ processToken(token: string): ChartParseResult;
17
+ /**
18
+ * Process a single character through the state machine
19
+ */
20
+ private processChar;
21
+ private handleIdleState;
22
+ private handleOpeningTagState;
23
+ private handleInsideTagState;
24
+ private handleClosingTagState;
25
+ private parseOpeningTag;
26
+ private finalizeChart;
27
+ private parseChartJson;
28
+ private getDefaultOptions;
29
+ /**
30
+ * Flush any remaining buffered content when stream ends.
31
+ * Incomplete chart tags are treated as plain text.
32
+ */
33
+ flush(): ChartParseResult;
34
+ /**
35
+ * Reset parser state for a new message
36
+ */
37
+ reset(): void;
38
+ }
39
+ //# sourceMappingURL=chartTagParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartTagParser.d.ts","sourceRoot":"","sources":["../../src/utils/chartTagParser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,gBAAgB,EAAwD,MAAM,eAAe,CAAC;AAOzH;;;GAGG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,KAAK,CAA2C;IACxD,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,UAAU,CAAM;IACxB,OAAO,CAAC,iBAAiB,CAAgB;IACzC,OAAO,CAAC,eAAe,CAAqB;IAE5C;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB;IAiB7C;;OAEG;IACH,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,qBAAqB;IAwC7B,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,qBAAqB;IA2B7B,OAAO,CAAC,eAAe;IAgBvB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,cAAc;IAuCtB,OAAO,CAAC,iBAAiB;IAyBzB;;;OAGG;IACH,KAAK,IAAI,gBAAgB;IAsBzB;;OAEG;IACH,KAAK,IAAI,IAAI;CAQd"}
@@ -0,0 +1,22 @@
1
+ type ChatHistoryStorage = {
2
+ getItem(key: string): string | null;
3
+ setItem(key: string, value: string): void;
4
+ };
5
+ export declare class ChatInputHistory {
6
+ private getMaxHistory;
7
+ private storage;
8
+ private history;
9
+ private currentIndex;
10
+ private tempInput;
11
+ private maxHistory;
12
+ constructor(getMaxHistory?: () => number, storage?: ChatHistoryStorage);
13
+ getHistory(): string[];
14
+ getCurrentIndex(): number;
15
+ addToHistory(input: string): void;
16
+ getPreviousInput(currentInput: string): string;
17
+ getNextInput(): string;
18
+ private saveHistory;
19
+ private loadHistory;
20
+ }
21
+ export {};
22
+ //# sourceMappingURL=chatInputHistory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatInputHistory.d.ts","sourceRoot":"","sources":["../../src/utils/chatInputHistory.ts"],"names":[],"mappings":"AACA,KAAK,kBAAkB,GAAG;IACxB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACpC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C,CAAC;AAEF,qBAAa,gBAAgB;IAOzB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,OAAO;IAPjB,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,UAAU,CAAS;gBAGjB,aAAa,GAAE,MAAM,MAAiB,EACtC,OAAO,GAAE,kBAAiC;IAMpD,UAAU,IAAI,MAAM,EAAE;IAItB,eAAe,IAAI,MAAM;IAIzB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAejC,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;IAY9C,YAAY,IAAI,MAAM;IAWtB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,WAAW;CAWpB"}
@@ -0,0 +1,27 @@
1
+ export declare const isNotDefined: <T>(value: T | null | undefined) => value is null | undefined;
2
+ export declare const isDefined: <T>(value: T | null | undefined) => value is NonNullable<T>;
3
+ export declare const isEmpty: (value: string | undefined | null) => value is undefined;
4
+ export declare const isNotEmpty: (value: string | undefined | null) => value is string;
5
+ /**
6
+ * Clears authentication data from localStorage
7
+ * Used when 401 errors are detected or user logs out
8
+ */
9
+ export declare const sendRequest: <ResponseData>(params: string | {
10
+ url: string;
11
+ method: string;
12
+ body?: Record<string, unknown> | FormData | undefined;
13
+ type?: string | undefined;
14
+ headers?: Record<string, any> | undefined;
15
+ formData?: FormData | undefined;
16
+ onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
17
+ }) => Promise<{
18
+ data?: ResponseData | undefined;
19
+ error?: Error | undefined;
20
+ }>;
21
+ export declare const setLocalStorageChatflow: (chatflowid: string, chatId: string, saveObj?: Record<string, any>) => void;
22
+ export declare const getLocalStorageChatflow: (chatflowid: string) => any;
23
+ export declare const removeLocalStorageChatHistory: (chatflowid: string) => void;
24
+ export declare const getBubbleButtonSize: (size: 'small' | 'medium' | 'large' | number | undefined) => number;
25
+ export declare const setCookie: (cname: string, cvalue: string, exdays: number) => void;
26
+ export declare const getCookie: (cname: string) => string;
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,+DAAuG,CAAC;AAEjI,eAAO,MAAM,SAAS,6DAAqG,CAAC;AAE5H,eAAO,MAAM,OAAO,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,uBAA8E,CAAC;AAEvI,eAAO,MAAM,UAAU,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,oBAA2E,CAAC;AAEvI;;;GAGG;AACH,eAAO,MAAM,WAAW;SAGX,MAAM;YACH,MAAM;;;;;2BAKQ,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAuD1D,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,UAAU,MAAM,YAAW,OAAO,MAAM,EAAE,GAAG,CAAC,SAiBvG,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,QAQzD,CAAC;AAEF,eAAO,MAAM,6BAA6B,eAAgB,MAAM,SAyB/D,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,WAO1F,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,UAAU,MAAM,UAAU,MAAM,SAKtE,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,KAAG,MAczC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const isMobile: import("solid-js").Accessor<boolean | undefined>, setIsMobile: import("solid-js").Setter<boolean | undefined>;
2
+ //# sourceMappingURL=isMobileSignal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMobileSignal.d.ts","sourceRoot":"","sources":["../../src/utils/isMobileSignal.ts"],"names":[],"mappings":"AAEA,eAAO,MAAO,QAAQ,oDAAE,WAAW,gDAA2B,CAAC"}
@@ -0,0 +1,40 @@
1
+ export interface TextStreamSmootherConfig {
2
+ charsPerSecond?: number;
3
+ minUpdateInterval?: number;
4
+ maxBufferSize?: number;
5
+ enableAdaptiveSpeed?: boolean;
6
+ adaptiveSpeedThreshold?: number;
7
+ maxSpeedMultiplier?: number;
8
+ onTextUpdate: (text: string) => void;
9
+ onStreamComplete?: () => void;
10
+ }
11
+ export declare class TextStreamSmoother {
12
+ private buffer;
13
+ private displayedText;
14
+ private isStreaming;
15
+ private animationFrameId;
16
+ private lastUpdateTime;
17
+ private config;
18
+ private streamEnded;
19
+ private currentSpeedMultiplier;
20
+ constructor(config: TextStreamSmootherConfig);
21
+ addText(text: string): void;
22
+ endStream(): void;
23
+ reset(): void;
24
+ private startStreaming;
25
+ private stopStreaming;
26
+ private streamLoop;
27
+ private calculateAdaptiveSpeedMultiplier;
28
+ private updateSpeedMultiplier;
29
+ private calculateCharsToRelease;
30
+ private releaseChars;
31
+ private flushBuffer;
32
+ getState(): {
33
+ bufferLength: number;
34
+ displayedLength: number;
35
+ isStreaming: boolean;
36
+ currentSpeedMultiplier: number;
37
+ effectiveCharsPerSecond: number;
38
+ };
39
+ }
40
+ //# sourceMappingURL=textStreamSmoother.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textStreamSmoother.d.ts","sourceRoot":"","sources":["../../src/utils/textStreamSmoother.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,wBAAwB;IAEvC,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,aAAa,CAAc;IACnC,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,cAAc,CAAa;IACnC,OAAO,CAAC,MAAM,CAAoH;IAClI,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,sBAAsB,CAAe;gBAEjC,MAAM,EAAE,wBAAwB;IAerC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAmB3B,SAAS,IAAI,IAAI;IAcjB,KAAK,IAAI,IAAI;IAWpB,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,UAAU,CAsBhB;IAUF,OAAO,CAAC,gCAAgC;IA4BxC,OAAO,CAAC,qBAAqB;IAqB7B,OAAO,CAAC,uBAAuB;IAkB/B,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,WAAW;IAYZ,QAAQ,IAAI;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,OAAO,CAAC;QACrB,sBAAsB,EAAE,MAAM,CAAC;QAC/B,uBAAuB,EAAE,MAAM,CAAC;KACjC;CASF"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Upload audio blob to server and get transcription
3
+ * @param blob - Audio blob to transcribe
4
+ * @param transcriptApiEndpoint - API endpoint for transcription service
5
+ * @returns Promise<string> - Transcribed text
6
+ */
7
+ export declare const uploadAndTranscriptAudio: (blob: Blob, transcriptApiEndpoint?: string) => Promise<string>;
8
+ //# sourceMappingURL=transcriptApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transcriptApi.d.ts","sourceRoot":"","sources":["../../src/utils/transcriptApi.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,SAAgB,IAAI,0BAA0B,MAAM,KAAG,QAAQ,MAAM,CAoCzG,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function parseJsonMarkdown(jsonString: string): any;
2
+ //# sourceMappingURL=ultimateJsonParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ultimateJsonParser.d.ts","sourceRoot":"","sources":["../../src/utils/ultimateJsonParser.ts"],"names":[],"mappings":"AAsBA,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAkDzD"}
package/dist/web.d.ts ADDED
@@ -0,0 +1,31 @@
1
+ declare const chatbot: {
2
+ initFull: (props: {
3
+ chatflowid: string;
4
+ apiHost?: string | undefined;
5
+ onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
6
+ chatflowConfig?: Record<string, unknown> | undefined;
7
+ observersConfig?: import("./components/Bot").observersConfigType | undefined;
8
+ theme?: import("./features/bubble/types").BubbleTheme | undefined;
9
+ chatwootUrl?: string | undefined;
10
+ roomIds?: Record<string, string> | undefined;
11
+ isUseFAQ?: boolean | undefined;
12
+ onResetChat?: (() => Promise<void>) | undefined;
13
+ } & {
14
+ id?: string | undefined;
15
+ }) => void;
16
+ init: (props: {
17
+ chatflowid: string;
18
+ apiHost?: string | undefined;
19
+ onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
20
+ chatflowConfig?: Record<string, unknown> | undefined;
21
+ observersConfig?: import("./components/Bot").observersConfigType | undefined;
22
+ theme?: import("./features/bubble/types").BubbleTheme | undefined;
23
+ chatwootUrl?: string | undefined;
24
+ roomIds?: Record<string, string> | undefined;
25
+ isUseFAQ?: boolean | undefined;
26
+ onResetChat?: (() => Promise<void>) | undefined;
27
+ }) => void;
28
+ destroy: () => void;
29
+ };
30
+ export default chatbot;
31
+ //# sourceMappingURL=web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../src/web.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiB,CAAC;AAI/B,eAAe,OAAO,CAAC"}