@harbour-enterprises/superdoc 1.0.0-next.7 → 1.0.0-next.8
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-CCU0Mzny.es.js → PdfViewer-BpJTAUeT.es.js} +1 -1
- package/dist/chunks/{PdfViewer-Ca1KqMaU.cjs → PdfViewer-DVL0SRPs.cjs} +1 -1
- package/dist/chunks/{index-DfbOKJbz.cjs → index-D-MAmimV.cjs} +3 -3
- package/dist/chunks/{index-IZySkMqb-OvIaFsnt.cjs → index-DQd4iefd-BfbLCMZZ.cjs} +1 -1
- package/dist/chunks/{index-IZySkMqb-BRW0f_kL.es.js → index-DQd4iefd-qCZ-Mcie.es.js} +1 -1
- package/dist/chunks/{index-q8FicN0U.es.js → index-WYp7dt-q.es.js} +3 -3
- package/dist/chunks/{super-editor.es--rLTKCxc.es.js → super-editor.es-BDJ97wfW.es.js} +40 -19
- package/dist/chunks/{super-editor.es-D_13cWx3.cjs → super-editor.es-DzMe-1gi.cjs} +40 -19
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-BUHD74_1.js → converter-BH40Zd-y.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-CtdkK288.js → docx-zipper-DP41TnQj.js} +1 -1
- package/dist/super-editor/chunks/{editor-BV718qjr.js → editor-C81JiIaN.js} +7 -7
- package/dist/super-editor/chunks/{index-IZySkMqb.js → index-DQd4iefd.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-CnlEeYqx.js → toolbar-BmUYOo96.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 +40 -19
- 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 +42 -21
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
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-DzMe-1gi.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-D-MAmimV.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-BDJ97wfW.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-WYp7dt-q.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
|
@@ -42428,7 +42428,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42428
42428
|
static getStoredSuperdocVersion(docx) {
|
|
42429
42429
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42430
42430
|
}
|
|
42431
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-next.
|
|
42431
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-next.8") {
|
|
42432
42432
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42433
42433
|
}
|
|
42434
42434
|
/**
|
|
@@ -62681,9 +62681,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
62681
62681
|
const selectAll = () => ({ state: state2, dispatch }) => selectAll$1(state2, dispatch);
|
|
62682
62682
|
const deleteSelection = () => ({ state: state2, tr, dispatch }) => {
|
|
62683
62683
|
const { from: from2, to, empty: empty2 } = state2.selection;
|
|
62684
|
-
if (document && document.getSelection) {
|
|
62684
|
+
if (typeof document !== "undefined" && document.getSelection) {
|
|
62685
62685
|
const currentDomSelection = document.getSelection();
|
|
62686
|
-
if (currentDomSelection?.baseNode?.data?.length
|
|
62686
|
+
if (currentDomSelection?.baseNode?.data?.length === 1) {
|
|
62687
62687
|
return false;
|
|
62688
62688
|
}
|
|
62689
62689
|
}
|
|
@@ -67511,7 +67511,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
67511
67511
|
const shouldSkipNodeView = (editor) => {
|
|
67512
67512
|
return isHeadless(editor);
|
|
67513
67513
|
};
|
|
67514
|
-
const summaryVersion = "1.0.0-next.
|
|
67514
|
+
const summaryVersion = "1.0.0-next.8";
|
|
67515
67515
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
67516
67516
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
67517
67517
|
function mapAttributes(attrs) {
|
|
@@ -68300,7 +68300,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68300
68300
|
{ default: remarkStringify2 },
|
|
68301
68301
|
{ default: remarkGfm2 }
|
|
68302
68302
|
] = await Promise.all([
|
|
68303
|
-
Promise.resolve().then(() =>
|
|
68303
|
+
Promise.resolve().then(() => indexDQd4iefd),
|
|
68304
68304
|
Promise.resolve().then(() => indexDRCvimau),
|
|
68305
68305
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
68306
68306
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -68505,7 +68505,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68505
68505
|
* Process collaboration migrations
|
|
68506
68506
|
*/
|
|
68507
68507
|
processCollaborationMigrations() {
|
|
68508
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-next.
|
|
68508
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-next.8");
|
|
68509
68509
|
if (!this.options.ydoc) return;
|
|
68510
68510
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
68511
68511
|
let docVersion = metaMap.get("version");
|
|
@@ -133848,9 +133848,9 @@ ${style2}
|
|
|
133848
133848
|
action: (editor2) => {
|
|
133849
133849
|
editor2.commands.createDocumentSection();
|
|
133850
133850
|
},
|
|
133851
|
-
|
|
133852
|
-
|
|
133853
|
-
return
|
|
133851
|
+
// TODO: Temporarily disabled - restore original: `return trigger === TRIGGERS.click;`
|
|
133852
|
+
showWhen: () => {
|
|
133853
|
+
return false;
|
|
133854
133854
|
}
|
|
133855
133855
|
},
|
|
133856
133856
|
{
|
|
@@ -134188,19 +134188,31 @@ ${style2}
|
|
|
134188
134188
|
return;
|
|
134189
134189
|
}
|
|
134190
134190
|
event.preventDefault();
|
|
134191
|
-
|
|
134191
|
+
const editorState = props.editor?.state;
|
|
134192
|
+
const hasRangeSelection = editorState?.selection?.from !== editorState?.selection?.to;
|
|
134193
|
+
let isClickInsideSelection = false;
|
|
134194
|
+
if (hasRangeSelection && Number.isFinite(event.clientX) && Number.isFinite(event.clientY)) {
|
|
134195
|
+
const hit = props.editor?.posAtCoords?.({ left: event.clientX, top: event.clientY });
|
|
134196
|
+
if (typeof hit?.pos === "number") {
|
|
134197
|
+
const { from: from2, to } = editorState.selection;
|
|
134198
|
+
isClickInsideSelection = hit.pos >= from2 && hit.pos <= to;
|
|
134199
|
+
}
|
|
134200
|
+
}
|
|
134201
|
+
if (!isClickInsideSelection) {
|
|
134202
|
+
moveCursorToMouseEvent(event, props.editor);
|
|
134203
|
+
}
|
|
134192
134204
|
try {
|
|
134193
134205
|
const context = await getEditorContext(props.editor, event);
|
|
134194
134206
|
currentContext.value = context;
|
|
134195
134207
|
sections.value = getItems({ ...context, trigger: "click" });
|
|
134196
134208
|
selectedId.value = flattenedItems.value[0]?.id || null;
|
|
134197
134209
|
searchQuery.value = "";
|
|
134198
|
-
const
|
|
134199
|
-
if (!
|
|
134210
|
+
const currentState = props.editor.state;
|
|
134211
|
+
if (!currentState) return;
|
|
134200
134212
|
props.editor.dispatch(
|
|
134201
|
-
|
|
134213
|
+
currentState.tr.setMeta(SlashMenuPluginKey, {
|
|
134202
134214
|
type: "open",
|
|
134203
|
-
pos: context?.pos ??
|
|
134215
|
+
pos: context?.pos ?? currentState.selection.from,
|
|
134204
134216
|
clientX: event.clientX,
|
|
134205
134217
|
clientY: event.clientY
|
|
134206
134218
|
})
|
|
@@ -134213,12 +134225,21 @@ ${style2}
|
|
|
134213
134225
|
if (props.editor) {
|
|
134214
134226
|
item.action ? await item.action(props.editor, currentContext.value) : null;
|
|
134215
134227
|
if (item.component) {
|
|
134216
|
-
menuRef.value;
|
|
134228
|
+
const menuElement = menuRef.value;
|
|
134217
134229
|
const componentProps = getPropsByItemId(item.id, props);
|
|
134218
|
-
|
|
134219
|
-
|
|
134220
|
-
|
|
134221
|
-
|
|
134230
|
+
let popoverPosition = { left: menuPosition.value.left, top: menuPosition.value.top };
|
|
134231
|
+
if (menuElement) {
|
|
134232
|
+
const menuRect = menuElement.getBoundingClientRect();
|
|
134233
|
+
const container = menuElement.closest(".super-editor");
|
|
134234
|
+
if (container) {
|
|
134235
|
+
const containerRect = container.getBoundingClientRect();
|
|
134236
|
+
popoverPosition = {
|
|
134237
|
+
left: `${menuRect.left - containerRect.left}px`,
|
|
134238
|
+
top: `${menuRect.top - containerRect.top}px`
|
|
134239
|
+
};
|
|
134240
|
+
}
|
|
134241
|
+
}
|
|
134242
|
+
props.openPopover(markRaw(item.component), componentProps, popoverPosition);
|
|
134222
134243
|
closeMenu({ restoreCursor: false });
|
|
134223
134244
|
} else {
|
|
134224
134245
|
const shouldRestoreCursor = item.id !== "paste";
|
|
@@ -153823,7 +153844,7 @@ ${style2}
|
|
|
153823
153844
|
this.config.colors = shuffleArray(this.config.colors);
|
|
153824
153845
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
153825
153846
|
this.colorIndex = 0;
|
|
153826
|
-
this.version = "1.0.0-next.
|
|
153847
|
+
this.version = "1.0.0-next.8";
|
|
153827
153848
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
153828
153849
|
this.superdocId = config2.superdocId || v4();
|
|
153829
153850
|
this.colors = this.config.colors;
|
|
@@ -156296,7 +156317,7 @@ ${style2}
|
|
|
156296
156317
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
156297
156318
|
);
|
|
156298
156319
|
}
|
|
156299
|
-
const
|
|
156320
|
+
const indexDQd4iefd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
156300
156321
|
__proto__: null,
|
|
156301
156322
|
unified
|
|
156302
156323
|
}, Symbol.toStringTag, { value: "Module" }));
|