@superdoc-dev/cli 0.5.0-next.70 → 0.5.0-next.72

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 +67 -45
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -204645,7 +204645,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
204645
204645
  init_remark_gfm_BhnWr3yf_es();
204646
204646
  });
204647
204647
 
204648
- // ../../packages/superdoc/dist/chunks/src-B4IUhaj4.es.js
204648
+ // ../../packages/superdoc/dist/chunks/src-CDzC82e6.es.js
204649
204649
  function deleteProps(obj, propOrProps) {
204650
204650
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
204651
204651
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -268943,9 +268943,9 @@ var Node$13 = class Node$14 {
268943
268943
  id2 = v4_default();
268944
268944
  const insertionMark = tr.doc.type.schema.marks[TrackInsertMarkName].create({
268945
268945
  id: id2,
268946
- author: user.name,
268947
- authorEmail: user.email,
268948
- authorImage: user.image,
268946
+ author: user.name || "",
268947
+ authorEmail: user.email || "",
268948
+ authorImage: user.image || "",
268949
268949
  date
268950
268950
  });
268951
268951
  tr.addMark(from$1, to, insertionMark);
@@ -268984,9 +268984,9 @@ var Node$13 = class Node$14 {
268984
268984
  id2 = v4_default();
268985
268985
  const deletionMark = tr.doc.type.schema.marks[TrackDeleteMarkName].create({
268986
268986
  id: id2,
268987
- author: user.name,
268988
- authorEmail: user.email,
268989
- authorImage: user.image,
268987
+ author: user.name || "",
268988
+ authorEmail: user.email || "",
268989
+ authorImage: user.image || "",
268990
268990
  date
268991
268991
  });
268992
268992
  const deletionMap = new Mapping;
@@ -269403,9 +269403,9 @@ var Node$13 = class Node$14 {
269403
269403
  const newFormatMark = state.schema.marks[TrackFormatMarkName].create({
269404
269404
  id: wid,
269405
269405
  sourceId: formatChangeMark?.attrs?.sourceId || "",
269406
- author: user.name,
269407
- authorEmail: user.email,
269408
- authorImage: user.image,
269406
+ author: user.name || "",
269407
+ authorEmail: user.email || "",
269408
+ authorImage: user.image || "",
269409
269409
  date,
269410
269410
  before: before2,
269411
269411
  after: after2
@@ -269472,9 +269472,9 @@ var Node$13 = class Node$14 {
269472
269472
  const newFormatMark = state.schema.marks[TrackFormatMarkName].create({
269473
269473
  id: formatChangeMark ? formatChangeMark.attrs.id : sharedWid ?? (sharedWid = v4_default()),
269474
269474
  sourceId: formatChangeMark?.attrs?.sourceId || "",
269475
- author: user.name,
269476
- authorEmail: user.email,
269477
- authorImage: user.image,
269475
+ author: user.name || "",
269476
+ authorEmail: user.email || "",
269477
+ authorImage: user.image || "",
269478
269478
  date,
269479
269479
  before: before2,
269480
269480
  after: after2
@@ -277125,7 +277125,7 @@ var Node$13 = class Node$14 {
277125
277125
  }
277126
277126
  element3.style.textAlign = resolveTextAlign(attrs?.alignment, rtl);
277127
277127
  return rtl;
277128
- }, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, MATHML_NS$7 = "http://www.w3.org/1998/Math/MathML", OPERATOR_CHARS, convertMathRun = (node3, doc$12) => {
277128
+ }, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, MATHML_NS$8 = "http://www.w3.org/1998/Math/MathML", OPERATOR_CHARS, convertMathRun = (node3, doc$12) => {
277129
277129
  const elements = node3.elements ?? [];
277130
277130
  let text5 = "";
277131
277131
  for (const child of elements)
@@ -277139,97 +277139,119 @@ var Node$13 = class Node$14 {
277139
277139
  return null;
277140
277140
  const isNormalText = elements.find((el$1) => el$1.name === "m:rPr")?.elements?.some((el$1) => el$1.name === "m:nor") ?? false;
277141
277141
  const tag = classifyMathText(text5);
277142
- const el = doc$12.createElementNS(MATHML_NS$7, tag);
277142
+ const el = doc$12.createElementNS(MATHML_NS$8, tag);
277143
277143
  el.textContent = text5;
277144
277144
  if (tag === "mi" && isNormalText)
277145
277145
  el.setAttribute("mathvariant", "normal");
277146
277146
  return el;
277147
- }, MATHML_NS$6 = "http://www.w3.org/1998/Math/MathML", convertFraction = (node3, doc$12, convertChildren) => {
277147
+ }, MATHML_NS$7 = "http://www.w3.org/1998/Math/MathML", convertFraction = (node3, doc$12, convertChildren) => {
277148
277148
  const elements = node3.elements ?? [];
277149
277149
  const num = elements.find((e) => e.name === "m:num");
277150
277150
  const den = elements.find((e) => e.name === "m:den");
277151
- const frac = doc$12.createElementNS(MATHML_NS$6, "mfrac");
277152
- const numRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
277151
+ const frac = doc$12.createElementNS(MATHML_NS$7, "mfrac");
277152
+ const numRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277153
277153
  numRow.appendChild(convertChildren(num?.elements ?? []));
277154
277154
  frac.appendChild(numRow);
277155
- const denRow = doc$12.createElementNS(MATHML_NS$6, "mrow");
277155
+ const denRow = doc$12.createElementNS(MATHML_NS$7, "mrow");
277156
277156
  denRow.appendChild(convertChildren(den?.elements ?? []));
277157
277157
  frac.appendChild(denRow);
277158
277158
  return frac;
277159
- }, MATHML_NS$5 = "http://www.w3.org/1998/Math/MathML", convertBar = (node3, doc$12, convertChildren) => {
277159
+ }, MATHML_NS$6 = "http://www.w3.org/1998/Math/MathML", convertBar = (node3, doc$12, convertChildren) => {
277160
277160
  const elements = node3.elements ?? [];
277161
277161
  const isUnder = elements.find((e) => e.name === "m:barPr")?.elements?.find((e) => e.name === "m:pos")?.attributes?.["m:val"] !== "top";
277162
277162
  const base5 = elements.find((e) => e.name === "m:e");
277163
- const wrapper = doc$12.createElementNS(MATHML_NS$5, isUnder ? "munder" : "mover");
277163
+ const wrapper = doc$12.createElementNS(MATHML_NS$6, isUnder ? "munder" : "mover");
277164
277164
  const baseContent = convertChildren(base5?.elements ?? []);
277165
- const mrow = doc$12.createElementNS(MATHML_NS$5, "mrow");
277165
+ const mrow = doc$12.createElementNS(MATHML_NS$6, "mrow");
277166
277166
  mrow.appendChild(baseContent);
277167
277167
  wrapper.appendChild(mrow);
277168
- const accent = doc$12.createElementNS(MATHML_NS$5, "mo");
277168
+ const accent = doc$12.createElementNS(MATHML_NS$6, "mo");
277169
277169
  accent.setAttribute("stretchy", "true");
277170
277170
  accent.textContent = "‾";
277171
277171
  wrapper.appendChild(accent);
277172
277172
  return wrapper;
277173
- }, MATHML_NS$4 = "http://www.w3.org/1998/Math/MathML", FUNCTION_APPLY_OPERATOR = "⁡", convertFunction = (node3, doc$12, convertChildren) => {
277173
+ }, MATHML_NS$5 = "http://www.w3.org/1998/Math/MathML", FUNCTION_APPLY_OPERATOR = "⁡", convertFunction = (node3, doc$12, convertChildren) => {
277174
277174
  const elements = node3.elements ?? [];
277175
277175
  const functionName = elements.find((element3) => element3.name === "m:fName");
277176
277176
  const argument = elements.find((element3) => element3.name === "m:e");
277177
- const wrapper = doc$12.createElementNS(MATHML_NS$4, "mrow");
277178
- const functionNameRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277177
+ const wrapper = doc$12.createElementNS(MATHML_NS$5, "mrow");
277178
+ const functionNameRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
277179
277179
  functionNameRow.appendChild(convertChildren(functionName?.elements ?? []));
277180
277180
  forceNormalMathVariant(functionNameRow);
277181
277181
  if (functionNameRow.childNodes.length > 0)
277182
277182
  wrapper.appendChild(functionNameRow);
277183
- const argumentRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277183
+ const argumentRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
277184
277184
  argumentRow.appendChild(convertChildren(argument?.elements ?? []));
277185
277185
  if (functionNameRow.childNodes.length > 0 && argumentRow.childNodes.length > 0) {
277186
- const applyOperator = doc$12.createElementNS(MATHML_NS$4, "mo");
277186
+ const applyOperator = doc$12.createElementNS(MATHML_NS$5, "mo");
277187
277187
  applyOperator.textContent = FUNCTION_APPLY_OPERATOR;
277188
277188
  wrapper.appendChild(applyOperator);
277189
277189
  }
277190
277190
  if (argumentRow.childNodes.length > 0)
277191
277191
  wrapper.appendChild(argumentRow);
277192
277192
  return wrapper.childNodes.length > 0 ? wrapper : null;
277193
- }, MATHML_NS$3 = "http://www.w3.org/1998/Math/MathML", convertSubscript = (node3, doc$12, convertChildren) => {
277193
+ }, MATHML_NS$4 = "http://www.w3.org/1998/Math/MathML", convertSubscript = (node3, doc$12, convertChildren) => {
277194
277194
  const elements = node3.elements ?? [];
277195
277195
  const base5 = elements.find((e) => e.name === "m:e");
277196
277196
  const sub = elements.find((e) => e.name === "m:sub");
277197
- const msub = doc$12.createElementNS(MATHML_NS$3, "msub");
277198
- const baseRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
277197
+ const msub = doc$12.createElementNS(MATHML_NS$4, "msub");
277198
+ const baseRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277199
277199
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277200
277200
  msub.appendChild(baseRow);
277201
- const subRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
277201
+ const subRow = doc$12.createElementNS(MATHML_NS$4, "mrow");
277202
277202
  subRow.appendChild(convertChildren(sub?.elements ?? []));
277203
277203
  msub.appendChild(subRow);
277204
277204
  return msub;
277205
- }, MATHML_NS$2 = "http://www.w3.org/1998/Math/MathML", convertSuperscript = (node3, doc$12, convertChildren) => {
277205
+ }, MATHML_NS$3 = "http://www.w3.org/1998/Math/MathML", convertSuperscript = (node3, doc$12, convertChildren) => {
277206
277206
  const elements = node3.elements ?? [];
277207
277207
  const base5 = elements.find((e) => e.name === "m:e");
277208
277208
  const sup = elements.find((e) => e.name === "m:sup");
277209
- const msup = doc$12.createElementNS(MATHML_NS$2, "msup");
277210
- const baseRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277209
+ const msup = doc$12.createElementNS(MATHML_NS$3, "msup");
277210
+ const baseRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
277211
277211
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277212
277212
  msup.appendChild(baseRow);
277213
- const supRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277213
+ const supRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
277214
277214
  supRow.appendChild(convertChildren(sup?.elements ?? []));
277215
277215
  msup.appendChild(supRow);
277216
277216
  return msup;
277217
- }, MATHML_NS$1 = "http://www.w3.org/1998/Math/MathML", convertSubSuperscript = (node3, doc$12, convertChildren) => {
277217
+ }, MATHML_NS$2 = "http://www.w3.org/1998/Math/MathML", convertSubSuperscript = (node3, doc$12, convertChildren) => {
277218
277218
  const elements = node3.elements ?? [];
277219
277219
  const base5 = elements.find((e) => e.name === "m:e");
277220
277220
  const sub = elements.find((e) => e.name === "m:sub");
277221
277221
  const sup = elements.find((e) => e.name === "m:sup");
277222
- const msubsup = doc$12.createElementNS(MATHML_NS$1, "msubsup");
277223
- const baseRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277222
+ const msubsup = doc$12.createElementNS(MATHML_NS$2, "msubsup");
277223
+ const baseRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277224
277224
  baseRow.appendChild(convertChildren(base5?.elements ?? []));
277225
277225
  msubsup.appendChild(baseRow);
277226
- const subRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277226
+ const subRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277227
277227
  subRow.appendChild(convertChildren(sub?.elements ?? []));
277228
277228
  msubsup.appendChild(subRow);
277229
- const supRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277229
+ const supRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
277230
277230
  supRow.appendChild(convertChildren(sup?.elements ?? []));
277231
277231
  msubsup.appendChild(supRow);
277232
277232
  return msubsup;
277233
+ }, MATHML_NS$1 = "http://www.w3.org/1998/Math/MathML", convertRadical = (node3, doc$12, convertChildren) => {
277234
+ const elements = node3.elements ?? [];
277235
+ const radPr = elements.find((e) => e.name === "m:radPr");
277236
+ const deg = elements.find((e) => e.name === "m:deg");
277237
+ const radicand = elements.find((e) => e.name === "m:e");
277238
+ const degHideEl = radPr?.elements?.find((e) => e.name === "m:degHide");
277239
+ const degHideVal = degHideEl?.attributes?.["m:val"];
277240
+ if (degHideEl !== undefined && degHideVal !== "0" && degHideVal !== "false" || !deg) {
277241
+ const msqrt = doc$12.createElementNS(MATHML_NS$1, "msqrt");
277242
+ const radicandRow$1 = doc$12.createElementNS(MATHML_NS$1, "mrow");
277243
+ radicandRow$1.appendChild(convertChildren(radicand?.elements ?? []));
277244
+ msqrt.appendChild(radicandRow$1);
277245
+ return msqrt;
277246
+ }
277247
+ const mroot = doc$12.createElementNS(MATHML_NS$1, "mroot");
277248
+ const radicandRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277249
+ radicandRow.appendChild(convertChildren(radicand?.elements ?? []));
277250
+ mroot.appendChild(radicandRow);
277251
+ const degRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
277252
+ degRow.appendChild(convertChildren(deg?.elements ?? []));
277253
+ mroot.appendChild(degRow);
277254
+ return mroot;
277233
277255
  }, 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) => {
277234
277256
  if (typeof value !== "string")
277235
277257
  return null;
@@ -287331,7 +287353,7 @@ var Node$13 = class Node$14 {
287331
287353
  return;
287332
287354
  console.log(...args$1);
287333
287355
  }, 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;
287334
- var init_src_B4IUhaj4_es = __esm(() => {
287356
+ var init_src_CDzC82e6_es = __esm(() => {
287335
287357
  init_rolldown_runtime_Bg48TavK_es();
287336
287358
  init_SuperConverter_DKPcCGTm_es();
287337
287359
  init_jszip_C49i9kUs_es();
@@ -312583,7 +312605,7 @@ function print() { __p += __j.call(arguments, '') }
312583
312605
  this.setOptions({ annotations: true });
312584
312606
  const [docx, media2, mediaFiles, fonts, decryptedData] = await Editor2.loadXmlData(newFile, false, options);
312585
312607
  this.setOptions({
312586
- fileSource: decryptedData ?? newFile,
312608
+ fileSource: decryptedData ?? (newFile instanceof ArrayBuffer ? new Blob([newFile]) : newFile),
312587
312609
  content: docx,
312588
312610
  media: media2,
312589
312611
  mediaFiles,
@@ -313077,7 +313099,7 @@ function print() { __p += __j.call(arguments, '') }
313077
313099
  "m:m": null,
313078
313100
  "m:nary": null,
313079
313101
  "m:phant": null,
313080
- "m:rad": null,
313102
+ "m:rad": convertRadical,
313081
313103
  "m:sPre": null
313082
313104
  };
313083
313105
  ARGUMENT_ELEMENTS = new Set([
@@ -321905,7 +321927,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
321905
321927
 
321906
321928
  // ../../packages/superdoc/dist/super-editor.es.js
321907
321929
  var init_super_editor_es = __esm(() => {
321908
- init_src_B4IUhaj4_es();
321930
+ init_src_CDzC82e6_es();
321909
321931
  init_SuperConverter_DKPcCGTm_es();
321910
321932
  init_jszip_C49i9kUs_es();
321911
321933
  init_xml_js_CqGKpaft_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.5.0-next.70",
3
+ "version": "0.5.0-next.72",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -26,19 +26,19 @@
26
26
  "typescript": "^5.9.2",
27
27
  "@superdoc/document-api": "0.0.1",
28
28
  "@superdoc/pm-adapter": "0.0.0",
29
- "@superdoc/super-editor": "0.0.1",
30
- "superdoc": "1.25.0"
29
+ "superdoc": "1.25.0",
30
+ "@superdoc/super-editor": "0.0.1"
31
31
  },
32
32
  "module": "src/index.ts",
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@superdoc-dev/cli-darwin-arm64": "0.5.0-next.70",
38
- "@superdoc-dev/cli-darwin-x64": "0.5.0-next.70",
39
- "@superdoc-dev/cli-linux-x64": "0.5.0-next.70",
40
- "@superdoc-dev/cli-linux-arm64": "0.5.0-next.70",
41
- "@superdoc-dev/cli-windows-x64": "0.5.0-next.70"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.5.0-next.72",
38
+ "@superdoc-dev/cli-darwin-x64": "0.5.0-next.72",
39
+ "@superdoc-dev/cli-linux-x64": "0.5.0-next.72",
40
+ "@superdoc-dev/cli-windows-x64": "0.5.0-next.72",
41
+ "@superdoc-dev/cli-linux-arm64": "0.5.0-next.72"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",