@harbour-enterprises/superdoc 1.0.0-beta.59 → 1.0.0-beta.60
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-Cqk3l90H.cjs → PdfViewer-4-HewDUK.cjs} +1 -1
- package/dist/chunks/{PdfViewer-zpn99sVp.es.js → PdfViewer-C4HeazGQ.es.js} +1 -1
- package/dist/chunks/{index-Cjipvbt7.cjs → index-9qSCXVF1.cjs} +43 -15
- package/dist/chunks/{index-DjmaOC4E.es.js → index-BKfoD32c.es.js} +43 -15
- package/dist/chunks/{index-p5nUefNA-BBn8gZoL.cjs → index-GAzIoyrZ-C17wg4bM.cjs} +1 -1
- package/dist/chunks/{index-p5nUefNA-uQGvl206.es.js → index-GAzIoyrZ-zhiF5zMK.es.js} +1 -1
- package/dist/chunks/{super-editor.es-B_aU9Ilo.es.js → super-editor.es-CJ3Aw1GR.es.js} +4 -4
- package/dist/chunks/{super-editor.es-jT-SK1Sx.cjs → super-editor.es-DCHFBNql.cjs} +4 -4
- package/dist/style.css +27 -27
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CGbieO55.js → converter-DZ7Tkh7u.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-BFro6vIZ.js → docx-zipper-CZQWEuyi.js} +1 -1
- package/dist/super-editor/chunks/{editor-D4VwHdPT.js → editor-CDMuD1Nx.js} +5 -5
- package/dist/super-editor/chunks/{index-p5nUefNA.js → index-GAzIoyrZ.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-CxnmhVxL.js → toolbar-DL3rTlKm.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.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 +46 -18
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, onMounted, onBeforeUnmount, createVNode, readonly, watch, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
|
|
2
|
-
import { p as process$1 } from "./converter-
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
2
|
+
import { p as process$1 } from "./converter-DZ7Tkh7u.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CDMuD1Nx.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -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-CDMuD1Nx.js";
|
|
2
|
+
import "./chunks/converter-DZ7Tkh7u.js";
|
|
3
|
+
import "./chunks/docx-zipper-CZQWEuyi.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -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 _MARK_TOGGLE_NAMES, _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn, syncStickyMarksFromState_fn, restoreStickyMarksIfNeeded_fn, ensureStoredMarksForMarkToggle_fn;
|
|
12
|
-
import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, ar as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, al as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-
|
|
13
|
-
import { ac, i, a9, aQ } from "./chunks/converter-
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as measureCache, n as isHeadless, E as Editor, o as getStarterExtensions, P as PresentationEditor, p as Placeholder, q as getRichTextExtensions, D as DecorationSet, t as Decoration, M as Mark, v as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { z, F, B, T, w, C, x } from "./chunks/editor-
|
|
12
|
+
import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, ar as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, al as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-DZ7Tkh7u.js";
|
|
13
|
+
import { ac, i, a9, aQ } from "./chunks/converter-DZ7Tkh7u.js";
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as measureCache, n as isHeadless, E as Editor, o as getStarterExtensions, P as PresentationEditor, p as Placeholder, q as getRichTextExtensions, D as DecorationSet, t as Decoration, M as Mark, v as Extension, A as Attribute, N as Node } from "./chunks/editor-CDMuD1Nx.js";
|
|
15
|
+
import { z, F, B, T, w, C, x } from "./chunks/editor-CDMuD1Nx.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, useCssVars, 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-DL3rTlKm.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-CZQWEuyi.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-DCHFBNql.cjs");
|
|
4
4
|
require("./chunks/vue-jWLMl8Ts.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, P, 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, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-CJ3Aw1GR.es.js";
|
|
2
2
|
import "./chunks/vue-Dysv_7z5.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-DCHFBNql.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-9qSCXVF1.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-CJ3Aw1GR.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-BKfoD32c.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
|
@@ -42209,7 +42209,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42209
42209
|
static getStoredSuperdocVersion(docx) {
|
|
42210
42210
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42211
42211
|
}
|
|
42212
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.
|
|
42212
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.60") {
|
|
42213
42213
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42214
42214
|
}
|
|
42215
42215
|
/**
|
|
@@ -67255,7 +67255,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
67255
67255
|
const shouldSkipNodeView = (editor) => {
|
|
67256
67256
|
return isHeadless(editor);
|
|
67257
67257
|
};
|
|
67258
|
-
const summaryVersion = "1.0.0-beta.
|
|
67258
|
+
const summaryVersion = "1.0.0-beta.60";
|
|
67259
67259
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
67260
67260
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
67261
67261
|
function mapAttributes(attrs) {
|
|
@@ -68044,7 +68044,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68044
68044
|
{ default: remarkStringify2 },
|
|
68045
68045
|
{ default: remarkGfm2 }
|
|
68046
68046
|
] = await Promise.all([
|
|
68047
|
-
Promise.resolve().then(() =>
|
|
68047
|
+
Promise.resolve().then(() => indexGAzIoyrZ),
|
|
68048
68048
|
Promise.resolve().then(() => indexDRCvimau),
|
|
68049
68049
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
68050
68050
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -68249,7 +68249,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68249
68249
|
* Process collaboration migrations
|
|
68250
68250
|
*/
|
|
68251
68251
|
processCollaborationMigrations() {
|
|
68252
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
68252
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.60");
|
|
68253
68253
|
if (!this.options.ydoc) return;
|
|
68254
68254
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
68255
68255
|
let docVersion = metaMap.get("version");
|
|
@@ -148497,14 +148497,33 @@ ${style2}
|
|
|
148497
148497
|
return;
|
|
148498
148498
|
}
|
|
148499
148499
|
const { documentId } = editor.options;
|
|
148500
|
-
const
|
|
148500
|
+
const txnSelection = transaction?.selection;
|
|
148501
|
+
const stateSelection = editor.state?.selection ?? editor.view?.state?.selection;
|
|
148502
|
+
const selectionWithPositions = txnSelection?.$from && txnSelection?.$to && txnSelection || stateSelection || txnSelection;
|
|
148503
|
+
if (!selectionWithPositions) return;
|
|
148504
|
+
const { $from, $to } = selectionWithPositions;
|
|
148505
|
+
if (!$from || !$to) return;
|
|
148506
|
+
const docSize = editor.state?.doc?.content?.size ?? editor.view?.state?.doc?.content?.size ?? Number.POSITIVE_INFINITY;
|
|
148507
|
+
if ($from.pos > docSize || $to.pos > docSize) {
|
|
148508
|
+
updateSelection2({ x: null, y: null, source: "super-editor" });
|
|
148509
|
+
return;
|
|
148510
|
+
}
|
|
148501
148511
|
if ($from.pos === $to.pos) updateSelection2({ x: null, y: null, source: "super-editor" });
|
|
148502
148512
|
if (!layers.value) return;
|
|
148503
148513
|
const presentation = PresentationEditor.getInstance(documentId);
|
|
148504
148514
|
if (!presentation) {
|
|
148505
148515
|
const { view: view2 } = editor;
|
|
148506
|
-
const
|
|
148507
|
-
|
|
148516
|
+
const safeCoordsAtPos2 = (pos) => {
|
|
148517
|
+
try {
|
|
148518
|
+
return view2.coordsAtPos(pos);
|
|
148519
|
+
} catch (err) {
|
|
148520
|
+
console.warn("[superdoc] Ignoring selection coords error", err);
|
|
148521
|
+
return null;
|
|
148522
|
+
}
|
|
148523
|
+
};
|
|
148524
|
+
const fromCoords2 = safeCoordsAtPos2($from.pos);
|
|
148525
|
+
const toCoords2 = safeCoordsAtPos2($to.pos);
|
|
148526
|
+
if (!fromCoords2 || !toCoords2) return;
|
|
148508
148527
|
const layerBounds2 = layers.value.getBoundingClientRect();
|
|
148509
148528
|
const HEADER_HEIGHT2 = 96;
|
|
148510
148529
|
const top22 = Math.max(HEADER_HEIGHT2, fromCoords2.top - layerBounds2.top);
|
|
@@ -148515,13 +148534,13 @@ ${style2}
|
|
|
148515
148534
|
right: toCoords2.left,
|
|
148516
148535
|
bottom: bottom22
|
|
148517
148536
|
};
|
|
148518
|
-
const
|
|
148537
|
+
const selectionResult2 = useSelection({
|
|
148519
148538
|
selectionBounds: selectionBounds2,
|
|
148520
148539
|
page: 1,
|
|
148521
148540
|
documentId,
|
|
148522
148541
|
source: "super-editor"
|
|
148523
148542
|
});
|
|
148524
|
-
handleSelectionChange(
|
|
148543
|
+
handleSelectionChange(selectionResult2);
|
|
148525
148544
|
return;
|
|
148526
148545
|
}
|
|
148527
148546
|
const layoutRange = presentation.getSelectionBounds($from.pos, $to.pos, layers.value);
|
|
@@ -148534,18 +148553,27 @@ ${style2}
|
|
|
148534
148553
|
y: bounds.bottom,
|
|
148535
148554
|
source: "super-editor"
|
|
148536
148555
|
});
|
|
148537
|
-
const
|
|
148556
|
+
const selectionResult2 = useSelection({
|
|
148538
148557
|
selectionBounds: { ...bounds },
|
|
148539
148558
|
page: pageIndex + 1,
|
|
148540
148559
|
documentId,
|
|
148541
148560
|
source: "super-editor"
|
|
148542
148561
|
});
|
|
148543
|
-
handleSelectionChange(
|
|
148562
|
+
handleSelectionChange(selectionResult2);
|
|
148544
148563
|
return;
|
|
148545
148564
|
}
|
|
148546
148565
|
const { view } = editor;
|
|
148547
|
-
const
|
|
148548
|
-
|
|
148566
|
+
const safeCoordsAtPos = (pos) => {
|
|
148567
|
+
try {
|
|
148568
|
+
return view.coordsAtPos(pos);
|
|
148569
|
+
} catch (err) {
|
|
148570
|
+
console.warn("[superdoc] Ignoring selection coords error", err);
|
|
148571
|
+
return null;
|
|
148572
|
+
}
|
|
148573
|
+
};
|
|
148574
|
+
const fromCoords = safeCoordsAtPos($from.pos);
|
|
148575
|
+
const toCoords = safeCoordsAtPos($to.pos);
|
|
148576
|
+
if (!fromCoords || !toCoords) return;
|
|
148549
148577
|
const layerBounds = layers.value.getBoundingClientRect();
|
|
148550
148578
|
const HEADER_HEIGHT = 96;
|
|
148551
148579
|
const top2 = Math.max(HEADER_HEIGHT, fromCoords.top - layerBounds.top);
|
|
@@ -148556,13 +148584,13 @@ ${style2}
|
|
|
148556
148584
|
right: toCoords.left,
|
|
148557
148585
|
bottom: bottom2
|
|
148558
148586
|
};
|
|
148559
|
-
const
|
|
148587
|
+
const selectionResult = useSelection({
|
|
148560
148588
|
selectionBounds,
|
|
148561
148589
|
page: 1,
|
|
148562
148590
|
documentId,
|
|
148563
148591
|
source: "super-editor"
|
|
148564
148592
|
});
|
|
148565
|
-
handleSelectionChange(
|
|
148593
|
+
handleSelectionChange(selectionResult);
|
|
148566
148594
|
};
|
|
148567
148595
|
const onEditorCollaborationReady = ({ editor }) => {
|
|
148568
148596
|
proxy.$superdoc.emit("collaboration-ready", { editor });
|
|
@@ -149024,7 +149052,7 @@ ${style2}
|
|
|
149024
149052
|
};
|
|
149025
149053
|
}
|
|
149026
149054
|
};
|
|
149027
|
-
const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
149055
|
+
const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-5b2a75a6"]]);
|
|
149028
149056
|
const createSuperdocVueApp = () => {
|
|
149029
149057
|
const app = createApp(App);
|
|
149030
149058
|
const pinia = createPinia();
|
|
@@ -149204,7 +149232,7 @@ ${style2}
|
|
|
149204
149232
|
this.config.colors = shuffleArray(this.config.colors);
|
|
149205
149233
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
149206
149234
|
this.colorIndex = 0;
|
|
149207
|
-
this.version = "1.0.0-beta.
|
|
149235
|
+
this.version = "1.0.0-beta.60";
|
|
149208
149236
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
149209
149237
|
this.superdocId = config2.superdocId || v4();
|
|
149210
149238
|
this.colors = this.config.colors;
|
|
@@ -151670,7 +151698,7 @@ ${style2}
|
|
|
151670
151698
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
151671
151699
|
);
|
|
151672
151700
|
}
|
|
151673
|
-
const
|
|
151701
|
+
const indexGAzIoyrZ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
151674
151702
|
__proto__: null,
|
|
151675
151703
|
unified
|
|
151676
151704
|
}, Symbol.toStringTag, { value: "Module" }));
|