@neo4j-nvl/base 1.2.1 → 1.2.2

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.
@@ -139,7 +139,11 @@ declare class NVL {
139
139
  removeRelationshipsWithIds(relationshipIds: string[]): void;
140
140
  /**
141
141
  * Returns all nodes that is currently stored in the visualisation.
142
+ * `x` and `y` are client/screen coordinates relative to the canvas.
142
143
  * @returns The array of {@link Node nodes}.
144
+ *
145
+ * @note In the next major release, `x` and `y` become layout coordinates and
146
+ * screen coordinates move to a `clientPosition` field.
143
147
  */
144
148
  getNodes(): Node[];
145
149
  /**
@@ -5,7 +5,13 @@ import type { Node } from '../types/graph-element';
5
5
  export interface ExternalCallbacks {
6
6
  /** Triggered when a layout is done moving. */
7
7
  onLayoutDone?: () => void;
8
- /** Triggered on each step of a layout. */
8
+ /**
9
+ * Triggered on each step of a layout.
10
+ * Node `x` and `y` are client/screen coordinates relative to the canvas.
11
+ *
12
+ * @note In the next major release, `x` and `y` become layout coordinates and
13
+ * screen coordinates move to a `clientPosition` field.
14
+ */
9
15
  onLayoutStep?: (p: Node[]) => void;
10
16
  /** Triggered when NVL throws an error after initialization. */
11
17
  onError?: (error: Error) => void;
@@ -226,7 +226,16 @@ export interface NvlOptions {
226
226
  disabledItemColor?: string;
227
227
  /** The color to use for the labels of the disabled nodes and relationships */
228
228
  disabledItemFontColor?: string;
229
- /** The color to use for the viewport box in the minimap */
229
+ /**
230
+ * Stroke color for overlay UI lines (e.g. minimap viewport box).
231
+ * Use a dark color on light backgrounds and a light color on dark backgrounds.
232
+ * @defaultValue `#1A1B1D`
233
+ */
234
+ overlayLineColor?: string;
235
+ /**
236
+ * The color to use for the viewport box in the minimap.
237
+ * @deprecated Use {@link overlayLineColor}.
238
+ */
230
239
  minimapViewportBoxColor?: string;
231
240
  };
232
241
  /**
@@ -320,6 +329,6 @@ export interface NvlState {
320
329
  disabledItemStyles: DisabledItemStyles;
321
330
  defaultNodeColor: string;
322
331
  defaultRelationshipColor: string;
323
- minimapViewportBoxColor: string;
332
+ overlayLineColor: string;
324
333
  }
325
334
  export {};
@@ -6,7 +6,7 @@ import type { NvlOptions } from './types';
6
6
  * If both caption and captions are provided, captions takes precedence.
7
7
  */
8
8
  export declare const processCaptions: (item: Partial<Node | Relationship>) => StyledCaption[];
9
- export declare const processColorStyles: (styling: NvlOptions["styling"]) => {
9
+ export declare const processColorStyles: (styling?: NvlOptions["styling"]) => {
10
10
  nodeBorderStyles: {
11
11
  default: {
12
12
  rings?: {
@@ -42,5 +42,5 @@ export declare const processColorStyles: (styling: NvlOptions["styling"]) => {
42
42
  };
43
43
  defaultNodeColor: string;
44
44
  defaultRelationshipColor: string;
45
- minimapViewportBoxColor: string;
45
+ overlayLineColor: string;
46
46
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-nvl/base",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "license": "SEE LICENSE IN 'LICENSE.txt'",
5
5
  "homepage": "https://neo4j.com/docs/nvl/current/",
6
6
  "description": "Base library for the Neo4j Visualization Library",
@@ -30,7 +30,7 @@
30
30
  "postpack": "rm LICENSE.txt && rm CHANGELOG.md"
31
31
  },
32
32
  "dependencies": {
33
- "@neo4j-nvl/layout-workers": "1.2.1",
33
+ "@neo4j-nvl/layout-workers": "1.2.2",
34
34
  "@segment/analytics-next": "1.81.1",
35
35
  "color-string": "1.9.1",
36
36
  "d3-force": "3.0.0",