@templatical/editor 0.6.5 → 0.6.7

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 (87) hide show
  1. package/dist/{AiFeatureMenu-uXTxJh06.js → AiFeatureMenu-ChlAWywJ.js} +1 -1
  2. package/dist/{CloudEditor-_GaYluN7.js → CloudEditor-DYYaScFe.js} +4 -4
  3. package/dist/{CollaboratorBar-C4eXJkXW.js → CollaboratorBar-Bo8vtPId.js} +1 -1
  4. package/dist/{ModuleBrowserModal-EDKHLJtb.js → ModuleBrowserModal-CKhsaPnA.js} +4 -4
  5. package/dist/{ModulePreviewCanvas-MQxat34K.js → ModulePreviewCanvas-Cw9GeGus.js} +1 -1
  6. package/dist/{ParagraphEditor-C8IP9HOZ.js → ParagraphEditor-DjDiUzmv.js} +1 -1
  7. package/dist/{SaveModuleDialog-Bgu0FVr6.js → SaveModuleDialog-CSUPmfRP.js} +2 -2
  8. package/dist/{SnapshotHistory-aSULEKUJ.js → SnapshotHistory-DwX2fj6N.js} +1 -1
  9. package/dist/{TestEmailModal-wcbmmWCs.js → TestEmailModal-CIlBvWWn.js} +2 -2
  10. package/dist/{TitleEditor-21D8_OUQ.js → TitleEditor-BCV5k6wj.js} +1 -1
  11. package/dist/{TplModal-CINtyB6Y.js → TplModal-C3Hq9b58.js} +1 -1
  12. package/dist/{blockTypeIcons-DKetBdJx.js → blockTypeIcons-iUurP50H.js} +1 -1
  13. package/dist/bundle-stats.json +7 -7
  14. package/dist/cdn/chunks/{AccessibilityPanel-BMSGhaNU.js → AccessibilityPanel-DnNB30b0.js} +3 -3
  15. package/dist/cdn/chunks/{AccessibilityPanel-BMSGhaNU.js.map → AccessibilityPanel-DnNB30b0.js.map} +1 -1
  16. package/dist/cdn/chunks/{AiFeatureMenu-hNba-JqQ.js → AiFeatureMenu-BKBh_ueF.js} +2 -2
  17. package/dist/cdn/chunks/{AiFeatureMenu-hNba-JqQ.js.map → AiFeatureMenu-BKBh_ueF.js.map} +1 -1
  18. package/dist/cdn/chunks/{BlockA11yBadge-BIR88CvN.js → BlockA11yBadge-CnBu14Fj.js} +2 -2
  19. package/dist/cdn/chunks/{BlockA11yBadge-BIR88CvN.js.map → BlockA11yBadge-CnBu14Fj.js.map} +1 -1
  20. package/dist/cdn/chunks/{CloudEditor-D2G2nNpQ.js → CloudEditor-CmR17piA.js} +7 -7
  21. package/dist/cdn/chunks/{CloudEditor-D2G2nNpQ.js.map → CloudEditor-CmR17piA.js.map} +1 -1
  22. package/dist/cdn/chunks/{CollaboratorBar-Btzom8dY.js → CollaboratorBar-BejZaFtY.js} +3 -3
  23. package/dist/cdn/chunks/{CollaboratorBar-Btzom8dY.js.map → CollaboratorBar-BejZaFtY.js.map} +1 -1
  24. package/dist/cdn/chunks/{CountdownBlock-BJSAJlJ1.js → CountdownBlock-CjvUEHhE.js} +2 -2
  25. package/dist/cdn/chunks/{CountdownBlock-BJSAJlJ1.js.map → CountdownBlock-CjvUEHhE.js.map} +1 -1
  26. package/dist/cdn/chunks/{CountdownToolbar-DbknNrIi.js → CountdownToolbar-Caokkqsg.js} +3 -3
  27. package/dist/cdn/chunks/{CountdownToolbar-DbknNrIi.js.map → CountdownToolbar-Caokkqsg.js.map} +1 -1
  28. package/dist/cdn/chunks/{ModuleBrowserModal-BvAuW8O5.js → ModuleBrowserModal-Tb9a7L-K.js} +5 -5
  29. package/dist/cdn/chunks/{ModuleBrowserModal-BvAuW8O5.js.map → ModuleBrowserModal-Tb9a7L-K.js.map} +1 -1
  30. package/dist/cdn/chunks/{ModulePreviewCanvas-CYtt0boo.js → ModulePreviewCanvas-JWIEv5oS.js} +2 -2
  31. package/dist/cdn/chunks/{ModulePreviewCanvas-CYtt0boo.js.map → ModulePreviewCanvas-JWIEv5oS.js.map} +1 -1
  32. package/dist/cdn/chunks/{NumberWithSuffix-CVfo9ztG.js → NumberWithSuffix-DrV8eumz.js} +2 -2
  33. package/dist/cdn/chunks/{NumberWithSuffix-CVfo9ztG.js.map → NumberWithSuffix-DrV8eumz.js.map} +1 -1
  34. package/dist/cdn/chunks/{ParagraphEditor-DCo58JP8.js → ParagraphEditor-CSfShBAO.js} +5 -5
  35. package/dist/cdn/chunks/{ParagraphEditor-DCo58JP8.js.map → ParagraphEditor-CSfShBAO.js.map} +1 -1
  36. package/dist/cdn/chunks/{RichTextEditorContent-BzCThv84.js → RichTextEditorContent-DgqZzl8n.js} +2 -2
  37. package/dist/cdn/chunks/{RichTextEditorContent-BzCThv84.js.map → RichTextEditorContent-DgqZzl8n.js.map} +1 -1
  38. package/dist/cdn/chunks/{SaveModuleDialog-S2Lix1LD.js → SaveModuleDialog-CxTwrIgx.js} +2 -2
  39. package/dist/cdn/chunks/{SaveModuleDialog-S2Lix1LD.js.map → SaveModuleDialog-CxTwrIgx.js.map} +1 -1
  40. package/dist/cdn/chunks/{TitleEditor-CYzAMuUW.js → TitleEditor-DlqV7ODD.js} +5 -5
  41. package/dist/cdn/chunks/{TitleEditor-CYzAMuUW.js.map → TitleEditor-DlqV7ODD.js.map} +1 -1
  42. package/dist/cdn/chunks/{blockTypeIcons-DOzUHoor.js → blockTypeIcons-DMt-2qR6.js} +3 -3
  43. package/dist/cdn/chunks/{blockTypeIcons-DOzUHoor.js.map → blockTypeIcons-DMt-2qR6.js.map} +1 -1
  44. package/dist/cdn/chunks/{de-D8CnZxV9.js → de-B_6zGPbx.js} +1 -1
  45. package/dist/cdn/chunks/{de-D8CnZxV9.js.map → de-B_6zGPbx.js.map} +1 -1
  46. package/dist/cdn/chunks/{de-Ce-LbJ2J.js → de-DG1WWVXM.js} +1 -1
  47. package/dist/cdn/chunks/{de-Ce-LbJ2J.js.map → de-DG1WWVXM.js.map} +1 -1
  48. package/dist/cdn/chunks/{en-DiCWK5fG.js → en-BE6OV83-.js} +1 -1
  49. package/dist/cdn/chunks/{en-DiCWK5fG.js.map → en-BE6OV83-.js.map} +1 -1
  50. package/dist/cdn/chunks/{en-8FHaQv4V.js → en-pYt1-lm4.js} +1 -1
  51. package/dist/cdn/chunks/{en-8FHaQv4V.js.map → en-pYt1-lm4.js.map} +1 -1
  52. package/dist/cdn/chunks/{extensions-wafZZ0-_.js → extensions-CUvwrffu.js} +2 -2
  53. package/dist/cdn/chunks/{extensions-wafZZ0-_.js.map → extensions-CUvwrffu.js.map} +1 -1
  54. package/dist/cdn/chunks/{features-B4tNvoi4.js → features-U3nzKc-R.js} +24 -14
  55. package/dist/cdn/chunks/features-U3nzKc-R.js.map +1 -0
  56. package/dist/cdn/chunks/{icons-B5nBFtvb.js → icons-QcjADKIW.js} +2 -2
  57. package/dist/cdn/chunks/{icons-B5nBFtvb.js.map → icons-QcjADKIW.js.map} +1 -1
  58. package/dist/cdn/chunks/{media-library-BLaoBxHe.js → media-library-Zcd_GInj.js} +3 -3
  59. package/dist/cdn/chunks/{media-library-BLaoBxHe.js.map → media-library-Zcd_GInj.js.map} +1 -1
  60. package/dist/cdn/chunks/pt-BR-BYRTP5Ww.js +89 -0
  61. package/dist/cdn/chunks/pt-BR-BYRTP5Ww.js.map +1 -0
  62. package/dist/cdn/chunks/pt-BR-CQl2JxRp.js +209 -0
  63. package/dist/cdn/chunks/pt-BR-CQl2JxRp.js.map +1 -0
  64. package/dist/cdn/chunks/pt-BR-CtDwVsN-.js +523 -0
  65. package/dist/cdn/chunks/pt-BR-CtDwVsN-.js.map +1 -0
  66. package/dist/cdn/chunks/{quality-D920ZxXf.js → quality-8eo6DM3p.js} +2 -2
  67. package/dist/cdn/chunks/{quality-D920ZxXf.js.map → quality-8eo6DM3p.js.map} +1 -1
  68. package/dist/cdn/chunks/{renderer-Yk30CckU.js → renderer-eHJyPiJH.js} +2 -2
  69. package/dist/cdn/chunks/{renderer-Yk30CckU.js.map → renderer-eHJyPiJH.js.map} +1 -1
  70. package/dist/cdn/chunks/{src-kLJg7Y0m.js → src-CthVYW_o.js} +178 -163
  71. package/dist/cdn/chunks/{src-kLJg7Y0m.js.map → src-CthVYW_o.js.map} +1 -1
  72. package/dist/cdn/chunks/{styles-DrVLif14.js → styles-CV5w3kjq.js} +8 -8
  73. package/dist/cdn/chunks/{styles-DrVLif14.js.map → styles-CV5w3kjq.js.map} +1 -1
  74. package/dist/cdn/editor.css +1 -1
  75. package/dist/cdn/editor.js +102 -79
  76. package/dist/cdn/editor.js.map +1 -1
  77. package/dist/index.d.ts +18 -0
  78. package/dist/pt-BR-BMGasLBa.js +521 -0
  79. package/dist/pt-BR-Vq7D7c11.js +207 -0
  80. package/dist/style.css +1 -1
  81. package/dist/{styles-CwJQsnSp.js → styles-BgmKdc2x.js} +2 -2
  82. package/dist/templatical-editor.js +105 -82
  83. package/dist/{useEditorCore-DLd-5qMg.js → useEditorCore-CnXrv71D.js} +25 -15
  84. package/package.json +7 -7
  85. package/dist/cdn/chunks/features-B4tNvoi4.js.map +0 -1
  86. /package/dist/{de-Brqvgr43.js → de-DcVOh9Fp.js} +0 -0
  87. /package/dist/{en-WDVp87TE.js → en-TZVJ_f6v.js} +0 -0
