@templatical/editor 0.52.0 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/AiAltTextPopover-NMJqQKvD.js +106 -0
- package/dist/{AiAltTextReview-DE8t8Rud.js → AiAltTextReview-Ci4zHwRc.js} +68 -66
- package/dist/{AiChatPanel-7ftS7d40.js → AiChatPanel-DdhtfsmO.js} +223 -210
- package/dist/{AiPanels-CxGp6klr.js → AiPanels-HBx7xoJR.js} +6 -6
- package/dist/{AiRewriteMenu-DNI-5CUj.js → AiRewriteMenu-DPzSekZt.js} +78 -107
- package/dist/BlockIssueBadge-eIXZJ9M3.js +33 -0
- package/dist/BlockPreviewCanvas-DO-2TP_6.js +140 -0
- package/dist/{CloudHeaderExtras-CsgyNNV1.js → CloudHeaderExtras-XpjJjn3o.js} +4 -4
- package/dist/{CloudPanels-BDV4XQ_l.js → CloudPanels-i2kZdrdP.js} +44 -44
- package/dist/CollaborationNotices-DANsjl7c.js +65 -0
- package/dist/{CollaboratorBar-EeqqWcX6.js → CollaboratorBar-CbbAA0m1.js} +24 -24
- package/dist/CommentsPanel-CYW3LWis.js +16 -0
- package/dist/CommentsSidebar-CcF4ISMi.js +526 -0
- package/dist/{CountdownBlock-BT3ZTH1F.js → CountdownBlock-BMezkFbJ.js} +21 -21
- package/dist/CountdownToolbar-D3Lv74kU.js +258 -0
- package/dist/{IssuesPanel-BHFQ3wrP.js → IssuesPanel-BMAG9042.js} +141 -129
- package/dist/LanguageMenu-FlP_Jbup.js +403 -0
- package/dist/{LoadingTrack-DZA5AoP9.js → LoadingTrack-BG8cg9xi.js} +2 -2
- package/dist/LocaleNotices-DAnVszWu.js +46 -0
- package/dist/{LogicTagInsertButton-CSD9cfJB.js → LogicTagInsertButton-BjYs-UQX.js} +439 -430
- package/dist/{MediaEditModal-DQl5w44r.js → MediaEditModal-LnG-cF_S.js} +160 -160
- package/dist/{MediaPanels-BFWYuJot.js → MediaPanels-C2r5fiFo.js} +4 -4
- package/dist/{cdn/chunks/MergeTagInput-CFu9VXPS.js → MergeTagInput-BsnogCeY.js} +32 -34
- package/dist/{MergeTagModeToggle-DvD0ne7N.js → MergeTagModeToggle-DiufIQ-_.js} +49 -49
- package/dist/MergeTagTextarea-BweI-Xsi.js +126 -0
- package/dist/{ParagraphEditor-D-nqs82g.js → ParagraphEditor-qgBp5yIB.js} +286 -257
- package/dist/{RestoreVersionDialog-DqUPsLB9.js → RestoreVersionDialog-DdYUrFiK.js} +23 -23
- package/dist/{RichTextEditorContent-Xq9D0Zs3.js → RichTextEditorContent-C5MAzx3E.js} +54 -53
- package/dist/{SaveBlockDialog-DAPv70p4.js → SaveBlockDialog-eK6fjtTy.js} +86 -86
- package/dist/SavedBlocksBrowserModal-D2QHd2Yp.js +359 -0
- package/dist/{SavedBlocksPanels-ChbL9v9x.js → SavedBlocksPanels-Cl61f4Mf.js} +9 -9
- package/dist/{SavedBlocksPickBar-hRaiLNdu.js → SavedBlocksPickBar-CXP2dkeB.js} +15 -15
- package/dist/TemplateSettings-BKJrdZcH.js +294 -0
- package/dist/TestEmailModal-DQotJg6g.js +212 -0
- package/dist/{TestEmailPanel-COJQa2A9.js → TestEmailPanel-CwiTzJsh.js} +4 -4
- package/dist/TitleEditor-CzSvsPAn.js +202 -0
- package/dist/ToggleSwitch-R3wCCYE6.js +43 -0
- package/dist/Toolbar-Cd75ci5W.js +3711 -0
- package/dist/{TplModal-9IndEYk5.js → TplModal-ZoXu40T9.js} +17 -17
- package/dist/{VersionHistoryMenu-BG5qayvg.js → VersionHistoryMenu-BvhN-Ofk.js} +39 -39
- package/dist/{VersionHistoryPanels-hPg7Q5-f.js → VersionHistoryPanels-DPWMnYbd.js} +5 -5
- package/dist/VersionPreviewBanner-CuJnasxH.js +37 -0
- package/dist/WrapperBlock-D4fPwO0t.js +44 -0
- package/dist/{blockTypeIcons-yt7SLzub.js → blockTypeIcons-BXMxu86H.js} +27 -26
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-CD-Kt1qz.js → ca-DOuIxWRv.js} +114 -2
- package/dist/cdn/chunks/AiAltTextPopover-ByZ0FEqI.js +107 -0
- package/dist/cdn/chunks/AiAltTextPopover-ByZ0FEqI.js.map +1 -0
- package/dist/cdn/chunks/{AiAltTextReview-BafAtBoA.js → AiAltTextReview-Dtm3A2cD.js} +71 -69
- package/dist/cdn/chunks/AiAltTextReview-Dtm3A2cD.js.map +1 -0
- package/dist/cdn/chunks/AiChatPanel-DciEt27y.js +487 -0
- package/dist/cdn/chunks/AiChatPanel-DciEt27y.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-B4uAVRoO.js → AiPanels-BV5D1itk.js} +11 -11
- package/dist/cdn/chunks/{AiPanels-B4uAVRoO.js.map → AiPanels-BV5D1itk.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-4F6vwhJ5.js → AiRewriteMenu-D3jkh6Xb.js} +80 -80
- package/dist/cdn/chunks/AiRewriteMenu-D3jkh6Xb.js.map +1 -0
- package/dist/cdn/chunks/BlockIssueBadge-DyEgBZtR.js +34 -0
- package/dist/cdn/chunks/BlockIssueBadge-DyEgBZtR.js.map +1 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-RQFilqXC.js +142 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-Ny1X_mee.js.map → BlockPreviewCanvas-RQFilqXC.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DtMORiLS.js → CloudHeaderExtras-BtqdN777.js} +4 -4
- package/dist/cdn/chunks/{CloudHeaderExtras-DtMORiLS.js.map → CloudHeaderExtras-BtqdN777.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-BkmLc2Fl.js → CloudPanels-BSJ-Z5Hw.js} +43 -43
- package/dist/cdn/chunks/{CloudPanels-BkmLc2Fl.js.map → CloudPanels-BSJ-Z5Hw.js.map} +1 -1
- package/dist/cdn/chunks/CollaborationNotices-BS7xrlPE.js +67 -0
- package/dist/cdn/chunks/CollaborationNotices-BS7xrlPE.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-II8eYtKu.js → CollaboratorBar-Bc9914Az.js} +16 -16
- package/dist/cdn/chunks/{CollaboratorBar-II8eYtKu.js.map → CollaboratorBar-Bc9914Az.js.map} +1 -1
- package/dist/cdn/chunks/CommentsPanel-DbR9phAk.js +18 -0
- package/dist/cdn/chunks/{CommentsPanel-CAiwilM2.js.map → CommentsPanel-DbR9phAk.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-BD4--XP2.js +496 -0
- package/dist/cdn/chunks/CommentsSidebar-BD4--XP2.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-Dyr5P0IP.js → CountdownBlock-CjMhMhnv.js} +26 -26
- package/dist/cdn/chunks/{CountdownBlock-Dyr5P0IP.js.map → CountdownBlock-CjMhMhnv.js.map} +1 -1
- package/dist/cdn/chunks/CountdownToolbar-DxwYBw-d.js +260 -0
- package/dist/cdn/chunks/CountdownToolbar-DxwYBw-d.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-pr7_nuLI.js → IssuesPanel-CUmI4HMm.js} +132 -120
- package/dist/cdn/chunks/IssuesPanel-CUmI4HMm.js.map +1 -0
- package/dist/cdn/chunks/LanguageMenu-3ydCozQJ.js +359 -0
- package/dist/cdn/chunks/LanguageMenu-3ydCozQJ.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-DfJ_C33G.js → LoadingTrack-DUYcDHOV.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DfJ_C33G.js.map → LoadingTrack-DUYcDHOV.js.map} +1 -1
- package/dist/cdn/chunks/LocaleNotices-BfoH6gST.js +47 -0
- package/dist/cdn/chunks/LocaleNotices-BfoH6gST.js.map +1 -0
- package/dist/cdn/chunks/{LogicTagInsertButton-B_ldj3TO.js → LogicTagInsertButton-5Z3fFzjc.js} +465 -456
- package/dist/cdn/chunks/LogicTagInsertButton-5Z3fFzjc.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-CGfzcHwP.js → MediaEditModal-DDCIwr9U.js} +439 -439
- package/dist/cdn/chunks/MediaEditModal-DDCIwr9U.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-D0BdxdqP.js → MediaPanels-Dz79oy8P.js} +5 -5
- package/dist/cdn/chunks/{MediaPanels-D0BdxdqP.js.map → MediaPanels-Dz79oy8P.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagInput-CIWy-cXf.js +82 -0
- package/dist/cdn/chunks/{MergeTagInput-CFu9VXPS.js.map → MergeTagInput-CIWy-cXf.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BFpK5dxg.js → MergeTagModeToggle-BrP5GR-x.js} +50 -50
- package/dist/cdn/chunks/MergeTagModeToggle-BrP5GR-x.js.map +1 -0
- package/dist/cdn/chunks/MergeTagTextarea-D3nNDlhV.js +128 -0
- package/dist/cdn/chunks/MergeTagTextarea-D3nNDlhV.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-DDolH_Pf.js +660 -0
- package/dist/cdn/chunks/ParagraphEditor-DDolH_Pf.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-B866zFP0.js → RestoreVersionDialog-Crj1DBqC.js} +18 -18
- package/dist/cdn/chunks/{RestoreVersionDialog-B866zFP0.js.map → RestoreVersionDialog-Crj1DBqC.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DaY63kye.js → RichTextEditorContent-rCCqFlwJ.js} +43 -43
- package/dist/cdn/chunks/{RichTextEditorContent-DaY63kye.js.map → RichTextEditorContent-rCCqFlwJ.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-B7nftAAS.js → SaveBlockDialog-C34RW1aM.js} +71 -71
- package/dist/cdn/chunks/{SaveBlockDialog-B7nftAAS.js.map → SaveBlockDialog-C34RW1aM.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CJnwWPT-.js +356 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-B9XCjDfm.js.map → SavedBlocksBrowserModal-CJnwWPT-.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-C3nK90pz.js → SavedBlocksPanels-CA2PqXIH.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksPanels-C3nK90pz.js.map → SavedBlocksPanels-CA2PqXIH.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-B166Mek9.js → SavedBlocksPickBar-Dj3ortee.js} +16 -16
- package/dist/cdn/chunks/{SavedBlocksPickBar-B166Mek9.js.map → SavedBlocksPickBar-Dj3ortee.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-sW0ZlDl1.js +266 -0
- package/dist/cdn/chunks/TemplateSettings-sW0ZlDl1.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-DcwKhFnI.js → TestEmailModal-BXeCtTjU.js} +81 -78
- package/dist/cdn/chunks/TestEmailModal-BXeCtTjU.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-BDBAvAfI.js → TestEmailPanel-CpZcpB9D.js} +5 -5
- package/dist/cdn/chunks/{TestEmailPanel-BDBAvAfI.js.map → TestEmailPanel-CpZcpB9D.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Bv3SmSO6.js +202 -0
- package/dist/cdn/chunks/TitleEditor-Bv3SmSO6.js.map +1 -0
- package/dist/cdn/chunks/ToggleSwitch-BSkySwA1.js +45 -0
- package/dist/cdn/chunks/ToggleSwitch-BSkySwA1.js.map +1 -0
- package/dist/cdn/chunks/Toolbar-BJKpJ2Mg.js +3626 -0
- package/dist/cdn/chunks/Toolbar-BJKpJ2Mg.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-BDyeS69p.js → TplModal-DDDUDMYC.js} +19 -19
- package/dist/cdn/chunks/{TplModal-BDyeS69p.js.map → TplModal-DDDUDMYC.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-CmpgUI4Q.js → VersionHistoryMenu-DSElv3Sv.js} +36 -36
- package/dist/cdn/chunks/{VersionHistoryMenu-CmpgUI4Q.js.map → VersionHistoryMenu-DSElv3Sv.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DB_FZyyg.js → VersionHistoryPanels-H2nuik1l.js} +6 -6
- package/dist/cdn/chunks/{VersionHistoryPanels-DB_FZyyg.js.map → VersionHistoryPanels-H2nuik1l.js.map} +1 -1
- package/dist/cdn/chunks/VersionPreviewBanner-Whwxh55w.js +39 -0
- package/dist/cdn/chunks/VersionPreviewBanner-Whwxh55w.js.map +1 -0
- package/dist/cdn/chunks/WrapperBlock-jTqsuLnS.js +46 -0
- package/dist/cdn/chunks/WrapperBlock-jTqsuLnS.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-DMgLcuI8.js +21 -0
- package/dist/cdn/chunks/blockTypeIcons-DMgLcuI8.js.map +1 -0
- package/dist/{ca-CD-Kt1qz.js → cdn/chunks/ca-DOuIxWRv.js} +116 -0
- package/dist/cdn/chunks/ca-DOuIxWRv.js.map +1 -0
- package/dist/cdn/chunks/composables-D0UYam2P.js +3039 -0
- package/dist/cdn/chunks/composables-D0UYam2P.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-D6niZ2Rc.js → createCloudRuntime-BdsclY8_.js} +85 -83
- package/dist/cdn/chunks/createCloudRuntime-BdsclY8_.js.map +1 -0
- package/dist/{de-CeFJ6wbM.js → cdn/chunks/de-DaOUfYBX.js} +116 -0
- package/dist/cdn/chunks/de-DaOUfYBX.js.map +1 -0
- package/dist/{dist-CEdyyDn7.js → cdn/chunks/dist-BzXULHvI.js} +63 -61
- package/dist/cdn/chunks/{dist-C2epoAwW.js.map → dist-BzXULHvI.js.map} +1 -1
- package/dist/{dist-BA-jTQgw.js → cdn/chunks/dist-DqGgijFI.js} +108 -109
- package/dist/cdn/chunks/{dist-CONcGNwy.js.map → dist-DqGgijFI.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-B8hTTYFO.js → draggable-DepKdldn.js} +1384 -1376
- package/dist/cdn/chunks/draggable-DepKdldn.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-cvYkpbHD.js → editor-modal-CPbgthOv.js} +986 -986
- package/dist/cdn/chunks/{editor-modal-cvYkpbHD.js.map → editor-modal-CPbgthOv.js.map} +1 -1
- package/dist/{en-D14i5nFh.js → cdn/chunks/en-C0pHHMiR.js} +116 -0
- package/dist/cdn/chunks/en-C0pHHMiR.js.map +1 -0
- package/dist/cdn/chunks/en-IYVryJRl.js +1 -0
- package/dist/{es-zDacbMhs.js → cdn/chunks/es-CxyEKr6n.js} +116 -0
- package/dist/cdn/chunks/es-CxyEKr6n.js.map +1 -0
- package/dist/cdn/chunks/{extensions-ClDhn88e.js → extensions-Uh9vuFfK.js} +57 -57
- package/dist/cdn/chunks/{extensions-ClDhn88e.js.map → extensions-Uh9vuFfK.js.map} +1 -1
- package/dist/{fr-CSgYtjOd.js → cdn/chunks/fr-CYbamiI6.js} +116 -0
- package/dist/cdn/chunks/fr-CYbamiI6.js.map +1 -0
- package/dist/cdn/chunks/{icons-HCBP93Ch.js → icons-CSSMtbGK.js} +187 -144
- package/dist/cdn/chunks/icons-CSSMtbGK.js.map +1 -0
- package/dist/{ja-B7H3ID8O.js → cdn/chunks/ja-DfaIAoGI.js} +116 -0
- package/dist/cdn/chunks/ja-DfaIAoGI.js.map +1 -0
- package/dist/cdn/chunks/keys-CoQtCqNv.js +11 -0
- package/dist/cdn/chunks/keys-CoQtCqNv.js.map +1 -0
- package/dist/cdn/chunks/languageName-DEEOhDWI.js +12 -0
- package/dist/cdn/chunks/languageName-DEEOhDWI.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-DkLBNrft.js → liquid.browser-rubac0VA.js} +782 -746
- package/dist/cdn/chunks/liquid.browser-rubac0VA.js.map +1 -0
- package/dist/{nl-176ySmc5.js → cdn/chunks/nl-DkrB-VKZ.js} +116 -0
- package/dist/cdn/chunks/nl-DkrB-VKZ.js.map +1 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-oGhwVscw.js +290 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-oGhwVscw.js.map +1 -0
- package/dist/cdn/chunks/noticeTones-D7BPu-Le.js +16 -0
- package/dist/cdn/chunks/noticeTones-D7BPu-Le.js.map +1 -0
- package/dist/cdn/chunks/plural-CyxrJXL1.js +17 -0
- package/dist/cdn/chunks/plural-CyxrJXL1.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-D-dsBq5t.js → preRenderCustomBlocks-C8k7tw98.js} +5 -5
- package/dist/cdn/chunks/{preRenderCustomBlocks-D-dsBq5t.js.map → preRenderCustomBlocks-C8k7tw98.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-dDlTwX18.js → pt-BR-CY5Ye7eP.js} +115 -1
- package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +1 -0
- package/dist/cdn/chunks/sanitizeHtml-DYklmvgX.js +61 -0
- package/dist/cdn/chunks/sanitizeHtml-DYklmvgX.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-BAiuHyJs.js +2638 -0
- package/dist/cdn/chunks/socialIcons-BAiuHyJs.js.map +1 -0
- package/dist/cdn/chunks/src-CACM3o--.js +2606 -0
- package/dist/cdn/chunks/src-CACM3o--.js.map +1 -0
- package/dist/cdn/chunks/{src-CUH_EI7k.js → src-Ddpm4HsS.js} +225 -259
- package/dist/cdn/chunks/src-Ddpm4HsS.js.map +1 -0
- package/dist/cdn/chunks/{src-BKpAis_q.js → src-DheBmnvF.js} +635 -478
- package/dist/cdn/chunks/src-DheBmnvF.js.map +1 -0
- package/dist/{styleConstants-B8xVRiwX.js → cdn/chunks/styleConstants-CgiNKdnc.js} +7 -5
- package/dist/cdn/chunks/styleConstants-CgiNKdnc.js.map +1 -0
- package/dist/cdn/chunks/templateSettingsFields-cjlP-jdw.js.map +1 -1
- package/dist/cdn/chunks/{tiptap-ChSZybTi.js → tiptap-Dipw_zOQ.js} +48 -48
- package/dist/cdn/chunks/{tiptap-ChSZybTi.js.map → tiptap-Dipw_zOQ.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-RJXyVnIf.js → useCloudI18n-Cc5NZqiI.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-RJXyVnIf.js.map → useCloudI18n-Cc5NZqiI.js.map} +1 -1
- package/dist/cdn/chunks/useEditorRoot-D_LuZ_hE.js +9 -0
- package/dist/cdn/chunks/{useEditorRoot-BT3c9CXj.js.map → useEditorRoot-D_LuZ_hE.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-11iqzC6m.js → useI18n-BnJYydPv.js} +3 -3
- package/dist/cdn/chunks/{useI18n-11iqzC6m.js.map → useI18n-BnJYydPv.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-yXbRKNrs.js +33 -0
- package/dist/cdn/chunks/useLocalizedDisplay-yXbRKNrs.js.map +1 -0
- package/dist/cdn/chunks/{useLogicTag-vy5KGg5D.js → useLogicTag-B7RpqVFQ.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-vy5KGg5D.js.map → useLogicTag-B7RpqVFQ.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-BFBBjnwh.js → useMergeTag-C-32ETjj.js} +6 -6
- package/dist/cdn/chunks/{useMergeTag-BFBBjnwh.js.map → useMergeTag-C-32ETjj.js.map} +1 -1
- package/dist/cdn/chunks/usePopoverPosition-BWAXWeBv.js +78 -0
- package/dist/cdn/chunks/usePopoverPosition-BWAXWeBv.js.map +1 -0
- package/dist/cdn/chunks/{useScrollToBlock-C0dawxGr.js → useScrollToBlock-Ct1AwLD-.js} +5 -5
- package/dist/cdn/chunks/useScrollToBlock-Ct1AwLD-.js.map +1 -0
- package/dist/cdn/chunks/{withCurrentFont-C3CquBQN.js → withCurrentFont-D33ZXoWp.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-C3CquBQN.js.map → withCurrentFont-D33ZXoWp.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +2503 -1809
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-N3x4z_rH.js → check-ChQ0l8EQ.js} +1 -1
- package/dist/{chevron-down-gXu9qNwO.js → chevron-down-Bh6cp6PI.js} +1 -1
- package/dist/{chevron-right-rL0ayGk5.js → chevron-right-LUgdqdoW.js} +1 -1
- package/dist/{chevron-up-0ugh8HnW.js → chevron-up-XsDeJxQN.js} +1 -1
- package/dist/{circle-alert-B9Ls75B5.js → circle-alert-lODfDsrj.js} +1 -1
- package/dist/{clock-BqHBaCLm.js → clock-DrqFEZkT.js} +1 -1
- package/dist/composables-BOP3ERRP.js +4517 -0
- package/dist/{createCloudRuntime-B5VIdnwz.js → createCloudRuntime-DGV5a5Af.js} +47 -45
- package/dist/{createLucideIcon-BV7Gwz_Z.js → createLucideIcon-Dw5e5gVE.js} +16 -16
- package/dist/{cdn/chunks/de-CeFJ6wbM.js → de-DaOUfYBX.js} +114 -2
- package/dist/{cdn/chunks/dist-CONcGNwy.js → dist-0alKVRc_.js} +100 -99
- package/dist/{dist-Cy8I5scI.js → dist-54VCNoC0.js} +2 -2
- package/dist/dist-6DU0me3E.js +4 -0
- package/dist/{dist-p3wymUDt.js → dist-B8dY8drK.js} +2 -2
- package/dist/{dist-Dd5MU2Ev.js → dist-B9a7iVye.js} +2 -2
- package/dist/{dist-V7W1UhVr.js → dist-BWflWcpW.js} +2 -2
- package/dist/{dist-D6fZec6r.js → dist-C3hu_C3w.js} +2 -2
- package/dist/{cdn/chunks/dist-C2epoAwW.js → dist-CX7skkvG.js} +29 -31
- package/dist/dist-CcOn7WCo.js +4 -0
- package/dist/dist-Cdkm20M6.js +2542 -0
- package/dist/{dist-BS5uKktL.js → dist-ChOb5XHW.js} +2 -2
- package/dist/{dist-BF5zEHop.js → dist-DZ3X-uB8.js} +2 -2
- package/dist/{dist-CWSG7Kj0.js → dist-D_XrUEET.js} +5 -5
- package/dist/{dist-txQLT2sF.js → dist-TAv500j6.js} +2 -2
- package/dist/{dist-DDN7yR-w.js → dist-fqSers8_.js} +131 -131
- package/dist/{editor-modal-Du9VI9q4.js → editor-modal-B_2EAOjN.js} +907 -906
- package/dist/{cdn/chunks/en-D14i5nFh.js → en-C0pHHMiR.js} +114 -2
- package/dist/en-DTtwco2Q.js +1 -0
- package/dist/{cdn/chunks/es-zDacbMhs.js → es-CxyEKr6n.js} +114 -2
- package/dist/{extensions-FRYhx7qa.js → extensions-DOLZkLzV.js} +173 -173
- package/dist/{eye-BKj9Tfnc.js → eye-DChfk0gi.js} +1 -1
- package/dist/{cdn/chunks/fr-CSgYtjOd.js → fr-CYbamiI6.js} +114 -2
- package/dist/{image-DNdvdTla.js → image--Hj2by1G.js} +1 -1
- package/dist/index.d.ts +182 -14
- package/dist/{info-Bx-kBkbH.js → info-BbXgy82f.js} +1 -1
- package/dist/{cdn/chunks/ja-B7H3ID8O.js → ja-DfaIAoGI.js} +114 -2
- package/dist/keys-BCqskl51.js +9 -0
- package/dist/languageName-DEEOhDWI.js +10 -0
- package/dist/{link-D8-rYdIQ.js → link-C2_8yJno.js} +1 -1
- package/dist/{liquid.browser-D1RxawkY.js → liquid.browser-DUXEekoN.js} +781 -745
- package/dist/{list-BneisA27.js → list-DLGs2n0V.js} +1 -1
- package/dist/{loader-circle-DBEXphyx.js → loader-circle-BbDItE_O.js} +1 -1
- package/dist/{message-circle-Bg4xInCM.js → message-circle-NAModq0p.js} +1 -1
- package/dist/{cdn/chunks/nl-176ySmc5.js → nl-DkrB-VKZ.js} +114 -2
- package/dist/normalizeMergeTagMarkup-CUCo7B5X.js +288 -0
- package/dist/noticeTones-D7BPu-Le.js +14 -0
- package/dist/{package-B40Vkfsp.js → package-BuzsfRyH.js} +1 -1
- package/dist/{pencil-CYdAHTds.js → pencil-BTUUECH4.js} +1 -1
- package/dist/plural-CyxrJXL1.js +15 -0
- package/dist/plus-Dm7DN65T.js +13 -0
- package/dist/{preRenderCustomBlocks-AbZArwkR.js → preRenderCustomBlocks-Bs3N9no-.js} +4 -4
- package/dist/{pt-BR-dDlTwX18.js → pt-BR-CY5Ye7eP.js} +114 -0
- package/dist/{refresh-cw-Bb1FWrU0.js → refresh-cw-xMURqGWi.js} +2 -12
- package/dist/rotate-ccw-DqVcEIn5.js +13 -0
- package/dist/{runtime-dom.esm-bundler-CLGymEyk.js → runtime-dom.esm-bundler-DlHp8xgy.js} +167 -167
- package/dist/sanitizeHtml-mKgNUdME.js +962 -0
- package/dist/{search-BZEo08gi.js → search-Cfr3W44N.js} +1 -1
- package/dist/{send-DHtrnXQs.js → send-CH1SrvyB.js} +1 -1
- package/dist/{smartphone-dlN3vpA3.js → smartphone-pAkvzjdI.js} +1 -1
- package/dist/socialIcons-Dqr4DJOz.js +2705 -0
- package/dist/{sparkles-NOttoDnJ.js → sparkles-CRO0cCnp.js} +1 -1
- package/dist/{square-B1CJgdt2.js → square-CaQWMntx.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{cdn/chunks/styleConstants-B8xVRiwX.js → styleConstants-CgiNKdnc.js} +5 -7
- package/dist/templatical-editor.js +2294 -1608
- package/dist/{text-align-start-zpoXmb-Z.js → text-align-start-BQ39AaRK.js} +1 -1
- package/dist/{trash-CGbk4Sgt.js → trash-BL5gEFHN.js} +1 -1
- package/dist/{triangle-alert-CKLMyGVp.js → triangle-alert-BYbKu7zZ.js} +1 -1
- package/dist/{upload-DQoackAn.js → upload-BhmL4Vqx.js} +1 -1
- package/dist/{useCloudI18n-DcLtxOQZ.js → useCloudI18n-Dh2iydo1.js} +4 -4
- package/dist/useEditorRoot-DY3mgcHm.js +7 -0
- package/dist/{useI18n-CeTm777E.js → useI18n-CgtvtF4C.js} +4 -4
- package/dist/useLocalizedDisplay-DNNwDRxL.js +31 -0
- package/dist/{useLogicTag-DFDYJeMN.js → useLogicTag-BXXXQQmi.js} +4 -4
- package/dist/{useMergeTag-B46vACAG.js → useMergeTag-C9Okr87y.js} +5 -5
- package/dist/usePopoverPosition-VDQjyX_A.js +76 -0
- package/dist/{useScrollToBlock-C-NzvjeO.js → useScrollToBlock-C0Kapxdh.js} +5 -5
- package/dist/{vue.runtime.esm-bundler-CrlI8j5R.js → vue.runtime.esm-bundler-BJXc_Mri.js} +1247 -1239
- package/dist/withCurrentFont-DJiQqZzL.js +18 -0
- package/dist/{x-zcrnmcmU.js → x-B7NZYzhx.js} +1 -1
- package/package.json +23 -23
- package/dist/AiAltTextPopover-Cm11CsKH.js +0 -105
- package/dist/BlockIssueBadge-6Ri2FfX-.js +0 -33
- package/dist/BlockPreviewCanvas-Df9iz7sK.js +0 -140
- package/dist/CollaborationNotices-JQ3vQoqO.js +0 -75
- package/dist/CommentsPanel-BuftXc0U.js +0 -16
- package/dist/CommentsSidebar-Co3x4uH0.js +0 -499
- package/dist/CountdownToolbar-CrL4WKy9.js +0 -197
- package/dist/MergeTagInput-DE7kWwXx.js +0 -80
- package/dist/MergeTagTextarea-DVPQkiYY.js +0 -69
- package/dist/SavedBlocksBrowserModal-SRtN5h9q.js +0 -359
- package/dist/TemplateSettings-D0XcH32O.js +0 -236
- package/dist/TestEmailModal-Cb5t0yB2.js +0 -209
- package/dist/TitleEditor-BYk_9SpQ.js +0 -198
- package/dist/ToggleSwitch-poGWbduy.js +0 -36
- package/dist/Toolbar-Dku_pZni.js +0 -3145
- package/dist/VersionPreviewBanner-CSs7zum_.js +0 -37
- package/dist/WrapperBlock-DwjK_IdJ.js +0 -44
- package/dist/cdn/chunks/AiAltTextPopover-DjMoJCgU.js +0 -106
- package/dist/cdn/chunks/AiAltTextPopover-DjMoJCgU.js.map +0 -1
- package/dist/cdn/chunks/AiAltTextReview-BafAtBoA.js.map +0 -1
- package/dist/cdn/chunks/AiChatPanel-DXeZgc7D.js +0 -474
- package/dist/cdn/chunks/AiChatPanel-DXeZgc7D.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-4F6vwhJ5.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-DIJDqqcY.js +0 -34
- package/dist/cdn/chunks/BlockIssueBadge-DIJDqqcY.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-Ny1X_mee.js +0 -142
- package/dist/cdn/chunks/CollaborationNotices-Hf8r08Sw.js +0 -77
- package/dist/cdn/chunks/CollaborationNotices-Hf8r08Sw.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-CAiwilM2.js +0 -18
- package/dist/cdn/chunks/CommentsSidebar-Dj8sDiLN.js +0 -469
- package/dist/cdn/chunks/CommentsSidebar-Dj8sDiLN.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-CguFJdqn.js +0 -199
- package/dist/cdn/chunks/CountdownToolbar-CguFJdqn.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-pr7_nuLI.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-B_ldj3TO.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-CGfzcHwP.js.map +0 -1
- package/dist/cdn/chunks/MergeTagModeToggle-BFpK5dxg.js.map +0 -1
- package/dist/cdn/chunks/MergeTagTextarea-Zo0mYWbf.js +0 -71
- package/dist/cdn/chunks/MergeTagTextarea-Zo0mYWbf.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DsPLVAgm.js +0 -631
- package/dist/cdn/chunks/ParagraphEditor-DsPLVAgm.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-B9XCjDfm.js +0 -356
- package/dist/cdn/chunks/TemplateSettings-jWpmuWDR.js +0 -208
- package/dist/cdn/chunks/TemplateSettings-jWpmuWDR.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-DcwKhFnI.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-R2lQw6WA.js +0 -198
- package/dist/cdn/chunks/TitleEditor-R2lQw6WA.js.map +0 -1
- package/dist/cdn/chunks/ToggleSwitch-BDMugNES.js +0 -38
- package/dist/cdn/chunks/ToggleSwitch-BDMugNES.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-CnvfW72e.js +0 -3061
- package/dist/cdn/chunks/Toolbar-CnvfW72e.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-CZ--HOoa.js +0 -39
- package/dist/cdn/chunks/VersionPreviewBanner-CZ--HOoa.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-D3obNGab.js +0 -46
- package/dist/cdn/chunks/WrapperBlock-D3obNGab.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-DFf7AyqI.js +0 -21
- package/dist/cdn/chunks/blockTypeIcons-DFf7AyqI.js.map +0 -1
- package/dist/cdn/chunks/ca-CD-Kt1qz.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-D6niZ2Rc.js.map +0 -1
- package/dist/cdn/chunks/de-CeFJ6wbM.js.map +0 -1
- package/dist/cdn/chunks/draggable-B8hTTYFO.js.map +0 -1
- package/dist/cdn/chunks/en-CKAXAo3Z.js +0 -1
- package/dist/cdn/chunks/en-D14i5nFh.js.map +0 -1
- package/dist/cdn/chunks/es-zDacbMhs.js.map +0 -1
- package/dist/cdn/chunks/fr-CSgYtjOd.js.map +0 -1
- package/dist/cdn/chunks/icons-HCBP93Ch.js.map +0 -1
- package/dist/cdn/chunks/ja-B7H3ID8O.js.map +0 -1
- package/dist/cdn/chunks/keys-BF9gazbd.js +0 -11
- package/dist/cdn/chunks/keys-BF9gazbd.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DkLBNrft.js.map +0 -1
- package/dist/cdn/chunks/nl-176ySmc5.js.map +0 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DpHCSESZ.js +0 -198
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DpHCSESZ.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-dDlTwX18.js.map +0 -1
- package/dist/cdn/chunks/sanitizeHtml-B2h15u0_.js +0 -72
- package/dist/cdn/chunks/sanitizeHtml-B2h15u0_.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-rJoqO1TJ.js +0 -2008
- package/dist/cdn/chunks/socialIcons-rJoqO1TJ.js.map +0 -1
- package/dist/cdn/chunks/src-BKpAis_q.js.map +0 -1
- package/dist/cdn/chunks/src-C9DTvn1H.js +0 -1423
- package/dist/cdn/chunks/src-C9DTvn1H.js.map +0 -1
- package/dist/cdn/chunks/src-CUH_EI7k.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-B8xVRiwX.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CjaEV_01.js +0 -2534
- package/dist/cdn/chunks/useEditorCore-CjaEV_01.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-BT3c9CXj.js +0 -9
- package/dist/cdn/chunks/usePopoverPosition-AnVIwiVv.js +0 -70
- package/dist/cdn/chunks/usePopoverPosition-AnVIwiVv.js.map +0 -1
- package/dist/cdn/chunks/useScrollToBlock-C0dawxGr.js.map +0 -1
- package/dist/dist-CzrLYq2s.js +0 -1363
- package/dist/dist-DyFArF_G.js +0 -4
- package/dist/dist-pA3ooG6N.js +0 -4
- package/dist/en-CyEE7FPY.js +0 -1
- package/dist/keys-DBjrQkYH.js +0 -9
- package/dist/normalizeMergeTagMarkup-IH8COHzd.js +0 -196
- package/dist/sanitizeHtml-CnOA1efV.js +0 -942
- package/dist/socialIcons-B_d52_eS.js +0 -2075
- package/dist/useEditorCore-DG9UvWUm.js +0 -4011
- package/dist/useEditorRoot-BKr6nNkC.js +0 -7
- package/dist/usePopoverPosition-C42kD7zt.js +0 -68
- package/dist/withCurrentFont-v_a4Oso8.js +0 -18
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as e, C as t, F as n, G as r, S as i, d as a, g as o, h as s, n as c, p as l } from "./draggable-DepKdldn.js";
|
|
2
2
|
import { t as u } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
3
3
|
// src/components/ai/AiPanels.vue
|
|
4
|
-
var d = /*#__PURE__*/ u(/* @__PURE__ */
|
|
4
|
+
var d = /*#__PURE__*/ u(/* @__PURE__ */ t({
|
|
5
5
|
__name: "AiPanels",
|
|
6
6
|
props: { feature: {} },
|
|
7
|
-
setup(
|
|
8
|
-
let u =
|
|
7
|
+
setup(t) {
|
|
8
|
+
let u = i(() => import("./AiChatPanel-DciEt27y.js")), d = t, f = { chat: u }, p = l(() => {
|
|
9
9
|
let e = d.feature.panel.value;
|
|
10
10
|
return e !== null && e in f ? f[e] : null;
|
|
11
11
|
});
|
|
12
|
-
return (
|
|
12
|
+
return (i, l) => (n(), s(c, {
|
|
13
13
|
"enter-active-class": "tpl-ai-slide-enter-active",
|
|
14
14
|
"enter-from-class": "tpl:translate-x-full",
|
|
15
15
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -18,15 +18,15 @@ var d = /*#__PURE__*/ u(/* @__PURE__ */ e({
|
|
|
18
18
|
"leave-to-class": "tpl:translate-x-full",
|
|
19
19
|
mode: "out-in"
|
|
20
20
|
}, {
|
|
21
|
-
default: r(() => [(
|
|
22
|
-
key:
|
|
23
|
-
feature:
|
|
24
|
-
onClose:
|
|
25
|
-
}, null, 40, ["feature"])) :
|
|
21
|
+
default: r(() => [(n(), s(a, null, [p.value ? (n(), s(e(p.value), {
|
|
22
|
+
key: t.feature.panel.value ?? "none",
|
|
23
|
+
feature: t.feature,
|
|
24
|
+
onClose: l[0] ||= (e) => t.feature.close()
|
|
25
|
+
}, null, 40, ["feature"])) : o("", !0)], 1024))]),
|
|
26
26
|
_: 1
|
|
27
27
|
}));
|
|
28
28
|
}
|
|
29
29
|
}), [["__scopeId", "data-v-3d8e197c"]]);
|
|
30
30
|
export { d as default };
|
|
31
31
|
|
|
32
|
-
//# sourceMappingURL=AiPanels-
|
|
32
|
+
//# sourceMappingURL=AiPanels-BV5D1itk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiPanels-
|
|
1
|
+
{"version":3,"file":"AiPanels-BV5D1itk.js","names":["_openBlock","_createBlock","_Transition","_withCtx","_KeepAlive","_resolveDynamicComponent","_createCommentVNode","_sfc_main","resolveDynamicComponent","defineComponent","openBlock","withCtx","defineAsyncComponent","KeepAlive","createCommentVNode","createBlock","Transition","computed","_plugin_vue_export_helper_default","AiPanels_default","AiChatPanel","props","__props","PANELS","current","panel","_cache"],"sources":["../../../src/components/ai/AiPanels.vue","../../../src/components/ai/AiPanels.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, defineAsyncComponent } from \"vue\";\nimport type { UseAiFeatureReturn } from \"../../composables/useAiFeature\";\n\nconst AiChatPanel = defineAsyncComponent(() => import(\"./AiChatPanel.vue\"));\n\nconst props = defineProps<{ feature: UseAiFeatureReturn }>();\n\nconst PANELS = {\n chat: AiChatPanel,\n} as const;\n\nconst current = computed(() => {\n const panel = props.feature.panel.value;\n return panel !== null && panel in PANELS\n ? PANELS[panel as keyof typeof PANELS]\n : null;\n});\n</script>\n\n<template>\n <Transition\n enter-active-class=\"tpl-ai-slide-enter-active\"\n enter-from-class=\"tpl:translate-x-full\"\n enter-to-class=\"tpl:translate-x-0\"\n leave-active-class=\"tpl-ai-slide-leave-active\"\n leave-from-class=\"tpl:translate-x-0\"\n leave-to-class=\"tpl:translate-x-full\"\n mode=\"out-in\"\n >\n <!-- Keep chat state when the panel closes. -->\n <KeepAlive>\n <component\n :is=\"current\"\n v-if=\"current\"\n :key=\"feature.panel.value ?? 'none'\"\n :feature=\"feature\"\n @close=\"feature.close()\"\n />\n </KeepAlive>\n </Transition>\n</template>\n\n<style scoped>\n.tpl-ai-slide-enter-active {\n transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.tpl-ai-slide-leave-active {\n transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tpl-ai-slide-enter-active,\n .tpl-ai-slide-leave-active {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, defineAsyncComponent } from \"vue\";\nimport type { UseAiFeatureReturn } from \"../../composables/useAiFeature\";\n\nconst AiChatPanel = defineAsyncComponent(() => import(\"./AiChatPanel.vue\"));\n\nconst props = defineProps<{ feature: UseAiFeatureReturn }>();\n\nconst PANELS = {\n chat: AiChatPanel,\n} as const;\n\nconst current = computed(() => {\n const panel = props.feature.panel.value;\n return panel !== null && panel in PANELS\n ? PANELS[panel as keyof typeof PANELS]\n : null;\n});\n</script>\n\n<template>\n <Transition\n enter-active-class=\"tpl-ai-slide-enter-active\"\n enter-from-class=\"tpl:translate-x-full\"\n enter-to-class=\"tpl:translate-x-0\"\n leave-active-class=\"tpl-ai-slide-leave-active\"\n leave-from-class=\"tpl:translate-x-0\"\n leave-to-class=\"tpl:translate-x-full\"\n mode=\"out-in\"\n >\n <!-- Keep chat state when the panel closes. -->\n <KeepAlive>\n <component\n :is=\"current\"\n v-if=\"current\"\n :key=\"feature.panel.value ?? 'none'\"\n :feature=\"feature\"\n @close=\"feature.close()\"\n />\n </KeepAlive>\n </Transition>\n</template>\n\n<style scoped>\n.tpl-ai-slide-enter-active {\n transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.tpl-ai-slide-leave-active {\n transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tpl-ai-slide-enter-active,\n .tpl-ai-slide-leave-active {\n transition: none;\n }\n}\n</style>\n"],"mappings":";;;;;;;EAIA,IAAMoB,IAAcR,QAA2B,OAAO,4BAAoB,GAEpES,IAAQC,GAERC,IAAS,EACb,MAAMH,EACR,GAEMI,IAAUP,QAAe;GAC7B,IAAMQ,IAAQJ,EAAM,QAAQ,MAAM;GAClC,OAAOI,MAAU,QAAQA,KAASF,IAC9BA,EAAOE,KACP;EACN,CAAC;E,kBAICzB,EAAA,GAAAC,EAmBaC,GAAA;GAlBX,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;GACf,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;GACf,MAAK;;GAGL,SAAAC,QAQY,EARZH,EAAA,GAAAC,EAQYG,GAAA,MAAA,CALFoB,EAAA,SAFRxB,EAAA,GAAAC,EAMEI,EALKmB,EAAA,KAAO,GAAA;IAEX,KAAKF,EAAA,QAAQ,MAAM,SAAK;IACxB,SAASA,EAAA;IACT,SAAK,AAAAI,EAAA,QAAA,MAAEJ,EAAA,QAAQ,MAAK"}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { C as e, F as t, H as n, K as r, L as i, M as a, O as o, _ as s, b as c, ct as l, dt as u, g as d, m as f, mt as p, o as ee, p as m, tt as h, u as g, x as _ } from "./draggable-DepKdldn.js";
|
|
2
|
+
import { Zt as te, n as ne } from "./src-CACM3o--.js";
|
|
3
|
+
import { D as re, T as ie, a as ae, mt as oe, t as se } from "./icons-CSSMtbGK.js";
|
|
4
|
+
import { B as ce, P as le, V as ue, n as de, ot as fe, rt as pe, v as me } from "./keys-CoQtCqNv.js";
|
|
5
|
+
import { t as he } from "./useI18n-BnJYydPv.js";
|
|
6
|
+
import { w as v, x as y } from "./styleConstants-CgiNKdnc.js";
|
|
7
|
+
import { t as ge } from "./sanitizeHtml-DYklmvgX.js";
|
|
8
|
+
import { r as _e } from "./normalizeMergeTagMarkup-oGhwVscw.js";
|
|
8
9
|
import { n as ve } from "./aiErrors-C3QEMB0x.js";
|
|
9
10
|
import { n as ye, t as be } from "./aiRewritePreview-DlMyx6Si.js";
|
|
10
|
-
import {
|
|
11
|
-
import { n as v } from "./ParagraphEditor-DsPLVAgm.js";
|
|
11
|
+
import { n as xe } from "./ParagraphEditor-DDolH_Pf.js";
|
|
12
12
|
// src/components/ai/AiRewriteMenu.vue?vue&type=script&setup=true&lang.ts
|
|
13
|
-
var
|
|
13
|
+
var b = { class: "tpl:relative tpl:flex tpl:items-center" }, x = [
|
|
14
14
|
"aria-label",
|
|
15
15
|
"title",
|
|
16
16
|
"aria-expanded"
|
|
17
|
-
],
|
|
17
|
+
], S = ["aria-label"], C = { class: "tpl:flex tpl:items-center tpl:justify-between" }, w = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, T = ["aria-label", "title"], E = {
|
|
18
18
|
"data-testid": "ai-rewrite-label",
|
|
19
19
|
class: "tpl:self-start tpl:rounded tpl:px-1.5 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-secondary-light)] tpl:text-[var(--tpl-text)]"
|
|
20
|
-
},
|
|
20
|
+
}, D = ["innerHTML"], O = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, k = {
|
|
21
21
|
"data-testid": "ai-rewrite-label",
|
|
22
22
|
class: "tpl:self-start tpl:rounded tpl:px-1.5 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-secondary-light)] tpl:text-[var(--tpl-text)]"
|
|
23
|
-
},
|
|
23
|
+
}, A = {
|
|
24
24
|
"data-testid": "ai-rewrite-preview",
|
|
25
25
|
class: "tpl:m-0 tpl:max-h-48 tpl:overflow-y-auto tpl:whitespace-pre-wrap tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
26
|
-
},
|
|
26
|
+
}, j = { class: "tpl:flex tpl:flex-wrap tpl:gap-1.5" }, M = ["data-testid", "onClick"], Se = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ce = ["disabled"], we = { class: "tpl:flex tpl:items-end tpl:gap-2" }, N = ["aria-label", "placeholder"], Te = ["disabled"], Ee = {
|
|
27
27
|
key: 0,
|
|
28
28
|
role: "alert",
|
|
29
29
|
"data-testid": "ai-rewrite-error",
|
|
30
30
|
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
31
|
-
},
|
|
31
|
+
}, De = { class: "tpl:m-0 tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, P = /* @__PURE__ */ e({
|
|
32
32
|
__name: "AiRewriteMenu",
|
|
33
33
|
props: { editor: {} },
|
|
34
|
-
setup(
|
|
35
|
-
let
|
|
34
|
+
setup(e) {
|
|
35
|
+
let P = e, { t: F, format: Oe } = he(), ke = fe(de, "AiRewriteMenu"), Ae = o(le, ue), je = o(ce, ne.liquid), I = o(pe, void 0), L = o(me, null), Me = [
|
|
36
36
|
"shorten",
|
|
37
37
|
"expand",
|
|
38
38
|
"friendlier",
|
|
39
39
|
"formal",
|
|
40
40
|
"fixGrammar"
|
|
41
|
-
], R = ye(
|
|
41
|
+
], R = ye(I), z = h(!1), B = h(R[0].value), V = h(""), H = h(!1), U = h(""), W = h(null), G = h(null), K = null, q = 0, J = m(() => W.value === null ? null : ge(_e(W.value, Ae.value, je))), Ne = m(() => be(U.value)), Y = m(() => G.value ? ve(G.value, F.ai.errors, Oe, I) : "");
|
|
42
42
|
function X() {
|
|
43
43
|
q++;
|
|
44
44
|
let e = K;
|
|
@@ -50,22 +50,22 @@ var y = { class: "tpl:relative tpl:flex tpl:items-center" }, b = [
|
|
|
50
50
|
function Q() {
|
|
51
51
|
Z(), z.value = !1;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Pe() {
|
|
54
54
|
z.value ? Q() : z.value = !0;
|
|
55
55
|
}
|
|
56
56
|
async function $(e) {
|
|
57
57
|
let t = V.value.trim();
|
|
58
58
|
if (H.value || e === null && t === "" || e === "translate" && B.value === "") return;
|
|
59
59
|
Z();
|
|
60
|
-
let n =
|
|
60
|
+
let n = P.editor.getHTML();
|
|
61
61
|
if (Array.from(n).length > 2e4) {
|
|
62
|
-
G.value = new
|
|
62
|
+
G.value = new te(F.ai.rewrite.tooLarge, 413);
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
let r = new AbortController(), i = ++q;
|
|
66
66
|
K = r, H.value = !0;
|
|
67
67
|
try {
|
|
68
|
-
let a = await
|
|
68
|
+
let a = await ke.rewrite({
|
|
69
69
|
html: n,
|
|
70
70
|
preset: e,
|
|
71
71
|
language: e === "translate" ? B.value : null,
|
|
@@ -81,127 +81,127 @@ var y = { class: "tpl:relative tpl:flex tpl:items-center" }, b = [
|
|
|
81
81
|
i === q && (H.value = !1, K = null);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
J.value !== null && (
|
|
84
|
+
function Fe() {
|
|
85
|
+
J.value !== null && (P.editor.chain().focus().setContent(J.value, { emitUpdate: !0 }).run(), Q());
|
|
86
86
|
}
|
|
87
|
-
return
|
|
87
|
+
return L?.activeLocale && n(L.activeLocale, Q, { flush: "sync" }), a(X), (e, n) => (t(), s("div", b, [f("button", {
|
|
88
88
|
type: "button",
|
|
89
89
|
"data-testid": "ai-rewrite-trigger",
|
|
90
90
|
class: "tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-active)]",
|
|
91
|
-
"aria-label":
|
|
92
|
-
title:
|
|
91
|
+
"aria-label": l(F).ai.rewrite.title,
|
|
92
|
+
title: l(F).ai.rewrite.title,
|
|
93
93
|
"aria-haspopup": "dialog",
|
|
94
94
|
"aria-expanded": z.value,
|
|
95
|
-
onClick:
|
|
96
|
-
}, [
|
|
95
|
+
onClick: Pe
|
|
96
|
+
}, [_(l(re), {
|
|
97
97
|
size: 16,
|
|
98
98
|
"stroke-width": 2,
|
|
99
99
|
"aria-hidden": "true"
|
|
100
|
-
}),
|
|
100
|
+
}), c(" " + p(l(F).ai.menu.button), 1)], 8, x), z.value ? (t(), s("div", {
|
|
101
101
|
key: 0,
|
|
102
102
|
role: "dialog",
|
|
103
|
-
"aria-label":
|
|
103
|
+
"aria-label": l(F).ai.rewrite.title,
|
|
104
104
|
"data-testid": "ai-rewrite-panel",
|
|
105
105
|
class: "tpl-ai-rewrite-panel tpl:absolute tpl:top-full tpl:right-0 tpl:z-50 tpl:mt-2 tpl:flex tpl:w-80 tpl:flex-col tpl:gap-3 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:shadow-[var(--tpl-shadow-lg)]"
|
|
106
|
-
}, [
|
|
106
|
+
}, [f("div", C, [f("span", w, [_(l(ae), {
|
|
107
107
|
size: 14,
|
|
108
108
|
"stroke-width": 2,
|
|
109
109
|
"aria-hidden": "true"
|
|
110
|
-
}),
|
|
110
|
+
}), c(" " + p(l(F).ai.rewrite.title), 1)]), f("button", {
|
|
111
111
|
type: "button",
|
|
112
112
|
class: "tpl:rounded-md tpl:p-0.5 tpl:text-[var(--tpl-text-muted)]",
|
|
113
|
-
"aria-label":
|
|
114
|
-
title:
|
|
113
|
+
"aria-label": l(F).ai.rewrite.close,
|
|
114
|
+
title: l(F).ai.rewrite.close,
|
|
115
115
|
onClick: Q
|
|
116
|
-
}, [
|
|
116
|
+
}, [_(l(se), {
|
|
117
117
|
size: 14,
|
|
118
118
|
"stroke-width": 2,
|
|
119
119
|
"aria-hidden": "true"
|
|
120
|
-
})], 8,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
})], 8, T)]), J.value === null ? H.value ? (t(), s(g, { key: 1 }, [
|
|
121
|
+
f("span", k, p(l(F).ai.rewrite.suggestionLabel), 1),
|
|
122
|
+
f("p", A, p(Ne.value || l(F).ai.rewrite.rewriting), 1),
|
|
123
|
+
f("button", {
|
|
124
124
|
type: "button",
|
|
125
125
|
"data-testid": "ai-rewrite-stop",
|
|
126
|
-
class: u([
|
|
126
|
+
class: u([l(v), "tpl:self-end"]),
|
|
127
127
|
onClick: X
|
|
128
|
-
}, [
|
|
128
|
+
}, [_(l(ie), {
|
|
129
129
|
size: 12,
|
|
130
130
|
"stroke-width": 2,
|
|
131
131
|
"aria-hidden": "true"
|
|
132
|
-
}),
|
|
133
|
-
], 64)) : (
|
|
134
|
-
|
|
132
|
+
}), c(" " + p(l(F).ai.rewrite.stop), 1)], 2)
|
|
133
|
+
], 64)) : (t(), s(g, { key: 2 }, [
|
|
134
|
+
f("div", j, [(t(), s(g, null, i(Me, (e) => f("button", {
|
|
135
135
|
key: e,
|
|
136
136
|
type: "button",
|
|
137
137
|
"data-testid": `ai-rewrite-preset-${e}`,
|
|
138
|
-
class: u(
|
|
138
|
+
class: u(l(v)),
|
|
139
139
|
onClick: (t) => $(e)
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
}, p(l(F).ai.rewrite.presets[e]), 11, M)), 64))]),
|
|
141
|
+
f("div", Se, [
|
|
142
|
+
_(l(oe), {
|
|
143
143
|
size: 14,
|
|
144
144
|
"stroke-width": 2,
|
|
145
145
|
class: "tpl:shrink-0 tpl:text-[var(--tpl-text-muted)]",
|
|
146
146
|
"aria-hidden": "true"
|
|
147
147
|
}),
|
|
148
|
-
|
|
148
|
+
_(xe, {
|
|
149
149
|
modelValue: B.value,
|
|
150
|
-
"onUpdate:modelValue":
|
|
151
|
-
options:
|
|
152
|
-
label:
|
|
150
|
+
"onUpdate:modelValue": n[0] ||= (e) => B.value = e,
|
|
151
|
+
options: l(R),
|
|
152
|
+
label: l(F).ai.rewrite.language,
|
|
153
153
|
"width-class": "tpl:flex-1"
|
|
154
154
|
}, null, 8, [
|
|
155
155
|
"modelValue",
|
|
156
156
|
"options",
|
|
157
157
|
"label"
|
|
158
158
|
]),
|
|
159
|
-
|
|
159
|
+
f("button", {
|
|
160
160
|
type: "button",
|
|
161
161
|
"data-testid": "ai-rewrite-preset-translate",
|
|
162
|
-
class: u(
|
|
162
|
+
class: u(l(v)),
|
|
163
163
|
disabled: B.value === "",
|
|
164
|
-
onClick:
|
|
165
|
-
},
|
|
164
|
+
onClick: n[1] ||= (e) => $("translate")
|
|
165
|
+
}, p(l(F).ai.rewrite.presets.translate), 11, Ce)
|
|
166
166
|
]),
|
|
167
|
-
|
|
168
|
-
"onUpdate:modelValue":
|
|
167
|
+
f("div", we, [r(f("textarea", {
|
|
168
|
+
"onUpdate:modelValue": n[2] ||= (e) => V.value = e,
|
|
169
169
|
"data-testid": "ai-rewrite-instruction",
|
|
170
170
|
maxlength: "500",
|
|
171
171
|
rows: "2",
|
|
172
172
|
class: "tpl:flex-1 tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2 tpl:py-1.5 tpl:font-sans tpl:text-sm tpl:text-[var(--tpl-text)]",
|
|
173
|
-
"aria-label":
|
|
174
|
-
placeholder:
|
|
175
|
-
}, null, 8,
|
|
173
|
+
"aria-label": l(F).ai.rewrite.instructionLabel,
|
|
174
|
+
placeholder: l(F).ai.rewrite.instructionPlaceholder
|
|
175
|
+
}, null, 8, N), [[ee, V.value]]), f("button", {
|
|
176
176
|
type: "button",
|
|
177
177
|
"data-testid": "ai-rewrite-run",
|
|
178
|
-
class: u(
|
|
178
|
+
class: u(l(y)),
|
|
179
179
|
disabled: V.value.trim() === "",
|
|
180
|
-
onClick:
|
|
181
|
-
},
|
|
182
|
-
Y.value ? (
|
|
183
|
-
|
|
184
|
-
], 64)) : (
|
|
185
|
-
|
|
186
|
-
|
|
180
|
+
onClick: n[3] ||= (e) => $(null)
|
|
181
|
+
}, p(l(F).ai.rewrite.run), 11, Te)]),
|
|
182
|
+
Y.value ? (t(), s("p", Ee, p(Y.value), 1)) : d("", !0),
|
|
183
|
+
f("p", De, p(l(F).ai.chat.disclaimer), 1)
|
|
184
|
+
], 64)) : (t(), s(g, { key: 0 }, [
|
|
185
|
+
f("span", E, p(l(F).ai.rewrite.suggestionLabel), 1),
|
|
186
|
+
f("div", {
|
|
187
187
|
"data-testid": "ai-rewrite-preview",
|
|
188
188
|
class: "tpl:max-h-48 tpl:overflow-y-auto tpl:text-sm tpl:text-[var(--tpl-text)]",
|
|
189
189
|
innerHTML: J.value
|
|
190
|
-
}, null, 8,
|
|
191
|
-
|
|
190
|
+
}, null, 8, D),
|
|
191
|
+
f("div", O, [f("button", {
|
|
192
192
|
type: "button",
|
|
193
193
|
"data-testid": "ai-rewrite-discard",
|
|
194
|
-
class: u(
|
|
194
|
+
class: u(l(v)),
|
|
195
195
|
onClick: Z
|
|
196
|
-
},
|
|
196
|
+
}, p(l(F).ai.rewrite.discard), 3), f("button", {
|
|
197
197
|
type: "button",
|
|
198
198
|
"data-testid": "ai-rewrite-replace",
|
|
199
|
-
class: u(
|
|
200
|
-
onClick:
|
|
201
|
-
},
|
|
202
|
-
], 64))], 8,
|
|
199
|
+
class: u(l(y)),
|
|
200
|
+
onClick: Fe
|
|
201
|
+
}, p(l(F).ai.rewrite.replaceAction), 3)])
|
|
202
|
+
], 64))], 8, S)) : d("", !0)]));
|
|
203
203
|
}
|
|
204
204
|
});
|
|
205
|
-
export {
|
|
205
|
+
export { P as default };
|
|
206
206
|
|
|
207
|
-
//# sourceMappingURL=AiRewriteMenu-
|
|
207
|
+
//# sourceMappingURL=AiRewriteMenu-D3jkh6Xb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiRewriteMenu-D3jkh6Xb.js","names":["_openBlock","_createElementBlock","_createElementVNode","_unref","_createVNode","_createTextVNode","_toDisplayString","_Fragment","_normalizeClass","_renderList","ToolbarSelect","_withDirectives","_vModelText","_createCommentVNode","_sfc_main","defineComponent","openBlock","watch","withDirectives","renderList","onBeforeUnmount","inject","createElementBlock","createTextVNode","unref","normalizeClass","createCommentVNode","createBaseVNode","toDisplayString","vModelText","computed","ref","Fragment","createVNode","SdkError","SYNTAX_PRESETS","Sparkles","Square","WandSparkles","Languages","X","MERGE_TAG_SYNTAX_KEY","MERGE_TAGS_KEY","NO_MERGE_TAGS","AI_FEATURE_KEY","requireInject","UI_LOCALE_KEY","EDITOR_KEY","useI18n","secondaryBtnCompactClass","primaryBtnCompactClass","sanitizeHtml","normalizeMergeTagsInHtml","aiErrorMessage","rewriteLanguageOptions","htmlToPlainText","ToolbarSelect_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","AiRewriteMenu_default","props","__props","feature","mergeTags","syntax","uiLocale","templateEditor","PRESETS","languages","isOpen","language","instruction","isRewriting","streamed","raw","failure","controller","generation","result","streamingPreview","errorText","t","format","stop","activeController","reset","close","toggle","run","text","preset","html","requestController","token","answer","chunk","error","replace","_cache","$event"],"sources":["../../../src/components/ai/AiRewriteMenu.vue","../../../src/components/ai/AiRewriteMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from \"@tiptap/core\";\nimport {\n SdkError,\n SYNTAX_PRESETS,\n type AiRewritePreset,\n} from \"@templatical/types\";\nimport { Languages, Sparkles, Square, WandSparkles, X } from \"@lucide/vue\";\nimport { computed, inject, onBeforeUnmount, ref, watch } from \"vue\";\nimport ToolbarSelect from \"../toolbar/ToolbarSelect.vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport {\n primaryBtnCompactClass,\n secondaryBtnCompactClass,\n} from \"../../constants/styleConstants\";\nimport {\n AI_FEATURE_KEY,\n EDITOR_KEY,\n MERGE_TAGS_KEY,\n MERGE_TAG_SYNTAX_KEY,\n NO_MERGE_TAGS,\n UI_LOCALE_KEY,\n requireInject,\n} from \"../../keys\";\nimport { aiErrorMessage } from \"../../utils/aiErrors\";\nimport {\n htmlToPlainText,\n rewriteLanguageOptions,\n} from \"../../utils/aiRewritePreview\";\nimport { normalizeMergeTagsInHtml } from \"../../utils/normalizeMergeTagMarkup\";\nimport { sanitizeHtml } from \"../../utils/sanitizeHtml\";\n\n/**\n * Rewrite with AI, in the paragraph text toolbar: a preset or the user's own\n * instruction, streamed into a preview labelled as an AI suggestion. Replace\n * puts it into the paragraph through TipTap, so it is the user's own edit\n * (an ordinary change, on the normal undo stack, a normal batch with\n * collaboration). Rendered inside `.tpl-text-toolbar` and never teleported:\n * the paragraph leaves edit mode on a mousedown outside the toolbar.\n */\nconst props = defineProps<{ editor: Editor }>();\n\nconst { t, format } = useI18n();\nconst feature = requireInject(AI_FEATURE_KEY, \"AiRewriteMenu\");\nconst mergeTags = inject(MERGE_TAGS_KEY, NO_MERGE_TAGS);\nconst syntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\nconst uiLocale = inject(UI_LOCALE_KEY, undefined);\nconst templateEditor = inject(EDITOR_KEY, null);\n\nconst PRESETS: Exclude<AiRewritePreset, \"translate\">[] = [\n \"shorten\",\n \"expand\",\n \"friendlier\",\n \"formal\",\n \"fixGrammar\",\n];\nconst languages = rewriteLanguageOptions(uiLocale);\n\nconst isOpen = ref(false);\nconst language = ref(languages[0].value);\nconst instruction = ref(\"\");\nconst isRewriting = ref(false);\nconst streamed = ref(\"\");\nconst raw = ref<string | null>(null);\nconst failure = ref<unknown>(null);\nlet controller: AbortController | null = null;\nlet generation = 0;\n\n/** The finished rewrite as the editor will hold it: tags, then sanitized (D22). */\nconst result = computed(() =>\n raw.value === null\n ? null\n : sanitizeHtml(\n normalizeMergeTagsInHtml(raw.value, mergeTags.value, syntax),\n ),\n);\nconst streamingPreview = computed(() => htmlToPlainText(streamed.value));\nconst errorText = computed(() =>\n failure.value\n ? aiErrorMessage(failure.value, t.ai.errors, format, uiLocale)\n : \"\",\n);\n\nfunction stop(): void {\n generation++;\n const activeController = controller;\n controller = null;\n isRewriting.value = false;\n activeController?.abort();\n}\n\nfunction reset(): void {\n stop();\n streamed.value = \"\";\n raw.value = null;\n failure.value = null;\n}\n\nfunction close(): void {\n reset();\n isOpen.value = false;\n}\n\nfunction toggle(): void {\n if (isOpen.value) close();\n else isOpen.value = true;\n}\n\nasync function run(preset: AiRewritePreset | null): Promise<void> {\n const text = instruction.value.trim();\n if (\n isRewriting.value ||\n (preset === null && text === \"\") ||\n (preset === \"translate\" && language.value === \"\")\n )\n return;\n reset();\n const html = props.editor.getHTML();\n if (Array.from(html).length > 20_000) {\n failure.value = new SdkError(t.ai.rewrite.tooLarge, 413);\n return;\n }\n const requestController = new AbortController();\n const token = ++generation;\n controller = requestController;\n isRewriting.value = true;\n try {\n const answer = await feature.rewrite(\n {\n html,\n preset,\n language: preset === \"translate\" ? language.value : null,\n instruction: text === \"\" ? null : text,\n },\n (chunk) => {\n if (token !== generation) return;\n streamed.value += chunk;\n },\n requestController.signal,\n );\n if (token !== generation) return;\n raw.value = answer.html;\n } catch (error) {\n if (\n token === generation &&\n !(error instanceof Error && error.name === \"AbortError\")\n )\n failure.value = error;\n } finally {\n if (token === generation) {\n isRewriting.value = false;\n controller = null;\n }\n }\n}\n\nfunction replace(): void {\n if (result.value === null) return;\n props.editor\n .chain()\n .focus()\n .setContent(result.value, { emitUpdate: true })\n .run();\n close();\n}\n\nif (templateEditor?.activeLocale)\n watch(templateEditor.activeLocale, close, { flush: \"sync\" });\nonBeforeUnmount(stop);\n</script>\n\n<template>\n <div class=\"tpl:relative tpl:flex tpl:items-center\">\n <button\n type=\"button\"\n data-testid=\"ai-rewrite-trigger\"\n class=\"tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-active)]\"\n :aria-label=\"t.ai.rewrite.title\"\n :title=\"t.ai.rewrite.title\"\n aria-haspopup=\"dialog\"\n :aria-expanded=\"isOpen\"\n @click=\"toggle\"\n >\n <Sparkles :size=\"16\" :stroke-width=\"2\" aria-hidden=\"true\" />\n {{ t.ai.menu.button }}\n </button>\n\n <div\n v-if=\"isOpen\"\n role=\"dialog\"\n :aria-label=\"t.ai.rewrite.title\"\n data-testid=\"ai-rewrite-panel\"\n class=\"tpl-ai-rewrite-panel tpl:absolute tpl:top-full tpl:right-0 tpl:z-50 tpl:mt-2 tpl:flex tpl:w-80 tpl:flex-col tpl:gap-3 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:shadow-[var(--tpl-shadow-lg)]\"\n >\n <div class=\"tpl:flex tpl:items-center tpl:justify-between\">\n <span\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]\"\n >\n <WandSparkles :size=\"14\" :stroke-width=\"2\" aria-hidden=\"true\" />\n {{ t.ai.rewrite.title }}\n </span>\n <button\n type=\"button\"\n class=\"tpl:rounded-md tpl:p-0.5 tpl:text-[var(--tpl-text-muted)]\"\n :aria-label=\"t.ai.rewrite.close\"\n :title=\"t.ai.rewrite.close\"\n @click=\"close\"\n >\n <X :size=\"14\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n </div>\n\n <!-- The finished rewrite: normalized and sanitized, labelled (Art. 50). -->\n <template v-if=\"result !== null\">\n <span\n data-testid=\"ai-rewrite-label\"\n class=\"tpl:self-start tpl:rounded tpl:px-1.5 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-secondary-light)] tpl:text-[var(--tpl-text)]\"\n >\n {{ t.ai.rewrite.suggestionLabel }}\n </span>\n <div\n data-testid=\"ai-rewrite-preview\"\n class=\"tpl:max-h-48 tpl:overflow-y-auto tpl:text-sm tpl:text-[var(--tpl-text)]\"\n v-html=\"result\"\n />\n <div class=\"tpl:flex tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n data-testid=\"ai-rewrite-discard\"\n :class=\"secondaryBtnCompactClass\"\n @click=\"reset\"\n >\n {{ t.ai.rewrite.discard }}\n </button>\n <button\n type=\"button\"\n data-testid=\"ai-rewrite-replace\"\n :class=\"primaryBtnCompactClass\"\n @click=\"replace\"\n >\n {{ t.ai.rewrite.replaceAction }}\n </button>\n </div>\n </template>\n\n <!-- Streaming: plain text only. -->\n <template v-else-if=\"isRewriting\">\n <span\n data-testid=\"ai-rewrite-label\"\n class=\"tpl:self-start tpl:rounded tpl:px-1.5 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-secondary-light)] tpl:text-[var(--tpl-text)]\"\n >\n {{ t.ai.rewrite.suggestionLabel }}\n </span>\n <p\n data-testid=\"ai-rewrite-preview\"\n class=\"tpl:m-0 tpl:max-h-48 tpl:overflow-y-auto tpl:whitespace-pre-wrap tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ streamingPreview || t.ai.rewrite.rewriting }}\n </p>\n <button\n type=\"button\"\n data-testid=\"ai-rewrite-stop\"\n :class=\"[secondaryBtnCompactClass, 'tpl:self-end']\"\n @click=\"stop\"\n >\n <Square :size=\"12\" :stroke-width=\"2\" aria-hidden=\"true\" />\n {{ t.ai.rewrite.stop }}\n </button>\n </template>\n\n <template v-else>\n <div class=\"tpl:flex tpl:flex-wrap tpl:gap-1.5\">\n <button\n v-for=\"preset in PRESETS\"\n :key=\"preset\"\n type=\"button\"\n :data-testid=\"`ai-rewrite-preset-${preset}`\"\n :class=\"secondaryBtnCompactClass\"\n @click=\"run(preset)\"\n >\n {{ t.ai.rewrite.presets[preset] }}\n </button>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <Languages\n :size=\"14\"\n :stroke-width=\"2\"\n class=\"tpl:shrink-0 tpl:text-[var(--tpl-text-muted)]\"\n aria-hidden=\"true\"\n />\n <ToolbarSelect\n v-model=\"language\"\n :options=\"languages\"\n :label=\"t.ai.rewrite.language\"\n width-class=\"tpl:flex-1\"\n />\n <button\n type=\"button\"\n data-testid=\"ai-rewrite-preset-translate\"\n :class=\"secondaryBtnCompactClass\"\n :disabled=\"language === ''\"\n @click=\"run('translate')\"\n >\n {{ t.ai.rewrite.presets.translate }}\n </button>\n </div>\n <div class=\"tpl:flex tpl:items-end tpl:gap-2\">\n <textarea\n v-model=\"instruction\"\n data-testid=\"ai-rewrite-instruction\"\n maxlength=\"500\"\n rows=\"2\"\n class=\"tpl:flex-1 tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2 tpl:py-1.5 tpl:font-sans tpl:text-sm tpl:text-[var(--tpl-text)]\"\n :aria-label=\"t.ai.rewrite.instructionLabel\"\n :placeholder=\"t.ai.rewrite.instructionPlaceholder\"\n />\n <button\n type=\"button\"\n data-testid=\"ai-rewrite-run\"\n :class=\"primaryBtnCompactClass\"\n :disabled=\"instruction.trim() === ''\"\n @click=\"run(null)\"\n >\n {{ t.ai.rewrite.run }}\n </button>\n </div>\n <p\n v-if=\"errorText\"\n role=\"alert\"\n data-testid=\"ai-rewrite-error\"\n class=\"tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]\"\n >\n {{ errorText }}\n </p>\n <p class=\"tpl:m-0 tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\">\n {{ t.ai.chat.disclaimer }}\n </p>\n </template>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { Editor } from \"@tiptap/core\";\nimport {\n SdkError,\n SYNTAX_PRESETS,\n type AiRewritePreset,\n} from \"@templatical/types\";\nimport { Languages, Sparkles, Square, WandSparkles, X } from \"@lucide/vue\";\nimport { computed, inject, onBeforeUnmount, ref, watch } from \"vue\";\nimport ToolbarSelect from \"../toolbar/ToolbarSelect.vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport {\n primaryBtnCompactClass,\n secondaryBtnCompactClass,\n} from \"../../constants/styleConstants\";\nimport {\n AI_FEATURE_KEY,\n EDITOR_KEY,\n MERGE_TAGS_KEY,\n MERGE_TAG_SYNTAX_KEY,\n NO_MERGE_TAGS,\n UI_LOCALE_KEY,\n requireInject,\n} from \"../../keys\";\nimport { aiErrorMessage } from \"../../utils/aiErrors\";\nimport {\n htmlToPlainText,\n rewriteLanguageOptions,\n} from \"../../utils/aiRewritePreview\";\nimport { normalizeMergeTagsInHtml } from \"../../utils/normalizeMergeTagMarkup\";\nimport { sanitizeHtml } from \"../../utils/sanitizeHtml\";\n\n/**\n * Rewrite with AI, in the paragraph text toolbar: a preset or the user's own\n * instruction, streamed into a preview labelled as an AI suggestion. Replace\n * puts it into the paragraph through TipTap, so it is the user's own edit\n * (an ordinary change, on the normal undo stack, a normal batch with\n * collaboration). Rendered inside `.tpl-text-toolbar` and never teleported:\n * the paragraph leaves edit mode on a mousedown outside the toolbar.\n */\nconst props = defineProps<{ editor: Editor }>();\n\nconst { t, format } = useI18n();\nconst feature = requireInject(AI_FEATURE_KEY, \"AiRewriteMenu\");\nconst mergeTags = inject(MERGE_TAGS_KEY, NO_MERGE_TAGS);\nconst syntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\nconst uiLocale = inject(UI_LOCALE_KEY, undefined);\nconst templateEditor = inject(EDITOR_KEY, null);\n\nconst PRESETS: Exclude<AiRewritePreset, \"translate\">[] = [\n \"shorten\",\n \"expand\",\n \"friendlier\",\n \"formal\",\n \"fixGrammar\",\n];\nconst languages = rewriteLanguageOptions(uiLocale);\n\nconst isOpen = ref(false);\nconst language = ref(languages[0].value);\nconst instruction = ref(\"\");\nconst isRewriting = ref(false);\nconst streamed = ref(\"\");\nconst raw = ref<string | null>(null);\nconst failure = ref<unknown>(null);\nlet controller: AbortController | null = null;\nlet generation = 0;\n\n/** The finished rewrite as the editor will hold it: tags, then sanitized (D22). */\nconst result = computed(() =>\n raw.value === null\n ? null\n : sanitizeHtml(\n normalizeMergeTagsInHtml(raw.value, mergeTags.value, syntax),\n ),\n);\nconst streamingPreview = computed(() => htmlToPlainText(streamed.value));\nconst errorText = computed(() =>\n failure.value\n ? aiErrorMessage(failure.value, t.ai.errors, format, uiLocale)\n : \"\",\n);\n\nfunction stop(): void {\n generation++;\n const activeController = controller;\n controller = null;\n isRewriting.value = false;\n activeController?.abort();\n}\n\nfunction reset(): void {\n stop();\n streamed.value = \"\";\n raw.value = null;\n failure.value = null;\n}\n\nfunction close(): void {\n reset();\n isOpen.value = false;\n}\n\nfunction toggle(): void {\n if (isOpen.value) close();\n else isOpen.value = true;\n}\n\nasync function run(preset: AiRewritePreset | null): Promise<void> {\n const text = instruction.value.trim();\n if (\n isRewriting.value ||\n (preset === null && text === \"\") ||\n (preset === \"translate\" && language.value === \"\")\n )\n return;\n reset();\n const html = props.editor.getHTML();\n if (Array.from(html).length > 20_000) {\n failure.value = new SdkError(t.ai.rewrite.tooLarge, 413);\n return;\n }\n const requestController = new AbortController();\n const token = ++generation;\n controller = requestController;\n isRewriting.value = true;\n try {\n const answer = await feature.rewrite(\n {\n html,\n preset,\n language: preset === \"translate\" ? language.value : null,\n instruction: text === \"\" ? null : text,\n },\n (chunk) => {\n if (token !== generation) return;\n streamed.value += chunk;\n },\n requestController.signal,\n );\n if (token !== generation) return;\n raw.value = answer.html;\n } catch (error) {\n if (\n token === generation &&\n !(error instanceof Error && error.name === \"AbortError\")\n )\n failure.value = error;\n } finally {\n if (token === generation) {\n isRewriting.value = false;\n controller = null;\n }\n }\n}\n\nfunction replace(): void {\n if (result.value === null) return;\n props.editor\n .chain()\n .focus()\n .setContent(result.value, { emitUpdate: true })\n .run();\n close();\n}\n\nif (templateEditor?.activeLocale)\n watch(templateEditor.activeLocale, close, { flush: \"sync\" });\nonBeforeUnmount(stop);\n</script>\n\n<template>\n <div class=\"tpl:relative tpl:flex tpl:items-center\">\n <button\n type=\"button\"\n data-testid=\"ai-rewrite-trigger\"\n class=\"tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-active)]\"\n :aria-label=\"t.ai.rewrite.title\"\n :title=\"t.ai.rewrite.title\"\n aria-haspopup=\"dialog\"\n :aria-expanded=\"isOpen\"\n @click=\"toggle\"\n >\n <Sparkles :size=\"16\" :stroke-width=\"2\" aria-hidden=\"true\" />\n {{ t.ai.menu.button }}\n </button>\n\n <div\n v-if=\"isOpen\"\n role=\"dialog\"\n :aria-label=\"t.ai.rewrite.title\"\n data-testid=\"ai-rewrite-panel\"\n class=\"tpl-ai-rewrite-panel tpl:absolute tpl:top-full tpl:right-0 tpl:z-50 tpl:mt-2 tpl:flex tpl:w-80 tpl:flex-col tpl:gap-3 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:shadow-[var(--tpl-shadow-lg)]\"\n >\n <div class=\"tpl:flex tpl:items-center tpl:justify-between\">\n <span\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]\"\n >\n <WandSparkles :size=\"14\" :stroke-width=\"2\" aria-hidden=\"true\" />\n {{ t.ai.rewrite.title }}\n </span>\n <button\n type=\"button\"\n class=\"tpl:rounded-md tpl:p-0.5 tpl:text-[var(--tpl-text-muted)]\"\n :aria-label=\"t.ai.rewrite.close\"\n :title=\"t.ai.rewrite.close\"\n @click=\"close\"\n >\n <X :size=\"14\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n </div>\n\n <!-- The finished rewrite: normalized and sanitized, labelled (Art. 50). -->\n <template v-if=\"result !== null\">\n <span\n data-testid=\"ai-rewrite-label\"\n class=\"tpl:self-start tpl:rounded tpl:px-1.5 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-secondary-light)] tpl:text-[var(--tpl-text)]\"\n >\n {{ t.ai.rewrite.suggestionLabel }}\n </span>\n <div\n data-testid=\"ai-rewrite-preview\"\n class=\"tpl:max-h-48 tpl:overflow-y-auto tpl:text-sm tpl:text-[var(--tpl-text)]\"\n v-html=\"result\"\n />\n <div class=\"tpl:flex tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n data-testid=\"ai-rewrite-discard\"\n :class=\"secondaryBtnCompactClass\"\n @click=\"reset\"\n >\n {{ t.ai.rewrite.discard }}\n </button>\n <button\n type=\"button\"\n data-testid=\"ai-rewrite-replace\"\n :class=\"primaryBtnCompactClass\"\n @click=\"replace\"\n >\n {{ t.ai.rewrite.replaceAction }}\n </button>\n </div>\n </template>\n\n <!-- Streaming: plain text only. -->\n <template v-else-if=\"isRewriting\">\n <span\n data-testid=\"ai-rewrite-label\"\n class=\"tpl:self-start tpl:rounded tpl:px-1.5 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-secondary-light)] tpl:text-[var(--tpl-text)]\"\n >\n {{ t.ai.rewrite.suggestionLabel }}\n </span>\n <p\n data-testid=\"ai-rewrite-preview\"\n class=\"tpl:m-0 tpl:max-h-48 tpl:overflow-y-auto tpl:whitespace-pre-wrap tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ streamingPreview || t.ai.rewrite.rewriting }}\n </p>\n <button\n type=\"button\"\n data-testid=\"ai-rewrite-stop\"\n :class=\"[secondaryBtnCompactClass, 'tpl:self-end']\"\n @click=\"stop\"\n >\n <Square :size=\"12\" :stroke-width=\"2\" aria-hidden=\"true\" />\n {{ t.ai.rewrite.stop }}\n </button>\n </template>\n\n <template v-else>\n <div class=\"tpl:flex tpl:flex-wrap tpl:gap-1.5\">\n <button\n v-for=\"preset in PRESETS\"\n :key=\"preset\"\n type=\"button\"\n :data-testid=\"`ai-rewrite-preset-${preset}`\"\n :class=\"secondaryBtnCompactClass\"\n @click=\"run(preset)\"\n >\n {{ t.ai.rewrite.presets[preset] }}\n </button>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <Languages\n :size=\"14\"\n :stroke-width=\"2\"\n class=\"tpl:shrink-0 tpl:text-[var(--tpl-text-muted)]\"\n aria-hidden=\"true\"\n />\n <ToolbarSelect\n v-model=\"language\"\n :options=\"languages\"\n :label=\"t.ai.rewrite.language\"\n width-class=\"tpl:flex-1\"\n />\n <button\n type=\"button\"\n data-testid=\"ai-rewrite-preset-translate\"\n :class=\"secondaryBtnCompactClass\"\n :disabled=\"language === ''\"\n @click=\"run('translate')\"\n >\n {{ t.ai.rewrite.presets.translate }}\n </button>\n </div>\n <div class=\"tpl:flex tpl:items-end tpl:gap-2\">\n <textarea\n v-model=\"instruction\"\n data-testid=\"ai-rewrite-instruction\"\n maxlength=\"500\"\n rows=\"2\"\n class=\"tpl:flex-1 tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2 tpl:py-1.5 tpl:font-sans tpl:text-sm tpl:text-[var(--tpl-text)]\"\n :aria-label=\"t.ai.rewrite.instructionLabel\"\n :placeholder=\"t.ai.rewrite.instructionPlaceholder\"\n />\n <button\n type=\"button\"\n data-testid=\"ai-rewrite-run\"\n :class=\"primaryBtnCompactClass\"\n :disabled=\"instruction.trim() === ''\"\n @click=\"run(null)\"\n >\n {{ t.ai.rewrite.run }}\n </button>\n </div>\n <p\n v-if=\"errorText\"\n role=\"alert\"\n data-testid=\"ai-rewrite-error\"\n class=\"tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]\"\n >\n {{ errorText }}\n </p>\n <p class=\"tpl:m-0 tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\">\n {{ t.ai.chat.disclaimer }}\n </p>\n </template>\n </div>\n </div>\n</template>\n"],"mappings":"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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { C as e, F as t, O as n, _ as r, ct as i, dt as a, g as o, h as s, p as c } from "./draggable-DepKdldn.js";
|
|
2
|
+
import { It as l, d as u } from "./icons-CSSMtbGK.js";
|
|
3
|
+
import { Q as d, v as f } from "./keys-CoQtCqNv.js";
|
|
4
|
+
import { t as p } from "./useI18n-BnJYydPv.js";
|
|
5
|
+
// src/components/canvas/BlockIssueBadge.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var m = ["title", "aria-label"], h = /* @__PURE__ */ e({
|
|
7
|
+
__name: "BlockIssueBadge",
|
|
8
|
+
props: { blockId: {} },
|
|
9
|
+
setup(e) {
|
|
10
|
+
let h = e, { t: g } = p(), _ = n(d, null), v = n(f, null), y = c(() => (_?.issues.value ?? []).filter((e) => e.blockId === h.blockId && !(v?.activeLocale?.value && e.ruleId.startsWith("localization.")))), b = c(() => y.value.some((e) => e.severity === "error") ? "error" : y.value.some((e) => e.severity === "warning") ? "warning" : null), x = c(() => b.value === "error" ? g.issues.badgeError : g.issues.badgeWarning);
|
|
11
|
+
return (e, n) => b.value ? (t(), r("span", {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: a(["tpl-block-issue-badge tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:hover:shadow-[var(--tpl-shadow-sm)]", b.value === "error" ? "tpl:text-[var(--tpl-danger)]" : "tpl:text-[var(--tpl-warning)]"]),
|
|
14
|
+
title: x.value,
|
|
15
|
+
"aria-label": x.value,
|
|
16
|
+
role: "img"
|
|
17
|
+
}, [b.value === "error" ? (t(), s(i(l), {
|
|
18
|
+
key: 0,
|
|
19
|
+
size: 14,
|
|
20
|
+
"stroke-width": 2.25,
|
|
21
|
+
fill: "currentColor",
|
|
22
|
+
stroke: "var(--tpl-bg)"
|
|
23
|
+
})) : (t(), s(i(u), {
|
|
24
|
+
key: 1,
|
|
25
|
+
size: 14,
|
|
26
|
+
"stroke-width": 2.25,
|
|
27
|
+
fill: "currentColor",
|
|
28
|
+
stroke: "var(--tpl-bg)"
|
|
29
|
+
}))], 10, m)) : o("", !0);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export { h as default };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=BlockIssueBadge-DyEgBZtR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockIssueBadge-DyEgBZtR.js","names":["_openBlock","_createElementBlock","_normalizeClass","_createBlock","_unref","_createCommentVNode","_sfc_main","defineComponent","openBlock","inject","createElementBlock","unref","normalizeClass","createCommentVNode","createBlock","computed","CircleAlert","TriangleAlert","TEMPLATE_LINT_KEY","EDITOR_KEY","useI18n","_hoisted_1","BlockIssueBadge_default","props","__props","lint","editor","blockIssues","i","severity","tooltip","t"],"sources":["../../../src/components/canvas/BlockIssueBadge.vue","../../../src/components/canvas/BlockIssueBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport { CircleAlert, TriangleAlert } from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { EDITOR_KEY, TEMPLATE_LINT_KEY } from \"../../keys\";\n\nconst props = defineProps<{ blockId: string }>();\nconst { t } = useI18n();\nconst lint = inject(TEMPLATE_LINT_KEY, null);\nconst editor = inject(EDITOR_KEY, null);\n\nconst blockIssues = computed(() =>\n (lint?.issues.value ?? []).filter(\n (i) =>\n i.blockId === props.blockId &&\n !(editor?.activeLocale?.value && i.ruleId.startsWith(\"localization.\")),\n ),\n);\n\nconst severity = computed<\"error\" | \"warning\" | null>(() => {\n if (blockIssues.value.some((i) => i.severity === \"error\")) return \"error\";\n if (blockIssues.value.some((i) => i.severity === \"warning\")) return \"warning\";\n return null;\n});\n\nconst tooltip = computed(() =>\n severity.value === \"error\" ? t.issues.badgeError : t.issues.badgeWarning,\n);\n</script>\n\n<template>\n <span\n v-if=\"severity\"\n class=\"tpl-block-issue-badge tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:hover:shadow-[var(--tpl-shadow-sm)]\"\n :class=\"\n severity === 'error'\n ? 'tpl:text-[var(--tpl-danger)]'\n : 'tpl:text-[var(--tpl-warning)]'\n \"\n :title=\"tooltip\"\n :aria-label=\"tooltip\"\n role=\"img\"\n >\n <CircleAlert\n v-if=\"severity === 'error'\"\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n <TriangleAlert\n v-else\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport { CircleAlert, TriangleAlert } from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { EDITOR_KEY, TEMPLATE_LINT_KEY } from \"../../keys\";\n\nconst props = defineProps<{ blockId: string }>();\nconst { t } = useI18n();\nconst lint = inject(TEMPLATE_LINT_KEY, null);\nconst editor = inject(EDITOR_KEY, null);\n\nconst blockIssues = computed(() =>\n (lint?.issues.value ?? []).filter(\n (i) =>\n i.blockId === props.blockId &&\n !(editor?.activeLocale?.value && i.ruleId.startsWith(\"localization.\")),\n ),\n);\n\nconst severity = computed<\"error\" | \"warning\" | null>(() => {\n if (blockIssues.value.some((i) => i.severity === \"error\")) return \"error\";\n if (blockIssues.value.some((i) => i.severity === \"warning\")) return \"warning\";\n return null;\n});\n\nconst tooltip = computed(() =>\n severity.value === \"error\" ? t.issues.badgeError : t.issues.badgeWarning,\n);\n</script>\n\n<template>\n <span\n v-if=\"severity\"\n class=\"tpl-block-issue-badge tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:hover:shadow-[var(--tpl-shadow-sm)]\"\n :class=\"\n severity === 'error'\n ? 'tpl:text-[var(--tpl-danger)]'\n : 'tpl:text-[var(--tpl-warning)]'\n \"\n :title=\"tooltip\"\n :aria-label=\"tooltip\"\n role=\"img\"\n >\n <CircleAlert\n v-if=\"severity === 'error'\"\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n <TriangleAlert\n v-else\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n </span>\n</template>\n"],"mappings":";;;;;;;;;EAMA,IAAMuB,IAAQC,GACR,EAAE,SAAMJ,EAAQ,GAChBK,IAAOhB,EAAOS,GAAmB,IAAI,GACrCQ,IAASjB,EAAOU,GAAY,IAAI,GAEhCQ,IAAcZ,SACjBU,GAAM,OAAO,SAAS,CAAC,EAAA,CAAG,QACxB,MACCG,EAAE,YAAYL,EAAM,WACpB,EAAEG,GAAQ,cAAc,SAASE,EAAE,OAAO,WAAW,eAAe,EACxE,CACF,GAEMC,IAAWd,QACXY,EAAY,MAAM,MAAM,MAAMC,EAAE,aAAa,OAAO,IAAU,UAC9DD,EAAY,MAAM,MAAM,MAAMC,EAAE,aAAa,SAAS,IAAU,YAC7D,IACR,GAEKE,IAAUf,QACdc,EAAS,UAAU,UAAUE,EAAE,OAAO,aAAaA,EAAE,OAAO,YAC9D;E,iBAKUF,EAAA,SADR7B,EAAA,GAAAC,EA0BO,QAAA;;GAxBL,OAAKC,EAAA,CAAC,sNACS2B,EAAA,UAAQ,U;GAKtB,OAAOC,EAAA;GACP,cAAYA,EAAA;GACb,MAAK;E,IAGGD,EAAA,UAAQ,WADhB7B,EAAA,GAAAG,EAMEC,EAAAY,CAAA,GAAA;;GAJC,MAAM;GACN,gBAAc;GACf,MAAK;GACL,QAAO;E,OAEThB,EAAA,GAAAG,EAMEC,EAAAa,CAAA,GAAA;;GAJC,MAAM;GACN,gBAAc;GACf,MAAK;GACL,QAAO"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { n as e } from "./rolldown-runtime-QGRDbDUS.js";
|
|
2
|
+
import { B as t, C as n, F as r, I as i, L as a, O as o, _ as s, ct as c, h as l, m as u, p as d, pt as f, u as p, z as m } from "./draggable-DepKdldn.js";
|
|
3
|
+
import { n as h, st as g } from "./src-CACM3o--.js";
|
|
4
|
+
import { c as _, l as v, o as y } from "./socialIcons-BAiuHyJs.js";
|
|
5
|
+
import { B as b, C as x, R as ee, at as te, b as S, l as C, m as w, ot as T, v as E } from "./keys-CoQtCqNv.js";
|
|
6
|
+
import { C as D, E as O, S as k, _ as A, a as j, b as M, g as N, h as P, i as F, m as I, o as L, p as R, r as z, u as B, v as V, w as H } from "./composables-D0UYam2P.js";
|
|
7
|
+
import { t as U } from "./WrapperBlock-jTqsuLnS.js";
|
|
8
|
+
// src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var W = { class: "tpl:w-full" }, G = { class: "tpl:flex tpl:gap-0" }, K = /* @__PURE__ */ n({
|
|
10
|
+
name: "PreviewSectionBlock",
|
|
11
|
+
__name: "PreviewSectionBlock",
|
|
12
|
+
props: {
|
|
13
|
+
block: {},
|
|
14
|
+
viewport: {}
|
|
15
|
+
},
|
|
16
|
+
setup(e) {
|
|
17
|
+
let n = {
|
|
18
|
+
title: B,
|
|
19
|
+
paragraph: R,
|
|
20
|
+
image: P,
|
|
21
|
+
video: z,
|
|
22
|
+
button: M,
|
|
23
|
+
divider: A,
|
|
24
|
+
social: L,
|
|
25
|
+
menu: I,
|
|
26
|
+
table: F,
|
|
27
|
+
spacer: j,
|
|
28
|
+
html: N,
|
|
29
|
+
custom: V
|
|
30
|
+
}, i = e, h = o(C, null), g = d(() => {
|
|
31
|
+
switch (i.block.columns) {
|
|
32
|
+
case "2": return ["50%", "50%"];
|
|
33
|
+
case "3": return [
|
|
34
|
+
"33.33%",
|
|
35
|
+
"33.33%",
|
|
36
|
+
"33.33%"
|
|
37
|
+
];
|
|
38
|
+
case "1-2": return ["33.33%", "66.67%"];
|
|
39
|
+
case "2-1": return ["66.67%", "33.33%"];
|
|
40
|
+
default: return ["100%"];
|
|
41
|
+
}
|
|
42
|
+
}), _ = d(() => {
|
|
43
|
+
let e = g.value.length, t = [...i.block.children];
|
|
44
|
+
for (; t.length < e;) t.push([]);
|
|
45
|
+
return t.slice(0, e);
|
|
46
|
+
});
|
|
47
|
+
function v(e) {
|
|
48
|
+
return _.value[e] || [];
|
|
49
|
+
}
|
|
50
|
+
function y(e) {
|
|
51
|
+
return O(e, h, n);
|
|
52
|
+
}
|
|
53
|
+
return (e, n) => {
|
|
54
|
+
let i = m("PreviewSectionBlock", !0);
|
|
55
|
+
return r(), s("div", W, [u("div", G, [(r(!0), s(p, null, a(_.value, (e, n) => (r(), s("div", {
|
|
56
|
+
key: n,
|
|
57
|
+
style: f({ width: g.value[n] })
|
|
58
|
+
}, [(r(!0), s(p, null, a(v(n), (e) => (r(), s("div", {
|
|
59
|
+
key: e.id,
|
|
60
|
+
style: f(c(k)(e))
|
|
61
|
+
}, [e.type === "section" ? (r(), l(i, {
|
|
62
|
+
key: 0,
|
|
63
|
+
block: e,
|
|
64
|
+
viewport: "desktop"
|
|
65
|
+
}, null, 8, ["block"])) : (r(), l(t(y(e)), {
|
|
66
|
+
key: 1,
|
|
67
|
+
block: e,
|
|
68
|
+
viewport: "desktop"
|
|
69
|
+
}, null, 8, ["block"]))], 4))), 128))], 4))), 128))])]);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}), q = ["lang", "dir"], J = /*@__PURE__*/ n({
|
|
73
|
+
__name: "BlockPreviewCanvas",
|
|
74
|
+
props: {
|
|
75
|
+
blocks: {},
|
|
76
|
+
viewport: { default: "desktop" },
|
|
77
|
+
applyConditionFilter: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: !0
|
|
80
|
+
},
|
|
81
|
+
settings: { default: void 0 }
|
|
82
|
+
},
|
|
83
|
+
setup(e) {
|
|
84
|
+
let n = e, m = o(C), k = o(E, null), W = o(w, null), G = T(S, "BlockPreviewCanvas"), J = o(x, null), Y = o(b, h.liquid), X = o(ee, null);
|
|
85
|
+
i(te, d(() => X?.value ?? !1));
|
|
86
|
+
let Z = d(() => n.applyConditionFilter ? n.blocks.filter((e) => !W?.isHidden(e.id)) : n.blocks), Q = d(() => n.settings ?? k?.content.value.settings), $ = d(() => v(Q.value, n.viewport)), ne = d(() => Q.value ? H(Q.value, G.resolveFontFamily) : {}), re = d(() => Q.value?.locale?.trim() || void 0), ie = d(() => g(Q.value ?? { locale: "en" })), ae = d(() => Q.value?.backgroundColor || "var(--tpl-canvas-bg)"), oe = d(() => $.value + 192), se = {
|
|
87
|
+
section: K,
|
|
88
|
+
title: B,
|
|
89
|
+
paragraph: R,
|
|
90
|
+
image: P,
|
|
91
|
+
video: z,
|
|
92
|
+
button: M,
|
|
93
|
+
divider: A,
|
|
94
|
+
social: L,
|
|
95
|
+
menu: I,
|
|
96
|
+
table: F,
|
|
97
|
+
spacer: j,
|
|
98
|
+
html: N,
|
|
99
|
+
custom: V,
|
|
100
|
+
wrapper: U
|
|
101
|
+
};
|
|
102
|
+
function ce(e) {
|
|
103
|
+
return O(e, m, se);
|
|
104
|
+
}
|
|
105
|
+
function le(e) {
|
|
106
|
+
let t = Q.value;
|
|
107
|
+
return D(e, J, Y, y(e, t ? {
|
|
108
|
+
blocks: n.blocks,
|
|
109
|
+
settings: t
|
|
110
|
+
} : void 0));
|
|
111
|
+
}
|
|
112
|
+
return (n, i) => (r(), s("div", {
|
|
113
|
+
"data-testid": "block-preview-stage",
|
|
114
|
+
class: "tpl:pointer-events-none tpl:mx-auto tpl:flex tpl:select-none tpl:justify-center tpl:rounded-lg",
|
|
115
|
+
style: f({
|
|
116
|
+
width: `${oe.value}px`,
|
|
117
|
+
minWidth: `${$.value}px`,
|
|
118
|
+
maxWidth: "100%",
|
|
119
|
+
backgroundColor: ae.value,
|
|
120
|
+
boxShadow: "var(--tpl-shadow-sm)"
|
|
121
|
+
})
|
|
122
|
+
}, [u("div", {
|
|
123
|
+
"data-testid": "block-preview-canvas",
|
|
124
|
+
lang: re.value,
|
|
125
|
+
dir: ie.value,
|
|
126
|
+
style: f({
|
|
127
|
+
width: `${$.value}px`,
|
|
128
|
+
transition: c(_),
|
|
129
|
+
...ne.value
|
|
130
|
+
})
|
|
131
|
+
}, [(r(!0), s(p, null, a(Z.value, (n) => (r(), s("div", {
|
|
132
|
+
key: n.id,
|
|
133
|
+
style: f(le(n))
|
|
134
|
+
}, [(r(), l(t(ce(n)), {
|
|
135
|
+
block: n,
|
|
136
|
+
viewport: e.viewport
|
|
137
|
+
}, null, 8, ["block", "viewport"]))], 4))), 128))], 12, q)], 4));
|
|
138
|
+
}
|
|
139
|
+
}), Y = /* @__PURE__ */ e({ default: () => X }), X = J;
|
|
140
|
+
export { Y as n, X as t };
|
|
141
|
+
|
|
142
|
+
//# sourceMappingURL=BlockPreviewCanvas-RQFilqXC.js.map
|