@templatical/editor 0.32.0 → 0.33.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 (136) hide show
  1. package/dist/{AiChatSidebar-ftdKHSR-.js → AiChatSidebar-J7WsHRDS.js} +1 -1
  2. package/dist/{AiFeatureMenu-aNeCRlil.js → AiFeatureMenu-C9mxL_7U.js} +3 -3
  3. package/dist/{BlockIssueBadge-bTDu6W_2.js → BlockIssueBadge-BI6v_eol.js} +2 -2
  4. package/dist/{BlockPreviewCanvas-BsOuOfzB.js → BlockPreviewCanvas-mZIr9mY2.js} +4 -4
  5. package/dist/{CloudHeaderExtras-BNpFohqt.js → CloudHeaderExtras-CLtTtK12.js} +2 -2
  6. package/dist/{CloudPanels-xoGWwqSH.js → CloudPanels-BbLAX1jH.js} +3 -3
  7. package/dist/{CollaboratorBar-mEqXkdEi.js → CollaboratorBar-OBbLOhLK.js} +2 -2
  8. package/dist/{ColorPicker-FL5Vb9bE.js → ColorPicker-Cs7iK01u.js} +3 -3
  9. package/dist/{CommentsPanel-slfi74ng.js → CommentsPanel-G_uNzi1a.js} +1 -1
  10. package/dist/{CommentsSidebar-Dea4spMl.js → CommentsSidebar-DlFlpfkU.js} +2 -2
  11. package/dist/{CountdownBlock-DQTwaRxP.js → CountdownBlock-Bdt8qZi1.js} +1 -1
  12. package/dist/{CountdownToolbar-C7xwJoqh.js → CountdownToolbar-BWLYViOm.js} +2 -2
  13. package/dist/{DesignReferenceSidebar-BtBd7bbz.js → DesignReferenceSidebar-CK_xTLh2.js} +2 -2
  14. package/dist/{IssuesPanel-Ci2H36L2.js → IssuesPanel-DIbJ_jaa.js} +3 -3
  15. package/dist/{MergeTagModeToggle-Cdi_DmVw.js → MergeTagModeToggle-DeI65T5k.js} +2 -2
  16. package/dist/{ParagraphEditor-DQEOFc0K.js → ParagraphEditor-Dr-u72hu.js} +8 -8
  17. package/dist/{RestoreVersionDialog-CHwngBae.js → RestoreVersionDialog-6sBYYt9f.js} +2 -2
  18. package/dist/{RichTextEditorContent-C_9xi7dD.js → RichTextEditorContent-DKLVe6Io.js} +4 -4
  19. package/dist/{SaveBlockDialog-tZqZzPjW.js → SaveBlockDialog-DABN4-Jf.js} +13 -13
  20. package/dist/{SavedBlocksBrowserModal-Bdj3GOD_.js → SavedBlocksBrowserModal-BoylzTEq.js} +6 -6
  21. package/dist/{SavedBlocksPanels-2sBxAH9w.js → SavedBlocksPanels-2np4Yu1H.js} +1 -1
  22. package/dist/{SavedBlocksPickBar-DTjQBR00.js → SavedBlocksPickBar-BM7aTSK2.js} +2 -2
  23. package/dist/{TemplateScoringPanel-B6nHSrBD.js → TemplateScoringPanel-CzWoSM1V.js} +2 -2
  24. package/dist/{TestEmailModal-DuHbzO37.js → TestEmailModal-Cb0n7Dhj.js} +6 -6
  25. package/dist/{TestEmailPanel-TpwP-eK_.js → TestEmailPanel-52HjvuU7.js} +1 -1
  26. package/dist/{TitleEditor-C0JQJu38.js → TitleEditor-_taBpBfB.js} +7 -7
  27. package/dist/{TplModal-BMGmhquu.js → TplModal-CEYnwBBk.js} +3 -3
  28. package/dist/{VersionHistoryMenu-D2x6MMYx.js → VersionHistoryMenu-CsGlLSO8.js} +2 -2
  29. package/dist/{VersionHistoryPanels-aGlUVEGF.js → VersionHistoryPanels-DPmYk00L.js} +1 -1
  30. package/dist/{VersionPreviewBanner-61t3_Z-a.js → VersionPreviewBanner-VGJbEoXj.js} +1 -1
  31. package/dist/{blockTypeIcons-BsNup009.js → blockTypeIcons-IhdBwbxp.js} +1 -1
  32. package/dist/bundle-stats.json +6 -6
  33. package/dist/cdn/chunks/{AiChatSidebar-CqWvtRwB.js → AiChatSidebar-6S5LPyRW.js} +2 -2
  34. package/dist/cdn/chunks/{AiChatSidebar-CqWvtRwB.js.map → AiChatSidebar-6S5LPyRW.js.map} +1 -1
  35. package/dist/cdn/chunks/{AiFeatureMenu-DoFrLcXJ.js → AiFeatureMenu-BHCtjIfV.js} +4 -4
  36. package/dist/cdn/chunks/{AiFeatureMenu-DoFrLcXJ.js.map → AiFeatureMenu-BHCtjIfV.js.map} +1 -1
  37. package/dist/cdn/chunks/{BlockIssueBadge-B_mUH69a.js → BlockIssueBadge-2-os120N.js} +3 -3
  38. package/dist/cdn/chunks/{BlockIssueBadge-B_mUH69a.js.map → BlockIssueBadge-2-os120N.js.map} +1 -1
  39. package/dist/cdn/chunks/{BlockPreviewCanvas-CSIxs7hr.js → BlockPreviewCanvas-CYNs-Yn-.js} +5 -5
  40. package/dist/cdn/chunks/{BlockPreviewCanvas-CSIxs7hr.js.map → BlockPreviewCanvas-CYNs-Yn-.js.map} +1 -1
  41. package/dist/cdn/chunks/{CloudHeaderExtras-Dgtr7WaE.js → CloudHeaderExtras-DrbFk6Fy.js} +3 -3
  42. package/dist/cdn/chunks/{CloudHeaderExtras-Dgtr7WaE.js.map → CloudHeaderExtras-DrbFk6Fy.js.map} +1 -1
  43. package/dist/cdn/chunks/{CloudPanels-B91lUmof.js → CloudPanels-CpzYrAPQ.js} +4 -4
  44. package/dist/cdn/chunks/{CloudPanels-B91lUmof.js.map → CloudPanels-CpzYrAPQ.js.map} +1 -1
  45. package/dist/cdn/chunks/{CollaboratorBar-CQwPWoFu.js → CollaboratorBar-VMTCYn_z.js} +3 -3
  46. package/dist/cdn/chunks/{CollaboratorBar-CQwPWoFu.js.map → CollaboratorBar-VMTCYn_z.js.map} +1 -1
  47. package/dist/cdn/chunks/{ColorPicker-CdrKX48J.js → ColorPicker-B0l_UF8G.js} +4 -4
  48. package/dist/cdn/chunks/{ColorPicker-CdrKX48J.js.map → ColorPicker-B0l_UF8G.js.map} +1 -1
  49. package/dist/cdn/chunks/{CommentsPanel-BJNgTmAA.js → CommentsPanel-CXMMdLrO.js} +2 -2
  50. package/dist/cdn/chunks/{CommentsPanel-BJNgTmAA.js.map → CommentsPanel-CXMMdLrO.js.map} +1 -1
  51. package/dist/cdn/chunks/{CommentsSidebar-D6VIIPhB.js → CommentsSidebar-CGkhAJUW.js} +3 -3
  52. package/dist/cdn/chunks/{CommentsSidebar-D6VIIPhB.js.map → CommentsSidebar-CGkhAJUW.js.map} +1 -1
  53. package/dist/cdn/chunks/{CountdownBlock-BRwXUvGU.js → CountdownBlock-CPe1ulzk.js} +2 -2
  54. package/dist/cdn/chunks/{CountdownBlock-BRwXUvGU.js.map → CountdownBlock-CPe1ulzk.js.map} +1 -1
  55. package/dist/cdn/chunks/{CountdownToolbar-CVaU5WG6.js → CountdownToolbar-D5xyNd5V.js} +3 -3
  56. package/dist/cdn/chunks/{CountdownToolbar-CVaU5WG6.js.map → CountdownToolbar-D5xyNd5V.js.map} +1 -1
  57. package/dist/cdn/chunks/{DesignReferenceSidebar-BvOwE1kg.js → DesignReferenceSidebar-D1NH1WRv.js} +3 -3
  58. package/dist/cdn/chunks/{DesignReferenceSidebar-BvOwE1kg.js.map → DesignReferenceSidebar-D1NH1WRv.js.map} +1 -1
  59. package/dist/cdn/chunks/{IssuesPanel-MJZxkScz.js → IssuesPanel-07SBSZVN.js} +4 -4
  60. package/dist/cdn/chunks/{IssuesPanel-MJZxkScz.js.map → IssuesPanel-07SBSZVN.js.map} +1 -1
  61. package/dist/cdn/chunks/{MergeTagModeToggle-bNuN6PTV.js → MergeTagModeToggle-Bg8eO5nc.js} +3 -3
  62. package/dist/cdn/chunks/{MergeTagModeToggle-bNuN6PTV.js.map → MergeTagModeToggle-Bg8eO5nc.js.map} +1 -1
  63. package/dist/cdn/chunks/{ParagraphEditor-BU8tlFbL.js → ParagraphEditor-x2LTi6DN.js} +9 -9
  64. package/dist/cdn/chunks/{ParagraphEditor-BU8tlFbL.js.map → ParagraphEditor-x2LTi6DN.js.map} +1 -1
  65. package/dist/cdn/chunks/{RestoreVersionDialog-vdRFfyy0.js → RestoreVersionDialog--SjTV0_4.js} +3 -3
  66. package/dist/cdn/chunks/{RestoreVersionDialog-vdRFfyy0.js.map → RestoreVersionDialog--SjTV0_4.js.map} +1 -1
  67. package/dist/cdn/chunks/{RichTextEditorContent-C1-5I8Df.js → RichTextEditorContent-CzdMJ1c9.js} +5 -5
  68. package/dist/cdn/chunks/{RichTextEditorContent-C1-5I8Df.js.map → RichTextEditorContent-CzdMJ1c9.js.map} +1 -1
  69. package/dist/cdn/chunks/{SaveBlockDialog-DWaeqcM8.js → SaveBlockDialog-CS1lqdsQ.js} +6 -6
  70. package/dist/cdn/chunks/{SaveBlockDialog-DWaeqcM8.js.map → SaveBlockDialog-CS1lqdsQ.js.map} +1 -1
  71. package/dist/cdn/chunks/{SavedBlocksBrowserModal-qC7UhW74.js → SavedBlocksBrowserModal-D6nDZ4rq.js} +6 -6
  72. package/dist/cdn/chunks/{SavedBlocksBrowserModal-qC7UhW74.js.map → SavedBlocksBrowserModal-D6nDZ4rq.js.map} +1 -1
  73. package/dist/cdn/chunks/{SavedBlocksPanels-BvtjtdsY.js → SavedBlocksPanels-DdkwvYRR.js} +2 -2
  74. package/dist/cdn/chunks/{SavedBlocksPanels-BvtjtdsY.js.map → SavedBlocksPanels-DdkwvYRR.js.map} +1 -1
  75. package/dist/cdn/chunks/{SavedBlocksPickBar-CxXjF3RN.js → SavedBlocksPickBar-BLQr_6WM.js} +3 -3
  76. package/dist/cdn/chunks/{SavedBlocksPickBar-CxXjF3RN.js.map → SavedBlocksPickBar-BLQr_6WM.js.map} +1 -1
  77. package/dist/cdn/chunks/{TemplateScoringPanel-CroWaWqy.js → TemplateScoringPanel-CDC-JC6C.js} +3 -3
  78. package/dist/cdn/chunks/{TemplateScoringPanel-CroWaWqy.js.map → TemplateScoringPanel-CDC-JC6C.js.map} +1 -1
  79. package/dist/cdn/chunks/{TestEmailModal-iWxAZRRq.js → TestEmailModal-B2LcU11Y.js} +7 -7
  80. package/dist/cdn/chunks/{TestEmailModal-iWxAZRRq.js.map → TestEmailModal-B2LcU11Y.js.map} +1 -1
  81. package/dist/cdn/chunks/{TestEmailPanel-CGUtEuwp.js → TestEmailPanel-ByqDSx8B.js} +2 -2
  82. package/dist/cdn/chunks/{TestEmailPanel-CGUtEuwp.js.map → TestEmailPanel-ByqDSx8B.js.map} +1 -1
  83. package/dist/cdn/chunks/{TitleEditor-DvXUW2j-.js → TitleEditor-DCoulgN8.js} +8 -8
  84. package/dist/cdn/chunks/{TitleEditor-DvXUW2j-.js.map → TitleEditor-DCoulgN8.js.map} +1 -1
  85. package/dist/cdn/chunks/{TplModal-X-qNoLGZ.js → TplModal-CxQDl-tN.js} +4 -4
  86. package/dist/cdn/chunks/{TplModal-X-qNoLGZ.js.map → TplModal-CxQDl-tN.js.map} +1 -1
  87. package/dist/cdn/chunks/{VersionHistoryMenu-yKzwxf7n.js → VersionHistoryMenu-BOy8aMB6.js} +3 -3
  88. package/dist/cdn/chunks/{VersionHistoryMenu-yKzwxf7n.js.map → VersionHistoryMenu-BOy8aMB6.js.map} +1 -1
  89. package/dist/cdn/chunks/{VersionHistoryPanels--hQaanjH.js → VersionHistoryPanels-BPLhzW9c.js} +2 -2
  90. package/dist/cdn/chunks/{VersionHistoryPanels--hQaanjH.js.map → VersionHistoryPanels-BPLhzW9c.js.map} +1 -1
  91. package/dist/cdn/chunks/{VersionPreviewBanner-DWU_SqMd.js → VersionPreviewBanner-CYC9qP2i.js} +2 -2
  92. package/dist/cdn/chunks/{VersionPreviewBanner-DWU_SqMd.js.map → VersionPreviewBanner-CYC9qP2i.js.map} +1 -1
  93. package/dist/cdn/chunks/{createCloudRuntime-DD6ppb71.js → createCloudRuntime-CbSqoOba.js} +2 -2
  94. package/dist/cdn/chunks/{createCloudRuntime-DD6ppb71.js.map → createCloudRuntime-CbSqoOba.js.map} +1 -1
  95. package/dist/cdn/chunks/{extensions-BUPHNpKD.js → extensions-CeP0iOPC.js} +3 -3
  96. package/dist/cdn/chunks/{extensions-BUPHNpKD.js.map → extensions-CeP0iOPC.js.map} +1 -1
  97. package/dist/cdn/chunks/keys-O8clwJ41.js +12 -0
  98. package/dist/cdn/chunks/keys-O8clwJ41.js.map +1 -0
  99. package/dist/cdn/chunks/{src-DtnvR_Hl.js → src-C1lP5sIe.js} +2 -2
  100. package/dist/cdn/chunks/{src-DtnvR_Hl.js.map → src-C1lP5sIe.js.map} +1 -1
  101. package/dist/cdn/chunks/src-CLoCCDfs.js.map +1 -1
  102. package/dist/cdn/chunks/{useCloudI18n-DbsLlCbZ.js → useCloudI18n-ZBEJvkf4.js} +2 -2
  103. package/dist/cdn/chunks/{useCloudI18n-DbsLlCbZ.js.map → useCloudI18n-ZBEJvkf4.js.map} +1 -1
  104. package/dist/cdn/chunks/{useEditorCore-ChlgO2GN.js → useEditorCore-CZxGbZmY.js} +426 -392
  105. package/dist/cdn/chunks/useEditorCore-CZxGbZmY.js.map +1 -0
  106. package/dist/cdn/chunks/{useEditorRoot-BlF1WPeu.js → useEditorRoot-DVV-EsNI.js} +2 -2
  107. package/dist/cdn/chunks/{useEditorRoot-BlF1WPeu.js.map → useEditorRoot-DVV-EsNI.js.map} +1 -1
  108. package/dist/cdn/chunks/{useI18n-BdxNNw6j.js → useI18n-DCbvHv6W.js} +2 -2
  109. package/dist/cdn/chunks/{useI18n-BdxNNw6j.js.map → useI18n-DCbvHv6W.js.map} +1 -1
  110. package/dist/cdn/chunks/{useMergeTag-CI2WUNrR.js → useMergeTag-CbuagYNK.js} +2 -2
  111. package/dist/cdn/chunks/{useMergeTag-CI2WUNrR.js.map → useMergeTag-CbuagYNK.js.map} +1 -1
  112. package/dist/cdn/chunks/{usePopoverPosition-Dw1nTSNx.js → usePopoverPosition-Ozg5iU3y.js} +2 -2
  113. package/dist/cdn/chunks/{usePopoverPosition-Dw1nTSNx.js.map → usePopoverPosition-Ozg5iU3y.js.map} +1 -1
  114. package/dist/cdn/chunks/{useScrollToBlock-BMis3-PR.js → useScrollToBlock-CrUCYsIc.js} +2 -2
  115. package/dist/cdn/chunks/{useScrollToBlock-BMis3-PR.js.map → useScrollToBlock-CrUCYsIc.js.map} +1 -1
  116. package/dist/cdn/editor.css +1 -1
  117. package/dist/cdn/editor.js +934 -880
  118. package/dist/cdn/editor.js.map +1 -1
  119. package/dist/{createCloudRuntime-zNcMjRgb.js → createCloudRuntime-j6a9Z-vL.js} +1 -1
  120. package/dist/{extensions-kOYwOh72.js → extensions-5xeZR9U9.js} +2 -2
  121. package/dist/index.d.ts +41 -0
  122. package/dist/keys-BJJ4hJ4z.js +10 -0
  123. package/dist/style.css +1 -1
  124. package/dist/templatical-editor.js +1282 -1228
  125. package/dist/{useCloudI18n-BlMajbKp.js → useCloudI18n-DaKcDMDz.js} +1 -1
  126. package/dist/{useEditorCore-CwQYCSXO.js → useEditorCore-BWrxHVKW.js} +840 -806
  127. package/dist/{useEditorRoot-C92q8uV-.js → useEditorRoot-E-oxHaEI.js} +1 -1
  128. package/dist/{useI18n-Ce_BRzYv.js → useI18n-DUVIAju4.js} +1 -1
  129. package/dist/{useMergeTag-CrXJ49lr.js → useMergeTag-CuZZeiSE.js} +1 -1
  130. package/dist/{usePopoverPosition-CPk7Twye.js → usePopoverPosition-APlWgXoQ.js} +1 -1
  131. package/dist/{useScrollToBlock-DvpMfWs2.js → useScrollToBlock--AzCOzlg.js} +1 -1
  132. package/package.json +7 -7
  133. package/dist/cdn/chunks/keys-BOn5i9jV.js +0 -12
  134. package/dist/cdn/chunks/keys-BOn5i9jV.js.map +0 -1
  135. package/dist/cdn/chunks/useEditorCore-ChlgO2GN.js.map +0 -1
  136. package/dist/keys-BOhFlHsv.js +0 -10
