@harbour-enterprises/superdoc 0.29.0-next.15 → 0.29.0-next.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.
- package/dist/chunks/{PdfViewer-B7X4xur3.cjs → PdfViewer-DYxoL3aX.cjs} +1 -1
- package/dist/chunks/{PdfViewer-BL9hLN-A.es.js → PdfViewer-cB0Wc125.es.js} +1 -1
- package/dist/chunks/{index-CCTDIDk7.es.js → index-BkH3Ewpn.es.js} +3 -3
- package/dist/chunks/{index-x0B8ORNX--SLHZ7wS.es.js → index-CdXg92JS-CoYVY9yT.es.js} +1 -1
- package/dist/chunks/{index-x0B8ORNX-D9kjqjf9.cjs → index-CdXg92JS-rI1se8w8.cjs} +1 -1
- package/dist/chunks/{index-CCVmXx2r.cjs → index-Cp4ihfTg.cjs} +3 -3
- package/dist/chunks/{super-editor.es-LUVoGFZl.es.js → super-editor.es-DbVz9iFq.es.js} +68 -36
- package/dist/chunks/{super-editor.es-BkV-6f5K.cjs → super-editor.es-GK0HIFwy.cjs} +68 -36
- 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/style.css +12 -12
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-Bt0gPwYj.js → converter-BxHd90vg.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-JVCnlDBn.js → docx-zipper-DRDqDf4t.js} +1 -1
- package/dist/super-editor/chunks/{editor-BF7w_sd7.js → editor-BN_AUZwq.js} +65 -38
- package/dist/super-editor/chunks/{index-x0B8ORNX.js → index-CdXg92JS.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-CI9lB3KI.js → toolbar-CeJfRy_U.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/style.css +12 -12
- package/dist/super-editor/super-editor/src/components/pagination-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/components/toolbar/defaultItems.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/components/toolbar/super-toolbar.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/field-annotation/field-annotation.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/page-number/page-number.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/pagination/pagination-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/pagination/pagination.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/src/utils/headless-helpers.d.ts +1 -0
- package/dist/super-editor/super-editor/src/utils/headless-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor.es.js +24 -18
- 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 +70 -38
- 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, E as Editor,
|
|
15
|
-
import {
|
|
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-BxHd90vg.js";
|
|
13
|
+
import { a5, i, a2 } from "./chunks/converter-BxHd90vg.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-BN_AUZwq.js";
|
|
15
|
+
import { w, C, x, T, t, z, v } from "./chunks/editor-BN_AUZwq.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-CeJfRy_U.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-DRDqDf4t.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
|
@@ -495,7 +495,7 @@ const _hoisted_1$b = {
|
|
|
495
495
|
key: 0,
|
|
496
496
|
class: "linked-style-buttons"
|
|
497
497
|
};
|
|
498
|
-
const _hoisted_2$8 = ["onClick", "onKeydown"];
|
|
498
|
+
const _hoisted_2$8 = ["onClick", "onKeydown", "aria-label"];
|
|
499
499
|
const _sfc_main$c = {
|
|
500
500
|
__name: "LinkedStyle",
|
|
501
501
|
props: {
|
|
@@ -540,7 +540,6 @@ const _sfc_main$c = {
|
|
|
540
540
|
moveToPreviousStyle(index);
|
|
541
541
|
break;
|
|
542
542
|
case "Enter":
|
|
543
|
-
console.log("style", style);
|
|
544
543
|
select(style);
|
|
545
544
|
break;
|
|
546
545
|
}
|
|
@@ -556,6 +555,7 @@ const _sfc_main$c = {
|
|
|
556
555
|
class: normalizeClass(["style-item", { selected: __props.selectedOption === style.id }]),
|
|
557
556
|
onClick: ($event) => select(style),
|
|
558
557
|
onKeydown: (event) => handleKeyDown(event, index, style),
|
|
558
|
+
"aria-label": `Linked style - ${style.id}`,
|
|
559
559
|
ref_for: true,
|
|
560
560
|
ref_key: "styleRefs",
|
|
561
561
|
ref: styleRefs
|
|
@@ -571,7 +571,7 @@ const _sfc_main$c = {
|
|
|
571
571
|
};
|
|
572
572
|
}
|
|
573
573
|
};
|
|
574
|
-
const LinkedStyle = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
574
|
+
const LinkedStyle = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-9c96d4a1"]]);
|
|
575
575
|
const _hoisted_1$a = {
|
|
576
576
|
key: 0,
|
|
577
577
|
class: "link-title"
|
|
@@ -2291,11 +2291,15 @@ const makeDefaultItems = ({
|
|
|
2291
2291
|
}
|
|
2292
2292
|
}
|
|
2293
2293
|
],
|
|
2294
|
-
onActivate: () => {
|
|
2294
|
+
onActivate: ({ linkedStyleMark }) => {
|
|
2295
|
+
const styles = getQuickFormatList(superToolbar.activeEditor);
|
|
2296
|
+
const selectedStyle = styles?.find((style) => style.id === linkedStyleMark?.attrs?.styleId);
|
|
2297
|
+
linkedStyles.label.value = selectedStyle ? selectedStyle.definition.attrs.name : toolbarTexts2.formatText;
|
|
2295
2298
|
linkedStyles.disabled.value = false;
|
|
2296
2299
|
},
|
|
2297
2300
|
onDeactivate: () => {
|
|
2298
2301
|
linkedStyles.disabled.value = true;
|
|
2302
|
+
linkedStyles.label.value = toolbarTexts2.formatText;
|
|
2299
2303
|
}
|
|
2300
2304
|
});
|
|
2301
2305
|
const renderIcon = (value, selectedValue) => {
|
|
@@ -3013,10 +3017,11 @@ class SuperToolbar extends EventEmitter {
|
|
|
3013
3017
|
item.setDisabled(!canRejectTrackedChanges);
|
|
3014
3018
|
}
|
|
3015
3019
|
if (item.name.value === "linkedStyles") {
|
|
3020
|
+
const linkedStyleMark = marks.find((mark) => mark.name === "styleId");
|
|
3016
3021
|
if (this.activeEditor && !getQuickFormatList(this.activeEditor).length) {
|
|
3017
3022
|
return item.deactivate();
|
|
3018
3023
|
} else {
|
|
3019
|
-
return item.activate();
|
|
3024
|
+
return item.activate({ linkedStyleMark });
|
|
3020
3025
|
}
|
|
3021
3026
|
}
|
|
3022
3027
|
const rawActiveMark = marks.find((mark) => mark.name === item.name.value);
|
|
@@ -4427,7 +4432,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4427
4432
|
}
|
|
4428
4433
|
});
|
|
4429
4434
|
function adjustPaginationBreaks(editorElem, editor) {
|
|
4430
|
-
if (!editorElem.value || !editor?.value?.options?.scale) return;
|
|
4435
|
+
if (!editorElem.value || !editor?.value?.options?.scale || isHeadless(editor)) return;
|
|
4431
4436
|
const zoom = editor.value.options.scale;
|
|
4432
4437
|
const bounds = editorElem.value.getBoundingClientRect();
|
|
4433
4438
|
const breakNodes = editorElem.value.querySelectorAll(".pagination-break-wrapper");
|
|
@@ -4861,6 +4866,7 @@ const _sfc_main$1 = {
|
|
|
4861
4866
|
...props.options
|
|
4862
4867
|
});
|
|
4863
4868
|
editor.value.on("paginationUpdate", () => {
|
|
4869
|
+
if (isHeadless(editor.value)) return;
|
|
4864
4870
|
adjustPaginationBreaks(editorElem, editor);
|
|
4865
4871
|
});
|
|
4866
4872
|
editor.value.on("collaborationReady", () => {
|
|
@@ -5019,7 +5025,7 @@ const _sfc_main$1 = {
|
|
|
5019
5025
|
};
|
|
5020
5026
|
}
|
|
5021
5027
|
};
|
|
5022
|
-
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
5028
|
+
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-cd3558fe"]]);
|
|
5023
5029
|
const _hoisted_1 = ["innerHTML"];
|
|
5024
5030
|
const _sfc_main = {
|
|
5025
5031
|
__name: "SuperInput",
|
|
@@ -5215,13 +5221,13 @@ const Extensions = {
|
|
|
5215
5221
|
};
|
|
5216
5222
|
export {
|
|
5217
5223
|
AIWriter,
|
|
5218
|
-
|
|
5224
|
+
w as AnnotatorHelpers,
|
|
5219
5225
|
_sfc_main$4 as BasicUpload,
|
|
5220
5226
|
C as CommentsPluginKey,
|
|
5221
5227
|
D as DocxZipper,
|
|
5222
5228
|
Editor,
|
|
5223
5229
|
Extensions,
|
|
5224
|
-
|
|
5230
|
+
x as SectionHelpers,
|
|
5225
5231
|
_sfc_main$5 as SlashMenu,
|
|
5226
5232
|
a5 as SuperConverter,
|
|
5227
5233
|
SuperEditor,
|
|
@@ -5230,13 +5236,13 @@ export {
|
|
|
5230
5236
|
Toolbar,
|
|
5231
5237
|
T as TrackChangesBasePluginKey,
|
|
5232
5238
|
createZip,
|
|
5233
|
-
|
|
5239
|
+
t as fieldAnnotationHelpers,
|
|
5234
5240
|
getActiveFormatting,
|
|
5235
|
-
|
|
5241
|
+
z as getAllowedImageDimensions,
|
|
5236
5242
|
i as getMarksFromSelection,
|
|
5237
5243
|
getRichTextExtensions,
|
|
5238
5244
|
getStarterExtensions,
|
|
5239
5245
|
a2 as helpers,
|
|
5240
5246
|
registeredHandlers,
|
|
5241
|
-
|
|
5247
|
+
v as trackChangesHelpers
|
|
5242
5248
|
};
|
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-GK0HIFwy.cjs");
|
|
4
4
|
require("./chunks/vue-BQxRC6G7.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-DbVz9iFq.es.js";
|
|
2
2
|
import "./chunks/vue-D1vcEBAQ.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-GK0HIFwy.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-Cp4ihfTg.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-DbVz9iFq.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-BkH3Ewpn.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
|
@@ -35782,7 +35782,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35782
35782
|
static getStoredSuperdocVersion(docx) {
|
|
35783
35783
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
35784
35784
|
}
|
|
35785
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.29.0-next.
|
|
35785
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.29.0-next.17") {
|
|
35786
35786
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
35787
35787
|
}
|
|
35788
35788
|
/**
|
|
@@ -38904,14 +38904,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
38904
38904
|
const zip = await this.zip.loadAsync(file);
|
|
38905
38905
|
return zip;
|
|
38906
38906
|
}
|
|
38907
|
-
async updateZip({ docx, updatedDocs, originalDocxFile, media: media2, fonts, isHeadless }) {
|
|
38907
|
+
async updateZip({ docx, updatedDocs, originalDocxFile, media: media2, fonts, isHeadless: isHeadless2 }) {
|
|
38908
38908
|
let zip;
|
|
38909
38909
|
if (originalDocxFile) {
|
|
38910
38910
|
zip = await this.exportFromOriginalFile(originalDocxFile, updatedDocs, media2);
|
|
38911
38911
|
} else {
|
|
38912
38912
|
zip = await this.exportFromCollaborativeDocx(docx, updatedDocs, media2, fonts);
|
|
38913
38913
|
}
|
|
38914
|
-
const exportType =
|
|
38914
|
+
const exportType = isHeadless2 ? "nodebuffer" : "blob";
|
|
38915
38915
|
return await zip.generateAsync({ type: exportType });
|
|
38916
38916
|
}
|
|
38917
38917
|
/**
|
|
@@ -58388,9 +58388,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
58388
58388
|
if (!target || !target.classList) return;
|
|
58389
58389
|
target.classList.add(STYLE_ISOLATION_CLASS);
|
|
58390
58390
|
};
|
|
58391
|
+
const isHeadless = (editor) => {
|
|
58392
|
+
return editor?.options?.isHeadless ?? false;
|
|
58393
|
+
};
|
|
58394
|
+
const shouldSkipNodeView = (editor) => {
|
|
58395
|
+
return isHeadless(editor);
|
|
58396
|
+
};
|
|
58391
58397
|
const PaginationPluginKey = new PluginKey("paginationPlugin");
|
|
58392
58398
|
const initPaginationData = async (editor) => {
|
|
58393
|
-
if (!editor.converter) return;
|
|
58399
|
+
if (isHeadless(editor) || !editor.converter) return;
|
|
58394
58400
|
const sectionData = { headers: {}, footers: {} };
|
|
58395
58401
|
const headerIds = editor.converter.headerIds.ids;
|
|
58396
58402
|
const footerIds = editor.converter.footerIds.ids;
|
|
@@ -58526,6 +58532,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
58526
58532
|
});
|
|
58527
58533
|
};
|
|
58528
58534
|
const toggleHeaderFooterEditMode = ({ editor, focusedSectionEditor, isEditMode, documentMode }) => {
|
|
58535
|
+
if (isHeadless(editor)) return;
|
|
58529
58536
|
editor.converter.headerEditors.forEach((item) => {
|
|
58530
58537
|
item.editor.setEditable(isEditMode, false);
|
|
58531
58538
|
item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
|
|
@@ -61595,10 +61602,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61595
61602
|
};
|
|
61596
61603
|
if ("orientation" in screen && "addEventListener" in screen.orientation) {
|
|
61597
61604
|
screen.orientation.addEventListener("change", handleResize);
|
|
61598
|
-
} else {
|
|
61605
|
+
} else if (typeof window !== "undefined" && typeof window.matchMedia === "function") {
|
|
61599
61606
|
window.matchMedia("(orientation: portrait)").addEventListener("change", handleResize);
|
|
61600
61607
|
}
|
|
61601
|
-
window.addEventListener
|
|
61608
|
+
if (typeof window !== "undefined" && typeof window.addEventListener === "function") {
|
|
61609
|
+
window.addEventListener("resize", () => handleResize);
|
|
61610
|
+
}
|
|
61602
61611
|
}
|
|
61603
61612
|
/**
|
|
61604
61613
|
* Get document identifier for telemetry (async - may generate hash)
|
|
@@ -61712,7 +61721,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61712
61721
|
{ default: remarkStringify2 },
|
|
61713
61722
|
{ default: remarkGfm2 }
|
|
61714
61723
|
] = await Promise.all([
|
|
61715
|
-
Promise.resolve().then(() =>
|
|
61724
|
+
Promise.resolve().then(() => indexCdXg92JS),
|
|
61716
61725
|
Promise.resolve().then(() => indexDRCvimau),
|
|
61717
61726
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
61718
61727
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -61764,7 +61773,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61764
61773
|
this.initDefaultStyles();
|
|
61765
61774
|
hasMadeUpdate = true;
|
|
61766
61775
|
}
|
|
61767
|
-
if (hasMadeUpdate) {
|
|
61776
|
+
if (hasMadeUpdate && !isHeadless(this)) {
|
|
61768
61777
|
const newTr = this.view.state.tr;
|
|
61769
61778
|
newTr.setMeta("forceUpdatePagination", true);
|
|
61770
61779
|
this.view.dispatch(newTr);
|
|
@@ -61930,7 +61939,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61930
61939
|
* @returns {Object | void} Migration results
|
|
61931
61940
|
*/
|
|
61932
61941
|
processCollaborationMigrations() {
|
|
61933
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.29.0-next.
|
|
61942
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.29.0-next.17");
|
|
61934
61943
|
if (!this.options.ydoc) return;
|
|
61935
61944
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
61936
61945
|
let docVersion = metaMap.get("version");
|
|
@@ -62364,16 +62373,18 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
62364
62373
|
handleClick: __privateMethod$1(this, _Editor_instances, handleNodeSelection_fn).bind(this),
|
|
62365
62374
|
handleDoubleClick: async (view, pos, event) => {
|
|
62366
62375
|
if (this.options.documentMode !== "editing") return;
|
|
62367
|
-
|
|
62368
|
-
|
|
62369
|
-
|
|
62370
|
-
|
|
62371
|
-
|
|
62372
|
-
|
|
62373
|
-
|
|
62376
|
+
if (!isHeadless(this)) {
|
|
62377
|
+
const isHeader = hasSomeParentWithClass(event.target, "pagination-section-header");
|
|
62378
|
+
const isFooter = hasSomeParentWithClass(event.target, "pagination-section-footer");
|
|
62379
|
+
if (isHeader || isFooter) {
|
|
62380
|
+
const eventClone = new event.constructor(event.type);
|
|
62381
|
+
event.target.dispatchEvent(eventClone);
|
|
62382
|
+
if (this.options.isHeaderOrFooter && this.options.editable) setWordSelection(view, pos);
|
|
62383
|
+
return;
|
|
62384
|
+
}
|
|
62374
62385
|
}
|
|
62375
62386
|
event.stopPropagation();
|
|
62376
|
-
if (!this.options.editable) {
|
|
62387
|
+
if (!this.options.editable && !isHeadless(this)) {
|
|
62377
62388
|
this.setEditable(true, false);
|
|
62378
62389
|
toggleHeaderFooterEditMode({
|
|
62379
62390
|
editor: this,
|
|
@@ -67009,9 +67020,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
67009
67020
|
}
|
|
67010
67021
|
});
|
|
67011
67022
|
}
|
|
67012
|
-
const shouldSkipNodeView = (editor) => {
|
|
67013
|
-
return editor.options.isHeadless;
|
|
67014
|
-
};
|
|
67015
67023
|
const ListItem = Node$1.create({
|
|
67016
67024
|
name: "listItem",
|
|
67017
67025
|
content: "paragraph* block*",
|
|
@@ -72983,7 +72991,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
72983
72991
|
}
|
|
72984
72992
|
if (dispatch) {
|
|
72985
72993
|
commands2.updateFieldAnnotationsAttributes([annotation], attrs);
|
|
72986
|
-
if (this.editor.options.pagination) {
|
|
72994
|
+
if (this.editor.options.pagination && !isHeadless(this.editor)) {
|
|
72987
72995
|
setTimeout(() => {
|
|
72988
72996
|
const newTr = this.editor.view.state.tr;
|
|
72989
72997
|
newTr.setMeta("forceUpdatePagination", true);
|
|
@@ -74920,7 +74928,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
74920
74928
|
const pageNumberNode = schema.nodeFromJSON(pageNumberNodeJSON);
|
|
74921
74929
|
if (dispatch) {
|
|
74922
74930
|
tr.replaceSelectionWith(pageNumberNode, false);
|
|
74923
|
-
|
|
74931
|
+
if (!isHeadless(editor)) {
|
|
74932
|
+
tr.setMeta("forceUpdatePagination", true);
|
|
74933
|
+
}
|
|
74924
74934
|
}
|
|
74925
74935
|
return true;
|
|
74926
74936
|
}
|
|
@@ -83587,6 +83597,10 @@ ${l}
|
|
|
83587
83597
|
};
|
|
83588
83598
|
},
|
|
83589
83599
|
addCommands() {
|
|
83600
|
+
const editor = this.editor;
|
|
83601
|
+
if (isHeadless(editor)) {
|
|
83602
|
+
return {};
|
|
83603
|
+
}
|
|
83590
83604
|
return {
|
|
83591
83605
|
insertPageBreak: () => ({ commands: commands2 }) => {
|
|
83592
83606
|
return commands2.insertContent({
|
|
@@ -83597,20 +83611,26 @@ ${l}
|
|
|
83597
83611
|
* Toggle pagination on/off
|
|
83598
83612
|
* @returns {void}
|
|
83599
83613
|
*/
|
|
83600
|
-
togglePagination: () => ({ tr, state: state2, dispatch, editor }) => {
|
|
83614
|
+
togglePagination: () => ({ tr, state: state2, dispatch, editor: editor2 }) => {
|
|
83601
83615
|
const isEnabled = PaginationPluginKey.getState(state2)?.isEnabled;
|
|
83602
83616
|
tr.setMeta(PaginationPluginKey, { isEnabled: !isEnabled });
|
|
83603
83617
|
if (dispatch) {
|
|
83604
83618
|
dispatch(tr);
|
|
83605
|
-
|
|
83619
|
+
editor2.initDefaultStyles(editor2.element, !isEnabled);
|
|
83606
83620
|
return true;
|
|
83607
83621
|
}
|
|
83608
83622
|
}
|
|
83609
83623
|
};
|
|
83610
83624
|
},
|
|
83611
83625
|
addShortcuts() {
|
|
83626
|
+
const editor = this.editor;
|
|
83627
|
+
if (isHeadless(editor)) {
|
|
83628
|
+
return {};
|
|
83629
|
+
}
|
|
83612
83630
|
return {
|
|
83613
|
-
"Mod-Enter": () =>
|
|
83631
|
+
"Mod-Enter": () => {
|
|
83632
|
+
return editor.commands.insertPageBreak();
|
|
83633
|
+
}
|
|
83614
83634
|
};
|
|
83615
83635
|
},
|
|
83616
83636
|
/**
|
|
@@ -83618,6 +83638,9 @@ ${l}
|
|
|
83618
83638
|
*/
|
|
83619
83639
|
addPmPlugins() {
|
|
83620
83640
|
const editor = this.editor;
|
|
83641
|
+
if (isHeadless(editor)) {
|
|
83642
|
+
return [];
|
|
83643
|
+
}
|
|
83621
83644
|
let isUpdating = false;
|
|
83622
83645
|
let shouldUpdate = false;
|
|
83623
83646
|
let hasInitialized = false;
|
|
@@ -83633,7 +83656,7 @@ ${l}
|
|
|
83633
83656
|
isReadyToInit: false,
|
|
83634
83657
|
decorations: DecorationSet.empty,
|
|
83635
83658
|
isDebugging,
|
|
83636
|
-
isEnabled: editor.options.pagination
|
|
83659
|
+
isEnabled: editor.options.pagination && !isHeadless(editor)
|
|
83637
83660
|
};
|
|
83638
83661
|
},
|
|
83639
83662
|
apply(tr, oldState, prevEditorState, newEditorState) {
|
|
@@ -83711,6 +83734,7 @@ ${l}
|
|
|
83711
83734
|
let previousDecorations = DecorationSet.empty;
|
|
83712
83735
|
return {
|
|
83713
83736
|
update: (view) => {
|
|
83737
|
+
if (isHeadless(editor)) return;
|
|
83714
83738
|
if (!PaginationPluginKey.getState(view.state)?.isEnabled) return;
|
|
83715
83739
|
if (!shouldUpdate || isUpdating) return;
|
|
83716
83740
|
const performPaginationUpdate = () => {
|
|
@@ -83734,6 +83758,7 @@ ${l}
|
|
|
83734
83758
|
},
|
|
83735
83759
|
props: {
|
|
83736
83760
|
decorations(state2) {
|
|
83761
|
+
if (isHeadless(editor)) return DecorationSet.empty;
|
|
83737
83762
|
const pluginState = PaginationPluginKey.getState(state2);
|
|
83738
83763
|
return pluginState.isEnabled ? pluginState.decorations : DecorationSet.empty;
|
|
83739
83764
|
}
|
|
@@ -84102,7 +84127,7 @@ ${l}
|
|
|
84102
84127
|
return void 0;
|
|
84103
84128
|
};
|
|
84104
84129
|
const onHeaderFooterDblClick = (editor, currentFocusedSectionEditor) => {
|
|
84105
|
-
if (editor.options.documentMode !== "editing") return;
|
|
84130
|
+
if (isHeadless(editor) || editor.options.documentMode !== "editing") return;
|
|
84106
84131
|
editor.setEditable(false, false);
|
|
84107
84132
|
toggleHeaderFooterEditMode({
|
|
84108
84133
|
editor,
|
|
@@ -84174,6 +84199,7 @@ ${l}
|
|
|
84174
84199
|
return actualBreak;
|
|
84175
84200
|
}
|
|
84176
84201
|
const onImageLoad = (editor) => {
|
|
84202
|
+
if (isHeadless(editor)) return;
|
|
84177
84203
|
if (typeof requestAnimationFrame !== "function") return;
|
|
84178
84204
|
requestAnimationFrame(() => {
|
|
84179
84205
|
const newTr = editor.view.state.tr;
|
|
@@ -85013,9 +85039,9 @@ ${l}
|
|
|
85013
85039
|
return {};
|
|
85014
85040
|
},
|
|
85015
85041
|
addPmPlugins() {
|
|
85016
|
-
const
|
|
85042
|
+
const isHeadless2 = this.editor.options.isHeadless;
|
|
85017
85043
|
const hasDocument = typeof document !== "undefined";
|
|
85018
|
-
if (
|
|
85044
|
+
if (isHeadless2 || !hasDocument) return [];
|
|
85019
85045
|
return [nodeResizer(["image"], this.editor)];
|
|
85020
85046
|
}
|
|
85021
85047
|
});
|
|
@@ -96308,7 +96334,7 @@ ${style2}
|
|
|
96308
96334
|
key: 0,
|
|
96309
96335
|
class: "linked-style-buttons"
|
|
96310
96336
|
};
|
|
96311
|
-
const _hoisted_2$8$1 = ["onClick", "onKeydown"];
|
|
96337
|
+
const _hoisted_2$8$1 = ["onClick", "onKeydown", "aria-label"];
|
|
96312
96338
|
const _sfc_main$c$1 = {
|
|
96313
96339
|
__name: "LinkedStyle",
|
|
96314
96340
|
props: {
|
|
@@ -96353,7 +96379,6 @@ ${style2}
|
|
|
96353
96379
|
moveToPreviousStyle(index2);
|
|
96354
96380
|
break;
|
|
96355
96381
|
case "Enter":
|
|
96356
|
-
console.log("style", style2);
|
|
96357
96382
|
select2(style2);
|
|
96358
96383
|
break;
|
|
96359
96384
|
}
|
|
@@ -96369,6 +96394,7 @@ ${style2}
|
|
|
96369
96394
|
class: normalizeClass(["style-item", { selected: __props.selectedOption === style2.id }]),
|
|
96370
96395
|
onClick: ($event) => select2(style2),
|
|
96371
96396
|
onKeydown: (event) => handleKeyDown2(event, index2, style2),
|
|
96397
|
+
"aria-label": `Linked style - ${style2.id}`,
|
|
96372
96398
|
ref_for: true,
|
|
96373
96399
|
ref_key: "styleRefs",
|
|
96374
96400
|
ref: styleRefs
|
|
@@ -96384,7 +96410,7 @@ ${style2}
|
|
|
96384
96410
|
};
|
|
96385
96411
|
}
|
|
96386
96412
|
};
|
|
96387
|
-
const LinkedStyle = /* @__PURE__ */ _export_sfc$1(_sfc_main$c$1, [["__scopeId", "data-v-
|
|
96413
|
+
const LinkedStyle = /* @__PURE__ */ _export_sfc$1(_sfc_main$c$1, [["__scopeId", "data-v-9c96d4a1"]]);
|
|
96388
96414
|
const _hoisted_1$a$1 = {
|
|
96389
96415
|
key: 0,
|
|
96390
96416
|
class: "link-title"
|
|
@@ -98104,11 +98130,15 @@ ${style2}
|
|
|
98104
98130
|
}
|
|
98105
98131
|
}
|
|
98106
98132
|
],
|
|
98107
|
-
onActivate: () => {
|
|
98133
|
+
onActivate: ({ linkedStyleMark }) => {
|
|
98134
|
+
const styles = getQuickFormatList(superToolbar.activeEditor);
|
|
98135
|
+
const selectedStyle = styles?.find((style2) => style2.id === linkedStyleMark?.attrs?.styleId);
|
|
98136
|
+
linkedStyles.label.value = selectedStyle ? selectedStyle.definition.attrs.name : toolbarTexts2.formatText;
|
|
98108
98137
|
linkedStyles.disabled.value = false;
|
|
98109
98138
|
},
|
|
98110
98139
|
onDeactivate: () => {
|
|
98111
98140
|
linkedStyles.disabled.value = true;
|
|
98141
|
+
linkedStyles.label.value = toolbarTexts2.formatText;
|
|
98112
98142
|
}
|
|
98113
98143
|
});
|
|
98114
98144
|
const renderIcon = (value, selectedValue) => {
|
|
@@ -98813,10 +98843,11 @@ ${style2}
|
|
|
98813
98843
|
item.setDisabled(!canRejectTrackedChanges);
|
|
98814
98844
|
}
|
|
98815
98845
|
if (item.name.value === "linkedStyles") {
|
|
98846
|
+
const linkedStyleMark = marks.find((mark2) => mark2.name === "styleId");
|
|
98816
98847
|
if (this.activeEditor && !getQuickFormatList(this.activeEditor).length) {
|
|
98817
98848
|
return item.deactivate();
|
|
98818
98849
|
} else {
|
|
98819
|
-
return item.activate();
|
|
98850
|
+
return item.activate({ linkedStyleMark });
|
|
98820
98851
|
}
|
|
98821
98852
|
}
|
|
98822
98853
|
const rawActiveMark = marks.find((mark2) => mark2.name === item.name.value);
|
|
@@ -100155,7 +100186,7 @@ ${style2}
|
|
|
100155
100186
|
}
|
|
100156
100187
|
};
|
|
100157
100188
|
function adjustPaginationBreaks(editorElem, editor) {
|
|
100158
|
-
if (!editorElem.value || !editor?.value?.options?.scale) return;
|
|
100189
|
+
if (!editorElem.value || !editor?.value?.options?.scale || isHeadless(editor)) return;
|
|
100159
100190
|
const zoom = editor.value.options.scale;
|
|
100160
100191
|
const bounds = editorElem.value.getBoundingClientRect();
|
|
100161
100192
|
const breakNodes = editorElem.value.querySelectorAll(".pagination-break-wrapper");
|
|
@@ -100589,6 +100620,7 @@ ${style2}
|
|
|
100589
100620
|
...props.options
|
|
100590
100621
|
});
|
|
100591
100622
|
editor.value.on("paginationUpdate", () => {
|
|
100623
|
+
if (isHeadless(editor.value)) return;
|
|
100592
100624
|
adjustPaginationBreaks(editorElem, editor);
|
|
100593
100625
|
});
|
|
100594
100626
|
editor.value.on("collaborationReady", () => {
|
|
@@ -100747,7 +100779,7 @@ ${style2}
|
|
|
100747
100779
|
};
|
|
100748
100780
|
}
|
|
100749
100781
|
};
|
|
100750
|
-
const SuperEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$1$1, [["__scopeId", "data-v-
|
|
100782
|
+
const SuperEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$1$1, [["__scopeId", "data-v-cd3558fe"]]);
|
|
100751
100783
|
const _hoisted_1$h = ["innerHTML"];
|
|
100752
100784
|
const _sfc_main$i = {
|
|
100753
100785
|
__name: "SuperInput",
|
|
@@ -118161,7 +118193,7 @@ ${style2}
|
|
|
118161
118193
|
this.config.colors = shuffleArray(this.config.colors);
|
|
118162
118194
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
118163
118195
|
this.colorIndex = 0;
|
|
118164
|
-
this.version = "0.29.0-next.
|
|
118196
|
+
this.version = "0.29.0-next.17";
|
|
118165
118197
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
118166
118198
|
this.superdocId = config2.superdocId || v4();
|
|
118167
118199
|
this.colors = this.config.colors;
|
|
@@ -120561,7 +120593,7 @@ ${style2}
|
|
|
120561
120593
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
120562
120594
|
);
|
|
120563
120595
|
}
|
|
120564
|
-
const
|
|
120596
|
+
const indexCdXg92JS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
120565
120597
|
__proto__: null,
|
|
120566
120598
|
unified
|
|
120567
120599
|
}, Symbol.toStringTag, { value: "Module" }));
|