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

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-C28rvaQu.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-DlOrXx61.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.commands.focus(), 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 = () => {
@@ -263998,20 +263998,19 @@ const $Pn = ({
263998
263998
  () => ({
263999
263999
  shouldShow: ({
264000
264000
  editor: d,
264001
- view: f,
264002
- element: h
264001
+ view: f
264003
264002
  }) => {
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))
264003
+ var y, b;
264004
+ const h = (y = d.getAttributes("comment")) == null ? void 0 : y.resolved, p = s.current;
264005
+ if (!f.hasFocus())
264007
264006
  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);
264007
+ const m = (d.isActive("comment") && !h && r && !p) ?? !1;
264008
+ if (m) {
264009
+ const v = (b = d.getAttributes("comment")) == null ? void 0 : b.commentId;
264010
+ d.commands.setCommentActive(v);
264012
264011
  } else
264013
264012
  d.commands.unsetCommentActive();
264014
- return b;
264013
+ return m;
264015
264014
  },
264016
264015
  appendTo: () => document.getElementById("editor-canvas")
264017
264016
  }),
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-C28rvaQu.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as Editor,
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.34-patch-1",
5
+ "version": "3.0.34-patch-2",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {