@superdoc-dev/mcp 0.3.0-next.82 → 0.3.0-next.84

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 +36 -29
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -14569,7 +14569,7 @@ function finalize(ctx, schema) {
14569
14569
  result.$schema = "http://json-schema.org/draft-07/schema#";
14570
14570
  } else if (ctx.target === "draft-04") {
14571
14571
  result.$schema = "http://json-schema.org/draft-04/schema#";
14572
- } else if (ctx.target === "openapi-3.0") {} else {}
14572
+ } else if (ctx.target === "openapi-3.0") {}
14573
14573
  if (ctx.external?.uri) {
14574
14574
  const id = ctx.external.registry.get(schema)?.id;
14575
14575
  if (!id)
@@ -14834,7 +14834,7 @@ var formatMap, stringProcessor = (schema, ctx, _json, _params) => {
14834
14834
  if (val === undefined) {
14835
14835
  if (ctx.unrepresentable === "throw") {
14836
14836
  throw new Error("Literal `undefined` cannot be represented in JSON Schema");
14837
- } else {}
14837
+ }
14838
14838
  } else if (typeof val === "bigint") {
14839
14839
  if (ctx.unrepresentable === "throw") {
14840
14840
  throw new Error("BigInt literals cannot be represented in JSON Schema");
@@ -51891,7 +51891,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
51891
51891
  emptyOptions2 = {};
51892
51892
  });
51893
51893
 
51894
- // ../../packages/superdoc/dist/chunks/SuperConverter-VRDgcp1i.es.js
51894
+ // ../../packages/superdoc/dist/chunks/SuperConverter-CHgmKFZo.es.js
51895
51895
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
51896
51896
  const fieldValue = extension$1.config[field];
51897
51897
  if (typeof fieldValue === "function")
@@ -73389,15 +73389,21 @@ function bodySectPrShouldEmbed(bodySectPr) {
73389
73389
  const cols = getSectPrColumns(bodySectPr);
73390
73390
  return !!(cols?.count && cols.count > 1);
73391
73391
  }
73392
+ function hiddenClipboardPayload(attr, base643) {
73393
+ return `<div ${attr}="${base643}" style="display:none"></div>`;
73394
+ }
73395
+ function readClipboardPayload(el, attr) {
73396
+ return el.getAttribute(attr)?.trim() || el.textContent?.trim() || "";
73397
+ }
73392
73398
  function embedSliceInHtml(html2, sliceJson, bodySectPrJson = "", mediaJson = "") {
73393
73399
  let out = html2;
73394
73400
  if (bodySectPrJson)
73395
- out = `<div ${SUPERDOC_BODY_SECT_PR_ATTR} style="display:none">${encodeUtf8Base64(bodySectPrJson)}</div>${out}`;
73401
+ out = `${hiddenClipboardPayload(SUPERDOC_BODY_SECT_PR_ATTR, encodeUtf8Base64(bodySectPrJson))}${out}`;
73396
73402
  if (mediaJson)
73397
- out = `<div ${SUPERDOC_MEDIA_ATTR} style="display:none">${encodeUtf8Base64(mediaJson)}</div>${out}`;
73403
+ out = `${hiddenClipboardPayload(SUPERDOC_MEDIA_ATTR, encodeUtf8Base64(mediaJson))}${out}`;
73398
73404
  if (!sliceJson)
73399
73405
  return out;
73400
- return `<div ${SUPERDOC_SLICE_ATTR} style="display:none">${encodeUtf8Base64(sliceJson)}</div>${out}`;
73406
+ return `${hiddenClipboardPayload(SUPERDOC_SLICE_ATTR, encodeUtf8Base64(sliceJson))}${out}`;
73401
73407
  }
73402
73408
  function extractSliceFromHtml(html2) {
73403
73409
  if (!html2 || !html2.includes("data-superdoc-slice"))
@@ -73408,9 +73414,7 @@ function extractSliceFromHtml(html2) {
73408
73414
  const el = new DOMParser().parseFromString(html2, "text/html").querySelector(`[${SUPERDOC_SLICE_ATTR}]`);
73409
73415
  if (!el)
73410
73416
  return null;
73411
- let b64 = el.textContent?.trim() ?? "";
73412
- if (!b64)
73413
- b64 = el.getAttribute("data-superdoc-slice")?.trim() ?? "";
73417
+ const b64 = readClipboardPayload(el, SUPERDOC_SLICE_ATTR);
73414
73418
  if (!b64)
73415
73419
  return null;
73416
73420
  return decodeUtf8Base64(b64) || null;
@@ -73439,7 +73443,7 @@ function extractMediaFromHtml(html2) {
73439
73443
  const el = new DOMParser().parseFromString(html2, "text/html").querySelector(`[${SUPERDOC_MEDIA_ATTR}]`);
73440
73444
  if (!el)
73441
73445
  return null;
73442
- const b64 = el.textContent?.trim() ?? "";
73446
+ const b64 = readClipboardPayload(el, SUPERDOC_MEDIA_ATTR);
73443
73447
  if (!b64)
73444
73448
  return null;
73445
73449
  return decodeUtf8Base64(b64) || null;
@@ -73456,7 +73460,7 @@ function extractBodySectPrFromHtml(html2) {
73456
73460
  const el = new DOMParser().parseFromString(html2, "text/html").querySelector(`[${SUPERDOC_BODY_SECT_PR_ATTR}]`);
73457
73461
  if (!el)
73458
73462
  return null;
73459
- const b64 = el.textContent?.trim() ?? "";
73463
+ const b64 = readClipboardPayload(el, SUPERDOC_BODY_SECT_PR_ATTR);
73460
73464
  if (!b64)
73461
73465
  return null;
73462
73466
  return JSON.parse(decodeUtf8Base64(b64));
@@ -105266,6 +105270,8 @@ var isRegExp = (value) => {
105266
105270
  return findChildren(node2, (child) => child.isInline, descend);
105267
105271
  }, getTrackChanges = (state, id = null) => {
105268
105272
  const trackedChanges = [];
105273
+ if (!state?.doc)
105274
+ return trackedChanges;
105269
105275
  const allInlineNodes = findInlineNodes(state.doc);
105270
105276
  if (!allInlineNodes.length)
105271
105277
  return trackedChanges;
@@ -105323,7 +105329,7 @@ var isRegExp = (value) => {
105323
105329
  state.kern = kernNode.attributes["w:val"];
105324
105330
  }
105325
105331
  }, SuperConverter;
105326
- var init_SuperConverter_VRDgcp1i_es = __esm(() => {
105332
+ var init_SuperConverter_CHgmKFZo_es = __esm(() => {
105327
105333
  init_rolldown_runtime_Bg48TavK_es();
105328
105334
  init_jszip_C49i9kUs_es();
105329
105335
  init_xml_js_CqGKpaft_es();
@@ -143192,7 +143198,7 @@ var init_SuperConverter_VRDgcp1i_es = __esm(() => {
143192
143198
  };
143193
143199
  });
143194
143200
 
143195
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-CFpu73zE.es.js
143201
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-D80LhrY2.es.js
143196
143202
  function parseSizeUnit(val = "0") {
143197
143203
  const length = val.toString() || "0";
143198
143204
  const value = Number.parseFloat(length);
@@ -145881,8 +145887,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
145881
145887
  }
145882
145888
  };
145883
145889
  };
145884
- var init_create_headless_toolbar_CFpu73zE_es = __esm(() => {
145885
- init_SuperConverter_VRDgcp1i_es();
145890
+ var init_create_headless_toolbar_D80LhrY2_es = __esm(() => {
145891
+ init_SuperConverter_CHgmKFZo_es();
145886
145892
  init_constants_DrU4EASo_es();
145887
145893
  init_dist_B8HfvhaK_es();
145888
145894
  CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
@@ -174824,8 +174830,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
174824
174830
  patchFlag |= 2048;
174825
174831
  }
174826
174832
  root2.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, root2.children, patchFlag, undefined, undefined, true, undefined, false);
174827
- } else
174828
- ;
174833
+ }
174829
174834
  }
174830
174835
  function traverseChildren(parent, context) {
174831
174836
  let i4 = 0;
@@ -200101,7 +200106,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
200101
200106
  init_remark_gfm_BhnWr3yf_es();
200102
200107
  });
200103
200108
 
200104
- // ../../packages/superdoc/dist/chunks/src-Te0O889F.es.js
200109
+ // ../../packages/superdoc/dist/chunks/src-DRfvNmSR.es.js
200105
200110
  function deleteProps(obj, propOrProps) {
200106
200111
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
200107
200112
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -293718,12 +293723,12 @@ menclose::after {
293718
293723
  return;
293719
293724
  console.log(...args$1);
293720
293725
  }, 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;
293721
- var init_src_Te0O889F_es = __esm(() => {
293726
+ var init_src_DRfvNmSR_es = __esm(() => {
293722
293727
  init_rolldown_runtime_Bg48TavK_es();
293723
- init_SuperConverter_VRDgcp1i_es();
293728
+ init_SuperConverter_CHgmKFZo_es();
293724
293729
  init_jszip_C49i9kUs_es();
293725
293730
  init_uuid_qzgm05fK_es();
293726
- init_create_headless_toolbar_CFpu73zE_es();
293731
+ init_create_headless_toolbar_D80LhrY2_es();
293727
293732
  init_constants_DrU4EASo_es();
293728
293733
  init_dist_B8HfvhaK_es();
293729
293734
  init_unified_Dsuw2be5_es();
@@ -331754,11 +331759,11 @@ function print() { __p += __j.call(arguments, '') }
331754
331759
  ];
331755
331760
  });
331756
331761
 
331757
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-BV13TIG4.es.js
331762
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-pg9u9fct.es.js
331758
331763
  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;
331759
- var init_create_super_doc_ui_BV13TIG4_es = __esm(() => {
331760
- init_SuperConverter_VRDgcp1i_es();
331761
- init_create_headless_toolbar_CFpu73zE_es();
331764
+ var init_create_super_doc_ui_pg9u9fct_es = __esm(() => {
331765
+ init_SuperConverter_CHgmKFZo_es();
331766
+ init_create_headless_toolbar_D80LhrY2_es();
331762
331767
  MOD_ALIASES = new Set([
331763
331768
  "Mod",
331764
331769
  "Meta",
@@ -331800,16 +331805,16 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
331800
331805
 
331801
331806
  // ../../packages/superdoc/dist/super-editor.es.js
331802
331807
  var init_super_editor_es = __esm(() => {
331803
- init_src_Te0O889F_es();
331804
- init_SuperConverter_VRDgcp1i_es();
331808
+ init_src_DRfvNmSR_es();
331809
+ init_SuperConverter_CHgmKFZo_es();
331805
331810
  init_jszip_C49i9kUs_es();
331806
331811
  init_xml_js_CqGKpaft_es();
331807
- init_create_headless_toolbar_CFpu73zE_es();
331812
+ init_create_headless_toolbar_D80LhrY2_es();
331808
331813
  init_constants_DrU4EASo_es();
331809
331814
  init_dist_B8HfvhaK_es();
331810
331815
  init_unified_Dsuw2be5_es();
331811
331816
  init_DocxZipper_Dh4RtvcE_es();
331812
- init_create_super_doc_ui_BV13TIG4_es();
331817
+ init_create_super_doc_ui_pg9u9fct_es();
331813
331818
  init_ui_CGB3qmy3_es();
331814
331819
  init_eventemitter3_UwU_CLPU_es();
331815
331820
  init_errors_C_DoKMoN_es();
@@ -425196,6 +425201,8 @@ var flatten3 = (node4, descend = true) => {
425196
425201
  // ../../packages/super-editor/src/editors/v1/extensions/track-changes/trackChangesHelpers/getTrackChanges.js
425197
425202
  var getTrackChanges2 = (state, id2 = null) => {
425198
425203
  const trackedChanges = [];
425204
+ if (!state?.doc)
425205
+ return trackedChanges;
425199
425206
  const allInlineNodes = findInlineNodes2(state.doc);
425200
425207
  if (!allInlineNodes.length) {
425201
425208
  return trackedChanges;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/mcp",
3
- "version": "0.3.0-next.82",
3
+ "version": "0.3.0-next.84",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20"