@superdoc-dev/cli 0.5.0-next.59 → 0.5.0-next.60

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.
Files changed (2) hide show
  1. package/dist/index.js +39 -14
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -203905,7 +203905,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
203905
203905
  init_remark_gfm_BhnWr3yf_es();
203906
203906
  });
203907
203907
 
203908
- // ../../packages/superdoc/dist/chunks/src-DksgGhe1.es.js
203908
+ // ../../packages/superdoc/dist/chunks/src-C8kQT9o6.es.js
203909
203909
  function deleteProps(obj, propOrProps) {
203910
203910
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
203911
203911
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -244578,6 +244578,11 @@ function classifyMathText(text5) {
244578
244578
  return "mo";
244579
244579
  return "mi";
244580
244580
  }
244581
+ function forceNormalMathVariant(root3) {
244582
+ root3.querySelectorAll("mi").forEach((identifier) => {
244583
+ identifier.setAttribute("mathvariant", "normal");
244584
+ });
244585
+ }
244581
244586
  function convertChildNodes(children, doc$12) {
244582
244587
  const fragment2 = doc$12.createDocumentFragment();
244583
244588
  for (const child of children) {
@@ -276021,7 +276026,7 @@ var Node$13 = class Node$14 {
276021
276026
  }
276022
276027
  element3.style.textAlign = resolveTextAlign(attrs?.alignment, rtl);
276023
276028
  return rtl;
276024
- }, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, MATHML_NS$6 = "http://www.w3.org/1998/Math/MathML", OPERATOR_CHARS, convertMathRun = (node3, doc$12) => {
276029
+ }, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, MATHML_NS$7 = "http://www.w3.org/1998/Math/MathML", OPERATOR_CHARS, convertMathRun = (node3, doc$12) => {
276025
276030
  const elements = node3.elements ?? [];
276026
276031
  let text5 = "";
276027
276032
  for (const child of elements)
@@ -276035,37 +276040,57 @@ var Node$13 = class Node$14 {
276035
276040
  return null;
276036
276041
  const isNormalText = elements.find((el$1) => el$1.name === "m:rPr")?.elements?.some((el$1) => el$1.name === "m:nor") ?? false;
276037
276042
  const tag = classifyMathText(text5);
276038
- const el = doc$12.createElementNS(MATHML_NS$6, tag);
276043
+ const el = doc$12.createElementNS(MATHML_NS$7, tag);
276039
276044
  el.textContent = text5;
276040
276045
  if (tag === "mi" && isNormalText)
276041
276046
  el.setAttribute("mathvariant", "normal");
276042
276047
  return el;
276043
- }, MATHML_NS$5 = "http://www.w3.org/1998/Math/MathML", convertFraction = (node3, doc$12, convertChildren) => {
276048
+ }, MATHML_NS$6 = "http://www.w3.org/1998/Math/MathML", convertFraction = (node3, doc$12, convertChildren) => {
276044
276049
  const elements = node3.elements ?? [];
276045
276050
  const num = elements.find((e) => e.name === "m:num");
276046
276051
  const den = elements.find((e) => e.name === "m:den");
276047
- const frac = doc$12.createElementNS(MATHML_NS$5, "mfrac");
276048
- const numRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
276052
+ const frac = doc$12.createElementNS(MATHML_NS$6, "mfrac");
276053
+ const numRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
276049
276054
  numRow.appendChild(convertChildren(num?.elements ?? []));
276050
276055
  frac.appendChild(numRow);
276051
- const denRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
276056
+ const denRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
276052
276057
  denRow.appendChild(convertChildren(den?.elements ?? []));
276053
276058
  frac.appendChild(denRow);
276054
276059
  return frac;
276055
- }, MATHML_NS$4 = "http://www.w3.org/1998/Math/MathML", convertBar = (node3, doc$12, convertChildren) => {
276060
+ }, MATHML_NS$5 = "http://www.w3.org/1998/Math/MathML", convertBar = (node3, doc$12, convertChildren) => {
276056
276061
  const elements = node3.elements ?? [];
276057
276062
  const isUnder = elements.find((e) => e.name === "m:barPr")?.elements?.find((e) => e.name === "m:pos")?.attributes?.["m:val"] !== "top";
276058
276063
  const base5 = elements.find((e) => e.name === "m:e");
276059
- const wrapper = doc$12.createElementNS(MATHML_NS$4, isUnder ? "munder" : "mover");
276064
+ const wrapper = doc$12.createElementNS(MATHML_NS$5, isUnder ? "munder" : "mover");
276060
276065
  const baseContent = convertChildren(base5?.elements ?? []);
276061
- const mrow = doc$12.createElementNS(MATHML_NS$4, "mrow");
276066
+ const mrow = doc$12.createElementNS(MATHML_NS$5, "mrow");
276062
276067
  mrow.appendChild(baseContent);
276063
276068
  wrapper.appendChild(mrow);
276064
- const accent = doc$12.createElementNS(MATHML_NS$4, "mo");
276069
+ const accent = doc$12.createElementNS(MATHML_NS$5, "mo");
276065
276070
  accent.setAttribute("stretchy", "true");
276066
276071
  accent.textContent = "‾";
276067
276072
  wrapper.appendChild(accent);
276068
276073
  return wrapper;
276074
+ }, MATHML_NS$4 = "http://www.w3.org/1998/Math/MathML", FUNCTION_APPLY_OPERATOR = "⁡", convertFunction = (node3, doc$12, convertChildren) => {
276075
+ const elements = node3.elements ?? [];
276076
+ const functionName = elements.find((element3) => element3.name === "m:fName");
276077
+ const argument = elements.find((element3) => element3.name === "m:e");
276078
+ const wrapper = doc$12.createElementNS(MATHML_NS$4, "mrow");
276079
+ const functionNameRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
276080
+ functionNameRow.appendChild(convertChildren(functionName?.elements ?? []));
276081
+ forceNormalMathVariant(functionNameRow);
276082
+ if (functionNameRow.childNodes.length > 0)
276083
+ wrapper.appendChild(functionNameRow);
276084
+ const argumentRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
276085
+ argumentRow.appendChild(convertChildren(argument?.elements ?? []));
276086
+ if (functionNameRow.childNodes.length > 0 && argumentRow.childNodes.length > 0) {
276087
+ const applyOperator = doc$12.createElementNS(MATHML_NS$4, "mo");
276088
+ applyOperator.textContent = FUNCTION_APPLY_OPERATOR;
276089
+ wrapper.appendChild(applyOperator);
276090
+ }
276091
+ if (argumentRow.childNodes.length > 0)
276092
+ wrapper.appendChild(argumentRow);
276093
+ return wrapper.childNodes.length > 0 ? wrapper : null;
276069
276094
  }, MATHML_NS$3 = "http://www.w3.org/1998/Math/MathML", convertSubscript = (node3, doc$12, convertChildren) => {
276070
276095
  const elements = node3.elements ?? [];
276071
276096
  const base5 = elements.find((e) => e.name === "m:e");
@@ -286191,7 +286216,7 @@ var Node$13 = class Node$14 {
286191
286216
  return;
286192
286217
  console.log(...args$1);
286193
286218
  }, 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;
286194
- var init_src_DksgGhe1_es = __esm(() => {
286219
+ var init_src_C8kQT9o6_es = __esm(() => {
286195
286220
  init_rolldown_runtime_Bg48TavK_es();
286196
286221
  init_SuperConverter_CE_qGNRx_es();
286197
286222
  init_jszip_C49i9kUs_es();
@@ -311857,6 +311882,7 @@ function print() { __p += __j.call(arguments, '') }
311857
311882
  "m:r": convertMathRun,
311858
311883
  "m:bar": convertBar,
311859
311884
  "m:f": convertFraction,
311885
+ "m:func": convertFunction,
311860
311886
  "m:sSub": convertSubscript,
311861
311887
  "m:sSup": convertSuperscript,
311862
311888
  "m:sSubSup": convertSubSuperscript,
@@ -311865,7 +311891,6 @@ function print() { __p += __j.call(arguments, '') }
311865
311891
  "m:box": null,
311866
311892
  "m:d": null,
311867
311893
  "m:eqArr": null,
311868
- "m:func": null,
311869
311894
  "m:groupChr": null,
311870
311895
  "m:limLow": null,
311871
311896
  "m:limUpp": null,
@@ -320662,7 +320687,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
320662
320687
 
320663
320688
  // ../../packages/superdoc/dist/super-editor.es.js
320664
320689
  var init_super_editor_es = __esm(() => {
320665
- init_src_DksgGhe1_es();
320690
+ init_src_C8kQT9o6_es();
320666
320691
  init_SuperConverter_CE_qGNRx_es();
320667
320692
  init_jszip_C49i9kUs_es();
320668
320693
  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.59",
3
+ "version": "0.5.0-next.60",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -24,21 +24,21 @@
24
24
  "@types/node": "22.19.2",
25
25
  "@types/ws": "^8.5.13",
26
26
  "typescript": "^5.9.2",
27
- "@superdoc/document-api": "0.0.1",
28
27
  "@superdoc/pm-adapter": "0.0.0",
28
+ "superdoc": "1.24.0",
29
29
  "@superdoc/super-editor": "0.0.1",
30
- "superdoc": "1.24.0"
30
+ "@superdoc/document-api": "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.59",
38
- "@superdoc-dev/cli-darwin-x64": "0.5.0-next.59",
39
- "@superdoc-dev/cli-linux-x64": "0.5.0-next.59",
40
- "@superdoc-dev/cli-linux-arm64": "0.5.0-next.59",
41
- "@superdoc-dev/cli-windows-x64": "0.5.0-next.59"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.5.0-next.60",
38
+ "@superdoc-dev/cli-linux-x64": "0.5.0-next.60",
39
+ "@superdoc-dev/cli-darwin-x64": "0.5.0-next.60",
40
+ "@superdoc-dev/cli-linux-arm64": "0.5.0-next.60",
41
+ "@superdoc-dev/cli-windows-x64": "0.5.0-next.60"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",