@superdoc-dev/cli 0.8.0-next.87 → 0.8.0-next.88
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 +101 -36
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -208407,7 +208407,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
208407
208407
|
init_remark_gfm_BhnWr3yf_es();
|
|
208408
208408
|
});
|
|
208409
208409
|
|
|
208410
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
208410
|
+
// ../../packages/superdoc/dist/chunks/src-DOdRGHiA.es.js
|
|
208411
208411
|
function deleteProps(obj, propOrProps) {
|
|
208412
208412
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
208413
208413
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -294792,6 +294792,99 @@ menclose::after {
|
|
|
294792
294792
|
mutated = true;
|
|
294793
294793
|
}
|
|
294794
294794
|
return mutated ? mirrored : indent2;
|
|
294795
|
+
}, DEFAULT_PAGE_DIRECTION = "ltr", DEFAULT_WRITING_MODE = "horizontal-tb", isToggleOn = (val) => {
|
|
294796
|
+
if (val === undefined || val === null)
|
|
294797
|
+
return true;
|
|
294798
|
+
if (val === "0" || val === 0 || val === false)
|
|
294799
|
+
return false;
|
|
294800
|
+
if (val === "false" || val === "off")
|
|
294801
|
+
return false;
|
|
294802
|
+
return true;
|
|
294803
|
+
}, writingModeFromTextDirection$1 = (val) => {
|
|
294804
|
+
if (typeof val !== "string")
|
|
294805
|
+
return;
|
|
294806
|
+
switch (val) {
|
|
294807
|
+
case "lrTb":
|
|
294808
|
+
case "lrTbV":
|
|
294809
|
+
case "tb":
|
|
294810
|
+
case "tbV":
|
|
294811
|
+
return "horizontal-tb";
|
|
294812
|
+
case "tbRl":
|
|
294813
|
+
case "tbRlV":
|
|
294814
|
+
case "rl":
|
|
294815
|
+
case "rlV":
|
|
294816
|
+
return "vertical-rl";
|
|
294817
|
+
case "btLr":
|
|
294818
|
+
case "lr":
|
|
294819
|
+
case "lrV":
|
|
294820
|
+
case "tbLrV":
|
|
294821
|
+
return "vertical-lr";
|
|
294822
|
+
default:
|
|
294823
|
+
return;
|
|
294824
|
+
}
|
|
294825
|
+
}, resolveSectionDirection = (sectPr) => {
|
|
294826
|
+
let pageDirection = DEFAULT_PAGE_DIRECTION;
|
|
294827
|
+
let writingMode = DEFAULT_WRITING_MODE;
|
|
294828
|
+
let rtlGutter = false;
|
|
294829
|
+
if (sectPr && typeof sectPr === "object") {
|
|
294830
|
+
const elements = sectPr.elements;
|
|
294831
|
+
if (Array.isArray(elements))
|
|
294832
|
+
for (const el of elements) {
|
|
294833
|
+
if (!el?.name)
|
|
294834
|
+
continue;
|
|
294835
|
+
const val = el.attributes?.["w:val"] ?? el.attributes?.val;
|
|
294836
|
+
if (el.name === "w:bidi" && isToggleOn(val)) {
|
|
294837
|
+
pageDirection = "rtl";
|
|
294838
|
+
continue;
|
|
294839
|
+
}
|
|
294840
|
+
if (el.name === "w:textDirection") {
|
|
294841
|
+
const mode = writingModeFromTextDirection$1(val);
|
|
294842
|
+
if (mode)
|
|
294843
|
+
writingMode = mode;
|
|
294844
|
+
continue;
|
|
294845
|
+
}
|
|
294846
|
+
if (el.name === "w:rtlGutter" && isToggleOn(val)) {
|
|
294847
|
+
rtlGutter = true;
|
|
294848
|
+
continue;
|
|
294849
|
+
}
|
|
294850
|
+
}
|
|
294851
|
+
}
|
|
294852
|
+
return {
|
|
294853
|
+
pageDirection,
|
|
294854
|
+
writingMode,
|
|
294855
|
+
rtlGutter
|
|
294856
|
+
};
|
|
294857
|
+
}, writingModeFromTextDirection = (val) => {
|
|
294858
|
+
switch (val) {
|
|
294859
|
+
case "lrTb":
|
|
294860
|
+
case "lrTbV":
|
|
294861
|
+
case "tb":
|
|
294862
|
+
case "tbV":
|
|
294863
|
+
return "horizontal-tb";
|
|
294864
|
+
case "tbRl":
|
|
294865
|
+
case "tbRlV":
|
|
294866
|
+
case "rl":
|
|
294867
|
+
case "rlV":
|
|
294868
|
+
return "vertical-rl";
|
|
294869
|
+
case "btLr":
|
|
294870
|
+
case "lr":
|
|
294871
|
+
case "lrV":
|
|
294872
|
+
case "tbLrV":
|
|
294873
|
+
return "vertical-lr";
|
|
294874
|
+
default:
|
|
294875
|
+
return;
|
|
294876
|
+
}
|
|
294877
|
+
}, resolveParagraphDirection = (paragraphProperties, parentSection, parentCell) => {
|
|
294878
|
+
let inlineDirection;
|
|
294879
|
+
if (paragraphProperties?.rightToLeft === true)
|
|
294880
|
+
inlineDirection = "rtl";
|
|
294881
|
+
else if (paragraphProperties?.rightToLeft === false)
|
|
294882
|
+
inlineDirection = "ltr";
|
|
294883
|
+
const writingMode = writingModeFromTextDirection(paragraphProperties?.textDirection) ?? parentCell?.writingMode ?? parentSection.writingMode;
|
|
294884
|
+
return {
|
|
294885
|
+
inlineDirection,
|
|
294886
|
+
writingMode
|
|
294887
|
+
};
|
|
294795
294888
|
}, DEFAULT_DECIMAL_SEPARATOR$1 = ".", DEFAULT_TAB_INTERVAL_TWIPS$1 = 720, normalizeColor$1 = (value) => {
|
|
294796
294889
|
if (typeof value !== "string")
|
|
294797
294890
|
return;
|
|
@@ -294809,37 +294902,6 @@ menclose::after {
|
|
|
294809
294902
|
if (Object.prototype.hasOwnProperty.call(obj, key2))
|
|
294810
294903
|
clone[key2] = deepClone3(obj[key2]);
|
|
294811
294904
|
return clone;
|
|
294812
|
-
}, inferDirectionFromRuns = (para) => {
|
|
294813
|
-
const content3 = Array.isArray(para.content) ? para.content : [];
|
|
294814
|
-
let hasExplicitRtl = false;
|
|
294815
|
-
let hasExplicitLtr = false;
|
|
294816
|
-
for (const node3 of content3) {
|
|
294817
|
-
if (node3?.type !== "run")
|
|
294818
|
-
continue;
|
|
294819
|
-
const runProps = node3.attrs?.runProperties ?? {};
|
|
294820
|
-
const runDirection = runProps.rightToLeft ?? runProps.rtl;
|
|
294821
|
-
if (runDirection === true) {
|
|
294822
|
-
hasExplicitRtl = true;
|
|
294823
|
-
continue;
|
|
294824
|
-
}
|
|
294825
|
-
if (runDirection === false)
|
|
294826
|
-
hasExplicitLtr = true;
|
|
294827
|
-
}
|
|
294828
|
-
if (!hasExplicitRtl && !hasExplicitLtr)
|
|
294829
|
-
return;
|
|
294830
|
-
if (hasExplicitLtr)
|
|
294831
|
-
return;
|
|
294832
|
-
return "rtl";
|
|
294833
|
-
}, resolveEffectiveParagraphDirection = (para, resolvedParagraphProperties, _sectionDirection, docDefaultsDirection) => {
|
|
294834
|
-
if (resolvedParagraphProperties.rightToLeft === true)
|
|
294835
|
-
return "rtl";
|
|
294836
|
-
if (resolvedParagraphProperties.rightToLeft === false)
|
|
294837
|
-
return "ltr";
|
|
294838
|
-
const inferredFromRuns = inferDirectionFromRuns(para);
|
|
294839
|
-
if (inferredFromRuns)
|
|
294840
|
-
return inferredFromRuns;
|
|
294841
|
-
if (docDefaultsDirection)
|
|
294842
|
-
return docDefaultsDirection;
|
|
294843
294905
|
}, normalizeIndentTwipsToPx = (indent2) => {
|
|
294844
294906
|
if (!indent2)
|
|
294845
294907
|
return;
|
|
@@ -294962,7 +295024,9 @@ menclose::after {
|
|
|
294962
295024
|
resolvedParagraphProperties = paragraphProperties;
|
|
294963
295025
|
else
|
|
294964
295026
|
resolvedParagraphProperties = resolveParagraphProperties(converterContext, paragraphProperties, converterContext.tableInfo);
|
|
294965
|
-
const
|
|
295027
|
+
const sectionContext = resolveSectionDirection(undefined);
|
|
295028
|
+
const directionContext = resolveParagraphDirection(resolvedParagraphProperties, sectionContext);
|
|
295029
|
+
const normalizedDirection = directionContext.inlineDirection;
|
|
294966
295030
|
const isRtl = normalizedDirection === "rtl";
|
|
294967
295031
|
const normalizedSpacing = normalizeParagraphSpacing(resolvedParagraphProperties.spacing, Boolean(resolvedParagraphProperties.numberingProperties));
|
|
294968
295032
|
const normalizedIndentBase = normalizeIndentTwipsToPx(resolveLogicalIndentToPhysical(resolvedParagraphProperties.indent, normalizedDirection));
|
|
@@ -294996,7 +295060,8 @@ menclose::after {
|
|
|
294996
295060
|
keepLines: resolvedParagraphProperties.keepLines,
|
|
294997
295061
|
floatAlignment,
|
|
294998
295062
|
pageBreakBefore: resolvedParagraphProperties.pageBreakBefore,
|
|
294999
|
-
...normalizedDirection ? { direction: normalizedDirection } : {}
|
|
295063
|
+
...normalizedDirection ? { direction: normalizedDirection } : {},
|
|
295064
|
+
directionContext
|
|
295000
295065
|
};
|
|
295001
295066
|
if (normalizedNumberingProperties && normalizedListRendering) {
|
|
295002
295067
|
const markerRunAttrs = computeRunAttrs(resolveRunProperties(converterContext, resolvedParagraphProperties.runProperties, resolvedParagraphProperties, converterContext.tableInfo, true, Boolean(paragraphProperties.numberingProperties)), converterContext);
|
|
@@ -301650,7 +301715,7 @@ menclose::after {
|
|
|
301650
301715
|
return;
|
|
301651
301716
|
console.log(...args$1);
|
|
301652
301717
|
}, 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;
|
|
301653
|
-
var
|
|
301718
|
+
var init_src_DOdRGHiA_es = __esm(() => {
|
|
301654
301719
|
init_rolldown_runtime_Bg48TavK_es();
|
|
301655
301720
|
init_SuperConverter_BecdrRIX_es();
|
|
301656
301721
|
init_jszip_C49i9kUs_es();
|
|
@@ -339544,7 +339609,7 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
339544
339609
|
|
|
339545
339610
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
339546
339611
|
var init_super_editor_es = __esm(() => {
|
|
339547
|
-
|
|
339612
|
+
init_src_DOdRGHiA_es();
|
|
339548
339613
|
init_SuperConverter_BecdrRIX_es();
|
|
339549
339614
|
init_jszip_C49i9kUs_es();
|
|
339550
339615
|
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.88",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
|
+
"superdoc": "1.31.0",
|
|
28
29
|
"@superdoc/pm-adapter": "0.0.0",
|
|
29
|
-
"@superdoc/super-editor": "0.0.1"
|
|
30
|
-
"superdoc": "1.31.0"
|
|
30
|
+
"@superdoc/super-editor": "0.0.1"
|
|
31
31
|
},
|
|
32
32
|
"module": "src/index.ts",
|
|
33
33
|
"publishConfig": {
|
|
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.88",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.88",
|
|
39
|
+
"@superdoc-dev/cli-linux-arm64": "0.8.0-next.88",
|
|
40
|
+
"@superdoc-dev/cli-linux-x64": "0.8.0-next.88",
|
|
41
|
+
"@superdoc-dev/cli-windows-x64": "0.8.0-next.88"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|