isometrik-plugin-chat-sdk 1.3.19 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-61a8bfde.js +38 -0
- package/dist/cjs/app-globals-61a8bfde.js.map +1 -0
- package/dist/cjs/attachment-preview_22.cjs.entry.js +122 -44
- package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
- package/dist/cjs/audio-bubble_4.cjs.entry.js +38 -8
- package/dist/cjs/audio-bubble_4.cjs.entry.js.map +1 -1
- package/dist/cjs/chat-app.cjs.entry.js +2 -2
- package/dist/cjs/chat-app.cjs.entry.js.map +1 -1
- package/dist/cjs/{chat-creds-cf537d4b.js → chat-creds-2dbc4087.js} +3 -3
- package/dist/cjs/chat-creds-2dbc4087.js.map +1 -0
- package/dist/cjs/chat-document-message-bubble.cjs.entry.js +1 -1
- package/dist/cjs/chat-image-message-bubble.cjs.entry.js +1 -1
- package/dist/cjs/chat-video-message-bubble.cjs.entry.js +1 -1
- package/dist/cjs/client-80851676.js +482 -0
- package/dist/cjs/client-80851676.js.map +1 -0
- package/dist/cjs/{contracts-31632812.js → contracts-dfc84075.js} +2 -2
- package/dist/cjs/contracts-dfc84075.js.map +1 -0
- package/dist/cjs/destroy-chat-7ae8fc99.js +24 -0
- package/dist/cjs/destroy-chat-7ae8fc99.js.map +1 -0
- package/dist/cjs/doublecheck-c2461adc.js +36 -0
- package/dist/cjs/doublecheck-c2461adc.js.map +1 -0
- package/dist/cjs/{drawer-28cc94a4.js → drawer-811d2ce8.js} +2 -2
- package/dist/cjs/{drawer-28cc94a4.js.map → drawer-811d2ce8.js.map} +1 -1
- package/dist/cjs/forward-memebers.cjs.entry.js +2 -2
- package/dist/cjs/forward-message.cjs.entry.js +2 -2
- package/dist/cjs/group-chat-contacts.cjs.entry.js +2 -2
- package/dist/cjs/{group-members-73ad1074.js → group-members-5a82ec8a.js} +1 -125
- package/dist/cjs/group-members-5a82ec8a.js.map +1 -0
- package/dist/cjs/{helpers-8061ec7d.js → helpers-154861e9.js} +2 -2
- package/dist/cjs/{helpers-8061ec7d.js.map → helpers-154861e9.js.map} +1 -1
- package/dist/cjs/{index-1a26d11d.js → index-66f98408.js} +2 -2
- package/dist/cjs/index-66f98408.js.map +1 -0
- package/dist/cjs/index.cjs.js +55 -182
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/isometrik-webchat.cjs.js +10 -2
- package/dist/cjs/isometrik-webchat.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +10 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/login-page_3.cjs.entry.js +689 -369
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/cjs/media-gallery.cjs.entry.js +1 -1
- package/dist/cjs/media-limits-eba42629.js +165 -0
- package/dist/cjs/media-limits-eba42629.js.map +1 -0
- package/dist/cjs/member-add.cjs.entry.js +3 -3
- package/dist/cjs/message-bubble.cjs.entry.js +30 -8
- package/dist/cjs/message-bubble.cjs.entry.js.map +1 -1
- package/dist/cjs/my-component.cjs.entry.js +1 -1
- package/dist/cjs/new-chat-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/reaction-container.cjs.entry.js +4 -4
- package/dist/cjs/runtime-controls-201c71ba.js +650 -0
- package/dist/cjs/runtime-controls-201c71ba.js.map +1 -0
- package/dist/cjs/send-media-14908d4b.js +375 -0
- package/dist/cjs/send-media-14908d4b.js.map +1 -0
- package/dist/cjs/signup-page.cjs.entry.js +1 -1
- package/dist/cjs/{toast-0bf1e688.js → toast-f810e550.js} +8 -8
- package/dist/cjs/toast-f810e550.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/ChatUIComponent/ChatDocumentMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatImageMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatVideoMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +61 -14
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/ReactionContainer.js +2 -2
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +7 -6
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/attachment-preview/attachment-preview.js +39 -8
- package/dist/collection/components/ChatUIComponent/shared/attachment-preview/attachment-preview.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/document-message/document-message.js +53 -3
- package/dist/collection/components/ChatUIComponent/shared/document-message/document-message.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/forward-message/forward-message.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/image-message/image-message.js +19 -1
- package/dist/collection/components/ChatUIComponent/shared/image-message/image-message.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/incoming-text-message-bubble/incoming-text-message-bubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-bubble/message-bubble.js +47 -7
- package/dist/collection/components/ChatUIComponent/shared/message-bubble/message-bubble.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-date-pill/message-date-pill.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/new chat/new-chat.stories.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.js +19 -1
- package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/reply-message-container/reply-message-container.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js +20 -2
- package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js.map +1 -1
- package/dist/collection/components/my-component/my-component.js +1 -1
- package/dist/collection/components/my-component/web-chat/FLOW.js +1 -1
- package/dist/collection/components/my-component/web-chat/FLOW.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/WebChat.js +113 -12
- package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/bootstrap.js +7 -0
- package/dist/collection/components/my-component/web-chat/bootstrap.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/data-fetch.js +14 -5
- package/dist/collection/components/my-component/web-chat/data-fetch.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/mqtt-host.js +133 -34
- package/dist/collection/components/my-component/web-chat/mqtt-host.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/offline-host.js +212 -0
- package/dist/collection/components/my-component/web-chat/offline-host.js.map +1 -0
- package/dist/collection/components/my-component/web-chat/public-send.js +96 -21
- package/dist/collection/components/my-component/web-chat/public-send.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/shell-render.js +47 -28
- package/dist/collection/components/my-component/web-chat/shell-render.js.map +1 -1
- package/dist/collection/components/theme-provider.js +114 -45
- package/dist/collection/components/theme-provider.js.map +1 -1
- package/dist/collection/constants/chat-creds.js +2 -2
- package/dist/collection/demos/custom-ui-demo-elements.js +2 -2
- package/dist/collection/demos/custom-ui-demo-elements.js.map +1 -1
- package/dist/collection/global/expose-sdk.js +29 -0
- package/dist/collection/global/expose-sdk.js.map +1 -0
- package/dist/collection/index.js +10 -141
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/lib/chat/index.js +3 -0
- package/dist/collection/lib/chat/index.js.map +1 -1
- package/dist/collection/lib/chat/media-limits.js +21 -0
- package/dist/collection/lib/chat/media-limits.js.map +1 -0
- package/dist/collection/lib/chat/media-outbox.js +43 -0
- package/dist/collection/lib/chat/media-outbox.js.map +1 -0
- package/dist/collection/lib/chat/preview-kind.js +41 -0
- package/dist/collection/lib/chat/preview-kind.js.map +1 -0
- package/dist/collection/lib/chat/send-media.js +5 -2
- package/dist/collection/lib/chat/send-media.js.map +1 -1
- package/dist/collection/lib/custom-ui/contracts.js +1 -1
- package/dist/collection/lib/custom-ui/contracts.js.map +1 -1
- package/dist/collection/lib/custom-ui/index.js +1 -1
- package/dist/collection/lib/custom-ui/index.js.map +1 -1
- package/dist/collection/lib/custom-ui/public-api.js +1 -0
- package/dist/collection/lib/custom-ui/public-api.js.map +1 -1
- package/dist/collection/lib/destroy-chat.js +15 -16
- package/dist/collection/lib/destroy-chat.js.map +1 -0
- package/dist/collection/lib/mqtt/inbound-queue.js +17 -0
- package/dist/collection/lib/mqtt/inbound-queue.js.map +1 -0
- package/dist/collection/lib/mqtt/index.js +2 -1
- package/dist/collection/lib/mqtt/index.js.map +1 -1
- package/dist/collection/lib/mqtt/session.js +50 -6
- package/dist/collection/lib/mqtt/session.js.map +1 -1
- package/dist/collection/lib/offline/client.js +167 -0
- package/dist/collection/lib/offline/client.js.map +1 -0
- package/dist/collection/lib/offline/idb.js +181 -0
- package/dist/collection/lib/offline/idb.js.map +1 -0
- package/dist/collection/lib/offline/index.js +10 -0
- package/dist/collection/lib/offline/index.js.map +1 -0
- package/dist/collection/lib/offline/memory-db.js +64 -0
- package/dist/collection/lib/offline/memory-db.js.map +1 -0
- package/dist/collection/lib/offline/merge.js +24 -0
- package/dist/collection/lib/offline/merge.js.map +1 -0
- package/dist/collection/lib/offline/multitab.js +47 -0
- package/dist/collection/lib/offline/multitab.js.map +1 -0
- package/dist/collection/lib/offline/types.js +2 -0
- package/dist/collection/lib/offline/types.js.map +1 -0
- package/dist/collection/lib/toast.js +6 -6
- package/dist/collection/lib/toast.js.map +1 -1
- package/dist/collection/sdk/api.js +4 -0
- package/dist/collection/sdk/api.js.map +1 -0
- package/dist/collection/sdk/composition.js +43 -0
- package/dist/collection/sdk/composition.js.map +1 -0
- package/dist/collection/sdk/headless-api.js +37 -0
- package/dist/collection/sdk/headless-api.js.map +1 -0
- package/dist/collection/sdk/index.js +11 -0
- package/dist/collection/sdk/index.js.map +1 -0
- package/dist/collection/sdk/init.js +207 -0
- package/dist/collection/sdk/init.js.map +1 -0
- package/dist/collection/sdk/instance.js +63 -0
- package/dist/collection/sdk/instance.js.map +1 -0
- package/dist/collection/sdk/react-bridge.js +145 -0
- package/dist/collection/sdk/react-bridge.js.map +1 -0
- package/dist/collection/sdk/runtime-controls.js +54 -0
- package/dist/collection/sdk/runtime-controls.js.map +1 -0
- package/dist/collection/sdk/slots.js +57 -0
- package/dist/collection/sdk/slots.js.map +1 -0
- package/dist/collection/sdk/theme-tokens.js +99 -0
- package/dist/collection/sdk/theme-tokens.js.map +1 -0
- package/dist/collection/sdk/webchat-api.js +36 -0
- package/dist/collection/sdk/webchat-api.js.map +1 -0
- package/dist/collection/testing/chat-assets-mock.js +45 -0
- package/dist/collection/testing/chat-creds-mock.js +18 -0
- package/dist/collection/testing/emoji-picker-mock.js +2 -0
- package/dist/collection/testing/file-mock.js +1 -0
- package/dist/collection/testing/groupcast-mock.js +7 -0
- package/dist/collection/testing/helpers-mock.js +4 -0
- package/dist/collection/testing/iso-chat-sdk-mock.js +19 -0
- package/dist/collection/testing/toast-mock.js +2 -0
- package/dist/components/ChatFooter.js +62 -15
- package/dist/components/ChatFooter.js.map +1 -1
- package/dist/components/ChatSidebar.js +1 -1
- package/dist/components/{GroupCast.js → GroupCast2.js} +2 -2
- package/dist/components/GroupCast2.js.map +1 -0
- package/dist/components/WebChat.js +624 -305
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/WebChatBody.js +8 -7
- package/dist/components/WebChatBody.js.map +1 -1
- package/dist/components/attachment-preview2.js +40 -9
- package/dist/components/attachment-preview2.js.map +1 -1
- package/dist/components/chat-app.js +3 -3
- package/dist/components/chat-app.js.map +1 -1
- package/dist/components/chat-assets.js +1 -1
- package/dist/components/chat-creds.js +2 -2
- package/dist/components/chat-creds.js.map +1 -1
- package/dist/components/chat-document-message-bubble.js +1 -1
- package/dist/components/chat-image-message-bubble.js +1 -1
- package/dist/components/chat-tile2.js +1 -1
- package/dist/components/chat-video-message-bubble.js +1 -1
- package/dist/components/client.js +728 -0
- package/dist/components/client.js.map +1 -0
- package/dist/components/contact-info2.js +2 -117
- package/dist/components/contact-info2.js.map +1 -1
- package/dist/components/contracts.js +1 -1
- package/dist/components/contracts.js.map +1 -1
- package/dist/components/destroy-chat.js +14 -16
- package/dist/components/destroy-chat.js.map +1 -1
- package/dist/components/document-message2.js +35 -5
- package/dist/components/document-message2.js.map +1 -1
- package/dist/components/forward-message.js +2 -2
- package/dist/components/group-cast.js +1 -1
- package/dist/components/{groupcast2.js → groupcast.js} +1 -1
- package/dist/components/groupcast.js.map +1 -0
- package/dist/components/image-message2.js +3 -1
- package/dist/components/image-message2.js.map +1 -1
- package/dist/components/incoming-text-message-bubble2.js +1 -1
- package/dist/components/index.js +551 -60
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/media-limits.js +24 -0
- package/dist/components/media-limits.js.map +1 -0
- package/dist/components/member-add.js +1 -1
- package/dist/components/message-bubble2.js +31 -7
- package/dist/components/message-bubble2.js.map +1 -1
- package/dist/components/message-date-pill2.js +1 -1
- package/dist/components/messages.js +131 -0
- package/dist/components/messages.js.map +1 -0
- package/dist/components/my-component.js +1 -1
- package/dist/components/outgoing-text-message-bubble2.js +3 -1
- package/dist/components/outgoing-text-message-bubble2.js.map +1 -1
- package/dist/components/preview-kind.js +30 -0
- package/dist/components/preview-kind.js.map +1 -0
- package/dist/components/reaction-container.js +2 -2
- package/dist/components/reply-message-container2.js +1 -1
- package/dist/components/theme-provider2.js +56 -44
- package/dist/components/theme-provider2.js.map +1 -1
- package/dist/components/theme-tokens.js +102 -0
- package/dist/components/theme-tokens.js.map +1 -0
- package/dist/components/toast.js +6 -6
- package/dist/components/toast.js.map +1 -1
- package/dist/components/video-message2.js +4 -2
- package/dist/components/video-message2.js.map +1 -1
- package/dist/esm/app-globals-2beecb81.js +36 -0
- package/dist/esm/app-globals-2beecb81.js.map +1 -0
- package/dist/esm/attachment-preview_22.entry.js +120 -42
- package/dist/esm/attachment-preview_22.entry.js.map +1 -1
- package/dist/esm/audio-bubble_4.entry.js +39 -9
- package/dist/esm/audio-bubble_4.entry.js.map +1 -1
- package/dist/esm/chat-app.entry.js +2 -2
- package/dist/esm/chat-app.entry.js.map +1 -1
- package/dist/esm/{chat-assets-e3173222.js → chat-assets-bb056958.js} +2 -2
- package/dist/esm/{chat-assets-e3173222.js.map → chat-assets-bb056958.js.map} +1 -1
- package/dist/esm/{chat-creds-5d0982fc.js → chat-creds-aafad4d0.js} +3 -3
- package/dist/esm/chat-creds-aafad4d0.js.map +1 -0
- package/dist/esm/chat-document-message-bubble.entry.js +1 -1
- package/dist/esm/chat-image-message-bubble.entry.js +1 -1
- package/dist/esm/chat-tile_3.entry.js +1 -1
- package/dist/esm/chat-video-message-bubble.entry.js +1 -1
- package/dist/esm/client-4a3e00da.js +477 -0
- package/dist/esm/client-4a3e00da.js.map +1 -0
- package/dist/esm/{contracts-614be4db.js → contracts-50f4ddae.js} +2 -2
- package/dist/esm/contracts-50f4ddae.js.map +1 -0
- package/dist/esm/destroy-chat-d0ee28d6.js +22 -0
- package/dist/esm/destroy-chat-d0ee28d6.js.map +1 -0
- package/dist/esm/doublecheck-261763ef.js +32 -0
- package/dist/esm/doublecheck-261763ef.js.map +1 -0
- package/dist/esm/{drawer-8f721119.js → drawer-74c188f1.js} +2 -2
- package/dist/esm/{drawer-8f721119.js.map → drawer-74c188f1.js.map} +1 -1
- package/dist/esm/forward-memebers.entry.js +3 -3
- package/dist/esm/forward-message.entry.js +2 -2
- package/dist/esm/group-chat-contacts.entry.js +2 -2
- package/dist/esm/{group-members-806fd7a2.js → group-members-05414da2.js} +2 -118
- package/dist/esm/group-members-05414da2.js.map +1 -0
- package/dist/esm/{groupcast-2ce7187f.js → groupcast-9c7d2a32.js} +2 -2
- package/dist/esm/{groupcast-2ce7187f.js.map → groupcast-9c7d2a32.js.map} +1 -1
- package/dist/esm/{helpers-4c6d09a7.js → helpers-f33b895c.js} +2 -2
- package/dist/esm/{helpers-4c6d09a7.js.map → helpers-f33b895c.js.map} +1 -1
- package/dist/esm/{index-beb184c6.js → index-4c865e34.js} +2 -2
- package/dist/esm/index-4c865e34.js.map +1 -0
- package/dist/esm/index.js +17 -171
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/isometrik-webchat.js +10 -2
- package/dist/esm/isometrik-webchat.js.map +1 -1
- package/dist/esm/loader.js +10 -2
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/login-page_3.entry.js +672 -352
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/esm/media-gallery.entry.js +1 -1
- package/dist/esm/media-limits-3fa07c09.js +152 -0
- package/dist/esm/media-limits-3fa07c09.js.map +1 -0
- package/dist/esm/member-add.entry.js +5 -5
- package/dist/esm/message-bubble.entry.js +30 -8
- package/dist/esm/message-bubble.entry.js.map +1 -1
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/new-chat-sidebar.entry.js +3 -3
- package/dist/esm/reaction-container.entry.js +4 -4
- package/dist/esm/runtime-controls-cf599fe2.js +623 -0
- package/dist/esm/runtime-controls-cf599fe2.js.map +1 -0
- package/dist/esm/send-media-917dcc2f.js +353 -0
- package/dist/esm/send-media-917dcc2f.js.map +1 -0
- package/dist/esm/signup-page.entry.js +1 -1
- package/dist/esm/{toast-d8ea763c.js → toast-533dd183.js} +8 -8
- package/dist/esm/toast-533dd183.js.map +1 -0
- package/dist/isometrik-webchat/index.esm.js +1 -1
- package/dist/isometrik-webchat/index.esm.js.map +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.css +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js.map +1 -1
- package/dist/isometrik-webchat/p-0731d488.js +2 -0
- package/dist/isometrik-webchat/p-0731d488.js.map +1 -0
- package/dist/isometrik-webchat/{p-a15092d9.entry.js → p-1854b156.entry.js} +2 -2
- package/dist/isometrik-webchat/p-1854b156.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-5fea3fd2.entry.js → p-2d3e8cd4.entry.js} +2 -2
- package/dist/isometrik-webchat/p-315eee9a.js +2 -0
- package/dist/isometrik-webchat/p-315eee9a.js.map +1 -0
- package/dist/isometrik-webchat/{p-e7f58d3f.entry.js → p-39b626ed.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-eb1f3118.entry.js → p-3c70c22c.entry.js} +2 -2
- package/dist/isometrik-webchat/p-4cb54460.js +2 -0
- package/dist/isometrik-webchat/p-4cb54460.js.map +1 -0
- package/dist/isometrik-webchat/{p-f24cdbbb.js → p-5162774c.js} +1 -1
- package/dist/isometrik-webchat/p-5162774c.js.map +1 -0
- package/dist/isometrik-webchat/p-53ee98a7.entry.js +2 -0
- package/dist/isometrik-webchat/p-53ee98a7.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-5cbc1a16.entry.js → p-586f6978.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-5f7eebbf.entry.js → p-5d243250.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-23df1c24.js → p-5d98a8a0.js} +2 -2
- package/dist/isometrik-webchat/p-7f415f28.js +2 -0
- package/dist/isometrik-webchat/p-7f415f28.js.map +1 -0
- package/dist/isometrik-webchat/{p-d386acfe.js → p-7fd2c1ad.js} +1 -1
- package/dist/isometrik-webchat/p-7fd2c1ad.js.map +1 -0
- package/dist/isometrik-webchat/{p-e5884258.js → p-9982fa21.js} +2 -2
- package/dist/isometrik-webchat/{p-4db39c93.js → p-a5707f12.js} +2 -2
- package/dist/isometrik-webchat/{p-af775c83.entry.js → p-a876991d.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-7b80b0b2.js → p-adc45831.js} +1 -1
- package/dist/isometrik-webchat/p-adc45831.js.map +1 -0
- package/dist/isometrik-webchat/p-ae168135.js +2 -0
- package/dist/isometrik-webchat/p-ae168135.js.map +1 -0
- package/dist/isometrik-webchat/{p-a6897edc.js → p-b1330793.js} +1 -1
- package/dist/isometrik-webchat/p-b1330793.js.map +1 -0
- package/dist/isometrik-webchat/p-b61d6c0c.entry.js +2 -0
- package/dist/isometrik-webchat/p-b61d6c0c.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-b667a9fc.js +2 -0
- package/dist/isometrik-webchat/p-b667a9fc.js.map +1 -0
- package/dist/isometrik-webchat/p-b857775d.entry.js +2 -0
- package/dist/isometrik-webchat/p-bdcdf1c5.js +2 -0
- package/dist/isometrik-webchat/p-bdcdf1c5.js.map +1 -0
- package/dist/isometrik-webchat/p-c0c19621.entry.js +2 -0
- package/dist/isometrik-webchat/{p-064d6200.entry.js → p-ca47d693.entry.js} +2 -2
- package/dist/isometrik-webchat/p-d720cf14.entry.js +2 -0
- package/dist/isometrik-webchat/{p-53695fc6.entry.js.map → p-d720cf14.entry.js.map} +1 -1
- package/dist/isometrik-webchat/{p-5c22ee37.entry.js → p-d892b4d4.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-7eb12da3.js → p-dd62bd69.js} +2 -2
- package/dist/isometrik-webchat/p-eb54f75d.js +2 -0
- package/dist/isometrik-webchat/p-eb54f75d.js.map +1 -0
- package/dist/isometrik-webchat/p-f1fbf3be.entry.js +2 -0
- package/dist/isometrik-webchat/p-f1fbf3be.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-fb705915.entry.js +2 -0
- package/dist/isometrik-webchat/p-fb705915.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-2f6bb0a4.entry.js → p-fd6ce589.entry.js} +2 -2
- package/dist/isometrik-webchat/p-fdd327f5.entry.js +2 -0
- package/dist/types/components/ChatUIComponent/Footer/ChatFooter.d.ts +1 -0
- package/dist/types/components/ChatUIComponent/shared/attachment-preview/attachment-preview.d.ts +2 -0
- package/dist/types/components/ChatUIComponent/shared/document-message/document-message.d.ts +5 -0
- package/dist/types/components/ChatUIComponent/shared/image-message/image-message.d.ts +1 -0
- package/dist/types/components/ChatUIComponent/shared/message-bubble/message-bubble.d.ts +3 -0
- package/dist/types/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.d.ts +1 -0
- package/dist/types/components/ChatUIComponent/shared/video-message/video-message.d.ts +1 -0
- package/dist/types/components/my-component/web-chat/FLOW.d.ts +1 -1
- package/dist/types/components/my-component/web-chat/mqtt-host.d.ts +5 -0
- package/dist/types/components/my-component/web-chat/offline-host.d.ts +22 -0
- package/dist/types/components/theme-provider.d.ts +22 -27
- package/dist/types/components.d.ts +84 -11
- package/dist/types/demos/custom-ui-demo-elements.d.ts +1 -1
- package/dist/types/global/expose-sdk.d.ts +1 -0
- package/dist/types/index.d.ts +3 -44
- package/dist/types/lib/chat/index.d.ts +3 -0
- package/dist/types/lib/chat/media-limits.d.ts +11 -0
- package/dist/types/lib/chat/media-outbox.d.ts +8 -0
- package/dist/types/lib/chat/preview-kind.d.ts +30 -0
- package/dist/types/lib/custom-ui/contracts.d.ts +1 -1
- package/dist/types/lib/custom-ui/index.d.ts +1 -1
- package/dist/types/lib/custom-ui/public-api.d.ts +1 -1
- package/dist/types/lib/destroy-chat.d.ts +2 -0
- package/dist/types/lib/mqtt/inbound-queue.d.ts +7 -0
- package/dist/types/lib/mqtt/index.d.ts +2 -1
- package/dist/types/lib/mqtt/session.d.ts +22 -0
- package/dist/types/lib/offline/client.d.ts +44 -0
- package/dist/types/lib/offline/idb.d.ts +36 -0
- package/dist/types/lib/offline/index.d.ts +10 -0
- package/dist/types/lib/offline/memory-db.d.ts +20 -0
- package/dist/types/lib/offline/merge.d.ts +3 -0
- package/dist/types/lib/offline/multitab.d.ts +13 -0
- package/dist/types/lib/offline/types.d.ts +63 -0
- package/dist/types/sdk/api.d.ts +3 -0
- package/dist/types/sdk/composition.d.ts +32 -0
- package/dist/types/sdk/headless-api.d.ts +37 -0
- package/dist/types/sdk/index.d.ts +10 -0
- package/dist/types/sdk/init.d.ts +87 -0
- package/dist/types/sdk/instance.d.ts +15 -0
- package/dist/types/sdk/react-bridge.d.ts +64 -0
- package/dist/types/sdk/runtime-controls.d.ts +14 -0
- package/dist/types/sdk/slots.d.ts +15 -0
- package/dist/types/sdk/theme-tokens.d.ts +22 -0
- package/dist/types/sdk/webchat-api.d.ts +22 -0
- package/docs/ARCHITECTURE.md +272 -0
- package/docs/CUSTOMIZATION.md +236 -0
- package/docs/INTEGRATION.md +286 -0
- package/docs/RELIABILITY.md +51 -0
- package/docs/theme-tokens.template.css +72 -0
- package/package.json +8 -2
- package/readme.md +38 -17
- package/dist/cjs/app-globals-3a1e7e63.js +0 -7
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/chat-creds-cf537d4b.js.map +0 -1
- package/dist/cjs/contracts-31632812.js.map +0 -1
- package/dist/cjs/destroy-chat-be25dec7.js +0 -26
- package/dist/cjs/destroy-chat-be25dec7.js.map +0 -1
- package/dist/cjs/doublecheck-997afc94.js +0 -7
- package/dist/cjs/doublecheck-997afc94.js.map +0 -1
- package/dist/cjs/group-members-73ad1074.js.map +0 -1
- package/dist/cjs/index-1a26d11d.js.map +0 -1
- package/dist/cjs/toast-0bf1e688.js.map +0 -1
- package/dist/components/GroupCast.js.map +0 -1
- package/dist/components/groupcast2.js.map +0 -1
- package/dist/esm/app-globals-0f993ce5.js +0 -5
- package/dist/esm/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm/chat-creds-5d0982fc.js.map +0 -1
- package/dist/esm/contracts-614be4db.js.map +0 -1
- package/dist/esm/destroy-chat-e2ebe165.js +0 -24
- package/dist/esm/destroy-chat-e2ebe165.js.map +0 -1
- package/dist/esm/doublecheck-5e208ef0.js +0 -5
- package/dist/esm/doublecheck-5e208ef0.js.map +0 -1
- package/dist/esm/group-members-806fd7a2.js.map +0 -1
- package/dist/esm/index-beb184c6.js.map +0 -1
- package/dist/esm/toast-d8ea763c.js.map +0 -1
- package/dist/isometrik-webchat/p-01fd0eb4.entry.js +0 -2
- package/dist/isometrik-webchat/p-01fd0eb4.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-0f9c3f95.entry.js +0 -2
- package/dist/isometrik-webchat/p-0f9c3f95.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-1c53e658.js +0 -2
- package/dist/isometrik-webchat/p-1c53e658.js.map +0 -1
- package/dist/isometrik-webchat/p-1df58381.entry.js +0 -2
- package/dist/isometrik-webchat/p-1df58381.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-3c690532.entry.js +0 -2
- package/dist/isometrik-webchat/p-3c690532.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-3c8cbd5f.js +0 -2
- package/dist/isometrik-webchat/p-3c8cbd5f.js.map +0 -1
- package/dist/isometrik-webchat/p-4e762019.js +0 -2
- package/dist/isometrik-webchat/p-4e762019.js.map +0 -1
- package/dist/isometrik-webchat/p-53695fc6.entry.js +0 -2
- package/dist/isometrik-webchat/p-7b80b0b2.js.map +0 -1
- package/dist/isometrik-webchat/p-9924b1bf.entry.js +0 -2
- package/dist/isometrik-webchat/p-a15092d9.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-a6897edc.js.map +0 -1
- package/dist/isometrik-webchat/p-b2bf55b1.entry.js +0 -2
- package/dist/isometrik-webchat/p-bfecfa97.entry.js +0 -2
- package/dist/isometrik-webchat/p-d386acfe.js.map +0 -1
- package/dist/isometrik-webchat/p-e1255160.js +0 -2
- package/dist/isometrik-webchat/p-e1255160.js.map +0 -1
- package/dist/isometrik-webchat/p-f24cdbbb.js.map +0 -1
- /package/dist/isometrik-webchat/{p-5fea3fd2.entry.js.map → p-2d3e8cd4.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-e7f58d3f.entry.js.map → p-39b626ed.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-eb1f3118.entry.js.map → p-3c70c22c.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-5cbc1a16.entry.js.map → p-586f6978.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-5f7eebbf.entry.js.map → p-5d243250.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-23df1c24.js.map → p-5d98a8a0.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-e5884258.js.map → p-9982fa21.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-4db39c93.js.map → p-a5707f12.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-af775c83.entry.js.map → p-a876991d.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-bfecfa97.entry.js.map → p-b857775d.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-9924b1bf.entry.js.map → p-c0c19621.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-064d6200.entry.js.map → p-ca47d693.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-5c22ee37.entry.js.map → p-d892b4d4.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-7eb12da3.js.map → p-dd62bd69.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-2f6bb0a4.entry.js.map → p-fd6ce589.entry.js.map} +0 -0
- /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: '
|
|
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
|
|
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;;IACC,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,QAAQ,KAAI,MAAA,KAAK,CAAC,IAAI,0CAAE,IAAI,CAAA,IAAI,EAAE,EAAE,WAAW,EAAE,CAAC;IACtE,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,KAAI,MAAA,KAAK,CAAC,IAAI,0CAAE,IAAI,CAAA,IAAI,EAAE,EAAE,WAAW,EAAE,CAAC;IAClE,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACvD,CAAC;AAwBD;SACgB,eAAe,CAAC,IAK/B;IACC,IAAI,CAAC,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACvD,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,cAAc,IAAI,EAAE,EAAE,WAAW,EAAE,CAAC;IACzD,IAAI,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,WAAW,KAAK,QAAQ,EAAE;QACxD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;KAC5C;IACD,IAAI,MAAM,KAAK,QAAQ;QAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IACnE,IAAI,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE;QAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,GAAG,SAAS,GAAG,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;KAC1E;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC/D,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,IAAI,IAAI,CAAC,WAAW,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: '
|
|
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: '
|
|
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: '
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
58
|
-
if (this.styleElement) {
|
|
59
|
-
|
|
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
|
-
|
|
66
|
-
this.styleElement.
|
|
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: '
|
|
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":"
|
|
1
|
+
{"file":"theme-provider2.js","mappings":";;;MAOa,aAAa;;;;;QAuBhB,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D,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;;;;;;;;;MAUa,iBAAiB,GAAG;;IAE/B,gBAAgB;IAChB,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;;IAGV,cAAc;IACd,gBAAgB;IAChB,eAAe;IACf,YAAY;IACZ,gBAAgB;;IAGhB,gBAAgB;IAChB,kBAAkB;IAClB,iBAAiB;IACjB,iBAAiB;;IAGjB,SAAS;IACT,cAAc;IACd,eAAe;;IAGf,UAAU;IACV,iBAAiB;IACjB,WAAW;IACX,UAAU;IACV,iBAAiB;IACjB,WAAW;IACX,cAAc;IACd,QAAQ;IACR,mBAAmB;;IAGnB,cAAc;IACd,WAAW;IACX,UAAU;IACV,aAAa;IACb,cAAc;IACd,gBAAgB;;IAGhB,oBAAoB;IACpB,sBAAsB;IACtB,oBAAoB;IACpB,sBAAsB;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,sBAAsB;IACtB,qBAAqB;IACrB,sBAAsB;IACtB,mBAAmB;IACnB,kBAAkB;EACT;AASX;SACgB,oBAAoB,CAAC,KAAqC;IACxE,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACtB,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACnD,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,EAAE;YAAE,SAAS;QAC5C,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,KAAK,MAAM,EAAE,CAAC;QAC7D,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;KAClB;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;SAIgB,yBAAyB,CACvC,EAAkC,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}
|
package/dist/components/toast.js
CHANGED
|
@@ -14,10 +14,10 @@ class ToastHelper {
|
|
|
14
14
|
}
|
|
15
15
|
getTypeStyles(type = 'info') {
|
|
16
16
|
const styles = {
|
|
17
|
-
success: { bgColor: 'var(--
|
|
18
|
-
error: { bgColor: 'var(--
|
|
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
|
|
42
|
-
toast.progressBarColor = 'var(--bg-primary
|
|
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,GA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G,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: '
|
|
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: '
|
|
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;;;;;;
|
|
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,EAA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AI,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}
|