@kortexya/nodus 0.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 (252) hide show
  1. package/LICENSE +37 -0
  2. package/README.md +60 -0
  3. package/__vite-plugin-wasm-helper-1Aiokjk5.js +24 -0
  4. package/assets/hypergraphWorker-DV0aFI3L.js +1 -0
  5. package/assets/layoutWorker-DwDJwbgr.js +285 -0
  6. package/assets/nodus_wasm-C0vDfO5K.js +1 -0
  7. package/chunk-DmhlhrBa.js +11 -0
  8. package/nodus.src.bundle.js +33577 -0
  9. package/nodus_render_wasm-Bs6hlsx-.js +2617 -0
  10. package/nodus_wasm-DKYQVSUZ.js +2789 -0
  11. package/package.json +61 -0
  12. package/types/Nodus.d.ts +100 -0
  13. package/types/algorithms/concentric/index.d.ts +29 -0
  14. package/types/algorithms/concentricFactory.d.ts +43 -0
  15. package/types/algorithms/force/Alea.d.ts +13 -0
  16. package/types/algorithms/force/BVH.d.ts +35 -0
  17. package/types/algorithms/force/LayoutData.d.ts +40 -0
  18. package/types/algorithms/force/Packing.d.ts +31 -0
  19. package/types/algorithms/force/Physics.d.ts +61 -0
  20. package/types/algorithms/force/SEC.d.ts +14 -0
  21. package/types/algorithms/force/Topology.d.ts +3 -0
  22. package/types/algorithms/force/index.d.ts +54 -0
  23. package/types/algorithms/force-gpu/ParticleSystem.d.ts +45 -0
  24. package/types/algorithms/force-gpu/Settings.d.ts +60 -0
  25. package/types/algorithms/force-gpu/Simulation.d.ts +7 -0
  26. package/types/algorithms/force-gpu/getGlContext.d.ts +10 -0
  27. package/types/algorithms/force-gpu/gpuLayout.d.ts +14 -0
  28. package/types/algorithms/force-gpu/index.d.ts +2 -0
  29. package/types/algorithms/force-gpu/kernels/index.d.ts +176 -0
  30. package/types/algorithms/force-gpu/kernels/utils.d.ts +31 -0
  31. package/types/algorithms/force-gpu/shaders/aabb.d.ts +2 -0
  32. package/types/algorithms/force-gpu/shaders/bhExpand.d.ts +2 -0
  33. package/types/algorithms/force-gpu/shaders/bhTranslate.d.ts +2 -0
  34. package/types/algorithms/force-gpu/shaders/cellLookup.d.ts +2 -0
  35. package/types/algorithms/force-gpu/shaders/index.d.ts +9 -0
  36. package/types/algorithms/force-gpu/shaders/integrate.d.ts +2 -0
  37. package/types/algorithms/force-gpu/shaders/morton.d.ts +2 -0
  38. package/types/algorithms/force-gpu/shaders/sortIntervals.d.ts +2 -0
  39. package/types/algorithms/force-gpu/shaders/sortKeys.d.ts +2 -0
  40. package/types/algorithms/force-gpu/shaders/types.d.ts +10 -0
  41. package/types/algorithms/force-gpu/webgl/helpers.d.ts +24 -0
  42. package/types/algorithms/force-gpu/webgl/index.d.ts +4 -0
  43. package/types/algorithms/force-gpu/webgl/program.d.ts +15 -0
  44. package/types/algorithms/forceFactory.d.ts +55 -0
  45. package/types/algorithms/forceLinkFactory.d.ts +40 -0
  46. package/types/algorithms/grid/index.d.ts +26 -0
  47. package/types/algorithms/gridFactory.d.ts +30 -0
  48. package/types/algorithms/hierarchical/index.d.ts +80 -0
  49. package/types/algorithms/hierarchical/sugiyama.d.ts +144 -0
  50. package/types/algorithms/hierarchicalFactory.d.ts +49 -0
  51. package/types/algorithms/index.d.ts +13 -0
  52. package/types/algorithms/radial/index.d.ts +33 -0
  53. package/types/algorithms/radialFactory.d.ts +54 -0
  54. package/types/algorithms/sequential/index.d.ts +37 -0
  55. package/types/algorithms/sequentialFactory.d.ts +37 -0
  56. package/types/core/Edge.d.ts +67 -0
  57. package/types/core/EdgeList.d.ts +86 -0
  58. package/types/core/Node.d.ts +89 -0
  59. package/types/core/NodeList.d.ts +105 -0
  60. package/types/core/Transformation.d.ts +108 -0
  61. package/types/core/enums.d.ts +16 -0
  62. package/types/geometry/BoundingBox.d.ts +41 -0
  63. package/types/geometry/index.d.ts +276 -0
  64. package/types/geometry/types.d.ts +27 -0
  65. package/types/hypergraph/Hypergraph.d.ts +74 -0
  66. package/types/hypergraph/KoenigGraph.d.ts +29 -0
  67. package/types/hypergraph/Simplifier.d.ts +39 -0
  68. package/types/hypergraph/Statistics.d.ts +55 -0
  69. package/types/hypergraph/forbidden/StrangledHyperedge.d.ts +12 -0
  70. package/types/hypergraph/forbidden/StrangledVertex.d.ts +16 -0
  71. package/types/hypergraph/forbidden/ThreeAdjacentCluster2.d.ts +10 -0
  72. package/types/hypergraph/forbidden/TwoAdjacentCluster3.d.ts +14 -0
  73. package/types/hypergraph/forbidden/index.d.ts +22 -0
  74. package/types/hypergraph/index.d.ts +21 -0
  75. package/types/hypergraph/layout/Adam.d.ts +12 -0
  76. package/types/hypergraph/layout/Energy.d.ts +55 -0
  77. package/types/hypergraph/layout/LBFGS.d.ts +32 -0
  78. package/types/hypergraph/layout/Optimizer.d.ts +60 -0
  79. package/types/hypergraph/layout/Reverser.d.ts +42 -0
  80. package/types/hypergraph/operations/AtomicOperation.d.ts +54 -0
  81. package/types/hypergraph/operations/HyperedgeMerger.d.ts +30 -0
  82. package/types/hypergraph/operations/HyperedgeRemoval.d.ts +27 -0
  83. package/types/hypergraph/operations/VertexMerger.d.ts +32 -0
  84. package/types/hypergraph/operations/VertexRemoval.d.ts +30 -0
  85. package/types/hypergraph/operations/index.d.ts +19 -0
  86. package/types/hypergraph/osfkb/adapter.d.ts +315 -0
  87. package/types/hypergraph/render/Interaction.d.ts +40 -0
  88. package/types/hypergraph/render/PolygonRenderer.d.ts +50 -0
  89. package/types/hypergraph/render/SVGPolygonRenderer.d.ts +7 -0
  90. package/types/hypergraph/types.d.ts +170 -0
  91. package/types/index.d.ts +21 -0
  92. package/types/internals/Algorithms.d.ts +68 -0
  93. package/types/internals/AlgorithmsPrimitives.d.ts +18 -0
  94. package/types/internals/Animations.d.ts +39 -0
  95. package/types/internals/AttributePathPrimitives.d.ts +2 -0
  96. package/types/internals/Brand.d.ts +22 -0
  97. package/types/internals/Camera.d.ts +115 -0
  98. package/types/internals/CameraInteractions.d.ts +15 -0
  99. package/types/internals/CameraInteractionsPrimitives.d.ts +18 -0
  100. package/types/internals/Captor.d.ts +56 -0
  101. package/types/internals/CaptorPrimitives.d.ts +9 -0
  102. package/types/internals/ClassModule.d.ts +42 -0
  103. package/types/internals/ConnectNodes.d.ts +23 -0
  104. package/types/internals/CurvatureManager.d.ts +14 -0
  105. package/types/internals/DataModule.d.ts +29 -0
  106. package/types/internals/Disabled.d.ts +27 -0
  107. package/types/internals/DomModule.d.ts +87 -0
  108. package/types/internals/DragModule.d.ts +14 -0
  109. package/types/internals/ElementSet.d.ts +17 -0
  110. package/types/internals/EventsModule.d.ts +41 -0
  111. package/types/internals/FlexArray.d.ts +54 -0
  112. package/types/internals/Geo.d.ts +127 -0
  113. package/types/internals/Graph.d.ts +109 -0
  114. package/types/internals/Graphics.d.ts +112 -0
  115. package/types/internals/GraphicsEngine.d.ts +96 -0
  116. package/types/internals/Hover.d.ts +32 -0
  117. package/types/internals/Hypergraph.d.ts +112 -0
  118. package/types/internals/IndexList.d.ts +28 -0
  119. package/types/internals/IndividualAttributes.d.ts +27 -0
  120. package/types/internals/Interactions.d.ts +45 -0
  121. package/types/internals/Keyboard.d.ts +25 -0
  122. package/types/internals/LabelManager.d.ts +56 -0
  123. package/types/internals/Lasso.d.ts +22 -0
  124. package/types/internals/Layers.d.ts +79 -0
  125. package/types/internals/LayersPrimitives.d.ts +5 -0
  126. package/types/internals/Layouts.d.ts +35 -0
  127. package/types/internals/LayoutsInternal.d.ts +37 -0
  128. package/types/internals/LayoutsPrimitives.d.ts +23 -0
  129. package/types/internals/Legend.d.ts +33 -0
  130. package/types/internals/LegendPrimitives.d.ts +3 -0
  131. package/types/internals/Locate.d.ts +43 -0
  132. package/types/internals/LocatePrimitives.d.ts +20 -0
  133. package/types/internals/MappingManager.d.ts +27 -0
  134. package/types/internals/MappingPrimitives.d.ts +29 -0
  135. package/types/internals/Module.d.ts +23 -0
  136. package/types/internals/Mouse.d.ts +42 -0
  137. package/types/internals/NodusModules.d.ts +99 -0
  138. package/types/internals/PositionModule.d.ts +10 -0
  139. package/types/internals/PulseModule.d.ts +29 -0
  140. package/types/internals/Quadtree.d.ts +100 -0
  141. package/types/internals/RectangleSelect.d.ts +18 -0
  142. package/types/internals/Resizing.d.ts +48 -0
  143. package/types/internals/Rewiring.d.ts +64 -0
  144. package/types/internals/SchemaWatchPrimitives.d.ts +75 -0
  145. package/types/internals/Selection.d.ts +52 -0
  146. package/types/internals/SelectionModule.d.ts +27 -0
  147. package/types/internals/Settings.d.ts +20 -0
  148. package/types/internals/Snapping.d.ts +54 -0
  149. package/types/internals/Spatial.d.ts +50 -0
  150. package/types/internals/SpatialPrimitives.d.ts +75 -0
  151. package/types/internals/Storage.d.ts +46 -0
  152. package/types/internals/StyleRulesModule.d.ts +21 -0
  153. package/types/internals/Synchronizer.d.ts +17 -0
  154. package/types/internals/Tooltip.d.ts +25 -0
  155. package/types/internals/TooltipPrimitives.d.ts +21 -0
  156. package/types/internals/Topology.d.ts +50 -0
  157. package/types/internals/Touch.d.ts +16 -0
  158. package/types/internals/Transformations.d.ts +36 -0
  159. package/types/internals/VirtualMouse.d.ts +52 -0
  160. package/types/internals/WasmHGrid.d.ts +25 -0
  161. package/types/internals/WatcherModule.d.ts +25 -0
  162. package/types/internals/Workers.d.ts +79 -0
  163. package/types/internals/algorithmExports.d.ts +333 -0
  164. package/types/internals/algorithmHelpers.d.ts +36 -0
  165. package/types/internals/attributes/AttributesManager.d.ts +216 -0
  166. package/types/internals/attributes/ElementAttributesManager.d.ts +119 -0
  167. package/types/internals/attributes/attributeHelpers.d.ts +70 -0
  168. package/types/internals/attributes/flexArrayFactories.d.ts +277 -0
  169. package/types/internals/easing.d.ts +15 -0
  170. package/types/internals/helpers.d.ts +79 -0
  171. package/types/internals/hypergraphWorker.d.ts +37 -0
  172. package/types/internals/hypergraphWorkerHost.d.ts +40 -0
  173. package/types/internals/labels/SpatialGrid.d.ts +29 -0
  174. package/types/internals/labels/fillEdgeTexts.d.ts +25 -0
  175. package/types/internals/labels/fillNodeTexts.d.ts +24 -0
  176. package/types/internals/labels/helpers.d.ts +180 -0
  177. package/types/internals/layoutWorker.d.ts +21 -0
  178. package/types/internals/rendering/BoundariesManager.d.ts +53 -0
  179. package/types/internals/rendering/Buffer2.d.ts +91 -0
  180. package/types/internals/rendering/BufferList.d.ts +86 -0
  181. package/types/internals/rendering/CpuRenderer.d.ts +128 -0
  182. package/types/internals/rendering/EasingManager.d.ts +40 -0
  183. package/types/internals/rendering/EdgeDrawer.d.ts +54 -0
  184. package/types/internals/rendering/ElementGroup.d.ts +66 -0
  185. package/types/internals/rendering/MemoryManager.d.ts +71 -0
  186. package/types/internals/rendering/NodeDrawer.d.ts +49 -0
  187. package/types/internals/rendering/PatternManager.d.ts +29 -0
  188. package/types/internals/rendering/RENDER_MAPPING.d.ts +5 -0
  189. package/types/internals/rendering/RendererBase.d.ts +127 -0
  190. package/types/internals/rendering/ShapeManager.d.ts +46 -0
  191. package/types/internals/rendering/TextManager.d.ts +112 -0
  192. package/types/internals/rendering/canvasHelpers.d.ts +5 -0
  193. package/types/internals/rendering/constants.d.ts +125 -0
  194. package/types/internals/rendering/curveHelpers.d.ts +96 -0
  195. package/types/internals/rendering/drawerHelpers.d.ts +32 -0
  196. package/types/internals/rendering/float16.d.ts +25 -0
  197. package/types/internals/rendering/hitDetection.d.ts +89 -0
  198. package/types/internals/rendering/loadGraph.d.ts +103 -0
  199. package/types/internals/rendering/objectInfo.d.ts +46 -0
  200. package/types/internals/rendering/packing.d.ts +46 -0
  201. package/types/internals/rendering/shapeHelpers.d.ts +26 -0
  202. package/types/internals/rendering/types.d.ts +143 -0
  203. package/types/internals/renderingBinaryPrimitives.d.ts +110 -0
  204. package/types/internals/utilsExports.d.ts +408 -0
  205. package/types/internals/wasmBackend.d.ts +38 -0
  206. package/types/internals/wasmColumns.d.ts +61 -0
  207. package/types/internals/wasmInit.d.ts +1 -0
  208. package/types/modules/APIModule.d.ts +8 -0
  209. package/types/modules/AlgorithmsAPI.d.ts +15 -0
  210. package/types/modules/BrandAPI.d.ts +6 -0
  211. package/types/modules/CaptorAPI.d.ts +9 -0
  212. package/types/modules/ClassesAPI.d.ts +9 -0
  213. package/types/modules/DebugAPI.d.ts +18 -0
  214. package/types/modules/DisabledAPI.d.ts +11 -0
  215. package/types/modules/DomAPI.d.ts +9 -0
  216. package/types/modules/EventsAPI.d.ts +16 -0
  217. package/types/modules/ExportAPI.d.ts +23 -0
  218. package/types/modules/GeneratorsAPI.d.ts +12 -0
  219. package/types/modules/GeoAPI.d.ts +20 -0
  220. package/types/modules/GraphAPI.d.ts +26 -0
  221. package/types/modules/GraphicsAPI.d.ts +8 -0
  222. package/types/modules/HypergraphAPI.d.ts +71 -0
  223. package/types/modules/KeyboardAPI.d.ts +6 -0
  224. package/types/modules/LayersAPI.d.ts +7 -0
  225. package/types/modules/LayoutsAPI.d.ts +25 -0
  226. package/types/modules/LegendAPI.d.ts +9 -0
  227. package/types/modules/MouseAPI.d.ts +16 -0
  228. package/types/modules/ParseAPI.d.ts +83 -0
  229. package/types/modules/RulesAPI.d.ts +7 -0
  230. package/types/modules/SchemaAPI.d.ts +9 -0
  231. package/types/modules/SelectionAPI.d.ts +12 -0
  232. package/types/modules/SettingsAPI.d.ts +9 -0
  233. package/types/modules/StylesAPI.d.ts +64 -0
  234. package/types/modules/ToolsAPI.d.ts +68 -0
  235. package/types/modules/TransformationsAPI.d.ts +30 -0
  236. package/types/modules/ViewAPI.d.ts +52 -0
  237. package/types/publicTypes.d.ts +56 -0
  238. package/types/renderers/CanvasRenderer.d.ts +86 -0
  239. package/types/renderers/Renderer.d.ts +13 -0
  240. package/types/renderers/SVGRenderer.d.ts +57 -0
  241. package/types/renderers/WasmGraphRenderer.d.ts +118 -0
  242. package/types/renderers/WasmRendererAdapter.d.ts +38 -0
  243. package/types/tools/ConnectNodesAPI.d.ts +42 -0
  244. package/types/tools/LassoAPI.d.ts +78 -0
  245. package/types/tools/RectangleSelectAPI.d.ts +51 -0
  246. package/types/tools/ResizingAPI.d.ts +62 -0
  247. package/types/tools/RewiringAPI.d.ts +78 -0
  248. package/types/tools/SnappingAPI.d.ts +71 -0
  249. package/types/tools/ToolsAPI.d.ts +46 -0
  250. package/types/tools/TooltipAPI.d.ts +141 -0
  251. package/types/transformations/TransformationsEngine.d.ts +602 -0
  252. package/types/utils/index.d.ts +6 -0