@@ -1,17 +1,17 @@
1
- import { A as e, B as t, O as n, S as r, X as i, _ as a, at as o, b as s, f as c, h as l, k as ee, m as u, n as d, o as f, ot as p, p as m, rt as h, st as g, t as te, v as _, z as ne } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
2
- import { r as v } from "./timeouts-BSGxjuUF.js";
3
- import { L as y, t as b, x } from "./useEditorCore-DLd-5qMg.js";
4
- import { a as S, c as C, i as w, l as T, n as E, o as re, r as D, s as O, t as k } from "./styles-CwJQsnSp.js";
5
- import { t as A } from "./_plugin-vue_export-helper-B0hnzhyu.js";
1
+ import { A as e, B as t, O as n, S as r, X as i, _ as a, at as o, b as s, f as c, h as l, k as u, m as d, n as f, o as p, ot as m, p as h, rt as g, st as _, t as v, v as y, z as b } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
2
+ import { r as x } from "./timeouts-BSGxjuUF.js";
3
+ import { L as S, t as C, x as w } from "./useEditorCore-CnXrv71D.js";
4
+ import { a as T, c as E, i as D, l as O, n as k, o as ee, r as te, s as ne, t as re } from "./styles-BgmKdc2x.js";
5
+ import { t as ie } from "./_plugin-vue_export-helper-B0hnzhyu.js";
6
6
  //#region src/Editor.vue?vue&type=script&setup=true&lang.ts
