@clevertask/scribe 0.1.19 → 0.1.20
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-sZGqMjQr.js} +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 +2 -2
- 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 +1 -1
- 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/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/index.js +2 -2
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +1 -1
- package/dist/components/Scribe/extension/tableOfContents.js +1 -1
- package/dist/components/Scribe/index.js +3 -3
- package/dist/{dist-CzXFZHMF.js → dist-Bm6rBIf2.js} +55 -39
- package/dist/{dist-DRPH9MfF.js → dist-BrbZZTdj.js} +21 -9
- package/dist/{dist-CkWsQ5Lj.js → dist-jjH04EIX.js} +585 -798
- package/dist/{extension-CKcvyrIW.js → extension-BNjzWzJi.js} +2 -2
- package/dist/{extension-link-yMrg9JOz.js → extension-link-7ta0X4tP.js} +2 -2
- package/dist/main.js +1 -1
- package/dist/{markdown-to-html-COv0iaxr.js → markdown-to-html-BSuSwB4B.js} +37 -9
- package/dist/{menus-D1cst_3I.js → menus-i0cEakC3.js} +48 -46
- package/dist/{resizable-table-D0mls3aB.js → resizable-table-DFTyMlVu.js} +27 -30
- package/dist/{schema-extensions-ChhE6XCo.js → schema-extensions-B-U6SbYg.js} +206 -211
- package/dist/schema-extensions.js +1 -1
- package/dist/schema.js +1 -1
- package/dist/utils/index.js +3 -3
- package/dist/utils/markdown-to-html.js +1 -1
- package/package.json +51 -51
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, F as r, H as i, I as a, L as o, M as s, O as c, R as l, S as u, U as d, V as f, W as p, _ as m, a as h, b as g, c as _, d as v, f as y, g as b, i as x, j as S, k as C, l as ee, n as w, p as te, r as ne, s as re, u as ie, w as ae, x as oe, z as se } from "./dist-
|
|
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, C as t, D as n, F as r, H as i, I as a, L as o, M as s, O as c, R as l, S as u, U as d, V as f, W as p, _ as m, a as h, b as g, c as _, d as v, f as y, g as b, i as x, j as S, k as C, l as ee, n as w, p as te, r as ne, s as re, u as ie, w as ae, x as oe, z as se } from "./dist-jjH04EIX.js";
|
|
2
|
+
import { t as ce } from "./dist-Bm6rBIf2.js";
|
|
3
|
+
import { n as le, t as ue } from "./resizable-table-DFTyMlVu.js";
|
|
4
|
+
import { n as de, t as fe } from "./extension-link-7ta0X4tP.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";
|
|
@@ -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
|
}, {
|
|
@@ -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 = h.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
|
|
53123
|
+
function fs(e) {
|
|
53127
53124
|
if (!(!e || /^\d+$/.test(e))) {
|
|
53128
|
-
if (
|
|
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 = h.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);
|
|
@@ -53251,13 +53248,14 @@ var Cs = h.create({
|
|
|
53251
53248
|
renderMarkdown: (e, t, n) => f(e, t, (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
|
}, n),
|
|
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
|
-
Xo({}, {
|
|
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) => {
|
|
53267
|
+
}), Ss = (e, t) => {
|
|
53284
53268
|
let { $from: n } = t.selection, r = oe(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
53277
|
let [, r] = g(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({
|
|
@@ -53317,17 +53301,17 @@ var ws = (e, t) => {
|
|
|
53317
53301
|
if (!e(t.state, n) || !c(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
|
-
},
|
|
53310
|
+
}, Os = (t, r) => {
|
|
53327
53311
|
if (!e(t.state, r) || !n(t.state, r)) 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(r, t.state) ? t.chain().focus(t.state.selection.from + 4).lift(r).joinBackward().run() : Ds(r, 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;
|
|
@@ -53340,19 +53324,7 @@ var ws = (e, t) => {
|
|
|
53340
53324
|
if (!c.canReplace(c.childCount, c.childCount, be.from(l))) return !1;
|
|
53341
53325
|
let d = o.before(), f = o.after(), p = d - 2;
|
|
53342
53326
|
return t.commands.command(({ tr: e, dispatch: t }) => (t && (e.delete(d, f).insert(p, be.from(l)), e.setSelection(ye.create(e.doc, p + 1)), e.scrollIntoView()), !0));
|
|
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({
|
|
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 = h.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 = h.create({
|
|
53696
53671
|
name: "taskItem",
|
|
53697
53672
|
addOptions() {
|
|
53698
53673
|
return {
|
|
@@ -53752,7 +53727,7 @@ var Qs = h.create({
|
|
|
53752
53727
|
return f(e, t, n);
|
|
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 = {
|
|
@@ -53767,9 +53742,9 @@ var Qs = h.create({
|
|
|
53767
53742
|
addNodeView() {
|
|
53768
53743
|
return ({ node: e, HTMLAttributes: n, 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) => {
|
|
@@ -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 = h.create({
|
|
53820
53795
|
name: "taskList",
|
|
53821
53796
|
addOptions() {
|
|
53822
53797
|
return {
|
|
@@ -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.30.
|
|
53926
|
-
var
|
|
53900
|
+
//#region node_modules/.pnpm/@tiptap+extension-task-item@3.30.5_@tiptap+extension-list@3.30.5_@tiptap+core@3.30.5_@t_bf9280703e0aff797f8f1952bf6fd784/node_modules/@tiptap/extension-task-item/dist/index.js
|
|
53901
|
+
var $s = Zs, ec = Qs, tc = (e) => i({
|
|
53927
53902
|
find: /--$/,
|
|
53928
53903
|
replace: e ?? "—"
|
|
53929
|
-
}),
|
|
53904
|
+
}), nc = (e) => i({
|
|
53930
53905
|
find: /\.\.\.$/,
|
|
53931
53906
|
replace: e ?? "…"
|
|
53932
|
-
}),
|
|
53907
|
+
}), rc = (e) => i({
|
|
53933
53908
|
find: /(?:^|[\s{[(<'"\u2018\u201C])(")$/,
|
|
53934
53909
|
replace: e ?? "“"
|
|
53935
|
-
}),
|
|
53910
|
+
}), ic = (e) => i({
|
|
53936
53911
|
find: /"$/,
|
|
53937
53912
|
replace: e ?? "”"
|
|
53938
|
-
}),
|
|
53913
|
+
}), ac = (e) => i({
|
|
53939
53914
|
find: /(?:^|[\s{[(<'"\u2018\u201C])(')$/,
|
|
53940
53915
|
replace: e ?? "‘"
|
|
53941
|
-
}),
|
|
53916
|
+
}), oc = (e) => i({
|
|
53942
53917
|
find: /'$/,
|
|
53943
53918
|
replace: e ?? "’"
|
|
53944
|
-
}),
|
|
53919
|
+
}), sc = (e) => i({
|
|
53945
53920
|
find: /<-$/,
|
|
53946
53921
|
replace: e ?? "←"
|
|
53947
|
-
}),
|
|
53922
|
+
}), cc = (e) => i({
|
|
53948
53923
|
find: /->$/,
|
|
53949
53924
|
replace: e ?? "→"
|
|
53950
|
-
}),
|
|
53925
|
+
}), lc = (e) => i({
|
|
53951
53926
|
find: /\(c\)$/,
|
|
53952
53927
|
replace: e ?? "©"
|
|
53953
|
-
}),
|
|
53928
|
+
}), uc = (e) => i({
|
|
53954
53929
|
find: /\(tm\)$/,
|
|
53955
53930
|
replace: e ?? "™"
|
|
53956
|
-
}),
|
|
53931
|
+
}), dc = (e) => i({
|
|
53957
53932
|
find: /\(sm\)$/,
|
|
53958
53933
|
replace: e ?? "℠"
|
|
53959
|
-
}),
|
|
53934
|
+
}), fc = (e) => i({
|
|
53960
53935
|
find: /\(r\)$/,
|
|
53961
53936
|
replace: e ?? "®"
|
|
53962
|
-
}),
|
|
53937
|
+
}), pc = (e) => i({
|
|
53963
53938
|
find: /(?:^|\s)(1\/2)\s$/,
|
|
53964
53939
|
replace: e ?? "½"
|
|
53965
|
-
}),
|
|
53940
|
+
}), mc = (e) => i({
|
|
53966
53941
|
find: /\+\/-$/,
|
|
53967
53942
|
replace: e ?? "±"
|
|
53968
|
-
}),
|
|
53943
|
+
}), hc = (e) => i({
|
|
53969
53944
|
find: /!=$/,
|
|
53970
53945
|
replace: e ?? "≠"
|
|
53971
|
-
}),
|
|
53946
|
+
}), gc = (e) => i({
|
|
53972
53947
|
find: /<<$/,
|
|
53973
53948
|
replace: e ?? "«"
|
|
53974
|
-
}),
|
|
53949
|
+
}), _c = (e) => i({
|
|
53975
53950
|
find: />>$/,
|
|
53976
53951
|
replace: e ?? "»"
|
|
53977
|
-
}),
|
|
53952
|
+
}), vc = (e) => i({
|
|
53978
53953
|
find: /\d+\s?([*x])\s?\d+$/,
|
|
53979
53954
|
replace: e ?? "×"
|
|
53980
|
-
}),
|
|
53955
|
+
}), yc = (e) => i({
|
|
53981
53956
|
find: /\^2$/,
|
|
53982
53957
|
replace: e ?? "²"
|
|
53983
|
-
}),
|
|
53958
|
+
}), bc = (e) => i({
|
|
53984
53959
|
find: /\^3$/,
|
|
53985
53960
|
replace: e ?? "³"
|
|
53986
|
-
}),
|
|
53961
|
+
}), xc = (e) => i({
|
|
53987
53962
|
find: /(?:^|\s)(1\/4)\s$/,
|
|
53988
53963
|
replace: e ?? "¼"
|
|
53989
|
-
}),
|
|
53964
|
+
}), Sc = (e) => i({
|
|
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;
|
|
@@ -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 {
|
|
@@ -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
|
},
|
|
@@ -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 };
|