@cosmos.gl/graph 2.5.0 → 2.6.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.
@@ -10,4 +10,10 @@ If you have discovered a security vulnerability in this project, please report i
10
10
 
11
11
  Please disclose it at [security advisory](https://github.com/cosmograph-org/cosmos/security/advisories/new).
12
12
 
13
- This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.
13
+ This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.
14
+
15
+ ## Escalation
16
+
17
+ If you do not receive an acknowledgement of your report within 6 business days, or if you cannot find a private security contact for the project, you may escalate to the OpenJS Foundation CNA at `security@lists.openjsf.org`.
18
+
19
+ If the project acknowledges your report but does not provide any further response or engagement within 14 days, escalation is also appropriate.
package/dist/config.d.ts CHANGED
@@ -27,13 +27,15 @@ export interface GraphConfigInterface {
27
27
  * in the format `[red, green, blue, alpha]` where each value is a number between 0 and 255.
28
28
  * Default value: '#b3b3b3'
29
29
  */
30
+ pointDefaultColor?: string | [number, number, number, number];
31
+ /** @deprecated Use `pointDefaultColor` instead */
30
32
  pointColor?: string | [number, number, number, number];
31
33
  /**
32
34
  * The color to use for points when they are greyed out (when selection is active).
33
35
  * This can be either a hex color string (e.g., '#b3b3b3') or an array of RGBA values
34
36
  * in the format `[red, green, blue, alpha]` where each value is a number between 0 and 255.
35
37
  *
36
- * If not provided, the color will be the same as the `pointColor`,
38
+ * If not provided, the color will be the same as the point's original color,
37
39
  * but darkened or lightened depending on the background color.
38
40
  *
39
41
  * If `pointGreyoutOpacity` is also defined, it will override the alpha/opacity component
@@ -545,6 +547,7 @@ export declare class GraphConfig implements GraphConfigInterface {
545
547
  backgroundColor: string;
546
548
  spaceSize: number;
547
549
  pointColor: string;
550
+ pointDefaultColor: undefined;
548
551
  pointGreyoutOpacity: undefined;
549
552
  pointGreyoutColor: undefined;
550
553
  pointSize: number;
package/dist/index.d.ts CHANGED
@@ -237,6 +237,24 @@ export declare class Graph {
237
237
  * Example: `new Float32Array([1, 0.4, 0.3])` sets the force coefficient for point 0 to 1, point 1 to 0.4, and point 2 to 0.3.
238
238
  */
239
239
  setPointClusterStrength(clusterStrength: Float32Array): void;
240
+ /**
241
+ * Sets which points are pinned (fixed) in position.
242
+ *
243
+ * Pinned points:
244
+ * - Do not move due to physics forces (gravity, repulsion, link forces, etc.)
245
+ * - Still participate in force calculations (other nodes are attracted to/repelled by them)
246
+ * - Can still be dragged by the user if `enableDrag` is true
247
+ *
248
+ * @param {number[] | null} pinnedIndices - Array of point indices to pin. Set to `[]` or `null` to unpin all points.
249
+ * @example
250
+ * // Pin points 0 and 5
251
+ * graph.setPinnedPoints([0, 5])
252
+ *
253
+ * // Unpin all points
254
+ * graph.setPinnedPoints([])
255
+ * graph.setPinnedPoints(null)
256
+ */
257
+ setPinnedPoints(pinnedIndices: number[] | null): void;
240
258
  /**
241
259
  * Renders the graph.
242
260
  *