@harbour-enterprises/superdoc 1.6.2-next.1 → 1.6.2-next.2
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-OL88sCWB.es.js → PdfViewer-IT3aSu9N.es.js} +2 -2
- package/dist/chunks/{PdfViewer-D3ZPLsf_.cjs → PdfViewer-uehEPBjA.cjs} +2 -2
- package/dist/chunks/{SuperConverter-C0XQKCFE.es.js → SuperConverter-DV9FLzAm.es.js} +7 -31
- package/dist/chunks/{SuperConverter-WGV_oa5q.cjs → SuperConverter-Dl5ZjZXT.cjs} +7 -31
- package/dist/chunks/{index-B3o5HZQ4.cjs → index-C0YK2x9X.cjs} +4 -4
- package/dist/chunks/{index-zOfz1dJM.es.js → index-D03d2CXB.es.js} +101 -16
- package/dist/chunks/{index-DFTBmHEi.es.js → index-DxF7hj37.es.js} +4 -4
- package/dist/chunks/{index-CXtUgi4l.cjs → index-zPnPJugU.cjs} +101 -16
- 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 +12 -36
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +2 -2
|
@@ -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-DxF7hj37.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-D03d2CXB.es.js";
|
|
4
4
|
function self(vars) {
|
|
5
5
|
const {
|
|
6
6
|
opacityDisabled,
|
|
@@ -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-C0YK2x9X.cjs");
|
|
5
|
+
const index = require("./index-zPnPJugU.cjs");
|
|
6
6
|
function self(vars) {
|
|
7
7
|
const {
|
|
8
8
|
opacityDisabled,
|
|
@@ -9614,20 +9614,6 @@ function handleTableCellNode({
|
|
|
9614
9614
|
tableCellProperties,
|
|
9615
9615
|
referencedStyles
|
|
9616
9616
|
});
|
|
9617
|
-
const hasRowOverrideNone = rowBorders && ["top", "left", "bottom", "right", "insideH", "insideV"].some((side) => rowBorders?.[side]?.val === "none");
|
|
9618
|
-
if (hasRowOverrideNone && isFirstColumn) {
|
|
9619
|
-
console.info(
|
|
9620
|
-
"[sd-table-borders] cell borders",
|
|
9621
|
-
JSON.stringify({
|
|
9622
|
-
rowIndex,
|
|
9623
|
-
columnIndex,
|
|
9624
|
-
totalColumns: effectiveTotalColumns,
|
|
9625
|
-
baseTableBorders,
|
|
9626
|
-
rowBorders,
|
|
9627
|
-
cellBorders: attributes["borders"]
|
|
9628
|
-
})
|
|
9629
|
-
);
|
|
9630
|
-
}
|
|
9631
9617
|
if (colspan > 1) attributes["colspan"] = colspan;
|
|
9632
9618
|
let width = tableCellProperties.cellWidth?.value ? twipsToPixels(tableCellProperties.cellWidth?.value) : null;
|
|
9633
9619
|
const widthType = tableCellProperties.cellWidth?.type;
|
|
@@ -10318,7 +10304,6 @@ const encode$y = (params, encodedAttrs) => {
|
|
|
10318
10304
|
return newNode;
|
|
10319
10305
|
};
|
|
10320
10306
|
function getRowBorders({ params, row, baseBorders }) {
|
|
10321
|
-
const rowIndex = params?.extraParams?.rowIndex;
|
|
10322
10307
|
const tblPrEx = row?.elements?.find?.((el) => el.name === "w:tblPrEx");
|
|
10323
10308
|
const tblBorders = tblPrEx?.elements?.find?.((el) => el.name === "w:tblBorders");
|
|
10324
10309
|
const rowBaseBorders = {};
|
|
@@ -10334,17 +10319,9 @@ function getRowBorders({ params, row, baseBorders }) {
|
|
|
10334
10319
|
const rawOverrides = translator$J.encode({ ...params, nodes: [tblBorders] }) || {};
|
|
10335
10320
|
const overrides = processRawTableBorders(rawOverrides);
|
|
10336
10321
|
if (!Object.keys(overrides).length) {
|
|
10337
|
-
console.info(
|
|
10338
|
-
"[sd-table-borders] row tblPrEx overrides empty",
|
|
10339
|
-
JSON.stringify({ rowIndex, baseBorders: rowBaseBorders, rawOverrides })
|
|
10340
|
-
);
|
|
10341
10322
|
return rowBaseBorders;
|
|
10342
10323
|
}
|
|
10343
10324
|
const rowBorders = { ...rowBaseBorders, ...overrides };
|
|
10344
|
-
console.info(
|
|
10345
|
-
"[sd-table-borders] row tblPrEx overrides",
|
|
10346
|
-
JSON.stringify({ rowIndex, baseBorders: rowBaseBorders, rawOverrides, overrides, rowBorders })
|
|
10347
|
-
);
|
|
10348
10325
|
return rowBorders;
|
|
10349
10326
|
}
|
|
10350
10327
|
function processRawTableBorders(rawBorders) {
|
|
@@ -30737,9 +30714,9 @@ function handleShapeTextWatermarkImport({ pict }) {
|
|
|
30737
30714
|
height: svgResult.svgHeight
|
|
30738
30715
|
},
|
|
30739
30716
|
marginOffset: {
|
|
30740
|
-
|
|
30741
|
-
//
|
|
30742
|
-
|
|
30717
|
+
// For center-aligned watermarks relative to margin, Word's margin values
|
|
30718
|
+
// are not suitable for browser rendering. Set to 0 to let center alignment work.
|
|
30719
|
+
horizontal: hPosition === "center" && hRelativeTo === "margin" ? 0 : convertToPixels(position.marginLeft),
|
|
30743
30720
|
top: vPosition === "center" && vRelativeTo === "margin" ? 0 : convertToPixels(position.marginTop)
|
|
30744
30721
|
},
|
|
30745
30722
|
// Store text watermark specific data for export
|
|
@@ -30818,11 +30795,11 @@ function generateTextWatermarkSVG({ text, width, height, rotation, fill, textSty
|
|
|
30818
30795
|
const sin = Math.abs(Math.sin(radians));
|
|
30819
30796
|
const rotatedWidth = sanitizedWidth * cos + sanitizedHeight * sin;
|
|
30820
30797
|
const rotatedHeight = sanitizedWidth * sin + sanitizedHeight * cos;
|
|
30821
|
-
const svgWidth = Math.max(sanitizedWidth, rotatedWidth);
|
|
30822
|
-
const svgHeight = Math.max(sanitizedHeight, rotatedHeight);
|
|
30798
|
+
const svgWidth = Math.max(sanitizedWidth, rotatedWidth) * 1.1;
|
|
30799
|
+
const svgHeight = Math.max(sanitizedHeight, rotatedHeight) * 1.1;
|
|
30823
30800
|
const centerX = svgWidth / 2;
|
|
30824
30801
|
const centerY = svgHeight / 2;
|
|
30825
|
-
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${svgWidth}" height="${svgHeight}" viewBox="0 0 ${svgWidth} ${svgHeight}">
|
|
30802
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${svgWidth}" height="${svgHeight}" viewBox="0 0 ${svgWidth} ${svgHeight}" style="overflow: visible;">
|
|
30826
30803
|
<text
|
|
30827
30804
|
x="${centerX}"
|
|
30828
30805
|
y="${centerY}"
|
|
@@ -30830,7 +30807,6 @@ function generateTextWatermarkSVG({ text, width, height, rotation, fill, textSty
|
|
|
30830
30807
|
dominant-baseline="middle"
|
|
30831
30808
|
font-family="${fontFamily}"
|
|
30832
30809
|
font-size="${sanitizedFontSize}px"
|
|
30833
|
-
font-weight="bold"
|
|
30834
30810
|
fill="${color}"
|
|
30835
30811
|
opacity="${opacity}"
|
|
30836
30812
|
transform="rotate(${sanitizedRotation} ${centerX} ${centerY})">${escapeXml(text)}</text>
|
|
@@ -32669,7 +32645,7 @@ class SuperConverter {
|
|
|
32669
32645
|
static getStoredSuperdocVersion(docx) {
|
|
32670
32646
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
32671
32647
|
}
|
|
32672
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.6.2-next.
|
|
32648
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.6.2-next.2") {
|
|
32673
32649
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
32674
32650
|
}
|
|
32675
32651
|
/**
|
|
@@ -9615,20 +9615,6 @@ function handleTableCellNode({
|
|
|
9615
9615
|
tableCellProperties,
|
|
9616
9616
|
referencedStyles
|
|
9617
9617
|
});
|
|
9618
|
-
const hasRowOverrideNone = rowBorders && ["top", "left", "bottom", "right", "insideH", "insideV"].some((side) => rowBorders?.[side]?.val === "none");
|
|
9619
|
-
if (hasRowOverrideNone && isFirstColumn) {
|
|
9620
|
-
console.info(
|
|
9621
|
-
"[sd-table-borders] cell borders",
|
|
9622
|
-
JSON.stringify({
|
|
9623
|
-
rowIndex,
|
|
9624
|
-
columnIndex,
|
|
9625
|
-
totalColumns: effectiveTotalColumns,
|
|
9626
|
-
baseTableBorders,
|
|
9627
|
-
rowBorders,
|
|
9628
|
-
cellBorders: attributes["borders"]
|
|
9629
|
-
})
|
|
9630
|
-
);
|
|
9631
|
-
}
|
|
9632
9618
|
if (colspan > 1) attributes["colspan"] = colspan;
|
|
9633
9619
|
let width = tableCellProperties.cellWidth?.value ? helpers.twipsToPixels(tableCellProperties.cellWidth?.value) : null;
|
|
9634
9620
|
const widthType = tableCellProperties.cellWidth?.type;
|
|
@@ -10319,7 +10305,6 @@ const encode$y = (params, encodedAttrs) => {
|
|
|
10319
10305
|
return newNode;
|
|
10320
10306
|
};
|
|
10321
10307
|
function getRowBorders({ params, row, baseBorders }) {
|
|
10322
|
-
const rowIndex = params?.extraParams?.rowIndex;
|
|
10323
10308
|
const tblPrEx = row?.elements?.find?.((el) => el.name === "w:tblPrEx");
|
|
10324
10309
|
const tblBorders = tblPrEx?.elements?.find?.((el) => el.name === "w:tblBorders");
|
|
10325
10310
|
const rowBaseBorders = {};
|
|
@@ -10335,17 +10320,9 @@ function getRowBorders({ params, row, baseBorders }) {
|
|
|
10335
10320
|
const rawOverrides = translator$J.encode({ ...params, nodes: [tblBorders] }) || {};
|
|
10336
10321
|
const overrides = processRawTableBorders(rawOverrides);
|
|
10337
10322
|
if (!Object.keys(overrides).length) {
|
|
10338
|
-
console.info(
|
|
10339
|
-
"[sd-table-borders] row tblPrEx overrides empty",
|
|
10340
|
-
JSON.stringify({ rowIndex, baseBorders: rowBaseBorders, rawOverrides })
|
|
10341
|
-
);
|
|
10342
10323
|
return rowBaseBorders;
|
|
10343
10324
|
}
|
|
10344
10325
|
const rowBorders = { ...rowBaseBorders, ...overrides };
|
|
10345
|
-
console.info(
|
|
10346
|
-
"[sd-table-borders] row tblPrEx overrides",
|
|
10347
|
-
JSON.stringify({ rowIndex, baseBorders: rowBaseBorders, rawOverrides, overrides, rowBorders })
|
|
10348
|
-
);
|
|
10349
10326
|
return rowBorders;
|
|
10350
10327
|
}
|
|
10351
10328
|
function processRawTableBorders(rawBorders) {
|
|
@@ -30738,9 +30715,9 @@ function handleShapeTextWatermarkImport({ pict }) {
|
|
|
30738
30715
|
height: svgResult.svgHeight
|
|
30739
30716
|
},
|
|
30740
30717
|
marginOffset: {
|
|
30741
|
-
|
|
30742
|
-
//
|
|
30743
|
-
|
|
30718
|
+
// For center-aligned watermarks relative to margin, Word's margin values
|
|
30719
|
+
// are not suitable for browser rendering. Set to 0 to let center alignment work.
|
|
30720
|
+
horizontal: hPosition === "center" && hRelativeTo === "margin" ? 0 : convertToPixels(position.marginLeft),
|
|
30744
30721
|
top: vPosition === "center" && vRelativeTo === "margin" ? 0 : convertToPixels(position.marginTop)
|
|
30745
30722
|
},
|
|
30746
30723
|
// Store text watermark specific data for export
|
|
@@ -30819,11 +30796,11 @@ function generateTextWatermarkSVG({ text, width, height, rotation, fill, textSty
|
|
|
30819
30796
|
const sin = Math.abs(Math.sin(radians));
|
|
30820
30797
|
const rotatedWidth = sanitizedWidth * cos + sanitizedHeight * sin;
|
|
30821
30798
|
const rotatedHeight = sanitizedWidth * sin + sanitizedHeight * cos;
|
|
30822
|
-
const svgWidth = Math.max(sanitizedWidth, rotatedWidth);
|
|
30823
|
-
const svgHeight = Math.max(sanitizedHeight, rotatedHeight);
|
|
30799
|
+
const svgWidth = Math.max(sanitizedWidth, rotatedWidth) * 1.1;
|
|
30800
|
+
const svgHeight = Math.max(sanitizedHeight, rotatedHeight) * 1.1;
|
|
30824
30801
|
const centerX = svgWidth / 2;
|
|
30825
30802
|
const centerY = svgHeight / 2;
|
|
30826
|
-
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${svgWidth}" height="${svgHeight}" viewBox="0 0 ${svgWidth} ${svgHeight}">
|
|
30803
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${svgWidth}" height="${svgHeight}" viewBox="0 0 ${svgWidth} ${svgHeight}" style="overflow: visible;">
|
|
30827
30804
|
<text
|
|
30828
30805
|
x="${centerX}"
|
|
30829
30806
|
y="${centerY}"
|
|
@@ -30831,7 +30808,6 @@ function generateTextWatermarkSVG({ text, width, height, rotation, fill, textSty
|
|
|
30831
30808
|
dominant-baseline="middle"
|
|
30832
30809
|
font-family="${fontFamily}"
|
|
30833
30810
|
font-size="${sanitizedFontSize}px"
|
|
30834
|
-
font-weight="bold"
|
|
30835
30811
|
fill="${color}"
|
|
30836
30812
|
opacity="${opacity}"
|
|
30837
30813
|
transform="rotate(${sanitizedRotation} ${centerX} ${centerY})">${escapeXml(text)}</text>
|
|
@@ -32670,7 +32646,7 @@ class SuperConverter {
|
|
|
32670
32646
|
static getStoredSuperdocVersion(docx) {
|
|
32671
32647
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
32672
32648
|
}
|
|
32673
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.6.2-next.
|
|
32649
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.6.2-next.2") {
|
|
32674
32650
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
32675
32651
|
}
|
|
32676
32652
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const index = require("./index-
|
|
3
|
-
require("./SuperConverter-
|
|
2
|
+
const index = require("./index-zPnPJugU.cjs");
|
|
3
|
+
require("./SuperConverter-Dl5ZjZXT.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-uehEPBjA.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.6.2-next.
|
|
8487
|
+
this.version = "1.6.2-next.2";
|
|
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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { B as Buffer$2 } from "./jszip-B1fkPkPJ.es.js";
|
|
2
2
|
import { t as twipsToInches, i as inchesToTwips, p as ptToTwips, l as linesToTwips, a as twipsToLines, b as pixelsToTwips, h as halfPointToPoints, c as twipsToPixels$2, d as convertSizeToCSS, e as inchesToPixels } from "./helpers-C8e9wR5l.es.js";
|
|
3
|
-
import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, F as Fragment, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName$1, O as TrackInsertMarkName$1, Q as TrackFormatMarkName$1, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as createOoxmlResolver, a0 as translator, a1 as translator$1, a2 as resolveDocxFontFamily, a3 as combineIndentProperties, a4 as _getReferencedTableStyles, a5 as decodeRPrFromMarks, a6 as calculateResolvedParagraphProperties, a7 as encodeCSSFromPPr, a8 as encodeCSSFromRPr, a9 as generateOrderedListIndex, aa as docxNumberingHelpers, ab as InputRule, ac as insertNewRelationship, ad as kebabCase$1, ae as getUnderlineCssString } from "./SuperConverter-
|
|
3
|
+
import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, F as Fragment, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName$1, O as TrackInsertMarkName$1, Q as TrackFormatMarkName$1, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as createOoxmlResolver, a0 as translator, a1 as translator$1, a2 as resolveDocxFontFamily, a3 as combineIndentProperties, a4 as _getReferencedTableStyles, a5 as decodeRPrFromMarks, a6 as calculateResolvedParagraphProperties, a7 as encodeCSSFromPPr, a8 as encodeCSSFromRPr, a9 as generateOrderedListIndex, aa as docxNumberingHelpers, ab as InputRule, ac as insertNewRelationship, ad as kebabCase$1, ae as getUnderlineCssString } from "./SuperConverter-DV9FLzAm.es.js";
|
|
4
4
|
import { p as process$1, r as ref, C as global$1, c as computed, E as createElementBlock, F as Fragment$1, S as renderList, O as withModifiers, G as openBlock, P as normalizeClass, M as createCommentVNode, H as toDisplayString, K as createBaseVNode, U as createApp, f as onMounted, X as onUnmounted, R as withDirectives, v as unref, Y as vModelText, y as nextTick, L as normalizeStyle, u as watch, Z as withKeys, _ as createTextVNode, I as createVNode, h as h$1, $ as readonly, s as getCurrentInstance, o as onBeforeUnmount, j as reactive, b as onBeforeMount, i as inject, a0 as onActivated, a1 as onDeactivated, a2 as Comment, d as defineComponent, a as provide, g as Teleport, t as toRef, a3 as renderSlot, a4 as isVNode, D as shallowRef, w as watchEffect, T as Transition, a5 as mergeProps, a6 as vShow, a7 as cloneVNode, a8 as Text$2, m as markRaw, N as createBlock, J as withCtx, a9 as useCssVars, V as resolveDynamicComponent, aa as normalizeProps, ab as guardReactiveProps } from "./vue-BnBKJwCW.es.js";
|
|
5
5
|
import "./jszip.min-DCl8qkFO.es.js";
|
|
6
6
|
import { E as EventEmitter$1 } from "./eventemitter3-CwrdEv8r.es.js";
|
|
@@ -15771,7 +15771,7 @@ const canUseDOM = () => {
|
|
|
15771
15771
|
return false;
|
|
15772
15772
|
}
|
|
15773
15773
|
};
|
|
15774
|
-
const summaryVersion = "1.6.2-next.
|
|
15774
|
+
const summaryVersion = "1.6.2-next.2";
|
|
15775
15775
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
15776
15776
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
15777
15777
|
function mapAttributes(attrs) {
|
|
@@ -18438,7 +18438,7 @@ class Editor extends EventEmitter {
|
|
|
18438
18438
|
* Process collaboration migrations
|
|
18439
18439
|
*/
|
|
18440
18440
|
processCollaborationMigrations() {
|
|
18441
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.6.2-next.
|
|
18441
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.6.2-next.2");
|
|
18442
18442
|
if (!this.options.ydoc) return;
|
|
18443
18443
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
18444
18444
|
let docVersion = metaMap.get("version");
|
|
@@ -28515,12 +28515,18 @@ class DomPainter {
|
|
|
28515
28515
|
}
|
|
28516
28516
|
if (run.size) {
|
|
28517
28517
|
if (run.size.width) {
|
|
28518
|
-
|
|
28519
|
-
|
|
28520
|
-
|
|
28518
|
+
const requiresImage = run.variant === "image" || run.variant === "signature";
|
|
28519
|
+
if (!requiresImage || run.imageSrc) {
|
|
28520
|
+
annotation.style.width = `${run.size.width}px`;
|
|
28521
|
+
annotation.style.display = "inline-block";
|
|
28522
|
+
annotation.style.overflow = "hidden";
|
|
28523
|
+
}
|
|
28521
28524
|
}
|
|
28522
|
-
if (run.size.height) {
|
|
28523
|
-
|
|
28525
|
+
if (run.size.height && run.variant !== "html") {
|
|
28526
|
+
const requiresImage = run.variant === "image" || run.variant === "signature";
|
|
28527
|
+
if (!requiresImage || run.imageSrc) {
|
|
28528
|
+
annotation.style.height = `${run.size.height}px`;
|
|
28529
|
+
}
|
|
28524
28530
|
}
|
|
28525
28531
|
}
|
|
28526
28532
|
if (run.fontFamily) {
|
|
@@ -28580,6 +28586,8 @@ class DomPainter {
|
|
|
28580
28586
|
content.appendChild(img);
|
|
28581
28587
|
annotation.style.display = "inline-block";
|
|
28582
28588
|
content.style.display = "inline-block";
|
|
28589
|
+
annotation.style.lineHeight = "normal";
|
|
28590
|
+
content.style.lineHeight = "normal";
|
|
28583
28591
|
} else {
|
|
28584
28592
|
content.textContent = run.displayLabel || (run.variant === "signature" ? "Signature" : "");
|
|
28585
28593
|
}
|
|
@@ -28607,9 +28615,11 @@ class DomPainter {
|
|
|
28607
28615
|
}
|
|
28608
28616
|
case "html": {
|
|
28609
28617
|
if (run.rawHtml && typeof run.rawHtml === "string") {
|
|
28610
|
-
content.
|
|
28618
|
+
content.innerHTML = run.rawHtml.trim();
|
|
28611
28619
|
annotation.style.display = "inline-block";
|
|
28612
28620
|
content.style.display = "inline-block";
|
|
28621
|
+
annotation.style.lineHeight = "normal";
|
|
28622
|
+
content.style.lineHeight = "normal";
|
|
28613
28623
|
} else {
|
|
28614
28624
|
content.textContent = run.displayLabel;
|
|
28615
28625
|
}
|
|
@@ -29565,6 +29575,33 @@ const deriveBlockVersion = (block) => {
|
|
|
29565
29575
|
if (run.kind === "tab") {
|
|
29566
29576
|
return [run.text ?? "", "tab"].join(",");
|
|
29567
29577
|
}
|
|
29578
|
+
if (run.kind === "fieldAnnotation") {
|
|
29579
|
+
const size2 = run.size ? `${run.size.width ?? ""}x${run.size.height ?? ""}` : "";
|
|
29580
|
+
const highlighted = run.highlighted !== false ? 1 : 0;
|
|
29581
|
+
return [
|
|
29582
|
+
"field",
|
|
29583
|
+
run.variant ?? "",
|
|
29584
|
+
run.displayLabel ?? "",
|
|
29585
|
+
run.fieldColor ?? "",
|
|
29586
|
+
run.borderColor ?? "",
|
|
29587
|
+
highlighted,
|
|
29588
|
+
run.hidden ? 1 : 0,
|
|
29589
|
+
run.visibility ?? "",
|
|
29590
|
+
run.imageSrc ?? "",
|
|
29591
|
+
run.linkUrl ?? "",
|
|
29592
|
+
run.rawHtml ?? "",
|
|
29593
|
+
size2,
|
|
29594
|
+
run.fontFamily ?? "",
|
|
29595
|
+
run.fontSize ?? "",
|
|
29596
|
+
run.textColor ?? "",
|
|
29597
|
+
run.textHighlight ?? "",
|
|
29598
|
+
run.bold ? 1 : 0,
|
|
29599
|
+
run.italic ? 1 : 0,
|
|
29600
|
+
run.underline ? 1 : 0,
|
|
29601
|
+
run.fieldId ?? "",
|
|
29602
|
+
run.fieldType ?? ""
|
|
29603
|
+
].join(",");
|
|
29604
|
+
}
|
|
29568
29605
|
const textRun = run;
|
|
29569
29606
|
return [
|
|
29570
29607
|
textRun.text ?? "",
|
|
@@ -35490,6 +35527,29 @@ function normalizeColumns(input, contentWidth) {
|
|
|
35490
35527
|
width
|
|
35491
35528
|
};
|
|
35492
35529
|
}
|
|
35530
|
+
const fieldAnnotationKey = (run) => {
|
|
35531
|
+
if (run.kind !== "fieldAnnotation") return "";
|
|
35532
|
+
const annotation = run;
|
|
35533
|
+
const sizeKey = annotation.size ? `${annotation.size.width ?? ""}x${annotation.size.height ?? ""}` : "";
|
|
35534
|
+
const highlightKey = annotation.highlighted === false ? "nohl" : "hl";
|
|
35535
|
+
const hiddenKey = annotation.hidden ? "hidden" : "";
|
|
35536
|
+
return [
|
|
35537
|
+
annotation.variant ?? "",
|
|
35538
|
+
annotation.displayLabel ?? "",
|
|
35539
|
+
annotation.imageSrc ?? "",
|
|
35540
|
+
annotation.rawHtml ?? "",
|
|
35541
|
+
annotation.linkUrl ?? "",
|
|
35542
|
+
annotation.fontFamily ?? "",
|
|
35543
|
+
annotation.fontSize ?? "",
|
|
35544
|
+
annotation.bold ? "b" : "",
|
|
35545
|
+
annotation.italic ? "i" : "",
|
|
35546
|
+
annotation.underline ? "u" : "",
|
|
35547
|
+
highlightKey,
|
|
35548
|
+
hiddenKey,
|
|
35549
|
+
annotation.visibility ?? "",
|
|
35550
|
+
sizeKey
|
|
35551
|
+
].join("|");
|
|
35552
|
+
};
|
|
35493
35553
|
const hasTrackedChange = (run) => {
|
|
35494
35554
|
return "trackedChange" in run && run.trackedChange !== void 0 && run.trackedChange !== null;
|
|
35495
35555
|
};
|
|
@@ -35703,7 +35763,10 @@ const hashRuns = (block) => {
|
|
|
35703
35763
|
const srcHash = imgRun.src.slice(0, 50);
|
|
35704
35764
|
return `img:${srcHash}:${imgRun.width}x${imgRun.height}`;
|
|
35705
35765
|
}
|
|
35706
|
-
|
|
35766
|
+
if (run.kind === "fieldAnnotation") {
|
|
35767
|
+
return `fa:${fieldAnnotationKey(run)}`;
|
|
35768
|
+
}
|
|
35769
|
+
const text = "src" in run || run.kind === "lineBreak" || run.kind === "break" ? "" : run.text ?? "";
|
|
35707
35770
|
const bold = "bold" in run ? run.bold : false;
|
|
35708
35771
|
const italic = "italic" in run ? run.italic : false;
|
|
35709
35772
|
const color = "color" in run ? run.color : void 0;
|
|
@@ -36932,7 +36995,7 @@ const paragraphBlocksEqual = (a, b2) => {
|
|
|
36932
36995
|
for (let i = 0; i < a.runs.length; i += 1) {
|
|
36933
36996
|
const runA = a.runs[i];
|
|
36934
36997
|
const runB = b2.runs[i];
|
|
36935
|
-
if (("src" in runA || runA.kind === "lineBreak" || runA.kind === "break" || runA.kind === "fieldAnnotation" ? "" : runA.text) !== ("src" in runB || runB.kind === "lineBreak" || runB.kind === "break" || runB.kind === "fieldAnnotation" ? "" : runB.text) || ("bold" in runA ? runA.bold : false) !== ("bold" in runB ? runB.bold : false) || ("italic" in runA ? runA.italic : false) !== ("italic" in runB ? runB.italic : false) || ("color" in runA ? runA.color : void 0) !== ("color" in runB ? runB.color : void 0) || ("fontSize" in runA ? runA.fontSize : void 0) !== ("fontSize" in runB ? runB.fontSize : void 0) || ("fontFamily" in runA ? runA.fontFamily : void 0) !== ("fontFamily" in runB ? runB.fontFamily : void 0) || ("highlight" in runA ? runA.highlight : void 0) !== ("highlight" in runB ? runB.highlight : void 0) || getTrackedChangeKey(runA) !== getTrackedChangeKey(runB) || getCommentKey(runA) !== getCommentKey(runB)) {
|
|
36998
|
+
if (("src" in runA || runA.kind === "lineBreak" || runA.kind === "break" || runA.kind === "fieldAnnotation" ? "" : runA.text) !== ("src" in runB || runB.kind === "lineBreak" || runB.kind === "break" || runB.kind === "fieldAnnotation" ? "" : runB.text) || fieldAnnotationKey(runA) !== fieldAnnotationKey(runB) || ("bold" in runA ? runA.bold : false) !== ("bold" in runB ? runB.bold : false) || ("italic" in runA ? runA.italic : false) !== ("italic" in runB ? runB.italic : false) || ("color" in runA ? runA.color : void 0) !== ("color" in runB ? runB.color : void 0) || ("fontSize" in runA ? runA.fontSize : void 0) !== ("fontSize" in runB ? runB.fontSize : void 0) || ("fontFamily" in runA ? runA.fontFamily : void 0) !== ("fontFamily" in runB ? runB.fontFamily : void 0) || ("highlight" in runA ? runA.highlight : void 0) !== ("highlight" in runB ? runB.highlight : void 0) || getTrackedChangeKey(runA) !== getTrackedChangeKey(runB) || getCommentKey(runA) !== getCommentKey(runB)) {
|
|
36936
36999
|
return false;
|
|
36937
37000
|
}
|
|
36938
37001
|
}
|
|
@@ -51510,8 +51573,21 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51510
51573
|
const annotationFont = `${fontStyle} ${fontWeight} ${annotationFontSize}px ${annotationFontFamily}`;
|
|
51511
51574
|
ctx2.font = annotationFont;
|
|
51512
51575
|
const textWidth = displayText ? ctx2.measureText(displayText).width : 0;
|
|
51513
|
-
const
|
|
51514
|
-
const
|
|
51576
|
+
const annotationHorizontalPadding = run.highlighted === false ? 0 : FIELD_ANNOTATION_PILL_PADDING;
|
|
51577
|
+
const annotationVerticalPadding = run.highlighted === false ? 0 : FIELD_ANNOTATION_VERTICAL_PADDING;
|
|
51578
|
+
const annotationWidth = textWidth + annotationHorizontalPadding;
|
|
51579
|
+
let annotationHeight = annotationFontSize * FIELD_ANNOTATION_LINE_HEIGHT_MULTIPLIER + annotationVerticalPadding;
|
|
51580
|
+
if (run.variant === "signature" && run.imageSrc) {
|
|
51581
|
+
const signatureHeight = 28 + annotationVerticalPadding;
|
|
51582
|
+
annotationHeight = Math.max(annotationHeight, signatureHeight);
|
|
51583
|
+
}
|
|
51584
|
+
if (run.variant === "image" && run.imageSrc && run.size?.height) {
|
|
51585
|
+
const imageHeight = run.size.height + annotationVerticalPadding;
|
|
51586
|
+
annotationHeight = Math.max(annotationHeight, imageHeight);
|
|
51587
|
+
}
|
|
51588
|
+
if (run.variant === "html" && run.size?.height) {
|
|
51589
|
+
annotationHeight = Math.max(annotationHeight, run.size.height);
|
|
51590
|
+
}
|
|
51515
51591
|
let annotationStartX;
|
|
51516
51592
|
if (pendingTabAlignment && currentLine) {
|
|
51517
51593
|
annotationStartX = alignPendingTabForWidth(annotationWidth);
|
|
@@ -51708,7 +51784,10 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51708
51784
|
trimTrailingWrapSpaces(currentLine);
|
|
51709
51785
|
const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
|
|
51710
51786
|
const lineBase = currentLine;
|
|
51711
|
-
const completedLine = {
|
|
51787
|
+
const completedLine = {
|
|
51788
|
+
...lineBase,
|
|
51789
|
+
...metrics
|
|
51790
|
+
};
|
|
51712
51791
|
addBarTabsToLine(completedLine);
|
|
51713
51792
|
lines.push(completedLine);
|
|
51714
51793
|
tabStopCursor = 0;
|
|
@@ -51765,7 +51844,10 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51765
51844
|
trimTrailingWrapSpaces(currentLine);
|
|
51766
51845
|
const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
|
|
51767
51846
|
const lineBase = currentLine;
|
|
51768
|
-
const completedLine = {
|
|
51847
|
+
const completedLine = {
|
|
51848
|
+
...lineBase,
|
|
51849
|
+
...metrics
|
|
51850
|
+
};
|
|
51769
51851
|
addBarTabsToLine(completedLine);
|
|
51770
51852
|
lines.push(completedLine);
|
|
51771
51853
|
tabStopCursor = 0;
|
|
@@ -51810,7 +51892,10 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
51810
51892
|
trimTrailingWrapSpaces(currentLine);
|
|
51811
51893
|
const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
|
|
51812
51894
|
const lineBase = currentLine;
|
|
51813
|
-
const completedLine = {
|
|
51895
|
+
const completedLine = {
|
|
51896
|
+
...lineBase,
|
|
51897
|
+
...metrics
|
|
51898
|
+
};
|
|
51814
51899
|
addBarTabsToLine(completedLine);
|
|
51815
51900
|
lines.push(completedLine);
|
|
51816
51901
|
tabStopCursor = 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-
|
|
2
|
-
import "./SuperConverter-
|
|
1
|
+
import { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-D03d2CXB.es.js";
|
|
2
|
+
import "./SuperConverter-DV9FLzAm.es.js";
|
|
3
3
|
import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
|
|
4
4
|
import { E as EventEmitter } from "./eventemitter3-CwrdEv8r.es.js";
|
|
5
5
|
import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
|
|
@@ -7513,7 +7513,7 @@ const _sfc_main = {
|
|
|
7513
7513
|
__name: "SuperDoc",
|
|
7514
7514
|
emits: ["selection-update"],
|
|
7515
7515
|
setup(__props, { emit: __emit }) {
|
|
7516
|
-
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-
|
|
7516
|
+
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-IT3aSu9N.es.js"));
|
|
7517
7517
|
const superdocStore = useSuperdocStore();
|
|
7518
7518
|
const commentsStore = useCommentsStore();
|
|
7519
7519
|
const {
|
|
@@ -8467,7 +8467,7 @@ class SuperDoc extends EventEmitter {
|
|
|
8467
8467
|
this.config.colors = shuffleArray(this.config.colors);
|
|
8468
8468
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
8469
8469
|
this.colorIndex = 0;
|
|
8470
|
-
this.version = "1.6.2-next.
|
|
8470
|
+
this.version = "1.6.2-next.2";
|
|
8471
8471
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
8472
8472
|
this.superdocId = config.superdocId || v4();
|
|
8473
8473
|
this.colors = this.config.colors;
|