superdoc 0.35.0 → 0.35.3
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-CRDOUMbZ.es.js → PdfViewer-C2woiqSD.es.js} +1 -1
- package/dist/chunks/{PdfViewer-Dky_6waU.cjs → PdfViewer-cKeULrJD.cjs} +1 -1
- package/dist/chunks/{index-DV1fybAb.cjs → index-BLV0gVBb.cjs} +3 -3
- package/dist/chunks/{index-Bqh6Mowj-jTsSenoz.es.js → index-CUb1VdVb-BOiRrEoQ.es.js} +1 -1
- package/dist/chunks/{index-Bqh6Mowj-Dh0tnahT.cjs → index-CUb1VdVb-Dn-WH3X_.cjs} +1 -1
- package/dist/chunks/{index-DuDHnypH.es.js → index-qCXNfgIE.es.js} +3 -3
- package/dist/chunks/{super-editor.es-PZocCf8E.es.js → super-editor.es-C-FCfUaM.es.js} +57 -20
- package/dist/chunks/{super-editor.es-Bgv1UKa4.cjs → super-editor.es-FtM9y9Xi.cjs} +57 -20
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts +15 -13
- 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-DSvlTZFv.js → converter-DCcuo33v.js} +11 -5
- package/dist/super-editor/chunks/{docx-zipper-t0kg81zK.js → docx-zipper-BmJ2rJSz.js} +1 -1
- package/dist/super-editor/chunks/{editor-CAnFQ1yt.js → editor-CyldDVIe.js} +48 -17
- package/dist/super-editor/chunks/{index-Bqh6Mowj.js → index-CUb1VdVb.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-BMXKBmbt.js → toolbar-CO92tGD-.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/extensions/editable.d.ts +11 -0
- package/dist/super-editor/super-editor/src/core/extensions/editable.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/documentCommentsImporter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/comment/comments-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 +59 -22
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,8 +12,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
12
12
|
var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, applyIndentStyling_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
|
|
13
13
|
import * as Y from "yjs";
|
|
14
14
|
import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
|
|
15
|
-
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as findParentNodeClosestToPos, an as getListItemStyleDefinitions, ao as docxNumberingHelpers, ap as parseIndentElement, aq as combineIndents, ar as twipsToPixels, as as PIXELS_PER_INCH, at as SelectionRange, au as Transform, av as isInTable$1, aw as generateDocxRandomId, ax as insertNewRelationship, ay as inchesToPixels } from "./converter-
|
|
16
|
-
import { D as DocxZipper } from "./docx-zipper-
|
|
15
|
+
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as findParentNodeClosestToPos, an as getListItemStyleDefinitions, ao as docxNumberingHelpers, ap as parseIndentElement, aq as combineIndents, ar as twipsToPixels, as as PIXELS_PER_INCH, at as SelectionRange, au as Transform, av as isInTable$1, aw as generateDocxRandomId, ax as insertNewRelationship, ay as inchesToPixels } from "./converter-DCcuo33v.js";
|
|
16
|
+
import { D as DocxZipper } from "./docx-zipper-BmJ2rJSz.js";
|
|
17
17
|
import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
|
|
18
18
|
var GOOD_LEAF_SIZE = 200;
|
|
19
19
|
var RopeSequence = function RopeSequence2() {
|
|
@@ -10562,12 +10562,41 @@ const Keymap = Extension.create({
|
|
|
10562
10562
|
const Editable = Extension.create({
|
|
10563
10563
|
name: "editable",
|
|
10564
10564
|
addPmPlugins() {
|
|
10565
|
+
const editor = this.editor;
|
|
10565
10566
|
const editablePlugin = new Plugin({
|
|
10566
10567
|
key: new PluginKey("editable"),
|
|
10567
10568
|
props: {
|
|
10568
|
-
editable: () =>
|
|
10569
|
-
|
|
10570
|
-
|
|
10569
|
+
editable: () => editor.options.editable,
|
|
10570
|
+
handleDOMEvents: {
|
|
10571
|
+
beforeinput: (_view, event) => {
|
|
10572
|
+
if (!editor.options.editable) {
|
|
10573
|
+
event.preventDefault();
|
|
10574
|
+
return true;
|
|
10575
|
+
}
|
|
10576
|
+
return false;
|
|
10577
|
+
},
|
|
10578
|
+
mousedown: (_view, event) => {
|
|
10579
|
+
if (!editor.options.editable) {
|
|
10580
|
+
event.preventDefault();
|
|
10581
|
+
return true;
|
|
10582
|
+
}
|
|
10583
|
+
return false;
|
|
10584
|
+
},
|
|
10585
|
+
focus: (view, event) => {
|
|
10586
|
+
if (!editor.options.editable) {
|
|
10587
|
+
event.preventDefault();
|
|
10588
|
+
view.dom.blur();
|
|
10589
|
+
return true;
|
|
10590
|
+
}
|
|
10591
|
+
return false;
|
|
10592
|
+
}
|
|
10593
|
+
},
|
|
10594
|
+
handleClick: () => !editor.options.editable,
|
|
10595
|
+
handleDoubleClick: () => !editor.options.editable,
|
|
10596
|
+
handleTripleClick: () => !editor.options.editable,
|
|
10597
|
+
handleKeyDown: () => !editor.options.editable,
|
|
10598
|
+
handlePaste: () => !editor.options.editable,
|
|
10599
|
+
handleDrop: () => !editor.options.editable
|
|
10571
10600
|
}
|
|
10572
10601
|
});
|
|
10573
10602
|
return [editablePlugin];
|
|
@@ -11587,12 +11616,14 @@ const prepareCommentsForImport = (doc2, tr, schema, converter) => {
|
|
|
11587
11616
|
importedId: node.attrs["w:id"]
|
|
11588
11617
|
});
|
|
11589
11618
|
if (type.name === "commentRangeStart") {
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11619
|
+
if (!matchingImportedComment.isDone) {
|
|
11620
|
+
toMark.push({
|
|
11621
|
+
commentId: resolvedCommentId,
|
|
11622
|
+
importedId,
|
|
11623
|
+
internal,
|
|
11624
|
+
start: pos
|
|
11625
|
+
});
|
|
11626
|
+
}
|
|
11596
11627
|
ensureFallbackComment({
|
|
11597
11628
|
converter,
|
|
11598
11629
|
matchingImportedComment,
|
|
@@ -15198,7 +15229,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
15198
15229
|
{ default: remarkStringify },
|
|
15199
15230
|
{ default: remarkGfm }
|
|
15200
15231
|
] = await Promise.all([
|
|
15201
|
-
import("./index-
|
|
15232
|
+
import("./index-CUb1VdVb.js"),
|
|
15202
15233
|
import("./index-DRCvimau.js"),
|
|
15203
15234
|
import("./index-C_x_N6Uh.js"),
|
|
15204
15235
|
import("./index-D_sWOSiG.js"),
|
|
@@ -15308,7 +15339,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
15308
15339
|
Object.entries(this.converter.convertedXml).forEach(([name, json2]) => {
|
|
15309
15340
|
if (name.includes("header") || name.includes("footer")) {
|
|
15310
15341
|
const resultXml = this.converter.schemaToXml(json2.elements[0]);
|
|
15311
|
-
updatedHeadersFooters[name] = String(resultXml);
|
|
15342
|
+
updatedHeadersFooters[name] = String(resultXml.replace(/\[\[sdspace\]\]/g, ""));
|
|
15312
15343
|
}
|
|
15313
15344
|
});
|
|
15314
15345
|
const numberingData = this.converter.convertedXml["word/numbering.xml"];
|
|
@@ -15416,7 +15447,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
15416
15447
|
* @returns {Object | void} Migration results
|
|
15417
15448
|
*/
|
|
15418
15449
|
processCollaborationMigrations() {
|
|
15419
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.35.
|
|
15450
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.35.3");
|
|
15420
15451
|
if (!this.options.ydoc) return;
|
|
15421
15452
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
15422
15453
|
let docVersion = metaMap.get("version");
|
|
@@ -33326,11 +33357,11 @@ const getChangesByIdToResolve = (state, id) => {
|
|
|
33326
33357
|
break;
|
|
33327
33358
|
}
|
|
33328
33359
|
const [left2, right2] = direction < 0 ? [neighbor, currentChange] : [currentChange, neighbor];
|
|
33329
|
-
if (!areDirectlyConnected(left2, right2)) {
|
|
33330
|
-
break;
|
|
33331
|
-
}
|
|
33332
33360
|
const sharesId = neighbor.mark.attrs.id === matchingId;
|
|
33333
33361
|
const complementary = isComplementaryPair(currentChange.mark.type.name, neighbor.mark.type.name);
|
|
33362
|
+
if (!sharesId && !areDirectlyConnected(left2, right2)) {
|
|
33363
|
+
break;
|
|
33364
|
+
}
|
|
33334
33365
|
if (!sharesId && !complementary) {
|
|
33335
33366
|
break;
|
|
33336
33367
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, 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-DCcuo33v.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CyldDVIe.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-CyldDVIe.js";
|
|
2
|
+
import "./chunks/converter-DCcuo33v.js";
|
|
3
|
+
import "./chunks/docx-zipper-BmJ2rJSz.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editable extension controls whether the editor accepts user input.
|
|
3
|
+
*
|
|
4
|
+
* When editable is false, all user interactions are blocked:
|
|
5
|
+
* - Text input via beforeinput events
|
|
6
|
+
* - Mouse interactions via mousedown
|
|
7
|
+
* - Focus via automatic blur
|
|
8
|
+
* - Click, double-click, and triple-click events
|
|
9
|
+
* - Keyboard shortcuts via handleKeyDown
|
|
10
|
+
* - Paste and drop events
|
|
11
|
+
*/
|
|
1
12
|
export const Editable: Extension;
|
|
2
13
|
import { Extension } from '../Extension.js';
|
|
3
14
|
//# sourceMappingURL=editable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editable.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/editable.js"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"editable.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/editable.js"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,iCA4CG;0BAzDuB,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentCommentsImporter.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/super-converter/v2/importer/documentCommentsImporter.js"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,+DANG;IAA2B,IAAI,EAAvB,UAAU;IACc,eAAe,EAAvC,eAAe;IACQ,SAAS,EAAhC,cAAc;IACC,MAAM,EAArB,MAAM;CACd,
|
|
1
|
+
{"version":3,"file":"documentCommentsImporter.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/super-converter/v2/importer/documentCommentsImporter.js"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,+DANG;IAA2B,IAAI,EAAvB,UAAU;IACc,eAAe,EAAvC,eAAe;IACQ,SAAS,EAAhC,cAAc;IACC,MAAM,EAArB,MAAM;CACd,SA6DF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/comment/comments-helpers.js"],"names":[],"mappings":"AAcO,uEANJ;IAAuB,SAAS,EAAxB,MAAM;CACd,GAGU,IAAI,CAUhB;AASM,gEAHI,OAAO,mBAAmB,EAAE,IAAI,SAkB1C;AAWM,8CANI,OAAO,mBAAmB,EAAE,IAAI,MAChC,OAAO,mBAAmB,EAAE,WAAW,UACvC,OAAO,mBAAmB,EAAE,MAAM,mBAEhC,IAAI,CAyEhB;AAQM,oDAMN;AAUM,8CALI,OAAO,mBAAmB,EAAE,IAAI,MAChC,OAAO,mBAAmB,EAAE,WAAW,UACvC,OAAO,mBAAmB,EAAE,MAAM,mBAChC,IAAI,
|
|
1
|
+
{"version":3,"file":"comments-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/comment/comments-helpers.js"],"names":[],"mappings":"AAcO,uEANJ;IAAuB,SAAS,EAAxB,MAAM;CACd,GAGU,IAAI,CAUhB;AASM,gEAHI,OAAO,mBAAmB,EAAE,IAAI,SAkB1C;AAWM,8CANI,OAAO,mBAAmB,EAAE,IAAI,MAChC,OAAO,mBAAmB,EAAE,WAAW,UACvC,OAAO,mBAAmB,EAAE,MAAM,mBAEhC,IAAI,CAyEhB;AAQM,oDAMN;AAUM,8CALI,OAAO,mBAAmB,EAAE,IAAI,MAChC,OAAO,mBAAmB,EAAE,WAAW,UACvC,OAAO,mBAAmB,EAAE,MAAM,mBAChC,IAAI,CAoEhB;AAUM,qEA2DN;AAYM,oFANJ;IAAuB,cAAc;IACd,QAAQ;IACP,UAAU;IACP,MAAM,EAAzB,UAAU;CAClB,UAQF"}
|
package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/track-changes/permission-helpers.js"],"names":[],"mappings":"AAgDO,2DALJ;IAAwD,KAAK,EAArD,OAAO,mBAAmB,EAAE,WAAW;IACxB,IAAI,EAAnB,MAAM;IACS,EAAE,EAAjB,MAAM;CACd,GAAU,KAAK,KAAQ,CAkBzB;AA+BM,iFALJ;IAAmE,MAAM,EAAjE;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"permission-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/track-changes/permission-helpers.js"],"names":[],"mappings":"AAgDO,2DALJ;IAAwD,KAAK,EAArD,OAAO,mBAAmB,EAAE,WAAW;IACxB,IAAI,EAAnB,MAAM;IACS,EAAE,EAAjB,MAAM;CACd,GAAU,KAAK,KAAQ,CAkBzB;AA+BM,iFALJ;IAAmE,MAAM,EAAjE;;;;;;;;;;;;0BAsDgtkgB,aAAa;;;;2BAAgoB,IAAI;;;;;;;6BAAwmI,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAAwte,aAAa;0BAA3kyB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAAsmpC,UAAU;kDAAuV,UAAU,aAA+E,UAAU;oCAAgZ,UAAU;;;;;;;;;KAtD/gliB;IACxB,MAAM,EAAhC,QAAQ,GAAC,QAAQ;IACK,cAAc,EAApC,KAAK,KAAQ;CACrB,GAAU,OAAO,CAkCnB;AAWM,iFALJ;IAAwD,KAAK,EAArD,OAAO,mBAAmB,EAAE,WAAW;IACnB,GAAG,EAAvB,MAAM,GAAC,IAAI;IACS,eAAe,EAAnC,MAAM,GAAC,IAAI;CACnB,GAAU,KAAK,KAAQ,CAOzB"}
|
|
@@ -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-DCcuo33v.js";
|
|
13
|
+
import { a5, i, a2 } from "./chunks/converter-DCcuo33v.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-CyldDVIe.js";
|
|
15
|
+
import { w, C, x, T, t, z, v } from "./chunks/editor-CyldDVIe.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-CO92tGD-.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-BmJ2rJSz.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-FtM9y9Xi.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-C-FCfUaM.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-FtM9y9Xi.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-BLV0gVBb.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-C-FCfUaM.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-qCXNfgIE.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
|
@@ -33140,7 +33140,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33140
33140
|
const trackedDeletedText = attributes["custom:trackedDeletedText"] !== "null" ? attributes["custom:trackedDeletedText"] : null;
|
|
33141
33141
|
const date = new Date(createdDate);
|
|
33142
33142
|
const unixTimestampMs = date.getTime();
|
|
33143
|
-
const
|
|
33143
|
+
const parsedElements = nodeListHandler.handler({
|
|
33144
33144
|
nodes: el.elements,
|
|
33145
33145
|
nodeListHandler,
|
|
33146
33146
|
docx,
|
|
@@ -33148,7 +33148,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33148
33148
|
converter,
|
|
33149
33149
|
path: [el]
|
|
33150
33150
|
});
|
|
33151
|
-
const { attrs } =
|
|
33151
|
+
const { attrs } = parsedElements[0];
|
|
33152
33152
|
const paraId = attrs["w14:paraId"];
|
|
33153
33153
|
return {
|
|
33154
33154
|
commentId: internalId || v4$1(),
|
|
@@ -33156,7 +33156,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33156
33156
|
creatorName: authorName,
|
|
33157
33157
|
creatorEmail: authorEmail,
|
|
33158
33158
|
createdTime: unixTimestampMs,
|
|
33159
|
-
textJson:
|
|
33159
|
+
textJson: parsedElements[0],
|
|
33160
|
+
elements: parsedElements,
|
|
33160
33161
|
initials,
|
|
33161
33162
|
paraId,
|
|
33162
33163
|
trackedChange,
|
|
@@ -33178,7 +33179,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33178
33179
|
const { elements = [] } = initialElements[0] ?? {};
|
|
33179
33180
|
const commentEx = elements.filter((el) => el.name === "w15:commentEx");
|
|
33180
33181
|
return comments.map((comment2) => {
|
|
33181
|
-
const extendedDef = commentEx.find((ce2) =>
|
|
33182
|
+
const extendedDef = commentEx.find((ce2) => {
|
|
33183
|
+
const isIncludedInCommentElements = comment2.elements.some(
|
|
33184
|
+
(el) => el.attrs["w14:paraId"] === ce2.attributes["w15:paraId"]
|
|
33185
|
+
);
|
|
33186
|
+
return isIncludedInCommentElements;
|
|
33187
|
+
});
|
|
33182
33188
|
if (!extendedDef) return { ...comment2, isDone: comment2.isDone ?? false };
|
|
33183
33189
|
const { isDone, paraIdParent } = getExtendedDetails(extendedDef);
|
|
33184
33190
|
let parentComment;
|
|
@@ -35798,7 +35804,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35798
35804
|
static getStoredSuperdocVersion(docx) {
|
|
35799
35805
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
35800
35806
|
}
|
|
35801
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.35.
|
|
35807
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.35.3") {
|
|
35802
35808
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
35803
35809
|
}
|
|
35804
35810
|
/**
|
|
@@ -57274,12 +57280,41 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
57274
57280
|
const Editable = Extension.create({
|
|
57275
57281
|
name: "editable",
|
|
57276
57282
|
addPmPlugins() {
|
|
57283
|
+
const editor = this.editor;
|
|
57277
57284
|
const editablePlugin = new Plugin({
|
|
57278
57285
|
key: new PluginKey("editable"),
|
|
57279
57286
|
props: {
|
|
57280
|
-
editable: () =>
|
|
57281
|
-
|
|
57282
|
-
|
|
57287
|
+
editable: () => editor.options.editable,
|
|
57288
|
+
handleDOMEvents: {
|
|
57289
|
+
beforeinput: (_view, event) => {
|
|
57290
|
+
if (!editor.options.editable) {
|
|
57291
|
+
event.preventDefault();
|
|
57292
|
+
return true;
|
|
57293
|
+
}
|
|
57294
|
+
return false;
|
|
57295
|
+
},
|
|
57296
|
+
mousedown: (_view, event) => {
|
|
57297
|
+
if (!editor.options.editable) {
|
|
57298
|
+
event.preventDefault();
|
|
57299
|
+
return true;
|
|
57300
|
+
}
|
|
57301
|
+
return false;
|
|
57302
|
+
},
|
|
57303
|
+
focus: (view, event) => {
|
|
57304
|
+
if (!editor.options.editable) {
|
|
57305
|
+
event.preventDefault();
|
|
57306
|
+
view.dom.blur();
|
|
57307
|
+
return true;
|
|
57308
|
+
}
|
|
57309
|
+
return false;
|
|
57310
|
+
}
|
|
57311
|
+
},
|
|
57312
|
+
handleClick: () => !editor.options.editable,
|
|
57313
|
+
handleDoubleClick: () => !editor.options.editable,
|
|
57314
|
+
handleTripleClick: () => !editor.options.editable,
|
|
57315
|
+
handleKeyDown: () => !editor.options.editable,
|
|
57316
|
+
handlePaste: () => !editor.options.editable,
|
|
57317
|
+
handleDrop: () => !editor.options.editable
|
|
57283
57318
|
}
|
|
57284
57319
|
});
|
|
57285
57320
|
return [editablePlugin];
|
|
@@ -58290,12 +58325,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
58290
58325
|
importedId: node2.attrs["w:id"]
|
|
58291
58326
|
});
|
|
58292
58327
|
if (type2.name === "commentRangeStart") {
|
|
58293
|
-
|
|
58294
|
-
|
|
58295
|
-
|
|
58296
|
-
|
|
58297
|
-
|
|
58298
|
-
|
|
58328
|
+
if (!matchingImportedComment.isDone) {
|
|
58329
|
+
toMark.push({
|
|
58330
|
+
commentId: resolvedCommentId,
|
|
58331
|
+
importedId,
|
|
58332
|
+
internal,
|
|
58333
|
+
start: pos
|
|
58334
|
+
});
|
|
58335
|
+
}
|
|
58299
58336
|
ensureFallbackComment({
|
|
58300
58337
|
converter,
|
|
58301
58338
|
matchingImportedComment,
|
|
@@ -61854,7 +61891,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61854
61891
|
{ default: remarkStringify2 },
|
|
61855
61892
|
{ default: remarkGfm2 }
|
|
61856
61893
|
] = await Promise.all([
|
|
61857
|
-
Promise.resolve().then(() =>
|
|
61894
|
+
Promise.resolve().then(() => indexCUb1VdVb),
|
|
61858
61895
|
Promise.resolve().then(() => indexDRCvimau),
|
|
61859
61896
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
61860
61897
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -61964,7 +62001,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61964
62001
|
Object.entries(this.converter.convertedXml).forEach(([name, json2]) => {
|
|
61965
62002
|
if (name.includes("header") || name.includes("footer")) {
|
|
61966
62003
|
const resultXml = this.converter.schemaToXml(json2.elements[0]);
|
|
61967
|
-
updatedHeadersFooters[name] = String(resultXml);
|
|
62004
|
+
updatedHeadersFooters[name] = String(resultXml.replace(/\[\[sdspace\]\]/g, ""));
|
|
61968
62005
|
}
|
|
61969
62006
|
});
|
|
61970
62007
|
const numberingData = this.converter.convertedXml["word/numbering.xml"];
|
|
@@ -62072,7 +62109,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
62072
62109
|
* @returns {Object | void} Migration results
|
|
62073
62110
|
*/
|
|
62074
62111
|
processCollaborationMigrations() {
|
|
62075
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.35.
|
|
62112
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.35.3");
|
|
62076
62113
|
if (!this.options.ydoc) return;
|
|
62077
62114
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
62078
62115
|
let docVersion = metaMap.get("version");
|
|
@@ -79861,11 +79898,11 @@ ${l}
|
|
|
79861
79898
|
break;
|
|
79862
79899
|
}
|
|
79863
79900
|
const [left2, right2] = direction < 0 ? [neighbor, currentChange] : [currentChange, neighbor];
|
|
79864
|
-
if (!areDirectlyConnected(left2, right2)) {
|
|
79865
|
-
break;
|
|
79866
|
-
}
|
|
79867
79901
|
const sharesId = neighbor.mark.attrs.id === matchingId;
|
|
79868
79902
|
const complementary = isComplementaryPair(currentChange.mark.type.name, neighbor.mark.type.name);
|
|
79903
|
+
if (!sharesId && !areDirectlyConnected(left2, right2)) {
|
|
79904
|
+
break;
|
|
79905
|
+
}
|
|
79869
79906
|
if (!sharesId && !complementary) {
|
|
79870
79907
|
break;
|
|
79871
79908
|
}
|
|
@@ -118578,7 +118615,7 @@ ${style2}
|
|
|
118578
118615
|
this.config.colors = shuffleArray(this.config.colors);
|
|
118579
118616
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
118580
118617
|
this.colorIndex = 0;
|
|
118581
|
-
this.version = "0.35.
|
|
118618
|
+
this.version = "0.35.3";
|
|
118582
118619
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
118583
118620
|
this.superdocId = config2.superdocId || v4();
|
|
118584
118621
|
this.colors = this.config.colors;
|
|
@@ -121000,7 +121037,7 @@ ${style2}
|
|
|
121000
121037
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
121001
121038
|
);
|
|
121002
121039
|
}
|
|
121003
|
-
const
|
|
121040
|
+
const indexCUb1VdVb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
121004
121041
|
__proto__: null,
|
|
121005
121042
|
unified
|
|
121006
121043
|
}, Symbol.toStringTag, { value: "Module" }));
|