@harbour-enterprises/superdoc 1.0.0-beta.91 → 1.0.0-beta.93
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-SGaot_Xd.es.js → PdfViewer-DDlUqq8s.es.js} +1 -1
- package/dist/chunks/{PdfViewer-D7lP-5Q1.cjs → PdfViewer-DbMCgjlc.cjs} +1 -1
- package/dist/chunks/{index-BGhI0Tn-.cjs → index-CIyFPdjr.cjs} +3 -3
- package/dist/chunks/{index-CJTzjw3v-BQGgIJSs.cjs → index-Cyp2JwAE-BDSzsvVr.cjs} +1 -1
- package/dist/chunks/{index-CJTzjw3v-BbD6ZDSJ.es.js → index-Cyp2JwAE-C4V2XscX.es.js} +1 -1
- package/dist/chunks/{index-DyRYxNDJ.es.js → index-D1G3HZnw.es.js} +3 -3
- package/dist/chunks/{super-editor.es-CTUuTH0r.es.js → super-editor.es-BLW0IRfr.es.js} +188 -13
- package/dist/chunks/{super-editor.es-BA4fESs2.cjs → super-editor.es-CZ_EMz2h.cjs} +188 -13
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-O4-ONmMv.js → converter-CvPb50HR.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-CiUku8wa.js → docx-zipper-BWUuyGDp.js} +1 -1
- package/dist/super-editor/chunks/{editor-Aj9ko-SB.js → editor-CsWOz21v.js} +189 -14
- package/dist/super-editor/chunks/{index-CJTzjw3v.js → index-Cyp2JwAE.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-D0AIe1Gv.js → toolbar-DjWypz4_.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.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 +190 -15
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { y as defineComponent, z as h, O as Transition, a0 as process$1, J as watchEffect, a as computed, r as ref, j as onMounted, W as onUnmounted, b as createElementBlock, o as openBlock, f as createBaseVNode, e as createCommentVNode, u as createVNode, v as unref } from "./vue-Dysv_7z5.es.js";
|
|
2
|
-
import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-
|
|
2
|
+
import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-D1G3HZnw.es.js";
|
|
3
3
|
function self(vars) {
|
|
4
4
|
const {
|
|
5
5
|
opacityDisabled,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("./vue-jWLMl8Ts.cjs");
|
|
4
|
-
const superdoc = require("./index-
|
|
4
|
+
const superdoc = require("./index-CIyFPdjr.cjs");
|
|
5
5
|
function self(vars) {
|
|
6
6
|
const {
|
|
7
7
|
opacityDisabled,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const superEditor_es = require("./super-editor.es-
|
|
2
|
+
const superEditor_es = require("./super-editor.es-CZ_EMz2h.cjs");
|
|
3
3
|
const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
|
|
4
4
|
const eventemitter3 = require("./eventemitter3-DQmQUge-.cjs");
|
|
5
5
|
const provider = require("@hocuspocus/provider");
|
|
@@ -17268,7 +17268,7 @@ const _sfc_main = {
|
|
|
17268
17268
|
__name: "SuperDoc",
|
|
17269
17269
|
emits: ["selection-update"],
|
|
17270
17270
|
setup(__props, { emit: __emit }) {
|
|
17271
|
-
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-
|
|
17271
|
+
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-DbMCgjlc.cjs")));
|
|
17272
17272
|
const superdocStore = useSuperdocStore();
|
|
17273
17273
|
const commentsStore = useCommentsStore();
|
|
17274
17274
|
const {
|
|
@@ -18157,7 +18157,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
18157
18157
|
this.config.colors = shuffleArray(this.config.colors);
|
|
18158
18158
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
18159
18159
|
this.colorIndex = 0;
|
|
18160
|
-
this.version = "1.0.0-beta.
|
|
18160
|
+
this.version = "1.0.0-beta.93";
|
|
18161
18161
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
18162
18162
|
this.superdocId = config.superdocId || uuid.v4();
|
|
18163
18163
|
this.colors = this.config.colors;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./super-editor.es-
|
|
3
|
+
const superEditor_es = require("./super-editor.es-CZ_EMz2h.cjs");
|
|
4
4
|
const indexCvBqQJbG = require("./index-CvBqQJbG-Dwm0THD7.cjs");
|
|
5
5
|
function bail(error) {
|
|
6
6
|
if (error) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-
|
|
1
|
+
import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-BLW0IRfr.es.js";
|
|
2
2
|
import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
|
|
3
3
|
import { E as EventEmitter } from "./eventemitter3-CcXAdeql.es.js";
|
|
4
4
|
import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
|
|
@@ -17251,7 +17251,7 @@ const _sfc_main = {
|
|
|
17251
17251
|
__name: "SuperDoc",
|
|
17252
17252
|
emits: ["selection-update"],
|
|
17253
17253
|
setup(__props, { emit: __emit }) {
|
|
17254
|
-
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-
|
|
17254
|
+
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-DDlUqq8s.es.js"));
|
|
17255
17255
|
const superdocStore = useSuperdocStore();
|
|
17256
17256
|
const commentsStore = useCommentsStore();
|
|
17257
17257
|
const {
|
|
@@ -18140,7 +18140,7 @@ class SuperDoc extends EventEmitter {
|
|
|
18140
18140
|
this.config.colors = shuffleArray(this.config.colors);
|
|
18141
18141
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
18142
18142
|
this.colorIndex = 0;
|
|
18143
|
-
this.version = "1.0.0-beta.
|
|
18143
|
+
this.version = "1.0.0-beta.93";
|
|
18144
18144
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
18145
18145
|
this.superdocId = config.superdocId || v4();
|
|
18146
18146
|
this.colors = this.config.colors;
|
|
@@ -42380,7 +42380,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
42380
42380
|
static getStoredSuperdocVersion(docx) {
|
|
42381
42381
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42382
42382
|
}
|
|
42383
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.
|
|
42383
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.93") {
|
|
42384
42384
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42385
42385
|
}
|
|
42386
42386
|
/**
|
|
@@ -59586,7 +59586,7 @@ const isHeadless = (editor) => {
|
|
|
59586
59586
|
const shouldSkipNodeView = (editor) => {
|
|
59587
59587
|
return isHeadless(editor);
|
|
59588
59588
|
};
|
|
59589
|
-
const summaryVersion = "1.0.0-beta.
|
|
59589
|
+
const summaryVersion = "1.0.0-beta.93";
|
|
59590
59590
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
59591
59591
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
59592
59592
|
function mapAttributes(attrs) {
|
|
@@ -60375,7 +60375,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
60375
60375
|
{ default: remarkStringify },
|
|
60376
60376
|
{ default: remarkGfm }
|
|
60377
60377
|
] = await Promise.all([
|
|
60378
|
-
import("./index-
|
|
60378
|
+
import("./index-Cyp2JwAE-C4V2XscX.es.js"),
|
|
60379
60379
|
import("./index-DRCvimau-Cw339678.es.js"),
|
|
60380
60380
|
import("./index-C_x_N6Uh-DJn8hIEt.es.js"),
|
|
60381
60381
|
import("./index-D_sWOSiG-DE96TaT5.es.js"),
|
|
@@ -60580,7 +60580,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
60580
60580
|
* Process collaboration migrations
|
|
60581
60581
|
*/
|
|
60582
60582
|
processCollaborationMigrations() {
|
|
60583
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
60583
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.93");
|
|
60584
60584
|
if (!this.options.ydoc) return;
|
|
60585
60585
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
60586
60586
|
let docVersion = metaMap.get("version");
|
|
@@ -68322,16 +68322,20 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
|
|
|
68322
68322
|
paragraphAttrs.spacing = spacing;
|
|
68323
68323
|
}
|
|
68324
68324
|
if (paragraphAttrs?.numberingProperties && paragraphAttrs?.wordLayout) {
|
|
68325
|
+
const numberingProps = paragraphAttrs.numberingProperties;
|
|
68326
|
+
const resolvedMarkerRpr = numberingProps.resolvedMarkerRpr;
|
|
68327
|
+
const hasExplicitMarkerFont = resolvedMarkerRpr?.fontFamily != null;
|
|
68328
|
+
const hasExplicitMarkerSize = resolvedMarkerRpr?.fontSize != null;
|
|
68325
68329
|
const firstRunFont = extractFirstTextRunFont(para);
|
|
68326
68330
|
if (firstRunFont) {
|
|
68327
68331
|
const wordLayout = paragraphAttrs.wordLayout;
|
|
68328
68332
|
const marker = wordLayout.marker;
|
|
68329
68333
|
if (marker?.run) {
|
|
68330
68334
|
const markerRun = marker.run;
|
|
68331
|
-
if (firstRunFont.fontSizePx != null && Number.isFinite(firstRunFont.fontSizePx)) {
|
|
68335
|
+
if (!hasExplicitMarkerSize && firstRunFont.fontSizePx != null && Number.isFinite(firstRunFont.fontSizePx)) {
|
|
68332
68336
|
markerRun.fontSize = firstRunFont.fontSizePx;
|
|
68333
68337
|
}
|
|
68334
|
-
if (firstRunFont.fontFamily) {
|
|
68338
|
+
if (!hasExplicitMarkerFont && firstRunFont.fontFamily) {
|
|
68335
68339
|
markerRun.fontFamily = firstRunFont.fontFamily;
|
|
68336
68340
|
}
|
|
68337
68341
|
}
|
|
@@ -73259,7 +73263,7 @@ function renderListMarker(params2) {
|
|
|
73259
73263
|
markerEl.classList.add("superdoc-paragraph-marker");
|
|
73260
73264
|
markerEl.textContent = markerLayout?.markerText ?? "";
|
|
73261
73265
|
markerEl.style.display = "inline-block";
|
|
73262
|
-
markerEl.style.fontFamily = markerLayout?.run?.fontFamily ?? "";
|
|
73266
|
+
markerEl.style.fontFamily = toCssFontFamily(markerLayout?.run?.fontFamily) ?? markerLayout?.run?.fontFamily ?? "";
|
|
73263
73267
|
if (markerLayout?.run?.fontSize != null) {
|
|
73264
73268
|
markerEl.style.fontSize = `${markerLayout.run.fontSize}px`;
|
|
73265
73269
|
}
|
|
@@ -74398,6 +74402,9 @@ function isMinimalWordLayout(value) {
|
|
|
74398
74402
|
return false;
|
|
74399
74403
|
}
|
|
74400
74404
|
const marker = obj.marker;
|
|
74405
|
+
if (marker.markerText !== void 0 && typeof marker.markerText !== "string") {
|
|
74406
|
+
return false;
|
|
74407
|
+
}
|
|
74401
74408
|
if (marker.markerX !== void 0 && typeof marker.markerX !== "number") {
|
|
74402
74409
|
return false;
|
|
74403
74410
|
}
|
|
@@ -75383,7 +75390,7 @@ const _DomPainter = class _DomPainter2 {
|
|
|
75383
75390
|
markerContainer.style.left = `${markerLeftX}px`;
|
|
75384
75391
|
markerContainer.style.top = "0";
|
|
75385
75392
|
}
|
|
75386
|
-
markerEl.style.fontFamily = wordLayout.marker.run.fontFamily;
|
|
75393
|
+
markerEl.style.fontFamily = toCssFontFamily(wordLayout.marker.run.fontFamily) ?? wordLayout.marker.run.fontFamily;
|
|
75387
75394
|
markerEl.style.fontSize = `${wordLayout.marker.run.fontSize}px`;
|
|
75388
75395
|
markerEl.style.fontWeight = wordLayout.marker.run.bold ? "bold" : "";
|
|
75389
75396
|
markerEl.style.fontStyle = wordLayout.marker.run.italic ? "italic" : "";
|
|
@@ -75580,7 +75587,7 @@ const _DomPainter = class _DomPainter2 {
|
|
|
75580
75587
|
markerEl.style.width = `${Math.max(0, fragment.markerWidth - LIST_MARKER_GAP$1)}px`;
|
|
75581
75588
|
markerEl.style.paddingRight = `${LIST_MARKER_GAP$1}px`;
|
|
75582
75589
|
markerEl.style.textAlign = marker.justification ?? "left";
|
|
75583
|
-
markerEl.style.fontFamily = marker.run.fontFamily;
|
|
75590
|
+
markerEl.style.fontFamily = toCssFontFamily(marker.run.fontFamily) ?? marker.run.fontFamily;
|
|
75584
75591
|
markerEl.style.fontSize = `${marker.run.fontSize}px`;
|
|
75585
75592
|
if (marker.run.bold) markerEl.style.fontWeight = "bold";
|
|
75586
75593
|
if (marker.run.italic) markerEl.style.fontStyle = "italic";
|
|
@@ -77453,7 +77460,26 @@ const deriveBlockVersion = (block) => {
|
|
|
77453
77460
|
textRun.token ?? ""
|
|
77454
77461
|
].join(",");
|
|
77455
77462
|
}).join("|");
|
|
77456
|
-
|
|
77463
|
+
const attrs = block.attrs;
|
|
77464
|
+
const paragraphAttrsVersion = attrs ? [
|
|
77465
|
+
attrs.alignment ?? "",
|
|
77466
|
+
attrs.spacing?.before ?? "",
|
|
77467
|
+
attrs.spacing?.after ?? "",
|
|
77468
|
+
attrs.spacing?.line ?? "",
|
|
77469
|
+
attrs.spacing?.lineRule ?? "",
|
|
77470
|
+
attrs.indent?.left ?? "",
|
|
77471
|
+
attrs.indent?.right ?? "",
|
|
77472
|
+
attrs.indent?.firstLine ?? "",
|
|
77473
|
+
attrs.indent?.hanging ?? "",
|
|
77474
|
+
attrs.borders ? JSON.stringify(attrs.borders) : "",
|
|
77475
|
+
attrs.shading?.fill ?? "",
|
|
77476
|
+
attrs.shading?.color ?? "",
|
|
77477
|
+
attrs.direction ?? "",
|
|
77478
|
+
attrs.rtl ? "1" : "",
|
|
77479
|
+
attrs.tabs?.length ? JSON.stringify(attrs.tabs) : ""
|
|
77480
|
+
].join(":") : "";
|
|
77481
|
+
const parts = [markerVersion, runsVersion, paragraphAttrsVersion].filter(Boolean);
|
|
77482
|
+
return parts.join("|");
|
|
77457
77483
|
}
|
|
77458
77484
|
if (block.kind === "list") {
|
|
77459
77485
|
return block.items.map((item) => `${item.id}:${item.marker.text}:${deriveBlockVersion(item.paragraph)}`).join("|");
|
|
@@ -81200,6 +81226,33 @@ const MAX_CACHE_SIZE$1 = 1e4;
|
|
|
81200
81226
|
const BYTES_PER_ENTRY_ESTIMATE = 5e3;
|
|
81201
81227
|
const NORMALIZED_WHITESPACE = /\s+/g;
|
|
81202
81228
|
const normalizeText = (text) => text.replace(NORMALIZED_WHITESPACE, " ");
|
|
81229
|
+
const hashParagraphBorder = (border) => {
|
|
81230
|
+
const parts = [];
|
|
81231
|
+
if (border.style !== void 0) parts.push(`s:${border.style}`);
|
|
81232
|
+
if (border.width !== void 0) parts.push(`w:${border.width}`);
|
|
81233
|
+
if (border.color !== void 0) parts.push(`c:${border.color}`);
|
|
81234
|
+
if (border.space !== void 0) parts.push(`sp:${border.space}`);
|
|
81235
|
+
return parts.join(",");
|
|
81236
|
+
};
|
|
81237
|
+
const hashParagraphBorders = (borders) => {
|
|
81238
|
+
const parts = [];
|
|
81239
|
+
if (borders.top) parts.push(`t:[${hashParagraphBorder(borders.top)}]`);
|
|
81240
|
+
if (borders.right) parts.push(`r:[${hashParagraphBorder(borders.right)}]`);
|
|
81241
|
+
if (borders.bottom) parts.push(`b:[${hashParagraphBorder(borders.bottom)}]`);
|
|
81242
|
+
if (borders.left) parts.push(`l:[${hashParagraphBorder(borders.left)}]`);
|
|
81243
|
+
return parts.join(";");
|
|
81244
|
+
};
|
|
81245
|
+
const hashParagraphFrame = (frame) => {
|
|
81246
|
+
const parts = [];
|
|
81247
|
+
if (frame.wrap !== void 0) parts.push(`w:${frame.wrap}`);
|
|
81248
|
+
if (frame.x !== void 0) parts.push(`x:${frame.x}`);
|
|
81249
|
+
if (frame.y !== void 0) parts.push(`y:${frame.y}`);
|
|
81250
|
+
if (frame.xAlign !== void 0) parts.push(`xa:${frame.xAlign}`);
|
|
81251
|
+
if (frame.yAlign !== void 0) parts.push(`ya:${frame.yAlign}`);
|
|
81252
|
+
if (frame.hAnchor !== void 0) parts.push(`ha:${frame.hAnchor}`);
|
|
81253
|
+
if (frame.vAnchor !== void 0) parts.push(`va:${frame.vAnchor}`);
|
|
81254
|
+
return parts.join(",");
|
|
81255
|
+
};
|
|
81203
81256
|
const hashRuns = (block) => {
|
|
81204
81257
|
if (block.kind === "table") {
|
|
81205
81258
|
const tableBlock = block;
|
|
@@ -81295,7 +81348,59 @@ const hashRuns = (block) => {
|
|
|
81295
81348
|
numberingKey = `|num:${np.numId ?? ""}:${np.ilvl ?? 0}:${markerTextKey}`;
|
|
81296
81349
|
}
|
|
81297
81350
|
}
|
|
81298
|
-
|
|
81351
|
+
let paragraphAttrsKey = "";
|
|
81352
|
+
if (block.attrs) {
|
|
81353
|
+
const attrs = block.attrs;
|
|
81354
|
+
const parts = [];
|
|
81355
|
+
if (attrs.alignment) parts.push(`al:${attrs.alignment}`);
|
|
81356
|
+
if (attrs.spacing) {
|
|
81357
|
+
const s2 = attrs.spacing;
|
|
81358
|
+
if (s2.before !== void 0) parts.push(`sb:${s2.before}`);
|
|
81359
|
+
if (s2.after !== void 0) parts.push(`sa:${s2.after}`);
|
|
81360
|
+
if (s2.line !== void 0) parts.push(`sl:${s2.line}`);
|
|
81361
|
+
if (s2.lineRule) parts.push(`sr:${s2.lineRule}`);
|
|
81362
|
+
}
|
|
81363
|
+
if (attrs.indent) {
|
|
81364
|
+
const ind = attrs.indent;
|
|
81365
|
+
if (ind.left !== void 0) parts.push(`il:${ind.left}`);
|
|
81366
|
+
if (ind.right !== void 0) parts.push(`ir:${ind.right}`);
|
|
81367
|
+
if (ind.firstLine !== void 0) parts.push(`if:${ind.firstLine}`);
|
|
81368
|
+
if (ind.hanging !== void 0) parts.push(`ih:${ind.hanging}`);
|
|
81369
|
+
}
|
|
81370
|
+
if (attrs.borders) {
|
|
81371
|
+
parts.push(`br:${hashParagraphBorders(attrs.borders)}`);
|
|
81372
|
+
}
|
|
81373
|
+
if (attrs.shading) {
|
|
81374
|
+
const sh = attrs.shading;
|
|
81375
|
+
if (sh.fill) parts.push(`shf:${sh.fill}`);
|
|
81376
|
+
if (sh.color) parts.push(`shc:${sh.color}`);
|
|
81377
|
+
}
|
|
81378
|
+
if (attrs.tabs && attrs.tabs.length > 0) {
|
|
81379
|
+
const tabsHash = attrs.tabs.map((t) => `${t.val ?? ""}:${t.pos ?? ""}:${t.leader ?? ""}`).join(",");
|
|
81380
|
+
parts.push(`tb:${tabsHash}`);
|
|
81381
|
+
}
|
|
81382
|
+
if (attrs.direction) parts.push(`dir:${attrs.direction}`);
|
|
81383
|
+
if (attrs.rtl) parts.push("rtl");
|
|
81384
|
+
if (attrs.keepNext) parts.push("kn");
|
|
81385
|
+
if (attrs.keepLines) parts.push("kl");
|
|
81386
|
+
if (attrs.floatAlignment) parts.push(`fa:${attrs.floatAlignment}`);
|
|
81387
|
+
if (attrs.contextualSpacing) parts.push("cs");
|
|
81388
|
+
if (attrs.suppressFirstLineIndent) parts.push("sfi");
|
|
81389
|
+
if (attrs.dropCap) parts.push(`dc:${attrs.dropCap}`);
|
|
81390
|
+
if (attrs.dropCapDescriptor) {
|
|
81391
|
+
const dcd = attrs.dropCapDescriptor;
|
|
81392
|
+
parts.push(`dcd:${dcd.mode ?? ""}:${dcd.lines ?? ""}`);
|
|
81393
|
+
}
|
|
81394
|
+
if (attrs.frame) {
|
|
81395
|
+
parts.push(`fr:${hashParagraphFrame(attrs.frame)}`);
|
|
81396
|
+
}
|
|
81397
|
+
if (attrs.tabIntervalTwips !== void 0) parts.push(`ti:${attrs.tabIntervalTwips}`);
|
|
81398
|
+
if (attrs.decimalSeparator) parts.push(`ds:${attrs.decimalSeparator}`);
|
|
81399
|
+
if (parts.length > 0) {
|
|
81400
|
+
paragraphAttrsKey = `|pa:${parts.join(":")}`;
|
|
81401
|
+
}
|
|
81402
|
+
}
|
|
81403
|
+
return `${trackedMode}:${trackedEnabled ? "on" : "off"}|${runsHash}${numberingKey}${paragraphAttrsKey}`;
|
|
81299
81404
|
};
|
|
81300
81405
|
const createStats = () => ({
|
|
81301
81406
|
hits: 0,
|
|
@@ -82180,6 +82285,75 @@ const getTrackedChangeKey = (run2) => {
|
|
|
82180
82285
|
}
|
|
82181
82286
|
return "";
|
|
82182
82287
|
};
|
|
82288
|
+
const paragraphSpacingEqual = (a, b2) => {
|
|
82289
|
+
if (a === b2) return true;
|
|
82290
|
+
if (!a || !b2) return !a && !b2;
|
|
82291
|
+
return a.before === b2.before && a.after === b2.after && a.line === b2.line && a.lineRule === b2.lineRule && a.beforeAutospacing === b2.beforeAutospacing && a.afterAutospacing === b2.afterAutospacing;
|
|
82292
|
+
};
|
|
82293
|
+
const paragraphIndentEqual = (a, b2) => {
|
|
82294
|
+
if (a === b2) return true;
|
|
82295
|
+
if (!a || !b2) return !a && !b2;
|
|
82296
|
+
return a.left === b2.left && a.right === b2.right && a.firstLine === b2.firstLine && a.hanging === b2.hanging;
|
|
82297
|
+
};
|
|
82298
|
+
const paragraphBorderEqual = (a, b2) => {
|
|
82299
|
+
if (a === b2) return true;
|
|
82300
|
+
if (!a || !b2) return !a && !b2;
|
|
82301
|
+
return a.style === b2.style && a.width === b2.width && a.color === b2.color && a.space === b2.space;
|
|
82302
|
+
};
|
|
82303
|
+
const paragraphBordersEqual = (a, b2) => {
|
|
82304
|
+
if (a === b2) return true;
|
|
82305
|
+
if (!a || !b2) return !a && !b2;
|
|
82306
|
+
return paragraphBorderEqual(a.top, b2.top) && paragraphBorderEqual(a.right, b2.right) && paragraphBorderEqual(a.bottom, b2.bottom) && paragraphBorderEqual(a.left, b2.left);
|
|
82307
|
+
};
|
|
82308
|
+
const paragraphShadingEqual = (a, b2) => {
|
|
82309
|
+
if (a === b2) return true;
|
|
82310
|
+
if (!a || !b2) return !a && !b2;
|
|
82311
|
+
return a.fill === b2.fill && a.color === b2.color && a.val === b2.val && a.themeColor === b2.themeColor && a.themeFill === b2.themeFill && a.themeFillShade === b2.themeFillShade && a.themeFillTint === b2.themeFillTint && a.themeShade === b2.themeShade && a.themeTint === b2.themeTint;
|
|
82312
|
+
};
|
|
82313
|
+
const tabStopEqual = (a, b2) => {
|
|
82314
|
+
return a.val === b2.val && a.pos === b2.pos && a.leader === b2.leader;
|
|
82315
|
+
};
|
|
82316
|
+
const tabStopsEqual = (a, b2) => {
|
|
82317
|
+
if (a === b2) return true;
|
|
82318
|
+
if (!a || !b2) return !a && !b2;
|
|
82319
|
+
if (a.length !== b2.length) return false;
|
|
82320
|
+
for (let i = 0; i < a.length; i += 1) {
|
|
82321
|
+
if (!tabStopEqual(a[i], b2[i])) return false;
|
|
82322
|
+
}
|
|
82323
|
+
return true;
|
|
82324
|
+
};
|
|
82325
|
+
const paragraphFrameEqual = (a, b2) => {
|
|
82326
|
+
if (a === b2) return true;
|
|
82327
|
+
if (!a || !b2) return !a && !b2;
|
|
82328
|
+
return a.wrap === b2.wrap && a.x === b2.x && a.y === b2.y && a.xAlign === b2.xAlign && a.yAlign === b2.yAlign && a.hAnchor === b2.hAnchor && a.vAnchor === b2.vAnchor;
|
|
82329
|
+
};
|
|
82330
|
+
const dropCapDescriptorEqual = (a, b2) => {
|
|
82331
|
+
if (a === b2) return true;
|
|
82332
|
+
if (!a || !b2) return !a && !b2;
|
|
82333
|
+
if (a.mode !== b2.mode || a.lines !== b2.lines) return false;
|
|
82334
|
+
const runA = a.run;
|
|
82335
|
+
const runB = b2.run;
|
|
82336
|
+
if (!runA || !runB) return !runA && !runB;
|
|
82337
|
+
if (runA.text !== runB.text || runA.fontFamily !== runB.fontFamily || runA.fontSize !== runB.fontSize || runA.bold !== runB.bold || runA.italic !== runB.italic || runA.color !== runB.color) {
|
|
82338
|
+
return false;
|
|
82339
|
+
}
|
|
82340
|
+
return true;
|
|
82341
|
+
};
|
|
82342
|
+
const paragraphAttrsEqual = (a, b2) => {
|
|
82343
|
+
if (a === b2) return true;
|
|
82344
|
+
if (!a || !b2) return !a && !b2;
|
|
82345
|
+
if (a.alignment !== b2.alignment || a.contextualSpacing !== b2.contextualSpacing || a.suppressFirstLineIndent !== b2.suppressFirstLineIndent || a.dropCap !== b2.dropCap || a.decimalSeparator !== b2.decimalSeparator || a.tabIntervalTwips !== b2.tabIntervalTwips || a.keepNext !== b2.keepNext || a.keepLines !== b2.keepLines || a.direction !== b2.direction || a.rtl !== b2.rtl || a.floatAlignment !== b2.floatAlignment) {
|
|
82346
|
+
return false;
|
|
82347
|
+
}
|
|
82348
|
+
if (!paragraphSpacingEqual(a.spacing, b2.spacing)) return false;
|
|
82349
|
+
if (!paragraphIndentEqual(a.indent, b2.indent)) return false;
|
|
82350
|
+
if (!paragraphBordersEqual(a.borders, b2.borders)) return false;
|
|
82351
|
+
if (!paragraphShadingEqual(a.shading, b2.shading)) return false;
|
|
82352
|
+
if (!tabStopsEqual(a.tabs, b2.tabs)) return false;
|
|
82353
|
+
if (!paragraphFrameEqual(a.frame, b2.frame)) return false;
|
|
82354
|
+
if (!dropCapDescriptorEqual(a.dropCapDescriptor, b2.dropCapDescriptor)) return false;
|
|
82355
|
+
return true;
|
|
82356
|
+
};
|
|
82183
82357
|
const paragraphBlocksEqual = (a, b2) => {
|
|
82184
82358
|
const aMode = a.attrs?.trackedChangesMode ?? "review";
|
|
82185
82359
|
const bMode = b2.attrs?.trackedChangesMode ?? "review";
|
|
@@ -82187,6 +82361,7 @@ const paragraphBlocksEqual = (a, b2) => {
|
|
|
82187
82361
|
const aEnabled = resolveTrackedChangesEnabled(a.attrs, true);
|
|
82188
82362
|
const bEnabled = resolveTrackedChangesEnabled(b2.attrs, true);
|
|
82189
82363
|
if (aEnabled !== bEnabled) return false;
|
|
82364
|
+
if (!paragraphAttrsEqual(a.attrs, b2.attrs)) return false;
|
|
82190
82365
|
if (a.runs.length !== b2.runs.length) return false;
|
|
82191
82366
|
for (let i = 0; i < a.runs.length; i += 1) {
|
|
82192
82367
|
const runA = a.runs[i];
|
|
@@ -85034,7 +85209,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
85034
85209
|
let markerInfo;
|
|
85035
85210
|
if (wordLayout?.marker) {
|
|
85036
85211
|
const markerRun = {
|
|
85037
|
-
fontFamily: wordLayout.marker.run.fontFamily,
|
|
85212
|
+
fontFamily: toCssFontFamily(wordLayout.marker.run.fontFamily) ?? wordLayout.marker.run.fontFamily,
|
|
85038
85213
|
fontSize: wordLayout.marker.run.fontSize,
|
|
85039
85214
|
bold: wordLayout.marker.run.bold,
|
|
85040
85215
|
italic: wordLayout.marker.run.italic
|
|
@@ -85362,7 +85537,7 @@ async function measureListBlock(block, constraints) {
|
|
|
85362
85537
|
const marker = wordLayout.marker;
|
|
85363
85538
|
const markerFontRun = {
|
|
85364
85539
|
text: marker.markerText,
|
|
85365
|
-
fontFamily: marker.run.fontFamily,
|
|
85540
|
+
fontFamily: toCssFontFamily(marker.run.fontFamily) ?? marker.run.fontFamily,
|
|
85366
85541
|
fontSize: marker.run.fontSize,
|
|
85367
85542
|
bold: marker.run.bold,
|
|
85368
85543
|
italic: marker.run.italic,
|