@clevertask/scribe 0.1.19 → 0.1.21
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/README.md +2 -2
- package/dist/{BarMenu-C9tCdvyV.js → BarMenu-tPZoiOba.js} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/components/Menu/BarMenu.js +1 -1
- package/dist/components/Menu/BubbleMenu.js +2 -2
- package/dist/components/Menu/CalloutBubbleMenu.js +2 -2
- package/dist/components/Menu/LinkBubbleMenu.js +6 -6
- package/dist/components/Menu/Mobile/ListOptionBar.js +1 -1
- package/dist/components/Menu/TableBubbleMenu.js +2 -2
- package/dist/components/Menu/linkBubbleMenuPlugin.js +1 -1
- package/dist/components/Scribe/extension/callout.js +1 -1
- package/dist/components/Scribe/extension/emoji/suggest.js +3 -3
- package/dist/components/Scribe/extension/extension-link.js +1 -1
- package/dist/components/Scribe/extension/extension-markdown-paste.js +2 -2
- package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/commands.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/index.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/node-view.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/render-html.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/resolver.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/schema.js +1 -1
- package/dist/components/Scribe/extension/index.js +1 -1
- package/dist/components/Scribe/extension/resizable-table.js +1 -1
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +2 -2
- package/dist/components/Scribe/extension/slashCommand/index.js +2 -2
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +2 -2
- package/dist/components/Scribe/extension/tableOfContents.js +3 -3
- package/dist/components/Scribe/index.js +4 -4
- package/dist/{dist-CzXFZHMF.js → dist-Cer8ra_P.js} +55 -39
- package/dist/{dist-CkWsQ5Lj.js → dist-ClNucvAM.js} +612 -819
- package/dist/{dist-DRPH9MfF.js → dist-D31OwZrM.js} +231 -168
- package/dist/{extension-CKcvyrIW.js → extension-B-7qHi2u.js} +2 -2
- package/dist/{extension-link-yMrg9JOz.js → extension-link-BQrkQZHi.js} +23 -23
- package/dist/{html-to-markdown-pY8ngCXa.js → html-to-markdown-D7PT8MhP.js} +1 -1
- package/dist/main.js +2 -2
- package/dist/{markdown-to-html-COv0iaxr.js → markdown-to-html-ChfR7P_Y.js} +39 -11
- package/dist/{menus-D1cst_3I.js → menus-DLKcWlVX.js} +56 -54
- package/dist/{resizable-table-D0mls3aB.js → resizable-table-DgMCiXeO.js} +28 -31
- package/dist/{schema-extensions-ChhE6XCo.js → schema-extensions-BMJIwh-u.js} +309 -314
- package/dist/schema-extensions.js +1 -1
- package/dist/schema.js +1 -1
- package/dist/{tippy.esm-DOXqN1Qm.js → tippy.esm-8vSV0zL7.js} +6 -6
- package/dist/utils/html-to-markdown.js +1 -1
- package/dist/utils/index.js +4 -4
- package/dist/utils/markdown-to-html.js +1 -1
- package/package.json +59 -56
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import { t as ce } from "./dist-
|
|
3
|
-
import { n as le, t as ue } from "./resizable-table-
|
|
4
|
-
import { n as de, t as fe } from "./extension-link-
|
|
1
|
+
import { A as e, B as t, C as n, D as r, F as i, H as a, I as o, L as s, M as c, O as l, P as u, R as d, S as f, U as p, V as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, i as S, j as C, k as ee, l as te, n as w, p as ne, r as re, s as ie, u as ae, w as oe, x as se } from "./dist-ClNucvAM.js";
|
|
2
|
+
import { t as ce } from "./dist-Cer8ra_P.js";
|
|
3
|
+
import { n as le, t as ue } from "./resizable-table-DgMCiXeO.js";
|
|
4
|
+
import { n as de, t as fe } from "./extension-link-BQrkQZHi.js";
|
|
5
5
|
import { Callout as pe } from "./components/Scribe/extension/callout.js";
|
|
6
6
|
import { ExternalLinkPreviewSchema as me } from "./components/Scribe/extension/external-link-preview/schema.js";
|
|
7
7
|
import { NodeSelection as he, Plugin as ge, PluginKey as _e, Selection as ve, TextSelection as ye } from "@tiptap/pm/state";
|
|
@@ -30527,7 +30527,7 @@ function Re(e, t = JSON.stringify) {
|
|
|
30527
30527
|
function ze(e, t) {
|
|
30528
30528
|
return t.find((t) => e === t.name || t.shortcodes.includes(e));
|
|
30529
30529
|
}
|
|
30530
|
-
var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([a-zA-Z0-9_+-]+):/g, Ue =
|
|
30530
|
+
var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([a-zA-Z0-9_+-]+):/g, Ue = g.create({
|
|
30531
30531
|
name: "emoji",
|
|
30532
30532
|
inline: !0,
|
|
30533
30533
|
group: "inline",
|
|
@@ -30542,7 +30542,9 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30542
30542
|
char: ":",
|
|
30543
30543
|
pluginKey: Be,
|
|
30544
30544
|
command: ({ editor: e, range: t, props: n }) => {
|
|
30545
|
-
|
|
30545
|
+
var r;
|
|
30546
|
+
let i = e.view.state.selection.$to.nodeAfter;
|
|
30547
|
+
i != null && (r = i.text) != null && r.startsWith(" ") && (t.to += 1), e.chain().focus().insertContentAt(t, [{
|
|
30546
30548
|
type: this.name,
|
|
30547
30549
|
attrs: n
|
|
30548
30550
|
}, {
|
|
@@ -30615,7 +30617,7 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30615
30617
|
},
|
|
30616
30618
|
addInputRules() {
|
|
30617
30619
|
let e = [];
|
|
30618
|
-
if (e.push(new
|
|
30620
|
+
if (e.push(new re({
|
|
30619
30621
|
find: Ve,
|
|
30620
30622
|
handler: ({ range: e, match: t, chain: n }) => {
|
|
30621
30623
|
let r = t[1];
|
|
@@ -30625,8 +30627,8 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30625
30627
|
}).command(({ tr: e, state: t }) => (e.setStoredMarks(t.doc.resolve(t.selection.to - 1).marks()), !0)).run();
|
|
30626
30628
|
}
|
|
30627
30629
|
})), this.options.enableEmoticons) {
|
|
30628
|
-
let t = this.options.emojis.flatMap((e) => e.emoticons).filter((e) => e), n = RegExp(`(?:^|\\s)(${t.map((e) =>
|
|
30629
|
-
e.push(
|
|
30630
|
+
let t = this.options.emojis.flatMap((e) => e.emoticons).filter((e) => e), n = RegExp(`(?:^|\\s)(${t.map((e) => b(e)).join("|")}) $`);
|
|
30631
|
+
e.push(s({
|
|
30630
30632
|
find: n,
|
|
30631
30633
|
type: this.type,
|
|
30632
30634
|
getAttributes: (e) => {
|
|
@@ -30638,7 +30640,7 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30638
30640
|
return e;
|
|
30639
30641
|
},
|
|
30640
30642
|
addPasteRules() {
|
|
30641
|
-
return [new
|
|
30643
|
+
return [new ie({
|
|
30642
30644
|
find: He,
|
|
30643
30645
|
handler: ({ range: e, match: t, chain: n }) => {
|
|
30644
30646
|
let r = t[1] || "", i = t[2];
|
|
@@ -30662,7 +30664,7 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30662
30664
|
key: new _e("emoji"),
|
|
30663
30665
|
props: {
|
|
30664
30666
|
handleKeyDown: (e, t) => {
|
|
30665
|
-
if (!
|
|
30667
|
+
if (!ee()) return !1;
|
|
30666
30668
|
let n = t.key === "ArrowLeft", r = t.key === "ArrowRight";
|
|
30667
30669
|
if (!n && !r || t.shiftKey || t.ctrlKey || t.altKey || t.metaKey) return !1;
|
|
30668
30670
|
let { state: i } = e, { selection: a } = i;
|
|
@@ -30691,10 +30693,10 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30691
30693
|
}
|
|
30692
30694
|
},
|
|
30693
30695
|
appendTransaction: (e, t, n) => {
|
|
30694
|
-
if (this.editor.view.composing || !
|
|
30695
|
-
let { tr: r } = n, i =
|
|
30696
|
-
if (
|
|
30697
|
-
n.doc.resolve(e.from).parent.type.spec.code ||
|
|
30696
|
+
if (this.editor.view.composing || !e.some((e) => e.docChanged) || t.doc.eq(n.doc)) return;
|
|
30697
|
+
let { tr: r } = n, i = y(t.doc, e);
|
|
30698
|
+
if (x(i).forEach(({ newRange: e }) => {
|
|
30699
|
+
n.doc.resolve(e.from).parent.type.spec.code || ne(n.doc, e, (e) => e.type.isText).forEach(({ node: e, pos: t }) => {
|
|
30698
30700
|
e.text && [...e.text.matchAll(ke())].forEach((e) => {
|
|
30699
30701
|
if (e.index === void 0) return;
|
|
30700
30702
|
let i = e[0], a = Le(i, this.options.emojis);
|
|
@@ -30709,7 +30711,7 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30709
30711
|
}
|
|
30710
30712
|
})];
|
|
30711
30713
|
}
|
|
30712
|
-
}), We = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, Ge = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, Ke =
|
|
30714
|
+
}), We = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, Ge = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, Ke = S.create({
|
|
30713
30715
|
name: "highlight",
|
|
30714
30716
|
addOptions() {
|
|
30715
30717
|
return {
|
|
@@ -30720,7 +30722,7 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30720
30722
|
addAttributes() {
|
|
30721
30723
|
return this.options.multicolor ? { color: {
|
|
30722
30724
|
default: null,
|
|
30723
|
-
parseHTML: (e) => e.getAttribute("data-color") ||
|
|
30725
|
+
parseHTML: (e) => e.getAttribute("data-color") || oe(e, "background-color") || e.style.backgroundColor,
|
|
30724
30726
|
renderHTML: (e) => e.color ? {
|
|
30725
30727
|
"data-color": e.color,
|
|
30726
30728
|
style: `background-color: ${e.color}; color: inherit`
|
|
@@ -30767,18 +30769,18 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30767
30769
|
return { "Mod-Shift-h": () => this.editor.commands.toggleHighlight() };
|
|
30768
30770
|
},
|
|
30769
30771
|
addInputRules() {
|
|
30770
|
-
return [
|
|
30772
|
+
return [u({
|
|
30771
30773
|
find: We,
|
|
30772
30774
|
type: this.type
|
|
30773
30775
|
})];
|
|
30774
30776
|
},
|
|
30775
30777
|
addPasteRules() {
|
|
30776
|
-
return [
|
|
30778
|
+
return [i({
|
|
30777
30779
|
find: Ge,
|
|
30778
30780
|
type: this.type
|
|
30779
30781
|
})];
|
|
30780
30782
|
}
|
|
30781
|
-
}), qe = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Je =
|
|
30783
|
+
}), qe = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Je = g.create({
|
|
30782
30784
|
name: "image",
|
|
30783
30785
|
addOptions() {
|
|
30784
30786
|
return {
|
|
@@ -30821,7 +30823,7 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30821
30823
|
},
|
|
30822
30824
|
addNodeView() {
|
|
30823
30825
|
if (!this.options.resize || !this.options.resize.enabled || typeof document > "u") return null;
|
|
30824
|
-
let { directions: e, minWidth:
|
|
30826
|
+
let { directions: e, minWidth: t, minHeight: r, alwaysPreserveAspectRatio: i } = this.options.resize, a = /* @__PURE__ */ new Set([
|
|
30825
30827
|
"src",
|
|
30826
30828
|
"width",
|
|
30827
30829
|
"height"
|
|
@@ -30846,7 +30848,7 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30846
30848
|
d.hasAttribute("src") && d.removeAttribute("src"), d.src !== "" && (d.src = "");
|
|
30847
30849
|
};
|
|
30848
30850
|
m(l.src);
|
|
30849
|
-
let h = new
|
|
30851
|
+
let h = new v({
|
|
30850
30852
|
element: d,
|
|
30851
30853
|
editor: u,
|
|
30852
30854
|
node: s,
|
|
@@ -30863,7 +30865,7 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30863
30865
|
},
|
|
30864
30866
|
onUpdate: (e) => {
|
|
30865
30867
|
if (e.type !== s.type) return !1;
|
|
30866
|
-
let
|
|
30868
|
+
let t = u.extensionManager.attributes.filter((t) => t.type === e.type.name), r = n(e, t);
|
|
30867
30869
|
return Object.keys(p).forEach((e) => {
|
|
30868
30870
|
!a.has(e) && !(e in r) && d.removeAttribute(e);
|
|
30869
30871
|
}), Object.entries(r).forEach(([e, t]) => {
|
|
@@ -30873,15 +30875,15 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30873
30875
|
options: {
|
|
30874
30876
|
directions: e,
|
|
30875
30877
|
min: {
|
|
30876
|
-
width:
|
|
30878
|
+
width: t,
|
|
30877
30879
|
height: r
|
|
30878
30880
|
},
|
|
30879
30881
|
preserveAspectRatio: i === !0
|
|
30880
30882
|
}
|
|
30881
|
-
}), g = h.dom,
|
|
30883
|
+
}), g = h.dom, _ = () => {
|
|
30882
30884
|
g.style.visibility = "", g.style.pointerEvents = "";
|
|
30883
30885
|
};
|
|
30884
|
-
return g.style.visibility = "hidden", g.style.pointerEvents = "none", d.complete && d.naturalWidth > 0 ?
|
|
30886
|
+
return g.style.visibility = "hidden", g.style.pointerEvents = "none", d.complete && d.naturalWidth > 0 ? _() : (d.onload = _, d.onerror = _), h;
|
|
30885
30887
|
};
|
|
30886
30888
|
},
|
|
30887
30889
|
addCommands() {
|
|
@@ -30891,7 +30893,7 @@ var Be = new _e("emojiSuggestion"), Ve = /:([a-zA-Z0-9_+-]+):$/, He = /(^|\s):([
|
|
|
30891
30893
|
}) };
|
|
30892
30894
|
},
|
|
30893
30895
|
addInputRules() {
|
|
30894
|
-
return [
|
|
30896
|
+
return [s({
|
|
30895
30897
|
find: qe,
|
|
30896
30898
|
type: this.type,
|
|
30897
30899
|
getAttributes: (e) => {
|
|
@@ -31050,7 +31052,7 @@ var ct = class {
|
|
|
31050
31052
|
}
|
|
31051
31053
|
reportNonstrict(e, t, n) {
|
|
31052
31054
|
var r = this.strict;
|
|
31053
|
-
if (typeof r == "function" && (r = r(e, t, n)),
|
|
31055
|
+
if (typeof r == "function" && (r = r(e, t, n)), r && r !== "ignore") {
|
|
31054
31056
|
if (r === !0 || r === "error") throw new T("LaTeX-incompatible input and strict mode is set to 'error': " + (t + " [" + e + "]"), n);
|
|
31055
31057
|
r === "warn" ? typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (t + " [" + e + "]")) : typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + r + "': " + t + " [" + e + "]"));
|
|
31056
31058
|
}
|
|
@@ -46795,7 +46797,7 @@ var Y = class {
|
|
|
46795
46797
|
}
|
|
46796
46798
|
}, Hr = /* @__PURE__ */ new Set(["\\imath", "\\jmath"]), Ur = /* @__PURE__ */ new Set(["mrow", "mtable"]), Wr = function(e, t, n) {
|
|
46797
46799
|
var r, i;
|
|
46798
|
-
return k[t][e] && k[t][e].replace && e.charCodeAt(0) !== 55349 && !
|
|
46800
|
+
return k[t][e] && k[t][e].replace && e.charCodeAt(0) !== 55349 && (!Object.prototype.hasOwnProperty.call(Cn, e) || (n == null || (r = n.fontFamily) == null ? void 0 : r.slice(4, 6)) !== "tt" && (n == null || (i = n.font) == null ? void 0 : i.slice(4, 6)) !== "tt") && (e = k[t][e].replace), new X(e);
|
|
46799
46801
|
}, Gr = function(e) {
|
|
46800
46802
|
return e.length === 1 ? e[0] : new Y("mrow", e);
|
|
46801
46803
|
}, Kr = {
|
|
@@ -48118,7 +48120,7 @@ K({
|
|
|
48118
48120
|
handler(e, t) {
|
|
48119
48121
|
var n = e.parser, r = yi(Q(t[0], "ordgroup"), "\\@char has non-numeric argument"), i = parseInt(r), a;
|
|
48120
48122
|
if (isNaN(i)) throw new T("\\@char has non-numeric argument " + r);
|
|
48121
|
-
if (i < 0 || i
|
|
48123
|
+
if (i < 0 || i > 1114111) throw new T("\\@char with invalid code point " + r);
|
|
48122
48124
|
return i <= 65535 ? a = String.fromCharCode(i) : (i -= 65536, a = String.fromCharCode((i >> 10) + 55296, (i & 1023) + 56320)), {
|
|
48123
48125
|
type: "textord",
|
|
48124
48126
|
mode: n.mode,
|
|
@@ -48348,32 +48350,32 @@ var Ri = function(e, t, n) {
|
|
|
48348
48350
|
}
|
|
48349
48351
|
var S = m + v + y, C = S + Math.max(0, Math.ceil((t - S) / (b * g))) * b * g, ee = r.fontMetrics().axisHeight;
|
|
48350
48352
|
n && (ee *= r.sizeMultiplier);
|
|
48351
|
-
var
|
|
48353
|
+
var te = C / 2 - ee, w = [];
|
|
48352
48354
|
if (u.length > 0) {
|
|
48353
48355
|
var ne = C - m - v, re = Math.round(C * 1e3), ie = Vt(u, Math.round(ne * 1e3)), ae = new on(u, ie), oe = O(d / 1e3), se = O(re / 1e3), ce = cr([], [new an([ae], {
|
|
48354
48356
|
width: oe,
|
|
48355
48357
|
height: se,
|
|
48356
48358
|
viewBox: "0 0 " + d + " " + re
|
|
48357
48359
|
})], r);
|
|
48358
|
-
ce.height = re / 1e3, ce.style.width = oe, ce.style.height = se,
|
|
48360
|
+
ce.height = re / 1e3, ce.style.width = oe, ce.style.height = se, w.push({
|
|
48359
48361
|
type: "elem",
|
|
48360
48362
|
elem: ce
|
|
48361
48363
|
});
|
|
48362
48364
|
} else {
|
|
48363
|
-
if (
|
|
48365
|
+
if (w.push(Wi(l, f, i)), w.push(qi), s === null) {
|
|
48364
48366
|
var le = C - m - v + 2 * Ki;
|
|
48365
|
-
|
|
48367
|
+
w.push(Gi(c, le, r));
|
|
48366
48368
|
} else {
|
|
48367
48369
|
var ue = (C - m - v - y) / 2 + 2 * Ki;
|
|
48368
|
-
|
|
48370
|
+
w.push(Gi(c, ue, r)), w.push(qi), w.push(Wi(s, f, i)), w.push(qi), w.push(Gi(c, ue, r));
|
|
48369
48371
|
}
|
|
48370
|
-
|
|
48372
|
+
w.push(qi), w.push(Wi(o, f, i));
|
|
48371
48373
|
}
|
|
48372
48374
|
var de = r.havingBaseStyle(E.TEXT);
|
|
48373
48375
|
return zi(U(["delimsizing", "mult"], [W({
|
|
48374
48376
|
positionType: "bottom",
|
|
48375
|
-
positionData:
|
|
48376
|
-
children:
|
|
48377
|
+
positionData: te,
|
|
48378
|
+
children: w
|
|
48377
48379
|
})], de), E.TEXT, r, a);
|
|
48378
48380
|
}, Zi = 80, Qi = .08, $i = function(e, t, n, r, i) {
|
|
48379
48381
|
return cr(["hide-tail"], [new an([new on(e, Rt(e, r, n))], {
|
|
@@ -49088,12 +49090,12 @@ var ka = function(e, t) {
|
|
|
49088
49090
|
var C = J(y[r], t);
|
|
49089
49091
|
x < C.depth && (x = C.depth), b < C.height && (b = C.height), S.cells[r] = C;
|
|
49090
49092
|
}
|
|
49091
|
-
var ee = e.rowGaps[n],
|
|
49092
|
-
ee && (
|
|
49093
|
+
var ee = e.rowGaps[n], te = 0;
|
|
49094
|
+
ee && (te = D(ee, t), te > 0 && (te += g, x < te && (x = te), te = 0)), e.addJot && n < e.body.length - 1 && (x += p), S.height = b, S.depth = x, _ += b, S.pos = _, _ += x + te, s[n] = S, v(a[n + 1]);
|
|
49093
49095
|
}
|
|
49094
|
-
var
|
|
49096
|
+
var w = _ / 2 + t.fontMetrics().axisHeight, ne = e.cols || [], re = [], ie, ae, oe = [];
|
|
49095
49097
|
if (e.tags && e.tags.some((e) => e)) for (n = 0; n < i; ++n) {
|
|
49096
|
-
var se = s[n], ce = se.pos -
|
|
49098
|
+
var se = s[n], ce = se.pos - w, le = e.tags[n], ue = void 0;
|
|
49097
49099
|
ue = le === !0 ? U(["eqn-num"], [], t) : le === !1 ? U([], [], t) : U([], Mr(le, t, !0), t), ue.depth = se.depth, ue.height = se.height, oe.push({
|
|
49098
49100
|
type: "elem",
|
|
49099
49101
|
elem: ue,
|
|
@@ -49106,7 +49108,7 @@ var ka = function(e, t) {
|
|
|
49106
49108
|
if (fe || (ie = U(["arraycolsep"], []), ie.style.width = O(t.fontMetrics().doubleRuleSep), re.push(ie)), de.separator === "|" || de.separator === ":") {
|
|
49107
49109
|
var me = de.separator === "|" ? "solid" : "dashed", he = U(["vertical-separator"], [], t);
|
|
49108
49110
|
he.style.height = O(_), he.style.borderRightWidth = O(l), he.style.borderRightStyle = me, he.style.margin = "0 " + O(-l / 2);
|
|
49109
|
-
var ge = _ -
|
|
49111
|
+
var ge = _ - w;
|
|
49110
49112
|
ge && (he.style.verticalAlign = O(-ge)), re.push(he);
|
|
49111
49113
|
} else throw new T("Invalid separator type: " + de.separator);
|
|
49112
49114
|
ae++, de = ne[ae], fe = !1;
|
|
@@ -49118,7 +49120,7 @@ var ka = function(e, t) {
|
|
|
49118
49120
|
for (n = 0; n < i; ++n) {
|
|
49119
49121
|
var ye = s[n], be = ye.cells[r];
|
|
49120
49122
|
if (be) {
|
|
49121
|
-
var xe = ye.pos -
|
|
49123
|
+
var xe = ye.pos - w;
|
|
49122
49124
|
be.depth = ye.depth, be.height = ye.height, ve.push({
|
|
49123
49125
|
type: "elem",
|
|
49124
49126
|
elem: be,
|
|
@@ -49140,7 +49142,7 @@ var ka = function(e, t) {
|
|
|
49140
49142
|
elem: we,
|
|
49141
49143
|
shift: 0
|
|
49142
49144
|
}]; c.length > 0;) {
|
|
49143
|
-
var Oe = c.pop(), ke = Oe.pos -
|
|
49145
|
+
var Oe = c.pop(), ke = Oe.pos - w;
|
|
49144
49146
|
Oe.isDashed ? De.push({
|
|
49145
49147
|
type: "elem",
|
|
49146
49148
|
elem: Ee,
|
|
@@ -49189,7 +49191,7 @@ var ka = function(e, t) {
|
|
|
49189
49191
|
} else e.colSeparationType === "alignat" || e.colSeparationType === "gather" ? l.setAttribute("columnspacing", "0em") : e.colSeparationType === "small" ? l.setAttribute("columnspacing", "0.2778em") : e.colSeparationType === "CD" ? l.setAttribute("columnspacing", "0.5em") : l.setAttribute("columnspacing", "1em");
|
|
49190
49192
|
var C = "", ee = e.hLinesBeforeRow;
|
|
49191
49193
|
d += ee[0].length > 0 ? "left " : "", d += ee[ee.length - 1].length > 0 ? "right " : "";
|
|
49192
|
-
for (var
|
|
49194
|
+
for (var te = 1; te < ee.length - 1; te++) C += ee[te].length === 0 ? "none " : ee[te][0] ? "dashed " : "solid ";
|
|
49193
49195
|
return /[sd]/.test(C) && l.setAttribute("rowlines", C.trim()), d !== "" && (l = new Y("menclose", [l]), l.setAttribute("notation", d.trim())), e.arraystretch && e.arraystretch < 1 && (l = new Y("mstyle", [l]), l.setAttribute("scriptlevel", "1")), l;
|
|
49194
49196
|
}, Ma = function(e, t) {
|
|
49195
49197
|
e.envName.includes("ed") || wa(e);
|
|
@@ -52585,7 +52587,7 @@ var Mo = {
|
|
|
52585
52587
|
var r = e[n];
|
|
52586
52588
|
if (r.type === "textord") {
|
|
52587
52589
|
var i = r.text, a = e[n + 1];
|
|
52588
|
-
if (
|
|
52590
|
+
if (a && a.type === "textord") {
|
|
52589
52591
|
if (i === "-" && a.text === "-") {
|
|
52590
52592
|
var o = e[n + 2];
|
|
52591
52593
|
n + 1 < t && o && o.type === "textord" && o.text === "-" ? (e.splice(n, 3, {
|
|
@@ -52713,7 +52715,7 @@ var Vo = function(e, t) {
|
|
|
52713
52715
|
return Uo(t, e, n);
|
|
52714
52716
|
}
|
|
52715
52717
|
}, Go = {
|
|
52716
|
-
version: "0.18.
|
|
52718
|
+
version: "0.18.5",
|
|
52717
52719
|
render: Bo,
|
|
52718
52720
|
renderToString: Vo,
|
|
52719
52721
|
ParseError: T,
|
|
@@ -52740,7 +52742,7 @@ var Vo = function(e, t) {
|
|
|
52740
52742
|
PathNode: on,
|
|
52741
52743
|
LineNode: sn
|
|
52742
52744
|
}
|
|
52743
|
-
}, Ko =
|
|
52745
|
+
}, Ko = g.create({
|
|
52744
52746
|
name: "blockMath",
|
|
52745
52747
|
group: "block",
|
|
52746
52748
|
atom: !0,
|
|
@@ -52812,7 +52814,7 @@ var Vo = function(e, t) {
|
|
|
52812
52814
|
}
|
|
52813
52815
|
},
|
|
52814
52816
|
addInputRules() {
|
|
52815
|
-
return [new
|
|
52817
|
+
return [new re({
|
|
52816
52818
|
find: /^\$\$\$([^$]+)\$\$\$$/,
|
|
52817
52819
|
handler: ({ state: e, range: t, match: n }) => {
|
|
52818
52820
|
let [, r] = n, { tr: i } = e, a = e.doc.resolve(t.from), o = this.type.create({ latex: r }), s = a.depth > 0 && a.parent.isTextblock && t.from === a.start() && t.to === a.end() && a.node(-1).canReplaceWith(a.index(-1), a.indexAfter(-1), this.type) ? {
|
|
@@ -52848,7 +52850,7 @@ var Vo = function(e, t) {
|
|
|
52848
52850
|
};
|
|
52849
52851
|
};
|
|
52850
52852
|
}
|
|
52851
|
-
}), qo =
|
|
52853
|
+
}), qo = g.create({
|
|
52852
52854
|
name: "inlineMath",
|
|
52853
52855
|
group: "inline",
|
|
52854
52856
|
inline: !0,
|
|
@@ -52914,7 +52916,7 @@ var Vo = function(e, t) {
|
|
|
52914
52916
|
}
|
|
52915
52917
|
},
|
|
52916
52918
|
addInputRules() {
|
|
52917
|
-
return [new
|
|
52919
|
+
return [new re({
|
|
52918
52920
|
find: /(?<!\$)(\$\$([^$\n]+?)\$\$)(?!\$)/,
|
|
52919
52921
|
handler: ({ state: e, range: t, match: n }) => {
|
|
52920
52922
|
let r = n[2], { tr: i } = e, a = t.from, o = t.to;
|
|
@@ -52965,12 +52967,7 @@ var Vo = function(e, t) {
|
|
|
52965
52967
|
katexOptions: this.options.katexOptions
|
|
52966
52968
|
})];
|
|
52967
52969
|
}
|
|
52968
|
-
}), Yo =
|
|
52969
|
-
for (var n in t) Yo(e, n, {
|
|
52970
|
-
get: t[n],
|
|
52971
|
-
enumerable: !0
|
|
52972
|
-
});
|
|
52973
|
-
}, Zo = "listItem", Qo = "textStyle", $o = /^\s*([-+*])\s$/, es = h.create({
|
|
52970
|
+
}), Yo = "listItem", Xo = "textStyle", Zo = /^\s*([-+*])\s$/, Qo = g.create({
|
|
52974
52971
|
name: "bulletList",
|
|
52975
52972
|
addOptions() {
|
|
52976
52973
|
return {
|
|
@@ -53002,26 +52999,26 @@ var Vo = function(e, t) {
|
|
|
53002
52999
|
renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n") : "",
|
|
53003
53000
|
markdownOptions: { indentsContent: !0 },
|
|
53004
53001
|
addCommands() {
|
|
53005
|
-
return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
53002
|
+
return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Yo, this.editor.getAttributes(Xo)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
|
|
53006
53003
|
},
|
|
53007
53004
|
addKeyboardShortcuts() {
|
|
53008
53005
|
return { "Mod-Shift-8": () => this.editor.commands.toggleBulletList() };
|
|
53009
53006
|
},
|
|
53010
53007
|
addInputRules() {
|
|
53011
53008
|
let e = p({
|
|
53012
|
-
find:
|
|
53009
|
+
find: Zo,
|
|
53013
53010
|
type: this.type
|
|
53014
53011
|
});
|
|
53015
53012
|
return (this.options.keepMarks || this.options.keepAttributes) && (e = p({
|
|
53016
|
-
find:
|
|
53013
|
+
find: Zo,
|
|
53017
53014
|
type: this.type,
|
|
53018
53015
|
keepMarks: this.options.keepMarks,
|
|
53019
53016
|
keepAttributes: this.options.keepAttributes,
|
|
53020
|
-
getAttributes: () => this.editor.getAttributes(
|
|
53017
|
+
getAttributes: () => this.editor.getAttributes(Xo),
|
|
53021
53018
|
editor: this.editor
|
|
53022
53019
|
})), [e];
|
|
53023
53020
|
}
|
|
53024
|
-
}),
|
|
53021
|
+
}), $o = (e, t, n) => {
|
|
53025
53022
|
let { selection: r } = e;
|
|
53026
53023
|
if (!r.empty) return null;
|
|
53027
53024
|
let { $from: i } = r;
|
|
@@ -53052,24 +53049,24 @@ var Vo = function(e, t) {
|
|
|
53052
53049
|
insertPos: i.after(a),
|
|
53053
53050
|
items: f
|
|
53054
53051
|
};
|
|
53055
|
-
},
|
|
53056
|
-
let i =
|
|
53052
|
+
}, es = (e, t, n, r) => {
|
|
53053
|
+
let i = $o(e, n, r);
|
|
53057
53054
|
if (!i) return !1;
|
|
53058
53055
|
let { selection: a } = e, { nestedList: o, nestedListPos: s, insertPos: c, items: l } = i, u = e.tr;
|
|
53059
53056
|
u.delete(s, s + o.nodeSize);
|
|
53060
53057
|
let d = u.mapping.map(c);
|
|
53061
53058
|
return u.insert(d, be.from(l)), u.setSelection(a.map(u.doc, u.mapping)), t && t(u), !0;
|
|
53062
|
-
},
|
|
53059
|
+
}, ts = (e, t, n) => es(e.state, e.view.dispatch, t, n), ns = (e, t) => w.create({
|
|
53063
53060
|
name: `${e}BranchingDeleteKeymap`,
|
|
53064
53061
|
priority: 101,
|
|
53065
53062
|
addKeyboardShortcuts() {
|
|
53066
|
-
let n = () =>
|
|
53063
|
+
let n = () => ts(this.editor, e, t);
|
|
53067
53064
|
return {
|
|
53068
53065
|
Delete: n,
|
|
53069
53066
|
"Mod-Delete": n
|
|
53070
53067
|
};
|
|
53071
53068
|
}
|
|
53072
|
-
}),
|
|
53069
|
+
}), rs = [
|
|
53073
53070
|
[1e3, "m"],
|
|
53074
53071
|
[900, "cm"],
|
|
53075
53072
|
[500, "d"],
|
|
@@ -53083,20 +53080,20 @@ var Vo = function(e, t) {
|
|
|
53083
53080
|
[5, "v"],
|
|
53084
53081
|
[4, "iv"],
|
|
53085
53082
|
[1, "i"]
|
|
53086
|
-
],
|
|
53087
|
-
function
|
|
53083
|
+
], is = "abcdefghijklmnopqrstuvwxyz", as = String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;
|
|
53084
|
+
function os(e) {
|
|
53088
53085
|
let t = e, n = "";
|
|
53089
|
-
for (let [e, r] of
|
|
53086
|
+
for (let [e, r] of rs) for (; t >= e;) n += r, t -= e;
|
|
53090
53087
|
return n;
|
|
53091
53088
|
}
|
|
53092
|
-
function
|
|
53093
|
-
return
|
|
53089
|
+
function ss(e) {
|
|
53090
|
+
return os(e).toUpperCase();
|
|
53094
53091
|
}
|
|
53095
|
-
function
|
|
53092
|
+
function cs(e) {
|
|
53096
53093
|
let t = e.toLowerCase(), n = 0, r = 0;
|
|
53097
53094
|
for (; n < t.length;) {
|
|
53098
53095
|
let e = !1;
|
|
53099
|
-
for (let [i, a] of
|
|
53096
|
+
for (let [i, a] of rs) if (t.startsWith(a, n)) {
|
|
53100
53097
|
r += i, n += a.length, e = !0;
|
|
53101
53098
|
break;
|
|
53102
53099
|
}
|
|
@@ -53104,12 +53101,12 @@ function us(e) {
|
|
|
53104
53101
|
}
|
|
53105
53102
|
return r;
|
|
53106
53103
|
}
|
|
53107
|
-
function
|
|
53104
|
+
function ls(e) {
|
|
53108
53105
|
if (!/^[ivxlcdmIVXLCDM]+$/.test(e)) return !1;
|
|
53109
|
-
let t =
|
|
53110
|
-
return t <= 0 ? !1 : (e === e.toLowerCase() ?
|
|
53106
|
+
let t = cs(e);
|
|
53107
|
+
return t <= 0 ? !1 : (e === e.toLowerCase() ? os(t) : ss(t)) === e;
|
|
53111
53108
|
}
|
|
53112
|
-
function
|
|
53109
|
+
function us(e) {
|
|
53113
53110
|
let t = e.toLowerCase();
|
|
53114
53111
|
if (t.length === 1) return t.charCodeAt(0) - 97 + 1;
|
|
53115
53112
|
if (t.length === 2) {
|
|
@@ -53118,82 +53115,82 @@ function fs(e) {
|
|
|
53118
53115
|
}
|
|
53119
53116
|
return 0;
|
|
53120
53117
|
}
|
|
53121
|
-
function
|
|
53122
|
-
if (e <= 26) return
|
|
53118
|
+
function ds(e) {
|
|
53119
|
+
if (e <= 26) return is[e - 1];
|
|
53123
53120
|
let t = Math.floor((e - 1) / 26) - 1, n = (e - 1) % 26;
|
|
53124
|
-
return t < 0 ?
|
|
53121
|
+
return t < 0 ? is[n] : is[t] + is[n];
|
|
53125
53122
|
}
|
|
53126
|
-
function
|
|
53127
|
-
if (
|
|
53128
|
-
if (
|
|
53123
|
+
function fs(e) {
|
|
53124
|
+
if (e && !/^\d+$/.test(e)) {
|
|
53125
|
+
if (ls(e)) return e === e.toLowerCase() ? "i" : "I";
|
|
53129
53126
|
if (/^[a-z]{1,2}$/.test(e)) return "a";
|
|
53130
53127
|
if (/^[A-Z]{1,2}$/.test(e)) return "A";
|
|
53131
53128
|
}
|
|
53132
53129
|
}
|
|
53133
|
-
function
|
|
53130
|
+
function ps(e) {
|
|
53134
53131
|
if (/^\d+$/.test(e)) return parseInt(e, 10);
|
|
53135
|
-
let t =
|
|
53136
|
-
if (t === "i" || t === "I") return
|
|
53132
|
+
let t = fs(e);
|
|
53133
|
+
if (t === "i" || t === "I") return cs(e);
|
|
53137
53134
|
if (t === "a" || t === "A") {
|
|
53138
|
-
let t =
|
|
53135
|
+
let t = us(e);
|
|
53139
53136
|
return t > 0 ? t : 1;
|
|
53140
53137
|
}
|
|
53141
53138
|
let n = parseInt(e, 10);
|
|
53142
53139
|
return Number.isNaN(n) ? 1 : n;
|
|
53143
53140
|
}
|
|
53144
|
-
function
|
|
53141
|
+
function ms(e, t) {
|
|
53145
53142
|
if (e === "numeric") return String(t);
|
|
53146
53143
|
switch (e) {
|
|
53147
|
-
case "a": return
|
|
53148
|
-
case "A": return
|
|
53149
|
-
case "i": return
|
|
53150
|
-
case "I": return
|
|
53144
|
+
case "a": return ds(t);
|
|
53145
|
+
case "A": return ds(t).toUpperCase();
|
|
53146
|
+
case "i": return os(t);
|
|
53147
|
+
case "I": return ss(t);
|
|
53151
53148
|
default: return String(t);
|
|
53152
53149
|
}
|
|
53153
53150
|
}
|
|
53154
|
-
function
|
|
53151
|
+
function hs(e) {
|
|
53155
53152
|
if (e.length === 0) return !1;
|
|
53156
|
-
let t =
|
|
53153
|
+
let t = fs(e[0]) ?? "numeric", n = ps(e[0]);
|
|
53157
53154
|
if (n < 1) return !1;
|
|
53158
53155
|
for (let r = 0; r < e.length; r++) {
|
|
53159
|
-
let i =
|
|
53156
|
+
let i = ms(t, n + r);
|
|
53160
53157
|
if (e[r] !== i) return !1;
|
|
53161
53158
|
}
|
|
53162
53159
|
return !0;
|
|
53163
53160
|
}
|
|
53164
|
-
function
|
|
53161
|
+
function gs(e) {
|
|
53165
53162
|
return {
|
|
53166
|
-
type:
|
|
53167
|
-
start:
|
|
53163
|
+
type: fs(e),
|
|
53164
|
+
start: ps(e)
|
|
53168
53165
|
};
|
|
53169
53166
|
}
|
|
53170
|
-
function
|
|
53171
|
-
let { type: t, start: n } =
|
|
53167
|
+
function _s(e) {
|
|
53168
|
+
let { type: t, start: n } = gs(e), r = {};
|
|
53172
53169
|
return t && (r.type = t), n !== 1 && (r.start = n), r;
|
|
53173
53170
|
}
|
|
53174
|
-
function
|
|
53171
|
+
function vs(e, t, n = ". ") {
|
|
53175
53172
|
let r = t + 1;
|
|
53176
53173
|
if (!e || e === "1") return `${r}${n}`;
|
|
53177
53174
|
switch (e) {
|
|
53178
|
-
case "a": return `${
|
|
53179
|
-
case "A": return `${
|
|
53180
|
-
case "i": return `${
|
|
53181
|
-
case "I": return `${
|
|
53175
|
+
case "a": return `${ds(r)}${n}`;
|
|
53176
|
+
case "A": return `${ds(r).toUpperCase()}${n}`;
|
|
53177
|
+
case "i": return `${os(r)}${n}`;
|
|
53178
|
+
case "I": return `${ss(r)}${n}`;
|
|
53182
53179
|
default: return `${r}${n}`;
|
|
53183
53180
|
}
|
|
53184
53181
|
}
|
|
53185
|
-
function
|
|
53182
|
+
function ys(e) {
|
|
53186
53183
|
let t = e.tokens?.[0];
|
|
53187
53184
|
return !!(e.text && e.tokens?.length === 1 && t?.type === "list" && t.ordered && t.raw === e.text);
|
|
53188
53185
|
}
|
|
53189
|
-
function
|
|
53186
|
+
function bs(e, t) {
|
|
53190
53187
|
return t.tokenizeInline ? t.parseInline(t.tokenizeInline(e)) : t.parseInline([{
|
|
53191
53188
|
type: "text",
|
|
53192
53189
|
raw: e,
|
|
53193
53190
|
text: e
|
|
53194
53191
|
}]);
|
|
53195
53192
|
}
|
|
53196
|
-
var
|
|
53193
|
+
var xs = g.create({
|
|
53197
53194
|
name: "listItem",
|
|
53198
53195
|
addOptions() {
|
|
53199
53196
|
return {
|
|
@@ -53219,11 +53216,11 @@ var Cs = h.create({
|
|
|
53219
53216
|
if (e.type !== "list_item") return [];
|
|
53220
53217
|
let n = t.parseBlockChildren ?? t.parseChildren, r = [];
|
|
53221
53218
|
if (e.tokens && e.tokens.length > 0) {
|
|
53222
|
-
if (
|
|
53219
|
+
if (ys(e)) return {
|
|
53223
53220
|
type: "listItem",
|
|
53224
53221
|
content: [{
|
|
53225
53222
|
type: "paragraph",
|
|
53226
|
-
content:
|
|
53223
|
+
content: bs(e.text || "", t)
|
|
53227
53224
|
}]
|
|
53228
53225
|
};
|
|
53229
53226
|
if (e.tokens.some((e) => e.type === "paragraph")) r = n(e.tokens);
|
|
@@ -53248,16 +53245,17 @@ var Cs = h.create({
|
|
|
53248
53245
|
content: r
|
|
53249
53246
|
};
|
|
53250
53247
|
},
|
|
53251
|
-
renderMarkdown: (e,
|
|
53248
|
+
renderMarkdown: (e, n, r) => t(e, n, (e) => {
|
|
53252
53249
|
if (e.parentType === "bulletList") return "- ";
|
|
53253
53250
|
if (e.parentType === "orderedList") {
|
|
53254
|
-
|
|
53255
|
-
|
|
53251
|
+
var t, n;
|
|
53252
|
+
let r = ((t = e.meta) == null || (t = t.parentAttrs) == null ? void 0 : t.start) || 1;
|
|
53253
|
+
return vs((n = e.meta) == null || (n = n.parentAttrs) == null ? void 0 : n.type, r - 1 + (e.index || 0), ". ");
|
|
53256
53254
|
}
|
|
53257
53255
|
return "- ";
|
|
53258
|
-
},
|
|
53256
|
+
}, r, { alignNestedToPrefix: r?.parentType === "orderedList" }),
|
|
53259
53257
|
addExtensions() {
|
|
53260
|
-
return [
|
|
53258
|
+
return [ns(this.name, [this.options.bulletListTypeName, this.options.orderedListTypeName])];
|
|
53261
53259
|
},
|
|
53262
53260
|
addKeyboardShortcuts() {
|
|
53263
53261
|
return {
|
|
@@ -53266,39 +53264,25 @@ var Cs = h.create({
|
|
|
53266
53264
|
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
53267
53265
|
};
|
|
53268
53266
|
}
|
|
53269
|
-
})
|
|
53270
|
-
|
|
53271
|
-
findListItemPos: () => ws,
|
|
53272
|
-
getNextListDepth: () => Ts,
|
|
53273
|
-
handleBackspace: () => Ds,
|
|
53274
|
-
handleDelete: () => As,
|
|
53275
|
-
handleTab: () => js,
|
|
53276
|
-
hasListBefore: () => Es,
|
|
53277
|
-
hasListItemAfter: () => Ms,
|
|
53278
|
-
hasListItemBefore: () => Ns,
|
|
53279
|
-
listItemHasSubList: () => Ps,
|
|
53280
|
-
nextListIsDeeper: () => Os,
|
|
53281
|
-
nextListIsHigher: () => ks
|
|
53282
|
-
});
|
|
53283
|
-
var ws = (e, t) => {
|
|
53284
|
-
let { $from: n } = t.selection, r = oe(e, t.schema), i = null, a = n.depth, o = n.pos, s = null;
|
|
53267
|
+
}), Ss = (e, t) => {
|
|
53268
|
+
let { $from: n } = t.selection, r = se(e, t.schema), i = null, a = n.depth, o = n.pos, s = null;
|
|
53285
53269
|
for (; a > 0 && s === null;) i = n.node(a), i.type === r ? s = a : (--a, --o);
|
|
53286
53270
|
return s === null ? null : {
|
|
53287
53271
|
$pos: t.doc.resolve(o),
|
|
53288
53272
|
depth: s
|
|
53289
53273
|
};
|
|
53290
|
-
},
|
|
53291
|
-
let n =
|
|
53274
|
+
}, Cs = (e, t) => {
|
|
53275
|
+
let n = Ss(e, t);
|
|
53292
53276
|
if (!n) return !1;
|
|
53293
|
-
let [, r] =
|
|
53277
|
+
let [, r] = _(t, e, n.$pos.pos + 4);
|
|
53294
53278
|
return r;
|
|
53295
|
-
},
|
|
53279
|
+
}, ws = (e, t, n) => {
|
|
53296
53280
|
let { $anchor: r } = e.selection, i = Math.max(0, r.pos - 2), a = e.doc.resolve(i).node();
|
|
53297
53281
|
return !(!a || !n.includes(a.type.name));
|
|
53298
|
-
},
|
|
53282
|
+
}, Ts = (t, n, r) => {
|
|
53299
53283
|
if (t.commands.undoInputRule()) return !0;
|
|
53300
53284
|
if (t.state.selection.from !== t.state.selection.to) return !1;
|
|
53301
|
-
if (!e(t.state, n) &&
|
|
53285
|
+
if (!e(t.state, n) && ws(t.state, n, r)) {
|
|
53302
53286
|
let { $anchor: e } = t.state.selection, r = t.state.doc.resolve(e.before() - 1), i = [];
|
|
53303
53287
|
r.node().descendants((e, t) => {
|
|
53304
53288
|
e.type.name === n && i.push({
|
|
@@ -53314,45 +53298,33 @@ var ws = (e, t) => {
|
|
|
53314
53298
|
to: e.end() + 1
|
|
53315
53299
|
}, o.end()).joinForward().run();
|
|
53316
53300
|
}
|
|
53317
|
-
if (!e(t.state, n) || !
|
|
53301
|
+
if (!e(t.state, n) || !l(t.state)) return !1;
|
|
53318
53302
|
let { $from: i } = t.state.selection, a = i.depth - 1;
|
|
53319
53303
|
return i.node(a).type !== t.schema.nodes[n] || i.index(a) !== 0 ? !1 : t.chain().liftListItem(n).run();
|
|
53320
|
-
},
|
|
53321
|
-
let n =
|
|
53304
|
+
}, Es = (e, t) => {
|
|
53305
|
+
let n = Cs(e, t), r = Ss(e, t);
|
|
53322
53306
|
return !r || !n ? !1 : n > r.depth;
|
|
53323
|
-
},
|
|
53324
|
-
let n =
|
|
53307
|
+
}, Ds = (e, t) => {
|
|
53308
|
+
let n = Cs(e, t), r = Ss(e, t);
|
|
53325
53309
|
return !r || !n ? !1 : n < r.depth;
|
|
53326
|
-
},
|
|
53327
|
-
if (!e(t.state,
|
|
53310
|
+
}, Os = (t, n) => {
|
|
53311
|
+
if (!e(t.state, n) || !r(t.state, n)) return !1;
|
|
53328
53312
|
let { selection: i } = t.state, { $from: a, $to: o } = i;
|
|
53329
|
-
return !i.empty && a.sameParent(o) ? !1 :
|
|
53330
|
-
},
|
|
53313
|
+
return !i.empty && a.sameParent(o) ? !1 : Es(n, t.state) ? t.chain().focus(t.state.selection.from + 4).lift(n).joinBackward().run() : Ds(n, t.state) ? t.chain().joinForward().joinBackward().run() : t.commands.joinItemForward();
|
|
53314
|
+
}, ks = (t, n, r) => {
|
|
53331
53315
|
let { state: i } = t, { selection: a } = i;
|
|
53332
53316
|
if (!a.empty) return !1;
|
|
53333
53317
|
let { $from: o } = a;
|
|
53334
53318
|
if (o.parentOffset !== 0 || !o.parent.isTextblock || e(i, n)) return !1;
|
|
53335
|
-
let s =
|
|
53319
|
+
let s = f(o);
|
|
53336
53320
|
if (!s || !r.includes(s.type.name)) return !1;
|
|
53337
53321
|
let c = s.lastChild;
|
|
53338
53322
|
if (!c || c.type.name !== n) return !1;
|
|
53339
53323
|
let l = o.parent;
|
|
53340
53324
|
if (!c.canReplace(c.childCount, c.childCount, be.from(l))) return !1;
|
|
53341
|
-
let
|
|
53342
|
-
return t.commands.command(({ tr: e, dispatch: t }) => (t && (e.delete(
|
|
53343
|
-
},
|
|
53344
|
-
let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - n.parentOffset - 2);
|
|
53345
|
-
return r.index() !== r.parent.childCount - 1 && r.nodeAfter?.type.name === e;
|
|
53346
|
-
}, Ns = (e, t) => {
|
|
53347
|
-
let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - 2);
|
|
53348
|
-
return r.index() !== 0 && r.nodeBefore?.type.name === e;
|
|
53349
|
-
}, Ps = (e, t, n) => {
|
|
53350
|
-
if (!n) return !1;
|
|
53351
|
-
let r = oe(e, t.schema), i = !1;
|
|
53352
|
-
return n.descendants((e) => {
|
|
53353
|
-
e.type === r && (i = !0);
|
|
53354
|
-
}), i;
|
|
53355
|
-
}, Fs = w.create({
|
|
53325
|
+
let u = o.before(), d = o.after(), p = u - 2;
|
|
53326
|
+
return t.commands.command(({ tr: e, dispatch: t }) => (t && (e.delete(u, d).insert(p, be.from(l)), e.setSelection(ye.create(e.doc, p + 1)), e.scrollIntoView()), !0));
|
|
53327
|
+
}, As = w.create({
|
|
53356
53328
|
name: "listKeymap",
|
|
53357
53329
|
addOptions() {
|
|
53358
53330
|
return { listTypes: [{
|
|
@@ -53368,51 +53340,51 @@ var ws = (e, t) => {
|
|
|
53368
53340
|
Delete: ({ editor: e }) => {
|
|
53369
53341
|
let t = !1;
|
|
53370
53342
|
return this.options.listTypes.forEach(({ itemName: n }) => {
|
|
53371
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
53343
|
+
e.state.schema.nodes[n] !== void 0 && Os(e, n) && (t = !0);
|
|
53372
53344
|
}), t;
|
|
53373
53345
|
},
|
|
53374
53346
|
"Mod-Delete": ({ editor: e }) => {
|
|
53375
53347
|
let t = !1;
|
|
53376
53348
|
return this.options.listTypes.forEach(({ itemName: n }) => {
|
|
53377
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
53349
|
+
e.state.schema.nodes[n] !== void 0 && Os(e, n) && (t = !0);
|
|
53378
53350
|
}), t;
|
|
53379
53351
|
},
|
|
53380
53352
|
Backspace: ({ editor: e }) => {
|
|
53381
53353
|
let t = !1;
|
|
53382
53354
|
return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
|
|
53383
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
53355
|
+
e.state.schema.nodes[n] !== void 0 && Ts(e, n, r) && (t = !0);
|
|
53384
53356
|
}), t;
|
|
53385
53357
|
},
|
|
53386
53358
|
"Mod-Backspace": ({ editor: e }) => {
|
|
53387
53359
|
let t = !1;
|
|
53388
53360
|
return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
|
|
53389
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
53361
|
+
e.state.schema.nodes[n] !== void 0 && Ts(e, n, r) && (t = !0);
|
|
53390
53362
|
}), t;
|
|
53391
53363
|
},
|
|
53392
53364
|
Tab: ({ editor: e }) => {
|
|
53393
|
-
for (let { itemName: t, wrapperNames: n } of this.options.listTypes) if (e.state.schema.nodes[t] !== void 0 &&
|
|
53365
|
+
for (let { itemName: t, wrapperNames: n } of this.options.listTypes) if (e.state.schema.nodes[t] !== void 0 && ks(e, t, n)) return !0;
|
|
53394
53366
|
return !1;
|
|
53395
53367
|
}
|
|
53396
53368
|
};
|
|
53397
53369
|
}
|
|
53398
|
-
}),
|
|
53370
|
+
}), js = RegExp(`^(\\s*)(${as})([.)])\\s+(.*)$`), Ms = /^\s/, Ns = {
|
|
53399
53371
|
heading: /^#{1,6}(?:\s|$)/,
|
|
53400
53372
|
bulletItem: /^[-+*]\s+/,
|
|
53401
53373
|
codeFence: /^(?:```|~~~)/,
|
|
53402
53374
|
blockMath: /^\$\$/,
|
|
53403
53375
|
thematicBreak: /^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/
|
|
53404
53376
|
};
|
|
53405
|
-
function
|
|
53406
|
-
return
|
|
53377
|
+
function Ps(e) {
|
|
53378
|
+
return js.test(e.trimStart());
|
|
53407
53379
|
}
|
|
53408
|
-
function
|
|
53380
|
+
function Fs(e) {
|
|
53409
53381
|
let t = e.trimStart();
|
|
53410
|
-
return
|
|
53382
|
+
return Ns.bulletItem.test(t) || Ps(t) || Ns.heading.test(t) || Ns.thematicBreak.test(t) && !t.startsWith("-") || /^>\s?/.test(t) || Ns.codeFence.test(t) || Ns.blockMath.test(t);
|
|
53411
53383
|
}
|
|
53412
|
-
function
|
|
53413
|
-
return Object.values(
|
|
53384
|
+
function Is(e) {
|
|
53385
|
+
return Object.values(Ns).some((t) => t.test(e));
|
|
53414
53386
|
}
|
|
53415
|
-
function
|
|
53387
|
+
function Ls(e) {
|
|
53416
53388
|
let t = [], n = [], r = !1;
|
|
53417
53389
|
return e.forEach((e) => {
|
|
53418
53390
|
if (r) {
|
|
@@ -53423,7 +53395,7 @@ function Hs(e) {
|
|
|
53423
53395
|
r = !0, n.push(e);
|
|
53424
53396
|
return;
|
|
53425
53397
|
}
|
|
53426
|
-
if (t.length > 0 &&
|
|
53398
|
+
if (t.length > 0 && Fs(e)) {
|
|
53427
53399
|
r = !0, n.push(e);
|
|
53428
53400
|
return;
|
|
53429
53401
|
}
|
|
@@ -53433,21 +53405,21 @@ function Hs(e) {
|
|
|
53433
53405
|
blockLines: n
|
|
53434
53406
|
};
|
|
53435
53407
|
}
|
|
53436
|
-
function
|
|
53408
|
+
function Rs(e) {
|
|
53437
53409
|
let t = [], n = 0, r = 0;
|
|
53438
53410
|
for (; n < e.length;) {
|
|
53439
|
-
let i = e[n], a = i.match(
|
|
53411
|
+
let i = e[n], a = i.match(js);
|
|
53440
53412
|
if (!a) break;
|
|
53441
|
-
let [, o, s, c, l] = a, u = o.length, d = parseInt(s, 10), f = isNaN(d) ?
|
|
53413
|
+
let [, o, s, c, l] = a, u = o.length, d = parseInt(s, 10), f = isNaN(d) ? fs(s) : void 0, p = isNaN(d) ? ps(s) : d, m = [l], h = n + 1, g = [i], _ = !1;
|
|
53442
53414
|
for (; h < e.length;) {
|
|
53443
53415
|
let t = e[h];
|
|
53444
|
-
if (t.match(
|
|
53416
|
+
if (t.match(js)) break;
|
|
53445
53417
|
if (t.trim() === "") g.push(t), m.push(""), _ = !0, h += 1;
|
|
53446
|
-
else if (t.match(
|
|
53418
|
+
else if (t.match(Ms)) {
|
|
53447
53419
|
let e = t.length - t.trimStart().length, n = u + s.length + 1;
|
|
53448
53420
|
g.push(t), m.push(t.slice(Math.min(e, n))), h += 1;
|
|
53449
53421
|
} else {
|
|
53450
|
-
if (_ ||
|
|
53422
|
+
if (_ || Is(t)) break;
|
|
53451
53423
|
g.push(t), m.push(t), h += 1;
|
|
53452
53424
|
}
|
|
53453
53425
|
}
|
|
@@ -53462,22 +53434,22 @@ function Us(e) {
|
|
|
53462
53434
|
}
|
|
53463
53435
|
return [t, r];
|
|
53464
53436
|
}
|
|
53465
|
-
var
|
|
53466
|
-
function
|
|
53437
|
+
var zs = RegExp(`^(${as})([.)])\\s+(.+)$`);
|
|
53438
|
+
function Bs(e) {
|
|
53467
53439
|
let t = e.split("\n").filter((e) => e.trim().length > 0);
|
|
53468
53440
|
if (t.length === 0) return null;
|
|
53469
53441
|
let n = [];
|
|
53470
53442
|
for (let e of t) {
|
|
53471
|
-
let t = e.trim().match(
|
|
53443
|
+
let t = e.trim().match(zs);
|
|
53472
53444
|
if (!t) return null;
|
|
53473
53445
|
n.push({
|
|
53474
53446
|
marker: t[1],
|
|
53475
53447
|
content: t[3]
|
|
53476
53448
|
});
|
|
53477
53449
|
}
|
|
53478
|
-
return
|
|
53450
|
+
return hs(n.map((e) => e.marker)) ? {
|
|
53479
53451
|
type: "orderedList",
|
|
53480
|
-
attrs:
|
|
53452
|
+
attrs: _s(n[0].marker),
|
|
53481
53453
|
content: n.map((e) => ({
|
|
53482
53454
|
type: "listItem",
|
|
53483
53455
|
content: [{
|
|
@@ -53490,12 +53462,12 @@ function Gs(e) {
|
|
|
53490
53462
|
}))
|
|
53491
53463
|
} : null;
|
|
53492
53464
|
}
|
|
53493
|
-
function
|
|
53465
|
+
function Vs(e, t, n) {
|
|
53494
53466
|
let r = [], i = 0;
|
|
53495
53467
|
for (; i < e.length;) {
|
|
53496
53468
|
let a = e[i];
|
|
53497
53469
|
if (a.indent === t) {
|
|
53498
|
-
let { paragraphLines: o, blockLines: s } =
|
|
53470
|
+
let { paragraphLines: o, blockLines: s } = Ls(a.contentLines), c = o.join("\n").trim(), l = [];
|
|
53499
53471
|
c && l.push({
|
|
53500
53472
|
type: "paragraph",
|
|
53501
53473
|
raw: c,
|
|
@@ -53509,7 +53481,7 @@ function Ks(e, t, n) {
|
|
|
53509
53481
|
let d = i + 1, f = [];
|
|
53510
53482
|
for (; d < e.length && e[d].indent > t;) f.push(e[d]), d += 1;
|
|
53511
53483
|
if (f.length > 0) {
|
|
53512
|
-
let e =
|
|
53484
|
+
let e = Vs(f, Math.min(...f.map((e) => e.indent)), n);
|
|
53513
53485
|
l.push({
|
|
53514
53486
|
type: "list",
|
|
53515
53487
|
ordered: !0,
|
|
@@ -53528,7 +53500,7 @@ function Ks(e, t, n) {
|
|
|
53528
53500
|
}
|
|
53529
53501
|
return r;
|
|
53530
53502
|
}
|
|
53531
|
-
function
|
|
53503
|
+
function Hs(e, t) {
|
|
53532
53504
|
return e.map((e) => {
|
|
53533
53505
|
if (e.type !== "list_item") return t.parseChildren([e])[0];
|
|
53534
53506
|
let n = [];
|
|
@@ -53550,8 +53522,8 @@ function qs(e, t) {
|
|
|
53550
53522
|
};
|
|
53551
53523
|
});
|
|
53552
53524
|
}
|
|
53553
|
-
var
|
|
53554
|
-
function
|
|
53525
|
+
var Us = "listItem", Ws = "textStyle", Gs = /^(\d+)\.\s$/;
|
|
53526
|
+
function Ks(e) {
|
|
53555
53527
|
let t = e.match(/list-style-type\s*:\s*([^;]+)/i);
|
|
53556
53528
|
if (!t) return null;
|
|
53557
53529
|
switch (t[1].trim().toLowerCase()) {
|
|
@@ -53564,7 +53536,7 @@ function Zs(e) {
|
|
|
53564
53536
|
default: return null;
|
|
53565
53537
|
}
|
|
53566
53538
|
}
|
|
53567
|
-
var
|
|
53539
|
+
var qs = g.create({
|
|
53568
53540
|
name: "orderedList",
|
|
53569
53541
|
addOptions() {
|
|
53570
53542
|
return {
|
|
@@ -53591,14 +53563,14 @@ var Qs = h.create({
|
|
|
53591
53563
|
if (t) return t;
|
|
53592
53564
|
let n = e.getAttribute("style");
|
|
53593
53565
|
if (n) {
|
|
53594
|
-
let e =
|
|
53566
|
+
let e = Ks(n);
|
|
53595
53567
|
if (e) return e;
|
|
53596
53568
|
}
|
|
53597
53569
|
let r = e.querySelector("li");
|
|
53598
53570
|
if (r) {
|
|
53599
53571
|
let e = r.getAttribute("style");
|
|
53600
53572
|
if (e) {
|
|
53601
|
-
let t =
|
|
53573
|
+
let t = Ks(e);
|
|
53602
53574
|
if (t) return t;
|
|
53603
53575
|
}
|
|
53604
53576
|
}
|
|
@@ -53621,7 +53593,7 @@ var Qs = h.create({
|
|
|
53621
53593
|
markdownTokenName: "list",
|
|
53622
53594
|
parseMarkdown: (e, t) => {
|
|
53623
53595
|
if (e.type !== "list" || !e.ordered) return [];
|
|
53624
|
-
let n = e.start || 1, r = e.typeMarker, i = e.items ?
|
|
53596
|
+
let n = e.start || 1, r = e.typeMarker, i = e.items ? Hs(e.items, t) : [], a = {};
|
|
53625
53597
|
return n !== 1 && (a.start = n), r && (a.type = r), Object.keys(a).length > 0 ? {
|
|
53626
53598
|
type: "orderedList",
|
|
53627
53599
|
attrs: a,
|
|
@@ -53637,9 +53609,9 @@ var Qs = h.create({
|
|
|
53637
53609
|
level: "block",
|
|
53638
53610
|
start: () => -1,
|
|
53639
53611
|
tokenize: (e, t, n) => {
|
|
53640
|
-
let r = e.split("\n"), [i, a] =
|
|
53612
|
+
let r = e.split("\n"), [i, a] = Rs(r);
|
|
53641
53613
|
if (i.length === 0) return;
|
|
53642
|
-
let o =
|
|
53614
|
+
let o = Vs(i, i[0].indent, n);
|
|
53643
53615
|
if (o.length !== 0) return {
|
|
53644
53616
|
type: "list",
|
|
53645
53617
|
ordered: !0,
|
|
@@ -53652,7 +53624,7 @@ var Qs = h.create({
|
|
|
53652
53624
|
},
|
|
53653
53625
|
markdownOptions: { indentsContent: !0 },
|
|
53654
53626
|
addCommands() {
|
|
53655
|
-
return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
53627
|
+
return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Us, this.editor.getAttributes(Ws)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
|
|
53656
53628
|
},
|
|
53657
53629
|
addKeyboardShortcuts() {
|
|
53658
53630
|
return { "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() };
|
|
@@ -53662,7 +53634,7 @@ var Qs = h.create({
|
|
|
53662
53634
|
if ((t.clipboardData?.getData("text/html"))?.trim()) return !1;
|
|
53663
53635
|
let n = t.clipboardData?.getData("text/plain");
|
|
53664
53636
|
if (!n) return !1;
|
|
53665
|
-
let r =
|
|
53637
|
+
let r = Bs(n);
|
|
53666
53638
|
if (!r) return !1;
|
|
53667
53639
|
try {
|
|
53668
53640
|
let t = e.state.schema.nodeFromJSON(r), n = e.state.tr.replaceSelectionWith(t);
|
|
@@ -53674,25 +53646,28 @@ var Qs = h.create({
|
|
|
53674
53646
|
},
|
|
53675
53647
|
addInputRules() {
|
|
53676
53648
|
let e = (e, t) => (!t.attrs.type || t.attrs.type === "1") && t.childCount + t.attrs.start === +e[1], t = p({
|
|
53677
|
-
find:
|
|
53649
|
+
find: Gs,
|
|
53678
53650
|
type: this.type,
|
|
53679
53651
|
getAttributes: (e) => ({ start: +e[1] }),
|
|
53680
53652
|
joinPredicate: e
|
|
53681
53653
|
});
|
|
53682
53654
|
return (this.options.keepMarks || this.options.keepAttributes) && (t = p({
|
|
53683
|
-
find:
|
|
53655
|
+
find: Gs,
|
|
53684
53656
|
type: this.type,
|
|
53685
53657
|
keepMarks: this.options.keepMarks,
|
|
53686
53658
|
keepAttributes: this.options.keepAttributes,
|
|
53687
53659
|
getAttributes: (e) => ({
|
|
53688
53660
|
start: +e[1],
|
|
53689
|
-
...this.editor.getAttributes(
|
|
53661
|
+
...this.editor.getAttributes(Ws)
|
|
53690
53662
|
}),
|
|
53691
53663
|
joinPredicate: e,
|
|
53692
53664
|
editor: this.editor
|
|
53693
53665
|
})), [t];
|
|
53694
53666
|
}
|
|
53695
|
-
}),
|
|
53667
|
+
}), Js = /^\s*(\[([( |x])?\])\s$/, Ys = "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0", Xs = (e, t, n) => {
|
|
53668
|
+
var r;
|
|
53669
|
+
return (n == null || (r = n.checkboxLabel) == null ? void 0 : r.call(n, e, t)) || `Task item checkbox for ${e.textContent || "empty task item"}`;
|
|
53670
|
+
}, Zs = g.create({
|
|
53696
53671
|
name: "taskItem",
|
|
53697
53672
|
addOptions() {
|
|
53698
53673
|
return {
|
|
@@ -53747,12 +53722,12 @@ var Qs = h.create({
|
|
|
53747
53722
|
}
|
|
53748
53723
|
return t.createNode("taskItem", { checked: e.checked || !1 }, n);
|
|
53749
53724
|
},
|
|
53750
|
-
renderMarkdown: (e,
|
|
53751
|
-
let
|
|
53752
|
-
return
|
|
53725
|
+
renderMarkdown: (e, n) => {
|
|
53726
|
+
let r = `- [${e.attrs?.checked ? "x" : " "}] `;
|
|
53727
|
+
return t(e, n, r);
|
|
53753
53728
|
},
|
|
53754
53729
|
addExtensions() {
|
|
53755
|
-
return this.options.nested ? [
|
|
53730
|
+
return this.options.nested ? [ns(this.name, [this.options.taskListTypeName])] : [];
|
|
53756
53731
|
},
|
|
53757
53732
|
addKeyboardShortcuts() {
|
|
53758
53733
|
let e = {
|
|
@@ -53765,11 +53740,11 @@ var Qs = h.create({
|
|
|
53765
53740
|
} : e;
|
|
53766
53741
|
},
|
|
53767
53742
|
addNodeView() {
|
|
53768
|
-
return ({ node: e, HTMLAttributes:
|
|
53743
|
+
return ({ node: e, HTMLAttributes: t, getPos: r, editor: i }) => {
|
|
53769
53744
|
let a = document.createElement("li"), o = document.createElement("label"), s = document.createElement("span"), c = document.createElement("input"), l = document.createElement("div");
|
|
53770
|
-
s.style.cssText =
|
|
53745
|
+
s.style.cssText = Ys;
|
|
53771
53746
|
let u = (e) => {
|
|
53772
|
-
let t =
|
|
53747
|
+
let t = Xs(e, e.attrs.checked, this.options.a11y);
|
|
53773
53748
|
c.setAttribute("aria-label", t), s.textContent = t;
|
|
53774
53749
|
};
|
|
53775
53750
|
u(e), o.contentEditable = "false", c.type = "checkbox", c.addEventListener("mousedown", (e) => e.preventDefault()), c.addEventListener("change", (t) => {
|
|
@@ -53789,17 +53764,17 @@ var Qs = h.create({
|
|
|
53789
53764
|
}).run(), !i.isEditable && this.options.onReadOnlyChecked && (this.options.onReadOnlyChecked(e, n) || (c.checked = !c.checked));
|
|
53790
53765
|
}), Object.entries(this.options.HTMLAttributes).forEach(([e, t]) => {
|
|
53791
53766
|
a.setAttribute(e, t);
|
|
53792
|
-
}), a.dataset.checked = e.attrs.checked, c.checked = e.attrs.checked, o.append(c, s), a.append(o, l), Object.entries(
|
|
53767
|
+
}), a.dataset.checked = e.attrs.checked, c.checked = e.attrs.checked, o.append(c, s), a.append(o, l), Object.entries(t).forEach(([e, t]) => {
|
|
53793
53768
|
a.setAttribute(e, t);
|
|
53794
53769
|
});
|
|
53795
|
-
let d = new Set(Object.keys(
|
|
53770
|
+
let d = new Set(Object.keys(t));
|
|
53796
53771
|
return {
|
|
53797
53772
|
dom: a,
|
|
53798
53773
|
contentDOM: l,
|
|
53799
53774
|
update: (e) => {
|
|
53800
53775
|
if (e.type !== this.type) return !1;
|
|
53801
53776
|
a.dataset.checked = e.attrs.checked, c.checked = e.attrs.checked, u(e);
|
|
53802
|
-
let
|
|
53777
|
+
let t = i.extensionManager.attributes, r = n(e, t), o = new Set(Object.keys(r)), s = this.options.HTMLAttributes;
|
|
53803
53778
|
return d.forEach((e) => {
|
|
53804
53779
|
o.has(e) || (e in s ? a.setAttribute(e, s[e]) : a.removeAttribute(e));
|
|
53805
53780
|
}), Object.entries(r).forEach(([e, t]) => {
|
|
@@ -53811,12 +53786,12 @@ var Qs = h.create({
|
|
|
53811
53786
|
},
|
|
53812
53787
|
addInputRules() {
|
|
53813
53788
|
return [p({
|
|
53814
|
-
find:
|
|
53789
|
+
find: Js,
|
|
53815
53790
|
type: this.type,
|
|
53816
53791
|
getAttributes: (e) => ({ checked: e[e.length - 1] === "x" })
|
|
53817
53792
|
})];
|
|
53818
53793
|
}
|
|
53819
|
-
}),
|
|
53794
|
+
}), Qs = g.create({
|
|
53820
53795
|
name: "taskList",
|
|
53821
53796
|
addOptions() {
|
|
53822
53797
|
return {
|
|
@@ -53852,7 +53827,7 @@ var Qs = h.create({
|
|
|
53852
53827
|
},
|
|
53853
53828
|
tokenize(e, t, n) {
|
|
53854
53829
|
let r = (e) => {
|
|
53855
|
-
let t =
|
|
53830
|
+
let t = d(e, {
|
|
53856
53831
|
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
53857
53832
|
extractItemData: (e) => ({
|
|
53858
53833
|
indentLevel: e[1].length,
|
|
@@ -53880,7 +53855,7 @@ var Qs = h.create({
|
|
|
53880
53855
|
return i.trim() ? [r, ...n.blockTokens(i)] : [r];
|
|
53881
53856
|
}
|
|
53882
53857
|
return n.blockTokens(e);
|
|
53883
|
-
}, i =
|
|
53858
|
+
}, i = d(e, {
|
|
53884
53859
|
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
53885
53860
|
extractItemData: (e) => ({
|
|
53886
53861
|
indentLevel: e[1].length,
|
|
@@ -53918,78 +53893,78 @@ w.create({
|
|
|
53918
53893
|
name: "listKit",
|
|
53919
53894
|
addExtensions() {
|
|
53920
53895
|
let e = [];
|
|
53921
|
-
return this.options.bulletList !== !1 && e.push(
|
|
53896
|
+
return this.options.bulletList !== !1 && e.push(Qo.configure(this.options.bulletList)), this.options.listItem !== !1 && e.push(xs.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(As.configure(this.options.listKeymap)), this.options.orderedList !== !1 && e.push(qs.configure(this.options.orderedList)), this.options.taskItem !== !1 && e.push(Zs.configure(this.options.taskItem)), this.options.taskList !== !1 && e.push(Qs.configure(this.options.taskList)), e;
|
|
53922
53897
|
}
|
|
53923
53898
|
});
|
|
53924
53899
|
//#endregion
|
|
53925
|
-
//#region node_modules/.pnpm/@tiptap+extension-task-item@3.
|
|
53926
|
-
var
|
|
53900
|
+
//#region node_modules/.pnpm/@tiptap+extension-task-item@3.31.3_@tiptap+extension-list@3.31.3_@tiptap+core@3.31.3_@t_57c8db10f93f71c9bed458e47d8da805/node_modules/@tiptap/extension-task-item/dist/index.js
|
|
53901
|
+
var $s = Zs, ec = Qs, tc = (e) => m({
|
|
53927
53902
|
find: /--$/,
|
|
53928
53903
|
replace: e ?? "—"
|
|
53929
|
-
}),
|
|
53904
|
+
}), nc = (e) => m({
|
|
53930
53905
|
find: /\.\.\.$/,
|
|
53931
53906
|
replace: e ?? "…"
|
|
53932
|
-
}),
|
|
53907
|
+
}), rc = (e) => m({
|
|
53933
53908
|
find: /(?:^|[\s{[(<'"\u2018\u201C])(")$/,
|
|
53934
53909
|
replace: e ?? "“"
|
|
53935
|
-
}),
|
|
53910
|
+
}), ic = (e) => m({
|
|
53936
53911
|
find: /"$/,
|
|
53937
53912
|
replace: e ?? "”"
|
|
53938
|
-
}),
|
|
53913
|
+
}), ac = (e) => m({
|
|
53939
53914
|
find: /(?:^|[\s{[(<'"\u2018\u201C])(')$/,
|
|
53940
53915
|
replace: e ?? "‘"
|
|
53941
|
-
}),
|
|
53916
|
+
}), oc = (e) => m({
|
|
53942
53917
|
find: /'$/,
|
|
53943
53918
|
replace: e ?? "’"
|
|
53944
|
-
}),
|
|
53919
|
+
}), sc = (e) => m({
|
|
53945
53920
|
find: /<-$/,
|
|
53946
53921
|
replace: e ?? "←"
|
|
53947
|
-
}),
|
|
53922
|
+
}), cc = (e) => m({
|
|
53948
53923
|
find: /->$/,
|
|
53949
53924
|
replace: e ?? "→"
|
|
53950
|
-
}),
|
|
53925
|
+
}), lc = (e) => m({
|
|
53951
53926
|
find: /\(c\)$/,
|
|
53952
53927
|
replace: e ?? "©"
|
|
53953
|
-
}),
|
|
53928
|
+
}), uc = (e) => m({
|
|
53954
53929
|
find: /\(tm\)$/,
|
|
53955
53930
|
replace: e ?? "™"
|
|
53956
|
-
}),
|
|
53931
|
+
}), dc = (e) => m({
|
|
53957
53932
|
find: /\(sm\)$/,
|
|
53958
53933
|
replace: e ?? "℠"
|
|
53959
|
-
}),
|
|
53934
|
+
}), fc = (e) => m({
|
|
53960
53935
|
find: /\(r\)$/,
|
|
53961
53936
|
replace: e ?? "®"
|
|
53962
|
-
}),
|
|
53937
|
+
}), pc = (e) => m({
|
|
53963
53938
|
find: /(?:^|\s)(1\/2)\s$/,
|
|
53964
53939
|
replace: e ?? "½"
|
|
53965
|
-
}),
|
|
53940
|
+
}), mc = (e) => m({
|
|
53966
53941
|
find: /\+\/-$/,
|
|
53967
53942
|
replace: e ?? "±"
|
|
53968
|
-
}),
|
|
53943
|
+
}), hc = (e) => m({
|
|
53969
53944
|
find: /!=$/,
|
|
53970
53945
|
replace: e ?? "≠"
|
|
53971
|
-
}),
|
|
53946
|
+
}), gc = (e) => m({
|
|
53972
53947
|
find: /<<$/,
|
|
53973
53948
|
replace: e ?? "«"
|
|
53974
|
-
}),
|
|
53949
|
+
}), _c = (e) => m({
|
|
53975
53950
|
find: />>$/,
|
|
53976
53951
|
replace: e ?? "»"
|
|
53977
|
-
}),
|
|
53952
|
+
}), vc = (e) => m({
|
|
53978
53953
|
find: /\d+\s?([*x])\s?\d+$/,
|
|
53979
53954
|
replace: e ?? "×"
|
|
53980
|
-
}),
|
|
53955
|
+
}), yc = (e) => m({
|
|
53981
53956
|
find: /\^2$/,
|
|
53982
53957
|
replace: e ?? "²"
|
|
53983
|
-
}),
|
|
53958
|
+
}), bc = (e) => m({
|
|
53984
53959
|
find: /\^3$/,
|
|
53985
53960
|
replace: e ?? "³"
|
|
53986
|
-
}),
|
|
53961
|
+
}), xc = (e) => m({
|
|
53987
53962
|
find: /(?:^|\s)(1\/4)\s$/,
|
|
53988
53963
|
replace: e ?? "¼"
|
|
53989
|
-
}),
|
|
53964
|
+
}), Sc = (e) => m({
|
|
53990
53965
|
find: /(?:^|\s)(3\/4)\s$/,
|
|
53991
53966
|
replace: e ?? "¾"
|
|
53992
|
-
}),
|
|
53967
|
+
}), Cc = w.create({
|
|
53993
53968
|
name: "typography",
|
|
53994
53969
|
addOptions() {
|
|
53995
53970
|
return {
|
|
@@ -54019,37 +53994,58 @@ var ic = nc, ac = rc, oc = (e) => i({
|
|
|
54019
53994
|
},
|
|
54020
53995
|
addInputRules() {
|
|
54021
53996
|
let e = [];
|
|
54022
|
-
this.options.emDash !== !1 && e.push(
|
|
53997
|
+
this.options.emDash !== !1 && e.push(tc(this.options.emDash)), this.options.ellipsis !== !1 && e.push(nc(this.options.ellipsis));
|
|
54023
53998
|
let t = this.editor.options.textDirection === "rtl";
|
|
54024
53999
|
if (this.options.doubleQuotes?.rtl) {
|
|
54025
54000
|
let { open: t, close: n } = this.options.doubleQuotes.rtl;
|
|
54026
|
-
e.push(
|
|
54027
|
-
} else t ? (e.push(
|
|
54001
|
+
e.push(rc(t)), e.push(ic(n));
|
|
54002
|
+
} else t ? (e.push(rc("”")), e.push(ic("“"))) : (this.options.openDoubleQuote !== !1 && e.push(rc(this.options.openDoubleQuote)), this.options.closeDoubleQuote !== !1 && e.push(ic(this.options.closeDoubleQuote)));
|
|
54028
54003
|
if (this.options.singleQuotes?.rtl) {
|
|
54029
54004
|
let { open: t, close: n } = this.options.singleQuotes.rtl;
|
|
54030
|
-
e.push(
|
|
54031
|
-
} else t ? (e.push(
|
|
54032
|
-
return this.options.leftArrow !== !1 && e.push(
|
|
54033
|
-
}
|
|
54034
|
-
});
|
|
54035
|
-
|
|
54036
|
-
|
|
54037
|
-
|
|
54005
|
+
e.push(ac(t)), e.push(oc(n));
|
|
54006
|
+
} else t ? (e.push(ac("’")), e.push(oc("‘"))) : (this.options.openSingleQuote !== !1 && e.push(ac(this.options.openSingleQuote)), this.options.closeSingleQuote !== !1 && e.push(oc(this.options.closeSingleQuote)));
|
|
54007
|
+
return this.options.leftArrow !== !1 && e.push(sc(this.options.leftArrow)), this.options.rightArrow !== !1 && e.push(cc(this.options.rightArrow)), this.options.copyright !== !1 && e.push(lc(this.options.copyright)), this.options.trademark !== !1 && e.push(uc(this.options.trademark)), this.options.servicemark !== !1 && e.push(dc(this.options.servicemark)), this.options.registeredTrademark !== !1 && e.push(fc(this.options.registeredTrademark)), this.options.oneHalf !== !1 && e.push(pc(this.options.oneHalf)), this.options.plusMinus !== !1 && e.push(mc(this.options.plusMinus)), this.options.notEqual !== !1 && e.push(hc(this.options.notEqual)), this.options.laquo !== !1 && e.push(gc(this.options.laquo)), this.options.raquo !== !1 && e.push(_c(this.options.raquo)), this.options.multiplication !== !1 && e.push(vc(this.options.multiplication)), this.options.superscriptTwo !== !1 && e.push(yc(this.options.superscriptTwo)), this.options.superscriptThree !== !1 && e.push(bc(this.options.superscriptThree)), this.options.oneQuarter !== !1 && e.push(xc(this.options.oneQuarter)), this.options.threeQuarters !== !1 && e.push(Sc(this.options.threeQuarters)), e;
|
|
54008
|
+
}
|
|
54009
|
+
}), wc = /* @__PURE__ */ new WeakSet(), Tc = /* @__PURE__ */ new WeakSet();
|
|
54010
|
+
function Ec(e) {
|
|
54011
|
+
let t = e;
|
|
54012
|
+
return wc.add(t), t;
|
|
54013
|
+
}
|
|
54014
|
+
function Dc(e) {
|
|
54015
|
+
return Array.isArray(e) && wc.has(e);
|
|
54016
|
+
}
|
|
54017
|
+
function Oc(e) {
|
|
54018
|
+
return e.flatMap((e) => e == null ? [] : Array.isArray(e) && Tc.has(e) && !Dc(e) ? Oc(e) : [e]);
|
|
54019
|
+
}
|
|
54020
|
+
function kc(e, t) {
|
|
54038
54021
|
if (e === "slot") return 0;
|
|
54039
|
-
if (e instanceof Function)
|
|
54040
|
-
|
|
54022
|
+
if (e instanceof Function) {
|
|
54023
|
+
let n = e(t);
|
|
54024
|
+
return Array.isArray(n) && !Dc(n) && !Tc.has(n) ? Ec(n) : n;
|
|
54025
|
+
}
|
|
54026
|
+
let { children: n, ...r } = t ?? {};
|
|
54041
54027
|
if (e === "svg") throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");
|
|
54042
|
-
|
|
54043
|
-
|
|
54044
|
-
|
|
54045
|
-
|
|
54046
|
-
|
|
54028
|
+
if (Array.isArray(n)) {
|
|
54029
|
+
if (Dc(n)) return Ec([
|
|
54030
|
+
e,
|
|
54031
|
+
r,
|
|
54032
|
+
n
|
|
54033
|
+
]);
|
|
54034
|
+
if (n.length === 0) return Ec([e, r]);
|
|
54035
|
+
let t = Oc(n);
|
|
54036
|
+
return t.length === 0 ? Ec([e, r]) : Ec([
|
|
54037
|
+
e,
|
|
54038
|
+
r,
|
|
54039
|
+
...t
|
|
54040
|
+
]);
|
|
54041
|
+
}
|
|
54042
|
+
return Ec(n == null ? [e, r] : [
|
|
54047
54043
|
e,
|
|
54048
|
-
|
|
54049
|
-
|
|
54050
|
-
];
|
|
54044
|
+
r,
|
|
54045
|
+
n
|
|
54046
|
+
]);
|
|
54051
54047
|
}
|
|
54052
|
-
var Ac = (e, t) => kc(e, t
|
|
54048
|
+
var Ac = (e, t) => kc(e, t), jc = (e, t) => {
|
|
54053
54049
|
let { state: n } = e, { selection: r } = n;
|
|
54054
54050
|
if (!r.empty) return !1;
|
|
54055
54051
|
let { $from: i } = r;
|
|
@@ -54067,7 +54063,7 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54067
54063
|
let n = i.parent.content, r = new xe(n, 0, 0);
|
|
54068
54064
|
return e.replace(l, i.after(), r), e.setSelection(ye.create(e.doc, l + n.size)), e.scrollIntoView(), t(e), !0;
|
|
54069
54065
|
});
|
|
54070
|
-
}, Mc = /^\s*>\s$/, Nc =
|
|
54066
|
+
}, Mc = /^\s*>\s$/, Nc = g.create({
|
|
54071
54067
|
name: "blockquote",
|
|
54072
54068
|
addOptions() {
|
|
54073
54069
|
return { HTMLAttributes: {} };
|
|
@@ -54115,7 +54111,7 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54115
54111
|
type: this.type
|
|
54116
54112
|
})];
|
|
54117
54113
|
}
|
|
54118
|
-
}), Pc = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Fc = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Ic = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, Lc = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Rc =
|
|
54114
|
+
}), Pc = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Fc = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Ic = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, Lc = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Rc = S.create({
|
|
54119
54115
|
name: "bold",
|
|
54120
54116
|
addOptions() {
|
|
54121
54117
|
return { HTMLAttributes: {} };
|
|
@@ -54164,19 +54160,19 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54164
54160
|
};
|
|
54165
54161
|
},
|
|
54166
54162
|
addInputRules() {
|
|
54167
|
-
return [
|
|
54163
|
+
return [u({
|
|
54168
54164
|
find: Pc,
|
|
54169
54165
|
type: this.type
|
|
54170
|
-
}),
|
|
54166
|
+
}), u({
|
|
54171
54167
|
find: Ic,
|
|
54172
54168
|
type: this.type
|
|
54173
54169
|
})];
|
|
54174
54170
|
},
|
|
54175
54171
|
addPasteRules() {
|
|
54176
|
-
return [
|
|
54172
|
+
return [i({
|
|
54177
54173
|
find: Fc,
|
|
54178
54174
|
type: this.type
|
|
54179
|
-
}),
|
|
54175
|
+
}), i({
|
|
54180
54176
|
find: Lc,
|
|
54181
54177
|
type: this.type
|
|
54182
54178
|
})];
|
|
@@ -54196,7 +54192,7 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54196
54192
|
replaceWith: r[1]
|
|
54197
54193
|
});
|
|
54198
54194
|
return n;
|
|
54199
|
-
}, Vc =
|
|
54195
|
+
}, Vc = S.create({
|
|
54200
54196
|
name: "code",
|
|
54201
54197
|
addOptions() {
|
|
54202
54198
|
return { HTMLAttributes: {} };
|
|
@@ -54231,18 +54227,18 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54231
54227
|
return { "Mod-e": () => this.editor.commands.toggleCode() };
|
|
54232
54228
|
},
|
|
54233
54229
|
addInputRules() {
|
|
54234
|
-
return [
|
|
54230
|
+
return [u({
|
|
54235
54231
|
find: zc,
|
|
54236
54232
|
type: this.type
|
|
54237
54233
|
})];
|
|
54238
54234
|
},
|
|
54239
54235
|
addPasteRules() {
|
|
54240
|
-
return [
|
|
54236
|
+
return [i({
|
|
54241
54237
|
find: Bc,
|
|
54242
54238
|
type: this.type
|
|
54243
54239
|
})];
|
|
54244
54240
|
}
|
|
54245
|
-
}), Hc = 4, Uc = /^```([a-z]+)?[\s\n]$/, Wc = /^~~~([a-z]+)?[\s\n]$/, Gc =
|
|
54241
|
+
}), Hc = 4, Uc = /^```([a-z]+)?[\s\n]$/, Wc = /^~~~([a-z]+)?[\s\n]$/, Gc = g.create({
|
|
54246
54242
|
name: "codeBlock",
|
|
54247
54243
|
addOptions() {
|
|
54248
54244
|
return {
|
|
@@ -54296,9 +54292,7 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54296
54292
|
`\`\`\`${r}`,
|
|
54297
54293
|
t.renderChildren(e.content),
|
|
54298
54294
|
"```"
|
|
54299
|
-
].join("\n") : `\`\`\`${r}
|
|
54300
|
-
|
|
54301
|
-
\`\`\``, n;
|
|
54295
|
+
].join("\n") : `\`\`\`${r}\n\n\`\`\``, n;
|
|
54302
54296
|
},
|
|
54303
54297
|
addCommands() {
|
|
54304
54298
|
return {
|
|
@@ -54372,11 +54366,11 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54372
54366
|
};
|
|
54373
54367
|
},
|
|
54374
54368
|
addInputRules() {
|
|
54375
|
-
return [
|
|
54369
|
+
return [a({
|
|
54376
54370
|
find: Uc,
|
|
54377
54371
|
type: this.type,
|
|
54378
54372
|
getAttributes: (e) => ({ language: e[1] })
|
|
54379
|
-
}),
|
|
54373
|
+
}), a({
|
|
54380
54374
|
find: Wc,
|
|
54381
54375
|
type: this.type,
|
|
54382
54376
|
getAttributes: (e) => ({ language: e[1] })
|
|
@@ -54394,12 +54388,12 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54394
54388
|
} }
|
|
54395
54389
|
})];
|
|
54396
54390
|
}
|
|
54397
|
-
}), Kc =
|
|
54391
|
+
}), Kc = g.create({
|
|
54398
54392
|
name: "doc",
|
|
54399
54393
|
topNode: !0,
|
|
54400
54394
|
content: "block+",
|
|
54401
54395
|
renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n\n") : ""
|
|
54402
|
-
}), qc =
|
|
54396
|
+
}), qc = g.create({
|
|
54403
54397
|
name: "hardBreak",
|
|
54404
54398
|
markdownTokenName: "br",
|
|
54405
54399
|
addOptions() {
|
|
@@ -54443,7 +54437,7 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54443
54437
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
54444
54438
|
};
|
|
54445
54439
|
}
|
|
54446
|
-
}), Jc =
|
|
54440
|
+
}), Jc = g.create({
|
|
54447
54441
|
name: "heading",
|
|
54448
54442
|
addOptions() {
|
|
54449
54443
|
return {
|
|
@@ -54498,13 +54492,13 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54498
54492
|
}), {});
|
|
54499
54493
|
},
|
|
54500
54494
|
addInputRules() {
|
|
54501
|
-
return this.options.levels.map((e) =>
|
|
54495
|
+
return this.options.levels.map((e) => a({
|
|
54502
54496
|
find: RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),
|
|
54503
54497
|
type: this.type,
|
|
54504
54498
|
getAttributes: { level: e }
|
|
54505
54499
|
}));
|
|
54506
54500
|
}
|
|
54507
|
-
}), Yc =
|
|
54501
|
+
}), Yc = g.create({
|
|
54508
54502
|
name: "horizontalRule",
|
|
54509
54503
|
addOptions() {
|
|
54510
54504
|
return {
|
|
@@ -54524,9 +54518,9 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54524
54518
|
renderMarkdown: () => "---",
|
|
54525
54519
|
addCommands() {
|
|
54526
54520
|
return { setHorizontalRule: () => ({ chain: e, state: t }) => {
|
|
54527
|
-
if (!
|
|
54521
|
+
if (!ae(t, t.schema.nodes[this.name])) return !1;
|
|
54528
54522
|
let { selection: n } = t, { $to: r } = n, i = e();
|
|
54529
|
-
return
|
|
54523
|
+
return c(n) ? i.insertContentAt(r.pos, { type: this.name }) : i.insertContent({ type: this.name }), i.command(({ state: e, tr: t, dispatch: n }) => {
|
|
54530
54524
|
if (n) {
|
|
54531
54525
|
let { $to: n } = t.selection, r = n.end();
|
|
54532
54526
|
if (n.nodeAfter) n.nodeAfter.isTextblock ? t.setSelection(ye.create(t.doc, n.pos + 1)) : n.nodeAfter.isBlock ? t.setSelection(he.create(t.doc, n.pos)) : t.setSelection(ye.create(t.doc, n.pos));
|
|
@@ -54541,12 +54535,12 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54541
54535
|
} };
|
|
54542
54536
|
},
|
|
54543
54537
|
addInputRules() {
|
|
54544
|
-
return [
|
|
54538
|
+
return [s({
|
|
54545
54539
|
find: /^(?:---|—-|___\s|\*\*\*\s)$/,
|
|
54546
54540
|
type: this.type
|
|
54547
54541
|
})];
|
|
54548
54542
|
}
|
|
54549
|
-
}), Xc = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, Zc = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Qc = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, $c = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, el =
|
|
54543
|
+
}), Xc = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, Zc = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Qc = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, $c = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, el = S.create({
|
|
54550
54544
|
name: "italic",
|
|
54551
54545
|
addOptions() {
|
|
54552
54546
|
return { HTMLAttributes: {} };
|
|
@@ -54593,24 +54587,24 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54593
54587
|
};
|
|
54594
54588
|
},
|
|
54595
54589
|
addInputRules() {
|
|
54596
|
-
return [
|
|
54590
|
+
return [u({
|
|
54597
54591
|
find: Xc,
|
|
54598
54592
|
type: this.type
|
|
54599
|
-
}),
|
|
54593
|
+
}), u({
|
|
54600
54594
|
find: Qc,
|
|
54601
54595
|
type: this.type
|
|
54602
54596
|
})];
|
|
54603
54597
|
},
|
|
54604
54598
|
addPasteRules() {
|
|
54605
|
-
return [
|
|
54599
|
+
return [i({
|
|
54606
54600
|
find: Zc,
|
|
54607
54601
|
type: this.type
|
|
54608
|
-
}),
|
|
54602
|
+
}), i({
|
|
54609
54603
|
find: $c,
|
|
54610
54604
|
type: this.type
|
|
54611
54605
|
})];
|
|
54612
54606
|
}
|
|
54613
|
-
}), tl = " ", nl = "\xA0", rl =
|
|
54607
|
+
}), tl = " ", nl = "\xA0", rl = g.create({
|
|
54614
54608
|
name: "paragraph",
|
|
54615
54609
|
priority: 1e3,
|
|
54616
54610
|
addOptions() {
|
|
@@ -54638,8 +54632,9 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54638
54632
|
if (!e) return "";
|
|
54639
54633
|
let r = Array.isArray(e.content) ? e.content : [];
|
|
54640
54634
|
if (r.length === 0) {
|
|
54641
|
-
|
|
54642
|
-
|
|
54635
|
+
var i, a;
|
|
54636
|
+
let e = Array.isArray(n == null || (i = n.previousNode) == null ? void 0 : i.content) ? n.previousNode.content : [];
|
|
54637
|
+
return (n == null || (a = n.previousNode) == null ? void 0 : a.type) === "paragraph" && e.length === 0 ? tl : "";
|
|
54643
54638
|
}
|
|
54644
54639
|
return t.renderChildren(r);
|
|
54645
54640
|
},
|
|
@@ -54649,7 +54644,7 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54649
54644
|
addKeyboardShortcuts() {
|
|
54650
54645
|
return { "Mod-Alt-0": () => this.editor.commands.setParagraph() };
|
|
54651
54646
|
}
|
|
54652
|
-
}), il = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, al = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, ol =
|
|
54647
|
+
}), il = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, al = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, ol = S.create({
|
|
54653
54648
|
name: "strike",
|
|
54654
54649
|
addOptions() {
|
|
54655
54650
|
return { HTMLAttributes: {} };
|
|
@@ -54687,18 +54682,18 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54687
54682
|
return { "Mod-Shift-s": () => this.editor.commands.toggleStrike() };
|
|
54688
54683
|
},
|
|
54689
54684
|
addInputRules() {
|
|
54690
|
-
return [
|
|
54685
|
+
return [u({
|
|
54691
54686
|
find: il,
|
|
54692
54687
|
type: this.type
|
|
54693
54688
|
})];
|
|
54694
54689
|
},
|
|
54695
54690
|
addPasteRules() {
|
|
54696
|
-
return [
|
|
54691
|
+
return [i({
|
|
54697
54692
|
find: al,
|
|
54698
54693
|
type: this.type
|
|
54699
54694
|
})];
|
|
54700
54695
|
}
|
|
54701
|
-
}), sl =
|
|
54696
|
+
}), sl = g.create({
|
|
54702
54697
|
name: "text",
|
|
54703
54698
|
group: "inline",
|
|
54704
54699
|
parseMarkdown: (e) => ({
|
|
@@ -54706,7 +54701,7 @@ var Ac = (e, t) => kc(e, t, !1), jc = (e, t) => {
|
|
|
54706
54701
|
text: e.text || ""
|
|
54707
54702
|
}),
|
|
54708
54703
|
renderMarkdown: (e) => e.text || ""
|
|
54709
|
-
}), cl =
|
|
54704
|
+
}), cl = S.create({
|
|
54710
54705
|
name: "underline",
|
|
54711
54706
|
addOptions() {
|
|
54712
54707
|
return { HTMLAttributes: {} };
|
|
@@ -54878,7 +54873,7 @@ var ll = w.create({
|
|
|
54878
54873
|
options: e.options,
|
|
54879
54874
|
storage: e.storage
|
|
54880
54875
|
};
|
|
54881
|
-
return { allowGapCursor:
|
|
54876
|
+
return { allowGapCursor: te(h(e, "allowGapCursor", t)) ?? null };
|
|
54882
54877
|
}
|
|
54883
54878
|
}), fl = "placeholder", pl = new _e("tiptap__placeholder");
|
|
54884
54879
|
function ml(e) {
|
|
@@ -54899,7 +54894,7 @@ function hl(e, t) {
|
|
|
54899
54894
|
function gl({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, from: a, to: o }) {
|
|
54900
54895
|
let { anchor: s } = i, c = [], l = e.isEmpty;
|
|
54901
54896
|
return r.nodesBetween(a, o, (r, i) => {
|
|
54902
|
-
let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf &&
|
|
54897
|
+
let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf && C(r);
|
|
54903
54898
|
return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(ml({
|
|
54904
54899
|
editor: e,
|
|
54905
54900
|
isEmptyDoc: l,
|
|
@@ -54921,11 +54916,11 @@ function gl({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, fro
|
|
|
54921
54916
|
}), c;
|
|
54922
54917
|
}
|
|
54923
54918
|
function _l({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
54924
|
-
if (!
|
|
54919
|
+
if (!e.isEditable && t.showOnlyWhenEditable) return null;
|
|
54925
54920
|
let { anchor: a } = i, o = [], s = e.isEmpty;
|
|
54926
54921
|
if (t.showOnlyCurrent && !t.includeChildren) {
|
|
54927
54922
|
let i = r.resolve(a), c = i.depth > 0 ? i.node(1) : i.nodeAfter, l = i.depth > 0 ? i.before(1) : a;
|
|
54928
|
-
if (c && c.type.isTextblock &&
|
|
54923
|
+
if (c && c.type.isTextblock && C(c)) {
|
|
54929
54924
|
let r = a >= l && a <= l + c.nodeSize;
|
|
54930
54925
|
o.push(ml({
|
|
54931
54926
|
editor: e,
|
|
@@ -55009,7 +55004,7 @@ function Sl(e, t) {
|
|
|
55009
55004
|
function Cl(e, t, n) {
|
|
55010
55005
|
let r = [];
|
|
55011
55006
|
if (e.docChanged) {
|
|
55012
|
-
let t =
|
|
55007
|
+
let t = x(e);
|
|
55013
55008
|
for (let e of t) r.push(...Sl(n.doc, e.newRange));
|
|
55014
55009
|
}
|
|
55015
55010
|
return e.selectionSet && (r.push(yl(n.doc, vl(n.doc, e.mapping.map(t.selection.anchor)))), r.push(yl(n.doc, vl(n.doc, n.selection.anchor)))), xl(r);
|
|
@@ -55105,7 +55100,7 @@ var kl = w.create({
|
|
|
55105
55100
|
}
|
|
55106
55101
|
});
|
|
55107
55102
|
function Al(e, t) {
|
|
55108
|
-
return !e.selection.empty && !
|
|
55103
|
+
return !e.selection.empty && !c(e.selection) && t.isEditable;
|
|
55109
55104
|
}
|
|
55110
55105
|
function jl(e, t) {
|
|
55111
55106
|
return Al(e, t) && !t.isFocused && !t.view.dragging;
|
|
@@ -55212,7 +55207,7 @@ var Fl = w.create({
|
|
|
55212
55207
|
name: "starterKit",
|
|
55213
55208
|
addExtensions() {
|
|
55214
55209
|
let e = [];
|
|
55215
|
-
return this.options.bold !== !1 && e.push(Rc.configure(this.options.bold)), this.options.blockquote !== !1 && e.push(Nc.configure(this.options.blockquote)), this.options.bulletList !== !1 && e.push(
|
|
55210
|
+
return this.options.bold !== !1 && e.push(Rc.configure(this.options.bold)), this.options.blockquote !== !1 && e.push(Nc.configure(this.options.blockquote)), this.options.bulletList !== !1 && e.push(Qo.configure(this.options.bulletList)), this.options.code !== !1 && e.push(Vc.configure(this.options.code)), this.options.codeBlock !== !1 && e.push(Gc.configure(this.options.codeBlock)), this.options.document !== !1 && e.push(Kc.configure(this.options.document)), this.options.dropcursor !== !1 && e.push(ll.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && e.push(dl.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && e.push(qc.configure(this.options.hardBreak)), this.options.heading !== !1 && e.push(Jc.configure(this.options.heading)), this.options.undoRedo !== !1 && e.push(Il.configure(this.options.undoRedo)), this.options.horizontalRule !== !1 && e.push(Yc.configure(this.options.horizontalRule)), this.options.italic !== !1 && e.push(el.configure(this.options.italic)), this.options.listItem !== !1 && e.push(xs.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(As.configure(this.options?.listKeymap)), this.options.link !== !1 && e.push(de.configure(this.options?.link)), this.options.orderedList !== !1 && e.push(qs.configure(this.options.orderedList)), this.options.paragraph !== !1 && e.push(rl.configure(this.options.paragraph)), this.options.strike !== !1 && e.push(ol.configure(this.options.strike)), this.options.text !== !1 && e.push(sl.configure(this.options.text)), this.options.underline !== !1 && e.push(cl.configure(this.options?.underline)), this.options.trailingNode !== !1 && e.push(Fl.configure(this.options?.trailingNode)), e;
|
|
55216
55211
|
}
|
|
55217
55212
|
}), Rl = ({ enableUndoRedo: e } = {}) => ({
|
|
55218
55213
|
starterKit: Ll.configure({
|
|
@@ -55225,8 +55220,8 @@ var Fl = w.create({
|
|
|
55225
55220
|
}),
|
|
55226
55221
|
externalLinkPreview: me,
|
|
55227
55222
|
callout: pe,
|
|
55228
|
-
taskList:
|
|
55229
|
-
taskItem:
|
|
55223
|
+
taskList: ec.configure({ HTMLAttributes: { class: "scribe-task-list" } }),
|
|
55224
|
+
taskItem: $s.configure({ nested: !0 }),
|
|
55230
55225
|
tableKit: le.configure({ table: !1 }),
|
|
55231
55226
|
table: ue,
|
|
55232
55227
|
highlight: Ke,
|
|
@@ -55241,7 +55236,7 @@ var Fl = w.create({
|
|
|
55241
55236
|
enableEmoticons: !0
|
|
55242
55237
|
}),
|
|
55243
55238
|
mathematics: Jo,
|
|
55244
|
-
typography:
|
|
55239
|
+
typography: Cc
|
|
55245
55240
|
});
|
|
55246
55241
|
//#endregion
|
|
55247
55242
|
export { ul as n, kl as r, Rl as t };
|