@harbour-enterprises/superdoc 0.11.14 → 0.11.15

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.
@@ -13579,8 +13579,8 @@ const O4 = (t, e) => ({
13579
13579
  }), M4 = (t) => ({
13580
13580
  ...t,
13581
13581
  commentParaId: Ip()
13582
- }), D4 = (t, e, n) => {
13583
- const r = wv({ node: t.commentJSON }), o = {
13582
+ }), D4 = (t, e, n, r) => {
13583
+ const o = wv({ editor: r, node: t.commentJSON }), i = {
13584
13584
  "w:id": String(e),
13585
13585
  "w:author": t.creatorName || t.importedAuthor?.name,
13586
13586
  "w:email": t.creatorEmail || t.importedAuthor?.email,
@@ -13595,14 +13595,14 @@ const O4 = (t, e) => ({
13595
13595
  "custom:trackedDeletedText": t.deletedText || null
13596
13596
  };
13597
13597
  if (t?.parentCommentId) {
13598
- const i = n.find((s) => s.commentId === t.parentCommentId);
13599
- o["w15:paraIdParent"] = i.commentParaId;
13598
+ const s = n.find((a) => a.commentId === t.parentCommentId);
13599
+ i["w15:paraIdParent"] = s.commentParaId;
13600
13600
  }
13601
13601
  return {
13602
13602
  type: "element",
13603
13603
  name: "w:comment",
13604
- attributes: o,
13605
- elements: [r]
13604
+ attributes: i,
13605
+ elements: [o]
13606
13606
  };
13607
13607
  }, _4 = (t) => t ? t.replace("(imported)", "").trim().split(" ").map((e) => e[0]).join("") : null, gv = (t) => new Date(t || Date.now()).toISOString().replace(/\.\d{3}Z$/, "Z"), I4 = (t = [], e) => {
13608
13608
  const n = $n(e);
@@ -16661,7 +16661,7 @@ const gs = class zv {
16661
16661
  return;
16662
16662
  }
16663
16663
  }
16664
- static updateDocumentVersion(e = this.convertedXml, n = "0.11.14") {
16664
+ static updateDocumentVersion(e = this.convertedXml, n = "0.11.15") {
16665
16665
  const r = "docProps/custom.xml";
16666
16666
  e[r] || (e[r] = jv());
16667
16667
  const o = e["docProps/custom.xml"];
@@ -16770,7 +16770,7 @@ const gs = class zv {
16770
16770
  return new sy(this).schemaToXml(e, n);
16771
16771
  }
16772
16772
  async exportToDocx(e, n, r, o = !1, i, s = [], a) {
16773
- const l = s.map((m) => M4(m)), c = l.map((m, y) => D4(m, y, l)), { result: u, params: d } = this.exportToXmlJson({
16773
+ const l = s.map((m) => M4(m)), c = l.map((m, y) => D4(m, y, l, a)), { result: u, params: d } = this.exportToXmlJson({
16774
16774
  data: e,
16775
16775
  editorSchema: n,
16776
16776
  comments: s,
@@ -16924,7 +16924,7 @@ function J$(t) {
16924
16924
  function jv() {
16925
16925
  return w4;
16926
16926
  }
16927
- function qv(t = 2, e = "0.11.14") {
16927
+ function qv(t = 2, e = "0.11.15") {
16928
16928
  return {
16929
16929
  type: "element",
16930
16930
  name: "property",
@@ -29398,7 +29398,7 @@ const D8 = class Bx extends MM {
29398
29398
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
29399
29399
  */
29400
29400
  processCollaborationMigrations() {
29401
- if (console.debug("[checkVersionMigrations] Current editor version", "0.11.14"), !this.options.ydoc) return;
29401
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.11.15"), !this.options.ydoc) return;
29402
29402
  let e = this.options.ydoc.getMap("meta").get("version");
29403
29403
  e || (e = "initial"), console.debug("[checkVersionMigrations] Document version", e);
29404
29404
  const n = fw(e) || [], r = this.state.plugins.find((i) => i.key.startsWith("y-sync"));
@@ -1,5 +1,5 @@
1
1
  import { ref as l, onMounted as R, onUnmounted as K, computed as I, createElementBlock as f, openBlock as g, withModifiers as S, createElementVNode as m, withDirectives as V, unref as w, vModelText as W, createCommentVNode as j, nextTick as B } from "vue";
2
- import { _ as G } from "./chunks/editor-Cc0LkFuB.js";
2
+ import { _ as G } from "./chunks/editor-D4RVL1uP.js";
3
3
  const X = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights", C = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
4
4
  async function E(a, e = {}) {
5
5
  const n = e.apiKey, r = e.endpoint || X;
@@ -13594,8 +13594,8 @@ const rd = (r, e) => ({
13594
13594
  }), nd = (r) => ({
13595
13595
  ...r,
13596
13596
  commentParaId: nu()
13597
- }), id = (r, e, t) => {
13598
- const n = ou({ node: r.commentJSON }), i = {
13597
+ }), id = (r, e, t, n) => {
13598
+ const i = ou({ editor: n, node: r.commentJSON }), s = {
13599
13599
  "w:id": String(e),
13600
13600
  "w:author": r.creatorName || r.importedAuthor?.name,
13601
13601
  "w:email": r.creatorEmail || r.importedAuthor?.email,
@@ -13610,14 +13610,14 @@ const rd = (r, e) => ({
13610
13610
  "custom:trackedDeletedText": r.deletedText || null
13611
13611
  };
13612
13612
  if (r?.parentCommentId) {
13613
- const s = t.find((o) => o.commentId === r.parentCommentId);
13614
- i["w15:paraIdParent"] = s.commentParaId;
13613
+ const o = t.find((a) => a.commentId === r.parentCommentId);
13614
+ s["w15:paraIdParent"] = o.commentParaId;
13615
13615
  }
13616
13616
  return {
13617
13617
  type: "element",
13618
13618
  name: "w:comment",
13619
- attributes: i,
13620
- elements: [n]
13619
+ attributes: s,
13620
+ elements: [i]
13621
13621
  };
13622
13622
  }, sd = (r) => r ? r.replace("(imported)", "").trim().split(" ").map((n) => n[0]).join("") : null, su = (r) => new Date(r || Date.now()).toISOString().replace(/\.\d{3}Z$/, "Z"), od = (r = [], e) => {
13623
13623
  const t = He(e);
@@ -16681,7 +16681,7 @@ const pt = class pt {
16681
16681
  return;
16682
16682
  }
16683
16683
  }
16684
- static updateDocumentVersion(e = this.convertedXml, t = "0.11.14") {
16684
+ static updateDocumentVersion(e = this.convertedXml, t = "0.11.15") {
16685
16685
  const n = "docProps/custom.xml";
16686
16686
  e[n] || (e[n] = Fu());
16687
16687
  const i = e["docProps/custom.xml"];
@@ -16790,7 +16790,7 @@ const pt = class pt {
16790
16790
  return new No(this).schemaToXml(e, t);
16791
16791
  }
16792
16792
  async exportToDocx(e, t, n, i = !1, s, o = [], a) {
16793
- const u = o.map((F) => nd(F)), f = u.map((F, w) => id(F, w, u)), { result: l, params: h } = this.exportToXmlJson({
16793
+ const u = o.map((F) => nd(F)), f = u.map((F, w) => id(F, w, u, a)), { result: l, params: h } = this.exportToXmlJson({
16794
16794
  data: e,
16795
16795
  editorSchema: t,
16796
16796
  comments: o,
@@ -16944,7 +16944,7 @@ function Ep(r) {
16944
16944
  function Fu() {
16945
16945
  return Gf;
16946
16946
  }
16947
- function Bu(r = 2, e = "0.11.14") {
16947
+ function Bu(r = 2, e = "0.11.15") {
16948
16948
  return {
16949
16949
  type: "element",
16950
16950
  name: "property",
@@ -1,4 +1,4 @@
1
- import { p as Tt, a0 as wt, B as ut, a1 as Bt, a2 as Rt } from "./converter-Ca8BJJ2X.js";
1
+ import { p as Tt, a0 as wt, B as ut, a1 as Bt, a2 as Rt } from "./converter-CMaZIVw2.js";
2
2
  function kt(bt) {
3
3
  throw new Error('Could not dynamically require "' + bt + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4
4
  }
@@ -7,9 +7,9 @@ var R = (t, e, n) => Pf(t, typeof e != "symbol" ? e + "" : e, n), Zo = (t, e, n)
7
7
  var Qe = (t, e, n) => (Zo(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? aa("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), Qo = (t, e, n, r) => (Zo(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), N = (t, e, n) => (Zo(t, e, "access private method"), n);
8
8
  import * as T from "yjs";
9
9
  import { UndoManager as If, Item as Rf, ContentType as Lf, Text as Ff, XmlElement as Bf } from "yjs";
10
- import { P as J, a as Y, M as fr, c as X, N as $, S as ee, T as j, b as W, D as Hn, F as E, d as rn, e as zf, f as fc, A as Nr, p as oe, B as $f, i as _f, g as pc, h as Vf, j as wt, l as Er, k as jt, m as hc, r as mc, R as ln, o as pr, n as la, q as Vt, s as Ti, t as gc, u as Hf, v as jf, w as de, x as Ve, y as zo, z as xn, C as ko, E as Wf, G as Se, H as lo, I as yc, J as Sn, K as ei, L as ti, O as ni, Q as co, U as Rt, V as $o, W as Uf, X as ca, Y as da, Z as qf, _ as Kf, $ as Xf } from "./converter-Ca8BJJ2X.js";
10
+ import { P as J, a as Y, M as fr, c as X, N as $, S as ee, T as j, b as W, D as Hn, F as E, d as rn, e as zf, f as fc, A as Nr, p as oe, B as $f, i as _f, g as pc, h as Vf, j as wt, l as Er, k as jt, m as hc, r as mc, R as ln, o as pr, n as la, q as Vt, s as Ti, t as gc, u as Hf, v as jf, w as de, x as Ve, y as zo, z as xn, C as ko, E as Wf, G as Se, H as lo, I as yc, J as Sn, K as ei, L as ti, O as ni, Q as co, U as Rt, V as $o, W as Uf, X as ca, Y as da, Z as qf, _ as Kf, $ as Xf } from "./converter-CMaZIVw2.js";
11
11
  import { ref as ua, computed as Jf, createElementBlock as Xt, openBlock as Jt, withModifiers as ri, Fragment as Yf, renderList as Gf, normalizeClass as Zf, createCommentVNode as fa, toDisplayString as oi, createElementVNode as Qf, createApp as ep } from "vue";
12
- import { D as pa } from "./docx-zipper-s6cSP3dR.js";
12
+ import { D as pa } from "./docx-zipper-DEBH-T0x.js";
13
13
  function _o(t) {
14
14
  const { from: e, to: n, empty: r } = t.selection, o = [];
15
15
  return r ? (t.storedMarks && o.push(...t.storedMarks), o.push(...t.selection.$head.marks())) : t.doc.nodesBetween(e, n, (i) => {
@@ -10048,7 +10048,7 @@ const ia = class ia extends Ng {
10048
10048
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
10049
10049
  */
10050
10050
  processCollaborationMigrations() {
10051
- if (console.debug("[checkVersionMigrations] Current editor version", "0.11.14"), !this.options.ydoc) return;
10051
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.11.15"), !this.options.ydoc) return;
10052
10052
  let r = this.options.ydoc.getMap("meta").get("version");
10053
10053
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
10054
10054
  const o = dl(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
@@ -1,6 +1,6 @@
1
1
  import { computed as _, createElementBlock as ie, openBlock as q, createElementVNode as Ot, createCommentVNode as he, normalizeClass as en, normalizeStyle as Tt, ref as R, unref as W, createBlock as Ge, toDisplayString as Xn, withDirectives as ft, withKeys as Hr, withModifiers as jr, vModelText as Wr, getCurrentInstance as Lt, createVNode as ct, readonly as tn, watch as we, onMounted as Ke, onBeforeUnmount as Be, reactive as Us, onBeforeMount as fr, inject as te, onActivated as Gs, onDeactivated as oi, createTextVNode as ht, Fragment as _e, Comment as hr, defineComponent as ee, provide as Se, h as A, Teleport as Xs, toRef as se, nextTick as ii, renderSlot as qs, isVNode as Ys, shallowRef as Zs, watchEffect as pt, mergeProps as gt, Transition as nn, vShow as Js, cloneVNode as Qs, Text as el, renderList as tl, withCtx as xt } from "vue";
2
- import { p as rn } from "./converter-Ca8BJJ2X.js";
3
- import { _ as mt, g as kt } from "./editor-Cc0LkFuB.js";
2
+ import { p as rn } from "./converter-CMaZIVw2.js";
3
+ import { _ as mt, g as kt } from "./editor-D4RVL1uP.js";
4
4
  const I0 = (e, t) => {
5
5
  let n = e.replace(/[^0-9.]/g, "");
6
6
  return n = parseFloat(n), isNaN(n) && (n = t), n = parseFloat(n), n;
@@ -1,4 +1,4 @@
1
- import { O as o } from "./chunks/converter-Ca8BJJ2X.js";
1
+ import { O as o } from "./chunks/converter-CMaZIVw2.js";
2
2
  export {
3
3
  o as SuperConverter
4
4
  };
@@ -6,7 +6,7 @@
6
6
  */
7
7
  export function translateCommentNode(params: any, type: any): any;
8
8
  export function prepareCommentParaIds(comment: any): any;
9
- export function getCommentDefinition(comment: any, commentId: string, allComments: any): any;
9
+ export function getCommentDefinition(comment: any, commentId: string, allComments: any, editor: any): any;
10
10
  export function getInitials(name: string): string | null;
11
11
  export function toIsoNoFractional(unixMillis: number): string;
12
12
  export function updateCommentsXml(commentDefs: any[], commentsXml: any): any;
@@ -1 +1 @@
1
- {"version":3,"file":"commentsExporter.d.ts","sourceRoot":"","sources":["../../../../../src/core/super-converter/v2/exporter/commentsExporter.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,kEAoCC;AA0BM,yDAMN;AAWM,8DAHI,MAAM,yBAgChB;AASM,kCAHI,MAAM,GACJ,MAAM,GAAG,IAAI,CAQzB;AAQM,8CAHI,MAAM,GACJ,MAAM,CAKlB;AAUM,+CAJI,KAAQ,yBAgClB;AAUM,wFAyBN;AAYM,sGAkCN;AAQM,0CAEN;AASM,6EAQN;AASM,kFAeN;AAQM,4EASN;AASM,0DAIN;AASM;;;EAiDN"}
1
+ {"version":3,"file":"commentsExporter.d.ts","sourceRoot":"","sources":["../../../../../src/core/super-converter/v2/exporter/commentsExporter.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,kEAoCC;AA0BM,yDAMN;AAWM,8DAHI,MAAM,sCAgChB;AASM,kCAHI,MAAM,GACJ,MAAM,GAAG,IAAI,CAQzB;AAQM,8CAHI,MAAM,GACJ,MAAM,CAKlB;AAUM,+CAJI,KAAQ,yBAgClB;AAUM,wFAyBN;AAYM,sGAkCN;AAQM,0CAEN;AASM,6EAQN;AASM,kFAeN;AAQM,4EASN;AASM,0DAIN;AASM;;;EAiDN"}
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-Ca8BJJ2X.js";
2
- import { D as a } from "./chunks/docx-zipper-s6cSP3dR.js";
1
+ import "./chunks/converter-CMaZIVw2.js";
2
+ import { D as a } from "./chunks/docx-zipper-DEBH-T0x.js";
3
3
  export {
4
4
  a as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E as m } from "./chunks/editor-Cc0LkFuB.js";
2
- import "./chunks/converter-Ca8BJJ2X.js";
3
- import "./chunks/docx-zipper-s6cSP3dR.js";
1
+ import { E as m } from "./chunks/editor-D4RVL1uP.js";
2
+ import "./chunks/converter-CMaZIVw2.js";
3
+ import "./chunks/docx-zipper-DEBH-T0x.js";
4
4
  export {
5
5
  m as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as p } from "./chunks/docx-zipper-s6cSP3dR.js";
1
+ import { J as p } from "./chunks/docx-zipper-DEBH-T0x.js";
2
2
  async function c(o, t) {
3
3
  const e = new p();
4
4
  return o.forEach((i, n) => {
@@ -6,14 +6,14 @@ var bt = (t, l, o) => l in t ? yt(t, l, { enumerable: !0, configurable: !0, writ
6
6
  var Re = (t, l, o) => bt(t, typeof l != "symbol" ? l + "" : l, o), qe = (t, l, o) => l.has(t) || Ue("Cannot " + o);
7
7
  var Ae = (t, l, o) => (qe(t, l, "read from private field"), o ? o.call(t) : l.get(t)), Oe = (t, l, o) => l.has(t) ? Ue("Cannot add the same private member more than once") : l instanceof WeakSet ? l.add(t) : l.set(t, o);
8
8
  var z = (t, l, o) => (qe(t, l, "access private method"), o);
9
- import { _ as q, a as Ze, b as wt, I as Ne, f as kt, c as Ge, d as Ct, i as _t, u as xt, r as St, E as ze, e as Et, P as At, h as Tt, M as Ft, j as It, A as Lt, N as Mt } from "./chunks/editor-Cc0LkFuB.js";
10
- import { C as No, T as zo, l as Vo, n as Wo, k as Po, m as jo } from "./chunks/editor-Cc0LkFuB.js";
11
- import { a1 as Dt, y as $t, a3 as Ht, T as Ye, a as Bt } from "./chunks/converter-Ca8BJJ2X.js";
12
- import { O as qo } from "./chunks/converter-Ca8BJJ2X.js";
9
+ import { _ as q, a as Ze, b as wt, I as Ne, f as kt, c as Ge, d as Ct, i as _t, u as xt, r as St, E as ze, e as Et, P as At, h as Tt, M as Ft, j as It, A as Lt, N as Mt } from "./chunks/editor-D4RVL1uP.js";
10
+ import { C as No, T as zo, l as Vo, n as Wo, k as Po, m as jo } from "./chunks/editor-D4RVL1uP.js";
11
+ import { a1 as Dt, y as $t, a3 as Ht, T as Ye, a as Bt } from "./chunks/converter-CMaZIVw2.js";
12
+ import { O as qo } from "./chunks/converter-CMaZIVw2.js";
13
13
  import { ref as f, createElementBlock as k, openBlock as w, createElementVNode as C, unref as D, getCurrentInstance as Rt, computed as j, watch as Ot, onMounted as Ce, createCommentVNode as Q, withDirectives as Je, withKeys as Qe, normalizeClass as oe, withModifiers as ge, vModelText as et, createTextVNode as tt, toDisplayString as ie, Fragment as U, renderList as ee, normalizeStyle as J, createVNode as P, h as B, createApp as Nt, reactive as Ke, onUnmounted as zt, shallowRef as nt, onBeforeUnmount as ot, createBlock as Vt } from "vue";
14
- import { t as X, s as Wt, T as Pt, N as Y } from "./chunks/toolbar-C7_LSIc-.js";
14
+ import { t as X, s as Wt, T as Pt, N as Y } from "./chunks/toolbar-BggZO3Pn.js";
15
15
  import jt from "./ai-writer.es.js";
16
- import { D as Ko } from "./chunks/docx-zipper-s6cSP3dR.js";
16
+ import { D as Ko } from "./chunks/docx-zipper-DEBH-T0x.js";
17
17
  import { createZip as Zo } from "./file-zipper.es.js";
18
18
  var it = { exports: {} };
19
19
  (function(t) {
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T as p } from "./chunks/toolbar-C7_LSIc-.js";
3
- import "./chunks/editor-Cc0LkFuB.js";
2
+ import { T as p } from "./chunks/toolbar-BggZO3Pn.js";
3
+ import "./chunks/editor-D4RVL1uP.js";
4
4
  export {
5
5
  p as default
6
6
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/super-editor.es-C1EKvkyp.cjs");require("./chunks/vue-Ckf0DkDN.cjs");exports.AIWriter=e.de;exports.BasicUpload=e.$o;exports.CommentsPluginKey=e.ge;exports.DocxZipper=e.Nt;exports.Editor=e.Qi;exports.Extensions=e.Bo;exports.SuperConverter=e.Ot;exports.SuperEditor=e.Do;exports.SuperInput=e.Ho;exports.SuperToolbar=e.Mo;exports.Toolbar=e.P0;exports.TrackChangesBasePluginKey=e.ce;exports.createZip=e.c;exports.fieldAnnotationHelpers=e.Nx;exports.getActiveFormatting=e.tp;exports.getAllowedImageDimensions=e.mo;exports.getMarksFromSelection=e._o;exports.getRichTextExtensions=e.bx;exports.getStarterExtensions=e.wx;exports.helpers=e.Us;exports.trackChangesHelpers=e.Px;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/super-editor.es-BCAFJOQD.cjs");require("./chunks/vue-Ckf0DkDN.cjs");exports.AIWriter=e.de;exports.BasicUpload=e.$o;exports.CommentsPluginKey=e.ge;exports.DocxZipper=e.Nt;exports.Editor=e.Qi;exports.Extensions=e.Bo;exports.SuperConverter=e.Ot;exports.SuperEditor=e.Do;exports.SuperInput=e.Ho;exports.SuperToolbar=e.Mo;exports.Toolbar=e.P0;exports.TrackChangesBasePluginKey=e.ce;exports.createZip=e.c;exports.fieldAnnotationHelpers=e.Nx;exports.getActiveFormatting=e.tp;exports.getAllowedImageDimensions=e.mo;exports.getMarksFromSelection=e._o;exports.getRichTextExtensions=e.bx;exports.getStarterExtensions=e.wx;exports.helpers=e.Us;exports.trackChangesHelpers=e.Px;
@@ -1,4 +1,4 @@
1
- import { d as t, $ as r, g as o, N as i, Q as n, B as p, O as g, D as l, H as c, M as m, P as u, c as d, a as x, b as S, t as E, m as h, _ as A, e as C, w as T, U as b, f } from "./chunks/super-editor.es-2TZZYQLx.es.js";
1
+ import { d as t, $ as r, g as o, N as i, Q as n, B as p, O as g, D as l, H as c, M as m, P as u, c as d, a as x, b as S, t as E, m as h, _ as A, e as C, w as T, U as b, f } from "./chunks/super-editor.es-D9DgC8YX.es.js";
2
2
  import "./chunks/vue-DXpzqXur.es.js";
3
3
  export {
4
4
  t as AIWriter,