@fileverse-dev/ddoc 3.0.34-patch-1 → 3.0.34

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.
@@ -1,4 +1,4 @@
1
- import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-DCoc3Unq.mjs";
1
+ import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-ByOEaqj9.mjs";
2
2
  class S extends p {
3
3
  constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
4
4
  var o;
@@ -93963,7 +93963,7 @@ async function SF(e, t) {
93963
93963
  });
93964
93964
  return te === "0x" ? { data: void 0 } : { data: te };
93965
93965
  } catch (R) {
93966
- const B = IKt(R), { offchainLookup: H, offchainLookupSignature: $ } = await import("./ccip-Cv1AWocO.mjs");
93966
+ const B = IKt(R), { offchainLookup: H, offchainLookupSignature: $ } = await import("./ccip-9Gyiz2Ta.mjs");
93967
93967
  if (e.ccipRead !== !1 && (B == null ? void 0 : B.slice(0, 10)) === $ && x)
93968
93968
  return { data: await H(e, { data: B, to: x }) };
93969
93969
  throw I && (B == null ? void 0 : B.slice(0, 10)) === "0x101bb98d" ? new pZt({ factory: f }) : Sge(R, {
@@ -99411,7 +99411,7 @@ const Mme = Gn(void 0), nQt = ({
99411
99411
  Ae,
99412
99412
  ze || o
99413
99413
  );
99414
- return t == null || t.commands.setComment(pt.id || ""), s(pt.id || ""), setTimeout(l, 0), u == null || u(pt), $e !== Ze ? t.chain().focus().setTextSelection({ from: $e, to: Ze }).run() : t.chain().focus().run(), pt.id;
99414
+ return t == null || t.commands.setComment(pt.id || ""), s(pt.id || ""), setTimeout(l, 0), u == null || u(pt), pt.id;
99415
99415
  },
99416
99416
  [
99417
99417
  t,
@@ -109319,7 +109319,7 @@ const $E = (e) => {
109319
109319
  };
109320
109320
  l.trim() && e && (S == null || S(e, ue), u(""));
109321
109321
  }, ce = (ue) => {
109322
- ue.key === "Enter" && !ue.shiftKey && (ue.preventDefault(), f ? ae() : re());
109322
+ ue.key === "Enter" && !ue.shiftKey && (ue.preventDefault(), !f && n ? ae() : re());
109323
109323
  }, P = () => {
109324
109324
  d((ue) => !ue);
109325
109325
  }, J = () => {
@@ -263989,29 +263989,19 @@ const $Pn = ({
263989
263989
  He(() => {
263990
263990
  s.current = o || !1;
263991
263991
  }, [o]);
263992
- const l = (d) => {
263993
- const f = d.relatedTarget;
263994
- f && d.currentTarget.contains(f) || e.commands.unsetCommentActive();
263995
- }, u = i == null ? void 0 : i.find(
263996
- (d) => d.id === t
263997
- ), c = Lt(
263992
+ const l = i == null ? void 0 : i.find(
263993
+ (c) => c.id === t
263994
+ ), u = Lt(
263998
263995
  () => ({
263999
- shouldShow: ({
264000
- editor: d,
264001
- view: f,
264002
- element: h
264003
- }) => {
264004
- var v, x;
264005
- const p = (v = d.getAttributes("comment")) == null ? void 0 : v.resolved, g = s.current, m = h.contains(document.activeElement);
264006
- if (!(f.hasFocus() || m))
264007
- return !1;
264008
- const b = (d.isActive("comment") && !p && r && !g) ?? !1;
264009
- if (b) {
264010
- const k = (x = d.getAttributes("comment")) == null ? void 0 : x.commentId;
264011
- d.commands.setCommentActive(k);
263996
+ shouldShow: ({ editor: c }) => {
263997
+ var p, g;
263998
+ const d = (p = c.getAttributes("comment")) == null ? void 0 : p.resolved, f = s.current, h = (c.isActive("comment") && !d && r && !f) ?? !1;
263999
+ if (h) {
264000
+ const m = (g = c.getAttributes("comment")) == null ? void 0 : g.commentId;
264001
+ c.commands.setCommentActive(m);
264012
264002
  } else
264013
- d.commands.unsetCommentActive();
264014
- return b;
264003
+ c.commands.unsetCommentActive();
264004
+ return h;
264015
264005
  },
264016
264006
  appendTo: () => document.getElementById("editor-canvas")
264017
264007
  }),
@@ -264020,8 +264010,7 @@ const $Pn = ({
264020
264010
  return /* @__PURE__ */ E.jsx(
264021
264011
  uk,
264022
264012
  {
264023
- onBlurCapture: l,
264024
- ...c,
264013
+ ...u,
264025
264014
  options: {
264026
264015
  offset: {
264027
264016
  mainAxis: 0,
@@ -264050,13 +264039,13 @@ const $Pn = ({
264050
264039
  editor: e,
264051
264040
  activeCommentId: t ?? void 0,
264052
264041
  isBubbleMenu: !0,
264053
- initialComment: u == null ? void 0 : u.content,
264054
- selectedContent: u == null ? void 0 : u.selectedContent,
264042
+ initialComment: l == null ? void 0 : l.content,
264043
+ selectedContent: l == null ? void 0 : l.selectedContent,
264055
264044
  isDisabled: (
264056
264045
  /* @ts-expect-error ts */
264057
- u && !Object.hasOwn(u, "commentIndex")
264046
+ l && !Object.hasOwn(l, "commentIndex")
264058
264047
  ),
264059
- isCommentOwner: (u == null ? void 0 : u.username) === a
264048
+ isCommentOwner: (l == null ? void 0 : l.username) === a
264060
264049
  }
264061
264050
  )
264062
264051
  }
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-DCoc3Unq.mjs";
1
+ import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-ByOEaqj9.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as Editor,