@harbour-enterprises/superdoc 0.10.56 → 0.10.57

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,5 +1,5 @@
1
- import { h as md, g as yd, c as bd, q as jo, J as Wo, x as wd, d as Sd, C as Dd, w as vd, a as Fd } from "./chunks/super-editor.es-Cxr-KIeY.es.js";
2
- import { R as Ib, b as Cb, f as fb } from "./chunks/super-editor.es-Cxr-KIeY.es.js";
1
+ import { h as md, g as yd, c as bd, q as jo, J as Wo, x as wd, d as Sd, C as Dd, w as vd, a as Fd } from "./chunks/super-editor.es-B82tt5cN.es.js";
2
+ import { R as Ib, b as Cb, f as fb } from "./chunks/super-editor.es-B82tt5cN.es.js";
3
3
  import { Y as Vl, r as W, Z as ui, p as Ge, _ as Vn, a as ae, $ as zn, a0 as ua, C as dt, i as ht, q as ji, l as wt, x as ke, a1 as kd, L as Zt, R as qt, a2 as xd, a3 as Rd, a4 as Xo, g as Ji, N as Us, M as jr, j as Ii, k as Di, h as da, U as Nd, s as Md, A as Wr, F as jt, Q as GA, m as Ct, D as mi, G as ms, B as re, V as Ld, S as Gd, W as Td, K as qi, O as Es, E as ar, P as Ud, J as Hd, T as Pd, b as ye, o as fe, t as yi, v as bi, y as zl, f as We, z as ri, e as Ze, u as hi, w as Qi, n as Xs, a5 as Zl, d as gn, c as $l, X as Od, a6 as Jd } from "./chunks/vue-D254cI7X.es.js";
4
4
  import { B as qn } from "./chunks/jszip-ChtTJmXO.es.js";
5
5
  import { B as Yd } from "./chunks/blank-docx-BRvkcuiv.es.js";
@@ -32694,7 +32694,7 @@ class hb extends eg {
32694
32694
  this.config = {
32695
32695
  ...this.config,
32696
32696
  ...t
32697
- }, this.config.colors = NI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.10.56", console.debug("🦋 [superdoc] Using SuperDoc version:", this.version), this.superdocId = t.superdocId || ig(), this.colors = this.config.colors, this.#t(), await this.#r(this.config.modules), this.#i(), this.#s(), this.user = this.config.user, this.users = this.config.users || [], this.socket = null, this.isDev = this.config.isDev || !1, this.activeEditor = null, this.comments = [], this.app.mount(this.config.selector), this.readyEditors = 0, this.isLocked = this.config.isLocked || !1, this.lockedBy = this.config.lockedBy || null, this.#a(this);
32697
+ }, this.config.colors = NI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.10.57", console.debug("🦋 [superdoc] Using SuperDoc version:", this.version), this.superdocId = t.superdocId || ig(), this.colors = this.config.colors, this.#t(), await this.#r(this.config.modules), this.#i(), this.#s(), this.user = this.config.user, this.users = this.config.users || [], this.socket = null, this.isDev = this.config.isDev || !1, this.activeEditor = null, this.comments = [], this.app.mount(this.config.selector), this.readyEditors = 0, this.isLocked = this.config.isLocked || !1, this.lockedBy = this.config.lockedBy || null, this.#a(this);
32698
32698
  }
32699
32699
  get requiredNumberOfEditors() {
32700
32700
  return this.superdocStore.documents.filter((t) => t.type === on).length;
@@ -32958,6 +32958,16 @@ class hb extends eg {
32958
32958
  t.provider && (t.provider.disconnect(), t.provider.destroy()), t.ydoc?.destroy();
32959
32959
  }), this.superdocStore.reset(), this.telemetry?.destroy(), this.app.unmount(), this.removeAllListeners(), delete this.app.config.globalProperties.$config, delete this.app.config.globalProperties.$superdoc);
32960
32960
  }
32961
+ /**
32962
+ * Focus the active editor or the first editor in the superdoc
32963
+ * @returns {void}
32964
+ */
32965
+ focus() {
32966
+ this.activeEditor ? this.activeEditor.focus() : this.superdocStore.documents.find((t) => {
32967
+ const i = t.getEditor();
32968
+ i && i.focus();
32969
+ });
32970
+ }
32961
32971
  }
32962
32972
  export {
32963
32973
  Yd as BlankDOCX,
@@ -23903,7 +23903,7 @@ Actual: ` + p3.attribValue
23903
23903
  return;
23904
23904
  }
23905
23905
  }
23906
- static updateDocumentVersion(e = this.convertedXml, t = "0.10.56") {
23906
+ static updateDocumentVersion(e = this.convertedXml, t = "0.10.57") {
23907
23907
  const n = "docProps/custom.xml";
23908
23908
  e[n] || (e[n] = Fu$2());
23909
23909
  const i3 = e["docProps/custom.xml"];
@@ -24164,7 +24164,7 @@ Actual: ` + p3.attribValue
24164
24164
  function Fu$2() {
24165
24165
  return Gf$2;
24166
24166
  }
24167
- function Bu$2(r22 = 2, e = "0.10.56") {
24167
+ function Bu$2(r22 = 2, e = "0.10.57") {
24168
24168
  return {
24169
24169
  type: "element",
24170
24170
  name: "property",
@@ -36674,7 +36674,7 @@ Actual: ` + p3.attribValue
36674
36674
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
36675
36675
  */
36676
36676
  processCollaborationMigrations() {
36677
- if (console.debug("[checkVersionMigrations] Current editor version", "0.10.56"), !this.options.ydoc) return;
36677
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.10.57"), !this.options.ydoc) return;
36678
36678
  let r = this.options.ydoc.getMap("meta").get("version");
36679
36679
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
36680
36680
  const o = ol$1(r) || [], s = this.state.plugins.find((c3) => c3.key.startsWith("y-sync"));
@@ -69928,7 +69928,7 @@ ${style2}
69928
69928
  this.config.colors = shuffleArray(this.config.colors);
69929
69929
  this.userColorMap = /* @__PURE__ */ new Map();
69930
69930
  this.colorIndex = 0;
69931
- this.version = "0.10.56";
69931
+ this.version = "0.10.57";
69932
69932
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
69933
69933
  this.superdocId = config.superdocId || v4();
69934
69934
  this.colors = this.config.colors;
@@ -70329,6 +70329,22 @@ ${style2}
70329
70329
  delete this.app.config.globalProperties.$config;
70330
70330
  delete this.app.config.globalProperties.$superdoc;
70331
70331
  }
70332
+ /**
70333
+ * Focus the active editor or the first editor in the superdoc
70334
+ * @returns {void}
70335
+ */
70336
+ focus() {
70337
+ if (this.activeEditor) {
70338
+ this.activeEditor.focus();
70339
+ } else {
70340
+ this.superdocStore.documents.find((doc2) => {
70341
+ const editor = doc2.getEditor();
70342
+ if (editor) {
70343
+ editor.focus();
70344
+ }
70345
+ });
70346
+ }
70347
+ }
70332
70348
  }
70333
70349
  const pdf_viewer = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
70334
70350
  __proto__: null