@knotx/plugins-bounding 0.2.15 → 0.3.1

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 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, NodeOperation, InteractionPriority } from '@knotx/core';
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: (id: string) => Node | undefined;
85
- dispatchNodeOperation: (operation: NodeOperation) => void;
86
- startInteraction: (pluginId: string, type: string, priority: InteractionPriority) => void;
87
- endInteraction: (pluginId: string, type: string) => void;
88
- canInteract: (pluginId: string, type: string, autoStartPriority?: InteractionPriority) => boolean;
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, NodeOperation, InteractionPriority } from '@knotx/core';
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: (id: string) => Node | undefined;
85
- dispatchNodeOperation: (operation: NodeOperation) => void;
86
- startInteraction: (pluginId: string, type: string, priority: InteractionPriority) => void;
87
- endInteraction: (pluginId: string, type: string) => void;
88
- canInteract: (pluginId: string, type: string, autoStartPriority?: InteractionPriority) => boolean;
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, NodeOperation, InteractionPriority } from '@knotx/core';
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: (id: string) => Node | undefined;
85
- dispatchNodeOperation: (operation: NodeOperation) => void;
86
- startInteraction: (pluginId: string, type: string, priority: InteractionPriority) => void;
87
- endInteraction: (pluginId: string, type: string) => void;
88
- canInteract: (pluginId: string, type: string, autoStartPriority?: InteractionPriority) => boolean;
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.2.15",
3
+ "version": "0.3.1",
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.2.13",
32
- "@knotx/plugins-canvas": "0.2.15"
31
+ "@knotx/jsx": "0.3.1",
32
+ "@knotx/plugins-canvas": "0.3.1"
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.2.14",
42
- "@knotx/decorators": "0.2.15",
43
- "@knotx/render": "0.2.14"
41
+ "@knotx/core": "0.3.1",
42
+ "@knotx/render": "0.3.1",
43
+ "@knotx/decorators": "0.3.1"
44
44
  },
45
45
  "devDependencies": {
46
- "@knotx/build-config": "0.2.13",
47
- "@knotx/eslint-config": "0.2.13",
48
- "@knotx/jsx": "0.2.13",
49
- "@knotx/plugins-canvas": "0.2.15",
50
- "@knotx/typescript-config": "0.2.13"
46
+ "@knotx/build-config": "0.3.1",
47
+ "@knotx/eslint-config": "0.3.1",
48
+ "@knotx/jsx": "0.3.1",
49
+ "@knotx/plugins-canvas": "0.3.1",
50
+ "@knotx/typescript-config": "0.3.1"
51
51
  },
52
52
  "scripts": {
53
53
  "build": "unbuild",