@superdoc-dev/cli 0.5.0-next.56 → 0.5.0-next.57
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 +56 -26
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -203879,7 +203879,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
203879
203879
|
init_remark_gfm_BhnWr3yf_es();
|
|
203880
203880
|
});
|
|
203881
203881
|
|
|
203882
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
203882
|
+
// ../../packages/superdoc/dist/chunks/src-8ohzSIPE.es.js
|
|
203883
203883
|
function deleteProps(obj, propOrProps) {
|
|
203884
203884
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
203885
203885
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -249287,7 +249287,7 @@ function sliceRunsForLine(block, line) {
|
|
|
249287
249287
|
function measureCharacterX(block, line, charOffset, availableWidthOverride, alignmentOverride) {
|
|
249288
249288
|
const ctx$1 = getMeasurementContext();
|
|
249289
249289
|
const availableWidth = availableWidthOverride ?? line.maxWidth ?? line.width;
|
|
249290
|
-
const justify = getJustifyAdjustment(block, line, availableWidth, alignmentOverride);
|
|
249290
|
+
const justify = getJustifyAdjustment(block, line, availableWidth, alignmentOverride, undefined, undefined, lineContainsManualTabWithoutSegments(block, line));
|
|
249291
249291
|
const alignment$1 = alignmentOverride ?? (block.kind === "paragraph" ? block.attrs?.alignment : undefined);
|
|
249292
249292
|
const renderedLineWidth = alignment$1 === "justify" && justify.extraPerSpace !== 0 ? availableWidth : line.width;
|
|
249293
249293
|
const hasExplicitPositioning = line.segments?.some((seg) => seg.x !== undefined);
|
|
@@ -249416,7 +249416,7 @@ function charOffsetToPm(block, line, charOffset, fallbackPmStart) {
|
|
|
249416
249416
|
function findCharacterAtX(block, line, x, pmStart, availableWidthOverride, alignmentOverride) {
|
|
249417
249417
|
const ctx$1 = getMeasurementContext();
|
|
249418
249418
|
const availableWidth = availableWidthOverride ?? line.maxWidth ?? line.width;
|
|
249419
|
-
const justify = getJustifyAdjustment(block, line, availableWidth, alignmentOverride);
|
|
249419
|
+
const justify = getJustifyAdjustment(block, line, availableWidth, alignmentOverride, undefined, undefined, lineContainsManualTabWithoutSegments(block, line));
|
|
249420
249420
|
const alignment$1 = alignmentOverride ?? (block.kind === "paragraph" ? block.attrs?.alignment : undefined);
|
|
249421
249421
|
const renderedLineWidth = alignment$1 === "justify" ? line.width + Math.max(0, availableWidth - line.width) : line.width;
|
|
249422
249422
|
const hasExplicitPositioning = line.segments?.some((seg) => seg.x !== undefined);
|
|
@@ -275990,7 +275990,7 @@ var Node$13 = class Node$14 {
|
|
|
275990
275990
|
}
|
|
275991
275991
|
element3.style.textAlign = resolveTextAlign(attrs?.alignment, rtl);
|
|
275992
275992
|
return rtl;
|
|
275993
|
-
}, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, MATHML_NS$
|
|
275993
|
+
}, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, MATHML_NS$6 = "http://www.w3.org/1998/Math/MathML", OPERATOR_CHARS, convertMathRun = (node3, doc$12) => {
|
|
275994
275994
|
const elements = node3.elements ?? [];
|
|
275995
275995
|
let text5 = "";
|
|
275996
275996
|
for (const child of elements)
|
|
@@ -276004,61 +276004,77 @@ var Node$13 = class Node$14 {
|
|
|
276004
276004
|
return null;
|
|
276005
276005
|
const isNormalText = elements.find((el$1) => el$1.name === "m:rPr")?.elements?.some((el$1) => el$1.name === "m:nor") ?? false;
|
|
276006
276006
|
const tag = classifyMathText(text5);
|
|
276007
|
-
const el = doc$12.createElementNS(MATHML_NS$
|
|
276007
|
+
const el = doc$12.createElementNS(MATHML_NS$6, tag);
|
|
276008
276008
|
el.textContent = text5;
|
|
276009
276009
|
if (tag === "mi" && isNormalText)
|
|
276010
276010
|
el.setAttribute("mathvariant", "normal");
|
|
276011
276011
|
return el;
|
|
276012
|
-
}, MATHML_NS$
|
|
276012
|
+
}, MATHML_NS$5 = "http://www.w3.org/1998/Math/MathML", convertFraction = (node3, doc$12, convertChildren) => {
|
|
276013
276013
|
const elements = node3.elements ?? [];
|
|
276014
276014
|
const num = elements.find((e) => e.name === "m:num");
|
|
276015
276015
|
const den = elements.find((e) => e.name === "m:den");
|
|
276016
|
-
const frac = doc$12.createElementNS(MATHML_NS$
|
|
276017
|
-
const numRow = doc$12.createElementNS(MATHML_NS$
|
|
276016
|
+
const frac = doc$12.createElementNS(MATHML_NS$5, "mfrac");
|
|
276017
|
+
const numRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
|
|
276018
276018
|
numRow.appendChild(convertChildren(num?.elements ?? []));
|
|
276019
276019
|
frac.appendChild(numRow);
|
|
276020
|
-
const denRow = doc$12.createElementNS(MATHML_NS$
|
|
276020
|
+
const denRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
|
|
276021
276021
|
denRow.appendChild(convertChildren(den?.elements ?? []));
|
|
276022
276022
|
frac.appendChild(denRow);
|
|
276023
276023
|
return frac;
|
|
276024
|
-
}, MATHML_NS$
|
|
276024
|
+
}, MATHML_NS$4 = "http://www.w3.org/1998/Math/MathML", convertBar = (node3, doc$12, convertChildren) => {
|
|
276025
276025
|
const elements = node3.elements ?? [];
|
|
276026
276026
|
const isUnder = elements.find((e) => e.name === "m:barPr")?.elements?.find((e) => e.name === "m:pos")?.attributes?.["m:val"] !== "top";
|
|
276027
276027
|
const base5 = elements.find((e) => e.name === "m:e");
|
|
276028
|
-
const wrapper = doc$12.createElementNS(MATHML_NS$
|
|
276028
|
+
const wrapper = doc$12.createElementNS(MATHML_NS$4, isUnder ? "munder" : "mover");
|
|
276029
276029
|
const baseContent = convertChildren(base5?.elements ?? []);
|
|
276030
|
-
const mrow = doc$12.createElementNS(MATHML_NS$
|
|
276030
|
+
const mrow = doc$12.createElementNS(MATHML_NS$4, "mrow");
|
|
276031
276031
|
mrow.appendChild(baseContent);
|
|
276032
276032
|
wrapper.appendChild(mrow);
|
|
276033
|
-
const accent = doc$12.createElementNS(MATHML_NS$
|
|
276033
|
+
const accent = doc$12.createElementNS(MATHML_NS$4, "mo");
|
|
276034
276034
|
accent.setAttribute("stretchy", "true");
|
|
276035
276035
|
accent.textContent = "‾";
|
|
276036
276036
|
wrapper.appendChild(accent);
|
|
276037
276037
|
return wrapper;
|
|
276038
|
-
}, MATHML_NS$
|
|
276038
|
+
}, MATHML_NS$3 = "http://www.w3.org/1998/Math/MathML", convertSubscript = (node3, doc$12, convertChildren) => {
|
|
276039
276039
|
const elements = node3.elements ?? [];
|
|
276040
276040
|
const base5 = elements.find((e) => e.name === "m:e");
|
|
276041
276041
|
const sub = elements.find((e) => e.name === "m:sub");
|
|
276042
|
-
const msub = doc$12.createElementNS(MATHML_NS$
|
|
276043
|
-
const baseRow = doc$12.createElementNS(MATHML_NS$
|
|
276042
|
+
const msub = doc$12.createElementNS(MATHML_NS$3, "msub");
|
|
276043
|
+
const baseRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
|
|
276044
276044
|
baseRow.appendChild(convertChildren(base5?.elements ?? []));
|
|
276045
276045
|
msub.appendChild(baseRow);
|
|
276046
|
-
const subRow = doc$12.createElementNS(MATHML_NS$
|
|
276046
|
+
const subRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
|
|
276047
276047
|
subRow.appendChild(convertChildren(sub?.elements ?? []));
|
|
276048
276048
|
msub.appendChild(subRow);
|
|
276049
276049
|
return msub;
|
|
276050
|
-
}, MATHML_NS$
|
|
276050
|
+
}, MATHML_NS$2 = "http://www.w3.org/1998/Math/MathML", convertSuperscript = (node3, doc$12, convertChildren) => {
|
|
276051
276051
|
const elements = node3.elements ?? [];
|
|
276052
276052
|
const base5 = elements.find((e) => e.name === "m:e");
|
|
276053
276053
|
const sup = elements.find((e) => e.name === "m:sup");
|
|
276054
|
-
const msup = doc$12.createElementNS(MATHML_NS$
|
|
276055
|
-
const baseRow = doc$12.createElementNS(MATHML_NS$
|
|
276054
|
+
const msup = doc$12.createElementNS(MATHML_NS$2, "msup");
|
|
276055
|
+
const baseRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
|
|
276056
276056
|
baseRow.appendChild(convertChildren(base5?.elements ?? []));
|
|
276057
276057
|
msup.appendChild(baseRow);
|
|
276058
|
-
const supRow = doc$12.createElementNS(MATHML_NS$
|
|
276058
|
+
const supRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
|
|
276059
276059
|
supRow.appendChild(convertChildren(sup?.elements ?? []));
|
|
276060
276060
|
msup.appendChild(supRow);
|
|
276061
276061
|
return msup;
|
|
276062
|
+
}, MATHML_NS$1 = "http://www.w3.org/1998/Math/MathML", convertSubSuperscript = (node3, doc$12, convertChildren) => {
|
|
276063
|
+
const elements = node3.elements ?? [];
|
|
276064
|
+
const base5 = elements.find((e) => e.name === "m:e");
|
|
276065
|
+
const sub = elements.find((e) => e.name === "m:sub");
|
|
276066
|
+
const sup = elements.find((e) => e.name === "m:sup");
|
|
276067
|
+
const msubsup = doc$12.createElementNS(MATHML_NS$1, "msubsup");
|
|
276068
|
+
const baseRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
|
|
276069
|
+
baseRow.appendChild(convertChildren(base5?.elements ?? []));
|
|
276070
|
+
msubsup.appendChild(baseRow);
|
|
276071
|
+
const subRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
|
|
276072
|
+
subRow.appendChild(convertChildren(sub?.elements ?? []));
|
|
276073
|
+
msubsup.appendChild(subRow);
|
|
276074
|
+
const supRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
|
|
276075
|
+
supRow.appendChild(convertChildren(sup?.elements ?? []));
|
|
276076
|
+
msubsup.appendChild(supRow);
|
|
276077
|
+
return msubsup;
|
|
276062
276078
|
}, MATHML_NS = "http://www.w3.org/1998/Math/MathML", MATH_OBJECT_REGISTRY, ARGUMENT_ELEMENTS, LIST_MARKER_GAP$1 = 8, DEFAULT_PAGE_HEIGHT_PX = 1056, DEFAULT_VIRTUALIZED_PAGE_GAP = 72, LINK_DATASET_KEYS, MAX_HREF_LENGTH = 2048, SAFE_ANCHOR_PATTERN, MAX_DATA_URL_LENGTH, VALID_IMAGE_DATA_URL, MAX_RESIZE_MULTIPLIER = 3, FALLBACK_MAX_DIMENSION = 1000, MIN_IMAGE_DIMENSION = 20, AMBIGUOUS_LINK_PATTERNS, linkMetrics, TRACK_CHANGE_BASE_CLASS, TRACK_CHANGE_MODIFIER_CLASS, LINK_TARGET_SET, normalizeAnchor$1 = (value) => {
|
|
276063
276079
|
if (typeof value !== "string")
|
|
276064
276080
|
return null;
|
|
@@ -277157,6 +277173,19 @@ var Node$13 = class Node$14 {
|
|
|
277157
277173
|
return false;
|
|
277158
277174
|
const code7 = char.charCodeAt(0);
|
|
277159
277175
|
return code7 >= 48 && code7 <= 57 || code7 >= 65 && code7 <= 90 || code7 >= 97 && code7 <= 122 || char === "'";
|
|
277176
|
+
}, lineContainsManualTabWithoutSegments = (block, line) => {
|
|
277177
|
+
if (block.kind !== "paragraph")
|
|
277178
|
+
return false;
|
|
277179
|
+
if (line.segments?.some((seg) => seg.x !== undefined))
|
|
277180
|
+
return false;
|
|
277181
|
+
const fromRun = line.fromRun ?? 0;
|
|
277182
|
+
const toRun = line.toRun ?? fromRun;
|
|
277183
|
+
for (let runIndex = fromRun;runIndex <= toRun; runIndex += 1) {
|
|
277184
|
+
const run2 = block.runs[runIndex];
|
|
277185
|
+
if (run2 && isTabRun$1(run2))
|
|
277186
|
+
return true;
|
|
277187
|
+
}
|
|
277188
|
+
return false;
|
|
277160
277189
|
}, capitalizeText$2 = (text5) => {
|
|
277161
277190
|
if (!text5)
|
|
277162
277191
|
return text5;
|
|
@@ -286131,7 +286160,7 @@ var Node$13 = class Node$14 {
|
|
|
286131
286160
|
return;
|
|
286132
286161
|
console.log(...args$1);
|
|
286133
286162
|
}, 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;
|
|
286134
|
-
var
|
|
286163
|
+
var init_src_8ohzSIPE_es = __esm(() => {
|
|
286135
286164
|
init_rolldown_runtime_Bg48TavK_es();
|
|
286136
286165
|
init_SuperConverter_wNq3qezj_es();
|
|
286137
286166
|
init_jszip_C49i9kUs_es();
|
|
@@ -311789,6 +311818,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
311789
311818
|
"m:f": convertFraction,
|
|
311790
311819
|
"m:sSub": convertSubscript,
|
|
311791
311820
|
"m:sSup": convertSuperscript,
|
|
311821
|
+
"m:sSubSup": convertSubSuperscript,
|
|
311792
311822
|
"m:acc": null,
|
|
311793
311823
|
"m:borderBox": null,
|
|
311794
311824
|
"m:box": null,
|
|
@@ -311802,8 +311832,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
311802
311832
|
"m:nary": null,
|
|
311803
311833
|
"m:phant": null,
|
|
311804
311834
|
"m:rad": null,
|
|
311805
|
-
"m:sPre": null
|
|
311806
|
-
"m:sSubSup": null
|
|
311835
|
+
"m:sPre": null
|
|
311807
311836
|
};
|
|
311808
311837
|
ARGUMENT_ELEMENTS = new Set([
|
|
311809
311838
|
"m:e",
|
|
@@ -314784,13 +314813,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
314784
314813
|
el.appendChild(barEl);
|
|
314785
314814
|
});
|
|
314786
314815
|
const hasExplicitPositioning = line.segments?.some((seg) => seg.x !== undefined);
|
|
314816
|
+
const manualTabWithoutSegments = runsForLine.some((run2) => run2.kind === "tab") && !hasExplicitPositioning;
|
|
314787
314817
|
const availableWidth = availableWidthOverride ?? line.maxWidth ?? line.width;
|
|
314788
314818
|
const justifyShouldApply = shouldApplyJustify({
|
|
314789
314819
|
alignment: block.attrs?.alignment,
|
|
314790
314820
|
hasExplicitPositioning: hasExplicitPositioning ?? false,
|
|
314791
314821
|
isLastLineOfParagraph: false,
|
|
314792
314822
|
paragraphEndsWithLineBreak: false,
|
|
314793
|
-
skipJustifyOverride: skipJustify
|
|
314823
|
+
skipJustifyOverride: skipJustify || manualTabWithoutSegments
|
|
314794
314824
|
});
|
|
314795
314825
|
const countSpaces$1 = (text5) => {
|
|
314796
314826
|
let count2 = 0;
|
|
@@ -320591,7 +320621,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
|
|
|
320591
320621
|
|
|
320592
320622
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
320593
320623
|
var init_super_editor_es = __esm(() => {
|
|
320594
|
-
|
|
320624
|
+
init_src_8ohzSIPE_es();
|
|
320595
320625
|
init_SuperConverter_wNq3qezj_es();
|
|
320596
320626
|
init_jszip_C49i9kUs_es();
|
|
320597
320627
|
init_xml_js_CqGKpaft_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.5.0-next.
|
|
3
|
+
"version": "0.5.0-next.57",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
28
|
"@superdoc/pm-adapter": "0.0.0",
|
|
29
|
-
"superdoc": "
|
|
30
|
-
"
|
|
29
|
+
"@superdoc/super-editor": "0.0.1",
|
|
30
|
+
"superdoc": "1.24.0"
|
|
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.5.0-next.
|
|
38
|
-
"@superdoc-dev/cli-
|
|
39
|
-
"@superdoc-dev/cli-
|
|
40
|
-
"@superdoc-dev/cli-
|
|
41
|
-
"@superdoc-dev/cli-
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.5.0-next.57",
|
|
38
|
+
"@superdoc-dev/cli-linux-x64": "0.5.0-next.57",
|
|
39
|
+
"@superdoc-dev/cli-darwin-x64": "0.5.0-next.57",
|
|
40
|
+
"@superdoc-dev/cli-linux-arm64": "0.5.0-next.57",
|
|
41
|
+
"@superdoc-dev/cli-windows-x64": "0.5.0-next.57"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|