@metadev/daga 4.2.7 → 4.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metadev/daga",
3
- "version": "4.2.7",
3
+ "version": "4.2.8",
4
4
  "dependencies": {},
5
5
  "peerDependencies": {
6
6
  "d3": "^7.9.0",
@@ -175,6 +175,12 @@ export interface NodeTypeConfig {
175
175
  * @default false
176
176
  */
177
177
  resizableY?: boolean;
178
+ /**
179
+ * By how much the location of nodes of this type should be offset when snapping to grid in diagram units.
180
+ * Each value corresponds to left, top, right and bottom respectively.
181
+ * @default [0, 0, 0, 0]
182
+ */
183
+ snapToGridOffset?: [number, number, number, number];
178
184
  /**
179
185
  * The padding between the node and its children in diagram units if children are present. May be a single value or an array, in which case the value is interpreted in the same way as in CSS padding.
180
186
  * @default 0
@@ -21,6 +21,7 @@ export declare const extractLooksFromConfig: <L extends Look>(lookConfig: LookCo
21
21
  export interface LookConfig<L extends Look> {
22
22
  selected?: Partial<L>;
23
23
  highlighted?: Partial<L>;
24
+ selectedAndHighlighted?: Partial<L>;
24
25
  }
25
26
  /**
26
27
  * Configuration object for a look given by a shape.
@@ -32,6 +32,7 @@ export declare const DIAGRAM_NODE_TYPE_DEFAULTS: {
32
32
  minHeight: number;
33
33
  resizableX: boolean;
34
34
  resizableY: boolean;
35
+ snapToGridOffset: [number, number, number, number];
35
36
  padding: number;
36
37
  label: null;
37
38
  ports: never[];
@@ -76,6 +77,7 @@ export declare class DiagramNodeType implements DiagramEntity {
76
77
  minHeight: number;
77
78
  resizableX: boolean;
78
79
  resizableY: boolean;
80
+ snapToGridOffset: [number, number, number, number];
79
81
  bottomPadding: number;
80
82
  leftPadding: number;
81
83
  rightPadding: number;