@fileverse-dev/ddoc 2.1.9-patch-3 → 2.1.9-patch-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
|
|
1
|
-
import { B as l, g as m, s as y, d as k, i as b, c as L, a as O, e as E, H as h, b as x } from "./index-
|
1
|
+
import { B as l, g as m, s as y, d as k, i as b, c as L, a as O, e as E, H as h, b as x } from "./index-CIQcYg2P.mjs";
|
2
2
|
class M extends l {
|
3
3
|
constructor({ callbackSelector: r, cause: a, data: o, extraData: i, sender: d, urls: t }) {
|
4
4
|
var n;
|
@@ -86999,7 +86999,7 @@ async function T6(e, t) {
|
|
86999
86999
|
});
|
87000
87000
|
return $ === "0x" ? { data: void 0 } : { data: $ };
|
87001
87001
|
} catch (q) {
|
87002
|
-
const W = v8t(q), { offchainLookup: G, offchainLookupSignature: K } = await import("./ccip-
|
87002
|
+
const W = v8t(q), { offchainLookup: G, offchainLookupSignature: K } = await import("./ccip-DtnoTesh.mjs");
|
87003
87003
|
if (e.ccipRead !== !1 && (W == null ? void 0 : W.slice(0, 10)) === K && k)
|
87004
87004
|
return { data: await G(e, { data: W, to: k }) };
|
87005
87005
|
throw N && (W == null ? void 0 : W.slice(0, 10)) === "0x101bb98d" ? new C5t({ factory: u }) : sK(q, {
|
@@ -96879,18 +96879,18 @@ _n.addRule("strikethrough", {
|
|
96879
96879
|
return "<s>" + e + "</s>";
|
96880
96880
|
}
|
96881
96881
|
});
|
96882
|
-
const qxt = Qt.create({
|
96882
|
+
const qxt = (e) => Qt.create({
|
96883
96883
|
name: "markdownPasteHandler",
|
96884
96884
|
addProseMirrorPlugins() {
|
96885
96885
|
return [
|
96886
96886
|
new tn({
|
96887
96887
|
props: {
|
96888
|
-
handlePaste: (
|
96889
|
-
|
96890
|
-
const
|
96891
|
-
if (!
|
96892
|
-
const
|
96893
|
-
return Uxt(
|
96888
|
+
handlePaste: (t, n) => {
|
96889
|
+
n.preventDefault();
|
96890
|
+
const r = n.clipboardData;
|
96891
|
+
if (!r) return !1;
|
96892
|
+
const i = r.getData("text/plain");
|
96893
|
+
return Uxt(i) ? (fI(t, i, e), !0) : !1;
|
96894
96894
|
}
|
96895
96895
|
}
|
96896
96896
|
})
|
@@ -96898,37 +96898,37 @@ const qxt = Qt.create({
|
|
96898
96898
|
},
|
96899
96899
|
addCommands() {
|
96900
96900
|
return {
|
96901
|
-
uploadMarkdownFile: (
|
96902
|
-
const
|
96903
|
-
return
|
96904
|
-
const
|
96905
|
-
if (
|
96906
|
-
const
|
96907
|
-
if (
|
96908
|
-
const
|
96909
|
-
|
96910
|
-
var
|
96911
|
-
const
|
96901
|
+
uploadMarkdownFile: (t) => async ({ view: n }) => {
|
96902
|
+
const r = document.createElement("input");
|
96903
|
+
return r.type = "file", r.accept = ".md, text/markdown", r.onchange = async (i) => {
|
96904
|
+
const a = i.target.files;
|
96905
|
+
if (a.length > 0) {
|
96906
|
+
const o = a[0];
|
96907
|
+
if (o.type === "text/markdown" || o.name.endsWith(".md")) {
|
96908
|
+
const s = new FileReader();
|
96909
|
+
s.onload = async (l) => {
|
96910
|
+
var u;
|
96911
|
+
const c = (u = l.target) == null ? void 0 : u.result;
|
96912
96912
|
await fI(
|
96913
|
-
|
96914
|
-
|
96915
|
-
|
96913
|
+
n,
|
96914
|
+
c,
|
96915
|
+
t
|
96916
96916
|
);
|
96917
|
-
},
|
96917
|
+
}, s.readAsText(o);
|
96918
96918
|
}
|
96919
96919
|
}
|
96920
|
-
},
|
96920
|
+
}, r.click(), !0;
|
96921
96921
|
},
|
96922
|
-
exportMarkdownFile: () => async ({ editor:
|
96923
|
-
const
|
96924
|
-
extensions:
|
96925
|
-
(
|
96922
|
+
exportMarkdownFile: () => async ({ editor: t }) => {
|
96923
|
+
const n = t.state.doc, r = await cA(n), i = new K2({
|
96924
|
+
extensions: t.extensionManager.extensions.filter(
|
96925
|
+
(c) => c.name !== "collaboration"
|
96926
96926
|
),
|
96927
|
-
content:
|
96928
|
-
}),
|
96927
|
+
content: r.toJSON()
|
96928
|
+
}), a = i.getHTML(), o = _n.turndown(a), s = new Blob([o], {
|
96929
96929
|
type: "text/markdown;charset=utf-8"
|
96930
|
-
}),
|
96931
|
-
return
|
96930
|
+
}), l = URL.createObjectURL(s);
|
96931
|
+
return i.destroy(), l;
|
96932
96932
|
}
|
96933
96933
|
};
|
96934
96934
|
},
|
@@ -96936,12 +96936,12 @@ const qxt = Qt.create({
|
|
96936
96936
|
return [
|
96937
96937
|
new Vi({
|
96938
96938
|
find: /<sup>(.*?)<\/sup>/,
|
96939
|
-
handler: ({ state:
|
96940
|
-
const { tr:
|
96941
|
-
|
96942
|
-
i,
|
96939
|
+
handler: ({ state: t, range: n, match: r }) => {
|
96940
|
+
const { tr: i } = t, a = n.from, o = n.to, s = r[1];
|
96941
|
+
i.replaceWith(
|
96943
96942
|
a,
|
96944
|
-
|
96943
|
+
o,
|
96944
|
+
this.editor.schema.text(s, [
|
96945
96945
|
this.editor.schema.marks.superscript.create()
|
96946
96946
|
])
|
96947
96947
|
);
|
@@ -96949,12 +96949,12 @@ const qxt = Qt.create({
|
|
96949
96949
|
}),
|
96950
96950
|
new Vi({
|
96951
96951
|
find: /<sub>(.*?)<\/sub>/,
|
96952
|
-
handler: ({ state:
|
96953
|
-
const { tr:
|
96954
|
-
|
96955
|
-
i,
|
96952
|
+
handler: ({ state: t, range: n, match: r }) => {
|
96953
|
+
const { tr: i } = t, a = n.from, o = n.to, s = r[1];
|
96954
|
+
i.replaceWith(
|
96956
96955
|
a,
|
96957
|
-
|
96956
|
+
o,
|
96957
|
+
this.editor.schema.text(s, [
|
96958
96958
|
this.editor.schema.marks.subscript.create()
|
96959
96959
|
])
|
96960
96960
|
);
|
@@ -96963,12 +96963,12 @@ const qxt = Qt.create({
|
|
96963
96963
|
new Vi({
|
96964
96964
|
// eslint-disable-next-line no-useless-escape
|
96965
96965
|
find: /(\S*)\^((?:[^\^]|\\\^)+)\^/,
|
96966
|
-
handler: ({ state:
|
96967
|
-
const { tr:
|
96968
|
-
|
96969
|
-
i,
|
96966
|
+
handler: ({ state: t, range: n, match: r }) => {
|
96967
|
+
const { tr: i } = t, a = n.from + r[1].length, o = n.to, s = r[2].replace(/\\\^/g, "^");
|
96968
|
+
i.replaceWith(
|
96970
96969
|
a,
|
96971
|
-
|
96970
|
+
o,
|
96971
|
+
this.editor.schema.text(s, [
|
96972
96972
|
this.editor.schema.marks.superscript.create()
|
96973
96973
|
])
|
96974
96974
|
);
|
@@ -96976,12 +96976,12 @@ const qxt = Qt.create({
|
|
96976
96976
|
}),
|
96977
96977
|
new Vi({
|
96978
96978
|
find: /(\S*)~((?:[^~]|\\~)+)~/,
|
96979
|
-
handler: ({ state:
|
96980
|
-
const { tr:
|
96981
|
-
|
96982
|
-
i,
|
96979
|
+
handler: ({ state: t, range: n, match: r }) => {
|
96980
|
+
const { tr: i } = t, a = n.from + r[1].length, o = n.to, s = r[2].replace(/\\~/g, "~");
|
96981
|
+
i.replaceWith(
|
96983
96982
|
a,
|
96984
|
-
|
96983
|
+
o,
|
96984
|
+
this.editor.schema.text(s, [
|
96985
96985
|
this.editor.schema.marks.subscript.create()
|
96986
96986
|
])
|
96987
96987
|
);
|
@@ -96989,16 +96989,16 @@ const qxt = Qt.create({
|
|
96989
96989
|
}),
|
96990
96990
|
new Vi({
|
96991
96991
|
find: /(?:^|\s)\[([^\]]+)\]\((\S+)\)/,
|
96992
|
-
handler: ({ state:
|
96993
|
-
var
|
96994
|
-
const { tr:
|
96995
|
-
if (
|
96996
|
-
const
|
96997
|
-
|
96998
|
-
|
96999
|
-
|
97000
|
-
this.editor.schema.text(
|
97001
|
-
this.editor.schema.marks.link.create({ href:
|
96992
|
+
handler: ({ state: t, range: n, match: r }) => {
|
96993
|
+
var u;
|
96994
|
+
const { tr: i } = t, [a, o, s] = r, l = n.from, c = n.to;
|
96995
|
+
if (a) {
|
96996
|
+
const d = t.doc.resolve(l).nodeBefore, f = d && d.isText && ((u = d.text) == null ? void 0 : u.endsWith(" "));
|
96997
|
+
f && i.insertText(" ", l), i.replaceWith(
|
96998
|
+
f ? l + 1 : l,
|
96999
|
+
f ? c + 1 : c,
|
97000
|
+
this.editor.schema.text(o, [
|
97001
|
+
this.editor.schema.marks.link.create({ href: s })
|
97002
97002
|
])
|
97003
97003
|
);
|
97004
97004
|
}
|
@@ -97006,12 +97006,12 @@ const qxt = Qt.create({
|
|
97006
97006
|
}),
|
97007
97007
|
new Vi({
|
97008
97008
|
find: /===\s*$/m,
|
97009
|
-
handler: ({ state:
|
97010
|
-
var
|
97011
|
-
const { tr:
|
97012
|
-
((
|
97013
|
-
r,
|
97009
|
+
handler: ({ state: t, range: n }) => {
|
97010
|
+
var s;
|
97011
|
+
const { tr: r } = t, i = n.from - 2, a = n.to;
|
97012
|
+
((s = t.doc.nodeAt(i)) == null ? void 0 : s.type.name) === "dBlock" && r.replaceWith(
|
97014
97013
|
i,
|
97014
|
+
a,
|
97015
97015
|
this.editor.schema.nodes.pageBreak.create()
|
97016
97016
|
);
|
97017
97017
|
}
|
@@ -136461,7 +136461,7 @@ const tHt = ({
|
|
136461
136461
|
yDt,
|
136462
136462
|
tzt,
|
136463
136463
|
kTt,
|
136464
|
-
qxt,
|
136464
|
+
qxt(t),
|
136465
136465
|
MPt.configure({
|
136466
136466
|
html: !0,
|
136467
136467
|
// Allow HTML input/output
|
package/dist/index.es.js
CHANGED
@@ -13,6 +13,6 @@ declare module '@tiptap/core' {
|
|
13
13
|
};
|
14
14
|
}
|
15
15
|
}
|
16
|
-
declare const MarkdownPasteHandler: Extension<any, any>;
|
16
|
+
declare const MarkdownPasteHandler: (secureImageUploadUrl?: string) => Extension<any, any>;
|
17
17
|
export default MarkdownPasteHandler;
|
18
18
|
export declare function searchForSecureImageNodeAndEmbedImageContent(originalDoc: PMNode): Promise<PMNode>;
|