@superdoc-dev/cli 0.8.0-next.13 → 0.8.0-next.14
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 +28 -27
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -206439,7 +206439,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
206439
206439
|
init_remark_gfm_BhnWr3yf_es();
|
|
206440
206440
|
});
|
|
206441
206441
|
|
|
206442
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
206442
|
+
// ../../packages/superdoc/dist/chunks/src-BJiA8udr.es.js
|
|
206443
206443
|
function deleteProps(obj, propOrProps) {
|
|
206444
206444
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
206445
206445
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -277517,14 +277517,14 @@ var Node$13 = class Node$14 {
|
|
|
277517
277517
|
() => commands$1.joinForward(),
|
|
277518
277518
|
() => commands$1.selectNodeForward()
|
|
277519
277519
|
]);
|
|
277520
|
-
}, Keymap,
|
|
277520
|
+
}, Keymap, handleInsertTextBeforeInput = (view, event) => {
|
|
277521
277521
|
const isInsertTextInput = event?.inputType === "insertText";
|
|
277522
277522
|
const hasTextData = typeof event?.data === "string" && event.data.length > 0;
|
|
277523
|
-
const
|
|
277524
|
-
if (!isInsertTextInput || !hasTextData ||
|
|
277523
|
+
const isComposing = event?.isComposing === true;
|
|
277524
|
+
if (!isInsertTextInput || !hasTextData || isComposing)
|
|
277525
277525
|
return false;
|
|
277526
277526
|
const selection = view.state.selection;
|
|
277527
|
-
if (
|
|
277527
|
+
if (selection.empty)
|
|
277528
277528
|
return false;
|
|
277529
277529
|
const tr = view.state.tr.insertText(event.data, selection.from, selection.to);
|
|
277530
277530
|
tr.setMeta("inputType", "insertText");
|
|
@@ -293625,7 +293625,7 @@ menclose::after {
|
|
|
293625
293625
|
return;
|
|
293626
293626
|
console.log(...args$1);
|
|
293627
293627
|
}, 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;
|
|
293628
|
-
var
|
|
293628
|
+
var init_src_BJiA8udr_es = __esm(() => {
|
|
293629
293629
|
init_rolldown_runtime_Bg48TavK_es();
|
|
293630
293630
|
init_SuperConverter_aq0iFjuQ_es();
|
|
293631
293631
|
init_jszip_C49i9kUs_es();
|
|
@@ -315475,7 +315475,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
315475
315475
|
}
|
|
315476
315476
|
if (shouldForceEndStaleComposition(view, event))
|
|
315477
315477
|
__endComposition(view);
|
|
315478
|
-
if (
|
|
315478
|
+
if (handleInsertTextBeforeInput(view, event))
|
|
315479
315479
|
return true;
|
|
315480
315480
|
return false;
|
|
315481
315481
|
},
|
|
@@ -317866,7 +317866,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
317866
317866
|
if (!editable && this.view.dom)
|
|
317867
317867
|
this.view.dom.blur();
|
|
317868
317868
|
}
|
|
317869
|
-
if (emitUpdate)
|
|
317869
|
+
if (emitUpdate && this.state)
|
|
317870
317870
|
this.emit("update", {
|
|
317871
317871
|
editor: this,
|
|
317872
317872
|
transaction: this.state.tr
|
|
@@ -325658,22 +325658,34 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
325658
325658
|
const normalized = this.#normalizeClientPoint(clientX, clientY);
|
|
325659
325659
|
if (!normalized)
|
|
325660
325660
|
return null;
|
|
325661
|
+
const noteContext = this.#buildActiveNoteLayoutContext();
|
|
325662
|
+
if (noteContext) {
|
|
325663
|
+
const rawHit$1 = this.#resolveNoteDomHit(noteContext, clientX, clientY) ?? clickToPositionGeometry(this.#layoutState.layout, noteContext.blocks, noteContext.measures, normalized, { geometryHelper: this.#pageGeometryHelper ?? undefined });
|
|
325664
|
+
if (!rawHit$1)
|
|
325665
|
+
return null;
|
|
325666
|
+
const doc$2 = this.getActiveEditor().state?.doc;
|
|
325667
|
+
if (!doc$2)
|
|
325668
|
+
return rawHit$1;
|
|
325669
|
+
return {
|
|
325670
|
+
...rawHit$1,
|
|
325671
|
+
pos: Math.max(0, Math.min(rawHit$1.pos, doc$2.content.size))
|
|
325672
|
+
};
|
|
325673
|
+
}
|
|
325661
325674
|
if ((this.#headerFooterSession?.session?.mode ?? "body") !== "body") {
|
|
325662
325675
|
const context = this.#getHeaderFooterContext();
|
|
325663
325676
|
if (!context)
|
|
325664
325677
|
return null;
|
|
325665
|
-
const
|
|
325678
|
+
const pageGap = this.#layoutState.layout?.pageGap ?? this.#getEffectivePageGap();
|
|
325666
325679
|
const bodyPageHeight = this.#getBodyPageHeight();
|
|
325667
|
-
if (Math.max(0, Math.floor(normalized.y / bodyPageHeight)) !== context.region.pageIndex)
|
|
325680
|
+
if ((normalized.pageIndex ?? Math.max(0, Math.floor(normalized.y / (bodyPageHeight + pageGap)))) !== context.region.pageIndex)
|
|
325668
325681
|
return null;
|
|
325669
325682
|
const localX = normalized.x - context.region.localX;
|
|
325670
|
-
const localY = normalized.y - context.region.pageIndex * bodyPageHeight - context.region.localY;
|
|
325683
|
+
const localY = (normalized.pageLocalY ?? normalized.y - context.region.pageIndex * (bodyPageHeight + pageGap)) - context.region.localY;
|
|
325671
325684
|
if (localX < 0 || localY < 0 || localX > context.region.width || localY > context.region.height)
|
|
325672
325685
|
return null;
|
|
325673
|
-
const headerPageIndex = Math.floor(localY / headerPageHeight);
|
|
325674
325686
|
const headerPoint = {
|
|
325675
325687
|
x: localX,
|
|
325676
|
-
y:
|
|
325688
|
+
y: localY
|
|
325677
325689
|
};
|
|
325678
325690
|
const hit = clickToPositionGeometry(context.layout, context.blocks, context.measures, headerPoint) ?? null;
|
|
325679
325691
|
if (!hit)
|
|
@@ -325686,19 +325698,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
325686
325698
|
pos: Math.max(0, Math.min(hit.pos, doc$2.content.size))
|
|
325687
325699
|
};
|
|
325688
325700
|
}
|
|
325689
|
-
const noteContext = this.#buildActiveNoteLayoutContext();
|
|
325690
|
-
if (noteContext) {
|
|
325691
|
-
const rawHit$1 = this.#resolveNoteDomHit(noteContext, clientX, clientY) ?? clickToPositionGeometry(this.#layoutState.layout, noteContext.blocks, noteContext.measures, normalized, { geometryHelper: this.#pageGeometryHelper ?? undefined });
|
|
325692
|
-
if (!rawHit$1)
|
|
325693
|
-
return null;
|
|
325694
|
-
const doc$2 = this.getActiveEditor().state?.doc;
|
|
325695
|
-
if (!doc$2)
|
|
325696
|
-
return rawHit$1;
|
|
325697
|
-
return {
|
|
325698
|
-
...rawHit$1,
|
|
325699
|
-
pos: Math.max(0, Math.min(rawHit$1.pos, doc$2.content.size))
|
|
325700
|
-
};
|
|
325701
|
-
}
|
|
325702
325701
|
if (!this.#layoutState.layout)
|
|
325703
325702
|
return null;
|
|
325704
325703
|
const rawHit = resolvePointerPositionHit({
|
|
@@ -328326,6 +328325,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328326
328325
|
return Selection.near(doc$12.resolve(clampedPos), bias);
|
|
328327
328326
|
}
|
|
328328
328327
|
#activateRenderedNoteSession(target, options) {
|
|
328328
|
+
if ((this.#headerFooterSession?.session?.mode ?? "body") !== "body")
|
|
328329
|
+
this.#headerFooterSession?.exitMode();
|
|
328329
328330
|
const storySessionManager = this.#ensureStorySessionManager();
|
|
328330
328331
|
if (target.storyType !== "footnote" && target.storyType !== "endnote")
|
|
328331
328332
|
return false;
|
|
@@ -329658,7 +329659,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
|
|
|
329658
329659
|
|
|
329659
329660
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
329660
329661
|
var init_super_editor_es = __esm(() => {
|
|
329661
|
-
|
|
329662
|
+
init_src_BJiA8udr_es();
|
|
329662
329663
|
init_SuperConverter_aq0iFjuQ_es();
|
|
329663
329664
|
init_jszip_C49i9kUs_es();
|
|
329664
329665
|
init_xml_js_CqGKpaft_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.14",
|
|
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": "
|
|
30
|
-
"
|
|
29
|
+
"@superdoc/super-editor": "0.0.1",
|
|
30
|
+
"superdoc": "1.28.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-
|
|
40
|
-
"@superdoc-dev/cli-windows-x64": "0.8.0-next.
|
|
41
|
-
"@superdoc-dev/cli-linux-
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.8.0-next.14",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.14",
|
|
39
|
+
"@superdoc-dev/cli-linux-x64": "0.8.0-next.14",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.8.0-next.14",
|
|
41
|
+
"@superdoc-dev/cli-linux-arm64": "0.8.0-next.14"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|