@templatical/editor 0.49.0 → 0.51.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 +4 -2
- package/dist/AiAltTextPopover-BZQ95GXL.js +106 -0
- package/dist/AiAltTextReview-DoBEudnE.js +206 -0
- package/dist/AiChatPanel-Bs6sES3b.js +550 -0
- package/dist/AiHeaderMenu-BEaTazx4.js +36 -0
- package/dist/AiPanels-CfN7A-ZA.js +33 -0
- package/dist/AiRewriteMenu-C3ZfDDYy.js +276 -0
- package/dist/{BlockIssueBadge-BdpJwim0.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
- package/dist/{BlockPreviewCanvas-D_sowkf0.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
- package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
- package/dist/{CloudPanels-1hwFiJ0G.js → CloudPanels-B4F5m7vy.js} +66 -85
- package/dist/{CollaborationNotices-BWpKzueF.js → CollaborationNotices-CNuDp7Y2.js} +19 -16
- package/dist/{CollaboratorBar-D87phJsw.js → CollaboratorBar-BtHPiuHq.js} +22 -22
- package/dist/{CommentsPanel-BUvUzO3T.js → CommentsPanel-CyCM-BvT.js} +4 -4
- package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
- package/dist/{cdn/chunks/CountdownBlock-DB4JNdqh.js → CountdownBlock-DR4Xm2-T.js} +24 -26
- package/dist/{CountdownToolbar-CLMIwfK7.js → CountdownToolbar-CEIMPojJ.js} +55 -55
- package/dist/IssuesPanel-C8nMUccy.js +360 -0
- package/dist/{LoadingTrack-BXOptf5g.js → LoadingTrack-B0RKQWq3.js} +2 -2
- package/dist/{LogicTagInsertButton-CR5E4jSG.js → LogicTagInsertButton-CqfU52CO.js} +273 -268
- package/dist/{cdn/chunks/MediaEditModal-DD0SZ-S3.js → MediaEditModal-DHtkZ4OU.js} +202 -186
- package/dist/{MediaPanels-BVXDkqtH.js → MediaPanels-CGcOB2pR.js} +4 -4
- package/dist/{MergeTagInput-BEw_r0PJ.js → MergeTagInput-YnEkorTZ.js} +25 -25
- package/dist/{MergeTagModeToggle-CJTpFmVd.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
- package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
- package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
- package/dist/{RestoreVersionDialog-BaDpy3cL.js → RestoreVersionDialog-Bq_IGOLJ.js} +21 -21
- package/dist/{RichTextEditorContent-CsvniFlI.js → RichTextEditorContent-AOM6fylS.js} +48 -48
- package/dist/{SaveBlockDialog-DzWURF_e.js → SaveBlockDialog-C8GngfQx.js} +87 -87
- package/dist/{cdn/chunks/SavedBlocksBrowserModal-BMtyUrUP.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
- package/dist/{SavedBlocksPanels-B3Af8ns2.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
- package/dist/{SavedBlocksPickBar-Dj11-Lqp.js → SavedBlocksPickBar-BjcTiV87.js} +13 -13
- package/dist/TemplateSettings-BVBWpiDU.js +237 -0
- package/dist/{TestEmailModal-BeRYV3eg.js → TestEmailModal-SyhO9bn3.js} +57 -57
- package/dist/{TestEmailPanel-B8c3fQi2.js → TestEmailPanel-BDd2Rtav.js} +4 -4
- package/dist/{TitleEditor-CvpNUoAp.js → TitleEditor-pxD53y_l.js} +75 -75
- package/dist/ToggleSwitch-D51U9cmR.js +37 -0
- package/dist/{Toolbar-BadDSkkF.js → Toolbar-CZSPZYbj.js} +1138 -1138
- package/dist/{TplModal-BZgi9Tes.js → TplModal-DCzBzicE.js} +19 -19
- package/dist/{VersionHistoryMenu-BRlcQ8wX.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
- package/dist/{VersionHistoryPanels-DGkllN3a.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
- package/dist/{VersionPreviewBanner-F-811aps.js → VersionPreviewBanner-DUGF0tUJ.js} +9 -9
- package/dist/WrapperBlock-BO619LAb.js +45 -0
- package/dist/aiErrors-D5UOoYOt.js +41 -0
- package/dist/aiImageContext-BH4Ss1h3.js +48 -0
- package/dist/aiRewritePreview-DLGM05Ge.js +44 -0
- package/dist/{blockTypeIcons-CayLluou.js → blockTypeIcons-NzaYvAI4.js} +15 -14
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-DSJwJ5ov.js → ca-C7mTzW1r.js} +130 -13
- package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js +107 -0
- package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js.map +1 -0
- package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js +207 -0
- package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js.map +1 -0
- package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js +476 -0
- package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js.map +1 -0
- package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js +37 -0
- package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js.map +1 -0
- package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js +34 -0
- package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js.map +1 -0
- package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js +208 -0
- package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
- package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js → BlockPreviewCanvas-D0--EQkP.js} +38 -38
- package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js.map → BlockPreviewCanvas-D0--EQkP.js.map} +1 -1
- package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js +25 -0
- package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js.map +1 -0
- package/dist/cdn/chunks/{CloudPanels-XufhBZYF.js → CloudPanels-C3jsxo_f.js} +52 -71
- package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
- package/dist/cdn/chunks/{CollaborationNotices-CBvKEj1Q.js → CollaborationNotices-DjRI8gvs.js} +23 -20
- package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js → CollaboratorBar-Dfzm6A9A.js} +20 -20
- package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js.map → CollaboratorBar-Dfzm6A9A.js.map} +1 -1
- package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
- package/dist/cdn/chunks/{CommentsPanel-R8YLLO3v.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
- package/dist/cdn/chunks/{CommentsSidebar-96NZHVq3.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
- package/dist/{CountdownBlock-DPQXWRvU.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
- package/dist/cdn/chunks/{CountdownBlock-DB4JNdqh.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js → CountdownToolbar-Cjud2Tos.js} +70 -70
- package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js.map → CountdownToolbar-Cjud2Tos.js.map} +1 -1
- package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js +340 -0
- package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js → LoadingTrack-BIcL4NiY.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BJ2t2vxC.js → LogicTagInsertButton-CsL2JDOG.js} +367 -362
- package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
- package/dist/{MediaEditModal-C_wxoUMG.js → cdn/chunks/MediaEditModal-BuHCiyMu.js} +544 -560
- package/dist/cdn/chunks/MediaEditModal-BuHCiyMu.js.map +1 -0
- package/dist/cdn/chunks/MediaPanels-DAgUf_T1.js +45 -0
- package/dist/cdn/chunks/{MediaPanels-CkdJ_kGp.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js → MergeTagInput-C8U-7LxL.js} +33 -33
- package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
- package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js.map → MergeTagModeToggle-Mm-p0A52.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js +72 -0
- package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js +634 -0
- package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js → RestoreVersionDialog-CdA5osuA.js} +25 -25
- package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
- package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js → SaveBlockDialog-CijargAy.js} +77 -77
- package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BMtyUrUP.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-s_gxi1im.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js → SavedBlocksPickBar-BPRaJBv3.js} +18 -18
- package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
- package/dist/cdn/chunks/{TemplateSettings-CtrzzQWl.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js → TestEmailModal-BUVTj3Ic.js} +54 -54
- package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
- package/dist/cdn/chunks/{TestEmailPanel-DERaCdpG.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
- package/dist/cdn/chunks/{TitleEditor-CEgxjtUX.js.map → TitleEditor-Ccv6uoTz.js.map} +1 -1
- package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js +39 -0
- package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js.map +1 -0
- package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js → Toolbar-DoprRgTn.js} +986 -987
- package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js.map → Toolbar-DoprRgTn.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-DDrbWJcE.js → TplModal-BXQzmsJX.js} +21 -21
- package/dist/cdn/chunks/{TplModal-DDrbWJcE.js.map → TplModal-BXQzmsJX.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
- package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
- package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-DVOV8QLv.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js → VersionPreviewBanner-BaGcn-b1.js} +12 -12
- package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
- package/dist/cdn/chunks/{WrapperBlock-CFuP4R0c.js.map → WrapperBlock-DkQJtLz0.js.map} +1 -1
- package/dist/cdn/chunks/aiErrors-D5UOoYOt.js +43 -0
- package/dist/cdn/chunks/aiErrors-D5UOoYOt.js.map +1 -0
- package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js +50 -0
- package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js.map +1 -0
- package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js +46 -0
- package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-BnAd8qsP.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
- package/dist/{ca-DSJwJ5ov.js → cdn/chunks/ca-C7mTzW1r.js} +132 -11
- package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CI_fgDyy.js → createCloudRuntime-DpBWhrv3.js} +489 -593
- package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js.map +1 -0
- package/dist/cdn/chunks/de-DBOTcDj2.js +22 -0
- package/dist/cdn/chunks/de-DBOTcDj2.js.map +1 -0
- package/dist/{de-CBE6O79z.js → cdn/chunks/de-DNuYQTmS.js} +132 -11
- package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
- package/dist/{dist-Bv_GBr2l.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
- package/dist/cdn/chunks/{dist-Doy3r07H.js.map → dist-Bo8Thh8v.js.map} +1 -1
- package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
- package/dist/cdn/chunks/{dist-DdwjXLme.js.map → dist-S-rLGqax.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-akeQH_JP.js → draggable-DZ0gwUJ6.js} +1822 -1728
- package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js → editor-modal-CI6EfeMd.js} +884 -884
- package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js.map → editor-modal-CI6EfeMd.js.map} +1 -1
- package/dist/cdn/chunks/en-CDhWRrF_.js +22 -0
- package/dist/cdn/chunks/en-CDhWRrF_.js.map +1 -0
- package/dist/{en-CDexnk0p.js → cdn/chunks/en-CW71OK66.js} +132 -11
- package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
- package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
- package/dist/{es-BE42B6uN.js → cdn/chunks/es-DdK7zQfi.js} +132 -11
- package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
- package/dist/cdn/chunks/{extensions-koOuDeZS.js → extensions-taJTZlLK.js} +59 -59
- package/dist/cdn/chunks/{extensions-koOuDeZS.js.map → extensions-taJTZlLK.js.map} +1 -1
- package/dist/{fr-DlJFPDQR.js → cdn/chunks/fr-Dz5Bgb7-.js} +132 -11
- package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
- package/dist/cdn/chunks/{icons-CjlNV8xD.js → icons-DNX6StSs.js} +178 -145
- package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
- package/dist/{ja-CUT8gkNI.js → cdn/chunks/ja-Di-zJiT8.js} +132 -11
- package/dist/cdn/chunks/ja-Di-zJiT8.js.map +1 -0
- package/dist/cdn/chunks/keys-BTpmg2Tt.js +12 -0
- package/dist/cdn/chunks/keys-BTpmg2Tt.js.map +1 -0
- package/dist/{logger-BBlvSn6q.js → cdn/chunks/logger-Tj0RPskW.js} +7 -1
- package/dist/cdn/chunks/logger-Tj0RPskW.js.map +1 -0
- package/dist/{nl-bXWqqRyS.js → cdn/chunks/nl-CvVuHYFL.js} +132 -11
- package/dist/cdn/chunks/{nl-bXWqqRyS.js.map → nl-CvVuHYFL.js.map} +1 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js.map → preRenderCustomBlocks-Dc-QLntG.js.map} +1 -1
- package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js +22 -0
- package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js.map +1 -0
- package/dist/{pt-BR-2_H4-wlb.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +132 -11
- package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +62 -0
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-BBvsTwCV.js +2032 -0
- package/dist/cdn/chunks/socialIcons-BBvsTwCV.js.map +1 -0
- package/dist/{dist-DBG3nh3k.js → cdn/chunks/src-BNFnxfrA.js} +552 -350
- package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
- package/dist/cdn/chunks/src-Bs_yxk3h.js +4392 -0
- package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
- package/dist/cdn/chunks/{src-B77z1iw4.js → src-K6fw_35b.js} +113 -113
- package/dist/cdn/chunks/{src-B77z1iw4.js.map → src-K6fw_35b.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-B1RfWFzB.js → tiptap-CtVrAViq.js} +43 -43
- package/dist/cdn/chunks/{tiptap-B1RfWFzB.js.map → tiptap-CtVrAViq.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js → useCloudI18n-AVXhzbhQ.js} +4 -4
- package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js.map → useCloudI18n-AVXhzbhQ.js.map} +1 -1
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +2586 -0
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-5SBqm90x.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DEqtEgOs.js → useI18n-CbVubQhM.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DEqtEgOs.js.map → useI18n-CbVubQhM.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js → useLogicTag-B49Nc53Y.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js → useMergeTag-B0KryMj8.js} +5 -5
- package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js → usePopoverPosition-C829ps5i.js} +4 -4
- package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js.map → usePopoverPosition-C829ps5i.js.map} +1 -1
- package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js +51 -0
- package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js.map +1 -0
- package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js → withCurrentFont-DFPXeVfG.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +2151 -1480
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-DQQzkmIC.js → check-yYsp5Xpk.js} +1 -1
- package/dist/{chevron-down-CIF4bdon.js → chevron-down-DTmD06_j.js} +1 -1
- package/dist/{chevron-right-Cg7Xu-ev.js → chevron-right-BSeYZOxc.js} +1 -1
- package/dist/{chevron-up-Csu7ISD-.js → chevron-up-BOApwrxi.js} +1 -1
- package/dist/{circle-alert-YUvIJAgY.js → circle-alert-BMszY8im.js} +1 -1
- package/dist/{clock-CnSIGKQW.js → clock-HADxnl6-.js} +1 -1
- package/dist/{cloud-YUYDtdHt.js → createCloudRuntime-DVQI_ReU.js} +474 -570
- package/dist/{createLucideIcon-BcP1sjdp.js → createLucideIcon-0lYYH3EW.js} +6 -6
- package/dist/de-DBOTcDj2.js +20 -0
- package/dist/{cdn/chunks/de-CBE6O79z.js → de-DNuYQTmS.js} +130 -13
- package/dist/{cdn/chunks/dist-Doy3r07H.js → dist-C7EtxNCb.js} +49 -51
- package/dist/{dist-CNqjHA8e.js → dist-C_dV9QAx.js} +130 -130
- package/dist/{cdn/chunks/dist-DdwjXLme.js → dist-DI4_YSnG.js} +111 -110
- package/dist/{cdn/chunks/src-CvLTYGdO.js → dist-DtOF3bDW.js} +446 -393
- package/dist/{editor-modal--7_9A6j-.js → editor-modal-Bzhl-PgI.js} +832 -834
- package/dist/en-CDhWRrF_.js +20 -0
- package/dist/{cdn/chunks/en-CDexnk0p.js → en-CW71OK66.js} +130 -13
- package/dist/en-DwV15ltA.js +1 -0
- package/dist/{cdn/chunks/es-BE42B6uN.js → es-DdK7zQfi.js} +130 -13
- package/dist/{extensions-zwsZlWjH.js → extensions-CdyweA50.js} +57 -57
- package/dist/{eye-B1bua-ck.js → eye-DWkSvYpj.js} +1 -1
- package/dist/{cdn/chunks/fr-DlJFPDQR.js → fr-Dz5Bgb7-.js} +130 -13
- package/dist/image-DesWjcZ4.js +28 -0
- package/dist/index.d.ts +361 -24
- package/dist/{info-x26nGOo2.js → info-ClWJGoZy.js} +1 -1
- package/dist/{cdn/chunks/ja-CUT8gkNI.js → ja-Di-zJiT8.js} +130 -13
- package/dist/keys-Zd9KWRD1.js +10 -0
- package/dist/{link-CezhndyR.js → link-BqRicFTA.js} +1 -1
- package/dist/{list-DQqdptI0.js → list-bojQr9bn.js} +1 -1
- package/dist/{loader-circle-DCEeoYoi.js → loader-circle-B2B8LbUu.js} +1 -1
- package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
- package/dist/{message-circle-BLGzfv_7.js → message-circle-BEuiNsyZ.js} +1 -1
- package/dist/{cdn/chunks/nl-bXWqqRyS.js → nl-CvVuHYFL.js} +130 -13
- package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
- package/dist/{package-D_kEQCMU.js → package-DCROB4aM.js} +1 -1
- package/dist/{pencil-Dct8zGLy.js → pencil-CEotCKbf.js} +1 -1
- package/dist/{preRenderCustomBlocks-CtKJecE-.js → preRenderCustomBlocks-D8rr61_z.js} +4 -4
- package/dist/pt-BR-CHM-ZKvE.js +20 -0
- package/dist/{cdn/chunks/pt-BR-2_H4-wlb.js → pt-BR-ZhO4vgyq.js} +130 -13
- package/dist/{refresh-cw-tGMRDxr8.js → refresh-cw-C6M2mHNC.js} +12 -2
- package/dist/{runtime-dom.esm-bundler-DYn1z2Xf.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
- package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
- package/dist/{search-Bm2cCQpe.js → search-Cy99zPYf.js} +1 -1
- package/dist/{send-sVLaKZ7f.js → send-BDLJFsf3.js} +1 -1
- package/dist/{smartphone-B2W81p02.js → smartphone-CVvQaNA4.js} +1 -1
- package/dist/{cdn/chunks/socialIcons-CkZSYpoG.js → socialIcons-Dd-jRiVe.js} +688 -693
- package/dist/{sparkles-a1qkBZ8X.js → sparkles-Ce0Qz0ox.js} +1 -1
- package/dist/square-BWlolnXe.js +15 -0
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +2114 -1422
- package/dist/{text-align-start-CTuwQ5YW.js → text-align-start-D1V5gPTy.js} +1 -1
- package/dist/{trash-I3D2peFQ.js → trash-CZfiUFmw.js} +1 -1
- package/dist/{triangle-alert-CenxmLRE.js → triangle-alert-CFDzyFC7.js} +1 -1
- package/dist/upload-BJfvdIrD.js +36 -0
- package/dist/{useCloudI18n-CGVEZV3o.js → useCloudI18n-Dcjua65H.js} +5 -5
- package/dist/{useEditorCore-DRbMRe8F.js → useEditorCore-BTLeAVlM.js} +1463 -1499
- package/dist/{useEditorRoot-BVm2-1N8.js → useEditorRoot-DUy67lJu.js} +2 -2
- package/dist/{useI18n-CSh4gO5c.js → useI18n-BdoY7xDE.js} +4 -4
- package/dist/{useLogicTag-zcI6BWIf.js → useLogicTag-DKLZ1T9H.js} +3 -3
- package/dist/{useMergeTag-C-iBLlp0.js → useMergeTag-Bhdx7AKk.js} +3 -3
- package/dist/{usePopoverPosition-CMcsMBtK.js → usePopoverPosition-BZea45XK.js} +2 -2
- package/dist/useScrollToBlock-FmNMALM_.js +74 -0
- package/dist/{vue.runtime.esm-bundler-DV0Wx4r_.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1428 -1332
- package/dist/{withCurrentFont-D62njRLu.js → withCurrentFont-BATJHNve.js} +1 -1
- package/dist/{x-KFQ4S-Kz.js → x-CZ0Js0hA.js} +1 -1
- package/package.json +14 -12
- package/dist/AiChatSidebar-CdjTb9ej.js +0 -230
- package/dist/AiFeatureMenu-DKm7VYCs.js +0 -57
- package/dist/CloudHeaderExtras-CI8RR9hG.js +0 -55
- package/dist/CommentsSidebar-J65znlrH.js +0 -500
- package/dist/DesignReferenceSidebar-BTwCFgz8.js +0 -279
- package/dist/IssuesPanel-DeeVsfG7.js +0 -117
- package/dist/ParagraphEditor-zLV44z-R.js +0 -797
- package/dist/SavedBlocksBrowserModal-B8DCFW7t.js +0 -360
- package/dist/TemplateScoringPanel-Ba9sgvjS.js +0 -273
- package/dist/TemplateSettings-Cu5X9DgA.js +0 -246
- package/dist/ToggleSwitch-DHweVJOr.js +0 -102
- package/dist/WrapperBlock-DiiaxpMb.js +0 -45
- package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js +0 -205
- package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js +0 -57
- package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js.map +0 -1
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js +0 -56
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +0 -1
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-R8YLLO3v.js +0 -20
- package/dist/cdn/chunks/CommentsSidebar-96NZHVq3.js +0 -470
- package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js +0 -229
- package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js +0 -100
- package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-BJ2t2vxC.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-DD0SZ-S3.js.map +0 -1
- package/dist/cdn/chunks/MediaPanels-CkdJ_kGp.js +0 -45
- package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js +0 -632
- package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-s_gxi1im.js +0 -38
- package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js +0 -237
- package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-CtrzzQWl.js +0 -208
- package/dist/cdn/chunks/TestEmailPanel-DERaCdpG.js +0 -35
- package/dist/cdn/chunks/TitleEditor-CEgxjtUX.js +0 -199
- package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js +0 -104
- package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryPanels-DVOV8QLv.js +0 -48
- package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +0 -47
- package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +0 -22
- package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +0 -1
- package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js +0 -358
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +0 -1
- package/dist/cdn/chunks/de-CBE6O79z.js.map +0 -1
- package/dist/cdn/chunks/de-D_atmUVB.js +0 -89
- package/dist/cdn/chunks/de-D_atmUVB.js.map +0 -1
- package/dist/cdn/chunks/draggable-akeQH_JP.js.map +0 -1
- package/dist/cdn/chunks/en-CDexnk0p.js.map +0 -1
- package/dist/cdn/chunks/en-DhJLnaBx.js +0 -89
- package/dist/cdn/chunks/en-DhJLnaBx.js.map +0 -1
- package/dist/cdn/chunks/en-Ve-PWSXu.js +0 -1
- package/dist/cdn/chunks/es-BE42B6uN.js.map +0 -1
- package/dist/cdn/chunks/fr-DlJFPDQR.js.map +0 -1
- package/dist/cdn/chunks/icons-CjlNV8xD.js.map +0 -1
- package/dist/cdn/chunks/ja-CUT8gkNI.js.map +0 -1
- package/dist/cdn/chunks/keys-UAWhQ3zW.js +0 -12
- package/dist/cdn/chunks/keys-UAWhQ3zW.js.map +0 -1
- package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BphMoUTw.js +0 -89
- package/dist/cdn/chunks/pt-BR-BphMoUTw.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +0 -1
- package/dist/cdn/chunks/src-B1e5SSYP.js +0 -1272
- package/dist/cdn/chunks/src-B1e5SSYP.js.map +0 -1
- package/dist/cdn/chunks/src-CvLTYGdO.js.map +0 -1
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js +0 -6
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +0 -1
- package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js +0 -12
- package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js +0 -2623
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +0 -10
- package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js +0 -21
- package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js.map +0 -1
- package/dist/copy-CUC43md_.js +0 -19
- package/dist/createCloudRuntime-BMDRjL0k.js +0 -356
- package/dist/de-D_atmUVB.js +0 -87
- package/dist/dist-CCqn-RqE.js +0 -407
- package/dist/en-BHCMzqib.js +0 -1
- package/dist/en-DhJLnaBx.js +0 -87
- package/dist/image-up-BqiO7KCO.js +0 -27
- package/dist/keys-BymCnLHD.js +0 -10
- package/dist/plus-BDd0gTEm.js +0 -14
- package/dist/pt-BR-BphMoUTw.js +0 -87
- package/dist/shield-check-YhsbXfQc.js +0 -14
- package/dist/socialIcons-Bwv-49EB.js +0 -2167
- package/dist/timeouts-o5Y9BuqI.js +0 -4
- package/dist/upload-uU2cK0Ce.js +0 -21
- package/dist/useAliveFlag-BjP0Gxza.js +0 -10
- package/dist/useScrollToBlock-CdCQK9QQ.js +0 -47
|
@@ -0,0 +1,476 @@
|
|
|
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-DZ0gwUJ6.js";
|
|
2
|
+
import { _ as ne, g as b } from "./dist-Bo8Thh8v.js";
|
|
3
|
+
import { X as re } from "./keys-BTpmg2Tt.js";
|
|
4
|
+
import { t as ie } from "./useI18n-CbVubQhM.js";
|
|
5
|
+
import { D as x, K as ae, Pt as oe, T as se, ht as S, j as ce, l as le, ot as ue, t as C, tt as de, wt as w, z as fe } from "./icons-DNX6StSs.js";
|
|
6
|
+
import { t as pe } from "./LoadingTrack-BIcL4NiY.js";
|
|
7
|
+
import { t as T } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
8
|
+
import { n as E } from "./aiErrors-D5UOoYOt.js";
|
|
9
|
+
import { S as D } from "./styleConstants-v1dNKgJf.js";
|
|
10
|
+
//#region 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
|
+
//#endregion
|
|
74
|
+
//#region src/components/ai/AiChatPanel.vue?vue&type=script&setup=true&lang.ts
|
|
75
|
+
var B = [
|
|
76
|
+
"aria-label",
|
|
77
|
+
"title",
|
|
78
|
+
"disabled"
|
|
79
|
+
], me = {
|
|
80
|
+
key: 0,
|
|
81
|
+
"data-testid": "ai-chat-drop-hint",
|
|
82
|
+
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"
|
|
83
|
+
}, he = {
|
|
84
|
+
key: 0,
|
|
85
|
+
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
86
|
+
}, ge = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, _e = {
|
|
87
|
+
key: 1,
|
|
88
|
+
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
89
|
+
}, ve = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ye = {
|
|
90
|
+
key: 2,
|
|
91
|
+
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
92
|
+
}, be = {
|
|
93
|
+
key: 0,
|
|
94
|
+
"data-testid": "ai-chat-prompt",
|
|
95
|
+
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",
|
|
96
|
+
style: {
|
|
97
|
+
"background-color": "var(--tpl-primary-light)",
|
|
98
|
+
color: "var(--tpl-text)",
|
|
99
|
+
"max-width": "85%",
|
|
100
|
+
"box-shadow": "var(--tpl-shadow)"
|
|
101
|
+
}
|
|
102
|
+
}, xe = {
|
|
103
|
+
key: 1,
|
|
104
|
+
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
105
|
+
}, Se = {
|
|
106
|
+
key: 1,
|
|
107
|
+
"data-testid": "ai-chat-reply",
|
|
108
|
+
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
109
|
+
style: {
|
|
110
|
+
"max-width": "85%",
|
|
111
|
+
"background-color": "var(--tpl-bg)",
|
|
112
|
+
color: "var(--tpl-text)",
|
|
113
|
+
"box-shadow": "var(--tpl-shadow)"
|
|
114
|
+
}
|
|
115
|
+
}, Ce = {
|
|
116
|
+
key: 2,
|
|
117
|
+
"data-testid": "ai-chat-applied",
|
|
118
|
+
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
119
|
+
}, we = ["disabled", "onClick"], Te = {
|
|
120
|
+
key: 3,
|
|
121
|
+
role: "alert",
|
|
122
|
+
"data-testid": "ai-chat-item-error",
|
|
123
|
+
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
124
|
+
}, Ee = {
|
|
125
|
+
key: 1,
|
|
126
|
+
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
127
|
+
style: {
|
|
128
|
+
"background-color": "color-mix(in srgb, var(--tpl-bg) 50%, transparent)",
|
|
129
|
+
"backdrop-filter": "blur(2px)"
|
|
130
|
+
}
|
|
131
|
+
}, 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 = {
|
|
132
|
+
key: 0,
|
|
133
|
+
class: "tpl:mb-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
134
|
+
}, Me = { class: "tpl:truncate" }, Ne = [
|
|
135
|
+
"aria-label",
|
|
136
|
+
"disabled",
|
|
137
|
+
"onClick"
|
|
138
|
+
], Pe = {
|
|
139
|
+
key: 1,
|
|
140
|
+
class: "tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
141
|
+
}, V = {
|
|
142
|
+
"aria-live": "polite",
|
|
143
|
+
class: "tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
144
|
+
}, Fe = {
|
|
145
|
+
key: 1,
|
|
146
|
+
role: "status",
|
|
147
|
+
class: "tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
148
|
+
}, Ie = ["disabled"], Le = {
|
|
149
|
+
key: 2,
|
|
150
|
+
role: "alert",
|
|
151
|
+
"data-testid": "ai-chat-error",
|
|
152
|
+
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",
|
|
153
|
+
style: {
|
|
154
|
+
"background-color": "var(--tpl-danger-light)",
|
|
155
|
+
color: "var(--tpl-danger)"
|
|
156
|
+
}
|
|
157
|
+
}, 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 = [
|
|
158
|
+
"placeholder",
|
|
159
|
+
"aria-label",
|
|
160
|
+
"disabled"
|
|
161
|
+
], Be = { class: "tpl:flex tpl:items-center tpl:justify-between" }, Ve = [
|
|
162
|
+
"aria-label",
|
|
163
|
+
"title",
|
|
164
|
+
"disabled"
|
|
165
|
+
], He = ["aria-label", "title"], Ue = [
|
|
166
|
+
"aria-label",
|
|
167
|
+
"title",
|
|
168
|
+
"disabled"
|
|
169
|
+
], 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({
|
|
170
|
+
__name: "AiChatPanel",
|
|
171
|
+
props: { feature: {} },
|
|
172
|
+
emits: ["close"],
|
|
173
|
+
setup(n, { emit: a }) {
|
|
174
|
+
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);
|
|
175
|
+
c(() => T.feature.templateSession.value, () => {
|
|
176
|
+
M.value = "", F.value = [], I.value = [], R.value = 0;
|
|
177
|
+
}, { flush: "sync" });
|
|
178
|
+
let H = _(() => T.feature.has("chatAttachments"));
|
|
179
|
+
function U(e) {
|
|
180
|
+
let t = z(F.value, e);
|
|
181
|
+
F.value = t.accepted;
|
|
182
|
+
let n = {
|
|
183
|
+
tooMany: "attachTooMany",
|
|
184
|
+
tooLarge: "attachTooLarge",
|
|
185
|
+
totalTooLarge: "attachTotalTooLarge",
|
|
186
|
+
wrongType: "attachWrongType"
|
|
187
|
+
};
|
|
188
|
+
I.value = t.errors.map((e) => A(k.ai.chat[n[e.reason]], { name: e.name }));
|
|
189
|
+
}
|
|
190
|
+
function Ge(e) {
|
|
191
|
+
let t = e.target;
|
|
192
|
+
!Y.value && H.value && U(Array.from(t.files ?? [])), t.value = "";
|
|
193
|
+
}
|
|
194
|
+
function Ke(e) {
|
|
195
|
+
Y.value || (F.value.splice(e, 1), I.value = []);
|
|
196
|
+
}
|
|
197
|
+
function W(e) {
|
|
198
|
+
return Array.from(e.dataTransfer?.types ?? []).includes("Files");
|
|
199
|
+
}
|
|
200
|
+
function qe(e) {
|
|
201
|
+
H.value && !Y.value && W(e) && (e.preventDefault(), R.value++);
|
|
202
|
+
}
|
|
203
|
+
function Je(e) {
|
|
204
|
+
W(e) && (R.value = Math.max(0, R.value - 1));
|
|
205
|
+
}
|
|
206
|
+
function Ye(e) {
|
|
207
|
+
H.value && W(e) && e.preventDefault();
|
|
208
|
+
}
|
|
209
|
+
function Xe(e) {
|
|
210
|
+
R.value = 0, H.value && W(e) && (e.preventDefault(), Y.value || U(Array.from(e.dataTransfer?.files ?? [])));
|
|
211
|
+
}
|
|
212
|
+
c(() => T.feature.importQueue.value, (e) => {
|
|
213
|
+
H.value && e.length && (U(e), M.value.trim() || (M.value = k.ai.import.prompt), T.feature.importQueue.value = [], t(() => N.value?.focus()));
|
|
214
|
+
}, { immediate: !0 });
|
|
215
|
+
let G = e(null), K = e(0), q = _(() => T.feature.isTemplateEmpty.value ? [
|
|
216
|
+
k.ai.starters.emptyWelcome,
|
|
217
|
+
k.ai.starters.emptyLaunch,
|
|
218
|
+
k.ai.starters.emptyNewsletter
|
|
219
|
+
] : [
|
|
220
|
+
k.ai.starters.filledShorten,
|
|
221
|
+
k.ai.starters.filledFriendlier,
|
|
222
|
+
k.ai.starters.filledDates,
|
|
223
|
+
k.ai.starters.filledCta
|
|
224
|
+
]), J = _(() => T.feature.messages.value), Y = _(() => T.feature.isRunning.value), X = _(() => {
|
|
225
|
+
let e = T.feature.failure.value;
|
|
226
|
+
return e ? E(e.error, k.ai.errors, A, j, e.context) : "";
|
|
227
|
+
}), { pause: Z, resume: Ze } = b(() => {
|
|
228
|
+
K.value < q.value.length ? K.value++ : Z();
|
|
229
|
+
}, 150, { immediate: !1 }), { start: Qe } = ne(() => Ze(), 100, { immediate: !1 });
|
|
230
|
+
c(() => q.value.length, (e) => {
|
|
231
|
+
Z(), K.value = 0, e > 0 && Qe();
|
|
232
|
+
}, { immediate: !0 });
|
|
233
|
+
function Q() {
|
|
234
|
+
t(() => {
|
|
235
|
+
G.value && (G.value.scrollTop = G.value.scrollHeight);
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
c(() => J.value.length, Q), c(() => [T.feature.failedPrompt.value, T.feature.failedAttachments.value], ([e, t]) => {
|
|
239
|
+
e && (M.value = e, F.value = [...t]);
|
|
240
|
+
}, { immediate: !0 });
|
|
241
|
+
async function $() {
|
|
242
|
+
let e = M.value.trim();
|
|
243
|
+
if (!e || Y.value) return;
|
|
244
|
+
let t = [...F.value];
|
|
245
|
+
M.value = "", F.value = [], I.value = [], Q(), await T.feature.send(e, t), Q();
|
|
246
|
+
}
|
|
247
|
+
function $e(e) {
|
|
248
|
+
return e.undone ? k.ai.chat.undone : e.operationCount === 1 ? k.ai.chat.appliedChange : A(k.ai.chat.appliedChanges, { count: e.operationCount });
|
|
249
|
+
}
|
|
250
|
+
function et(e) {
|
|
251
|
+
return e.failure ? E(e.failure.error, k.ai.errors, A, j, e.failure.context) : "";
|
|
252
|
+
}
|
|
253
|
+
function tt(e) {
|
|
254
|
+
e.undone ? T.feature.redoMessage(e.id) : T.feature.undoMessage(e.id);
|
|
255
|
+
}
|
|
256
|
+
function nt(e) {
|
|
257
|
+
Z(), M.value = e, $();
|
|
258
|
+
}
|
|
259
|
+
function rt(e) {
|
|
260
|
+
e.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), $());
|
|
261
|
+
}
|
|
262
|
+
return (e, t) => (o(), l("div", {
|
|
263
|
+
class: "tpl:contents",
|
|
264
|
+
"data-testid": "ai-chat-dropzone",
|
|
265
|
+
onDragenter: qe,
|
|
266
|
+
onDragleave: Je,
|
|
267
|
+
onDragover: Ye,
|
|
268
|
+
onDrop: Xe
|
|
269
|
+
}, [y(L, {
|
|
270
|
+
title: g(k).ai.chat.title,
|
|
271
|
+
subtitle: g(k).ai.chat.notice,
|
|
272
|
+
testid: "ai-panel-chat",
|
|
273
|
+
"close-label": g(k).ai.chat.close,
|
|
274
|
+
onClose: t[5] ||= (e) => O("close")
|
|
275
|
+
}, {
|
|
276
|
+
actions: s(() => [n.feature.canClear && J.value.length > 0 ? (o(), l("button", {
|
|
277
|
+
key: 0,
|
|
278
|
+
type: "button",
|
|
279
|
+
"data-testid": "ai-chat-new",
|
|
280
|
+
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)] tpl:disabled:opacity-40",
|
|
281
|
+
"aria-label": g(k).ai.chat.newChat,
|
|
282
|
+
title: g(k).ai.chat.newChat,
|
|
283
|
+
disabled: Y.value,
|
|
284
|
+
onClick: t[0] ||= (e) => n.feature.newChat()
|
|
285
|
+
}, [y(g(de), {
|
|
286
|
+
size: 14,
|
|
287
|
+
"stroke-width": 2,
|
|
288
|
+
"aria-hidden": "true"
|
|
289
|
+
})], 8, B)) : f("", !0)]),
|
|
290
|
+
footer: s(() => [h("div", ke, [
|
|
291
|
+
H.value ? (o(), l(v, { key: 0 }, [
|
|
292
|
+
h("input", {
|
|
293
|
+
ref_key: "fileInput",
|
|
294
|
+
ref: P,
|
|
295
|
+
"data-testid": "ai-chat-files",
|
|
296
|
+
type: "file",
|
|
297
|
+
multiple: "",
|
|
298
|
+
accept: "image/png,image/jpeg,image/webp,image/gif,application/pdf",
|
|
299
|
+
hidden: "",
|
|
300
|
+
disabled: Y.value,
|
|
301
|
+
onChange: Ge
|
|
302
|
+
}, null, 40, Ae),
|
|
303
|
+
F.value.length ? (o(), l("div", je, [(o(!0), l(v, null, i(F.value, (e, t) => (o(), l("span", {
|
|
304
|
+
key: t,
|
|
305
|
+
"data-testid": "ai-chat-attachment",
|
|
306
|
+
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)]"
|
|
307
|
+
}, [
|
|
308
|
+
e.type === "application/pdf" ? (o(), p(g(w), {
|
|
309
|
+
key: 0,
|
|
310
|
+
size: 12,
|
|
311
|
+
"aria-hidden": "true"
|
|
312
|
+
})) : (o(), p(g(S), {
|
|
313
|
+
key: 1,
|
|
314
|
+
size: 12,
|
|
315
|
+
"aria-hidden": "true"
|
|
316
|
+
})),
|
|
317
|
+
h("span", Me, d(e.name), 1),
|
|
318
|
+
h("button", {
|
|
319
|
+
type: "button",
|
|
320
|
+
"aria-label": g(A)(g(k).ai.chat.removeAttachment, { name: e.name }),
|
|
321
|
+
disabled: Y.value,
|
|
322
|
+
class: "tpl:shrink-0 tpl:rounded tpl:p-0.5 tpl:disabled:opacity-40",
|
|
323
|
+
onClick: (e) => Ke(t)
|
|
324
|
+
}, [y(g(C), {
|
|
325
|
+
size: 12,
|
|
326
|
+
"aria-hidden": "true"
|
|
327
|
+
})], 8, Ne)
|
|
328
|
+
]))), 128))])) : f("", !0),
|
|
329
|
+
F.value.length ? (o(), l("p", Pe, d(g(k).ai.import.placeholderNote), 1)) : f("", !0),
|
|
330
|
+
h("div", V, [(o(!0), l(v, null, i(I.value, (e, t) => (o(), l("p", {
|
|
331
|
+
key: t,
|
|
332
|
+
class: "tpl:mb-2"
|
|
333
|
+
}, d(e), 1))), 128))])
|
|
334
|
+
], 64)) : f("", !0),
|
|
335
|
+
n.feature.keptYourVersion.value ? (o(), l("div", Fe, [h("p", null, d(g(k).ai.chat.keptYourVersion), 1), h("button", {
|
|
336
|
+
type: "button",
|
|
337
|
+
disabled: Y.value,
|
|
338
|
+
class: m(g(D)),
|
|
339
|
+
onClick: t[1] ||= (e) => n.feature.reloadTemplate()
|
|
340
|
+
}, d(g(k).ai.chat.reload), 11, Ie)])) : f("", !0),
|
|
341
|
+
X.value ? (o(), l("div", Le, [y(g(oe), {
|
|
342
|
+
size: 14,
|
|
343
|
+
"stroke-width": 2,
|
|
344
|
+
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
345
|
+
"aria-hidden": "true"
|
|
346
|
+
}), h("span", null, d(X.value), 1)])) : f("", !0),
|
|
347
|
+
h("div", Re, [ee(h("textarea", {
|
|
348
|
+
ref_key: "composer",
|
|
349
|
+
ref: N,
|
|
350
|
+
"onUpdate:modelValue": t[2] ||= (e) => M.value = e,
|
|
351
|
+
"data-testid": "ai-chat-input",
|
|
352
|
+
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)]",
|
|
353
|
+
placeholder: g(k).ai.chat.inputPlaceholder,
|
|
354
|
+
"aria-label": g(k).ai.chat.inputPlaceholder,
|
|
355
|
+
disabled: Y.value,
|
|
356
|
+
maxlength: "4000",
|
|
357
|
+
rows: "3",
|
|
358
|
+
onKeydown: rt
|
|
359
|
+
}, null, 40, ze), [[te, M.value]]), h("div", Be, [H.value ? (o(), l("button", {
|
|
360
|
+
key: 0,
|
|
361
|
+
type: "button",
|
|
362
|
+
"aria-label": g(k).ai.chat.attach,
|
|
363
|
+
title: g(k).ai.chat.attach,
|
|
364
|
+
disabled: Y.value,
|
|
365
|
+
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",
|
|
366
|
+
onClick: t[3] ||= (e) => P.value?.click()
|
|
367
|
+
}, [y(g(ae), {
|
|
368
|
+
size: 16,
|
|
369
|
+
"aria-hidden": "true"
|
|
370
|
+
})], 8, Ve)) : f("", !0), Y.value ? (o(), l("button", {
|
|
371
|
+
key: 1,
|
|
372
|
+
type: "button",
|
|
373
|
+
"data-testid": "ai-chat-stop",
|
|
374
|
+
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)]",
|
|
375
|
+
"aria-label": g(k).ai.chat.stop,
|
|
376
|
+
title: g(k).ai.chat.stop,
|
|
377
|
+
onClick: t[4] ||= (e) => n.feature.stop()
|
|
378
|
+
}, [y(g(se), {
|
|
379
|
+
size: 16,
|
|
380
|
+
"stroke-width": 2,
|
|
381
|
+
"aria-hidden": "true"
|
|
382
|
+
})], 8, He)) : (o(), l("button", {
|
|
383
|
+
key: 2,
|
|
384
|
+
type: "button",
|
|
385
|
+
"data-testid": "ai-chat-send",
|
|
386
|
+
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)]",
|
|
387
|
+
"aria-label": g(k).ai.chat.send,
|
|
388
|
+
title: g(k).ai.chat.send,
|
|
389
|
+
disabled: !M.value.trim(),
|
|
390
|
+
onClick: $
|
|
391
|
+
}, [y(g(ce), {
|
|
392
|
+
size: 16,
|
|
393
|
+
"stroke-width": 2,
|
|
394
|
+
"aria-hidden": "true"
|
|
395
|
+
})], 8, Ue))])]),
|
|
396
|
+
h("p", We, d(g(k).ai.chat.disclaimer), 1)
|
|
397
|
+
])]),
|
|
398
|
+
default: s(() => [
|
|
399
|
+
H.value && R.value > 0 && !Y.value ? (o(), l("div", me, d(g(k).ai.chat.dropHint), 1)) : f("", !0),
|
|
400
|
+
h("div", {
|
|
401
|
+
ref_key: "messagesContainer",
|
|
402
|
+
ref: G,
|
|
403
|
+
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
404
|
+
}, [n.feature.isLoadingHistory.value ? (o(), l("div", he, [y(g(ue), {
|
|
405
|
+
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
406
|
+
size: 24,
|
|
407
|
+
"stroke-width": 2,
|
|
408
|
+
"aria-hidden": "true"
|
|
409
|
+
}), h("p", ge, d(g(k).ai.chat.loadingHistory), 1)])) : J.value.length === 0 ? (o(), l("div", _e, [y(g(x), {
|
|
410
|
+
size: 32,
|
|
411
|
+
"stroke-width": 1.5,
|
|
412
|
+
class: "tpl:text-[var(--tpl-text-dim)]",
|
|
413
|
+
"aria-hidden": "true"
|
|
414
|
+
}), 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", {
|
|
415
|
+
key: e.id,
|
|
416
|
+
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
417
|
+
}, [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", {
|
|
418
|
+
key: t,
|
|
419
|
+
"data-testid": "ai-chat-history-attachment",
|
|
420
|
+
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"
|
|
421
|
+
}, [e.kind === "pdf" ? (o(), p(g(w), {
|
|
422
|
+
key: 0,
|
|
423
|
+
size: 12,
|
|
424
|
+
"aria-hidden": "true"
|
|
425
|
+
})) : (o(), p(g(S), {
|
|
426
|
+
key: 1,
|
|
427
|
+
size: 12,
|
|
428
|
+
"aria-hidden": "true"
|
|
429
|
+
})), u(d(e.name), 1)]))), 128))])) : (o(), l("div", xe, [
|
|
430
|
+
e.text === "" && e.status === "streaming" ? (o(), p(pe, { key: 0 })) : e.text === "" ? f("", !0) : (o(), l("div", Se, d(e.text), 1)),
|
|
431
|
+
e.operationCount > 0 ? (o(), l("div", Ce, [h("span", null, d($e(e)), 1), (e.undone ? e.canRedo : e.canUndo) ? (o(), l("button", {
|
|
432
|
+
key: 0,
|
|
433
|
+
type: "button",
|
|
434
|
+
"data-testid": "ai-chat-undo",
|
|
435
|
+
class: m(g(D)),
|
|
436
|
+
disabled: Y.value,
|
|
437
|
+
onClick: (t) => tt(e)
|
|
438
|
+
}, [e.undone ? (o(), p(g(fe), {
|
|
439
|
+
key: 0,
|
|
440
|
+
size: 12,
|
|
441
|
+
"stroke-width": 2,
|
|
442
|
+
"aria-hidden": "true"
|
|
443
|
+
})) : (o(), p(g(le), {
|
|
444
|
+
key: 1,
|
|
445
|
+
size: 12,
|
|
446
|
+
"stroke-width": 2,
|
|
447
|
+
"aria-hidden": "true"
|
|
448
|
+
})), u(" " + d(e.undone ? g(k).ai.chat.redo : g(k).ai.chat.undo), 1)], 10, we)) : f("", !0)])) : f("", !0),
|
|
449
|
+
e.failure ? (o(), l("p", Te, d(et(e)), 1)) : f("", !0)
|
|
450
|
+
]))]))), 128))]))], 512),
|
|
451
|
+
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", {
|
|
452
|
+
key: t,
|
|
453
|
+
type: "button",
|
|
454
|
+
"data-testid": "ai-chat-starter",
|
|
455
|
+
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"]),
|
|
456
|
+
style: {
|
|
457
|
+
"border-color": "var(--tpl-border)",
|
|
458
|
+
color: "var(--tpl-primary)",
|
|
459
|
+
"background-color": "var(--tpl-bg)",
|
|
460
|
+
"box-shadow": "var(--tpl-shadow)"
|
|
461
|
+
},
|
|
462
|
+
onClick: (t) => nt(e)
|
|
463
|
+
}, d(e), 11, Oe))), 128))])])) : f("", !0)
|
|
464
|
+
]),
|
|
465
|
+
_: 1
|
|
466
|
+
}, 8, [
|
|
467
|
+
"title",
|
|
468
|
+
"subtitle",
|
|
469
|
+
"close-label"
|
|
470
|
+
])], 32));
|
|
471
|
+
}
|
|
472
|
+
}), [["__scopeId", "data-v-e0f79f23"]]);
|
|
473
|
+
//#endregion
|
|
474
|
+
export { H as default };
|
|
475
|
+
|
|
476
|
+
//# sourceMappingURL=AiChatPanel-BYqn1bKu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiChatPanel-BYqn1bKu.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","Image","Send","Undo2","LoaderCircle","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":";;;;;;;;;;;;;;;;;;;;;;;;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,CAbJS,EAKM,OALNR,GAKM,CAFJS,EAA4DC,EAAAiD,CAAA,GAAA;IAAjD,MAAM;IAAK,gBAAc;IAAG,eAAY;G,IACnDnD,EAAqD,QAArDP,GAAqDU,EAAf4E,EAAA,KAAK,GAAA,CAAA,C,IAGrCA,EAAA,YADRjF,EAAA,GAAAC,EAMI,KANJL,GAMIS,EADC4E,EAAA,QAAQ,GAAA,CAAA,K,aAGf/E,EAYM,OAZNL,GAYM,CAXJU,EAAuB2E,EAAA,QAAA,SAAA,GACvBhF,EASS,UAAA;IARP,MAAK;IACL,eAAY;IACZ,OAAM;IACL,cAAY+E,EAAA;IACZ,OAAOA,EAAA;IACP,SAAK,AAAA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