@superdoc-dev/mcp 0.11.0-next.15 → 0.11.0-next.16

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 +55 -39
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -157219,7 +157219,7 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
157219
157219
  };
157220
157220
  });
157221
157221
 
157222
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-DUhzXJ4D.es.js
157222
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-pilP-Jq-.es.js
157223
157223
  function parseSizeUnit(val = "0") {
157224
157224
  const length = val.toString() || "0";
157225
157225
  const value = Number.parseFloat(length);
@@ -166663,6 +166663,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
166663
166663
  disabled: !context,
166664
166664
  value: typeof superdoc?.getZoom === "function" ? superdoc.getZoom() : 100
166665
166665
  };
166666
+ }, createZoomFitWidthStateDeriver = () => ({ context, superdoc }) => {
166667
+ return {
166668
+ active: (typeof superdoc?.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined) === "fit-width",
166669
+ disabled: !context || typeof superdoc?.setZoomMode !== "function"
166670
+ };
166666
166671
  }, createDocumentModeStateDeriver = () => ({ context, superdoc }) => {
166667
166672
  return {
166668
166673
  active: false,
@@ -166683,6 +166688,12 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
166683
166688
  return false;
166684
166689
  superdoc.setZoom?.(normalizedPayload);
166685
166690
  return true;
166691
+ }, createZoomFitWidthExecute = () => ({ superdoc }) => {
166692
+ if (typeof superdoc?.setZoomMode !== "function")
166693
+ return false;
166694
+ const mode = typeof superdoc.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined;
166695
+ superdoc.setZoomMode(mode === "fit-width" ? "manual" : "fit-width");
166696
+ return true;
166686
166697
  }, createDocumentModeExecute = () => ({ superdoc, payload }) => {
166687
166698
  const validModes = [
166688
166699
  "editing",
@@ -167356,6 +167367,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
167356
167367
  state: createZoomStateDeriver(),
167357
167368
  execute: createZoomExecute()
167358
167369
  },
167370
+ "zoom-fit-width": {
167371
+ id: "zoom-fit-width",
167372
+ state: createZoomFitWidthStateDeriver(),
167373
+ execute: createZoomFitWidthExecute()
167374
+ },
167359
167375
  "document-mode": {
167360
167376
  id: "document-mode",
167361
167377
  state: createDocumentModeStateDeriver(),
@@ -167552,7 +167568,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
167552
167568
  }
167553
167569
  };
167554
167570
  };
