types

Types: F–G

FilterConfig

Union of all filter config types

type FilterConfig = RangeFilter | CategoricalFilter | PredicateFilter | TopologyFilter

FilterEntry

A filter entry can be a single filter or a boolean group

type FilterEntry = FilterConfig | FilterGroup

FilterGroup

Filter group — combine child filters with AND or OR logic. Groups can be nested for complex boolean expressions.

Example: (age > 30 AND status = "active") OR (category = "VIP")

interface FilterGroup {
  children: FilterConfig | FilterGroup[];
  label?: string;
  operator: "and" | "or";
  target: FilterTarget;
  type: "group";
}

Fields

childrenFilterConfig | FilterGroup[]Child filters or nested groups
label string
operator"and" | "or"Boolean operator for combining children
targetFilterTarget
type"group"

FilterHandle

Handle returned by every filter sugar method.

Encapsulates a single filter registered with the manager and exposes a small mutation surface (update, invert, remove) so callers can tweak the filter without re-issuing the original sugar call.

interface FilterHandle {
  id: string;
  target: "nodes" | "edges";
  type: FilterPublicType;
  invert: unknown;
  isActive: unknown;
  remove: unknown;
  toString: unknown;
  update: unknown;
}

Fields

idstringUnique filter id within the manager.
target"nodes" | "edges"Whether this filter targets nodes or edges.
typeFilterPublicTypePublic-facing filter type (sugar vocabulary).

FilterMatchCount

Match count for preview (before applying)

interface FilterMatchCount {
  matchedEdges: number;
  matchedNodes: number;
  totalEdges: number;
  totalNodes: number;
}

Fields

matchedEdgesnumberNumber of edges matching the filter
matchedNodesnumberNumber of nodes matching the filter
totalEdgesnumberTotal edges
totalNodesnumberTotal nodes

FilterPreset

Serializable filter preset

interface FilterPreset {
  createdAt: number;
  filters: object[];
  name: string;
}

Fields

createdAtnumberCreation timestamp
filtersobject[]Serialized filter entries (predicate filters excluded — not serializable)
namestringPreset name

FilterPublicType

Public-facing filter type names used by the sugar API. These map onto internal FilterEntry.type values but expose a friendlier vocabulary (e.g. match instead of categorical).

type FilterPublicType = "range" | "dateRange" | "match" | "predicate" | "degree" | "any" | "all"

FilterResult

Result of filter evaluation

interface FilterResult {
  totalEdges: number;
  totalNodes: number;
  visibleEdgeIds: string[];
  visibleNodeIds: string[];
}

Fields

totalEdgesnumberTotal edge count (before filtering)
totalNodesnumberTotal node count (before filtering)
visibleEdgeIdsstring[]IDs of visible edges after filtering
visibleNodeIdsstring[]IDs of visible nodes after filtering

FilterResultCallback

Callback for filter result changes

type FilterResultCallback = (result: FilterResult) => void

FilterTarget

type FilterTarget = "node" | "edge"

FlatLayerProps

interface FlatLayerProps {
  autoFit?: boolean;
  mapSize?: number;
  maxLevel?: number;
  minLevel?: number;
  onReady?: (flat: SlippyMapFlat) => void;
  tileProvider?: FreeProviderName;
  tileUrl?: TileUrlFn;
  visible?: boolean;
}

Fields

autoFit boolean
true
Auto-fit the initial view so the world map fills the viewport.
mapSize number
10 — matches typical Kineviz graph scale
Full map size in world units (the entire world fits in [-mapSize/2, mapSize/2]).
maxLevel number
17
Maximum tile zoom level.
minLevel number
0
Minimum tile zoom level.
onReady (flat: SlippyMapFlat) => voidCalled once after the SlippyMapFlat instance has been created.
tileProvider FreeProviderNamePredefined tile provider name. Overrides tileUrl if both are set.
tileUrl TileUrlFn
Carto Dark tiles
Tile URL function: (x, y, level) => string.
visible boolean
true
Show/hide the map layer.

FlightSpec

One scheduled traveler along an edge. Domain-neutral: a "flight" is any thing that departs at departT and is in transit for durFrac of the loop.

interface FlightSpec {
  color?: [number, number, number];
  departT: number;
  durationMs?: number;
  durFrac: number;
  edgeId: string;
  icon?: string;
  iconAngleOffset?: number;
  key?: string;
  orientToPath?: boolean;
  shape?: "dart" | "comet";
  size?: number;
  trailLength?: number;
}

Fields

color [number, number, number]
departTnumberDeparture phase within the loop, 0..1.
durationMs numberms to traverse the edge once (drives MarkerRenderer phase advance).
durFracnumberFraction of the loop the traveler is in transit, 0..1.
edgeIdstring
icon string
iconAngleOffset number
key stringStable identity; defaults to edgeId.
orientToPath boolean
shape "dart" | "comet"
size number
trailLength number

FlyPathOptions

interface FlyPathOptions {
  approach?: number;
  bank?: number;
  baseOrientation?: Quaternion;
  curveType?: "centripetal" | "chordal" | "catmullrom";
  distance?: number;
  dwell?: number | (index: number) => number;
  glide?: number;
  heading?: Heading;
  leadStrength?: number;
  onWaypoint?: (hit: WaypointHit) => void;
  tension?: number;
  travel?: number | (index: number) => number;
  warp?: number;
}

Fields

approach numberMs spent easing from the current view onto the first waypoint. Default 700.
bank numberRoll into the curves, in radians at full curvature. Default 0.22.
baseOrientation QuaternionThe view a lean is measured FROM, and what heading: "keep" keeps. Default level (identity); createCinematics passes the view the flight starts in. It has to be a fixed quaternion rather than "whatever orientation the frame came in with", or sample stops being a pure function of time: a slerp that uses its own previous output as the base converges a little further every call, so leadStrength: 0.4 would creep all the way round to a full chase over a handful of frames, and the same millisecond would give a different answer depending on how it was arrived at. Scrubbing in particular would be nonsense.
curveType "centripetal" | "chordal" | "catmullrom"How the Catmull-Rom through the waypoints is parameterised. Default "centripetal". "catmullrom" (uniform) is what this used to hardcode, and it overshoots when the waypoints are unevenly spaced — which a graph layout always is. Measured on a 9-hop route: a segment whose endpoints are 30 units apart had an arc length of 70, so the camera swung 2.3x further than the hop and came back, which reads as a lurch. "centripetal" is the standard cure (Lee 1989) and keeps cusps and self-intersections out of the path. "chordal" is also available; it smooths harder and cuts corners more.
distance number
3× the mean hop length
Distance to hold from the path.
dwell number | (index: number) => numberMs held at each waypoint. Default 650. A function is asked per waypoint.
glide numberHow much of a dwell is spent still moving, 0..1. Default 1. At 1 the camera crawls THROUGH a waypoint instead of stopping on it: it slows to about a fifth of the cruise on each side of it, passes exactly through the node at the middle of its marks window, and accelerates away. The schedule itself does not move: duration and marks are identical either way, and the window still brackets the node, so a card or a highlight hung off a mark needs no adjusting. At 0 the camera comes to a dead stop and holds the node for the whole dwell, which is what this did before. That was a deliberate choice once — "it lands on the node, not near it" — and it is still the right one for a shot whose job is to let somebody read a record. But measured on the AML route it leaves 34% of the flight's frames motionless across 8 separate stalls, with warp at 0 for the same share, and that is what made the flights read as a slideshow rather than a flight.
heading HeadingSee Heading. Default "lead".
leadStrength numberHow far "lead" turns, 0..1. Default 0.4.
onWaypoint (hit: WaypointHit) => voidCalled each time the flight reaches a waypoint, and with null when it is scrubbed back before the first one. This is the hook that makes a flight an analysis tool rather than a fly-over. Everything that should happen at a node — show its card, highlight the edge just travelled, ripple it, write a line into a ledger panel — hangs off this, on the flight's own clock, so it cannot drift out of step with what is on screen. Without it a caller has to run a second timer alongside the shot and guess at the leg lengths.
tension numberCurve tension for the Catmull-Rom through the waypoints. Default 0.5.
travel number | (index: number) => numberMs spent travelling each segment. Default 900. A function is asked per segment, with the index of the waypoint it leaves. Per-leg timing is what lets a flight's time axis BE the data's: give each segment the gap between the two events it joins and the flight paces itself the way the data did, so a burst reads as a burst and a long wait reads as a wait. A single number spaces the hops evenly, which looks smoother and says nothing.
warp numberPeak warp published during a segment, 0..1. Default 0.35.

