@superdoc-dev/cli 0.12.0-next.20 → 0.12.0-next.21

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 +35 -28
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -66778,7 +66778,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
66778
66778
  emptyOptions2 = {};
66779
66779
  });
66780
66780
 
66781
- // ../../packages/superdoc/dist/chunks/SuperConverter-UqLu6KQU.es.js
66781
+ // ../../packages/superdoc/dist/chunks/SuperConverter-BptSHzcb.es.js
66782
66782
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
66783
66783
  const fieldValue = extension$1.config[field];
66784
66784
  if (typeof fieldValue === "function")
@@ -87296,7 +87296,7 @@ function generateNewListDefinition(numbering, options) {
87296
87296
  }
87297
87297
  if (level != null && start != null && text$2 != null && fmt != null) {
87298
87298
  if (numbering.definitions[numId]) {
87299
- const abstractId = numbering.definitions[numId]?.elements[0]?.attributes["w:val"];
87299
+ const abstractId = numbering.definitions[numId]?.elements?.[0]?.attributes?.["w:val"];
87300
87300
  newAbstractId = abstractId;
87301
87301
  newAbstractDef = { ...numbering.abstracts[abstractId] };
87302
87302
  skipAddingNewAbstract = true;
@@ -120754,7 +120754,7 @@ var isRegExp = (value) => {
120754
120754
  state.kern = kernNode.attributes["w:val"];
120755
120755
  }
120756
120756
  }, SuperConverter;
120757
- var init_SuperConverter_UqLu6KQU_es = __esm(() => {
120757
+ var init_SuperConverter_BptSHzcb_es = __esm(() => {
120758
120758
  init_rolldown_runtime_Bg48TavK_es();
120759
120759
  init_jszip_C49i9kUs_es();
120760
120760
  init_xml_js_CqGKpaft_es();
@@ -158934,7 +158934,7 @@ var init_SuperConverter_UqLu6KQU_es = __esm(() => {
158934
158934
  };
158935
158935
  });
158936
158936
 
158937
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-QcQvy-nD.es.js
158937
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-nX0t772H.es.js
158938
158938
  function parseSizeUnit(val = "0") {
158939
158939
  const length3 = val.toString() || "0";
158940
158940
  const value = Number.parseFloat(length3);
@@ -168128,6 +168128,10 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168128
168128
  if (typeof checker !== "function")
168129
168129
  return false;
168130
168130
  return Boolean(checker(attrs));
168131
+ }, hasFormattingAttrs = (entry) => {
168132
+ return typeof entry.attrs === "object" && entry.attrs !== null;
168133
+ }, getFormattingAttr = (entries2, name, attr) => {
168134
+ return entries2.filter((entry) => entry.name === name && hasFormattingAttrs(entry)).map((entry) => entry.attrs[attr]).filter((value) => value != null);
168131
168135
  }, normalizeFontSizeValue = (value) => {
168132
168136
  if (typeof value === "number")
168133
168137
  return `${value}pt`;
@@ -168156,7 +168160,9 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168156
168160
  return Boolean(linkedStyle?.definition?.styles && styleKey in linkedStyle.definition.styles);
168157
168161
  }, hasNegatedFormattingMark = (formatting, markName) => {
168158
168162
  const rawActiveMark = formatting.find((mark) => mark.name === markName);
168159
- return rawActiveMark ? isNegatedMark(rawActiveMark.name, rawActiveMark.attrs) : false;
168163
+ if (!rawActiveMark || !hasFormattingAttrs(rawActiveMark))
168164
+ return false;
168165
+ return isNegatedMark(rawActiveMark.name, rawActiveMark.attrs);
168160
168166
  }, isFormatCommandsStorage = (value) => {
168161
168167
  return typeof value === "object" && value !== null && "storedStyle" in value;
168162
168168
  }, hasStoredCopyFormat = (context) => {
@@ -168227,7 +168233,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168227
168233
  disabled: true,
168228
168234
  value: null
168229
168235
  };
168230
- const normalizedValues = formatting.filter((mark) => mark.name === "fontSize").map((mark) => mark.attrs?.fontSize).filter((value$1) => value$1 != null).map((value$1) => normalizeFontSizeValue(value$1));
168236
+ const normalizedValues = getFormattingAttr(formatting, "fontSize", "fontSize").map((value$1) => normalizeFontSizeValue(value$1));
168231
168237
  const uniqueValues = [...new Set(normalizedValues)];
168232
168238
  const hasDirectValue = uniqueValues.length > 0;
168233
168239
  const canUseLinkedStyle = !hasDirectValue && isFormattingActivatedFromLinkedStyle(context, "font-size");
@@ -168249,7 +168255,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168249
168255
  disabled: true,
168250
168256
  value: null
168251
168257
  };
168252
- const normalizedValues = formatting.filter((mark) => mark.name === "fontFamily").map((mark) => mark.attrs?.fontFamily).filter((value$1) => value$1 != null).map((value$1) => normalizeFontFamilyValue(value$1));
168258
+ const normalizedValues = getFormattingAttr(formatting, "fontFamily", "fontFamily").map((value$1) => normalizeFontFamilyValue(value$1));
168253
168259
  const uniqueValues = [...new Set(normalizedValues)];
168254
168260
  const canUseLinkedStyle = !(uniqueValues.length > 0) && isFormattingActivatedFromLinkedStyle(context, "font-family");
168255
168261
  const paragraphProps = canUseLinkedStyle ? getCurrentResolvedParagraphProperties(context) : null;
@@ -168270,7 +168276,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168270
168276
  disabled: true,
168271
168277
  value: null
168272
168278
  };
168273
- const values = formatting.filter((mark) => mark.name === "color").map((mark) => mark.attrs?.color).filter((value$1) => value$1 != null);
168279
+ const values = getFormattingAttr(formatting, "color", "color");
168274
168280
  const markNegated = hasNegatedFormattingMark(formatting, "color");
168275
168281
  const normalizedValues = values.map((value$1) => normalizeColorValue(value$1));
168276
168282
  const uniqueValues = [...new Set(normalizedValues)];
@@ -168289,7 +168295,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168289
168295
  disabled: true,
168290
168296
  value: null
168291
168297
  };
168292
- const values = formatting.filter((mark) => mark.name === "highlight").map((mark) => mark.attrs?.color).filter((value$1) => value$1 != null);
168298
+ const values = getFormattingAttr(formatting, "highlight", "color");
168293
168299
  const markNegated = hasNegatedFormattingMark(formatting, "highlight");
168294
168300
  const normalizedValues = values.map((value$1) => normalizeColorValue(value$1));
168295
168301
  const uniqueValues = [...new Set(normalizedValues)];
@@ -168308,7 +168314,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168308
168314
  disabled: true,
168309
168315
  value: null
168310
168316
  };
