@aswin.dev/editor 0.6.3 โ†’ 0.7.1

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 (85) hide show
  1. package/README.md +3 -3
  2. package/dist/AccessibilityPanel-COL6Wm7p.js +108 -0
  3. package/dist/AiChatSidebar-DWGPVtvC.js +229 -0
  4. package/dist/AiFeatureMenu-duUFSfDf.js +63 -0
  5. package/dist/BlockA11yBadge-Qs6HtXid.js +34 -0
  6. package/dist/CloudEditor-CFldoCOb.js +1207 -0
  7. package/dist/CollaboratorBar-Bw-lbt61.js +95 -0
  8. package/dist/CommentsSidebar-BaD5F53-.js +436 -0
  9. package/dist/CountdownBlock-DaYGxKqo.js +92 -0
  10. package/dist/CountdownToolbar-Dg4F8MTk.js +210 -0
  11. package/dist/DesignReferenceSidebar-BSH7uNP_.js +276 -0
  12. package/dist/LoadingTrack-Ba2pfF57.js +10 -0
  13. package/dist/ModuleBrowserModal-6phxZSKI.js +206 -0
  14. package/dist/ModulePreviewCanvas-BW8L3eQX.js +108 -0
  15. package/dist/NumberWithSuffix-BpUzQOJt.js +422 -0
  16. package/dist/ParagraphEditor-DNSzAB-I.js +695 -0
  17. package/dist/RichTextEditorContent-CrqPQdnk.js +137 -0
  18. package/dist/SaveModuleDialog-zMQTpez7.js +123 -0
  19. package/dist/SnapshotHistory-Do-A5rYU.js +122 -0
  20. package/dist/TemplateScoringPanel-CS7o62zS.js +256 -0
  21. package/dist/TestEmailModal-DGj_9V1u.js +94 -0
  22. package/dist/TitleEditor-C7IDnAoS.js +172 -0
  23. package/dist/TplModal-BAsVzcTb.js +44 -0
  24. package/dist/_plugin-vue_export-helper-BVAJ4lgT.js +8 -0
  25. package/dist/accessibility-BU09xZrQ.js +27 -0
  26. package/dist/blockTypeIcons-C6LDKvmd.js +140 -0
  27. package/dist/bundle-stats.json +10 -0
  28. package/dist/check-DJrpDKO_.js +7 -0
  29. package/dist/chevron-down-C5oBUhT8.js +7 -0
  30. package/dist/chevron-right-BqCptpdp.js +10 -0
  31. package/dist/circle-alert-ZQQc98HC.js +25 -0
  32. package/dist/clock-ik2pRJKG.js +12 -0
  33. package/dist/cloud-6ZmAvF0j.js +1791 -0
  34. package/dist/createLucideIcon-ClREiSx3.js +43 -0
  35. package/dist/de-DWcgp-7T.js +729 -0
  36. package/dist/de-GOtR9DwW.js +207 -0
  37. package/dist/dist-BUzw1buG.js +35 -0
  38. package/dist/dist-BZyY-SS4.js +74 -0
  39. package/dist/dist-BadNx4qo.js +5 -0
  40. package/dist/dist-BesOh2mk.js +35 -0
  41. package/dist/dist-Bz3M4RXG.js +2082 -0
  42. package/dist/dist-C04s_fLA.js +563 -0
  43. package/dist/dist-C3T2AKtB.js +776 -0
  44. package/dist/dist-C9ckKEZL.js +519 -0
  45. package/dist/dist-CBItRG-Z.js +47 -0
  46. package/dist/dist-COSzWQUs.js +5 -0
  47. package/dist/dist-CivF9P8b.js +382 -0
  48. package/dist/dist-DXa1uAMh.js +10658 -0
  49. package/dist/dist-DtiDUrX-.js +189 -0
  50. package/dist/dist-Dzt5foyL.js +61 -0
  51. package/dist/emojiData-DrBuvEoP.js +17 -0
  52. package/dist/en-Cxd4fhNm.js +729 -0
  53. package/dist/en-dFFQVzNn.js +207 -0
  54. package/dist/extensions-D__hOlV1.js +799 -0
  55. package/dist/formatRelativeTime-BhhO8yCl.js +12 -0
  56. package/dist/image-up-DT7gcJLN.js +23 -0
  57. package/dist/index.d.ts +352 -0
  58. package/dist/info-BSPGcsSM.js +19 -0
  59. package/dist/keys-CvX8D-8C.js +10 -0
  60. package/dist/liquid.browser-BvCyLQII.js +3277 -0
  61. package/dist/loader-circle-Balo8p3d.js +7 -0
  62. package/dist/message-circle-B39qAHxs.js +7 -0
  63. package/dist/pencil-BZJPNYWR.js +10 -0
  64. package/dist/readableTextColor-DVuzNX1y.js +30 -0
  65. package/dist/refresh-cw-DwDqGUM0.js +29 -0
  66. package/dist/rolldown-runtime-BZGGJVDF.js +20 -0
  67. package/dist/scan-line-CzfFJO1o.js +25 -0
  68. package/dist/send-D2eSo4GH.js +10 -0
  69. package/dist/shield-check-jkpgcC0-.js +10 -0
  70. package/dist/sparkles-Chm5CZfb.js +23 -0
  71. package/dist/style.css +2 -0
  72. package/dist/styleConstants-34eUKPOZ.js +55 -0
  73. package/dist/styles-B4tjX5SP.js +5224 -0
  74. package/dist/templatical-editor.js +312 -0
  75. package/dist/text-align-start-CzBnJsW8.js +43 -0
  76. package/dist/timeouts-BSGxjuUF.js +4 -0
  77. package/dist/trash-2-CtK2apEH.js +25 -0
  78. package/dist/triangle-alert-KpDVNbpn.js +17 -0
  79. package/dist/useCloudI18n-DOKSZql1.js +23 -0
  80. package/dist/useEditorCore-wslttMH-.js +9517 -0
  81. package/dist/useI18n-C2xQZ6K9.js +17 -0
  82. package/dist/useMergeTag-DX0XG5V9.js +34 -0
  83. package/dist/vue.runtime.esm-bundler-CjauPXjj.js +5775 -0
  84. package/dist/x-BkaOMosX.js +10 -0
  85. package/package.json +10 -10
