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

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 +111 -79
  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-DZzZDECe.es.js
204338
+ // ../../packages/superdoc/dist/chunks/src-BRXXove8.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$15 = "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$16 = "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$15, tag);
277256
+ const el = doc$12.createElementNS(MATHML_NS$16, tag);
277257
277257
  el.textContent = text5;
277258
277258
  if (variant)
277259
277259
  el.setAttribute("mathvariant", variant);
277260
277260
  return el;
277261
- }, MATHML_NS$14 = "http://www.w3.org/1998/Math/MathML", convertFraction = (node3, doc$12, convertChildren) => {
277261
+ }, MATHML_NS$15 = "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$14, "mfrac");
277266
- const numRow = doc$12.createElementNS(MATHML_NS$14, "mrow");
277265
+ const frac = doc$12.createElementNS(MATHML_NS$15, "mfrac");
277266
+ const numRow = doc$12.createElementNS(MATHML_NS$15, "mrow");
277267
277267
  numRow.appendChild(convertChildren(num?.elements ?? []));
277268
277268
  frac.appendChild(numRow);
277269
- const denRow = doc$12.createElementNS(MATHML_NS$14, "mrow");
277269
+ const denRow = doc$12.createElementNS(MATHML_NS$15, "mrow");
277270
277270
  denRow.appendChild(convertChildren(den?.elements ?? []));
277271
277271
  frac.appendChild(denRow);
277272
277272
  return frac;
277273
- }, MATHML_NS$13 = "http://www.w3.org/1998/Math/MathML", convertBar = (node3, doc$12, convertChildren) => {
277273
+ }, MATHML_NS$14 = "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$13, isUnder ? "munder" : "mover");
277277
+ const wrapper = doc$12.createElementNS(MATHML_NS$14, isUnder ? "munder" : "mover");
277278
277278
  const baseContent = convertChildren(base5?.elements ?? []);
277279
- const mrow = doc$12.createElementNS(MATHML_NS$13, "mrow");
277279
+ const mrow = doc$12.createElementNS(MATHML_NS$14, "mrow");
277280
277280
  mrow.appendChild(baseContent);
277281
277281
  wrapper.appendChild(mrow);
277282
- const accent = doc$12.createElementNS(MATHML_NS$13, "mo");
277282
+ const accent = doc$12.createElementNS(MATHML_NS$14, "mo");
277283
277283
  accent.setAttribute("stretchy", "true");
277284
277284
  accent.textContent = "‾";
277285
277285
  wrapper.appendChild(accent);
277286
277286
  return wrapper;
