isometrik-plugin-chat-sdk 1.3.18 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (476) hide show
  1. package/dist/cjs/app-globals-61a8bfde.js +38 -0
  2. package/dist/cjs/app-globals-61a8bfde.js.map +1 -0
  3. package/dist/cjs/attachment-preview_22.cjs.entry.js +122 -44
  4. package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
  5. package/dist/cjs/audio-bubble_4.cjs.entry.js +38 -8
  6. package/dist/cjs/audio-bubble_4.cjs.entry.js.map +1 -1
  7. package/dist/cjs/chat-app.cjs.entry.js +2 -2
  8. package/dist/cjs/chat-app.cjs.entry.js.map +1 -1
  9. package/dist/cjs/{chat-creds-cf537d4b.js → chat-creds-2dbc4087.js} +3 -3
  10. package/dist/cjs/chat-creds-2dbc4087.js.map +1 -0
  11. package/dist/cjs/chat-document-message-bubble.cjs.entry.js +1 -1
  12. package/dist/cjs/chat-image-message-bubble.cjs.entry.js +1 -1
  13. package/dist/cjs/chat-video-message-bubble.cjs.entry.js +1 -1
  14. package/dist/cjs/client-80851676.js +482 -0
  15. package/dist/cjs/client-80851676.js.map +1 -0
  16. package/dist/cjs/{contracts-31632812.js → contracts-dfc84075.js} +2 -2
  17. package/dist/cjs/contracts-dfc84075.js.map +1 -0
  18. package/dist/cjs/destroy-chat-7ae8fc99.js +24 -0
  19. package/dist/cjs/destroy-chat-7ae8fc99.js.map +1 -0
  20. package/dist/cjs/doublecheck-c2461adc.js +36 -0
  21. package/dist/cjs/doublecheck-c2461adc.js.map +1 -0
  22. package/dist/cjs/{drawer-28cc94a4.js → drawer-811d2ce8.js} +2 -2
  23. package/dist/cjs/{drawer-28cc94a4.js.map → drawer-811d2ce8.js.map} +1 -1
  24. package/dist/cjs/forward-memebers.cjs.entry.js +2 -2
  25. package/dist/cjs/forward-message.cjs.entry.js +2 -2
  26. package/dist/cjs/group-chat-contacts.cjs.entry.js +2 -2
  27. package/dist/cjs/{group-members-73ad1074.js → group-members-5a82ec8a.js} +1 -125
  28. package/dist/cjs/group-members-5a82ec8a.js.map +1 -0
  29. package/dist/cjs/{helpers-8061ec7d.js → helpers-154861e9.js} +2 -2
  30. package/dist/cjs/{helpers-8061ec7d.js.map → helpers-154861e9.js.map} +1 -1
  31. package/dist/cjs/{index-1a26d11d.js → index-66f98408.js} +2 -2
  32. package/dist/cjs/index-66f98408.js.map +1 -0
  33. package/dist/cjs/index.cjs.js +55 -182
  34. package/dist/cjs/index.cjs.js.map +1 -1
  35. package/dist/cjs/isometrik-webchat.cjs.js +10 -2
  36. package/dist/cjs/isometrik-webchat.cjs.js.map +1 -1
  37. package/dist/cjs/loader.cjs.js +10 -2
  38. package/dist/cjs/loader.cjs.js.map +1 -1
  39. package/dist/cjs/login-page_3.cjs.entry.js +708 -376
  40. package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
  41. package/dist/cjs/media-gallery.cjs.entry.js +1 -1
  42. package/dist/cjs/media-limits-eba42629.js +165 -0
  43. package/dist/cjs/media-limits-eba42629.js.map +1 -0
  44. package/dist/cjs/member-add.cjs.entry.js +3 -3
  45. package/dist/cjs/message-bubble.cjs.entry.js +30 -8
  46. package/dist/cjs/message-bubble.cjs.entry.js.map +1 -1
  47. package/dist/cjs/my-component.cjs.entry.js +1 -1
  48. package/dist/cjs/new-chat-sidebar.cjs.entry.js +2 -2
  49. package/dist/cjs/reaction-container.cjs.entry.js +4 -4
  50. package/dist/cjs/runtime-controls-201c71ba.js +650 -0
  51. package/dist/cjs/runtime-controls-201c71ba.js.map +1 -0
  52. package/dist/cjs/send-media-14908d4b.js +375 -0
  53. package/dist/cjs/send-media-14908d4b.js.map +1 -0
  54. package/dist/cjs/signup-page.cjs.entry.js +1 -1
  55. package/dist/cjs/{toast-0bf1e688.js → toast-f810e550.js} +8 -8
  56. package/dist/cjs/toast-f810e550.js.map +1 -0
  57. package/dist/collection/collection-manifest.json +2 -1
  58. package/dist/collection/components/ChatUIComponent/ChatDocumentMessageBubble.js +1 -1
  59. package/dist/collection/components/ChatUIComponent/ChatImageMessageBubble.js +1 -1
  60. package/dist/collection/components/ChatUIComponent/ChatVideoMessageBubble.js +1 -1
  61. package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +61 -14
  62. package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -1
  63. package/dist/collection/components/ChatUIComponent/ReactionContainer.js +2 -2
  64. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +7 -6
  65. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
  66. package/dist/collection/components/ChatUIComponent/shared/attachment-preview/attachment-preview.js +39 -8
  67. package/dist/collection/components/ChatUIComponent/shared/attachment-preview/attachment-preview.js.map +1 -1
  68. package/dist/collection/components/ChatUIComponent/shared/document-message/document-message.js +53 -3
  69. package/dist/collection/components/ChatUIComponent/shared/document-message/document-message.js.map +1 -1
  70. package/dist/collection/components/ChatUIComponent/shared/forward-message/forward-message.js +2 -2
  71. package/dist/collection/components/ChatUIComponent/shared/image-message/image-message.js +19 -1
  72. package/dist/collection/components/ChatUIComponent/shared/image-message/image-message.js.map +1 -1
  73. package/dist/collection/components/ChatUIComponent/shared/incoming-text-message-bubble/incoming-text-message-bubble.js +1 -1
  74. package/dist/collection/components/ChatUIComponent/shared/message-bubble/message-bubble.js +47 -7
  75. package/dist/collection/components/ChatUIComponent/shared/message-bubble/message-bubble.js.map +1 -1
  76. package/dist/collection/components/ChatUIComponent/shared/message-date-pill/message-date-pill.js +1 -1
  77. package/dist/collection/components/ChatUIComponent/shared/new chat/new-chat.stories.js +1 -1
  78. package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.js +19 -1
  79. package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.js.map +1 -1
  80. package/dist/collection/components/ChatUIComponent/shared/reply-message-container/reply-message-container.js +1 -1
  81. package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js +20 -2
  82. package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js.map +1 -1
  83. package/dist/collection/components/my-component/my-component.js +1 -1
  84. package/dist/collection/components/my-component/web-chat/FLOW.js +1 -1
  85. package/dist/collection/components/my-component/web-chat/FLOW.js.map +1 -1
  86. package/dist/collection/components/my-component/web-chat/WebChat.js +113 -12
  87. package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
  88. package/dist/collection/components/my-component/web-chat/bootstrap.js +7 -0
  89. package/dist/collection/components/my-component/web-chat/bootstrap.js.map +1 -1
  90. package/dist/collection/components/my-component/web-chat/data-fetch.js +14 -5
  91. package/dist/collection/components/my-component/web-chat/data-fetch.js.map +1 -1
  92. package/dist/collection/components/my-component/web-chat/mqtt-host.js +152 -41
  93. package/dist/collection/components/my-component/web-chat/mqtt-host.js.map +1 -1
  94. package/dist/collection/components/my-component/web-chat/offline-host.js +212 -0
  95. package/dist/collection/components/my-component/web-chat/offline-host.js.map +1 -0
  96. package/dist/collection/components/my-component/web-chat/public-send.js +96 -21
  97. package/dist/collection/components/my-component/web-chat/public-send.js.map +1 -1
  98. package/dist/collection/components/my-component/web-chat/shell-render.js +47 -28
  99. package/dist/collection/components/my-component/web-chat/shell-render.js.map +1 -1
  100. package/dist/collection/components/theme-provider.js +114 -45
  101. package/dist/collection/components/theme-provider.js.map +1 -1
  102. package/dist/collection/constants/chat-creds.js +2 -2
  103. package/dist/collection/demos/custom-ui-demo-elements.js +2 -2
  104. package/dist/collection/demos/custom-ui-demo-elements.js.map +1 -1
  105. package/dist/collection/global/expose-sdk.js +29 -0
  106. package/dist/collection/global/expose-sdk.js.map +1 -0
  107. package/dist/collection/index.js +10 -141
  108. package/dist/collection/index.js.map +1 -1
  109. package/dist/collection/lib/chat/index.js +3 -0
  110. package/dist/collection/lib/chat/index.js.map +1 -1
  111. package/dist/collection/lib/chat/media-limits.js +21 -0
  112. package/dist/collection/lib/chat/media-limits.js.map +1 -0
  113. package/dist/collection/lib/chat/media-outbox.js +43 -0
  114. package/dist/collection/lib/chat/media-outbox.js.map +1 -0
  115. package/dist/collection/lib/chat/preview-kind.js +41 -0
  116. package/dist/collection/lib/chat/preview-kind.js.map +1 -0
  117. package/dist/collection/lib/chat/send-media.js +5 -2
  118. package/dist/collection/lib/chat/send-media.js.map +1 -1
  119. package/dist/collection/lib/custom-ui/contracts.js +1 -1
  120. package/dist/collection/lib/custom-ui/contracts.js.map +1 -1
  121. package/dist/collection/lib/custom-ui/index.js +1 -1
  122. package/dist/collection/lib/custom-ui/index.js.map +1 -1
  123. package/dist/collection/lib/custom-ui/public-api.js +1 -0
  124. package/dist/collection/lib/custom-ui/public-api.js.map +1 -1
  125. package/dist/collection/lib/destroy-chat.js +15 -16
  126. package/dist/collection/lib/destroy-chat.js.map +1 -0
  127. package/dist/collection/lib/mqtt/inbound-queue.js +17 -0
  128. package/dist/collection/lib/mqtt/inbound-queue.js.map +1 -0
  129. package/dist/collection/lib/mqtt/index.js +2 -1
  130. package/dist/collection/lib/mqtt/index.js.map +1 -1
  131. package/dist/collection/lib/mqtt/session.js +50 -6
  132. package/dist/collection/lib/mqtt/session.js.map +1 -1
  133. package/dist/collection/lib/offline/client.js +167 -0
  134. package/dist/collection/lib/offline/client.js.map +1 -0
  135. package/dist/collection/lib/offline/idb.js +181 -0
  136. package/dist/collection/lib/offline/idb.js.map +1 -0
  137. package/dist/collection/lib/offline/index.js +10 -0
  138. package/dist/collection/lib/offline/index.js.map +1 -0
  139. package/dist/collection/lib/offline/memory-db.js +64 -0
  140. package/dist/collection/lib/offline/memory-db.js.map +1 -0
  141. package/dist/collection/lib/offline/merge.js +24 -0
  142. package/dist/collection/lib/offline/merge.js.map +1 -0
  143. package/dist/collection/lib/offline/multitab.js +47 -0
  144. package/dist/collection/lib/offline/multitab.js.map +1 -0
  145. package/dist/collection/lib/offline/types.js +2 -0
  146. package/dist/collection/lib/offline/types.js.map +1 -0
  147. package/dist/collection/lib/toast.js +6 -6
  148. package/dist/collection/lib/toast.js.map +1 -1
  149. package/dist/collection/sdk/api.js +4 -0
  150. package/dist/collection/sdk/api.js.map +1 -0
  151. package/dist/collection/sdk/composition.js +43 -0
  152. package/dist/collection/sdk/composition.js.map +1 -0
  153. package/dist/collection/sdk/headless-api.js +37 -0
  154. package/dist/collection/sdk/headless-api.js.map +1 -0
  155. package/dist/collection/sdk/index.js +11 -0
  156. package/dist/collection/sdk/index.js.map +1 -0
  157. package/dist/collection/sdk/init.js +207 -0
  158. package/dist/collection/sdk/init.js.map +1 -0
  159. package/dist/collection/sdk/instance.js +63 -0
  160. package/dist/collection/sdk/instance.js.map +1 -0
  161. package/dist/collection/sdk/react-bridge.js +145 -0
  162. package/dist/collection/sdk/react-bridge.js.map +1 -0
  163. package/dist/collection/sdk/runtime-controls.js +54 -0
  164. package/dist/collection/sdk/runtime-controls.js.map +1 -0
  165. package/dist/collection/sdk/slots.js +57 -0
  166. package/dist/collection/sdk/slots.js.map +1 -0
  167. package/dist/collection/sdk/theme-tokens.js +99 -0
  168. package/dist/collection/sdk/theme-tokens.js.map +1 -0
  169. package/dist/collection/sdk/webchat-api.js +36 -0
  170. package/dist/collection/sdk/webchat-api.js.map +1 -0
  171. package/dist/collection/testing/chat-assets-mock.js +45 -0
  172. package/dist/collection/testing/chat-creds-mock.js +18 -0
  173. package/dist/collection/testing/emoji-picker-mock.js +2 -0
  174. package/dist/collection/testing/file-mock.js +1 -0
  175. package/dist/collection/testing/groupcast-mock.js +7 -0
  176. package/dist/collection/testing/helpers-mock.js +4 -0
  177. package/dist/collection/testing/iso-chat-sdk-mock.js +19 -0
  178. package/dist/collection/testing/toast-mock.js +2 -0
  179. package/dist/components/ChatFooter.js +62 -15
  180. package/dist/components/ChatFooter.js.map +1 -1
  181. package/dist/components/ChatSidebar.js +1 -1
  182. package/dist/components/{GroupCast.js → GroupCast2.js} +2 -2
  183. package/dist/components/GroupCast2.js.map +1 -0
  184. package/dist/components/WebChat.js +643 -312
  185. package/dist/components/WebChat.js.map +1 -1
  186. package/dist/components/WebChatBody.js +8 -7
  187. package/dist/components/WebChatBody.js.map +1 -1
  188. package/dist/components/attachment-preview2.js +40 -9
  189. package/dist/components/attachment-preview2.js.map +1 -1
  190. package/dist/components/chat-app.js +3 -3
  191. package/dist/components/chat-app.js.map +1 -1
  192. package/dist/components/chat-assets.js +1 -1
  193. package/dist/components/chat-creds.js +2 -2
  194. package/dist/components/chat-creds.js.map +1 -1
  195. package/dist/components/chat-document-message-bubble.js +1 -1
  196. package/dist/components/chat-image-message-bubble.js +1 -1
  197. package/dist/components/chat-tile2.js +1 -1
  198. package/dist/components/chat-video-message-bubble.js +1 -1
  199. package/dist/components/client.js +728 -0
  200. package/dist/components/client.js.map +1 -0
  201. package/dist/components/contact-info2.js +2 -117
  202. package/dist/components/contact-info2.js.map +1 -1
  203. package/dist/components/contracts.js +1 -1
  204. package/dist/components/contracts.js.map +1 -1
  205. package/dist/components/destroy-chat.js +14 -16
  206. package/dist/components/destroy-chat.js.map +1 -1
  207. package/dist/components/document-message2.js +35 -5
  208. package/dist/components/document-message2.js.map +1 -1
  209. package/dist/components/forward-message.js +2 -2
  210. package/dist/components/group-cast.js +1 -1
  211. package/dist/components/{groupcast2.js → groupcast.js} +1 -1
  212. package/dist/components/groupcast.js.map +1 -0
  213. package/dist/components/image-message2.js +3 -1
  214. package/dist/components/image-message2.js.map +1 -1
  215. package/dist/components/incoming-text-message-bubble2.js +1 -1
  216. package/dist/components/index.js +551 -60
  217. package/dist/components/index.js.map +1 -1
  218. package/dist/components/index2.js +1 -1
  219. package/dist/components/index2.js.map +1 -1
  220. package/dist/components/media-limits.js +24 -0
  221. package/dist/components/media-limits.js.map +1 -0
  222. package/dist/components/member-add.js +1 -1
  223. package/dist/components/message-bubble2.js +31 -7
  224. package/dist/components/message-bubble2.js.map +1 -1
  225. package/dist/components/message-date-pill2.js +1 -1
  226. package/dist/components/messages.js +131 -0
  227. package/dist/components/messages.js.map +1 -0
  228. package/dist/components/my-component.js +1 -1
  229. package/dist/components/outgoing-text-message-bubble2.js +3 -1
  230. package/dist/components/outgoing-text-message-bubble2.js.map +1 -1
  231. package/dist/components/preview-kind.js +30 -0
  232. package/dist/components/preview-kind.js.map +1 -0
  233. package/dist/components/reaction-container.js +2 -2
  234. package/dist/components/reply-message-container2.js +1 -1
  235. package/dist/components/theme-provider2.js +56 -44
  236. package/dist/components/theme-provider2.js.map +1 -1
  237. package/dist/components/theme-tokens.js +102 -0
  238. package/dist/components/theme-tokens.js.map +1 -0
  239. package/dist/components/toast.js +6 -6
  240. package/dist/components/toast.js.map +1 -1
  241. package/dist/components/video-message2.js +4 -2
  242. package/dist/components/video-message2.js.map +1 -1
  243. package/dist/esm/app-globals-2beecb81.js +36 -0
  244. package/dist/esm/app-globals-2beecb81.js.map +1 -0
  245. package/dist/esm/attachment-preview_22.entry.js +120 -42
  246. package/dist/esm/attachment-preview_22.entry.js.map +1 -1
  247. package/dist/esm/audio-bubble_4.entry.js +39 -9
  248. package/dist/esm/audio-bubble_4.entry.js.map +1 -1
  249. package/dist/esm/chat-app.entry.js +2 -2
  250. package/dist/esm/chat-app.entry.js.map +1 -1
  251. package/dist/esm/{chat-assets-e3173222.js → chat-assets-bb056958.js} +2 -2
  252. package/dist/esm/{chat-assets-e3173222.js.map → chat-assets-bb056958.js.map} +1 -1
  253. package/dist/esm/{chat-creds-5d0982fc.js → chat-creds-aafad4d0.js} +3 -3
  254. package/dist/esm/chat-creds-aafad4d0.js.map +1 -0
  255. package/dist/esm/chat-document-message-bubble.entry.js +1 -1
  256. package/dist/esm/chat-image-message-bubble.entry.js +1 -1
  257. package/dist/esm/chat-tile_3.entry.js +1 -1
  258. package/dist/esm/chat-video-message-bubble.entry.js +1 -1
  259. package/dist/esm/client-4a3e00da.js +477 -0
  260. package/dist/esm/client-4a3e00da.js.map +1 -0
  261. package/dist/esm/{contracts-614be4db.js → contracts-50f4ddae.js} +2 -2
  262. package/dist/esm/contracts-50f4ddae.js.map +1 -0
  263. package/dist/esm/destroy-chat-d0ee28d6.js +22 -0
  264. package/dist/esm/destroy-chat-d0ee28d6.js.map +1 -0
  265. package/dist/esm/doublecheck-261763ef.js +32 -0
  266. package/dist/esm/doublecheck-261763ef.js.map +1 -0
  267. package/dist/esm/{drawer-8f721119.js → drawer-74c188f1.js} +2 -2
  268. package/dist/esm/{drawer-8f721119.js.map → drawer-74c188f1.js.map} +1 -1
  269. package/dist/esm/forward-memebers.entry.js +3 -3
  270. package/dist/esm/forward-message.entry.js +2 -2
  271. package/dist/esm/group-chat-contacts.entry.js +2 -2
  272. package/dist/esm/{group-members-806fd7a2.js → group-members-05414da2.js} +2 -118
  273. package/dist/esm/group-members-05414da2.js.map +1 -0
  274. package/dist/esm/{groupcast-2ce7187f.js → groupcast-9c7d2a32.js} +2 -2
  275. package/dist/esm/{groupcast-2ce7187f.js.map → groupcast-9c7d2a32.js.map} +1 -1
  276. package/dist/esm/{helpers-4c6d09a7.js → helpers-f33b895c.js} +2 -2
  277. package/dist/esm/{helpers-4c6d09a7.js.map → helpers-f33b895c.js.map} +1 -1
  278. package/dist/esm/{index-beb184c6.js → index-4c865e34.js} +2 -2
  279. package/dist/esm/index-4c865e34.js.map +1 -0
  280. package/dist/esm/index.js +17 -171
  281. package/dist/esm/index.js.map +1 -1
  282. package/dist/esm/isometrik-webchat.js +10 -2
  283. package/dist/esm/isometrik-webchat.js.map +1 -1
  284. package/dist/esm/loader.js +10 -2
  285. package/dist/esm/loader.js.map +1 -1
  286. package/dist/esm/login-page_3.entry.js +691 -359
  287. package/dist/esm/login-page_3.entry.js.map +1 -1
  288. package/dist/esm/media-gallery.entry.js +1 -1
  289. package/dist/esm/media-limits-3fa07c09.js +152 -0
  290. package/dist/esm/media-limits-3fa07c09.js.map +1 -0
  291. package/dist/esm/member-add.entry.js +5 -5
  292. package/dist/esm/message-bubble.entry.js +30 -8
  293. package/dist/esm/message-bubble.entry.js.map +1 -1
  294. package/dist/esm/my-component.entry.js +1 -1
  295. package/dist/esm/new-chat-sidebar.entry.js +3 -3
  296. package/dist/esm/reaction-container.entry.js +4 -4
  297. package/dist/esm/runtime-controls-cf599fe2.js +623 -0
  298. package/dist/esm/runtime-controls-cf599fe2.js.map +1 -0
  299. package/dist/esm/send-media-917dcc2f.js +353 -0
  300. package/dist/esm/send-media-917dcc2f.js.map +1 -0
  301. package/dist/esm/signup-page.entry.js +1 -1
  302. package/dist/esm/{toast-d8ea763c.js → toast-533dd183.js} +8 -8
  303. package/dist/esm/toast-533dd183.js.map +1 -0
  304. package/dist/isometrik-webchat/index.esm.js +1 -1
  305. package/dist/isometrik-webchat/index.esm.js.map +1 -1
  306. package/dist/isometrik-webchat/isometrik-webchat.css +1 -1
  307. package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
  308. package/dist/isometrik-webchat/isometrik-webchat.esm.js.map +1 -1
  309. package/dist/isometrik-webchat/p-0731d488.js +2 -0
  310. package/dist/isometrik-webchat/p-0731d488.js.map +1 -0
  311. package/dist/isometrik-webchat/{p-a15092d9.entry.js → p-1854b156.entry.js} +2 -2
  312. package/dist/isometrik-webchat/p-1854b156.entry.js.map +1 -0
  313. package/dist/isometrik-webchat/{p-5fea3fd2.entry.js → p-2d3e8cd4.entry.js} +2 -2
  314. package/dist/isometrik-webchat/p-315eee9a.js +2 -0
  315. package/dist/isometrik-webchat/p-315eee9a.js.map +1 -0
  316. package/dist/isometrik-webchat/{p-e7f58d3f.entry.js → p-39b626ed.entry.js} +2 -2
  317. package/dist/isometrik-webchat/{p-eb1f3118.entry.js → p-3c70c22c.entry.js} +2 -2
  318. package/dist/isometrik-webchat/p-4cb54460.js +2 -0
  319. package/dist/isometrik-webchat/p-4cb54460.js.map +1 -0
  320. package/dist/isometrik-webchat/{p-f24cdbbb.js → p-5162774c.js} +1 -1
  321. package/dist/isometrik-webchat/p-5162774c.js.map +1 -0
  322. package/dist/isometrik-webchat/p-53ee98a7.entry.js +2 -0
  323. package/dist/isometrik-webchat/p-53ee98a7.entry.js.map +1 -0
  324. package/dist/isometrik-webchat/{p-5cbc1a16.entry.js → p-586f6978.entry.js} +2 -2
  325. package/dist/isometrik-webchat/{p-5f7eebbf.entry.js → p-5d243250.entry.js} +2 -2
  326. package/dist/isometrik-webchat/{p-23df1c24.js → p-5d98a8a0.js} +2 -2
  327. package/dist/isometrik-webchat/p-7f415f28.js +2 -0
  328. package/dist/isometrik-webchat/p-7f415f28.js.map +1 -0
  329. package/dist/isometrik-webchat/{p-d386acfe.js → p-7fd2c1ad.js} +1 -1
  330. package/dist/isometrik-webchat/p-7fd2c1ad.js.map +1 -0
  331. package/dist/isometrik-webchat/{p-e5884258.js → p-9982fa21.js} +2 -2
  332. package/dist/isometrik-webchat/{p-4db39c93.js → p-a5707f12.js} +2 -2
  333. package/dist/isometrik-webchat/{p-af775c83.entry.js → p-a876991d.entry.js} +2 -2
  334. package/dist/isometrik-webchat/{p-7b80b0b2.js → p-adc45831.js} +1 -1
  335. package/dist/isometrik-webchat/p-adc45831.js.map +1 -0
  336. package/dist/isometrik-webchat/p-ae168135.js +2 -0
  337. package/dist/isometrik-webchat/p-ae168135.js.map +1 -0
  338. package/dist/isometrik-webchat/{p-a6897edc.js → p-b1330793.js} +1 -1
  339. package/dist/isometrik-webchat/p-b1330793.js.map +1 -0
  340. package/dist/isometrik-webchat/p-b61d6c0c.entry.js +2 -0
  341. package/dist/isometrik-webchat/p-b61d6c0c.entry.js.map +1 -0
  342. package/dist/isometrik-webchat/p-b667a9fc.js +2 -0
  343. package/dist/isometrik-webchat/p-b667a9fc.js.map +1 -0
  344. package/dist/isometrik-webchat/p-b857775d.entry.js +2 -0
  345. package/dist/isometrik-webchat/p-bdcdf1c5.js +2 -0
  346. package/dist/isometrik-webchat/p-bdcdf1c5.js.map +1 -0
  347. package/dist/isometrik-webchat/p-c0c19621.entry.js +2 -0
  348. package/dist/isometrik-webchat/{p-064d6200.entry.js → p-ca47d693.entry.js} +2 -2
  349. package/dist/isometrik-webchat/p-d720cf14.entry.js +2 -0
  350. package/dist/isometrik-webchat/{p-53695fc6.entry.js.map → p-d720cf14.entry.js.map} +1 -1
  351. package/dist/isometrik-webchat/{p-5c22ee37.entry.js → p-d892b4d4.entry.js} +2 -2
  352. package/dist/isometrik-webchat/{p-7eb12da3.js → p-dd62bd69.js} +2 -2
  353. package/dist/isometrik-webchat/p-eb54f75d.js +2 -0
  354. package/dist/isometrik-webchat/p-eb54f75d.js.map +1 -0
  355. package/dist/isometrik-webchat/p-f1fbf3be.entry.js +2 -0
  356. package/dist/isometrik-webchat/p-f1fbf3be.entry.js.map +1 -0
  357. package/dist/isometrik-webchat/p-fb705915.entry.js +2 -0
  358. package/dist/isometrik-webchat/p-fb705915.entry.js.map +1 -0
  359. package/dist/isometrik-webchat/{p-2f6bb0a4.entry.js → p-fd6ce589.entry.js} +2 -2
  360. package/dist/isometrik-webchat/p-fdd327f5.entry.js +2 -0
  361. package/dist/types/components/ChatUIComponent/Footer/ChatFooter.d.ts +1 -0
  362. package/dist/types/components/ChatUIComponent/shared/attachment-preview/attachment-preview.d.ts +2 -0
  363. package/dist/types/components/ChatUIComponent/shared/document-message/document-message.d.ts +5 -0
  364. package/dist/types/components/ChatUIComponent/shared/image-message/image-message.d.ts +1 -0
  365. package/dist/types/components/ChatUIComponent/shared/message-bubble/message-bubble.d.ts +3 -0
  366. package/dist/types/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.d.ts +1 -0
  367. package/dist/types/components/ChatUIComponent/shared/video-message/video-message.d.ts +1 -0
  368. package/dist/types/components/my-component/web-chat/FLOW.d.ts +1 -1
  369. package/dist/types/components/my-component/web-chat/mqtt-host.d.ts +13 -0
  370. package/dist/types/components/my-component/web-chat/offline-host.d.ts +22 -0
  371. package/dist/types/components/theme-provider.d.ts +22 -27
  372. package/dist/types/components.d.ts +84 -11
  373. package/dist/types/demos/custom-ui-demo-elements.d.ts +1 -1
  374. package/dist/types/global/expose-sdk.d.ts +1 -0
  375. package/dist/types/index.d.ts +3 -44
  376. package/dist/types/lib/chat/index.d.ts +3 -0
  377. package/dist/types/lib/chat/media-limits.d.ts +11 -0
  378. package/dist/types/lib/chat/media-outbox.d.ts +8 -0
  379. package/dist/types/lib/chat/preview-kind.d.ts +30 -0
  380. package/dist/types/lib/custom-ui/contracts.d.ts +1 -1
  381. package/dist/types/lib/custom-ui/index.d.ts +1 -1
  382. package/dist/types/lib/custom-ui/public-api.d.ts +1 -1
  383. package/dist/types/lib/destroy-chat.d.ts +2 -0
  384. package/dist/types/lib/mqtt/inbound-queue.d.ts +7 -0
  385. package/dist/types/lib/mqtt/index.d.ts +2 -1
  386. package/dist/types/lib/mqtt/session.d.ts +22 -0
  387. package/dist/types/lib/offline/client.d.ts +44 -0
  388. package/dist/types/lib/offline/idb.d.ts +36 -0
  389. package/dist/types/lib/offline/index.d.ts +10 -0
  390. package/dist/types/lib/offline/memory-db.d.ts +20 -0
  391. package/dist/types/lib/offline/merge.d.ts +3 -0
  392. package/dist/types/lib/offline/multitab.d.ts +13 -0
  393. package/dist/types/lib/offline/types.d.ts +63 -0
  394. package/dist/types/sdk/api.d.ts +3 -0
  395. package/dist/types/sdk/composition.d.ts +32 -0
  396. package/dist/types/sdk/headless-api.d.ts +37 -0
  397. package/dist/types/sdk/index.d.ts +10 -0
  398. package/dist/types/sdk/init.d.ts +87 -0
  399. package/dist/types/sdk/instance.d.ts +15 -0
  400. package/dist/types/sdk/react-bridge.d.ts +64 -0
  401. package/dist/types/sdk/runtime-controls.d.ts +14 -0
  402. package/dist/types/sdk/slots.d.ts +15 -0
  403. package/dist/types/sdk/theme-tokens.d.ts +22 -0
  404. package/dist/types/sdk/webchat-api.d.ts +22 -0
  405. package/docs/ARCHITECTURE.md +272 -0
  406. package/docs/CUSTOMIZATION.md +236 -0
  407. package/docs/INTEGRATION.md +286 -0
  408. package/docs/RELIABILITY.md +51 -0
  409. package/docs/theme-tokens.template.css +72 -0
  410. package/package.json +8 -2
  411. package/readme.md +38 -17
  412. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  413. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  414. package/dist/cjs/chat-creds-cf537d4b.js.map +0 -1
  415. package/dist/cjs/contracts-31632812.js.map +0 -1
  416. package/dist/cjs/destroy-chat-be25dec7.js +0 -26
  417. package/dist/cjs/destroy-chat-be25dec7.js.map +0 -1
  418. package/dist/cjs/doublecheck-997afc94.js +0 -7
  419. package/dist/cjs/doublecheck-997afc94.js.map +0 -1
  420. package/dist/cjs/group-members-73ad1074.js.map +0 -1
  421. package/dist/cjs/index-1a26d11d.js.map +0 -1
  422. package/dist/cjs/toast-0bf1e688.js.map +0 -1
  423. package/dist/components/GroupCast.js.map +0 -1
  424. package/dist/components/groupcast2.js.map +0 -1
  425. package/dist/esm/app-globals-0f993ce5.js +0 -5
  426. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  427. package/dist/esm/chat-creds-5d0982fc.js.map +0 -1
  428. package/dist/esm/contracts-614be4db.js.map +0 -1
  429. package/dist/esm/destroy-chat-e2ebe165.js +0 -24
  430. package/dist/esm/destroy-chat-e2ebe165.js.map +0 -1
  431. package/dist/esm/doublecheck-5e208ef0.js +0 -5
  432. package/dist/esm/doublecheck-5e208ef0.js.map +0 -1
  433. package/dist/esm/group-members-806fd7a2.js.map +0 -1
  434. package/dist/esm/index-beb184c6.js.map +0 -1
  435. package/dist/esm/toast-d8ea763c.js.map +0 -1
  436. package/dist/isometrik-webchat/p-01fd0eb4.entry.js +0 -2
  437. package/dist/isometrik-webchat/p-01fd0eb4.entry.js.map +0 -1
  438. package/dist/isometrik-webchat/p-09fc122b.entry.js +0 -2
  439. package/dist/isometrik-webchat/p-09fc122b.entry.js.map +0 -1
  440. package/dist/isometrik-webchat/p-1c53e658.js +0 -2
  441. package/dist/isometrik-webchat/p-1c53e658.js.map +0 -1
  442. package/dist/isometrik-webchat/p-1df58381.entry.js +0 -2
  443. package/dist/isometrik-webchat/p-1df58381.entry.js.map +0 -1
  444. package/dist/isometrik-webchat/p-3c690532.entry.js +0 -2
  445. package/dist/isometrik-webchat/p-3c690532.entry.js.map +0 -1
  446. package/dist/isometrik-webchat/p-3c8cbd5f.js +0 -2
  447. package/dist/isometrik-webchat/p-3c8cbd5f.js.map +0 -1
  448. package/dist/isometrik-webchat/p-4e762019.js +0 -2
  449. package/dist/isometrik-webchat/p-4e762019.js.map +0 -1
  450. package/dist/isometrik-webchat/p-53695fc6.entry.js +0 -2
  451. package/dist/isometrik-webchat/p-7b80b0b2.js.map +0 -1
  452. package/dist/isometrik-webchat/p-9924b1bf.entry.js +0 -2
  453. package/dist/isometrik-webchat/p-a15092d9.entry.js.map +0 -1
  454. package/dist/isometrik-webchat/p-a6897edc.js.map +0 -1
  455. package/dist/isometrik-webchat/p-b2bf55b1.entry.js +0 -2
  456. package/dist/isometrik-webchat/p-bfecfa97.entry.js +0 -2
  457. package/dist/isometrik-webchat/p-d386acfe.js.map +0 -1
  458. package/dist/isometrik-webchat/p-e1255160.js +0 -2
  459. package/dist/isometrik-webchat/p-e1255160.js.map +0 -1
  460. package/dist/isometrik-webchat/p-f24cdbbb.js.map +0 -1
  461. /package/dist/isometrik-webchat/{p-5fea3fd2.entry.js.map → p-2d3e8cd4.entry.js.map} +0 -0
  462. /package/dist/isometrik-webchat/{p-e7f58d3f.entry.js.map → p-39b626ed.entry.js.map} +0 -0
  463. /package/dist/isometrik-webchat/{p-eb1f3118.entry.js.map → p-3c70c22c.entry.js.map} +0 -0
  464. /package/dist/isometrik-webchat/{p-5cbc1a16.entry.js.map → p-586f6978.entry.js.map} +0 -0
  465. /package/dist/isometrik-webchat/{p-5f7eebbf.entry.js.map → p-5d243250.entry.js.map} +0 -0
  466. /package/dist/isometrik-webchat/{p-23df1c24.js.map → p-5d98a8a0.js.map} +0 -0
  467. /package/dist/isometrik-webchat/{p-e5884258.js.map → p-9982fa21.js.map} +0 -0
  468. /package/dist/isometrik-webchat/{p-4db39c93.js.map → p-a5707f12.js.map} +0 -0
  469. /package/dist/isometrik-webchat/{p-af775c83.entry.js.map → p-a876991d.entry.js.map} +0 -0
  470. /package/dist/isometrik-webchat/{p-bfecfa97.entry.js.map → p-b857775d.entry.js.map} +0 -0
  471. /package/dist/isometrik-webchat/{p-9924b1bf.entry.js.map → p-c0c19621.entry.js.map} +0 -0
  472. /package/dist/isometrik-webchat/{p-064d6200.entry.js.map → p-ca47d693.entry.js.map} +0 -0
  473. /package/dist/isometrik-webchat/{p-5c22ee37.entry.js.map → p-d892b4d4.entry.js.map} +0 -0
  474. /package/dist/isometrik-webchat/{p-7eb12da3.js.map → p-dd62bd69.js.map} +0 -0
  475. /package/dist/isometrik-webchat/{p-2f6bb0a4.entry.js.map → p-fd6ce589.entry.js.map} +0 -0
  476. /package/dist/isometrik-webchat/{p-b2bf55b1.entry.js.map → p-fdd327f5.entry.js.map} +0 -0
