@templatical/editor 0.52.1 → 0.54.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-9ySsXOTU.js → AiAltTextReview-Ci4zHwRc.js} +68 -66
- package/dist/AiChatPanel-C8SeEJRP.js +561 -0
- package/dist/{AiPanels-DqT4PgQ0.js → AiPanels-CR6zphjP.js} +6 -6
- package/dist/{AiRewriteMenu-28agTycW.js → AiRewriteMenu-CIHUnPud.js} +76 -105
- package/dist/BlockIssueBadge-DaPTq1RE.js +33 -0
- package/dist/BlockPreviewCanvas-B70RSavL.js +140 -0
- package/dist/{CloudHeaderExtras-QI82yF54.js → CloudHeaderExtras-XpjJjn3o.js} +4 -4
- package/dist/{CloudPanels-BKJaLkUN.js → CloudPanels-VpSQiLLL.js} +53 -53
- package/dist/CollaborationNotices-Cnx0XHzZ.js +65 -0
- package/dist/{CollaboratorBar-CXQqN3VP.js → CollaboratorBar-BaBoNhwB.js} +24 -24
- package/dist/CommentsPanel-Ck3QmqiC.js +16 -0
- package/dist/CommentsSidebar-CHknhOar.js +526 -0
- package/dist/{CountdownBlock-CU2yTWtF.js → CountdownBlock-BMezkFbJ.js} +15 -15
- package/dist/CountdownToolbar-CM4XNEuO.js +258 -0
- package/dist/IssuesPanel-1wGV0wiy.js +371 -0
- package/dist/LanguageMenu-d2GlX67r.js +403 -0
- package/dist/{LoadingTrack-DM4g6j7b.js → LoadingTrack-BG8cg9xi.js} +2 -2
- package/dist/LocaleNotices-WzsYtBRs.js +46 -0
- package/dist/LogicTagInsertButton-DgTJ6Lvx.js +1096 -0
- package/dist/{MediaEditModal-Dy08GEwE.js → MediaEditModal-C3U9Mi31.js} +451 -451
- package/dist/{MediaPanels-BgEp7iCp.js → MediaPanels-CGmk9ufe.js} +4 -4
- package/dist/{MergeTagInput-B9dtUthD.js → MergeTagInput-B_51YcQO.js} +30 -30
- package/dist/{MergeTagModeToggle-DxujhYJ4.js → MergeTagModeToggle-D3Q2z317.js} +49 -49
- package/dist/MergeTagTextarea-DZz1L9DE.js +126 -0
- package/dist/ParagraphEditor-CI68PYDL.js +825 -0
- package/dist/{RestoreVersionDialog-C4s_JYCx.js → RestoreVersionDialog-DcuhpOIz.js} +23 -23
- package/dist/{RichTextEditorContent-o6HmE8GR.js → RichTextEditorContent-Dstovi0m.js} +47 -47
- package/dist/{SaveBlockDialog-CWLrly6l.js → SaveBlockDialog-vuwvoi-d.js} +86 -86
- package/dist/{cdn/chunks/SavedBlocksBrowserModal-BPYcRoGa.js → SavedBlocksBrowserModal-DUJm0dOv.js} +135 -132
- package/dist/{SavedBlocksPanels-BE1N9rNZ.js → SavedBlocksPanels-BiMXQ5lY.js} +9 -9
- package/dist/{SavedBlocksPickBar-Dwl94xhP.js → SavedBlocksPickBar-CAstZfG7.js} +15 -15
- package/dist/TemplateSettings-Baar78_s.js +294 -0
- package/dist/TestEmailModal-Bl_GHdrN.js +212 -0
- package/dist/{TestEmailPanel-DaFjP9QK.js → TestEmailPanel-CpTBF7B5.js} +4 -4
- package/dist/TitleEditor-DkbEDAZB.js +202 -0
- package/dist/ToggleSwitch-R3wCCYE6.js +43 -0
- package/dist/Toolbar-bOZ_eq7X.js +3711 -0
- package/dist/{TplModal-DLMssVlt.js → TplModal-wk2gLa7_.js} +17 -17
- package/dist/{VersionHistoryMenu-BkbYUs0Q.js → VersionHistoryMenu-BnP0EyLl.js} +39 -39
- package/dist/{VersionHistoryPanels-DP7HaYWv.js → VersionHistoryPanels-Cq2rFKIX.js} +5 -5
- package/dist/VersionPreviewBanner-BPP939cD.js +37 -0
- package/dist/WrapperBlock-cWT_nZgQ.js +44 -0
- package/dist/{blockTypeIcons-BHjlPnPf.js → blockTypeIcons-BUyPZ7Su.js} +7 -7
- 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-Cnc_kUmb.js +107 -0
- package/dist/cdn/chunks/AiAltTextPopover-Cnc_kUmb.js.map +1 -0
- package/dist/cdn/chunks/{AiAltTextReview-BGLLSKLm.js → AiAltTextReview-DPeSY-7r.js} +70 -68
- package/dist/cdn/chunks/AiAltTextReview-DPeSY-7r.js.map +1 -0
- package/dist/cdn/chunks/AiChatPanel-By8Uo1nH.js +487 -0
- package/dist/cdn/chunks/AiChatPanel-By8Uo1nH.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-0wBarZSH.js → AiPanels-BblCSkQy.js} +11 -11
- package/dist/cdn/chunks/{AiPanels-0wBarZSH.js.map → AiPanels-BblCSkQy.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-qf-cfEpy.js → AiRewriteMenu-C4btyN4W.js} +79 -79
- package/dist/cdn/chunks/AiRewriteMenu-C4btyN4W.js.map +1 -0
- package/dist/cdn/chunks/BlockIssueBadge-D3Plo_wt.js +34 -0
- package/dist/cdn/chunks/BlockIssueBadge-D3Plo_wt.js.map +1 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-CTKmBPsq.js +142 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-DGBh6mqe.js.map → BlockPreviewCanvas-CTKmBPsq.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-BMNK_F9p.js → CloudHeaderExtras-BtqdN777.js} +4 -4
- package/dist/cdn/chunks/{CloudHeaderExtras-BMNK_F9p.js.map → CloudHeaderExtras-BtqdN777.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-JMWIoVWh.js → CloudPanels-COU26R83.js} +45 -45
- package/dist/cdn/chunks/{CloudPanels-JMWIoVWh.js.map → CloudPanels-COU26R83.js.map} +1 -1
- package/dist/cdn/chunks/CollaborationNotices-DraFUhyo.js +67 -0
- package/dist/cdn/chunks/CollaborationNotices-DraFUhyo.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CXByAoUz.js → CollaboratorBar-0OEH3hrj.js} +17 -17
- package/dist/cdn/chunks/{CollaboratorBar-CXByAoUz.js.map → CollaboratorBar-0OEH3hrj.js.map} +1 -1
- package/dist/cdn/chunks/CommentsPanel-tZZswofV.js +18 -0
- package/dist/cdn/chunks/{CommentsPanel-DoJnKLXI.js.map → CommentsPanel-tZZswofV.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-7Hfl3Hdj.js +496 -0
- package/dist/cdn/chunks/CommentsSidebar-7Hfl3Hdj.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-BqRw147R.js → CountdownBlock-CjMhMhnv.js} +22 -22
- package/dist/cdn/chunks/{CountdownBlock-BqRw147R.js.map → CountdownBlock-CjMhMhnv.js.map} +1 -1
- package/dist/cdn/chunks/CountdownToolbar-CNgsNL5-.js +260 -0
- package/dist/cdn/chunks/CountdownToolbar-CNgsNL5-.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-C7LfxaAY.js → IssuesPanel-Duic0mIs.js} +133 -121
- package/dist/cdn/chunks/IssuesPanel-Duic0mIs.js.map +1 -0
- package/dist/cdn/chunks/LanguageMenu-B1Aue_lf.js +359 -0
- package/dist/cdn/chunks/LanguageMenu-B1Aue_lf.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-CZuLTazv.js → LoadingTrack-DUYcDHOV.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-CZuLTazv.js.map → LoadingTrack-DUYcDHOV.js.map} +1 -1
- package/dist/cdn/chunks/LocaleNotices-8J2DRWeg.js +47 -0
- package/dist/cdn/chunks/LocaleNotices-8J2DRWeg.js.map +1 -0
- package/dist/{LogicTagInsertButton-CfscnwCn.js → cdn/chunks/LogicTagInsertButton-Bhvi0nWz.js} +422 -449
- package/dist/cdn/chunks/LogicTagInsertButton-Bhvi0nWz.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-Cpcod6_U.js → MediaEditModal-Dz972UFx.js} +421 -421
- package/dist/cdn/chunks/MediaEditModal-Dz972UFx.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-BIdcW_1f.js → MediaPanels-C6Hqtp1H.js} +5 -5
- package/dist/cdn/chunks/{MediaPanels-BIdcW_1f.js.map → MediaPanels-C6Hqtp1H.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-BvWg8o5E.js → MergeTagInput-CrhZm-AW.js} +28 -28
- package/dist/cdn/chunks/{MergeTagInput-BvWg8o5E.js.map → MergeTagInput-CrhZm-AW.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BgKEVUtV.js → MergeTagModeToggle-CWVtXLYa.js} +52 -52
- package/dist/cdn/chunks/MergeTagModeToggle-CWVtXLYa.js.map +1 -0
- package/dist/cdn/chunks/MergeTagTextarea-hTIBwX0F.js +128 -0
- package/dist/cdn/chunks/MergeTagTextarea-hTIBwX0F.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-B2UU1Q5I.js +660 -0
- package/dist/cdn/chunks/ParagraphEditor-B2UU1Q5I.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-CjOdD2xj.js → RestoreVersionDialog-C1Y5Ewo_.js} +22 -22
- package/dist/cdn/chunks/{RestoreVersionDialog-CjOdD2xj.js.map → RestoreVersionDialog-C1Y5Ewo_.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DNjR_sNN.js → RichTextEditorContent-up4AqL7D.js} +44 -44
- package/dist/cdn/chunks/{RichTextEditorContent-DNjR_sNN.js.map → RichTextEditorContent-up4AqL7D.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CUhpawq0.js → SaveBlockDialog-B9lwEP_T.js} +77 -77
- package/dist/cdn/chunks/{SaveBlockDialog-CUhpawq0.js.map → SaveBlockDialog-B9lwEP_T.js.map} +1 -1
- package/dist/{SavedBlocksBrowserModal-CE8n4EBS.js → cdn/chunks/SavedBlocksBrowserModal-fAeHUyxb.js} +103 -106
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BPYcRoGa.js.map → SavedBlocksBrowserModal-fAeHUyxb.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-C6--Bc81.js → SavedBlocksPanels-DRDTLDyZ.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksPanels-C6--Bc81.js.map → SavedBlocksPanels-DRDTLDyZ.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DUavxpbU.js → SavedBlocksPickBar-B6b5z-o3.js} +16 -16
- package/dist/cdn/chunks/{SavedBlocksPickBar-DUavxpbU.js.map → SavedBlocksPickBar-B6b5z-o3.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-CWUpUKJb.js +266 -0
- package/dist/cdn/chunks/TemplateSettings-CWUpUKJb.js.map +1 -0
- package/dist/cdn/chunks/TestEmailModal-DQxnW5Q5.js +212 -0
- package/dist/cdn/chunks/TestEmailModal-DQxnW5Q5.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-CcUpEpAn.js → TestEmailPanel-BcO_-16H.js} +5 -5
- package/dist/cdn/chunks/{TestEmailPanel-CcUpEpAn.js.map → TestEmailPanel-BcO_-16H.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-pmycpmTd.js +202 -0
- package/dist/cdn/chunks/TitleEditor-pmycpmTd.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-BlWVQRcA.js +3626 -0
- package/dist/cdn/chunks/Toolbar-BlWVQRcA.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-CFPDgbwQ.js → TplModal-ClSSGX7a.js} +20 -20
- package/dist/cdn/chunks/{TplModal-CFPDgbwQ.js.map → TplModal-ClSSGX7a.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-BYlLRvRJ.js → VersionHistoryMenu-CZury5gU.js} +33 -33
- package/dist/cdn/chunks/{VersionHistoryMenu-BYlLRvRJ.js.map → VersionHistoryMenu-CZury5gU.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-C6SOVoiT.js → VersionHistoryPanels-B8GPBKMq.js} +6 -6
- package/dist/cdn/chunks/{VersionHistoryPanels-C6SOVoiT.js.map → VersionHistoryPanels-B8GPBKMq.js.map} +1 -1
- package/dist/cdn/chunks/VersionPreviewBanner-C4Ji8nu4.js +39 -0
- package/dist/cdn/chunks/VersionPreviewBanner-C4Ji8nu4.js.map +1 -0
- package/dist/cdn/chunks/WrapperBlock-BoUflYwY.js +46 -0
- package/dist/cdn/chunks/WrapperBlock-BoUflYwY.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-D7FW7Ypo.js → blockTypeIcons-Cc6RJ27V.js} +5 -5
- package/dist/cdn/chunks/{blockTypeIcons-D7FW7Ypo.js.map → blockTypeIcons-Cc6RJ27V.js.map} +1 -1
- 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-C1KU4ZHw.js +3039 -0
- package/dist/cdn/chunks/composables-C1KU4ZHw.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-Cth2JCEh.js → createCloudRuntime-C2Zs5F1O.js} +75 -73
- package/dist/cdn/chunks/createCloudRuntime-C2Zs5F1O.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/cdn/chunks/{dist-8ym3y-pH.js → dist-BzXULHvI.js} +48 -48
- package/dist/cdn/chunks/{dist-8ym3y-pH.js.map → dist-BzXULHvI.js.map} +1 -1
- package/dist/cdn/chunks/{dist-BMzNabtD.js → dist-DqGgijFI.js} +114 -114
- package/dist/cdn/chunks/{dist-BMzNabtD.js.map → dist-DqGgijFI.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-Du8AUMFT.js → draggable-DepKdldn.js} +1491 -1486
- package/dist/cdn/chunks/draggable-DepKdldn.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-CyCe560f.js → editor-modal-erQEOHZN.js} +781 -781
- package/dist/cdn/chunks/{editor-modal-CyCe560f.js.map → editor-modal-erQEOHZN.js.map} +1 -1
- package/dist/cdn/chunks/en-B6tLGRHq.js +1 -0
- package/dist/{en-D14i5nFh.js → cdn/chunks/en-C0pHHMiR.js} +116 -0
- package/dist/cdn/chunks/en-C0pHHMiR.js.map +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-CFF2KWy-.js → extensions-DcMKZpzh.js} +59 -59
- package/dist/cdn/chunks/{extensions-CFF2KWy-.js.map → extensions-DcMKZpzh.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-okSPsLOa.js → icons-Da9GKjPx.js} +188 -147
- package/dist/cdn/chunks/icons-Da9GKjPx.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/{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-cC32Ox6A.js +290 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-cC32Ox6A.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/{preRenderCustomBlocks--_xc0XK3.js → cdn/chunks/preRenderCustomBlocks-f7GEKdvw.js} +5 -3
- package/dist/cdn/chunks/{preRenderCustomBlocks-BcXIz7oJ.js.map → preRenderCustomBlocks-f7GEKdvw.js.map} +1 -1
- package/dist/{pt-BR-dDlTwX18.js → cdn/chunks/pt-BR-CY5Ye7eP.js} +116 -0
- package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +1 -0
- package/dist/cdn/chunks/sanitizeHtml-WTfz9lZd.js +61 -0
- package/dist/cdn/chunks/sanitizeHtml-WTfz9lZd.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-DeCYorUT.js +2638 -0
- package/dist/cdn/chunks/socialIcons-DeCYorUT.js.map +1 -0
- package/dist/cdn/chunks/{src-DEd87i_U.js → src-A_cKeTM_.js} +618 -461
- package/dist/cdn/chunks/src-A_cKeTM_.js.map +1 -0
- package/dist/cdn/chunks/src-BQUv2CYU.js +2606 -0
- package/dist/cdn/chunks/src-BQUv2CYU.js.map +1 -0
- package/dist/cdn/chunks/src-BWX_xVxO.js +671 -0
- package/dist/cdn/chunks/src-BWX_xVxO.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-CbiTlECY.js → tiptap-Dipw_zOQ.js} +40 -40
- package/dist/cdn/chunks/{tiptap-CbiTlECY.js.map → tiptap-Dipw_zOQ.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-DY8_-ETE.js → useCloudI18n-Cc5NZqiI.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-DY8_-ETE.js.map → useCloudI18n-Cc5NZqiI.js.map} +1 -1
- package/dist/cdn/chunks/useEditorRoot-D_LuZ_hE.js +9 -0
- package/dist/cdn/chunks/{useEditorRoot-vjZJwKrV.js.map → useEditorRoot-D_LuZ_hE.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-D8pY4LTq.js → useI18n-BnJYydPv.js} +3 -3
- package/dist/cdn/chunks/{useI18n-D8pY4LTq.js.map → useI18n-BnJYydPv.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-aGfnO90D.js +33 -0
- package/dist/cdn/chunks/useLocalizedDisplay-aGfnO90D.js.map +1 -0
- package/dist/cdn/chunks/{useLogicTag-DBJDtpKA.js → useLogicTag-DtYe8HIq.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-DBJDtpKA.js.map → useLogicTag-DtYe8HIq.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-B-aG--s1.js → useMergeTag-B8ULmsnp.js} +6 -6
- package/dist/cdn/chunks/{useMergeTag-B-aG--s1.js.map → useMergeTag-B8ULmsnp.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-vjQ0fe-L.js → useScrollToBlock-Ct1AwLD-.js} +5 -5
- package/dist/cdn/chunks/useScrollToBlock-Ct1AwLD-.js.map +1 -0
- package/dist/cdn/chunks/{withCurrentFont-hZTvYBHO.js → withCurrentFont-MK8ga9q9.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-hZTvYBHO.js.map → withCurrentFont-MK8ga9q9.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +2189 -1495
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BZ8o0eet.js → check-XMnOOIEC.js} +1 -1
- package/dist/{chevron-down-DfAAfILv.js → chevron-down-DmamTEWQ.js} +1 -1
- package/dist/{chevron-right-Bk4mGdr7.js → chevron-right-BEFXOH27.js} +1 -1
- package/dist/{chevron-up-MhUf_azW.js → chevron-up-Dw7woXj8.js} +1 -1
- package/dist/{circle-alert-CShJwVFv.js → circle-alert-BTKC9vkq.js} +1 -1
- package/dist/{clock-CTfD6OCt.js → clock-BVT5u2uG.js} +1 -1
- package/dist/composables-CMIrGXJ1.js +4517 -0
- package/dist/{createCloudRuntime-DCgO4A1r.js → createCloudRuntime-DGV5a5Af.js} +54 -52
- package/dist/{createLucideIcon-CvhTA2KG.js → createLucideIcon-CgDE3xAR.js} +16 -16
- package/dist/{cdn/chunks/de-CeFJ6wbM.js → de-DaOUfYBX.js} +114 -2
- package/dist/{dist-ByCWA2Tv.js → dist-0alKVRc_.js} +101 -101
- 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/{dist-CVy-7PHQ.js → dist-CX7skkvG.js} +48 -48
- 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-D6cMdrfG.js → dist-fqSers8_.js} +55 -55
- package/dist/{editor-modal-zaZHcmlO.js → editor-modal-BeX6otLk.js} +953 -952
- package/dist/{cdn/chunks/en-D14i5nFh.js → en-C0pHHMiR.js} +114 -2
- package/dist/en-Do0SU6tR.js +1 -0
- package/dist/{cdn/chunks/es-zDacbMhs.js → es-CxyEKr6n.js} +114 -2
- package/dist/{extensions-fo_c-vqf.js → extensions-BJ184osp.js} +173 -173
- package/dist/{eye-7W4t5e0Q.js → eye-ByMgHeA_.js} +1 -1
- package/dist/{cdn/chunks/fr-CSgYtjOd.js → fr-CYbamiI6.js} +114 -2
- package/dist/{image-BDiRFzSd.js → image-Ch8tR35K.js} +1 -1
- package/dist/index.d.ts +182 -14
- package/dist/{info-Cxi3-Kh9.js → info-DzSD-Wpk.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-ju_2Cmir.js → link-oDn9AR2w.js} +1 -1
- package/dist/{list-DYZJf0aZ.js → list-C5t07dp8.js} +1 -1
- package/dist/{loader-circle-BZRD0a4I.js → loader-circle-k6xvKgUB.js} +1 -1
- package/dist/{message-circle-DuEw4Zfx.js → message-circle-C23R6OJR.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-CePMr2kK.js → package-C90eQ7NU.js} +1 -1
- package/dist/{pencil-D3aFCL7c.js → pencil-BK7GrQuA.js} +1 -1
- package/dist/plural-CyxrJXL1.js +15 -0
- package/dist/plus-Cr0Mis63.js +13 -0
- package/dist/{cdn/chunks/preRenderCustomBlocks-BcXIz7oJ.js → preRenderCustomBlocks-Bs3N9no-.js} +4 -6
- package/dist/{cdn/chunks/pt-BR-dDlTwX18.js → pt-BR-CY5Ye7eP.js} +114 -2
- package/dist/{refresh-cw-xnro7_Sk.js → refresh-cw-_ZLOIEvA.js} +2 -12
- package/dist/rotate-ccw-CB5wsHwv.js +13 -0
- package/dist/{runtime-dom.esm-bundler-BURR-bj5.js → runtime-dom.esm-bundler-DlHp8xgy.js} +154 -154
- package/dist/sanitizeHtml-2rjV0r-6.js +962 -0
- package/dist/{search-CDrstRBv.js → search-BmrQNox8.js} +1 -1
- package/dist/{send-DROkPOaX.js → send-blAsIBBg.js} +1 -1
- package/dist/{smartphone-Bx6u_tjn.js → smartphone-BPpWYrwV.js} +1 -1
- package/dist/socialIcons-TFiOkpoU.js +2705 -0
- package/dist/{sparkles-CdaTtvoz.js → sparkles-OqIxrNp-.js} +1 -1
- package/dist/{square-BbCROH_f.js → square-BP-V7iT-.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 +2438 -1752
- package/dist/{text-align-start-CGacJ9Vw.js → text-align-start-4mwX2o-F.js} +13 -13
- package/dist/{trash-DxCd7zIy.js → trash-B99WixTA.js} +1 -1
- package/dist/{triangle-alert-7_oaitpf.js → triangle-alert-CHMiDkHa.js} +1 -1
- package/dist/{upload-DuFEOi_0.js → upload-Cp8o-hrN.js} +1 -1
- package/dist/{useCloudI18n-DEMmUKuO.js → useCloudI18n-Dh2iydo1.js} +4 -4
- package/dist/useEditorRoot-DY3mgcHm.js +7 -0
- package/dist/{useI18n-BBrHTdu8.js → useI18n-CgtvtF4C.js} +4 -4
- package/dist/useLocalizedDisplay-DNNwDRxL.js +31 -0
- package/dist/{useLogicTag-ZPC39rfH.js → useLogicTag-BXXXQQmi.js} +4 -4
- package/dist/{useMergeTag-BQ4qqWpQ.js → useMergeTag-C9Okr87y.js} +5 -5
- package/dist/usePopoverPosition-VDQjyX_A.js +76 -0
- package/dist/{useScrollToBlock-BSyAV4pk.js → useScrollToBlock-B35ObCGK.js} +5 -5
- package/dist/{vue.runtime.esm-bundler-CnEeTfhs.js → vue.runtime.esm-bundler-BJXc_Mri.js} +1373 -1368
- package/dist/withCurrentFont-DJiQqZzL.js +18 -0
- package/dist/{x-BpfG7v9g.js → x-BIBStNMS.js} +1 -1
- package/package.json +21 -21
- package/dist/AiAltTextPopover-DawbUywc.js +0 -105
- package/dist/AiChatPanel-CupPhmsN.js +0 -548
- package/dist/BlockIssueBadge-BxpDy3u-.js +0 -33
- package/dist/BlockPreviewCanvas-B-4bmJ3t.js +0 -140
- package/dist/CollaborationNotices-CTw4JThq.js +0 -75
- package/dist/CommentsPanel-DwwFuh1h.js +0 -16
- package/dist/CommentsSidebar-9ZfiC2DO.js +0 -500
- package/dist/CountdownToolbar-BqoYzf_6.js +0 -197
- package/dist/IssuesPanel-4ykrf1ax.js +0 -359
- package/dist/MergeTagTextarea-CPFEjJZd.js +0 -69
- package/dist/ParagraphEditor-CWXfurGh.js +0 -796
- package/dist/TemplateSettings-CS0f1Ues.js +0 -236
- package/dist/TestEmailModal-DBD0X5nV.js +0 -209
- package/dist/TitleEditor-DSqtle77.js +0 -198
- package/dist/ToggleSwitch-JykPyD_8.js +0 -36
- package/dist/Toolbar-BZPFfKrf.js +0 -3145
- package/dist/VersionPreviewBanner-DECaBwLq.js +0 -37
- package/dist/WrapperBlock-BsJv_Fiw.js +0 -44
- package/dist/cdn/chunks/AiAltTextPopover-SEEjkd-I.js +0 -106
- package/dist/cdn/chunks/AiAltTextPopover-SEEjkd-I.js.map +0 -1
- package/dist/cdn/chunks/AiAltTextReview-BGLLSKLm.js.map +0 -1
- package/dist/cdn/chunks/AiChatPanel-DKDAaBNi.js +0 -474
- package/dist/cdn/chunks/AiChatPanel-DKDAaBNi.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-qf-cfEpy.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js +0 -34
- package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-DGBh6mqe.js +0 -142
- package/dist/cdn/chunks/CollaborationNotices-Bsf1rGW9.js +0 -77
- package/dist/cdn/chunks/CollaborationNotices-Bsf1rGW9.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-DoJnKLXI.js +0 -18
- package/dist/cdn/chunks/CommentsSidebar-CUtgvdBC.js +0 -470
- package/dist/cdn/chunks/CommentsSidebar-CUtgvdBC.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-xobieKoU.js +0 -199
- package/dist/cdn/chunks/CountdownToolbar-xobieKoU.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-C7LfxaAY.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-BIi05UQu.js +0 -1051
- package/dist/cdn/chunks/LogicTagInsertButton-BIi05UQu.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-Cpcod6_U.js.map +0 -1
- package/dist/cdn/chunks/MergeTagModeToggle-BgKEVUtV.js.map +0 -1
- package/dist/cdn/chunks/MergeTagTextarea-tBz8McZf.js +0 -71
- package/dist/cdn/chunks/MergeTagTextarea-tBz8McZf.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-B3Rj_cWF.js +0 -631
- package/dist/cdn/chunks/ParagraphEditor-B3Rj_cWF.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-CKtI-dof.js +0 -208
- package/dist/cdn/chunks/TemplateSettings-CKtI-dof.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-CDQTgESD.js +0 -209
- package/dist/cdn/chunks/TestEmailModal-CDQTgESD.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-Cob7RLyK.js +0 -198
- package/dist/cdn/chunks/TitleEditor-Cob7RLyK.js.map +0 -1
- package/dist/cdn/chunks/ToggleSwitch-J7Vwhvha.js +0 -38
- package/dist/cdn/chunks/ToggleSwitch-J7Vwhvha.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-CdpsvNOR.js +0 -3061
- package/dist/cdn/chunks/Toolbar-CdpsvNOR.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-Dvg0ZfAW.js +0 -39
- package/dist/cdn/chunks/VersionPreviewBanner-Dvg0ZfAW.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-C7Md56IT.js +0 -46
- package/dist/cdn/chunks/WrapperBlock-C7Md56IT.js.map +0 -1
- package/dist/cdn/chunks/ca-CD-Kt1qz.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-Cth2JCEh.js.map +0 -1
- package/dist/cdn/chunks/de-CeFJ6wbM.js.map +0 -1
- package/dist/cdn/chunks/draggable-Du8AUMFT.js.map +0 -1
- package/dist/cdn/chunks/en-D14i5nFh.js.map +0 -1
- package/dist/cdn/chunks/en-TIqv4ag3.js +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-okSPsLOa.js.map +0 -1
- package/dist/cdn/chunks/ja-B7H3ID8O.js.map +0 -1
- package/dist/cdn/chunks/keys-CUj6UA38.js +0 -11
- package/dist/cdn/chunks/keys-CUj6UA38.js.map +0 -1
- package/dist/cdn/chunks/nl-176ySmc5.js.map +0 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-C_KlfSW4.js +0 -198
- package/dist/cdn/chunks/normalizeMergeTagMarkup-C_KlfSW4.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-dDlTwX18.js.map +0 -1
- package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js +0 -72
- package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-jsTDmkbb.js +0 -2008
- package/dist/cdn/chunks/socialIcons-jsTDmkbb.js.map +0 -1
- package/dist/cdn/chunks/src-C7bkofBL.js +0 -647
- package/dist/cdn/chunks/src-C7bkofBL.js.map +0 -1
- package/dist/cdn/chunks/src-DEd87i_U.js.map +0 -1
- package/dist/cdn/chunks/src-DwWrYnUj.js +0 -1404
- package/dist/cdn/chunks/src-DwWrYnUj.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-B8xVRiwX.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-BrY66C2y.js +0 -2582
- package/dist/cdn/chunks/useEditorCore-BrY66C2y.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-vjZJwKrV.js +0 -9
- package/dist/cdn/chunks/usePopoverPosition-DSMtmu2W.js +0 -70
- package/dist/cdn/chunks/usePopoverPosition-DSMtmu2W.js.map +0 -1
- package/dist/cdn/chunks/useScrollToBlock-vjQ0fe-L.js.map +0 -1
- package/dist/dist-CKi_npZM.js +0 -1344
- package/dist/dist-DyFArF_G.js +0 -4
- package/dist/dist-pA3ooG6N.js +0 -4
- package/dist/en-Db76vJbY.js +0 -1
- package/dist/keys-BgRERHzu.js +0 -9
- package/dist/normalizeMergeTagMarkup-CELnOlgK.js +0 -196
- package/dist/sanitizeHtml-BzfzpYJY.js +0 -942
- package/dist/socialIcons-D7MGsg0d.js +0 -2075
- package/dist/useEditorCore-BSo2sSID.js +0 -4059
- package/dist/useEditorRoot-BMcoCLBx.js +0 -7
- package/dist/usePopoverPosition-DV1PxL66.js +0 -68
- package/dist/withCurrentFont-B22FXAF5.js +0 -18
|
@@ -1,474 +0,0 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, G as r, I as i, L as a, P as o, V as s, W as c, _ as l, b as u, et as d, ft as f, g as p, h as m, m as h, o as ee, p as g, st as _, u as v, ut as y, x as b } from "./draggable-Du8AUMFT.js";
|
|
2
|
-
import { _ as te, g as ne } from "./dist-8ym3y-pH.js";
|
|
3
|
-
import { X as x } from "./keys-CUj6UA38.js";
|
|
4
|
-
import { t as re } from "./useI18n-D8pY4LTq.js";
|
|
5
|
-
import { D as S, Ft as ie, K as ae, T as oe, Tt as C, _t as w, at as se, j as ce, l as le, t as T, tt as ue, z as de } from "./icons-okSPsLOa.js";
|
|
6
|
-
import { t as fe } from "./LoadingTrack-CZuLTazv.js";
|
|
7
|
-
import { t as E } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
8
|
-
import { n as D } from "./aiErrors-C3QEMB0x.js";
|
|
9
|
-
import { S as O } from "./styleConstants-B8xVRiwX.js";
|
|
10
|
-
// src/components/ai/AiPanelShell.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var k = ["aria-label", "data-testid"], A = { 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" }, j = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5" }, M = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, N = { "data-testid": "ai-panel-title" }, P = {
|
|
12
|
-
key: 0,
|
|
13
|
-
"data-testid": "ai-panel-subtitle",
|
|
14
|
-
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
15
|
-
}, F = { class: "tpl:flex tpl:items-center tpl:gap-1" }, I = ["aria-label", "title"], L = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, pe = /* @__PURE__ */ t({
|
|
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", A, [h("div", j, [h("div", M, [b(_(S), {
|
|
33
|
-
size: 13,
|
|
34
|
-
"stroke-width": 2,
|
|
35
|
-
"aria-hidden": "true"
|
|
36
|
-
}), h("span", N, f(e.title), 1)]), e.subtitle ? (o(), l("p", P, f(e.subtitle), 1)) : p("", !0)]), h("div", F, [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
|
-
}, [b(_(T), {
|
|
44
|
-
size: 14,
|
|
45
|
-
"stroke-width": 2,
|
|
46
|
-
"aria-hidden": "true"
|
|
47
|
-
})], 8, I)])]),
|
|
48
|
-
h("div", L, [a(t.$slots, "default")]),
|
|
49
|
-
a(t.$slots, "footer")
|
|
50
|
-
], 8, k));
|
|
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
|
-
}, V = { class: "tpl:truncate" }, Me = [
|
|
134
|
-
"aria-label",
|
|
135
|
-
"disabled",
|
|
136
|
-
"onClick"
|
|
137
|
-
], Ne = {
|
|
138
|
-
key: 1,
|
|
139
|
-
class: "tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
140
|
-
}, Pe = {
|
|
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__*/ E(/* @__PURE__ */ t({
|
|
169
|
-
__name: "AiChatPanel",
|
|
170
|
-
props: { feature: {} },
|
|
171
|
-
emits: ["close"],
|
|
172
|
-
setup(t, { emit: a }) {
|
|
173
|
-
let E = t, k = a, { t: A, format: j } = re(), M = n(x, void 0), N = d(""), P = d(null), F = d(null), I = d([]), L = d([]), R = d(0);
|
|
174
|
-
s(() => E.feature.templateSession.value, () => {
|
|
175
|
-
N.value = "", I.value = [], L.value = [], R.value = 0;
|
|
176
|
-
}, { flush: "sync" });
|
|
177
|
-
let H = g(() => E.feature.has("chatAttachments"));
|
|
178
|
-
function U(e) {
|
|
179
|
-
let t = z(I.value, e);
|
|
180
|
-
I.value = t.accepted;
|
|
181
|
-
let n = {
|
|
182
|
-
tooMany: "attachTooMany",
|
|
183
|
-
tooLarge: "attachTooLarge",
|
|
184
|
-
totalTooLarge: "attachTotalTooLarge",
|
|
185
|
-
wrongType: "attachWrongType"
|
|
186
|
-
};
|
|
187
|
-
L.value = t.errors.map((e) => j(A.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 || (I.value.splice(e, 1), L.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
|
-
s(() => E.feature.importQueue.value, (t) => {
|
|
212
|
-
H.value && t.length && (U(t), N.value.trim() || (N.value = A.ai.import.prompt), E.feature.importQueue.value = [], e(() => P.value?.focus()));
|
|
213
|
-
}, { immediate: !0 });
|
|
214
|
-
let G = d(null), K = d(0), q = g(() => E.feature.isTemplateEmpty.value ? [
|
|
215
|
-
A.ai.starters.emptyWelcome,
|
|
216
|
-
A.ai.starters.emptyLaunch,
|
|
217
|
-
A.ai.starters.emptyNewsletter
|
|
218
|
-
] : [
|
|
219
|
-
A.ai.starters.filledShorten,
|
|
220
|
-
A.ai.starters.filledFriendlier,
|
|
221
|
-
A.ai.starters.filledDates,
|
|
222
|
-
A.ai.starters.filledCta
|
|
223
|
-
]), J = g(() => E.feature.messages.value), Y = g(() => E.feature.isRunning.value), X = g(() => {
|
|
224
|
-
let e = E.feature.failure.value;
|
|
225
|
-
return e ? D(e.error, A.ai.errors, j, M, e.context) : "";
|
|
226
|
-
}), { pause: Z, resume: Ze } = ne(() => {
|
|
227
|
-
K.value < q.value.length ? K.value++ : Z();
|
|
228
|
-
}, 150, { immediate: !1 }), { start: Qe } = te(() => Ze(), 100, { immediate: !1 });
|
|
229
|
-
s(() => q.value.length, (e) => {
|
|
230
|
-
Z(), K.value = 0, e > 0 && Qe();
|
|
231
|
-
}, { immediate: !0 });
|
|
232
|
-
function Q() {
|
|
233
|
-
e(() => {
|
|
234
|
-
G.value && (G.value.scrollTop = G.value.scrollHeight);
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
s(() => J.value.length, Q), s(() => [E.feature.failedPrompt.value, E.feature.failedAttachments.value], ([e, t]) => {
|
|
238
|
-
e && (N.value = e, I.value = [...t]);
|
|
239
|
-
}, { immediate: !0 });
|
|
240
|
-
async function $() {
|
|
241
|
-
let e = N.value.trim();
|
|
242
|
-
if (!e || Y.value) return;
|
|
243
|
-
let t = [...I.value];
|
|
244
|
-
N.value = "", I.value = [], L.value = [], Q(), await E.feature.send(e, t), Q();
|
|
245
|
-
}
|
|
246
|
-
function $e(e) {
|
|
247
|
-
return e.undone ? A.ai.chat.undone : e.operationCount === 1 ? A.ai.chat.appliedChange : j(A.ai.chat.appliedChanges, { count: e.operationCount });
|
|
248
|
-
}
|
|
249
|
-
function et(e) {
|
|
250
|
-
return e.failure ? D(e.failure.error, A.ai.errors, j, M, e.failure.context) : "";
|
|
251
|
-
}
|
|
252
|
-
function tt(e) {
|
|
253
|
-
e.undone ? E.feature.redoMessage(e.id) : E.feature.undoMessage(e.id);
|
|
254
|
-
}
|
|
255
|
-
function nt(e) {
|
|
256
|
-
Z(), N.value = e, $();
|
|
257
|
-
}
|
|
258
|
-
function rt(e) {
|
|
259
|
-
e.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), $());
|
|
260
|
-
}
|
|
261
|
-
return (e, n) => (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
|
-
}, [b(pe, {
|
|
269
|
-
title: _(A).ai.chat.title,
|
|
270
|
-
subtitle: _(A).ai.chat.notice,
|
|
271
|
-
testid: "ai-panel-chat",
|
|
272
|
-
"close-label": _(A).ai.chat.close,
|
|
273
|
-
onClose: n[5] ||= (e) => k("close")
|
|
274
|
-
}, {
|
|
275
|
-
actions: c(() => [t.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": _(A).ai.chat.newChat,
|
|
281
|
-
title: _(A).ai.chat.newChat,
|
|
282
|
-
disabled: Y.value,
|
|
283
|
-
onClick: n[0] ||= (e) => t.feature.newChat()
|
|
284
|
-
}, [b(_(ue), {
|
|
285
|
-
size: 14,
|
|
286
|
-
"stroke-width": 2,
|
|
287
|
-
"aria-hidden": "true"
|
|
288
|
-
})], 8, B)) : p("", !0)]),
|
|
289
|
-
footer: c(() => [h("div", ke, [
|
|
290
|
-
H.value ? (o(), l(v, { key: 0 }, [
|
|
291
|
-
h("input", {
|
|
292
|
-
ref_key: "fileInput",
|
|
293
|
-
ref: F,
|
|
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
|
-
I.value.length ? (o(), l("div", je, [(o(!0), l(v, null, i(I.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(), m(_(C), {
|
|
308
|
-
key: 0,
|
|
309
|
-
size: 12,
|
|
310
|
-
"aria-hidden": "true"
|
|
311
|
-
})) : (o(), m(_(w), {
|
|
312
|
-
key: 1,
|
|
313
|
-
size: 12,
|
|
314
|
-
"aria-hidden": "true"
|
|
315
|
-
})),
|
|
316
|
-
h("span", V, f(e.name), 1),
|
|
317
|
-
h("button", {
|
|
318
|
-
type: "button",
|
|
319
|
-
"aria-label": _(j)(_(A).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
|
-
}, [b(_(T), {
|
|
324
|
-
size: 12,
|
|
325
|
-
"aria-hidden": "true"
|
|
326
|
-
})], 8, Me)
|
|
327
|
-
]))), 128))])) : p("", !0),
|
|
328
|
-
I.value.length ? (o(), l("p", Ne, f(_(A).ai.import.placeholderNote), 1)) : p("", !0),
|
|
329
|
-
h("div", Pe, [(o(!0), l(v, null, i(L.value, (e, t) => (o(), l("p", {
|
|
330
|
-
key: t,
|
|
331
|
-
class: "tpl:mb-2"
|
|
332
|
-
}, f(e), 1))), 128))])
|
|
333
|
-
], 64)) : p("", !0),
|
|
334
|
-
t.feature.keptYourVersion.value ? (o(), l("div", Fe, [h("p", null, f(_(A).ai.chat.keptYourVersion), 1), h("button", {
|
|
335
|
-
type: "button",
|
|
336
|
-
disabled: Y.value,
|
|
337
|
-
class: y(_(O)),
|
|
338
|
-
onClick: n[1] ||= (e) => t.feature.reloadTemplate()
|
|
339
|
-
}, f(_(A).ai.chat.reload), 11, Ie)])) : p("", !0),
|
|
340
|
-
X.value ? (o(), l("div", Le, [b(_(ie), {
|
|
341
|
-
size: 14,
|
|
342
|
-
"stroke-width": 2,
|
|
343
|
-
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
344
|
-
"aria-hidden": "true"
|
|
345
|
-
}), h("span", null, f(X.value), 1)])) : p("", !0),
|
|
346
|
-
h("div", Re, [r(h("textarea", {
|
|
347
|
-
ref_key: "composer",
|
|
348
|
-
ref: P,
|
|
349
|
-
"onUpdate:modelValue": n[2] ||= (e) => N.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: _(A).ai.chat.inputPlaceholder,
|
|
353
|
-
"aria-label": _(A).ai.chat.inputPlaceholder,
|
|
354
|
-
disabled: Y.value,
|
|
355
|
-
maxlength: "4000",
|
|
356
|
-
rows: "3",
|
|
357
|
-
onKeydown: rt
|
|
358
|
-
}, null, 40, ze), [[ee, N.value]]), h("div", Be, [H.value ? (o(), l("button", {
|
|
359
|
-
key: 0,
|
|
360
|
-
type: "button",
|
|
361
|
-
"aria-label": _(A).ai.chat.attach,
|
|
362
|
-
title: _(A).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: n[3] ||= (e) => F.value?.click()
|
|
366
|
-
}, [b(_(ae), {
|
|
367
|
-
size: 16,
|
|
368
|
-
"aria-hidden": "true"
|
|
369
|
-
})], 8, Ve)) : p("", !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": _(A).ai.chat.stop,
|
|
375
|
-
title: _(A).ai.chat.stop,
|
|
376
|
-
onClick: n[4] ||= (e) => t.feature.stop()
|
|
377
|
-
}, [b(_(oe), {
|
|
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": _(A).ai.chat.send,
|
|
387
|
-
title: _(A).ai.chat.send,
|
|
388
|
-
disabled: !N.value.trim(),
|
|
389
|
-
onClick: $
|
|
390
|
-
}, [b(_(ce), {
|
|
391
|
-
size: 16,
|
|
392
|
-
"stroke-width": 2,
|
|
393
|
-
"aria-hidden": "true"
|
|
394
|
-
})], 8, Ue))])]),
|
|
395
|
-
h("p", We, f(_(A).ai.chat.disclaimer), 1)
|
|
396
|
-
])]),
|
|
397
|
-
default: c(() => [
|
|
398
|
-
H.value && R.value > 0 && !Y.value ? (o(), l("div", me, f(_(A).ai.chat.dropHint), 1)) : p("", !0),
|
|
399
|
-
h("div", {
|
|
400
|
-
ref_key: "messagesContainer",
|
|
401
|
-
ref: G,
|
|
402
|
-
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
403
|
-
}, [t.feature.isLoadingHistory.value ? (o(), l("div", he, [b(_(se), {
|
|
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, f(_(A).ai.chat.loadingHistory), 1)])) : J.value.length === 0 ? (o(), l("div", _e, [b(_(S), {
|
|
409
|
-
size: 32,
|
|
410
|
-
"stroke-width": 1.5,
|
|
411
|
-
class: "tpl:text-[var(--tpl-text-dim)]",
|
|
412
|
-
"aria-hidden": "true"
|
|
413
|
-
}), h("p", ve, f(_(A).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(f(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(), m(_(C), {
|
|
421
|
-
key: 0,
|
|
422
|
-
size: 12,
|
|
423
|
-
"aria-hidden": "true"
|
|
424
|
-
})) : (o(), m(_(w), {
|
|
425
|
-
key: 1,
|
|
426
|
-
size: 12,
|
|
427
|
-
"aria-hidden": "true"
|
|
428
|
-
})), u(f(e.name), 1)]))), 128))])) : (o(), l("div", xe, [
|
|
429
|
-
e.text === "" && e.status === "streaming" ? (o(), m(fe, { key: 0 })) : e.text === "" ? p("", !0) : (o(), l("div", Se, f(e.text), 1)),
|
|
430
|
-
e.operationCount > 0 ? (o(), l("div", Ce, [h("span", null, f($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: y(_(O)),
|
|
435
|
-
disabled: Y.value,
|
|
436
|
-
onClick: (t) => tt(e)
|
|
437
|
-
}, [e.undone ? (o(), m(_(de), {
|
|
438
|
-
key: 0,
|
|
439
|
-
size: 12,
|
|
440
|
-
"stroke-width": 2,
|
|
441
|
-
"aria-hidden": "true"
|
|
442
|
-
})) : (o(), m(_(le), {
|
|
443
|
-
key: 1,
|
|
444
|
-
size: 12,
|
|
445
|
-
"stroke-width": 2,
|
|
446
|
-
"aria-hidden": "true"
|
|
447
|
-
})), u(" " + f(e.undone ? _(A).ai.chat.redo : _(A).ai.chat.undo), 1)], 10, we)) : p("", !0)])) : p("", !0),
|
|
448
|
-
e.failure ? (o(), l("p", Te, f(et(e)), 1)) : p("", !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: y(["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
|
-
}, f(e), 11, Oe))), 128))])])) : p("", !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-DKDAaBNi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AiChatPanel-DKDAaBNi.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","nextTick","defineComponent","inject","withDirectives","renderList","renderSlot","openBlock","watch","withCtx","createElementBlock","createTextVNode","ref","toDisplayString","createCommentVNode","createBlock","createBaseVNode","vModelText","computed","unref","Fragment","normalizeClass","createVNode","useTimeoutFn","useIntervalFn","UI_LOCALE_KEY","useI18n","Sparkles","CircleAlert","Paperclip","Square","FileText","Image","LoaderCircle","Send","Undo2","X","MessageSquarePlus","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":";;;;;;;;;;;;;;;;;;;;;;;;EAWA,IAAMyF,IAAOD;E,kBAIX/E,EAAA,GAAAC,EA2CM,OAAA;GA1CJ,MAAK;GACJ,cAAYgF,EAAA;GACZ,eAAaA,EAAA;GACd,OAAM;;GAGN/E,EA+BM,OA/BNV,GA+BM,CA5BJU,EAcM,OAdNT,GAcM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