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

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 +12 -6
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -43120,8 +43120,10 @@ const ofe = ({
43120
43120
  G !== z && (z = G, Z.setIsCommentActive(G)), J !== te && (te = J, Z.setIsCommentResolved(J)), T && !Y && !T.resolved && Z.activeCommentId !== T.id && (Z.setActiveCommentId(T.id), Z.openFloatingThread(T.id));
43121
43121
  };
43122
43122
  let ee = null;
43123
- const K = () => {
43124
- ee || (ee = setTimeout(() => {
43123
+ const K = ({
43124
+ transaction: Z
43125
+ }) => {
43126
+ Z.getMeta("commentRecheck") && ie(), !ee && (ee = setTimeout(() => {
43125
43127
  ee = null, S.getState().pruneFloatingItems();
43126
43128
  }, 200));
43127
43129
  };
@@ -181792,7 +181794,7 @@ const wHe = ({
181792
181794
  c == null || c(!0);
181793
181795
  return;
181794
181796
  }
181795
- a(e.commentId, g), m(""), i(e.itemId);
181797
+ a(e.commentId, g), m("");
181796
181798
  }
181797
181799
  }, D = () => {
181798
181800
  e.commentId && y(!0);
@@ -182118,7 +182120,12 @@ const wHe = ({
182118
182120
  }, [M, A]), wh(
182119
182121
  C,
182120
182122
  () => {
182121
- !l || !M || i(M);
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
+ }));
182122
182129
  },
182123
182130
  "mousedown",
182124
182131
  { capture: !0 }
@@ -182174,7 +182181,6 @@ const wHe = ({
182174
182181
  L = new MutationObserver(te), L.observe(ee, {
182175
182182
  subtree: !0,
182176
182183
  childList: !0,
182177
- characterData: !0,
182178
182184
  attributes: !0,
182179
182185
  attributeOldValue: !0,
182180
182186
  attributeFilter: ["data-comment-id", "data-draft-comment-id"]
@@ -182183,7 +182189,7 @@ const wHe = ({
182183
182189
  return ie(), () => {
182184
182190
  z !== null && window.cancelAnimationFrame(z), L == null || L.disconnect();
182185
182191
  };
182186
- }, [e, l, E.length, U]), Ae(() => () => {
182192
+ }, [e, l, U]), Ae(() => () => {
182187
182193
  m.current !== null && (window.cancelAnimationFrame(m.current), m.current = null);
182188
182194
  }, []), !l || !E.length ? null : /* @__PURE__ */ v.jsx(
182189
182195
  "div",
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-18",
5
+ "version": "3.0.96-zustand-19",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {