@templatical/editor 0.0.1 → 0.0.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 (130) hide show
  1. package/dist/AiChatSidebar-busJk9hm.js +214 -0
  2. package/dist/AiFeatureMenu-DLGv_-pj.js +63 -0
  3. package/dist/CloudEditor-BDnHd6Um.js +919 -0
  4. package/dist/CollaboratorBar-Dv3l52vC.js +91 -0
  5. package/dist/CommentsSidebar-4tjp0VU5.js +439 -0
  6. package/dist/DesignReferenceSidebar-CmwXvltV.js +273 -0
  7. package/dist/LoadingTrack-vK8W2PJf.js +10 -0
  8. package/dist/ModuleBrowserModal-lrk3Fr0H.js +205 -0
  9. package/dist/ModulePreviewCanvas-BcBJLnwL.js +106 -0
  10. package/dist/ParagraphEditor-DH8cSC6m.js +625 -0
  11. package/dist/RichTextEditorContent-CQqodi7p.js +133 -0
  12. package/dist/SaveModuleDialog-Bmzi72td.js +122 -0
  13. package/dist/SnapshotHistory-AEgi9Xsn.js +126 -0
  14. package/dist/TemplateScoringPanel-CTgMtc0-.js +249 -0
  15. package/dist/TestEmailModal-Dpq1is9S.js +94 -0
  16. package/dist/TitleEditor-CLcDdcWI.js +167 -0
  17. package/dist/TplModal-CGzRjR96.js +44 -0
  18. package/dist/_plugin-vue_export-helper-B1-bu7yR.js +47 -0
  19. package/dist/blockTypeIcons-BpPTqcok.js +126 -0
  20. package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js +3 -0
  21. package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js.map +1 -0
  22. package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js +2 -0
  23. package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js.map +1 -0
  24. package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js +3 -0
  25. package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js.map +1 -0
  26. package/dist/cdn/chunks/dist-0UheN8rK.js +1 -0
  27. package/dist/cdn/chunks/dist-55mmbGQ9.js +1 -0
  28. package/dist/cdn/chunks/dist-B31mxKyP.js +1 -0
  29. package/dist/cdn/chunks/dist-B5JI9nIg.js +1 -0
  30. package/dist/cdn/chunks/dist-B93vLKhU.js +1 -0
  31. package/dist/cdn/chunks/dist-BDt3FJvj.js +1 -0
  32. package/dist/cdn/chunks/dist-BJRuFHmi.js +1 -0
  33. package/dist/cdn/chunks/dist-BKSzrf0L.js +1 -0
  34. package/dist/cdn/chunks/dist-BL8c5gYQ.js +1 -0
  35. package/dist/cdn/chunks/dist-CYThWMP5.js +1 -0
  36. package/dist/cdn/chunks/dist-DxZbPJYt.js +1 -0
  37. package/dist/cdn/chunks/draggable-ClUwYCFL.js +17 -0
  38. package/dist/cdn/chunks/draggable-ClUwYCFL.js.map +1 -0
  39. package/dist/cdn/chunks/emojiData-6fVLNqeH.js +2 -0
  40. package/dist/cdn/chunks/emojiData-6fVLNqeH.js.map +1 -0
  41. package/dist/cdn/chunks/extensions-ea_ewKUl.js +2 -0
  42. package/dist/cdn/chunks/extensions-ea_ewKUl.js.map +1 -0
  43. package/dist/cdn/chunks/icons-vmLJTaJk.js +2 -0
  44. package/dist/cdn/chunks/icons-vmLJTaJk.js.map +1 -0
  45. package/dist/cdn/chunks/rolldown-runtime-BakkzWXw.js +1 -0
  46. package/dist/cdn/chunks/styleConstants-CNejCb-L.js +2 -0
  47. package/dist/cdn/chunks/styleConstants-CNejCb-L.js.map +1 -0
  48. package/dist/cdn/chunks/tiptap-Cya4P9CN.js +145 -0
  49. package/dist/cdn/chunks/tiptap-Cya4P9CN.js.map +1 -0
  50. package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js +2 -0
  51. package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js.map +1 -0
  52. package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js +2 -0
  53. package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js.map +1 -0
  54. package/dist/cdn/editor.css +1 -0
  55. package/dist/cdn/editor.js +2 -0
  56. package/dist/cdn/editor.js.map +1 -0
  57. package/dist/check-B7kDuZmP.js +7 -0
  58. package/dist/chevron-down-DJLW2Q9Z.js +7 -0
  59. package/dist/circle-alert-E2vYPs5r.js +25 -0
  60. package/dist/clock-lWIIQA3C.js +12 -0
  61. package/dist/de-B4Ob4vCo.js +682 -0
  62. package/dist/dist-4LiM9FDd.js +35 -0
  63. package/dist/dist-Bu7veieH.js +776 -0
  64. package/dist/dist-C1BIRHCQ.js +61 -0
  65. package/dist/dist-CG-vEqSU.js +314 -0
  66. package/dist/dist-C_ymrGFi.js +10625 -0
  67. package/dist/dist-ChAGLpWo.js +35 -0
  68. package/dist/dist-D_HQYSY-.js +189 -0
  69. package/dist/dist-DkypH7qG.js +5 -0
  70. package/dist/dist-DmOE-Ubp.js +74 -0
  71. package/dist/dist-DmpMJbmZ.js +513 -0
  72. package/dist/dist-DrvKRSU6.js +47 -0
  73. package/dist/dist-Dxnd0GRf.js +5 -0
  74. package/dist/dist-DysAFIPy.js +2054 -0
  75. package/dist/emojiData-BfWQS72m.js +17 -0
  76. package/dist/en-YXsspZJG.js +682 -0
  77. package/dist/extensions-CKM99njP.js +420 -0
  78. package/dist/formatRelativeTime-DX3FgqN9.js +8 -0
  79. package/dist/i18n-CJsFtdbZ.js +23 -0
  80. package/dist/image-up-X4xIq4ea.js +23 -0
  81. package/dist/keys-Dwa2PmdD.js +10 -0
  82. package/dist/liquid.browser-BemTg3sZ.js +3272 -0
  83. package/dist/loader-circle-BTQQxC3l.js +7 -0
  84. package/dist/message-circle-Blgm6V_h.js +7 -0
  85. package/dist/refresh-cw-Bb4PEeW1.js +44 -0
  86. package/dist/scan-line-7lZPfOdm.js +25 -0
  87. package/dist/send-C0ltAQrv.js +10 -0
  88. package/dist/shield-check-f-qv4RKs.js +10 -0
  89. package/dist/sparkles-KhBCGlqB.js +23 -0
  90. package/dist/styleConstants-D4SOZGBV.js +94 -0
  91. package/dist/styles-DSw1VNU3.js +3406 -0
  92. package/dist/templatical-editor.css +2 -1
  93. package/dist/templatical-editor.js +242 -9
  94. package/dist/templatical-editor.umd.cjs +112 -524
  95. package/dist/timeouts-CmBrLeZA.js +4 -0
  96. package/dist/trash-2-OwjZ-guZ.js +25 -0
  97. package/dist/triangle-alert-DOSRIUYZ.js +17 -0
  98. package/dist/useEditorCore-Cc4RCwWq.js +5556 -0
  99. package/dist/useI18n-DUirdXEX.js +17 -0
  100. package/dist/useMergeTag-DVnlvPYJ.js +33 -0
  101. package/dist/x-CGlq2XQe.js +10 -0
  102. package/package.json +30 -20
  103. package/dist/AiChatSidebar-0vx9TP5B.js +0 -305
  104. package/dist/AiFeatureMenu-CI-v74ND.js +0 -69
  105. package/dist/CloudEditor-Wdfv_9xn.js +0 -1132
  106. package/dist/CollaboratorBar-B3uV4Wtw.js +0 -89
  107. package/dist/CommentsSidebar-PVUlloyB.js +0 -655
  108. package/dist/DesignReferenceSidebar-DAlAWrxU.js +0 -351
  109. package/dist/ModuleBrowserModal-1JEcChd8.js +0 -323
  110. package/dist/ModulePreviewCanvas-Cdp484Ae.js +0 -169
  111. package/dist/SaveModuleDialog-eNyr3XKn.js +0 -168
  112. package/dist/SnapshotHistory-D-ZiIj1v.js +0 -169
  113. package/dist/TemplateScoringPanel-DSZPo15C.js +0 -385
  114. package/dist/TestEmailModal-Cwre5elw.js +0 -128
  115. package/dist/TextEditor-BuUOIByX.js +0 -780
  116. package/dist/de-BWIAblxs.js +0 -685
  117. package/dist/en-cYyUzNV1.js +0 -685
  118. package/dist/index-0tWUczNu.js +0 -47
  119. package/dist/index-4okvXjqk.js +0 -41
  120. package/dist/index-BSc6h5zo.js +0 -967
  121. package/dist/index-CrvwWlhN.js +0 -41
  122. package/dist/index-D-iD-7lO.js +0 -10961
  123. package/dist/index-D-ygXbc8.js +0 -2452
  124. package/dist/index-DbrWKz-e.js +0 -1415
  125. package/dist/index-DeUeHy6g.js +0 -422
  126. package/dist/index-Ude6e9RU.js +0 -41
  127. package/dist/index-ZQzHBwkr.js +0 -12767
  128. package/dist/liquid.browser-CeNxS2GL.js +0 -3493
  129. package/dist/loader-circle-tM9j2mRh.js +0 -13
  130. package/dist/shield-check-Ngi9jAQc.js +0 -20
