@templatical/editor 0.43.0 → 0.43.2
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-DOCvzGBe.js → AiChatSidebar-DTtMEXNR.js} +7 -7
- package/dist/{AiFeatureMenu-xCJeD07B.js → AiFeatureMenu-DFj-_S9b.js} +4 -4
- package/dist/{BlockIssueBadge-BJ3A6mqh.js → BlockIssueBadge-CyLmqjLl.js} +2 -2
- package/dist/{BlockPreviewCanvas-BQXfqhzu.js → BlockPreviewCanvas-C6F66f3k.js} +2 -2
- package/dist/{CloudHeaderExtras-TFmBJ0Ry.js → CloudHeaderExtras-Z4K6OMn0.js} +2 -2
- package/dist/{CloudPanels-BnSBbYnw.js → CloudPanels-DOJ2Vske.js} +4 -4
- package/dist/{CollaboratorBar-7ry8EdUh.js → CollaboratorBar-BCkl3dKY.js} +2 -2
- package/dist/{CommentsPanel-CGEhbjx0.js → CommentsPanel-DPMi6-rb.js} +1 -1
- package/dist/{CommentsSidebar-CUpst9ou.js → CommentsSidebar-C1mQcyh3.js} +10 -10
- package/dist/{CountdownToolbar-B1a_UIuB.js → CountdownToolbar-DKmzpk__.js} +3 -3
- package/dist/{DesignReferenceSidebar-DkAmsBgM.js → DesignReferenceSidebar-CGRzOOb8.js} +5 -5
- package/dist/{IssuesPanel-lTpsCV4a.js → IssuesPanel-CsdxjjRm.js} +5 -5
- package/dist/{LogicTagInsertButton-B5YymR4U.js → LogicTagInsertButton-BX4jOUQy.js} +3 -3
- package/dist/{MediaEditModal-B1X8qtJb.js → MediaEditModal-Bm8uOKBx.js} +270 -230
- package/dist/{MediaPanels-DO30L1KS.js → MediaPanels-BNWtEntu.js} +1 -1
- package/dist/{MergeTagInput-B0M_-X0K.js → MergeTagInput-Mj8CFfX1.js} +1 -1
- package/dist/{MergeTagModeToggle-B-8W1tK7.js → MergeTagModeToggle-CinojvpV.js} +3 -3
- package/dist/{ParagraphEditor-DVGeU0Am.js → ParagraphEditor-DdOteRjD.js} +9 -9
- package/dist/{RestoreVersionDialog-DOhgYkiA.js → RestoreVersionDialog-B-i0wPjh.js} +3 -3
- package/dist/{RichTextEditorContent-AaLAArA0.js → RichTextEditorContent-CDtKOWsh.js} +4 -4
- package/dist/{SaveBlockDialog-36MzPD2S.js → SaveBlockDialog-DTcGPDMT.js} +8 -8
- package/dist/{SavedBlocksBrowserModal-B5nFKszf.js → SavedBlocksBrowserModal-BA5yXQi0.js} +9 -9
- package/dist/{SavedBlocksPanels-BZkbP7eB.js → SavedBlocksPanels-mfSALJqB.js} +1 -1
- package/dist/{SavedBlocksPickBar-ChoCMdu7.js → SavedBlocksPickBar-BOjduGI4.js} +2 -2
- package/dist/{TemplateScoringPanel-C6ellAcs.js → TemplateScoringPanel-Byz-ajjf.js} +11 -11
- package/dist/{TemplateSettings-C_0qK-zs.js → TemplateSettings-Bf5rfsU8.js} +5 -5
- package/dist/{TestEmailModal-CKW-VArm.js → TestEmailModal-DJo2yFLh.js} +6 -6
- package/dist/{TestEmailPanel-BylYzjyM.js → TestEmailPanel-CXIFWfDm.js} +1 -1
- package/dist/{TitleEditor-DoQ286_n.js → TitleEditor-BDtokkQF.js} +6 -6
- package/dist/{ToggleSwitch-CtZ6adlX.js → ToggleSwitch-BCYZvP1e.js} +1 -1
- package/dist/{Toolbar-B6dG5_IP.js → Toolbar-XOtJ_N58.js} +20 -20
- package/dist/{TplModal-DHwQXySQ.js → TplModal-C3mzMXof.js} +1 -1
- package/dist/{VersionHistoryMenu-DdspCRSA.js → VersionHistoryMenu-DRoFz15y.js} +5 -5
- package/dist/{VersionHistoryPanels-C6QxmRUH.js → VersionHistoryPanels-CeF0JnXI.js} +1 -1
- package/dist/{VersionPreviewBanner-XUuLe36h.js → VersionPreviewBanner-DQvIEKUU.js} +1 -1
- package/dist/{WrapperBlock-BumDudbj.js → WrapperBlock-DZwp4G7P.js} +1 -1
- package/dist/{blockTypeIcons-Sg8SY1NQ.js → blockTypeIcons-CAPoy6X7.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-BTf1Zbqb.js → ca-CYQH3J0b.js} +6 -2
- package/dist/cdn/chunks/{AiChatSidebar-DiG-EQ-E.js → AiChatSidebar-DW1uRkKE.js} +2 -2
- package/dist/cdn/chunks/{AiChatSidebar-DiG-EQ-E.js.map → AiChatSidebar-DW1uRkKE.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-4TgzmLb3.js → AiFeatureMenu-CHsgD78N.js} +3 -3
- package/dist/cdn/chunks/{AiFeatureMenu-4TgzmLb3.js.map → AiFeatureMenu-CHsgD78N.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-ChQ0mPf5.js → BlockIssueBadge-CIqu8JnG.js} +2 -2
- package/dist/cdn/chunks/{BlockIssueBadge-ChQ0mPf5.js.map → BlockIssueBadge-CIqu8JnG.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-BpvK3Sh9.js → BlockPreviewCanvas-Dtea66SI.js} +3 -3
- package/dist/cdn/chunks/{BlockPreviewCanvas-BpvK3Sh9.js.map → BlockPreviewCanvas-Dtea66SI.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DqgOaWym.js → CloudHeaderExtras-Kjj78__m.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-DqgOaWym.js.map → CloudHeaderExtras-Kjj78__m.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-INOiwkET.js → CloudPanels-DARXXD0q.js} +4 -4
- package/dist/cdn/chunks/{CloudPanels-INOiwkET.js.map → CloudPanels-DARXXD0q.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-CQ9EpYKQ.js → CollaboratorBar-C7O9mQJ_.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-CQ9EpYKQ.js.map → CollaboratorBar-C7O9mQJ_.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CjhxGMjL.js → CommentsPanel-KH5_JS7_.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-CjhxGMjL.js.map → CommentsPanel-KH5_JS7_.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-D9bqMnlt.js → CommentsSidebar-ucrNvgAQ.js} +2 -2
- package/dist/cdn/chunks/{CommentsSidebar-D9bqMnlt.js.map → CommentsSidebar-ucrNvgAQ.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CIRx5w1U.js → CountdownToolbar-DVInzkj9.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-CIRx5w1U.js.map → CountdownToolbar-DVInzkj9.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-C1-SbE_R.js → DesignReferenceSidebar-pleljkEJ.js} +2 -2
- package/dist/cdn/chunks/{DesignReferenceSidebar-C1-SbE_R.js.map → DesignReferenceSidebar-pleljkEJ.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-qKY6UDd-.js → IssuesPanel-CPcQIUni.js} +2 -2
- package/dist/cdn/chunks/{IssuesPanel-qKY6UDd-.js.map → IssuesPanel-CPcQIUni.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-CItDS_U1.js → LogicTagInsertButton-DSrW9v0x.js} +2 -2
- package/dist/cdn/chunks/{LogicTagInsertButton-CItDS_U1.js.map → LogicTagInsertButton-DSrW9v0x.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-CzUtXkpk.js → MediaEditModal-BHp7euCZ.js} +272 -232
- package/dist/cdn/chunks/MediaEditModal-BHp7euCZ.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-DOLsh7WC.js → MediaPanels-CGIRlO48.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-DOLsh7WC.js.map → MediaPanels-CGIRlO48.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-B33u3nxj.js → MergeTagInput-BSFofWuc.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-B33u3nxj.js.map → MergeTagInput-BSFofWuc.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-Bz1CH3NT.js → MergeTagModeToggle-D7KlTFZV.js} +2 -2
- package/dist/cdn/chunks/{MergeTagModeToggle-Bz1CH3NT.js.map → MergeTagModeToggle-D7KlTFZV.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B6A4yQ0A.js → ParagraphEditor-CokXagL1.js} +6 -6
- package/dist/cdn/chunks/{ParagraphEditor-B6A4yQ0A.js.map → ParagraphEditor-CokXagL1.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-B9rujl9w.js → RestoreVersionDialog-C-XEncAM.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog-B9rujl9w.js.map → RestoreVersionDialog-C-XEncAM.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-dOg1xFqv.js → RichTextEditorContent-DS_2UsJX.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-dOg1xFqv.js.map → RichTextEditorContent-DS_2UsJX.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BNAeb6--.js → SaveBlockDialog-D8OAKF_k.js} +6 -6
- package/dist/cdn/chunks/{SaveBlockDialog-BNAeb6--.js.map → SaveBlockDialog-D8OAKF_k.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal--FoVqEnT.js → SavedBlocksBrowserModal-B6GN_llD.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksBrowserModal--FoVqEnT.js.map → SavedBlocksBrowserModal-B6GN_llD.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-qKyPnVgk.js → SavedBlocksPanels-hRCREVxS.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-qKyPnVgk.js.map → SavedBlocksPanels-hRCREVxS.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BvLwca4B.js → SavedBlocksPickBar-C5YrK0iB.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-BvLwca4B.js.map → SavedBlocksPickBar-C5YrK0iB.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-ebsrVge3.js → TemplateScoringPanel-DXyQjcdU.js} +2 -2
- package/dist/cdn/chunks/{TemplateScoringPanel-ebsrVge3.js.map → TemplateScoringPanel-DXyQjcdU.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-BaEVdUTM.js → TemplateSettings-da14bXlk.js} +4 -4
- package/dist/cdn/chunks/{TemplateSettings-BaEVdUTM.js.map → TemplateSettings-da14bXlk.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DpYirvEL.js → TestEmailModal-Dl_cAyj-.js} +6 -6
- package/dist/cdn/chunks/{TestEmailModal-DpYirvEL.js.map → TestEmailModal-Dl_cAyj-.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-PAT70a2g.js → TestEmailPanel-CVZGOKaQ.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-PAT70a2g.js.map → TestEmailPanel-CVZGOKaQ.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Dc7YB6Uy.js → TitleEditor-DO8OdG_w.js} +5 -5
- package/dist/cdn/chunks/{TitleEditor-Dc7YB6Uy.js.map → TitleEditor-DO8OdG_w.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-D-8dCEbI.js → ToggleSwitch-D5Wi6Env.js} +2 -2
- package/dist/cdn/chunks/{ToggleSwitch-D-8dCEbI.js.map → ToggleSwitch-D5Wi6Env.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-BDzhrmGV.js → Toolbar-CXDE8xM-.js} +7 -7
- package/dist/cdn/chunks/{Toolbar-BDzhrmGV.js.map → Toolbar-CXDE8xM-.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-BbHRUc1Y.js → TplModal-CFi-Psf7.js} +2 -2
- package/dist/cdn/chunks/{TplModal-BbHRUc1Y.js.map → TplModal-CFi-Psf7.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-C_bBKOYU.js → VersionHistoryMenu-1bfCr14E.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryMenu-C_bBKOYU.js.map → VersionHistoryMenu-1bfCr14E.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BoJsPIKa.js → VersionHistoryPanels-DbgbyAdW.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-BoJsPIKa.js.map → VersionHistoryPanels-DbgbyAdW.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-CKyrcgxJ.js → VersionPreviewBanner-BaOTRIrm.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-CKyrcgxJ.js.map → VersionPreviewBanner-BaOTRIrm.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-CGg6rBnx.js → WrapperBlock-BYNfYvl3.js} +2 -2
- package/dist/cdn/chunks/{WrapperBlock-CGg6rBnx.js.map → WrapperBlock-BYNfYvl3.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CdfCfqHE.js → blockTypeIcons-B_IAjnTD.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-CdfCfqHE.js.map → blockTypeIcons-B_IAjnTD.js.map} +1 -1
- package/dist/cdn/chunks/{ca-BTf1Zbqb.js → ca-CYQH3J0b.js} +7 -3
- package/dist/cdn/chunks/ca-CYQH3J0b.js.map +1 -0
- package/dist/cdn/chunks/{de-xzrh9PA3.js → de-JvCTMJPy.js} +7 -3
- package/dist/cdn/chunks/de-JvCTMJPy.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-CZQArGNj.js → editor-modal-BDOfw3l0.js} +472 -428
- package/dist/cdn/chunks/editor-modal-BDOfw3l0.js.map +1 -0
- package/dist/cdn/chunks/en-DxpXHoxJ.js +2 -0
- package/dist/cdn/chunks/{es-BT4LSpE2.js → es-CAv-Vldw.js} +7 -3
- package/dist/cdn/chunks/es-CAv-Vldw.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Dy251lPd.js → extensions-1hJBHnGv.js} +2 -2
- package/dist/cdn/chunks/{extensions-Dy251lPd.js.map → extensions-1hJBHnGv.js.map} +1 -1
- package/dist/{fr-CI7OJoql.js → cdn/chunks/fr-DVPtxpR6.js} +8 -2
- package/dist/cdn/chunks/fr-DVPtxpR6.js.map +1 -0
- package/dist/cdn/chunks/{icons-CQnjugjy.js → icons-BrAyaJ0T.js} +6 -6
- package/dist/cdn/chunks/{icons-CQnjugjy.js.map → icons-BrAyaJ0T.js.map} +1 -1
- package/dist/{ja-DhlWUfke.js → cdn/chunks/ja-dcWzjStz.js} +8 -2
- package/dist/cdn/chunks/ja-dcWzjStz.js.map +1 -0
- package/dist/{nl-D8y5OWGB.js → cdn/chunks/nl-LZNqQgE4.js} +8 -2
- package/dist/cdn/chunks/nl-LZNqQgE4.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-DMCbUBvJ.js → pt-BR-D6P_mNwA.js} +7 -3
- package/dist/cdn/chunks/pt-BR-D6P_mNwA.js.map +1 -0
- package/dist/cdn/chunks/{src-CG5WUNg7.js → src-D5ceT_Y4.js} +2 -2
- package/dist/cdn/chunks/{src-CG5WUNg7.js.map → src-D5ceT_Y4.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-DoX2RgTl.js → useEditorCore-BTKqlRIg.js} +5 -5
- package/dist/cdn/chunks/{useEditorCore-DoX2RgTl.js.map → useEditorCore-BTKqlRIg.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +14 -14
- package/dist/{check-BMx_TLAS.js → check-CA6fvSIp.js} +1 -1
- package/dist/{chevron-down-KZf5mh9_.js → chevron-down-DYGJgpqJ.js} +1 -1
- package/dist/{chevron-right-BLZ60Vxw.js → chevron-right-Dm5_X4j6.js} +1 -1
- package/dist/{chevron-up-B9ynB8eU.js → chevron-up-Ds9ormyq.js} +1 -1
- package/dist/{circle-alert-pjvFFDrF.js → circle-alert-BYXE0olE.js} +1 -1
- package/dist/{clock-CiiTBfF3.js → clock-Ch1-h0sb.js} +1 -1
- package/dist/{copy-BF0_pQjH.js → copy-DLNyaPza.js} +1 -1
- package/dist/{createLucideIcon-C2YOVVWx.js → createLucideIcon-BrPnbRQT.js} +5 -5
- package/dist/{de-xzrh9PA3.js → de-JvCTMJPy.js} +6 -2
- package/dist/{editor-modal-99FB40dl.js → editor-modal-Cl5GFWTQ.js} +484 -440
- package/dist/en-CdCFaV2V.js +2 -0
- package/dist/{es-BT4LSpE2.js → es-CAv-Vldw.js} +6 -2
- package/dist/{extensions-DqQXxrvP.js → extensions-AKHJ0lax.js} +1 -1
- package/dist/{eye-RdXYgrQZ.js → eye-_7xKFxQh.js} +1 -1
- package/dist/{cdn/chunks/fr-CI7OJoql.js → fr-DVPtxpR6.js} +6 -4
- package/dist/{image-up-BwdoReQt.js → image-up-Ck-xPOGS.js} +1 -1
- package/dist/{info-zFMSGrL1.js → info-CBBNLK_i.js} +1 -1
- package/dist/{cdn/chunks/ja-DhlWUfke.js → ja-dcWzjStz.js} +6 -4
- package/dist/{link-D7orqFBT.js → link-BA_V9Nns.js} +1 -1
- package/dist/{list-BGt4Pgxc.js → list-BTujzSSo.js} +1 -1
- package/dist/{loader-circle-BVBgkRGz.js → loader-circle-B5OQFRUF.js} +1 -1
- package/dist/{message-circle-D8YLsarv.js → message-circle-DWXr27lZ.js} +1 -1
- package/dist/{cdn/chunks/nl-D8y5OWGB.js → nl-LZNqQgE4.js} +6 -4
- package/dist/{package-CuFvk0L5.js → package-DXW9QTU3.js} +1 -1
- package/dist/{pencil-DRYbmZW7.js → pencil-QmONZtjF.js} +1 -1
- package/dist/{plus-Dv0b3kh0.js → plus-XxHKE_GT.js} +1 -1
- package/dist/{pt-BR-DMCbUBvJ.js → pt-BR-D6P_mNwA.js} +6 -2
- package/dist/{refresh-cw-gYTIS5bJ.js → refresh-cw-DhXU8dCo.js} +1 -1
- package/dist/{search-D84_Ki_a.js → search-CpFaMrnL.js} +1 -1
- package/dist/{send-Cn-8_H_U.js → send-CFK3e6tQ.js} +1 -1
- package/dist/{shield-check-BOoVWJtD.js → shield-check-ndwpOTik.js} +1 -1
- package/dist/{smartphone-4Ej3PBw5.js → smartphone-DndMh9W6.js} +1 -1
- package/dist/{socialIcons-CzRJskEk.js → socialIcons-D43BLoTu.js} +1 -1
- package/dist/{sparkles-D3vnNe7O.js → sparkles-c1M5lwAQ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +28 -28
- package/dist/{text-align-start-Ci2h_Xly.js → text-align-start-DOtBufPq.js} +1 -1
- package/dist/{trash-wmi4UKvv.js → trash-DmaPdiUk.js} +1 -1
- package/dist/{triangle-alert-DJ0r2wmQ.js → triangle-alert-DqvxsSNL.js} +1 -1
- package/dist/{upload-XMde-TXf.js → upload-CO_hogFv.js} +1 -1
- package/dist/{useEditorCore-CAhRAya8.js → useEditorCore-0K8joh4X.js} +11 -11
- package/dist/{useScrollToBlock-B4F7KCrf.js → useScrollToBlock-BU5A9eS9.js} +1 -1
- package/dist/{x-BWrtpVl-.js → x-BCop_VsL.js} +1 -1
- package/package.json +8 -8
- package/dist/cdn/chunks/MediaEditModal-CzUtXkpk.js.map +0 -1
- package/dist/cdn/chunks/ca-BTf1Zbqb.js.map +0 -1
- package/dist/cdn/chunks/de-xzrh9PA3.js.map +0 -1
- package/dist/cdn/chunks/editor-modal-CZQArGNj.js.map +0 -1
- package/dist/cdn/chunks/en-9unxBjV8.js +0 -2
- package/dist/cdn/chunks/es-BT4LSpE2.js.map +0 -1
- package/dist/cdn/chunks/fr-CI7OJoql.js.map +0 -1
- package/dist/cdn/chunks/ja-DhlWUfke.js.map +0 -1
- package/dist/cdn/chunks/nl-D8y5OWGB.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DMCbUBvJ.js.map +0 -1
- package/dist/en-BvOjRLiw.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as e, H as t, I as n, N as r, Q as i, S as a, at as o, b as s, d as c, f as l, g as u, h as d, l as f, lt as p, m, n as h, p as g } from "./draggable-IB4x6w2O.js";
|
|
2
|
-
import { b as _ } from "./useEditorCore-
|
|
2
|
+
import { b as _ } from "./useEditorCore-BTKqlRIg.js";
|
|
3
3
|
import { J as v, Z as y } from "./keys-DCWeHkSF.js";
|
|
4
4
|
import { n as b } from "./usePopoverPosition-DGXjXKjM.js";
|
|
5
5
|
//#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -49,4 +49,4 @@ var x = ["data-tpl-theme"], S = /* @__PURE__ */ a({
|
|
|
49
49
|
//#endregion
|
|
50
50
|
export { S as t };
|
|
51
51
|
|
|
52
|
-
//# sourceMappingURL=TplModal-
|
|
52
|
+
//# sourceMappingURL=TplModal-CFi-Psf7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TplModal-BbHRUc1Y.js","names":["_unref","_openBlock","_createBlock","_Teleport","_createVNode","_Transition","_withCtx","_createElementBlock","_normalizeStyle","_withModifiers","_createElementVNode","_renderSlot","_createCommentVNode","_sfc_main","inject","withCtx","renderSlot","openBlock","ref","defineComponent","unref","createVNode","Teleport","computed","createElementBlock","createCommentVNode","withModifiers","normalizeStyle","Transition","createBaseVNode","useFocusTrap","THEME_STYLES_KEY","UI_THEME_KEY","usePopoverRoot","_hoisted_1","TplModal_default","__emit","props","__props","emit","dialogRef","isVisible","tplUiTheme","themeStyles","popoverRoot","handleKeydown","event","createBlock","_cache","_ctx"],"sources":["../../../src/components/TplModal.vue","../../../src/components/TplModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useFocusTrap } from \"../composables\";\nimport { usePopoverRoot } from \"../composables/usePopoverRoot\";\nimport { THEME_STYLES_KEY, UI_THEME_KEY } from \"../keys\";\nimport { computed, inject, ref } from \"vue\";\n\nconst props = defineProps<{\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n}>();\n\nconst dialogRef = ref<HTMLElement | null>(null);\nconst isVisible = computed(() => props.visible);\nuseFocusTrap(dialogRef, isVisible);\n\nconst tplUiTheme = inject(UI_THEME_KEY);\n\n// The backdrop below carries the bare `tpl` class, which re-declares every\n// `--tpl-*` token from the base `.tpl` rule. A custom property declared on an\n// element beats one inherited from an ancestor, so that re-declaration shadows\n// the consumer's `theme` config — which lives as inline styles on the editor\n// root — for this whole teleported subtree. Re-applying `themeStyles` here is\n// what restores it, and doing it on the backdrop covers every dialog rendered\n// through this wrapper rather than each one remembering to. `data-tpl-theme`\n// does the same job for the dark token block. See the invariant in\n// `tests/theme-token-scope.test.ts` (issue #487).\nconst themeStyles = inject(THEME_STYLES_KEY, null);\nconst popoverRoot = usePopoverRoot();\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Escape\") {\n emit(\"close\");\n }\n emit(\"keydown\", event);\n}\n</script>\n\n<template>\n <Teleport v-if=\"popoverRoot\" :to=\"popoverRoot\">\n <Transition\n enter-active-class=\"tpl:transition\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition tpl:duration-100\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <!-- The backdrop is the reference box every slotted panel caps against,\n which is why it owns the gutter (`p-4`) rather than each panel\n carrying its own margin. `inset-0` gives it a definite height; the\n wrapper below spans that height so a panel's percentage cap\n (`max-h-[90%]` / `max-h-[80%]`) has an unbroken chain to resolve\n through. Those numbers are the `vh` values they replaced, so an\n untrapped editor renders exactly as before.\n\n Panels must never cap in `vh`. `fixed` covers the viewport only while\n nothing traps it, and an ancestor with `transform`, `filter`,\n `backdrop-filter`, `will-change: transform`, `contain: paint`,\n `container-type` or a transform animation becomes the containing\n block for fixed descendants. The editor is embedded in someone\n else's page, so any of those can sit above it: `inset-0` then\n resolves to that ancestor's box while a `vh` cap still resolves to\n the viewport, and the panel overflows a container that usually also\n has `overflow: hidden`. That is issue #575 — in a 420px host inside a\n 720px viewport, a 648px panel clipped ~113px off both the top and the\n bottom, with no scrollbar to reach the buttons. Capping against the\n backdrop is self-correcting whether or not the trap is present.\n Locked by `tests/overlay-height-scope.test.ts`.\n\n The padding belongs here and not on the wrapper: preflight is\n omitted, so non-form elements keep `content-box` and padding on an\n `h-full` element would add to 100% and overflow by exactly the\n padding (the trap behind issue #115). Insets size the backdrop's\n border box, so padding here safely shrinks the content box instead. -->\n <!-- `z-10` is the one z-index inside `.tpl-popover-root` that has to be\n real. The root is a single stacking context, so its residents\n otherwise paint in teleport-anchor order — and this modal's anchor is\n established when the editor mounts, while a link dialog's is\n established later, when a paragraph enters edit mode. Without a\n number, a picker opened FROM that dialog renders behind it. Any\n positive value beats the `auto` siblings; 10 stays far below the\n suggestion popup (9999) and `SmallScreenNotice` (10001), and cannot\n escape the root's own 10000 either way. -->\n <div\n v-if=\"visible\"\n :data-tpl-theme=\"tplUiTheme\"\n class=\"tpl tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4\"\n style=\"\n background-color: var(--tpl-overlay);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n \"\n :style=\"themeStyles\"\n @click.self=\"emit('close')\"\n @keydown=\"handleKeydown\"\n >\n <!-- `h-full` only, deliberately no `w-full`: height is what has to\n become definite, and widening this element would change what\n `w-full` on a panel resolves against. Panels are shrink-to-fit\n horizontally — the test-email dialog stays compact until its\n preview opens, and the saved-blocks browser pins an explicit width\n precisely because this wrapper is shrink-to-fit. Constraining one\n axis leaves all of that intact.\n\n It repeats `@click.self` because it now covers the backdrop's full\n height: clicks in the gap above or below the panel land here, so\n without it click-outside-to-close would only work on the padding\n ring and the columns either side. -->\n <div\n ref=\"dialogRef\"\n class=\"tpl:flex tpl:h-full tpl:items-center tpl:justify-center\"\n @click.self=\"emit('close')\"\n >\n <slot />\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n","<script setup lang=\"ts\">\nimport { useFocusTrap } from \"../composables\";\nimport { usePopoverRoot } from \"../composables/usePopoverRoot\";\nimport { THEME_STYLES_KEY, UI_THEME_KEY } from \"../keys\";\nimport { computed, inject, ref } from \"vue\";\n\nconst props = defineProps<{\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n}>();\n\nconst dialogRef = ref<HTMLElement | null>(null);\nconst isVisible = computed(() => props.visible);\nuseFocusTrap(dialogRef, isVisible);\n\nconst tplUiTheme = inject(UI_THEME_KEY);\n\n// The backdrop below carries the bare `tpl` class, which re-declares every\n// `--tpl-*` token from the base `.tpl` rule. A custom property declared on an\n// element beats one inherited from an ancestor, so that re-declaration shadows\n// the consumer's `theme` config — which lives as inline styles on the editor\n// root — for this whole teleported subtree. Re-applying `themeStyles` here is\n// what restores it, and doing it on the backdrop covers every dialog rendered\n// through this wrapper rather than each one remembering to. `data-tpl-theme`\n// does the same job for the dark token block. See the invariant in\n// `tests/theme-token-scope.test.ts` (issue #487).\nconst themeStyles = inject(THEME_STYLES_KEY, null);\nconst popoverRoot = usePopoverRoot();\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Escape\") {\n emit(\"close\");\n }\n emit(\"keydown\", event);\n}\n</script>\n\n<template>\n <Teleport v-if=\"popoverRoot\" :to=\"popoverRoot\">\n <Transition\n enter-active-class=\"tpl:transition\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition tpl:duration-100\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <!-- The backdrop is the reference box every slotted panel caps against,\n which is why it owns the gutter (`p-4`) rather than each panel\n carrying its own margin. `inset-0` gives it a definite height; the\n wrapper below spans that height so a panel's percentage cap\n (`max-h-[90%]` / `max-h-[80%]`) has an unbroken chain to resolve\n through. Those numbers are the `vh` values they replaced, so an\n untrapped editor renders exactly as before.\n\n Panels must never cap in `vh`. `fixed` covers the viewport only while\n nothing traps it, and an ancestor with `transform`, `filter`,\n `backdrop-filter`, `will-change: transform`, `contain: paint`,\n `container-type` or a transform animation becomes the containing\n block for fixed descendants. The editor is embedded in someone\n else's page, so any of those can sit above it: `inset-0` then\n resolves to that ancestor's box while a `vh` cap still resolves to\n the viewport, and the panel overflows a container that usually also\n has `overflow: hidden`. That is issue #575 — in a 420px host inside a\n 720px viewport, a 648px panel clipped ~113px off both the top and the\n bottom, with no scrollbar to reach the buttons. Capping against the\n backdrop is self-correcting whether or not the trap is present.\n Locked by `tests/overlay-height-scope.test.ts`.\n\n The padding belongs here and not on the wrapper: preflight is\n omitted, so non-form elements keep `content-box` and padding on an\n `h-full` element would add to 100% and overflow by exactly the\n padding (the trap behind issue #115). Insets size the backdrop's\n border box, so padding here safely shrinks the content box instead. -->\n <!-- `z-10` is the one z-index inside `.tpl-popover-root` that has to be\n real. The root is a single stacking context, so its residents\n otherwise paint in teleport-anchor order — and this modal's anchor is\n established when the editor mounts, while a link dialog's is\n established later, when a paragraph enters edit mode. Without a\n number, a picker opened FROM that dialog renders behind it. Any\n positive value beats the `auto` siblings; 10 stays far below the\n suggestion popup (9999) and `SmallScreenNotice` (10001), and cannot\n escape the root's own 10000 either way. -->\n <div\n v-if=\"visible\"\n :data-tpl-theme=\"tplUiTheme\"\n class=\"tpl tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4\"\n style=\"\n background-color: var(--tpl-overlay);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n \"\n :style=\"themeStyles\"\n @click.self=\"emit('close')\"\n @keydown=\"handleKeydown\"\n >\n <!-- `h-full` only, deliberately no `w-full`: height is what has to\n become definite, and widening this element would change what\n `w-full` on a panel resolves against. Panels are shrink-to-fit\n horizontally — the test-email dialog stays compact until its\n preview opens, and the saved-blocks browser pins an explicit width\n precisely because this wrapper is shrink-to-fit. Constraining one\n axis leaves all of that intact.\n\n It repeats `@click.self` because it now covers the backdrop's full\n height: clicks in the gap above or below the panel land here, so\n without it click-outside-to-close would only work on the padding\n ring and the columns either side. -->\n <div\n ref=\"dialogRef\"\n class=\"tpl:flex tpl:h-full tpl:items-center tpl:justify-center\"\n @click.self=\"emit('close')\"\n >\n <slot />\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n"],"mappings":";;;;;;;;;;EAMA,IAAMqC,IAAQC,GAIRC,IAAOH,GAKPI,IAAYtB,EAAwB,IAAI,GACxCuB,IAAYlB,QAAec,EAAM,OAAO;EAC9C,EAAaG,GAAWC,CAAS;EAEjC,IAAMC,IAAa5B,EAAOkB,CAAY,GAWhCW,IAAc7B,EAAOiB,GAAkB,IAAI,GAC3Ca,IAAcX,EAAe;EAEnC,SAASY,EAAc,GAA4B;GAIjD,AAHIC,EAAM,QAAQ,YAChBP,EAAK,OAAO,GAEdA,EAAK,WAAWO,CAAK;EACvB;mBAIkB9C,EAAA4C,CAAA,KAAhB3C,EAAA,GAAAC,EA+EWC,GAAA;;GA/EmB,IAAIH,EAAA4C,CAAA;EAChCxC,GAAAA,CAAAA,EA6EaC,GAAA;GA5EX,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;GACf,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;;GAsCf,SAAAC,QAgCM,CA/BEgC,EAAA,WADRrC,EAAA,GAAAM,EAgCM,OAAA;;IA9BH,kBAAgBP,EAAA0C,CAAA;IACjB,OAAM;IACN,OAIClC,EAAA,CAJD;KAAA,oBAAA;KAAA,mBAAA;KAAA,2BAAA;IAAA,GAKQR,EAAA2C,CAAA,CAAW,CAAA;IAClB,SAAK,AAAAK,EAAA,OAAAvC,GAAA,MAAO8B,EAAI,OAAA,GAAA,CAAA,MAAA,CAAA;IAChB,WAASM;GAcVnC,GAAAA,CAAAA,EAMM,OAAA;IALA,SAAA;IAAJ,KAAI8B;IACJ,OAAM;IACL,SAAK,AAAAQ,EAAA,OAAAvC,GAAA,MAAO8B,EAAI,OAAA,GAAA,CAAA,MAAA,CAAA;GAEjB5B,GAAAA,CAAAA,EAAQsC,EAAA,QAAA,SAAA,CAAA,GAAA,GAAA,CAAA,GAAA,IAAAf,CAAA,KAAAT,EAAA,IAAA,EAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"TplModal-CFi-Psf7.js","names":["_unref","_openBlock","_createBlock","_Teleport","_createVNode","_Transition","_withCtx","_createElementBlock","_normalizeStyle","_withModifiers","_createElementVNode","_renderSlot","_createCommentVNode","_sfc_main","inject","withCtx","renderSlot","openBlock","ref","defineComponent","unref","createVNode","Teleport","computed","createElementBlock","createCommentVNode","withModifiers","normalizeStyle","Transition","createBaseVNode","useFocusTrap","THEME_STYLES_KEY","UI_THEME_KEY","usePopoverRoot","_hoisted_1","TplModal_default","__emit","props","__props","emit","dialogRef","isVisible","tplUiTheme","themeStyles","popoverRoot","handleKeydown","event","createBlock","_cache","_ctx"],"sources":["../../../src/components/TplModal.vue","../../../src/components/TplModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useFocusTrap } from \"../composables\";\nimport { usePopoverRoot } from \"../composables/usePopoverRoot\";\nimport { THEME_STYLES_KEY, UI_THEME_KEY } from \"../keys\";\nimport { computed, inject, ref } from \"vue\";\n\nconst props = defineProps<{\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n}>();\n\nconst dialogRef = ref<HTMLElement | null>(null);\nconst isVisible = computed(() => props.visible);\nuseFocusTrap(dialogRef, isVisible);\n\nconst tplUiTheme = inject(UI_THEME_KEY);\n\n// The backdrop below carries the bare `tpl` class, which re-declares every\n// `--tpl-*` token from the base `.tpl` rule. A custom property declared on an\n// element beats one inherited from an ancestor, so that re-declaration shadows\n// the consumer's `theme` config — which lives as inline styles on the editor\n// root — for this whole teleported subtree. Re-applying `themeStyles` here is\n// what restores it, and doing it on the backdrop covers every dialog rendered\n// through this wrapper rather than each one remembering to. `data-tpl-theme`\n// does the same job for the dark token block. See the invariant in\n// `tests/theme-token-scope.test.ts` (issue #487).\nconst themeStyles = inject(THEME_STYLES_KEY, null);\nconst popoverRoot = usePopoverRoot();\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Escape\") {\n emit(\"close\");\n }\n emit(\"keydown\", event);\n}\n</script>\n\n<template>\n <Teleport v-if=\"popoverRoot\" :to=\"popoverRoot\">\n <Transition\n enter-active-class=\"tpl:transition\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition tpl:duration-100\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <!-- The backdrop is the reference box every slotted panel caps against,\n which is why it owns the gutter (`p-4`) rather than each panel\n carrying its own margin. `inset-0` gives it a definite height; the\n wrapper below spans that height so a panel's percentage cap\n (`max-h-[90%]` / `max-h-[80%]`) has an unbroken chain to resolve\n through. Those numbers are the `vh` values they replaced, so an\n untrapped editor renders exactly as before.\n\n Panels must never cap in `vh`. `fixed` covers the viewport only while\n nothing traps it, and an ancestor with `transform`, `filter`,\n `backdrop-filter`, `will-change: transform`, `contain: paint`,\n `container-type` or a transform animation becomes the containing\n block for fixed descendants. The editor is embedded in someone\n else's page, so any of those can sit above it: `inset-0` then\n resolves to that ancestor's box while a `vh` cap still resolves to\n the viewport, and the panel overflows a container that usually also\n has `overflow: hidden`. That is issue #575 — in a 420px host inside a\n 720px viewport, a 648px panel clipped ~113px off both the top and the\n bottom, with no scrollbar to reach the buttons. Capping against the\n backdrop is self-correcting whether or not the trap is present.\n Locked by `tests/overlay-height-scope.test.ts`.\n\n The padding belongs here and not on the wrapper: preflight is\n omitted, so non-form elements keep `content-box` and padding on an\n `h-full` element would add to 100% and overflow by exactly the\n padding (the trap behind issue #115). Insets size the backdrop's\n border box, so padding here safely shrinks the content box instead. -->\n <!-- `z-10` is the one z-index inside `.tpl-popover-root` that has to be\n real. The root is a single stacking context, so its residents\n otherwise paint in teleport-anchor order — and this modal's anchor is\n established when the editor mounts, while a link dialog's is\n established later, when a paragraph enters edit mode. Without a\n number, a picker opened FROM that dialog renders behind it. Any\n positive value beats the `auto` siblings; 10 stays far below the\n suggestion popup (9999) and `SmallScreenNotice` (10001), and cannot\n escape the root's own 10000 either way. -->\n <div\n v-if=\"visible\"\n :data-tpl-theme=\"tplUiTheme\"\n class=\"tpl tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4\"\n style=\"\n background-color: var(--tpl-overlay);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n \"\n :style=\"themeStyles\"\n @click.self=\"emit('close')\"\n @keydown=\"handleKeydown\"\n >\n <!-- `h-full` only, deliberately no `w-full`: height is what has to\n become definite, and widening this element would change what\n `w-full` on a panel resolves against. Panels are shrink-to-fit\n horizontally — the test-email dialog stays compact until its\n preview opens, and the saved-blocks browser pins an explicit width\n precisely because this wrapper is shrink-to-fit. Constraining one\n axis leaves all of that intact.\n\n It repeats `@click.self` because it now covers the backdrop's full\n height: clicks in the gap above or below the panel land here, so\n without it click-outside-to-close would only work on the padding\n ring and the columns either side. -->\n <div\n ref=\"dialogRef\"\n class=\"tpl:flex tpl:h-full tpl:items-center tpl:justify-center\"\n @click.self=\"emit('close')\"\n >\n <slot />\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n","<script setup lang=\"ts\">\nimport { useFocusTrap } from \"../composables\";\nimport { usePopoverRoot } from \"../composables/usePopoverRoot\";\nimport { THEME_STYLES_KEY, UI_THEME_KEY } from \"../keys\";\nimport { computed, inject, ref } from \"vue\";\n\nconst props = defineProps<{\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n}>();\n\nconst dialogRef = ref<HTMLElement | null>(null);\nconst isVisible = computed(() => props.visible);\nuseFocusTrap(dialogRef, isVisible);\n\nconst tplUiTheme = inject(UI_THEME_KEY);\n\n// The backdrop below carries the bare `tpl` class, which re-declares every\n// `--tpl-*` token from the base `.tpl` rule. A custom property declared on an\n// element beats one inherited from an ancestor, so that re-declaration shadows\n// the consumer's `theme` config — which lives as inline styles on the editor\n// root — for this whole teleported subtree. Re-applying `themeStyles` here is\n// what restores it, and doing it on the backdrop covers every dialog rendered\n// through this wrapper rather than each one remembering to. `data-tpl-theme`\n// does the same job for the dark token block. See the invariant in\n// `tests/theme-token-scope.test.ts` (issue #487).\nconst themeStyles = inject(THEME_STYLES_KEY, null);\nconst popoverRoot = usePopoverRoot();\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Escape\") {\n emit(\"close\");\n }\n emit(\"keydown\", event);\n}\n</script>\n\n<template>\n <Teleport v-if=\"popoverRoot\" :to=\"popoverRoot\">\n <Transition\n enter-active-class=\"tpl:transition\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition tpl:duration-100\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <!-- The backdrop is the reference box every slotted panel caps against,\n which is why it owns the gutter (`p-4`) rather than each panel\n carrying its own margin. `inset-0` gives it a definite height; the\n wrapper below spans that height so a panel's percentage cap\n (`max-h-[90%]` / `max-h-[80%]`) has an unbroken chain to resolve\n through. Those numbers are the `vh` values they replaced, so an\n untrapped editor renders exactly as before.\n\n Panels must never cap in `vh`. `fixed` covers the viewport only while\n nothing traps it, and an ancestor with `transform`, `filter`,\n `backdrop-filter`, `will-change: transform`, `contain: paint`,\n `container-type` or a transform animation becomes the containing\n block for fixed descendants. The editor is embedded in someone\n else's page, so any of those can sit above it: `inset-0` then\n resolves to that ancestor's box while a `vh` cap still resolves to\n the viewport, and the panel overflows a container that usually also\n has `overflow: hidden`. That is issue #575 — in a 420px host inside a\n 720px viewport, a 648px panel clipped ~113px off both the top and the\n bottom, with no scrollbar to reach the buttons. Capping against the\n backdrop is self-correcting whether or not the trap is present.\n Locked by `tests/overlay-height-scope.test.ts`.\n\n The padding belongs here and not on the wrapper: preflight is\n omitted, so non-form elements keep `content-box` and padding on an\n `h-full` element would add to 100% and overflow by exactly the\n padding (the trap behind issue #115). Insets size the backdrop's\n border box, so padding here safely shrinks the content box instead. -->\n <!-- `z-10` is the one z-index inside `.tpl-popover-root` that has to be\n real. The root is a single stacking context, so its residents\n otherwise paint in teleport-anchor order — and this modal's anchor is\n established when the editor mounts, while a link dialog's is\n established later, when a paragraph enters edit mode. Without a\n number, a picker opened FROM that dialog renders behind it. Any\n positive value beats the `auto` siblings; 10 stays far below the\n suggestion popup (9999) and `SmallScreenNotice` (10001), and cannot\n escape the root's own 10000 either way. -->\n <div\n v-if=\"visible\"\n :data-tpl-theme=\"tplUiTheme\"\n class=\"tpl tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4\"\n style=\"\n background-color: var(--tpl-overlay);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n \"\n :style=\"themeStyles\"\n @click.self=\"emit('close')\"\n @keydown=\"handleKeydown\"\n >\n <!-- `h-full` only, deliberately no `w-full`: height is what has to\n become definite, and widening this element would change what\n `w-full` on a panel resolves against. Panels are shrink-to-fit\n horizontally — the test-email dialog stays compact until its\n preview opens, and the saved-blocks browser pins an explicit width\n precisely because this wrapper is shrink-to-fit. Constraining one\n axis leaves all of that intact.\n\n It repeats `@click.self` because it now covers the backdrop's full\n height: clicks in the gap above or below the panel land here, so\n without it click-outside-to-close would only work on the padding\n ring and the columns either side. -->\n <div\n ref=\"dialogRef\"\n class=\"tpl:flex tpl:h-full tpl:items-center tpl:justify-center\"\n @click.self=\"emit('close')\"\n >\n <slot />\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n"],"mappings":";;;;;;;;;;EAMA,IAAMqC,IAAQC,GAIRC,IAAOH,GAKPI,IAAYtB,EAAwB,IAAI,GACxCuB,IAAYlB,QAAec,EAAM,OAAO;EAC9C,EAAaG,GAAWC,CAAS;EAEjC,IAAMC,IAAa5B,EAAOkB,CAAY,GAWhCW,IAAc7B,EAAOiB,GAAkB,IAAI,GAC3Ca,IAAcX,EAAe;EAEnC,SAASY,EAAc,GAA4B;GAIjD,AAHIC,EAAM,QAAQ,YAChBP,EAAK,OAAO,GAEdA,EAAK,WAAWO,CAAK;EACvB;mBAIkB9C,EAAA4C,CAAA,KAAhB3C,EAAA,GAAAC,EA+EWC,GAAA;;GA/EmB,IAAIH,EAAA4C,CAAA;EAChCxC,GAAAA,CAAAA,EA6EaC,GAAA;GA5EX,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;GACf,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;;GAsCf,SAAAC,QAgCM,CA/BEgC,EAAA,WADRrC,EAAA,GAAAM,EAgCM,OAAA;;IA9BH,kBAAgBP,EAAA0C,CAAA;IACjB,OAAM;IACN,OAIClC,EAAA,CAJD;KAAA,oBAAA;KAAA,mBAAA;KAAA,2BAAA;IAAA,GAKQR,EAAA2C,CAAA,CAAW,CAAA;IAClB,SAAK,AAAAK,EAAA,OAAAvC,GAAA,MAAO8B,EAAI,OAAA,GAAA,CAAA,MAAA,CAAA;IAChB,WAASM;GAcVnC,GAAAA,CAAAA,EAMM,OAAA;IALA,SAAA;IAAJ,KAAI8B;IACJ,OAAM;IACL,SAAK,AAAAQ,EAAA,OAAAvC,GAAA,MAAO8B,EAAI,OAAA,GAAA,CAAA,MAAA,CAAA;GAEjB5B,GAAAA,CAAAA,EAAQsC,EAAA,QAAA,SAAA,CAAA,GAAA,GAAA,CAAA,GAAA,IAAAf,CAAA,KAAAT,EAAA,IAAA,EAAA,CAAA,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { E as e, F as t, H as n, N as r, Q as i, S as a, at as o, b as s, ct as
|
|
|
2
2
|
import { t as v } from "./dist-CXB2_kBa.js";
|
|
3
3
|
import { X as y } from "./keys-DCWeHkSF.js";
|
|
4
4
|
import { t as b } from "./useI18n-CyO_Nmca.js";
|
|
5
|
-
import { At as x, Ft as S, It as C, Lt as w, at as T } from "./icons-
|
|
5
|
+
import { At as x, Ft as S, It as C, Lt as w, at as T } from "./icons-BrAyaJ0T.js";
|
|
6
6
|
import { t as E } from "./formatAbsoluteDateTime-DMmop3C-.js";
|
|
7
7
|
import { t as ee } from "./formatRelativeTime-CtUU-QZ8.js";
|
|
8
8
|
//#region src/components/VersionHistoryMenu.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -147,4 +147,4 @@ var D = [
|
|
|
147
147
|
//#endregion
|
|
148
148
|
export { B as default };
|
|
149
149
|
|
|
150
|
-
//# sourceMappingURL=VersionHistoryMenu-
|
|
150
|
+
//# sourceMappingURL=VersionHistoryMenu-1bfCr14E.js.map
|
package/dist/cdn/chunks/{VersionHistoryMenu-C_bBKOYU.js.map → VersionHistoryMenu-1bfCr14E.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionHistoryMenu-C_bBKOYU.js","names":["_openBlock","_createElementBlock","_createElementVNode","_unref","_withModifiers","_createVNode","_normalizeClass","_Transition","_withCtx","_toDisplayString","_Fragment","_renderList","_createCommentVNode","_createTextVNode","_sfc_main","inject","renderList","withCtx","openBlock","ref","defineComponent","unref","createVNode","normalizeClass","computed","createElementBlock","createCommentVNode","withModifiers","Transition","createBaseVNode","Fragment","toDisplayString","createTextVNode","onClickOutside","UI_LOCALE_KEY","useI18n","Clock","ChevronRight","ChevronLeft","ChevronDown","LoaderCircle","formatAbsoluteDateTime","formatRelativeTime","_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","VersionHistoryMenu_default","__emit","props","__props","emit","uiLocale","isOpen","dropdownRef","currentIndex","v","canGoNewer","canGoOlder","goNewer","goOlder","toggleDropdown","selectVersion","version","formatDate","result","dateString","t","format"],"sources":["../../../src/components/VersionHistoryMenu.vue","../../../src/components/VersionHistoryMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The header's version-history control: step older / newer through the list, or\n * open the dropdown and jump straight to one.\n *\n * Shared by both editors. Reads the `TemplateVersion` contract, so any\n * provider drives it.\n */\nimport { computed, inject, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport {\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n Clock,\n LoaderCircle,\n} from \"@lucide/vue\";\nimport type { TemplateVersion } from \"@templatical/types\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { formatAbsoluteDateTime } from \"../utils/formatAbsoluteDateTime\";\nimport { formatRelativeTime } from \"../utils/formatRelativeTime\";\nimport { UI_LOCALE_KEY } from \"../keys\";\n\nconst props = defineProps<{\n versions: TemplateVersion[];\n isLoading: boolean;\n isRestoring: boolean;\n /** Which version is on the canvas, or `null` while editing normally. */\n previewingId: string | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"open\"): void;\n (e: \"navigate\", version: TemplateVersion): void;\n}>();\n\nconst { t, format } = useI18n();\nconst uiLocale = inject(UI_LOCALE_KEY, undefined);\n\nconst isOpen = ref(false);\nconst dropdownRef = ref<HTMLElement | null>(null);\n\n/**\n * Position in the list (0 = newest), derived from what is actually previewed\n * rather than tracked locally. A local index went stale the moment the user\n * cancelled a preview — the arrows then stepped from wherever they had left off\n * instead of from the top.\n */\nconst currentIndex = computed(() =>\n props.previewingId === null\n ? -1\n : props.versions.findIndex((v) => v.id === props.previewingId),\n);\n\nconst canGoNewer = computed(\n () => currentIndex.value > 0 && !props.isRestoring && !props.isLoading,\n);\n\nconst canGoOlder = computed(\n () =>\n currentIndex.value < props.versions.length - 1 &&\n props.versions.length > 0 &&\n !props.isRestoring &&\n !props.isLoading,\n);\n\nfunction goNewer(): void {\n if (!canGoNewer.value) return;\n emit(\"navigate\", props.versions[currentIndex.value - 1]);\n}\n\nfunction goOlder(): void {\n if (!canGoOlder.value) return;\n emit(\"navigate\", props.versions[currentIndex.value + 1]);\n}\n\nfunction toggleDropdown(): void {\n isOpen.value = !isOpen.value;\n // Always on open, never only when empty: history grows behind the user's back\n // (every save may record one), so a list fetched once would go stale silently.\n if (isOpen.value) emit(\"open\");\n}\n\nfunction selectVersion(version: TemplateVersion): void {\n emit(\"navigate\", version);\n isOpen.value = false;\n}\n\nfunction formatDate(dateString: string): string {\n const result = formatRelativeTime(dateString, t.time, format, 7);\n if (result !== null) return result;\n\n // Past the relative window, `Intl` builds the label — in the EDITOR's locale,\n // not the browser's, which is what put \"Mar 4\" in a German menu.\n return formatAbsoluteDateTime(dateString, uiLocale, {\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n}\n\nonClickOutside(dropdownRef, () => {\n isOpen.value = false;\n});\n</script>\n\n<template>\n <div\n ref=\"dropdownRef\"\n class=\"tpl:relative tpl:flex tpl:items-center tpl:gap-0.5\"\n data-testid=\"version-history\"\n >\n <!-- Step to an older version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-older\"\n :disabled=\"!canGoOlder\"\n :title=\"t.versionHistory.olderVersion\"\n :aria-label=\"t.versionHistory.olderVersion\"\n @click.stop=\"goOlder\"\n >\n <ChevronLeft :size=\"14\" :stroke-width=\"2\" />\n </button>\n\n <!-- History dropdown toggle -->\n <button\n class=\"tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-toggle\"\n :aria-expanded=\"isOpen\"\n :title=\"t.versionHistory.tooltip\"\n :aria-label=\"t.versionHistory.tooltip\"\n @click.stop=\"toggleDropdown\"\n >\n <Clock :size=\"16\" :stroke-width=\"1.5\" />\n <ChevronDown\n class=\"tpl:transition-transform\"\n :class=\"{ 'tpl:rotate-180': isOpen }\"\n :size=\"10\"\n :stroke-width=\"2\"\n />\n </button>\n\n <Transition name=\"tpl-dropdown\">\n <div\n v-if=\"isOpen\"\n class=\"tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n data-testid=\"version-history-dropdown\"\n >\n <div\n class=\"tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]\"\n >\n {{ t.versionHistory.dropdownTitle }}\n </div>\n\n <div\n v-if=\"isLoading && versions.length === 0\"\n class=\"tpl:flex tpl:items-center tpl:justify-center tpl:py-8\"\n role=\"status\"\n aria-busy=\"true\"\n >\n <LoaderCircle\n class=\"tpl:animate-spin tpl:text-[var(--tpl-primary)]\"\n :size=\"20\"\n :stroke-width=\"2\"\n />\n </div>\n\n <div\n v-else-if=\"versions.length === 0\"\n class=\"tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-empty\"\n >\n {{ t.versionHistory.empty }}\n </div>\n\n <div v-else class=\"tpl:max-h-64 tpl:overflow-y-auto\">\n <button\n v-for=\"version in versions\"\n :key=\"version.id\"\n class=\"tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-l-2 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:hover:border-l-[var(--tpl-primary)] tpl:hover:bg-[var(--tpl-bg-hover)]\"\n :class=\"\n version.id === previewingId\n ? 'tpl:border-l-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-active)]'\n : 'tpl:border-l-transparent'\n \"\n style=\"background-color: transparent\"\n data-testid=\"version-history-entry\"\n :data-version-id=\"version.id\"\n :disabled=\"isRestoring\"\n @click=\"selectVersion(version)\"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-0.5\">\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]\"\n >\n <span>{{\n version.label ?? formatDate(version.createdAt)\n }}</span>\n <span\n v-if=\"version.isAutomatic\"\n class=\"tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-xs tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.versionHistory.auto }}\n </span>\n </div>\n <!-- A labelled version still shows when it was taken, and by whom\n if the store tracks that; an unlabelled one already leads with\n the date, so the line would repeat it. -->\n <div\n v-if=\"version.label || version.author?.name\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <template v-if=\"version.label\">{{\n formatDate(version.createdAt)\n }}</template>\n <template v-if=\"version.label && version.author?.name\">\n ·\n </template>\n <template v-if=\"version.author?.name\">{{\n version.author.name\n }}</template>\n </div>\n </div>\n </button>\n </div>\n </div>\n </Transition>\n\n <!-- Step to a newer version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-newer\"\n :disabled=\"!canGoNewer\"\n :title=\"t.versionHistory.newerVersion\"\n :aria-label=\"t.versionHistory.newerVersion\"\n @click.stop=\"goNewer\"\n >\n <ChevronRight :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * The header's version-history control: step older / newer through the list, or\n * open the dropdown and jump straight to one.\n *\n * Shared by both editors. Reads the `TemplateVersion` contract, so any\n * provider drives it.\n */\nimport { computed, inject, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport {\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n Clock,\n LoaderCircle,\n} from \"@lucide/vue\";\nimport type { TemplateVersion } from \"@templatical/types\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { formatAbsoluteDateTime } from \"../utils/formatAbsoluteDateTime\";\nimport { formatRelativeTime } from \"../utils/formatRelativeTime\";\nimport { UI_LOCALE_KEY } from \"../keys\";\n\nconst props = defineProps<{\n versions: TemplateVersion[];\n isLoading: boolean;\n isRestoring: boolean;\n /** Which version is on the canvas, or `null` while editing normally. */\n previewingId: string | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"open\"): void;\n (e: \"navigate\", version: TemplateVersion): void;\n}>();\n\nconst { t, format } = useI18n();\nconst uiLocale = inject(UI_LOCALE_KEY, undefined);\n\nconst isOpen = ref(false);\nconst dropdownRef = ref<HTMLElement | null>(null);\n\n/**\n * Position in the list (0 = newest), derived from what is actually previewed\n * rather than tracked locally. A local index went stale the moment the user\n * cancelled a preview — the arrows then stepped from wherever they had left off\n * instead of from the top.\n */\nconst currentIndex = computed(() =>\n props.previewingId === null\n ? -1\n : props.versions.findIndex((v) => v.id === props.previewingId),\n);\n\nconst canGoNewer = computed(\n () => currentIndex.value > 0 && !props.isRestoring && !props.isLoading,\n);\n\nconst canGoOlder = computed(\n () =>\n currentIndex.value < props.versions.length - 1 &&\n props.versions.length > 0 &&\n !props.isRestoring &&\n !props.isLoading,\n);\n\nfunction goNewer(): void {\n if (!canGoNewer.value) return;\n emit(\"navigate\", props.versions[currentIndex.value - 1]);\n}\n\nfunction goOlder(): void {\n if (!canGoOlder.value) return;\n emit(\"navigate\", props.versions[currentIndex.value + 1]);\n}\n\nfunction toggleDropdown(): void {\n isOpen.value = !isOpen.value;\n // Always on open, never only when empty: history grows behind the user's back\n // (every save may record one), so a list fetched once would go stale silently.\n if (isOpen.value) emit(\"open\");\n}\n\nfunction selectVersion(version: TemplateVersion): void {\n emit(\"navigate\", version);\n isOpen.value = false;\n}\n\nfunction formatDate(dateString: string): string {\n const result = formatRelativeTime(dateString, t.time, format, 7);\n if (result !== null) return result;\n\n // Past the relative window, `Intl` builds the label — in the EDITOR's locale,\n // not the browser's, which is what put \"Mar 4\" in a German menu.\n return formatAbsoluteDateTime(dateString, uiLocale, {\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n}\n\nonClickOutside(dropdownRef, () => {\n isOpen.value = false;\n});\n</script>\n\n<template>\n <div\n ref=\"dropdownRef\"\n class=\"tpl:relative tpl:flex tpl:items-center tpl:gap-0.5\"\n data-testid=\"version-history\"\n >\n <!-- Step to an older version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-older\"\n :disabled=\"!canGoOlder\"\n :title=\"t.versionHistory.olderVersion\"\n :aria-label=\"t.versionHistory.olderVersion\"\n @click.stop=\"goOlder\"\n >\n <ChevronLeft :size=\"14\" :stroke-width=\"2\" />\n </button>\n\n <!-- History dropdown toggle -->\n <button\n class=\"tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-toggle\"\n :aria-expanded=\"isOpen\"\n :title=\"t.versionHistory.tooltip\"\n :aria-label=\"t.versionHistory.tooltip\"\n @click.stop=\"toggleDropdown\"\n >\n <Clock :size=\"16\" :stroke-width=\"1.5\" />\n <ChevronDown\n class=\"tpl:transition-transform\"\n :class=\"{ 'tpl:rotate-180': isOpen }\"\n :size=\"10\"\n :stroke-width=\"2\"\n />\n </button>\n\n <Transition name=\"tpl-dropdown\">\n <div\n v-if=\"isOpen\"\n class=\"tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n data-testid=\"version-history-dropdown\"\n >\n <div\n class=\"tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]\"\n >\n {{ t.versionHistory.dropdownTitle }}\n </div>\n\n <div\n v-if=\"isLoading && versions.length === 0\"\n class=\"tpl:flex tpl:items-center tpl:justify-center tpl:py-8\"\n role=\"status\"\n aria-busy=\"true\"\n >\n <LoaderCircle\n class=\"tpl:animate-spin tpl:text-[var(--tpl-primary)]\"\n :size=\"20\"\n :stroke-width=\"2\"\n />\n </div>\n\n <div\n v-else-if=\"versions.length === 0\"\n class=\"tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-empty\"\n >\n {{ t.versionHistory.empty }}\n </div>\n\n <div v-else class=\"tpl:max-h-64 tpl:overflow-y-auto\">\n <button\n v-for=\"version in versions\"\n :key=\"version.id\"\n class=\"tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-l-2 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:hover:border-l-[var(--tpl-primary)] tpl:hover:bg-[var(--tpl-bg-hover)]\"\n :class=\"\n version.id === previewingId\n ? 'tpl:border-l-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-active)]'\n : 'tpl:border-l-transparent'\n \"\n style=\"background-color: transparent\"\n data-testid=\"version-history-entry\"\n :data-version-id=\"version.id\"\n :disabled=\"isRestoring\"\n @click=\"selectVersion(version)\"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-0.5\">\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]\"\n >\n <span>{{\n version.label ?? formatDate(version.createdAt)\n }}</span>\n <span\n v-if=\"version.isAutomatic\"\n class=\"tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-xs tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.versionHistory.auto }}\n </span>\n </div>\n <!-- A labelled version still shows when it was taken, and by whom\n if the store tracks that; an unlabelled one already leads with\n the date, so the line would repeat it. -->\n <div\n v-if=\"version.label || version.author?.name\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <template v-if=\"version.label\">{{\n formatDate(version.createdAt)\n }}</template>\n <template v-if=\"version.label && version.author?.name\">\n ·\n </template>\n <template v-if=\"version.author?.name\">{{\n version.author.name\n }}</template>\n </div>\n </div>\n </button>\n </div>\n </div>\n </Transition>\n\n <!-- Step to a newer version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-newer\"\n :disabled=\"!canGoNewer\"\n :title=\"t.versionHistory.newerVersion\"\n :aria-label=\"t.versionHistory.newerVersion\"\n @click.stop=\"goNewer\"\n >\n <ChevronRight :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n</template>\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"VersionHistoryMenu-1bfCr14E.js","names":["_openBlock","_createElementBlock","_createElementVNode","_unref","_withModifiers","_createVNode","_normalizeClass","_Transition","_withCtx","_toDisplayString","_Fragment","_renderList","_createCommentVNode","_createTextVNode","_sfc_main","inject","renderList","withCtx","openBlock","ref","defineComponent","unref","createVNode","normalizeClass","computed","createElementBlock","createCommentVNode","withModifiers","Transition","createBaseVNode","Fragment","toDisplayString","createTextVNode","onClickOutside","UI_LOCALE_KEY","useI18n","Clock","ChevronRight","ChevronLeft","ChevronDown","LoaderCircle","formatAbsoluteDateTime","formatRelativeTime","_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","VersionHistoryMenu_default","__emit","props","__props","emit","uiLocale","isOpen","dropdownRef","currentIndex","v","canGoNewer","canGoOlder","goNewer","goOlder","toggleDropdown","selectVersion","version","formatDate","result","dateString","t","format"],"sources":["../../../src/components/VersionHistoryMenu.vue","../../../src/components/VersionHistoryMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The header's version-history control: step older / newer through the list, or\n * open the dropdown and jump straight to one.\n *\n * Shared by both editors. Reads the `TemplateVersion` contract, so any\n * provider drives it.\n */\nimport { computed, inject, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport {\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n Clock,\n LoaderCircle,\n} from \"@lucide/vue\";\nimport type { TemplateVersion } from \"@templatical/types\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { formatAbsoluteDateTime } from \"../utils/formatAbsoluteDateTime\";\nimport { formatRelativeTime } from \"../utils/formatRelativeTime\";\nimport { UI_LOCALE_KEY } from \"../keys\";\n\nconst props = defineProps<{\n versions: TemplateVersion[];\n isLoading: boolean;\n isRestoring: boolean;\n /** Which version is on the canvas, or `null` while editing normally. */\n previewingId: string | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"open\"): void;\n (e: \"navigate\", version: TemplateVersion): void;\n}>();\n\nconst { t, format } = useI18n();\nconst uiLocale = inject(UI_LOCALE_KEY, undefined);\n\nconst isOpen = ref(false);\nconst dropdownRef = ref<HTMLElement | null>(null);\n\n/**\n * Position in the list (0 = newest), derived from what is actually previewed\n * rather than tracked locally. A local index went stale the moment the user\n * cancelled a preview — the arrows then stepped from wherever they had left off\n * instead of from the top.\n */\nconst currentIndex = computed(() =>\n props.previewingId === null\n ? -1\n : props.versions.findIndex((v) => v.id === props.previewingId),\n);\n\nconst canGoNewer = computed(\n () => currentIndex.value > 0 && !props.isRestoring && !props.isLoading,\n);\n\nconst canGoOlder = computed(\n () =>\n currentIndex.value < props.versions.length - 1 &&\n props.versions.length > 0 &&\n !props.isRestoring &&\n !props.isLoading,\n);\n\nfunction goNewer(): void {\n if (!canGoNewer.value) return;\n emit(\"navigate\", props.versions[currentIndex.value - 1]);\n}\n\nfunction goOlder(): void {\n if (!canGoOlder.value) return;\n emit(\"navigate\", props.versions[currentIndex.value + 1]);\n}\n\nfunction toggleDropdown(): void {\n isOpen.value = !isOpen.value;\n // Always on open, never only when empty: history grows behind the user's back\n // (every save may record one), so a list fetched once would go stale silently.\n if (isOpen.value) emit(\"open\");\n}\n\nfunction selectVersion(version: TemplateVersion): void {\n emit(\"navigate\", version);\n isOpen.value = false;\n}\n\nfunction formatDate(dateString: string): string {\n const result = formatRelativeTime(dateString, t.time, format, 7);\n if (result !== null) return result;\n\n // Past the relative window, `Intl` builds the label — in the EDITOR's locale,\n // not the browser's, which is what put \"Mar 4\" in a German menu.\n return formatAbsoluteDateTime(dateString, uiLocale, {\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n}\n\nonClickOutside(dropdownRef, () => {\n isOpen.value = false;\n});\n</script>\n\n<template>\n <div\n ref=\"dropdownRef\"\n class=\"tpl:relative tpl:flex tpl:items-center tpl:gap-0.5\"\n data-testid=\"version-history\"\n >\n <!-- Step to an older version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-older\"\n :disabled=\"!canGoOlder\"\n :title=\"t.versionHistory.olderVersion\"\n :aria-label=\"t.versionHistory.olderVersion\"\n @click.stop=\"goOlder\"\n >\n <ChevronLeft :size=\"14\" :stroke-width=\"2\" />\n </button>\n\n <!-- History dropdown toggle -->\n <button\n class=\"tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-toggle\"\n :aria-expanded=\"isOpen\"\n :title=\"t.versionHistory.tooltip\"\n :aria-label=\"t.versionHistory.tooltip\"\n @click.stop=\"toggleDropdown\"\n >\n <Clock :size=\"16\" :stroke-width=\"1.5\" />\n <ChevronDown\n class=\"tpl:transition-transform\"\n :class=\"{ 'tpl:rotate-180': isOpen }\"\n :size=\"10\"\n :stroke-width=\"2\"\n />\n </button>\n\n <Transition name=\"tpl-dropdown\">\n <div\n v-if=\"isOpen\"\n class=\"tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n data-testid=\"version-history-dropdown\"\n >\n <div\n class=\"tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]\"\n >\n {{ t.versionHistory.dropdownTitle }}\n </div>\n\n <div\n v-if=\"isLoading && versions.length === 0\"\n class=\"tpl:flex tpl:items-center tpl:justify-center tpl:py-8\"\n role=\"status\"\n aria-busy=\"true\"\n >\n <LoaderCircle\n class=\"tpl:animate-spin tpl:text-[var(--tpl-primary)]\"\n :size=\"20\"\n :stroke-width=\"2\"\n />\n </div>\n\n <div\n v-else-if=\"versions.length === 0\"\n class=\"tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-empty\"\n >\n {{ t.versionHistory.empty }}\n </div>\n\n <div v-else class=\"tpl:max-h-64 tpl:overflow-y-auto\">\n <button\n v-for=\"version in versions\"\n :key=\"version.id\"\n class=\"tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-l-2 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:hover:border-l-[var(--tpl-primary)] tpl:hover:bg-[var(--tpl-bg-hover)]\"\n :class=\"\n version.id === previewingId\n ? 'tpl:border-l-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-active)]'\n : 'tpl:border-l-transparent'\n \"\n style=\"background-color: transparent\"\n data-testid=\"version-history-entry\"\n :data-version-id=\"version.id\"\n :disabled=\"isRestoring\"\n @click=\"selectVersion(version)\"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-0.5\">\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]\"\n >\n <span>{{\n version.label ?? formatDate(version.createdAt)\n }}</span>\n <span\n v-if=\"version.isAutomatic\"\n class=\"tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-xs tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.versionHistory.auto }}\n </span>\n </div>\n <!-- A labelled version still shows when it was taken, and by whom\n if the store tracks that; an unlabelled one already leads with\n the date, so the line would repeat it. -->\n <div\n v-if=\"version.label || version.author?.name\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <template v-if=\"version.label\">{{\n formatDate(version.createdAt)\n }}</template>\n <template v-if=\"version.label && version.author?.name\">\n ·\n </template>\n <template v-if=\"version.author?.name\">{{\n version.author.name\n }}</template>\n </div>\n </div>\n </button>\n </div>\n </div>\n </Transition>\n\n <!-- Step to a newer version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-newer\"\n :disabled=\"!canGoNewer\"\n :title=\"t.versionHistory.newerVersion\"\n :aria-label=\"t.versionHistory.newerVersion\"\n @click.stop=\"goNewer\"\n >\n <ChevronRight :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * The header's version-history control: step older / newer through the list, or\n * open the dropdown and jump straight to one.\n *\n * Shared by both editors. Reads the `TemplateVersion` contract, so any\n * provider drives it.\n */\nimport { computed, inject, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport {\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n Clock,\n LoaderCircle,\n} from \"@lucide/vue\";\nimport type { TemplateVersion } from \"@templatical/types\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { formatAbsoluteDateTime } from \"../utils/formatAbsoluteDateTime\";\nimport { formatRelativeTime } from \"../utils/formatRelativeTime\";\nimport { UI_LOCALE_KEY } from \"../keys\";\n\nconst props = defineProps<{\n versions: TemplateVersion[];\n isLoading: boolean;\n isRestoring: boolean;\n /** Which version is on the canvas, or `null` while editing normally. */\n previewingId: string | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"open\"): void;\n (e: \"navigate\", version: TemplateVersion): void;\n}>();\n\nconst { t, format } = useI18n();\nconst uiLocale = inject(UI_LOCALE_KEY, undefined);\n\nconst isOpen = ref(false);\nconst dropdownRef = ref<HTMLElement | null>(null);\n\n/**\n * Position in the list (0 = newest), derived from what is actually previewed\n * rather than tracked locally. A local index went stale the moment the user\n * cancelled a preview — the arrows then stepped from wherever they had left off\n * instead of from the top.\n */\nconst currentIndex = computed(() =>\n props.previewingId === null\n ? -1\n : props.versions.findIndex((v) => v.id === props.previewingId),\n);\n\nconst canGoNewer = computed(\n () => currentIndex.value > 0 && !props.isRestoring && !props.isLoading,\n);\n\nconst canGoOlder = computed(\n () =>\n currentIndex.value < props.versions.length - 1 &&\n props.versions.length > 0 &&\n !props.isRestoring &&\n !props.isLoading,\n);\n\nfunction goNewer(): void {\n if (!canGoNewer.value) return;\n emit(\"navigate\", props.versions[currentIndex.value - 1]);\n}\n\nfunction goOlder(): void {\n if (!canGoOlder.value) return;\n emit(\"navigate\", props.versions[currentIndex.value + 1]);\n}\n\nfunction toggleDropdown(): void {\n isOpen.value = !isOpen.value;\n // Always on open, never only when empty: history grows behind the user's back\n // (every save may record one), so a list fetched once would go stale silently.\n if (isOpen.value) emit(\"open\");\n}\n\nfunction selectVersion(version: TemplateVersion): void {\n emit(\"navigate\", version);\n isOpen.value = false;\n}\n\nfunction formatDate(dateString: string): string {\n const result = formatRelativeTime(dateString, t.time, format, 7);\n if (result !== null) return result;\n\n // Past the relative window, `Intl` builds the label — in the EDITOR's locale,\n // not the browser's, which is what put \"Mar 4\" in a German menu.\n return formatAbsoluteDateTime(dateString, uiLocale, {\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n}\n\nonClickOutside(dropdownRef, () => {\n isOpen.value = false;\n});\n</script>\n\n<template>\n <div\n ref=\"dropdownRef\"\n class=\"tpl:relative tpl:flex tpl:items-center tpl:gap-0.5\"\n data-testid=\"version-history\"\n >\n <!-- Step to an older version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-older\"\n :disabled=\"!canGoOlder\"\n :title=\"t.versionHistory.olderVersion\"\n :aria-label=\"t.versionHistory.olderVersion\"\n @click.stop=\"goOlder\"\n >\n <ChevronLeft :size=\"14\" :stroke-width=\"2\" />\n </button>\n\n <!-- History dropdown toggle -->\n <button\n class=\"tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-toggle\"\n :aria-expanded=\"isOpen\"\n :title=\"t.versionHistory.tooltip\"\n :aria-label=\"t.versionHistory.tooltip\"\n @click.stop=\"toggleDropdown\"\n >\n <Clock :size=\"16\" :stroke-width=\"1.5\" />\n <ChevronDown\n class=\"tpl:transition-transform\"\n :class=\"{ 'tpl:rotate-180': isOpen }\"\n :size=\"10\"\n :stroke-width=\"2\"\n />\n </button>\n\n <Transition name=\"tpl-dropdown\">\n <div\n v-if=\"isOpen\"\n class=\"tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n data-testid=\"version-history-dropdown\"\n >\n <div\n class=\"tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]\"\n >\n {{ t.versionHistory.dropdownTitle }}\n </div>\n\n <div\n v-if=\"isLoading && versions.length === 0\"\n class=\"tpl:flex tpl:items-center tpl:justify-center tpl:py-8\"\n role=\"status\"\n aria-busy=\"true\"\n >\n <LoaderCircle\n class=\"tpl:animate-spin tpl:text-[var(--tpl-primary)]\"\n :size=\"20\"\n :stroke-width=\"2\"\n />\n </div>\n\n <div\n v-else-if=\"versions.length === 0\"\n class=\"tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-empty\"\n >\n {{ t.versionHistory.empty }}\n </div>\n\n <div v-else class=\"tpl:max-h-64 tpl:overflow-y-auto\">\n <button\n v-for=\"version in versions\"\n :key=\"version.id\"\n class=\"tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-l-2 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:hover:border-l-[var(--tpl-primary)] tpl:hover:bg-[var(--tpl-bg-hover)]\"\n :class=\"\n version.id === previewingId\n ? 'tpl:border-l-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-active)]'\n : 'tpl:border-l-transparent'\n \"\n style=\"background-color: transparent\"\n data-testid=\"version-history-entry\"\n :data-version-id=\"version.id\"\n :disabled=\"isRestoring\"\n @click=\"selectVersion(version)\"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-0.5\">\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]\"\n >\n <span>{{\n version.label ?? formatDate(version.createdAt)\n }}</span>\n <span\n v-if=\"version.isAutomatic\"\n class=\"tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-xs tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.versionHistory.auto }}\n </span>\n </div>\n <!-- A labelled version still shows when it was taken, and by whom\n if the store tracks that; an unlabelled one already leads with\n the date, so the line would repeat it. -->\n <div\n v-if=\"version.label || version.author?.name\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <template v-if=\"version.label\">{{\n formatDate(version.createdAt)\n }}</template>\n <template v-if=\"version.label && version.author?.name\">\n ·\n </template>\n <template v-if=\"version.author?.name\">{{\n version.author.name\n }}</template>\n </div>\n </div>\n </button>\n </div>\n </div>\n </Transition>\n\n <!-- Step to a newer version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-newer\"\n :disabled=\"!canGoNewer\"\n :title=\"t.versionHistory.newerVersion\"\n :aria-label=\"t.versionHistory.newerVersion\"\n @click.stop=\"goNewer\"\n >\n <ChevronRight :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n</template>\n"],"mappings":"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"}
|
package/dist/cdn/chunks/{VersionHistoryPanels-BoJsPIKa.js → VersionHistoryPanels-DbgbyAdW.js}
RENAMED
|
@@ -5,7 +5,7 @@ var c = /* @__PURE__ */ t({
|
|
|
5
5
|
__name: "VersionHistoryPanels",
|
|
6
6
|
props: { feature: {} },
|
|
7
7
|
setup(t) {
|
|
8
|
-
let c = t, l = s(() => import("./VersionPreviewBanner-
|
|
8
|
+
let c = t, l = s(() => import("./VersionPreviewBanner-BaOTRIrm.js")), u = s(() => import("./RestoreVersionDialog-C-XEncAM.js"));
|
|
9
9
|
async function d() {
|
|
10
10
|
try {
|
|
11
11
|
await c.feature.requestRestore();
|
|
@@ -45,4 +45,4 @@ var c = /* @__PURE__ */ t({
|
|
|
45
45
|
//#endregion
|
|
46
46
|
export { c as default };
|
|
47
47
|
|
|
48
|
-
//# sourceMappingURL=VersionHistoryPanels-
|
|
48
|
+
//# sourceMappingURL=VersionHistoryPanels-DbgbyAdW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionHistoryPanels-
|
|
1
|
+
{"version":3,"file":"VersionHistoryPanels-DbgbyAdW.js","names":["_openBlock","_createElementBlock","_Fragment","_createBlock","_unref","_createCommentVNode","_sfc_main","openBlock","defineComponent","unref","createElementBlock","createCommentVNode","createBlock","Fragment","defineAsyncComponent","VersionHistoryPanels_default","props","__props","VersionPreviewBanner","RestoreVersionDialog","handleRequestRestore","handleSaveAndRestore","handleDiscardAndRestore","_cache"],"sources":["../../../src/components/VersionHistoryPanels.vue","../../../src/components/VersionHistoryPanels.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Mount point for the version-history chrome that sits outside the header,\n * shared by the OSS and Cloud editors.\n *\n * Same shape as `SavedBlocksPanels.vue` / `TestEmailPanel.vue`: everything here\n * is `defineAsyncComponent` behind a `v-if` on its own state, and the editors in\n * turn lazy-load *this* wrapper and render it only when a\n * `VersionHistoryProvider` is configured — so a consumer without one downloads\n * none of it.\n *\n * The header's dropdown control is not here for one reason only: it has to sit\n * in the header's centre column. It is lazily imported at those two sites\n * instead, and covered by the same CDN chunk guard.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseVersionHistoryFeatureReturn } from \"../composables/useVersionHistoryFeature\";\n\nconst props = defineProps<{\n feature: UseVersionHistoryFeatureReturn;\n}>();\n\nconst VersionPreviewBanner = defineAsyncComponent(\n () => import(\"./VersionPreviewBanner.vue\"),\n);\n// Its own chunk, fetched only if a restore is attempted with unsaved work —\n// which for a Cloud session (autosave on) is the uncommon case.\nconst RestoreVersionDialog = defineAsyncComponent(\n () => import(\"./RestoreVersionDialog.vue\"),\n);\n\n/**\n * Every action here swallows its rejection: the feature already reported it\n * through `onError` and rolled the canvas back, and an unhandled rejection out\n * of a DOM event binding helps nobody.\n */\nasync function handleRequestRestore(): Promise<void> {\n try {\n await props.feature.requestRestore();\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleSaveAndRestore(): Promise<void> {\n try {\n await props.feature.saveAndRestore();\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleDiscardAndRestore(): Promise<void> {\n try {\n await props.feature.discardAndRestore();\n } catch {\n /* reported through onError */\n }\n}\n</script>\n\n<template>\n <VersionPreviewBanner\n v-if=\"feature.isPreviewing.value\"\n :visible=\"feature.isPreviewing.value\"\n :can-restore=\"feature.canRestore.value\"\n @cancel=\"feature.cancelPreview()\"\n @confirm=\"handleRequestRestore\"\n />\n\n <RestoreVersionDialog\n v-if=\"feature.isConfirmingRestore.value\"\n :visible=\"feature.isConfirmingRestore.value\"\n :can-save=\"feature.canSaveBeforeRestore.value\"\n :is-busy=\"feature.isConfirmBusy.value\"\n @cancel=\"feature.cancelRestoreConfirm()\"\n @save-and-restore=\"handleSaveAndRestore\"\n @discard-and-restore=\"handleDiscardAndRestore\"\n />\n</template>\n","<script setup lang=\"ts\">\n/**\n * Mount point for the version-history chrome that sits outside the header,\n * shared by the OSS and Cloud editors.\n *\n * Same shape as `SavedBlocksPanels.vue` / `TestEmailPanel.vue`: everything here\n * is `defineAsyncComponent` behind a `v-if` on its own state, and the editors in\n * turn lazy-load *this* wrapper and render it only when a\n * `VersionHistoryProvider` is configured — so a consumer without one downloads\n * none of it.\n *\n * The header's dropdown control is not here for one reason only: it has to sit\n * in the header's centre column. It is lazily imported at those two sites\n * instead, and covered by the same CDN chunk guard.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseVersionHistoryFeatureReturn } from \"../composables/useVersionHistoryFeature\";\n\nconst props = defineProps<{\n feature: UseVersionHistoryFeatureReturn;\n}>();\n\nconst VersionPreviewBanner = defineAsyncComponent(\n () => import(\"./VersionPreviewBanner.vue\"),\n);\n// Its own chunk, fetched only if a restore is attempted with unsaved work —\n// which for a Cloud session (autosave on) is the uncommon case.\nconst RestoreVersionDialog = defineAsyncComponent(\n () => import(\"./RestoreVersionDialog.vue\"),\n);\n\n/**\n * Every action here swallows its rejection: the feature already reported it\n * through `onError` and rolled the canvas back, and an unhandled rejection out\n * of a DOM event binding helps nobody.\n */\nasync function handleRequestRestore(): Promise<void> {\n try {\n await props.feature.requestRestore();\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleSaveAndRestore(): Promise<void> {\n try {\n await props.feature.saveAndRestore();\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleDiscardAndRestore(): Promise<void> {\n try {\n await props.feature.discardAndRestore();\n } catch {\n /* reported through onError */\n }\n}\n</script>\n\n<template>\n <VersionPreviewBanner\n v-if=\"feature.isPreviewing.value\"\n :visible=\"feature.isPreviewing.value\"\n :can-restore=\"feature.canRestore.value\"\n @cancel=\"feature.cancelPreview()\"\n @confirm=\"handleRequestRestore\"\n />\n\n <RestoreVersionDialog\n v-if=\"feature.isConfirmingRestore.value\"\n :visible=\"feature.isConfirmingRestore.value\"\n :can-save=\"feature.canSaveBeforeRestore.value\"\n :is-busy=\"feature.isConfirmBusy.value\"\n @cancel=\"feature.cancelRestoreConfirm()\"\n @save-and-restore=\"handleSaveAndRestore\"\n @discard-and-restore=\"handleDiscardAndRestore\"\n />\n</template>\n"],"mappings":";;;;;;;EAkBA,IAAMgB,IAAQC,GAIRC,IAAuBJ,QACrB,OAAO,qCACf,GAGMK,IAAuBL,QACrB,OAAO,qCACf;EAOA,eAAeM,IAAsC;GACnD,IAAI;IACF,MAAMJ,EAAM,QAAQ,eAAe;GACrC,QAAQ,CAER;EACF;EAEA,eAAeK,IAAsC;GACnD,IAAI;IACF,MAAML,EAAM,QAAQ,eAAe;GACrC,QAAQ,CAER;EACF;EAEA,eAAeM,IAAyC;GACtD,IAAI;IACF,MAAMN,EAAM,QAAQ,kBAAkB;GACxC,QAAQ,CAER;EACF;oBAKUT,EAAA,GAAAG,EAAAG,GAAA,MAAA,CAAAI,EAAA,QAAQ,aAAa,SAD7BjB,EAAA,GAAAG,EAMEC,EAAAc,CAAA,GAAA;;GAJC,SAASD,EAAA,QAAQ,aAAa;GAC9B,eAAaA,EAAA,QAAQ,WAAW;GAChC,UAAM,AAAAM,EAAA,QAAA,MAAEN,EAAA,QAAQ,cAAa;GAC7B,WAASG;EAIJ,GAAA,MAAA,GAAA,CAAA,WAAA,aAAA,CAAA,KAAAT,EAAA,IAAA,EAAA,GAAAM,EAAA,QAAQ,oBAAoB,SADpCjB,EAAA,GAAAG,EAQEC,EAAAe,CAAA,GAAA;;GANC,SAASF,EAAA,QAAQ,oBAAoB;GACrC,YAAUA,EAAA,QAAQ,qBAAqB;GACvC,WAASA,EAAA,QAAQ,cAAc;GAC/B,UAAM,AAAAM,EAAA,QAAA,MAAEN,EAAA,QAAQ,qBAAoB;GACpC,kBAAkBI;GAClB,qBAAqBC"}
|
package/dist/cdn/chunks/{VersionPreviewBanner-CKyrcgxJ.js → VersionPreviewBanner-BaOTRIrm.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { N as e, S as t, at as n, b as r, ct as i, g as a, h as o, p as s, ut as c } from "./draggable-IB4x6w2O.js";
|
|
2
2
|
import { t as l } from "./useI18n-CyO_Nmca.js";
|
|
3
|
-
import { At as u } from "./icons-
|
|
3
|
+
import { At as u } from "./icons-BrAyaJ0T.js";
|
|
4
4
|
import { f as d, v as f } from "./styleConstants-C_YAPdQS.js";
|
|
5
5
|
//#region src/components/VersionPreviewBanner.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var p = {
|
|
@@ -37,4 +37,4 @@ var p = {
|
|
|
37
37
|
//#endregion
|
|
38
38
|
export { g as default };
|
|
39
39
|
|
|
40
|
-
//# sourceMappingURL=VersionPreviewBanner-
|
|
40
|
+
//# sourceMappingURL=VersionPreviewBanner-BaOTRIrm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionPreviewBanner-
|
|
1
|
+
{"version":3,"file":"VersionPreviewBanner-BaOTRIrm.js","names":["_openBlock","_createElementBlock","_createElementVNode","_createVNode","_unref","_toDisplayString","_normalizeClass","_createCommentVNode","_sfc_main","openBlock","defineComponent","unref","createVNode","normalizeClass","createElementBlock","createCommentVNode","createBaseVNode","toDisplayString","useI18n","Clock","ghostBtnClass","primaryBtnClass","_hoisted_1","_hoisted_2","_hoisted_3","VersionPreviewBanner_default","__emit","emit","__props","t","_cache"],"sources":["../../../src/components/VersionPreviewBanner.vue","../../../src/components/VersionPreviewBanner.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ghostBtnClass, primaryBtnClass } from \"../constants/styleConstants\";\n/**\n * Shown while a past version is on the canvas instead of the user's own work.\n * Cancel puts the pre-preview content back; Restore makes the version current.\n *\n * Lives outside `src/cloud/` because version history is a BYO provider, not a\n * Cloud feature — a consumer's own `versionHistory` provider drives this banner\n * with no Cloud involved.\n */\nimport { Clock } from \"@lucide/vue\";\nimport { useI18n } from \"../composables/useI18n\";\n\ndefineProps<{\n visible: boolean;\n /**\n * Whether the provider supplied `restore`. When it didn't, history is\n * browse-and-preview only, so the confirm action does not render at all\n * rather than rendering disabled — the same discipline saved blocks uses.\n */\n canRestore: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t } = useI18n();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n class=\"tpl-preview-banner tpl:absolute tpl:top-14 tpl:right-0 tpl:left-0 tpl:z-40 tpl:flex tpl:items-center tpl:justify-center tpl:gap-4 tpl:px-4 tpl:py-3 tpl:bg-[var(--tpl-primary-light)] tpl:border-b tpl:border-[var(--tpl-primary)]\"\n data-testid=\"version-preview-banner\"\n role=\"status\"\n >\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]\"\n >\n <Clock\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-primary)]\"\n />\n <span>{{ t.versionPreview.message }}</span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <button\n :class=\"ghostBtnClass\"\n style=\"background-color: transparent\"\n data-testid=\"version-preview-cancel\"\n @click=\"emit('cancel')\"\n >\n {{ t.versionPreview.cancel }}\n </button>\n <button\n v-if=\"canRestore\"\n :class=\"primaryBtnClass\"\n data-testid=\"version-preview-restore\"\n @click=\"emit('confirm')\"\n >\n {{ t.versionPreview.restore }}\n </button>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ghostBtnClass, primaryBtnClass } from \"../constants/styleConstants\";\n/**\n * Shown while a past version is on the canvas instead of the user's own work.\n * Cancel puts the pre-preview content back; Restore makes the version current.\n *\n * Lives outside `src/cloud/` because version history is a BYO provider, not a\n * Cloud feature — a consumer's own `versionHistory` provider drives this banner\n * with no Cloud involved.\n */\nimport { Clock } from \"@lucide/vue\";\nimport { useI18n } from \"../composables/useI18n\";\n\ndefineProps<{\n visible: boolean;\n /**\n * Whether the provider supplied `restore`. When it didn't, history is\n * browse-and-preview only, so the confirm action does not render at all\n * rather than rendering disabled — the same discipline saved blocks uses.\n */\n canRestore: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t } = useI18n();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n class=\"tpl-preview-banner tpl:absolute tpl:top-14 tpl:right-0 tpl:left-0 tpl:z-40 tpl:flex tpl:items-center tpl:justify-center tpl:gap-4 tpl:px-4 tpl:py-3 tpl:bg-[var(--tpl-primary-light)] tpl:border-b tpl:border-[var(--tpl-primary)]\"\n data-testid=\"version-preview-banner\"\n role=\"status\"\n >\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]\"\n >\n <Clock\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-primary)]\"\n />\n <span>{{ t.versionPreview.message }}</span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <button\n :class=\"ghostBtnClass\"\n style=\"background-color: transparent\"\n data-testid=\"version-preview-cancel\"\n @click=\"emit('cancel')\"\n >\n {{ t.versionPreview.cancel }}\n </button>\n <button\n v-if=\"canRestore\"\n :class=\"primaryBtnClass\"\n data-testid=\"version-preview-restore\"\n @click=\"emit('confirm')\"\n >\n {{ t.versionPreview.restore }}\n </button>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAuBA,IAAM2B,IAAOD,GAKP,EAAE,SAAMR,EAAQ;mBAKZU,EAAA,WADR5B,EAAA,GAAAC,EAkCM,OAlCNqB,GAkCM,CA5BJpB,EASM,OATNqB,GASM,CANJpB,EAIEC,EAAAe,CAAA,GAAA;GAHC,MAAM;GACN,gBAAc;GACf,OAAM;EAERjB,CAAAA,GAAAA,EAA2C,QAAA,MAAAG,EAAlCD,EAAAyB,CAAA,CAAC,CAAC,eAAe,OAAO,GAAA,CAAA,CAAA,CAAA,GAEnC3B,EAiBM,OAjBNsB,GAiBM,CAhBJtB,EAOS,UAAA;GANN,OAAKI,EAAEF,EAAAgB,CAAA,CAAa;GACrB,OAAA,EAAA,oBAAA,cAAA;GACA,eAAY;GACX,SAAK,AAAAU,EAAA,QAAA,MAAEH,EAAI,QAAA;EAET,GAAAtB,EAAAD,EAAAyB,CAAA,CAAC,CAAC,eAAe,MAAM,GAAA,CAAA,GAGpBD,EAAA,cADR5B,EAAA,GAAAC,EAOS,UAAA;;GALN,OAAKK,EAAEF,EAAAiB,CAAA,CAAe;GACvB,eAAY;GACX,SAAK,AAAAS,EAAA,QAAA,MAAEH,EAAI,SAAA;EAET,GAAAtB,EAAAD,EAAAyB,CAAA,CAAC,CAAC,eAAe,OAAO,GAAA,CAAA,KAAAd,EAAA,IAAA,EAAA,CAAA,CAAA,CAAA,CAAA,KAAAA,EAAA,IAAA,EAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as e, F as t, N as n, R as r, S as i, at as a, f as o, g as s, lt as c, m as l, u } from "./draggable-IB4x6w2O.js";
|
|
2
|
-
import { C as d, E as f, T as p } from "./useEditorCore-
|
|
2
|
+
import { C as d, E as f, T as p } from "./useEditorCore-BTKqlRIg.js";
|
|
3
3
|
import { s as m } from "./keys-DCWeHkSF.js";
|
|
4
4
|
function h(e, t = "desktop") {
|
|
5
5
|
return t === "mobile" ? 375 : e?.width ?? 600;
|
|
@@ -33,4 +33,4 @@ var g = "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)", _ = ["data-block-id"],
|
|
|
33
33
|
//#endregion
|
|
34
34
|
export { g as n, h as r, v as t };
|
|
35
35
|
|
|
36
|
-
//# sourceMappingURL=WrapperBlock-
|
|
36
|
+
//# sourceMappingURL=WrapperBlock-BYNfYvl3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WrapperBlock-
|
|
1
|
+
{"version":3,"file":"WrapperBlock-BYNfYvl3.js","names":["_openBlock","_createElementBlock","_normalizeStyle","_Fragment","_renderList","_unref","_createBlock","_resolveDynamicComponent","_sfc_main","inject","renderList","openBlock","resolveDynamicComponent","defineComponent","unref","computed","createElementBlock","normalizeStyle","createBlock","getBlockWrapperStyle","resolveBlockComponent","getWrapperStyle","BLOCK_REGISTRY_KEY","getEmailFrameWidth","viewport","settings","EMAIL_FRAME_WIDTH_TRANSITION","_hoisted_1","WrapperBlock_default","props","__props","blockRegistry","wrapperStyle","getBlockComponent","block","Fragment","child"],"sources":["../../../src/utils/emailFrameWidth.ts","../../../src/components/blocks/WrapperBlock.vue","../../../src/components/blocks/WrapperBlock.vue"],"sourcesContent":["import type { TemplateSettings, ViewportSize } from \"@templatical/types\";\n\n/**\n * Width a mobile preview renders at. Not the template's own width — a phone\n * viewport is narrower than any sensible email body, so every viewport-aware\n * surface clamps to this.\n */\nexport const MOBILE_EMAIL_WIDTH = 375;\n\n/**\n * Fallback body width when no template settings are available — headless mounts\n * and tests. Matches `createDefaultTemplateContent`'s default.\n */\nexport const DEFAULT_EMAIL_WIDTH = 600;\n\n/**\n * The width an email body lays itself out against, for a given viewport.\n *\n * **The single source of truth for every surface that renders blocks**: the\n * canvas, the preview canvas, and the save dialog's scaled preview rows. They\n * have to agree — `SavedBlockPreviewRow` divides by this number to compute its\n * `transform: scale()`, so if it and the canvas disagreed the rows would be\n * scaled by the wrong factor and overflow or under-fill their frame. Sharing one\n * function makes that agreement structural instead of three constants that happen\n * to match today.\n *\n * Pass the *current* template's settings even when previewing content from\n * elsewhere (a saved block stores only `Block[]`): the current settings are what\n * the content will actually be rendered at.\n */\nexport function getEmailFrameWidth(\n settings: TemplateSettings | undefined,\n viewport: ViewportSize = \"desktop\",\n): number {\n if (viewport === \"mobile\") return MOBILE_EMAIL_WIDTH;\n return settings?.width ?? DEFAULT_EMAIL_WIDTH;\n}\n\n/**\n * Band of email background shown on each side of the content column.\n *\n * A surface that renders blocks at exactly the body width has nowhere for\n * `settings.backgroundColor` to show: a full-width section's own background\n * covers every pixel of it, so the body colour reads as unset even though the\n * sent email paints it across the whole client viewport. The gutter is what\n * makes it visible, mirroring how `mj-body background-color` renders beside the\n * centred content.\n *\n * Fixed rather than \"fill the container\" so the band never overwhelms the\n * content on a wide monitor. `Canvas.vue` adds it to both sides of a fixed\n * stage; `BlockPreviewCanvas` treats it as the cap on a fluid one, because a\n * fixed 792px stage overflows every dialog it lives in.\n */\nexport const EMAIL_GUTTER = 96;\n\n/**\n * How a viewport switch animates the frame.\n *\n * Lives here rather than being written out per call site so every surface that\n * switches viewport eases identically — the canvas's toggle and the test-email\n * dialog's should feel like the same control, not two similar ones. The slight\n * overshoot in the curve is deliberate and matches the editor's other viewport\n * transitions.\n *\n * Only `width` transitions: block content re-flows for the new viewport in the\n * same frame, exactly as it does on the canvas, so animating height as well would\n * lag the reflow behind the frame.\n */\nexport const EMAIL_FRAME_WIDTH_TRANSITION =\n \"width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)\";\n","<script setup lang=\"ts\">\nimport {\n getBlockWrapperStyle,\n getWrapperStyle,\n resolveBlockComponent,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n ViewportSize,\n WrapperBlock as WrapperBlockType,\n} from \"@templatical/types\";\nimport { computed, inject } from \"vue\";\nimport { BLOCK_REGISTRY_KEY } from \"../../keys\";\n\ndefineOptions({ name: \"WrapperBlock\" });\n\nconst props = defineProps<{\n block: WrapperBlockType;\n viewport: ViewportSize;\n}>();\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\n\nconst wrapperStyle = computed(() => getWrapperStyle(props.block) ?? {});\n\nfunction getBlockComponent(block: Block) {\n // Children resolve through the registry (title, section, …). No local\n // fallback map: a Canvas import of PreviewSectionBlock (or a preview import\n // of SectionBlock) would pull the other surface's tree into this band.\n return resolveBlockComponent(block, blockRegistry, {});\n}\n</script>\n\n<template>\n <div data-testid=\"layout-wrapper\" class=\"tpl:w-full\" :style=\"wrapperStyle\">\n <div\n v-for=\"child in block.children\"\n :key=\"child.id\"\n :data-block-id=\"child.id\"\n :style=\"getBlockWrapperStyle(child)\"\n >\n <component\n :is=\"getBlockComponent(child)\"\n :block=\"child\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport {\n getBlockWrapperStyle,\n getWrapperStyle,\n resolveBlockComponent,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n ViewportSize,\n WrapperBlock as WrapperBlockType,\n} from \"@templatical/types\";\nimport { computed, inject } from \"vue\";\nimport { BLOCK_REGISTRY_KEY } from \"../../keys\";\n\ndefineOptions({ name: \"WrapperBlock\" });\n\nconst props = defineProps<{\n block: WrapperBlockType;\n viewport: ViewportSize;\n}>();\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\n\nconst wrapperStyle = computed(() => getWrapperStyle(props.block) ?? {});\n\nfunction getBlockComponent(block: Block) {\n // Children resolve through the registry (title, section, …). No local\n // fallback map: a Canvas import of PreviewSectionBlock (or a preview import\n // of SectionBlock) would pull the other surface's tree into this band.\n return resolveBlockComponent(block, blockRegistry, {});\n}\n</script>\n\n<template>\n <div data-testid=\"layout-wrapper\" class=\"tpl:w-full\" :style=\"wrapperStyle\">\n <div\n v-for=\"child in block.children\"\n :key=\"child.id\"\n :data-block-id=\"child.id\"\n :style=\"getBlockWrapperStyle(child)\"\n >\n <component\n :is=\"getBlockComponent(child)\"\n :block=\"child\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n</template>\n"],"mappings":";;;AA8BA,SAAgBuB,EACd,GACA,IAAyB,WACjB;CAER,OADIC,MAAa,WAAU,MACpBC,GAAU,SAAA;AACnB;AAgCA,IAAaC,IACX;;;;;;;;ECrDF,IAAMG,IAAQC,GAKRC,IAAgBtB,EAAOa,GAAoB,IAAI,GAE/CU,IAAejB,QAAeM,EAAgBQ,EAAM,KAAK,KAAK,CAAC,CAAC;EAEtE,SAASI,EAAkB,GAAc;GAIvC,OAAOb,EAAsBc,GAAOH,GAAe,CAAC,CAAC;EACvD;oBAIE/B,EAAA,GAAAC,EAaM,OAAA;GAbD,eAAY;GAAiB,OAAM;GAAc,OAAKC,EAAE8B,EAAA,KAAY;EACvEhC,GAAAA,EAAAA,EAAA,EAAA,GAAAC,EAWME,GAAA,MAAAC,EAVY0B,EAAA,MAAM,WAAf,OADT9B,EAAA,GAAAC,EAWM,OAAA;GATH,KAAKmC,EAAM;GACX,iBAAeA,EAAM;GACrB,OAAKlC,EAAEG,EAAAc,CAAA,CAAoB,CAACiB,CAAK,CAAA;EAElCpC,GAAAA,EAAAA,EAAA,GAAAM,EAIEC,EAHK0B,EAAkBG,CAAK,CAAA,GAAA;GAC3B,OAAOA;GACP,UAAUN,EAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as e, H as t, K as n, Ot as r, Q as i, Z as a, ht as o, j as s, kt as c, p as l, pt as u, tt as d, y as f } from "./icons-
|
|
1
|
+
import { G as e, H as t, K as n, Ot as r, Q as i, Z as a, ht as o, j as s, kt as c, p as l, pt as u, tt as d, y as f } from "./icons-BrAyaJ0T.js";
|
|
2
2
|
//#region src/utils/blockTypeIcons.ts
|
|
3
3
|
var p = {
|
|
4
4
|
section: r,
|
|
@@ -18,4 +18,4 @@ var p = {
|
|
|
18
18
|
//#endregion
|
|
19
19
|
export { p as t };
|
|
20
20
|
|
|
21
|
-
//# sourceMappingURL=blockTypeIcons-
|
|
21
|
+
//# sourceMappingURL=blockTypeIcons-B_IAjnTD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockTypeIcons-
|
|
1
|
+
{"version":3,"file":"blockTypeIcons-B_IAjnTD.js","names":["Play","RectangleHorizontal","Pilcrow","Columns3","MoveVertical","Navigation","Heading","Share2","Code","Timer","Image","Minus","Table","blockTypeIcons"],"sources":["../../../src/utils/blockTypeIcons.ts"],"sourcesContent":["import {\n Code,\n Columns3,\n Heading,\n Image,\n Minus,\n MoveVertical,\n Navigation,\n Pilcrow,\n Play,\n RectangleHorizontal,\n Share2,\n Table,\n Timer,\n} from \"@lucide/vue\";\nimport type { Component } from \"vue\";\n\nexport const blockTypeIcons: Record<string, Component> = {\n section: Columns3,\n title: Heading,\n paragraph: Pilcrow,\n image: Image,\n button: RectangleHorizontal,\n divider: Minus,\n video: Play,\n social: Share2,\n menu: Navigation,\n table: Table,\n spacer: MoveVertical,\n countdown: Timer,\n html: Code,\n};\n"],"mappings":";;AAiBA,IAAaa,IAA4C;CACvD,SAASV;CACT,OAAOG;CACP,WAAWJ;CACX,OAAOQ;CACP,QAAQT;CACR,SAASU;CACT,OAAOX;CACP,QAAQO;CACR,MAAMF;CACN,OAAOO;CACP,QAAQR;CACR,WAAWK;CACX,MAAMD;AACR"}
|
|
@@ -13,7 +13,9 @@ var e = { mediaLibrary: {
|
|
|
13
13
|
noFiles: "No s'ha trobat cap fitxer",
|
|
14
14
|
noSearchResults: "Cap fitxer no coincideix amb la cerca",
|
|
15
15
|
dropOrClick: "Deixa anar els fitxers aquí o fes clic per pujar-los",
|
|
16
|
-
|
|
16
|
+
acceptedAnyType: "Qualsevol tipus de fitxer",
|
|
17
|
+
acceptedFormatsMaxSize: "{formats} (màx. {size})",
|
|
18
|
+
uploadRejected: "No s'ha pujat, tipus o mida no acceptats: {files}",
|
|
17
19
|
uploading: "S'està pujant...",
|
|
18
20
|
uploadingProgress: "S'està pujant {current} de {total}...",
|
|
19
21
|
selectImage: "Selecciona una imatge",
|
|
@@ -60,12 +62,14 @@ var e = { mediaLibrary: {
|
|
|
60
62
|
replaceFile: "Substitueix el fitxer",
|
|
61
63
|
replaceWarningTitle: "Substitueix el fitxer",
|
|
62
64
|
replaceWarningMessage: "Estàs a punt de substituir aquest fitxer. El fitxer de substitució ha de tenir la mateixa extensió ({extension}).",
|
|
63
|
-
replaceWarningUsageNote: "Aquest fitxer s'utilitza en {count} plantilla(es).
|
|
65
|
+
replaceWarningUsageNote: "Aquest fitxer s'utilitza en {count} plantilla(es). Revisa-les després de substituir-lo.",
|
|
64
66
|
replaceSelectFile: "Selecciona el fitxer de substitució",
|
|
65
67
|
replace: "Substitueix",
|
|
66
68
|
replacing: "S'està substituint...",
|
|
67
69
|
replaceError: "No s'ha pogut substituir el fitxer",
|
|
68
70
|
saving: "S'està desant...",
|
|
71
|
+
editSaveError: "No s'han pogut desar els canvis. Torna-ho a provar.",
|
|
72
|
+
editCropError: "No s'ha pogut processar la imatge editada. Torna-ho a provar.",
|
|
69
73
|
cropAspectRatio: "Relació d'aspecte",
|
|
70
74
|
cropFree: "Lliure",
|
|
71
75
|
cropSquare: "1:1",
|
|
@@ -91,4 +95,4 @@ var e = { mediaLibrary: {
|
|
|
91
95
|
//#endregion
|
|
92
96
|
export { e as default };
|
|
93
97
|
|
|
94
|
-
//# sourceMappingURL=ca-
|
|
98
|
+
//# sourceMappingURL=ca-CYQH3J0b.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ca-CYQH3J0b.js","names":["ca"],"sources":["../../../../media-library/src/i18n/locales/ca.ts"],"sourcesContent":["const ca = {\n mediaLibrary: {\n title: \"Biblioteca multimèdia\",\n searchPlaceholder: \"Cerca fitxers...\",\n allFiles: \"Tots els fitxers\",\n filterAll: \"Tots els tipus\",\n filterImages: \"Imatges\",\n filterDocuments: \"Documents\",\n filterVideos: \"Vídeos\",\n filterAudio: \"Àudio\",\n newFolder: \"Carpeta nova\",\n folderName: \"Nom de la carpeta\",\n noFiles: \"No s'ha trobat cap fitxer\",\n noSearchResults: \"Cap fitxer no coincideix amb la cerca\",\n dropOrClick: \"Deixa anar els fitxers aquí o fes clic per pujar-los\",\n acceptedAnyType: \"Qualsevol tipus de fitxer\",\n acceptedFormatsMaxSize: \"{formats} (màx. {size})\",\n uploadRejected: \"No s'ha pujat, tipus o mida no acceptats: {files}\",\n uploading: \"S'està pujant...\",\n uploadingProgress: \"S'està pujant {current} de {total}...\",\n selectImage: \"Selecciona una imatge\",\n selectFile: \"Selecciona un fitxer\",\n deleteSelected: \"Suprimeix\",\n copyUrl: \"Copia l'URL\",\n copied: \"S'ha copiat!\",\n browseMedia: \"Explora la biblioteca multimèdia\",\n renameFolder: \"Canvia el nom de la carpeta\",\n addSubfolder: \"Afegeix una subcarpeta\",\n subfolderName: \"Nom de la subcarpeta\",\n sortNewest: \"Més recents primer\",\n sortOldest: \"Més antics primer\",\n sortNameAsc: \"Nom de l'A a la Z\",\n sortNameDesc: \"Nom de la Z a l'A\",\n sortSizeAsc: \"Més petits primer\",\n sortSizeDesc: \"Més grans primer\",\n moveSelected: \"Mou\",\n moveToRoot: \"Tots els fitxers\",\n currentFolder: \"(actual)\",\n confirmDelete: \"Ho confirmes?\",\n renameFile: \"Canvia el nom\",\n editFile: \"Edita el fitxer\",\n fileName: \"Nom del fitxer\",\n altText: \"Text alternatiu\",\n altTextPlaceholder: \"Descriu aquesta imatge per millorar l'accessibilitat\",\n saveChanges: \"Desa\",\n cancel: \"Cancel·la\",\n frequentlyUsed: \"Utilitzats freqüentment\",\n deleteWarningTitle: \"Suprimeix el fitxer\",\n deleteWarningMessage: \"N'estàs segur? Aquesta acció és irreversible.\",\n deleteWarningUsageNote:\n \"Els fitxers següents s'utilitzen en plantilles. Si els suprimeixes, és possible que aquestes plantilles deixin de funcionar correctament.\",\n deleteAnyway: \"Suprimeix\",\n usedInTemplates: \"Utilitzat en {count} plantilla(es)\",\n viewGrid: \"Visualització de quadrícula\",\n viewList: \"Visualització de llista\",\n showFolders: \"Mostra les carpetes\",\n hideFolders: \"Amaga les carpetes\",\n importFromUrl: \"Importa des d'un URL\",\n importUrlPlaceholder: \"https://example.com/image.jpg\",\n import: \"Importa\",\n importing: \"S'està important...\",\n importError: \"No s'ha pogut importar des de l'URL\",\n replaceFile: \"Substitueix el fitxer\",\n replaceWarningTitle: \"Substitueix el fitxer\",\n replaceWarningMessage:\n \"Estàs a punt de substituir aquest fitxer. El fitxer de substitució ha de tenir la mateixa extensió ({extension}).\",\n replaceWarningUsageNote:\n \"Aquest fitxer s'utilitza en {count} plantilla(es). Revisa-les després de substituir-lo.\",\n replaceSelectFile: \"Selecciona el fitxer de substitució\",\n replace: \"Substitueix\",\n replacing: \"S'està substituint...\",\n replaceError: \"No s'ha pogut substituir el fitxer\",\n saving: \"S'està desant...\",\n editSaveError: \"No s'han pogut desar els canvis. Torna-ho a provar.\",\n editCropError:\n \"No s'ha pogut processar la imatge editada. Torna-ho a provar.\",\n cropAspectRatio: \"Relació d'aspecte\",\n cropFree: \"Lliure\",\n cropSquare: \"1:1\",\n cropLandscape43: \"4:3\",\n cropLandscape169: \"16:9\",\n cropOriginal: \"Original\",\n cropMaxWidth: \"Amplada màxima\",\n cropMaxHeight: \"Alçada màxima\",\n cropOutputSize: \"Mida de sortida\",\n cropPixels: \"px\",\n cropOptional: \"(opcional)\",\n close: \"Tanca\",\n searchAriaLabel: \"Cerca fitxers\",\n filterAriaLabel: \"Filtra per tipus\",\n filesListAriaLabel: \"Fitxers\",\n loading: \"S'està carregant\",\n expandFolder: \"Expandeix la carpeta\",\n collapseFolder: \"Redueix la carpeta\",\n deleteFolder: \"Suprimeix la carpeta\",\n deleteFolderConfirm: \"Confirma la supressió\",\n storageTooltip: \"{used} de {total} utilitzats ({remaining} restants)\",\n },\n};\nexport default ca;\n"],"mappings":";AAAA,IAAMA,IAAK,EACT,cAAc;CACZ,OAAO;CACP,mBAAmB;CACnB,UAAU;CACV,WAAW;CACX,cAAc;CACd,iBAAiB;CACjB,cAAc;CACd,aAAa;CACb,WAAW;CACX,YAAY;CACZ,SAAS;CACT,iBAAiB;CACjB,aAAa;CACb,iBAAiB;CACjB,wBAAwB;CACxB,gBAAgB;CAChB,WAAW;CACX,mBAAmB;CACnB,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,SAAS;CACT,QAAQ;CACR,aAAa;CACb,cAAc;CACd,cAAc;CACd,eAAe;CACf,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,cAAc;CACd,aAAa;CACb,cAAc;CACd,cAAc;CACd,YAAY;CACZ,eAAe;CACf,eAAe;CACf,YAAY;CACZ,UAAU;CACV,UAAU;CACV,SAAS;CACT,oBAAoB;CACpB,aAAa;CACb,QAAQ;CACR,gBAAgB;CAChB,oBAAoB;CACpB,sBAAsB;CACtB,wBACE;CACF,cAAc;CACd,iBAAiB;CACjB,UAAU;CACV,UAAU;CACV,aAAa;CACb,aAAa;CACb,eAAe;CACf,sBAAsB;CACtB,QAAQ;CACR,WAAW;CACX,aAAa;CACb,aAAa;CACb,qBAAqB;CACrB,uBACE;CACF,yBACE;CACF,mBAAmB;CACnB,SAAS;CACT,WAAW;CACX,cAAc;CACd,QAAQ;CACR,eAAe;CACf,eACE;CACF,iBAAiB;CACjB,UAAU;CACV,YAAY;CACZ,iBAAiB;CACjB,kBAAkB;CAClB,cAAc;CACd,cAAc;CACd,eAAe;CACf,gBAAgB;CAChB,YAAY;CACZ,cAAc;CACd,OAAO;CACP,iBAAiB;CACjB,iBAAiB;CACjB,oBAAoB;CACpB,SAAS;CACT,cAAc;CACd,gBAAgB;CAChB,cAAc;CACd,qBAAqB;CACrB,gBAAgB;AAClB,EACF"}
|
|
@@ -13,7 +13,9 @@ var e = { mediaLibrary: {
|
|
|
13
13
|
noFiles: "Keine Dateien gefunden",
|
|
14
14
|
noSearchResults: "Keine Dateien entsprechen Ihrer Suche",
|
|
15
15
|
dropOrClick: "Dateien hierher ziehen oder klicken zum Hochladen",
|
|
16
|
-
|
|
16
|
+
acceptedAnyType: "Alle Dateitypen",
|
|
17
|
+
acceptedFormatsMaxSize: "{formats} (max. {size})",
|
|
18
|
+
uploadRejected: "Nicht hochgeladen, Typ oder Größe nicht zulässig: {files}",
|
|
17
19
|
uploading: "Wird hochgeladen...",
|
|
18
20
|
uploadingProgress: "{current} von {total} wird hochgeladen...",
|
|
19
21
|
selectImage: "Bild auswählen",
|
|
@@ -60,12 +62,14 @@ var e = { mediaLibrary: {
|
|
|
60
62
|
replaceFile: "Datei ersetzen",
|
|
61
63
|
replaceWarningTitle: "Datei ersetzen",
|
|
62
64
|
replaceWarningMessage: "Sie sind dabei, diese Datei zu ersetzen. Die Ersatzdatei muss dieselbe Dateierweiterung haben ({extension}).",
|
|
63
|
-
replaceWarningUsageNote: "Diese Datei wird in {count} Vorlage(n) verwendet.
|
|
65
|
+
replaceWarningUsageNote: "Diese Datei wird in {count} Vorlage(n) verwendet. Prüfen Sie diese nach dem Ersetzen.",
|
|
64
66
|
replaceSelectFile: "Ersatzdatei auswählen",
|
|
65
67
|
replace: "Ersetzen",
|
|
66
68
|
replacing: "Wird ersetzt...",
|
|
67
69
|
replaceError: "Ersetzen der Datei fehlgeschlagen",
|
|
68
70
|
saving: "Wird gespeichert...",
|
|
71
|
+
editSaveError: "Ihre Änderungen konnten nicht gespeichert werden. Bitte versuchen Sie es erneut.",
|
|
72
|
+
editCropError: "Das bearbeitete Bild konnte nicht verarbeitet werden. Bitte versuchen Sie es erneut.",
|
|
69
73
|
cropAspectRatio: "Seitenverhältnis",
|
|
70
74
|
cropFree: "Frei",
|
|
71
75
|
cropSquare: "1:1",
|
|
@@ -91,4 +95,4 @@ var e = { mediaLibrary: {
|
|
|
91
95
|
//#endregion
|
|
92
96
|
export { e as default };
|
|
93
97
|
|
|
94
|
-
//# sourceMappingURL=de-
|
|
98
|
+
//# sourceMappingURL=de-JvCTMJPy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"de-JvCTMJPy.js","names":["de"],"sources":["../../../../media-library/src/i18n/locales/de.ts"],"sourcesContent":["import type en from \"./en\";\n\nconst de: typeof en = {\n mediaLibrary: {\n title: \"Medienbibliothek\",\n searchPlaceholder: \"Dateien suchen...\",\n allFiles: \"Alle Dateien\",\n filterAll: \"Alle Typen\",\n filterImages: \"Bilder\",\n filterDocuments: \"Dokumente\",\n filterVideos: \"Videos\",\n filterAudio: \"Audio\",\n newFolder: \"Neuer Ordner\",\n folderName: \"Ordnername\",\n noFiles: \"Keine Dateien gefunden\",\n noSearchResults: \"Keine Dateien entsprechen Ihrer Suche\",\n dropOrClick: \"Dateien hierher ziehen oder klicken zum Hochladen\",\n acceptedAnyType: \"Alle Dateitypen\",\n acceptedFormatsMaxSize: \"{formats} (max. {size})\",\n uploadRejected: \"Nicht hochgeladen, Typ oder Größe nicht zulässig: {files}\",\n uploading: \"Wird hochgeladen...\",\n uploadingProgress: \"{current} von {total} wird hochgeladen...\",\n selectImage: \"Bild auswählen\",\n selectFile: \"Datei auswählen\",\n deleteSelected: \"Löschen\",\n copyUrl: \"URL kopieren\",\n copied: \"Kopiert!\",\n browseMedia: \"Medienbibliothek durchsuchen\",\n renameFolder: \"Ordner umbenennen\",\n addSubfolder: \"Unterordner hinzufügen\",\n subfolderName: \"Unterordnername\",\n sortNewest: \"Neueste zuerst\",\n sortOldest: \"Älteste zuerst\",\n sortNameAsc: \"Name A-Z\",\n sortNameDesc: \"Name Z-A\",\n sortSizeAsc: \"Kleinste zuerst\",\n sortSizeDesc: \"Größte zuerst\",\n moveSelected: \"Verschieben\",\n moveToRoot: \"Alle Dateien\",\n currentFolder: \"(aktuell)\",\n confirmDelete: \"Bestätigen?\",\n renameFile: \"Umbenennen\",\n editFile: \"Datei bearbeiten\",\n fileName: \"Dateiname\",\n altText: \"Alternativtext\",\n altTextPlaceholder: \"Bildbeschreibung für Barrierefreiheit\",\n saveChanges: \"Speichern\",\n cancel: \"Abbrechen\",\n frequentlyUsed: \"Häufig verwendet\",\n deleteWarningTitle: \"Datei löschen\",\n deleteWarningMessage:\n \"Sind Sie sicher? Diese Aktion kann nicht rückgängig gemacht werden.\",\n deleteWarningUsageNote:\n \"Die folgenden Dateien werden in Vorlagen verwendet. Das Löschen kann diese Vorlagen beschädigen.\",\n deleteAnyway: \"Löschen\",\n usedInTemplates: \"In {count} Vorlage(n) verwendet\",\n viewGrid: \"Rasteransicht\",\n viewList: \"Listenansicht\",\n showFolders: \"Ordner anzeigen\",\n hideFolders: \"Ordner ausblenden\",\n importFromUrl: \"Von URL importieren\",\n importUrlPlaceholder: \"https://example.com/image.jpg\",\n import: \"Importieren\",\n importing: \"Wird importiert...\",\n importError: \"Import von URL fehlgeschlagen\",\n replaceFile: \"Datei ersetzen\",\n replaceWarningTitle: \"Datei ersetzen\",\n replaceWarningMessage:\n \"Sie sind dabei, diese Datei zu ersetzen. Die Ersatzdatei muss dieselbe Dateierweiterung haben ({extension}).\",\n replaceWarningUsageNote:\n \"Diese Datei wird in {count} Vorlage(n) verwendet. Prüfen Sie diese nach dem Ersetzen.\",\n replaceSelectFile: \"Ersatzdatei auswählen\",\n replace: \"Ersetzen\",\n replacing: \"Wird ersetzt...\",\n replaceError: \"Ersetzen der Datei fehlgeschlagen\",\n saving: \"Wird gespeichert...\",\n editSaveError:\n \"Ihre Änderungen konnten nicht gespeichert werden. Bitte versuchen Sie es erneut.\",\n editCropError:\n \"Das bearbeitete Bild konnte nicht verarbeitet werden. Bitte versuchen Sie es erneut.\",\n cropAspectRatio: \"Seitenverhältnis\",\n cropFree: \"Frei\",\n cropSquare: \"1:1\",\n cropLandscape43: \"4:3\",\n cropLandscape169: \"16:9\",\n cropOriginal: \"Original\",\n cropMaxWidth: \"Max. Breite\",\n cropMaxHeight: \"Max. Höhe\",\n cropOutputSize: \"Ausgabegröße\",\n cropPixels: \"px\",\n cropOptional: \"(optional)\",\n close: \"Schließen\",\n searchAriaLabel: \"Dateien suchen\",\n filterAriaLabel: \"Nach Typ filtern\",\n filesListAriaLabel: \"Dateien\",\n loading: \"Wird geladen\",\n expandFolder: \"Ordner aufklappen\",\n collapseFolder: \"Ordner zuklappen\",\n deleteFolder: \"Ordner löschen\",\n deleteFolderConfirm: \"Löschen bestätigen\",\n storageTooltip: \"{used} von {total} verwendet ({remaining} verfügbar)\",\n },\n};\n\nexport default de;\n"],"mappings":";AAEA,IAAMA,IAAgB,EACpB,cAAc;CACZ,OAAO;CACP,mBAAmB;CACnB,UAAU;CACV,WAAW;CACX,cAAc;CACd,iBAAiB;CACjB,cAAc;CACd,aAAa;CACb,WAAW;CACX,YAAY;CACZ,SAAS;CACT,iBAAiB;CACjB,aAAa;CACb,iBAAiB;CACjB,wBAAwB;CACxB,gBAAgB;CAChB,WAAW;CACX,mBAAmB;CACnB,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,SAAS;CACT,QAAQ;CACR,aAAa;CACb,cAAc;CACd,cAAc;CACd,eAAe;CACf,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,cAAc;CACd,aAAa;CACb,cAAc;CACd,cAAc;CACd,YAAY;CACZ,eAAe;CACf,eAAe;CACf,YAAY;CACZ,UAAU;CACV,UAAU;CACV,SAAS;CACT,oBAAoB;CACpB,aAAa;CACb,QAAQ;CACR,gBAAgB;CAChB,oBAAoB;CACpB,sBACE;CACF,wBACE;CACF,cAAc;CACd,iBAAiB;CACjB,UAAU;CACV,UAAU;CACV,aAAa;CACb,aAAa;CACb,eAAe;CACf,sBAAsB;CACtB,QAAQ;CACR,WAAW;CACX,aAAa;CACb,aAAa;CACb,qBAAqB;CACrB,uBACE;CACF,yBACE;CACF,mBAAmB;CACnB,SAAS;CACT,WAAW;CACX,cAAc;CACd,QAAQ;CACR,eACE;CACF,eACE;CACF,iBAAiB;CACjB,UAAU;CACV,YAAY;CACZ,iBAAiB;CACjB,kBAAkB;CAClB,cAAc;CACd,cAAc;CACd,eAAe;CACf,gBAAgB;CAChB,YAAY;CACZ,cAAc;CACd,OAAO;CACP,iBAAiB;CACjB,iBAAiB;CACjB,oBAAoB;CACpB,SAAS;CACT,cAAc;CACd,gBAAgB;CAChB,cAAc;CACd,qBAAqB;CACrB,gBAAgB;AAClB,EACF"}
|