@superdoc-dev/mcp 0.10.0-next.3 → 0.10.0-next.4

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 +50 -29
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -211378,7 +211378,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
211378
211378
  init_remark_gfm_BhnWr3yf_es();
211379
211379
  });
211380
211380
 
211381
- // ../../packages/superdoc/dist/chunks/src-DzR9fgTM.es.js
211381
+ // ../../packages/superdoc/dist/chunks/src-D6vKCaok.es.js
211382
211382
  function deleteProps(obj, propOrProps) {
211383
211383
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
211384
211384
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -212767,6 +212767,29 @@ function checkLockViolation(sdtNodes, from$1, to) {
212767
212767
  }
212768
212768
  return { blocked: false };
212769
212769
  }
212770
+ function isAtBlockSdtWrapperDeletePosition(state, sdt, pos) {
212771
+ if (sdt.type !== "structuredContentBlock")
212772
+ return false;
212773
+ const $pos = state.doc.resolve(pos);
212774
+ let sdtDepth = null;
212775
+ for (let depth = $pos.depth;depth > 0; depth -= 1)
212776
+ if ($pos.node(depth).type.name === "structuredContentBlock" && $pos.before(depth) === sdt.pos) {
212777
+ sdtDepth = depth;
212778
+ break;
212779
+ }
212780
+ if (sdtDepth == null)
212781
+ return false;
212782
+ const textblockDepth = sdtDepth + 1;
212783
+ if ($pos.depth < textblockDepth)
212784
+ return false;
212785
+ if (!$pos.node(textblockDepth).isTextblock)
212786
+ return false;
212787
+ if ($pos.node(textblockDepth).type.name !== "paragraph")
212788
+ return false;
212789
+ if ($pos.pos !== $pos.start(textblockDepth))
212790
+ return false;
212791
+ return $pos.before(textblockDepth) === $pos.start(sdtDepth);
212792
+ }
212770
212793
  function createStructuredContentLockPlugin() {
212771
212794
  return new Plugin({
212772
212795
  key: STRUCTURED_CONTENT_LOCK_KEY,
@@ -212828,6 +212851,9 @@ function createStructuredContentLockPlugin() {
212828
212851
  view.dispatch(state.tr.delete(emptyInlineSDT.pos, emptyInlineSDT.end));
212829
212852
  return true;
212830
212853
  }
212854
+ const blockSdtAtWrapperDeletePosition = sdtNodes.find((s2) => isAtBlockSdtWrapperDeletePosition(state, s2, from$1));
212855
+ if ((isBackspace || isDelete) && blockSdtAtWrapperDeletePosition)
212856
+ return false;
212831
212857
  const inlineSdtAncestor = sdtNodes.find((s2) => s2.type === "structuredContent" && from$1 > s2.pos && from$1 < s2.end);
212832
212858
  const inlineSdtContentEditable = inlineSdtAncestor && inlineSdtAncestor.lockMode !== "contentLocked" && inlineSdtAncestor.lockMode !== "sdtContentLocked";
212833
212859
  if ((isBackspace || isDelete) && inlineSdtContentEditable && selection.$from.parent.type.name === "run") {
@@ -289499,8 +289525,9 @@ var Node$13 = class Node$14 {
289499
289525
  .superdoc-structured-content-block {
289500
289526
  box-sizing: border-box;
289501
289527
  border-radius: 4px;
289502
- background-color: var(--sd-content-controls-block-bg, transparent);
289528
+ background-color: transparent;
289503
289529
  position: relative;
289530
+ z-index: 0;
289504
289531
  --sd-sdt-chrome-left: 0px;
289505
289532
  --sd-sdt-chrome-width: 100%;
289506
289533
  --sd-sdt-chrome-bottom-extension: 0px;
@@ -289514,7 +289541,9 @@ var Node$13 = class Node$14 {
289514
289541
  bottom: calc(0px - var(--sd-sdt-chrome-bottom-extension, 0px));
289515
289542
  width: var(--sd-sdt-chrome-width, 100%);
289516
289543
  border-radius: inherit;
289544
+ background-color: var(--sd-content-controls-block-bg, transparent);
289517
289545
  box-sizing: border-box;
289546
+ z-index: -1;
289518
289547
  pointer-events: none;
289519
289548
  }
289520
289549
 
@@ -289528,6 +289557,7 @@ var Node$13 = class Node$14 {
289528
289557
  border: 1px solid transparent;
289529
289558
  border-radius: inherit;
289530
289559
  box-sizing: border-box;
289560
+ z-index: 1;
289531
289561
  pointer-events: none;
289532
289562
  }
289533
289563
 
@@ -289663,6 +289693,11 @@ var Node$13 = class Node$14 {
289663
289693
  z-index: 10;
289664
289694
  }
289665
289695
 
289696
+ .superdoc-structured-content-inline[data-contains-inline-image='true']:not([data-appearance='hidden']) {
289697
+ display: inline-block;
289698
+ vertical-align: top;
289699
+ }
289700
+
289666
289701
  /* Hover effect for inline structured content */
289667
289702
  .superdoc-structured-content-inline:not(.ProseMirror-selectednode):hover {
289668
289703
  background-color: var(--sd-content-controls-inline-hover-bg, #f2f2f2);
@@ -289794,6 +289829,7 @@ var Node$13 = class Node$14 {
289794
289829
  border: none;
289795
289830
  }
289796
289831
 
289832
+ .presentation-editor--viewing .superdoc-structured-content-block::before,
289797
289833
  .presentation-editor--viewing .superdoc-structured-content-block:hover::before,
289798
289834
  .presentation-editor--viewing .superdoc-structured-content-block.sdt-group-hover::before,
289799
289835
  .presentation-editor--viewing .superdoc-structured-content-block[data-lock-mode].sdt-group-hover::before {
@@ -289835,6 +289871,10 @@ var Node$13 = class Node$14 {
289835
289871
  border: none;
289836
289872
  }
289837
289873
 
289874
+ .superdoc-structured-content-block::before {
289875
+ background: none;
289876
+ }
289877
+
289838
289878
  .superdoc-document-section__tooltip,
289839
289879
  .superdoc-structured-content__label,
289840
289880
  .superdoc-structured-content-inline__label {
@@ -294135,6 +294175,8 @@ menclose::after {
294135
294175
  geoSdtWrapper.style.top = "0px";
294136
294176
  geoSdtWrapper.style.height = `${line.lineHeight}px`;
294137
294177
  }
294178
+ if (isImageRun$1(runForSdt))
294179
+ geoSdtWrapper.dataset.containsInlineImage = "true";
294138
294180
  runContext.syncInlineSdtWrapperTypography(geoSdtWrapper, runForSdt);
294139
294181
  elem.style.left = `${elemLeftPx - geoSdtWrapperLeft}px`;
294140
294182
  geoSdtMaxRight = Math.max(geoSdtMaxRight, elemLeftPx + elemWidthPx);
@@ -294288,6 +294330,8 @@ menclose::after {
294288
294330
  runContext.syncInlineSdtWrapperTypography(currentInlineSdtWrapper, run2);
294289
294331
  currentInlineSdtId = runSdtId;
294290
294332
  }
294333
+ if (isImageRun$1(run2))
294334
+ currentInlineSdtWrapper.dataset.containsInlineImage = "true";
294291
294335
  runContext.expandSdtWrapperPmRange(currentInlineSdtWrapper, run2.pmStart, run2.pmEnd);
294292
294336
  currentInlineSdtWrapper.appendChild(elem);
294293
294337
  } else
@@ -303755,26 +303799,6 @@ menclose::after {
303755
303799
  const layoutState = this.#deps?.getLayoutState();
303756
303800
  return calculateExtendedSelection(layoutState?.blocks ?? [], anchor, head, mode);
303757
303801
  }
303758
- #clampHeadAtIsolatingBoundary(doc$12, anchor, head) {
303759
- const forward = head >= anchor;
303760
- try {
303761
- const $head = doc$12.resolve(head);
303762
- let isolatingDepth = -1;
303763
- for (let d = $head.depth;d > 0; d--) {
303764
- const node2 = $head.node(d);
303765
- if (node2.type.spec.isolating || node2.type.spec.tableRole === "table")
303766
- isolatingDepth = d;
303767
- }
303768
- if (isolatingDepth > 0) {
303769
- const boundary = forward ? $head.before(isolatingDepth) : $head.after(isolatingDepth);
303770
- const near = Selection.near(doc$12.resolve(boundary), forward ? -1 : 1);
303771
- if (near instanceof TextSelection)
303772
- return near.head;
303773
- return anchor;
303774
- }
303775
- } catch {}
303776
- return head;
303777
- }
303778
303802
  #shouldUseCellSelection(currentTableHit) {
303779
303803
  return shouldUseCellSelection(currentTableHit, this.#cellAnchor, this.#cellDragMode);
303780
303804
  }
@@ -304912,8 +304936,7 @@ menclose::after {
304912
304936
  return;
304913
304937
  if (!useActiveSurfaceHitTest && isRenderedNoteBlockId(rawHit.blockId))
304914
304938
  return;
304915
- const doc$12 = editor.state?.doc;
304916
- if (!doc$12)
304939
+ if (!editor.state?.doc)
304917
304940
  return;
304918
304941
  this.#dragLastRawHit = rawHit;
304919
304942
  const pageMounted = this.#deps.getPageElement(rawHit.pageIndex) != null;
@@ -304936,9 +304959,7 @@ menclose::after {
304936
304959
  return;
304937
304960
  }
304938
304961
  const anchor = this.#dragAnchor;
304939
- let head = hit.pos;
304940
- if (!this.#cellAnchor)
304941
- head = this.#clampHeadAtIsolatingBoundary(doc$12, anchor, head);
304962
+ const head = hit.pos;
304942
304963
  const { selAnchor, selHead } = this.#calculateExtendedSelection(anchor, head, this.#dragExtensionMode);
304943
304964
  try {
304944
304965
  const tr = editor.state.tr.setSelection(TextSelection.create(editor.state.doc, selAnchor, selHead));
@@ -308263,7 +308284,7 @@ menclose::after {
308263
308284
  return;
308264
308285
  console.log(...args$1);
308265
308286
  }, 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;
308266
- var init_src_DzR9fgTM_es = __esm(() => {
308287
+ var init_src_D6vKCaok_es = __esm(() => {
308267
308288
  init_rolldown_runtime_Bg48TavK_es();
308268
308289
  init_SuperConverter_C6hKp29w_es();
308269
308290
  init_jszip_C49i9kUs_es();
@@ -342514,7 +342535,7 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
342514
342535
 
342515
342536
  // ../../packages/superdoc/dist/super-editor.es.js
342516
342537
  var init_super_editor_es = __esm(() => {
342517
- init_src_DzR9fgTM_es();
342538
+ init_src_D6vKCaok_es();
342518
342539
  init_SuperConverter_C6hKp29w_es();
342519
342540
  init_jszip_C49i9kUs_es();
342520
342541
  init_xml_js_CqGKpaft_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/mcp",
3
- "version": "0.10.0-next.3",
3
+ "version": "0.10.0-next.4",
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.37.0",
24
- "@superdoc/document-api": "0.0.1"
23
+ "@superdoc/document-api": "0.0.1",
24
+ "superdoc": "1.37.0"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"