@milkdown/preset-commonmark 6.3.1 → 6.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.es.js CHANGED
@@ -1,16 +1,16 @@
1
- import { createMark as R, createShortcut as h, createNode as w, createPlugin as He, AtomList as Ne } from "@milkdown/utils";
2
- import { createCmdKey as I, createCmd as M, schemaCtx as A, commandsCtx as we, editorViewCtx as B, getPalette as Te } from "@milkdown/core";
3
- import { markRule as _, calculateTextPosition as Oe, cloneTr as Ae, findSelectedNodeOfType as K, getNodeFromSchema as Ee } from "@milkdown/prose";
4
- import { toggleMark as P, wrapIn as de, setBlockType as E } from "@milkdown/prose/commands";
5
- import { expectDomTypeError as D, missingRootElement as _e } from "@milkdown/exception";
6
- import { InputRule as me, wrappingInputRule as W, textblockTypeInputRule as G } from "@milkdown/prose/inputrules";
7
- import { PluginKey as T, TextSelection as pe, Plugin as H, NodeSelection as ve, Selection as Le } from "@milkdown/prose/state";
8
- import { Fragment as ge } from "@milkdown/prose/model";
9
- import { ReplaceStep as $e, AddMarkStep as Se } from "@milkdown/prose/transform";
10
- import { DecorationSet as O, Decoration as J } from "@milkdown/prose/view";
11
- import { splitListItem as Re, sinkListItem as Be, liftListItem as Pe } from "@milkdown/prose/schema-list";
12
- import We from "remark-inline-links";
13
- import { visit as qe } from "unist-util-visit";
1
+ import { createMark as B, createShortcut as h, createNode as L, createPlugin as De, AtomList as ye } from "@milkdown/utils";
2
+ import { createCmdKey as I, createCmd as M, schemaCtx as A, commandsCtx as Ne, editorViewCtx as P, getPalette as He } from "@milkdown/core";
3
+ import { markRule as _, calculateTextPosition as Te, cloneTr as Oe, findSelectedNodeOfType as F, getNodeFromSchema as Ae } from "@milkdown/prose";
4
+ import { toggleMark as W, wrapIn as de, setBlockType as E } from "@milkdown/prose/commands";
5
+ import { expectDomTypeError as D, missingRootElement as Ee } from "@milkdown/exception";
6
+ import { InputRule as me, wrappingInputRule as q, textblockTypeInputRule as J } from "@milkdown/prose/inputrules";
7
+ import { PluginKey as T, TextSelection as ge, Plugin as H, NodeSelection as _e, Selection as Le } from "@milkdown/prose/state";
8
+ import { Fragment as R } from "@milkdown/prose/model";
9
+ import { ReplaceStep as ve, AddMarkStep as $e } from "@milkdown/prose/transform";
10
+ import { DecorationSet as O, Decoration as Q } from "@milkdown/prose/view";
11
+ import { splitListItem as Se, sinkListItem as Re, liftListItem as Be } from "@milkdown/prose/schema-list";
12
+ import Pe from "remark-inline-links";
13
+ import { visit as We } from "unist-util-visit";
14
14
  const k = {
15
15
  HardBreak: "HardBreak",
16
16
  Blockquote: "Blockquote",
@@ -31,14 +31,14 @@ const k = {
31
31
  NextListItem: "NextListItem",
32
32
  SinkListItem: "SinkListItem",
33
33
  LiftListItem: "LiftListItem"
34
- }, he = "code_inline", Q = I("ToggleInlineCode"), Ke = R((c) => ({
35
- id: he,
34
+ }, pe = "code_inline", X = I("ToggleInlineCode"), qe = B((i) => ({
35
+ id: pe,
36
36
  schema: () => ({
37
37
  priority: 100,
38
38
  code: !0,
39
39
  inclusive: !1,
40
40
  parseDOM: [{ tag: "code" }],
41
- toDOM: (e) => ["code", { class: c.getClassName(e.attrs, "code-inline") }],
41
+ toDOM: (e) => ["code", { class: i.getClassName(e.attrs, "code-inline") }],
42
42
  parseMarkdown: {
43
43
  match: (e) => e.type === "inlineCode",
44
44
  runner: (e, t, r) => {
@@ -46,26 +46,26 @@ const k = {
46
46
  }
47
47
  },
48
48
  toMarkdown: {
49
- match: (e) => e.type.name === he,
49
+ match: (e) => e.type.name === pe,
50
50
  runner: (e, t, r) => {
51
51
  e.withMark(t, "inlineCode", r.text || "");
52
52
  }
53
53
  }
54
54
  }),
55
55
  inputRules: (e) => [_(/(?:^|[^`])(`([^`]+)`)$/, e)],
56
- commands: (e) => [M(Q, () => P(e))],
56
+ commands: (e) => [M(X, () => W(e))],
57
57
  shortcuts: {
58
- [k.CodeInline]: h(Q, "Mod-e")
58
+ [k.CodeInline]: h(X, "Mod-e")
59
59
  }
60
- })), F = "em", X = I("ToggleItalic"), Fe = R((c) => ({
61
- id: F,
60
+ })), U = "em", Y = I("ToggleItalic"), Ke = B((i) => ({
61
+ id: U,
62
62
  schema: () => ({
63
63
  parseDOM: [
64
64
  { tag: "i" },
65
65
  { tag: "em" },
66
66
  { style: "font-style", getAttrs: (e) => e === "italic" }
67
67
  ],
68
- toDOM: (e) => ["em", { class: c.getClassName(e.attrs, F) }],
68
+ toDOM: (e) => ["em", { class: i.getClassName(e.attrs, U) }],
69
69
  parseMarkdown: {
70
70
  match: (e) => e.type === "emphasis",
71
71
  runner: (e, t, r) => {
@@ -73,7 +73,7 @@ const k = {
73
73
  }
74
74
  },
75
75
  toMarkdown: {
76
- match: (e) => e.type.name === F,
76
+ match: (e) => e.type.name === U,
77
77
  runner: (e, t) => {
78
78
  e.withMark(t, "emphasis");
79
79
  }
@@ -83,11 +83,11 @@ const k = {
83
83
  _(/(?:^|[^_])(_([^_]+)_)$/, e),
84
84
  _(/(?:^|[^*])(\*([^*]+)\*)$/, e)
85
85
  ],
86
- commands: (e) => [M(X, () => P(e))],
86
+ commands: (e) => [M(Y, () => W(e))],
87
87
  shortcuts: {
88
- [k.Em]: h(X, "Mod-i")
88
+ [k.Em]: h(Y, "Mod-i")
89
89
  }
90
- })), Ue = new T("MILKDOWN_LINK_INPUT"), xe = I("ToggleLink"), Y = I("ModifyLink"), v = "link", Ve = R((c, e) => ({
90
+ })), Fe = new T("MILKDOWN_LINK_INPUT"), we = I("ToggleLink"), Z = I("ModifyLink"), v = "link", Ue = B((i, e) => ({
91
91
  id: v,
92
92
  schema: () => ({
93
93
  attrs: {
@@ -105,12 +105,12 @@ const k = {
105
105
  }
106
106
  }
107
107
  ],
108
- toDOM: (t) => ["a", { ...t.attrs, class: c.getClassName(t.attrs, v) }],
108
+ toDOM: (t) => ["a", { ...t.attrs, class: i.getClassName(t.attrs, v) }],
109
109
  parseMarkdown: {
110
110
  match: (t) => t.type === "link",
111
111
  runner: (t, r, n) => {
112
- const o = r.url, a = r.title;
113
- t.openMark(n, { href: o, title: a }), t.next(r.children), t.closeMark(n);
112
+ const s = r.url, a = r.title;
113
+ t.openMark(n, { href: s, title: a }), t.next(r.children), t.closeMark(n);
114
114
  }
115
115
  },
116
116
  toMarkdown: {
@@ -124,33 +124,33 @@ const k = {
124
124
  }
125
125
  }),
126
126
  commands: (t) => [
127
- M(xe, (r = "") => P(t, { href: r })),
128
- M(Y, (r = "") => (n, o) => {
127
+ M(we, (r = "") => W(t, { href: r })),
128
+ M(Z, (r = "") => (n, s) => {
129
129
  var y;
130
- if (!o)
130
+ if (!s)
131
131
  return !1;
132
132
  const { marks: a } = n.schema;
133
- let s, l = -1;
134
- const { selection: i } = n, { from: u, to: g } = i;
135
- if (n.doc.nodesBetween(u, u === g ? g + 1 : g, (N, x) => {
136
- var L;
137
- if ((L = a.link) != null && L.isInSet(N.marks))
138
- return s = N, l = x, !1;
139
- }), !s)
133
+ let o, l = -1;
134
+ const { selection: c } = n, { from: u, to: f } = c;
135
+ if (n.doc.nodesBetween(u, u === f ? f + 1 : f, (N, x) => {
136
+ var w;
137
+ if ((w = a.link) != null && w.isInSet(N.marks))
138
+ return o = N, l = x, !1;
139
+ }), !o)
140
140
  return !1;
141
- const d = s.marks.find(({ type: N }) => N === t);
141
+ const d = o.marks.find(({ type: N }) => N === t);
142
142
  if (!d)
143
143
  return !1;
144
- const m = l, f = l + s.nodeSize, { tr: p } = n, b = (y = a.link) == null ? void 0 : y.create({ ...d.attrs, href: r });
145
- return b ? (o(p.removeMark(m, f, d).addMark(m, f, b).setSelection(new pe(p.selection.$anchor)).scrollIntoView()), !0) : !1;
144
+ const m = l, g = l + o.nodeSize, { tr: p } = n, b = (y = a.link) == null ? void 0 : y.create({ ...d.attrs, href: r });
145
+ return b ? (s(p.removeMark(m, g, d).addMark(m, g, b).setSelection(new ge(p.selection.$anchor)).scrollIntoView()), !0) : !1;
146
146
  })
147
147
  ],
148
148
  inputRules: (t, r) => [
149
- new me(/\[(?<text>.*?)]\((?<href>.*?)(?=“|\))"?(?<title>[^"]+)?"?\)/, (n, o, a, s) => {
150
- const [l, i = "", u, g] = o, { tr: d } = n;
149
+ new me(/\[(?<text>.*?)]\((?<href>.*?)(?=“|\))"?(?<title>[^"]+)?"?\)/, (n, s, a, o) => {
150
+ const [l, c = "", u, f] = s, { tr: d } = n;
151
151
  if (l) {
152
- const m = i || "link";
153
- d.replaceWith(a, s, r.get(A).text(m)).addMark(a, m.length + a, t.create({ title: g, href: u }));
152
+ const m = c || "link";
153
+ d.replaceWith(a, o, r.get(A).text(m)).addMark(a, m.length + a, t.create({ title: f, href: u }));
154
154
  }
155
155
  return d;
156
156
  })
@@ -159,60 +159,60 @@ const k = {
159
159
  let n = !1;
160
160
  return [
161
161
  new H({
162
- key: Ue,
163
- view: (o) => {
164
- var u, g, d;
165
- const a = c.themeManager.get("input-chip", {
166
- placeholder: (g = (u = e == null ? void 0 : e.input) == null ? void 0 : u.placeholder) != null ? g : "Input Web Link",
162
+ key: Fe,
163
+ view: (s) => {
164
+ var u, f, d;
165
+ const a = i.themeManager.get("input-chip", {
166
+ placeholder: (f = (u = e == null ? void 0 : e.input) == null ? void 0 : u.placeholder) != null ? f : "Input Web Link",
167
167
  buttonText: (d = e == null ? void 0 : e.input) == null ? void 0 : d.buttonText,
168
168
  onUpdate: (m) => {
169
- r.get(we).call(Y, m);
169
+ r.get(Ne).call(Z, m);
170
170
  },
171
- calculatePosition: (m, f) => {
172
- Oe(m, f, (p, b, y, N) => {
171
+ calculatePosition: (m, g) => {
172
+ Te(m, g, (p, b, y, N) => {
173
173
  const x = m.dom.parentElement;
174
174
  if (!x)
175
- throw _e();
176
- const L = b.left - p.left;
177
- let q = p.left - N.left - (y.width - L) / 2, fe = p.bottom - N.top + 14 + x.scrollTop;
178
- return n && (fe = p.top - N.top - y.height - 14 + x.scrollTop), q < 0 && (q = 0), [fe, q];
175
+ throw Ee();
176
+ const w = b.left - p.left;
177
+ let K = p.left - N.left - (y.width - w) / 2, fe = p.bottom - N.top + 14 + x.scrollTop;
178
+ return n && (fe = p.top - N.top - y.height - 14 + x.scrollTop), K < 0 && (K = 0), [fe, K];
179
179
  });
180
180
  }
181
181
  });
182
182
  if (!a)
183
183
  return {};
184
- const s = (m) => {
185
- const { selection: f, doc: p } = m.state, { from: b, to: y } = f;
184
+ const o = (m) => {
185
+ const { selection: g, doc: p } = m.state, { from: b, to: y } = g;
186
186
  if (!m.hasFocus())
187
187
  return !1;
188
- if (f.empty && f instanceof pe && y < p.content.size && b < p.content.size && p.rangeHasMark(b, b === y ? y + 1 : y, t))
188
+ if (g.empty && g instanceof ge && y < p.content.size && b < p.content.size && p.rangeHasMark(b, b === y ? y + 1 : y, t))
189
189
  return n = !1, !0;
190
- if (f instanceof ve) {
191
- const { node: N } = f;
190
+ if (g instanceof _e) {
191
+ const { node: N } = g;
192
192
  if (N.type.name === "image" && N.marks.findIndex((x) => x.type.name === v) > -1)
193
193
  return n = !0, !0;
194
194
  }
195
195
  return !1;
196
196
  }, l = (m) => {
197
- const { selection: f } = m.state;
197
+ const { selection: g } = m.state;
198
198
  let p;
199
- const { from: b, to: y } = f;
200
- if (m.state.doc.nodesBetween(b, b === y ? y + 1 : y, (L) => {
201
- if (t.isInSet(L.marks))
202
- return p = L, !1;
199
+ const { from: b, to: y } = g;
200
+ if (m.state.doc.nodesBetween(b, b === y ? y + 1 : y, (w) => {
201
+ if (t.isInSet(w.marks))
202
+ return p = w, !1;
203
203
  }), !p)
204
204
  return;
205
- const N = p.marks.find((L) => L.type === t);
205
+ const N = p.marks.find((w) => w.type === t);
206
206
  return N ? N.attrs.href : void 0;
207
- }, i = (m) => {
207
+ }, c = (m) => {
208
208
  if (!m.editable)
209
209
  return;
210
- s(m) ? (a.show(m), a.update(l(m))) : a.hide();
210
+ o(m) ? (a.show(m), a.update(l(m))) : a.hide();
211
211
  };
212
- return a.init(o), i(o), {
213
- update: (m, f) => {
214
- (f == null ? void 0 : f.doc.eq(m.state.doc)) && f.selection.eq(m.state.selection) || requestAnimationFrame(() => {
215
- i(m);
212
+ return a.init(s), c(s), {
213
+ update: (m, g) => {
214
+ (g == null ? void 0 : g.doc.eq(m.state.doc)) && g.selection.eq(m.state.selection) || requestAnimationFrame(() => {
215
+ c(m);
216
216
  });
217
217
  },
218
218
  destroy: () => {
@@ -223,15 +223,15 @@ const k = {
223
223
  })
224
224
  ];
225
225
  }
226
- })), U = "strong", Z = I("ToggleBold"), je = R((c) => ({
227
- id: U,
226
+ })), V = "strong", ee = I("ToggleBold"), Ve = B((i) => ({
227
+ id: V,
228
228
  schema: () => ({
229
229
  parseDOM: [
230
230
  { tag: "b" },
231
231
  { tag: "strong" },
232
232
  { style: "font-style", getAttrs: (e) => e === "bold" }
233
233
  ],
234
- toDOM: (e) => ["strong", { class: c.getClassName(e.attrs, U) }],
234
+ toDOM: (e) => ["strong", { class: i.getClassName(e.attrs, V) }],
235
235
  parseMarkdown: {
236
236
  match: (e) => e.type === "strong",
237
237
  runner: (e, t, r) => {
@@ -239,7 +239,7 @@ const k = {
239
239
  }
240
240
  },
241
241
  toMarkdown: {
242
- match: (e) => e.type.name === U,
242
+ match: (e) => e.type.name === V,
243
243
  runner: (e, t) => {
244
244
  e.withMark(t, "strong");
245
245
  }
@@ -249,18 +249,18 @@ const k = {
249
249
  _(/(?:__)([^_]+)(?:__)$/, e),
250
250
  _(/(?:\*\*)([^*]+)(?:\*\*)$/, e)
251
251
  ],
252
- commands: (e) => [M(Z, () => P(e))],
252
+ commands: (e) => [M(ee, () => W(e))],
253
253
  shortcuts: {
254
- [k.Bold]: h(Z, "Mod-b")
254
+ [k.Bold]: h(ee, "Mod-b")
255
255
  }
256
- })), ze = [Ke(), Fe(), je(), Ve()], $ = "blockquote", ee = I("WrapInBlockquote"), Ge = w((c) => ({
256
+ })), je = [qe(), Ke(), Ve(), Ue()], $ = "blockquote", te = I("WrapInBlockquote"), ze = L((i) => ({
257
257
  id: $,
258
258
  schema: () => ({
259
259
  content: "block+",
260
260
  group: "block",
261
261
  defining: !0,
262
262
  parseDOM: [{ tag: "blockquote" }],
263
- toDOM: (e) => ["blockquote", { class: c.getClassName(e.attrs, $) }, 0],
263
+ toDOM: (e) => ["blockquote", { class: i.getClassName(e.attrs, $) }, 0],
264
264
  parseMarkdown: {
265
265
  match: ({ type: e }) => e === $,
266
266
  runner: (e, t, r) => {
@@ -274,12 +274,12 @@ const k = {
274
274
  }
275
275
  }
276
276
  }),
277
- inputRules: (e) => [W(/^\s*>\s$/, e)],
278
- commands: (e) => [M(ee, () => de(e))],
277
+ inputRules: (e) => [q(/^\s*>\s$/, e)],
278
+ commands: (e) => [M(te, () => de(e))],
279
279
  shortcuts: {
280
- [k.Blockquote]: h(ee, "Mod-Shift-b")
280
+ [k.Blockquote]: h(te, "Mod-Shift-b")
281
281
  }
282
- })), te = I("WrapInBulletList"), Je = w((c) => {
282
+ })), re = I("WrapInBulletList"), Ge = L((i) => {
283
283
  const e = "bullet_list";
284
284
  return {
285
285
  id: e,
@@ -287,7 +287,7 @@ const k = {
287
287
  content: "listItem+",
288
288
  group: "block",
289
289
  parseDOM: [{ tag: "ul" }],
290
- toDOM: (t) => ["ul", { class: c.getClassName(t.attrs, "bullet-list") }, 0],
290
+ toDOM: (t) => ["ul", { class: i.getClassName(t.attrs, "bullet-list") }, 0],
291
291
  parseMarkdown: {
292
292
  match: ({ type: t, ordered: r }) => t === "list" && !r,
293
293
  runner: (t, r, n) => {
@@ -301,13 +301,13 @@ const k = {
301
301
  }
302
302
  }
303
303
  }),
304
- inputRules: (t) => [W(/^\s*([-+*])\s$/, t)],
305
- commands: (t) => [M(te, () => de(t))],
304
+ inputRules: (t) => [q(/^\s*([-+*])\s$/, t)],
305
+ commands: (t) => [M(re, () => de(t))],
306
306
  shortcuts: {
307
- [k.BulletList]: h(te, "Mod-Alt-8")
307
+ [k.BulletList]: h(re, "Mod-Alt-8")
308
308
  }
309
309
  };
310
- }), Qe = [
310
+ }), Je = [
311
311
  "",
312
312
  "javascript",
313
313
  "typescript",
@@ -324,10 +324,10 @@ const k = {
324
324
  "go",
325
325
  "rust",
326
326
  "markdown"
327
- ], Xe = /^```(?<language>[a-z]*)?[\s\n]$/, Ye = /^~~~(?<language>[a-z]*)?[\s\n]$/, re = I("TurnIntoCodeFence"), V = "fence", Ze = w((c, e) => {
328
- const t = (e == null ? void 0 : e.languageList) || Qe;
327
+ ], Qe = /^```(?<language>[a-z]*)?[\s\n]$/, Xe = /^~~~(?<language>[a-z]*)?[\s\n]$/, ne = I("TurnIntoCodeFence"), j = "fence", Ye = L((i, e) => {
328
+ const t = (e == null ? void 0 : e.languageList) || Je;
329
329
  return {
330
- id: V,
330
+ id: j,
331
331
  schema: (r) => ({
332
332
  content: "text*",
333
333
  group: "block",
@@ -347,17 +347,20 @@ const k = {
347
347
  tag: "div.code-fence-container",
348
348
  preserveWhitespace: "full",
349
349
  getAttrs: (n) => {
350
- var o;
350
+ var s;
351
351
  if (!(n instanceof HTMLElement))
352
352
  throw D(n);
353
- return { language: (o = n.querySelector("pre")) == null ? void 0 : o.dataset.language };
353
+ return { language: (s = n.querySelector("pre")) == null ? void 0 : s.dataset.language };
354
354
  },
355
- getContent: (n, o) => {
356
- var s, l;
355
+ getContent: (n, s) => {
356
+ var l, c;
357
357
  if (!(n instanceof HTMLElement))
358
358
  throw D(n);
359
- const a = o.text((l = (s = n.querySelector("pre")) == null ? void 0 : s.textContent) != null ? l : "");
360
- return ge.from(a);
359
+ const a = (c = (l = n.querySelector("pre")) == null ? void 0 : l.textContent) != null ? c : "";
360
+ if (!a)
361
+ return R.empty;
362
+ const o = s.text(a);
363
+ return R.from(o);
361
364
  }
362
365
  },
363
366
  {
@@ -371,38 +374,38 @@ const k = {
371
374
  }
372
375
  ],
373
376
  toDOM: (n) => {
374
- const o = document.createElement("select");
377
+ const s = document.createElement("select");
375
378
  return t.forEach((a) => {
376
- const s = document.createElement("option");
377
- s.value = a, s.innerText = a || "--", a === n.attrs.language && (s.selected = !0), o.appendChild(s);
378
- }), o.onchange = (a) => {
379
- const s = a.target;
380
- if (!(s instanceof HTMLSelectElement))
379
+ const o = document.createElement("option");
380
+ o.value = a, o.innerText = a || "--", a === n.attrs.language && (o.selected = !0), s.appendChild(o);
381
+ }), s.onchange = (a) => {
382
+ const o = a.target;
383
+ if (!(o instanceof HTMLSelectElement))
381
384
  return;
382
- const l = r.get(B);
385
+ const l = r.get(P);
383
386
  if (!l.editable) {
384
- s.value = n.attrs.language;
387
+ o.value = n.attrs.language;
385
388
  return;
386
389
  }
387
- const { top: i, left: u } = s.getBoundingClientRect(), g = l.posAtCoords({ top: i, left: u });
388
- if (!g)
390
+ const { top: c, left: u } = o.getBoundingClientRect(), f = l.posAtCoords({ top: c, left: u });
391
+ if (!f)
389
392
  return;
390
393
  const { tr: d } = l.state;
391
- l.dispatch(d.setNodeMarkup(g.inside, void 0, {
394
+ l.dispatch(d.setNodeMarkup(f.inside, void 0, {
392
395
  ...n.attrs,
393
- language: s.value
396
+ language: o.value
394
397
  }));
395
398
  }, [
396
399
  "div",
397
400
  {
398
401
  class: "code-fence-container"
399
402
  },
400
- o,
403
+ s,
401
404
  [
402
405
  "pre",
403
406
  {
404
407
  "data-language": n.attrs.language,
405
- class: c.getClassName(n.attrs, "code-fence")
408
+ class: i.getClassName(n.attrs, "code-fence")
406
409
  },
407
410
  ["code", { spellCheck: "false" }, 0]
408
411
  ]
@@ -410,93 +413,93 @@ const k = {
410
413
  },
411
414
  parseMarkdown: {
412
415
  match: ({ type: n }) => n === "code",
413
- runner: (n, o, a) => {
414
- const s = o.lang, l = o.value;
415
- n.openNode(a, { language: s }), l && n.addText(l), n.closeNode();
416
+ runner: (n, s, a) => {
417
+ const o = s.lang, l = s.value;
418
+ n.openNode(a, { language: o }), l && n.addText(l), n.closeNode();
416
419
  }
417
420
  },
418
421
  toMarkdown: {
419
- match: (n) => n.type.name === V,
420
- runner: (n, o) => {
422
+ match: (n) => n.type.name === j,
423
+ runner: (n, s) => {
421
424
  var a;
422
- n.addNode("code", void 0, ((a = o.content.firstChild) == null ? void 0 : a.text) || "", {
423
- lang: o.attrs.language
425
+ n.addNode("code", void 0, ((a = s.content.firstChild) == null ? void 0 : a.text) || "", {
426
+ lang: s.attrs.language
424
427
  });
425
428
  }
426
429
  }
427
430
  }),
428
431
  inputRules: (r) => [
429
- G(Xe, r, (n) => {
430
- const [o, a] = n;
431
- if (!!o)
432
+ J(Qe, r, (n) => {
433
+ const [s, a] = n;
434
+ if (!!s)
432
435
  return { language: a };
433
436
  }),
434
- G(Ye, r, (n) => {
435
- const [o, a] = n;
436
- if (!!o)
437
+ J(Xe, r, (n) => {
438
+ const [s, a] = n;
439
+ if (!!s)
437
440
  return { language: a };
438
441
  })
439
442
  ],
440
- commands: (r) => [M(re, () => E(r))],
443
+ commands: (r) => [M(ne, () => E(r))],
441
444
  shortcuts: {
442
- [k.CodeFence]: h(re, "Mod-Alt-c")
445
+ [k.CodeFence]: h(ne, "Mod-Alt-c")
443
446
  },
444
- view: () => (r, n, o) => {
447
+ view: () => (r, n, s) => {
445
448
  let a = r;
446
- const s = (p) => {
449
+ const o = (p) => {
447
450
  const { tr: b } = n.state;
448
- n.dispatch(b.setNodeMarkup(o(), void 0, {
451
+ n.dispatch(b.setNodeMarkup(s(), void 0, {
449
452
  fold: !0,
450
453
  language: p
451
454
  }));
452
455
  }, l = () => {
453
456
  const { tr: p } = n.state;
454
- n.dispatch(p.setNodeMarkup(o(), void 0, {
457
+ n.dispatch(p.setNodeMarkup(s(), void 0, {
455
458
  ...a.attrs,
456
459
  fold: !0
457
460
  }));
458
- }, i = () => {
461
+ }, c = () => {
459
462
  const { tr: p } = n.state;
460
- n.dispatch(p.setNodeMarkup(o(), void 0, {
463
+ n.dispatch(p.setNodeMarkup(s(), void 0, {
461
464
  ...a.attrs,
462
465
  fold: !1
463
466
  }));
464
- }, u = c.themeManager.get("code-fence", {
467
+ }, u = i.themeManager.get("code-fence", {
465
468
  onBlur: l,
466
- onFocus: i,
467
- onSelectLanguage: s,
469
+ onFocus: c,
470
+ onSelectLanguage: o,
468
471
  editable: () => n.editable,
469
472
  languageList: t
470
473
  });
471
474
  if (!u)
472
475
  return {};
473
- const { dom: g, contentDOM: d, onUpdate: m, onDestroy: f } = u;
476
+ const { dom: f, contentDOM: d, onUpdate: m, onDestroy: g } = u;
474
477
  return m(a), {
475
- dom: g,
478
+ dom: f,
476
479
  contentDOM: d,
477
- update: (p) => p.type.name !== V ? !1 : (a = p, m(a), !0),
478
- destroy: f
480
+ update: (p) => p.type.name !== j ? !1 : (a = p, m(a), !0),
481
+ destroy: g
479
482
  };
480
483
  }
481
484
  };
482
- }), et = w(() => ({
485
+ }), Ze = L(() => ({
483
486
  id: "doc",
484
487
  schema: () => ({
485
488
  content: "block+",
486
489
  parseMarkdown: {
487
- match: ({ type: c }) => c === "root",
488
- runner: (c, e, t) => {
489
- c.injectRoot(e, t);
490
+ match: ({ type: i }) => i === "root",
491
+ runner: (i, e, t) => {
492
+ i.injectRoot(e, t);
490
493
  }
491
494
  },
492
495
  toMarkdown: {
493
- match: (c) => c.type.name === "doc",
494
- runner: (c, e) => {
495
- c.openNode("root"), c.next(e.content);
496
+ match: (i) => i.type.name === "doc",
497
+ runner: (i, e) => {
498
+ i.openNode("root"), i.next(e.content);
496
499
  }
497
500
  }
498
501
  })
499
- })), ne = I("InsertHardbreak"), tt = new T("MILKDOWN_HARDBREAK_FILTER"), rt = w((c, e) => {
502
+ })), se = I("InsertHardbreak"), et = new T("MILKDOWN_HARDBREAK_FILTER"), tt = L((i, e) => {
500
503
  var r;
501
504
  const t = (r = e == null ? void 0 : e.notIn) != null ? r : ["table", "fence"];
502
505
  return {
@@ -506,10 +509,10 @@ const k = {
506
509
  group: "inline",
507
510
  selectable: !1,
508
511
  parseDOM: [{ tag: "br" }],
509
- toDOM: (n) => ["br", { class: c.getClassName(n.attrs, "hardbreak") }],
512
+ toDOM: (n) => ["br", { class: i.getClassName(n.attrs, "hardbreak") }],
510
513
  parseMarkdown: {
511
514
  match: ({ type: n }) => n === "break",
512
- runner: (n, o, a) => {
515
+ runner: (n, s, a) => {
513
516
  n.addNode(a);
514
517
  }
515
518
  },
@@ -521,30 +524,30 @@ const k = {
521
524
  }
522
525
  }),
523
526
  commands: (n) => [
524
- M(ne, () => (o, a) => {
525
- var i;
526
- const { selection: s, tr: l } = o;
527
- if (s.empty) {
528
- const u = s.$from.node();
529
- if (u.childCount > 0 && ((i = u.lastChild) == null ? void 0 : i.type.name) === "hardbreak")
530
- return a == null || a(l.replaceRangeWith(s.to - 1, s.to, o.schema.node("paragraph")).setSelection(Le.near(l.doc.resolve(s.to))).scrollIntoView()), !0;
527
+ M(se, () => (s, a) => {
528
+ var c;
529
+ const { selection: o, tr: l } = s;
530
+ if (o.empty) {
531
+ const u = o.$from.node();
532
+ if (u.childCount > 0 && ((c = u.lastChild) == null ? void 0 : c.type.name) === "hardbreak")
533
+ return a == null || a(l.replaceRangeWith(o.to - 1, o.to, s.schema.node("paragraph")).setSelection(Le.near(l.doc.resolve(o.to))).scrollIntoView()), !0;
531
534
  }
532
535
  return a == null || a(l.setMeta("hardbreak", !0).replaceSelectionWith(n.create()).scrollIntoView()), !0;
533
536
  })
534
537
  ],
535
538
  shortcuts: {
536
- [k.HardBreak]: h(ne, "Shift-Enter")
539
+ [k.HardBreak]: h(se, "Shift-Enter")
537
540
  },
538
541
  prosePlugins: (n) => [
539
542
  new H({
540
- key: tt,
541
- filterTransaction: (o, a) => {
542
- const s = o.getMeta("hardbreak"), [l] = o.steps;
543
- if (s && l) {
544
- const { from: i } = l, u = a.doc.resolve(i);
545
- let g = u.depth, d = !0;
546
- for (; g > 0; )
547
- t.includes(u.node(g).type.name) && (d = !1), g--;
543
+ key: et,
544
+ filterTransaction: (s, a) => {
545
+ const o = s.getMeta("hardbreak"), [l] = s.steps;
546
+ if (o && l) {
547
+ const { from: c } = l, u = a.doc.resolve(c);
548
+ let f = u.depth, d = !0;
549
+ for (; f > 0; )
550
+ t.includes(u.node(f).type.name) && (d = !1), f--;
548
551
  return d;
549
552
  }
550
553
  return !0;
@@ -552,23 +555,23 @@ const k = {
552
555
  }),
553
556
  new H({
554
557
  key: new T("MILKDOWN_HARDBREAK_MARKS"),
555
- appendTransaction: (o, a, s) => {
556
- if (!o.length)
558
+ appendTransaction: (s, a, o) => {
559
+ if (!s.length)
557
560
  return;
558
- const [l] = o;
561
+ const [l] = s;
559
562
  if (!l)
560
563
  return;
561
- const [i] = l.steps;
564
+ const [c] = l.steps;
562
565
  if (l.getMeta("hardbreak")) {
563
- if (!(i instanceof $e))
566
+ if (!(c instanceof ve))
564
567
  return;
565
- const { from: d } = i;
566
- return s.tr.setNodeMarkup(d, n, void 0, []);
568
+ const { from: d } = c;
569
+ return o.tr.setNodeMarkup(d, n, void 0, []);
567
570
  }
568
- if (i instanceof Se) {
569
- let d = s.tr;
570
- const { from: m, to: f } = i;
571
- return s.doc.nodesBetween(m, f, (p, b) => {
571
+ if (c instanceof $e) {
572
+ let d = o.tr;
573
+ const { from: m, to: g } = c;
574
+ return o.doc.nodesBetween(m, g, (p, b) => {
572
575
  p.type === n && (d = d.setNodeMarkup(b, n, void 0, []));
573
576
  }), d;
574
577
  }
@@ -576,83 +579,83 @@ const k = {
576
579
  })
577
580
  ]
578
581
  };
579
- }), ke = Array(6).fill(0).map((c, e) => e + 1), C = I("TurnIntoHeading"), Me = I("DowngradeHeading"), j = new T("MILKDOWN_HEADING_ID"), nt = new T("MILKDOWN_HEADING_HASH"), st = (c) => c.textContent.replace(/[\p{P}\p{S}]/gu, "").replace(/\s/g, "-").toLowerCase().trim(), ot = (c, e, t) => {
582
+ }), he = Array(6).fill(0).map((i, e) => e + 1), C = I("TurnIntoHeading"), ke = I("DowngradeHeading"), z = new T("MILKDOWN_HEADING_ID"), rt = new T("MILKDOWN_HEADING_HASH"), nt = (i) => i.textContent.replace(/[\p{P}\p{S}]/gu, "").replace(/\s/g, "-").toLowerCase().trim(), st = (i, e, t) => {
580
583
  let r = !1;
581
- const n = (o, a) => {
582
- const s = o.tr;
583
- o.doc.descendants((l, i) => {
584
+ const n = (s, a) => {
585
+ const o = s.tr;
586
+ s.doc.descendants((l, c) => {
584
587
  if (l.type === e && !r) {
585
588
  if (l.textContent.trim().length === 0)
586
589
  return;
587
- const u = l.attrs, g = t(l);
588
- u.id !== g && s.setMeta(j, !0).setNodeMarkup(i, void 0, {
590
+ const u = l.attrs, f = t(l);
591
+ u.id !== f && o.setMeta(z, !0).setNodeMarkup(c, void 0, {
589
592
  ...u,
590
- id: g
593
+ id: f
591
594
  });
592
595
  }
593
- }), a(s);
596
+ }), a(o);
594
597
  };
595
598
  return new H({
596
- key: j,
599
+ key: z,
597
600
  props: {
598
601
  handleDOMEvents: {
599
602
  compositionstart: () => (r = !0, !1),
600
603
  compositionend: () => {
601
604
  r = !1;
602
- const o = c.get(B);
605
+ const s = i.get(P);
603
606
  return setTimeout(() => {
604
- n(o.state, (a) => o.dispatch(a));
607
+ n(s.state, (a) => s.dispatch(a));
605
608
  }, 0), !1;
606
609
  }
607
610
  }
608
611
  },
609
- appendTransaction: (o, a, s) => {
612
+ appendTransaction: (s, a, o) => {
610
613
  let l = null;
611
- return o.every((i) => !i.getMeta(j)) && o.some((i) => i.docChanged) && n(s, (i) => {
612
- l = i;
614
+ return s.every((c) => !c.getMeta(z)) && s.some((c) => c.docChanged) && n(o, (c) => {
615
+ l = c;
613
616
  }), l;
614
617
  },
615
- view: (o) => {
616
- const a = o.state.doc;
617
- let s = o.state.tr;
618
- return a.descendants((l, i) => {
619
- l.type.name === "heading" && l.attrs.level && (l.attrs.id || (s = s.setNodeMarkup(i, void 0, {
618
+ view: (s) => {
619
+ const a = s.state.doc;
620
+ let o = s.state.tr;
621
+ return a.descendants((l, c) => {
622
+ l.type.name === "heading" && l.attrs.level && (l.attrs.id || (o = o.setNodeMarkup(c, void 0, {
620
623
  ...l.attrs,
621
624
  id: t(l)
622
625
  })));
623
- }), o.dispatch(s), {};
626
+ }), s.dispatch(o), {};
624
627
  }
625
628
  });
626
- }, at = (c, e, t) => new H({
627
- key: nt,
629
+ }, ot = (i, e, t) => new H({
630
+ key: rt,
628
631
  state: {
629
632
  init: () => O.empty,
630
633
  apply: (r) => {
631
- const n = c.get(B);
634
+ const n = i.get(P);
632
635
  if (!n.hasFocus || !n.editable)
633
636
  return O.empty;
634
- const { $from: o } = r.selection, a = o.node();
637
+ const { $from: s } = r.selection, a = s.node();
635
638
  if (a.type !== e)
636
639
  return O.empty;
637
- const s = a.attrs.level, l = (g) => Array(g).fill(0).map((d) => "#").join(""), i = document.createElement("span");
638
- i.textContent = l(s), i.contentEditable = "false", t.themeManager.onFlush(() => {
639
- const g = t.getStyle(({ css: d }) => {
640
- const m = Te(t.themeManager);
640
+ const o = a.attrs.level, l = (f) => Array(f).fill(0).map((d) => "#").join(""), c = document.createElement("span");
641
+ c.textContent = l(o), c.contentEditable = "false", t.themeManager.onFlush(() => {
642
+ const f = t.getStyle(({ css: d }) => {
643
+ const m = He(t.themeManager);
641
644
  return d`
642
645
  margin-right: 4px;
643
646
  color: ${m("primary")};
644
647
  `;
645
648
  });
646
- g && (i.className = g);
649
+ f && (c.className = f);
647
650
  });
648
- const u = J.widget(o.before() + 1, i, { side: -1 });
651
+ const u = Q.widget(s.before() + 1, c, { side: -1 });
649
652
  return O.create(r.doc, [u]);
650
653
  }
651
654
  },
652
655
  props: {
653
656
  handleDOMEvents: {
654
657
  focus: (r) => {
655
- const n = Ae(r.state.tr);
658
+ const n = Oe(r.state.tr);
656
659
  return r.dispatch(n), !1;
657
660
  }
658
661
  },
@@ -660,9 +663,9 @@ const k = {
660
663
  return this.getState(r);
661
664
  }
662
665
  }
663
- }), lt = w((c, e) => {
664
- var o, a;
665
- const t = "heading", r = (o = e == null ? void 0 : e.getId) != null ? o : st, n = (a = e == null ? void 0 : e.displayHashtag) != null ? a : !0;
666
+ }), at = L((i, e) => {
667
+ var s, a;
668
+ const t = "heading", r = (s = e == null ? void 0 : e.getId) != null ? s : nt, n = (a = e == null ? void 0 : e.displayHashtag) != null ? a : !0;
666
669
  return {
667
670
  id: t,
668
671
  schema: () => ({
@@ -677,67 +680,67 @@ const k = {
677
680
  default: 1
678
681
  }
679
682
  },
680
- parseDOM: ke.map((s) => ({
681
- tag: `h${s}`,
683
+ parseDOM: he.map((o) => ({
684
+ tag: `h${o}`,
682
685
  getAttrs: (l) => {
683
686
  if (!(l instanceof HTMLElement))
684
687
  throw D(l);
685
- return { level: s, id: l.id };
688
+ return { level: o, id: l.id };
686
689
  }
687
690
  })),
688
- toDOM: (s) => [
689
- `h${s.attrs.level}`,
691
+ toDOM: (o) => [
692
+ `h${o.attrs.level}`,
690
693
  {
691
- id: s.attrs.id || r(s),
692
- class: c.getClassName(s.attrs, `heading h${s.attrs.level}`)
694
+ id: o.attrs.id || r(o),
695
+ class: i.getClassName(o.attrs, `heading h${o.attrs.level}`)
693
696
  },
694
697
  0
695
698
  ],
696
699
  parseMarkdown: {
697
- match: ({ type: s }) => s === t,
698
- runner: (s, l, i) => {
700
+ match: ({ type: o }) => o === t,
701
+ runner: (o, l, c) => {
699
702
  const u = l.depth;
700
- s.openNode(i, { level: u }), s.next(l.children), s.closeNode();
703
+ o.openNode(c, { level: u }), o.next(l.children), o.closeNode();
701
704
  }
702
705
  },
703
706
  toMarkdown: {
704
- match: (s) => s.type.name === t,
705
- runner: (s, l) => {
707
+ match: (o) => o.type.name === t,
708
+ runner: (o, l) => {
706
709
  var u;
707
- if (s.openNode("heading", void 0, { depth: l.attrs.level }), l.childCount >= 1 && ((u = l.lastChild) == null ? void 0 : u.type.name) === "hardbreak") {
708
- const g = [];
709
- l.content.forEach((d, m, f) => {
710
- f !== l.childCount - 1 && g.push(d);
711
- }), s.next(ge.fromArray(g));
710
+ if (o.openNode("heading", void 0, { depth: l.attrs.level }), l.childCount >= 1 && ((u = l.lastChild) == null ? void 0 : u.type.name) === "hardbreak") {
711
+ const f = [];
712
+ l.content.forEach((d, m, g) => {
713
+ g !== l.childCount - 1 && f.push(d);
714
+ }), o.next(R.fromArray(f));
712
715
  } else
713
- s.next(l.content);
714
- s.closeNode();
716
+ o.next(l.content);
717
+ o.closeNode();
715
718
  }
716
719
  }
717
720
  }),
718
- inputRules: (s, l) => ke.map((i) => G(new RegExp(`^(#{1,${i}})\\s$`), s, () => {
719
- const u = l.get(B), { $from: g } = u.state.selection, d = g.node();
721
+ inputRules: (o, l) => he.map((c) => J(new RegExp(`^(#{1,${c}})\\s$`), o, () => {
722
+ const u = l.get(P), { $from: f } = u.state.selection, d = f.node();
720
723
  if (d.type.name === "heading") {
721
- let m = Number(d.attrs.level) + Number(i);
724
+ let m = Number(d.attrs.level) + Number(c);
722
725
  return m > 6 && (m = 6), {
723
726
  level: m
724
727
  };
725
728
  }
726
729
  return {
727
- level: i
730
+ level: c
728
731
  };
729
732
  })),
730
- commands: (s, l) => [
731
- M(C, (i = 1) => i < 1 ? E(i === 0 && l.get(A).nodes.paragraph || s) : E(i === 0 && l.get(A).nodes.paragraph || s, { level: i })),
732
- M(Me, () => (i, u, g) => {
733
- const { $from: d } = i.selection, m = d.node();
734
- if (m.type !== s || !i.selection.empty || d.parentOffset !== 0)
733
+ commands: (o, l) => [
734
+ M(C, (c = 1) => c < 1 ? E(c === 0 && l.get(A).nodes.paragraph || o) : E(c === 0 && l.get(A).nodes.paragraph || o, { level: c })),
735
+ M(ke, () => (c, u, f) => {
736
+ const { $from: d } = c.selection, m = d.node();
737
+ if (m.type !== o || !c.selection.empty || d.parentOffset !== 0)
735
738
  return !1;
736
- const f = m.attrs.level - 1;
737
- return f ? (u == null || u(i.tr.setNodeMarkup(i.selection.$from.before(), void 0, {
739
+ const g = m.attrs.level - 1;
740
+ return g ? (u == null || u(c.tr.setNodeMarkup(c.selection.$from.before(), void 0, {
738
741
  ...m.attrs,
739
- level: f
740
- })), !0) : E(l.get(A).nodes.paragraph || s)(i, u, g);
742
+ level: g
743
+ })), !0) : E(l.get(A).nodes.paragraph || o)(c, u, f);
741
744
  })
742
745
  ],
743
746
  shortcuts: {
@@ -747,19 +750,19 @@ const k = {
747
750
  [k.H4]: h(C, "Mod-Alt-4", 4),
748
751
  [k.H5]: h(C, "Mod-Alt-5", 5),
749
752
  [k.H6]: h(C, "Mod-Alt-6", 6),
750
- [k.DowngradeHeading]: h(Me, ["Backspace", "Delete"])
753
+ [k.DowngradeHeading]: h(ke, ["Backspace", "Delete"])
751
754
  },
752
- prosePlugins: (s, l) => {
753
- const i = [ot(l, s, r)];
754
- return n && i.push(at(l, s, c)), i;
755
+ prosePlugins: (o, l) => {
756
+ const c = [st(l, o, r)];
757
+ return n && c.push(ot(l, o, i)), c;
755
758
  }
756
759
  };
757
- }), z = "hr", Ce = I("InsertHr"), ct = w((c) => ({
758
- id: z,
760
+ }), G = "hr", xe = I("InsertHr"), lt = L((i) => ({
761
+ id: G,
759
762
  schema: () => ({
760
763
  group: "block",
761
764
  parseDOM: [{ tag: "hr" }],
762
- toDOM: (e) => ["hr", { class: c.getClassName(e.attrs, z) }],
765
+ toDOM: (e) => ["hr", { class: i.getClassName(e.attrs, G) }],
763
766
  parseMarkdown: {
764
767
  match: ({ type: e }) => e === "thematicBreak",
765
768
  runner: (e, t, r) => {
@@ -767,30 +770,30 @@ const k = {
767
770
  }
768
771
  },
769
772
  toMarkdown: {
770
- match: (e) => e.type.name === z,
773
+ match: (e) => e.type.name === G,
771
774
  runner: (e) => {
772
775
  e.addNode("thematicBreak");
773
776
  }
774
777
  }
775
778
  }),
776
779
  inputRules: (e) => [
777
- new me(/^(?:---|___\s|\*\*\*\s)$/, (t, r, n, o) => {
780
+ new me(/^(?:---|___\s|\*\*\*\s)$/, (t, r, n, s) => {
778
781
  const { tr: a } = t;
779
- return r[0] && a.replaceWith(n - 1, o, e.create()), a;
782
+ return r[0] && a.replaceWith(n - 1, s, e.create()), a;
780
783
  })
781
784
  ],
782
785
  commands: (e, t) => [
783
- M(Ce, () => (r, n) => {
786
+ M(xe, () => (r, n) => {
784
787
  if (!n)
785
788
  return !0;
786
- const o = t.get(A).node("paragraph"), { tr: a, selection: s } = r, { from: l } = s, i = e.create();
787
- if (!i)
789
+ const s = t.get(A).node("paragraph"), { tr: a, selection: o } = r, { from: l } = o, c = e.create();
790
+ if (!c)
788
791
  return !0;
789
- const u = a.replaceSelectionWith(i).insert(l, o), g = Le.findFrom(u.doc.resolve(l), 1, !0);
790
- return g && n(u.setSelection(g).scrollIntoView()), !0;
792
+ const u = a.replaceSelectionWith(c).insert(l, s), f = Le.findFrom(u.doc.resolve(l), 1, !0);
793
+ return f && n(u.setSelection(f).scrollIntoView()), !0;
791
794
  })
792
795
  ]
793
- })), se = I("ModifyImage"), De = I("InsertImage"), S = "image", it = new T("MILKDOWN_IMAGE_INPUT"), ut = w((c, e) => ({
796
+ })), oe = I("ModifyImage"), Ce = I("InsertImage"), S = "image", ct = new T("MILKDOWN_IMAGE_INPUT"), it = L((i, e) => ({
794
797
  id: "image",
795
798
  schema: () => ({
796
799
  inline: !0,
@@ -825,17 +828,17 @@ const k = {
825
828
  "img",
826
829
  {
827
830
  ...t.attrs,
828
- class: c.getClassName(t.attrs, S)
831
+ class: i.getClassName(t.attrs, S)
829
832
  }
830
833
  ],
831
834
  parseMarkdown: {
832
835
  match: ({ type: t }) => t === S,
833
836
  runner: (t, r, n) => {
834
- const o = r.url, a = r.alt, s = r.title;
837
+ const s = r.url, a = r.alt, o = r.title;
835
838
  t.addNode(n, {
836
- src: o,
839
+ src: s,
837
840
  alt: a,
838
- title: s
841
+ title: o
839
842
  });
840
843
  }
841
844
  },
@@ -851,112 +854,112 @@ const k = {
851
854
  }
852
855
  }),
853
856
  commands: (t) => [
854
- M(De, (r = "") => (n, o) => {
855
- if (!o)
856
- return !0;
857
- const { tr: a } = n, s = t.create({ src: r });
857
+ M(Ce, (r = "") => (n, s) => {
858
858
  if (!s)
859
859
  return !0;
860
- const l = a.replaceSelectionWith(s);
861
- return o(l.scrollIntoView()), !0;
860
+ const { tr: a } = n, o = t.create({ src: r });
861
+ if (!o)
862
+ return !0;
863
+ const l = a.replaceSelectionWith(o);
864
+ return s(l.scrollIntoView()), !0;
862
865
  }),
863
- M(se, (r = "") => (n, o) => {
864
- const a = K(n.selection, t);
866
+ M(oe, (r = "") => (n, s) => {
867
+ const a = F(n.selection, t);
865
868
  if (!a)
866
869
  return !1;
867
- const { tr: s } = n;
868
- return o == null || o(s.setNodeMarkup(a.pos, void 0, { ...a.node.attrs, loading: !0, src: r }).scrollIntoView()), !0;
870
+ const { tr: o } = n;
871
+ return s == null || s(o.setNodeMarkup(a.pos, void 0, { ...a.node.attrs, loading: !0, src: r }).scrollIntoView()), !0;
869
872
  })
870
873
  ],
871
874
  inputRules: (t) => [
872
- new me(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/, (r, n, o, a) => {
873
- const [s, l, i = "", u] = n, { tr: g } = r;
874
- return s && g.replaceWith(o, a, t.create({ src: i, alt: l, title: u })), g;
875
+ new me(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/, (r, n, s, a) => {
876
+ const [o, l, c = "", u] = n, { tr: f } = r;
877
+ return o && f.replaceWith(s, a, t.create({ src: c, alt: l, title: u })), f;
875
878
  })
876
879
  ],
877
880
  view: () => (t) => {
878
- var i, u;
881
+ var c, u;
879
882
  let r = t;
880
- const n = (i = e == null ? void 0 : e.placeholder) != null ? i : "Add an Image", o = (u = e == null ? void 0 : e.isBlock) != null ? u : !1, a = c.themeManager.get("image", {
883
+ const n = (c = e == null ? void 0 : e.placeholder) != null ? c : "Add an Image", s = (u = e == null ? void 0 : e.isBlock) != null ? u : !1, a = i.themeManager.get("image", {
881
884
  placeholder: n,
882
- isBlock: o
885
+ isBlock: s
883
886
  });
884
887
  if (!a)
885
888
  return {};
886
- const { dom: s, onUpdate: l } = a;
889
+ const { dom: o, onUpdate: l } = a;
887
890
  return l(r), {
888
- dom: s,
889
- update: (g) => g.type.name !== S ? !1 : (r = g, l(r), !0),
891
+ dom: o,
892
+ update: (f) => f.type.name !== S ? !1 : (r = f, l(r), !0),
890
893
  selectNode: () => {
891
- s.classList.add("ProseMirror-selectednode");
894
+ o.classList.add("ProseMirror-selectednode");
892
895
  },
893
896
  deselectNode: () => {
894
- s.classList.remove("ProseMirror-selectednode");
897
+ o.classList.remove("ProseMirror-selectednode");
895
898
  }
896
899
  };
897
900
  },
898
901
  prosePlugins: (t, r) => [
899
902
  new H({
900
- key: it,
903
+ key: ct,
901
904
  view: (n) => {
902
- var i, u, g;
903
- const o = c.themeManager.get("input-chip", {
904
- placeholder: (u = (i = e == null ? void 0 : e.input) == null ? void 0 : i.placeholder) != null ? u : "Input Image Link",
905
- buttonText: (g = e == null ? void 0 : e.input) == null ? void 0 : g.buttonText,
905
+ var c, u, f;
906
+ const s = i.themeManager.get("input-chip", {
907
+ placeholder: (u = (c = e == null ? void 0 : e.input) == null ? void 0 : c.placeholder) != null ? u : "Input Image Link",
908
+ buttonText: (f = e == null ? void 0 : e.input) == null ? void 0 : f.buttonText,
906
909
  onUpdate: (d) => {
907
- r.get(we).call(se, d);
910
+ r.get(Ne).call(oe, d);
908
911
  }
909
912
  });
910
- if (!o)
913
+ if (!s)
911
914
  return {};
912
- const a = (d) => Boolean(d.hasFocus() && t && K(d.state.selection, t)), s = (d) => {
913
- const m = K(d.state.selection, t);
915
+ const a = (d) => Boolean(d.hasFocus() && t && F(d.state.selection, t)), o = (d) => {
916
+ const m = F(d.state.selection, t);
914
917
  return m ? m.node.attrs.src : void 0;
915
918
  }, l = (d) => {
916
919
  if (!d.editable)
917
920
  return;
918
- a(d) ? (o.show(d), o.update(s(d))) : o.hide();
921
+ a(d) ? (s.show(d), s.update(o(d))) : s.hide();
919
922
  };
920
- return o.init(n), l(n), {
923
+ return s.init(n), l(n), {
921
924
  update: (d, m) => {
922
925
  (m == null ? void 0 : m.doc.eq(d.state.doc)) && m.selection.eq(d.state.selection) || l(d);
923
926
  },
924
927
  destroy: () => {
925
- o.destroy();
928
+ s.destroy();
926
929
  }
927
930
  };
928
931
  }
929
932
  })
930
933
  ]
931
- })), Ie = "list_item", oe = I("SplitListItem"), ae = I("SinkListItem"), le = I("LiftListItem"), dt = new T("MILKDOWN_KEEP_LIST_ORDER"), mt = (c) => {
934
+ })), Me = "list_item", ae = I("SplitListItem"), le = I("SinkListItem"), ce = I("LiftListItem"), ut = new T("MILKDOWN_KEEP_LIST_ORDER"), dt = (i) => {
932
935
  const e = (t, r) => {
933
- const n = Ee("ordered_list", t.schema);
934
- let o = t.tr;
935
- t.doc.descendants((a, s, l, i) => {
936
- if (a.type === c && (l == null ? void 0 : l.type) === n) {
936
+ const n = Ae("ordered_list", t.schema);
937
+ let s = t.tr;
938
+ t.doc.descendants((a, o, l, c) => {
939
+ if (a.type === i && (l == null ? void 0 : l.type) === n) {
937
940
  let u = !1;
938
- const g = { ...a.attrs };
939
- a.attrs.listType !== "ordered" && (g.listType = "ordered", u = !0);
940
- const d = l == null ? void 0 : l.maybeChild(i - 1);
941
- if (d && d.type === c && d.attrs.listType === "ordered") {
941
+ const f = { ...a.attrs };
942
+ a.attrs.listType !== "ordered" && (f.listType = "ordered", u = !0);
943
+ const d = l == null ? void 0 : l.maybeChild(0);
944
+ if (d && d.type === i && d.attrs.listType === "ordered") {
942
945
  const m = d.attrs.label;
943
- g.label = `${Number(m.slice(0, -1)) + 1}.`, u = !0;
946
+ f.label = `${Number(m.slice(0, -1)) + c}.`, u = !0;
944
947
  }
945
- a.attrs.label === "\u2022" && (g.label = `${i + 1}.`, u = !0), u && (o = o.setNodeMarkup(s, void 0, g));
948
+ a.attrs.label === "\u2022" && (f.label = `${c + 1}.`, u = !0), u && (s = s.setNodeMarkup(o, void 0, f));
946
949
  }
947
- }), r(o);
950
+ }), r(s);
948
951
  };
949
952
  return new H({
950
- key: dt,
953
+ key: ut,
951
954
  appendTransaction: (t, r, n) => {
952
- let o = null;
955
+ let s = null;
953
956
  return t.some((a) => a.docChanged) && e(n, (a) => {
954
- o = a;
955
- }), o;
957
+ s = a;
958
+ }), s;
956
959
  }
957
960
  });
958
- }, gt = w((c) => ({
959
- id: Ie,
961
+ }, mt = L((i) => ({
962
+ id: Me,
960
963
  schema: () => ({
961
964
  group: "listItem",
962
965
  content: "paragraph block*",
@@ -987,41 +990,41 @@ const k = {
987
990
  toDOM: (e) => [
988
991
  "li",
989
992
  {
990
- class: c.getClassName(e.attrs, "list-item"),
993
+ class: i.getClassName(e.attrs, "list-item"),
991
994
  "data-label": e.attrs.label,
992
995
  "data-list-type": e.attrs.listType
993
996
  },
994
- ["div", { class: c.getClassName(e.attrs, "list-item_label") }, e.attrs.label],
995
- ["div", { class: c.getClassName(e.attrs, "list-item_body") }, 0]
997
+ ["div", { class: i.getClassName(e.attrs, "list-item_label") }, e.attrs.label],
998
+ ["div", { class: i.getClassName(e.attrs, "list-item_body") }, 0]
996
999
  ],
997
1000
  parseMarkdown: {
998
1001
  match: ({ type: e, checked: t }) => e === "listItem" && t === null,
999
1002
  runner: (e, t, r) => {
1000
- const n = t.label != null ? `${t.label}.` : "\u2022", o = t.label != null ? "ordered" : "bullet";
1001
- e.openNode(r, { label: n, listType: o }), e.next(t.children), e.closeNode();
1003
+ const n = t.label != null ? `${t.label}.` : "\u2022", s = t.label != null ? "ordered" : "bullet";
1004
+ e.openNode(r, { label: n, listType: s }), e.next(t.children), e.closeNode();
1002
1005
  }
1003
1006
  },
1004
1007
  toMarkdown: {
1005
- match: (e) => e.type.name === Ie,
1008
+ match: (e) => e.type.name === Me,
1006
1009
  runner: (e, t) => {
1007
1010
  e.openNode("listItem"), e.next(t.content), e.closeNode();
1008
1011
  }
1009
1012
  }
1010
1013
  }),
1011
- inputRules: (e) => [W(/^\s*([-+*])\s$/, e)],
1014
+ inputRules: (e) => [q(/^\s*([-+*])\s$/, e)],
1012
1015
  commands: (e) => [
1013
- M(oe, () => Re(e)),
1014
- M(ae, () => Be(e)),
1015
- M(le, () => Pe(e))
1016
+ M(ae, () => Se(e)),
1017
+ M(le, () => Re(e)),
1018
+ M(ce, () => Be(e))
1016
1019
  ],
1017
1020
  shortcuts: {
1018
- [k.NextListItem]: h(oe, "Enter"),
1019
- [k.SinkListItem]: h(ae, "Mod-]"),
1020
- [k.LiftListItem]: h(le, "Mod-[")
1021
+ [k.NextListItem]: h(ae, "Enter"),
1022
+ [k.SinkListItem]: h(le, "Mod-]"),
1023
+ [k.LiftListItem]: h(ce, "Mod-[")
1021
1024
  },
1022
- prosePlugins: (e) => [mt(e)]
1023
- })), ce = I("WrapInOrderedList"), be = "ordered_list", ft = w((c) => ({
1024
- id: be,
1025
+ prosePlugins: (e) => [dt(e)]
1026
+ })), ie = I("WrapInOrderedList"), Ie = "ordered_list", ft = L((i) => ({
1027
+ id: Ie,
1025
1028
  schema: () => ({
1026
1029
  content: "listItem+",
1027
1030
  group: "block",
@@ -1044,7 +1047,7 @@ const k = {
1044
1047
  "ol",
1045
1048
  {
1046
1049
  ...e.attrs.order === 1 ? {} : e.attrs.order,
1047
- class: c.getClassName(e.attrs, "ordered-list")
1050
+ class: i.getClassName(e.attrs, "ordered-list")
1048
1051
  },
1049
1052
  0
1050
1053
  ],
@@ -1055,26 +1058,26 @@ const k = {
1055
1058
  }
1056
1059
  },
1057
1060
  toMarkdown: {
1058
- match: (e) => e.type.name === be,
1061
+ match: (e) => e.type.name === Ie,
1059
1062
  runner: (e, t) => {
1060
1063
  e.openNode("list", void 0, { ordered: !0, start: 1 }), e.next(t.content), e.closeNode();
1061
1064
  }
1062
1065
  }
1063
1066
  }),
1064
1067
  inputRules: (e) => [
1065
- W(/^(\d+)\.\s$/, e, (t) => ({ order: Number(t[1]) }), (t, r) => r.childCount + r.attrs.order === Number(t[1]))
1068
+ q(/^(\d+)\.\s$/, e, (t) => ({ order: Number(t[1]) }), (t, r) => r.childCount + r.attrs.order === Number(t[1]))
1066
1069
  ],
1067
- commands: (e) => [M(ce, () => de(e))],
1070
+ commands: (e) => [M(ie, () => de(e))],
1068
1071
  shortcuts: {
1069
- [k.OrderedList]: h(ce, "Mod-Alt-7")
1072
+ [k.OrderedList]: h(ie, "Mod-Alt-7")
1070
1073
  }
1071
- })), ie = I("TurnIntoText"), ye = "paragraph", pt = w((c) => ({
1072
- id: ye,
1074
+ })), ue = I("TurnIntoText"), be = "paragraph", gt = L((i) => ({
1075
+ id: be,
1073
1076
  schema: () => ({
1074
1077
  content: "inline*",
1075
1078
  group: "block",
1076
1079
  parseDOM: [{ tag: "p" }],
1077
- toDOM: (e) => ["p", { class: c.getClassName(e.attrs, ye) }, 0],
1080
+ toDOM: (e) => ["p", { class: i.getClassName(e.attrs, be) }, 0],
1078
1081
  parseMarkdown: {
1079
1082
  match: (e) => e.type === "paragraph",
1080
1083
  runner: (e, t, r) => {
@@ -1086,198 +1089,209 @@ const k = {
1086
1089
  runner: (e, t) => {
1087
1090
  var n;
1088
1091
  if (e.openNode("paragraph"), t.childCount >= 1 && ((n = t.lastChild) == null ? void 0 : n.type.name) === "hardbreak") {
1089
- const o = [];
1090
- t.content.forEach((a, s, l) => {
1091
- l !== t.childCount - 1 && o.push(a);
1092
- }), e.next(ge.fromArray(o));
1092
+ const s = [];
1093
+ t.content.forEach((a, o, l) => {
1094
+ l !== t.childCount - 1 && s.push(a);
1095
+ }), e.next(R.fromArray(s));
1093
1096
  } else
1094
1097
  e.next(t.content);
1095
1098
  e.closeNode();
1096
1099
  }
1097
1100
  }
1098
1101
  }),
1099
- commands: (e) => [M(ie, () => E(e))],
1102
+ commands: (e) => [M(ue, () => E(e))],
1100
1103
  shortcuts: {
1101
- [k.Text]: h(ie, "Mod-Alt-0")
1104
+ [k.Text]: h(ue, "Mod-Alt-0")
1102
1105
  }
1103
- })), ht = w(() => ({
1106
+ })), pt = L(() => ({
1104
1107
  id: "text",
1105
1108
  schema: () => ({
1106
1109
  group: "inline",
1107
1110
  parseMarkdown: {
1108
- match: ({ type: c }) => c === "text",
1109
- runner: (c, e) => {
1110
- c.addText(e.value);
1111
+ match: ({ type: i }) => i === "text",
1112
+ runner: (i, e) => {
1113
+ i.addText(e.value);
1111
1114
  }
1112
1115
  },
1113
1116
  toMarkdown: {
1114
- match: (c) => c.type.name === "text",
1115
- runner: (c, e) => {
1116
- c.addNode("text", void 0, e.text);
1117
+ match: (i) => i.type.name === "text",
1118
+ runner: (i, e) => {
1119
+ i.addNode("text", void 0, e.text);
1117
1120
  }
1118
1121
  }
1119
1122
  })
1120
- })), kt = [
1121
- et(),
1122
- pt(),
1123
- rt(),
1124
- Ge(),
1123
+ })), ht = [
1125
1124
  Ze(),
1126
- Je(),
1127
- ft(),
1128
1125
  gt(),
1126
+ tt(),
1127
+ ze(),
1128
+ Ye(),
1129
+ Ge(),
1130
+ ft(),
1131
+ mt(),
1132
+ at(),
1129
1133
  lt(),
1130
- ct(),
1131
- ut(),
1132
- ht()
1133
- ], Mt = () => {
1134
- function c(e) {
1135
- qe(e, "list", (t) => {
1134
+ it(),
1135
+ pt()
1136
+ ], kt = () => {
1137
+ function i(e) {
1138
+ We(e, "list", (t) => {
1136
1139
  var r;
1137
1140
  if (t.ordered) {
1138
1141
  const n = (r = t.start) != null ? r : 1;
1139
- t.children.forEach((o, a) => {
1140
- o.label = a + n;
1142
+ t.children.forEach((s, a) => {
1143
+ s.label = a + n;
1141
1144
  });
1142
1145
  return;
1143
1146
  }
1144
1147
  });
1145
1148
  }
1146
- return c;
1147
- }, It = (c) => !!c.children, bt = (c) => c.type === "html";
1148
- function yt(c, e) {
1149
- return t(c, 0, null)[0];
1150
- function t(r, n, o) {
1151
- if (It(r)) {
1149
+ return i;
1150
+ }, Mt = (i) => !!i.children, It = (i) => i.type === "html";
1151
+ function bt(i, e) {
1152
+ return t(i, 0, null)[0];
1153
+ function t(r, n, s) {
1154
+ if (Mt(r)) {
1152
1155
  const a = [];
1153
- for (let s = 0, l = r.children.length; s < l; s++) {
1154
- const i = r.children[s];
1155
- if (i) {
1156
- const u = t(i, s, r);
1156
+ for (let o = 0, l = r.children.length; o < l; o++) {
1157
+ const c = r.children[o];
1158
+ if (c) {
1159
+ const u = t(c, o, r);
1157
1160
  if (u)
1158
- for (let g = 0, d = u.length; g < d; g++) {
1159
- const m = u[g];
1161
+ for (let f = 0, d = u.length; f < d; f++) {
1162
+ const m = u[f];
1160
1163
  m && a.push(m);
1161
1164
  }
1162
1165
  }
1163
1166
  }
1164
1167
  r.children = a;
1165
1168
  }
1166
- return e(r, n, o);
1169
+ return e(r, n, s);
1167
1170
  }
1168
1171
  }
1169
- const Nt = () => {
1170
- function c(e) {
1171
- yt(e, (t) => bt(t) ? [] : [t]);
1172
+ const yt = () => {
1173
+ function i(e) {
1174
+ bt(e, (t) => It(t) ? [] : [t]);
1172
1175
  }
1173
- return c;
1174
- }, wt = new T("MILKDOWN_INLINE_NODES_CURSOR"), ue = new H({
1175
- key: wt,
1176
- state: {
1177
- init() {
1178
- return !1;
1179
- },
1180
- apply(c) {
1181
- if (!c.selection.empty)
1182
- return !1;
1183
- const e = c.selection.$from, t = e.nodeBefore, r = e.nodeAfter;
1184
- return !!(t && r && t.isInline && !t.isText && r.isInline && !r.isText);
1185
- }
1186
- },
1187
- props: {
1188
- handleDOMEvents: {
1189
- beforeinput: (c, e) => {
1190
- if (ue.getState(c.state) && e instanceof InputEvent) {
1191
- const r = c.state.selection.from;
1192
- return e.preventDefault(), c.dispatch(c.state.tr.insertText(e.data || "", r)), !0;
1193
- }
1176
+ return i;
1177
+ }, Nt = new T("MILKDOWN_INLINE_NODES_CURSOR"), Lt = () => {
1178
+ let i = !1;
1179
+ const e = new H({
1180
+ key: Nt,
1181
+ state: {
1182
+ init() {
1194
1183
  return !1;
1184
+ },
1185
+ apply(t) {
1186
+ if (!t.selection.empty)
1187
+ return !1;
1188
+ const r = t.selection.$from, n = r.nodeBefore, s = r.nodeAfter;
1189
+ return !!(n && s && n.isInline && !n.isText && s.isInline && !s.isText);
1195
1190
  }
1196
1191
  },
1197
- decorations(c) {
1198
- if (ue.getState(c)) {
1199
- const r = c.selection.$from.pos, n = document.createElement("span"), o = J.widget(r, n, {
1200
- side: -1
1201
- }), a = document.createElement("span"), s = J.widget(r, a);
1202
- return setTimeout(() => {
1203
- n.contentEditable = "true", a.contentEditable = "true";
1204
- }), O.create(c.doc, [o, s]);
1192
+ props: {
1193
+ handleDOMEvents: {
1194
+ compositionend: (t, r) => i ? (i = !1, requestAnimationFrame(() => {
1195
+ if (e.getState(t.state)) {
1196
+ const s = t.state.selection.from;
1197
+ r.preventDefault(), t.dispatch(t.state.tr.insertText(r.data || "", s));
1198
+ }
1199
+ }), !0) : !1,
1200
+ compositionstart: (t) => (e.getState(t.state) && (i = !0), !1),
1201
+ beforeinput: (t, r) => {
1202
+ if (e.getState(t.state) && r instanceof InputEvent && r.data && !i) {
1203
+ const s = t.state.selection.from;
1204
+ return r.preventDefault(), t.dispatch(t.state.tr.insertText(r.data || "", s)), !0;
1205
+ }
1206
+ return !1;
1207
+ }
1208
+ },
1209
+ decorations(t) {
1210
+ if (e.getState(t)) {
1211
+ const s = t.selection.$from.pos, a = document.createElement("span"), o = Q.widget(s, a, {
1212
+ side: -1
1213
+ }), l = document.createElement("span"), c = Q.widget(s, l);
1214
+ return setTimeout(() => {
1215
+ a.contentEditable = "true", l.contentEditable = "true";
1216
+ }), O.create(t.doc, [o, c]);
1217
+ }
1218
+ return O.empty;
1205
1219
  }
1206
- return O.empty;
1207
1220
  }
1208
- }
1209
- }), Lt = [
1210
- He(() => ({
1211
- prosePlugins: () => [ue],
1212
- remarkPlugins: () => [We, Nt, Mt]
1221
+ });
1222
+ return e;
1223
+ }, wt = [
1224
+ De(() => ({
1225
+ prosePlugins: () => [Lt()],
1226
+ remarkPlugins: () => [Pe, yt, kt]
1213
1227
  }))()
1214
- ], xt = Ne.create([...kt, ...ze]), Pt = Ne.create([...Lt, ...xt]), Wt = {
1215
- ToggleInlineCode: Q,
1216
- ToggleItalic: X,
1217
- ToggleLink: xe,
1218
- ToggleBold: Z,
1219
- ModifyLink: Y,
1220
- ModifyImage: se,
1221
- WrapInBlockquote: ee,
1222
- WrapInBulletList: te,
1223
- WrapInOrderedList: ce,
1224
- TurnIntoCodeFence: re,
1228
+ ], xt = ye.create([...ht, ...je]), Pt = ye.create([...wt, ...xt]), Wt = {
1229
+ ToggleInlineCode: X,
1230
+ ToggleItalic: Y,
1231
+ ToggleLink: we,
1232
+ ToggleBold: ee,
1233
+ ModifyLink: Z,
1234
+ ModifyImage: oe,
1235
+ WrapInBlockquote: te,
1236
+ WrapInBulletList: re,
1237
+ WrapInOrderedList: ie,
1238
+ TurnIntoCodeFence: ne,
1225
1239
  TurnIntoHeading: C,
1226
- TurnIntoText: ie,
1227
- InsertHardbreak: ne,
1228
- InsertHr: Ce,
1229
- InsertImage: De,
1230
- SplitListItem: oe,
1231
- SinkListItem: ae,
1232
- LiftListItem: le
1240
+ TurnIntoText: ue,
1241
+ InsertHardbreak: se,
1242
+ InsertHr: xe,
1243
+ InsertImage: Ce,
1244
+ SplitListItem: ae,
1245
+ SinkListItem: le,
1246
+ LiftListItem: ce
1233
1247
  };
1234
1248
  export {
1235
- Me as DowngradeHeading,
1236
- tt as HardbreakFilterPluginKey,
1237
- ne as InsertHardbreak,
1238
- Ce as InsertHr,
1239
- De as InsertImage,
1240
- le as LiftListItem,
1241
- se as ModifyImage,
1242
- Y as ModifyLink,
1243
- ae as SinkListItem,
1244
- oe as SplitListItem,
1249
+ ke as DowngradeHeading,
1250
+ et as HardbreakFilterPluginKey,
1251
+ se as InsertHardbreak,
1252
+ xe as InsertHr,
1253
+ Ce as InsertImage,
1254
+ ce as LiftListItem,
1255
+ oe as ModifyImage,
1256
+ Z as ModifyLink,
1257
+ le as SinkListItem,
1258
+ ae as SplitListItem,
1245
1259
  k as SupportedKeys,
1246
- Z as ToggleBold,
1247
- Q as ToggleInlineCode,
1248
- X as ToggleItalic,
1249
- xe as ToggleLink,
1250
- re as TurnIntoCodeFence,
1260
+ ee as ToggleBold,
1261
+ X as ToggleInlineCode,
1262
+ Y as ToggleItalic,
1263
+ we as ToggleLink,
1264
+ ne as TurnIntoCodeFence,
1251
1265
  C as TurnIntoHeading,
1252
- ie as TurnIntoText,
1253
- ee as WrapInBlockquote,
1254
- te as WrapInBulletList,
1255
- ce as WrapInOrderedList,
1256
- Xe as backtickInputRegex,
1257
- Ge as blockquote,
1258
- Je as bulletList,
1259
- Ze as codeFence,
1260
- Ke as codeInline,
1266
+ ue as TurnIntoText,
1267
+ te as WrapInBlockquote,
1268
+ re as WrapInBulletList,
1269
+ ie as WrapInOrderedList,
1270
+ Qe as backtickInputRegex,
1271
+ ze as blockquote,
1272
+ Ge as bulletList,
1273
+ Ye as codeFence,
1274
+ qe as codeInline,
1261
1275
  Wt as commands,
1262
1276
  Pt as commonmark,
1263
1277
  xt as commonmarkNodes,
1264
- Lt as commonmarkPlugins,
1265
- et as doc,
1266
- Fe as em,
1267
- rt as hardbreak,
1268
- lt as heading,
1269
- nt as headingHashPluginKey,
1270
- j as headingIdPluginKey,
1271
- ct as hr,
1272
- ut as image,
1273
- Ve as link,
1274
- gt as listItem,
1275
- ze as marks,
1276
- kt as nodes,
1278
+ wt as commonmarkPlugins,
1279
+ Ze as doc,
1280
+ Ke as em,
1281
+ tt as hardbreak,
1282
+ at as heading,
1283
+ rt as headingHashPluginKey,
1284
+ z as headingIdPluginKey,
1285
+ lt as hr,
1286
+ it as image,
1287
+ Ue as link,
1288
+ mt as listItem,
1289
+ je as marks,
1290
+ ht as nodes,
1277
1291
  ft as orderedList,
1278
- pt as paragraph,
1279
- je as strong,
1280
- ht as text,
1281
- Ye as tildeInputRegex
1292
+ gt as paragraph,
1293
+ Ve as strong,
1294
+ pt as text,
1295
+ Xe as tildeInputRegex
1282
1296
  };
1283
1297
  //# sourceMappingURL=index.es.js.map