@knotx/plugins-bounding 0.2.15 → 0.3.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/index.cjs +2 -2
- package/dist/index.d.cts +6 -6
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/package.json +11 -11
package/dist/index.cjs
CHANGED
|
@@ -167,7 +167,7 @@ class Bounding extends (_a = core.BasePlugin, _nodes_dec = [decorators.inject.no
|
|
|
167
167
|
const resizeMove$ = new rxjs.Subject();
|
|
168
168
|
const resizeEnd$ = new rxjs.Subject();
|
|
169
169
|
const startResize = (nodeId, position) => {
|
|
170
|
-
const node = this.getNode(nodeId);
|
|
170
|
+
const node = this.getNode({ id: nodeId });
|
|
171
171
|
if (!(node == null ? void 0 : node.measured))
|
|
172
172
|
return;
|
|
173
173
|
resizeStart$.next({
|
|
@@ -266,7 +266,7 @@ class Bounding extends (_a = core.BasePlugin, _nodes_dec = [decorators.inject.no
|
|
|
266
266
|
};
|
|
267
267
|
}),
|
|
268
268
|
operators.tap((resizeData) => {
|
|
269
|
-
const node = this.getNode(resizeData.nodeId);
|
|
269
|
+
const node = this.getNode({ id: resizeData.nodeId });
|
|
270
270
|
if (node) {
|
|
271
271
|
this.dispatchNodeOperation({
|
|
272
272
|
type: "draftOperation",
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HorizontalAlignment, VerticalAlignment, BasePlugin, Node,
|
|
1
|
+
import { HorizontalAlignment, VerticalAlignment, BasePlugin, Node, Engine } from '@knotx/core';
|
|
2
2
|
|
|
3
3
|
declare module '@knotx/core' {
|
|
4
4
|
interface PluginData {
|
|
@@ -81,11 +81,11 @@ declare class Bounding extends BasePlugin<'bounding', BoundingConfig> {
|
|
|
81
81
|
name: "bounding";
|
|
82
82
|
private config;
|
|
83
83
|
nodes: Node[];
|
|
84
|
-
getNode:
|
|
85
|
-
dispatchNodeOperation:
|
|
86
|
-
startInteraction:
|
|
87
|
-
endInteraction:
|
|
88
|
-
canInteract:
|
|
84
|
+
getNode: Engine['getNode'];
|
|
85
|
+
dispatchNodeOperation: Engine['dispatchNodeOperation'];
|
|
86
|
+
startInteraction: Engine['startInteraction'];
|
|
87
|
+
endInteraction: Engine['endInteraction'];
|
|
88
|
+
canInteract: Engine['canInteract'];
|
|
89
89
|
canvasScale: number;
|
|
90
90
|
private subscription?;
|
|
91
91
|
private resizeHandleClassName;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HorizontalAlignment, VerticalAlignment, BasePlugin, Node,
|
|
1
|
+
import { HorizontalAlignment, VerticalAlignment, BasePlugin, Node, Engine } from '@knotx/core';
|
|
2
2
|
|
|
3
3
|
declare module '@knotx/core' {
|
|
4
4
|
interface PluginData {
|
|
@@ -81,11 +81,11 @@ declare class Bounding extends BasePlugin<'bounding', BoundingConfig> {
|
|
|
81
81
|
name: "bounding";
|
|
82
82
|
private config;
|
|
83
83
|
nodes: Node[];
|
|
84
|
-
getNode:
|
|
85
|
-
dispatchNodeOperation:
|
|
86
|
-
startInteraction:
|
|
87
|
-
endInteraction:
|
|
88
|
-
canInteract:
|
|
84
|
+
getNode: Engine['getNode'];
|
|
85
|
+
dispatchNodeOperation: Engine['dispatchNodeOperation'];
|
|
86
|
+
startInteraction: Engine['startInteraction'];
|
|
87
|
+
endInteraction: Engine['endInteraction'];
|
|
88
|
+
canInteract: Engine['canInteract'];
|
|
89
89
|
canvasScale: number;
|
|
90
90
|
private subscription?;
|
|
91
91
|
private resizeHandleClassName;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HorizontalAlignment, VerticalAlignment, BasePlugin, Node,
|
|
1
|
+
import { HorizontalAlignment, VerticalAlignment, BasePlugin, Node, Engine } from '@knotx/core';
|
|
2
2
|
|
|
3
3
|
declare module '@knotx/core' {
|
|
4
4
|
interface PluginData {
|
|
@@ -81,11 +81,11 @@ declare class Bounding extends BasePlugin<'bounding', BoundingConfig> {
|
|
|
81
81
|
name: "bounding";
|
|
82
82
|
private config;
|
|
83
83
|
nodes: Node[];
|
|
84
|
-
getNode:
|
|
85
|
-
dispatchNodeOperation:
|
|
86
|
-
startInteraction:
|
|
87
|
-
endInteraction:
|
|
88
|
-
canInteract:
|
|
84
|
+
getNode: Engine['getNode'];
|
|
85
|
+
dispatchNodeOperation: Engine['dispatchNodeOperation'];
|
|
86
|
+
startInteraction: Engine['startInteraction'];
|
|
87
|
+
endInteraction: Engine['endInteraction'];
|
|
88
|
+
canInteract: Engine['canInteract'];
|
|
89
89
|
canvasScale: number;
|
|
90
90
|
private subscription?;
|
|
91
91
|
private resizeHandleClassName;
|
package/dist/index.js
CHANGED
|
@@ -161,7 +161,7 @@ class Bounding extends (_a = BasePlugin, _nodes_dec = [inject.nodes()], _getNode
|
|
|
161
161
|
const resizeMove$ = new Subject();
|
|
162
162
|
const resizeEnd$ = new Subject();
|
|
163
163
|
const startResize = (nodeId, position) => {
|
|
164
|
-
const node = this.getNode(nodeId);
|
|
164
|
+
const node = this.getNode({ id: nodeId });
|
|
165
165
|
if (!(node == null ? void 0 : node.measured))
|
|
166
166
|
return;
|
|
167
167
|
resizeStart$.next({
|
|
@@ -260,7 +260,7 @@ class Bounding extends (_a = BasePlugin, _nodes_dec = [inject.nodes()], _getNode
|
|
|
260
260
|
};
|
|
261
261
|
}),
|
|
262
262
|
tap((resizeData) => {
|
|
263
|
-
const node = this.getNode(resizeData.nodeId);
|
|
263
|
+
const node = this.getNode({ id: resizeData.nodeId });
|
|
264
264
|
if (node) {
|
|
265
265
|
this.dispatchNodeOperation({
|
|
266
266
|
type: "draftOperation",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knotx/plugins-bounding",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Bounding Plugin for Knotx",
|
|
5
5
|
"author": "boenfu",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@knotx/jsx": "0.
|
|
32
|
-
"@knotx/plugins-canvas": "0.
|
|
31
|
+
"@knotx/jsx": "0.3.0",
|
|
32
|
+
"@knotx/plugins-canvas": "0.3.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@interactjs/actions": "^1.10.27",
|
|
@@ -38,16 +38,16 @@
|
|
|
38
38
|
"@interactjs/types": "^1.10.27",
|
|
39
39
|
"interactjs": "^1.10.27",
|
|
40
40
|
"rxjs": "^7.8.1",
|
|
41
|
-
"@knotx/core": "0.
|
|
42
|
-
"@knotx/decorators": "0.
|
|
43
|
-
"@knotx/render": "0.
|
|
41
|
+
"@knotx/core": "0.3.0",
|
|
42
|
+
"@knotx/decorators": "0.3.0",
|
|
43
|
+
"@knotx/render": "0.3.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@knotx/build-config": "0.
|
|
47
|
-
"@knotx/eslint-config": "0.
|
|
48
|
-
"@knotx/jsx": "0.
|
|
49
|
-
"@knotx/plugins-canvas": "0.
|
|
50
|
-
"@knotx/typescript-config": "0.
|
|
46
|
+
"@knotx/build-config": "0.3.0",
|
|
47
|
+
"@knotx/eslint-config": "0.3.0",
|
|
48
|
+
"@knotx/jsx": "0.3.0",
|
|
49
|
+
"@knotx/plugins-canvas": "0.3.0",
|
|
50
|
+
"@knotx/typescript-config": "0.3.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "unbuild",
|