FlyToBoundsOptions

Options for MapApi.flyToBounds.

interface FlyToBoundsOptions {
  duration?: number;
  mode?: MapMode;
  padding?: number;
}

Fields

duration numberAnimation duration ms. Default 600.
mode MapModeOverride active map mode for this animation. Default = current mode.
padding numberExtra scene-space padding around the bbox. Default 0.

FlyToGeoOptions

interface FlyToGeoOptions {
  duration?: number;
  mode?: MapMode;
  zoomLevel?: number;
}

Fields

duration number
600
Animation duration in ms. 0 = instant.
mode MapModeMap mode hint for callers that delegate through flyTo (e.g. flyToBounds). flyTo itself always uses the current active mode (this._mode); this field is carried through for higher-level wrappers that need to read it back from the options object.
zoomLevel numberTarget tile zoom level. If omitted, current level is preserved.

FlyToOptions

Options shared by flyToNodes and flyToAll.

interface FlyToOptions {
  duration?: number;
  offset?: number;
  scale?: number;
}

Fields

duration number
400
Animation duration in ms 0 = instant.
offset numberZ offset override. If set, used instead of computed offset from bounding box.
scale number
1.5
Zoom scale factor Larger = more padding around nodes.

FocusContextConfig

interface FocusContextConfig {
  contextEdgeOpacity?: number;
  contextOpacity?: number;
  duration?: number;
  focusScale?: number;
}

Fields

contextEdgeOpacity number
0.08
Opacity for non-focused edges.
contextOpacity number
0.15
Opacity for non-focused nodes.
duration number
500
Transition duration in ms.
focusScale number
1.3
Size boost for focused nodes.

ForceLayoutConfig

Safe subset of GPUForceLayoutConfig exposed via the <GraphCanvas forceLayout={...} /> prop. Mirrors the tuning knobs callers actually need; controller-internal details (octree depth, dimensions, gravityX/Y/Z) are intentionally omitted — those are managed by the engine. For full control, construct a GPUForceLayoutController from @kineviz/gl/layout-gpu and pass it via layoutController.

interface ForceLayoutConfig {
  alpha?: number;
  alphaDecay?: number;
  charge?: number;
  collision?: number;
  engine?: "auto" | "webgpu" | "d3";
  friction?: number;
  gravity?: number;
  linkDistance?: number;
  linkStrength?: number;
}

Fields

alpha number
0.6
Initial simulation energy.
alphaDecay number
0.1
Per-tick alpha decay rate.
charge number
-0.01
Repulsion force (negative).
collision number
0.15
Node-node collision force.
engine "auto" | "webgpu" | "d3"
`"d3"`
Force-simulation backend. - "d3": CPU d3-force-3d. Works in every modern browser. The default. - "webgpu": WebGPU compute. For 100k+ nodes. Requires a browser exposing navigator.gpu; falls back to "d3" with a dev-mode warning when it is absent, so it is safe to request unconditionally. - "auto": WebGPU if the browser supports it, otherwise d3. The default is the CPU engine even on machines that could run the GPU one. d3-force-3d settles into a layout that reads better, and the previous "auto" default made the same graph settle into two different shapes depending on whether the viewer's browser exposed navigator.gpu — a screenshot taken on one machine did not match the other. Reach for "webgpu" when the node count, not the appearance, is the problem. The previous WebGL2-GPU backend ("gpu") was removed from this enum in Phase 6. The underlying GPUForceLayoutController class is still available, from @kineviz/gl/layout-gpu rather than the package root; hosts that need it can pre-construct one and pass it via the layoutController prop. Requesting engine: "webgpu" needs none of that — the engine loads the WebGPU controller on demand.
friction numberVelocity damping (d3-force friction alias).
gravity number
0.1
Center force strength.
linkDistance number
0.5
Target edge length.
linkStrength number
1.0
Edge spring strength.

FreeProviderName

Provider names for free (no API key) providers — usable in Storybook selectors

type FreeProviderName = "cartoDark" | "cartoDarkNoLabels" | "cartoDarkNoLabelsRetina" | "cartoLight" | "cartoLightNoLabels" | "cartoVoyager" | "vectorDark" | "openStreetMap" | "googleSatellite" | "googleHybrid" | "googleRoads" | "googleTerrain" | "esriWorldImagery" | "esriWorldTopo" | "stamenToner" | "stamenWatercolor" | "stadiaAlidadeDark"

GPUEdgeRendererConfig

interface GPUEdgeRendererConfig {
  curveAmount?: number;
  edgeShape?: "straight" | "curve" | "radial";
  hideArrows?: boolean;
  lineWidth?: number;
  maxEdges?: number;
  nodeSizeScale?: number;
  opacity?: number;
  radialAxis?: "auto" | "vertical" | "horizontal";
  segments?: number;
  useCurve?: boolean;
}

Fields

curveAmount numberCurve amount (0-1)
edgeShape "straight" | "curve" | "radial"Default edge shape
hideArrows booleanHide arrows
lineWidth numberBase line width
maxEdges numberMaximum number of edges
nodeSizeScale numberNode size scale for edge boundary offset (converts node size to world units)
opacity numberLine opacity
radialAxis "auto" | "vertical" | "horizontal"Radial routing axis
segments numberNumber of segments per edge (more = smoother curves)
useCurve booleanUse curved edges

GPUNodeRendererConfig

interface GPUNodeRendererConfig {
  fixedSize?: number;
  hidePin?: boolean;
  hideRing?: boolean;
  iconColumns?: number;
  iconDisplayMode?: number;
  iconMode?: number;
  lightMode?: boolean;
  maxNodes?: number;
  nodeSizeScale?: number;
  useCircle?: boolean;
}

Fields

fixedSize numberFixed size mode: 0 = perspective scaling (default), >0 = fixed size multiplier (no distance scaling)
hidePin booleanHide pin indicators
hideRing booleanHide ring effects
iconColumns numberIcon atlas columns
iconDisplayMode numberIcon display mode: 0=filled (white icon on color), 1=ring-only, 2=plain (no ring/fill)
iconMode numberIcon mode: 1=transparent bg, 2=icon transparent, 3=additive
lightMode booleanLight mode affects ring brightness
maxNodes numberMaximum number of nodes (for buffer pre-allocation)
nodeSizeScale number
1.0
Global node size scale multiplier Scales all nodes uniformly via shader uniform.
useCircle booleanUse circular nodes

GeoBounds

Geographic bounding box. Latitudes in [-90, 90], longitudes in [-180, 180].

interface GeoBounds {
  east: number;
  north: number;
  south: number;
  west: number;
}

Fields

eastnumber
northnumber
southnumber
westnumber

GeoEgoRingConfig

interface GeoEgoRingConfig {
  edges: typeOperator;
  expandedAnchors?: ReadonlySet<string>;
  geoIds: string[];
  maxViewportFraction?: number;
  neighbourCap?: number;
  nonGeoIds: string[];
  onFitMetrics?: (metrics: ReadonlyMap<string, AnchorFitMetric>) => void;
  ringGapPx?: number;
}

Fields

