@milkdown/crepe 7.3.3 → 7.3.5

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 (42) hide show
  1. package/lib/feature/block-edit/handle/index.d.ts.map +1 -1
  2. package/lib/feature/block-edit/menu/index.d.ts.map +1 -1
  3. package/lib/feature/toolbar/index.d.ts.map +1 -1
  4. package/lib/{index-4afXjFMY.js → index-1KQHo-44.js} +4 -4
  5. package/lib/{index-SdFSDosa.js → index-4p4g7ekJ.js} +1 -1
  6. package/lib/{index-8Gg-jEP4.js → index-4uesIuIi.js} +4 -4
  7. package/lib/{index-Pwn25-kf.js → index-51ybuhXd.js} +1 -1
  8. package/lib/{index-0RbcZMbq.js → index-96I5UgEh.js} +1 -1
  9. package/lib/{index-vJbZIHYF.js → index-C17brGmy.js} +4 -4
  10. package/lib/{index-W5Th22-Z.js → index-EhPVaWMa.js} +7 -7
  11. package/lib/{index-jPA8J9Eo.js → index-IKzcztdD.js} +1 -1
  12. package/lib/{index-FIk_7oPb.js → index-KDuMRRPt.js} +4 -4
  13. package/lib/{use-css-light-dom-EKWZDmbJ.js → index-K_kBonEs.js} +24 -23
  14. package/lib/{index-7MeyepDG.js → index-Mwqn_gij.js} +7 -7
  15. package/lib/{index-oTRzPo3B.js → index-P2HixfB4.js} +4 -4
  16. package/lib/{index-rrf6_6DC.js → index-PwfWCMtB.js} +9 -9
  17. package/lib/{index-XiXSFLmI.js → index-S3dtETwZ.js} +46 -45
  18. package/lib/{index-yt2EpMtv.js → index-T6CCBIrO.js} +5 -5
  19. package/lib/{index-9A_GmGh4.js → index-UdINtlLB.js} +154 -152
  20. package/lib/{index-7pgP6qYs.js → index-WpINpUas.js} +7 -7
  21. package/lib/{index-LlbrXb_n.js → index-YjIgdsm-.js} +80 -84
  22. package/lib/{index-vPRh55CO.js → index-ZyvuYqIf.js} +21 -23
  23. package/lib/{index-8S8qcncB.js → index-brbFUWoa.js} +18 -18
  24. package/lib/{index-vxy63hib.js → index-cAviWcah.js} +7 -7
  25. package/lib/{index-lsG76a9s.js → index-f8O1bHwz.js} +4 -4
  26. package/lib/{index-N9GtIS4X.js → index-f_vMXWyc.js} +4 -4
  27. package/lib/{index-bknOViGv.js → index-gRh597MD.js} +5 -5
  28. package/lib/{index-wn1_LgCS.js → index-gaQ0Jeve.js} +4 -4
  29. package/lib/{index-MovKtgMG.js → index-hcG6NuOF.js} +2 -2
  30. package/lib/{index-8DvtgRVa.js → index-iECr6hjv.js} +24 -24
  31. package/lib/{index-bkuIUPFS.js → index-iHi9E5fI.js} +5 -5
  32. package/lib/{index-Eg39w5kL.js → index-sAnPFt21.js} +6 -6
  33. package/lib/{index-7QgQq3x3.js → index-wD9meLYq.js} +4 -4
  34. package/lib/{index-EJJfYLzA.js → index-zY_Ffd-9.js} +4 -4
  35. package/lib/index.es.js +1 -1
  36. package/lib/{schema-tKk3m1fu.js → schema-PTbL6iMu.js} +1 -1
  37. package/lib/{tippy.esm-MZ2vxByW.js → tippy.esm-lHdsQkl8.js} +33 -33
  38. package/lib/{tooltip-plugin-gcwyQdiT.js → tooltip-plugin-Pjm6nx6a.js} +32 -29
  39. package/package.json +14 -14
  40. package/src/feature/block-edit/handle/index.ts +2 -4
  41. package/src/feature/block-edit/menu/index.ts +2 -3
  42. package/src/feature/toolbar/index.ts +2 -3
@@ -8,20 +8,20 @@ var l = (i, t, o) => (wt(i, t, "read from private field"), o ? o.call(i) : t.get
8
8
  t instanceof WeakSet ? t.add(i) : t.set(i, o);
9
9
  }, c = (i, t, o, e) => (wt(i, t, "write to private field"), e ? e.call(i, o) : t.set(i, o), o);
10
10
  var Ct = (i, t, o) => (wt(i, t, "access private method"), o);