@@ -0,0 +1,110 @@
1
+ import { getCurrentTime, getPixelRatio, resizeElement } from './helpers';
2
+ export { getCurrentTime, getPixelRatio, resizeElement };
3
+ export declare const noop: () => void;
4
+ export declare function $warn(...args: any[]): void;
5
+ export declare function applyCursorStyle(el: any, style: any): void;
6
+ export declare function smartRequire(moduleName: string): any;
7
+ export declare class Map2 {
8
+ private _map;
9
+ reset(): void;
10
+ set(a: any, b: any, value: any): void;
11
+ get(a: any, b: any): any;
12
+ }
13
+ export declare function createDummyDomElement(): any;
14
+ export declare function setElementSize(el: any, width: string, height: string): void;
15
+ export declare function nextPowerOfTwo(value: number): number;
16
+ export declare function parseColor(value: any): number[] | null;
17
+ export declare function createCanvas(width?: number, height?: number): HTMLCanvasElement;
18
+ export declare function getWebglContext(canvas: HTMLCanvasElement, options: any, contextType: string): any;
19
+ export declare const WEBGL_AVAILABLE: boolean;
20
+ export declare const GL_OPTIONS: {
21
+ stencil: boolean;
22
+ antialias: boolean;
23
+ alpha: boolean;
24
+ premultipliedAlpha: boolean;
25
+ failIfMajorPerformanceCaveat: boolean;
26
+ };
27
+ export declare const SHAPE_TEXTURES_GL_START_UNIT = 0;
28
+ export declare const PATTERN_TEXTURES_GL_START_UNIT = 1;
29
+ export declare const CODE_TO_MESSAGE: Record<string, string>;
30
+ export declare class ImageManager {
31
+ private _images;
32
+ private _crossOrigin;
33
+ private _whenReady;
34
+ private _onFetch;
35
+ private _nbLoaded;
36
+ private _nbToLoad;
37
+ setImgCrossOrigin(value: any): void;
38
+ clear(): void;
39
+ getImage(src: string): any;
40
+ private _onImgLoad;
41
+ onFetch(callback: (src: string) => void): void;
42
+ whenReady(): Promise<void>;
43
+ destroy(): void;
44
+ }
45
+ export declare class FontManager {
46
+ private _fontFaceSet;
47
+ private _fonts;
48
+ private _onFontLoaded;
49
+ private _hideUntilFontsLoaded;
50
+ setHideUntilFontsLoaded(value: boolean): void;
51
+ getFont(fontName: string): string | null;
52
+ onFontLoaded(callback: (fontName: string) => void): void;
53
+ destroy(): void;
54
+ private _triggerFontLoaded;
55
+ }
56
+ export declare function getRTLProcessors(): {
57
+ processBidirectionalText: (text: any) => any;
58
+ applyArabicShaping: (text: any) => any;
59
+ };
60
+ export declare function computeMaxSize(graph: any): number;
61
+ export declare function formatRendererName(type: any): string;
62
+ export declare function formatOptions(value: any): {
63
+ duration: number;
64
+ easing: any;
65
+ chain: boolean;
66
+ };
67
+ export declare function setAllVisible(graph: any): any;
68
+ export declare function restoreVisibility({ nodes, edges }: any): void;
69
+ export declare function isNodeBuffer(buffer: any): boolean;
70
+ export declare function isTextBuffer(buffer: any): boolean;
71
+ declare class EasingManager {
72
+ private _linearEasing;
73
+ private _nameToPolygon;
74
+ private _polygonToName;
75
+ constructor();
76
+ add(polygons: Record<string, number[]>): void;
77
+ getCoefficients(name: string): number[];
78
+ getName(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): string;
79
+ }
80
+ export declare const easingManager: EasingManager;
81
+ export declare const DEFAULT_IMG_CROSS_ORIGIN = "anonymous";
82
+ export declare const DEFAULT_BACKGROUND_COLOR = "white";
83
+ export declare const DEFAULT_CURSOR_STYLE = "default";
84
+ export declare const GRAPHICS_ENGINE_BASE_PARAMETERS: {
85
+ maxBlockId: number;
86
+ maxCoord: number;
87
+ maxScaledSize: number;
88
+ maxPixelSize: number;
89
+ maxMinVisibleSize: number;
90
+ maxDashOffset: number;
91
+ maxDashLength: number;
92
+ maxGapLength: number;
93
+ maxSymbolicSize: number;
94
+ maxPatternScale: number;
95
+ };
96
+ export declare const DEFAULT_RENDERER: string | null;
97
+ export declare const DEFAULT_CORNER_RADIUS = 5;
98
+ export declare const DEFAULT_EDGE_ARROW_SIZE_RATIO = 3;
99
+ export declare const MIN_EDGE_TIP_SIZE = 3;
100
+ export declare const NB_BLOCK_PER_INDEX = 10;
101
+ export declare const MISC_BLOCK_ID_OFFSET = 9;
102
+ export declare const VISIBLE_TAG = "_visible";
103
+ export declare const DATA_TAG = "_data";
104
+ export declare const EXPORT_CLASS = "_export";
105
+ export declare const NULL_COLOR: number[];
106
+ export declare const ELEMENT_BYTESIZE = 56;
107
+ export declare const ELT_TEXT = 2;
108
+ export declare const PATTERN_TEXT_OPT = 7;
109
+ export declare const CURVE_SUBDIVISIONS = 41;
110
+ export declare const PATTERN_UNIT_SIZE = 16;
@@ -0,0 +1,408 @@
1
+ /**
2
+ * Barrel module that gathers Nodus's shared utility functions into a single
3
+ * `utils` namespace.
4
+ *
5
+ * Helpers defined elsewhere are re-exported from their source modules; the
6
+ * remaining helpers are implemented inline below.
7
+ */
8
+ import { isArray, toArray, flattenArray, removeFromArray, isInteger, throttle } from '../utils';
9
+ import { flatten, unflatten, setProperty, getProperty, requestAnimFrame, cancelAnimFrame, getCurrentTime, getPixelRatio, resizeElement, getStyle, forEach, getDocument, getResizeObserver } from './helpers';
10
+ import { Map2, parseColor, createCanvas, getWebglContext, applyCursorStyle, smartRequire, nextPowerOfTwo, createDummyDomElement, setElementSize } from './renderingBinaryPrimitives';
11
+ import { FlexArray } from './FlexArray';
12
+ import { IndexList } from './IndexList';
13
+ import { BoundingBox } from '../geometry/BoundingBox';
14
+ import { PrioritySet } from './AlgorithmsPrimitives';
15
+ import { ElementSet } from './ElementSet';
16
+ import { createSvgElement } from './LayersPrimitives';
17
+ import { ensureTransferable } from '../algorithms/forceFactory';
18
+ import { formatAngle } from './labels/helpers';
19
+ import { getValues, isRawObject } from './MappingPrimitives';
20
+ import { isHTMLElement } from './TooltipPrimitives';
21
+ /**
22
+ * Collects the dotted key paths of every leaf value in an object.
23
+ *
24
+ * Uses the narrow `isObject` (constructor check) so that FlexArray instances are
25
+ * treated as leaf values rather than recursed into. This is critical: the variant
26
+ * in AttributePathPrimitives.ts uses a broader check (`typeof value === 'object'`)
27
+ * that would incorrectly recurse into FlexArray internals.
28
+ */
29
+ export declare function getFlattenedKeys(obj: any, prefix?: string, out?: string[]): string[];
30
+ export declare const SVG_NS = "http://www.w3.org/2000/svg";
31
+ export declare const XML_NS = "http://www.w3.org/2000/xmlns/";
32
+ export declare const XLINK = "http://www.w3.org/1999/xlink";
33
+ export declare function insertSortAsc(arr: any[], scores: {
34
+ get(id: any): number;
35
+ }): any[];
36
+ export declare function insertSortDesc(arr: any[], scores: {
37
+ get(id: any): number;
38
+ }): any[];
39
+ export declare function concatenateArrays(...arrays: any[]): any[];
40
+ export declare function binaryIndexOf(arr: number[], target: number): number;
41
+ export declare function propertyPathToString(path: string | string[]): string;
42
+ export declare function toPropertyPath(path: any): string[];
43
+ export declare function lightDebounce(fn: () => void, delay: number): () => void;
44
+ export declare function debounce(fn: (...args: any[]) => any, wait?: number, immediate?: boolean): ((...args: any[]) => any) & {
45
+ clear(): void;
46
+ flush(): void;
47
+ };
48
+ export declare function processQueue(items: any[], handler: (...args: any[]) => Promise<any>): Promise<any>;
49
+ export declare function isLittleEndian(): boolean;
50
+ export declare function promiseQueue(fns: Array<() => Promise<any>>): Promise<any>;
51
+ export declare function hash8(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
52
+ export declare function unorderedHash(a: number, b: number): number;
53
+ export declare function deepCopy<T>(value: T): T;
54
+ export declare function extendList(target: any[], items: any[]): void;
55
+ export declare function traverse(obj: any, callback: (value: any) => void): void;
56
+ export declare function indexByName(obj: any): Record<string, any>;
57
+ export declare function getLeafValues(obj: any, result?: any[]): any[];
58
+ export declare function getOptions(value: any, defaults: any): any;
59
+ export declare function isObject(value: any): boolean;
60
+ export declare function mergeValues(target: any, source: any): any;
61
+ export declare function pick(obj: any, keys: string[] | null | undefined): any;
62
+ export declare const merge: (...objects: any[]) => any;
63
+ export declare function clamp(value: number, min: number, max: number): number;
64
+ export declare function mix(a: number, b: number, t: number): number;
65
+ export declare function lerp(a: number, b: number, t: number): number;
66
+ export declare function computeMax(arr: number[]): number;
67
+ export declare function computeMin(arr: number[]): number;
68
+ export declare const getBaseLog: (value: number, base: number) => number;
69
+ export declare function mapKeys(map: Map<any, any>): any[];
70
+ export declare function mapValues(map: Map<any, any>): any[];
71
+ export declare const setKeys: (set: Set<any>) => any[];
72
+ export declare const setValues: (set: Set<any>) => any[];
73
+ export declare function parseColorRgba(value: string, out?: number[]): number[] | null;
74
+ export declare function formatHex(n: number): string;
75
+ export declare function componentsToRGBA([r, g, b, a]: number[]): string;
76
+ export declare function parseColorHex(value: string): number[] | null;
77
+ export declare const toHexa: (color: any) => string | null;
78
+ export declare const rgbaToRgb: (color: string) => {
79
+ color: string;
80
+ opacity: number;
81
+ };
82
+ export declare function getDate(): string;
83
+ export declare function getTime(): string;
84
+ export declare function setAttributes(el: any, attrs: any): void;
85
+ export declare function createElement(html: string): any;
86
+ export declare function createTextNode(text: string): any;
87
+ export declare function baseURI(doc: any): string;
88
+ export declare function escapeDOMAttribute(value: any, escapeNewlines?: boolean): string;
89
+ export declare function fadeElement(el: HTMLElement, from: number, to: number, duration: number): Promise<void>;
90
+ export declare function createBlob(data: any, type: string): any;
91
+ export declare function isBlob(value: any): boolean;
92
+ export declare function dataUrlToBlob(dataUrl: string): any;
93
+ export declare function promptDownload(data: any, filename: string, format?: string, mimeType?: string): any;
94
+ export declare function getImage(src: string): Promise<HTMLImageElement | null>;
95
+ export declare function clearCanvas(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D, width?: number, height?: number): void;
96
+ export declare function setCtxFont(ctx: CanvasRenderingContext2D, fontFamily: string, fontSize: number, fontStyle?: string): void;
97
+ export declare function isWebGLSupported(): boolean;
98
+ export declare const createWebGL2Context: (options?: any) => WebGL2RenderingContext;
99
+ export declare const getGlContext: (_options: any, _onSuccess: any, onError: (err: Error) => void) => {
100
+ context: WebGL2RenderingContext;
101
+ cleanUp: () => void;
102
+ } | null;
103
+ export declare function displayPixelsOnScreen(pixels: Uint8Array | Uint8ClampedArray, width?: number, height?: number, delay?: number): void;
104
+ export declare class DummyXHR {
105
+ method: string | null;
106
+ url: string | null;
107
+ status: number;
108
+ readyState: number;
109
+ headers: Record<string, string>;
110
+ responseText: string | null;
111
+ response: any;
112
+ responseType?: string;
113
+ onreadystatechange: () => void;
114
+ onerror: (e?: any) => void;
115
+ static onCreate: ((xhr: DummyXHR) => void) | null;
116
+ static onSend: ((xhr: DummyXHR) => void) | null;
117
+ constructor();
118
+ open(method: string, url: string): void;
119
+ respond(status: number, headers: Record<string, string>, body: string): void;
120
+ send(): void;
121
+ }
122
+ export declare class DummyFileReader {
123
+ onload: (() => void) | null;
124
+ result: any;
125
+ private _blob;
126
+ static onCreate: ((reader: DummyFileReader) => void) | null;
127
+ static onRead: ((reader: DummyFileReader) => void) | null;
128
+ constructor();
129
+ readAsDataURL(blob: any): void;
130
+ load(data: any): void;
131
+ }
132
+ export declare function fetchBinary(url: string): Promise<Blob>;
133
+ export declare function fetchBinaryAsBase64(url: string): Promise<string>;
134
+ export declare function ensureRequireInitialized(): Promise<void>;
135
+ export declare const workerIsAvailable: boolean;
136
+ export declare function formatWorkerMessage(data: any): any;
137
+ export declare function createWorker(factory: any): Worker;
138
+ export declare class DummyTextNode {
139
+ private _text;
140
+ constructor(text: string);
141
+ serialize(): string;
142
+ cloneNode(): DummyTextNode;
143
+ }
144
+ export declare const createDummyXmlDocument: () => any;
145
+ export declare function serializeXMLDocument(doc: any): string | undefined;
146
+ export declare const createXmlDocument: () => any;
147
+ export declare function resolvePath(url: string, base: string): string;
148
+ export declare function getDocumentFontRules(): Promise<Array<{
149
+ name: string;
150
+ formats: any[];
151
+ originalRule: string;
152
+ }>>;
153
+ export declare function getEmbeddedFontRules(fontRules: Array<{
154
+ formats: Array<{
155
+ format: string;
156
+ url: string;
157
+ }>;
158
+ originalRule: string;
159
+ }>, embedFonts: boolean): Promise<string[]>;
160
+ export declare function fontSizeToBadgeScale(fontSize: number, nodeSize: number, halfScale?: number): number;
161
+ export declare class PathMap {
162
+ private _keys;
163
+ private _values;
164
+ private _size;
165
+ private _cachedPath;
166
+ private _cachedIndex;
167
+ get size(): number;
168
+ set(path: any[], value: any): void;
169
+ get(path: any[]): any;
170
+ has(path: any[]): boolean;
171
+ keys(): any[][];
172
+ private _getIndex;
173
+ }
174
+ export declare function objToValueList(obj: any, result?: Array<{
175
+ path: string[];
176
+ value: any;
177
+ }>, currentPath?: string[]): Array<{
178
+ path: string[];
179
+ value: any;
180
+ }> | undefined;
181
+ export declare class DummyDomElement {
182
+ onmousewheel: () => void;
183
+ __dummy: boolean;
184
+ style: any;
185
+ clientWidth: number;
186
+ clientHeight: number;
187
+ childNodes: any[];
188
+ get offsetWidth(): number;
189
+ get offsetHeight(): number;
190
+ get firstChild(): any;
191
+ get parentNode(): any;
192
+ get classList(): any;
193
+ get innerHTML(): string;
194
+ set innerHTML(_value: string);
195
+ appendChild(child: any): any;
196
+ removeChild(): void;
197
+ addEventListener(): void;
198
+ removeEventListener(): void;
199
+ insertBefore(): void;
200
+ contains(): boolean;
201
+ }
202
+ export declare class DummyCanvasRenderingContext2D {
203
+ private _fontSize;
204
+ set font(value: string);
205
+ set fillStyle(_value: string);
206
+ set textBaseline(_value: string);
207
+ set textAlign(_value: string);
208
+ set strokeStyle(_value: string);
209
+ set lineWidth(_value: number);
210
+ fill(): void;
211
+ stroke(): void;
212
+ clearRect(): void;
213
+ fillRect(): void;
214
+ strokeRect(): void;
215
+ beginPath(): void;
216
+ closePath(): void;
217
+ moveTo(): void;
218
+ lineTo(): void;
219
+ rect(): void;
220
+ arc(): void;
221
+ save(): void;
222
+ restore(): void;
223
+ clip(): void;
224
+ translate(): void;
225
+ rotate(): void;
226
+ fillText(): void;
227
+ setLineDash(): void;
228
+ quadraticCurveTo(): void;
229
+ bezierCurveTo(): void;
230
+ drawImage(): void;
231
+ measureText(text: string): {
232
+ width: number;
233
+ };
234
+ getImageData(): {
235
+ width: number;
236
+ height: number;
237
+ data: Uint8ClampedArray;
238
+ };
239
+ }
240
+ export declare class DummyCanvas {
241
+ style: any;
242
+ width: number;
243
+ height: number;
244
+ __context: DummyCanvasRenderingContext2D;
245
+ get __dummy(): boolean;
246
+ get parentNode(): any;
247
+ getContext(type: string): any;
248
+ toDataURL(format?: string): string;
249
+ addEventListener(): void;
250
+ removeEventListener(): void;
251
+ getBoundingClientRect(): {
252
+ left: number;
253
+ top: number;
254
+ bottom: number;
255
+ right: number;
256
+ width: number;
257
+ height: number;
258
+ };
259
+ }
260
+ export declare class EventTarget {
261
+ private _events;
262
+ on(event: string, handler: (...args: any[]) => void): this;
263
+ off(event: string, handler?: (...args: any[]) => void): this;
264
+ fire(event: string, ...args: any[]): this;
265
+ once(event: string, handler: (...args: any[]) => void): this;
266
+ hasListener(event: string, handler: (...args: any[]) => void): boolean;
267
+ clearEvents(): void;
268
+ getListeners(event: string): any[] | null | undefined;
269
+ }
270
+ export declare const utils: {
271
+ BUTTON_MAPPING: Record<number, "left" | "middle" | "right">;
272
+ BoundingBox: typeof BoundingBox;
273
+ DummyCanvas: typeof DummyCanvas;
274
+ DummyCanvasRenderingContext2D: typeof DummyCanvasRenderingContext2D;
275
+ DummyDomElement: typeof DummyDomElement;
276
+ DummyFileReader: typeof DummyFileReader;
277
+ DummyTextNode: typeof DummyTextNode;
278
+ DummyXHR: typeof DummyXHR;
279
+ ElementSet: typeof ElementSet;
280
+ EventTarget: typeof EventTarget;
281
+ FlexArray: typeof FlexArray;
282
+ IndexList: typeof IndexList;
283
+ MOUSE_WHEEL_THROTTLE: number;
284
+ Map2: typeof Map2;
285
+ PathMap: typeof PathMap;
286
+ PrioritySet: typeof PrioritySet;
287
+ SVG_NS: string;
288
+ XLINK: string;
289
+ XML_NS: string;
290
+ applyCursorStyle: typeof applyCursorStyle;
291
+ baseURI: typeof baseURI;
292
+ binaryIndexOf: typeof binaryIndexOf;
293
+ cancelAnimFrame: typeof cancelAnimFrame;
294
+ clamp: typeof clamp;
295
+ clearCanvas: typeof clearCanvas;
296
+ componentsToRGBA: typeof componentsToRGBA;
297
+ computeMax: typeof computeMax;
298
+ computeMin: typeof computeMin;
299
+ concatenateArrays: typeof concatenateArrays;
300
+ createBlob: typeof createBlob;
301
+ createCanvas: typeof createCanvas;
302
+ createDummyDomElement: typeof createDummyDomElement;
303
+ createDummyXmlDocument: () => any;
304
+ createElement: typeof createElement;
305
+ createSvgElement: typeof createSvgElement;
306
+ createTextNode: typeof createTextNode;
307
+ createWebGL2Context: (options?: any) => WebGL2RenderingContext;
308
+ createWorker: typeof createWorker;
309
+ createXmlDocument: () => any;
310
+ dataUrlToBlob: typeof dataUrlToBlob;
311
+ debounce: typeof debounce;
312
+ deepCopy: typeof deepCopy;
313
+ displayPixelsOnScreen: typeof displayPixelsOnScreen;
314
+ ensureRequireInitialized: typeof ensureRequireInitialized;
315
+ ensureTransferable: typeof ensureTransferable;
316
+ escapeDOMAttribute: typeof escapeDOMAttribute;
317
+ extendList: typeof extendList;
318
+ fadeElement: typeof fadeElement;
319
+ fetch: (url: string) => Promise<string>;
320
+ fetchBinary: typeof fetchBinary;
321
+ fetchBinaryAsBase64: typeof fetchBinaryAsBase64;
322
+ flatten: typeof flatten;
323
+ flattenArray: typeof flattenArray;
324
+ fontSizeToBadgeScale: typeof fontSizeToBadgeScale;
325
+ forEach: typeof forEach;
326
+ formatAngle: typeof formatAngle;
327
+ formatHex: typeof formatHex;
328
+ formatWorkerMessage: typeof formatWorkerMessage;
329
+ getBaseLog: (value: number, base: number) => number;
330
+ getCurrentTime: typeof getCurrentTime;
331
+ getDate: typeof getDate;
332
+ getDocument: typeof getDocument;
333
+ getDocumentFontRules: typeof getDocumentFontRules;
334
+ getEmbeddedFontRules: typeof getEmbeddedFontRules;
335
+ getFlattenedKeys: typeof getFlattenedKeys;
336
+ getGlContext: (_options: any, _onSuccess: any, onError: (err: Error) => void) => {
337
+ context: WebGL2RenderingContext;
338
+ cleanUp: () => void;
339
+ } | null;
340
+ getImage: typeof getImage;
341
+ getLeafValues: typeof getLeafValues;
342
+ getOptions: typeof getOptions;
343
+ getPixelRatio: typeof getPixelRatio;
344
+ getProperty: typeof getProperty;
345
+ getResizeObserver: typeof getResizeObserver;
346
+ getStyle: typeof getStyle;
347
+ getTime: typeof getTime;
348
+ getValues: typeof getValues;
349
+ getWebglContext: typeof getWebglContext;
350
+ hash8: typeof hash8;
351
+ htmlSanitizer: {
352
+ sanitize: (html: string) => string;
353
+ };
354
+ indexArrayToArray: <T>(indices: ArrayLike<number>, data: T[]) => T[];
355
+ indexByName: typeof indexByName;
356
+ insertSortAsc: typeof insertSortAsc;
357
+ insertSortDesc: typeof insertSortDesc;
358
+ isArray: typeof isArray;
359
+ isBlob: typeof isBlob;
360
+ isHTMLElement: typeof isHTMLElement;
361
+ isInteger: typeof isInteger;
362
+ isLittleEndian: typeof isLittleEndian;
363
+ isObject: typeof isObject;
364
+ isRawObject: typeof isRawObject;
365
+ isWebGLSupported: typeof isWebGLSupported;
366
+ lerp: typeof lerp;
367
+ lightDebounce: typeof lightDebounce;
368
+ mapKeys: typeof mapKeys;
369
+ mapValues: typeof mapValues;
370
+ merge: (...objects: any[]) => any;
371
+ mergeValues: typeof mergeValues;
372
+ mix: typeof mix;
373
+ nextPowerOfTwo: typeof nextPowerOfTwo;
374
+ objToValueList: typeof objToValueList;
375
+ parseColor: typeof parseColor;
376
+ parseColorHex: typeof parseColorHex;
377
+ parseColorRgba: typeof parseColorRgba;
378
+ pick: typeof pick;
379
+ processQueue: typeof processQueue;
380
+ promiseQueue: typeof promiseQueue;
381
+ promptDownload: typeof promptDownload;
382
+ propertyPathToString: typeof propertyPathToString;
383
+ removeFromArray: typeof removeFromArray;
384
+ requestAnimFrame: typeof requestAnimFrame;
385
+ resizeElement: typeof resizeElement;
386
+ resolvePath: typeof resolvePath;
387
+ rgbaToRgb: (color: string) => {
388
+ color: string;
389
+ opacity: number;
390
+ };
391
+ serializeXMLDocument: typeof serializeXMLDocument;
392
+ setAttributes: typeof setAttributes;
393
+ setCtxFont: typeof setCtxFont;
394
+ setElementSize: typeof setElementSize;
395
+ setKeys: (set: Set<any>) => any[];
396
+ setProperty: typeof setProperty;
397
+ setValues: (set: Set<any>) => any[];
398
+ smartRequire: typeof smartRequire;
399
+ throttle: typeof throttle;
400
+ toArray: typeof toArray;
401
+ toHexa: (color: any) => string | null;
402
+ toPropertyPath: typeof toPropertyPath;
403
+ traverse: typeof traverse;
404
+ unflatten: typeof unflatten;
405
+ unorderedHash: typeof unorderedHash;
406
+ workerIsAvailable: boolean;
407
+ };
408
+ export default utils;
@@ -0,0 +1,38 @@
1
+ export type Subsystem = 'geometry' | 'graph' | 'attr' | 'spatial' | 'transform' | 'layout' | 'hyper' | 'render';
2
+ export type Backend = 'ts' | 'wasm';
3
+ export declare const SUBSYSTEMS: readonly Subsystem[];
4
+ /**
5
+ * Override backends. `{ all: 'wasm' }` sets every subsystem; per-key entries
6
+ * win over `all`. Anything unspecified resets to the 'ts' default.
7
+ */
8
+ export declare function configureBackends(config?: (Partial<Record<Subsystem, Backend>> & {
9
+ all?: Backend;
10
+ }) | null): void;
11
+ /** Parse `impl`/`flags` from a query string (used by the differential harness). */
12
+ export declare function configureBackendsFromQuery(search: string): void;
13
+ export declare function backendFor(s: Subsystem): Backend;
14
+ export declare function useWasm(s: Subsystem): boolean;
15
+ /** Snapshot of the current flags (for debugging / tests). */
16
+ export declare function backendFlags(): Record<Subsystem, Backend>;
17
+ /** The injected wasm exports, or null if not loaded. Sync — safe on hot paths. */
18
+ export declare function wasmExports(): any;
19
+ /** Inject the loaded wasm bindings. The host loads `pkg/` and calls this. */
20
+ export declare function setWasmExports(mod: any): void;
21
+ /**
22
+ * Opt-in async activator for the Rust/WASM backend. Dynamically imports the compiled
23
+ * bindings (`pkg/`, a CODE-SPLIT import so it is NOT eagerly bundled into the workers),
24
+ * injects them, and routes the requested subsystems through wasm. ADDITIVE + non-breaking:
25
+ * with no call, the library is 100% TS as before.
26
+ *
27
+ * import { enableWasmBackend } from '@kortexya/nodus';
28
+ * await enableWasmBackend({ attr: 'wasm' }); // wasm-backed numeric store
29
+ * await enableWasmBackend(); // { all: 'wasm' }
30
+ *
31
+ * Idempotent: the bindings load once. Activates MAIN-THREAD subsystems (e.g. the `attr`
32
+ * store bridge + inline layout/hyper); worker-run subsystems need worker-side injection
33
+ * (separate). Returns the loaded module (or null if loading fails — the library transparently
34
+ * stays on the TS path).
35
+ */
36
+ export declare function enableWasmBackend(config?: (Partial<Record<Subsystem, Backend>> & {
37
+ all?: Backend;
38
+ }) | null): Promise<any>;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * WASM-backed numeric column support for FlexArray (the B2 store bridge).
3
+ *
4
+ * When `useWasm('attr')` is on, a numeric FlexArray backs its `_buffer` with a TypedArray
5
+ * VIEW over WASM linear memory (at the Rust FlexColumn's `ptr()`), instead of a JS-owned
6
+ * buffer. `.get(i)` / `.set(i, v)` then read/write the view directly — no per-call JS↔WASM
7
+ * boundary crossing, and the view's own TypedArray store-coercion (ToUint8/16/Int32/fround)
8
+ * is byte-identical to the old JS buffer.
9
+ *
10
+ * THE B2 INVARIANT: when any FlexColumn grows, WASM `memory.grow()` may REALLOC and move the
11
+ * whole heap — detaching EVERY existing view (a detached ArrayBuffer reads length 0). WASM
12
+ * exposes this as a NEW `memory.buffer` object identity. So this registry watches the buffer
13
+ * identity: after any column grow, if the buffer moved, it re-derives EVERY registered view
14
+ * once. Between grows the identity is stable, so hot-path get/set never needs a per-access
15
+ * check — preserving the intersector's monomorphism.
16
+ *
17
+ * LIVE since wasmInit routes `attr: 'wasm'` at startup. The cross-subsystem detach hazard
18
+ * (ANY wasm allocation — a layout/hyper batch op allocating Vecs between FlexArray accesses —
19
+ * can grow linear memory and detach every view) is covered by the SELF-HEALING accessors:
20
+ * `sharedRawGet_wasm` / `sharedSet_wasm` / `sharedGetMultiple_wasm` check
21
+ * `_buffer.length === 0` (a detached view reads length 0; columns are never legitimately
22
+ * empty — flex_capacity ≥ 8) and call `afterGrow()` to re-derive every registered view.
23
+ * One cheap monomorphic length check per access; wasm `memory.grow` ALWAYS detaches per spec,
24
+ * so the check is sound. Proven under stress by `b2-store-stress.html`: repeated add-800-nodes
25
+ * (FlexColumn grows) interleaved with wasm layouts (Vec allocs) and attribute writes/reads —
26
+ * 0 mismatches across every grow/move.
27
+ */
28
+ /** dtype tags shared with `nodus_core::flex::DType::from_tag`. */
29
+ export declare const enum DTypeTag {
30
+ U8 = 0,
31
+ U16 = 1,
32
+ I32 = 2,
33
+ F32 = 3,
34
+ F64 = 4
35
+ }
36
+ /** The minimal surface a wasm-backed FlexArray exposes to the registry. */
37
+ export interface WasmBacked {
38
+ _rederiveView(): void;
39
+ }
40
+ type AnyTypedArray = Uint8Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
41
+ /** Map a FlexArray storage type to a numeric dtype tag, or null if it stays JS-side. */
42
+ export declare function dtypeTagFor(storage: unknown): DTypeTag | null;
43
+ /** Build a TypedArray view of `count` elements over wasm memory at byte offset `ptr`. */
44
+ export declare function viewOver(tag: DTypeTag, ptr: number, count: number): AnyTypedArray;
45
+ declare class WasmColumnRegistry {
46
+ private columns;
47
+ private lastBuffer;
48
+ /** True when numeric FlexArrays should be wasm-backed (flag on + bindings + FlexColumn). */
49
+ enabled(): boolean;
50
+ register(col: WasmBacked): void;
51
+ unregister(col: WasmBacked): void;
52
+ /**
53
+ * Call right after a FlexColumn grow. If wasm memory moved (new buffer identity), re-derive
54
+ * every registered view so no detached buffer survives. O(#columns), only on an actual move.
55
+ */
56
+ afterGrow(): void;
57
+ /** Test/teardown hook. */
58
+ reset(): void;
59
+ }
60
+ export declare const wasmColumns: WasmColumnRegistry;
61
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * APIModule: base class for all public-facing API modules.
3
+ * Binary: `APIModule = class { constructor(e) { this._nodus = e } }`
4
+ */
5
+ export declare class APIModule {
6
+ protected _nodus: any;
7
+ constructor(nodus: any);
8
+ }
@@ -0,0 +1,15 @@
1
+ import { APIModule } from './APIModule';
2
+ export declare class AlgorithmsAPI extends APIModule {
3
+ shortestPath: (opts: any) => any;
4
+ hasCycle: (opts?: any) => boolean;
5
+ getAllSimpleCycles: (opts?: any) => any;
6
+ detectCycle: (opts?: any) => any;
7
+ minimumSpanningTree: (opts?: any) => any;
8
+ dfs: (opts: any) => any;
9
+ bfs: (opts: any) => any;
10
+ betweenness: (opts?: any) => any;
11
+ getMinimumEnclosingCircle: (nodes: any) => any;
12
+ circlePack: (opts: any) => any;
13
+ fishEyeExpand: (opts: any) => any;
14
+ constructor(nodus: any);
15
+ }
@@ -0,0 +1,6 @@
1
+ import { APIModule } from './APIModule';
2
+ export declare class BrandAPI extends APIModule {
3
+ set: (opts: any, position?: any) => void;
4
+ remove: () => void;
5
+ constructor(nodus: any);
6
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * CaptorAPI mixin — merged into Nodus via applyMixins.
3
+ * Binary: `CaptorAPI = class { getHoveredElement(){...} getPointerInformation(){...} }`
4
+ */
5
+ export declare class CaptorAPI {
6
+ modules: any;
7
+ getHoveredElement(): any;
8
+ getPointerInformation(): any;
9
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * ClassesAPI mixin — merged into Nodus via applyMixins.
3
+ * Binary: `ClassesAPI = class { getNodesByClassName(e,t){...} ... }`
4
+ */
5
+ export declare class ClassesAPI {
6
+ modules: any;
7
+ getNodesByClassName(className: string, opts?: any): any;
8
+ getEdgesByClassName(className: string, opts?: any): any;
9
+ }