@milkdown/crepe 7.3.3 → 7.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/feature/block-edit/handle/index.d.ts.map +1 -1
- package/lib/feature/toolbar/index.d.ts.map +1 -1
- package/lib/{index-N9GtIS4X.js → index-0c09be_R.js} +4 -4
- package/lib/{index-0RbcZMbq.js → index-2Cm9HHYj.js} +1 -1
- package/lib/{index-Pwn25-kf.js → index-3qfZtuPz.js} +1 -1
- package/lib/{index-oTRzPo3B.js → index-5QLddZAp.js} +4 -4
- package/lib/{index-bkuIUPFS.js → index-7mRbGzci.js} +5 -5
- package/lib/{index-rrf6_6DC.js → index-8NLp8LdC.js} +1 -1
- package/lib/{index-yt2EpMtv.js → index-Gg_apETx.js} +5 -5
- package/lib/{index-vJbZIHYF.js → index-Gz6CQY-t.js} +4 -4
- package/lib/{use-css-light-dom-EKWZDmbJ.js → index-H0TD0r41.js} +24 -23
- package/lib/{index-7QgQq3x3.js → index-Ic30Lzgg.js} +4 -4
- package/lib/{index-7MeyepDG.js → index-JGveSciI.js} +7 -7
- package/lib/{index-lsG76a9s.js → index-KpfNv3rh.js} +4 -4
- package/lib/{index-FIk_7oPb.js → index-TRbxSkC1.js} +4 -4
- package/lib/{index-SdFSDosa.js → index-TsIsEZU1.js} +1 -1
- package/lib/{index-wn1_LgCS.js → index-WAhmZOxr.js} +4 -4
- package/lib/{index-4afXjFMY.js → index-YMk3n5vO.js} +4 -4
- package/lib/{index-9A_GmGh4.js → index-Zxe2neJQ.js} +9 -9
- package/lib/{index-W5Th22-Z.js → index-b2y_N_O5.js} +7 -7
- package/lib/{index-Eg39w5kL.js → index-bnwzlBfQ.js} +6 -6
- package/lib/{index-vxy63hib.js → index-fJFWq6Y-.js} +7 -7
- package/lib/{index-MovKtgMG.js → index-ffdCLz6T.js} +2 -2
- package/lib/{index-EJJfYLzA.js → index-hNRb95TL.js} +4 -4
- package/lib/{index-8Gg-jEP4.js → index-h_6aZnx8.js} +4 -4
- package/lib/{index-jPA8J9Eo.js → index-j2S9Lybz.js} +1 -1
- package/lib/{index-8S8qcncB.js → index-kJIKUIIa.js} +3 -3
- package/lib/{index-7pgP6qYs.js → index-kwrazjQE.js} +7 -7
- package/lib/{index-vPRh55CO.js → index-oOHgRzEu.js} +3 -6
- package/lib/{index-8DvtgRVa.js → index-qQMehYhQ.js} +24 -24
- package/lib/{index-LlbrXb_n.js → index-wbiYuOxV.js} +56 -64
- package/lib/{index-bknOViGv.js → index-xkrG0YF8.js} +1 -1
- package/lib/{index-XiXSFLmI.js → index-yP4hAgM2.js} +11 -11
- package/lib/index.es.js +1 -1
- package/lib/{schema-tKk3m1fu.js → schema-t8-IDHY6.js} +1 -1
- package/lib/{tippy.esm-MZ2vxByW.js → tippy.esm-xX0Dh8mH.js} +1 -1
- package/lib/{tooltip-plugin-gcwyQdiT.js → tooltip-plugin-0UgO85XO.js} +25 -22
- package/package.json +14 -14
- package/src/feature/block-edit/handle/index.ts +0 -3
- package/src/feature/block-edit/menu/index.ts +0 -3
- package/src/feature/toolbar/index.ts +0 -3
|
@@ -7,15 +7,15 @@ var s = (e, o, t) => (x(e, o, "read from private field"), t ? t.call(e) : o.get(
|
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
o instanceof WeakSet ? o.add(e) : o.set(e, t);
|
|
9
9
|
}, p = (e, o, t, i) => (x(e, o, "write to private field"), i ? i.call(e, t) : o.set(e, t), t);
|
|
10
|
-
var
|
|
11
|
-
import { w
|
|
10
|
+
var S = (e, o, t) => (x(e, o, "access private method"), t);
|
|
11
|
+
import { w, h as O } from "./meta-tAGyVRPE.js";
|
|
12
12
|
import { l as b, e as B, t as N } from "./icons-HYkfuR-O.js";
|
|
13
|
-
import { $ as
|
|
14
|
-
import { t as E, p as F, d as q } from "./tippy.esm-
|
|
13
|
+
import { $ as y, T as A, x as M, P as R, z as _ } from "./index-yP4hAgM2.js";
|
|
14
|
+
import { t as E, p as F, d as q } from "./tippy.esm-xX0Dh8mH.js";
|
|
15
15
|
const K = {
|
|
16
16
|
mode: "preview"
|
|
17
|
-
},
|
|
18
|
-
L
|
|
17
|
+
}, L = y({ ...K }, "linkTooltipStateCtx");
|
|
18
|
+
w(L, {
|
|
19
19
|
displayName: "State<link-tooltip>",
|
|
20
20
|
group: "LinkTooltip"
|
|
21
21
|
});
|
|
@@ -26,8 +26,8 @@ const z = {
|
|
|
26
26
|
},
|
|
27
27
|
removeLink: () => {
|
|
28
28
|
}
|
|
29
|
-
}, Q =
|
|
30
|
-
L
|
|
29
|
+
}, Q = y({ ...z }, "linkTooltipAPICtx");
|
|
30
|
+
w(L, {
|
|
31
31
|
displayName: "API<link-tooltip>",
|
|
32
32
|
group: "LinkTooltip"
|
|
33
33
|
});
|
|
@@ -39,14 +39,14 @@ const D = {
|
|
|
39
39
|
onCopyLink: () => {
|
|
40
40
|
},
|
|
41
41
|
inputPlaceholder: "Paste link..."
|
|
42
|
-
}, V =
|
|
42
|
+
}, V = y({
|
|
43
43
|
...D
|
|
44
44
|
}, "linkTooltipConfigCtx");
|
|
45
|
-
L
|
|
45
|
+
w(L, {
|
|
46
46
|
displayName: "Config<link-tooltip>",
|
|
47
47
|
group: "LinkTooltip"
|
|
48
48
|
});
|
|
49
|
-
var n, r, h,
|
|
49
|
+
var n, r, h, u, d, f, $;
|
|
50
50
|
class W {
|
|
51
51
|
constructor(o) {
|
|
52
52
|
/// @internal
|
|
@@ -58,17 +58,20 @@ class W {
|
|
|
58
58
|
/// @internal
|
|
59
59
|
l(this, h, void 0);
|
|
60
60
|
/// @internal
|
|
61
|
-
l(this, m, void 0);
|
|
62
61
|
l(this, u, void 0);
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
l(this, d, void 0);
|
|
63
|
+
p(this, d, (t, i) => {
|
|
64
|
+
const { state: a, composing: c } = t, { selection: m, doc: g } = a, { ranges: k } = m, T = Math.min(...k.map((C) => C.$from.pos)), P = Math.max(...k.map((C) => C.$to.pos)), I = i && i.doc.eq(g) && i.selection.eq(m);
|
|
65
65
|
if (s(this, n) ?? p(this, n, E(t.dom, {
|
|
66
66
|
trigger: "manual",
|
|
67
67
|
interactive: !0,
|
|
68
|
+
delay: 0,
|
|
69
|
+
arrow: !1,
|
|
70
|
+
duration: 0,
|
|
68
71
|
...s(this, r),
|
|
69
72
|
content: this.element
|
|
70
73
|
})), !(c || I)) {
|
|
71
|
-
if (!s(this,
|
|
74
|
+
if (!s(this, u).call(this, t, i)) {
|
|
72
75
|
this.hide();
|
|
73
76
|
return;
|
|
74
77
|
}
|
|
@@ -77,7 +80,7 @@ class W {
|
|
|
77
80
|
}), this.show();
|
|
78
81
|
}
|
|
79
82
|
}), this.update = (t, i) => {
|
|
80
|
-
q(s(this,
|
|
83
|
+
q(s(this, d), s(this, h))(t, i);
|
|
81
84
|
}, this.destroy = () => {
|
|
82
85
|
var t;
|
|
83
86
|
(t = s(this, n)) == null || t.destroy();
|
|
@@ -87,15 +90,15 @@ class W {
|
|
|
87
90
|
}, this.hide = () => {
|
|
88
91
|
var t;
|
|
89
92
|
(t = s(this, n)) == null || t.hide();
|
|
90
|
-
}, this.getInstance = () => s(this, n), this.element = o.content, p(this, r, o.tippyOptions ?? {}), p(this, h, o.debounce ?? 200), p(this,
|
|
93
|
+
}, this.getInstance = () => s(this, n), this.element = o.content, p(this, r, o.tippyOptions ?? {}), p(this, h, o.debounce ?? 200), p(this, u, o.shouldShow ?? S(this, f, $));
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
|
-
n = new WeakMap(), r = new WeakMap(), h = new WeakMap(),
|
|
94
|
-
const { doc: t, selection: i } = o.state, { empty: a, from: c, to:
|
|
95
|
-
return !(T || a ||
|
|
96
|
+
n = new WeakMap(), r = new WeakMap(), h = new WeakMap(), u = new WeakMap(), d = new WeakMap(), f = new WeakSet(), $ = function(o) {
|
|
97
|
+
const { doc: t, selection: i } = o.state, { empty: a, from: c, to: m } = i, g = !t.textBetween(c, m).length && o.state.selection instanceof A, k = this.element.contains(document.activeElement), T = !o.hasFocus() && !k, P = !o.editable;
|
|
98
|
+
return !(T || a || g || P);
|
|
96
99
|
};
|
|
97
100
|
function X(e) {
|
|
98
|
-
const o =
|
|
101
|
+
const o = y({}, `${e}_TOOLTIP_SPEC`), t = M((a) => {
|
|
99
102
|
const c = a.get(o.key);
|
|
100
103
|
return new R({
|
|
101
104
|
key: new _(`${e}_TOOLTIP`),
|
|
@@ -113,7 +116,7 @@ function X(e) {
|
|
|
113
116
|
export {
|
|
114
117
|
W as T,
|
|
115
118
|
Q as a,
|
|
116
|
-
|
|
119
|
+
L as b,
|
|
117
120
|
V as l,
|
|
118
121
|
X as t
|
|
119
122
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milkdown/crepe",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.3.
|
|
4
|
+
"version": "7.3.4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
"nanoid": "^5.0.0",
|
|
40
40
|
"thememirror": "^2.0.1",
|
|
41
41
|
"tslib": "^2.5.0",
|
|
42
|
-
"@milkdown/components": "7.3.
|
|
43
|
-
"@milkdown/core": "7.3.
|
|
44
|
-
"@milkdown/ctx": "7.3.
|
|
45
|
-
"@milkdown/plugin-block": "7.3.
|
|
46
|
-
"@milkdown/plugin-clipboard": "7.3.
|
|
47
|
-
"@milkdown/plugin-cursor": "7.3.
|
|
48
|
-
"@milkdown/plugin-
|
|
49
|
-
"@milkdown/plugin-
|
|
50
|
-
"@milkdown/plugin-
|
|
51
|
-
"@milkdown/plugin-
|
|
52
|
-
"@milkdown/preset-commonmark": "7.3.
|
|
53
|
-
"@milkdown/prose": "7.3.
|
|
54
|
-
"@milkdown/utils": "7.3.
|
|
42
|
+
"@milkdown/components": "7.3.4",
|
|
43
|
+
"@milkdown/core": "7.3.4",
|
|
44
|
+
"@milkdown/ctx": "7.3.4",
|
|
45
|
+
"@milkdown/plugin-block": "7.3.4",
|
|
46
|
+
"@milkdown/plugin-clipboard": "7.3.4",
|
|
47
|
+
"@milkdown/plugin-cursor": "7.3.4",
|
|
48
|
+
"@milkdown/plugin-history": "7.3.4",
|
|
49
|
+
"@milkdown/plugin-indent": "7.3.4",
|
|
50
|
+
"@milkdown/plugin-slash": "7.3.4",
|
|
51
|
+
"@milkdown/plugin-tooltip": "7.3.4",
|
|
52
|
+
"@milkdown/preset-commonmark": "7.3.4",
|
|
53
|
+
"@milkdown/prose": "7.3.4",
|
|
54
|
+
"@milkdown/utils": "7.3.4"
|
|
55
55
|
},
|
|
56
56
|
"nx": {
|
|
57
57
|
"targets": {
|