@harbour-enterprises/superdoc 1.7.0-next.5 → 1.7.0-next.7
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-DbdY4nxk.cjs → PdfViewer-CPavU1ww.cjs} +2 -2
- package/dist/chunks/{PdfViewer-CMz0vPEp.es.js → PdfViewer-DXTnaF8I.es.js} +2 -2
- package/dist/chunks/{SuperConverter-DU1Tqi67.es.js → SuperConverter-CQtzIJhu.es.js} +21 -1
- package/dist/chunks/{SuperConverter-CGlcEWcs.cjs → SuperConverter-ChOaRc8I.cjs} +21 -1
- package/dist/chunks/{index-Clk0gT7d.cjs → index-Brw_Mb9u.cjs} +4 -4
- package/dist/chunks/{index-DYUIpqx9.es.js → index-C16jjGce.es.js} +270 -62
- package/dist/chunks/{index-BQo9zrNo.es.js → index-CWf082Tz.es.js} +4 -4
- package/dist/chunks/{index-i_RngoBn.cjs → index-menqq4VC.cjs} +270 -62
- package/dist/super-editor/converter.cjs +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor.cjs +2 -2
- package/dist/super-editor.es.js +3 -3
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +296 -68
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("./vue-De9wkgLl.cjs");
|
|
4
|
-
const superdoc = require("./index-
|
|
5
|
-
const index = require("./index-
|
|
4
|
+
const superdoc = require("./index-Brw_Mb9u.cjs");
|
|
5
|
+
const index = require("./index-menqq4VC.cjs");
|
|
6
6
|
function self(vars) {
|
|
7
7
|
const {
|
|
8
8
|
opacityDisabled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as defineComponent, h, T as Transition, p as process$1, w as watchEffect, c as computed, r as ref, f as onMounted, X as onUnmounted, E as createElementBlock, G as openBlock, K as createBaseVNode, M as createCommentVNode, I as createVNode, v as unref } from "./vue-BnBKJwCW.es.js";
|
|
2
|
-
import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-
|
|
3
|
-
import { C as derived, r as c, q as cB, aF as fadeInTransition, y as cM, I as warnOnce, J as useConfig, N as useTheme, aG as pxfy, P as createKey, Q as useThemeClass, aH as useCompitable, ai as _export_sfc } from "./index-
|
|
2
|
+
import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-CWf082Tz.es.js";
|
|
3
|
+
import { C as derived, r as c, q as cB, aF as fadeInTransition, y as cM, I as warnOnce, J as useConfig, N as useTheme, aG as pxfy, P as createKey, Q as useThemeClass, aH as useCompitable, ai as _export_sfc } from "./index-C16jjGce.es.js";
|
|
4
4
|
function self(vars) {
|
|
5
5
|
const {
|
|
6
6
|
opacityDisabled,
|
|
@@ -19458,6 +19458,26 @@ const preProcessPageFieldsOnly = (nodes = [], depth = 0) => {
|
|
|
19458
19458
|
}
|
|
19459
19459
|
const fldCharEl = node.elements?.find((el) => el.name === "w:fldChar");
|
|
19460
19460
|
const fldType = fldCharEl?.attributes?.["w:fldCharType"];
|
|
19461
|
+
if (node.name === "w:fldSimple") {
|
|
19462
|
+
const instrAttr = node.attributes?.["w:instr"] || "";
|
|
19463
|
+
const fieldType = instrAttr.trim().split(/\s+/)[0];
|
|
19464
|
+
if (fieldType === "PAGE" || fieldType === "NUMPAGES") {
|
|
19465
|
+
const preprocessor = fieldType === "PAGE" ? preProcessPageInstruction : preProcessNumPagesInstruction;
|
|
19466
|
+
const contentNodes = node.elements || [];
|
|
19467
|
+
let fieldRunRPr = null;
|
|
19468
|
+
for (const child of contentNodes) {
|
|
19469
|
+
const rPr = child.elements?.find((el) => el.name === "w:rPr");
|
|
19470
|
+
if (rPr) {
|
|
19471
|
+
fieldRunRPr = rPr;
|
|
19472
|
+
break;
|
|
19473
|
+
}
|
|
19474
|
+
}
|
|
19475
|
+
const processedField = preprocessor(contentNodes, instrAttr.trim(), fieldRunRPr);
|
|
19476
|
+
processedNodes.push(...processedField);
|
|
19477
|
+
i++;
|
|
19478
|
+
continue;
|
|
19479
|
+
}
|
|
19480
|
+
}
|
|
19461
19481
|
if (fldType === "begin") {
|
|
19462
19482
|
const fieldInfo = scanFieldSequence(nodes, i);
|
|
19463
19483
|
if (fieldInfo && (fieldInfo.fieldType === "PAGE" || fieldInfo.fieldType === "NUMPAGES")) {
|
|
@@ -32769,7 +32789,7 @@ class SuperConverter {
|
|
|
32769
32789
|
static getStoredSuperdocVersion(docx) {
|
|
32770
32790
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
32771
32791
|
}
|
|
32772
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.
|
|
32792
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.7") {
|
|
32773
32793
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
32774
32794
|
}
|
|
32775
32795
|
/**
|
|
@@ -19459,6 +19459,26 @@ const preProcessPageFieldsOnly = (nodes = [], depth = 0) => {
|
|
|
19459
19459
|
}
|
|
19460
19460
|
const fldCharEl = node.elements?.find((el) => el.name === "w:fldChar");
|
|
19461
19461
|
const fldType = fldCharEl?.attributes?.["w:fldCharType"];
|
|
19462
|
+
if (node.name === "w:fldSimple") {
|
|
19463
|
+
const instrAttr = node.attributes?.["w:instr"] || "";
|
|
19464
|
+
const fieldType = instrAttr.trim().split(/\s+/)[0];
|
|
19465
|
+
if (fieldType === "PAGE" || fieldType === "NUMPAGES") {
|
|
19466
|
+
const preprocessor = fieldType === "PAGE" ? preProcessPageInstruction : preProcessNumPagesInstruction;
|
|
19467
|
+
const contentNodes = node.elements || [];
|
|
19468
|
+
let fieldRunRPr = null;
|
|
19469
|
+
for (const child of contentNodes) {
|
|
19470
|
+
const rPr = child.elements?.find((el) => el.name === "w:rPr");
|
|
19471
|
+
if (rPr) {
|
|
19472
|
+
fieldRunRPr = rPr;
|
|
19473
|
+
break;
|
|
19474
|
+
}
|
|
19475
|
+
}
|
|
19476
|
+
const processedField = preprocessor(contentNodes, instrAttr.trim(), fieldRunRPr);
|
|
19477
|
+
processedNodes.push(...processedField);
|
|
19478
|
+
i++;
|
|
19479
|
+
continue;
|
|
19480
|
+
}
|
|
19481
|
+
}
|
|
19462
19482
|
if (fldType === "begin") {
|
|
19463
19483
|
const fieldInfo = scanFieldSequence(nodes, i);
|
|
19464
19484
|
if (fieldInfo && (fieldInfo.fieldType === "PAGE" || fieldInfo.fieldType === "NUMPAGES")) {
|
|
@@ -32770,7 +32790,7 @@ class SuperConverter {
|
|
|
32770
32790
|
static getStoredSuperdocVersion(docx) {
|
|
32771
32791
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
32772
32792
|
}
|
|
32773
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.
|
|
32793
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.7") {
|
|
32774
32794
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
32775
32795
|
}
|
|
32776
32796
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const index = require("./index-
|
|
3
|
-
require("./SuperConverter-
|
|
2
|
+
const index = require("./index-menqq4VC.cjs");
|
|
3
|
+
require("./SuperConverter-ChOaRc8I.cjs");
|
|
4
4
|
const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
|
|
5
5
|
const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
|
|
6
6
|
const provider = require("@hocuspocus/provider");
|
|
@@ -7530,7 +7530,7 @@ const _sfc_main = {
|
|
|
7530
7530
|
__name: "SuperDoc",
|
|
7531
7531
|
emits: ["selection-update"],
|
|
7532
7532
|
setup(__props, { emit: __emit }) {
|
|
7533
|
-
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-
|
|
7533
|
+
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-CPavU1ww.cjs")));
|
|
7534
7534
|
const superdocStore = useSuperdocStore();
|
|
7535
7535
|
const commentsStore = useCommentsStore();
|
|
7536
7536
|
const {
|
|
@@ -8484,7 +8484,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
8484
8484
|
this.config.colors = shuffleArray(this.config.colors);
|
|
8485
8485
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
8486
8486
|
this.colorIndex = 0;
|
|
8487
|
-
this.version = "1.7.0-next.
|
|
8487
|
+
this.version = "1.7.0-next.7";
|
|
8488
8488
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
8489
8489
|
this.superdocId = config.superdocId || uuid.v4();
|
|
8490
8490
|
this.colors = this.config.colors;
|