vdc-editor 0.1.307 → 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-BRtp_6vb.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,
@@ -56388,7 +56385,7 @@ const Sce = {
56388
56385
  fixedWidth: { type: Boolean }
56389
56386
  },
56390
56387
  setup(t, { expose: e }) {
56391
- const n = t, o = $([]), r = $([]), i = $(!1), s = $(!1), a = $(null), l = Et("isMobile", !1), u = Et("fontWeight", $("")), d = q(() => m(u) || "normal"), f = Et("canEditSuper", $(!0)), { onUpdate: h, handleMouseOver: g, handleMouseLeave: b, wrapperMinHeight: v } = oT(
56388
+ const n = t, o = $([]), r = $([]), i = $(!1), s = $(!1), a = $(null), l = Et("isMobile", !1), u = Et("fontWeight", $("")), d = q(() => n.fixedWidth && m(u) || "normal"), f = Et("canEditSuper", $(!0)), { onUpdate: h, handleMouseOver: g, handleMouseLeave: b, wrapperMinHeight: v } = oT(
56392
56389
  n.editor,
56393
56390
  a,
56394
56391
  r,
@@ -56476,7 +56473,7 @@ const Sce = {
56476
56473
  ], 6);
56477
56474
  };
56478
56475
  }
56479
- }), Gce = /* @__PURE__ */ Fr(Kce, [["__scopeId", "data-v-04534390"]]), Xce = ["index", "book-mark-id", "line-id", "onMouseover"], Yce = ["innerHTML"], Jce = /* @__PURE__ */ X({
56476
+ }), Gce = /* @__PURE__ */ Fr(Kce, [["__scopeId", "data-v-51843f23"]]), Xce = ["index", "book-mark-id", "line-id", "onMouseover"], Yce = ["innerHTML"], Jce = /* @__PURE__ */ X({
56480
56477
  __name: "SuperTextViewComment",
56481
56478
  props: {
56482
56479
  editor: {},
@@ -56485,7 +56482,7 @@ const Sce = {
56485
56482
  fixedWidth: { type: Boolean }
56486
56483
  },
56487
56484
  setup(t) {
56488
- const e = t, n = $([]), o = $([]), r = $(!1), i = $(!1), s = $(null), a = Et("isMobile", !1), l = Et("fontWeight", $("")), u = q(() => m(l) || "normal"), d = Et("isEditable", $(!0)), { onUpdate: f, handleMouseOver: h, handleMouseLeave: g, wrapperMinHeight: b } = oT(
56485
+ const e = t, n = $([]), o = $([]), r = $(!1), i = $(!1), s = $(null), a = Et("isMobile", !1), l = Et("fontWeight", $("")), u = q(() => e.fixedWidth && m(l) || "normal"), d = Et("isEditable", $(!0)), { onUpdate: f, handleMouseOver: h, handleMouseLeave: g, wrapperMinHeight: b } = oT(
56489
56486
  e.editor,
56490
56487
  s,
56491
56488
  o,
@@ -56567,7 +56564,7 @@ const Sce = {
56567
56564
  ], 6);
56568
56565
  };
56569
56566
  }
56570
- }), Zce = /* @__PURE__ */ Fr(Jce, [["__scopeId", "data-v-ca5d44cc"]]), rT = (t) => {
56567
+ }), Zce = /* @__PURE__ */ Fr(Jce, [["__scopeId", "data-v-2bddcb10"]]), rT = (t) => {
56571
56568
  console.log(t), t = t.replace(/\s*style="[^"]*"/g, ""), t = t.replace(/<iframe\b[\s\S]*?<\/iframe\s*>/gi, "");
56572
56569
  const e = t.match(/<!--StartFragment-->([\s\S]*?)<!--EndFragment-->/), o = (e ? e[1] : t).replace(/<br\s*\/?>/gi, `
56573
56570
  `).split(/\r?\n/), r = [];
@@ -62044,4 +62041,4 @@ export {
62044
62041
  Jfe as n,
62045
62042
  _pe as u
62046
62043
  };
62047
- //# sourceMappingURL=index-BNr7tOXv.mjs.map
62044
+ //# sourceMappingURL=index-ChtHL5W7.mjs.map