@harbour-enterprises/superdoc 0.6.10 → 0.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{super-editor.es-BDSHdpjP.js → super-editor.es-n8lS5QnA.js} +679 -5
- package/dist/chunks/{super-editor.es-BDSHdpjP.js.map → super-editor.es-n8lS5QnA.js.map} +1 -1
- package/dist/super-editor/chunks/{converter-6mfBech5.js → converter-BA8jbeZU.js} +674 -3
- package/dist/super-editor/chunks/{converter-6mfBech5.js.map → converter-BA8jbeZU.js.map} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-Dnp61dGQ.js → docx-zipper-Crq6kHku.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-Dnp61dGQ.js.map → docx-zipper-Crq6kHku.js.map} +1 -1
- package/dist/super-editor/chunks/{editor-B-egQeTe.js → editor-S_v8wD_U.js} +8 -5
- package/dist/super-editor/chunks/editor-S_v8wD_U.js.map +1 -0
- package/dist/super-editor/chunks/{toolbar-DBqSp9Eo.js → toolbar-BBp1B1nW.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-DBqSp9Eo.js.map → toolbar-BBp1B1nW.js.map} +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/SuperConverter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/exporter-docx-defs.d.ts +447 -0
- package/dist/super-editor/core/super-converter/v2/importer/docxImporter.d.ts +10 -0
- package/dist/super-editor/core/super-converter/v2/importer/docxImporter.d.ts.map +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/tests/import/docxImporter.test.d.ts +2 -0
- package/dist/super-editor/tests/import/docxImporter.test.d.ts.map +1 -0
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.es.js +3 -3
- package/package.json +1 -1
- package/dist/super-editor/chunks/editor-B-egQeTe.js.map +0 -1
|
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
12
12
|
var _events, _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _commandService, _css, _Editor_instances, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, endCollaboration_fn, _FieldAnnotationView_instances, createAnnotation_fn;
|
|
13
13
|
import * as Y from "yjs";
|
|
14
14
|
import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement } 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, f as Schema$1, g as canSplit, l as liftTarget, h as canJoin, j as joinPoint, r as replaceStep$1, R as ReplaceAroundStep, o as objectIncludes, i as ReplaceStep, k as NodeRange, m as findWrapping, n as TrackDeleteMarkName, q as TrackInsertMarkName, v as v4, s as generateDocxRandomId, t as TrackFormatMarkName, u as AddMarkStep, w as RemoveMarkStep, x as comments_module_events, y as twipsToLines, z as pixelsToTwips, B as SuperConverter, E as EditorState, C as toKebabCase, G as kebabCase } from "./converter-
|
|
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, f as Schema$1, g as canSplit, l as liftTarget, h as canJoin, j as joinPoint, r as replaceStep$1, R as ReplaceAroundStep, o as objectIncludes, i as ReplaceStep, k as NodeRange, m as findWrapping, n as TrackDeleteMarkName, q as TrackInsertMarkName, v as v4, s as generateDocxRandomId, t as TrackFormatMarkName, u as AddMarkStep, w as RemoveMarkStep, x as comments_module_events, y as twipsToLines, z as pixelsToTwips, B as SuperConverter, E as EditorState, C as toKebabCase, G as kebabCase } from "./converter-BA8jbeZU.js";
|
|
16
16
|
import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createElementVNode, toDisplayString, createApp } from "vue";
|
|
17
|
-
import { D as DocxZipper } from "./docx-zipper-
|
|
17
|
+
import { D as DocxZipper } from "./docx-zipper-Crq6kHku.js";
|
|
18
18
|
function getMarksFromSelection(state) {
|
|
19
19
|
const { from: from2, to, empty: empty2 } = state.selection;
|
|
20
20
|
const marks = [];
|
|
@@ -11298,6 +11298,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
11298
11298
|
const relsData = this.converter.convertedXml["word/_rels/document.xml.rels"];
|
|
11299
11299
|
const rels = this.converter.schemaToXml(relsData.elements[0]);
|
|
11300
11300
|
const customXml = this.converter.schemaToXml(this.converter.convertedXml["docProps/custom.xml"].elements[0]);
|
|
11301
|
+
const styles = this.converter.schemaToXml(this.converter.convertedXml["word/styles.xml"].elements[0]);
|
|
11301
11302
|
const customSettings = this.converter.schemaToXml(this.converter.convertedXml["word/settings.xml"].elements[0]);
|
|
11302
11303
|
const originalCommentsXml = this.converter.convertedXml["word/comments.xml"];
|
|
11303
11304
|
const updatedCommentsXml = originalCommentsXml ? this.converter.schemaToXml(originalCommentsXml.elements[0]) : null;
|
|
@@ -11306,7 +11307,9 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
11306
11307
|
"word/document.xml": String(documentXml),
|
|
11307
11308
|
"word/_rels/document.xml.rels": String(rels),
|
|
11308
11309
|
"docProps/custom.xml": String(customXml),
|
|
11309
|
-
"word/settings.xml": String(customSettings)
|
|
11310
|
+
"word/settings.xml": String(customSettings),
|
|
11311
|
+
// Replace & with & in styles.xml as DOCX viewers can't handle it
|
|
11312
|
+
"word/styles.xml": String(styles).replace(/&/gi, "&")
|
|
11310
11313
|
};
|
|
11311
11314
|
if (updatedCommentsXml) updatedDocs["word/comments.xml"] = String(updatedCommentsXml);
|
|
11312
11315
|
const zipper = new DocxZipper();
|
|
@@ -11345,7 +11348,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
11345
11348
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
11346
11349
|
*/
|
|
11347
11350
|
processCollaborationMigrations() {
|
|
11348
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.6.
|
|
11351
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.6.11");
|
|
11349
11352
|
if (!this.options.ydoc) return;
|
|
11350
11353
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
11351
11354
|
let docVersion = metaMap.get("version");
|
|
@@ -19384,4 +19387,4 @@ export {
|
|
|
19384
19387
|
redoDepth as r,
|
|
19385
19388
|
undoDepth as u
|
|
19386
19389
|
};
|
|
19387
|
-
//# sourceMappingURL=editor-
|
|
19390
|
+
//# sourceMappingURL=editor-S_v8wD_U.js.map
|