@superdoc-dev/mcp 0.3.0-next.76 → 0.3.0-next.77

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 +70 -68
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -199842,7 +199842,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
199842
199842
  init_remark_gfm_BhnWr3yf_es();
199843
199843
  });
199844
199844
 
199845
- // ../../packages/superdoc/dist/chunks/src-BdpJXQ5F.es.js
199845
+ // ../../packages/superdoc/dist/chunks/src-DLNvZ7Yw.es.js
199846
199846
  function deleteProps(obj, propOrProps) {
199847
199847
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
199848
199848
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -257079,7 +257079,9 @@ function toFlowBlocks(pmDoc, options) {
257079
257079
  };
257080
257080
  const bodySectionProps = doc$12.attrs?.bodySectPr ?? doc$12.attrs?.sectPr;
257081
257081
  const sectionRanges = options?.emitSectionBreaks ? analyzeSectionRanges(doc$12, bodySectionProps) : [];
257082
- converterContext.sectionDirection = converterContext.sectionDirection ?? resolveSectionDirectionFromSectPr(sectionRanges[0]?.sectPr ?? bodySectionProps);
257082
+ const firstSectPr = sectionRanges[0]?.sectPr ?? bodySectionProps;
257083
+ converterContext.sectionDirection = converterContext.sectionDirection ?? resolveSectionDirectionFromSectPr(firstSectPr);
257084
+ converterContext.sectionDirectionContext = resolveSectionDirection(firstSectPr);
257083
257085
  publishSectionMetadata(sectionRanges, options);
257084
257086
  if (sectionRanges.length > 0 && sectionRanges[0]) {
257085
257087
  const sectionBreak = createSectionBreakBlock(sectionRanges[0], nextBlockId, { isFirstSection: true });
@@ -285872,7 +285874,69 @@ menclose::after {
285872
285874
  this.#onRebuild();
285873
285875
  });
285874
285876
  }
