@templatical/editor 0.32.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.
Files changed (154) hide show
  1. package/dist/{AiChatSidebar-ftdKHSR-.js → AiChatSidebar-CkHJ28sf.js} +3 -3
  2. package/dist/{AiFeatureMenu-aNeCRlil.js → AiFeatureMenu-DWdKguDN.js} +3 -3
  3. package/dist/{BlockIssueBadge-bTDu6W_2.js → BlockIssueBadge-DcyHTAqw.js} +2 -2
  4. package/dist/{BlockPreviewCanvas-BsOuOfzB.js → BlockPreviewCanvas-B621ANn9.js} +4 -4
  5. package/dist/{CloudHeaderExtras-BNpFohqt.js → CloudHeaderExtras-BJ3Cebhv.js} +2 -2
  6. package/dist/{CloudPanels-xoGWwqSH.js → CloudPanels-BGz9ygo6.js} +6 -6
  7. package/dist/{CollaboratorBar-mEqXkdEi.js → CollaboratorBar-KphmSQeZ.js} +2 -2
  8. package/dist/{ColorPicker-FL5Vb9bE.js → ColorPicker-C6EOwtHC.js} +5 -5
  9. package/dist/{CommentsPanel-slfi74ng.js → CommentsPanel-DmWh8f08.js} +1 -1
  10. package/dist/{CommentsSidebar-Dea4spMl.js → CommentsSidebar-CL_tffzT.js} +4 -4
  11. package/dist/{CountdownBlock-DQTwaRxP.js → CountdownBlock-D1fsNsyS.js} +1 -1
  12. package/dist/{CountdownToolbar-C7xwJoqh.js → CountdownToolbar-B8J4i5Xp.js} +2 -2
  13. package/dist/{DesignReferenceSidebar-BtBd7bbz.js → DesignReferenceSidebar-BDhEeaAh.js} +4 -4
  14. package/dist/{IssuesPanel-Ci2H36L2.js → IssuesPanel-CiOjeRFI.js} +4 -4
  15. package/dist/MergeTagInput-RytOlh1A.js +448 -0
  16. package/dist/{MergeTagModeToggle-Cdi_DmVw.js → MergeTagModeToggle-Bi-FydXj.js} +2 -2
  17. package/dist/{ParagraphEditor-DQEOFc0K.js → ParagraphEditor-C87tkmtE.js} +12 -12
  18. package/dist/{RestoreVersionDialog-CHwngBae.js → RestoreVersionDialog-Db5rZRMA.js} +2 -2
  19. package/dist/RichTextEditorContent-BmTcV2-a.js +152 -0
  20. package/dist/{SaveBlockDialog-tZqZzPjW.js → SaveBlockDialog-CDCzx6Bo.js} +15 -15
  21. package/dist/{SavedBlocksBrowserModal-Bdj3GOD_.js → SavedBlocksBrowserModal-DQR6kJB1.js} +101 -101
  22. package/dist/{SavedBlocksPanels-2sBxAH9w.js → SavedBlocksPanels-DFzV0CRD.js} +1 -1
  23. package/dist/{SavedBlocksPickBar-DTjQBR00.js → SavedBlocksPickBar-XyXmnSnO.js} +2 -2
  24. package/dist/{TemplateScoringPanel-B6nHSrBD.js → TemplateScoringPanel-CpyEKMzC.js} +4 -4
  25. package/dist/{TestEmailModal-DuHbzO37.js → TestEmailModal-DIfJy9eE.js} +8 -8
  26. package/dist/{TestEmailPanel-TpwP-eK_.js → TestEmailPanel-C8Wx5yPS.js} +1 -1
  27. package/dist/{TitleEditor-C0JQJu38.js → TitleEditor-iNFOisr4.js} +11 -11
  28. package/dist/{TplModal-BMGmhquu.js → TplModal-CowM3o_F.js} +5 -5
  29. package/dist/{VersionHistoryMenu-D2x6MMYx.js → VersionHistoryMenu-CV90OhXs.js} +2 -2
  30. package/dist/{VersionHistoryPanels-aGlUVEGF.js → VersionHistoryPanels-BE3pplJG.js} +1 -1
  31. package/dist/{VersionPreviewBanner-61t3_Z-a.js → VersionPreviewBanner-BwUWBtlH.js} +1 -1
  32. package/dist/{blockTypeIcons-BsNup009.js → blockTypeIcons-DQsKtHik.js} +1 -1
  33. package/dist/bundle-stats.json +6 -6
  34. package/dist/cdn/chunks/{AiChatSidebar-CqWvtRwB.js → AiChatSidebar-BEnIWn6s.js} +4 -4
  35. package/dist/cdn/chunks/AiChatSidebar-BEnIWn6s.js.map +1 -0
  36. package/dist/cdn/chunks/{AiFeatureMenu-DoFrLcXJ.js → AiFeatureMenu-DMl23akc.js} +4 -4
  37. package/dist/cdn/chunks/{AiFeatureMenu-DoFrLcXJ.js.map → AiFeatureMenu-DMl23akc.js.map} +1 -1
  38. package/dist/cdn/chunks/{BlockIssueBadge-B_mUH69a.js → BlockIssueBadge-CloK4k3M.js} +3 -3
  39. package/dist/cdn/chunks/{BlockIssueBadge-B_mUH69a.js.map → BlockIssueBadge-CloK4k3M.js.map} +1 -1
  40. package/dist/cdn/chunks/{BlockPreviewCanvas-CSIxs7hr.js → BlockPreviewCanvas-DSiJFJa0.js} +5 -5
  41. package/dist/cdn/chunks/{BlockPreviewCanvas-CSIxs7hr.js.map → BlockPreviewCanvas-DSiJFJa0.js.map} +1 -1
  42. package/dist/cdn/chunks/{CloudHeaderExtras-Dgtr7WaE.js → CloudHeaderExtras-b4KpVeUN.js} +3 -3
  43. package/dist/cdn/chunks/{CloudHeaderExtras-Dgtr7WaE.js.map → CloudHeaderExtras-b4KpVeUN.js.map} +1 -1
  44. package/dist/cdn/chunks/{CloudPanels-B91lUmof.js → CloudPanels-DzwOq9lp.js} +7 -7
  45. package/dist/cdn/chunks/CloudPanels-DzwOq9lp.js.map +1 -0
  46. package/dist/cdn/chunks/{CollaboratorBar-CQwPWoFu.js → CollaboratorBar-WXKvpoGK.js} +3 -3
  47. package/dist/cdn/chunks/{CollaboratorBar-CQwPWoFu.js.map → CollaboratorBar-WXKvpoGK.js.map} +1 -1
  48. package/dist/cdn/chunks/{ColorPicker-CdrKX48J.js → ColorPicker-BubTDiS1.js} +6 -6
  49. package/dist/cdn/chunks/{ColorPicker-CdrKX48J.js.map → ColorPicker-BubTDiS1.js.map} +1 -1
  50. package/dist/cdn/chunks/{CommentsPanel-BJNgTmAA.js → CommentsPanel-DAA2VqX4.js} +2 -2
  51. package/dist/cdn/chunks/{CommentsPanel-BJNgTmAA.js.map → CommentsPanel-DAA2VqX4.js.map} +1 -1
  52. package/dist/cdn/chunks/{CommentsSidebar-D6VIIPhB.js → CommentsSidebar-Ci0M2ePp.js} +5 -5
  53. package/dist/cdn/chunks/CommentsSidebar-Ci0M2ePp.js.map +1 -0
  54. package/dist/cdn/chunks/{CountdownBlock-BRwXUvGU.js → CountdownBlock-rK055jpy.js} +2 -2
  55. package/dist/cdn/chunks/{CountdownBlock-BRwXUvGU.js.map → CountdownBlock-rK055jpy.js.map} +1 -1
  56. package/dist/cdn/chunks/{CountdownToolbar-CVaU5WG6.js → CountdownToolbar-CzZq26Vp.js} +3 -3
  57. package/dist/cdn/chunks/{CountdownToolbar-CVaU5WG6.js.map → CountdownToolbar-CzZq26Vp.js.map} +1 -1
  58. package/dist/cdn/chunks/{DesignReferenceSidebar-BvOwE1kg.js → DesignReferenceSidebar-C_ehdX5C.js} +5 -5
  59. package/dist/cdn/chunks/DesignReferenceSidebar-C_ehdX5C.js.map +1 -0
  60. package/dist/cdn/chunks/{IssuesPanel-MJZxkScz.js → IssuesPanel-BXAN2_al.js} +5 -5
  61. package/dist/cdn/chunks/{IssuesPanel-MJZxkScz.js.map → IssuesPanel-BXAN2_al.js.map} +1 -1
  62. package/dist/cdn/chunks/MergeTagInput-1vcI9uQH.js +419 -0
  63. package/dist/cdn/chunks/MergeTagInput-1vcI9uQH.js.map +1 -0
  64. package/dist/cdn/chunks/{MergeTagModeToggle-bNuN6PTV.js → MergeTagModeToggle-B_mUYJo4.js} +3 -3
  65. package/dist/cdn/chunks/{MergeTagModeToggle-bNuN6PTV.js.map → MergeTagModeToggle-B_mUYJo4.js.map} +1 -1
  66. package/dist/cdn/chunks/{ParagraphEditor-BU8tlFbL.js → ParagraphEditor-DCDHMcmx.js} +10 -10
  67. package/dist/cdn/chunks/ParagraphEditor-DCDHMcmx.js.map +1 -0
  68. package/dist/cdn/chunks/{RestoreVersionDialog-vdRFfyy0.js → RestoreVersionDialog-BkSSwf-Q.js} +3 -3
  69. package/dist/cdn/chunks/{RestoreVersionDialog-vdRFfyy0.js.map → RestoreVersionDialog-BkSSwf-Q.js.map} +1 -1
  70. package/dist/cdn/chunks/RichTextEditorContent-S4KogjIj.js +122 -0
  71. package/dist/cdn/chunks/RichTextEditorContent-S4KogjIj.js.map +1 -0
  72. package/dist/cdn/chunks/{SaveBlockDialog-DWaeqcM8.js → SaveBlockDialog-BH774Nt0.js} +14 -14
  73. package/dist/cdn/chunks/{SaveBlockDialog-DWaeqcM8.js.map → SaveBlockDialog-BH774Nt0.js.map} +1 -1
  74. package/dist/cdn/chunks/{SavedBlocksBrowserModal-qC7UhW74.js → SavedBlocksBrowserModal-CSUqw_dD.js} +6 -6
  75. package/dist/cdn/chunks/{SavedBlocksBrowserModal-qC7UhW74.js.map → SavedBlocksBrowserModal-CSUqw_dD.js.map} +1 -1
  76. package/dist/cdn/chunks/{SavedBlocksPanels-BvtjtdsY.js → SavedBlocksPanels-B6ApbCjG.js} +2 -2
  77. package/dist/cdn/chunks/{SavedBlocksPanels-BvtjtdsY.js.map → SavedBlocksPanels-B6ApbCjG.js.map} +1 -1
  78. package/dist/cdn/chunks/{SavedBlocksPickBar-CxXjF3RN.js → SavedBlocksPickBar-C9MXSRcR.js} +3 -3
  79. package/dist/cdn/chunks/{SavedBlocksPickBar-CxXjF3RN.js.map → SavedBlocksPickBar-C9MXSRcR.js.map} +1 -1
  80. package/dist/cdn/chunks/{TemplateScoringPanel-CroWaWqy.js → TemplateScoringPanel-QVOxc9TZ.js} +50 -50
  81. package/dist/cdn/chunks/TemplateScoringPanel-QVOxc9TZ.js.map +1 -0
  82. package/dist/cdn/chunks/{TestEmailModal-iWxAZRRq.js → TestEmailModal-_CZvaO58.js} +9 -9
  83. package/dist/cdn/chunks/{TestEmailModal-iWxAZRRq.js.map → TestEmailModal-_CZvaO58.js.map} +1 -1
  84. package/dist/cdn/chunks/{TestEmailPanel-CGUtEuwp.js → TestEmailPanel-DXLxvyrD.js} +2 -2
  85. package/dist/cdn/chunks/{TestEmailPanel-CGUtEuwp.js.map → TestEmailPanel-DXLxvyrD.js.map} +1 -1
  86. package/dist/cdn/chunks/{TitleEditor-DvXUW2j-.js → TitleEditor-BuCOahW3.js} +9 -9
  87. package/dist/cdn/chunks/TitleEditor-BuCOahW3.js.map +1 -0
  88. package/dist/cdn/chunks/{TplModal-X-qNoLGZ.js → TplModal-CqY8R3hn.js} +6 -6
  89. package/dist/cdn/chunks/TplModal-CqY8R3hn.js.map +1 -0
  90. package/dist/cdn/chunks/{VersionHistoryMenu-yKzwxf7n.js → VersionHistoryMenu-DDjIBvad.js} +3 -3
  91. package/dist/cdn/chunks/{VersionHistoryMenu-yKzwxf7n.js.map → VersionHistoryMenu-DDjIBvad.js.map} +1 -1
  92. package/dist/cdn/chunks/{VersionHistoryPanels--hQaanjH.js → VersionHistoryPanels-BuTw04T5.js} +2 -2
  93. package/dist/cdn/chunks/{VersionHistoryPanels--hQaanjH.js.map → VersionHistoryPanels-BuTw04T5.js.map} +1 -1
  94. package/dist/cdn/chunks/{VersionPreviewBanner-DWU_SqMd.js → VersionPreviewBanner-fGAv20qI.js} +2 -2
  95. package/dist/cdn/chunks/{VersionPreviewBanner-DWU_SqMd.js.map → VersionPreviewBanner-fGAv20qI.js.map} +1 -1
  96. package/dist/cdn/chunks/{createCloudRuntime-DD6ppb71.js → createCloudRuntime-JFE-sxbT.js} +2 -2
  97. package/dist/cdn/chunks/{createCloudRuntime-DD6ppb71.js.map → createCloudRuntime-JFE-sxbT.js.map} +1 -1
  98. package/dist/cdn/chunks/{extensions-BUPHNpKD.js → extensions-7z04EIGg.js} +3 -3
  99. package/dist/cdn/chunks/{extensions-BUPHNpKD.js.map → extensions-7z04EIGg.js.map} +1 -1
  100. package/dist/cdn/chunks/keys-DQp8x7Nx.js +12 -0
  101. package/dist/cdn/chunks/keys-DQp8x7Nx.js.map +1 -0
  102. package/dist/cdn/chunks/src-CLoCCDfs.js.map +1 -1
  103. package/dist/cdn/chunks/{src-DtnvR_Hl.js → src-CiAi5oRe.js} +2 -2
  104. package/dist/cdn/chunks/{src-DtnvR_Hl.js.map → src-CiAi5oRe.js.map} +1 -1
  105. package/dist/cdn/chunks/{useCloudI18n-DbsLlCbZ.js → useCloudI18n-MxgHWrV6.js} +2 -2
  106. package/dist/cdn/chunks/{useCloudI18n-DbsLlCbZ.js.map → useCloudI18n-MxgHWrV6.js.map} +1 -1
  107. package/dist/cdn/chunks/{useEditorCore-ChlgO2GN.js → useEditorCore-ehUSEsbw.js} +548 -511
  108. package/dist/cdn/chunks/useEditorCore-ehUSEsbw.js.map +1 -0
  109. package/dist/cdn/chunks/{useEditorRoot-BlF1WPeu.js → useEditorRoot-CteADR3y.js} +2 -2
  110. package/dist/cdn/chunks/{useEditorRoot-BlF1WPeu.js.map → useEditorRoot-CteADR3y.js.map} +1 -1
  111. package/dist/cdn/chunks/{useI18n-BdxNNw6j.js → useI18n-Ct1VIFcf.js} +2 -2
  112. package/dist/cdn/chunks/{useI18n-BdxNNw6j.js.map → useI18n-Ct1VIFcf.js.map} +1 -1
  113. package/dist/cdn/chunks/useMergeTag-TLhF2fGK.js +46 -0
  114. package/dist/cdn/chunks/useMergeTag-TLhF2fGK.js.map +1 -0
  115. package/dist/cdn/chunks/{usePopoverPosition-Dw1nTSNx.js → usePopoverPosition-BxVWE5_0.js} +2 -2
  116. package/dist/cdn/chunks/{usePopoverPosition-Dw1nTSNx.js.map → usePopoverPosition-BxVWE5_0.js.map} +1 -1
  117. package/dist/cdn/chunks/{useScrollToBlock-BMis3-PR.js → useScrollToBlock-Cz3fpgTK.js} +2 -2
  118. package/dist/cdn/chunks/{useScrollToBlock-BMis3-PR.js.map → useScrollToBlock-Cz3fpgTK.js.map} +1 -1
  119. package/dist/cdn/editor.css +1 -1
  120. package/dist/cdn/editor.js +1722 -2071
  121. package/dist/cdn/editor.js.map +1 -1
  122. package/dist/{createCloudRuntime-zNcMjRgb.js → createCloudRuntime-DbTFm1ES.js} +1 -1
  123. package/dist/{extensions-kOYwOh72.js → extensions-Mf8iHey9.js} +2 -2
  124. package/dist/index.d.ts +41 -0
  125. package/dist/keys-C3P1yxnr.js +10 -0
  126. package/dist/style.css +1 -1
  127. package/dist/templatical-editor.js +1890 -2240
  128. package/dist/{useCloudI18n-BlMajbKp.js → useCloudI18n-BKoiYsWZ.js} +1 -1
  129. package/dist/{useEditorCore-CwQYCSXO.js → useEditorCore-DdkQuTHl.js} +1101 -1064
  130. package/dist/{useEditorRoot-C92q8uV-.js → useEditorRoot-DkRGTQRs.js} +1 -1
  131. package/dist/{useI18n-Ce_BRzYv.js → useI18n-CL6RfPzK.js} +1 -1
  132. package/dist/useMergeTag-gSuYus-M.js +44 -0
  133. package/dist/{usePopoverPosition-CPk7Twye.js → usePopoverPosition-CWxaIWd3.js} +1 -1
  134. package/dist/{useScrollToBlock-DvpMfWs2.js → useScrollToBlock-CdI8fGqt.js} +1 -1
  135. package/package.json +7 -7
  136. package/dist/RichTextEditorContent-C_9xi7dD.js +0 -153
  137. package/dist/cdn/chunks/AiChatSidebar-CqWvtRwB.js.map +0 -1
  138. package/dist/cdn/chunks/CloudPanels-B91lUmof.js.map +0 -1
  139. package/dist/cdn/chunks/CommentsSidebar-D6VIIPhB.js.map +0 -1
  140. package/dist/cdn/chunks/DesignReferenceSidebar-BvOwE1kg.js.map +0 -1
  141. package/dist/cdn/chunks/ParagraphEditor-BU8tlFbL.js.map +0 -1
  142. package/dist/cdn/chunks/RichTextEditorContent-C1-5I8Df.js +0 -123
  143. package/dist/cdn/chunks/RichTextEditorContent-C1-5I8Df.js.map +0 -1
  144. package/dist/cdn/chunks/TemplateScoringPanel-CroWaWqy.js.map +0 -1
  145. package/dist/cdn/chunks/TitleEditor-DvXUW2j-.js.map +0 -1
  146. package/dist/cdn/chunks/TplModal-X-qNoLGZ.js.map +0 -1
  147. package/dist/cdn/chunks/keys-BOn5i9jV.js +0 -12
  148. package/dist/cdn/chunks/keys-BOn5i9jV.js.map +0 -1
  149. package/dist/cdn/chunks/useEditorCore-ChlgO2GN.js.map +0 -1
  150. package/dist/cdn/chunks/useMergeTag-CI2WUNrR.js +0 -46
  151. package/dist/cdn/chunks/useMergeTag-CI2WUNrR.js.map +0 -1
  152. package/dist/keys-BOhFlHsv.js +0 -10
  153. package/dist/scan-line-E7w4yQyv.js +0 -31
  154. package/dist/useMergeTag-CrXJ49lr.js +0 -44
