vdc-editor 0.1.308 → 0.1.309

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.
@@ -0,0 +1,5 @@
1
+ import { _ as f } from "./index-ChtHL5W7.mjs";
2
+ export {
3
+ f as default
4
+ };
5
+ //# sourceMappingURL=BulkSpellChecker-BV6SWOfq.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BulkSpellChecker-BV6SWOfq.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -46875,19 +46875,16 @@ class yse {
46875
46875
  async proofreadChangedNodes(e) {
46876
46876
  if (this.editorView && this.isDocExceedLimit(this.editorView.state.doc))
46877
46877
  return;
46878
- const n = this.isMobile ? 1 : 2, r = e.reduce((i, s) => {
46879
- if (i.length === 0)
46880
- return i.push({ changedNode: s, time: 1 }), i;
46881
- const a = i[i.length - 1];
46882
- return s.pos === a.changedNode.pos + a.changedNode.node.nodeSize + n * (a.time - 1) ? (a.changedNode.node.text += s.node.text, a.time += 1) : i.push({ changedNode: s, time: 1 }), i;
46883
- }, []).map(({ changedNode: i }) => {
46884
- const s = i.node?.textContent || "", a = i.pos;
46885
- return y8(s, this.limit).map((u) => ({
46886
- text: u.text,
46887
- originalFrom: a + u.offset
46888
- }));
46889
- });
46890
- this.debouncedGetMatchAndSetDecorationsList(r.flat());
46878
+ const n = [];
46879
+ for (const { node: r, pos: i } of e) {
46880
+ const s = r.text ?? "", a = n[n.length - 1];
46881
+ a && i === a.endPos ? (a.text += s, a.endPos = i + s.length) : n.push({ pos: i, text: s, endPos: i + s.length });
46882
+ }
46883
+ const o = n.flatMap(({ pos: r, text: i }) => y8(i, this.limit).map((a) => ({
46884
+ text: a.text,
46885
+ originalFrom: r + a.offset
46886
+ })));
46887
+ this.debouncedGetMatchAndSetDecorationsList(o);
46891
46888
  }
46892
46889
  async getMatchAndSetDecorationsList(e) {
46893
46890
  const n = e.map((o) => this.getMatchAndSetDecorations(o.text, o.originalFrom));
@@ -55469,7 +55466,7 @@ const Sce = {
55469
55466
  toolbarExtensionOrder: {}
55470
55467
  },
55471
55468
  setup(t) {
55472
- const e = tD(() => import("./BulkSpellChecker-C05Rbkct.mjs")), { t: n } = ln(), o = t, r = Et("isEditable", $(!0)), i = [
55469
+ const e = tD(() => import("./BulkSpellChecker-BV6SWOfq.mjs")), { t: n } = ln(), o = t, r = Et("isEditable", $(!0)), i = [
55473
55470
  Kh,
55474
55471
  Gh,
55475
55472
  Jh,
@@ -62044,4 +62041,4 @@ export {
62044
62041
  Jfe as n,
62045
62042
  _pe as u
62046
62043
  };
62047
- //# sourceMappingURL=index-Chb9-Wmq.mjs.map
62044
+ //# sourceMappingURL=index-ChtHL5W7.mjs.map