@superdoc-dev/cli 0.8.0-next.39 → 0.8.0-next.40
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 +38 -30
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -207213,7 +207213,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
207213
207213
|
init_remark_gfm_BhnWr3yf_es();
|
|
207214
207214
|
});
|
|
207215
207215
|
|
|
207216
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
207216
|
+
// ../../packages/superdoc/dist/chunks/src-BDVIM2Bl.es.js
|
|
207217
207217
|
function deleteProps(obj, propOrProps) {
|
|
207218
207218
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
207219
207219
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -298442,7 +298442,7 @@ menclose::after {
|
|
|
298442
298442
|
return;
|
|
298443
298443
|
console.log(...args$1);
|
|
298444
298444
|
}, 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;
|
|
298445
|
-
var
|
|
298445
|
+
var init_src_BDVIM2Bl_es = __esm(() => {
|
|
298446
298446
|
init_rolldown_runtime_Bg48TavK_es();
|
|
298447
298447
|
init_SuperConverter_DklB_kc9_es();
|
|
298448
298448
|
init_jszip_C49i9kUs_es();
|
|
@@ -334585,19 +334585,19 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334585
334585
|
return true;
|
|
334586
334586
|
return false;
|
|
334587
334587
|
}
|
|
334588
|
-
async navigateTo(target) {
|
|
334588
|
+
async navigateTo(target, options = {}) {
|
|
334589
334589
|
if (!target)
|
|
334590
334590
|
return false;
|
|
334591
334591
|
try {
|
|
334592
334592
|
if (target.kind === "block")
|
|
334593
|
-
return await this.#navigateToBlock(target);
|
|
334593
|
+
return await this.#navigateToBlock(target, options);
|
|
334594
334594
|
if (target.kind === "entity") {
|
|
334595
334595
|
if (target.entityType === "bookmark")
|
|
334596
334596
|
return await this.#navigateToBookmark(target);
|
|
334597
334597
|
if (target.entityType === "comment")
|
|
334598
|
-
return await this.#navigateToComment(target.entityId);
|
|
334598
|
+
return await this.#navigateToComment(target.entityId, options);
|
|
334599
334599
|
if (target.entityType === "trackedChange")
|
|
334600
|
-
return await this.#navigateToTrackedChange(target.entityId, resolveStoryKeyFromAddress(target.story), target.pageIndex);
|
|
334600
|
+
return await this.#navigateToTrackedChange(target.entityId, resolveStoryKeyFromAddress(target.story), target.pageIndex, options);
|
|
334601
334601
|
}
|
|
334602
334602
|
return false;
|
|
334603
334603
|
} catch (error3) {
|
|
@@ -334609,7 +334609,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334609
334609
|
return false;
|
|
334610
334610
|
}
|
|
334611
334611
|
}
|
|
334612
|
-
async#navigateToBlock(target) {
|
|
334612
|
+
async#navigateToBlock(target, options = {}) {
|
|
334613
334613
|
const editor = this.#editor;
|
|
334614
334614
|
if (!editor)
|
|
334615
334615
|
return false;
|
|
@@ -334629,9 +334629,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334629
334629
|
}
|
|
334630
334630
|
if (!candidate)
|
|
334631
334631
|
return false;
|
|
334632
|
-
return this.#scrollToBlockCandidate(editor, candidate);
|
|
334632
|
+
return this.#scrollToBlockCandidate(editor, candidate, options);
|
|
334633
334633
|
}
|
|
334634
|
-
async#scrollToBlockCandidate(editor, candidate) {
|
|
334634
|
+
async#scrollToBlockCandidate(editor, candidate, options = {}) {
|
|
334635
334635
|
const blockNode = editor.state.doc.nodeAt(candidate.pos);
|
|
334636
334636
|
let contentPos = candidate.pos + 1;
|
|
334637
334637
|
if (blockNode)
|
|
@@ -334642,8 +334642,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334642
334642
|
contentPos = candidate.pos + 1 + offset$1 + (child.isText ? 0 : 1);
|
|
334643
334643
|
});
|
|
334644
334644
|
if (!await this.scrollToPositionAsync(contentPos, {
|
|
334645
|
-
behavior: "auto",
|
|
334646
|
-
block: "center"
|
|
334645
|
+
behavior: options.behavior ?? "auto",
|
|
334646
|
+
block: options.block ?? "center"
|
|
334647
334647
|
}))
|
|
334648
334648
|
return false;
|
|
334649
334649
|
editor.commands?.setTextSelection?.({
|
|
@@ -334653,7 +334653,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334653
334653
|
editor.view?.focus?.();
|
|
334654
334654
|
return true;
|
|
334655
334655
|
}
|
|
334656
|
-
async#navigateToComment(entityId) {
|
|
334656
|
+
async#navigateToComment(entityId, options = {}) {
|
|
334657
334657
|
const editor = this.#editor;
|
|
334658
334658
|
if (!editor)
|
|
334659
334659
|
return false;
|
|
@@ -334666,8 +334666,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334666
334666
|
}))
|
|
334667
334667
|
return false;
|
|
334668
334668
|
await this.scrollToPositionAsync(editor.state.selection.from, {
|
|
334669
|
-
behavior: "auto",
|
|
334670
|
-
block: "center"
|
|
334669
|
+
behavior: options.behavior ?? "auto",
|
|
334670
|
+
block: options.block ?? "center"
|
|
334671
334671
|
});
|
|
334672
334672
|
return true;
|
|
334673
334673
|
}
|
|
@@ -334693,10 +334693,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334693
334693
|
return this.#navigateToActiveStoryBookmark(target.name, activatedStoryKey);
|
|
334694
334694
|
return false;
|
|
334695
334695
|
}
|
|
334696
|
-
async#navigateToTrackedChange(entityId, storyKey, preferredPageIndex) {
|
|
334696
|
+
async#navigateToTrackedChange(entityId, storyKey, preferredPageIndex, options = {}) {
|
|
334697
334697
|
const editor = this.#editor;
|
|
334698
334698
|
if (!editor)
|
|
334699
334699
|
return false;
|
|
334700
|
+
const behavior = options.behavior ?? "auto";
|
|
334701
|
+
const block = options.block ?? "center";
|
|
334700
334702
|
if (storyKey && storyKey !== "body") {
|
|
334701
334703
|
if (this.#navigateToActiveStoryTrackedChange(entityId, storyKey))
|
|
334702
334704
|
return true;
|
|
@@ -334704,31 +334706,37 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334704
334706
|
if (this.#navigateToActiveStoryTrackedChange(entityId, storyKey))
|
|
334705
334707
|
return true;
|
|
334706
334708
|
}
|
|
334707
|
-
return this.#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex
|
|
334709
|
+
return this.#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex, {
|
|
334710
|
+
behavior,
|
|
334711
|
+
block
|
|
334712
|
+
});
|
|
334708
334713
|
}
|
|
334709
334714
|
const setCursorById = editor.commands?.setCursorById;
|
|
334710
334715
|
if (typeof setCursorById === "function" && setCursorById(entityId, { preferredActiveThreadId: entityId })) {
|
|
334711
334716
|
await this.scrollToPositionAsync(editor.state.selection.from, {
|
|
334712
|
-
behavior
|
|
334713
|
-
block
|
|
334717
|
+
behavior,
|
|
334718
|
+
block
|
|
334714
334719
|
});
|
|
334715
334720
|
return true;
|
|
334716
334721
|
}
|
|
334717
334722
|
const resolved = resolveTrackedChange(editor, entityId);
|
|
334718
334723
|
if (!resolved)
|
|
334719
|
-
return this.#scrollToRenderedTrackedChange(entityId, undefined, preferredPageIndex
|
|
334724
|
+
return this.#scrollToRenderedTrackedChange(entityId, undefined, preferredPageIndex, {
|
|
334725
|
+
behavior,
|
|
334726
|
+
block
|
|
334727
|
+
});
|
|
334720
334728
|
if (typeof setCursorById === "function" && resolved.rawId !== entityId) {
|
|
334721
334729
|
if (setCursorById(resolved.rawId, { preferredActiveThreadId: resolved.rawId })) {
|
|
334722
334730
|
await this.scrollToPositionAsync(editor.state.selection.from, {
|
|
334723
|
-
behavior
|
|
334724
|
-
block
|
|
334731
|
+
behavior,
|
|
334732
|
+
block
|
|
334725
334733
|
});
|
|
334726
334734
|
return true;
|
|
334727
334735
|
}
|
|
334728
334736
|
}
|
|
334729
334737
|
if (!await this.scrollToPositionAsync(resolved.from, {
|
|
334730
|
-
behavior
|
|
334731
|
-
block
|
|
334738
|
+
behavior,
|
|
334739
|
+
block
|
|
334732
334740
|
}))
|
|
334733
334741
|
return false;
|
|
334734
334742
|
editor.commands?.setTextSelection?.({
|
|
@@ -334962,14 +334970,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334962
334970
|
return candidates[0] ?? null;
|
|
334963
334971
|
return candidates.find((candidate) => this.#resolveRenderedPageIndexForElement(candidate) === preferredPageIndex) ?? candidates[0] ?? null;
|
|
334964
334972
|
}
|
|
334965
|
-
async#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex) {
|
|
334973
|
+
async#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex, options = {}) {
|
|
334966
334974
|
const candidate = this.#findRenderedTrackedChangeElement(entityId, storyKey, preferredPageIndex);
|
|
334967
334975
|
if (!candidate)
|
|
334968
334976
|
return false;
|
|
334969
334977
|
try {
|
|
334970
334978
|
candidate.scrollIntoView({
|
|
334971
|
-
behavior: "auto",
|
|
334972
|
-
block: "center",
|
|
334979
|
+
behavior: options.behavior ?? "auto",
|
|
334980
|
+
block: options.block ?? "center",
|
|
334973
334981
|
inline: "nearest"
|
|
334974
334982
|
});
|
|
334975
334983
|
return true;
|
|
@@ -335832,9 +335840,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
335832
335840
|
];
|
|
335833
335841
|
});
|
|
335834
335842
|
|
|
335835
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
335843
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-CTaglEuR.es.js
|
|
335836
335844
|
var ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
335837
|
-
var
|
|
335845
|
+
var init_create_super_doc_ui_CTaglEuR_es = __esm(() => {
|
|
335838
335846
|
init_SuperConverter_DklB_kc9_es();
|
|
335839
335847
|
init_create_headless_toolbar_lTVVsGdE_es();
|
|
335840
335848
|
ALL_TOOLBAR_COMMAND_IDS = Object.keys(createToolbarRegistry());
|
|
@@ -335854,7 +335862,7 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
335854
335862
|
|
|
335855
335863
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
335856
335864
|
var init_super_editor_es = __esm(() => {
|
|
335857
|
-
|
|
335865
|
+
init_src_BDVIM2Bl_es();
|
|
335858
335866
|
init_SuperConverter_DklB_kc9_es();
|
|
335859
335867
|
init_jszip_C49i9kUs_es();
|
|
335860
335868
|
init_xml_js_CqGKpaft_es();
|
|
@@ -335863,7 +335871,7 @@ var init_super_editor_es = __esm(() => {
|
|
|
335863
335871
|
init_dist_B8HfvhaK_es();
|
|
335864
335872
|
init_unified_Dsuw2be5_es();
|
|
335865
335873
|
init_DocxZipper_CUX64E5K_es();
|
|
335866
|
-
|
|
335874
|
+
init_create_super_doc_ui_CTaglEuR_es();
|
|
335867
335875
|
init_ui_CGB3qmy3_es();
|
|
335868
335876
|
init_eventemitter3_BJrNoN9D_es();
|
|
335869
335877
|
init_errors_C_DoKMoN_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.8.0-next.
|
|
3
|
+
"version": "0.8.0-next.40",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
|
-
"@superdoc/
|
|
28
|
+
"@superdoc/super-editor": "0.0.1",
|
|
29
29
|
"superdoc": "1.29.1",
|
|
30
|
-
"@superdoc/
|
|
30
|
+
"@superdoc/pm-adapter": "0.0.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.8.0-next.
|
|
38
|
-
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.
|
|
39
|
-
"@superdoc-dev/cli-linux-x64": "0.8.0-next.
|
|
40
|
-
"@superdoc-dev/cli-windows-x64": "0.8.0-next.
|
|
41
|
-
"@superdoc-dev/cli-linux-arm64": "0.8.0-next.
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.8.0-next.40",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.40",
|
|
39
|
+
"@superdoc-dev/cli-linux-x64": "0.8.0-next.40",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.8.0-next.40",
|
|
41
|
+
"@superdoc-dev/cli-linux-arm64": "0.8.0-next.40"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|