@neo4j-nvl/base 1.2.2 → 2.0.0-1e695738

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 (235) hide show
  1. package/CHANGELOG.md +54 -1
  2. package/README.md +8 -0
  3. package/dist/base.mjs +35891 -2
  4. package/dist/types/index.d.ts +382 -386
  5. package/dist/types/layouts/animatedlayout/AnimatedLayout.d.ts +23 -23
  6. package/dist/types/layouts/animatedlayout/animationUtils.d.ts +3 -3
  7. package/dist/types/layouts/circularLayout/CircularLayout.d.ts +14 -14
  8. package/dist/types/layouts/d3forcelayout/circularLayout.d.ts +4 -4
  9. package/dist/types/layouts/d3forcelayout/constants.d.ts +3 -4
  10. package/dist/types/layouts/d3forcelayout/d3ForceLayout.d.ts +31 -31
  11. package/dist/types/layouts/d3forcelayout/types.d.ts +7 -7
  12. package/dist/types/layouts/forcedirectedlayout/PhysLayout.d.ts +275 -0
  13. package/dist/types/layouts/forcedirectedlayout/clustering/ClusterByMerger.d.ts +62 -0
  14. package/dist/types/layouts/forcedirectedlayout/clustering/SolarMerger.d.ts +56 -0
  15. package/dist/types/layouts/forcedirectedlayout/clustering/clustering-utils.d.ts +143 -0
  16. package/dist/types/layouts/forcedirectedlayout/clustering/types.d.ts +59 -0
  17. package/dist/types/layouts/forcedirectedlayout/glwrapper.d.ts +4 -0
  18. package/dist/types/layouts/forcedirectedlayout/shaders/multilevel-fragment.d.ts +2 -0
  19. package/dist/types/layouts/forcedirectedlayout/shaders/multilevel-repulsive-fragment.d.ts +2 -0
  20. package/dist/types/layouts/forcedirectedlayout/shaders/multilevel-update-fragment.d.ts +2 -0
  21. package/dist/types/layouts/forcedirectedlayout/shaders/sim-vertex.d.ts +2 -0
  22. package/dist/types/layouts/freeLayout/FreeLayout.d.ts +23 -25
  23. package/dist/types/layouts/gridLayout/GridLayout.d.ts +26 -30
  24. package/dist/types/layouts/hierarchicallayout/HierarchicalLayout.d.ts +28 -23
  25. package/dist/types/layouts/hierarchicallayout/constants.d.ts +2 -2
  26. package/dist/types/modules/CallbackHelper.d.ts +23 -23
  27. package/dist/types/modules/ExternalCallbackHandler.d.ts +33 -39
  28. package/dist/types/modules/NvlController.d.ts +212 -129
  29. package/dist/types/modules/Shader.d.ts +17 -17
  30. package/dist/types/modules/ZoomTransitionHandler.d.ts +24 -24
  31. package/dist/types/modules/dataset.d.ts +26 -24
  32. package/dist/types/modules/logging.d.ts +4 -4
  33. package/dist/types/modules/state/constants.d.ts +2 -2
  34. package/dist/types/modules/state/state.d.ts +2 -2
  35. package/dist/types/modules/state/types.d.ts +338 -228
  36. package/dist/types/modules/state/utils.d.ts +36 -36
  37. package/dist/types/renderers/ClusterOverlay.d.ts +73 -0
  38. package/dist/types/renderers/domrenderer/BaseRenderer.d.ts +69 -69
  39. package/dist/types/renderers/domrenderer/canvasrenderer/Animation.d.ts +57 -57
  40. package/dist/types/renderers/domrenderer/canvasrenderer/AnimationHandler.d.ts +65 -65
  41. package/dist/types/renderers/domrenderer/canvasrenderer/CanvasRenderer.d.ts +84 -85
  42. package/dist/types/renderers/domrenderer/canvasrenderer/arrowDrawing.d.ts +31 -31
  43. package/dist/types/renderers/domrenderer/canvasrenderer/nodeDrawing.d.ts +32 -32
  44. package/dist/types/renderers/domrenderer/shared/ImageCache.d.ts +16 -15
  45. package/dist/types/renderers/domrenderer/shared/arrows/ArrowBundle.d.ts +89 -89
  46. package/dist/types/renderers/domrenderer/shared/arrows/ArrowBundler.d.ts +42 -42
  47. package/dist/types/renderers/domrenderer/shared/arrows/arrows.d.ts +49 -49
  48. package/dist/types/renderers/domrenderer/shared/arrows/constants.d.ts +4 -4
  49. package/dist/types/renderers/domrenderer/shared/nodes/nodes.d.ts +21 -21
  50. package/dist/types/renderers/domrenderer/shared/types.d.ts +29 -30
  51. package/dist/types/renderers/domrenderer/shared/util.d.ts +4 -4
  52. package/dist/types/renderers/domrenderer/shared/vectorUtils.d.ts +10 -10
  53. package/dist/types/renderers/domrenderer/shared/wordwrap.d.ts +10 -10
  54. package/dist/types/renderers/domrenderer/svgrenderer/SvgRenderer.d.ts +18 -19
  55. package/dist/types/renderers/domrenderer/svgrenderer/arrowDrawing.d.ts +15 -15
  56. package/dist/types/renderers/domrenderer/svgrenderer/nodeDrawing.d.ts +4 -4
  57. package/dist/types/renderers/domrenderer/svgrenderer/svgUtils.d.ts +21 -21
  58. package/dist/types/renderers/webglrenderer/Controller.d.ts +83 -61
  59. package/dist/types/renderers/webglrenderer/IconLayerRegistry.d.ts +14 -0
  60. package/dist/types/renderers/webglrenderer/Renderer.d.ts +91 -51
  61. package/dist/types/renderers/webglrenderer/node-animation-fragment.d.ts +2 -2
  62. package/dist/types/renderers/webglrenderer/node-animation-vertex.d.ts +2 -2
  63. package/dist/types/renderers/webglrenderer/node-fragment-point.d.ts +2 -2
  64. package/dist/types/renderers/webglrenderer/node-vertex-point.d.ts +2 -2
  65. package/dist/types/renderers/webglrenderer/rel-fragment-line.d.ts +2 -2
  66. package/dist/types/renderers/webglrenderer/rel-glsl-utils.d.ts +1 -0
  67. package/dist/types/renderers/webglrenderer/rel-vertex-arrow.d.ts +2 -0
  68. package/dist/types/renderers/webglrenderer/rel-vertex-line.d.ts +2 -2
  69. package/dist/types/renderers/webglrenderer/viewport-box-fragment.d.ts +2 -2
  70. package/dist/types/renderers/webglrenderer/viewport-box-vertex.d.ts +2 -2
  71. package/dist/types/types/graph-element.d.ts +109 -101
  72. package/dist/types/types/nvl-window-functions.d.ts +12 -13
  73. package/dist/types/types/utils.d.ts +1 -1
  74. package/dist/types/utils/ariaUtils.d.ts +2 -2
  75. package/dist/types/utils/canvasManagement.d.ts +8 -2
  76. package/dist/types/utils/circularUtils.d.ts +2 -2
  77. package/dist/types/utils/clusterGeometry.d.ts +14 -0
  78. package/dist/types/utils/clusterHitRegions.d.ts +42 -0
  79. package/dist/types/utils/colorUtils.d.ts +2 -2
  80. package/dist/types/utils/constants.d.ts +12 -6
  81. package/dist/types/utils/errors.d.ts +6 -6
  82. package/dist/types/utils/geometry.d.ts +91 -48
  83. package/dist/types/utils/graphObjectUtils.d.ts +9 -9
  84. package/dist/types/utils/hitTest.d.ts +84 -0
  85. package/dist/types/utils/jsDriverResultTransformer.d.ts +27 -25
  86. package/dist/types/utils/layoutSeeding.d.ts +7 -0
  87. package/dist/types/utils/mouseUtils.d.ts +5 -5
  88. package/dist/types/utils/segmentAnalytics.d.ts +42 -42
  89. package/dist/types/utils/webWorkerUtils.d.ts +2 -2
  90. package/dist/types/utils/zoomFunctions.d.ts +24 -16
  91. package/package.json +15 -15
  92. package/skills/neo4j-nvl-skill/README.md +39 -0
  93. package/skills/neo4j-nvl-skill/SKILL.md +296 -0
  94. package/skills/neo4j-nvl-skill/references/api/base/classes/NVL.md +977 -0
  95. package/skills/neo4j-nvl-skill/references/api/base/functions/getZoomTargetForNodePositions.md +37 -0
  96. package/skills/neo4j-nvl-skill/references/api/base/index.md +71 -0
  97. package/skills/neo4j-nvl-skill/references/api/base/interfaces/CircularOptions.md +11 -0
  98. package/skills/neo4j-nvl-skill/references/api/base/interfaces/ClusteringOptions.md +14 -0
  99. package/skills/neo4j-nvl-skill/references/api/base/interfaces/ExternalCallbacks.md +18 -0
  100. package/skills/neo4j-nvl-skill/references/api/base/interfaces/ForceDirectedOptions.md +12 -0
  101. package/skills/neo4j-nvl-skill/references/api/base/interfaces/HierarchicalOptions.md +13 -0
  102. package/skills/neo4j-nvl-skill/references/api/base/interfaces/HitTargetCluster.md +13 -0
  103. package/skills/neo4j-nvl-skill/references/api/base/interfaces/HitTargetNode.md +16 -0
  104. package/skills/neo4j-nvl-skill/references/api/base/interfaces/HitTargetRelationship.md +15 -0
  105. package/skills/neo4j-nvl-skill/references/api/base/interfaces/Node.md +32 -0
  106. package/skills/neo4j-nvl-skill/references/api/base/interfaces/NvlMouseEvent.md +16 -0
  107. package/skills/neo4j-nvl-skill/references/api/base/interfaces/NvlOptions.md +38 -0
  108. package/skills/neo4j-nvl-skill/references/api/base/interfaces/Point.md +12 -0
  109. package/skills/neo4j-nvl-skill/references/api/base/interfaces/Relationship.md +32 -0
  110. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/CanvasRendererType.md +14 -0
  111. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/Cluster.md +20 -0
  112. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/ClusterByFn.md +20 -0
  113. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/ClusterId.md +10 -0
  114. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/HitTargets.md +22 -0
  115. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/HitTestTarget.md +7 -0
  116. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/Layout.md +15 -0
  117. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/LayoutOptions.md +12 -0
  118. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/NodeWithClientPosition.md +18 -0
  119. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/PartialNode.md +17 -0
  120. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/PartialRelationship.md +17 -0
  121. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/Renderer.md +9 -0
  122. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/StyledCaption.md +21 -0
  123. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/WebGLRendererType.md +14 -0
  124. package/skills/neo4j-nvl-skill/references/api/base/type-aliases/ZoomOptions.md +25 -0
  125. package/skills/neo4j-nvl-skill/references/api/base/variables/CircularLayoutType.md +11 -0
  126. package/skills/neo4j-nvl-skill/references/api/base/variables/ForceDirectedLayoutType.md +9 -0
  127. package/skills/neo4j-nvl-skill/references/api/base/variables/FreeLayoutType.md +9 -0
  128. package/skills/neo4j-nvl-skill/references/api/base/variables/GridLayoutType.md +9 -0
  129. package/skills/neo4j-nvl-skill/references/api/base/variables/HierarchicalLayoutType.md +9 -0
  130. package/skills/neo4j-nvl-skill/references/api/base/variables/d3ForceLayoutType.md +9 -0
  131. package/skills/neo4j-nvl-skill/references/api/base/variables/nvlResultTransformer.md +38 -0
  132. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/classes/BoxSelectInteraction.md +163 -0
  133. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/classes/ClickInteraction.md +163 -0
  134. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/classes/DragNodeInteraction.md +164 -0
  135. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/classes/HoverInteraction.md +160 -0
  136. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/classes/KeyboardInteraction.md +185 -0
  137. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/classes/LassoInteraction.md +163 -0
  138. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/classes/PanInteraction.md +196 -0
  139. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/classes/ZoomInteraction.md +164 -0
  140. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/index.md +37 -0
  141. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/BoxSelectInteractionCallbacks.md +19 -0
  142. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/BoxSelectInteractionOptions.md +17 -0
  143. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/ClickInteractionCallbacks.md +39 -0
  144. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/ClickInteractionOptions.md +17 -0
  145. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/DragNodeInteractionCallbacks.md +21 -0
  146. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/DrawInteractionOptions.md +22 -0
  147. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/HoverInteractionCallbacks.md +17 -0
  148. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/HoverInteractionOptions.md +17 -0
  149. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/KeyboardInteractionCallbacks.md +35 -0
  150. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/KeyboardInteractionOptions.md +55 -0
  151. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/LassoInteractionCallbacks.md +19 -0
  152. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/LassoInteractionOptions.md +17 -0
  153. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/PanInteractionCallbacks.md +17 -0
  154. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/PanInteractionOptions.md +19 -0
  155. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/ZoomInteractionCallbacks.md +17 -0
  156. package/skills/neo4j-nvl-skill/references/api/interaction-handlers/type-aliases/ZoomInteractionOptions.md +17 -0
  157. package/skills/neo4j-nvl-skill/references/api/react/functions/StaticPictureWrapper.md +35 -0
  158. package/skills/neo4j-nvl-skill/references/api/react/index.md +34 -0
  159. package/skills/neo4j-nvl-skill/references/api/react/interfaces/BasicReactWrapperProps.md +24 -0
  160. package/skills/neo4j-nvl-skill/references/api/react/interfaces/InteractiveNvlWrapperProps.md +27 -0
  161. package/skills/neo4j-nvl-skill/references/api/react/type-aliases/InteractionOptions.md +10 -0
  162. package/skills/neo4j-nvl-skill/references/api/react/type-aliases/KeyboardEvent.md +7 -0
  163. package/skills/neo4j-nvl-skill/references/api/react/type-aliases/KeyboardEventCallbacks.md +10 -0
  164. package/skills/neo4j-nvl-skill/references/api/react/type-aliases/MouseEvent.md +10 -0
  165. package/skills/neo4j-nvl-skill/references/api/react/type-aliases/MouseEventCallbacks.md +10 -0
  166. package/skills/neo4j-nvl-skill/references/api/react/type-aliases/StaticPictureWrapperProps.md +27 -0
  167. package/skills/neo4j-nvl-skill/references/api/react/variables/BasicNvlWrapper.md +50 -0
  168. package/skills/neo4j-nvl-skill/references/api/react/variables/InteractiveNvlWrapper.md +17 -0
  169. package/skills/neo4j-nvl-skill/references/clustering.md +87 -0
  170. package/skills/neo4j-nvl-skill/references/data-from-neo4j.md +67 -0
  171. package/skills/neo4j-nvl-skill/references/labels-and-overlays.md +76 -0
  172. package/skills/neo4j-nvl-skill/references/layouts-and-positions.md +65 -0
  173. package/skills/neo4j-nvl-skill/references/lifecycle-and-updates.md +65 -0
  174. package/skills/neo4j-nvl-skill/references/migrating-1x-to-2.md +50 -0
  175. package/skills/neo4j-nvl-skill/references/react-wrappers.md +88 -0
  176. package/skills/neo4j-nvl-skill/references/verifying-nvl-apps.md +52 -0
  177. package/skills/neo4j-nvl-skill/references/vite-and-bundlers.md +62 -0
  178. package/dist/base.mjs.LICENSE.txt +0 -21
  179. package/dist/types/layouts/animatedlayout/AnimatedLayout.test.d.ts +0 -1
  180. package/dist/types/layouts/animatedlayout/animationUtils.test.d.ts +0 -1
  181. package/dist/types/layouts/d3forcelayout/__mocks__/d3ForceLayout.d.ts +0 -10
  182. package/dist/types/layouts/d3forcelayout/circularLayout.test.d.ts +0 -1
  183. package/dist/types/layouts/d3forcelayout/d3ForceLayout.test.d.ts +0 -1
  184. package/dist/types/layouts/forcedirectedlayout/ForceCytoLayout.d.ts +0 -22
  185. package/dist/types/layouts/forcedirectedlayout/cosebilkentlayout/CoseBilkentLayout.d.ts +0 -33
  186. package/dist/types/layouts/forcedirectedlayout/physlayout/PhysLayout.d.ts +0 -174
  187. package/dist/types/layouts/forcedirectedlayout/physlayout/PhysLayout.test.d.ts +0 -1
  188. package/dist/types/layouts/forcedirectedlayout/physlayout/glwrapper.d.ts +0 -4
  189. package/dist/types/layouts/forcedirectedlayout/physlayout/shaders/multilevel-fragment.d.ts +0 -2
  190. package/dist/types/layouts/forcedirectedlayout/physlayout/shaders/multilevel-repulsive-fragment.d.ts +0 -2
  191. package/dist/types/layouts/forcedirectedlayout/physlayout/shaders/multilevel-update-fragment.d.ts +0 -2
  192. package/dist/types/layouts/forcedirectedlayout/physlayout/shaders/sim-vertex.d.ts +0 -2
  193. package/dist/types/layouts/forcedirectedlayout/physlayout/shaders/workaround-fragment.d.ts +0 -2
  194. package/dist/types/layouts/forcedirectedlayout/physlayout/solarmerger/SolarMerger.bench.d.ts +0 -1
  195. package/dist/types/layouts/forcedirectedlayout/physlayout/solarmerger/SolarMerger.d.ts +0 -21
  196. package/dist/types/layouts/forcedirectedlayout/physlayout/solarmerger/SolarMerger.test.d.ts +0 -1
  197. package/dist/types/layouts/forcedirectedlayout/physlayout/solarmerger/solar-placer.d.ts +0 -2
  198. package/dist/types/layouts/forcedirectedlayout/physlayout/solarmerger/solar-placer.test.d.ts +0 -1
  199. package/dist/types/layouts/forcedirectedlayout/physlayout/solarmerger/types.d.ts +0 -49
  200. package/dist/types/modules/NvlController.test.d.ts +0 -1
  201. package/dist/types/modules/ZoomTransitionHandler.test.d.ts +0 -1
  202. package/dist/types/modules/dataset.test.d.ts +0 -1
  203. package/dist/types/modules/state/state.test.d.ts +0 -1
  204. package/dist/types/modules/state/utils.test.d.ts +0 -1
  205. package/dist/types/renderers/domrenderer/BaseRenderer.test.d.ts +0 -1
  206. package/dist/types/renderers/domrenderer/canvasrenderer/Animation.test.d.ts +0 -1
  207. package/dist/types/renderers/domrenderer/canvasrenderer/CanvasRenderer.test.d.ts +0 -1
  208. package/dist/types/renderers/domrenderer/canvasrenderer/arrowDrawing.test.d.ts +0 -1
  209. package/dist/types/renderers/domrenderer/canvasrenderer/nodeDrawing.test.d.ts +0 -1
  210. package/dist/types/renderers/domrenderer/shared/ImageCache.test.d.ts +0 -1
  211. package/dist/types/renderers/domrenderer/shared/arrows/ArrowBundle.test.d.ts +0 -1
  212. package/dist/types/renderers/domrenderer/shared/arrows/ArrowBundler.test.d.ts +0 -1
  213. package/dist/types/renderers/domrenderer/shared/arrows/arrows.test.d.ts +0 -1
  214. package/dist/types/renderers/domrenderer/shared/nodes/nodes.test.d.ts +0 -1
  215. package/dist/types/renderers/domrenderer/shared/util.test.d.ts +0 -1
  216. package/dist/types/renderers/domrenderer/shared/wordwrap.test.d.ts +0 -1
  217. package/dist/types/renderers/domrenderer/svgrenderer/SvgRenderer.test.d.ts +0 -1
  218. package/dist/types/renderers/domrenderer/svgrenderer/arrowDrawing.test.d.ts +0 -1
  219. package/dist/types/renderers/domrenderer/svgrenderer/nodeDrawing.test.d.ts +0 -1
  220. package/dist/types/renderers/domrenderer/svgrenderer/svgUtils.test.d.ts +0 -1
  221. package/dist/types/renderers/webglrenderer/Controller.test.d.ts +0 -1
  222. package/dist/types/renderers/webglrenderer/Renderer.test.d.ts +0 -1
  223. package/dist/types/utils/ariaUtils.test.d.ts +0 -1
  224. package/dist/types/utils/canvasManagement.test.d.ts +0 -1
  225. package/dist/types/utils/circularUtils.test.d.ts +0 -1
  226. package/dist/types/utils/colorUtils.test.d.ts +0 -1
  227. package/dist/types/utils/errors.test.d.ts +0 -1
  228. package/dist/types/utils/geometry.test.d.ts +0 -1
  229. package/dist/types/utils/graphObjectUtils.test.d.ts +0 -1
  230. package/dist/types/utils/hittest.d.ts +0 -58
  231. package/dist/types/utils/hittest.test.d.ts +0 -1
  232. package/dist/types/utils/jsDriverResultTransformer.test.d.ts +0 -1
  233. package/dist/types/utils/mouseUtils.test.d.ts +0 -1
  234. package/dist/types/utils/webWorkerUtils.test.d.ts +0 -1
  235. package/dist/types/utils/zoomFunctions.test.d.ts +0 -1
