@superdoc-dev/cli 0.8.0-next.91 → 0.8.0-next.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +62 -25
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -208524,7 +208524,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
208524
208524
|
init_remark_gfm_BhnWr3yf_es();
|
|
208525
208525
|
});
|
|
208526
208526
|
|
|
208527
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
208527
|
+
// ../../packages/superdoc/dist/chunks/src-BdpJXQ5F.es.js
|
|
208528
208528
|
function deleteProps(obj, propOrProps) {
|
|
208529
208529
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
208530
208530
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -245740,11 +245740,12 @@ function resolveBookmarkTarget(doc$12, target) {
|
|
|
245740
245740
|
function nodePositionToPosition(doc$12, pos) {
|
|
245741
245741
|
const resolved = doc$12.resolve(pos);
|
|
245742
245742
|
for (let depth = resolved.depth;depth >= 0; depth--) {
|
|
245743
|
-
const
|
|
245743
|
+
const node3 = resolved.node(depth);
|
|
245744
|
+
const blockId = node3.attrs?.sdBlockId;
|
|
245744
245745
|
if (blockId)
|
|
245745
245746
|
return {
|
|
245746
245747
|
blockId,
|
|
245747
|
-
offset:
|
|
245748
|
+
offset: pmPositionToTextOffset(node3, resolved.start(depth) - 1, pos)
|
|
245748
245749
|
};
|
|
245749
245750
|
}
|
|
245750
245751
|
return {
|
|
@@ -246196,11 +246197,12 @@ function protectionClearEditingRestrictionAdapter(editor, _input, options) {
|
|
|
246196
246197
|
function pmPosToPosition(doc$12, pos) {
|
|
246197
246198
|
const resolved = doc$12.resolve(pos);
|
|
246198
246199
|
for (let depth = resolved.depth;depth >= 0; depth--) {
|
|
246199
|
-
const
|
|
246200
|
+
const node3 = resolved.node(depth);
|
|
246201
|
+
const blockId = node3.attrs?.sdBlockId;
|
|
246200
246202
|
if (blockId)
|
|
246201
246203
|
return {
|
|
246202
246204
|
blockId,
|
|
246203
|
-
offset:
|
|
246205
|
+
offset: pmPositionToTextOffset(node3, resolved.start(depth) - 1, pos)
|
|
246204
246206
|
};
|
|
246205
246207
|
}
|
|
246206
246208
|
return {
|
|
@@ -263350,7 +263352,7 @@ function extractCellPadding(cellAttrs) {
|
|
|
263350
263352
|
return;
|
|
263351
263353
|
return normalizeCellPaddingTopBottom(padding);
|
|
263352
263354
|
}
|
|
263353
|
-
function textNodeToRun({ node: node3, positions, storyKey, defaultFont, defaultSize, inheritedMarks = [], sdtMetadata, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, enableComments, runProperties, converterContext }) {
|
|
263355
|
+
function textNodeToRun({ node: node3, positions, storyKey, defaultFont, defaultSize, inheritedMarks = [], sdtMetadata, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, enableComments, runProperties, inlineRunProperties, converterContext }) {
|
|
263354
263356
|
let run2 = {
|
|
263355
263357
|
text: node3.text || "",
|
|
263356
263358
|
fontFamily: defaultFont,
|
|
@@ -263364,7 +263366,7 @@ function textNodeToRun({ node: node3, positions, storyKey, defaultFont, defaultS
|
|
|
263364
263366
|
applyMarksToRun(run2, [...node3.marks ?? [], ...inheritedMarks ?? []], hyperlinkConfig, themeColors, converterContext?.backgroundColor, enableComments, storyKey);
|
|
263365
263367
|
if (sdtMetadata)
|
|
263366
263368
|
run2.sdt = sdtMetadata;
|
|
263367
|
-
run2 = applyInlineRunProperties(run2, runProperties, converterContext);
|
|
263369
|
+
run2 = applyInlineRunProperties(run2, runProperties, converterContext, inlineRunProperties);
|
|
263368
263370
|
return run2;
|
|
263369
263371
|
}
|
|
263370
263372
|
function buildReferenceMarkerRun(displayText, params$1) {
|
|
@@ -263397,7 +263399,7 @@ function runNodeChildrenToRuns({ node: node3, inheritedMarks, sdtMetadata, conve
|
|
|
263397
263399
|
if (runProperties.vanish)
|
|
263398
263400
|
throw new HiddenByVanishError;
|
|
263399
263401
|
const resolvedRunProperties = resolveRunProperties(converterContext, runProperties, paragraphProperties, converterContext.tableInfo, false, false);
|
|
263400
|
-
node3.content?.forEach((child) => visitNode(child, mergedMarks, sdtMetadata, resolvedRunProperties, false));
|
|
263402
|
+
node3.content?.forEach((child) => visitNode(child, mergedMarks, sdtMetadata, resolvedRunProperties, false, runProperties));
|
|
263401
263403
|
}
|
|
263402
263404
|
function resolveSdtMetadata(input2) {
|
|
263403
263405
|
if (!input2)
|
|
@@ -264170,12 +264172,12 @@ function handleTableOfAuthoritiesNode(node3, context) {
|
|
|
264170
264172
|
sectionState.currentParagraphIndex++;
|
|
264171
264173
|
});
|
|
264172
264174
|
}
|
|
264173
|
-
function structuredContentNodeToBlocks({ node: node3, inheritedMarks, sdtMetadata, visitNode, runProperties }) {
|
|
264175
|
+
function structuredContentNodeToBlocks({ node: node3, inheritedMarks, sdtMetadata, visitNode, runProperties, inlineRunProperties }) {
|
|
264174
264176
|
const nextSdt = resolveNodeSdtMetadata(node3, "structuredContent") ?? sdtMetadata;
|
|
264175
|
-
node3.content?.forEach((child) => visitNode(child, inheritedMarks, nextSdt, runProperties, false));
|
|
264177
|
+
node3.content?.forEach((child) => visitNode(child, inheritedMarks, nextSdt, runProperties, false, inlineRunProperties));
|
|
264176
264178
|
}
|
|
264177
264179
|
function pageReferenceNodeToBlock(params$1) {
|
|
264178
|
-
const { node: node3, inheritedMarks, visitNode, sdtMetadata, positions, converterContext, paragraphProperties } = params$1;
|
|
264180
|
+
const { node: node3, inheritedMarks, visitNode, sdtMetadata, positions, converterContext, paragraphProperties, inlineRunProperties: parentInlineRunProperties } = params$1;
|
|
264179
264181
|
const instruction = getNodeInstruction(node3) || "";
|
|
264180
264182
|
const nodeAttrs = typeof node3.attrs === "object" && node3.attrs !== null ? node3.attrs : {};
|
|
264181
264183
|
const mergedMarks = [...Array.isArray(nodeAttrs.marksAsAttrs) ? nodeAttrs.marksAsAttrs : [], ...inheritedMarks ?? []];
|
|
@@ -264205,7 +264207,8 @@ function pageReferenceNodeToBlock(params$1) {
|
|
|
264205
264207
|
text: fallbackText
|
|
264206
264208
|
},
|
|
264207
264209
|
inheritedMarks: mergedMarks,
|
|
264208
|
-
runProperties: resolvedRunProperties
|
|
264210
|
+
runProperties: resolvedRunProperties,
|
|
264211
|
+
inlineRunProperties: runProperties
|
|
264209
264212
|
});
|
|
264210
264213
|
if (pageRefPos) {
|
|
264211
264214
|
tokenRun.pmStart = pageRefPos.start;
|
|
@@ -264229,7 +264232,7 @@ function pageReferenceNodeToBlock(params$1) {
|
|
|
264229
264232
|
tokenRun.sdt = sdtMetadata;
|
|
264230
264233
|
return tokenRun;
|
|
264231
264234
|
} else if (Array.isArray(node3.content))
|
|
264232
|
-
node3.content.forEach((child) => visitNode(child, mergedMarks, sdtMetadata, runProperties));
|
|
264235
|
+
node3.content.forEach((child) => visitNode(child, mergedMarks, sdtMetadata, runProperties, false, parentInlineRunProperties));
|
|
264233
264236
|
}
|
|
264234
264237
|
function fieldAnnotationNodeToRun({ node: node3, positions }) {
|
|
264235
264238
|
const fieldMetadata = resolveNodeSdtMetadata(node3, "fieldAnnotation");
|
|
@@ -264332,7 +264335,7 @@ function fieldAnnotationNodeToRun({ node: node3, positions }) {
|
|
|
264332
264335
|
return run2;
|
|
264333
264336
|
}
|
|
264334
264337
|
function bookmarkStartNodeToBlocks(params$1) {
|
|
264335
|
-
const { node: node3, positions, bookmarks, visitNode, inheritedMarks, sdtMetadata, runProperties, converterContext } = params$1;
|
|
264338
|
+
const { node: node3, positions, bookmarks, visitNode, inheritedMarks, sdtMetadata, runProperties, inlineRunProperties, converterContext } = params$1;
|
|
264336
264339
|
const nodeAttrs = typeof node3.attrs === "object" && node3.attrs !== null ? node3.attrs : {};
|
|
264337
264340
|
const bookmarkName = typeof nodeAttrs.name === "string" ? nodeAttrs.name : undefined;
|
|
264338
264341
|
if (bookmarkName && bookmarks) {
|
|
@@ -264362,7 +264365,7 @@ function bookmarkStartNodeToBlocks(params$1) {
|
|
|
264362
264365
|
converterContext.renderedBookmarkIds.add(bookmarkId);
|
|
264363
264366
|
}
|
|
264364
264367
|
if (Array.isArray(node3.content))
|
|
264365
|
-
node3.content.forEach((child) => visitNode(child, inheritedMarks, sdtMetadata, runProperties));
|
|
264368
|
+
node3.content.forEach((child) => visitNode(child, inheritedMarks, sdtMetadata, runProperties, false, inlineRunProperties));
|
|
264366
264369
|
return run2;
|
|
264367
264370
|
}
|
|
264368
264371
|
function bookmarkEndNodeToRun(params$1) {
|
|
@@ -264412,7 +264415,7 @@ function tabNodeToRun({ node: node3, positions, storyKey, tabOrdinal, paragraphA
|
|
|
264412
264415
|
applyMarksToRun(run2, marks, undefined, undefined, undefined, true, storyKey);
|
|
264413
264416
|
return run2;
|
|
264414
264417
|
}
|
|
264415
|
-
function noBreakHyphenNodeToRun({ node: node3, positions, storyKey, defaultFont, defaultSize, inheritedMarks = [], sdtMetadata, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, enableComments, runProperties, converterContext }) {
|
|
264418
|
+
function noBreakHyphenNodeToRun({ node: node3, positions, storyKey, defaultFont, defaultSize, inheritedMarks = [], sdtMetadata, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, enableComments, runProperties, inlineRunProperties, converterContext }) {
|
|
264416
264419
|
let run2 = {
|
|
264417
264420
|
text: NON_BREAKING_HYPHEN,
|
|
264418
264421
|
fontFamily: defaultFont,
|
|
@@ -264426,14 +264429,14 @@ function noBreakHyphenNodeToRun({ node: node3, positions, storyKey, defaultFont,
|
|
|
264426
264429
|
applyMarksToRun(run2, [...node3.marks ?? [], ...inheritedMarks ?? []], hyperlinkConfig, themeColors, converterContext?.backgroundColor, enableComments, storyKey);
|
|
264427
264430
|
if (sdtMetadata)
|
|
264428
264431
|
run2.sdt = sdtMetadata;
|
|
264429
|
-
run2 = applyInlineRunProperties(run2, runProperties, converterContext);
|
|
264432
|
+
run2 = applyInlineRunProperties(run2, runProperties, converterContext, inlineRunProperties);
|
|
264430
264433
|
return run2;
|
|
264431
264434
|
}
|
|
264432
|
-
function tokenNodeToRun({ node: node3, positions, storyKey, defaultFont, defaultSize, inheritedMarks, hyperlinkConfig, themeColors, sdtMetadata, runProperties, converterContext }) {
|
|
264435
|
+
function tokenNodeToRun({ node: node3, positions, storyKey, defaultFont, defaultSize, inheritedMarks, hyperlinkConfig, themeColors, sdtMetadata, runProperties, inlineRunProperties, converterContext }) {
|
|
264433
264436
|
const token$1 = TOKEN_INLINE_TYPES.get(node3.type);
|
|
264434
264437
|
if (!token$1)
|
|
264435
264438
|
return null;
|
|
264436
|
-
|
|
264439
|
+
let run2 = {
|
|
264437
264440
|
text: "0",
|
|
264438
264441
|
token: token$1,
|
|
264439
264442
|
fontFamily: defaultFont,
|
|
@@ -264446,8 +264449,9 @@ function tokenNodeToRun({ node: node3, positions, storyKey, defaultFont, default
|
|
|
264446
264449
|
}
|
|
264447
264450
|
const nodeMarks = node3.marks ?? [];
|
|
264448
264451
|
const marksAsAttrs = Array.isArray(node3.attrs?.marksAsAttrs) ? node3.attrs.marksAsAttrs : [];
|
|
264449
|
-
|
|
264450
|
-
|
|
264452
|
+
const marks = [...nodeMarks.length > 0 ? nodeMarks : marksAsAttrs, ...inheritedMarks ?? []];
|
|
264453
|
+
applyMarksToRun(run2, marks, hyperlinkConfig, themeColors, undefined, true, storyKey);
|
|
264454
|
+
run2 = applyInlineRunProperties(run2, runProperties, converterContext, inlineRunProperties);
|
|
264451
264455
|
if (marksAsAttrs.length > 0)
|
|
264452
264456
|
run2._explicitFont = true;
|
|
264453
264457
|
if (sdtMetadata)
|
|
@@ -265438,7 +265442,7 @@ function paragraphToFlowBlocks({ para, nextBlockId, positions, storyKey, tracked
|
|
|
265438
265442
|
});
|
|
265439
265443
|
partIndex += 1;
|
|
265440
265444
|
};
|
|
265441
|
-
const visitNode = (node3, inheritedMarks = [], activeSdt, activeRunProperties, activeHidden = false) => {
|
|
265445
|
+
const visitNode = (node3, inheritedMarks = [], activeSdt, activeRunProperties, activeHidden = false, activeInlineRunProperties) => {
|
|
265442
265446
|
if (activeHidden && node3.type !== "run") {
|
|
265443
265447
|
suppressedByVanish = true;
|
|
265444
265448
|
return;
|
|
@@ -265457,6 +265461,7 @@ function paragraphToFlowBlocks({ para, nextBlockId, positions, storyKey, tracked
|
|
|
265457
265461
|
themeColors,
|
|
265458
265462
|
enableComments,
|
|
265459
265463
|
runProperties: activeRunProperties,
|
|
265464
|
+
inlineRunProperties: activeInlineRunProperties,
|
|
265460
265465
|
paragraphProperties: resolvedParagraphProperties,
|
|
265461
265466
|
converterContext,
|
|
265462
265467
|
visitNode,
|
|
@@ -296055,7 +296060,31 @@ menclose::after {
|
|
|
296055
296060
|
if (!normalizedExisting || isAutoColorValue || isDefaultBlack)
|
|
296056
296061
|
run2.color = resolveAutoColor(backgroundColor);
|
|
296057
296062
|
}
|
|
296058
|
-
}, HiddenByVanishError, NotInlineNodeError,
|
|
296063
|
+
}, HiddenByVanishError, NotInlineNodeError, buildBidiContext = (runProperties) => {
|
|
296064
|
+
if (runProperties.rtl == null)
|
|
296065
|
+
return;
|
|
296066
|
+
return { rtl: runProperties.rtl === true };
|
|
296067
|
+
}, buildScriptContext = (runProperties) => {
|
|
296068
|
+
const cs = runProperties.cs;
|
|
296069
|
+
const lang = runProperties.lang;
|
|
296070
|
+
const hasLang = lang != null && (lang.val != null || lang.bidi != null || lang.eastAsia != null);
|
|
296071
|
+
if (cs == null && !hasLang)
|
|
296072
|
+
return;
|
|
296073
|
+
const ctx$1 = {};
|
|
296074
|
+
if (cs != null)
|
|
296075
|
+
ctx$1.complexScript = cs === true;
|
|
296076
|
+
if (hasLang) {
|
|
296077
|
+
const language = {};
|
|
296078
|
+
if (lang.val != null)
|
|
296079
|
+
language.default = lang.val;
|
|
296080
|
+
if (lang.bidi != null)
|
|
296081
|
+
language.complexScript = lang.bidi;
|
|
296082
|
+
if (lang.eastAsia != null)
|
|
296083
|
+
language.eastAsian = lang.eastAsia;
|
|
296084
|
+
ctx$1.language = language;
|
|
296085
|
+
}
|
|
296086
|
+
return ctx$1;
|
|
296087
|
+
}, applyInlineRunProperties = (run2, runProperties, converterContext, inlineRunProperties) => {
|
|
296059
296088
|
if (!runProperties)
|
|
296060
296089
|
return run2;
|
|
296061
296090
|
const runAttrs = computeRunAttrs(runProperties, converterContext);
|
|
@@ -296063,6 +296092,14 @@ menclose::after {
|
|
|
296063
296092
|
for (const key2 of Object.keys(runAttrs))
|
|
296064
296093
|
if (runAttrs[key2] !== undefined)
|
|
296065
296094
|
merged[key2] = runAttrs[key2];
|
|
296095
|
+
if (inlineRunProperties) {
|
|
296096
|
+
const bidi = buildBidiContext(inlineRunProperties);
|
|
296097
|
+
if (bidi)
|
|
296098
|
+
merged.bidi = bidi;
|
|
296099
|
+
const script = buildScriptContext(inlineRunProperties);
|
|
296100
|
+
if (script)
|
|
296101
|
+
merged.script = script;
|
|
296102
|
+
}
|
|
296066
296103
|
return merged;
|
|
296067
296104
|
}, buildSyntheticTextNode = (displayText, marks) => ({
|
|
296068
296105
|
type: "text",
|
|
@@ -302077,7 +302114,7 @@ menclose::after {
|
|
|
302077
302114
|
return;
|
|
302078
302115
|
console.log(...args$1);
|
|
302079
302116
|
}, 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;
|
|
302080
|
-
var
|
|
302117
|
+
var init_src_BdpJXQ5F_es = __esm(() => {
|
|
302081
302118
|
init_rolldown_runtime_Bg48TavK_es();
|
|
302082
302119
|
init_SuperConverter_BInxZk0I_es();
|
|
302083
302120
|
init_jszip_C49i9kUs_es();
|
|
@@ -340138,7 +340175,7 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
340138
340175
|
|
|
340139
340176
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
340140
340177
|
var init_super_editor_es = __esm(() => {
|
|
340141
|
-
|
|
340178
|
+
init_src_BdpJXQ5F_es();
|
|
340142
340179
|
init_SuperConverter_BInxZk0I_es();
|
|
340143
340180
|
init_jszip_C49i9kUs_es();
|
|
340144
340181
|
init_xml_js_CqGKpaft_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.8.0-next.
|
|
3
|
+
"version": "0.8.0-next.93",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
|
-
"@superdoc/super-editor": "0.0.1",
|
|
29
28
|
"@superdoc/pm-adapter": "0.0.0",
|
|
29
|
+
"@superdoc/super-editor": "0.0.1",
|
|
30
30
|
"superdoc": "1.32.0"
|
|
31
31
|
},
|
|
32
32
|
"module": "src/index.ts",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@superdoc-dev/cli-darwin-arm64": "0.8.0-next.
|
|
38
|
-
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.
|
|
39
|
-
"@superdoc-dev/cli-linux-
|
|
40
|
-
"@superdoc-dev/cli-linux-
|
|
41
|
-
"@superdoc-dev/cli-windows-x64": "0.8.0-next.
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.8.0-next.93",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.93",
|
|
39
|
+
"@superdoc-dev/cli-linux-arm64": "0.8.0-next.93",
|
|
40
|
+
"@superdoc-dev/cli-linux-x64": "0.8.0-next.93",
|
|
41
|
+
"@superdoc-dev/cli-windows-x64": "0.8.0-next.93"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|