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