285875
- }, Y_SORT_THRESHOLD_PX = 2, Y_SAME_LINE_THRESHOLD_PX = 3, HORIZONTAL_OVERLAP_THRESHOLD = 0.8, log = (...args$1) => {}, CLASS, TWIPS_PER_INCH2 = 1440, PX_PER_PT2, VALID_TRACKED_MODES, DEFAULT_HYPERLINK_CONFIG, ATOMIC_INLINE_TYPES, TOKEN_INLINE_TYPES, isValidTrackedMode = (value) => {
285877
+ }, Y_SORT_THRESHOLD_PX = 2, Y_SAME_LINE_THRESHOLD_PX = 3, HORIZONTAL_OVERLAP_THRESHOLD = 0.8, log = (...args$1) => {}, CLASS, DEFAULT_PAGE_DIRECTION = "ltr", DEFAULT_WRITING_MODE = "horizontal-tb", isToggleOn = (val) => {
285878
+ if (val === undefined || val === null)
285879
+ return true;
285880
+ if (val === "0" || val === 0 || val === false)
285881
+ return false;
285882
+ if (val === "false" || val === "off")
285883
+ return false;
285884
+ return true;
285885
+ }, writingModeFromTextDirection$1 = (val) => {
285886
+ if (typeof val !== "string")
285887
+ return;
285888
+ switch (val) {
285889
+ case "lrTb":
285890
+ case "lrTbV":
285891
+ case "tb":
285892
+ case "tbV":
285893
+ return "horizontal-tb";
285894
+ case "tbRl":
285895
+ case "tbRlV":
285896
+ case "rl":
285897
+ case "rlV":
285898
+ return "vertical-rl";
285899
+ case "btLr":
285900
+ case "lr":
285901
+ case "lrV":
285902
+ case "tbLrV":
285903
+ return "vertical-lr";
285904
+ default:
285905
+ return;
285906
+ }
285907
+ }, resolveSectionDirection = (sectPr) => {
285908
+ let pageDirection = DEFAULT_PAGE_DIRECTION;
285909
+ let writingMode = DEFAULT_WRITING_MODE;
285910
+ let rtlGutter = false;
285911
+ if (sectPr && typeof sectPr === "object") {
285912
+ const elements = sectPr.elements;
285913
+ if (Array.isArray(elements))
285914
+ for (const el of elements) {
285915
+ if (!el?.name)
285916
+ continue;
285917
+ const val = el.attributes?.["w:val"] ?? el.attributes?.val;
285918
+ if (el.name === "w:bidi" && isToggleOn(val)) {
285919
+ pageDirection = "rtl";
285920
+ continue;
285921
+ }
285922
+ if (el.name === "w:textDirection") {
285923
+ const mode = writingModeFromTextDirection$1(val);
285924
+ if (mode)
285925
+ writingMode = mode;
285926
+ continue;
285927
+ }
285928
+ if (el.name === "w:rtlGutter" && isToggleOn(val)) {
285929
+ rtlGutter = true;
285930
+ continue;
285931
+ }
285932
+ }
285933
+ }
285934
+ return {
285935
+ pageDirection,
285936
+ writingMode,
285937
+ rtlGutter
285938
+ };
285939
+ }, TWIPS_PER_INCH2 = 1440, PX_PER_PT2, VALID_TRACKED_MODES, DEFAULT_HYPERLINK_CONFIG, ATOMIC_INLINE_TYPES, TOKEN_INLINE_TYPES, isValidTrackedMode = (value) => {
285876
285940
  return typeof value === "string" && VALID_TRACKED_MODES.includes(value);
285877
285941
  }, isTextRun$4 = (run2) => {
285878
285942
  return "text" in run2 && run2.kind !== "tab";
@@ -286477,68 +286541,6 @@ menclose::after {
286477
286541
  mutated = true;
286478
286542
  }
286479
286543
  return mutated ? mirrored : indent2;
286480
- }, DEFAULT_PAGE_DIRECTION = "ltr", DEFAULT_WRITING_MODE = "horizontal-tb", isToggleOn = (val) => {
286481
- if (val === undefined || val === null)
286482
- return true;
286483
- if (val === "0" || val === 0 || val === false)
286484
- return false;
286485
- if (val === "false" || val === "off")
286486
- return false;
286487
- return true;
286488
- }, writingModeFromTextDirection$1 = (val) => {
286489
- if (typeof val !== "string")
286490
- return;
286491
- switch (val) {
286492
- case "lrTb":
286493
- case "lrTbV":
286494
- case "tb":
286495
- case "tbV":
286496
- return "horizontal-tb";
286497
- case "tbRl":
286498
- case "tbRlV":
286499
- case "rl":
286500
- case "rlV":
286501
- return "vertical-rl";
286502
- case "btLr":
286503
- case "lr":
286504
- case "lrV":
286505
- case "tbLrV":
286506
- return "vertical-lr";
286507
- default:
286508
- return;
286509
- }
286510
- }, resolveSectionDirection = (sectPr) => {
286511
- let pageDirection = DEFAULT_PAGE_DIRECTION;
286512
- let writingMode = DEFAULT_WRITING_MODE;
286513
- let rtlGutter = false;
286514
- if (sectPr && typeof sectPr === "object") {
286515
- const elements = sectPr.elements;
286516
- if (Array.isArray(elements))
286517
- for (const el of elements) {
286518
- if (!el?.name)
286519
- continue;
286520
- const val = el.attributes?.["w:val"] ?? el.attributes?.val;
286521
- if (el.name === "w:bidi" && isToggleOn(val)) {
286522
- pageDirection = "rtl";
286523
- continue;
286524
- }
286525
- if (el.name === "w:textDirection") {
286526
- const mode = writingModeFromTextDirection$1(val);
286527
- if (mode)
286528
- writingMode = mode;
286529
- continue;
286530
- }
286531
- if (el.name === "w:rtlGutter" && isToggleOn(val)) {
286532
- rtlGutter = true;
286533
- continue;
286534
- }
286535
- }
286536
- }
286537
- return {
286538
- pageDirection,
286539
- writingMode,
286540
- rtlGutter
286541
- };
286542
286544
  }, writingModeFromTextDirection = (val) => {
286543
286545
  switch (val) {
286544
286546
  case "lrTb":
@@ -286709,7 +286711,7 @@ menclose::after {
286709
286711
  resolvedParagraphProperties = paragraphProperties;
286710
286712
  else
286711
286713
  resolvedParagraphProperties = resolveParagraphProperties(converterContext, paragraphProperties, converterContext.tableInfo);
286712
- const sectionContext = resolveSectionDirection(undefined);
286714
+ const sectionContext = converterContext?.sectionDirectionContext ?? resolveSectionDirection(undefined);
286713
286715
  const directionContext = resolveParagraphDirection(resolvedParagraphProperties, sectionContext);
286714
286716
  const normalizedDirection = directionContext.inlineDirection;
286715
286717
  const isRtl = normalizedDirection === "rtl";
@@ -293432,7 +293434,7 @@ menclose::after {
293432
293434
  return;
293433
293435
  console.log(...args$1);
293434
293436
  }, 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;
293435
- var init_src_BdpJXQ5F_es = __esm(() => {
293437
+ var init_src_DLNvZ7Yw_es = __esm(() => {
293436
293438
  init_rolldown_runtime_Bg48TavK_es();
293437
293439
  init_SuperConverter_BInxZk0I_es();
293438
293440
  init_jszip_C49i9kUs_es();
@@ -331493,7 +331495,7 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
331493
331495
 
331494
331496
  // ../../packages/superdoc/dist/super-editor.es.js
331495
331497
  var init_super_editor_es = __esm(() => {
331496
- init_src_BdpJXQ5F_es();
331498
+ init_src_DLNvZ7Yw_es();
331497
331499
  init_SuperConverter_BInxZk0I_es();
331498
331500
  init_jszip_C49i9kUs_es();
331499
331501
  init_xml_js_CqGKpaft_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/mcp",
3
- "version": "0.3.0-next.76",
3
+ "version": "0.3.0-next.77",
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/document-api": "0.0.1",
23
- "@superdoc/super-editor": "0.0.1",
24
- "superdoc": "1.32.0"
23
+ "superdoc": "1.32.0",
24
+ "@superdoc/super-editor": "0.0.1"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"