@harbour-enterprises/superdoc 0.12.10 → 0.12.11
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.
- package/dist/chunks/{super-editor.es-Bf6kv8E7.cjs → super-editor.es-CmqH_wli.cjs} +3 -3
- package/dist/chunks/{super-editor.es-B4hMBqlj.es.js → super-editor.es-DlmgQ4J3.es.js} +31 -12
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-lyVGCU64.js → converter-BaK7tyEH.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-5A2iHpqR.js → docx-zipper-CSpGjsCF.js} +1 -1
- package/dist/super-editor/chunks/{editor-DugKTpYa.js → editor-D-OAU3KR.js} +31 -12
- package/dist/super-editor/chunks/{toolbar-Dbj1GrW9.js → toolbar-DlRHgwNd.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Editor.d.ts +16 -0
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/core/helpers/annotator.d.ts +1 -1
- package/dist/super-editor/core/helpers/annotator.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +32 -13
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as md, g as yd, c as bd, l as jo, f as Wo, a as wd, x as Sd, z as Dd, $ as vd, d as Fd } from "./chunks/super-editor.es-
|
|
2
|
-
import { O as Ib, w as Cb, i as fb } from "./chunks/super-editor.es-
|
|
1
|
+
import { k as md, g as yd, c as bd, l as jo, f as Wo, a as wd, x as Sd, z as Dd, $ as vd, d as Fd } from "./chunks/super-editor.es-DlmgQ4J3.es.js";
|
|
2
|
+
import { O as Ib, w as Cb, i as fb } from "./chunks/super-editor.es-DlmgQ4J3.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 Fe, 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-DKS68Dra.es.js";
|
|
4
4
|
import { B as qn } from "./chunks/jszip-OpmRHhd4.es.js";
|
|
5
5
|
import { B as Yd } from "./chunks/blank-docx-BRvkcuiv.es.js";
|
|
@@ -32718,7 +32718,7 @@ class hb extends eg {
|
|
|
32718
32718
|
this.config = {
|
|
32719
32719
|
...this.config,
|
|
32720
32720
|
...t
|
|
32721
|
-
}, this.config.colors = NI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.12.
|
|
32721
|
+
}, this.config.colors = NI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.12.11", 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();
|
|
32722
32722
|
}
|
|
32723
32723
|
/**
|
|
32724
32724
|
* Get the number of editors that are required for this superdoc
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -24219,7 +24219,7 @@ Actual: ` + p3.attribValue
|
|
|
24219
24219
|
return;
|
|
24220
24220
|
}
|
|
24221
24221
|
}
|
|
24222
|
-
static updateDocumentVersion(e = this.convertedXml, t = "0.12.
|
|
24222
|
+
static updateDocumentVersion(e = this.convertedXml, t = "0.12.11") {
|
|
24223
24223
|
const n = "docProps/custom.xml";
|
|
24224
24224
|
e[n] || (e[n] = Nu$2());
|
|
24225
24225
|
const i3 = e["docProps/custom.xml"];
|
|
@@ -24543,7 +24543,7 @@ Actual: ` + p3.attribValue
|
|
|
24543
24543
|
function Nu$2() {
|
|
24544
24544
|
return Kf$2;
|
|
24545
24545
|
}
|
|
24546
|
-
function Iu$2(r22 = 2, e = "0.12.
|
|
24546
|
+
function Iu$2(r22 = 2, e = "0.12.11") {
|
|
24547
24547
|
return {
|
|
24548
24548
|
type: "element",
|
|
24549
24549
|
name: "property",
|
|
@@ -36904,15 +36904,15 @@ Actual: ` + p3.attribValue
|
|
|
36904
36904
|
}, r0$1 = (e) => ({ rawHtml: e }), o0$1 = (e) => ({ displayLabel: e }), i0$1 = (e) => ({ imageSrc: e }), s0$1 = (e) => ({ displayLabel: e }), a0$1 = (e, t) => ({ displayLabel: p0$1(e, t.input_format) }), l0$1 = (e) => (e.startsWith("http") || (e = `http://${e}`), { linkUrl: e }), c0$1 = (e) => ({ displayLabel: {
|
|
36905
36905
|
YES: "Yes",
|
|
36906
36906
|
NO: "No"
|
|
36907
|
-
}[e[0].toUpperCase()] }), d0$1 = ({
|
|
36908
|
-
const {
|
|
36909
|
-
return
|
|
36910
|
-
|
|
36911
|
-
}),
|
|
36912
|
-
const
|
|
36913
|
-
!
|
|
36907
|
+
}[e[0].toUpperCase()] }), d0$1 = ({ state: e, tr: t, annotationValues: n }) => {
|
|
36908
|
+
const { doc: r } = e, o = [];
|
|
36909
|
+
return r.descendants((i3, s) => {
|
|
36910
|
+
i3.type.name === "table" && o.push({ node: i3, pos: s });
|
|
36911
|
+
}), o.reverse().forEach(({ pos: i3 }) => {
|
|
36912
|
+
const s = t.doc.nodeAt(i3);
|
|
36913
|
+
!s || s.type.name !== "table" || u0$1({ tableNode: { node: s, pos: i3 }, annotationValues: n, tr: t, state: e });
|
|
36914
36914
|
}), t;
|
|
36915
|
-
}, u0$1 = ({ tableNode: e, annotationValues: t, tr: n,
|
|
36915
|
+
}, u0$1 = ({ tableNode: e, annotationValues: t, tr: n, state: r }) => {
|
|
36916
36916
|
let o = null, i3 = null;
|
|
36917
36917
|
const {
|
|
36918
36918
|
tableRow: s,
|
|
@@ -37636,7 +37636,7 @@ Actual: ` + p3.attribValue
|
|
|
37636
37636
|
* @returns {Object | void} Migration results
|
|
37637
37637
|
*/
|
|
37638
37638
|
processCollaborationMigrations() {
|
|
37639
|
-
if (console.debug("[checkVersionMigrations] Current editor version", "0.12.
|
|
37639
|
+
if (console.debug("[checkVersionMigrations] Current editor version", "0.12.11"), !this.options.ydoc) return;
|
|
37640
37640
|
let r = this.options.ydoc.getMap("meta").get("version");
|
|
37641
37641
|
r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
|
|
37642
37642
|
const o = wl$1(r) || [], s = this.state.plugins.find((c3) => c3.key.startsWith("y-sync"));
|
|
@@ -37711,7 +37711,7 @@ Actual: ` + p3.attribValue
|
|
|
37711
37711
|
annotate(n = [], r = []) {
|
|
37712
37712
|
const { state: o, view: i3, schema: s } = this;
|
|
37713
37713
|
let a = o.tr;
|
|
37714
|
-
a = to$2.processTables({
|
|
37714
|
+
a = to$2.processTables({ state: this.state, tr: a, annotationValues: n }), a = to$2.annotateDocument({
|
|
37715
37715
|
tr: a,
|
|
37716
37716
|
schema: s,
|
|
37717
37717
|
annotationValues: n,
|
|
@@ -37719,6 +37719,25 @@ Actual: ` + p3.attribValue
|
|
|
37719
37719
|
editor: this
|
|
37720
37720
|
}), a.docChanged && i3.dispatch(a.scrollIntoView());
|
|
37721
37721
|
}
|
|
37722
|
+
/**
|
|
37723
|
+
* Preview annotations in the editor. It stores a copy of the original state.
|
|
37724
|
+
* This can be reverted via closePreview()
|
|
37725
|
+
*
|
|
37726
|
+
* @param {Object[]} annotationValues
|
|
37727
|
+
* @param {string[]} hiddenIds
|
|
37728
|
+
* @returns {void}
|
|
37729
|
+
*/
|
|
37730
|
+
previewAnnotations(n = [], r = []) {
|
|
37731
|
+
this.originalState = this.view.state, this.annotate(n, r);
|
|
37732
|
+
}
|
|
37733
|
+
/**
|
|
37734
|
+
* If there is a preview active, this will revert the editor to the original state.
|
|
37735
|
+
*
|
|
37736
|
+
* @returns {void}
|
|
37737
|
+
*/
|
|
37738
|
+
closePreview() {
|
|
37739
|
+
this.originalState && this.view.updateState(this.originalState);
|
|
37740
|
+
}
|
|
37722
37741
|
};
|
|
37723
37742
|
rn$1 = /* @__PURE__ */ new WeakMap(), Es = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakSet(), /**
|
|
37724
37743
|
* Initialize the container element for the editor
|
|
@@ -72042,7 +72061,7 @@ ${style2}
|
|
|
72042
72061
|
this.config.colors = shuffleArray(this.config.colors);
|
|
72043
72062
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
72044
72063
|
this.colorIndex = 0;
|
|
72045
|
-
this.version = "0.12.
|
|
72064
|
+
this.version = "0.12.11";
|
|
72046
72065
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
72047
72066
|
this.superdocId = config.superdocId || v4();
|
|
72048
72067
|
this.colors = this.config.colors;
|