277287
- }, MATHML_NS$12 = "http://www.w3.org/1998/Math/MathML", FUNCTION_APPLY_OPERATOR = "⁡", convertFunction = (node3, doc$12, convertChildren) => {
277287
+ }, MATHML_NS$13 = "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$12, "mrow");
277292
- const functionNameRow = doc$12.createElementNS(MATHML_NS$12, "mrow");
277291
+ const wrapper = doc$12.createElementNS(MATHML_NS$13, "mrow");
277292
+ const functionNameRow = doc$12.createElementNS(MATHML_NS$13, "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$12, "mrow");
277297
+ const argumentRow = doc$12.createElementNS(MATHML_NS$13, "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$12, "mo");
277300
+ const applyOperator = doc$12.createElementNS(MATHML_NS$13, "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$11 = "http://www.w3.org/1998/Math/MathML", DEFAULT_BEGIN_DELIMITER = "(", DEFAULT_END_DELIMITER = ")", DEFAULT_SEPARATOR_DELIMITER = "│", convertDelimiter = (node3, doc$12, convertChildren) => {
277307
+ }, MATHML_NS$12 = "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$11, "mrow");
277315
- const begin = doc$12.createElementNS(MATHML_NS$11, "mo");
277314
+ const wrapper = doc$12.createElementNS(MATHML_NS$12, "mrow");
277315
+ const begin = doc$12.createElementNS(MATHML_NS$12, "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$11, "mo");
277324
+ const separator = doc$12.createElementNS(MATHML_NS$12, "mo");
277325
277325
  separator.textContent = separatorDelimiter;
277326
277326
  wrapper.appendChild(separator);
277327
277327
  }
277328
- const group = doc$12.createElementNS(MATHML_NS$11, "mrow");
277328
+ const group = doc$12.createElementNS(MATHML_NS$12, "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$11, "mo");
277333
+ const end$1 = doc$12.createElementNS(MATHML_NS$12, "mo");
277334
277334
  end$1.textContent = endDelimiter;
277335
277335
  wrapper.appendChild(end$1);
277336
277336
  return wrapper;
277337
- }, MATHML_NS$10 = "http://www.w3.org/1998/Math/MathML", convertSubscript = (node3, doc$12, convertChildren) => {
277337
+ }, MATHML_NS$11 = "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$10, "msub");
277342
- const baseRow = doc$12.createElementNS(MATHML_NS$10, "mrow");
277341
+ const msub = doc$12.createElementNS(MATHML_NS$11, "msub");
277342
+ const baseRow = doc$12.createElementNS(MATHML_NS$11, "mrow");
277343
277343
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277344
277344
  msub.appendChild(baseRow);
277345
- const subRow = doc$12.createElementNS(MATHML_NS$10, "mrow");
277345
+ const subRow = doc$12.createElementNS(MATHML_NS$11, "mrow");
277346
277346
  subRow.appendChild(convertChildren(sub?.elements ?? []));
277347
277347
  msub.appendChild(subRow);
277348
277348
  return msub;
277349
- }, MATHML_NS$9 = "http://www.w3.org/1998/Math/MathML", convertSuperscript = (node3, doc$12, convertChildren) => {
277349
+ }, MATHML_NS$10 = "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$9, "msup");
277354
- const baseRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277353
+ const msup = doc$12.createElementNS(MATHML_NS$10, "msup");
277354
+ const baseRow = doc$12.createElementNS(MATHML_NS$10, "mrow");
277355
277355
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277356
277356
  msup.appendChild(baseRow);
277357
- const supRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277357
+ const supRow = doc$12.createElementNS(MATHML_NS$10, "mrow");
277358
277358
  supRow.appendChild(convertChildren(sup?.elements ?? []));
277359
277359
  msup.appendChild(supRow);
277360
277360
  return msup;
277361
- }, MATHML_NS$8 = "http://www.w3.org/1998/Math/MathML", convertSubSuperscript = (node3, doc$12, convertChildren) => {
277361
+ }, MATHML_NS$9 = "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$8, "msubsup");
277367
- const baseRow = doc$12.createElementNS(MATHML_NS$8, "mrow");
277366
+ const msubsup = doc$12.createElementNS(MATHML_NS$9, "msubsup");
277367
+ const baseRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277368
277368
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277369
277369
  msubsup.appendChild(baseRow);
277370
- const subRow = doc$12.createElementNS(MATHML_NS$8, "mrow");
277370
+ const subRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277371
277371
  subRow.appendChild(convertChildren(sub?.elements ?? []));
277372
277372
  msubsup.appendChild(subRow);
277373
- const supRow = doc$12.createElementNS(MATHML_NS$8, "mrow");
277373
+ const supRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277374
277374
  supRow.appendChild(convertChildren(sup?.elements ?? []));
277375
277375
  msubsup.appendChild(supRow);
277376
277376
  return msubsup;
277377
- }, MATHML_NS$7 = "http://www.w3.org/1998/Math/MathML", DEFAULT_ACCENT_CHAR = "̂", COMBINING_TO_SPACING, convertAccent = (node3, doc$12, convertChildren) => {
277377
+ }, MATHML_NS$8 = "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$7, "mrow");
277385
+ const baseRow = doc$12.createElementNS(MATHML_NS$8, "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$7, "mover");
277390
+ const mover = doc$12.createElementNS(MATHML_NS$8, "mover");
277391
277391
  mover.setAttribute("accent", "true");
277392
277392
  mover.appendChild(baseRow);
277393
- const mo = doc$12.createElementNS(MATHML_NS$7, "mo");
277393
+ const mo = doc$12.createElementNS(MATHML_NS$8, "mo");
277394
277394
  mo.setAttribute("stretchy", "true");
277395
277395
  mo.textContent = renderChar;
277396
277396
  mover.appendChild(mo);
277397
277397
  return mover;
277398
- }, MATHML_NS$6 = "http://www.w3.org/1998/Math/MathML", convertPreSubSuperscript = (node3, doc$12, convertChildren) => {
277398
+ }, MATHML_NS$7 = "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$6, "mmultiscripts");
277404
- const baseRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
277403
+ const mmultiscripts = doc$12.createElementNS(MATHML_NS$7, "mmultiscripts");
277404
+ const baseRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277405
277405
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277406
277406
  mmultiscripts.appendChild(baseRow);
