@superdoc-dev/cli 0.16.0-next.2 → 0.16.0-next.3
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 +280 -346
- package/package.json +7 -7
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-kNDiQmof.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")
|
|
@@ -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;
|
|
@@ -114045,7 +114055,7 @@ var isRegExp = (value) => {
|
|
|
114045
114055
|
normalized.push(node3);
|
|
114046
114056
|
});
|
|
114047
114057
|
return normalized;
|
|
114048
|
-
}, lower16 = 65535, factor16, DEL_BEFORE = 1, DEL_AFTER = 2, DEL_ACROSS = 4, DEL_SIDE = 8, MapResult = class {
|
|
114058
|
+
}, BLOCK_FIELD_XML_NAMES, lower16 = 65535, factor16, DEL_BEFORE = 1, DEL_AFTER = 2, DEL_ACROSS = 4, DEL_SIDE = 8, MapResult = class {
|
|
114049
114059
|
constructor(pos, delInfo, recover) {
|
|
114050
114060
|
this.pos = pos;
|
|
114051
114061
|
this.delInfo = delInfo;
|
|
@@ -118583,7 +118593,7 @@ var isRegExp = (value) => {
|
|
|
118583
118593
|
currentField.instructionTokens.push(...instructionTokens);
|
|
118584
118594
|
const instrTextValue = instrTextEl?.elements?.[0]?.text;
|
|
118585
118595
|
if (instrTextValue != null)
|
|
118586
|
-
currentField.instrText += `${instrTextValue}
|
|
118596
|
+
currentField.instrText += `${instrTextValue}`;
|
|
118587
118597
|
if (instructionTokens.some((token) => token.type === "tab"))
|
|
118588
118598
|
currentField.instrText += "\t";
|
|
118589
118599
|
return;
|
|
@@ -124303,66 +124313,19 @@ var isRegExp = (value) => {
|
|
|
124303
124313
|
});
|
|
124304
124314
|
return {
|
|
124305
124315
|
type: SD_NODE_NAME$14,
|
|
124306
|
-
attrs: {
|
|
124316
|
+
attrs: {
|
|
124317
|
+
instruction: node3.attributes?.instruction || "",
|
|
124318
|
+
instructionTokens: node3.attributes?.instructionTokens || null,
|
|
124319
|
+
wrapperParagraphProperties: node3.attributes?.wrapperParagraphProperties || null
|
|
124320
|
+
},
|
|
124307
124321
|
content: processedContent
|
|
124308
124322
|
};
|
|
124309
124323
|
}, decode$18 = (params3) => {
|
|
124310
124324
|
const { node: node3 } = params3;
|
|
124311
|
-
|
|
124325
|
+
return wrapParagraphsAsComplexField((node3.content ?? []).map((n) => exportSchemaToJson({
|
|
124312
124326
|
...params3,
|
|
124313
124327
|
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;
|
|
124328
|
+
})), buildInstructionElements(node3.attrs?.instruction, node3.attrs?.instructionTokens ?? null), node3.attrs?.wrapperParagraphProperties ?? null);
|
|
124366
124329
|
}, config$15, translator$20, XML_NODE_NAME$13 = "sd:authorityEntry", SD_NODE_NAME$13 = "authorityEntry", encode$17 = (params3) => {
|
|
124367
124330
|
const { nodes = [], nodeListHandler } = params3 || {};
|
|
124368
124331
|
const node3 = nodes[0];
|
|
@@ -124445,67 +124408,17 @@ var isRegExp = (value) => {
|
|
|
124445
124408
|
type: SD_NODE_NAME$12,
|
|
124446
124409
|
attrs: {
|
|
124447
124410
|
instruction: node3.attributes?.instruction || "",
|
|
124448
|
-
instructionTokens: node3.attributes?.instructionTokens || null
|
|
124411
|
+
instructionTokens: node3.attributes?.instructionTokens || null,
|
|
124412
|
+
wrapperParagraphProperties: node3.attributes?.wrapperParagraphProperties || null
|
|
124449
124413
|
},
|
|
124450
124414
|
content: processedContent
|
|
124451
124415
|
};
|
|
124452
124416
|
}, decode$16 = (params3) => {
|
|
124453
124417
|
const { node: node3 } = params3;
|
|
124454
|
-
|
|
124418
|
+
return wrapParagraphsAsComplexField((node3.content ?? []).map((n) => exportSchemaToJson({
|
|
124455
124419
|
...params3,
|
|
124456
124420
|
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;
|
|
124421
|
+
})), buildInstructionElements(node3.attrs?.instruction, node3.attrs?.instructionTokens), node3.attrs?.wrapperParagraphProperties ?? null);
|
|
124509
124422
|
}, config$13, translator$22, XML_NODE_NAME$11 = "sd:sequenceField", SD_NODE_NAME$11 = "sequenceField", encode$15 = (params3) => {
|
|
124510
124423
|
const { nodes = [], nodeListHandler } = params3 || {};
|
|
124511
124424
|
const node3 = nodes[0];
|
|
@@ -124678,67 +124591,17 @@ var isRegExp = (value) => {
|
|
|
124678
124591
|
type: "index",
|
|
124679
124592
|
attrs: {
|
|
124680
124593
|
instruction: node3.attributes?.instruction || "",
|
|
124681
|
-
instructionTokens: node3.attributes?.instructionTokens || null
|
|
124594
|
+
instructionTokens: node3.attributes?.instructionTokens || null,
|
|
124595
|
+
wrapperParagraphProperties: node3.attributes?.wrapperParagraphProperties || null
|
|
124682
124596
|
},
|
|
124683
124597
|
content: processedContent
|
|
124684
124598
|
};
|
|
124685
124599
|
}, decode$13 = (params3) => {
|
|
124686
124600
|
const { node: node3 } = params3;
|
|
124687
|
-
|
|
124601
|
+
return wrapParagraphsAsComplexField((node3.content ?? []).map((n) => exportSchemaToJson({
|
|
124688
124602
|
...params3,
|
|
124689
124603
|
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;
|
|
124604
|
+
})), buildInstructionElements(node3.attrs?.instruction, node3.attrs?.instructionTokens), node3.attrs?.wrapperParagraphProperties ?? null);
|
|
124742
124605
|
}, config$10, translator$25, XML_NODE_NAME$8 = "sd:indexEntry", SD_NODE_NAME$8 = "indexEntry", encode$12 = (params3) => {
|
|
124743
124606
|
const { nodes = [], nodeListHandler } = params3 || {};
|
|
124744
124607
|
const node3 = nodes[0];
|
|
@@ -125062,13 +124925,47 @@ var isRegExp = (value) => {
|
|
|
125062
124925
|
nodes: [resultNode],
|
|
125063
124926
|
consumed: 1
|
|
125064
124927
|
};
|
|
125065
|
-
}, textNodeHandlerEntity, PARAGRAPH_PROPERTIES_XML_NAME = "w:pPr",
|
|
124928
|
+
}, 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) => {
|
|
124929
|
+
const elements = (paragraphProperties.elements || []).filter((element) => element?.name !== "w:sectPr").map((element) => carbonCopy(element));
|
|
124930
|
+
if (elements.length === 0)
|
|
124931
|
+
return null;
|
|
124932
|
+
return {
|
|
124933
|
+
...carbonCopy(paragraphProperties),
|
|
124934
|
+
elements
|
|
124935
|
+
};
|
|
124936
|
+
}, inheritWrapperParagraphProperties = (blockFieldElement, paragraphProperties) => {
|
|
124937
|
+
if (!paragraphProperties)
|
|
124938
|
+
return blockFieldElement;
|
|
124939
|
+
const fieldElements = Array.isArray(blockFieldElement?.elements) ? blockFieldElement.elements : [];
|
|
124940
|
+
const firstParagraphIndex = fieldElements.findIndex((element) => element?.name === "w:p");
|
|
124941
|
+
if (firstParagraphIndex < 0)
|
|
124942
|
+
return blockFieldElement;
|
|
124943
|
+
const firstParagraph = fieldElements[firstParagraphIndex];
|
|
124944
|
+
const firstParagraphElements = Array.isArray(firstParagraph.elements) ? firstParagraph.elements : [];
|
|
124945
|
+
if (hasParagraphProperties(firstParagraphElements))
|
|
124946
|
+
return blockFieldElement;
|
|
124947
|
+
const renderedParagraphProperties = cloneParagraphPropertiesForRenderedResult(paragraphProperties);
|
|
124948
|
+
const inheritedFirstParagraph = {
|
|
124949
|
+
...firstParagraph,
|
|
124950
|
+
elements: renderedParagraphProperties ? [renderedParagraphProperties, ...firstParagraphElements] : firstParagraphElements
|
|
124951
|
+
};
|
|
124952
|
+
return {
|
|
124953
|
+
...blockFieldElement,
|
|
124954
|
+
attributes: {
|
|
124955
|
+
...blockFieldElement.attributes || {},
|
|
124956
|
+
wrapperParagraphProperties: carbonCopy(paragraphProperties)
|
|
124957
|
+
},
|
|
124958
|
+
elements: fieldElements.map((element, index2) => index2 === firstParagraphIndex ? inheritedFirstParagraph : element)
|
|
124959
|
+
};
|
|
124960
|
+
}, hoistBlockFieldNodes = (params3, paragraphNode) => {
|
|
125066
124961
|
const paragraphElements = Array.isArray(paragraphNode?.elements) ? paragraphNode.elements : [];
|
|
125067
124962
|
const blockFieldElements = paragraphElements.filter((element) => BLOCK_FIELD_XML_NAMES.has(element?.name));
|
|
125068
124963
|
if (blockFieldElements.length === 0)
|
|
125069
124964
|
return null;
|
|
125070
124965
|
const nodes = [];
|
|
125071
124966
|
const remainingElements = paragraphElements.filter((element) => !BLOCK_FIELD_XML_NAMES.has(element?.name));
|
|
124967
|
+
const wrapperParagraphProperties = findParagraphProperties(remainingElements);
|
|
124968
|
+
const shouldTransferWrapperProperties = !hasMeaningfulParagraphContent(remainingElements);
|
|
125072
124969
|
if (hasMeaningfulParagraphContent(remainingElements)) {
|
|
125073
124970
|
const paragraph2 = translator.encode({
|
|
125074
124971
|
...params3,
|
|
@@ -125081,9 +124978,10 @@ var isRegExp = (value) => {
|
|
|
125081
124978
|
nodes.push(paragraph2);
|
|
125082
124979
|
}
|
|
125083
124980
|
blockFieldElements.forEach((blockFieldElement) => {
|
|
124981
|
+
const fieldElement = shouldTransferWrapperProperties ? inheritWrapperParagraphProperties(blockFieldElement, wrapperParagraphProperties) : blockFieldElement;
|
|
125084
124982
|
nodes.push(...params3.nodeListHandler.handler({
|
|
125085
124983
|
...params3,
|
|
125086
|
-
nodes: [
|
|
124984
|
+
nodes: [fieldElement],
|
|
125087
124985
|
path: [...params3.path || [], paragraphNode]
|
|
125088
124986
|
}));
|
|
125089
124987
|
});
|
|
@@ -126081,7 +125979,7 @@ var isRegExp = (value) => {
|
|
|
126081
125979
|
nodes: Array.isArray(result) ? result : [result],
|
|
126082
125980
|
consumed: 1
|
|
126083
125981
|
};
|
|
126084
|
-
}, smartTagNodeEntityHandler, footnoteReferenceHandlerEntity, endnoteReferenceHandlerEntity, tableNodeHandlerEntity, tableOfContentsHandlerEntity, indexHandlerEntity, indexEntryHandlerEntity, bibliographyHandlerEntity, commentRangeStartHandlerEntity, commentRangeEndHandlerEntity, permStartHandlerEntity, permEndHandlerEntity, handleMathPara = (params3) => {
|
|
125982
|
+
}, smartTagNodeEntityHandler, footnoteReferenceHandlerEntity, endnoteReferenceHandlerEntity, tableNodeHandlerEntity, tableOfContentsHandlerEntity, indexHandlerEntity, indexEntryHandlerEntity, bibliographyHandlerEntity, tableOfAuthoritiesHandlerEntity, commentRangeStartHandlerEntity, commentRangeEndHandlerEntity, permStartHandlerEntity, permEndHandlerEntity, handleMathPara = (params3) => {
|
|
126085
125983
|
const { nodes } = params3;
|
|
126086
125984
|
if (!nodes.length || nodes[0].name !== "m:oMathPara")
|
|
126087
125985
|
return {
|
|
@@ -126333,6 +126231,7 @@ var isRegExp = (value) => {
|
|
|
126333
126231
|
tableOfContentsHandlerEntity,
|
|
126334
126232
|
indexHandlerEntity,
|
|
126335
126233
|
bibliographyHandlerEntity,
|
|
126234
|
+
tableOfAuthoritiesHandlerEntity,
|
|
126336
126235
|
indexEntryHandlerEntity,
|
|
126337
126236
|
autoPageHandlerEntity,
|
|
126338
126237
|
autoTotalPageCountEntity,
|
|
@@ -129120,29 +129019,7 @@ var isRegExp = (value) => {
|
|
|
129120
129019
|
return null;
|
|
129121
129020
|
const mapped = endnoteNumberById?.[key];
|
|
129122
129021
|
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) => {
|
|
129022
|
+
}, sdtMetadataCache, getParagraphContainerChildren = (node3) => {
|
|
129146
129023
|
if (Array.isArray(node3.content))
|
|
129147
129024
|
return node3.content;
|
|
129148
129025
|
const content$2 = node3.content;
|
|
@@ -129152,7 +129029,7 @@ var isRegExp = (value) => {
|
|
|
129152
129029
|
return children;
|
|
129153
129030
|
}
|
|
129154
129031
|
return [];
|
|
129155
|
-
}, NON_BREAKING_HYPHEN = "‑", DEFAULT_IMAGE_DIMENSION_PX = 100, isNodeHidden = (node3) => {
|
|
129032
|
+
}, NON_RENDERED_STRUCTURAL_INLINE_TYPES, PARAGRAPH_CONTAINER_TYPES, NON_BREAKING_HYPHEN = "‑", DEFAULT_IMAGE_DIMENSION_PX = 100, isNodeHidden = (node3) => {
|
|
129156
129033
|
const attrs = node3.attrs ?? {};
|
|
129157
129034
|
if (attrs.hidden === true)
|
|
129158
129035
|
return true;
|
|
@@ -130320,7 +130197,7 @@ var isRegExp = (value) => {
|
|
|
130320
130197
|
state.kern = kernNode.attributes["w:val"];
|
|
130321
130198
|
}
|
|
130322
130199
|
}, SuperConverter;
|
|
130323
|
-
var
|
|
130200
|
+
var init_SuperConverter_kNDiQmof_es = __esm(() => {
|
|
130324
130201
|
init_rolldown_runtime_Bg48TavK_es();
|
|
130325
130202
|
init_jszip_C49i9kUs_es();
|
|
130326
130203
|
init_xml_js_CqGKpaft_es();
|
|
@@ -146709,8 +146586,8 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
146709
146586
|
...params3.node,
|
|
146710
146587
|
attrs: change
|
|
146711
146588
|
} });
|
|
146712
|
-
const hasParagraphProperties = Object.prototype.hasOwnProperty.call(change, "paragraphProperties");
|
|
146713
|
-
const paragraphProperties = hasParagraphProperties ? change.paragraphProperties : undefined;
|
|
146589
|
+
const hasParagraphProperties$1 = Object.prototype.hasOwnProperty.call(change, "paragraphProperties");
|
|
146590
|
+
const paragraphProperties = hasParagraphProperties$1 ? change.paragraphProperties : undefined;
|
|
146714
146591
|
let pPrNode = paragraphProperties && typeof paragraphProperties === "object" ? pPrTranslator.decode({
|
|
146715
146592
|
...params3,
|
|
146716
146593
|
node: {
|
|
@@ -146729,7 +146606,7 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
146729
146606
|
};
|
|
146730
146607
|
pPrNode.elements = [...pPrNode.elements || [], sectPr];
|
|
146731
146608
|
}
|
|
146732
|
-
if (!pPrNode && hasParagraphProperties)
|
|
146609
|
+
if (!pPrNode && hasParagraphProperties$1)
|
|
146733
146610
|
pPrNode = {
|
|
146734
146611
|
name: "w:pPr",
|
|
146735
146612
|
type: "element",
|
|
@@ -147076,6 +146953,12 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
147076
146953
|
"permStart",
|
|
147077
146954
|
"permEnd"
|
|
147078
146955
|
]);
|
|
146956
|
+
BLOCK_FIELD_XML_NAMES = new Set([
|
|
146957
|
+
"sd:tableOfContents",
|
|
146958
|
+
"sd:index",
|
|
146959
|
+
"sd:bibliography",
|
|
146960
|
+
"sd:tableOfAuthorities"
|
|
146961
|
+
]);
|
|
147079
146962
|
factor16 = Math.pow(2, 16);
|
|
147080
146963
|
StepMap.empty = new StepMap([]);
|
|
147081
146964
|
stepsByID = Object.create(null);
|
|
@@ -166572,12 +166455,6 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
166572
166455
|
handlerName: "textNodeHandler",
|
|
166573
166456
|
handler: handleTextNode
|
|
166574
166457
|
};
|
|
166575
|
-
BLOCK_FIELD_XML_NAMES = new Set([
|
|
166576
|
-
"sd:tableOfContents",
|
|
166577
|
-
"sd:index",
|
|
166578
|
-
"sd:bibliography",
|
|
166579
|
-
"sd:tableOfAuthorities"
|
|
166580
|
-
]);
|
|
166581
166458
|
paragraphNodeHandlerEntity = {
|
|
166582
166459
|
handlerName: "paragraphNodeHandler",
|
|
166583
166460
|
handler: handleParagraphNode$1
|
|
@@ -167215,6 +167092,7 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
167215
167092
|
indexHandlerEntity = generateV2HandlerEntity("indexHandler", translator$25);
|
|
167216
167093
|
indexEntryHandlerEntity = generateV2HandlerEntity("indexEntryHandler", translator$26);
|
|
167217
167094
|
bibliographyHandlerEntity = generateV2HandlerEntity("bibliographyHandler", translator$20);
|
|
167095
|
+
tableOfAuthoritiesHandlerEntity = generateV2HandlerEntity("tableOfAuthoritiesHandler", translator$22);
|
|
167218
167096
|
commentRangeStartHandlerEntity = generateV2HandlerEntity("commentRangeStartHandler", commentRangeStartTranslator);
|
|
167219
167097
|
commentRangeEndHandlerEntity = generateV2HandlerEntity("commentRangeEndHandler", commentRangeEndTranslator);
|
|
167220
167098
|
permStartHandlerEntity = generateV2HandlerEntity("permStartHandler", translator$15);
|
|
@@ -167514,6 +167392,11 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
167514
167392
|
"permStart",
|
|
167515
167393
|
"permEnd"
|
|
167516
167394
|
]);
|
|
167395
|
+
PARAGRAPH_CONTAINER_TYPES = new Set([
|
|
167396
|
+
"bibliography",
|
|
167397
|
+
"index",
|
|
167398
|
+
"tableOfAuthorities"
|
|
167399
|
+
]);
|
|
167517
167400
|
VERTICAL_ELEMENTS = {
|
|
167518
167401
|
"m:f": 0.6,
|
|
167519
167402
|
"m:bar": 0.25,
|
|
@@ -167686,13 +167569,13 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
167686
167569
|
nodeHandlers = {
|
|
167687
167570
|
paragraph: handleParagraphNode,
|
|
167688
167571
|
tableOfContents: handleTableOfContentsNode,
|
|
167689
|
-
index:
|
|
167572
|
+
index: handleParagraphContainerNode,
|
|
167690
167573
|
structuredContentBlock: handleStructuredContentBlockNode,
|
|
167691
167574
|
documentSection: handleDocumentSectionNode,
|
|
167692
167575
|
table: handleTableNode,
|
|
167693
167576
|
documentPartObject: handleDocumentPartObjectNode,
|
|
167694
|
-
bibliography:
|
|
167695
|
-
tableOfAuthorities:
|
|
167577
|
+
bibliography: handleParagraphContainerNode,
|
|
167578
|
+
tableOfAuthorities: handleParagraphContainerNode,
|
|
167696
167579
|
image: handleImageNode,
|
|
167697
167580
|
vectorShape: handleVectorShapeNode,
|
|
167698
167581
|
shapeGroup: handleShapeGroupNode,
|
|
@@ -169003,7 +168886,7 @@ var init_SuperConverter_B_oz3OyP_es = __esm(() => {
|
|
|
169003
168886
|
};
|
|
169004
168887
|
});
|
|
169005
168888
|
|
|
169006
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
168889
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-fRnbrGLy.es.js
|
|
169007
168890
|
function parseSizeUnit(val = "0") {
|
|
169008
168891
|
const length3 = val.toString() || "0";
|
|
169009
168892
|
const value = Number.parseFloat(length3);
|
|
@@ -179334,8 +179217,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
179334
179217
|
}
|
|
179335
179218
|
};
|
|
179336
179219
|
};
|
|
179337
|
-
var
|
|
179338
|
-
|
|
179220
|
+
var init_create_headless_toolbar_fRnbrGLy_es = __esm(() => {
|
|
179221
|
+
init_SuperConverter_kNDiQmof_es();
|
|
179339
179222
|
init_uuid_qzgm05fK_es();
|
|
179340
179223
|
init_constants_D_X7xF4s_es();
|
|
179341
179224
|
init_dist_B8HfvhaK_es();
|
|
@@ -228498,7 +228381,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
228498
228381
|
init_remark_gfm_BhnWr3yf_es();
|
|
228499
228382
|
});
|
|
228500
228383
|
|
|
228501
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
228384
|
+
// ../../packages/superdoc/dist/chunks/src-DckQskSY.es.js
|
|
228502
228385
|
function deleteProps(obj, propOrProps) {
|
|
228503
228386
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
228504
228387
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -236140,7 +236023,7 @@ function setContent(content3, props) {
|
|
|
236140
236023
|
else
|
|
236141
236024
|
content3.textContent = props.content;
|
|
236142
236025
|
}
|
|
236143
|
-
function
|
|
236026
|
+
function getChildren(popper$1) {
|
|
236144
236027
|
var box = popper$1.firstElementChild;
|
|
236145
236028
|
var boxChildren = arrayFrom(box.children);
|
|
236146
236029
|
return {
|
|
@@ -236170,7 +236053,7 @@ function render(instance) {
|
|
|
236170
236053
|
box.appendChild(content3);
|
|
236171
236054
|
onUpdate(instance.props, instance.props);
|
|
236172
236055
|
function onUpdate(prevProps, nextProps) {
|
|
236173
|
-
var _getChildren =
|
|
236056
|
+
var _getChildren = getChildren(popper$1), box$1 = _getChildren.box, content$13 = _getChildren.content, arrow$2 = _getChildren.arrow;
|
|
236174
236057
|
if (nextProps.theme)
|
|
236175
236058
|
box$1.setAttribute("data-theme", nextProps.theme);
|
|
236176
236059
|
else
|
|
@@ -236297,7 +236180,7 @@ function createTippy(reference$1, passedProps) {
|
|
|
236297
236180
|
return parent ? getOwnerDocument(parent) : document;
|
|
236298
236181
|
}
|
|
236299
236182
|
function getDefaultTemplateChildren() {
|
|
236300
|
-
return
|
|
236183
|
+
return getChildren(popper$1);
|
|
236301
236184
|
}
|
|
236302
236185
|
function getDelay(isShow) {
|
|
236303
236186
|
if (instance.state.isMounted && !instance.state.isVisible || currentInput.isTouch || lastTriggerEvent && lastTriggerEvent.type === "focus")
|
|
@@ -236534,7 +236417,7 @@ function createTippy(reference$1, passedProps) {
|
|
|
236534
236417
|
function createPopperInstance() {
|
|
236535
236418
|
destroyPopperInstance();
|
|
236536
236419
|
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() ?
|
|
236420
|
+
var arrow$2 = getIsDefaultRenderFn() ? getChildren(popper$1).arrow : null;
|
|
236538
236421
|
var computedReference = getReferenceClientRect ? {
|
|
236539
236422
|
getBoundingClientRect: getReferenceClientRect,
|
|
236540
236423
|
contextElement: getReferenceClientRect.contextElement || getCurrentTarget()
|
|
@@ -303794,30 +303677,56 @@ var Node$13 = class Node$14 {
|
|
|
303794
303677
|
/* Global content-control chrome opt-out: preserve SDT wrappers/datasets while
|
|
303795
303678
|
* suppressing built-in visual chrome on structured-content controls. Their
|
|
303796
303679
|
* label elements are not emitted by renderer/helpers when this class is
|
|
303797
|
-
* present (DOM non-emission)
|
|
303798
|
-
*
|
|
303799
|
-
*
|
|
303800
|
-
|
|
303680
|
+
* present (DOM non-emission). documentSection chrome (e.g. the locked-section
|
|
303681
|
+
* tooltip) is intentionally preserved and not in scope.
|
|
303682
|
+
*
|
|
303683
|
+
* Custom styling surface (SD-3322): instead of fully erasing the look, these
|
|
303684
|
+
* rules read --sd-content-controls-custom-* variables whose defaults reproduce
|
|
303685
|
+
* the empty look (0-width transparent border, no background, no radius/padding).
|
|
303686
|
+
* So chrome:'none' stays visually empty by default, but a consumer can paint
|
|
303687
|
+
* their own field/clause look by setting those variables on the painted wrapper
|
|
303688
|
+
* (target it via data-sdt-* attributes) - no !important, and no need to fight
|
|
303689
|
+
* the .ProseMirror-selectednode / .sdt-group-hover state classes, because the
|
|
303690
|
+
* painter reads the variables across rest, hover, and selected. The border is a
|
|
303691
|
+
* full shorthand (e.g. "1px solid #1355ff"); its default "0 solid transparent"
|
|
303692
|
+
* is identical in layout to no border. It's re-asserted in every state so the
|
|
303693
|
+
* box never shifts (no jitter); only the background changes on hover/selected.
|
|
303694
|
+
* Block controls add a -border-left override for an accent rail. */
|
|
303695
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline {
|
|
303696
|
+
padding: var(--sd-content-controls-custom-inline-padding, 0);
|
|
303697
|
+
border: var(--sd-content-controls-custom-inline-border, 0 solid transparent);
|
|
303698
|
+
border-radius: var(--sd-content-controls-custom-inline-radius, 0);
|
|
303699
|
+
background: var(--sd-content-controls-custom-inline-bg, none);
|
|
303700
|
+
}
|
|
303801
303701
|
.superdoc-cc-chrome-none .superdoc-structured-content-block {
|
|
303802
|
-
|
|
303803
|
-
|
|
303804
|
-
border-
|
|
303805
|
-
|
|
303702
|
+
padding: var(--sd-content-controls-custom-block-padding, 0);
|
|
303703
|
+
border: var(--sd-content-controls-custom-block-border, 0 solid transparent);
|
|
303704
|
+
border-left: var(--sd-content-controls-custom-block-border-left, var(--sd-content-controls-custom-block-border, 0 solid transparent));
|
|
303705
|
+
border-radius: var(--sd-content-controls-custom-block-radius, 0);
|
|
303706
|
+
background: var(--sd-content-controls-custom-block-bg, none);
|
|
303806
303707
|
}
|
|
303807
303708
|
|
|
303808
303709
|
.superdoc-cc-chrome-none .superdoc-structured-content-inline:hover,
|
|
303710
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline[data-lock-mode]:hover {
|
|
303711
|
+
border: var(--sd-content-controls-custom-inline-border, 0 solid transparent);
|
|
303712
|
+
background: var(--sd-content-controls-custom-inline-hover-bg, var(--sd-content-controls-custom-inline-bg, none));
|
|
303713
|
+
}
|
|
303809
303714
|
.superdoc-cc-chrome-none .superdoc-structured-content-block:hover,
|
|
303810
303715
|
.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;
|
|
303716
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block[data-lock-mode].sdt-group-hover {
|
|
303717
|
+
border: var(--sd-content-controls-custom-block-border, 0 solid transparent);
|
|
303718
|
+
border-left: var(--sd-content-controls-custom-block-border-left, var(--sd-content-controls-custom-block-border, 0 solid transparent));
|
|
303719
|
+
background: var(--sd-content-controls-custom-block-hover-bg, var(--sd-content-controls-custom-block-bg, none));
|
|
303815
303720
|
}
|
|
303816
303721
|
|
|
303817
|
-
.superdoc-cc-chrome-none .superdoc-structured-content-inline.ProseMirror-selectednode
|
|
303722
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline.ProseMirror-selectednode {
|
|
303723
|
+
border: var(--sd-content-controls-custom-inline-border, 0 solid transparent);
|
|
303724
|
+
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)));
|
|
303725
|
+
}
|
|
303818
303726
|
.superdoc-cc-chrome-none .superdoc-structured-content-block.ProseMirror-selectednode {
|
|
303819
|
-
border
|
|
303820
|
-
|
|
303727
|
+
border: var(--sd-content-controls-custom-block-border, 0 solid transparent);
|
|
303728
|
+
border-left: var(--sd-content-controls-custom-block-border-left, var(--sd-content-controls-custom-block-border, 0 solid transparent));
|
|
303729
|
+
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
303730
|
}
|
|
303822
303731
|
|
|
303823
303732
|
/* Hover highlight for SDT containers.
|
|
@@ -303866,11 +303775,20 @@ var Node$13 = class Node$14 {
|
|
|
303866
303775
|
border: none;
|
|
303867
303776
|
}
|
|
303868
303777
|
|
|
303869
|
-
/*
|
|
303870
|
-
*
|
|
303871
|
-
*
|
|
303872
|
-
|
|
303778
|
+
/* Chrome opt-out for the lock-hover affordance. The base lock-hover rules above
|
|
303779
|
+
* paint a built-in tint and boost z-index on hovered locked controls; under
|
|
303780
|
+
* chrome:'none' that would override the custom hover background and stack above
|
|
303781
|
+
* host-attached UI. Re-assert the custom hover background (so a locked control
|
|
303782
|
+
* follows --sd-content-controls-custom-*-hover-bg, defaulting to empty - no tint
|
|
303783
|
+
* leaks) and reset the z-index. Mirrors the base lock-hover selectors with the
|
|
303784
|
+
* chrome-none prefix, so the extra class wins over the base rules. Split inline
|
|
303785
|
+
* vs block because each reads its own hover variable. */
|
|
303873
303786
|
.superdoc-cc-chrome-none .superdoc-structured-content-inline[data-lock-mode]:hover:not(.ProseMirror-selectednode, [data-appearance='hidden']) {
|
|
303787
|
+
background: var(--sd-content-controls-custom-inline-hover-bg, var(--sd-content-controls-custom-inline-bg, none));
|
|
303788
|
+
z-index: auto;
|
|
303789
|
+
}
|
|
303790
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block[data-lock-mode].sdt-group-hover:not(.ProseMirror-selectednode) {
|
|
303791
|
+
background: var(--sd-content-controls-custom-block-hover-bg, var(--sd-content-controls-custom-block-bg, none));
|
|
303874
303792
|
z-index: auto;
|
|
303875
303793
|
}
|
|
303876
303794
|
|
|
@@ -319514,13 +319432,13 @@ menclose::after {
|
|
|
319514
319432
|
return;
|
|
319515
319433
|
console.log(...args$1);
|
|
319516
319434
|
}, 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
|
|
319435
|
+
var init_src_DckQskSY_es = __esm(() => {
|
|
319518
319436
|
init_rolldown_runtime_Bg48TavK_es();
|
|
319519
|
-
|
|
319437
|
+
init_SuperConverter_kNDiQmof_es();
|
|
319520
319438
|
init_jszip_C49i9kUs_es();
|
|
319521
319439
|
init_xml_js_CqGKpaft_es();
|
|
319522
319440
|
init_uuid_qzgm05fK_es();
|
|
319523
|
-
|
|
319441
|
+
init_create_headless_toolbar_fRnbrGLy_es();
|
|
319524
319442
|
init_constants_D_X7xF4s_es();
|
|
319525
319443
|
init_dist_B8HfvhaK_es();
|
|
319526
319444
|
init_unified_Dsuw2be5_es();
|
|
@@ -326948,6 +326866,10 @@ ${err.toString()}`);
|
|
|
326948
326866
|
renderDOM: (attrs) => {
|
|
326949
326867
|
return attrs.sdBlockId ? { "data-sd-block-id": attrs.sdBlockId } : {};
|
|
326950
326868
|
}
|
|
326869
|
+
},
|
|
326870
|
+
wrapperParagraphProperties: {
|
|
326871
|
+
default: null,
|
|
326872
|
+
rendered: false
|
|
326951
326873
|
}
|
|
326952
326874
|
};
|
|
326953
326875
|
}
|
|
@@ -330345,10 +330267,18 @@ ${err.toString()}`);
|
|
|
330345
330267
|
default: "",
|
|
330346
330268
|
rendered: false
|
|
330347
330269
|
},
|
|
330270
|
+
instructionTokens: {
|
|
330271
|
+
default: null,
|
|
330272
|
+
rendered: false
|
|
330273
|
+
},
|
|
330348
330274
|
sdBlockId: {
|
|
330349
330275
|
default: null,
|
|
330350
330276
|
rendered: false
|
|
330351
330277
|
},
|
|
330278
|
+
wrapperParagraphProperties: {
|
|
330279
|
+
default: null,
|
|
330280
|
+
rendered: false
|
|
330281
|
+
},
|
|
330352
330282
|
style: {
|
|
330353
330283
|
default: null,
|
|
330354
330284
|
rendered: false
|
|
@@ -330449,6 +330379,10 @@ ${err.toString()}`);
|
|
|
330449
330379
|
sdBlockId: {
|
|
330450
330380
|
default: null,
|
|
330451
330381
|
rendered: false
|
|
330382
|
+
},
|
|
330383
|
+
wrapperParagraphProperties: {
|
|
330384
|
+
default: null,
|
|
330385
|
+
rendered: false
|
|
330452
330386
|
}
|
|
330453
330387
|
};
|
|
330454
330388
|
},
|
|
@@ -353668,11 +353602,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
353668
353602
|
]);
|
|
353669
353603
|
});
|
|
353670
353604
|
|
|
353671
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
353605
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-DQ3Apok7.es.js
|
|
353672
353606
|
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
|
-
|
|
353607
|
+
var init_create_super_doc_ui_DQ3Apok7_es = __esm(() => {
|
|
353608
|
+
init_SuperConverter_kNDiQmof_es();
|
|
353609
|
+
init_create_headless_toolbar_fRnbrGLy_es();
|
|
353676
353610
|
MOD_ALIASES = new Set([
|
|
353677
353611
|
"Mod",
|
|
353678
353612
|
"Meta",
|
|
@@ -353714,16 +353648,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
353714
353648
|
|
|
353715
353649
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
353716
353650
|
var init_super_editor_es = __esm(() => {
|
|
353717
|
-
|
|
353718
|
-
|
|
353651
|
+
init_src_DckQskSY_es();
|
|
353652
|
+
init_SuperConverter_kNDiQmof_es();
|
|
353719
353653
|
init_jszip_C49i9kUs_es();
|
|
353720
353654
|
init_xml_js_CqGKpaft_es();
|
|
353721
|
-
|
|
353655
|
+
init_create_headless_toolbar_fRnbrGLy_es();
|
|
353722
353656
|
init_constants_D_X7xF4s_es();
|
|
353723
353657
|
init_dist_B8HfvhaK_es();
|
|
353724
353658
|
init_unified_Dsuw2be5_es();
|
|
353725
353659
|
init_DocxZipper_nv_KfOqb_es();
|
|
353726
|
-
|
|
353660
|
+
init_create_super_doc_ui_DQ3Apok7_es();
|
|
353727
353661
|
init_ui_C5PAS9hY_es();
|
|
353728
353662
|
init_eventemitter3_BnGqBE_Q_es();
|
|
353729
353663
|
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.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@types/node": "22.19.2",
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
|
-
"@superdoc/document-api": "0.0.1",
|
|
28
27
|
"@superdoc/super-editor": "0.0.1",
|
|
28
|
+
"@superdoc/document-api": "0.0.1",
|
|
29
29
|
"superdoc": "1.38.0"
|
|
30
30
|
},
|
|
31
31
|
"module": "src/index.ts",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@superdoc-dev/cli-darwin-arm64": "0.16.0-next.
|
|
37
|
-
"@superdoc-dev/cli-darwin-x64": "0.16.0-next.
|
|
38
|
-
"@superdoc-dev/cli-linux-x64": "0.16.0-next.
|
|
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.3",
|
|
37
|
+
"@superdoc-dev/cli-darwin-x64": "0.16.0-next.3",
|
|
38
|
+
"@superdoc-dev/cli-linux-x64": "0.16.0-next.3",
|
|
39
|
+
"@superdoc-dev/cli-linux-arm64": "0.16.0-next.3",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.16.0-next.3"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"predev": "node scripts/ensure-superdoc-build.js",
|