@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
@@ -165,7 +165,7 @@ export declare class Store {
165
165
  setHoveredPointRingColor(color: string | [number, number, number, number]): void;
166
166
  setFocusedPointRingColor(color: string | [number, number, number, number]): void;
167
167
  setGreyoutPointColor(color: string | [number, number, number, number] | undefined): void;
168
- updateLinkHoveringEnabled(config: Pick<GraphConfigInterface, 'onLinkClick' | 'onLinkMouseOver' | 'onLinkMouseOut'>): void;
168
+ updateLinkHoveringEnabled(config: Pick<GraphConfigInterface, 'onLinkClick' | 'onLinkContextMenu' | 'onLinkMouseOver' | 'onLinkMouseOut'>): void;
169
169
  setHoveredLinkColor(color?: string | [number, number, number, number]): void;
170
170
  setFocusedPoint(index?: number): void;
171
171
  addAlpha(decay: number): number;
@@ -9,13 +9,14 @@ export declare class Zoom {
9
9
  isRunning: boolean;
10
10
  constructor(store: Store, config: GraphConfigInterface);
11
11
  /**
12
- * Get the zoom transform that will fit the given point positions into the viewport
12
+ * Returns the zoom transform that fits the given point positions into the viewport.
13
13
  *
14
- * @param positions An array of point positions in the form `[x, y]`
15
- * @param scale An optional scale factor to apply to the transform
16
- * @param padding Padding around the viewport in percentage
14
+ * @param positions Flat array of point coordinates as `[x0, y0, x1, y1, ...]` (number[] or Float32Array).
15
+ * @param scale Optional scale factor to apply to the transform.
16
+ * @param padding Padding around the viewport as a fraction of the viewport size (e.g. 0.1 = 10%).
17
+ * @returns The zoom transform that fits the positions.
17
18
  */
18
- getTransform(positions: [number, number][], scale?: number, padding?: number): ZoomTransform;
19
+ getTransform(positions: number[] | Float32Array, scale?: number, padding?: number): ZoomTransform;
19
20
  getDistanceToPoint(position: [number, number]): number;
20
21
  getMiddlePointTransform(position: [number, number]): ZoomTransform;
21
22
  convertScreenToSpacePosition(screenPosition: [number, number]): [number, number];
@@ -1,7 +1,7 @@
1
1
  var je = Object.defineProperty;
2
2
  var Qe = (r, t, e) => t in r ? je(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
3
  var o = (r, t, e) => Qe(r, typeof t != "symbol" ? t + "" : t, e);
4
- import { i as Me, a as Ye, n as Ke, u as Ze, R as S, l as b, T as B, g as Je, t as We, D as et, b as tt, B as C, S as rt, c as it, d as nt, e as st, f as at, h as ot, j as ct, k as lt, m as pe, o as ut, p as ht } from "./index-erwqpfu-.js";
4
+ import { i as Me, a as Ye, n as Ke, u as Ze, R as S, l as b, T as B, g as Je, t as We, D as et, b as tt, B as C, S as rt, c as it, d as nt, e as st, f as at, h as ot, j as ct, k as lt, m as pe, o as ut, p as ht } from "./index-C5QFXagg.js";
5
5
  function ft(r) {
6
6
  return Me() ? Ye() ? "Electron" : (Ke.userAgent || "").indexOf("Edge") > -1 ? "Edge" : globalThis.chrome ? "Chrome" : globalThis.safari ? "Safari" : globalThis.mozInnerScreenX ? "Firefox" : "Unknown" : "Node";
7
7
  }
@@ -3930,4 +3930,4 @@ function Xr(r, t) {
3930
3930
  export {
3931
3931
  jr as WebGLDevice
3932
3932
  };
3933
- //# sourceMappingURL=webgl-device-zHpMG57Z.js.map
3933
+ //# sourceMappingURL=webgl-device-Dfa4MRJu.js.map