@superdoc-dev/cli 0.17.0-next.25 → 0.17.0-next.26
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 +79 -53
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -68327,7 +68327,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
68327
68327
|
emptyOptions2 = {};
|
|
68328
68328
|
});
|
|
68329
68329
|
|
|
68330
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
68330
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-WQVqM0th.es.js
|
|
68331
68331
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
68332
68332
|
const fieldValue = extension$1.config[field];
|
|
68333
68333
|
if (typeof fieldValue === "function")
|
|
@@ -88534,6 +88534,22 @@ function fixTable(state, table, tablePos, tr) {
|
|
|
88534
88534
|
}
|
|
88535
88535
|
return tr.setMeta(fixTablesKey, { fixTables: true });
|
|
88536
88536
|
}
|
|
88537
|
+
function findTable($pos) {
|
|
88538
|
+
return findParentNode$1((node3) => node3.type.spec.tableRole === "table", $pos);
|
|
88539
|
+
}
|
|
88540
|
+
function findParentNode$1(predicate, $pos) {
|
|
88541
|
+
for (let depth = $pos.depth;depth >= 0; depth -= 1) {
|
|
88542
|
+
const node3 = $pos.node(depth);
|
|
88543
|
+
if (predicate(node3))
|
|
88544
|
+
return {
|
|
88545
|
+
node: node3,
|
|
88546
|
+
pos: depth === 0 ? 0 : $pos.before(depth),
|
|
88547
|
+
start: $pos.start(depth),
|
|
88548
|
+
depth
|
|
88549
|
+
};
|
|
88550
|
+
}
|
|
88551
|
+
return null;
|
|
88552
|
+
}
|
|
88537
88553
|
function selectedRect(state) {
|
|
88538
88554
|
const sel = state.selection;
|
|
88539
88555
|
const $pos = selectionCell(state);
|
|
@@ -134913,7 +134929,7 @@ var isRegExp = (value) => {
|
|
|
134913
134929
|
state.kern = kernNode.attributes["w:val"];
|
|
134914
134930
|
}
|
|
134915
134931
|
}, SuperConverter;
|
|
134916
|
-
var
|
|
134932
|
+
var init_SuperConverter_WQVqM0th_es = __esm(() => {
|
|
134917
134933
|
init_rolldown_runtime_Bg48TavK_es();
|
|
134918
134934
|
init_jszip_C49i9kUs_es();
|
|
134919
134935
|
init_xml_js_CqGKpaft_es();
|
|
@@ -175657,7 +175673,7 @@ var init_SuperConverter_CCgGAnXY_es = __esm(() => {
|
|
|
175657
175673
|
};
|
|
175658
175674
|
});
|
|
175659
175675
|
|
|
175660
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
175676
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-B8OXKxcw.es.js
|
|
175661
175677
|
function parseSizeUnit(val = "0") {
|
|
175662
175678
|
const length3 = val.toString() || "0";
|
|
175663
175679
|
const value = Number.parseFloat(length3);
|
|
@@ -186052,8 +186068,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
186052
186068
|
}
|
|
186053
186069
|
};
|
|
186054
186070
|
};
|
|
186055
|
-
var
|
|
186056
|
-
|
|
186071
|
+
var init_create_headless_toolbar_B8OXKxcw_es = __esm(() => {
|
|
186072
|
+
init_SuperConverter_WQVqM0th_es();
|
|
186057
186073
|
init_uuid_B2wVPhPi_es();
|
|
186058
186074
|
init_constants_D9qj59G2_es();
|
|
186059
186075
|
init_dist_B8HfvhaK_es();
|
|
@@ -235222,7 +235238,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
235222
235238
|
init_remark_gfm_BhnWr3yf_es();
|
|
235223
235239
|
});
|
|
235224
235240
|
|
|
235225
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
235241
|
+
// ../../packages/superdoc/dist/chunks/src-Bvhjxf8i.es.js
|
|
235226
235242
|
function deleteProps(obj, propOrProps) {
|
|
235227
235243
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
235228
235244
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -286373,11 +286389,12 @@ function percentile(sortedValues, p$12) {
|
|
|
286373
286389
|
return sortedValues[lower] * (1 - weight) + sortedValues[upper] * weight;
|
|
286374
286390
|
}
|
|
286375
286391
|
function pushEmptyLineSelectionBand(rects, opts) {
|
|
286392
|
+
const lineOffset = sumLineHeights(opts.measure, opts.startLineIndex, opts.lineIndex);
|
|
286376
286393
|
rects.push({
|
|
286377
286394
|
x: opts.x,
|
|
286378
|
-
y: opts.
|
|
286395
|
+
y: opts.yBase + lineOffset,
|
|
286379
286396
|
width: Math.max(1, opts.width),
|
|
286380
|
-
height: opts.
|
|
286397
|
+
height: opts.lineHeight,
|
|
286381
286398
|
pageIndex: opts.pageIndex
|
|
286382
286399
|
});
|
|
286383
286400
|
}
|
|
@@ -286408,13 +286425,15 @@ function selectionToRects(layout, blocks2, measures, from$1, to, geometryHelper)
|
|
|
286408
286425
|
const sliceFrom = Math.max(range.pmStart, from$1);
|
|
286409
286426
|
const sliceTo = Math.min(range.pmEnd, to);
|
|
286410
286427
|
if (sliceFrom >= sliceTo) {
|
|
286411
|
-
const emptyLineOffset = lineHeightBeforeIndex$1(measure, index2) - lineHeightBeforeIndex$1(measure, fragment2.fromLine);
|
|
286412
286428
|
pushEmptyLineSelectionBand(rects, {
|
|
286413
286429
|
x: fragment2.x,
|
|
286414
|
-
|
|
286430
|
+
yBase: fragment2.y + pageTopY,
|
|
286415
286431
|
width: fragment2.width,
|
|
286416
|
-
|
|
286417
|
-
pageIndex
|
|
286432
|
+
lineHeight: line.lineHeight,
|
|
286433
|
+
pageIndex,
|
|
286434
|
+
measure,
|
|
286435
|
+
lineIndex: index2,
|
|
286436
|
+
startLineIndex: fragment2.fromLine
|
|
286418
286437
|
});
|
|
286419
286438
|
return;
|
|
286420
286439
|
}
|
|
@@ -286596,13 +286615,15 @@ function selectionToRects(layout, blocks2, measures, from$1, to, geometryHelper)
|
|
|
286596
286615
|
const sliceFrom = Math.max(range.pmStart, from$1);
|
|
286597
286616
|
const sliceTo = Math.min(range.pmEnd, to);
|
|
286598
286617
|
if (sliceFrom >= sliceTo) {
|
|
286599
|
-
const emptyLineOffset = lineHeightBeforeIndex$1(info.measure, index2) - lineHeightBeforeIndex$1(info.measure, info.startLine);
|
|
286600
286618
|
pushEmptyLineSelectionBand(rects, {
|
|
286601
286619
|
x: fragment2.x + contentOffsetX + cellX + padding.left,
|
|
286602
|
-
|
|
286620
|
+
yBase: fragment2.y + contentOffsetY + rowOffset + blockTopCursor + effectiveSpacingBeforePx + pageTopY,
|
|
286603
286621
|
width: cellMeasure.width - padding.left - padding.right,
|
|
286604
|
-
|
|
286605
|
-
pageIndex
|
|
286622
|
+
lineHeight: line.lineHeight,
|
|
286623
|
+
pageIndex,
|
|
286624
|
+
measure: info.measure,
|
|
286625
|
+
lineIndex: index2,
|
|
286626
|
+
startLineIndex: info.startLine
|
|
286606
286627
|
});
|
|
286607
286628
|
return;
|
|
286608
286629
|
}
|
|
@@ -286943,15 +286964,7 @@ function selectionCollapsesAcrossTableCells(doc$12, anchor, head) {
|
|
|
286943
286964
|
return false;
|
|
286944
286965
|
const $from = doc$12.resolve(Math.min(anchor, head));
|
|
286945
286966
|
const $to = doc$12.resolve(Math.max(anchor, head));
|
|
286946
|
-
|
|
286947
|
-
for (let depth = pos.depth;depth > 0; depth--) {
|
|
286948
|
-
const role = pos.node(depth).type.spec.tableRole;
|
|
286949
|
-
if (role === "cell" || role === "header_cell")
|
|
286950
|
-
return pos.node(depth);
|
|
286951
|
-
}
|
|
286952
|
-
return null;
|
|
286953
|
-
};
|
|
286954
|
-
return cellAncestor($from) !== cellAncestor($to) && $to.parentOffset === 0;
|
|
286967
|
+
return cellWrapping2($from) !== cellWrapping2($to) && $to.parentOffset === 0;
|
|
286955
286968
|
} catch {
|
|
286956
286969
|
return false;
|
|
286957
286970
|
}
|
|
@@ -288939,6 +288952,19 @@ function getTopLevelTableBlockAtPos(doc$12, blocks2, tablePos) {
|
|
|
288939
288952
|
return null;
|
|
288940
288953
|
return getTableBlocks(blocks2)[tableIndex] ?? null;
|
|
288941
288954
|
}
|
|
288955
|
+
function resolveCellContextAtResolvedPos($pos) {
|
|
288956
|
+
const $cell = cellAround($pos);
|
|
288957
|
+
if (!$cell)
|
|
288958
|
+
return null;
|
|
288959
|
+
const table2 = findTable($cell);
|
|
288960
|
+
if (!table2)
|
|
288961
|
+
return null;
|
|
288962
|
+
return {
|
|
288963
|
+
$cell,
|
|
288964
|
+
cellPos: $cell.pos,
|
|
288965
|
+
tablePos: table2.pos
|
|
288966
|
+
};
|
|
288967
|
+
}
|
|
288942
288968
|
function resolveCellAnchorStateFromCellPos(doc$12, blocks2, cellPos) {
|
|
288943
288969
|
if (!doc$12 || !Number.isFinite(cellPos) || cellPos < 0 || cellPos > doc$12.content.size)
|
|
288944
288970
|
return null;
|
|
@@ -289043,30 +289069,30 @@ function resolveCellContext(doc$12, pos) {
|
|
|
289043
289069
|
} catch {
|
|
289044
289070
|
return null;
|
|
289045
289071
|
}
|
|
289046
|
-
|
|
289047
|
-
|
|
289048
|
-
for (let depth = $pos.depth;depth > 0; depth--) {
|
|
289049
|
-
const role = $pos.node(depth).type.spec.tableRole;
|
|
289050
|
-
if (cellDepth === -1 && (role === "cell" || role === "header_cell"))
|
|
289051
|
-
cellDepth = depth;
|
|
289052
|
-
if (cellDepth !== -1 && role === "table") {
|
|
289053
|
-
tableDepth = depth;
|
|
289054
|
-
break;
|
|
289055
|
-
}
|
|
289056
|
-
}
|
|
289057
|
-
if (cellDepth === -1 || tableDepth === -1)
|
|
289072
|
+
const context = resolveCellContextAtResolvedPos($pos);
|
|
289073
|
+
if (!context)
|
|
289058
289074
|
return null;
|
|
289059
289075
|
return {
|
|
289060
|
-
cellPos:
|
|
289061
|
-
tablePos:
|
|
289076
|
+
cellPos: context.cellPos,
|
|
289077
|
+
tablePos: context.tablePos
|
|
289062
289078
|
};
|
|
289063
289079
|
}
|
|
289064
289080
|
function resolveCrossCellSelection(doc$12, anchorPos, headPos) {
|
|
289065
|
-
|
|
289066
|
-
|
|
289081
|
+
if (!doc$12)
|
|
289082
|
+
return null;
|
|
289083
|
+
let $anchorPos;
|
|
289084
|
+
let $headPos;
|
|
289085
|
+
try {
|
|
289086
|
+
$anchorPos = doc$12.resolve(anchorPos);
|
|
289087
|
+
$headPos = doc$12.resolve(headPos);
|
|
289088
|
+
} catch {
|
|
289089
|
+
return null;
|
|
289090
|
+
}
|
|
289091
|
+
const anchor = resolveCellContextAtResolvedPos($anchorPos);
|
|
289092
|
+
const head = resolveCellContextAtResolvedPos($headPos);
|
|
289067
289093
|
if (!anchor || !head)
|
|
289068
289094
|
return null;
|
|
289069
|
-
if (anchor
|
|
289095
|
+
if (!inSameTable(anchor.$cell, head.$cell))
|
|
289070
289096
|
return null;
|
|
289071
289097
|
if (anchor.cellPos === head.cellPos)
|
|
289072
289098
|
return null;
|
|
@@ -333454,13 +333480,13 @@ menclose::after {
|
|
|
333454
333480
|
return;
|
|
333455
333481
|
console.log(...args$1);
|
|
333456
333482
|
}, 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, TRACKED_MARK_NAMES;
|
|
333457
|
-
var
|
|
333483
|
+
var init_src_Bvhjxf8i_es = __esm(() => {
|
|
333458
333484
|
init_rolldown_runtime_Bg48TavK_es();
|
|
333459
|
-
|
|
333485
|
+
init_SuperConverter_WQVqM0th_es();
|
|
333460
333486
|
init_jszip_C49i9kUs_es();
|
|
333461
333487
|
init_xml_js_CqGKpaft_es();
|
|
333462
333488
|
init_uuid_B2wVPhPi_es();
|
|
333463
|
-
|
|
333489
|
+
init_create_headless_toolbar_B8OXKxcw_es();
|
|
333464
333490
|
init_constants_D9qj59G2_es();
|
|
333465
333491
|
init_dist_B8HfvhaK_es();
|
|
333466
333492
|
init_unified_Dsuw2be5_es();
|
|
@@ -369245,11 +369271,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
369245
369271
|
]);
|
|
369246
369272
|
});
|
|
369247
369273
|
|
|
369248
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
369274
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-CCLA6uFG.es.js
|
|
369249
369275
|
var DEFAULT_TEXT_ALIGN_OPTIONS, DEFAULT_LINE_HEIGHT_OPTIONS, DEFAULT_ZOOM_OPTIONS, DEFAULT_DOCUMENT_MODE_OPTIONS, DEFAULT_FONT_SIZE_OPTIONS, headlessToolbarConstants, MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS, FONT_SIZE_OPTIONS;
|
|
369250
|
-
var
|
|
369251
|
-
|
|
369252
|
-
|
|
369276
|
+
var init_create_super_doc_ui_CCLA6uFG_es = __esm(() => {
|
|
369277
|
+
init_SuperConverter_WQVqM0th_es();
|
|
369278
|
+
init_create_headless_toolbar_B8OXKxcw_es();
|
|
369253
369279
|
DEFAULT_TEXT_ALIGN_OPTIONS = [
|
|
369254
369280
|
{
|
|
369255
369281
|
label: "Left",
|
|
@@ -369540,16 +369566,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
369540
369566
|
|
|
369541
369567
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
369542
369568
|
var init_super_editor_es = __esm(() => {
|
|
369543
|
-
|
|
369544
|
-
|
|
369569
|
+
init_src_Bvhjxf8i_es();
|
|
369570
|
+
init_SuperConverter_WQVqM0th_es();
|
|
369545
369571
|
init_jszip_C49i9kUs_es();
|
|
369546
369572
|
init_xml_js_CqGKpaft_es();
|
|
369547
|
-
|
|
369573
|
+
init_create_headless_toolbar_B8OXKxcw_es();
|
|
369548
369574
|
init_constants_D9qj59G2_es();
|
|
369549
369575
|
init_dist_B8HfvhaK_es();
|
|
369550
369576
|
init_unified_Dsuw2be5_es();
|
|
369551
369577
|
init_DocxZipper_FUsfThjV_es();
|
|
369552
|
-
|
|
369578
|
+
init_create_super_doc_ui_CCLA6uFG_es();
|
|
369553
369579
|
init_ui_C5PAS9hY_es();
|
|
369554
369580
|
init_eventemitter3_BnGqBE_Q_es();
|
|
369555
369581
|
init_errors_CNaD6vcg_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.17.0-next.
|
|
3
|
+
"version": "0.17.0-next.26",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
|
-
"
|
|
29
|
-
"superdoc": "
|
|
28
|
+
"superdoc": "1.39.0",
|
|
29
|
+
"@superdoc/super-editor": "0.0.1"
|
|
30
30
|
},
|
|
31
31
|
"module": "src/index.ts",
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@superdoc-dev/cli-darwin-arm64": "0.17.0-next.
|
|
37
|
-
"@superdoc-dev/cli-darwin-x64": "0.17.0-next.
|
|
38
|
-
"@superdoc-dev/cli-linux-
|
|
39
|
-
"@superdoc-dev/cli-
|
|
40
|
-
"@superdoc-dev/cli-
|
|
36
|
+
"@superdoc-dev/cli-darwin-arm64": "0.17.0-next.26",
|
|
37
|
+
"@superdoc-dev/cli-darwin-x64": "0.17.0-next.26",
|
|
38
|
+
"@superdoc-dev/cli-linux-x64": "0.17.0-next.26",
|
|
39
|
+
"@superdoc-dev/cli-linux-arm64": "0.17.0-next.26",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.17.0-next.26"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"predev": "node scripts/ensure-superdoc-build.js",
|