@@ -0,0 +1,152 @@
1
+ import { F as e, Ot as t, P as n, S as r, c as i, d as a, g as o, h as s, i as c, k as l, kt as u, l as d, rt as f, s as p, u as m, v as h, w as g } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
2
+ import { c as _ } from "./runtime-dom.esm-bundler-BuG03jBM.js";
3
+ import { K as v, U as y, h as b } from "./keys-C3P1yxnr.js";
4
+ import { t as x } from "./useI18n-CL6RfPzK.js";
5
+ import { n as S } from "./usePopoverPosition-CWxaIWd3.js";
6
+ import { t as C } from "./createLucideIcon-Bvw1Zx56.js";
7
+ import { t as w } from "./MergeTagInput-RytOlh1A.js";
8
+ import { t as T } from "./x-DJOd1hS4.js";
9
+ import { t as E } from "./ColorPicker-C6EOwtHC.js";
10
+ var D = C("bold", [["path", {
11
+ d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",
12
+ key: "mg9rjx"
13
+ }]]), O = C("italic", [
14
+ ["line", {
15
+ x1: "19",
16
+ x2: "10",
17
+ y1: "4",
18
+ y2: "4",
19
+ key: "15jd3p"
20
+ }],
21
+ ["line", {
22
+ x1: "14",
23
+ x2: "5",
24
+ y1: "20",
25
+ y2: "20",
26
+ key: "bu0au3"
27
+ }],
28
+ ["line", {
29
+ x1: "15",
30
+ x2: "9",
31
+ y1: "4",
32
+ y2: "20",
33
+ key: "uljnxc"
34
+ }]
35
+ ]), k = C("link", [["path", {
36
+ d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",
37
+ key: "1cjeqo"
38
+ }], ["path", {
39
+ d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",
40
+ key: "19qd67"
41
+ }]]), A = ["data-tpl-theme"], j = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-5 tpl:py-4" }, M = {
42
+ id: "tpl-link-dialog-title",
43
+ class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
44
+ }, N = ["aria-label"], P = { class: "tpl:p-5" }, F = { class: "tpl:mb-4 tpl:last:mb-0" }, I = { class: "tpl:mb-1.5 tpl:block tpl:text-xs tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, L = { class: "tpl:mb-4 tpl:last:mb-0" }, R = { class: "tpl:mb-1.5 tpl:block tpl:text-xs tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, z = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:px-5 tpl:py-4" }, B = { class: "tpl:ml-auto tpl:flex tpl:gap-2" }, V = /* @__PURE__ */ h({
45
+ __name: "RichTextLinkDialog",
46
+ props: /*@__PURE__*/ g({
47
+ visible: { type: Boolean },
48
+ isEditingLink: { type: Boolean }
49
+ }, {
50
+ linkUrl: { required: !0 },
51
+ linkUrlModifiers: {},
52
+ linkColor: { default: "" },
53
+ linkColorModifiers: {},
54
+ dialogRef: { required: !0 },
55
+ dialogRefModifiers: {}
56
+ }),
57
+ emits: /*@__PURE__*/ g([
58
+ "close",
59
+ "insert",
60
+ "remove",
61
+ "keydown"
62
+ ], [
63
+ "update:linkUrl",
64
+ "update:linkColor",
65
+ "update:dialogRef"
66
+ ]),
67
+ setup(n, { emit: s }) {
68
+ let h = e(n, "linkUrl"), g = e(n, "linkColor"), C = e(n, "dialogRef"), D = s, O = r(y, null), k = r(v, null), V = S(), H = r(b, null), U = p(() => H?.content.value.settings.linkColor || "#2c85de"), { t: W } = x();
69
+ return (e, r) => f(V) ? (l(), d(c, {
70
+ key: 0,
71
+ to: f(V)
72
+ }, [n.visible ? (l(), a("div", {
73
+ key: 0,
74
+ "data-tpl-theme": f(k),
75
+ class: "tpl tpl-link-dialog tpl:fixed tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center",
76
+ style: t(f(O)),
77
+ onClick: r[7] ||= _((e) => D("close"), ["self"])
78
+ }, [i("div", {
79
+ ref: (e) => C.value = e,
80
+ role: "dialog",
81
+ "aria-modal": "true",
82
+ "aria-labelledby": "tpl-link-dialog-title",
83
+ "data-testid": "link-dialog",
84
+ class: "tpl:w-[400px] tpl:overflow-hidden tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-lg)]"
85
+ }, [
86
+ i("div", j, [i("h4", M, u(n.isEditingLink ? f(W).linkDialog.editLink : f(W).linkDialog.insertLink), 1), i("button", {
87
+ type: "button",
88
+ "aria-label": f(W).linkDialog.cancel,
89
+ class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-muted)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
90
+ onClick: r[0] ||= (e) => D("close")
91
+ }, [o(f(T), {
92
+ size: 16,
93
+ "stroke-width": 2
94
+ })], 8, N)]),
95
+ i("div", P, [i("div", F, [i("label", I, u(f(W).linkDialog.urlLabel), 1), o(w, {
96
+ "model-value": h.value,
97
+ type: "url",
98
+ "data-testid": "link-dialog-url",
99
+ placeholder: f(W).linkDialog.urlPlaceholder,
100
+ "onUpdate:modelValue": r[1] ||= (e) => h.value = e,
101
+ onKeydown: r[2] ||= (e) => D("keydown", e)
102
+ }, null, 8, ["model-value", "placeholder"])]), i("div", L, [i("label", R, u(f(W).linkDialog.colorLabel), 1), o(E, {
103
+ "model-value": g.value,
104
+ "seed-color": U.value,
105
+ "onUpdate:modelValue": r[3] ||= (e) => g.value = e
106
+ }, null, 8, ["model-value", "seed-color"])])]),
107
+ i("div", z, [n.isEditingLink ? (l(), a("button", {
108
+ key: 0,
109
+ type: "button",
110
+ class: "tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-danger)] tpl:bg-transparent tpl:px-4 tpl:py-2 tpl:text-[13px] tpl:font-medium tpl:text-[var(--tpl-danger)] tpl:transition-all tpl:hover:bg-[var(--tpl-danger-light)]",
111
+ onClick: r[4] ||= (e) => D("remove")
112
+ }, u(f(W).linkDialog.removeLink), 1)) : m("", !0), i("div", B, [i("button", {
113
+ type: "button",
114
+ class: "tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-transparent tpl:px-4 tpl:py-2 tpl:text-[13px] tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
115
+ onClick: r[5] ||= (e) => D("close")
116
+ }, u(f(W).linkDialog.cancel), 1), i("button", {
117
+ type: "button",
118
+ class: "tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:rounded-md tpl:border-none tpl:bg-[var(--tpl-primary)] tpl:px-4 tpl:py-2 tpl:text-[13px] tpl:font-medium tpl:transition-all tpl:hover:bg-[var(--tpl-primary-hover)] tpl:text-[var(--tpl-on-primary)]",
119
+ "data-testid": "link-dialog-submit",
120
+ onClick: r[6] ||= (e) => D("insert")
121
+ }, u(n.isEditingLink ? f(W).linkDialog.updateLink : f(W).linkDialog.insertLink), 1)])])
122
+ ], 512)], 12, A)) : m("", !0)], 8, ["to"])) : m("", !0);
123
+ }
124
+ }), H = {
125
+ key: 0,
126
+ class: "tpl-text-editable tpl:min-h-[1.5em] tpl:rounded tpl:border tpl:border-dashed tpl:border-[var(--tpl-primary)] tpl:p-2"
127
+ }, U = { class: "tpl:animate-pulse tpl:text-[var(--tpl-text-dim)]" }, W = {
128
+ key: 1,
129
+ class: "tpl-text-editable tpl:min-h-[1.5em] tpl:rounded tpl:border tpl:border-dashed tpl:p-2 tpl:text-center tpl:text-xs tpl:border-[var(--tpl-danger)] tpl:text-[var(--tpl-text-muted)]"
130
+ }, G = /* @__PURE__ */ h({
131
+ __name: "RichTextEditorContent",
132
+ props: {
133
+ editor: {},
134
+ editorContent: {},
135
+ isLoading: { type: Boolean },
136
+ initError: {}
137
+ },
138
+ emits: ["retry"],
139
+ setup(e, { emit: t }) {
140
+ let r = t, { t: o } = x();
141
+ return (t, c) => e.isLoading ? (l(), a("div", H, [i("div", U, u(f(o).errors.editorLoading), 1)])) : e.initError ? (l(), a("div", W, [s(u(f(o).errors.editorLoadFailed) + " ", 1), i("button", {
142
+ class: "tpl:ml-1 tpl:cursor-pointer tpl:border-none tpl:bg-transparent tpl:p-0 tpl:underline tpl:text-[var(--tpl-primary)]",
143
+ onClick: c[0] ||= (e) => r("retry")
144
+ }, u(f(o).errors.retry), 1)])) : e.editorContent && e.editor ? (l(), d(n(e.editorContent), {
145
+ key: 2,
146
+ editor: e.editor,
147
+ class: "tpl-text-editable tpl:min-h-[1.5em] tpl:rounded tpl:border tpl:border-dashed tpl:border-[var(--tpl-primary)] tpl:p-2"
148
+ }, null, 8, ["editor"])) : m("", !0);
149
+ }
150
+ });
151
+ //#endregion
152
+ export { D as a, O as i, V as n, k as r, G as t };
@@ -1,15 +1,15 @@
1
1
  import { B as e, D as t, Dt as n, E as r, L as i, Ot as a, P as o, S as s, X as c, c as l, d as u, g as d, h as f, j as p, k as m, kt as h, l as g, r as _, rt as v, s as y, u as b, v as x, z as S } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
