superdoc 1.0.0-beta.102 → 1.0.0-beta.103
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-BFqkSyYx.es.js → PdfViewer-Dbqwkn0G.es.js} +1 -1
- package/dist/chunks/{PdfViewer-X1sOA7hm.cjs → PdfViewer-S_8SIFPi.cjs} +1 -1
- package/dist/chunks/{index-BP1yyX4N.es.js → index-C5Rf8gqE.es.js} +3 -3
- package/dist/chunks/{index-f4ON3m7j.cjs → index-D4NTCKO5.cjs} +3 -3
- package/dist/chunks/{index-nVrA3URL-BssoM7VE.cjs → index-DQVMKA35-DwhGWytr.cjs} +1 -1
- package/dist/chunks/{index-nVrA3URL-vs_NmI3L.es.js → index-DQVMKA35-xsiaflRZ.es.js} +1 -1
- package/dist/chunks/{super-editor.es-B7Xuihea.cjs → super-editor.es-CCmmUDjt.cjs} +202 -29
- package/dist/chunks/{super-editor.es-BM69n_BR.es.js → super-editor.es-D6ttXPUE.es.js} +202 -29
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-NrpPx2Xr.js → converter-CE9B4HYb.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-oyKPvmaC.js → docx-zipper-Bt1IoMBF.js} +1 -1
- package/dist/super-editor/chunks/{editor-Dnw031hl.js → editor-DLjQOZqB.js} +203 -30
- package/dist/super-editor/chunks/{index-nVrA3URL.js → index-DQVMKA35.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-OrlYExrD.js → toolbar-CqeJTLhO.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 +204 -31
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -42428,7 +42428,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42428
42428
|
static getStoredSuperdocVersion(docx) {
|
|
42429
42429
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42430
42430
|
}
|
|
42431
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.
|
|
42431
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.103") {
|
|
42432
42432
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42433
42433
|
}
|
|
42434
42434
|
/**
|
|
@@ -67513,7 +67513,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
67513
67513
|
const shouldSkipNodeView = (editor) => {
|
|
67514
67514
|
return isHeadless(editor);
|
|
67515
67515
|
};
|
|
67516
|
-
const summaryVersion = "1.0.0-beta.
|
|
67516
|
+
const summaryVersion = "1.0.0-beta.103";
|
|
67517
67517
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
67518
67518
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
67519
67519
|
function mapAttributes(attrs) {
|
|
@@ -67873,11 +67873,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
67873
67873
|
if (!this.options.isNewFile || !this.options.collaborationProvider) return;
|
|
67874
67874
|
const provider2 = this.options.collaborationProvider;
|
|
67875
67875
|
const postSyncInit = () => {
|
|
67876
|
-
provider2.off("synced", postSyncInit);
|
|
67876
|
+
provider2.off?.("synced", postSyncInit);
|
|
67877
67877
|
__privateMethod$1(this, _Editor_instances, insertNewFileData_fn).call(this);
|
|
67878
67878
|
};
|
|
67879
67879
|
if (provider2.synced) __privateMethod$1(this, _Editor_instances, insertNewFileData_fn).call(this);
|
|
67880
|
-
else provider2.on("synced", postSyncInit);
|
|
67880
|
+
else provider2.on?.("synced", postSyncInit);
|
|
67881
67881
|
}
|
|
67882
67882
|
/**
|
|
67883
67883
|
* Replace content of editor that was created with loadFromSchema option
|
|
@@ -68302,7 +68302,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68302
68302
|
{ default: remarkStringify2 },
|
|
68303
68303
|
{ default: remarkGfm2 }
|
|
68304
68304
|
] = await Promise.all([
|
|
68305
|
-
Promise.resolve().then(() =>
|
|
68305
|
+
Promise.resolve().then(() => indexDQVMKA35),
|
|
68306
68306
|
Promise.resolve().then(() => indexDRCvimau),
|
|
68307
68307
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
68308
68308
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -68507,7 +68507,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68507
68507
|
* Process collaboration migrations
|
|
68508
68508
|
*/
|
|
68509
68509
|
processCollaborationMigrations() {
|
|
68510
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
68510
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.103");
|
|
68511
68511
|
if (!this.options.ydoc) return;
|
|
68512
68512
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
68513
68513
|
let docVersion = metaMap.get("version");
|
|
@@ -71622,6 +71622,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
71622
71622
|
if (cellChanged) {
|
|
71623
71623
|
return {
|
|
71624
71624
|
...cell2,
|
|
71625
|
+
// Cast to expected type - hydrateBlock preserves block kinds, just hydrates image sources
|
|
71625
71626
|
blocks: hydratedBlocks.length > 0 ? hydratedBlocks : cell2.blocks,
|
|
71626
71627
|
paragraph: hydratedParagraph
|
|
71627
71628
|
};
|
|
@@ -75242,7 +75243,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
75242
75243
|
};
|
|
75243
75244
|
}
|
|
75244
75245
|
const hasValidNumbering = rawNumberingProps && isValidNumberingId(rawNumberingProps.numId);
|
|
75245
|
-
if (hasValidNumbering) {
|
|
75246
|
+
if (hasValidNumbering && rawNumberingProps) {
|
|
75246
75247
|
const numberingProps = rawNumberingProps;
|
|
75247
75248
|
const numId = numberingProps.numId;
|
|
75248
75249
|
const ilvl = Number.isFinite(numberingProps.ilvl) ? Math.max(0, Math.floor(Number(numberingProps.ilvl))) : 0;
|
|
@@ -75282,6 +75283,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
75282
75283
|
const resolvedCounterValue = path2[path2.length - 1] ?? counterValue;
|
|
75283
75284
|
const enrichedNumberingProps = {
|
|
75284
75285
|
...numberingProps,
|
|
75286
|
+
numId: numberingProps.numId,
|
|
75287
|
+
ilvl: numberingProps.ilvl,
|
|
75285
75288
|
path: path2,
|
|
75286
75289
|
counterValue: resolvedCounterValue
|
|
75287
75290
|
};
|
|
@@ -77378,7 +77381,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
77378
77381
|
context.nextBlockId,
|
|
77379
77382
|
context.positions
|
|
77380
77383
|
);
|
|
77381
|
-
if (drawingBlock) {
|
|
77384
|
+
if (drawingBlock && drawingBlock.kind === "drawing") {
|
|
77382
77385
|
blocks2.push(drawingBlock);
|
|
77383
77386
|
}
|
|
77384
77387
|
continue;
|
|
@@ -77389,7 +77392,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
77389
77392
|
context.nextBlockId,
|
|
77390
77393
|
context.positions
|
|
77391
77394
|
);
|
|
77392
|
-
if (drawingBlock) {
|
|
77395
|
+
if (drawingBlock && drawingBlock.kind === "drawing") {
|
|
77393
77396
|
blocks2.push(drawingBlock);
|
|
77394
77397
|
}
|
|
77395
77398
|
continue;
|
|
@@ -77400,7 +77403,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
77400
77403
|
context.nextBlockId,
|
|
77401
77404
|
context.positions
|
|
77402
77405
|
);
|
|
77403
|
-
if (drawingBlock) {
|
|
77406
|
+
if (drawingBlock && drawingBlock.kind === "drawing") {
|
|
77404
77407
|
blocks2.push(drawingBlock);
|
|
77405
77408
|
}
|
|
77406
77409
|
continue;
|
|
@@ -77411,7 +77414,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
77411
77414
|
context.nextBlockId,
|
|
77412
77415
|
context.positions
|
|
77413
77416
|
);
|
|
77414
|
-
if (drawingBlock) {
|
|
77417
|
+
if (drawingBlock && drawingBlock.kind === "drawing") {
|
|
77415
77418
|
blocks2.push(drawingBlock);
|
|
77416
77419
|
}
|
|
77417
77420
|
}
|
|
@@ -77866,7 +77869,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
77866
77869
|
bookmarks2,
|
|
77867
77870
|
hyperlinkConfig2,
|
|
77868
77871
|
themeColorsParam ?? themeColors,
|
|
77869
|
-
paragraphConverter
|
|
77872
|
+
paragraphConverter,
|
|
77873
|
+
converterCtx ?? converterContext,
|
|
77874
|
+
{
|
|
77875
|
+
listCounterContext: { getListCounter, incrementListCounter, resetListCounter },
|
|
77876
|
+
converters: {
|
|
77877
|
+
paragraphToFlowBlocks: paragraphConverter,
|
|
77878
|
+
imageNodeToBlock,
|
|
77879
|
+
vectorShapeNodeToDrawingBlock,
|
|
77880
|
+
shapeGroupNodeToDrawingBlock,
|
|
77881
|
+
shapeContainerNodeToDrawingBlock,
|
|
77882
|
+
shapeTextboxNodeToDrawingBlock
|
|
77883
|
+
}
|
|
77884
|
+
}
|
|
77870
77885
|
);
|
|
77871
77886
|
const handlerContext = {
|
|
77872
77887
|
blocks: blocks2,
|
|
@@ -77887,6 +77902,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
77887
77902
|
currentParagraphIndex: 0
|
|
77888
77903
|
},
|
|
77889
77904
|
converters: {
|
|
77905
|
+
// Type assertion needed due to signature mismatch between actual function and type definition
|
|
77890
77906
|
paragraphToFlowBlocks: paragraphConverter,
|
|
77891
77907
|
tableNodeToBlock: tableConverter,
|
|
77892
77908
|
imageNodeToBlock,
|
|
@@ -77982,6 +77998,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
77982
77998
|
{
|
|
77983
77999
|
listCounterContext,
|
|
77984
78000
|
converters: {
|
|
78001
|
+
// Type assertion needed due to signature mismatch between actual function and type definition
|
|
77985
78002
|
paragraphToFlowBlocks: paragraphToFlowBlocks$1,
|
|
77986
78003
|
imageNodeToBlock,
|
|
77987
78004
|
vectorShapeNodeToDrawingBlock,
|
|
@@ -77995,7 +78012,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
77995
78012
|
converterContext
|
|
77996
78013
|
);
|
|
77997
78014
|
}
|
|
77998
|
-
function tableNodeToBlock(node2, nextBlockId, positions, defaultFont, defaultSize, styleContext, trackedChanges, bookmarks, hyperlinkConfig, themeColors, converterContext) {
|
|
78015
|
+
function tableNodeToBlock(node2, nextBlockId, positions, defaultFont, defaultSize, styleContext, trackedChanges, bookmarks, hyperlinkConfig, themeColors, _paragraphToFlowBlocksParam, converterContext, options) {
|
|
77999
78016
|
return tableNodeToBlock$1(
|
|
78000
78017
|
node2,
|
|
78001
78018
|
nextBlockId,
|
|
@@ -78009,8 +78026,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
78009
78026
|
themeColors,
|
|
78010
78027
|
paragraphToFlowBlocks,
|
|
78011
78028
|
converterContext,
|
|
78012
|
-
{
|
|
78029
|
+
options ?? {
|
|
78013
78030
|
converters: {
|
|
78031
|
+
// Type assertion needed due to signature mismatch between actual function and type definition
|
|
78014
78032
|
paragraphToFlowBlocks: paragraphToFlowBlocks$1,
|
|
78015
78033
|
imageNodeToBlock,
|
|
78016
78034
|
vectorShapeNodeToDrawingBlock,
|
|
@@ -82314,6 +82332,49 @@ ${l}
|
|
|
82314
82332
|
if (borders.left) parts.push(`l:[${hashParagraphBorder$1(borders.left)}]`);
|
|
82315
82333
|
return parts.join(";");
|
|
82316
82334
|
};
|
|
82335
|
+
const isNoneBorder$1 = (value) => {
|
|
82336
|
+
return typeof value === "object" && value !== null && "none" in value && value.none === true;
|
|
82337
|
+
};
|
|
82338
|
+
const isBorderSpec$1 = (value) => {
|
|
82339
|
+
return typeof value === "object" && value !== null && !("none" in value);
|
|
82340
|
+
};
|
|
82341
|
+
const hashBorderSpec$1 = (border) => {
|
|
82342
|
+
const parts = [];
|
|
82343
|
+
if (border.style !== void 0) parts.push(`s:${border.style}`);
|
|
82344
|
+
if (border.width !== void 0) parts.push(`w:${border.width}`);
|
|
82345
|
+
if (border.color !== void 0) parts.push(`c:${border.color}`);
|
|
82346
|
+
if (border.space !== void 0) parts.push(`sp:${border.space}`);
|
|
82347
|
+
return parts.join(",");
|
|
82348
|
+
};
|
|
82349
|
+
const hashTableBorderValue$1 = (borderValue) => {
|
|
82350
|
+
if (borderValue === void 0) return "";
|
|
82351
|
+
if (borderValue === null) return "null";
|
|
82352
|
+
if (isNoneBorder$1(borderValue)) return "none";
|
|
82353
|
+
if (isBorderSpec$1(borderValue)) {
|
|
82354
|
+
return hashBorderSpec$1(borderValue);
|
|
82355
|
+
}
|
|
82356
|
+
return "";
|
|
82357
|
+
};
|
|
82358
|
+
const hashTableBorders$1 = (borders) => {
|
|
82359
|
+
if (!borders) return "";
|
|
82360
|
+
const parts = [];
|
|
82361
|
+
if (borders.top !== void 0) parts.push(`t:[${hashTableBorderValue$1(borders.top)}]`);
|
|
82362
|
+
if (borders.right !== void 0) parts.push(`r:[${hashTableBorderValue$1(borders.right)}]`);
|
|
82363
|
+
if (borders.bottom !== void 0) parts.push(`b:[${hashTableBorderValue$1(borders.bottom)}]`);
|
|
82364
|
+
if (borders.left !== void 0) parts.push(`l:[${hashTableBorderValue$1(borders.left)}]`);
|
|
82365
|
+
if (borders.insideH !== void 0) parts.push(`ih:[${hashTableBorderValue$1(borders.insideH)}]`);
|
|
82366
|
+
if (borders.insideV !== void 0) parts.push(`iv:[${hashTableBorderValue$1(borders.insideV)}]`);
|
|
82367
|
+
return parts.join(";");
|
|
82368
|
+
};
|
|
82369
|
+
const hashCellBorders$1 = (borders) => {
|
|
82370
|
+
if (!borders) return "";
|
|
82371
|
+
const parts = [];
|
|
82372
|
+
if (borders.top) parts.push(`t:[${hashBorderSpec$1(borders.top)}]`);
|
|
82373
|
+
if (borders.right) parts.push(`r:[${hashBorderSpec$1(borders.right)}]`);
|
|
82374
|
+
if (borders.bottom) parts.push(`b:[${hashBorderSpec$1(borders.bottom)}]`);
|
|
82375
|
+
if (borders.left) parts.push(`l:[${hashBorderSpec$1(borders.left)}]`);
|
|
82376
|
+
return parts.join(";");
|
|
82377
|
+
};
|
|
82317
82378
|
const hasStringProp = (run2, prop) => {
|
|
82318
82379
|
return prop in run2 && typeof run2[prop] === "string";
|
|
82319
82380
|
};
|
|
@@ -85529,6 +85590,25 @@ ${l}
|
|
|
85529
85590
|
hash2 = hashNumber(hash2, cellBlocks.length);
|
|
85530
85591
|
hash2 = hashNumber(hash2, cell2.rowSpan ?? 1);
|
|
85531
85592
|
hash2 = hashNumber(hash2, cell2.colSpan ?? 1);
|
|
85593
|
+
if (cell2.attrs) {
|
|
85594
|
+
const cellAttrs = cell2.attrs;
|
|
85595
|
+
if (cellAttrs.borders) {
|
|
85596
|
+
hash2 = hashString(hash2, hashCellBorders$1(cellAttrs.borders));
|
|
85597
|
+
}
|
|
85598
|
+
if (cellAttrs.padding) {
|
|
85599
|
+
const p2 = cellAttrs.padding;
|
|
85600
|
+
hash2 = hashNumber(hash2, p2.top ?? 0);
|
|
85601
|
+
hash2 = hashNumber(hash2, p2.right ?? 0);
|
|
85602
|
+
hash2 = hashNumber(hash2, p2.bottom ?? 0);
|
|
85603
|
+
hash2 = hashNumber(hash2, p2.left ?? 0);
|
|
85604
|
+
}
|
|
85605
|
+
if (cellAttrs.verticalAlign) {
|
|
85606
|
+
hash2 = hashString(hash2, cellAttrs.verticalAlign);
|
|
85607
|
+
}
|
|
85608
|
+
if (cellAttrs.background) {
|
|
85609
|
+
hash2 = hashString(hash2, cellAttrs.background);
|
|
85610
|
+
}
|
|
85611
|
+
}
|
|
85532
85612
|
for (const cellBlock of cellBlocks) {
|
|
85533
85613
|
hash2 = hashString(hash2, cellBlock?.kind ?? "unknown");
|
|
85534
85614
|
if (cellBlock?.kind === "paragraph") {
|
|
@@ -85574,6 +85654,18 @@ ${l}
|
|
|
85574
85654
|
}
|
|
85575
85655
|
}
|
|
85576
85656
|
}
|
|
85657
|
+
if (tableBlock.attrs) {
|
|
85658
|
+
const tblAttrs = tableBlock.attrs;
|
|
85659
|
+
if (tblAttrs.borders) {
|
|
85660
|
+
hash2 = hashString(hash2, hashTableBorders$1(tblAttrs.borders));
|
|
85661
|
+
}
|
|
85662
|
+
if (tblAttrs.borderCollapse) {
|
|
85663
|
+
hash2 = hashString(hash2, tblAttrs.borderCollapse);
|
|
85664
|
+
}
|
|
85665
|
+
if (tblAttrs.cellSpacing !== void 0) {
|
|
85666
|
+
hash2 = hashNumber(hash2, tblAttrs.cellSpacing);
|
|
85667
|
+
}
|
|
85668
|
+
}
|
|
85577
85669
|
return [block.id, tableBlock.rows.length, hash2.toString(16)].join("|");
|
|
85578
85670
|
}
|
|
85579
85671
|
return block.id;
|
|
@@ -86326,7 +86418,7 @@ ${l}
|
|
|
86326
86418
|
return false;
|
|
86327
86419
|
}
|
|
86328
86420
|
const wordLayout = getWordLayoutConfig(block);
|
|
86329
|
-
const hasListAttrs = block.attrs?.listItem != null || wordLayout?.marker != null;
|
|
86421
|
+
const hasListAttrs = block.attrs?.listItem != null || block.attrs?.numberingProperties != null || wordLayout?.marker != null;
|
|
86330
86422
|
if (hasListAttrs) {
|
|
86331
86423
|
return true;
|
|
86332
86424
|
}
|
|
@@ -89312,6 +89404,49 @@ ${l}
|
|
|
89312
89404
|
if (borders.left) parts.push(`l:[${hashParagraphBorder(borders.left)}]`);
|
|
89313
89405
|
return parts.join(";");
|
|
89314
89406
|
};
|
|
89407
|
+
function isNoneBorder(value) {
|
|
89408
|
+
return typeof value === "object" && value !== null && "none" in value && value.none === true;
|
|
89409
|
+
}
|
|
89410
|
+
function isBorderSpec(value) {
|
|
89411
|
+
return typeof value === "object" && value !== null && !("none" in value);
|
|
89412
|
+
}
|
|
89413
|
+
const hashBorderSpec = (border) => {
|
|
89414
|
+
const parts = [];
|
|
89415
|
+
if (border.style !== void 0) parts.push(`s:${border.style}`);
|
|
89416
|
+
if (border.width !== void 0) parts.push(`w:${border.width}`);
|
|
89417
|
+
if (border.color !== void 0) parts.push(`c:${border.color}`);
|
|
89418
|
+
if (border.space !== void 0) parts.push(`sp:${border.space}`);
|
|
89419
|
+
return parts.join(",");
|
|
89420
|
+
};
|
|
89421
|
+
const hashTableBorderValue = (borderValue) => {
|
|
89422
|
+
if (borderValue === void 0) return "";
|
|
89423
|
+
if (borderValue === null) return "null";
|
|
89424
|
+
if (isNoneBorder(borderValue)) return "none";
|
|
89425
|
+
if (isBorderSpec(borderValue)) {
|
|
89426
|
+
return hashBorderSpec(borderValue);
|
|
89427
|
+
}
|
|
89428
|
+
return "";
|
|
89429
|
+
};
|
|
89430
|
+
const hashTableBorders = (borders) => {
|
|
89431
|
+
if (!borders) return "";
|
|
89432
|
+
const parts = [];
|
|
89433
|
+
if (borders.top !== void 0) parts.push(`t:[${hashTableBorderValue(borders.top)}]`);
|
|
89434
|
+
if (borders.right !== void 0) parts.push(`r:[${hashTableBorderValue(borders.right)}]`);
|
|
89435
|
+
if (borders.bottom !== void 0) parts.push(`b:[${hashTableBorderValue(borders.bottom)}]`);
|
|
89436
|
+
if (borders.left !== void 0) parts.push(`l:[${hashTableBorderValue(borders.left)}]`);
|
|
89437
|
+
if (borders.insideH !== void 0) parts.push(`ih:[${hashTableBorderValue(borders.insideH)}]`);
|
|
89438
|
+
if (borders.insideV !== void 0) parts.push(`iv:[${hashTableBorderValue(borders.insideV)}]`);
|
|
89439
|
+
return parts.join(";");
|
|
89440
|
+
};
|
|
89441
|
+
const hashCellBorders = (borders) => {
|
|
89442
|
+
if (!borders) return "";
|
|
89443
|
+
const parts = [];
|
|
89444
|
+
if (borders.top) parts.push(`t:[${hashBorderSpec(borders.top)}]`);
|
|
89445
|
+
if (borders.right) parts.push(`r:[${hashBorderSpec(borders.right)}]`);
|
|
89446
|
+
if (borders.bottom) parts.push(`b:[${hashBorderSpec(borders.bottom)}]`);
|
|
89447
|
+
if (borders.left) parts.push(`l:[${hashBorderSpec(borders.left)}]`);
|
|
89448
|
+
return parts.join(";");
|
|
89449
|
+
};
|
|
89315
89450
|
const MAX_CACHE_SIZE$1 = 1e4;
|
|
89316
89451
|
const BYTES_PER_ENTRY_ESTIMATE = 5e3;
|
|
89317
89452
|
const NORMALIZED_WHITESPACE = /\s+/g;
|
|
@@ -89339,6 +89474,26 @@ ${l}
|
|
|
89339
89474
|
continue;
|
|
89340
89475
|
}
|
|
89341
89476
|
for (const cell2 of row2.cells) {
|
|
89477
|
+
if (cell2.attrs) {
|
|
89478
|
+
const cellAttrs = cell2.attrs;
|
|
89479
|
+
const cellAttrParts = [];
|
|
89480
|
+
if (cellAttrs.borders) {
|
|
89481
|
+
cellAttrParts.push(`cb:${hashCellBorders(cellAttrs.borders)}`);
|
|
89482
|
+
}
|
|
89483
|
+
if (cellAttrs.padding) {
|
|
89484
|
+
const p2 = cellAttrs.padding;
|
|
89485
|
+
cellAttrParts.push(`cp:${p2.top ?? 0}:${p2.right ?? 0}:${p2.bottom ?? 0}:${p2.left ?? 0}`);
|
|
89486
|
+
}
|
|
89487
|
+
if (cellAttrs.verticalAlign) {
|
|
89488
|
+
cellAttrParts.push(`va:${cellAttrs.verticalAlign}`);
|
|
89489
|
+
}
|
|
89490
|
+
if (cellAttrs.background) {
|
|
89491
|
+
cellAttrParts.push(`bg:${cellAttrs.background}`);
|
|
89492
|
+
}
|
|
89493
|
+
if (cellAttrParts.length > 0) {
|
|
89494
|
+
cellHashes.push(`ca:${cellAttrParts.join(":")}`);
|
|
89495
|
+
}
|
|
89496
|
+
}
|
|
89342
89497
|
const cellBlocks = cell2.blocks ?? (cell2.paragraph ? [cell2.paragraph] : []);
|
|
89343
89498
|
for (const cellBlock of cellBlocks) {
|
|
89344
89499
|
const paragraphBlock = cellBlock;
|
|
@@ -89405,8 +89560,25 @@ ${l}
|
|
|
89405
89560
|
}
|
|
89406
89561
|
}
|
|
89407
89562
|
}
|
|
89563
|
+
let tableAttrsKey = "";
|
|
89564
|
+
if (tableBlock.attrs) {
|
|
89565
|
+
const tblAttrs = tableBlock.attrs;
|
|
89566
|
+
const tableAttrParts = [];
|
|
89567
|
+
if (tblAttrs.borders) {
|
|
89568
|
+
tableAttrParts.push(`tb:${hashTableBorders(tblAttrs.borders)}`);
|
|
89569
|
+
}
|
|
89570
|
+
if (tblAttrs.borderCollapse) {
|
|
89571
|
+
tableAttrParts.push(`bc:${tblAttrs.borderCollapse}`);
|
|
89572
|
+
}
|
|
89573
|
+
if (tblAttrs.cellSpacing !== void 0) {
|
|
89574
|
+
tableAttrParts.push(`cs:${tblAttrs.cellSpacing}`);
|
|
89575
|
+
}
|
|
89576
|
+
if (tableAttrParts.length > 0) {
|
|
89577
|
+
tableAttrsKey = `|ta:${tableAttrParts.join(":")}`;
|
|
89578
|
+
}
|
|
89579
|
+
}
|
|
89408
89580
|
const contentHash = cellHashes.join("|");
|
|
89409
|
-
return `${block.id}:table:${contentHash}`;
|
|
89581
|
+
return `${block.id}:table:${contentHash}${tableAttrsKey}`;
|
|
89410
89582
|
}
|
|
89411
89583
|
if (block.kind !== "paragraph") return block.id;
|
|
89412
89584
|
const trackedMode = block.attrs && "trackedChangesMode" in block.attrs && block.attrs.trackedChangesMode || "review";
|
|
@@ -93638,7 +93810,7 @@ ${l}
|
|
|
93638
93810
|
const wordEndWithSpace = charPosInRun + (isLastWord ? word.length : word.length + 1);
|
|
93639
93811
|
const effectiveMaxWidth = currentLine ? currentLine.maxWidth : getEffectiveWidth(lines.length === 0 ? initialAvailableWidth : contentWidth);
|
|
93640
93812
|
if (wordOnlyWidth > effectiveMaxWidth && word.length > 1) {
|
|
93641
|
-
if (currentLine && currentLine.width > 0 && currentLine.segments.length > 0) {
|
|
93813
|
+
if (currentLine && currentLine.width > 0 && currentLine.segments && currentLine.segments.length > 0) {
|
|
93642
93814
|
const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
|
|
93643
93815
|
const { spaceCount: _sc, ...lineBase } = currentLine;
|
|
93644
93816
|
const completedLine = { ...lineBase, ...metrics };
|
|
@@ -93649,7 +93821,7 @@ ${l}
|
|
|
93649
93821
|
currentLine = null;
|
|
93650
93822
|
}
|
|
93651
93823
|
const lineMaxWidth = getEffectiveWidth(lines.length === 0 ? initialAvailableWidth : contentWidth);
|
|
93652
|
-
const hasTabOnlyLine = currentLine && currentLine.segments.length === 0 && currentLine.width > 0;
|
|
93824
|
+
const hasTabOnlyLine = currentLine && currentLine.segments && currentLine.segments.length === 0 && currentLine.width > 0;
|
|
93653
93825
|
const remainingWidthAfterTab = hasTabOnlyLine ? currentLine.maxWidth - currentLine.width : lineMaxWidth;
|
|
93654
93826
|
const chunkWidth = hasTabOnlyLine ? Math.max(remainingWidthAfterTab, lineMaxWidth * 0.25) : lineMaxWidth;
|
|
93655
93827
|
const chunks = breakWordIntoChunks(word, chunkWidth - WIDTH_FUDGE_PX2, font, ctx2, run2);
|
|
@@ -93660,7 +93832,7 @@ ${l}
|
|
|
93660
93832
|
const chunkEndChar = chunkCharOffset + chunk.text.length;
|
|
93661
93833
|
const isLastChunk = chunkIndex === chunks.length - 1;
|
|
93662
93834
|
const isFirstChunk = chunkIndex === 0;
|
|
93663
|
-
if (isFirstChunk && hasTabOnlyLine && currentLine) {
|
|
93835
|
+
if (isFirstChunk && hasTabOnlyLine && currentLine && currentLine.segments) {
|
|
93664
93836
|
currentLine.toRun = runIndex;
|
|
93665
93837
|
currentLine.toChar = chunkEndChar;
|
|
93666
93838
|
currentLine.width = roundValue(currentLine.width + chunk.width);
|
|
@@ -97897,18 +98069,19 @@ ${l}
|
|
|
97897
98069
|
const normalized = /* @__PURE__ */ new Map();
|
|
97898
98070
|
states?.forEach((aw, clientId) => {
|
|
97899
98071
|
if (clientId === provider2.awareness?.clientID) return;
|
|
97900
|
-
|
|
98072
|
+
const awState = aw;
|
|
98073
|
+
if (!awState.cursor) return;
|
|
97901
98074
|
try {
|
|
97902
98075
|
const anchor = relativePositionToAbsolutePosition(
|
|
97903
98076
|
ystate.doc,
|
|
97904
98077
|
ystate.type,
|
|
97905
|
-
Y__namespace.createRelativePositionFromJSON(
|
|
98078
|
+
Y__namespace.createRelativePositionFromJSON(awState.cursor.anchor),
|
|
97906
98079
|
ystate.binding.mapping
|
|
97907
98080
|
);
|
|
97908
98081
|
const head = relativePositionToAbsolutePosition(
|
|
97909
98082
|
ystate.doc,
|
|
97910
98083
|
ystate.type,
|
|
97911
|
-
Y__namespace.createRelativePositionFromJSON(
|
|
98084
|
+
Y__namespace.createRelativePositionFromJSON(awState.cursor.head),
|
|
97912
98085
|
ystate.binding.mapping
|
|
97913
98086
|
);
|
|
97914
98087
|
if (anchor === null || head === null) return;
|
|
@@ -97920,9 +98093,9 @@ ${l}
|
|
|
97920
98093
|
normalized.set(clientId, {
|
|
97921
98094
|
clientId,
|
|
97922
98095
|
user: {
|
|
97923
|
-
name:
|
|
97924
|
-
email:
|
|
97925
|
-
color:
|
|
98096
|
+
name: awState.user?.name,
|
|
98097
|
+
email: awState.user?.email,
|
|
98098
|
+
color: awState.user?.color || __privateMethod$1(this, _PresentationEditor_instances, getFallbackColor_fn).call(this, clientId)
|
|
97926
98099
|
},
|
|
97927
98100
|
anchor: clampedAnchor,
|
|
97928
98101
|
head: clampedHead,
|
|
@@ -100396,8 +100569,8 @@ ${l}
|
|
|
100396
100569
|
const zoom2 = __privateGet$1(this, _layoutOptions).zoom ?? 1;
|
|
100397
100570
|
let domCaretX2 = null;
|
|
100398
100571
|
let domCaretY2 = null;
|
|
100399
|
-
const spanEls2 = pageEl2?.querySelectorAll("span[data-pm-start][data-pm-end]")
|
|
100400
|
-
for (const spanEl of spanEls2) {
|
|
100572
|
+
const spanEls2 = pageEl2?.querySelectorAll("span[data-pm-start][data-pm-end]");
|
|
100573
|
+
for (const spanEl of Array.from(spanEls2 ?? [])) {
|
|
100401
100574
|
const pmStart = Number(spanEl.dataset.pmStart);
|
|
100402
100575
|
const pmEnd = Number(spanEl.dataset.pmEnd);
|
|
100403
100576
|
if (pos >= pmStart && pos <= pmEnd && spanEl.firstChild?.nodeType === Node.TEXT_NODE) {
|
|
@@ -100449,8 +100622,8 @@ ${l}
|
|
|
100449
100622
|
const zoom = __privateGet$1(this, _layoutOptions).zoom ?? 1;
|
|
100450
100623
|
let domCaretX = null;
|
|
100451
100624
|
let domCaretY = null;
|
|
100452
|
-
const spanEls = pageEl?.querySelectorAll("span[data-pm-start][data-pm-end]")
|
|
100453
|
-
for (const spanEl of spanEls) {
|
|
100625
|
+
const spanEls = pageEl?.querySelectorAll("span[data-pm-start][data-pm-end]");
|
|
100626
|
+
for (const spanEl of Array.from(spanEls ?? [])) {
|
|
100454
100627
|
const pmStart = Number(spanEl.dataset.pmStart);
|
|
100455
100628
|
const pmEnd = Number(spanEl.dataset.pmEnd);
|
|
100456
100629
|
if (pos >= pmStart && pos <= pmEnd && spanEl.firstChild?.nodeType === Node.TEXT_NODE) {
|
|
@@ -152798,7 +152971,7 @@ ${style2}
|
|
|
152798
152971
|
this.config.colors = shuffleArray(this.config.colors);
|
|
152799
152972
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
152800
152973
|
this.colorIndex = 0;
|
|
152801
|
-
this.version = "1.0.0-beta.
|
|
152974
|
+
this.version = "1.0.0-beta.103";
|
|
152802
152975
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
152803
152976
|
this.superdocId = config2.superdocId || v4();
|
|
152804
152977
|
this.colors = this.config.colors;
|
|
@@ -155270,7 +155443,7 @@ ${style2}
|
|
|
155270
155443
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
155271
155444
|
);
|
|
155272
155445
|
}
|
|
155273
|
-
const
|
|
155446
|
+
const indexDQVMKA35 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
155274
155447
|
__proto__: null,
|
|
155275
155448
|
unified
|
|
155276
155449
|
}, Symbol.toStringTag, { value: "Module" }));
|