@aswin.dev/editor 0.6.3 → 0.7.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 (158) hide show
  1. package/dist/AccessibilityPanel-CvQGLdu6.js +108 -0
  2. package/dist/AiChatSidebar-B3SJIKG_.js +229 -0
  3. package/dist/AiFeatureMenu-BLLKoOos.js +63 -0
  4. package/dist/BlockA11yBadge-CXDLqkcJ.js +34 -0
  5. package/dist/CloudEditor-BCz1ZTYC.js +1172 -0
  6. package/dist/CollaboratorBar-DuPYW5iF.js +95 -0
  7. package/dist/CommentsSidebar-B1pvJdqF.js +441 -0
  8. package/dist/CountdownBlock-BNSj1jvJ.js +92 -0
  9. package/dist/CountdownToolbar-ClJr2GzL.js +210 -0
  10. package/dist/DesignReferenceSidebar-B8V_F2yF.js +276 -0
  11. package/dist/LoadingTrack-B0CWFHXQ.js +10 -0
  12. package/dist/ModuleBrowserModal-DrUFMTDx.js +206 -0
  13. package/dist/ModulePreviewCanvas-CHdOwV_4.js +106 -0
  14. package/dist/NumberWithSuffix-DkXUez9t.js +422 -0
  15. package/dist/ParagraphEditor-D75wl3BX.js +695 -0
  16. package/dist/RichTextEditorContent-DYkIauIk.js +137 -0
  17. package/dist/SaveModuleDialog-FZ9lxY7_.js +123 -0
  18. package/dist/SnapshotHistory-BR3eV120.js +127 -0
  19. package/dist/TemplateScoringPanel-4GTNHej5.js +256 -0
  20. package/dist/TestEmailModal--ue5w9fT.js +94 -0
  21. package/dist/TitleEditor-fStSADI-.js +172 -0
  22. package/dist/TplModal-BwSfxIHf.js +44 -0
  23. package/dist/_plugin-vue_export-helper-B0hnzhyu.js +8 -0
  24. package/dist/accessibility-e8JYu_zd.js +27 -0
  25. package/dist/blockTypeIcons-BcTrDjmH.js +126 -0
  26. package/dist/bundle-stats.json +10 -0
  27. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +97 -0
  28. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +1 -0
  29. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +59 -0
  30. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +1 -0
  31. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +33 -0
  32. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +1 -0
  33. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +1143 -0
  34. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +1 -0
  35. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +51 -0
  36. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +1 -0
  37. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +93 -0
  38. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +1 -0
  39. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +212 -0
  40. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +1 -0
  41. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +195 -0
  42. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +1 -0
  43. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +107 -0
  44. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +1 -0
  45. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +423 -0
  46. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +1 -0
  47. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +544 -0
  48. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +1 -0
  49. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +106 -0
  50. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +1 -0
  51. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +119 -0
  52. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +1 -0
  53. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +171 -0
  54. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +1 -0
  55. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +22 -0
  56. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +1 -0
  57. package/dist/cdn/chunks/de-Ce-LbJ2J.js +89 -0
  58. package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +1 -0
  59. package/dist/cdn/chunks/de-D8CnZxV9.js +523 -0
  60. package/dist/cdn/chunks/de-D8CnZxV9.js.map +1 -0
  61. package/dist/cdn/chunks/de-RQrZR56a.js +209 -0
  62. package/dist/cdn/chunks/de-RQrZR56a.js.map +1 -0
  63. package/dist/cdn/chunks/draggable-Bcb86AsV.js +11572 -0
  64. package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +1 -0
  65. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +19 -0
  66. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +1 -0
  67. package/dist/cdn/chunks/en-8FHaQv4V.js +523 -0
  68. package/dist/cdn/chunks/en-8FHaQv4V.js.map +1 -0
  69. package/dist/cdn/chunks/en-Bl1ecfRF.js +209 -0
  70. package/dist/cdn/chunks/en-Bl1ecfRF.js.map +1 -0
  71. package/dist/cdn/chunks/en-DiCWK5fG.js +89 -0
  72. package/dist/cdn/chunks/en-DiCWK5fG.js.map +1 -0
  73. package/dist/cdn/chunks/extensions-DIxF31tA.js +598 -0
  74. package/dist/cdn/chunks/extensions-DIxF31tA.js.map +1 -0
  75. package/dist/cdn/chunks/features-DEMb13KS.js +6814 -0
  76. package/dist/cdn/chunks/features-DEMb13KS.js.map +1 -0
  77. package/dist/cdn/chunks/icons-CsLTcirh.js +700 -0
  78. package/dist/cdn/chunks/icons-CsLTcirh.js.map +1 -0
  79. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +3279 -0
  80. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +1 -0
  81. package/dist/cdn/chunks/media-library-CVaNvhpM.js +6014 -0
  82. package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +1 -0
  83. package/dist/cdn/chunks/pusher-CDbNlZBE.js +2508 -0
  84. package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +1 -0
  85. package/dist/cdn/chunks/quality-BaBfc54_.js +1456 -0
  86. package/dist/cdn/chunks/quality-BaBfc54_.js.map +1 -0
  87. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +32 -0
  88. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -0
  89. package/dist/cdn/chunks/renderer-CUxvx7ro.js +548 -0
  90. package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +1 -0
  91. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +20 -0
  92. package/dist/cdn/chunks/src-CRaqN-p8.js +497 -0
  93. package/dist/cdn/chunks/src-CRaqN-p8.js.map +1 -0
  94. package/dist/cdn/chunks/styleConstants-DP1VOca8.js +57 -0
  95. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +1 -0
  96. package/dist/cdn/chunks/styles-BHJULjNR.js +2947 -0
  97. package/dist/cdn/chunks/styles-BHJULjNR.js.map +1 -0
  98. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +14654 -0
  99. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +1 -0
  100. package/dist/cdn/editor.css +2 -0
  101. package/dist/cdn/editor.js +250 -0
  102. package/dist/cdn/editor.js.map +1 -0
  103. package/dist/check-Da05j8yl.js +7 -0
  104. package/dist/chevron-down-R2uY34iD.js +7 -0
  105. package/dist/circle-alert-DZuGWPX-.js +25 -0
  106. package/dist/clock-CRp2sIub.js +12 -0
  107. package/dist/cloud-DEk_b4CR.js +1733 -0
  108. package/dist/createLucideIcon-C3pa2siy.js +43 -0
  109. package/dist/de-Brqvgr43.js +521 -0
  110. package/dist/de-DCaaCE5s.js +207 -0
  111. package/dist/dist-B1IR0bpH.js +326 -0
  112. package/dist/dist-BFawx6IS.js +519 -0
  113. package/dist/dist-BaQIYPsn.js +35 -0
  114. package/dist/dist-Cp0zXPAD.js +189 -0
  115. package/dist/dist-D6uC2xhi.js +5 -0
  116. package/dist/dist-D90y8dvT.js +2082 -0
  117. package/dist/dist-DDJIWTRY.js +776 -0
  118. package/dist/dist-DJmnUmW9.js +362 -0
  119. package/dist/dist-DjviJBCi.js +74 -0
  120. package/dist/dist-KoBJjK1G.js +61 -0
  121. package/dist/dist-aRzjfSRN.js +35 -0
  122. package/dist/dist-iLBdeBDR.js +10658 -0
  123. package/dist/dist-us-RpCWN.js +47 -0
  124. package/dist/dist-wzMIGj-D.js +5 -0
  125. package/dist/emojiData-PQyVa4bU.js +17 -0
  126. package/dist/en-DXCyK4-X.js +207 -0
  127. package/dist/en-WDVp87TE.js +521 -0
  128. package/dist/extensions-CUcl9Ok4.js +799 -0
  129. package/dist/formatRelativeTime-BOEf47hq.js +12 -0
  130. package/dist/image-up-MBZKKg9p.js +23 -0
  131. package/dist/index.d.ts +275 -0
  132. package/dist/info-CJEC7piy.js +19 -0
  133. package/dist/keys-ciNfSSGj.js +10 -0
  134. package/dist/liquid.browser-CdMv1BTn.js +3277 -0
  135. package/dist/loader-circle-DsY5Yg33.js +7 -0
  136. package/dist/message-circle-yElBbR2C.js +7 -0
  137. package/dist/readableTextColor-CY3SiRnt.js +30 -0
  138. package/dist/refresh-cw-CE_AGtn8.js +29 -0
  139. package/dist/rolldown-runtime-BZGGJVDF.js +20 -0
  140. package/dist/scan-line-D0vcUekt.js +25 -0
  141. package/dist/send-DH4oDQqC.js +10 -0
  142. package/dist/shield-check-CfJgs2Hd.js +10 -0
  143. package/dist/sparkles-CvRXGqFs.js +23 -0
  144. package/dist/style.css +2 -0
  145. package/dist/styleConstants-fWzlIIwN.js +55 -0
  146. package/dist/styles-DEXEkBvg.js +3176 -0
  147. package/dist/templatical-editor.js +249 -0
  148. package/dist/text-align-start-BT9VUDxK.js +43 -0
  149. package/dist/timeouts-BSGxjuUF.js +4 -0
  150. package/dist/trash-2-DbP2Y6t2.js +25 -0
  151. package/dist/triangle-alert-aOXceTSe.js +17 -0
  152. package/dist/useCloudI18n-BuIwR6OE.js +23 -0
  153. package/dist/useEditorCore-C6ost42Q.js +9342 -0
  154. package/dist/useI18n-lb2DHDiu.js +17 -0
  155. package/dist/useMergeTag-CBwKnnNB.js +34 -0
  156. package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +5775 -0
  157. package/dist/x-u2oVmjN_.js +10 -0
  158. package/package.json +1 -1
@@ -0,0 +1,189 @@
1
+ import { Gt as e, c as t, i as n } from "./dist-iLBdeBDR.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,5 @@
1
+ import { Color as e } from "./dist-Cp0zXPAD.js";
2
+ //#region ../../node_modules/.pnpm/@tiptap+extension-color@3.22.5_@tiptap+extension-text-style@3.22.5_@tiptap+core@3.22.5_@tiptap+pm@3.22.5__/node_modules/@tiptap/extension-color/dist/index.js
3
+ var t = e;
4
+ //#endregion
5
+ export { e as Color, t as default };