@superdoc-dev/mcp 0.3.0-next.71 → 0.3.0-next.72

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 +101 -36
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -199725,7 +199725,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
199725
199725
  init_remark_gfm_BhnWr3yf_es();
199726
199726
  });
199727
199727
 
199728
- // ../../packages/superdoc/dist/chunks/src-AOxYjda5.es.js
199728
+ // ../../packages/superdoc/dist/chunks/src-DOdRGHiA.es.js
199729
199729
  function deleteProps(obj, propOrProps) {
199730
199730
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
199731
199731
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -286110,6 +286110,99 @@ menclose::after {
286110
286110
  mutated = true;
286111
286111
  }
286112
286112
  return mutated ? mirrored : indent2;
286113
+ }, DEFAULT_PAGE_DIRECTION = "ltr", DEFAULT_WRITING_MODE = "horizontal-tb", isToggleOn = (val) => {
286114
+ if (val === undefined || val === null)
286115
+ return true;
286116
+ if (val === "0" || val === 0 || val === false)
286117
+ return false;
286118
+ if (val === "false" || val === "off")
286119
+ return false;
286120
+ return true;
286121
+ }, writingModeFromTextDirection$1 = (val) => {
286122
+ if (typeof val !== "string")
286123
+ return;
286124
+ switch (val) {
286125
+ case "lrTb":
286126
+ case "lrTbV":
286127
+ case "tb":
286128
+ case "tbV":
286129
+ return "horizontal-tb";
286130
+ case "tbRl":
286131
+ case "tbRlV":
286132
+ case "rl":
286133
+ case "rlV":
286134
+ return "vertical-rl";
286135
+ case "btLr":
286136
+ case "lr":
286137
+ case "lrV":
286138
+ case "tbLrV":
286139
+ return "vertical-lr";
286140
+ default:
286141
+ return;
286142
+ }
286143
+ }, resolveSectionDirection = (sectPr) => {
286144
+ let pageDirection = DEFAULT_PAGE_DIRECTION;
286145
+ let writingMode = DEFAULT_WRITING_MODE;
286146
+ let rtlGutter = false;
286147
+ if (sectPr && typeof sectPr === "object") {
286148
+ const elements = sectPr.elements;
286149
+ if (Array.isArray(elements))
286150
+ for (const el of elements) {
286151
+ if (!el?.name)
286152
+ continue;
286153
+ const val = el.attributes?.["w:val"] ?? el.attributes?.val;
286154
+ if (el.name === "w:bidi" && isToggleOn(val)) {
286155
+ pageDirection = "rtl";
286156
+ continue;
286157
+ }
286158
+ if (el.name === "w:textDirection") {
286159
+ const mode = writingModeFromTextDirection$1(val);
286160
+ if (mode)
286161
+ writingMode = mode;
286162
+ continue;
286163
+ }
286164
+ if (el.name === "w:rtlGutter" && isToggleOn(val)) {
286165
+ rtlGutter = true;
286166
+ continue;
286167
+ }
286168
+ }
286169
+ }
286170
+ return {
286171
+ pageDirection,
286172
+ writingMode,
286173
+ rtlGutter
286174
+ };
286175
+ }, writingModeFromTextDirection = (val) => {
286176
+ switch (val) {
286177
+ case "lrTb":
286178
+ case "lrTbV":
286179
+ case "tb":
286180
+ case "tbV":
286181
+ return "horizontal-tb";
286182
+ case "tbRl":
286183
+ case "tbRlV":
286184
+ case "rl":
286185
+ case "rlV":
286186
+ return "vertical-rl";
286187
+ case "btLr":
286188
+ case "lr":
286189
+ case "lrV":
286190
+ case "tbLrV":
286191
+ return "vertical-lr";
286192
+ default:
286193
+ return;
286194
+ }
286195
+ }, resolveParagraphDirection = (paragraphProperties, parentSection, parentCell) => {
286196
+ let inlineDirection;
286197
+ if (paragraphProperties?.rightToLeft === true)
286198
+ inlineDirection = "rtl";
286199
+ else if (paragraphProperties?.rightToLeft === false)
286200
+ inlineDirection = "ltr";
286201
+ const writingMode = writingModeFromTextDirection(paragraphProperties?.textDirection) ?? parentCell?.writingMode ?? parentSection.writingMode;
286202
+ return {
286203
+ inlineDirection,
286204
+ writingMode
286205
+ };
286113
286206
  }, DEFAULT_DECIMAL_SEPARATOR$1 = ".", DEFAULT_TAB_INTERVAL_TWIPS$1 = 720, normalizeColor$1 = (value) => {
286114
286207
  if (typeof value !== "string")
286115
286208
  return;
@@ -286127,37 +286220,6 @@ menclose::after {
286127
286220
  if (Object.prototype.hasOwnProperty.call(obj, key2))
286128
286221
  clone2[key2] = deepClone2(obj[key2]);
286129
286222
  return clone2;
286130
- }, inferDirectionFromRuns = (para) => {
286131
- const content3 = Array.isArray(para.content) ? para.content : [];
286132
- let hasExplicitRtl = false;
286133
- let hasExplicitLtr = false;
286134
- for (const node2 of content3) {
286135
- if (node2?.type !== "run")
286136
- continue;
286137
- const runProps = node2.attrs?.runProperties ?? {};
286138
- const runDirection = runProps.rightToLeft ?? runProps.rtl;
286139
- if (runDirection === true) {
286140
- hasExplicitRtl = true;
286141
- continue;
286142
- }
286143
- if (runDirection === false)
286144
- hasExplicitLtr = true;
286145
- }
286146
- if (!hasExplicitRtl && !hasExplicitLtr)
286147
- return;
286148
- if (hasExplicitLtr)
286149
- return;
286150
- return "rtl";
286151
- }, resolveEffectiveParagraphDirection = (para, resolvedParagraphProperties, _sectionDirection, docDefaultsDirection) => {
286152
- if (resolvedParagraphProperties.rightToLeft === true)
286153
- return "rtl";
286154
- if (resolvedParagraphProperties.rightToLeft === false)
286155
- return "ltr";
286156
- const inferredFromRuns = inferDirectionFromRuns(para);
286157
- if (inferredFromRuns)
286158
- return inferredFromRuns;
286159
- if (docDefaultsDirection)
286160
- return docDefaultsDirection;
286161
286223
  }, normalizeIndentTwipsToPx = (indent2) => {
286162
286224
  if (!indent2)
286163
286225
  return;
@@ -286280,7 +286342,9 @@ menclose::after {
286280
286342
  resolvedParagraphProperties = paragraphProperties;
286281
286343
  else
286282
286344
  resolvedParagraphProperties = resolveParagraphProperties(converterContext, paragraphProperties, converterContext.tableInfo);
286283
- const normalizedDirection = resolveEffectiveParagraphDirection(para, resolvedParagraphProperties, converterContext?.sectionDirection, converterContext?.translatedLinkedStyles?.docDefaults?.paragraphProperties?.rightToLeft === true ? "rtl" : converterContext?.translatedLinkedStyles?.docDefaults?.paragraphProperties?.rightToLeft === false ? "ltr" : undefined);
286345
+ const sectionContext = resolveSectionDirection(undefined);
286346
+ const directionContext = resolveParagraphDirection(resolvedParagraphProperties, sectionContext);
286347
+ const normalizedDirection = directionContext.inlineDirection;
286284
286348
  const isRtl = normalizedDirection === "rtl";
286285
286349
  const normalizedSpacing = normalizeParagraphSpacing(resolvedParagraphProperties.spacing, Boolean(resolvedParagraphProperties.numberingProperties));
286286
286350
  const normalizedIndentBase = normalizeIndentTwipsToPx(resolveLogicalIndentToPhysical(resolvedParagraphProperties.indent, normalizedDirection));
@@ -286314,7 +286378,8 @@ menclose::after {
286314
286378
  keepLines: resolvedParagraphProperties.keepLines,
286315
286379
  floatAlignment,
286316
286380
  pageBreakBefore: resolvedParagraphProperties.pageBreakBefore,
286317
- ...normalizedDirection ? { direction: normalizedDirection } : {}
286381
+ ...normalizedDirection ? { direction: normalizedDirection } : {},
286382
+ directionContext
286318
286383
  };
286319
286384
  if (normalizedNumberingProperties && normalizedListRendering) {
286320
286385
  const markerRunAttrs = computeRunAttrs(resolveRunProperties(converterContext, resolvedParagraphProperties.runProperties, resolvedParagraphProperties, converterContext.tableInfo, true, Boolean(paragraphProperties.numberingProperties)), converterContext);
@@ -292968,7 +293033,7 @@ menclose::after {
292968
293033
  return;
292969
293034
  console.log(...args$1);
292970
293035
  }, 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;
292971
- var init_src_AOxYjda5_es = __esm(() => {
293036
+ var init_src_DOdRGHiA_es = __esm(() => {
292972
293037
  init_rolldown_runtime_Bg48TavK_es();
292973
293038
  init_SuperConverter_BecdrRIX_es();
292974
293039
  init_jszip_C49i9kUs_es();
@@ -330862,7 +330927,7 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
330862
330927
 
330863
330928
  // ../../packages/superdoc/dist/super-editor.es.js
330864
330929
  var init_super_editor_es = __esm(() => {
330865
- init_src_AOxYjda5_es();
330930
+ init_src_DOdRGHiA_es();
330866
330931
  init_SuperConverter_BecdrRIX_es();
330867
330932
  init_jszip_C49i9kUs_es();
330868
330933
  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.71",
3
+ "version": "0.3.0-next.72",
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.31.0"
23
+ "superdoc": "1.31.0",
24
+ "@superdoc/super-editor": "0.0.1"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"