@superdoc-dev/cli 0.5.0-next.31 → 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.
- package/dist/index.js +24 -11
- package/package.json +7 -7
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-
|
|
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
|
-
|
|
183694
|
+
if (isRtl)
|
|
183695
|
+
hi = mid - 1;
|
|
183696
|
+
else
|
|
183697
|
+
lo = mid + 1;
|
|
183693
183698
|
else if (rect.x > goalX)
|
|
183694
|
-
|
|
183699
|
+
if (isRtl)
|
|
183700
|
+
lo = mid + 1;
|
|
183701
|
+
else
|
|
183702
|
+
hi = mid - 1;
|
|
183695
183703
|
else
|
|
183696
183704
|
break;
|
|
183697
183705
|
}
|
|
@@ -221059,9 +221067,10 @@ function computeDomCaretPageLocal(options, pos) {
|
|
|
221059
221067
|
const textNode = targetEl.firstChild;
|
|
221060
221068
|
if (!textNode || textNode.nodeType !== Node.TEXT_NODE) {
|
|
221061
221069
|
const elRect = targetEl.getBoundingClientRect();
|
|
221070
|
+
const atEnd = pos >= entry.pmEnd;
|
|
221062
221071
|
return {
|
|
221063
221072
|
pageIndex: Number(page.dataset.pageIndex ?? "0"),
|
|
221064
|
-
x: (elRect.left - pageRect.left) / zoom,
|
|
221073
|
+
x: ((atEnd ? elRect.right : elRect.left) - pageRect.left) / zoom,
|
|
221065
221074
|
y: (elRect.top - pageRect.top) / zoom
|
|
221066
221075
|
};
|
|
221067
221076
|
}
|
|
@@ -232608,6 +232617,10 @@ var Node$13 = class Node$14 {
|
|
|
232608
232617
|
this.dom.classList.remove("sd-editor-dropcap");
|
|
232609
232618
|
if (paragraphProperties.styleId)
|
|
232610
232619
|
this.dom.setAttribute("styleid", paragraphProperties.styleId);
|
|
232620
|
+
if (paragraphProperties.rightToLeft)
|
|
232621
|
+
this.dom.setAttribute("dir", "rtl");
|
|
232622
|
+
else
|
|
232623
|
+
this.dom.removeAttribute("dir");
|
|
232611
232624
|
}
|
|
232612
232625
|
#updateDOMStyles(oldParagraphProperties = null) {
|
|
232613
232626
|
this.dom.style.cssText = "";
|
|
@@ -255272,7 +255285,7 @@ var Node$13 = class Node$14 {
|
|
|
255272
255285
|
return;
|
|
255273
255286
|
console.log(...args$1);
|
|
255274
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;
|
|
255275
|
-
var
|
|
255288
|
+
var init_src_g1sb_ClT_es = __esm(() => {
|
|
255276
255289
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
255277
255290
|
init_SuperConverter_B9oNf3OB_es();
|
|
255278
255291
|
init_jszip_ChlR43oI_es();
|
|
@@ -276189,8 +276202,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
276189
276202
|
wrapper.className = "sd-math";
|
|
276190
276203
|
wrapper.style.display = "inline-block";
|
|
276191
276204
|
wrapper.style.verticalAlign = "middle";
|
|
276192
|
-
wrapper.style.
|
|
276193
|
-
wrapper.style.
|
|
276205
|
+
wrapper.style.minWidth = `${run2.width}px`;
|
|
276206
|
+
wrapper.style.minHeight = `${run2.height}px`;
|
|
276194
276207
|
wrapper.dataset.layoutEpoch = String(this.layoutEpoch ?? 0);
|
|
276195
276208
|
const mathEl = convertOmmlToMathml(run2.ommlJson, this.doc);
|
|
276196
276209
|
if (mathEl)
|
|
@@ -277449,7 +277462,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
277449
277462
|
const TOLERANCE = 5;
|
|
277450
277463
|
const hitPos = hit?.pos;
|
|
277451
277464
|
if (!hit || !Number.isFinite(hitPos) || hitPos < adjacent.pmStart - TOLERANCE || hitPos > adjacent.pmEnd + TOLERANCE)
|
|
277452
|
-
hit = resolvePositionAtGoalX(editor, adjacent.pmStart, adjacent.pmEnd, goalX);
|
|
277465
|
+
hit = resolvePositionAtGoalX(editor, adjacent.pmStart, adjacent.pmEnd, goalX, adjacent.isRtl);
|
|
277453
277466
|
}
|
|
277454
277467
|
if (!hit || !Number.isFinite(hit.pos))
|
|
277455
277468
|
return false;
|
|
@@ -289759,7 +289772,7 @@ var init_zipper_YmNpPIyc_es = __esm(() => {
|
|
|
289759
289772
|
|
|
289760
289773
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
289761
289774
|
var init_super_editor_es = __esm(() => {
|
|
289762
|
-
|
|
289775
|
+
init_src_g1sb_ClT_es();
|
|
289763
289776
|
init_SuperConverter_B9oNf3OB_es();
|
|
289764
289777
|
init_jszip_ChlR43oI_es();
|
|
289765
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.
|
|
3
|
+
"version": "0.5.0-next.33",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"@types/node": "22.19.2",
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
|
+
"@superdoc/document-api": "0.0.1",
|
|
27
28
|
"@superdoc/pm-adapter": "0.0.0",
|
|
28
29
|
"@superdoc/super-editor": "0.0.1",
|
|
29
|
-
"@superdoc/document-api": "0.0.1",
|
|
30
30
|
"superdoc": "1.23.0"
|
|
31
31
|
},
|
|
32
32
|
"module": "src/index.ts",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@superdoc-dev/cli-darwin-arm64": "0.5.0-next.
|
|
38
|
-
"@superdoc-dev/cli-
|
|
39
|
-
"@superdoc-dev/cli-
|
|
40
|
-
"@superdoc-dev/cli-windows-x64": "0.5.0-next.
|
|
41
|
-
"@superdoc-dev/cli-linux-
|
|
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",
|