@templatical/editor 0.23.0 → 0.24.1
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/{AiChatSidebar-Bru6-ziQ.js → AiChatSidebar-X4viKtvs.js} +14 -14
- package/dist/{AiFeatureMenu-CcqjRMFW.js → AiFeatureMenu-DDAamRaA.js} +7 -7
- package/dist/{BlockIssueBadge-Dmj9rVra.js → BlockIssueBadge-Qxrl7Ujl.js} +5 -5
- package/dist/BlockPreviewCanvas-Cf-kxbEr.js +117 -0
- package/dist/{CloudEditor-iK4vkpNm.js → CloudEditor-JIzhj1Xq.js} +134 -129
- package/dist/{CollaboratorBar-C_1SF7Xf.js → CollaboratorBar-tC7AACTb.js} +4 -4
- package/dist/{ColorPicker-s9GHXjZs.js → ColorPicker--_2PbzFk.js} +9 -11
- package/dist/{CommentsSidebar-DvNEdugN.js → CommentsSidebar-Ci2Ov8FG.js} +15 -15
- package/dist/{CountdownBlock-J_Q9JRQM.js → CountdownBlock-aZIKfBWY.js} +3 -3
- package/dist/{CountdownToolbar-DPRcv3Fu.js → CountdownToolbar-DHp6T0Q_.js} +4 -4
- package/dist/DesignReferenceSidebar-DQsC-3hB.js +264 -0
- package/dist/{IssuesPanel-CEnEGFtd.js → IssuesPanel-CoOfib44.js} +8 -8
- package/dist/{LoadingTrack-KIcREPlS.js → LoadingTrack-XK_eeUdq.js} +1 -1
- package/dist/MergeTagModeToggle-CiFiSV0C.js +180 -0
- package/dist/{MergeTagSuggestion-D9eCryMC.js → MergeTagSuggestion-D0OHRv7L.js} +9 -13
- package/dist/{NumberWithSuffix-CCPN_oCh.js → NumberWithSuffix-CXFbUqsx.js} +2 -2
- package/dist/{ParagraphEditor-MKJYyWN9.js → ParagraphEditor-Cy-bpEjI.js} +45 -45
- package/dist/{RichTextEditorContent-FbnWsh46.js → RichTextEditorContent-CYJko6id.js} +9 -9
- package/dist/{SaveBlockDialog-CFAJHP3v.js → SaveBlockDialog-CNTSaMEa.js} +11 -11
- package/dist/{SavedBlocksBrowserModal-C_-Xcm0Q.js → SavedBlocksBrowserModal-CvxS5-YX.js} +11 -11
- package/dist/{SavedBlocksPanels-CRf7zzFn.js → SavedBlocksPanels-CNdUxS89.js} +2 -2
- package/dist/{SavedBlocksPickBar-C1FTJP-I.js → SavedBlocksPickBar-BvXKhblL.js} +4 -4
- package/dist/{SnapshotHistory-DWlQ3Eh0.js → SnapshotHistory-BqPSIV9L.js} +10 -10
- package/dist/{TemplateScoringPanel-ifGGGWs5.js → TemplateScoringPanel-CMEuz9yF.js} +15 -15
- package/dist/{TestEmailModal-D90-3Yex.js → TestEmailModal-BDhnnCBx.js} +71 -59
- package/dist/{TestEmailPanel-B0u_Yd3X.js → TestEmailPanel--RwnwLn2.js} +2 -2
- package/dist/{TitleEditor-DzsPxKv4.js → TitleEditor-F7E_pU9H.js} +13 -13
- package/dist/TplModal-BIiS24Of.js +49 -0
- package/dist/{blockTypeIcons-CpKkI47V.js → blockTypeIcons-C6PnLMp7.js} +26 -26
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-D47BxSGu.js → ca-CO4nq6TX.js} +8 -1
- package/dist/cdn/chunks/{AiChatSidebar-BMnsF8G6.js → AiChatSidebar-UbF3ePzR.js} +15 -15
- package/dist/cdn/chunks/{AiChatSidebar-BMnsF8G6.js.map → AiChatSidebar-UbF3ePzR.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-hWgWQg11.js → AiFeatureMenu-OIwoJzHG.js} +9 -9
- package/dist/cdn/chunks/{AiFeatureMenu-hWgWQg11.js.map → AiFeatureMenu-OIwoJzHG.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-Da4yR-mh.js → BlockIssueBadge-Bd2EuT1C.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-Da4yR-mh.js.map → BlockIssueBadge-Bd2EuT1C.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-C-ut8GkJ.js +119 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-C-ut8GkJ.js.map +1 -0
- package/dist/cdn/chunks/{CloudEditor-S8zLHtKb.js → CloudEditor-D87qsqbZ.js} +133 -128
- package/dist/cdn/chunks/CloudEditor-D87qsqbZ.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-mkJVAkSh.js → CollaboratorBar-Br4RvNrA.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-mkJVAkSh.js.map → CollaboratorBar-Br4RvNrA.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-DZSzZ5ZP.js → ColorPicker-B-ymPPtU.js} +10 -12
- package/dist/cdn/chunks/{ColorPicker-DZSzZ5ZP.js.map → ColorPicker-B-ymPPtU.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-DHdRiGPX.js → CommentsSidebar-Tv_WTcJv.js} +19 -19
- package/dist/cdn/chunks/{CommentsSidebar-DHdRiGPX.js.map → CommentsSidebar-Tv_WTcJv.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-Bffpoppw.js → CountdownBlock-cEcXSK91.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-Bffpoppw.js.map → CountdownBlock-cEcXSK91.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DAnmIZjq.js → CountdownToolbar-CLp3_ebk.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-DAnmIZjq.js.map → CountdownToolbar-CLp3_ebk.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-CM-k15pd.js → DesignReferenceSidebar-YeqxSsxO.js} +33 -33
- package/dist/cdn/chunks/{DesignReferenceSidebar-CM-k15pd.js.map → DesignReferenceSidebar-YeqxSsxO.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-D80JedOj.js → IssuesPanel-BhsvC3XQ.js} +10 -10
- package/dist/cdn/chunks/{IssuesPanel-D80JedOj.js.map → IssuesPanel-BhsvC3XQ.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-D-CW2tUa.js → LoadingTrack-G2tuXqCJ.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-D-CW2tUa.js.map → LoadingTrack-G2tuXqCJ.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagModeToggle-DrdxQA0K.js +127 -0
- package/dist/cdn/chunks/MergeTagModeToggle-DrdxQA0K.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagSuggestion-BM349_QH.js → MergeTagSuggestion-Ces5Ua78.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-BM349_QH.js.map → MergeTagSuggestion-Ces5Ua78.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-CjlVNIEe.js → NumberWithSuffix-BK_Xh4w4.js} +3 -3
- package/dist/cdn/chunks/{NumberWithSuffix-CjlVNIEe.js.map → NumberWithSuffix-BK_Xh4w4.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-J-1RLyi7.js → ParagraphEditor-DKz4vTWB.js} +128 -128
- package/dist/cdn/chunks/{ParagraphEditor-J-1RLyi7.js.map → ParagraphEditor-DKz4vTWB.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BbdgJqWM.js → RichTextEditorContent-CJ2WVicQ.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-BbdgJqWM.js.map → RichTextEditorContent-CJ2WVicQ.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-Bi_Z3kuA.js → SaveBlockDialog-DTemkKPX.js} +9 -9
- package/dist/cdn/chunks/{SaveBlockDialog-Bi_Z3kuA.js.map → SaveBlockDialog-DTemkKPX.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CesYxFsH.js → SavedBlocksBrowserModal-DbMaIbeH.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CesYxFsH.js.map → SavedBlocksBrowserModal-DbMaIbeH.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BsSpJwrW.js → SavedBlocksPanels-CUffuDAC.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-BsSpJwrW.js.map → SavedBlocksPanels-CUffuDAC.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-CduR1Cpb.js → SavedBlocksPickBar-D7SmNz2n.js} +7 -7
- package/dist/cdn/chunks/{SavedBlocksPickBar-CduR1Cpb.js.map → SavedBlocksPickBar-D7SmNz2n.js.map} +1 -1
- package/dist/cdn/chunks/{SnapshotHistory-DO-gzr3i.js → SnapshotHistory-m5Z8bTej.js} +10 -10
- package/dist/cdn/chunks/{SnapshotHistory-DO-gzr3i.js.map → SnapshotHistory-m5Z8bTej.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-CTk8WwxU.js → TemplateScoringPanel-DgRU5fty.js} +53 -53
- package/dist/cdn/chunks/{TemplateScoringPanel-CTk8WwxU.js.map → TemplateScoringPanel-DgRU5fty.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailModal-Ce8-vzGh.js +174 -0
- package/dist/cdn/chunks/TestEmailModal-Ce8-vzGh.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-048m0kxX.js → TestEmailPanel-BlmIKKSL.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-048m0kxX.js.map → TestEmailPanel-BlmIKKSL.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-J1vgU_J6.js → TitleEditor-C6_bQxYR.js} +19 -19
- package/dist/cdn/chunks/{TitleEditor-J1vgU_J6.js.map → TitleEditor-C6_bQxYR.js.map} +1 -1
- package/dist/cdn/chunks/TplModal-D6bFON2K.js +50 -0
- package/dist/cdn/chunks/TplModal-D6bFON2K.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-B8s3_ahs.js +21 -0
- package/dist/cdn/chunks/{blockTypeIcons-etMMQoVv.js.map → blockTypeIcons-B8s3_ahs.js.map} +1 -1
- package/dist/cdn/chunks/{ca-D47BxSGu.js → ca-CO4nq6TX.js} +9 -2
- package/dist/cdn/chunks/{ca-D47BxSGu.js.map → ca-CO4nq6TX.js.map} +1 -1
- package/dist/cdn/chunks/{cloud-F-aVi9hj.js → cloud-CRlDc0Ev.js} +13 -17
- package/dist/cdn/chunks/{cloud-F-aVi9hj.js.map → cloud-CRlDc0Ev.js.map} +1 -1
- package/dist/{de-CnnxBwh7.js → cdn/chunks/de-CUeaFJph.js} +10 -1
- package/dist/cdn/chunks/{de-CnnxBwh7.js.map → de-CUeaFJph.js.map} +1 -1
- package/dist/cdn/chunks/{dist-CxTt8FRE.js → dist-B8AX9np4.js} +16 -12
- package/dist/cdn/chunks/dist-B8AX9np4.js.map +1 -0
- package/dist/cdn/chunks/{dist-CiBEt0VR.js → dist-lZgXNk4G.js} +36 -20
- package/dist/cdn/chunks/dist-lZgXNk4G.js.map +1 -0
- package/dist/cdn/chunks/{draggable-D840DIZB.js → draggable-JcMTNF3U.js} +14 -15
- package/dist/cdn/chunks/{draggable-D840DIZB.js.map → draggable-JcMTNF3U.js.map} +1 -1
- package/dist/{en-5gW-bYy2.js → cdn/chunks/en-zCYIPAL5.js} +10 -1
- package/dist/cdn/chunks/{en-5gW-bYy2.js.map → en-zCYIPAL5.js.map} +1 -1
- package/dist/cdn/chunks/{es-sQ9SdI0l.js → es-BSiH7YkP.js} +9 -2
- package/dist/cdn/chunks/{es-sQ9SdI0l.js.map → es-BSiH7YkP.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-C49c51P1.js → extensions-CKMD_er_.js} +25 -21
- package/dist/cdn/chunks/{extensions-C49c51P1.js.map → extensions-CKMD_er_.js.map} +1 -1
- package/dist/{fr-DBZ5w21C.js → cdn/chunks/fr-DTVJ3det.js} +10 -1
- package/dist/cdn/chunks/fr-DTVJ3det.js.map +1 -0
- package/dist/cdn/chunks/{htmlparser-CZa2V5cF.js → htmlparser-CPhs2cYE.js} +3 -5
- package/dist/cdn/chunks/{htmlparser-CZa2V5cF.js.map → htmlparser-CPhs2cYE.js.map} +1 -1
- package/dist/cdn/chunks/{icons-CYWw8Xfp.js → icons-Cp4ZIJw-.js} +65 -44
- package/dist/cdn/chunks/icons-Cp4ZIJw-.js.map +1 -0
- package/dist/cdn/chunks/keys-CswSK7eb.js +12 -0
- package/dist/cdn/chunks/keys-CswSK7eb.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-BJOEu6Cg.js → liquid.browser-CZaQe87t.js} +756 -718
- package/dist/cdn/chunks/liquid.browser-CZaQe87t.js.map +1 -0
- package/dist/cdn/chunks/{nl-DOL7Fnfo.js → nl-BqSquFS3.js} +9 -2
- package/dist/cdn/chunks/nl-BqSquFS3.js.map +1 -0
- package/dist/{pt-BR-DRCdHX1d.js → cdn/chunks/pt-BR-CMljK37h.js} +10 -1
- package/dist/cdn/chunks/{pt-BR-DRCdHX1d.js.map → pt-BR-CMljK37h.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-R0v5p99W.js → pusher-kUlkqMvR.js} +21 -28
- package/dist/cdn/chunks/{pusher-R0v5p99W.js.map → pusher-kUlkqMvR.js.map} +1 -1
- package/dist/cdn/chunks/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
- package/dist/cdn/chunks/{src-SluTVSz_.js → src-B3HKHglu.js} +19 -23
- package/dist/cdn/chunks/{src-SluTVSz_.js.map → src-B3HKHglu.js.map} +1 -1
- package/dist/cdn/chunks/{src-CM0gCvAS.js → src-B4UhYbI8.js} +253 -253
- package/dist/cdn/chunks/{src-CM0gCvAS.js.map → src-B4UhYbI8.js.map} +1 -1
- package/dist/cdn/chunks/{src-CzoMNRq4.js → src-CumZZNXZ.js} +542 -806
- package/dist/cdn/chunks/{src-CzoMNRq4.js.map → src-CumZZNXZ.js.map} +1 -1
- package/dist/cdn/chunks/{src-BKI1x1k7.js → src-D5mfLR4V.js} +183 -165
- package/dist/cdn/chunks/{src-BKI1x1k7.js.map → src-D5mfLR4V.js.map} +1 -1
- package/dist/cdn/chunks/{styles-BbfU2w9R.js → styles--m9OCb_Z.js} +730 -723
- package/dist/cdn/chunks/styles--m9OCb_Z.js.map +1 -0
- package/dist/cdn/chunks/timeouts-SsLMC4a3.js +6 -0
- package/dist/cdn/chunks/{timeouts-Bmi_yePw.js.map → timeouts-SsLMC4a3.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-DUTbZTeR.js → tiptap-rsib432n.js} +136 -123
- package/dist/cdn/chunks/tiptap-rsib432n.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-aanU8uqB.js → useAliveFlag-CseYNikC.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-aanU8uqB.js.map → useAliveFlag-CseYNikC.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-BjNENqkM.js → useCloudI18n-sx1pqEbY.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-BjNENqkM.js.map → useCloudI18n-sx1pqEbY.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CzMhD6Gd.js → useEditorCore-ZqF7P99K.js} +457 -435
- package/dist/cdn/chunks/useEditorCore-ZqF7P99K.js.map +1 -0
- package/dist/cdn/chunks/{useI18n-8Wd7G-cq.js → useI18n-vD57BfVR.js} +3 -3
- package/dist/cdn/chunks/{useI18n-8Wd7G-cq.js.map → useI18n-vD57BfVR.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-C7G31KV-.js → useMergeTag-HatzNGgc.js} +5 -5
- package/dist/cdn/chunks/{useMergeTag-C7G31KV-.js.map → useMergeTag-HatzNGgc.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-Bx0QewTv.js → usePopoverPosition-BdQ3Sv4B.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-Bx0QewTv.js.map → usePopoverPosition-BdQ3Sv4B.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +144 -139
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BpQDKiPz.js → check-CIhIDh4h.js} +1 -1
- package/dist/{chevron-down-j8GrdTyz.js → chevron-down-CZ0m6G3s.js} +1 -1
- package/dist/{chevron-up-BACyVhyC.js → chevron-up-BH_tJLeb.js} +1 -1
- package/dist/{circle-alert-CgtE46ND.js → circle-alert-DkEXnGPV.js} +1 -1
- package/dist/{clock-BzKLLW5L.js → clock-BDIJZUET.js} +1 -1
- package/dist/{cloud-CeZPgo1V.js → cloud-R8ci6yR1.js} +10 -14
- package/dist/{createLucideIcon-JWHwTI6N.js → createLucideIcon-AEltGIse.js} +3 -3
- package/dist/{cdn/chunks/de-CnnxBwh7.js → de-CUeaFJph.js} +8 -3
- package/dist/{dist-3DHaYEiT.js → dist-B6Px6GPj.js} +2 -2
- package/dist/{dist-BJbqgyPn.js → dist-Ba5Q-UX1.js} +106 -88
- package/dist/{dist-CL_CfQ3Q.js → dist-BxbTVeY0.js} +2 -2
- package/dist/{dist-DOtLGnLr.js → dist-CIqhVQ1O.js} +6 -6
- package/dist/{dist-CclnU_v0.js → dist-CRH880TV.js} +2 -2
- package/dist/{dist-3HenmYIg.js → dist-CcQFPJMF.js} +117 -101
- package/dist/dist-CkPvZCld.js +5 -0
- package/dist/{dist-BCnJcAQc.js → dist-DSIgxp0v.js} +2 -2
- package/dist/{dist-DYv_Pttj.js → dist-DT1XnEnj.js} +33 -17
- package/dist/{dist-Ih7ejWzn.js → dist-DX4x6mQ1.js} +4 -4
- package/dist/{dist-B_etKYyh.js → dist-Dx71pluS.js} +18 -13
- package/dist/{dist-bivrM-nS.js → dist-DyCHUyRR.js} +2 -2
- package/dist/dist-iCEDH3cC.js +5 -0
- package/dist/{dist-DKWoZJAV.js → dist-nR6mxyqI.js} +2 -2
- package/dist/{cdn/chunks/en-5gW-bYy2.js → en-zCYIPAL5.js} +8 -3
- package/dist/{es-sQ9SdI0l.js → es-BSiH7YkP.js} +8 -1
- package/dist/{extensions-3870a_3R.js → extensions-CGxj6-2o.js} +23 -19
- package/dist/{cdn/chunks/fr-DBZ5w21C.js → fr-DTVJ3det.js} +8 -3
- package/dist/{image-up-CQdtq8ge.js → image-up-8ktdYdaZ.js} +1 -1
- package/dist/{info-BUJBXoE6.js → info-CvrCgTLH.js} +1 -1
- package/dist/keys-uWpGv4Pq.js +10 -0
- package/dist/{liquid.browser-DZLtv26k.js → liquid.browser-BECWFL5Z.js} +755 -717
- package/dist/{list-checks-BGHaCSD5.js → list-checks-yzGT93ZL.js} +1 -1
- package/dist/{loader-circle-C-Z6kgI6.js → loader-circle-B6euendB.js} +1 -1
- package/dist/{message-circle-CEm5qckV.js → message-circle-BMldLVcA.js} +1 -1
- package/dist/{nl-DOL7Fnfo.js → nl-BqSquFS3.js} +8 -1
- package/dist/{pencil-DdwmkKLb.js → pencil-CkKkSd6N.js} +1 -1
- package/dist/{cdn/chunks/pt-BR-DRCdHX1d.js → pt-BR-CMljK37h.js} +8 -3
- package/dist/{refresh-cw-maKlg0dl.js → refresh-cw-fBPgB97G.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-GdMI8WqG.js → runtime-dom.esm-bundler-CBbDt7sw.js} +2 -2
- package/dist/{scan-line-BFgesTOY.js → scan-line-CRoEOUiK.js} +1 -1
- package/dist/{send-B70aQDrA.js → send-B9Tt2qBi.js} +1 -1
- package/dist/{shield-check-B7x5OKt5.js → shield-check-QfZkYeIo.js} +1 -1
- package/dist/{sparkles-DVlm1Ipp.js → sparkles-8UeMmZb8.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-BWTIgN5L.js → styles-C9AMvkJk.js} +884 -877
- package/dist/templatical-editor.js +96 -91
- package/dist/{text-align-start-Vay3Kvo2.js → text-align-start-Dn8uIheW.js} +1 -1
- package/dist/{trash-2-DE8CmxAG.js → trash-2-DDyvqj0E.js} +1 -1
- package/dist/{triangle-alert-Djg6IG8N.js → triangle-alert-B3PydLzl.js} +1 -1
- package/dist/{upload-BwwE0U6G.js → upload-hE8ItfyG.js} +2 -2
- package/dist/{useAliveFlag-C43EhZFY.js → useAliveFlag-AfoTE_AY.js} +1 -1
- package/dist/{useCloudI18n-BmiygEM4.js → useCloudI18n-BC_QV2Z7.js} +2 -2
- package/dist/{useEditorCore-CuMMIfiS.js → useEditorCore-Dojb-P2f.js} +941 -921
- package/dist/{useI18n-D2L9Mkik.js → useI18n-DzOcl2wl.js} +2 -2
- package/dist/{useMergeTag-BTdDq5DC.js → useMergeTag-BFxXCv3p.js} +4 -4
- package/dist/{usePopoverPosition-BO2LNy5n.js → usePopoverPosition-Dtr1Mp1x.js} +13 -13
- package/dist/{vue.runtime.esm-bundler-B0xoGkDv.js → vue.runtime.esm-bundler-Xpz-L9Fn.js} +27 -22
- package/dist/{x-CkD6A1iB.js → x-C4lETLDx.js} +1 -1
- package/package.json +25 -25
- package/dist/BlockPreviewCanvas-MD9BGuXV.js +0 -115
- package/dist/DesignReferenceSidebar-BxPo0zyx.js +0 -264
- package/dist/TplModal-CykwWFhF.js +0 -49
- package/dist/ViewportToggle-BjmbNoao.js +0 -97
- package/dist/cdn/chunks/BlockPreviewCanvas-eASrdFSN.js +0 -117
- package/dist/cdn/chunks/BlockPreviewCanvas-eASrdFSN.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-S8zLHtKb.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-CCWEVrE2.js +0 -162
- package/dist/cdn/chunks/TestEmailModal-CCWEVrE2.js.map +0 -1
- package/dist/cdn/chunks/TplModal-BN53d9Se.js +0 -50
- package/dist/cdn/chunks/TplModal-BN53d9Se.js.map +0 -1
- package/dist/cdn/chunks/ViewportToggle-CFmF-N4i.js +0 -66
- package/dist/cdn/chunks/ViewportToggle-CFmF-N4i.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-etMMQoVv.js +0 -21
- package/dist/cdn/chunks/dist-CiBEt0VR.js.map +0 -1
- package/dist/cdn/chunks/dist-CxTt8FRE.js.map +0 -1
- package/dist/cdn/chunks/fr-DBZ5w21C.js.map +0 -1
- package/dist/cdn/chunks/icons-CYWw8Xfp.js.map +0 -1
- package/dist/cdn/chunks/keys-D7kUmfpE.js +0 -12
- package/dist/cdn/chunks/keys-D7kUmfpE.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +0 -1
- package/dist/cdn/chunks/nl-DOL7Fnfo.js.map +0 -1
- package/dist/cdn/chunks/styles-BbfU2w9R.js.map +0 -1
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js +0 -6
- package/dist/cdn/chunks/tiptap-DUTbZTeR.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CzMhD6Gd.js.map +0 -1
- package/dist/dist-CcQLJeWV.js +0 -5
- package/dist/dist-DerdmERj.js +0 -5
- package/dist/keys-CHPcp-Nz.js +0 -10
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { Dt as e, Et as t, I as n, O as r, Ot as i, R as ee, T as a, Y as o, _ as s, c, d as l, h as u, l as te, m as d, nt as f, s as ne, u as p, z as re } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
|
-
import { a as ie, t as ae } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
|
-
import { t as oe } from "./upload-BwwE0U6G.js";
|
|
4
|
-
import { B as m, h, r as se } from "./keys-CHPcp-Nz.js";
|
|
5
|
-
import { t as g } from "./createLucideIcon-JWHwTI6N.js";
|
|
6
|
-
import { t as ce } from "./circle-alert-CgtE46ND.js";
|
|
7
|
-
import { t as _ } from "./image-up-CQdtq8ge.js";
|
|
8
|
-
import { t as v } from "./x-CkD6A1iB.js";
|
|
9
|
-
import { t as le } from "./LoadingTrack-KIcREPlS.js";
|
|
10
|
-
import { t as y } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
11
|
-
import { n as ue } from "./useCloudI18n-BmiygEM4.js";
|
|
12
|
-
import { f as de } from "./cloud-CeZPgo1V.js";
|
|
13
|
-
var fe = g("file-image", [
|
|
14
|
-
["path", {
|
|
15
|
-
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
16
|
-
key: "1oefj6"
|
|
17
|
-
}],
|
|
18
|
-
["path", {
|
|
19
|
-
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
20
|
-
key: "wfsgrz"
|
|
21
|
-
}],
|
|
22
|
-
["circle", {
|
|
23
|
-
cx: "10",
|
|
24
|
-
cy: "12",
|
|
25
|
-
r: "2",
|
|
26
|
-
key: "737tya"
|
|
27
|
-
}],
|
|
28
|
-
["path", {
|
|
29
|
-
d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
|
|
30
|
-
key: "wt3hpn"
|
|
31
|
-
}]
|
|
32
|
-
]), b = g("file-text", [
|
|
33
|
-
["path", {
|
|
34
|
-
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
35
|
-
key: "1oefj6"
|
|
36
|
-
}],
|
|
37
|
-
["path", {
|
|
38
|
-
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
39
|
-
key: "wfsgrz"
|
|
40
|
-
}],
|
|
41
|
-
["path", {
|
|
42
|
-
d: "M10 9H8",
|
|
43
|
-
key: "b1mrlr"
|
|
44
|
-
}],
|
|
45
|
-
["path", {
|
|
46
|
-
d: "M16 13H8",
|
|
47
|
-
key: "t4e002"
|
|
48
|
-
}],
|
|
49
|
-
["path", {
|
|
50
|
-
d: "M16 17H8",
|
|
51
|
-
key: "z1uh3a"
|
|
52
|
-
}]
|
|
53
|
-
]), pe = {
|
|
54
|
-
key: 0,
|
|
55
|
-
class: "tpl-design-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
56
|
-
}, me = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, he = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, x = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, S = {
|
|
57
|
-
key: 0,
|
|
58
|
-
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
59
|
-
}, C = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, w = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, T = {
|
|
60
|
-
key: 1,
|
|
61
|
-
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
62
|
-
}, E = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, D = {
|
|
63
|
-
key: 0,
|
|
64
|
-
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
65
|
-
}, O = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, k = ["src", "alt"], A = {
|
|
66
|
-
key: 1,
|
|
67
|
-
class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
|
|
68
|
-
}, j = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, M = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, N = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, P = ["accept"], F = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, I = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, L = ["placeholder"], R = {
|
|
69
|
-
key: 0,
|
|
70
|
-
class: "tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:px-3 tpl:py-3 tpl:bg-[var(--tpl-warning-light)] tpl:border tpl:border-[var(--tpl-warning)]"
|
|
71
|
-
}, ge = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, _e = { class: "tpl:flex tpl:gap-2" }, ve = {
|
|
72
|
-
key: 1,
|
|
73
|
-
class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
74
|
-
}, ye = ["disabled"], be = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, z = /*#__PURE__*/ y(/* @__PURE__ */ s({
|
|
75
|
-
__name: "DesignReferenceSidebar",
|
|
76
|
-
props: {
|
|
77
|
-
visible: { type: Boolean },
|
|
78
|
-
hasExistingBlocks: { type: Boolean }
|
|
79
|
-
},
|
|
80
|
-
emits: ["close", "apply"],
|
|
81
|
-
setup(s, { emit: g }) {
|
|
82
|
-
let y = s, z = g, { t: B } = ue(), xe = m(h, "DesignReferenceSidebar"), V = de({
|
|
83
|
-
authManager: m(se, "DesignReferenceSidebar"),
|
|
84
|
-
getTemplateId: () => xe.state.template?.id ?? null,
|
|
85
|
-
onApply: (e) => z("apply", e)
|
|
86
|
-
}), H = o(null), U = o("image"), W = o(null), G = o(""), K = o(null), q = o(!1), J = o(!1), Y = ne(() => !V.isGenerating.value && W.value !== null);
|
|
87
|
-
function X(e) {
|
|
88
|
-
U.value = e, Q();
|
|
89
|
-
}
|
|
90
|
-
function Se(e) {
|
|
91
|
-
let t = e.target, n = t.files?.[0];
|
|
92
|
-
n && Z(n), t.value = "";
|
|
93
|
-
}
|
|
94
|
-
function Z(e) {
|
|
95
|
-
if (e.size > 10485760) {
|
|
96
|
-
V.error.value = B.designReference.fileTooLarge;
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
if (U.value === "image") {
|
|
100
|
-
if (![
|
|
101
|
-
"image/png",
|
|
102
|
-
"image/jpeg",
|
|
103
|
-
"image/jpg",
|
|
104
|
-
"image/webp"
|
|
105
|
-
].includes(e.type)) {
|
|
106
|
-
V.error.value = B.designReference.invalidFileType;
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
} else if (U.value === "pdf" && e.type !== "application/pdf") {
|
|
110
|
-
V.error.value = B.designReference.invalidFileType;
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
W.value = e, V.error.value = null, K.value && URL.revokeObjectURL(K.value), e.type.startsWith("image/") ? K.value = URL.createObjectURL(e) : K.value = null;
|
|
114
|
-
}
|
|
115
|
-
function Q() {
|
|
116
|
-
K.value &&= (URL.revokeObjectURL(K.value), null), W.value = null;
|
|
117
|
-
}
|
|
118
|
-
function Ce(e) {
|
|
119
|
-
e.preventDefault(), J.value = !0;
|
|
120
|
-
}
|
|
121
|
-
function we() {
|
|
122
|
-
J.value = !1;
|
|
123
|
-
}
|
|
124
|
-
function Te(e) {
|
|
125
|
-
e.preventDefault(), J.value = !1;
|
|
126
|
-
let t = e.dataTransfer?.files?.[0];
|
|
127
|
-
t && Z(t);
|
|
128
|
-
}
|
|
129
|
-
function $() {
|
|
130
|
-
if (!Y.value) return;
|
|
131
|
-
if (y.hasExistingBlocks && !q.value) {
|
|
132
|
-
q.value = !0;
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
q.value = !1;
|
|
136
|
-
let e = {};
|
|
137
|
-
G.value.trim() && (e.prompt = G.value.trim()), U.value === "image" && W.value ? e.imageUpload = W.value : U.value === "pdf" && W.value && (e.pdfUpload = W.value), V.generate(e);
|
|
138
|
-
}
|
|
139
|
-
function Ee() {
|
|
140
|
-
q.value = !1;
|
|
141
|
-
}
|
|
142
|
-
return n(() => y.visible, (e) => {
|
|
143
|
-
e || (q.value = !1);
|
|
144
|
-
}), a(() => {
|
|
145
|
-
K.value &&= (URL.revokeObjectURL(K.value), null);
|
|
146
|
-
}), (n, a) => (r(), te(ae, {
|
|
147
|
-
"enter-active-class": "tpl-design-slide-enter-active",
|
|
148
|
-
"enter-from-class": "tpl:translate-x-full",
|
|
149
|
-
"enter-to-class": "tpl:translate-x-0",
|
|
150
|
-
"leave-active-class": "tpl-design-slide-leave-active",
|
|
151
|
-
"leave-from-class": "tpl:translate-x-0",
|
|
152
|
-
"leave-to-class": "tpl:translate-x-full"
|
|
153
|
-
}, {
|
|
154
|
-
default: ee(() => [s.visible ? (r(), l("div", pe, [c("div", me, [c("div", he, [u(f(_), {
|
|
155
|
-
size: 13,
|
|
156
|
-
"stroke-width": 2
|
|
157
|
-
}), c("span", null, i(f(B).designReference.title), 1)]), c("button", {
|
|
158
|
-
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
159
|
-
onClick: a[0] ||= (e) => z("close")
|
|
160
|
-
}, [u(f(v), {
|
|
161
|
-
size: 14,
|
|
162
|
-
"stroke-width": 2
|
|
163
|
-
})])]), c("div", x, [f(V).isGenerating.value ? (r(), l("div", S, [c("div", C, [u(le), c("p", w, i(f(B).designReference.generating), 1)])])) : (r(), l("div", T, [
|
|
164
|
-
c("div", E, [c("button", {
|
|
165
|
-
class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
166
|
-
style: e({
|
|
167
|
-
backgroundColor: U.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
168
|
-
color: U.value === "image" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
169
|
-
boxShadow: U.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
170
|
-
}),
|
|
171
|
-
onClick: a[1] ||= (e) => X("image")
|
|
172
|
-
}, [u(f(fe), {
|
|
173
|
-
size: 12,
|
|
174
|
-
"stroke-width": 2
|
|
175
|
-
}), d(" " + i(f(B).designReference.uploadImage), 1)], 4), c("button", {
|
|
176
|
-
class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
177
|
-
style: e({
|
|
178
|
-
backgroundColor: U.value === "pdf" ? "var(--tpl-bg)" : "transparent",
|
|
179
|
-
color: U.value === "pdf" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
180
|
-
boxShadow: U.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
181
|
-
}),
|
|
182
|
-
onClick: a[2] ||= (e) => X("pdf")
|
|
183
|
-
}, [u(f(b), {
|
|
184
|
-
size: 12,
|
|
185
|
-
"stroke-width": 2
|
|
186
|
-
}), d(" " + i(f(B).designReference.uploadPdf), 1)], 4)]),
|
|
187
|
-
c("div", null, [W.value ? (r(), l("div", D, [c("div", O, [K.value ? (r(), l("img", {
|
|
188
|
-
key: 0,
|
|
189
|
-
src: K.value,
|
|
190
|
-
alt: W.value.name,
|
|
191
|
-
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
192
|
-
}, null, 8, k)) : (r(), l("div", A, [u(f(b), {
|
|
193
|
-
size: 32,
|
|
194
|
-
"stroke-width": 1.5,
|
|
195
|
-
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
196
|
-
}), c("span", j, i(W.value.name), 1)])), c("button", {
|
|
197
|
-
class: "tpl:absolute tpl:top-2 tpl:right-2 tpl:rounded-full tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow)]",
|
|
198
|
-
onClick: Q
|
|
199
|
-
}, [u(f(v), {
|
|
200
|
-
size: 12,
|
|
201
|
-
"stroke-width": 2
|
|
202
|
-
})])])])) : (r(), l("div", {
|
|
203
|
-
key: 1,
|
|
204
|
-
class: "tpl-design-dropzone tpl:flex tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border-2 tpl:border-dashed tpl:px-4 tpl:py-8 tpl:transition-colors tpl:duration-150",
|
|
205
|
-
style: e({
|
|
206
|
-
borderColor: J.value ? "var(--tpl-primary)" : "var(--tpl-border-light)",
|
|
207
|
-
backgroundColor: J.value ? "var(--tpl-primary-light)" : "var(--tpl-bg)"
|
|
208
|
-
}),
|
|
209
|
-
onClick: a[3] ||= (e) => H.value?.click(),
|
|
210
|
-
onDragover: Ce,
|
|
211
|
-
onDragleave: we,
|
|
212
|
-
onDrop: Te
|
|
213
|
-
}, [
|
|
214
|
-
u(f(oe), {
|
|
215
|
-
size: 24,
|
|
216
|
-
"stroke-width": 1.5,
|
|
217
|
-
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
218
|
-
}),
|
|
219
|
-
c("span", M, i(f(B).designReference.dropHint), 1),
|
|
220
|
-
c("span", N, i(U.value === "image" ? f(B).designReference.acceptedImages : f(B).designReference.acceptedPdf), 1)
|
|
221
|
-
], 36)), c("input", {
|
|
222
|
-
ref_key: "fileInput",
|
|
223
|
-
ref: H,
|
|
224
|
-
type: "file",
|
|
225
|
-
class: "tpl:hidden",
|
|
226
|
-
accept: U.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
227
|
-
onChange: Se
|
|
228
|
-
}, null, 40, P)]),
|
|
229
|
-
c("div", F, [c("label", I, i(f(B).designReference.promptLabel), 1), re(c("textarea", {
|
|
230
|
-
"onUpdate:modelValue": a[4] ||= (e) => G.value = e,
|
|
231
|
-
class: t(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
|
|
232
|
-
placeholder: f(B).designReference.promptPlaceholder,
|
|
233
|
-
rows: "3"
|
|
234
|
-
}, null, 8, L), [[ie, G.value]])]),
|
|
235
|
-
q.value ? (r(), l("div", R, [c("p", ge, i(f(B).designReference.replaceWarning), 1), c("div", _e, [c("button", {
|
|
236
|
-
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
237
|
-
style: { "background-color": "transparent" },
|
|
238
|
-
onClick: Ee
|
|
239
|
-
}, i(f(B).designReference.replaceCancel), 1), c("button", {
|
|
240
|
-
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
241
|
-
onClick: $
|
|
242
|
-
}, i(f(B).designReference.replaceConfirm), 1)])])) : p("", !0),
|
|
243
|
-
f(V).error.value ? (r(), l("div", ve, [u(f(ce), {
|
|
244
|
-
size: 14,
|
|
245
|
-
"stroke-width": 2,
|
|
246
|
-
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
247
|
-
}), c("span", null, i(f(B).designReference.error), 1)])) : p("", !0),
|
|
248
|
-
q.value ? p("", !0) : (r(), l("button", {
|
|
249
|
-
key: 2,
|
|
250
|
-
class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
251
|
-
disabled: !Y.value,
|
|
252
|
-
onClick: $
|
|
253
|
-
}, [u(f(_), {
|
|
254
|
-
size: 16,
|
|
255
|
-
"stroke-width": 2
|
|
256
|
-
}), d(" " + i(f(B).designReference.generate), 1)], 8, ye)),
|
|
257
|
-
c("p", be, i(f(B).aiMenu.disclaimer), 1)
|
|
258
|
-
]))])])) : p("", !0)]),
|
|
259
|
-
_: 1
|
|
260
|
-
}));
|
|
261
|
-
}
|
|
262
|
-
}), [["__scopeId", "data-v-bdbf8d0d"]]);
|
|
263
|
-
//#endregion
|
|
264
|
-
export { z as default };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { O as e, R as t, Y as n, _ as r, c as i, d as a, h as o, i as s, j as c, l, nt as u, s as d, u as f, x as p } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
|
-
import { c as m, t as h } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
|
-
import { O as g } from "./useEditorCore-CuMMIfiS.js";
|
|
4
|
-
import { n as _ } from "./usePopoverPosition-BO2LNy5n.js";
|
|
5
|
-
import { z as v } from "./keys-CHPcp-Nz.js";
|
|
6
|
-
//#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var y = ["data-tpl-theme"], b = /* @__PURE__ */ r({
|
|
8
|
-
__name: "TplModal",
|
|
9
|
-
props: { visible: { type: Boolean } },
|
|
10
|
-
emits: ["close", "keydown"],
|
|
11
|
-
setup(r, { emit: b }) {
|
|
12
|
-
let x = r, S = b, C = n(null);
|
|
13
|
-
g(C, d(() => x.visible));
|
|
14
|
-
let w = p(v), T = _();
|
|
15
|
-
function E(e) {
|
|
16
|
-
e.key === "Escape" && S("close"), S("keydown", e);
|
|
17
|
-
}
|
|
18
|
-
return (n, d) => u(T) ? (e(), l(s, {
|
|
19
|
-
key: 0,
|
|
20
|
-
to: u(T)
|
|
21
|
-
}, [o(h, {
|
|
22
|
-
"enter-active-class": "tpl:transition tpl:duration-150",
|
|
23
|
-
"enter-from-class": "tpl:opacity-0",
|
|
24
|
-
"enter-to-class": "tpl:opacity-100",
|
|
25
|
-
"leave-active-class": "tpl:transition tpl:duration-100",
|
|
26
|
-
"leave-from-class": "tpl:opacity-100",
|
|
27
|
-
"leave-to-class": "tpl:opacity-0"
|
|
28
|
-
}, {
|
|
29
|
-
default: t(() => [r.visible ? (e(), a("div", {
|
|
30
|
-
key: 0,
|
|
31
|
-
"data-tpl-theme": u(w),
|
|
32
|
-
class: "tpl tpl:fixed tpl:inset-0 tpl:z-modal tpl:flex tpl:items-center tpl:justify-center",
|
|
33
|
-
style: {
|
|
34
|
-
"background-color": "var(--tpl-overlay)",
|
|
35
|
-
"backdrop-filter": "blur(8px)",
|
|
36
|
-
"-webkit-backdrop-filter": "blur(8px)"
|
|
37
|
-
},
|
|
38
|
-
onClick: d[0] ||= m((e) => S("close"), ["self"]),
|
|
39
|
-
onKeydown: E
|
|
40
|
-
}, [i("div", {
|
|
41
|
-
ref_key: "dialogRef",
|
|
42
|
-
ref: C
|
|
43
|
-
}, [c(n.$slots, "default")], 512)], 40, y)) : f("", !0)]),
|
|
44
|
-
_: 3
|
|
45
|
-
})], 8, ["to"])) : f("", !0);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
//#endregion
|
|
49
|
-
export { b as t };
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { A as e, Dt as t, O as n, Ot as r, _ as i, c as a, d as o, l as s, nt as c, r as l, s as u } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
|
-
import { t as d } from "./useI18n-D2L9Mkik.js";
|
|
3
|
-
import { t as f } from "./createLucideIcon-JWHwTI6N.js";
|
|
4
|
-
var p = f("monitor", [
|
|
5
|
-
["rect", {
|
|
6
|
-
width: "20",
|
|
7
|
-
height: "14",
|
|
8
|
-
x: "2",
|
|
9
|
-
y: "3",
|
|
10
|
-
rx: "2",
|
|
11
|
-
key: "48i651"
|
|
12
|
-
}],
|
|
13
|
-
["line", {
|
|
14
|
-
x1: "8",
|
|
15
|
-
x2: "16",
|
|
16
|
-
y1: "21",
|
|
17
|
-
y2: "21",
|
|
18
|
-
key: "1svkeh"
|
|
19
|
-
}],
|
|
20
|
-
["line", {
|
|
21
|
-
x1: "12",
|
|
22
|
-
x2: "12",
|
|
23
|
-
y1: "17",
|
|
24
|
-
y2: "21",
|
|
25
|
-
key: "vw1qmm"
|
|
26
|
-
}]
|
|
27
|
-
]), m = f("smartphone", [["rect", {
|
|
28
|
-
width: "14",
|
|
29
|
-
height: "20",
|
|
30
|
-
x: "5",
|
|
31
|
-
y: "2",
|
|
32
|
-
rx: "2",
|
|
33
|
-
ry: "2",
|
|
34
|
-
key: "1yt0o3"
|
|
35
|
-
}], ["path", {
|
|
36
|
-
d: "M12 18h.01",
|
|
37
|
-
key: "mhygvu"
|
|
38
|
-
}]]), h = ["aria-label"], g = [
|
|
39
|
-
"aria-checked",
|
|
40
|
-
"aria-label",
|
|
41
|
-
"title",
|
|
42
|
-
"onClick"
|
|
43
|
-
], _ = /* @__PURE__ */ i({
|
|
44
|
-
__name: "ViewportToggle",
|
|
45
|
-
props: { viewport: {} },
|
|
46
|
-
emits: ["change"],
|
|
47
|
-
setup(i, { emit: f }) {
|
|
48
|
-
let _ = i, v = f, { t: y } = d(), b = u(() => [{
|
|
49
|
-
value: "desktop",
|
|
50
|
-
label: y.viewport.desktop
|
|
51
|
-
}, {
|
|
52
|
-
value: "mobile",
|
|
53
|
-
label: y.viewport.mobile
|
|
54
|
-
}]), x = u(() => `translateX(${b.value.findIndex((e) => e.value === _.viewport) * 100}%)`);
|
|
55
|
-
return (u, d) => (n(), o("div", {
|
|
56
|
-
role: "radiogroup",
|
|
57
|
-
"aria-label": c(y).viewport.label,
|
|
58
|
-
class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
|
|
59
|
-
style: t({
|
|
60
|
-
gridTemplateColumns: `repeat(${b.value.length}, 1fr)`,
|
|
61
|
-
backgroundColor: "var(--tpl-bg-hover)"
|
|
62
|
-
})
|
|
63
|
-
}, [a("div", {
|
|
64
|
-
class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
|
|
65
|
-
style: t({
|
|
66
|
-
left: "4px",
|
|
67
|
-
width: `calc((100% - 8px) / ${b.value.length})`,
|
|
68
|
-
transform: x.value,
|
|
69
|
-
backgroundColor: "var(--tpl-bg)",
|
|
70
|
-
boxShadow: "var(--tpl-shadow)",
|
|
71
|
-
transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
72
|
-
})
|
|
73
|
-
}, null, 4), (n(!0), o(l, null, e(b.value, (e) => (n(), o("button", {
|
|
74
|
-
key: e.value,
|
|
75
|
-
role: "radio",
|
|
76
|
-
"aria-checked": i.viewport === e.value,
|
|
77
|
-
"aria-label": e.label,
|
|
78
|
-
class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium",
|
|
79
|
-
style: t({
|
|
80
|
-
color: i.viewport === e.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
81
|
-
transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
82
|
-
}),
|
|
83
|
-
title: e.label,
|
|
84
|
-
onClick: (t) => v("change", e.value)
|
|
85
|
-
}, [e.value === "desktop" ? (n(), s(c(p), {
|
|
86
|
-
key: 0,
|
|
87
|
-
size: 18,
|
|
88
|
-
"stroke-width": 1.5
|
|
89
|
-
})) : (n(), s(c(m), {
|
|
90
|
-
key: 1,
|
|
91
|
-
size: 18,
|
|
92
|
-
"stroke-width": 1.5
|
|
93
|
-
})), a("span", null, r(e.label), 1)], 12, g))), 128))], 12, h));
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
//#endregion
|
|
97
|
-
export { m as n, p as r, _ as t };
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime-Dqa2HsxW.js";
|
|
2
|
-
import { I as t, L as n, M as r, P as i, T as a, f as o, g as s, it as c, m as l, p as u, st as d, u as f, x as p } from "./draggable-D840DIZB.js";
|
|
3
|
-
import { _ as m, a as h, c as g, d as _, f as v, h as y, i as b, k as x, m as S, n as C, p as w, r as T, u as E, v as D, y as O } from "./useEditorCore-CzMhD6Gd.js";
|
|
4
|
-
import { d as k, h as A, o as j } from "./keys-D7kUmfpE.js";
|
|
5
|
-
import { n as M, t as N } from "./emailFrameWidth-BmFCN2dp.js";
|
|
6
|
-
//#region src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var P = { class: "tpl:w-full" }, F = { class: "tpl:flex tpl:gap-0" }, I = /* @__PURE__ */ p({
|
|
8
|
-
name: "PreviewSectionBlock",
|
|
9
|
-
__name: "PreviewSectionBlock",
|
|
10
|
-
props: {
|
|
11
|
-
block: {},
|
|
12
|
-
viewport: {}
|
|
13
|
-
},
|
|
14
|
-
setup(e) {
|
|
15
|
-
let p = {
|
|
16
|
-
title: g,
|
|
17
|
-
paragraph: w,
|
|
18
|
-
image: y,
|
|
19
|
-
video: C,
|
|
20
|
-
button: x,
|
|
21
|
-
divider: D,
|
|
22
|
-
social: h,
|
|
23
|
-
menu: S,
|
|
24
|
-
table: T,
|
|
25
|
-
spacer: b,
|
|
26
|
-
html: m,
|
|
27
|
-
custom: O
|
|
28
|
-
}, _ = e, k = a(j, null), A = o(() => {
|
|
29
|
-
switch (_.block.columns) {
|
|
30
|
-
case "2": return ["50%", "50%"];
|
|
31
|
-
case "3": return [
|
|
32
|
-
"33.33%",
|
|
33
|
-
"33.33%",
|
|
34
|
-
"33.33%"
|
|
35
|
-
];
|
|
36
|
-
case "1-2": return ["33.33%", "66.67%"];
|
|
37
|
-
case "2-1": return ["66.67%", "33.33%"];
|
|
38
|
-
default: return ["100%"];
|
|
39
|
-
}
|
|
40
|
-
}), M = o(() => {
|
|
41
|
-
let e = A.value.length, t = [..._.block.children];
|
|
42
|
-
for (; t.length < e;) t.push([]);
|
|
43
|
-
return t.slice(0, e);
|
|
44
|
-
});
|
|
45
|
-
function N(e) {
|
|
46
|
-
return M.value[e] || [];
|
|
47
|
-
}
|
|
48
|
-
function I(e) {
|
|
49
|
-
return v(e, k, p);
|
|
50
|
-
}
|
|
51
|
-
return (e, a) => {
|
|
52
|
-
let o = t("PreviewSectionBlock", !0);
|
|
53
|
-
return r(), s("div", P, [u("div", F, [(r(!0), s(f, null, i(M.value, (e, t) => (r(), s("div", {
|
|
54
|
-
key: t,
|
|
55
|
-
style: d({ width: A.value[t] })
|
|
56
|
-
}, [(r(!0), s(f, null, i(N(t), (e) => (r(), s("div", {
|
|
57
|
-
key: e.id,
|
|
58
|
-
style: d(c(E)(e))
|
|
59
|
-
}, [e.type === "section" ? (r(), l(o, {
|
|
60
|
-
key: 0,
|
|
61
|
-
block: e,
|
|
62
|
-
viewport: "desktop"
|
|
63
|
-
}, null, 8, ["block"])) : (r(), l(n(I(e)), {
|
|
64
|
-
key: 1,
|
|
65
|
-
block: e,
|
|
66
|
-
viewport: "desktop"
|
|
67
|
-
}, null, 8, ["block"]))], 4))), 128))], 4))), 128))])]);
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
}), L = /*@__PURE__*/ p({
|
|
71
|
-
__name: "BlockPreviewCanvas",
|
|
72
|
-
props: {
|
|
73
|
-
blocks: {},
|
|
74
|
-
viewport: { default: "desktop" }
|
|
75
|
-
},
|
|
76
|
-
setup(e) {
|
|
77
|
-
let t = e, u = a(j), p = a(A, null), P = a(k, null), F = o(() => t.blocks.filter((e) => !P?.isHidden(e.id))), L = o(() => M(p?.content.value.settings, t.viewport)), R = o(() => p ? _(p.content.value.settings) : {}), z = {
|
|
78
|
-
section: I,
|
|
79
|
-
title: g,
|
|
80
|
-
paragraph: w,
|
|
81
|
-
image: y,
|
|
82
|
-
video: C,
|
|
83
|
-
button: x,
|
|
84
|
-
divider: D,
|
|
85
|
-
social: h,
|
|
86
|
-
menu: S,
|
|
87
|
-
table: T,
|
|
88
|
-
spacer: b,
|
|
89
|
-
html: m,
|
|
90
|
-
custom: O
|
|
91
|
-
};
|
|
92
|
-
function B(e) {
|
|
93
|
-
return v(e, u, z);
|
|
94
|
-
}
|
|
95
|
-
return (t, a) => (r(), s("div", {
|
|
96
|
-
"data-testid": "block-preview-canvas",
|
|
97
|
-
class: "tpl:pointer-events-none tpl:mx-auto tpl:select-none tpl:rounded-lg",
|
|
98
|
-
style: d({
|
|
99
|
-
width: `${L.value}px`,
|
|
100
|
-
transition: c(N),
|
|
101
|
-
backgroundColor: "var(--tpl-canvas-bg)",
|
|
102
|
-
boxShadow: "var(--tpl-shadow-sm)",
|
|
103
|
-
...R.value
|
|
104
|
-
})
|
|
105
|
-
}, [(r(!0), s(f, null, i(F.value, (t) => (r(), s("div", {
|
|
106
|
-
key: t.id,
|
|
107
|
-
style: d(c(E)(t))
|
|
108
|
-
}, [(r(), l(n(B(t)), {
|
|
109
|
-
block: t,
|
|
110
|
-
viewport: e.viewport
|
|
111
|
-
}, null, 8, ["block", "viewport"]))], 4))), 128))], 4));
|
|
112
|
-
}
|
|
113
|
-
}), R = /* @__PURE__ */ e({ default: () => z }), z = L;
|
|
114
|
-
//#endregion
|
|
115
|
-
export { R as n, z as t };
|
|
116
|
-
|
|
117
|
-
//# sourceMappingURL=BlockPreviewCanvas-eASrdFSN.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockPreviewCanvas-eASrdFSN.js","names":[],"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 \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\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 \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\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 { BLOCK_REGISTRY_KEY, CONDITION_PREVIEW_KEY, EDITOR_KEY } from \"../keys\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport type { Block, ViewportSize } from \"@templatical/types\";\nimport { computed, inject, 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 { viewport: \"desktop\" },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\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 */\nconst visibleBlocks = computed(() =>\n props.blocks.filter((block) => !conditionPreview?.isHidden(block.id)),\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(editor?.content.value.settings, 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 editor ? getDocumentStyle(editor.content.value.settings) : {},\n);\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};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n</script>\n\n<template>\n <div\n data-testid=\"block-preview-canvas\"\n class=\"tpl:pointer-events-none tpl:mx-auto tpl:select-none tpl:rounded-lg\"\n :style=\"{\n width: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n backgroundColor: 'var(--tpl-canvas-bg)',\n boxShadow: 'var(--tpl-shadow-sm)',\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"getBlockWrapperStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\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 { BLOCK_REGISTRY_KEY, CONDITION_PREVIEW_KEY, EDITOR_KEY } from \"../keys\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport type { Block, ViewportSize } from \"@templatical/types\";\nimport { computed, inject, 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 { viewport: \"desktop\" },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\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 */\nconst visibleBlocks = computed(() =>\n props.blocks.filter((block) => !conditionPreview?.isHidden(block.id)),\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(editor?.content.value.settings, 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 editor ? getDocumentStyle(editor.content.value.settings) : {},\n);\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};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n</script>\n\n<template>\n <div\n data-testid=\"block-preview-canvas\"\n class=\"tpl:pointer-events-none tpl:mx-auto tpl:select-none tpl:rounded-lg\"\n :style=\"{\n width: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n backgroundColor: 'var(--tpl-canvas-bg)',\n boxShadow: 'var(--tpl-shadow-sm)',\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"getBlockWrapperStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAwBA,IAAM,IAAsD;GAC1D,OAAO;GACP,WAAW;GACX,OAAO;GACP,OAAO;GACP,QAAQ;GACR,SAAS;GACT,QAAQ;GACR,MAAM;GACN,OAAO;GACP,QAAQ;GACR,MAAM;GACN,QAAQ;EACV,GAEM,IAAQ,GAOR,IAAgB,EAAO,GAAoB,IAAI,GAE/C,IAAe,QAAe;GAClC,QAAQ,EAAM,MAAM,SAApB;IACE,KAAK,KACH,OAAO,CAAC,OAAO,KAAK;IACtB,KAAK,KACH,OAAO;KAAC;KAAU;KAAU;IAAQ;IACtC,KAAK,OACH,OAAO,CAAC,UAAU,QAAQ;IAC5B,KAAK,OACH,OAAO,CAAC,UAAU,QAAQ;IAC5B,SACE,OAAO,CAAC,MAAM;GAClB;EACF,CAAC,GAEK,IAAU,QAAe;GAC7B,IAAM,IAAQ,EAAa,MAAM,QAC3B,IAAW,CAAC,GAAG,EAAM,MAAM,QAAQ;GACzC,OAAO,EAAS,SAAS,IACvB,EAAS,KAAK,CAAC,CAAC;GAElB,OAAO,EAAS,MAAM,GAAG,CAAK;EAChC,CAAC;EAED,SAAS,EAAgB,GAA2B;GAClD,OAAO,EAAQ,MAAM,MAAa,CAAC;EACrC;EAEA,SAAS,EAAkB,GAAgC;GACzD,OAAO,EAAsB,GAAO,GAAe,CAAwB;EAC7E;;;eAIE,EA2BM,OA3BN,GA2BM,CA1BJ,EAyBM,OAzBN,GAyBM,EAAA,EAAA,EAAA,GAxBJ,EAuBM,GAAA,MAAA,EAtBoB,EAAA,QAAhB,GAAG,YADb,EAuBM,OAAA;IArBH,KAAK;IACL,OAAK,EAAA,EAAA,OAAW,EAAA,MAAa,GAAQ,CAAA;eAEtC,EAiBM,GAAA,MAAA,EAhBiB,EAAgB,CAAQ,IAAtC,YADT,EAiBM,OAAA;IAfH,KAAK,EAAW;IAChB,OAAK,EAAE,EAAA,CAAA,CAAoB,CAAC,CAAU,CAAA;OAI/B,EAAW,SAAI,aAAA,EAAA,GADvB,EAIE,GAAA;;IAFC,OAAO;IACR,UAAS;mCAEX,EAKE,EAJK,EAAkB,CAAU,CAAA,GAAA;;IAEhC,OAAO;IACR,UAAS;;;;;;;;;;;EE7ErB,IAAM,IAAQ,GAcR,IAAgB,EAAO,CAAkB,GACzC,IAAS,EAAO,GAAY,IAAI,GAChC,IAAmB,EAAO,GAAuB,IAAI,GAYrD,IAAgB,QACpB,EAAM,OAAO,QAAQ,MAAU,CAAC,GAAkB,SAAS,EAAM,EAAE,CAAC,CACtE,GAQM,IAAa,QACjB,EAAmB,GAAQ,QAAQ,MAAM,UAAU,EAAM,QAAQ,CACnE,GAYM,IAAgB,QACpB,IAAS,EAAiB,EAAO,QAAQ,MAAM,QAAQ,IAAI,CAAC,CAC9D,GAEM,IAAiD;GACrD,SAAS;GACT,OAAO;GACP,WAAW;GACX,OAAO;GACP,OAAO;GACP,QAAQ;GACR,SAAS;GACT,QAAQ;GACR,MAAM;GACN,OAAO;GACP,QAAQ;GACR,MAAM;GACN,QAAQ;EACV;EAEA,SAAS,EAAkB,GAAgC;GACzD,OAAO,EAAsB,GAAO,GAAe,CAAmB;EACxE;yBAIE,EAsBM,OAAA;GArBJ,eAAY;GACZ,OAAM;GACL,OAAK,EAAA;cAAoB,EAAA,MAAU;gBAAwB,EAAA,CAAA;;;OAA+H,EAAA;;cAQ3L,EAUM,GAAA,MAAA,EATY,EAAA,QAAT,YADT,EAUM,OAAA;GARH,KAAK,EAAM;GACX,OAAK,EAAE,EAAA,CAAA,CAAoB,CAAC,CAAK,CAAA;YAElC,EAIE,EAHK,EAAkB,CAAK,CAAA,GAAA;GACpB;GACP,UAAU,EAAA"}
|