logisheets-core 1.3.0 → 1.5.0
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/ops/index.d.ts +7 -0
- package/dist/ops/index.js +14 -0
- package/package.json +2 -2
package/dist/ops/index.d.ts
CHANGED
|
@@ -76,6 +76,13 @@ export declare class WorkbookOps {
|
|
|
76
76
|
insertRowsInBlock(sheetIdx: number, blockId: number, start: number, cnt?: number): Promise<ActionEffect>;
|
|
77
77
|
/** Delete a block. */
|
|
78
78
|
removeBlock(sheetIdx: number, blockId: number): Promise<ActionEffect>;
|
|
79
|
+
/**
|
|
80
|
+
* Move a block so its master (top-left) cell lands at
|
|
81
|
+
* (`newMasterRow`, `newMasterCol`). The engine relocates the whole block
|
|
82
|
+
* region; the caller is responsible for making sure the destination is
|
|
83
|
+
* clear (see the drag-to-move overlay, which cancels on collision).
|
|
84
|
+
*/
|
|
85
|
+
moveBlock(sheetIdx: number, blockId: number, newMasterRow: number, newMasterCol: number): Promise<ActionEffect>;
|
|
79
86
|
/** Apply font styling (bold/italic/underline/strike/color/size). */
|
|
80
87
|
setFont(sheetIdx: number, data: SelectedData, update: FontStyle): Promise<void>;
|
|
81
88
|
/** Apply horizontal/vertical alignment. */
|
package/dist/ops/index.js
CHANGED
|
@@ -126,6 +126,20 @@ export class WorkbookOps {
|
|
|
126
126
|
removeBlock(sheetIdx, blockId) {
|
|
127
127
|
return this.apply([{ type: 'removeBlock', value: { sheetIdx, id: blockId } }], true);
|
|
128
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Move a block so its master (top-left) cell lands at
|
|
131
|
+
* (`newMasterRow`, `newMasterCol`). The engine relocates the whole block
|
|
132
|
+
* region; the caller is responsible for making sure the destination is
|
|
133
|
+
* clear (see the drag-to-move overlay, which cancels on collision).
|
|
134
|
+
*/
|
|
135
|
+
moveBlock(sheetIdx, blockId, newMasterRow, newMasterCol) {
|
|
136
|
+
return this.apply([
|
|
137
|
+
{
|
|
138
|
+
type: 'moveBlock',
|
|
139
|
+
value: { sheetIdx, id: blockId, newMasterRow, newMasterCol },
|
|
140
|
+
},
|
|
141
|
+
], true);
|
|
142
|
+
}
|
|
129
143
|
// ---- formatting -----------------------------------------------------
|
|
130
144
|
//
|
|
131
145
|
// Each method turns the current sheet + selection into style-update
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "logisheets-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "UI-free LogiSheets logic — runs in the browser or on Node. Depends on logisheets-web only for types; the engine Client is injected by the host.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"author": "Jeremy He",
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"logisheets-web": "^1.
|
|
47
|
+
"logisheets-web": "^1.5.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"logisheets-web": "workspace:*",
|