@superdoc-dev/cli 0.5.0-next.73 → 0.5.0-next.74
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 +55 -19
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -204645,7 +204645,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
204645
204645
|
init_remark_gfm_BhnWr3yf_es();
|
|
204646
204646
|
});
|
|
204647
204647
|
|
|
204648
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
204648
|
+
// ../../packages/superdoc/dist/chunks/src-IKYgt0gJ.es.js
|
|
204649
204649
|
function deleteProps(obj, propOrProps) {
|
|
204650
204650
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
204651
204651
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -245429,6 +245429,12 @@ function forceNormalMathVariant(root3) {
|
|
|
245429
245429
|
identifier.setAttribute("mathvariant", "normal");
|
|
245430
245430
|
});
|
|
245431
245431
|
}
|
|
245432
|
+
function getDelimiterValue(properties, name, fallback) {
|
|
245433
|
+
const property = properties?.elements?.find((element3) => element3.name === name);
|
|
245434
|
+
if (!property)
|
|
245435
|
+
return fallback;
|
|
245436
|
+
return property.attributes?.["m:val"] ?? "";
|
|
245437
|
+
}
|
|
245432
245438
|
function convertChildNodes(children, doc$12) {
|
|
245433
245439
|
const fragment2 = doc$12.createDocumentFragment();
|
|
245434
245440
|
for (const child of children) {
|
|
@@ -277130,7 +277136,7 @@ var Node$13 = class Node$14 {
|
|
|
277130
277136
|
}
|
|
277131
277137
|
element3.style.textAlign = resolveTextAlign(attrs?.alignment, rtl);
|
|
277132
277138
|
return rtl;
|
|
277133
|
-
}, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, MATHML_NS$
|
|
277139
|
+
}, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, MATHML_NS$9 = "http://www.w3.org/1998/Math/MathML", OPERATOR_CHARS, convertMathRun = (node3, doc$12) => {
|
|
277134
277140
|
const elements = node3.elements ?? [];
|
|
277135
277141
|
let text5 = "";
|
|
277136
277142
|
for (const child of elements)
|
|
@@ -277144,57 +277150,87 @@ var Node$13 = class Node$14 {
|
|
|
277144
277150
|
return null;
|
|
277145
277151
|
const isNormalText = elements.find((el$1) => el$1.name === "m:rPr")?.elements?.some((el$1) => el$1.name === "m:nor") ?? false;
|
|
277146
277152
|
const tag = classifyMathText(text5);
|
|
277147
|
-
const el = doc$12.createElementNS(MATHML_NS$
|
|
277153
|
+
const el = doc$12.createElementNS(MATHML_NS$9, tag);
|
|
277148
277154
|
el.textContent = text5;
|
|
277149
277155
|
if (tag === "mi" && isNormalText)
|
|
277150
277156
|
el.setAttribute("mathvariant", "normal");
|
|
277151
277157
|
return el;
|
|
277152
|
-
}, MATHML_NS$
|
|
277158
|
+
}, MATHML_NS$8 = "http://www.w3.org/1998/Math/MathML", convertFraction = (node3, doc$12, convertChildren) => {
|
|
277153
277159
|
const elements = node3.elements ?? [];
|
|
277154
277160
|
const num = elements.find((e) => e.name === "m:num");
|
|
277155
277161
|
const den = elements.find((e) => e.name === "m:den");
|
|
277156
|
-
const frac = doc$12.createElementNS(MATHML_NS$
|
|
277157
|
-
const numRow = doc$12.createElementNS(MATHML_NS$
|
|
277162
|
+
const frac = doc$12.createElementNS(MATHML_NS$8, "mfrac");
|
|
277163
|
+
const numRow = doc$12.createElementNS(MATHML_NS$8, "mrow");
|
|
277158
277164
|
numRow.appendChild(convertChildren(num?.elements ?? []));
|
|
277159
277165
|
frac.appendChild(numRow);
|
|
277160
|
-
const denRow = doc$12.createElementNS(MATHML_NS$
|
|
277166
|
+
const denRow = doc$12.createElementNS(MATHML_NS$8, "mrow");
|
|
277161
277167
|
denRow.appendChild(convertChildren(den?.elements ?? []));
|
|
277162
277168
|
frac.appendChild(denRow);
|
|
277163
277169
|
return frac;
|
|
277164
|
-
}, MATHML_NS$
|
|
277170
|
+
}, MATHML_NS$7 = "http://www.w3.org/1998/Math/MathML", convertBar = (node3, doc$12, convertChildren) => {
|
|
277165
277171
|
const elements = node3.elements ?? [];
|
|
277166
277172
|
const isUnder = elements.find((e) => e.name === "m:barPr")?.elements?.find((e) => e.name === "m:pos")?.attributes?.["m:val"] !== "top";
|
|
277167
277173
|
const base5 = elements.find((e) => e.name === "m:e");
|
|
277168
|
-
const wrapper = doc$12.createElementNS(MATHML_NS$
|
|
277174
|
+
const wrapper = doc$12.createElementNS(MATHML_NS$7, isUnder ? "munder" : "mover");
|
|
277169
277175
|
const baseContent = convertChildren(base5?.elements ?? []);
|
|
277170
|
-
const mrow = doc$12.createElementNS(MATHML_NS$
|
|
277176
|
+
const mrow = doc$12.createElementNS(MATHML_NS$7, "mrow");
|
|
277171
277177
|
mrow.appendChild(baseContent);
|
|
277172
277178
|
wrapper.appendChild(mrow);
|
|
277173
|
-
const accent = doc$12.createElementNS(MATHML_NS$
|
|
277179
|
+
const accent = doc$12.createElementNS(MATHML_NS$7, "mo");
|
|
277174
277180
|
accent.setAttribute("stretchy", "true");
|
|
277175
277181
|
accent.textContent = "‾";
|
|
277176
277182
|
wrapper.appendChild(accent);
|
|
277177
277183
|
return wrapper;
|
|
277178
|
-
}, MATHML_NS$
|
|
277184
|
+
}, MATHML_NS$6 = "http://www.w3.org/1998/Math/MathML", FUNCTION_APPLY_OPERATOR = "", convertFunction = (node3, doc$12, convertChildren) => {
|
|
277179
277185
|
const elements = node3.elements ?? [];
|
|
277180
277186
|
const functionName = elements.find((element3) => element3.name === "m:fName");
|
|
277181
277187
|
const argument = elements.find((element3) => element3.name === "m:e");
|
|
277182
|
-
const wrapper = doc$12.createElementNS(MATHML_NS$
|
|
277183
|
-
const functionNameRow = doc$12.createElementNS(MATHML_NS$
|
|
277188
|
+
const wrapper = doc$12.createElementNS(MATHML_NS$6, "mrow");
|
|
277189
|
+
const functionNameRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
|
|
277184
277190
|
functionNameRow.appendChild(convertChildren(functionName?.elements ?? []));
|
|
277185
277191
|
forceNormalMathVariant(functionNameRow);
|
|
277186
277192
|
if (functionNameRow.childNodes.length > 0)
|
|
277187
277193
|
wrapper.appendChild(functionNameRow);
|
|
277188
|
-
const argumentRow = doc$12.createElementNS(MATHML_NS$
|
|
277194
|
+
const argumentRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
|
|
277189
277195
|
argumentRow.appendChild(convertChildren(argument?.elements ?? []));
|
|
277190
277196
|
if (functionNameRow.childNodes.length > 0 && argumentRow.childNodes.length > 0) {
|
|
277191
|
-
const applyOperator = doc$12.createElementNS(MATHML_NS$
|
|
277197
|
+
const applyOperator = doc$12.createElementNS(MATHML_NS$6, "mo");
|
|
277192
277198
|
applyOperator.textContent = FUNCTION_APPLY_OPERATOR;
|
|
277193
277199
|
wrapper.appendChild(applyOperator);
|
|
277194
277200
|
}
|
|
277195
277201
|
if (argumentRow.childNodes.length > 0)
|
|
277196
277202
|
wrapper.appendChild(argumentRow);
|
|
277197
277203
|
return wrapper.childNodes.length > 0 ? wrapper : null;
|
|
277204
|
+
}, MATHML_NS$5 = "http://www.w3.org/1998/Math/MathML", DEFAULT_BEGIN_DELIMITER = "(", DEFAULT_END_DELIMITER = ")", DEFAULT_SEPARATOR_DELIMITER = "│", convertDelimiter = (node3, doc$12, convertChildren) => {
|
|
277205
|
+
const elements = node3.elements ?? [];
|
|
277206
|
+
const delimiterProps = elements.find((element3) => element3.name === "m:dPr");
|
|
277207
|
+
const expressions = elements.filter((element3) => element3.name === "m:e");
|
|
277208
|
+
const beginDelimiter = getDelimiterValue(delimiterProps, "m:begChr", DEFAULT_BEGIN_DELIMITER);
|
|
277209
|
+
const endDelimiter = getDelimiterValue(delimiterProps, "m:endChr", DEFAULT_END_DELIMITER);
|
|
277210
|
+
const separatorDelimiter = getDelimiterValue(delimiterProps, "m:sepChr", DEFAULT_SEPARATOR_DELIMITER);
|
|
277211
|
+
const wrapper = doc$12.createElementNS(MATHML_NS$5, "mrow");
|
|
277212
|
+
const begin = doc$12.createElementNS(MATHML_NS$5, "mo");
|
|
277213
|
+
begin.textContent = beginDelimiter;
|
|
277214
|
+
wrapper.appendChild(begin);
|
|
277215
|
+
let renderedCount = 0;
|
|
277216
|
+
for (const expression of expressions) {
|
|
277217
|
+
const fragment2 = convertChildren(expression?.elements ?? []);
|
|
277218
|
+
if (fragment2.childNodes.length === 0)
|
|
277219
|
+
continue;
|
|
277220
|
+
if (renderedCount > 0) {
|
|
277221
|
+
const separator = doc$12.createElementNS(MATHML_NS$5, "mo");
|
|
277222
|
+
separator.textContent = separatorDelimiter;
|
|
277223
|
+
wrapper.appendChild(separator);
|
|
277224
|
+
}
|
|
277225
|
+
const group = doc$12.createElementNS(MATHML_NS$5, "mrow");
|
|
277226
|
+
group.appendChild(fragment2);
|
|
277227
|
+
wrapper.appendChild(group);
|
|
277228
|
+
renderedCount++;
|
|
277229
|
+
}
|
|
277230
|
+
const end$1 = doc$12.createElementNS(MATHML_NS$5, "mo");
|
|
277231
|
+
end$1.textContent = endDelimiter;
|
|
277232
|
+
wrapper.appendChild(end$1);
|
|
277233
|
+
return wrapper;
|
|
277198
277234
|
}, MATHML_NS$4 = "http://www.w3.org/1998/Math/MathML", convertSubscript = (node3, doc$12, convertChildren) => {
|
|
277199
277235
|
const elements = node3.elements ?? [];
|
|
277200
277236
|
const base5 = elements.find((e) => e.name === "m:e");
|
|
@@ -287360,7 +287396,7 @@ var Node$13 = class Node$14 {
|
|
|
287360
287396
|
return;
|
|
287361
287397
|
console.log(...args$1);
|
|
287362
287398
|
}, 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;
|
|
287363
|
-
var
|
|
287399
|
+
var init_src_IKYgt0gJ_es = __esm(() => {
|
|
287364
287400
|
init_rolldown_runtime_Bg48TavK_es();
|
|
287365
287401
|
init_SuperConverter_DKPcCGTm_es();
|
|
287366
287402
|
init_jszip_C49i9kUs_es();
|
|
@@ -313090,6 +313126,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
313090
313126
|
MATH_OBJECT_REGISTRY = {
|
|
313091
313127
|
"m:r": convertMathRun,
|
|
313092
313128
|
"m:bar": convertBar,
|
|
313129
|
+
"m:d": convertDelimiter,
|
|
313093
313130
|
"m:f": convertFraction,
|
|
313094
313131
|
"m:func": convertFunction,
|
|
313095
313132
|
"m:sSub": convertSubscript,
|
|
@@ -313098,7 +313135,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
313098
313135
|
"m:acc": null,
|
|
313099
313136
|
"m:borderBox": null,
|
|
313100
313137
|
"m:box": null,
|
|
313101
|
-
"m:d": null,
|
|
313102
313138
|
"m:eqArr": null,
|
|
313103
313139
|
"m:groupChr": null,
|
|
313104
313140
|
"m:limLow": null,
|
|
@@ -321934,7 +321970,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
|
|
|
321934
321970
|
|
|
321935
321971
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
321936
321972
|
var init_super_editor_es = __esm(() => {
|
|
321937
|
-
|
|
321973
|
+
init_src_IKYgt0gJ_es();
|
|
321938
321974
|
init_SuperConverter_DKPcCGTm_es();
|
|
321939
321975
|
init_jszip_C49i9kUs_es();
|
|
321940
321976
|
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.74",
|
|
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/super-editor": "0.0.1",
|
|
29
28
|
"@superdoc/pm-adapter": "0.0.0",
|
|
30
|
-
"superdoc": "1.25.0"
|
|
29
|
+
"superdoc": "1.25.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.5.0-next.
|
|
38
|
-
"@superdoc-dev/cli-linux-x64": "0.5.0-next.
|
|
39
|
-
"@superdoc-dev/cli-darwin-x64": "0.5.0-next.
|
|
40
|
-
"@superdoc-dev/cli-
|
|
41
|
-
"@superdoc-dev/cli-
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.5.0-next.74",
|
|
38
|
+
"@superdoc-dev/cli-linux-x64": "0.5.0-next.74",
|
|
39
|
+
"@superdoc-dev/cli-darwin-x64": "0.5.0-next.74",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.5.0-next.74",
|
|
41
|
+
"@superdoc-dev/cli-linux-arm64": "0.5.0-next.74"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|