@superdoc-dev/cli 0.7.0-next.10 → 0.7.0-next.11

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 +135 -67
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -204335,7 +204335,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
204335
204335
  init_remark_gfm_BhnWr3yf_es();
204336
204336
  });
204337
204337
 
204338
- // ../../packages/superdoc/dist/chunks/src-CZB4kJvn.es.js
204338
+ // ../../packages/superdoc/dist/chunks/src-DZzZDECe.es.js
204339
204339
  function deleteProps(obj, propOrProps) {
204340
204340
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
204341
204341
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -277239,7 +277239,7 @@ var Node$13 = class Node$14 {
277239
277239
  }
277240
277240
  element3.style.textAlign = resolveTextAlign(attrs?.alignment, rtl);
277241
277241
  return rtl;
277242
- }, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, MATHML_NS$14 = "http://www.w3.org/1998/Math/MathML", OPERATOR_CHARS, STY_TO_VARIANT, SCR_TO_VARIANT, convertMathRun = (node3, doc$12) => {
277242
+ }, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, MATHML_NS$15 = "http://www.w3.org/1998/Math/MathML", OPERATOR_CHARS, STY_TO_VARIANT, SCR_TO_VARIANT, convertMathRun = (node3, doc$12) => {
277243
277243
  const elements = node3.elements ?? [];
277244
277244
  let text5 = "";
277245
277245
  for (const child of elements)
@@ -277253,66 +277253,66 @@ var Node$13 = class Node$14 {
277253
277253
  return null;
277254
277254
  const variant = resolveMathVariant(elements.find((el$1) => el$1.name === "m:rPr"));
277255
277255
  const tag = classifyMathText(text5);
277256
- const el = doc$12.createElementNS(MATHML_NS$14, tag);
277256
+ const el = doc$12.createElementNS(MATHML_NS$15, tag);
277257
277257
  el.textContent = text5;
277258
277258
  if (variant)
277259
277259
  el.setAttribute("mathvariant", variant);
277260
277260
  return el;
277261
- }, MATHML_NS$13 = "http://www.w3.org/1998/Math/MathML", convertFraction = (node3, doc$12, convertChildren) => {
277261
+ }, MATHML_NS$14 = "http://www.w3.org/1998/Math/MathML", convertFraction = (node3, doc$12, convertChildren) => {
277262
277262
  const elements = node3.elements ?? [];
277263
277263
  const num = elements.find((e) => e.name === "m:num");
277264
277264
  const den = elements.find((e) => e.name === "m:den");
277265
- const frac = doc$12.createElementNS(MATHML_NS$13, "mfrac");
277266
- const numRow = doc$12.createElementNS(MATHML_NS$13, "mrow");
277265
+ const frac = doc$12.createElementNS(MATHML_NS$14, "mfrac");
277266
+ const numRow = doc$12.createElementNS(MATHML_NS$14, "mrow");
277267
277267
  numRow.appendChild(convertChildren(num?.elements ?? []));
277268
277268
  frac.appendChild(numRow);
277269
- const denRow = doc$12.createElementNS(MATHML_NS$13, "mrow");
277269
+ const denRow = doc$12.createElementNS(MATHML_NS$14, "mrow");
277270
277270
  denRow.appendChild(convertChildren(den?.elements ?? []));
277271
277271
  frac.appendChild(denRow);
277272
277272
  return frac;
277273
- }, MATHML_NS$12 = "http://www.w3.org/1998/Math/MathML", convertBar = (node3, doc$12, convertChildren) => {
277273
+ }, MATHML_NS$13 = "http://www.w3.org/1998/Math/MathML", convertBar = (node3, doc$12, convertChildren) => {
277274
277274
  const elements = node3.elements ?? [];
277275
277275
  const isUnder = elements.find((e) => e.name === "m:barPr")?.elements?.find((e) => e.name === "m:pos")?.attributes?.["m:val"] !== "top";
277276
277276
  const base5 = elements.find((e) => e.name === "m:e");
277277
- const wrapper = doc$12.createElementNS(MATHML_NS$12, isUnder ? "munder" : "mover");
277277
+ const wrapper = doc$12.createElementNS(MATHML_NS$13, isUnder ? "munder" : "mover");
277278
277278
  const baseContent = convertChildren(base5?.elements ?? []);
277279
- const mrow = doc$12.createElementNS(MATHML_NS$12, "mrow");
277279
+ const mrow = doc$12.createElementNS(MATHML_NS$13, "mrow");
277280
277280
  mrow.appendChild(baseContent);
277281
277281
  wrapper.appendChild(mrow);
277282
- const accent = doc$12.createElementNS(MATHML_NS$12, "mo");
277282
+ const accent = doc$12.createElementNS(MATHML_NS$13, "mo");
277283
277283
  accent.setAttribute("stretchy", "true");
277284
277284
  accent.textContent = "‾";
277285
277285
  wrapper.appendChild(accent);
277286
277286
  return wrapper;
277287
- }, MATHML_NS$11 = "http://www.w3.org/1998/Math/MathML", FUNCTION_APPLY_OPERATOR = "⁡", convertFunction = (node3, doc$12, convertChildren) => {
277287
+ }, MATHML_NS$12 = "http://www.w3.org/1998/Math/MathML", FUNCTION_APPLY_OPERATOR = "⁡", convertFunction = (node3, doc$12, convertChildren) => {
277288
277288
  const elements = node3.elements ?? [];
277289
277289
  const functionName = elements.find((element3) => element3.name === "m:fName");
277290
277290
  const argument = elements.find((element3) => element3.name === "m:e");
277291
- const wrapper = doc$12.createElementNS(MATHML_NS$11, "mrow");
277292
- const functionNameRow = doc$12.createElementNS(MATHML_NS$11, "mrow");
277291
+ const wrapper = doc$12.createElementNS(MATHML_NS$12, "mrow");
277292
+ const functionNameRow = doc$12.createElementNS(MATHML_NS$12, "mrow");
277293
277293
  functionNameRow.appendChild(convertChildren(functionName?.elements ?? []));
277294
277294
  forceNormalMathVariant(functionNameRow);
277295
277295
  if (functionNameRow.childNodes.length > 0)
277296
277296
  wrapper.appendChild(functionNameRow);
277297
- const argumentRow = doc$12.createElementNS(MATHML_NS$11, "mrow");
277297
+ const argumentRow = doc$12.createElementNS(MATHML_NS$12, "mrow");
277298
277298
  argumentRow.appendChild(convertChildren(argument?.elements ?? []));
277299
277299
  if (functionNameRow.childNodes.length > 0 && argumentRow.childNodes.length > 0) {
277300
- const applyOperator = doc$12.createElementNS(MATHML_NS$11, "mo");
277300
+ const applyOperator = doc$12.createElementNS(MATHML_NS$12, "mo");
277301
277301
  applyOperator.textContent = FUNCTION_APPLY_OPERATOR;
277302
277302
  wrapper.appendChild(applyOperator);
277303
277303
  }
277304
277304
  if (argumentRow.childNodes.length > 0)
277305
277305
  wrapper.appendChild(argumentRow);
277306
277306
  return wrapper.childNodes.length > 0 ? wrapper : null;
277307
- }, MATHML_NS$10 = "http://www.w3.org/1998/Math/MathML", DEFAULT_BEGIN_DELIMITER = "(", DEFAULT_END_DELIMITER = ")", DEFAULT_SEPARATOR_DELIMITER = "│", convertDelimiter = (node3, doc$12, convertChildren) => {
277307
+ }, MATHML_NS$11 = "http://www.w3.org/1998/Math/MathML", DEFAULT_BEGIN_DELIMITER = "(", DEFAULT_END_DELIMITER = ")", DEFAULT_SEPARATOR_DELIMITER = "│", convertDelimiter = (node3, doc$12, convertChildren) => {
277308
277308
  const elements = node3.elements ?? [];
277309
277309
  const delimiterProps = elements.find((element3) => element3.name === "m:dPr");
277310
277310
  const expressions = elements.filter((element3) => element3.name === "m:e");
277311
277311
  const beginDelimiter = getDelimiterValue(delimiterProps, "m:begChr", DEFAULT_BEGIN_DELIMITER);
277312
277312
  const endDelimiter = getDelimiterValue(delimiterProps, "m:endChr", DEFAULT_END_DELIMITER);
277313
277313
  const separatorDelimiter = getDelimiterValue(delimiterProps, "m:sepChr", DEFAULT_SEPARATOR_DELIMITER);
277314
- const wrapper = doc$12.createElementNS(MATHML_NS$10, "mrow");
277315
- const begin = doc$12.createElementNS(MATHML_NS$10, "mo");
277314
+ const wrapper = doc$12.createElementNS(MATHML_NS$11, "mrow");
277315
+ const begin = doc$12.createElementNS(MATHML_NS$11, "mo");
277316
277316
  begin.textContent = beginDelimiter;
277317
277317
  wrapper.appendChild(begin);
277318
277318
  let renderedCount = 0;
@@ -277321,60 +277321,60 @@ var Node$13 = class Node$14 {
277321
277321
  if (fragment2.childNodes.length === 0)
277322
277322
  continue;
277323
277323
  if (renderedCount > 0) {
277324
- const separator = doc$12.createElementNS(MATHML_NS$10, "mo");
277324
+ const separator = doc$12.createElementNS(MATHML_NS$11, "mo");
277325
277325
  separator.textContent = separatorDelimiter;
277326
277326
  wrapper.appendChild(separator);
277327
277327
  }
277328
- const group = doc$12.createElementNS(MATHML_NS$10, "mrow");
277328
+ const group = doc$12.createElementNS(MATHML_NS$11, "mrow");
277329
277329
  group.appendChild(fragment2);
277330
277330
  wrapper.appendChild(group);
277331
277331
  renderedCount++;
277332
277332
  }
277333
- const end$1 = doc$12.createElementNS(MATHML_NS$10, "mo");
277333
+ const end$1 = doc$12.createElementNS(MATHML_NS$11, "mo");
277334
277334
  end$1.textContent = endDelimiter;
277335
277335
  wrapper.appendChild(end$1);
277336
277336
  return wrapper;
277337
- }, MATHML_NS$9 = "http://www.w3.org/1998/Math/MathML", convertSubscript = (node3, doc$12, convertChildren) => {
277337
+ }, MATHML_NS$10 = "http://www.w3.org/1998/Math/MathML", convertSubscript = (node3, doc$12, convertChildren) => {
277338
277338
  const elements = node3.elements ?? [];
277339
277339
  const base5 = elements.find((e) => e.name === "m:e");
277340
277340
  const sub = elements.find((e) => e.name === "m:sub");
277341
- const msub = doc$12.createElementNS(MATHML_NS$9, "msub");
277342
- const baseRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277341
+ const msub = doc$12.createElementNS(MATHML_NS$10, "msub");
277342
+ const baseRow = doc$12.createElementNS(MATHML_NS$10, "mrow");
277343
277343
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277344
277344
  msub.appendChild(baseRow);
277345
- const subRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277345
+ const subRow = doc$12.createElementNS(MATHML_NS$10, "mrow");
277346
277346
  subRow.appendChild(convertChildren(sub?.elements ?? []));
277347
277347
  msub.appendChild(subRow);
277348
277348
  return msub;
277349
- }, MATHML_NS$8 = "http://www.w3.org/1998/Math/MathML", convertSuperscript = (node3, doc$12, convertChildren) => {
277349
+ }, MATHML_NS$9 = "http://www.w3.org/1998/Math/MathML", convertSuperscript = (node3, doc$12, convertChildren) => {
277350
277350
  const elements = node3.elements ?? [];
277351
277351
  const base5 = elements.find((e) => e.name === "m:e");
277352
277352
  const sup = elements.find((e) => e.name === "m:sup");
277353
- const msup = doc$12.createElementNS(MATHML_NS$8, "msup");
277354
- const baseRow = doc$12.createElementNS(MATHML_NS$8, "mrow");
277353
+ const msup = doc$12.createElementNS(MATHML_NS$9, "msup");
277354
+ const baseRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277355
277355
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277356
277356
  msup.appendChild(baseRow);
277357
- const supRow = doc$12.createElementNS(MATHML_NS$8, "mrow");
277357
+ const supRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277358
277358
  supRow.appendChild(convertChildren(sup?.elements ?? []));
277359
277359
  msup.appendChild(supRow);
277360
277360
  return msup;
277361
- }, MATHML_NS$7 = "http://www.w3.org/1998/Math/MathML", convertSubSuperscript = (node3, doc$12, convertChildren) => {
277361
+ }, MATHML_NS$8 = "http://www.w3.org/1998/Math/MathML", convertSubSuperscript = (node3, doc$12, convertChildren) => {
277362
277362
  const elements = node3.elements ?? [];
277363
277363
  const base5 = elements.find((e) => e.name === "m:e");
277364
277364
  const sub = elements.find((e) => e.name === "m:sub");
277365
277365
  const sup = elements.find((e) => e.name === "m:sup");
277366
- const msubsup = doc$12.createElementNS(MATHML_NS$7, "msubsup");
277367
- const baseRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277366
+ const msubsup = doc$12.createElementNS(MATHML_NS$8, "msubsup");
277367
+ const baseRow = doc$12.createElementNS(MATHML_NS$8, "mrow");
277368
277368
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277369
277369
  msubsup.appendChild(baseRow);
277370
- const subRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277370
+ const subRow = doc$12.createElementNS(MATHML_NS$8, "mrow");
277371
277371
  subRow.appendChild(convertChildren(sub?.elements ?? []));
277372
277372
  msubsup.appendChild(subRow);
277373
- const supRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277373
+ const supRow = doc$12.createElementNS(MATHML_NS$8, "mrow");
277374
277374
  supRow.appendChild(convertChildren(sup?.elements ?? []));
277375
277375
  msubsup.appendChild(supRow);
277376
277376
  return msubsup;
277377
- }, MATHML_NS$6 = "http://www.w3.org/1998/Math/MathML", DEFAULT_ACCENT_CHAR = "̂", COMBINING_TO_SPACING, convertAccent = (node3, doc$12, convertChildren) => {
277377
+ }, MATHML_NS$7 = "http://www.w3.org/1998/Math/MathML", DEFAULT_ACCENT_CHAR = "̂", COMBINING_TO_SPACING, convertAccent = (node3, doc$12, convertChildren) => {
277378
277378
  const elements = node3.elements ?? [];
277379
277379
  const base5 = elements.find((e) => e.name === "m:e");
277380
277380
  if (!base5)
@@ -277382,37 +277382,37 @@ var Node$13 = class Node$14 {
277382
277382
  const chr = elements.find((e) => e.name === "m:accPr")?.elements?.find((e) => e.name === "m:chr");
277383
277383
  const rawVal = chr?.attributes?.["m:val"];
277384
277384
  const accentChar = chr === undefined ? DEFAULT_ACCENT_CHAR : rawVal && rawVal.length > 0 ? rawVal : "";
277385
- const baseRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
277385
+ const baseRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277386
277386
  baseRow.appendChild(convertChildren(base5.elements ?? []));
277387
277387
  if (!accentChar)
277388
277388
  return baseRow;
277389
277389
  const renderChar = COMBINING_TO_SPACING[accentChar] ?? accentChar;
277390
- const mover = doc$12.createElementNS(MATHML_NS$6, "mover");
277390
+ const mover = doc$12.createElementNS(MATHML_NS$7, "mover");
277391
277391
  mover.setAttribute("accent", "true");
277392
277392
  mover.appendChild(baseRow);
277393
- const mo = doc$12.createElementNS(MATHML_NS$6, "mo");
277393
+ const mo = doc$12.createElementNS(MATHML_NS$7, "mo");
277394
277394
  mo.setAttribute("stretchy", "true");
277395
277395
  mo.textContent = renderChar;
277396
277396
  mover.appendChild(mo);
277397
277397
  return mover;
277398
- }, MATHML_NS$5 = "http://www.w3.org/1998/Math/MathML", convertPreSubSuperscript = (node3, doc$12, convertChildren) => {
277398
+ }, MATHML_NS$6 = "http://www.w3.org/1998/Math/MathML", convertPreSubSuperscript = (node3, doc$12, convertChildren) => {
277399
277399
  const elements = node3.elements ?? [];
277400
277400
  const base5 = elements.find((e) => e.name === "m:e");
277401
277401
  const sub = elements.find((e) => e.name === "m:sub");
277402
277402
  const sup = elements.find((e) => e.name === "m:sup");
277403
- const mmultiscripts = doc$12.createElementNS(MATHML_NS$5, "mmultiscripts");
277404
- const baseRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
277403
+ const mmultiscripts = doc$12.createElementNS(MATHML_NS$6, "mmultiscripts");
277404
+ const baseRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
277405
277405
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277406
277406
  mmultiscripts.appendChild(baseRow);
277407
- mmultiscripts.appendChild(doc$12.createElementNS(MATHML_NS$5, "mprescripts"));
277408
- const subRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
277407
+ mmultiscripts.appendChild(doc$12.createElementNS(MATHML_NS$6, "mprescripts"));
277408
+ const subRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
277409
277409
  subRow.appendChild(convertChildren(sub?.elements ?? []));
277410
277410
  mmultiscripts.appendChild(subRow);
277411
- const supRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
277411
+ const supRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
277412
277412
  supRow.appendChild(convertChildren(sup?.elements ?? []));
277413
277413
  mmultiscripts.appendChild(supRow);
277414
277414
  return mmultiscripts;
277415
- }, MATHML_NS$4 = "http://www.w3.org/1998/Math/MathML", stripAlignmentMarkers = (nodes) => nodes.map((node3) => {
277415
+ }, MATHML_NS$5 = "http://www.w3.org/1998/Math/MathML", stripAlignmentMarkers = (nodes) => nodes.map((node3) => {
277416
277416
  if (node3?.type === "text" && typeof node3.text === "string" && node3.text.includes("&"))
277417
277417
  return {
277418
277418
  ...node3,
@@ -277426,12 +277426,12 @@ var Node$13 = class Node$14 {
277426
277426
  return node3;
277427
277427
  }), convertEquationArray = (node3, doc$12, convertChildren) => {
277428
277428
  const rows = (node3.elements ?? []).filter((e) => e.name === "m:e");
277429
- const mtable = doc$12.createElementNS(MATHML_NS$4, "mtable");
277429
+ const mtable = doc$12.createElementNS(MATHML_NS$5, "mtable");
277430
277430
  mtable.setAttribute("columnalign", "left");
277431
277431
  for (const row2 of rows) {
277432
- const mtr = doc$12.createElementNS(MATHML_NS$4, "mtr");
277433
- const mtd = doc$12.createElementNS(MATHML_NS$4, "mtd");
277434
- const mrow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277432
+ const mtr = doc$12.createElementNS(MATHML_NS$5, "mtr");
277433
+ const mtd = doc$12.createElementNS(MATHML_NS$5, "mtd");
277434
+ const mrow = doc$12.createElementNS(MATHML_NS$5, "mrow");
277435
277435
  const cleanedChildren = stripAlignmentMarkers(row2.elements ?? []);
277436
277436
  mrow.appendChild(convertChildren(cleanedChildren));
277437
277437
  mtd.appendChild(mrow);
@@ -277439,7 +277439,7 @@ var Node$13 = class Node$14 {
277439
277439
  mtable.appendChild(mtr);
277440
277440
  }
277441
277441
  return mtable.childNodes.length > 0 ? mtable : null;
277442
- }, MATHML_NS$3 = "http://www.w3.org/1998/Math/MathML", convertRadical = (node3, doc$12, convertChildren) => {
277442
+ }, MATHML_NS$4 = "http://www.w3.org/1998/Math/MathML", convertRadical = (node3, doc$12, convertChildren) => {
277443
277443
  const elements = node3.elements ?? [];
277444
277444
  const radPr = elements.find((e) => e.name === "m:radPr");
277445
277445
  const deg = elements.find((e) => e.name === "m:deg");
@@ -277447,44 +277447,111 @@ var Node$13 = class Node$14 {
277447
277447
  const degHideEl = radPr?.elements?.find((e) => e.name === "m:degHide");
277448
277448
  const degHideVal = degHideEl?.attributes?.["m:val"];
277449
277449
  if (degHideEl !== undefined && degHideVal !== "0" && degHideVal !== "false" && degHideVal !== "off" || !deg || (deg.elements ?? []).length === 0) {
277450
- const msqrt = doc$12.createElementNS(MATHML_NS$3, "msqrt");
277451
- const radicandRow$1 = doc$12.createElementNS(MATHML_NS$3, "mrow");
277450
+ const msqrt = doc$12.createElementNS(MATHML_NS$4, "msqrt");
277451
+ const radicandRow$1 = doc$12.createElementNS(MATHML_NS$4, "mrow");
277452
277452
  radicandRow$1.appendChild(convertChildren(radicand?.elements ?? []));
277453
277453
  msqrt.appendChild(radicandRow$1);
277454
277454
  return msqrt;
277455
277455
  }
277456
- const mroot = doc$12.createElementNS(MATHML_NS$3, "mroot");
277457
- const radicandRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
277456
+ const mroot = doc$12.createElementNS(MATHML_NS$4, "mroot");
277457
+ const radicandRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277458
277458
  radicandRow.appendChild(convertChildren(radicand?.elements ?? []));
277459
277459
  mroot.appendChild(radicandRow);
277460
- const degRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
277460
+ const degRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277461
277461
  degRow.appendChild(convertChildren(deg?.elements ?? []));
277462
277462
  mroot.appendChild(degRow);
277463
277463
  return mroot;
277464
- }, MATHML_NS$2 = "http://www.w3.org/1998/Math/MathML", convertLowerLimit = (node3, doc$12, convertChildren) => {
277464
+ }, MATHML_NS$3 = "http://www.w3.org/1998/Math/MathML", convertLowerLimit = (node3, doc$12, convertChildren) => {
277465
277465
  const elements = node3.elements ?? [];
277466
277466
  const base5 = elements.find((e) => e.name === "m:e");
277467
277467
  const lim = elements.find((e) => e.name === "m:lim");
277468
- const munder = doc$12.createElementNS(MATHML_NS$2, "munder");
277469
- const baseRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277468
+ const munder = doc$12.createElementNS(MATHML_NS$3, "munder");
277469
+ const baseRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
277470
277470
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277471
277471
  munder.appendChild(baseRow);
277472
- const limRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277472
+ const limRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
277473
277473
  limRow.appendChild(convertChildren(lim?.elements ?? []));
277474
277474
  munder.appendChild(limRow);
277475
277475
  return munder;
277476
- }, MATHML_NS$1 = "http://www.w3.org/1998/Math/MathML", convertUpperLimit = (node3, doc$12, convertChildren) => {
277476
+ }, MATHML_NS$2 = "http://www.w3.org/1998/Math/MathML", convertUpperLimit = (node3, doc$12, convertChildren) => {
277477
277477
  const elements = node3.elements ?? [];
277478
277478
  const base5 = elements.find((e) => e.name === "m:e");
277479
277479
  const lim = elements.find((e) => e.name === "m:lim");
277480
- const mover = doc$12.createElementNS(MATHML_NS$1, "mover");
277481
- const baseRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277480
+ const mover = doc$12.createElementNS(MATHML_NS$2, "mover");
277481
+ const baseRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277482
277482
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277483
277483
  mover.appendChild(baseRow);
277484
- const limRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277484
+ const limRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277485
277485
  limRow.appendChild(convertChildren(lim?.elements ?? []));
277486
277486
  mover.appendChild(limRow);
277487
277487
  return mover;
277488
+ }, MATHML_NS$1 = "http://www.w3.org/1998/Math/MathML", DEFAULT_NARY_CHAR = "∫", INTEGRAL_CHARS, convertNary = (node3, doc$12, convertChildren) => {
277489
+ const elements = node3.elements ?? [];
277490
+ const naryPr = elements.find((e) => e.name === "m:naryPr");
277491
+ const sub = elements.find((e) => e.name === "m:sub");
277492
+ const sup = elements.find((e) => e.name === "m:sup");
277493
+ const body = elements.find((e) => e.name === "m:e");
277494
+ const chr = naryPr?.elements?.find((e) => e.name === "m:chr");
277495
+ const limLoc = naryPr?.elements?.find((e) => e.name === "m:limLoc");
277496
+ const subHide = naryPr?.elements?.find((e) => e.name === "m:subHide");
277497
+ const supHide = naryPr?.elements?.find((e) => e.name === "m:supHide");
277498
+ const grow = naryPr?.elements?.find((e) => e.name === "m:grow");
277499
+ const opChar = chr === undefined ? DEFAULT_NARY_CHAR : chr.attributes?.["m:val"] ?? "";
277500
+ const limLocVal = limLoc?.attributes?.["m:val"];
277501
+ const isUndOvr = limLocVal === "undOvr" || limLoc !== undefined && limLocVal === undefined || limLoc === undefined && opChar !== "" && !INTEGRAL_CHARS.test(opChar);
277502
+ const isStOnOffTrue = (el) => el !== undefined && (el.attributes?.["m:val"] === "1" || el.attributes?.["m:val"] === "on" || el.attributes?.["m:val"] === "true" || !el.attributes);
277503
+ const subHidden = isStOnOffTrue(subHide);
277504
+ const supHidden = isStOnOffTrue(supHide);
277505
+ const stripCtrl = (el) => (el?.elements ?? []).filter((e) => e.name !== "m:ctrlPr");
277506
+ const subChildren = stripCtrl(sub);
277507
+ const supChildren = stripCtrl(sup);
277508
+ const promotedToSup = subHidden && !supHidden ? subChildren : [];
277509
+ const promotedToSub = supHidden && !subHidden ? supChildren : [];
277510
+ const renderSubChildren = subHidden ? [] : [...subChildren, ...promotedToSub];
277511
+ const renderSupChildren = supHidden ? [] : [...promotedToSup, ...supChildren];
277512
+ const hasSub = renderSubChildren.length > 0 || sub !== undefined && !subHidden;
277513
+ const hasSup = renderSupChildren.length > 0 || sup !== undefined && !supHidden;
277514
+ const growOff = grow !== undefined && !isStOnOffTrue(grow);
277515
+ const mo = doc$12.createElementNS(MATHML_NS$1, "mo");
277516
+ mo.textContent = opChar;
277517
+ if (growOff) {
277518
+ mo.setAttribute("largeop", "false");
277519
+ mo.setAttribute("stretchy", "false");
277520
+ }
277521
+ let operatorEl;
277522
+ if (hasSub && hasSup) {
277523
+ const tag = isUndOvr ? "munderover" : "msubsup";
277524
+ operatorEl = doc$12.createElementNS(MATHML_NS$1, tag);
277525
+ operatorEl.appendChild(mo);
277526
+ const subRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277527
+ subRow.appendChild(convertChildren(renderSubChildren));
277528
+ operatorEl.appendChild(subRow);
277529
+ const supRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277530
+ supRow.appendChild(convertChildren(renderSupChildren));
277531
+ operatorEl.appendChild(supRow);
277532
+ } else if (hasSub) {
277533
+ const tag = isUndOvr ? "munder" : "msub";
277534
+ operatorEl = doc$12.createElementNS(MATHML_NS$1, tag);
277535
+ operatorEl.appendChild(mo);
277536
+ const subRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277537
+ subRow.appendChild(convertChildren(renderSubChildren));
277538
+ operatorEl.appendChild(subRow);
277539
+ } else if (hasSup) {
277540
+ const tag = isUndOvr ? "mover" : "msup";
277541
+ operatorEl = doc$12.createElementNS(MATHML_NS$1, tag);
277542
+ operatorEl.appendChild(mo);
277543
+ const supRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277544
+ supRow.appendChild(convertChildren(renderSupChildren));
277545
+ operatorEl.appendChild(supRow);
277546
+ } else
277547
+ operatorEl = mo;
277548
+ const wrapper = doc$12.createElementNS(MATHML_NS$1, "mrow");
277549
+ wrapper.appendChild(operatorEl);
277550
+ const bodyRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277551
+ bodyRow.appendChild(convertChildren(body?.elements ?? []));
277552
+ if (bodyRow.childNodes.length > 0)
277553
+ wrapper.appendChild(bodyRow);
277554
+ return wrapper;
277488
277555
  }, 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) => {
277489
277556
  if (typeof value !== "string")
277490
277557
  return null;
@@ -287600,7 +287667,7 @@ var Node$13 = class Node$14 {
287600
287667
  return;
287601
287668
  console.log(...args$1);
287602
287669
  }, 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;
287603
- var init_src_CZB4kJvn_es = __esm(() => {
287670
+ var init_src_DZzZDECe_es = __esm(() => {
287604
287671
  init_rolldown_runtime_Bg48TavK_es();
287605
287672
  init_SuperConverter_CWhofwLf_es();
287606
287673
  init_jszip_C49i9kUs_es();
@@ -313367,6 +313434,7 @@ function print() { __p += __j.call(arguments, '') }
313367
313434
  "⃖": "←",
313368
313435
  "⃗": "→"
313369
313436
  };
313437
+ INTEGRAL_CHARS = /^[\u222B-\u2233]$/;
313370
313438
  MATH_OBJECT_REGISTRY = {
313371
313439
  "m:r": convertMathRun,
313372
313440
  "m:acc": convertAccent,
@@ -313377,6 +313445,7 @@ function print() { __p += __j.call(arguments, '') }
313377
313445
  "m:func": convertFunction,
313378
313446
  "m:limLow": convertLowerLimit,
313379
313447
  "m:limUpp": convertUpperLimit,
313448
+ "m:nary": convertNary,
313380
313449
  "m:rad": convertRadical,
313381
313450
  "m:sSub": convertSubscript,
313382
313451
  "m:sSup": convertSuperscript,
@@ -313386,7 +313455,6 @@ function print() { __p += __j.call(arguments, '') }
313386
313455
  "m:box": null,
313387
313456
  "m:groupChr": null,
313388
313457
  "m:m": null,
313389
- "m:nary": null,
313390
313458
  "m:phant": null
313391
313459
  };
313392
313460
  ARGUMENT_ELEMENTS = new Set([
@@ -322358,7 +322426,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
322358
322426
 
322359
322427
  // ../../packages/superdoc/dist/super-editor.es.js
322360
322428
  var init_super_editor_es = __esm(() => {
322361
- init_src_CZB4kJvn_es();
322429
+ init_src_DZzZDECe_es();
322362
322430
  init_SuperConverter_CWhofwLf_es();
322363
322431
  init_jszip_C49i9kUs_es();
322364
322432
  init_xml_js_CqGKpaft_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.7.0-next.10",
3
+ "version": "0.7.0-next.11",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -25,8 +25,8 @@
25
25
  "@types/ws": "^8.5.13",
26
26
  "typescript": "^5.9.2",
27
27
  "@superdoc/document-api": "0.0.1",
28
- "@superdoc/pm-adapter": "0.0.0",
29
28
  "@superdoc/super-editor": "0.0.1",
29
+ "@superdoc/pm-adapter": "0.0.0",
30
30
  "superdoc": "1.26.0"
31
31
  },
32
32
  "module": "src/index.ts",
@@ -34,11 +34,11 @@
34
34
  "access": "public"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@superdoc-dev/cli-darwin-arm64": "0.7.0-next.10",
38
- "@superdoc-dev/cli-darwin-x64": "0.7.0-next.10",
39
- "@superdoc-dev/cli-linux-x64": "0.7.0-next.10",
40
- "@superdoc-dev/cli-windows-x64": "0.7.0-next.10",
41
- "@superdoc-dev/cli-linux-arm64": "0.7.0-next.10"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.7.0-next.11",
38
+ "@superdoc-dev/cli-darwin-x64": "0.7.0-next.11",
39
+ "@superdoc-dev/cli-linux-x64": "0.7.0-next.11",
40
+ "@superdoc-dev/cli-windows-x64": "0.7.0-next.11",
41
+ "@superdoc-dev/cli-linux-arm64": "0.7.0-next.11"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",