@templatical/editor 0.33.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-J7WsHRDS.js → AiChatSidebar-CkHJ28sf.js} +3 -3
- package/dist/{AiFeatureMenu-C9mxL_7U.js → AiFeatureMenu-DWdKguDN.js} +3 -3
- package/dist/{BlockIssueBadge-BI6v_eol.js → BlockIssueBadge-DcyHTAqw.js} +2 -2
- package/dist/{BlockPreviewCanvas-mZIr9mY2.js → BlockPreviewCanvas-B621ANn9.js} +4 -4
- package/dist/{CloudHeaderExtras-CLtTtK12.js → CloudHeaderExtras-BJ3Cebhv.js} +2 -2
- package/dist/{CloudPanels-BbLAX1jH.js → CloudPanels-BGz9ygo6.js} +6 -6
- package/dist/{CollaboratorBar-OBbLOhLK.js → CollaboratorBar-KphmSQeZ.js} +2 -2
- package/dist/{ColorPicker-Cs7iK01u.js → ColorPicker-C6EOwtHC.js} +5 -5
- package/dist/{CommentsPanel-G_uNzi1a.js → CommentsPanel-DmWh8f08.js} +1 -1
- package/dist/{CommentsSidebar-DlFlpfkU.js → CommentsSidebar-CL_tffzT.js} +4 -4
- package/dist/{CountdownBlock-Bdt8qZi1.js → CountdownBlock-D1fsNsyS.js} +1 -1
- package/dist/{CountdownToolbar-BWLYViOm.js → CountdownToolbar-B8J4i5Xp.js} +2 -2
- package/dist/{DesignReferenceSidebar-CK_xTLh2.js → DesignReferenceSidebar-BDhEeaAh.js} +4 -4
- package/dist/{IssuesPanel-DIbJ_jaa.js → IssuesPanel-CiOjeRFI.js} +4 -4
- package/dist/MergeTagInput-RytOlh1A.js +448 -0
- package/dist/{MergeTagModeToggle-DeI65T5k.js → MergeTagModeToggle-Bi-FydXj.js} +2 -2
- package/dist/{ParagraphEditor-Dr-u72hu.js → ParagraphEditor-C87tkmtE.js} +12 -12
- package/dist/{RestoreVersionDialog-6sBYYt9f.js → RestoreVersionDialog-Db5rZRMA.js} +2 -2
- package/dist/RichTextEditorContent-BmTcV2-a.js +152 -0
- package/dist/{SaveBlockDialog-DABN4-Jf.js → SaveBlockDialog-CDCzx6Bo.js} +16 -16
- package/dist/{SavedBlocksBrowserModal-BoylzTEq.js → SavedBlocksBrowserModal-DQR6kJB1.js} +101 -101
- package/dist/{SavedBlocksPanels-2np4Yu1H.js → SavedBlocksPanels-DFzV0CRD.js} +1 -1
- package/dist/{SavedBlocksPickBar-BM7aTSK2.js → SavedBlocksPickBar-XyXmnSnO.js} +2 -2
- package/dist/{TemplateScoringPanel-CzWoSM1V.js → TemplateScoringPanel-CpyEKMzC.js} +4 -4
- package/dist/{TestEmailModal-Cb0n7Dhj.js → TestEmailModal-DIfJy9eE.js} +8 -8
- package/dist/{TestEmailPanel-52HjvuU7.js → TestEmailPanel-C8Wx5yPS.js} +1 -1
- package/dist/{TitleEditor-_taBpBfB.js → TitleEditor-iNFOisr4.js} +11 -11
- package/dist/{TplModal-CEYnwBBk.js → TplModal-CowM3o_F.js} +5 -5
- package/dist/{VersionHistoryMenu-CsGlLSO8.js → VersionHistoryMenu-CV90OhXs.js} +2 -2
- package/dist/{VersionHistoryPanels-DPmYk00L.js → VersionHistoryPanels-BE3pplJG.js} +1 -1
- package/dist/{VersionPreviewBanner-VGJbEoXj.js → VersionPreviewBanner-BwUWBtlH.js} +1 -1
- package/dist/{blockTypeIcons-IhdBwbxp.js → blockTypeIcons-DQsKtHik.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiChatSidebar-6S5LPyRW.js → AiChatSidebar-BEnIWn6s.js} +4 -4
- package/dist/cdn/chunks/AiChatSidebar-BEnIWn6s.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu-BHCtjIfV.js → AiFeatureMenu-DMl23akc.js} +4 -4
- package/dist/cdn/chunks/{AiFeatureMenu-BHCtjIfV.js.map → AiFeatureMenu-DMl23akc.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-2-os120N.js → BlockIssueBadge-CloK4k3M.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-2-os120N.js.map → BlockIssueBadge-CloK4k3M.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-CYNs-Yn-.js → BlockPreviewCanvas-DSiJFJa0.js} +5 -5
- package/dist/cdn/chunks/{BlockPreviewCanvas-CYNs-Yn-.js.map → BlockPreviewCanvas-DSiJFJa0.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DrbFk6Fy.js → CloudHeaderExtras-b4KpVeUN.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-DrbFk6Fy.js.map → CloudHeaderExtras-b4KpVeUN.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-CpzYrAPQ.js → CloudPanels-DzwOq9lp.js} +7 -7
- package/dist/cdn/chunks/CloudPanels-DzwOq9lp.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-VMTCYn_z.js → CollaboratorBar-WXKvpoGK.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-VMTCYn_z.js.map → CollaboratorBar-WXKvpoGK.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-B0l_UF8G.js → ColorPicker-BubTDiS1.js} +6 -6
- package/dist/cdn/chunks/{ColorPicker-B0l_UF8G.js.map → ColorPicker-BubTDiS1.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CXMMdLrO.js → CommentsPanel-DAA2VqX4.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-CXMMdLrO.js.map → CommentsPanel-DAA2VqX4.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CGkhAJUW.js → CommentsSidebar-Ci0M2ePp.js} +5 -5
- package/dist/cdn/chunks/CommentsSidebar-Ci0M2ePp.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-CPe1ulzk.js → CountdownBlock-rK055jpy.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-CPe1ulzk.js.map → CountdownBlock-rK055jpy.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-D5xyNd5V.js → CountdownToolbar-CzZq26Vp.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-D5xyNd5V.js.map → CountdownToolbar-CzZq26Vp.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-D1NH1WRv.js → DesignReferenceSidebar-C_ehdX5C.js} +5 -5
- package/dist/cdn/chunks/DesignReferenceSidebar-C_ehdX5C.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-07SBSZVN.js → IssuesPanel-BXAN2_al.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-07SBSZVN.js.map → IssuesPanel-BXAN2_al.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagInput-1vcI9uQH.js +419 -0
- package/dist/cdn/chunks/MergeTagInput-1vcI9uQH.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagModeToggle-Bg8eO5nc.js → MergeTagModeToggle-B_mUYJo4.js} +3 -3
- package/dist/cdn/chunks/{MergeTagModeToggle-Bg8eO5nc.js.map → MergeTagModeToggle-B_mUYJo4.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-x2LTi6DN.js → ParagraphEditor-DCDHMcmx.js} +10 -10
- package/dist/cdn/chunks/ParagraphEditor-DCDHMcmx.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog--SjTV0_4.js → RestoreVersionDialog-BkSSwf-Q.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog--SjTV0_4.js.map → RestoreVersionDialog-BkSSwf-Q.js.map} +1 -1
- package/dist/cdn/chunks/RichTextEditorContent-S4KogjIj.js +122 -0
- package/dist/cdn/chunks/RichTextEditorContent-S4KogjIj.js.map +1 -0
- package/dist/cdn/chunks/{SaveBlockDialog-CS1lqdsQ.js → SaveBlockDialog-BH774Nt0.js} +14 -14
- package/dist/cdn/chunks/{SaveBlockDialog-CS1lqdsQ.js.map → SaveBlockDialog-BH774Nt0.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D6nDZ4rq.js → SavedBlocksBrowserModal-CSUqw_dD.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D6nDZ4rq.js.map → SavedBlocksBrowserModal-CSUqw_dD.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-DdkwvYRR.js → SavedBlocksPanels-B6ApbCjG.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-DdkwvYRR.js.map → SavedBlocksPanels-B6ApbCjG.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BLQr_6WM.js → SavedBlocksPickBar-C9MXSRcR.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-BLQr_6WM.js.map → SavedBlocksPickBar-C9MXSRcR.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-CDC-JC6C.js → TemplateScoringPanel-QVOxc9TZ.js} +50 -50
- package/dist/cdn/chunks/TemplateScoringPanel-QVOxc9TZ.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-B2LcU11Y.js → TestEmailModal-_CZvaO58.js} +9 -9
- package/dist/cdn/chunks/{TestEmailModal-B2LcU11Y.js.map → TestEmailModal-_CZvaO58.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-ByqDSx8B.js → TestEmailPanel-DXLxvyrD.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-ByqDSx8B.js.map → TestEmailPanel-DXLxvyrD.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DCoulgN8.js → TitleEditor-BuCOahW3.js} +9 -9
- package/dist/cdn/chunks/TitleEditor-BuCOahW3.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-CxQDl-tN.js → TplModal-CqY8R3hn.js} +6 -6
- package/dist/cdn/chunks/TplModal-CqY8R3hn.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-BOy8aMB6.js → VersionHistoryMenu-DDjIBvad.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryMenu-BOy8aMB6.js.map → VersionHistoryMenu-DDjIBvad.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BPLhzW9c.js → VersionHistoryPanels-BuTw04T5.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-BPLhzW9c.js.map → VersionHistoryPanels-BuTw04T5.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-CYC9qP2i.js → VersionPreviewBanner-fGAv20qI.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-CYC9qP2i.js.map → VersionPreviewBanner-fGAv20qI.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-CbSqoOba.js → createCloudRuntime-JFE-sxbT.js} +2 -2
- package/dist/cdn/chunks/{createCloudRuntime-CbSqoOba.js.map → createCloudRuntime-JFE-sxbT.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-CeP0iOPC.js → extensions-7z04EIGg.js} +3 -3
- package/dist/cdn/chunks/{extensions-CeP0iOPC.js.map → extensions-7z04EIGg.js.map} +1 -1
- package/dist/cdn/chunks/{keys-O8clwJ41.js → keys-DQp8x7Nx.js} +4 -4
- package/dist/cdn/chunks/{keys-O8clwJ41.js.map → keys-DQp8x7Nx.js.map} +1 -1
- package/dist/cdn/chunks/{src-C1lP5sIe.js → src-CiAi5oRe.js} +2 -2
- package/dist/cdn/chunks/{src-C1lP5sIe.js.map → src-CiAi5oRe.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-ZBEJvkf4.js → useCloudI18n-MxgHWrV6.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-ZBEJvkf4.js.map → useCloudI18n-MxgHWrV6.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CZxGbZmY.js → useEditorCore-ehUSEsbw.js} +503 -500
- package/dist/cdn/chunks/useEditorCore-ehUSEsbw.js.map +1 -0
- package/dist/cdn/chunks/{useEditorRoot-DVV-EsNI.js → useEditorRoot-CteADR3y.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-DVV-EsNI.js.map → useEditorRoot-CteADR3y.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DCbvHv6W.js → useI18n-Ct1VIFcf.js} +2 -2
- package/dist/cdn/chunks/{useI18n-DCbvHv6W.js.map → useI18n-Ct1VIFcf.js.map} +1 -1
- package/dist/cdn/chunks/useMergeTag-TLhF2fGK.js +46 -0
- package/dist/cdn/chunks/useMergeTag-TLhF2fGK.js.map +1 -0
- package/dist/cdn/chunks/{usePopoverPosition-Ozg5iU3y.js → usePopoverPosition-BxVWE5_0.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-Ozg5iU3y.js.map → usePopoverPosition-BxVWE5_0.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CrUCYsIc.js → useScrollToBlock-Cz3fpgTK.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-CrUCYsIc.js.map → useScrollToBlock-Cz3fpgTK.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1672 -2075
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{createCloudRuntime-j6a9Z-vL.js → createCloudRuntime-DbTFm1ES.js} +1 -1
- package/dist/{extensions-5xeZR9U9.js → extensions-Mf8iHey9.js} +2 -2
- package/dist/{keys-BJJ4hJ4z.js → keys-C3P1yxnr.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +1835 -2239
- package/dist/{useCloudI18n-DaKcDMDz.js → useCloudI18n-BKoiYsWZ.js} +1 -1
- package/dist/{useEditorCore-BWrxHVKW.js → useEditorCore-DdkQuTHl.js} +1068 -1065
- package/dist/{useEditorRoot-E-oxHaEI.js → useEditorRoot-DkRGTQRs.js} +1 -1
- package/dist/{useI18n-DUVIAju4.js → useI18n-CL6RfPzK.js} +1 -1
- package/dist/useMergeTag-gSuYus-M.js +44 -0
- package/dist/{usePopoverPosition-APlWgXoQ.js → usePopoverPosition-CWxaIWd3.js} +1 -1
- package/dist/{useScrollToBlock--AzCOzlg.js → useScrollToBlock-CdI8fGqt.js} +1 -1
- package/package.json +7 -7
- package/dist/RichTextEditorContent-DKLVe6Io.js +0 -153
- package/dist/cdn/chunks/AiChatSidebar-6S5LPyRW.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-CpzYrAPQ.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-CGkhAJUW.js.map +0 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-D1NH1WRv.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-x2LTi6DN.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-CzdMJ1c9.js +0 -123
- package/dist/cdn/chunks/RichTextEditorContent-CzdMJ1c9.js.map +0 -1
- package/dist/cdn/chunks/TemplateScoringPanel-CDC-JC6C.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-DCoulgN8.js.map +0 -1
- package/dist/cdn/chunks/TplModal-CxQDl-tN.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CZxGbZmY.js.map +0 -1
- package/dist/cdn/chunks/useMergeTag-CbuagYNK.js +0 -46
- package/dist/cdn/chunks/useMergeTag-CbuagYNK.js.map +0 -1
- package/dist/scan-line-E7w4yQyv.js +0 -31
- package/dist/useMergeTag-CuZZeiSE.js +0 -44
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestEmailPanel-
|
|
1
|
+
{"version":3,"file":"TestEmailPanel-DXLxvyrD.js","names":[],"sources":["../../../src/components/TestEmailPanel.vue","../../../src/components/TestEmailPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Mount point for the test-email dialog, shared by the OSS and Cloud editors.\n *\n * The dialog is `defineAsyncComponent` behind a `v-if` on its open state, so its\n * chunk is fetched only when the user actually opens it — `defineAsyncComponent`\n * triggers its `import()` on first render, not at definition time. `Editor.vue`\n * in turn lazy-loads *this* wrapper and renders it only when a\n * `TestEmailProvider` is configured, so a consumer without one downloads none\n * of it.\n *\n * Never static-import `TestEmailModal` into `Editor.vue`:\n * that collapses it into the main entry for every consumer, including those who\n * never configure a sender. Guarded by `tests/cdn-chunk-granularity.test.ts`.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseTestEmailFeatureReturn } from \"../composables/useTestEmailFeature\";\n\nconst props = defineProps<{\n feature: UseTestEmailFeatureReturn;\n}>();\n\nconst TestEmailModal = defineAsyncComponent(\n () => import(\"./TestEmailModal.vue\"),\n);\n\nfunction handleSend(recipient: string): void {\n void props.feature.send(recipient);\n}\n</script>\n\n<template>\n <TestEmailModal\n v-if=\"feature.isModalOpen.value\"\n :visible=\"feature.isModalOpen.value\"\n :allowed-recipients=\"feature.allowedRecipients.value\"\n :default-recipient=\"feature.defaultRecipient.value\"\n :is-sending=\"feature.isSending.value\"\n :just-sent=\"feature.justSent.value\"\n :error=\"feature.error.value\"\n @send=\"handleSend\"\n @close=\"feature.close()\"\n />\n</template>\n","<script setup lang=\"ts\">\n/**\n * Mount point for the test-email dialog, shared by the OSS and Cloud editors.\n *\n * The dialog is `defineAsyncComponent` behind a `v-if` on its open state, so its\n * chunk is fetched only when the user actually opens it — `defineAsyncComponent`\n * triggers its `import()` on first render, not at definition time. `Editor.vue`\n * in turn lazy-loads *this* wrapper and renders it only when a\n * `TestEmailProvider` is configured, so a consumer without one downloads none\n * of it.\n *\n * Never static-import `TestEmailModal` into `Editor.vue`:\n * that collapses it into the main entry for every consumer, including those who\n * never configure a sender. Guarded by `tests/cdn-chunk-granularity.test.ts`.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseTestEmailFeatureReturn } from \"../composables/useTestEmailFeature\";\n\nconst props = defineProps<{\n feature: UseTestEmailFeatureReturn;\n}>();\n\nconst TestEmailModal = defineAsyncComponent(\n () => import(\"./TestEmailModal.vue\"),\n);\n\nfunction handleSend(recipient: string): void {\n void props.feature.send(recipient);\n}\n</script>\n\n<template>\n <TestEmailModal\n v-if=\"feature.isModalOpen.value\"\n :visible=\"feature.isModalOpen.value\"\n :allowed-recipients=\"feature.allowedRecipients.value\"\n :default-recipient=\"feature.defaultRecipient.value\"\n :is-sending=\"feature.isSending.value\"\n :just-sent=\"feature.justSent.value\"\n :error=\"feature.error.value\"\n @send=\"handleSend\"\n @close=\"feature.close()\"\n />\n</template>\n"],"mappings":";;;;;;;EAkBA,IAAM,IAAQ,GAIR,IAAiB,QACf,OAAO,+BACf;EAEA,SAAS,EAAW,GAAyB;GAC3C,EAAW,QAAQ,KAAK,CAAS;EACnC;mBAKU,EAAA,QAAQ,YAAY,SAD5B,EAAA,GAAA,EAUE,EAAA,CAAA,GAAA;;GARC,SAAS,EAAA,QAAQ,YAAY;GAC7B,sBAAoB,EAAA,QAAQ,kBAAkB;GAC9C,qBAAmB,EAAA,QAAQ,iBAAiB;GAC5C,cAAY,EAAA,QAAQ,UAAU;GAC9B,aAAW,EAAA,QAAQ,SAAS;GAC5B,OAAO,EAAA,QAAQ,MAAM;GACrB,QAAM;GACN,SAAK,AAAA,EAAA,QAAA,MAAE,EAAA,QAAQ,MAAK"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { E as e, N as t, S as n, at as r, b as i, ct as a, d as o, f as s, g as c, h as l, lt as u, m as d, p as f, q as p, u as m, ut as h, y as g } from "./draggable-kbOhCgnk.js";
|
|
2
|
-
import { S as ee, x as te } from "./useEditorCore-
|
|
3
|
-
import {
|
|
4
|
-
import { t as b } from "./useI18n-
|
|
5
|
-
import { n as x } from "./usePopoverPosition-
|
|
2
|
+
import { S as ee, x as te } from "./useEditorCore-ehUSEsbw.js";
|
|
3
|
+
import { K as ne, O as _, U as v, w as y } from "./keys-DQp8x7Nx.js";
|
|
4
|
+
import { t as b } from "./useI18n-Ct1VIFcf.js";
|
|
5
|
+
import { n as x } from "./usePopoverPosition-BxVWE5_0.js";
|
|
6
6
|
import { P as re, Rt as ie, Vt as ae, ct as oe, it as se, ut as ce } from "./icons-SP5Itd-A.js";
|
|
7
|
-
import { n as S, t as C } from "./RichTextEditorContent-
|
|
7
|
+
import { n as S, t as C } from "./RichTextEditorContent-S4KogjIj.js";
|
|
8
8
|
//#region src/components/blocks/TitleEditor.vue?vue&type=script&setup=true&lang.ts
|
|
9
9
|
var w = { class: "tpl-text-editor-wrapper tpl:relative" }, T = ["data-tpl-theme", "aria-label"], E = ["aria-label", "title"], D = ["aria-label", "title"], O = ["aria-label", "title"], k = {
|
|
10
10
|
key: 0,
|
|
@@ -23,7 +23,7 @@ var w = { class: "tpl-text-editor-wrapper tpl:relative" }, T = ["data-tpl-theme"
|
|
|
23
23
|
},
|
|
24
24
|
emits: ["done"],
|
|
25
25
|
setup(n, { emit: P }) {
|
|
26
|
-
let F = n, I = P, L = e(
|
|
26
|
+
let F = n, I = P, L = e(v, null), R = e(ne, null), z = x(), B = e(_, null), V = e(y, null), le = s(() => (B?.isOpen.value ?? !1) || (V?.isOpen.value ?? !1)), { t: H } = b(), { editor: U, EditorContent: W, isLoading: G, initError: ue, retry: de, showLinkDialog: fe, linkUrl: K, linkColor: q, linkDialogRef: J, canRequestMergeTag: Y, canInsertLogicTag: X, openLinkDialog: Z, insertLink: pe, removeLink: me, closeLinkDialog: he, handleLinkKeydown: ge, handleAddMergeTag: Q, handleAddLogicTag: $ } = te({
|
|
27
27
|
blockId: () => F.block.id,
|
|
28
28
|
blockContent: () => F.block.content,
|
|
29
29
|
onDone: () => I("done"),
|
|
@@ -33,7 +33,7 @@ var w = { class: "tpl-text-editor-wrapper tpl:relative" }, T = ["data-tpl-theme"
|
|
|
33
33
|
import("./tiptap-Epe8m3Vo.js").then((e) => e.r),
|
|
34
34
|
import("./tiptap-Epe8m3Vo.js").then((e) => e.i),
|
|
35
35
|
import("./tiptap-Epe8m3Vo.js").then((e) => e.l),
|
|
36
|
-
import("./extensions-
|
|
36
|
+
import("./extensions-7z04EIGg.js")
|
|
37
37
|
]);
|
|
38
38
|
return {
|
|
39
39
|
TiptapEditor: a,
|
|
@@ -81,7 +81,7 @@ var w = { class: "tpl-text-editor-wrapper tpl:relative" }, T = ["data-tpl-theme"
|
|
|
81
81
|
"data-tpl-theme": r(R),
|
|
82
82
|
role: "toolbar",
|
|
83
83
|
"aria-label": r(H).titleEditor.toolbar,
|
|
84
|
-
class: "tpl tpl-text-toolbar tpl:absolute tpl:
|
|
84
|
+
class: "tpl tpl-text-toolbar tpl:absolute tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
85
85
|
style: u({
|
|
86
86
|
...r(L),
|
|
87
87
|
top: `${n.toolbarPosition.top}px`,
|
|
@@ -196,4 +196,4 @@ var w = { class: "tpl-text-editor-wrapper tpl:relative" }, T = ["data-tpl-theme"
|
|
|
196
196
|
//#endregion
|
|
197
197
|
export { P as default };
|
|
198
198
|
|
|
199
|
-
//# sourceMappingURL=TitleEditor-
|
|
199
|
+
//# sourceMappingURL=TitleEditor-BuCOahW3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleEditor-BuCOahW3.js","names":[],"sources":["../../../src/components/blocks/TitleEditor.vue","../../../src/components/blocks/TitleEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useI18n } from \"../../composables\";\nimport { useRichTextEditor } from \"../../composables/useRichTextEditor\";\nimport { usePopoverRoot } from \"../../composables/usePopoverRoot\";\nimport type { TitleBlock as TitleBlockType } from \"@templatical/types\";\nimport {\n Bold,\n Braces,\n Italic,\n Link,\n LoaderCircle,\n ScanLine,\n} from \"@lucide/vue\";\nimport { computed, inject } from \"vue\";\nimport {\n THEME_STYLES_KEY,\n UI_THEME_KEY,\n MERGE_TAG_PICKER_KEY,\n LOGIC_TAG_PICKER_KEY,\n} from \"../../keys\";\nimport RichTextLinkDialog from \"./RichTextLinkDialog.vue\";\nimport RichTextEditorContent from \"./RichTextEditorContent.vue\";\nimport { withLinkColor } from \"../../utils/linkColorExtension\";\n\nconst props = defineProps<{\n block: TitleBlockType;\n toolbarPosition: { top: number; left: number };\n}>();\n\nconst emit = defineEmits<{\n (e: \"done\"): void;\n}>();\n\nconst themeStyles = inject(THEME_STYLES_KEY, null);\nconst tplUiTheme = inject(UI_THEME_KEY, null);\nconst popoverRoot = usePopoverRoot();\n// Hide the floating toolbar while either built-in picker modal is open — see\n// ParagraphToolbar.vue for the same rationale.\nconst picker = inject(MERGE_TAG_PICKER_KEY, null);\nconst logicPicker = inject(LOGIC_TAG_PICKER_KEY, null);\nconst pickerIsOpen = computed(\n () => (picker?.isOpen.value ?? false) || (logicPicker?.isOpen.value ?? false),\n);\n\nconst { t } = useI18n();\n\nconst {\n editor,\n EditorContent,\n isLoading,\n initError,\n retry,\n showLinkDialog,\n linkUrl,\n linkColor,\n linkDialogRef,\n canRequestMergeTag,\n canInsertLogicTag,\n openLinkDialog,\n insertLink,\n removeLink,\n closeLinkDialog,\n handleLinkKeydown,\n handleAddMergeTag,\n handleAddLogicTag,\n} = useRichTextEditor({\n blockId: () => props.block.id,\n blockContent: () => props.block.content,\n onDone: () => emit(\"done\"),\n editorName: \"TitleEditor\",\n async loadExtensions({\n mergeTags,\n syntax,\n triggerChar,\n autocompleteEnabled,\n suggestionEmptyText,\n }) {\n const [\n { Editor: TiptapEditor, EditorContent: EC },\n { default: StarterKit },\n { default: LinkExt },\n { MergeTagNode, MergeTagSuggestion, LogicMergeTagNode, LineBoundaryKeys },\n ] = await Promise.all([\n import(\"@tiptap/vue-3\"),\n import(\"@tiptap/starter-kit\"),\n import(\"@tiptap/extension-link\"),\n import(\"../../extensions\"),\n ]);\n\n return {\n TiptapEditor,\n EC,\n extensions: [\n StarterKit.configure({\n heading: false,\n codeBlock: false,\n blockquote: false,\n horizontalRule: false,\n bulletList: false,\n orderedList: false,\n listItem: false,\n strike: false,\n // StarterKit bundles @tiptap/extension-link (openOnClick: true).\n // Disable it so the LinkExt below (openOnClick: false) is the only\n // link extension — otherwise clicking a link while editing opens it.\n link: false,\n }),\n withLinkColor(LinkExt).configure({\n openOnClick: false,\n HTMLAttributes: {\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n },\n }),\n MergeTagNode.configure({ mergeTags, syntax }),\n LogicMergeTagNode.configure({ syntax }),\n LineBoundaryKeys,\n ...(autocompleteEnabled && triggerChar && mergeTags.length > 0\n ? [\n MergeTagSuggestion.configure({\n mergeTags,\n char: triggerChar,\n emptyText: suggestionEmptyText,\n popoverRoot,\n }),\n ]\n : []),\n ],\n };\n },\n});\n</script>\n\n<template>\n <div class=\"tpl-text-editor-wrapper tpl:relative\">\n <Teleport v-if=\"popoverRoot && !pickerIsOpen\" :to=\"popoverRoot\">\n <div\n :data-tpl-theme=\"tplUiTheme\"\n role=\"toolbar\"\n :aria-label=\"t.titleEditor.toolbar\"\n class=\"tpl tpl-text-toolbar tpl:absolute tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"{\n ...themeStyles,\n top: `${toolbarPosition.top}px`,\n left: `${toolbarPosition.left}px`,\n transform: 'translateY(-100%)',\n }\"\n >\n <template v-if=\"!isLoading && editor\">\n <!-- Bold -->\n <button\n type=\"button\"\n class=\"tpl-text-toolbar-btn\"\n :class=\"{\n 'tpl-text-toolbar-btn--active': editor?.isActive('bold'),\n }\"\n :aria-label=\"t.titleEditor.bold\"\n :title=\"t.titleEditor.bold\"\n @click=\"editor?.chain().focus().toggleBold().run()\"\n >\n <Bold :size=\"16\" :stroke-width=\"2.5\" />\n </button>\n <!-- Italic -->\n <button\n type=\"button\"\n class=\"tpl-text-toolbar-btn\"\n :class=\"{\n 'tpl-text-toolbar-btn--active': editor?.isActive('italic'),\n }\"\n :aria-label=\"t.titleEditor.italic\"\n :title=\"t.titleEditor.italic\"\n @click=\"editor?.chain().focus().toggleItalic().run()\"\n >\n <Italic :size=\"16\" :stroke-width=\"2\" />\n </button>\n <span\n class=\"tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]\"\n aria-hidden=\"true\"\n ></span>\n <!-- Link -->\n <button\n type=\"button\"\n class=\"tpl-text-toolbar-btn\"\n :class=\"{\n 'tpl-text-toolbar-btn--active': editor?.isActive('link'),\n }\"\n :aria-label=\"t.titleEditor.addLink\"\n :title=\"t.titleEditor.addLink\"\n @click=\"openLinkDialog\"\n >\n <Link :size=\"16\" :stroke-width=\"2\" />\n </button>\n <!-- Add Merge Tag -->\n <span\n v-if=\"canRequestMergeTag\"\n class=\"tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]\"\n ></span>\n <button\n v-if=\"canRequestMergeTag\"\n type=\"button\"\n class=\"tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-active)]\"\n :aria-label=\"t.mergeTag.insert\"\n :title=\"t.mergeTag.insert\"\n @click=\"handleAddMergeTag\"\n >\n <ScanLine :size=\"16\" :stroke-width=\"2\" />\n {{ t.mergeTag.insertShort }}\n </button>\n <!-- Insert Logic -->\n <span\n v-if=\"canInsertLogicTag\"\n class=\"tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]\"\n ></span>\n <button\n v-if=\"canInsertLogicTag\"\n type=\"button\"\n class=\"tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-active)]\"\n :aria-label=\"t.logicTag.insert\"\n :title=\"t.logicTag.insert\"\n data-testid=\"insert-logic-button\"\n @click=\"handleAddLogicTag\"\n >\n <Braces :size=\"16\" :stroke-width=\"2\" />\n {{ t.logicTag.insertShort }}\n </button>\n </template>\n <template v-else>\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n >\n <LoaderCircle class=\"tpl-spinner\" :size=\"14\" :stroke-width=\"2\" />\n {{ t.errors.editorLoading }}\n </div>\n </template>\n </div>\n </Teleport>\n\n <RichTextEditorContent\n :editor=\"editor\"\n :editor-content=\"EditorContent\"\n :is-loading=\"isLoading\"\n :init-error=\"initError\"\n @retry=\"retry\"\n />\n\n <RichTextLinkDialog\n :visible=\"showLinkDialog\"\n :is-editing-link=\"editor?.isActive('link') ?? false\"\n v-model:dialog-ref=\"linkDialogRef\"\n v-model:link-url=\"linkUrl\"\n v-model:link-color=\"linkColor\"\n @close=\"closeLinkDialog\"\n @insert=\"insertLink\"\n @remove=\"removeLink\"\n @keydown=\"handleLinkKeydown\"\n />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../../composables\";\nimport { useRichTextEditor } from \"../../composables/useRichTextEditor\";\nimport { usePopoverRoot } from \"../../composables/usePopoverRoot\";\nimport type { TitleBlock as TitleBlockType } from \"@templatical/types\";\nimport {\n Bold,\n Braces,\n Italic,\n Link,\n LoaderCircle,\n ScanLine,\n} from \"@lucide/vue\";\nimport { computed, inject } from \"vue\";\nimport {\n THEME_STYLES_KEY,\n UI_THEME_KEY,\n MERGE_TAG_PICKER_KEY,\n LOGIC_TAG_PICKER_KEY,\n} from \"../../keys\";\nimport RichTextLinkDialog from \"./RichTextLinkDialog.vue\";\nimport RichTextEditorContent from \"./RichTextEditorContent.vue\";\nimport { withLinkColor } from \"../../utils/linkColorExtension\";\n\nconst props = defineProps<{\n block: TitleBlockType;\n toolbarPosition: { top: number; left: number };\n}>();\n\nconst emit = defineEmits<{\n (e: \"done\"): void;\n}>();\n\nconst themeStyles = inject(THEME_STYLES_KEY, null);\nconst tplUiTheme = inject(UI_THEME_KEY, null);\nconst popoverRoot = usePopoverRoot();\n// Hide the floating toolbar while either built-in picker modal is open — see\n// ParagraphToolbar.vue for the same rationale.\nconst picker = inject(MERGE_TAG_PICKER_KEY, null);\nconst logicPicker = inject(LOGIC_TAG_PICKER_KEY, null);\nconst pickerIsOpen = computed(\n () => (picker?.isOpen.value ?? false) || (logicPicker?.isOpen.value ?? false),\n);\n\nconst { t } = useI18n();\n\nconst {\n editor,\n EditorContent,\n isLoading,\n initError,\n retry,\n showLinkDialog,\n linkUrl,\n linkColor,\n linkDialogRef,\n canRequestMergeTag,\n canInsertLogicTag,\n openLinkDialog,\n insertLink,\n removeLink,\n closeLinkDialog,\n handleLinkKeydown,\n handleAddMergeTag,\n handleAddLogicTag,\n} = useRichTextEditor({\n blockId: () => props.block.id,\n blockContent: () => props.block.content,\n onDone: () => emit(\"done\"),\n editorName: \"TitleEditor\",\n async loadExtensions({\n mergeTags,\n syntax,\n triggerChar,\n autocompleteEnabled,\n suggestionEmptyText,\n }) {\n const [\n { Editor: TiptapEditor, EditorContent: EC },\n { default: StarterKit },\n { default: LinkExt },\n { MergeTagNode, MergeTagSuggestion, LogicMergeTagNode, LineBoundaryKeys },\n ] = await Promise.all([\n import(\"@tiptap/vue-3\"),\n import(\"@tiptap/starter-kit\"),\n import(\"@tiptap/extension-link\"),\n import(\"../../extensions\"),\n ]);\n\n return {\n TiptapEditor,\n EC,\n extensions: [\n StarterKit.configure({\n heading: false,\n codeBlock: false,\n blockquote: false,\n horizontalRule: false,\n bulletList: false,\n orderedList: false,\n listItem: false,\n strike: false,\n // StarterKit bundles @tiptap/extension-link (openOnClick: true).\n // Disable it so the LinkExt below (openOnClick: false) is the only\n // link extension — otherwise clicking a link while editing opens it.\n link: false,\n }),\n withLinkColor(LinkExt).configure({\n openOnClick: false,\n HTMLAttributes: {\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n },\n }),\n MergeTagNode.configure({ mergeTags, syntax }),\n LogicMergeTagNode.configure({ syntax }),\n LineBoundaryKeys,\n ...(autocompleteEnabled && triggerChar && mergeTags.length > 0\n ? [\n MergeTagSuggestion.configure({\n mergeTags,\n char: triggerChar,\n emptyText: suggestionEmptyText,\n popoverRoot,\n }),\n ]\n : []),\n ],\n };\n },\n});\n</script>\n\n<template>\n <div class=\"tpl-text-editor-wrapper tpl:relative\">\n <Teleport v-if=\"popoverRoot && !pickerIsOpen\" :to=\"popoverRoot\">\n <div\n :data-tpl-theme=\"tplUiTheme\"\n role=\"toolbar\"\n :aria-label=\"t.titleEditor.toolbar\"\n class=\"tpl tpl-text-toolbar tpl:absolute tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"{\n ...themeStyles,\n top: `${toolbarPosition.top}px`,\n left: `${toolbarPosition.left}px`,\n transform: 'translateY(-100%)',\n }\"\n >\n <template v-if=\"!isLoading && editor\">\n <!-- Bold -->\n <button\n type=\"button\"\n class=\"tpl-text-toolbar-btn\"\n :class=\"{\n 'tpl-text-toolbar-btn--active': editor?.isActive('bold'),\n }\"\n :aria-label=\"t.titleEditor.bold\"\n :title=\"t.titleEditor.bold\"\n @click=\"editor?.chain().focus().toggleBold().run()\"\n >\n <Bold :size=\"16\" :stroke-width=\"2.5\" />\n </button>\n <!-- Italic -->\n <button\n type=\"button\"\n class=\"tpl-text-toolbar-btn\"\n :class=\"{\n 'tpl-text-toolbar-btn--active': editor?.isActive('italic'),\n }\"\n :aria-label=\"t.titleEditor.italic\"\n :title=\"t.titleEditor.italic\"\n @click=\"editor?.chain().focus().toggleItalic().run()\"\n >\n <Italic :size=\"16\" :stroke-width=\"2\" />\n </button>\n <span\n class=\"tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]\"\n aria-hidden=\"true\"\n ></span>\n <!-- Link -->\n <button\n type=\"button\"\n class=\"tpl-text-toolbar-btn\"\n :class=\"{\n 'tpl-text-toolbar-btn--active': editor?.isActive('link'),\n }\"\n :aria-label=\"t.titleEditor.addLink\"\n :title=\"t.titleEditor.addLink\"\n @click=\"openLinkDialog\"\n >\n <Link :size=\"16\" :stroke-width=\"2\" />\n </button>\n <!-- Add Merge Tag -->\n <span\n v-if=\"canRequestMergeTag\"\n class=\"tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]\"\n ></span>\n <button\n v-if=\"canRequestMergeTag\"\n type=\"button\"\n class=\"tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-active)]\"\n :aria-label=\"t.mergeTag.insert\"\n :title=\"t.mergeTag.insert\"\n @click=\"handleAddMergeTag\"\n >\n <ScanLine :size=\"16\" :stroke-width=\"2\" />\n {{ t.mergeTag.insertShort }}\n </button>\n <!-- Insert Logic -->\n <span\n v-if=\"canInsertLogicTag\"\n class=\"tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]\"\n ></span>\n <button\n v-if=\"canInsertLogicTag\"\n type=\"button\"\n class=\"tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-active)]\"\n :aria-label=\"t.logicTag.insert\"\n :title=\"t.logicTag.insert\"\n data-testid=\"insert-logic-button\"\n @click=\"handleAddLogicTag\"\n >\n <Braces :size=\"16\" :stroke-width=\"2\" />\n {{ t.logicTag.insertShort }}\n </button>\n </template>\n <template v-else>\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n >\n <LoaderCircle class=\"tpl-spinner\" :size=\"14\" :stroke-width=\"2\" />\n {{ t.errors.editorLoading }}\n </div>\n </template>\n </div>\n </Teleport>\n\n <RichTextEditorContent\n :editor=\"editor\"\n :editor-content=\"EditorContent\"\n :is-loading=\"isLoading\"\n :init-error=\"initError\"\n @retry=\"retry\"\n />\n\n <RichTextLinkDialog\n :visible=\"showLinkDialog\"\n :is-editing-link=\"editor?.isActive('link') ?? false\"\n v-model:dialog-ref=\"linkDialogRef\"\n v-model:link-url=\"linkUrl\"\n v-model:link-color=\"linkColor\"\n @close=\"closeLinkDialog\"\n @insert=\"insertLink\"\n @remove=\"removeLink\"\n @keydown=\"handleLinkKeydown\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAwBA,IAAM,IAAQ,GAKR,IAAO,GAIP,IAAc,EAAO,GAAkB,IAAI,GAC3C,IAAa,EAAO,IAAc,IAAI,GACtC,IAAc,EAAe,GAG7B,IAAS,EAAO,GAAsB,IAAI,GAC1C,IAAc,EAAO,GAAsB,IAAI,GAC/C,KAAe,SACZ,GAAQ,OAAO,SAAS,QAAW,GAAa,OAAO,SAAS,GACzE,GAEM,EAAE,SAAM,EAAQ,GAEhB,EACJ,WACA,kBACA,cACA,eACA,WACA,oBACA,YACA,cACA,kBACA,uBACA,sBACA,mBACA,gBACA,gBACA,qBACA,uBACA,sBACA,yBACE,GAAkB;GACpB,eAAe,EAAM,MAAM;GAC3B,oBAAoB,EAAM,MAAM;GAChC,cAAc,EAAK,MAAM;GACzB,YAAY;GACZ,MAAM,eAAe,EACnB,cACA,WACA,gBACA,wBACA,0BACC;IACD,IAAM,CACJ,EAAE,QAAQ,GAAc,eAAe,KACvC,EAAE,SAAS,KACX,EAAE,SAAS,KACX,EAAE,iBAAc,uBAAoB,sBAAmB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,CAAA,CAAC,CAAC,OAAO,aAAa,GAAA,CAAA,CAAA,CAAA,EAAA,GAAA,IAAA,CAAA,CAAA,GAAA,GAAA,CAAA,IAAA,CAAA,KAAA,EAAA,IAAA,EAAA;GAMjC,EAME,GAAA;IALC,QAAQ,EAAA,CAAA;IACR,kBAAgB,EAAA,CAAA;IAChB,cAAY,EAAA,CAAA;IACZ,cAAY,EAAA,EAAA;IACZ,SAAO,EAAA,EAAA;;;;;;;;GAGV,EAUE,GAAA;IATC,SAAS,EAAA,EAAA;IACT,mBAAiB,EAAA,CAAA,CAAM,EAAE,SAAQ,MAAA,KAAA;IAC1B,cAAY,EAAA,CAAA;IAAA,sBAAA,AAAA,EAAA,QAAA,MAAA,EAAA,CAAA,IAAA,EAAa,QAAA,IAAA;IACzB,YAAU,EAAA,CAAA;IAAA,oBAAA,AAAA,EAAA,QAAA,MAAA,EAAA,CAAA,IAAA,EAAO,QAAA,IAAA;IACjB,cAAY,EAAA,CAAA;IAAA,sBAAA,AAAA,EAAA,QAAA,MAAA,EAAA,CAAA,IAAA,EAAS,QAAA,IAAA;IAC5B,SAAO,EAAA,EAAA;IACP,UAAQ,EAAA,EAAA;IACR,UAAQ,EAAA,EAAA;IACR,WAAS,EAAA,EAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
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-kbOhCgnk.js";
|
|
2
|
-
import { E as _ } from "./useEditorCore-
|
|
3
|
-
import {
|
|
4
|
-
import { n as b } from "./usePopoverPosition-
|
|
2
|
+
import { E as _ } from "./useEditorCore-ehUSEsbw.js";
|
|
3
|
+
import { K as v, U as y } from "./keys-DQp8x7Nx.js";
|
|
4
|
+
import { n as b } from "./usePopoverPosition-BxVWE5_0.js";
|
|
5
5
|
//#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var x = ["data-tpl-theme"], S = /* @__PURE__ */ a({
|
|
7
7
|
__name: "TplModal",
|
|
@@ -10,7 +10,7 @@ var x = ["data-tpl-theme"], S = /* @__PURE__ */ a({
|
|
|
10
10
|
setup(a, { emit: S }) {
|
|
11
11
|
let C = a, w = S, T = i(null), E = l(() => C.visible);
|
|
12
12
|
_(T, E);
|
|
13
|
-
let D = e(
|
|
13
|
+
let D = e(v), O = e(y, null), k = b();
|
|
14
14
|
function A(e) {
|
|
15
15
|
e.key === "Escape" && w("close"), w("keydown", e);
|
|
16
16
|
}
|
|
@@ -28,7 +28,7 @@ var x = ["data-tpl-theme"], S = /* @__PURE__ */ a({
|
|
|
28
28
|
default: t(() => [a.visible ? (r(), u("div", {
|
|
29
29
|
key: 0,
|
|
30
30
|
"data-tpl-theme": o(D),
|
|
31
|
-
class: "tpl tpl:fixed tpl:inset-0 tpl:z-
|
|
31
|
+
class: "tpl tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4",
|
|
32
32
|
style: p([{
|
|
33
33
|
"background-color": "var(--tpl-overlay)",
|
|
34
34
|
"backdrop-filter": "blur(8px)",
|
|
@@ -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-CqY8R3hn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TplModal-CqY8R3hn.js","names":[],"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,IAAM,IAAQ,GAIR,IAAO,GAKP,IAAY,EAAwB,IAAI,GACxC,IAAY,QAAe,EAAM,OAAO;EAC9C,EAAa,GAAW,CAAS;EAEjC,IAAM,IAAa,EAAO,CAAY,GAWhC,IAAc,EAAO,GAAkB,IAAI,GAC3C,IAAc,EAAe;EAEnC,SAAS,EAAc,GAA4B;GAIjD,AAHI,EAAM,QAAQ,YAChB,EAAK,OAAO,GAEd,EAAK,WAAW,CAAK;EACvB;mBAIkB,EAAA,CAAA,KAAhB,EAAA,GAAA,EA+EW,GAAA;;GA/EmB,IAAI,EAAA,CAAA;EAChC,GAAA,CAAA,EA6Ea,GAAA;GA5EX,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;GACf,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;;GAsCf,SAAA,QAgCM,CA/BE,EAAA,WADR,EAAA,GAAA,EAgCM,OAAA;;IA9BH,kBAAgB,EAAA,CAAA;IACjB,OAAM;IACN,OAIC,EAAA,CAJD;KAAA,oBAAA;KAAA,mBAAA;KAAA,2BAAA;IAAA,GAKQ,EAAA,CAAA,CAAW,CAAA;IAClB,SAAK,AAAA,EAAA,OAAA,GAAA,MAAO,EAAI,OAAA,GAAA,CAAA,MAAA,CAAA;IAChB,WAAS;GAcV,GAAA,CAAA,EAMM,OAAA;IALA,SAAA;IAAJ,KAAI;IACJ,OAAM;IACL,SAAK,AAAA,EAAA,OAAA,GAAA,MAAO,EAAI,OAAA,GAAA,CAAA,MAAA,CAAA;GAEjB,GAAA,CAAA,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,GAAA,CAAA,GAAA,IAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
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 c, f as l, g as u, h as d, l as f, n as p, p as m, u as h, ut as g, y as _ } from "./draggable-kbOhCgnk.js";
|
|
2
2
|
import { t as v } from "./dist-CAFTQ6Y2.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as b } from "./useI18n-
|
|
3
|
+
import { G as y } from "./keys-DQp8x7Nx.js";
|
|
4
|
+
import { t as b } from "./useI18n-Ct1VIFcf.js";
|
|
5
5
|
import { Ft as x, It as S, Pt as C, it as w, kt as T } from "./icons-SP5Itd-A.js";
|
|
6
6
|
import { t as E } from "./formatAbsoluteDateTime-DMmop3C-.js";
|
|
7
7
|
import { t as ee } from "./formatRelativeTime-CtUU-QZ8.js";
|
|
@@ -147,4 +147,4 @@ var D = [
|
|
|
147
147
|
//#endregion
|
|
148
148
|
export { B as default };
|
|
149
149
|
|
|
150
|
-
//# sourceMappingURL=VersionHistoryMenu-
|
|
150
|
+
//# sourceMappingURL=VersionHistoryMenu-DDjIBvad.js.map
|
package/dist/cdn/chunks/{VersionHistoryMenu-BOy8aMB6.js.map → VersionHistoryMenu-DDjIBvad.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionHistoryMenu-BOy8aMB6.js","names":[],"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 — it was `cloud/components/SnapshotHistory.vue` and\n * spoke Cloud's wire shape (`created_at`, `is_autosave`) directly. It now reads\n * the `TemplateVersion` contract, so any 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 — it was `cloud/components/SnapshotHistory.vue` and\n * spoke Cloud's wire shape (`created_at`, `is_autosave`) directly. It now reads\n * the `TemplateVersion` contract, so any 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\"\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A,CAAC,CAAC,eAAe;IACxB,cAAY,EAAA,CAAA,CAAC,CAAC,eAAe;IAC7B,SAAK,EAAO,GAAO,CAAA,MAAA,CAAA;GAEpB,GAAA,CAAA,EAA6C,EAAA,CAAA,GAAA;IAA9B,MAAM;IAAK,gBAAc"}
|
|
1
|
+
{"version":3,"file":"VersionHistoryMenu-DDjIBvad.js","names":[],"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 — it was `cloud/components/SnapshotHistory.vue` and\n * spoke Cloud's wire shape (`created_at`, `is_autosave`) directly. It now reads\n * the `TemplateVersion` contract, so any 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 — it was `cloud/components/SnapshotHistory.vue` and\n * spoke Cloud's wire shape (`created_at`, `is_autosave`) directly. It now reads\n * the `TemplateVersion` contract, so any 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBA,IAAM,IAAQ,GAQR,IAAO,GAKP,EAAE,MAAG,cAAW,EAAQ,GACxB,IAAW,EAAO,GAAe,KAAA,CAAS,GAE1C,IAAS,EAAI,EAAK,GAClB,IAAc,EAAwB,IAAI,GAQ1C,IAAe,QACnB,EAAM,iBAAiB,OACnB,KACA,EAAM,SAAS,WAAW,MAAM,EAAE,OAAO,EAAM,YAAY,CACjE,GAEM,IAAa,QACX,EAAa,QAAQ,KAAK,CAAC,EAAM,eAAe,CAAC,EAAM,SAC/D,GAEM,IAAa,QAEf,EAAa,QAAQ,EAAM,SAAS,SAAS,KAC7C,EAAM,SAAS,SAAS,KACxB,CAAC,EAAM,eACP,CAAC,EAAM,SACX;EAEA,SAAS,IAAgB;GAClB,EAAW,SAChB,EAAK,YAAY,EAAM,SAAS,EAAa,QAAQ,EAAE;EACzD;EAEA,SAAS,IAAgB;GAClB,EAAW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A,EAAA,EAAW,EAAQ,SAAS,CAAA,GAAA,CAAA,CAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA;KAEd,EAAQ,SAAS,EAAQ,QAAQ,QAAjD,EAAA,GAAA,EAEW,GAAA,EAAA,KAAA,EAAA,GAAA,CAF4C,EAAA,KAEvD,CAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA;KACgB,EAAQ,QAAQ,QAAhC,EAAA,GAAA,EAEa,GAAA,EAAA,KAAA,EAAA,GAAA,CADX,EAAA,EAAA,EAAQ,OAAO,IAAI,GAAA,CAAA,CAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA;;;;GAUjC,EASS,UAAA;IARP,OAAM;IACN,eAAY;IACX,UAAQ,CAAG,EAAA;IACX,OAAO,EAAA,CAAA,CAAC,CAAC,eAAe;IACxB,cAAY,EAAA,CAAA,CAAC,CAAC,eAAe;IAC7B,SAAK,EAAO,GAAO,CAAA,MAAA,CAAA;GAEpB,GAAA,CAAA,EAA6C,EAAA,CAAA,GAAA;IAA9B,MAAM;IAAK,gBAAc"}
|
package/dist/cdn/chunks/{VersionHistoryPanels-BPLhzW9c.js → VersionHistoryPanels-BuTw04T5.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-fGAv20qI.js")), u = s(() => import("./RestoreVersionDialog-BkSSwf-Q.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-BuTw04T5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionHistoryPanels-
|
|
1
|
+
{"version":3,"file":"VersionHistoryPanels-BuTw04T5.js","names":[],"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,IAAM,IAAQ,GAIR,IAAuB,QACrB,OAAO,qCACf,GAGM,IAAuB,QACrB,OAAO,qCACf;EAOA,eAAe,IAAsC;GACnD,IAAI;IACF,MAAM,EAAM,QAAQ,eAAe;GACrC,QAAQ,CAER;EACF;EAEA,eAAe,IAAsC;GACnD,IAAI;IACF,MAAM,EAAM,QAAQ,eAAe;GACrC,QAAQ,CAER;EACF;EAEA,eAAe,IAAyC;GACtD,IAAI;IACF,MAAM,EAAM,QAAQ,kBAAkB;GACxC,QAAQ,CAER;EACF;oBAKU,EAAA,GAAA,EAAA,GAAA,MAAA,CAAA,EAAA,QAAQ,aAAa,SAD7B,EAAA,GAAA,EAME,EAAA,CAAA,GAAA;;GAJC,SAAS,EAAA,QAAQ,aAAa;GAC9B,eAAa,EAAA,QAAQ,WAAW;GAChC,UAAM,AAAA,EAAA,QAAA,MAAE,EAAA,QAAQ,cAAa;GAC7B,WAAS;EAIJ,GAAA,MAAA,GAAA,CAAA,WAAA,aAAA,CAAA,KAAA,EAAA,IAAA,EAAA,GAAA,EAAA,QAAQ,oBAAoB,SADpC,EAAA,GAAA,EAQE,EAAA,CAAA,GAAA;;GANC,SAAS,EAAA,QAAQ,oBAAoB;GACrC,YAAU,EAAA,QAAQ,qBAAqB;GACvC,WAAS,EAAA,QAAQ,cAAc;GAC/B,UAAM,AAAA,EAAA,QAAA,MAAE,EAAA,QAAQ,qBAAoB;GACpC,kBAAkB;GAClB,qBAAqB"}
|
package/dist/cdn/chunks/{VersionPreviewBanner-CYC9qP2i.js → VersionPreviewBanner-fGAv20qI.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
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-kbOhCgnk.js";
|
|
2
|
-
import { t as l } from "./useI18n-
|
|
2
|
+
import { t as l } from "./useI18n-Ct1VIFcf.js";
|
|
3
3
|
import { kt as u } from "./icons-SP5Itd-A.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
|
|
@@ -37,4 +37,4 @@ var p = {
|
|
|
37
37
|
//#endregion
|
|
38
38
|
export { g as default };
|
|
39
39
|
|
|
40
|
-
//# sourceMappingURL=VersionPreviewBanner-
|
|
40
|
+
//# sourceMappingURL=VersionPreviewBanner-fGAv20qI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionPreviewBanner-
|
|
1
|
+
{"version":3,"file":"VersionPreviewBanner-fGAv20qI.js","names":[],"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,IAAM,IAAO,GAKP,EAAE,SAAM,EAAQ;mBAKZ,EAAA,WADR,EAAA,GAAA,EAkCM,OAlCN,GAkCM,CA5BJ,EASM,OATN,GASM,CANJ,EAIE,EAAA,CAAA,GAAA;GAHC,MAAM;GACN,gBAAc;GACf,OAAM;EAER,CAAA,GAAA,EAA2C,QAAA,MAAA,EAAlC,EAAA,CAAA,CAAC,CAAC,eAAe,OAAO,GAAA,CAAA,CAAA,CAAA,GAEnC,EAiBM,OAjBN,GAiBM,CAhBJ,EAOS,UAAA;GANN,OAAK,EAAE,EAAA,CAAA,CAAa;GACrB,OAAA,EAAA,oBAAA,cAAA;GACA,eAAY;GACX,SAAK,AAAA,EAAA,QAAA,MAAE,EAAI,QAAA;EAET,GAAA,EAAA,EAAA,CAAA,CAAC,CAAC,eAAe,MAAM,GAAA,CAAA,GAGpB,EAAA,cADR,EAAA,GAAA,EAOS,UAAA;;GALN,OAAK,EAAE,EAAA,CAAA,CAAe;GACvB,eAAY;GACX,SAAK,AAAA,EAAA,QAAA,MAAE,EAAI,SAAA;EAET,GAAA,EAAA,EAAA,CAAA,CAAC,CAAC,eAAe,OAAO,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { B as e, P as t, Q as n, Y as r, f as i } from "./draggable-kbOhCgnk.js";
|
|
2
2
|
import { _ as a } from "./dist-BW6Y49zE.js";
|
|
3
3
|
import { t as o } from "./dist-CAFTQ6Y2.js";
|
|
4
|
-
import {
|
|
4
|
+
import { B as s, i as c, l, t as u } from "./keys-DQp8x7Nx.js";
|
|
5
5
|
import { t as d } from "./timeouts-DHPZQ0G3.js";
|
|
6
6
|
import { t as f } from "./logger-ByvdoAwq.js";
|
|
7
7
|
import { t as p } from "./preRenderCustomBlocks-LFB-e-0m.js";
|
|
@@ -440,4 +440,4 @@ async function T(r) {
|
|
|
440
440
|
//#endregion
|
|
441
441
|
export { T as bootstrapCloud };
|
|
442
442
|
|
|
443
|
-
//# sourceMappingURL=createCloudRuntime-
|
|
443
|
+
//# sourceMappingURL=createCloudRuntime-JFE-sxbT.js.map
|