@neo4j-nvl/base 1.0.0 → 1.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/base.mjs +1 -1
  3. package/dist/types/index.d.ts +25 -11
  4. package/dist/types/layouts/circularLayout/CircularLayout.d.ts +18 -0
  5. package/dist/types/layouts/forcedirectedlayout/ForceCytoLayout.d.ts +1 -1
  6. package/dist/types/layouts/forcedirectedlayout/physlayout/PhysLayout.d.ts +8 -3
  7. package/dist/types/layouts/forcedirectedlayout/physlayout/shaders/multilevel-fragment-verlet.d.ts +1 -1
  8. package/dist/types/layouts/forcedirectedlayout/physlayout/solarmerger/SolarMerger.d.ts +17 -39
  9. package/dist/types/layouts/forcedirectedlayout/physlayout/solarmerger/types.d.ts +49 -0
  10. package/dist/types/modules/NvlController.d.ts +6 -2
  11. package/dist/types/modules/state/types.d.ts +30 -9
  12. package/dist/types/modules/state/utils.d.ts +2 -2
  13. package/dist/types/renderers/domrenderer/BaseRenderer.d.ts +75 -0
  14. package/dist/types/renderers/domrenderer/canvasrenderer/CanvasRenderer.d.ts +120 -0
  15. package/dist/types/renderers/{canvasrenderer/util.d.ts → domrenderer/canvasrenderer/canvasUtils.d.ts} +2 -14
  16. package/dist/types/renderers/domrenderer/shared/ImageCache.d.ts +16 -0
  17. package/dist/types/renderers/{canvasrenderer → domrenderer/shared}/arrows/ArrowBundle.d.ts +2 -2
  18. package/dist/types/renderers/{canvasrenderer → domrenderer/shared}/arrows/ArrowBundler.d.ts +1 -1
  19. package/dist/types/renderers/domrenderer/shared/arrows/arrows.d.ts +175 -0
  20. package/dist/types/renderers/domrenderer/shared/nodes/nodeUtils.d.ts +29 -0
  21. package/dist/types/renderers/domrenderer/shared/nodes/nodes.d.ts +58 -0
  22. package/dist/types/renderers/{canvasrenderer → domrenderer/shared}/types.d.ts +2 -2
  23. package/dist/types/renderers/domrenderer/shared/util.d.ts +11 -0
  24. package/dist/types/renderers/{canvasrenderer → domrenderer/shared}/vectorUtils.d.ts +1 -1
  25. package/dist/types/renderers/{canvasrenderer → domrenderer/shared}/wordwrap.d.ts +10 -0
  26. package/dist/types/renderers/domrenderer/shared/wordwrap.test.d.ts +1 -0
  27. package/dist/types/renderers/domrenderer/svgrenderer/SvgRenderer.d.ts +22 -0
  28. package/dist/types/renderers/domrenderer/svgrenderer/SvgRenderer.test.d.ts +1 -0
  29. package/dist/types/renderers/domrenderer/svgrenderer/svgUtils.d.ts +175 -0
  30. package/dist/types/renderers/webglrenderer/Renderer.d.ts +5 -1
  31. package/dist/types/renderers/webglrenderer/Renderer.test.d.ts +1 -0
  32. package/dist/types/types/graph-element.d.ts +1 -1
  33. package/dist/types/utils/canvasManagement.d.ts +16 -1
  34. package/dist/types/utils/circularUtils.d.ts +3 -0
  35. package/dist/types/utils/circularUtils.test.d.ts +1 -0
  36. package/dist/types/utils/constants.d.ts +4 -1
  37. package/dist/types/utils/geometry.d.ts +2 -1
  38. package/dist/types/utils/graphObjectUtils.d.ts +2 -2
  39. package/dist/types/utils/jsDriverResultTransformer.d.ts +1 -1
  40. package/package.json +23 -23
  41. package/dist/types/modules/performance.d.ts +0 -93
  42. package/dist/types/renderers/canvasrenderer/CanvasRenderer.d.ts +0 -93
  43. package/dist/types/renderers/canvasrenderer/ImageCache.d.ts +0 -11
  44. package/dist/types/renderers/canvasrenderer/arrows/arrows.d.ts +0 -55
  45. package/dist/types/renderers/canvasrenderer/nodes/nodes.d.ts +0 -59
  46. /package/dist/types/{renderers/canvasrenderer/Animation.test.d.ts → layouts/d3forcelayout/circularLayout.test.d.ts} +0 -0
  47. /package/dist/types/renderers/{canvasrenderer → domrenderer/canvasrenderer}/Animation.d.ts +0 -0
  48. /package/dist/types/renderers/{canvasrenderer/CanvasRenderer.test.d.ts → domrenderer/canvasrenderer/Animation.test.d.ts} +0 -0
  49. /package/dist/types/renderers/{canvasrenderer → domrenderer/canvasrenderer}/AnimationHandler.d.ts +0 -0
  50. /package/dist/types/renderers/{canvasrenderer/ImageCache.test.d.ts → domrenderer/canvasrenderer/CanvasRenderer.test.d.ts} +0 -0
  51. /package/dist/types/renderers/{canvasrenderer/arrows/ArrowBundle.test.d.ts → domrenderer/shared/ImageCache.test.d.ts} +0 -0
  52. /package/dist/types/renderers/{canvasrenderer/arrows/ArrowBundler.test.d.ts → domrenderer/shared/arrows/ArrowBundle.test.d.ts} +0 -0
  53. /package/dist/types/renderers/{canvasrenderer/arrows/arrows.test.d.ts → domrenderer/shared/arrows/ArrowBundler.test.d.ts} +0 -0
  54. /package/dist/types/renderers/{canvasrenderer/nodes/nodes.test.d.ts → domrenderer/shared/arrows/arrows.test.d.ts} +0 -0
  55. /package/dist/types/renderers/{canvasrenderer → domrenderer/shared}/arrows/constants.d.ts +0 -0
  56. /package/dist/types/renderers/{canvasrenderer/util.test.d.ts → domrenderer/shared/nodes/nodes.test.d.ts} +0 -0
  57. /package/dist/types/renderers/{canvasrenderer/wordwrap.test.d.ts → domrenderer/shared/util.test.d.ts} +0 -0
