@milkdown/preset-commonmark 7.3.2 → 7.3.4

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