@harbour-enterprises/superdoc 0.6.47 → 0.6.48
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-BimqHKz4.js → super-editor.es-p63iZpv1.js} +23 -8
- package/dist/chunks/{super-editor.es-BimqHKz4.js.map → super-editor.es-p63iZpv1.js.map} +1 -1
- package/dist/super-editor/chunks/{converter-RUbkHvVA.js → converter-Da2eBI5z.js} +3 -3
- package/dist/super-editor/chunks/{converter-RUbkHvVA.js.map → converter-Da2eBI5z.js.map} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-BbeRnWFQ.js → docx-zipper-7Erxkj2M.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-BbeRnWFQ.js.map → docx-zipper-7Erxkj2M.js.map} +1 -1
- package/dist/super-editor/chunks/{editor-n0njCfa5.js → editor-CCtFqUDA.js} +23 -8
- package/dist/super-editor/chunks/{editor-n0njCfa5.js.map → editor-CCtFqUDA.js.map} +1 -1
- package/dist/super-editor/chunks/{toolbar-CMCaGLDm.js → toolbar-B-lxW404.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-CMCaGLDm.js.map → toolbar-B-lxW404.js.map} +1 -1
- 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.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +23 -8
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E } from "./chunks/editor-
|
|
2
|
-
import "./chunks/converter-
|
|
3
|
-
import "./chunks/docx-zipper-
|
|
1
|
+
import { E } from "./chunks/editor-CCtFqUDA.js";
|
|
2
|
+
import "./chunks/converter-Da2eBI5z.js";
|
|
3
|
+
import "./chunks/docx-zipper-7Erxkj2M.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -9,13 +9,13 @@ 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 _interceptedCommands, _SuperToolbar_instances, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
|
|
12
|
-
import { _ as _export_sfc, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, u as undoDepth, r as redoDepth, E as Editor, e as getStarterExtensions, P as Placeholder, h as getRichTextExtensions } from "./chunks/editor-
|
|
13
|
-
import { k, m, j, l } from "./chunks/editor-
|
|
14
|
-
import { L as getDefaultExportFromCjs, v as v4, T as TextSelection, Q as vClickOutside } from "./chunks/converter-
|
|
15
|
-
import { B } from "./chunks/converter-
|
|
12
|
+
import { _ as _export_sfc, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, u as undoDepth, r as redoDepth, E as Editor, e as getStarterExtensions, P as Placeholder, h as getRichTextExtensions } from "./chunks/editor-CCtFqUDA.js";
|
|
13
|
+
import { k, m, j, l } from "./chunks/editor-CCtFqUDA.js";
|
|
14
|
+
import { L as getDefaultExportFromCjs, v as v4, T as TextSelection, Q as vClickOutside } from "./chunks/converter-Da2eBI5z.js";
|
|
15
|
+
import { B } from "./chunks/converter-Da2eBI5z.js";
|
|
16
16
|
import { ref, createElementBlock, openBlock, createElementVNode, unref, getCurrentInstance, computed, watch, onMounted, createCommentVNode, withDirectives, withKeys, normalizeClass, withModifiers, vModelText, createTextVNode, toDisplayString, Fragment, renderList, normalizeStyle, createVNode, h, createApp, reactive, onUnmounted, shallowRef, onBeforeUnmount, createBlock } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-
|
|
18
|
-
import { D } from "./chunks/docx-zipper-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-B-lxW404.js";
|
|
18
|
+
import { D } from "./chunks/docx-zipper-7Erxkj2M.js";
|
|
19
19
|
import { createZip } from "./file-zipper.es.js";
|
|
20
20
|
var eventemitter3 = { exports: {} };
|
|
21
21
|
(function(module) {
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _, D, E, S, a, b, c, T, d, i, g, e, f, h, j, k, l } from "./chunks/super-editor.es-
|
|
1
|
+
import { _, D, E, S, a, b, c, T, d, i, g, e, f, h, j, k, l } from "./chunks/super-editor.es-p63iZpv1.js";
|
|
2
2
|
import "./chunks/vue-CUQGd1xF.js";
|
|
3
3
|
export {
|
|
4
4
|
_ as BasicUpload,
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as Editor, h as getRichTextExtensions, b as SuperInput, a as SuperEditor, c as SuperToolbar, d as createZip } from "./chunks/super-editor.es-
|
|
2
|
-
import { S, i, k, l } from "./chunks/super-editor.es-
|
|
1
|
+
import { E as Editor, h as getRichTextExtensions, b as SuperInput, a as SuperEditor, c as SuperToolbar, d as createZip } from "./chunks/super-editor.es-p63iZpv1.js";
|
|
2
|
+
import { S, i, k, l } from "./chunks/super-editor.es-p63iZpv1.js";
|
|
3
3
|
import { Y as effectScope, r as ref, Z as markRaw, p as process$1, _ as toRaw, a as computed, $ as isRef, a0 as isReactive, B as toRef, i as inject, l as getCurrentInstance, j as watch, v as unref, a1 as hasInjectionContext, L as reactive, R as nextTick, a2 as getCurrentScope, a3 as onScopeDispose, a4 as toRefs, g as global$1, N as shallowRef, M as readonly, f as onMounted, h as onBeforeUnmount, e as onBeforeMount, U as onActivated, m as onDeactivated, y as createTextVNode, F as Fragment, Q as Comment, k as defineComponent, C as provide, G as withDirectives, A as h, V as Teleport, S as renderSlot, W as isVNode, K as watchEffect, O as Transition, D as mergeProps, P as vShow, J as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, u as createVNode, x as withCtx, E as createBaseVNode, z as normalizeStyle, s as createCommentVNode, q as createBlock, w as withModifiers, n as normalizeClass, a5 as resolveDirective, d as renderList, c as createApp, a6 as resolveDynamicComponent } from "./chunks/vue-CUQGd1xF.js";
|
|
4
4
|
import { B as Buffer$2 } from "./chunks/jszip-DlHbx6j5.js";
|
|
5
5
|
import { b } from "./chunks/blank-docx-BagxM198.js";
|
|
@@ -45541,7 +45541,7 @@ class SuperDoc extends EventEmitter {
|
|
|
45541
45541
|
this.config.colors = shuffleArray(this.config.colors);
|
|
45542
45542
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45543
45543
|
this.colorIndex = 0;
|
|
45544
|
-
this.version = "0.6.
|
|
45544
|
+
this.version = "0.6.48";
|
|
45545
45545
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45546
45546
|
this.superdocId = config.superdocId || v4();
|
|
45547
45547
|
this.colors = this.config.colors;
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -27907,7 +27907,7 @@
|
|
|
27907
27907
|
return;
|
|
27908
27908
|
}
|
|
27909
27909
|
}
|
|
27910
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.
|
|
27910
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.48") {
|
|
27911
27911
|
const customLocation = "docProps/custom.xml";
|
|
27912
27912
|
if (!docx[customLocation]) {
|
|
27913
27913
|
docx[customLocation] = generateCustomXml();
|
|
@@ -28165,7 +28165,7 @@
|
|
|
28165
28165
|
function generateCustomXml() {
|
|
28166
28166
|
return DEFAULT_CUSTOM_XML;
|
|
28167
28167
|
}
|
|
28168
|
-
function generateSuperdocVersion(version2 = "0.6.
|
|
28168
|
+
function generateSuperdocVersion(version2 = "0.6.48") {
|
|
28169
28169
|
return {
|
|
28170
28170
|
type: "element",
|
|
28171
28171
|
name: "property",
|
|
@@ -42189,7 +42189,7 @@
|
|
|
42189
42189
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
42190
42190
|
*/
|
|
42191
42191
|
processCollaborationMigrations() {
|
|
42192
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.6.
|
|
42192
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.6.48");
|
|
42193
42193
|
if (!this.options.ydoc) return;
|
|
42194
42194
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
42195
42195
|
let docVersion = metaMap.get("version");
|
|
@@ -49596,8 +49596,8 @@
|
|
|
49596
49596
|
return commands2.acceptTrackedChangesBetween(from2, to);
|
|
49597
49597
|
},
|
|
49598
49598
|
acceptTrackedChangeById: (id) => ({ state: state2, tr, commands: commands2 }) => {
|
|
49599
|
-
const
|
|
49600
|
-
return
|
|
49599
|
+
const toResolve = getChangesByIdToResolve(state2, id);
|
|
49600
|
+
return toResolve.map(({ from: from2, to }) => {
|
|
49601
49601
|
let mappedFrom = tr.mapping.map(from2);
|
|
49602
49602
|
let mappedTo = tr.mapping.map(to);
|
|
49603
49603
|
return commands2.acceptTrackedChangesBetween(mappedFrom, mappedTo);
|
|
@@ -49608,8 +49608,8 @@
|
|
|
49608
49608
|
return commands2.acceptTrackedChangesBetween(from2, to);
|
|
49609
49609
|
},
|
|
49610
49610
|
rejectTrackedChangeById: (id) => ({ state: state2, tr, commands: commands2 }) => {
|
|
49611
|
-
const
|
|
49612
|
-
return
|
|
49611
|
+
const toReject = getChangesByIdToResolve(state2, id);
|
|
49612
|
+
return toReject.map(({ from: from2, to }) => {
|
|
49613
49613
|
let mappedFrom = tr.mapping.map(from2);
|
|
49614
49614
|
let mappedTo = tr.mapping.map(to);
|
|
49615
49615
|
return commands2.rejectTrackedChangesBetween(mappedFrom, mappedTo);
|
|
@@ -49695,6 +49695,21 @@
|
|
|
49695
49695
|
return [TrackChangesBasePlugin()];
|
|
49696
49696
|
}
|
|
49697
49697
|
});
|
|
49698
|
+
const getChangesByIdToResolve = (state2, id) => {
|
|
49699
|
+
const trackedChanges = getTrackChanges(state2);
|
|
49700
|
+
const changeIndex = trackedChanges.findIndex(({ mark }) => mark.attrs.id === id);
|
|
49701
|
+
if (changeIndex === -1) return;
|
|
49702
|
+
const matchingChange = trackedChanges[changeIndex];
|
|
49703
|
+
const prev = trackedChanges[changeIndex - 1];
|
|
49704
|
+
const next = trackedChanges[changeIndex + 1];
|
|
49705
|
+
let linkedChange;
|
|
49706
|
+
if (prev && matchingChange.start === prev.end) {
|
|
49707
|
+
linkedChange = prev;
|
|
49708
|
+
} else if (next && matchingChange.end === next.start) {
|
|
49709
|
+
linkedChange = next;
|
|
49710
|
+
}
|
|
49711
|
+
return [matchingChange, linkedChange].filter(Boolean);
|
|
49712
|
+
};
|
|
49698
49713
|
const Placeholder = Extension.create({
|
|
49699
49714
|
name: "placeholder",
|
|
49700
49715
|
addOptions() {
|
|
@@ -110148,7 +110163,7 @@ ${style2}
|
|
|
110148
110163
|
this.config.colors = shuffleArray(this.config.colors);
|
|
110149
110164
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
110150
110165
|
this.colorIndex = 0;
|
|
110151
|
-
this.version = "0.6.
|
|
110166
|
+
this.version = "0.6.48";
|
|
110152
110167
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
110153
110168
|
this.superdocId = config.superdocId || v4();
|
|
110154
110169
|
this.colors = this.config.colors;
|