@superdoc-dev/cli 0.8.0-next.93 → 0.8.0-next.94
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 +70 -68
- package/package.json +6 -6
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-DLNvZ7Yw.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) => {
|
|
@@ -265761,7 +265761,9 @@ function toFlowBlocks(pmDoc, options) {
|
|
|
265761
265761
|
};
|
|
265762
265762
|
const bodySectionProps = doc$12.attrs?.bodySectPr ?? doc$12.attrs?.sectPr;
|
|
265763
265763
|
const sectionRanges = options?.emitSectionBreaks ? analyzeSectionRanges(doc$12, bodySectionProps) : [];
|
|
265764
|
-
|
|
265764
|
+
const firstSectPr = sectionRanges[0]?.sectPr ?? bodySectionProps;
|
|
265765
|
+
converterContext.sectionDirection = converterContext.sectionDirection ?? resolveSectionDirectionFromSectPr(firstSectPr);
|
|
265766
|
+
converterContext.sectionDirectionContext = resolveSectionDirection(firstSectPr);
|
|
265765
265767
|
publishSectionMetadata(sectionRanges, options);
|
|
265766
265768
|
if (sectionRanges.length > 0 && sectionRanges[0]) {
|
|
265767
265769
|
const sectionBreak = createSectionBreakBlock(sectionRanges[0], nextBlockId, { isFirstSection: true });
|
|
@@ -294554,7 +294556,69 @@ menclose::after {
|
|
|
294554
294556
|
this.#onRebuild();
|
|
294555
294557
|
});
|
|
294556
294558
|
}
|
|
294557
|
-
}, Y_SORT_THRESHOLD_PX = 2, Y_SAME_LINE_THRESHOLD_PX = 3, HORIZONTAL_OVERLAP_THRESHOLD = 0.8, log2 = (...args$1) => {}, CLASS,
|
|
294559
|
+
}, Y_SORT_THRESHOLD_PX = 2, Y_SAME_LINE_THRESHOLD_PX = 3, HORIZONTAL_OVERLAP_THRESHOLD = 0.8, log2 = (...args$1) => {}, CLASS, DEFAULT_PAGE_DIRECTION = "ltr", DEFAULT_WRITING_MODE = "horizontal-tb", isToggleOn = (val) => {
|
|
294560
|
+
if (val === undefined || val === null)
|
|
294561
|
+
return true;
|
|
294562
|
+
if (val === "0" || val === 0 || val === false)
|
|
294563
|
+
return false;
|
|
294564
|
+
if (val === "false" || val === "off")
|
|
294565
|
+
return false;
|
|
294566
|
+
return true;
|
|
294567
|
+
}, writingModeFromTextDirection$1 = (val) => {
|
|
294568
|
+
if (typeof val !== "string")
|
|
294569
|
+
return;
|
|
294570
|
+
switch (val) {
|
|
294571
|
+
case "lrTb":
|
|
294572
|
+
case "lrTbV":
|
|
294573
|
+
case "tb":
|
|
294574
|
+
case "tbV":
|
|
294575
|
+
return "horizontal-tb";
|
|
294576
|
+
case "tbRl":
|
|
294577
|
+
case "tbRlV":
|
|
294578
|
+
case "rl":
|
|
294579
|
+
case "rlV":
|
|
294580
|
+
return "vertical-rl";
|
|
294581
|
+
case "btLr":
|
|
294582
|
+
case "lr":
|
|
294583
|
+
case "lrV":
|
|
294584
|
+
case "tbLrV":
|
|
294585
|
+
return "vertical-lr";
|
|
294586
|
+
default:
|
|
294587
|
+
return;
|
|
294588
|
+
}
|
|
294589
|
+
}, resolveSectionDirection = (sectPr) => {
|
|
294590
|
+
let pageDirection = DEFAULT_PAGE_DIRECTION;
|
|
294591
|
+
let writingMode = DEFAULT_WRITING_MODE;
|
|
294592
|
+
let rtlGutter = false;
|
|
294593
|
+
if (sectPr && typeof sectPr === "object") {
|
|
294594
|
+
const elements = sectPr.elements;
|
|
294595
|
+
if (Array.isArray(elements))
|
|
294596
|
+
for (const el of elements) {
|
|
294597
|
+
if (!el?.name)
|
|
294598
|
+
continue;
|
|
294599
|
+
const val = el.attributes?.["w:val"] ?? el.attributes?.val;
|
|
294600
|
+
if (el.name === "w:bidi" && isToggleOn(val)) {
|
|
294601
|
+
pageDirection = "rtl";
|
|
294602
|
+
continue;
|
|
294603
|
+
}
|
|
294604
|
+
if (el.name === "w:textDirection") {
|
|
294605
|
+
const mode = writingModeFromTextDirection$1(val);
|
|
294606
|
+
if (mode)
|
|
294607
|
+
writingMode = mode;
|
|
294608
|
+
continue;
|
|
294609
|
+
}
|
|
294610
|
+
if (el.name === "w:rtlGutter" && isToggleOn(val)) {
|
|
294611
|
+
rtlGutter = true;
|
|
294612
|
+
continue;
|
|
294613
|
+
}
|
|
294614
|
+
}
|
|
294615
|
+
}
|
|
294616
|
+
return {
|
|
294617
|
+
pageDirection,
|
|
294618
|
+
writingMode,
|
|
294619
|
+
rtlGutter
|
|
294620
|
+
};
|
|
294621
|
+
}, TWIPS_PER_INCH2 = 1440, PX_PER_PT2, VALID_TRACKED_MODES, DEFAULT_HYPERLINK_CONFIG, ATOMIC_INLINE_TYPES, TOKEN_INLINE_TYPES, isValidTrackedMode = (value) => {
|
|
294558
294622
|
return typeof value === "string" && VALID_TRACKED_MODES.includes(value);
|
|
294559
294623
|
}, isTextRun$4 = (run2) => {
|
|
294560
294624
|
return "text" in run2 && run2.kind !== "tab";
|
|
@@ -295159,68 +295223,6 @@ menclose::after {
|
|
|
295159
295223
|
mutated = true;
|
|
295160
295224
|
}
|
|
295161
295225
|
return mutated ? mirrored : indent2;
|
|
295162
|
-
}, DEFAULT_PAGE_DIRECTION = "ltr", DEFAULT_WRITING_MODE = "horizontal-tb", isToggleOn = (val) => {
|
|
295163
|
-
if (val === undefined || val === null)
|
|
295164
|
-
return true;
|
|
295165
|
-
if (val === "0" || val === 0 || val === false)
|
|
295166
|
-
return false;
|
|
295167
|
-
if (val === "false" || val === "off")
|
|
295168
|
-
return false;
|
|
295169
|
-
return true;
|
|
295170
|
-
}, writingModeFromTextDirection$1 = (val) => {
|
|
295171
|
-
if (typeof val !== "string")
|
|
295172
|
-
return;
|
|
295173
|
-
switch (val) {
|
|
295174
|
-
case "lrTb":
|
|
295175
|
-
case "lrTbV":
|
|
295176
|
-
case "tb":
|
|
295177
|
-
case "tbV":
|
|
295178
|
-
return "horizontal-tb";
|
|
295179
|
-
case "tbRl":
|
|
295180
|
-
case "tbRlV":
|
|
295181
|
-
case "rl":
|
|
295182
|
-
case "rlV":
|
|
295183
|
-
return "vertical-rl";
|
|
295184
|
-
case "btLr":
|
|
295185
|
-
case "lr":
|
|
295186
|
-
case "lrV":
|
|
295187
|
-
case "tbLrV":
|
|
295188
|
-
return "vertical-lr";
|
|
295189
|
-
default:
|
|
295190
|
-
return;
|
|
295191
|
-
}
|
|
295192
|
-
}, resolveSectionDirection = (sectPr) => {
|
|
295193
|
-
let pageDirection = DEFAULT_PAGE_DIRECTION;
|
|
295194
|
-
let writingMode = DEFAULT_WRITING_MODE;
|
|
295195
|
-
let rtlGutter = false;
|
|
295196
|
-
if (sectPr && typeof sectPr === "object") {
|
|
295197
|
-
const elements = sectPr.elements;
|
|
295198
|
-
if (Array.isArray(elements))
|
|
295199
|
-
for (const el of elements) {
|
|
295200
|
-
if (!el?.name)
|
|
295201
|
-
continue;
|
|
295202
|
-
const val = el.attributes?.["w:val"] ?? el.attributes?.val;
|
|
295203
|
-
if (el.name === "w:bidi" && isToggleOn(val)) {
|
|
295204
|
-
pageDirection = "rtl";
|
|
295205
|
-
continue;
|
|
295206
|
-
}
|
|
295207
|
-
if (el.name === "w:textDirection") {
|
|
295208
|
-
const mode = writingModeFromTextDirection$1(val);
|
|
295209
|
-
if (mode)
|
|
295210
|
-
writingMode = mode;
|
|
295211
|
-
continue;
|
|
295212
|
-
}
|
|
295213
|
-
if (el.name === "w:rtlGutter" && isToggleOn(val)) {
|
|
295214
|
-
rtlGutter = true;
|
|
295215
|
-
continue;
|
|
295216
|
-
}
|
|
295217
|
-
}
|
|
295218
|
-
}
|
|
295219
|
-
return {
|
|
295220
|
-
pageDirection,
|
|
295221
|
-
writingMode,
|
|
295222
|
-
rtlGutter
|
|
295223
|
-
};
|
|
295224
295226
|
}, writingModeFromTextDirection = (val) => {
|
|
295225
295227
|
switch (val) {
|
|
295226
295228
|
case "lrTb":
|
|
@@ -295391,7 +295393,7 @@ menclose::after {
|
|
|
295391
295393
|
resolvedParagraphProperties = paragraphProperties;
|
|
295392
295394
|
else
|
|
295393
295395
|
resolvedParagraphProperties = resolveParagraphProperties(converterContext, paragraphProperties, converterContext.tableInfo);
|
|
295394
|
-
const sectionContext = resolveSectionDirection(undefined);
|
|
295396
|
+
const sectionContext = converterContext?.sectionDirectionContext ?? resolveSectionDirection(undefined);
|
|
295395
295397
|
const directionContext = resolveParagraphDirection(resolvedParagraphProperties, sectionContext);
|
|
295396
295398
|
const normalizedDirection = directionContext.inlineDirection;
|
|
295397
295399
|
const isRtl = normalizedDirection === "rtl";
|
|
@@ -302114,7 +302116,7 @@ menclose::after {
|
|
|
302114
302116
|
return;
|
|
302115
302117
|
console.log(...args$1);
|
|
302116
302118
|
}, 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;
|
|
302117
|
-
var
|
|
302119
|
+
var init_src_DLNvZ7Yw_es = __esm(() => {
|
|
302118
302120
|
init_rolldown_runtime_Bg48TavK_es();
|
|
302119
302121
|
init_SuperConverter_BInxZk0I_es();
|
|
302120
302122
|
init_jszip_C49i9kUs_es();
|
|
@@ -340175,7 +340177,7 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
340175
340177
|
|
|
340176
340178
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
340177
340179
|
var init_super_editor_es = __esm(() => {
|
|
340178
|
-
|
|
340180
|
+
init_src_DLNvZ7Yw_es();
|
|
340179
340181
|
init_SuperConverter_BInxZk0I_es();
|
|
340180
340182
|
init_jszip_C49i9kUs_es();
|
|
340181
340183
|
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.94",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@superdoc-dev/cli-darwin-
|
|
38
|
-
"@superdoc-dev/cli-
|
|
39
|
-
"@superdoc-dev/cli-
|
|
40
|
-
"@superdoc-dev/cli-
|
|
41
|
-
"@superdoc-dev/cli-
|
|
37
|
+
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.94",
|
|
38
|
+
"@superdoc-dev/cli-linux-x64": "0.8.0-next.94",
|
|
39
|
+
"@superdoc-dev/cli-darwin-arm64": "0.8.0-next.94",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.8.0-next.94",
|
|
41
|
+
"@superdoc-dev/cli-linux-arm64": "0.8.0-next.94"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|