168311
- const normalizedValues = formatting.filter((mark) => mark.name === "link").map((mark) => mark.attrs?.href).filter((value$1) => value$1 != null).map((value$1) => normalizeLinkHrefValue(value$1));
168317
+ const normalizedValues = getFormattingAttr(formatting, "link", "href").map((value$1) => normalizeLinkHrefValue(value$1));
168312
168318
  const uniqueValues = [...new Set(normalizedValues)];
168313
168319
  const value = uniqueValues.length === 1 ? uniqueValues[0] : null;
168314
168320
  return {
@@ -168951,8 +168957,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168951
168957
  }
168952
168958
  };
168953
168959
  };
168954
- var init_create_headless_toolbar_QcQvy_nD_es = __esm(() => {
168955
- init_SuperConverter_UqLu6KQU_es();
168960
+ var init_create_headless_toolbar_nX0t772H_es = __esm(() => {
168961
+ init_SuperConverter_BptSHzcb_es();
168956
168962
  init_uuid_qzgm05fK_es();
168957
168963
  init_constants_DrU4EASo_es();
168958
168964
  init_dist_B8HfvhaK_es();
@@ -218157,7 +218163,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
218157
218163
  init_remark_gfm_BhnWr3yf_es();
218158
218164
  });
218159
218165
 
218160
- // ../../packages/superdoc/dist/chunks/src-DygNo4Zh.es.js
218166
+ // ../../packages/superdoc/dist/chunks/src-DOX3DoA2.es.js
218161
218167
  function deleteProps(obj, propOrProps) {
218162
218168
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
218163
218169
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -244848,15 +244854,16 @@ function getPayloadVersionForCoverage(coverage) {
244848
244854
  return coverage.headerFooters ? PAYLOAD_VERSION_V2 : PAYLOAD_VERSION_V1;
244849
244855
  }
244850
244856
  function createDiffAdapter(editor) {
244857
+ const diffEditor = editor;
244851
244858
  return {
244852
244859
  capture() {
244853
- return wrapServiceCall(() => captureSnapshot(editor));
244860
+ return wrapServiceCall(() => captureSnapshot(diffEditor));
244854
244861
  },
244855
244862
  compare(input2) {
244856
- return wrapServiceCall(() => compareToSnapshot(editor, input2.targetSnapshot));
244863
+ return wrapServiceCall(() => compareToSnapshot(diffEditor, input2.targetSnapshot));
244857
244864
  },
244858
244865
  apply(input2, options) {
244859
- const { result, tr } = wrapServiceCall(() => applyDiffPayload(editor, input2.diff, options));
244866
+ const { result, tr } = wrapServiceCall(() => applyDiffPayload(diffEditor, input2.diff, options));
244860
244867
  if (tr.docChanged || result.appliedOperations > 0)
244861
244868
  editor.dispatch(tr);
244862
244869
  editor.emit("commentsUpdate", { type: "replayCompleted" });
@@ -306546,13 +306553,13 @@ menclose::after {
306546
306553
  return;
306547
306554
  console.log(...args$1);
306548
306555
  }, 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;
306549
- var init_src_DygNo4Zh_es = __esm(() => {
306556
+ var init_src_DOX3DoA2_es = __esm(() => {
306550
306557
  init_rolldown_runtime_Bg48TavK_es();
306551
- init_SuperConverter_UqLu6KQU_es();
306558
+ init_SuperConverter_BptSHzcb_es();
306552
306559
  init_jszip_C49i9kUs_es();
306553
306560
  init_xml_js_CqGKpaft_es();
306554
306561
  init_uuid_qzgm05fK_es();
306555
- init_create_headless_toolbar_QcQvy_nD_es();
306562
+ init_create_headless_toolbar_nX0t772H_es();
306556
306563
  init_constants_DrU4EASo_es();
306557
306564
  init_dist_B8HfvhaK_es();
306558
306565
  init_unified_Dsuw2be5_es();
@@ -330754,7 +330761,7 @@ function print() { __p += __j.call(arguments, '') }
330754
330761
  if (!this.#telemetry || this.#documentOpenTracked)
330755
330762
  return;
330756
330763
  try {
330757
- const documentCreatedAt = this.converter?.getDocumentCreatedTimestamp?.() || null;
330764
+ const documentCreatedAt = this.converter?.getDocumentCreatedTimestamp?.() ?? null;
330758
330765
  this.#telemetry.trackDocumentOpen(documentId, documentCreatedAt);
330759
330766
  this.#documentOpenTracked = true;
330760
330767
  } catch {}
@@ -344325,11 +344332,11 @@ function print() { __p += __j.call(arguments, '') }
344325
344332
  ];
344326
344333
  });
344327
344334
 
344328
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-BuJIur0F.es.js
344335
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-DgOJ39d-.es.js
344329
344336
  var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
344330
- var init_create_super_doc_ui_BuJIur0F_es = __esm(() => {
344331
- init_SuperConverter_UqLu6KQU_es();
344332
- init_create_headless_toolbar_QcQvy_nD_es();
344337
+ var init_create_super_doc_ui_DgOJ39d_es = __esm(() => {
344338
+ init_SuperConverter_BptSHzcb_es();
344339
+ init_create_headless_toolbar_nX0t772H_es();
344333
344340
  MOD_ALIASES = new Set([
344334
344341
  "Mod",
344335
344342
  "Meta",
@@ -344371,16 +344378,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
344371
344378
 
344372
344379
  // ../../packages/superdoc/dist/super-editor.es.js
344373
344380
  var init_super_editor_es = __esm(() => {
344374
- init_src_DygNo4Zh_es();
344375
- init_SuperConverter_UqLu6KQU_es();
344381
+ init_src_DOX3DoA2_es();
344382
+ init_SuperConverter_BptSHzcb_es();
344376
344383
  init_jszip_C49i9kUs_es();
344377
344384
  init_xml_js_CqGKpaft_es();
344378
- init_create_headless_toolbar_QcQvy_nD_es();
344385
+ init_create_headless_toolbar_nX0t772H_es();
344379
344386
  init_constants_DrU4EASo_es();
344380
344387
  init_dist_B8HfvhaK_es();
344381
344388
  init_unified_Dsuw2be5_es();
344382
344389
  init_DocxZipper_CZMPWpOp_es();
344383
- init_create_super_doc_ui_BuJIur0F_es();
344390
+ init_create_super_doc_ui_DgOJ39d_es();
344384
344391
  init_ui_C5PAS9hY_es();
344385
344392
  init_eventemitter3_BnGqBE_Q_es();
344386
344393
  init_errors_CNaD6vcg_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.12.0-next.20",
3
+ "version": "0.12.0-next.21",
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": "1.34.0",
30
- "@superdoc/super-editor": "0.0.1"
29
+ "@superdoc/super-editor": "0.0.1",
30
+ "superdoc": "1.34.0"
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.12.0-next.20",
38
- "@superdoc-dev/cli-darwin-x64": "0.12.0-next.20",
39
- "@superdoc-dev/cli-linux-x64": "0.12.0-next.20",
40
- "@superdoc-dev/cli-linux-arm64": "0.12.0-next.20",
41
- "@superdoc-dev/cli-windows-x64": "0.12.0-next.20"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.12.0-next.21",
38
+ "@superdoc-dev/cli-darwin-x64": "0.12.0-next.21",
39
+ "@superdoc-dev/cli-linux-arm64": "0.12.0-next.21",
40
+ "@superdoc-dev/cli-windows-x64": "0.12.0-next.21",
41
+ "@superdoc-dev/cli-linux-x64": "0.12.0-next.21"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",