@@ -4,7 +4,7 @@ export type FlatRel = Omit<Relationship & {
4
4
  bundledRels: Omit<Relationship, 'from' | 'to'>[];
5
5
  key: string;
6
6
  }, 'id'>;
7
- export declare const getRelItemKey: (from: Node['id'], to: Node['id']) => string;
7
+ export declare const getRelItemKey: (from: Node["id"], to: Node["id"]) => string;
8
8
  export declare const relItemsToFlatKeySet: (relItems: Relationship[]) => Set<string>;
9
9
  /**
10
10
  * Flattens a list of relationships so only one relationship remains between two nodes.
@@ -19,7 +19,7 @@ export declare const getAdjNodesMapAndRelMap: (rels: Relationship[]) => {
19
19
  adjNodesMap: Record<string, Set<string>>;
20
20
  relMap: Record<string, Relationship[]>;
21
21
  };
22
- export declare const getConnectedNodesAndRels: (addedNodes: Set<Node['id']>, addedRels: Set<Relationship['id']>, nodes: DataSet<Node>, rels: DataSet<Relationship>) => {
22
+ export declare const getConnectedNodesAndRels: (addedNodes: Set<Node["id"]>, addedRels: Set<Relationship["id"]>, nodes: DataSet<Node>, rels: DataSet<Relationship>) => {
23
23
  connectedNodes: Record<string, Node>;
24
24
  connectedRels: Record<string, Relationship>;
25
25
  };
@@ -31,7 +31,7 @@ export declare const recordCollector: (graphElements: NestedGraphElements[]) =>
31
31
  *
32
32
  * @see {@link https://neo4j.com/docs/api/javascript-driver/current/class/lib6/result-transformers.js~ResultTransformers.html|ResultTransformers on Neo4j JS Driver API Docs}
33
33
  */
