@aswin.dev/editor 0.7.1 → 0.7.3

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 (116) hide show
  1. package/LICENSE +56 -0
  2. package/dist/{AiChatSidebar-DWGPVtvC.js → AiChatSidebar-Dt5pvG5t.js} +37 -51
  3. package/dist/{AiFeatureMenu-duUFSfDf.js → AiFeatureMenu-BipxcGap.js} +1 -1
  4. package/dist/{CloudEditor-CFldoCOb.js → CloudEditor-CnUX0IOW.js} +283 -239
  5. package/dist/{CollaboratorBar-Bw-lbt61.js → CollaboratorBar-NaaZTjbs.js} +2 -2
  6. package/dist/{CommentsSidebar-BaD5F53-.js → CommentsSidebar-DE6ZsM4D.js} +9 -10
  7. package/dist/CountdownBlock-Ba3T-i2X.js +1536 -0
  8. package/dist/{CountdownToolbar-Dg4F8MTk.js → CountdownToolbar-CbhSp_uq.js} +1 -1
  9. package/dist/{DesignReferenceSidebar-BSH7uNP_.js → DesignReferenceSidebar-CZg97bbj.js} +1 -1
  10. package/dist/{ModuleBrowserModal-6phxZSKI.js → ModuleBrowserModal-D2EVdexc.js} +4 -4
  11. package/dist/{ModulePreviewCanvas-BW8L3eQX.js → ModulePreviewCanvas-P3N-nxkU.js} +52 -47
  12. package/dist/{NumberWithSuffix-BpUzQOJt.js → NumberWithSuffix-CihczoAd.js} +1 -1
  13. package/dist/{ParagraphEditor-DNSzAB-I.js → ParagraphEditor-BbRuKhWv.js} +7 -7
  14. package/dist/{SaveModuleDialog-zMQTpez7.js → SaveModuleDialog-DLZa3m3O.js} +2 -2
  15. package/dist/{SnapshotHistory-Do-A5rYU.js → SnapshotHistory-Csg1_jXi.js} +3 -3
  16. package/dist/{TestEmailModal-DGj_9V1u.js → TestEmailModal-m3okLbJz.js} +2 -2
  17. package/dist/{TitleEditor-C7IDnAoS.js → TitleEditor-CtJIS5ER.js} +2 -2
  18. package/dist/{TplModal-BAsVzcTb.js → TplModal-CQCrKeKP.js} +1 -1
  19. package/dist/{blockTypeIcons-C6LDKvmd.js → blockTypeIcons-Dah0pgt-.js} +50 -19
  20. package/dist/bundle-stats.json +8 -8
  21. package/dist/cdn/chunks/AccessibilityPanel-Bt_fD7QT.js +97 -0
  22. package/dist/cdn/chunks/AccessibilityPanel-Bt_fD7QT.js.map +1 -0
  23. package/dist/cdn/chunks/AiFeatureMenu-Bn-0rgfr.js +59 -0
  24. package/dist/cdn/chunks/AiFeatureMenu-Bn-0rgfr.js.map +1 -0
  25. package/dist/cdn/chunks/BlockA11yBadge-Cj18Iw0p.js +33 -0
  26. package/dist/cdn/chunks/BlockA11yBadge-Cj18Iw0p.js.map +1 -0
  27. package/dist/cdn/chunks/CloudEditor-56lVcdot.js +1220 -0
  28. package/dist/cdn/chunks/CloudEditor-56lVcdot.js.map +1 -0
  29. package/dist/cdn/chunks/CollaboratorBar-B7DCV3xp.js +51 -0
  30. package/dist/cdn/chunks/CollaboratorBar-B7DCV3xp.js.map +1 -0
  31. package/dist/cdn/chunks/CountdownToolbar-BtaD3d3-.js +212 -0
  32. package/dist/cdn/chunks/CountdownToolbar-BtaD3d3-.js.map +1 -0
  33. package/dist/cdn/chunks/ModuleBrowserModal-CiIY7ZGv.js +195 -0
  34. package/dist/cdn/chunks/ModuleBrowserModal-CiIY7ZGv.js.map +1 -0
  35. package/dist/cdn/chunks/ModulePreviewCanvas-M7_OGV2m.js +113 -0
  36. package/dist/cdn/chunks/ModulePreviewCanvas-M7_OGV2m.js.map +1 -0
  37. package/dist/cdn/chunks/NumberWithSuffix-DfVBnsgc.js +423 -0
  38. package/dist/cdn/chunks/NumberWithSuffix-DfVBnsgc.js.map +1 -0
  39. package/dist/cdn/chunks/ParagraphEditor-1XJOpiLX.js +544 -0
  40. package/dist/cdn/chunks/ParagraphEditor-1XJOpiLX.js.map +1 -0
  41. package/dist/cdn/chunks/RichTextEditorContent-C2q8sbp2.js +106 -0
  42. package/dist/cdn/chunks/RichTextEditorContent-C2q8sbp2.js.map +1 -0
  43. package/dist/cdn/chunks/SaveModuleDialog-BNxh1jPT.js +119 -0
  44. package/dist/cdn/chunks/SaveModuleDialog-BNxh1jPT.js.map +1 -0
  45. package/dist/cdn/chunks/TitleEditor-IF7VzLTk.js +171 -0
  46. package/dist/cdn/chunks/TitleEditor-IF7VzLTk.js.map +1 -0
  47. package/dist/cdn/chunks/blockTypeIcons-tPBKQ8WC.js +24 -0
  48. package/dist/cdn/chunks/blockTypeIcons-tPBKQ8WC.js.map +1 -0
  49. package/dist/cdn/chunks/de-B05yW8Gi.js +840 -0
  50. package/dist/cdn/chunks/de-B05yW8Gi.js.map +1 -0
  51. package/dist/cdn/chunks/de-BPHtelu7.js +209 -0
  52. package/dist/cdn/chunks/de-BPHtelu7.js.map +1 -0
  53. package/dist/cdn/chunks/de-BRDqJwJe.js +89 -0
  54. package/dist/cdn/chunks/de-BRDqJwJe.js.map +1 -0
  55. package/dist/cdn/chunks/draggable-C-1_gch3.js +11572 -0
  56. package/dist/cdn/chunks/draggable-C-1_gch3.js.map +1 -0
  57. package/dist/cdn/chunks/emojiData-DUHzsh4j.js +19 -0
  58. package/dist/cdn/chunks/emojiData-DUHzsh4j.js.map +1 -0
  59. package/dist/cdn/chunks/en-BII7695P.js +840 -0
  60. package/dist/cdn/chunks/en-BII7695P.js.map +1 -0
  61. package/dist/cdn/chunks/en-Cdj_Ikl1.js +89 -0
  62. package/dist/cdn/chunks/en-Cdj_Ikl1.js.map +1 -0
  63. package/dist/cdn/chunks/en-DejwuJhw.js +209 -0
  64. package/dist/cdn/chunks/en-DejwuJhw.js.map +1 -0
  65. package/dist/cdn/chunks/extensions-B0eT-yjf.js +598 -0
  66. package/dist/cdn/chunks/extensions-B0eT-yjf.js.map +1 -0
  67. package/dist/cdn/chunks/features-BrvE2Fzv.js +9677 -0
  68. package/dist/cdn/chunks/features-BrvE2Fzv.js.map +1 -0
  69. package/dist/cdn/chunks/icons-C7wtAD8p.js +1043 -0
  70. package/dist/cdn/chunks/icons-C7wtAD8p.js.map +1 -0
  71. package/dist/cdn/chunks/liquid.browser-CllF-us3.js +3279 -0
  72. package/dist/cdn/chunks/liquid.browser-CllF-us3.js.map +1 -0
  73. package/dist/cdn/chunks/media-library-Cl5XuaKy.js +6030 -0
  74. package/dist/cdn/chunks/media-library-Cl5XuaKy.js.map +1 -0
  75. package/dist/cdn/chunks/pusher-i7-OBujc.js +2508 -0
  76. package/dist/cdn/chunks/pusher-i7-OBujc.js.map +1 -0
  77. package/dist/cdn/chunks/quality-Va91a3N8.js +1456 -0
  78. package/dist/cdn/chunks/quality-Va91a3N8.js.map +1 -0
  79. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +32 -0
  80. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -0
  81. package/dist/cdn/chunks/renderer-si0Zgxeb.js +642 -0
  82. package/dist/cdn/chunks/renderer-si0Zgxeb.js.map +1 -0
  83. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +20 -0
  84. package/dist/cdn/chunks/src-BLyYIbdZ.js +497 -0
  85. package/dist/cdn/chunks/src-BLyYIbdZ.js.map +1 -0
  86. package/dist/cdn/chunks/styleConstants-DfcU8u_r.js +57 -0
  87. package/dist/cdn/chunks/styleConstants-DfcU8u_r.js.map +1 -0
  88. package/dist/cdn/chunks/styles-C6BQLT9F.js +5807 -0
  89. package/dist/cdn/chunks/styles-C6BQLT9F.js.map +1 -0
  90. package/dist/cdn/chunks/tiptap-D8whBv5F.js +14654 -0
  91. package/dist/cdn/chunks/tiptap-D8whBv5F.js.map +1 -0
  92. package/dist/cdn/editor.css +2 -0
  93. package/dist/cdn/editor.js +367 -0
  94. package/dist/cdn/editor.js.map +1 -0
  95. package/dist/{cloud-6ZmAvF0j.js → cloud-BoS0J0vs.js} +1 -1
  96. package/dist/{de-DWcgp-7T.js → de-C74F9xK3.js} +112 -3
  97. package/dist/dist-C2grMquk.js +1261 -0
  98. package/dist/{dist-CivF9P8b.js → dist-Djgi0A6k.js} +92 -77
  99. package/dist/{en-Cxd4fhNm.js → en-B24jVTeO.js} +112 -3
  100. package/dist/{extensions-D__hOlV1.js → extensions-DsmjHqBF.js} +14 -14
  101. package/dist/index.d.ts +21 -10
  102. package/dist/{pencil-BZJPNYWR.js → pencil-Bpimrzzw.js} +5 -2
  103. package/dist/style.css +1 -1
  104. package/dist/styles-BMFMtR9R.js +6341 -0
  105. package/dist/templatical-editor.js +197 -139
  106. package/dist/undo-2-m1EUDbUg.js +16 -0
  107. package/dist/{useEditorCore-wslttMH-.js → useEditorCore-CtNAo0uy.js} +2154 -2025
  108. package/dist/useMergeTag-2vTcVpNo.js +34 -0
  109. package/package.json +12 -12
  110. package/dist/CountdownBlock-DaYGxKqo.js +0 -92
  111. package/dist/check-DJrpDKO_.js +0 -7
  112. package/dist/dist-C04s_fLA.js +0 -563
  113. package/dist/styles-B4tjX5SP.js +0 -5224
  114. package/dist/useMergeTag-DX0XG5V9.js +0 -34
  115. /package/dist/{clock-ik2pRJKG.js → clock-Ba4p3rJM.js} +0 -0
  116. /package/dist/{readableTextColor-DVuzNX1y.js → readableTextColor-C_9OpzBw.js} +0 -0
