@8wave/ai-elements 0.110.0 → 0.111.0-beta.11
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 +1 -0
- package/dist/_chunks/{Agent-Su_LDF9_.js → Agent-tE7ZJPxG.js} +80 -78
- package/dist/_chunks/Agent-tE7ZJPxG.js.map +1 -0
- package/dist/_chunks/{Document-DecVclEe.js → Document-Bmx6774B.js} +33 -21
- package/dist/_chunks/Document-Bmx6774B.js.map +1 -0
- package/dist/_chunks/Media-Cft7Pwrh.js +108 -0
- package/dist/_chunks/Media-Cft7Pwrh.js.map +1 -0
- package/dist/_chunks/{PkLazyImg-ClL4nr95.js → PkLazyImg-Dbj2dDXA.js} +2 -2
- package/dist/_chunks/{PkLazyImg-ClL4nr95.js.map → PkLazyImg-Dbj2dDXA.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-CwqsJnJJ.js → PkStreamingMarkdown-CNI8aV8t.js} +636 -427
- package/dist/_chunks/PkStreamingMarkdown-CNI8aV8t.js.map +1 -0
- package/dist/_chunks/{PkToolRequestGeolocation-CEVpl50q.js → PkToolRequestGeolocation-Bzy4IYSp.js} +4 -4
- package/dist/_chunks/PkToolRequestGeolocation-Bzy4IYSp.js.map +1 -0
- package/dist/_chunks/{PkToolRequestOAuthConnection-CncDU-Kl.js → PkToolRequestOAuthConnection-13CQH07t.js} +5 -5
- package/dist/_chunks/PkToolRequestOAuthConnection-13CQH07t.js.map +1 -0
- package/dist/_chunks/{PkToolShowArtifact-M6jlSmyJ.js → PkToolShowArtifact-CGbHDEie.js} +4 -4
- package/dist/_chunks/{PkToolShowArtifact-M6jlSmyJ.js.map → PkToolShowArtifact-CGbHDEie.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-C41JgOUA.js → PkToolShowCalendarEvent-DIFX_rUz.js} +3 -3
- package/dist/_chunks/{PkToolShowCalendarEvent-C41JgOUA.js.map → PkToolShowCalendarEvent-DIFX_rUz.js.map} +1 -1
- package/dist/_chunks/{PkToolShowComparison-DbbUD9pg.js → PkToolShowComparison-CWLFWT9h.js} +7 -7
- package/dist/_chunks/PkToolShowComparison-CWLFWT9h.js.map +1 -0
- package/dist/_chunks/{PkToolShowContactForm-D_dW59Dl.js → PkToolShowContactForm-CYxgatUA.js} +5 -5
- package/dist/_chunks/PkToolShowContactForm-CYxgatUA.js.map +1 -0
- package/dist/_chunks/{PkToolShowDiagram-Hy9qh68O.js → PkToolShowDiagram-Dx1Ba0PG.js} +4 -4
- package/dist/_chunks/PkToolShowDiagram-Dx1Ba0PG.js.map +1 -0
- package/dist/_chunks/{PkToolShowEmail-Dn3JHYIR.js → PkToolShowEmail-DnFFgzom.js} +3 -3
- package/dist/_chunks/{PkToolShowEmail-Dn3JHYIR.js.map → PkToolShowEmail-DnFFgzom.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-DbJHMDbt.js → PkToolShowForm-B6x3Lp2i.js} +7 -8
- package/dist/_chunks/PkToolShowForm-B6x3Lp2i.js.map +1 -0
- package/dist/_chunks/{PkToolShowImageGallery-C1lzlO0y.js → PkToolShowImageGallery-D99N_Plf.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-C1lzlO0y.js.map → PkToolShowImageGallery-D99N_Plf.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-CKhPxKFA.js → PkToolShowLocation-AfnrtFVJ.js} +3 -3
- package/dist/_chunks/{PkToolShowLocation-CKhPxKFA.js.map → PkToolShowLocation-AfnrtFVJ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMessage-U9CCU7eG.js → PkToolShowMessage-DUo2c-im.js} +3 -3
- package/dist/_chunks/{PkToolShowMessage-U9CCU7eG.js.map → PkToolShowMessage-DUo2c-im.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-UeiRMLHu.js → PkToolShowProductList-BN6Qk1_y.js} +3 -3
- package/dist/_chunks/{PkToolShowProductList-UeiRMLHu.js.map → PkToolShowProductList-BN6Qk1_y.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-CypLrfh5.js → PkToolShowQrCode-BLqeBecX.js} +3 -3
- package/dist/_chunks/{PkToolShowQrCode-CypLrfh5.js.map → PkToolShowQrCode-BLqeBecX.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-B69JmwbZ.js → PkToolShowSources-DpZb5FUP.js} +5 -5
- package/dist/_chunks/PkToolShowSources-DpZb5FUP.js.map +1 -0
- package/dist/_chunks/{PkToolShowSuggestedReply-CKxSH0Y9.js → PkToolShowSuggestedReply-C10nNgBs.js} +3 -3
- package/dist/_chunks/{PkToolShowSuggestedReply-CKxSH0Y9.js.map → PkToolShowSuggestedReply-C10nNgBs.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-BgKxdBcC.js → PkToolShowVideo-S9b4QHUj.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-BgKxdBcC.js.map → PkToolShowVideo-S9b4QHUj.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-LPd3tC77.js → PkToolShowWeather-CqhG430w.js} +2 -2
- package/dist/_chunks/PkToolShowWeather-CqhG430w.js.map +1 -0
- package/dist/_chunks/{PkToolShowWebPages-ep_erFF0.js → PkToolShowWebPages-txAZi_iG.js} +3 -3
- package/dist/_chunks/{PkToolShowWebPages-ep_erFF0.js.map → PkToolShowWebPages-txAZi_iG.js.map} +1 -1
- package/dist/_chunks/PkUrl-BPbjZJ1A.js.map +1 -1
- package/dist/_chunks/{VvCheckboxGroup.es-Bdu2gFLN.js → VvCheckboxGroup.es-CTrF3pue.js} +2 -2
- package/dist/_chunks/{VvCheckboxGroup.es-Bdu2gFLN.js.map → VvCheckboxGroup.es-CTrF3pue.js.map} +1 -1
- package/dist/_chunks/{VvCombobox.es-C0wpJIr_.js → VvCombobox.es-BWiXmQ_S.js} +10 -10
- package/dist/_chunks/{VvCombobox.es-C0wpJIr_.js.map → VvCombobox.es-BWiXmQ_S.js.map} +1 -1
- package/dist/_chunks/{VvInputText.es-Zgtw2YNw.js → VvInputText.es-Bo9I6g8H.js} +6 -6
- package/dist/_chunks/{VvInputText.es-Zgtw2YNw.js.map → VvInputText.es-Bo9I6g8H.js.map} +1 -1
- package/dist/_chunks/{VvRadioGroup.es-DZLL19SC.js → VvRadioGroup.es-9ooHCuik.js} +2 -2
- package/dist/_chunks/{VvRadioGroup.es-DZLL19SC.js.map → VvRadioGroup.es-9ooHCuik.js.map} +1 -1
- package/dist/_chunks/{VvSelect.es-ovnZRHG5.js → VvSelect.es-DG0VuWtP.js} +2 -2
- package/dist/_chunks/{VvSelect.es-ovnZRHG5.js.map → VvSelect.es-DG0VuWtP.js.map} +1 -1
- package/dist/_chunks/{VvTextarea.es-DbP5Lt2T.js → VvTextarea.es-Dg3pxdZy.js} +6 -6
- package/dist/_chunks/{VvTextarea.es-DbP5Lt2T.js.map → VvTextarea.es-Dg3pxdZy.js.map} +1 -1
- package/dist/_chunks/{browser-NgY6LXg-.js → browser-B0Xnbqi7.js} +726 -751
- package/dist/_chunks/browser-B0Xnbqi7.js.map +1 -0
- package/dist/_chunks/{dist-n5iFNYf-.js → dist-QdjZA6MJ.js} +143 -133
- package/dist/_chunks/{dist-n5iFNYf-.js.map → dist-QdjZA6MJ.js.map} +1 -1
- package/dist/_chunks/{index.es-dtdl3VFG.js → index.es-0YpCa4c5.js} +6 -6
- package/dist/_chunks/{index.es-dtdl3VFG.js.map → index.es-0YpCa4c5.js.map} +1 -1
- package/dist/_chunks/{index.es-BJnUA_36.js → index.es-CHkJ2TMJ.js} +10 -10
- package/dist/_chunks/{index.es-BJnUA_36.js.map → index.es-CHkJ2TMJ.js.map} +1 -1
- package/dist/_chunks/text-DbSEK8si.js.map +1 -1
- package/dist/ai-elements.es.js +3077 -3134
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotError.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/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-C8BsTAxk.js → Agent-De2gFNjR.js} +165 -176
- package/dist-vue/_chunks/Agent-De2gFNjR.js.map +1 -0
- package/dist-vue/_chunks/{Document-CaUfI_SZ.js → Document-8umjeTVS.js} +84 -72
- package/dist-vue/_chunks/Document-8umjeTVS.js.map +1 -0
- package/dist-vue/_chunks/Media-_HfFLHGD.js.map +1 -1
- package/dist-vue/_chunks/{PkChatbot-o7k7d-fj.js → PkChatbot-CMajc7tE.js} +61 -61
- package/dist-vue/_chunks/PkChatbot-CMajc7tE.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-BvaeBxhx.js → PkChatbotEmptyState-BtzBYOHJ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-BvaeBxhx.js.map → PkChatbotEmptyState-BtzBYOHJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotError-CBP2mf-n.js → PkChatbotError-gvDpRcEz.js} +21 -19
- package/dist-vue/_chunks/PkChatbotError-gvDpRcEz.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-DO1QIgmo.js → PkChatbotFeedbackForm-CxLOdwkm.js} +2 -2
- package/dist-vue/_chunks/PkChatbotFeedbackForm-CxLOdwkm.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotFilePreview-DO1wZPPj.js → PkChatbotFilePreview-CwiVQDF2.js} +3 -3
- package/dist-vue/_chunks/PkChatbotFilePreview-CwiVQDF2.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotInput-D8x52cVm.js → PkChatbotInput-MSpF6SB6.js} +140 -125
- package/dist-vue/_chunks/PkChatbotInput-MSpF6SB6.js.map +1 -0
- package/dist-vue/_chunks/PkChatbotMessages-Bz5q8EtT.js +776 -0
- package/dist-vue/_chunks/PkChatbotMessages-Bz5q8EtT.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-BH6piqOi.js → PkChatbotStepPayload-XW4gT9AZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-BH6piqOi.js.map → PkChatbotStepPayload-XW4gT9AZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-BJ7xUvgi.js → PkChatbotStepToolDetail-C4-K6Glw.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-BJ7xUvgi.js.map → PkChatbotStepToolDetail-C4-K6Glw.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-CrqjWpv0.js +190 -0
- package/dist-vue/_chunks/PkChatbotSteps-CrqjWpv0.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-CNH_glPI.js → PkChatbotViewChat-DXu5ncaU.js} +10 -10
- package/dist-vue/_chunks/{PkChatbotViewChat-CNH_glPI.js.map → PkChatbotViewChat-DXu5ncaU.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-BENvHLZt.js → PkChatbotViewConversations-3LaZPFyw.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-BENvHLZt.js.map → PkChatbotViewConversations-3LaZPFyw.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-qmLESi1V.js → PkChatbotViewFiles-CTqnbsCj.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-qmLESi1V.js.map → PkChatbotViewFiles-CTqnbsCj.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-DzfZnitQ.js → PkChatbotViewProfile-B-Mp1jGQ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-DzfZnitQ.js.map → PkChatbotViewProfile-B-Mp1jGQ.js.map} +1 -1
- package/dist-vue/_chunks/PkRelativeTime--1cIphlA.js.map +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-D8_LwZMR.js → PkStreamingMarkdown-D0IOaETI.js} +432 -419
- package/dist-vue/_chunks/PkStreamingMarkdown-D0IOaETI.js.map +1 -0
- package/dist-vue/_chunks/{PkSvgViewer-DPpE9fiz.js → PkSvgViewer-D-0M5bqg.js} +2 -2
- package/dist-vue/_chunks/PkSvgViewer-D-0M5bqg.js.map +1 -0
- package/dist-vue/_chunks/{PkToolRequestGeolocation-D1ZPmWiB.js → PkToolRequestGeolocation-Q3N3jlO8.js} +3 -3
- package/dist-vue/_chunks/PkToolRequestGeolocation-Q3N3jlO8.js.map +1 -0
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CoJyKEE6.js → PkToolRequestOAuthConnection-lYoTJIF_.js} +4 -4
- package/dist-vue/_chunks/PkToolRequestOAuthConnection-lYoTJIF_.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowArtifact-CEXdfOGG.js → PkToolShowArtifact-DHdJuzDi.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CEXdfOGG.js.map → PkToolShowArtifact-DHdJuzDi.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowComparison-DMSjIpCR.js → PkToolShowComparison-BLn4pkno.js} +5 -5
- package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowContactForm-DHmzAIVF.js → PkToolShowContactForm-DceSyuX8.js} +3 -3
- package/dist-vue/_chunks/PkToolShowContactForm-DceSyuX8.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowDiagram-DuDp5EHd.js → PkToolShowDiagram-pwc0wpNo.js} +4 -4
- package/dist-vue/_chunks/PkToolShowDiagram-pwc0wpNo.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowEmail-CavhsPvi.js → PkToolShowEmail-DF__nKpR.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowEmail-CavhsPvi.js.map → PkToolShowEmail-DF__nKpR.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-CO5A_j9L.js → PkToolShowForm-Dx10jOXm.js} +7 -7
- package/dist-vue/_chunks/PkToolShowForm-Dx10jOXm.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowImageGallery-V9U3LJfF.js → PkToolShowImageGallery-DudQzBx4.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-V9U3LJfF.js.map → PkToolShowImageGallery-DudQzBx4.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowMessage-DQojxDiV.js → PkToolShowMessage-Ck6VP-gw.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowMessage-DQojxDiV.js.map → PkToolShowMessage-Ck6VP-gw.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-Cn0yewM3.js → PkToolShowProductList-zfM8cx-l.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-Cn0yewM3.js.map → PkToolShowProductList-zfM8cx-l.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-BvWOzVkQ.js → PkToolShowSources-Dlaz2Y77.js} +5 -5
- package/dist-vue/_chunks/PkToolShowSources-Dlaz2Y77.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-DQFOVonE.js → PkToolShowSuggestedReply-DWLkUh2L.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-DQFOVonE.js.map → PkToolShowSuggestedReply-DWLkUh2L.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowWeather-Bzqalzh8.js.map +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-Bzkkn9GV.js → PkToolShowWebPages-CosBYLrE.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-Bzkkn9GV.js.map → PkToolShowWebPages-CosBYLrE.js.map} +1 -1
- package/dist-vue/_chunks/{PkUrl-xUBKVJCv.js → PkUrl-B5CNTQj9.js} +2 -2
- package/dist-vue/_chunks/PkUrl-B5CNTQj9.js.map +1 -0
- package/dist-vue/_chunks/{createChatbotApiClient-CJ_5_3IT.js → createChatbotApiClient-MkaPbGWB.js} +6 -3
- package/dist-vue/_chunks/createChatbotApiClient-MkaPbGWB.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-CiRAuq7v.js → useChatbotStore-BzfqjiYz.js} +6 -3
- package/dist-vue/_chunks/useChatbotStore-BzfqjiYz.js.map +1 -0
- package/dist-vue/_chunks/useDialogConfirm-KWz0ohCQ.js.map +1 -1
- package/dist-vue/_chunks/{utils-Coqik0XI.js → utils-C1666_6C.js} +58 -43
- package/dist-vue/_chunks/utils-C1666_6C.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +3 -3
- package/dist-vue/index.js +3869 -3490
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +36 -8
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +20 -3
- package/dist-vue/packages/components/src/chat/PkChatButton.d.ts +3 -2
- package/dist-vue/packages/components/src/chat/PkLanguageModel.d.ts +26 -2
- package/dist-vue/packages/components/src/chat/PkLanguageModelCombobox.d.ts +53 -1
- package/dist-vue/packages/components/src/chat/PkModelOption.d.ts +19 -0
- package/dist-vue/packages/components/src/chat/PkReasoningSettings.d.ts +6 -0
- package/dist-vue/packages/components/src/chat/PkStreamingMarkdown.d.ts +6 -0
- package/dist-vue/packages/components/src/chat/PkStreamingMarkdownAutoscroll.d.ts +1 -0
- package/dist-vue/packages/components/src/chat/constants.d.ts +5 -18
- package/dist-vue/packages/components/src/chat/index.d.ts +3 -1
- package/dist-vue/packages/components/src/chat/modelCatalog.d.ts +46 -0
- package/dist-vue/packages/components/src/chat/utils.d.ts +16 -0
- package/dist-vue/packages/components/src/table/PkTableSortable.d.ts +13 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +18 -0
- package/dist-vue/packages/composable/src/useChatbotError.d.ts +2 -0
- package/dist-vue/packages/models/src/schema/Agent.d.ts +70 -10
- package/dist-vue/packages/models/src/schema/Chat.d.ts +31 -0
- package/dist-vue/packages/models/src/schema/ModelProvider.d.ts +316 -0
- package/dist-vue/packages/models/src/schema/Organization.d.ts +142 -2
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +20 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +20 -0
- package/dist-vue/packages/models/src/schema/UserOverview.d.ts +41 -0
- package/dist-vue/packages/models/src/schema/constants.d.ts +56 -91
- package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-Su_LDF9_.js.map +0 -1
- package/dist/_chunks/Document-DecVclEe.js.map +0 -1
- package/dist/_chunks/Media-C6SOQfJZ.js +0 -122
- package/dist/_chunks/Media-C6SOQfJZ.js.map +0 -1
- package/dist/_chunks/PkStreamingMarkdown-CwqsJnJJ.js.map +0 -1
- package/dist/_chunks/PkToolRequestGeolocation-CEVpl50q.js.map +0 -1
- package/dist/_chunks/PkToolRequestOAuthConnection-CncDU-Kl.js.map +0 -1
- package/dist/_chunks/PkToolShowComparison-DbbUD9pg.js.map +0 -1
- package/dist/_chunks/PkToolShowContactForm-D_dW59Dl.js.map +0 -1
- package/dist/_chunks/PkToolShowDiagram-Hy9qh68O.js.map +0 -1
- package/dist/_chunks/PkToolShowForm-DbJHMDbt.js.map +0 -1
- package/dist/_chunks/PkToolShowSources-B69JmwbZ.js.map +0 -1
- package/dist/_chunks/PkToolShowWeather-LPd3tC77.js.map +0 -1
- package/dist/_chunks/browser-NgY6LXg-.js.map +0 -1
- package/dist/_chunks/utils-YJ0ZOLDG.js +0 -185
- package/dist/_chunks/utils-YJ0ZOLDG.js.map +0 -1
- package/dist-vue/_chunks/Agent-C8BsTAxk.js.map +0 -1
- package/dist-vue/_chunks/Document-CaUfI_SZ.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-o7k7d-fj.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotError-CBP2mf-n.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotFeedbackForm-DO1QIgmo.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotFilePreview-DO1wZPPj.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-D8x52cVm.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-BFlU046I.js +0 -771
- package/dist-vue/_chunks/PkChatbotMessages-BFlU046I.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotSteps-DtV1beDc.js +0 -180
- package/dist-vue/_chunks/PkChatbotSteps-DtV1beDc.js.map +0 -1
- package/dist-vue/_chunks/PkStreamingMarkdown-D8_LwZMR.js.map +0 -1
- package/dist-vue/_chunks/PkSvgViewer-DPpE9fiz.js.map +0 -1
- package/dist-vue/_chunks/PkToolRequestGeolocation-D1ZPmWiB.js.map +0 -1
- package/dist-vue/_chunks/PkToolRequestOAuthConnection-CoJyKEE6.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowComparison-DMSjIpCR.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowContactForm-DHmzAIVF.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowDiagram-DuDp5EHd.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowForm-CO5A_j9L.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowSources-BvWOzVkQ.js.map +0 -1
- package/dist-vue/_chunks/PkUrl-xUBKVJCv.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-CJ_5_3IT.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-CiRAuq7v.js.map +0 -1
- package/dist-vue/_chunks/utils-Coqik0XI.js.map +0 -1
|
@@ -2,8 +2,8 @@ import { $ as e, C as t, F as n, L as r, O as i, St as a, Tt as o, X as s, _ as
|
|
|
2
2
|
import { r as x } from "./vue-i18n-BdMHu4Kd.js";
|
|
3
3
|
import "./src-BQHP1-Xs.js";
|
|
4
4
|
import { n as S } from "./text-DbSEK8si.js";
|
|
5
|
-
import { i as C } from "./dist-
|
|
6
|
-
import { f as w, i as T, n as E } from "./index.es-
|
|
5
|
+
import { i as C } from "./dist-QdjZA6MJ.js";
|
|
6
|
+
import { f as w, i as T, n as E } from "./index.es-0YpCa4c5.js";
|
|
7
7
|
import { t as D } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
8
8
|
import { n as O } from "./useLightbox-v2kFFdFo.js";
|
|
9
9
|
i(), b(), f(), h();
|
|
@@ -226,7 +226,7 @@ var M = {
|
|
|
226
226
|
svg: D.value,
|
|
227
227
|
title: v.value.input?.title
|
|
228
228
|
}, null, 8, ["svg", "title"])) : (r(), _("div", L, [y(i, {
|
|
229
|
-
name: "
|
|
229
|
+
name: "loading-loop",
|
|
230
230
|
class: "w-24 h-24 text-word-5"
|
|
231
231
|
})])),
|
|
232
232
|
v.value.input.caption ? (r(), _("div", R, o(v.value.input.caption), 1)) : c("", !0)
|
|
@@ -237,4 +237,4 @@ var M = {
|
|
|
237
237
|
//#endregion
|
|
238
238
|
export { B as default };
|
|
239
239
|
|
|
240
|
-
//# sourceMappingURL=PkToolShowDiagram-
|
|
240
|
+
//# sourceMappingURL=PkToolShowDiagram-Dx1Ba0PG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PkToolShowDiagram-Dx1Ba0PG.js","names":[],"sources":["../../../../packages/components/src/PkSvgViewer.vue","../../../../packages/components/src/PkSvgViewer.vue","../../../../packages/components/src/PkSvgViewer.vue","../../../../packages/components/src/chat/PkToolShowDiagram.vue","../../../../packages/components/src/chat/PkToolShowDiagram.vue","../../../../packages/components/src/chat/PkToolShowDiagram.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { ref, onMounted, computed, watch } from 'vue'\n import { useLightbox } from './composables/useLightbox'\n import { useI18n } from 'vue-i18n'\n\n const props = defineProps<{\n svg?: string\n title?: string\n }>()\n\n const { t: $t } = useI18n()\n\n const svgRef = ref<HTMLDivElement | null>(null)\n const galleryRef = ref<HTMLElement>()\n\n const scale = ref(1)\n const translateX = ref(0)\n const translateY = ref(0)\n const startX = ref(0)\n const startY = ref(0)\n\n // PhotoSwipe integration\n const svgDataUrl = ref('')\n const svgWidth = ref(0)\n const svgHeight = ref(0)\n\n const { lightbox, init } = useLightbox({\n gallery: galleryRef,\n downloadable: true,\n openInNewTab: false,\n })\n\n const svgStyle = computed(() => ({\n transform: `translate(${translateX.value}px, ${translateY.value}px) scale(${scale.value})`,\n }))\n\n const zoomIn = () => {\n scale.value = Math.min(scale.value * 1.2, 10)\n }\n\n const zoomOut = () => {\n scale.value = Math.max(scale.value / 1.2, 0.1)\n }\n\n const reset = () => {\n scale.value = 1\n translateX.value = 0\n translateY.value = 0\n }\n\n const openLightbox = () => {\n if (svgDataUrl.value) {\n lightbox.value?.loadAndOpen(0)\n }\n }\n\n const isDragging = ref(false)\n\n // Pan logic\n const onMouseDown = (e: MouseEvent) => {\n e.preventDefault()\n isDragging.value = true\n startX.value = e.clientX - translateX.value\n startY.value = e.clientY - translateY.value\n }\n\n const onMouseMove = (e: MouseEvent) => {\n if (!isDragging.value) {\n return\n }\n translateX.value = e.clientX - startX.value\n translateY.value = e.clientY - startY.value\n }\n\n const onMouseUp = () => {\n isDragging.value = false\n }\n\n function serializeSvg(): string | null {\n const svg = svgRef.value?.querySelector('svg')\n if (!svg) {\n return null\n }\n return new XMLSerializer().serializeToString(svg)\n }\n\n function updateSvgExport() {\n const svg = svgRef.value?.querySelector('svg')\n const serialized = serializeSvg()\n if (!svg || !serialized) {\n return\n }\n\n const viewBox = svg.viewBox?.baseVal\n svgWidth.value =\n viewBox?.width || svg.getBoundingClientRect().width || 1200\n svgHeight.value =\n viewBox?.height || svg.getBoundingClientRect().height || 800\n svgDataUrl.value = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(serialized)}`\n }\n\n watch(\n () => props.svg,\n () => {\n if (props.svg && svgRef.value) {\n svgRef.value.innerHTML = props.svg\n updateSvgExport()\n }\n },\n )\n\n onMounted(async () => {\n if (props.svg && svgRef.value) {\n svgRef.value.innerHTML = props.svg\n updateSvgExport()\n }\n await init()\n })\n</script>\n\n<template>\n <div\n class=\"pk-svg-viewer\"\n :class=\"{\n 'pk-svg-viewer--dragging': isDragging,\n }\">\n <!-- Hidden Gallery for Lightbox -->\n <div ref=\"galleryRef\" class=\"hidden\">\n <a\n v-if=\"svgDataUrl\"\n :href=\"svgDataUrl\"\n :data-pswp-src=\"svgDataUrl\"\n :data-pswp-width=\"svgWidth\"\n :data-pswp-height=\"svgHeight\"\n :title=\"title\" />\n </div>\n\n <!-- SVG Stage -->\n <div\n class=\"pk-svg-viewer__stage\"\n @mousedown=\"onMouseDown\"\n @mousemove=\"onMouseMove\"\n @mouseup=\"onMouseUp\"\n @mouseleave=\"onMouseUp\">\n <div\n ref=\"svgRef\"\n :style=\"svgStyle\"\n class=\"pk-svg-viewer__content\" />\n </div>\n\n <!-- Floating Toolbar -->\n <div class=\"pk-svg-viewer__toolbar\">\n <VvButtonGroup\n modifiers=\"compact\"\n class=\"bg-surface-1 shadow-md overflow-hidden\">\n <transition name=\"fade\">\n <VvButton\n key=\"reset\"\n modifiers=\"action-small\"\n :disabled=\"\n scale === 1 && translateX === 0 && translateY === 0\n \"\n icon=\"ri:aspect-ratio-line\"\n :title=\"$t('action.reset')\"\n @click=\"reset\" />\n </transition>\n <VvButton\n v-if=\"svgDataUrl\"\n modifiers=\"action-small\"\n icon=\"ri:zoom-out-line\"\n :title=\"$t('action.zoomOut')\"\n @click=\"zoomOut\" />\n <VvButton\n modifiers=\"action-small\"\n icon=\"ri:zoom-in-line\"\n :title=\"$t('action.zoomIn')\"\n @click=\"zoomIn\" />\n <VvButton\n v-if=\"svgDataUrl\"\n modifiers=\"action-small\"\n icon=\"ri:fullscreen-line\"\n :title=\"$t('action.expand')\"\n @click=\"openLightbox\" />\n </VvButtonGroup>\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-svg-viewer {\n position: relative;\n overflow: hidden;\n background-color: var(--color-surface-2);\n width: 100%;\n height: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &__content {\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: grab;\n transition: transform 0.3s ease-out;\n transform-origin: center center;\n\n svg {\n max-width: 100%;\n max-height: 100%;\n height: auto;\n width: auto;\n }\n }\n\n &__toolbar {\n position: absolute;\n top: var(--spacing-8);\n right: var(--spacing-8);\n z-index: var(--z-dropdown);\n opacity: 0;\n transition: var(--transition-opacity);\n }\n\n &__stage {\n width: 100%;\n height: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n user-select: none;\n }\n\n &:hover {\n .pk-svg-viewer__toolbar {\n opacity: 1;\n }\n }\n\n &--dragging {\n .pk-svg-viewer__toolbar {\n opacity: 0.5 !important;\n pointer-events: none;\n\n & * {\n pointer-events: none;\n }\n }\n\n .pk-svg-viewer__content {\n cursor: grabbing !important;\n }\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import { ref, onMounted, computed, watch } from 'vue'\n import { useLightbox } from './composables/useLightbox'\n import { useI18n } from 'vue-i18n'\n\n const props = defineProps<{\n svg?: string\n title?: string\n }>()\n\n const { t: $t } = useI18n()\n\n const svgRef = ref<HTMLDivElement | null>(null)\n const galleryRef = ref<HTMLElement>()\n\n const scale = ref(1)\n const translateX = ref(0)\n const translateY = ref(0)\n const startX = ref(0)\n const startY = ref(0)\n\n // PhotoSwipe integration\n const svgDataUrl = ref('')\n const svgWidth = ref(0)\n const svgHeight = ref(0)\n\n const { lightbox, init } = useLightbox({\n gallery: galleryRef,\n downloadable: true,\n openInNewTab: false,\n })\n\n const svgStyle = computed(() => ({\n transform: `translate(${translateX.value}px, ${translateY.value}px) scale(${scale.value})`,\n }))\n\n const zoomIn = () => {\n scale.value = Math.min(scale.value * 1.2, 10)\n }\n\n const zoomOut = () => {\n scale.value = Math.max(scale.value / 1.2, 0.1)\n }\n\n const reset = () => {\n scale.value = 1\n translateX.value = 0\n translateY.value = 0\n }\n\n const openLightbox = () => {\n if (svgDataUrl.value) {\n lightbox.value?.loadAndOpen(0)\n }\n }\n\n const isDragging = ref(false)\n\n // Pan logic\n const onMouseDown = (e: MouseEvent) => {\n e.preventDefault()\n isDragging.value = true\n startX.value = e.clientX - translateX.value\n startY.value = e.clientY - translateY.value\n }\n\n const onMouseMove = (e: MouseEvent) => {\n if (!isDragging.value) {\n return\n }\n translateX.value = e.clientX - startX.value\n translateY.value = e.clientY - startY.value\n }\n\n const onMouseUp = () => {\n isDragging.value = false\n }\n\n function serializeSvg(): string | null {\n const svg = svgRef.value?.querySelector('svg')\n if (!svg) {\n return null\n }\n return new XMLSerializer().serializeToString(svg)\n }\n\n function updateSvgExport() {\n const svg = svgRef.value?.querySelector('svg')\n const serialized = serializeSvg()\n if (!svg || !serialized) {\n return\n }\n\n const viewBox = svg.viewBox?.baseVal\n svgWidth.value =\n viewBox?.width || svg.getBoundingClientRect().width || 1200\n svgHeight.value =\n viewBox?.height || svg.getBoundingClientRect().height || 800\n svgDataUrl.value = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(serialized)}`\n }\n\n watch(\n () => props.svg,\n () => {\n if (props.svg && svgRef.value) {\n svgRef.value.innerHTML = props.svg\n updateSvgExport()\n }\n },\n )\n\n onMounted(async () => {\n if (props.svg && svgRef.value) {\n svgRef.value.innerHTML = props.svg\n updateSvgExport()\n }\n await init()\n })\n</script>\n\n<template>\n <div\n class=\"pk-svg-viewer\"\n :class=\"{\n 'pk-svg-viewer--dragging': isDragging,\n }\">\n <!-- Hidden Gallery for Lightbox -->\n <div ref=\"galleryRef\" class=\"hidden\">\n <a\n v-if=\"svgDataUrl\"\n :href=\"svgDataUrl\"\n :data-pswp-src=\"svgDataUrl\"\n :data-pswp-width=\"svgWidth\"\n :data-pswp-height=\"svgHeight\"\n :title=\"title\" />\n </div>\n\n <!-- SVG Stage -->\n <div\n class=\"pk-svg-viewer__stage\"\n @mousedown=\"onMouseDown\"\n @mousemove=\"onMouseMove\"\n @mouseup=\"onMouseUp\"\n @mouseleave=\"onMouseUp\">\n <div\n ref=\"svgRef\"\n :style=\"svgStyle\"\n class=\"pk-svg-viewer__content\" />\n </div>\n\n <!-- Floating Toolbar -->\n <div class=\"pk-svg-viewer__toolbar\">\n <VvButtonGroup\n modifiers=\"compact\"\n class=\"bg-surface-1 shadow-md overflow-hidden\">\n <transition name=\"fade\">\n <VvButton\n key=\"reset\"\n modifiers=\"action-small\"\n :disabled=\"\n scale === 1 && translateX === 0 && translateY === 0\n \"\n icon=\"ri:aspect-ratio-line\"\n :title=\"$t('action.reset')\"\n @click=\"reset\" />\n </transition>\n <VvButton\n v-if=\"svgDataUrl\"\n modifiers=\"action-small\"\n icon=\"ri:zoom-out-line\"\n :title=\"$t('action.zoomOut')\"\n @click=\"zoomOut\" />\n <VvButton\n modifiers=\"action-small\"\n icon=\"ri:zoom-in-line\"\n :title=\"$t('action.zoomIn')\"\n @click=\"zoomIn\" />\n <VvButton\n v-if=\"svgDataUrl\"\n modifiers=\"action-small\"\n icon=\"ri:fullscreen-line\"\n :title=\"$t('action.expand')\"\n @click=\"openLightbox\" />\n </VvButtonGroup>\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-svg-viewer {\n position: relative;\n overflow: hidden;\n background-color: var(--color-surface-2);\n width: 100%;\n height: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &__content {\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: grab;\n transition: transform 0.3s ease-out;\n transform-origin: center center;\n\n svg {\n max-width: 100%;\n max-height: 100%;\n height: auto;\n width: auto;\n }\n }\n\n &__toolbar {\n position: absolute;\n top: var(--spacing-8);\n right: var(--spacing-8);\n z-index: var(--z-dropdown);\n opacity: 0;\n transition: var(--transition-opacity);\n }\n\n &__stage {\n width: 100%;\n height: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n user-select: none;\n }\n\n &:hover {\n .pk-svg-viewer__toolbar {\n opacity: 1;\n }\n }\n\n &--dragging {\n .pk-svg-viewer__toolbar {\n opacity: 0.5 !important;\n pointer-events: none;\n\n & * {\n pointer-events: none;\n }\n }\n\n .pk-svg-viewer__content {\n cursor: grabbing !important;\n }\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import { ref, onMounted, computed, watch } from 'vue'\n import { useLightbox } from './composables/useLightbox'\n import { useI18n } from 'vue-i18n'\n\n const props = defineProps<{\n svg?: string\n title?: string\n }>()\n\n const { t: $t } = useI18n()\n\n const svgRef = ref<HTMLDivElement | null>(null)\n const galleryRef = ref<HTMLElement>()\n\n const scale = ref(1)\n const translateX = ref(0)\n const translateY = ref(0)\n const startX = ref(0)\n const startY = ref(0)\n\n // PhotoSwipe integration\n const svgDataUrl = ref('')\n const svgWidth = ref(0)\n const svgHeight = ref(0)\n\n const { lightbox, init } = useLightbox({\n gallery: galleryRef,\n downloadable: true,\n openInNewTab: false,\n })\n\n const svgStyle = computed(() => ({\n transform: `translate(${translateX.value}px, ${translateY.value}px) scale(${scale.value})`,\n }))\n\n const zoomIn = () => {\n scale.value = Math.min(scale.value * 1.2, 10)\n }\n\n const zoomOut = () => {\n scale.value = Math.max(scale.value / 1.2, 0.1)\n }\n\n const reset = () => {\n scale.value = 1\n translateX.value = 0\n translateY.value = 0\n }\n\n const openLightbox = () => {\n if (svgDataUrl.value) {\n lightbox.value?.loadAndOpen(0)\n }\n }\n\n const isDragging = ref(false)\n\n // Pan logic\n const onMouseDown = (e: MouseEvent) => {\n e.preventDefault()\n isDragging.value = true\n startX.value = e.clientX - translateX.value\n startY.value = e.clientY - translateY.value\n }\n\n const onMouseMove = (e: MouseEvent) => {\n if (!isDragging.value) {\n return\n }\n translateX.value = e.clientX - startX.value\n translateY.value = e.clientY - startY.value\n }\n\n const onMouseUp = () => {\n isDragging.value = false\n }\n\n function serializeSvg(): string | null {\n const svg = svgRef.value?.querySelector('svg')\n if (!svg) {\n return null\n }\n return new XMLSerializer().serializeToString(svg)\n }\n\n function updateSvgExport() {\n const svg = svgRef.value?.querySelector('svg')\n const serialized = serializeSvg()\n if (!svg || !serialized) {\n return\n }\n\n const viewBox = svg.viewBox?.baseVal\n svgWidth.value =\n viewBox?.width || svg.getBoundingClientRect().width || 1200\n svgHeight.value =\n viewBox?.height || svg.getBoundingClientRect().height || 800\n svgDataUrl.value = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(serialized)}`\n }\n\n watch(\n () => props.svg,\n () => {\n if (props.svg && svgRef.value) {\n svgRef.value.innerHTML = props.svg\n updateSvgExport()\n }\n },\n )\n\n onMounted(async () => {\n if (props.svg && svgRef.value) {\n svgRef.value.innerHTML = props.svg\n updateSvgExport()\n }\n await init()\n })\n</script>\n\n<template>\n <div\n class=\"pk-svg-viewer\"\n :class=\"{\n 'pk-svg-viewer--dragging': isDragging,\n }\">\n <!-- Hidden Gallery for Lightbox -->\n <div ref=\"galleryRef\" class=\"hidden\">\n <a\n v-if=\"svgDataUrl\"\n :href=\"svgDataUrl\"\n :data-pswp-src=\"svgDataUrl\"\n :data-pswp-width=\"svgWidth\"\n :data-pswp-height=\"svgHeight\"\n :title=\"title\" />\n </div>\n\n <!-- SVG Stage -->\n <div\n class=\"pk-svg-viewer__stage\"\n @mousedown=\"onMouseDown\"\n @mousemove=\"onMouseMove\"\n @mouseup=\"onMouseUp\"\n @mouseleave=\"onMouseUp\">\n <div\n ref=\"svgRef\"\n :style=\"svgStyle\"\n class=\"pk-svg-viewer__content\" />\n </div>\n\n <!-- Floating Toolbar -->\n <div class=\"pk-svg-viewer__toolbar\">\n <VvButtonGroup\n modifiers=\"compact\"\n class=\"bg-surface-1 shadow-md overflow-hidden\">\n <transition name=\"fade\">\n <VvButton\n key=\"reset\"\n modifiers=\"action-small\"\n :disabled=\"\n scale === 1 && translateX === 0 && translateY === 0\n \"\n icon=\"ri:aspect-ratio-line\"\n :title=\"$t('action.reset')\"\n @click=\"reset\" />\n </transition>\n <VvButton\n v-if=\"svgDataUrl\"\n modifiers=\"action-small\"\n icon=\"ri:zoom-out-line\"\n :title=\"$t('action.zoomOut')\"\n @click=\"zoomOut\" />\n <VvButton\n modifiers=\"action-small\"\n icon=\"ri:zoom-in-line\"\n :title=\"$t('action.zoomIn')\"\n @click=\"zoomIn\" />\n <VvButton\n v-if=\"svgDataUrl\"\n modifiers=\"action-small\"\n icon=\"ri:fullscreen-line\"\n :title=\"$t('action.expand')\"\n @click=\"openLightbox\" />\n </VvButtonGroup>\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-svg-viewer {\n position: relative;\n overflow: hidden;\n background-color: var(--color-surface-2);\n width: 100%;\n height: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &__content {\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: grab;\n transition: transform 0.3s ease-out;\n transform-origin: center center;\n\n svg {\n max-width: 100%;\n max-height: 100%;\n height: auto;\n width: auto;\n }\n }\n\n &__toolbar {\n position: absolute;\n top: var(--spacing-8);\n right: var(--spacing-8);\n z-index: var(--z-dropdown);\n opacity: 0;\n transition: var(--transition-opacity);\n }\n\n &__stage {\n width: 100%;\n height: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n user-select: none;\n }\n\n &:hover {\n .pk-svg-viewer__toolbar {\n opacity: 1;\n }\n }\n\n &--dragging {\n .pk-svg-viewer__toolbar {\n opacity: 0.5 !important;\n pointer-events: none;\n\n & * {\n pointer-events: none;\n }\n }\n\n .pk-svg-viewer__content {\n cursor: grabbing !important;\n }\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import { computed, onMounted, ref, watch } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useI18n } from 'vue-i18n'\n import { toSnakeCase } from 'utils'\n import PkSvgViewer from '../PkSvgViewer.vue'\n\n const props = defineProps<{\n part: unknown\n isDark?: boolean\n }>()\n\n const { t: $t, te: $te } = useI18n({\n useScope: 'global',\n })\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n code: string\n title?: string\n caption?: string\n }\n }\n return part\n })\n\n const svgError = ref(false)\n\n // Serialized SVG content\n const svgContent = ref('')\n\n enum DiagramType {\n Sequence = 'sequenceDiagram',\n Class = 'classDiagram',\n State = 'stateDiagram',\n ER = 'erDiagram',\n XYChart = 'xychart',\n Flowchart = 'flowchart',\n Graph = 'graph',\n }\n\n const diagramType = computed<DiagramType | undefined>(() => {\n const code = toolPart.value.input?.code?.trimStart()\n if (!code) {\n return undefined\n }\n const firstWord = code.match(/^[A-Za-z-]+/)?.[0]\n switch (firstWord) {\n case 'sequenceDiagram':\n return DiagramType.Sequence\n case 'classDiagram':\n return DiagramType.Class\n case 'stateDiagram':\n return DiagramType.State\n case 'erDiagram':\n return DiagramType.ER\n case 'xychart-beta':\n return DiagramType.XYChart\n case 'flowchart':\n return DiagramType.Flowchart\n case 'graph':\n return DiagramType.Graph\n default:\n return undefined\n }\n })\n\n const diagramTypeLabel = computed(() => {\n if (!diagramType.value) {\n return ''\n }\n return $te(`diagram.${diagramType.value}`)\n ? $t(`diagram.${diagramType.value}`)\n : diagramType.value\n })\n\n const diagramTypeIcon = computed(() => {\n switch (diagramType.value) {\n case DiagramType.Sequence:\n return 'ri:timeline-view'\n case DiagramType.Class:\n return 'ri:organization-chart'\n case DiagramType.State:\n return 'ri:organization-chart'\n case DiagramType.ER:\n return 'ri:organization-chart'\n case DiagramType.XYChart:\n return 'ri:line-chart-line'\n case DiagramType.Flowchart:\n return 'ri:flow-chart'\n case DiagramType.Graph:\n return 'ri:flow-chart'\n default:\n return 'ri:flow-chart'\n }\n })\n\n async function renderDiagram() {\n const code = toolPart.value.input?.code\n if (!code) {\n return\n }\n\n svgError.value = false\n try {\n const { renderMermaidSVG, THEMES } =\n await import('beautiful-mermaid')\n const theme = props.isDark\n ? THEMES['github-dark']\n : THEMES['github-light']\n svgContent.value = renderMermaidSVG(code, theme)\n } catch {\n svgError.value = true\n }\n }\n\n watch([() => toolPart.value.input?.code, () => props.isDark], renderDiagram)\n onMounted(async () => {\n await renderDiagram()\n })\n\n const downloadSvg = () => {\n if (!svgContent.value) {\n return\n }\n const blob = new Blob([svgContent.value], {\n type: 'image/svg+xml;charset=utf-8',\n })\n const url = URL.createObjectURL(blob)\n const anchor = document.createElement('a')\n anchor.href = url\n anchor.download = `${toSnakeCase(toolPart.value.input?.title || 'diagram')}.svg`\n document.body.appendChild(anchor)\n anchor.click()\n document.body.removeChild(anchor)\n URL.revokeObjectURL(url)\n }\n\n const copyCode = () => {\n const code = toolPart.value.input?.code\n if (code) {\n copy(code)\n }\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.code\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon :name=\"diagramTypeIcon\" class=\"text-16\" />\n <div class=\"flex flex-col items-start gap-2\">\n <strong class=\"font-bold\">{{\n diagramTypeLabel ?? $t('label.diagram')\n }}</strong>\n </div>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyCode\" />\n <VvButton\n v-if=\"svgContent\"\n modifiers=\"action-quiet-small\"\n icon=\"ri:download-line\"\n :label=\"$t('action.download')\"\n @click=\"downloadSvg\" />\n </VvButtonGroup>\n </div>\n <div v-if=\"svgError\" class=\"text-12 text-danger py-8 px-sm\">\n {{ $t('message.diagramRenderError') }}\n </div>\n <PkSvgViewer\n v-else-if=\"svgContent\"\n class=\"pk-tool-show-diagram__stage\"\n :svg=\"svgContent\"\n :title=\"toolPart.input?.title\" />\n <div\n v-else\n class=\"pk-tool-show-diagram__stage flex justify-center items-center\">\n <VvIcon name=\"loading-loop\" class=\"w-24 h-24 text-word-5\" />\n </div>\n <div\n v-if=\"toolPart.input.caption\"\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-t border-surface-3 text-word-3\">\n {{ toolPart.input.caption }}\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-tool-show-diagram {\n // Fixed stage height: the diagram renders lazily (async chunk +\n // dynamic mermaid import), so the loader and the rendered SVG must\n // occupy the same space or the chat scroll position jumps around.\n // The SVG scales to fit; zoom/pan and the lightbox cover the rest.\n &__stage {\n height: 384px;\n\n .pk-svg-viewer__stage,\n .pk-svg-viewer__content {\n height: 100%;\n }\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import { computed, onMounted, ref, watch } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useI18n } from 'vue-i18n'\n import { toSnakeCase } from 'utils'\n import PkSvgViewer from '../PkSvgViewer.vue'\n\n const props = defineProps<{\n part: unknown\n isDark?: boolean\n }>()\n\n const { t: $t, te: $te } = useI18n({\n useScope: 'global',\n })\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n code: string\n title?: string\n caption?: string\n }\n }\n return part\n })\n\n const svgError = ref(false)\n\n // Serialized SVG content\n const svgContent = ref('')\n\n enum DiagramType {\n Sequence = 'sequenceDiagram',\n Class = 'classDiagram',\n State = 'stateDiagram',\n ER = 'erDiagram',\n XYChart = 'xychart',\n Flowchart = 'flowchart',\n Graph = 'graph',\n }\n\n const diagramType = computed<DiagramType | undefined>(() => {\n const code = toolPart.value.input?.code?.trimStart()\n if (!code) {\n return undefined\n }\n const firstWord = code.match(/^[A-Za-z-]+/)?.[0]\n switch (firstWord) {\n case 'sequenceDiagram':\n return DiagramType.Sequence\n case 'classDiagram':\n return DiagramType.Class\n case 'stateDiagram':\n return DiagramType.State\n case 'erDiagram':\n return DiagramType.ER\n case 'xychart-beta':\n return DiagramType.XYChart\n case 'flowchart':\n return DiagramType.Flowchart\n case 'graph':\n return DiagramType.Graph\n default:\n return undefined\n }\n })\n\n const diagramTypeLabel = computed(() => {\n if (!diagramType.value) {\n return ''\n }\n return $te(`diagram.${diagramType.value}`)\n ? $t(`diagram.${diagramType.value}`)\n : diagramType.value\n })\n\n const diagramTypeIcon = computed(() => {\n switch (diagramType.value) {\n case DiagramType.Sequence:\n return 'ri:timeline-view'\n case DiagramType.Class:\n return 'ri:organization-chart'\n case DiagramType.State:\n return 'ri:organization-chart'\n case DiagramType.ER:\n return 'ri:organization-chart'\n case DiagramType.XYChart:\n return 'ri:line-chart-line'\n case DiagramType.Flowchart:\n return 'ri:flow-chart'\n case DiagramType.Graph:\n return 'ri:flow-chart'\n default:\n return 'ri:flow-chart'\n }\n })\n\n async function renderDiagram() {\n const code = toolPart.value.input?.code\n if (!code) {\n return\n }\n\n svgError.value = false\n try {\n const { renderMermaidSVG, THEMES } =\n await import('beautiful-mermaid')\n const theme = props.isDark\n ? THEMES['github-dark']\n : THEMES['github-light']\n svgContent.value = renderMermaidSVG(code, theme)\n } catch {\n svgError.value = true\n }\n }\n\n watch([() => toolPart.value.input?.code, () => props.isDark], renderDiagram)\n onMounted(async () => {\n await renderDiagram()\n })\n\n const downloadSvg = () => {\n if (!svgContent.value) {\n return\n }\n const blob = new Blob([svgContent.value], {\n type: 'image/svg+xml;charset=utf-8',\n })\n const url = URL.createObjectURL(blob)\n const anchor = document.createElement('a')\n anchor.href = url\n anchor.download = `${toSnakeCase(toolPart.value.input?.title || 'diagram')}.svg`\n document.body.appendChild(anchor)\n anchor.click()\n document.body.removeChild(anchor)\n URL.revokeObjectURL(url)\n }\n\n const copyCode = () => {\n const code = toolPart.value.input?.code\n if (code) {\n copy(code)\n }\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.code\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon :name=\"diagramTypeIcon\" class=\"text-16\" />\n <div class=\"flex flex-col items-start gap-2\">\n <strong class=\"font-bold\">{{\n diagramTypeLabel ?? $t('label.diagram')\n }}</strong>\n </div>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyCode\" />\n <VvButton\n v-if=\"svgContent\"\n modifiers=\"action-quiet-small\"\n icon=\"ri:download-line\"\n :label=\"$t('action.download')\"\n @click=\"downloadSvg\" />\n </VvButtonGroup>\n </div>\n <div v-if=\"svgError\" class=\"text-12 text-danger py-8 px-sm\">\n {{ $t('message.diagramRenderError') }}\n </div>\n <PkSvgViewer\n v-else-if=\"svgContent\"\n class=\"pk-tool-show-diagram__stage\"\n :svg=\"svgContent\"\n :title=\"toolPart.input?.title\" />\n <div\n v-else\n class=\"pk-tool-show-diagram__stage flex justify-center items-center\">\n <VvIcon name=\"loading-loop\" class=\"w-24 h-24 text-word-5\" />\n </div>\n <div\n v-if=\"toolPart.input.caption\"\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-t border-surface-3 text-word-3\">\n {{ toolPart.input.caption }}\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-tool-show-diagram {\n // Fixed stage height: the diagram renders lazily (async chunk +\n // dynamic mermaid import), so the loader and the rendered SVG must\n // occupy the same space or the chat scroll position jumps around.\n // The SVG scales to fit; zoom/pan and the lightbox cover the rest.\n &__stage {\n height: 384px;\n\n .pk-svg-viewer__stage,\n .pk-svg-viewer__content {\n height: 100%;\n }\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import { computed, onMounted, ref, watch } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useI18n } from 'vue-i18n'\n import { toSnakeCase } from 'utils'\n import PkSvgViewer from '../PkSvgViewer.vue'\n\n const props = defineProps<{\n part: unknown\n isDark?: boolean\n }>()\n\n const { t: $t, te: $te } = useI18n({\n useScope: 'global',\n })\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n code: string\n title?: string\n caption?: string\n }\n }\n return part\n })\n\n const svgError = ref(false)\n\n // Serialized SVG content\n const svgContent = ref('')\n\n enum DiagramType {\n Sequence = 'sequenceDiagram',\n Class = 'classDiagram',\n State = 'stateDiagram',\n ER = 'erDiagram',\n XYChart = 'xychart',\n Flowchart = 'flowchart',\n Graph = 'graph',\n }\n\n const diagramType = computed<DiagramType | undefined>(() => {\n const code = toolPart.value.input?.code?.trimStart()\n if (!code) {\n return undefined\n }\n const firstWord = code.match(/^[A-Za-z-]+/)?.[0]\n switch (firstWord) {\n case 'sequenceDiagram':\n return DiagramType.Sequence\n case 'classDiagram':\n return DiagramType.Class\n case 'stateDiagram':\n return DiagramType.State\n case 'erDiagram':\n return DiagramType.ER\n case 'xychart-beta':\n return DiagramType.XYChart\n case 'flowchart':\n return DiagramType.Flowchart\n case 'graph':\n return DiagramType.Graph\n default:\n return undefined\n }\n })\n\n const diagramTypeLabel = computed(() => {\n if (!diagramType.value) {\n return ''\n }\n return $te(`diagram.${diagramType.value}`)\n ? $t(`diagram.${diagramType.value}`)\n : diagramType.value\n })\n\n const diagramTypeIcon = computed(() => {\n switch (diagramType.value) {\n case DiagramType.Sequence:\n return 'ri:timeline-view'\n case DiagramType.Class:\n return 'ri:organization-chart'\n case DiagramType.State:\n return 'ri:organization-chart'\n case DiagramType.ER:\n return 'ri:organization-chart'\n case DiagramType.XYChart:\n return 'ri:line-chart-line'\n case DiagramType.Flowchart:\n return 'ri:flow-chart'\n case DiagramType.Graph:\n return 'ri:flow-chart'\n default:\n return 'ri:flow-chart'\n }\n })\n\n async function renderDiagram() {\n const code = toolPart.value.input?.code\n if (!code) {\n return\n }\n\n svgError.value = false\n try {\n const { renderMermaidSVG, THEMES } =\n await import('beautiful-mermaid')\n const theme = props.isDark\n ? THEMES['github-dark']\n : THEMES['github-light']\n svgContent.value = renderMermaidSVG(code, theme)\n } catch {\n svgError.value = true\n }\n }\n\n watch([() => toolPart.value.input?.code, () => props.isDark], renderDiagram)\n onMounted(async () => {\n await renderDiagram()\n })\n\n const downloadSvg = () => {\n if (!svgContent.value) {\n return\n }\n const blob = new Blob([svgContent.value], {\n type: 'image/svg+xml;charset=utf-8',\n })\n const url = URL.createObjectURL(blob)\n const anchor = document.createElement('a')\n anchor.href = url\n anchor.download = `${toSnakeCase(toolPart.value.input?.title || 'diagram')}.svg`\n document.body.appendChild(anchor)\n anchor.click()\n document.body.removeChild(anchor)\n URL.revokeObjectURL(url)\n }\n\n const copyCode = () => {\n const code = toolPart.value.input?.code\n if (code) {\n copy(code)\n }\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.code\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon :name=\"diagramTypeIcon\" class=\"text-16\" />\n <div class=\"flex flex-col items-start gap-2\">\n <strong class=\"font-bold\">{{\n diagramTypeLabel ?? $t('label.diagram')\n }}</strong>\n </div>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyCode\" />\n <VvButton\n v-if=\"svgContent\"\n modifiers=\"action-quiet-small\"\n icon=\"ri:download-line\"\n :label=\"$t('action.download')\"\n @click=\"downloadSvg\" />\n </VvButtonGroup>\n </div>\n <div v-if=\"svgError\" class=\"text-12 text-danger py-8 px-sm\">\n {{ $t('message.diagramRenderError') }}\n </div>\n <PkSvgViewer\n v-else-if=\"svgContent\"\n class=\"pk-tool-show-diagram__stage\"\n :svg=\"svgContent\"\n :title=\"toolPart.input?.title\" />\n <div\n v-else\n class=\"pk-tool-show-diagram__stage flex justify-center items-center\">\n <VvIcon name=\"loading-loop\" class=\"w-24 h-24 text-word-5\" />\n </div>\n <div\n v-if=\"toolPart.input.caption\"\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-t border-surface-3 text-word-3\">\n {{ toolPart.input.caption }}\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-tool-show-diagram {\n // Fixed stage height: the diagram renders lazily (async chunk +\n // dynamic mermaid import), so the loader and the rendered SVG must\n // occupy the same space or the chat scroll position jumps around.\n // The SVG scales to fit; zoom/pan and the lightbox cover the rest.\n &__stage {\n height: 384px;\n\n .pk-svg-viewer__stage,\n .pk-svg-viewer__content {\n height: 100%;\n }\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;EAKI,IAAM,IAAQ,GAKR,EAAE,GAAG,MAAO,EAAQ,GAEpB,IAAS,EAA2B,IAAI,GACxC,IAAa,EAAiB,GAE9B,IAAQ,EAAI,CAAC,GACb,IAAa,EAAI,CAAC,GAClB,IAAa,EAAI,CAAC,GAClB,IAAS,EAAI,CAAC,GACd,IAAS,EAAI,CAAC,GAGd,IAAa,EAAI,EAAE,GACnB,IAAW,EAAI,CAAC,GAChB,IAAY,EAAI,CAAC,GAEjB,EAAE,aAAU,YAAS,EAAY;GACnC,SAAS;GACT,cAAc;GACd,cAAc;EAClB,CAAC,GAEK,IAAW,SAAgB,EAC7B,WAAW,aAAa,EAAW,MAAM,MAAM,EAAW,MAAM,YAAY,EAAM,MAAM,GAC5F,EAAE,GAEI,UAAe;GACjB,EAAM,QAAQ,KAAK,IAAI,EAAM,QAAQ,KAAK,EAAE;EAChD,GAEM,UAAgB;GAClB,EAAM,QAAQ,KAAK,IAAI,EAAM,QAAQ,KAAK,EAAG;EACjD,GAEM,UAAc;GAGhB,AAFA,EAAM,QAAQ,GACd,EAAW,QAAQ,GACnB,EAAW,QAAQ;EACvB,GAEM,UAAqB;GACv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;OACT,SAAO;;;;;IAGT,EAAA,SAAX,EAAA,GAAA,EAEM,OAFN,GAEM,EADC,EAAA,CAAA,CAAE,CAAA,4BAAA,CAAA,GAAA,CAAA,KAGM,EAAA,SADf,EAAA,GAAA,EAIqC,GAAA;;KAFjC,OAAM;KACL,KAAK,EAAA;KACL,OAAO,EAAA,MAAS,OAAO;IAC5B,GAAA,MAAA,GAAA,CAAA,OAAA,OAAA,CAAA,MAAA,EAAA,GAAA,EAIM,OAJN,GAIM,CADF,EAA4D,GAAA;KAApD,MAAK;KAAe,OAAM;;IAG5B,EAAA,MAAS,MAAM,WADzB,EAAA,GAAA,EAIM,OAJN,GAIM,EADC,EAAA,MAAS,MAAM,OAAO,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $ as e, C as t, Ct as n, L as r, O as i, T as a, Tt as o, b as s, bt as c, h as l, it as u, m as d, v as f, x as p, xt as m } from "./vue.runtime.esm-bundler-CIT_Sbqw.js";
|
|
2
|
-
import { i as h } from "./dist-
|
|
3
|
-
import { d as g, f as _, i as v, n as y, o as b } from "./index.es-
|
|
2
|
+
import { i as h } from "./dist-QdjZA6MJ.js";
|
|
3
|
+
import { d as g, f as _, i as v, n as y, o as b } from "./index.es-0YpCa4c5.js";
|
|
4
4
|
import { n as x } from "./useShortUrlResolver-DuDol0Oq.js";
|
|
5
5
|
i(), m(), u();
|
|
6
6
|
var S = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-surface" }, C = { class: "px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8" }, w = { class: "font-bold" }, T = { class: "border-b border-surface-3 p-sm" }, E = { class: "text-12 text-word-4 mb-4" }, D = { class: "text-word-2 font-semibold" }, O = { class: "p-sm" }, k = { class: "text-12 text-word-4 mb-4" }, A = { class: "text-word-2 whitespace-pre-wrap break-words" }, j = /* @__PURE__ */ t({
|
|
@@ -86,4 +86,4 @@ var S = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-s
|
|
|
86
86
|
//#endregion
|
|
87
87
|
export { j as default };
|
|
88
88
|
|
|
89
|
-
//# sourceMappingURL=PkToolShowEmail-
|
|
89
|
+
//# sourceMappingURL=PkToolShowEmail-DnFFgzom.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PkToolShowEmail-Dn3JHYIR.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowEmail.vue","../../../../packages/components/src/chat/PkToolShowEmail.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useShortUrlResolver } from 'composables'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n subject: string\n body: string\n }\n }\n return part\n })\n\n // Emails leave the app (mailto/webmail/clipboard), so expand short urls to\n // their real target rather than keeping the fragile `/api/r/` redirect.\n const { resolveText } = useShortUrlResolver()\n const subject = resolveText(() => toolPart.value.input?.subject)\n const body = resolveText(() => toolPart.value.input?.body)\n\n const openInMailApp = () => {\n if (!toolPart.value.input) {\n return\n }\n const mailtoLink = `mailto:?subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(mailtoLink)\n }\n\n const openInOutlook = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://outlook.office.com/mail/deeplink/compose?to=&subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInGmail = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://mail.google.com/mail/u/0/?tf=cm&to=&su=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInYahooMail = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://compose.mail.yahoo.com/?to=&subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:mail-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.email') }}\n </strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copy(`${subject}\\n\\n${body}`)\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n icon=\"ri:mail-send-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.send')\" />\n <template #items>\n <VvDropdownAction @click=\"openInOutlook\">\n <VvIcon name=\"mdi:outlook\" />\n {{ $t('action.openInOutlook') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInGmail\">\n <VvIcon name=\"mdi:gmail\" />\n {{ $t('action.openInGmail') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInYahooMail\">\n <VvIcon name=\"mdi:yahoo\" />\n {{ $t('action.openInYahooMail') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInMailApp\">\n <VvIcon name=\"ri:mail-open-line\" />\n {{ $t('action.openInMailApp') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"border-b border-surface-3 p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.subject') }}\n </div>\n <div class=\"text-word-2 font-semibold\">\n {{ subject }}\n </div>\n </div>\n <div class=\"p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.body') }}\n </div>\n <pre class=\"text-word-2 whitespace-pre-wrap break-words\">{{\n body\n }}</pre>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useShortUrlResolver } from 'composables'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n subject: string\n body: string\n }\n }\n return part\n })\n\n // Emails leave the app (mailto/webmail/clipboard), so expand short urls to\n // their real target rather than keeping the fragile `/api/r/` redirect.\n const { resolveText } = useShortUrlResolver()\n const subject = resolveText(() => toolPart.value.input?.subject)\n const body = resolveText(() => toolPart.value.input?.body)\n\n const openInMailApp = () => {\n if (!toolPart.value.input) {\n return\n }\n const mailtoLink = `mailto:?subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(mailtoLink)\n }\n\n const openInOutlook = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://outlook.office.com/mail/deeplink/compose?to=&subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInGmail = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://mail.google.com/mail/u/0/?tf=cm&to=&su=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInYahooMail = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://compose.mail.yahoo.com/?to=&subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:mail-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.email') }}\n </strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copy(`${subject}\\n\\n${body}`)\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n icon=\"ri:mail-send-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.send')\" />\n <template #items>\n <VvDropdownAction @click=\"openInOutlook\">\n <VvIcon name=\"mdi:outlook\" />\n {{ $t('action.openInOutlook') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInGmail\">\n <VvIcon name=\"mdi:gmail\" />\n {{ $t('action.openInGmail') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInYahooMail\">\n <VvIcon name=\"mdi:yahoo\" />\n {{ $t('action.openInYahooMail') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInMailApp\">\n <VvIcon name=\"ri:mail-open-line\" />\n {{ $t('action.openInMailApp') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"border-b border-surface-3 p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.subject') }}\n </div>\n <div class=\"text-word-2 font-semibold\">\n {{ subject }}\n </div>\n </div>\n <div class=\"p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.body') }}\n </div>\n <pre class=\"text-word-2 whitespace-pre-wrap break-words\">{{\n body\n }}</pre>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;EAKI,IAAM,IAAQ,GAIR,EAAE,SAAM,cAAW,EAAa,GAEhC,IAAW,QACA,EAAM,IAOtB,GAIK,EAAE,mBAAgB,EAAoB,GACtC,IAAU,QAAkB,EAAS,MAAM,OAAO,OAA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A,GAET,EAEQ,OAFR,GAEQ,EADJ,EAAA,CAAA,CAAI,GAAA,CAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"PkToolShowEmail-DnFFgzom.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowEmail.vue","../../../../packages/components/src/chat/PkToolShowEmail.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useShortUrlResolver } from 'composables'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n subject: string\n body: string\n }\n }\n return part\n })\n\n // Emails leave the app (mailto/webmail/clipboard), so expand short urls to\n // their real target rather than keeping the fragile `/api/r/` redirect.\n const { resolveText } = useShortUrlResolver()\n const subject = resolveText(() => toolPart.value.input?.subject)\n const body = resolveText(() => toolPart.value.input?.body)\n\n const openInMailApp = () => {\n if (!toolPart.value.input) {\n return\n }\n const mailtoLink = `mailto:?subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(mailtoLink)\n }\n\n const openInOutlook = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://outlook.office.com/mail/deeplink/compose?to=&subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInGmail = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://mail.google.com/mail/u/0/?tf=cm&to=&su=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInYahooMail = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://compose.mail.yahoo.com/?to=&subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:mail-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.email') }}\n </strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copy(`${subject}\\n\\n${body}`)\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n icon=\"ri:mail-send-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.send')\" />\n <template #items>\n <VvDropdownAction @click=\"openInOutlook\">\n <VvIcon name=\"mdi:outlook\" />\n {{ $t('action.openInOutlook') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInGmail\">\n <VvIcon name=\"mdi:gmail\" />\n {{ $t('action.openInGmail') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInYahooMail\">\n <VvIcon name=\"mdi:yahoo\" />\n {{ $t('action.openInYahooMail') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInMailApp\">\n <VvIcon name=\"ri:mail-open-line\" />\n {{ $t('action.openInMailApp') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"border-b border-surface-3 p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.subject') }}\n </div>\n <div class=\"text-word-2 font-semibold\">\n {{ subject }}\n </div>\n </div>\n <div class=\"p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.body') }}\n </div>\n <pre class=\"text-word-2 whitespace-pre-wrap break-words\">{{\n body\n }}</pre>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useShortUrlResolver } from 'composables'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n subject: string\n body: string\n }\n }\n return part\n })\n\n // Emails leave the app (mailto/webmail/clipboard), so expand short urls to\n // their real target rather than keeping the fragile `/api/r/` redirect.\n const { resolveText } = useShortUrlResolver()\n const subject = resolveText(() => toolPart.value.input?.subject)\n const body = resolveText(() => toolPart.value.input?.body)\n\n const openInMailApp = () => {\n if (!toolPart.value.input) {\n return\n }\n const mailtoLink = `mailto:?subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(mailtoLink)\n }\n\n const openInOutlook = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://outlook.office.com/mail/deeplink/compose?to=&subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInGmail = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://mail.google.com/mail/u/0/?tf=cm&to=&su=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInYahooMail = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://compose.mail.yahoo.com/?to=&subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:mail-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.email') }}\n </strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copy(`${subject}\\n\\n${body}`)\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n icon=\"ri:mail-send-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.send')\" />\n <template #items>\n <VvDropdownAction @click=\"openInOutlook\">\n <VvIcon name=\"mdi:outlook\" />\n {{ $t('action.openInOutlook') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInGmail\">\n <VvIcon name=\"mdi:gmail\" />\n {{ $t('action.openInGmail') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInYahooMail\">\n <VvIcon name=\"mdi:yahoo\" />\n {{ $t('action.openInYahooMail') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInMailApp\">\n <VvIcon name=\"ri:mail-open-line\" />\n {{ $t('action.openInMailApp') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"border-b border-surface-3 p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.subject') }}\n </div>\n <div class=\"text-word-2 font-semibold\">\n {{ subject }}\n </div>\n </div>\n <div class=\"p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.body') }}\n </div>\n <pre class=\"text-word-2 whitespace-pre-wrap break-words\">{{\n body\n }}</pre>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;EAKI,IAAM,IAAQ,GAIR,EAAE,SAAM,cAAW,EAAa,GAEhC,IAAW,QACA,EAAM,IAOtB,GAIK,EAAE,mBAAgB,EAAoB,GACtC,IAAU,QAAkB,EAAS,MAAM,OAAO,OAAO,GACzD,IAAO,QAAkB,EAAS,MAAM,OAAO,IAAI,GAEnD,UAAsB;GACxB,IAAI,CAAC,EAAS,MAAM,OAChB;GAEJ,IAAM,IAAa,mBAAmB,mBAClC,EAAQ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r, K as i, L as a, M as o, O as s, St as c, Tt as l, X as u, _ as d, b as f, bt as p, d as m, dt as ee, g as h, h as g, it as _, j as v, l as te, m as y, pt as b, r as x, u as S, v as C, wt as ne, x as w, xt as T, y as E, z as D } from "./vue.runtime.esm-bundler-CIT_Sbqw.js";
|
|
2
2
|
import { r as re } from "./vue-i18n-BdMHu4Kd.js";
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import { u as M } from "./Agent-Su_LDF9_.js";
|
|
3
|
+
import { o as ie, s as ae, t as oe } from "./PkStreamingMarkdown-CNI8aV8t.js";
|
|
4
|
+
import { a as O, c as k, f as se, l as ce, m as A, n as le, u as j } from "./index.es-0YpCa4c5.js";
|
|
5
|
+
import { u as M } from "./Agent-tE7ZJPxG.js";
|
|
7
6
|
s(), T();
|
|
8
7
|
//#endregion
|
|
9
8
|
//#region ../../packages/components/src/PkEditorRadioButtons.vue
|
|
@@ -204,7 +203,7 @@ var fe = {
|
|
|
204
203
|
return Array.isArray(t) ? t : void 0;
|
|
205
204
|
}
|
|
206
205
|
u(() => f.value.output, (e) => {
|
|
207
|
-
e && !M(e) && Object.assign(K,
|
|
206
|
+
e && !M(e) && Object.assign(K, ie(A.value, e));
|
|
208
207
|
}, { immediate: !0 });
|
|
209
208
|
let Me = y(() => {
|
|
210
209
|
let e = f.value.output;
|
|
@@ -264,7 +263,7 @@ var fe = {
|
|
|
264
263
|
class: "h-full bg-word-4 transition-all duration-300",
|
|
265
264
|
style: ne({ width: `${G.value}%` })
|
|
266
265
|
}, null, 4)])])) : d("", !0)])) : d("", !0), x.value ? (a(), C(m, { key: 1 }, [
|
|
267
|
-
g("div", I, [g("div", L, [g("strong", R, l(H.value.question), 1), H.value.message ? (a(), h(
|
|
266
|
+
g("div", I, [g("div", L, [g("strong", R, l(H.value.question), 1), H.value.message ? (a(), h(oe, {
|
|
268
267
|
key: 0,
|
|
269
268
|
markdown: H.value.message,
|
|
270
269
|
class: "text-word-2 mt-4"
|
|
@@ -360,7 +359,7 @@ var fe = {
|
|
|
360
359
|
class: "leading-normal"
|
|
361
360
|
}, [g("div", Te, l(e.question), 1), g("span", Ee, l(Fe(e, t)), 1)]))), 128))])]), g("div", De, [w(s, {
|
|
362
361
|
name: "ri:check-line",
|
|
363
|
-
class: "text-16 text-
|
|
362
|
+
class: "text-16 text-success"
|
|
364
363
|
}), g("div", Oe, [g("span", ke, l(p(o)("showForm.completed")), 1)])])], 64))])) : d("", !0);
|
|
365
364
|
};
|
|
366
365
|
}
|
|
@@ -368,4 +367,4 @@ var fe = {
|
|
|
368
367
|
//#endregion
|
|
369
368
|
export { V as default };
|
|
370
369
|
|
|
371
|
-
//# sourceMappingURL=PkToolShowForm-
|
|
370
|
+
//# sourceMappingURL=PkToolShowForm-B6x3Lp2i.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PkToolShowForm-B6x3Lp2i.js","names":[],"sources":["../../../../packages/components/src/PkEditorRadioButtons.vue","../../../../packages/components/src/PkEditorRadioButtons.vue","../../../../packages/components/src/PkEditorCheckboxButtons.vue","../../../../packages/components/src/PkEditorCheckboxButtons.vue","../../../../packages/components/src/chat/PkToolShowForm.vue","../../../../packages/components/src/chat/PkToolShowForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import type { Option } from '@volverjs/ui-vue'\n import { computed, useId } from 'vue'\n\n const props = defineProps<{\n name: string\n label?: string\n hintLabel?: string\n invalid?: boolean\n invalidLabel?: string | string[]\n required?: boolean\n options: Option[]\n readonly?: boolean\n disabled?: boolean\n modifiers?: string | string[]\n /**\n * Render the options as one segmented control (a recessed track with\n * the chosen option raised) instead of a row of boxed cards. Suits a\n * choice between a few short named states, such as a level or a mode.\n */\n segmented?: boolean\n }>()\n\n const modelValue = defineModel<\n string | number | boolean | symbol | unknown[] | undefined\n >({ default: undefined })\n\n // Native radios group by their name attribute across the whole document, so\n // two instances sharing one name become a single group: the browser unchecks\n // the other instance's inputs and Vue never puts them back, because its own\n // model did not change. It happened with \"theme\", offered by the profile\n // menu and the agent settings panel at the same time, and it can happen to\n // any two tool forms with the same step id. Scope the name to the instance.\n const uid = useId()\n const groupName = computed(() => `${props.name}-${uid}`)\n\n const radioModifiers = computed(() => {\n const toReturn = props.modifiers\n ? Array.isArray(props.modifiers)\n ? props.modifiers\n : [props.modifiers]\n : []\n return [...toReturn, props.segmented ? 'segment' : 'button']\n })\n</script>\n\n<template>\n <VvRadioGroup\n v-model=\"modelValue\"\n :name=\"groupName\"\n :label\n :hint-label=\"hintLabel\"\n :invalid\n :invalid-label=\"invalidLabel\"\n :modifiers=\"segmented ? 'segmented' : 'buttons'\">\n <VvRadio\n v-for=\"(option, key) in options\"\n :key\n :name=\"groupName\"\n :required\n :readonly\n :disabled\n :value=\"option.value\"\n :modifiers=\"radioModifiers\">\n <slot :name=\"option.value\" v-bind=\"{ option }\">\n {{ option.label }}\n </slot>\n </VvRadio>\n </VvRadioGroup>\n</template>\n","<script setup lang=\"ts\">\n import type { Option } from '@volverjs/ui-vue'\n import { computed, useId } from 'vue'\n\n const props = defineProps<{\n name: string\n label?: string\n hintLabel?: string\n invalid?: boolean\n invalidLabel?: string | string[]\n required?: boolean\n options: Option[]\n readonly?: boolean\n disabled?: boolean\n modifiers?: string | string[]\n /**\n * Render the options as one segmented control (a recessed track with\n * the chosen option raised) instead of a row of boxed cards. Suits a\n * choice between a few short named states, such as a level or a mode.\n */\n segmented?: boolean\n }>()\n\n const modelValue = defineModel<\n string | number | boolean | symbol | unknown[] | undefined\n >({ default: undefined })\n\n // Native radios group by their name attribute across the whole document, so\n // two instances sharing one name become a single group: the browser unchecks\n // the other instance's inputs and Vue never puts them back, because its own\n // model did not change. It happened with \"theme\", offered by the profile\n // menu and the agent settings panel at the same time, and it can happen to\n // any two tool forms with the same step id. Scope the name to the instance.\n const uid = useId()\n const groupName = computed(() => `${props.name}-${uid}`)\n\n const radioModifiers = computed(() => {\n const toReturn = props.modifiers\n ? Array.isArray(props.modifiers)\n ? props.modifiers\n : [props.modifiers]\n : []\n return [...toReturn, props.segmented ? 'segment' : 'button']\n })\n</script>\n\n<template>\n <VvRadioGroup\n v-model=\"modelValue\"\n :name=\"groupName\"\n :label\n :hint-label=\"hintLabel\"\n :invalid\n :invalid-label=\"invalidLabel\"\n :modifiers=\"segmented ? 'segmented' : 'buttons'\">\n <VvRadio\n v-for=\"(option, key) in options\"\n :key\n :name=\"groupName\"\n :required\n :readonly\n :disabled\n :value=\"option.value\"\n :modifiers=\"radioModifiers\">\n <slot :name=\"option.value\" v-bind=\"{ option }\">\n {{ option.label }}\n </slot>\n </VvRadio>\n </VvRadioGroup>\n</template>\n","<script setup lang=\"ts\">\n import type { Option } from '@volverjs/ui-vue'\n\n defineProps<{\n name: string\n required?: boolean\n options: Option[]\n readonly?: boolean\n disabled?: boolean\n }>()\n\n const modelValue = defineModel<unknown[] | undefined>({\n default: undefined,\n })\n</script>\n\n<template>\n <VvCheckboxGroup v-model=\"modelValue\" :name modifiers=\"buttons\">\n <VvCheckbox\n v-for=\"(option, key) in options\"\n :key\n :name\n :required\n :readonly\n :disabled\n :value=\"option.value\"\n modifiers=\"button\">\n <slot :name=\"String(option.value)\" v-bind=\"{ option }\">\n {{ option.label }}\n </slot>\n </VvCheckbox>\n </VvCheckboxGroup>\n</template>\n","<script setup lang=\"ts\">\n import type { Option } from '@volverjs/ui-vue'\n\n defineProps<{\n name: string\n required?: boolean\n options: Option[]\n readonly?: boolean\n disabled?: boolean\n }>()\n\n const modelValue = defineModel<unknown[] | undefined>({\n default: undefined,\n })\n</script>\n\n<template>\n <VvCheckboxGroup v-model=\"modelValue\" :name modifiers=\"buttons\">\n <VvCheckbox\n v-for=\"(option, key) in options\"\n :key\n :name\n :required\n :readonly\n :disabled\n :value=\"option.value\"\n modifiers=\"button\">\n <slot :name=\"String(option.value)\" v-bind=\"{ option }\">\n {{ option.label }}\n </slot>\n </VvCheckbox>\n </VvCheckboxGroup>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, reactive, watch } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { isVoiceRenderAck } from 'models'\n import { formAnswerSlots, formStepOptions } from './utils'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n import PkEditorRadioButtons from '../PkEditorRadioButtons.vue'\n import PkEditorCheckboxButtons from '../PkEditorCheckboxButtons.vue'\n\n // --- Types ---\n\n interface FormOption {\n label: string\n description?: string\n }\n\n interface FormStep {\n id: string\n question: string\n message?: string\n type?: 'text' | 'number' | 'date'\n options?: FormOption[]\n multiSelect?: boolean\n allowFreeformInput?: boolean\n placeholder?: string\n }\n\n interface FormAnswer {\n id: string\n value: string | string[] | number | null\n }\n\n interface ToolPartShape {\n state?: 'input-available' | 'output-available' | 'output-error'\n toolCallId?: string\n // AI SDK v5 encodes the tool name in `type` (e.g. 'tool-showMultipleChoice').\n // `toolName` is kept for backward compatibility but is normally absent.\n type?: string\n toolName?: string\n input?: {\n title?: string\n steps?: FormStep[]\n // Legacy showMultipleChoice fields\n question?: string\n options?: (string | FormOption)[]\n }\n // The web card submits `{ answers: [...] }`; the platform channels\n // (Teams modal) submit a flat record keyed by step id.\n output?: string | { answers: FormAnswer[] } | Record<string, unknown>\n }\n\n type AnswerValue = string | string[] | number | null\n\n // --- Props & Emits ---\n\n const props = defineProps<{\n part: unknown\n allowCustomAnswer?: boolean\n /**\n * Answered during a call. Nothing in the part says so (the answer went\n * to the agent as speech, not to the tool call), so the surface that\n * sent it is the only one that knows, and without it the same form\n * could be submitted again and again.\n */\n answered?: boolean\n }>()\n\n const emit = defineEmits<{\n select: [answer: string | { answers: FormAnswer[] }]\n }>()\n\n const { t: $t, d: $d } = useI18n({ useScope: 'global' })\n\n // --- Parsed tool part ---\n\n const toolPart = computed(\n () => JSON.parse(JSON.stringify(props.part)) as ToolPartShape,\n )\n\n const isLegacy = computed(\n () =>\n toolPart.value.toolName === 'showMultipleChoice' ||\n toolPart.value.type === 'tool-showMultipleChoice',\n )\n\n /**\n * A form drawn during a CALL is already \"answered\" as far as the tool loop\n * is concerned: the turn could not wait for it, so the backend closed it\n * with a note saying the widget was drawn (see `isVoiceRenderAck`). That\n * note is not an answer, and the caller still has to give one.\n */\n const isRenderAck = computed(() => isVoiceRenderAck(toolPart.value.output))\n\n const isInteractive = computed(\n () =>\n !props.answered &&\n (toolPart.value.state === 'input-available' || isRenderAck.value),\n )\n\n /** Single-step with no custom-answer and no freeform → auto-submit on option pick */\n const isAutoSubmitStep = computed(() => {\n const step = currentStep.value\n if (!step) {\n return false\n }\n return (\n steps.value.length === 1 &&\n !step.allowFreeformInput &&\n !props.allowCustomAnswer\n )\n })\n\n /** Legacy tool should auto-submit on option pick regardless of allowCustomAnswer */\n const isLegacyAutoSubmit = computed(\n () =>\n isLegacy.value &&\n steps.value.length === 1 &&\n !currentStep.value?.multiSelect,\n )\n\n /**\n * True only for the steps that send themselves as soon as an option is\n * picked: the single case where the footer button would be redundant.\n * Every other shape needs it, single-step forms included: with\n * `allowFreeformInput` (or `allowCustomAnswer`) the radio pick no longer\n * auto-submits, so without the footer the user was left with a chosen\n * option and no way to send it.\n */\n const isSelfSubmitting = computed(\n () =>\n Boolean(currentStep.value?.options) &&\n !currentStep.value?.multiSelect &&\n (isAutoSubmitStep.value || isLegacyAutoSubmit.value),\n )\n\n // --- Steps ---\n\n const steps = computed<FormStep[]>(() => {\n const input = toolPart.value.input\n if (input?.steps?.length) {\n return input.steps\n }\n // Legacy showMultipleChoice → normalize into a single step\n if (input?.question && input?.options) {\n return [\n {\n id: 'legacy',\n question: input.question,\n options: input.options.map((o) =>\n typeof o === 'string' ? { label: o } : o,\n ),\n },\n ]\n }\n return []\n })\n\n /**\n * The reason the card has nothing to draw. A call the SDK rejected keeps\n * `state: 'output-error'` and moves the arguments it could not validate to\n * `rawInput`, so `input` is empty and there are no steps: without this the\n * component rendered NOTHING, and the user was left with a question that\n * had been announced and never appeared.\n */\n const hasFailed = computed(\n () => toolPart.value.state === 'output-error' && !steps.value.length,\n )\n\n // --- Navigation state ---\n\n const currentStepIndex = ref(0)\n const currentStep = computed(() => steps.value[currentStepIndex.value])\n const canGoBack = computed(() => currentStepIndex.value > 0)\n const canGoNext = computed(\n () => currentStepIndex.value < steps.value.length - 1,\n )\n const isMultiStep = computed(() => steps.value.length > 1)\n\n const progress = computed(() => {\n if (!isMultiStep.value) {\n return null\n }\n return Math.round(\n ((currentStepIndex.value + 1) / steps.value.length) * 100,\n )\n })\n\n // --- Answers ---\n\n /**\n * One slot PER STEP, keyed by position and not by step id: the ids come\n * from the model and nothing enforces they are unique, and keyed by id two\n * steps sharing one collapsed onto a single answer. See `formAnswerSlots`.\n */\n const answers = reactive<Record<number, AnswerValue>>({})\n const customAnswer = ref('')\n\n // The freeform field belongs to the step showing it: text left behind\n // (unsubmitted, or arriving from a late input update) must not follow the\n // user to the next or previous question.\n watch(currentStepIndex, () => {\n customAnswer.value = ''\n })\n\n // Single scalar answer shared by radio buttons and freeform text/number/date inputs.\n const scalarValue = computed<string | number | undefined>({\n get: () => {\n const val = currentStep.value\n ? answers[currentStepIndex.value]\n : undefined\n if (val == null || Array.isArray(val)) {\n return undefined\n }\n return val\n },\n set: (val) => {\n if (currentStep.value) {\n answers[currentStepIndex.value] = val ?? null\n }\n },\n })\n\n const activeCheckboxValue = computed<unknown[] | undefined>({\n get: () => {\n const val = currentStep.value\n ? answers[currentStepIndex.value]\n : undefined\n return Array.isArray(val) ? val : []\n },\n set: (val) => {\n if (currentStep.value) {\n answers[currentStepIndex.value] = (val as string[]) ?? []\n }\n },\n })\n\n // --- Initialize answers from existing output ---\n\n /** The `{ answers: [...] }` list, when the output carries one. */\n function outputAnswers(output: ToolPartShape['output']) {\n if (!output || typeof output === 'string') {\n return undefined\n }\n const list = (output as { answers?: unknown }).answers\n return Array.isArray(list) ? (list as FormAnswer[]) : undefined\n }\n\n watch(\n () => toolPart.value.output,\n (output) => {\n if (!output || isVoiceRenderAck(output)) {\n return\n }\n // Every shape an answered form comes back in (the web card's list,\n // a legacy plain string, the flat record a platform channel posts)\n // lands on the same per-position slots: see `formAnswerSlots`.\n Object.assign(\n answers,\n formAnswerSlots(steps.value, output) as Record<\n number,\n AnswerValue\n >,\n )\n },\n { immediate: true },\n )\n\n // --- Restore custom answer from output when it doesn't match any option ---\n\n const normalizedOutput = computed(() => {\n const out = toolPart.value.output\n if (!out || isVoiceRenderAck(out)) {\n return undefined\n }\n if (typeof out === 'string') {\n return out\n }\n const list = outputAnswers(out)\n if (list?.length === 1) {\n const val = list[0].value\n return Array.isArray(val) ? val.join(', ') : String(val)\n }\n return undefined\n })\n\n watch(\n normalizedOutput,\n (value) => {\n if (!value || !currentStep.value) {\n return\n }\n const optionLabels = (currentStep.value.options ?? []).map(\n (o) => o.label,\n )\n if (!optionLabels.includes(value)) {\n customAnswer.value = value\n }\n },\n { immediate: true },\n )\n\n // --- Option mapping for radio/checkbox components ---\n\n const radioOptions = computed(() => formStepOptions(currentStep.value))\n\n // --- Navigation & Submission ---\n\n /** Footer button, and Enter on a pure freeform step. */\n function goNext() {\n // A typed freeform answer wins over the picked option: it is the more\n // recent intent, and the footer button is now the visible way to send\n // it (the freeform field only submits on Enter).\n if (customAnswer.value.trim()) {\n submitCustomAnswer()\n return\n }\n if (canGoNext.value) {\n currentStepIndex.value++\n } else {\n submitForm()\n }\n }\n\n function goBack() {\n if (canGoBack.value) {\n currentStepIndex.value--\n }\n }\n\n function submitForm() {\n if (!isInteractive.value) {\n return\n }\n\n const finalAnswers: FormAnswer[] = steps.value.map((step, index) => ({\n id: step.id,\n value: answers[index] ?? null,\n }))\n\n // Legacy backward compatibility: single-step, single-select → return plain string\n if (\n isLegacyAutoSubmit.value &&\n !currentStep.value?.allowFreeformInput\n ) {\n const val = finalAnswers[0].value\n emit('select', Array.isArray(val) ? val[0] : (val as string))\n } else {\n emit('select', { answers: finalAnswers })\n }\n }\n\n /** Enter inside the freeform field shown alongside the options. */\n function submitCustomAnswer() {\n const value = customAnswer.value.trim()\n if (!value) {\n return\n }\n\n answers[currentStepIndex.value] = value\n // Cleared before navigating: `goNext()` reads it back to route a typed\n // answer here, so leaving it set would recurse.\n customAnswer.value = ''\n if (steps.value.length === 1) {\n submitForm()\n } else {\n goNext()\n }\n }\n\n function onRadioChange() {\n if (!isInteractive.value) {\n return\n }\n if (isAutoSubmitStep.value || isLegacyAutoSubmit.value) {\n submitForm()\n }\n }\n\n // --- Summary helpers ---\n\n function getSummaryValue(step: FormStep, index: number) {\n const val = answers[index]\n if (val == null) {\n return '—'\n }\n if (Array.isArray(val)) {\n return val.join(', ')\n }\n if (step.type === 'date') {\n return $d(new Date(val), 'short')\n }\n return val\n }\n</script>\n\n<template>\n <div\n v-if=\"hasFailed\"\n class=\"text-12 text-danger flex items-center gap-6 py-8\">\n <span class=\"i-vv-alert-circle text-16 shrink-0\" />\n <span>{{ $t('message.formRenderError') }}</span>\n </div>\n <div\n v-else-if=\"steps.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden flex flex-col bg-surface\">\n <!-- Header -->\n <div\n v-if=\"toolPart.input?.title || (isInteractive && steps.length > 1)\"\n class=\"text-12 border-b border-surface-3 text-word-3 bg-surface-1\">\n <div\n v-if=\"toolPart.input?.title\"\n class=\"px-sm py-10 font-bold\"\n :class=\"{\n 'border-b border-surface-3':\n isInteractive && steps.length > 1,\n }\">\n {{ toolPart.input?.title }}\n </div>\n <!-- Progress for multi-step -->\n <div\n v-if=\"isInteractive && steps.length > 1\"\n class=\"flex flex-col gap-4 p-sm\">\n <div class=\"flex justify-between text-10 text-word-3\">\n <span>\n {{\n $t('showForm.step', {\n current: currentStepIndex + 1,\n total: steps.length,\n })\n }}\n </span>\n <span>{{ progress }}%</span>\n </div>\n <div class=\"h-4 bg-surface-3 rounded-full overflow-hidden\">\n <div\n class=\"h-full bg-word-4 transition-all duration-300\"\n :style=\"{ width: `${progress}%` }\"></div>\n </div>\n </div>\n </div>\n\n <!-- Input Available State -->\n <template v-if=\"isInteractive\">\n <!-- Current Step Content -->\n <div class=\"px-sm py-16 flex flex-col gap-12\">\n <div class=\"leading-normal text-12\">\n <strong class=\"font-semibold\">\n {{ currentStep.question }}\n </strong>\n <PkStreamingMarkdown\n v-if=\"currentStep.message\"\n :markdown=\"currentStep.message\"\n class=\"text-word-2 mt-4\" />\n </div>\n\n <!-- Checkbox list for multi-select -->\n <PkEditorCheckboxButtons\n v-if=\"currentStep.options && currentStep.multiSelect\"\n v-model=\"activeCheckboxValue\"\n :name=\"currentStep.id\"\n :options=\"radioOptions\"\n :readonly=\"!isInteractive\"\n class=\"mb-0\"\n vertical>\n <template\n v-for=\"option in radioOptions\"\n :key=\"option.value\"\n #[option.value]>\n <!-- Shared option layout: label + optional description -->\n <div class=\"text-12\">\n <div class=\"font-semibold\">{{ option.label }}</div>\n <div v-if=\"option.description\" class=\"text-word-3\">\n {{ option.description }}\n </div>\n </div>\n </template>\n </PkEditorCheckboxButtons>\n\n <!-- Radio buttons for single-select -->\n <PkEditorRadioButtons\n v-else-if=\"currentStep.options && !currentStep.multiSelect\"\n v-model=\"scalarValue\"\n :name=\"currentStep.id\"\n :options=\"radioOptions\"\n :readonly=\"!isInteractive\"\n vertical\n class=\"mb-0\"\n @update:model-value=\"onRadioChange\">\n <template\n v-for=\"option in radioOptions\"\n :key=\"option.value\"\n #[option.value]>\n <!-- Shared option layout: label + optional description -->\n <div class=\"text-12\">\n <div class=\"font-semibold\">{{ option.label }}</div>\n <div v-if=\"option.description\" class=\"text-word-3\">\n {{ option.description }}\n </div>\n </div>\n </template>\n </PkEditorRadioButtons>\n\n <!-- Pure Freeform Input (text, number, date) -->\n <div\n v-else-if=\"!currentStep.options\"\n class=\"flex flex-col gap-6 w-full\">\n <VvInputText\n :key=\"currentStep.id\"\n v-model=\"scalarValue\"\n :placeholder=\"\n currentStep.placeholder || $t('placeholder.insert')\n \"\n :type=\"currentStep.type\"\n class=\"w-full\"\n :name=\"currentStep.id\"\n modifiers=\"compact\"\n :disabled=\"!isInteractive\"\n @keyup.enter=\"goNext\" />\n </div>\n </div>\n\n <!-- Custom footer freeform input (shown alongside options when allowFreeformInput) -->\n <div\n v-if=\"currentStep.allowFreeformInput && currentStep.options\"\n class=\"px-sm pb-sm border-t border-surface-3\">\n <form\n class=\"flex gap-xs pt-sm\"\n @submit.prevent=\"submitCustomAnswer\">\n <VvInputText\n :key=\"`${currentStep.id}-custom`\"\n v-model=\"customAnswer\"\n class=\"flex-1\"\n :name=\"`${currentStep.id}-custom`\"\n modifiers=\"compact\"\n :disabled=\"!isInteractive\"\n :placeholder=\"\n currentStep.placeholder ||\n $t('showForm.otherPlaceholder')\n \" />\n </form>\n </div>\n\n <!-- Footer navigation: shown for every step that does not submit\n itself on option pick (see `isSelfSubmitting`). -->\n <div\n v-if=\"!isSelfSubmitting\"\n class=\"px-sm py-10 bg-surface border-t border-surface-3 flex justify-between gap-12\">\n <VvButton\n v-if=\"canGoBack\"\n modifiers=\"action-quiet\"\n icon=\"ri:arrow-left-s-line\"\n :label=\"$t('action.back')\"\n @click.stop=\"goBack\" />\n <div v-else></div>\n\n <VvButton\n :modifiers=\"canGoNext ? 'action-quiet' : 'action-primary'\"\n :icon=\"\n canGoNext\n ? 'ri:arrow-right-s-line'\n : 'ri:send-plane-2-line'\n \"\n icon-position=\"right\"\n :label=\"canGoNext ? $t('action.next') : $t('action.submit')\"\n @click.stop=\"goNext\" />\n </div>\n </template>\n\n <!-- Output Available State (Multi-step Summary) -->\n <template v-else>\n <div class=\"px-sm py-12 bg-surface space-y-10\">\n <ul class=\"flex flex-col gap-8\">\n <li\n v-for=\"(step, index) in steps\"\n :key=\"index\"\n class=\"leading-normal\">\n <div class=\"text-12 text-word-3\">\n {{ step.question }}\n </div>\n <span class=\"text-12 text-word-2 font-semibold\">\n {{ getSummaryValue(step, index) }}\n </span>\n </li>\n </ul>\n </div>\n <div\n class=\"px-sm py-12 bg-surface border-t border-surface-3 flex items-center gap-10\">\n <VvIcon name=\"ri:check-line\" class=\"text-16 text-success\" />\n <div class=\"flex flex-col\">\n <span class=\"font-medium text-12 text-word-1 leading-tight\">\n {{ $t('showForm.completed') }}\n </span>\n </div>\n </div>\n </template>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, reactive, watch } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { isVoiceRenderAck } from 'models'\n import { formAnswerSlots, formStepOptions } from './utils'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n import PkEditorRadioButtons from '../PkEditorRadioButtons.vue'\n import PkEditorCheckboxButtons from '../PkEditorCheckboxButtons.vue'\n\n // --- Types ---\n\n interface FormOption {\n label: string\n description?: string\n }\n\n interface FormStep {\n id: string\n question: string\n message?: string\n type?: 'text' | 'number' | 'date'\n options?: FormOption[]\n multiSelect?: boolean\n allowFreeformInput?: boolean\n placeholder?: string\n }\n\n interface FormAnswer {\n id: string\n value: string | string[] | number | null\n }\n\n interface ToolPartShape {\n state?: 'input-available' | 'output-available' | 'output-error'\n toolCallId?: string\n // AI SDK v5 encodes the tool name in `type` (e.g. 'tool-showMultipleChoice').\n // `toolName` is kept for backward compatibility but is normally absent.\n type?: string\n toolName?: string\n input?: {\n title?: string\n steps?: FormStep[]\n // Legacy showMultipleChoice fields\n question?: string\n options?: (string | FormOption)[]\n }\n // The web card submits `{ answers: [...] }`; the platform channels\n // (Teams modal) submit a flat record keyed by step id.\n output?: string | { answers: FormAnswer[] } | Record<string, unknown>\n }\n\n type AnswerValue = string | string[] | number | null\n\n // --- Props & Emits ---\n\n const props = defineProps<{\n part: unknown\n allowCustomAnswer?: boolean\n /**\n * Answered during a call. Nothing in the part says so (the answer went\n * to the agent as speech, not to the tool call), so the surface that\n * sent it is the only one that knows, and without it the same form\n * could be submitted again and again.\n */\n answered?: boolean\n }>()\n\n const emit = defineEmits<{\n select: [answer: string | { answers: FormAnswer[] }]\n }>()\n\n const { t: $t, d: $d } = useI18n({ useScope: 'global' })\n\n // --- Parsed tool part ---\n\n const toolPart = computed(\n () => JSON.parse(JSON.stringify(props.part)) as ToolPartShape,\n )\n\n const isLegacy = computed(\n () =>\n toolPart.value.toolName === 'showMultipleChoice' ||\n toolPart.value.type === 'tool-showMultipleChoice',\n )\n\n /**\n * A form drawn during a CALL is already \"answered\" as far as the tool loop\n * is concerned: the turn could not wait for it, so the backend closed it\n * with a note saying the widget was drawn (see `isVoiceRenderAck`). That\n * note is not an answer, and the caller still has to give one.\n */\n const isRenderAck = computed(() => isVoiceRenderAck(toolPart.value.output))\n\n const isInteractive = computed(\n () =>\n !props.answered &&\n (toolPart.value.state === 'input-available' || isRenderAck.value),\n )\n\n /** Single-step with no custom-answer and no freeform → auto-submit on option pick */\n const isAutoSubmitStep = computed(() => {\n const step = currentStep.value\n if (!step) {\n return false\n }\n return (\n steps.value.length === 1 &&\n !step.allowFreeformInput &&\n !props.allowCustomAnswer\n )\n })\n\n /** Legacy tool should auto-submit on option pick regardless of allowCustomAnswer */\n const isLegacyAutoSubmit = computed(\n () =>\n isLegacy.value &&\n steps.value.length === 1 &&\n !currentStep.value?.multiSelect,\n )\n\n /**\n * True only for the steps that send themselves as soon as an option is\n * picked: the single case where the footer button would be redundant.\n * Every other shape needs it, single-step forms included: with\n * `allowFreeformInput` (or `allowCustomAnswer`) the radio pick no longer\n * auto-submits, so without the footer the user was left with a chosen\n * option and no way to send it.\n */\n const isSelfSubmitting = computed(\n () =>\n Boolean(currentStep.value?.options) &&\n !currentStep.value?.multiSelect &&\n (isAutoSubmitStep.value || isLegacyAutoSubmit.value),\n )\n\n // --- Steps ---\n\n const steps = computed<FormStep[]>(() => {\n const input = toolPart.value.input\n if (input?.steps?.length) {\n return input.steps\n }\n // Legacy showMultipleChoice → normalize into a single step\n if (input?.question && input?.options) {\n return [\n {\n id: 'legacy',\n question: input.question,\n options: input.options.map((o) =>\n typeof o === 'string' ? { label: o } : o,\n ),\n },\n ]\n }\n return []\n })\n\n /**\n * The reason the card has nothing to draw. A call the SDK rejected keeps\n * `state: 'output-error'` and moves the arguments it could not validate to\n * `rawInput`, so `input` is empty and there are no steps: without this the\n * component rendered NOTHING, and the user was left with a question that\n * had been announced and never appeared.\n */\n const hasFailed = computed(\n () => toolPart.value.state === 'output-error' && !steps.value.length,\n )\n\n // --- Navigation state ---\n\n const currentStepIndex = ref(0)\n const currentStep = computed(() => steps.value[currentStepIndex.value])\n const canGoBack = computed(() => currentStepIndex.value > 0)\n const canGoNext = computed(\n () => currentStepIndex.value < steps.value.length - 1,\n )\n const isMultiStep = computed(() => steps.value.length > 1)\n\n const progress = computed(() => {\n if (!isMultiStep.value) {\n return null\n }\n return Math.round(\n ((currentStepIndex.value + 1) / steps.value.length) * 100,\n )\n })\n\n // --- Answers ---\n\n /**\n * One slot PER STEP, keyed by position and not by step id: the ids come\n * from the model and nothing enforces they are unique, and keyed by id two\n * steps sharing one collapsed onto a single answer. See `formAnswerSlots`.\n */\n const answers = reactive<Record<number, AnswerValue>>({})\n const customAnswer = ref('')\n\n // The freeform field belongs to the step showing it: text left behind\n // (unsubmitted, or arriving from a late input update) must not follow the\n // user to the next or previous question.\n watch(currentStepIndex, () => {\n customAnswer.value = ''\n })\n\n // Single scalar answer shared by radio buttons and freeform text/number/date inputs.\n const scalarValue = computed<string | number | undefined>({\n get: () => {\n const val = currentStep.value\n ? answers[currentStepIndex.value]\n : undefined\n if (val == null || Array.isArray(val)) {\n return undefined\n }\n return val\n },\n set: (val) => {\n if (currentStep.value) {\n answers[currentStepIndex.value] = val ?? null\n }\n },\n })\n\n const activeCheckboxValue = computed<unknown[] | undefined>({\n get: () => {\n const val = currentStep.value\n ? answers[currentStepIndex.value]\n : undefined\n return Array.isArray(val) ? val : []\n },\n set: (val) => {\n if (currentStep.value) {\n answers[currentStepIndex.value] = (val as string[]) ?? []\n }\n },\n })\n\n // --- Initialize answers from existing output ---\n\n /** The `{ answers: [...] }` list, when the output carries one. */\n function outputAnswers(output: ToolPartShape['output']) {\n if (!output || typeof output === 'string') {\n return undefined\n }\n const list = (output as { answers?: unknown }).answers\n return Array.isArray(list) ? (list as FormAnswer[]) : undefined\n }\n\n watch(\n () => toolPart.value.output,\n (output) => {\n if (!output || isVoiceRenderAck(output)) {\n return\n }\n // Every shape an answered form comes back in (the web card's list,\n // a legacy plain string, the flat record a platform channel posts)\n // lands on the same per-position slots: see `formAnswerSlots`.\n Object.assign(\n answers,\n formAnswerSlots(steps.value, output) as Record<\n number,\n AnswerValue\n >,\n )\n },\n { immediate: true },\n )\n\n // --- Restore custom answer from output when it doesn't match any option ---\n\n const normalizedOutput = computed(() => {\n const out = toolPart.value.output\n if (!out || isVoiceRenderAck(out)) {\n return undefined\n }\n if (typeof out === 'string') {\n return out\n }\n const list = outputAnswers(out)\n if (list?.length === 1) {\n const val = list[0].value\n return Array.isArray(val) ? val.join(', ') : String(val)\n }\n return undefined\n })\n\n watch(\n normalizedOutput,\n (value) => {\n if (!value || !currentStep.value) {\n return\n }\n const optionLabels = (currentStep.value.options ?? []).map(\n (o) => o.label,\n )\n if (!optionLabels.includes(value)) {\n customAnswer.value = value\n }\n },\n { immediate: true },\n )\n\n // --- Option mapping for radio/checkbox components ---\n\n const radioOptions = computed(() => formStepOptions(currentStep.value))\n\n // --- Navigation & Submission ---\n\n /** Footer button, and Enter on a pure freeform step. */\n function goNext() {\n // A typed freeform answer wins over the picked option: it is the more\n // recent intent, and the footer button is now the visible way to send\n // it (the freeform field only submits on Enter).\n if (customAnswer.value.trim()) {\n submitCustomAnswer()\n return\n }\n if (canGoNext.value) {\n currentStepIndex.value++\n } else {\n submitForm()\n }\n }\n\n function goBack() {\n if (canGoBack.value) {\n currentStepIndex.value--\n }\n }\n\n function submitForm() {\n if (!isInteractive.value) {\n return\n }\n\n const finalAnswers: FormAnswer[] = steps.value.map((step, index) => ({\n id: step.id,\n value: answers[index] ?? null,\n }))\n\n // Legacy backward compatibility: single-step, single-select → return plain string\n if (\n isLegacyAutoSubmit.value &&\n !currentStep.value?.allowFreeformInput\n ) {\n const val = finalAnswers[0].value\n emit('select', Array.isArray(val) ? val[0] : (val as string))\n } else {\n emit('select', { answers: finalAnswers })\n }\n }\n\n /** Enter inside the freeform field shown alongside the options. */\n function submitCustomAnswer() {\n const value = customAnswer.value.trim()\n if (!value) {\n return\n }\n\n answers[currentStepIndex.value] = value\n // Cleared before navigating: `goNext()` reads it back to route a typed\n // answer here, so leaving it set would recurse.\n customAnswer.value = ''\n if (steps.value.length === 1) {\n submitForm()\n } else {\n goNext()\n }\n }\n\n function onRadioChange() {\n if (!isInteractive.value) {\n return\n }\n if (isAutoSubmitStep.value || isLegacyAutoSubmit.value) {\n submitForm()\n }\n }\n\n // --- Summary helpers ---\n\n function getSummaryValue(step: FormStep, index: number) {\n const val = answers[index]\n if (val == null) {\n return '—'\n }\n if (Array.isArray(val)) {\n return val.join(', ')\n }\n if (step.type === 'date') {\n return $d(new Date(val), 'short')\n }\n return val\n }\n</script>\n\n<template>\n <div\n v-if=\"hasFailed\"\n class=\"text-12 text-danger flex items-center gap-6 py-8\">\n <span class=\"i-vv-alert-circle text-16 shrink-0\" />\n <span>{{ $t('message.formRenderError') }}</span>\n </div>\n <div\n v-else-if=\"steps.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden flex flex-col bg-surface\">\n <!-- Header -->\n <div\n v-if=\"toolPart.input?.title || (isInteractive && steps.length > 1)\"\n class=\"text-12 border-b border-surface-3 text-word-3 bg-surface-1\">\n <div\n v-if=\"toolPart.input?.title\"\n class=\"px-sm py-10 font-bold\"\n :class=\"{\n 'border-b border-surface-3':\n isInteractive && steps.length > 1,\n }\">\n {{ toolPart.input?.title }}\n </div>\n <!-- Progress for multi-step -->\n <div\n v-if=\"isInteractive && steps.length > 1\"\n class=\"flex flex-col gap-4 p-sm\">\n <div class=\"flex justify-between text-10 text-word-3\">\n <span>\n {{\n $t('showForm.step', {\n current: currentStepIndex + 1,\n total: steps.length,\n })\n }}\n </span>\n <span>{{ progress }}%</span>\n </div>\n <div class=\"h-4 bg-surface-3 rounded-full overflow-hidden\">\n <div\n class=\"h-full bg-word-4 transition-all duration-300\"\n :style=\"{ width: `${progress}%` }\"></div>\n </div>\n </div>\n </div>\n\n <!-- Input Available State -->\n <template v-if=\"isInteractive\">\n <!-- Current Step Content -->\n <div class=\"px-sm py-16 flex flex-col gap-12\">\n <div class=\"leading-normal text-12\">\n <strong class=\"font-semibold\">\n {{ currentStep.question }}\n </strong>\n <PkStreamingMarkdown\n v-if=\"currentStep.message\"\n :markdown=\"currentStep.message\"\n class=\"text-word-2 mt-4\" />\n </div>\n\n <!-- Checkbox list for multi-select -->\n <PkEditorCheckboxButtons\n v-if=\"currentStep.options && currentStep.multiSelect\"\n v-model=\"activeCheckboxValue\"\n :name=\"currentStep.id\"\n :options=\"radioOptions\"\n :readonly=\"!isInteractive\"\n class=\"mb-0\"\n vertical>\n <template\n v-for=\"option in radioOptions\"\n :key=\"option.value\"\n #[option.value]>\n <!-- Shared option layout: label + optional description -->\n <div class=\"text-12\">\n <div class=\"font-semibold\">{{ option.label }}</div>\n <div v-if=\"option.description\" class=\"text-word-3\">\n {{ option.description }}\n </div>\n </div>\n </template>\n </PkEditorCheckboxButtons>\n\n <!-- Radio buttons for single-select -->\n <PkEditorRadioButtons\n v-else-if=\"currentStep.options && !currentStep.multiSelect\"\n v-model=\"scalarValue\"\n :name=\"currentStep.id\"\n :options=\"radioOptions\"\n :readonly=\"!isInteractive\"\n vertical\n class=\"mb-0\"\n @update:model-value=\"onRadioChange\">\n <template\n v-for=\"option in radioOptions\"\n :key=\"option.value\"\n #[option.value]>\n <!-- Shared option layout: label + optional description -->\n <div class=\"text-12\">\n <div class=\"font-semibold\">{{ option.label }}</div>\n <div v-if=\"option.description\" class=\"text-word-3\">\n {{ option.description }}\n </div>\n </div>\n </template>\n </PkEditorRadioButtons>\n\n <!-- Pure Freeform Input (text, number, date) -->\n <div\n v-else-if=\"!currentStep.options\"\n class=\"flex flex-col gap-6 w-full\">\n <VvInputText\n :key=\"currentStep.id\"\n v-model=\"scalarValue\"\n :placeholder=\"\n currentStep.placeholder || $t('placeholder.insert')\n \"\n :type=\"currentStep.type\"\n class=\"w-full\"\n :name=\"currentStep.id\"\n modifiers=\"compact\"\n :disabled=\"!isInteractive\"\n @keyup.enter=\"goNext\" />\n </div>\n </div>\n\n <!-- Custom footer freeform input (shown alongside options when allowFreeformInput) -->\n <div\n v-if=\"currentStep.allowFreeformInput && currentStep.options\"\n class=\"px-sm pb-sm border-t border-surface-3\">\n <form\n class=\"flex gap-xs pt-sm\"\n @submit.prevent=\"submitCustomAnswer\">\n <VvInputText\n :key=\"`${currentStep.id}-custom`\"\n v-model=\"customAnswer\"\n class=\"flex-1\"\n :name=\"`${currentStep.id}-custom`\"\n modifiers=\"compact\"\n :disabled=\"!isInteractive\"\n :placeholder=\"\n currentStep.placeholder ||\n $t('showForm.otherPlaceholder')\n \" />\n </form>\n </div>\n\n <!-- Footer navigation: shown for every step that does not submit\n itself on option pick (see `isSelfSubmitting`). -->\n <div\n v-if=\"!isSelfSubmitting\"\n class=\"px-sm py-10 bg-surface border-t border-surface-3 flex justify-between gap-12\">\n <VvButton\n v-if=\"canGoBack\"\n modifiers=\"action-quiet\"\n icon=\"ri:arrow-left-s-line\"\n :label=\"$t('action.back')\"\n @click.stop=\"goBack\" />\n <div v-else></div>\n\n <VvButton\n :modifiers=\"canGoNext ? 'action-quiet' : 'action-primary'\"\n :icon=\"\n canGoNext\n ? 'ri:arrow-right-s-line'\n : 'ri:send-plane-2-line'\n \"\n icon-position=\"right\"\n :label=\"canGoNext ? $t('action.next') : $t('action.submit')\"\n @click.stop=\"goNext\" />\n </div>\n </template>\n\n <!-- Output Available State (Multi-step Summary) -->\n <template v-else>\n <div class=\"px-sm py-12 bg-surface space-y-10\">\n <ul class=\"flex flex-col gap-8\">\n <li\n v-for=\"(step, index) in steps\"\n :key=\"index\"\n class=\"leading-normal\">\n <div class=\"text-12 text-word-3\">\n {{ step.question }}\n </div>\n <span class=\"text-12 text-word-2 font-semibold\">\n {{ getSummaryValue(step, index) }}\n </span>\n </li>\n </ul>\n </div>\n <div\n class=\"px-sm py-12 bg-surface border-t border-surface-3 flex items-center gap-10\">\n <VvIcon name=\"ri:check-line\" class=\"text-16 text-success\" />\n <div class=\"flex flex-col\">\n <span class=\"font-medium text-12 text-word-1 leading-tight\">\n {{ $t('showForm.completed') }}\n </span>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAII,IAAM,IAAQ,GAmBR,IAAa,EAElB,GAAA,YAAuB,GAQlB,IAAM,EAAM,GACZ,IAAY,QAAe,GAAG,EAAM,KAAK,GAAG,GAAK,GAEjD,IAAiB,QAMZ,CAAC,GALS,EAAM,YACjB,MAAM,QAAQ,EAAM,SAAS,IACzB,EAAM,YACN,CAAC,EAAM,SAAS,IACpB,CAAC,GACc,EAAM,YAAY,YAAY,QAAQ,CAC9D;;;GAID,OAAA,EAAA,GAAA,EAqBe,GAAA;IApBF,YAAA,EAAA;IAAA,uBAAA,AAAA,EAAA,QAAA,MAAA,EAAU,QAAA;IAClB,MAAM,EAAA;IACN,OAAA,EAAA;IACA,cAAY,EAAA;IACZ,SAAA,EAAA;IACA,iBAAe,EAAA;IACf,WAAW,EAAA,YAAS,cAAA;;IAEjB,SAAA,QAAgC,EADpC,EAAA,EAAA,GAAA,EAYU,GAAA,MAAA,EAXkB,EAAA,UAAhB,GAAQ,OADpB,EAAA,GAAA,EAYU,GAAA;KAVL;KACA,MAAM,EAAA;KACN,UAAA,EAAA;KACA,UAAA,EAAA;KACA,UAAA,EAAA;KACA,OAAO,EAAO;KACd,WAAW,EAAA;;KACZ,SAAA,QAEO,CAFP,EAEO,EAAA,QAFM,EAAO,OAApB,EAEO,EAAA,SAAA,GAAA,GAAA,EAF8B,UAAM,CAAA,SAEpC,CADA,EAAA,EAAA,EAAO,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EEtD3B,IAAM,IAAa,EAAkC,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AAM;GACN,GAAA,CAAA,EAEM,OAFN,IAEM,EADC,EAAK,QAAQ,GAAA,CAAA,GAEpB,EAEO,QAFP,IAEO,EADA,GAAgB,GAAM,CAAK,CAAA,GAAA,CAAA,CAAA,CAAA,EAK9C,GAAA,GAAA,EAAA,CAAA,CAAA,CAAA,GAAA,EAQM,OARN,IAQM,CANF,EAA4D,GAAA;IAApD,MAAK;IAAgB,OAAM;GACnC,CAAA,GAAA,EAIM,OAJN,IAIM,CAHF,EAEO,QAFP,IAEO,EADA,EAAA,CAAA,CAAE,CAAA,oBAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
|
package/dist/_chunks/{PkToolShowImageGallery-C1lzlO0y.js → PkToolShowImageGallery-D99N_Plf.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as e, F as t, L as n, O as r, St as i, Tt as a, _ as o, bt as s, d as c, h as l, it as u, m as d, pt as f, v as p, x as m, xt as h, z as g } from "./vue.runtime.esm-bundler-CIT_Sbqw.js";
|
|
2
2
|
import "./src-BQHP1-Xs.js";
|
|
3
3
|
import { n as _ } from "./url-validation-uLMZ5-AU.js";
|
|
4
|
-
import { n as v } from "./index.es-
|
|
4
|
+
import { n as v } from "./index.es-0YpCa4c5.js";
|
|
5
5
|
import { t as y } from "./useImageFallback-DZS2C7QR.js";
|
|
6
6
|
import { n as b, t as x } from "./useLightbox-v2kFFdFo.js";
|
|
7
7
|
r(), h(), u();
|
|
@@ -71,4 +71,4 @@ var S = {
|
|
|
71
71
|
//#endregion
|
|
72
72
|
export { A as default };
|
|
73
73
|
|
|
74
|
-
//# sourceMappingURL=PkToolShowImageGallery-
|
|
74
|
+
//# sourceMappingURL=PkToolShowImageGallery-D99N_Plf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PkToolShowImageGallery-C1lzlO0y.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowImageGallery.vue","../../../../packages/components/src/chat/PkToolShowImageGallery.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, onMounted } from 'vue'\n import { isSameSite } from 'utils'\n import { useImageFallback } from 'composables'\n import { useLightbox, useImageSizes } from '../composables/useLightbox'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n images: Array<{\n url: string\n caption?: string\n alt?: string\n }>\n }\n }\n return part\n })\n\n const galleryRef = ref<HTMLElement>()\n const { preload, getSize } = useImageSizes()\n\n const images = computed(() => toolPart.value.input?.images ?? [])\n\n const { canShowImage, onImageError } = useImageFallback()\n\n const gridCols = computed(() => {\n const count = images.value.length\n if (count === 1) {\n return 'grid-cols-1 justify-items-center'\n }\n if (count === 2) {\n return 'grid-cols-2'\n }\n return 'grid-cols-3'\n })\n\n const { init } = useLightbox({ gallery: galleryRef })\n\n onMounted(async () => {\n preload(images.value)\n await init()\n })\n</script>\n\n<template>\n <div\n v-if=\"images.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:image-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.gallery', { count: images.length }) }}\n </strong>\n </div>\n <div class=\"p-sm\">\n <div ref=\"galleryRef\" class=\"grid gap-8\" :class=\"gridCols\">\n <a\n v-for=\"image in images\"\n :key=\"image.url\"\n :href=\"canShowImage(image.url) ? image.url : undefined\"\n :data-pswp-src=\"\n canShowImage(image.url) ? image.url : undefined\n \"\n :data-pswp-width=\"getSize(image.url).width\"\n :data-pswp-height=\"getSize(image.url).height\"\n :data-pswp-caption=\"image.caption ?? image.alt ?? ''\"\n :data-cropped=\"true\"\n class=\"relative block aspect-square overflow-hidden rounded-xl group max-h-384\"\n :class=\"[\n { 'w-384 max-w-full': images.length === 1 },\n canShowImage(image.url)\n ? 'cursor-pointer'\n : 'pointer-events-none',\n ]\"\n :title=\"image.caption ?? image.alt ?? ''\"\n :target=\"isSameSite(image.url) ? undefined : '_blank'\"\n :rel=\"\n isSameSite(image.url)\n ? undefined\n : 'noopener noreferrer'\n \">\n <img\n v-if=\"canShowImage(image.url)\"\n :src=\"image.url\"\n :alt=\"image.alt ?? image.caption ?? ''\"\n class=\"w-full h-full object-cover transition-opacity group-hover:opacity-80\"\n @error=\"onImageError(image.url)\" />\n <div\n v-else\n class=\"w-full h-full flex flex-col items-center justify-center gap-4 bg-surface-1 text-word-3\">\n <VvIcon name=\"ri:camera-off-line\" class=\"text-24\" />\n <span class=\"text-12\">{{\n $t('label.imageLoadError')\n }}</span>\n </div>\n </a>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, onMounted } from 'vue'\n import { isSameSite } from 'utils'\n import { useImageFallback } from 'composables'\n import { useLightbox, useImageSizes } from '../composables/useLightbox'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n images: Array<{\n url: string\n caption?: string\n alt?: string\n }>\n }\n }\n return part\n })\n\n const galleryRef = ref<HTMLElement>()\n const { preload, getSize } = useImageSizes()\n\n const images = computed(() => toolPart.value.input?.images ?? [])\n\n const { canShowImage, onImageError } = useImageFallback()\n\n const gridCols = computed(() => {\n const count = images.value.length\n if (count === 1) {\n return 'grid-cols-1 justify-items-center'\n }\n if (count === 2) {\n return 'grid-cols-2'\n }\n return 'grid-cols-3'\n })\n\n const { init } = useLightbox({ gallery: galleryRef })\n\n onMounted(async () => {\n preload(images.value)\n await init()\n })\n</script>\n\n<template>\n <div\n v-if=\"images.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:image-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.gallery', { count: images.length }) }}\n </strong>\n </div>\n <div class=\"p-sm\">\n <div ref=\"galleryRef\" class=\"grid gap-8\" :class=\"gridCols\">\n <a\n v-for=\"image in images\"\n :key=\"image.url\"\n :href=\"canShowImage(image.url) ? image.url : undefined\"\n :data-pswp-src=\"\n canShowImage(image.url) ? image.url : undefined\n \"\n :data-pswp-width=\"getSize(image.url).width\"\n :data-pswp-height=\"getSize(image.url).height\"\n :data-pswp-caption=\"image.caption ?? image.alt ?? ''\"\n :data-cropped=\"true\"\n class=\"relative block aspect-square overflow-hidden rounded-xl group max-h-384\"\n :class=\"[\n { 'w-384 max-w-full': images.length === 1 },\n canShowImage(image.url)\n ? 'cursor-pointer'\n : 'pointer-events-none',\n ]\"\n :title=\"image.caption ?? image.alt ?? ''\"\n :target=\"isSameSite(image.url) ? undefined : '_blank'\"\n :rel=\"\n isSameSite(image.url)\n ? undefined\n : 'noopener noreferrer'\n \">\n <img\n v-if=\"canShowImage(image.url)\"\n :src=\"image.url\"\n :alt=\"image.alt ?? image.caption ?? ''\"\n class=\"w-full h-full object-cover transition-opacity group-hover:opacity-80\"\n @error=\"onImageError(image.url)\" />\n <div\n v-else\n class=\"w-full h-full flex flex-col items-center justify-center gap-4 bg-surface-1 text-word-3\">\n <VvIcon name=\"ri:camera-off-line\" class=\"text-24\" />\n <span class=\"text-12\">{{\n $t('label.imageLoadError')\n }}</span>\n </div>\n </a>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMI,IAAM,IAAQ,GAIR,IAAW,QACA,EAAM,IAUtB,GAEK,IAAa,EAAiB,GAC9B,EAAE,YAAS,eAAY,EAAc,GAErC,IAAS,QAAe,EAAS,MAAM,OAAO,UAAU,CAAC,CAAC,GAE1D,EAAE,iBAAc,oBAAiB,EAAiB,GAElD,IAAW,QAAe;GAC5B,IAAM,IAAQ,EAAO,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EAAA,CAAA,CAAU,CAAC,EAAM,GAAG,IAAI,KAAA,IAAS;IACzC,KAA8B,EAAA,CAAA,CAAU,CAAC,EAAM,GAAG,IAAgC,KAAA,IAAA;GAMzE,GAAA,CAAA,EAAA,CAAA,CAAY,CAAC,EAAM,GAAG,KADhC,EAAA,GAAA,EAKuC,OAAA;;IAHlC,KAAK,EAAM;IACX,KAAK,EAAM,OAAO,EAAM,WAAO;IAChC,OAAM;IACL,UAAK,MAAE,EAAA,CAAA,CAAY,CAAC,EAAM,GAAG;GAClC,GAAA,MAAA,IAAA,CAAA,MAAA,EAAA,GAAA,EAOM,OAPN,GAOM,CAJF,EAAoD,GAAA;IAA5C,MAAK;IAAqB,OAAM;GACxC,CAAA,GAAA,EAES,QAFT,GAES,EADLA,EAAAA,GAAE,sBAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,GAAA,IAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"PkToolShowImageGallery-D99N_Plf.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowImageGallery.vue","../../../../packages/components/src/chat/PkToolShowImageGallery.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, onMounted } from 'vue'\n import { isSameSite } from 'utils'\n import { useImageFallback } from 'composables'\n import { useLightbox, useImageSizes } from '../composables/useLightbox'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n images: Array<{\n url: string\n caption?: string\n alt?: string\n }>\n }\n }\n return part\n })\n\n const galleryRef = ref<HTMLElement>()\n const { preload, getSize } = useImageSizes()\n\n const images = computed(() => toolPart.value.input?.images ?? [])\n\n const { canShowImage, onImageError } = useImageFallback()\n\n const gridCols = computed(() => {\n const count = images.value.length\n if (count === 1) {\n return 'grid-cols-1 justify-items-center'\n }\n if (count === 2) {\n return 'grid-cols-2'\n }\n return 'grid-cols-3'\n })\n\n const { init } = useLightbox({ gallery: galleryRef })\n\n onMounted(async () => {\n preload(images.value)\n await init()\n })\n</script>\n\n<template>\n <div\n v-if=\"images.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:image-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.gallery', { count: images.length }) }}\n </strong>\n </div>\n <div class=\"p-sm\">\n <div ref=\"galleryRef\" class=\"grid gap-8\" :class=\"gridCols\">\n <a\n v-for=\"image in images\"\n :key=\"image.url\"\n :href=\"canShowImage(image.url) ? image.url : undefined\"\n :data-pswp-src=\"\n canShowImage(image.url) ? image.url : undefined\n \"\n :data-pswp-width=\"getSize(image.url).width\"\n :data-pswp-height=\"getSize(image.url).height\"\n :data-pswp-caption=\"image.caption ?? image.alt ?? ''\"\n :data-cropped=\"true\"\n class=\"relative block aspect-square overflow-hidden rounded-xl group max-h-384\"\n :class=\"[\n { 'w-384 max-w-full': images.length === 1 },\n canShowImage(image.url)\n ? 'cursor-pointer'\n : 'pointer-events-none',\n ]\"\n :title=\"image.caption ?? image.alt ?? ''\"\n :target=\"isSameSite(image.url) ? undefined : '_blank'\"\n :rel=\"\n isSameSite(image.url)\n ? undefined\n : 'noopener noreferrer'\n \">\n <img\n v-if=\"canShowImage(image.url)\"\n :src=\"image.url\"\n :alt=\"image.alt ?? image.caption ?? ''\"\n class=\"w-full h-full object-cover transition-opacity group-hover:opacity-80\"\n @error=\"onImageError(image.url)\" />\n <div\n v-else\n class=\"w-full h-full flex flex-col items-center justify-center gap-4 bg-surface-1 text-word-3\">\n <VvIcon name=\"ri:camera-off-line\" class=\"text-24\" />\n <span class=\"text-12\">{{\n $t('label.imageLoadError')\n }}</span>\n </div>\n </a>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, onMounted } from 'vue'\n import { isSameSite } from 'utils'\n import { useImageFallback } from 'composables'\n import { useLightbox, useImageSizes } from '../composables/useLightbox'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n images: Array<{\n url: string\n caption?: string\n alt?: string\n }>\n }\n }\n return part\n })\n\n const galleryRef = ref<HTMLElement>()\n const { preload, getSize } = useImageSizes()\n\n const images = computed(() => toolPart.value.input?.images ?? [])\n\n const { canShowImage, onImageError } = useImageFallback()\n\n const gridCols = computed(() => {\n const count = images.value.length\n if (count === 1) {\n return 'grid-cols-1 justify-items-center'\n }\n if (count === 2) {\n return 'grid-cols-2'\n }\n return 'grid-cols-3'\n })\n\n const { init } = useLightbox({ gallery: galleryRef })\n\n onMounted(async () => {\n preload(images.value)\n await init()\n })\n</script>\n\n<template>\n <div\n v-if=\"images.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:image-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.gallery', { count: images.length }) }}\n </strong>\n </div>\n <div class=\"p-sm\">\n <div ref=\"galleryRef\" class=\"grid gap-8\" :class=\"gridCols\">\n <a\n v-for=\"image in images\"\n :key=\"image.url\"\n :href=\"canShowImage(image.url) ? image.url : undefined\"\n :data-pswp-src=\"\n canShowImage(image.url) ? image.url : undefined\n \"\n :data-pswp-width=\"getSize(image.url).width\"\n :data-pswp-height=\"getSize(image.url).height\"\n :data-pswp-caption=\"image.caption ?? image.alt ?? ''\"\n :data-cropped=\"true\"\n class=\"relative block aspect-square overflow-hidden rounded-xl group max-h-384\"\n :class=\"[\n { 'w-384 max-w-full': images.length === 1 },\n canShowImage(image.url)\n ? 'cursor-pointer'\n : 'pointer-events-none',\n ]\"\n :title=\"image.caption ?? image.alt ?? ''\"\n :target=\"isSameSite(image.url) ? undefined : '_blank'\"\n :rel=\"\n isSameSite(image.url)\n ? undefined\n : 'noopener noreferrer'\n \">\n <img\n v-if=\"canShowImage(image.url)\"\n :src=\"image.url\"\n :alt=\"image.alt ?? image.caption ?? ''\"\n class=\"w-full h-full object-cover transition-opacity group-hover:opacity-80\"\n @error=\"onImageError(image.url)\" />\n <div\n v-else\n class=\"w-full h-full flex flex-col items-center justify-center gap-4 bg-surface-1 text-word-3\">\n <VvIcon name=\"ri:camera-off-line\" class=\"text-24\" />\n <span class=\"text-12\">{{\n $t('label.imageLoadError')\n }}</span>\n </div>\n </a>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMI,IAAM,IAAQ,GAIR,IAAW,QACA,EAAM,IAUtB,GAEK,IAAa,EAAiB,GAC9B,EAAE,YAAS,eAAY,EAAc,GAErC,IAAS,QAAe,EAAS,MAAM,OAAO,UAAU,CAAC,CAAC,GAE1D,EAAE,iBAAc,oBAAiB,EAAiB,GAElD,IAAW,QAAe;GAC5B,IAAM,IAAQ,EAAO,MAAM;GAO3B,OANI,MAAU,IACH,qCAEP,MAAU,IACH,gBAEJ;EACX,CAAC,GAEK,EAAE,YAAS,EAAY,EAAE,SAAS,EAAW,CAAC;SAEpD,EAAU,YAAY;GAElB,AADA,EAAQ,EAAO,KAAK,GACpB,MAAM,EAAK;EACf,CAAC;;GAKS,OAAA,EAAA,MAAO,UADjB,EAAA,GAAA,EAsDM,OAtDN,GAsDM,CAnDF,EAMM,OANN,GAMM,CAJF,EAA+C,GAAA;IAAvC,MAAK;IAAgB,OAAM;GACnC,CAAA,GAAA,EAES,UAFT,GAES,EADFA,EAAAA,GAAE,iBAAA,EAAA,OAA2B,EAAA,MAAO,OAAM,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAGrD,EA2CM,OA3CN,GA2CM,CA1CF,EAyCM,OAAA;IAzCG,SAAA;IAAJ,KAAI;IAAa,OAAK,EAAA,CAAC,cAAqB,EAAA,KAAQ,CAAA;GACrD,GAAA,EAAA,EAAA,EA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uCKPe.js";
|
|
|
2
2
|
import { $ as t, C as n, Ct as r, E as i, F as a, L as o, N as s, O as c, P as l, R as u, T as d, Tt as f, X as p, Y as m, Z as h, _ as g, b as _, bt as v, ct as y, dt as b, f as x, h as S, ht as C, it as w, k as T, lt as E, m as D, pt as O, v as k, w as A, x as j, xt as ee } from "./vue.runtime.esm-bundler-CIT_Sbqw.js";
|
|
3
3
|
import { n as M, t as te } from "./cdn-css-JUUNhyQ6.js";
|
|
4
4
|
import "./src-BQHP1-Xs.js";
|
|
5
|
-
import { i as ne } from "./dist-
|
|
6
|
-
import { d as re, f as ie, i as ae, n as oe, o as se } from "./index.es-
|
|
5
|
+
import { i as ne } from "./dist-QdjZA6MJ.js";
|
|
6
|
+
import { d as re, f as ie, i as ae, n as oe, o as se } from "./index.es-0YpCa4c5.js";
|
|
7
7
|
//#region ../../node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl.js
|
|
8
8
|
var ce = /* @__PURE__ */ e(((e, t) => {
|
|
9
9
|
(function(n, r) {
|
|
@@ -34782,4 +34782,4 @@ var Ue = {
|
|
|
34782
34782
|
//#endregion
|
|
34783
34783
|
export { $e as default };
|
|
34784
34784
|
|
|
34785
|
-
//# sourceMappingURL=PkToolShowLocation-
|
|
34785
|
+
//# sourceMappingURL=PkToolShowLocation-AfnrtFVJ.js.map
|