@harbour-enterprises/superdoc 0.11.16 → 0.11.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,5 +1,5 @@
1
- import { b as md, g as yd, c as bd, Q as jo, S as Wo, H as wd, d as Sd, D as Dd, M as vd, a as Fd } from "./chunks/super-editor.es-8iS3Aufz.es.js";
2
- import { O as Ib, L as Cb, U as fb } from "./chunks/super-editor.es-8iS3Aufz.es.js";
1
+ import { b as md, g as yd, c as bd, Q as jo, S as Wo, H as wd, d as Sd, D as Dd, M as vd, a as Fd } from "./chunks/super-editor.es-DsIIP7Il.es.js";
2
+ import { O as Ib, L as Cb, U as fb } from "./chunks/super-editor.es-DsIIP7Il.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, D as dt, i as ht, q as ji, l as wt, y as ke, a1 as kd, N as Zt, u as qt, a2 as xd, a3 as Rd, a4 as Xo, g as Ji, K as Us, O as jr, j as Ii, k as Di, h as da, U as Nd, s as Md, A as Wr, F as jt, R as GA, m as Ct, E as mi, I as ms, C as re, V as Ld, S as Gd, W as Td, J as qi, P as Es, G as ar, Q as Ud, H as Hd, T as Pd, b as ye, o as fe, t as yi, x as bi, z as zl, f as We, B as ri, e as Ze, v 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-DXpzqXur.es.js";
4
4
  import { B as qn } from "./chunks/jszip-DO3il9iI.es.js";
5
5
  import { B as Yd } from "./chunks/blank-docx-BRvkcuiv.es.js";
@@ -2126,7 +2126,7 @@ const Ri = /* @__PURE__ */ JA("superdoc", () => {
2126
2126
  left: Je
2127
2127
  };
2128
2128
  }, Me = (he, ce, De) => {
2129
- const Te = document.querySelectorAll(".comment-box"), Je = he.getBoundingClientRect(), qe = [];
2129
+ const Te = document.querySelectorAll(".sd-comment-box"), Je = he.getBoundingClientRect(), qe = [];
2130
2130
  if (Te.forEach((Le) => {
2131
2131
  if (Le.dataset.id === ce.conversationId) return;
2132
2132
  const ot = Le.getBoundingClientRect();
@@ -10234,7 +10234,7 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
10234
10234
  "is-pending-input": !0
10235
10235
  }, null, 8, ["config", "comment"])) : Ze("", !0),
10236
10236
  We("div", {
10237
- class: Xs(["comment-entry", { "input-active": n.isFocused }])
10237
+ class: Xs(["comment-entry", { "sd-input-active": n.isFocused }])
10238
10238
  }, [
10239
10239
  bi(ke(wd), {
10240
10240
  class: "superdoc-field",
@@ -10248,7 +10248,7 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
10248
10248
  ], 2)
10249
10249
  ]));
10250
10250
  }
10251
- }, ul = /* @__PURE__ */ Mt(YQ, [["__scopeId", "data-v-76d953bd"]]), KQ = {
10251
+ }, ul = /* @__PURE__ */ Mt(YQ, [["__scopeId", "data-v-dd84b4db"]]), KQ = {
10252
10252
  key: 0,
10253
10253
  class: "existing-internal-input"
10254
10254
  }, _Q = {
@@ -10310,7 +10310,7 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
10310
10310
  }), V = ae(() => r.comment.resolvedTime ? !0 : b.value.readOnly), $ = ae(() => (X) => O.value === X.commentId), q = ae(() => A.$superdoc.config.isInternal ? !y.value && !r.comment.trackedChange : !1), ee = ae(() => M.value && M.value !== "<p></p>"), te = () => {
10311
10311
  r.comment.resolvedTime || (D.value = r.comment.commentId, r.comment.setActive(A.$superdoc));
10312
10312
  }, se = (X) => {
10313
- X.target.classList.contains("n-dropdown-option-body__label") || X.target.classList.contains("comment-highlight") || (D.value === r.comment.commentId && (w.value = 0, i("dialog-exit")), D.value = null);
10313
+ X.target.classList.contains("n-dropdown-option-body__label") || X.target.classList.contains("sd-editor-comment-highlight") || (D.value === r.comment.commentId && (w.value = 0, i("dialog-exit")), D.value = null);
10314
10314
  }, ne = () => {
10315
10315
  const X = {
10316
10316
  documentId: r.comment.fileId,
@@ -10471,7 +10471,7 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
10471
10471
  ]);
