@8wave/ai-elements 0.73.0 → 0.75.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.
- package/README.md +62 -15
- package/dist/_chunks/{PkStreamingMarkdown-orhL2kzD.js → PkStreamingMarkdown-rIdQh5_D.js} +20 -20
- package/dist/_chunks/PkStreamingMarkdown-rIdQh5_D.js.map +1 -0
- package/dist/_chunks/{PkToolShowArtifact-D-dU41VG.js → PkToolShowArtifact-CeLgwZBA.js} +6 -6
- package/dist/_chunks/{PkToolShowArtifact-D-dU41VG.js.map → PkToolShowArtifact-CeLgwZBA.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-B33fWbkk.js → PkToolShowCalendarEvent-cQpAAE3a.js} +10 -10
- package/dist/_chunks/{PkToolShowCalendarEvent-B33fWbkk.js.map → PkToolShowCalendarEvent-cQpAAE3a.js.map} +1 -1
- package/dist/_chunks/{PkToolShowComparison-CcKHsr36.js → PkToolShowComparison-Cu-zT8-Z.js} +6 -6
- package/dist/_chunks/{PkToolShowComparison-CcKHsr36.js.map → PkToolShowComparison-Cu-zT8-Z.js.map} +1 -1
- package/dist/_chunks/PkToolShowContactForm-CqoSVvjG.js +1658 -0
- package/dist/_chunks/PkToolShowContactForm-CqoSVvjG.js.map +1 -0
- package/dist/_chunks/{PkToolShowEmail-BOivL2p_.js → PkToolShowEmail-oLGym0R9.js} +10 -10
- package/dist/_chunks/{PkToolShowEmail-BOivL2p_.js.map → PkToolShowEmail-oLGym0R9.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-Dy0vFEU-.js → PkToolShowImageGallery-CDXSL1Mg.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-Dy0vFEU-.js.map → PkToolShowImageGallery-CDXSL1Mg.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-US6u26ra.js → PkToolShowLocation-BtRUdoEw.js} +7 -7
- package/dist/_chunks/{PkToolShowLocation-US6u26ra.js.map → PkToolShowLocation-BtRUdoEw.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMessage-Cjslxq94.js → PkToolShowMessage-tJQGRhce.js} +9 -9
- package/dist/_chunks/{PkToolShowMessage-Cjslxq94.js.map → PkToolShowMessage-tJQGRhce.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMultipleChoice-BEwiJCLu.js → PkToolShowMultipleChoice-CtVvdyDg.js} +3 -3
- package/dist/_chunks/{PkToolShowMultipleChoice-BEwiJCLu.js.map → PkToolShowMultipleChoice-CtVvdyDg.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-D3Qe8yQM.js → PkToolShowProductList-D_k6CDdb.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-D3Qe8yQM.js.map → PkToolShowProductList-D_k6CDdb.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-B64sdI0N.js → PkToolShowQrCode-S1j_T8wQ.js} +6 -6
- package/dist/_chunks/{PkToolShowQrCode-B64sdI0N.js.map → PkToolShowQrCode-S1j_T8wQ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-B2rf94fU.js → PkToolShowSources-CroItMtG.js} +6 -5
- package/dist/_chunks/PkToolShowSources-CroItMtG.js.map +1 -0
- package/dist/_chunks/{PkToolShowSuggestedReply-BGWA08C7.js → PkToolShowSuggestedReply-BRa5Lpti.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-BGWA08C7.js.map → PkToolShowSuggestedReply-BRa5Lpti.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-ClMzD04y.js → PkToolShowWeather-CUpCJ8Nj.js} +3 -3
- package/dist/_chunks/{PkToolShowWeather-ClMzD04y.js.map → PkToolShowWeather-CUpCJ8Nj.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BCqywwEK.js → PkToolShowWebPages-f-dHyxfD.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-BCqywwEK.js.map → PkToolShowWebPages-f-dHyxfD.js.map} +1 -1
- package/dist/_chunks/{VvCheckbox.es-kmMsWlkU.js → VvCheckbox.es-BF8Mdg0O.js} +2 -2
- package/dist/_chunks/{VvCheckbox.es-kmMsWlkU.js.map → VvCheckbox.es-BF8Mdg0O.js.map} +1 -1
- package/dist/_chunks/{VvCheckboxGroup.es-BRRmuO9h.js → VvCheckboxGroup.es-BJc8MmJ3.js} +109 -109
- package/dist/_chunks/{VvCheckboxGroup.es-BRRmuO9h.js.map → VvCheckboxGroup.es-BJc8MmJ3.js.map} +1 -1
- package/dist/_chunks/{VvCombobox.es-pTM53Z4B.js → VvCombobox.es-ILRHqAye.js} +256 -256
- package/dist/_chunks/{VvCombobox.es-pTM53Z4B.js.map → VvCombobox.es-ILRHqAye.js.map} +1 -1
- package/dist/_chunks/{VvInputText.es-DO39OSWk.js → VvInputText.es-CDnMeO26.js} +190 -190
- package/dist/_chunks/{VvInputText.es-DO39OSWk.js.map → VvInputText.es-CDnMeO26.js.map} +1 -1
- package/dist/_chunks/{VvRadio.es-BpQAJbon.js → VvRadio.es-C2p5vvAx.js} +2 -2
- package/dist/_chunks/{VvRadio.es-BpQAJbon.js.map → VvRadio.es-C2p5vvAx.js.map} +1 -1
- package/dist/_chunks/{VvRadioGroup.es-BSBrmx9w.js → VvRadioGroup.es-6GlWuDjY.js} +10 -10
- package/dist/_chunks/{VvRadioGroup.es-BSBrmx9w.js.map → VvRadioGroup.es-6GlWuDjY.js.map} +1 -1
- package/dist/_chunks/{VvSelect.es-DALpUK5j.js → VvSelect.es-i4lO9onq.js} +6 -6
- package/dist/_chunks/{VvSelect.es-DALpUK5j.js.map → VvSelect.es-i4lO9onq.js.map} +1 -1
- package/dist/_chunks/{VvTextarea.es-C9dwYLOG.js → VvTextarea.es-CGpiCS4S.js} +248 -248
- package/dist/_chunks/{VvTextarea.es-C9dwYLOG.js.map → VvTextarea.es-CGpiCS4S.js.map} +1 -1
- package/dist/_chunks/{dist-DtF6poRc.js → dist-BTnzL-m0.js} +131 -119
- package/dist/_chunks/dist-BTnzL-m0.js.map +1 -0
- package/dist/_chunks/{index.es-Z3Hu-QIb.js → index.es-CUjDCkXD.js} +2428 -1558
- package/dist/_chunks/{index.es-Z3Hu-QIb.js.map → index.es-CUjDCkXD.js.map} +1 -1
- package/dist/_chunks/{schemas-Bp3a8tYV.js → schemas-aPiXCaCc.js} +1309 -945
- package/dist/_chunks/schemas-aPiXCaCc.js.map +1 -0
- package/dist/ai-elements.es.js +4746 -3352
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotFeedbackForm.js +1 -1
- package/dist-vue/PkChatbotFilePreview.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Media-Bic_vfSX.js → Media-CXQSoKqt.js} +3 -3
- package/dist-vue/_chunks/{Media-Bic_vfSX.js.map → Media-CXQSoKqt.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbot-DAzGc7al.js +190 -0
- package/dist-vue/_chunks/{PkChatbot-D5_ytfqS.js.map → PkChatbot-DAzGc7al.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-CUnS-WyR.js → PkChatbotFeedbackForm-DvUzirPP.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-CUnS-WyR.js.map → PkChatbotFeedbackForm-DvUzirPP.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFilePreview-JSpi3pmN.js → PkChatbotFilePreview-DHzuGtz5.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFilePreview-JSpi3pmN.js.map → PkChatbotFilePreview-DHzuGtz5.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-ODPhsqZt.js → PkChatbotInput-C5QSmt21.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotInput-ODPhsqZt.js.map → PkChatbotInput-C5QSmt21.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-CMLqkhmb.js → PkChatbotMessages-dsjB0-26.js} +16 -16
- package/dist-vue/_chunks/PkChatbotMessages-dsjB0-26.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-wLCypxNG.js → PkChatbotViewChat-CjoezIyz.js} +9 -9
- package/dist-vue/_chunks/{PkChatbotViewChat-wLCypxNG.js.map → PkChatbotViewChat-CjoezIyz.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-DSQu6vY1.js +163 -0
- package/dist-vue/_chunks/PkChatbotViewConversations-DSQu6vY1.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewProfile-CXmmVXrD.js → PkChatbotViewProfile-BJJiaG9H.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-CXmmVXrD.js.map → PkChatbotViewProfile-BJJiaG9H.js.map} +1 -1
- package/dist-vue/_chunks/{PkRelativeTime-jP41qAJ5.js → PkRelativeTime-WZ2aPcp_.js} +1 -1
- package/dist-vue/_chunks/{PkRelativeTime-jP41qAJ5.js.map → PkRelativeTime-WZ2aPcp_.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-CtiMH6FD.js → PkStreamingMarkdown-BAhC3uGK.js} +20 -20
- package/dist-vue/_chunks/PkStreamingMarkdown-BAhC3uGK.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowArtifact-C2DgB_1z.js → PkToolShowArtifact-RzrDPcEQ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-C2DgB_1z.js.map → PkToolShowArtifact-RzrDPcEQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BzzbXuhh.js → PkToolShowContactForm-r_GgO-ZX.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowContactForm-BzzbXuhh.js.map → PkToolShowContactForm-r_GgO-ZX.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-DQXrJYop.js → PkToolShowImageGallery-B7Bt6ZGv.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-DQXrJYop.js.map → PkToolShowImageGallery-B7Bt6ZGv.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowLocation-McDIqI8y.js → PkToolShowLocation-DteWf0Cs.js} +1 -1
- package/dist-vue/_chunks/{PkToolShowLocation-McDIqI8y.js.map → PkToolShowLocation-DteWf0Cs.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowMultipleChoice-DW3m6VbJ.js → PkToolShowMultipleChoice-DZXfWtQp.js} +1 -1
- package/dist-vue/_chunks/{PkToolShowMultipleChoice-DW3m6VbJ.js.map → PkToolShowMultipleChoice-DZXfWtQp.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-BDSJs7bn.js → PkToolShowProductList-CtqWK0x4.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-BDSJs7bn.js.map → PkToolShowProductList-CtqWK0x4.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-D5cBZxwQ.js → PkToolShowSources-DK2DCvU3.js} +6 -5
- package/dist-vue/_chunks/PkToolShowSources-DK2DCvU3.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Dm3BTWYg.js → PkToolShowSuggestedReply-30m9yWDL.js} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Dm3BTWYg.js.map → PkToolShowSuggestedReply-30m9yWDL.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-DnYVhLVU.js → PkToolShowWebPages-DZIdrdWs.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-DnYVhLVU.js.map → PkToolShowWebPages-DZIdrdWs.js.map} +1 -1
- package/dist-vue/_chunks/{PkUrl-CH4pWBR8.js → PkUrl-CGbSBfuP.js} +1 -1
- package/dist-vue/_chunks/{PkUrl-CH4pWBR8.js.map → PkUrl-CGbSBfuP.js.map} +1 -1
- package/dist-vue/_chunks/{ZodError-Ca0wCsGp.js → ZodError-C_est8SY.js} +2 -2
- package/dist-vue/_chunks/{ZodError-Ca0wCsGp.js.map → ZodError-C_est8SY.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-2ynLWELM.js → createChatbotApiClient-f86KwRcq.js} +141 -119
- package/dist-vue/_chunks/createChatbotApiClient-f86KwRcq.js.map +1 -0
- package/dist-vue/_chunks/{dist-Bs6dYy7x.js → dist-21vPGg1O.js} +3 -3
- package/dist-vue/_chunks/{dist-Bs6dYy7x.js.map → dist-21vPGg1O.js.map} +1 -1
- package/dist-vue/_chunks/{dist-Bb1zRSg4.js → dist-BGXTbYew2.js} +4 -4
- package/dist-vue/_chunks/dist-BGXTbYew2.js.map +1 -0
- package/dist-vue/_chunks/{dist-BrlD3co0.js → dist-BL9cumqH.js} +2 -2
- package/dist-vue/_chunks/{dist-BrlD3co0.js.map → dist-BL9cumqH.js.map} +1 -1
- package/dist-vue/_chunks/{dist-B9Pw4_a5.js → dist-BU-VgsYM.js} +3 -3
- package/dist-vue/_chunks/{dist-B9Pw4_a5.js.map → dist-BU-VgsYM.js.map} +1 -1
- package/dist-vue/_chunks/{dist-D-tjAaHK.js → dist-BU5m1pTR.js} +3 -3
- package/dist-vue/_chunks/{dist-D-tjAaHK.js.map → dist-BU5m1pTR.js.map} +1 -1
- package/dist-vue/_chunks/{dist-Dn0cKZ5Q.js → dist-BbP2I_Or.js} +2 -2
- package/dist-vue/_chunks/{dist-Dn0cKZ5Q.js.map → dist-BbP2I_Or.js.map} +1 -1
- package/dist-vue/_chunks/{dist-Cvsv0YEw.js → dist-BvmTki6w.js} +3 -3
- package/dist-vue/_chunks/{dist-Cvsv0YEw.js.map → dist-BvmTki6w.js.map} +1 -1
- package/dist-vue/_chunks/{dist-QzbLuLIV.js → dist-C3dPzENq.js} +3 -3
- package/dist-vue/_chunks/{dist-QzbLuLIV.js.map → dist-C3dPzENq.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BMWOJZqC.js → dist-C6AWJq9a.js} +2 -2
- package/dist-vue/_chunks/{dist-BMWOJZqC.js.map → dist-C6AWJq9a.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BQCdUoYc.js → dist-CGNGkvWf.js} +4 -4
- package/dist-vue/_chunks/{dist-BQCdUoYc.js.map → dist-CGNGkvWf.js.map} +1 -1
- package/dist-vue/_chunks/{dist-JOgG1zY3.js → dist-CIN_Avbm.js} +1 -1
- package/dist-vue/_chunks/{dist-JOgG1zY3.js.map → dist-CIN_Avbm.js.map} +1 -1
- package/dist-vue/_chunks/{dist-NKG-Bt-Q.js → dist-CePpgudw.js} +3 -3
- package/dist-vue/_chunks/{dist-NKG-Bt-Q.js.map → dist-CePpgudw.js.map} +1 -1
- package/dist-vue/_chunks/{dist-C13mHkC-.js → dist-CtMo7ig_.js} +2 -2
- package/dist-vue/_chunks/{dist-C13mHkC-.js.map → dist-CtMo7ig_.js.map} +1 -1
- package/dist-vue/_chunks/{dist-DucfoJQX.js → dist-CwG072cD.js} +3 -3
- package/dist-vue/_chunks/{dist-DucfoJQX.js.map → dist-CwG072cD.js.map} +1 -1
- package/dist-vue/_chunks/{dist-_4yQQX_L.js → dist-DFvVVU0-.js} +2 -2
- package/dist-vue/_chunks/{dist-_4yQQX_L.js.map → dist-DFvVVU0-.js.map} +1 -1
- package/dist-vue/_chunks/{dist-C_tRbeXQ.js → dist-DGz57kzK.js} +2 -2
- package/dist-vue/_chunks/{dist-C_tRbeXQ.js.map → dist-DGz57kzK.js.map} +1 -1
- package/dist-vue/_chunks/{dist-C2tC3pDh.js → dist-DT30Xa-D.js} +2 -2
- package/dist-vue/_chunks/{dist-C2tC3pDh.js.map → dist-DT30Xa-D.js.map} +1 -1
- package/dist-vue/_chunks/{dist-DNn7FqmI.js → dist-DoRhRpjL.js} +2 -2
- package/dist-vue/_chunks/{dist-DNn7FqmI.js.map → dist-DoRhRpjL.js.map} +1 -1
- package/dist-vue/_chunks/{dist-CQmgfFIN.js → dist-GnhLE5-A.js} +4 -4
- package/dist-vue/_chunks/{dist-CQmgfFIN.js.map → dist-GnhLE5-A.js.map} +1 -1
- package/dist-vue/_chunks/{dist-1ToEz3Zq.js → dist-QzWOn2Kx.js} +3 -3
- package/dist-vue/_chunks/{dist-1ToEz3Zq.js.map → dist-QzWOn2Kx.js.map} +1 -1
- package/dist-vue/_chunks/{dist-e9UFeG14.js → dist-uYEYs0EJ.js} +2 -2
- package/dist-vue/_chunks/{dist-e9UFeG14.js.map → dist-uYEYs0EJ.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BpT8aqtS.js → dist-ukeBjdwq.js} +4 -4
- package/dist-vue/_chunks/{dist-BpT8aqtS.js.map → dist-ukeBjdwq.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BHTSdHeX.js → dist-wLB8N32T.js} +3 -3
- package/dist-vue/_chunks/{dist-BHTSdHeX.js.map → dist-wLB8N32T.js.map} +1 -1
- package/dist-vue/_chunks/{index.es-BnOT0fHY.js → index.es-_14zrNZB.js} +4 -4
- package/dist-vue/_chunks/{index.es-BnOT0fHY.js.map → index.es-_14zrNZB.js.map} +1 -1
- package/dist-vue/_chunks/{schemas-sa2dDEGb.js → schemas-Clx4oKCB.js} +1309 -945
- package/dist-vue/_chunks/schemas-Clx4oKCB.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-Im8Xjwte.js → useChatbotStore-CJlkoNn7.js} +756 -679
- package/dist-vue/_chunks/useChatbotStore-CJlkoNn7.js.map +1 -0
- package/dist-vue/_chunks/{useLightbox-BiZUwsmB.js → useLightbox-1sB7fmFb.js} +1 -1
- package/dist-vue/_chunks/{useLightbox-BiZUwsmB.js.map → useLightbox-1sB7fmFb.js.map} +1 -1
- package/dist-vue/_chunks/{utils-DO7emdsn.js → utils-BegUBK7s.js} +1 -1
- package/dist-vue/_chunks/{utils-DO7emdsn.js.map → utils-BegUBK7s.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +9 -7
- package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +8 -8
- package/dist-vue/apps/web-component/src/lib.d.ts +29 -0
- package/dist-vue/apps/web-component/src/main.d.ts +0 -0
- package/dist-vue/apps/web-component/src/modules/applicationInsights.d.ts +38 -0
- package/dist-vue/composables.js +3 -3
- package/dist-vue/index.js +3680 -3664
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +56 -20
- package/dist-vue/packages/auth/src/add-member-to-organization.d.ts +5 -0
- package/dist-vue/packages/auth/src/anonymous-reauth-plugin.d.ts +11 -0
- package/dist-vue/packages/auth/src/external-auth-plugin.d.ts +2 -0
- package/dist-vue/packages/auth/src/index.d.ts +3477 -8
- package/dist-vue/packages/auth/src/media-helpers.d.ts +13 -0
- package/dist-vue/packages/auth/src/organization-auto-join.d.ts +1 -0
- package/dist-vue/packages/components/src/PkEditorMarkdown.d.ts +1 -1
- package/dist-vue/packages/components/src/PkEditorPrompt.d.ts +2 -0
- package/dist-vue/packages/components/src/PkEditorRepeater.d.ts +2 -2
- package/dist-vue/packages/components/src/PkEditorWyswyg.d.ts +1 -1
- package/dist-vue/packages/components/src/PkFieldset.d.ts +3 -3
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -3
- package/dist-vue/packages/components/src/chat/PkEditorChannels.d.ts +16 -0
- package/dist-vue/packages/components/src/composables/index.d.ts +3 -0
- package/dist-vue/packages/components/src/composables/useChatbotError.d.ts +11 -11
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +2 -0
- package/dist-vue/packages/composable/src/constants.d.ts +5 -0
- package/dist-vue/packages/composable/src/useDialog.d.ts +3 -3
- package/dist-vue/packages/composable/src/useSettingsStore.d.ts +4 -5
- package/dist-vue/packages/models/src/schema/Agent.d.ts +37 -27
- package/dist-vue/packages/models/src/schema/Chat.d.ts +6 -0
- package/dist-vue/packages/models/src/schema/Document.d.ts +2 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +8 -6
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +13 -11
- package/dist-vue/style.css +1 -1
- package/package.json +3 -3
- package/dist/_chunks/PkStreamingMarkdown-orhL2kzD.js.map +0 -1
- package/dist/_chunks/PkToolShowContactForm-SmOSbCsp.js +0 -1103
- package/dist/_chunks/PkToolShowContactForm-SmOSbCsp.js.map +0 -1
- package/dist/_chunks/PkToolShowSources-B2rf94fU.js.map +0 -1
- package/dist/_chunks/dist-DtF6poRc.js.map +0 -1
- package/dist/_chunks/schemas-Bp3a8tYV.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-D5_ytfqS.js +0 -190
- package/dist-vue/_chunks/PkChatbotMessages-CMLqkhmb.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-B5qBiqo4.js +0 -40
- package/dist-vue/_chunks/PkChatbotViewConversations-B5qBiqo4.js.map +0 -1
- package/dist-vue/_chunks/PkStreamingMarkdown-CtiMH6FD.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowSources-D5cBZxwQ.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-2ynLWELM.js.map +0 -1
- package/dist-vue/_chunks/dist-Bb1zRSg4.js.map +0 -1
- package/dist-vue/_chunks/schemas-sa2dDEGb.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-Im8Xjwte.js.map +0 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLightbox-BiZUwsmB.js","names":[],"sources":["../../../../packages/components/src/composables/useLightbox.ts"],"sourcesContent":["import {\n onBeforeUnmount,\n ref,\n shallowRef,\n type Ref,\n type ShallowRef,\n} from 'vue'\nimport type PhotoSwipeLightbox from 'photoswipe/lightbox'\nimport type PhotoSwipe from 'photoswipe'\nimport { loadCdnCss } from 'utils'\n\nconst PHOTOSWIPE_CSS =\n 'https://cdn.jsdelivr.net/npm/photoswipe@5/dist/photoswipe.css'\n\nconst DEFAULT_IMAGE_SIZE = { width: 1200, height: 800 }\n\nexport interface LightboxImage {\n url: string\n caption?: string\n alt?: string\n /** Natural width in px — used by PhotoSwipe for proper sizing. */\n width?: number\n /** Natural height in px — used by PhotoSwipe for proper sizing. */\n height?: number\n}\n\nexport interface LightboxOptions {\n /** Container element whose child anchors are the gallery items */\n gallery: Ref<HTMLElement | undefined>\n /** CSS selector for gallery items inside the container (default: `'a[data-pswp-src]'`) */\n children?: string\n loop?: boolean\n /** Show a download button in the lightbox toolbar */\n downloadable?: boolean\n /** Show an open-in-new-tab button in the lightbox toolbar */\n openInNewTab?: boolean\n}\n\nexport interface UseLightboxReturn {\n lightbox: ShallowRef<PhotoSwipeLightbox | null>\n /** Initialises PhotoSwipe. Call this inside `onMounted`. */\n init: () => Promise<void>\n}\n\n/**\n * Encapsulates PhotoSwipe 5 initialisation, toolbar customisation, and lifecycle cleanup.\n * CSS is injected into `document.head` so the overlay works in both regular DOM and Shadow DOM.\n *\n * Usage:\n * ```ts\n * const { init } = useLightbox({ gallery: galleryRef, downloadable: true })\n * onMounted(init)\n * ```\n */\nexport function useLightbox(options: LightboxOptions): UseLightboxReturn {\n const {\n gallery,\n children = 'a[data-pswp-src]',\n loop = true,\n downloadable = true,\n openInNewTab = true,\n } = options\n\n const lightbox = shallowRef<PhotoSwipeLightbox | null>(null)\n\n const init = async () => {\n if (!gallery.value) {\n return\n }\n\n // PhotoSwipe renders its overlay into document.body, so CSS must be in\n // document.head — not inside a shadow root.\n loadCdnCss(PHOTOSWIPE_CSS)\n injectPhotoSwipeOverrides()\n\n const { default: PhotoSwipeLightbox } =\n await import('photoswipe/lightbox')\n\n lightbox.value = new PhotoSwipeLightbox({\n gallery: gallery.value,\n children,\n pswpModule: () => import('photoswipe'),\n loop,\n arrowPrevSVG:\n '<svg aria-hidden=\"true\" class=\"pswp__icn\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"#ffffff\" d=\"m10.828 12l4.95 4.95l-1.414 1.415L8 12l6.364-6.364l1.414 1.414z\"/></svg>',\n arrowNextSVG:\n '<svg aria-hidden=\"true\" class=\"pswp__icn\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"#ffffff\" d=\"m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z\"/></svg>',\n closeSVG:\n '<svg aria-hidden=\"true\" class=\"pswp__icn\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"#ffffff\" d=\"m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z\"/></svg>',\n zoomSVG:\n '<svg aria-hidden=\"true\" class=\"pswp__icn\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><g class=\"pswp__icn--zoom-in\"><path fill=\"#ffffff\" d=\"m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975zM10 10V7h2v3h3v2h-3v3h-2v-3H7v-2z\"/></g><g class=\"pswp__icn--zoom-out\"><path fill=\"#ffffff\" d=\"m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975zM7 10h8v2H7z\"/></g></svg>',\n })\n\n if (openInNewTab || downloadable) {\n lightbox.value.on('uiRegister', () => {\n const ui = lightbox.value!.pswp?.ui\n if (!ui) {\n return\n }\n\n if (openInNewTab) {\n ui.registerElement({\n name: 'open-in-new-tab-button',\n order: 8,\n isButton: true,\n html: '<svg aria-hidden=\"true\" class=\"pswp__icn\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"#ffffff\" d=\"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm11-3v8h-2V6.413l-7.793 7.794l-1.414-1.414L17.585 5H13V3z\"/></svg>',\n title: 'Open in new tab',\n onClick: (_, __, pswp) => {\n const url = getCurrentSlideUrl(pswp)\n if (url) {\n window.open(\n url,\n '_blank',\n 'noopener,noreferrer',\n )\n }\n },\n })\n }\n\n if (downloadable) {\n ui.registerElement({\n name: 'download-button',\n order: 9,\n isButton: true,\n html: '<svg aria-hidden=\"true\" class=\"pswp__icn\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"#ffffff\" d=\"M3 19h18v2H3zm10-5.828L19.071 7.1l1.414 1.414L12 17L3.515 8.515L4.929 7.1L11 13.173V2h2z\"/></svg>',\n title: 'Download',\n onClick: (_, __, pswp) => {\n const url = getCurrentSlideUrl(pswp)\n if (url) {\n downloadImage(url)\n }\n },\n })\n }\n })\n }\n\n lightbox.value.init()\n }\n\n onBeforeUnmount(() => {\n lightbox.value?.destroy()\n lightbox.value = null\n })\n\n return { lightbox, init }\n}\n\n// ---------------------------------------------------------------------------\n// Image size preloading\n// ---------------------------------------------------------------------------\n\nexport interface UseImageSizesReturn {\n preload: (\n images: Array<{ url: string; width?: number; height?: number }>,\n ) => void\n getSize: (url: string) => { width: number; height: number }\n}\n\n/**\n * Preloads natural image dimensions so PhotoSwipe can size its slides correctly.\n * When `width`/`height` are already provided they are used as-is;\n * otherwise the image is loaded in the background to read `naturalWidth`/`naturalHeight`.\n */\nexport function useImageSizes(): UseImageSizesReturn {\n const sizes = ref(new Map<string, { width: number; height: number }>())\n\n const preload = (\n images: Array<{ url: string; width?: number; height?: number }>,\n ) => {\n for (const image of images) {\n if (image.width && image.height) {\n sizes.value.set(image.url, {\n width: image.width,\n height: image.height,\n })\n continue\n }\n const img = new Image()\n img.onload = () => {\n sizes.value.set(image.url, {\n width: img.naturalWidth,\n height: img.naturalHeight,\n })\n }\n img.src = image.url\n }\n }\n\n const getSize = (url: string) => sizes.value.get(url) ?? DEFAULT_IMAGE_SIZE\n\n return { preload, getSize }\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction getCurrentSlideUrl(pswp: PhotoSwipe): string | undefined {\n return (\n pswp.currSlide?.data?.src ??\n pswp.currSlide?.data?.element\n ?.querySelector('img')\n ?.getAttribute('src') ??\n undefined\n )\n}\n\n/**\n * Triggers a client-side download for an image URL.\n *\n * For backend media URLs (.../media/:file/view), navigates to the\n * corresponding /download endpoint which redirects to an Azure SAS URL\n * with `Content-Disposition: attachment` — no CORS issues.\n *\n * For blob: URLs (in-session uploads), uses the fetch → blob approach.\n *\n * Falls back to opening in a new tab for all other cases.\n */\nfunction downloadImage(url: string): void {\n const downloadUrl = toDownloadUrl(url)\n\n const anchor = document.createElement('a')\n anchor.href = downloadUrl\n anchor.target = '_blank'\n anchor.rel = 'noopener noreferrer'\n // `download` attribute works for same-origin and blob: URLs; for\n // cross-origin it is ignored but the browser still follows Content-Disposition.\n anchor.download = getFilenameFromUrl(url)\n document.body.appendChild(anchor)\n anchor.click()\n document.body.removeChild(anchor)\n}\n\n/**\n * Converts a `/view` media URL to its `/download` counterpart.\n * Leaves blob: and all other URLs untouched.\n */\nfunction toDownloadUrl(url: string): string {\n return url.replace(/\\/view(\\?|$)/, '/download$1')\n}\n\nfunction getFilenameFromUrl(url: string): string {\n try {\n const pathname = new URL(url).pathname\n const name = pathname.split('/').pop()\n return name && name.includes('.') ? name : 'image'\n } catch {\n return 'image'\n }\n}\n\nlet overridesInjected = false\n\n/**\n * Injects a one-time `<style>` into `document.head` that raises\n * PhotoSwipe's z-index above any host UI (e.g. floating chat widgets\n * that use `z-index: 2147483647`).\n */\nfunction injectPhotoSwipeOverrides(): void {\n if (overridesInjected) {\n return\n }\n overridesInjected = true\n const style = document.createElement('style')\n style.textContent = [\n '.pswp { z-index: 2147483647 !important; }',\n '.pswp__icn { width: 20px; height: 20px; }',\n '.pswp__button { width: 40px; height: 40px; }',\n '.pswp__icn--zoom-out { display: none; }',\n '.pswp--zoomed-in .pswp__icn--zoom-in { display: none; }',\n '.pswp--zoomed-in .pswp__icn--zoom-out { display: block; }',\n ].join(' ')\n document.head.appendChild(style)\n}\n"],"mappings":";;;AAWA,IAAM,IACF,iEAEE,IAAqB;CAAE,OAAO;CAAM,QAAQ;CAAK;AAwCvD,SAAgB,EAAY,GAA6C;CACrE,IAAM,EACF,YACA,cAAW,oBACX,UAAO,IACP,kBAAe,IACf,kBAAe,OACf,GAEE,IAAW,EAAsC,KAAK;AAmF5D,QALA,QAAsB;AAElB,EADA,EAAS,OAAO,SAAS,EACzB,EAAS,QAAQ;GACnB,EAEK;EAAE;EAAU,kBAjFM;AACrB,OAAI,CAAC,EAAQ,MACT;AAMJ,GADA,EAAW,EAAe,EAC1B,GAA2B;GAE3B,IAAM,EAAE,SAAS,MACb,MAAM,OAAO;AA8DjB,GA5DA,EAAS,QAAQ,IAAI,EAAmB;IACpC,SAAS,EAAQ;IACjB;IACA,kBAAkB,OAAO;IACzB;IACA,cACI;IACJ,cACI;IACJ,UACI;IACJ,SACI;IACP,CAAC,GAEE,KAAgB,MAChB,EAAS,MAAM,GAAG,oBAAoB;IAClC,IAAM,IAAK,EAAS,MAAO,MAAM;AAC5B,UAID,KACA,EAAG,gBAAgB;KACf,MAAM;KACN,OAAO;KACP,UAAU;KACV,MAAM;KACN,OAAO;KACP,UAAU,GAAG,GAAI,MAAS;MACtB,IAAM,IAAM,EAAmB,EAAK;AACpC,MAAI,KACA,OAAO,KACH,GACA,UACA,sBACH;;KAGZ,CAAC,EAGF,KACA,EAAG,gBAAgB;KACf,MAAM;KACN,OAAO;KACP,UAAU;KACV,MAAM;KACN,OAAO;KACP,UAAU,GAAG,GAAI,MAAS;MACtB,IAAM,IAAM,EAAmB,EAAK;AACpC,MAAI,KACA,EAAc,EAAI;;KAG7B,CAAC;KAER,EAGN,EAAS,MAAM,MAAM;;EAQA;;AAmB7B,SAAgB,IAAqC;CACjD,IAAM,IAAQ,kBAAI,IAAI,KAAgD,CAAC;AA0BvE,QAAO;EAAE,UAvBL,MACC;AACD,QAAK,IAAM,KAAS,GAAQ;AACxB,QAAI,EAAM,SAAS,EAAM,QAAQ;AAC7B,OAAM,MAAM,IAAI,EAAM,KAAK;MACvB,OAAO,EAAM;MACb,QAAQ,EAAM;MACjB,CAAC;AACF;;IAEJ,IAAM,IAAM,IAAI,OAAO;AAOvB,IANA,EAAI,eAAe;AACf,OAAM,MAAM,IAAI,EAAM,KAAK;MACvB,OAAO,EAAI;MACX,QAAQ,EAAI;MACf,CAAC;OAEN,EAAI,MAAM,EAAM;;;EAMN,UAFD,MAAgB,EAAM,MAAM,IAAI,EAAI,IAAI;EAE9B;;AAO/B,SAAS,EAAmB,GAAsC;AAC9D,QACI,EAAK,WAAW,MAAM,OACtB,EAAK,WAAW,MAAM,SAChB,cAAc,MAAM,EACpB,aAAa,MAAM,IACzB,KAAA;;AAeR,SAAS,EAAc,GAAmB;CACtC,IAAM,IAAc,EAAc,EAAI,EAEhC,IAAS,SAAS,cAAc,IAAI;AAS1C,CARA,EAAO,OAAO,GACd,EAAO,SAAS,UAChB,EAAO,MAAM,uBAGb,EAAO,WAAW,EAAmB,EAAI,EACzC,SAAS,KAAK,YAAY,EAAO,EACjC,EAAO,OAAO,EACd,SAAS,KAAK,YAAY,EAAO;;AAOrC,SAAS,EAAc,GAAqB;AACxC,QAAO,EAAI,QAAQ,gBAAgB,cAAc;;AAGrD,SAAS,EAAmB,GAAqB;AAC7C,KAAI;EAEA,IAAM,IADW,IAAI,IAAI,EAAI,CAAC,SACR,MAAM,IAAI,CAAC,KAAK;AACtC,SAAO,KAAQ,EAAK,SAAS,IAAI,GAAG,IAAO;SACvC;AACJ,SAAO;;;AAIf,IAAI,IAAoB;AAOxB,SAAS,IAAkC;AACvC,KAAI,EACA;AAEJ,KAAoB;CACpB,IAAM,IAAQ,SAAS,cAAc,QAAQ;AAS7C,CARA,EAAM,cAAc;EAChB;EACA;EACA;EACA;EACA;EACA;EACH,CAAC,KAAK,IAAI,EACX,SAAS,KAAK,YAAY,EAAM"}
|
|
1
|
+
{"version":3,"file":"useLightbox-1sB7fmFb.js","names":[],"sources":["../../../../packages/components/src/composables/useLightbox.ts"],"sourcesContent":["import {\n onBeforeUnmount,\n ref,\n shallowRef,\n type Ref,\n type ShallowRef,\n} from 'vue'\nimport type PhotoSwipeLightbox from 'photoswipe/lightbox'\nimport type PhotoSwipe from 'photoswipe'\nimport { loadCdnCss } from 'utils'\n\nconst PHOTOSWIPE_CSS =\n 'https://cdn.jsdelivr.net/npm/photoswipe@5/dist/photoswipe.css'\n\nconst DEFAULT_IMAGE_SIZE = { width: 1200, height: 800 }\n\nexport interface LightboxImage {\n url: string\n caption?: string\n alt?: string\n /** Natural width in px — used by PhotoSwipe for proper sizing. */\n width?: number\n /** Natural height in px — used by PhotoSwipe for proper sizing. */\n height?: number\n}\n\nexport interface LightboxOptions {\n /** Container element whose child anchors are the gallery items */\n gallery: Ref<HTMLElement | undefined>\n /** CSS selector for gallery items inside the container (default: `'a[data-pswp-src]'`) */\n children?: string\n loop?: boolean\n /** Show a download button in the lightbox toolbar */\n downloadable?: boolean\n /** Show an open-in-new-tab button in the lightbox toolbar */\n openInNewTab?: boolean\n}\n\nexport interface UseLightboxReturn {\n lightbox: ShallowRef<PhotoSwipeLightbox | null>\n /** Initialises PhotoSwipe. Call this inside `onMounted`. */\n init: () => Promise<void>\n}\n\n/**\n * Encapsulates PhotoSwipe 5 initialisation, toolbar customisation, and lifecycle cleanup.\n * CSS is injected into `document.head` so the overlay works in both regular DOM and Shadow DOM.\n *\n * Usage:\n * ```ts\n * const { init } = useLightbox({ gallery: galleryRef, downloadable: true })\n * onMounted(init)\n * ```\n */\nexport function useLightbox(options: LightboxOptions): UseLightboxReturn {\n const {\n gallery,\n children = 'a[data-pswp-src]',\n loop = true,\n downloadable = true,\n openInNewTab = true,\n } = options\n\n const lightbox = shallowRef<PhotoSwipeLightbox | null>(null)\n\n const init = async () => {\n if (!gallery.value) {\n return\n }\n\n // PhotoSwipe renders its overlay into document.body, so CSS must be in\n // document.head — not inside a shadow root.\n loadCdnCss(PHOTOSWIPE_CSS)\n injectPhotoSwipeOverrides()\n\n const { default: PhotoSwipeLightbox } =\n await import('photoswipe/lightbox')\n\n lightbox.value = new PhotoSwipeLightbox({\n gallery: gallery.value,\n children,\n pswpModule: () => import('photoswipe'),\n loop,\n arrowPrevSVG:\n '<svg aria-hidden=\"true\" class=\"pswp__icn\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"#ffffff\" d=\"m10.828 12l4.95 4.95l-1.414 1.415L8 12l6.364-6.364l1.414 1.414z\"/></svg>',\n arrowNextSVG:\n '<svg aria-hidden=\"true\" class=\"pswp__icn\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"#ffffff\" d=\"m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z\"/></svg>',\n closeSVG:\n '<svg aria-hidden=\"true\" class=\"pswp__icn\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"#ffffff\" d=\"m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z\"/></svg>',\n zoomSVG:\n '<svg aria-hidden=\"true\" class=\"pswp__icn\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><g class=\"pswp__icn--zoom-in\"><path fill=\"#ffffff\" d=\"m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975zM10 10V7h2v3h3v2h-3v3h-2v-3H7v-2z\"/></g><g class=\"pswp__icn--zoom-out\"><path fill=\"#ffffff\" d=\"m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975zM7 10h8v2H7z\"/></g></svg>',\n })\n\n if (openInNewTab || downloadable) {\n lightbox.value.on('uiRegister', () => {\n const ui = lightbox.value!.pswp?.ui\n if (!ui) {\n return\n }\n\n if (openInNewTab) {\n ui.registerElement({\n name: 'open-in-new-tab-button',\n order: 8,\n isButton: true,\n html: '<svg aria-hidden=\"true\" class=\"pswp__icn\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"#ffffff\" d=\"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm11-3v8h-2V6.413l-7.793 7.794l-1.414-1.414L17.585 5H13V3z\"/></svg>',\n title: 'Open in new tab',\n onClick: (_, __, pswp) => {\n const url = getCurrentSlideUrl(pswp)\n if (url) {\n window.open(\n url,\n '_blank',\n 'noopener,noreferrer',\n )\n }\n },\n })\n }\n\n if (downloadable) {\n ui.registerElement({\n name: 'download-button',\n order: 9,\n isButton: true,\n html: '<svg aria-hidden=\"true\" class=\"pswp__icn\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"#ffffff\" d=\"M3 19h18v2H3zm10-5.828L19.071 7.1l1.414 1.414L12 17L3.515 8.515L4.929 7.1L11 13.173V2h2z\"/></svg>',\n title: 'Download',\n onClick: (_, __, pswp) => {\n const url = getCurrentSlideUrl(pswp)\n if (url) {\n downloadImage(url)\n }\n },\n })\n }\n })\n }\n\n lightbox.value.init()\n }\n\n onBeforeUnmount(() => {\n lightbox.value?.destroy()\n lightbox.value = null\n })\n\n return { lightbox, init }\n}\n\n// ---------------------------------------------------------------------------\n// Image size preloading\n// ---------------------------------------------------------------------------\n\nexport interface UseImageSizesReturn {\n preload: (\n images: Array<{ url: string; width?: number; height?: number }>,\n ) => void\n getSize: (url: string) => { width: number; height: number }\n}\n\n/**\n * Preloads natural image dimensions so PhotoSwipe can size its slides correctly.\n * When `width`/`height` are already provided they are used as-is;\n * otherwise the image is loaded in the background to read `naturalWidth`/`naturalHeight`.\n */\nexport function useImageSizes(): UseImageSizesReturn {\n const sizes = ref(new Map<string, { width: number; height: number }>())\n\n const preload = (\n images: Array<{ url: string; width?: number; height?: number }>,\n ) => {\n for (const image of images) {\n if (image.width && image.height) {\n sizes.value.set(image.url, {\n width: image.width,\n height: image.height,\n })\n continue\n }\n const img = new Image()\n img.onload = () => {\n sizes.value.set(image.url, {\n width: img.naturalWidth,\n height: img.naturalHeight,\n })\n }\n img.src = image.url\n }\n }\n\n const getSize = (url: string) => sizes.value.get(url) ?? DEFAULT_IMAGE_SIZE\n\n return { preload, getSize }\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction getCurrentSlideUrl(pswp: PhotoSwipe): string | undefined {\n return (\n pswp.currSlide?.data?.src ??\n pswp.currSlide?.data?.element\n ?.querySelector('img')\n ?.getAttribute('src') ??\n undefined\n )\n}\n\n/**\n * Triggers a client-side download for an image URL.\n *\n * For backend media URLs (.../media/:file/view), navigates to the\n * corresponding /download endpoint which redirects to an Azure SAS URL\n * with `Content-Disposition: attachment` — no CORS issues.\n *\n * For blob: URLs (in-session uploads), uses the fetch → blob approach.\n *\n * Falls back to opening in a new tab for all other cases.\n */\nfunction downloadImage(url: string): void {\n const downloadUrl = toDownloadUrl(url)\n\n const anchor = document.createElement('a')\n anchor.href = downloadUrl\n anchor.target = '_blank'\n anchor.rel = 'noopener noreferrer'\n // `download` attribute works for same-origin and blob: URLs; for\n // cross-origin it is ignored but the browser still follows Content-Disposition.\n anchor.download = getFilenameFromUrl(url)\n document.body.appendChild(anchor)\n anchor.click()\n document.body.removeChild(anchor)\n}\n\n/**\n * Converts a `/view` media URL to its `/download` counterpart.\n * Leaves blob: and all other URLs untouched.\n */\nfunction toDownloadUrl(url: string): string {\n return url.replace(/\\/view(\\?|$)/, '/download$1')\n}\n\nfunction getFilenameFromUrl(url: string): string {\n try {\n const pathname = new URL(url).pathname\n const name = pathname.split('/').pop()\n return name && name.includes('.') ? name : 'image'\n } catch {\n return 'image'\n }\n}\n\nlet overridesInjected = false\n\n/**\n * Injects a one-time `<style>` into `document.head` that raises\n * PhotoSwipe's z-index above any host UI (e.g. floating chat widgets\n * that use `z-index: 2147483647`).\n */\nfunction injectPhotoSwipeOverrides(): void {\n if (overridesInjected) {\n return\n }\n overridesInjected = true\n const style = document.createElement('style')\n style.textContent = [\n '.pswp { z-index: 2147483647 !important; }',\n '.pswp__icn { width: 20px; height: 20px; }',\n '.pswp__button { width: 40px; height: 40px; }',\n '.pswp__icn--zoom-out { display: none; }',\n '.pswp--zoomed-in .pswp__icn--zoom-in { display: none; }',\n '.pswp--zoomed-in .pswp__icn--zoom-out { display: block; }',\n ].join(' ')\n document.head.appendChild(style)\n}\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-
|
|
1
|
+
{"version":3,"file":"utils-BegUBK7s.js","names":[],"sources":["../../../../packages/components/src/chat/utils.ts"],"sourcesContent":["import type { UIMessage } from 'ai'\nimport {\n isTextPart,\n isFilePart,\n isToolPart,\n isReasoningPart,\n hasPartText,\n hasTextPart,\n getTextPart,\n getMessageText,\n} from 'utils'\n\nexport {\n isTextPart,\n isFilePart,\n isToolPart,\n isReasoningPart,\n hasPartText,\n hasTextPart,\n getTextPart,\n getMessageText,\n}\n\nexport function isStreamingPart(\n part: UIMessage['parts'][number] | null | undefined,\n): part is Extract<UIMessage['parts'][number], { streaming?: boolean }> {\n if (!part) return false\n if ('state' in part) {\n return part.state === 'streaming' || part.state === 'input-streaming'\n }\n return false\n}\n\nexport function getPartState(\n part: UIMessage['parts'][number] | null | undefined,\n): string | undefined {\n if (!part) return undefined\n if ('state' in part) {\n return part.state\n }\n return undefined\n}\n\nexport function isLoadingState(state?: string): boolean {\n if (!state) return false\n return ['streaming'].includes(state)\n}\n\nexport function getContrast(hexcolor: string = '000000'): 'black' | 'white' {\n let hex = hexcolor.replace('#', '')\n\n // Expand 3-character hex to 6-character (e.g., #ccc -> #cccccc)\n if (hex.length === 3) {\n hex = hex\n .split('')\n .map((char) => char + char)\n .join('')\n }\n\n // WCAG relative luminance\n const r = parseInt(hex.substring(0, 2), 16) / 255\n const g = parseInt(hex.substring(2, 4), 16) / 255\n const b = parseInt(hex.substring(4, 6), 16) / 255\n\n const linearize = (c: number) =>\n c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4\n\n const luminance =\n 0.2126 * linearize(r) + 0.7152 * linearize(g) + 0.0722 * linearize(b)\n\n return luminance > 0.179 ? 'black' : 'white'\n}\n\n/**\n * Resolves the contrast color based on the user's `textColor` preference.\n * Falls back to WCAG auto-detection via `getContrast` when set to `'auto'` or `undefined`.\n */\nexport function resolveContrastColor(\n textColor: 'auto' | 'white' | 'black' | undefined,\n mainColor: string | undefined,\n): 'black' | 'white' {\n if (textColor === 'white' || textColor === 'black') {\n return textColor\n }\n return getContrast(mainColor)\n}\n\n// Get part icon\nexport function getPartIcon(\n part?: UIMessage['parts'][number] | null,\n): string | undefined {\n if (isToolPart(part)) {\n if (part.type.includes('tool-subagent')) {\n return 'ri:robot-2-line'\n }\n if (part.type.includes('tool-mcp')) {\n return 'octicon:mcp-16'\n }\n if (part.type === 'tool-retrieveRevisedAnswers') {\n return 'ri:file-edit-line'\n }\n if (part.type === 'tool-searchInKnowledgeBase') {\n return 'ri:search-line'\n }\n if (part.type === 'tool-showMultipleChoice') {\n return 'ri:checkbox-multiple-line'\n }\n if (part.type === 'tool-showArtifact') {\n return 'ri:file-code-line'\n }\n if (part.type === 'tool-showEmail') {\n return 'ri:mail-line'\n }\n if (part.type === 'tool-showMessage') {\n return 'ri:chat-1-line'\n }\n if (part.type === 'tool-showWebPages') {\n return 'ri:pages-line'\n }\n if (part.type === 'tool-showProductList') {\n return 'ri:shopping-bag-line'\n }\n if (part.type === 'tool-showContactForm') {\n return 'ri:send-plane-2-line'\n }\n if (part.type === 'tool-showCalendarEvent') {\n return 'ri:calendar-event-line'\n }\n if (part.type === 'tool-showComparison') {\n return 'ri:scales-line'\n }\n if (part.type === 'tool-showLocation') {\n return 'ri:map-pin-line'\n }\n if (part.type === 'tool-showQrCode') {\n return 'ri:qr-code-line'\n }\n if (part.type === 'tool-showImageGallery') {\n return 'ri:image-line'\n }\n if (part.type === 'tool-showSuggestedReply') {\n return 'ri:corner-down-right-line'\n }\n if (part.type === 'tool-requestGeolocation') {\n return 'ri:map-pin-user-line'\n }\n return 'ri:tools-line'\n }\n if (isReasoningPart(part)) {\n return 'ri:lightbulb-line'\n }\n if (isTextPart(part)) {\n return 'ri:double-quotes-r'\n }\n return undefined\n}\n\n// Get part label\nexport function getToolPartLabel(\n $t: (key: string) => string,\n part?: UIMessage['parts'][number] | null,\n): string | undefined {\n if (isToolPart(part)) {\n if (part.type === 'tool-retrieveRevisedAnswers') {\n return $t(`messagePart.revisedAnswers`)\n }\n if (part.type === 'tool-searchInKnowledgeBase') {\n return $t(`messagePart.searchingDocuments`)\n }\n if (part.type === 'tool-showMultipleChoice') {\n return $t(`messagePart.showMultipleChoice`)\n }\n if (part.type === 'tool-showArtifact') {\n return $t(`messagePart.showArtifact`)\n }\n if (part.type === 'tool-showEmail') {\n return $t(`messagePart.showEmail`)\n }\n if (part.type === 'tool-showMessage') {\n return $t(`messagePart.showMessage`)\n }\n if (part.type === 'tool-showWebPages') {\n return $t(`messagePart.showWebPages`)\n }\n if (part.type === 'tool-showProducts') {\n return $t(`messagePart.showProducts`)\n }\n if (part.type === 'tool-showContactForm') {\n return $t(`messagePart.showContactForm`)\n }\n if (part.type === 'tool-showCalendarEvent') {\n return $t(`messagePart.showCalendarEvent`)\n }\n if (part.type === 'tool-showComparison') {\n return $t(`messagePart.showComparison`)\n }\n if (part.type === 'tool-showLocation') {\n return $t(`messagePart.showLocation`)\n }\n if (part.type === 'tool-showQrCode') {\n return $t(`messagePart.showQrCode`)\n }\n if (part.type === 'tool-showImageGallery') {\n return $t(`messagePart.showImageGallery`)\n }\n if (part.type === 'tool-showSuggestedReply') {\n return $t(`messagePart.showSuggestedReply`)\n }\n if (part.type === 'tool-requestGeolocation') {\n return $t(`messagePart.requestGeolocation`)\n }\n return $t(`messagePart.tool`)\n }\n if (isReasoningPart(part)) {\n return $t(`messagePart.reasoning`)\n }\n return $t(`messagePart.streaming`)\n}\n"],"mappings":";;AAuBA,SAAgB,EACZ,GACoE;AAKpE,QAJK,KACD,WAAW,IACJ,EAAK,UAAU,eAAe,EAAK,UAAU,oBAEjD;;AAGX,SAAgB,EACZ,GACkB;AACb,UACD,WAAW,EACX,QAAO,EAAK;;AAKpB,SAAgB,EAAe,GAAyB;AAEpD,QADK,IACE,CAAC,YAAY,CAAC,SAAS,EAAM,GADjB;;AAIvB,SAAgB,EAAY,IAAmB,UAA6B;CACxE,IAAI,IAAM,EAAS,QAAQ,KAAK,GAAG;AAGnC,CAAI,EAAI,WAAW,MACf,IAAM,EACD,MAAM,GAAG,CACT,KAAK,MAAS,IAAO,EAAK,CAC1B,KAAK,GAAG;CAIjB,IAAM,IAAI,SAAS,EAAI,UAAU,GAAG,EAAE,EAAE,GAAG,GAAG,KACxC,IAAI,SAAS,EAAI,UAAU,GAAG,EAAE,EAAE,GAAG,GAAG,KACxC,IAAI,SAAS,EAAI,UAAU,GAAG,EAAE,EAAE,GAAG,GAAG,KAExC,KAAa,MACf,KAAK,SAAU,IAAI,UAAU,IAAI,QAAS,UAAU;AAKxD,QAFI,QAAS,EAAU,EAAE,GAAG,QAAS,EAAU,EAAE,GAAG,QAAS,EAAU,EAAE,GAEtD,OAAQ,UAAU;;AAOzC,SAAgB,EACZ,GACA,GACiB;AAIjB,QAHI,MAAc,WAAW,MAAc,UAChC,IAEJ,EAAY,EAAU;;AAIjC,SAAgB,EACZ,GACkB;AAClB,KAAI,EAAW,EAAK,CAuDhB,QAtDI,EAAK,KAAK,SAAS,gBAAgB,GAC5B,oBAEP,EAAK,KAAK,SAAS,WAAW,GACvB,mBAEP,EAAK,SAAS,gCACP,sBAEP,EAAK,SAAS,+BACP,mBAEP,EAAK,SAAS,4BACP,8BAEP,EAAK,SAAS,sBACP,sBAEP,EAAK,SAAS,mBACP,iBAEP,EAAK,SAAS,qBACP,mBAEP,EAAK,SAAS,sBACP,kBAEP,EAAK,SAAS,yBACP,yBAEP,EAAK,SAAS,yBACP,yBAEP,EAAK,SAAS,2BACP,2BAEP,EAAK,SAAS,wBACP,mBAEP,EAAK,SAAS,sBACP,oBAEP,EAAK,SAAS,oBACP,oBAEP,EAAK,SAAS,0BACP,kBAEP,EAAK,SAAS,4BACP,8BAEP,EAAK,SAAS,4BACP,yBAEJ;AAEX,KAAI,EAAgB,EAAK,CACrB,QAAO;AAEX,KAAI,EAAW,EAAK,CAChB,QAAO;;AAMf,SAAgB,EACZ,GACA,GACkB;AAuDlB,QAtDI,EAAW,EAAK,GACZ,EAAK,SAAS,gCACP,EAAG,6BAA6B,GAEvC,EAAK,SAAS,+BACP,EAAG,iCAAiC,GAE3C,EAAK,SAAS,4BACP,EAAG,iCAAiC,GAE3C,EAAK,SAAS,sBACP,EAAG,2BAA2B,GAErC,EAAK,SAAS,mBACP,EAAG,wBAAwB,GAElC,EAAK,SAAS,qBACP,EAAG,0BAA0B,GAEpC,EAAK,SAAS,sBACP,EAAG,2BAA2B,GAErC,EAAK,SAAS,sBACP,EAAG,2BAA2B,GAErC,EAAK,SAAS,yBACP,EAAG,8BAA8B,GAExC,EAAK,SAAS,2BACP,EAAG,gCAAgC,GAE1C,EAAK,SAAS,wBACP,EAAG,6BAA6B,GAEvC,EAAK,SAAS,sBACP,EAAG,2BAA2B,GAErC,EAAK,SAAS,oBACP,EAAG,yBAAyB,GAEnC,EAAK,SAAS,0BACP,EAAG,+BAA+B,GAEzC,EAAK,SAAS,4BACP,EAAG,iCAAiC,GAE3C,EAAK,SAAS,4BACP,EAAG,iCAAiC,GAExC,EAAG,mBAAmB,GAE7B,EAAgB,EAAK,GACd,EAAG,wBAAwB,GAE/B,EAAG,wBAAwB"}
|
package/dist-vue/api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./_chunks/createChatbotApiClient-
|
|
1
|
+
import { t as e } from "./_chunks/createChatbotApiClient-f86KwRcq.js";
|
|
2
2
|
export { e as createChatbotApiClient };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MaybeRefOrGetter
|
|
2
|
-
import { AgentStatus, AgentVisibility, AgentLoaderStrategy, StoragePolicy } from '../../../../packages/models/src';
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { AgentStatus, AgentVisibility, AgentLoaderStrategy, StoragePolicy, AgentChannel } from '../../../../packages/models/src';
|
|
3
3
|
export declare function useChatbotAgent(options: {
|
|
4
4
|
baseUrl?: string;
|
|
5
5
|
basePath?: string;
|
|
@@ -7,7 +7,7 @@ export declare function useChatbotAgent(options: {
|
|
|
7
7
|
agentId?: MaybeRefOrGetter<string>;
|
|
8
8
|
headers?: MaybeRefOrGetter<Record<string, string> | undefined>;
|
|
9
9
|
}): {
|
|
10
|
-
agent: Ref<{
|
|
10
|
+
agent: globalThis.Ref<{
|
|
11
11
|
id: string;
|
|
12
12
|
name: string;
|
|
13
13
|
status: AgentStatus;
|
|
@@ -114,6 +114,7 @@ export declare function useChatbotAgent(options: {
|
|
|
114
114
|
maxFilesPerChat: number;
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
|
+
channels: AgentChannel[];
|
|
117
118
|
logo?: string | undefined;
|
|
118
119
|
} | undefined, {
|
|
119
120
|
id: string;
|
|
@@ -222,12 +223,13 @@ export declare function useChatbotAgent(options: {
|
|
|
222
223
|
maxFilesPerChat: number;
|
|
223
224
|
};
|
|
224
225
|
};
|
|
226
|
+
channels: AgentChannel[];
|
|
225
227
|
logo?: string | undefined;
|
|
226
228
|
} | undefined>;
|
|
227
|
-
contrastColor: ComputedRef<"white" | "black">;
|
|
228
|
-
mainColor: ComputedRef<string | undefined>;
|
|
229
|
-
themeClass: ComputedRef<string[]>;
|
|
230
|
-
themeStyle: ComputedRef<{
|
|
229
|
+
contrastColor: globalThis.ComputedRef<"white" | "black">;
|
|
230
|
+
mainColor: globalThis.ComputedRef<string | undefined>;
|
|
231
|
+
themeClass: globalThis.ComputedRef<string[]>;
|
|
232
|
+
themeStyle: globalThis.ComputedRef<{
|
|
231
233
|
'--chatbot-main-color': string | undefined;
|
|
232
234
|
'--chatbot-contrast-color': "white" | "black";
|
|
233
235
|
} | undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MaybeRefOrGetter
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
2
|
import { createAuthClient } from 'better-auth/vue';
|
|
3
3
|
import { anonymousClient } from 'better-auth/client/plugins';
|
|
4
4
|
import { BetterFetch, BetterFetchResponse, InferSignUpEmailCtx, InferUserUpdateCtx, BetterFetchError, BetterFetchPlugin, SuccessContext, ErrorContext, RequestContext, ResponseContext, FetchEsque, RetryOptions, StandardSchemaV1, WritableAtom } from 'better-auth/client';
|
|
@@ -781,7 +781,7 @@ export declare function useChatbotAuth(options?: {
|
|
|
781
781
|
};
|
|
782
782
|
} & {
|
|
783
783
|
useSession: {
|
|
784
|
-
(): Readonly<
|
|
784
|
+
(): Readonly<globalThis.Ref<{
|
|
785
785
|
readonly data: {
|
|
786
786
|
readonly user: {
|
|
787
787
|
readonly id: string;
|
|
@@ -841,7 +841,7 @@ export declare function useChatbotAuth(options?: {
|
|
|
841
841
|
} | undefined) => Promise<void>;
|
|
842
842
|
}>>;
|
|
843
843
|
<F extends (...args: any) => any>(useFetch: F): Promise<{
|
|
844
|
-
data: Ref<{
|
|
844
|
+
data: globalThis.Ref<{
|
|
845
845
|
user: StripEmptyObjects<{
|
|
846
846
|
id: string;
|
|
847
847
|
createdAt: Date;
|
|
@@ -1209,7 +1209,7 @@ export declare function useChatbotAuth(options?: {
|
|
|
1209
1209
|
};
|
|
1210
1210
|
};
|
|
1211
1211
|
};
|
|
1212
|
-
session: Readonly<
|
|
1212
|
+
session: Readonly<globalThis.Ref<{
|
|
1213
1213
|
readonly data: {
|
|
1214
1214
|
readonly user: {
|
|
1215
1215
|
readonly id: string;
|
|
@@ -1268,9 +1268,9 @@ export declare function useChatbotAuth(options?: {
|
|
|
1268
1268
|
query?: SessionQueryParams;
|
|
1269
1269
|
} | undefined) => Promise<void>;
|
|
1270
1270
|
}>>;
|
|
1271
|
-
isAuthenticating: Ref<boolean, boolean>;
|
|
1272
|
-
token: WritableComputedRef<string, string>;
|
|
1273
|
-
headers: ComputedRef<{
|
|
1271
|
+
isAuthenticating: globalThis.Ref<boolean, boolean>;
|
|
1272
|
+
token: globalThis.WritableComputedRef<string, string>;
|
|
1273
|
+
headers: globalThis.ComputedRef<{
|
|
1274
1274
|
Authorization: string;
|
|
1275
1275
|
} | undefined>;
|
|
1276
1276
|
onError: (error: {
|
|
@@ -1278,6 +1278,6 @@ export declare function useChatbotAuth(options?: {
|
|
|
1278
1278
|
title: string;
|
|
1279
1279
|
status: number;
|
|
1280
1280
|
}) => void;
|
|
1281
|
-
userId: ComputedRef<string | undefined>;
|
|
1281
|
+
userId: globalThis.ComputedRef<string | undefined>;
|
|
1282
1282
|
};
|
|
1283
1283
|
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as FloatingChatWidget } from './components/FloatingChatWidget.ce';
|
|
2
|
+
import { default as EmbeddedChatWidget } from './components/EmbeddedChatWidget.ce';
|
|
3
|
+
import { VueElementConstructor } from 'vue';
|
|
4
|
+
export declare const FloatingChatWidgetCe: VueElementConstructor<{
|
|
5
|
+
agentId: string;
|
|
6
|
+
organizationSlug: string;
|
|
7
|
+
baseUrl?: string;
|
|
8
|
+
externalToken?: string;
|
|
9
|
+
awaitExternalToken?: boolean;
|
|
10
|
+
floatingButtonPosition?: "left" | "right";
|
|
11
|
+
customCss?: string;
|
|
12
|
+
appinsightsConnectionString?: string;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const EmbeddedChatWidgetCe: VueElementConstructor<{
|
|
15
|
+
agentId: string;
|
|
16
|
+
organizationSlug: string;
|
|
17
|
+
baseUrl?: string;
|
|
18
|
+
externalToken?: string;
|
|
19
|
+
awaitExternalToken?: boolean;
|
|
20
|
+
forwardedSlots?: string;
|
|
21
|
+
customCss?: string;
|
|
22
|
+
appinsightsConnectionString?: string;
|
|
23
|
+
}>;
|
|
24
|
+
declare module 'vue' {
|
|
25
|
+
interface GlobalComponents {
|
|
26
|
+
'floating-chat-widget': typeof FloatingChatWidget;
|
|
27
|
+
'embedded-chat-widget': typeof EmbeddedChatWidget;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
type TelemetryContext = {
|
|
2
|
+
organizationSlug?: string;
|
|
3
|
+
agentId?: string;
|
|
4
|
+
userId?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Initializes Application Insights for the web component widget.
|
|
8
|
+
*
|
|
9
|
+
* The SDK is loaded via dynamic `import()` so it never blocks the initial
|
|
10
|
+
* render. Calls to `trackAppEvent` / `trackAppException` made while the SDK
|
|
11
|
+
* is still loading are queued and replayed once it's ready.
|
|
12
|
+
*
|
|
13
|
+
* Uses a singleton pattern — only the first call with a valid connection string
|
|
14
|
+
* takes effect. Subsequent calls are no-ops.
|
|
15
|
+
*
|
|
16
|
+
* All automatic browser hooks (window.onerror, fetch/XHR instrumentation,
|
|
17
|
+
* page-visit timing, route tracking) are deliberately disabled so the widget
|
|
18
|
+
* never interferes with the host page. Errors are captured exclusively through
|
|
19
|
+
* Vue's `app.config.errorHandler`; events are tracked via explicit calls.
|
|
20
|
+
*/
|
|
21
|
+
export declare function initializeAppInsights(connectionString?: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* Updates telemetry context enriched onto every subsequent event.
|
|
24
|
+
*/
|
|
25
|
+
export declare function setTelemetryContext(ctx: Partial<TelemetryContext>): void;
|
|
26
|
+
/**
|
|
27
|
+
* Tracks a custom event when telemetry is initialized.
|
|
28
|
+
*/
|
|
29
|
+
export declare function trackAppEvent(name: string, properties?: Record<string, string>): void;
|
|
30
|
+
/**
|
|
31
|
+
* Tracks a custom metric when telemetry is initialized.
|
|
32
|
+
*/
|
|
33
|
+
export declare function trackAppMetric(name: string, average: number, properties?: Record<string, string>): void;
|
|
34
|
+
/**
|
|
35
|
+
* Tracks an exception when telemetry is initialized.
|
|
36
|
+
*/
|
|
37
|
+
export declare function trackAppException(error: Error, properties?: Record<string, string>): void;
|
|
38
|
+
export {};
|
package/dist-vue/composables.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "./_chunks/createChatbotApiClient-
|
|
1
|
+
import { t as e } from "./_chunks/createChatbotApiClient-f86KwRcq.js";
|
|
2
2
|
import { h as t } from "./_chunks/src-EtGd6cRz.js";
|
|
3
|
-
import { t as n } from "./_chunks/useChatbotStore-
|
|
4
|
-
import { o as r } from "./_chunks/utils-
|
|
3
|
+
import { t as n } from "./_chunks/useChatbotStore-CJlkoNn7.js";
|
|
4
|
+
import { o as r } from "./_chunks/utils-BegUBK7s.js";
|
|
5
5
|
import { computed as i, getCurrentInstance as a, onBeforeUnmount as o, onMounted as s, ref as c, toValue as l, watch as u } from "vue";
|
|
6
6
|
import { createAuthClient as d } from "better-auth/vue";
|
|
7
7
|
import { anonymousClient as f, inferAdditionalFields as p } from "better-auth/client/plugins";
|