selection — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited selection (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Node and edge selection with single, multi, modifier-key, lasso, and path-based modes.
import { useSelection, GraphCanvas } from 'reagraph';| Param | Type | Default | Description | |
|---|---|---|---|---|
ref | RefObject<GraphCanvasRef> | — | Graph ref (required) | |
nodes | GraphNode[] | — | Node data | |
edges | GraphEdge[] | — | Edge data | |
selections | string[] | — | Controlled selections | |
actives | string[] | — | Default active highlights | |
type | SelectionTypes | 'single' | Selection mode | |
pathSelectionType | PathSelectionTypes | 'direct' | Path selection mode | |
pathHoverType | PathSelectionTypes | 'out' | Path hover highlighting | |
focusOnSelect | `boolean \ | 'singleOnly'` | true | Center camera on selection |
disabled | boolean | — | Disable selection | |
onSelection | (ids: string[]) => void | — | Selection change callback |
| Property | Type | Description |
|---|---|---|
selections | string[] | Current selected IDs |
actives | string[] | Active/highlighted IDs |
clearSelections | (ids?: string[]) => void | Clear selections |
addSelection | (id: string) => void | Add to selection |
removeSelection | (id: string) => void | Remove from selection |
toggleSelection | (id: string) => void | Toggle selection |
setSelections | (ids: string[]) => void | Replace selections |
selectNodePaths | (source, target) => void | Select path between nodes |
onNodeClick | handler | Pass to GraphCanvas |
onCanvasClick | handler | Pass to GraphCanvas |
onNodePointerOver | handler | Pass to GraphCanvas |
onNodePointerOut | handler | Pass to GraphCanvas |
onLasso | handler | Pass to GraphCanvas |
onLassoEnd | handler | Pass to GraphCanvas |
| Type | Description |
|---|---|
'single' | Click to select one node (default) |
'multi' | Click to toggle, accumulates selections |
'multiModifier' | Hold Shift/Ctrl/Cmd to multi-select |
| Type | Description |
|---|---|
'direct' | Direct connections only (default) |
'out' | Outbound path from node |
'in' | Inbound path to node |
'all' | All connected paths |
| Type | Description |
|---|---|
'none' | No lasso (default) |
'all' | Lasso selects nodes and edges |
'node' | Lasso selects nodes only |
'edge' | Lasso selects edges only |
import { GraphCanvas, GraphCanvasRef, useSelection } from 'reagraph';
const ref = useRef<GraphCanvasRef>(null);
const {
selections,
actives,
onNodeClick,
onCanvasClick,
} = useSelection({
ref,
nodes,
edges,
type: 'single',
});
<GraphCanvas
ref={ref}
nodes={nodes}
edges={edges}
selections={selections}
actives={actives}
onNodeClick={onNodeClick}
onCanvasClick={onCanvasClick}
/>const { selections, actives, ...handlers } = useSelection({
ref,
nodes,
edges,
type: 'multiModifier',
});const { selections, actives, onLasso, onLassoEnd, ...handlers } = useSelection({
ref,
nodes,
edges,
type: 'multi',
});
<GraphCanvas
ref={ref}
nodes={nodes}
edges={edges}
selections={selections}
actives={actives}
lassoType="node"
onLasso={onLasso}
onLassoEnd={onLassoEnd}
{...handlers}
/>const { selections, ...handlers } = useSelection({
ref,
nodes,
edges,
onSelection: (ids) => console.log('Selected:', ids),
});useSelection returns event handlers that must be spread onto GraphCanvasactives highlights adjacent nodes/edges around the selectionfocusOnSelect centers the camera on the selected nodepathHoverType="out" highlights outbound connections when hovering~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.