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

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 +144 -84
  2. package/package.json +8 -8
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-BRXXove8.es.js
204338
+ // ../../packages/superdoc/dist/chunks/src-CXW8xV2H.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) => {
@@ -245509,6 +245509,14 @@ function getDelimiterValue(properties, name, fallback) {
245509
245509
  return fallback;
245510
245510
  return property.attributes?.["m:val"] ?? "";
245511
245511
  }
245512
+ function isPlaceholderHidden(plcHide) {
245513
+ if (!plcHide)
245514
+ return false;
245515
+ const val = plcHide.attributes?.["m:val"];
245516
+ if (val === undefined)
245517
+ return true;
245518
+ return val === "1" || val === "true";
245519
+ }
245512
245520
  function convertChildNodes(children, doc$12) {
245513
245521
  const fragment2 = doc$12.createDocumentFragment();
245514
245522
  for (const child of children) {
@@ -277239,7 +277247,7 @@ var Node$13 = class Node$14 {
277239
277247
  }
277240
277248
  element3.style.textAlign = resolveTextAlign(attrs?.alignment, rtl);
277241
277249
  return rtl;
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) => {
277250
+ }, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, MATHML_NS$18 = "http://www.w3.org/1998/Math/MathML", OPERATOR_CHARS, STY_TO_VARIANT, SCR_TO_VARIANT, convertMathRun = (node3, doc$12) => {
277243
277251
  const elements = node3.elements ?? [];
277244
277252
  let text5 = "";
277245
277253
  for (const child of elements)
@@ -277253,66 +277261,66 @@ var Node$13 = class Node$14 {
277253
277261
  return null;
277254
277262
  const variant = resolveMathVariant(elements.find((el$1) => el$1.name === "m:rPr"));
277255
277263
  const tag = classifyMathText(text5);
277256
- const el = doc$12.createElementNS(MATHML_NS$16, tag);
277264
+ const el = doc$12.createElementNS(MATHML_NS$18, tag);
277257
277265
  el.textContent = text5;
277258
277266
  if (variant)
277259
277267
  el.setAttribute("mathvariant", variant);
277260
277268
  return el;
277261
- }, MATHML_NS$15 = "http://www.w3.org/1998/Math/MathML", convertFraction = (node3, doc$12, convertChildren) => {
277269
+ }, MATHML_NS$17 = "http://www.w3.org/1998/Math/MathML", convertFraction = (node3, doc$12, convertChildren) => {
277262
277270
  const elements = node3.elements ?? [];
277263
277271
  const num = elements.find((e) => e.name === "m:num");
277264
277272
  const den = elements.find((e) => e.name === "m:den");
277265
- const frac = doc$12.createElementNS(MATHML_NS$15, "mfrac");
277266
- const numRow = doc$12.createElementNS(MATHML_NS$15, "mrow");
277273
+ const frac = doc$12.createElementNS(MATHML_NS$17, "mfrac");
277274
+ const numRow = doc$12.createElementNS(MATHML_NS$17, "mrow");
277267
277275
  numRow.appendChild(convertChildren(num?.elements ?? []));
277268
277276
  frac.appendChild(numRow);
277269
- const denRow = doc$12.createElementNS(MATHML_NS$15, "mrow");
277277
+ const denRow = doc$12.createElementNS(MATHML_NS$17, "mrow");
277270
277278
  denRow.appendChild(convertChildren(den?.elements ?? []));
277271
277279
  frac.appendChild(denRow);
277272
277280
  return frac;
277273
- }, MATHML_NS$14 = "http://www.w3.org/1998/Math/MathML", convertBar = (node3, doc$12, convertChildren) => {
277281
+ }, MATHML_NS$16 = "http://www.w3.org/1998/Math/MathML", convertBar = (node3, doc$12, convertChildren) => {
277274
277282
  const elements = node3.elements ?? [];
277275
277283
  const isUnder = elements.find((e) => e.name === "m:barPr")?.elements?.find((e) => e.name === "m:pos")?.attributes?.["m:val"] !== "top";
277276
277284
  const base5 = elements.find((e) => e.name === "m:e");
277277
- const wrapper = doc$12.createElementNS(MATHML_NS$14, isUnder ? "munder" : "mover");
277285
+ const wrapper = doc$12.createElementNS(MATHML_NS$16, isUnder ? "munder" : "mover");
277278
277286
  const baseContent = convertChildren(base5?.elements ?? []);
277279
- const mrow = doc$12.createElementNS(MATHML_NS$14, "mrow");
277287
+ const mrow = doc$12.createElementNS(MATHML_NS$16, "mrow");
277280
277288
  mrow.appendChild(baseContent);
277281
277289
  wrapper.appendChild(mrow);
277282
- const accent = doc$12.createElementNS(MATHML_NS$14, "mo");
277290
+ const accent = doc$12.createElementNS(MATHML_NS$16, "mo");
277283
277291
  accent.setAttribute("stretchy", "true");
277284
277292
  accent.textContent = "‾";
277285
277293
  wrapper.appendChild(accent);
277286
277294
  return wrapper;
277287
- }, MATHML_NS$13 = "http://www.w3.org/1998/Math/MathML", FUNCTION_APPLY_OPERATOR = "⁡", convertFunction = (node3, doc$12, convertChildren) => {
277295
+ }, MATHML_NS$15 = "http://www.w3.org/1998/Math/MathML", FUNCTION_APPLY_OPERATOR = "⁡", convertFunction = (node3, doc$12, convertChildren) => {
277288
277296
  const elements = node3.elements ?? [];
277289
277297
  const functionName = elements.find((element3) => element3.name === "m:fName");
277290
277298
  const argument = elements.find((element3) => element3.name === "m:e");
277291
- const wrapper = doc$12.createElementNS(MATHML_NS$13, "mrow");
277292
- const functionNameRow = doc$12.createElementNS(MATHML_NS$13, "mrow");
277299
+ const wrapper = doc$12.createElementNS(MATHML_NS$15, "mrow");
277300
+ const functionNameRow = doc$12.createElementNS(MATHML_NS$15, "mrow");
277293
277301
  functionNameRow.appendChild(convertChildren(functionName?.elements ?? []));
277294
277302
  forceNormalMathVariant(functionNameRow);
277295
277303
  if (functionNameRow.childNodes.length > 0)
277296
277304
  wrapper.appendChild(functionNameRow);
277297
- const argumentRow = doc$12.createElementNS(MATHML_NS$13, "mrow");
277305
+ const argumentRow = doc$12.createElementNS(MATHML_NS$15, "mrow");
277298
277306
  argumentRow.appendChild(convertChildren(argument?.elements ?? []));
277299
277307
  if (functionNameRow.childNodes.length > 0 && argumentRow.childNodes.length > 0) {
277300
- const applyOperator = doc$12.createElementNS(MATHML_NS$13, "mo");
277308
+ const applyOperator = doc$12.createElementNS(MATHML_NS$15, "mo");
277301
277309
  applyOperator.textContent = FUNCTION_APPLY_OPERATOR;
277302
277310
  wrapper.appendChild(applyOperator);
277303
277311
  }
277304
277312
  if (argumentRow.childNodes.length > 0)
277305
277313
  wrapper.appendChild(argumentRow);
277306
277314
  return wrapper.childNodes.length > 0 ? wrapper : null;
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) => {
277315
+ }, MATHML_NS$14 = "http://www.w3.org/1998/Math/MathML", DEFAULT_BEGIN_DELIMITER = "(", DEFAULT_END_DELIMITER = ")", DEFAULT_SEPARATOR_DELIMITER = "│", convertDelimiter = (node3, doc$12, convertChildren) => {
277308
277316
  const elements = node3.elements ?? [];
277309
277317
  const delimiterProps = elements.find((element3) => element3.name === "m:dPr");
277310
277318
  const expressions = elements.filter((element3) => element3.name === "m:e");
277311
277319
  const beginDelimiter = getDelimiterValue(delimiterProps, "m:begChr", DEFAULT_BEGIN_DELIMITER);
277312
277320
  const endDelimiter = getDelimiterValue(delimiterProps, "m:endChr", DEFAULT_END_DELIMITER);
277313
277321
  const separatorDelimiter = getDelimiterValue(delimiterProps, "m:sepChr", DEFAULT_SEPARATOR_DELIMITER);
277314
- const wrapper = doc$12.createElementNS(MATHML_NS$12, "mrow");
277315
- const begin = doc$12.createElementNS(MATHML_NS$12, "mo");
277322
+ const wrapper = doc$12.createElementNS(MATHML_NS$14, "mrow");
277323
+ const begin = doc$12.createElementNS(MATHML_NS$14, "mo");
277316
277324
  begin.textContent = beginDelimiter;
277317
277325
  wrapper.appendChild(begin);
277318
277326
  let renderedCount = 0;
@@ -277321,60 +277329,60 @@ var Node$13 = class Node$14 {
277321
277329
  if (fragment2.childNodes.length === 0)
277322
277330
  continue;
277323
277331
  if (renderedCount > 0) {
277324
- const separator = doc$12.createElementNS(MATHML_NS$12, "mo");
277332
+ const separator = doc$12.createElementNS(MATHML_NS$14, "mo");
277325
277333
  separator.textContent = separatorDelimiter;
277326
277334
  wrapper.appendChild(separator);
277327
277335
  }
277328
- const group = doc$12.createElementNS(MATHML_NS$12, "mrow");
277336
+ const group = doc$12.createElementNS(MATHML_NS$14, "mrow");
277329
277337
  group.appendChild(fragment2);
277330
277338
  wrapper.appendChild(group);
277331
277339
  renderedCount++;
277332
277340
  }
277333
- const end$1 = doc$12.createElementNS(MATHML_NS$12, "mo");
277341
+ const end$1 = doc$12.createElementNS(MATHML_NS$14, "mo");
277334
277342
  end$1.textContent = endDelimiter;
277335
277343
  wrapper.appendChild(end$1);
277336
277344
  return wrapper;
277337
- }, MATHML_NS$11 = "http://www.w3.org/1998/Math/MathML", convertSubscript = (node3, doc$12, convertChildren) => {
277345
+ }, MATHML_NS$13 = "http://www.w3.org/1998/Math/MathML", convertSubscript = (node3, doc$12, convertChildren) => {
277338
277346
  const elements = node3.elements ?? [];
277339
277347
  const base5 = elements.find((e) => e.name === "m:e");
277340
277348
  const sub = elements.find((e) => e.name === "m:sub");
277341
- const msub = doc$12.createElementNS(MATHML_NS$11, "msub");
277342
- const baseRow = doc$12.createElementNS(MATHML_NS$11, "mrow");
277349
+ const msub = doc$12.createElementNS(MATHML_NS$13, "msub");
277350
+ const baseRow = doc$12.createElementNS(MATHML_NS$13, "mrow");
277343
277351
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277344
277352
  msub.appendChild(baseRow);
277345
- const subRow = doc$12.createElementNS(MATHML_NS$11, "mrow");
277353
+ const subRow = doc$12.createElementNS(MATHML_NS$13, "mrow");
277346
277354
  subRow.appendChild(convertChildren(sub?.elements ?? []));
277347
277355
  msub.appendChild(subRow);
277348
277356
  return msub;
277349
- }, MATHML_NS$10 = "http://www.w3.org/1998/Math/MathML", convertSuperscript = (node3, doc$12, convertChildren) => {
277357
+ }, MATHML_NS$12 = "http://www.w3.org/1998/Math/MathML", convertSuperscript = (node3, doc$12, convertChildren) => {
277350
277358
  const elements = node3.elements ?? [];
277351
277359
  const base5 = elements.find((e) => e.name === "m:e");
277352
277360
  const sup = elements.find((e) => e.name === "m:sup");
277353
- const msup = doc$12.createElementNS(MATHML_NS$10, "msup");
277354
- const baseRow = doc$12.createElementNS(MATHML_NS$10, "mrow");
277361
+ const msup = doc$12.createElementNS(MATHML_NS$12, "msup");
277362
+ const baseRow = doc$12.createElementNS(MATHML_NS$12, "mrow");
277355
277363
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277356
277364
  msup.appendChild(baseRow);
277357
- const supRow = doc$12.createElementNS(MATHML_NS$10, "mrow");
277365
+ const supRow = doc$12.createElementNS(MATHML_NS$12, "mrow");
277358
277366
  supRow.appendChild(convertChildren(sup?.elements ?? []));
277359
277367
  msup.appendChild(supRow);
277360
277368
  return msup;
277361
- }, MATHML_NS$9 = "http://www.w3.org/1998/Math/MathML", convertSubSuperscript = (node3, doc$12, convertChildren) => {
277369
+ }, MATHML_NS$11 = "http://www.w3.org/1998/Math/MathML", convertSubSuperscript = (node3, doc$12, convertChildren) => {
277362
277370
  const elements = node3.elements ?? [];
277363
277371
  const base5 = elements.find((e) => e.name === "m:e");
277364
277372
  const sub = elements.find((e) => e.name === "m:sub");
277365
277373
  const sup = elements.find((e) => e.name === "m:sup");
277366
- const msubsup = doc$12.createElementNS(MATHML_NS$9, "msubsup");
277367
- const baseRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277374
+ const msubsup = doc$12.createElementNS(MATHML_NS$11, "msubsup");
277375
+ const baseRow = doc$12.createElementNS(MATHML_NS$11, "mrow");
277368
277376
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277369
277377
  msubsup.appendChild(baseRow);
277370
- const subRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277378
+ const subRow = doc$12.createElementNS(MATHML_NS$11, "mrow");
277371
277379
  subRow.appendChild(convertChildren(sub?.elements ?? []));
277372
277380
  msubsup.appendChild(subRow);
277373
- const supRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277381
+ const supRow = doc$12.createElementNS(MATHML_NS$11, "mrow");
277374
277382
  supRow.appendChild(convertChildren(sup?.elements ?? []));
277375
277383
  msubsup.appendChild(supRow);
277376
277384
  return msubsup;
277377
- }, MATHML_NS$8 = "http://www.w3.org/1998/Math/MathML", DEFAULT_ACCENT_CHAR = "̂", COMBINING_TO_SPACING, convertAccent = (node3, doc$12, convertChildren) => {
277385
+ }, MATHML_NS$10 = "http://www.w3.org/1998/Math/MathML", DEFAULT_ACCENT_CHAR = "̂", COMBINING_TO_SPACING, convertAccent = (node3, doc$12, convertChildren) => {
277378
277386
  const elements = node3.elements ?? [];
277379
277387
  const base5 = elements.find((e) => e.name === "m:e");
277380
277388
  if (!base5)
@@ -277382,37 +277390,37 @@ var Node$13 = class Node$14 {
277382
277390
  const chr = elements.find((e) => e.name === "m:accPr")?.elements?.find((e) => e.name === "m:chr");
277383
277391
  const rawVal = chr?.attributes?.["m:val"];
277384
277392
  const accentChar = chr === undefined ? DEFAULT_ACCENT_CHAR : rawVal && rawVal.length > 0 ? rawVal : "";
277385
- const baseRow = doc$12.createElementNS(MATHML_NS$8, "mrow");
277393
+ const baseRow = doc$12.createElementNS(MATHML_NS$10, "mrow");
277386
277394
  baseRow.appendChild(convertChildren(base5.elements ?? []));
277387
277395
  if (!accentChar)
277388
277396
  return baseRow;
277389
277397
  const renderChar = COMBINING_TO_SPACING[accentChar] ?? accentChar;
277390
- const mover = doc$12.createElementNS(MATHML_NS$8, "mover");
277398
+ const mover = doc$12.createElementNS(MATHML_NS$10, "mover");
277391
277399
  mover.setAttribute("accent", "true");
277392
277400
  mover.appendChild(baseRow);
277393
- const mo = doc$12.createElementNS(MATHML_NS$8, "mo");
277401
+ const mo = doc$12.createElementNS(MATHML_NS$10, "mo");
277394
277402
  mo.setAttribute("stretchy", "true");
277395
277403
  mo.textContent = renderChar;
277396
277404
  mover.appendChild(mo);
277397
277405
  return mover;
277398
- }, MATHML_NS$7 = "http://www.w3.org/1998/Math/MathML", convertPreSubSuperscript = (node3, doc$12, convertChildren) => {
277406
+ }, MATHML_NS$9 = "http://www.w3.org/1998/Math/MathML", convertPreSubSuperscript = (node3, doc$12, convertChildren) => {
277399
277407
  const elements = node3.elements ?? [];
277400
277408
  const base5 = elements.find((e) => e.name === "m:e");
277401
277409
  const sub = elements.find((e) => e.name === "m:sub");
277402
277410
  const sup = elements.find((e) => e.name === "m:sup");
277403
- const mmultiscripts = doc$12.createElementNS(MATHML_NS$7, "mmultiscripts");
277404
- const baseRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277411
+ const mmultiscripts = doc$12.createElementNS(MATHML_NS$9, "mmultiscripts");
277412
+ const baseRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277405
277413
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277406
277414
  mmultiscripts.appendChild(baseRow);
277407
- mmultiscripts.appendChild(doc$12.createElementNS(MATHML_NS$7, "mprescripts"));
277408
- const subRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277415
+ mmultiscripts.appendChild(doc$12.createElementNS(MATHML_NS$9, "mprescripts"));
277416
+ const subRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277409
277417
  subRow.appendChild(convertChildren(sub?.elements ?? []));
277410
277418
  mmultiscripts.appendChild(subRow);
277411
- const supRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277419
+ const supRow = doc$12.createElementNS(MATHML_NS$9, "mrow");
277412
277420
  supRow.appendChild(convertChildren(sup?.elements ?? []));
277413
277421
  mmultiscripts.appendChild(supRow);
277414
277422
  return mmultiscripts;
277415
- }, MATHML_NS$6 = "http://www.w3.org/1998/Math/MathML", stripAlignmentMarkers = (nodes) => nodes.map((node3) => {
277423
+ }, MATHML_NS$8 = "http://www.w3.org/1998/Math/MathML", stripAlignmentMarkers = (nodes) => nodes.map((node3) => {
277416
277424
  if (node3?.type === "text" && typeof node3.text === "string" && node3.text.includes("&"))
277417
277425
  return {
277418
277426
  ...node3,
@@ -277426,12 +277434,12 @@ var Node$13 = class Node$14 {
277426
277434
  return node3;
277427
277435
  }), convertEquationArray = (node3, doc$12, convertChildren) => {
277428
277436
  const rows = (node3.elements ?? []).filter((e) => e.name === "m:e");
277429
- const mtable = doc$12.createElementNS(MATHML_NS$6, "mtable");
277437
+ const mtable = doc$12.createElementNS(MATHML_NS$8, "mtable");
277430
277438
  mtable.setAttribute("columnalign", "left");
277431
277439
  for (const row2 of rows) {
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");
277440
+ const mtr = doc$12.createElementNS(MATHML_NS$8, "mtr");
277441
+ const mtd = doc$12.createElementNS(MATHML_NS$8, "mtd");
277442
+ const mrow = doc$12.createElementNS(MATHML_NS$8, "mrow");
277435
277443
  const cleanedChildren = stripAlignmentMarkers(row2.elements ?? []);
277436
277444
  mrow.appendChild(convertChildren(cleanedChildren));
277437
277445
  mtd.appendChild(mrow);
@@ -277439,7 +277447,7 @@ var Node$13 = class Node$14 {
277439
277447
  mtable.appendChild(mtr);
277440
277448
  }
277441
277449
  return mtable.childNodes.length > 0 ? mtable : null;
277442
- }, MATHML_NS$5 = "http://www.w3.org/1998/Math/MathML", convertRadical = (node3, doc$12, convertChildren) => {
277450
+ }, MATHML_NS$7 = "http://www.w3.org/1998/Math/MathML", convertRadical = (node3, doc$12, convertChildren) => {
277443
277451
  const elements = node3.elements ?? [];
277444
277452
  const radPr = elements.find((e) => e.name === "m:radPr");
277445
277453
  const deg = elements.find((e) => e.name === "m:deg");
@@ -277447,45 +277455,45 @@ var Node$13 = class Node$14 {
277447
277455
  const degHideEl = radPr?.elements?.find((e) => e.name === "m:degHide");
277448
277456
  const degHideVal = degHideEl?.attributes?.["m:val"];
277449
277457
  if (degHideEl !== undefined && degHideVal !== "0" && degHideVal !== "false" && degHideVal !== "off" || !deg || (deg.elements ?? []).length === 0) {
277450
- const msqrt = doc$12.createElementNS(MATHML_NS$5, "msqrt");
277451
- const radicandRow$1 = doc$12.createElementNS(MATHML_NS$5, "mrow");
277458
+ const msqrt = doc$12.createElementNS(MATHML_NS$7, "msqrt");
277459
+ const radicandRow$1 = doc$12.createElementNS(MATHML_NS$7, "mrow");
277452
277460
  radicandRow$1.appendChild(convertChildren(radicand?.elements ?? []));
277453
277461
  msqrt.appendChild(radicandRow$1);
277454
277462
  return msqrt;
277455
277463
  }
277456
- const mroot = doc$12.createElementNS(MATHML_NS$5, "mroot");
277457
- const radicandRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
277464
+ const mroot = doc$12.createElementNS(MATHML_NS$7, "mroot");
277465
+ const radicandRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277458
277466
  radicandRow.appendChild(convertChildren(radicand?.elements ?? []));
277459
277467
  mroot.appendChild(radicandRow);
277460
- const degRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
277468
+ const degRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277461
277469
  degRow.appendChild(convertChildren(deg?.elements ?? []));
277462
277470
  mroot.appendChild(degRow);
277463
277471
  return mroot;
277464
- }, MATHML_NS$4 = "http://www.w3.org/1998/Math/MathML", convertLowerLimit = (node3, doc$12, convertChildren) => {
277472
+ }, MATHML_NS$6 = "http://www.w3.org/1998/Math/MathML", convertLowerLimit = (node3, doc$12, convertChildren) => {
277465
277473
  const elements = node3.elements ?? [];
277466
277474
  const base5 = elements.find((e) => e.name === "m:e");
277467
277475
  const lim = elements.find((e) => e.name === "m:lim");
277468
- const munder = doc$12.createElementNS(MATHML_NS$4, "munder");
277469
- const baseRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277476
+ const munder = doc$12.createElementNS(MATHML_NS$6, "munder");
277477
+ const baseRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
277470
277478
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277471
277479
  munder.appendChild(baseRow);
277472
- const limRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277480
+ const limRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
277473
277481
  limRow.appendChild(convertChildren(lim?.elements ?? []));
277474
277482
  munder.appendChild(limRow);
277475
277483
  return munder;
277476
- }, MATHML_NS$3 = "http://www.w3.org/1998/Math/MathML", convertUpperLimit = (node3, doc$12, convertChildren) => {
277484
+ }, MATHML_NS$5 = "http://www.w3.org/1998/Math/MathML", convertUpperLimit = (node3, doc$12, convertChildren) => {
277477
277485
  const elements = node3.elements ?? [];
277478
277486
  const base5 = elements.find((e) => e.name === "m:e");
277479
277487
  const lim = elements.find((e) => e.name === "m:lim");
277480
- const mover = doc$12.createElementNS(MATHML_NS$3, "mover");
277481
- const baseRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
277488
+ const mover = doc$12.createElementNS(MATHML_NS$5, "mover");
277489
+ const baseRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
277482
277490
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277483
277491
  mover.appendChild(baseRow);
277484
- const limRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
277492
+ const limRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
277485
277493
  limRow.appendChild(convertChildren(lim?.elements ?? []));
277486
277494
  mover.appendChild(limRow);
277487
277495
  return mover;
277488
- }, MATHML_NS$2 = "http://www.w3.org/1998/Math/MathML", DEFAULT_NARY_CHAR = "∫", INTEGRAL_CHARS, convertNary = (node3, doc$12, convertChildren) => {
277496
+ }, MATHML_NS$4 = "http://www.w3.org/1998/Math/MathML", DEFAULT_NARY_CHAR = "∫", INTEGRAL_CHARS, convertNary = (node3, doc$12, convertChildren) => {
277489
277497
  const elements = node3.elements ?? [];
277490
277498
  const naryPr = elements.find((e) => e.name === "m:naryPr");
277491
277499
  const sub = elements.find((e) => e.name === "m:sub");
@@ -277512,7 +277520,7 @@ var Node$13 = class Node$14 {
277512
277520
  const hasSub = renderSubChildren.length > 0 || sub !== undefined && !subHidden;
277513
277521
  const hasSup = renderSupChildren.length > 0 || sup !== undefined && !supHidden;
277514
277522
  const growOff = grow !== undefined && !isStOnOffTrue(grow);
277515
- const mo = doc$12.createElementNS(MATHML_NS$2, "mo");
277523
+ const mo = doc$12.createElementNS(MATHML_NS$4, "mo");
277516
277524
  mo.textContent = opChar;
277517
277525
  if (growOff) {
277518
277526
  mo.setAttribute("largeop", "false");
@@ -277521,38 +277529,38 @@ var Node$13 = class Node$14 {
277521
277529
  let operatorEl;
277522
277530
  if (hasSub && hasSup) {
277523
277531
  const tag = isUndOvr ? "munderover" : "msubsup";
277524
- operatorEl = doc$12.createElementNS(MATHML_NS$2, tag);
277532
+ operatorEl = doc$12.createElementNS(MATHML_NS$4, tag);
277525
277533
  operatorEl.appendChild(mo);
277526
- const subRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277534
+ const subRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277527
277535
  subRow.appendChild(convertChildren(renderSubChildren));
277528
277536
  operatorEl.appendChild(subRow);
277529
- const supRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277537
+ const supRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277530
277538
  supRow.appendChild(convertChildren(renderSupChildren));
277531
277539
  operatorEl.appendChild(supRow);
277532
277540
  } else if (hasSub) {
277533
277541
  const tag = isUndOvr ? "munder" : "msub";
277534
- operatorEl = doc$12.createElementNS(MATHML_NS$2, tag);
277542
+ operatorEl = doc$12.createElementNS(MATHML_NS$4, tag);
277535
277543
  operatorEl.appendChild(mo);
277536
- const subRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277544
+ const subRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277537
277545
  subRow.appendChild(convertChildren(renderSubChildren));
277538
277546
  operatorEl.appendChild(subRow);
277539
277547
  } else if (hasSup) {
277540
277548
  const tag = isUndOvr ? "mover" : "msup";
277541
- operatorEl = doc$12.createElementNS(MATHML_NS$2, tag);
277549
+ operatorEl = doc$12.createElementNS(MATHML_NS$4, tag);
277542
277550
  operatorEl.appendChild(mo);
277543
- const supRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277551
+ const supRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277544
277552
  supRow.appendChild(convertChildren(renderSupChildren));
277545
277553
  operatorEl.appendChild(supRow);
277546
277554
  } else
277547
277555
  operatorEl = mo;
277548
- const wrapper = doc$12.createElementNS(MATHML_NS$2, "mrow");
277556
+ const wrapper = doc$12.createElementNS(MATHML_NS$4, "mrow");
277549
277557
  wrapper.appendChild(operatorEl);
277550
- const bodyRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277558
+ const bodyRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277551
277559
  bodyRow.appendChild(convertChildren(body?.elements ?? []));
277552
277560
  if (bodyRow.childNodes.length > 0)
277553
277561
  wrapper.appendChild(bodyRow);
277554
277562
  return wrapper;
277555
- }, MATHML_NS$1 = "http://www.w3.org/1998/Math/MathML", convertPhantom = (node3, doc$12, convertChildren) => {
277563
+ }, MATHML_NS$3 = "http://www.w3.org/1998/Math/MathML", convertPhantom = (node3, doc$12, convertChildren) => {
277556
277564
  const elements = node3.elements ?? [];
277557
277565
  const phantPr = elements.find((e) => e.name === "m:phantPr");
277558
277566
  const base5 = elements.find((e) => e.name === "m:e");
@@ -277565,11 +277573,11 @@ var Node$13 = class Node$14 {
277565
277573
  const hasZeroDimension = zeroWid || zeroAsc || zeroDesc;
277566
277574
  const content3 = convertChildren(base5?.elements ?? []);
277567
277575
  if (!isVisible$1 && !hasZeroDimension) {
277568
- const mphantom = doc$12.createElementNS(MATHML_NS$1, "mphantom");
277576
+ const mphantom = doc$12.createElementNS(MATHML_NS$3, "mphantom");
277569
277577
  mphantom.appendChild(content3);
277570
277578
  return mphantom;
277571
277579
  }
277572
- const mpadded = doc$12.createElementNS(MATHML_NS$1, "mpadded");
277580
+ const mpadded = doc$12.createElementNS(MATHML_NS$3, "mpadded");
277573
277581
  const isZeroVal = (el) => el && (isOnOffTrue(el.attributes?.["m:val"]) || !el.attributes);
277574
277582
  if (isZeroVal(zeroWid))
277575
277583
  mpadded.setAttribute("width", "0");
@@ -277578,12 +277586,63 @@ var Node$13 = class Node$14 {
277578
277586
  if (isZeroVal(zeroDesc))
277579
277587
  mpadded.setAttribute("depth", "0");
277580
277588
  if (!isVisible$1) {
277581
- const mphantom = doc$12.createElementNS(MATHML_NS$1, "mphantom");
277589
+ const mphantom = doc$12.createElementNS(MATHML_NS$3, "mphantom");
277582
277590
  mphantom.appendChild(content3);
277583
277591
  mpadded.appendChild(mphantom);
277584
277592
  } else
277585
277593
  mpadded.appendChild(content3);
277586
277594
  return mpadded;
277595
+ }, MATHML_NS$2 = "http://www.w3.org/1998/Math/MathML", DEFAULT_GROUP_CHAR = "⏟", VERT_JC_SHIFT_EM = 1, convertGroupCharacter = (node3, doc$12, convertChildren) => {
277596
+ const elements = node3.elements ?? [];
277597
+ const groupChrPr = elements.find((e) => e.name === "m:groupChrPr");
277598
+ const base5 = elements.find((e) => e.name === "m:e");
277599
+ const chr = groupChrPr?.elements?.find((e) => e.name === "m:chr");
277600
+ const pos = groupChrPr?.elements?.find((e) => e.name === "m:pos");
277601
+ const vertJc = groupChrPr?.elements?.find((e) => e.name === "m:vertJc");
277602
+ const groupChar = chr ? chr.attributes?.["m:val"] ?? "" : DEFAULT_GROUP_CHAR;
277603
+ const position4 = pos?.attributes?.["m:val"] ?? "bot";
277604
+ const vertJustify = vertJc ? vertJc.attributes?.["m:val"] ?? "bot" : null;
277605
+ const wrapper = doc$12.createElementNS(MATHML_NS$2, position4 === "top" ? "mover" : "munder");
277606
+ const baseRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277607
+ baseRow.appendChild(convertChildren(base5?.elements ?? []));
277608
+ wrapper.appendChild(baseRow);
277609
+ const mo = doc$12.createElementNS(MATHML_NS$2, "mo");
277610
+ mo.setAttribute("stretchy", "true");
277611
+ mo.textContent = groupChar;
277612
+ wrapper.appendChild(mo);
277613
+ if (vertJustify) {
277614
+ wrapper.setAttribute("data-vert-jc", vertJustify);
277615
+ if (vertJustify !== (position4 === "top" ? "bot" : "top")) {
277616
+ const direction = position4 === "top" ? 1 : -1;
277617
+ wrapper.setAttribute("style", `position: relative; top: ${direction * VERT_JC_SHIFT_EM}em;`);
277618
+ }
277619
+ }
277620
+ return wrapper;
277621
+ }, MATHML_NS$1 = "http://www.w3.org/1998/Math/MathML", EMPTY_CELL_PLACEHOLDER = "□", convertMatrix = (node3, doc$12, convertChildren) => {
277622
+ const elements = node3.elements ?? [];
277623
+ const rows = elements.filter((e) => e.name === "m:mr");
277624
+ const plcHide = elements.find((e) => e.name === "m:mPr")?.elements?.find((e) => e.name === "m:plcHide");
277625
+ const hidePlaceholders = isPlaceholderHidden(plcHide);
277626
+ const mtable = doc$12.createElementNS(MATHML_NS$1, "mtable");
277627
+ for (const row2 of rows) {
277628
+ const mtr = doc$12.createElementNS(MATHML_NS$1, "mtr");
277629
+ const cells = row2.elements?.filter((e) => e.name === "m:e") ?? [];
277630
+ for (const cell2 of cells) {
277631
+ const mtd = doc$12.createElementNS(MATHML_NS$1, "mtd");
277632
+ const mrow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277633
+ const fragment2 = convertChildren(cell2.elements ?? []);
277634
+ if (fragment2.childNodes.length === 0 && !hidePlaceholders) {
277635
+ const placeholder = doc$12.createElementNS(MATHML_NS$1, "mi");
277636
+ placeholder.textContent = EMPTY_CELL_PLACEHOLDER;
277637
+ mrow.appendChild(placeholder);
277638
+ } else
277639
+ mrow.appendChild(fragment2);
277640
+ mtd.appendChild(mrow);
277641
+ mtr.appendChild(mtd);
277642
+ }
277643
+ mtable.appendChild(mtr);
277644
+ }
277645
+ return mtable.childNodes.length > 0 ? mtable : null;
277587
277646
  }, 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) => {
277588
277647
  if (typeof value !== "string")
277589
277648
  return null;
@@ -287699,7 +287758,7 @@ var Node$13 = class Node$14 {
287699
287758
  return;
287700
287759
  console.log(...args$1);
287701
287760
  }, 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;
287702
- var init_src_BRXXove8_es = __esm(() => {
287761
+ var init_src_CXW8xV2H_es = __esm(() => {
287703
287762
  init_rolldown_runtime_Bg48TavK_es();
287704
287763
  init_SuperConverter_CWhofwLf_es();
287705
287764
  init_jszip_C49i9kUs_es();
@@ -313477,6 +313536,7 @@ function print() { __p += __j.call(arguments, '') }
313477
313536
  "m:func": convertFunction,
313478
313537
  "m:limLow": convertLowerLimit,
313479
313538
  "m:limUpp": convertUpperLimit,
313539
+ "m:m": convertMatrix,
313480
313540
  "m:nary": convertNary,
313481
313541
  "m:phant": convertPhantom,
313482
313542
  "m:rad": convertRadical,
@@ -313486,8 +313546,7 @@ function print() { __p += __j.call(arguments, '') }
313486
313546
  "m:sPre": convertPreSubSuperscript,
313487
313547
  "m:borderBox": null,
313488
313548
  "m:box": null,
313489
- "m:groupChr": null,
313490
- "m:m": null
313549
+ "m:groupChr": convertGroupCharacter
313491
313550
  };
313492
313551
  ARGUMENT_ELEMENTS = new Set([
313493
313552
  "m:e",
@@ -317425,7 +317484,8 @@ function print() { __p += __j.call(arguments, '') }
317425
317484
  "m:sSub": 0.1,
317426
317485
  "m:sSup": 0.1,
317427
317486
  "m:sSubSup": 0.2,
317428
- "m:sPre": 0.2
317487
+ "m:sPre": 0.2,
317488
+ "m:groupChr": 0.35
317429
317489
  };
317430
317490
  WRAP_TYPES$2 = new Set([
317431
317491
  "None",
@@ -322458,7 +322518,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
322458
322518
 
322459
322519
  // ../../packages/superdoc/dist/super-editor.es.js
322460
322520
  var init_super_editor_es = __esm(() => {
322461
- init_src_BRXXove8_es();
322521
+ init_src_CXW8xV2H_es();
322462
322522
  init_SuperConverter_CWhofwLf_es();
322463
322523
  init_jszip_C49i9kUs_es();
322464
322524
  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.12",
3
+ "version": "0.7.0-next.14",
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": "1.26.0",
28
29
  "@superdoc/pm-adapter": "0.0.0",
29
- "@superdoc/super-editor": "0.0.1",
30
- "superdoc": "1.26.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.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"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.7.0-next.14",
38
+ "@superdoc-dev/cli-darwin-x64": "0.7.0-next.14",
39
+ "@superdoc-dev/cli-linux-x64": "0.7.0-next.14",
40
+ "@superdoc-dev/cli-linux-arm64": "0.7.0-next.14",
41
+ "@superdoc-dev/cli-windows-x64": "0.7.0-next.14"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",