@@ -0,0 +1,34 @@
1
+ import { D as e, et as t } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { A as n, P as r, i } from "./dist-C2grMquk.js";
3
+ import { C as a, b as o, h as s, x as c, y as l } from "./keys-CvX8D-8C.js";
4
+ //#region src/composables/useMergeTag.ts
5
+ function u() {
6
+ let u = e(s, "email") === "popup", d = u ? [] : e(l, []), f = e(c, i.liquid), p = u ? null : e(a, null), m = u ? !1 : e(o, !0), h = t(!1);
7
+ function g(e) {
8
+ return r(e, f);
9
+ }
10
+ function _(e) {
11
+ return n(e, d);
12
+ }
13
+ async function v() {
14
+ if (!p) return null;
15
+ h.value = !0;
16
+ try {
17
+ return await p();
18
+ } finally {
19
+ h.value = !1;
20
+ }
21
+ }
22
+ return {
23
+ mergeTags: d,
24
+ isRequesting: h,
25
+ canRequestMergeTag: !!p,
26
+ autocomplete: m,
27
+ syntax: f,
28
+ isMergeTagValue: g,
29
+ getMergeTagLabel: _,
30
+ requestMergeTag: v
31
+ };
32
+ }
33
+ //#endregion
34
+ export { u as t };
package/package.json CHANGED
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "name": "@aswin.dev/editor",
3
3
  "description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
