@milkdown/preset-commonmark 7.2.2 → 7.2.4

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 (45) hide show
  1. package/lib/composed/plugins.d.ts.map +1 -1
  2. package/lib/index.es.js +675 -648
  3. package/lib/index.es.js.map +1 -1
  4. package/lib/mark/emphasis.d.ts.map +1 -1
  5. package/lib/mark/link.d.ts.map +1 -1
  6. package/lib/mark/strong.d.ts.map +1 -1
  7. package/lib/node/blockquote.d.ts.map +1 -1
  8. package/lib/node/bullet-list.d.ts.map +1 -1
  9. package/lib/node/code-block.d.ts.map +1 -1
  10. package/lib/node/list-item.d.ts.map +1 -1
  11. package/lib/node/ordered-list.d.ts.map +1 -1
  12. package/lib/node/paragraph.d.ts.map +1 -1
  13. package/lib/plugin/index.d.ts +1 -0
  14. package/lib/plugin/index.d.ts.map +1 -1
  15. package/lib/plugin/inline-sync-plugin/inline-sync-plugin.d.ts.map +1 -1
  16. package/lib/plugin/inline-sync-plugin/regexp.d.ts +1 -0
  17. package/lib/plugin/inline-sync-plugin/regexp.d.ts.map +1 -1
  18. package/lib/plugin/inline-sync-plugin/replacer.d.ts.map +1 -1
  19. package/lib/plugin/remark-marker-plugin.d.ts +2 -0
  20. package/lib/plugin/remark-marker-plugin.d.ts.map +1 -0
  21. package/package.json +7 -7
  22. package/src/composed/plugins.ts +2 -1
  23. package/src/mark/emphasis.ts +14 -6
  24. package/src/mark/inline-code.ts +4 -4
  25. package/src/mark/link.ts +5 -5
  26. package/src/mark/strong.ts +14 -6
  27. package/src/node/blockquote.ts +2 -2
  28. package/src/node/bullet-list.ts +2 -2
  29. package/src/node/code-block.ts +2 -2
  30. package/src/node/hardbreak.ts +2 -2
  31. package/src/node/heading.ts +10 -10
  32. package/src/node/hr.ts +5 -5
  33. package/src/node/image.ts +6 -6
  34. package/src/node/list-item.ts +8 -7
  35. package/src/node/ordered-list.ts +3 -3
  36. package/src/node/paragraph.ts +1 -1
  37. package/src/plugin/hardbreak-clear-mark-plugin.ts +4 -4
  38. package/src/plugin/index.ts +1 -0
  39. package/src/plugin/inline-sync-plugin/inline-sync-plugin.ts +0 -2
  40. package/src/plugin/inline-sync-plugin/regexp.ts +3 -1
  41. package/src/plugin/inline-sync-plugin/replacer.ts +11 -0
  42. package/src/plugin/inline-sync-plugin/utils.ts +4 -4
  43. package/src/plugin/remark-marker-plugin.ts +20 -0
  44. package/src/plugin/sync-heading-id-plugin.ts +1 -1
  45. package/src/plugin/sync-list-order-plugin.ts +4 -4
package/lib/index.es.js CHANGED
@@ -1,155 +1,167 @@
1
- import { $markAttr as W, $markSchema as F, $command as g, $useKeymap as f, $node as ze, $nodeAttr as N, $nodeSchema as I, $ctx as J, $inputRule as L, pipe as Lt, $prose as H, $remark as G } from "@milkdown/utils";
2
- import { commandsCtx as h, editorViewCtx as Y, serializerCtx as St, parserCtx as wt } from "@milkdown/core";
3
- import { toggleMark as Q, setBlockType as R, wrapIn as X } from "@milkdown/prose/commands";
4
- import { Fragment as At } from "@milkdown/prose/model";
5
- import { expectDomTypeError as S } from "@milkdown/exception";
6
- import { textblockTypeInputRule as Ue, wrappingInputRule as Z, InputRule as Ye } from "@milkdown/prose/inputrules";
7
- import vt from "@sindresorhus/slugify";
8
- import { TextSelection as ee, Selection as Je, PluginKey as B, Plugin as T } from "@milkdown/prose/state";
9
- import { findSelectedNodeOfType as Ht } from "@milkdown/prose";
10
- import { sinkListItem as Bt, liftListItem as Qe, splitListItem as Tt } from "@milkdown/prose/schema-list";
11
- import { ReplaceStep as Ot, AddMarkStep as Kt } from "@milkdown/prose/transform";
12
- import { Decoration as Ve, DecorationSet as je } from "@milkdown/prose/view";
13
- import { visit as Xe } from "unist-util-visit";
14
- import Dt from "remark-inline-links";
15
- const Ze = (t, e) => {
1
+ import { $markAttr as V, $markSchema as j, $command as h, $useKeymap as N, $node as Ye, $nodeAttr as I, $nodeSchema as C, $ctx as Z, $inputRule as w, pipe as At, $prose as O, $remark as $ } from "@milkdown/utils";
2
+ import { remarkStringifyOptionsCtx as Je, commandsCtx as y, editorViewCtx as X, serializerCtx as vt, parserCtx as Ht } from "@milkdown/core";
3
+ import { toggleMark as ee, setBlockType as _, wrapIn as te } from "@milkdown/prose/commands";
4
+ import { Fragment as Bt } from "@milkdown/prose/model";
5
+ import { expectDomTypeError as A } from "@milkdown/exception";
6
+ import { textblockTypeInputRule as Qe, wrappingInputRule as re, InputRule as Xe } from "@milkdown/prose/inputrules";
7
+ import Ot from "@sindresorhus/slugify";
8
+ import { TextSelection as G, Selection as Ze, PluginKey as T, Plugin as K } from "@milkdown/prose/state";
9
+ import { findSelectedNodeOfType as Tt } from "@milkdown/prose";
10
+ import { sinkListItem as Kt, liftListItem as et, splitListItem as Dt } from "@milkdown/prose/schema-list";
11
+ import { ReplaceStep as Rt, AddMarkStep as Pt } from "@milkdown/prose/transform";
12
+ import { Decoration as ze, DecorationSet as Ue } from "@milkdown/prose/view";
13
+ import { visit as ae } from "unist-util-visit";
14
+ import Et from "remark-inline-links";
15
+ const tt = (t, e) => {
16
16
  var o;
17
17
  if (!(e.childCount >= 1 && ((o = e.lastChild) == null ? void 0 : o.type.name) === "hardbreak")) {
18
18
  t.next(e.content);
19
19
  return;
20
20
  }
21
21
  const a = [];
22
- e.content.forEach((s, i, l) => {
23
- l !== e.childCount - 1 && a.push(s);
24
- }), t.next(At.fromArray(a));
22
+ e.content.forEach((s, l, i) => {
23
+ i !== e.childCount - 1 && a.push(s);
24
+ }), t.next(Bt.fromArray(a));
25
25
  }, n = (t, e) => (Object.assign(t, {
26
26
  meta: {
27
27
  package: "@milkdown/preset-commonmark",
28
28
  ...e
29
29
  }
30
- }), t), te = W("emphasis");
31
- n(te, {
30
+ }), t), ne = V("emphasis");
31
+ n(ne, {
32
32
  displayName: "Attr<emphasis>",
33
33
  group: "Emphasis"
34
34
  });
