@superdoc-dev/mcp 0.8.0-next.12 → 0.8.0-next.13

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 +38 -13
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -210032,7 +210032,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
210032
210032
  init_remark_gfm_BhnWr3yf_es();
210033
210033
  });
210034
210034
 
210035
- // ../../packages/superdoc/dist/chunks/src-UhA9uMm0.es.js
210035
+ // ../../packages/superdoc/dist/chunks/src-D659h75w.es.js
210036
210036
  function deleteProps(obj, propOrProps) {
210037
210037
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
210038
210038
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -211958,27 +211958,52 @@ function normalizeYjsFragmentEventsForSchema(events, fallbackFragment) {
211958
211958
  function stripSchemaAtomChildren(parent) {
211959
211959
  if (!isTraversableYjsXml(parent))
211960
211960
  return false;
211961
- if (parent instanceof YXmlElement && SCHEMA_ATOM_NODE_NAMES.has(parent.nodeName)) {
211962
- if (parent.length === 0)
211963
- return false;
211964
- parent.delete(0, parent.length);
211965
- return true;
211966
- }
211961
+ if (parent instanceof YXmlElement && SCHEMA_ATOM_NODE_NAMES.has(parent.nodeName))
211962
+ return normalizeSchemaAtomElement(parent);
211967
211963
  let changed = false;
211968
211964
  for (const child of parent.toArray()) {
211969
211965
  if (!(child instanceof YXmlElement))
211970
211966
  continue;
211971
211967
  if (SCHEMA_ATOM_NODE_NAMES.has(child.nodeName)) {
211972
- if (child.length > 0) {
211973
- child.delete(0, child.length);
211974
- changed = true;
211975
- }
211968
+ changed = normalizeSchemaAtomElement(child) || changed;
211976
211969
  continue;
211977
211970
  }
211978
211971
  changed = stripSchemaAtomChildren(child) || changed;
211979
211972
  }
211980
211973
  return changed;
211981
211974
  }
211975
+ function normalizeSchemaAtomElement(element3) {
211976
+ let changed = false;
211977
+ if (isEmptyResolvedText(element3.getAttribute("resolvedText"))) {
211978
+ const visibleText = extractVisibleXmlText(element3);
211979
+ if (visibleText.length > 0) {
211980
+ element3.setAttribute("resolvedText", visibleText);
211981
+ changed = true;
211982
+ }
211983
+ }
211984
+ if (element3.length > 0) {
211985
+ element3.delete(0, element3.length);
211986
+ changed = true;
211987
+ }
211988
+ return changed;
211989
+ }
211990
+ function isEmptyResolvedText(value) {
211991
+ return typeof value !== "string" || value.length === 0;
211992
+ }
211993
+ function extractVisibleXmlText(parent) {
211994
+ let text5 = "";
211995
+ for (const child of parent.toArray())
211996
+ if (child instanceof YXmlText)
211997
+ text5 += extractVisibleTextFromXmlText(child);
211998
+ else if (child instanceof YXmlElement)
211999
+ text5 += extractVisibleXmlText(child);
212000
+ return text5;
212001
+ }
212002
+ function extractVisibleTextFromXmlText(textNode) {
212003
+ return textNode.toDelta().reduce((visibleText, op) => {
212004
+ return typeof op.insert === "string" ? visibleText + op.insert : visibleText;
212005
+ }, "");
212006
+ }
211982
212007
  function findNormalizableEventTarget(target) {
211983
212008
  let current = target;
211984
212009
  while (current) {
@@ -302709,7 +302734,7 @@ menclose::after {
302709
302734
  return;
302710
302735
  console.log(...args$1);
302711
302736
  }, 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;
302712
- var init_src_UhA9uMm0_es = __esm(() => {
302737
+ var init_src_D659h75w_es = __esm(() => {
302713
302738
  init_rolldown_runtime_Bg48TavK_es();
302714
302739
  init_SuperConverter_qtmGhHOJ_es();
302715
302740
  init_jszip_C49i9kUs_es();
@@ -340788,7 +340813,7 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
340788
340813
 
340789
340814
  // ../../packages/superdoc/dist/super-editor.es.js
340790
340815
  var init_super_editor_es = __esm(() => {
340791
- init_src_UhA9uMm0_es();
340816
+ init_src_D659h75w_es();
340792
340817
  init_SuperConverter_qtmGhHOJ_es();
340793
340818
  init_jszip_C49i9kUs_es();
340794
340819
  init_xml_js_CqGKpaft_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/mcp",
3
- "version": "0.8.0-next.12",
3
+ "version": "0.8.0-next.13",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20"
@@ -19,8 +19,8 @@
19
19
  "@types/bun": "^1.3.8",
20
20
  "@types/node": "22.19.2",
21
21
  "typescript": "^5.9.2",
22
- "@superdoc/document-api": "0.0.1",
23
22
  "@superdoc/super-editor": "0.0.1",
23
+ "@superdoc/document-api": "0.0.1",
24
24
  "superdoc": "1.35.0"
25
25
  },
26
26
  "publishConfig": {