34
- export declare const nvlResultTransformer: import("neo4j-driver-core/types/result-transformers").ResultTransformer<{
34
+ export declare const nvlResultTransformer: import("neo4j-driver-core").ResultTransformer<{
35
35
  /** The nodes of the graph. */
36
36
  nodes: NvlNode[];
37
37
  /** The relationships of the graph. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-nvl/base",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
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,32 +29,32 @@
29
29
  "postpack": "rm LICENSE.txt && rm CHANGELOG.md"
30
30
  },
31
31
  "dependencies": {
32
- "@neo4j-nvl/layout-workers": "1.0.0",
33
- "@segment/analytics-next": "^1.70.0",
34
- "color-string": "^1.9.1",
35
- "d3-force": "^3.0.0",
36
- "gl-matrix": "^3.3.0",
37
- "glsl-inject-defines": "^1.0.3",
38
- "lodash": "4.17.21",
39
- "loglevel": "^1.8.0",
40
- "mobx": "^3.2.2",
41
- "node-pid-controller": "^1.0.1",
42
- "resizelistener": "^1.1.0",
32
+ "@neo4j-nvl/layout-workers": "1.1.0",
33
+ "@segment/analytics-next": "1.81.1",
34
+ "color-string": "1.9.1",
35
+ "d3-force": "3.0.0",
36
+ "gl-matrix": "3.4.4",
37
+ "glsl-inject-defines": "1.0.3",
38
+ "lodash": "4.17.23",
39
+ "loglevel": "1.9.2",
40
+ "mobx": "3.6.2",
41
+ "node-pid-controller": "1.0.1",
42
+ "resizelistener": "1.1.0",
43
43
  "tinycolor2": "1.6.0",
44
- "uuid": "^8.3.2"
44
+ "uuid": "8.3.2"
45
45
  },
46
46
  "devDependencies": {
47
- "@babel/core": "^7.21.4",
48
- "@types/color-string": "^1.5.5",
49
- "@types/d3-force": "^3.0.3",
50
- "@types/lodash": "4.14.202",
47
+ "@babel/core": "7.28.5",
48
+ "@types/color-string": "1.5.5",
49
+ "@types/d3-force": "3.0.10",
50
+ "@types/lodash": "4.17.21",
51
51
  "@types/segment-analytics": "0.0.38",
52
- "@types/tinycolor2": "^1.4.6",
53
- "babel-loader": "^8.2.5",
54
- "copy-webpack-plugin": "^11.0.0",
55
- "neo4j-driver": "^5.26.0",
56
- "webpack": "^5.75.0",
57
- "webpack-cli": "^5.0.0"
52
+ "@types/tinycolor2": "1.4.6",
53
+ "babel-loader": "8.4.1",
54
+ "copy-webpack-plugin": "11.0.0",
55
+ "neo4j-driver": "5.28.2",
56
+ "webpack": "5.103.0",
57
+ "webpack-cli": "5.1.4"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "neo4j-driver": "*"
@@ -1,93 +0,0 @@
1
- /**
2
- * A class capable of measuring performance.
3
- * Usage:
4
- * When you want to measure a block of code, start by calling
5
- * performanceTesterInstance.startTest() or
6
- * performanceTesterInstance.startTest('Some readable name') if you
7
- * want to control how it prints.
8
- * After the block of code ends, call performanceTesterInstance.endTest()
9
- */
10
- export default class PerformanceTester {
11
- disabled: boolean;
12
- tree: PerformanceTree;
13
- /**
14
- * Starts a performance measurement. Every call to this method must be followed
15
- * by a call to endTest(). Tests can be nested.
16
- * @param {String} measurement String identifying this measurement. Only used for printing, so
17
- * keep it human readable.
18
- */
19
- startTest(measurement: string): void;
20
- /**
21
- * Ends the last started test, giving it an end time.
22
- */
23
- endTest(): void;
24
- /**
25
- * Clears all performance measurements
26
- */
27
- reset(): void;
28
- /**
29
- * Prints all the performance measurements to console by calling
30
- * print() on the performance tree.
31
- */
32
- print(): void;
33
- }
34
- /**
35
- * A tree of PerformanceTreeNodes.
36
- * @type {PerformanceTree}
37
- */
38
- declare class PerformanceTree {
39
- root: any;
40
- current: any;
41
- /**
42
- * Empties the tree.
43
- */
44
- clear(): void;
45
- /**
46
- * Adds a new node to the tree at the current open position, containing the
47
- * data provided. It also sets the newly added node as the currently open one.
48
- * @param {PerformanceData} data A PerformanceData object.
49
- */
50
- add(data: PerformanceData): void;
51
- /**
52
- * The tree always maintains a pointer to the currently open node. This
53
- * method closes that node, closes the data object in contains, and opens
54
- * the parent node.
55
- */
56
- close(): void;
57
- /**
58
- * Gets the data object of the currently open node.
59
- * @return {PerformanceData} The data object of the currently open node.
60
- */
61
- getCurrentData(): PerformanceData;
62
- /**
63
- * Prints this entire tree to the console.
64
- */
65
- print(): void;
66
- }
67
- /**
68
- * Performance measurement data.
69
- * @type {PerformanceData}
70
- */
71
- declare class PerformanceData {
72
- /**
73
- * Instantiates a data measurement, giving it the start time when constructor is called.
74
- * Remember that you also have to call close on this object to make it valid.
75
- * @param {String} name String identifying this measurement. Only used for printing, so
76
- * keep it human readable.
77
- * @return {PerformanceData} The data object
78
- */
79
- constructor(name: string);
80
- name: any;
81
- startTime: any;
82
- endTime: any;
83
- /**
84
- * Sets the endTime measurement on this data object.
85
- */
86
- close(): void;
87
- /**
88
- * Gets the time spent on this measurement
89
- * @return {Number} Time spent in ms
90
- */
91
- _timeSpent(): number;
92
- }
93
- export {};
@@ -1,93 +0,0 @@
1
- import type { NvlState } from '../../modules/state/types';
2
- import type { Node } from '../../types/graph-element';
3
- import type { Point } from '../../utils/geometry';
4
- import type { HitTargetNode, HitTargetRelationship } from '../../utils/hittest';
5
- import ArrowBundler from './arrows/ArrowBundler';
6
- export default class CanvasRenderer {
7
- arrowBundler: ArrowBundler;
8
- private activeNodes;
9
- private canvas;
10
- private context;
11
- private state;
12
- private stateDisposers;
13
- private relationshipThreshold;
14
- private animationHandler;
15
- private imageCache;
16
- private needsRun;
17
- private nodeVersion;
18
- private relVersion;
19
- private waypointVersion;
20
- private ellipsisWidth;
21
- /**
22
- * Creates a new CanvasRenderer.
23
- * @param canvas {HTMLCanvasElement} - The canvas to render on.
24
- * @param context {CanvasRenderingContext2D} - The canvas context.
25
- * @param state {NvlState} - The state.
26
- * @param options {{ relationshipThreshold: number }} - The visualization options.
27
- */
28
- constructor(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D | null, state: NvlState, { relationshipThreshold }?: {
29
- relationshipThreshold?: number;
30
- });
31
- /**
32
- * Checks if the renderer needs to run.
33
- * @returns Whether the renderer needs to run.
34
- */
35
- needsToRun(): boolean;
36
- /**
37
- * Processes the updates in nodes and relationships.
38
- */
39
- processUpdates(): void;
40
- /**
41
- * Draws the nodes and relationships to their positions on the canvas.
42
- * @param positionArray {Node[]} - The array of nodes to draw
43
- * @param options {any} - The options for the render
44
- */
45
- render(positionArray: Node[], options?: {
46
- canvas?: HTMLCanvasElement;
47
- context?: CanvasRenderingContext2D;
48
- backgroundColor?: string;
49
- ignoreAnimations?: boolean;
50
- showCaptions?: boolean;
51
- }): void;
52
- private getRelationshipsToRender;
53
- private getNodesToRender;
54
- private renderNodes;
55
- private renderRelationships;
56
- /**
57
- * Returns the nodes at the pointer position
58
- * @param pointer - The position of the pointer.
59
- * @returns The nodes at the pointer position.
60
- * @todo Sort nodes by distance descending
61
- */
62
- getNodesAt(pointer: Point, hitNodeMarginWidth?: number): HitTargetNode[];
63
- /**
64
- * Returns the relationships at the pointer position
65
- * @param pointer - The position of the pointer.
66
- * @returns The relationships at the pointer position.
67
- * @todo: sort relationships by distance descending
68
- */
69
- getRelsAt(pointer: Point): HitTargetRelationship[];
70
- destroy(): void;
71
- /**
72
- * Checks if the bounding box is outside of the screen.
73
- * @param boundingBox - The bounding box to check.
74
- * @param clientWidth - The client width of the canvas.
75
- * @param clientHeight - The client height of the canvas.
76
- * @returns Whether the bounding box is off screen.
77
- * @remarks This check doesn't catch all items that are off screen but its simple and removes many of them
78
- */
79
- private isBoundingBoxOffScreen;
80
- /**
81
- * Handles the channel's additions, removals and updates and adds or removes the id from the active nodes.
82
- * @param channel {Channel<Node>} - The channel to process
83
- * @param fullData {DataSet<Node>} - The full data
84
- * @param processUpdates {boolean} - Whether to process channel updates as well
85
- */
86
- private handleChannelUpdate;
87
- /**
88
- * Handles zoom and pan on the canvas.
89
- * @param context {CanvasRenderingContext2D} - The canvas context
90
- * @param canvas {HTMLCanvasElement} - The canvas
91
- */
92
- private zoomAndPan;
93
- }
@@ -1,11 +0,0 @@
1
- import type { Cache } from './types';
2
- declare class ImageCache {
3
- cache: Cache;
4
- constructor();
5
- getImage(src: string, inverted?: boolean): HTMLCanvasElement;
6
- private getOrCreateEntry;
7
- private invertCanvas;
8
- private loadImage;
9
- private drawIfNeeded;
10
- }
11
- export default ImageCache;
@@ -1,55 +0,0 @@
1
- import type { BorderStyle, DisabledItemStyles } from '../../../modules/state/types';
2
- import type { Node, Relationship } from '../../../types/graph-element';
3
- import type { Point } from '../../../utils/geometry';
4
- import type ImageCache from '../ImageCache';
5
- import type ArrowBundle from './ArrowBundle';
6
- /**
7
- * This function calculates the difference in radius between two nodes.
8
- * @param toArrowGap - The gap between the node and the arrow on the to side.
9
- * @param fromArrowGap - The gap between the node and the arrow on the from side.
10
- * @returns The difference in radius between the two nodes.
11
- * @comment can be affected for example by the label crust and selected ring
12
- * as well as a gap between the node and the arrow on it's side.
13
- */
14
- export declare const getRadiusDifference: (toArrowGap: number, fromArrowGap: number) => number;
15
- /**
16
- * This function calculates the coordinates of the via point
17
- * between two nodes. The via point is used to bend the edge
18
- * between the two nodes.
19
- * @param fromNode - The node the edge starts from.
20
- * @param toNode - The node the edge ends at.
21
- * @param fromArrowGap - The gap between the node and the arrow on the from side.
22
- * @param toArrowGap - The gap between the node and the arrow on the to side.
23
- * @returns The coordinates of the via point.
24
- */
25
- export declare const getViaCoordinates: (fromNode: Node, toNode: Node, fromArrowGap: number, toArrowGap: number, rel: Relationship, bundle: ArrowBundle) => Point;
26
- export declare const getPointsForStraight: (rel: Relationship, bundle: ArrowBundle, fromNode: Node, toNode: Node, showLabel: boolean, curved?: boolean) => Point[];
27
- /**
28
- * Draws a label for a relationship.
29
- * @param ctx - The canvas context.
30
- * @param x - The x coordinate of the label.
31
- * @param y - The y coordinate of the label.
32
- * @param angle - The angle of the label.
33
- * @param maxWidth - The maximum width of the label.
34
- * @param rel - The relationship.
35
- * @param bundle - The arrow bundle.
36
- * @param disabledItemStyles - The styles for disabled items.
37
- * @param fontColor - The color of the font.
38
- * @param flip - Whether to flip the label.
39
- */
40
- export declare const drawLabel: (ctx: CanvasRenderingContext2D, point: Point, angle: number, maxWidth: number, rel: Relationship, bundle: ArrowBundle, disabledItemStyles: DisabledItemStyles, fontColor: string, flip?: boolean) => void;
41
- export declare const renderWaypointArrow: (ctx: CanvasRenderingContext2D, rel: Relationship, from: Node, to: Node, bundle: ArrowBundle, imageCache: ImageCache, showLabel: boolean, drawCurves: boolean, selectedBorderStyle: BorderStyle, disabledItemStyles: DisabledItemStyles, defaultRelationshipColor?: string) => void;
42
- export declare const renderSelfArrow: (ctx: CanvasRenderingContext2D, rel: Relationship, node: Node, bundle: ArrowBundle, imageCache: ImageCache, showLabel: boolean, selectedBorderStyle: BorderStyle, disabledItemStyles: DisabledItemStyles, defaultRelationshipColor?: string) => void;
43
- export declare const renderArrow: (ctx: CanvasRenderingContext2D, rel: Relationship, fromNode: Node, toNode: Node, bundle: ArrowBundle, imageCache: ImageCache, showLabel: boolean, selectedBorderStyle: BorderStyle, disabledItemStyles: DisabledItemStyles, defaultRelationshipColor: string, drawCurves?: boolean) => void;
44
- export declare const distanceToEdge: (pos: Point, rel: Relationship, fromNode: Node, toNode: Node, bundle: ArrowBundle, showLabel: boolean, drawCurves?: boolean) => number;
45
- /**
46
- * Returns the bounding box of the arrow.
47
- * @param rel - The relationship to get the bounding box for.
48
- * @param bundle - The arrow bundle the relationship is part of.
49
- * @param fromNode - The node the relationship is coming from.
50
- * @param toNode - The node the relationship is going to.
51
- * @param showLabel - Whether or not a label is shown.
52
- * @param drawCurves - Whether or the relationship is drawn as a curve.
53
- * @returns The bounding box of the arrow.
54
- */
55
- export declare const getBoundingBox: (rel: Relationship, bundle: ArrowBundle, fromNode: Node, toNode: Node, showLabel?: boolean, drawCurves?: boolean) => DOMRect | null;
@@ -1,59 +0,0 @@
1
- import type { BorderStyles, DisabledItemStyles } from '../../../modules/state/types';
2
- import type { Node } from '../../../types/graph-element';
3
- import type AnimationHandler from '../AnimationHandler';
4
- type RingStyle = {
5
- width: number;
6
- color: string;
7
- };
8
- /**
9
- * Returns an array of styles for the rings of a node.
10
- * It takes the node as an argument, and an optional array of size animations.
11
- * If the node is selected, it returns the selectedStyle.rings array.
12
- * If the node is not selected, it returns an array containing only one object with
13
- * a width of 0 and an empty color.
14
- * @param node - The node to get the ring styles for.
15
- * @param animationHandler - The animation handler.
16
- * @param nodeBorderStyles - The node border styles.
17
- * @returns An array of ring styles.
18
- */
19
- export declare const getRingStyles: (node: Node, animationHandler: AnimationHandler, nodeBorderStyles: any) => RingStyle[];
20
- /**
21
- * Returns the bounding box of a node with the given x, y, and size properties.
22
- * If no size is given, the default size is used.
23
- * @param Node - The node to get the bounding box for.
24
- * @returns The bounding box of the node.
25
- */
26
- export declare const getBoundingBox: ({ x, y, size }: Node) => DOMRect;
27
- /**
28
- * Returns the caption font size that should be used
29
- * for the given info level and node diameter.
30
- * @param infoLevel {number} - The info level.
31
- * @param nodeRadius {number} - The radius of the node.
32
- * @param captionSize {number} - The size of the caption.
33
- * @returns The font size.
34
- */
35
- export declare const infoLevelToFontSize: (infoLevel: number, nodeRadius?: number, captionSize?: number, hasIcon?: boolean) => number;
36
- /**
37
- * Returns maximum length of lines
38
- * @param lines {array} - The lines info
39
- * @returns The font size.
40
- */
41
- export declare const findMaxLength: (lines: any[], ctx: CanvasRenderingContext2D, pixelRatio: number) => number;
42
- /**
43
- * Returns minimum length of lines
44
- * @param lines {array} - The lines info
45
- * @returns The font size.
46
- */
47
- export declare const findMinLength: (lines: any[], ctx: CanvasRenderingContext2D, pixelRatio: number) => any;
48
- /**
49
- * Draws a node with the given context, node, and image cache.
50
- * @param ctx {any} - The context to draw the node on.
51
- * @param node {Node} - The node to draw.
52
- * @param imageCache {any} - The image cache to use.
53
- * @param animationHandler {AnimationHandler} - The animation handler.
54
- * @param nodeBorderStyles {BorderStyles} - The node border styles.
55
- * @param disabledItemStyles {DisabledItemStyles} - The styles for the disabled items.
56
- * @param zoomLevel {number} - The current zoom level.
57
- */
58
- export declare const drawNode: (ctx: CanvasRenderingContext2D, node: Node, imageCache: any, animationHandler: AnimationHandler, nodeBorderStyles: BorderStyles, disabledItemStyles: DisabledItemStyles, defaultNodeColor?: string, ellipsisWidth?: number, zoomLevel?: number) => void;
59
- export {};