@@ -1,5 +1,5 @@
1
1
  import { S as e } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
2
- import { g as t } from "./keys-BOhFlHsv.js";
2
+ import { g as t } from "./keys-BJJ4hJ4z.js";
3
3
  //#region src/composables/useEditorRoot.ts
4
4
  function n() {
5
5
  return e(t, document) ?? document;
@@ -1,5 +1,5 @@
1
1
  import { G as e, S as t } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
2
- import { V as n } from "./keys-BOhFlHsv.js";
2
+ import { H as n } from "./keys-BJJ4hJ4z.js";
3
3
  //#region src/composables/useI18n.ts
4
4
  function r(r) {
5
5
  let i = r ?? t(n, null);
@@ -1,6 +1,6 @@
1
1
  import { S as e, X as t } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
2
2
  import { I as n, k as r, o as i } from "./dist-PL6vP4SC.js";
3
- import { D as a, E as o, M as s, T as c, k as l } from "./keys-BOhFlHsv.js";
3
+ import { D as a, E as o, M as s, T as c, k as l } from "./keys-BJJ4hJ4z.js";
4
4
  //#region src/composables/useMergeTag.ts
5
5
  function u() {
6
6
  let u = e(c, []), d = e(l, i.liquid), f = e(s, null), p = e(o, !0), m = e(a, null), h = t(!1);
@@ -1,5 +1,5 @@
1
1
  import { S as e, X as t } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
2
- import { P as n } from "./keys-BOhFlHsv.js";
2
+ import { P as n } from "./keys-BJJ4hJ4z.js";
3
3
  //#region src/utils/resolveColorsConfig.ts
4
4
  var r = {
5
5
  presets: [],
@@ -1,6 +1,6 @@
1
1
  import { T as e } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
2
2
  import { t } from "./createLucideIcon-Bvw1Zx56.js";
3
- import { t as n } from "./useEditorRoot-C92q8uV-.js";
3
+ import { t as n } from "./useEditorRoot-E-oxHaEI.js";
4
4
  var r = t("list-checks", [
5
5
  ["path", {
6
6
  d: "M13 5h8",
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@templatical/editor",
3
3
  "description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
4
- "version": "0.32.0",
4
+ "version": "0.33.0",
5
5
  "bugs": "https://github.com/templatical/sdk/issues",
6
6
  "devDependencies": {
7
7
  "@lucide/vue": "^1.41.0",
8
- "@templatical/core": "0.32.0",
9
- "@templatical/quality": "0.32.0",
10
- "@templatical/types": "0.32.0",
8
+ "@templatical/core": "0.33.0",
9
+ "@templatical/quality": "0.33.0",
10
+ "@templatical/types": "0.33.0",
11
11
  "@tiptap/core": "^3.31.3",
12
12
  "@tiptap/extension-color": "^3.31.3",
13
13
  "@tiptap/extension-font-family": "^3.31.3",
@@ -63,9 +63,9 @@
63
63
  "license": "FSL-1.1-MIT",
64
64
  "module": "./dist/templatical-editor.js",
65
65
  "peerDependencies": {
66
- "@templatical/media-library": "0.32.0",
67
- "@templatical/quality": "0.32.0",
68
- "@templatical/renderer": "0.32.0"
66
+ "@templatical/media-library": "0.33.0",
67
+ "@templatical/quality": "0.33.0",
68
+ "@templatical/renderer": "0.33.0"
69
69
  },
70
70
  "peerDependenciesMeta": {
71
71
  "@templatical/renderer": {
@@ -1,12 +0,0 @@
1
- import { E as e } from "./draggable-kbOhCgnk.js";
2
- //#region src/keys.ts
3
- var t = Symbol("translations"), n = Symbol("editor"), r = Symbol("history"), i = Symbol("blockActions"), a = Symbol("conditionPreview"), o = Symbol("appliesConditionFilter"), s = Symbol("fontsManager"), c = Symbol("themeStyles"), l = Symbol("tplUiTheme"), u = Symbol("tplUiLocale"), d = Symbol("blockDefaults"), f = Symbol("blockRegistry"), p = Symbol("customBlockDefinitions"), m = Symbol("paletteBlocks"), h = Symbol("htmlBlockPreview"), g = Symbol("colors"), _ = Symbol("customBlockStylesheets"), v = Symbol("mergeTags"), y = Symbol("mergeTagSyntax"), b = Symbol("onRequestMergeTag"), x = Symbol("mergeTagAutocomplete"), S = Symbol("mergeTagSampleMode"), C = Symbol("useMergeTagSamples"), w = Symbol("resolvePreview"), T = Symbol("previewResolution"), E = Symbol("mergeTagPicker"), D = Symbol("logicTags"), O = Symbol("logicPairs"), k = Symbol("logicPicker"), A = Symbol("onRequestLogic"), j = Symbol("onRequestMedia"), M = Symbol("imageUrlResolver"), N = Symbol("displayConditions"), P = Symbol("allowCustomConditions"), F = Symbol("capabilities"), I = Symbol("keyboardReorder"), L = Symbol("templateLint"), R = Symbol("editorRoot"), z = Symbol("popoverRoot"), B = Symbol("savedBlocks"), V = Symbol("authManager"), H = Symbol("aiConfig"), U = Symbol("scoring"), W = Symbol("cloudTranslations");
4
- function G(t, n) {
5
- let r = e(t, null);
6
- if (r == null) throw Error(`${n} requires a provider for ${t.description ?? "unknown key"}. Ensure it renders inside the editor, below Editor.vue.`);
7
- return r;
8
- }
9
- //#endregion
10
- export { A, c as B, D as C, E as D, x as E, T as F, G, u as H, w as I, B as L, b as M, m as N, S as O, z as P, U as R, O as S, v as T, l as U, t as V, C as W, s as _, i as a, M as b, F as c, a as d, p as f, R as g, n as h, V as i, j, y as k, W as l, N as m, P as n, d as o, _ as p, o as r, f as s, H as t, g as u, r as v, k as w, I as x, h as y, L as z };
11
-
12
- //# sourceMappingURL=keys-BOn5i9jV.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"keys-BOn5i9jV.js","names":[],"sources":["../../../src/keys.ts"],"sourcesContent":["import { inject, type InjectionKey, type ComputedRef, type Ref } from \"vue\";\nimport type {\n UseHistoryReturn,\n UseBlockActionsReturn,\n UseConditionPreviewReturn,\n} from \"@templatical/core\";\nimport type {\n BlockDefaults,\n CustomBlockDefinition,\n DisplayCondition,\n LogicPair,\n LogicTag,\n MergeTag,\n ResolvePreview,\n SyntaxPreset,\n} from \"@templatical/types\";\nimport type { Translations, CloudTranslations } from \"./i18n\";\nimport type {\n AuthManager,\n UseAiConfigReturn,\n UseTemplateScoringReturn,\n} from \"@templatical/core/cloud\";\nimport type { UseSavedBlocksReturn } from \"@templatical/core\";\nimport type { BaseEditorReturn } from \"./composables/useEditorCore\";\nimport type { ImageUrlResolver } from \"./composables/useImageUrlResolver\";\nimport type { UseFontsReturn } from \"./composables/useFonts\";\nimport type { UseBlockRegistryReturn } from \"./composables/useBlockRegistry\";\nimport type { UseKeyboardReorderReturn } from \"./composables/useKeyboardReorder\";\nimport type { EditorCapabilities } from \"./types/editor-capabilities\";\nimport type { OnRequestMedia } from \"./index\";\n\n// ---------------------------------------------------------------------------\n// Shared keys (provided by useEditorCore, consumed by all components)\n// ---------------------------------------------------------------------------\n\nexport const TRANSLATIONS_KEY: InjectionKey<Translations> =\n Symbol(\"translations\");\n\nexport const EDITOR_KEY: InjectionKey<BaseEditorReturn> = Symbol(\"editor\");\n\nexport const HISTORY_KEY: InjectionKey<UseHistoryReturn> = Symbol(\"history\");\n\nexport const BLOCK_ACTIONS_KEY: InjectionKey<UseBlockActionsReturn> =\n Symbol(\"blockActions\");\n\nexport const CONDITION_PREVIEW_KEY: InjectionKey<UseConditionPreviewReturn> =\n Symbol(\"conditionPreview\");\n\n/**\n * Whether the hand-toggled display-condition filter applies on this surface —\n * provided per-surface, exactly like `USE_MERGE_TAG_SAMPLES_KEY`, and for the\n * same reason: the rule folds in both `previewMode` and whether a resolver owns\n * the preview, so a component that re-derived it from `CONDITION_PREVIEW_KEY`\n * plus the editor's `previewMode` could get one half wrong on its own.\n *\n * Absent means \"applies\" — a surface with no provider filters as it always has.\n */\nexport const APPLIES_CONDITION_FILTER_KEY: InjectionKey<ComputedRef<boolean>> =\n Symbol(\"appliesConditionFilter\");\n\nexport const FONTS_MANAGER_KEY: InjectionKey<UseFontsReturn> =\n Symbol(\"fontsManager\");\n\nexport const THEME_STYLES_KEY: InjectionKey<\n ComputedRef<Record<string, string>>\n> = Symbol(\"themeStyles\");\n\nexport const UI_THEME_KEY: InjectionKey<ComputedRef<string>> =\n Symbol(\"tplUiTheme\");\n\n/**\n * The editor's UI locale, exactly as the consumer passed it to\n * `init({ locale })` — unresolved, so it may be unsupported or malformed.\n *\n * For `Intl` formatting only. Translated *strings* come from\n * `TRANSLATIONS_KEY`, which is already resolved to a supported bundle; this is\n * for the labels `Intl` builds itself (dates), where the browser's own locale\n * would otherwise win and disagree with the surrounding chrome. Always format\n * through `formatAbsoluteDateTime`, which guards the malformed case.\n *\n * Not the template's `settings.locale` — that is the *email's* language and\n * belongs to content, not chrome.\n */\nexport const UI_LOCALE_KEY: InjectionKey<string | undefined> =\n Symbol(\"tplUiLocale\");\n\n// A ref, not a plain object: the recipient-facing half of these defaults\n// (video alt, countdown labels) tracks the template's own `settings.locale`,\n// which the author can change while the editor is open. Read it at insert\n// time — a value destructured at setup goes stale.\nexport const BLOCK_DEFAULTS_KEY: InjectionKey<ComputedRef<BlockDefaults>> =\n Symbol(\"blockDefaults\");\n\nexport const BLOCK_REGISTRY_KEY: InjectionKey<UseBlockRegistryReturn> =\n Symbol(\"blockRegistry\");\n\nexport const CUSTOM_BLOCK_DEFINITIONS_KEY: InjectionKey<\n CustomBlockDefinition[]\n> = Symbol(\"customBlockDefinitions\");\n\n/**\n * Consumer-supplied block-palette allowlist + order (`config.paletteBlocks`).\n * `undefined` means the default full palette. Consumed by `Sidebar.vue`.\n */\nexport const PALETTE_BLOCKS_KEY: InjectionKey<string[] | undefined> =\n Symbol(\"paletteBlocks\");\n\n/**\n * Whether HTML blocks render a live sandboxed-iframe preview in the canvas\n * (`config.htmlBlockPreview`), normalized to a boolean. `false` (the default)\n * keeps the static placeholder card. Consumed by `HtmlBlock.vue`.\n */\nexport const HTML_BLOCK_PREVIEW_KEY: InjectionKey<boolean> =\n Symbol(\"htmlBlockPreview\");\n\n/**\n * Consumer-supplied color-picker palette (`config.colors`), normalized to\n * `{ presets, allowCustom, allowCustomIgnored }` by `resolveColorsConfig`.\n * Provided by `useEditorCore`, consumed by every `ColorPicker`. The inject\n * default (`DEFAULT_RESOLVED_COLORS` = `{ presets: [], allowCustom: true,\n * allowCustomIgnored: false }`) makes an unconfigured picker render exactly\n * as before.\n */\nexport const COLORS_KEY: InjectionKey<\n import(\"./utils/resolveColorsConfig\").ResolvedColors\n> = Symbol(\"colors\");\n\nexport const CUSTOM_BLOCK_STYLESHEETS_KEY: InjectionKey<ComputedRef<string[]>> =\n Symbol(\"customBlockStylesheets\");\n\nexport const MERGE_TAGS_KEY: InjectionKey<MergeTag[]> = Symbol(\"mergeTags\");\n\nexport const MERGE_TAG_SYNTAX_KEY: InjectionKey<SyntaxPreset> =\n Symbol(\"mergeTagSyntax\");\n\nexport const ON_REQUEST_MERGE_TAG_KEY: InjectionKey<\n (() => Promise<MergeTag | null>) | null\n> = Symbol(\"onRequestMergeTag\");\n\nexport const MERGE_TAG_AUTOCOMPLETE_KEY: InjectionKey<boolean> = Symbol(\n \"mergeTagAutocomplete\",\n);\n\n/**\n * The user's choice between the previews' two merge-tag views: `true` for\n * Sample (tags replaced by their `MergeTag.sample`, rendered as ordinary text)\n * and `false` for Label (tags shown as their label with the usual cue).\n *\n * Session state owned by `useEditorCore` and driven by a toggle that exists\n * only on preview surfaces. Defaults to Sample.\n */\nexport const MERGE_TAG_SAMPLE_MODE_KEY: InjectionKey<Ref<boolean>> =\n Symbol(\"mergeTagSampleMode\");\n\n/**\n * Whether **the current render surface** substitutes samples.\n *\n * Provided per surface rather than globally, and that is the whole point:\n * substitution must never happen while editing, so `Canvas.vue` folds in its\n * `previewMode` flag and provides `false` whenever the canvas is editable, no\n * matter what the mode ref says. Preview surfaces provide the mode directly.\n *\n * Block components inject **this** key. They must never read\n * `MERGE_TAG_SAMPLE_MODE_KEY`, which would bypass the editing guard.\n */\nexport const USE_MERGE_TAG_SAMPLES_KEY: InjectionKey<ComputedRef<boolean>> =\n Symbol(\"useMergeTagSamples\");\n\n/**\n * The `resolvePreview` seam — resolved content plus its loading and failure\n * state. Provided by `useEditorCore` so every preview surface shares one\n * lifecycle; `null` when the consumer configured no hook.\n *\n * Surfaces read `content` from here instead of `editor.content`, and gate the\n * Sample/Label toggle on `supersedesSamples`.\n */\n/**\n * The raw `config.resolvePreview` hook.\n *\n * Provided alongside PREVIEW_RESOLUTION_KEY because the test-email dialog needs\n * its **own** resolution instance — it resolves for the selected recipient,\n * which the editor's canvas has no notion of — and so cannot reuse the shared\n * one. `undefined` when the consumer configured no hook.\n */\nexport const RESOLVE_PREVIEW_KEY: InjectionKey<ResolvePreview | undefined> =\n Symbol(\"resolvePreview\");\n\nexport const PREVIEW_RESOLUTION_KEY: InjectionKey<\n import(\"./composables/usePreviewResolution\").UsePreviewResolutionReturn | null\n> = Symbol(\"previewResolution\");\n\n/**\n * Singleton state for the built-in merge tag picker modal. Provided by\n * `useEditorCore`, consumed by `useMergeTag.requestMergeTag()` (to open\n * the modal as a fall-through when only `mergeTags.tags` is configured)\n * and by `MergeTagPickerModal.vue` (to render and resolve).\n */\nexport const MERGE_TAG_PICKER_KEY: InjectionKey<\n import(\"./composables/useMergeTagPicker\").UseMergeTagPickerReturn\n> = Symbol(\"mergeTagPicker\");\n\n// ---------------------------------------------------------------------------\n// Logic tags — a standalone feature, separate from merge tags. Native\n// highlighting (LogicMergeTagNode) is always on; these drive the dedicated\n// logic picker + insertion.\n// ---------------------------------------------------------------------------\n\nexport const LOGIC_TAGS_KEY: InjectionKey<LogicTag[]> = Symbol(\"logicTags\");\n\nexport const LOGIC_PAIRS_KEY: InjectionKey<LogicPair[]> = Symbol(\"logicPairs\");\n\n/**\n * Singleton state for the built-in logic picker modal. Provided by\n * `useEditorCore`, consumed by `useLogicTag.requestLogicTag()` (to open the modal)\n * and by `LogicTagPickerModal.vue` (to render and resolve).\n */\nexport const LOGIC_TAG_PICKER_KEY: InjectionKey<\n import(\"./composables/useLogicTagPicker\").UseLogicTagPickerReturn\n> = Symbol(\"logicPicker\");\n\nexport const ON_REQUEST_LOGIC_TAG_KEY: InjectionKey<\n (() => Promise<LogicTag | LogicPair | null>) | null\n> = Symbol(\"onRequestLogic\");\n\nexport const ON_REQUEST_MEDIA_KEY: InjectionKey<OnRequestMedia | null> =\n Symbol(\"onRequestMedia\");\n\n/**\n * Per-editor display-only image URL resolver (`config.resolveImageUrl`),\n * wrapped with a per-src cache by `createImageUrlResolver`. `null` when the\n * host doesn't resolve — the canvas then displays canonical src values\n * verbatim. Consumed via `useResolvedImageSrc` in image-displaying blocks.\n */\nexport const IMAGE_URL_RESOLVER_KEY: InjectionKey<ImageUrlResolver | null> =\n Symbol(\"imageUrlResolver\");\n\nexport const DISPLAY_CONDITIONS_KEY: InjectionKey<DisplayCondition[]> =\n Symbol(\"displayConditions\");\n\nexport const ALLOW_CUSTOM_CONDITIONS_KEY: InjectionKey<boolean> = Symbol(\n \"allowCustomConditions\",\n);\n\nexport const CAPABILITIES_KEY: InjectionKey<EditorCapabilities> =\n Symbol(\"capabilities\");\n\nexport const KEYBOARD_REORDER_KEY: InjectionKey<UseKeyboardReorderReturn> =\n Symbol(\"keyboardReorder\");\n\nexport const TEMPLATE_LINT_KEY: InjectionKey<\n import(\"./composables/useTemplateLint\").UseTemplateLintReturn | null\n> = Symbol(\"templateLint\");\n\n/**\n * The editor's effective DOM root — `Document` in light-DOM mode, `ShadowRoot`\n * when `shadowDom: true`. Composables that read `document.activeElement`,\n * popup mount targets, etc. should inject this and use the root-aware API\n * (both `Document` and `ShadowRoot` expose `activeElement` etc.).\n */\nexport const EDITOR_ROOT_KEY: InjectionKey<Document | ShadowRoot> =\n Symbol(\"editorRoot\");\n\n/**\n * Mount target for popovers, toolbars, and modal dialogs — never\n * `document.body`. Provided by `useEditorCore` as a ref bound\n * to a `<div class=\"tpl-popover-root\" />` rendered at the top level of the\n * editor template. Teleports use `:to=\"popoverRoot\"` so popups land inside\n * the editor's effective root — `document` in light-DOM mode, `ShadowRoot`\n * when `shadowDom: true` — instead of escaping the shadow boundary.\n *\n * Null until the editor's template mounts; consumers must guard with\n * `v-if=\"popoverRoot\"` before passing to `<Teleport>`.\n */\nexport const POPOVER_ROOT_KEY: InjectionKey<Ref<HTMLElement | null>> =\n Symbol(\"popoverRoot\");\n\n/**\n * Reactive saved-blocks state, provided by `useSavedBlocksFeature` when a\n * `SavedBlocksProvider` is configured. Shared by OSS and Cloud — the storage\n * transport lives behind the provider, so this key is not cloud-specific.\n */\nexport const SAVED_BLOCKS_KEY: InjectionKey<UseSavedBlocksReturn> =\n Symbol(\"savedBlocks\");\n\n// ---------------------------------------------------------------------------\n// Cloud-only keys (provided by createCloudRuntime, consumed by cloud components)\n// ---------------------------------------------------------------------------\n\nexport const AUTH_MANAGER_KEY: InjectionKey<AuthManager> =\n Symbol(\"authManager\");\n\nexport const AI_CONFIG_KEY: InjectionKey<UseAiConfigReturn> =\n Symbol(\"aiConfig\");\n\n// Comments are deliberately not injected: the panel takes `useCommentsFeature`'s\n// return as a **prop** the way `TestEmailPanel` and `SavedBlocksPanels` do, and the\n// per-block indicators read the comments entry on `CAPABILITIES_KEY`. Nothing\n// injects the composable itself.\n\nexport const SCORING_KEY: InjectionKey<UseTemplateScoringReturn> =\n Symbol(\"scoring\");\n\nexport const CLOUD_TRANSLATIONS_KEY: InjectionKey<CloudTranslations> =\n Symbol(\"cloudTranslations\");\n\n// ---------------------------------------------------------------------------\n// Helper for required injections with explicit null default + throw\n// ---------------------------------------------------------------------------\n\nexport function requireInject<T>(\n key: InjectionKey<T>,\n componentName: string,\n): T {\n const value = inject(key, null) as T | null;\n if (value === null || value === undefined) {\n throw new Error(\n `${componentName} requires a provider for ${key.description ?? \"unknown key\"}. Ensure it renders inside the editor, below Editor.vue.`,\n );\n }\n return value;\n}\n"],"mappings":";;AAmCA,IAAa,IACX,OAAO,cAAc,GAEV,IAA6C,OAAO,QAAQ,GAE5D,IAA8C,OAAO,SAAS,GAE9D,IACX,OAAO,cAAc,GAEV,IACX,OAAO,kBAAkB,GAWd,IACX,OAAO,wBAAwB,GAEpB,IACX,OAAO,cAAc,GAEV,IAET,OAAO,aAAa,GAEX,IACX,OAAO,YAAY,GAeR,IACX,OAAO,aAAa,GAMT,IACX,OAAO,eAAe,GAEX,IACX,OAAO,eAAe,GAEX,IAET,OAAO,wBAAwB,GAMtB,IACX,OAAO,eAAe,GAOX,IACX,OAAO,kBAAkB,GAUd,IAET,OAAO,QAAQ,GAEN,IACX,OAAO,wBAAwB,GAEpB,IAA2C,OAAO,WAAW,GAE7D,IACX,OAAO,gBAAgB,GAEZ,IAET,OAAO,mBAAmB,GAEjB,IAAoD,OAC/D,sBACF,GAUa,IACX,OAAO,oBAAoB,GAahB,IACX,OAAO,oBAAoB,GAkBhB,IACX,OAAO,gBAAgB,GAEZ,IAET,OAAO,mBAAmB,GAQjB,IAET,OAAO,gBAAgB,GAQd,IAA2C,OAAO,WAAW,GAE7D,IAA6C,OAAO,YAAY,GAOhE,IAET,OAAO,aAAa,GAEX,IAET,OAAO,gBAAgB,GAEd,IACX,OAAO,gBAAgB,GAQZ,IACX,OAAO,kBAAkB,GAEd,IACX,OAAO,mBAAmB,GAEf,IAAqD,OAChE,uBACF,GAEa,IACX,OAAO,cAAc,GAEV,IACX,OAAO,iBAAiB,GAEb,IAET,OAAO,cAAc,GAQZ,IACX,OAAO,YAAY,GAaR,IACX,OAAO,aAAa,GAOT,IACX,OAAO,aAAa,GAMT,IACX,OAAO,aAAa,GAET,IACX,OAAO,UAAU,GAON,IACX,OAAO,SAAS,GAEL,IACX,OAAO,mBAAmB;AAM5B,SAAgB,EACd,GACA,GACG;CACH,IAAM,IAAQ,EAAO,GAAK,IAAI;CAC9B,IAAI,KAAU,MACZ,MAAU,MACR,GAAG,EAAc,2BAA2B,EAAI,eAAe,cAAc,yDAC/E;CAEF,OAAO;AACT"}