167555
- var init_create_headless_toolbar_DUhzXJ4D_es = __esm(() => {
167571
+ var init_create_headless_toolbar_pilP_Jq_es = __esm(() => {
167556
167572
  init_SuperConverter_DOoAJ6Zk_es();
167557
167573
  init_uuid_qzgm05fK_es();
167558
167574
  init_constants_D9qj59G2_es();
@@ -168741,7 +168757,7 @@ var init_remark_stringify_6MMJfY0k_es = __esm(() => {
168741
168757
  eol = /\r?\n|\r/g;
168742
168758
  });
168743
168759
 
168744
- // ../../packages/superdoc/dist/chunks/detect-container-B6sqy7HZ.es.js
168760
+ // ../../packages/superdoc/dist/chunks/detect-container-sTWXwOzh.es.js
168745
168761
  function matchesMagic(bytes, magic) {
168746
168762
  if (bytes.length < magic.length)
168747
168763
  return false;
@@ -168759,7 +168775,7 @@ function detectContainerType(data) {
168759
168775
  return "unknown";
168760
168776
  }
168761
168777
  var ZIP_MAGIC, CFB_MAGIC;
168762
- var init_detect_container_B6sqy7HZ_es = __esm(() => {
168778
+ var init_detect_container_sTWXwOzh_es = __esm(() => {
168763
168779
  ZIP_MAGIC = [
168764
168780
  80,
168765
168781
  75,
@@ -168778,13 +168794,13 @@ var init_detect_container_B6sqy7HZ_es = __esm(() => {
168778
168794
  ];
168779
168795
  });
168780
168796
 
168781
- // ../../packages/superdoc/dist/chunks/detect-container-Cs3KoJVc.es.js
168782
- var exports_detect_container_Cs3KoJVc_es = {};
168783
- __export(exports_detect_container_Cs3KoJVc_es, {
168797
+ // ../../packages/superdoc/dist/chunks/detect-container-0tUwtCR4.es.js
168798
+ var exports_detect_container_0tUwtCR4_es = {};
168799
+ __export(exports_detect_container_0tUwtCR4_es, {
168784
168800
  detectContainerType: () => detectContainerType
168785
168801
  });
168786
- var init_detect_container_Cs3KoJVc_es = __esm(() => {
168787
- init_detect_container_B6sqy7HZ_es();
168802
+ var init_detect_container_0tUwtCR4_es = __esm(() => {
168803
+ init_detect_container_sTWXwOzh_es();
168788
168804
  });
168789
168805
 
168790
168806
  // ../../packages/superdoc/dist/chunks/errors-CNaD6vcg.es.js
@@ -168837,9 +168853,9 @@ var init_errors_CNaD6vcg_es = __esm(() => {
168837
168853
  };
168838
168854
  });
168839
168855
 
168840
- // ../../packages/superdoc/dist/chunks/decrypt-docx-G2a7hkiV.es.js
168841
- var exports_decrypt_docx_G2a7hkiV_es = {};
168842
- __export(exports_decrypt_docx_G2a7hkiV_es, {
168856
+ // ../../packages/superdoc/dist/chunks/decrypt-docx-CPcaRl5W.es.js
168857
+ var exports_decrypt_docx_CPcaRl5W_es = {};
168858
+ __export(exports_decrypt_docx_CPcaRl5W_es, {
168843
168859
  decryptDocxIfNeeded: () => decryptDocxIfNeeded
168844
168860
  });
168845
168861
  function concatUint8Arrays(chunks) {
@@ -169380,10 +169396,10 @@ async function decryptDocxIfNeeded(data, options) {
169380
169396
  };
169381
169397
  }
169382
169398
  var CFB_SIGNATURE, CFB_END_OF_CHAIN = 4294967294, CFB_OBJECT_TYPE, utf16LeDecoder, AGILE_VERSION = 4, AGILE_RESERVED = 4, STANDARD_VERSION_3 = 3, STANDARD_VERSION_4 = 4, STANDARD_RESERVED = 3, MIN_HEADER_SIZE = 8, BLOCK_KEY_VERIFIER_INPUT, BLOCK_KEY_VERIFIER_VALUE, BLOCK_KEY_ENCRYPTED_KEY, BLOCK_KEY_HMAC_KEY, BLOCK_KEY_HMAC_VALUE, SEGMENT_SIZE = 4096, PACKAGE_HEADER_SIZE = 8;
169383
- var init_decrypt_docx_G2a7hkiV_es = __esm(() => {
169399
+ var init_decrypt_docx_CPcaRl5W_es = __esm(() => {
169384
169400
  init_dist_B8HfvhaK_es();
169385
169401
  init_errors_CNaD6vcg_es();
169386
- init_detect_container_B6sqy7HZ_es();
169402
+ init_detect_container_sTWXwOzh_es();
169387
169403
  CFB_SIGNATURE = new Uint8Array([
169388
169404
  208,
169389
169405
  207,
@@ -169452,7 +169468,7 @@ var init_decrypt_docx_G2a7hkiV_es = __esm(() => {
169452
169468
  ]);
169453
169469
  });
169454
169470
 
169455
- // ../../packages/superdoc/dist/chunks/DocxZipper-Bu2Fhqkw.es.js
169471
+ // ../../packages/superdoc/dist/chunks/DocxZipper-FUsfThjV.es.js
169456
169472
  function sniffEncoding(u8) {
169457
169473
  if (u8.length >= 2) {
169458
169474
  const b0 = u8[0], b1 = u8[1];
@@ -169768,11 +169784,11 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
169768
169784
  return new Uint8Array(0);
169769
169785
  }
169770
169786
  async getDocxData(file2, isNode = false, options = {}) {
169771
- const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (init_detect_container_Cs3KoJVc_es(), exports_detect_container_Cs3KoJVc_es));
169787
+ const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (init_detect_container_0tUwtCR4_es(), exports_detect_container_0tUwtCR4_es));
169772
169788
  const containerType = detectContainerType2(await this.#peekBytes(file2, 8));
169773
169789
  let fileData = file2;
169774
169790
  if (containerType === "cfb") {
169775
- const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (init_decrypt_docx_G2a7hkiV_es(), exports_decrypt_docx_G2a7hkiV_es));
169791
+ const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (init_decrypt_docx_CPcaRl5W_es(), exports_decrypt_docx_CPcaRl5W_es));
169776
169792
  const result = await decryptDocxIfNeeded2(file2 instanceof Uint8Array ? file2 : file2 instanceof ArrayBuffer ? new Uint8Array(file2) : new Uint8Array(await file2.arrayBuffer()), { password: options.password });
169777
169793
  fileData = result.data;
169778
169794
  this.decryptedFileData = result.data;
@@ -170125,7 +170141,7 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
170125
170141
  return `image/${MIME_TYPE_FOR_EXT[detectedType] || detectedType}`;
170126
170142
  }
170127
170143
  }, DocxZipper_default;
170128
- var init_DocxZipper_Bu2Fhqkw_es = __esm(() => {
170144
+ var init_DocxZipper_FUsfThjV_es = __esm(() => {
170129
170145
  init_rolldown_runtime_Bg48TavK_es();
170130
170146
  init_jszip_C49i9kUs_es();
170131
170147
  init_xml_js_CqGKpaft_es();
@@ -211525,9 +211541,9 @@ var init_unified_vFnLRfAM_es = __esm(() => {
211525
211541
  init_unified_Dsuw2be5_es();
211526
211542
  });
211527
211543
 
211528
- // ../../packages/superdoc/dist/chunks/rehype-parse-q8NfsLv7.es.js
211529
- var exports_rehype_parse_q8NfsLv7_es = {};
211530
- __export(exports_rehype_parse_q8NfsLv7_es, {
211544
+ // ../../packages/superdoc/dist/chunks/rehype-parse-DTSDs3kr.es.js
211545
+ var exports_rehype_parse_DTSDs3kr_es = {};
211546
+ __export(exports_rehype_parse_DTSDs3kr_es, {
211531
211547
  default: () => rehypeParse
211532
211548
  });
211533
211549
  function merge2(definitions, space) {
@@ -217476,7 +217492,7 @@ var Schema2 = class {
217476
217492
  }
217477
217493
  }
217478
217494
  }, TABLE_VOID_ELEMENTS, errors4, base2 = "https://html.spec.whatwg.org/multipage/parsing.html#parse-error-", dashToCamelRe, formatCRe, formatXRe, fatalities, emptyOptions3;
217479
- var init_rehype_parse_q8NfsLv7_es = __esm(() => {
217495
+ var init_rehype_parse_DTSDs3kr_es = __esm(() => {
217480
217496
  init_rolldown_runtime_Bg48TavK_es();
217481
217497
  init_default_BqgWzMfR_es();
217482
217498
  init_lib_CYqLdG4z_es();
@@ -220221,9 +220237,9 @@ var init_rehype_parse_q8NfsLv7_es = __esm(() => {
220221
220237
  emptyOptions3 = {};
220222
220238
  });
220223
220239
 
220224
- // ../../packages/superdoc/dist/chunks/rehype-remark-CKg94dxK.es.js
220225
- var exports_rehype_remark_CKg94dxK_es = {};
220226
- __export(exports_rehype_remark_CKg94dxK_es, {
220240
+ // ../../packages/superdoc/dist/chunks/rehype-remark-Bt5njn02.es.js
220241
+ var exports_rehype_remark_Bt5njn02_es = {};
220242
+ __export(exports_rehype_remark_Bt5njn02_es, {
220227
220243
  default: () => rehypeRemark
220228
220244
  });
220229
220245
  function anyFactory2(tests) {
@@ -221843,7 +221859,7 @@ var env, deserializer = ($2, _2) => {
221843
221859
  if (is(parent.children[index2], index2, parent))
221844
221860
  return parent.children[index2];
221845
221861
  }, searchLineFeeds, searchTabOrSpaces, br$1, cell, p$1, row, notRendered, blockOrCaption, prefix = "language-", defaultChecked = "[x]", defaultUnchecked = "[ ]", own$12, list$1, basic, meta3, defaultQuotes, nodeHandlers2, handlers2, own6, emptyOptions4, defaults;
221846
- var init_rehype_remark_CKg94dxK_es = __esm(() => {
221862
+ var init_rehype_remark_Bt5njn02_es = __esm(() => {
221847
221863
  init_lib_DEff_P2k_es();
221848
221864
  env = typeof self === "object" ? self : globalThis;
221849
221865
  ({ toString: toString$1 } = {});
@@ -222237,7 +222253,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
222237
222253
  init_remark_gfm_BhnWr3yf_es();
222238
222254
  });
222239
222255
 
222240
- // ../../packages/superdoc/dist/chunks/src-DEnygTyz.es.js
222256
+ // ../../packages/superdoc/dist/chunks/src-CWo3dWd9.es.js
222241
222257
  function deleteProps(obj, propOrProps) {
222242
222258
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
222243
222259
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -319422,19 +319438,19 @@ menclose::after {
319422
319438
  return;
319423
319439
  console.log(...args$1);
319424
319440
  }, 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, TRACKED_MARK_NAMES;
319425
- var init_src_DEnygTyz_es = __esm(() => {
319441
+ var init_src_CWo3dWd9_es = __esm(() => {
319426
319442
  init_rolldown_runtime_Bg48TavK_es();
319427
319443
  init_SuperConverter_DOoAJ6Zk_es();
319428
319444
  init_jszip_C49i9kUs_es();
319429
319445
  init_xml_js_CqGKpaft_es();
319430
319446
  init_uuid_qzgm05fK_es();
319431
- init_create_headless_toolbar_DUhzXJ4D_es();
319447
+ init_create_headless_toolbar_pilP_Jq_es();
319432
319448
  init_constants_D9qj59G2_es();
319433
319449
  init_dist_B8HfvhaK_es();
319434
319450
  init_unified_Dsuw2be5_es();
319435
319451
  init_remark_gfm_BhnWr3yf_es();
319436
319452
  init_remark_stringify_6MMJfY0k_es();
319437
- init_DocxZipper_Bu2Fhqkw_es();
319453
+ init_DocxZipper_FUsfThjV_es();
319438
319454
  init__plugin_vue_export_helper_5t5P5NuM_es();
319439
319455
  init_eventemitter3_BnGqBE_Q_es();
319440
319456
  init_errors_CNaD6vcg_es();
@@ -345417,8 +345433,8 @@ function print() { __p += __j.call(arguments, '') }
345417
345433
  try {
345418
345434
  const [{ unified: unified$1 }, { default: rehypeParse2 }, { default: rehypeRemark2 }, { default: remarkStringify$1 }, { default: remarkGfm$1 }] = await Promise.all([
345419
345435
  Promise.resolve().then(() => (init_unified_vFnLRfAM_es(), exports_unified_vFnLRfAM_es)),
345420
- Promise.resolve().then(() => (init_rehype_parse_q8NfsLv7_es(), exports_rehype_parse_q8NfsLv7_es)),
345421
- Promise.resolve().then(() => (init_rehype_remark_CKg94dxK_es(), exports_rehype_remark_CKg94dxK_es)),
345436
+ Promise.resolve().then(() => (init_rehype_parse_DTSDs3kr_es(), exports_rehype_parse_DTSDs3kr_es)),
345437
+ Promise.resolve().then(() => (init_rehype_remark_Bt5njn02_es(), exports_rehype_remark_Bt5njn02_es)),
345422
345438
  Promise.resolve().then(() => (init_remark_stringify_B_orWEvD_es(), exports_remark_stringify_B_orWEvD_es)),
345423
345439
  Promise.resolve().then(() => (init_remark_gfm_eZN6yzWQ_es(), exports_remark_gfm_eZN6yzWQ_es))
345424
345440
  ]);
@@ -354268,11 +354284,11 @@ function print() { __p += __j.call(arguments, '') }
354268
354284
  ]);
354269
354285
  });
354270
354286
 
354271
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-CmcU7hTR.es.js
354287
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-DUlu2DFj.es.js
354272
354288
  var headlessToolbarConstants, 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;
354273
- var init_create_super_doc_ui_CmcU7hTR_es = __esm(() => {
354289
+ var init_create_super_doc_ui_DUlu2DFj_es = __esm(() => {
354274
354290
  init_SuperConverter_DOoAJ6Zk_es();
354275
- init_create_headless_toolbar_DUhzXJ4D_es();
354291
+ init_create_headless_toolbar_pilP_Jq_es();
354276
354292
  headlessToolbarConstants = {
354277
354293
  DEFAULT_TEXT_ALIGN_OPTIONS: [
354278
354294
  {
@@ -354554,16 +354570,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
354554
354570
 
354555
354571
  // ../../packages/superdoc/dist/super-editor.es.js
354556
354572
  var init_super_editor_es = __esm(() => {
354557
- init_src_DEnygTyz_es();
354573
+ init_src_CWo3dWd9_es();
354558
354574
  init_SuperConverter_DOoAJ6Zk_es();
354559
354575
  init_jszip_C49i9kUs_es();
354560
354576
  init_xml_js_CqGKpaft_es();
354561
- init_create_headless_toolbar_DUhzXJ4D_es();
354577
+ init_create_headless_toolbar_pilP_Jq_es();
354562
354578
  init_constants_D9qj59G2_es();
354563
354579
  init_dist_B8HfvhaK_es();
354564
354580
  init_unified_Dsuw2be5_es();
354565
- init_DocxZipper_Bu2Fhqkw_es();
354566
- init_create_super_doc_ui_CmcU7hTR_es();
354581
+ init_DocxZipper_FUsfThjV_es();
354582
+ init_create_super_doc_ui_DUlu2DFj_es();
354567
354583
  init_ui_C5PAS9hY_es();
354568
354584
  init_eventemitter3_BnGqBE_Q_es();
354569
354585
  init_errors_CNaD6vcg_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/mcp",
3
- "version": "0.11.0-next.15",
3
+ "version": "0.11.0-next.16",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20"
@@ -20,8 +20,8 @@
20
20
  "@types/node": "22.19.2",
21
21
  "typescript": "^5.9.2",
22
22
  "@superdoc/super-editor": "0.0.1",
23
- "superdoc": "1.38.0",
24
- "@superdoc/document-api": "0.0.1"
23
+ "@superdoc/document-api": "0.0.1",
24
+ "superdoc": "1.38.0"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"