2
2
  import { a as C, c as w, s as T } from "./runtime-dom.esm-bundler-BuG03jBM.js";
3
- import { N as E, c as D, q as O } from "./useEditorCore-CwQYCSXO.js";
4
- import { G as k, L as A, f as ee, h as j } from "./keys-BOhFlHsv.js";
5
- import { t as M } from "./useI18n-Ce_BRzYv.js";
3
+ import { N as E, Y as D, c as O } from "./useEditorCore-DdkQuTHl.js";
4
+ import { J as k, f as ee, h as A, z as j } from "./keys-C3P1yxnr.js";
5
+ import { t as M } from "./useI18n-CL6RfPzK.js";
6
6
  import { t as te } from "./chevron-down-a-fb_Ijn.js";
7
7
  import { t as N } from "./chevron-up-x4l0et_Y.js";
8
8
  import { t as P } from "./loader-circle-t-SVgmJ3.js";
9
9
  import { v as F } from "./styleConstants-C_YAPdQS.js";
10
10
  import { n as I } from "./emailFrameWidth-BmFCN2dp.js";
11
- import { t as L } from "./TplModal-BMGmhquu.js";
12
- import { t as R } from "./BlockPreviewCanvas-BsOuOfzB.js";
11
+ import { t as L } from "./TplModal-CowM3o_F.js";
12
+ import { t as R } from "./BlockPreviewCanvas-B621ANn9.js";
13
13
  //#region src/components/SavedBlockPreviewRow.vue?vue&type=script&setup=true&lang.ts