7
- var j = ["data-tpl-theme"], M = {
7
+ var ae = ["data-tpl-theme"], oe = {
8
8
  class: "tpl-header tpl:absolute tpl:top-0 tpl:right-0 tpl:left-0 tpl:z-50 tpl:grid tpl:h-14 tpl:grid-cols-[1fr_auto_1fr] tpl:items-center tpl:px-4 tpl:shadow-[var(--tpl-shadow-md)] tpl:border-b tpl:border-[var(--tpl-border)]",
9
9
  style: {
10
10
  "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
11
11
  "backdrop-filter": "blur(12px)",
12
12
  "-webkit-backdrop-filter": "blur(12px)"
13
13
  }
14
- }, N = { class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, P = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, F = { class: "tpl:flex tpl:justify-center tpl:p-8" }, I = ["aria-label"], L = /* @__PURE__ */ A(/* @__PURE__ */ s({
14
+ }, A = { class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, j = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, M = { class: "tpl:flex tpl:justify-center tpl:p-8" }, N = ["aria-label"], P = /* @__PURE__ */ ie(/* @__PURE__ */ s({
15
15
  __name: "Editor",
16
16
  props: {
17
17
  config: {},
@@ -19,11 +19,11 @@ var j = ["data-tpl-theme"], M = {
19
19
  fontsManager: {}
20
20
  },
21
21
  setup(r, { expose: i }) {
22
- let s = r, d = y({
22
+ let s = r, f = S({
23
23
  content: s.config.content,
24
24
  templateDefaults: s.config.templateDefaults
25
- }), v = b({
26
- editor: d,
25
+ }), x = C({
26
+ editor: f,
27
27
  config: {
28
28
  uiTheme: s.config.uiTheme,
29
29
  theme: s.config.theme,
@@ -32,67 +32,67 @@ var j = ["data-tpl-theme"], M = {
32
32
  mergeTags: s.config.mergeTags,
33
33
  displayConditions: s.config.displayConditions,
34
34
  onRequestMedia: s.config.onRequestMedia,
35
- accessibility: C(s.config),
36
- onSave: s.config.onSave ? () => s.config.onSave(JSON.parse(JSON.stringify(d.state.content))) : void 0
35
+ accessibility: E(s.config),
36
+ onSave: s.config.onSave ? () => s.config.onSave(JSON.parse(JSON.stringify(f.state.content))) : void 0
37
37
  },
38
38
  translations: s.translations,
39
39
  fontsManager: s.fontsManager,
40
- autoSaveOptions: s.config.onChange ? { onChange: () => s.config.onChange(JSON.parse(JSON.stringify(d.state.content))) } : null
40
+ autoSaveOptions: s.config.onChange ? { onChange: () => s.config.onChange(JSON.parse(JSON.stringify(f.state.content))) } : null
41
41
  });
42
42
  return n(async () => {
43
43
  await s.fontsManager.loadCustomFonts();
44
- }), ee(() => {
45
- s.fontsManager.cleanupFontLinks(), v.destroy();
44
+ }), u(() => {
45
+ s.fontsManager.cleanupFontLinks(), x.destroy();
46
46
  }), i({
47
- getContent: () => d.content.value,
48
- setContent: (e) => d.setContent(e),
49
- setTheme: (e) => d.setUiTheme(e),
50
- renderCustomBlock: v.registry.renderCustomBlock
47
+ getContent: () => f.content.value,
48
+ setContent: (e) => f.setContent(e),
49
+ setTheme: (e) => f.setUiTheme(e),
50
+ renderCustomBlock: x.registry.renderCustomBlock
51
51
  }), (n, i) => (e(), l("div", {
52
- class: o(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": h(d).state.darkMode }]),
53
- "data-tpl-theme": h(v).resolvedTheme.value,
54
- style: p(h(v).themeStyles.value)
52
+ class: o(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": g(f).state.darkMode }]),
53
+ "data-tpl-theme": g(x).resolvedTheme.value,
54
+ style: m(g(x).themeStyles.value)
55
55
  }, [
56
- c("header", M, [
56
+ c("header", oe, [
57
57
  i[5] ||= c("div", { class: "tpl:flex tpl:items-center tpl:gap-2.5" }, null, -1),
58
- c("div", N, [
59
- _(w, {
60
- viewport: h(d).state.viewport,
61
- onChange: h(d).setViewport
58
+ c("div", A, [
59
+ y(D, {
60
+ viewport: g(f).state.viewport,
61
+ onChange: g(f).setViewport
62
62
  }, null, 8, ["viewport", "onChange"]),
63
- _(E, {
64
- "dark-mode": h(d).state.darkMode,
65
- onChange: h(d).setDarkMode
63
+ y(k, {
64
+ "dark-mode": g(f).state.darkMode,
65
+ onChange: g(f).setDarkMode
66
66
  }, null, 8, ["dark-mode", "onChange"]),
67
- _(D, {
68
- "preview-mode": h(d).state.previewMode,
69
- onChange: h(d).setPreviewMode
67
+ y(te, {
68
+ "preview-mode": g(f).state.previewMode,
69
+ onChange: g(f).setPreviewMode
70
70
  }, null, 8, ["preview-mode", "onChange"])
71
71
  ]),
72
72
  i[6] ||= c("div", { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, null, -1)
73
73
  ]),
74
- t(_(re, null, null, 512), [[f, !h(d).state.previewMode]]),
74
+ t(y(ee, null, null, 512), [[p, !g(f).state.previewMode]]),
75
75
  c("div", {
76
- class: o(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto tpl:bg-[var(--tpl-canvas-bg)]", [h(d).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]", "tpl:top-14"]]),
76
+ class: o(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto tpl:bg-[var(--tpl-canvas-bg)]", [g(f).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]", "tpl:top-14"]]),
77
77
  style: { transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)" }
78
- }, [c("div", P, [_(te, { name: "tpl-restore-btn" }, {
79
- default: ne(() => [h(v).conditionPreview.hasHiddenBlocks.value ? (e(), l("button", {
78
+ }, [c("div", j, [y(v, { name: "tpl-restore-btn" }, {
79
+ default: b(() => [g(x).conditionPreview.hasHiddenBlocks.value ? (e(), l("button", {
80
80
  key: 0,
81
81
  class: "tpl:absolute tpl:left-1/2 tpl:top-2 tpl:-translate-x-1/2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-full tpl:border tpl:px-3.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:whitespace-nowrap tpl:shadow-md tpl:hover:opacity-80 tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)] tpl:border-[var(--tpl-warning)]",
82
82
  style: { "backdrop-filter": "blur(8px)" },
83
- onClick: i[0] ||= (e) => h(v).conditionPreview.reset()
84
- }, [_(h(T), {
83
+ onClick: i[0] ||= (e) => g(x).conditionPreview.reset()
84
+ }, [y(g(O), {
85
85
  size: 13,
86
86
  "stroke-width": 2
87
- }), a(" " + g(h(v).t.blockSettings.restoreHiddenBlocks), 1)])) : u("", !0)]),
87
+ }), a(" " + _(g(x).t.blockSettings.restoreHiddenBlocks), 1)])) : d("", !0)]),
88
88
  _: 1
89
- })]), c("div", F, [_(O, {
90
- viewport: h(d).state.viewport,
91
- content: h(d).content.value,
92
- "selected-block-id": h(d).state.selectedBlockId,
93
- "dark-mode": h(d).state.darkMode,
94
- "preview-mode": h(d).state.previewMode,
95
- onSelectBlock: h(d).selectBlock
89
+ })]), c("div", M, [y(ne, {
90
+ viewport: g(f).state.viewport,
91
+ content: g(f).content.value,
92
+ "selected-block-id": g(f).state.selectedBlockId,
93
+ "dark-mode": g(f).state.darkMode,
94
+ "preview-mode": g(f).state.previewMode,
95
+ onSelectBlock: g(f).selectBlock
96
96
  }, null, 8, [
97
97
  "viewport",
98
98
  "content",
@@ -101,57 +101,80 @@ var j = ["data-tpl-theme"], M = {
101
101
  "preview-mode",
102
102
  "onSelectBlock"
103
103
  ])])], 2),
104
- r.config.branding === !1 ? u("", !0) : (e(), m(k, {
104
+ r.config.branding === !1 ? d("", !0) : (e(), h(re, {
105
105
  key: 0,
106
- "position-class": [h(d).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]"]
106
+ "position-class": [g(f).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]"]
107
107
  }, null, 8, ["position-class"])),
108
108
  c("div", {
109
109
  class: "tpl-sr-only",
110
110
  role: "status",
111
111
  "aria-live": "polite",
112
112
  "aria-atomic": "true",
113
- "aria-label": h(v).t.landmarks.reorderAnnouncements
114
- }, g(h(v).keyboardReorder.announcement.value), 9, I),
115
- t(_(S, {
116
- "selected-block": h(d).selectedBlock.value,
117
- settings: h(d).content.value.settings,
118
- onUpdateBlock: i[1] ||= (e) => h(d).updateBlock(h(d).state.selectedBlockId, e),
113
+ "aria-label": g(x).t.landmarks.reorderAnnouncements
114
+ }, _(g(x).keyboardReorder.announcement.value), 9, N),
115
+ t(y(T, {
116
+ "selected-block": g(f).selectedBlock.value,
117
+ settings: g(f).content.value.settings,
118
+ onUpdateBlock: i[1] ||= (e) => g(f).updateBlock(g(f).state.selectedBlockId, e),
119
119
  onDeleteBlock: i[2] ||= () => {
120
- h(d).state.selectedBlockId && h(v).blockActions.deleteBlock(h(d).state.selectedBlockId);
120
+ g(f).state.selectedBlockId && g(x).blockActions.deleteBlock(g(f).state.selectedBlockId);
121
121
  },
122
122
  onDuplicateBlock: i[3] ||= () => {
123
- h(d).selectedBlock.value && h(v).blockActions.duplicateBlock(h(d).selectedBlock.value);
123
+ g(f).selectedBlock.value && g(x).blockActions.duplicateBlock(g(f).selectedBlock.value);
124
124
  },
125
- onUpdateSettings: i[4] ||= (e) => h(d).updateSettings(e)
126
- }, null, 8, ["selected-block", "settings"]), [[f, !h(d).state.previewMode]])
127
- ], 14, j));
125
+ onUpdateSettings: i[4] ||= (e) => g(f).updateSettings(e)
126
+ }, null, 8, ["selected-block", "settings"]), [[p, !g(f).state.previewMode]])
127
+ ], 14, ae));
128
128
  }
129
- }), [["__scopeId", "data-v-9ffdcb5e"]]), R = /* @__PURE__ */ Object.assign({
130
- "./locales/de.ts": () => import("./de-Brqvgr43.js"),
131
- "./locales/en.ts": () => import("./en-WDVp87TE.js")
132
- }), z = /* @__PURE__ */ Object.assign({
129
+ }), [["__scopeId", "data-v-9ffdcb5e"]]), F = /* @__PURE__ */ Object.assign({
130
+ "./locales/de.ts": () => import("./de-DcVOh9Fp.js"),
131
+ "./locales/en.ts": () => import("./en-TZVJ_f6v.js"),
132
+ "./locales/pt-BR.ts": () => import("./pt-BR-BMGasLBa.js")
133
+ }), I = /* @__PURE__ */ Object.assign({
133
134
  "./locales/cloud/de.ts": () => import("./de-DCaaCE5s.js"),
134
- "./locales/cloud/en.ts": () => import("./en-DXCyK4-X.js")
135
+ "./locales/cloud/en.ts": () => import("./en-DXCyK4-X.js"),
136
+ "./locales/cloud/pt-BR.ts": () => import("./pt-BR-Vq7D7c11.js")
135
137
  });
136
- function B(e) {
138
+ function L(e) {
137
139
  return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
138
140
  }
139
- var V = B(R), H = B(z);
140
- function U(e) {
141
- return e.split("-")[0].toLowerCase();
141
+ var R = L(F), z = L(I);
142
+ function B(e) {
143
+ return e.trim().replace(/_/g, "-").toLowerCase();
144
+ }
145
+ function V(e, t) {
146
+ let n = B(e);
147
+ return t.find((e) => B(e) === n);
148
+ }
149
+ function H(e) {
150
+ return B(e).split("-")[0];
151
+ }
152
+ function U(e, t) {
153
+ return V(e, t) ?? V(H(e), t);
142
154
  }
143
155
  function W(e, t) {
144
- let n = U(e);
145
- return t.includes(n) ? n : "en";
156
+ return U(e, t) ?? "en";
146
157
  }
147
158
  async function G(e) {
148
- let t = R[`./locales/${W(e, V)}.ts`];
159
+ let t = F[`./locales/${W(e, R)}.ts`];
149
160
  return (await t()).default;
150
161
  }
151
162
  async function K(e) {
152
- let t = z[`./locales/cloud/${W(e, H)}.ts`];
163
+ let t = I[`./locales/cloud/${W(e, z)}.ts`];
153
164
  return (await t()).default;
154
165
  }
166
+ function se(e) {
167
+ return U(e, R) !== void 0;
168
+ }
169
+ function ce(e) {
170
+ return U(e, z) !== void 0;
171
+ }
172
+ function le() {
173
+ return [...R];
174
+ }
175
+ function ue() {
176
+ return [...z];
177
+ }
155
178
  //#endregion
156
179
  //#region src/utils/toMjml.ts
157
180
  async function q(e) {
@@ -166,12 +189,12 @@ async function q(e) {
166
189
  //#endregion
167
190
  //#region src/index.ts
168
191
  var J = null, Y = i(null);
169
- async function ie(e) {
192
+ async function de(e) {
170
193
  let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
171
194
  if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
172
- let n = await G(e.locale ?? "en"), i = x(e.fonts);
173
- J && Q(), J = d({ setup() {
174
- return () => r(L, {
195
+ let n = await G(e.locale ?? "en"), i = w(e.fonts);
196
+ J && Q(), J = f({ setup() {
197
+ return () => r(P, {
175
198
  config: e,
176
199
  translations: n,
177
200
  fontsManager: i,
@@ -197,15 +220,15 @@ async function ie(e) {
197
220
  return a;
198
221
  }
199
222
  var X = null, Z = i(null);
200
- async function ae(e) {
223
+ async function fe(e) {
201
224
  let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
202
225
  if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
203
- let { default: n } = await import("./CloudEditor-_GaYluN7.js"), [i, a] = await Promise.all([G(e.locale ?? "en"), K(e.locale ?? "en")]), o = x(e.fonts);
226
+ let { default: n } = await import("./CloudEditor-DYYaScFe.js"), [i, a] = await Promise.all([G(e.locale ?? "en"), K(e.locale ?? "en")]), o = w(e.fonts);
204
227
  return X && $(), await new Promise((s, c) => {
205
228
  let l = setTimeout(() => {
206
229
  c(/* @__PURE__ */ Error("[Templatical] Cloud editor initialization timed out"));
207
- }, v);
208
- X = d({ setup() {
230
+ }, x);
231
+ X = f({ setup() {
209
232
  return () => r(n, {
210
233
  config: e,
211
234
  translations: i,
@@ -246,4 +269,4 @@ function $() {
246
269
  X && (X.unmount(), X = null, Z.value = null);
247
270
  }
248
271
  //#endregion
249
- export { ie as init, ae as initCloud, Q as unmount, x as useFonts };
272
+ export { H as getBaseLocale, ue as getSupportedCloudLocales, le as getSupportedLocales, de as init, fe as initCloud, ce as isCloudLocaleSupported, se as isLocaleSupported, Q as unmount, w as useFonts };
@@ -1564,7 +1564,7 @@ var Kn = ["innerHTML"], qn = /* @__PURE__ */ y({
1564
1564
  viewport: {}
1565
1565
  },
1566
1566
  setup(t) {
1567
- let n = t, r = se(() => import("./ParagraphEditor-C8IP9HOZ.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Gn(() => n.block.content);
1567
+ let n = t, r = se(() => import("./ParagraphEditor-DjDiUzmv.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Gn(() => n.block.content);
1568
1568
  return (n, u) => (e(), w("div", {
1569
1569
  ref_key: "blockRef",
1570
1570
  ref: a,
@@ -1756,41 +1756,51 @@ var Xn = ["data-block-id", "data-block-type"], Zn = ["aria-label"], Qn = [
1756
1756
  l(n.$slots, "default", {}, void 0, !0)
1757
1757
  ], 14, Xn));
1758
1758
  }
1759
- }), [["__scopeId", "data-v-850614e7"]]), lr = ["innerHTML"], ur = /* @__PURE__ */ y({
1759
+ }), [["__scopeId", "data-v-850614e7"]]);
1760
+ //#endregion
1761
+ //#region src/utils/unwrapParagraph.ts
1762
+ function lr(e) {
1763
+ let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
1764
+ return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
1765
+ }
1766
+ //#endregion
1767
+ //#region src/components/blocks/TitleBlock.vue
1768
+ var ur = /* @__PURE__ */ y({
1760
1769
  __name: "TitleBlock",
1761
1770
  props: {
1762
1771
  block: {},
1763
1772
  viewport: {}
1764
1773
  },
1765
1774
  setup(t) {
1766
- let n = t, r = se(() => import("./TitleEditor-21D8_OUQ.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Gn(() => n.block.content), u = x(() => {
1775
+ let n = t, r = se(() => import("./TitleEditor-BCV5k6wj.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = Gn(() => n.block.content), d = x(() => {
1767
1776
  let e = {
1768
1777
  fontSize: `${De[n.block.level]}px`,
1769
1778
  color: n.block.color,
1770
1779
  textAlign: n.block.textAlign
1771
1780
  };
1772
1781
  return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
1773
- });
1774
- return (n, d) => (e(), w("div", {
1782
+ }), f = x(() => `h${n.block.level}`), p = x(() => lr(c.value));
1783
+ return (n, c) => (e(), w("div", {
1775
1784
  ref_key: "blockRef",
1776
- ref: a,
1785
+ ref: o,
1777
1786
  class: "tpl:min-h-[1em] tpl:w-full",
1778
- style: A(u.value),
1779
- onDblclick: d[0] ||= (...e) => j(c) && j(c)(...e)
1780
- }, [j(i) ? (e(), ne(j(r), {
1787
+ style: A(d.value),
1788
+ onDblclick: c[0] ||= (...e) => j(l) && j(l)(...e)
1789
+ }, [j(a) ? (e(), ne(j(r), {
1781
1790
  key: 0,
1782
1791
  block: t.block,
1783
- "toolbar-position": j(o),
1784
- onDone: j(l)
1792
+ "toolbar-position": j(s),
1793
+ onDone: j(u)
1785
1794
  }, null, 8, [
1786
1795
  "block",
1787
1796
  "toolbar-position",
1788
1797
  "onDone"
1789
- ])) : (e(), w("div", {
1798
+ ])) : (e(), ne(i(f.value), {
1790
1799
  key: 1,
1791
- class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0",
1792
- innerHTML: j(s)
1793
- }, null, 8, lr))], 36));
1800
+ class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-tight tpl:outline-none [&_a]:tpl:underline [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0",
1801
+ style: { color: "inherit" },
1802
+ innerHTML: p.value
1803
+ }, null, 8, ["innerHTML"]))], 36));
1794
1804
  }
1795
1805
  }), dr = Object.defineProperty, fr = Object.getOwnPropertySymbols, pr = Object.prototype.hasOwnProperty, mr = Object.prototype.propertyIsEnumerable, hr = (e, t, n) => t in e ? dr(e, t, {
1796
1806
  enumerable: !0,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@templatical/editor",
3
3
  "description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
4
- "version": "0.6.5",
4
+ "version": "0.6.7",
5
5
  "bugs": "https://github.com/templatical/sdk/issues",
6
6
  "devDependencies": {
7
7
  "@lucide/vue": "^1.11.0",
@@ -33,9 +33,9 @@
33
33
  "vue": "^3.5.33",
34
34
  "vue-draggable-plus": "^0.6.0",
35
35
  "vue-tsc": "^3.2.7",
36
- "@templatical/core": "0.6.5",
37
- "@templatical/quality": "0.6.5",
38
- "@templatical/types": "0.6.5"
36
+ "@templatical/core": "0.6.7",
37
+ "@templatical/quality": "0.6.7",
38
+ "@templatical/types": "0.6.7"
39
39
  },
40
40
  "exports": {
41
41
  ".": {
@@ -63,9 +63,9 @@
63
63
  "license": "SEE LICENSE IN LICENSE",
64
64
  "module": "./dist/templatical-editor.js",
65
65
  "peerDependencies": {
66
- "@templatical/media-library": "0.6.5",
67
- "@templatical/quality": "0.6.5",
68
- "@templatical/renderer": "0.6.5"
66
+ "@templatical/media-library": "0.6.7",
67
+ "@templatical/quality": "0.6.7",
68
+ "@templatical/renderer": "0.6.7"
69
69
  },
70
70
  "peerDependenciesMeta": {
71
71
  "@templatical/renderer": {