@neo4j-nvl/interaction-handlers 2.0.0-ec6fdba7 → 2.1.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/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  All notable changes to NVL will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
4
4
 
5
- ## [Unreleased]
5
+ ## [2.1.0] - 2026-11-10
6
6
 
7
7
  This release adds keyboard actions for moving nodes, ships an agent skill for NVL, and makes all packages loadable as ESM in Node.js without a bundler.
8
8
 
@@ -24,6 +24,7 @@ This release adds keyboard actions for moving nodes, ships an agent skill for NV
24
24
  * `fit()` zooms out beyond `minZoom` when `allowDynamicMinZoom` is `true` and the graph does not fit the viewport.
25
25
  * `onHover` callback's `element` parameter is now typed as possibly `undefined`, matching the runtime behaviour.
26
26
  * Added missing caret for the React 18 peer dependency range in `@neo4j-nvl/react`.
27
+ * Several dependency updates
27
28
 
28
29
  ## [2.0.0] - 2026-09-15
29
30
 
package/README.md CHANGED
@@ -33,4 +33,12 @@ clickInteraction.updateCallback('onNodeClick', (node) => {
33
33
 
34
34
  If you are using React and want to add interactivity to your graph, you can also make use of the InteractiveNvlWrapper.
35
35
 
36
+ ### Agent skills
37
+
38
+ The agent skill for NVL (`neo4j-nvl-skill`) ships with `@neo4j-nvl/base`, which this package depends on. To make it available to your AI coding assistant, run the following with a recent version of the `skills` CLI:
39
+
40
+ ```bash
41
+ npx skills experimental_sync
42
+ ```
43
+
36
44
  You can find more instructions and examples on how to use NVL interaction handlers in the [docs](https://neo4j.com/docs/nvl/current/interaction-handlers/) and [API docs](https://neo4j.com/docs/api/nvl/current/modules/_neo4j_nvl_interaction_handlers.html), as well as in these [NVL code examples](https://neo4j.com/docs/api/nvl/current/examples.html?tab=plain-interaction-module).
@@ -27,6 +27,10 @@ export type HoverInteractionCallbacks = {
27
27
  /**
28
28
  * Interaction handler for hovering nodes and relationships.
29
29
  *
30
+ * @remarks Clusters are not hoverable elements: `element` is never a cluster and no hover state is drawn
31
+ * for hulls. Read `hitElements.clusters` in {@link HoverInteractionCallbacks.onHover}, or call
32
+ * {@link NVL.getHits} with `['cluster']`, to react to the pointer being inside a cluster hull.
33
+ *
30
34
  * For examples, head to the {@link https://neo4j.com/docs/nvl/current/interaction-handlers/#_hoverinteraction Hover Interaction documentation page}.
31
35
  */
32
36
  export declare class HoverInteraction extends BaseInteraction<HoverInteractionOptions> {
@@ -3,6 +3,10 @@ import { BaseInteraction } from "./base.js";
3
3
  /**
4
4
  * Interaction handler for hovering nodes and relationships.
5
5
  *
6
+ * @remarks Clusters are not hoverable elements: `element` is never a cluster and no hover state is drawn
7
+ * for hulls. Read `hitElements.clusters` in {@link HoverInteractionCallbacks.onHover}, or call
8
+ * {@link NVL.getHits} with `['cluster']`, to react to the pointer being inside a cluster hull.
9
+ *
6
10
  * For examples, head to the {@link https://neo4j.com/docs/nvl/current/interaction-handlers/#_hoverinteraction Hover Interaction documentation page}.
7
11
  */
8
12
  var HoverInteraction = class extends BaseInteraction {
@@ -54,11 +54,12 @@ export declare class PanInteraction extends BaseInteraction<PanInteractionOption
54
54
  * By default, panning is hindered by nodes and relationships.
55
55
  *
56
56
  * @example
57
- * ```js
57
+ * ```ts
58
58
  * import { NVL } from '@neo4j-nvl/base'
59
59
  * import { PanInteraction } from '@neo4j-nvl/interaction-handlers'
60
60
  *
61
61
  * const nvl = new NVL(document.createElement('div'), [{ id: '0' }], [])
62
+ *
62
63
  * const panInteraction = new PanInteraction(nvl)
63
64
  *
64
65
  * // Pan canvas even when dragging on nodes and relationships
@@ -36,11 +36,12 @@ var PanInteraction = class extends BaseInteraction {
36
36
  * By default, panning is hindered by nodes and relationships.
37
37
  *
38
38
  * @example
39
- * ```js
39
+ * ```ts
40
40
  * import { NVL } from '@neo4j-nvl/base'
41
41
  * import { PanInteraction } from '@neo4j-nvl/interaction-handlers'
42
42
  *
43
43
  * const nvl = new NVL(document.createElement('div'), [{ id: '0' }], [])
44
+ *
44
45
  * const panInteraction = new PanInteraction(nvl)
45
46
  *
46
47
  * // Pan canvas even when dragging on nodes and relationships
@@ -30,6 +30,10 @@ export type ZoomInteractionCallbacks = {
30
30
  * - Scrolling the mouse wheel on the canvas
31
31
  * - Using trackpad pinch gestures (equivalent to Ctrl/Cmd + scroll)
32
32
  *
33
+ * @remarks
34
+ * {@link ZoomInteractionCallbacks.onZoomAndPan} is the only callback. Zooming also changes the pan so the
35
+ * point under the pointer stays fixed. Zoom limits come from {@link NVL.getZoomLimits}.
36
+ *
33
37
  * For examples, head to the {@link https://neo4j.com/docs/nvl/current/interaction-handlers/#_zoominteraction Zoom Interaction documentation page}.
34
38
  */
35
39
  export declare class ZoomInteraction extends BaseInteraction<ZoomInteractionOptions> {
@@ -7,6 +7,10 @@ import { throttle } from "lodash-es";
7
7
  * - Scrolling the mouse wheel on the canvas
8
8
  * - Using trackpad pinch gestures (equivalent to Ctrl/Cmd + scroll)
9
9
  *
10
+ * @remarks
11
+ * {@link ZoomInteractionCallbacks.onZoomAndPan} is the only callback. Zooming also changes the pan so the
12
+ * point under the pointer stays fixed. Zoom limits come from {@link NVL.getZoomLimits}.
13
+ *
10
14
  * For examples, head to the {@link https://neo4j.com/docs/nvl/current/interaction-handlers/#_zoominteraction Zoom Interaction documentation page}.
11
15
  */
12
16
  var ZoomInteraction = class extends BaseInteraction {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-nvl/interaction-handlers",
3
- "version": "2.0.0-ec6fdba7",
3
+ "version": "2.1.0",
4
4
  "license": "SEE LICENSE IN 'LICENSE.txt'",
5
5
  "homepage": "https://neo4j.com/docs/nvl/current/",
6
6
  "description": "Interaction handlers for the Neo4j Visualization Library",
@@ -39,7 +39,7 @@
39
39
  "eslint": "yarn global:eslint ./src/"
40
40
  },
41
41
  "dependencies": {
42
- "@neo4j-nvl/base": "2.0.0-ec6fdba7",
42
+ "@neo4j-nvl/base": "2.1.0",
43
43
  "concaveman": "1.2.1",
44
44
  "lodash-es": "4.18.1"
45
45
  },
@@ -48,6 +48,5 @@
48
48
  "@types/concaveman": "1.1.6",
49
49
  "@types/lodash-es": "4.17.12",
50
50
  "tsdown": "0.23.1"
51
- },
52
- "stableVersion": "2.0.0"
51
+ }
53
52
  }