@superdoc-dev/cli 0.16.0-next.2 → 0.16.0-next.4
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/index.js +391 -360
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -68110,7 +68110,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
68110
68110
|
emptyOptions2 = {};
|
|
68111
68111
|
});
|
|
68112
68112
|
|
|
68113
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
68113
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-nmIRMGtB.es.js
|
|
68114
68114
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
68115
68115
|
const fieldValue = extension$1.config[field];
|
|
68116
68116
|
if (typeof fieldValue === "function")
|
|
@@ -68913,10 +68913,10 @@ function isStoryLocator2(value) {
|
|
|
68913
68913
|
case "headerFooterSlot":
|
|
68914
68914
|
return isSectionAddress2(value.section) && isStringEnumMember2(value.headerFooterKind, STORY_HEADER_FOOTER_KINDS2) && isStringEnumMember2(value.variant, STORY_HEADER_FOOTER_VARIANTS2) && isOptionalStringEnumMember2(value.resolution, STORY_HEADER_FOOTER_RESOLUTIONS2) && isOptionalStringEnumMember2(value.onWrite, STORY_HEADER_FOOTER_ON_WRITE_VALUES2);
|
|
68915
68915
|
case "headerFooterPart":
|
|
68916
|
-
return isNonEmptyString$
|
|
68916
|
+
return isNonEmptyString$2(value.refId);
|
|
68917
68917
|
case "footnote":
|
|
68918
68918
|
case "endnote":
|
|
68919
|
-
return isNonEmptyString$
|
|
68919
|
+
return isNonEmptyString$2(value.noteId);
|
|
68920
68920
|
}
|
|
68921
68921
|
}
|
|
68922
68922
|
function getStoryHeaderFooterResolution(locator) {
|
|
@@ -68949,7 +68949,7 @@ function storyLocatorToKey2(locator) {
|
|
|
68949
68949
|
function isObjectRecord$1(value) {
|
|
68950
68950
|
return typeof value === "object" && value !== null;
|
|
68951
68951
|
}
|
|
68952
|
-
function isNonEmptyString$
|
|
68952
|
+
function isNonEmptyString$2(value) {
|
|
68953
68953
|
return typeof value === "string" && value.length > 0;
|
|
68954
68954
|
}
|
|
68955
68955
|
function isStringEnumMember2(value, allowed) {
|
|
@@ -80590,6 +80590,7 @@ function handleStructuredContentNode(params3) {
|
|
|
80590
80590
|
return null;
|
|
80591
80591
|
const paragraph2 = sdtContent.elements?.find((el) => el.name === "w:p");
|
|
80592
80592
|
const table = sdtContent.elements?.find((el) => el.name === "w:tbl");
|
|
80593
|
+
const blockField = sdtContent.elements?.find((el) => BLOCK_FIELD_XML_NAMES.has(el?.name));
|
|
80593
80594
|
const { marks } = parseAnnotationMarks(sdtContent);
|
|
80594
80595
|
const translatedContent = nodeListHandler.handler({
|
|
80595
80596
|
...params3,
|
|
@@ -80597,7 +80598,7 @@ function handleStructuredContentNode(params3) {
|
|
|
80597
80598
|
path: [...params3.path || [], sdtContent]
|
|
80598
80599
|
});
|
|
80599
80600
|
return {
|
|
80600
|
-
type: paragraph2 || table ? "structuredContentBlock" : "structuredContent",
|
|
80601
|
+
type: paragraph2 || table || blockField ? "structuredContentBlock" : "structuredContent",
|
|
80601
80602
|
content: translatedContent,
|
|
80602
80603
|
marks,
|
|
80603
80604
|
attrs: {
|
|
@@ -82409,17 +82410,52 @@ function preProcessTocInstruction(nodesToCombine, instrText) {
|
|
|
82409
82410
|
elements: nodesToCombine
|
|
82410
82411
|
}];
|
|
82411
82412
|
}
|
|
82412
|
-
function
|
|
82413
|
+
function normalizeFieldContentToParagraphs(nodes) {
|
|
82414
|
+
const input = Array.isArray(nodes) ? nodes : [];
|
|
82415
|
+
if (input.length === 0)
|
|
82416
|
+
return [{
|
|
82417
|
+
name: "w:p",
|
|
82418
|
+
type: "element",
|
|
82419
|
+
elements: []
|
|
82420
|
+
}];
|
|
82421
|
+
const out = [];
|
|
82422
|
+
let buffer3 = null;
|
|
82423
|
+
const flushBuffer = () => {
|
|
82424
|
+
if (buffer3) {
|
|
82425
|
+
out.push({
|
|
82426
|
+
name: "w:p",
|
|
82427
|
+
type: "element",
|
|
82428
|
+
elements: buffer3
|
|
82429
|
+
});
|
|
82430
|
+
buffer3 = null;
|
|
82431
|
+
}
|
|
82432
|
+
};
|
|
82433
|
+
for (const node3 of input)
|
|
82434
|
+
if (node3?.name === "w:p") {
|
|
82435
|
+
flushBuffer();
|
|
82436
|
+
out.push(node3);
|
|
82437
|
+
} else {
|
|
82438
|
+
if (!buffer3)
|
|
82439
|
+
buffer3 = [];
|
|
82440
|
+
buffer3.push(node3);
|
|
82441
|
+
}
|
|
82442
|
+
flushBuffer();
|
|
82443
|
+
return out;
|
|
82444
|
+
}
|
|
82445
|
+
function buildBlockFieldNode(xmlName, nodesToCombine, instrText, instructionTokens = null) {
|
|
82413
82446
|
return [{
|
|
82414
|
-
name:
|
|
82447
|
+
name: xmlName,
|
|
82415
82448
|
type: "element",
|
|
82416
82449
|
attributes: {
|
|
82417
82450
|
instruction: instrText,
|
|
82418
82451
|
...instructionTokens ? { instructionTokens } : {}
|
|
82419
82452
|
},
|
|
82420
|
-
elements: nodesToCombine
|
|
82453
|
+
elements: normalizeFieldContentToParagraphs(nodesToCombine)
|
|
82421
82454
|
}];
|
|
82422
82455
|
}
|
|
82456
|
+
function preProcessIndexInstruction(nodesToCombine, instrText, _docx, instructionTokens = null) {
|
|
82457
|
+
return buildBlockFieldNode("sd:index", nodesToCombine, instrText, instructionTokens);
|
|
82458
|
+
}
|
|
82423
82459
|
function preProcessXeInstruction(nodesToCombine, instrText, _docx, instructionTokens = null) {
|
|
82424
82460
|
return [{
|
|
82425
82461
|
name: "sd:indexEntry",
|
|
@@ -82497,18 +82533,8 @@ function preProcessCitationInstruction(nodesToCombine, instrText, _docx, instruc
|
|
|
82497
82533
|
elements: nodesToCombine
|
|
82498
82534
|
}];
|
|
82499
82535
|
}
|
|
82500
|
-
function preProcessBibliographyInstruction(nodesToCombine, instrText) {
|
|
82501
|
-
|
|
82502
|
-
name: "w:p",
|
|
82503
|
-
type: "element",
|
|
82504
|
-
elements: []
|
|
82505
|
-
}];
|
|
82506
|
-
return [{
|
|
82507
|
-
name: "sd:bibliography",
|
|
82508
|
-
type: "element",
|
|
82509
|
-
attributes: { instruction: instrText },
|
|
82510
|
-
elements: contentNodes
|
|
82511
|
-
}];
|
|
82536
|
+
function preProcessBibliographyInstruction(nodesToCombine, instrText, _docx, instructionTokens = null) {
|
|
82537
|
+
return buildBlockFieldNode("sd:bibliography", nodesToCombine, instrText, instructionTokens);
|
|
82512
82538
|
}
|
|
82513
82539
|
function preProcessTaInstruction(nodesToCombine, instrText, _docx, instructionTokens = null) {
|
|
82514
82540
|
return [{
|
|
@@ -82522,15 +82548,7 @@ function preProcessTaInstruction(nodesToCombine, instrText, _docx, instructionTo
|
|
|
82522
82548
|
}];
|
|
82523
82549
|
}
|
|
82524
82550
|
function preProcessToaInstruction(nodesToCombine, instrText, _docx, instructionTokens = null) {
|
|
82525
|
-
return
|
|
82526
|
-
name: "sd:tableOfAuthorities",
|
|
82527
|
-
type: "element",
|
|
82528
|
-
attributes: {
|
|
82529
|
-
instruction: instrText,
|
|
82530
|
-
...instructionTokens ? { instructionTokens } : {}
|
|
82531
|
-
},
|
|
82532
|
-
elements: nodesToCombine
|
|
82533
|
-
}];
|
|
82551
|
+
return buildBlockFieldNode("sd:tableOfAuthorities", nodesToCombine, instrText, instructionTokens);
|
|
82534
82552
|
}
|
|
82535
82553
|
function preProcessDocumentStatInstruction(nodesToCombine, instrText, _docxOrFieldRunRPr = null, instructionTokensOrFieldRunRPr = null, fieldRunRPr = null) {
|
|
82536
82554
|
const effectiveFieldRunRPr = fieldRunRPr ?? (instructionTokensOrFieldRunRPr?.name === "w:rPr" ? instructionTokensOrFieldRunRPr : null) ?? (_docxOrFieldRunRPr?.name === "w:rPr" ? _docxOrFieldRunRPr : null);
|
|
@@ -97883,6 +97901,69 @@ function buildFieldResultRuns(params3, outputMarks) {
|
|
|
97883
97901
|
}]
|
|
97884
97902
|
}];
|
|
97885
97903
|
}
|
|
97904
|
+
function wrapParagraphsAsComplexField(contentNodes, instructionElements, wrapperParagraphProperties = null) {
|
|
97905
|
+
const beginElements = [
|
|
97906
|
+
{
|
|
97907
|
+
name: "w:r",
|
|
97908
|
+
elements: [{
|
|
97909
|
+
name: "w:fldChar",
|
|
97910
|
+
attributes: { "w:fldCharType": "begin" },
|
|
97911
|
+
elements: []
|
|
97912
|
+
}]
|
|
97913
|
+
},
|
|
97914
|
+
{
|
|
97915
|
+
name: "w:r",
|
|
97916
|
+
elements: instructionElements
|
|
97917
|
+
},
|
|
97918
|
+
{
|
|
97919
|
+
name: "w:r",
|
|
97920
|
+
elements: [{
|
|
97921
|
+
name: "w:fldChar",
|
|
97922
|
+
attributes: { "w:fldCharType": "separate" },
|
|
97923
|
+
elements: []
|
|
97924
|
+
}]
|
|
97925
|
+
}
|
|
97926
|
+
];
|
|
97927
|
+
if (contentNodes.length > 0) {
|
|
97928
|
+
const firstParagraph = contentNodes[0];
|
|
97929
|
+
if (wrapperParagraphProperties) {
|
|
97930
|
+
const restoredPPr = carbonCopy(wrapperParagraphProperties);
|
|
97931
|
+
if (firstParagraph.elements) {
|
|
97932
|
+
const pPrIndex = firstParagraph.elements.findIndex((el) => el.name === "w:pPr");
|
|
97933
|
+
if (pPrIndex >= 0)
|
|
97934
|
+
firstParagraph.elements.splice(pPrIndex, 1, restoredPPr);
|
|
97935
|
+
else
|
|
97936
|
+
firstParagraph.elements.unshift(restoredPPr);
|
|
97937
|
+
} else
|
|
97938
|
+
firstParagraph.elements = [restoredPPr];
|
|
97939
|
+
}
|
|
97940
|
+
let insertIndex = 0;
|
|
97941
|
+
if (firstParagraph.elements) {
|
|
97942
|
+
const pPrIndex = firstParagraph.elements.findIndex((el) => el.name === "w:pPr");
|
|
97943
|
+
insertIndex = pPrIndex >= 0 ? pPrIndex + 1 : 0;
|
|
97944
|
+
} else
|
|
97945
|
+
firstParagraph.elements = [];
|
|
97946
|
+
firstParagraph.elements.splice(insertIndex, 0, ...beginElements);
|
|
97947
|
+
} else
|
|
97948
|
+
contentNodes.push({
|
|
97949
|
+
name: "w:p",
|
|
97950
|
+
elements: beginElements
|
|
97951
|
+
});
|
|
97952
|
+
const endElements = [{
|
|
97953
|
+
name: "w:r",
|
|
97954
|
+
elements: [{
|
|
97955
|
+
name: "w:fldChar",
|
|
97956
|
+
attributes: { "w:fldCharType": "end" },
|
|
97957
|
+
elements: []
|
|
97958
|
+
}]
|
|
97959
|
+
}];
|
|
97960
|
+
const lastParagraph = contentNodes[contentNodes.length - 1];
|
|
97961
|
+
if (lastParagraph.elements)
|
|
97962
|
+
lastParagraph.elements.push(...endElements);
|
|
97963
|
+
else
|
|
97964
|
+
lastParagraph.elements = [...endElements];
|
|
97965
|
+
return contentNodes;
|
|
97966
|
+
}
|
|
97886
97967
|
function parseTarget(instruction) {
|
|
97887
97968
|
if (!instruction)
|
|
97888
97969
|
return "";
|
|
@@ -102488,8 +102569,8 @@ function handleTableOfContentsNode(node3, context) {
|
|
|
102488
102569
|
recordBlockKind: context.recordBlockKind
|
|
102489
102570
|
});
|
|
102490
102571
|
}
|
|
102491
|
-
function
|
|
102492
|
-
const children =
|
|
102572
|
+
function handleParagraphContainerNode(node3, context) {
|
|
102573
|
+
const children = getParagraphContainerChildren(node3);
|
|
102493
102574
|
if (children.length === 0)
|
|
102494
102575
|
return;
|
|
102495
102576
|
const { blocks, recordBlockKind, nextBlockId, positions, trackedChangesConfig, bookmarks, hyperlinkConfig, sectionState, converters: converters$1, themeColors, enableComments } = context;
|
|
@@ -102693,7 +102774,7 @@ function handleStructuredContentBlockNode(node3, context) {
|
|
|
102693
102774
|
}
|
|
102694
102775
|
return;
|
|
102695
102776
|
}
|
|
102696
|
-
if (child.type === "documentPartObject"
|
|
102777
|
+
if (Array.isArray(child.content) && (child.type === "documentPartObject" || child.type === "bibliography" || child.type === "index" || child.type === "tableOfAuthorities"))
|
|
102697
102778
|
child.content.forEach(visitChild);
|
|
102698
102779
|
};
|
|
102699
102780
|
node3.content.forEach(visitChild);
|
|
@@ -102944,83 +103025,12 @@ function handleDocumentPartObjectNode(node3, context) {
|
|
|
102944
103025
|
recordBlockKind
|
|
102945
103026
|
};
|
|
102946
103027
|
processTocChildren(child.content, metadata, tocContext, output);
|
|
102947
|
-
}
|
|
103028
|
+
} else if (PARAGRAPH_CONTAINER_TYPES.has(child.type))
|
|
103029
|
+
handleParagraphContainerNode(child, context);
|
|
103030
|
+
else if (child.type === "structuredContentBlock")
|
|
103031
|
+
handleStructuredContentBlockNode(child, context);
|
|
102948
103032
|
}
|
|
102949
103033
|
}
|
|
102950
|
-
function handleBibliographyNode(node3, context) {
|
|
102951
|
-
const children = getChildren$1(node3);
|
|
102952
|
-
if (children.length === 0)
|
|
102953
|
-
return;
|
|
102954
|
-
const { blocks, recordBlockKind, nextBlockId, positions, trackedChangesConfig, bookmarks, hyperlinkConfig, sectionState, converters: converters$1, themeColors, enableComments } = context;
|
|
102955
|
-
const paragraphToFlowBlocks$1 = converters$1.paragraphToFlowBlocks;
|
|
102956
|
-
children.forEach((child) => {
|
|
102957
|
-
if (child.type !== "paragraph")
|
|
102958
|
-
return;
|
|
102959
|
-
if ((sectionState?.ranges?.length ?? 0) > 0) {
|
|
102960
|
-
const nextSection = sectionState.ranges[sectionState.currentSectionIndex + 1];
|
|
102961
|
-
if (nextSection && sectionState.currentParagraphIndex === nextSection.startParagraphIndex) {
|
|
102962
|
-
const currentSection = sectionState.ranges[sectionState.currentSectionIndex];
|
|
102963
|
-
const sectionBreak = createSectionBreakBlock(nextSection, nextBlockId, shouldRequirePageBoundary(currentSection, nextSection) || hasIntrinsicBoundarySignals(nextSection) ? { requirePageBoundary: true } : undefined);
|
|
102964
|
-
blocks.push(sectionBreak);
|
|
102965
|
-
recordBlockKind?.(sectionBreak.kind);
|
|
102966
|
-
sectionState.currentSectionIndex++;
|
|
102967
|
-
}
|
|
102968
|
-
}
|
|
102969
|
-
paragraphToFlowBlocks$1({
|
|
102970
|
-
para: child,
|
|
102971
|
-
nextBlockId,
|
|
102972
|
-
positions,
|
|
102973
|
-
trackedChangesConfig,
|
|
102974
|
-
bookmarks,
|
|
102975
|
-
hyperlinkConfig,
|
|
102976
|
-
themeColors,
|
|
102977
|
-
converterContext: context.converterContext,
|
|
102978
|
-
enableComments,
|
|
102979
|
-
converters: converters$1
|
|
102980
|
-
}).forEach((block) => {
|
|
102981
|
-
blocks.push(block);
|
|
102982
|
-
recordBlockKind?.(block.kind);
|
|
102983
|
-
});
|
|
102984
|
-
sectionState.currentParagraphIndex++;
|
|
102985
|
-
});
|
|
102986
|
-
}
|
|
102987
|
-
function handleTableOfAuthoritiesNode(node3, context) {
|
|
102988
|
-
const children = getChildren(node3);
|
|
102989
|
-
if (children.length === 0)
|
|
102990
|
-
return;
|
|
102991
|
-
const { blocks, recordBlockKind, nextBlockId, positions, trackedChangesConfig, bookmarks, hyperlinkConfig, sectionState, converters: converters$1, themeColors, enableComments } = context;
|
|
102992
|
-
const paragraphToFlowBlocks$1 = converters$1.paragraphToFlowBlocks;
|
|
102993
|
-
children.forEach((child) => {
|
|
102994
|
-
if (child.type !== "paragraph")
|
|
102995
|
-
return;
|
|
102996
|
-
if ((sectionState?.ranges?.length ?? 0) > 0) {
|
|
102997
|
-
const nextSection = sectionState.ranges[sectionState.currentSectionIndex + 1];
|
|
102998
|
-
if (nextSection && sectionState.currentParagraphIndex === nextSection.startParagraphIndex) {
|
|
102999
|
-
const currentSection = sectionState.ranges[sectionState.currentSectionIndex];
|
|
103000
|
-
const sectionBreak = createSectionBreakBlock(nextSection, nextBlockId, shouldRequirePageBoundary(currentSection, nextSection) || hasIntrinsicBoundarySignals(nextSection) ? { requirePageBoundary: true } : undefined);
|
|
103001
|
-
blocks.push(sectionBreak);
|
|
103002
|
-
recordBlockKind?.(sectionBreak.kind);
|
|
103003
|
-
sectionState.currentSectionIndex++;
|
|
103004
|
-
}
|
|
103005
|
-
}
|
|
103006
|
-
paragraphToFlowBlocks$1({
|
|
103007
|
-
para: child,
|
|
103008
|
-
nextBlockId,
|
|
103009
|
-
positions,
|
|
103010
|
-
trackedChangesConfig,
|
|
103011
|
-
bookmarks,
|
|
103012
|
-
hyperlinkConfig,
|
|
103013
|
-
themeColors,
|
|
103014
|
-
converterContext: context.converterContext,
|
|
103015
|
-
enableComments,
|
|
103016
|
-
converters: converters$1
|
|
103017
|
-
}).forEach((block) => {
|
|
103018
|
-
blocks.push(block);
|
|
103019
|
-
recordBlockKind?.(block.kind);
|
|
103020
|
-
});
|
|
103021
|
-
sectionState.currentParagraphIndex++;
|
|
103022
|
-
});
|
|
103023
|
-
}
|
|
103024
103034
|
function structuredContentNodeToBlocks({ node: node3, positions, defaultFont, defaultSize, inheritedMarks, sdtMetadata, visitNode, runProperties, inlineRunProperties, converterContext }) {
|
|
103025
103035
|
const inlineMetadata = resolveNodeSdtMetadata(node3, "structuredContent");
|
|
103026
103036
|
const nextSdt = inlineMetadata ?? sdtMetadata;
|
|
@@ -104698,6 +104708,7 @@ function toFlowBlocks(pmDoc, options) {
|
|
|
104698
104708
|
bookmarks: bookmarks.size
|
|
104699
104709
|
});
|
|
104700
104710
|
const mergedBlocks = mergeFusedParagraphs(mergeDropCapParagraphs(hydrateImageBlocks(blocks, options?.mediaFiles)));
|
|
104711
|
+
stampTrackedChangeColors(mergedBlocks, options?.resolveTrackedChangeColor);
|
|
104701
104712
|
flowBlockCache?.commit();
|
|
104702
104713
|
return {
|
|
104703
104714
|
blocks: mergedBlocks,
|
|
@@ -108705,6 +108716,9 @@ function getTextAdapter(editor, input) {
|
|
|
108705
108716
|
`, `
|
|
108706
108717
|
`, { textModel: "visible" });
|
|
108707
108718
|
}
|
|
108719
|
+
function rangesOverlap(a, b) {
|
|
108720
|
+
return a[0] < b[1] && b[0] < a[1];
|
|
108721
|
+
}
|
|
108708
108722
|
function getRawTrackedMarks(editor) {
|
|
108709
108723
|
try {
|
|
108710
108724
|
const marks = getTrackChanges(editor.state);
|
|
@@ -108904,6 +108918,7 @@ function groupTrackedChanges(editor) {
|
|
|
108904
108918
|
const wordRevisionId = toNonEmptyString(attrs.sourceId);
|
|
108905
108919
|
const wordRevisionIdKey = getWordRevisionIdKey(markType);
|
|
108906
108920
|
const excerptText = !wordRevisionId || !hasChildTrackedMarkOnNode(item, id2) ? getTrackedMarkText(editor, item) : "";
|
|
108921
|
+
const range = [item.from, item.to];
|
|
108907
108922
|
if (!existing) {
|
|
108908
108923
|
byRawId.set(groupKey, {
|
|
108909
108924
|
rawId: groupKey,
|
|
@@ -108915,6 +108930,7 @@ function groupTrackedChanges(editor) {
|
|
|
108915
108930
|
hasFormat: nextHasFormat,
|
|
108916
108931
|
attrs: { ...attrs },
|
|
108917
108932
|
excerptParts: excerptText ? [excerptText] : [],
|
|
108933
|
+
excerptRanges: excerptText ? [range] : [],
|
|
108918
108934
|
wordRevisionIds: wordRevisionIdKey ? mergeWordRevisionId(undefined, wordRevisionIdKey, wordRevisionId ?? undefined) : undefined
|
|
108919
108935
|
});
|
|
108920
108936
|
continue;
|
|
@@ -108926,12 +108942,14 @@ function groupTrackedChanges(editor) {
|
|
|
108926
108942
|
existing.hasFormat = existing.hasFormat || nextHasFormat;
|
|
108927
108943
|
if (Object.keys(existing.attrs).length === 0 && Object.keys(attrs).length > 0)
|
|
108928
108944
|
existing.attrs = { ...attrs };
|
|
108929
|
-
if (excerptText)
|
|
108945
|
+
if (excerptText && !existing.excerptRanges.some((counted) => rangesOverlap(counted, range))) {
|
|
108946
|
+
existing.excerptRanges.push(range);
|
|
108930
108947
|
existing.excerptParts.push(excerptText);
|
|
108948
|
+
}
|
|
108931
108949
|
if (wordRevisionIdKey)
|
|
108932
108950
|
existing.wordRevisionIds = mergeWordRevisionId(existing.wordRevisionIds, wordRevisionIdKey, wordRevisionId ?? undefined);
|
|
108933
108951
|
}
|
|
108934
|
-
const grouped = Array.from(byRawId.values()).map(({ excerptParts, ...change }) => {
|
|
108952
|
+
const grouped = Array.from(byRawId.values()).map(({ excerptParts, excerptRanges: _excerptRanges, ...change }) => {
|
|
108935
108953
|
const hasWordSourceId = Boolean(toNonEmptyString(change.attrs.sourceId));
|
|
108936
108954
|
const rawExcerpt = excerptParts.join("");
|
|
108937
108955
|
const withExcerpt = {
|
|
@@ -112811,6 +112829,50 @@ var isRegExp = (value) => {
|
|
|
112811
112829
|
partialRow: fragment2.kind === "table" ? fragment2.partialRow : undefined,
|
|
112812
112830
|
sourceAnchor: fragment2.sourceAnchor ?? existing?.sourceAnchor
|
|
112813
112831
|
});
|
|
112832
|
+
}, isNonEmptyString$1 = (value) => typeof value === "string" && value.length > 0, authorFromTrackedChangeMeta = (meta) => ({
|
|
112833
|
+
name: meta.author,
|
|
112834
|
+
email: meta.authorEmail,
|
|
112835
|
+
image: meta.authorImage
|
|
112836
|
+
}), applyColorToLayer = (meta, resolve2) => {
|
|
112837
|
+
const color2 = resolve2?.(authorFromTrackedChangeMeta(meta));
|
|
112838
|
+
if (isNonEmptyString$1(color2)) {
|
|
112839
|
+
meta.color = color2;
|
|
112840
|
+
return;
|
|
112841
|
+
}
|
|
112842
|
+
delete meta.color;
|
|
112843
|
+
}, stampRunTrackedChangeColors = (run$1, resolve2) => {
|
|
112844
|
+
if (Array.isArray(run$1.trackedChanges))
|
|
112845
|
+
for (const layer of run$1.trackedChanges)
|
|
112846
|
+
applyColorToLayer(layer, resolve2);
|
|
112847
|
+
if (run$1.trackedChange)
|
|
112848
|
+
applyColorToLayer(run$1.trackedChange, resolve2);
|
|
112849
|
+
}, stampBlockTrackedChangeColors = (block, resolve2) => {
|
|
112850
|
+
if (!block)
|
|
112851
|
+
return;
|
|
112852
|
+
switch (block.kind) {
|
|
112853
|
+
case "paragraph":
|
|
112854
|
+
for (const run$1 of block.runs)
|
|
112855
|
+
stampRunTrackedChangeColors(run$1, resolve2);
|
|
112856
|
+
break;
|
|
112857
|
+
case "list":
|
|
112858
|
+
for (const item of block.items)
|
|
112859
|
+
stampBlockTrackedChangeColors(item.paragraph, resolve2);
|
|
112860
|
+
break;
|
|
112861
|
+
case "table":
|
|
112862
|
+
for (const row of block.rows)
|
|
112863
|
+
for (const cell of row.cells) {
|
|
112864
|
+
stampBlockTrackedChangeColors(cell.paragraph, resolve2);
|
|
112865
|
+
if (Array.isArray(cell.blocks))
|
|
112866
|
+
for (const nested of cell.blocks)
|
|
112867
|
+
stampBlockTrackedChangeColors(nested, resolve2);
|
|
112868
|
+
}
|
|
112869
|
+
break;
|
|
112870
|
+
default:
|
|
112871
|
+
break;
|
|
112872
|
+
}
|
|
112873
|
+
}, stampTrackedChangeColors = (blocks, resolve2) => {
|
|
112874
|
+
for (const block of blocks)
|
|
112875
|
+
stampBlockTrackedChangeColors(block, resolve2);
|
|
112814
112876
|
}, idlessSdtContainerKeys, nextIdlessSdtContainerKey = 0, engines_exports, EMPTY_SDT_PLACEHOLDER_TEXT = "Click or tap here to enter text", FONT_SLOT_THEME_PAIRS, TABLE_STYLE_ID_TABLE_GRID = "TableGrid", TABLE_FALLBACK_BORDER, TABLE_FALLBACK_BORDERS, TABLE_FALLBACK_CELL_PADDING, DEFAULT_TBL_LOOK, CNF_STYLE_MAP, TABLE_STYLE_PRECEDENCE, getToCssFontFamily = () => {
|
|
112815
112877
|
return SuperConverter.toCssFontFamily;
|
|
112816
112878
|
}, getSpacingStyle = (spacing, isListItem$1) => {
|
|
@@ -114045,7 +114107,7 @@ var isRegExp = (value) => {
|
|
|
114045
114107
|
normalized.push(node3);
|
|
114046
114108
|
});
|
|
114047
114109
|
return normalized;
|
|
114048
|
-
}, lower16 = 65535, factor16, DEL_BEFORE = 1, DEL_AFTER = 2, DEL_ACROSS = 4, DEL_SIDE = 8, MapResult = class {
|
|
114110
|
+
}, BLOCK_FIELD_XML_NAMES, lower16 = 65535, factor16, DEL_BEFORE = 1, DEL_AFTER = 2, DEL_ACROSS = 4, DEL_SIDE = 8, MapResult = class {
|
|
114049
114111
|
constructor(pos, delInfo, recover) {
|
|
114050
114112
|
this.pos = pos;
|
|
114051
114113
|
this.delInfo = delInfo;
|
|
@@ -118583,7 +118645,7 @@ var isRegExp = (value) => {
|
|
|
118583
118645
|
currentField.instructionTokens.push(...instructionTokens);
|
|
118584
118646
|
const instrTextValue = instrTextEl?.elements?.[0]?.text;
|
|
118585
118647
|
if (instrTextValue != null)
|
|
118586
|
-
currentField.instrText += `${instrTextValue}
|
|
118648
|
+
currentField.instrText += `${instrTextValue}`;
|
|
118587
118649
|
if (instructionTokens.some((token) => token.type === "tab"))
|
|
118588
118650
|
currentField.instrText += "\t";
|
|
118589
118651
|
return;
|
|
@@ -124303,66 +124365,19 @@ var isRegExp = (value) => {
|
|
|
124303
124365
|
});
|
|
124304
124366
|
return {
|
|
124305
124367
|
type: SD_NODE_NAME$14,
|
|
124306
|
-
attrs: {
|
|
124368
|
+
attrs: {
|
|
124369
|
+
instruction: node3.attributes?.instruction || "",
|
|
124370
|
+
instructionTokens: node3.attributes?.instructionTokens || null,
|
|
124371
|
+
wrapperParagraphProperties: node3.attributes?.wrapperParagraphProperties || null
|
|
124372
|
+
},
|
|
124307
124373
|
content: processedContent
|
|
124308
124374
|
};
|
|
124309
124375
|
}, decode$18 = (params3) => {
|
|
124310
124376
|
const { node: node3 } = params3;
|
|
124311
|
-
|
|
124377
|
+
return wrapParagraphsAsComplexField((node3.content ?? []).map((n) => exportSchemaToJson({
|
|
124312
124378
|
...params3,
|
|
124313
124379
|
node: n
|
|
124314
|
-
}));
|
|
124315
|
-
const instructionElements = buildInstructionElements(node3.attrs?.instruction, null);
|
|
124316
|
-
const beginElements = [
|
|
124317
|
-
{
|
|
124318
|
-
name: "w:r",
|
|
124319
|
-
elements: [{
|
|
124320
|
-
name: "w:fldChar",
|
|
124321
|
-
attributes: { "w:fldCharType": "begin" },
|
|
124322
|
-
elements: []
|
|
124323
|
-
}]
|
|
124324
|
-
},
|
|
124325
|
-
{
|
|
124326
|
-
name: "w:r",
|
|
124327
|
-
elements: instructionElements
|
|
124328
|
-
},
|
|
124329
|
-
{
|
|
124330
|
-
name: "w:r",
|
|
124331
|
-
elements: [{
|
|
124332
|
-
name: "w:fldChar",
|
|
124333
|
-
attributes: { "w:fldCharType": "separate" },
|
|
124334
|
-
elements: []
|
|
124335
|
-
}]
|
|
124336
|
-
}
|
|
124337
|
-
];
|
|
124338
|
-
if (contentNodes.length > 0) {
|
|
124339
|
-
const firstParagraph = contentNodes[0];
|
|
124340
|
-
let insertIndex = 0;
|
|
124341
|
-
if (firstParagraph.elements) {
|
|
124342
|
-
const pPrIndex = firstParagraph.elements.findIndex((el) => el.name === "w:pPr");
|
|
124343
|
-
insertIndex = pPrIndex >= 0 ? pPrIndex + 1 : 0;
|
|
124344
|
-
} else
|
|
124345
|
-
firstParagraph.elements = [];
|
|
124346
|
-
firstParagraph.elements.splice(insertIndex, 0, ...beginElements);
|
|
124347
|
-
} else
|
|
124348
|
-
contentNodes.push({
|
|
124349
|
-
name: "w:p",
|
|
124350
|
-
elements: beginElements
|
|
124351
|
-
});
|
|
124352
|
-
const endElements = [{
|
|
124353
|
-
name: "w:r",
|
|
124354
|
-
elements: [{
|
|
124355
|
-
name: "w:fldChar",
|
|
124356
|
-
attributes: { "w:fldCharType": "end" },
|
|
124357
|
-
elements: []
|
|
124358
|
-
}]
|
|
124359
|
-
}];
|
|
124360
|
-
const lastParagraph = contentNodes[contentNodes.length - 1];
|
|
124361
|
-
if (lastParagraph.elements)
|
|
124362
|
-
lastParagraph.elements.push(...endElements);
|
|
124363
|
-
else
|
|
124364
|
-
lastParagraph.elements = [...endElements];
|
|
124365
|
-
return contentNodes;
|
|
124380
|
+
})), buildInstructionElements(node3.attrs?.instruction, node3.attrs?.instructionTokens ?? null), node3.attrs?.wrapperParagraphProperties ?? null);
|
|
124366
124381
|
}, config$15, translator$20, XML_NODE_NAME$13 = "sd:authorityEntry", SD_NODE_NAME$13 = "authorityEntry", encode$17 = (params3) => {
|
|
124367
124382
|
const { nodes = [], nodeListHandler } = params3 || {};
|
|
124368
124383
|
const node3 = nodes[0];
|
|
@@ -124445,67 +124460,17 @@ var isRegExp = (value) => {
|
|
|
124445
124460
|
type: SD_NODE_NAME$12,
|
|
124446
124461
|
attrs: {
|
|
124447
124462
|
instruction: node3.attributes?.instruction || "",
|
|
124448
|
-
instructionTokens: node3.attributes?.instructionTokens || null
|
|
124463
|
+
instructionTokens: node3.attributes?.instructionTokens || null,
|
|
124464
|
+
wrapperParagraphProperties: node3.attributes?.wrapperParagraphProperties || null
|
|
124449
124465
|
},
|
|
124450
124466
|
content: processedContent
|
|
124451
124467
|
};
|
|
124452
124468
|
}, decode$16 = (params3) => {
|
|
124453
124469
|
const { node: node3 } = params3;
|
|
124454
|
-
|
|
124470
|
+
return wrapParagraphsAsComplexField((node3.content ?? []).map((n) => exportSchemaToJson({
|
|
124455
124471
|
...params3,
|
|
124456
124472
|
node: n
|
|
124457
|
-
}));
|
|
124458
|
-
const instructionElements = buildInstructionElements(node3.attrs?.instruction, node3.attrs?.instructionTokens);
|
|
124459
|
-
const beginElements = [
|
|
124460
|
-
{
|
|
124461
|
-
name: "w:r",
|
|
124462
|
-
elements: [{
|
|
124463
|
-
name: "w:fldChar",
|
|
124464
|
-
attributes: { "w:fldCharType": "begin" },
|
|
124465
|
-
elements: []
|
|
124466
|
-
}]
|
|
124467
|
-
},
|
|
124468
|
-
{
|
|
124469
|
-
name: "w:r",
|
|
124470
|
-
elements: instructionElements
|
|
124471
|
-
},
|
|
124472
|
-
{
|
|
124473
|
-
name: "w:r",
|
|
124474
|
-
elements: [{
|
|
124475
|
-
name: "w:fldChar",
|
|
124476
|
-
attributes: { "w:fldCharType": "separate" },
|
|
124477
|
-
elements: []
|
|
124478
|
-
}]
|
|
124479
|
-
}
|
|
124480
|
-
];
|
|
124481
|
-
if (contentNodes.length > 0) {
|
|
124482
|
-
const firstParagraph = contentNodes[0];
|
|
124483
|
-
let insertIndex = 0;
|
|
124484
|
-
if (firstParagraph.elements) {
|
|
124485
|
-
const pPrIndex = firstParagraph.elements.findIndex((el) => el.name === "w:pPr");
|
|
124486
|
-
insertIndex = pPrIndex >= 0 ? pPrIndex + 1 : 0;
|
|
124487
|
-
} else
|
|
124488
|
-
firstParagraph.elements = [];
|
|
124489
|
-
firstParagraph.elements.splice(insertIndex, 0, ...beginElements);
|
|
124490
|
-
} else
|
|
124491
|
-
contentNodes.push({
|
|
124492
|
-
name: "w:p",
|
|
124493
|
-
elements: beginElements
|
|
124494
|
-
});
|
|
124495
|
-
const endElements = [{
|
|
124496
|
-
name: "w:r",
|
|
124497
|
-
elements: [{
|
|
124498
|
-
name: "w:fldChar",
|
|
124499
|
-
attributes: { "w:fldCharType": "end" },
|
|
124500
|
-
elements: []
|
|
124501
|
-
}]
|
|
124502
|
-
}];
|
|
124503
|
-
const lastParagraph = contentNodes[contentNodes.length - 1];
|
|
124504
|
-
if (lastParagraph.elements)
|
|
124505
|
-
lastParagraph.elements.push(...endElements);
|
|
124506
|
-
else
|
|
124507
|
-
lastParagraph.elements = [...endElements];
|
|
124508
|
-
return contentNodes;
|
|
124473
|
+
})), buildInstructionElements(node3.attrs?.instruction, node3.attrs?.instructionTokens), node3.attrs?.wrapperParagraphProperties ?? null);
|
|
124509
124474
|
}, config$13, translator$22, XML_NODE_NAME$11 = "sd:sequenceField", SD_NODE_NAME$11 = "sequenceField", encode$15 = (params3) => {
|
|
124510
124475
|
const { nodes = [], nodeListHandler } = params3 || {};
|
|
124511
124476
|
const node3 = nodes[0];
|
|
@@ -124678,67 +124643,17 @@ var isRegExp = (value) => {
|
|
|
124678
124643
|
type: "index",
|
|
124679
124644
|
attrs: {
|
|
124680
124645
|
instruction: node3.attributes?.instruction || "",
|
|
124681
|
-
instructionTokens: node3.attributes?.instructionTokens || null
|
|
124646
|
+
instructionTokens: node3.attributes?.instructionTokens || null,
|
|
124647
|
+
wrapperParagraphProperties: node3.attributes?.wrapperParagraphProperties || null
|
|
124682
124648
|
},
|
|
124683
124649
|
content: processedContent
|
|
124684
124650
|
};
|
|
124685
124651
|
}, decode$13 = (params3) => {
|
|
124686
124652
|
const { node: node3 } = params3;
|
|
124687
|
-
|
|
124653
|
+
return wrapParagraphsAsComplexField((node3.content ?? []).map((n) => exportSchemaToJson({
|
|
124688
124654
|
...params3,
|
|
124689
124655
|
node: n
|
|
124690
|
-
}));
|
|
124691
|
-
const instructionElements = buildInstructionElements(node3.attrs?.instruction, node3.attrs?.instructionTokens);
|
|
124692
|
-
const indexBeginElements = [
|
|
124693
|
-
{
|
|
124694
|
-
name: "w:r",
|
|
124695
|
-
elements: [{
|
|
124696
|
-
name: "w:fldChar",
|
|
124697
|
-
attributes: { "w:fldCharType": "begin" },
|
|
124698
|
-
elements: []
|
|
124699
|
-
}]
|
|
124700
|
-
},
|
|
124701
|
-
{
|
|
124702
|
-
name: "w:r",
|
|
124703
|
-
elements: instructionElements
|
|
124704
|
-
},
|
|
124705
|
-
{
|
|
124706
|
-
name: "w:r",
|
|
124707
|
-
elements: [{
|
|
124708
|
-
name: "w:fldChar",
|
|
124709
|
-
attributes: { "w:fldCharType": "separate" },
|
|
124710
|
-
elements: []
|
|
124711
|
-
}]
|
|
124712
|
-
}
|
|
124713
|
-
];
|
|
124714
|
-
if (contentNodes.length > 0) {
|
|
124715
|
-
const firstParagraph = contentNodes[0];
|
|
124716
|
-
let insertIndex = 0;
|
|
124717
|
-
if (firstParagraph.elements) {
|
|
124718
|
-
const pPrIndex = firstParagraph.elements.findIndex((el) => el.name === "w:pPr");
|
|
124719
|
-
insertIndex = pPrIndex >= 0 ? pPrIndex + 1 : 0;
|
|
124720
|
-
} else
|
|
124721
|
-
firstParagraph.elements = [];
|
|
124722
|
-
firstParagraph.elements.splice(insertIndex, 0, ...indexBeginElements);
|
|
124723
|
-
} else
|
|
124724
|
-
contentNodes.push({
|
|
124725
|
-
name: "w:p",
|
|
124726
|
-
elements: indexBeginElements
|
|
124727
|
-
});
|
|
124728
|
-
const indexEndElements = [{
|
|
124729
|
-
name: "w:r",
|
|
124730
|
-
elements: [{
|
|
124731
|
-
name: "w:fldChar",
|
|
124732
|
-
attributes: { "w:fldCharType": "end" },
|
|
124733
|
-
elements: []
|
|
124734
|
-
}]
|
|
124735
|
-
}];
|
|
124736
|
-
const lastParagraph = contentNodes[contentNodes.length - 1];
|
|
124737
|
-
if (lastParagraph.elements)
|
|
124738
|
-
lastParagraph.elements.push(...indexEndElements);
|
|
124739
|
-
else
|
|
124740
|
-
lastParagraph.elements = [...indexEndElements];
|
|
124741
|
-
return contentNodes;
|
|
124656
|
+
})), buildInstructionElements(node3.attrs?.instruction, node3.attrs?.instructionTokens), node3.attrs?.wrapperParagraphProperties ?? null);
|
|
124742
124657
|
}, config$10, translator$25, XML_NODE_NAME$8 = "sd:indexEntry", SD_NODE_NAME$8 = "indexEntry", encode$12 = (params3) => {
|
|
124743
124658
|
const { nodes = [], nodeListHandler } = params3 || {};
|
|
124744
124659
|
const node3 = nodes[0];
|
|
@@ -125062,13 +124977,47 @@ var isRegExp = (value) => {
|
|
|
125062
124977
|
nodes: [resultNode],
|
|
125063
124978
|
consumed: 1
|
|
125064
124979
|
};
|
|
125065
|
-
}, textNodeHandlerEntity, PARAGRAPH_PROPERTIES_XML_NAME = "w:pPr",
|
|
124980
|
+
}, textNodeHandlerEntity, PARAGRAPH_PROPERTIES_XML_NAME = "w:pPr", hasMeaningfulParagraphContent = (elements = []) => elements.some((element) => element?.name && element.name !== PARAGRAPH_PROPERTIES_XML_NAME), findParagraphProperties = (elements = []) => elements.find((element) => element?.name === PARAGRAPH_PROPERTIES_XML_NAME) ?? null, hasParagraphProperties = (elements = []) => elements.some((element) => element?.name === PARAGRAPH_PROPERTIES_XML_NAME), cloneParagraphPropertiesForRenderedResult = (paragraphProperties) => {
|
|
124981
|
+
const elements = (paragraphProperties.elements || []).filter((element) => element?.name !== "w:sectPr").map((element) => carbonCopy(element));
|
|
124982
|
+
if (elements.length === 0)
|
|
124983
|
+
return null;
|
|
124984
|
+
return {
|
|
124985
|
+
...carbonCopy(paragraphProperties),
|
|
124986
|
+
elements
|
|
124987
|
+
};
|
|
124988
|
+
}, inheritWrapperParagraphProperties = (blockFieldElement, paragraphProperties) => {
|
|
124989
|
+
if (!paragraphProperties)
|
|
124990
|
+
return blockFieldElement;
|
|
124991
|
+
const fieldElements = Array.isArray(blockFieldElement?.elements) ? blockFieldElement.elements : [];
|
|
124992
|
+
const firstParagraphIndex = fieldElements.findIndex((element) => element?.name === "w:p");
|
|
124993
|
+
if (firstParagraphIndex < 0)
|
|
124994
|
+
return blockFieldElement;
|
|
124995
|
+
const firstParagraph = fieldElements[firstParagraphIndex];
|
|
124996
|
+
const firstParagraphElements = Array.isArray(firstParagraph.elements) ? firstParagraph.elements : [];
|
|
124997
|
+
if (hasParagraphProperties(firstParagraphElements))
|
|
124998
|
+
return blockFieldElement;
|
|
124999
|
+
const renderedParagraphProperties = cloneParagraphPropertiesForRenderedResult(paragraphProperties);
|
|
125000
|
+
const inheritedFirstParagraph = {
|
|
125001
|
+
...firstParagraph,
|
|
125002
|
+
elements: renderedParagraphProperties ? [renderedParagraphProperties, ...firstParagraphElements] : firstParagraphElements
|
|
125003
|
+
};
|
|
125004
|
+
return {
|
|
125005
|
+
...blockFieldElement,
|
|
125006
|
+
attributes: {
|
|
125007
|
+
...blockFieldElement.attributes || {},
|
|
125008
|
+
wrapperParagraphProperties: carbonCopy(paragraphProperties)
|
|
125009
|
+
},
|
|
125010
|
+
elements: fieldElements.map((element, index2) => index2 === firstParagraphIndex ? inheritedFirstParagraph : element)
|
|
125011
|
+
};
|
|
125012
|
+
}, hoistBlockFieldNodes = (params3, paragraphNode) => {
|
|
125066
125013
|
const paragraphElements = Array.isArray(paragraphNode?.elements) ? paragraphNode.elements : [];
|
|
125067
125014
|
const blockFieldElements = paragraphElements.filter((element) => BLOCK_FIELD_XML_NAMES.has(element?.name));
|
|
125068
125015
|
if (blockFieldElements.length === 0)
|
|
125069
125016
|
return null;
|
|
125070
125017
|
const nodes = [];
|
|
125071
125018
|
const remainingElements = paragraphElements.filter((element) => !BLOCK_FIELD_XML_NAMES.has(element?.name));
|
|
125019
|
+
const wrapperParagraphProperties = findParagraphProperties(remainingElements);
|
|
125020
|
+
const shouldTransferWrapperProperties = !hasMeaningfulParagraphContent(remainingElements);
|
|
125072
125021
|
if (hasMeaningfulParagraphContent(remainingElements)) {
|
|
125073
125022
|
const paragraph2 = translator.encode({
|
|
125074
125023
|
...params3,
|
|
@@ -125081,9 +125030,10 @@ var isRegExp = (value) => {
|
|
|
125081
125030
|
nodes.push(paragraph2);
|
|
125082
125031
|
}
|
|
125083
125032
|
blockFieldElements.forEach((blockFieldElement) => {
|
|
125033
|
+
const fieldElement = shouldTransferWrapperProperties ? inheritWrapperParagraphProperties(blockFieldElement, wrapperParagraphProperties) : blockFieldElement;
|
|
125084
125034
|
nodes.push(...params3.nodeListHandler.handler({
|
|
125085
125035
|
...params3,
|
|
125086
|
-
nodes: [
|
|
125036
|
+
nodes: [fieldElement],
|
|
125087
125037
|
path: [...params3.path || [], paragraphNode]
|
|
125088
125038
|
}));
|
|
125089
125039
|
});
|
|
@@ -126081,7 +126031,7 @@ var isRegExp = (value) => {
|
|
|
126081
126031
|
nodes: Array.isArray(result) ? result : [result],
|
|
126082
126032
|
consumed: 1
|
|
126083
126033
|
};
|
|
126084
|
-
}, smartTagNodeEntityHandler, footnoteReferenceHandlerEntity, endnoteReferenceHandlerEntity, tableNodeHandlerEntity, tableOfContentsHandlerEntity, indexHandlerEntity, indexEntryHandlerEntity, bibliographyHandlerEntity, commentRangeStartHandlerEntity, commentRangeEndHandlerEntity, permStartHandlerEntity, permEndHandlerEntity, handleMathPara = (params3) => {
|
|
126034
|
+
}, smartTagNodeEntityHandler, footnoteReferenceHandlerEntity, endnoteReferenceHandlerEntity, tableNodeHandlerEntity, tableOfContentsHandlerEntity, indexHandlerEntity, indexEntryHandlerEntity, bibliographyHandlerEntity, tableOfAuthoritiesHandlerEntity, commentRangeStartHandlerEntity, commentRangeEndHandlerEntity, permStartHandlerEntity, permEndHandlerEntity, handleMathPara = (params3) => {
|
|
126085
126035
|
const { nodes } = params3;
|
|
126086
126036
|
if (!nodes.length || nodes[0].name !== "m:oMathPara")
|
|
126087
126037
|
return {
|
|
@@ -126333,6 +126283,7 @@ var isRegExp = (value) => {
|
|
|
126333
126283
|
tableOfContentsHandlerEntity,
|
|
126334
126284
|
indexHandlerEntity,
|
|
126335
126285
|
bibliographyHandlerEntity,
|
|
126286
|
+
tableOfAuthoritiesHandlerEntity,
|
|
126336
126287
|
indexEntryHandlerEntity,
|
|
126337
126288
|
autoPageHandlerEntity,
|
|
126338
126289
|
autoTotalPageCountEntity,
|
|
@@ -129120,29 +129071,7 @@ var isRegExp = (value) => {
|
|
|
129120
129071
|
return null;
|
|
129121
129072
|
const mapped = endnoteNumberById?.[key];
|
|
129122
129073
|
return typeof mapped === "number" && Number.isFinite(mapped) && mapped > 0 ? mapped : null;
|
|
129123
|
-
}, sdtMetadataCache,
|
|
129124
|
-
if (Array.isArray(node3.content))
|
|
129125
|
-
return node3.content;
|
|
129126
|
-
const content$2 = node3.content;
|
|
129127
|
-
if (content$2 && typeof content$2.forEach === "function") {
|
|
129128
|
-
const children = [];
|
|
129129
|
-
content$2.forEach((child) => {
|
|
129130
|
-
children.push(child);
|
|
129131
|
-
});
|
|
129132
|
-
return children;
|
|
129133
|
-
}
|
|
129134
|
-
return [];
|
|
129135
|
-
}, NON_RENDERED_STRUCTURAL_INLINE_TYPES, getChildren$1 = (node3) => {
|
|
129136
|
-
if (Array.isArray(node3.content))
|
|
129137
|
-
return node3.content;
|
|
129138
|
-
const content$2 = node3.content;
|
|
129139
|
-
if (content$2 && typeof content$2.forEach === "function") {
|
|
129140
|
-
const children = [];
|
|
129141
|
-
content$2.forEach((child) => children.push(child));
|
|
129142
|
-
return children;
|
|
129143
|
-
}
|
|
129144
|
-
return [];
|
|
129145
|
-
}, getChildren = (node3) => {
|
|
129074
|
+
}, sdtMetadataCache, getParagraphContainerChildren = (node3) => {
|
|
129146
129075
|
if (Array.isArray(node3.content))
|
|
129147
129076
|
return node3.content;
|
|
129148
129077
|
const content$2 = node3.content;
|
|
@@ -129152,7 +129081,7 @@ var isRegExp = (value) => {
|
|
|
129152
129081
|
return children;
|
|
129153
129082
|
}
|
|
129154
129083
|
return [];
|
|
129155
|
-
}, NON_BREAKING_HYPHEN = "‑", DEFAULT_IMAGE_DIMENSION_PX = 100, isNodeHidden = (node3) => {
|
|
129084
|
+
}, NON_RENDERED_STRUCTURAL_INLINE_TYPES, PARAGRAPH_CONTAINER_TYPES, NON_BREAKING_HYPHEN = "‑", DEFAULT_IMAGE_DIMENSION_PX = 100, isNodeHidden = (node3) => {
|
|
129156
129085
|
const attrs = node3.attrs ?? {};
|
|
129157
129086
|
if (attrs.hidden === true)
|
|
129158
129087
|
return true;
|
|
@@ -130320,7 +130249,7 @@ var isRegExp = (value) => {
|
|
|
130320
130249
|
state.kern = kernNode.attributes["w:val"];
|
|
130321
130250
|
}
|
|
130322
130251
|
}, SuperConverter;
|
|
130323
|
-
var
|
|
130252
|
+
var init_SuperConverter_nmIRMGtB_es = __esm(() => {
|
|
130324
130253
|
init_rolldown_runtime_Bg48TavK_es();
|
|
130325
130254
|
init_jszip_C49i9kUs_es();
|
|
130326
130255
|
init_xml_js_CqGKpaft_es();
|
|
@@ -146709,8 +146638,8 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
146709
146638
|
...params3.node,
|
|
146710
146639
|
attrs: change
|
|
146711
146640
|
} });
|
|
146712
|
-
const hasParagraphProperties = Object.prototype.hasOwnProperty.call(change, "paragraphProperties");
|
|
146713
|
-
const paragraphProperties = hasParagraphProperties ? change.paragraphProperties : undefined;
|
|
146641
|
+
const hasParagraphProperties$1 = Object.prototype.hasOwnProperty.call(change, "paragraphProperties");
|
|
146642
|
+
const paragraphProperties = hasParagraphProperties$1 ? change.paragraphProperties : undefined;
|
|
146714
146643
|
let pPrNode = paragraphProperties && typeof paragraphProperties === "object" ? pPrTranslator.decode({
|
|
146715
146644
|
...params3,
|
|
146716
146645
|
node: {
|
|
@@ -146729,7 +146658,7 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
146729
146658
|
};
|
|
146730
146659
|
pPrNode.elements = [...pPrNode.elements || [], sectPr];
|
|
146731
146660
|
}
|
|
146732
|
-
if (!pPrNode && hasParagraphProperties)
|
|
146661
|
+
if (!pPrNode && hasParagraphProperties$1)
|
|
146733
146662
|
pPrNode = {
|
|
146734
146663
|
name: "w:pPr",
|
|
146735
146664
|
type: "element",
|
|
@@ -147076,6 +147005,12 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
147076
147005
|
"permStart",
|
|
147077
147006
|
"permEnd"
|
|
147078
147007
|
]);
|
|
147008
|
+
BLOCK_FIELD_XML_NAMES = new Set([
|
|
147009
|
+
"sd:tableOfContents",
|
|
147010
|
+
"sd:index",
|
|
147011
|
+
"sd:bibliography",
|
|
147012
|
+
"sd:tableOfAuthorities"
|
|
147013
|
+
]);
|
|
147079
147014
|
factor16 = Math.pow(2, 16);
|
|
147080
147015
|
StepMap.empty = new StepMap([]);
|
|
147081
147016
|
stepsByID = Object.create(null);
|
|
@@ -166572,12 +166507,6 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
166572
166507
|
handlerName: "textNodeHandler",
|
|
166573
166508
|
handler: handleTextNode
|
|
166574
166509
|
};
|
|
166575
|
-
BLOCK_FIELD_XML_NAMES = new Set([
|
|
166576
|
-
"sd:tableOfContents",
|
|
166577
|
-
"sd:index",
|
|
166578
|
-
"sd:bibliography",
|
|
166579
|
-
"sd:tableOfAuthorities"
|
|
166580
|
-
]);
|
|
166581
166510
|
paragraphNodeHandlerEntity = {
|
|
166582
166511
|
handlerName: "paragraphNodeHandler",
|
|
166583
166512
|
handler: handleParagraphNode$1
|
|
@@ -167215,6 +167144,7 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
167215
167144
|
indexHandlerEntity = generateV2HandlerEntity("indexHandler", translator$25);
|
|
167216
167145
|
indexEntryHandlerEntity = generateV2HandlerEntity("indexEntryHandler", translator$26);
|
|
167217
167146
|
bibliographyHandlerEntity = generateV2HandlerEntity("bibliographyHandler", translator$20);
|
|
167147
|
+
tableOfAuthoritiesHandlerEntity = generateV2HandlerEntity("tableOfAuthoritiesHandler", translator$22);
|
|
167218
167148
|
commentRangeStartHandlerEntity = generateV2HandlerEntity("commentRangeStartHandler", commentRangeStartTranslator);
|
|
167219
167149
|
commentRangeEndHandlerEntity = generateV2HandlerEntity("commentRangeEndHandler", commentRangeEndTranslator);
|
|
167220
167150
|
permStartHandlerEntity = generateV2HandlerEntity("permStartHandler", translator$15);
|
|
@@ -167514,6 +167444,11 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
167514
167444
|
"permStart",
|
|
167515
167445
|
"permEnd"
|
|
167516
167446
|
]);
|
|
167447
|
+
PARAGRAPH_CONTAINER_TYPES = new Set([
|
|
167448
|
+
"bibliography",
|
|
167449
|
+
"index",
|
|
167450
|
+
"tableOfAuthorities"
|
|
167451
|
+
]);
|
|
167517
167452
|
VERTICAL_ELEMENTS = {
|
|
167518
167453
|
"m:f": 0.6,
|
|
167519
167454
|
"m:bar": 0.25,
|
|
@@ -167686,13 +167621,13 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
167686
167621
|
nodeHandlers = {
|
|
167687
167622
|
paragraph: handleParagraphNode,
|
|
167688
167623
|
tableOfContents: handleTableOfContentsNode,
|
|
167689
|
-
index:
|
|
167624
|
+
index: handleParagraphContainerNode,
|
|
167690
167625
|
structuredContentBlock: handleStructuredContentBlockNode,
|
|
167691
167626
|
documentSection: handleDocumentSectionNode,
|
|
167692
167627
|
table: handleTableNode,
|
|
167693
167628
|
documentPartObject: handleDocumentPartObjectNode,
|
|
167694
|
-
bibliography:
|
|
167695
|
-
tableOfAuthorities:
|
|
167629
|
+
bibliography: handleParagraphContainerNode,
|
|
167630
|
+
tableOfAuthorities: handleParagraphContainerNode,
|
|
167696
167631
|
image: handleImageNode,
|
|
167697
167632
|
vectorShape: handleVectorShapeNode,
|
|
167698
167633
|
shapeGroup: handleShapeGroupNode,
|
|
@@ -169003,7 +168938,7 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
169003
168938
|
};
|
|
169004
168939
|
});
|
|
169005
168940
|
|
|
169006
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
168941
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-7bitVHMJ.es.js
|
|
169007
168942
|
function parseSizeUnit(val = "0") {
|
|
169008
168943
|
const length3 = val.toString() || "0";
|
|
169009
168944
|
const value = Number.parseFloat(length3);
|
|
@@ -179334,8 +179269,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
179334
179269
|
}
|
|
179335
179270
|
};
|
|
179336
179271
|
};
|
|
179337
|
-
var
|
|
179338
|
-
|
|
179272
|
+
var init_create_headless_toolbar_7bitVHMJ_es = __esm(() => {
|
|
179273
|
+
init_SuperConverter_nmIRMGtB_es();
|
|
179339
179274
|
init_uuid_qzgm05fK_es();
|
|
179340
179275
|
init_constants_D_X7xF4s_es();
|
|
179341
179276
|
init_dist_B8HfvhaK_es();
|
|
@@ -228498,7 +228433,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
228498
228433
|
init_remark_gfm_BhnWr3yf_es();
|
|
228499
228434
|
});
|
|
228500
228435
|
|
|
228501
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
228436
|
+
// ../../packages/superdoc/dist/chunks/src-BrZa8lMN.es.js
|
|
228502
228437
|
function deleteProps(obj, propOrProps) {
|
|
228503
228438
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
228504
228439
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -236140,7 +236075,7 @@ function setContent(content3, props) {
|
|
|
236140
236075
|
else
|
|
236141
236076
|
content3.textContent = props.content;
|
|
236142
236077
|
}
|
|
236143
|
-
function
|
|
236078
|
+
function getChildren(popper$1) {
|
|
236144
236079
|
var box = popper$1.firstElementChild;
|
|
236145
236080
|
var boxChildren = arrayFrom(box.children);
|
|
236146
236081
|
return {
|
|
@@ -236170,7 +236105,7 @@ function render(instance) {
|
|
|
236170
236105
|
box.appendChild(content3);
|
|
236171
236106
|
onUpdate(instance.props, instance.props);
|
|
236172
236107
|
function onUpdate(prevProps, nextProps) {
|
|
236173
|
-
var _getChildren =
|
|
236108
|
+
var _getChildren = getChildren(popper$1), box$1 = _getChildren.box, content$13 = _getChildren.content, arrow$2 = _getChildren.arrow;
|
|
236174
236109
|
if (nextProps.theme)
|
|
236175
236110
|
box$1.setAttribute("data-theme", nextProps.theme);
|
|
236176
236111
|
else
|
|
@@ -236297,7 +236232,7 @@ function createTippy(reference$1, passedProps) {
|
|
|
236297
236232
|
return parent ? getOwnerDocument(parent) : document;
|
|
236298
236233
|
}
|
|
236299
236234
|
function getDefaultTemplateChildren() {
|
|
236300
|
-
return
|
|
236235
|
+
return getChildren(popper$1);
|
|
236301
236236
|
}
|
|
236302
236237
|
function getDelay(isShow) {
|
|
236303
236238
|
if (instance.state.isMounted && !instance.state.isVisible || currentInput.isTouch || lastTriggerEvent && lastTriggerEvent.type === "focus")
|
|
@@ -236534,7 +236469,7 @@ function createTippy(reference$1, passedProps) {
|
|
|
236534
236469
|
function createPopperInstance() {
|
|
236535
236470
|
destroyPopperInstance();
|
|
236536
236471
|
var _instance$props2 = instance.props, popperOptions = _instance$props2.popperOptions, placement2 = _instance$props2.placement, offset$1 = _instance$props2.offset, getReferenceClientRect = _instance$props2.getReferenceClientRect, moveTransition = _instance$props2.moveTransition;
|
|
236537
|
-
var arrow$2 = getIsDefaultRenderFn() ?
|
|
236472
|
+
var arrow$2 = getIsDefaultRenderFn() ? getChildren(popper$1).arrow : null;
|
|
236538
236473
|
var computedReference = getReferenceClientRect ? {
|
|
236539
236474
|
getBoundingClientRect: getReferenceClientRect,
|
|
236540
236475
|
contextElement: getReferenceClientRect.contextElement || getCurrentTarget()
|
|
@@ -276263,7 +276198,7 @@ function selectionToRects(layout, blocks2, measures, from$1, to, geometryHelper)
|
|
|
276263
276198
|
return;
|
|
276264
276199
|
const block = blocks2[blockIndex];
|
|
276265
276200
|
const pmRange = getAtomicPmRange(fragment2, block);
|
|
276266
|
-
if (!
|
|
276201
|
+
if (!rangesOverlap2(pmRange.pmStart, pmRange.pmEnd, from$1, to))
|
|
276267
276202
|
return;
|
|
276268
276203
|
rects.push({
|
|
276269
276204
|
x: fragment2.x,
|
|
@@ -277822,7 +277757,7 @@ function createLayoutMetrics(perf, startMark, layout, blocks2) {
|
|
|
277822
277757
|
pageCount: layout.pages?.length ?? 0
|
|
277823
277758
|
};
|
|
277824
277759
|
}
|
|
277825
|
-
function buildFootnotesInput(editorState, converter, converterContext, themeColors, renderOverride = null) {
|
|
277760
|
+
function buildFootnotesInput(editorState, converter, converterContext, themeColors, renderOverride = null, resolveTrackedChangeColor) {
|
|
277826
277761
|
if (!editorState)
|
|
277827
277762
|
return null;
|
|
277828
277763
|
const footnoteNumberById = converterContext?.footnoteNumberById;
|
|
@@ -277862,7 +277797,8 @@ function buildFootnotesInput(editorState, converter, converterContext, themeColo
|
|
|
277862
277797
|
}),
|
|
277863
277798
|
enableRichHyperlinks: true,
|
|
277864
277799
|
themeColors,
|
|
277865
|
-
converterContext
|
|
277800
|
+
converterContext,
|
|
277801
|
+
resolveTrackedChangeColor
|
|
277866
277802
|
});
|
|
277867
277803
|
if (result?.blocks?.length) {
|
|
277868
277804
|
ensureFootnoteMarker(result.blocks, id2, footnoteNumberById);
|
|
@@ -283907,7 +283843,7 @@ function getHostEditor(editor) {
|
|
|
283907
283843
|
function resolveSessionHostEditor(editor, runtime) {
|
|
283908
283844
|
return getHostEditor(editor) ?? getHostEditor(runtime.editor) ?? runtime.editor;
|
|
283909
283845
|
}
|
|
283910
|
-
function buildEndnoteBlocks(editorState, converter, converterContext, themeColors, renderOverride = null) {
|
|
283846
|
+
function buildEndnoteBlocks(editorState, converter, converterContext, themeColors, renderOverride = null, resolveTrackedChangeColor) {
|
|
283911
283847
|
if (!editorState)
|
|
283912
283848
|
return [];
|
|
283913
283849
|
const endnoteNumberById = converterContext?.endnoteNumberById;
|
|
@@ -283945,7 +283881,8 @@ function buildEndnoteBlocks(editorState, converter, converterContext, themeColor
|
|
|
283945
283881
|
}),
|
|
283946
283882
|
enableRichHyperlinks: true,
|
|
283947
283883
|
themeColors,
|
|
283948
|
-
converterContext
|
|
283884
|
+
converterContext,
|
|
283885
|
+
resolveTrackedChangeColor
|
|
283949
283886
|
});
|
|
283950
283887
|
if (result?.blocks?.length) {
|
|
283951
283888
|
ensureEndnoteMarker(result.blocks, id2, endnoteNumberById);
|
|
@@ -303794,30 +303731,56 @@ var Node$13 = class Node$14 {
|
|
|
303794
303731
|
/* Global content-control chrome opt-out: preserve SDT wrappers/datasets while
|
|
303795
303732
|
* suppressing built-in visual chrome on structured-content controls. Their
|
|
303796
303733
|
* label elements are not emitted by renderer/helpers when this class is
|
|
303797
|
-
* present (DOM non-emission)
|
|
303798
|
-
*
|
|
303799
|
-
*
|
|
303800
|
-
|
|
303734
|
+
* present (DOM non-emission). documentSection chrome (e.g. the locked-section
|
|
303735
|
+
* tooltip) is intentionally preserved and not in scope.
|
|
303736
|
+
*
|
|
303737
|
+
* Custom styling surface (SD-3322): instead of fully erasing the look, these
|
|
303738
|
+
* rules read --sd-content-controls-custom-* variables whose defaults reproduce
|
|
303739
|
+
* the empty look (0-width transparent border, no background, no radius/padding).
|
|
303740
|
+
* So chrome:'none' stays visually empty by default, but a consumer can paint
|
|
303741
|
+
* their own field/clause look by setting those variables on the painted wrapper
|
|
303742
|
+
* (target it via data-sdt-* attributes) - no !important, and no need to fight
|
|
303743
|
+
* the .ProseMirror-selectednode / .sdt-group-hover state classes, because the
|
|
303744
|
+
* painter reads the variables across rest, hover, and selected. The border is a
|
|
303745
|
+
* full shorthand (e.g. "1px solid #1355ff"); its default "0 solid transparent"
|
|
303746
|
+
* is identical in layout to no border. It's re-asserted in every state so the
|
|
303747
|
+
* box never shifts (no jitter); only the background changes on hover/selected.
|
|
303748
|
+
* Block controls add a -border-left override for an accent rail. */
|
|
303749
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline {
|
|
303750
|
+
padding: var(--sd-content-controls-custom-inline-padding, 0);
|
|
303751
|
+
border: var(--sd-content-controls-custom-inline-border, 0 solid transparent);
|
|
303752
|
+
border-radius: var(--sd-content-controls-custom-inline-radius, 0);
|
|
303753
|
+
background: var(--sd-content-controls-custom-inline-bg, none);
|
|
303754
|
+
}
|
|
303801
303755
|
.superdoc-cc-chrome-none .superdoc-structured-content-block {
|
|
303802
|
-
|
|
303803
|
-
|
|
303804
|
-
border-
|
|
303805
|
-
|
|
303756
|
+
padding: var(--sd-content-controls-custom-block-padding, 0);
|
|
303757
|
+
border: var(--sd-content-controls-custom-block-border, 0 solid transparent);
|
|
303758
|
+
border-left: var(--sd-content-controls-custom-block-border-left, var(--sd-content-controls-custom-block-border, 0 solid transparent));
|
|
303759
|
+
border-radius: var(--sd-content-controls-custom-block-radius, 0);
|
|
303760
|
+
background: var(--sd-content-controls-custom-block-bg, none);
|
|
303806
303761
|
}
|
|
303807
303762
|
|
|
303808
303763
|
.superdoc-cc-chrome-none .superdoc-structured-content-inline:hover,
|
|
303764
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline[data-lock-mode]:hover {
|
|
303765
|
+
border: var(--sd-content-controls-custom-inline-border, 0 solid transparent);
|
|
303766
|
+
background: var(--sd-content-controls-custom-inline-hover-bg, var(--sd-content-controls-custom-inline-bg, none));
|
|
303767
|
+
}
|
|
303809
303768
|
.superdoc-cc-chrome-none .superdoc-structured-content-block:hover,
|
|
303810
303769
|
.superdoc-cc-chrome-none .superdoc-structured-content-block.sdt-group-hover,
|
|
303811
|
-
.superdoc-cc-chrome-none .superdoc-structured-content-block[data-lock-mode].sdt-group-hover
|
|
303812
|
-
|
|
303813
|
-
border:
|
|
303814
|
-
background: none;
|
|
303770
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block[data-lock-mode].sdt-group-hover {
|
|
303771
|
+
border: var(--sd-content-controls-custom-block-border, 0 solid transparent);
|
|
303772
|
+
border-left: var(--sd-content-controls-custom-block-border-left, var(--sd-content-controls-custom-block-border, 0 solid transparent));
|
|
303773
|
+
background: var(--sd-content-controls-custom-block-hover-bg, var(--sd-content-controls-custom-block-bg, none));
|
|
303815
303774
|
}
|
|
303816
303775
|
|
|
303817
|
-
.superdoc-cc-chrome-none .superdoc-structured-content-inline.ProseMirror-selectednode
|
|
303776
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline.ProseMirror-selectednode {
|
|
303777
|
+
border: var(--sd-content-controls-custom-inline-border, 0 solid transparent);
|
|
303778
|
+
background: var(--sd-content-controls-custom-inline-selected-bg, var(--sd-content-controls-custom-inline-hover-bg, var(--sd-content-controls-custom-inline-bg, none)));
|
|
303779
|
+
}
|
|
303818
303780
|
.superdoc-cc-chrome-none .superdoc-structured-content-block.ProseMirror-selectednode {
|
|
303819
|
-
border
|
|
303820
|
-
|
|
303781
|
+
border: var(--sd-content-controls-custom-block-border, 0 solid transparent);
|
|
303782
|
+
border-left: var(--sd-content-controls-custom-block-border-left, var(--sd-content-controls-custom-block-border, 0 solid transparent));
|
|
303783
|
+
background: var(--sd-content-controls-custom-block-selected-bg, var(--sd-content-controls-custom-block-hover-bg, var(--sd-content-controls-custom-block-bg, none)));
|
|
303821
303784
|
}
|
|
303822
303785
|
|
|
303823
303786
|
/* Hover highlight for SDT containers.
|
|
@@ -303866,11 +303829,20 @@ var Node$13 = class Node$14 {
|
|
|
303866
303829
|
border: none;
|
|
303867
303830
|
}
|
|
303868
303831
|
|
|
303869
|
-
/*
|
|
303870
|
-
*
|
|
303871
|
-
*
|
|
303872
|
-
|
|
303832
|
+
/* Chrome opt-out for the lock-hover affordance. The base lock-hover rules above
|
|
303833
|
+
* paint a built-in tint and boost z-index on hovered locked controls; under
|
|
303834
|
+
* chrome:'none' that would override the custom hover background and stack above
|
|
303835
|
+
* host-attached UI. Re-assert the custom hover background (so a locked control
|
|
303836
|
+
* follows --sd-content-controls-custom-*-hover-bg, defaulting to empty - no tint
|
|
303837
|
+
* leaks) and reset the z-index. Mirrors the base lock-hover selectors with the
|
|
303838
|
+
* chrome-none prefix, so the extra class wins over the base rules. Split inline
|
|
303839
|
+
* vs block because each reads its own hover variable. */
|
|
303873
303840
|
.superdoc-cc-chrome-none .superdoc-structured-content-inline[data-lock-mode]:hover:not(.ProseMirror-selectednode, [data-appearance='hidden']) {
|
|
303841
|
+
background: var(--sd-content-controls-custom-inline-hover-bg, var(--sd-content-controls-custom-inline-bg, none));
|
|
303842
|
+
z-index: auto;
|
|
303843
|
+
}
|
|
303844
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block[data-lock-mode].sdt-group-hover:not(.ProseMirror-selectednode) {
|
|
303845
|
+
background: var(--sd-content-controls-custom-block-hover-bg, var(--sd-content-controls-custom-block-bg, none));
|
|
303874
303846
|
z-index: auto;
|
|
303875
303847
|
}
|
|
303876
303848
|
|
|
@@ -308491,7 +308463,47 @@ menclose::after {
|
|
|
308491
308463
|
});
|
|
308492
308464
|
return createErrorPlaceholder(fragment2.blockId, error3);
|
|
308493
308465
|
}
|
|
308494
|
-
}, TRACK_CHANGE_BASE_CLASS, TRACK_CHANGE_OVERLAP_INSERT_DELETE_CLASS = "track-overlap-insert-delete-dec",
|
|
308466
|
+
}, TRACK_CHANGE_BASE_CLASS, TRACK_CHANGE_OVERLAP_INSERT_DELETE_CLASS = "track-overlap-insert-delete-dec", TRACK_CHANGE_BACKGROUND_ALPHA = 34, TRACK_CHANGE_BACKGROUND_FOCUSED_ALPHA = 68, expandHexColor = (hex) => {
|
|
308467
|
+
const normalized = hex.replace("#", "");
|
|
308468
|
+
if (normalized.length === 3)
|
|
308469
|
+
return normalized.split("").map((char) => char + char).join("");
|
|
308470
|
+
if (normalized.length === 6 || normalized.length === 8)
|
|
308471
|
+
return normalized.slice(0, 6);
|
|
308472
|
+
return null;
|
|
308473
|
+
}, colorWithAlpha = (color2, alpha) => {
|
|
308474
|
+
const expanded = color2.trim().startsWith("#") ? expandHexColor(color2.trim()) : null;
|
|
308475
|
+
if (!expanded)
|
|
308476
|
+
return color2;
|
|
308477
|
+
return `#${expanded}${Math.max(0, Math.min(255, alpha)).toString(16).padStart(2, "0")}`;
|
|
308478
|
+
}, setColorVar = (elem, name, value) => {
|
|
308479
|
+
elem.style.setProperty(name, value);
|
|
308480
|
+
}, applyAuthorColorVariables = (elem, layer) => {
|
|
308481
|
+
const color2 = layer.color;
|
|
308482
|
+
if (!color2)
|
|
308483
|
+
return;
|
|
308484
|
+
const background = colorWithAlpha(color2, TRACK_CHANGE_BACKGROUND_ALPHA);
|
|
308485
|
+
const backgroundFocused = colorWithAlpha(color2, TRACK_CHANGE_BACKGROUND_FOCUSED_ALPHA);
|
|
308486
|
+
switch (layer.kind) {
|
|
308487
|
+
case "insert":
|
|
308488
|
+
setColorVar(elem, "--sd-tracked-changes-insert-border", color2);
|
|
308489
|
+
setColorVar(elem, "--sd-tracked-changes-insert-background", background);
|
|
308490
|
+
setColorVar(elem, "--sd-tracked-changes-insert-background-focused", backgroundFocused);
|
|
308491
|
+
break;
|
|
308492
|
+
case "delete":
|
|
308493
|
+
setColorVar(elem, "--sd-tracked-changes-delete-border", color2);
|
|
308494
|
+
setColorVar(elem, "--sd-tracked-changes-delete-background", background);
|
|
308495
|
+
setColorVar(elem, "--sd-tracked-changes-delete-background-focused", backgroundFocused);
|
|
308496
|
+
setColorVar(elem, "--sd-tracked-changes-delete-text", color2);
|
|
308497
|
+
break;
|
|
308498
|
+
case "format":
|
|
308499
|
+
setColorVar(elem, "--sd-tracked-changes-format-border", color2);
|
|
308500
|
+
setColorVar(elem, "--sd-tracked-changes-format-background", background);
|
|
308501
|
+
setColorVar(elem, "--sd-tracked-changes-format-background-focused", backgroundFocused);
|
|
308502
|
+
break;
|
|
308503
|
+
default:
|
|
308504
|
+
break;
|
|
308505
|
+
}
|
|
308506
|
+
}, TRACK_CHANGE_MODIFIER_CLASS, getTrackedChangeLayers$1 = (run2) => {
|
|
308495
308507
|
if (Array.isArray(run2.trackedChanges) && run2.trackedChanges.length > 0)
|
|
308496
308508
|
return run2.trackedChanges;
|
|
308497
308509
|
return run2.trackedChange ? [run2.trackedChange] : [];
|
|
@@ -308528,6 +308540,7 @@ menclose::after {
|
|
|
308528
308540
|
const modifier = TRACK_CHANGE_MODIFIER_CLASS[layer.kind]?.[config2.mode];
|
|
308529
308541
|
if (modifier)
|
|
308530
308542
|
elem.classList.add(modifier);
|
|
308543
|
+
applyAuthorColorVariables(elem, layer);
|
|
308531
308544
|
});
|
|
308532
308545
|
if (overlap) {
|
|
308533
308546
|
elem.classList.add(TRACK_CHANGE_OVERLAP_INSERT_DELETE_CLASS);
|
|
@@ -314086,7 +314099,7 @@ menclose::after {
|
|
|
314086
314099
|
};
|
|
314087
314100
|
}
|
|
314088
314101
|
return null;
|
|
314089
|
-
}, logSelectionMapDebug = (payload) => {},
|
|
314102
|
+
}, logSelectionMapDebug = (payload) => {}, rangesOverlap2 = (startA, endA, startB, endB) => {
|
|
314090
314103
|
if (startA == null)
|
|
314091
314104
|
return false;
|
|
314092
314105
|
return (endA ?? startA + 1) > startB && startA < endB;
|
|
@@ -319514,13 +319527,13 @@ menclose::after {
|
|
|
319514
319527
|
return;
|
|
319515
319528
|
console.log(...args$1);
|
|
319516
319529
|
}, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions, TRACKED_MARK_NAMES;
|
|
319517
|
-
var
|
|
319530
|
+
var init_src_BrZa8lMN_es = __esm(() => {
|
|
319518
319531
|
init_rolldown_runtime_Bg48TavK_es();
|
|
319519
|
-
|
|
319532
|
+
init_SuperConverter_nmIRMGtB_es();
|
|
319520
319533
|
init_jszip_C49i9kUs_es();
|
|
319521
319534
|
init_xml_js_CqGKpaft_es();
|
|
319522
319535
|
init_uuid_qzgm05fK_es();
|
|
319523
|
-
|
|
319536
|
+
init_create_headless_toolbar_7bitVHMJ_es();
|
|
319524
319537
|
init_constants_D_X7xF4s_es();
|
|
319525
319538
|
init_dist_B8HfvhaK_es();
|
|
319526
319539
|
init_unified_Dsuw2be5_es();
|
|
@@ -326948,6 +326961,10 @@ ${err.toString()}`);
|
|
|
326948
326961
|
renderDOM: (attrs) => {
|
|
326949
326962
|
return attrs.sdBlockId ? { "data-sd-block-id": attrs.sdBlockId } : {};
|
|
326950
326963
|
}
|
|
326964
|
+
},
|
|
326965
|
+
wrapperParagraphProperties: {
|
|
326966
|
+
default: null,
|
|
326967
|
+
rendered: false
|
|
326951
326968
|
}
|
|
326952
326969
|
};
|
|
326953
326970
|
}
|
|
@@ -330345,10 +330362,18 @@ ${err.toString()}`);
|
|
|
330345
330362
|
default: "",
|
|
330346
330363
|
rendered: false
|
|
330347
330364
|
},
|
|
330365
|
+
instructionTokens: {
|
|
330366
|
+
default: null,
|
|
330367
|
+
rendered: false
|
|
330368
|
+
},
|
|
330348
330369
|
sdBlockId: {
|
|
330349
330370
|
default: null,
|
|
330350
330371
|
rendered: false
|
|
330351
330372
|
},
|
|
330373
|
+
wrapperParagraphProperties: {
|
|
330374
|
+
default: null,
|
|
330375
|
+
rendered: false
|
|
330376
|
+
},
|
|
330352
330377
|
style: {
|
|
330353
330378
|
default: null,
|
|
330354
330379
|
rendered: false
|
|
@@ -330449,6 +330474,10 @@ ${err.toString()}`);
|
|
|
330449
330474
|
sdBlockId: {
|
|
330450
330475
|
default: null,
|
|
330451
330476
|
rendered: false
|
|
330477
|
+
},
|
|
330478
|
+
wrapperParagraphProperties: {
|
|
330479
|
+
default: null,
|
|
330480
|
+
rendered: false
|
|
330452
330481
|
}
|
|
330453
330482
|
};
|
|
330454
330483
|
},
|
|
@@ -347466,6 +347495,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
347466
347495
|
flowMode: requestedFlowMode,
|
|
347467
347496
|
semanticOptions: options.layoutEngineOptions?.semanticOptions,
|
|
347468
347497
|
trackedChanges: options.layoutEngineOptions?.trackedChanges,
|
|
347498
|
+
resolveTrackedChangeColor: options.layoutEngineOptions?.resolveTrackedChangeColor,
|
|
347469
347499
|
emitCommentPositionsInViewing: options.layoutEngineOptions?.emitCommentPositionsInViewing,
|
|
347470
347500
|
enableCommentsInViewing: options.layoutEngineOptions?.enableCommentsInViewing,
|
|
347471
347501
|
presence: validatedPresence,
|
|
@@ -350836,6 +350866,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
350836
350866
|
sectionMetadata,
|
|
350837
350867
|
trackedChangesMode: this.#trackedChangesMode,
|
|
350838
350868
|
enableTrackedChanges: this.#trackedChangesEnabled,
|
|
350869
|
+
resolveTrackedChangeColor: this.#layoutOptions.resolveTrackedChangeColor,
|
|
350839
350870
|
enableComments: commentsEnabled,
|
|
350840
350871
|
enableRichHyperlinks: true,
|
|
350841
350872
|
themeColors: this.#editor?.converter?.themeColors ?? undefined,
|
|
@@ -350867,10 +350898,10 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
350867
350898
|
const isSemanticFlow = this.#isSemanticFlowMode();
|
|
350868
350899
|
const baseLayoutOptions = this.#resolveLayoutOptions(blocks2, sectionMetadata);
|
|
350869
350900
|
const activeFootnoteOverride = this.#buildActiveNoteRenderOverride("footnote");
|
|
350870
|
-
const footnotesLayoutInput = buildFootnotesInput(this.#editor?.state, this.#editor?.converter, converterContext, this.#editor?.converter?.themeColors ?? undefined, activeFootnoteOverride);
|
|
350901
|
+
const footnotesLayoutInput = buildFootnotesInput(this.#editor?.state, this.#editor?.converter, converterContext, this.#editor?.converter?.themeColors ?? undefined, activeFootnoteOverride, this.#layoutOptions.resolveTrackedChangeColor);
|
|
350871
350902
|
const semanticFootnoteBlocks = isSemanticFlow ? buildSemanticFootnoteBlocks(footnotesLayoutInput, this.#layoutOptions.semanticOptions?.footnotesMode) : [];
|
|
350872
350903
|
const activeEndnoteOverride = this.#buildActiveNoteRenderOverride("endnote");
|
|
350873
|
-
const endnoteBlocks = buildEndnoteBlocks(this.#editor?.state, this.#editor?.converter, converterContext, this.#editor?.converter?.themeColors ?? undefined, activeEndnoteOverride);
|
|
350904
|
+
const endnoteBlocks = buildEndnoteBlocks(this.#editor?.state, this.#editor?.converter, converterContext, this.#editor?.converter?.themeColors ?? undefined, activeEndnoteOverride, this.#layoutOptions.resolveTrackedChangeColor);
|
|
350874
350905
|
const blocksForLayout = semanticFootnoteBlocks.length > 0 || endnoteBlocks.length > 0 ? [
|
|
350875
350906
|
...blocks2,
|
|
350876
350907
|
...semanticFootnoteBlocks,
|
|
@@ -353668,11 +353699,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
353668
353699
|
]);
|
|
353669
353700
|
});
|
|
353670
353701
|
|
|
353671
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
353702
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-DZGOzt3u.es.js
|
|
353672
353703
|
var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
353673
|
-
var
|
|
353674
|
-
|
|
353675
|
-
|
|
353704
|
+
var init_create_super_doc_ui_DZGOzt3u_es = __esm(() => {
|
|
353705
|
+
init_SuperConverter_nmIRMGtB_es();
|
|
353706
|
+
init_create_headless_toolbar_7bitVHMJ_es();
|
|
353676
353707
|
MOD_ALIASES = new Set([
|
|
353677
353708
|
"Mod",
|
|
353678
353709
|
"Meta",
|
|
@@ -353714,16 +353745,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
353714
353745
|
|
|
353715
353746
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
353716
353747
|
var init_super_editor_es = __esm(() => {
|
|
353717
|
-
|
|
353718
|
-
|
|
353748
|
+
init_src_BrZa8lMN_es();
|
|
353749
|
+
init_SuperConverter_nmIRMGtB_es();
|
|
353719
353750
|
init_jszip_C49i9kUs_es();
|
|
353720
353751
|
init_xml_js_CqGKpaft_es();
|
|
353721
|
-
|
|
353752
|
+
init_create_headless_toolbar_7bitVHMJ_es();
|
|
353722
353753
|
init_constants_D_X7xF4s_es();
|
|
353723
353754
|
init_dist_B8HfvhaK_es();
|
|
353724
353755
|
init_unified_Dsuw2be5_es();
|
|
353725
353756
|
init_DocxZipper_nv_KfOqb_es();
|
|
353726
|
-
|
|
353757
|
+
init_create_super_doc_ui_DZGOzt3u_es();
|
|
353727
353758
|
init_ui_C5PAS9hY_es();
|
|
353728
353759
|
init_eventemitter3_BnGqBE_Q_es();
|
|
353729
353760
|
init_errors_CNaD6vcg_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.16.0-next.
|
|
3
|
+
"version": "0.16.0-next.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
|
-
"
|
|
29
|
-
"superdoc": "
|
|
28
|
+
"superdoc": "1.38.0",
|
|
29
|
+
"@superdoc/super-editor": "0.0.1"
|
|
30
30
|
},
|
|
31
31
|
"module": "src/index.ts",
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@superdoc-dev/cli-darwin-arm64": "0.16.0-next.
|
|
37
|
-
"@superdoc-dev/cli-
|
|
38
|
-
"@superdoc-dev/cli-
|
|
39
|
-
"@superdoc-dev/cli-linux-arm64": "0.16.0-next.
|
|
40
|
-
"@superdoc-dev/cli-windows-x64": "0.16.0-next.
|
|
36
|
+
"@superdoc-dev/cli-darwin-arm64": "0.16.0-next.4",
|
|
37
|
+
"@superdoc-dev/cli-linux-x64": "0.16.0-next.4",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.16.0-next.4",
|
|
39
|
+
"@superdoc-dev/cli-linux-arm64": "0.16.0-next.4",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.16.0-next.4"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"predev": "node scripts/ensure-superdoc-build.js",
|