zt-react-milkdown 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{dist-CZTw9GLV.js → dist-BjfIurm0.js} +1 -1
- package/dist/{dist-ZPtYoqTI.cjs → dist-D7LE16E1.cjs} +1 -1
- package/dist/floating-ui.dom-B_oXwL6O.cjs +1 -0
- package/dist/floating-ui.dom-Cm9Ov61_.js +883 -0
- package/dist/index.cjs +66 -22
- package/dist/index.mjs +4632 -2717
- package/dist/{lib-D_0WAhKU.js → lib-5lx86j_L.js} +1 -1
- package/dist/{lib-Bhr5EVOu.js → lib-72N1aRae.js} +19 -19
- package/dist/{lib-DVE2k9i1.js → lib-BIxqp3lX.js} +43 -43
- package/dist/{lib-DzY83R_P.cjs → lib-BLTQkf4j.cjs} +1 -1
- package/dist/{lib-De0djIEV.cjs → lib-BzlEyehQ.cjs} +1 -1
- package/dist/{lib-F08NY8fk.cjs → lib-C61-3fwS.cjs} +1 -1
- package/dist/{lib-5pUyY-Tl.cjs → lib-C82poHMJ.cjs} +1 -1
- package/dist/{lib-bsXGz3fj.js → lib-CDhjYvDm.js} +2 -2
- package/dist/{lib-Dplx6t-N.cjs → lib-CHQUpMrL.cjs} +1 -1
- package/dist/{lib-DmD940Fq.js → lib-CYWwNE4c.js} +1527 -1530
- package/dist/{lib-C1A-pN4b.js → lib-Cixz93sP.js} +4 -4
- package/dist/{lib-DIx8C5AZ.cjs → lib-CqJFV3ME.cjs} +1 -1
- package/dist/{lib-CVebEyb8.cjs → lib-D7VWCO2M.cjs} +1 -1
- package/dist/{lib-_NDReOAt.js → lib-DaPs62nF.js} +1 -1
- package/dist/{lib-DgEwQN1U.cjs → lib-Dka_BhhQ.cjs} +1 -1
- package/dist/{lib-BmAQCwSQ.cjs → lib-DrllUeuK.cjs} +1 -1
- package/dist/{lib-Dd20rlmV.js → lib-wpjVX5Vf.js} +1 -1
- package/dist/{lib-ChwoE6v5.js → lib-z6CKD87x.js} +2 -2
- package/dist/{schema-list-D9Q6QKgo.cjs → schema-list-CFEw5DQ8.cjs} +1 -1
- package/dist/{schema-list-DooYP5HM.js → schema-list-CiFfAlj-.js} +1 -1
- package/package.json +3 -2
- package/dist/floating-ui.dom-CV-TLBRq.cjs +0 -1
- package/dist/floating-ui.dom-CoOubeUs.js +0 -762
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, i as t } from "./dist-CLTsQjPD.js";
|
|
2
|
-
import { n, u as r } from "./lib-
|
|
2
|
+
import { n, u as r } from "./lib-BIxqp3lX.js";
|
|
3
3
|
//#region node_modules/.pnpm/@milkdown+plugin-slash@7.21.1/node_modules/@milkdown/plugin-slash/lib/index.js
|
|
4
4
|
function i(i) {
|
|
5
5
|
let a = n({}, `${i}_SLASH_SPEC`), o = r((n) => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { D as e, G as t, H as n, I as r, K as i, M as a,
|
|
1
|
+
import { D as e, G as t, H as n, I as r, K as i, M as a, W as o, X as s, Y as c, Z as l, f as u, j as ee, s as d, vt as f, xt as te, z as ne } from "./lib-CYWwNE4c.js";
|
|
2
2
|
import { E as re, a as p, c as ie, i as m, o as ae, p as oe, u as se, v as ce, w as le } from "./dist-CLTsQjPD.js";
|
|
3
3
|
import { O as ue, k as de, s as fe, w as h } from "./commands-BJpevWrH.js";
|
|
4
|
-
import { a as pe, c as g, d as _, i as me, n as he, o as ge, p as v, r as y, s as b, t as x, u as S } from "./lib-
|
|
5
|
-
import { i as _e, n as ve, r as ye } from "./schema-list-
|
|
4
|
+
import { a as pe, c as g, d as _, i as me, n as he, o as ge, p as v, r as y, s as b, t as x, u as S } from "./lib-BIxqp3lX.js";
|
|
5
|
+
import { i as _e, n as ve, r as ye } from "./schema-list-CiFfAlj-.js";
|
|
6
6
|
//#region node_modules/.pnpm/mdast-util-definitions@6.0.0/node_modules/mdast-util-definitions/lib/index.js
|
|
7
7
|
function be(e) {
|
|
8
8
|
let t = /* @__PURE__ */ new Map();
|
|
9
9
|
if (!e || !e.type) throw Error("mdast-util-definitions expected node");
|
|
10
|
-
return
|
|
10
|
+
return c(e, "definition", function(e) {
|
|
11
11
|
let n = xe(e.identifier);
|
|
12
12
|
n && !t.get(n) && t.set(n, e);
|
|
13
13
|
}), n;
|
|
@@ -24,8 +24,8 @@ function xe(e) {
|
|
|
24
24
|
function Se() {
|
|
25
25
|
return function(e) {
|
|
26
26
|
let t = be(e);
|
|
27
|
-
|
|
28
|
-
if (e.type === "definition" && r !== void 0 && typeof n == "number") return r.children.splice(n, 1), [
|
|
27
|
+
c(e, function(e, n, r) {
|
|
28
|
+
if (e.type === "definition" && r !== void 0 && typeof n == "number") return r.children.splice(n, 1), [s, n];
|
|
29
29
|
if (e.type === "imageReference" || e.type === "linkReference") {
|
|
30
30
|
let i = t(e.identifier);
|
|
31
31
|
if (i && r && typeof n == "number") return r.children[n] = e.type === "imageReference" ? {
|
|
@@ -38,14 +38,14 @@ function Se() {
|
|
|
38
38
|
url: i.url,
|
|
39
39
|
title: i.title,
|
|
40
40
|
children: e.children
|
|
41
|
-
}, [
|
|
41
|
+
}, [s, n];
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region node_modules/.pnpm/@milkdown+preset-commonmark@7.21.1/node_modules/@milkdown/preset-commonmark/lib/index.js
|
|
48
|
-
var Ce = /* @__PURE__ */
|
|
48
|
+
var Ce = /* @__PURE__ */ te({
|
|
49
49
|
addBlockTypeCommand: () => jt,
|
|
50
50
|
blockquoteAttr: () => Ve,
|
|
51
51
|
blockquoteKeymap: () => We,
|
|
@@ -442,11 +442,11 @@ var Ae = x("UpdateLink", (e) => (t = {}) => (n, r) => {
|
|
|
442
442
|
}), !i) return !1;
|
|
443
443
|
let l = i.marks.find(({ type: t }) => t === L.type(e));
|
|
444
444
|
if (!l) return !1;
|
|
445
|
-
let u = a, ee = a + i.nodeSize, { tr:
|
|
445
|
+
let u = a, ee = a + i.nodeSize, { tr: d } = n, f = L.type(e).create({
|
|
446
446
|
...l.attrs,
|
|
447
447
|
...t
|
|
448
448
|
});
|
|
449
|
-
return
|
|
449
|
+
return f ? (r(d.removeMark(u, ee, l).addMark(u, ee, f).setSelection(new ie(d.selection.$anchor)).scrollIntoView()), !0) : !1;
|
|
450
450
|
});
|
|
451
451
|
C(Ae, {
|
|
452
452
|
displayName: "Command<updateLinkCommand>",
|
|
@@ -472,7 +472,7 @@ C(je, {
|
|
|
472
472
|
group: "Doc"
|
|
473
473
|
});
|
|
474
474
|
function Me(e) {
|
|
475
|
-
return
|
|
475
|
+
return l(e, (e) => e.type === "html" && [
|
|
476
476
|
"<br />",
|
|
477
477
|
"<br>",
|
|
478
478
|
"<br >",
|
|
@@ -516,7 +516,7 @@ var B = g("paragraph", (e) => ({
|
|
|
516
516
|
toMarkdown: {
|
|
517
517
|
match: (e) => e.type.name === "paragraph",
|
|
518
518
|
runner: (t, n) => {
|
|
519
|
-
let r = e.get(
|
|
519
|
+
let r = e.get(u).state?.doc.lastChild;
|
|
520
520
|
t.openNode("paragraph"), (!n.content || n.content.size === 0) && n !== r && Ne(e) ? t.addNode("html", void 0, "<br />") : we(t, n), t.closeNode();
|
|
521
521
|
}
|
|
522
522
|
}
|
|
@@ -634,7 +634,7 @@ C(U.node, {
|
|
|
634
634
|
group: "Heading"
|
|
635
635
|
});
|
|
636
636
|
var Re = y((e) => t(/^(?<hashes>#+)\s$/, U.type(e), (t) => {
|
|
637
|
-
let n = t.groups?.hashes?.length || 0, { $from: r } = e.get(
|
|
637
|
+
let n = t.groups?.hashes?.length || 0, { $from: r } = e.get(u).state.selection, i = r.node();
|
|
638
638
|
if (i.type.name === "heading") {
|
|
639
639
|
let e = Number(i.attrs.level) + Number(n);
|
|
640
640
|
return e > 6 && (e = 6), { level: e };
|
|
@@ -969,7 +969,7 @@ C(Qe, {
|
|
|
969
969
|
displayName: "Command<updateImageCommand>",
|
|
970
970
|
group: "Image"
|
|
971
971
|
});
|
|
972
|
-
var $e = y((e) => new
|
|
972
|
+
var $e = y((e) => new o(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/, (t, n, r, i) => {
|
|
973
973
|
let [a, o, s = "", c] = n;
|
|
974
974
|
return a ? t.tr.replaceWith(r, i, q.type(e).create({
|
|
975
975
|
src: s,
|
|
@@ -1083,7 +1083,7 @@ C(X.node, {
|
|
|
1083
1083
|
displayName: "NodeSchemaCtx<hr>",
|
|
1084
1084
|
group: "Hr"
|
|
1085
1085
|
});
|
|
1086
|
-
var rt = y((e) => new
|
|
1086
|
+
var rt = y((e) => new o(/^(?:---|___\s|\*\*\*\s)$/, (t, n, r, i) => {
|
|
1087
1087
|
let { tr: a } = t;
|
|
1088
1088
|
return n[0] && a.replaceWith(r - 1, i, X.type(e).create()), a;
|
|
1089
1089
|
}));
|
|
@@ -1607,7 +1607,7 @@ var Ct = [
|
|
|
1607
1607
|
F,
|
|
1608
1608
|
j
|
|
1609
1609
|
].flat(), Ft = _("remarkAddOrderInList", () => () => (e) => {
|
|
1610
|
-
|
|
1610
|
+
c(e, "list", (e) => {
|
|
1611
1611
|
if (e.ordered) {
|
|
1612
1612
|
let t = e.start ?? 1;
|
|
1613
1613
|
e.children.forEach((e, n) => {
|
|
@@ -1625,7 +1625,7 @@ C(Ft.plugin, {
|
|
|
1625
1625
|
});
|
|
1626
1626
|
var It = _("remarkLineBreak", () => () => (e) => {
|
|
1627
1627
|
let t = /[\t ]*(?:\r?\n|\r)/g;
|
|
1628
|
-
|
|
1628
|
+
c(e, "text", (e, n, r) => {
|
|
1629
1629
|
if (!e.value || typeof e.value != "string") return;
|
|
1630
1630
|
let i = [], a = 0;
|
|
1631
1631
|
t.lastIndex = 0;
|
|
@@ -1698,7 +1698,7 @@ C(Ht.plugin, {
|
|
|
1698
1698
|
});
|
|
1699
1699
|
var Ut = _("remarkMarker", () => () => (e, t) => {
|
|
1700
1700
|
let n = (e) => t.value.charAt(e.position.start.offset);
|
|
1701
|
-
|
|
1701
|
+
c(e, (e) => ["strong", "emphasis"].includes(e.type), (e) => {
|
|
1702
1702
|
e.marker = n(e);
|
|
1703
1703
|
});
|
|
1704
1704
|
});
|
|
@@ -1741,7 +1741,7 @@ var Wt = S(() => {
|
|
|
1741
1741
|
},
|
|
1742
1742
|
decorations(e) {
|
|
1743
1743
|
if (t.getState(e)) {
|
|
1744
|
-
let t = e.selection.$from.pos, n = document.createElement("span"), r =
|
|
1744
|
+
let t = e.selection.$from.pos, n = document.createElement("span"), r = ee.widget(t, n, { side: -1 }), i = document.createElement("span"), o = ee.widget(t, i);
|
|
1745
1745
|
return setTimeout(() => {
|
|
1746
1746
|
n.contentEditable = "true", i.contentEditable = "true";
|
|
1747
1747
|
}), a.create(e.doc, [r, o]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, C as t, E as n, O as r, S as i,
|
|
1
|
+
import { A as e, C as t, E as n, O as r, S as i, T as a, V as o, _t as s, a as c, b as l, bt as u, c as d, d as f, f as p, g as m, gt as ee, h, i as g, k as _, l as v, m as te, r as ne, s as y, t as b, u as re, v as x, w as ie, x as S, xt as C, y as w, yt as T } from "./lib-CYWwNE4c.js";
|
|
2
2
|
import { A as E, C as D, O, S as k, n as A } from "./dist-CLTsQjPD.js";
|
|
3
3
|
//#region node_modules/.pnpm/nanoid@5.1.11/node_modules/nanoid/index.browser.js
|
|
4
4
|
var j = (e) => crypto.getRandomValues(new Uint8Array(e)), ae = (e, t, n) => {
|
|
@@ -23,7 +23,7 @@ var j = (e) => crypto.getRandomValues(new Uint8Array(e)), ae = (e, t, n) => {
|
|
|
23
23
|
for (; s--;) if (t[s] < r && (o += e[t[s] % e.length], o.length >= a)) return o;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
}, oe = (e, t = 21) => ae(e, t | 0, j), se = /* @__PURE__ */
|
|
26
|
+
}, oe = (e, t = 21) => ae(e, t | 0, j), se = /* @__PURE__ */ C({
|
|
27
27
|
$command: () => P,
|
|
28
28
|
$commandAsync: () => ce,
|
|
29
29
|
$ctx: () => G,
|
|
@@ -63,7 +63,7 @@ var j = (e) => crypto.getRandomValues(new Uint8Array(e)), ae = (e, t, n) => {
|
|
|
63
63
|
setAttr: () => ye
|
|
64
64
|
}), M = oe("abcedfghicklmn", 10);
|
|
65
65
|
function N(e, t, n) {
|
|
66
|
-
let r =
|
|
66
|
+
let r = s(n || M()), i = !1, a = (n) => (n.record(r), n.update(t, (e) => e.concat(r)), async () => {
|
|
67
67
|
let o = await e(n, a, () => {
|
|
68
68
|
n.done(r), i = !0;
|
|
69
69
|
});
|
|
@@ -78,10 +78,10 @@ function N(e, t, n) {
|
|
|
78
78
|
}
|
|
79
79
|
function P(e, t) {
|
|
80
80
|
let n = v(e), r = (i) => async () => {
|
|
81
|
-
r.key = n, await i.wait(
|
|
81
|
+
r.key = n, await i.wait(b);
|
|
82
82
|
let a = t(i);
|
|
83
|
-
return i.get(
|
|
84
|
-
i.get(
|
|
83
|
+
return i.get(y).create(n, a), r.run = (t) => i.get(y).call(e, t), () => {
|
|
84
|
+
i.get(y).remove(n);
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
return r;
|
|
@@ -89,16 +89,16 @@ function P(e, t) {
|
|
|
89
89
|
function ce(e, t, n) {
|
|
90
90
|
let r = v(e);
|
|
91
91
|
return N(async (n, i) => {
|
|
92
|
-
await n.wait(
|
|
92
|
+
await n.wait(b);
|
|
93
93
|
let a = await t(n);
|
|
94
|
-
return n.get(
|
|
95
|
-
n.get(
|
|
94
|
+
return n.get(y).create(r, a), i.run = (t) => n.get(y).call(e, t), i.key = r, () => {
|
|
95
|
+
n.get(y).remove(r);
|
|
96
96
|
};
|
|
97
|
-
},
|
|
97
|
+
}, d, n);
|
|
98
98
|
}
|
|
99
99
|
function F(e) {
|
|
100
100
|
let t = (n) => async () => {
|
|
101
|
-
await n.wait(
|
|
101
|
+
await n.wait(c);
|
|
102
102
|
let r = e(n);
|
|
103
103
|
return n.update(h, (e) => [...e, r]), t.inputRule = r, () => {
|
|
104
104
|
n.update(h, (e) => e.filter((e) => e !== r));
|
|
@@ -108,7 +108,7 @@ function F(e) {
|
|
|
108
108
|
}
|
|
109
109
|
function le(e, t) {
|
|
110
110
|
return N(async (t, n) => {
|
|
111
|
-
await t.wait(
|
|
111
|
+
await t.wait(c);
|
|
112
112
|
let r = await e(t);
|
|
113
113
|
return t.update(h, (e) => [...e, r]), n.inputRule = r, () => {
|
|
114
114
|
t.update(h, (e) => e.filter((e) => e !== r));
|
|
@@ -117,7 +117,7 @@ function le(e, t) {
|
|
|
117
117
|
}
|
|
118
118
|
function I(e) {
|
|
119
119
|
let n = (r) => async () => {
|
|
120
|
-
await r.wait(
|
|
120
|
+
await r.wait(c);
|
|
121
121
|
let i = e(r);
|
|
122
122
|
return r.update(t, (e) => [...e, i]), n.pasteRule = i, () => {
|
|
123
123
|
r.update(t, (e) => e.filter((e) => e !== i));
|
|
@@ -127,7 +127,7 @@ function I(e) {
|
|
|
127
127
|
}
|
|
128
128
|
function L(e, n) {
|
|
129
129
|
return N(async (n, r) => {
|
|
130
|
-
await n.wait(
|
|
130
|
+
await n.wait(c);
|
|
131
131
|
let i = await e(n);
|
|
132
132
|
return n.update(t, (e) => [...e, i]), r.pasteRule = i, () => {
|
|
133
133
|
n.update(t, (e) => e.filter((e) => e !== i));
|
|
@@ -163,38 +163,38 @@ function z(e, t, n) {
|
|
|
163
163
|
function B(e, t) {
|
|
164
164
|
let n = (r) => async () => {
|
|
165
165
|
let i = t(r);
|
|
166
|
-
return r.update(
|
|
167
|
-
r.update(
|
|
166
|
+
return r.update(S, (t) => [...t.filter((t) => t[0] !== e), [e, i]]), n.id = e, n.schema = i, () => {
|
|
167
|
+
r.update(S, (t) => t.filter(([t]) => t !== e));
|
|
168
168
|
};
|
|
169
169
|
};
|
|
170
170
|
return n.type = (t) => {
|
|
171
171
|
let n = t.get(r).nodes[e];
|
|
172
|
-
if (!n) throw
|
|
172
|
+
if (!n) throw u(e);
|
|
173
173
|
return n;
|
|
174
174
|
}, n;
|
|
175
175
|
}
|
|
176
176
|
function V(e, t, n) {
|
|
177
177
|
let i = N(async (n, r, i) => {
|
|
178
178
|
let a = await t(n);
|
|
179
|
-
return n.update(
|
|
180
|
-
n.update(
|
|
179
|
+
return n.update(S, (t) => [...t.filter((t) => t[0] !== e), [e, a]]), r.id = e, r.schema = a, i(), () => {
|
|
180
|
+
n.update(S, (t) => t.filter(([t]) => t !== e));
|
|
181
181
|
};
|
|
182
182
|
}, _, n);
|
|
183
183
|
return i.type = (t) => {
|
|
184
184
|
let n = t.get(r).nodes[e];
|
|
185
|
-
if (!n) throw
|
|
185
|
+
if (!n) throw u(e);
|
|
186
186
|
return n;
|
|
187
187
|
}, i;
|
|
188
188
|
}
|
|
189
189
|
function H(e) {
|
|
190
|
-
let t, n = (n) => async () => (await n.wait(
|
|
191
|
-
n.update(
|
|
190
|
+
let t, n = (n) => async () => (await n.wait(c), t = e(n), n.update(a, (e) => [...e, t]), () => {
|
|
191
|
+
n.update(a, (e) => e.filter((e) => e !== t));
|
|
192
192
|
});
|
|
193
193
|
return n.plugin = () => t, n.key = () => t.spec.key, n;
|
|
194
194
|
}
|
|
195
195
|
function U(e, t) {
|
|
196
|
-
let n, r = N(async (t) => (await t.wait(
|
|
197
|
-
t.update(
|
|
196
|
+
let n, r = N(async (t) => (await t.wait(c), n = await e(t), t.update(a, (e) => [...e, n]), () => {
|
|
197
|
+
t.update(a, (e) => e.filter((e) => e !== n));
|
|
198
198
|
}), f, t);
|
|
199
199
|
return r.plugin = () => n, r.key = () => n.spec.key, r;
|
|
200
200
|
}
|
|
@@ -219,25 +219,25 @@ function ue(e, t) {
|
|
|
219
219
|
}
|
|
220
220
|
function de(e, t) {
|
|
221
221
|
let n = (r) => async () => {
|
|
222
|
-
await r.wait(
|
|
222
|
+
await r.wait(c);
|
|
223
223
|
let i = t(r);
|
|
224
|
-
return e.type(r) instanceof O ? r.update(
|
|
225
|
-
e.type(r) instanceof O ? r.update(
|
|
224
|
+
return e.type(r) instanceof O ? r.update(l, (t) => [...t, [e.id, i]]) : r.update(x, (t) => [...t, [e.id, i]]), n.view = i, n.type = e, () => {
|
|
225
|
+
e.type(r) instanceof O ? r.update(l, (t) => t.filter((t) => t[0] !== e.id)) : r.update(x, (t) => t.filter((t) => t[0] !== e.id));
|
|
226
226
|
};
|
|
227
227
|
};
|
|
228
228
|
return n;
|
|
229
229
|
}
|
|
230
230
|
function fe(e, t, n) {
|
|
231
231
|
return N(async (n, r) => {
|
|
232
|
-
await n.wait(
|
|
232
|
+
await n.wait(c);
|
|
233
233
|
let i = await t(n);
|
|
234
|
-
return e.type(n) instanceof O ? n.update(
|
|
235
|
-
e.type(n) instanceof O ? n.update(
|
|
234
|
+
return e.type(n) instanceof O ? n.update(l, (t) => [...t, [e.id, i]]) : n.update(x, (t) => [...t, [e.id, i]]), r.view = i, r.type = e, () => {
|
|
235
|
+
e.type(n) instanceof O ? n.update(l, (t) => t.filter((t) => t[0] !== e.id)) : n.update(x, (t) => t.filter((t) => t[0] !== e.id));
|
|
236
236
|
};
|
|
237
|
-
},
|
|
237
|
+
}, te, n);
|
|
238
238
|
}
|
|
239
239
|
function G(e, t) {
|
|
240
|
-
let n =
|
|
240
|
+
let n = ee(e, t), r = (e) => (e.inject(n), () => () => {
|
|
241
241
|
e.remove(n);
|
|
242
242
|
});
|
|
243
243
|
return r.key = n, r;
|
|
@@ -270,7 +270,7 @@ function J(e, t) {
|
|
|
270
270
|
var Y = (e, t = () => ({})) => G(t, `${e}Attr`), X = (e, t = () => ({})) => G(t, `${e}Attr`);
|
|
271
271
|
function Z(e, t, r) {
|
|
272
272
|
let i = G(r ?? {}, e), a = (e) => async () => {
|
|
273
|
-
await e.wait(
|
|
273
|
+
await e.wait(ne);
|
|
274
274
|
let r = {
|
|
275
275
|
plugin: t(e),
|
|
276
276
|
options: e.get(i.key)
|
|
@@ -282,7 +282,7 @@ function Z(e, t, r) {
|
|
|
282
282
|
return o.id = e, o.plugin = a, o.options = i, o;
|
|
283
283
|
}
|
|
284
284
|
function pe(e, t) {
|
|
285
|
-
return (n) => n.get(
|
|
285
|
+
return (n) => n.get(y).call(e, t);
|
|
286
286
|
}
|
|
287
287
|
function me() {
|
|
288
288
|
return (e) => {
|
|
@@ -306,13 +306,13 @@ function ge(t) {
|
|
|
306
306
|
}
|
|
307
307
|
function _e(e, t = !1) {
|
|
308
308
|
return (n) => {
|
|
309
|
-
let a = n.get(p),
|
|
310
|
-
if (!
|
|
309
|
+
let a = n.get(p), s = n.get(i)(e);
|
|
310
|
+
if (!s) return;
|
|
311
311
|
if (!t) {
|
|
312
312
|
let e = a.state.selection.content();
|
|
313
|
-
return a.dispatch(a.state.tr.replaceSelection(new E(
|
|
313
|
+
return a.dispatch(a.state.tr.replaceSelection(new E(s.content, e.openStart, e.openEnd)).scrollIntoView());
|
|
314
314
|
}
|
|
315
|
-
let c = n.get(r), l = D.fromSchema(c).serializeFragment(
|
|
315
|
+
let c = n.get(r), l = D.fromSchema(c).serializeFragment(s.content), u = k.fromSchema(c).parseSlice(l), d = o(u);
|
|
316
316
|
if (d) {
|
|
317
317
|
a.dispatch(a.state.tr.replaceSelectionWith(d, !0));
|
|
318
318
|
return;
|
|
@@ -334,18 +334,18 @@ function Q() {
|
|
|
334
334
|
}
|
|
335
335
|
function ve(e, t = !1) {
|
|
336
336
|
return (n) => {
|
|
337
|
-
let
|
|
337
|
+
let o = n.get(p), s = n.get(i)(e);
|
|
338
338
|
if (!s) return;
|
|
339
339
|
if (!t) {
|
|
340
|
-
let { state: e } =
|
|
341
|
-
return
|
|
340
|
+
let { state: e } = o;
|
|
341
|
+
return o.dispatch(e.tr.replace(0, e.doc.content.size, new E(s.content, 0, 0)));
|
|
342
342
|
}
|
|
343
343
|
let c = n.get(r), l = n.get(re)({
|
|
344
344
|
schema: c,
|
|
345
345
|
doc: s,
|
|
346
|
-
plugins: n.get(
|
|
346
|
+
plugins: n.get(a)
|
|
347
347
|
}), u = A.create(l);
|
|
348
|
-
|
|
348
|
+
o.updateState(u);
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
351
|
function ye(e, t) {
|