@templatical/editor 0.52.0 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/AiAltTextPopover-NMJqQKvD.js +106 -0
- package/dist/{AiAltTextReview-DE8t8Rud.js → AiAltTextReview-Ci4zHwRc.js} +68 -66
- package/dist/{AiChatPanel-7ftS7d40.js → AiChatPanel-DdhtfsmO.js} +223 -210
- package/dist/{AiPanels-CxGp6klr.js → AiPanels-HBx7xoJR.js} +6 -6
- package/dist/{AiRewriteMenu-DNI-5CUj.js → AiRewriteMenu-DPzSekZt.js} +78 -107
- package/dist/BlockIssueBadge-eIXZJ9M3.js +33 -0
- package/dist/BlockPreviewCanvas-DO-2TP_6.js +140 -0
- package/dist/{CloudHeaderExtras-CsgyNNV1.js → CloudHeaderExtras-XpjJjn3o.js} +4 -4
- package/dist/{CloudPanels-BDV4XQ_l.js → CloudPanels-i2kZdrdP.js} +44 -44
- package/dist/CollaborationNotices-DANsjl7c.js +65 -0
- package/dist/{CollaboratorBar-EeqqWcX6.js → CollaboratorBar-CbbAA0m1.js} +24 -24
- package/dist/CommentsPanel-CYW3LWis.js +16 -0
- package/dist/CommentsSidebar-CcF4ISMi.js +526 -0
- package/dist/{CountdownBlock-BT3ZTH1F.js → CountdownBlock-BMezkFbJ.js} +21 -21
- package/dist/CountdownToolbar-D3Lv74kU.js +258 -0
- package/dist/{IssuesPanel-BHFQ3wrP.js → IssuesPanel-BMAG9042.js} +141 -129
- package/dist/LanguageMenu-FlP_Jbup.js +403 -0
- package/dist/{LoadingTrack-DZA5AoP9.js → LoadingTrack-BG8cg9xi.js} +2 -2
- package/dist/LocaleNotices-DAnVszWu.js +46 -0
- package/dist/{LogicTagInsertButton-CSD9cfJB.js → LogicTagInsertButton-BjYs-UQX.js} +439 -430
- package/dist/{MediaEditModal-DQl5w44r.js → MediaEditModal-LnG-cF_S.js} +160 -160
- package/dist/{MediaPanels-BFWYuJot.js → MediaPanels-C2r5fiFo.js} +4 -4
- package/dist/{cdn/chunks/MergeTagInput-CFu9VXPS.js → MergeTagInput-BsnogCeY.js} +32 -34
- package/dist/{MergeTagModeToggle-DvD0ne7N.js → MergeTagModeToggle-DiufIQ-_.js} +49 -49
- package/dist/MergeTagTextarea-BweI-Xsi.js +126 -0
- package/dist/{ParagraphEditor-D-nqs82g.js → ParagraphEditor-qgBp5yIB.js} +286 -257
- package/dist/{RestoreVersionDialog-DqUPsLB9.js → RestoreVersionDialog-DdYUrFiK.js} +23 -23
- package/dist/{RichTextEditorContent-Xq9D0Zs3.js → RichTextEditorContent-C5MAzx3E.js} +54 -53
- package/dist/{SaveBlockDialog-DAPv70p4.js → SaveBlockDialog-eK6fjtTy.js} +86 -86
- package/dist/SavedBlocksBrowserModal-D2QHd2Yp.js +359 -0
- package/dist/{SavedBlocksPanels-ChbL9v9x.js → SavedBlocksPanels-Cl61f4Mf.js} +9 -9
- package/dist/{SavedBlocksPickBar-hRaiLNdu.js → SavedBlocksPickBar-CXP2dkeB.js} +15 -15
- package/dist/TemplateSettings-BKJrdZcH.js +294 -0
- package/dist/TestEmailModal-DQotJg6g.js +212 -0
- package/dist/{TestEmailPanel-COJQa2A9.js → TestEmailPanel-CwiTzJsh.js} +4 -4
- package/dist/TitleEditor-CzSvsPAn.js +202 -0
- package/dist/ToggleSwitch-R3wCCYE6.js +43 -0
- package/dist/Toolbar-Cd75ci5W.js +3711 -0
- package/dist/{TplModal-9IndEYk5.js → TplModal-ZoXu40T9.js} +17 -17
- package/dist/{VersionHistoryMenu-BG5qayvg.js → VersionHistoryMenu-BvhN-Ofk.js} +39 -39
- package/dist/{VersionHistoryPanels-hPg7Q5-f.js → VersionHistoryPanels-DPWMnYbd.js} +5 -5
- package/dist/VersionPreviewBanner-CuJnasxH.js +37 -0
- package/dist/WrapperBlock-D4fPwO0t.js +44 -0
- package/dist/{blockTypeIcons-yt7SLzub.js → blockTypeIcons-BXMxu86H.js} +27 -26
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-CD-Kt1qz.js → ca-DOuIxWRv.js} +114 -2
- package/dist/cdn/chunks/AiAltTextPopover-ByZ0FEqI.js +107 -0
- package/dist/cdn/chunks/AiAltTextPopover-ByZ0FEqI.js.map +1 -0
- package/dist/cdn/chunks/{AiAltTextReview-BafAtBoA.js → AiAltTextReview-Dtm3A2cD.js} +71 -69
- package/dist/cdn/chunks/AiAltTextReview-Dtm3A2cD.js.map +1 -0
- package/dist/cdn/chunks/AiChatPanel-DciEt27y.js +487 -0
- package/dist/cdn/chunks/AiChatPanel-DciEt27y.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-B4uAVRoO.js → AiPanels-BV5D1itk.js} +11 -11
- package/dist/cdn/chunks/{AiPanels-B4uAVRoO.js.map → AiPanels-BV5D1itk.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-4F6vwhJ5.js → AiRewriteMenu-D3jkh6Xb.js} +80 -80
- package/dist/cdn/chunks/AiRewriteMenu-D3jkh6Xb.js.map +1 -0
- package/dist/cdn/chunks/BlockIssueBadge-DyEgBZtR.js +34 -0
- package/dist/cdn/chunks/BlockIssueBadge-DyEgBZtR.js.map +1 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-RQFilqXC.js +142 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-Ny1X_mee.js.map → BlockPreviewCanvas-RQFilqXC.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DtMORiLS.js → CloudHeaderExtras-BtqdN777.js} +4 -4
- package/dist/cdn/chunks/{CloudHeaderExtras-DtMORiLS.js.map → CloudHeaderExtras-BtqdN777.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-BkmLc2Fl.js → CloudPanels-BSJ-Z5Hw.js} +43 -43
- package/dist/cdn/chunks/{CloudPanels-BkmLc2Fl.js.map → CloudPanels-BSJ-Z5Hw.js.map} +1 -1
- package/dist/cdn/chunks/CollaborationNotices-BS7xrlPE.js +67 -0
- package/dist/cdn/chunks/CollaborationNotices-BS7xrlPE.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-II8eYtKu.js → CollaboratorBar-Bc9914Az.js} +16 -16
- package/dist/cdn/chunks/{CollaboratorBar-II8eYtKu.js.map → CollaboratorBar-Bc9914Az.js.map} +1 -1
- package/dist/cdn/chunks/CommentsPanel-DbR9phAk.js +18 -0
- package/dist/cdn/chunks/{CommentsPanel-CAiwilM2.js.map → CommentsPanel-DbR9phAk.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-BD4--XP2.js +496 -0
- package/dist/cdn/chunks/CommentsSidebar-BD4--XP2.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-Dyr5P0IP.js → CountdownBlock-CjMhMhnv.js} +26 -26
- package/dist/cdn/chunks/{CountdownBlock-Dyr5P0IP.js.map → CountdownBlock-CjMhMhnv.js.map} +1 -1
- package/dist/cdn/chunks/CountdownToolbar-DxwYBw-d.js +260 -0
- package/dist/cdn/chunks/CountdownToolbar-DxwYBw-d.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-pr7_nuLI.js → IssuesPanel-CUmI4HMm.js} +132 -120
- package/dist/cdn/chunks/IssuesPanel-CUmI4HMm.js.map +1 -0
- package/dist/cdn/chunks/LanguageMenu-3ydCozQJ.js +359 -0
- package/dist/cdn/chunks/LanguageMenu-3ydCozQJ.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-DfJ_C33G.js → LoadingTrack-DUYcDHOV.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DfJ_C33G.js.map → LoadingTrack-DUYcDHOV.js.map} +1 -1
- package/dist/cdn/chunks/LocaleNotices-BfoH6gST.js +47 -0
- package/dist/cdn/chunks/LocaleNotices-BfoH6gST.js.map +1 -0
- package/dist/cdn/chunks/{LogicTagInsertButton-B_ldj3TO.js → LogicTagInsertButton-5Z3fFzjc.js} +465 -456
- package/dist/cdn/chunks/LogicTagInsertButton-5Z3fFzjc.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-CGfzcHwP.js → MediaEditModal-DDCIwr9U.js} +439 -439
- package/dist/cdn/chunks/MediaEditModal-DDCIwr9U.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-D0BdxdqP.js → MediaPanels-Dz79oy8P.js} +5 -5
- package/dist/cdn/chunks/{MediaPanels-D0BdxdqP.js.map → MediaPanels-Dz79oy8P.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagInput-CIWy-cXf.js +82 -0
- package/dist/cdn/chunks/{MergeTagInput-CFu9VXPS.js.map → MergeTagInput-CIWy-cXf.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BFpK5dxg.js → MergeTagModeToggle-BrP5GR-x.js} +50 -50
- package/dist/cdn/chunks/MergeTagModeToggle-BrP5GR-x.js.map +1 -0
- package/dist/cdn/chunks/MergeTagTextarea-D3nNDlhV.js +128 -0
- package/dist/cdn/chunks/MergeTagTextarea-D3nNDlhV.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-DDolH_Pf.js +660 -0
- package/dist/cdn/chunks/ParagraphEditor-DDolH_Pf.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-B866zFP0.js → RestoreVersionDialog-Crj1DBqC.js} +18 -18
- package/dist/cdn/chunks/{RestoreVersionDialog-B866zFP0.js.map → RestoreVersionDialog-Crj1DBqC.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DaY63kye.js → RichTextEditorContent-rCCqFlwJ.js} +43 -43
- package/dist/cdn/chunks/{RichTextEditorContent-DaY63kye.js.map → RichTextEditorContent-rCCqFlwJ.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-B7nftAAS.js → SaveBlockDialog-C34RW1aM.js} +71 -71
- package/dist/cdn/chunks/{SaveBlockDialog-B7nftAAS.js.map → SaveBlockDialog-C34RW1aM.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CJnwWPT-.js +356 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-B9XCjDfm.js.map → SavedBlocksBrowserModal-CJnwWPT-.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-C3nK90pz.js → SavedBlocksPanels-CA2PqXIH.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksPanels-C3nK90pz.js.map → SavedBlocksPanels-CA2PqXIH.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-B166Mek9.js → SavedBlocksPickBar-Dj3ortee.js} +16 -16
- package/dist/cdn/chunks/{SavedBlocksPickBar-B166Mek9.js.map → SavedBlocksPickBar-Dj3ortee.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-sW0ZlDl1.js +266 -0
- package/dist/cdn/chunks/TemplateSettings-sW0ZlDl1.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-DcwKhFnI.js → TestEmailModal-BXeCtTjU.js} +81 -78
- package/dist/cdn/chunks/TestEmailModal-BXeCtTjU.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-BDBAvAfI.js → TestEmailPanel-CpZcpB9D.js} +5 -5
- package/dist/cdn/chunks/{TestEmailPanel-BDBAvAfI.js.map → TestEmailPanel-CpZcpB9D.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Bv3SmSO6.js +202 -0
- package/dist/cdn/chunks/TitleEditor-Bv3SmSO6.js.map +1 -0
- package/dist/cdn/chunks/ToggleSwitch-BSkySwA1.js +45 -0
- package/dist/cdn/chunks/ToggleSwitch-BSkySwA1.js.map +1 -0
- package/dist/cdn/chunks/Toolbar-BJKpJ2Mg.js +3626 -0
- package/dist/cdn/chunks/Toolbar-BJKpJ2Mg.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-BDyeS69p.js → TplModal-DDDUDMYC.js} +19 -19
- package/dist/cdn/chunks/{TplModal-BDyeS69p.js.map → TplModal-DDDUDMYC.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-CmpgUI4Q.js → VersionHistoryMenu-DSElv3Sv.js} +36 -36
- package/dist/cdn/chunks/{VersionHistoryMenu-CmpgUI4Q.js.map → VersionHistoryMenu-DSElv3Sv.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DB_FZyyg.js → VersionHistoryPanels-H2nuik1l.js} +6 -6
- package/dist/cdn/chunks/{VersionHistoryPanels-DB_FZyyg.js.map → VersionHistoryPanels-H2nuik1l.js.map} +1 -1
- package/dist/cdn/chunks/VersionPreviewBanner-Whwxh55w.js +39 -0
- package/dist/cdn/chunks/VersionPreviewBanner-Whwxh55w.js.map +1 -0
- package/dist/cdn/chunks/WrapperBlock-jTqsuLnS.js +46 -0
- package/dist/cdn/chunks/WrapperBlock-jTqsuLnS.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-DMgLcuI8.js +21 -0
- package/dist/cdn/chunks/blockTypeIcons-DMgLcuI8.js.map +1 -0
- package/dist/{ca-CD-Kt1qz.js → cdn/chunks/ca-DOuIxWRv.js} +116 -0
- package/dist/cdn/chunks/ca-DOuIxWRv.js.map +1 -0
- package/dist/cdn/chunks/composables-D0UYam2P.js +3039 -0
- package/dist/cdn/chunks/composables-D0UYam2P.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-D6niZ2Rc.js → createCloudRuntime-BdsclY8_.js} +85 -83
- package/dist/cdn/chunks/createCloudRuntime-BdsclY8_.js.map +1 -0
- package/dist/{de-CeFJ6wbM.js → cdn/chunks/de-DaOUfYBX.js} +116 -0
- package/dist/cdn/chunks/de-DaOUfYBX.js.map +1 -0
- package/dist/{dist-CEdyyDn7.js → cdn/chunks/dist-BzXULHvI.js} +63 -61
- package/dist/cdn/chunks/{dist-C2epoAwW.js.map → dist-BzXULHvI.js.map} +1 -1
- package/dist/{dist-BA-jTQgw.js → cdn/chunks/dist-DqGgijFI.js} +108 -109
- package/dist/cdn/chunks/{dist-CONcGNwy.js.map → dist-DqGgijFI.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-B8hTTYFO.js → draggable-DepKdldn.js} +1384 -1376
- package/dist/cdn/chunks/draggable-DepKdldn.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-cvYkpbHD.js → editor-modal-CPbgthOv.js} +986 -986
- package/dist/cdn/chunks/{editor-modal-cvYkpbHD.js.map → editor-modal-CPbgthOv.js.map} +1 -1
- package/dist/{en-D14i5nFh.js → cdn/chunks/en-C0pHHMiR.js} +116 -0
- package/dist/cdn/chunks/en-C0pHHMiR.js.map +1 -0
- package/dist/cdn/chunks/en-IYVryJRl.js +1 -0
- package/dist/{es-zDacbMhs.js → cdn/chunks/es-CxyEKr6n.js} +116 -0
- package/dist/cdn/chunks/es-CxyEKr6n.js.map +1 -0
- package/dist/cdn/chunks/{extensions-ClDhn88e.js → extensions-Uh9vuFfK.js} +57 -57
- package/dist/cdn/chunks/{extensions-ClDhn88e.js.map → extensions-Uh9vuFfK.js.map} +1 -1
- package/dist/{fr-CSgYtjOd.js → cdn/chunks/fr-CYbamiI6.js} +116 -0
- package/dist/cdn/chunks/fr-CYbamiI6.js.map +1 -0
- package/dist/cdn/chunks/{icons-HCBP93Ch.js → icons-CSSMtbGK.js} +187 -144
- package/dist/cdn/chunks/icons-CSSMtbGK.js.map +1 -0
- package/dist/{ja-B7H3ID8O.js → cdn/chunks/ja-DfaIAoGI.js} +116 -0
- package/dist/cdn/chunks/ja-DfaIAoGI.js.map +1 -0
- package/dist/cdn/chunks/keys-CoQtCqNv.js +11 -0
- package/dist/cdn/chunks/keys-CoQtCqNv.js.map +1 -0
- package/dist/cdn/chunks/languageName-DEEOhDWI.js +12 -0
- package/dist/cdn/chunks/languageName-DEEOhDWI.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-DkLBNrft.js → liquid.browser-rubac0VA.js} +782 -746
- package/dist/cdn/chunks/liquid.browser-rubac0VA.js.map +1 -0
- package/dist/{nl-176ySmc5.js → cdn/chunks/nl-DkrB-VKZ.js} +116 -0
- package/dist/cdn/chunks/nl-DkrB-VKZ.js.map +1 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-oGhwVscw.js +290 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-oGhwVscw.js.map +1 -0
- package/dist/cdn/chunks/noticeTones-D7BPu-Le.js +16 -0
- package/dist/cdn/chunks/noticeTones-D7BPu-Le.js.map +1 -0
- package/dist/cdn/chunks/plural-CyxrJXL1.js +17 -0
- package/dist/cdn/chunks/plural-CyxrJXL1.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-D-dsBq5t.js → preRenderCustomBlocks-C8k7tw98.js} +5 -5
- package/dist/cdn/chunks/{preRenderCustomBlocks-D-dsBq5t.js.map → preRenderCustomBlocks-C8k7tw98.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-dDlTwX18.js → pt-BR-CY5Ye7eP.js} +115 -1
- package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +1 -0
- package/dist/cdn/chunks/sanitizeHtml-DYklmvgX.js +61 -0
- package/dist/cdn/chunks/sanitizeHtml-DYklmvgX.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-BAiuHyJs.js +2638 -0
- package/dist/cdn/chunks/socialIcons-BAiuHyJs.js.map +1 -0
- package/dist/cdn/chunks/src-CACM3o--.js +2606 -0
- package/dist/cdn/chunks/src-CACM3o--.js.map +1 -0
- package/dist/cdn/chunks/{src-CUH_EI7k.js → src-Ddpm4HsS.js} +225 -259
- package/dist/cdn/chunks/src-Ddpm4HsS.js.map +1 -0
- package/dist/cdn/chunks/{src-BKpAis_q.js → src-DheBmnvF.js} +635 -478
- package/dist/cdn/chunks/src-DheBmnvF.js.map +1 -0
- package/dist/{styleConstants-B8xVRiwX.js → cdn/chunks/styleConstants-CgiNKdnc.js} +7 -5
- package/dist/cdn/chunks/styleConstants-CgiNKdnc.js.map +1 -0
- package/dist/cdn/chunks/templateSettingsFields-cjlP-jdw.js.map +1 -1
- package/dist/cdn/chunks/{tiptap-ChSZybTi.js → tiptap-Dipw_zOQ.js} +48 -48
- package/dist/cdn/chunks/{tiptap-ChSZybTi.js.map → tiptap-Dipw_zOQ.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-RJXyVnIf.js → useCloudI18n-Cc5NZqiI.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-RJXyVnIf.js.map → useCloudI18n-Cc5NZqiI.js.map} +1 -1
- package/dist/cdn/chunks/useEditorRoot-D_LuZ_hE.js +9 -0
- package/dist/cdn/chunks/{useEditorRoot-BT3c9CXj.js.map → useEditorRoot-D_LuZ_hE.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-11iqzC6m.js → useI18n-BnJYydPv.js} +3 -3
- package/dist/cdn/chunks/{useI18n-11iqzC6m.js.map → useI18n-BnJYydPv.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-yXbRKNrs.js +33 -0
- package/dist/cdn/chunks/useLocalizedDisplay-yXbRKNrs.js.map +1 -0
- package/dist/cdn/chunks/{useLogicTag-vy5KGg5D.js → useLogicTag-B7RpqVFQ.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-vy5KGg5D.js.map → useLogicTag-B7RpqVFQ.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-BFBBjnwh.js → useMergeTag-C-32ETjj.js} +6 -6
- package/dist/cdn/chunks/{useMergeTag-BFBBjnwh.js.map → useMergeTag-C-32ETjj.js.map} +1 -1
- package/dist/cdn/chunks/usePopoverPosition-BWAXWeBv.js +78 -0
- package/dist/cdn/chunks/usePopoverPosition-BWAXWeBv.js.map +1 -0
- package/dist/cdn/chunks/{useScrollToBlock-C0dawxGr.js → useScrollToBlock-Ct1AwLD-.js} +5 -5
- package/dist/cdn/chunks/useScrollToBlock-Ct1AwLD-.js.map +1 -0
- package/dist/cdn/chunks/{withCurrentFont-C3CquBQN.js → withCurrentFont-D33ZXoWp.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-C3CquBQN.js.map → withCurrentFont-D33ZXoWp.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +2503 -1809
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-N3x4z_rH.js → check-ChQ0l8EQ.js} +1 -1
- package/dist/{chevron-down-gXu9qNwO.js → chevron-down-Bh6cp6PI.js} +1 -1
- package/dist/{chevron-right-rL0ayGk5.js → chevron-right-LUgdqdoW.js} +1 -1
- package/dist/{chevron-up-0ugh8HnW.js → chevron-up-XsDeJxQN.js} +1 -1
- package/dist/{circle-alert-B9Ls75B5.js → circle-alert-lODfDsrj.js} +1 -1
- package/dist/{clock-BqHBaCLm.js → clock-DrqFEZkT.js} +1 -1
- package/dist/composables-BOP3ERRP.js +4517 -0
- package/dist/{createCloudRuntime-B5VIdnwz.js → createCloudRuntime-DGV5a5Af.js} +47 -45
- package/dist/{createLucideIcon-BV7Gwz_Z.js → createLucideIcon-Dw5e5gVE.js} +16 -16
- package/dist/{cdn/chunks/de-CeFJ6wbM.js → de-DaOUfYBX.js} +114 -2
- package/dist/{cdn/chunks/dist-CONcGNwy.js → dist-0alKVRc_.js} +100 -99
- package/dist/{dist-Cy8I5scI.js → dist-54VCNoC0.js} +2 -2
- package/dist/dist-6DU0me3E.js +4 -0
- package/dist/{dist-p3wymUDt.js → dist-B8dY8drK.js} +2 -2
- package/dist/{dist-Dd5MU2Ev.js → dist-B9a7iVye.js} +2 -2
- package/dist/{dist-V7W1UhVr.js → dist-BWflWcpW.js} +2 -2
- package/dist/{dist-D6fZec6r.js → dist-C3hu_C3w.js} +2 -2
- package/dist/{cdn/chunks/dist-C2epoAwW.js → dist-CX7skkvG.js} +29 -31
- package/dist/dist-CcOn7WCo.js +4 -0
- package/dist/dist-Cdkm20M6.js +2542 -0
- package/dist/{dist-BS5uKktL.js → dist-ChOb5XHW.js} +2 -2
- package/dist/{dist-BF5zEHop.js → dist-DZ3X-uB8.js} +2 -2
- package/dist/{dist-CWSG7Kj0.js → dist-D_XrUEET.js} +5 -5
- package/dist/{dist-txQLT2sF.js → dist-TAv500j6.js} +2 -2
- package/dist/{dist-DDN7yR-w.js → dist-fqSers8_.js} +131 -131
- package/dist/{editor-modal-Du9VI9q4.js → editor-modal-B_2EAOjN.js} +907 -906
- package/dist/{cdn/chunks/en-D14i5nFh.js → en-C0pHHMiR.js} +114 -2
- package/dist/en-DTtwco2Q.js +1 -0
- package/dist/{cdn/chunks/es-zDacbMhs.js → es-CxyEKr6n.js} +114 -2
- package/dist/{extensions-FRYhx7qa.js → extensions-DOLZkLzV.js} +173 -173
- package/dist/{eye-BKj9Tfnc.js → eye-DChfk0gi.js} +1 -1
- package/dist/{cdn/chunks/fr-CSgYtjOd.js → fr-CYbamiI6.js} +114 -2
- package/dist/{image-DNdvdTla.js → image--Hj2by1G.js} +1 -1
- package/dist/index.d.ts +182 -14
- package/dist/{info-Bx-kBkbH.js → info-BbXgy82f.js} +1 -1
- package/dist/{cdn/chunks/ja-B7H3ID8O.js → ja-DfaIAoGI.js} +114 -2
- package/dist/keys-BCqskl51.js +9 -0
- package/dist/languageName-DEEOhDWI.js +10 -0
- package/dist/{link-D8-rYdIQ.js → link-C2_8yJno.js} +1 -1
- package/dist/{liquid.browser-D1RxawkY.js → liquid.browser-DUXEekoN.js} +781 -745
- package/dist/{list-BneisA27.js → list-DLGs2n0V.js} +1 -1
- package/dist/{loader-circle-DBEXphyx.js → loader-circle-BbDItE_O.js} +1 -1
- package/dist/{message-circle-Bg4xInCM.js → message-circle-NAModq0p.js} +1 -1
- package/dist/{cdn/chunks/nl-176ySmc5.js → nl-DkrB-VKZ.js} +114 -2
- package/dist/normalizeMergeTagMarkup-CUCo7B5X.js +288 -0
- package/dist/noticeTones-D7BPu-Le.js +14 -0
- package/dist/{package-B40Vkfsp.js → package-BuzsfRyH.js} +1 -1
- package/dist/{pencil-CYdAHTds.js → pencil-BTUUECH4.js} +1 -1
- package/dist/plural-CyxrJXL1.js +15 -0
- package/dist/plus-Dm7DN65T.js +13 -0
- package/dist/{preRenderCustomBlocks-AbZArwkR.js → preRenderCustomBlocks-Bs3N9no-.js} +4 -4
- package/dist/{pt-BR-dDlTwX18.js → pt-BR-CY5Ye7eP.js} +114 -0
- package/dist/{refresh-cw-Bb1FWrU0.js → refresh-cw-xMURqGWi.js} +2 -12
- package/dist/rotate-ccw-DqVcEIn5.js +13 -0
- package/dist/{runtime-dom.esm-bundler-CLGymEyk.js → runtime-dom.esm-bundler-DlHp8xgy.js} +167 -167
- package/dist/sanitizeHtml-mKgNUdME.js +962 -0
- package/dist/{search-BZEo08gi.js → search-Cfr3W44N.js} +1 -1
- package/dist/{send-DHtrnXQs.js → send-CH1SrvyB.js} +1 -1
- package/dist/{smartphone-dlN3vpA3.js → smartphone-pAkvzjdI.js} +1 -1
- package/dist/socialIcons-Dqr4DJOz.js +2705 -0
- package/dist/{sparkles-NOttoDnJ.js → sparkles-CRO0cCnp.js} +1 -1
- package/dist/{square-B1CJgdt2.js → square-CaQWMntx.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{cdn/chunks/styleConstants-B8xVRiwX.js → styleConstants-CgiNKdnc.js} +5 -7
- package/dist/templatical-editor.js +2294 -1608
- package/dist/{text-align-start-zpoXmb-Z.js → text-align-start-BQ39AaRK.js} +1 -1
- package/dist/{trash-CGbk4Sgt.js → trash-BL5gEFHN.js} +1 -1
- package/dist/{triangle-alert-CKLMyGVp.js → triangle-alert-BYbKu7zZ.js} +1 -1
- package/dist/{upload-DQoackAn.js → upload-BhmL4Vqx.js} +1 -1
- package/dist/{useCloudI18n-DcLtxOQZ.js → useCloudI18n-Dh2iydo1.js} +4 -4
- package/dist/useEditorRoot-DY3mgcHm.js +7 -0
- package/dist/{useI18n-CeTm777E.js → useI18n-CgtvtF4C.js} +4 -4
- package/dist/useLocalizedDisplay-DNNwDRxL.js +31 -0
- package/dist/{useLogicTag-DFDYJeMN.js → useLogicTag-BXXXQQmi.js} +4 -4
- package/dist/{useMergeTag-B46vACAG.js → useMergeTag-C9Okr87y.js} +5 -5
- package/dist/usePopoverPosition-VDQjyX_A.js +76 -0
- package/dist/{useScrollToBlock-C-NzvjeO.js → useScrollToBlock-C0Kapxdh.js} +5 -5
- package/dist/{vue.runtime.esm-bundler-CrlI8j5R.js → vue.runtime.esm-bundler-BJXc_Mri.js} +1247 -1239
- package/dist/withCurrentFont-DJiQqZzL.js +18 -0
- package/dist/{x-zcrnmcmU.js → x-B7NZYzhx.js} +1 -1
- package/package.json +23 -23
- package/dist/AiAltTextPopover-Cm11CsKH.js +0 -105
- package/dist/BlockIssueBadge-6Ri2FfX-.js +0 -33
- package/dist/BlockPreviewCanvas-Df9iz7sK.js +0 -140
- package/dist/CollaborationNotices-JQ3vQoqO.js +0 -75
- package/dist/CommentsPanel-BuftXc0U.js +0 -16
- package/dist/CommentsSidebar-Co3x4uH0.js +0 -499
- package/dist/CountdownToolbar-CrL4WKy9.js +0 -197
- package/dist/MergeTagInput-DE7kWwXx.js +0 -80
- package/dist/MergeTagTextarea-DVPQkiYY.js +0 -69
- package/dist/SavedBlocksBrowserModal-SRtN5h9q.js +0 -359
- package/dist/TemplateSettings-D0XcH32O.js +0 -236
- package/dist/TestEmailModal-Cb5t0yB2.js +0 -209
- package/dist/TitleEditor-BYk_9SpQ.js +0 -198
- package/dist/ToggleSwitch-poGWbduy.js +0 -36
- package/dist/Toolbar-Dku_pZni.js +0 -3145
- package/dist/VersionPreviewBanner-CSs7zum_.js +0 -37
- package/dist/WrapperBlock-DwjK_IdJ.js +0 -44
- package/dist/cdn/chunks/AiAltTextPopover-DjMoJCgU.js +0 -106
- package/dist/cdn/chunks/AiAltTextPopover-DjMoJCgU.js.map +0 -1
- package/dist/cdn/chunks/AiAltTextReview-BafAtBoA.js.map +0 -1
- package/dist/cdn/chunks/AiChatPanel-DXeZgc7D.js +0 -474
- package/dist/cdn/chunks/AiChatPanel-DXeZgc7D.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-4F6vwhJ5.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-DIJDqqcY.js +0 -34
- package/dist/cdn/chunks/BlockIssueBadge-DIJDqqcY.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-Ny1X_mee.js +0 -142
- package/dist/cdn/chunks/CollaborationNotices-Hf8r08Sw.js +0 -77
- package/dist/cdn/chunks/CollaborationNotices-Hf8r08Sw.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-CAiwilM2.js +0 -18
- package/dist/cdn/chunks/CommentsSidebar-Dj8sDiLN.js +0 -469
- package/dist/cdn/chunks/CommentsSidebar-Dj8sDiLN.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-CguFJdqn.js +0 -199
- package/dist/cdn/chunks/CountdownToolbar-CguFJdqn.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-pr7_nuLI.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-B_ldj3TO.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-CGfzcHwP.js.map +0 -1
- package/dist/cdn/chunks/MergeTagModeToggle-BFpK5dxg.js.map +0 -1
- package/dist/cdn/chunks/MergeTagTextarea-Zo0mYWbf.js +0 -71
- package/dist/cdn/chunks/MergeTagTextarea-Zo0mYWbf.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DsPLVAgm.js +0 -631
- package/dist/cdn/chunks/ParagraphEditor-DsPLVAgm.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-B9XCjDfm.js +0 -356
- package/dist/cdn/chunks/TemplateSettings-jWpmuWDR.js +0 -208
- package/dist/cdn/chunks/TemplateSettings-jWpmuWDR.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-DcwKhFnI.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-R2lQw6WA.js +0 -198
- package/dist/cdn/chunks/TitleEditor-R2lQw6WA.js.map +0 -1
- package/dist/cdn/chunks/ToggleSwitch-BDMugNES.js +0 -38
- package/dist/cdn/chunks/ToggleSwitch-BDMugNES.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-CnvfW72e.js +0 -3061
- package/dist/cdn/chunks/Toolbar-CnvfW72e.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-CZ--HOoa.js +0 -39
- package/dist/cdn/chunks/VersionPreviewBanner-CZ--HOoa.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-D3obNGab.js +0 -46
- package/dist/cdn/chunks/WrapperBlock-D3obNGab.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-DFf7AyqI.js +0 -21
- package/dist/cdn/chunks/blockTypeIcons-DFf7AyqI.js.map +0 -1
- package/dist/cdn/chunks/ca-CD-Kt1qz.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-D6niZ2Rc.js.map +0 -1
- package/dist/cdn/chunks/de-CeFJ6wbM.js.map +0 -1
- package/dist/cdn/chunks/draggable-B8hTTYFO.js.map +0 -1
- package/dist/cdn/chunks/en-CKAXAo3Z.js +0 -1
- package/dist/cdn/chunks/en-D14i5nFh.js.map +0 -1
- package/dist/cdn/chunks/es-zDacbMhs.js.map +0 -1
- package/dist/cdn/chunks/fr-CSgYtjOd.js.map +0 -1
- package/dist/cdn/chunks/icons-HCBP93Ch.js.map +0 -1
- package/dist/cdn/chunks/ja-B7H3ID8O.js.map +0 -1
- package/dist/cdn/chunks/keys-BF9gazbd.js +0 -11
- package/dist/cdn/chunks/keys-BF9gazbd.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DkLBNrft.js.map +0 -1
- package/dist/cdn/chunks/nl-176ySmc5.js.map +0 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DpHCSESZ.js +0 -198
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DpHCSESZ.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-dDlTwX18.js.map +0 -1
- package/dist/cdn/chunks/sanitizeHtml-B2h15u0_.js +0 -72
- package/dist/cdn/chunks/sanitizeHtml-B2h15u0_.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-rJoqO1TJ.js +0 -2008
- package/dist/cdn/chunks/socialIcons-rJoqO1TJ.js.map +0 -1
- package/dist/cdn/chunks/src-BKpAis_q.js.map +0 -1
- package/dist/cdn/chunks/src-C9DTvn1H.js +0 -1423
- package/dist/cdn/chunks/src-C9DTvn1H.js.map +0 -1
- package/dist/cdn/chunks/src-CUH_EI7k.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-B8xVRiwX.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CjaEV_01.js +0 -2534
- package/dist/cdn/chunks/useEditorCore-CjaEV_01.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-BT3c9CXj.js +0 -9
- package/dist/cdn/chunks/usePopoverPosition-AnVIwiVv.js +0 -70
- package/dist/cdn/chunks/usePopoverPosition-AnVIwiVv.js.map +0 -1
- package/dist/cdn/chunks/useScrollToBlock-C0dawxGr.js.map +0 -1
- package/dist/dist-CzrLYq2s.js +0 -1363
- package/dist/dist-DyFArF_G.js +0 -4
- package/dist/dist-pA3ooG6N.js +0 -4
- package/dist/en-CyEE7FPY.js +0 -1
- package/dist/keys-DBjrQkYH.js +0 -9
- package/dist/normalizeMergeTagMarkup-IH8COHzd.js +0 -196
- package/dist/sanitizeHtml-CnOA1efV.js +0 -942
- package/dist/socialIcons-B_d52_eS.js +0 -2075
- package/dist/useEditorCore-DG9UvWUm.js +0 -4011
- package/dist/useEditorRoot-BKr6nNkC.js +0 -7
- package/dist/usePopoverPosition-C42kD7zt.js +0 -68
- package/dist/withCurrentFont-v_a4Oso8.js +0 -18
|
@@ -1,474 +0,0 @@
|
|
|
1
|
-
import { $ as e, A as t, C as n, D as r, I as i, L as a, P as o, U as s, V as c, W as ee, _ as l, b as u, dt as d, g as f, h as p, lt as m, m as h, o as te, ot as g, p as _, u as v, x as y } from "./draggable-B8hTTYFO.js";
|
|
2
|
-
import { _ as ne, g as b } from "./dist-C2epoAwW.js";
|
|
3
|
-
import { X as re } from "./keys-BF9gazbd.js";
|
|
4
|
-
import { t as ie } from "./useI18n-11iqzC6m.js";
|
|
5
|
-
import { D as x, K as ae, Pt as oe, T as se, at as ce, ht as S, j as le, l as ue, t as C, tt as de, wt as w, z as fe } from "./icons-HCBP93Ch.js";
|
|
6
|
-
import { t as pe } from "./LoadingTrack-DfJ_C33G.js";
|
|
7
|
-
import { t as T } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
8
|
-
import { n as E } from "./aiErrors-C3QEMB0x.js";
|
|
9
|
-
import { S as D } from "./styleConstants-B8xVRiwX.js";
|
|
10
|
-
// src/components/ai/AiPanelShell.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var O = ["aria-label", "data-testid"], k = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, A = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5" }, j = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, M = { "data-testid": "ai-panel-title" }, N = {
|
|
12
|
-
key: 0,
|
|
13
|
-
"data-testid": "ai-panel-subtitle",
|
|
14
|
-
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
15
|
-
}, P = { class: "tpl:flex tpl:items-center tpl:gap-1" }, F = ["aria-label", "title"], I = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, L = /* @__PURE__ */ n({
|
|
16
|
-
__name: "AiPanelShell",
|
|
17
|
-
props: {
|
|
18
|
-
title: {},
|
|
19
|
-
subtitle: {},
|
|
20
|
-
testid: {},
|
|
21
|
-
closeLabel: {}
|
|
22
|
-
},
|
|
23
|
-
emits: ["close"],
|
|
24
|
-
setup(e, { emit: t }) {
|
|
25
|
-
let n = t;
|
|
26
|
-
return (t, r) => (o(), l("div", {
|
|
27
|
-
role: "complementary",
|
|
28
|
-
"aria-label": e.title,
|
|
29
|
-
"data-testid": e.testid,
|
|
30
|
-
class: "tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
31
|
-
}, [
|
|
32
|
-
h("div", k, [h("div", A, [h("div", j, [y(g(x), {
|
|
33
|
-
size: 13,
|
|
34
|
-
"stroke-width": 2,
|
|
35
|
-
"aria-hidden": "true"
|
|
36
|
-
}), h("span", M, d(e.title), 1)]), e.subtitle ? (o(), l("p", N, d(e.subtitle), 1)) : f("", !0)]), h("div", P, [a(t.$slots, "actions"), h("button", {
|
|
37
|
-
type: "button",
|
|
38
|
-
"data-testid": "ai-panel-close",
|
|
39
|
-
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]",
|
|
40
|
-
"aria-label": e.closeLabel,
|
|
41
|
-
title: e.closeLabel,
|
|
42
|
-
onClick: r[0] ||= (e) => n("close")
|
|
43
|
-
}, [y(g(C), {
|
|
44
|
-
size: 14,
|
|
45
|
-
"stroke-width": 2,
|
|
46
|
-
"aria-hidden": "true"
|
|
47
|
-
})], 8, F)])]),
|
|
48
|
-
h("div", I, [a(t.$slots, "default")]),
|
|
49
|
-
a(t.$slots, "footer")
|
|
50
|
-
], 8, O));
|
|
51
|
-
}
|
|
52
|
-
}), R = /* @__PURE__ */ new Set([
|
|
53
|
-
"image/png",
|
|
54
|
-
"image/jpeg",
|
|
55
|
-
"image/webp",
|
|
56
|
-
"image/gif",
|
|
57
|
-
"application/pdf"
|
|
58
|
-
]);
|
|
59
|
-
function z(e, t) {
|
|
60
|
-
let n = [...e], r = [], i = e.reduce((e, t) => e + t.size, 0);
|
|
61
|
-
for (let e of t) {
|
|
62
|
-
let t = n.length >= 4 ? "tooMany" : R.has(e.type) ? e.size > 5242880 ? "tooLarge" : i + e.size > 10485760 ? "totalTooLarge" : null : "wrongType";
|
|
63
|
-
t ? r.push({
|
|
64
|
-
name: e.name,
|
|
65
|
-
reason: t
|
|
66
|
-
}) : (n.push(e), i += e.size);
|
|
67
|
-
}
|
|
68
|
-
return {
|
|
69
|
-
accepted: n,
|
|
70
|
-
errors: r
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
// src/components/ai/AiChatPanel.vue?vue&type=script&setup=true&lang.ts
|
|
74
|
-
var B = [
|
|
75
|
-
"aria-label",
|
|
76
|
-
"title",
|
|
77
|
-
"disabled"
|
|
78
|
-
], me = {
|
|
79
|
-
key: 0,
|
|
80
|
-
"data-testid": "ai-chat-drop-hint",
|
|
81
|
-
class: "tpl:absolute tpl:inset-0 tpl:z-20 tpl:flex tpl:items-center tpl:justify-center tpl:border-2 tpl:border-dashed tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-4 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-primary)] tpl:pointer-events-none"
|
|
82
|
-
}, he = {
|
|
83
|
-
key: 0,
|
|
84
|
-
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
85
|
-
}, ge = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, _e = {
|
|
86
|
-
key: 1,
|
|
87
|
-
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
88
|
-
}, ve = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ye = {
|
|
89
|
-
key: 2,
|
|
90
|
-
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
91
|
-
}, be = {
|
|
92
|
-
key: 0,
|
|
93
|
-
"data-testid": "ai-chat-prompt",
|
|
94
|
-
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
95
|
-
style: {
|
|
96
|
-
"background-color": "var(--tpl-primary-light)",
|
|
97
|
-
color: "var(--tpl-text)",
|
|
98
|
-
"max-width": "85%",
|
|
99
|
-
"box-shadow": "var(--tpl-shadow)"
|
|
100
|
-
}
|
|
101
|
-
}, xe = {
|
|
102
|
-
key: 1,
|
|
103
|
-
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
104
|
-
}, Se = {
|
|
105
|
-
key: 1,
|
|
106
|
-
"data-testid": "ai-chat-reply",
|
|
107
|
-
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
108
|
-
style: {
|
|
109
|
-
"max-width": "85%",
|
|
110
|
-
"background-color": "var(--tpl-bg)",
|
|
111
|
-
color: "var(--tpl-text)",
|
|
112
|
-
"box-shadow": "var(--tpl-shadow)"
|
|
113
|
-
}
|
|
114
|
-
}, Ce = {
|
|
115
|
-
key: 2,
|
|
116
|
-
"data-testid": "ai-chat-applied",
|
|
117
|
-
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
118
|
-
}, we = ["disabled", "onClick"], Te = {
|
|
119
|
-
key: 3,
|
|
120
|
-
role: "alert",
|
|
121
|
-
"data-testid": "ai-chat-item-error",
|
|
122
|
-
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
123
|
-
}, Ee = {
|
|
124
|
-
key: 1,
|
|
125
|
-
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
126
|
-
style: {
|
|
127
|
-
"background-color": "color-mix(in srgb, var(--tpl-bg) 50%, transparent)",
|
|
128
|
-
"backdrop-filter": "blur(2px)"
|
|
129
|
-
}
|
|
130
|
-
}, De = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Oe = ["onClick"], ke = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Ae = ["disabled"], je = {
|
|
131
|
-
key: 0,
|
|
132
|
-
class: "tpl:mb-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
133
|
-
}, Me = { class: "tpl:truncate" }, Ne = [
|
|
134
|
-
"aria-label",
|
|
135
|
-
"disabled",
|
|
136
|
-
"onClick"
|
|
137
|
-
], Pe = {
|
|
138
|
-
key: 1,
|
|
139
|
-
class: "tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
140
|
-
}, V = {
|
|
141
|
-
"aria-live": "polite",
|
|
142
|
-
class: "tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
143
|
-
}, Fe = {
|
|
144
|
-
key: 1,
|
|
145
|
-
role: "status",
|
|
146
|
-
class: "tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
147
|
-
}, Ie = ["disabled"], Le = {
|
|
148
|
-
key: 2,
|
|
149
|
-
role: "alert",
|
|
150
|
-
"data-testid": "ai-chat-error",
|
|
151
|
-
class: "tpl:mx-3 tpl:mb-2 tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs",
|
|
152
|
-
style: {
|
|
153
|
-
"background-color": "var(--tpl-danger-light)",
|
|
154
|
-
color: "var(--tpl-danger)"
|
|
155
|
-
}
|
|
156
|
-
}, Re = { class: "tpl-ai-input-wrapper tpl-focus-ring-host tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, ze = [
|
|
157
|
-
"placeholder",
|
|
158
|
-
"aria-label",
|
|
159
|
-
"disabled"
|
|
160
|
-
], Be = { class: "tpl:flex tpl:items-center tpl:justify-between" }, Ve = [
|
|
161
|
-
"aria-label",
|
|
162
|
-
"title",
|
|
163
|
-
"disabled"
|
|
164
|
-
], He = ["aria-label", "title"], Ue = [
|
|
165
|
-
"aria-label",
|
|
166
|
-
"title",
|
|
167
|
-
"disabled"
|
|
168
|
-
], We = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, H = /*#__PURE__*/ T(/* @__PURE__ */ n({
|
|
169
|
-
__name: "AiChatPanel",
|
|
170
|
-
props: { feature: {} },
|
|
171
|
-
emits: ["close"],
|
|
172
|
-
setup(n, { emit: a }) {
|
|
173
|
-
let T = n, O = a, { t: k, format: A } = ie(), j = r(re, void 0), M = e(""), N = e(null), P = e(null), F = e([]), I = e([]), R = e(0);
|
|
174
|
-
c(() => T.feature.templateSession.value, () => {
|
|
175
|
-
M.value = "", F.value = [], I.value = [], R.value = 0;
|
|
176
|
-
}, { flush: "sync" });
|
|
177
|
-
let H = _(() => T.feature.has("chatAttachments"));
|
|
178
|
-
function U(e) {
|
|
179
|
-
let t = z(F.value, e);
|
|
180
|
-
F.value = t.accepted;
|
|
181
|
-
let n = {
|
|
182
|
-
tooMany: "attachTooMany",
|
|
183
|
-
tooLarge: "attachTooLarge",
|
|
184
|
-
totalTooLarge: "attachTotalTooLarge",
|
|
185
|
-
wrongType: "attachWrongType"
|
|
186
|
-
};
|
|
187
|
-
I.value = t.errors.map((e) => A(k.ai.chat[n[e.reason]], { name: e.name }));
|
|
188
|
-
}
|
|
189
|
-
function Ge(e) {
|
|
190
|
-
let t = e.target;
|
|
191
|
-
!Y.value && H.value && U(Array.from(t.files ?? [])), t.value = "";
|
|
192
|
-
}
|
|
193
|
-
function Ke(e) {
|
|
194
|
-
Y.value || (F.value.splice(e, 1), I.value = []);
|
|
195
|
-
}
|
|
196
|
-
function W(e) {
|
|
197
|
-
return Array.from(e.dataTransfer?.types ?? []).includes("Files");
|
|
198
|
-
}
|
|
199
|
-
function qe(e) {
|
|
200
|
-
H.value && !Y.value && W(e) && (e.preventDefault(), R.value++);
|
|
201
|
-
}
|
|
202
|
-
function Je(e) {
|
|
203
|
-
W(e) && (R.value = Math.max(0, R.value - 1));
|
|
204
|
-
}
|
|
205
|
-
function Ye(e) {
|
|
206
|
-
H.value && W(e) && e.preventDefault();
|
|
207
|
-
}
|
|
208
|
-
function Xe(e) {
|
|
209
|
-
R.value = 0, H.value && W(e) && (e.preventDefault(), Y.value || U(Array.from(e.dataTransfer?.files ?? [])));
|
|
210
|
-
}
|
|
211
|
-
c(() => T.feature.importQueue.value, (e) => {
|
|
212
|
-
H.value && e.length && (U(e), M.value.trim() || (M.value = k.ai.import.prompt), T.feature.importQueue.value = [], t(() => N.value?.focus()));
|
|
213
|
-
}, { immediate: !0 });
|
|
214
|
-
let G = e(null), K = e(0), q = _(() => T.feature.isTemplateEmpty.value ? [
|
|
215
|
-
k.ai.starters.emptyWelcome,
|
|
216
|
-
k.ai.starters.emptyLaunch,
|
|
217
|
-
k.ai.starters.emptyNewsletter
|
|
218
|
-
] : [
|
|
219
|
-
k.ai.starters.filledShorten,
|
|
220
|
-
k.ai.starters.filledFriendlier,
|
|
221
|
-
k.ai.starters.filledDates,
|
|
222
|
-
k.ai.starters.filledCta
|
|
223
|
-
]), J = _(() => T.feature.messages.value), Y = _(() => T.feature.isRunning.value), X = _(() => {
|
|
224
|
-
let e = T.feature.failure.value;
|
|
225
|
-
return e ? E(e.error, k.ai.errors, A, j, e.context) : "";
|
|
226
|
-
}), { pause: Z, resume: Ze } = b(() => {
|
|
227
|
-
K.value < q.value.length ? K.value++ : Z();
|
|
228
|
-
}, 150, { immediate: !1 }), { start: Qe } = ne(() => Ze(), 100, { immediate: !1 });
|
|
229
|
-
c(() => q.value.length, (e) => {
|
|
230
|
-
Z(), K.value = 0, e > 0 && Qe();
|
|
231
|
-
}, { immediate: !0 });
|
|
232
|
-
function Q() {
|
|
233
|
-
t(() => {
|
|
234
|
-
G.value && (G.value.scrollTop = G.value.scrollHeight);
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
c(() => J.value.length, Q), c(() => [T.feature.failedPrompt.value, T.feature.failedAttachments.value], ([e, t]) => {
|
|
238
|
-
e && (M.value = e, F.value = [...t]);
|
|
239
|
-
}, { immediate: !0 });
|
|
240
|
-
async function $() {
|
|
241
|
-
let e = M.value.trim();
|
|
242
|
-
if (!e || Y.value) return;
|
|
243
|
-
let t = [...F.value];
|
|
244
|
-
M.value = "", F.value = [], I.value = [], Q(), await T.feature.send(e, t), Q();
|
|
245
|
-
}
|
|
246
|
-
function $e(e) {
|
|
247
|
-
return e.undone ? k.ai.chat.undone : e.operationCount === 1 ? k.ai.chat.appliedChange : A(k.ai.chat.appliedChanges, { count: e.operationCount });
|
|
248
|
-
}
|
|
249
|
-
function et(e) {
|
|
250
|
-
return e.failure ? E(e.failure.error, k.ai.errors, A, j, e.failure.context) : "";
|
|
251
|
-
}
|
|
252
|
-
function tt(e) {
|
|
253
|
-
e.undone ? T.feature.redoMessage(e.id) : T.feature.undoMessage(e.id);
|
|
254
|
-
}
|
|
255
|
-
function nt(e) {
|
|
256
|
-
Z(), M.value = e, $();
|
|
257
|
-
}
|
|
258
|
-
function rt(e) {
|
|
259
|
-
e.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), $());
|
|
260
|
-
}
|
|
261
|
-
return (e, t) => (o(), l("div", {
|
|
262
|
-
class: "tpl:contents",
|
|
263
|
-
"data-testid": "ai-chat-dropzone",
|
|
264
|
-
onDragenter: qe,
|
|
265
|
-
onDragleave: Je,
|
|
266
|
-
onDragover: Ye,
|
|
267
|
-
onDrop: Xe
|
|
268
|
-
}, [y(L, {
|
|
269
|
-
title: g(k).ai.chat.title,
|
|
270
|
-
subtitle: g(k).ai.chat.notice,
|
|
271
|
-
testid: "ai-panel-chat",
|
|
272
|
-
"close-label": g(k).ai.chat.close,
|
|
273
|
-
onClose: t[5] ||= (e) => O("close")
|
|
274
|
-
}, {
|
|
275
|
-
actions: s(() => [n.feature.canClear && J.value.length > 0 ? (o(), l("button", {
|
|
276
|
-
key: 0,
|
|
277
|
-
type: "button",
|
|
278
|
-
"data-testid": "ai-chat-new",
|
|
279
|
-
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)] tpl:disabled:opacity-40",
|
|
280
|
-
"aria-label": g(k).ai.chat.newChat,
|
|
281
|
-
title: g(k).ai.chat.newChat,
|
|
282
|
-
disabled: Y.value,
|
|
283
|
-
onClick: t[0] ||= (e) => n.feature.newChat()
|
|
284
|
-
}, [y(g(de), {
|
|
285
|
-
size: 14,
|
|
286
|
-
"stroke-width": 2,
|
|
287
|
-
"aria-hidden": "true"
|
|
288
|
-
})], 8, B)) : f("", !0)]),
|
|
289
|
-
footer: s(() => [h("div", ke, [
|
|
290
|
-
H.value ? (o(), l(v, { key: 0 }, [
|
|
291
|
-
h("input", {
|
|
292
|
-
ref_key: "fileInput",
|
|
293
|
-
ref: P,
|
|
294
|
-
"data-testid": "ai-chat-files",
|
|
295
|
-
type: "file",
|
|
296
|
-
multiple: "",
|
|
297
|
-
accept: "image/png,image/jpeg,image/webp,image/gif,application/pdf",
|
|
298
|
-
hidden: "",
|
|
299
|
-
disabled: Y.value,
|
|
300
|
-
onChange: Ge
|
|
301
|
-
}, null, 40, Ae),
|
|
302
|
-
F.value.length ? (o(), l("div", je, [(o(!0), l(v, null, i(F.value, (e, t) => (o(), l("span", {
|
|
303
|
-
key: t,
|
|
304
|
-
"data-testid": "ai-chat-attachment",
|
|
305
|
-
class: "tpl:flex tpl:max-w-full tpl:items-center tpl:gap-1 tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text)]"
|
|
306
|
-
}, [
|
|
307
|
-
e.type === "application/pdf" ? (o(), p(g(w), {
|
|
308
|
-
key: 0,
|
|
309
|
-
size: 12,
|
|
310
|
-
"aria-hidden": "true"
|
|
311
|
-
})) : (o(), p(g(S), {
|
|
312
|
-
key: 1,
|
|
313
|
-
size: 12,
|
|
314
|
-
"aria-hidden": "true"
|
|
315
|
-
})),
|
|
316
|
-
h("span", Me, d(e.name), 1),
|
|
317
|
-
h("button", {
|
|
318
|
-
type: "button",
|
|
319
|
-
"aria-label": g(A)(g(k).ai.chat.removeAttachment, { name: e.name }),
|
|
320
|
-
disabled: Y.value,
|
|
321
|
-
class: "tpl:shrink-0 tpl:rounded tpl:p-0.5 tpl:disabled:opacity-40",
|
|
322
|
-
onClick: (e) => Ke(t)
|
|
323
|
-
}, [y(g(C), {
|
|
324
|
-
size: 12,
|
|
325
|
-
"aria-hidden": "true"
|
|
326
|
-
})], 8, Ne)
|
|
327
|
-
]))), 128))])) : f("", !0),
|
|
328
|
-
F.value.length ? (o(), l("p", Pe, d(g(k).ai.import.placeholderNote), 1)) : f("", !0),
|
|
329
|
-
h("div", V, [(o(!0), l(v, null, i(I.value, (e, t) => (o(), l("p", {
|
|
330
|
-
key: t,
|
|
331
|
-
class: "tpl:mb-2"
|
|
332
|
-
}, d(e), 1))), 128))])
|
|
333
|
-
], 64)) : f("", !0),
|
|
334
|
-
n.feature.keptYourVersion.value ? (o(), l("div", Fe, [h("p", null, d(g(k).ai.chat.keptYourVersion), 1), h("button", {
|
|
335
|
-
type: "button",
|
|
336
|
-
disabled: Y.value,
|
|
337
|
-
class: m(g(D)),
|
|
338
|
-
onClick: t[1] ||= (e) => n.feature.reloadTemplate()
|
|
339
|
-
}, d(g(k).ai.chat.reload), 11, Ie)])) : f("", !0),
|
|
340
|
-
X.value ? (o(), l("div", Le, [y(g(oe), {
|
|
341
|
-
size: 14,
|
|
342
|
-
"stroke-width": 2,
|
|
343
|
-
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
344
|
-
"aria-hidden": "true"
|
|
345
|
-
}), h("span", null, d(X.value), 1)])) : f("", !0),
|
|
346
|
-
h("div", Re, [ee(h("textarea", {
|
|
347
|
-
ref_key: "composer",
|
|
348
|
-
ref: N,
|
|
349
|
-
"onUpdate:modelValue": t[2] ||= (e) => M.value = e,
|
|
350
|
-
"data-testid": "ai-chat-input",
|
|
351
|
-
class: "tpl:max-h-32 tpl:min-h-[44px] tpl:w-full tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-sm tpl:outline-none tpl:text-[var(--tpl-text)]",
|
|
352
|
-
placeholder: g(k).ai.chat.inputPlaceholder,
|
|
353
|
-
"aria-label": g(k).ai.chat.inputPlaceholder,
|
|
354
|
-
disabled: Y.value,
|
|
355
|
-
maxlength: "4000",
|
|
356
|
-
rows: "3",
|
|
357
|
-
onKeydown: rt
|
|
358
|
-
}, null, 40, ze), [[te, M.value]]), h("div", Be, [H.value ? (o(), l("button", {
|
|
359
|
-
key: 0,
|
|
360
|
-
type: "button",
|
|
361
|
-
"aria-label": g(k).ai.chat.attach,
|
|
362
|
-
title: g(k).ai.chat.attach,
|
|
363
|
-
disabled: Y.value,
|
|
364
|
-
class: "tpl:-ml-1.5 tpl:shrink-0 tpl:rounded-md tpl:p-1.5 tpl:text-[var(--tpl-text-muted)] tpl:disabled:opacity-40",
|
|
365
|
-
onClick: t[3] ||= (e) => P.value?.click()
|
|
366
|
-
}, [y(g(ae), {
|
|
367
|
-
size: 16,
|
|
368
|
-
"aria-hidden": "true"
|
|
369
|
-
})], 8, Ve)) : f("", !0), Y.value ? (o(), l("button", {
|
|
370
|
-
key: 1,
|
|
371
|
-
type: "button",
|
|
372
|
-
"data-testid": "ai-chat-stop",
|
|
373
|
-
class: "tpl-ai-send-btn tpl:ml-auto tpl:-mr-1.5 tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:text-[var(--tpl-primary)]",
|
|
374
|
-
"aria-label": g(k).ai.chat.stop,
|
|
375
|
-
title: g(k).ai.chat.stop,
|
|
376
|
-
onClick: t[4] ||= (e) => n.feature.stop()
|
|
377
|
-
}, [y(g(se), {
|
|
378
|
-
size: 16,
|
|
379
|
-
"stroke-width": 2,
|
|
380
|
-
"aria-hidden": "true"
|
|
381
|
-
})], 8, He)) : (o(), l("button", {
|
|
382
|
-
key: 2,
|
|
383
|
-
type: "button",
|
|
384
|
-
"data-testid": "ai-chat-send",
|
|
385
|
-
class: "tpl-ai-send-btn tpl:ml-auto tpl:-mr-1.5 tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
386
|
-
"aria-label": g(k).ai.chat.send,
|
|
387
|
-
title: g(k).ai.chat.send,
|
|
388
|
-
disabled: !M.value.trim(),
|
|
389
|
-
onClick: $
|
|
390
|
-
}, [y(g(le), {
|
|
391
|
-
size: 16,
|
|
392
|
-
"stroke-width": 2,
|
|
393
|
-
"aria-hidden": "true"
|
|
394
|
-
})], 8, Ue))])]),
|
|
395
|
-
h("p", We, d(g(k).ai.chat.disclaimer), 1)
|
|
396
|
-
])]),
|
|
397
|
-
default: s(() => [
|
|
398
|
-
H.value && R.value > 0 && !Y.value ? (o(), l("div", me, d(g(k).ai.chat.dropHint), 1)) : f("", !0),
|
|
399
|
-
h("div", {
|
|
400
|
-
ref_key: "messagesContainer",
|
|
401
|
-
ref: G,
|
|
402
|
-
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
403
|
-
}, [n.feature.isLoadingHistory.value ? (o(), l("div", he, [y(g(ce), {
|
|
404
|
-
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
405
|
-
size: 24,
|
|
406
|
-
"stroke-width": 2,
|
|
407
|
-
"aria-hidden": "true"
|
|
408
|
-
}), h("p", ge, d(g(k).ai.chat.loadingHistory), 1)])) : J.value.length === 0 ? (o(), l("div", _e, [y(g(x), {
|
|
409
|
-
size: 32,
|
|
410
|
-
"stroke-width": 1.5,
|
|
411
|
-
class: "tpl:text-[var(--tpl-text-dim)]",
|
|
412
|
-
"aria-hidden": "true"
|
|
413
|
-
}), h("p", ve, d(g(k).ai.chat.placeholder), 1)])) : (o(), l("div", ye, [(o(!0), l(v, null, i(J.value, (e) => (o(), l("div", {
|
|
414
|
-
key: e.id,
|
|
415
|
-
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
416
|
-
}, [e.role === "user" ? (o(), l("div", be, [u(d(e.text) + " ", 1), (o(!0), l(v, null, i(e.attachments, (e, t) => (o(), l("span", {
|
|
417
|
-
key: t,
|
|
418
|
-
"data-testid": "ai-chat-history-attachment",
|
|
419
|
-
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:px-2 tpl:py-1 tpl:text-xs"
|
|
420
|
-
}, [e.kind === "pdf" ? (o(), p(g(w), {
|
|
421
|
-
key: 0,
|
|
422
|
-
size: 12,
|
|
423
|
-
"aria-hidden": "true"
|
|
424
|
-
})) : (o(), p(g(S), {
|
|
425
|
-
key: 1,
|
|
426
|
-
size: 12,
|
|
427
|
-
"aria-hidden": "true"
|
|
428
|
-
})), u(d(e.name), 1)]))), 128))])) : (o(), l("div", xe, [
|
|
429
|
-
e.text === "" && e.status === "streaming" ? (o(), p(pe, { key: 0 })) : e.text === "" ? f("", !0) : (o(), l("div", Se, d(e.text), 1)),
|
|
430
|
-
e.operationCount > 0 ? (o(), l("div", Ce, [h("span", null, d($e(e)), 1), (e.undone ? e.canRedo : e.canUndo) ? (o(), l("button", {
|
|
431
|
-
key: 0,
|
|
432
|
-
type: "button",
|
|
433
|
-
"data-testid": "ai-chat-undo",
|
|
434
|
-
class: m(g(D)),
|
|
435
|
-
disabled: Y.value,
|
|
436
|
-
onClick: (t) => tt(e)
|
|
437
|
-
}, [e.undone ? (o(), p(g(fe), {
|
|
438
|
-
key: 0,
|
|
439
|
-
size: 12,
|
|
440
|
-
"stroke-width": 2,
|
|
441
|
-
"aria-hidden": "true"
|
|
442
|
-
})) : (o(), p(g(ue), {
|
|
443
|
-
key: 1,
|
|
444
|
-
size: 12,
|
|
445
|
-
"stroke-width": 2,
|
|
446
|
-
"aria-hidden": "true"
|
|
447
|
-
})), u(" " + d(e.undone ? g(k).ai.chat.redo : g(k).ai.chat.undo), 1)], 10, we)) : f("", !0)])) : f("", !0),
|
|
448
|
-
e.failure ? (o(), l("p", Te, d(et(e)), 1)) : f("", !0)
|
|
449
|
-
]))]))), 128))]))], 512),
|
|
450
|
-
J.value.length === 0 && q.value.length > 0 ? (o(), l("div", Ee, [h("div", De, [(o(!0), l(v, null, i(q.value, (e, t) => (o(), l("button", {
|
|
451
|
-
key: t,
|
|
452
|
-
type: "button",
|
|
453
|
-
"data-testid": "ai-chat-starter",
|
|
454
|
-
class: m(["tpl-starter-btn tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:leading-snug tpl:transition-all tpl:duration-300 tpl:ease-out", q.value.length - 1 - t < K.value ? "tpl:translate-y-0 tpl:opacity-100" : "tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0"]),
|
|
455
|
-
style: {
|
|
456
|
-
"border-color": "var(--tpl-border)",
|
|
457
|
-
color: "var(--tpl-primary)",
|
|
458
|
-
"background-color": "var(--tpl-bg)",
|
|
459
|
-
"box-shadow": "var(--tpl-shadow)"
|
|
460
|
-
},
|
|
461
|
-
onClick: (t) => nt(e)
|
|
462
|
-
}, d(e), 11, Oe))), 128))])])) : f("", !0)
|
|
463
|
-
]),
|
|
464
|
-
_: 1
|
|
465
|
-
}, 8, [
|
|
466
|
-
"title",
|
|
467
|
-
"subtitle",
|
|
468
|
-
"close-label"
|
|
469
|
-
])], 32));
|
|
470
|
-
}
|
|
471
|
-
}), [["__scopeId", "data-v-e0f79f23"]]);
|
|
472
|
-
export { H as default };
|
|
473
|
-
|
|
474
|
-
//# sourceMappingURL=AiChatPanel-DXeZgc7D.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AiChatPanel-DXeZgc7D.js","names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_unref","_toDisplayString","_createCommentVNode","_renderSlot","_sfc_main","_openBlock","_createElementBlock","_createVNode","AiPanelShell","_unref","_withCtx","_createCommentVNode","_createElementVNode","_Fragment","_renderList","_createBlock","_toDisplayString","_normalizeClass","_withDirectives","_vModelText","_createTextVNode","LoadingTrack","_sfc_main","ref","nextTick","defineComponent","inject","renderList","renderSlot","openBlock","withCtx","watch","withDirectives","createElementBlock","createTextVNode","toDisplayString","createCommentVNode","createBlock","normalizeClass","createBaseVNode","vModelText","unref","computed","Fragment","createVNode","useTimeoutFn","useIntervalFn","UI_LOCALE_KEY","useI18n","Sparkles","Paperclip","CircleAlert","Square","LoaderCircle","Image","Send","Undo2","X","MessageSquarePlus","FileText","Redo2","LoadingTrack_default","_plugin_vue_export_helper_default","aiErrorMessage","secondaryBtnCompactClass","_hoisted_1$1","_hoisted_2$1","_hoisted_3$1","_hoisted_4$1","_hoisted_5$1","_hoisted_6$1","_hoisted_7$1","_hoisted_8$1","_hoisted_9$1","AiPanelShell_default","__emit","emit","__props","_ctx","_cache","TYPES","validateChatAttachments","accepted","existing","errors","total","sum","file","added","reason","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","\"color\"","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","AiChatPanel_default","props","uiLocale","promptInput","composer","fileInput","attachments","attachmentErrors","dragDepth","canAttach","attach","result","files","keys","format","t","error","picked","input","event","isBusy","removeAttachment","index","isFileDrag","dragEnter","dragLeave","dragOver","drop","messagesContainer","visibleStarterCount","starters","messages","failureText","failure","pauseReveal","resumeReveal","startReveal","count","scrollToBottom","prompt","send","appliedLabel","item","itemFailure","toggleUndo","chooseStarter","starter","onKeydown","$event","attachment"],"sources":["../../../src/components/ai/AiPanelShell.vue","../../../src/components/ai/AiPanelShell.vue","../../../src/utils/aiAttachments.ts","../../../src/components/ai/AiChatPanel.vue","../../../src/components/ai/AiChatPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Sparkles, X } from \"@lucide/vue\";\n\ndefineProps<{\n title: string;\n subtitle?: string;\n /** `ai-panel-chat`. */\n testid: string;\n closeLabel: string;\n}>();\n\nconst emit = defineEmits<{ (e: \"close\"): void }>();\n</script>\n\n<template>\n <div\n role=\"complementary\"\n :aria-label=\"title\"\n :data-testid=\"testid\"\n class=\"tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]\"\n >\n <!-- The header names the panel an AI feature (EU AI Act Art. 50). -->\n <div\n class=\"tpl:flex tpl:items-start tpl:justify-between tpl:gap-2 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3\"\n >\n <div class=\"tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5\">\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]\"\n >\n <Sparkles :size=\"13\" :stroke-width=\"2\" aria-hidden=\"true\" />\n <span data-testid=\"ai-panel-title\">{{ title }}</span>\n </div>\n <p\n v-if=\"subtitle\"\n data-testid=\"ai-panel-subtitle\"\n class=\"tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ subtitle }}\n </p>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-1\">\n <slot name=\"actions\" />\n <button\n type=\"button\"\n data-testid=\"ai-panel-close\"\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n :aria-label=\"closeLabel\"\n :title=\"closeLabel\"\n @click=\"emit('close')\"\n >\n <X :size=\"14\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n </div>\n </div>\n <div class=\"tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col\">\n <slot />\n </div>\n <slot name=\"footer\" />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { Sparkles, X } from \"@lucide/vue\";\n\ndefineProps<{\n title: string;\n subtitle?: string;\n /** `ai-panel-chat`. */\n testid: string;\n closeLabel: string;\n}>();\n\nconst emit = defineEmits<{ (e: \"close\"): void }>();\n</script>\n\n<template>\n <div\n role=\"complementary\"\n :aria-label=\"title\"\n :data-testid=\"testid\"\n class=\"tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]\"\n >\n <!-- The header names the panel an AI feature (EU AI Act Art. 50). -->\n <div\n class=\"tpl:flex tpl:items-start tpl:justify-between tpl:gap-2 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3\"\n >\n <div class=\"tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5\">\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]\"\n >\n <Sparkles :size=\"13\" :stroke-width=\"2\" aria-hidden=\"true\" />\n <span data-testid=\"ai-panel-title\">{{ title }}</span>\n </div>\n <p\n v-if=\"subtitle\"\n data-testid=\"ai-panel-subtitle\"\n class=\"tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ subtitle }}\n </p>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-1\">\n <slot name=\"actions\" />\n <button\n type=\"button\"\n data-testid=\"ai-panel-close\"\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n :aria-label=\"closeLabel\"\n :title=\"closeLabel\"\n @click=\"emit('close')\"\n >\n <X :size=\"14\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n </div>\n </div>\n <div class=\"tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col\">\n <slot />\n </div>\n <slot name=\"footer\" />\n </div>\n</template>\n","/** Chat file limits, matching the AI wire. */\nexport const AI_ATTACHMENTS_MAX = 4;\nexport const AI_ATTACHMENT_MAX_BYTES = 5 * 1024 * 1024;\nexport const AI_ATTACHMENTS_TOTAL_MAX_BYTES = 10 * 1024 * 1024;\nconst TYPES = new Set([\n \"image/png\",\n \"image/jpeg\",\n \"image/webp\",\n \"image/gif\",\n \"application/pdf\",\n]);\nexport function validateChatAttachments(\n existing: File[],\n added: File[],\n): {\n accepted: File[];\n errors: {\n name: string;\n reason: \"tooMany\" | \"tooLarge\" | \"totalTooLarge\" | \"wrongType\";\n }[];\n} {\n const accepted = [...existing];\n const errors: ReturnType<typeof validateChatAttachments>[\"errors\"] = [];\n let total = existing.reduce((sum, file) => sum + file.size, 0);\n for (const file of added) {\n const reason =\n accepted.length >= AI_ATTACHMENTS_MAX\n ? \"tooMany\"\n : !TYPES.has(file.type)\n ? \"wrongType\"\n : file.size > AI_ATTACHMENT_MAX_BYTES\n ? \"tooLarge\"\n : total + file.size > AI_ATTACHMENTS_TOTAL_MAX_BYTES\n ? \"totalTooLarge\"\n : null;\n if (reason) errors.push({ name: file.name, reason });\n else {\n accepted.push(file);\n total += file.size;\n }\n }\n return { accepted, errors };\n}\n","<script setup lang=\"ts\">\nimport {\n CircleAlert,\n FileText,\n Image,\n Paperclip,\n X,\n LoaderCircle,\n MessageSquarePlus,\n Redo2,\n Send,\n Sparkles,\n Square,\n Undo2,\n} from \"@lucide/vue\";\nimport { computed, inject, nextTick, ref, watch } from \"vue\";\nimport { useIntervalFn, useTimeoutFn } from \"@vueuse/core\";\nimport LoadingTrack from \"../LoadingTrack.vue\";\nimport AiPanelShell from \"./AiPanelShell.vue\";\nimport type {\n AiChatItem,\n UseAiFeatureReturn,\n} from \"../../composables/useAiFeature\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { secondaryBtnCompactClass } from \"../../constants/styleConstants\";\nimport { UI_LOCALE_KEY } from \"../../keys\";\nimport { validateChatAttachments } from \"../../utils/aiAttachments\";\nimport { aiErrorMessage } from \"../../utils/aiErrors\";\n\nconst props = defineProps<{ feature: UseAiFeatureReturn }>();\nconst emit = defineEmits<{ (e: \"close\"): void }>();\n\nconst { t, format } = useI18n();\nconst uiLocale = inject(UI_LOCALE_KEY, undefined);\n\nconst promptInput = ref(\"\");\nconst composer = ref<HTMLTextAreaElement | null>(null);\nconst fileInput = ref<HTMLInputElement | null>(null);\nconst attachments = ref<File[]>([]);\nconst attachmentErrors = ref<string[]>([]);\nconst dragDepth = ref(0);\nwatch(\n () => props.feature.templateSession.value,\n () => {\n promptInput.value = \"\";\n attachments.value = [];\n attachmentErrors.value = [];\n dragDepth.value = 0;\n },\n { flush: \"sync\" },\n);\nconst canAttach = computed(() => props.feature.has(\"chatAttachments\"));\nfunction attach(files: File[]): void {\n const result = validateChatAttachments(attachments.value, files);\n attachments.value = result.accepted;\n const keys = {\n tooMany: \"attachTooMany\",\n tooLarge: \"attachTooLarge\",\n totalTooLarge: \"attachTotalTooLarge\",\n wrongType: \"attachWrongType\",\n } as const;\n attachmentErrors.value = result.errors.map((error) =>\n format(t.ai.chat[keys[error.reason]], { name: error.name }),\n );\n}\nfunction picked(event: Event): void {\n const input = event.target as HTMLInputElement;\n if (!isBusy.value && canAttach.value) attach(Array.from(input.files ?? []));\n input.value = \"\";\n}\nfunction removeAttachment(index: number): void {\n if (isBusy.value) return;\n attachments.value.splice(index, 1);\n attachmentErrors.value = [];\n}\nfunction isFileDrag(event: DragEvent): boolean {\n return Array.from(event.dataTransfer?.types ?? []).includes(\"Files\");\n}\nfunction dragEnter(event: DragEvent): void {\n if (!canAttach.value || isBusy.value || !isFileDrag(event)) return;\n event.preventDefault();\n dragDepth.value++;\n}\nfunction dragLeave(event: DragEvent): void {\n if (!isFileDrag(event)) return;\n dragDepth.value = Math.max(0, dragDepth.value - 1);\n}\nfunction dragOver(event: DragEvent): void {\n if (canAttach.value && isFileDrag(event)) event.preventDefault();\n}\nfunction drop(event: DragEvent): void {\n dragDepth.value = 0;\n if (!canAttach.value || !isFileDrag(event)) return;\n event.preventDefault();\n if (!isBusy.value) attach(Array.from(event.dataTransfer?.files ?? []));\n}\nwatch(\n () => props.feature.importQueue.value,\n (files) => {\n if (!canAttach.value || !files.length) return;\n attach(files);\n if (!promptInput.value.trim()) promptInput.value = t.ai.import.prompt;\n props.feature.importQueue.value = [];\n void nextTick(() => composer.value?.focus());\n },\n { immediate: true },\n);\nconst messagesContainer = ref<HTMLElement | null>(null);\nconst visibleStarterCount = ref(0);\n\nconst starters = computed(() =>\n props.feature.isTemplateEmpty.value\n ? [\n t.ai.starters.emptyWelcome,\n t.ai.starters.emptyLaunch,\n t.ai.starters.emptyNewsletter,\n ]\n : [\n t.ai.starters.filledShorten,\n t.ai.starters.filledFriendlier,\n t.ai.starters.filledDates,\n t.ai.starters.filledCta,\n ],\n);\nconst messages = computed(() => props.feature.messages.value);\nconst isBusy = computed(() => props.feature.isRunning.value);\nconst failureText = computed(() => {\n const failure = props.feature.failure.value;\n return failure\n ? aiErrorMessage(\n failure.error,\n t.ai.errors,\n format,\n uiLocale,\n failure.context,\n )\n : \"\";\n});\n\nconst { pause: pauseReveal, resume: resumeReveal } = useIntervalFn(\n () => {\n if (visibleStarterCount.value < starters.value.length) {\n visibleStarterCount.value++;\n } else {\n pauseReveal();\n }\n },\n 150,\n { immediate: false },\n);\nconst { start: startReveal } = useTimeoutFn(() => resumeReveal(), 100, {\n immediate: false,\n});\n\nwatch(\n () => starters.value.length,\n (count) => {\n pauseReveal();\n visibleStarterCount.value = 0;\n if (count > 0) startReveal();\n },\n { immediate: true },\n);\n\nfunction scrollToBottom(): void {\n void nextTick(() => {\n if (messagesContainer.value) {\n messagesContainer.value.scrollTop = messagesContainer.value.scrollHeight;\n }\n });\n}\n\nwatch(() => messages.value.length, scrollToBottom);\n\n// A failed turn gives its prompt back (D15).\nwatch(\n () =>\n [\n props.feature.failedPrompt.value,\n props.feature.failedAttachments.value,\n ] as const,\n ([prompt, files]) => {\n if (prompt) {\n promptInput.value = prompt;\n attachments.value = [...files];\n }\n },\n { immediate: true },\n);\n\nasync function send(): Promise<void> {\n const prompt = promptInput.value.trim();\n if (!prompt || isBusy.value) return;\n const files = [...attachments.value];\n promptInput.value = \"\";\n attachments.value = [];\n attachmentErrors.value = [];\n scrollToBottom();\n await props.feature.send(prompt, files);\n scrollToBottom();\n}\n\nfunction appliedLabel(item: AiChatItem): string {\n if (item.undone) return t.ai.chat.undone;\n return item.operationCount === 1\n ? t.ai.chat.appliedChange\n : format(t.ai.chat.appliedChanges, { count: item.operationCount });\n}\n\nfunction itemFailure(item: AiChatItem): string {\n return item.failure\n ? aiErrorMessage(\n item.failure.error,\n t.ai.errors,\n format,\n uiLocale,\n item.failure.context,\n )\n : \"\";\n}\n\nfunction toggleUndo(item: AiChatItem): void {\n if (item.undone) void props.feature.redoMessage(item.id);\n else void props.feature.undoMessage(item.id);\n}\n\nfunction chooseStarter(starter: string): void {\n pauseReveal();\n promptInput.value = starter;\n void send();\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.isComposing || event.keyCode === 229) return;\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n void send();\n }\n}\n</script>\n\n<template>\n <div\n class=\"tpl:contents\"\n data-testid=\"ai-chat-dropzone\"\n @dragenter=\"dragEnter\"\n @dragleave=\"dragLeave\"\n @dragover=\"dragOver\"\n @drop=\"drop\"\n >\n <AiPanelShell\n :title=\"t.ai.chat.title\"\n :subtitle=\"t.ai.chat.notice\"\n testid=\"ai-panel-chat\"\n :close-label=\"t.ai.chat.close\"\n @close=\"emit('close')\"\n >\n <template #actions>\n <button\n v-if=\"feature.canClear && messages.length > 0\"\n type=\"button\"\n data-testid=\"ai-chat-new\"\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)] tpl:disabled:opacity-40\"\n :aria-label=\"t.ai.chat.newChat\"\n :title=\"t.ai.chat.newChat\"\n :disabled=\"isBusy\"\n @click=\"feature.newChat()\"\n >\n <MessageSquarePlus :size=\"14\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n </template>\n\n <div\n v-if=\"canAttach && dragDepth > 0 && !isBusy\"\n data-testid=\"ai-chat-drop-hint\"\n class=\"tpl:absolute tpl:inset-0 tpl:z-20 tpl:flex tpl:items-center tpl:justify-center tpl:border-2 tpl:border-dashed tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-4 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-primary)] tpl:pointer-events-none\"\n >\n {{ t.ai.chat.dropHint }}\n </div>\n <div\n ref=\"messagesContainer\"\n class=\"tpl:flex-1 tpl:overflow-y-auto tpl:p-4\"\n >\n <div\n v-if=\"feature.isLoadingHistory.value\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center\"\n >\n <LoaderCircle\n class=\"tpl-spinner tpl:text-[var(--tpl-text-muted)]\"\n :size=\"24\"\n :stroke-width=\"2\"\n aria-hidden=\"true\"\n />\n <p class=\"tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ t.ai.chat.loadingHistory }}\n </p>\n </div>\n\n <div\n v-else-if=\"messages.length === 0\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center\"\n >\n <Sparkles\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-text-dim)]\"\n aria-hidden=\"true\"\n />\n <p\n class=\"tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.ai.chat.placeholder }}\n </p>\n </div>\n\n <!-- Text is interpolated, never `v-html`. -->\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-4\">\n <div\n v-for=\"item in messages\"\n :key=\"item.id\"\n class=\"tpl:flex tpl:flex-col tpl:gap-2\"\n >\n <div\n v-if=\"item.role === 'user'\"\n data-testid=\"ai-chat-prompt\"\n class=\"tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap\"\n style=\"\n background-color: var(--tpl-primary-light);\n color: var(--tpl-text);\n max-width: 85%;\n box-shadow: var(--tpl-shadow);\n \"\n >\n {{ item.text }}\n <span\n v-for=\"(attachment, index) in item.attachments\"\n :key=\"index\"\n data-testid=\"ai-chat-history-attachment\"\n class=\"tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:px-2 tpl:py-1 tpl:text-xs\"\n >\n <FileText\n v-if=\"attachment.kind === 'pdf'\"\n :size=\"12\"\n aria-hidden=\"true\"\n /><Image v-else :size=\"12\" aria-hidden=\"true\" />{{\n attachment.name\n }}\n </span>\n </div>\n\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-2\">\n <LoadingTrack\n v-if=\"item.text === '' && item.status === 'streaming'\"\n />\n <div\n v-else-if=\"item.text !== ''\"\n data-testid=\"ai-chat-reply\"\n class=\"tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap\"\n style=\"\n max-width: 85%;\n background-color: var(--tpl-bg);\n color: var(--tpl-text);\n box-shadow: var(--tpl-shadow);\n \"\n >\n {{ item.text }}\n </div>\n <div\n v-if=\"item.operationCount > 0\"\n data-testid=\"ai-chat-applied\"\n class=\"tpl:flex tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <span>{{ appliedLabel(item) }}</span>\n <button\n v-if=\"item.undone ? item.canRedo : item.canUndo\"\n type=\"button\"\n data-testid=\"ai-chat-undo\"\n :class=\"secondaryBtnCompactClass\"\n :disabled=\"isBusy\"\n @click=\"toggleUndo(item)\"\n >\n <Redo2\n v-if=\"item.undone\"\n :size=\"12\"\n :stroke-width=\"2\"\n aria-hidden=\"true\"\n />\n <Undo2\n v-else\n :size=\"12\"\n :stroke-width=\"2\"\n aria-hidden=\"true\"\n />\n {{ item.undone ? t.ai.chat.redo : t.ai.chat.undo }}\n </button>\n </div>\n <p\n v-if=\"item.failure\"\n role=\"alert\"\n data-testid=\"ai-chat-item-error\"\n class=\"tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]\"\n >\n {{ itemFailure(item) }}\n </p>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Starter prompts, over the empty state (D21). -->\n <div\n v-if=\"messages.length === 0 && starters.length > 0\"\n class=\"tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3\"\n style=\"\n background-color: color-mix(in srgb, var(--tpl-bg) 50%, transparent);\n backdrop-filter: blur(2px);\n \"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-1.5\">\n <button\n v-for=\"(starter, index) in starters\"\n :key=\"index\"\n type=\"button\"\n data-testid=\"ai-chat-starter\"\n class=\"tpl-starter-btn tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:leading-snug tpl:transition-all tpl:duration-300 tpl:ease-out\"\n :class=\"\n starters.length - 1 - index < visibleStarterCount\n ? 'tpl:translate-y-0 tpl:opacity-100'\n : 'tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0'\n \"\n style=\"\n border-color: var(--tpl-border);\n color: var(--tpl-primary);\n background-color: var(--tpl-bg);\n box-shadow: var(--tpl-shadow);\n \"\n @click=\"chooseStarter(starter)\"\n >\n {{ starter }}\n </button>\n </div>\n </div>\n\n <template #footer>\n <div class=\"tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]\">\n <template v-if=\"canAttach\">\n <input\n ref=\"fileInput\"\n data-testid=\"ai-chat-files\"\n type=\"file\"\n multiple\n accept=\"image/png,image/jpeg,image/webp,image/gif,application/pdf\"\n hidden\n :disabled=\"isBusy\"\n @change=\"picked\"\n />\n <div\n v-if=\"attachments.length\"\n class=\"tpl:mb-2 tpl:flex tpl:flex-wrap tpl:gap-1\"\n >\n <span\n v-for=\"(file, index) in attachments\"\n :key=\"index\"\n data-testid=\"ai-chat-attachment\"\n class=\"tpl:flex tpl:max-w-full tpl:items-center tpl:gap-1 tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text)]\"\n >\n <FileText\n v-if=\"file.type === 'application/pdf'\"\n :size=\"12\"\n aria-hidden=\"true\"\n /><Image v-else :size=\"12\" aria-hidden=\"true\" />\n <span class=\"tpl:truncate\">{{ file.name }}</span>\n <button\n type=\"button\"\n :aria-label=\"\n format(t.ai.chat.removeAttachment, { name: file.name })\n \"\n :disabled=\"isBusy\"\n class=\"tpl:shrink-0 tpl:rounded tpl:p-0.5 tpl:disabled:opacity-40\"\n @click=\"removeAttachment(index)\"\n >\n <X :size=\"12\" aria-hidden=\"true\" />\n </button>\n </span>\n </div>\n <p\n v-if=\"attachments.length\"\n class=\"tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.ai.import.placeholderNote }}\n </p>\n <div\n aria-live=\"polite\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-danger)]\"\n >\n <p\n v-for=\"(error, index) in attachmentErrors\"\n :key=\"index\"\n class=\"tpl:mb-2\"\n >\n {{ error }}\n </p>\n </div>\n </template>\n <div\n v-if=\"feature.keptYourVersion.value\"\n role=\"status\"\n class=\"tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <p>{{ t.ai.chat.keptYourVersion }}</p>\n <button\n type=\"button\"\n :disabled=\"isBusy\"\n :class=\"secondaryBtnCompactClass\"\n @click=\"feature.reloadTemplate()\"\n >\n {{ t.ai.chat.reload }}\n </button>\n </div>\n <div\n v-if=\"failureText\"\n role=\"alert\"\n data-testid=\"ai-chat-error\"\n class=\"tpl:mx-3 tpl:mb-2 tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs\"\n style=\"\n background-color: var(--tpl-danger-light);\n color: var(--tpl-danger);\n \"\n >\n <CircleAlert\n :size=\"14\"\n :stroke-width=\"2\"\n class=\"tpl:mt-0.5 tpl:shrink-0\"\n aria-hidden=\"true\"\n />\n <span>{{ failureText }}</span>\n </div>\n <div\n class=\"tpl-ai-input-wrapper tpl-focus-ring-host tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]\"\n >\n <textarea\n ref=\"composer\"\n v-model=\"promptInput\"\n data-testid=\"ai-chat-input\"\n class=\"tpl:max-h-32 tpl:min-h-[44px] tpl:w-full tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-sm tpl:outline-none tpl:text-[var(--tpl-text)]\"\n :placeholder=\"t.ai.chat.inputPlaceholder\"\n :aria-label=\"t.ai.chat.inputPlaceholder\"\n :disabled=\"isBusy\"\n maxlength=\"4000\"\n rows=\"3\"\n @keydown=\"onKeydown\"\n />\n <div class=\"tpl:flex tpl:items-center tpl:justify-between\">\n <button\n v-if=\"canAttach\"\n type=\"button\"\n :aria-label=\"t.ai.chat.attach\"\n :title=\"t.ai.chat.attach\"\n :disabled=\"isBusy\"\n class=\"tpl:-ml-1.5 tpl:shrink-0 tpl:rounded-md tpl:p-1.5 tpl:text-[var(--tpl-text-muted)] tpl:disabled:opacity-40\"\n @click=\"fileInput?.click()\"\n >\n <Paperclip :size=\"16\" aria-hidden=\"true\" />\n </button>\n <button\n v-if=\"isBusy\"\n type=\"button\"\n data-testid=\"ai-chat-stop\"\n class=\"tpl-ai-send-btn tpl:ml-auto tpl:-mr-1.5 tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:text-[var(--tpl-primary)]\"\n :aria-label=\"t.ai.chat.stop\"\n :title=\"t.ai.chat.stop\"\n @click=\"feature.stop()\"\n >\n <Square :size=\"16\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n <button\n v-else\n type=\"button\"\n data-testid=\"ai-chat-send\"\n class=\"tpl-ai-send-btn tpl:ml-auto tpl:-mr-1.5 tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]\"\n :aria-label=\"t.ai.chat.send\"\n :title=\"t.ai.chat.send\"\n :disabled=\"!promptInput.trim()\"\n @click=\"send\"\n >\n <Send :size=\"16\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n </div>\n </div>\n <p\n class=\"tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ t.ai.chat.disclaimer }}\n </p>\n </div>\n </template>\n </AiPanelShell>\n </div>\n</template>\n\n<style scoped>\n.tpl-ai-input-wrapper:focus-within {\n border-color: var(--tpl-primary);\n box-shadow: var(--tpl-ring);\n}\n\n.tpl-ai-send-btn:not(:disabled):hover {\n transform: scale(1.05);\n}\n\n.tpl-starter-btn:hover {\n border-color: var(--tpl-primary) !important;\n background-color: var(--tpl-primary-light) !important;\n}\n</style>\n","<script setup lang=\"ts\">\nimport {\n CircleAlert,\n FileText,\n Image,\n Paperclip,\n X,\n LoaderCircle,\n MessageSquarePlus,\n Redo2,\n Send,\n Sparkles,\n Square,\n Undo2,\n} from \"@lucide/vue\";\nimport { computed, inject, nextTick, ref, watch } from \"vue\";\nimport { useIntervalFn, useTimeoutFn } from \"@vueuse/core\";\nimport LoadingTrack from \"../LoadingTrack.vue\";\nimport AiPanelShell from \"./AiPanelShell.vue\";\nimport type {\n AiChatItem,\n UseAiFeatureReturn,\n} from \"../../composables/useAiFeature\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { secondaryBtnCompactClass } from \"../../constants/styleConstants\";\nimport { UI_LOCALE_KEY } from \"../../keys\";\nimport { validateChatAttachments } from \"../../utils/aiAttachments\";\nimport { aiErrorMessage } from \"../../utils/aiErrors\";\n\nconst props = defineProps<{ feature: UseAiFeatureReturn }>();\nconst emit = defineEmits<{ (e: \"close\"): void }>();\n\nconst { t, format } = useI18n();\nconst uiLocale = inject(UI_LOCALE_KEY, undefined);\n\nconst promptInput = ref(\"\");\nconst composer = ref<HTMLTextAreaElement | null>(null);\nconst fileInput = ref<HTMLInputElement | null>(null);\nconst attachments = ref<File[]>([]);\nconst attachmentErrors = ref<string[]>([]);\nconst dragDepth = ref(0);\nwatch(\n () => props.feature.templateSession.value,\n () => {\n promptInput.value = \"\";\n attachments.value = [];\n attachmentErrors.value = [];\n dragDepth.value = 0;\n },\n { flush: \"sync\" },\n);\nconst canAttach = computed(() => props.feature.has(\"chatAttachments\"));\nfunction attach(files: File[]): void {\n const result = validateChatAttachments(attachments.value, files);\n attachments.value = result.accepted;\n const keys = {\n tooMany: \"attachTooMany\",\n tooLarge: \"attachTooLarge\",\n totalTooLarge: \"attachTotalTooLarge\",\n wrongType: \"attachWrongType\",\n } as const;\n attachmentErrors.value = result.errors.map((error) =>\n format(t.ai.chat[keys[error.reason]], { name: error.name }),\n );\n}\nfunction picked(event: Event): void {\n const input = event.target as HTMLInputElement;\n if (!isBusy.value && canAttach.value) attach(Array.from(input.files ?? []));\n input.value = \"\";\n}\nfunction removeAttachment(index: number): void {\n if (isBusy.value) return;\n attachments.value.splice(index, 1);\n attachmentErrors.value = [];\n}\nfunction isFileDrag(event: DragEvent): boolean {\n return Array.from(event.dataTransfer?.types ?? []).includes(\"Files\");\n}\nfunction dragEnter(event: DragEvent): void {\n if (!canAttach.value || isBusy.value || !isFileDrag(event)) return;\n event.preventDefault();\n dragDepth.value++;\n}\nfunction dragLeave(event: DragEvent): void {\n if (!isFileDrag(event)) return;\n dragDepth.value = Math.max(0, dragDepth.value - 1);\n}\nfunction dragOver(event: DragEvent): void {\n if (canAttach.value && isFileDrag(event)) event.preventDefault();\n}\nfunction drop(event: DragEvent): void {\n dragDepth.value = 0;\n if (!canAttach.value || !isFileDrag(event)) return;\n event.preventDefault();\n if (!isBusy.value) attach(Array.from(event.dataTransfer?.files ?? []));\n}\nwatch(\n () => props.feature.importQueue.value,\n (files) => {\n if (!canAttach.value || !files.length) return;\n attach(files);\n if (!promptInput.value.trim()) promptInput.value = t.ai.import.prompt;\n props.feature.importQueue.value = [];\n void nextTick(() => composer.value?.focus());\n },\n { immediate: true },\n);\nconst messagesContainer = ref<HTMLElement | null>(null);\nconst visibleStarterCount = ref(0);\n\nconst starters = computed(() =>\n props.feature.isTemplateEmpty.value\n ? [\n t.ai.starters.emptyWelcome,\n t.ai.starters.emptyLaunch,\n t.ai.starters.emptyNewsletter,\n ]\n : [\n t.ai.starters.filledShorten,\n t.ai.starters.filledFriendlier,\n t.ai.starters.filledDates,\n t.ai.starters.filledCta,\n ],\n);\nconst messages = computed(() => props.feature.messages.value);\nconst isBusy = computed(() => props.feature.isRunning.value);\nconst failureText = computed(() => {\n const failure = props.feature.failure.value;\n return failure\n ? aiErrorMessage(\n failure.error,\n t.ai.errors,\n format,\n uiLocale,\n failure.context,\n )\n : \"\";\n});\n\nconst { pause: pauseReveal, resume: resumeReveal } = useIntervalFn(\n () => {\n if (visibleStarterCount.value < starters.value.length) {\n visibleStarterCount.value++;\n } else {\n pauseReveal();\n }\n },\n 150,\n { immediate: false },\n);\nconst { start: startReveal } = useTimeoutFn(() => resumeReveal(), 100, {\n immediate: false,\n});\n\nwatch(\n () => starters.value.length,\n (count) => {\n pauseReveal();\n visibleStarterCount.value = 0;\n if (count > 0) startReveal();\n },\n { immediate: true },\n);\n\nfunction scrollToBottom(): void {\n void nextTick(() => {\n if (messagesContainer.value) {\n messagesContainer.value.scrollTop = messagesContainer.value.scrollHeight;\n }\n });\n}\n\nwatch(() => messages.value.length, scrollToBottom);\n\n// A failed turn gives its prompt back (D15).\nwatch(\n () =>\n [\n props.feature.failedPrompt.value,\n props.feature.failedAttachments.value,\n ] as const,\n ([prompt, files]) => {\n if (prompt) {\n promptInput.value = prompt;\n attachments.value = [...files];\n }\n },\n { immediate: true },\n);\n\nasync function send(): Promise<void> {\n const prompt = promptInput.value.trim();\n if (!prompt || isBusy.value) return;\n const files = [...attachments.value];\n promptInput.value = \"\";\n attachments.value = [];\n attachmentErrors.value = [];\n scrollToBottom();\n await props.feature.send(prompt, files);\n scrollToBottom();\n}\n\nfunction appliedLabel(item: AiChatItem): string {\n if (item.undone) return t.ai.chat.undone;\n return item.operationCount === 1\n ? t.ai.chat.appliedChange\n : format(t.ai.chat.appliedChanges, { count: item.operationCount });\n}\n\nfunction itemFailure(item: AiChatItem): string {\n return item.failure\n ? aiErrorMessage(\n item.failure.error,\n t.ai.errors,\n format,\n uiLocale,\n item.failure.context,\n )\n : \"\";\n}\n\nfunction toggleUndo(item: AiChatItem): void {\n if (item.undone) void props.feature.redoMessage(item.id);\n else void props.feature.undoMessage(item.id);\n}\n\nfunction chooseStarter(starter: string): void {\n pauseReveal();\n promptInput.value = starter;\n void send();\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.isComposing || event.keyCode === 229) return;\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n void send();\n }\n}\n</script>\n\n<template>\n <div\n class=\"tpl:contents\"\n data-testid=\"ai-chat-dropzone\"\n @dragenter=\"dragEnter\"\n @dragleave=\"dragLeave\"\n @dragover=\"dragOver\"\n @drop=\"drop\"\n >\n <AiPanelShell\n :title=\"t.ai.chat.title\"\n :subtitle=\"t.ai.chat.notice\"\n testid=\"ai-panel-chat\"\n :close-label=\"t.ai.chat.close\"\n @close=\"emit('close')\"\n >\n <template #actions>\n <button\n v-if=\"feature.canClear && messages.length > 0\"\n type=\"button\"\n data-testid=\"ai-chat-new\"\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)] tpl:disabled:opacity-40\"\n :aria-label=\"t.ai.chat.newChat\"\n :title=\"t.ai.chat.newChat\"\n :disabled=\"isBusy\"\n @click=\"feature.newChat()\"\n >\n <MessageSquarePlus :size=\"14\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n </template>\n\n <div\n v-if=\"canAttach && dragDepth > 0 && !isBusy\"\n data-testid=\"ai-chat-drop-hint\"\n class=\"tpl:absolute tpl:inset-0 tpl:z-20 tpl:flex tpl:items-center tpl:justify-center tpl:border-2 tpl:border-dashed tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-4 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-primary)] tpl:pointer-events-none\"\n >\n {{ t.ai.chat.dropHint }}\n </div>\n <div\n ref=\"messagesContainer\"\n class=\"tpl:flex-1 tpl:overflow-y-auto tpl:p-4\"\n >\n <div\n v-if=\"feature.isLoadingHistory.value\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center\"\n >\n <LoaderCircle\n class=\"tpl-spinner tpl:text-[var(--tpl-text-muted)]\"\n :size=\"24\"\n :stroke-width=\"2\"\n aria-hidden=\"true\"\n />\n <p class=\"tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ t.ai.chat.loadingHistory }}\n </p>\n </div>\n\n <div\n v-else-if=\"messages.length === 0\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center\"\n >\n <Sparkles\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-text-dim)]\"\n aria-hidden=\"true\"\n />\n <p\n class=\"tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.ai.chat.placeholder }}\n </p>\n </div>\n\n <!-- Text is interpolated, never `v-html`. -->\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-4\">\n <div\n v-for=\"item in messages\"\n :key=\"item.id\"\n class=\"tpl:flex tpl:flex-col tpl:gap-2\"\n >\n <div\n v-if=\"item.role === 'user'\"\n data-testid=\"ai-chat-prompt\"\n class=\"tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap\"\n style=\"\n background-color: var(--tpl-primary-light);\n color: var(--tpl-text);\n max-width: 85%;\n box-shadow: var(--tpl-shadow);\n \"\n >\n {{ item.text }}\n <span\n v-for=\"(attachment, index) in item.attachments\"\n :key=\"index\"\n data-testid=\"ai-chat-history-attachment\"\n class=\"tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:px-2 tpl:py-1 tpl:text-xs\"\n >\n <FileText\n v-if=\"attachment.kind === 'pdf'\"\n :size=\"12\"\n aria-hidden=\"true\"\n /><Image v-else :size=\"12\" aria-hidden=\"true\" />{{\n attachment.name\n }}\n </span>\n </div>\n\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-2\">\n <LoadingTrack\n v-if=\"item.text === '' && item.status === 'streaming'\"\n />\n <div\n v-else-if=\"item.text !== ''\"\n data-testid=\"ai-chat-reply\"\n class=\"tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap\"\n style=\"\n max-width: 85%;\n background-color: var(--tpl-bg);\n color: var(--tpl-text);\n box-shadow: var(--tpl-shadow);\n \"\n >\n {{ item.text }}\n </div>\n <div\n v-if=\"item.operationCount > 0\"\n data-testid=\"ai-chat-applied\"\n class=\"tpl:flex tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <span>{{ appliedLabel(item) }}</span>\n <button\n v-if=\"item.undone ? item.canRedo : item.canUndo\"\n type=\"button\"\n data-testid=\"ai-chat-undo\"\n :class=\"secondaryBtnCompactClass\"\n :disabled=\"isBusy\"\n @click=\"toggleUndo(item)\"\n >\n <Redo2\n v-if=\"item.undone\"\n :size=\"12\"\n :stroke-width=\"2\"\n aria-hidden=\"true\"\n />\n <Undo2\n v-else\n :size=\"12\"\n :stroke-width=\"2\"\n aria-hidden=\"true\"\n />\n {{ item.undone ? t.ai.chat.redo : t.ai.chat.undo }}\n </button>\n </div>\n <p\n v-if=\"item.failure\"\n role=\"alert\"\n data-testid=\"ai-chat-item-error\"\n class=\"tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]\"\n >\n {{ itemFailure(item) }}\n </p>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Starter prompts, over the empty state (D21). -->\n <div\n v-if=\"messages.length === 0 && starters.length > 0\"\n class=\"tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3\"\n style=\"\n background-color: color-mix(in srgb, var(--tpl-bg) 50%, transparent);\n backdrop-filter: blur(2px);\n \"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-1.5\">\n <button\n v-for=\"(starter, index) in starters\"\n :key=\"index\"\n type=\"button\"\n data-testid=\"ai-chat-starter\"\n class=\"tpl-starter-btn tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:leading-snug tpl:transition-all tpl:duration-300 tpl:ease-out\"\n :class=\"\n starters.length - 1 - index < visibleStarterCount\n ? 'tpl:translate-y-0 tpl:opacity-100'\n : 'tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0'\n \"\n style=\"\n border-color: var(--tpl-border);\n color: var(--tpl-primary);\n background-color: var(--tpl-bg);\n box-shadow: var(--tpl-shadow);\n \"\n @click=\"chooseStarter(starter)\"\n >\n {{ starter }}\n </button>\n </div>\n </div>\n\n <template #footer>\n <div class=\"tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]\">\n <template v-if=\"canAttach\">\n <input\n ref=\"fileInput\"\n data-testid=\"ai-chat-files\"\n type=\"file\"\n multiple\n accept=\"image/png,image/jpeg,image/webp,image/gif,application/pdf\"\n hidden\n :disabled=\"isBusy\"\n @change=\"picked\"\n />\n <div\n v-if=\"attachments.length\"\n class=\"tpl:mb-2 tpl:flex tpl:flex-wrap tpl:gap-1\"\n >\n <span\n v-for=\"(file, index) in attachments\"\n :key=\"index\"\n data-testid=\"ai-chat-attachment\"\n class=\"tpl:flex tpl:max-w-full tpl:items-center tpl:gap-1 tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text)]\"\n >\n <FileText\n v-if=\"file.type === 'application/pdf'\"\n :size=\"12\"\n aria-hidden=\"true\"\n /><Image v-else :size=\"12\" aria-hidden=\"true\" />\n <span class=\"tpl:truncate\">{{ file.name }}</span>\n <button\n type=\"button\"\n :aria-label=\"\n format(t.ai.chat.removeAttachment, { name: file.name })\n \"\n :disabled=\"isBusy\"\n class=\"tpl:shrink-0 tpl:rounded tpl:p-0.5 tpl:disabled:opacity-40\"\n @click=\"removeAttachment(index)\"\n >\n <X :size=\"12\" aria-hidden=\"true\" />\n </button>\n </span>\n </div>\n <p\n v-if=\"attachments.length\"\n class=\"tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.ai.import.placeholderNote }}\n </p>\n <div\n aria-live=\"polite\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-danger)]\"\n >\n <p\n v-for=\"(error, index) in attachmentErrors\"\n :key=\"index\"\n class=\"tpl:mb-2\"\n >\n {{ error }}\n </p>\n </div>\n </template>\n <div\n v-if=\"feature.keptYourVersion.value\"\n role=\"status\"\n class=\"tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <p>{{ t.ai.chat.keptYourVersion }}</p>\n <button\n type=\"button\"\n :disabled=\"isBusy\"\n :class=\"secondaryBtnCompactClass\"\n @click=\"feature.reloadTemplate()\"\n >\n {{ t.ai.chat.reload }}\n </button>\n </div>\n <div\n v-if=\"failureText\"\n role=\"alert\"\n data-testid=\"ai-chat-error\"\n class=\"tpl:mx-3 tpl:mb-2 tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs\"\n style=\"\n background-color: var(--tpl-danger-light);\n color: var(--tpl-danger);\n \"\n >\n <CircleAlert\n :size=\"14\"\n :stroke-width=\"2\"\n class=\"tpl:mt-0.5 tpl:shrink-0\"\n aria-hidden=\"true\"\n />\n <span>{{ failureText }}</span>\n </div>\n <div\n class=\"tpl-ai-input-wrapper tpl-focus-ring-host tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]\"\n >\n <textarea\n ref=\"composer\"\n v-model=\"promptInput\"\n data-testid=\"ai-chat-input\"\n class=\"tpl:max-h-32 tpl:min-h-[44px] tpl:w-full tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-sm tpl:outline-none tpl:text-[var(--tpl-text)]\"\n :placeholder=\"t.ai.chat.inputPlaceholder\"\n :aria-label=\"t.ai.chat.inputPlaceholder\"\n :disabled=\"isBusy\"\n maxlength=\"4000\"\n rows=\"3\"\n @keydown=\"onKeydown\"\n />\n <div class=\"tpl:flex tpl:items-center tpl:justify-between\">\n <button\n v-if=\"canAttach\"\n type=\"button\"\n :aria-label=\"t.ai.chat.attach\"\n :title=\"t.ai.chat.attach\"\n :disabled=\"isBusy\"\n class=\"tpl:-ml-1.5 tpl:shrink-0 tpl:rounded-md tpl:p-1.5 tpl:text-[var(--tpl-text-muted)] tpl:disabled:opacity-40\"\n @click=\"fileInput?.click()\"\n >\n <Paperclip :size=\"16\" aria-hidden=\"true\" />\n </button>\n <button\n v-if=\"isBusy\"\n type=\"button\"\n data-testid=\"ai-chat-stop\"\n class=\"tpl-ai-send-btn tpl:ml-auto tpl:-mr-1.5 tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:text-[var(--tpl-primary)]\"\n :aria-label=\"t.ai.chat.stop\"\n :title=\"t.ai.chat.stop\"\n @click=\"feature.stop()\"\n >\n <Square :size=\"16\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n <button\n v-else\n type=\"button\"\n data-testid=\"ai-chat-send\"\n class=\"tpl-ai-send-btn tpl:ml-auto tpl:-mr-1.5 tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]\"\n :aria-label=\"t.ai.chat.send\"\n :title=\"t.ai.chat.send\"\n :disabled=\"!promptInput.trim()\"\n @click=\"send\"\n >\n <Send :size=\"16\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n </div>\n </div>\n <p\n class=\"tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ t.ai.chat.disclaimer }}\n </p>\n </div>\n </template>\n </AiPanelShell>\n </div>\n</template>\n\n<style scoped>\n.tpl-ai-input-wrapper:focus-within {\n border-color: var(--tpl-primary);\n box-shadow: var(--tpl-ring);\n}\n\n.tpl-ai-send-btn:not(:disabled):hover {\n transform: scale(1.05);\n}\n\n.tpl-starter-btn:hover {\n border-color: var(--tpl-primary) !important;\n background-color: var(--tpl-primary-light) !important;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;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