11
- import { d as It, t as Tt, p as ee } from "./tippy.esm-MZ2vxByW.js";
12
- import { j as ne, y as oe, q as St, f as y, $ as at, x as Rt, z as Dt, P as At, T as Ot, A as se, B as Nt, E as K, G as ie, H as le, I as re, J as ce, c as ae, K as de, i as he } from "./index-XiXSFLmI.js";
13
- import { i as pe, a as ue } from "./index-xHADmDT3.js";
14
- import { h as w, c as zt, e as me, u as Ft, a as yt } from "./meta-tAGyVRPE.js";
15
- import { a as ge, u as fe, b as W } from "./hooks-82sqkbtE.js";
16
- import { i as we } from "./schema-tKk3m1fu.js";
17
- const E = typeof navigator < "u" ? navigator : null, Bt = typeof document < "u" ? document : null, q = E && E.userAgent || "", bt = /Edge\/(\d+)/.exec(q), qt = /MSIE \d/.exec(q), Ht = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(q), mt = !!(qt || Ht || bt), Ce = qt ? document.documentMode : Ht ? +Ht[1] : bt ? +bt[1] : 0, ve = !mt && /gecko\/(\d+)/i.test(q);
18
- ve && +(/Firefox\/(\d+)/.exec(q) || [0, 0])[1];
19
- const Lt = !mt && /Chrome\/(\d+)/.exec(q);
20
- Lt && +Lt[1];
21
- const ke = !mt && !!E && /Apple Computer/.test(E.vendor), Kt = ke && (/Mobile\/\w+/.test(q) || !!E && E.maxTouchPoints > 2);
22
- Kt || E && /Mac/.test(E.platform);
23
- const ye = !!Bt && "webkitFontSmoothing" in Bt.documentElement.style, be = ye ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
24
- function He(i, t) {
11
+ import { d as Tt, t as It, p as ne } from "./tippy.esm-lHdsQkl8.js";
12
+ import { o as oe, z as se, t as Lt, g as y, $ as at, y as Rt, A as Dt, P as At, T as Ot, B as ie, E as Nt, G as K, H as le, I as re, J as ce, K as ae, c as de, L as he, f as zt, i as pe } from "./index-S3dtETwZ.js";
13
+ import { i as ue, a as me } from "./index-xHADmDT3.js";
14
+ import { h as w, c as Ft, e as ge, u as qt, a as yt } from "./meta-tAGyVRPE.js";
15
+ import { a as fe, u as we, b as W } from "./hooks-82sqkbtE.js";
16
+ import { i as Ce } from "./schema-PTbL6iMu.js";
17
+ const E = typeof navigator < "u" ? navigator : null, St = typeof document < "u" ? document : null, q = E && E.userAgent || "", bt = /Edge\/(\d+)/.exec(q), Kt = /MSIE \d/.exec(q), Ht = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(q), mt = !!(Kt || Ht || bt), ve = Kt ? document.documentMode : Ht ? +Ht[1] : bt ? +bt[1] : 0, ke = !mt && /gecko\/(\d+)/i.test(q);
18
+ ke && +(/Firefox\/(\d+)/.exec(q) || [0, 0])[1];
19
+ const Bt = !mt && /Chrome\/(\d+)/.exec(q);
20
+ Bt && +Bt[1];
21
+ const ye = !mt && !!E && /Apple Computer/.test(E.vendor), Wt = ye && (/Mobile\/\w+/.test(q) || !!E && E.maxTouchPoints > 2);
22
+ Wt || E && /Mac/.test(E.platform);
23
+ const be = !!St && "webkitFontSmoothing" in St.documentElement.style, He = be ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
24
+ function xe(i, t) {
25
25
  var n;
26
26
  const { state: o } = i, e = o.selection.$anchor;
27
27
  for (let s = e.depth; s > 0; s--)
@@ -32,7 +32,7 @@ function He(i, t) {
32
32
  const u = (n = i.dragging) == null ? void 0 : n.slice;
33
33
  if (!u)
34
34
  return null;
35
- const m = i.state.doc.resolve(d.pos), v = ne(i.state.doc, m.pos, u);
35
+ const m = i.state.doc.resolve(d.pos), v = oe(i.state.doc, m.pos, u);
36
36
  if (v == null || v < 0)
37
37
  return null;
38
38
  let g = o.tr;
@@ -42,7 +42,7 @@ function He(i, t) {
42
42
  }
43
43
  return null;
44
44
  }
45
- function xe(i, t, o) {
45
+ function Me(i, t, o) {
46
46
  let e = i.nodeDOM(o.pos);
47
47
  e || (e = i.nodeDOM(o.pos - 1));
48
48
  let n = e == null ? void 0 : e.parentElement;
@@ -50,13 +50,13 @@ function xe(i, t, o) {
50
50
  e = n, n = n.parentElement;
51
51
  return e;
52
52
  }
53
- const Me = (i) => !i.type.isBlock;
54
- function Ve(i) {
53
+ const Ve = (i) => !i.type.isBlock;
54
+ function _e(i) {
55
55
  let t = i.parent;
56
56
  const o = i.node();
57
57
  return t === o && (t = i.node(i.depth - 1)), !t || t.type.name === "doc" ? !1 : t.firstChild === o;
58
58
  }
59
- function _e(i, t, o) {
59
+ function Pe(i, t, o) {
60
60
  const e = t.dom.parentElement;
61
61
  if (!e)
62
62
  return null;
@@ -70,14 +70,14 @@ function _e(i, t, o) {
70
70
  return null;
71
71
  r = u;
72
72
  }
73
- for (; r && (Me(r) || Ve(s) || !o(r)); )
73
+ for (; r && (Ve(r) || _e(s) || !o(r)); )
74
74
  s = t.state.doc.resolve(s.before()), r = s.node();
75
75
  s = s.pos - s.parentOffset === 0 ? s : t.state.doc.resolve(s.pos - s.parentOffset);
76
- const d = xe(t, e, s);
76
+ const d = Me(t, e, s);
77
77
  return d ? { node: r, $pos: s, el: d } : null;
78
78
  }
79
79
  let $t = null;
80
- function Pe() {
80
+ function Le() {
81
81
  return $t || ($t = document.implementation.createHTMLDocument("title"));
82
82
  }
83
83
  const Se = {
@@ -102,7 +102,7 @@ function Be(i, t) {
102
102
  k.attrs !== k.type.defaultAttrs ? k.attrs : null
103
103
  ), s = k.content;
104
104
  }
105
- const r = i.someProp("clipboardSerializer") || oe.fromSchema(i.state.schema), d = Pe(), u = d.createElement("div");
105
+ const r = i.someProp("clipboardSerializer") || se.fromSchema(i.state.schema), d = Le(), u = d.createElement("div");
106
106
  u.appendChild(r.serializeFragment(s, { document: d }));
107
107
  let m = u.firstChild, v, g = 0;
108
108
  for (; m && m.nodeType === 1 && (v = Se[m.nodeName.toLowerCase()]); ) {
@@ -123,9 +123,9 @@ function Be(i, t) {
123
123
  `);
124
124
  return { dom: u, text: C };
125
125
  }
126
- const Zt = mt && Ce < 15 || Kt && be < 604, Et = 20;
127
- var j, tt, R, V, U, x, ht, Wt, D, Y, A, O, et, G, J, Q, nt;
128
- class Le {
126
+ const Zt = mt && ve < 15 || Wt && He < 604, Et = 20;
127
+ var j, tt, R, V, U, x, ht, jt, D, Y, A, O, et, G, J, Q, nt;
128
+ class $e {
129
129
  constructor() {
130
130
  /// @internal
131
131
  p(this, ht);
@@ -150,8 +150,8 @@ class Le {
150
150
  if (!l(this, V))
151
151
  return null;
152
152
  const t = l(this, V), o = l(this, D, Y);
153
- if (o && St.isSelectable(t.node)) {
154
- const e = St.create(o.state.doc, t.$pos.pos - (t.node.isLeaf ? 0 : 1));
153
+ if (o && Lt.isSelectable(t.node)) {
154
+ const e = Lt.create(o.state.doc, t.$pos.pos - (t.node.isLeaf ? 0 : 1));
155
155
  return o.dispatch(o.state.tr.setSelection(e)), o.focus(), c(this, R, e), e;
156
156
  }
157
157
  return null;
@@ -201,16 +201,16 @@ class Le {
201
201
  l(this, O).call(this);
202
202
  return;
203
203
  }
204
- const r = l(this, ht, Wt);
204
+ const r = l(this, ht, jt);
205
205
  if (!r)
206
206
  return;
207
- const d = _e(s, t, r);
207
+ const d = Pe(s, t, r);
208
208
  if (!d) {
209
209
  l(this, O).call(this);
210
210
  return;
211
211
  }
212
212
  l(this, et).call(this, d);
213
- }), this.mousemoveCallback = (t, o) => (t.composing || !t.editable || It(l(this, nt), 20)(t, o), !1), this.dragoverCallback = (t, o) => {
213
+ }), this.mousemoveCallback = (t, o) => (t.composing || !t.editable || Tt(l(this, nt), 20)(t, o), !1), this.dragoverCallback = (t, o) => {
214
214
  var e;
215
215
  if (l(this, x)) {
216
216
  const n = (e = l(this, D, Y)) == null ? void 0 : e.dom.parentElement;
@@ -235,12 +235,12 @@ class Le {
235
235
  }, this.dragleaveCallback = () => {
236
236
  c(this, x, !1), c(this, V, null);
237
237
  }, this.dropCallback = (t, o) => {
238
- const e = o, n = He(t, e);
238
+ const e = o, n = xe(t, e);
239
239
  return c(this, x, !1), n ? (t.dispatch(n), e.preventDefault(), !0) : !1;
240
240
  };
241
241
  }
242
242
  }
243
- j = new WeakMap(), tt = new WeakMap(), R = new WeakMap(), V = new WeakMap(), U = new WeakMap(), x = new WeakMap(), ht = new WeakSet(), Wt = function() {
243
+ j = new WeakMap(), tt = new WeakMap(), R = new WeakMap(), V = new WeakMap(), U = new WeakMap(), x = new WeakMap(), ht = new WeakSet(), jt = function() {
244
244
  var t;
245
245
  return (t = l(this, j)) == null ? void 0 : t.get(dt.key).filterNodes;
246
246
  }, D = new WeakSet(), Y = function() {
@@ -255,14 +255,14 @@ function gt(i, t) {
255
255
  }
256
256
  }), i;
257
257
  }
258
- const $e = (i) => {
258
+ const Ze = (i) => {
259
259
  const { name: t } = i.type;
260
260
  return !(t.startsWith("table") && t !== "table");
261
- }, dt = at({ filterNodes: $e }, "blockConfig");
261
+ }, dt = at({ filterNodes: Ze }, "blockConfig");
262
262
  gt(dt, {
263
263
  displayName: "Ctx<blockConfig>"
264
264
  });
265
- const xt = at(new Le(), "blockService");
265
+ const xt = at(new $e(), "blockService");
266
266
  gt(dt, {
267
267
  displayName: "Ctx<blockService>"
268
268
  });
@@ -291,15 +291,15 @@ const Vt = Rt((i) => {
291
291
  gt(Vt, {
292
292
  displayName: "Prose<block>"
293
293
  });
294
- var _, S, ot, X, N, z, pt, jt;
295
- class Ze {
294
+ var _, L, ot, X, N, z, pt, Ut;
295
+ class Ee {
296
296
  constructor(t) {
297
297
  /// @internal
298
298
  p(this, pt);
299
299
  /// @internal
300
300
  p(this, _, void 0);
301
301
  /// @internal
302
- p(this, S, void 0);
302
+ p(this, L, void 0);
303
303
  /// @internal
304
304
  p(this, ot, void 0);
305
305
  /// @internal
@@ -311,13 +311,13 @@ class Ze {
311
311
  requestAnimationFrame(() => {
312
312
  if (!l(this, _))
313
313
  try {
314
- Ct(this, pt, jt).call(this, o);
314
+ Ct(this, pt, Ut).call(this, o);
315
315
  } catch {
316
316
  }
317
317
  });
318
318
  }, this.destroy = () => {
319
319
  var o, e, n;
320
- (o = l(this, N)) == null || o.unBind(), (e = l(this, N)) == null || e.removeEvent(l(this, S)), (n = l(this, _)) == null || n.destroy(), c(this, _, void 0);
320
+ (o = l(this, N)) == null || o.unBind(), (e = l(this, N)) == null || e.removeEvent(l(this, L)), (n = l(this, _)) == null || n.destroy(), c(this, _, void 0);
321
321
  }, this.show = (o) => {
322
322
  requestAnimationFrame(() => {
323
323
  var e, n;
@@ -328,28 +328,31 @@ class Ze {
328
328
  }, this.hide = () => {
329
329
  var o;
330
330
  (o = l(this, _)) == null || o.hide();
331
- }, c(this, X, t.ctx), c(this, S, t.content), c(this, ot, t.tippyOptions ?? {});
331
+ }, c(this, X, t.ctx), c(this, L, t.content), c(this, ot, t.tippyOptions ?? {});
332
332
  }
333
333
  get activeNode() {
334
334
  return l(this, z);
335
335
  }
336
336
  }
337
- _ = new WeakMap(), S = new WeakMap(), ot = new WeakMap(), X = new WeakMap(), N = new WeakMap(), z = new WeakMap(), pt = new WeakSet(), jt = function(t) {
337
+ _ = new WeakMap(), L = new WeakMap(), ot = new WeakMap(), X = new WeakMap(), N = new WeakMap(), z = new WeakMap(), pt = new WeakSet(), Ut = function(t) {
338
338
  const o = l(this, X).get(xt.key);
339
339
  o.bind(l(this, X), (e) => {
340
340
  e.type === "hide" ? (this.hide(), c(this, z, null)) : (this.show(e.active), c(this, z, e.active));
341
- }), c(this, N, o), l(this, N).addEvent(l(this, S)), l(this, S).draggable = !0, c(this, _, Tt(t.dom, {
341
+ }), c(this, N, o), l(this, N).addEvent(l(this, L)), l(this, L).draggable = !0, c(this, _, It(t.dom, {
342
342
  trigger: "manual",
343
343
  placement: "left-start",
344
344
  interactive: !0,
345
+ delay: 0,
346
+ arrow: !1,
347
+ duration: 0,
345
348
  ...l(this, ot),
346
- content: l(this, S)
349
+ content: l(this, L)
347
350
  }));
348
351
  };
349
352
  const ft = [Mt, dt, xt, Vt];
350
353
  ft.key = Mt.key;
351
354
  ft.pluginKey = Vt.key;
352
- function Ee(i) {
355
+ function Te(i) {
353
356
  const t = at({}, `${i}_SLASH_SPEC`), o = Rt((n) => {
354
357
  const s = n.get(t.key);
355
358
  return new At({
@@ -365,7 +368,7 @@ function Ee(i) {
365
368
  displayName: `Prose<slash>|${i}`
366
369
  }, e;
367
370
  }
368
- var P, st, it, F, lt, rt, ut, Ut;
371
+ var P, st, it, F, lt, rt, ut, Gt;
369
372
  class Ie {
370
373
  constructor(t) {
371
374
  /// @internal
@@ -383,10 +386,13 @@ class Ie {
383
386
  p(this, rt, void 0);
384
387
  c(this, rt, (o, e) => {
385
388
  const { state: n, composing: s } = o, { selection: r, doc: d } = n, { ranges: u } = r, m = Math.min(...u.map((C) => C.$from.pos)), v = Math.max(...u.map((C) => C.$to.pos)), g = e && e.doc.eq(d) && e.selection.eq(r);
386
- if (l(this, P) ?? c(this, P, Tt(o.dom, {
389
+ if (l(this, P) ?? c(this, P, It(o.dom, {
387
390
  trigger: "manual",
388
391
  placement: "bottom-start",
389
392
  interactive: !0,
393
+ delay: 0,
394
+ arrow: !1,
395
+ duration: 0,
390
396
  ...l(this, st),
391
397
  content: this.element
392
398
  })), !(s || g)) {
@@ -395,13 +401,13 @@ class Ie {
395
401
  return;
396
402
  }
397
403
  l(this, P).setProps({
398
- getReferenceClientRect: () => ee(o, m, v)
404
+ getReferenceClientRect: () => ne(o, m, v)
399
405
  }), this.show();
400
406
  }
401
407
  }), this.update = (o, e) => {
402
- It(l(this, rt), l(this, it))(o, e);
408
+ Tt(l(this, rt), l(this, it))(o, e);
403
409
  }, this.getContent = (o, e = (n) => n.type.name === "paragraph") => {
404
- const { selection: n } = o.state, { empty: s, $from: r } = n, d = o.state.selection instanceof Ot, u = this.element.contains(document.activeElement), m = !o.hasFocus() && !u, v = !o.editable, C = !se(e)(o.state.selection);
410
+ const { selection: n } = o.state, { empty: s, $from: r } = n, d = o.state.selection instanceof Ot, u = this.element.contains(document.activeElement), m = !o.hasFocus() && !u, v = !o.editable, C = !ie(e)(o.state.selection);
405
411
  if (!(m || v || !s || !d || C))
406
412
  return r.parent.textBetween(Math.max(0, r.parentOffset - 500), r.parentOffset, void 0, "");
407
413
  }, this.destroy = () => {
@@ -413,17 +419,17 @@ class Ie {
413
419
  }, this.hide = () => {
414
420
  var o;
415
421
  (o = l(this, P)) == null || o.hide();
416
- }, this.getInstance = () => l(this, P), this.element = t.content, c(this, st, t.tippyOptions ?? {}), c(this, it, t.debounce ?? 200), c(this, lt, t.shouldShow ?? Ct(this, ut, Ut)), c(this, F, t.trigger ?? "/");
422
+ }, this.getInstance = () => l(this, P), this.element = t.content, c(this, st, t.tippyOptions ?? {}), c(this, it, t.debounce ?? 200), c(this, lt, t.shouldShow ?? Ct(this, ut, Gt)), c(this, F, t.trigger ?? "/");
417
423
  }
418
424
  }
419
- P = new WeakMap(), st = new WeakMap(), it = new WeakMap(), F = new WeakMap(), lt = new WeakMap(), rt = new WeakMap(), ut = new WeakSet(), Ut = function(t) {
425
+ P = new WeakMap(), st = new WeakMap(), it = new WeakMap(), F = new WeakMap(), lt = new WeakMap(), rt = new WeakMap(), ut = new WeakSet(), Gt = function(t) {
420
426
  const o = this.getContent(t);
421
427
  if (!o)
422
428
  return !1;
423
429
  const e = o.at(-1);
424
430
  return e ? Array.isArray(l(this, F)) ? l(this, F).includes(e) : l(this, F) === e : !1;
425
431
  };
426
- const Te = w`
432
+ const Re = w`
427
433
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
428
434
  <g clip-path="url(#clip0_992_5547)">
429
435
  <path d="M5 5.5C5 6.33 5.67 7 6.5 7H10.5V17.5C10.5 18.33 11.17 19 12 19C12.83 19 13.5 18.33 13.5 17.5V7H17.5C18.33 7 19 6.33 19 5.5C19 4.67 18.33 4 17.5 4H6.5C5.67 4 5 4.67 5 5.5Z" fill="#817567"/>
@@ -434,7 +440,7 @@ const Te = w`
434
440
  </clipPath>
435
441
  </defs>
436
442
  </svg>
437
- `, Re = w`
443
+ `, De = w`
438
444
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
439
445
  <g clip-path="url(#clip0_992_5553)">
440
446
  <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM12 17H14V7H10V9H12V17Z" fill="#817567"/>
@@ -445,7 +451,7 @@ const Te = w`
445
451
  </clipPath>
446
452
  </defs>
447
453
  </svg>
448
- `, De = w`
454
+ `, Ae = w`
449
455
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
450
456
  <g clip-path="url(#clip0_992_5559)">
451
457
  <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15H11V13H13C14.1 13 15 12.11 15 11V9C15 7.89 14.1 7 13 7H9V9H13V11H11C9.9 11 9 11.89 9 13V17H15V15Z" fill="#817567"/>
@@ -456,7 +462,7 @@ const Te = w`
456
462
  </clipPath>
457
463
  </defs>
458
464
  </svg>
459
- `, Ae = w`
465
+ `, Oe = w`
460
466
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
461
467
  <g clip-path="url(#clip0_992_5565)">
462
468
  <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15V13.5C15 12.67 14.33 12 13.5 12C14.33 12 15 11.33 15 10.5V9C15 7.89 14.1 7 13 7H9V9H13V11H11V13H13V15H9V17H13C14.1 17 15 16.11 15 15Z" fill="#817567"/>
@@ -467,7 +473,7 @@ const Te = w`
467
473
  </clipPath>
468
474
  </defs>
469
475
  </svg>
470
- `, Oe = w`
476
+ `, Ne = w`
471
477
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
472
478
  <g clip-path="url(#clip0_977_7757)">
473
479
  <path d="M19.04 3H5.04004C3.94004 3 3.04004 3.9 3.04004 5V19C3.04004 20.1 3.94004 21 5.04004 21H19.04C20.14 21 21.04 20.1 21.04 19V5C21.04 3.9 20.14 3 19.04 3ZM19.04 19H5.04004V5H19.04V19ZM13.04 17H15.04V7H13.04V11H11.04V7H9.04004V13H13.04V17Z" fill="#817567"/>
@@ -478,7 +484,7 @@ const Te = w`
478
484
  </clipPath>
479
485
  </defs>
480
486
  </svg>
481
- `, Ne = w`
487
+ `, ze = w`
482
488
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
483
489
  <g clip-path="url(#clip0_977_7760)">
484
490
  <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15V13C15 11.89 14.1 11 13 11H11V9H15V7H9V13H13V15H9V17H13C14.1 17 15 16.11 15 15Z" fill="#817567"/>
@@ -489,7 +495,7 @@ const Te = w`
489
495
  </clipPath>
490
496
  </defs>
491
497
  </svg>
492
- `, ze = w`
498
+ `, Fe = w`
493
499
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
494
500
  <g clip-path="url(#clip0_977_7763)">
495
501
  <path d="M11 17H13C14.1 17 15 16.11 15 15V13C15 11.89 14.1 11 13 11H11V9H15V7H11C9.9 7 9 7.89 9 9V15C9 16.11 9.9 17 11 17ZM11 13H13V15H11V13ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19Z" fill="#817567"/>
@@ -500,7 +506,7 @@ const Te = w`
500
506
  </clipPath>
501
507
  </defs>
502
508
  </svg>
503
- `, Fe = w`
509
+ `, qe = w`
504
510
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
505
511
  <g clip-path="url(#clip0_977_8070)">
506
512
  <path d="M4 10.5C3.17 10.5 2.5 11.17 2.5 12C2.5 12.83 3.17 13.5 4 13.5C4.83 13.5 5.5 12.83 5.5 12C5.5 11.17 4.83 10.5 4 10.5ZM4 4.5C3.17 4.5 2.5 5.17 2.5 6C2.5 6.83 3.17 7.5 4 7.5C4.83 7.5 5.5 6.83 5.5 6C5.5 5.17 4.83 4.5 4 4.5ZM4 16.5C3.17 16.5 2.5 17.18 2.5 18C2.5 18.82 3.18 19.5 4 19.5C4.82 19.5 5.5 18.82 5.5 18C5.5 17.18 4.83 16.5 4 16.5ZM8 19H20C20.55 19 21 18.55 21 18C21 17.45 20.55 17 20 17H8C7.45 17 7 17.45 7 18C7 18.55 7.45 19 8 19ZM8 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H8C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM7 6C7 6.55 7.45 7 8 7H20C20.55 7 21 6.55 21 6C21 5.45 20.55 5 20 5H8C7.45 5 7 5.45 7 6Z" fill="#817567"/>
@@ -511,7 +517,7 @@ const Te = w`
511
517
  </clipPath>
512
518
  </defs>
513
519
  </svg>
514
- `, qe = w`
520
+ `, Ke = w`
515
521
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
516
522
  <g clip-path="url(#clip0_977_8067)">
517
523
  <path d="M8 7H20C20.55 7 21 6.55 21 6C21 5.45 20.55 5 20 5H8C7.45 5 7 5.45 7 6C7 6.55 7.45 7 8 7ZM20 17H8C7.45 17 7 17.45 7 18C7 18.55 7.45 19 8 19H20C20.55 19 21 18.55 21 18C21 17.45 20.55 17 20 17ZM20 11H8C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11ZM4.5 16H2.5C2.22 16 2 16.22 2 16.5C2 16.78 2.22 17 2.5 17H4V17.5H3.5C3.22 17.5 3 17.72 3 18C3 18.28 3.22 18.5 3.5 18.5H4V19H2.5C2.22 19 2 19.22 2 19.5C2 19.78 2.22 20 2.5 20H4.5C4.78 20 5 19.78 5 19.5V16.5C5 16.22 4.78 16 4.5 16ZM2.5 5H3V7.5C3 7.78 3.22 8 3.5 8C3.78 8 4 7.78 4 7.5V4.5C4 4.22 3.78 4 3.5 4H2.5C2.22 4 2 4.22 2 4.5C2 4.78 2.22 5 2.5 5ZM4.5 10H2.5C2.22 10 2 10.22 2 10.5C2 10.78 2.22 11 2.5 11H3.8L2.12 12.96C2.04 13.05 2 13.17 2 13.28V13.5C2 13.78 2.22 14 2.5 14H4.5C4.78 14 5 13.78 5 13.5C5 13.22 4.78 13 4.5 13H3.2L4.88 11.04C4.96 10.95 5 10.83 5 10.72V10.5C5 10.22 4.78 10 4.5 10Z" fill="#817567"/>
@@ -522,7 +528,7 @@ const Te = w`
522
528
  </clipPath>
523
529
  </defs>
524
530
  </svg>
525
- `, Ke = w`
531
+ `, We = w`
526
532
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
527
533
  <g clip-path="url(#clip0_977_7897)">
528
534
  <path d="M7.17 17C7.68 17 8.15 16.71 8.37 16.26L9.79 13.42C9.93 13.14 10 12.84 10 12.53V8C10 7.45 9.55 7 9 7H5C4.45 7 4 7.45 4 8V12C4 12.55 4.45 13 5 13H7L5.97 15.06C5.52 15.95 6.17 17 7.17 17ZM17.17 17C17.68 17 18.15 16.71 18.37 16.26L19.79 13.42C19.93 13.14 20 12.84 20 12.53V8C20 7.45 19.55 7 19 7H15C14.45 7 14 7.45 14 8V12C14 12.55 14.45 13 15 13H17L15.97 15.06C15.52 15.95 16.17 17 17.17 17Z" fill="#817567"/>
@@ -533,7 +539,7 @@ const Te = w`
533
539
  </clipPath>
534
540
  </defs>
535
541
  </svg>
536
- `, We = w`
542
+ `, je = w`
537
543
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
538
544
  <g clip-path="url(#clip0_977_7900)">
539
545
  <path fill-rule="evenodd" clip-rule="evenodd" d="M19 13H5C4.45 13 4 12.55 4 12C4 11.45 4.45 11 5 11H19C19.55 11 20 11.45 20 12C20 12.55 19.55 13 19 13Z" fill="#817567"/>
@@ -544,7 +550,7 @@ const Te = w`
544
550
  </clipPath>
545
551
  </defs>
546
552
  </svg>
547
- `, je = w`
553
+ `, Ue = w`
548
554
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
549
555
  <g clip-path="url(#clip0_977_8075)">
550
556
  <path d="M19 5V19H5V5H19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM14.14 11.86L11.14 15.73L9 13.14L6 17H18L14.14 11.86Z" fill="#817567"/>
@@ -555,7 +561,7 @@ const Te = w`
555
561
  </clipPath>
556
562
  </defs>
557
563
  </svg>
558
- `, Ue = w`
564
+ `, Ge = w`
559
565
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
560
566
  <g clip-path="url(#clip0_977_8081)">
561
567
  <path d="M9.4 16.6L4.8 12L9.4 7.4L8 6L2 12L8 18L9.4 16.6ZM14.6 16.6L19.2 12L14.6 7.4L16 6L22 12L16 18L14.6 16.6Z" fill="#817567"/>
@@ -571,22 +577,22 @@ function _t(i) {
571
577
  const { $from: t, $to: o } = i.selection, { pos: e } = t, { pos: n } = o;
572
578
  return i = i.deleteRange(e - t.node().content.size, n), i;
573
579
  }
574
- function Ge(i, t, o = null) {
580
+ function Je(i, t, o = null) {
575
581
  const { from: e, to: n } = i.selection;
576
582
  return i.setBlockType(e, n, t, o);
577
583
  }
578
- function Je(i, t, o = null) {
579
- const { $from: e, $to: n } = i.selection, s = e.blockRange(n), r = s && de(s, t, o);
584
+ function Qe(i, t, o = null) {
585
+ const { $from: e, $to: n } = i.selection, s = e.blockRange(n), r = s && he(s, t, o);
580
586
  return r ? i.wrap(s, r) : null;
581
587
  }
582
- function Qe(i, t, o = null) {
588
+ function Xe(i, t, o = null) {
583
589
  const e = t.createAndFill(o);
584
590
  return e ? i.replaceSelectionWith(e) : null;
585
591
  }
586
- function T(i, t = null) {
592
+ function I(i, t = null) {
587
593
  return (o, e) => {
588
594
  if (e) {
589
- const n = Ge(_t(o.tr), i, t);
595
+ const n = Je(_t(o.tr), i, t);
590
596
  e(n.scrollIntoView());
591
597
  }
592
598
  return !0;
@@ -594,17 +600,17 @@ function T(i, t = null) {
594
600
  }
595
601
  function vt(i, t = null) {
596
602
  return (o, e) => {
597
- const n = Je(_t(o.tr), i, t);
603
+ const n = Qe(_t(o.tr), i, t);
598
604
  return n ? (e && e(n.scrollIntoView()), !0) : !1;
599
605
  };
600
606
  }
601
607
  function kt(i, t = null) {
602
608
  return (o, e) => {
603
- const n = Qe(_t(o.tr), i, t);
609
+ const n = Xe(_t(o.tr), i, t);
604
610
  return n ? (e && e(n.scrollIntoView()), !0) : !1;
605
611
  };
606
612
  }
607
- function Xe(i) {
613
+ function Ye(i) {
608
614
  let t = [
609
615
  {
610
616
  key: "text",
@@ -613,82 +619,82 @@ function Xe(i) {
613
619
  {
614
620
  key: "text",
615
621
  label: "Text",
616
- icon: Te,
622
+ icon: Re,
617
623
  onRun: (e) => {
618
624
  const n = e.get(y), { dispatch: s, state: r } = n;
619
- T(Nt.type(e))(r, s);
625
+ I(Nt.type(e))(r, s);
620
626
  }
621
627
  },
622
628
  {
623
629
  key: "h1",
624
630
  label: "Heading 1",
625
- icon: Re,
631
+ icon: De,
626
632
  onRun: (e) => {
627
633
  const n = e.get(y), { dispatch: s, state: r } = n;
628
- T(K.type(e), { level: 1 })(r, s);
634
+ I(K.type(e), { level: 1 })(r, s);
629
635
  }
630
636
  },
631
637
  {
632
638
  key: "h2",
633
639
  label: "Heading 2",
634
- icon: De,
640
+ icon: Ae,
635
641
  onRun: (e) => {
636
642
  const n = e.get(y), { dispatch: s, state: r } = n;
637
- T(K.type(e), { level: 2 })(r, s);
643
+ I(K.type(e), { level: 2 })(r, s);
638
644
  }
639
645
  },
640
646
  {
641
647
  key: "h3",
642
648
  label: "Heading 3",
643
- icon: Ae,
649
+ icon: Oe,
644
650
  onRun: (e) => {
645
651
  const n = e.get(y), { dispatch: s, state: r } = n;
646
- T(K.type(e), { level: 3 })(r, s);
652
+ I(K.type(e), { level: 3 })(r, s);
647
653
  }
648
654
  },
649
655
  {
650
656
  key: "h4",
651
657
  label: "Heading 4",
652
- icon: Oe,
658
+ icon: Ne,
653
659
  onRun: (e) => {
654
660
  const n = e.get(y), { dispatch: s, state: r } = n;
655
- T(K.type(e), { level: 4 })(r, s);
661
+ I(K.type(e), { level: 4 })(r, s);
656
662
  }
657
663
  },
658
664
  {
659
665
  key: "h5",
660
666
  label: "Heading 5",
661
- icon: Ne,
667
+ icon: ze,
662
668
  onRun: (e) => {
663
669
  const n = e.get(y), { dispatch: s, state: r } = n;
664
- T(K.type(e), { level: 5 })(r, s);
670
+ I(K.type(e), { level: 5 })(r, s);
665
671
  }
666
672
  },
667
673
  {
668
674
  key: "h6",
669
675
  label: "Heading 6",
670
- icon: ze,
676
+ icon: Fe,
671
677
  onRun: (e) => {
672
678
  const n = e.get(y), { dispatch: s, state: r } = n;
673
- T(K.type(e), { level: 6 })(r, s);
679
+ I(K.type(e), { level: 6 })(r, s);
674
680
  }
675
681
  },
676
682
  {
677
683
  key: "quote",
678
684
  label: "Quote",
679
- icon: Ke,
685
+ icon: We,
680
686
  onRun: (e) => {
681
687
  const n = e.get(y), { dispatch: s, state: r } = n;
682
- vt(ie.type(e))(r, s);
688
+ vt(le.type(e))(r, s);
683
689
  }
684
690
  },
685
691
  {
686
692
  key: "divider",
687
693
  label: "Divider",
688
- icon: We,
694
+ icon: je,
689
695
  onRun: (e) => {
690
696
  const n = e.get(y), { dispatch: s, state: r } = n;
691
- kt(le.type(e))(r, s);
697
+ kt(re.type(e))(r, s);
692
698
  }
693
699
  }
694
700
  ]
@@ -700,19 +706,19 @@ function Xe(i) {
700
706
  {
701
707
  key: "bullet-list",
702
708
  label: "Bullet List",
703
- icon: Fe,
709
+ icon: qe,
704
710
  onRun: (e) => {
705
711
  const n = e.get(y), { dispatch: s, state: r } = n;
706
- vt(re.type(e))(r, s);
712
+ vt(ce.type(e))(r, s);
707
713
  }
708
714
  },
709
715
  {
710
716
  key: "ordered-list",
711
717
  label: "Ordered List",
712
- icon: qe,
718
+ icon: Ke,
713
719
  onRun: (e) => {
714
720
  const n = e.get(y), { dispatch: s, state: r } = n;
715
- vt(ce.type(e))(r, s);
721
+ vt(ae.type(e))(r, s);
716
722
  }
717
723
  }
718
724
  ]
@@ -724,19 +730,19 @@ function Xe(i) {
724
730
  {
725
731
  key: "image",
726
732
  label: "Image",
727
- icon: je,
733
+ icon: Ue,
728
734
  onRun: (e) => {
729
735
  const n = e.get(y), { dispatch: s, state: r } = n;
730
- kt(we.type(e))(r, s);
736
+ kt(Ce.type(e))(r, s);
731
737
  }
732
738
  },
733
739
  {
734
740
  key: "code",
735
741
  label: "Code",
736
- icon: Ue,
742
+ icon: Ge,
737
743
  onRun: (e) => {
738
744
  const n = e.get(y), { dispatch: s, state: r } = n;
739
- kt(ae.type(e))(r, s);
745
+ kt(de.type(e))(r, s);
740
746
  }
741
747
  }
742
748
  ]
@@ -764,13 +770,13 @@ function Xe(i) {
764
770
  size: o.length
765
771
  };
766
772
  }
767
- const Gt = ({
773
+ const Jt = ({
768
774
  show: i,
769
775
  hide: t,
770
776
  ctx: o,
771
777
  filter: e
772
778
  }) => {
773
- const { groups: n, size: s } = ge(() => Xe(e), [e]), r = me(), [d, u] = fe(0), m = Ft({ x: -999, y: -999 }), v = W((h) => {
779
+ const { groups: n, size: s } = fe(() => Ye(e), [e]), r = ge(), [d, u] = we(0), m = qt({ x: -999, y: -999 }), v = W((h) => {
774
780
  const a = m.current;
775
781
  if (!a)
776
782
  return;
@@ -805,7 +811,7 @@ const Gt = ({
805
811
  return h.preventDefault(), g((a) => a <= 0 ? a : a - 1, C);
806
812
  if (h.key === "ArrowLeft")
807
813
  return h.preventDefault(), g((a) => {
808
- const f = n.find((I) => I.range[0] <= a && I.range[1] > a);
814
+ const f = n.find((T) => T.range[0] <= a && T.range[1] > a);
809
815
  if (!f)
810
816
  return a;
811
817
  const H = n[n.indexOf(f) - 1];
@@ -813,19 +819,19 @@ const Gt = ({
813
819
  }, C);
814
820
  if (h.key === "ArrowRight")
815
821
  return h.preventDefault(), g((a) => {
816
- const f = n.find((I) => I.range[0] <= a && I.range[1] > a);
822
+ const f = n.find((T) => T.range[0] <= a && T.range[1] > a);
817
823
  if (!f)
818
824
  return a;
819
825
  const H = n[n.indexOf(f) + 1];
820
826
  return H ? H.range[0] : a;
821
827
  }, C);
822
828
  h.key === "Enter" && (h.preventDefault(), k(d));
823
- }, [t, n, d]), te = W((h) => (a) => {
829
+ }, [t, n, d]), ee = W((h) => (a) => {
824
830
  const f = m.current;
825
831
  if (!f)
826
832
  return;
827
- const { x: H, y: I } = a;
828
- H === f.x && I === f.y || g(h);
833
+ const { x: H, y: T } = a;
834
+ H === f.x && T === f.y || g(h);
829
835
  }, []);
830
836
  return yt(() => (i ? document.addEventListener("keydown", b, { capture: !0 }) : document.removeEventListener("keydown", b, { capture: !0 }), () => {
831
837
  document.removeEventListener("keydown", b, { capture: !0 });
@@ -852,7 +858,7 @@ const Gt = ({
852
858
  key=${a.key}
853
859
  data-index=${a.index}
854
860
  class=${d === a.index ? "hover" : ""}
855
- onmouseenter=${te(a.index)}
861
+ onmouseenter=${ee(a.index)}
856
862
  onmousedown=${() => {
857
863
  var f;
858
864
  (f = r.current.querySelector(`[data-index="${a.index}"]`)) == null || f.classList.add("active");
@@ -873,47 +879,45 @@ const Gt = ({
873
879
  </host>
874
880
  `;
875
881
  };
876
- Gt.props = {
882
+ Jt.props = {
877
883
  ctx: Object,
878
884
  show: Boolean,
879
885
  filter: String,
880
886
  hide: Function
881
887
  };
882
- const Jt = zt(Gt), Qt = Ee("CREPE_MENU"), Pt = at({
888
+ const Qt = Ft(Jt), Xt = Te("CREPE_MENU"), Pt = at({
883
889
  show: () => {
884
890
  },
885
891
  hide: () => {
886
892
  }
887
893
  }, "menuAPICtx");
888
- customElements.define("milkdown-slash-menu", Jt);
889
- function Ye(i) {
890
- i.set(Qt.key, {
891
- view: (t) => new tn(i, t)
894
+ customElements.define("milkdown-slash-menu", Qt);
895
+ function tn(i) {
896
+ i.set(Xt.key, {
897
+ view: (t) => new en(i, t)
892
898
  });
893
899
  }
894
- var M, B, L;
895
- class tn {
900
+ var M, S, B;
901
+ class en {
896
902
  constructor(t, o) {
897
903
  p(this, M, void 0);
904
+ p(this, S, void 0);
898
905
  p(this, B, void 0);
899
- p(this, L, void 0);
900
- c(this, L, null), this.update = (n) => {
901
- l(this, B).update(n);
906
+ c(this, B, null), this.update = (n) => {
907
+ l(this, S).update(n);
902
908
  }, this.show = (n) => {
903
- c(this, L, n), l(this, M).filter = "", l(this, B).show();
909
+ c(this, B, n), l(this, M).filter = "", l(this, S).show();
904
910
  }, this.hide = () => {
905
- c(this, L, null), l(this, B).hide();
911
+ c(this, B, null), l(this, S).hide();
906
912
  }, this.destroy = () => {
907
- l(this, B).destroy(), l(this, M).remove();
908
- }, c(this, M, new Jt()), l(this, M).hide = this.hide, l(this, M).ctx = t;
913
+ l(this, S).destroy(), l(this, M).remove();
914
+ }, c(this, M, new Qt()), l(this, M).hide = this.hide, l(this, M).ctx = t;
909
915
  const e = this;
910
- c(this, B, new Ie({
916
+ c(this, S, new Ie({
911
917
  content: l(this, M),
912
918
  debounce: 20,
913
919
  tippyOptions: {
914
- arrow: !1,
915
- delay: 0,
916
- duration: 0,
920
+ appendTo: () => t.get(zt),
917
921
  onShow: () => {
918
922
  l(this, M).show = !0;
919
923
  },
@@ -922,13 +926,13 @@ class tn {
922
926
  }
923
927
  },
924
928
  shouldShow(n) {
925
- if (pe(n.state.selection) || ue(n.state.selection))
929
+ if (ue(n.state.selection) || me(n.state.selection))
926
930
  return !1;
927
931
  const s = this.getContent(n, (d) => ["paragraph", "heading"].includes(d.type.name));
928
932
  if (s == null)
929
933
  return !1;
930
- const r = l(e, L);
931
- return l(e, M).filter = s.startsWith("/") ? s.slice(1) : s, typeof r == "number" ? n.state.doc.resolve(r).node() !== n.state.doc.resolve(n.state.selection.from).node() ? (c(e, L, null), !1) : !0 : !!s.startsWith("/");
934
+ const r = l(e, B);
935
+ return l(e, M).filter = s.startsWith("/") ? s.slice(1) : s, typeof r == "number" ? n.state.doc.resolve(r).node() !== n.state.doc.resolve(n.state.selection.from).node() ? (c(e, B, null), !1) : !0 : !!s.startsWith("/");
932
936
  }
933
937
  })), this.update(o), t.set(Pt.key, {
934
938
  show: (n) => this.show(n),
@@ -936,8 +940,8 @@ class tn {
936
940
  });
937
941
  }
938
942
  }
939
- M = new WeakMap(), B = new WeakMap(), L = new WeakMap();
940
- const en = w`
943
+ M = new WeakMap(), S = new WeakMap(), B = new WeakMap();
944
+ const nn = w`
941
945
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
942
946
  <g clip-path="url(#clip0_971_7680)">
943
947
  <path d="M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z" fill="#817567"/>
@@ -948,7 +952,7 @@ const en = w`
948
952
  </clipPath>
949
953
  </defs>
950
954
  </svg>
951
- `, nn = w`
955
+ `, on = w`
952
956
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
953
957
  <g clip-path="url(#clip0_971_7676)">
954
958
  <path d="M18 13H13V18C13 18.55 12.55 19 12 19C11.45 19 11 18.55 11 18V13H6C5.45 13 5 12.55 5 12C5 11.45 5.45 11 6 11H11V6C11 5.45 11.45 5 12 5C12.55 5 13 5.45 13 6V11H18C18.55 11 19 11.45 19 12C19 12.55 18.55 13 18 13Z" fill="#817567"/>
@@ -959,8 +963,8 @@ const en = w`
959
963
  </clipPath>
960
964
  </defs>
961
965
  </svg>
962
- `, Xt = ({ onAdd: i }) => {
963
- const t = Ft();
966
+ `, Yt = ({ onAdd: i }) => {
967
+ const t = qt();
964
968
  return yt(() => {
965
969
  var n;
966
970
  (n = t.current) == null || n.classList.remove("active");
@@ -973,21 +977,21 @@ const en = w`
973
977
  var s;
974
978
  n.preventDefault(), n.stopPropagation(), i == null || i(), (s = t.current) == null || s.classList.remove("active");
975
979
  }} class="operation-item">
976
- ${nn}
980
+ ${on}
977
981
  </div>
978
982
  <div class="operation-item">
979
- ${en}
983
+ ${nn}
980
984
  </div>
981
985
  </host>
982
986
  `;
983
987
  };
984
- Xt.props = {
988
+ Yt.props = {
985
989
  show: Boolean,
986
990
  onAdd: Function
987
991
  };
988
- const Yt = zt(Xt);
992
+ const te = Ft(Yt);
989
993
  var $, Z, ct;
990
- class on {
994
+ class sn {
991
995
  constructor(t, o) {
992
996
  p(this, $, void 0);
993
997
  p(this, Z, void 0);
@@ -1006,14 +1010,12 @@ class on {
1006
1010
  let b = r.tr.insert(C, Nt.type(n).create());
1007
1011
  b = b.setSelection(Ot.create(b.doc, C + k)), d(b.scrollIntoView()), l(this, Z).hide(), n.get(Pt.key).show(b.selection.from);
1008
1012
  }, c(this, ct, t);
1009
- const e = new Yt();
1010
- c(this, $, e), l(this, $).onAdd = this.onAdd, c(this, Z, new Ze({
1013
+ const e = new te();
1014
+ c(this, $, e), l(this, $).onAdd = this.onAdd, c(this, Z, new Ee({
1011
1015
  ctx: t,
1012
1016
  content: e,
1013
1017
  tippyOptions: {
1014
- arrow: !1,
1015
- delay: 0,
1016
- duration: 0,
1018
+ appendTo: () => t.get(zt),
1017
1019
  onShow: () => {
1018
1020
  l(this, $).show = !0;
1019
1021
  },
@@ -1025,15 +1027,15 @@ class on {
1025
1027
  }
1026
1028
  }
1027
1029
  $ = new WeakMap(), Z = new WeakMap(), ct = new WeakMap();
1028
- customElements.define("milkdown-block-handle", Yt);
1029
- function sn(i) {
1030
+ customElements.define("milkdown-block-handle", te);
1031
+ function ln(i) {
1030
1032
  i.set(ft.key, {
1031
- view: (t) => new on(i, t)
1033
+ view: (t) => new sn(i, t)
1032
1034
  });
1033
1035
  }
1034
- const ln = '.milkdown milkdown-block-handle{cursor:pointer;display:flex;justify-content:center;align-items:center;gap:2px;padding-right:4px}.milkdown milkdown-block-handle .operation-item{border-radius:4px;width:32px;height:32px;padding:4px}.milkdown milkdown-block-handle .operation-item svg{width:24px;height:24px}.milkdown milkdown-block-handle .operation-item:hover{background:var(--crepe-color-hover)}.milkdown milkdown-block-handle .operation-item.active{background:var(--crepe-color-selected)}.milkdown milkdown-slash-menu{display:block;width:254px;font-family:var(--crepe-font-default);color:var(--crepe-color-on-surface);background:var(--crepe-color-surface);border-radius:12px;box-shadow:var(--crepe-shadow-1)}.milkdown milkdown-slash-menu ul{list-style-type:none}.milkdown milkdown-slash-menu ul li{cursor:pointer;border-radius:8px}.milkdown milkdown-slash-menu .tab-group{border-bottom:1px solid color-mix(in srgb,var(--crepe-color-outline),transparent 80%);padding:12px 12px 0}.milkdown milkdown-slash-menu .tab-group ul{padding:8px 10px;display:flex;gap:10px;flex-wrap:nowrap}.milkdown milkdown-slash-menu .tab-group ul li{padding:6px 10px;font-size:14px;font-style:normal;font-weight:600;line-height:20px}.milkdown milkdown-slash-menu .tab-group ul li:hover{background:var(--crepe-color-hover)}.milkdown milkdown-slash-menu .tab-group ul li.selected{background:var(--crepe-color-selected)}.milkdown milkdown-slash-menu .menu-groups{padding:0 12px 12px;max-height:420px;overflow:auto}.milkdown milkdown-slash-menu .menu-groups .menu-group h6{font-size:14px;font-style:normal;font-weight:600;line-height:20px;padding:14px 10px;text-transform:uppercase;color:color-mix(in srgb,var(--crepe-color-on-surface),transparent 40%)}.milkdown milkdown-slash-menu .menu-groups .menu-group li{display:flex;justify-content:flex-start;align-items:center;gap:16px;padding:14px 10px}.milkdown milkdown-slash-menu .menu-groups .menu-group li.hover{background:var(--crepe-color-hover)}.milkdown milkdown-slash-menu .menu-groups .menu-group li.active{background:var(--crepe-color-selected)}.milkdown milkdown-slash-menu .menu-groups .menu-group li>svg{width:24px;height:24px;color:var(--crepe-color-outline)}.milkdown milkdown-slash-menu .menu-groups .menu-group li>span{font-size:14px;font-style:normal;font-weight:600;line-height:20px}.milkdown milkdown-slash-menu .menu-groups .menu-group+.menu-group:before{content:"";display:block;height:1px;background:color-mix(in srgb,var(--crepe-color-outline),transparent 80%);margin:0 10px}', mn = (i) => {
1035
- i.config(he(ln)).config(sn).config(Ye).use(Pt).use(ft).use(Qt);
1036
+ const rn = '.milkdown milkdown-block-handle{cursor:pointer;display:flex;justify-content:center;align-items:center;gap:2px;padding-right:4px}.milkdown milkdown-block-handle .operation-item{border-radius:4px;width:32px;height:32px;padding:4px}.milkdown milkdown-block-handle .operation-item svg{width:24px;height:24px}.milkdown milkdown-block-handle .operation-item:hover{background:var(--crepe-color-hover)}.milkdown milkdown-block-handle .operation-item.active{background:var(--crepe-color-selected)}.milkdown milkdown-slash-menu{display:block;width:254px;font-family:var(--crepe-font-default);color:var(--crepe-color-on-surface);background:var(--crepe-color-surface);border-radius:12px;box-shadow:var(--crepe-shadow-1)}.milkdown milkdown-slash-menu ul{list-style-type:none}.milkdown milkdown-slash-menu ul li{cursor:pointer;border-radius:8px}.milkdown milkdown-slash-menu .tab-group{border-bottom:1px solid color-mix(in srgb,var(--crepe-color-outline),transparent 80%);padding:12px 12px 0}.milkdown milkdown-slash-menu .tab-group ul{padding:8px 10px;display:flex;gap:10px;flex-wrap:nowrap}.milkdown milkdown-slash-menu .tab-group ul li{padding:6px 10px;font-size:14px;font-style:normal;font-weight:600;line-height:20px}.milkdown milkdown-slash-menu .tab-group ul li:hover{background:var(--crepe-color-hover)}.milkdown milkdown-slash-menu .tab-group ul li.selected{background:var(--crepe-color-selected)}.milkdown milkdown-slash-menu .menu-groups{padding:0 12px 12px;max-height:420px;overflow:auto}.milkdown milkdown-slash-menu .menu-groups .menu-group h6{font-size:14px;font-style:normal;font-weight:600;line-height:20px;padding:14px 10px;text-transform:uppercase;color:color-mix(in srgb,var(--crepe-color-on-surface),transparent 40%)}.milkdown milkdown-slash-menu .menu-groups .menu-group li{display:flex;justify-content:flex-start;align-items:center;gap:16px;padding:14px 10px}.milkdown milkdown-slash-menu .menu-groups .menu-group li.hover{background:var(--crepe-color-hover)}.milkdown milkdown-slash-menu .menu-groups .menu-group li.active{background:var(--crepe-color-selected)}.milkdown milkdown-slash-menu .menu-groups .menu-group li>svg{width:24px;height:24px;color:var(--crepe-color-outline)}.milkdown milkdown-slash-menu .menu-groups .menu-group li>span{font-size:14px;font-style:normal;font-weight:600;line-height:20px}.milkdown milkdown-slash-menu .menu-groups .menu-group+.menu-group:before{content:"";display:block;height:1px;background:color-mix(in srgb,var(--crepe-color-outline),transparent 80%);margin:0 10px}', gn = (i) => {
1037
+ i.config(pe(rn)).config(ln).config(tn).use(Pt).use(ft).use(Xt);
1036
1038
  };
1037
1039
  export {
1038
- mn as defineFeature
1040
+ gn as defineFeature
1039
1041
  };