@@ -21,6 +21,7 @@ const OutgoingTextMessageBubble = /*@__PURE__*/ proxyCustomElement(class Outgoin
21
21
  this.alignSelf = undefined;
22
22
  this.isRead = undefined;
23
23
  this.isDelivered = undefined;
24
+ this.deliveryStatus = undefined;
24
25
  this.textColor = undefined;
25
26
  this.mentionedUsers = [];
26
27
  this.messageType = undefined;
@@ -31,7 +32,7 @@ const OutgoingTextMessageBubble = /*@__PURE__*/ proxyCustomElement(class Outgoin
31
32
  this.fontFamily = 'var(--font-primary)';
32
33
  }
33
34
  render() {
34
- return (h("message-bubble", { key: '1eba216099413f5579f8dcc871fa228f71133bab', isSelf: true, time: this.time, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px' }, h("div", { key: 'dc3b6bd69568d2e2f31a0b6e0862b4b74916ec1f', style: { fontFamily: this.fontFamily, color: this.textColor, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, renderMessageBody(this.textContent, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), true))));
35
+ return (h("message-bubble", { key: '2cc678a3f9f3ce8b2b5192d12f42282809b774d0', isSelf: true, time: this.time, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, deliveryStatus: this.deliveryStatus, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px' }, h("div", { key: '07d5f13d5572d8e41cc87657457d0f1443f435cb', style: { fontFamily: this.fontFamily, color: this.textColor, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, renderMessageBody(this.textContent, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), true))));
35
36
  }
36
37
  static get style() { return ":host { display: block; max-width: 80%; margin-right: 10px; }"; }
37
38
  }, [1, "outgoing-text-message-bubble", {
@@ -48,6 +49,7 @@ const OutgoingTextMessageBubble = /*@__PURE__*/ proxyCustomElement(class Outgoin
48
49
  "alignSelf": [1, "align-self"],
49
50
  "isRead": [4, "is-read"],
50
51
  "isDelivered": [1, "is-delivered"],
52
+ "deliveryStatus": [1, "delivery-status"],
51
53
  "textColor": [1, "text-color"],
52
54
  "mentionedUsers": [16],
53
55
  "messageType": [2, "message-type"],
@@ -1 +1 @@
1
- {"file":"outgoing-text-message-bubble2.js","mappings":";;;;MAWa,yBAAyB;;;;;;;;;;4BAKL,MAAM;uBACX,MAAM;;;;2BAIF,EAAE;;;;;8BAKA,EAAE;;;yBAGY,EAAE;;;0BAGnB,qBAAqB;;IAKlD,MAAM;QACJ,QACE,uEACE,MAAM,EAAE,IAAI,EACZ,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,WAAW,EAAE,IAAI,CAAC,WAAW,KAAK,CAAC,EACnC,eAAe,EAAE,IAAI,CAAC,OAAO,EAC7B,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,MAAM,EACzC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,MAAM,IAE/B,4DAAK,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,IAChH,iBAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,CACnG,CACS,EACjB;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.tsx"],"sourcesContent":["import { Component, Prop, h, Event, EventEmitter } from '@stencil/core';\nimport '../message-bubble/message-bubble';\nimport { renderMessageBody, emitTagUser } from '../message-body-render/message-body-render';\n\n@Component({\n tag: 'outgoing-text-message-bubble',\n shadow: true,\n styles: `\n :host { display: block; max-width: 80%; margin-right: 10px; }\n `,\n})\nexport class OutgoingTextMessageBubble {\n @Prop() bgColor: string;\n @Prop() borderWidth: string;\n @Prop() borderColor: string;\n @Prop() borderStyle: string;\n @Prop() borderRadius: string = '10px';\n @Prop() padding: string = '10px';\n @Prop() height: string;\n @Prop() width: string;\n @Prop() time: string;\n @Prop() textContent: string = '';\n @Prop() alignSelf: string;\n @Prop() isRead: boolean;\n @Prop() isDelivered: string;\n @Prop() textColor: string;\n @Prop() mentionedUsers: any[] = [];\n @Prop() messageType: number;\n @Prop() timeColor: string;\n @Prop() reactions: Record<string, string[]> = {};\n @Prop() messageId: string;\n @Prop() userMetaData: any;\n @Prop() fontFamily: string = 'var(--font-primary)';\n\n @Event({ eventName: 'tagUserClick', bubbles: true, composed: true })\n tagUserClick: EventEmitter<{ userId?: string; userName?: string }>;\n\n render() {\n return (\n <message-bubble\n isSelf={true}\n time={this.time}\n timeColor={this.timeColor}\n isRead={this.isRead}\n isDelivered={this.isDelivered}\n reactions={this.reactions}\n messageId={this.messageId}\n userMetaData={this.userMetaData}\n isForwarded={this.messageType === 1}\n backgroundColor={this.bgColor}\n borderRadius={this.borderRadius || '10px'}\n padding={this.padding || '10px'}\n >\n <div style={{ fontFamily: this.fontFamily, color: this.textColor, whiteSpace: 'pre-wrap', wordBreak: 'break-word' }}>\n {renderMessageBody(this.textContent, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), true)}\n </div>\n </message-bubble>\n );\n }\n}\n"],"version":3}
1
+ {"file":"outgoing-text-message-bubble2.js","mappings":";;;;MAWa,yBAAyB;;;;;;;;;;4BAKL,MAAM;uBACX,MAAM;;;;2BAIF,EAAE;;;;;;8BAMA,EAAE;;;yBAGY,EAAE;;;0BAGnB,qBAAqB;;IAKlD,MAAM;QACJ,QACE,uEACE,MAAM,EAAE,IAAI,EACZ,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,WAAW,EAAE,IAAI,CAAC,WAAW,KAAK,CAAC,EACnC,eAAe,EAAE,IAAI,CAAC,OAAO,EAC7B,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,MAAM,EACzC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,MAAM,IAE/B,4DAAK,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,IAChH,iBAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,CACnG,CACS,EACjB;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.tsx"],"sourcesContent":["import { Component, Prop, h, Event, EventEmitter } from '@stencil/core';\nimport '../message-bubble/message-bubble';\nimport { renderMessageBody, emitTagUser } from '../message-body-render/message-body-render';\n\n@Component({\n tag: 'outgoing-text-message-bubble',\n shadow: true,\n styles: `\n :host { display: block; max-width: 80%; margin-right: 10px; }\n `,\n})\nexport class OutgoingTextMessageBubble {\n @Prop() bgColor: string;\n @Prop() borderWidth: string;\n @Prop() borderColor: string;\n @Prop() borderStyle: string;\n @Prop() borderRadius: string = '10px';\n @Prop() padding: string = '10px';\n @Prop() height: string;\n @Prop() width: string;\n @Prop() time: string;\n @Prop() textContent: string = '';\n @Prop() alignSelf: string;\n @Prop() isRead: boolean;\n @Prop() isDelivered: string;\n @Prop() deliveryStatus: string;\n @Prop() textColor: string;\n @Prop() mentionedUsers: any[] = [];\n @Prop() messageType: number;\n @Prop() timeColor: string;\n @Prop() reactions: Record<string, string[]> = {};\n @Prop() messageId: string;\n @Prop() userMetaData: any;\n @Prop() fontFamily: string = 'var(--font-primary)';\n\n @Event({ eventName: 'tagUserClick', bubbles: true, composed: true })\n tagUserClick: EventEmitter<{ userId?: string; userName?: string }>;\n\n render() {\n return (\n <message-bubble\n isSelf={true}\n time={this.time}\n timeColor={this.timeColor}\n isRead={this.isRead}\n isDelivered={this.isDelivered}\n deliveryStatus={this.deliveryStatus}\n reactions={this.reactions}\n messageId={this.messageId}\n userMetaData={this.userMetaData}\n isForwarded={this.messageType === 1}\n backgroundColor={this.bgColor}\n borderRadius={this.borderRadius || '10px'}\n padding={this.padding || '10px'}\n >\n <div style={{ fontFamily: this.fontFamily, color: this.textColor, whiteSpace: 'pre-wrap', wordBreak: 'break-word' }}>\n {renderMessageBody(this.textContent, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), true)}\n </div>\n </message-bubble>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,30 @@
1
+ /** Pure helpers for attachment / document preview routing (unit-tested). */
2
+ function isPdfAttachment(input) {
3
+ var _a, _b;
4
+ const mime = (input.mimeType || ((_a = input.file) === null || _a === void 0 ? void 0 : _a.type) || '').toLowerCase();
5
+ const name = (input.name || ((_b = input.file) === null || _b === void 0 ? void 0 : _b.name) || '').toLowerCase();
6
+ return mime.includes('pdf') || name.endsWith('.pdf');
7
+ }
8
+ /** Mirrors message-bubble outbox / tick UI decisions. */
9
+ function deliveryUiState(opts) {
10
+ if (!opts.isSelf)
11
+ return { label: null, tick: 'sent' };
12
+ const status = (opts.deliveryStatus || '').toLowerCase();
13
+ if (status === 'failed' || opts.isDelivered === 'failed') {
14
+ return { label: 'Failed', tick: 'failed' };
15
+ }
16
+ if (status === 'outbox')
17
+ return { label: 'Queued', tick: 'clock' };
18
+ if (status === 'sending' || opts.isDelivered === 'pending') {
19
+ return { label: status === 'sending' ? 'Sending' : null, tick: 'clock' };
20
+ }
21
+ if (opts.isRead === true)
22
+ return { label: null, tick: 'read' };
23
+ if (opts.isDelivered === true || opts.isDelivered === 'true')
24
+ return { label: null, tick: 'delivered' };
25
+ return { label: null, tick: 'sent' };
26
+ }
27
+
28
+ export { deliveryUiState as d, isPdfAttachment as i };
29
+
30
+ //# sourceMappingURL=preview-kind.js.map
@@ -0,0 +1 @@
1
+ {"file":"preview-kind.js","mappings":"AAAA;SAEgB,eAAe,CAAC,KAI/B;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KAAK,MAAM;QAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IACxG,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACvC;;;;","names":[],"sources":["src/lib/chat/preview-kind.ts"],"sourcesContent":["/** Pure helpers for attachment / document preview routing (unit-tested). */\n\nexport function isPdfAttachment(input: {\n mimeType?: string;\n name?: string;\n file?: { type?: string; name?: string };\n}): boolean {\n const mime = (input.mimeType || input.file?.type || '').toLowerCase();\n const name = (input.name || input.file?.name || '').toLowerCase();\n return mime.includes('pdf') || name.endsWith('.pdf');\n}\n\nexport type PreviewKind = 'image' | 'video' | 'audio' | 'pdf' | 'file';\n\nexport function previewKindFromAttachment(input: {\n type?: string;\n mimeType?: string;\n name?: string;\n file?: { type?: string; name?: string };\n}): PreviewKind {\n if (isPdfAttachment(input)) return 'pdf';\n const mime = (input.mimeType || input.file?.type || '').toLowerCase();\n const type = (input.type || mime.split('/')[0] || '').toLowerCase();\n if (type === 'image' || mime.startsWith('image/')) return 'image';\n if (type === 'video' || mime.startsWith('video/')) return 'video';\n if (type === 'audio' || mime.startsWith('audio/')) return 'audio';\n return 'file';\n}\n\nexport type DeliveryUi = {\n label: 'Queued' | 'Sending' | 'Failed' | null;\n tick: 'clock' | 'failed' | 'read' | 'delivered' | 'sent';\n};\n\n/** Mirrors message-bubble outbox / tick UI decisions. */\nexport function deliveryUiState(opts: {\n isSelf?: boolean;\n deliveryStatus?: string;\n isDelivered?: string | boolean;\n isRead?: boolean;\n}): DeliveryUi {\n if (!opts.isSelf) return { label: null, tick: 'sent' };\n const status = (opts.deliveryStatus || '').toLowerCase();\n if (status === 'failed' || opts.isDelivered === 'failed') {\n return { label: 'Failed', tick: 'failed' };\n }\n if (status === 'outbox') return { label: 'Queued', tick: 'clock' };\n if (status === 'sending' || opts.isDelivered === 'pending') {\n return { label: status === 'sending' ? 'Sending' : null, tick: 'clock' };\n }\n if (opts.isRead === true) return { label: null, tick: 'read' };\n if (opts.isDelivered === true || opts.isDelivered === 'true') return { label: null, tick: 'delivered' };\n return { label: null, tick: 'sent' };\n}\n"],"version":3}
@@ -42,12 +42,12 @@ const ReactionContainer$1 = /*@__PURE__*/ proxyCustomElement(class ReactionConta
42
42
  render() {
43
43
  var _a;
44
44
  const tabs = (this.reactions || []).map(item => (Object.assign(Object.assign({}, item), { messageId: Array.isArray(item.messageId) ? item.messageId[0] : item.messageId })));
45
- return (h("div", { key: '5457793a4a1297b68759ef34e5b08fcf19ee462a', class: "reactions-container", style: {
45
+ return (h("div", { key: 'e76cc34af57ee0899200efe26b3bbd683ea6e75c', class: "reactions-container", style: {
46
46
  backgroundColor: 'var(--bg-secondary-color)',
47
47
  borderRadius: '10px',
48
48
  color: 'var(--text-primary-color)',
49
49
  fontSize: '20px',
50
- } }, h("div", { key: 'a73a9f1da768d24ad1883cd50bad95c319a3a9e0', class: "reactions-tab-container" }, tabs.map(data => (h("button", { type: "button", class: `emoji-tab ${this.selectedEmojiId === data.emojiId ? 'selected' : ''}`, onClick: () => this.handleReactionTabClick(data.emojiId) }, data.src || data.emojiId)))), h("div", { key: 'e064af2b5fbafc08ee263451b61e336cd1644cc8', class: "reactions-list-container" }, this.selectedEmojiId && ((_a = this.reactionUsers) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (this.reactionUsers.map(user => {
50
+ } }, h("div", { key: '99432de95e0c03ec5e588826e57ff490098a9a64', class: "reactions-tab-container" }, tabs.map(data => (h("button", { type: "button", class: `emoji-tab ${this.selectedEmojiId === data.emojiId ? 'selected' : ''}`, onClick: () => this.handleReactionTabClick(data.emojiId) }, data.src || data.emojiId)))), h("div", { key: 'eb1cbb408175b91e039e13f26e151ca4b6778fd2', class: "reactions-list-container" }, this.selectedEmojiId && ((_a = this.reactionUsers) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (this.reactionUsers.map(user => {
51
51
  var _a;
52
52
  return (h("div", { class: "user-row" }, user.userProfileImageUrl ? (h("img", { class: "avatar", src: user.userProfileImageUrl, alt: "" })) : (h("div", { class: "avatar" })), h("span", { style: { fontSize: '14px' } }, user.userId === ((_a = this.userMetaData) === null || _a === void 0 ? void 0 : _a.userId) ? 'You' : user.userName)));
53
53
  })) : (h("div", { class: "hint" }, "Tap on any tab to see list")))));
@@ -56,7 +56,7 @@ const ReplyMessageContainer = /*@__PURE__*/ proxyCustomElement(class ReplyMessag
56
56
  render() {
57
57
  const parentBody = this.parentMessageBody || this.parentmessageBody || this.repliedMessage || '';
58
58
  const parentName = this.parentMessageSenderName || this.senderName || 'Reply';
59
- return (h("message-bubble", { key: 'ee12ad6d5f9a7b50212dd8e4eca8a9a5834001da', isSelf: !!this.isSelf, time: this.messageTime, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, backgroundColor: this.backgroundColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover }, h("div", { key: 'b06be77b9e414c369857d24087af0186694dbd7e', class: "quote", onClick: e => { var _a; return (_a = this.onMediaClick) === null || _a === void 0 ? void 0 : _a.call(this, e); } }, h("div", { key: '4314f7d16b2a8f84304976af6ab58606fd01758a', class: "quote-sender" }, parentName), h("div", { key: 'dc4c480e0ed2f3887b155c27a747a511eacba498', class: "quote-body" }, parentBody), this.parentMessageMediaUrl ? (h("img", { class: "quote-media", src: this.parentMessageMediaUrl, alt: "" })) : null), h("div", { key: '6b1dac9d328314ac4797cd40bf4d6c1bff84639e', class: "reply-body", style: { color: this.color, fontSize: this.fontSize, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, this.messageBody)));
59
+ return (h("message-bubble", { key: '19d3d2dbd694b65061f9c1c625827a732636eee3', isSelf: !!this.isSelf, time: this.messageTime, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, backgroundColor: this.backgroundColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover }, h("div", { key: 'c1d4c598c474602a6cd60ed4b3b7299c262481ed', class: "quote", onClick: e => { var _a; return (_a = this.onMediaClick) === null || _a === void 0 ? void 0 : _a.call(this, e); } }, h("div", { key: 'ae9d571587c21542aaa7d299d68896730c59d519', class: "quote-sender" }, parentName), h("div", { key: '2c7e75a12de5dea06f8c9e90d957bf2d077f89a3', class: "quote-body" }, parentBody), this.parentMessageMediaUrl ? (h("img", { class: "quote-media", src: this.parentMessageMediaUrl, alt: "" })) : null), h("div", { key: 'fdfdd4fffe9e2da10ea7b22f30f8ed2ffd55713b', class: "reply-body", style: { color: this.color, fontSize: this.fontSize, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, this.messageBody)));
60
60
  }
61
61
  static get style() { return ":host { display: block; }\n .quote {\n border-left: 3px solid var(--brand);\n background: var(--hover-overlay);\n border-radius: 6px;\n padding: 6px 8px;\n margin-bottom: 6px;\n font-size: 12px;\n max-width: 100%;\n width: 100%;\n box-sizing: border-box;\n text-align: left;\n }\n .quote-sender { font-weight: 600; margin-bottom: 2px; color: var(--brand); }\n .quote-body { opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .quote-media { max-width: 120px; max-height: 80px; border-radius: 6px; margin-top: 4px; object-fit: cover; }\n .reply-body { width: 100%; text-align: left; }"; }
62
62
  }, [1, "reply-message-container", {
@@ -1,103 +1,115 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+ import { a as applyThemeObjectToElement, n as normalizeThemeObject } from './theme-tokens.js';
2
3
 
3
4
  const ThemeProvider = /*@__PURE__*/ proxyCustomElement(class ThemeProvider extends HTMLElement {
4
5
  constructor() {
5
6
  super();
6
7
  this.__registerHost();
7
8
  this.__attachShadow();
9
+ this.stylesheetId = `isometrik-theme-stylesheet-${Math.random().toString(36).slice(2, 9)}`;
8
10
  this.themePath = undefined;
9
11
  this.mode = 'light';
12
+ this.themeObject = undefined;
13
+ this.mirrorToDocument = false;
10
14
  this.styleElement = null;
11
15
  }
12
- /**
13
- * Watch for changes to the theme path and update the stylesheet
14
- */
15
16
  handleThemePathChange(newPath) {
16
17
  if (newPath) {
17
18
  this.loadThemeFromPath(newPath);
18
19
  }
19
20
  }
20
- /**
21
- * Watch for changes to theme mode
22
- */
23
21
  handleModeChange(newMode) {
24
22
  this.updateThemeClass(newMode);
25
23
  }
26
- /**
27
- * Component lifecycle method that runs once after the component is first connected to the DOM
28
- */
24
+ handleThemeObjectChange(next) {
25
+ this.applyThemeObject(next);
26
+ }
27
+ handleMirrorChange() {
28
+ this.updateThemeClass(this.mode);
29
+ }
29
30
  componentDidLoad() {
30
- // Load theme from path if provided
31
31
  if (this.themePath) {
32
32
  this.loadThemeFromPath(this.themePath);
33
33
  }
34
- // Set initial theme class
35
34
  this.updateThemeClass(this.mode);
35
+ this.applyThemeObject(this.themeObject);
36
36
  }
37
- /**
38
- * Update the theme class on the document body
39
- */
37
+ disconnectedCallback() {
38
+ var _a;
39
+ if ((_a = this.styleElement) === null || _a === void 0 ? void 0 : _a.parentNode) {
40
+ this.styleElement.parentNode.removeChild(this.styleElement);
41
+ this.styleElement = null;
42
+ }
43
+ if (this.mirrorToDocument) {
44
+ document.documentElement.classList.remove('theme-light', 'theme-dark');
45
+ }
46
+ }
47
+ applyThemeObject(theme) {
48
+ applyThemeObjectToElement(this.hostElement, theme || null);
49
+ }
50
+ /** Mode class on this host only — CSS vars inherit into <web-chat> shadow. */
40
51
  updateThemeClass(mode) {
41
- // Remove existing theme classes
42
- document.documentElement.classList.remove('theme-light', 'theme-dark');
43
- // Add the appropriate class
44
- document.documentElement.classList.add(`theme-${mode}`);
45
- // Dispatch a theme change event
46
- const themeChangeEvent = new CustomEvent('themechange', {
47
- detail: { mode },
52
+ this.hostElement.classList.remove('theme-light', 'theme-dark');
53
+ this.hostElement.classList.add(`theme-${mode}`);
54
+ if (this.mirrorToDocument) {
55
+ document.documentElement.classList.remove('theme-light', 'theme-dark');
56
+ document.documentElement.classList.add(`theme-${mode}`);
57
+ }
58
+ this.hostElement.dispatchEvent(new CustomEvent('themechange', {
59
+ detail: { mode, scoped: !this.mirrorToDocument },
48
60
  bubbles: true,
49
- composed: true
50
- });
51
- this.hostElement.dispatchEvent(themeChangeEvent);
61
+ composed: true,
62
+ }));
52
63
  }
53
- /**
54
- * Load a theme from a CSS file path
55
- */
56
64
  loadThemeFromPath(path) {
57
- // Remove any existing stylesheet if it exists
58
- if (this.styleElement) {
59
- document.head.removeChild(this.styleElement);
65
+ var _a;
66
+ if ((_a = this.styleElement) === null || _a === void 0 ? void 0 : _a.parentNode) {
67
+ this.styleElement.parentNode.removeChild(this.styleElement);
60
68
  }
61
- // Create a new link element for the CSS file
62
69
  this.styleElement = document.createElement('link');
63
70
  this.styleElement.rel = 'stylesheet';
64
71
  this.styleElement.href = path;
65
- // Add an ID to make it easier to find and remove later if needed
66
- this.styleElement.id = 'isometrik-theme-stylesheet';
67
- // Append the stylesheet to the document head
72
+ this.styleElement.id = this.stylesheetId;
73
+ this.styleElement.setAttribute('data-isometrik-theme', '1');
68
74
  document.head.appendChild(this.styleElement);
69
75
  }
70
- /**
71
- * Public method to toggle between light and dark themes
72
- */
73
76
  async toggleTheme() {
74
77
  this.mode = this.mode === 'light' ? 'dark' : 'light';
75
78
  return this.mode;
76
79
  }
77
- /**
78
- * Public method to set theme explicitly
79
- */
80
80
  async setTheme(mode) {
81
81
  this.mode = mode;
82
82
  return this.mode;
83
83
  }
84
+ async setThemeObject(theme) {
85
+ const normalized = normalizeThemeObject(theme || undefined);
86
+ applyThemeObjectToElement(this.hostElement, normalized);
87
+ return normalized;
88
+ }
84
89
  render() {
85
- return (h("div", { key: '437b7df4e9fb82384b7c7eedf6438fd3585f3827', class: `theme-provider-container theme-${this.mode}` }, h("slot", { key: '43c375abcf9c6bcbed267a5a436ab1bc329933d6' })));
90
+ return (h("div", { key: 'eda588f5d70658cdbb4d2c112b87e967e26851f4', class: `theme-provider-container theme-${this.mode}` }, h("slot", { key: '1c0c507b5f4380353fb5af4332f1873eecd84d5c' })));
86
91
  }
87
92
  get hostElement() { return this; }
88
93
  static get watchers() { return {
89
94
  "themePath": ["handleThemePathChange"],
90
- "mode": ["handleModeChange"]
95
+ "mode": ["handleModeChange"],
96
+ "themeObject": ["handleThemeObjectChange"],
97
+ "mirrorToDocument": ["handleMirrorChange"]
91
98
  }; }
92
99
  }, [1, "theme-provider", {
93
100
  "themePath": [1, "theme-path"],
94
101
  "mode": [1537],
102
+ "themeObject": [16],
103
+ "mirrorToDocument": [4, "mirror-to-document"],
95
104
  "styleElement": [32],
96
105
  "toggleTheme": [64],
97
- "setTheme": [64]
106
+ "setTheme": [64],
107
+ "setThemeObject": [64]
98
108
  }, undefined, {
99
109
  "themePath": ["handleThemePathChange"],
100
- "mode": ["handleModeChange"]
110
+ "mode": ["handleModeChange"],
111
+ "themeObject": ["handleThemeObjectChange"],
112
+ "mirrorToDocument": ["handleMirrorChange"]
101
113
  }]);
102
114
  function defineCustomElement() {
103
115
  if (typeof customElements === "undefined") {
@@ -1 +1 @@
1
- {"file":"theme-provider2.js","mappings":";;MAMa,aAAa;;;;;;oBAWyC,OAAO;4BAKxB,IAAI;;;;;IAMpD,qBAAqB,CAAC,OAAe;QACnC,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;SACjC;KACF;;;;IAMD,gBAAgB,CAAC,OAAyB;QACxC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;KAChC;;;;IAKD,gBAAgB;;QAEd,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACxC;;QAGD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAClC;;;;IAKO,gBAAgB,CAAC,IAAsB;;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Aa,CACT,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/theme-provider.tsx"],"sourcesContent":["import { Component, Prop, h, State, Watch, Element, Method } from '@stencil/core';\n\n@Component({\n tag: 'theme-provider',\n shadow: true,\n})\nexport class ThemeProvider {\n @Element() hostElement: HTMLElement;\n \n /**\n * Path to the CSS theme file\n */\n @Prop() themePath: string;\n \n /**\n * Current theme mode\n */\n @Prop({ mutable: true, reflect: true }) mode: 'light' | 'dark' = 'light';\n \n /**\n * Internal stylesheet element reference\n */\n @State() styleElement: HTMLLinkElement | null = null;\n \n /**\n * Watch for changes to the theme path and update the stylesheet\n */\n @Watch('themePath')\n handleThemePathChange(newPath: string) {\n if (newPath) {\n this.loadThemeFromPath(newPath);\n }\n }\n \n /**\n * Watch for changes to theme mode\n */\n @Watch('mode')\n handleModeChange(newMode: 'light' | 'dark') {\n this.updateThemeClass(newMode);\n }\n \n /**\n * Component lifecycle method that runs once after the component is first connected to the DOM\n */\n componentDidLoad() {\n // Load theme from path if provided\n if (this.themePath) {\n this.loadThemeFromPath(this.themePath);\n }\n \n // Set initial theme class\n this.updateThemeClass(this.mode);\n }\n \n /**\n * Update the theme class on the document body\n */\n private updateThemeClass(mode: 'light' | 'dark') {\n // Remove existing theme classes\n document.documentElement.classList.remove('theme-light', 'theme-dark');\n \n // Add the appropriate class\n document.documentElement.classList.add(`theme-${mode}`);\n \n // Dispatch a theme change event\n const themeChangeEvent = new CustomEvent('themechange', {\n detail: { mode },\n bubbles: true,\n composed: true\n });\n this.hostElement.dispatchEvent(themeChangeEvent);\n }\n \n /**\n * Load a theme from a CSS file path\n */\n private loadThemeFromPath(path: string) {\n // Remove any existing stylesheet if it exists\n if (this.styleElement) {\n document.head.removeChild(this.styleElement);\n }\n \n // Create a new link element for the CSS file\n this.styleElement = document.createElement('link');\n this.styleElement.rel = 'stylesheet';\n this.styleElement.href = path;\n \n // Add an ID to make it easier to find and remove later if needed\n this.styleElement.id = 'isometrik-theme-stylesheet';\n \n // Append the stylesheet to the document head\n document.head.appendChild(this.styleElement);\n }\n \n /**\n * Public method to toggle between light and dark themes\n */\n @Method()\n async toggleTheme() {\n this.mode = this.mode === 'light' ? 'dark' : 'light';\n return this.mode;\n }\n \n /**\n * Public method to set theme explicitly\n */\n @Method()\n async setTheme(mode: 'light' | 'dark') {\n this.mode = mode;\n return this.mode;\n }\n \n render() {\n return (\n <div class={`theme-provider-container theme-${this.mode}`}>\n <slot></slot>\n </div>\n );\n }\n}"],"version":3}
1
+ {"file":"theme-provider2.js","mappings":";;;MAOa,aAAa;;;;;QAuBhB,iBAAY,GAAG,8BAA8B,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;;oBAhB7B,OAAO;;gCAYpC,KAAK;4BAEO,IAAI;;IAKpD,qBAAqB,CAAC,OAAe;QACnC,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;SACjC;KACF;IAGD,gBAAgB,CAAC,OAAyB;QACxC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;KAChC;IAGD,uBAAuB,CAAC,IAAgC;QACtD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;KAC7B;IAGD,kBAAkB;QAChB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAClC;IAED,gBAAgB;QACd,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACxC;QACD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KACzC;IAED,oBAAoB;;QAClB,IAAI,MAAA,IAAI,CAAC,YAAY,0CAA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Y,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,YAAY,CAAC,GAAG,GAAG,YAAY,CAAC;QACrC,IAAI,CAAC,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,YAAY,CAAC,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;QAC5D,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC9C;IAGD,MAAM,WAAW;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;QACrD,OAAO,IAAI,CAAC,IAAI,CAAC;KAClB;IAGD,MAAM,QAAQ,CAAC,IAAsB;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC,IAAI,CAAC;KAClB;IAGD,MAAM,cAAc,CAAC,KAAuC;QAC1D,MAAM,UAAU,GAAG,oBAAoB,CAAC,KAAK,IAAI,SAAS,CAAC,CAAC;QAC5D,yBAAyB,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACxD,OAAO,UAAU,CAAC;KACnB;IAED,MAAM;QACJ,QACE,4DAAK,KAAK,EAAE,kCAAkC,IAAI,CAAC,IAAI,EAAE,IACvD,8DAAa,CACT,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/theme-provider.tsx"],"sourcesContent":["import { Component, Prop, h, State, Watch, Element, Method } from '@stencil/core';\nimport { applyThemeObjectToElement, normalizeThemeObject } from '../sdk/theme-tokens';\n\n@Component({\n tag: 'theme-provider',\n shadow: true,\n})\nexport class ThemeProvider {\n @Element() hostElement: HTMLElement;\n\n /** Path / URL to a CSS theme file (CDN or local). */\n @Prop() themePath: string;\n\n /** light | dark — drives `.theme-*` class on this host only (scoped). */\n @Prop({ mutable: true, reflect: true }) mode: 'light' | 'dark' = 'light';\n\n /**\n * Inline CSS variable overrides. Keys may be `--brand` or `brand`.\n * Applied on this host so values inherit into nested shadow trees.\n */\n @Prop() themeObject?: { [key: string]: string };\n\n /**\n * When true, also mirror mode onto <html> (legacy). Default false so\n * embeds do not restyle the host page or fight sibling chats.\n */\n @Prop() mirrorToDocument: boolean = false;\n\n @State() styleElement: HTMLLinkElement | null = null;\n\n private stylesheetId = `isometrik-theme-stylesheet-${Math.random().toString(36).slice(2, 9)}`;\n\n @Watch('themePath')\n handleThemePathChange(newPath: string) {\n if (newPath) {\n this.loadThemeFromPath(newPath);\n }\n }\n\n @Watch('mode')\n handleModeChange(newMode: 'light' | 'dark') {\n this.updateThemeClass(newMode);\n }\n\n @Watch('themeObject')\n handleThemeObjectChange(next?: { [key: string]: string }) {\n this.applyThemeObject(next);\n }\n\n @Watch('mirrorToDocument')\n handleMirrorChange() {\n this.updateThemeClass(this.mode);\n }\n\n componentDidLoad() {\n if (this.themePath) {\n this.loadThemeFromPath(this.themePath);\n }\n this.updateThemeClass(this.mode);\n this.applyThemeObject(this.themeObject);\n }\n\n disconnectedCallback() {\n if (this.styleElement?.parentNode) {\n this.styleElement.parentNode.removeChild(this.styleElement);\n this.styleElement = null;\n }\n if (this.mirrorToDocument) {\n document.documentElement.classList.remove('theme-light', 'theme-dark');\n }\n }\n\n private applyThemeObject(theme?: { [key: string]: string }) {\n applyThemeObjectToElement(this.hostElement, theme || null);\n }\n\n /** Mode class on this host only — CSS vars inherit into <web-chat> shadow. */\n private updateThemeClass(mode: 'light' | 'dark') {\n this.hostElement.classList.remove('theme-light', 'theme-dark');\n this.hostElement.classList.add(`theme-${mode}`);\n\n if (this.mirrorToDocument) {\n document.documentElement.classList.remove('theme-light', 'theme-dark');\n document.documentElement.classList.add(`theme-${mode}`);\n }\n\n this.hostElement.dispatchEvent(\n new CustomEvent('themechange', {\n detail: { mode, scoped: !this.mirrorToDocument },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private loadThemeFromPath(path: string) {\n if (this.styleElement?.parentNode) {\n this.styleElement.parentNode.removeChild(this.styleElement);\n }\n\n this.styleElement = document.createElement('link');\n this.styleElement.rel = 'stylesheet';\n this.styleElement.href = path;\n this.styleElement.id = this.stylesheetId;\n this.styleElement.setAttribute('data-isometrik-theme', '1');\n document.head.appendChild(this.styleElement);\n }\n\n @Method()\n async toggleTheme() {\n this.mode = this.mode === 'light' ? 'dark' : 'light';\n return this.mode;\n }\n\n @Method()\n async setTheme(mode: 'light' | 'dark') {\n this.mode = mode;\n return this.mode;\n }\n\n @Method()\n async setThemeObject(theme: { [key: string]: string } | null) {\n const normalized = normalizeThemeObject(theme || undefined);\n applyThemeObjectToElement(this.hostElement, normalized);\n return normalized;\n }\n\n render() {\n return (\n <div class={`theme-provider-container theme-${this.mode}`}>\n <slot></slot>\n </div>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Public theme token catalog for host apps.
3
+ * Pass values via initializeIsometrikWebchat({ theme: { ... } }) or a CSS file (themeUrl).
4
+ *
5
+ * Apply order: package defaults → themeUrl stylesheet → theme object (wins).
6
+ *
7
+ * Legacy aliases (*-color) still appear in older UI; set both when overriding colors
8
+ * if you need full coverage until those call sites are normalized.
9
+ */
10
+ const THEME_TOKEN_NAMES = [
11
+ // Typography
12
+ '--font-primary',
13
+ '--text-2',
14
+ '--text-4',
15
+ '--text-6',
16
+ '--text-8',
17
+ '--text-10',
18
+ '--text-12',
19
+ '--text-14',
20
+ '--text-16',
21
+ '--text-18',
22
+ '--text-20',
23
+ '--text-22',
24
+ '--text-24',
25
+ '--fw-400',
26
+ '--fw-500',
27
+ '--fw-600',
28
+ '--fw-700',
29
+ // Surfaces
30
+ '--bg-primary',
31
+ '--bg-secondary',
32
+ '--bg-tertiary',
33
+ '--bg-input',
34
+ '--bg-row-hover',
35
+ // Text
36
+ '--text-primary',
37
+ '--text-secondary',
38
+ '--text-tertiary',
39
+ '--text-on-brand',
40
+ // Brand
41
+ '--brand',
42
+ '--brand-soft',
43
+ '--brand-muted',
44
+ // Borders / status / chrome
45
+ '--border',
46
+ '--border-subtle',
47
+ '--success',
48
+ '--danger',
49
+ '--hover-overlay',
50
+ '--overlay',
51
+ '--focus-ring',
52
+ '--icon',
53
+ '--svg-icon-filter',
54
+ // Layout helpers hosts sometimes tweak
55
+ '--rail-width',
56
+ '--control',
57
+ '--avatar',
58
+ '--rounded-8',
59
+ '--rounded-12',
60
+ '--rounded-full',
61
+ // Legacy aliases still referenced by some components
62
+ '--bg-primary-color',
63
+ '--bg-secondary-color',
64
+ '--bg-primary-light',
65
+ '--text-primary-color',
66
+ '--text-secondary-color',
67
+ '--text-tertiary-color',
68
+ '--text-success-color',
69
+ '--text-danger-color',
70
+ '--text-warning-color',
71
+ '--text-info-color',
72
+ '--text-last-seen',
73
+ ];
74
+ /** Map short keys → canonical CSS vars (hosts may omit the leading --). */
75
+ function normalizeThemeObject(input) {
76
+ if (!input)
77
+ return {};
78
+ const out = {};
79
+ for (const [rawKey, value] of Object.entries(input)) {
80
+ if (value == null || value === '')
81
+ continue;
82
+ const key = rawKey.startsWith('--') ? rawKey : `--${rawKey}`;
83
+ out[key] = value;
84
+ }
85
+ return out;
86
+ }
87
+ /**
88
+ * Apply theme object as inline CSS variables on a host element.
89
+ * Scoped to the chat root so multiple embeds don't fight over <html>.
90
+ */
91
+ function applyThemeObjectToElement(el, theme) {
92
+ if (!el || !theme)
93
+ return;
94
+ const normalized = normalizeThemeObject(theme);
95
+ for (const [key, value] of Object.entries(normalized)) {
96
+ el.style.setProperty(key, value);
97
+ }
98
+ }
99
+
100
+ export { THEME_TOKEN_NAMES as T, applyThemeObjectToElement as a, normalizeThemeObject as n };
101
+
102
+ //# sourceMappingURL=theme-tokens.js.map
@@ -0,0 +1 @@
1
+ {"file":"theme-tokens.js","mappings":"AAAA;;;;;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C,EAClC,KAAqC;IAErC,IAAI,CAAC,EAAE,IAAI,CAAC,KAAK;QAAE,OAAO;IAC1B,MAAM,UAAU,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC/C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QACrD,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;KAClC;AACH;;;;","names":[],"sources":["src/sdk/theme-tokens.ts"],"sourcesContent":["/**\n * Public theme token catalog for host apps.\n * Pass values via initializeIsometrikWebchat({ theme: { ... } }) or a CSS file (themeUrl).\n *\n * Apply order: package defaults → themeUrl stylesheet → theme object (wins).\n *\n * Legacy aliases (*-color) still appear in older UI; set both when overriding colors\n * if you need full coverage until those call sites are normalized.\n */\n\nexport const THEME_TOKEN_NAMES = [\n // Typography\n '--font-primary',\n '--text-2',\n '--text-4',\n '--text-6',\n '--text-8',\n '--text-10',\n '--text-12',\n '--text-14',\n '--text-16',\n '--text-18',\n '--text-20',\n '--text-22',\n '--text-24',\n '--fw-400',\n '--fw-500',\n '--fw-600',\n '--fw-700',\n\n // Surfaces\n '--bg-primary',\n '--bg-secondary',\n '--bg-tertiary',\n '--bg-input',\n '--bg-row-hover',\n\n // Text\n '--text-primary',\n '--text-secondary',\n '--text-tertiary',\n '--text-on-brand',\n\n // Brand\n '--brand',\n '--brand-soft',\n '--brand-muted',\n\n // Borders / status / chrome\n '--border',\n '--border-subtle',\n '--success',\n '--danger',\n '--hover-overlay',\n '--overlay',\n '--focus-ring',\n '--icon',\n '--svg-icon-filter',\n\n // Layout helpers hosts sometimes tweak\n '--rail-width',\n '--control',\n '--avatar',\n '--rounded-8',\n '--rounded-12',\n '--rounded-full',\n\n // Legacy aliases still referenced by some components\n '--bg-primary-color',\n '--bg-secondary-color',\n '--bg-primary-light',\n '--text-primary-color',\n '--text-secondary-color',\n '--text-tertiary-color',\n '--text-success-color',\n '--text-danger-color',\n '--text-warning-color',\n '--text-info-color',\n '--text-last-seen',\n] as const;\n\nexport type ThemeTokenName = (typeof THEME_TOKEN_NAMES)[number];\n\n/** Host-provided overrides. Keys should be CSS custom property names (with leading --). */\nexport type ThemeTokenMap = Partial<Record<ThemeTokenName, string>> & {\n [cssVar: `--${string}`]: string | undefined;\n};\n\n/** Map short keys → canonical CSS vars (hosts may omit the leading --). */\nexport function normalizeThemeObject(input?: Record<string, string> | null): Record<string, string> {\n if (!input) return {};\n const out: Record<string, string> = {};\n for (const [rawKey, value] of Object.entries(input)) {\n if (value == null || value === '') continue;\n const key = rawKey.startsWith('--') ? rawKey : `--${rawKey}`;\n out[key] = value;\n }\n return out;\n}\n\n/**\n * Apply theme object as inline CSS variables on a host element.\n * Scoped to the chat root so multiple embeds don't fight over <html>.\n */\nexport function applyThemeObjectToElement(\n el: HTMLElement | null | undefined,\n theme?: Record<string, string> | null,\n): void {\n if (!el || !theme) return;\n const normalized = normalizeThemeObject(theme);\n for (const [key, value] of Object.entries(normalized)) {\n el.style.setProperty(key, value);\n }\n}\n"],"version":3}
@@ -14,10 +14,10 @@ class ToastHelper {
14
14
  }
15
15
  getTypeStyles(type = 'info') {
16
16
  const styles = {
17
- success: { bgColor: 'var(--text-success-color)', progressBarColor: 'var(--bg-primary-color)' },
18
- error: { bgColor: 'var(--text-danger-color)', progressBarColor: '#da190b' },
19
- warning: { bgColor: 'var(--text-warning-color)', progressBarColor: '#e68900' },
20
- info: { bgColor: 'var(--text-info-color)', progressBarColor: '#0b7dda' },
17
+ success: { bgColor: 'var(--success)', progressBarColor: 'var(--bg-primary)' },
18
+ error: { bgColor: 'var(--danger)', progressBarColor: '#da190b' },
19
+ warning: { bgColor: 'var(--text-warning-color, #cf6f0f)', progressBarColor: '#e68900' },
20
+ info: { bgColor: 'var(--text-info-color, #a5a2a2)', progressBarColor: '#0b7dda' },
21
21
  };
22
22
  return styles[type] || styles.info;
23
23
  }
@@ -38,8 +38,8 @@ class ToastHelper {
38
38
  const toast = document.createElement('toast-notification');
39
39
  const styles = this.getTypeStyles(type);
40
40
  toast.bgColor = styles.bgColor;
41
- toast.color = 'var(--bg-primary-color)';
42
- toast.progressBarColor = 'var(--bg-primary-color)';
41
+ toast.color = 'var(--bg-primary)';
42
+ toast.progressBarColor = 'var(--bg-primary)';
43
43
  toast.toastMessage = message;
44
44
  toast.padding = '12px';
45
45
  toast.borderRadius = '5px';
@@ -1 +1 @@
1
- {"file":"toast.js","mappings":";;AAUA,MAAM,WAAW;IAIf;QACE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC/C,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QACrC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KAC3C;IAEM,OAAO,WAAW;QACvB,IAAI,CAAC,WAAW,CAAC,QAAQ;YAAE,WAAW,CAAC,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;QACpE,OAAO,WAAW,CAAC,QAAQ,CAAC;KAC7B;IAEO,aAAa,CAAC,OAAe,MAAM;QACzC,MAAM,MAAM,GAAkE;YAC5E,OAAO,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,yBAAyB,EAAE;YAC9F,KAAK,EAAE,EAAE,OAAO,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,SAAS,EAAE;YAC3E,OAAO,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,SAAS,EAAE;YAC9E,IAAI,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,SAAS,EAAE;SACzE,CAAC;QACF,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC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AAa,CAAC,oBAAoB,CAAQ,CAAC;QAClE,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACxC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC/B,KAAK,CAAC,KAAK,GAAG,yBAAyB,CAAC;QACxC,KAAK,CAAC,gBAAgB,GAAG,yBAAyB,CAAC;QACnD,KAAK,CAAC,YAAY,GAAG,OAAO,CAAC;QAC7B,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;QACvB,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC;QAC3B,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC;QACtB,KAAK,CAAC,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC;QAClC,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAC9B,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAClC,UAAU,CAAC,MAAM,KAAK,CAAC,MAAM,EAAE,EAAE,QAAQ,CAAC,CAAC;KAC5C;CACF;MAEY,SAAS,GAAG,CAAC,OAAqB;;IAC7C,MAAM,MAAM,GAAG,uBAAuB,CAAC,OAAO,EAAE,OAAc,CAAC,CAAC;IAChE,IAAI,MAAM,EAAE;QACV,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,UAAU,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,EAAE,MAAA,OAAO,CAAC,QAAQ,mCAAI,IAAI,CAAC,CAAC;QAC5D,OAAO;KACR;IACD,WAAW,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC1C;;;;","names":[],"sources":["src/lib/toast.ts"],"sourcesContent":["import '../components/ChatUIComponent/shared/toast-notification/toast-notification';\nimport { createCustomPartElement } from './custom-ui';\n\nexport interface ToastOptions {\n message: string;\n duration?: number;\n type?: 'success' | 'error' | 'warning' | 'info';\n position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';\n}\n\nclass ToastHelper {\n private static instance: ToastHelper;\n private container: HTMLDivElement;\n\n private constructor() {\n this.container = document.createElement('div');\n this.container.style.position = 'fixed';\n this.container.style.zIndex = '9999';\n document.body.appendChild(this.container);\n }\n\n public static getInstance(): ToastHelper {\n if (!ToastHelper.instance) ToastHelper.instance = new ToastHelper();\n return ToastHelper.instance;\n }\n\n private getTypeStyles(type: string = 'info') {\n const styles: Record<string, { bgColor: string; progressBarColor: string }> = {\n success: { bgColor: 'var(--text-success-color)', progressBarColor: 'var(--bg-primary-color)' },\n error: { bgColor: 'var(--text-danger-color)', progressBarColor: '#da190b' },\n warning: { bgColor: 'var(--text-warning-color)', progressBarColor: '#e68900' },\n info: { bgColor: 'var(--text-info-color)', progressBarColor: '#0b7dda' },\n };\n return styles[type] || styles.info;\n }\n\n private setPosition(position: string = 'top-right') {\n const positions: Record<string, Partial<CSSStyleDeclaration>> = {\n 'top-right': { top: '20px', right: '20px', bottom: 'auto', left: 'auto' },\n 'top-left': { top: '20px', right: 'auto', bottom: 'auto', left: '20px' },\n 'bottom-right': { top: 'auto', right: '20px', bottom: '20px', left: 'auto' },\n 'bottom-left': { top: 'auto', right: 'auto', bottom: '20px', left: '20px' },\n 'top-center': { top: '20px', right: 'auto', bottom: 'auto', left: '50%', transform: 'translateX(-50%)' },\n 'bottom-center': { top: 'auto', right: 'auto', bottom: '20px', left: '50%', transform: 'translateX(-50%)' },\n };\n Object.assign(this.container.style, positions[position] || positions['top-right']);\n }\n\n public show(options: ToastOptions): void {\n const { message, duration = 3000, type = 'info', position = 'top-right' } = options;\n this.setPosition(position);\n const toast = document.createElement('toast-notification') as any;\n const styles = this.getTypeStyles(type);\n toast.bgColor = styles.bgColor;\n toast.color = 'var(--bg-primary-color)';\n toast.progressBarColor = 'var(--bg-primary-color)';\n toast.toastMessage = message;\n toast.padding = '12px';\n toast.borderRadius = '5px';\n toast.width = '300px';\n toast.style.marginBottom = '10px';\n toast.style.display = 'block';\n this.container.appendChild(toast);\n setTimeout(() => toast.remove(), duration);\n }\n}\n\nexport const showToast = (options: ToastOptions): void => {\n const custom = createCustomPartElement('toast', options as any);\n if (custom) {\n document.body.appendChild(custom);\n setTimeout(() => custom.remove(), options.duration ?? 3000);\n return;\n }\n ToastHelper.getInstance().show(options);\n};\n"],"version":3}
1
+ {"file":"toast.js","mappings":";;AAUA,MAAM,WAAW;IAIf;QACE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC/C,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QACrC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KAC3C;IAEM,OAAO,WAAW;QACvB,IAAI,CAAC,WAAW,CAAC,QAAQ;YAAE,WAAW,CAAC,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;QACpE,OAAO,WAAW,CAAC,QAAQ,CAAC;KAC7B;IAEO,aAAa,CAAC,OAAe,MAAM;QACzC,MAAM,MAAM,GAAkE;YAC5E,OAAO,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE;YAC7E,KAAK,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,SAAS,EAAE;YAChE,OAAO,EAAE,EAAE,OAAO,EAAE,oCAAoC,EAAE,gBAAgB,EAAE,SAAS,EAAE;YACvF,IAAI,EAAE,EAAE,OAAO,EAAE,iCAAiC,EAAE,gBAAgB,EAAE,SAAS,EAAE;SAClF,CAAC;QACF,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC;KACpC;IAEO,WAAW,CAAC,WAAmB,WAAW;QAChD,MAAM,SAAS,G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AAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACxC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC/B,KAAK,CAAC,KAAK,GAAG,mBAAmB,CAAC;QAClC,KAAK,CAAC,gBAAgB,GAAG,mBAAmB,CAAC;QAC7C,KAAK,CAAC,YAAY,GAAG,OAAO,CAAC;QAC7B,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;QACvB,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC;QAC3B,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC;QACtB,KAAK,CAAC,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC;QAClC,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAC9B,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAClC,UAAU,CAAC,MAAM,KAAK,CAAC,MAAM,EAAE,EAAE,QAAQ,CAAC,CAAC;KAC5C;CACF;MAEY,SAAS,GAAG,CAAC,OAAqB;;IAC7C,MAAM,MAAM,GAAG,uBAAuB,CAAC,OAAO,EAAE,OAAc,CAAC,CAAC;IAChE,IAAI,MAAM,EAAE;QACV,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,UAAU,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,EAAE,MAAA,OAAO,CAAC,QAAQ,mCAAI,IAAI,CAAC,CAAC;QAC5D,OAAO;KACR;IACD,WAAW,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC1C;;;;","names":[],"sources":["src/lib/toast.ts"],"sourcesContent":["import '../components/ChatUIComponent/shared/toast-notification/toast-notification';\nimport { createCustomPartElement } from './custom-ui';\n\nexport interface ToastOptions {\n message: string;\n duration?: number;\n type?: 'success' | 'error' | 'warning' | 'info';\n position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';\n}\n\nclass ToastHelper {\n private static instance: ToastHelper;\n private container: HTMLDivElement;\n\n private constructor() {\n this.container = document.createElement('div');\n this.container.style.position = 'fixed';\n this.container.style.zIndex = '9999';\n document.body.appendChild(this.container);\n }\n\n public static getInstance(): ToastHelper {\n if (!ToastHelper.instance) ToastHelper.instance = new ToastHelper();\n return ToastHelper.instance;\n }\n\n private getTypeStyles(type: string = 'info') {\n const styles: Record<string, { bgColor: string; progressBarColor: string }> = {\n success: { bgColor: 'var(--success)', progressBarColor: 'var(--bg-primary)' },\n error: { bgColor: 'var(--danger)', progressBarColor: '#da190b' },\n warning: { bgColor: 'var(--text-warning-color, #cf6f0f)', progressBarColor: '#e68900' },\n info: { bgColor: 'var(--text-info-color, #a5a2a2)', progressBarColor: '#0b7dda' },\n };\n return styles[type] || styles.info;\n }\n\n private setPosition(position: string = 'top-right') {\n const positions: Record<string, Partial<CSSStyleDeclaration>> = {\n 'top-right': { top: '20px', right: '20px', bottom: 'auto', left: 'auto' },\n 'top-left': { top: '20px', right: 'auto', bottom: 'auto', left: '20px' },\n 'bottom-right': { top: 'auto', right: '20px', bottom: '20px', left: 'auto' },\n 'bottom-left': { top: 'auto', right: 'auto', bottom: '20px', left: '20px' },\n 'top-center': { top: '20px', right: 'auto', bottom: 'auto', left: '50%', transform: 'translateX(-50%)' },\n 'bottom-center': { top: 'auto', right: 'auto', bottom: '20px', left: '50%', transform: 'translateX(-50%)' },\n };\n Object.assign(this.container.style, positions[position] || positions['top-right']);\n }\n\n public show(options: ToastOptions): void {\n const { message, duration = 3000, type = 'info', position = 'top-right' } = options;\n this.setPosition(position);\n const toast = document.createElement('toast-notification') as any;\n const styles = this.getTypeStyles(type);\n toast.bgColor = styles.bgColor;\n toast.color = 'var(--bg-primary)';\n toast.progressBarColor = 'var(--bg-primary)';\n toast.toastMessage = message;\n toast.padding = '12px';\n toast.borderRadius = '5px';\n toast.width = '300px';\n toast.style.marginBottom = '10px';\n toast.style.display = 'block';\n this.container.appendChild(toast);\n setTimeout(() => toast.remove(), duration);\n }\n}\n\nexport const showToast = (options: ToastOptions): void => {\n const custom = createCustomPartElement('toast', options as any);\n if (custom) {\n document.body.appendChild(custom);\n setTimeout(() => custom.remove(), options.duration ?? 3000);\n return;\n }\n ToastHelper.getInstance().show(options);\n};\n"],"version":3}
@@ -40,6 +40,7 @@ const VideoMessage = /*@__PURE__*/ proxyCustomElement(class VideoMessage extends
40
40
  this.isRead = undefined;
41
41
  this.isSelf = undefined;
42
42
  this.isDelivered = undefined;
43
+ this.deliveryStatus = undefined;
43
44
  this.textColor = undefined;
44
45
  this.message = undefined;
45
46
  this.mentionedUsers = [];
@@ -61,12 +62,12 @@ const VideoMessage = /*@__PURE__*/ proxyCustomElement(class VideoMessage extends
61
62
  }
62
63
  render() {
63
64
  const showCaption = this.message && !String(this.message).includes('AttachmentMessage:');
64
- return (h("message-bubble", { key: '53af459d4e8ca4043b42d7d8b9fa420bd6262d6c', isSelf: !!this.isSelf, time: this.time, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover }, h("div", { key: '56e1d8c7818bd520bf05af11df528cf4caf4bdd1', class: "video-wrap" }, h("video", { key: 'ee7fe48179d98574e8c5a0b0013fb8d41a4f87e0', style: {
65
+ return (h("message-bubble", { key: '9f0fa5297ca5497b3f2c0714efb55a39c482927c', isSelf: !!this.isSelf, time: this.time, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, deliveryStatus: this.deliveryStatus, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover }, h("div", { key: '681f6418a84e5bd1df4c9994eb8008f0fde0a43b', class: "video-wrap" }, h("video", { key: '504c0a25514b3e46c67ba0072558499fb358d71c', style: {
65
66
  height: this.height || '150px',
66
67
  width: this.width || '150px',
67
68
  objectFit: 'cover',
68
69
  borderRadius: this.borderRadius || '8px',
69
- }, onClick: this.toggle }, h("source", { key: '8a6cd53a2e83f2d95e55baedf4b0226435d1d785', src: this.videoSrc, type: this.videoType || 'video/mp4' })), h("div", { key: 'f6effc32d79d9c09dabdece9ecfb89959eca8e7d', class: "controls" }, !this.isPlaying ? (h("button", { type: "button", onClick: this.playVideo, "aria-label": "Play" }, "\u25B6")) : (h("button", { type: "button", onClick: this.pauseVideo, "aria-label": "Pause" }, "\u275A\u275A")), h("button", { key: 'e9900ec1cbdce69521fb5cc5b1ff6d417d013dbf', type: "button", class: "video_fullscreen", onClick: this.fullscreen, "aria-label": "Fullscreen" }, "\u26F6"))), showCaption ? (h("div", { style: { fontSize: '14px', color: this.textColor, marginTop: '4px' } }, renderMessageBody(this.message, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), !!this.isSelf))) : null));
70
+ }, onClick: this.toggle }, h("source", { key: '9c93cff4e3cfe4a83c37ed4d153c0941610deed4', src: this.videoSrc, type: this.videoType || 'video/mp4' })), h("div", { key: '8517818e65d6d9c63c9c2fe7949984958668cafd', class: "controls" }, !this.isPlaying ? (h("button", { type: "button", onClick: this.playVideo, "aria-label": "Play" }, "\u25B6")) : (h("button", { type: "button", onClick: this.pauseVideo, "aria-label": "Pause" }, "\u275A\u275A")), h("button", { key: 'a3ecc1c5aecdace8a7866a9ec10d72822446b009', type: "button", class: "video_fullscreen", onClick: this.fullscreen, "aria-label": "Fullscreen" }, "\u26F6"))), showCaption ? (h("div", { style: { fontSize: '14px', color: this.textColor, marginTop: '4px' } }, renderMessageBody(this.message, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), !!this.isSelf))) : null));
70
71
  }
71
72
  get el() { return this; }
72
73
  static get style() { return ":host { display: block; position: relative; }\n .video-wrap { position: relative; width: fit-content; }\n .controls {\n position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;\n }\n .controls button {\n pointer-events: auto; border: none; background: var(--overlay); color: var(--text-on-brand);\n cursor: pointer; padding: 8px 10px; border-radius: 8px; margin: 0 4px;\n }\n .video_fullscreen { position: absolute; right: 8px; bottom: 8px; }"; }
@@ -83,6 +84,7 @@ const VideoMessage = /*@__PURE__*/ proxyCustomElement(class VideoMessage extends
83
84
  "isRead": [4, "is-read"],
84
85
  "isSelf": [4, "is-self"],
85
86
  "isDelivered": [1, "is-delivered"],
87
+ "deliveryStatus": [1, "delivery-status"],
86
88
  "textColor": [1, "text-color"],
87
89
  "message": [1],
88
90
  "mentionedUsers": [16],
@@ -1 +1 @@
1
- {"file":"video-message2.js","mappings":";;;;MAoBa,YAAY;;;;;;QAqCf,cAAS,GAAG;YAClB,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YACzB,IAAI,CAAC,CAAC;gBAAE,OAAO;YACf,CAAC,CAAC,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;SACvB,CAAC;QAEM,eAAU,GAAG;YACnB,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YACzB,IAAI,CAAC,CAAC;gBAAE,OAAO;YACf,CAAC,CAAC,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;SACxB,CAAC;QAEM,WAAM,GAAG,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;QAEvE,eAAU,GAAG;;YACnB,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YACzB,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,iBAAiB,iDAAI,CAAC;SAC1B,CAAC;;4BArD6B,MAAM;uBACX,MAAM;;yBAEJ,WAAW;;sBAEd,OAAO;qBACR,OAAO;;;;;;;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W,GAAI,CAC7D,EACR,4DAAK,KAAK,EAAC,UAAU,IAClB,CAAC,IAAI,CAAC,SAAS,IACd,cAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,CAAC,SAAS,gBAAa,MAAM,aAEvD,KAET,cAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,CAAC,UAAU,gBAAa,OAAO,mBAEzD,CACV,EACD,+DAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,kBAAkB,EAAC,OAAO,EAAE,IAAI,CAAC,UAAU,gBAAa,YAAY,aAEvF,CACL,CACF,EACL,WAAW,IACV,WAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IACtE,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CACxG,IACJ,IAAI,CACO,EACjB;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ChatUIComponent/shared/video-message/video-message.tsx"],"sourcesContent":["import { Component, Prop, h, Event, EventEmitter, State, Element } from '@stencil/core';\nimport '../message-bubble/message-bubble';\nimport { renderMessageBody, emitTagUser } from '../message-body-render/message-body-render';\n\n@Component({\n tag: 'video-message',\n shadow: true,\n styles: `\n :host { display: block; position: relative; }\n .video-wrap { position: relative; width: fit-content; }\n .controls {\n position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;\n }\n .controls button {\n pointer-events: auto; border: none; background: var(--overlay); color: var(--text-on-brand);\n cursor: pointer; padding: 8px 10px; border-radius: 8px; margin: 0 4px;\n }\n .video_fullscreen { position: absolute; right: 8px; bottom: 8px; }\n `,\n})\nexport class VideoMessage {\n @Element() el: HTMLElement;\n @Prop() bgColor: string;\n @Prop() borderRadius: string = '10px';\n @Prop() padding: string = '10px';\n @Prop() videoSrc: string;\n @Prop() videoType: string = 'video/mp4';\n @Prop() time: string;\n @Prop() height: string = '150px';\n @Prop() width: string = '150px';\n @Prop() playing: boolean;\n @Prop() isRead: boolean;\n @Prop() isSelf: boolean;\n @Prop() isDelivered: string;\n @Prop() textColor: string;\n @Prop() message: string;\n @Prop() mentionedUsers: any[] = [];\n @Prop() messageId: string;\n @Prop() reactions: Record<string, string[]> = {};\n @Prop() userMetaData: any;\n @Prop() messageType: number;\n @Prop() timeColor: string;\n @Prop() showReactionOnHover: boolean = false;\n @Prop() type: string;\n @Prop() borderWidth: string;\n @Prop() borderColor: string;\n @Prop() borderStyle: string;\n\n @State() private isPlaying = false;\n\n @Event({ eventName: 'tagUserClick', bubbles: true, composed: true })\n tagUserClick: EventEmitter<{ userId?: string; userName?: string }>;\n\n private videoEl(): HTMLVideoElement | null {\n return this.el.shadowRoot?.querySelector('video') || null;\n }\n\n private playVideo = () => {\n const v = this.videoEl();\n if (!v) return;\n v.play();\n this.isPlaying = true;\n };\n\n private pauseVideo = () => {\n const v = this.videoEl();\n if (!v) return;\n v.pause();\n this.isPlaying = false;\n };\n\n private toggle = () => (this.isPlaying ? this.pauseVideo() : this.playVideo());\n\n private fullscreen = () => {\n const v = this.videoEl();\n v?.requestFullscreen?.();\n };\n\n render() {\n const showCaption = this.message && !String(this.message).includes('AttachmentMessage:');\n return (\n <message-bubble\n isSelf={!!this.isSelf}\n time={this.time}\n timeColor={this.timeColor}\n isRead={this.isRead}\n isDelivered={this.isDelivered}\n reactions={this.reactions}\n messageId={this.messageId}\n userMetaData={this.userMetaData}\n isForwarded={this.messageType === 1}\n backgroundColor={this.bgColor}\n borderRadius={this.borderRadius || '10px'}\n padding={this.padding || '10px'}\n showReactionOnHover={this.showReactionOnHover}\n >\n <div class=\"video-wrap\">\n <video\n style={{\n height: this.height || '150px',\n width: this.width || '150px',\n objectFit: 'cover',\n borderRadius: this.borderRadius || '8px',\n }}\n onClick={this.toggle}\n >\n <source src={this.videoSrc} type={this.videoType || 'video/mp4'} />\n </video>\n <div class=\"controls\">\n {!this.isPlaying ? (\n <button type=\"button\" onClick={this.playVideo} aria-label=\"Play\">\n ▶\n </button>\n ) : (\n <button type=\"button\" onClick={this.pauseVideo} aria-label=\"Pause\">\n ❚❚\n </button>\n )}\n <button type=\"button\" class=\"video_fullscreen\" onClick={this.fullscreen} aria-label=\"Fullscreen\">\n ⛶\n </button>\n </div>\n </div>\n {showCaption ? (\n <div style={{ fontSize: '14px', color: this.textColor, marginTop: '4px' }}>\n {renderMessageBody(this.message, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), !!this.isSelf)}\n </div>\n ) : null}\n </message-bubble>\n );\n }\n}\n"],"version":3}
1
+ {"file":"video-message2.js","mappings":";;;;MAoBa,YAAY;;;;;;QAsCf,cAAS,GAAG;YAClB,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YACzB,IAAI,CAAC,CAAC;gBAAE,OAAO;YACf,CAAC,CAAC,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;SACvB,CAAC;QAEM,eAAU,GAAG;YACnB,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YACzB,IAAI,CAAC,CAAC;gBAAE,OAAO;YACf,CAAC,CAAC,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;SACxB,CAAC;QAEM,WAAM,GAAG,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;QAEvE,eAAU,GAAG;;YACnB,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YACzB,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,iBAAiB,iDAAI,C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aACzC,EACD,OAAO,EAAE,IAAI,CAAC,MAAM,IAEpB,+DAAQ,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,IAAI,WAAW,GAAI,CAC7D,EACR,4DAAK,KAAK,EAAC,UAAU,IAClB,CAAC,IAAI,CAAC,SAAS,IACd,cAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,CAAC,SAAS,gBAAa,MAAM,aAEvD,KAET,cAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,CAAC,UAAU,gBAAa,OAAO,mBAEzD,CACV,EACD,+DAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,kBAAkB,EAAC,OAAO,EAAE,IAAI,CAAC,UAAU,gBAAa,YAAY,aAEvF,CACL,CACF,EACL,WAAW,IACV,WAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IACtE,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CACxG,IACJ,IAAI,CACO,EACjB;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ChatUIComponent/shared/video-message/video-message.tsx"],"sourcesContent":["import { Component, Prop, h, Event, EventEmitter, State, Element } from '@stencil/core';\nimport '../message-bubble/message-bubble';\nimport { renderMessageBody, emitTagUser } from '../message-body-render/message-body-render';\n\n@Component({\n tag: 'video-message',\n shadow: true,\n styles: `\n :host { display: block; position: relative; }\n .video-wrap { position: relative; width: fit-content; }\n .controls {\n position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;\n }\n .controls button {\n pointer-events: auto; border: none; background: var(--overlay); color: var(--text-on-brand);\n cursor: pointer; padding: 8px 10px; border-radius: 8px; margin: 0 4px;\n }\n .video_fullscreen { position: absolute; right: 8px; bottom: 8px; }\n `,\n})\nexport class VideoMessage {\n @Element() el: HTMLElement;\n @Prop() bgColor: string;\n @Prop() borderRadius: string = '10px';\n @Prop() padding: string = '10px';\n @Prop() videoSrc: string;\n @Prop() videoType: string = 'video/mp4';\n @Prop() time: string;\n @Prop() height: string = '150px';\n @Prop() width: string = '150px';\n @Prop() playing: boolean;\n @Prop() isRead: boolean;\n @Prop() isSelf: boolean;\n @Prop() isDelivered: string;\n @Prop() deliveryStatus: string;\n @Prop() textColor: string;\n @Prop() message: string;\n @Prop() mentionedUsers: any[] = [];\n @Prop() messageId: string;\n @Prop() reactions: Record<string, string[]> = {};\n @Prop() userMetaData: any;\n @Prop() messageType: number;\n @Prop() timeColor: string;\n @Prop() showReactionOnHover: boolean = false;\n @Prop() type: string;\n @Prop() borderWidth: string;\n @Prop() borderColor: string;\n @Prop() borderStyle: string;\n\n @State() private isPlaying = false;\n\n @Event({ eventName: 'tagUserClick', bubbles: true, composed: true })\n tagUserClick: EventEmitter<{ userId?: string; userName?: string }>;\n\n private videoEl(): HTMLVideoElement | null {\n return this.el.shadowRoot?.querySelector('video') || null;\n }\n\n private playVideo = () => {\n const v = this.videoEl();\n if (!v) return;\n v.play();\n this.isPlaying = true;\n };\n\n private pauseVideo = () => {\n const v = this.videoEl();\n if (!v) return;\n v.pause();\n this.isPlaying = false;\n };\n\n private toggle = () => (this.isPlaying ? this.pauseVideo() : this.playVideo());\n\n private fullscreen = () => {\n const v = this.videoEl();\n v?.requestFullscreen?.();\n };\n\n render() {\n const showCaption = this.message && !String(this.message).includes('AttachmentMessage:');\n return (\n <message-bubble\n isSelf={!!this.isSelf}\n time={this.time}\n timeColor={this.timeColor}\n isRead={this.isRead}\n isDelivered={this.isDelivered}\n deliveryStatus={this.deliveryStatus}\n reactions={this.reactions}\n messageId={this.messageId}\n userMetaData={this.userMetaData}\n isForwarded={this.messageType === 1}\n backgroundColor={this.bgColor}\n borderRadius={this.borderRadius || '10px'}\n padding={this.padding || '10px'}\n showReactionOnHover={this.showReactionOnHover}\n >\n <div class=\"video-wrap\">\n <video\n style={{\n height: this.height || '150px',\n width: this.width || '150px',\n objectFit: 'cover',\n borderRadius: this.borderRadius || '8px',\n }}\n onClick={this.toggle}\n >\n <source src={this.videoSrc} type={this.videoType || 'video/mp4'} />\n </video>\n <div class=\"controls\">\n {!this.isPlaying ? (\n <button type=\"button\" onClick={this.playVideo} aria-label=\"Play\">\n ▶\n </button>\n ) : (\n <button type=\"button\" onClick={this.pauseVideo} aria-label=\"Pause\">\n ❚❚\n </button>\n )}\n <button type=\"button\" class=\"video_fullscreen\" onClick={this.fullscreen} aria-label=\"Fullscreen\">\n ⛶\n </button>\n </div>\n </div>\n {showCaption ? (\n <div style={{ fontSize: '14px', color: this.textColor, marginTop: '4px' }}>\n {renderMessageBody(this.message, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), !!this.isSelf)}\n </div>\n ) : null}\n </message-bubble>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,36 @@
1
+ import { i as initializeIsometrikWebchat, d as destroyIsometrikWebchat, e as ensureIsometrikWebchat, r as retainIsometrikWebchat, a as releaseIsometrikWebchat, b as isometrikWebchatApi, c as createWebChatApi, m as mountReactInSlot, f as defineReactCustomPart, u as unmountReactSlot, s as switchChatTheme, g as applyCustomTheme, t as toggleTheme, h as resolveThemeProvider, j as resolveWebChat } from './runtime-controls-cf599fe2.js';
2
+ import { T as THEME_TOKEN_NAMES } from './send-media-917dcc2f.js';
3
+
4
+ /**
5
+ * Expose public SDK helpers on window for www demos / script-tag hosts.
6
+ * Bundlers should prefer named ESM imports from the package entry.
7
+ */
8
+ function appGlobalScript () {
9
+ if (typeof window === 'undefined')
10
+ return;
11
+ const w = window;
12
+ w.initializeIsometrikWebchat = initializeIsometrikWebchat;
13
+ w.destroyIsometrikWebchat = destroyIsometrikWebchat;
14
+ w.ensureIsometrikWebchat = ensureIsometrikWebchat;
15
+ w.retainIsometrikWebchat = retainIsometrikWebchat;
16
+ w.releaseIsometrikWebchat = releaseIsometrikWebchat;
17
+ w.initializeChat = initializeIsometrikWebchat;
18
+ w.destroyChat = destroyIsometrikWebchat;
19
+ w.isometrikWebchatApi = isometrikWebchatApi;
20
+ w.createWebChatApi = createWebChatApi;
21
+ w.THEME_TOKEN_NAMES = THEME_TOKEN_NAMES;
22
+ w.mountReactInSlot = mountReactInSlot;
23
+ w.defineReactCustomPart = defineReactCustomPart;
24
+ w.unmountReactSlot = unmountReactSlot;
25
+ w.switchChatTheme = switchChatTheme;
26
+ w.applyCustomTheme = applyCustomTheme;
27
+ w.toggleTheme = toggleTheme;
28
+ w.resolveThemeProvider = resolveThemeProvider;
29
+ w.resolveWebChat = resolveWebChat;
30
+ }
31
+
32
+ const globalScripts = appGlobalScript;
33
+
34
+ export { globalScripts as g };
35
+
36
+ //# sourceMappingURL=app-globals-2beecb81.js.map
@@ -0,0 +1 @@
1
+ {"file":"app-globals-2beecb81.js","mappings":";;;AAAA;;;;;IAwBE,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO;IAC1C,MAAM,CAAC,GAAG,MAAa,CAAC;IACxB,CAAC,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;IAC1D,CAAC,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;IACpD,CAAC,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;IAClD,CAAC,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;IAClD,CAAC,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;IACpD,CAAC,CAAC,cAAc,GAAG,0BAA0B,CAAC;IAC9C,CAAC,CAAC,WAAW,GAAG,uBAAuB,CAAC;IACxC,CAAC,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IAC5C,CAAC,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IACtC,CAAC,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IACxC,CAAC,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IACtC,CAAC,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IAChD,CAAC,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IACtC,CAAC,CAAC,eAAe,GAAG,eAAe,CAAC;IACpC,CAAC,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IACtC,CAAC,CAAC,WAAW,GAAG,WAAW,CAAC;IAC5B,CAAC,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IAC9C,CAAC,CAAC,cAAc,GAAG,cAAc,CAAC;AACpC;;AC3CY,MAAC,aAAa,GAAG;;;;","names":[],"sources":["src/global/expose-sdk.ts","@stencil/core/internal/app-globals"],"sourcesContent":["/**\n * Expose public SDK helpers on window for www demos / script-tag hosts.\n * Bundlers should prefer named ESM imports from the package entry.\n */\nimport {\n initializeIsometrikWebchat,\n destroyIsometrikWebchat,\n ensureIsometrikWebchat,\n retainIsometrikWebchat,\n releaseIsometrikWebchat,\n mountReactInSlot,\n defineReactCustomPart,\n unmountReactSlot,\n createWebChatApi,\n isometrikWebchatApi,\n THEME_TOKEN_NAMES,\n switchChatTheme,\n applyCustomTheme,\n toggleTheme,\n resolveThemeProvider,\n resolveWebChat,\n} from '../sdk';\n\nexport default function () {\n if (typeof window === 'undefined') return;\n const w = window as any;\n w.initializeIsometrikWebchat = initializeIsometrikWebchat;\n w.destroyIsometrikWebchat = destroyIsometrikWebchat;\n w.ensureIsometrikWebchat = ensureIsometrikWebchat;\n w.retainIsometrikWebchat = retainIsometrikWebchat;\n w.releaseIsometrikWebchat = releaseIsometrikWebchat;\n w.initializeChat = initializeIsometrikWebchat;\n w.destroyChat = destroyIsometrikWebchat;\n w.isometrikWebchatApi = isometrikWebchatApi;\n w.createWebChatApi = createWebChatApi;\n w.THEME_TOKEN_NAMES = THEME_TOKEN_NAMES;\n w.mountReactInSlot = mountReactInSlot;\n w.defineReactCustomPart = defineReactCustomPart;\n w.unmountReactSlot = unmountReactSlot;\n w.switchChatTheme = switchChatTheme;\n w.applyCustomTheme = applyCustomTheme;\n w.toggleTheme = toggleTheme;\n w.resolveThemeProvider = resolveThemeProvider;\n w.resolveWebChat = resolveWebChat;\n}\n","import appGlobalScript from '/Users/3embed/Desktop/isometrik-webchat/src/global/expose-sdk.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}