@clevertask/scribe 0.1.18 → 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 +29 -1
- 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 +64 -64
- package/dist/components/Menu/LinkBubbleMenu.js +16 -16
- 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 +2 -5
- 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 +38 -38
- package/dist/components/Scribe/extension/external-link-preview/index.d.ts +1 -2
- package/dist/components/Scribe/extension/external-link-preview/index.d.ts.map +1 -1
- package/dist/components/Scribe/extension/external-link-preview/index.js +20 -113
- package/dist/components/Scribe/extension/external-link-preview/node-view.js +6 -6
- package/dist/components/Scribe/extension/external-link-preview/paste.js +5 -5
- package/dist/components/Scribe/extension/external-link-preview/render-html.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/schema.d.ts +8 -0
- package/dist/components/Scribe/extension/external-link-preview/schema.d.ts.map +1 -0
- package/dist/components/Scribe/extension/external-link-preview/schema.js +100 -0
- package/dist/components/Scribe/extension/index.d.ts +2 -2
- package/dist/components/Scribe/extension/index.d.ts.map +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 +32 -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 +4 -4
- package/dist/{slashCommand-D35jcSNp.js → dist-Bm6rBIf2.js} +101 -110
- package/dist/{dist-DRPH9MfF.js → dist-BrbZZTdj.js} +21 -9
- package/dist/{dist-CkWsQ5Lj.js → dist-jjH04EIX.js} +585 -798
- package/dist/extension-BNjzWzJi.js +57 -0
- package/dist/{extension-link-yMrg9JOz.js → extension-link-7ta0X4tP.js} +2 -2
- package/dist/{html-to-markdown-CnlA8pb8.js → html-to-markdown-pY8ngCXa.js} +14 -14
- package/dist/main.js +6 -6
- package/dist/{markdown-to-html-BLzYd3Fu.js → markdown-to-html-BSuSwB4B.js} +42 -14
- package/dist/{menus-Dy2dj4QT.js → menus-i0cEakC3.js} +137 -135
- package/dist/{resizable-table-D0mls3aB.js → resizable-table-DFTyMlVu.js} +27 -30
- package/dist/{extension-DOo9QT6U.js → schema-extensions-B-U6SbYg.js} +51922 -51962
- package/dist/schema-extensions.d.ts +20 -0
- package/dist/schema-extensions.d.ts.map +1 -0
- package/dist/schema-extensions.js +2 -0
- package/dist/schema.d.ts +17 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +5 -0
- 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 +57 -51
|
@@ -1,134 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { createExternalLinkPreviewResolverPlugin as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { createExternalLinkPreviewPastePlugin as _ } from "./paste.js";
|
|
12
|
-
import { createExternalLinkPreviewPolicyPlugin as v, createExternalLinkPreviewPolicyTransaction as y } from "./policy.js";
|
|
1
|
+
import { EXTERNAL_LINK_PREVIEW_DISPLAYS as e } from "./types.js";
|
|
2
|
+
import { EXTERNAL_LINK_PREVIEW_NODE_NAME as t } from "./attributes.js";
|
|
3
|
+
import { ExternalLinkPreviewSchema as n } from "./schema.js";
|
|
4
|
+
import { r } from "../../../../dist-BrbZZTdj.js";
|
|
5
|
+
import { createExternalLinkPreviewResolverPlugin as i } from "./resolver.js";
|
|
6
|
+
import { createExternalLinkPreviewCommands as a } from "./commands.js";
|
|
7
|
+
import { ExternalLinkPreviewNodeView as o } from "./node-view.js";
|
|
8
|
+
import { createExternalLinkPreviewNormalizationPlugin as s, createExternalLinkPreviewNormalizationTransaction as c } from "./normalization.js";
|
|
9
|
+
import { createExternalLinkPreviewPastePlugin as l } from "./paste.js";
|
|
10
|
+
import { createExternalLinkPreviewPolicyPlugin as u, createExternalLinkPreviewPolicyTransaction as d } from "./policy.js";
|
|
13
11
|
//#region lib/components/Scribe/extension/external-link-preview/index.ts
|
|
14
|
-
var
|
|
15
|
-
if (o(e) !== e) throw RangeError("External link previews require an absolute HTTP(S) URL.");
|
|
16
|
-
}, x = (e) => {
|
|
17
|
-
if (s(e) !== e) throw RangeError("External link previews require non-empty fallback link text.");
|
|
18
|
-
}, S = (e) => {
|
|
19
|
-
if (!i(e)) throw RangeError(`Invalid external link preview display: ${String(e)}`);
|
|
20
|
-
}, C = (e, t) => {
|
|
21
|
-
if (t !== null && l({ [e]: t })[e] !== t) throw RangeError(`Invalid external link preview ${e}.`);
|
|
22
|
-
}, w = (e, t) => {
|
|
23
|
-
if (t !== null && c(t) !== t) throw RangeError(`Invalid external link preview ${e}.`);
|
|
24
|
-
}, T = t.create({
|
|
25
|
-
name: r,
|
|
26
|
-
priority: 1100,
|
|
27
|
-
group: "inline",
|
|
28
|
-
inline: !0,
|
|
29
|
-
atom: !0,
|
|
30
|
-
selectable: !0,
|
|
31
|
-
draggable: !1,
|
|
32
|
-
addOptions() {
|
|
33
|
-
return {
|
|
34
|
-
HTMLAttributes: {},
|
|
35
|
-
autoPreviewOnPaste: !1,
|
|
36
|
-
resolve: void 0,
|
|
37
|
-
shouldPreview: void 0
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
addAttributes() {
|
|
41
|
-
return {
|
|
42
|
-
href: {
|
|
43
|
-
default: "",
|
|
44
|
-
rendered: !1,
|
|
45
|
-
validate: b
|
|
46
|
-
},
|
|
47
|
-
linkText: {
|
|
48
|
-
default: "",
|
|
49
|
-
rendered: !1,
|
|
50
|
-
validate: x
|
|
51
|
-
},
|
|
52
|
-
display: {
|
|
53
|
-
default: "compact",
|
|
54
|
-
rendered: !1,
|
|
55
|
-
validate: S
|
|
56
|
-
},
|
|
57
|
-
pageTitle: {
|
|
58
|
-
default: null,
|
|
59
|
-
rendered: !1,
|
|
60
|
-
validate: (e) => C("pageTitle", e)
|
|
61
|
-
},
|
|
62
|
-
description: {
|
|
63
|
-
default: null,
|
|
64
|
-
rendered: !1,
|
|
65
|
-
validate: (e) => C("description", e)
|
|
66
|
-
},
|
|
67
|
-
siteName: {
|
|
68
|
-
default: null,
|
|
69
|
-
rendered: !1,
|
|
70
|
-
validate: (e) => C("siteName", e)
|
|
71
|
-
},
|
|
72
|
-
faviconUrl: {
|
|
73
|
-
default: null,
|
|
74
|
-
rendered: !1,
|
|
75
|
-
validate: (e) => w("faviconUrl", e)
|
|
76
|
-
},
|
|
77
|
-
imageUrl: {
|
|
78
|
-
default: null,
|
|
79
|
-
rendered: !1,
|
|
80
|
-
validate: (e) => w("imageUrl", e)
|
|
81
|
-
},
|
|
82
|
-
fetchedAt: {
|
|
83
|
-
default: null,
|
|
84
|
-
rendered: !1,
|
|
85
|
-
validate: (e) => C("fetchedAt", e)
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
},
|
|
89
|
-
parseHTML() {
|
|
90
|
-
return [{
|
|
91
|
-
tag: "span[data-type=\"external-link-preview\"]",
|
|
92
|
-
getAttrs: (e) => d(e) ?? !1
|
|
93
|
-
}];
|
|
94
|
-
},
|
|
95
|
-
renderHTML({ node: e }) {
|
|
96
|
-
let t = a(e.attrs);
|
|
97
|
-
return t ? g({
|
|
98
|
-
attributes: t,
|
|
99
|
-
HTMLAttributes: this.options.HTMLAttributes
|
|
100
|
-
}) : [
|
|
101
|
-
"span",
|
|
102
|
-
{ "data-type": "external-link-preview" },
|
|
103
|
-
"Invalid external link"
|
|
104
|
-
];
|
|
105
|
-
},
|
|
12
|
+
var f = n.extend({
|
|
106
13
|
addCommands() {
|
|
107
|
-
return
|
|
14
|
+
return a({
|
|
108
15
|
resolveMetadata: !!this.options.resolve,
|
|
109
16
|
shouldPreview: this.options.shouldPreview
|
|
110
17
|
});
|
|
111
18
|
},
|
|
112
19
|
addNodeView() {
|
|
113
|
-
return
|
|
20
|
+
return r(o, { trackNodeViewPosition: !0 });
|
|
114
21
|
},
|
|
115
22
|
onCreate() {
|
|
116
23
|
if (this.editor.isDestroyed) return;
|
|
117
|
-
let e =
|
|
24
|
+
let e = c(this.editor.state);
|
|
118
25
|
e && this.editor.view.dispatch(e.setMeta("addToHistory", !1));
|
|
119
|
-
let t =
|
|
26
|
+
let t = d(this.editor.state, this.options.shouldPreview);
|
|
120
27
|
t && this.editor.view.dispatch(t);
|
|
121
28
|
},
|
|
122
29
|
addProseMirrorPlugins() {
|
|
123
30
|
return [
|
|
124
|
-
|
|
31
|
+
l({
|
|
125
32
|
previewType: this.type,
|
|
126
33
|
autoPreviewOnPaste: this.options.autoPreviewOnPaste === !0,
|
|
127
34
|
shouldPreview: this.options.shouldPreview
|
|
128
35
|
}),
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
36
|
+
u(this.options.shouldPreview),
|
|
37
|
+
s(),
|
|
38
|
+
i({
|
|
132
39
|
editor: this.editor,
|
|
133
40
|
resolve: this.options.resolve
|
|
134
41
|
})
|
|
@@ -136,4 +43,4 @@ var b = (e) => {
|
|
|
136
43
|
}
|
|
137
44
|
});
|
|
138
45
|
//#endregion
|
|
139
|
-
export {
|
|
46
|
+
export { e as EXTERNAL_LINK_PREVIEW_DISPLAYS, t as EXTERNAL_LINK_PREVIEW_NODE_NAME, f as ExternalLinkPreview };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getExternalLinkPreviewHostname as e, getExternalLinkPreviewTitle as t, normalizeExternalLinkPreviewAttributes as n } from "./attributes.js";
|
|
2
|
+
import { n as r, s as i } from "../../../../dist-BrbZZTdj.js";
|
|
3
3
|
import { showLinkBubbleMenu as a } from "../../../Menu/linkBubbleMenuPlugin.js";
|
|
4
4
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
5
|
//#region lib/components/Scribe/extension/external-link-preview/node-view.tsx
|
|
@@ -19,7 +19,7 @@ var c = (e, t) => {
|
|
|
19
19
|
strokeWidth: "1.5"
|
|
20
20
|
})
|
|
21
21
|
}), u = ({ editor: u, getPos: d, node: f }) => {
|
|
22
|
-
let p =
|
|
22
|
+
let p = n(f.attrs), m = i({
|
|
23
23
|
editor: u,
|
|
24
24
|
selector: ({ editor: e }) => {
|
|
25
25
|
let t = d();
|
|
@@ -32,14 +32,14 @@ var c = (e, t) => {
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
|
-
if (!p) return /* @__PURE__ */ o(
|
|
35
|
+
if (!p) return /* @__PURE__ */ o(r, {
|
|
36
36
|
as: "span",
|
|
37
37
|
className: "scribe-external-link-preview scribe-external-link-preview--invalid",
|
|
38
38
|
"data-type": "external-link-preview",
|
|
39
39
|
children: "Invalid external link"
|
|
40
40
|
});
|
|
41
|
-
let h = p.display === "card" && m.isSoleTextblockContent ? "card" : "compact", g =
|
|
42
|
-
return /* @__PURE__ */ o(
|
|
41
|
+
let h = p.display === "card" && m.isSoleTextblockContent ? "card" : "compact", g = t(p, h), _ = h === "card" ? p.siteName || e(p.href) : null;
|
|
42
|
+
return /* @__PURE__ */ o(r, {
|
|
43
43
|
as: "span",
|
|
44
44
|
className: `scribe-external-link-preview scribe-external-link-preview--${h}`,
|
|
45
45
|
"data-type": "external-link-preview",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { normalizeExternalLinkPreviewAttributes as e, normalizeExternalLinkPreviewHref as t } from "./attributes.js";
|
|
2
|
+
import { normalizeLinkUrl as n } from "../../../Menu/linkUrl.js";
|
|
3
3
|
import { NodeSelection as r, Plugin as i, PluginKey as a } from "@tiptap/pm/state";
|
|
4
4
|
//#region lib/components/Scribe/extension/external-link-preview/paste.ts
|
|
5
5
|
var o = new a("scribeExternalLinkPreviewPaste"), s = (e) => {
|
|
@@ -26,19 +26,19 @@ var o = new a("scribeExternalLinkPreviewPaste"), s = (e) => {
|
|
|
26
26
|
props: { handlePaste(i, o) {
|
|
27
27
|
let f = s(o);
|
|
28
28
|
if (!f) return !1;
|
|
29
|
-
let p =
|
|
29
|
+
let p = n(f);
|
|
30
30
|
if (!i.state.selection.empty && p) {
|
|
31
31
|
let e = c(i, p);
|
|
32
32
|
return e && o.preventDefault(), e;
|
|
33
33
|
}
|
|
34
|
-
let m =
|
|
34
|
+
let m = t(f);
|
|
35
35
|
if (!u || !m || !l(i, a)) return !1;
|
|
36
36
|
try {
|
|
37
37
|
if (d && !d(m)) return !1;
|
|
38
38
|
} catch {
|
|
39
39
|
return !1;
|
|
40
40
|
}
|
|
41
|
-
let h =
|
|
41
|
+
let h = e({
|
|
42
42
|
href: m,
|
|
43
43
|
linkText: f,
|
|
44
44
|
display: "compact"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as e } from "../../../../dist-
|
|
1
|
+
import { L as e } from "../../../../dist-jjH04EIX.js";
|
|
2
2
|
import { getExternalLinkPreviewHostname as t, getExternalLinkPreviewTitle as n } from "./attributes.js";
|
|
3
3
|
import { getExternalLinkPreviewDataAttributes as r } from "./serialization.js";
|
|
4
4
|
//#region lib/components/Scribe/extension/external-link-preview/render-html.ts
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Node } from "@tiptap/core";
|
|
2
|
+
import type { ExternalLinkPreviewOptions } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* The persistence schema for Scribe external-link previews. Interactive
|
|
5
|
+
* behavior is layered onto this node by the regular Scribe editor entry point.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ExternalLinkPreviewSchema: Node<ExternalLinkPreviewOptions, any>;
|
|
8
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Scribe/extension/external-link-preview/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAYpC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAyC1D;;;GAGG;AACH,eAAO,MAAM,yBAAyB,uCA+FpC,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { a as e } from "../../../../dist-jjH04EIX.js";
|
|
2
|
+
import { EXTERNAL_LINK_PREVIEW_NODE_NAME as t, isExternalLinkPreviewDisplay as n, normalizeExternalLinkPreviewAttributes as r, normalizeExternalLinkPreviewHref as i, normalizeExternalLinkPreviewLinkText as a, normalizeExternalLinkPreviewMediaUrl as o, normalizeExternalLinkPreviewMetadata as s } from "./attributes.js";
|
|
3
|
+
import { getExternalLinkPreviewAttributesFromElement as c } from "./serialization.js";
|
|
4
|
+
import { renderExternalLinkPreviewHTML as l } from "./render-html.js";
|
|
5
|
+
//#region lib/components/Scribe/extension/external-link-preview/schema.ts
|
|
6
|
+
var u = (e) => {
|
|
7
|
+
if (i(e) !== e) throw RangeError("External link previews require an absolute HTTP(S) URL.");
|
|
8
|
+
}, d = (e) => {
|
|
9
|
+
if (a(e) !== e) throw RangeError("External link previews require non-empty fallback link text.");
|
|
10
|
+
}, f = (e) => {
|
|
11
|
+
if (!n(e)) throw RangeError(`Invalid external link preview display: ${String(e)}`);
|
|
12
|
+
}, p = (e, t) => {
|
|
13
|
+
if (t !== null && s({ [e]: t })[e] !== t) throw RangeError(`Invalid external link preview ${e}.`);
|
|
14
|
+
}, m = (e, t) => {
|
|
15
|
+
if (t !== null && o(t) !== t) throw RangeError(`Invalid external link preview ${e}.`);
|
|
16
|
+
}, h = e.create({
|
|
17
|
+
name: t,
|
|
18
|
+
priority: 1100,
|
|
19
|
+
group: "inline",
|
|
20
|
+
inline: !0,
|
|
21
|
+
atom: !0,
|
|
22
|
+
selectable: !0,
|
|
23
|
+
draggable: !1,
|
|
24
|
+
addOptions() {
|
|
25
|
+
return {
|
|
26
|
+
HTMLAttributes: {},
|
|
27
|
+
autoPreviewOnPaste: !1,
|
|
28
|
+
resolve: void 0,
|
|
29
|
+
shouldPreview: void 0
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
addAttributes() {
|
|
33
|
+
return {
|
|
34
|
+
href: {
|
|
35
|
+
default: "",
|
|
36
|
+
rendered: !1,
|
|
37
|
+
validate: u
|
|
38
|
+
},
|
|
39
|
+
linkText: {
|
|
40
|
+
default: "",
|
|
41
|
+
rendered: !1,
|
|
42
|
+
validate: d
|
|
43
|
+
},
|
|
44
|
+
display: {
|
|
45
|
+
default: "compact",
|
|
46
|
+
rendered: !1,
|
|
47
|
+
validate: f
|
|
48
|
+
},
|
|
49
|
+
pageTitle: {
|
|
50
|
+
default: null,
|
|
51
|
+
rendered: !1,
|
|
52
|
+
validate: (e) => p("pageTitle", e)
|
|
53
|
+
},
|
|
54
|
+
description: {
|
|
55
|
+
default: null,
|
|
56
|
+
rendered: !1,
|
|
57
|
+
validate: (e) => p("description", e)
|
|
58
|
+
},
|
|
59
|
+
siteName: {
|
|
60
|
+
default: null,
|
|
61
|
+
rendered: !1,
|
|
62
|
+
validate: (e) => p("siteName", e)
|
|
63
|
+
},
|
|
64
|
+
faviconUrl: {
|
|
65
|
+
default: null,
|
|
66
|
+
rendered: !1,
|
|
67
|
+
validate: (e) => m("faviconUrl", e)
|
|
68
|
+
},
|
|
69
|
+
imageUrl: {
|
|
70
|
+
default: null,
|
|
71
|
+
rendered: !1,
|
|
72
|
+
validate: (e) => m("imageUrl", e)
|
|
73
|
+
},
|
|
74
|
+
fetchedAt: {
|
|
75
|
+
default: null,
|
|
76
|
+
rendered: !1,
|
|
77
|
+
validate: (e) => p("fetchedAt", e)
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
parseHTML() {
|
|
82
|
+
return [{
|
|
83
|
+
tag: "span[data-type=\"external-link-preview\"]",
|
|
84
|
+
getAttrs: (e) => c(e) ?? !1
|
|
85
|
+
}];
|
|
86
|
+
},
|
|
87
|
+
renderHTML({ node: e }) {
|
|
88
|
+
let t = r(e.attrs);
|
|
89
|
+
return t ? l({
|
|
90
|
+
attributes: t,
|
|
91
|
+
HTMLAttributes: this.options.HTMLAttributes
|
|
92
|
+
}) : [
|
|
93
|
+
"span",
|
|
94
|
+
{ "data-type": "external-link-preview" },
|
|
95
|
+
"Invalid external link"
|
|
96
|
+
];
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
//#endregion
|
|
100
|
+
export { h as ExternalLinkPreviewSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ScribeProps } from "..";
|
|
2
|
-
export declare const initExtensions: (props: ScribeProps) => (import("@tiptap/core").
|
|
2
|
+
export declare const initExtensions: (props: ScribeProps) => (import("@tiptap/core").AnyExtension | import("@tiptap/core").Extension<import("@tiptap/extension-focus").FocusOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-placeholder").PlaceholderOptions, any> | import("@tiptap/core").Extension<{
|
|
3
3
|
anchorTypes: string[];
|
|
4
4
|
onUpdate?: import("./tableOfContents").ScribeTableOfContentsChangeHandler;
|
|
5
5
|
}, {
|
|
@@ -16,5 +16,5 @@ export declare const initExtensions: (props: ScribeProps) => (import("@tiptap/co
|
|
|
16
16
|
updateScrollParent: () => void;
|
|
17
17
|
}> | import("@tiptap/core").Extension<{
|
|
18
18
|
slashSuggestion: Partial<import("@tiptap/suggestion").SuggestionOptions<import("./slashCommand").SuggestionItem, import("./slashCommand").SuggestionItem>>;
|
|
19
|
-
}, any> | import("@tiptap/core").
|
|
19
|
+
}, any> | import("@tiptap/core").Node<import("./external-link-preview").ExternalLinkPreviewOptions, any>)[];
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/Scribe/extension/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/Scribe/extension/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAatC,eAAO,MAAM,cAAc,UAAW,WAAW;;;;;;;;;;;;;;;;;2GAuEhD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../extension-
|
|
1
|
+
import { t as e } from "../../../extension-BNjzWzJi.js";
|
|
2
2
|
export { e as initExtensions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../resizable-table-
|
|
1
|
+
import { t as e } from "../../../resizable-table-DFTyMlVu.js";
|
|
2
2
|
export { e as ScribeTable };
|
|
@@ -1,2 +1,32 @@
|
|
|
1
|
-
import { n as e
|
|
2
|
-
|
|
1
|
+
import { n as e } from "../../../../dist-jjH04EIX.js";
|
|
2
|
+
import { n as t } from "../../../../dist-Bm6rBIf2.js";
|
|
3
|
+
import { PluginKey as n } from "@tiptap/pm/state";
|
|
4
|
+
//#region lib/components/Scribe/extension/slashCommand/index.ts
|
|
5
|
+
var r = new n("slashSuggestion"), i = e.create({
|
|
6
|
+
name: "slashCommand",
|
|
7
|
+
addOptions() {
|
|
8
|
+
return {
|
|
9
|
+
...this.parent?.(),
|
|
10
|
+
slashSuggestion: {
|
|
11
|
+
char: "/",
|
|
12
|
+
startOfLine: !0,
|
|
13
|
+
command: ({ editor: e, range: t, props: n }) => {
|
|
14
|
+
n.command({
|
|
15
|
+
editor: e,
|
|
16
|
+
range: t,
|
|
17
|
+
props: n
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
addProseMirrorPlugins() {
|
|
24
|
+
return [t({
|
|
25
|
+
pluginKey: r,
|
|
26
|
+
...this.options.slashSuggestion,
|
|
27
|
+
editor: this.editor
|
|
28
|
+
})];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
//#endregion
|
|
32
|
+
export { i as SlashCommand, r as slashMenuPluginKey };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e } from "../../../../dist-
|
|
1
|
+
import { i as e } from "../../../../dist-BrbZZTdj.js";
|
|
2
2
|
import { getPopupMountTarget as t } from "../getPopupMountTarget.js";
|
|
3
3
|
import { t as n } from "../../../../tippy.esm-DOXqN1Qm.js";
|
|
4
4
|
import { SlashCommandList as r } from "./SlashCommandList.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "../../../dist-
|
|
1
|
+
import { n as e } from "../../../dist-jjH04EIX.js";
|
|
2
2
|
import { Plugin as t, PluginKey as n } from "@tiptap/pm/state";
|
|
3
3
|
//#region lib/components/Scribe/extension/tableOfContents.ts
|
|
4
4
|
var r = "scribeTableOfContents", i = new n("scribeTableOfContents"), a = 10, o = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "heading", s = (e, t) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as e, t } from "../../BarMenu-
|
|
2
|
-
import { o as n, t as r } from "../../dist-
|
|
1
|
+
import { n as e, t } from "../../BarMenu-sZGqMjQr.js";
|
|
2
|
+
import { o as n, t as r } from "../../dist-BrbZZTdj.js";
|
|
3
3
|
import i from "../Menu/CalloutBubbleMenu.js";
|
|
4
4
|
import a from "../Menu/LinkBubbleMenu.js";
|
|
5
5
|
import o from "../Menu/TableBubbleMenu.js";
|
|
6
|
-
import { t as s } from "../../html-to-markdown-
|
|
7
|
-
import { t as c } from "../../extension-
|
|
6
|
+
import { t as s } from "../../html-to-markdown-pY8ngCXa.js";
|
|
7
|
+
import { t as c } from "../../extension-BNjzWzJi.js";
|
|
8
8
|
import { SuggestionItemType as l } from "./extension/slashCommand/items.js";
|
|
9
9
|
import "./extension/tableOfContents.js";
|
|
10
10
|
import "../../utils/index.js";
|