@makebot.it/js 1.0.1 → 1.0.2

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 (277) hide show
  1. package/dist/components/Bot.d.ts +31 -0
  2. package/dist/components/Bot.d.ts.map +1 -0
  3. package/dist/components/Button.d.ts +13 -0
  4. package/dist/components/Button.d.ts.map +1 -0
  5. package/dist/components/ConversationContainer/AvatarSideContainer.d.ts +9 -0
  6. package/dist/components/ConversationContainer/AvatarSideContainer.d.ts.map +1 -0
  7. package/dist/components/ConversationContainer/ChatChunk.d.ts +23 -0
  8. package/dist/components/ConversationContainer/ChatChunk.d.ts.map +1 -0
  9. package/dist/components/ConversationContainer/ChatContainer.d.ts +20 -0
  10. package/dist/components/ConversationContainer/ChatContainer.d.ts.map +1 -0
  11. package/dist/components/ConversationContainer/LoadingChunk.d.ts +7 -0
  12. package/dist/components/ConversationContainer/LoadingChunk.d.ts.map +1 -0
  13. package/dist/components/ErrorMessage.d.ts +6 -0
  14. package/dist/components/ErrorMessage.d.ts.map +1 -0
  15. package/dist/components/FixedInputFooter.d.ts +11 -0
  16. package/dist/components/FixedInputFooter.d.ts.map +1 -0
  17. package/dist/components/InputChatBlock.d.ts +16 -0
  18. package/dist/components/InputChatBlock.d.ts.map +1 -0
  19. package/dist/components/LiteBadge.d.ts +6 -0
  20. package/dist/components/LiteBadge.d.ts.map +1 -0
  21. package/dist/components/Modal.d.ts +9 -0
  22. package/dist/components/Modal.d.ts.map +1 -0
  23. package/dist/components/ProgressBar.d.ts +6 -0
  24. package/dist/components/ProgressBar.d.ts.map +1 -0
  25. package/dist/components/SendButton.d.ts +9 -0
  26. package/dist/components/SendButton.d.ts.map +1 -0
  27. package/dist/components/Spinner.d.ts +3 -0
  28. package/dist/components/Spinner.d.ts.map +1 -0
  29. package/dist/components/TextInputAddFileButton.d.ts +7 -0
  30. package/dist/components/TextInputAddFileButton.d.ts.map +1 -0
  31. package/dist/components/TypingBubble.d.ts +2 -0
  32. package/dist/components/TypingBubble.d.ts.map +1 -0
  33. package/dist/components/avatars/Avatar.d.ts +5 -0
  34. package/dist/components/avatars/Avatar.d.ts.map +1 -0
  35. package/dist/components/avatars/DefaultAvatar.d.ts +4 -0
  36. package/dist/components/avatars/DefaultAvatar.d.ts.map +1 -0
  37. package/dist/components/bubbles/GuestBubble.d.ts +9 -0
  38. package/dist/components/bubbles/GuestBubble.d.ts.map +1 -0
  39. package/dist/components/bubbles/HostBubble.d.ts +13 -0
  40. package/dist/components/bubbles/HostBubble.d.ts.map +1 -0
  41. package/dist/components/bubbles/LoadingBubble.d.ts +2 -0
  42. package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -0
  43. package/dist/components/bubbles/StreamingBubble.d.ts +7 -0
  44. package/dist/components/bubbles/StreamingBubble.d.ts.map +1 -0
  45. package/dist/components/carousel.d.ts +10 -0
  46. package/dist/components/carousel.d.ts.map +1 -0
  47. package/dist/components/icons/ArrowLeftIcon.d.ts +3 -0
  48. package/dist/components/icons/ArrowLeftIcon.d.ts.map +1 -0
  49. package/dist/components/icons/ArrowRightIcon.d.ts +3 -0
  50. package/dist/components/icons/ArrowRightIcon.d.ts.map +1 -0
  51. package/dist/components/icons/CameraIcon.d.ts +3 -0
  52. package/dist/components/icons/CameraIcon.d.ts.map +1 -0
  53. package/dist/components/icons/CheckIcon.d.ts +3 -0
  54. package/dist/components/icons/CheckIcon.d.ts.map +1 -0
  55. package/dist/components/icons/ChevronDownIcon.d.ts +3 -0
  56. package/dist/components/icons/ChevronDownIcon.d.ts.map +1 -0
  57. package/dist/components/icons/ChevronUpIcon.d.ts +3 -0
  58. package/dist/components/icons/ChevronUpIcon.d.ts.map +1 -0
  59. package/dist/components/icons/CloseIcon.d.ts +3 -0
  60. package/dist/components/icons/CloseIcon.d.ts.map +1 -0
  61. package/dist/components/icons/FileIcon.d.ts +3 -0
  62. package/dist/components/icons/FileIcon.d.ts.map +1 -0
  63. package/dist/components/icons/MakebotLogo.d.ts +2 -0
  64. package/dist/components/icons/MakebotLogo.d.ts.map +1 -0
  65. package/dist/components/icons/MicrophoneIcon.d.ts +3 -0
  66. package/dist/components/icons/MicrophoneIcon.d.ts.map +1 -0
  67. package/dist/components/icons/PaperClipIcon.d.ts +3 -0
  68. package/dist/components/icons/PaperClipIcon.d.ts.map +1 -0
  69. package/dist/components/icons/PictureIcon.d.ts +3 -0
  70. package/dist/components/icons/PictureIcon.d.ts.map +1 -0
  71. package/dist/components/icons/PlusIcon.d.ts +3 -0
  72. package/dist/components/icons/PlusIcon.d.ts.map +1 -0
  73. package/dist/components/icons/SendIcon.d.ts +3 -0
  74. package/dist/components/icons/SendIcon.d.ts.map +1 -0
  75. package/dist/components/inputs/SearchInput.d.ts +9 -0
  76. package/dist/components/inputs/SearchInput.d.ts.map +1 -0
  77. package/dist/components/inputs/ShortTextInput.d.ts +9 -0
  78. package/dist/components/inputs/ShortTextInput.d.ts.map +1 -0
  79. package/dist/components/inputs/Textarea.d.ts +9 -0
  80. package/dist/components/inputs/Textarea.d.ts.map +1 -0
  81. package/dist/constants.d.ts +86 -0
  82. package/dist/constants.d.ts.map +1 -0
  83. package/dist/contexts/BotContainerContext.d.ts +4 -0
  84. package/dist/contexts/BotContainerContext.d.ts.map +1 -0
  85. package/dist/contexts/ChatContainerSizeContext.d.ts +9 -0
  86. package/dist/contexts/ChatContainerSizeContext.d.ts.map +1 -0
  87. package/dist/features/blocks/bubbles/audio/components/AudioBubble.d.ts +8 -0
  88. package/dist/features/blocks/bubbles/audio/components/AudioBubble.d.ts.map +1 -0
  89. package/dist/features/blocks/bubbles/contact/components/ContactBubble.d.ts +11 -0
  90. package/dist/features/blocks/bubbles/contact/components/ContactBubble.d.ts.map +1 -0
  91. package/dist/features/blocks/bubbles/embed/components/CustomEmbedBubble.d.ts +11 -0
  92. package/dist/features/blocks/bubbles/embed/components/CustomEmbedBubble.d.ts.map +1 -0
  93. package/dist/features/blocks/bubbles/embed/components/EmbedBubble.d.ts +11 -0
  94. package/dist/features/blocks/bubbles/embed/components/EmbedBubble.d.ts.map +1 -0
  95. package/dist/features/blocks/bubbles/image/components/ImageBubble.d.ts +10 -0
  96. package/dist/features/blocks/bubbles/image/components/ImageBubble.d.ts.map +1 -0
  97. package/dist/features/blocks/bubbles/location/components/LocationBubble.d.ts +11 -0
  98. package/dist/features/blocks/bubbles/location/components/LocationBubble.d.ts.map +1 -0
  99. package/dist/features/blocks/bubbles/pix/components/PixBubble.d.ts +11 -0
  100. package/dist/features/blocks/bubbles/pix/components/PixBubble.d.ts.map +1 -0
  101. package/dist/features/blocks/bubbles/textBubble/components/TextBubble.d.ts +12 -0
  102. package/dist/features/blocks/bubbles/textBubble/components/TextBubble.d.ts.map +1 -0
  103. package/dist/features/blocks/bubbles/textBubble/components/plate/PlateBlock.d.ts +9 -0
  104. package/dist/features/blocks/bubbles/textBubble/components/plate/PlateBlock.d.ts.map +1 -0
  105. package/dist/features/blocks/bubbles/textBubble/components/plate/PlateText.d.ts +9 -0
  106. package/dist/features/blocks/bubbles/textBubble/components/plate/PlateText.d.ts.map +1 -0
  107. package/dist/features/blocks/bubbles/textBubble/helpers/convertRichTextToPlainText.d.ts +3 -0
  108. package/dist/features/blocks/bubbles/textBubble/helpers/convertRichTextToPlainText.d.ts.map +1 -0
  109. package/dist/features/blocks/bubbles/video/components/VideoBubble.d.ts +9 -0
  110. package/dist/features/blocks/bubbles/video/components/VideoBubble.d.ts.map +1 -0
  111. package/dist/features/blocks/inputs/buttons/components/Buttons.d.ts +11 -0
  112. package/dist/features/blocks/inputs/buttons/components/Buttons.d.ts.map +1 -0
  113. package/dist/features/blocks/inputs/buttons/components/Checkbox.d.ts +7 -0
  114. package/dist/features/blocks/inputs/buttons/components/Checkbox.d.ts.map +1 -0
  115. package/dist/features/blocks/inputs/buttons/components/MultipleChoicesForm.d.ts +10 -0
  116. package/dist/features/blocks/inputs/buttons/components/MultipleChoicesForm.d.ts.map +1 -0
  117. package/dist/features/blocks/inputs/cards/CardsCaroussel.d.ts +20 -0
  118. package/dist/features/blocks/inputs/cards/CardsCaroussel.d.ts.map +1 -0
  119. package/dist/features/blocks/inputs/date/components/DateForm.d.ts +10 -0
  120. package/dist/features/blocks/inputs/date/components/DateForm.d.ts.map +1 -0
  121. package/dist/features/blocks/inputs/email/components/EmailInput.d.ts +10 -0
  122. package/dist/features/blocks/inputs/email/components/EmailInput.d.ts.map +1 -0
  123. package/dist/features/blocks/inputs/fileUpload/components/FilePreview.d.ts +8 -0
  124. package/dist/features/blocks/inputs/fileUpload/components/FilePreview.d.ts.map +1 -0
  125. package/dist/features/blocks/inputs/fileUpload/components/FileUploadForm.d.ts +11 -0
  126. package/dist/features/blocks/inputs/fileUpload/components/FileUploadForm.d.ts.map +1 -0
  127. package/dist/features/blocks/inputs/fileUpload/components/SelectedFile.d.ts +6 -0
  128. package/dist/features/blocks/inputs/fileUpload/components/SelectedFile.d.ts.map +1 -0
  129. package/dist/features/blocks/inputs/fileUpload/helpers/sanitizeSelectedFiles.d.ts +15 -0
  130. package/dist/features/blocks/inputs/fileUpload/helpers/sanitizeSelectedFiles.d.ts.map +1 -0
  131. package/dist/features/blocks/inputs/fileUpload/helpers/uploadFiles.d.ts +28 -0
  132. package/dist/features/blocks/inputs/fileUpload/helpers/uploadFiles.d.ts.map +1 -0
  133. package/dist/features/blocks/inputs/list/components/List.d.ts +9 -0
  134. package/dist/features/blocks/inputs/list/components/List.d.ts.map +1 -0
  135. package/dist/features/blocks/inputs/number/components/NumberInput.d.ts +10 -0
  136. package/dist/features/blocks/inputs/number/components/NumberInput.d.ts.map +1 -0
  137. package/dist/features/blocks/inputs/number/numberInputHelper.d.ts +2 -0
  138. package/dist/features/blocks/inputs/number/numberInputHelper.d.ts.map +1 -0
  139. package/dist/features/blocks/inputs/payment/components/PaymentForm.d.ts +12 -0
  140. package/dist/features/blocks/inputs/payment/components/PaymentForm.d.ts.map +1 -0
  141. package/dist/features/blocks/inputs/payment/components/StripePaymentForm.d.ts +12 -0
  142. package/dist/features/blocks/inputs/payment/components/StripePaymentForm.d.ts.map +1 -0
  143. package/dist/features/blocks/inputs/payment/helpers/paymentInProgressStorage.d.ts +5 -0
  144. package/dist/features/blocks/inputs/payment/helpers/paymentInProgressStorage.d.ts.map +1 -0
  145. package/dist/features/blocks/inputs/phone/components/PhoneInput.d.ts +9 -0
  146. package/dist/features/blocks/inputs/phone/components/PhoneInput.d.ts.map +1 -0
  147. package/dist/features/blocks/inputs/rating/components/RatingForm.d.ts +10 -0
  148. package/dist/features/blocks/inputs/rating/components/RatingForm.d.ts.map +1 -0
  149. package/dist/features/blocks/inputs/textInput/components/TextInput.d.ts +11 -0
  150. package/dist/features/blocks/inputs/textInput/components/TextInput.d.ts.map +1 -0
  151. package/dist/features/blocks/inputs/textInput/components/VoiceRecorder.d.ts +12 -0
  152. package/dist/features/blocks/inputs/textInput/components/VoiceRecorder.d.ts.map +1 -0
  153. package/dist/features/blocks/inputs/textInput/components/VolumeProcessor.d.ts +2 -0
  154. package/dist/features/blocks/inputs/textInput/components/VolumeProcessor.d.ts.map +1 -0
  155. package/dist/features/blocks/inputs/time/components/TimeForm.d.ts +10 -0
  156. package/dist/features/blocks/inputs/time/components/TimeForm.d.ts.map +1 -0
  157. package/dist/features/blocks/inputs/url/components/UrlInput.d.ts +10 -0
  158. package/dist/features/blocks/inputs/url/components/UrlInput.d.ts.map +1 -0
  159. package/dist/features/blocks/integrations/chatwoot/constants.d.ts +2 -0
  160. package/dist/features/blocks/integrations/chatwoot/constants.d.ts.map +1 -0
  161. package/dist/features/blocks/integrations/chatwoot/utils/executeChatwoot.d.ts +7 -0
  162. package/dist/features/blocks/integrations/chatwoot/utils/executeChatwoot.d.ts.map +1 -0
  163. package/dist/features/blocks/integrations/chatwoot/utils/index.d.ts +2 -0
  164. package/dist/features/blocks/integrations/chatwoot/utils/index.d.ts.map +1 -0
  165. package/dist/features/blocks/integrations/googleAnalytics/utils/executeGoogleAnalytics.d.ts +3 -0
  166. package/dist/features/blocks/integrations/googleAnalytics/utils/executeGoogleAnalytics.d.ts.map +1 -0
  167. package/dist/features/blocks/integrations/httpRequest/executeHttpRequest.d.ts +3 -0
  168. package/dist/features/blocks/integrations/httpRequest/executeHttpRequest.d.ts.map +1 -0
  169. package/dist/features/blocks/integrations/openai/streamChat.d.ts +19 -0
  170. package/dist/features/blocks/integrations/openai/streamChat.d.ts.map +1 -0
  171. package/dist/features/blocks/integrations/pixel/executePixel.d.ts +3 -0
  172. package/dist/features/blocks/integrations/pixel/executePixel.d.ts.map +1 -0
  173. package/dist/features/blocks/logic/redirect/utils/executeRedirect.d.ts +5 -0
  174. package/dist/features/blocks/logic/redirect/utils/executeRedirect.d.ts.map +1 -0
  175. package/dist/features/blocks/logic/script/executeScript.d.ts +19 -0
  176. package/dist/features/blocks/logic/script/executeScript.d.ts.map +1 -0
  177. package/dist/features/blocks/logic/setVariable/executeSetVariable.d.ts +7 -0
  178. package/dist/features/blocks/logic/setVariable/executeSetVariable.d.ts.map +1 -0
  179. package/dist/features/blocks/logic/wait/utils/executeWait.d.ts +6 -0
  180. package/dist/features/blocks/logic/wait/utils/executeWait.d.ts.map +1 -0
  181. package/dist/features/blocks/logic/webhook/listenForWebhook.d.ts +13 -0
  182. package/dist/features/blocks/logic/webhook/listenForWebhook.d.ts.map +1 -0
  183. package/dist/features/bubble/components/Bubble.d.ts +15 -0
  184. package/dist/features/bubble/components/Bubble.d.ts.map +1 -0
  185. package/dist/features/bubble/components/BubbleButton.d.ts +8 -0
  186. package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -0
  187. package/dist/features/bubble/components/PreviewMessage.d.ts +8 -0
  188. package/dist/features/bubble/components/PreviewMessage.d.ts.map +1 -0
  189. package/dist/features/bubble/types.d.ts +37 -0
  190. package/dist/features/bubble/types.d.ts.map +1 -0
  191. package/dist/features/commands/index.d.ts +12 -0
  192. package/dist/features/commands/index.d.ts.map +1 -0
  193. package/dist/features/commands/types.d.ts +26 -0
  194. package/dist/features/commands/types.d.ts.map +1 -0
  195. package/dist/features/commands/utils/close.d.ts +3 -0
  196. package/dist/features/commands/utils/close.d.ts.map +1 -0
  197. package/dist/features/commands/utils/hidePreviewMessage.d.ts +3 -0
  198. package/dist/features/commands/utils/hidePreviewMessage.d.ts.map +1 -0
  199. package/dist/features/commands/utils/open.d.ts +3 -0
  200. package/dist/features/commands/utils/open.d.ts.map +1 -0
  201. package/dist/features/commands/utils/reload.d.ts +3 -0
  202. package/dist/features/commands/utils/reload.d.ts.map +1 -0
  203. package/dist/features/commands/utils/sendCommand.d.ts +3 -0
  204. package/dist/features/commands/utils/sendCommand.d.ts.map +1 -0
  205. package/dist/features/commands/utils/setInputValue.d.ts +3 -0
  206. package/dist/features/commands/utils/setInputValue.d.ts.map +1 -0
  207. package/dist/features/commands/utils/setPrefilledVariables.d.ts +3 -0
  208. package/dist/features/commands/utils/setPrefilledVariables.d.ts.map +1 -0
  209. package/dist/features/commands/utils/showPreviewMessage.d.ts +3 -0
  210. package/dist/features/commands/utils/showPreviewMessage.d.ts.map +1 -0
  211. package/dist/features/commands/utils/toggle.d.ts +3 -0
  212. package/dist/features/commands/utils/toggle.d.ts.map +1 -0
  213. package/dist/features/commands/utils/unmount.d.ts +3 -0
  214. package/dist/features/commands/utils/unmount.d.ts.map +1 -0
  215. package/dist/features/popup/components/Popup.d.ts +11 -0
  216. package/dist/features/popup/components/Popup.d.ts.map +1 -0
  217. package/dist/features/popup/types.d.ts +9 -0
  218. package/dist/features/popup/types.d.ts.map +1 -0
  219. package/dist/features/standard/components/Standard.d.ts +5 -0
  220. package/dist/features/standard/components/Standard.d.ts.map +1 -0
  221. package/dist/index.d.ts +18 -143
  222. package/dist/index.d.ts.map +1 -0
  223. package/dist/index.js +1 -0
  224. package/dist/lib/gtag.d.ts +4 -0
  225. package/dist/lib/gtag.d.ts.map +1 -0
  226. package/dist/lib/gtm.d.ts +3 -0
  227. package/dist/lib/gtm.d.ts.map +1 -0
  228. package/dist/lib/pixel.d.ts +4 -0
  229. package/dist/lib/pixel.d.ts.map +1 -0
  230. package/dist/queries/continueChatQuery.d.ts +722 -0
  231. package/dist/queries/continueChatQuery.d.ts.map +1 -0
  232. package/dist/queries/saveClientLogsQuery.d.ts +7 -0
  233. package/dist/queries/saveClientLogsQuery.d.ts.map +1 -0
  234. package/dist/queries/startChatQuery.d.ts +20 -0
  235. package/dist/queries/startChatQuery.d.ts.map +1 -0
  236. package/dist/register.d.ts +2 -0
  237. package/dist/register.d.ts.map +1 -0
  238. package/dist/types.d.ts +49 -0
  239. package/dist/types.d.ts.map +1 -0
  240. package/dist/utils/CorsError.d.ts +4 -0
  241. package/dist/utils/CorsError.d.ts.map +1 -0
  242. package/dist/utils/dynamicTheme.d.ts +4 -0
  243. package/dist/utils/dynamicTheme.d.ts.map +1 -0
  244. package/dist/utils/error.d.ts +2 -0
  245. package/dist/utils/error.d.ts.map +1 -0
  246. package/dist/utils/executeClientSideActions.d.ts +25 -0
  247. package/dist/utils/executeClientSideActions.d.ts.map +1 -0
  248. package/dist/utils/getAnswerContent.d.ts +3 -0
  249. package/dist/utils/getAnswerContent.d.ts.map +1 -0
  250. package/dist/utils/getPartyKitHost.d.ts +2 -0
  251. package/dist/utils/getPartyKitHost.d.ts.map +1 -0
  252. package/dist/utils/guessApiHost.d.ts +6 -0
  253. package/dist/utils/guessApiHost.d.ts.map +1 -0
  254. package/dist/utils/injectFont.d.ts +3 -0
  255. package/dist/utils/injectFont.d.ts.map +1 -0
  256. package/dist/utils/injectStartProps.d.ts +3 -0
  257. package/dist/utils/injectStartProps.d.ts.map +1 -0
  258. package/dist/utils/migrateLegacyChatChunks.d.ts +10 -0
  259. package/dist/utils/migrateLegacyChatChunks.d.ts.map +1 -0
  260. package/dist/utils/persist.d.ts +9 -0
  261. package/dist/utils/persist.d.ts.map +1 -0
  262. package/dist/utils/resolveBubbleButtonSize.d.ts +5 -0
  263. package/dist/utils/resolveBubbleButtonSize.d.ts.map +1 -0
  264. package/dist/utils/scrollContainer.d.ts +2 -0
  265. package/dist/utils/scrollContainer.d.ts.map +1 -0
  266. package/dist/utils/setCssVariablesValue.d.ts +16 -0
  267. package/dist/utils/setCssVariablesValue.d.ts.map +1 -0
  268. package/dist/utils/storage.d.ts +875 -0
  269. package/dist/utils/storage.d.ts.map +1 -0
  270. package/dist/utils/toaster.d.ts +2 -0
  271. package/dist/utils/toaster.d.ts.map +1 -0
  272. package/dist/web.d.ts +19 -0
  273. package/dist/web.d.ts.map +1 -0
  274. package/dist/web.js +59 -1252
  275. package/dist/window.d.ts +29 -0
  276. package/dist/window.d.ts.map +1 -0
  277. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,143 +1,18 @@
