@neo4j-nvl/base 0.3.9-6515fac6 → 0.3.9-9edeba96

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.
@@ -37,6 +37,7 @@ interface NvlMouseEvent extends MouseEvent {
37
37
  */
38
38
  declare class NVL {
39
39
  #private;
40
+ readonly performance: any;
40
41
  /**
41
42
  * Creates a new NVL instance.
42
43
  * @param {HTMLElement} frame - The DOM element to display the graph in
@@ -289,10 +290,10 @@ declare class NVL {
289
290
  /**
290
291
  * Sets the zoom of the viewport to a specific value.
291
292
  * @param {number} absolute The desired zoom level.
292
- * When updating both the zoom level and pan coordinates,
293
+ * @note When updating both the zoom level and pan coordinates,
293
294
  * use {@link setZoomAndPan} instead of calling {@link setZoom} and {@link setPan}
294
295
  * separately to avoid jittering.
295
- * If the zoom level is outside of the range provided by the
296
+ * @note If the zoom level is outside of the range provided by the
296
297
  * {@link NvlOptions.minZoom} and {@link NvlOptions.maxZoom} options,
297
298
  * the zoom level will be set to the closest valid zoom level.
298
299
  * If {@link NvlOptions.allowDynamicMinZoom} is set to true,
@@ -303,9 +304,8 @@ declare class NVL {
303
304
  * Sets the zoom of the viewport to a specific value.
304
305
  * @param {number} panX The desired panX value.
305
306
  * @param {number} panY The desired panY value.
306
- * When updating both the zoom level and pan coordinates,
307
- * use {@link setZoomAndPan} instead of calling {@link setZoom} and {@link setPan}
308
- * separately to avoid jittering.
307
+ * @note When updating both the zoom level and pan coordinates,
308
+ * use {@link setZoomAndPan} instead of calling {@link setZoom} and {@link setPan} separately to avoid jittering.
309
309
  */
310
310
  setPan(panX: number, panY: number): void;
311
311
  /**
@@ -313,8 +313,8 @@ declare class NVL {
313
313
  * @param {number} zoom The desired zoom level.
314
314
  * @param {number} panX The desired panX value.
315
315
  * @param {number} panY The desired panY value.
316
- * When only updating the zoom level or pan coordinates, use {@link setZoom} or {@link setPan} instead.
317
- * If the zoom level is outside of the range provided by the
316
+ * @note When only updating zoom level or pan coordinates, use {@link setZoom} or {@link setPan} instead.
317
+ * @note If the zoom level is outside of the range provided by the
318
318
  * {@link NvlOptions.minZoom} and {@link NvlOptions.maxZoom} options,
319
319
  * the zoom level will be set to the closest valid zoom level.
320
320
  * If {@link NvlOptions.allowDynamicMinZoom} is set to true,
@@ -28,7 +28,7 @@ export declare abstract class AnalyticsFunction {
28
28
  /**
29
29
  * Track arbitrary event
30
30
  */
31
- abstract trackEvent(payload: AnalyticsTrackPayload): void;
31
+ abstract trackEvent(payload: AnalyticsTrackPayload): Promise<void>;
32
32
  }
33
33
  /**
34
34
  * Analytics adapter for Segment Analytics.js
@@ -43,7 +43,11 @@ declare const createZoomTarget: (zoomX: number, zoomY: number, minZoom?: number,
43
43
  * @param {number} maxNodeRadius - The maximum node radius, which is added as margin to the scene (defaults to `50`)
44
44
  * @returns
45
45
  */
46
- declare const getZoomTargetForNodePositions: (nodePositions: Point[], containerWidth: number, containerHeight: number, maxNodeRadius?: number) => number;
46
+ declare const getZoomTargetForNodePositions: (nodePositions: Point[], containerWidth: number, containerHeight: number, maxNodeRadius?: number) => {
47
+ zoom: number;
48
+ panX: number;
49
+ panY: number;
50
+ };
47
51
  declare const getFlexibleZoomLimit: (nodePositions: Point[], rect: HTMLCanvasElement, maxNodeRadius: number) => number;
48
52
  declare const getNewZoomWithinLimits: (newZoom: number, oldZoom: number, minZoom: number, maxZoom: number) => number;
49
53
  declare const isZoomOutAtLimit: (newZoom: number, oldZoom: number, zoomOutLimit: number) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-nvl/base",
3
- "version": "0.3.9-6515fac6",
3
+ "version": "0.3.9-9edeba96",
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",
@@ -29,7 +29,7 @@
29
29
  "postpack": "rm LICENSE.txt && rm CHANGELOG.md"
30
30
  },
31
31
  "dependencies": {
32
- "@neo4j-nvl/layout-workers": "0.3.9-6515fac6",
32
+ "@neo4j-nvl/layout-workers": "0.3.9-9edeba96",
33
33
  "@segment/analytics-next": "^1.70.0",
34
34
  "color-string": "^1.9.1",
35
35
  "d3-force": "^3.0.0",