@superdoc-dev/cli 0.2.0-next.29 → 0.2.0-next.30
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 +25 -18
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -101203,9 +101203,9 @@ var init_remark_gfm_CQ3Jg4PR_es = __esm(() => {
|
|
|
101203
101203
|
init_remark_gfm_z_sDF4ss_es();
|
|
101204
101204
|
});
|
|
101205
101205
|
|
|
101206
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
101207
|
-
var
|
|
101208
|
-
__export(
|
|
101206
|
+
// ../../packages/superdoc/dist/chunks/src-B-vDSO7p.es.js
|
|
101207
|
+
var exports_src_B_vDSO7p_es = {};
|
|
101208
|
+
__export(exports_src_B_vDSO7p_es, {
|
|
101209
101209
|
zt: () => defineMark,
|
|
101210
101210
|
z: () => cM,
|
|
101211
101211
|
yt: () => removeAwarenessStates,
|
|
@@ -133287,7 +133287,8 @@ function clickToPosition(layout, blocks2, measures, containerPoint, domContainer
|
|
|
133287
133287
|
if (fragmentHit) {
|
|
133288
133288
|
const { fragment, block, measure, pageIndex, pageY } = fragmentHit;
|
|
133289
133289
|
if (fragment.kind === "para" && measure.kind === "paragraph" && block.kind === "paragraph") {
|
|
133290
|
-
const
|
|
133290
|
+
const lines = fragment.lines ?? measure.lines.slice(fragment.fromLine, fragment.toLine);
|
|
133291
|
+
const lineIndex = findLineIndexAtY(lines, pageY, 0, lines.length);
|
|
133291
133292
|
if (lineIndex == null) {
|
|
133292
133293
|
logClickStage("warn", "no-line", {
|
|
133293
133294
|
blockId: fragment.blockId,
|
|
@@ -133296,7 +133297,7 @@ function clickToPosition(layout, blocks2, measures, containerPoint, domContainer
|
|
|
133296
133297
|
});
|
|
133297
133298
|
return null;
|
|
133298
133299
|
}
|
|
133299
|
-
const line =
|
|
133300
|
+
const line = lines[lineIndex];
|
|
133300
133301
|
const isRTL = isRtlBlock(block);
|
|
133301
133302
|
const indentLeft = typeof block.attrs?.indent?.left === "number" ? block.attrs.indent.left : 0;
|
|
133302
133303
|
const indentRight = typeof block.attrs?.indent?.right === "number" ? block.attrs.indent.right : 0;
|
|
@@ -133373,7 +133374,7 @@ function clickToPosition(layout, blocks2, measures, containerPoint, domContainer
|
|
|
133373
133374
|
const tableHit = hitTestTableFragment(pageHit, blocks2, measures, pageRelativePoint);
|
|
133374
133375
|
if (tableHit) {
|
|
133375
133376
|
const { cellBlock, cellMeasure, localX, localY, pageIndex } = tableHit;
|
|
133376
|
-
const lineIndex = findLineIndexAtY(cellMeasure, localY, 0, cellMeasure.lines.length);
|
|
133377
|
+
const lineIndex = findLineIndexAtY(cellMeasure.lines, localY, 0, cellMeasure.lines.length);
|
|
133377
133378
|
if (lineIndex != null) {
|
|
133378
133379
|
const line = cellMeasure.lines[lineIndex];
|
|
133379
133380
|
const isRTL = isRtlBlock(cellBlock);
|
|
@@ -162129,15 +162130,15 @@ var Node$13 = class Node$14 {
|
|
|
162129
162130
|
const relative = fragmentX;
|
|
162130
162131
|
const raw = Math.floor(relative / Math.max(span, 1));
|
|
162131
162132
|
return Math.max(0, Math.min(columns.count - 1, raw));
|
|
162132
|
-
}, findLineIndexAtY = (
|
|
162133
|
-
if (
|
|
162133
|
+
}, findLineIndexAtY = (lines, offsetY, fromLine, toLine) => {
|
|
162134
|
+
if (!lines || lines.length === 0)
|
|
162134
162135
|
return null;
|
|
162135
|
-
const lineCount =
|
|
162136
|
+
const lineCount = lines.length;
|
|
162136
162137
|
if (fromLine < 0 || toLine > lineCount || fromLine >= toLine)
|
|
162137
162138
|
return null;
|
|
162138
162139
|
let cursor = 0;
|
|
162139
162140
|
for (let i$1 = fromLine;i$1 < toLine; i$1 += 1) {
|
|
162140
|
-
const line =
|
|
162141
|
+
const line = lines[i$1];
|
|
162141
162142
|
if (!line)
|
|
162142
162143
|
return null;
|
|
162143
162144
|
const next2 = cursor + line.lineHeight;
|
|
@@ -171418,7 +171419,7 @@ var Node$13 = class Node$14 {
|
|
|
171418
171419
|
trackedChanges: context.trackedChanges ?? []
|
|
171419
171420
|
});
|
|
171420
171421
|
}, _hoisted_1$6, _hoisted_2$1, _hoisted_3, _hoisted_4, ContextMenu_default, _hoisted_1$5, BasicUpload_default, _hoisted_1$4, MIN_WIDTH = 200, PPI = 96, alignment = "flex-end", Ruler_default, GenericPopover_default, _hoisted_1$3, RESIZE_HANDLE_WIDTH_PX = 9, RESIZE_HANDLE_OFFSET_PX = 4, DRAG_OVERLAY_EXTENSION_PX = 1000, MIN_DRAG_OVERLAY_WIDTH_PX = 2000, THROTTLE_INTERVAL_MS = 16, MIN_RESIZE_DELTA_PX = 1, TableResizeOverlay_default, _hoisted_1$2, OVERLAY_EXPANSION_PX = 2000, RESIZE_HANDLE_SIZE_PX = 12, MOUSE_MOVE_THROTTLE_MS = 16, DIMENSION_CHANGE_THRESHOLD_PX = 1, Z_INDEX_OVERLAY = 10, Z_INDEX_HANDLE = 15, Z_INDEX_GUIDELINE = 20, ImageResizeOverlay_default, LINK_CLICK_DEBOUNCE_MS = 300, CURSOR_UPDATE_TIMEOUT_MS = 10, LinkClickHandler_default, _hoisted_1$1, _hoisted_2, DOCX2 = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", TABLE_RESIZE_HOVER_THRESHOLD = 8, TABLE_RESIZE_THROTTLE_MS = 16, SuperEditor_default, _hoisted_1, SuperInput_default, SlashMenu, Extensions;
|
|
171421
|
-
var
|
|
171422
|
+
var init_src_B_vDSO7p_es = __esm(() => {
|
|
171422
171423
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
171423
171424
|
init_SuperConverter_DhpmwuUN_es();
|
|
171424
171425
|
init_jszip_ChlR43oI_es();
|
|
@@ -180082,6 +180083,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
180082
180083
|
#editorLifecycleState = "initialized";
|
|
180083
180084
|
#documentApi = null;
|
|
180084
180085
|
#sourcePath = null;
|
|
180086
|
+
get currentTotalPages() {
|
|
180087
|
+
if (this.presentationEditor) {
|
|
180088
|
+
const pages = this.presentationEditor.getPages();
|
|
180089
|
+
return pages.length > 0 ? pages.length : undefined;
|
|
180090
|
+
}
|
|
180091
|
+
}
|
|
180085
180092
|
#telemetry = null;
|
|
180086
180093
|
#documentOpenTracked = false;
|
|
180087
180094
|
constructor(options) {
|
|
@@ -202153,8 +202160,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
202153
202160
|
return isObjectLike_default(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
202154
202161
|
};
|
|
202155
202162
|
stubFalse_default = stubFalse;
|
|
202156
|
-
freeExports$2 = typeof
|
|
202157
|
-
freeModule$2 = freeExports$2 && typeof
|
|
202163
|
+
freeExports$2 = typeof exports_src_B_vDSO7p_es == "object" && exports_src_B_vDSO7p_es && !exports_src_B_vDSO7p_es.nodeType && exports_src_B_vDSO7p_es;
|
|
202164
|
+
freeModule$2 = freeExports$2 && typeof module_src_B_vDSO7p_es == "object" && module_src_B_vDSO7p_es && !module_src_B_vDSO7p_es.nodeType && module_src_B_vDSO7p_es;
|
|
202158
202165
|
Buffer$1 = freeModule$2 && freeModule$2.exports === freeExports$2 ? _root_default.Buffer : undefined;
|
|
202159
202166
|
isBuffer_default = (Buffer$1 ? Buffer$1.isBuffer : undefined) || stubFalse_default;
|
|
202160
202167
|
typedArrayTags = {};
|
|
@@ -202162,8 +202169,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
202162
202169
|
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$2] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = false;
|
|
202163
202170
|
_baseIsTypedArray_default = baseIsTypedArray;
|
|
202164
202171
|
_baseUnary_default = baseUnary;
|
|
202165
|
-
freeExports$1 = typeof
|
|
202166
|
-
freeModule$1 = freeExports$1 && typeof
|
|
202172
|
+
freeExports$1 = typeof exports_src_B_vDSO7p_es == "object" && exports_src_B_vDSO7p_es && !exports_src_B_vDSO7p_es.nodeType && exports_src_B_vDSO7p_es;
|
|
202173
|
+
freeModule$1 = freeExports$1 && typeof module_src_B_vDSO7p_es == "object" && module_src_B_vDSO7p_es && !module_src_B_vDSO7p_es.nodeType && module_src_B_vDSO7p_es;
|
|
202167
202174
|
freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && _freeGlobal_default.process;
|
|
202168
202175
|
_nodeUtil_default = function() {
|
|
202169
202176
|
try {
|
|
@@ -202268,8 +202275,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
202268
202275
|
Stack.prototype.has = _stackHas_default;
|
|
202269
202276
|
Stack.prototype.set = _stackSet_default;
|
|
202270
202277
|
_Stack_default = Stack;
|
|
202271
|
-
freeExports = typeof
|
|
202272
|
-
freeModule = freeExports && typeof
|
|
202278
|
+
freeExports = typeof exports_src_B_vDSO7p_es == "object" && exports_src_B_vDSO7p_es && !exports_src_B_vDSO7p_es.nodeType && exports_src_B_vDSO7p_es;
|
|
202279
|
+
freeModule = freeExports && typeof module_src_B_vDSO7p_es == "object" && module_src_B_vDSO7p_es && !module_src_B_vDSO7p_es.nodeType && module_src_B_vDSO7p_es;
|
|
202273
202280
|
Buffer4 = freeModule && freeModule.exports === freeExports ? _root_default.Buffer : undefined;
|
|
202274
202281
|
allocUnsafe = Buffer4 ? Buffer4.allocUnsafe : undefined;
|
|
202275
202282
|
_cloneBuffer_default = cloneBuffer;
|
|
@@ -209921,7 +209928,7 @@ var init_zipper_Cnk_HjM2_es = __esm(() => {
|
|
|
209921
209928
|
|
|
209922
209929
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
209923
209930
|
var init_super_editor_es = __esm(() => {
|
|
209924
|
-
|
|
209931
|
+
init_src_B_vDSO7p_es();
|
|
209925
209932
|
init_SuperConverter_DhpmwuUN_es();
|
|
209926
209933
|
init_jszip_ChlR43oI_es();
|
|
209927
209934
|
init_xml_js_DLE8mr0n_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.2.0-next.
|
|
3
|
+
"version": "0.2.0-next.30",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -20,20 +20,20 @@
|
|
|
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
23
|
"@superdoc/pm-adapter": "0.0.0",
|
|
25
|
-
"superdoc": "1.16.0"
|
|
24
|
+
"superdoc": "1.16.0",
|
|
25
|
+
"@superdoc/super-editor": "0.0.1"
|
|
26
26
|
},
|
|
27
27
|
"module": "src/index.ts",
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"optionalDependencies": {
|
|
32
|
-
"@superdoc-dev/cli-darwin-arm64": "0.2.0-next.
|
|
33
|
-
"@superdoc-dev/cli-darwin-x64": "0.2.0-next.
|
|
34
|
-
"@superdoc-dev/cli-linux-x64": "0.2.0-next.
|
|
35
|
-
"@superdoc-dev/cli-
|
|
36
|
-
"@superdoc-dev/cli-
|
|
32
|
+
"@superdoc-dev/cli-darwin-arm64": "0.2.0-next.30",
|
|
33
|
+
"@superdoc-dev/cli-darwin-x64": "0.2.0-next.30",
|
|
34
|
+
"@superdoc-dev/cli-linux-x64": "0.2.0-next.30",
|
|
35
|
+
"@superdoc-dev/cli-linux-arm64": "0.2.0-next.30",
|
|
36
|
+
"@superdoc-dev/cli-windows-x64": "0.2.0-next.30"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"dev": "bun run src/index.ts",
|