@fileverse-dev/ddoc 2.1.3-patch-20 → 2.1.3-patch-22

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 +9 -14
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -95885,13 +95885,13 @@ const Nee = async (t, e) => {
95885
95885
  }), Re = (Ee) => {
95886
95886
  if (!e) return;
95887
95887
  const { state: _e } = e, { from: Ke, to: zt } = _e.selection, on = _e.doc.textBetween(Ke, zt, " "), un = ve(on, Ee);
95888
- return c == null || c(un), e == null || e.commands.setComment(un.id || ""), o(un.id || ""), setTimeout(l), un.id;
95888
+ return e == null || e.commands.setComment(un.id || ""), o(un.id || ""), setTimeout(l), c == null || c(un), un.id;
95889
95889
  }, Pe = (Ee) => {
95890
- d == null || d(Ee), e.commands.resolveComment(Ee);
95890
+ e.commands.resolveComment(Ee), d == null || d(Ee);
95891
95891
  }, Ae = (Ee) => {
95892
- h == null || h(Ee), e.commands.unresolveComment(Ee);
95892
+ e.commands.unresolveComment(Ee), h == null || h(Ee);
95893
95893
  }, Le = (Ee) => {
95894
- p == null || p(Ee), e.commands.unsetComment(Ee);
95894
+ e.commands.unsetComment(Ee), p == null || p(Ee);
95895
95895
  }, Te = (Ee, _e, Ke) => {
95896
95896
  if (!_e.trim()) return;
95897
95897
  const zt = {
@@ -95953,16 +95953,11 @@ const Nee = async (t, e) => {
95953
95953
  replies: [],
95954
95954
  createdAt: /* @__PURE__ */ new Date()
95955
95955
  };
95956
- c == null || c(Ee), o(Ee.id), H(""), x == null || x(), setTimeout(() => {
95957
- if (q.current) {
95958
- const _e = q.current.querySelector(
95959
- `[data-comment-id="${Ee.id}"]`
95960
- );
95961
- _e && _e.scrollIntoView({
95962
- behavior: "smooth",
95963
- block: "center"
95964
- });
95965
- }
95956
+ c == null || c(Ee), o(Ee.id), H(""), x == null || x(), requestAnimationFrame(() => {
95957
+ q.current && q.current.scrollTo({
95958
+ top: 0,
95959
+ behavior: "smooth"
95960
+ });
95966
95961
  });
95967
95962
  }, G = (Ee) => {
95968
95963
  Ee.key === "Enter" && !Ee.shiftKey && (Ee.preventDefault(), C());
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "2.1.3-patch-20",
5
+ "version": "2.1.3-patch-22",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {