@superdoc-dev/mcp 0.3.0-next.75 → 0.3.0-next.77
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 +123 -86
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -199842,7 +199842,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
199842
199842
|
init_remark_gfm_BhnWr3yf_es();
|
|
199843
199843
|
});
|
|
199844
199844
|
|
|
199845
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
199845
|
+
// ../../packages/superdoc/dist/chunks/src-DLNvZ7Yw.es.js
|
|
199846
199846
|
function deleteProps(obj, propOrProps) {
|
|
199847
199847
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
199848
199848
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -254670,7 +254670,7 @@ function extractCellPadding(cellAttrs) {
|
|
|
254670
254670
|
return;
|
|
254671
254671
|
return normalizeCellPaddingTopBottom(padding);
|
|
254672
254672
|
}
|
|
254673
|
-
function textNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultSize, inheritedMarks = [], sdtMetadata, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, enableComments, runProperties, converterContext }) {
|
|
254673
|
+
function textNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultSize, inheritedMarks = [], sdtMetadata, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, enableComments, runProperties, inlineRunProperties, converterContext }) {
|
|
254674
254674
|
let run2 = {
|
|
254675
254675
|
text: node2.text || "",
|
|
254676
254676
|
fontFamily: defaultFont,
|
|
@@ -254684,7 +254684,7 @@ function textNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultS
|
|
|
254684
254684
|
applyMarksToRun(run2, [...node2.marks ?? [], ...inheritedMarks ?? []], hyperlinkConfig, themeColors, converterContext?.backgroundColor, enableComments, storyKey);
|
|
254685
254685
|
if (sdtMetadata)
|
|
254686
254686
|
run2.sdt = sdtMetadata;
|
|
254687
|
-
run2 = applyInlineRunProperties(run2, runProperties, converterContext);
|
|
254687
|
+
run2 = applyInlineRunProperties(run2, runProperties, converterContext, inlineRunProperties);
|
|
254688
254688
|
return run2;
|
|
254689
254689
|
}
|
|
254690
254690
|
function buildReferenceMarkerRun(displayText, params$1) {
|
|
@@ -254717,7 +254717,7 @@ function runNodeChildrenToRuns({ node: node2, inheritedMarks, sdtMetadata, conve
|
|
|
254717
254717
|
if (runProperties.vanish)
|
|
254718
254718
|
throw new HiddenByVanishError;
|
|
254719
254719
|
const resolvedRunProperties = resolveRunProperties(converterContext, runProperties, paragraphProperties, converterContext.tableInfo, false, false);
|
|
254720
|
-
node2.content?.forEach((child) => visitNode(child, mergedMarks, sdtMetadata, resolvedRunProperties, false));
|
|
254720
|
+
node2.content?.forEach((child) => visitNode(child, mergedMarks, sdtMetadata, resolvedRunProperties, false, runProperties));
|
|
254721
254721
|
}
|
|
254722
254722
|
function resolveSdtMetadata(input2) {
|
|
254723
254723
|
if (!input2)
|
|
@@ -255490,12 +255490,12 @@ function handleTableOfAuthoritiesNode(node2, context) {
|
|
|
255490
255490
|
sectionState.currentParagraphIndex++;
|
|
255491
255491
|
});
|
|
255492
255492
|
}
|
|
255493
|
-
function structuredContentNodeToBlocks({ node: node2, inheritedMarks, sdtMetadata, visitNode, runProperties }) {
|
|
255493
|
+
function structuredContentNodeToBlocks({ node: node2, inheritedMarks, sdtMetadata, visitNode, runProperties, inlineRunProperties }) {
|
|
255494
255494
|
const nextSdt = resolveNodeSdtMetadata(node2, "structuredContent") ?? sdtMetadata;
|
|
255495
|
-
node2.content?.forEach((child) => visitNode(child, inheritedMarks, nextSdt, runProperties, false));
|
|
255495
|
+
node2.content?.forEach((child) => visitNode(child, inheritedMarks, nextSdt, runProperties, false, inlineRunProperties));
|
|
255496
255496
|
}
|
|
255497
255497
|
function pageReferenceNodeToBlock(params$1) {
|
|
255498
|
-
const { node: node2, inheritedMarks, visitNode, sdtMetadata, positions, converterContext, paragraphProperties } = params$1;
|
|
255498
|
+
const { node: node2, inheritedMarks, visitNode, sdtMetadata, positions, converterContext, paragraphProperties, inlineRunProperties: parentInlineRunProperties } = params$1;
|
|
255499
255499
|
const instruction = getNodeInstruction(node2) || "";
|
|
255500
255500
|
const nodeAttrs = typeof node2.attrs === "object" && node2.attrs !== null ? node2.attrs : {};
|
|
255501
255501
|
const mergedMarks = [...Array.isArray(nodeAttrs.marksAsAttrs) ? nodeAttrs.marksAsAttrs : [], ...inheritedMarks ?? []];
|
|
@@ -255525,7 +255525,8 @@ function pageReferenceNodeToBlock(params$1) {
|
|
|
255525
255525
|
text: fallbackText
|
|
255526
255526
|
},
|
|
255527
255527
|
inheritedMarks: mergedMarks,
|
|
255528
|
-
runProperties: resolvedRunProperties
|
|
255528
|
+
runProperties: resolvedRunProperties,
|
|
255529
|
+
inlineRunProperties: runProperties
|
|
255529
255530
|
});
|
|
255530
255531
|
if (pageRefPos) {
|
|
255531
255532
|
tokenRun.pmStart = pageRefPos.start;
|
|
@@ -255549,7 +255550,7 @@ function pageReferenceNodeToBlock(params$1) {
|
|
|
255549
255550
|
tokenRun.sdt = sdtMetadata;
|
|
255550
255551
|
return tokenRun;
|
|
255551
255552
|
} else if (Array.isArray(node2.content))
|
|
255552
|
-
node2.content.forEach((child) => visitNode(child, mergedMarks, sdtMetadata, runProperties));
|
|
255553
|
+
node2.content.forEach((child) => visitNode(child, mergedMarks, sdtMetadata, runProperties, false, parentInlineRunProperties));
|
|
255553
255554
|
}
|
|
255554
255555
|
function fieldAnnotationNodeToRun({ node: node2, positions }) {
|
|
255555
255556
|
const fieldMetadata = resolveNodeSdtMetadata(node2, "fieldAnnotation");
|
|
@@ -255652,7 +255653,7 @@ function fieldAnnotationNodeToRun({ node: node2, positions }) {
|
|
|
255652
255653
|
return run2;
|
|
255653
255654
|
}
|
|
255654
255655
|
function bookmarkStartNodeToBlocks(params$1) {
|
|
255655
|
-
const { node: node2, positions, bookmarks, visitNode, inheritedMarks, sdtMetadata, runProperties, converterContext } = params$1;
|
|
255656
|
+
const { node: node2, positions, bookmarks, visitNode, inheritedMarks, sdtMetadata, runProperties, inlineRunProperties, converterContext } = params$1;
|
|
255656
255657
|
const nodeAttrs = typeof node2.attrs === "object" && node2.attrs !== null ? node2.attrs : {};
|
|
255657
255658
|
const bookmarkName = typeof nodeAttrs.name === "string" ? nodeAttrs.name : undefined;
|
|
255658
255659
|
if (bookmarkName && bookmarks) {
|
|
@@ -255682,7 +255683,7 @@ function bookmarkStartNodeToBlocks(params$1) {
|
|
|
255682
255683
|
converterContext.renderedBookmarkIds.add(bookmarkId);
|
|
255683
255684
|
}
|
|
255684
255685
|
if (Array.isArray(node2.content))
|
|
255685
|
-
node2.content.forEach((child) => visitNode(child, inheritedMarks, sdtMetadata, runProperties));
|
|
255686
|
+
node2.content.forEach((child) => visitNode(child, inheritedMarks, sdtMetadata, runProperties, false, inlineRunProperties));
|
|
255686
255687
|
return run2;
|
|
255687
255688
|
}
|
|
255688
255689
|
function bookmarkEndNodeToRun(params$1) {
|
|
@@ -255732,7 +255733,7 @@ function tabNodeToRun({ node: node2, positions, storyKey, tabOrdinal, paragraphA
|
|
|
255732
255733
|
applyMarksToRun(run2, marks, undefined, undefined, undefined, true, storyKey);
|
|
255733
255734
|
return run2;
|
|
255734
255735
|
}
|
|
255735
|
-
function noBreakHyphenNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultSize, inheritedMarks = [], sdtMetadata, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, enableComments, runProperties, converterContext }) {
|
|
255736
|
+
function noBreakHyphenNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultSize, inheritedMarks = [], sdtMetadata, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, enableComments, runProperties, inlineRunProperties, converterContext }) {
|
|
255736
255737
|
let run2 = {
|
|
255737
255738
|
text: NON_BREAKING_HYPHEN,
|
|
255738
255739
|
fontFamily: defaultFont,
|
|
@@ -255746,14 +255747,14 @@ function noBreakHyphenNodeToRun({ node: node2, positions, storyKey, defaultFont,
|
|
|
255746
255747
|
applyMarksToRun(run2, [...node2.marks ?? [], ...inheritedMarks ?? []], hyperlinkConfig, themeColors, converterContext?.backgroundColor, enableComments, storyKey);
|
|
255747
255748
|
if (sdtMetadata)
|
|
255748
255749
|
run2.sdt = sdtMetadata;
|
|
255749
|
-
run2 = applyInlineRunProperties(run2, runProperties, converterContext);
|
|
255750
|
+
run2 = applyInlineRunProperties(run2, runProperties, converterContext, inlineRunProperties);
|
|
255750
255751
|
return run2;
|
|
255751
255752
|
}
|
|
255752
|
-
function tokenNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultSize, inheritedMarks, hyperlinkConfig, themeColors, sdtMetadata, runProperties, converterContext }) {
|
|
255753
|
+
function tokenNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultSize, inheritedMarks, hyperlinkConfig, themeColors, sdtMetadata, runProperties, inlineRunProperties, converterContext }) {
|
|
255753
255754
|
const token$1 = TOKEN_INLINE_TYPES.get(node2.type);
|
|
255754
255755
|
if (!token$1)
|
|
255755
255756
|
return null;
|
|
255756
|
-
|
|
255757
|
+
let run2 = {
|
|
255757
255758
|
text: "0",
|
|
255758
255759
|
token: token$1,
|
|
255759
255760
|
fontFamily: defaultFont,
|
|
@@ -255766,8 +255767,9 @@ function tokenNodeToRun({ node: node2, positions, storyKey, defaultFont, default
|
|
|
255766
255767
|
}
|
|
255767
255768
|
const nodeMarks = node2.marks ?? [];
|
|
255768
255769
|
const marksAsAttrs = Array.isArray(node2.attrs?.marksAsAttrs) ? node2.attrs.marksAsAttrs : [];
|
|
255769
|
-
|
|
255770
|
-
|
|
255770
|
+
const marks = [...nodeMarks.length > 0 ? nodeMarks : marksAsAttrs, ...inheritedMarks ?? []];
|
|
255771
|
+
applyMarksToRun(run2, marks, hyperlinkConfig, themeColors, undefined, true, storyKey);
|
|
255772
|
+
run2 = applyInlineRunProperties(run2, runProperties, converterContext, inlineRunProperties);
|
|
255771
255773
|
if (marksAsAttrs.length > 0)
|
|
255772
255774
|
run2._explicitFont = true;
|
|
255773
255775
|
if (sdtMetadata)
|
|
@@ -256758,7 +256760,7 @@ function paragraphToFlowBlocks({ para, nextBlockId, positions, storyKey, tracked
|
|
|
256758
256760
|
});
|
|
256759
256761
|
partIndex += 1;
|
|
256760
256762
|
};
|
|
256761
|
-
const visitNode = (node2, inheritedMarks = [], activeSdt, activeRunProperties, activeHidden = false) => {
|
|
256763
|
+
const visitNode = (node2, inheritedMarks = [], activeSdt, activeRunProperties, activeHidden = false, activeInlineRunProperties) => {
|
|
256762
256764
|
if (activeHidden && node2.type !== "run") {
|
|
256763
256765
|
suppressedByVanish = true;
|
|
256764
256766
|
return;
|
|
@@ -256777,6 +256779,7 @@ function paragraphToFlowBlocks({ para, nextBlockId, positions, storyKey, tracked
|
|
|
256777
256779
|
themeColors,
|
|
256778
256780
|
enableComments,
|
|
256779
256781
|
runProperties: activeRunProperties,
|
|
256782
|
+
inlineRunProperties: activeInlineRunProperties,
|
|
256780
256783
|
paragraphProperties: resolvedParagraphProperties,
|
|
256781
256784
|
converterContext,
|
|
256782
256785
|
visitNode,
|
|
@@ -257076,7 +257079,9 @@ function toFlowBlocks(pmDoc, options) {
|
|
|
257076
257079
|
};
|
|
257077
257080
|
const bodySectionProps = doc$12.attrs?.bodySectPr ?? doc$12.attrs?.sectPr;
|
|
257078
257081
|
const sectionRanges = options?.emitSectionBreaks ? analyzeSectionRanges(doc$12, bodySectionProps) : [];
|
|
257079
|
-
|
|
257082
|
+
const firstSectPr = sectionRanges[0]?.sectPr ?? bodySectionProps;
|
|
257083
|
+
converterContext.sectionDirection = converterContext.sectionDirection ?? resolveSectionDirectionFromSectPr(firstSectPr);
|
|
257084
|
+
converterContext.sectionDirectionContext = resolveSectionDirection(firstSectPr);
|
|
257080
257085
|
publishSectionMetadata(sectionRanges, options);
|
|
257081
257086
|
if (sectionRanges.length > 0 && sectionRanges[0]) {
|
|
257082
257087
|
const sectionBreak = createSectionBreakBlock(sectionRanges[0], nextBlockId, { isFirstSection: true });
|
|
@@ -285869,7 +285874,69 @@ menclose::after {
|
|
|
285869
285874
|
this.#onRebuild();
|
|
285870
285875
|
});
|
|
285871
285876
|
}
|
|
285872
|
-
}, Y_SORT_THRESHOLD_PX = 2, Y_SAME_LINE_THRESHOLD_PX = 3, HORIZONTAL_OVERLAP_THRESHOLD = 0.8, log = (...args$1) => {}, CLASS,
|
|
285877
|
+
}, Y_SORT_THRESHOLD_PX = 2, Y_SAME_LINE_THRESHOLD_PX = 3, HORIZONTAL_OVERLAP_THRESHOLD = 0.8, log = (...args$1) => {}, CLASS, DEFAULT_PAGE_DIRECTION = "ltr", DEFAULT_WRITING_MODE = "horizontal-tb", isToggleOn = (val) => {
|
|
285878
|
+
if (val === undefined || val === null)
|
|
285879
|
+
return true;
|
|
285880
|
+
if (val === "0" || val === 0 || val === false)
|
|
285881
|
+
return false;
|
|
285882
|
+
if (val === "false" || val === "off")
|
|
285883
|
+
return false;
|
|
285884
|
+
return true;
|
|
285885
|
+
}, writingModeFromTextDirection$1 = (val) => {
|
|
285886
|
+
if (typeof val !== "string")
|
|
285887
|
+
return;
|
|
285888
|
+
switch (val) {
|
|
285889
|
+
case "lrTb":
|
|
285890
|
+
case "lrTbV":
|
|
285891
|
+
case "tb":
|
|
285892
|
+
case "tbV":
|
|
285893
|
+
return "horizontal-tb";
|
|
285894
|
+
case "tbRl":
|
|
285895
|
+
case "tbRlV":
|
|
285896
|
+
case "rl":
|
|
285897
|
+
case "rlV":
|
|
285898
|
+
return "vertical-rl";
|
|
285899
|
+
case "btLr":
|
|
285900
|
+
case "lr":
|
|
285901
|
+
case "lrV":
|
|
285902
|
+
case "tbLrV":
|
|
285903
|
+
return "vertical-lr";
|
|
285904
|
+
default:
|
|
285905
|
+
return;
|
|
285906
|
+
}
|
|
285907
|
+
}, resolveSectionDirection = (sectPr) => {
|
|
285908
|
+
let pageDirection = DEFAULT_PAGE_DIRECTION;
|
|
285909
|
+
let writingMode = DEFAULT_WRITING_MODE;
|
|
285910
|
+
let rtlGutter = false;
|
|
285911
|
+
if (sectPr && typeof sectPr === "object") {
|
|
285912
|
+
const elements = sectPr.elements;
|
|
285913
|
+
if (Array.isArray(elements))
|
|
285914
|
+
for (const el of elements) {
|
|
285915
|
+
if (!el?.name)
|
|
285916
|
+
continue;
|
|
285917
|
+
const val = el.attributes?.["w:val"] ?? el.attributes?.val;
|
|
285918
|
+
if (el.name === "w:bidi" && isToggleOn(val)) {
|
|
285919
|
+
pageDirection = "rtl";
|
|
285920
|
+
continue;
|
|
285921
|
+
}
|
|
285922
|
+
if (el.name === "w:textDirection") {
|
|
285923
|
+
const mode = writingModeFromTextDirection$1(val);
|
|
285924
|
+
if (mode)
|
|
285925
|
+
writingMode = mode;
|
|
285926
|
+
continue;
|
|
285927
|
+
}
|
|
285928
|
+
if (el.name === "w:rtlGutter" && isToggleOn(val)) {
|
|
285929
|
+
rtlGutter = true;
|
|
285930
|
+
continue;
|
|
285931
|
+
}
|
|
285932
|
+
}
|
|
285933
|
+
}
|
|
285934
|
+
return {
|
|
285935
|
+
pageDirection,
|
|
285936
|
+
writingMode,
|
|
285937
|
+
rtlGutter
|
|
285938
|
+
};
|
|
285939
|
+
}, TWIPS_PER_INCH2 = 1440, PX_PER_PT2, VALID_TRACKED_MODES, DEFAULT_HYPERLINK_CONFIG, ATOMIC_INLINE_TYPES, TOKEN_INLINE_TYPES, isValidTrackedMode = (value) => {
|
|
285873
285940
|
return typeof value === "string" && VALID_TRACKED_MODES.includes(value);
|
|
285874
285941
|
}, isTextRun$4 = (run2) => {
|
|
285875
285942
|
return "text" in run2 && run2.kind !== "tab";
|
|
@@ -286474,68 +286541,6 @@ menclose::after {
|
|
|
286474
286541
|
mutated = true;
|
|
286475
286542
|
}
|
|
286476
286543
|
return mutated ? mirrored : indent2;
|
|
286477
|
-
}, DEFAULT_PAGE_DIRECTION = "ltr", DEFAULT_WRITING_MODE = "horizontal-tb", isToggleOn = (val) => {
|
|
286478
|
-
if (val === undefined || val === null)
|
|
286479
|
-
return true;
|
|
286480
|
-
if (val === "0" || val === 0 || val === false)
|
|
286481
|
-
return false;
|
|
286482
|
-
if (val === "false" || val === "off")
|
|
286483
|
-
return false;
|
|
286484
|
-
return true;
|
|
286485
|
-
}, writingModeFromTextDirection$1 = (val) => {
|
|
286486
|
-
if (typeof val !== "string")
|
|
286487
|
-
return;
|
|
286488
|
-
switch (val) {
|
|
286489
|
-
case "lrTb":
|
|
286490
|
-
case "lrTbV":
|
|
286491
|
-
case "tb":
|
|
286492
|
-
case "tbV":
|
|
286493
|
-
return "horizontal-tb";
|
|
286494
|
-
case "tbRl":
|
|
286495
|
-
case "tbRlV":
|
|
286496
|
-
case "rl":
|
|
286497
|
-
case "rlV":
|
|
286498
|
-
return "vertical-rl";
|
|
286499
|
-
case "btLr":
|
|
286500
|
-
case "lr":
|
|
286501
|
-
case "lrV":
|
|
286502
|
-
case "tbLrV":
|
|
286503
|
-
return "vertical-lr";
|
|
286504
|
-
default:
|
|
286505
|
-
return;
|
|
286506
|
-
}
|
|
286507
|
-
}, resolveSectionDirection = (sectPr) => {
|
|
286508
|
-
let pageDirection = DEFAULT_PAGE_DIRECTION;
|
|
286509
|
-
let writingMode = DEFAULT_WRITING_MODE;
|
|
286510
|
-
let rtlGutter = false;
|
|
286511
|
-
if (sectPr && typeof sectPr === "object") {
|
|
286512
|
-
const elements = sectPr.elements;
|
|
286513
|
-
if (Array.isArray(elements))
|
|
286514
|
-
for (const el of elements) {
|
|
286515
|
-
if (!el?.name)
|
|
286516
|
-
continue;
|
|
286517
|
-
const val = el.attributes?.["w:val"] ?? el.attributes?.val;
|
|
286518
|
-
if (el.name === "w:bidi" && isToggleOn(val)) {
|
|
286519
|
-
pageDirection = "rtl";
|
|
286520
|
-
continue;
|
|
286521
|
-
}
|
|
286522
|
-
if (el.name === "w:textDirection") {
|
|
286523
|
-
const mode = writingModeFromTextDirection$1(val);
|
|
286524
|
-
if (mode)
|
|
286525
|
-
writingMode = mode;
|
|
286526
|
-
continue;
|
|
286527
|
-
}
|
|
286528
|
-
if (el.name === "w:rtlGutter" && isToggleOn(val)) {
|
|
286529
|
-
rtlGutter = true;
|
|
286530
|
-
continue;
|
|
286531
|
-
}
|
|
286532
|
-
}
|
|
286533
|
-
}
|
|
286534
|
-
return {
|
|
286535
|
-
pageDirection,
|
|
286536
|
-
writingMode,
|
|
286537
|
-
rtlGutter
|
|
286538
|
-
};
|
|
286539
286544
|
}, writingModeFromTextDirection = (val) => {
|
|
286540
286545
|
switch (val) {
|
|
286541
286546
|
case "lrTb":
|
|
@@ -286706,7 +286711,7 @@ menclose::after {
|
|
|
286706
286711
|
resolvedParagraphProperties = paragraphProperties;
|
|
286707
286712
|
else
|
|
286708
286713
|
resolvedParagraphProperties = resolveParagraphProperties(converterContext, paragraphProperties, converterContext.tableInfo);
|
|
286709
|
-
const sectionContext = resolveSectionDirection(undefined);
|
|
286714
|
+
const sectionContext = converterContext?.sectionDirectionContext ?? resolveSectionDirection(undefined);
|
|
286710
286715
|
const directionContext = resolveParagraphDirection(resolvedParagraphProperties, sectionContext);
|
|
286711
286716
|
const normalizedDirection = directionContext.inlineDirection;
|
|
286712
286717
|
const isRtl = normalizedDirection === "rtl";
|
|
@@ -287375,7 +287380,31 @@ menclose::after {
|
|
|
287375
287380
|
if (!normalizedExisting || isAutoColorValue || isDefaultBlack)
|
|
287376
287381
|
run2.color = resolveAutoColor(backgroundColor);
|
|
287377
287382
|
}
|
|
287378
|
-
}, HiddenByVanishError, NotInlineNodeError,
|
|
287383
|
+
}, HiddenByVanishError, NotInlineNodeError, buildBidiContext = (runProperties) => {
|
|
287384
|
+
if (runProperties.rtl == null)
|
|
287385
|
+
return;
|
|
287386
|
+
return { rtl: runProperties.rtl === true };
|
|
287387
|
+
}, buildScriptContext = (runProperties) => {
|
|
287388
|
+
const cs = runProperties.cs;
|
|
287389
|
+
const lang = runProperties.lang;
|
|
287390
|
+
const hasLang = lang != null && (lang.val != null || lang.bidi != null || lang.eastAsia != null);
|
|
287391
|
+
if (cs == null && !hasLang)
|
|
287392
|
+
return;
|
|
287393
|
+
const ctx$1 = {};
|
|
287394
|
+
if (cs != null)
|
|
287395
|
+
ctx$1.complexScript = cs === true;
|
|
287396
|
+
if (hasLang) {
|
|
287397
|
+
const language = {};
|
|
287398
|
+
if (lang.val != null)
|
|
287399
|
+
language.default = lang.val;
|
|
287400
|
+
if (lang.bidi != null)
|
|
287401
|
+
language.complexScript = lang.bidi;
|
|
287402
|
+
if (lang.eastAsia != null)
|
|
287403
|
+
language.eastAsian = lang.eastAsia;
|
|
287404
|
+
ctx$1.language = language;
|
|
287405
|
+
}
|
|
287406
|
+
return ctx$1;
|
|
287407
|
+
}, applyInlineRunProperties = (run2, runProperties, converterContext, inlineRunProperties) => {
|
|
287379
287408
|
if (!runProperties)
|
|
287380
287409
|
return run2;
|
|
287381
287410
|
const runAttrs = computeRunAttrs(runProperties, converterContext);
|
|
@@ -287383,6 +287412,14 @@ menclose::after {
|
|
|
287383
287412
|
for (const key2 of Object.keys(runAttrs))
|
|
287384
287413
|
if (runAttrs[key2] !== undefined)
|
|
287385
287414
|
merged[key2] = runAttrs[key2];
|
|
287415
|
+
if (inlineRunProperties) {
|
|
287416
|
+
const bidi = buildBidiContext(inlineRunProperties);
|
|
287417
|
+
if (bidi)
|
|
287418
|
+
merged.bidi = bidi;
|
|
287419
|
+
const script = buildScriptContext(inlineRunProperties);
|
|
287420
|
+
if (script)
|
|
287421
|
+
merged.script = script;
|
|
287422
|
+
}
|
|
287386
287423
|
return merged;
|
|
287387
287424
|
}, buildSyntheticTextNode = (displayText, marks) => ({
|
|
287388
287425
|
type: "text",
|
|
@@ -293397,7 +293434,7 @@ menclose::after {
|
|
|
293397
293434
|
return;
|
|
293398
293435
|
console.log(...args$1);
|
|
293399
293436
|
}, 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;
|
|
293400
|
-
var
|
|
293437
|
+
var init_src_DLNvZ7Yw_es = __esm(() => {
|
|
293401
293438
|
init_rolldown_runtime_Bg48TavK_es();
|
|
293402
293439
|
init_SuperConverter_BInxZk0I_es();
|
|
293403
293440
|
init_jszip_C49i9kUs_es();
|
|
@@ -331458,7 +331495,7 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
331458
331495
|
|
|
331459
331496
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
331460
331497
|
var init_super_editor_es = __esm(() => {
|
|
331461
|
-
|
|
331498
|
+
init_src_DLNvZ7Yw_es();
|
|
331462
331499
|
init_SuperConverter_BInxZk0I_es();
|
|
331463
331500
|
init_jszip_C49i9kUs_es();
|
|
331464
331501
|
init_xml_js_CqGKpaft_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/mcp",
|
|
3
|
-
"version": "0.3.0-next.
|
|
3
|
+
"version": "0.3.0-next.77",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"@types/bun": "^1.3.8",
|
|
20
20
|
"@types/node": "22.19.2",
|
|
21
21
|
"typescript": "^5.9.2",
|
|
22
|
-
"@superdoc/
|
|
22
|
+
"@superdoc/document-api": "0.0.1",
|
|
23
23
|
"superdoc": "1.32.0",
|
|
24
|
-
"@superdoc/
|
|
24
|
+
"@superdoc/super-editor": "0.0.1"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|