@@ -0,0 +1,189 @@
1
+ import { Gt as e, c as t, i as n } from "./dist-DXa1uAMh.js";
2
+ //#region ../../node_modules/.pnpm/@tiptap+extension-text-style@3.22.5_@tiptap+core@3.22.5_@tiptap+pm@3.22.5_/node_modules/@tiptap/extension-text-style/dist/index.js
3
+ var r = 20, i = (e, t = 0) => {
4
+ let n = [];
5
+ return !e.children.length || t > r || Array.from(e.children).forEach((e) => {
6
+ e.tagName === "SPAN" ? n.push(e) : e.children.length && n.push(...i(e, t + 1));
7
+ }), n;
8
+ }, a = (e) => {
9
+ if (!e.children.length) return;
10
+ let t = i(e);
11
+ t && t.forEach((e) => {
12
+ let t = e.getAttribute("style"), n = (e.parentElement?.closest("span"))?.getAttribute("style");
13
+ e.setAttribute("style", `${n};${t}`);
14
+ });
15
+ }, o = t.create({
16
+ name: "textStyle",
17
+ priority: 101,
18
+ addOptions() {
19
+ return {
20
+ HTMLAttributes: {},
21
+ mergeNestedSpanStyles: !0
22
+ };
23
+ },
24
+ parseHTML() {
25
+ return [{
26
+ tag: "span",
27
+ consuming: !1,
28
+ getAttrs: (e) => e.hasAttribute("style") ? (this.options.mergeNestedSpanStyles && a(e), {}) : !1
29
+ }];
30
+ },
31
+ renderHTML({ HTMLAttributes: t }) {
32
+ return [
33
+ "span",
34
+ e(this.options.HTMLAttributes, t),
35
+ 0
36
+ ];
37
+ },
38
+ addCommands() {
39
+ return {
40
+ toggleTextStyle: (e) => ({ commands: t }) => t.toggleMark(this.name, e),
41
+ removeEmptyTextStyle: () => ({ tr: e }) => {
42
+ let { selection: t } = e;
43
+ return e.doc.nodesBetween(t.from, t.to, (t, n) => {
44
+ if (t.isTextblock) return !0;
45
+ t.marks.filter((e) => e.type === this.type).some((e) => Object.values(e.attrs).some((e) => !!e)) || e.removeMark(n, n + t.nodeSize, this.type);
46
+ }), !0;
47
+ }
48
+ };
49
+ }
50
+ }), s = n.create({
51
+ name: "backgroundColor",
52
+ addOptions() {
53
+ return { types: ["textStyle"] };
54
+ },
55
+ addGlobalAttributes() {
56
+ return [{
57
+ types: this.options.types,
58
+ attributes: { backgroundColor: {
59
+ default: null,
60
+ parseHTML: (e) => {
61
+ let t = e.getAttribute("style");
62
+ if (t) {
63
+ let e = t.split(";").map((e) => e.trim()).filter(Boolean);
64
+ for (let t = e.length - 1; t >= 0; --t) {
65
+ let n = e[t].split(":");
66
+ if (n.length >= 2) {
67
+ let e = n[0].trim().toLowerCase(), t = n.slice(1).join(":").trim();
68
+ if (e === "background-color") return t.replace(/['"]+/g, "");
69
+ }
70
+ }
71
+ }
72
+ return e.style.backgroundColor?.replace(/['"]+/g, "");
73
+ },
74
+ renderHTML: (e) => e.backgroundColor ? { style: `background-color: ${e.backgroundColor}` } : {}
75
+ } }
76
+ }];
77
+ },
78
+ addCommands() {
79
+ return {
80
+ setBackgroundColor: (e) => ({ chain: t }) => t().setMark("textStyle", { backgroundColor: e }).run(),
81
+ unsetBackgroundColor: () => ({ chain: e }) => e().setMark("textStyle", { backgroundColor: null }).removeEmptyTextStyle().run()
82
+ };
83
+ }
84
+ }), c = n.create({
85
+ name: "color",
86
+ addOptions() {
87
+ return { types: ["textStyle"] };
88
+ },
89
+ addGlobalAttributes() {
90
+ return [{
91
+ types: this.options.types,
92
+ attributes: { color: {
93
+ default: null,
94
+ parseHTML: (e) => {
95
+ let t = e.getAttribute("style");
96
+ if (t) {
97
+ let e = t.split(";").map((e) => e.trim()).filter(Boolean);
98
+ for (let t = e.length - 1; t >= 0; --t) {
99
+ let n = e[t].split(":");
100
+ if (n.length >= 2) {
101
+ let e = n[0].trim().toLowerCase(), t = n.slice(1).join(":").trim();
102
+ if (e === "color") return t.replace(/['"]+/g, "");
103
+ }
104
+ }
105
+ }
106
+ return e.style.color?.replace(/['"]+/g, "");
107
+ },
108
+ renderHTML: (e) => e.color ? { style: `color: ${e.color}` } : {}
109
+ } }
110
+ }];
111
+ },
112
+ addCommands() {
113
+ return {
114
+ setColor: (e) => ({ chain: t }) => t().setMark("textStyle", { color: e }).run(),
115
+ unsetColor: () => ({ chain: e }) => e().setMark("textStyle", { color: null }).removeEmptyTextStyle().run()
116
+ };
117
+ }
118
+ }), l = n.create({
119
+ name: "fontFamily",
120
+ addOptions() {
121
+ return { types: ["textStyle"] };
122
+ },
123
+ addGlobalAttributes() {
124
+ return [{
125
+ types: this.options.types,
126
+ attributes: { fontFamily: {
127
+ default: null,
128
+ parseHTML: (e) => e.style.fontFamily,
129
+ renderHTML: (e) => e.fontFamily ? { style: `font-family: ${e.fontFamily}` } : {}
130
+ } }
131
+ }];
132
+ },
133
+ addCommands() {
134
+ return {
135
+ setFontFamily: (e) => ({ chain: t }) => t().setMark("textStyle", { fontFamily: e }).run(),
136
+ unsetFontFamily: () => ({ chain: e }) => e().setMark("textStyle", { fontFamily: null }).removeEmptyTextStyle().run()
137
+ };
138
+ }
139
+ }), u = n.create({
140
+ name: "fontSize",
141
+ addOptions() {
142
+ return { types: ["textStyle"] };
143
+ },
144
+ addGlobalAttributes() {
145
+ return [{
146
+ types: this.options.types,
147
+ attributes: { fontSize: {
148
+ default: null,
149
+ parseHTML: (e) => e.style.fontSize,
150
+ renderHTML: (e) => e.fontSize ? { style: `font-size: ${e.fontSize}` } : {}
151
+ } }
152
+ }];
153
+ },
154
+ addCommands() {
155
+ return {
156
+ setFontSize: (e) => ({ chain: t }) => t().setMark("textStyle", { fontSize: e }).run(),
157
+ unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
158
+ };
159
+ }
160
+ }), d = n.create({
161
+ name: "lineHeight",
162
+ addOptions() {
163
+ return { types: ["textStyle"] };
164
+ },
165
+ addGlobalAttributes() {
166
+ return [{
167
+ types: this.options.types,
168
+ attributes: { lineHeight: {
169
+ default: null,
170
+ parseHTML: (e) => e.style.lineHeight,
171
+ renderHTML: (e) => e.lineHeight ? { style: `line-height: ${e.lineHeight}` } : {}
172
+ } }
173
+ }];
174
+ },
175
+ addCommands() {
176
+ return {
177
+ setLineHeight: (e) => ({ chain: t }) => t().setMark("textStyle", { lineHeight: e }).run(),
178
+ unsetLineHeight: () => ({ chain: e }) => e().setMark("textStyle", { lineHeight: null }).removeEmptyTextStyle().run()
179
+ };
180
+ }
181
+ }), f = n.create({
182
+ name: "textStyleKit",
183
+ addExtensions() {
184
+ let e = [];
185
+ return this.options.backgroundColor !== !1 && e.push(s.configure(this.options.backgroundColor)), this.options.color !== !1 && e.push(c.configure(this.options.color)), this.options.fontFamily !== !1 && e.push(l.configure(this.options.fontFamily)), this.options.fontSize !== !1 && e.push(u.configure(this.options.fontSize)), this.options.lineHeight !== !1 && e.push(d.configure(this.options.lineHeight)), this.options.textStyle !== !1 && e.push(o.configure(this.options.textStyle)), e;
186
+ }
187
+ });
188
+ //#endregion
189
+ export { s as BackgroundColor, c as Color, l as FontFamily, u as FontSize, d as LineHeight, o as TextStyle, f as TextStyleKit };
@@ -0,0 +1,61 @@
1
+ import { Gt as e, c as t } from "./dist-DXa1uAMh.js";
2
+ //#region ../../node_modules/.pnpm/@tiptap+extension-underline@3.22.5_@tiptap+core@3.22.5_@tiptap+pm@3.22.5_/node_modules/@tiptap/extension-underline/dist/index.js
3
+ var n = t.create({
4
+ name: "underline",
5
+ addOptions() {
6
+ return { HTMLAttributes: {} };
7
+ },
8
+ parseHTML() {
9
+ return [{ tag: "u" }, {
10
+ style: "text-decoration",
11
+ consuming: !1,
12
+ getAttrs: (e) => e.includes("underline") ? {} : !1
13
+ }];
14
+ },
15
+ renderHTML({ HTMLAttributes: t }) {
16
+ return [
17
+ "u",
18
+ e(this.options.HTMLAttributes, t),
19
+ 0
20
+ ];
21
+ },
22
+ parseMarkdown(e, t) {
23
+ return t.applyMark(this.name || "underline", t.parseInline(e.tokens || []));
24
+ },
25
+ renderMarkdown(e, t) {
26
+ return `++${t.renderChildren(e)}++`;
27
+ },
28
+ markdownTokenizer: {
29
+ name: "underline",
30
+ level: "inline",
31
+ start(e) {
32
+ return e.indexOf("++");
33
+ },
34
+ tokenize(e, t, n) {
35
+ let r = /^(\+\+)([\s\S]+?)(\+\+)/.exec(e);
36
+ if (!r) return;
37
+ let i = r[2].trim();
38
+ return {
39
+ type: "underline",
40
+ raw: r[0],
41
+ text: i,
42
+ tokens: n.inlineTokens(i)
43
+ };
44
+ }
45
+ },
46
+ addCommands() {
47
+ return {
48
+ setUnderline: () => ({ commands: e }) => e.setMark(this.name),
49
+ toggleUnderline: () => ({ commands: e }) => e.toggleMark(this.name),
50
+ unsetUnderline: () => ({ commands: e }) => e.unsetMark(this.name)
51
+ };
52
+ },
53
+ addKeyboardShortcuts() {
54
+ return {
55
+ "Mod-u": () => this.editor.commands.toggleUnderline(),
56
+ "Mod-U": () => this.editor.commands.toggleUnderline()
57
+ };
58
+ }
59
+ }), r = n;
60
+ //#endregion
61
+ export { n as Underline, r as default };
@@ -0,0 +1,17 @@
1
+ //#region src/composables/emojiData.ts
2
+ var e = [
3
+ {
4
+ key: "smileys",
5
+ emojis: /* @__PURE__ */ "๐Ÿ˜€.๐Ÿ˜ƒ.๐Ÿ˜„.๐Ÿ˜.๐Ÿ˜….๐Ÿ˜‚.๐Ÿคฃ.๐Ÿ˜Š.๐Ÿ˜‡.๐Ÿ™‚.๐Ÿ˜‰.๐Ÿ˜.๐Ÿฅฐ.๐Ÿ˜˜.๐Ÿ˜‹.๐Ÿ˜Ž.๐Ÿคฉ.๐Ÿฅณ.๐Ÿ˜.๐Ÿ˜ข.๐Ÿ˜ญ.๐Ÿ˜ค.๐Ÿ˜ก.๐Ÿคฏ.๐Ÿ˜ฑ.๐Ÿค”.๐Ÿคซ.๐Ÿค—.๐Ÿซก.๐Ÿ‘‹".split(".")
6
+ },
7
+ {
8
+ key: "gestures",
9
+ emojis: /* @__PURE__ */ "๐Ÿ‘.๐Ÿ‘Ž.๐Ÿ‘.๐Ÿ™Œ.๐Ÿค.โœŒ๏ธ.๐Ÿคž.๐Ÿซถ.โค๏ธ.๐Ÿงก.๐Ÿ’›.๐Ÿ’š.๐Ÿ’™.๐Ÿ’œ.๐Ÿ–ค.๐Ÿ’ฏ.โœจ.โญ.๐ŸŒŸ.๐Ÿ’ซ.๐Ÿ”ฅ.๐Ÿ’ฅ.๐Ÿ’ช.๐Ÿ‘€.๐Ÿ‘๏ธ.๐ŸŽ‰.๐ŸŽŠ.๐ŸŽ.๐Ÿ†.๐Ÿฅ‡".split(".")
10
+ },
11
+ {
12
+ key: "objects",
13
+ emojis: /* @__PURE__ */ "๐Ÿ“ง.โœ‰๏ธ.๐Ÿ“จ.๐Ÿ“ฉ.๐Ÿ“ฌ.๐Ÿ“ฑ.๐Ÿ’ป.๐Ÿ–ฅ๏ธ.๐Ÿ“Š.๐Ÿ“ˆ.๐Ÿ“‰.๐Ÿ“….๐Ÿ—“๏ธ.โฐ.โณ.๐Ÿ’ก.๐Ÿ””.๐Ÿ“ข.๐ŸŽฏ.โœ….โŒ.โš ๏ธ.๐Ÿ’ฒ.๐Ÿ’ต.๐Ÿ’ฐ.๐Ÿ›’.๐Ÿ›๏ธ.๐Ÿ“ฆ.๐Ÿš€.โœˆ๏ธ".split(".")
14
+ }
15
+ ];
16
+ //#endregion
17
+ export { e as emojiCategories };