@milkdown/preset-commonmark 7.1.1 → 7.1.2-next.0

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