14
14
  var z = ["data-block-id"], B = ["aria-label", "title"], V = { class: "tpl:relative tpl:min-w-0 tpl:flex-1" }, H = {
15
15
  key: 0,
@@ -26,21 +26,21 @@ var z = ["data-block-id"], B = ["aria-label", "title"], V = { class: "tpl:relati
26
26
  },
27
27
  emits: ["move"],
28
28
  setup(e, { emit: n }) {
29
- let i = e, p = n, { t: _, format: x } = M(), S = s(ee, []), C = s(j, null), D = y(() => I(C?.content.value.settings)), k = c(null), A = c(null), P = c(1), F = c(null), L = c(!1), G = null, K = y(() => F.value !== null && F.value > W), q = y(() => F.value === null ? null : L.value || !K.value ? F.value : W);
29
+ let i = e, p = n, { t: _, format: x } = M(), S = s(ee, []), C = s(A, null), O = y(() => I(C?.content.value.settings)), k = c(null), j = c(null), P = c(1), F = c(null), L = c(!1), G = null, K = y(() => F.value !== null && F.value > W), q = y(() => F.value === null ? null : L.value || !K.value ? F.value : W);
30
30
  function J() {
31
- let e = k.value, t = A.value;
31
+ let e = k.value, t = j.value;
32
32
  if (!e || !t) return;
33
33
  let n = e.clientWidth;
34
34
  if (n <= 0) return;
35
- let r = Math.min(1, n / D.value);
35
+ let r = Math.min(1, n / O.value);
36
36
  P.value = r, F.value = t.offsetHeight * r;
37
37
  }
38
38
  t(() => {
39
- J(), !(typeof ResizeObserver > "u") && (G = new ResizeObserver(() => J()), k.value && G.observe(k.value), A.value && G.observe(A.value));
39
+ J(), !(typeof ResizeObserver > "u") && (G = new ResizeObserver(() => J()), k.value && G.observe(k.value), j.value && G.observe(j.value));
40
40
  }), r(() => {
41
41
  G?.disconnect(), G = null;
42
42
  });
43
- let Y = y(() => O(i.block, _, S)), X = y(() => x(_.savedBlocks.reorderHandle, {
43
+ let Y = y(() => D(i.block, _, S)), X = y(() => x(_.savedBlocks.reorderHandle, {
44
44
  block: Y.value,
45
45
  position: i.position,
46
46
  total: i.total
@@ -68,9 +68,9 @@ var z = ["data-block-id"], B = ["aria-label", "title"], V = { class: "tpl:relati
68
68
  style: a({ height: q.value === null ? void 0 : `${q.value}px` })
69
69
  }, [l("div", {
70
70
  ref_key: "contentEl",
71
- ref: A,
71
+ ref: j,
72
72
  style: a({
73
- width: `${D.value}px`,
73
+ width: `${O.value}px`,
74
74
  transform: `scale(${P.value})`,
75
75
  transformOrigin: "top left"
76
76
  })
@@ -122,7 +122,7 @@ var z = ["data-block-id"], B = ["aria-label", "title"], V = { class: "tpl:relati
122
122
  },
123
123
  emits: ["close", "saved"],
124
124
  setup(t, { emit: r }) {
125
- let a = t, o = r, { t: x, format: w } = M(), T = k(j, "SaveBlockDialog"), E = k(A, "SaveBlockDialog"), te = s(ee, []), N = c(""), I = c(""), R = c(!1), z = c(null), B = c(""), V = c([]), H = y(() => {
125
+ let a = t, o = r, { t: x, format: w } = M(), T = k(A, "SaveBlockDialog"), E = k(j, "SaveBlockDialog"), te = s(ee, []), N = c(""), I = c(""), R = c(!1), z = c(null), B = c(""), V = c([]), H = y(() => {
126
126
  let e = new Map(T.content.value.blocks.map((e) => [e.id, e]));
127
127
  return V.value.map((t) => e.get(t)).filter((e) => e !== void 0);
128
128
  }), U = y({
@@ -143,7 +143,7 @@ var z = ["data-block-id"], B = ["aria-label", "title"], V = { class: "tpl:relati
143
143
  }) : "";
144
144
  }
145
145
  function Q(e) {
146
- return O(e, x, te);
146
+ return D(e, x, te);
147
147
  }
148
148
  let ge = y(() => H.value.map(Q).join(", "));
149
149
  i(() => a.visible, (e) => {
@@ -214,7 +214,7 @@ var z = ["data-block-id"], B = ["aria-label", "title"], V = { class: "tpl:relati
214
214
  ]),
215
215
  l("p", oe, [f(h(v(w)(v(x).savedBlocks.savingCount, { count: H.value.length })) + " ", 1), l("span", se, h(ge.value), 1)]),
216
216
  H.value.length > 1 ? (m(), u("p", ce, h(v(x).savedBlocks.reorderHint), 1)) : b("", !0),
217
- d(v(D), {
217
+ d(v(O), {
218
218
  modelValue: U.value,
219
219
  "onUpdate:modelValue": i[2] ||= (e) => U.value = e,
220
220
  "data-testid": "saved-blocks-reorder-list",
@@ -1,16 +1,16 @@
1
1
  import { B as e, Dt as t, L as n, Ot as r, P as i, S as a, T as ee, X as o, _ as te, c as s, d as c, g as l, j as u, k as d, kt as f, l as p, r as m, rt as h, s as g, u as _, v, z as ne } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
2
2
  import { a as y, c as b, i as x, s as S } from "./runtime-dom.esm-bundler-BuG03jBM.js";
3
- import "./useEditorCore-CwQYCSXO.js";
4
- import { G as C, H as re, L as ie, h as ae } from "./keys-BOhFlHsv.js";
5
- import { t as oe } from "./useI18n-Ce_BRzYv.js";
6
- import { n as se, r as w, t as T } from "./blockTypeIcons-BsNup009.js";
3
+ import "./useEditorCore-DdkQuTHl.js";
4
+ import { G as re, J as C, h as ie, z as ae } from "./keys-C3P1yxnr.js";
5
+ import { t as oe } from "./useI18n-CL6RfPzK.js";
6
+ import { n as se, r as w, t as T } from "./blockTypeIcons-DQsKtHik.js";
7
7
  import { t as ce } from "./pencil-2qhC-Y4q.js";
8
8
  import { t as le } from "./trash-rYMzzHZd.js";
9
9
  import { t as ue } from "./x-DJOd1hS4.js";
10
10
  import { v as de } from "./styleConstants-C_YAPdQS.js";
11
11
  import { t as fe } from "./formatAbsoluteDateTime-DMmop3C-.js";
12
12
  import { t as pe } from "./formatRelativeTime-CtUU-QZ8.js";
13
- import { t as me } from "./TplModal-BMGmhquu.js";
13
+ import { t as me } from "./TplModal-CowM3o_F.js";
14
14
  //#region src/components/SavedBlocksBrowserModal.vue?vue&type=script&setup=true&lang.ts
15
15
  var he = {
16
16
  role: "dialog",
@@ -55,53 +55,53 @@ var he = {
55
55
  }, Ge = {
56
56
  key: 0,
57
57
  class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
58
- }, Ke = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, qe = { class: "tpl:mt-1 tpl:max-w-[220px] tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Je = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, Ye = {
58
+ }, k = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Ke = { class: "tpl:mt-1 tpl:max-w-[220px] tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, qe = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, Je = {
59
59
  key: 0,
60
60
  class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden"
61
- }, Xe = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Ze = {
61
+ }, Ye = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Xe = {
62
62
  key: 1,
63
63
  class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:items-center tpl:justify-center tpl:px-4"
64
- }, Qe = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, $e = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, et = { class: "tpl:flex tpl:items-center tpl:gap-2" }, tt = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, nt = ["value"], rt = { class: "tpl:flex tpl:gap-2" }, it = ["disabled"], k = /* @__PURE__ */ v({
64
+ }, Ze = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Qe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, $e = { class: "tpl:flex tpl:items-center tpl:gap-2" }, et = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, tt = ["value"], nt = { class: "tpl:flex tpl:gap-2" }, rt = ["disabled"], A = /* @__PURE__ */ v({
65
65
  __name: "SavedBlocksBrowserModal",
66
66
  props: { visible: { type: Boolean } },
67
67
  emits: ["close", "insert"],
68
- setup(v, { emit: k }) {
69
- let at = v, A = k, ot = te(() => import("./BlockPreviewCanvas-BsOuOfzB.js").then((e) => e.n)), { t: j, format: M } = oe(), N = C(ie, "SavedBlocksBrowserModal"), P = C(ae, "SavedBlocksBrowserModal"), st = a(re, void 0), F = o(""), I = o(""), L = o(null), R = o(null), z = o(null), B = o(""), V = o(""), H = o(null), U = o("end"), W = g(() => {
70
- let e = F.value.trim().toLowerCase(), t = I.value;
71
- return N.savedBlocks.value.filter((n) => !(e && !n.name.toLowerCase().includes(e) || t && n.category !== t));
72
- }), G = g(() => N.isLoading.value && N.savedBlocks.value.length === 0), ct = g(() => F.value.trim().length > 0 || I.value !== ""), K = g(() => L.value ? N.savedBlocks.value.find((e) => e.id === L.value) ?? null : null), lt = g(() => {
68
+ setup(v, { emit: A }) {
69
+ let it = v, j = A, at = te(() => import("./BlockPreviewCanvas-B621ANn9.js").then((e) => e.n)), { t: M, format: N } = oe(), P = C(ae, "SavedBlocksBrowserModal"), F = C(ie, "SavedBlocksBrowserModal"), ot = a(re, void 0), I = o(""), L = o(""), R = o(null), z = o(null), B = o(null), V = o(""), H = o(""), U = o(null), W = o("end"), G = g(() => {
70
+ let e = I.value.trim().toLowerCase(), t = L.value;
71
+ return P.savedBlocks.value.filter((n) => !(e && !n.name.toLowerCase().includes(e) || t && n.category !== t));
72
+ }), K = g(() => P.isLoading.value && P.savedBlocks.value.length === 0), st = g(() => I.value.trim().length > 0 || L.value !== ""), q = g(() => R.value ? P.savedBlocks.value.find((e) => e.id === R.value) ?? null : null), ct = g(() => {
73
73
  let e = [{
74
74
  value: "beginning",
75
- label: j.savedBlocks.insertAtBeginning
76
- }], t = P.content.value.blocks;
75
+ label: M.savedBlocks.insertAtBeginning
76
+ }], t = F.content.value.blocks;
77
77
  for (let n = 0; n < t.length; n++) {
78
- let r = t[n], i = r.type, a = j.blocks[i] ?? r.type;
78
+ let r = t[n], i = r.type, a = M.blocks[i] ?? r.type;
79
79
  e.push({
80
80
  value: r.id,
81
- label: M(j.savedBlocks.insertAfterBlock, { block: `${a} ${n + 1}` })
81
+ label: N(M.savedBlocks.insertAfterBlock, { block: `${a} ${n + 1}` })
82
82
  });
83
83
  }
84
84
  return e.push({
85
85
  value: "end",
86
- label: j.savedBlocks.insertAtEnd
86
+ label: M.savedBlocks.insertAtEnd
87
87
  }), e;
88
- }), ut = g(() => {
89
- if (U.value === "end") return;
90
- if (U.value === "beginning") return 0;
91
- let e = P.content.value.blocks.findIndex((e) => e.id === U.value);
88
+ }), lt = g(() => {
89
+ if (W.value === "end") return;
90
+ if (W.value === "beginning") return 0;
91
+ let e = F.content.value.blocks.findIndex((e) => e.id === W.value);
92
92
  if (e !== -1) return e + 1;
93
93
  });
94
- n(() => at.visible, (e) => {
94
+ n(() => it.visible, (e) => {
95
95
  if (e) {
96
- F.value = "", I.value = "", L.value = null, R.value = null, z.value = null;
97
- let e = P.state.selectedBlockId;
96
+ I.value = "", L.value = "", R.value = null, z.value = null, B.value = null;
97
+ let e = F.state.selectedBlockId;
98
98
  if (e) {
99
- let t = P.content.value.blocks.findIndex((t) => t.id === e);
100
- U.value = t === -1 ? "end" : e;
101
- } else U.value = "end";
99
+ let t = F.content.value.blocks.findIndex((t) => t.id === e);
100
+ W.value = t === -1 ? "end" : e;
101
+ } else W.value = "end";
102
102
  }
103
103
  }, { immediate: !0 });
104
- function dt(e) {
104
+ function ut(e) {
105
105
  let t = [], n = /* @__PURE__ */ new Set();
106
106
  for (let r of e.content) if (!n.has(r.type) && T[r.type] && (n.add(r.type), t.push({
107
107
  type: r.type,
@@ -109,40 +109,40 @@ var he = {
109
109
  })), t.length >= 5) break;
110
110
  return t;
111
111
  }
112
- function q(e) {
112
+ function J(e) {
113
113
  let t = new Set(e.content.map((e) => e.type));
114
114
  return Math.max(0, t.size - 5);
115
115
  }
116
- function J(e) {
116
+ function Y(e) {
117
117
  let t = e.updatedAt ?? e.createdAt;
118
- return t ? pe(t, j.time, M) ?? "" : "";
118
+ return t ? pe(t, M.time, N) ?? "" : "";
119
119
  }
120
- function ft(e) {
120
+ function dt(e) {
121
121
  let t = e.updatedAt ?? e.createdAt;
122
- return t ? fe(t, st) : "";
122
+ return t ? fe(t, ot) : "";
123
123
  }
124
- async function pt(e) {
124
+ async function ft(e) {
125
125
  try {
126
- await N.remove(e), L.value === e && (L.value = null);
126
+ await P.remove(e), R.value === e && (R.value = null);
127
127
  } finally {
128
- R.value = null;
128
+ z.value = null;
129
129
  }
130
130
  }
131
- async function Y(e) {
132
- N.canUpdateBlock(e) && (z.value = e.id, B.value = e.name, V.value = e.category ?? "", R.value = null, await ee(), H.value?.focus(), H.value?.select());
131
+ async function pt(e) {
132
+ P.canUpdateBlock(e) && (B.value = e.id, V.value = e.name, H.value = e.category ?? "", z.value = null, await ee(), U.value?.focus(), U.value?.select());
133
133
  }
134
134
  function X() {
135
- z.value = null, B.value = "", V.value = "";
135
+ B.value = null, V.value = "", H.value = "";
136
136
  }
137
137
  async function Z(e) {
138
- if (z.value !== e) return;
139
- let t = B.value.trim(), n = V.value.trim(), r = N.savedBlocks.value.find((t) => t.id === e), i = {};
138
+ if (B.value !== e) return;
139
+ let t = V.value.trim(), n = H.value.trim(), r = P.savedBlocks.value.find((t) => t.id === e), i = {};
140
140
  if (t && t !== r?.name && (i.name = t), n !== (r?.category ?? "") && (i.category = n), Object.keys(i).length === 0) {
141
141
  X();
142
142
  return;
143
143
  }
144
144
  try {
145
- await N.update(e, i);
145
+ await P.update(e, i);
146
146
  } finally {
147
147
  X();
148
148
  }
@@ -152,13 +152,13 @@ var he = {
152
152
  r && n.contains(r) || Z(t);
153
153
  }
154
154
  function Q() {
155
- K.value && A("insert", K.value, ut.value);
155
+ q.value && j("insert", q.value, lt.value);
156
156
  }
157
157
  function $() {
158
- A("close");
158
+ j("close");
159
159
  }
160
160
  function ht(e) {
161
- z.value || (e.key === "Escape" && $(), e.key === "Enter" && K.value && (e.preventDefault(), Q()));
161
+ B.value || (e.key === "Escape" && $(), e.key === "Enter" && q.value && (e.preventDefault(), Q()));
162
162
  }
163
163
  return (n, a) => (d(), p(me, {
164
164
  visible: v.visible,
@@ -166,8 +166,8 @@ var he = {
166
166
  onKeydown: ht
167
167
  }, {
168
168
  default: ne(() => [s("div", he, [
169
- s("div", ge, [s("h3", _e, f(h(j).savedBlocks.browse), 1), s("button", {
170
- "aria-label": h(j).savedBlocks.close,
169
+ s("div", ge, [s("h3", _e, f(h(M).savedBlocks.browse), 1), s("button", {
170
+ "aria-label": h(M).savedBlocks.close,
171
171
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-1 tpl:transition-colors tpl:text-[var(--tpl-text-dim)]",
172
172
  onClick: $
173
173
  }, [l(h(ue), {
@@ -180,107 +180,107 @@ var he = {
180
180
  "stroke-width": 2,
181
181
  class: "tpl:pointer-events-none tpl:absolute tpl:left-3 tpl:top-1/2 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]"
182
182
  }), e(s("input", {
183
- "onUpdate:modelValue": a[0] ||= (e) => F.value = e,
183
+ "onUpdate:modelValue": a[0] ||= (e) => I.value = e,
184
184
  type: "text",
185
- placeholder: h(j).savedBlocks.search,
186
- disabled: G.value,
185
+ placeholder: h(M).savedBlocks.search,
186
+ disabled: K.value,
187
187
  class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:pl-9 tpl:pr-3 tpl:text-sm tpl:outline-none tpl:disabled:opacity-50 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
188
- }, null, 8, Ce), [[y, F.value]])]), h(N).categories.value.length > 0 ? e((d(), c("select", {
188
+ }, null, 8, Ce), [[y, I.value]])]), h(P).categories.value.length > 0 ? e((d(), c("select", {
189
189
  key: 0,
190
- "onUpdate:modelValue": a[1] ||= (e) => I.value = e,
190
+ "onUpdate:modelValue": a[1] ||= (e) => L.value = e,
191
191
  "data-testid": "saved-blocks-category-filter",
192
- "aria-label": h(j).savedBlocks.filterByCategory,
192
+ "aria-label": h(M).savedBlocks.filterByCategory,
193
193
  class: "tpl:h-8 tpl:w-full tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
194
- }, [s("option", Te, f(h(j).savedBlocks.allCategories), 1), (d(!0), c(m, null, u(h(N).categories.value, (e) => (d(), c("option", {
194
+ }, [s("option", Te, f(h(M).savedBlocks.allCategories), 1), (d(!0), c(m, null, u(h(P).categories.value, (e) => (d(), c("option", {
195
195
  key: e,
196
196
  value: e
197
- }, f(e), 9, E))), 128))], 8, we)), [[x, I.value]]) : _("", !0)]),
198
- s("datalist", D, [(d(!0), c(m, null, u(h(N).categories.value, (e) => (d(), c("option", {
197
+ }, f(e), 9, E))), 128))], 8, we)), [[x, L.value]]) : _("", !0)]),
198
+ s("datalist", D, [(d(!0), c(m, null, u(h(P).categories.value, (e) => (d(), c("option", {
199
199
  key: e,
200
200
  value: e
201
201
  }, null, 8, O))), 128))]),
202
- s("div", Ee, [G.value ? (d(), c("div", {
202
+ s("div", Ee, [K.value ? (d(), c("div", {
203
203
  key: 0,
204
204
  "data-testid": "saved-blocks-loading",
205
205
  class: "tpl:flex tpl:flex-col tpl:gap-1",
206
206
  role: "status",
207
207
  "aria-busy": "true",
208
- "aria-label": h(j).savedBlocks.loading
208
+ "aria-label": h(M).savedBlocks.loading
209
209
  }, [(d(), c(m, null, u(3, (e) => s("div", {
210
210
  key: e,
211
211
  "aria-hidden": "true",
212
212
  class: "tpl-saved-block-skeleton tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)]"
213
- }, [...a[7] ||= [s("div", { class: "tpl:h-3 tpl:w-1/2 tpl:rounded tpl:bg-[var(--tpl-bg-hover)]" }, null, -1), s("div", { class: "tpl:mt-2 tpl:h-2.5 tpl:w-1/4 tpl:rounded tpl:bg-[var(--tpl-bg-hover)]" }, null, -1)]])), 64))], 8, De)) : W.value.length > 0 ? (d(), c("div", Oe, [(d(!0), c(m, null, u(W.value, (n) => (d(), c(m, { key: n.id }, [z.value === n.id ? (d(), c("div", {
213
+ }, [...a[7] ||= [s("div", { class: "tpl:h-3 tpl:w-1/2 tpl:rounded tpl:bg-[var(--tpl-bg-hover)]" }, null, -1), s("div", { class: "tpl:mt-2 tpl:h-2.5 tpl:w-1/4 tpl:rounded tpl:bg-[var(--tpl-bg-hover)]" }, null, -1)]])), 64))], 8, De)) : G.value.length > 0 ? (d(), c("div", Oe, [(d(!0), c(m, null, u(G.value, (n) => (d(), c(m, { key: n.id }, [B.value === n.id ? (d(), c("div", {
214
214
  key: 0,
215
215
  class: "tpl:flex tpl:w-full tpl:flex-col tpl:gap-1 tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-primary)]",
216
216
  style: { "background-color": "var(--tpl-primary-light)" },
217
217
  onFocusout: (e) => mt(e, n.id)
218
218
  }, [e(s("input", {
219
219
  ref_for: !0,
220
- ref: (e) => H.value = e,
221
- "onUpdate:modelValue": a[2] ||= (e) => B.value = e,
220
+ ref: (e) => U.value = e,
221
+ "onUpdate:modelValue": a[2] ||= (e) => V.value = e,
222
222
  type: "text",
223
- "aria-label": h(j).savedBlocks.rename,
223
+ "aria-label": h(M).savedBlocks.rename,
224
224
  class: "tpl:h-7 tpl:w-full tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
225
225
  onKeydown: [S(b((e) => Z(n.id), ["prevent", "stop"]), ["enter"]), a[3] ||= S(b((e) => X(), ["prevent", "stop"]), ["esc"])]
226
- }, null, 40, Ae), [[y, B.value]]), e(s("input", {
227
- "onUpdate:modelValue": a[4] ||= (e) => V.value = e,
226
+ }, null, 40, Ae), [[y, V.value]]), e(s("input", {
227
+ "onUpdate:modelValue": a[4] ||= (e) => H.value = e,
228
228
  type: "text",
229
229
  "data-testid": "saved-blocks-edit-category",
230
- "aria-label": h(j).savedBlocks.category,
231
- placeholder: h(j).savedBlocks.categoryPlaceholder,
230
+ "aria-label": h(M).savedBlocks.category,
231
+ placeholder: h(M).savedBlocks.categoryPlaceholder,
232
232
  list: "tpl-saved-block-browser-categories",
233
233
  class: "tpl:h-7 tpl:w-full tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
234
234
  onKeydown: [S(b((e) => Z(n.id), ["prevent", "stop"]), ["enter"]), a[5] ||= S(b((e) => X(), ["prevent", "stop"]), ["esc"])]
235
- }, null, 40, je), [[y, V.value]])], 40, ke)) : (d(), c("button", {
235
+ }, null, 40, je), [[y, H.value]])], 40, ke)) : (d(), c("button", {
236
236
  key: 1,
237
237
  type: "button",
238
238
  "data-testid": "saved-block-card",
239
- "aria-pressed": L.value === n.id,
239
+ "aria-pressed": R.value === n.id,
240
240
  class: "tpl:group/card tpl:w-full tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:bg-transparent tpl:px-3 tpl:py-2 tpl:text-left tpl:transition-all tpl:duration-[120ms]",
241
241
  style: r({
242
- borderColor: L.value === n.id ? "var(--tpl-primary)" : "var(--tpl-border)",
243
- backgroundColor: L.value === n.id ? "var(--tpl-primary-light)" : "transparent"
242
+ borderColor: R.value === n.id ? "var(--tpl-primary)" : "var(--tpl-border)",
243
+ backgroundColor: R.value === n.id ? "var(--tpl-primary-light)" : "transparent"
244
244
  }),
245
- onClick: (e) => L.value = n.id
245
+ onClick: (e) => R.value = n.id
246
246
  }, [
247
- s("div", Ne, [s("span", Pe, f(n.name), 1), s("span", Fe, f(h(M)(h(j).savedBlocks.blockCount, { count: n.content.length })), 1)]),
247
+ s("div", Ne, [s("span", Pe, f(n.name), 1), s("span", Fe, f(h(N)(h(M).savedBlocks.blockCount, { count: n.content.length })), 1)]),
248
248
  n.category ? (d(), c("div", Ie, [s("span", Le, f(n.category), 1)])) : _("", !0),
249
249
  s("div", Re, [
250
- (d(!0), c(m, null, u(dt(n), (e) => (d(), p(i(e.icon), {
250
+ (d(!0), c(m, null, u(ut(n), (e) => (d(), p(i(e.icon), {
251
251
  key: e.type,
252
252
  size: 14,
253
253
  "stroke-width": 1.5,
254
254
  class: "tpl:text-[var(--tpl-text-dim)]"
255
255
  }))), 128)),
256
- q(n) > 0 ? (d(), c("span", ze, " +" + f(q(n)), 1)) : _("", !0),
257
- J(n) ? (d(), c("span", {
256
+ J(n) > 0 ? (d(), c("span", ze, " +" + f(J(n)), 1)) : _("", !0),
257
+ Y(n) ? (d(), c("span", {
258
258
  key: 1,
259
259
  "data-testid": "saved-block-updated",
260
260
  class: "tpl:ml-1 tpl:truncate tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]",
261
- title: ft(n)
262
- }, f(J(n)), 9, Be)) : _("", !0),
263
- R.value === n.id ? (d(), c("button", {
261
+ title: dt(n)
262
+ }, f(Y(n)), 9, Be)) : _("", !0),
263
+ z.value === n.id ? (d(), c("button", {
264
264
  key: 2,
265
- "aria-label": h(j).savedBlocks.deleteConfirm,
265
+ "aria-label": h(M).savedBlocks.deleteConfirm,
266
266
  class: "tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:border-[var(--tpl-danger)] tpl:text-[var(--tpl-danger)]",
267
267
  style: { "background-color": "transparent" },
268
- onClick: b((e) => pt(n.id), ["stop"])
269
- }, f(h(j).savedBlocks.deleteConfirm), 9, Ve)) : (d(), c(m, { key: 3 }, [h(N).canUpdateBlock(n) ? (d(), c("button", {
268
+ onClick: b((e) => ft(n.id), ["stop"])
269
+ }, f(h(M).savedBlocks.deleteConfirm), 9, Ve)) : (d(), c(m, { key: 3 }, [h(P).canUpdateBlock(n) ? (d(), c("button", {
270
270
  key: 0,
271
271
  class: "tpl-saved-block-rename-btn tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-dim)]",
272
- "aria-label": h(j).savedBlocks.rename,
273
- title: h(j).savedBlocks.rename,
274
- onClick: b((e) => Y(n), ["stop"])
272
+ "aria-label": h(M).savedBlocks.rename,
273
+ title: h(M).savedBlocks.rename,
274
+ onClick: b((e) => pt(n), ["stop"])
275
275
  }, [l(h(ce), {
276
276
  size: 12,
277
277
  "stroke-width": 1.5
278
- })], 8, He)) : _("", !0), h(N).canDeleteBlock(n) ? (d(), c("button", {
278
+ })], 8, He)) : _("", !0), h(P).canDeleteBlock(n) ? (d(), c("button", {
279
279
  key: 1,
280
- class: t(["tpl-saved-block-delete-btn tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-dim)]", { "tpl:ml-auto": !h(N).canUpdateBlock(n) }]),
281
- "aria-label": h(j).savedBlocks.delete,
282
- title: h(j).savedBlocks.delete,
283
- onClick: b((e) => R.value = n.id, ["stop"])
280
+ class: t(["tpl-saved-block-delete-btn tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-dim)]", { "tpl:ml-auto": !h(P).canUpdateBlock(n) }]),
281
+ "aria-label": h(M).savedBlocks.delete,
282
+ title: h(M).savedBlocks.delete,
283
+ onClick: b((e) => z.value = n.id, ["stop"])
284
284
  }, [l(h(le), {
285
285
  size: 12,
286
286
  "stroke-width": 1.5
@@ -290,33 +290,33 @@ var he = {
290
290
  size: 32,
291
291
  "stroke-width": 1,
292
292
  class: "tpl:text-[var(--tpl-text-dim)]"
293
- }), ct.value ? (d(), c("p", Ge, f(h(j).savedBlocks.noResults), 1)) : (d(), c(m, { key: 1 }, [s("p", Ke, f(h(j).savedBlocks.empty), 1), s("p", qe, f(h(j).savedBlocks.emptyHint), 1)], 64))]))])
294
- ]), s("div", Je, [K.value ? (d(), c("div", Ye, [s("div", Xe, [l(h(ot), { blocks: K.value.content }, null, 8, ["blocks"])])])) : (d(), c("div", Ze, [l(h(w), {
293
+ }), st.value ? (d(), c("p", Ge, f(h(M).savedBlocks.noResults), 1)) : (d(), c(m, { key: 1 }, [s("p", k, f(h(M).savedBlocks.empty), 1), s("p", Ke, f(h(M).savedBlocks.emptyHint), 1)], 64))]))])
294
+ ]), s("div", qe, [q.value ? (d(), c("div", Je, [s("div", Ye, [l(h(at), { blocks: q.value.content }, null, 8, ["blocks"])])])) : (d(), c("div", Xe, [l(h(w), {
295
295
  size: 32,
296
296
  "stroke-width": 1,
297
297
  class: "tpl:text-[var(--tpl-text-dim)]"
298
- }), s("p", Qe, f(h(j).savedBlocks.selectToPreview), 1)]))])]),
299
- s("div", $e, [s("div", et, [s("label", tt, f(h(j).savedBlocks.insertPosition), 1), e(s("select", {
300
- "onUpdate:modelValue": a[6] ||= (e) => U.value = e,
298
+ }), s("p", Ze, f(h(M).savedBlocks.selectToPreview), 1)]))])]),
299
+ s("div", Qe, [s("div", $e, [s("label", et, f(h(M).savedBlocks.insertPosition), 1), e(s("select", {
300
+ "onUpdate:modelValue": a[6] ||= (e) => W.value = e,
301
301
  class: "tpl:h-7 tpl:max-w-[220px] tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
302
- }, [(d(!0), c(m, null, u(lt.value, (e) => (d(), c("option", {
302
+ }, [(d(!0), c(m, null, u(ct.value, (e) => (d(), c("option", {
303
303
  key: e.value,
304
304
  value: e.value
305
- }, f(e.label), 9, nt))), 128))], 512), [[x, U.value]])]), s("div", rt, [s("button", {
305
+ }, f(e.label), 9, tt))), 128))], 512), [[x, W.value]])]), s("div", nt, [s("button", {
306
306
  type: "button",
307
307
  "data-testid": "saved-blocks-browser-close",
308
308
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-[var(--tpl-shadow-sm)] tpl:transition-all tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]",
309
309
  onClick: $
310
- }, f(h(j).savedBlocks.close), 1), s("button", {
310
+ }, f(h(M).savedBlocks.close), 1), s("button", {
311
311
  type: "button",
312
312
  class: t(h(de)),
313
- disabled: !K.value,
313
+ disabled: !q.value,
314
314
  onClick: Q
315
- }, f(h(j).savedBlocks.insert), 11, it)])])
315
+ }, f(h(M).savedBlocks.insert), 11, rt)])])
316
316
  ])]),
317
317
  _: 1
318
318
  }, 8, ["visible"]));
319
319
  }
320
320
  });
321
321
  //#endregion
322
- export { k as default };
322
+ export { A as default };
@@ -5,7 +5,7 @@ var c = /* @__PURE__ */ s({
5
5
  __name: "SavedBlocksPanels",
6
6
  props: { feature: {} },
7
7
  setup(s) {
8
- let c = s, l = e(() => import("./SavedBlocksPickBar-DTjQBR00.js")), u = e(() => import("./SaveBlockDialog-tZqZzPjW.js")), d = e(() => import("./SavedBlocksBrowserModal-Bdj3GOD_.js"));
8
+ let c = s, l = e(() => import("./SavedBlocksPickBar-XyXmnSnO.js")), u = e(() => import("./SaveBlockDialog-CDCzx6Bo.js")), d = e(() => import("./SavedBlocksBrowserModal-DQR6kJB1.js"));
9
9
  function f(e, t) {
10
10
  c.feature.insert(e, t);
11
11
  }