277407
- mmultiscripts.appendChild(doc$12.createElementNS(MATHML_NS$6, "mprescripts"));
277408
- const subRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
277407
+ mmultiscripts.appendChild(doc$12.createElementNS(MATHML_NS$7, "mprescripts"));
277408
+ const subRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277409
277409
  subRow.appendChild(convertChildren(sub?.elements ?? []));
277410
277410
  mmultiscripts.appendChild(subRow);
277411
- const supRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
277411
+ const supRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277412
277412
  supRow.appendChild(convertChildren(sup?.elements ?? []));
277413
277413
  mmultiscripts.appendChild(supRow);
277414
277414
  return mmultiscripts;
277415
- }, MATHML_NS$5 = "http://www.w3.org/1998/Math/MathML", stripAlignmentMarkers = (nodes) => nodes.map((node3) => {
277415
+ }, MATHML_NS$6 = "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$5, "mtable");
277429
+ const mtable = doc$12.createElementNS(MATHML_NS$6, "mtable");
277430
277430
  mtable.setAttribute("columnalign", "left");
277431
277431
  for (const row2 of rows) {
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");
277432
+ const mtr = doc$12.createElementNS(MATHML_NS$6, "mtr");
277433
+ const mtd = doc$12.createElementNS(MATHML_NS$6, "mtd");
277434
+ const mrow = doc$12.createElementNS(MATHML_NS$6, "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$4 = "http://www.w3.org/1998/Math/MathML", convertRadical = (node3, doc$12, convertChildren) => {
277442
+ }, MATHML_NS$5 = "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,45 +277447,45 @@ 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$4, "msqrt");
277451
- const radicandRow$1 = doc$12.createElementNS(MATHML_NS$4, "mrow");
277450
+ const msqrt = doc$12.createElementNS(MATHML_NS$5, "msqrt");
277451
+ const radicandRow$1 = doc$12.createElementNS(MATHML_NS$5, "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$4, "mroot");
277457
- const radicandRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277456
+ const mroot = doc$12.createElementNS(MATHML_NS$5, "mroot");
277457
+ const radicandRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
277458
277458
  radicandRow.appendChild(convertChildren(radicand?.elements ?? []));
277459
277459
  mroot.appendChild(radicandRow);
277460
- const degRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277460
+ const degRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
277461
277461
  degRow.appendChild(convertChildren(deg?.elements ?? []));
277462
277462
  mroot.appendChild(degRow);
277463
277463
  return mroot;
277464
- }, MATHML_NS$3 = "http://www.w3.org/1998/Math/MathML", convertLowerLimit = (node3, doc$12, convertChildren) => {
277464
+ }, MATHML_NS$4 = "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$3, "munder");
277469
- const baseRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
277468
+ const munder = doc$12.createElementNS(MATHML_NS$4, "munder");
277469
+ const baseRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277470
277470
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277471
277471
  munder.appendChild(baseRow);
277472
- const limRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
277472
+ const limRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277473
277473
  limRow.appendChild(convertChildren(lim?.elements ?? []));
277474
277474
  munder.appendChild(limRow);
277475
277475
  return munder;
277476
- }, MATHML_NS$2 = "http://www.w3.org/1998/Math/MathML", convertUpperLimit = (node3, doc$12, convertChildren) => {
277476
+ }, MATHML_NS$3 = "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$2, "mover");
277481
- const baseRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277480
+ const mover = doc$12.createElementNS(MATHML_NS$3, "mover");
277481
+ const baseRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
277482
277482
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277483
277483
  mover.appendChild(baseRow);
277484
- const limRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277484
+ const limRow = doc$12.createElementNS(MATHML_NS$3, "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) => {
277488
+ }, MATHML_NS$2 = "http://www.w3.org/1998/Math/MathML", DEFAULT_NARY_CHAR = "∫", INTEGRAL_CHARS, convertNary = (node3, doc$12, convertChildren) => {
277489
277489
  const elements = node3.elements ?? [];
277490
277490
  const naryPr = elements.find((e) => e.name === "m:naryPr");
277491
277491
  const sub = elements.find((e) => e.name === "m:sub");
@@ -277512,7 +277512,7 @@ var Node$13 = class Node$14 {
277512
277512
  const hasSub = renderSubChildren.length > 0 || sub !== undefined && !subHidden;
277513
277513
  const hasSup = renderSupChildren.length > 0 || sup !== undefined && !supHidden;
277514
277514
  const growOff = grow !== undefined && !isStOnOffTrue(grow);
277515
- const mo = doc$12.createElementNS(MATHML_NS$1, "mo");
277515
+ const mo = doc$12.createElementNS(MATHML_NS$2, "mo");
277516
277516
  mo.textContent = opChar;
277517
277517
  if (growOff) {
277518
277518
  mo.setAttribute("largeop", "false");
@@ -277521,37 +277521,69 @@ var Node$13 = class Node$14 {
277521
277521
  let operatorEl;
277522
277522
  if (hasSub && hasSup) {
277523
277523
  const tag = isUndOvr ? "munderover" : "msubsup";
277524
- operatorEl = doc$12.createElementNS(MATHML_NS$1, tag);
277524
+ operatorEl = doc$12.createElementNS(MATHML_NS$2, tag);
277525
277525
  operatorEl.appendChild(mo);
277526
- const subRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277526
+ const subRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277527
277527
  subRow.appendChild(convertChildren(renderSubChildren));
277528
277528
  operatorEl.appendChild(subRow);
277529
- const supRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277529
+ const supRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277530
277530
  supRow.appendChild(convertChildren(renderSupChildren));
277531
277531
  operatorEl.appendChild(supRow);
277532
277532
  } else if (hasSub) {
277533
277533
  const tag = isUndOvr ? "munder" : "msub";
277534
- operatorEl = doc$12.createElementNS(MATHML_NS$1, tag);
277534
+ operatorEl = doc$12.createElementNS(MATHML_NS$2, tag);
277535
277535
  operatorEl.appendChild(mo);
277536
- const subRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277536
+ const subRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277537
277537
  subRow.appendChild(convertChildren(renderSubChildren));
277538
277538
  operatorEl.appendChild(subRow);
277539
277539
  } else if (hasSup) {
277540
277540
  const tag = isUndOvr ? "mover" : "msup";
277541
- operatorEl = doc$12.createElementNS(MATHML_NS$1, tag);
277541
+ operatorEl = doc$12.createElementNS(MATHML_NS$2, tag);
277542
277542
  operatorEl.appendChild(mo);
277543
- const supRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277543
+ const supRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277544
277544
  supRow.appendChild(convertChildren(renderSupChildren));
277545
277545
  operatorEl.appendChild(supRow);
277546
277546
  } else
277547
277547
  operatorEl = mo;
277548
- const wrapper = doc$12.createElementNS(MATHML_NS$1, "mrow");
277548
+ const wrapper = doc$12.createElementNS(MATHML_NS$2, "mrow");
277549
277549
  wrapper.appendChild(operatorEl);
277550
- const bodyRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277550
+ const bodyRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277551
277551
  bodyRow.appendChild(convertChildren(body?.elements ?? []));
277552
277552
  if (bodyRow.childNodes.length > 0)
277553
277553
  wrapper.appendChild(bodyRow);
277554
277554
  return wrapper;
277555
+ }, MATHML_NS$1 = "http://www.w3.org/1998/Math/MathML", convertPhantom = (node3, doc$12, convertChildren) => {
277556
+ const elements = node3.elements ?? [];
277557
+ const phantPr = elements.find((e) => e.name === "m:phantPr");
277558
+ const base5 = elements.find((e) => e.name === "m:e");
277559
+ const show = phantPr?.elements?.find((e) => e.name === "m:show");
277560
+ const zeroWid = phantPr?.elements?.find((e) => e.name === "m:zeroWid");
277561
+ const zeroAsc = phantPr?.elements?.find((e) => e.name === "m:zeroAsc");
277562
+ const zeroDesc = phantPr?.elements?.find((e) => e.name === "m:zeroDesc");
277563
+ const isOnOffTrue = (val) => val === "1" || val === "on" || val === "true";
277564
+ const isVisible$1 = show == null || !show.attributes || isOnOffTrue(show.attributes["m:val"]);
277565
+ const hasZeroDimension = zeroWid || zeroAsc || zeroDesc;
277566
+ const content3 = convertChildren(base5?.elements ?? []);
277567
+ if (!isVisible$1 && !hasZeroDimension) {
277568
+ const mphantom = doc$12.createElementNS(MATHML_NS$1, "mphantom");
277569
+ mphantom.appendChild(content3);
277570
+ return mphantom;
277571
+ }
277572
+ const mpadded = doc$12.createElementNS(MATHML_NS$1, "mpadded");
277573
+ const isZeroVal = (el) => el && (isOnOffTrue(el.attributes?.["m:val"]) || !el.attributes);
277574
+ if (isZeroVal(zeroWid))
277575
+ mpadded.setAttribute("width", "0");
277576
+ if (isZeroVal(zeroAsc))
277577
+ mpadded.setAttribute("height", "0");
277578
+ if (isZeroVal(zeroDesc))
277579
+ mpadded.setAttribute("depth", "0");
277580
+ if (!isVisible$1) {
277581
+ const mphantom = doc$12.createElementNS(MATHML_NS$1, "mphantom");
277582
+ mphantom.appendChild(content3);
277583
+ mpadded.appendChild(mphantom);
277584
+ } else
277585
+ mpadded.appendChild(content3);
277586
+ return mpadded;
277555
277587
  }, 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) => {
277556
277588
  if (typeof value !== "string")
277557
277589
  return null;
@@ -287667,7 +287699,7 @@ var Node$13 = class Node$14 {
287667
287699
  return;
287668
287700
  console.log(...args$1);
287669
287701
  }, 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;
287670
- var init_src_DZzZDECe_es = __esm(() => {
287702
+ var init_src_BRXXove8_es = __esm(() => {
287671
287703
  init_rolldown_runtime_Bg48TavK_es();
287672
287704
  init_SuperConverter_CWhofwLf_es();
287673
287705
  init_jszip_C49i9kUs_es();
@@ -313446,6 +313478,7 @@ function print() { __p += __j.call(arguments, '') }
313446
313478
  "m:limLow": convertLowerLimit,
313447
313479
  "m:limUpp": convertUpperLimit,
313448
313480
  "m:nary": convertNary,
313481
+ "m:phant": convertPhantom,
313449
313482
  "m:rad": convertRadical,
313450
313483
  "m:sSub": convertSubscript,
313451
313484
  "m:sSup": convertSuperscript,
@@ -313454,8 +313487,7 @@ function print() { __p += __j.call(arguments, '') }
313454
313487
  "m:borderBox": null,
313455
313488
  "m:box": null,
313456
313489
  "m:groupChr": null,
313457
- "m:m": null,
313458
- "m:phant": null
313490
+ "m:m": null
313459
313491
  };
313460
313492
  ARGUMENT_ELEMENTS = new Set([
313461
313493
  "m:e",
@@ -322426,7 +322458,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
322426
322458
 
322427
322459
  // ../../packages/superdoc/dist/super-editor.es.js
322428
322460
  var init_super_editor_es = __esm(() => {
322429
- init_src_DZzZDECe_es();
322461
+ init_src_BRXXove8_es();
322430
322462
  init_SuperConverter_CWhofwLf_es();
322431
322463
  init_jszip_C49i9kUs_es();
322432
322464
  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.11",
3
+ "version": "0.7.0-next.12",
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/super-editor": "0.0.1",
29
28
  "@superdoc/pm-adapter": "0.0.0",
29
+ "@superdoc/super-editor": "0.0.1",
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.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"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.7.0-next.12",
38
+ "@superdoc-dev/cli-linux-x64": "0.7.0-next.12",
39
+ "@superdoc-dev/cli-darwin-x64": "0.7.0-next.12",
40
+ "@superdoc-dev/cli-linux-arm64": "0.7.0-next.12",
41
+ "@superdoc-dev/cli-windows-x64": "0.7.0-next.12"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",