@milkdown/preset-commonmark 7.2.0 → 7.2.2

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