@@ -0,0 +1,37 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Function: getZoomTargetForNodePositions()
4
+
5
+ ```ts
6
+ function getZoomTargetForNodePositions(
7
+ nodePositions,
8
+ containerWidth,
9
+ containerHeight,
10
+ maxNodeRadius?
11
+ ): {
12
+ panX: number;
13
+ panY: number;
14
+ zoom: number;
15
+ };
16
+ ```
17
+
18
+ Gets the zoom target to fit the given node positions into the scene.
19
+
20
+ ## Parameters
21
+
22
+ | Parameter | Type | Description |
23
+ | ------ | ------ | ------ |
24
+ | `nodePositions` | [`Point`](../interfaces/Point.md)[] | The node positions. |
25
+ | `containerWidth` | `number` | The width of the container NVL is displayed in. |
26
+ | `containerHeight` | `number` | The height of the container NVL is displayed in. |
27
+ | `maxNodeRadius` | `number` | The maximum node radius, which is added as margin to the scene (defaults to 2 * DefaultNodeSize). |
28
+
29
+ ## Returns
30
+
31
+ The zoom and pan targets.
32
+
33
+ | Name | Type | Description |
34
+ | ------ | ------ | ------ |
35
+ | `panX` | `number` | The x-coordinate of the pan. |
36
+ | `panY` | `number` | The y-coordinate of the pan. |
37
+ | `zoom` | `number` | The zoom level. |
@@ -0,0 +1,71 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # @neo4j-nvl/base
4
+
5
+ ## Classes
6
+
7
+ | Class | Description |
8
+ | ------ | ------ |
9
+ | [NVL](classes/NVL.md) | Class for a NVL instance. |
10
+
11
+ ## Interfaces
12
+
13
+ | Interface | Description |
14
+ | ------ | ------ |
15
+ | [CircularOptions](interfaces/CircularOptions.md) | The options for the circular layout. |
16
+ | [ClusteringOptions](interfaces/ClusteringOptions.md) | Options that control physical clustering and cluster decorations for the force-directed layout. |
17
+ | [ExternalCallbacks](interfaces/ExternalCallbacks.md) | An object specifying the required callback functions for certain actions |
18
+ | [ForceDirectedOptions](interfaces/ForceDirectedOptions.md) | The options for the force directed layout |
19
+ | [HierarchicalOptions](interfaces/HierarchicalOptions.md) | The options for the hierarchical layout |
20
+ | [HitTargetCluster](interfaces/HitTargetCluster.md) | A [ClusteringOptions.clusterBy](interfaces/ClusteringOptions.md#clusterby) cluster hull that has been hit by a pointer event |
21
+ | [HitTargetNode](interfaces/HitTargetNode.md) | A node that has been hit by a pointer event |
22
+ | [HitTargetRelationship](interfaces/HitTargetRelationship.md) | A relationship that has been hit by a pointer event |
23
+ | [Node](interfaces/Node.md) | A node inside the graph visualization. |
24
+ | [NvlMouseEvent](interfaces/NvlMouseEvent.md) | Extends the MouseEvent interface with the [HitTargets](type-aliases/HitTargets.md) property. The result of a [NVL.getHits](classes/NVL.md#gethits) call. |
25
+ | [NvlOptions](interfaces/NvlOptions.md) | Configurations for a NVL instance |
26
+ | [Point](interfaces/Point.md) | An object representing a point in 2D space. |
27
+ | [Relationship](interfaces/Relationship.md) | A relationship inside the graph visualization. |
28
+
29
+ ## Type Aliases
30
+
31
+ | Type Alias | Description |
32
+ | ------ | ------ |
33
+ | [CanvasRendererType](type-aliases/CanvasRendererType.md) | A renderer using canvas. |
34
+ | [Cluster](type-aliases/Cluster.md) | A physical cluster produced by [ClusteringOptions.clusterBy](interfaces/ClusteringOptions.md#clusterby). Not a graph element — used for hit-testing and interaction callbacks. |
35
+ | [ClusterByFn](type-aliases/ClusterByFn.md) | Function that maps a node id to a [ClusterId](type-aliases/ClusterId.md) for force-directed clustering. Returns `undefined` for nodes that should remain independent. |
36
+ | [ClusterId](type-aliases/ClusterId.md) | Identifier returned by [ClusterByFn](type-aliases/ClusterByFn.md) to group nodes into physical clusters. Nodes sharing the same string or number are clustered together. |
37
+ | [HitTargets](type-aliases/HitTargets.md) | A collection of nodes, relationships and clusters that have been hit by a pointer event Part of the result of a [NVL](classes/NVL.md).[NVL.getHits](classes/NVL.md#gethits) call |
38
+ | [HitTestTarget](type-aliases/HitTestTarget.md) | - |
39
+ | [Layout](type-aliases/Layout.md) | The different types of layouts available |
40
+ | [LayoutOptions](type-aliases/LayoutOptions.md) | The options for the layout. |
41
+ | [NodeWithClientPosition](type-aliases/NodeWithClientPosition.md) | A node returned by [NVL.getNodes](classes/NVL.md#getnodes) with layout coordinates and screen position. `x` and `y` are canvas/layout space; `clientPosition` is relative to the canvas element. |
42
+ | [PartialNode](type-aliases/PartialNode.md) | A node with only a subset of its properties. |
43
+ | [PartialRelationship](type-aliases/PartialRelationship.md) | A relationship with only a subset of its properties. |
44
+ | [Renderer](type-aliases/Renderer.md) | The different types of renderers available |
45
+ | [StyledCaption](type-aliases/StyledCaption.md) | The caption text and its text style. |
46
+ | [WebGLRendererType](type-aliases/WebGLRendererType.md) | A WebGL2 renderer that uses the GPU for rendering. |
47
+ | [ZoomOptions](type-aliases/ZoomOptions.md) | Options that influence how fit-to-zoom should behave |
48
+
49
+ ## Variables
50
+
51
+ | Variable | Description |
52
+ | ------ | ------ |
53
+ | [CircularLayoutType](variables/CircularLayoutType.md) | A basic circular layout. |
54
+ | [d3ForceLayoutType](variables/d3ForceLayoutType.md) | The commonly used d3-force layout. |
55
+ | [ForceDirectedLayoutType](variables/ForceDirectedLayoutType.md) | NVL's main force directed layout. |
56
+ | [FreeLayoutType](variables/FreeLayoutType.md) | A free layout that allows for arbitrary positioning of elements using NVL's setPosition method. |
57
+ | [GridLayoutType](variables/GridLayoutType.md) | A basic grid layout. |
58
+ | [HierarchicalLayoutType](variables/HierarchicalLayoutType.md) | A hierarchical layout using the dagre algorithm. |
59
+ | [nvlResultTransformer](variables/nvlResultTransformer.md) | Result transformer for the Neo4j JavaScript driver results to NVL graph elements. |
60
+
61
+ ## Functions
62
+
63
+ | Function | Description |
64
+ | ------ | ------ |
65
+ | [getZoomTargetForNodePositions](functions/getZoomTargetForNodePositions.md) | Gets the zoom target to fit the given node positions into the scene. |
66
+
67
+ ## References
68
+
69
+ ### default
70
+
71
+ Renames and re-exports [NVL](classes/NVL.md)
@@ -0,0 +1,11 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Interface: CircularOptions
4
+
5
+ The options for the circular layout.
6
+
7
+ ## Properties
8
+
9
+ | Property | Type | Description |
10
+ | ------ | ------ | ------ |
11
+ | `sortFunction?` | (`nodes`) => [`Node`](Node.md)[] | Function which should return the sorted nodes. |
@@ -0,0 +1,14 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Interface: ClusteringOptions
4
+
5
+ Options that control physical clustering and cluster decorations for the force-directed layout.
6
+
7
+ ## Properties
8
+
9
+ | Property | Type | Default value | Description |
10
+ | ------ | ------ | ------ | ------ |
11
+ | `clusterBy?` | [`ClusterByFn`](../type-aliases/ClusterByFn.md) | `undefined` | Optional function to group nodes into physical clusters based on a custom identifier. Nodes returning the same string or number will be grouped together in the layout. Nodes returning undefined will be treated as independent. **Remarks** Ensure this function has a stable reference to avoid evaluation on every render. |
12
+ | `crossClusterRelationshipMultiplier?` | `number` | `0 @experimental` | **`Experimental`** Spring force multiplier for relationships that cross a [ClusteringOptions.clusterBy](#clusterby) cluster boundary. Capped between `0` and `1`. `0` disables cross-cluster spring pull. `1` is full strength. Intra-cluster edges are always full strength. Only applies when [ClusteringOptions.clusterBy](#clusterby) is set. **Remarks** Can cause unstable layouts when set to close to `1` in highly connected graphs. |
13
+ | `drawHalo?` | `boolean` | `false` | Fills a soft glowing halo around each cluster. **Remarks** Halo color is the same as the nodes in the cluster. If the nodes in the cluster have different colors, the halo won't be shown. |
14
+ | `drawOutline?` | `boolean` | `false` | Draws a convex-hull outline around each cluster. **Remarks** Outline color is the same as the nodes in the cluster. If the nodes in the cluster have different colors, the outline uses `NvlOptions.styling.overlayLineColor`. |
@@ -0,0 +1,18 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Interface: ExternalCallbacks
4
+
5
+ An object specifying the required callback functions for certain actions
6
+
7
+ ## Properties
8
+
9
+ | Property | Type | Description |
10
+ | ------ | ------ | ------ |
11
+ | `onError?` | (`error`) => `void` | Triggered when NVL throws an error after initialization. |
12
+ | `onInitialization?` | () => `void` | Triggered when NVL is initialized. |
13
+ | `onLayoutComputing?` | (`isComputing`) => `void` | Triggered when a asynchronous layout calculation starts/stops. |
14
+ | `onLayoutDone?` | () => `void` | Triggered when a layout is done moving. |
15
+ | `onLayoutStep?` | (`p`) => `void` | Triggered on each step of a layout. |
16
+ | `onWebGLContextLost?` | (`webGLContextEvent`) => `void` | Triggered when the WebGL context is lost. [https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/webglcontextlost\_event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/webglcontextlost_event) |
17
+ | `onZoomTransitionDone?` | () => `void` | Triggered when a zoom transition (e.g. [NVL.fit](../classes/NVL.md#fit) or [NVL.resetZoom](../classes/NVL.md#resetzoom)) function is done. |
18
+ | `restart?` | () => `void` | Triggered when NVL is restarted. |
@@ -0,0 +1,12 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Interface: ForceDirectedOptions
4
+
5
+ The options for the force directed layout
6
+
7
+ ## Properties
8
+
9
+ | Property | Type | Default value | Description |
10
+ | ------ | ------ | ------ | ------ |
11
+ | `clustering?` | [`ClusteringOptions`](ClusteringOptions.md) | `undefined` | Physical clustering and cluster decoration options. |
12
+ | `seedingMethod?` | `"box"` \| `"circle"` | `'box'` | How initial node positions are seeded before the physics simulation runs. |
@@ -0,0 +1,13 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Interface: HierarchicalOptions
4
+
5
+ The options for the hierarchical layout
6
+
7
+ ## Properties
8
+
9
+ | Property | Type | Description |
10
+ | ------ | ------ | ------ |
11
+ | `clusterBy?` | [`ClusterByFn`](../type-aliases/ClusterByFn.md) | **`Experimental`** Optional function to group nodes into semantic clusters based on a custom identifier. Nodes returning the same string or number will be grouped together in the layout via dagre compound subgraphs. Nodes returning undefined will be treated as independent. **Remarks** Ensure this function has a stable reference to avoid evaluation on every render. |
12
+ | `direction?` | `"up"` \| `"down"` \| `"left"` \| `"right"` | The direction in which the layout should be oriented |
13
+ | `packing?` | `"bin"` \| `"stack"` | The packing method to be used |
@@ -0,0 +1,13 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Interface: HitTargetCluster
4
+
5
+ A [ClusteringOptions.clusterBy](ClusteringOptions.md#clusterby) cluster hull that has been hit by a pointer event
6
+
7
+ ## Properties
8
+
9
+ | Property | Type | Description |
10
+ | ------ | ------ | ------ |
11
+ | `data` | [`Cluster`](../type-aliases/Cluster.md) | The cluster that was hit |
12
+ | `hull` | [`Point`](Point.md)[] | The convex hull used for the hit test |
13
+ | `pointerCoordinates` | [`Point`](Point.md) | The coordinates of the pointer event |
@@ -0,0 +1,16 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Interface: HitTargetNode
4
+
5
+ A node that has been hit by a pointer event
6
+
7
+ ## Properties
8
+
9
+ | Property | Type | Description |
10
+ | ------ | ------ | ------ |
11
+ | `data` | [`Node`](Node.md) | The node that was hit |
12
+ | `distance` | `number` | The distance between the node and the pointer event |
13
+ | `distanceVector` | [`Point`](Point.md) | The distance vector between the node and the pointer event |
14
+ | `insideNode` | `boolean` | Whether the pointer event is inside the node |
15
+ | `pointerCoordinates` | [`Point`](Point.md) | The coordinates of the pointer event |
16
+ | `targetCoordinates` | [`Point`](Point.md) | The coordinates of the node that was hit |
@@ -0,0 +1,15 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Interface: HitTargetRelationship
4
+
5
+ A relationship that has been hit by a pointer event
6
+
7
+ ## Properties
8
+
9
+ | Property | Type | Description |
10
+ | ------ | ------ | ------ |
11
+ | `data` | [`Relationship`](Relationship.md) | The relationship that was hit |
12
+ | `distance` | `number` | The distance between the relationship and the pointer event |
13
+ | `fromTargetCoordinates` | [`Point`](Point.md) | The coordinates of the source node of the relationship that was hit |
14
+ | `pointerCoordinates` | [`Point`](Point.md) | The coordinates of the pointer event |
15
+ | `toTargetCoordinates` | [`Point`](Point.md) | The coordinates of the target node of the relationship that was hit |
@@ -0,0 +1,32 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Interface: Node
4
+
5
+ A node inside the graph visualization.
6
+
7
+ ## Extends
8
+
9
+ - `GraphElement`
10
+
11
+ ## Properties
12
+
13
+ | Property | Modifier | Type | Description | Inherited from |
14
+ | ------ | ------ | ------ | ------ | ------ |
15
+ | `activated?` | `public` | `boolean` | Whether or not the current node is activated. | - |
16
+ | `caption?` | `public` | `string` | The text to display inside on node or relationship. @note: If both caption and captions are provided, captions takes precedence. @note: To provide multiple captions with custom styles, use the [captions](#captions) property. @note: Captions are only visible when using the 'canvas' renderer. | `GraphElement.caption` |
17
+ | `captionAlign?` | `public` | `"top"` \| `"bottom"` \| `"center"` | The caption align. Has no affect on self-referring relationships. | `GraphElement.captionAlign` |
18
+ | `captions?` | `public` | [`StyledCaption`](../type-aliases/StyledCaption.md)[] | The caption text and font styles. @note: To provide a single caption without custom styles, you can also use the [caption](#caption) property. @note: Captions are only visible when using the 'canvas' renderer. | `GraphElement.captions` |
19
+ | `captionSize?` | `public` | `number` | The caption text size. | `GraphElement.captionSize` |
20
+ | `color?` | `public` | `string` | The color of the graph element. | `GraphElement.color` |
21
+ | `disabled?` | `public` | `boolean` | Whether or not the current node or relationship is disabled. | `GraphElement.disabled` |
22
+ | `hovered?` | `public` | `boolean` | Whether or not the current node or relationship is hovered. | `GraphElement.hovered` |
23
+ | `html?` | `public` | `HTMLElement` | **`Experimental`** The DOM element to display on top of a node. | - |
24
+ | `icon?` | `public` | `string` | The url to an icon to display inside the node. Icons are expected to be black. If the node's background color is dark, the icon will be inverted to white. Icons are expected to be square. | - |
25
+ | `id` | `readonly` | `string` | The id of the current node or relationship. Ids need to be unique across all nodes and relationships. Ids need to be strings and cannot be empty. | `GraphElement.id` |
26
+ | `overlayIcon?` | `public` | \{ `position?`: `number`[]; `size?`: `number`; `url`: `string`; \} | An icon to be displayed anywhere on top of the graph element. Icons are expected to be square. | `GraphElement.overlayIcon` |
27
+ | `overlayIcon.position?` | `public` | `number`[] | The position of the icon relative to the node or relationship. The position is a percentage of the node or relationship size. `[1, 1]` is the bottom right corner of the node or relationship. `[-1, -1]` is the top left corner of the node or relationship. | - |
28
+ | `overlayIcon.size?` | `public` | `number` | The size of the icon relative to the node size or relationship caption size. The size is a percentage of the node size or relationship caption size. | - |
29
+ | `overlayIcon.url` | `public` | `string` | The url to the icon. | - |
30
+ | `pinned?` | `public` | `boolean` | Whether or not the current node is pinned. | - |
31
+ | `selected?` | `public` | `boolean` | Whether or not the current node or relationship is selected. | `GraphElement.selected` |
32
+ | `size?` | `public` | `number` | The size of the node. | - |
@@ -0,0 +1,16 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Interface: NvlMouseEvent
4
+
5
+ Extends the MouseEvent interface with the [HitTargets](../type-aliases/HitTargets.md) property.
6
+ The result of a [NVL.getHits](../classes/NVL.md#gethits) call.
7
+
8
+ ## Extends
9
+
10
+ - `MouseEvent`
11
+
12
+ ## Properties
13
+
14
+ | Property | Type | Description |
15
+ | ------ | ------ | ------ |
16
+ | `nvlTargets` | [`HitTargets`](../type-aliases/HitTargets.md) | The graph elements that have been hit by the pointer event. |
@@ -0,0 +1,38 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Interface: NvlOptions
4
+
5
+ Configurations for a NVL instance
6
+
7
+ ## Properties
8
+
9
+ | Property | Type | Default value | Description |
10
+ | ------ | ------ | ------ | ------ |
11
+ | `allowDynamicMinZoom?` | `boolean` | `true` | Whether or not to dynamically allow decreasing minimum zoom value if current graph does not fit on screen at minimum zoom. When set to `true`, zoom and fit operations will allow zooming out further than [minZoom](#minzoom) if the graph does not fit on screen. [minZoom](#minzoom) is lowered to the new zoom level, so later zoom operations can go that low too. When set to `false`, zoom and fit operations will stop at the minimum zoom value, even if the full graph does not fit on screen at that zoom level. |
12
+ | `callbacks?` | [`ExternalCallbacks`](ExternalCallbacks.md) | `undefined` | Callbacks for various events in the NVL instance. |
13
+ | `disableAria?` | `boolean` | `false` | Disables [ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) attributes on the graph. By default, NVL adds ARIA attributes to the graph container to make it more accessible. Attributes include `role="image"`, `aria-label="Graph visualization"` and `aria-describedby="nvl-${instanceId}-description"`. The description element is a live region that will announce changes to the graph. |
14
+ | `disableTelemetry?` | `boolean` | `false` | Disables tracking of library usage |
15
+ | `disableWebWorkers?` | `boolean` | `undefined` | Disables the use of [web workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers) for the layout calculations. |
16
+ | `initialZoom?` | `number` | `undefined` | Zoom value of the current viewport |
17
+ | `instanceId?` | `string` | `undefined` | Id for uniquely identifying the instance of Nvl |
18
+ | `layout?` | [`Layout`](../type-aliases/Layout.md) | `undefined` | The graph layout algorithm to be used |
19
+ | `layoutOptions?` | [`LayoutOptions`](../type-aliases/LayoutOptions.md) | `undefined` | Configuration for the current layout |
20
+ | `maxFps?` | `number` | `30` | Target maximum presentation fps while layout is active; extra time in the tick goes to layout stabilization. Budgets layout steps only. Actual fps may undershoot when rendering is expensive. **Remarks** Will be capped between 1 and 120. |
21
+ | `maxZoom?` | `number` | `10` | The maximum zoom level allowed |
22
+ | `minFps?` | `number` | `3` | Target minimum presentation fps while layout is active, at the cost of stabilization speed when set higher. Budgets layout steps only. Actual fps may undershoot when rendering is expensive. **Remarks** Will be capped between 1 and 120. |
23
+ | `minimapContainer?` | `HTMLElement` | `undefined` | The DOM container in which to render the minimap. **Remarks** When using a React ref, make sure the attached element is rendered before the NVL instance is created. Otherwise, the minimap will not be displayed. |
24
+ | `minZoom?` | `number` | `0.075` | The minimum zoom level allowed |
25
+ | `panX?` | `number` | `undefined` | X-coordinate for panning of the current viewport |
26
+ | `panY?` | `number` | `undefined` | Y-coordinate for panning of the current viewport |
27
+ | `renderer?` | `Renderer` | `'canvas'` | What rendering method to use for the visualization. WebGL renderer uses the GPU and has better performance. Captions are only displayed when using the canvas or svg renderer. |
28
+ | `styling?` | \{ `defaultNodeColor?`: `string`; `defaultRelationshipColor?`: `string`; `disabledItemColor?`: `string`; `disabledItemFontColor?`: `string`; `dropShadowColor?`: `string`; `minimapViewportBoxColor?`: `string`; `nodeDefaultBorderColor?`: `string`; `overlayLineColor?`: `string`; `selectedBorderColor?`: `string`; `selectedInnerBorderColor?`: `string`; \} | `undefined` | Styling options for the NVL instance. |
29
+ | `styling.defaultNodeColor?` | `string` | `undefined` | The default color for nodes. |
30
+ | `styling.defaultRelationshipColor?` | `string` | `undefined` | The default color for relationships. |
31
+ | `styling.disabledItemColor?` | `string` | `undefined` | The color to use for the disabled nodes and relationships |
32
+ | `styling.disabledItemFontColor?` | `string` | `undefined` | The color to use for the labels of the disabled nodes and relationships |
33
+ | `styling.dropShadowColor?` | `string` | `undefined` | The color to use for the drop shadow of selected/hovered nodes and relationships |
34
+ | `styling.minimapViewportBoxColor?` | `string` | `undefined` | The color to use for the viewport box in the minimap. **Deprecated** Use `overlayLineColor`. |
35
+ | `styling.nodeDefaultBorderColor?` | `string` | `undefined` | The color to use for the default border of nodes |
36
+ | `styling.overlayLineColor?` | `string` | `#1A1B1D` | Stroke color for overlay UI lines (e.g. minimap viewport box). Use a dark color on light backgrounds and a light color on dark backgrounds. |
37
+ | `styling.selectedBorderColor?` | `string` | `undefined` | The color to use for the selected border of nodes and relationships |
38
+ | `styling.selectedInnerBorderColor?` | `string` | `undefined` | The color to use for the selected inner border of nodes and relationships |
@@ -0,0 +1,12 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Interface: Point
4
+
5
+ An object representing a point in 2D space.
6
+
7
+ ## Properties
8
+
9
+ | Property | Type | Description |
10
+ | ------ | ------ | ------ |
11
+ | `x` | `number` | The x coordinate of the point. |
12
+ | `y` | `number` | The y coordinate of the point. |
@@ -0,0 +1,32 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Interface: Relationship
4
+
5
+ A relationship inside the graph visualization.
6
+
7
+ ## Extends
8
+
9
+ - `GraphElement`
10
+
11
+ ## Properties
12
+
13
+ | Property | Modifier | Type | Description | Inherited from |
14
+ | ------ | ------ | ------ | ------ | ------ |
15
+ | `caption?` | `public` | `string` | The text to display inside on node or relationship. @note: If both caption and captions are provided, captions takes precedence. @note: To provide multiple captions with custom styles, use the [captions](Node.md#captions) property. @note: Captions are only visible when using the 'canvas' renderer. | `GraphElement.caption` |
16
+ | `captionAlign?` | `public` | `"top"` \| `"bottom"` \| `"center"` | The caption align. Has no affect on self-referring relationships. | `GraphElement.captionAlign` |
17
+ | `captionHtml?` | `public` | `HTMLElement` | **`Experimental`** The DOM element to display on top of a relationship caption. The [captionSize](Node.md#captionsize) and [captionAlign](Node.md#captionalign) properties will affect the position and height of the html container element. | - |
18
+ | `captions?` | `public` | [`StyledCaption`](../type-aliases/StyledCaption.md)[] | The caption text and font styles. @note: To provide a single caption without custom styles, you can also use the [caption](Node.md#caption) property. @note: Captions are only visible when using the 'canvas' renderer. | `GraphElement.captions` |
19
+ | `captionSize?` | `public` | `number` | The caption text size. | `GraphElement.captionSize` |
20
+ | `color?` | `public` | `string` | The color of the graph element. | `GraphElement.color` |
21
+ | `disabled?` | `public` | `boolean` | Whether or not the current node or relationship is disabled. | `GraphElement.disabled` |
22
+ | `from` | `public` | `string` | Node id where the relationship starts from. | - |
23
+ | `hovered?` | `public` | `boolean` | Whether or not the current node or relationship is hovered. | `GraphElement.hovered` |
24
+ | `id` | `readonly` | `string` | The id of the current node or relationship. Ids need to be unique across all nodes and relationships. Ids need to be strings and cannot be empty. | `GraphElement.id` |
25
+ | `overlayIcon?` | `public` | \{ `position?`: `number`[]; `size?`: `number`; `url`: `string`; \} | An icon to be displayed anywhere on top of the graph element. Icons are expected to be square. | `GraphElement.overlayIcon` |
26
+ | `overlayIcon.position?` | `public` | `number`[] | The position of the icon relative to the node or relationship. The position is a percentage of the node or relationship size. `[1, 1]` is the bottom right corner of the node or relationship. `[-1, -1]` is the top left corner of the node or relationship. | - |
27
+ | `overlayIcon.size?` | `public` | `number` | The size of the icon relative to the node size or relationship caption size. The size is a percentage of the node size or relationship caption size. | - |
28
+ | `overlayIcon.url` | `public` | `string` | The url to the icon. | - |
29
+ | `selected?` | `public` | `boolean` | Whether or not the current node or relationship is selected. | `GraphElement.selected` |
30
+ | `to` | `public` | `string` | Node id where the relationship points to. | - |
31
+ | `type?` | `public` | `string` | The relationship type. | - |
32
+ | `width?` | `public` | `number` | The width of the relationship. | - |
@@ -0,0 +1,14 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: CanvasRendererType
4
+
5
+ ```ts
6
+ type CanvasRendererType = "canvas";
7
+ ```
8
+
9
+ A renderer using canvas.
10
+
11
+ ## Remarks
12
+
13
+ This renderer has lower performance than the WebGL renderer,
14
+ but supports captions.
@@ -0,0 +1,20 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: Cluster
4
+
5
+ ```ts
6
+ type Cluster = {
7
+ id: ClusterId;
8
+ nodeIds: string[];
9
+ };
10
+ ```
11
+
12
+ A physical cluster produced by [ClusteringOptions.clusterBy](../interfaces/ClusteringOptions.md#clusterby).
13
+ Not a graph element — used for hit-testing and interaction callbacks.
14
+
15
+ ## Properties
16
+
17
+ | Property | Type | Description |
18
+ | ------ | ------ | ------ |
19
+ | `id` | [`ClusterId`](ClusterId.md) | Semantic cluster id returned by [ClusterByFn](ClusterByFn.md). |
20
+ | `nodeIds` | `string`[] | Real member node ids belonging to this cluster (at least two). |
@@ -0,0 +1,20 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: ClusterByFn
4
+
5
+ ```ts
6
+ type ClusterByFn = (nodeId) => ClusterId | undefined;
7
+ ```
8
+
9
+ Function that maps a node id to a [ClusterId](ClusterId.md) for force-directed clustering.
10
+ Returns `undefined` for nodes that should remain independent.
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type |
15
+ | ------ | ------ |
16
+ | `nodeId` | `string` |
17
+
18
+ ## Returns
19
+
20
+ [`ClusterId`](ClusterId.md) \| `undefined`
@@ -0,0 +1,10 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: ClusterId
4
+
5
+ ```ts
6
+ type ClusterId = string | number;
7
+ ```
8
+
9
+ Identifier returned by [ClusterByFn](ClusterByFn.md) to group nodes into physical clusters.
10
+ Nodes sharing the same string or number are clustered together.
@@ -0,0 +1,22 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: HitTargets
4
+
5
+ ```ts
6
+ type HitTargets = {
7
+ clusters: HitTargetCluster[];
8
+ nodes: HitTargetNode[];
9
+ relationships: HitTargetRelationship[];
10
+ };
11
+ ```
12
+
13
+ A collection of nodes, relationships and clusters that have been hit by a pointer event
14
+ Part of the result of a [NVL](../classes/NVL.md).[NVL.getHits](../classes/NVL.md#gethits) call
15
+
16
+ ## Properties
17
+
18
+ | Property | Type | Description |
19
+ | ------ | ------ | ------ |
20
+ | `clusters` | [`HitTargetCluster`](../interfaces/HitTargetCluster.md)[] | The cluster hulls that have been hit by the pointer event. |
21
+ | `nodes` | [`HitTargetNode`](../interfaces/HitTargetNode.md)[] | The nodes that have been hit by the pointer event. |
22
+ | `relationships` | [`HitTargetRelationship`](../interfaces/HitTargetRelationship.md)[] | The relationships that have been hit by the pointer event. |
@@ -0,0 +1,7 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: HitTestTarget
4
+
5
+ ```ts
6
+ type HitTestTarget = "node" | "relationship" | "cluster";
7
+ ```
@@ -0,0 +1,15 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: Layout
4
+
5
+ ```ts
6
+ type Layout =
7
+ | typeof ForceDirectedLayoutType
8
+ | typeof HierarchicalLayoutType
9
+ | typeof GridLayoutType
10
+ | typeof FreeLayoutType
11
+ | typeof d3ForceLayoutType
12
+ | typeof CircularLayoutType;
13
+ ```
14
+
15
+ The different types of layouts available
@@ -0,0 +1,12 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: LayoutOptions
4
+
5
+ ```ts
6
+ type LayoutOptions =
7
+ | ForceDirectedOptions
8
+ | HierarchicalOptions
9
+ | CircularOptions;
10
+ ```
11
+
12
+ The options for the layout.
@@ -0,0 +1,18 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: NodeWithClientPosition
4
+
5
+ ```ts
6
+ type NodeWithClientPosition = Node & Point & {
7
+ clientPosition: Point;
8
+ };
9
+ ```
10
+
11
+ A node returned by [NVL.getNodes](../classes/NVL.md#getnodes) with layout coordinates and screen position.
12
+ `x` and `y` are canvas/layout space; `clientPosition` is relative to the canvas element.
13
+
14
+ ## Type Declaration
15
+
16
+ | Name | Type |
17
+ | ------ | ------ |
18
+ | `clientPosition` | [`Point`](../interfaces/Point.md) |
@@ -0,0 +1,17 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: PartialNode
4
+
5
+ ```ts
6
+ type PartialNode = Partial<Node> & {
7
+ id: string;
8
+ };
9
+ ```
10
+
11
+ A node with only a subset of its properties.
12
+
13
+ ## Type Declaration
14
+
15
+ | Name | Type | Description |
16
+ | ------ | ------ | ------ |
17
+ | `id` | `string` | The id of the node. |
@@ -0,0 +1,17 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: PartialRelationship
4
+
5
+ ```ts
6
+ type PartialRelationship = Partial<Relationship> & {
7
+ id: string;
8
+ };
9
+ ```
10
+
11
+ A relationship with only a subset of its properties.
12
+
13
+ ## Type Declaration
14
+
15
+ | Name | Type | Description |
16
+ | ------ | ------ | ------ |
17
+ | `id` | `string` | The id of the relationship. |
@@ -0,0 +1,9 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: Renderer
4
+
5
+ ```ts
6
+ type Renderer = Exclude<InternalRenderer, typeof SvgRendererType>;
7
+ ```
8
+
9
+ The different types of renderers available
@@ -0,0 +1,21 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: StyledCaption
4
+
5
+ ```ts
6
+ type StyledCaption = {
7
+ key?: string;
8
+ styles?: string[];
9
+ value?: string;
10
+ };
11
+ ```
12
+
13
+ The caption text and its text style.
14
+
15
+ ## Properties
16
+
17
+ | Property | Type | Description |
18
+ | ------ | ------ | ------ |
19
+ | `key?` | `string` | The identifier key for the caption. |
20
+ | `styles?` | `string`[] | The font styles as an array of style keywords, e.g. `['bold', 'italic']`. |
21
+ | `value?` | `string` | The text value for the caption. |
@@ -0,0 +1,14 @@
1
+ [//]: # (This file is auto-generated by scripts/docs/generate-skills.mjs, do not edit it manually)
2
+
3
+ # Type Alias: WebGLRendererType
4
+
5
+ ```ts
6
+ type WebGLRendererType = "webgl";
7
+ ```
8
+
9
+ A WebGL2 renderer that uses the GPU for rendering.
10
+
11
+ ## Remarks
12
+
13
+ This renderer has better performance than the canvas renderer,
14
+ but does not support captions.