@templatical/editor 0.59.2 → 0.60.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/dist/{AiAltTextPopover-BhWHOOKX.js → AiAltTextPopover-DiIaqDtB.js} +1 -1
- package/dist/{AiAltTextReview-CmW7pLmo.js → AiAltTextReview-DIe0WBbj.js} +1 -1
- package/dist/{AiChatPanel-CV0mCtad.js → AiChatPanel-aj2TPO9F.js} +8 -8
- package/dist/{AiPanels-C8M7q_vM.js → AiPanels-CRM3jf82.js} +1 -1
- package/dist/{AiRewriteMenu-DC2ZLH5L.js → AiRewriteMenu-F3GyXBsk.js} +8 -8
- package/dist/{BlockIssueBadge-B8sl9BM1.js → BlockIssueBadge-DlhA_I6J.js} +2 -2
- package/dist/{BlockPreviewCanvas-yhOQAQhJ.js → BlockPreviewCanvas-DYspUXMO.js} +19 -44
- package/dist/{CloudPanels-CD0lsL0R.js → CloudPanels-CAMn545-.js} +3 -3
- package/dist/{CollaborationNotices-DrMrP73M.js → CollaborationNotices-CnfS8BQy.js} +1 -1
- package/dist/{CollaboratorBar-TsK872uC.js → CollaboratorBar-DufLdLQP.js} +1 -1
- package/dist/{CommentsPanel-BX8JVrXU.js → CommentsPanel-C2hFFs0o.js} +1 -1
- package/dist/{CommentsSidebar-BUlseNwL.js → CommentsSidebar-CgEwxt2T.js} +10 -10
- package/dist/{CountdownToolbar-dx3FVRjh.js → CountdownToolbar-CNqYDevp.js} +4 -4
- package/dist/{IssuesPanel-BwnvXxBC.js → IssuesPanel-cPKhimE9.js} +9 -9
- package/dist/{LanguageMenu-Cf5bKocE.js → LanguageMenu-zxlpmw2x.js} +12 -12
- package/dist/{LocaleNotices-CGEp0pQ8.js → LocaleNotices-PIfpvCCI.js} +2 -2
- package/dist/{LogicTagInsertButton-BdDe-vrZ.js → LogicTagInsertButton-DqTkGJSR.js} +16 -16
- package/dist/{MediaEditModal-BWOqjEZN.js → MediaEditModal-C2Bn8WGb.js} +1 -1
- package/dist/{MediaPanels-C-XrldMu.js → MediaPanels-BAZByHRA.js} +1 -1
- package/dist/{MergeTagInput-CTTi-eB0.js → MergeTagInput-Jly1Pw0v.js} +1 -1
- package/dist/{MergeTagModeToggle-Bd0svGQm.js → MergeTagModeToggle-5kaFLRAm.js} +4 -4
- package/dist/{MergeTagTextarea-DiahMV-3.js → MergeTagTextarea-CCfirhcR.js} +5 -5
- package/dist/{ParagraphEditor-Db1cmj8Y.js → ParagraphEditor-DTdnxgDZ.js} +43 -43
- package/dist/{RestoreVersionDialog-DA1Z0q9Z.js → RestoreVersionDialog-cUYu3Xqs.js} +3 -3
- package/dist/{RichTextEditorContent-CyO6e4ZG.js → RichTextEditorContent-Aub9tOHF.js} +4 -4
- package/dist/{SaveBlockDialog-D7SaFxa_.js → SaveBlockDialog-D_ie3uIF.js} +7 -7
- package/dist/{SavedBlocksBrowserModal-B5r3LWWG.js → SavedBlocksBrowserModal-fhSnYT1l.js} +9 -9
- package/dist/{SavedBlocksPanels-BH2f7jm-.js → SavedBlocksPanels-Lklqy4XI.js} +1 -1
- package/dist/{SavedBlocksPickBar-B24TScw0.js → SavedBlocksPickBar-CpWkCa8G.js} +2 -2
- package/dist/{TemplateSettings-CuN9Vkl_.js → TemplateSettings-BJ4a8RBr.js} +8 -8
- package/dist/{TestEmailModal-C4DAaohi.js → TestEmailModal-BEoapoDc.js} +8 -8
- package/dist/{TestEmailPanel-DoMcVJSE.js → TestEmailPanel-DgyzokCf.js} +1 -1
- package/dist/{TitleEditor-b5Pr_m9j.js → TitleEditor-BQoSPgOi.js} +9 -9
- package/dist/{Toolbar-BOf7Y862.js → Toolbar-KhPpWyX1.js} +857 -756
- package/dist/{TplModal-DAcXzBJh.js → TplModal-F_kA7luG.js} +1 -1
- package/dist/{VersionHistoryMenu-TbIGteNi.js → VersionHistoryMenu-Bz4G8cNm.js} +5 -5
- package/dist/{VersionHistoryPanels-Ia6ipOqG.js → VersionHistoryPanels-DmVRyWv9.js} +1 -1
- package/dist/{VersionPreviewBanner-CRfu6quf.js → VersionPreviewBanner-BeppXZyn.js} +1 -1
- package/dist/{WrapperBlock-BZenrXM6.js → WrapperBlock-Ds7yfbhg.js} +3 -3
- package/dist/{blockTypeIcons-DdYZy8yG.js → blockTypeIcons-Do1QqDjg.js} +3 -3
- package/dist/bundle-stats.json +6 -6
- package/dist/{cdn/chunks/ca-YfIxwO1G.js → ca-Ce3NmK9v.js} +6 -3
- package/dist/cdn/chunks/{AiAltTextPopover-CcX_OMUU.js → AiAltTextPopover-CUzIaLRK.js} +2 -2
- package/dist/cdn/chunks/AiAltTextPopover-CUzIaLRK.js.map +1 -0
- package/dist/cdn/chunks/{AiAltTextReview-Dmm3h0jd.js → AiAltTextReview-BXBlE71X.js} +2 -2
- package/dist/cdn/chunks/AiAltTextReview-BXBlE71X.js.map +1 -0
- package/dist/cdn/chunks/{AiChatPanel-DV23DJ-2.js → AiChatPanel-BKydciDQ.js} +2 -2
- package/dist/cdn/chunks/AiChatPanel-BKydciDQ.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-CxhOpMAp.js → AiPanels-De-cIZ4p.js} +2 -2
- package/dist/cdn/chunks/AiPanels-De-cIZ4p.js.map +1 -0
- package/dist/cdn/chunks/{AiRewriteMenu-87-O514r.js → AiRewriteMenu-C9vBUTIB.js} +6 -6
- package/dist/cdn/chunks/AiRewriteMenu-C9vBUTIB.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-Dp06vQd3.js → BlockIssueBadge-B3CTTvgw.js} +2 -2
- package/dist/cdn/chunks/BlockIssueBadge-B3CTTvgw.js.map +1 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-DQGzUvZ5.js → BlockPreviewCanvas-B4Bj--kc.js} +20 -45
- package/dist/cdn/chunks/BlockPreviewCanvas-B4Bj--kc.js.map +1 -0
- package/dist/cdn/chunks/CloudHeaderExtras-Cd-ePldd.js.map +1 -1
- package/dist/cdn/chunks/{CloudPanels-D8fchoYt.js → CloudPanels-CQ75I3hQ.js} +3 -3
- package/dist/cdn/chunks/CloudPanels-CQ75I3hQ.js.map +1 -0
- package/dist/cdn/chunks/{CollaborationNotices-DNEs3g9B.js → CollaborationNotices-CgLea-hu.js} +2 -2
- package/dist/cdn/chunks/CollaborationNotices-CgLea-hu.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CN6XAlbn.js → CollaboratorBar-CjRcbebT.js} +2 -2
- package/dist/cdn/chunks/CollaboratorBar-CjRcbebT.js.map +1 -0
- package/dist/cdn/chunks/{CommentsPanel-CxZ1kFcK.js → CommentsPanel-D_ud9GMN.js} +2 -2
- package/dist/cdn/chunks/CommentsPanel-D_ud9GMN.js.map +1 -0
- package/dist/cdn/chunks/{CommentsSidebar-DCr2mV8b.js → CommentsSidebar-CXn1EGAI.js} +2 -2
- package/dist/cdn/chunks/CommentsSidebar-CXn1EGAI.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock--hlKE2aj.js.map +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CUTbVPPV.js → CountdownToolbar-BOyk_4k7.js} +5 -5
- package/dist/cdn/chunks/CountdownToolbar-BOyk_4k7.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-BhcSzwuL.js → IssuesPanel-DOC94ZsH.js} +4 -4
- package/dist/cdn/chunks/IssuesPanel-DOC94ZsH.js.map +1 -0
- package/dist/cdn/chunks/{LanguageMenu-6wGhkyFT.js → LanguageMenu-DktneIpL.js} +7 -7
- package/dist/cdn/chunks/LanguageMenu-DktneIpL.js.map +1 -0
- package/dist/cdn/chunks/{LocaleNotices-Br92Xueo.js → LocaleNotices-B2NgnHoP.js} +2 -2
- package/dist/cdn/chunks/LocaleNotices-B2NgnHoP.js.map +1 -0
- package/dist/cdn/chunks/{LogicTagInsertButton-r2EVUtDU.js → LogicTagInsertButton-CQ8RiOou.js} +5 -5
- package/dist/cdn/chunks/LogicTagInsertButton-CQ8RiOou.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-CfgN7Jyi.js → MediaEditModal-Cs7_Om7e.js} +2 -2
- package/dist/cdn/chunks/MediaEditModal-Cs7_Om7e.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-Cb5vsgb-.js → MediaPanels-BeekGmql.js} +2 -2
- package/dist/cdn/chunks/MediaPanels-BeekGmql.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagInput-Dh3N6CEV.js → MergeTagInput-D7FZ0ca0.js} +2 -2
- package/dist/cdn/chunks/MergeTagInput-D7FZ0ca0.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagModeToggle-D6u3hMrI.js → MergeTagModeToggle-CySCCEDs.js} +3 -3
- package/dist/cdn/chunks/MergeTagModeToggle-CySCCEDs.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagTextarea-BpVtpiNL.js → MergeTagTextarea-DJbWTYVH.js} +7 -7
- package/dist/cdn/chunks/MergeTagTextarea-DJbWTYVH.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-DGJmPAC1.js → ParagraphEditor-DAQUWqQJ.js} +23 -23
- package/dist/cdn/chunks/ParagraphEditor-DAQUWqQJ.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-D5qeCa0F.js → RestoreVersionDialog-COTRe_rM.js} +3 -3
- package/dist/cdn/chunks/RestoreVersionDialog-COTRe_rM.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DyGiXKKI.js → RichTextEditorContent-DeWPMd9V.js} +4 -4
- package/dist/cdn/chunks/RichTextEditorContent-DeWPMd9V.js.map +1 -0
- package/dist/cdn/chunks/{SaveBlockDialog-B0TJYxd8.js → SaveBlockDialog-adQMbKR1.js} +6 -6
- package/dist/cdn/chunks/SaveBlockDialog-adQMbKR1.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D8Ly7LrA.js → SavedBlocksBrowserModal-CGIFCRAx.js} +6 -6
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CGIFCRAx.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-Co1cbWR8.js → SavedBlocksPanels-Du0RYlEf.js} +2 -2
- package/dist/cdn/chunks/SavedBlocksPanels-Du0RYlEf.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPickBar-DNtVbpm-.js → SavedBlocksPickBar-DmleyUrn.js} +3 -3
- package/dist/cdn/chunks/SavedBlocksPickBar-DmleyUrn.js.map +1 -0
- package/dist/cdn/chunks/{TemplateSettings-BRc878ZF.js → TemplateSettings-Csjef99q.js} +6 -6
- package/dist/cdn/chunks/TemplateSettings-Csjef99q.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-CIui7VfS.js → TestEmailModal-ClkexOtF.js} +7 -7
- package/dist/cdn/chunks/TestEmailModal-ClkexOtF.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-vKvruW_r.js → TestEmailPanel-DYEYzhU2.js} +2 -2
- package/dist/cdn/chunks/TestEmailPanel-DYEYzhU2.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-BI-9Nnj3.js → TitleEditor-opvaIgVr.js} +8 -8
- package/dist/cdn/chunks/TitleEditor-opvaIgVr.js.map +1 -0
- package/dist/cdn/chunks/ToggleSwitch-C0w0srN_.js.map +1 -1
- package/dist/cdn/chunks/{Toolbar-CYnnArxv.js → Toolbar-DbqkKRXy.js} +771 -670
- package/dist/cdn/chunks/Toolbar-DbqkKRXy.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-B3nZeGWK.js → TplModal-DLV5OeMD.js} +2 -2
- package/dist/cdn/chunks/TplModal-DLV5OeMD.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-CMGfAKuV.js → VersionHistoryMenu-DBd0zwjE.js} +2 -2
- package/dist/cdn/chunks/VersionHistoryMenu-DBd0zwjE.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-Bb2ouQg7.js → VersionHistoryPanels-hy_Ybxie.js} +2 -2
- package/dist/cdn/chunks/VersionHistoryPanels-hy_Ybxie.js.map +1 -0
- package/dist/cdn/chunks/{VersionPreviewBanner-573UP-g4.js → VersionPreviewBanner-D-yHxWWY.js} +2 -2
- package/dist/cdn/chunks/VersionPreviewBanner-D-yHxWWY.js.map +1 -0
- package/dist/cdn/chunks/{WrapperBlock-DVu632LD.js → WrapperBlock-Ce_k8m_x.js} +4 -4
- package/dist/cdn/chunks/WrapperBlock-Ce_k8m_x.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-CGxNYHVA.js → blockTypeIcons-DBoP1HkR.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-CGxNYHVA.js.map → blockTypeIcons-DBoP1HkR.js.map} +1 -1
- package/dist/{ca-YfIxwO1G.js → cdn/chunks/ca-Ce3NmK9v.js} +8 -1
- package/dist/cdn/chunks/ca-Ce3NmK9v.js.map +1 -0
- package/dist/cdn/chunks/{composables-DY3anqHO.js → composables-Brr4m0Sg.js} +566 -591
- package/dist/cdn/chunks/composables-Brr4m0Sg.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-B5numxlW.js → createCloudRuntime-QPeg45XL.js} +3 -3
- package/dist/cdn/chunks/{createCloudRuntime-B5numxlW.js.map → createCloudRuntime-QPeg45XL.js.map} +1 -1
- package/dist/cdn/chunks/{da-CM6DCvRG.js → da-4YwDAuEr.js} +7 -2
- package/dist/cdn/chunks/da-4YwDAuEr.js.map +1 -0
- package/dist/{de-Dugz1zXC.js → cdn/chunks/de-BlQ0vdZJ.js} +8 -1
- package/dist/cdn/chunks/de-BlQ0vdZJ.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-CXSSZplR.js → editor-modal-BCcbvIxc.js} +4 -4
- package/dist/cdn/chunks/editor-modal-BCcbvIxc.js.map +1 -0
- package/dist/cdn/chunks/en-DkulseE1.js +1 -0
- package/dist/{en-BykoFuFY.js → cdn/chunks/en-MlNeQVSG.js} +8 -1
- package/dist/cdn/chunks/en-MlNeQVSG.js.map +1 -0
- package/dist/{es-DaWsTkpj.js → cdn/chunks/es-2s8x4OM2.js} +8 -1
- package/dist/cdn/chunks/es-2s8x4OM2.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BWVlr8Ga.js → extensions-BpuyqKVY.js} +5 -5
- package/dist/cdn/chunks/extensions-BpuyqKVY.js.map +1 -0
- package/dist/{fr-DqwQHtJo.js → cdn/chunks/fr-D3MjrsgQ.js} +8 -1
- package/dist/cdn/chunks/fr-D3MjrsgQ.js.map +1 -0
- package/dist/cdn/chunks/{icons-C7vjUBLn.js → icons-BJ6AtVgu.js} +23 -23
- package/dist/cdn/chunks/{icons-C7vjUBLn.js.map → icons-BJ6AtVgu.js.map} +1 -1
- package/dist/cdn/chunks/{ja-BH4MS1Ye.js → ja-B4Kx7uBX.js} +7 -2
- package/dist/cdn/chunks/ja-B4Kx7uBX.js.map +1 -0
- package/dist/{nl-BQl1_UHv.js → cdn/chunks/nl-U65iX7wN.js} +8 -1
- package/dist/cdn/chunks/nl-U65iX7wN.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-Dw3rFvyd.js → normalizeMergeTagMarkup-B81BAWKT.js} +64 -64
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-Dw3rFvyd.js.map → normalizeMergeTagMarkup-B81BAWKT.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-BGtb8Xbp.js → preRenderCustomBlocks-CQuaMxuv.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-BGtb8Xbp.js.map → preRenderCustomBlocks-CQuaMxuv.js.map} +1 -1
- package/dist/{pt-BR-eyzmU9Vs.js → cdn/chunks/pt-BR-_jsX1xLv.js} +8 -1
- package/dist/cdn/chunks/pt-BR-_jsX1xLv.js.map +1 -0
- package/dist/cdn/chunks/{sanitizeHtml-CLRY8s2s.js → sanitizeHtml-BdAjvU9I.js} +2 -2
- package/dist/cdn/chunks/{sanitizeHtml-CLRY8s2s.js.map → sanitizeHtml-BdAjvU9I.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-kYhdXJ9P.js → socialIcons-Df9dNe7I.js} +495 -517
- package/dist/cdn/chunks/socialIcons-Df9dNe7I.js.map +1 -0
- package/dist/cdn/chunks/{src-BmzzkUf7.js → src-B3v_3j9b.js} +436 -404
- package/dist/cdn/chunks/src-B3v_3j9b.js.map +1 -0
- package/dist/cdn/chunks/{src-DY2kMjoD.js → src-BHgVGOTi.js} +771 -667
- package/dist/cdn/chunks/src-BHgVGOTi.js.map +1 -0
- package/dist/cdn/chunks/src-C5V_yzAU.js +673 -0
- package/dist/cdn/chunks/src-C5V_yzAU.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-B7gxx0aJ.js → tiptap-D9amDW4u.js} +1030 -1027
- package/dist/cdn/chunks/tiptap-D9amDW4u.js.map +1 -0
- package/dist/cdn/chunks/useLocalizedDisplay-C3lIetmX.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-B5wMJLru.js.map → useLocalizedDisplay-C3lIetmX.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-0wkSxy3z.js → useLogicTag-DOIlsGk8.js} +2 -2
- package/dist/cdn/chunks/{useLogicTag-0wkSxy3z.js.map → useLogicTag-DOIlsGk8.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-y3bX8M_6.js → useMergeTag-DUNl364g.js} +2 -2
- package/dist/cdn/chunks/{useMergeTag-y3bX8M_6.js.map → useMergeTag-DUNl364g.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-B42BKo9N.js → withCurrentFont-ufGLu2Vt.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-B42BKo9N.js.map → withCurrentFont-ufGLu2Vt.js.map} +1 -1
- package/dist/cdn/editor.js +109 -109
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-ErKdPXG6.js → check-CWq6Nfjj.js} +1 -1
- package/dist/{chevron-down-C_vv5fZE.js → chevron-down-B9t0SK_-.js} +1 -1
- package/dist/{chevron-right-Cw4GpjFA.js → chevron-right-B_qslOCS.js} +1 -1
- package/dist/{chevron-up-uijYZoph.js → chevron-up-CxZ2teV2.js} +1 -1
- package/dist/{circle-exclamation-point-CIYHx5Tw.js → circle-exclamation-point-B1tbhkNb.js} +1 -1
- package/dist/{clock-tnC1IvZk.js → clock-Rw4btQn-.js} +1 -1
- package/dist/{composables-CFTH0Nqb.js → composables-5KJV0O9T.js} +914 -939
- package/dist/{createCloudRuntime-BvWlm_38.js → createCloudRuntime-BdoKeYJi.js} +2 -2
- package/dist/{createLucideIcon-CssArtUe.js → createLucideIcon-B6Zkn9r0.js} +5 -5
- package/dist/{da-CM6DCvRG.js → da-4YwDAuEr.js} +6 -1
- package/dist/{cdn/chunks/de-Dugz1zXC.js → de-BlQ0vdZJ.js} +6 -3
- package/dist/dist-AyAOL8Bj.js +4 -0
- package/dist/{dist-BTUMr4Pb.js → dist-BNrGwgev.js} +2 -2
- package/dist/{dist-CsplpC_6.js → dist-BPVNNdTv.js} +2 -2
- package/dist/{dist-bWIkrMkM.js → dist-C7YLw60i.js} +2 -2
- package/dist/{dist-Clfx1JeL.js → dist-CBnAqr27.js} +2 -2
- package/dist/{dist-CkHJRChP.js → dist-COvAA64n.js} +2 -2
- package/dist/{dist-C-NRkFsp.js → dist-CuRjmtWu.js} +5 -5
- package/dist/{dist-HKEDfp__.js → dist-DG_AWt8v.js} +2 -2
- package/dist/{dist-DY3WbyCO.js → dist-DYtuc3jc.js} +2 -2
- package/dist/dist-DkPTWQuO.js +4 -0
- package/dist/{dist-DwpKFWF4.js → dist-DoWk1r7z.js} +77 -74
- package/dist/{dist-CMo4K5So.js → dist-DsA7NeIy.js} +798 -696
- package/dist/{dist-BlrlMP8f.js → dist-fDsB6dCL.js} +2 -2
- package/dist/{editor-modal-BWvxfSj8.js → editor-modal-_ylhrf4g.js} +15 -15
- package/dist/en-DwxgN_-Y.js +1 -0
- package/dist/{cdn/chunks/en-BykoFuFY.js → en-MlNeQVSG.js} +6 -3
- package/dist/{cdn/chunks/es-DaWsTkpj.js → es-2s8x4OM2.js} +6 -3
- package/dist/{extensions-BPVackEE.js → extensions-DCJGAZ9z.js} +73 -73
- package/dist/{eye-DK4--qHk.js → eye-BE-DeEqG.js} +1 -1
- package/dist/{cdn/chunks/fr-DqwQHtJo.js → fr-D3MjrsgQ.js} +6 -3
- package/dist/{image-B5pJOw5Q.js → image-DfRxUmUh.js} +1 -1
- package/dist/index.d.ts +37 -7
- package/dist/{info-DKM0_thN.js → info-D1PS-81D.js} +1 -1
- package/dist/{ja-BH4MS1Ye.js → ja-B4Kx7uBX.js} +6 -1
- package/dist/{link-BNgTZ_Sw.js → link-DLaACaIz.js} +1 -1
- package/dist/{list-Bqynqm7o.js → list-CvtzVlvM.js} +1 -1
- package/dist/{loader-circle-BMc3fVpa.js → loader-circle-DCkSXApP.js} +1 -1
- package/dist/{message-circle-D_TpvAJh.js → message-circle-Bj4F9bBO.js} +1 -1
- package/dist/{cdn/chunks/nl-BQl1_UHv.js → nl-U65iX7wN.js} +6 -3
- package/dist/{normalizeMergeTagMarkup-PQqrbfmt.js → normalizeMergeTagMarkup-B7n_-4Dz.js} +45 -45
- package/dist/{package-D2fov5PU.js → package-By1au8Wi.js} +1 -1
- package/dist/{pencil-BNdkJyfY.js → pencil-T4qqyRLl.js} +1 -1
- package/dist/{plus-CWmBmMx-.js → plus-3Zry-1gs.js} +1 -1
- package/dist/{preRenderCustomBlocks-Dg5GBNi2.js → preRenderCustomBlocks-D3GzENVB.js} +3 -3
- package/dist/{cdn/chunks/pt-BR-eyzmU9Vs.js → pt-BR-_jsX1xLv.js} +6 -3
- package/dist/{refresh-cw-Ryg1j66N.js → refresh-cw-BwaO0ioc.js} +1 -1
- package/dist/{rotate-ccw-D8j7gXXv.js → rotate-ccw-C3E0W5q-.js} +1 -1
- package/dist/{sanitizeHtml-DVdfdxOz.js → sanitizeHtml-BcbjlypU.js} +6 -6
- package/dist/{search-CX2JkSHz.js → search-DfExisVv.js} +1 -1
- package/dist/{send-BLR1b-p5.js → send-FRC7Giap.js} +1 -1
- package/dist/{smartphone-Co8m0LLg.js → smartphone-BlYU_z_x.js} +1 -1
- package/dist/{socialIcons-DBHv_ntg.js → socialIcons-By2LPWOQ.js} +561 -583
- package/dist/{sparkles-Dc3Undp5.js → sparkles-DSi61skE.js} +1 -1
- package/dist/{square-CPw_cyX8.js → square-DEE8tT2w.js} +1 -1
- package/dist/templatical-editor.js +139 -139
- package/dist/{text-align-start-2VZGhCiK.js → text-align-start-DGdrmKcG.js} +1 -1
- package/dist/{trash-t6XXliVc.js → trash-YZPJMZc7.js} +1 -1
- package/dist/{triangle-exclamation-point-_YYWE2ZH.js → triangle-exclamation-point-BR-W6pQm.js} +1 -1
- package/dist/{upload-BWYXWYHb.js → upload-B_Eoqj-4.js} +1 -1
- package/dist/useLocalizedDisplay-_P6-hXaO.js +31 -0
- package/dist/{useLogicTag-CVOj0VUv.js → useLogicTag-f0SJ1Cd2.js} +1 -1
- package/dist/{useMergeTag-Bams_kam.js → useMergeTag-0-EudwkV.js} +3 -3
- package/dist/{useScrollToBlock-CwUQ_nKz.js → useScrollToBlock-CtM_ydOS.js} +1 -1
- package/dist/withCurrentFont-BOg3jmCT.js +18 -0
- package/dist/{x-CTKOxIyZ.js → x-C0X5MoK3.js} +1 -1
- package/package.json +22 -22
- package/dist/cdn/chunks/AiAltTextPopover-CcX_OMUU.js.map +0 -1
- package/dist/cdn/chunks/AiAltTextReview-Dmm3h0jd.js.map +0 -1
- package/dist/cdn/chunks/AiChatPanel-DV23DJ-2.js.map +0 -1
- package/dist/cdn/chunks/AiPanels-CxhOpMAp.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-87-O514r.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-Dp06vQd3.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-DQGzUvZ5.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-D8fchoYt.js.map +0 -1
- package/dist/cdn/chunks/CollaborationNotices-DNEs3g9B.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-CN6XAlbn.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-CxZ1kFcK.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-DCr2mV8b.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-CUTbVPPV.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-BhcSzwuL.js.map +0 -1
- package/dist/cdn/chunks/LanguageMenu-6wGhkyFT.js.map +0 -1
- package/dist/cdn/chunks/LocaleNotices-Br92Xueo.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-r2EVUtDU.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-CfgN7Jyi.js.map +0 -1
- package/dist/cdn/chunks/MediaPanels-Cb5vsgb-.js.map +0 -1
- package/dist/cdn/chunks/MergeTagInput-Dh3N6CEV.js.map +0 -1
- package/dist/cdn/chunks/MergeTagModeToggle-D6u3hMrI.js.map +0 -1
- package/dist/cdn/chunks/MergeTagTextarea-BpVtpiNL.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DGJmPAC1.js.map +0 -1
- package/dist/cdn/chunks/RestoreVersionDialog-D5qeCa0F.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-DyGiXKKI.js.map +0 -1
- package/dist/cdn/chunks/SaveBlockDialog-B0TJYxd8.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-D8Ly7LrA.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-Co1cbWR8.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPickBar-DNtVbpm-.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-BRc878ZF.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-CIui7VfS.js.map +0 -1
- package/dist/cdn/chunks/TestEmailPanel-vKvruW_r.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BI-9Nnj3.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-CYnnArxv.js.map +0 -1
- package/dist/cdn/chunks/TplModal-B3nZeGWK.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryMenu-CMGfAKuV.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryPanels-Bb2ouQg7.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-573UP-g4.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-DVu632LD.js.map +0 -1
- package/dist/cdn/chunks/ca-YfIxwO1G.js.map +0 -1
- package/dist/cdn/chunks/composables-DY3anqHO.js.map +0 -1
- package/dist/cdn/chunks/da-CM6DCvRG.js.map +0 -1
- package/dist/cdn/chunks/de-Dugz1zXC.js.map +0 -1
- package/dist/cdn/chunks/editor-modal-CXSSZplR.js.map +0 -1
- package/dist/cdn/chunks/en-BykoFuFY.js.map +0 -1
- package/dist/cdn/chunks/en-DYMYt1TN.js +0 -1
- package/dist/cdn/chunks/es-DaWsTkpj.js.map +0 -1
- package/dist/cdn/chunks/extensions-BWVlr8Ga.js.map +0 -1
- package/dist/cdn/chunks/fr-DqwQHtJo.js.map +0 -1
- package/dist/cdn/chunks/ja-BH4MS1Ye.js.map +0 -1
- package/dist/cdn/chunks/nl-BQl1_UHv.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-eyzmU9Vs.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-kYhdXJ9P.js.map +0 -1
- package/dist/cdn/chunks/src-B7X7x_ST.js +0 -707
- package/dist/cdn/chunks/src-B7X7x_ST.js.map +0 -1
- package/dist/cdn/chunks/src-BmzzkUf7.js.map +0 -1
- package/dist/cdn/chunks/src-DY2kMjoD.js.map +0 -1
- package/dist/cdn/chunks/tiptap-B7gxx0aJ.js.map +0 -1
- package/dist/cdn/chunks/useLocalizedDisplay-B5wMJLru.js +0 -33
- package/dist/dist-CkIeJEsa.js +0 -4
- package/dist/dist-eAgG-nCb.js +0 -4
- package/dist/en-DvCaYqiR.js +0 -1
- package/dist/useLocalizedDisplay-CbFM0cCV.js +0 -31
- package/dist/withCurrentFont-y0O5kOLW.js +0 -18
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockPreviewCanvas-DQGzUvZ5.js","names":["_hoisted_1","TitleBlock","ParagraphBlock","ImageBlock","VideoBlock","ButtonBlock","DividerBlock","SocialIconsBlock","MenuBlock","TableBlock","SpacerBlock","HtmlBlock","CustomBlock","_resolveComponent","_openBlock","_createElementBlock","_createElementVNode","_Fragment","_renderList","_normalizeStyle","_unref","_createBlock","_resolveDynamicComponent","_sfc_main","PreviewSectionBlock","TitleBlock","ParagraphBlock","ImageBlock","VideoBlock","ButtonBlock","DividerBlock","SocialIconsBlock","MenuBlock","TableBlock","SpacerBlock","HtmlBlock","CustomBlock","WrapperBlock","_openBlock","_createElementBlock","_normalizeStyle","_createElementVNode","_unref","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_sfc_main","__exportAll","resolveDynamicComponent","defineComponent","openBlock","provide","renderList","inject","createElementBlock","unref","createBlock","createBaseVNode","computed","normalizeStyle","Fragment","resolveComponent","getDocumentStyle","resolveBlockComponent","getCachedBlockWrapperStyle","DividerBlock_default","SpacerBlock_default","HtmlBlock_default","ImageBlock_default","TableBlock_default","MenuBlock_default","SocialIconsBlock_default","ParagraphBlock_default","VideoBlock_default","TitleBlock_default","CustomBlock_default","getBlockWrapperStyle","EMAIL_FRAME_WIDTH_VAR","MERGE_TAG_SYNTAX_KEY","IMAGE_URL_RESOLVER_KEY","MERGE_TAG_SAMPLE_MODE_KEY","READ_ONLY_SURFACE_KEY","FONTS_MANAGER_KEY","SHOWS_RESOLVED_PREVIEW_KEY","BLOCK_REGISTRY_KEY","USE_MERGE_TAG_SAMPLES_KEY","CONDITION_PREVIEW_KEY","requireInject","EDITOR_KEY","WrapperBlock_default","EMAIL_FRAME_WIDTH_TRANSITION","getEmailFrameWidth","matchImageBoxWidth","resolveContentDirection","_hoisted_1$1","_hoisted_2","PreviewSectionBlock_default","previewBlockComponentMap","ButtonBlock_default","props","__props","blockRegistry","columnWidths","columns","count","children","getColumnBlocks","colIndex","getBlockComponent","block","_component_PreviewSectionBlock","childBlock","_hoisted_1","BlockPreviewCanvas_vue_vue_type_script_setup_true_lang_default","editor","conditionPreview","fontsManager","imageUrlResolver","mergeTagSyntax","SYNTAX_PRESETS","mergeTagSampleMode","visibleBlocks","previewSettings","frameWidth","documentStyle","contentLang","contentDir","emailBackground","stageWidth","previewComponentMap","previewBlockStyle","settings","BlockPreviewCanvas_exports","BlockPreviewCanvas_default"],"sources":["../../../src/components/blocks/PreviewSectionBlock.vue","../../../src/components/blocks/PreviewSectionBlock.vue","../../../src/components/BlockPreviewCanvas.vue","../../../src/components/BlockPreviewCanvas.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport ButtonBlock from \"./ButtonBlock.vue\";\nimport CustomBlock from \"./CustomBlock.vue\";\nimport DividerBlock from \"./DividerBlock.vue\";\nimport HtmlBlock from \"./HtmlBlock.vue\";\nimport ImageBlock from \"./ImageBlock.vue\";\nimport MenuBlock from \"./MenuBlock.vue\";\nimport SocialIconsBlock from \"./SocialIconsBlock.vue\";\nimport SpacerBlock from \"./SpacerBlock.vue\";\nimport TableBlock from \"./TableBlock.vue\";\nimport TitleBlock from \"./TitleBlock.vue\";\nimport ParagraphBlock from \"./ParagraphBlock.vue\";\nimport VideoBlock from \"./VideoBlock.vue\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n SectionBlock as SectionBlockType,\n} from \"@templatical/types\";\nimport { computed, inject, type Component } from \"vue\";\nimport { BLOCK_REGISTRY_KEY } from \"../../keys\";\n\nconst previewBlockComponentMap: Record<string, Component> = {\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nconst props = defineProps<{\n block: SectionBlockType;\n viewport: \"desktop\";\n}>();\n\ndefineOptions({ name: \"PreviewSectionBlock\" });\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\n\nconst columnWidths = computed(() => {\n switch (props.block.columns) {\n case \"2\":\n return [\"50%\", \"50%\"];\n case \"3\":\n return [\"33.33%\", \"33.33%\", \"33.33%\"];\n case \"4\":\n return [\"25%\", \"25%\", \"25%\", \"25%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n case \"1-3\":\n return [\"25%\", \"75%\"];\n case \"3-1\":\n return [\"75%\", \"25%\"];\n case \"1-2-1\":\n return [\"25%\", \"50%\", \"25%\"];\n default:\n return [\"100%\"];\n }\n});\n\nconst columns = computed(() => {\n const count = columnWidths.value.length;\n const children = [...props.block.children];\n while (children.length < count) {\n children.push([]);\n }\n return children.slice(0, count);\n});\n\nfunction getColumnBlocks(colIndex: number): Block[] {\n return columns.value[colIndex] || [];\n}\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewBlockComponentMap);\n}\n</script>\n\n<template>\n <div class=\"tpl:w-full\">\n <div class=\"tpl:flex tpl:gap-0\">\n <div\n v-for=\"(_, colIndex) in columns\"\n :key=\"colIndex\"\n :style=\"{ width: columnWidths[colIndex] }\"\n >\n <div\n v-for=\"childBlock in getColumnBlocks(colIndex)\"\n :key=\"childBlock.id\"\n :style=\"getBlockWrapperStyle(childBlock)\"\n >\n <!-- Recursive self-reference for nested sections -->\n <PreviewSectionBlock\n v-if=\"childBlock.type === 'section'\"\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n <component\n :is=\"getBlockComponent(childBlock)\"\n v-else\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./ButtonBlock.vue\";\nimport CustomBlock from \"./CustomBlock.vue\";\nimport DividerBlock from \"./DividerBlock.vue\";\nimport HtmlBlock from \"./HtmlBlock.vue\";\nimport ImageBlock from \"./ImageBlock.vue\";\nimport MenuBlock from \"./MenuBlock.vue\";\nimport SocialIconsBlock from \"./SocialIconsBlock.vue\";\nimport SpacerBlock from \"./SpacerBlock.vue\";\nimport TableBlock from \"./TableBlock.vue\";\nimport TitleBlock from \"./TitleBlock.vue\";\nimport ParagraphBlock from \"./ParagraphBlock.vue\";\nimport VideoBlock from \"./VideoBlock.vue\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n SectionBlock as SectionBlockType,\n} from \"@templatical/types\";\nimport { computed, inject, type Component } from \"vue\";\nimport { BLOCK_REGISTRY_KEY } from \"../../keys\";\n\nconst previewBlockComponentMap: Record<string, Component> = {\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nconst props = defineProps<{\n block: SectionBlockType;\n viewport: \"desktop\";\n}>();\n\ndefineOptions({ name: \"PreviewSectionBlock\" });\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\n\nconst columnWidths = computed(() => {\n switch (props.block.columns) {\n case \"2\":\n return [\"50%\", \"50%\"];\n case \"3\":\n return [\"33.33%\", \"33.33%\", \"33.33%\"];\n case \"4\":\n return [\"25%\", \"25%\", \"25%\", \"25%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n case \"1-3\":\n return [\"25%\", \"75%\"];\n case \"3-1\":\n return [\"75%\", \"25%\"];\n case \"1-2-1\":\n return [\"25%\", \"50%\", \"25%\"];\n default:\n return [\"100%\"];\n }\n});\n\nconst columns = computed(() => {\n const count = columnWidths.value.length;\n const children = [...props.block.children];\n while (children.length < count) {\n children.push([]);\n }\n return children.slice(0, count);\n});\n\nfunction getColumnBlocks(colIndex: number): Block[] {\n return columns.value[colIndex] || [];\n}\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewBlockComponentMap);\n}\n</script>\n\n<template>\n <div class=\"tpl:w-full\">\n <div class=\"tpl:flex tpl:gap-0\">\n <div\n v-for=\"(_, colIndex) in columns\"\n :key=\"colIndex\"\n :style=\"{ width: columnWidths[colIndex] }\"\n >\n <div\n v-for=\"childBlock in getColumnBlocks(colIndex)\"\n :key=\"childBlock.id\"\n :style=\"getBlockWrapperStyle(childBlock)\"\n >\n <!-- Recursive self-reference for nested sections -->\n <PreviewSectionBlock\n v-if=\"childBlock.type === 'section'\"\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n <component\n :is=\"getBlockComponent(childBlock)\"\n v-else\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./blocks/ButtonBlock.vue\";\nimport CustomBlock from \"./blocks/CustomBlock.vue\";\nimport DividerBlock from \"./blocks/DividerBlock.vue\";\nimport HtmlBlock from \"./blocks/HtmlBlock.vue\";\nimport ImageBlock from \"./blocks/ImageBlock.vue\";\nimport MenuBlock from \"./blocks/MenuBlock.vue\";\nimport PreviewSectionBlock from \"./blocks/PreviewSectionBlock.vue\";\nimport SocialIconsBlock from \"./blocks/SocialIconsBlock.vue\";\nimport SpacerBlock from \"./blocks/SpacerBlock.vue\";\nimport TableBlock from \"./blocks/TableBlock.vue\";\nimport TitleBlock from \"./blocks/TitleBlock.vue\";\nimport ParagraphBlock from \"./blocks/ParagraphBlock.vue\";\nimport VideoBlock from \"./blocks/VideoBlock.vue\";\nimport WrapperBlock from \"./blocks/WrapperBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n FONTS_MANAGER_KEY,\n IMAGE_URL_RESOLVER_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n MERGE_TAG_SYNTAX_KEY,\n READ_ONLY_SURFACE_KEY,\n SHOWS_RESOLVED_PREVIEW_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n requireInject,\n} from \"../keys\";\nimport {\n EMAIL_FRAME_WIDTH_VAR,\n resolveBlockComponent,\n getCachedBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n EMAIL_GUTTER,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport { matchImageBoxWidth } from \"../utils/imageRoom\";\nimport {\n SYNTAX_PRESETS,\n resolveContentDirection,\n type Block,\n type TemplateSettings,\n type ViewportSize,\n} from \"@templatical/types\";\nimport { computed, inject, provide, type Component } from \"vue\";\n\nconst props = withDefaults(\n defineProps<{\n blocks: Block[];\n /**\n * Which viewport to render. Defaults to `desktop`, so the saved-blocks\n * surfaces — which have no viewport control — behave exactly as before.\n * The test-email dialog passes the user's choice so responsive blocks show\n * the variant a recipient on that device would receive.\n */\n viewport?: ViewportSize;\n /**\n * Whether the hand-toggled display-condition filter still applies here.\n * `false` where a resolver owns the preview: it has already evaluated every\n * condition against real data, so layering a manual hide on top would veto\n * the answer that was asked for.\n *\n * A prop rather than an injected `PREVIEW_RESOLUTION_KEY` read, because the\n * test-email dialog builds its *own* resolution instance (keyed to the\n * selected recipient) — injecting would consult the shared canvas instance\n * and get the wrong answer.\n */\n applyConditionFilter?: boolean;\n /**\n * Whether `blocks` is what a resolver returned. Tags the host resolved in\n * place then render as plain text and evaluated logic leaves no badge. A\n * prop for the same reason as `applyConditionFilter`: the test-email\n * dialog's resolution instance is not the canvas's.\n */\n showsResolved?: boolean;\n /**\n * Document settings for this surface. Test-email passes the composed\n * document so the mat is layout `backgroundColor` (`mj-body`). Saved-block\n * previews omit it and read the live editor template.\n */\n settings?: TemplateSettings;\n }>(),\n {\n viewport: \"desktop\",\n applyConditionFilter: true,\n showsResolved: false,\n settings: undefined,\n },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\nconst fontsManager = requireInject(FONTS_MANAGER_KEY, \"BlockPreviewCanvas\");\nconst imageUrlResolver = inject(IMAGE_URL_RESOLVER_KEY, null);\nconst mergeTagSyntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\n\n/**\n * This canvas is only ever a preview — nothing here is editable — so it honours\n * the user's mode directly, with no `previewMode` gate of the kind `Canvas.vue`\n * needs. Re-provided rather than left to inherit, because a `BlockPreviewCanvas`\n * inside a dialog may sit under an editing `Canvas` that provides `false`.\n */\nconst mergeTagSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\nprovide(\n READ_ONLY_SURFACE_KEY,\n computed(() => true),\n);\nprovide(\n USE_MERGE_TAG_SAMPLES_KEY,\n computed(() => mergeTagSampleMode?.value ?? false),\n);\nprovide(\n SHOWS_RESOLVED_PREVIEW_KEY,\n computed(() => props.showsResolved),\n);\n\n/**\n * Blocks a display condition currently excludes, so a preview never shows\n * content the recipient won't get. The canvas does the same via\n * `v-show=\"!conditionPreview?.isHidden(block.id)\"`.\n *\n * A no-op for the saved-blocks browser: entries there carry their *stored* ids,\n * which aren't in the current template, so nothing is tracked as hidden. It\n * bites where it should — the save dialog and the test-email preview, both of\n * which show blocks that are live on the canvas.\n *\n * Skipped entirely when `applyConditionFilter` is false — see the prop.\n */\nconst visibleBlocks = computed(() =>\n props.applyConditionFilter\n ? props.blocks.filter((block) => !conditionPreview?.isHidden(block.id))\n : props.blocks,\n);\n\nconst previewSettings = computed(\n () => props.settings ?? editor?.content.value.settings,\n);\n\n/**\n * Frame width, from the one helper the canvas and the scaled preview rows also\n * use — so all three agree by construction rather than by three constants that\n * happen to match. A template with a custom body width now previews at that\n * width instead of a flat 600.\n */\nconst frameWidth = computed(() =>\n getEmailFrameWidth(previewSettings.value, props.viewport),\n);\n\n/**\n * The same document-level style the canvas applies, so a previewed block\n * renders identically to the canvas one: without it the font falls back to the\n * editor UI's and the link rules hit their unset defaults, dropping the\n * underline and the link colour.\n *\n * Read from the *current* template even in the saved-blocks browser, where the\n * previewed content came from elsewhere — a saved block stores only `Block[]`,\n * and the current settings are what it will actually look like once inserted.\n */\nconst documentStyle = computed(() =>\n previewSettings.value\n ? getDocumentStyle(previewSettings.value, fontsManager.resolveFontFamily)\n : {},\n);\n\n/**\n * The email's own language, for the browser's spellchecker and hyphenation —\n * the same binding the editing canvas carries, so a preview is checked by the\n * same rules as the block it mirrors.\n *\n * From `settings.locale`, never `config.locale`: the chrome's language says\n * nothing about the content's. Read from the *current* template for the same\n * reason `documentStyle` is — a saved block stores only `Block[]`. Undefined\n * rather than `\"\"`, which would declare \"unknown language\" and suppress\n * spellcheck instead of falling back.\n */\nconst contentLang = computed(\n () => previewSettings.value?.locale?.trim() || undefined,\n);\nconst contentDir = computed(() =>\n resolveContentDirection(previewSettings.value ?? { locale: \"en\" }),\n);\n\n/**\n * The email's body background — `mj-body background-color` when sent, and the\n * `.tpl-canvas-bg` layer on the editing canvas.\n *\n * Deliberately NOT part of `getDocumentStyle`: the canvas applies that helper\n * to `.tpl-canvas`, which must stay transparent so the invertible background\n * layer beneath it shows through. A background there would double-paint and\n * defeat the dark-mode preview.\n *\n * Truthiness, not `??`: the colour pickers clear to an empty string to mean\n * \"unset\", which as an inline style renders the frame transparent rather than\n * falling back to the neutral preview surface.\n */\nconst emailBackground = computed(\n () => previewSettings.value?.backgroundColor || \"var(--tpl-canvas-bg)\",\n);\n\n/**\n * Width the stage asks for: the content column plus a full gutter on each side,\n * the same stage the canvas builds. It is an ask rather than a fixed size —\n * paired with `max-width: 100%` below, so a container with less room hands over\n * what it has and shows a narrower band instead of overflowing.\n *\n * It has to be a specified width, not `100%`: `TplModal`'s wrapper is\n * shrink-to-fit, so a percentage there resolves against a container whose size\n * the stage is itself supposed to influence, and the stage collapses to its\n * `min-width` — no gutters, on the one surface this exists for.\n */\nconst stageWidth = computed(() => frameWidth.value + EMAIL_GUTTER * 2);\n\nconst previewComponentMap: Record<string, Component> = {\n section: PreviewSectionBlock,\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n wrapper: WrapperBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n\n// This loop reads the resolver cache and never starts a lookup itself, so a\n// section's background image paints whatever the canvas has already resolved;\n// nested components (e.g. `ImageBlock`, a layout `WrapperBlock`) may resolve\n// their own images.\nfunction previewBlockStyle(block: Block): Record<string, string> {\n const settings = previewSettings.value;\n return getCachedBlockWrapperStyle(\n block,\n imageUrlResolver,\n mergeTagSyntax,\n matchImageBoxWidth(\n block,\n settings ? { blocks: props.blocks, settings } : undefined,\n ),\n );\n}\n</script>\n\n<template>\n <!-- STAGE — the email body, holding the background and a gutter of it on\n each side of the content column, the same shape `Canvas.vue` builds.\n `max-width: 100%` is what makes it fit anywhere: a roomy surface shows\n the full band, a dialog shows as much as it has, and a container sized to\n the content column shows none. `min-width` keeps it from squeezing the\n column, so a cramped surface clips exactly as it did when the frame\n carried the width itself. -->\n <div\n data-testid=\"block-preview-stage\"\n class=\"tpl-canvas-pane tpl:pointer-events-none tpl:mx-auto tpl:flex tpl:select-none tpl:justify-center tpl:rounded-lg\"\n :style=\"{\n width: `${stageWidth}px`,\n minWidth: `${frameWidth}px`,\n maxWidth: '100%',\n backgroundColor: emailBackground,\n boxShadow: 'var(--tpl-shadow-sm)',\n }\"\n >\n <!-- CONTENT COLUMN — the blocks at their true email width. Keeps the\n testid: this is the element whose width *is* the email width, which is\n what every viewport assertion measures. -->\n <div\n data-testid=\"block-preview-canvas\"\n :lang=\"contentLang\"\n :dir=\"contentDir\"\n :style=\"{\n width: `${frameWidth}px`,\n [EMAIL_FRAME_WIDTH_VAR]: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"previewBlockStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./blocks/ButtonBlock.vue\";\nimport CustomBlock from \"./blocks/CustomBlock.vue\";\nimport DividerBlock from \"./blocks/DividerBlock.vue\";\nimport HtmlBlock from \"./blocks/HtmlBlock.vue\";\nimport ImageBlock from \"./blocks/ImageBlock.vue\";\nimport MenuBlock from \"./blocks/MenuBlock.vue\";\nimport PreviewSectionBlock from \"./blocks/PreviewSectionBlock.vue\";\nimport SocialIconsBlock from \"./blocks/SocialIconsBlock.vue\";\nimport SpacerBlock from \"./blocks/SpacerBlock.vue\";\nimport TableBlock from \"./blocks/TableBlock.vue\";\nimport TitleBlock from \"./blocks/TitleBlock.vue\";\nimport ParagraphBlock from \"./blocks/ParagraphBlock.vue\";\nimport VideoBlock from \"./blocks/VideoBlock.vue\";\nimport WrapperBlock from \"./blocks/WrapperBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n FONTS_MANAGER_KEY,\n IMAGE_URL_RESOLVER_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n MERGE_TAG_SYNTAX_KEY,\n READ_ONLY_SURFACE_KEY,\n SHOWS_RESOLVED_PREVIEW_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n requireInject,\n} from \"../keys\";\nimport {\n EMAIL_FRAME_WIDTH_VAR,\n resolveBlockComponent,\n getCachedBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n EMAIL_GUTTER,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport { matchImageBoxWidth } from \"../utils/imageRoom\";\nimport {\n SYNTAX_PRESETS,\n resolveContentDirection,\n type Block,\n type TemplateSettings,\n type ViewportSize,\n} from \"@templatical/types\";\nimport { computed, inject, provide, type Component } from \"vue\";\n\nconst props = withDefaults(\n defineProps<{\n blocks: Block[];\n /**\n * Which viewport to render. Defaults to `desktop`, so the saved-blocks\n * surfaces — which have no viewport control — behave exactly as before.\n * The test-email dialog passes the user's choice so responsive blocks show\n * the variant a recipient on that device would receive.\n */\n viewport?: ViewportSize;\n /**\n * Whether the hand-toggled display-condition filter still applies here.\n * `false` where a resolver owns the preview: it has already evaluated every\n * condition against real data, so layering a manual hide on top would veto\n * the answer that was asked for.\n *\n * A prop rather than an injected `PREVIEW_RESOLUTION_KEY` read, because the\n * test-email dialog builds its *own* resolution instance (keyed to the\n * selected recipient) — injecting would consult the shared canvas instance\n * and get the wrong answer.\n */\n applyConditionFilter?: boolean;\n /**\n * Whether `blocks` is what a resolver returned. Tags the host resolved in\n * place then render as plain text and evaluated logic leaves no badge. A\n * prop for the same reason as `applyConditionFilter`: the test-email\n * dialog's resolution instance is not the canvas's.\n */\n showsResolved?: boolean;\n /**\n * Document settings for this surface. Test-email passes the composed\n * document so the mat is layout `backgroundColor` (`mj-body`). Saved-block\n * previews omit it and read the live editor template.\n */\n settings?: TemplateSettings;\n }>(),\n {\n viewport: \"desktop\",\n applyConditionFilter: true,\n showsResolved: false,\n settings: undefined,\n },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\nconst fontsManager = requireInject(FONTS_MANAGER_KEY, \"BlockPreviewCanvas\");\nconst imageUrlResolver = inject(IMAGE_URL_RESOLVER_KEY, null);\nconst mergeTagSyntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\n\n/**\n * This canvas is only ever a preview — nothing here is editable — so it honours\n * the user's mode directly, with no `previewMode` gate of the kind `Canvas.vue`\n * needs. Re-provided rather than left to inherit, because a `BlockPreviewCanvas`\n * inside a dialog may sit under an editing `Canvas` that provides `false`.\n */\nconst mergeTagSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\nprovide(\n READ_ONLY_SURFACE_KEY,\n computed(() => true),\n);\nprovide(\n USE_MERGE_TAG_SAMPLES_KEY,\n computed(() => mergeTagSampleMode?.value ?? false),\n);\nprovide(\n SHOWS_RESOLVED_PREVIEW_KEY,\n computed(() => props.showsResolved),\n);\n\n/**\n * Blocks a display condition currently excludes, so a preview never shows\n * content the recipient won't get. The canvas does the same via\n * `v-show=\"!conditionPreview?.isHidden(block.id)\"`.\n *\n * A no-op for the saved-blocks browser: entries there carry their *stored* ids,\n * which aren't in the current template, so nothing is tracked as hidden. It\n * bites where it should — the save dialog and the test-email preview, both of\n * which show blocks that are live on the canvas.\n *\n * Skipped entirely when `applyConditionFilter` is false — see the prop.\n */\nconst visibleBlocks = computed(() =>\n props.applyConditionFilter\n ? props.blocks.filter((block) => !conditionPreview?.isHidden(block.id))\n : props.blocks,\n);\n\nconst previewSettings = computed(\n () => props.settings ?? editor?.content.value.settings,\n);\n\n/**\n * Frame width, from the one helper the canvas and the scaled preview rows also\n * use — so all three agree by construction rather than by three constants that\n * happen to match. A template with a custom body width now previews at that\n * width instead of a flat 600.\n */\nconst frameWidth = computed(() =>\n getEmailFrameWidth(previewSettings.value, props.viewport),\n);\n\n/**\n * The same document-level style the canvas applies, so a previewed block\n * renders identically to the canvas one: without it the font falls back to the\n * editor UI's and the link rules hit their unset defaults, dropping the\n * underline and the link colour.\n *\n * Read from the *current* template even in the saved-blocks browser, where the\n * previewed content came from elsewhere — a saved block stores only `Block[]`,\n * and the current settings are what it will actually look like once inserted.\n */\nconst documentStyle = computed(() =>\n previewSettings.value\n ? getDocumentStyle(previewSettings.value, fontsManager.resolveFontFamily)\n : {},\n);\n\n/**\n * The email's own language, for the browser's spellchecker and hyphenation —\n * the same binding the editing canvas carries, so a preview is checked by the\n * same rules as the block it mirrors.\n *\n * From `settings.locale`, never `config.locale`: the chrome's language says\n * nothing about the content's. Read from the *current* template for the same\n * reason `documentStyle` is — a saved block stores only `Block[]`. Undefined\n * rather than `\"\"`, which would declare \"unknown language\" and suppress\n * spellcheck instead of falling back.\n */\nconst contentLang = computed(\n () => previewSettings.value?.locale?.trim() || undefined,\n);\nconst contentDir = computed(() =>\n resolveContentDirection(previewSettings.value ?? { locale: \"en\" }),\n);\n\n/**\n * The email's body background — `mj-body background-color` when sent, and the\n * `.tpl-canvas-bg` layer on the editing canvas.\n *\n * Deliberately NOT part of `getDocumentStyle`: the canvas applies that helper\n * to `.tpl-canvas`, which must stay transparent so the invertible background\n * layer beneath it shows through. A background there would double-paint and\n * defeat the dark-mode preview.\n *\n * Truthiness, not `??`: the colour pickers clear to an empty string to mean\n * \"unset\", which as an inline style renders the frame transparent rather than\n * falling back to the neutral preview surface.\n */\nconst emailBackground = computed(\n () => previewSettings.value?.backgroundColor || \"var(--tpl-canvas-bg)\",\n);\n\n/**\n * Width the stage asks for: the content column plus a full gutter on each side,\n * the same stage the canvas builds. It is an ask rather than a fixed size —\n * paired with `max-width: 100%` below, so a container with less room hands over\n * what it has and shows a narrower band instead of overflowing.\n *\n * It has to be a specified width, not `100%`: `TplModal`'s wrapper is\n * shrink-to-fit, so a percentage there resolves against a container whose size\n * the stage is itself supposed to influence, and the stage collapses to its\n * `min-width` — no gutters, on the one surface this exists for.\n */\nconst stageWidth = computed(() => frameWidth.value + EMAIL_GUTTER * 2);\n\nconst previewComponentMap: Record<string, Component> = {\n section: PreviewSectionBlock,\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n wrapper: WrapperBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n\n// This loop reads the resolver cache and never starts a lookup itself, so a\n// section's background image paints whatever the canvas has already resolved;\n// nested components (e.g. `ImageBlock`, a layout `WrapperBlock`) may resolve\n// their own images.\nfunction previewBlockStyle(block: Block): Record<string, string> {\n const settings = previewSettings.value;\n return getCachedBlockWrapperStyle(\n block,\n imageUrlResolver,\n mergeTagSyntax,\n matchImageBoxWidth(\n block,\n settings ? { blocks: props.blocks, settings } : undefined,\n ),\n );\n}\n</script>\n\n<template>\n <!-- STAGE — the email body, holding the background and a gutter of it on\n each side of the content column, the same shape `Canvas.vue` builds.\n `max-width: 100%` is what makes it fit anywhere: a roomy surface shows\n the full band, a dialog shows as much as it has, and a container sized to\n the content column shows none. `min-width` keeps it from squeezing the\n column, so a cramped surface clips exactly as it did when the frame\n carried the width itself. -->\n <div\n data-testid=\"block-preview-stage\"\n class=\"tpl-canvas-pane tpl:pointer-events-none tpl:mx-auto tpl:flex tpl:select-none tpl:justify-center tpl:rounded-lg\"\n :style=\"{\n width: `${stageWidth}px`,\n minWidth: `${frameWidth}px`,\n maxWidth: '100%',\n backgroundColor: emailBackground,\n boxShadow: 'var(--tpl-shadow-sm)',\n }\"\n >\n <!-- CONTENT COLUMN — the blocks at their true email width. Keeps the\n testid: this is the element whose width *is* the email width, which is\n what every viewport assertion measures. -->\n <div\n data-testid=\"block-preview-canvas\"\n :lang=\"contentLang\"\n :dir=\"contentDir\"\n :style=\"{\n width: `${frameWidth}px`,\n [EMAIL_FRAME_WIDTH_VAR]: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"previewBlockStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAwBA,IAAMkG,IAAsD;GAC1D,OAAOjG;GACP,WAAWC;GACX,OAAOC;GACP,OAAOC;GACP,QAAQC;GACR,SAASC;GACT,QAAQC;GACR,MAAMC;GACN,OAAOC;GACP,QAAQC;GACR,MAAMC;GACN,QAAQC;EACV,GAEMwF,IAAQC,GAORC,IAAgBhD,EAAO+B,GAAoB,IAAI,GAE/CkB,IAAe5C,QAAe;GAClC,QAAQyC,EAAM,MAAM,SAApB;IACE,KAAK,KACH,OAAO,CAAC,OAAO,KAAK;IACtB,KAAK,KACH,OAAO;KAAC;KAAU;KAAU;IAAQ;IACtC,KAAK,KACH,OAAO;KAAC;KAAO;KAAO;KAAO;IAAK;IACpC,KAAK,OACH,OAAO,CAAC,UAAU,QAAQ;IAC5B,KAAK,OACH,OAAO,CAAC,UAAU,QAAQ;IAC5B,KAAK,OACH,OAAO,CAAC,OAAO,KAAK;IACtB,KAAK,OACH,OAAO,CAAC,OAAO,KAAK;IACtB,KAAK,SACH,OAAO;KAAC;KAAO;KAAO;IAAK;IAC7B,SACE,OAAO,CAAC,MAAM;GAClB;EACF,CAAC,GAEKI,IAAU7C,QAAe;GAC7B,IAAM8C,IAAQF,EAAa,MAAM,QAC3BG,IAAW,CAAC,GAAGN,EAAM,MAAM,QAAQ;GACzC,OAAOM,EAAS,SAASD,IACvB,EAAS,KAAK,CAAC,CAAC;GAElB,OAAOC,EAAS,MAAM,GAAGD,CAAK;EAChC,CAAC;EAED,SAASE,EAAgB,GAA2B;GAClD,OAAOH,EAAQ,MAAMI,MAAa,CAAC;EACrC;EAEA,SAASC,EAAkB,GAAgC;GACzD,OAAO7C,EAAsB8C,GAAOR,GAAeJ,CAAwB;EAC7E;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MAAU;KAAelF,EAAAoC,CAAA,IAAqB,GAAM8C,EAAA,MAAU;IAA0B,YAAAlF,EAAAiD,CAAA;IAAyC,GAAAkC,GAAA;;E,KAO7JvF,EAAA,EAAA,GAAAC,EAUMI,GAAA,MAAAC,EATY8E,GAAA,QAAT,OADTpF,EAAA,GAAAC,EAUM,OAAA;GARH,KAAKuE,EAAM;GACX,OAAKtE,EAAE2F,GAAkBrB,CAAK,CAAA;E,KAE/BxE,EAAA,GAAAO,EAIEC,EAHK+D,GAAkBC,CAAK,CAAA,GAAA;GACpB;GACP,UAAUT,EAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CloudPanels-D8fchoYt.js","names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_unref","CircleAlert","_toDisplayString","_normalizeClass","_createCommentVNode","_sfc_main","_hoisted_1","_hoisted_2","_hoisted_3","_openBlock","_createElementBlock","_unref","_createStaticVNode","_createElementVNode","_Fragment","_renderList","_createCommentVNode","_sfc_main","_openBlock","_createBlock","TplModal","_withCtx","_createElementVNode","_createVNode","_unref","AlertTriangle","_toDisplayString","_createElementBlock","_Fragment","_renderList","_normalizeClass","_sfc_main","_openBlock","_createElementBlock","_Fragment","_createVNode","_Transition","_withCtx","CloudLoadingOverlay","CloudErrorOverlay","CloudSaveGateModal","_sfc_main","defineComponent","openBlock","withCtx","renderList","createElementBlock","unref","normalizeClass","createCommentVNode","createBlock","createBaseVNode","toDisplayString","Transition","Fragment","createVNode","createStaticVNode","CircleExclamationPoint","TriangleExclamationPoint","secondaryBtnClass","primaryBtnClass","dangerBtnClass","useCloudI18nStrict","TplModal_default","_hoisted_1$2","_hoisted_2$2","_hoisted_3$2","_hoisted_4$1","_hoisted_5$1","CloudErrorOverlay_default","__emit","emit","cloudT","getErrorMessage","error","isNotFoundError","__props","_cache","_hoisted_1$1","_hoisted_2$1","_hoisted_3$1","CloudLoadingOverlay_default","n","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","CloudSaveGateModal_default","issue","CloudPanels_default"],"sources":["../../../src/cloud/components/CloudErrorOverlay.vue","../../../src/cloud/components/CloudErrorOverlay.vue","../../../src/cloud/components/CloudLoadingOverlay.vue","../../../src/cloud/components/CloudLoadingOverlay.vue","../../../src/cloud/components/CloudSaveGateModal.vue","../../../src/cloud/components/CloudSaveGateModal.vue","../../../src/cloud/components/CloudPanels.vue","../../../src/cloud/components/CloudPanels.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CircleAlert } from \"@lucide/vue\";\nimport { primaryBtnClass } from \"../../constants/styleConstants\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n error: Error | null;\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"retry\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nfunction getErrorMessage(error: Error): string {\n if (\n \"isUnauthorized\" in error &&\n (error as { isUnauthorized: boolean }).isUnauthorized\n ) {\n return cloudT.error.authFailed;\n }\n if (\"isNotFound\" in error && (error as { isNotFound: boolean }).isNotFound) {\n return cloudT.error.templateNotFound;\n }\n return cloudT.error.defaultMessage;\n}\n\nfunction isNotFoundError(error: Error): boolean {\n return (\n \"isNotFound\" in error && !!(error as { isNotFound: boolean }).isNotFound\n );\n}\n</script>\n\n<template>\n <div\n v-if=\"visible && error\"\n role=\"alert\"\n class=\"tpl-error tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]\"\n >\n <div\n class=\"tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]\"\n >\n <CircleAlert\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-danger)]\"\n />\n </div>\n <div\n class=\"tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center\"\n >\n <h2 class=\"tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]\">\n {{ cloudT.error.title }}\n </h2>\n <p class=\"tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ getErrorMessage(error) }}\n </p>\n </div>\n <button\n v-if=\"!isNotFoundError(error)\"\n type=\"button\"\n :class=\"primaryBtnClass\"\n @click=\"emit('retry')\"\n >\n {{ cloudT.error.retry }}\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { CircleAlert } from \"@lucide/vue\";\nimport { primaryBtnClass } from \"../../constants/styleConstants\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n error: Error | null;\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"retry\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nfunction getErrorMessage(error: Error): string {\n if (\n \"isUnauthorized\" in error &&\n (error as { isUnauthorized: boolean }).isUnauthorized\n ) {\n return cloudT.error.authFailed;\n }\n if (\"isNotFound\" in error && (error as { isNotFound: boolean }).isNotFound) {\n return cloudT.error.templateNotFound;\n }\n return cloudT.error.defaultMessage;\n}\n\nfunction isNotFoundError(error: Error): boolean {\n return (\n \"isNotFound\" in error && !!(error as { isNotFound: boolean }).isNotFound\n );\n}\n</script>\n\n<template>\n <div\n v-if=\"visible && error\"\n role=\"alert\"\n class=\"tpl-error tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]\"\n >\n <div\n class=\"tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]\"\n >\n <CircleAlert\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-danger)]\"\n />\n </div>\n <div\n class=\"tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center\"\n >\n <h2 class=\"tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]\">\n {{ cloudT.error.title }}\n </h2>\n <p class=\"tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ getErrorMessage(error) }}\n </p>\n </div>\n <button\n v-if=\"!isNotFoundError(error)\"\n type=\"button\"\n :class=\"primaryBtnClass\"\n @click=\"emit('retry')\"\n >\n {{ cloudT.error.retry }}\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n visible: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n role=\"status\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n :aria-label=\"cloudT.loading.initializing\"\n class=\"tpl-loading tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]\"\n >\n <!-- Skeleton header -->\n <div\n class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl:flex tpl:gap-3\">\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n </div>\n <!-- Skeleton body -->\n <div class=\"tpl:flex tpl:flex-1 tpl:overflow-hidden\">\n <!-- Left sidebar rail -->\n <div\n class=\"tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]\"\n >\n <div\n v-for=\"n in 5\"\n :key=\"n\"\n class=\"tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <!-- Canvas area -->\n <div\n class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <div\n class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"\n >\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:flex tpl:justify-center tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"\n ></div>\n </div>\n </div>\n </div>\n <!-- Right panel -->\n <div\n class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n visible: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n role=\"status\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n :aria-label=\"cloudT.loading.initializing\"\n class=\"tpl-loading tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]\"\n >\n <!-- Skeleton header -->\n <div\n class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl:flex tpl:gap-3\">\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n </div>\n <!-- Skeleton body -->\n <div class=\"tpl:flex tpl:flex-1 tpl:overflow-hidden\">\n <!-- Left sidebar rail -->\n <div\n class=\"tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]\"\n >\n <div\n v-for=\"n in 5\"\n :key=\"n\"\n class=\"tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <!-- Canvas area -->\n <div\n class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <div\n class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"\n >\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:flex tpl:justify-center tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"\n ></div>\n </div>\n </div>\n </div>\n <!-- Right panel -->\n <div\n class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { AlertTriangle } from \"@lucide/vue\";\nimport {\n dangerBtnClass,\n secondaryBtnClass,\n} from \"../../constants/styleConstants\";\nimport TplModal from \"../../components/TplModal.vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { LintIssue } from \"../../composables/useTemplateLint\";\n\ndefineProps<{\n open: boolean;\n issues: LintIssue[];\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <TplModal :visible=\"open\" @close=\"emit('cancel')\">\n <div\n role=\"alertdialog\"\n aria-modal=\"true\"\n aria-labelledby=\"tpl-save-gate-title\"\n aria-describedby=\"tpl-save-gate-body\"\n data-testid=\"cloud-save-gate-dialog\"\n class=\"tpl:flex tpl:max-h-[80%] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius-lg)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-lg)]\"\n >\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <AlertTriangle\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-warning)]\"\n />\n <h2\n id=\"tpl-save-gate-title\"\n class=\"tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ cloudT.saveGate.title }}\n </h2>\n </header>\n\n <p\n id=\"tpl-save-gate-body\"\n class=\"tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ cloudT.saveGate.body }}\n </p>\n\n <ul\n class=\"tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-2\"\n >\n <li\n v-for=\"issue in issues\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5\"\n >\n <span class=\"tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </span>\n <span\n class=\"tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </span>\n </li>\n </ul>\n\n <footer class=\"tpl:flex tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n data-testid=\"cloud-save-gate-cancel\"\n :class=\"secondaryBtnClass\"\n @click=\"emit('cancel')\"\n >\n {{ cloudT.saveGate.cancel }}\n </button>\n <button\n type=\"button\"\n data-testid=\"cloud-save-gate-confirm\"\n :class=\"dangerBtnClass\"\n @click=\"emit('confirm')\"\n >\n {{ cloudT.saveGate.confirm }}\n </button>\n </footer>\n </div>\n </TplModal>\n</template>\n","<script setup lang=\"ts\">\nimport { AlertTriangle } from \"@lucide/vue\";\nimport {\n dangerBtnClass,\n secondaryBtnClass,\n} from \"../../constants/styleConstants\";\nimport TplModal from \"../../components/TplModal.vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { LintIssue } from \"../../composables/useTemplateLint\";\n\ndefineProps<{\n open: boolean;\n issues: LintIssue[];\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <TplModal :visible=\"open\" @close=\"emit('cancel')\">\n <div\n role=\"alertdialog\"\n aria-modal=\"true\"\n aria-labelledby=\"tpl-save-gate-title\"\n aria-describedby=\"tpl-save-gate-body\"\n data-testid=\"cloud-save-gate-dialog\"\n class=\"tpl:flex tpl:max-h-[80%] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius-lg)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-lg)]\"\n >\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <AlertTriangle\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-warning)]\"\n />\n <h2\n id=\"tpl-save-gate-title\"\n class=\"tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ cloudT.saveGate.title }}\n </h2>\n </header>\n\n <p\n id=\"tpl-save-gate-body\"\n class=\"tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ cloudT.saveGate.body }}\n </p>\n\n <ul\n class=\"tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-2\"\n >\n <li\n v-for=\"issue in issues\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5\"\n >\n <span class=\"tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </span>\n <span\n class=\"tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </span>\n </li>\n </ul>\n\n <footer class=\"tpl:flex tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n data-testid=\"cloud-save-gate-cancel\"\n :class=\"secondaryBtnClass\"\n @click=\"emit('cancel')\"\n >\n {{ cloudT.saveGate.cancel }}\n </button>\n <button\n type=\"button\"\n data-testid=\"cloud-save-gate-confirm\"\n :class=\"dangerBtnClass\"\n @click=\"emit('confirm')\"\n >\n {{ cloudT.saveGate.confirm }}\n </button>\n </footer>\n </div>\n </TplModal>\n</template>\n","<script setup lang=\"ts\">\nimport type { UseEditorReturn } from \"@templatical/core\";\n\nimport type { UseEditorCoreReturn } from \"../../composables/useEditorCore\";\nimport type { CloudAttachment, CloudReady, CloudRuntime } from \"../runtime\";\n\nimport CloudErrorOverlay from \"./CloudErrorOverlay.vue\";\nimport CloudLoadingOverlay from \"./CloudLoadingOverlay.vue\";\nimport CloudSaveGateModal from \"./CloudSaveGateModal.vue\";\n\n/**\n * Every piece of Cloud chrome that renders outside the header.\n *\n * `Editor.vue` mounts this behind one lazy `defineAsyncComponent` gated on a\n * cloud runtime being present, so an OSS consumer downloads none of it — the\n * `SavedBlocksPanels` / `TestEmailPanel` pattern.\n *\n * The overlays live here rather than in the shared editor deliberately: `init()`\n * cannot fail after it mounts, and OSS should not grow the ability.\n *\n * The comments sidebar is deliberately not here: it is shared, as `CommentsPanel`\n * in `Editor.vue` over a `CommentsProvider`. Its filter target lives on the shared\n * feature rather than being relayed through this component, so it survives the\n * lazy panel's mount without a runtime hop.\n *\n * The media library is not here either: it is shared, as `MediaPanels` in\n * `Editor.vue` over a `MediaProvider`. Cloud supplies that provider; it does\n * not mount a second modal.\n */\ndefineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n}>();\n</script>\n\n<template>\n <!-- A template create / load in flight. Cloud reads its content from the\n server, so there is a real gap where the canvas shows the wrong thing. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-100\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudLoadingOverlay :visible=\"editor.state.isLoading\" />\n </Transition>\n\n <!-- Session failure — an auth refresh that could not renew the token. The\n *bootstrap* has no overlay any more: it runs before the mount, so a\n failure there rejects `initCloud()` instead of mounting a dead editor. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudErrorOverlay\n :error=\"ready.sessionError.value\"\n :visible=\"!!ready.sessionError.value\"\n @retry=\"ready.retry\"\n />\n </Transition>\n\n <CloudSaveGateModal\n :open=\"ready.saveGate.modalOpen.value\"\n :issues=\"ready.saveGate.blockingIssues.value\"\n @cancel=\"ready.saveGate.cancel\"\n @confirm=\"ready.saveGate.confirmAndSave\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport type { UseEditorReturn } from \"@templatical/core\";\n\nimport type { UseEditorCoreReturn } from \"../../composables/useEditorCore\";\nimport type { CloudAttachment, CloudReady, CloudRuntime } from \"../runtime\";\n\nimport CloudErrorOverlay from \"./CloudErrorOverlay.vue\";\nimport CloudLoadingOverlay from \"./CloudLoadingOverlay.vue\";\nimport CloudSaveGateModal from \"./CloudSaveGateModal.vue\";\n\n/**\n * Every piece of Cloud chrome that renders outside the header.\n *\n * `Editor.vue` mounts this behind one lazy `defineAsyncComponent` gated on a\n * cloud runtime being present, so an OSS consumer downloads none of it — the\n * `SavedBlocksPanels` / `TestEmailPanel` pattern.\n *\n * The overlays live here rather than in the shared editor deliberately: `init()`\n * cannot fail after it mounts, and OSS should not grow the ability.\n *\n * The comments sidebar is deliberately not here: it is shared, as `CommentsPanel`\n * in `Editor.vue` over a `CommentsProvider`. Its filter target lives on the shared\n * feature rather than being relayed through this component, so it survives the\n * lazy panel's mount without a runtime hop.\n *\n * The media library is not here either: it is shared, as `MediaPanels` in\n * `Editor.vue` over a `MediaProvider`. Cloud supplies that provider; it does\n * not mount a second modal.\n */\ndefineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n}>();\n</script>\n\n<template>\n <!-- A template create / load in flight. Cloud reads its content from the\n server, so there is a real gap where the canvas shows the wrong thing. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-100\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudLoadingOverlay :visible=\"editor.state.isLoading\" />\n </Transition>\n\n <!-- Session failure — an auth refresh that could not renew the token. The\n *bootstrap* has no overlay any more: it runs before the mount, so a\n failure there rejects `initCloud()` instead of mounting a dead editor. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudErrorOverlay\n :error=\"ready.sessionError.value\"\n :visible=\"!!ready.sessionError.value\"\n @retry=\"ready.retry\"\n />\n </Transition>\n\n <CloudSaveGateModal\n :open=\"ready.saveGate.modalOpen.value\"\n :issues=\"ready.saveGate.blockingIssues.value\"\n @cancel=\"ready.saveGate.cancel\"\n @confirm=\"ready.saveGate.confirmAndSave\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAUA,IAAMgF,IAAOD,GAIP,EAAE,GAAGE,MAAWV,EAAmB;EAEzC,SAASW,EAAgB,GAAsB;GAU7C,OARE,oBAAoBC,KACnBA,EAAsC,iBAEhCF,EAAO,MAAM,aAElB,gBAAgBE,KAAUA,EAAkC,aACvDF,EAAO,MAAM,mBAEfA,EAAO,MAAM;EACtB;E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f,SAAAC,QAAyD,CAAzDF,EAAyDG,GAAA,EAAnC,SAASsC,EAAA,OAAO,MAAM,U;;;GAM9CzC,EAaaC,GAAA;IAZX,sBAAmB;IACnB,oBAAiB;IACjB,kBAAe;IACf,sBAAmB;IACnB,oBAAiB;IACjB,kBAAe;;IAEf,SAAAC,QAIE,CAJFF,EAIEI,GAAA;KAHC,OAAOqC,EAAA,MAAM,aAAa;KAC1B,SAAO,CAAA,CAAIA,EAAA,MAAM,aAAa;KAC9B,SAAOA,EAAA,MAAM;;;;;;;;GAIlBzC,EAKEK,GAAA;IAJC,MAAMoC,EAAA,MAAM,SAAS,UAAU;IAC/B,QAAQA,EAAA,MAAM,SAAS,eAAe;IACtC,UAAQA,EAAA,MAAM,SAAS;IACvB,WAASA,EAAA,MAAM,SAAS"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollaborationNotices-DNEs3g9B.js","names":["_openBlock","_createElementBlock","_Fragment","_normalizeStyle","_unref","_toDisplayString","_createCommentVNode","_createElementVNode","_createVNode","_sfc_main","defineComponent","openBlock","createElementBlock","unref","createCommentVNode","createBaseVNode","toDisplayString","computed","normalizeStyle","Fragment","createVNode","X","TONE_STYLES","useI18n","_hoisted_1","_hoisted_2","CollaborationNotices_default","props","__props","notice","isReconnecting","tone","nameOf","person","t","agentMessage","values","view","format","message","_cache"],"sources":["../../../src/components/collaboration/CollaborationNotices.vue","../../../src/components/collaboration/CollaborationNotices.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { X } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport type {\n CollaborationNoticeView,\n UseCollaborationFeatureReturn,\n} from \"../../composables/useCollaborationFeature\";\nimport { TONE_STYLES } from \"../../constants/noticeTones\";\nimport { useI18n } from \"../../composables/useI18n\";\n\nconst props = defineProps<{\n feature: UseCollaborationFeatureReturn;\n}>();\n\nconst { t, format } = useI18n();\n\nconst notice = computed(() => props.feature.notices.value.at(-1) ?? null);\n\n/** Shown for as long as the socket is down; edits keep going over HTTP. */\nconst isReconnecting = computed(\n () =>\n props.feature.connection.value === \"reconnecting\" ||\n props.feature.connection.value === \"offline\",\n);\n\n/**\n * Refusals warn; an agent's or the AI's edit is information, so it takes\n * Compositor Teal. Amber stays for selection and intent.\n */\nconst tone = computed(() =>\n notice.value?.kind === \"agentEdited\" || notice.value?.kind === \"aiEdited\"\n ? \"info\"\n : \"warning\",\n);\n\nfunction nameOf(person: { name?: string; isGuest?: boolean }): string {\n return person.isGuest || !person.name ? t.collaboration.guest : person.name;\n}\n\n/**\n * \"{who} changed …\", where `who` is \"Claude for Ada\" or \"AI (for Ada)\": an\n * updated template wins, then blocks with settings.\n */\nfunction agentMessage(\n view: Extract<CollaborationNoticeView, { kind: \"agentEdited\" | \"aiEdited\" }>,\n): string {\n const who =\n view.kind === \"aiEdited\"\n ? format(t.collaboration.aiFor, { name: nameOf(view) })\n : format(t.collaboration.agentFor, {\n client: view.client ?? t.collaboration.anAgent,\n name: nameOf(view),\n });\n const values = { who, count: view.blocks };\n if (view.templateUpdated)\n return format(t.collaboration.agentUpdatedTemplate, values);\n if (view.settings && view.blocks > 1)\n return format(t.collaboration.agentChangedBlocksAndSettings, values);\n if (view.settings && view.blocks === 1)\n return format(t.collaboration.agentChangedBlockAndSettings, values);\n if (view.settings)\n return format(t.collaboration.agentChangedSettings, values);\n if (view.blocks === 1)\n return format(t.collaboration.agentChangedBlock, values);\n return format(t.collaboration.agentChangedBlocks, values);\n}\n\nfunction message(view: CollaborationNoticeView): string {\n switch (view.kind) {\n case \"selectionRefused\":\n return format(t.collaboration.selectionRefused, { name: nameOf(view) });\n case \"editRefused\":\n if (view.code === \"content_too_large\")\n return t.collaboration.editTooLarge;\n return view.code === \"lock_held\" && (view.name || view.isGuest)\n ? format(t.collaboration.editRefusedLocked, { name: nameOf(view) })\n : t.collaboration.editRefused;\n case \"undoSkipped\":\n return t.collaboration.undoSkipped;\n case \"replaceRefused\":\n return format(t.collaboration.replaceRefused, {\n names: view.holders.map(nameOf).join(\", \"),\n });\n case \"agentEdited\":\n case \"aiEdited\":\n return agentMessage(view);\n }\n}\n</script>\n\n<template>\n <div\n v-if=\"isReconnecting\"\n data-testid=\"collaboration-notice\"\n data-kind=\"reconnecting\"\n data-tone=\"warning\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:pointer-events-auto tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"TONE_STYLES.warning\"\n >\n {{ t.collaboration.reconnectingNotice }}\n </div>\n <!-- `message()` is interpolated, never `v-html`: an agent's name comes\n from its own registration and is untrusted text. -->\n <div\n v-if=\"notice\"\n :key=\"notice.id\"\n data-testid=\"collaboration-notice\"\n :data-kind=\"notice.kind\"\n :data-tone=\"tone\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"TONE_STYLES[tone]\"\n >\n <span>{{ message(notice) }}</span>\n <button\n type=\"button\"\n class=\"tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded tpl:text-[var(--tpl-text-muted)] tpl:hover:text-[var(--tpl-text)]\"\n :aria-label=\"t.collaboration.dismiss\"\n :title=\"t.collaboration.dismiss\"\n @click=\"feature.dismissNotice(notice.id)\"\n >\n <X :size=\"14\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { X } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport type {\n CollaborationNoticeView,\n UseCollaborationFeatureReturn,\n} from \"../../composables/useCollaborationFeature\";\nimport { TONE_STYLES } from \"../../constants/noticeTones\";\nimport { useI18n } from \"../../composables/useI18n\";\n\nconst props = defineProps<{\n feature: UseCollaborationFeatureReturn;\n}>();\n\nconst { t, format } = useI18n();\n\nconst notice = computed(() => props.feature.notices.value.at(-1) ?? null);\n\n/** Shown for as long as the socket is down; edits keep going over HTTP. */\nconst isReconnecting = computed(\n () =>\n props.feature.connection.value === \"reconnecting\" ||\n props.feature.connection.value === \"offline\",\n);\n\n/**\n * Refusals warn; an agent's or the AI's edit is information, so it takes\n * Compositor Teal. Amber stays for selection and intent.\n */\nconst tone = computed(() =>\n notice.value?.kind === \"agentEdited\" || notice.value?.kind === \"aiEdited\"\n ? \"info\"\n : \"warning\",\n);\n\nfunction nameOf(person: { name?: string; isGuest?: boolean }): string {\n return person.isGuest || !person.name ? t.collaboration.guest : person.name;\n}\n\n/**\n * \"{who} changed …\", where `who` is \"Claude for Ada\" or \"AI (for Ada)\": an\n * updated template wins, then blocks with settings.\n */\nfunction agentMessage(\n view: Extract<CollaborationNoticeView, { kind: \"agentEdited\" | \"aiEdited\" }>,\n): string {\n const who =\n view.kind === \"aiEdited\"\n ? format(t.collaboration.aiFor, { name: nameOf(view) })\n : format(t.collaboration.agentFor, {\n client: view.client ?? t.collaboration.anAgent,\n name: nameOf(view),\n });\n const values = { who, count: view.blocks };\n if (view.templateUpdated)\n return format(t.collaboration.agentUpdatedTemplate, values);\n if (view.settings && view.blocks > 1)\n return format(t.collaboration.agentChangedBlocksAndSettings, values);\n if (view.settings && view.blocks === 1)\n return format(t.collaboration.agentChangedBlockAndSettings, values);\n if (view.settings)\n return format(t.collaboration.agentChangedSettings, values);\n if (view.blocks === 1)\n return format(t.collaboration.agentChangedBlock, values);\n return format(t.collaboration.agentChangedBlocks, values);\n}\n\nfunction message(view: CollaborationNoticeView): string {\n switch (view.kind) {\n case \"selectionRefused\":\n return format(t.collaboration.selectionRefused, { name: nameOf(view) });\n case \"editRefused\":\n if (view.code === \"content_too_large\")\n return t.collaboration.editTooLarge;\n return view.code === \"lock_held\" && (view.name || view.isGuest)\n ? format(t.collaboration.editRefusedLocked, { name: nameOf(view) })\n : t.collaboration.editRefused;\n case \"undoSkipped\":\n return t.collaboration.undoSkipped;\n case \"replaceRefused\":\n return format(t.collaboration.replaceRefused, {\n names: view.holders.map(nameOf).join(\", \"),\n });\n case \"agentEdited\":\n case \"aiEdited\":\n return agentMessage(view);\n }\n}\n</script>\n\n<template>\n <div\n v-if=\"isReconnecting\"\n data-testid=\"collaboration-notice\"\n data-kind=\"reconnecting\"\n data-tone=\"warning\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:pointer-events-auto tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"TONE_STYLES.warning\"\n >\n {{ t.collaboration.reconnectingNotice }}\n </div>\n <!-- `message()` is interpolated, never `v-html`: an agent's name comes\n from its own registration and is untrusted text. -->\n <div\n v-if=\"notice\"\n :key=\"notice.id\"\n data-testid=\"collaboration-notice\"\n :data-kind=\"notice.kind\"\n :data-tone=\"tone\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"TONE_STYLES[tone]\"\n >\n <span>{{ message(notice) }}</span>\n <button\n type=\"button\"\n class=\"tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded tpl:text-[var(--tpl-text-muted)] tpl:hover:text-[var(--tpl-text)]\"\n :aria-label=\"t.collaboration.dismiss\"\n :title=\"t.collaboration.dismiss\"\n @click=\"feature.dismissNotice(notice.id)\"\n >\n <X :size=\"14\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n </div>\n</template>\n"],"mappings":";;;;;;;;;EAUA,IAAM2B,IAAQC,GAIR,EAAE,MAAG,cAAWL,EAAQ,GAExBM,IAASZ,QAAeU,EAAM,QAAQ,QAAQ,MAAM,GAAG,EAAE,KAAK,IAAI,GAGlEG,IAAiB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,EAC5C,OAAOG,EAAK,QAAQ,IAAIL,CAAM,CAAC,CAAC,KAAK,IAAI,EAC3C,CAAC;IACH,KAAK;IACL,KAAK,YACH,OAAOG,EAAaE,CAAI;GAC5B;EACF;E,mCAKUP,EAAA,SADR9B,EAAA,GAAAC,EAWM,OAAA;;GATJ,eAAY;GACZ,aAAU;GACV,aAAU;GACV,MAAK;GACL,aAAU;GACV,OAAM;GACL,OAAKE,EAAEC,EAAAkB,CAAA,CAAW,CAAC,OAAO;EAExB,GAAAjB,EAAAD,EAAA8B,CAAA,CAAC,CAAC,cAAc,kBAAkB,GAAA,CAAA,K,WAK/BL,EAAA,SADR7B,EAAA,GAAAC,EAqBM,OAAA;GAnBH,KAAK4B,EAAA,MAAO;GACb,eAAY;GACX,aAAWA,EAAA,MAAO;GAClB,aAAWE,EAAA;GACZ,MAAK;GACL,aAAU;GACV,OAAM;GACL,OAAK5B,EAAEC,EAAAkB,CAAA,CAAW,CAACS,EAAA,MAAI;E,IAExBxB,EAAkC,QAAA,MAAAF,EAAzBkC,EAAQV,EAAA,KAAM,CAAA,GAAA,CAAA,GACvBtB,EAQS,UAAA;GAPP,MAAK;GACL,OAAM;GACL,cAAYH,EAAA8B,CAAA,CAAC,CAAC,cAAc;GAC5B,OAAO9B,EAAA8B,CAAA,CAAC,CAAC,cAAc;GACvB,SAAK,AAAAM,EAAA,QAAA,MAAEZ,EAAA,QAAQ,cAAcC,EAAA,MAAO,EAAE;E,IAEvCrB,EAAqDJ,EAAAiB,CAAA,GAAA;GAAjD,MAAM;GAAK,gBAAc;GAAG,eAAY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollaboratorBar-CN6XAlbn.js","names":["_openBlock","_createElementBlock","_unref","_createElementVNode","_normalizeStyle","_createBlock","_toDisplayString","_Fragment","_renderList","_createCommentVNode","_sfc_main","defineComponent","openBlock","renderList","createElementBlock","unref","createCommentVNode","createBlock","createBaseVNode","toDisplayString","computed","normalizeStyle","Fragment","WifiOff","Wifi","useI18n","readableTextColor","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","MAX_VISIBLE","CollaboratorBar_default","props","__props","visiblePeople","overflowPeople","overflowNames","displayName","isConnected","connectionLabel","t","person","initials","parts"],"sources":["../../../src/components/collaboration/CollaboratorBar.vue","../../../src/components/collaboration/CollaboratorBar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { CollaborationConnectionState } from \"@templatical/types\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport type { CollaborationPerson } from \"../../composables/useCollaborationFeature\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n /** Everyone else with the template open, one entry per person. */\n people: CollaborationPerson[];\n /** `null` while no realtime join has happened. */\n connection: CollaborationConnectionState | null;\n}>();\n\nconst { t } = useI18n();\n\nconst MAX_VISIBLE = 3;\n\nconst visiblePeople = computed(() => props.people.slice(0, MAX_VISIBLE));\nconst overflowPeople = computed(() => props.people.slice(MAX_VISIBLE));\nconst overflowNames = computed(() =>\n overflowPeople.value.map(displayName).join(\"\\n\"),\n);\n\nconst isConnected = computed(() => props.connection === \"connected\");\nconst connectionLabel = computed(() => {\n if (props.connection === \"connected\") return t.collaboration.connected;\n if (props.connection === \"reconnecting\") return t.collaboration.reconnecting;\n return t.collaboration.offline;\n});\n\n/** A guest's name comes from the server in English; the bar uses its own word. */\nfunction displayName(person: CollaborationPerson): string {\n return person.type === \"guest\" || person.name.trim() === \"\"\n ? t.collaboration.guest\n : person.name;\n}\n\nfunction initials(person: CollaborationPerson): string {\n const parts = displayName(person).trim().split(/\\s+/);\n const first = parts[0]?.charAt(0) ?? \"\";\n const last = parts.length > 1 ? parts[parts.length - 1].charAt(0) : \"\";\n return (first + last).toUpperCase();\n}\n</script>\n\n<template>\n <div\n data-testid=\"collaborator-bar\"\n role=\"group\"\n :aria-label=\"t.collaboration.people\"\n class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\"\n >\n <span\n data-testid=\"collaborator-connection\"\n :data-state=\"connection ?? 'none'\"\n class=\"tpl:flex tpl:items-center tpl:text-xs\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"connectionLabel\"\n >\n <Wifi\n v-if=\"isConnected\"\n :size=\"12\"\n :stroke-width=\"2\"\n aria-hidden=\"true\"\n />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" aria-hidden=\"true\" />\n <span class=\"tpl:sr-only\">{{ connectionLabel }}</span>\n </span>\n\n <div class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\">\n <span\n v-for=\"person in visiblePeople\"\n :key=\"person.key\"\n data-testid=\"collaborator-avatar\"\n :data-person-type=\"person.type\"\n class=\"tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded-full tpl:border-2 tpl:border-[var(--tpl-bg)] tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:hover:z-10 tpl:hover:scale-110\"\n :style=\"{\n backgroundColor: person.color,\n color: readableTextColor(person.color),\n boxShadow: `0 0 0 1px ${person.color}`,\n }\"\n :title=\"displayName(person)\"\n >\n <img\n v-if=\"person.avatarUrl\"\n :src=\"person.avatarUrl\"\n alt=\"\"\n class=\"tpl:size-full tpl:object-cover\"\n />\n <span v-else aria-hidden=\"true\">{{ initials(person) }}</span>\n <span class=\"tpl:sr-only\">{{ displayName(person) }}</span>\n </span>\n <span\n v-if=\"overflowPeople.length > 0\"\n data-testid=\"collaborator-overflow\"\n class=\"tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[10px] tpl:font-bold tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowPeople.length }}\n </span>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { CollaborationConnectionState } from \"@templatical/types\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport type { CollaborationPerson } from \"../../composables/useCollaborationFeature\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n /** Everyone else with the template open, one entry per person. */\n people: CollaborationPerson[];\n /** `null` while no realtime join has happened. */\n connection: CollaborationConnectionState | null;\n}>();\n\nconst { t } = useI18n();\n\nconst MAX_VISIBLE = 3;\n\nconst visiblePeople = computed(() => props.people.slice(0, MAX_VISIBLE));\nconst overflowPeople = computed(() => props.people.slice(MAX_VISIBLE));\nconst overflowNames = computed(() =>\n overflowPeople.value.map(displayName).join(\"\\n\"),\n);\n\nconst isConnected = computed(() => props.connection === \"connected\");\nconst connectionLabel = computed(() => {\n if (props.connection === \"connected\") return t.collaboration.connected;\n if (props.connection === \"reconnecting\") return t.collaboration.reconnecting;\n return t.collaboration.offline;\n});\n\n/** A guest's name comes from the server in English; the bar uses its own word. */\nfunction displayName(person: CollaborationPerson): string {\n return person.type === \"guest\" || person.name.trim() === \"\"\n ? t.collaboration.guest\n : person.name;\n}\n\nfunction initials(person: CollaborationPerson): string {\n const parts = displayName(person).trim().split(/\\s+/);\n const first = parts[0]?.charAt(0) ?? \"\";\n const last = parts.length > 1 ? parts[parts.length - 1].charAt(0) : \"\";\n return (first + last).toUpperCase();\n}\n</script>\n\n<template>\n <div\n data-testid=\"collaborator-bar\"\n role=\"group\"\n :aria-label=\"t.collaboration.people\"\n class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\"\n >\n <span\n data-testid=\"collaborator-connection\"\n :data-state=\"connection ?? 'none'\"\n class=\"tpl:flex tpl:items-center tpl:text-xs\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"connectionLabel\"\n >\n <Wifi\n v-if=\"isConnected\"\n :size=\"12\"\n :stroke-width=\"2\"\n aria-hidden=\"true\"\n />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" aria-hidden=\"true\" />\n <span class=\"tpl:sr-only\">{{ connectionLabel }}</span>\n </span>\n\n <div class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\">\n <span\n v-for=\"person in visiblePeople\"\n :key=\"person.key\"\n data-testid=\"collaborator-avatar\"\n :data-person-type=\"person.type\"\n class=\"tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded-full tpl:border-2 tpl:border-[var(--tpl-bg)] tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:hover:z-10 tpl:hover:scale-110\"\n :style=\"{\n backgroundColor: person.color,\n color: readableTextColor(person.color),\n boxShadow: `0 0 0 1px ${person.color}`,\n }\"\n :title=\"displayName(person)\"\n >\n <img\n v-if=\"person.avatarUrl\"\n :src=\"person.avatarUrl\"\n alt=\"\"\n class=\"tpl:size-full tpl:object-cover\"\n />\n <span v-else aria-hidden=\"true\">{{ initials(person) }}</span>\n <span class=\"tpl:sr-only\">{{ displayName(person) }}</span>\n </span>\n <span\n v-if=\"overflowPeople.length > 0\"\n data-testid=\"collaborator-overflow\"\n class=\"tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[10px] tpl:font-bold tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowPeople.length }}\n </span>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;A,gDAiBMoC,IAAc,G;;;;;;;EATpB,IAAME,IAAQC,GAOR,EAAE,SAAMd,EAAQ,GAIhBe,IAAgBpB,QAAekB,EAAM,OAAO,MAAM,GAAGF,CAAW,CAAC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A+BM,OA/BN2B,GA+BM,EA9BJ9B,EAAA,EAAA,GAAAC,EAqBOM,GAAA,MAAAC,EApBYgC,EAAA,QAAV,OADTxC,EAAA,GAAAC,EAqBO,QAAA;GAnBJ,KAAK8C,EAAO;GACb,eAAY;GACX,oBAAkBA,EAAO;GAC1B,OAAM;GACL,OAAK3C,EAAA;IAA+B,iBAAA2C,EAAO;IAAwB,OAAA7C,EAAAwB,CAAA,CAAiB,CAACqB,EAAO,KAAK;IAAqC,WAAA,aAAAA,EAAO;;GAK7I,OAAOJ,EAAYI,CAAM;E,IAGlBA,EAAO,aADf/C,EAAA,GAAAC,EAKE,OAAA;;GAHC,KAAK8C,EAAO;GACb,KAAI;GACJ,OAAM;E,mBAER/C,EAAA,GAAAC,EAA6D,QAA7DgC,GAA6D3B,EAA1B0C,EAASD,CAAM,CAAA,GAAA,CAAA,IAClD5C,EAA0D,QAA1D+B,GAA0D5B,EAA7BqC,EAAYI,CAAM,CAAA,GAAA,CAAA,C,oBAGzCN,EAAA,MAAe,SAAM,KAD7BzC,EAAA,GAAAC,EAOO,QAAA;;GALL,eAAY;GACZ,OAAM;GACL,OAAOyC,EAAA;EACT,GAAA,OACEpC,EAAGmC,EAAA,MAAe,MAAM,GAAA,GAAAN,CAAA,K"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommentsPanel-CxZ1kFcK.js","names":["_openBlock","_createBlock","_Transition","_withCtx","_unref","_createCommentVNode","_sfc_main","defineComponent","openBlock","withCtx","defineAsyncComponent","unref","createCommentVNode","createBlock","Transition","CommentsPanel_default","CommentsSidebar","__props","_cache"],"sources":["../../../src/components/CommentsPanel.vue","../../../src/components/CommentsPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Mount point for the comments sidebar, shared by both entry points.\n *\n * The sidebar is `defineAsyncComponent` behind a `v-if` on its open state, so its\n * chunk is fetched only when the user actually opens the panel. `Editor.vue` in\n * turn lazy-loads *this* wrapper and renders it only when a `CommentsProvider` and\n * a `user` are configured, so a consumer with neither downloads none of it —\n * the `TestEmailPanel` / `SavedBlocksPanels` shape.\n *\n * Never static-import `CommentsSidebar` into `Editor.vue`: that collapses the\n * whole panel into the main entry for every consumer. Guarded by\n * `tests/cdn-chunk-granularity.test.ts`.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseCommentsFeatureReturn } from \"../composables/useCommentsFeature\";\n\ndefineProps<{\n feature: UseCommentsFeatureReturn;\n}>();\n\n// The slide lives here, around the `v-if`: inside the sidebar it would mount\n// already visible (no enter) and unmount with it (no leave).\nconst CommentsSidebar = defineAsyncComponent(\n () => import(\"./CommentsSidebar.vue\"),\n);\n</script>\n\n<template>\n <Transition\n enter-active-class=\"tpl-panel-enter-active\"\n leave-active-class=\"tpl-panel-leave-active\"\n >\n <CommentsSidebar\n v-if=\"feature.isOpen.value\"\n :visible=\"feature.isOpen.value\"\n :feature=\"feature\"\n @close=\"feature.close()\"\n />\n </Transition>\n</template>\n","<script setup lang=\"ts\">\n/**\n * Mount point for the comments sidebar, shared by both entry points.\n *\n * The sidebar is `defineAsyncComponent` behind a `v-if` on its open state, so its\n * chunk is fetched only when the user actually opens the panel. `Editor.vue` in\n * turn lazy-loads *this* wrapper and renders it only when a `CommentsProvider` and\n * a `user` are configured, so a consumer with neither downloads none of it —\n * the `TestEmailPanel` / `SavedBlocksPanels` shape.\n *\n * Never static-import `CommentsSidebar` into `Editor.vue`: that collapses the\n * whole panel into the main entry for every consumer. Guarded by\n * `tests/cdn-chunk-granularity.test.ts`.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseCommentsFeatureReturn } from \"../composables/useCommentsFeature\";\n\ndefineProps<{\n feature: UseCommentsFeatureReturn;\n}>();\n\n// The slide lives here, around the `v-if`: inside the sidebar it would mount\n// already visible (no enter) and unmount with it (no leave).\nconst CommentsSidebar = defineAsyncComponent(\n () => import(\"./CommentsSidebar.vue\"),\n);\n</script>\n\n<template>\n <Transition\n enter-active-class=\"tpl-panel-enter-active\"\n leave-active-class=\"tpl-panel-leave-active\"\n >\n <CommentsSidebar\n v-if=\"feature.isOpen.value\"\n :visible=\"feature.isOpen.value\"\n :feature=\"feature\"\n @close=\"feature.close()\"\n />\n </Transition>\n</template>\n"],"mappings":";;;;;;EAuBA,IAAMgB,IAAkBN,QAChB,OAAO,gCACf;E,kBAIEV,EAAA,GAAAC,EAUaC,GAAA;GATX,sBAAmB;GACnB,sBAAmB;;GAEnB,SAAAC,QAKE,CAJMc,EAAA,QAAQ,OAAO,SADvBjB,EAAA,GAAAC,EAKEG,EAAAY,CAAA,GAAA;;IAHC,SAASC,EAAA,QAAQ,OAAO;IACxB,SAASA,EAAA;IACT,SAAK,AAAAC,EAAA,QAAA,MAAED,EAAA,QAAQ,MAAK"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommentsSidebar-DCr2mV8b.js","names":["_openBlock","_createElementBlock","_unref","_createElementVNode","_createVNode","_toDisplayString","_createCommentVNode","_normalizeClass","_Fragment","_renderList","_normalizeStyle","Trash2","_Transition","_withCtx","_withDirectives","_vModelText","_createBlock","_createTextVNode","_sfc_main","defineComponent","openBlock","withCtx","watch","withDirectives","renderList","inject","createElementBlock","createTextVNode","unref","normalizeClass","createCommentVNode","createBlock","nextTick","createBaseVNode","toDisplayString","Transition","vModelText","computed","normalizeStyle","ref","Fragment","createVNode","chromePillClass","languageName","formatRelativeTime","LOCALIZATION_KEY","requireInject","EDITOR_KEY","useI18n","ChevronDown","Pencil","Reply","CircleCheck","ChevronUp","Check","LoaderCircle","Trash","Send","MessageCircle","X","_plugin_vue_export_helper_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","_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","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_43","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_47","_hoisted_48","_hoisted_49","_hoisted_50","_hoisted_51","_hoisted_52","_hoisted_53","_hoisted_54","_hoisted_55","_hoisted_56","_hoisted_57","_hoisted_58","_hoisted_59","_hoisted_60","_hoisted_61","_hoisted_62","_hoisted_63","_hoisted_64","_hoisted_65","CommentsSidebar_default","__expose","__emit","props","__props","emit","editor","comments","filterMode","localization","thisLanguage","activeLanguage","commentLanguage","comment","newCommentBody","replyingTo","replyBody","editingId","editBody","expandedThreads","deletingId","newCommentInput","filterBlockId","blockId","isInitialLoad","allBlockIds","ids","block","column","child","isBlockMissing","isBlockFilterUnsaved","filteredComments","items","c","thread","newBlockId","setFilter","mode","filterByBlock","toggleThread","threadId","startReply","cancelReply","startEdit","cancelEdit","confirmDelete","commentId","cancelDelete","handleAddComment","body","handleReply","parent","parentId","handleEdit","handleDelete","handleResolve","canEdit","canDelete","formatTime","dateString","t","handleNewCommentKeydown","event","handleReplyKeydown","handleEditKeydown","focusNewComment","_cache","format","$event","reply","index"],"sources":["../../../src/components/CommentsSidebar.vue","../../../src/components/CommentsSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { chromePillClass } from \"../constants/styleConstants\";\nimport { languageName } from \"../utils/languageName\";\nimport { formatRelativeTime } from \"../utils/formatRelativeTime\";\nimport { EDITOR_KEY, LOCALIZATION_KEY, requireInject } from \"../keys\";\nimport { useI18n } from \"../composables/useI18n\";\nimport type { UseCommentsFeatureReturn } from \"../composables/useCommentsFeature\";\nimport type { Comment } from \"@templatical/types\";\nimport {\n Check,\n CircleCheck,\n ChevronDown,\n ChevronUp,\n LoaderCircle,\n MessageCircle,\n Pencil,\n Reply,\n Send,\n Trash2,\n X,\n} from \"@lucide/vue\";\nimport { computed, inject, nextTick, ref, watch } from \"vue\";\n\n/**\n * The review panel, **shared by both entry points**.\n *\n * It takes the shared feature as a prop — the `TestEmailPanel` /\n * `SavedBlocksPanels` shape — so the same panel drives a consumer's own store and\n * Cloud's, and its strings live in the OSS chunk.\n *\n * Every write action is gated on the provider having supplied that mutation, and\n * **hidden** rather than disabled when it hasn't: a provider that withholds all\n * four yields a readable review with no way to change anything.\n */\nconst props = defineProps<{\n visible: boolean;\n feature: UseCommentsFeatureReturn;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n}>();\n\nconst { t, format } = useI18n();\nconst editor = requireInject(EDITOR_KEY, \"CommentsSidebar\");\n\nconst comments = computed(() => props.feature.headless);\n\ntype FilterMode = \"all\" | \"unresolved\" | \"block\";\nconst filterMode = ref<FilterMode>(\"unresolved\");\nconst localization = inject(LOCALIZATION_KEY, undefined);\nconst thisLanguage = ref(false);\nconst activeLanguage = computed(\n () => editor.activeLocale?.value ?? editor.content.value.settings.locale,\n);\nfunction commentLanguage(comment: Comment): string {\n return comment.locale ?? editor.content.value.settings.locale;\n}\n\nconst newCommentBody = ref(\"\");\nconst replyingTo = ref<string | null>(null);\nconst replyBody = ref(\"\");\nconst editingId = ref<string | null>(null);\nconst editBody = ref(\"\");\nconst expandedThreads = ref<Set<string>>(new Set());\nconst deletingId = ref<string | null>(null);\nconst newCommentInput = ref<HTMLTextAreaElement | null>(null);\n\n/**\n * The block filter lives on the feature, not here: a canvas comment indicator sets\n * it *before* this panel exists (it is lazy), so the target has to survive the gap.\n */\nconst filterBlockId = computed(() => props.feature.filterBlockId.value);\n\n// An indicator click lands a block id on the feature; switching to that filter is\n// this panel's half of the handshake. `immediate` covers the case that opened the\n// panel in the first place, where the id is already set at mount.\nwatch(\n filterBlockId,\n (blockId) => {\n if (blockId) filterMode.value = \"block\";\n },\n { immediate: true },\n);\n\n// `isLoading` alone would flash the skeleton over a perfectly good list every\n// re-open; the pair distinguishes \"fetching, nothing yet\" from \"refreshing\".\nconst isInitialLoad = computed(\n () =>\n comments.value.isLoading.value &&\n comments.value.comments.value.length === 0,\n);\n\nconst allBlockIds = computed<Set<string>>(() => {\n const ids = new Set<string>();\n for (const block of editor.content.value.blocks) {\n ids.add(block.id);\n if (block.type === \"section\") {\n for (const column of block.children) {\n for (const child of column) {\n ids.add(child.id);\n }\n }\n }\n }\n return ids;\n});\n\nfunction isBlockMissing(blockId: string | null | undefined): boolean {\n if (!blockId) {\n return false;\n }\n return !allBlockIds.value.has(blockId);\n}\n\nconst isBlockFilterUnsaved = computed(() => {\n if (filterMode.value !== \"block\" || !filterBlockId.value) {\n return false;\n }\n // Asked through the capability rather than off the editor: a comment anchors to\n // a block in the *saved* template, and only the provider's side knows what that\n // contains. A store that accepts any anchor answers `true` and this never fires.\n return props.feature.capability.isBlockSaved(filterBlockId.value) === false;\n});\n\nconst filteredComments = computed(() => {\n let items = comments.value.comments.value;\n\n if (filterMode.value === \"unresolved\") {\n items = items.filter((c) => !c.resolvedAt);\n } else if (filterMode.value === \"block\" && filterBlockId.value) {\n items = items.filter((c) => c.blockId === filterBlockId.value);\n }\n\n if (thisLanguage.value) {\n items = items.filter((thread) =>\n [thread, ...(thread.replies ?? [])].some(\n (comment) => commentLanguage(comment) === activeLanguage.value,\n ),\n );\n }\n return items;\n});\n\nwatch(\n () => editor.state.selectedBlockId,\n (newBlockId) => {\n if (filterMode.value === \"block\" && newBlockId) {\n props.feature.filterBlockId.value = newBlockId;\n }\n },\n);\n\nfunction setFilter(mode: FilterMode, blockId?: string): void {\n filterMode.value = mode;\n props.feature.filterBlockId.value =\n mode === \"block\" ? (blockId ?? null) : null;\n}\n\nfunction filterByBlock(blockId: string): void {\n setFilter(\"block\", blockId);\n}\n\nfunction toggleThread(threadId: string): void {\n if (expandedThreads.value.has(threadId)) {\n expandedThreads.value.delete(threadId);\n } else {\n expandedThreads.value.add(threadId);\n }\n}\n\nfunction startReply(threadId: string): void {\n replyingTo.value = threadId;\n replyBody.value = \"\";\n editingId.value = null;\n\n if (!expandedThreads.value.has(threadId)) {\n expandedThreads.value.add(threadId);\n }\n}\n\nfunction cancelReply(): void {\n replyingTo.value = null;\n replyBody.value = \"\";\n}\n\nfunction startEdit(comment: Comment): void {\n editingId.value = comment.id;\n editBody.value = comment.body;\n replyingTo.value = null;\n}\n\nfunction cancelEdit(): void {\n editingId.value = null;\n editBody.value = \"\";\n}\n\nfunction confirmDelete(commentId: string): void {\n deletingId.value = commentId;\n}\n\nfunction cancelDelete(): void {\n deletingId.value = null;\n}\n\n/**\n * Every write swallows its rejection. The feature already routed it to `onError`\n * and left the list untouched, and an unhandled rejection out of a DOM event\n * binding helps nobody — same shape as `VersionHistoryPanels`.\n */\nasync function handleAddComment(): Promise<void> {\n const body = newCommentBody.value.trim();\n if (!body || !comments.value.canCreate.value) {\n return;\n }\n\n const blockId =\n filterMode.value === \"block\" ? filterBlockId.value : undefined;\n try {\n await comments.value.create({\n body,\n blockId: blockId ?? undefined,\n locale:\n editor.activeLocale?.value ?? editor.content.value.settings.locale,\n });\n newCommentBody.value = \"\";\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleReply(parentId: string): Promise<void> {\n const body = replyBody.value.trim();\n if (!body || !comments.value.canCreate.value) {\n return;\n }\n\n const parent = comments.value.find(parentId);\n try {\n await comments.value.create({\n body,\n blockId: parent?.blockId ?? undefined,\n parentId,\n locale:\n editor.activeLocale?.value ?? editor.content.value.settings.locale,\n });\n replyingTo.value = null;\n replyBody.value = \"\";\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleEdit(commentId: string): Promise<void> {\n const body = editBody.value.trim();\n if (!body) {\n return;\n }\n\n try {\n await comments.value.update(commentId, { body });\n editingId.value = null;\n editBody.value = \"\";\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleDelete(commentId: string): Promise<void> {\n try {\n await comments.value.remove(commentId);\n } catch {\n /* reported through onError */\n }\n deletingId.value = null;\n}\n\nasync function handleResolve(comment: Comment): Promise<void> {\n try {\n // The target state, not a toggle: two clicks in flight can't invert.\n await comments.value.setResolved(comment.id, !comment.resolvedAt);\n } catch {\n /* reported through onError */\n }\n}\n\n/** Editing and deleting are the author's own, and only when the store allows it. */\nfunction canEdit(comment: Comment): boolean {\n return comments.value.canUpdate.value && comments.value.isOwn(comment);\n}\n\nfunction canDelete(comment: Comment): boolean {\n return comments.value.canDelete.value && comments.value.isOwn(comment);\n}\n\nfunction formatTime(dateString: string): string {\n return formatRelativeTime(dateString, t.time) ?? dateString;\n}\n\nfunction handleNewCommentKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleAddComment();\n }\n}\n\nfunction handleReplyKeydown(event: KeyboardEvent, parentId: string): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleReply(parentId);\n }\n}\n\nfunction handleEditKeydown(event: KeyboardEvent, commentId: string): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleEdit(commentId);\n }\n if (event.key === \"Escape\") {\n cancelEdit();\n }\n}\n\nfunction focusNewComment(): void {\n nextTick(() => {\n newCommentInput.value?.focus();\n });\n}\n\ndefineExpose({ filterByBlock, focusNewComment });\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n role=\"complementary\"\n :aria-label=\"t.comments.title\"\n data-testid=\"comments-sidebar\"\n class=\"tpl-comments-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 <!-- Header -->\n <div\n class=\"tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3\"\n >\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]\"\n >\n <MessageCircle :size=\"13\" :stroke-width=\"2\" />\n <span>{{ t.comments.title }}</span>\n <span\n v-if=\"feature.unresolvedCount.value > 0\"\n class=\"tpl:ml-1 tpl:inline-flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[10px] tpl:font-semibold tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]\"\n >\n {{ feature.unresolvedCount.value }}\n </span>\n </div>\n <button\n type=\"button\"\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n :aria-label=\"t.comments.close\"\n @click=\"emit('close')\"\n >\n <X :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n\n <!-- Filter bar -->\n <div\n class=\"tpl:flex tpl:flex-wrap tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2\"\n >\n <button\n type=\"button\"\n class=\"tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors\"\n :class=\"filterMode === 'unresolved' ? 'tpl-comment-filter--active' : ''\"\n :aria-pressed=\"filterMode === 'unresolved'\"\n data-testid=\"comments-filter-unresolved\"\n @click=\"setFilter('unresolved')\"\n >\n {{ t.comments.filterUnresolved }}\n </button>\n <button\n type=\"button\"\n class=\"tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors\"\n :class=\"filterMode === 'all' ? 'tpl-comment-filter--active' : ''\"\n :aria-pressed=\"filterMode === 'all'\"\n data-testid=\"comments-filter-all\"\n @click=\"setFilter('all')\"\n >\n {{ t.comments.filterAll }}\n </button>\n <button\n v-if=\"editor.state.selectedBlockId\"\n type=\"button\"\n class=\"tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors\"\n :class=\"filterMode === 'block' ? 'tpl-comment-filter--active' : ''\"\n :aria-pressed=\"filterMode === 'block'\"\n data-testid=\"comments-filter-block\"\n @click=\"setFilter('block', editor.state.selectedBlockId ?? undefined)\"\n >\n {{ t.comments.filterBlock }}\n </button>\n <button\n v-if=\"localization\"\n type=\"button\"\n data-testid=\"comments-filter-language\"\n class=\"tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)]\"\n :class=\"thisLanguage ? 'tpl-comment-filter--active' : ''\"\n :aria-pressed=\"thisLanguage\"\n @click=\"thisLanguage = !thisLanguage\"\n >\n {{ t.comments.filterLanguage }}\n </button>\n </div>\n\n <!-- Thread list -->\n <div class=\"tpl:flex-1 tpl:overflow-y-auto\">\n <!-- Loading state -->\n <div\n v-if=\"isInitialLoad\"\n class=\"tpl:flex tpl:h-full tpl:items-center tpl:justify-center\"\n >\n <LoaderCircle\n class=\"tpl-spinner tpl:text-[var(--tpl-text-muted)]\"\n :size=\"24\"\n :stroke-width=\"2\"\n />\n </div>\n\n <!-- Empty state -->\n <div\n v-else-if=\"filteredComments.length === 0\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center\"\n >\n <MessageCircle\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-text-dim)]\"\n />\n <p\n class=\"tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{\n filterMode === \"all\"\n ? t.comments.noCommentsHint\n : t.comments.noComments\n }}\n </p>\n </div>\n\n <!-- Comment threads -->\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3\">\n <div\n v-for=\"thread in filteredComments\"\n :key=\"thread.id\"\n class=\"tpl-comment-thread\"\n data-testid=\"comment-thread\"\n >\n <!-- Root comment card -->\n <div\n class=\"tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3\"\n >\n <!-- Comment header -->\n <div class=\"tpl:flex tpl:items-start tpl:justify-between tpl:gap-2\">\n <div class=\"tpl:flex tpl:flex-wrap tpl:items-center tpl:gap-1.5\">\n <span\n class=\"tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{\n comments.isOwn(thread)\n ? t.comments.ownedByYou\n : thread.author.name\n }}\n </span>\n <span class=\"tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\">\n {{ formatTime(thread.createdAt) }}\n </span>\n <span\n v-if=\"localization\"\n data-testid=\"comment-locale-badge\"\n :class=\"chromePillClass\"\n >{{ languageName(commentLanguage(thread)) }}</span\n >\n <span\n v-if=\"thread.updatedAt\"\n class=\"tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]\"\n >\n ({{ t.comments.edited }})\n </span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-0.5\">\n <!-- Resolve toggle -->\n <button\n v-if=\"comments.canResolve.value\"\n data-testid=\"comment-resolve\"\n class=\"tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors\"\n :title=\"\n thread.resolvedAt\n ? t.comments.unresolve\n : t.comments.resolve\n \"\n @click=\"handleResolve(thread)\"\n >\n <CircleCheck\n :size=\"13\"\n :stroke-width=\"2\"\n class=\"tpl-resolve-icon\"\n :style=\"{\n color: thread.resolvedAt\n ? 'var(--tpl-primary)'\n : undefined,\n }\"\n />\n </button>\n <!-- Edit (own only) -->\n <button\n v-if=\"canEdit(thread)\"\n data-testid=\"comment-edit\"\n class=\"tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors\"\n :title=\"t.comments.edit\"\n @click=\"startEdit(thread)\"\n >\n <Pencil :size=\"12\" :stroke-width=\"2\" />\n </button>\n <!-- Delete (own only) -->\n <button\n v-if=\"canDelete(thread)\"\n data-testid=\"comment-delete\"\n class=\"tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors\"\n :title=\"t.comments.delete\"\n @click=\"confirmDelete(thread.id)\"\n >\n <Trash2 :size=\"12\" :stroke-width=\"2\" />\n </button>\n </div>\n </div>\n\n <!-- Resolved badge -->\n <Transition name=\"tpl-resolve\">\n <div\n v-if=\"thread.resolvedAt\"\n class=\"tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]\"\n >\n <Check :size=\"10\" :stroke-width=\"2.5\" />\n <span>\n {{\n format(t.comments.resolvedBy, {\n name: thread.resolvedBy?.name ?? \"\",\n })\n }}\n </span>\n </div>\n </Transition>\n\n <!-- Block anchor indicator -->\n <span\n v-if=\"thread.blockId && isBlockMissing(thread.blockId)\"\n class=\"tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]\"\n >\n {{ t.comments.missingBlock }}\n </span>\n <button\n v-else-if=\"thread.blockId\"\n class=\"tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n @click=\"editor.selectBlock(thread.blockId ?? '')\"\n >\n {{ t.comments.jumpToBlock }}\n </button>\n\n <!-- Comment body (or edit mode) -->\n <div v-if=\"editingId === thread.id\" class=\"tpl:mt-2\">\n <textarea\n v-model=\"editBody\"\n class=\"tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]\"\n rows=\"3\"\n @keydown=\"handleEditKeydown($event, thread.id)\"\n />\n <div class=\"tpl:mt-1.5 tpl:flex tpl:gap-1.5\">\n <button\n class=\"tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]\"\n :disabled=\"!editBody.trim() || comments.isSubmitting.value\"\n @click=\"handleEdit(thread.id)\"\n >\n {{ t.comments.save }}\n </button>\n <button\n class=\"tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n @click=\"cancelEdit()\"\n >\n {{ t.comments.cancel }}\n </button>\n </div>\n </div>\n <p\n v-else\n class=\"tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]\"\n >\n {{ thread.body }}\n </p>\n\n <!-- Delete confirmation -->\n <div\n v-if=\"deletingId === thread.id\"\n class=\"tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]\"\n >\n <span class=\"tpl:flex-1\">\n {{ t.comments.deleteConfirm }}\n </span>\n <button\n class=\"tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]\"\n data-testid=\"comment-delete-confirm\"\n @click=\"handleDelete(thread.id)\"\n >\n {{ t.comments.delete }}\n </button>\n <button\n class=\"tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n @click=\"cancelDelete()\"\n >\n {{ t.comments.cancel }}\n </button>\n </div>\n\n <!-- Thread actions -->\n <div\n v-if=\"editingId !== thread.id && deletingId !== thread.id\"\n class=\"tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2\"\n >\n <button\n v-if=\"comments.canCreate.value\"\n data-testid=\"comment-reply\"\n class=\"tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors\"\n :title=\"t.comments.reply\"\n @click=\"startReply(thread.id)\"\n >\n <Reply\n :size=\"13\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-primary)]\"\n />\n </button>\n <button\n v-if=\"(thread.replies?.length ?? 0) > 0\"\n class=\"tpl:flex tpl:items-center tpl:gap-0.5 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n @click=\"toggleThread(thread.id)\"\n >\n <template v-if=\"expandedThreads.has(thread.id)\">\n <ChevronUp :size=\"11\" :stroke-width=\"2\" />\n </template>\n <template v-else>\n <ChevronDown :size=\"11\" :stroke-width=\"2\" />\n </template>\n {{\n (thread.replies?.length ?? 0) === 1\n ? format(t.comments.replyOne, {\n count: String(thread.replies?.length ?? 0),\n })\n : format(t.comments.replyMany, {\n count: String(thread.replies?.length ?? 0),\n })\n }}\n </button>\n </div>\n </div>\n\n <!-- Replies -->\n <Transition name=\"tpl-replies\">\n <div\n v-if=\"\n expandedThreads.has(thread.id) &&\n (thread.replies?.length ?? 0) > 0\n \"\n class=\"tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2\"\n >\n <div\n v-for=\"(reply, index) in thread.replies\"\n :key=\"reply.id\"\n class=\"tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5\"\n :class=\"\n index < (thread.replies?.length ?? 0) - 1 ? 'tpl:mb-2' : ''\n \"\n >\n <div\n class=\"tpl:flex tpl:items-start tpl:justify-between tpl:gap-2\"\n >\n <div\n class=\"tpl:flex tpl:flex-wrap tpl:items-center tpl:gap-1.5\"\n >\n <span\n class=\"tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{\n comments.isOwn(reply)\n ? t.comments.ownedByYou\n : reply.author.name\n }}\n </span>\n <span\n class=\"tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ formatTime(reply.createdAt) }}\n </span>\n <span\n v-if=\"localization\"\n data-testid=\"comment-locale-badge\"\n :class=\"chromePillClass\"\n >{{ languageName(commentLanguage(reply)) }}</span\n >\n <span\n v-if=\"reply.updatedAt\"\n class=\"tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]\"\n >\n ({{ t.comments.edited }})\n </span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-0.5\">\n <button\n v-if=\"canEdit(reply)\"\n class=\"tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors\"\n :title=\"t.comments.edit\"\n @click=\"startEdit(reply)\"\n >\n <Pencil :size=\"11\" :stroke-width=\"2\" />\n </button>\n <button\n v-if=\"canDelete(reply)\"\n class=\"tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors\"\n :title=\"t.comments.delete\"\n @click=\"confirmDelete(reply.id)\"\n >\n <Trash2 :size=\"11\" :stroke-width=\"2\" />\n </button>\n </div>\n </div>\n\n <!-- Reply body (or edit mode) -->\n <div v-if=\"editingId === reply.id\" class=\"tpl:mt-1.5\">\n <textarea\n v-model=\"editBody\"\n class=\"tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]\"\n rows=\"2\"\n @keydown=\"handleEditKeydown($event, reply.id)\"\n />\n <div class=\"tpl:mt-1.5 tpl:flex tpl:gap-1.5\">\n <button\n class=\"tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]\"\n :disabled=\"\n !editBody.trim() || comments.isSubmitting.value\n \"\n @click=\"handleEdit(reply.id)\"\n >\n {{ t.comments.save }}\n </button>\n <button\n class=\"tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n @click=\"cancelEdit()\"\n >\n {{ t.comments.cancel }}\n </button>\n </div>\n </div>\n <p\n v-else\n class=\"tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]\"\n >\n {{ reply.body }}\n </p>\n\n <!-- Delete confirmation for reply -->\n <div\n v-if=\"deletingId === reply.id\"\n class=\"tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]\"\n >\n <span class=\"tpl:flex-1\">\n {{ t.comments.deleteConfirm }}\n </span>\n <button\n class=\"tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]\"\n data-testid=\"comment-delete-confirm\"\n @click=\"handleDelete(reply.id)\"\n >\n {{ t.comments.delete }}\n </button>\n <button\n class=\"tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n @click=\"cancelDelete()\"\n >\n {{ t.comments.cancel }}\n </button>\n </div>\n </div>\n </div>\n </Transition>\n\n <!-- Reply input -->\n <Transition name=\"tpl-replies\">\n <div\n v-if=\"replyingTo === thread.id\"\n class=\"tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2\"\n >\n <!-- Same shape as the new-comment composer below: the border and\n the focus ring belong to the wrapper, the field is bare\n inside it, and the actions sit within the bounds rather than\n floating beside them. The two composers do the same job, so a\n reader should not have to notice they are different\n components. Only the height differs — a reply is nested and\n indented, so it starts at two rows without the composer's\n `min-h`. -->\n <div\n class=\"tpl-comments-input-wrapper tpl-focus-ring-host tpl:flex tpl:items-end 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 v-model=\"replyBody\"\n class=\"tpl:max-h-24 tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-xs tpl:outline-none tpl:text-[var(--tpl-text)]\"\n :placeholder=\"t.comments.replyPlaceholder\"\n rows=\"2\"\n @keydown=\"handleReplyKeydown($event, thread.id)\"\n />\n <button\n class=\"tpl-comments-send-btn 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 :disabled=\"!replyBody.trim() || comments.isSubmitting.value\"\n @click=\"handleReply(thread.id)\"\n >\n <Send :size=\"14\" :stroke-width=\"2\" />\n </button>\n <button\n class=\"tpl-comments-send-btn 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-text-muted)]\"\n @click=\"cancelReply()\"\n >\n <X :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n </div>\n </Transition>\n </div>\n </div>\n </div>\n\n <!-- New comment input. Absent entirely when the store withheld `create` —\n hidden rather than disabled, so a read-only review reads as one rather\n than as a broken composer. -->\n <div\n v-if=\"comments.canCreate.value\"\n class=\"tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]\"\n >\n <div\n v-if=\"isBlockFilterUnsaved\"\n class=\"tpl:flex tpl:min-h-[68px] tpl:items-center tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]\"\n >\n {{ t.comments.saveTemplateFirst }}\n </div>\n <div\n v-else\n class=\"tpl-comments-input-wrapper tpl-focus-ring-host tpl:flex tpl:min-h-[68px] tpl:items-end 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=\"newCommentInput\"\n v-model=\"newCommentBody\"\n class=\"tpl:max-h-24 tpl:min-h-[48px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-xs tpl:outline-none tpl:text-[var(--tpl-text)]\"\n data-testid=\"comments-input\"\n :placeholder=\"t.comments.placeholder\"\n :disabled=\"comments.isSubmitting.value\"\n rows=\"2\"\n @keydown=\"handleNewCommentKeydown\"\n />\n <button\n class=\"tpl-comments-send-btn 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 data-testid=\"comments-send\"\n :disabled=\"!newCommentBody.trim() || comments.isSubmitting.value\"\n @click=\"handleAddComment\"\n >\n <LoaderCircle\n v-if=\"comments.isSubmitting.value\"\n class=\"tpl-spinner\"\n :size=\"16\"\n :stroke-width=\"2\"\n />\n <Send v-else :size=\"16\" :stroke-width=\"2\" />\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.tpl-comments-input-wrapper:focus-within {\n border-color: var(--tpl-primary);\n box-shadow: var(--tpl-ring);\n}\n\n.tpl-comments-send-btn:not(:disabled):hover {\n transform: scale(1.05);\n}\n\n.tpl-comment-filter {\n color: var(--tpl-text-muted);\n background-color: transparent;\n}\n\n.tpl-comment-filter:hover {\n background-color: var(--tpl-bg-hover);\n color: var(--tpl-text);\n}\n\n.tpl-comment-filter--active {\n background-color: var(--tpl-primary-light);\n color: var(--tpl-primary);\n}\n\n.tpl-comment-action {\n color: var(--tpl-text-dim);\n background-color: transparent;\n}\n\n.tpl-comment-action:hover {\n background-color: var(--tpl-bg-hover);\n color: var(--tpl-text);\n}\n\n.tpl-comment-delete:hover {\n background-color: var(--tpl-danger-light);\n color: var(--tpl-danger);\n}\n\n.tpl-comment-card {\n border-color: var(--tpl-border);\n background-color: var(--tpl-bg);\n}\n\n.tpl-comment-reply-card {\n border-color: var(--tpl-border);\n background-color: var(--tpl-bg);\n}\n\n.tpl-resolve-enter-active,\n.tpl-resolve-leave-active {\n transition:\n opacity 0.3s ease,\n transform 0.3s ease;\n}\n\n.tpl-resolve-enter-from,\n.tpl-resolve-leave-to {\n opacity: 0;\n transform: translateY(-4px);\n}\n\n.tpl-resolve-icon {\n transition:\n color 0.3s ease,\n transform 0.2s ease;\n}\n\n.tpl-resolve-icon:active {\n transform: scale(1.3);\n}\n\n.tpl-replies-enter-active,\n.tpl-replies-leave-active {\n transition:\n opacity 0.25s ease,\n transform 0.25s ease;\n}\n\n.tpl-replies-enter-from,\n.tpl-replies-leave-to {\n opacity: 0;\n transform: translateY(-4px);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { chromePillClass } from \"../constants/styleConstants\";\nimport { languageName } from \"../utils/languageName\";\nimport { formatRelativeTime } from \"../utils/formatRelativeTime\";\nimport { EDITOR_KEY, LOCALIZATION_KEY, requireInject } from \"../keys\";\nimport { useI18n } from \"../composables/useI18n\";\nimport type { UseCommentsFeatureReturn } from \"../composables/useCommentsFeature\";\nimport type { Comment } from \"@templatical/types\";\nimport {\n Check,\n CircleCheck,\n ChevronDown,\n ChevronUp,\n LoaderCircle,\n MessageCircle,\n Pencil,\n Reply,\n Send,\n Trash2,\n X,\n} from \"@lucide/vue\";\nimport { computed, inject, nextTick, ref, watch } from \"vue\";\n\n/**\n * The review panel, **shared by both entry points**.\n *\n * It takes the shared feature as a prop — the `TestEmailPanel` /\n * `SavedBlocksPanels` shape — so the same panel drives a consumer's own store and\n * Cloud's, and its strings live in the OSS chunk.\n *\n * Every write action is gated on the provider having supplied that mutation, and\n * **hidden** rather than disabled when it hasn't: a provider that withholds all\n * four yields a readable review with no way to change anything.\n */\nconst props = defineProps<{\n visible: boolean;\n feature: UseCommentsFeatureReturn;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n}>();\n\nconst { t, format } = useI18n();\nconst editor = requireInject(EDITOR_KEY, \"CommentsSidebar\");\n\nconst comments = computed(() => props.feature.headless);\n\ntype FilterMode = \"all\" | \"unresolved\" | \"block\";\nconst filterMode = ref<FilterMode>(\"unresolved\");\nconst localization = inject(LOCALIZATION_KEY, undefined);\nconst thisLanguage = ref(false);\nconst activeLanguage = computed(\n () => editor.activeLocale?.value ?? editor.content.value.settings.locale,\n);\nfunction commentLanguage(comment: Comment): string {\n return comment.locale ?? editor.content.value.settings.locale;\n}\n\nconst newCommentBody = ref(\"\");\nconst replyingTo = ref<string | null>(null);\nconst replyBody = ref(\"\");\nconst editingId = ref<string | null>(null);\nconst editBody = ref(\"\");\nconst expandedThreads = ref<Set<string>>(new Set());\nconst deletingId = ref<string | null>(null);\nconst newCommentInput = ref<HTMLTextAreaElement | null>(null);\n\n/**\n * The block filter lives on the feature, not here: a canvas comment indicator sets\n * it *before* this panel exists (it is lazy), so the target has to survive the gap.\n */\nconst filterBlockId = computed(() => props.feature.filterBlockId.value);\n\n// An indicator click lands a block id on the feature; switching to that filter is\n// this panel's half of the handshake. `immediate` covers the case that opened the\n// panel in the first place, where the id is already set at mount.\nwatch(\n filterBlockId,\n (blockId) => {\n if (blockId) filterMode.value = \"block\";\n },\n { immediate: true },\n);\n\n// `isLoading` alone would flash the skeleton over a perfectly good list every\n// re-open; the pair distinguishes \"fetching, nothing yet\" from \"refreshing\".\nconst isInitialLoad = computed(\n () =>\n comments.value.isLoading.value &&\n comments.value.comments.value.length === 0,\n);\n\nconst allBlockIds = computed<Set<string>>(() => {\n const ids = new Set<string>();\n for (const block of editor.content.value.blocks) {\n ids.add(block.id);\n if (block.type === \"section\") {\n for (const column of block.children) {\n for (const child of column) {\n ids.add(child.id);\n }\n }\n }\n }\n return ids;\n});\n\nfunction isBlockMissing(blockId: string | null | undefined): boolean {\n if (!blockId) {\n return false;\n }\n return !allBlockIds.value.has(blockId);\n}\n\nconst isBlockFilterUnsaved = computed(() => {\n if (filterMode.value !== \"block\" || !filterBlockId.value) {\n return false;\n }\n // Asked through the capability rather than off the editor: a comment anchors to\n // a block in the *saved* template, and only the provider's side knows what that\n // contains. A store that accepts any anchor answers `true` and this never fires.\n return props.feature.capability.isBlockSaved(filterBlockId.value) === false;\n});\n\nconst filteredComments = computed(() => {\n let items = comments.value.comments.value;\n\n if (filterMode.value === \"unresolved\") {\n items = items.filter((c) => !c.resolvedAt);\n } else if (filterMode.value === \"block\" && filterBlockId.value) {\n items = items.filter((c) => c.blockId === filterBlockId.value);\n }\n\n if (thisLanguage.value) {\n items = items.filter((thread) =>\n [thread, ...(thread.replies ?? [])].some(\n (comment) => commentLanguage(comment) === activeLanguage.value,\n ),\n );\n }\n return items;\n});\n\nwatch(\n () => editor.state.selectedBlockId,\n (newBlockId) => {\n if (filterMode.value === \"block\" && newBlockId) {\n props.feature.filterBlockId.value = newBlockId;\n }\n },\n);\n\nfunction setFilter(mode: FilterMode, blockId?: string): void {\n filterMode.value = mode;\n props.feature.filterBlockId.value =\n mode === \"block\" ? (blockId ?? null) : null;\n}\n\nfunction filterByBlock(blockId: string): void {\n setFilter(\"block\", blockId);\n}\n\nfunction toggleThread(threadId: string): void {\n if (expandedThreads.value.has(threadId)) {\n expandedThreads.value.delete(threadId);\n } else {\n expandedThreads.value.add(threadId);\n }\n}\n\nfunction startReply(threadId: string): void {\n replyingTo.value = threadId;\n replyBody.value = \"\";\n editingId.value = null;\n\n if (!expandedThreads.value.has(threadId)) {\n expandedThreads.value.add(threadId);\n }\n}\n\nfunction cancelReply(): void {\n replyingTo.value = null;\n replyBody.value = \"\";\n}\n\nfunction startEdit(comment: Comment): void {\n editingId.value = comment.id;\n editBody.value = comment.body;\n replyingTo.value = null;\n}\n\nfunction cancelEdit(): void {\n editingId.value = null;\n editBody.value = \"\";\n}\n\nfunction confirmDelete(commentId: string): void {\n deletingId.value = commentId;\n}\n\nfunction cancelDelete(): void {\n deletingId.value = null;\n}\n\n/**\n * Every write swallows its rejection. The feature already routed it to `onError`\n * and left the list untouched, and an unhandled rejection out of a DOM event\n * binding helps nobody — same shape as `VersionHistoryPanels`.\n */\nasync function handleAddComment(): Promise<void> {\n const body = newCommentBody.value.trim();\n if (!body || !comments.value.canCreate.value) {\n return;\n }\n\n const blockId =\n filterMode.value === \"block\" ? filterBlockId.value : undefined;\n try {\n await comments.value.create({\n body,\n blockId: blockId ?? undefined,\n locale:\n editor.activeLocale?.value ?? editor.content.value.settings.locale,\n });\n newCommentBody.value = \"\";\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleReply(parentId: string): Promise<void> {\n const body = replyBody.value.trim();\n if (!body || !comments.value.canCreate.value) {\n return;\n }\n\n const parent = comments.value.find(parentId);\n try {\n await comments.value.create({\n body,\n blockId: parent?.blockId ?? undefined,\n parentId,\n locale:\n editor.activeLocale?.value ?? editor.content.value.settings.locale,\n });\n replyingTo.value = null;\n replyBody.value = \"\";\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleEdit(commentId: string): Promise<void> {\n const body = editBody.value.trim();\n if (!body) {\n return;\n }\n\n try {\n await comments.value.update(commentId, { body });\n editingId.value = null;\n editBody.value = \"\";\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleDelete(commentId: string): Promise<void> {\n try {\n await comments.value.remove(commentId);\n } catch {\n /* reported through onError */\n }\n deletingId.value = null;\n}\n\nasync function handleResolve(comment: Comment): Promise<void> {\n try {\n // The target state, not a toggle: two clicks in flight can't invert.\n await comments.value.setResolved(comment.id, !comment.resolvedAt);\n } catch {\n /* reported through onError */\n }\n}\n\n/** Editing and deleting are the author's own, and only when the store allows it. */\nfunction canEdit(comment: Comment): boolean {\n return comments.value.canUpdate.value && comments.value.isOwn(comment);\n}\n\nfunction canDelete(comment: Comment): boolean {\n return comments.value.canDelete.value && comments.value.isOwn(comment);\n}\n\nfunction formatTime(dateString: string): string {\n return formatRelativeTime(dateString, t.time) ?? dateString;\n}\n\nfunction handleNewCommentKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleAddComment();\n }\n}\n\nfunction handleReplyKeydown(event: KeyboardEvent, parentId: string): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleReply(parentId);\n }\n}\n\nfunction handleEditKeydown(event: KeyboardEvent, commentId: string): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleEdit(commentId);\n }\n if (event.key === \"Escape\") {\n cancelEdit();\n }\n}\n\nfunction focusNewComment(): void {\n nextTick(() => {\n newCommentInput.value?.focus();\n });\n}\n\ndefineExpose({ filterByBlock, focusNewComment });\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n role=\"complementary\"\n :aria-label=\"t.comments.title\"\n data-testid=\"comments-sidebar\"\n class=\"tpl-comments-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 <!-- Header -->\n <div\n class=\"tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3\"\n >\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]\"\n >\n <MessageCircle :size=\"13\" :stroke-width=\"2\" />\n <span>{{ t.comments.title }}</span>\n <span\n v-if=\"feature.unresolvedCount.value > 0\"\n class=\"tpl:ml-1 tpl:inline-flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[10px] tpl:font-semibold tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]\"\n >\n {{ feature.unresolvedCount.value }}\n </span>\n </div>\n <button\n type=\"button\"\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n :aria-label=\"t.comments.close\"\n @click=\"emit('close')\"\n >\n <X :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n\n <!-- Filter bar -->\n <div\n class=\"tpl:flex tpl:flex-wrap tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2\"\n >\n <button\n type=\"button\"\n class=\"tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors\"\n :class=\"filterMode === 'unresolved' ? 'tpl-comment-filter--active' : ''\"\n :aria-pressed=\"filterMode === 'unresolved'\"\n data-testid=\"comments-filter-unresolved\"\n @click=\"setFilter('unresolved')\"\n >\n {{ t.comments.filterUnresolved }}\n </button>\n <button\n type=\"button\"\n class=\"tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors\"\n :class=\"filterMode === 'all' ? 'tpl-comment-filter--active' : ''\"\n :aria-pressed=\"filterMode === 'all'\"\n data-testid=\"comments-filter-all\"\n @click=\"setFilter('all')\"\n >\n {{ t.comments.filterAll }}\n </button>\n <button\n v-if=\"editor.state.selectedBlockId\"\n type=\"button\"\n class=\"tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors\"\n :class=\"filterMode === 'block' ? 'tpl-comment-filter--active' : ''\"\n :aria-pressed=\"filterMode === 'block'\"\n data-testid=\"comments-filter-block\"\n @click=\"setFilter('block', editor.state.selectedBlockId ?? undefined)\"\n >\n {{ t.comments.filterBlock }}\n </button>\n <button\n v-if=\"localization\"\n type=\"button\"\n data-testid=\"comments-filter-language\"\n class=\"tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)]\"\n :class=\"thisLanguage ? 'tpl-comment-filter--active' : ''\"\n :aria-pressed=\"thisLanguage\"\n @click=\"thisLanguage = !thisLanguage\"\n >\n {{ t.comments.filterLanguage }}\n </button>\n </div>\n\n <!-- Thread list -->\n <div class=\"tpl:flex-1 tpl:overflow-y-auto\">\n <!-- Loading state -->\n <div\n v-if=\"isInitialLoad\"\n class=\"tpl:flex tpl:h-full tpl:items-center tpl:justify-center\"\n >\n <LoaderCircle\n class=\"tpl-spinner tpl:text-[var(--tpl-text-muted)]\"\n :size=\"24\"\n :stroke-width=\"2\"\n />\n </div>\n\n <!-- Empty state -->\n <div\n v-else-if=\"filteredComments.length === 0\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center\"\n >\n <MessageCircle\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-text-dim)]\"\n />\n <p\n class=\"tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{\n filterMode === \"all\"\n ? t.comments.noCommentsHint\n : t.comments.noComments\n }}\n </p>\n </div>\n\n <!-- Comment threads -->\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3\">\n <div\n v-for=\"thread in filteredComments\"\n :key=\"thread.id\"\n class=\"tpl-comment-thread\"\n data-testid=\"comment-thread\"\n >\n <!-- Root comment card -->\n <div\n class=\"tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3\"\n >\n <!-- Comment header -->\n <div class=\"tpl:flex tpl:items-start tpl:justify-between tpl:gap-2\">\n <div class=\"tpl:flex tpl:flex-wrap tpl:items-center tpl:gap-1.5\">\n <span\n class=\"tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{\n comments.isOwn(thread)\n ? t.comments.ownedByYou\n : thread.author.name\n }}\n </span>\n <span class=\"tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\">\n {{ formatTime(thread.createdAt) }}\n </span>\n <span\n v-if=\"localization\"\n data-testid=\"comment-locale-badge\"\n :class=\"chromePillClass\"\n >{{ languageName(commentLanguage(thread)) }}</span\n >\n <span\n v-if=\"thread.updatedAt\"\n class=\"tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]\"\n >\n ({{ t.comments.edited }})\n </span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-0.5\">\n <!-- Resolve toggle -->\n <button\n v-if=\"comments.canResolve.value\"\n data-testid=\"comment-resolve\"\n class=\"tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors\"\n :title=\"\n thread.resolvedAt\n ? t.comments.unresolve\n : t.comments.resolve\n \"\n @click=\"handleResolve(thread)\"\n >\n <CircleCheck\n :size=\"13\"\n :stroke-width=\"2\"\n class=\"tpl-resolve-icon\"\n :style=\"{\n color: thread.resolvedAt\n ? 'var(--tpl-primary)'\n : undefined,\n }\"\n />\n </button>\n <!-- Edit (own only) -->\n <button\n v-if=\"canEdit(thread)\"\n data-testid=\"comment-edit\"\n class=\"tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors\"\n :title=\"t.comments.edit\"\n @click=\"startEdit(thread)\"\n >\n <Pencil :size=\"12\" :stroke-width=\"2\" />\n </button>\n <!-- Delete (own only) -->\n <button\n v-if=\"canDelete(thread)\"\n data-testid=\"comment-delete\"\n class=\"tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors\"\n :title=\"t.comments.delete\"\n @click=\"confirmDelete(thread.id)\"\n >\n <Trash2 :size=\"12\" :stroke-width=\"2\" />\n </button>\n </div>\n </div>\n\n <!-- Resolved badge -->\n <Transition name=\"tpl-resolve\">\n <div\n v-if=\"thread.resolvedAt\"\n class=\"tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]\"\n >\n <Check :size=\"10\" :stroke-width=\"2.5\" />\n <span>\n {{\n format(t.comments.resolvedBy, {\n name: thread.resolvedBy?.name ?? \"\",\n })\n }}\n </span>\n </div>\n </Transition>\n\n <!-- Block anchor indicator -->\n <span\n v-if=\"thread.blockId && isBlockMissing(thread.blockId)\"\n class=\"tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]\"\n >\n {{ t.comments.missingBlock }}\n </span>\n <button\n v-else-if=\"thread.blockId\"\n class=\"tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n @click=\"editor.selectBlock(thread.blockId ?? '')\"\n >\n {{ t.comments.jumpToBlock }}\n </button>\n\n <!-- Comment body (or edit mode) -->\n <div v-if=\"editingId === thread.id\" class=\"tpl:mt-2\">\n <textarea\n v-model=\"editBody\"\n class=\"tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]\"\n rows=\"3\"\n @keydown=\"handleEditKeydown($event, thread.id)\"\n />\n <div class=\"tpl:mt-1.5 tpl:flex tpl:gap-1.5\">\n <button\n class=\"tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]\"\n :disabled=\"!editBody.trim() || comments.isSubmitting.value\"\n @click=\"handleEdit(thread.id)\"\n >\n {{ t.comments.save }}\n </button>\n <button\n class=\"tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n @click=\"cancelEdit()\"\n >\n {{ t.comments.cancel }}\n </button>\n </div>\n </div>\n <p\n v-else\n class=\"tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]\"\n >\n {{ thread.body }}\n </p>\n\n <!-- Delete confirmation -->\n <div\n v-if=\"deletingId === thread.id\"\n class=\"tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]\"\n >\n <span class=\"tpl:flex-1\">\n {{ t.comments.deleteConfirm }}\n </span>\n <button\n class=\"tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]\"\n data-testid=\"comment-delete-confirm\"\n @click=\"handleDelete(thread.id)\"\n >\n {{ t.comments.delete }}\n </button>\n <button\n class=\"tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n @click=\"cancelDelete()\"\n >\n {{ t.comments.cancel }}\n </button>\n </div>\n\n <!-- Thread actions -->\n <div\n v-if=\"editingId !== thread.id && deletingId !== thread.id\"\n class=\"tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2\"\n >\n <button\n v-if=\"comments.canCreate.value\"\n data-testid=\"comment-reply\"\n class=\"tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors\"\n :title=\"t.comments.reply\"\n @click=\"startReply(thread.id)\"\n >\n <Reply\n :size=\"13\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-primary)]\"\n />\n </button>\n <button\n v-if=\"(thread.replies?.length ?? 0) > 0\"\n class=\"tpl:flex tpl:items-center tpl:gap-0.5 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n @click=\"toggleThread(thread.id)\"\n >\n <template v-if=\"expandedThreads.has(thread.id)\">\n <ChevronUp :size=\"11\" :stroke-width=\"2\" />\n </template>\n <template v-else>\n <ChevronDown :size=\"11\" :stroke-width=\"2\" />\n </template>\n {{\n (thread.replies?.length ?? 0) === 1\n ? format(t.comments.replyOne, {\n count: String(thread.replies?.length ?? 0),\n })\n : format(t.comments.replyMany, {\n count: String(thread.replies?.length ?? 0),\n })\n }}\n </button>\n </div>\n </div>\n\n <!-- Replies -->\n <Transition name=\"tpl-replies\">\n <div\n v-if=\"\n expandedThreads.has(thread.id) &&\n (thread.replies?.length ?? 0) > 0\n \"\n class=\"tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2\"\n >\n <div\n v-for=\"(reply, index) in thread.replies\"\n :key=\"reply.id\"\n class=\"tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5\"\n :class=\"\n index < (thread.replies?.length ?? 0) - 1 ? 'tpl:mb-2' : ''\n \"\n >\n <div\n class=\"tpl:flex tpl:items-start tpl:justify-between tpl:gap-2\"\n >\n <div\n class=\"tpl:flex tpl:flex-wrap tpl:items-center tpl:gap-1.5\"\n >\n <span\n class=\"tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{\n comments.isOwn(reply)\n ? t.comments.ownedByYou\n : reply.author.name\n }}\n </span>\n <span\n class=\"tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ formatTime(reply.createdAt) }}\n </span>\n <span\n v-if=\"localization\"\n data-testid=\"comment-locale-badge\"\n :class=\"chromePillClass\"\n >{{ languageName(commentLanguage(reply)) }}</span\n >\n <span\n v-if=\"reply.updatedAt\"\n class=\"tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]\"\n >\n ({{ t.comments.edited }})\n </span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-0.5\">\n <button\n v-if=\"canEdit(reply)\"\n class=\"tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors\"\n :title=\"t.comments.edit\"\n @click=\"startEdit(reply)\"\n >\n <Pencil :size=\"11\" :stroke-width=\"2\" />\n </button>\n <button\n v-if=\"canDelete(reply)\"\n class=\"tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors\"\n :title=\"t.comments.delete\"\n @click=\"confirmDelete(reply.id)\"\n >\n <Trash2 :size=\"11\" :stroke-width=\"2\" />\n </button>\n </div>\n </div>\n\n <!-- Reply body (or edit mode) -->\n <div v-if=\"editingId === reply.id\" class=\"tpl:mt-1.5\">\n <textarea\n v-model=\"editBody\"\n class=\"tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]\"\n rows=\"2\"\n @keydown=\"handleEditKeydown($event, reply.id)\"\n />\n <div class=\"tpl:mt-1.5 tpl:flex tpl:gap-1.5\">\n <button\n class=\"tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]\"\n :disabled=\"\n !editBody.trim() || comments.isSubmitting.value\n \"\n @click=\"handleEdit(reply.id)\"\n >\n {{ t.comments.save }}\n </button>\n <button\n class=\"tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n @click=\"cancelEdit()\"\n >\n {{ t.comments.cancel }}\n </button>\n </div>\n </div>\n <p\n v-else\n class=\"tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]\"\n >\n {{ reply.body }}\n </p>\n\n <!-- Delete confirmation for reply -->\n <div\n v-if=\"deletingId === reply.id\"\n class=\"tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]\"\n >\n <span class=\"tpl:flex-1\">\n {{ t.comments.deleteConfirm }}\n </span>\n <button\n class=\"tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]\"\n data-testid=\"comment-delete-confirm\"\n @click=\"handleDelete(reply.id)\"\n >\n {{ t.comments.delete }}\n </button>\n <button\n class=\"tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n @click=\"cancelDelete()\"\n >\n {{ t.comments.cancel }}\n </button>\n </div>\n </div>\n </div>\n </Transition>\n\n <!-- Reply input -->\n <Transition name=\"tpl-replies\">\n <div\n v-if=\"replyingTo === thread.id\"\n class=\"tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2\"\n >\n <!-- Same shape as the new-comment composer below: the border and\n the focus ring belong to the wrapper, the field is bare\n inside it, and the actions sit within the bounds rather than\n floating beside them. The two composers do the same job, so a\n reader should not have to notice they are different\n components. Only the height differs — a reply is nested and\n indented, so it starts at two rows without the composer's\n `min-h`. -->\n <div\n class=\"tpl-comments-input-wrapper tpl-focus-ring-host tpl:flex tpl:items-end 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 v-model=\"replyBody\"\n class=\"tpl:max-h-24 tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-xs tpl:outline-none tpl:text-[var(--tpl-text)]\"\n :placeholder=\"t.comments.replyPlaceholder\"\n rows=\"2\"\n @keydown=\"handleReplyKeydown($event, thread.id)\"\n />\n <button\n class=\"tpl-comments-send-btn 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 :disabled=\"!replyBody.trim() || comments.isSubmitting.value\"\n @click=\"handleReply(thread.id)\"\n >\n <Send :size=\"14\" :stroke-width=\"2\" />\n </button>\n <button\n class=\"tpl-comments-send-btn 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-text-muted)]\"\n @click=\"cancelReply()\"\n >\n <X :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n </div>\n </Transition>\n </div>\n </div>\n </div>\n\n <!-- New comment input. Absent entirely when the store withheld `create` —\n hidden rather than disabled, so a read-only review reads as one rather\n than as a broken composer. -->\n <div\n v-if=\"comments.canCreate.value\"\n class=\"tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]\"\n >\n <div\n v-if=\"isBlockFilterUnsaved\"\n class=\"tpl:flex tpl:min-h-[68px] tpl:items-center tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]\"\n >\n {{ t.comments.saveTemplateFirst }}\n </div>\n <div\n v-else\n class=\"tpl-comments-input-wrapper tpl-focus-ring-host tpl:flex tpl:min-h-[68px] tpl:items-end 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=\"newCommentInput\"\n v-model=\"newCommentBody\"\n class=\"tpl:max-h-24 tpl:min-h-[48px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-xs tpl:outline-none tpl:text-[var(--tpl-text)]\"\n data-testid=\"comments-input\"\n :placeholder=\"t.comments.placeholder\"\n :disabled=\"comments.isSubmitting.value\"\n rows=\"2\"\n @keydown=\"handleNewCommentKeydown\"\n />\n <button\n class=\"tpl-comments-send-btn 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 data-testid=\"comments-send\"\n :disabled=\"!newCommentBody.trim() || comments.isSubmitting.value\"\n @click=\"handleAddComment\"\n >\n <LoaderCircle\n v-if=\"comments.isSubmitting.value\"\n class=\"tpl-spinner\"\n :size=\"16\"\n :stroke-width=\"2\"\n />\n <Send v-else :size=\"16\" :stroke-width=\"2\" />\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.tpl-comments-input-wrapper:focus-within {\n border-color: var(--tpl-primary);\n box-shadow: var(--tpl-ring);\n}\n\n.tpl-comments-send-btn:not(:disabled):hover {\n transform: scale(1.05);\n}\n\n.tpl-comment-filter {\n color: var(--tpl-text-muted);\n background-color: transparent;\n}\n\n.tpl-comment-filter:hover {\n background-color: var(--tpl-bg-hover);\n color: var(--tpl-text);\n}\n\n.tpl-comment-filter--active {\n background-color: var(--tpl-primary-light);\n color: var(--tpl-primary);\n}\n\n.tpl-comment-action {\n color: var(--tpl-text-dim);\n background-color: transparent;\n}\n\n.tpl-comment-action:hover {\n background-color: var(--tpl-bg-hover);\n color: var(--tpl-text);\n}\n\n.tpl-comment-delete:hover {\n background-color: var(--tpl-danger-light);\n color: var(--tpl-danger);\n}\n\n.tpl-comment-card {\n border-color: var(--tpl-border);\n background-color: var(--tpl-bg);\n}\n\n.tpl-comment-reply-card {\n border-color: var(--tpl-border);\n background-color: var(--tpl-bg);\n}\n\n.tpl-resolve-enter-active,\n.tpl-resolve-leave-active {\n transition:\n opacity 0.3s ease,\n transform 0.3s ease;\n}\n\n.tpl-resolve-enter-from,\n.tpl-resolve-leave-to {\n opacity: 0;\n transform: translateY(-4px);\n}\n\n.tpl-resolve-icon {\n transition:\n color 0.3s ease,\n transform 0.2s ease;\n}\n\n.tpl-resolve-icon:active {\n transform: scale(1.3);\n}\n\n.tpl-replies-enter-active,\n.tpl-replies-leave-active {\n transition:\n opacity 0.25s ease,\n transform 0.25s ease;\n}\n\n.tpl-replies-enter-from,\n.tpl-replies-leave-to {\n opacity: 0;\n transform: translateY(-4px);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkC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I,KAAMP,EAAA,MAAS,aAAa;IAC1D,SAAO0C;G,IAGA1C,EAAA,MAAS,aAAa,SAD9BrI,EAAA,GAAAgB,EAKEd,EAAAqD,CAAA,GAAA;;IAHA,OAAM;IACL,MAAM;IACN,gBAAc;G,OAEjBvD,EAAA,GAAAgB,EAA4Cd,EAAAuD,EAAA,GAAA;;IAA9B,MAAM;IAAK,gBAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CountdownToolbar-CUTbVPPV.js","names":["_openBlock","_createElementBlock","_Fragment","_createVNode","FieldRow","_unref","_withCtx","_createElementVNode","_normalizeClass","_renderList","_toDisplayString","_createBlock","ToggleSwitch","SlidingPillSelect","NumberWithSuffix","ColorPicker","_sfc_main","defineComponent","openBlock","withCtx","renderList","createElementBlock","unref","normalizeClass","createBlock","createBaseVNode","toDisplayString","computed","Fragment","createVNode","ColorPicker_default","NumberWithSuffix_default","SlidingPillSelect_default","FieldRow_default","ToggleSwitch_default","useI18n","inputClass","fontSelectValue","_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","CountdownToolbar_default","__emit","emit","TIMEZONES","SEPARATORS","UNITS","unitItems","unit","updateField","field","value","t","__props","_cache","$event","tz","item","controlId","font"],"sources":["../../../src/components/toolbar/CountdownToolbar.vue","../../../src/components/toolbar/CountdownToolbar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport ColorPicker from \"../ColorPicker.vue\";\nimport SlidingPillSelect from \"../SlidingPillSelect.vue\";\nimport FieldRow from \"./FieldRow.vue\";\nimport ToggleSwitch from \"../ToggleSwitch.vue\";\nimport NumberWithSuffix from \"./NumberWithSuffix.vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { inputClass } from \"../../constants/styleConstants\";\nimport type { CountdownBlock } from \"@templatical/types\";\nimport { computed } from \"vue\";\nimport { fontSelectValue } from \"../../utils/withCurrentFont\";\n\ndefineProps<{\n block: CountdownBlock;\n fontFamilies: Array<{ value: string; label: string }>;\n}>();\n\nconst emit = defineEmits<{\n (e: \"update\", updates: Partial<CountdownBlock>): void;\n}>();\n\nconst { t } = useI18n();\n\nconst TIMEZONES = [\n \"UTC\",\n \"America/New_York\",\n \"America/Chicago\",\n \"America/Denver\",\n \"America/Los_Angeles\",\n \"Europe/London\",\n \"Europe/Berlin\",\n \"Europe/Paris\",\n \"Europe/Moscow\",\n \"Asia/Dubai\",\n \"Asia/Kolkata\",\n \"Asia/Shanghai\",\n \"Asia/Tokyo\",\n \"Australia/Sydney\",\n \"Pacific/Auckland\",\n];\n\nconst SEPARATORS = [\n { value: \":\", label: \":\" },\n { value: \"-\", label: \"-\" },\n { value: \" \", label: \"␣\" },\n];\n\ntype UnitKey = \"Days\" | \"Hours\" | \"Minutes\" | \"Seconds\";\nconst UNITS: UnitKey[] = [\"Days\", \"Hours\", \"Minutes\", \"Seconds\"];\n\nconst unitItems = computed(() =>\n UNITS.map((unit) => ({\n unit,\n showKey: `show${unit}` as const,\n labelKey: `label${unit}` as const,\n translationKey: unit.toLowerCase() as\n \"days\" | \"hours\" | \"minutes\" | \"seconds\",\n })),\n);\n\nfunction updateField(field: keyof CountdownBlock, value: unknown): void {\n emit(\"update\", { [field]: value } as Partial<CountdownBlock>);\n}\n</script>\n\n<template>\n <FieldRow path=\"targetDate\" :label=\"t.countdown.targetDate\">\n <input\n type=\"datetime-local\"\n :class=\"inputClass\"\n :value=\"block.targetDate\"\n @input=\"\n updateField('targetDate', ($event.target as HTMLInputElement).value)\n \"\n />\n </FieldRow>\n\n <FieldRow path=\"timezone\" :label=\"t.countdown.timezone\">\n <select\n :class=\"inputClass\"\n :value=\"block.timezone\"\n @change=\"\n updateField('timezone', ($event.target as HTMLSelectElement).value)\n \"\n >\n <option v-for=\"tz in TIMEZONES\" :key=\"tz\" :value=\"tz\">{{ tz }}</option>\n </select>\n </FieldRow>\n\n <FieldRow :label=\"t.countdown.display\">\n <div class=\"tpl:grid tpl:grid-cols-2 tpl:gap-2\">\n <FieldRow\n v-for=\"item in unitItems\"\n :key=\"item.unit\"\n :path=\"item.showKey\"\n :label=\"t.countdown[item.translationKey]\"\n ><template #label-actions=\"{ controlId }\"\n ><ToggleSwitch\n :control-id=\"controlId\"\n hide-label\n class=\"tpl:text-[12px] tpl:text-[var(--tpl-text)]\"\n :model-value=\"block[item.showKey]\"\n :label=\"t.countdown[item.translationKey]\"\n @update:model-value=\"updateField(item.showKey, $event)\" /></template\n ></FieldRow>\n </div>\n </FieldRow>\n\n <FieldRow path=\"separator\" :label=\"t.countdown.separator\">\n <SlidingPillSelect\n :options=\"SEPARATORS\"\n :model-value=\"block.separator\"\n @update:model-value=\"updateField('separator', $event)\"\n />\n </FieldRow>\n\n <FieldRow path=\"fontFamily\" :label=\"t.countdown.fontFamily\">\n <select\n :class=\"inputClass\"\n :value=\"fontSelectValue(block.fontFamily)\"\n @change=\"\n updateField(\n 'fontFamily',\n ($event.target as HTMLSelectElement).value || undefined,\n )\n \"\n >\n <option value=\"\">{{ t.countdown.inheritFont }}</option>\n <option\n v-for=\"font in fontFamilies\"\n :key=\"font.value\"\n :value=\"font.value\"\n >\n {{ font.label }}\n </option>\n </select>\n </FieldRow>\n\n <div class=\"tpl:grid tpl:grid-cols-2 tpl:gap-3\">\n <FieldRow path=\"digitFontSize\" :label=\"t.countdown.digitFontSize\">\n <NumberWithSuffix\n :model-value=\"block.digitFontSize\"\n :min=\"12\"\n :max=\"72\"\n suffix=\"px\"\n @update:model-value=\"updateField('digitFontSize', $event)\"\n />\n </FieldRow>\n <FieldRow path=\"labelFontSize\" :label=\"t.countdown.labelFontSize\">\n <NumberWithSuffix\n :model-value=\"block.labelFontSize\"\n :min=\"8\"\n :max=\"24\"\n suffix=\"px\"\n @update:model-value=\"updateField('labelFontSize', $event)\"\n />\n </FieldRow>\n </div>\n\n <div class=\"tpl:grid tpl:grid-cols-2 tpl:gap-3\">\n <FieldRow path=\"digitColor\" :label=\"t.countdown.digitColor\">\n <ColorPicker\n :model-value=\"block.digitColor\"\n @update:model-value=\"updateField('digitColor', $event)\"\n />\n </FieldRow>\n <FieldRow path=\"labelColor\" :label=\"t.countdown.labelColor\">\n <ColorPicker\n :model-value=\"block.labelColor\"\n @update:model-value=\"updateField('labelColor', $event)\"\n />\n </FieldRow>\n </div>\n\n <FieldRow path=\"backgroundColor\" :label=\"t.countdown.background\">\n <ColorPicker\n :model-value=\"block.backgroundColor\"\n @update:model-value=\"updateField('backgroundColor', $event)\"\n />\n </FieldRow>\n\n <FieldRow :label=\"t.countdown.labels\">\n <div class=\"tpl:grid tpl:grid-cols-2 tpl:gap-2\">\n <FieldRow\n v-for=\"item in unitItems\"\n :key=\"item.unit\"\n :path=\"item.labelKey\"\n :label=\"t.countdown[item.translationKey]\"\n ><input\n type=\"text\"\n :class=\"inputClass\"\n :value=\"block[item.labelKey]\"\n :placeholder=\"t.countdown[item.translationKey]\"\n @input=\"\n updateField(\n item.labelKey,\n ($event.target as HTMLInputElement).value,\n )\n \"\n /></FieldRow>\n </div>\n </FieldRow>\n\n <FieldRow path=\"expiredMessage\" :label=\"t.countdown.expiry\">\n <input\n type=\"text\"\n :class=\"inputClass\"\n :value=\"block.expiredMessage\"\n :placeholder=\"t.countdown.expiredMessagePlaceholder\"\n @input=\"\n updateField('expiredMessage', ($event.target as HTMLInputElement).value)\n \"\n />\n </FieldRow>\n\n <FieldRow path=\"expiredImageUrl\" :label=\"t.countdown.expiredImageUrl\">\n <input\n type=\"url\"\n :class=\"inputClass\"\n :value=\"block.expiredImageUrl\"\n placeholder=\"https://...\"\n @input=\"\n updateField(\n 'expiredImageUrl',\n ($event.target as HTMLInputElement).value,\n )\n \"\n />\n </FieldRow>\n\n <FieldRow path=\"hideOnExpiry\" :label=\"t.countdown.hideOnExpiry\"\n ><template #label-actions=\"{ controlId }\"\n ><ToggleSwitch\n :control-id=\"controlId\"\n hide-label\n class=\"tpl:mb-3.5 tpl:text-[12px] tpl:text-[var(--tpl-text)]\"\n :model-value=\"block.hideOnExpiry\"\n :label=\"t.countdown.hideOnExpiry\"\n @update:model-value=\"updateField('hideOnExpiry', $event)\" /></template\n ></FieldRow>\n</template>\n","<script setup lang=\"ts\">\nimport ColorPicker from \"../ColorPicker.vue\";\nimport SlidingPillSelect from \"../SlidingPillSelect.vue\";\nimport FieldRow from \"./FieldRow.vue\";\nimport ToggleSwitch from \"../ToggleSwitch.vue\";\nimport NumberWithSuffix from \"./NumberWithSuffix.vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { inputClass } from \"../../constants/styleConstants\";\nimport type { CountdownBlock } from \"@templatical/types\";\nimport { computed } from \"vue\";\nimport { fontSelectValue } from \"../../utils/withCurrentFont\";\n\ndefineProps<{\n block: CountdownBlock;\n fontFamilies: Array<{ value: string; label: string }>;\n}>();\n\nconst emit = defineEmits<{\n (e: \"update\", updates: Partial<CountdownBlock>): void;\n}>();\n\nconst { t } = useI18n();\n\nconst TIMEZONES = [\n \"UTC\",\n \"America/New_York\",\n \"America/Chicago\",\n \"America/Denver\",\n \"America/Los_Angeles\",\n \"Europe/London\",\n \"Europe/Berlin\",\n \"Europe/Paris\",\n \"Europe/Moscow\",\n \"Asia/Dubai\",\n \"Asia/Kolkata\",\n \"Asia/Shanghai\",\n \"Asia/Tokyo\",\n \"Australia/Sydney\",\n \"Pacific/Auckland\",\n];\n\nconst SEPARATORS = [\n { value: \":\", label: \":\" },\n { value: \"-\", label: \"-\" },\n { value: \" \", label: \"␣\" },\n];\n\ntype UnitKey = \"Days\" | \"Hours\" | \"Minutes\" | \"Seconds\";\nconst UNITS: UnitKey[] = [\"Days\", \"Hours\", \"Minutes\", \"Seconds\"];\n\nconst unitItems = computed(() =>\n UNITS.map((unit) => ({\n unit,\n showKey: `show${unit}` as const,\n labelKey: `label${unit}` as const,\n translationKey: unit.toLowerCase() as\n \"days\" | \"hours\" | \"minutes\" | \"seconds\",\n })),\n);\n\nfunction updateField(field: keyof CountdownBlock, value: unknown): void {\n emit(\"update\", { [field]: value } as Partial<CountdownBlock>);\n}\n</script>\n\n<template>\n <FieldRow path=\"targetDate\" :label=\"t.countdown.targetDate\">\n <input\n type=\"datetime-local\"\n :class=\"inputClass\"\n :value=\"block.targetDate\"\n @input=\"\n updateField('targetDate', ($event.target as HTMLInputElement).value)\n \"\n />\n </FieldRow>\n\n <FieldRow path=\"timezone\" :label=\"t.countdown.timezone\">\n <select\n :class=\"inputClass\"\n :value=\"block.timezone\"\n @change=\"\n updateField('timezone', ($event.target as HTMLSelectElement).value)\n \"\n >\n <option v-for=\"tz in TIMEZONES\" :key=\"tz\" :value=\"tz\">{{ tz }}</option>\n </select>\n </FieldRow>\n\n <FieldRow :label=\"t.countdown.display\">\n <div class=\"tpl:grid tpl:grid-cols-2 tpl:gap-2\">\n <FieldRow\n v-for=\"item in unitItems\"\n :key=\"item.unit\"\n :path=\"item.showKey\"\n :label=\"t.countdown[item.translationKey]\"\n ><template #label-actions=\"{ controlId }\"\n ><ToggleSwitch\n :control-id=\"controlId\"\n hide-label\n class=\"tpl:text-[12px] tpl:text-[var(--tpl-text)]\"\n :model-value=\"block[item.showKey]\"\n :label=\"t.countdown[item.translationKey]\"\n @update:model-value=\"updateField(item.showKey, $event)\" /></template\n ></FieldRow>\n </div>\n </FieldRow>\n\n <FieldRow path=\"separator\" :label=\"t.countdown.separator\">\n <SlidingPillSelect\n :options=\"SEPARATORS\"\n :model-value=\"block.separator\"\n @update:model-value=\"updateField('separator', $event)\"\n />\n </FieldRow>\n\n <FieldRow path=\"fontFamily\" :label=\"t.countdown.fontFamily\">\n <select\n :class=\"inputClass\"\n :value=\"fontSelectValue(block.fontFamily)\"\n @change=\"\n updateField(\n 'fontFamily',\n ($event.target as HTMLSelectElement).value || undefined,\n )\n \"\n >\n <option value=\"\">{{ t.countdown.inheritFont }}</option>\n <option\n v-for=\"font in fontFamilies\"\n :key=\"font.value\"\n :value=\"font.value\"\n >\n {{ font.label }}\n </option>\n </select>\n </FieldRow>\n\n <div class=\"tpl:grid tpl:grid-cols-2 tpl:gap-3\">\n <FieldRow path=\"digitFontSize\" :label=\"t.countdown.digitFontSize\">\n <NumberWithSuffix\n :model-value=\"block.digitFontSize\"\n :min=\"12\"\n :max=\"72\"\n suffix=\"px\"\n @update:model-value=\"updateField('digitFontSize', $event)\"\n />\n </FieldRow>\n <FieldRow path=\"labelFontSize\" :label=\"t.countdown.labelFontSize\">\n <NumberWithSuffix\n :model-value=\"block.labelFontSize\"\n :min=\"8\"\n :max=\"24\"\n suffix=\"px\"\n @update:model-value=\"updateField('labelFontSize', $event)\"\n />\n </FieldRow>\n </div>\n\n <div class=\"tpl:grid tpl:grid-cols-2 tpl:gap-3\">\n <FieldRow path=\"digitColor\" :label=\"t.countdown.digitColor\">\n <ColorPicker\n :model-value=\"block.digitColor\"\n @update:model-value=\"updateField('digitColor', $event)\"\n />\n </FieldRow>\n <FieldRow path=\"labelColor\" :label=\"t.countdown.labelColor\">\n <ColorPicker\n :model-value=\"block.labelColor\"\n @update:model-value=\"updateField('labelColor', $event)\"\n />\n </FieldRow>\n </div>\n\n <FieldRow path=\"backgroundColor\" :label=\"t.countdown.background\">\n <ColorPicker\n :model-value=\"block.backgroundColor\"\n @update:model-value=\"updateField('backgroundColor', $event)\"\n />\n </FieldRow>\n\n <FieldRow :label=\"t.countdown.labels\">\n <div class=\"tpl:grid tpl:grid-cols-2 tpl:gap-2\">\n <FieldRow\n v-for=\"item in unitItems\"\n :key=\"item.unit\"\n :path=\"item.labelKey\"\n :label=\"t.countdown[item.translationKey]\"\n ><input\n type=\"text\"\n :class=\"inputClass\"\n :value=\"block[item.labelKey]\"\n :placeholder=\"t.countdown[item.translationKey]\"\n @input=\"\n updateField(\n item.labelKey,\n ($event.target as HTMLInputElement).value,\n )\n \"\n /></FieldRow>\n </div>\n </FieldRow>\n\n <FieldRow path=\"expiredMessage\" :label=\"t.countdown.expiry\">\n <input\n type=\"text\"\n :class=\"inputClass\"\n :value=\"block.expiredMessage\"\n :placeholder=\"t.countdown.expiredMessagePlaceholder\"\n @input=\"\n updateField('expiredMessage', ($event.target as HTMLInputElement).value)\n \"\n />\n </FieldRow>\n\n <FieldRow path=\"expiredImageUrl\" :label=\"t.countdown.expiredImageUrl\">\n <input\n type=\"url\"\n :class=\"inputClass\"\n :value=\"block.expiredImageUrl\"\n placeholder=\"https://...\"\n @input=\"\n updateField(\n 'expiredImageUrl',\n ($event.target as HTMLInputElement).value,\n )\n \"\n />\n </FieldRow>\n\n <FieldRow path=\"hideOnExpiry\" :label=\"t.countdown.hideOnExpiry\"\n ><template #label-actions=\"{ controlId }\"\n ><ToggleSwitch\n :control-id=\"controlId\"\n hide-label\n class=\"tpl:mb-3.5 tpl:text-[12px] tpl:text-[var(--tpl-text)]\"\n :model-value=\"block.hideOnExpiry\"\n :label=\"t.countdown.hideOnExpiry\"\n @update:model-value=\"updateField('hideOnExpiry', $event)\" /></template\n ></FieldRow>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAiBA,IAAMqD,IAAOD,GAIP,EAAE,SAAMjB,EAAQ,GAEhBmB,IAAY;GAChB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,GAEMC,IAAa;GACjB;IAAE,OAAO;IAAK,OAAO;GAAI;GACzB;IAAE,OAAO;IAAK,OAAO;GAAI;GACzB;IAAE,OAAO;IAAK,OAAO;GAAI;EAC3B,GAGMC,IAAmB;GAAC;GAAQ;GAAS;GAAW;EAAS,GAEzDC,IAAY9B,QAChB6B,EAAM,KAAK,OAAU;GACnB;GACA,SAAS,OAAOE;GAChB,UAAU,QAAQA;GAClB,gBAAgBA,EAAK,YAAY;EAEnC,EAAE,CACJ;EAEA,SAASC,EAAY,GAA6B,GAAsB;GACtE,EAAK,UAAU,GAAGC,IAAQC,EAAM,CAA4B;EAC9D;;GAIE1D,EASWC,GAAA;IATD,MAAK;IAAc,OAAO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