1
- import { InputBlock } from '@makebot.it/blocks-inputs/schema';
2
- import { StartMakebot, StartFrom } from '@makebot.it/chat-api/schemas';
3
- import { LogInSession } from '@makebot.it/logs/schemas';
4
- import { Font } from '@makebot.it/theme/schemas';
5
-
6
- type BubbleParams = {
7
- theme?: BubbleTheme;
8
- previewMessage?: PreviewMessageParams;
9
- autoShowDelay?: number;
10
- };
11
- type BubbleTheme = {
12
- chatWindow?: ChatWindowTheme;
13
- button?: ButtonTheme;
14
- previewMessage?: PreviewMessageTheme;
15
- placement?: "left" | "right";
16
- position?: "fixed" | "static";
17
- };
18
- type ChatWindowTheme = {
19
- backgroundColor?: string;
20
- maxWidth?: string;
21
- maxHeight?: string;
22
- };
23
- type ButtonTheme = {
24
- isHidden?: boolean;
25
- size?: "medium" | "large" | `${number}px`;
26
- backgroundColor?: string;
27
- iconColor?: string;
28
- customIconSrc?: string;
29
- customCloseIconSrc?: string;
30
- };
31
- type PreviewMessageParams = {
32
- avatarUrl?: string;
33
- message: string;
34
- autoShowDelay?: number;
35
- };
36
- type PreviewMessageTheme = {
37
- backgroundColor?: string;
38
- textColor?: string;
39
- closeButtonBackgroundColor?: string;
40
- closeButtonIconColor?: string;
41
- };
42
-
43
- type CommandArgs = {
44
- id?: string;
45
- };
46
- type CommandData = CommandArgs & {
47
- isFromMakebot: boolean;
48
- } & ({
49
- command: "open" | "toggle" | "close" | "hidePreviewMessage" | "unmount" | "reload";
50
- } | ShowMessageCommandData | SetPrefilledVariablesCommandData | SetInputValueCommandData | SendCommandCommandData);
51
- type ShowMessageCommandData = {
52
- command: "showPreviewMessage";
53
- message?: Pick<PreviewMessageParams, "avatarUrl" | "message">;
54
- };
55
- type SetPrefilledVariablesCommandData = {
56
- command: "setPrefilledVariables";
57
- variables: Record<string, string | number | boolean>;
58
- };
59
- type SetInputValueCommandData = {
60
- command: "setInputValue";
61
- value: string;
62
- };
63
- type SendCommandCommandData = {
64
- command: "sendCommand";
65
- text: string;
66
- };
67
-
68
- declare const close: ({ id }?: CommandArgs) => void;
69
-
70
- declare const open: ({ id }?: CommandArgs) => void;
71
-
72
- declare const showPreviewMessage: (proactiveMessage: ShowMessageCommandData["message"] | undefined, { id }?: CommandArgs) => void;
73
-
74
- declare const toggle: ({ id }?: CommandArgs) => void;
75
-
76
- declare const setInputValue: (value: string, { id }?: CommandArgs) => void;
77
-
78
- declare const unmount: ({ id }?: CommandArgs) => void;
79
-
80
- declare const setPrefilledVariables: (variables: Record<string, string | number | boolean>, { id }?: CommandArgs) => void;
81
-
82
- declare const hidePreviewMessage: ({ id }?: CommandArgs) => void;
83
-
84
- declare const sendCommand: (text: string, { id }?: CommandArgs) => void;
85
-
86
- declare const reload: ({ id }?: CommandArgs) => void;
87
-
88
- type BotProps = {
89
- id?: string;
90
- makebot: string | StartMakebot | undefined;
91
- isPreview?: boolean;
92
- resultId?: string;
93
- prefilledVariables?: Record<string, unknown>;
94
- apiHost?: string;
95
- wsHost?: string;
96
- font?: Font;
97
- progressBarRef?: HTMLDivElement;
98
- startFrom?: StartFrom;
99
- sessionId?: string;
100
- onNewInputBlock?: (inputBlock: InputBlock) => void;
101
- onAnswer?: (answer: {
102
- message: string;
103
- blockId: string;
104
- }) => void;
105
- onInit?: () => void;
106
- onEnd?: () => void;
107
- onNewLogs?: (logs: LogInSession[]) => void;
108
- onChatStatePersisted?: (isEnabled: boolean) => void;
109
- onScriptExecutionSuccess?: (message: string) => void;
110
- };
111
-
112
- type PopupParams = {
113
- autoShowDelay?: number;
114
- theme?: {
115
- width?: string;
116
- backgroundColor?: string;
117
- zIndex?: number;
118
- };
119
- };
120
-
121
- type PopupProps = BotProps & PopupParams & {
122
- defaultOpen?: boolean;
123
- isOpen?: boolean;
124
- onOpen?: () => void;
125
- onClose?: () => void;
126
- };
127
-
128
- type BubbleProps = BotProps & BubbleParams & {
129
- inlineStyle?: {
130
- [key: string]: string;
131
- };
132
- isOpen?: boolean;
133
- onOpen?: () => void;
134
- onClose?: () => void;
135
- onPreviewMessageClick?: () => void;
136
- onPreviewMessageDismissed?: () => void;
137
- };
138
-
139
- declare const resolveButtonSize: (size: NonNullable<NonNullable<BubbleProps["theme"]>["button"]>["size"], { isHidden }?: {
140
- isHidden?: boolean;
141
- }) => `${number}px`;
142
-
143
- export { type BotProps, type BubbleParams, type BubbleProps, type BubbleTheme, type ButtonTheme, type ChatWindowTheme, type CommandArgs, type CommandData, type PopupParams, type PopupProps, type PreviewMessageParams, type PreviewMessageTheme, type SendCommandCommandData, type SetInputValueCommandData, type SetPrefilledVariablesCommandData, type ShowMessageCommandData, close, hidePreviewMessage, open, reload, resolveButtonSize, sendCommand, setInputValue, setPrefilledVariables, showPreviewMessage, toggle, unmount };
1
+ export * from "./features/commands/utils/close";
2
+ export * from "./features/commands/utils/open";
3
+ export * from "./features/commands/utils/showPreviewMessage";
4
+ export * from "./features/commands/utils/toggle";
5
+ export * from "./features/commands/utils/setInputValue";
6
+ export * from "./features/commands/utils/unmount";
7
+ export * from "./features/commands/utils/setPrefilledVariables";
8
+ export * from "./features/commands/utils/hidePreviewMessage";
9
+ export * from "./features/commands/utils/sendCommand";
10
+ export * from "./features/commands/utils/reload";
11
+ export * from "./features/commands/types";
12
+ export type { BotProps } from "./components/Bot";
13
+ export type { PopupProps } from "./features/popup/components/Popup";
14
+ export type { BubbleProps } from "./features/bubble/components/Bubble";
15
+ export type * from "./features/bubble/types";
16
+ export type * from "./features/popup/types";
17
+ export { resolveButtonSize } from "./utils/resolveBubbleButtonSize";
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iDAAiD,CAAC;AAChE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAE1C,YAAY,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACpE,YAAY,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACvE,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,wBAAwB,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC"}
package/dist/index.js CHANGED
@@ -1 +1,2 @@
1
+ // v0.9.11
1
2
  var s=({id:o}={})=>{let e={isFromMakebot:!0,command:"close",id:o};window.postMessage(e)};var r=({id:o}={})=>{let e={isFromMakebot:!0,command:"open",id:o};window.postMessage(e)};var p=(o,{id:e}={})=>{let m={isFromMakebot:!0,command:"showPreviewMessage",message:o,id:e};window.postMessage(m)};var g=({id:o}={})=>{let e={isFromMakebot:!0,command:"toggle",id:o};window.postMessage(e)};var u=(o,{id:e}={})=>{let m={isFromMakebot:!0,command:"setInputValue",value:o,id:e};window.postMessage(m)};var f=({id:o}={})=>{let e={isFromMakebot:!0,command:"unmount",id:o};window.postMessage(e)};var c=(o,{id:e}={})=>{let m={isFromMakebot:!0,command:"setPrefilledVariables",variables:o,id:e};window.postMessage(m)};var l=({id:o}={})=>{let e={isFromMakebot:!0,command:"hidePreviewMessage",id:o};window.postMessage(e)};var y=(o,{id:e}={})=>{let m={isFromMakebot:!0,command:"sendCommand",text:o,id:e};window.postMessage(m)};var D=({id:o}={})=>{let e={isFromMakebot:!0,command:"reload",id:o};window.postMessage(e)};var t=(o,{isHidden:e=!1}={})=>e?"0px":o==="large"?"64px":o==="medium"||!o?"48px":typeof o=="string"&&/^\d+px$/.test(o.trim())?o.trim():(console.warn("[Makebot] Tamanho de bot\xE3o inv\xE1lido. Use 'm\xE9dio', 'grande' ou um valor em pixels expl\xEDcita (ex.: '52px')."),"48px");export{s as close,l as hidePreviewMessage,r as open,D as reload,t as resolveButtonSize,y as sendCommand,u as setInputValue,c as setPrefilledVariables,p as showPreviewMessage,g as toggle,f as unmount};
