@harbour-enterprises/superdoc 0.14.0-next.6 → 0.14.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/{index-BABtK_9p.cjs → index-CE6UNfC5.cjs} +2 -2
- package/dist/chunks/{index-DRG7AiQg.es.js → index-CW9fKHgN.es.js} +2 -2
- package/dist/chunks/{index-BOOtEcgZ.cjs → index-DGsxwjB4.cjs} +1 -1
- package/dist/chunks/{index-ClYNVXDv.es.js → index-DHn8sl2L.es.js} +1 -1
- package/dist/chunks/{super-editor.es-CETApTAM.cjs → super-editor.es-CC5VKrmG.cjs} +24 -7
- package/dist/chunks/{super-editor.es-PFHHaxd8.es.js → super-editor.es-CHIPGDMw.es.js} +24 -7
- package/dist/chunks/{url-BmSVZ-b1.cjs → url-CUv5CLO-.cjs} +1 -1
- package/dist/chunks/{url-DtyZlUvQ.es.js → url-CZOvt3H8.es.js} +1 -1
- package/dist/chunks/{xml-js-uhSaCX_L.es.js → xml-js-D5Licdr-.es.js} +158 -123
- package/dist/chunks/{xml-js-PTtx0UCg.cjs → xml-js-tHwLFq2w.cjs} +158 -123
- package/dist/style.css +3 -0
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-DXxu8c9w.js → converter-KLGCJKrA.js} +16 -3
- package/dist/super-editor/chunks/{docx-zipper-DjxR5LqI.js → docx-zipper-BPKYuqf2.js} +1 -1
- package/dist/super-editor/chunks/{editor-DQyfLPCk.js → editor-DoiOk-Hp.js} +10 -6
- package/dist/super-editor/chunks/{toolbar-LIs10qdJ.js → toolbar-DWETeuSj.js} +2 -2
- 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/exporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/hyperlinkImporter.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/extensions/pagination/pagination-helpers.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +3 -0
- 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 +5 -5
- package/dist/superdoc.es.js +6 -6
- package/dist/superdoc.umd.js +25 -8
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jszip = require("./jszip-9bCX1h2W.cjs");
|
|
3
3
|
const vue = require("./vue-BBjMeYfo.cjs");
|
|
4
|
-
const xmlJs = require("./xml-js-
|
|
5
|
-
const url = require("./url-
|
|
4
|
+
const xmlJs = require("./xml-js-tHwLFq2w.cjs");
|
|
5
|
+
const url = require("./url-CUv5CLO-.cjs");
|
|
6
6
|
function _mergeNamespaces(n, m) {
|
|
7
7
|
for (var i = 0; i < m.length; i++) {
|
|
8
8
|
const e = m[i];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as commonjsGlobal, B as Buffer, a as getAugmentedNamespace, g as getDefaultExportFromCjs } from "./jszip-Cl3s9njw.es.js";
|
|
2
2
|
import { p as process$1 } from "./vue-BBJVqxjL.es.js";
|
|
3
|
-
import { e as eventsExports, r as require$$2, u as util, i as inherits_browserExports, b as browser$1, a as requireString_decoder } from "./xml-js-
|
|
4
|
-
import { u as url } from "./url-
|
|
3
|
+
import { e as eventsExports, r as require$$2, u as util, i as inherits_browserExports, b as browser$1, a as requireString_decoder } from "./xml-js-D5Licdr-.es.js";
|
|
4
|
+
import { u as url } from "./url-CZOvt3H8.es.js";
|
|
5
5
|
function _mergeNamespaces(n, m) {
|
|
6
6
|
for (var i = 0; i < m.length; i++) {
|
|
7
7
|
const e = m[i];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as getDefaultExportFromCjs } from "./jszip-Cl3s9njw.es.js";
|
|
2
|
-
import { s as streamHttp, r as require$$1 } from "./index-
|
|
2
|
+
import { s as streamHttp, r as require$$1 } from "./index-CW9fKHgN.es.js";
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
for (var i = 0; i < m.length; i++) {
|
|
5
5
|
const e = m[i];
|
|
@@ -19798,13 +19798,21 @@ function processLinkContentNode(node2) {
|
|
|
19798
19798
|
name: "w:color",
|
|
19799
19799
|
attributes: { "w:val": "467886" }
|
|
19800
19800
|
};
|
|
19801
|
+
const underline = {
|
|
19802
|
+
name: "w:u",
|
|
19803
|
+
attributes: {
|
|
19804
|
+
"w:val": "none"
|
|
19805
|
+
}
|
|
19806
|
+
};
|
|
19801
19807
|
if (contentNode.name === "w:r") {
|
|
19802
19808
|
const runProps = contentNode.elements.find((el) => el.name === "w:rPr");
|
|
19803
19809
|
if (runProps) {
|
|
19804
19810
|
const foundColor = runProps.elements.find((el) => el.name === "w:color");
|
|
19805
19811
|
const foundHyperlinkStyle = runProps.elements.find((el) => el.name === "w:rStyle");
|
|
19812
|
+
const underlineMark = runProps.elements.find((el) => el.name === "w:u");
|
|
19806
19813
|
if (!foundColor) runProps.elements.unshift(color);
|
|
19807
19814
|
if (!foundHyperlinkStyle) runProps.elements.unshift(hyperlinkStyle);
|
|
19815
|
+
if (!underlineMark) runProps.elements.unshift(underline);
|
|
19808
19816
|
} else {
|
|
19809
19817
|
const runProps2 = {
|
|
19810
19818
|
name: "w:rPr",
|
|
@@ -21826,7 +21834,12 @@ const handleHyperlinkNode = (params2) => {
|
|
|
21826
21834
|
const styleElements = elements2.filter((el) => el.name === "w:style");
|
|
21827
21835
|
const style2 = styleElements.find((el) => el.attributes["w:styleId"] === "Hyperlink");
|
|
21828
21836
|
const styleRpr = style2?.elements?.find((el) => el.name === "w:rPr");
|
|
21829
|
-
if (styleRpr)
|
|
21837
|
+
if (styleRpr) {
|
|
21838
|
+
styleRpr.elements.forEach((styleEl) => {
|
|
21839
|
+
const hasElInRPr = rPr.elements.find((el) => el.name === styleEl.name);
|
|
21840
|
+
if (!hasElInRPr) rPr.elements.push(styleEl);
|
|
21841
|
+
});
|
|
21842
|
+
}
|
|
21830
21843
|
}
|
|
21831
21844
|
}
|
|
21832
21845
|
}
|
|
@@ -24252,7 +24265,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
24252
24265
|
return;
|
|
24253
24266
|
}
|
|
24254
24267
|
}
|
|
24255
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.0-next.
|
|
24268
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.0-next.8") {
|
|
24256
24269
|
const customLocation = "docProps/custom.xml";
|
|
24257
24270
|
if (!docx[customLocation]) {
|
|
24258
24271
|
docx[customLocation] = generateCustomXml();
|
|
@@ -24720,7 +24733,7 @@ function storeSuperdocVersion(docx) {
|
|
|
24720
24733
|
function generateCustomXml() {
|
|
24721
24734
|
return DEFAULT_CUSTOM_XML;
|
|
24722
24735
|
}
|
|
24723
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.14.0-next.
|
|
24736
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.14.0-next.8") {
|
|
24724
24737
|
return {
|
|
24725
24738
|
type: "element",
|
|
24726
24739
|
name: "property",
|
|
@@ -39798,6 +39811,8 @@ const createHeaderFooterEditor = ({
|
|
|
39798
39811
|
});
|
|
39799
39812
|
if (appendToBody) document.body.appendChild(editorContainer);
|
|
39800
39813
|
const headerFooterEditor = new Editor({
|
|
39814
|
+
documentMode: editor.options.documentMode,
|
|
39815
|
+
role: editor.options.role,
|
|
39801
39816
|
loadFromSchema: true,
|
|
39802
39817
|
mode: "docx",
|
|
39803
39818
|
element: editorContainer,
|
|
@@ -41939,7 +41954,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
41939
41954
|
* @returns {Object | void} Migration results
|
|
41940
41955
|
*/
|
|
41941
41956
|
processCollaborationMigrations() {
|
|
41942
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.14.0-next.
|
|
41957
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.14.0-next.8");
|
|
41943
41958
|
if (!this.options.ydoc) return;
|
|
41944
41959
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
41945
41960
|
let docVersion = metaMap.get("version");
|
|
@@ -42136,8 +42151,6 @@ init_fn = function(options2) {
|
|
|
42136
42151
|
this.on("contentError", this.options.onContentError);
|
|
42137
42152
|
this.on("exception", this.options.onException);
|
|
42138
42153
|
this.mount(this.options.element);
|
|
42139
|
-
this.initDefaultStyles();
|
|
42140
|
-
this.setDocumentMode(options2.documentMode);
|
|
42141
42154
|
if (this.options.isHeadless) return;
|
|
42142
42155
|
this.on("create", this.options.onCreate);
|
|
42143
42156
|
this.on("update", this.options.onUpdate);
|
|
@@ -42155,6 +42168,10 @@ init_fn = function(options2) {
|
|
|
42155
42168
|
this.on("paginationUpdate", this.options.onPaginationUpdate);
|
|
42156
42169
|
this.on("comment-positions", this.options.onCommentLocationsUpdate);
|
|
42157
42170
|
this.initializeCollaborationData();
|
|
42171
|
+
this.initDefaultStyles();
|
|
42172
|
+
setTimeout(() => {
|
|
42173
|
+
this.setDocumentMode(this.options.documentMode);
|
|
42174
|
+
}, 50);
|
|
42158
42175
|
if (!this.options.ydoc) {
|
|
42159
42176
|
this.initPagination();
|
|
42160
42177
|
__privateMethod$1(this, _Editor_instances, initComments_fn).call(this);
|
|
@@ -50517,7 +50534,7 @@ const Link = Mark2.create({
|
|
|
50517
50534
|
addCommands() {
|
|
50518
50535
|
return {
|
|
50519
50536
|
setLink: ({ href }) => ({ chain }) => {
|
|
50520
|
-
return chain().setMark(this.name, { href }).run();
|
|
50537
|
+
return chain().setMark("underline").setMark(this.name, { href }).run();
|
|
50521
50538
|
},
|
|
50522
50539
|
unsetLink: () => ({ chain }) => {
|
|
50523
50540
|
return chain().unsetMark("underline").unsetColor().unsetMark(this.name, { extendEmptyMarkRange: true }).run();
|
|
@@ -19781,13 +19781,21 @@ function processLinkContentNode(node2) {
|
|
|
19781
19781
|
name: "w:color",
|
|
19782
19782
|
attributes: { "w:val": "467886" }
|
|
19783
19783
|
};
|
|
19784
|
+
const underline = {
|
|
19785
|
+
name: "w:u",
|
|
19786
|
+
attributes: {
|
|
19787
|
+
"w:val": "none"
|
|
19788
|
+
}
|
|
19789
|
+
};
|
|
19784
19790
|
if (contentNode.name === "w:r") {
|
|
19785
19791
|
const runProps = contentNode.elements.find((el) => el.name === "w:rPr");
|
|
19786
19792
|
if (runProps) {
|
|
19787
19793
|
const foundColor = runProps.elements.find((el) => el.name === "w:color");
|
|
19788
19794
|
const foundHyperlinkStyle = runProps.elements.find((el) => el.name === "w:rStyle");
|
|
19795
|
+
const underlineMark = runProps.elements.find((el) => el.name === "w:u");
|
|
19789
19796
|
if (!foundColor) runProps.elements.unshift(color);
|
|
19790
19797
|
if (!foundHyperlinkStyle) runProps.elements.unshift(hyperlinkStyle);
|
|
19798
|
+
if (!underlineMark) runProps.elements.unshift(underline);
|
|
19791
19799
|
} else {
|
|
19792
19800
|
const runProps2 = {
|
|
19793
19801
|
name: "w:rPr",
|
|
@@ -21809,7 +21817,12 @@ const handleHyperlinkNode = (params2) => {
|
|
|
21809
21817
|
const styleElements = elements2.filter((el) => el.name === "w:style");
|
|
21810
21818
|
const style2 = styleElements.find((el) => el.attributes["w:styleId"] === "Hyperlink");
|
|
21811
21819
|
const styleRpr = style2?.elements?.find((el) => el.name === "w:rPr");
|
|
21812
|
-
if (styleRpr)
|
|
21820
|
+
if (styleRpr) {
|
|
21821
|
+
styleRpr.elements.forEach((styleEl) => {
|
|
21822
|
+
const hasElInRPr = rPr.elements.find((el) => el.name === styleEl.name);
|
|
21823
|
+
if (!hasElInRPr) rPr.elements.push(styleEl);
|
|
21824
|
+
});
|
|
21825
|
+
}
|
|
21813
21826
|
}
|
|
21814
21827
|
}
|
|
21815
21828
|
}
|
|
@@ -24235,7 +24248,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
24235
24248
|
return;
|
|
24236
24249
|
}
|
|
24237
24250
|
}
|
|
24238
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.0-next.
|
|
24251
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.0-next.8") {
|
|
24239
24252
|
const customLocation = "docProps/custom.xml";
|
|
24240
24253
|
if (!docx[customLocation]) {
|
|
24241
24254
|
docx[customLocation] = generateCustomXml();
|
|
@@ -24703,7 +24716,7 @@ function storeSuperdocVersion(docx) {
|
|
|
24703
24716
|
function generateCustomXml() {
|
|
24704
24717
|
return DEFAULT_CUSTOM_XML;
|
|
24705
24718
|
}
|
|
24706
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.14.0-next.
|
|
24719
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.14.0-next.8") {
|
|
24707
24720
|
return {
|
|
24708
24721
|
type: "element",
|
|
24709
24722
|
name: "property",
|
|
@@ -39781,6 +39794,8 @@ const createHeaderFooterEditor = ({
|
|
|
39781
39794
|
});
|
|
39782
39795
|
if (appendToBody) document.body.appendChild(editorContainer);
|
|
39783
39796
|
const headerFooterEditor = new Editor({
|
|
39797
|
+
documentMode: editor.options.documentMode,
|
|
39798
|
+
role: editor.options.role,
|
|
39784
39799
|
loadFromSchema: true,
|
|
39785
39800
|
mode: "docx",
|
|
39786
39801
|
element: editorContainer,
|
|
@@ -41922,7 +41937,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
41922
41937
|
* @returns {Object | void} Migration results
|
|
41923
41938
|
*/
|
|
41924
41939
|
processCollaborationMigrations() {
|
|
41925
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.14.0-next.
|
|
41940
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.14.0-next.8");
|
|
41926
41941
|
if (!this.options.ydoc) return;
|
|
41927
41942
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
41928
41943
|
let docVersion = metaMap.get("version");
|
|
@@ -42119,8 +42134,6 @@ init_fn = function(options2) {
|
|
|
42119
42134
|
this.on("contentError", this.options.onContentError);
|
|
42120
42135
|
this.on("exception", this.options.onException);
|
|
42121
42136
|
this.mount(this.options.element);
|
|
42122
|
-
this.initDefaultStyles();
|
|
42123
|
-
this.setDocumentMode(options2.documentMode);
|
|
42124
42137
|
if (this.options.isHeadless) return;
|
|
42125
42138
|
this.on("create", this.options.onCreate);
|
|
42126
42139
|
this.on("update", this.options.onUpdate);
|
|
@@ -42138,6 +42151,10 @@ init_fn = function(options2) {
|
|
|
42138
42151
|
this.on("paginationUpdate", this.options.onPaginationUpdate);
|
|
42139
42152
|
this.on("comment-positions", this.options.onCommentLocationsUpdate);
|
|
42140
42153
|
this.initializeCollaborationData();
|
|
42154
|
+
this.initDefaultStyles();
|
|
42155
|
+
setTimeout(() => {
|
|
42156
|
+
this.setDocumentMode(this.options.documentMode);
|
|
42157
|
+
}, 50);
|
|
42141
42158
|
if (!this.options.ydoc) {
|
|
42142
42159
|
this.initPagination();
|
|
42143
42160
|
__privateMethod$1(this, _Editor_instances, initComments_fn).call(this);
|
|
@@ -50500,7 +50517,7 @@ const Link = Mark2.create({
|
|
|
50500
50517
|
addCommands() {
|
|
50501
50518
|
return {
|
|
50502
50519
|
setLink: ({ href }) => ({ chain }) => {
|
|
50503
|
-
return chain().setMark(this.name, { href }).run();
|
|
50520
|
+
return chain().setMark("underline").setMark(this.name, { href }).run();
|
|
50504
50521
|
},
|
|
50505
50522
|
unsetLink: () => ({ chain }) => {
|
|
50506
50523
|
return chain().unsetMark("underline").unsetColor().unsetMark(this.name, { extendEmptyMarkRange: true }).run();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jszip = require("./jszip-9bCX1h2W.cjs");
|
|
3
|
-
const xmlJs = require("./xml-js-
|
|
3
|
+
const xmlJs = require("./xml-js-tHwLFq2w.cjs");
|
|
4
4
|
const __viteBrowserExternal = require("./__vite-browser-external-DWbQq7bv.cjs");
|
|
5
5
|
var punycode$1 = { exports: {} };
|
|
6
6
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs, a as getAugmentedNamespace } from "./jszip-Cl3s9njw.es.js";
|
|
2
|
-
import { t as type, g as getIntrinsic, c as callBound$2 } from "./xml-js-
|
|
2
|
+
import { t as type, g as getIntrinsic, c as callBound$2 } from "./xml-js-D5Licdr-.es.js";
|
|
3
3
|
import { _ as __viteBrowserExternal } from "./__vite-browser-external-CURh0WXD.es.js";
|
|
4
4
|
var punycode$1 = { exports: {} };
|
|
5
5
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|