edgestypeOperator
expandedAnchors ReadonlySet<string>When set, place/pin only non-geo whose primary anchor is in this set. Undefined = all anchors expanded (current behaviour).
geoIdsstring[]
maxViewportFraction numberring radius ≤ maxViewportFraction × viewport height in world units (default 0.25).
neighbourCap numberring radius ≤ neighbourCap × nearest-anchor distance (default 0.45).
nonGeoIdsstring[]
onFitMetrics (metrics: ReadonlyMap<string, AnchorFitMetric>) => voidWhen set, the renderer publishes a per-anchor screen-space fit metric (required ring radius + distance to nearest anchor, both in px) on every radius rebuild. EgoCollapseController consumes it to drive the expandZoom: "auto" level-of-detail. The metric is frame-correct because it reuses the same screen scale this renderer already computes. Omit for zero cost.
ringGapPx numberScreen-px spacing between rings (ring d targets d · ringGapPx on screen).

GeoEgoRingLayerProps

interface GeoEgoRingLayerProps {
  edges: typeOperator;
  expandedAnchors?: ReadonlySet<string>;
  geoIds: string[];
  maxViewportFraction?: number;
  neighbourCap?: number;
  nonGeoIds: string[];
  onFitMetrics?: (metrics: ReadonlyMap<string, AnchorFitMetric>) => void;
  ringGapPx?: number;
}

Fields

edgestypeOperator
expandedAnchors ReadonlySet<string>When set, place/pin only non-geo whose primary anchor is in this set. Undefined = every anchor expanded (current behaviour).
geoIdsstring[]
maxViewportFraction numberRing radius ≤ maxViewportFraction × viewport height in world units (default 0.25).
neighbourCap numberRing radius ≤ neighbourCap × nearest-anchor distance (default 0.45).
nonGeoIdsstring[]
onFitMetrics (metrics: ReadonlyMap<string, AnchorFitMetric>) => voidReceives the per-anchor screen-space fit metric on each radius rebuild (for the expandZoom: "auto" LOD).
ringGapPx numberScreen-px spacing between rings (ring d targets d · ringGapPx on screen).

GeoJsonPolygonish

Accepted GeoJSON inputs: a Polygon/MultiPolygon geometry or a Feature wrapping one.

type GeoJsonPolygonish = GeoJsonPolygon | GeoJsonMultiPolygon | GeoJsonFeature

GeoLocalConfig

interface GeoLocalConfig {
  edges: typeOperator;
  geoIds: string[];
  linkPx?: number;
  nonGeoIds: string[];
}

Fields

edgestypeOperator
geoIdsstring[]
linkPx number
nonGeoIdsstring[]

GeoLocalLayerProps

interface GeoLocalLayerProps {
  edges: typeOperator;
  geoIds: string[];
  linkPx?: number;
  nonGeoIds: string[];
}

Fields

edgestypeOperator
geoIdsstring[]
linkPx number
nonGeoIdsstring[]

GeoPosition

interface GeoPosition {
  lat: number;
  lng: number;
}

Fields

latnumber
lngnumber

GeoSearchResult

A single geocoder search hit.

interface GeoSearchResult {
  bbox?: GeoBounds;
  center: object;
  id: string;
  name: string;
  raw?: unknown;
}

Fields

bbox GeoBoundsResult viewport. May be absent for very precise POIs.
centerobjectResult location (always present).
idstringStable id for React key purposes. Format is geocoder-specific.
namestringHuman-readable label (e.g. Nominatim display_name).
raw unknownOriginal geocoder response, exposed for host-level advanced use.

GeocoderDescriptor

A pluggable geocoder implementation.

interface GeocoderDescriptor {
  key: string;
  name: string;
  search: unknown;
}

Fields

keystringRegistry key, e.g. "nominatim", "mapbox", "custom-google".
namestringUI display name.

GeometricLayoutConfig

All geometric layout configs (discriminated union)

type GeometricLayoutConfig = object | object | object | object | object | object | object | object | object | object | object | object | object | object

GlobeControlConfig

interface GlobeControlConfig {
  cameraZ?: number;
  dampingFactor?: number;
  dragThreshold?: number;
  enableRotate?: boolean;
  enableZoom?: boolean;
  fov?: number;
  globeRadius?: number;
  maxPitch?: number;
  onPitchDelta?: (deltaDegrees: number) => void;
  rotateSpeed?: number;
  shouldSkipDrag?: (e: MouseEvent) => boolean;
  zoomMax?: number;
  zoomMin?: number;
  zoomSpeed?: number;
  zoomToCursor?: boolean;
}

Fields

