superdoc 0.34.6 → 0.34.7
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/{PdfViewer-BrSBsHiz.cjs → PdfViewer-C8xLNe_n.cjs} +1 -1
- package/dist/chunks/{PdfViewer-BrE01k0i.es.js → PdfViewer-WfRCZj-e.es.js} +1 -1
- package/dist/chunks/{index-DD7_Re-5-CzvmaphZ.es.js → index-BENzx4z6-DdFuGCwa.es.js} +1 -1
- package/dist/chunks/{index-DD7_Re-5-B48aEbZz.cjs → index-BENzx4z6-Ds8akndA.cjs} +1 -1
- package/dist/chunks/{index-GFozhkXc.cjs → index-CIQILa8l.cjs} +3 -3
- package/dist/chunks/{index-ZlsBnxiE.es.js → index-wZJgMVEg.es.js} +3 -3
- package/dist/chunks/{super-editor.es-DyBhGWdJ.es.js → super-editor.es-B21z_KOS.es.js} +53 -35
- package/dist/chunks/{super-editor.es-k87Y2gby.cjs → super-editor.es-BVJ4WHrZ.cjs} +53 -35
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-DW2wtoOn.js → converter-BItdKEMN.js} +6 -1
- package/dist/super-editor/chunks/{docx-zipper-Bo5xY0tG.js → docx-zipper-Brh1H7kE.js} +1 -1
- package/dist/super-editor/chunks/{editor-VFipfW_y.js → editor-BwXcd5wT.js} +49 -36
- package/dist/super-editor/chunks/{index-DD7_Re-5.js → index-BENzx4z6.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-B1x6Bp3N.js → toolbar-CiQKWEEf.js} +2 -2
- package/dist/super-editor/converter.es.js +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/src/core/super-converter/v3/handlers/w/r/r-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/collaboration/collaboration-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +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 +2 -2
- package/dist/superdoc.umd.js +55 -37
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
11
11
|
var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn;
|
|
12
|
-
import { aA as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, aE as getActiveFormatting, av as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, P as PluginKey, a as Plugin } from "./chunks/converter-
|
|
13
|
-
import { a5, i, a2 } from "./chunks/converter-
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as collectTargetListItemPositions, d as getFileOpener, e as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, f as uploadAndInsertImage, h as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, j as undoDepth, k as redoDepth, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as isHeadless, E as Editor, n as getStarterExtensions, P as Placeholder, o as getRichTextExtensions, D as DecorationSet, p as Decoration, M as Mark, q as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { w, C, x, T, t, z, v } from "./chunks/editor-
|
|
12
|
+
import { aA as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, aE as getActiveFormatting, av as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, P as PluginKey, a as Plugin } from "./chunks/converter-BItdKEMN.js";
|
|
13
|
+
import { a5, i, a2 } from "./chunks/converter-BItdKEMN.js";
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as collectTargetListItemPositions, d as getFileOpener, e as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, f as uploadAndInsertImage, h as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, j as undoDepth, k as redoDepth, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as isHeadless, E as Editor, n as getStarterExtensions, P as Placeholder, o as getRichTextExtensions, D as DecorationSet, p as Decoration, M as Mark, q as Extension, A as Attribute, N as Node } from "./chunks/editor-BwXcd5wT.js";
|
|
15
|
+
import { w, C, x, T, t, z, v } from "./chunks/editor-BwXcd5wT.js";
|
|
16
16
|
import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, defineComponent, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-CiQKWEEf.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-Brh1H7kE.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
package/dist/super-editor.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-BVJ4WHrZ.cjs");
|
|
4
4
|
require("./chunks/vue-Cwv-wUpm.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-
|
|
1
|
+
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-B21z_KOS.es.js";
|
|
2
2
|
import "./chunks/vue-CKmzTNVs.es.js";
|
|
3
3
|
export {
|
|
4
4
|
A as AIWriter,
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-BVJ4WHrZ.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-CIQILa8l.cjs");
|
|
5
5
|
const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
|
7
7
|
exports.Editor = superEditor_es.Editor;
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-
|
|
2
|
-
import { D, H, P, S as S2, m, l } from "./chunks/index-
|
|
1
|
+
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-B21z_KOS.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-wZJgMVEg.es.js";
|
|
3
3
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
4
4
|
export {
|
|
5
5
|
a as AnnotatorHelpers,
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -27046,6 +27046,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
27046
27046
|
runs2.push(trackedClone);
|
|
27047
27047
|
return;
|
|
27048
27048
|
}
|
|
27049
|
+
if (child.name === "w:commentRangeStart" || child.name === "w:commentRangeEnd") {
|
|
27050
|
+
const commentRangeClone = cloneXmlNode(child);
|
|
27051
|
+
runs2.push(commentRangeClone);
|
|
27052
|
+
return;
|
|
27053
|
+
}
|
|
27049
27054
|
const runWrapper = { name: XML_NODE_NAME$j, elements: [] };
|
|
27050
27055
|
applyBaseRunProps(runWrapper);
|
|
27051
27056
|
if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
|
|
@@ -35793,7 +35798,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35793
35798
|
static getStoredSuperdocVersion(docx) {
|
|
35794
35799
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
35795
35800
|
}
|
|
35796
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.34.
|
|
35801
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.34.7") {
|
|
35797
35802
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
35798
35803
|
}
|
|
35799
35804
|
/**
|
|
@@ -58361,39 +58366,52 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
58361
58366
|
return `${color2}${alpha}`;
|
|
58362
58367
|
};
|
|
58363
58368
|
const updateYdocDocxData = async (editor, ydoc) => {
|
|
58364
|
-
|
|
58365
|
-
|
|
58366
|
-
|
|
58367
|
-
|
|
58368
|
-
|
|
58369
|
-
|
|
58370
|
-
|
|
58371
|
-
|
|
58372
|
-
|
|
58373
|
-
|
|
58374
|
-
|
|
58375
|
-
|
|
58376
|
-
|
|
58377
|
-
|
|
58378
|
-
docx
|
|
58379
|
-
|
|
58380
|
-
|
|
58381
|
-
|
|
58382
|
-
|
|
58383
|
-
|
|
58384
|
-
|
|
58385
|
-
|
|
58386
|
-
|
|
58387
|
-
|
|
58388
|
-
|
|
58369
|
+
try {
|
|
58370
|
+
ydoc = ydoc || editor?.options?.ydoc;
|
|
58371
|
+
if (!ydoc) return;
|
|
58372
|
+
if (!editor || editor.isDestroyed) return;
|
|
58373
|
+
const metaMap = ydoc.getMap("meta");
|
|
58374
|
+
const docxValue = metaMap.get("docx");
|
|
58375
|
+
let docx = [];
|
|
58376
|
+
if (Array.isArray(docxValue)) {
|
|
58377
|
+
docx = [...docxValue];
|
|
58378
|
+
} else if (docxValue && typeof docxValue.toArray === "function") {
|
|
58379
|
+
docx = docxValue.toArray();
|
|
58380
|
+
} else if (docxValue && typeof docxValue[Symbol.iterator] === "function") {
|
|
58381
|
+
docx = Array.from(docxValue);
|
|
58382
|
+
}
|
|
58383
|
+
if (!docx.length && Array.isArray(editor.options.content)) {
|
|
58384
|
+
docx = [...editor.options.content];
|
|
58385
|
+
}
|
|
58386
|
+
const newXml = await editor.exportDocx({ getUpdatedDocs: true });
|
|
58387
|
+
if (!newXml || typeof newXml !== "object") return;
|
|
58388
|
+
let hasChanges = false;
|
|
58389
|
+
Object.keys(newXml).forEach((key2) => {
|
|
58390
|
+
const fileIndex = docx.findIndex((item) => item.name === key2);
|
|
58391
|
+
const existingContent = fileIndex > -1 ? docx[fileIndex].content : null;
|
|
58392
|
+
if (existingContent === newXml[key2]) {
|
|
58393
|
+
return;
|
|
58394
|
+
}
|
|
58395
|
+
hasChanges = true;
|
|
58396
|
+
if (fileIndex > -1) {
|
|
58397
|
+
docx.splice(fileIndex, 1);
|
|
58398
|
+
}
|
|
58399
|
+
docx.push({
|
|
58400
|
+
name: key2,
|
|
58401
|
+
content: newXml[key2]
|
|
58402
|
+
});
|
|
58389
58403
|
});
|
|
58390
|
-
|
|
58391
|
-
|
|
58392
|
-
|
|
58393
|
-
|
|
58394
|
-
|
|
58395
|
-
|
|
58396
|
-
|
|
58404
|
+
if (hasChanges || !docxValue) {
|
|
58405
|
+
ydoc.transact(
|
|
58406
|
+
() => {
|
|
58407
|
+
metaMap.set("docx", docx);
|
|
58408
|
+
},
|
|
58409
|
+
{ event: "docx-update", user: editor.options.user }
|
|
58410
|
+
);
|
|
58411
|
+
}
|
|
58412
|
+
} catch (error) {
|
|
58413
|
+
console.warn("[collaboration] Failed to update Ydoc docx data", error);
|
|
58414
|
+
}
|
|
58397
58415
|
};
|
|
58398
58416
|
const STYLE_ISOLATION_CLASS = "sd-editor-scoped";
|
|
58399
58417
|
const applyStyleIsolationClass = (target) => {
|
|
@@ -61830,7 +61848,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61830
61848
|
{ default: remarkStringify2 },
|
|
61831
61849
|
{ default: remarkGfm2 }
|
|
61832
61850
|
] = await Promise.all([
|
|
61833
|
-
Promise.resolve().then(() =>
|
|
61851
|
+
Promise.resolve().then(() => indexBENzx4z6),
|
|
61834
61852
|
Promise.resolve().then(() => indexDRCvimau),
|
|
61835
61853
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
61836
61854
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -62048,7 +62066,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
62048
62066
|
* @returns {Object | void} Migration results
|
|
62049
62067
|
*/
|
|
62050
62068
|
processCollaborationMigrations() {
|
|
62051
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.34.
|
|
62069
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.34.7");
|
|
62052
62070
|
if (!this.options.ydoc) return;
|
|
62053
62071
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
62054
62072
|
let docVersion = metaMap.get("version");
|
|
@@ -118517,7 +118535,7 @@ ${style2}
|
|
|
118517
118535
|
this.config.colors = shuffleArray(this.config.colors);
|
|
118518
118536
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
118519
118537
|
this.colorIndex = 0;
|
|
118520
|
-
this.version = "0.34.
|
|
118538
|
+
this.version = "0.34.7";
|
|
118521
118539
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
118522
118540
|
this.superdocId = config2.superdocId || v4();
|
|
118523
118541
|
this.colors = this.config.colors;
|
|
@@ -120917,7 +120935,7 @@ ${style2}
|
|
|
120917
120935
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
120918
120936
|
);
|
|
120919
120937
|
}
|
|
120920
|
-
const
|
|
120938
|
+
const indexBENzx4z6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
120921
120939
|
__proto__: null,
|
|
120922
120940
|
unified
|
|
120923
120941
|
}, Symbol.toStringTag, { value: "Module" }));
|