@fileverse-dev/ddoc 3.0.15 → 3.0.17

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-ztCSp_Xi.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-Dclni9Zc.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;
@@ -93960,7 +93960,7 @@ async function DF(e, t) {
93960
93960
  });
93961
93961
  return ne === "0x" ? { data: void 0 } : { data: ne };
93962
93962
  } catch (R) {
93963
- const I = jKt(R), { offchainLookup: H, offchainLookupSignature: $ } = await import("./ccip-BnuraDz4.mjs");
93963
+ const I = jKt(R), { offchainLookup: H, offchainLookupSignature: $ } = await import("./ccip-BEK-OQA-.mjs");
93964
93964
  if (e.ccipRead !== !1 && (I == null ? void 0 : I.slice(0, 10)) === $ && x)
93965
93965
  return { data: await H(e, { data: I, to: x }) };
93966
93966
  throw O && (I == null ? void 0 : I.slice(0, 10)) === "0x101bb98d" ? new cZt({ factory: f }) : Ege(R, {
@@ -133834,18 +133834,21 @@ const S6e = Gt.create({
133834
133834
  // Tab: Indent list item (sink)
133835
133835
  // DBlock has priority 1000, so we need to explicitly handle Tab for lists
133836
133836
  Tab: ({ editor: e }) => {
133837
- const { selection: t } = e.state, { $from: n } = t, r = n.node(n.depth), o = r.type.name === "paragraph", i = r.type.name === "heading", a = n.depth, s = a > 0 ? n.node(a - 1) : null, l = o && (s == null ? void 0 : s.type.name) === "dBlock";
133838
- if (i || l)
133837
+ const { selection: t } = e.state, { $from: n } = t, r = n.node(n.depth);
133838
+ if (typeof document < "u" && document.querySelector(".autocomplete-suggestion-container") !== null)
133839
+ return !1;
133840
+ const i = r.type.name === "paragraph", a = r.type.name === "heading", s = n.depth, l = s > 0 ? n.node(s - 1) : null, u = i && (l == null ? void 0 : l.type.name) === "dBlock";
133841
+ if (a || u)
133839
133842
  return e.commands.insertContent(" ", {
133840
133843
  parseOptions: {
133841
133844
  preserveWhitespace: "full"
133842
133845
  }
133843
133846
  }), !0;
133844
- for (let u = n.depth; u > 0; u--) {
133845
- const c = n.node(u);
133846
- if (c.type.name === "listItem")
133847
+ for (let c = n.depth; c > 0; c--) {
133848
+ const d = n.node(c);
133849
+ if (d.type.name === "listItem")
133847
133850
  return e.commands.sinkListItem("listItem"), !0;
133848
- if (c.type.name === "taskItem")
133851
+ if (d.type.name === "taskItem")
133849
133852
  return e.commands.sinkListItem("taskItem"), !0;
133850
133853
  }
133851
133854
  return !1;
@@ -187760,17 +187763,21 @@ const ejn = Pt.create({
187760
187763
  return t.forEach((a) => {
187761
187764
  a.docChanged && a.steps.forEach((s) => {
187762
187765
  s.getMap().forEach((u, c, d, f) => {
187763
- f > d && r.doc.nodesBetween(d, f, (h, p) => {
187764
- if (!this.options.types.includes(h.type.name) || h.attrs.lineHeight) return;
187765
- const g = r.doc.resolve(p), m = g.index(g.depth);
187766
- if (m > 0) {
187767
- const y = g.node(g.depth).child(m - 1);
187768
- y && this.options.types.includes(y.type.name) && y.attrs.lineHeight && (o.setNodeMarkup(p, void 0, {
187769
- ...h.attrs,
187770
- lineHeight: y.attrs.lineHeight
187771
- }), i = !0);
187772
- }
187773
- });
187766
+ if (f > d) {
187767
+ const h = r.doc.content.size, p = Math.max(0, Math.min(d, h)), g = Math.max(0, Math.min(f, h));
187768
+ if (g <= p) return;
187769
+ r.doc.nodesBetween(p, g, (m, y) => {
187770
+ if (!this.options.types.includes(m.type.name) || m.attrs.lineHeight) return;
187771
+ const b = r.doc.resolve(y), v = b.index(b.depth);
187772
+ if (v > 0) {
187773
+ const x = b.node(b.depth).child(v - 1);
187774
+ x && this.options.types.includes(x.type.name) && x.attrs.lineHeight && (o.setNodeMarkup(y, void 0, {
187775
+ ...m.attrs,
187776
+ lineHeight: x.attrs.lineHeight
187777
+ }), i = !0);
187778
+ }
187779
+ });
187780
+ }
187774
187781
  });
187775
187782
  });
187776
187783
  }), i ? o : null;
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-ztCSp_Xi.mjs";
1
+ import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-Dclni9Zc.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.15",
5
+ "version": "3.0.17",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {