@superdoc-dev/cli 0.5.0-next.32 → 0.5.0-next.33

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 +20 -8
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -172583,7 +172583,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
172583
172583
  init_remark_gfm_z_sDF4ss_es();
172584
172584
  });
172585
172585
 
172586
- // ../../packages/superdoc/dist/chunks/src-Cj-jgZJT.es.js
172586
+ // ../../packages/superdoc/dist/chunks/src-g1sb-ClT.es.js
172587
172587
  function deleteProps(obj, propOrProps) {
172588
172588
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
172589
172589
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -183616,11 +183616,13 @@ function getAdjacentLineClientTarget(editor, coords, direction) {
183616
183616
  return null;
183617
183617
  const pmStart = Number(adjacentLine.dataset?.pmStart);
183618
183618
  const pmEnd = Number(adjacentLine.dataset?.pmEnd);
183619
+ const isRtl = adjacentLine.closest?.('[dir="rtl"]') != null;
183619
183620
  return {
183620
183621
  clientY,
183621
183622
  pageIndex: Number.isFinite(pageIndex) ? pageIndex : undefined,
183622
183623
  pmStart: Number.isFinite(pmStart) ? pmStart : undefined,
183623
- pmEnd: Number.isFinite(pmEnd) ? pmEnd : undefined
183624
+ pmEnd: Number.isFinite(pmEnd) ? pmEnd : undefined,
183625
+ isRtl
183624
183626
  };
183625
183627
  }
183626
183628
  function getHitFromLayoutCoords(editor, goalX, clientY, coords, pageIndex) {
@@ -183670,7 +183672,7 @@ function findAdjacentLineElement(currentLine, direction, caretX) {
183670
183672
  return null;
183671
183673
  return findEdgeLineForPage(getPageLineElements(nextPage), direction, caretX);
183672
183674
  }
183673
- function resolvePositionAtGoalX(editor, pmStart, pmEnd, goalX) {
183675
+ function resolvePositionAtGoalX(editor, pmStart, pmEnd, goalX, isRtl = false) {
183674
183676
  const presentationEditor = editor.presentationEditor;
183675
183677
  let bestPos = pmStart;
183676
183678
  let bestDist = Infinity;
@@ -183689,9 +183691,15 @@ function resolvePositionAtGoalX(editor, pmStart, pmEnd, goalX) {
183689
183691
  bestPos = mid;
183690
183692
  }
183691
183693
  if (rect.x < goalX)
183692
- lo = mid + 1;
183694
+ if (isRtl)
183695
+ hi = mid - 1;
183696
+ else
183697
+ lo = mid + 1;
183693
183698
  else if (rect.x > goalX)
183694
- hi = mid - 1;
183699
+ if (isRtl)
183700
+ lo = mid + 1;
183701
+ else
183702
+ hi = mid - 1;
183695
183703
  else
183696
183704
  break;
183697
183705
  }
@@ -232609,6 +232617,10 @@ var Node$13 = class Node$14 {
232609
232617
  this.dom.classList.remove("sd-editor-dropcap");
232610
232618
  if (paragraphProperties.styleId)
232611
232619
  this.dom.setAttribute("styleid", paragraphProperties.styleId);
232620
+ if (paragraphProperties.rightToLeft)
232621
+ this.dom.setAttribute("dir", "rtl");
232622
+ else
232623
+ this.dom.removeAttribute("dir");
232612
232624
  }
232613
232625
  #updateDOMStyles(oldParagraphProperties = null) {
232614
232626
  this.dom.style.cssText = "";
@@ -255273,7 +255285,7 @@ var Node$13 = class Node$14 {
255273
255285
  return;
255274
255286
  console.log(...args$1);
255275
255287
  }, 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;
255276
- var init_src_Cj_jgZJT_es = __esm(() => {
255288
+ var init_src_g1sb_ClT_es = __esm(() => {
255277
255289
  init_rolldown_runtime_B2q5OVn9_es();
255278
255290
  init_SuperConverter_B9oNf3OB_es();
255279
255291
  init_jszip_ChlR43oI_es();
@@ -277450,7 +277462,7 @@ function print() { __p += __j.call(arguments, '') }
277450
277462
  const TOLERANCE = 5;
277451
277463
  const hitPos = hit?.pos;
277452
277464
  if (!hit || !Number.isFinite(hitPos) || hitPos < adjacent.pmStart - TOLERANCE || hitPos > adjacent.pmEnd + TOLERANCE)
277453
- hit = resolvePositionAtGoalX(editor, adjacent.pmStart, adjacent.pmEnd, goalX);
277465
+ hit = resolvePositionAtGoalX(editor, adjacent.pmStart, adjacent.pmEnd, goalX, adjacent.isRtl);
277454
277466
  }
277455
277467
  if (!hit || !Number.isFinite(hit.pos))
277456
277468
  return false;
@@ -289760,7 +289772,7 @@ var init_zipper_YmNpPIyc_es = __esm(() => {
289760
289772
 
289761
289773
  // ../../packages/superdoc/dist/super-editor.es.js
289762
289774
  var init_super_editor_es = __esm(() => {
289763
- init_src_Cj_jgZJT_es();
289775
+ init_src_g1sb_ClT_es();
289764
289776
  init_SuperConverter_B9oNf3OB_es();
289765
289777
  init_jszip_ChlR43oI_es();
289766
289778
  init_xml_js_40FWvL78_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.5.0-next.32",
3
+ "version": "0.5.0-next.33",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -26,19 +26,19 @@
26
26
  "typescript": "^5.9.2",
27
27
  "@superdoc/document-api": "0.0.1",
28
28
  "@superdoc/pm-adapter": "0.0.0",
29
- "superdoc": "1.23.0",
30
- "@superdoc/super-editor": "0.0.1"
29
+ "@superdoc/super-editor": "0.0.1",
30
+ "superdoc": "1.23.0"
31
31
  },
32
32
  "module": "src/index.ts",
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@superdoc-dev/cli-darwin-arm64": "0.5.0-next.32",
38
- "@superdoc-dev/cli-linux-x64": "0.5.0-next.32",
39
- "@superdoc-dev/cli-linux-arm64": "0.5.0-next.32",
40
- "@superdoc-dev/cli-windows-x64": "0.5.0-next.32",
41
- "@superdoc-dev/cli-darwin-x64": "0.5.0-next.32"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.5.0-next.33",
38
+ "@superdoc-dev/cli-linux-x64": "0.5.0-next.33",
39
+ "@superdoc-dev/cli-darwin-x64": "0.5.0-next.33",
40
+ "@superdoc-dev/cli-windows-x64": "0.5.0-next.33",
41
+ "@superdoc-dev/cli-linux-arm64": "0.5.0-next.33"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",