@@ -0,0 +1,4 @@
1
+ import type { GoogleAnalyticsBlock } from "@makebot.it/blocks-integrations/googleAnalytics/schema";
2
+ export declare const initGoogleAnalytics: (id: string) => Promise<void>;
3
+ export declare const sendGaEvent: (options: GoogleAnalyticsBlock["options"]) => void;
4
+ //# sourceMappingURL=gtag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gtag.d.ts","sourceRoot":"","sources":["../../src/lib/gtag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAgBnG,eAAO,MAAM,mBAAmB,GAAI,IAAI,MAAM,KAAG,OAAO,CAAC,IAAI,CAuB5D,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,SAAS,oBAAoB,CAAC,SAAS,CAAC,SAYnE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const gtmHeadSnippet: (googleTagManagerId: string) => string;
2
+ export declare const gtmBodyElement: (googleTagManagerId: string) => HTMLElement | "";
3
+ //# sourceMappingURL=gtm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gtm.d.ts","sourceRoot":"","sources":["../../src/lib/gtm.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,GACzB,oBAAoB,MAAM,WAOI,CAAC;AAEjC,eAAO,MAAM,cAAc,GAAI,oBAAoB,MAAM,qBAYxD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { PixelBlock } from "@makebot.it/blocks-integrations/pixel/schema";
2
+ export declare const initPixel: (pixelIds: string[]) => void;
3
+ export declare const trackPixelEvent: (options: PixelBlock["options"]) => void;
4
+ //# sourceMappingURL=pixel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixel.d.ts","sourceRoot":"","sources":["../../src/lib/pixel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAW/E,eAAO,MAAM,SAAS,GAAI,UAAU,MAAM,EAAE,SAa3C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,UAAU,CAAC,SAAS,CAAC,SAiB7D,CAAC"}