@@ -1,422 +0,0 @@
1
- import { defineComponent as N, computed as T, ref as m, openBlock as d, createBlock as V, unref as R, normalizeStyle as z, normalizeClass as H, withCtx as E, withDirectives as C, createElementBlock as y, vModelText as L, withModifiers as x, toDisplayString as M, createElementVNode as g, createCommentVNode as I, nextTick as B } from "vue";
2
- import { w as S } from "./index-D-iD-7lO.js";
3
- import { isLogicMergeTagValue as w, getLogicMergeTagKeyword as h, SYNTAX_PRESETS as A, getMergeTagLabel as k } from "@templatical/types";
4
- import { NodeViewWrapper as K, VueNodeViewRenderer as $ } from "./index-D-ygXbc8.js";
5
- import { N as D, v as F, I as P, m as W } from "./index-ZQzHBwkr.js";
6
- const j = ["data-tooltip"], q = /* @__PURE__ */ N({
7
- __name: "LogicMergeTagNodeView",
8
- props: {
9
- node: {},
10
- editor: {},
11
- getPos: { type: Function },
12
- deleteNode: { type: Function },
13
- updateAttributes: { type: Function }
14
- },
15
- setup(t) {
16
- const n = t, { syntax: e } = S(), s = T(
17
- () => w(n.node.attrs.value, e)
18
- ), r = T(
19
- () => h(n.node.attrs.value, e)
20
- ), o = m(!1), l = m(""), v = m(null);
21
- let f = !1;
22
- function b() {
23
- l.value = n.node.attrs.value, f = !1, o.value = !0, B(() => {
24
- var a, u;
25
- (a = v.value) == null || a.focus(), (u = v.value) == null || u.select();
26
- });
27
- }
28
- function i() {
29
- if (f)
30
- return;
31
- f = !0;
32
- const a = l.value.trim();
33
- if (!a) {
34
- o.value = !1;
35
- return;
36
- }
37
- a !== n.node.attrs.value && n.updateAttributes({
38
- value: a,
39
- keyword: w(a, e) ? h(a, e) : ""
40
- }), o.value = !1;
41
- }
42
- function p(a) {
43
- a.key === "Enter" ? (a.preventDefault(), i()) : a.key === "Escape" && (o.value = !1);
44
- }
45
- return (a, u) => (d(), V(R(K), {
46
- as: "span",
47
- class: H(
48
- s.value ? "tpl-logic-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase tpl:select-none" : ""
49
- ),
50
- style: z(
51
- s.value ? "background-color: transparent; border: 1.5px solid color-mix(in srgb, var(--tpl-primary) 50%, transparent); color: var(--tpl-primary);" : ""
52
- ),
53
- contenteditable: "false"
54
- }, {
55
- default: E(() => [
56
- o.value ? C((d(), y("input", {
57
- key: 0,
58
- ref_key: "inputRef",
59
- ref: v,
60
- "onUpdate:modelValue": u[0] || (u[0] = (c) => l.value = c),
61
- type: "text",
62
- class: "tpl:w-40 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:normal-case tpl:outline-none",
63
- style: { color: "var(--tpl-primary)" },
64
- onBlur: i,
65
- onKeydown: p
66
- }, null, 544)), [
67
- [L, l.value]
68
- ]) : s.value ? (d(), y("span", {
69
- key: 1,
70
- class: "tpl-tooltip tpl:cursor-pointer",
71
- "data-tooltip": t.node.attrs.value,
72
- onClick: x(b, ["stop"])
73
- }, M(r.value), 9, j)) : (d(), y("span", {
74
- key: 2,
75
- onClick: x(b, ["stop"])
76
- }, M(t.node.attrs.value), 1)),
77
- s.value ? (d(), y("button", {
78
- key: 3,
79
- type: "button",
80
- class: "tpl:flex tpl:size-4 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all hover:tpl:opacity-100",
81
- style: { color: "var(--tpl-primary)" },
82
- contenteditable: "false",
83
- onClick: u[1] || (u[1] = x(
84
- //@ts-ignore
85
- (...c) => t.deleteNode && t.deleteNode(...c),
86
- ["stop", "prevent"]
87
- )),
88
- onMouseenter: u[2] || (u[2] = (c) => c.target.style.color = "var(--tpl-danger)"),
89
- onMouseleave: u[3] || (u[3] = (c) => c.target.style.color = "var(--tpl-primary)")
90
- }, [...u[4] || (u[4] = [
91
- g("svg", {
92
- width: "10",
93
- height: "10",
94
- viewBox: "0 0 24 24",
95
- fill: "none",
96
- stroke: "currentColor",
97
- "stroke-width": "3"
98
- }, [
99
- g("line", {
100
- x1: "18",
101
- y1: "6",
102
- x2: "6",
103
- y2: "18"
104
- }),
105
- g("line", {
106
- x1: "6",
107
- y1: "6",
108
- x2: "18",
109
- y2: "18"
110
- })
111
- ], -1)
112
- ])], 32)) : I("", !0)
113
- ]),
114
- _: 1
115
- }, 8, ["class", "style"]));
116
- }
117
- }), Z = D.create({
118
- name: "logicMergeTagNode",
119
- group: "inline",
120
- inline: !0,
121
- atom: !0,
122
- addOptions() {
123
- return {
124
- syntax: A.liquid
125
- };
126
- },
127
- addAttributes() {
128
- return {
129
- value: {
130
- default: ""
131
- },
132
- keyword: {
133
- default: ""
134
- }
135
- };
136
- },
137
- parseHTML() {
138
- return [
139
- {
140
- tag: "span[data-logic-merge-tag]"
141
- }
142
- ];
143
- },
144
- renderHTML({ node: t, HTMLAttributes: n }) {
145
- if (!w(t.attrs.value, this.options.syntax))
146
- return ["span", {}, t.attrs.value];
147
- const e = h(
148
- t.attrs.value,
149
- this.options.syntax
150
- );
151
- return [
152
- "span",
153
- W(n, {
154
- "data-logic-merge-tag": t.attrs.value,
155
- "data-keyword": e
156
- }),
157
- e
158
- ];
159
- },
160
- addNodeView() {
161
- return $(q);
162
- },
163
- addKeyboardShortcuts() {
164
- const t = () => {
165
- const { selection: n } = this.editor.state, { $from: e, $to: s } = n;
166
- let r = !1;
167
- if (this.editor.state.doc.nodesBetween(e.pos, s.pos, (l) => {
168
- if (l.type.name === this.name)
169
- return r = !0, !1;
170
- }), r)
171
- return !0;
172
- if (e.pos > 0) {
173
- const l = e.nodeBefore;
174
- if ((l == null ? void 0 : l.type.name) === this.name)
175
- return !0;
176
- }
177
- const o = e.nodeAfter;
178
- return (o == null ? void 0 : o.type.name) === this.name;
179
- };
180
- return {
181
- Backspace: () => t(),
182
- Delete: () => t()
183
- };
184
- },
185
- addInputRules() {
186
- const t = new RegExp(this.options.syntax.logic.source + "$", "");
187
- return [
188
- new P({
189
- find: t,
190
- handler: ({ state: n, range: e, match: s }) => {
191
- const r = s[0];
192
- if (!w(r, this.options.syntax))
193
- return;
194
- const o = h(
195
- r,
196
- this.options.syntax
197
- ), l = this.type.create({
198
- value: r,
199
- keyword: o
200
- });
201
- n.tr.replaceWith(e.from, e.to, l);
202
- }
203
- })
204
- ];
205
- },
206
- addPasteRules() {
207
- const t = new RegExp(this.options.syntax.logic.source, "g");
208
- return [
209
- new F({
210
- find: t,
211
- handler: ({ state: n, range: e, match: s }) => {
212
- const r = s[0];
213
- if (!w(r, this.options.syntax))
214
- return;
215
- const o = h(
216
- r,
217
- this.options.syntax
218
- ), l = this.type.create({
219
- value: r,
220
- keyword: o
221
- });
222
- n.tr.replaceWith(e.from, e.to, l);
223
- }
224
- })
225
- ];
226
- }
227
- }), O = ["data-tooltip"], U = /* @__PURE__ */ N({
228
- __name: "MergeTagNodeView",
229
- props: {
230
- node: {},
231
- deleteNode: { type: Function },
232
- updateAttributes: { type: Function }
233
- },
234
- setup(t) {
235
- const n = t, { getMergeTagLabel: e } = S(), s = T(() => e(n.node.attrs.value)), r = m(!1), o = m(""), l = m(null);
236
- function v() {
237
- o.value = n.node.attrs.value, r.value = !0, B(() => {
238
- var i, p;
239
- (i = l.value) == null || i.focus(), (p = l.value) == null || p.select();
240
- });
241
- }
242
- function f() {
243
- const i = o.value.trim();
244
- i && i !== n.node.attrs.value && n.updateAttributes({
245
- value: i,
246
- label: e(i)
247
- }), r.value = !1;
248
- }
249
- function b(i) {
250
- i.key === "Enter" ? (i.preventDefault(), f()) : i.key === "Escape" && (r.value = !1);
251
- }
252
- return (i, p) => (d(), V(R(K), {
253
- as: "span",
254
- class: "tpl-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium tpl:select-none",
255
- style: { "background-color": "color-mix(in srgb, var(--tpl-primary) 20%, transparent)", color: "var(--tpl-primary)" },
256
- contenteditable: "false"
257
- }, {
258
- default: E(() => [
259
- r.value ? C((d(), y("input", {
260
- key: 0,
261
- ref_key: "inputRef",
262
- ref: l,
263
- "onUpdate:modelValue": p[0] || (p[0] = (a) => o.value = a),
264
- type: "text",
265
- class: "tpl:w-32 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:outline-none",
266
- style: { color: "var(--tpl-primary)" },
267
- onBlur: f,
268
- onKeydown: b
269
- }, null, 544)), [
270
- [L, o.value]
271
- ]) : (d(), y("span", {
272
- key: 1,
273
- class: "tpl-tooltip tpl:cursor-pointer",
274
- "data-tooltip": t.node.attrs.value,
275
- onClick: x(v, ["stop"])
276
- }, M(s.value), 9, O)),
277
- g("button", {
278
- type: "button",
279
- class: "tpl:flex tpl:size-4 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all hover:tpl:opacity-100",
280
- style: { color: "var(--tpl-primary)" },
281
- contenteditable: "false",
282
- onClick: p[1] || (p[1] = x(
283
- //@ts-ignore
284
- (...a) => t.deleteNode && t.deleteNode(...a),
285
- ["stop", "prevent"]
286
- )),
287
- onMouseenter: p[2] || (p[2] = (a) => a.target.style.color = "var(--tpl-danger)"),
288
- onMouseleave: p[3] || (p[3] = (a) => a.target.style.color = "var(--tpl-primary)")
289
- }, [...p[4] || (p[4] = [
290
- g("svg", {
291
- width: "10",
292
- height: "10",
293
- viewBox: "0 0 24 24",
294
- fill: "none",
295
- stroke: "currentColor",
296
- "stroke-width": "3"
297
- }, [
298
- g("line", {
299
- x1: "18",
300
- y1: "6",
301
- x2: "6",
302
- y2: "18"
303
- }),
304
- g("line", {
305
- x1: "6",
306
- y1: "6",
307
- x2: "18",
308
- y2: "18"
309
- })
310
- ], -1)
311
- ])], 32)
312
- ]),
313
- _: 1
314
- }));
315
- }
316
- }), _ = D.create({
317
- name: "mergeTagNode",
318
- group: "inline",
319
- inline: !0,
320
- atom: !0,
321
- addOptions() {
322
- return {
323
- mergeTags: [],
324
- syntax: A.liquid
325
- };
326
- },
327
- addAttributes() {
328
- return {
329
- label: {
330
- default: ""
331
- },
332
- value: {
333
- default: ""
334
- }
335
- };
336
- },
337
- parseHTML() {
338
- return [
339
- {
340
- tag: "span[data-merge-tag]"
341
- }
342
- ];
343
- },
344
- renderHTML({ node: t, HTMLAttributes: n }) {
345
- const e = k(t.attrs.value, this.options.mergeTags);
346
- return [
347
- "span",
348
- W(n, {
349
- "data-merge-tag": t.attrs.value,
350
- "data-label": e
351
- }),
352
- e
353
- ];
354
- },
355
- addNodeView() {
356
- return $(U);
357
- },
358
- addCommands() {
359
- return {
360
- insertMergeTag: (t) => ({ commands: n }) => n.insertContent({
361
- type: this.name,
362
- attrs: t
363
- })
364
- };
365
- },
366
- addKeyboardShortcuts() {
367
- const t = () => {
368
- const { selection: n } = this.editor.state, { $from: e, $to: s } = n;
369
- let r = !1;
370
- if (this.editor.state.doc.nodesBetween(e.pos, s.pos, (l) => {
371
- if (l.type.name === this.name)
372
- return r = !0, !1;
373
- }), r)
374
- return !0;
375
- if (e.pos > 0) {
376
- const l = e.nodeBefore;
377
- if ((l == null ? void 0 : l.type.name) === this.name)
378
- return !0;
379
- }
380
- const o = e.nodeAfter;
381
- return (o == null ? void 0 : o.type.name) === this.name;
382
- };
383
- return {
384
- Backspace: () => t(),
385
- Delete: () => t()
386
- };
387
- },
388
- addInputRules() {
389
- const t = new RegExp(this.options.syntax.value.source + "$", "");
390
- return [
391
- new P({
392
- find: t,
393
- handler: ({ state: n, range: e, match: s }) => {
394
- const r = s[0], o = k(r, this.options.mergeTags), l = this.type.create({
395
- label: o,
396
- value: r
397
- });
398
- n.tr.replaceWith(e.from, e.to, l);
399
- }
400
- })
401
- ];
402
- },
403
- addPasteRules() {
404
- const t = new RegExp(this.options.syntax.value.source, "g");
405
- return [
406
- new F({
407
- find: t,
408
- handler: ({ state: n, range: e, match: s }) => {
409
- const r = s[0], o = k(r, this.options.mergeTags), l = this.type.create({
410
- label: o,
411
- value: r
412
- });
413
- n.tr.replaceWith(e.from, e.to, l);
414
- }
415
- })
416
- ];
417
- }
418
- });
419
- export {
420
- Z as LogicMergeTagNode,
421
- _ as MergeTagNode
422
- };
@@ -1,41 +0,0 @@
1
- import { M as t, m as e } from "./index-ZQzHBwkr.js";
2
- const u = t.create({
3
- name: "superscript",
4
- addOptions() {
5
- return {
6
- HTMLAttributes: {}
7
- };
8
- },
9
- parseHTML() {
10
- return [
11
- {
12
- tag: "sup"
13
- },
14
- {
15
- style: "vertical-align",
16
- getAttrs(r) {
17
- return r !== "super" ? !1 : null;
18
- }
19
- }
20
- ];
21
- },
22
- renderHTML({ HTMLAttributes: r }) {
23
- return ["sup", e(this.options.HTMLAttributes, r), 0];
24
- },
25
- addCommands() {
26
- return {
27
- setSuperscript: () => ({ commands: r }) => r.setMark(this.name),
28
- toggleSuperscript: () => ({ commands: r }) => r.toggleMark(this.name),
29
- unsetSuperscript: () => ({ commands: r }) => r.unsetMark(this.name)
30
- };
31
- },
32
- addKeyboardShortcuts() {
33
- return {
34
- "Mod-.": () => this.editor.commands.toggleSuperscript()
35
- };
36
- }
37
- });
38
- export {
39
- u as Superscript,
40
- u as default
41
- };