10472
10472
  };
10473
10473
  }
10474
- }, ir = /* @__PURE__ */ Mt(gm, [["__scopeId", "data-v-afaf943d"]]), hm = { class: "comments-list" }, um = { key: 0 }, dm = { class: "comment-item" }, Im = { key: 1 }, Cm = { class: "comment-item" }, fm = {
10474
+ }, ir = /* @__PURE__ */ Mt(gm, [["__scopeId", "data-v-92061859"]]), hm = { class: "comments-list" }, um = { key: 0 }, dm = { class: "comment-item" }, Im = { key: 1 }, Cm = { class: "comment-item" }, fm = {
10475
10475
  __name: "commentsList",
10476
10476
  props: {
10477
10477
  showMainComments: {
@@ -31591,7 +31591,7 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
31591
31591
  D.forEach((P) => P.destroy()), b.cleanup(), b.destroy(), D = [], b = null, URL.revokeObjectURL(i);
31592
31592
  };
31593
31593
  return Ii(async () => {
31594
- await Promise.resolve({ }), await J(M);
31594
+ await J(M);
31595
31595
  }), Od(() => {
31596
31596
  L();
31597
31597
  }), (P, K) => (fe(), ye("div", {
@@ -31613,7 +31613,7 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
31613
31613
  ]))
31614
31614
  ], 32));
31615
31615
  }