cameraZ number
6
Camera Z position.
dampingFactor number
0.92
Damping factor for inertia (0 = instant stop, 0.95 = smooth).
dragThreshold number
3
Drag threshold in pixels before rotation starts.
enableRotate boolean
true
Enable rotation.
enableZoom boolean
true
Enable zoom.
fov number
42
Camera field of view in degrees.
globeRadius number
5
Globe radius.
maxPitch number
85
Maximum pitch (vertical pan limit) in degrees.
onPitchDelta (deltaDegrees: number) => voidCalled on right-drag Y. Receives the delta pitch in degrees (drag down → positive). Host should add this delta to the current pitch and call api.map.setPitch.
rotateSpeed number
0.005
Rotation speed multiplier.
shouldSkipDrag (e: MouseEvent) => booleanOptional hit-test invoked on left-button mousedown. Return true to let another handler (the engine's node DragHandler) own the gesture — GlobeControl then skips its orbit so nodes can be dragged in globe mode instead of rotating the globe. Background mousedowns (return false) still rotate.
zoomMax number
camera.z - globeRadius - 0.01
Max zoom (closest to globe).
zoomMin number
-50
Min zoom (furthest from globe).
zoomSpeed number
0.15
Zoom speed multiplier.
zoomToCursor boolean
false
If true, scroll-wheel zoom rotates the globe so the point under the cursor stays fixed (classic zoom-to-cursor UX). If false, zoom is applied in-place — the camera distance changes but the globe doesn't rotate. With false the user's flyTo target stays centered when they scroll-zoom; with true wheeling drifts toward wherever the cursor is.

GlobeLayerProps

interface GlobeLayerProps {
  atmosphere?: boolean;
  atmosphereColor?: string | number;
  autoFit?: boolean;
  controlConfig?: GlobeControlConfig;
  maxLevel?: number;
  mercatorProjection?: boolean;
  minLevel?: number;
  onReady?: (globe: SlippyMapGlobe) => void;
  radius?: number;
  tileProvider?: FreeProviderName;
  tileUrl?: TileUrlFn;
  visible?: boolean;
}

Fields

atmosphere boolean
true
Render a soft fresnel atmosphere glow around the globe's silhouette.
atmosphereColor string | number
cool blue
Atmosphere glow color (CSS string or hex number).
autoFit boolean
true
Auto-fit initial view to show all nodes on the globe. Computes initial rotation and zoom from node positions.
controlConfig GlobeControlConfigGlobeControl config overrides (rotation speed, zoom speed, zoom range)
maxLevel number
18
Max tile zoom level.
mercatorProjection boolean
true
Use Mercator projection for tiles.
minLevel number
0
Min tile zoom level.
onReady (globe: SlippyMapGlobe) => voidCallback when globe is created. Receives the SlippyMapGlobe instance.
radius number
5
Globe radius in scene units.
tileProvider FreeProviderNamePredefined tile provider name. Overrides tileUrl if both are set. Available: 'cartoDark' | 'cartoLight' | 'cartoVoyager' | 'openStreetMap' | 'googleSatellite' | 'googleHybrid' | 'googleRoads' | 'googleTerrain' | 'esriWorldImagery' | 'esriWorldTopo' | 'stamenToner' | 'stamenWatercolor' | 'stadiaAlidadeDark'
tileUrl TileUrlFn
Carto Dark tiles (basemaps.cartocdn.com)
Tile URL function: (x, y, level) => string.
visible boolean
true
Visibility toggle.

GraphContextValue

interface GraphContextValue {
  activeRenderPathId: RenderPathId;
  api: RenderEngineApi;
  camera: PerspectiveCamera;
  cloudScene: Group;
  container: HTMLElement;
  control: GraphControl;
  edgeTextScale: number;
  effectiveMapProjection: MapProjection;
  glyphAtlasManager: GlyphAtlasManager;
  iconAtlasManager: IconAtlasManager;
  imageAtlasManager: ImageAtlasManager;
  interaction: InteractionManager;
  invalidate: () => void;
  is3D: boolean;
  isMapMode: boolean;
  layoutController?: LayoutControllerInterface;
  layoutPositionProvider?: PositionProvider;
  mapDamping: number;
  mapSphereRadius: number;
  registerEdgeRenderer: (renderer: PublicSurface<GPUEdgeRenderer>) => void;
  registerFrameCallback: (id: string, callback: () => void) => void;
  registerMapMaxGrowthCallback: (id: string, cb: (value: number) => void) => void;
  registerMapModeCallback: (id: string, callback: (enabled: boolean, sphereRadius?: number, damping?: number) => void) => void;
  registerNodeRenderer: (renderer: PublicSurface<GPUNodeRenderer>) => void;
  registerTextCloud: (kind: "node" | "edge", t: RuntimeTextCloud) => void;
  renderBackend: RenderBackend;
  renderer: WebGLRenderer;
  scene: Scene;
  setIs3D: (is3D: boolean) => void;
  setMapDamping: (damping: number) => void;
  setMapMaxGrowth: (value: number) => void;
  setMapMode: (enabled: boolean, sphereRadius?: number, damping?: number) => void;
  setMaxScreenFraction: (value: number) => void;
  setNodeSizeScale: (value: number) => void;
  store: GraphStore;
  textScale: number;
  theme: GraphThemeConfig;
}

Fields

activeRenderPathIdRenderPathIdWhich path actually PAINTED the last frame: "webgl" or "webgpu". Live getter; read it at use time. This is RenderRuntime's frame-stable answer (it changes only at a frame boundary, ADR-007) and it is the same value __kinevizPerf.read().activePathId publishes — not the selector's opinion, which can flip a microtask ahead of the frame that acts on it.
apiRenderEngineApiRenderEngineApi instance. Available once the engine has fully initialised.
cameraPerspectiveCameraThree.js camera (stationary at z=0.001)
cloudSceneGroupThree.js cloudScene group - ALL renderers add objects here, not to scene
containerHTMLElementContainer element
controlGraphControlScene control (pan/zoom/rotate)
edgeTextScalenumberGlobal text scale for edge labels
effectiveMapProjectionMapProjectionThe map projection that is currently in effect, derived from the mapProjection prop with a fallback to is3D ? "spherical" : "planar". Host components read this to decide whether to mount FlatLayer or GlobeLayer; engine-internal code that needs the active projection should also read from here.
glyphAtlasManagerGlyphAtlasManagerShared SDF glyph atlas manager (for BadgeCloud and TagCloud decoration text)
iconAtlasManagerIconAtlasManagerIcon atlas manager (created internally from iconFonts prop)
imageAtlasManagerImageAtlasManagerImage atlas manager (created internally for node images)
interactionInteractionManagerInteraction manager (picking, selection, drag, hover)
invalidate() => voidInvalidate render (trigger re-render)
is3DbooleanWhether the scene is in 3D mode. When false, rotation is disabled and view is flat.
isMapModebooleanWhether map mode is active (inverse-zoom damping enabled)
layoutController LayoutControllerInterfaceLayout controller for external access
layoutPositionProvider PositionProviderLayout position provider
mapDampingnumberCurrent map damping value (0=constant size, 1=full perspective).
mapSphereRadiusnumberCurrent sphereRadius for globe map mode (0 = flat). Tracked so picker re-sync can preserve globe state.
registerEdgeRenderer(renderer: PublicSurface<GPUEdgeRenderer>) => voidRegister a child edge renderer (for render loop coordination)
registerFrameCallback(id: string, callback: () => void) => voidRegister a per-frame update callback (for text layers that need view-dependent updates)
registerMapMaxGrowthCallback(id: string, cb: (value: number) => void) => voidRegister/unregister a callback for map-max-growth changes. BadgeCloud and TagCloud subscribe here so their renderers get the uniform. Mirrors registerMapModeCallback.
registerMapModeCallback(id: string, callback: (enabled: boolean, sphereRadius?: number, damping?: number) => void) => voidRegister a callback invoked synchronously when map mode changes
registerNodeRenderer(renderer: PublicSurface<GPUNodeRenderer>) => voidRegister a child node renderer (for render loop coordination)
registerTextCloud(kind: "node" | "edge", t: RuntimeTextCloud) => voidRegister a TextCloud (node-label or edge-label) for hover-neighbor-highlight dimming.
renderBackendRenderBackendRenderer factory for the current path — a live getter, read it at use time, never cache it. It follows activeRenderPathId only once that path's backend supportsPrimitives (WebGPU: not before U6), so it is the WebGL factory in this release even while activeRenderPathId is "webgpu".
rendererWebGLRendererThree.js WebGL renderer
sceneSceneThree.js scene (root)
setIs3D(is3D: boolean) => voidSwitch between 2D and 3D mode. Disables rotation and resets view angle in 2D.
setMapDamping(damping: number) => voidUpdate the mapDamping uniform on all GPU renderers without changing map mode. damping: 0=constant screen size, 1=full perspective. Default 0.3.
setMapMaxGrowth(value: number) => voidSets the soft-cap multiplier for node/badge/tag screen size in map mode. Mirrors setMapMode's fan-out architecture. Called by MapApi's wired callback. Validation happens at MapApi.setMaxNodeGrowth (clamps invalid values to default 4 with a console.warn). This setter assumes pre-validated input and writes the uniform unconditionally.
setMapMode(enabled: boolean, sphereRadius?: number, damping?: number) => voidSet map mode on all renderers. sphereRadius > 0 enables globe arc edges. damping: 0=constant size, 1=full perspective.
setMaxScreenFraction(value: number) => voidSets the near-camera cap on how much of the viewport one node or edge may cover, in every mode. Fans out exactly like setMapMaxGrowth, minus the badge/tag subscribers: their pixel offsets are nodeSize-independent, so the cap cannot be mirrored there (see kvScreenCap), and at the range where it engages a badge's offset is already off-screen anyway. Validation happens at RendererApi.setMaxScreenFraction; this setter assumes pre-validated input and writes the uniforms unconditionally.
setNodeSizeScale(value: number) => voidSets the global node size multiplier. One store write does the work — node, edge, selfLoop, picker and text all size from effectiveSizes — plus a mirror onto each renderer's own config and a redraw. Validation happens at RendererApi.setNodeSizeScale; this setter assumes a positive finite multiplier and writes it unconditionally.
storeGraphStoreThe GraphStore instance
textScalenumberGlobal text scale for node labels
themeGraphThemeConfigResolved theme configuration

GraphControlConfig

interface GraphControlConfig {
  enablePan?: boolean;
  enableRotate?: boolean;
  enableZoom?: boolean;
  mapMode?: boolean;
  onPitchDelta?: (deltaDegrees: number) => void;
  panSpeed?: number;
  rotateSpeed?: number;
  zoomMax?: number;
  zoomMin?: number;
  zoomSpeed?: number;
}

Fields

enablePan booleanEnable pan
enableRotate booleanEnable rotate
enableZoom booleanEnable zoom
mapMode boolean
false
Map mode: pan speed is fixed (independent of zoom distance).
onPitchDelta (deltaDegrees: number) => voidCalled on right-drag Y. Receives the delta pitch in degrees (drag down → positive). Host should add this delta to the current pitch and call api.map.setPitch.
panSpeed numberPan speed multiplier
rotateSpeed numberRotation speed multiplier
zoomMax numberMax zoom (closest to camera)
zoomMin numberMin zoom (furthest from camera)
zoomSpeed numberZoom speed multiplier

GraphData

interface GraphData {
  edges: EdgeData[];
  nodes: NodeData[];
}

Fields

edgesEdgeData[]
nodesNodeData[]

GraphDelta

interface GraphDelta {
  addedEdges?: EdgeData[];
  addedNodes?: NodeData[];
  metadata?: GraphDeltaMetadata;
  pinPatches?: NodePinPatch[];
  positionPatches?: NodePositionPatch[];
  removedEdgeIds?: string[];
  removedNodeIds?: string[];
  updatedEdges?: GraphEdgeUpdatePatch[];
  updatedNodes?: GraphNodeUpdatePatch[];
}

Fields

addedEdges EdgeData[]
addedNodes NodeData[]
metadata GraphDeltaMetadata
pinPatches NodePinPatch[]
positionPatches NodePositionPatch[]
removedEdgeIds string[]
removedNodeIds string[]
updatedEdges GraphEdgeUpdatePatch[]
updatedNodes GraphNodeUpdatePatch[]

GraphDeltaMetadata

interface GraphDeltaMetadata {
  reason?: string;
  source?: "api" | "adapter" | "history" | "layout" | "system";
  timestamp?: number;
  transactionId?: string;
}

Fields

reason string
source "api" | "adapter" | "history" | "layout" | "system"
timestamp number
transactionId string

GraphDeltaResult

Result returned by GraphStore.applyDelta — reports what was actually applied.

interface GraphDeltaResult {
  addedEdges: EdgeData[];
  addedNodes: NodeData[];
  pinPatches: NodePinPatch[];
  positionPatches: NodePositionPatch[];
  removedEdgeIds: string[];
  removedNodeIds: string[];
  updatedEdges: EdgeData[];
  updatedNodes: NodeData[];
}

Fields

addedEdgesEdgeData[]
addedNodesNodeData[]
pinPatchesNodePinPatch[]
positionPatchesNodePositionPatch[]
removedEdgeIdsstring[]
removedNodeIdsstring[]
updatedEdgesEdgeData[]
updatedNodesNodeData[]

GraphEdgeUpdatePatch

interface GraphEdgeUpdatePatch {
  id: string;
  next: Partial<EdgeData>;
  previous?: Partial<EdgeData>;
}

Fields

idstring
nextPartial<EdgeData>
previous Partial<EdgeData>

GraphEntityId

Core graph data types — zero external dependencies.

These types match the existing definitions in web/libs/RenderEngine/core/types.ts (lines 17-53). No renames — field names are preserved exactly.

type GraphEntityId = string

GraphEvent

interface GraphEvent {
  originalEvent?: MouseEvent | TouchEvent;
  target: NodeData | EdgeData;
  type: string;
}

Fields

originalEvent MouseEvent | TouchEvent
targetNodeData | EdgeData
typestring

GraphEventHandler

type GraphEventHandler = (event: T) => void

GraphEventType

type GraphEventType = indexedAccess | indexedAccess | indexedAccess

GraphFilterAPI

interface GraphFilterAPI {
  hasActiveFilters: boolean;
  manager: GraphFilterManager;
  addAutoRangeFilter: unknown;
  addDegreeFilter: unknown;
  addFilter: unknown;
  addOrGroup: unknown;
  beginBatch: unknown;
  clearAll: unknown;
  deletePreset: unknown;
  detectPropertyType: unknown;
  endBatch: unknown;
  getFilter: unknown;
  getFilterIds: unknown;
  getLastResult: unknown;
  getMatchCount: unknown;
  getPlaybackProgress: unknown;
  isPlaying: unknown;
  listPresets: unknown;
  loadPreset: unknown;
  onResult: unknown;
  pausePlayback: unknown;
  removeFilter: unknown;
  resumePlayback: unknown;
  savePreset: unknown;
  setInvert: unknown;
  setRange: unknown;
  setRegex: unknown;
  setValues: unknown;
  startPlayback: unknown;
  stopPlayback: unknown;
}

Fields

hasActiveFiltersbooleanCheck if any filters are active
managerGraphFilterManagerDirect access to the GraphFilterManager instance

GraphNodeUpdatePatch

interface GraphNodeUpdatePatch {
  id: string;
  next: Partial<NodeData>;
  previous?: Partial<NodeData>;
}

Fields

idstring
nextPartial<NodeData>
previous Partial<NodeData>

GraphRendererConfig

interface GraphRendererConfig {
  antialias?: boolean;
  backend?: RenderBackendType;
  backgroundColor?: number;
  container?: HTMLElement;
  fog?: boolean;
  fogFar?: number;
  fogNear?: number;
  pixelRatio?: number;
  style?: Stylesheet;
}

Fields

antialias booleanEnable anti-aliasing
backend RenderBackendTypeRender backend type
backgroundColor numberBackground color
container HTMLElementContainer element (optional, can be set later via mount())
fog booleanEnable fog effect
fogFar number
fogNear numberFog settings
pixelRatio numberDevice pixel ratio
style StylesheetInitial stylesheet

GraphRendererProps

interface GraphRendererProps {
  antialias?: boolean;
  apiOptions?: ApiOptions;
  apiRef?: RefObject<RenderEngineApi>;
  autoStartLayout?: boolean;
  backgroundColor?: number;
  cameraZ?: number;
  caption?: boolean | CaptionProps;
  children?: ReactNode;
  className?: string;
  clickDim?: boolean;
  container?: HTMLElement;
  controlConfig?: GraphControlConfig;
  controls?: boolean | GraphControlConfig;
  data?: GraphData;
  defaultDim?: 2 | 3;
  defaultHidden?: HiddenState;
  defaultIs3D?: boolean;
  defaultPinned?: PinnedState;
  defaultSelection?: SelectionState;
  defaultTheme?: GraphThemeConfig | "dark" | "light" | "midnight" | "forest" | "warm";
  defaultViewState?: ViewState;
  drag?: boolean;
  edge?: boolean | EdgeProps;
  edgeCaption?: boolean | EdgeCaptionProps;
  edgeCloud?: boolean | EdgeCloudConfig;
  edgeTextScale?: number;
  enableControl?: boolean;
  enableDrag?: boolean;
  enableWebGPURenderPath?: boolean;
  forceLayout?: boolean | ForceLayoutConfig;
  hidden?: HiddenState;
  hoveredId?: HoverTarget;
  iconFonts?: IconFontConfig | IconFontConfigExt[];
  initialPosition?: [number, number, number];
  is3D?: boolean;
  layoutController?: LayoutControllerInterface;
  legend?: boolean | object;
  locale?: string;
  map?: boolean | MapConfig;
  mapProjection?: MapProjection;
  mapProvider?: FreeProviderName | string & object;
  minimap?: boolean | MinimapConfig;
  node?: boolean | NodeProps;
  nodeCloud?: boolean | NodeCloudConfig;
  onAlgorithmEnd?: (info: AlgorithmInfo) => void;
  onAlgorithmError?: (info: AlgorithmInfo) => void;
  onAlgorithmProgress?: (info: AlgorithmInfo) => void;
  onAlgorithmStart?: (info: AlgorithmInfo) => void;
  onBackgroundClick?: (event: BackgroundPointerEvent) => void;
  onBackgroundContextMenu?: (event: BackgroundPointerEvent) => void;
  onDelta?: (delta: GraphDelta, result: GraphDeltaResult) => void;
  onDestroy?: () => void;
  onEdgeClick?: (event: EdgePointerEvent) => void;
  onEdgeContextMenu?: (event: EdgePointerEvent) => void;
  onEdgeDoubleClick?: (event: EdgePointerEvent) => void;
  onEdgeHover?: (event: EdgePointerEvent) => void;
  onError?: (err: Error, ctx: ErrorContext) => void;
  onHistoryChange?: (info: HistoryChangeInfo) => void;
  onHoverChange?: (next: HoverTarget, prev: HoverTarget) => void;
  onIs3DChange?: (next: boolean, prev: boolean) => void;
  onLayoutEnd?: (info: LayoutEndInfo) => void;
  onLayoutProgress?: (info: object) => void;
  onLayoutStart?: (info: object) => void;
  onNodeClick?: (event: NodePointerEvent) => void;
  onNodeContextMenu?: (event: NodePointerEvent) => void;
  onNodeDoubleClick?: (event: NodePointerEvent) => void;
  onNodeDrag?: (event: NodeDragEvent) => void;
  onNodeDragEnd?: (event: NodeDragEvent) => void;
  onNodeDragStart?: (event: NodeDragEvent) => void;
  onNodeHover?: (event: NodePointerEvent) => void;
  onPinnedChange?: (next: PinnedState, prev: PinnedState) => void;
  onReady?: (context: GraphContextValue) => void;
  onSelectionChange?: (next: SelectionState, prev: SelectionState) => void;
  onStyleChange?: (info: object) => void;
  onThemeChange?: (next: "dark" | "light", prev: "dark" | "light") => void;
  onViewChange?: (view: object) => void;
  onViewStateChange?: (next: ViewState, prev: ViewState) => void;
  onVisibilityChange?: (next: HiddenState, prev: HiddenState) => void;
  pinned?: PinnedState;
  pixelRatio?: number;
  selection?: SelectionState;
  store?: GraphStore;
  style?: CSSProperties;
  textScale?: number;
  theme?: GraphThemeConfig | "dark" | "light" | "midnight" | "forest" | "warm";
  toolbar?: boolean | Partial<Omit<ToolbarProps, "children">>;
  viewState?: ViewState;
}

Global visual scalars

antialias boolean
true
Enable anti-aliasing on the WebGL renderer.
backgroundColor number
`0x000000` (black)
Background color as a hex integer (e.g. 0x1a1a2e). Overridden by theme when that prop is set.
clickDim boolean
`false` — a plain click just selects; pass `clickDim` to
Click-DIM: when true, clicking a node or edge fades all OTHER instances (and their labels) to make the local neighborhood stand out. Clicking a node keeps it + its 1-hop neighborhood bright; clicking an edge keeps its two endpoints bright; clicking the same target again, or the background, clears. The dim does NOT resize anything — kept nodes stay their own size. opt in. Independent of the hover ring. The ring/halo on the hovered node is governed separately and is on by default (see the engine's glowEnabled, api.emphasis.setEmphasisGlowEnabled). Setting clickDim only toggles the click-driven dimming of non-neighbors. Equivalent to api.emphasis.setClickDimEnabled(value).
edgeTextScale number
0.6
Global text scale for edge labels.
iconFonts IconFontConfig | IconFontConfigExt[]Icon font configurations. Fonts are loaded at runtime (no bundle impact).
mapProvider FreeProviderName | string & objectTile provider key for the world map. When omitted, the engine derives a provider from theme: - string preset key → DEFAULT_THEME_TO_PROVIDER[theme] - object theme with isDark: true → "cartoDark" - object theme with isDark: false → "cartoLight" - undefined → "cartoDark" Explicit mapProvider always wins. Setting mapProvider while map is disabled is a no-op for the user but pre-arms the active provider for the next enableMap() call.
pixelRatio number
`window.devicePixelRatio`
Device pixel ratio passed to renderer.setPixelRatio().
textScale number
0.6
Global text scale for node labels.
theme GraphThemeConfig | "dark" | "light" | "midnight" | "forest" | "warm"Canvas theme. Sets background color, text color, and node ring mode automatically. Can be a preset key ('dark' | 'light' | 'midnight' | 'forest' | 'warm') or a custom GraphThemeConfig. When set, overrides backgroundColor.

API / refs

apiOptions ApiOptionsOptions for the RenderEngineApi (undo stack size, auto-commit delay).
apiRef RefObject<RenderEngineApi>Imperative ref to the RenderEngineApi instance.
onReady (context: GraphContextValue) => voidFired once when the renderer has fully initialized and the GraphContextValue is available. Useful for grabbing imperative refs to scene / camera / store at startup. Called at most once per component lifetime.

Performance / debug / loading

autoStartLayout boolean
true
Auto-start layout when layoutController provided

Controlled state

cameraZ number
0.001
Camera Z position. Set to ~6 for map layers to allow deeper zoom.
defaultDim 2 | 3
undefined (effective dimension is derived from `is3D`, which defaults to `3`)
Initial dimension on mount. Uncontrolled: only applied once on first mount via engineApi.setDimensions(). Subsequent prop changes are ignored. If is3D is also provided, is3D takes precedence and defaultDim is ignored. Use engineApi.setDimensions() to change dimensions at runtime.
defaultHidden HiddenStateUncontrolled initial hidden set. Applied once on mount.
defaultIs3D booleanUncontrolled initial 3D mode. Applied once on mount. Ignored if is3D is also set. Legacy defaultDim: 2 | 3 (Phase 1 deprecated) maps to this when defaultIs3D is unset (handled in the wiring step).
defaultPinned PinnedStateUncontrolled initial pinned set. Applied once on mount.
defaultSelection SelectionStateUncontrolled initial selection. Applied once on mount (via the same engine path as selection). Ignored if selection is also set.
defaultTheme GraphThemeConfig | "dark" | "light" | "midnight" | "forest" | "warm"Uncontrolled initial theme. Applied once on mount. Ignored if theme is also set.
defaultViewState ViewStateUncontrolled initial view state. Applied once on mount. Ignored if viewState is also set. Folds the legacy cameraZ and initialPosition props — those are now @deprecated aliases.
hidden HiddenStateControlled hidden state. hidden.nodes is the set of node IDs to hide; the engine reconciles via api.nodes.hide / api.nodes.show. Edge hiding is not yet supported (the field is accepted for forward-compat but the engine ignores it). Pair with onVisibilityChange.
hoveredId HoverTargetControlled hover target. When set, the engine snaps the hovered node to this value (via api.hover.set). null clears. Edge targets are forward-compat — the engine ignores them today. Note: programmatic hover does NOT trigger the hover-emphasis dim effect (which is reserved for real pointer events). It only updates the store's hovered-node id. No defaultHoveredId — mount-time hover is incoherent (spec Rule 4 carve-out).
initialPosition [number, number, number]
[0, 0, -2]
Initial cloudScene position [x, y, z]. Use for centering on a region.
is3D boolean
true
3D mode. When false, rotation is disabled and view angle resets to flat.
onHoverChange (next: HoverTarget, prev: HoverTarget) => voidFired when the hovered target changes. Receives (next, prev).
onIs3DChange (next: boolean, prev: boolean) => voidFired when 3D mode toggles. Receives (next, prev) as booleans.
onPinnedChange (next: PinnedState, prev: PinnedState) => voidFired when pinned changes. Receives (next, prev) with the authoritative pinned-id set read from the engine after the change.
onSelectionChange (next: SelectionState, prev: SelectionState) => voidFired when the selection changes. Receives (next, prev). In controlled mode, echoes of programmatic writes (source: "api") are suppressed — only user-driven selections trigger the callback.
onThemeChange (next: "dark" | "light", prev: "dark" | "light") => voidCalled when the canvas theme changes (toolbar toggle, api.renderer.setTheme(...), etc.). Use this to sync the host application's theme (CSS variables, dark-mode class, etc.) with the canvas. Only fires when the theme actually changes. Signature was extended from (theme) → void to (next, prev) → void in Phase 4. JS callers that ignore the second arg continue to work; TS callers' (theme) → void signatures also still type-check (TypeScript allows discarding extra parameters).
onViewStateChange (next: ViewState, prev: ViewState) => voidFired when the view state changes. The hook RAF-polls the engine for camera updates only when this callback is registered (no per-frame cost when omitted). In controlled mode, echoes of our own writes are suppressed.
onVisibilityChange (next: HiddenState, prev: HiddenState) => voidFired when visibility changes. Receives (next, prev) where next.nodes is the authoritative hidden-id set read from the engine after the change.
pinned PinnedStateControlled pinned-node state. The engine reconciles via api.nodes.pin / api.nodes.unpin. Edge pinning is forward-compat (the field is accepted but ignored by the engine).
selection SelectionStateControlled selection state. When provided, the host owns selection and the engine syncs to this value every render (via clear + selectNodes + selectEdges). Pair with onSelectionChange to read user-driven changes.
viewState ViewStateControlled view state — cloudScene position, camera z, and (for 3D) scene rotation. When set, the engine snaps to this state every render via api.camera.setViewState. Pair with onViewStateChange to read user-driven camera moves.

Subsystem mount toggles

caption boolean | CaptionPropsSimplified node caption config. Auto-creates TextLayer when set and no children provided. - true: enable with defaults - false / undefined: disabled - CaptionProps object: enable with custom config
controlConfig GraphControlConfig
controls boolean | GraphControlConfig
true
Enable scene controls (pan/zoom/rotate). - true: enable with defaults - false: disabled - GraphControlConfig object: enable with custom config
drag boolean
true
Enable node dragging.
edge boolean | EdgePropsSimplified edge config. Auto-creates EdgeCloud when set and no children provided. - true: enable with defaults - false / undefined: disabled - EdgeProps object: enable with custom config
edgeCaption boolean | EdgeCaptionPropsSimplified edge caption config. Auto-creates EdgeTextLayer when set and no children provided. - true: enable with defaults - false / undefined: disabled - EdgeCaptionProps object: enable with custom config
edgeCloud boolean | EdgeCloudConfigEdge cloud configuration. - true: enable with default config - false/undefined: disable (or use children) - object: enable with custom config
enableControl booleanEnable scene controls.
enableDrag booleanEnable node dragging.
enableWebGPURenderPath booleanAllows the engine to use the WebGPU render path. Default false. true only means "host allows it" — the path also needs a capable/available device and no prior fault. Setting it back to false is a switch, not a fallback, and never triggers renderFault. Once a device loss or shader-compile failure has occurred, this engine instance is permanently stuck on WebGL; recovering requires recreating the whole engine instance.
forceLayout boolean | ForceLayoutConfigEnable built-in GPU force-directed layout without constructing a controller. - true: enable with sensible defaults - ForceLayoutConfig object: enable with custom params - false / undefined: disabled (default) Ignored when layoutController is explicitly provided — that wins. The engine constructs an internal controller using its own WebGLRenderer and syncs topology automatically as the GraphStore changes.
layoutController LayoutControllerInterfaceGPU Layout Controller interface for position texture integration.
legend boolean | objectLegend panel configuration. - true: enable with default config - false/undefined: disable - object: enable with custom config
locale stringUI language for all built-in panels (toolbar, legend, node-info overlay). One of the bundled locales: 'en' (default), 'zh', 'es'. Unknown values fall back to English. Each subsystem ships its own translation bundle (see toolbar/i18n/*.json, legend/i18n.*.json, layers/i18n/nodeInfo.*.json); set this once and every panel follows. Hosts needing strings beyond the bundled locales can still override individual subsystems (e.g. toolbar={{ messages }}), and a per-toolbar locale override wins over this canvas-level value.
map boolean | MapConfigMap mode configuration. When set, GraphCanvas auto-mounts FlatLayer (is3D=false) or GlobeLayer (is3D=true) and (by default) auto-pins nodes by lat/lng. See MapConfig. - true: enable with defaults (cartoDark tiles, auto geo-detection) - MapConfig object: customize tile provider, projection, geoLayout - undefined / omitted: no map (host can still manually mount layers)
mapProjection MapProjection
`"spherical"` when `is3D=true`, `"planar"` when `is3D=false`
Override the map projection.
minimap boolean | MinimapConfigMinimap configuration. - true: enable with default config - false/undefined: disable - object: enable with custom config (width, height, position, margin)
node boolean | NodePropsSimplified node config. Auto-creates NodeCloud when set and no children provided. - true: enable with defaults - false / undefined: disabled - NodeProps object: enable with custom config
nodeCloud boolean | NodeCloudConfigNode cloud configuration. - true: enable with default config - false/undefined: disable (or use children) - object: enable with custom config
toolbar boolean | Partial<Omit<ToolbarProps, "children">>Toolbar auto-mount configuration. The toolbar is hidden by default — opt in by setting true (auto-mount with the built-in registry) or by passing a config object to override individual Toolbar props (registry, locale, messages, theme, controlled state pairs). You may also render your own <Toolbar> as a child instead. - undefined / false: do not mount (default) - true: auto-mount with createDefaultRegistry() and internal state - object: auto-mount, but use the provided Toolbar props as overrides

DOM / host integration

children ReactNodeChildren components (NodeCloud, EdgeCloud, etc.) - for advanced/custom rendering.
className stringCSS class forwarded to GraphCanvas's internal host div, used when container is not provided. Ignored (with a one-time dev-mode console.warn) when container is provided — in that case the host caller owns styling.
container HTMLElementContainer element or ref.
style CSSPropertiesInline styles forwarded to GraphCanvas's internal host div. Shallow-merged with the default { width: "100%", height: "100%", position: "relative" }. Ignored (with dev-mode warn) when container is provided.

Data

data GraphDataDirect graph data input. Creates internal GraphStore + calls setData().
store GraphStoreCustom GraphStore (for sharing between components).

Lifecycle / data callbacks

onAlgorithmEnd (info: AlgorithmInfo) => voidFired when an algorithm completes successfully. durationMs is wall-clock time since onAlgorithmStart for this jobId. result is the algorithm payload (varies by algo); cast via (info as AlgorithmInfo<MyResult>).
onAlgorithmError (info: AlgorithmInfo) => voidFired when an algorithm throws. info.error is the underlying Error. Also dispatched to the general onError with ctx.source === "algorithm".
onAlgorithmProgress (info: AlgorithmInfo) => voidFired periodically during an algorithm run. info.progress is 0..1 (normalised from the engine's pct: 0..100).
onAlgorithmStart (info: AlgorithmInfo) => voidFired when a graph algorithm begins (centrality, community detection, pathfinding, etc.). jobId is stable across start → end / start → error for correlation; nodeCount / edgeCount are the input sizes.
onDelta (delta: GraphDelta, result: GraphDeltaResult) => voidFired once per batched graph mutation (api.nodes.add, api.edges.add, api.data.setData, etc.). Carries the input delta (what the host requested) and the result (what the engine actually applied — may differ when IDs collide or nodes were rejected). Use to mirror the graph into an external store (Redux, server roundtrip, URL state, etc.). Fires AFTER the engine has applied the change.
onDestroy () => voidFired once just before the engine tears down (component unmount or api.destroy()). Use to release host-side resources tied to the engine (event subscriptions on api.events, custom GPU resources, etc.).
onError (err: Error, ctx: ErrorContext) => voidFired when the engine catches an internal async error. v1 covers algorithm-worker errors (source: "algorithm"); render / layout / data / map sources will be wired incrementally as their emit sites are audited. The callback is informational — the engine continues running where it can. Hosts should log + surface a user-visible message but not assume the engine is dead unless ctx.recovered === false.
onHistoryChange (info: HistoryChangeInfo) => voidFired after every undo-able mutation, after api.history.undo(), and after api.history.redo(). Use to update host UI for undo/redo button disabled state.
onLayoutEnd (info: LayoutEndInfo) => voidFired when a layout finishes (force simulation converged, geometric layout returned). Carries the type and how long it ran.
onLayoutProgress (info: object) => voidFired on every layout tick during force simulation. progress is the engine's internal completion estimate (typically 1 - alpha for force layouts, 0..1). Throttle in userland if you don't want per-frame updates. NOTE: layout:tick is not yet wired in the engine's LayoutEventBridge — the callback is bridged but inert until that emission lands.
onLayoutStart (info: object) => voidFired when a layout begins (force simulation start, geometric layout invocation, etc.). info.type matches the engine's layout-type tag (e.g. "force", "circle", "grid").
onStyleChange (info: object) => voidFired after a style change (category color, relationship color, etc.). target distinguishes node-category styling from edge-relationship styling; name is the category / relationship identifier.
onViewChange (view: object) => voidCalled whenever any view-state field emits via view:changed (theme / mode / minimap visibility). Thin wrapper over api.events.on("view:changed", ...) for hosts that prefer prop-style callbacks. Each call only includes the fields that changed.

Interaction callbacks

onBackgroundClick (event: BackgroundPointerEvent) => voidFired when the user clicks the empty canvas background (no node or edge under the pointer).
onBackgroundContextMenu (event: BackgroundPointerEvent) => voidFired on right-click of the empty canvas background.
onEdgeClick (event: EdgePointerEvent) => voidFired when the user clicks an edge.
onEdgeContextMenu (event: EdgePointerEvent) => voidFired on right-click of an edge. See onNodeContextMenu for default-menu suppression.
onEdgeDoubleClick (event: EdgePointerEvent) => voidFired when the user double-clicks an edge.
onEdgeHover (event: EdgePointerEvent) => voidFired when the pointer enters an edge. null payload on leave; see onNodeHover for the controlled-vs-pointer distinction.
onNodeClick (event: NodePointerEvent) => voidFired when the user clicks a node. Payload includes nodeId, canvas pixel position, world-space [x,y,z], modifier-key state, and the underlying MouseEvent.
onNodeContextMenu (event: NodePointerEvent) => voidFired on right-click of a node. The engine's ContextMenuManager still shows its own menu by default; call originalEvent.preventDefault() from this handler to suppress that menu and own the gesture entirely.
onNodeDoubleClick (event: NodePointerEvent) => voidFired when the user double-clicks a node. Default browser behaviour: a dblclick always fires a preceding click, so onNodeClick will also fire once.
onNodeDrag (event: NodeDragEvent) => voidFired on every frame during an active drag. Throttled to the render cadence (not the raw pointer-move rate). deltaWorld is cumulative from the drag-start position.
onNodeDragEnd (event: NodeDragEvent) => voidFired once when the drag gesture ends (pointer up). Use this to commit positions to your host's state — onNodeDrag mid-drag deltas are not meant to be persisted on every frame.
onNodeDragStart (event: NodeDragEvent) => voidFired once when the user begins dragging one or more nodes. Carries the full set of node IDs in the drag gesture (multi-select drag yields draggedNodeIds.length > 1). Only fires when drag !== false (the engine doesn't compute drag at all when drag is disabled).
onNodeHover (event: NodePointerEvent) => voidFired when the pointer enters a node. The argument is null when the pointer leaves the last hovered node without entering another node. Use for tooltip-style highlights of the hovered node's neighborhood. For programmatic "as if hovered" highlighting (e.g. when the user hovers an external list row), use the controlled hoveredId prop coming in Phase 4 — that is a different mechanism with a different payload.

GraphSchema

interface GraphSchema {
  categories: CategorySchema[];
  relationships: RelationshipSchema[];
}

Fields

categoriesCategorySchema[]
relationshipsRelationshipSchema[]

GraphSnapshot

interface GraphSnapshot {
  edges: EdgeData[];
  nodes: NodeData[];
  version: number;
}

Fields

edgesEdgeData[]
nodesNodeData[]
versionnumber

GraphThemeConfig

interface GraphThemeConfig {
  background: number;
  isDark: boolean;
}

Fields

backgroundnumberCanvas background color (hex number)
isDarkbooleanWhether this is a dark theme (controls text color, node ring style)

GraphThemeKey

type GraphThemeKey = typeOperator

GraphViewState

interface GraphViewState {
  edgeTextScale: number;
  effectiveMapProjection: MapProjection;
  glyphAtlasManager: GlyphAtlasManager;
  iconAtlasManager: IconAtlasManager;
  imageAtlasManager: ImageAtlasManager;
  is3D: boolean;
  isMapMode: boolean;
  layoutController: LayoutControllerInterface;
  layoutPositionProvider: PositionProvider;
  mapDamping: number;
  mapSphereRadius: number;
  textScale: number;
  theme: GraphThemeConfig;
}

Fields

edgeTextScalenumber
effectiveMapProjectionMapProjection
glyphAtlasManagerGlyphAtlasManager
iconAtlasManagerIconAtlasManager
imageAtlasManagerImageAtlasManager
is3Dboolean
isMapModeboolean
layoutControllerLayoutControllerInterface
layoutPositionProviderPositionProvider
mapDampingnumber
mapSphereRadiusnumber
textScalenumber
themeGraphThemeConfig

GridLayoutOptions

interface GridLayoutOptions {
  columns?: number;
  spacing?: number;
}

Fields

columns number
spacing numberDistance between adjacent grid cells. Default 1.5.

GroupOptions

interface GroupOptions {
  cleanupChildren?: boolean;
  id?: string;
}

Fields

cleanupChildren boolean
id string

GroupRingRendererBackend

type GroupRingRendererBackend = PublicSurface<GPUGroupRingRenderer>

GroupSnapshot

Snapshot for undo/redo

interface GroupSnapshot {
  aggregatedEdges: AggregatedEdge[];
  groups: Map<string, GroupState>;
  nodeToGroup: Map<string, string>;
}

Fields

aggregatedEdgesAggregatedEdge[]
groupsMap<string, GroupState>
nodeToGroupMap<string, string>

GroupSpec

Group configuration (user-defined)

interface GroupSpec {
  anchorNodeId?: string;
  color?: string;
  kind?: "collect" | "group";
  labelVisible?: boolean;
  name: string;
  opacity?: number;
  padding?: number;
  parentGroupId?: string;
  strokeWidth?: number;
}

Fields

anchorNodeId stringPreferred anchor member (sticky across collapse/expand). Falls back to centroid when omitted.
color stringRing/sphere color. If omitted, auto-derived from member node colors
kind "collect" | "group"Group kind. "collect" is created by CollectionManager facade; "group" is the default.
labelVisible boolean
namestring
opacity number
padding number
parentGroupId string
strokeWidth numberRing stroke width in world units (default 0.05)

GroupSphereRendererBackend

type GroupSphereRendererBackend = PublicSurface<GroupSphereRenderer>

GroupState

Group runtime state (engine-computed)

interface GroupState {
  anchorNodeId: string;
  boundingBox: object;
  center: object;
  collapsed: boolean;
  id: string;
  memberNodeIds: Set<string>;
  radius: number;
  savedAnchorColor: [number, number, number];
  savedAnchorLabel: string;
  spec: GroupSpec;
}

Fields

anchorNodeIdstringCurrently active anchor node id. Non-null iff collapsed === true.
boundingBoxobject
centerobject
collapsedboolean
idstring
memberNodeIdsSet<string>
radiusnumber
savedAnchorColor[number, number, number]Snapshot of anchor.color (RGB 0..1) before collapse; used to restore on expand.
savedAnchorLabelstringSnapshot of anchor.labels[0] before collapse; null if anchor had no label.
specGroupSpec