@cosmos.gl/graph 3.0.0-beta.0 → 3.0.0-beta.2

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 (36) hide show
  1. package/dist/{src/config.d.ts → config.d.ts} +34 -0
  2. package/dist/{index-erwqpfu-.js → index-C5QFXagg.js} +1966 -1931
  3. package/dist/index-C5QFXagg.js.map +1 -0
  4. package/dist/{src/index.d.ts → index.d.ts} +14 -4
  5. package/dist/index.js +1 -1
  6. package/dist/index.min.js +58 -58
  7. package/dist/index.min.js.map +1 -1
  8. package/dist/{src/modules → modules}/Store/index.d.ts +1 -1
  9. package/dist/{src/modules → modules}/Zoom/index.d.ts +6 -5
  10. package/dist/{webgl-device-zHpMG57Z.js → webgl-device-Dfa4MRJu.js} +2 -2
  11. package/dist/{webgl-device-zHpMG57Z.js.map → webgl-device-Dfa4MRJu.js.map} +1 -1
  12. package/package.json +5 -14
  13. package/dist/index-erwqpfu-.js.map +0 -1
  14. package/dist/vite.config.d.ts +0 -2
  15. /package/dist/{src/graph → graph}/utils/error-message.d.ts +0 -0
  16. /package/dist/{src/helper.d.ts → helper.d.ts} +0 -0
  17. /package/dist/{src/modules → modules}/Clusters/index.d.ts +0 -0
  18. /package/dist/{src/modules → modules}/Drag/index.d.ts +0 -0
  19. /package/dist/{src/modules → modules}/FPSMonitor/css.d.ts +0 -0
  20. /package/dist/{src/modules → modules}/FPSMonitor/index.d.ts +0 -0
  21. /package/dist/{src/modules → modules}/ForceCenter/index.d.ts +0 -0
  22. /package/dist/{src/modules → modules}/ForceGravity/index.d.ts +0 -0
  23. /package/dist/{src/modules → modules}/ForceLink/force-spring.d.ts +0 -0
  24. /package/dist/{src/modules → modules}/ForceLink/index.d.ts +0 -0
  25. /package/dist/{src/modules → modules}/ForceManyBody/index.d.ts +0 -0
  26. /package/dist/{src/modules → modules}/ForceMouse/index.d.ts +0 -0
  27. /package/dist/{src/modules → modules}/GraphData/index.d.ts +0 -0
  28. /package/dist/{src/modules → modules}/Lines/geometry.d.ts +0 -0
  29. /package/dist/{src/modules → modules}/Lines/index.d.ts +0 -0
  30. /package/dist/{src/modules → modules}/Points/atlas-utils.d.ts +0 -0
  31. /package/dist/{src/modules → modules}/Points/index.d.ts +0 -0
  32. /package/dist/{src/modules → modules}/Shared/buffer.d.ts +0 -0
  33. /package/dist/{src/modules → modules}/Shared/texture-utils.d.ts +0 -0
  34. /package/dist/{src/modules → modules}/Shared/uniform-utils.d.ts +0 -0
  35. /package/dist/{src/modules → modules}/core-module.d.ts +0 -0
  36. /package/dist/{src/variables.d.ts → variables.d.ts} +0 -0
@@ -342,6 +342,36 @@ export interface GraphConfigInterface {
342
342
  * Default value: `undefined`
343
343
  */
344
344
  onBackgroundClick?: (event: MouseEvent) => void;
345
+ /**
346
+ * Callback function that will be called when a context menu trigger (typically right click) happens on the canvas.
347
+ * If triggered on a point, its index will be passed as the first argument,
348
+ * position as the second argument and the corresponding mouse event as the third argument:
349
+ * `(index: number | undefined, pointPosition: [number, number] | undefined, event: MouseEvent) => void`.
350
+ * Default value: `undefined`
351
+ */
352
+ onContextMenu?: (index: number | undefined, pointPosition: [number, number] | undefined, event: MouseEvent) => void;
353
+ /**
354
+ * Callback function that will be called when a context menu trigger (typically right click) happens on a point.
355
+ * The point index will be passed as the first argument,
356
+ * position as the second argument and the corresponding mouse event as the third argument:
357
+ * `(index: number, pointPosition: [number, number], event: MouseEvent) => void`.
358
+ * Default value: `undefined`
359
+ */
360
+ onPointContextMenu?: (index: number, pointPosition: [number, number], event: MouseEvent) => void;
361
+ /**
362
+ * Callback function that will be called when a context menu trigger (typically right click) happens on a link.
363
+ * The link index will be passed as the first argument and the corresponding mouse event as the second argument:
364
+ * `(linkIndex: number, event: MouseEvent) => void`.
365
+ * Default value: `undefined`
366
+ */
367
+ onLinkContextMenu?: (linkIndex: number, event: MouseEvent) => void;
368
+ /**
369
+ * Callback function that will be called when a context menu trigger (typically right click) happens on the background (empty space).
370
+ * The mouse event will be passed as the first argument:
371
+ * `(event: MouseEvent) => void`.
372
+ * Default value: `undefined`
373
+ */
374
+ onBackgroundContextMenu?: (event: MouseEvent) => void;
345
375
  /**
346
376
  * Callback function that will be called when mouse movement happens.
347
377
  * If the mouse moves over a point, its index will be passed as the first argument,
@@ -596,6 +626,10 @@ export declare class GraphConfig implements GraphConfigInterface {
596
626
  onPointClick: GraphConfigInterface['onPointClick'];
597
627
  onLinkClick: GraphConfigInterface['onLinkClick'];
598
628
  onBackgroundClick: GraphConfigInterface['onBackgroundClick'];
629
+ onContextMenu: GraphConfigInterface['onContextMenu'];
630
+ onPointContextMenu: GraphConfigInterface['onPointContextMenu'];
631
+ onLinkContextMenu: GraphConfigInterface['onLinkContextMenu'];
632
+ onBackgroundContextMenu: GraphConfigInterface['onBackgroundContextMenu'];
599
633
  onMouseMove: GraphConfigInterface['onMouseMove'];
600
634
  onPointMouseOver: GraphConfigInterface['onPointMouseOver'];
601
635
  onPointMouseOut: GraphConfigInterface['onPointMouseOut'];