35
- const V = F("emphasis", (t) => ({
36
- inclusive: !1,
35
+ const z = j("emphasis", (t) => ({
36
+ attrs: {
37
+ marker: {
38
+ default: t.get(Je).emphasis || "*"
39
+ }
40
+ },
37
41
  parseDOM: [
38
42
  { tag: "i" },
39
43
  { tag: "em" },
40
44
  { style: "font-style", getAttrs: (e) => e === "italic" }
41
45
  ],
42
- toDOM: (e) => ["em", t.get(te.key)(e)],
46
+ toDOM: (e) => ["em", t.get(ne.key)(e)],
43
47
  parseMarkdown: {
44
48
  match: (e) => e.type === "emphasis",
45
49
  runner: (e, r, a) => {
46
- e.openMark(a), e.next(r.children), e.closeMark(a);
50
+ e.openMark(a, { marker: r.marker }), e.next(r.children), e.closeMark(a);
47
51
  }
48
52
  },
49
53
  toMarkdown: {
50
54
  match: (e) => e.type.name === "emphasis",
51
55
  runner: (e, r) => {
52
- e.withMark(r, "emphasis");
56
+ e.withMark(r, "emphasis", void 0, {
57
+ marker: r.attrs.marker
58
+ });
53
59
  }
54
60
  }
55
61
  }));
56
- n(V.mark, {
62
+ n(z.mark, {
57
63
  displayName: "MarkSchema<emphasis>",
58
64
  group: "Emphasis"
59
65
  });
60
- n(V.ctx, {
66
+ n(z.ctx, {
61
67
  displayName: "MarkSchemaCtx<emphasis>",
62
68
  group: "Emphasis"
63
69
  });
64
- const re = g("ToggleEmphasis", () => () => Q(V.type()));
65
- n(re, {
70
+ const oe = h("ToggleEmphasis", (t) => () => ee(z.type(t)));
71
+ n(oe, {
66
72
  displayName: "Command<toggleEmphasisCommand>",
67
73
  group: "Emphasis"
68
74
  });
69
- const ae = f("emphasisKeymap", {
75
+ const se = N("emphasisKeymap", {
70
76
  ToggleEmphasis: {
71
77
  shortcuts: "Mod-i",
72
78
  command: (t) => {
73
- const e = t.get(h);
74
- return () => e.call(re.key);
79
+ const e = t.get(y);
80
+ return () => e.call(oe.key);
75
81
  }
76
82
  }
77
83
  });
78
- n(ae.ctx, {
84
+ n(se.ctx, {
79
85
  displayName: "KeymapCtx<emphasis>",
80
86
  group: "Emphasis"
81
87
  });
82
- n(ae.shortcuts, {
88
+ n(se.shortcuts, {
83
89
  displayName: "Keymap<emphasis>",
84
90
  group: "Emphasis"
85
91
  });
86
- const ne = W("strong");
87
- n(ne, {
92
+ const le = V("strong");
93
+ n(le, {
88
94
  displayName: "Attr<strong>",
89
95
  group: "Strong"
90
96
  });
91
- const j = F("strong", (t) => ({
92
- inclusive: !1,
97
+ const U = j("strong", (t) => ({
98
+ attrs: {
99
+ marker: {
100
+ default: t.get(Je).strong || "*"
101
+ }
102
+ },
93
103
  parseDOM: [
94
104
  { tag: "b" },
95
105
  { tag: "strong" },
96
106
  { style: "font-style", getAttrs: (e) => e === "bold" }
97
107
  ],
98
- toDOM: (e) => ["strong", t.get(ne.key)(e)],
108
+ toDOM: (e) => ["strong", t.get(le.key)(e)],
99
109
  parseMarkdown: {
100
110
  match: (e) => e.type === "strong",
101
111
  runner: (e, r, a) => {
102
- e.openMark(a), e.next(r.children), e.closeMark(a);
112
+ e.openMark(a, { marker: r.marker }), e.next(r.children), e.closeMark(a);
103
113
  }
104
114
  },
105
115
  toMarkdown: {
106
116
  match: (e) => e.type.name === "strong",
107
117
  runner: (e, r) => {
108
- e.withMark(r, "strong");
118
+ e.withMark(r, "strong", void 0, {
119
+ marker: r.attrs.marker
120
+ });
109
121
  }
110
122
  }
111
123
  }));
112
- n(j.mark, {
124
+ n(U.mark, {
113
125
  displayName: "MarkSchema<strong>",
114
126
  group: "Strong"
115
127
  });
116
- n(j.ctx, {
128
+ n(U.ctx, {
117
129
  displayName: "MarkSchemaCtx<strong>",
118
130
  group: "Strong"
119
131
  });
120
- const oe = g("ToggleStrong", () => () => Q(j.type()));
121
- n(oe, {
132
+ const ie = h("ToggleStrong", (t) => () => ee(U.type(t)));
133
+ n(ie, {
122
134
  displayName: "Command<toggleStrongCommand>",
123
135
  group: "Strong"
124
136
  });
125
- const se = f("strongKeymap", {
137
+ const ce = N("strongKeymap", {
126
138
  ToggleBold: {
127
139
  shortcuts: ["Mod-b"],
128
140
  command: (t) => {
129
- const e = t.get(h);
130
- return () => e.call(oe.key);
141
+ const e = t.get(y);
142
+ return () => e.call(ie.key);
131
143
  }
132
144
  }
133
145
  });
134
- n(se.ctx, {
146
+ n(ce.ctx, {
135
147
  displayName: "KeymapCtx<strong>",
136
148
  group: "Strong"
137
149
  });
138
- n(se.shortcuts, {
150
+ n(ce.shortcuts, {
139
151
  displayName: "Keymap<strong>",
140
152
  group: "Strong"
141
153
  });
142
- const le = W("inlineCode");
143
- n(le, {
154
+ const de = V("inlineCode");
155
+ n(de, {
144
156
  displayName: "Attr<inlineCode>",
145
157
  group: "InlineCode"
146
158
  });
147
- const b = F("inlineCode", (t) => ({
159
+ const x = j("inlineCode", (t) => ({
148
160
  priority: 100,
149
161
  code: !0,
150
162
  inclusive: !1,
151
163
  parseDOM: [{ tag: "code" }],
152
- toDOM: (e) => ["code", t.get(le.key)(e)],
164
+ toDOM: (e) => ["code", t.get(de.key)(e)],
153
165
  parseMarkdown: {
154
166
  match: (e) => e.type === "inlineCode",
155
167
  runner: (e, r, a) => {
@@ -163,50 +175,50 @@ const b = F("inlineCode", (t) => ({
163
175
  }
164
176
  }
165
177
  }));
166
- n(b.mark, {
178
+ n(x.mark, {
167
179
  displayName: "MarkSchema<inlineCode>",
168
180
  group: "InlineCode"
169
181
  });
170
- n(b.ctx, {
182
+ n(x.ctx, {
171
183
  displayName: "MarkSchemaCtx<inlineCode>",
172
184
  group: "InlineCode"
173
185
  });
174
- const ie = g("ToggleInlineCode", () => () => (t, e) => {
175
- const { selection: r, tr: a } = t;
176
- if (r.empty)
186
+ const me = h("ToggleInlineCode", (t) => () => (e, r) => {
187
+ const { selection: a, tr: o } = e;
188
+ if (a.empty)
177
189
  return !1;
178
- const { from: o, to: s } = r;
179
- return t.doc.rangeHasMark(o, s, b.type()) ? (e == null || e(a.removeMark(o, s, b.type())), !0) : (Object.keys(t.schema.marks).filter((c) => c !== b.type.name).map((c) => t.schema.marks[c]).forEach((c) => {
180
- a.removeMark(o, s, c);
181
- }), e == null || e(a.addMark(o, s, b.type().create())), !0);
190
+ const { from: s, to: l } = a;
191
+ return e.doc.rangeHasMark(s, l, x.type(t)) ? (r == null || r(o.removeMark(s, l, x.type(t))), !0) : (Object.keys(e.schema.marks).filter((d) => d !== x.type.name).map((d) => e.schema.marks[d]).forEach((d) => {
192
+ o.removeMark(s, l, d);
193
+ }), r == null || r(o.addMark(s, l, x.type(t).create())), !0);
182
194
  });
183
- n(ie, {
195
+ n(me, {
184
196
  displayName: "Command<toggleInlineCodeCommand>",
185
197
  group: "InlineCode"
186
198
  });
187
- const ce = f("inlineCodeKeymap", {
199
+ const ue = N("inlineCodeKeymap", {
188
200
  ToggleInlineCode: {
189
201
  shortcuts: "Mod-e",
190
202
  command: (t) => {
191
- const e = t.get(h);
192
- return () => e.call(ie.key);
203
+ const e = t.get(y);
204
+ return () => e.call(me.key);
193
205
  }
194
206
  }
195
207
  });
196
- n(ce.ctx, {
208
+ n(ue.ctx, {
197
209
  displayName: "KeymapCtx<inlineCode>",
198
210
  group: "InlineCode"
199
211
  });
200
- n(ce.shortcuts, {
212
+ n(ue.shortcuts, {
201
213
  displayName: "Keymap<inlineCode>",
202
214
  group: "InlineCode"
203
215
  });
204
- const de = W("link");
205
- n(de, {
216
+ const pe = V("link");
217
+ n(pe, {
206
218
  displayName: "Attr<link>",
207
219
  group: "Link"
208
220
  });
209
- const v = F("link", (t) => ({
221
+ const B = j("link", (t) => ({
210
222
  attrs: {
211
223
  href: {},
212
224
  title: { default: null }
@@ -216,12 +228,12 @@ const v = F("link", (t) => ({
216
228
  tag: "a[href]",
217
229
  getAttrs: (e) => {
218
230
  if (!(e instanceof HTMLElement))
219
- throw S(e);
231
+ throw A(e);
220
232
  return { href: e.getAttribute("href"), title: e.getAttribute("title") };
221
233
  }
222
234
  }
223
235
  ],
224
- toDOM: (e) => ["a", { ...t.get(de.key)(e), ...e.attrs }],
236
+ toDOM: (e) => ["a", { ...t.get(pe.key)(e), ...e.attrs }],
225
237
  parseMarkdown: {
226
238
  match: (e) => e.type === "link",
227
239
  runner: (e, r, a) => {
@@ -239,38 +251,38 @@ const v = F("link", (t) => ({
239
251
  }
240
252
  }
241
253
  }));
242
- n(v.mark, {
254
+ n(B.mark, {
243
255
  displayName: "MarkSchema<link>",
244
256
  group: "Link"
245
257
  });
246
- const et = g("ToggleLink", () => (t = {}) => Q(v.type(), t));
247
- n(et, {
258
+ const rt = h("ToggleLink", (t) => (e = {}) => ee(B.type(t), e));
259
+ n(rt, {
248
260
  displayName: "Command<toggleLinkCommand>",
249
261
  group: "Link"
250
262
  });
251
- const tt = g("UpdateLink", () => (t = {}) => (e, r) => {
252
- if (!r)
263
+ const at = h("UpdateLink", (t) => (e = {}) => (r, a) => {
264
+ if (!a)
253
265
  return !1;
254
- let a, o = -1;
255
- const { selection: s } = e, { from: i, to: l } = s;
256
- if (e.doc.nodesBetween(i, i === l ? l + 1 : l, (p, k) => {
257
- if (v.type().isInSet(p.marks))
258
- return a = p, o = k, !1;
259
- }), !a)
266
+ let o, s = -1;
267
+ const { selection: l } = r, { from: i, to: c } = l;
268
+ if (r.doc.nodesBetween(i, i === c ? c + 1 : c, (g, f) => {
269
+ if (B.type(t).isInSet(g.marks))
270
+ return o = g, s = f, !1;
271
+ }), !o)
260
272
  return !1;
261
- const c = a.marks.find(({ type: p }) => p === v.type());
262
- if (!c)
273
+ const d = o.marks.find(({ type: g }) => g === B.type(t));
274
+ if (!d)
263
275
  return !1;
264
- const d = o, m = o + a.nodeSize, { tr: u } = e, y = v.type().create({ ...c.attrs, ...t });
265
- return y ? (r(
266
- u.removeMark(d, m, c).addMark(d, m, y).setSelection(new ee(u.selection.$anchor)).scrollIntoView()
276
+ const m = s, p = s + o.nodeSize, { tr: u } = r, k = B.type(t).create({ ...d.attrs, ...e });
277
+ return k ? (a(
278
+ u.removeMark(m, p, d).addMark(m, p, k).setSelection(new G(u.selection.$anchor)).scrollIntoView()
267
279
  ), !0) : !1;
268
280
  });
269
- n(tt, {
281
+ n(at, {
270
282
  displayName: "Command<updateLinkCommand>",
271
283
  group: "Link"
272
284
  });
273
- const rt = ze("doc", () => ({
285
+ const nt = Ye("doc", () => ({
274
286
  content: "block+",
275
287
  parseMarkdown: {
276
288
  match: ({ type: t }) => t === "root",
@@ -285,20 +297,20 @@ const rt = ze("doc", () => ({
285
297
  }
286
298
  }
287
299
  }));
288
- n(rt, {
300
+ n(nt, {
289
301
  displayName: "NodeSchema<doc>",
290
302
  group: "Doc"
291
303
  });
292
- const me = N("paragraph");
293
- n(me, {
304
+ const ge = I("paragraph");
305
+ n(ge, {
294
306
  displayName: "Attr<paragraph>",
295
307
  group: "Paragraph"
296
308
  });
297
- const w = I("paragraph", (t) => ({
309
+ const v = C("paragraph", (t) => ({
298
310
  content: "inline*",
299
311
  group: "block",
300
312
  parseDOM: [{ tag: "p" }],
301
- toDOM: (e) => ["p", t.get(me.key)(e), 0],
313
+ toDOM: (e) => ["p", t.get(ge.key)(e), 0],
302
314
  parseMarkdown: {
303
315
  match: (e) => e.type === "paragraph",
304
316
  runner: (e, r, a) => {
@@ -308,52 +320,52 @@ const w = I("paragraph", (t) => ({
308
320
  toMarkdown: {
309
321
  match: (e) => e.type.name === "paragraph",
310
322
  runner: (e, r) => {
311
- e.openNode("paragraph"), Ze(e, r), e.closeNode();
323
+ e.openNode("paragraph"), tt(e, r), e.closeNode();
312
324
  }
313
325
  }
314
326
  }));
315
- n(w.node, {
327
+ n(v.node, {
316
328
  displayName: "NodeSchema<paragraph>",
317
329
  group: "Paragraph"
318
330
  });
319
- n(w.ctx, {
331
+ n(v.ctx, {
320
332
  displayName: "NodeSchemaCtx<paragraph>",
321
333
  group: "Paragraph"
322
334
  });
323
- const ue = g("TurnIntoText", () => () => R(w.type()));
324
- n(ue, {
335
+ const he = h("TurnIntoText", (t) => () => _(v.type(t)));
336
+ n(he, {
325
337
  displayName: "Command<turnIntoTextCommand>",
326
338
  group: "Paragraph"
327
339
  });
328
- const pe = f("paragraphKeymap", {
340
+ const ye = N("paragraphKeymap", {
329
341
  TurnIntoText: {
330
342
  shortcuts: "Mod-Alt-0",
331
343
  command: (t) => {
332
- const e = t.get(h);
333
- return () => e.call(ue.key);
344
+ const e = t.get(y);
345
+ return () => e.call(he.key);
334
346
  }
335
347
  }
336
348
  });
337
- n(pe.ctx, {
349
+ n(ye.ctx, {
338
350
  displayName: "KeymapCtx<paragraph>",
339
351
  group: "Paragraph"
340
352
  });
341
- n(pe.shortcuts, {
353
+ n(ye.shortcuts, {
342
354
  displayName: "Keymap<paragraph>",
343
355
  group: "Paragraph"
344
356
  });
345
- const Pt = Array(6).fill(0).map((t, e) => e + 1), Rt = (t) => vt(t.textContent), z = J(Rt, "headingIdGenerator");
346
- n(z, {
357
+ const _t = Array(6).fill(0).map((t, e) => e + 1), $t = (t) => Ot(t.textContent), Y = Z($t, "headingIdGenerator");
358
+ n(Y, {
347
359
  displayName: "Ctx<HeadingIdGenerator>",
348
360
  group: "Heading"
349
361
  });
350
- const ge = N("heading");
351
- n(ge, {
362
+ const ke = I("heading");
363
+ n(ke, {
352
364
  displayName: "Attr<heading>",
353
365
  group: "Heading"
354
366
  });
355
- const A = I("heading", (t) => {
356
- const e = t.get(z.key);
367
+ const H = C("heading", (t) => {
368
+ const e = t.get(Y.key);
357
369
  return {
358
370
  content: "inline*",
359
371
  group: "block",
@@ -366,18 +378,18 @@ const A = I("heading", (t) => {
366
378
  default: 1
367
379
  }
368
380
  },
369
- parseDOM: Pt.map((r) => ({
381
+ parseDOM: _t.map((r) => ({
370
382
  tag: `h${r}`,
371
383
  getAttrs: (a) => {
372
384
  if (!(a instanceof HTMLElement))
373
- throw S(a);
385
+ throw A(a);
374
386
  return { level: r, id: a.id };
375
387
  }
376
388
  })),
377
389
  toDOM: (r) => [
378
390
  `h${r.attrs.level}`,
379
391
  {
380
- ...t.get(ge.key)(r),
392
+ ...t.get(ke.key)(r),
381
393
  id: r.attrs.id || e(r)
382
394
  },
383
395
  0
@@ -392,123 +404,123 @@ const A = I("heading", (t) => {
392
404
  toMarkdown: {
393
405
  match: (r) => r.type.name === "heading",
394
406
  runner: (r, a) => {
395
- r.openNode("heading", void 0, { depth: a.attrs.level }), Ze(r, a), r.closeNode();
407
+ r.openNode("heading", void 0, { depth: a.attrs.level }), tt(r, a), r.closeNode();
396
408
  }
397
409
  }
398
410
  };
399
411
  });
400
- n(A.node, {
412
+ n(H.node, {
401
413
  displayName: "NodeSchema<heading>",
402
414
  group: "Heading"
403
415
  });
404
- n(A.ctx, {
416
+ n(H.ctx, {
405
417
  displayName: "NodeSchemaCtx<heading>",
406
418
  group: "Heading"
407
419
  });
408
- const at = L((t) => Ue(/^(?<hashes>#+)\s$/, A.type(), (e) => {
409
- var i, l;
410
- const r = ((l = (i = e.groups) == null ? void 0 : i.hashes) == null ? void 0 : l.length) || 0, a = t.get(Y), { $from: o } = a.state.selection, s = o.node();
420
+ const ot = w((t) => Qe(/^(?<hashes>#+)\s$/, H.type(t), (e) => {
421
+ var l, i;
422
+ const r = ((i = (l = e.groups) == null ? void 0 : l.hashes) == null ? void 0 : i.length) || 0, a = t.get(X), { $from: o } = a.state.selection, s = o.node();
411
423
  if (s.type.name === "heading") {
412
424
  let c = Number(s.attrs.level) + Number(r);
413
425
  return c > 6 && (c = 6), { level: c };
414
426
  }
415
427
  return { level: r };
416
428
  }));
417
- n(at, {
429
+ n(ot, {
418
430
  displayName: "InputRule<wrapInHeadingInputRule>",
419
431
  group: "Heading"
420
432
  });
421
- const M = g("WrapInHeading", () => (t) => (t ?? (t = 1), t < 1 ? R(w.type()) : R(A.type(), { level: t })));
422
- n(M, {
433
+ const b = h("WrapInHeading", (t) => (e) => (e ?? (e = 1), e < 1 ? _(v.type(t)) : _(H.type(t), { level: e })));
434
+ n(b, {
423
435
  displayName: "Command<wrapInHeadingCommand>",
424
436
  group: "Heading"
425
437
  });
426
- const he = g("DowngradeHeading", () => () => (t, e, r) => {
427
- const { $from: a } = t.selection, o = a.node();
428
- if (o.type !== A.type() || !t.selection.empty || a.parentOffset !== 0)
438
+ const fe = h("DowngradeHeading", (t) => () => (e, r, a) => {
439
+ const { $from: o } = e.selection, s = o.node();
440
+ if (s.type !== H.type(t) || !e.selection.empty || o.parentOffset !== 0)
429
441
  return !1;
430
- const s = o.attrs.level - 1;
431
- return s ? (e == null || e(
432
- t.tr.setNodeMarkup(t.selection.$from.before(), void 0, {
433
- ...o.attrs,
434
- level: s
442
+ const l = s.attrs.level - 1;
443
+ return l ? (r == null || r(
444
+ e.tr.setNodeMarkup(e.selection.$from.before(), void 0, {
445
+ ...s.attrs,
446
+ level: l
435
447
  })
436
- ), !0) : R(w.type())(t, e, r);
448
+ ), !0) : _(v.type(t))(e, r, a);
437
449
  });
438
- n(he, {
450
+ n(fe, {
439
451
  displayName: "Command<downgradeHeadingCommand>",
440
452
  group: "Heading"
441
453
  });
442
- const ye = f("headingKeymap", {
454
+ const Ne = N("headingKeymap", {
443
455
  TurnIntoH1: {
444
456
  shortcuts: "Mod-Alt-1",
445
457
  command: (t) => {
446
- const e = t.get(h);
447
- return () => e.call(M.key, 1);
458
+ const e = t.get(y);
459
+ return () => e.call(b.key, 1);
448
460
  }
449
461
  },
450
462
  TurnIntoH2: {
451
463
  shortcuts: "Mod-Alt-2",
452
464
  command: (t) => {
453
- const e = t.get(h);
454
- return () => e.call(M.key, 2);
465
+ const e = t.get(y);
466
+ return () => e.call(b.key, 2);
455
467
  }
456
468
  },
457
469
  TurnIntoH3: {
458
470
  shortcuts: "Mod-Alt-3",
459
471
  command: (t) => {
460
- const e = t.get(h);
461
- return () => e.call(M.key, 3);
472
+ const e = t.get(y);
473
+ return () => e.call(b.key, 3);
462
474
  }
463
475
  },
464
476
  TurnIntoH4: {
465
477
  shortcuts: "Mod-Alt-4",
466
478
  command: (t) => {
467
- const e = t.get(h);
468
- return () => e.call(M.key, 3);
479
+ const e = t.get(y);
480
+ return () => e.call(b.key, 4);
469
481
  }
470
482
  },
471
483
  TurnIntoH5: {
472
484
  shortcuts: "Mod-Alt-5",
473
485
  command: (t) => {
474
- const e = t.get(h);
475
- return () => e.call(M.key, 3);
486
+ const e = t.get(y);
487
+ return () => e.call(b.key, 5);
476
488
  }
477
489
  },
478
490
  TurnIntoH6: {
479
491
  shortcuts: "Mod-Alt-6",
480
492
  command: (t) => {
481
- const e = t.get(h);
482
- return () => e.call(M.key, 3);
493
+ const e = t.get(y);
494
+ return () => e.call(b.key, 6);
483
495
  }
484
496
  },
485
497
  DowngradeHeading: {
486
498
  shortcuts: ["Delete", "Backspace"],
487
499
  command: (t) => {
488
- const e = t.get(h);
489
- return () => e.call(he.key);
500
+ const e = t.get(y);
501
+ return () => e.call(fe.key);
490
502
  }
491
503
  }
492
504
  });
493
- n(ye.ctx, {
505
+ n(Ne.ctx, {
494
506
  displayName: "KeymapCtx<heading>",
495
507
  group: "Heading"
496
508
  });
497
- n(ye.shortcuts, {
509
+ n(Ne.shortcuts, {
498
510
  displayName: "Keymap<heading>",
499
511
  group: "Heading"
500
512
  });
501
- const ke = N("blockquote");
502
- n(ke, {
513
+ const Ie = I("blockquote");
514
+ n(Ie, {
503
515
  displayName: "Attr<blockquote>",
504
516
  group: "Blockquote"
505
517
  });
506
- const E = I("blockquote", (t) => ({
518
+ const q = C("blockquote", (t) => ({
507
519
  content: "block+",
508
520
  group: "block",
509
521
  defining: !0,
510
522
  parseDOM: [{ tag: "blockquote" }],
511
- toDOM: (e) => ["blockquote", t.get(ke.key)(e), 0],
523
+ toDOM: (e) => ["blockquote", t.get(Ie.key)(e), 0],
512
524
  parseMarkdown: {
513
525
  match: ({ type: e }) => e === "blockquote",
514
526
  runner: (e, r, a) => {
@@ -522,50 +534,50 @@ const E = I("blockquote", (t) => ({
522
534
  }
523
535
  }
524
536
  }));
525
- n(E.node, {
537
+ n(q.node, {
526
538
  displayName: "NodeSchema<blockquote>",
527
539
  group: "Blockquote"
528
540
  });
529
- n(E.ctx, {
541
+ n(q.ctx, {
530
542
  displayName: "NodeSchemaCtx<blockquote>",
531
543
  group: "Blockquote"
532
544
  });
533
- const nt = L(() => Z(/^\s*>\s$/, E.type()));
534
- n(nt, {
545
+ const st = w((t) => re(/^\s*>\s$/, q.type(t)));
546
+ n(st, {
535
547
  displayName: "InputRule<wrapInBlockquoteInputRule>",
536
548
  group: "Blockquote"
537
549
  });
538
- const fe = g("WrapInBlockquote", () => () => X(E.type()));
539
- n(fe, {
550
+ const Ce = h("WrapInBlockquote", (t) => () => te(q.type(t)));
551
+ n(Ce, {
540
552
  displayName: "Command<wrapInBlockquoteCommand>",
541
553
  group: "Blockquote"
542
554
  });
543
- const Ne = f("blockquoteKeymap", {
555
+ const Me = N("blockquoteKeymap", {
544
556
  WrapInBlockquote: {
545
557
  shortcuts: "Mod-Shift-b",
546
558
  command: (t) => {
547
- const e = t.get(h);
548
- return () => e.call(fe.key);
559
+ const e = t.get(y);
560
+ return () => e.call(Ce.key);
549
561
  }
550
562
  }
551
563
  });
552
- n(Ne.ctx, {
564
+ n(Me.ctx, {
553
565
  displayName: "KeymapCtx<blockquote>",
554
566
  group: "Blockquote"
555
567
  });
556
- n(Ne.shortcuts, {
568
+ n(Me.shortcuts, {
557
569
  displayName: "Keymap<blockquote>",
558
570
  group: "Blockquote"
559
571
  });
560
- const Ie = N("codeBlock", () => ({
572
+ const be = I("codeBlock", () => ({
561
573
  pre: {},
562
574
  code: {}
563
575
  }));
564
- n(Ie, {
576
+ n(be, {
565
577
  displayName: "Attr<codeBlock>",
566
578
  group: "CodeBlock"
567
579
  });
568
- const _ = I("code_block", (t) => ({
580
+ const W = C("code_block", (t) => ({
569
581
  content: "text*",
570
582
  group: "block",
571
583
  marks: "",
@@ -582,13 +594,13 @@ const _ = I("code_block", (t) => ({
582
594
  preserveWhitespace: "full",
583
595
  getAttrs: (e) => {
584
596
  if (!(e instanceof HTMLElement))
585
- throw S(e);
597
+ throw A(e);
586
598
  return { language: e.dataset.language };
587
599
  }
588
600
  }
589
601
  ],
590
602
  toDOM: (e) => {
591
- const r = t.get(Ie.key)(e);
603
+ const r = t.get(be.key)(e);
592
604
  return [
593
605
  "pre",
594
606
  {
@@ -615,57 +627,57 @@ const _ = I("code_block", (t) => ({
615
627
  }
616
628
  }
617
629
  }));
618
- n(_.node, {
630
+ n(W.node, {
619
631
  displayName: "NodeSchema<codeBlock>",
620
632
  group: "CodeBlock"
621
633
  });
622
- n(_.ctx, {
634
+ n(W.ctx, {
623
635
  displayName: "NodeSchemaCtx<codeBlock>",
624
636
  group: "CodeBlock"
625
637
  });
626
- const ot = L(() => Ue(/^```(?<language>[a-z]*)?[\s\n]$/, _.type(), (t) => {
627
- var e;
638
+ const lt = w((t) => Qe(/^```(?<language>[a-z]*)?[\s\n]$/, W.type(t), (e) => {
639
+ var r;
628
640
  return {
629
- language: ((e = t.groups) == null ? void 0 : e.language) ?? ""
641
+ language: ((r = e.groups) == null ? void 0 : r.language) ?? ""
630
642
  };
631
643
  }));
632
- n(ot, {
644
+ n(lt, {
633
645
  displayName: "InputRule<createCodeBlockInputRule>",
634
646
  group: "CodeBlock"
635
647
  });
636
- const Ce = g("CreateCodeBlock", () => (t = "") => R(_.type(), { language: t }));
637
- n(Ce, {
648
+ const Le = h("CreateCodeBlock", (t) => (e = "") => _(W.type(t), { language: e }));
649
+ n(Le, {
638
650
  displayName: "Command<createCodeBlockCommand>",
639
651
  group: "CodeBlock"
640
652
  });
641
- const Et = g("UpdateCodeBlockLanguage", () => ({ pos: t, language: e } = { pos: -1, language: "" }) => (r, a) => t >= 0 ? (a == null || a(r.tr.setNodeAttribute(t, "language", e)), !0) : !1);
642
- n(Et, {
653
+ const qt = h("UpdateCodeBlockLanguage", () => ({ pos: t, language: e } = { pos: -1, language: "" }) => (r, a) => t >= 0 ? (a == null || a(r.tr.setNodeAttribute(t, "language", e)), !0) : !1);
654
+ n(qt, {
643
655
  displayName: "Command<updateCodeBlockLanguageCommand>",
644
656
  group: "CodeBlock"
645
657
  });
646
- const Me = f("codeBlockKeymap", {
658
+ const xe = N("codeBlockKeymap", {
647
659
  CreateCodeBlock: {
648
660
  shortcuts: "Mod-Alt-c",
649
661
  command: (t) => {
650
- const e = t.get(h);
651
- return () => e.call(Ce.key);
662
+ const e = t.get(y);
663
+ return () => e.call(Le.key);
652
664
  }
653
665
  }
654
666
  });
655
- n(Me.ctx, {
667
+ n(xe.ctx, {
656
668
  displayName: "KeymapCtx<codeBlock>",
657
669
  group: "CodeBlock"
658
670
  });
659
- n(Me.shortcuts, {
671
+ n(xe.shortcuts, {
660
672
  displayName: "Keymap<codeBlock>",
661
673
  group: "CodeBlock"
662
674
  });
663
- const be = N("image");
664
- n(be, {
675
+ const Se = I("image");
676
+ n(Se, {
665
677
  displayName: "Attr<image>",
666
678
  group: "Image"
667
679
  });
668
- const O = I("image", (t) => ({
680
+ const D = C("image", (t) => ({
669
681
  inline: !0,
670
682
  group: "inline",
671
683
  selectable: !0,
@@ -684,7 +696,7 @@ const O = I("image", (t) => ({
684
696
  tag: "img[src]",
685
697
  getAttrs: (e) => {
686
698
  if (!(e instanceof HTMLElement))
687
- throw S(e);
699
+ throw A(e);
688
700
  return {
689
701
  src: e.getAttribute("src") || "",
690
702
  alt: e.getAttribute("alt") || "",
@@ -693,15 +705,15 @@ const O = I("image", (t) => ({
693
705
  }
694
706
  }
695
707
  ],
696
- toDOM: (e) => ["img", { ...t.get(be.key)(e), ...e.attrs }],
708
+ toDOM: (e) => ["img", { ...t.get(Se.key)(e), ...e.attrs }],
697
709
  parseMarkdown: {
698
710
  match: ({ type: e }) => e === "image",
699
711
  runner: (e, r, a) => {
700
- const o = r.url, s = r.alt, i = r.title;
712
+ const o = r.url, s = r.alt, l = r.title;
701
713
  e.addNode(a, {
702
714
  src: o,
703
715
  alt: s,
704
- title: i
716
+ title: l
705
717
  });
706
718
  }
707
719
  },
@@ -716,54 +728,54 @@ const O = I("image", (t) => ({
716
728
  }
717
729
  }
718
730
  }));
719
- n(O.node, {
731
+ n(D.node, {
720
732
  displayName: "NodeSchema<image>",
721
733
  group: "Image"
722
734
  });
723
- n(O.ctx, {
735
+ n(D.ctx, {
724
736
  displayName: "NodeSchemaCtx<image>",
725
737
  group: "Image"
726
738
  });
727
- const st = g("InsertImage", () => (t = {}) => (e, r) => {
728
- if (!r)
739
+ const it = h("InsertImage", (t) => (e = {}) => (r, a) => {
740
+ if (!a)
729
741
  return !0;
730
- const { src: a = "", alt: o = "", title: s = "" } = t, i = O.type().create({ src: a, alt: o, title: s });
731
- return i && r(e.tr.replaceSelectionWith(i).scrollIntoView()), !0;
742
+ const { src: o = "", alt: s = "", title: l = "" } = e, i = D.type(t).create({ src: o, alt: s, title: l });
743
+ return i && a(r.tr.replaceSelectionWith(i).scrollIntoView()), !0;
732
744
  });
733
- n(st, {
745
+ n(it, {
734
746
  displayName: "Command<insertImageCommand>",
735
747
  group: "Image"
736
748
  });
737
- const lt = g("UpdateImage", () => (t = {}) => (e, r) => {
738
- const a = Ht(e.selection, O.type());
739
- if (!a)
749
+ const ct = h("UpdateImage", (t) => (e = {}) => (r, a) => {
750
+ const o = Tt(r.selection, D.type(t));
751
+ if (!o)
740
752
  return !1;
741
- const { node: o, pos: s } = a, i = { ...o.attrs }, { src: l, alt: c, title: d } = t;
742
- return l !== void 0 && (i.src = l), c !== void 0 && (i.alt = c), d !== void 0 && (i.title = d), r == null || r(e.tr.setNodeMarkup(s, void 0, i).scrollIntoView()), !0;
753
+ const { node: s, pos: l } = o, i = { ...s.attrs }, { src: c, alt: d, title: m } = e;
754
+ return c !== void 0 && (i.src = c), d !== void 0 && (i.alt = d), m !== void 0 && (i.title = m), a == null || a(r.tr.setNodeMarkup(l, void 0, i).scrollIntoView()), !0;
743
755
  });
744
- n(lt, {
756
+ n(ct, {
745
757
  displayName: "Command<updateImageCommand>",
746
758
  group: "Image"
747
759
  });
748
- const _t = L(() => new Ye(
760
+ const Wt = w((t) => new Xe(
749
761
  /!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,
750
- (t, e, r, a) => {
751
- const [o, s, i = "", l] = e;
752
- return o ? t.tr.replaceWith(r, a, O.type().create({ src: i, alt: s, title: l })) : null;
762
+ (e, r, a, o) => {
763
+ const [s, l, i = "", c] = r;
764
+ return s ? e.tr.replaceWith(a, o, D.type(t).create({ src: i, alt: l, title: c })) : null;
753
765
  }
754
766
  ));
755
- n(_t, {
767
+ n(Wt, {
756
768
  displayName: "InputRule<insertImageInputRule>",
757
769
  group: "Image"
758
770
  });
759
- const xe = N("hardbreak", (t) => ({
771
+ const we = I("hardbreak", (t) => ({
760
772
  "data-is-inline": t.attrs.isInline
761
773
  }));
762
- n(xe, {
774
+ n(we, {
763
775
  displayName: "Attr<hardbreak>",
764
776
  group: "Hardbreak"
765
777
  });
766
- const x = I("hardbreak", (t) => ({
778
+ const S = C("hardbreak", (t) => ({
767
779
  inline: !0,
768
780
  group: "inline",
769
781
  attrs: {
@@ -773,7 +785,7 @@ const x = I("hardbreak", (t) => ({
773
785
  },
774
786
  selectable: !1,
775
787
  parseDOM: [{ tag: "br" }],
776
- toDOM: (e) => ["br", t.get(xe.key)(e)],
788
+ toDOM: (e) => ["br", t.get(we.key)(e)],
777
789
  parseMarkdown: {
778
790
  match: ({ type: e }) => e === "break",
779
791
  runner: (e, r, a) => {
@@ -791,56 +803,56 @@ const x = I("hardbreak", (t) => ({
791
803
  }
792
804
  }
793
805
  }));
794
- n(x.node, {
806
+ n(S.node, {
795
807
  displayName: "NodeSchema<hardbreak>",
796
808
  group: "Hardbreak"
797
809
  });
798
- n(x.ctx, {
810
+ n(S.ctx, {
799
811
  displayName: "NodeSchemaCtx<hardbreak>",
800
812
  group: "Hardbreak"
801
813
  });
802
- const Le = g("InsertHardbreak", () => () => (t, e) => {
803
- var o;
804
- const { selection: r, tr: a } = t;
805
- if (r.empty) {
806
- const s = r.$from.node();
807
- if (s.childCount > 0 && ((o = s.lastChild) == null ? void 0 : o.type.name) === "hardbreak")
808
- return e == null || e(
809
- a.replaceRangeWith(r.to - 1, r.to, t.schema.node("paragraph")).setSelection(Je.near(a.doc.resolve(r.to))).scrollIntoView()
814
+ const Ae = h("InsertHardbreak", (t) => () => (e, r) => {
815
+ var s;
816
+ const { selection: a, tr: o } = e;
817
+ if (a.empty) {
818
+ const l = a.$from.node();
819
+ if (l.childCount > 0 && ((s = l.lastChild) == null ? void 0 : s.type.name) === "hardbreak")
820
+ return r == null || r(
821
+ o.replaceRangeWith(a.to - 1, a.to, e.schema.node("paragraph")).setSelection(Ze.near(o.doc.resolve(a.to))).scrollIntoView()
810
822
  ), !0;
811
823
  }
812
- return e == null || e(a.setMeta("hardbreak", !0).replaceSelectionWith(x.type().create()).scrollIntoView()), !0;
824
+ return r == null || r(o.setMeta("hardbreak", !0).replaceSelectionWith(S.type(t).create()).scrollIntoView()), !0;
813
825
  });
814
- n(Le, {
826
+ n(Ae, {
815
827
  displayName: "Command<insertHardbreakCommand>",
816
828
  group: "Hardbreak"
817
829
  });
818
- const Se = f("hardbreakKeymap", {
830
+ const ve = N("hardbreakKeymap", {
819
831
  InsertHardbreak: {
820
832
  shortcuts: "Shift-Enter",
821
833
  command: (t) => {
822
- const e = t.get(h);
823
- return () => e.call(Le.key);
834
+ const e = t.get(y);
835
+ return () => e.call(Ae.key);
824
836
  }
825
837
  }
826
838
  });
827
- n(Se.ctx, {
839
+ n(ve.ctx, {
828
840
  displayName: "KeymapCtx<hardbreak>",
829
841
  group: "Hardbreak"
830
842
  });
831
- n(Se.shortcuts, {
843
+ n(ve.shortcuts, {
832
844
  displayName: "Keymap<hardbreak>",
833
845
  group: "Hardbreak"
834
846
  });
835
- const we = N("hr");
836
- n(we, {
847
+ const He = I("hr");
848
+ n(He, {
837
849
  displayName: "Attr<hr>",
838
850
  group: "Hr"
839
851
  });
840
- const $ = I("hr", (t) => ({
852
+ const F = C("hr", (t) => ({
841
853
  group: "block",
842
854
  parseDOM: [{ tag: "hr" }],
843
- toDOM: (e) => ["hr", t.get(we.key)(e)],
855
+ toDOM: (e) => ["hr", t.get(He.key)(e)],
844
856
  parseMarkdown: {
845
857
  match: ({ type: e }) => e === "thematicBreak",
846
858
  runner: (e, r, a) => {
@@ -854,44 +866,44 @@ const $ = I("hr", (t) => ({
854
866
  }
855
867
  }
856
868
  }));
857
- n($.node, {
869
+ n(F.node, {
858
870
  displayName: "NodeSchema<hr>",
859
871
  group: "Hr"
860
872
  });
861
- n($.ctx, {
873
+ n(F.ctx, {
862
874
  displayName: "NodeSchemaCtx<hr>",
863
875
  group: "Hr"
864
876
  });
865
- const it = L(() => new Ye(
877
+ const dt = w((t) => new Xe(
866
878
  /^(?:---|___\s|\*\*\*\s)$/,
867
- (t, e, r, a) => {
868
- const { tr: o } = t;
869
- return e[0] && o.replaceWith(r - 1, a, $.type().create()), o;
879
+ (e, r, a, o) => {
880
+ const { tr: s } = e;
881
+ return r[0] && s.replaceWith(a - 1, o, F.type(t).create()), s;
870
882
  }
871
883
  ));
872
- n(it, {
884
+ n(dt, {
873
885
  displayName: "InputRule<insertHrInputRule>",
874
886
  group: "Hr"
875
887
  });
876
- const ct = g("InsertHr", () => () => (t, e) => {
877
- if (!e)
888
+ const mt = h("InsertHr", (t) => () => (e, r) => {
889
+ if (!r)
878
890
  return !0;
879
- const r = w.node.type().create(), { tr: a, selection: o } = t, { from: s } = o, i = $.type().create();
891
+ const a = v.node.type(t).create(), { tr: o, selection: s } = e, { from: l } = s, i = F.type(t).create();
880
892
  if (!i)
881
893
  return !0;
882
- const l = a.replaceSelectionWith(i).insert(s, r), c = Je.findFrom(l.doc.resolve(s), 1, !0);
883
- return c && e(l.setSelection(c).scrollIntoView()), !0;
894
+ const c = o.replaceSelectionWith(i).insert(l, a), d = Ze.findFrom(c.doc.resolve(l), 1, !0);
895
+ return d && r(c.setSelection(d).scrollIntoView()), !0;
884
896
  });
885
- n(ct, {
897
+ n(mt, {
886
898
  displayName: "Command<insertHrCommand>",
887
899
  group: "Hr"
888
900
  });
889
- const Ae = N("bulletList");
890
- n(Ae, {
901
+ const Be = I("bulletList");
902
+ n(Be, {
891
903
  displayName: "Attr<bulletList>",
892
904
  group: "BulletList"
893
905
  });
894
- const K = I("bullet_list", (t) => ({
906
+ const R = C("bullet_list", (t) => ({
895
907
  content: "listItem+",
896
908
  group: "block",
897
909
  attrs: {
@@ -904,7 +916,7 @@ const K = I("bullet_list", (t) => ({
904
916
  tag: "ul",
905
917
  getAttrs: (e) => {
906
918
  if (!(e instanceof HTMLElement))
907
- throw S(e);
919
+ throw A(e);
908
920
  return {
909
921
  spread: e.dataset.spread
910
922
  };
@@ -914,7 +926,7 @@ const K = I("bullet_list", (t) => ({
914
926
  toDOM: (e) => [
915
927
  "ul",
916
928
  {
917
- ...t.get(Ae.key)(e),
929
+ ...t.get(Be.key)(e),
918
930
  "data-spread": e.attrs.spread
919
931
  },
920
932
  0
@@ -933,47 +945,47 @@ const K = I("bullet_list", (t) => ({
933
945
  }
934
946
  }
935
947
  }));
936
- n(K.node, {
948
+ n(R.node, {
937
949
  displayName: "NodeSchema<bulletList>",
938
950
  group: "BulletList"
939
951
  });
940
- n(K.ctx, {
952
+ n(R.ctx, {
941
953
  displayName: "NodeSchemaCtx<bulletList>",
942
954
  group: "BulletList"
943
955
  });
944
- const dt = L(() => Z(/^\s*([-+*])\s$/, K.type()));
945
- n(dt, {
956
+ const ut = w((t) => re(/^\s*([-+*])\s$/, R.type(t)));
957
+ n(ut, {
946
958
  displayName: "InputRule<wrapInBulletListInputRule>",
947
959
  group: "BulletList"
948
960
  });
949
- const ve = g("WrapInBulletList", () => () => X(K.type()));
950
- n(ve, {
961
+ const Oe = h("WrapInBulletList", (t) => () => te(R.type(t)));
962
+ n(Oe, {
951
963
  displayName: "Command<wrapInBulletListCommand>",
952
964
  group: "BulletList"
953
965
  });
954
- const He = f("bulletListKeymap", {
966
+ const Te = N("bulletListKeymap", {
955
967
  WrapInBulletList: {
956
968
  shortcuts: "Mod-Alt-8",
957
969
  command: (t) => {
958
- const e = t.get(h);
959
- return () => e.call(ve.key);
970
+ const e = t.get(y);
971
+ return () => e.call(Oe.key);
960
972
  }
961
973
  }
962
974
  });
963
- n(He.ctx, {
975
+ n(Te.ctx, {
964
976
  displayName: "KeymapCtx<bulletListKeymap>",
965
977
  group: "BulletList"
966
978
  });
967
- n(He.shortcuts, {
979
+ n(Te.shortcuts, {
968
980
  displayName: "Keymap<bulletListKeymap>",
969
981
  group: "BulletList"
970
982
  });
971
- const Be = N("orderedList");
972
- n(Be, {
983
+ const Ke = I("orderedList");
984
+ n(Ke, {
973
985
  displayName: "Attr<orderedList>",
974
986
  group: "OrderedList"
975
987
  });
976
- const D = I("ordered_list", (t) => ({
988
+ const P = C("ordered_list", (t) => ({
977
989
  content: "listItem+",
978
990
  group: "block",
979
991
  attrs: {
@@ -989,7 +1001,7 @@ const D = I("ordered_list", (t) => ({
989
1001
  tag: "ol",
990
1002
  getAttrs: (e) => {
991
1003
  if (!(e instanceof HTMLElement))
992
- throw S(e);
1004
+ throw A(e);
993
1005
  return {
994
1006
  spread: e.dataset.spread,
995
1007
  order: e.hasAttribute("start") ? Number(e.getAttribute("start")) : 1
@@ -1000,7 +1012,7 @@ const D = I("ordered_list", (t) => ({
1000
1012
  toDOM: (e) => [
1001
1013
  "ol",
1002
1014
  {
1003
- ...t.get(Be.key)(e),
1015
+ ...t.get(Ke.key)(e),
1004
1016
  ...e.attrs.order === 1 ? {} : e.attrs.order,
1005
1017
  "data-spread": e.attrs.spread
1006
1018
  },
@@ -1020,52 +1032,52 @@ const D = I("ordered_list", (t) => ({
1020
1032
  }
1021
1033
  }
1022
1034
  }));
1023
- n(D.node, {
1035
+ n(P.node, {
1024
1036
  displayName: "NodeSchema<orderedList>",
1025
1037
  group: "OrderedList"
1026
1038
  });
1027
- n(D.ctx, {
1039
+ n(P.ctx, {
1028
1040
  displayName: "NodeSchemaCtx<orderedList>",
1029
1041
  group: "OrderedList"
1030
1042
  });
1031
- const mt = L(() => Z(
1043
+ const pt = w((t) => re(
1032
1044
  /^\s*(\d+)\.\s$/,
1033
- D.type(),
1034
- (t) => ({ order: Number(t[1]) }),
1035
- (t, e) => e.childCount + e.attrs.order === Number(t[1])
1045
+ P.type(t),
1046
+ (e) => ({ order: Number(e[1]) }),
1047
+ (e, r) => r.childCount + r.attrs.order === Number(e[1])
1036
1048
  ));
1037
- n(mt, {
1049
+ n(pt, {
1038
1050
  displayName: "InputRule<wrapInOrderedListInputRule>",
1039
1051
  group: "OrderedList"
1040
1052
  });
1041
- const Te = g("WrapInOrderedList", () => () => X(D.type()));
1042
- n(Te, {
1053
+ const De = h("WrapInOrderedList", (t) => () => te(P.type(t)));
1054
+ n(De, {
1043
1055
  displayName: "Command<wrapInOrderedListCommand>",
1044
1056
  group: "OrderedList"
1045
1057
  });
1046
- const Oe = f("orderedListKeymap", {
1058
+ const Re = N("orderedListKeymap", {
1047
1059
  WrapInOrderedList: {
1048
1060
  shortcuts: "Mod-Alt-7",
1049
1061
  command: (t) => {
1050
- const e = t.get(h);
1051
- return () => e.call(Te.key);
1062
+ const e = t.get(y);
1063
+ return () => e.call(De.key);
1052
1064
  }
1053
1065
  }
1054
1066
  });
1055
- n(Oe.ctx, {
1067
+ n(Re.ctx, {
1056
1068
  displayName: "KeymapCtx<orderedList>",
1057
1069
  group: "OrderedList"
1058
1070
  });
1059
- n(Oe.shortcuts, {
1071
+ n(Re.shortcuts, {
1060
1072
  displayName: "Keymap<orderedList>",
1061
1073
  group: "OrderedList"
1062
1074
  });
1063
- const Ke = N("listItem");
1064
- n(Ke, {
1075
+ const Pe = I("listItem");
1076
+ n(Pe, {
1065
1077
  displayName: "Attr<listItem>",
1066
1078
  group: "ListItem"
1067
1079
  });
1068
- const C = I("list_item", (t) => ({
1080
+ const M = C("list_item", (t) => ({
1069
1081
  group: "listItem",
1070
1082
  content: "paragraph block*",
1071
1083
  attrs: {
@@ -1085,7 +1097,7 @@ const C = I("list_item", (t) => ({
1085
1097
  tag: "li",
1086
1098
  getAttrs: (e) => {
1087
1099
  if (!(e instanceof HTMLElement))
1088
- throw S(e);
1100
+ throw A(e);
1089
1101
  return {
1090
1102
  label: e.dataset.label,
1091
1103
  listType: e.dataset["list-type"],
@@ -1097,7 +1109,7 @@ const C = I("list_item", (t) => ({
1097
1109
  toDOM: (e) => [
1098
1110
  "li",
1099
1111
  {
1100
- ...t.get(Ke.key)(e),
1112
+ ...t.get(Pe.key)(e),
1101
1113
  "data-label": e.attrs.label,
1102
1114
  "data-list-type": e.attrs.listType,
1103
1115
  "data-spread": e.attrs.spread
@@ -1107,8 +1119,8 @@ const C = I("list_item", (t) => ({
1107
1119
  parseMarkdown: {
1108
1120
  match: ({ type: e }) => e === "listItem",
1109
1121
  runner: (e, r, a) => {
1110
- const o = r.label != null ? `${r.label}.` : "•", s = r.label != null ? "ordered" : "bullet", i = r.spread != null ? `${r.spread}` : "true";
1111
- e.openNode(a, { label: o, listType: s, spread: i }), e.next(r.children), e.closeNode();
1122
+ const o = r.label != null ? `${r.label}.` : "•", s = r.label != null ? "ordered" : "bullet", l = r.spread != null ? `${r.spread}` : "true";
1123
+ e.openNode(a, { label: o, listType: s, spread: l }), e.next(r.children), e.closeNode();
1112
1124
  }
1113
1125
  },
1114
1126
  toMarkdown: {
@@ -1118,82 +1130,82 @@ const C = I("list_item", (t) => ({
1118
1130
  }
1119
1131
  }
1120
1132
  }));
1121
- n(C.node, {
1133
+ n(M.node, {
1122
1134
  displayName: "NodeSchema<listItem>",
1123
1135
  group: "ListItem"
1124
1136
  });
1125
- n(C.ctx, {
1137
+ n(M.ctx, {
1126
1138
  displayName: "NodeSchemaCtx<listItem>",
1127
1139
  group: "ListItem"
1128
1140
  });
1129
- const De = g("SinkListItem", () => () => Bt(C.type()));
1130
- n(De, {
1141
+ const Ee = h("SinkListItem", (t) => () => Kt(M.type(t)));
1142
+ n(Ee, {
1131
1143
  displayName: "Command<sinkListItemCommand>",
1132
1144
  group: "ListItem"
1133
1145
  });
1134
- const Pe = g("SplitListItem", () => () => Qe(C.type()));
1135
- n(Pe, {
1146
+ const _e = h("SplitListItem", (t) => () => et(M.type(t)));
1147
+ n(_e, {
1136
1148
  displayName: "Command<liftListItemCommand>",
1137
1149
  group: "ListItem"
1138
1150
  });
1139
- const Re = g("SplitListItem", () => () => Tt(C.type()));
1140
- n(Re, {
1151
+ const $e = h("SplitListItem", (t) => () => Dt(M.type(t)));
1152
+ n($e, {
1141
1153
  displayName: "Command<splitListItemCommand>",
1142
1154
  group: "ListItem"
1143
1155
  });
1144
- const $t = (t, e, r) => {
1145
- const { selection: a } = t;
1146
- if (!(a instanceof ee))
1156
+ const Ft = (t) => (e, r, a) => {
1157
+ const { selection: o } = e;
1158
+ if (!(o instanceof G))
1147
1159
  return !1;
1148
- const { empty: o, $from: s } = a;
1149
- if (!o || s.parentOffset !== 0)
1160
+ const { empty: s, $from: l } = o;
1161
+ if (!s || l.parentOffset !== 0)
1150
1162
  return !1;
1151
- const i = s.node(-1);
1152
- return i.type !== C.type() || i.firstChild !== s.node() || s.node(-2).childCount > 1 ? !1 : Qe(C.type())(t, e, r);
1153
- }, Ee = g("LiftFirstListItem", () => () => $t);
1154
- n(Ee, {
1163
+ const i = l.node(-1);
1164
+ return i.type !== M.type(t) || i.firstChild !== l.node() || l.node(-2).childCount > 1 ? !1 : et(M.type(t))(e, r, a);
1165
+ }, qe = h("LiftFirstListItem", (t) => () => Ft(t));
1166
+ n(qe, {
1155
1167
  displayName: "Command<liftFirstListItemCommand>",
1156
1168
  group: "ListItem"
1157
1169
  });
1158
- const _e = f("listItemKeymap", {
1170
+ const We = N("listItemKeymap", {
1159
1171
  NextListItem: {
1160
1172
  shortcuts: "Enter",
1161
1173
  command: (t) => {
1162
- const e = t.get(h);
1163
- return () => e.call(Re.key);
1174
+ const e = t.get(y);
1175
+ return () => e.call($e.key);
1164
1176
  }
1165
1177
  },
1166
1178
  SinkListItem: {
1167
1179
  shortcuts: ["Tab", "Mod-]"],
1168
1180
  command: (t) => {
1169
- const e = t.get(h);
1170
- return () => e.call(De.key);
1181
+ const e = t.get(y);
1182
+ return () => e.call(Ee.key);
1171
1183
  }
1172
1184
  },
1173
1185
  LiftListItem: {
1174
1186
  shortcuts: ["Shift-Tab", "Mod-["],
1175
1187
  command: (t) => {
1176
- const e = t.get(h);
1177
- return () => e.call(Pe.key);
1188
+ const e = t.get(y);
1189
+ return () => e.call(_e.key);
1178
1190
  }
1179
1191
  },
1180
1192
  LiftFirstListItem: {
1181
1193
  shortcuts: ["Backspace", "Delete"],
1182
1194
  command: (t) => {
1183
- const e = t.get(h);
1184
- return () => e.call(Ee.key);
1195
+ const e = t.get(y);
1196
+ return () => e.call(qe.key);
1185
1197
  }
1186
1198
  }
1187
1199
  });
1188
- n(_e.ctx, {
1200
+ n(We.ctx, {
1189
1201
  displayName: "KeymapCtx<listItem>",
1190
1202
  group: "ListItem"
1191
1203
  });
1192
- n(_e.shortcuts, {
1204
+ n(We.shortcuts, {
1193
1205
  displayName: "Keymap<listItem>",
1194
1206
  group: "ListItem"
1195
1207
  });
1196
- const ut = ze("text", () => ({
1208
+ const gt = Ye("text", () => ({
1197
1209
  group: "inline",
1198
1210
  parseMarkdown: {
1199
1211
  match: ({ type: t }) => t === "text",
@@ -1208,16 +1220,16 @@ const ut = ze("text", () => ({
1208
1220
  }
1209
1221
  }
1210
1222
  }));
1211
- n(ut, {
1223
+ n(gt, {
1212
1224
  displayName: "NodeSchema<text>",
1213
1225
  group: "Text"
1214
1226
  });
1215
- const $e = N("html");
1216
- n($e, {
1227
+ const Fe = I("html");
1228
+ n(Fe, {
1217
1229
  displayName: "Attr<html>",
1218
1230
  group: "Html"
1219
1231
  });
1220
- const qe = I("html", (t) => ({
1232
+ const Ge = C("html", (t) => ({
1221
1233
  atom: !0,
1222
1234
  group: "inline",
1223
1235
  inline: !0,
@@ -1228,7 +1240,7 @@ const qe = I("html", (t) => ({
1228
1240
  },
1229
1241
  toDOM: (e) => {
1230
1242
  const r = document.createElement("span"), a = {
1231
- ...t.get($e.key)(e),
1243
+ ...t.get(Fe.key)(e),
1232
1244
  "data-value": e.attrs.value,
1233
1245
  "data-type": "html"
1234
1246
  };
@@ -1253,117 +1265,117 @@ const qe = I("html", (t) => ({
1253
1265
  }
1254
1266
  }
1255
1267
  }));
1256
- n(qe.node, {
1268
+ n(Ge.node, {
1257
1269
  displayName: "NodeSchema<html>",
1258
1270
  group: "Html"
1259
1271
  });
1260
- n(qe.ctx, {
1272
+ n(Ge.ctx, {
1261
1273
  displayName: "NodeSchemaCtx<html>",
1262
1274
  group: "Html"
1263
1275
  });
1264
- const qt = [
1265
- rt,
1266
- me,
1267
- w,
1268
- z,
1276
+ const Gt = [
1277
+ nt,
1269
1278
  ge,
1270
- A,
1271
- xe,
1272
- x,
1279
+ v,
1280
+ Y,
1273
1281
  ke,
1274
- E,
1275
- Ie,
1276
- _,
1282
+ H,
1277
1283
  we,
1278
- $,
1284
+ S,
1285
+ Ie,
1286
+ q,
1279
1287
  be,
1280
- O,
1281
- Ae,
1282
- K,
1283
- Be,
1288
+ W,
1289
+ He,
1290
+ F,
1291
+ Se,
1284
1292
  D,
1293
+ Be,
1294
+ R,
1285
1295
  Ke,
1286
- C,
1287
- te,
1288
- V,
1296
+ P,
1297
+ Pe,
1298
+ M,
1289
1299
  ne,
1290
- j,
1300
+ z,
1291
1301
  le,
1292
- b,
1302
+ U,
1293
1303
  de,
1294
- v,
1295
- $e,
1296
- qe,
1297
- ut
1298
- ].flat(), Wt = [
1299
- nt,
1304
+ x,
1305
+ pe,
1306
+ B,
1307
+ Fe,
1308
+ Ge,
1309
+ gt
1310
+ ].flat(), Vt = [
1311
+ st,
1312
+ ut,
1313
+ pt,
1314
+ lt,
1300
1315
  dt,
1301
- mt,
1302
- ot,
1303
- it,
1304
- at
1305
- ].flat(), Ft = [
1306
- ue,
1307
- fe,
1308
- M,
1316
+ ot
1317
+ ].flat(), jt = [
1309
1318
  he,
1310
1319
  Ce,
1320
+ b,
1321
+ fe,
1311
1322
  Le,
1323
+ Ae,
1324
+ mt,
1325
+ it,
1312
1326
  ct,
1313
- st,
1314
- lt,
1315
- Te,
1316
- ve,
1317
1327
  De,
1318
- Re,
1319
- Pe,
1328
+ Oe,
1320
1329
  Ee,
1321
- re,
1322
- ie,
1330
+ $e,
1331
+ _e,
1332
+ qe,
1323
1333
  oe,
1324
- et,
1325
- tt
1326
- ], Gt = [
1327
- Ne,
1334
+ me,
1335
+ ie,
1336
+ rt,
1337
+ at
1338
+ ], zt = [
1328
1339
  Me,
1329
- Se,
1340
+ xe,
1341
+ ve,
1342
+ Ne,
1343
+ We,
1344
+ Re,
1345
+ Te,
1330
1346
  ye,
1331
- _e,
1332
- Oe,
1333
- He,
1334
- pe,
1335
- ae,
1336
- ce,
1337
- se
1338
- ].flat(), U = /\[(?<span>((www|https:\/\/|http:\/\/)[^\s\]]+))]\((?<url>[^\s\]]+)\)/, Vt = (t) => new RegExp(`\\\\(?=[^\\w\\s${t}\\\\]|_)`, "g"), jt = (t) => {
1339
- let e = t, r = e.match(U);
1347
+ se,
1348
+ ue,
1349
+ ce
1350
+ ].flat(), Ut = /\[([^\]]+)]\([^\s\]]+\)/, Q = /\[(?<span>((www|https:\/\/|http:\/\/)[^\s\]]+))]\((?<url>[^\s\]]+)\)/, Yt = (t) => new RegExp(`\\\\(?=[^\\w\\s${t}\\\\]|_)`, "g"), Jt = (t) => {
1351
+ let e = t, r = e.match(Q);
1340
1352
  for (; r && r.groups; ) {
1341
1353
  const { span: a } = r.groups;
1342
- e = e.replace(U, a), r = e.match(U);
1354
+ e = e.replace(Q, a), r = e.match(Q);
1343
1355
  }
1344
1356
  return e;
1345
- }, zt = (t, e, r) => {
1357
+ }, Qt = (t, e, r) => {
1346
1358
  const a = t.split(""), o = a[e];
1347
1359
  return a[e] && a[r] && (a[e] = a[r], a[r] = o), a.join("").toString();
1348
- }, Ut = (t) => (e) => e.replace(Vt(t), ""), Yt = (t) => (e) => {
1360
+ }, Xt = (t) => (e) => e.replace(Yt(t), ""), Zt = (t) => (e) => {
1349
1361
  const r = e.indexOf(t.hole), a = e.charAt(r - 1), o = e.charAt(r + 1), s = /[^\w]|_/;
1350
1362
  return o ? a && s.test(a) && s.test(o) ? t.punctuation : t.char : t.punctuation;
1351
- }, Jt = (t, e, r) => {
1363
+ }, er = (t, e, r) => {
1352
1364
  let a = e, o = !1;
1353
1365
  return t.descendants((s) => {
1354
- var i;
1366
+ var l;
1355
1367
  if (o)
1356
1368
  return !1;
1357
1369
  if (!s.textContent.includes(r))
1358
1370
  return a += s.nodeSize, !1;
1359
1371
  if (s.isText) {
1360
- const l = (i = s.text) == null ? void 0 : i.indexOf(r);
1361
- if (l != null && l >= 0)
1362
- return o = !0, a += l, !1;
1372
+ const i = (l = s.text) == null ? void 0 : l.indexOf(r);
1373
+ if (i != null && i >= 0)
1374
+ return o = !0, a += i, !1;
1363
1375
  }
1364
1376
  return a += 1, !0;
1365
1377
  }), a;
1366
- }, Qt = {
1378
+ }, tr = {
1367
1379
  placeholderConfig: {
1368
1380
  hole: "∅",
1369
1381
  punctuation: "⁂",
@@ -1375,93 +1387,96 @@ const qt = [
1375
1387
  const r = ["*", "_"];
1376
1388
  let a = e.indexOf(t);
1377
1389
  for (; r.includes(e[a - 1] || "") && r.includes(e[a + 1] || ""); )
1378
- e = zt(e, a, a + 1), a = a + 1;
1390
+ e = Qt(e, a, a + 1), a = a + 1;
1379
1391
  return e;
1380
1392
  }
1381
- }, P = J(Qt, "inlineSyncConfig");
1382
- n(P, {
1393
+ }, E = Z(tr, "inlineSyncConfig");
1394
+ n(E, {
1383
1395
  displayName: "Ctx<inlineSyncConfig>",
1384
1396
  group: "Prose"
1385
1397
  });
1386
- const Xt = (t) => t.selection.$from.node(), Zt = (t, e, r, a) => {
1387
- const o = t.get(St), s = e.schema.topNodeType.create(void 0, [r, ...a]);
1398
+ const rr = (t) => t.selection.$from.node(), ar = (t, e, r, a) => {
1399
+ const o = t.get(vt), s = e.schema.topNodeType.create(void 0, [r, ...a]);
1388
1400
  return o(s);
1389
- }, er = (t, e) => {
1390
- const r = t.get(P.key), a = r.placeholderConfig.hole, [o = "", ...s] = e.split(`
1401
+ }, nr = (t, e) => {
1402
+ const r = t.get(E.key), a = r.placeholderConfig.hole, [o = "", ...s] = e.split(`
1391
1403
 
1392
- `), i = (m) => r.movePlaceholder(a, m);
1393
- let c = Lt(Ut(a), i, jt)(o);
1394
- const d = Yt(r.placeholderConfig)(c);
1404
+ `), l = (m) => r.movePlaceholder(a, m);
1405
+ let c = At(Xt(a), l, Jt)(o);
1406
+ const d = Zt(r.placeholderConfig)(c);
1395
1407
  return c = c.replace(a, d), c = [c, ...s].join(`
1396
1408
 
1397
1409
  `), [c, d];
1398
- }, tr = (t, e) => {
1399
- const a = t.get(wt)(e);
1410
+ }, or = (t, e) => {
1411
+ const a = t.get(Ht)(e);
1400
1412
  return a ? a.firstChild : null;
1401
- }, rr = (t, e) => {
1402
- const { globalNodes: r } = t.get(P.key), a = [];
1413
+ }, sr = (t, e) => {
1414
+ const { globalNodes: r } = t.get(E.key), a = [];
1403
1415
  return e.doc.descendants((o) => {
1404
1416
  if (r.includes(o.type.name) || r.includes(o.type))
1405
1417
  return a.push(o), !1;
1406
1418
  }), a;
1407
- }, ar = (t) => t.split(`
1419
+ }, lr = (t) => t.split(`
1408
1420
 
1409
- `)[0] || "", nr = (t) => t.childCount === 1 && t.child(0).type.name === "html", pt = (t, e) => {
1421
+ `)[0] || "", ir = (t) => t.childCount === 1 && t.child(0).type.name === "html", ht = (t, e) => {
1410
1422
  try {
1411
- const r = rr(t, e), a = Xt(e), o = Zt(t, e, a, r), [s, i] = er(t, o), l = tr(t, s);
1412
- return !l || a.type !== l.type || nr(l) ? null : (l.attrs = { ...a.attrs }, l.descendants((c) => {
1413
- var u;
1414
- const m = c.marks.find((y) => y.type.name === "link");
1415
- m && ((u = c.text) != null && u.includes(i)) && m.attrs.href.includes(i) && (m.attrs.href = m.attrs.href.replace(i, ""));
1423
+ const r = sr(t, e), a = rr(e), o = ar(t, e, a, r), [s, l] = nr(t, o), i = or(t, s);
1424
+ return !i || a.type !== i.type || ir(i) ? null : (i.attrs = { ...a.attrs }, i.descendants((c) => {
1425
+ var p;
1426
+ const m = c.marks.find((u) => u.type.name === "link");
1427
+ m && ((p = c.text) != null && p.includes(l)) && m.attrs.href.includes(l) && (m.attrs.href = m.attrs.href.replace(l, ""));
1416
1428
  }), {
1417
- text: ar(s),
1429
+ text: lr(s),
1418
1430
  prevNode: a,
1419
- nextNode: l,
1420
- placeholder: i
1431
+ nextNode: i,
1432
+ placeholder: l
1421
1433
  });
1422
1434
  } catch {
1423
1435
  return null;
1424
1436
  }
1425
- }, or = (t, e, r, a, o) => {
1426
- const { placeholderConfig: s } = t.get(P.key), i = s.hole;
1427
- let l = r.tr.setMeta(e, !0).insertText(i, r.selection.from);
1428
- const c = r.apply(l), d = pt(t, c);
1437
+ }, cr = (t, e, r, a, o) => {
1438
+ var L;
1439
+ const { placeholderConfig: s } = t.get(E.key), l = s.hole;
1440
+ let i = r.tr.setMeta(e, !0).insertText(l, r.selection.from);
1441
+ const c = r.apply(i), d = ht(t, c);
1429
1442
  if (!d)
1430
1443
  return;
1431
- const { $from: m } = c.selection, u = m.before(), y = m.after(), p = Jt(d.nextNode, u, d.placeholder);
1432
- l = l.replaceWith(u, y, d.nextNode).setNodeMarkup(u, void 0, o).delete(p + 1, p + 2), l = l.setSelection(ee.near(l.doc.resolve(p + 1))), a(l);
1433
- }, gt = H((t) => {
1444
+ const m = d.text.slice(0, d.text.indexOf(d.placeholder)), { $from: p } = c.selection, u = p.before(), k = p.after(), g = er(d.nextNode, u, d.placeholder);
1445
+ i = i.replaceWith(u, k, d.nextNode).setNodeMarkup(u, void 0, o).delete(g + 1, g + 2), i = i.setSelection(G.near(i.doc.resolve(g + 1))), (Ut.test(m) || ["*", "_", "~"].includes(m.at(-1) || "")) && i.selection instanceof G && (((L = i.selection.$cursor) == null ? void 0 : L.marks()) ?? []).forEach((J) => {
1446
+ i = i.removeStoredMark(J.type);
1447
+ }), a(i);
1448
+ }, yt = O((t) => {
1434
1449
  let e = null;
1435
- const r = new B("MILKDOWN_INLINE_SYNC");
1436
- return new T({
1450
+ const r = new T("MILKDOWN_INLINE_SYNC");
1451
+ return new K({
1437
1452
  key: r,
1438
1453
  state: {
1439
1454
  init: () => null,
1440
- apply: (a, o, s, i) => {
1441
- var k;
1442
- const l = t.get(Y);
1443
- if (!((k = l.hasFocus) != null && k.call(l)) || !l.editable || !a.docChanged || a.getMeta(r))
1455
+ apply: (a, o, s, l) => {
1456
+ var g;
1457
+ const i = t.get(X);
1458
+ if (!((g = i.hasFocus) != null && g.call(i)) || !i.editable || !a.docChanged || a.getMeta(r))
1444
1459
  return null;
1445
- const d = pt(t, i);
1460
+ const d = ht(t, l);
1446
1461
  if (!d)
1447
1462
  return null;
1448
1463
  e && (cancelAnimationFrame(e), e = null);
1449
- const { prevNode: m, nextNode: u, text: y } = d, { shouldSyncNode: p } = t.get(P.key);
1450
- return p({ prevNode: m, nextNode: u, ctx: t, tr: a, text: y }) && (e = requestAnimationFrame(() => {
1464
+ const { prevNode: m, nextNode: p, text: u } = d, { shouldSyncNode: k } = t.get(E.key);
1465
+ return k({ prevNode: m, nextNode: p, ctx: t, tr: a, text: u }) && (e = requestAnimationFrame(() => {
1451
1466
  e = null;
1452
- const { dispatch: q, state: Fe } = t.get(Y);
1453
- or(t, r, Fe, q, m.attrs);
1454
- }), a.setMeta("addToHistory", !1)), null;
1467
+ const { dispatch: f, state: L } = t.get(X);
1468
+ cr(t, r, L, f, m.attrs);
1469
+ })), null;
1455
1470
  }
1456
1471
  }
1457
1472
  });
1458
1473
  });
1459
- n(gt, {
1474
+ n(yt, {
1460
1475
  displayName: "Prose<inlineSyncPlugin>",
1461
1476
  group: "Prose"
1462
1477
  });
1463
- const ht = G(() => () => (t) => {
1464
- Xe(t, "list", (e) => {
1478
+ const kt = $(() => () => (t) => {
1479
+ ae(t, "list", (e) => {
1465
1480
  if (e.ordered) {
1466
1481
  const r = e.start ?? 1;
1467
1482
  e.children.forEach((a, o) => {
@@ -1470,68 +1485,78 @@ const ht = G(() => () => (t) => {
1470
1485
  }
1471
1486
  });
1472
1487
  });
1473
- n(ht, {
1488
+ n(kt, {
1474
1489
  displayName: "Remark<remarkAddOrderInListPlugin>",
1475
1490
  group: "Remark"
1476
1491
  });
1477
- const yt = G(() => () => (t) => {
1492
+ const ft = $(() => () => (t) => {
1478
1493
  const e = /[\t ]*(?:\r?\n|\r)/g;
1479
- Xe(t, "text", (r, a, o) => {
1494
+ ae(t, "text", (r, a, o) => {
1480
1495
  if (!r.value || typeof r.value != "string")
1481
1496
  return;
1482
1497
  const s = [];
1483
- let i = 0;
1498
+ let l = 0;
1484
1499
  e.lastIndex = 0;
1485
- let l = e.exec(r.value);
1486
- for (; l; ) {
1487
- const d = l.index;
1488
- i !== d && s.push({ type: "text", value: r.value.slice(i, d) }), s.push({ type: "break", data: { isInline: !0 } }), i = d + l[0].length, l = e.exec(r.value);
1500
+ let i = e.exec(r.value);
1501
+ for (; i; ) {
1502
+ const d = i.index;
1503
+ l !== d && s.push({ type: "text", value: r.value.slice(l, d) }), s.push({ type: "break", data: { isInline: !0 } }), l = d + i[0].length, i = e.exec(r.value);
1489
1504
  }
1490
1505
  if (s.length > 0 && o && typeof a == "number")
1491
- return i < r.value.length && s.push({ type: "text", value: r.value.slice(i) }), o.children.splice(a, 1, ...s), a + s.length;
1506
+ return l < r.value.length && s.push({ type: "text", value: r.value.slice(l) }), o.children.splice(a, 1, ...s), a + s.length;
1492
1507
  });
1493
1508
  });
1494
- n(yt, {
1509
+ n(ft, {
1495
1510
  displayName: "Remark<remarkLineBreak>",
1496
1511
  group: "Remark"
1497
1512
  });
1498
- const kt = G(() => Dt);
1499
- n(kt, {
1513
+ const Nt = $(() => Et);
1514
+ n(Nt, {
1500
1515
  displayName: "Remark<remarkInlineLinkPlugin>",
1501
1516
  group: "Remark"
1502
1517
  });
1503
- const sr = (t) => !!t.children, lr = (t) => t.type === "html";
1504
- function ir(t, e) {
1518
+ const dr = (t) => !!t.children, mr = (t) => t.type === "html";
1519
+ function ur(t, e) {
1505
1520
  return r(t, 0, null)[0];
1506
1521
  function r(a, o, s) {
1507
- if (sr(a)) {
1508
- const i = [];
1509
- for (let l = 0, c = a.children.length; l < c; l++) {
1510
- const d = a.children[l];
1522
+ if (dr(a)) {
1523
+ const l = [];
1524
+ for (let i = 0, c = a.children.length; i < c; i++) {
1525
+ const d = a.children[i];
1511
1526
  if (d) {
1512
- const m = r(d, l, a);
1527
+ const m = r(d, i, a);
1513
1528
  if (m)
1514
- for (let u = 0, y = m.length; u < y; u++) {
1515
- const p = m[u];
1516
- p && i.push(p);
1529
+ for (let p = 0, u = m.length; p < u; p++) {
1530
+ const k = m[p];
1531
+ k && l.push(k);
1517
1532
  }
1518
1533
  }
1519
1534
  }
1520
- a.children = i;
1535
+ a.children = l;
1521
1536
  }
1522
1537
  return e(a, o, s);
1523
1538
  }
1524
1539
  }
1525
- const ft = G(() => () => (t) => {
1526
- ir(t, (e, r, a) => lr(e) ? ((a == null ? void 0 : a.type) === "root" && (e.children = [{ ...e }], delete e.value, e.type = "paragraph"), [e]) : [e]);
1540
+ const It = $(() => () => (t) => {
1541
+ ur(t, (e, r, a) => mr(e) ? ((a == null ? void 0 : a.type) === "root" && (e.children = [{ ...e }], delete e.value, e.type = "paragraph"), [e]) : [e]);
1527
1542
  });
1528
- n(ft, {
1543
+ n(It, {
1529
1544
  displayName: "Remark<remarkHtmlTransformer>",
1530
1545
  group: "Remark"
1531
1546
  });
1532
- const Nt = H(() => {
1547
+ const Ct = $(() => () => (t, e) => {
1548
+ const r = (a) => e.value.charAt(a.position.start.offset);
1549
+ ae(t, (a) => ["strong", "emphasis"].includes(a.type), (a) => {
1550
+ a.marker = r(a);
1551
+ });
1552
+ });
1553
+ n(Ct, {
1554
+ displayName: "Remark<remarkMarker>",
1555
+ group: "Remark"
1556
+ });
1557
+ const Mt = O(() => {
1533
1558
  let t = !1;
1534
- const e = new B("MILKDOWN_INLINE_NODES_CURSOR"), r = new T({
1559
+ const e = new T("MILKDOWN_INLINE_NODES_CURSOR"), r = new K({
1535
1560
  key: e,
1536
1561
  state: {
1537
1562
  init() {
@@ -1540,119 +1565,119 @@ const Nt = H(() => {
1540
1565
  apply(a) {
1541
1566
  if (!a.selection.empty)
1542
1567
  return !1;
1543
- const o = a.selection.$from, s = o.nodeBefore, i = o.nodeAfter;
1544
- return !!(s && i && s.isInline && !s.isText && i.isInline && !i.isText);
1568
+ const o = a.selection.$from, s = o.nodeBefore, l = o.nodeAfter;
1569
+ return !!(s && l && s.isInline && !s.isText && l.isInline && !l.isText);
1545
1570
  }
1546
1571
  },
1547
1572
  props: {
1548
1573
  handleDOMEvents: {
1549
1574
  compositionend: (a, o) => t ? (t = !1, requestAnimationFrame(() => {
1550
1575
  if (r.getState(a.state)) {
1551
- const i = a.state.selection.from;
1552
- o.preventDefault(), a.dispatch(a.state.tr.insertText(o.data || "", i));
1576
+ const l = a.state.selection.from;
1577
+ o.preventDefault(), a.dispatch(a.state.tr.insertText(o.data || "", l));
1553
1578
  }
1554
1579
  }), !0) : !1,
1555
1580
  compositionstart: (a) => (r.getState(a.state) && (t = !0), !1),
1556
1581
  beforeinput: (a, o) => {
1557
1582
  if (r.getState(a.state) && o instanceof InputEvent && o.data && !t) {
1558
- const i = a.state.selection.from;
1559
- return o.preventDefault(), a.dispatch(a.state.tr.insertText(o.data || "", i)), !0;
1583
+ const l = a.state.selection.from;
1584
+ return o.preventDefault(), a.dispatch(a.state.tr.insertText(o.data || "", l)), !0;
1560
1585
  }
1561
1586
  return !1;
1562
1587
  }
1563
1588
  },
1564
1589
  decorations(a) {
1565
1590
  if (r.getState(a)) {
1566
- const i = a.selection.$from.pos, l = document.createElement("span"), c = Ve.widget(i, l, {
1591
+ const l = a.selection.$from.pos, i = document.createElement("span"), c = ze.widget(l, i, {
1567
1592
  side: -1
1568
- }), d = document.createElement("span"), m = Ve.widget(i, d);
1593
+ }), d = document.createElement("span"), m = ze.widget(l, d);
1569
1594
  return setTimeout(() => {
1570
- l.contentEditable = "true", d.contentEditable = "true";
1571
- }), je.create(a.doc, [c, m]);
1595
+ i.contentEditable = "true", d.contentEditable = "true";
1596
+ }), Ue.create(a.doc, [c, m]);
1572
1597
  }
1573
- return je.empty;
1598
+ return Ue.empty;
1574
1599
  }
1575
1600
  }
1576
1601
  });
1577
1602
  return r;
1578
1603
  });
1579
- n(Nt, {
1604
+ n(Mt, {
1580
1605
  displayName: "Prose<inlineNodesCursorPlugin>",
1581
1606
  group: "Prose"
1582
1607
  });
1583
- const It = H(() => new T({
1584
- key: new B("MILKDOWN_HARDBREAK_MARKS"),
1585
- appendTransaction: (t, e, r) => {
1586
- if (!t.length)
1608
+ const bt = O((t) => new K({
1609
+ key: new T("MILKDOWN_HARDBREAK_MARKS"),
1610
+ appendTransaction: (e, r, a) => {
1611
+ if (!e.length)
1587
1612
  return;
1588
- const [a] = t;
1589
- if (!a)
1613
+ const [o] = e;
1614
+ if (!o)
1590
1615
  return;
1591
- const [o] = a.steps;
1592
- if (a.getMeta("hardbreak")) {
1593
- if (!(o instanceof Ot))
1616
+ const [s] = o.steps;
1617
+ if (o.getMeta("hardbreak")) {
1618
+ if (!(s instanceof Rt))
1594
1619
  return;
1595
- const { from: l } = o;
1596
- return r.tr.setNodeMarkup(l, x.type(), void 0, []);
1620
+ const { from: c } = s;
1621
+ return a.tr.setNodeMarkup(c, S.type(t), void 0, []);
1597
1622
  }
1598
- if (o instanceof Kt) {
1599
- let l = r.tr;
1600
- const { from: c, to: d } = o;
1601
- return r.doc.nodesBetween(c, d, (m, u) => {
1602
- m.type === x.type() && (l = l.setNodeMarkup(u, x.type(), void 0, []));
1603
- }), l;
1623
+ if (s instanceof Pt) {
1624
+ let c = a.tr;
1625
+ const { from: d, to: m } = s;
1626
+ return a.doc.nodesBetween(d, m, (p, u) => {
1627
+ p.type === S.type(t) && (c = c.setNodeMarkup(u, S.type(t), void 0, []));
1628
+ }), c;
1604
1629
  }
1605
1630
  }
1606
1631
  }));
1607
- n(It, {
1632
+ n(bt, {
1608
1633
  displayName: "Prose<hardbreakClearMarkPlugin>",
1609
1634
  group: "Prose"
1610
1635
  });
1611
- const We = J(["table", "code_block"], "hardbreakFilterNodes");
1612
- n(We, {
1636
+ const Ve = Z(["table", "code_block"], "hardbreakFilterNodes");
1637
+ n(Ve, {
1613
1638
  displayName: "Ctx<hardbreakFilterNodes>",
1614
1639
  group: "Prose"
1615
1640
  });
1616
- const Ct = H((t) => {
1617
- const e = t.get(We.key);
1618
- return new T({
1619
- key: new B("MILKDOWN_HARDBREAK_FILTER"),
1641
+ const Lt = O((t) => {
1642
+ const e = t.get(Ve.key);
1643
+ return new K({
1644
+ key: new T("MILKDOWN_HARDBREAK_FILTER"),
1620
1645
  filterTransaction: (r, a) => {
1621
1646
  const o = r.getMeta("hardbreak"), [s] = r.steps;
1622
1647
  if (o && s) {
1623
- const { from: i } = s, l = a.doc.resolve(i);
1624
- let c = l.depth, d = !0;
1648
+ const { from: l } = s, i = a.doc.resolve(l);
1649
+ let c = i.depth, d = !0;
1625
1650
  for (; c > 0; )
1626
- e.includes(l.node(c).type.name) && (d = !1), c--;
1651
+ e.includes(i.node(c).type.name) && (d = !1), c--;
1627
1652
  return d;
1628
1653
  }
1629
1654
  return !0;
1630
1655
  }
1631
1656
  });
1632
1657
  });
1633
- n(Ct, {
1658
+ n(Lt, {
1634
1659
  displayName: "Prose<hardbreakFilterPlugin>",
1635
1660
  group: "Prose"
1636
1661
  });
1637
- const Mt = H((t) => {
1638
- const e = new B("MILKDOWN_HEADING_ID"), r = (a) => {
1662
+ const xt = O((t) => {
1663
+ const e = new T("MILKDOWN_HEADING_ID"), r = (a) => {
1639
1664
  if (a.composing || !a.editable)
1640
1665
  return;
1641
- const o = t.get(z.key), s = a.state.tr.setMeta("addToHistory", !1);
1642
- let i = !1;
1643
- a.state.doc.descendants((l, c) => {
1644
- if (l.type === A.type()) {
1645
- if (l.textContent.trim().length === 0)
1666
+ const o = t.get(Y.key), s = a.state.tr.setMeta("addToHistory", !1);
1667
+ let l = !1;
1668
+ a.state.doc.descendants((i, c) => {
1669
+ if (i.type === H.type(t)) {
1670
+ if (i.textContent.trim().length === 0)
1646
1671
  return;
1647
- const d = l.attrs, m = o(l);
1648
- d.id !== m && (i = !0, s.setMeta(e, !0).setNodeMarkup(c, void 0, {
1672
+ const d = i.attrs, m = o(i);
1673
+ d.id !== m && (l = !0, s.setMeta(e, !0).setNodeMarkup(c, void 0, {
1649
1674
  ...d,
1650
1675
  id: m
1651
1676
  }));
1652
1677
  }
1653
- }), i && a.dispatch(s);
1678
+ }), l && a.dispatch(s);
1654
1679
  };
1655
- return new T({
1680
+ return new K({
1656
1681
  key: e,
1657
1682
  view: (a) => (r(a), {
1658
1683
  update: (o) => {
@@ -1661,155 +1686,157 @@ const Mt = H((t) => {
1661
1686
  })
1662
1687
  });
1663
1688
  });
1664
- n(Mt, {
1689
+ n(xt, {
1665
1690
  displayName: "Prose<syncHeadingIdPlugin>",
1666
1691
  group: "Prose"
1667
1692
  });
1668
- const bt = H(() => {
1669
- const t = (e) => {
1670
- if (e.composing || !e.editable)
1693
+ const St = O((t) => {
1694
+ const e = (r) => {
1695
+ if (r.composing || !r.editable)
1671
1696
  return;
1672
- const r = D.type(), a = K.type(), o = C.type(), s = e.state, i = (d, m) => {
1697
+ const a = P.type(t), o = R.type(t), s = M.type(t), l = r.state, i = (m, p) => {
1673
1698
  let u = !1;
1674
- const y = `${m + 1}.`;
1675
- return d.label !== y && (d.label = y, u = !0), u;
1699
+ const k = `${p + 1}.`;
1700
+ return m.label !== k && (m.label = k, u = !0), u;
1676
1701
  };
1677
- let l = s.tr, c = !1;
1678
- s.doc.descendants((d, m, u, y) => {
1679
- if (d.type === a) {
1680
- const p = d.maybeChild(0);
1681
- (p == null ? void 0 : p.type) === o && p.attrs.listType === "ordered" && (c = !0, l.setNodeMarkup(m, r, { spread: "true" }), d.descendants((k, q, Fe, xt) => {
1682
- if (k.type === o) {
1683
- const Ge = { ...k.attrs };
1684
- i(Ge, xt) && (l = l.setNodeMarkup(q, void 0, Ge));
1702
+ let c = l.tr, d = !1;
1703
+ l.doc.descendants((m, p, u, k) => {
1704
+ if (m.type === o) {
1705
+ const g = m.maybeChild(0);
1706
+ (g == null ? void 0 : g.type) === s && g.attrs.listType === "ordered" && (d = !0, c.setNodeMarkup(p, a, { spread: "true" }), m.descendants((f, L, wt, J) => {
1707
+ if (f.type === s) {
1708
+ const je = { ...f.attrs };
1709
+ i(je, J) && (c = c.setNodeMarkup(L, void 0, je));
1685
1710
  }
1686
1711
  return !1;
1687
1712
  }));
1688
- } else if (d.type === o && (u == null ? void 0 : u.type) === r) {
1689
- const p = { ...d.attrs };
1690
- let k = !1;
1691
- p.listType !== "ordered" && (p.listType = "ordered", k = !0), (u == null ? void 0 : u.maybeChild(0)) && (k = i(p, y)), k && (l = l.setNodeMarkup(m, void 0, p), c = !0);
1713
+ } else if (m.type === s && (u == null ? void 0 : u.type) === a) {
1714
+ const g = { ...m.attrs };
1715
+ let f = !1;
1716
+ g.listType !== "ordered" && (g.listType = "ordered", f = !0), (u == null ? void 0 : u.maybeChild(0)) && (f = i(g, k)), f && (c = c.setNodeMarkup(p, void 0, g), d = !0);
1692
1717
  }
1693
- }), c && e.dispatch(l.setMeta("addToHistory", !1));
1718
+ }), d && r.dispatch(c.setMeta("addToHistory", !1));
1694
1719
  };
1695
- return new T({
1696
- key: new B("MILKDOWN_KEEP_LIST_ORDER"),
1697
- view: (e) => (t(e), {
1698
- update: (r) => {
1699
- t(r);
1720
+ return new K({
1721
+ key: new T("MILKDOWN_KEEP_LIST_ORDER"),
1722
+ view: (r) => (e(r), {
1723
+ update: (a) => {
1724
+ e(a);
1700
1725
  }
1701
1726
  })
1702
1727
  });
1703
1728
  });
1704
- n(bt, {
1729
+ n(St, {
1705
1730
  displayName: "Prose<syncListOrderPlugin>",
1706
1731
  group: "Prose"
1707
1732
  });
1708
- const cr = [
1709
- P,
1710
- gt,
1711
- It,
1712
- We,
1713
- Ct,
1714
- Nt,
1715
- ht,
1716
- kt,
1733
+ const pr = [
1734
+ E,
1717
1735
  yt,
1718
- ft,
1736
+ bt,
1737
+ Ve,
1738
+ Lt,
1719
1739
  Mt,
1720
- bt
1721
- ], Lr = [qt, Wt, Ft, Gt, cr].flat();
1740
+ kt,
1741
+ Nt,
1742
+ ft,
1743
+ It,
1744
+ Ct,
1745
+ xt,
1746
+ St
1747
+ ], vr = [Gt, Vt, jt, zt, pr].flat();
1722
1748
  export {
1723
- ke as blockquoteAttr,
1724
- Ne as blockquoteKeymap,
1725
- E as blockquoteSchema,
1726
- Ae as bulletListAttr,
1727
- He as bulletListKeymap,
1728
- K as bulletListSchema,
1729
- Ie as codeBlockAttr,
1730
- Me as codeBlockKeymap,
1731
- _ as codeBlockSchema,
1732
- Ft as commands,
1733
- Lr as commonmark,
1734
- Ce as createCodeBlockCommand,
1735
- ot as createCodeBlockInputRule,
1736
- Qt as defaultConfig,
1737
- rt as docSchema,
1738
- he as downgradeHeadingCommand,
1739
- te as emphasisAttr,
1740
- ae as emphasisKeymap,
1741
- V as emphasisSchema,
1742
- xe as hardbreakAttr,
1743
- It as hardbreakClearMarkPlugin,
1744
- We as hardbreakFilterNodes,
1745
- Ct as hardbreakFilterPlugin,
1746
- Se as hardbreakKeymap,
1747
- x as hardbreakSchema,
1748
- ge as headingAttr,
1749
- z as headingIdGenerator,
1750
- ye as headingKeymap,
1751
- A as headingSchema,
1752
- we as hrAttr,
1753
- $ as hrSchema,
1754
- $e as htmlAttr,
1755
- qe as htmlSchema,
1756
- be as imageAttr,
1757
- O as imageSchema,
1758
- le as inlineCodeAttr,
1759
- ce as inlineCodeKeymap,
1760
- b as inlineCodeSchema,
1761
- Nt as inlineNodesCursorPlugin,
1762
- P as inlineSyncConfig,
1763
- gt as inlineSyncPlugin,
1764
- Wt as inputrules,
1765
- Le as insertHardbreakCommand,
1766
- ct as insertHrCommand,
1767
- it as insertHrInputRule,
1768
- st as insertImageCommand,
1769
- _t as insertImageInputRule,
1770
- Gt as keymap,
1771
- Ee as liftFirstListItemCommand,
1772
- Pe as liftListItemCommand,
1773
- de as linkAttr,
1774
- v as linkSchema,
1775
- Ke as listItemAttr,
1776
- _e as listItemKeymap,
1777
- C as listItemSchema,
1778
- Be as orderedListAttr,
1779
- Oe as orderedListKeymap,
1780
- D as orderedListSchema,
1781
- me as paragraphAttr,
1782
- pe as paragraphKeymap,
1783
- w as paragraphSchema,
1784
- cr as plugins,
1785
- ht as remarkAddOrderInListPlugin,
1786
- ft as remarkHtmlTransformer,
1787
- kt as remarkInlineLinkPlugin,
1788
- yt as remarkLineBreak,
1789
- qt as schema,
1790
- De as sinkListItemCommand,
1791
- Re as splitListItemCommand,
1792
- ne as strongAttr,
1793
- se as strongKeymap,
1794
- j as strongSchema,
1795
- Mt as syncHeadingIdPlugin,
1796
- bt as syncListOrderPlugin,
1797
- ut as textSchema,
1798
- re as toggleEmphasisCommand,
1799
- ie as toggleInlineCodeCommand,
1800
- et as toggleLinkCommand,
1801
- oe as toggleStrongCommand,
1802
- ue as turnIntoTextCommand,
1803
- Et as updateCodeBlockLanguageCommand,
1804
- lt as updateImageCommand,
1805
- tt as updateLinkCommand,
1806
- fe as wrapInBlockquoteCommand,
1807
- nt as wrapInBlockquoteInputRule,
1808
- ve as wrapInBulletListCommand,
1809
- dt as wrapInBulletListInputRule,
1810
- M as wrapInHeadingCommand,
1811
- at as wrapInHeadingInputRule,
1812
- Te as wrapInOrderedListCommand,
1813
- mt as wrapInOrderedListInputRule
1749
+ Ie as blockquoteAttr,
1750
+ Me as blockquoteKeymap,
1751
+ q as blockquoteSchema,
1752
+ Be as bulletListAttr,
1753
+ Te as bulletListKeymap,
1754
+ R as bulletListSchema,
1755
+ be as codeBlockAttr,
1756
+ xe as codeBlockKeymap,
1757
+ W as codeBlockSchema,
1758
+ jt as commands,
1759
+ vr as commonmark,
1760
+ Le as createCodeBlockCommand,
1761
+ lt as createCodeBlockInputRule,
1762
+ tr as defaultConfig,
1763
+ nt as docSchema,
1764
+ fe as downgradeHeadingCommand,
1765
+ ne as emphasisAttr,
1766
+ se as emphasisKeymap,
1767
+ z as emphasisSchema,
1768
+ we as hardbreakAttr,
1769
+ bt as hardbreakClearMarkPlugin,
1770
+ Ve as hardbreakFilterNodes,
1771
+ Lt as hardbreakFilterPlugin,
1772
+ ve as hardbreakKeymap,
1773
+ S as hardbreakSchema,
1774
+ ke as headingAttr,
1775
+ Y as headingIdGenerator,
1776
+ Ne as headingKeymap,
1777
+ H as headingSchema,
1778
+ He as hrAttr,
1779
+ F as hrSchema,
1780
+ Fe as htmlAttr,
1781
+ Ge as htmlSchema,
1782
+ Se as imageAttr,
1783
+ D as imageSchema,
1784
+ de as inlineCodeAttr,
1785
+ ue as inlineCodeKeymap,
1786
+ x as inlineCodeSchema,
1787
+ Mt as inlineNodesCursorPlugin,
1788
+ E as inlineSyncConfig,
1789
+ yt as inlineSyncPlugin,
1790
+ Vt as inputrules,
1791
+ Ae as insertHardbreakCommand,
1792
+ mt as insertHrCommand,
1793
+ dt as insertHrInputRule,
1794
+ it as insertImageCommand,
1795
+ Wt as insertImageInputRule,
1796
+ zt as keymap,
1797
+ qe as liftFirstListItemCommand,
1798
+ _e as liftListItemCommand,
1799
+ pe as linkAttr,
1800
+ B as linkSchema,
1801
+ Pe as listItemAttr,
1802
+ We as listItemKeymap,
1803
+ M as listItemSchema,
1804
+ Ke as orderedListAttr,
1805
+ Re as orderedListKeymap,
1806
+ P as orderedListSchema,
1807
+ ge as paragraphAttr,
1808
+ ye as paragraphKeymap,
1809
+ v as paragraphSchema,
1810
+ pr as plugins,
1811
+ kt as remarkAddOrderInListPlugin,
1812
+ It as remarkHtmlTransformer,
1813
+ Nt as remarkInlineLinkPlugin,
1814
+ ft as remarkLineBreak,
1815
+ Ct as remarkMarker,
1816
+ Gt as schema,
1817
+ Ee as sinkListItemCommand,
1818
+ $e as splitListItemCommand,
1819
+ le as strongAttr,
1820
+ ce as strongKeymap,
1821
+ U as strongSchema,
1822
+ xt as syncHeadingIdPlugin,
1823
+ St as syncListOrderPlugin,
1824
+ gt as textSchema,
1825
+ oe as toggleEmphasisCommand,
1826
+ me as toggleInlineCodeCommand,
1827
+ rt as toggleLinkCommand,
1828
+ ie as toggleStrongCommand,
1829
+ he as turnIntoTextCommand,
1830
+ qt as updateCodeBlockLanguageCommand,
1831
+ ct as updateImageCommand,
1832
+ at as updateLinkCommand,
1833
+ Ce as wrapInBlockquoteCommand,
1834
+ st as wrapInBlockquoteInputRule,
1835
+ Oe as wrapInBulletListCommand,
1836
+ ut as wrapInBulletListInputRule,
1837
+ b as wrapInHeadingCommand,
1838
+ ot as wrapInHeadingInputRule,
1839
+ De as wrapInOrderedListCommand,
1840
+ pt as wrapInOrderedListInputRule
1814
1841
  };
1815
1842
  //# sourceMappingURL=index.es.js.map