4
- "version": "0.7.1",
4
+ "version": "0.7.3",
5
5
  "bugs": "https://github.com/templatical/sdk/issues",
6
6
  "devDependencies": {
7
7
  "@lucide/vue": "^1.11.0",
8
- "@aswin.dev/core": "workspace:*",
9
- "@aswin.dev/quality": "workspace:*",
10
- "@aswin.dev/types": "workspace:*",
11
8
  "@tiptap/core": "^3.22.4",
12
9
  "@tiptap/extension-color": "^3.22.4",
13
10
  "@tiptap/extension-font-family": "^3.22.4",
@@ -35,7 +32,10 @@
35
32
  "vitest": "^4.1.5",
36
33
  "vue": "^3.5.33",
37
34
  "vue-tsc": "^3.2.7",
38
- "vuedraggable": "^4.1.0"
35
+ "vuedraggable": "^4.1.0",
36
+ "@aswin.dev/quality": "0.7.3",
37
+ "@aswin.dev/types": "0.7.3",
38
+ "@aswin.dev/core": "0.7.3"
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
- "@aswin.dev/media-library": "workspace:*",
67
- "@aswin.dev/quality": "workspace:*",
68
- "@aswin.dev/renderer": "workspace:*"
66
+ "@aswin.dev/media-library": "0.7.3",
67
+ "@aswin.dev/quality": "0.7.3",
68
+ "@aswin.dev/renderer": "0.7.3"
69
69
  },
