@milkdown/plugin-slash 7.5.9 → 7.6.1

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 (2) hide show
  1. package/lib/index.es.js +8 -8
  2. package/package.json +7 -7
package/lib/index.es.js CHANGED
@@ -27,13 +27,13 @@ function W(s) {
27
27
  displayName: `Prose<slash>|${s}`
28
28
  }, n;
29
29
  }
30
- var c, d, u, f, h, g, y, S, x, B;
30
+ var c, p, u, f, h, g, y, S, x, B;
31
31
  class X {
32
32
  constructor(e) {
33
33
  i(this, x);
34
34
  i(this, c);
35
35
  /// @internal
36
- i(this, d);
36
+ i(this, p);
37
37
  /// @internal
38
38
  i(this, u);
39
39
  /// @internal
@@ -49,7 +49,7 @@ class X {
49
49
  }, this.onHide = () => {
50
50
  }, a(this, S, (t, n) => {
51
51
  var E;
52
- const { state: r, composing: m } = t, { selection: l, doc: $ } = r, { ranges: k } = l, w = Math.min(...k.map((p) => p.$from.pos)), P = Math.max(...k.map((p) => p.$to.pos)), b = n && n.doc.eq($) && n.selection.eq(l);
52
+ const { state: r, composing: m } = t, { selection: l, doc: $ } = r, { ranges: k } = l, w = Math.min(...k.map((d) => d.$from.pos)), P = Math.max(...k.map((d) => d.$to.pos)), b = n && n.doc.eq($) && n.selection.eq(l);
53
53
  if (o(this, c) || ((E = t.dom.parentElement) == null || E.appendChild(this.element), a(this, c, !0)), m || b) return;
54
54
  if (!o(this, g).call(this, t, n)) {
55
55
  this.hide();
@@ -59,11 +59,11 @@ class X {
59
59
  getBoundingClientRect: () => U(t, w, P)
60
60
  }, this.element, {
61
61
  placement: "bottom-start",
62
- middleware: [L(), j(o(this, y)), ...o(this, d)],
62
+ middleware: [L(), j(o(this, y)), ...o(this, p)],
63
63
  ...o(this, u)
64
- }).then(({ x: p, y: M }) => {
64
+ }).then(({ x: d, y: M }) => {
65
65
  Object.assign(this.element.style, {
66
- left: `${p}px`,
66
+ left: `${d}px`,
67
67
  top: `${M}px`
68
68
  });
69
69
  }), this.show();
@@ -83,10 +83,10 @@ class X {
83
83
  this.element.dataset.show = "true", this.onShow();
84
84
  }, this.hide = () => {
85
85
  this.element.dataset.show = "false", this.onHide();
86
- }, this.element = e.content, a(this, f, e.debounce ?? 200), a(this, g, e.shouldShow ?? A(this, x, B)), a(this, h, e.trigger ?? "/"), a(this, y, e.offset), a(this, d, e.middleware ?? []), a(this, u, e.floatingUIOptions ?? {});
86
+ }, this.element = e.content, a(this, f, e.debounce ?? 200), a(this, g, e.shouldShow ?? A(this, x, B)), a(this, h, e.trigger ?? "/"), a(this, y, e.offset), a(this, p, e.middleware ?? []), a(this, u, e.floatingUIOptions ?? {});
87
87
  }
88
88
  }
89
- c = new WeakMap(), d = new WeakMap(), u = new WeakMap(), f = new WeakMap(), h = new WeakMap(), g = new WeakMap(), y = new WeakMap(), S = new WeakMap(), x = new WeakSet(), /// @internal
89
+ c = new WeakMap(), p = new WeakMap(), u = new WeakMap(), f = new WeakMap(), h = new WeakMap(), g = new WeakMap(), y = new WeakMap(), S = new WeakMap(), x = new WeakSet(), /// @internal
90
90
  B = function(e) {
91
91
  const t = this.getContent(e);
92
92
  if (!t) return !1;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@milkdown/plugin-slash",
3
3
  "type": "module",
4
- "version": "7.5.9",
4
+ "version": "7.6.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -33,14 +33,14 @@
33
33
  "@floating-ui/dom": "^1.5.1",
34
34
  "@types/lodash.debounce": "^4.0.7",
35
35
  "lodash.debounce": "^4.0.8",
36
- "tslib": "^2.5.0",
37
- "@milkdown/exception": "7.5.9",
38
- "@milkdown/utils": "7.5.9"
36
+ "tslib": "^2.8.1",
37
+ "@milkdown/exception": "7.6.1",
38
+ "@milkdown/utils": "7.6.1"
39
39
  },
40
40
  "devDependencies": {
41
- "@milkdown/prose": "7.5.9",
42
- "@milkdown/core": "7.5.9",
43
- "@milkdown/ctx": "7.5.9"
41
+ "@milkdown/core": "7.6.1",
42
+ "@milkdown/ctx": "7.6.1",
43
+ "@milkdown/prose": "7.6.1"
44
44
  },
45
45
  "nx": {
46
46
  "targets": {