31616
- }, U9 = /* @__PURE__ */ Mt(T9, [["__scopeId", "data-v-3543cd9d"]]), H9 = {
31616
+ }, U9 = /* @__PURE__ */ Mt(T9, [["__scopeId", "data-v-6d611c0c"]]), H9 = {
31617
31617
  class: "comments-container",
31618
31618
  id: "commentsContainer"
31619
31619
  }, P9 = { class: "comments-layer" }, O9 = ["onClick", "data-id"], J9 = {
@@ -31680,7 +31680,7 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
31680
31680
  }), (T, H) => (fe(), ye("div", H9, [
31681
31681
  We("div", P9, [
31682
31682
  (fe(!0), ye(jt, null, gn(J.value, (U) => (fe(), ye("div", {
31683
- class: "comment-anchor sd-highlight",
31683
+ class: "sd-comment-anchor sd-highlight",
31684
31684
  onClick: Qi((S) => O(U), ["stop", "prevent"]),
31685
31685
  "data-id": U.commentId,
31686
31686
  style: ri(M(U))
@@ -31688,7 +31688,7 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
31688
31688
  ])
31689
31689
  ]));
31690
31690
  }
31691
- }, Y9 = /* @__PURE__ */ Mt(J9, [["__scopeId", "data-v-fbd54adc"]]), K9 = { class: "sidebar-container calculation-container" }, _9 = ["id"], q9 = {
31691
+ }, Y9 = /* @__PURE__ */ Mt(J9, [["__scopeId", "data-v-0dbcad34"]]), K9 = { class: "sidebar-container calculation-container" }, _9 = ["id"], q9 = {
31692
31692
  __name: "FloatingComments",
31693
31693
  props: {
31694
31694
  currentDocument: {
@@ -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.11.16", 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.11.17", 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;
@@ -24022,7 +24022,7 @@ Actual: ` + p3.attribValue
24022
24022
  return;
24023
24023
  }
24024
24024
  }
24025
- static updateDocumentVersion(e = this.convertedXml, t = "0.11.16") {
24025
+ static updateDocumentVersion(e = this.convertedXml, t = "0.11.17") {
24026
24026
  const n = "docProps/custom.xml";
24027
24027
  e[n] || (e[n] = Fu$2());
24028
24028
  const i3 = e["docProps/custom.xml"];
@@ -24285,7 +24285,7 @@ Actual: ` + p3.attribValue
24285
24285
  function Fu$2() {
24286
24286
  return Gf$1;
24287
24287
  }
24288
- function Bu$2(r22 = 2, e = "0.11.16") {
24288
+ function Bu$2(r22 = 2, e = "0.11.17") {
24289
24289
  return {
24290
24290
  type: "element",
24291
24291
  name: "property",
@@ -36015,7 +36015,7 @@ Actual: ` + p3.attribValue
36015
36015
  const H3 = z$1.inline(w, w + b.nodeSize, {
36016
36016
  style: `background-color: ${B};`,
36017
36017
  "data-thread-id": C3,
36018
- class: "comment-highlight"
36018
+ class: "sd-editor-comment-highlight"
36019
36019
  });
36020
36020
  S && n !== C3 || u.push(H3);
36021
36021
  });
@@ -36795,7 +36795,7 @@ Actual: ` + p3.attribValue
36795
36795
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
36796
36796
  */
36797
36797
  processCollaborationMigrations() {
36798
- if (console.debug("[checkVersionMigrations] Current editor version", "0.11.16"), !this.options.ydoc) return;
36798
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.11.17"), !this.options.ydoc) return;
36799
36799
  let r = this.options.ydoc.getMap("meta").get("version");
36800
36800
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
36801
36801
  const o = dl$1(r) || [], s = this.state.plugins.find((c3) => c3.key.startsWith("y-sync"));
@@ -37800,7 +37800,7 @@ Actual: ` + p3.attribValue
37800
37800
  inclusive: false,
37801
37801
  addOptions() {
37802
37802
  return {
37803
- htmlAttributes: { class: "super-editor-ai" }
37803
+ htmlAttributes: { class: "sd-editor-ai" }
37804
37804
  };
37805
37805
  },
37806
37806
  addAttributes() {
@@ -38794,7 +38794,7 @@ Actual: ` + p3.attribValue
38794
38794
  }
38795
38795
  },
38796
38796
  class: {
38797
- renderDOM: (t) => t.dropcap ? { class: "super-doc-dropcap" } : null
38797
+ renderDOM: (t) => t.dropcap ? { class: "sd-editor-dropcap" } : null
38798
38798
  },
38799
38799
  styleId: {},
38800
38800
  attributes: {
@@ -39006,7 +39006,7 @@ Actual: ` + p3.attribValue
39006
39006
  excludes: "",
39007
39007
  addOptions() {
39008
39008
  return {
39009
- htmlAttributes: { class: "super-editor-comment" }
39009
+ htmlAttributes: { class: "sd-editor-comment" }
39010
39010
  };
39011
39011
  },
39012
39012
  addAttributes() {
@@ -39037,7 +39037,7 @@ Actual: ` + p3.attribValue
39037
39037
  addOptions() {
39038
39038
  return {
39039
39039
  htmlAttributes: {
39040
- class: "super-doc-tab",
39040
+ class: "sd-editor-tab",
39041
39041
  // this works together with content prop:
39042
39042
  // since tab can't have content inside but content prop is defined I have to manually add attribute
39043
39043
  contentEditable: false
@@ -39045,7 +39045,7 @@ Actual: ` + p3.attribValue
39045
39045
  };
39046
39046
  },
39047
39047
  parseDOM() {
39048
- return [{ tag: "span.super-doc-tab" }];
39048
+ return [{ tag: "span.sd-editor-tab" }];
39049
39049
  },
39050
39050
  renderDOM({ htmlAttributes: t }) {
39051
39051
  return ["span", E$1.mergeAttributes(this.options.htmlAttributes, t), 0];
@@ -42443,7 +42443,7 @@ Actual: ` + p3.attribValue
42443
42443
  addOptions() {
42444
42444
  return {
42445
42445
  htmlAttributes: {
42446
- class: "super-editor-mention"
42446
+ class: "sd-editor-mention"
42447
42447
  }
42448
42448
  };
42449
42449
  },
@@ -42516,7 +42516,7 @@ Actual: ` + p3.attribValue
42516
42516
  addOptions() {
42517
42517
  return {
42518
42518
  htmlAttributes: {
42519
- class: "pm-shape-container"
42519
+ class: "sd-editor-shape-container"
42520
42520
  }
42521
42521
  };
42522
42522
  },
@@ -42562,7 +42562,7 @@ Actual: ` + p3.attribValue
42562
42562
  addOptions() {
42563
42563
  return {
42564
42564
  htmlAttributes: {
42565
- class: "pm-shape-textbox"
42565
+ class: "sd-editor-shape-textbox"
42566
42566
  }
42567
42567
  };
42568
42568
  },
@@ -43268,7 +43268,7 @@ Actual: ` + p3.attribValue
43268
43268
  if (n.doc.textBetween(0, n.doc.content.size, " ", " ") !== "") return P.empty;
43269
43269
  const { $from: o } = n.selection, i3 = z$1.node(o.before(), o.after(), {
43270
43270
  "data-placeholder": this.options.placeholder,
43271
- class: "super-editor-placeholder"
43271
+ class: "sd-editor-placeholder"
43272
43272
  });
43273
43273
  return P.create(n.doc, [i3]);
43274
43274
  };
@@ -45092,7 +45092,7 @@ Actual: ` + p3.attribValue
45092
45092
  const n22 = e22.key === "ArrowDown" || e22.key === "ArrowUp";
45093
45093
  this.tippyInstance.state.isVisible && n22 && (e22.preventDefault(), this.popover.firstChild.focus());
45094
45094
  });
45095
- this.editor = n, this.view = e, this.popover = document.createElement("div"), this.popover.className = "popover", document.body.appendChild(this.popover), this.tippyInstance = $r$1(this.popover, {
45095
+ this.editor = n, this.view = e, this.popover = document.createElement("div"), this.popover.className = "sd-editor-popover", document.body.appendChild(this.popover), this.tippyInstance = $r$1(this.popover, {
45096
45096
  trigger: "manual",
45097
45097
  placement: "bottom-start",
45098
45098
  interactive: true,
@@ -45104,7 +45104,7 @@ Actual: ` + p3.attribValue
45104
45104
  onHide: () => {
45105
45105
  this.unbindKeyDownEvents();
45106
45106
  },
45107
- theme: "popover"
45107
+ theme: "sd-editor-popover"
45108
45108
  });
45109
45109
  }
45110
45110
  bindKeyDownEvents() {
@@ -53064,7 +53064,7 @@ ${t}
53064
53064
  show: F3.expand.value,
53065
53065
  size: "medium",
53066
53066
  placement: "bottom-start",
53067
- class: "toolbar-button toolbar-dropdown",
53067
+ class: "toolbar-button toolbar-dropdown sd-editor-toolbar-dropdown",
53068
53068
  onSelect: (y, E3) => b(F3, E3),
53069
53069
  onClickoutside: v,
53070
53070
  style: normalizeStyle(F3.dropdownStyles.value)
@@ -53093,7 +53093,8 @@ ${t}
53093
53093
  _: 2
53094
53094
  }, 1032, ["options", "trigger", "show", "onSelect", "style"])) : a(F3) ? (openBlock(), createBlock(unref(ni), {
53095
53095
  key: 2,
53096
- trigger: "hover"
53096
+ trigger: "hover",
53097
+ class: "sd-editor-toolbar-tooltip"
53097
53098
  }, {
53098
53099
  trigger: withCtx(() => [
53099
53100
  createVNode(qn$1, {
@@ -53118,7 +53119,7 @@ ${t}
53118
53119
  ], 2))), 128))
53119
53120
  ], 4));
53120
53121
  }
53121
- }, Qt$1 = /* @__PURE__ */ Zk(E0, [["__scopeId", "data-v-85a28a08"]]), A0 = {
53122
+ }, Qt$1 = /* @__PURE__ */ Zk(E0, [["__scopeId", "data-v-7a2db351"]]), A0 = {
53122
53123
  __name: "Toolbar",
53123
53124
  emits: ["command", "toggle", "select"],
53124
53125
  setup(e, { emit: t }) {
@@ -57726,7 +57727,7 @@ ${t}
57726
57727
  };
57727
57728
  };
57728
57729
  const checkOverlaps = (currentElement, dialog, doc2) => {
57729
- const currentDialogs = document.querySelectorAll(".comment-box");
57730
+ const currentDialogs = document.querySelectorAll(".sd-comment-box");
57730
57731
  const currentBounds = currentElement.getBoundingClientRect();
57731
57732
  const overlaps = [];
57732
57733
  currentDialogs.forEach((d) => {
@@ -68480,7 +68481,7 @@ ${style2}
68480
68481
  "is-pending-input": true
68481
68482
  }, null, 8, ["config", "comment"])) : createCommentVNode("", true),
68482
68483
  createBaseVNode("div", {
68483
- class: normalizeClass(["comment-entry", { "input-active": __props.isFocused }])
68484
+ class: normalizeClass(["comment-entry", { "sd-input-active": __props.isFocused }])
68484
68485
  }, [
68485
68486
  createVNode(unref(Ho), {
68486
68487
  class: "superdoc-field",
@@ -68496,7 +68497,7 @@ ${style2}
68496
68497
  };
68497
68498
  }
68498
68499
  };
68499
- const CommentInput = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-76d953bd"]]);
68500
+ const CommentInput = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-dd84b4db"]]);
68500
68501
  const _hoisted_1$c = {
68501
68502
  key: 0,
68502
68503
  class: "existing-internal-input"
@@ -68621,7 +68622,7 @@ ${style2}
68621
68622
  };
68622
68623
  const handleClickOutside = (e) => {
68623
68624
  if (e.target.classList.contains("n-dropdown-option-body__label")) return;
68624
- if (e.target.classList.contains("comment-highlight")) return;
68625
+ if (e.target.classList.contains("sd-editor-comment-highlight")) return;
68625
68626
  if (activeComment.value === props.comment.commentId) {
68626
68627
  floatingCommentsOffset.value = 0;
68627
68628
  emit2("dialog-exit");
@@ -68835,7 +68836,7 @@ ${style2}
68835
68836
  };
68836
68837
  }
68837
68838
  };
68838
- const CommentDialog = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-afaf943d"]]);
68839
+ const CommentDialog = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-92061859"]]);
68839
68840
  const _hoisted_1$b = { class: "comments-list" };
68840
68841
  const _hoisted_2$6 = { key: 0 };
68841
68842
  const _hoisted_3$3 = { class: "comment-item" };
@@ -69093,7 +69094,6 @@ ${style2}
69093
69094
  URL.revokeObjectURL(workerUrl);
69094
69095
  };
69095
69096
  onMounted(async () => {
69096
- await Promise.resolve().then(() => pdf_viewer);
69097
69097
  await loadPDF(pdfData);
69098
69098
  });
69099
69099
  onUnmounted(() => {
@@ -69121,7 +69121,7 @@ ${style2}
69121
69121
  };
69122
69122
  }
69123
69123
  };
69124
- const PdfViewer = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-3543cd9d"]]);
69124
+ const PdfViewer = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-6d611c0c"]]);
69125
69125
  const _hoisted_1$9 = {
69126
69126
  class: "comments-container",
69127
69127
  id: "commentsContainer"
@@ -69224,7 +69224,7 @@ ${style2}
69224
69224
  createBaseVNode("div", _hoisted_2$5, [
69225
69225
  (openBlock(true), createElementBlock(Fragment, null, renderList(getCurrentComments.value, (conversation) => {
69226
69226
  return openBlock(), createElementBlock("div", {
69227
- class: "comment-anchor sd-highlight",
69227
+ class: "sd-comment-anchor sd-highlight",
69228
69228
  onClick: withModifiers(($event) => activateComment(conversation), ["stop", "prevent"]),
69229
69229
  "data-id": conversation.commentId,
69230
69230
  style: normalizeStyle(getStyle(conversation))
@@ -69235,7 +69235,7 @@ ${style2}
69235
69235
  };
69236
69236
  }
69237
69237
  };
69238
- const CommentsLayer = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-fbd54adc"]]);
69238
+ const CommentsLayer = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-0dbcad34"]]);
69239
69239
  const _hoisted_1$8 = { class: "sidebar-container calculation-container" };
69240
69240
  const _hoisted_2$4 = ["id"];
69241
69241
  const _sfc_main$9 = {
@@ -70607,7 +70607,7 @@ ${style2}
70607
70607
  this.config.colors = shuffleArray(this.config.colors);
70608
70608
  this.userColorMap = /* @__PURE__ */ new Map();
70609
70609
  this.colorIndex = 0;
70610
- this.version = "0.11.16";
70610
+ this.version = "0.11.17";
70611
70611
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
70612
70612
  this.superdocId = config.superdocId || v4();
70613
70613
  this.colors = this.config.colors;
@@ -71041,9 +71041,6 @@ ${style2}
71041
71041
  }
71042
71042
  }
71043
71043
  }
71044
- const pdf_viewer = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
71045
- __proto__: null
71046
- }, Symbol.toStringTag, { value: "Module" }));
71047
71044
  exports2.BlankDOCX = BlankDOCX;
71048
71045
  exports2.DOCX = DOCX;
71049
71046
  exports2.Editor = Qi$1;