70
70
  "peerDependenciesMeta": {
71
71
  "@aswin.dev/renderer": {
@@ -86,6 +86,8 @@
86
86
  "url": "git+https://github.com/templatical/sdk.git",
87
87
  "directory": "packages/editor"
88
88
  },
89
+ "type": "module",
90
+ "types": "./dist/index.d.ts",
89
91
  "scripts": {
90
92
  "build": "vite build",
91
93
  "build:all": "vite build && vite build --config vite.cdn.config.ts",
@@ -93,7 +95,5 @@
93
95
  "test": "vitest run",
94
96
  "typecheck": "vue-tsc --noEmit",
95
97
  "verify:pack": "node scripts/verify-pack.mjs"
96
- },
97
- "type": "module",
98
- "types": "./dist/index.d.ts"
99
- }
98
+ }
99
+ }
@@ -1,92 +0,0 @@
1
- import { r as e } from "./rolldown-runtime-BZGGJVDF.js";
2
- import { C as t, F as n, Ft as r, N as i, _ as a, et as o, f as s, h as c, jt as l, m as u, st as d, v as f } from "./vue.runtime.esm-bundler-CjauPXjj.js";
3
- import { c as p } from "./dist-CivF9P8b.js";
4
- import { t as m } from "./useI18n-C2xQZ6K9.js";
5
- //#region src/components/blocks/CountdownBlock.vue?vue&type=script&setup=true&lang.ts
6
- var h = {
7
- key: 0,
8
- class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
9
- }, g = {
10
- key: 1,
11
- class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-4 tpl:text-xs tpl:text-[var(--tpl-text-dim)] tpl:opacity-50"
12
- }, _ = { class: "tpl:text-center" }, v = /* @__PURE__ */ t({
13
- __name: "CountdownBlock",
14
- props: {
15
- block: {},
16
- viewport: {}
17
- },
18
- setup(e) {
19
- let t = e, { t: v } = m(), y = o(Date.now());
20
- p(() => {
21
- y.value = Date.now();
22
- }, 1e3);
23
- let b = u(() => {
24
- if (!t.block.targetDate) return null;
25
- let e = new Date(t.block.targetDate);
26
- return isNaN(e.getTime()) ? null : e.getTime();
27
- }), x = u(() => b.value ? y.value >= b.value : !1), S = u(() => {
28
- if (!b.value || x.value) return {
29
- days: 0,
30
- hours: 0,
31
- minutes: 0,
32
- seconds: 0
33
- };
34
- let e = b.value - y.value, t = Math.floor(e / 1e3);
35
- return {
36
- days: Math.floor(t / 86400),
37
- hours: Math.floor(t % 86400 / 3600),
38
- minutes: Math.floor(t % 3600 / 60),
39
- seconds: t % 60
40
- };
41
- }), C = u(() => {
42
- let e = [];
43
- return t.block.showDays && e.push({
44
- value: String(S.value.days).padStart(2, "0"),
45
- label: t.block.labelDays
46
- }), t.block.showHours && e.push({
47
- value: String(S.value.hours).padStart(2, "0"),
48
- label: t.block.labelHours
49
- }), t.block.showMinutes && e.push({
50
- value: String(S.value.minutes).padStart(2, "0"),
51
- label: t.block.labelMinutes
52
- }), t.block.showSeconds && e.push({
53
- value: String(S.value.seconds).padStart(2, "0"),
54
- label: t.block.labelSeconds
55
- }), e;
56
- }), w = u(() => ({
57
- backgroundColor: t.block.backgroundColor,
58
- fontFamily: t.block.fontFamily || "inherit"
59
- })), T = u(() => ({
60
- fontSize: `${t.block.digitFontSize}px`,
61
- fontWeight: "bold",
62
- color: t.block.digitColor,
63
- lineHeight: "1.2"
64
- })), E = u(() => ({
65
- fontSize: `${t.block.labelFontSize}px`,
66
- color: t.block.labelColor,
67
- marginTop: "4px"
68
- })), D = u(() => ({
69
- fontSize: `${t.block.digitFontSize}px`,
70
- color: t.block.digitColor,
71
- fontFamily: t.block.fontFamily || "inherit"
72
- }));
73
- return (t, o) => e.block.targetDate ? x.value && e.block.hideOnExpiry ? (i(), f("div", g, r(d(v).countdown.hidden), 1)) : x.value ? (i(), f("div", {
74
- key: 2,
75
- style: l(w.value),
76
- class: "tpl:py-4 tpl:text-center"
77
- }, [c("span", { style: l({
78
- fontSize: `${e.block.digitFontSize}px`,
79
- color: e.block.digitColor
80
- }) }, r(e.block.expiredMessage), 5)], 4)) : (i(), f("div", {
81
- key: 3,
82
- style: l(w.value),
83
- class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:py-4"
84
- }, [(i(!0), f(s, null, n(C.value, (t, n) => (i(), f(s, { key: t.label }, [n > 0 ? (i(), f("span", {
85
- key: 0,
86
- style: l(D.value),
87
- class: "tpl:self-start"
88
- }, r(e.block.separator), 5)) : a("", !0), c("div", _, [c("div", { style: l(T.value) }, r(t.value), 5), c("div", { style: l(E.value) }, r(t.label), 5)])], 64))), 128))], 4)) : (i(), f("div", h, r(d(v).countdown.setDate), 1));
89
- }
90
- }), y = /* @__PURE__ */ e({ default: () => b }), b = v;
91
- //#endregion
92
- export { y as n, b as t };
@@ -1,7 +0,0 @@
1
- import { t as e } from "./createLucideIcon-ClREiSx3.js";
2
- var t = e("check", [["path", {
3
- d: "M20 6 9 17l-5-5",
4
- key: "1gmf2c"
5
- }]]);
6
- //#endregion
7
- export { t };