@fileverse-dev/ddoc 3.0.96-zustand-19 → 3.0.96-zustand-21

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/dist/index.es.js +6 -11
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -42710,10 +42710,10 @@ const rfe = () => k0e((e, t) => ({
42710
42710
  })));
42711
42711
  },
42712
42712
  blurFloatingItem: (n) => {
42713
- const { editor: r, setActiveCommentId: o } = Pn(t), { activeCommentId: i, floatingItems: s } = t(), a = s.find((l) => l.itemId === n);
42714
- !r || !a || (a.type === "thread" && i === a.commentId && (o(null), r.commands.unsetCommentActive()), e((l) => ({
42715
- floatingItems: l.floatingItems.map((u) => ({
42716
- ...u,
42713
+ const { editor: r } = Pn(t), { activeCommentId: o, floatingItems: i } = t(), s = i.find((a) => a.itemId === n);
42714
+ !r || !s || (s.type === "thread" && o === s.commentId && (t().setActiveCommentId(null), r.commands.unsetCommentActive()), e((a) => ({
42715
+ floatingItems: a.floatingItems.map((l) => ({
42716
+ ...l,
42717
42717
  isFocused: !1
42718
42718
  }))
42719
42719
  })));
@@ -43123,7 +43123,7 @@ const ofe = ({
43123
43123
  const K = ({
43124
43124
  transaction: Z
43125
43125
  }) => {
43126
- Z.getMeta("commentRecheck") && ie(), !ee && (ee = setTimeout(() => {
43126
+ Z.selectionSet && ie(), !ee && (ee = setTimeout(() => {
43127
43127
  ee = null, S.getState().pruneFloatingItems();
43128
43128
  }, 200));
43129
43129
  };
@@ -182120,12 +182120,7 @@ const wHe = ({
182120
182120
  }, [M, A]), wh(
182121
182121
  C,
182122
182122
  () => {
182123
- !l || !M || (i(M), requestAnimationFrame(() => {
182124
- if (e != null && e.view && !e.isDestroyed) {
182125
- const L = e.state.tr;
182126
- L.setMeta("commentRecheck", !0), e.view.dispatch(L);
182127
- }
182128
- }));
182123
+ !l || !M || i(M);
182129
182124
  },
182130
182125
  "mousedown",
182131
182126
  { capture: !0 }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "3.0.96-zustand-19",
5
+ "version": "3.0.96-zustand-21",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {