@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.
Files changed (41) hide show
  1. package/lib/feature/block-edit/handle/index.d.ts.map +1 -1
  2. package/lib/feature/toolbar/index.d.ts.map +1 -1
  3. package/lib/{index-N9GtIS4X.js → index-0c09be_R.js} +4 -4
  4. package/lib/{index-0RbcZMbq.js → index-2Cm9HHYj.js} +1 -1
  5. package/lib/{index-Pwn25-kf.js → index-3qfZtuPz.js} +1 -1
  6. package/lib/{index-oTRzPo3B.js → index-5QLddZAp.js} +4 -4
  7. package/lib/{index-bkuIUPFS.js → index-7mRbGzci.js} +5 -5
  8. package/lib/{index-rrf6_6DC.js → index-8NLp8LdC.js} +1 -1
  9. package/lib/{index-yt2EpMtv.js → index-Gg_apETx.js} +5 -5
  10. package/lib/{index-vJbZIHYF.js → index-Gz6CQY-t.js} +4 -4
  11. package/lib/{use-css-light-dom-EKWZDmbJ.js → index-H0TD0r41.js} +24 -23
  12. package/lib/{index-7QgQq3x3.js → index-Ic30Lzgg.js} +4 -4
  13. package/lib/{index-7MeyepDG.js → index-JGveSciI.js} +7 -7
  14. package/lib/{index-lsG76a9s.js → index-KpfNv3rh.js} +4 -4
  15. package/lib/{index-FIk_7oPb.js → index-TRbxSkC1.js} +4 -4
  16. package/lib/{index-SdFSDosa.js → index-TsIsEZU1.js} +1 -1
  17. package/lib/{index-wn1_LgCS.js → index-WAhmZOxr.js} +4 -4
  18. package/lib/{index-4afXjFMY.js → index-YMk3n5vO.js} +4 -4
  19. package/lib/{index-9A_GmGh4.js → index-Zxe2neJQ.js} +9 -9
  20. package/lib/{index-W5Th22-Z.js → index-b2y_N_O5.js} +7 -7
  21. package/lib/{index-Eg39w5kL.js → index-bnwzlBfQ.js} +6 -6
  22. package/lib/{index-vxy63hib.js → index-fJFWq6Y-.js} +7 -7
  23. package/lib/{index-MovKtgMG.js → index-ffdCLz6T.js} +2 -2
  24. package/lib/{index-EJJfYLzA.js → index-hNRb95TL.js} +4 -4
  25. package/lib/{index-8Gg-jEP4.js → index-h_6aZnx8.js} +4 -4
  26. package/lib/{index-jPA8J9Eo.js → index-j2S9Lybz.js} +1 -1
  27. package/lib/{index-8S8qcncB.js → index-kJIKUIIa.js} +3 -3
  28. package/lib/{index-7pgP6qYs.js → index-kwrazjQE.js} +7 -7
  29. package/lib/{index-vPRh55CO.js → index-oOHgRzEu.js} +3 -6
  30. package/lib/{index-8DvtgRVa.js → index-qQMehYhQ.js} +24 -24
  31. package/lib/{index-LlbrXb_n.js → index-wbiYuOxV.js} +56 -64
  32. package/lib/{index-bknOViGv.js → index-xkrG0YF8.js} +1 -1
  33. package/lib/{index-XiXSFLmI.js → index-yP4hAgM2.js} +11 -11
  34. package/lib/index.es.js +1 -1
  35. package/lib/{schema-tKk3m1fu.js → schema-t8-IDHY6.js} +1 -1
  36. package/lib/{tippy.esm-MZ2vxByW.js → tippy.esm-xX0Dh8mH.js} +1 -1
  37. package/lib/{tooltip-plugin-gcwyQdiT.js → tooltip-plugin-0UgO85XO.js} +25 -22
  38. package/package.json +14 -14
  39. package/src/feature/block-edit/handle/index.ts +0 -3
  40. package/src/feature/block-edit/menu/index.ts +0 -3
  41. 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 $ = (e, o, t) => (x(e, o, "access private method"), t);
11
- import { w as L, h as O } from "./meta-tAGyVRPE.js";
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 g, T as A, x as M, P as R, z as _ } from "./index-XiXSFLmI.js";
14
- import { t as E, p as F, d as q } from "./tippy.esm-MZ2vxByW.js";
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
- }, S = g({ ...K }, "linkTooltipStateCtx");
18
- L(S, {
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 = g({ ...z }, "linkTooltipAPICtx");
30
- L(S, {
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 = g({
42
+ }, V = y({
43
43
  ...D
44
44
  }, "linkTooltipConfigCtx");
45
- L(S, {
45
+ w(L, {
46
46
  displayName: "Config<link-tooltip>",
47
47
  group: "LinkTooltip"
48
48
  });
49
- var n, r, h, m, u, f, w;
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
- p(this, u, (t, i) => {
64
- const { state: a, composing: c } = t, { selection: d, doc: y } = a, { ranges: k } = d, T = Math.min(...k.map((C) => C.$from.pos)), P = Math.max(...k.map((C) => C.$to.pos)), I = i && i.doc.eq(y) && i.selection.eq(d);
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, m).call(this, t, i)) {
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, u), s(this, h))(t, i);
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, m, o.shouldShow ?? $(this, f, w));
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(), m = new WeakMap(), u = new WeakMap(), f = new WeakSet(), w = function(o) {
94
- const { doc: t, selection: i } = o.state, { empty: a, from: c, to: d } = i, y = !t.textBetween(c, d).length && o.state.selection instanceof A, k = this.element.contains(document.activeElement), T = !o.hasFocus() && !k, P = !o.editable;
95
- return !(T || a || y || P);
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 = g({}, `${e}_TOOLTIP_SPEC`), t = M((a) => {
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
- S as b,
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.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.3",
43
- "@milkdown/core": "7.3.3",
44
- "@milkdown/ctx": "7.3.3",
45
- "@milkdown/plugin-block": "7.3.3",
46
- "@milkdown/plugin-clipboard": "7.3.3",
47
- "@milkdown/plugin-cursor": "7.3.3",
48
- "@milkdown/plugin-indent": "7.3.3",
49
- "@milkdown/plugin-history": "7.3.3",
50
- "@milkdown/plugin-tooltip": "7.3.3",
51
- "@milkdown/plugin-slash": "7.3.3",
52
- "@milkdown/preset-commonmark": "7.3.3",
53
- "@milkdown/prose": "7.3.3",
54
- "@milkdown/utils": "7.3.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": {
@@ -25,9 +25,6 @@ export class BlockHandleView implements PluginView {
25
25
  ctx,
26
26
  content,
27
27
  tippyOptions: {
28
- arrow: false,
29
- delay: 0,
30
- duration: 0,
31
28
  onShow: () => {
32
29
  this.#content.show = true
33
30
  },
@@ -43,9 +43,6 @@ class MenuView implements PluginView {
43
43
  content: this.#content,
44
44
  debounce: 20,
45
45
  tippyOptions: {
46
- arrow: false,
47
- delay: 0,
48
- duration: 0,
49
46
  onShow: () => {
50
47
  this.#content.show = true
51
48
  },
@@ -26,9 +26,6 @@ class ToolbarView implements PluginView {
26
26
  content: this.#content,
27
27
  debounce: 20,
28
28
  tippyOptions: {
29
- arrow: false,
30
- delay: 0,
31
- duration: 0,
32
29
  onShow: () => {
33
30
  this.#content.show = true
34
31
  },