@kineviz/gl 0.4.2 → 0.4.4

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.
package/dist/index.d.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  import { NodeData, EdgeData as EdgeData$1, CategoryConfig, RelationshipConfig, LayoutEngineMode, LayoutEngineStatus, LayoutEngineCapabilities, LayoutGraphSnapshot, LayoutSettings, LayoutGraphDelta, LayoutTickResult, GraphEntityId, Position3D, LayoutEngineEventMap, GraphSnapshot as GraphSnapshot$1, GraphDelta, PropertyValue, GraphDeltaResult, GraphData, IndexManager, GraphQueries, GraphSchema, IconFontConfig, CategorySchema, RelationshipSchema, PropertySchema, CaptionDef } from '@kineviz/graph-core';
2
2
  export { CaptionDef, CategoryConfig, CategorySchema, ColorMappingType, EdgeCaptionConfig, EdgeData, EdgeWidthMapping, EventBus as GraphCoreEventBus, GraphData, GraphDelta, GraphDeltaMetadata, GraphDeltaResult, GraphEdgeUpdatePatch, GraphEntityId, GraphNodeUpdatePatch, GraphQueries, GraphSchema, GraphSnapshot, IconFontConfig, IconMapping, ImageUrlMapping, IndexManager, IndexSystem, LayoutEdgeDeltaPatch, LayoutEdgeRecord, LayoutEngineCapabilities, LayoutEngineEventMap, LayoutEngineMode, LayoutEngineStatus, LayoutGraphDelta, LayoutGraphSnapshot, LayoutNodeDeltaPatch, LayoutNodeRecord, LayoutSettings, LayoutTickResult, NeighborInfo, NodeCaptionConfig, NodeData, NodePinPatch, NodePositionPatch, Position3D, PropertySchema, PropertyType, PropertyValue, RelationshipConfig, RelationshipSchema, SizeMapping } from '@kineviz/graph-core';
3
3
  import { CircleLayoutOptions, GridLayoutOptions, LineLayoutOptions, SpiralLayoutOptions, CubeLayoutOptions, SphereLayoutOptions, ScatterLayoutOptions, EgoLayoutOptions, PlotAxisInfo } from '@kineviz/gpu-compute';
4
- export { AlignByLayoutOptions, CategoryAxisMapping, CircleLayoutOptions, CubeLayoutOptions, EasingType, EgoLayoutOptions, GPUForceController, GPUForceLayoutController, GPUForceLayoutEngine, GeometricLayoutConfig, GridLayoutOptions, LayoutContext, LayoutFunction, LayoutResult, LayoutTween, LineLayoutOptions, PlotAxisInfo, PlotLayoutResult, PlotMultiCategoryOptions, PlotMultiCategoryResult, PlotScatterLayoutOptions, RotateLayoutOptions, ScaleLayoutOptions, ScatterLayoutOptions, ShiftLayoutOptions, SphereLayoutOptions, SpiralLayoutOptions, StatelessComputeFn, StatelessLayoutEngine, TweenOptions, Vec3, WebGPUForceLayoutController, WebGPULayoutControllerAdapter, alignByLayout, circleLayout, computeCenter, computeDomain, cubeLayout, egoLayout, executeLayout, generateTicks, gridLayout, isWebGPUAvailable, lineLayout, linearScale, logScale, parseNumericValue, plotMultiCategoryScatterLayout, plotScatterLayout, rotateLayout, scaleLayout, scatterLayout, shiftLayout, sphereLayout, spiralLayout } from '@kineviz/gpu-compute';
4
+ export { AlignByLayoutOptions, CategoryAxisMapping, CircleLayoutOptions, CreateForceLayoutOptions, CubeLayoutOptions, EasingType, EgoLayoutOptions, ForceLayoutBackend, ForceLayoutHandle, GPUForceController, GPUForceLayoutConfig, GPUForceLayoutController, GPUForceLayoutEngine, GPULayoutControllerAdapter, GeometricLayoutConfig, GridLayoutOptions, LayoutContext, LayoutFunction, LayoutResult, LayoutTween, LineLayoutOptions, PlotAxisInfo, PlotLayoutResult, PlotMultiCategoryOptions, PlotMultiCategoryResult, PlotScatterLayoutOptions, RotateLayoutOptions, ScaleLayoutOptions, ScatterLayoutOptions, ShiftLayoutOptions, SphereLayoutOptions, SpiralLayoutOptions, StatelessComputeFn, StatelessLayoutEngine, TweenOptions, Vec3, WebGPUForceLayoutController, WebGPULayoutControllerAdapter, alignByLayout, circleLayout, computeCenter, computeDomain, createForceLayout, cubeLayout, egoLayout, executeLayout, generateTicks, gridLayout, isWebGPUAvailable, lineLayout, linearScale, logScale, parseNumericValue, plotMultiCategoryScatterLayout, plotScatterLayout, rotateLayout, scaleLayout, scatterLayout, shiftLayout, sphereLayout, spiralLayout } from '@kineviz/gpu-compute';
5
5
  import * as THREE$1 from 'three';
6
6
  import { Group, Camera, Object3D, WebGLRenderer } from 'three';
7
7
  import { OntologyRegistry, ResolvedOntology } from '@kineviz/ontology';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
- import React from 'react';
9
+ import * as React from 'react';
10
+ import React__default from 'react';
10
11
  import * as _kineviz_graph_algorithms from '@kineviz/graph-algorithms';
11
12
  import { AlgorithmContext, PageRankOptions, EigenvectorOptions, HITSOptions, BetweennessOptions, ClosenessOptions, CommonAlgorithmOptions, LabelPropagationOptions, LouvainOptions, KShortestPathsOptions, NodeScalarResult, HITSResult, NodeGroupResult, ShortestPathOptions, PathResult, KPathResult, AStarOptions, BFSTraversalOptions, DFSTraversalOptions } from '@kineviz/graph-algorithms';
12
13
  import { LLMAdapter } from '@kineviz/llm-types';
@@ -79,6 +80,20 @@ interface EdgeRenderState {
79
80
  shapes: Float32Array;
80
81
  /** Flow particle enabled [0/1], per-edge */
81
82
  flow: Float32Array;
83
+ /**
84
+ * Global flow-particle speed multiplier (1.0 = shader base speed).
85
+ * Written by EdgeFlowEffect from `EdgeFlowConfig.speed`; read each frame by
86
+ * the edge renderer into the `flowSpeed` uniform. Global because the shader
87
+ * phase is driven by one `time` uniform — concurrent flows share it (last
88
+ * started wins). `undefined` = 1.0.
89
+ */
90
+ flowSpeed?: number;
91
+ /**
92
+ * Global flow-particle color [r,g,b] in 0-1. Written by EdgeFlowEffect from
93
+ * `EdgeFlowConfig.color`; same global/last-wins semantics as `flowSpeed`.
94
+ * `undefined` = shader default green [0.2, 1.0, 0.5].
95
+ */
96
+ flowColor?: [number, number, number];
82
97
  /** Glow stream enabled [0/1], per-edge */
83
98
  glow: Float32Array;
84
99
  /** Tube glow intensity [0=off, >0=intensity], per-edge */
@@ -116,6 +131,18 @@ interface LayoutPinSink {
116
131
  */
117
132
  applyGraphDelta?(delta: unknown): void | Promise<void>;
118
133
  }
134
+ /**
135
+ * Minimal store surface a PositionProvider uses to resolve node ids into
136
+ * the canonical index space (GraphStore order) and detect structural
137
+ * staleness. GraphStore satisfies this via a thin lambda wrapper (see
138
+ * GPULayoutProviderAdapter construction in GraphContext).
139
+ * Spec: notes/specs/2026-06-10-position-coherence.md (C1/C2).
140
+ */
141
+ interface StoreIndexBridge {
142
+ getNodeIndex(id: string): number | undefined;
143
+ getNodeCount(): number;
144
+ readonly structureEpoch: number;
145
+ }
119
146
  type PositionMode = "cpu" | "gpu";
120
147
  interface PositionProvider {
121
148
  /** Position mode */
@@ -147,8 +174,18 @@ interface PositionProvider {
147
174
  * without pin side effects" path for LayoutApi tween frames and
148
175
  * MapApi.applyGeoLayout. See pin redesign spec
149
176
  * `docs/superpowers/specs/2026-05-14-pin-redesign-legacy-semantics.md`.
177
+ *
178
+ * @deprecated use writePositions
150
179
  */
151
180
  updatePositions?(ids: string[]): void;
181
+ /**
182
+ * Write world positions for the given nodes. The provider updates every
183
+ * copy it owns (CPU mirror, layoutNodes, GPU FBO) and preserves pin
184
+ * state exactly. Ids unknown to the index are skipped.
185
+ * @returns the ids actually written.
186
+ * Spec: notes/specs/2026-06-10-position-coherence.md (C4).
187
+ */
188
+ writePositions?(positions: ReadonlyMap<string, readonly [number, number, number]>): string[];
152
189
  }
153
190
  type DirtyFlag = "structure" | "edgeStructure" | "nodeColors" | "nodeSizes" | "nodeOpacities" | "nodeIcons" | "nodeImages" | "nodeSelection" | "nodeHighlight" | "nodeHover" | "nodePinned" | "nodeHidden" | "nodeRingColors" | "nodeCollection" | "edgeColors" | "edgeWidths" | "edgeOpacities" | "edgeSelection" | "edgeHighlight" | "edgeDashed" | "edgeShapes" | "nodeRipple" | "nodeBreathe" | "edgeFlow" | "edgeGlow" | "edgeTubeGlow" | "nodeHalo" | "badges" | "tags" | "collect" | "groups";
154
191
  interface UpdateStrategy$1 {
@@ -1189,6 +1226,29 @@ type Unsubscribe$1 = () => void;
1189
1226
  */
1190
1227
  declare class EventBus {
1191
1228
  private handlers;
1229
+ /** Nesting depth of suspend() calls — emissions buffer while > 0. */
1230
+ private _suspendDepth;
1231
+ /** Emissions buffered while suspended, in emission order. */
1232
+ private _buffer;
1233
+ /** True while emissions are being buffered (inside `api.batch()`). */
1234
+ get suspended(): boolean;
1235
+ /**
1236
+ * Suspend synchronous delivery: subsequent `emit` calls are buffered in
1237
+ * order until a matching {@link resume}. Nestable — only the outermost
1238
+ * `resume` flushes. Used by {@link RenderEngineApi.batch}.
1239
+ */
1240
+ suspend(): void;
1241
+ /**
1242
+ * Undo one {@link suspend}. When the outermost suspension ends, buffered
1243
+ * emissions are flushed in order.
1244
+ *
1245
+ * @param options.dedupe - When true, only the **last** buffered emission
1246
+ * per event key is delivered (coalescing for "state changed"-style
1247
+ * events). Defaults to false: every buffered emission is delivered.
1248
+ */
1249
+ resume(options?: {
1250
+ dedupe?: boolean;
1251
+ }): void;
1192
1252
  /**
1193
1253
  * Subscribe to an event and receive typed payloads on every emission.
1194
1254
  *
@@ -1227,15 +1287,22 @@ declare class EventBus {
1227
1287
  * insertion order. Handler errors are caught and logged; they do not
1228
1288
  * prevent subsequent handlers from running.
1229
1289
  *
1290
+ * While {@link suspended} (inside `api.batch()`), the emission is buffered
1291
+ * and delivered on {@link resume} instead.
1292
+ *
1230
1293
  * @param event - The event key from {@link EventMap}.
1231
1294
  * @param payload - The typed payload object for this event.
1232
1295
  */
1233
1296
  emit<K extends keyof EventMap>(event: K, payload: EventMap[K]): void;
1297
+ /** Synchronous delivery shared by emit() and resume()'s flush. */
1298
+ private _dispatch;
1234
1299
  /**
1235
1300
  * Remove all registered handlers for all events.
1236
1301
  *
1237
1302
  * Called automatically during {@link RenderEngineApi.dispose}. After this
1238
1303
  * call, previously returned {@link Unsubscribe} functions become no-ops.
1304
+ * Any buffered (suspended) emissions are dropped and the suspension
1305
+ * counter resets, so a disposed bus cannot flush into dead handlers.
1239
1306
  */
1240
1307
  removeAllListeners(): void;
1241
1308
  }
@@ -1485,6 +1552,10 @@ declare class CollectionManager {
1485
1552
  declare class GraphStore {
1486
1553
  private _version;
1487
1554
  private _iconVersion;
1555
+ private _versionChangedSubs;
1556
+ private _iconVersionChangedSubs;
1557
+ private _versionNotifyPending;
1558
+ private _iconVersionNotifyPending;
1488
1559
  private _data;
1489
1560
  private _index;
1490
1561
  private _nodeState;
@@ -1492,6 +1563,16 @@ declare class GraphStore {
1492
1563
  private _nodeCapacity;
1493
1564
  private _edgeCapacity;
1494
1565
  private _positionProvider;
1566
+ /**
1567
+ * Monotonic counter bumped whenever the node SET changes (setData /
1568
+ * addNodes / deleteNodes) — i.e. whenever the canonical id→index space
1569
+ * is rebuilt. Position caches (PositionProvider mirrors) compare this
1570
+ * against their own synced epoch to detect staleness. Edge-only and
1571
+ * style/selection/position changes do not bump it.
1572
+ * See notes/specs/2026-06-10-position-coherence.md (C2).
1573
+ */
1574
+ private _structureEpoch;
1575
+ get structureEpoch(): number;
1495
1576
  private _updateStrategy;
1496
1577
  private _queries;
1497
1578
  private _visibilityFilter;
@@ -1525,7 +1606,7 @@ declare class GraphStore {
1525
1606
  * output becomes indistinguishable from user data, and the user will be
1526
1607
  * asked to confirm overwrite on re-run.
1527
1608
  */
1528
- _algorithmPropertyKeys: Set<string>;
1609
+ private _algorithmPropertyKeys;
1529
1610
  private _defaultNodeSize;
1530
1611
  private _globalNodeSizeScale;
1531
1612
  private _edgeArrowVisible;
@@ -1540,10 +1621,12 @@ declare class GraphStore {
1540
1621
  _onBeforeRebuild?: (() => void) | null;
1541
1622
  /**
1542
1623
  * Version at which the last RenderTransaction resolved icons/renderer/picker.
1543
- * Used by NodeCloud.tsx to skip redundant icon UV resolution when a
1544
- * transaction already handled it synchronously.
1624
+ * Used by the render loop to skip redundant icon UV resolution when a
1625
+ * transaction already handled it synchronously. Accessed via
1626
+ * {@link isResolvedByTransaction} / {@link markTransactionResolved} /
1627
+ * {@link invalidateTransactionVersion}.
1545
1628
  */
1546
- _lastTransactionVersion: number;
1629
+ private _lastTransactionVersion;
1547
1630
  constructor();
1548
1631
  /**
1549
1632
  * Attach an EventBus so GraphStore can emit typed events.
@@ -1559,6 +1642,22 @@ declare class GraphStore {
1559
1642
  */
1560
1643
  setLayoutRuntime(runtime: LayoutPinSink | null): void;
1561
1644
  get version(): number;
1645
+ /**
1646
+ * True when a RenderTransaction already resolved icons/renderer/picker
1647
+ * for the current store version, so the render loop can skip redundant
1648
+ * icon UV resolution.
1649
+ */
1650
+ isResolvedByTransaction(): boolean;
1651
+ /**
1652
+ * Record that the current store version has been resolved by a
1653
+ * RenderTransaction (icons/renderer/picker are up to date).
1654
+ */
1655
+ markTransactionResolved(): void;
1656
+ /**
1657
+ * Forget the last transaction-resolved version so the render loop
1658
+ * re-resolves icon UVs on the next frame.
1659
+ */
1660
+ invalidateTransactionVersion(): void;
1562
1661
  /** Icon-specific version. Only changes when icon names or graph structure change.
1563
1662
  * Use this as a React dependency instead of `version` to avoid re-resolving
1564
1663
  * icon UVs on every hover/selection/color change. */
@@ -1568,6 +1667,27 @@ declare class GraphStore {
1568
1667
  * Call after directly mutating edgeState/nodeState arrays.
1569
1668
  */
1570
1669
  notifyChange(): void;
1670
+ /**
1671
+ * Register a callback fired (microtask-coalesced) whenever `version`
1672
+ * changes. N synchronous bumps produce at most one notification per
1673
+ * microtask checkpoint. Subscriber exceptions are isolated.
1674
+ * @returns disposer that removes the callback.
1675
+ */
1676
+ subscribeVersionChanged(fn: () => void): () => void;
1677
+ /**
1678
+ * Register a callback fired (microtask-coalesced) whenever `iconVersion`
1679
+ * changes (icon names, node structure, or icon atlas — NOT hover,
1680
+ * selection, color, size). Same coalescing/isolation semantics as
1681
+ * `subscribeVersionChanged`.
1682
+ * @returns disposer that removes the callback.
1683
+ */
1684
+ subscribeIconVersionChanged(fn: () => void): () => void;
1685
+ /** Bump `_version` and schedule a coalesced subscriber notification. */
1686
+ private _bumpVersion;
1687
+ /** Bump `_iconVersion` and schedule a coalesced subscriber notification.
1688
+ * Bumps ONLY the icon channel — every call site pairs it with its own
1689
+ * `_bumpVersion()` exactly where the previous `_version++` lived. */
1690
+ private _bumpIconVersion;
1571
1691
  get data(): GraphData;
1572
1692
  get index(): IndexManager;
1573
1693
  get nodeState(): NodeRenderState | null;
@@ -1714,16 +1834,17 @@ declare class GraphStore {
1714
1834
  * `setAllPositions`, which pushes the entire CPU array (and historically
1715
1835
  * had a pin/unpin trick that risked clobbering pre-existing pin state),
1716
1836
  * this writes only the supplied ids and calls
1717
- * `provider.updatePositions(ids)` so the GPU upload trick — when the
1837
+ * `provider.writePositions(positions)` so the GPU upload — when the
1718
1838
  * provider needs one — is restricted to the same subset.
1719
1839
  *
1720
1840
  * Pin state of nodes outside the supplied ids is untouched. Pin state of
1721
1841
  * nodes within the supplied ids is also untouched (the provider's
1722
- * `updatePositions` snapshots and restores it).
1842
+ * `writePositions` snapshots and restores it).
1723
1843
  *
1724
1844
  * Bumps `version` once. Does not record an undo command — callers that
1725
- * need history use `LayoutApi.setPositions`. See pin redesign spec
1726
- * `docs/superpowers/specs/2026-05-14-pin-redesign-legacy-semantics.md`.
1845
+ * need history use `LayoutApi.setPositions`. See position-coherence spec
1846
+ * `notes/specs/2026-06-10-position-coherence.md` for the write-path contract
1847
+ * (including pin preservation).
1727
1848
  */
1728
1849
  setPositions(positions: Map<string, [number, number, number]>): void;
1729
1850
  /**
@@ -1740,19 +1861,30 @@ declare class GraphStore {
1740
1861
  */
1741
1862
  selectNodes(nodeIds: string[]): void;
1742
1863
  /** Callback for direct renderer notification when selection changes.
1743
- * Set by GPUNodeRenderer to force-set needsUpdate on the nodeSelected attribute. */
1744
- _onSelectionChanged: (() => void) | null;
1864
+ * Set by GPUNodeRenderer to force-set needsUpdate on the nodeSelected attribute.
1865
+ * Receives the changed node indices when known (see subscribeSelectionChanged). */
1866
+ _onSelectionChanged: ((changedNodeIndices?: number[]) => void) | null;
1745
1867
  /**
1746
1868
  * Subscribers fired alongside the legacy `_onSelectionChanged` single slot.
1747
1869
  * Use `subscribeSelectionChanged()` to register; the returned function
1748
1870
  * unsubscribes. Multiple consumers (renderer, bridges) coexist safely.
1749
1871
  */
1750
- _selectionChangedSubs: Set<() => void>;
1872
+ _selectionChangedSubs: Set<(changedNodeIndices?: number[]) => void>;
1751
1873
  /**
1752
1874
  * Register a callback fired whenever selection state changes.
1875
+ *
1876
+ * The callback receives an OPTIONAL `changedNodeIndices` payload:
1877
+ * - `number[]` — the node indices whose selection state may have changed
1878
+ * (a covering superset; may contain duplicates; empty when the mutation
1879
+ * touched no node slots, e.g. edge-only selection).
1880
+ * - `undefined` — change set unknown; treat as "anything may have changed".
1881
+ *
1882
+ * Existing subscribers that ignore the argument remain fully compatible.
1753
1883
  * @returns disposer that removes the callback.
1754
1884
  */
1755
- subscribeSelectionChanged(fn: () => void): () => void;
1885
+ subscribeSelectionChanged(fn: (changedNodeIndices?: number[]) => void): () => void;
1886
+ /** Fire the legacy single-slot callback and all registered subscribers. */
1887
+ private _notifySelectionChanged;
1756
1888
  /** @deprecated No longer used — node geometry rebuild on edge structure change
1757
1889
  * is now handled in GPUNodeRenderer.update() via the "edgeStructure" dirty flag.
1758
1890
  * Kept for API compatibility but never called. */
@@ -1937,9 +2069,35 @@ declare class GraphStore {
1937
2069
  getGroupForNode(nodeId: string): GroupState | undefined;
1938
2070
  getGroupMembers(groupId: string): string[];
1939
2071
  listGroups(): GroupState[];
2072
+ /**
2073
+ * Live read-only view of all group states keyed by group id, or `null`
2074
+ * when no group storage has been allocated. Mutations go through
2075
+ * {@link getGroupManager} (or GroupsApi) — never write to this map.
2076
+ */
2077
+ get groups(): ReadonlyMap<string, GroupState> | null;
2078
+ /**
2079
+ * Look up a single group's live state by id, or `undefined` if no such
2080
+ * group exists.
2081
+ */
2082
+ getGroupById(groupId: string): GroupState | undefined;
2083
+ /**
2084
+ * Aggregated edges synthesized while groups are collapsed.
2085
+ * Returns an empty array when no group is collapsed.
2086
+ */
2087
+ getAggregatedEdges(): ReadonlyArray<AggregatedEdge>;
1940
2088
  getGroupManager(): GroupManager;
1941
2089
  private _collectionManager?;
1942
2090
  getCollectionManager(): CollectionManager;
2091
+ /**
2092
+ * True if `key` has been written by the algorithm system this session.
2093
+ * Used to distinguish algorithm output from user data when detecting
2094
+ * property collisions (session-only — not serialized).
2095
+ */
2096
+ hasAlgorithmProperty(key: string): boolean;
2097
+ /** Record that `key` was written by the algorithm system. */
2098
+ addAlgorithmProperty(key: string): void;
2099
+ /** Forget that `key` was written by the algorithm system (undo support). */
2100
+ removeAlgorithmProperty(key: string): void;
1943
2101
  hasBadgeData(): boolean;
1944
2102
  getNodeBadge(nodeId: string): BadgeSpec | null;
1945
2103
  setNodeBadge(nodeId: string, badge: BadgeSpec | null): void;
@@ -2090,6 +2248,15 @@ declare class GraphStore {
2090
2248
  /**
2091
2249
  * Position Providers - Abstractions for CPU and GPU position sources
2092
2250
  *
2251
+ * Coherence contract (notes/specs/2026-06-10-position-coherence.md):
2252
+ * - Canonical id→index mapping is GraphStore order, resolved via an
2253
+ * injected StoreIndexBridge; adapters keep no private id maps when a
2254
+ * bridge is present.
2255
+ * - The CPU mirror is a cache: epoch-checked against the store on every
2256
+ * read/write, GPU readback at most once per layout tick.
2257
+ * - All external mutation goes through writePositions()/updatePosition();
2258
+ * arrays returned by getPositions() are READ-ONLY for callers.
2259
+ *
2093
2260
  * Provides a unified interface for accessing node positions regardless
2094
2261
  * of whether they're stored on CPU (Float32Array) or GPU (FBO texture).
2095
2262
  */
@@ -2144,6 +2311,12 @@ declare class GPULayoutProviderAdapter implements PositionProvider {
2144
2311
  private layoutController;
2145
2312
  private _positions;
2146
2313
  private _nodeIdToIndex;
2314
+ /** Canonical id→index resolver injected from the store (spec C1/C2). */
2315
+ private _bridge;
2316
+ /** Store structureEpoch our CPU mirror was last synced against. */
2317
+ private _syncedEpoch;
2318
+ /** Mirror is stale relative to the GPU FBO (layout ticked since last readback). */
2319
+ private _mirrorStale;
2147
2320
  constructor(layoutController: {
2148
2321
  getPositionTexture(): THREE$1.Texture;
2149
2322
  getTextureSize(): number;
@@ -2171,11 +2344,26 @@ declare class GPULayoutProviderAdapter implements PositionProvider {
2171
2344
  }>): void;
2172
2345
  unpinNodes?(nodeIds: string[]): void;
2173
2346
  readBackPositions?(): void;
2347
+ }, opts?: {
2348
+ bridge?: StoreIndexBridge;
2174
2349
  });
2350
+ /** Resolve a node id to its canonical index (bridge first, fallback map). */
2351
+ private _indexOf;
2352
+ /** True when the store's node set changed since our last buffer sync. */
2353
+ private _epochStale;
2354
+ private _stampEpoch;
2175
2355
  /**
2176
2356
  * Initialize CPU position array from layout nodes
2177
2357
  */
2178
2358
  private _initPositionArray;
2359
+ /**
2360
+ * True while the store's node set changed but `graph.layoutNodes` has not
2361
+ * been rebuilt to match yet (spec C2 transition window). During the window
2362
+ * layoutNodes is OLD-space and the mirror may already hold NEW-space
2363
+ * writes, so neither side may overwrite the other; `onStructureResynced()`
2364
+ * closes the window.
2365
+ */
2366
+ private _inTransitionWindow;
2179
2367
  /**
2180
2368
  * Sync positions from layout nodes to CPU array
2181
2369
  * Called when layout updates positions
@@ -2185,8 +2373,32 @@ declare class GPULayoutProviderAdapter implements PositionProvider {
2185
2373
  getTextureSize(): number;
2186
2374
  getSpaceSize(): number;
2187
2375
  /**
2188
- * Get CPU positions array for drag support
2189
- * Syncs from layout nodes on first call or when stale
2376
+ * Mark the CPU mirror stale. Called by the host render loop whenever the
2377
+ * layout simulation produced new positions (where it already observes
2378
+ * `graph.renderNeedsUpdate`). `getPositions()` also treats a raised
2379
+ * `renderNeedsUpdate` flag as stale, so wiring this is an optimization,
2380
+ * not a correctness requirement. Spec C3.
2381
+ */
2382
+ invalidateMirror(): void;
2383
+ /**
2384
+ * Called by the host after it rebuilt `graph.layoutNodes` to match the
2385
+ * store (post add/delete). Re-inits the mirror from the fresh layoutNodes
2386
+ * and stamps the current structure epoch. Spec C2 transition rule.
2387
+ */
2388
+ onStructureResynced(): void;
2389
+ /**
2390
+ * Get CPU positions array for drag support.
2391
+ *
2392
+ * Dedup (spec C3): at most one GPU→CPU readback per layout tick. The
2393
+ * readback is skipped when neither the explicit `_mirrorStale` flag nor
2394
+ * the conservative `graph.renderNeedsUpdate` fallback is raised. After
2395
+ * reading back, `_mirrorStale` is cleared so subsequent callers within
2396
+ * the same tick (picker, drag handler, store snapshot) reuse the cached
2397
+ * mirror instead of stalling the GPU pipeline again.
2398
+ *
2399
+ * IMPORTANT: this method intentionally does NOT clear `renderNeedsUpdate`.
2400
+ * That flag belongs to the render scheduler (`clearNeedsUpdate()`);
2401
+ * clearing it from a read path would suppress renders.
2190
2402
  */
2191
2403
  getPositions(): Float32Array | null;
2192
2404
  /**
@@ -2209,6 +2421,39 @@ declare class GPULayoutProviderAdapter implements PositionProvider {
2209
2421
  markNeedsUpdate(): void;
2210
2422
  get needsUpdate(): boolean;
2211
2423
  clearNeedsUpdate(): void;
2424
+ /**
2425
+ * Internal: upload a subset of node positions to the GPU FBO via the
2426
+ * pin/unpin trick. Reads positions from the CPU mirror (`_positions`).
2427
+ * Pre-existing pins within the subset are preserved.
2428
+ *
2429
+ * Includes the spec-C2 transition guard: if the bridge reports a node
2430
+ * count mismatch with layoutNodes (GraphContext structure rebuild in
2431
+ * flight), this becomes a mirror-only write.
2432
+ */
2433
+ private _uploadSubset;
2434
+ /**
2435
+ * Push positions for the given subset of node ids from the CPU mirror to
2436
+ * the GPU FBO without touching pin state outside the subset.
2437
+ *
2438
+ * Uploads via `controller.pinNodes(subset)` then unpins those in the
2439
+ * subset that weren't already pinned, leaving:
2440
+ * - subset's pre-existing pins intact
2441
+ * - non-subset's pin state untouched (only the subset participates in
2442
+ * the upload trick)
2443
+ *
2444
+ * Used by `GraphStore.setPositions` for clean partial-buffer GPU sync.
2445
+ *
2446
+ * @deprecated use writePositions
2447
+ */
2448
+ updatePositions(ids: string[]): void;
2449
+ /**
2450
+ * Write world positions for the given nodes. Updates CPU mirror,
2451
+ * layoutNodes, and GPU FBO, preserving pre-existing pin state exactly.
2452
+ * Ids unknown to the index are skipped.
2453
+ * @returns the ids actually written.
2454
+ * Spec: notes/specs/2026-06-10-position-coherence.md (C4).
2455
+ */
2456
+ writePositions(positions: ReadonlyMap<string, readonly [number, number, number]>): string[];
2212
2457
  /**
2213
2458
  * Bulk-upload all node positions to the GPU FBO.
2214
2459
  *
@@ -2230,19 +2475,6 @@ declare class GPULayoutProviderAdapter implements PositionProvider {
2230
2475
  * FBO while clearing fx/fy/fz and the pinnedTexture mask so the force
2231
2476
  * shader resumes driving those nodes.
2232
2477
  */
2233
- /**
2234
- * Push positions for the given subset of node ids from the CPU mirror to
2235
- * the GPU FBO without touching pin state outside the subset.
2236
- *
2237
- * Uploads via `controller.pinNodes(subset)` then unpins those in the
2238
- * subset that weren't already pinned, leaving:
2239
- * - subset's pre-existing pins intact
2240
- * - non-subset's pin state untouched (only the subset participates in
2241
- * the upload trick)
2242
- *
2243
- * Used by `GraphStore.setPositions` for clean partial-buffer GPU sync.
2244
- */
2245
- updatePositions(ids: string[]): void;
2246
2478
  setAllPositions(positions: Float32Array | number[], opts?: {
2247
2479
  pin?: boolean;
2248
2480
  }): void;
@@ -2286,6 +2518,7 @@ declare class CPUPositionProvider implements PositionProvider {
2286
2518
  private _positions;
2287
2519
  private _spaceSize;
2288
2520
  private _needsUpdate;
2521
+ private _indexBridge;
2289
2522
  constructor(nodeCount: number);
2290
2523
  getPositionTexture(): null;
2291
2524
  getTextureSize(): number;
@@ -2297,6 +2530,13 @@ declare class CPUPositionProvider implements PositionProvider {
2297
2530
  * Set position for a single node
2298
2531
  */
2299
2532
  setPosition(index: number, x: number, y: number, z: number): void;
2533
+ /**
2534
+ * Index-based single-node write — DragHandler hot path. Same contract as
2535
+ * the adapters' updatePosition (all copies updated; here there is only
2536
+ * the one array). All in-tree providers now implement updatePosition, so
2537
+ * DragHandler no longer needs a borrowed-array fallback.
2538
+ */
2539
+ updatePosition(index: number, x: number, y: number, z?: number): void;
2300
2540
  /**
2301
2541
  * Get position for a single node
2302
2542
  */
@@ -2333,6 +2573,15 @@ declare class CPUPositionProvider implements PositionProvider {
2333
2573
  * Set space size
2334
2574
  */
2335
2575
  setSpaceSize(size: number): void;
2576
+ setIndexBridge(bridge: StoreIndexBridge | null): void;
2577
+ /**
2578
+ * Write world positions for the given nodes by index. Sets needsUpdate so
2579
+ * the renderer re-uploads the full CPU array on the next frame.
2580
+ * Ids unknown to the bridge index are skipped.
2581
+ * @returns the ids actually written.
2582
+ * Spec: notes/specs/2026-06-10-position-coherence.md (C4).
2583
+ */
2584
+ writePositions(positions: ReadonlyMap<string, readonly [number, number, number]>): string[];
2336
2585
  }
2337
2586
  /**
2338
2587
  * @deprecated Parallel to v2 contract `LayoutRuntime.getReadback()`. Migration target:
@@ -2344,6 +2593,7 @@ declare class CPUPositionProvider implements PositionProvider {
2344
2593
  declare class CPULayoutProviderAdapter implements PositionProvider {
2345
2594
  readonly mode: PositionMode;
2346
2595
  private layoutController;
2596
+ private _indexBridge;
2347
2597
  constructor(layoutController: {
2348
2598
  sharedArray: Float32Array;
2349
2599
  getSpaceSize(): number;
@@ -2392,6 +2642,15 @@ declare class CPULayoutProviderAdapter implements PositionProvider {
2392
2642
  updatePositions(_ids: string[]): void;
2393
2643
  get needsUpdate(): boolean;
2394
2644
  clearNeedsUpdate(): void;
2645
+ setIndexBridge(bridge: StoreIndexBridge | null): void;
2646
+ /**
2647
+ * Write world positions for the given nodes. Mirrors into sharedArray and
2648
+ * graph.layoutNodes when present. Sets renderNeedsUpdate.
2649
+ * Ids unknown to the bridge index are skipped.
2650
+ * @returns the ids actually written.
2651
+ * Spec: notes/specs/2026-06-10-position-coherence.md (C4).
2652
+ */
2653
+ writePositions(positions: ReadonlyMap<string, readonly [number, number, number]>): string[];
2395
2654
  }
2396
2655
  /**
2397
2656
  * Static Position Provider
@@ -2402,6 +2661,7 @@ declare class StaticPositionProvider implements PositionProvider {
2402
2661
  private _positions;
2403
2662
  private _spaceSize;
2404
2663
  private _needsUpdate;
2664
+ private _indexBridge;
2405
2665
  constructor(positions: Float32Array | Array<{
2406
2666
  x: number;
2407
2667
  y: number;
@@ -2427,6 +2687,15 @@ declare class StaticPositionProvider implements PositionProvider {
2427
2687
  * keepIndices[newIdx] = oldIdx — maps new contiguous index to old index.
2428
2688
  */
2429
2689
  remapPositions(keepIndices: number[]): void;
2690
+ setIndexBridge(bridge: StoreIndexBridge | null): void;
2691
+ /**
2692
+ * Write world positions for the given nodes. Sets needsUpdate so the
2693
+ * renderer re-uploads the full CPU array on the next frame.
2694
+ * Ids unknown to the bridge index are skipped.
2695
+ * @returns the ids actually written.
2696
+ * Spec: notes/specs/2026-06-10-position-coherence.md (C4).
2697
+ */
2698
+ writePositions(positions: ReadonlyMap<string, readonly [number, number, number]>): string[];
2430
2699
  }
2431
2700
 
2432
2701
  /**
@@ -2565,6 +2834,7 @@ declare class GPUNodeRenderer {
2565
2834
  private _lastConsumedDirtyFlags;
2566
2835
  private lastNodeCapacity;
2567
2836
  private _unsubSelection;
2837
+ private _flagsSyncedVersion;
2568
2838
  hoverDimBits: Uint8Array;
2569
2839
  hoverDimStarts: Float32Array;
2570
2840
  constructor(scene: THREE$1.Object3D, store: GraphStore, config?: GPUNodeRendererConfig);
@@ -2614,7 +2884,16 @@ declare class GPUNodeRenderer {
2614
2884
  */
2615
2885
  private updateDirtyAttributes;
2616
2886
  /**
2617
- * Update position texture uniforms
2887
+ * Update position texture uniforms.
2888
+ *
2889
+ * CPU mode: the positions→texture copy (and GPU re-upload) is gated on
2890
+ * `provider.needsUpdate` — every in-tree CPU provider sets it on any
2891
+ * position mutation, and the render loop (RenderRuntime.update /
2892
+ * GraphContext render loop) clears it only AFTER all renderers have run in
2893
+ * the same frame, so the flag is always still set here when positions moved.
2894
+ * @param forceCopy bypass the gate — used when the provider was just
2895
+ * swapped or the node structure changed (texture content may be stale
2896
+ * even though the provider's own flag is clear).
2618
2897
  */
2619
2898
  private updatePositionUniforms;
2620
2899
  /**
@@ -4106,8 +4385,11 @@ declare class DragHandler {
4106
4385
  */
4107
4386
  private getNodeLocalPosition;
4108
4387
  /**
4109
- * Write LOCAL position directly to the positions array (no coordinate transform)
4110
- * For GPU providers with updatePosition, use that method to also update the layout controller
4388
+ * Write LOCAL position directly to the provider (no coordinate transform).
4389
+ * All in-tree providers implement updatePosition (CPUPositionProvider
4390
+ * gained it in Task 7 of the position-coherence refactor); custom or
4391
+ * out-of-tree providers without it fall back to the id-keyed
4392
+ * writePositions() contract so drag writes still land.
4111
4393
  */
4112
4394
  private writeLocalPosition;
4113
4395
  /**
@@ -4168,27 +4450,19 @@ interface KeepSet {
4168
4450
  }
4169
4451
  interface HoverEmphasisConfig {
4170
4452
  duration: number;
4171
- dimOpacity: number;
4172
4453
  /**
4173
- * Dim feature: on hover, fade out everything OUTSIDE the kept set (hovered
4174
- * node + 1-hop neighbors). Independent of {@link glowEnabled}. Default
4175
- * `false` — dim is opt-in. This is the flag the legacy `setHoverEnabled`
4176
- * maps to.
4454
+ * Opacity of dimmed elements while a PROGRAMMATIC dim (trace / dimExcept /
4455
+ * setExternalKeepSet) is active. [0, 1]. Hover itself never dims — the
4456
+ * hover-dim feature was deleted; click dim (EmphasisApi focusContext) and
4457
+ * trace are the only dim sources.
4177
4458
  */
4178
- dimEnabled: boolean;
4459
+ dimOpacity: number;
4179
4460
  /**
4180
4461
  * Glow/ring feature: on hover, draw a halo ring on the hovered node (edge
4181
- * tube glow on a hovered edge). Independent of {@link dimEnabled}. Default
4182
- * `true` — the hover ring shows by default. When dim is also on, the ring
4183
- * extends to the kept set (neighbors) the same way trace emphasis does.
4462
+ * tube glow on a hovered edge). Default `true` — the hover ring shows by
4463
+ * default and is scoped to the hovered target only.
4184
4464
  */
4185
4465
  glowEnabled?: boolean;
4186
- /**
4187
- * @deprecated Legacy single master switch that coupled dim+glow. Setting it
4188
- * now maps to {@link dimEnabled} (the glow ring is governed by
4189
- * {@link glowEnabled}). Kept so old callers / serialized config still parse.
4190
- */
4191
- enabled?: boolean;
4192
4466
  /** Edge tubeGlow strength applied to kept edges. Default 1.0. */
4193
4467
  glowStrength?: number;
4194
4468
  /** Node halo strength applied to kept nodes. Default 1.0. */
@@ -4236,25 +4510,17 @@ declare class HoverEmphasisController {
4236
4510
  private _suppressed;
4237
4511
  private _lastTickTs;
4238
4512
  private _externalKeep;
4239
- private _externalEnabledBefore;
4513
+ private _externalDimActive;
4240
4514
  constructor(deps: HoverEmphasisDeps);
4241
4515
  get state(): HoverEmphasisState;
4242
4516
  get progress(): number;
4243
- _computeKeepSet(target: HoverTarget$1 | null): KeepSet | null;
4244
4517
  /**
4245
- * Glow-only keep set: just the hovered target, no neighbors. Used when
4246
- * `dimEnabled` is false — the hover ring is drawn on the node/edge under
4247
- * the cursor and nothing else lights up or dims.
4518
+ * Hover keep set: just the hovered target, no neighbors. Hover never dims,
4519
+ * so the ring is drawn on the node/edge under the cursor and nothing else
4520
+ * lights up or fades.
4248
4521
  */
4249
4522
  _singletonKeepSet(target: HoverTarget$1 | null): KeepSet | null;
4250
- /**
4251
- * Pick the keep set for a hover target by feature mode. Dim on → the full
4252
- * 1-hop neighborhood (so neighbors stay bright); dim off (glow-only) → just
4253
- * the hovered target so the ring is scoped to that node/edge.
4254
- */
4255
- private _keepSetFor;
4256
- /** True when at least one hover feature (glow ring or dim) is active, i.e.
4257
- * hover events should be processed. */
4523
+ /** True when the glow ring is active, i.e. hover events should be processed. */
4258
4524
  private _wantsHover;
4259
4525
  /**
4260
4526
  * Diff writer: drives the GPU-side bit 16 (hoverDim) on nodes/edges.
@@ -4268,18 +4534,10 @@ declare class HoverEmphasisController {
4268
4534
  */
4269
4535
  _applyKeepSet(prev: KeepSet | null, next: KeepSet | null): void;
4270
4536
  setConfig(partial: Partial<HoverEmphasisConfig>): void;
4271
- /** Enable/disable the dim feature (fade everything outside the kept set).
4272
- * Independent of the glow ring. */
4273
- setDimEnabled(enabled: boolean): void;
4274
- /** @deprecated Legacy master switch. Maps to {@link setDimEnabled} — the
4275
- * hover ring is governed independently by `glowEnabled`. */
4276
- setEnabled(enabled: boolean): void;
4277
- /** Reconcile the Disabled state with the two feature flags: the controller
4278
- * is hard-disabled only when NEITHER glow nor dim wants to act. */
4537
+ /** Reconcile the Disabled state with the glow flag: the controller is
4538
+ * hard-disabled when the glow ring is off (hover never dims, so glow is
4539
+ * the only hover feature left). */
4279
4540
  private _reconcile;
4280
- /** @deprecated Returns whether the DIM feature is enabled (legacy name). */
4281
- isEnabled(): boolean;
4282
- isDimEnabled(): boolean;
4283
4541
  isGlowEnabled(): boolean;
4284
4542
  getConfig(): HoverEmphasisConfig;
4285
4543
  onHoverEnter(target: HoverTarget$1): void;
@@ -4298,16 +4556,10 @@ declare class HoverEmphasisController {
4298
4556
  */
4299
4557
  setExternalKeepSet(keepNodes: Iterable<string>, keepEdges: Iterable<string>): void;
4300
4558
  /** Cancel the programmatic dim. Per-instance un-dim ramps fire smoothly.
4301
- * Restores the pre-external `_config.dimEnabled` so a trace started with
4302
- * hover-dim disabled stays off — even if a click happens MID-ramp.
4303
- * We set `_config.dimEnabled` synchronously (rather than deferring to
4304
- * `_enterIdle`) because `onMouseDown` unregisters the ramp frame
4305
- * callback as part of Suppressed-state housekeeping; without an
4306
- * immediate flip, click→mouseup leaves the controller in Idle with
4307
- * `dimEnabled === true`, and the next hover re-triggers dim. The state
4308
- * machine still cycles through RampingDown→Idle to play the visual
4309
- * un-dim animation; `onHoverEnter`/`onHoverMove` scope the kept set by
4310
- * `dimEnabled` so the intermediate states draw the ring without dimming. */
4559
+ * `_externalDimActive` is dropped synchronously so a click that lands
4560
+ * MID-ramp (onMouseDown unregisters the ramp frame callback) can never
4561
+ * strand the controller with dim writes still armed — hover afterwards
4562
+ * draws only the ring, never a fade. */
4311
4563
  clearExternalKeepSet(): void;
4312
4564
  onMouseDown(button: number): void;
4313
4565
  onMouseUp(): void;
@@ -4322,14 +4574,18 @@ declare class HoverEmphasisController {
4322
4574
  /**
4323
4575
  * Hover Handler
4324
4576
  *
4325
- * Tracks mouse hover state over nodes and edges with debouncing.
4577
+ * Tracks mouse hover state over nodes and edges with rate-limited picking.
4326
4578
  * Integrates with GraphStore for hover visual feedback.
4327
4579
  */
4328
4580
 
4329
4581
  interface HoverHandlerConfig {
4330
- /** Debounce time in ms before triggering hover */
4582
+ /** Minimum interval in ms between hover-driven picks (leading+trailing throttle).
4583
+ * Defaults to HOVER_PICK_INTERVAL_MS (40 ms ≈ 25 Hz). */
4584
+ throttleMs?: number;
4585
+ /** @deprecated Use throttleMs. Kept as an alias for backward compatibility:
4586
+ * when provided (and throttleMs is not), it sets the throttle interval. */
4331
4587
  debounceMs?: number;
4332
- /** Delay before showing hover (after debounce) */
4588
+ /** Delay before showing hover (after throttle admits a pick) */
4333
4589
  delayMs?: number;
4334
4590
  /** Asymmetric hover-leave delay (ms). When the picker reports "background"
4335
4591
  * after a node/edge was hovered, wait this long before committing the
@@ -4345,7 +4601,8 @@ declare class HoverHandler {
4345
4601
  private config;
4346
4602
  private groupHitTest;
4347
4603
  private state;
4348
- private debounceTimer;
4604
+ private lastPickTime;
4605
+ private throttleTimer;
4349
4606
  private delayTimer;
4350
4607
  private leaveTimer;
4351
4608
  private pendingPosition;
@@ -4365,11 +4622,24 @@ declare class HoverHandler {
4365
4622
  get enabled(): boolean;
4366
4623
  set enabled(value: boolean);
4367
4624
  /**
4368
- * Handle mouse move - debounced hover detection
4625
+ * Handle mouse move — throttled hover detection (leading + trailing).
4626
+ *
4627
+ * Each hover pick is a GPU readback stall, so picks are capped at
4628
+ * config.throttleMs intervals:
4629
+ * - If enough time has passed since the last pick, pick immediately (leading).
4630
+ * - Otherwise, schedule exactly one trailing pick for when the interval
4631
+ * elapses; intermediate moves only refresh pendingPosition, so the
4632
+ * trailing pick always uses the LATEST coordinates.
4633
+ * The trailing pick guarantees hover state is never stale once the mouse
4634
+ * comes to rest.
4369
4635
  */
4370
4636
  onMouseMove(screenX: number, screenY: number): void;
4637
+ /** Apply the optional show-delay, then run the hover pick. */
4638
+ private runHoverCheck;
4371
4639
  /**
4372
- * Force immediate hover check (e.g., after click)
4640
+ * Force immediate hover check (e.g., after click).
4641
+ * Bypasses the throttle; counts as a pick for throttling purposes so the
4642
+ * next mousemove doesn't immediately pick again.
4373
4643
  */
4374
4644
  checkHoverImmediate(screenX: number, screenY: number): void;
4375
4645
  /**
@@ -4388,7 +4658,11 @@ declare class HoverHandler {
4388
4658
  onChange(handler: HoverChangeHandler): () => void;
4389
4659
  private emit;
4390
4660
  /**
4391
- * Update debounce configuration
4661
+ * Update the hover-pick throttle interval (ms).
4662
+ */
4663
+ setThrottleMs(ms: number): void;
4664
+ /**
4665
+ * @deprecated Use setThrottleMs. Alias kept for backward compatibility.
4392
4666
  */
4393
4667
  setDebounceMs(ms: number): void;
4394
4668
  /**
@@ -5231,6 +5505,8 @@ interface BufferTextSource {
5231
5505
  sizeResolver?: (index: number) => number;
5232
5506
  /** Return true if node at index is hidden. Default: false */
5233
5507
  hiddenResolver?: (index: number) => boolean;
5508
+ /** Return dim opacity for a node index (focusContext / click dim). Default: 1 */
5509
+ opacityResolver?: (index: number) => number;
5234
5510
  }
5235
5511
  /**
5236
5512
  * Text item to render
@@ -5352,6 +5628,23 @@ declare class TextCloud {
5352
5628
  clearAllHoverDim(): void;
5353
5629
  /** Forward hover-emphasis uniform writes (u_hoverProgress / u_hoverDimOpacity). */
5354
5630
  setHoverUniform(name: "u_hoverProgress" | "u_hoverDimOpacity", value: number): void;
5631
+ /**
5632
+ * Cull cache: skips frustum cull + distance sort + glyph re-layout when
5633
+ * neither the view nor the items changed since the last updateTexts().
5634
+ * All inputs consumed by updateTexts are covered: items via a per-field
5635
+ * value snapshot (writeTextItemSignature), everything else via the numeric
5636
+ * view signature built in _fillViewSignature().
5637
+ */
5638
+ private _cullCache;
5639
+ /** Reused buffer for the view signature (no per-frame allocation). */
5640
+ private _viewSigValues;
5641
+ /**
5642
+ * Collect every non-item input of updateTexts() into a flat numeric array:
5643
+ * scene/camera/projection matrices, renderer size & pixel ratio, the
5644
+ * store's global node size scale, label config and placement state.
5645
+ * Epsilon-compared by CullCache (1e-4) so idle-camera frames hit the cache.
5646
+ */
5647
+ private _fillViewSignature;
5355
5648
  updateTexts(items: TextItem[]): void;
5356
5649
  /**
5357
5650
  * Buffer-direct culling for large graphs (10K+ nodes).
@@ -5663,7 +5956,7 @@ type IconSpec = {
5663
5956
  name: string;
5664
5957
  } | {
5665
5958
  kind: "component";
5666
- render: React.FC<{
5959
+ render: React__default.FC<{
5667
5960
  size?: number;
5668
5961
  className?: string;
5669
5962
  }>;
@@ -7570,6 +7863,23 @@ interface SizeMappingOptions {
7570
7863
  maxSize?: number;
7571
7864
  /** Restrict to a specific category */
7572
7865
  category?: string;
7866
+ /**
7867
+ * How the raw property value is normalized before mapping into
7868
+ * `[minSize, maxSize]`. Default `"linear"`.
7869
+ *
7870
+ * - `"linear"` — value maps proportionally. On skewed / heavy-tailed data
7871
+ * (e.g. one node = 1, another = 10000) this crushes almost every node to
7872
+ * `minSize` and blows the single outlier up to `maxSize`.
7873
+ * - `"sqrt"` — maps by **area** (radius ∝ √value): a 100× value becomes a
7874
+ * 10× radius, not 100×. The perceptually-even choice for counts/weights.
7875
+ * - `"log"` — compresses wide / heavy-tailed ranges so mid-range values
7876
+ * still get a meaningful size (1 vs 10000 no longer collapses the middle).
7877
+ * Non-positive values are shifted into the positive domain first.
7878
+ *
7879
+ * The output is always clamped to `[minSize, maxSize]`, so no scale can make
7880
+ * a node larger than `maxSize`.
7881
+ */
7882
+ scale?: "linear" | "sqrt" | "log";
7573
7883
  }
7574
7884
  interface ImageMappingOptions {
7575
7885
  /** Restrict to a specific category */
@@ -7775,18 +8085,22 @@ declare class StyleApi {
7775
8085
  /**
7776
8086
  * Size nodes proportionally to the numeric value of a property.
7777
8087
  *
7778
- * The minimum observed value maps to `minSize` and the maximum to `maxSize`;
7779
- * values in between are linearly interpolated. All `SetNodeSize` commands
7780
- * are wrapped in a single labeled transaction — one undo step.
7781
- * Emits `"style:changed"`.
8088
+ * The minimum observed value maps to `minSize` and the maximum to `maxSize`.
8089
+ * Intermediate values are interpolated through the chosen `scale` curve
8090
+ * (`"linear"` by default; `"sqrt"` for area-even sizing, `"log"` for wide /
8091
+ * heavy-tailed ranges — see {@link SizeMappingOptions.scale}). The output is
8092
+ * always clamped to `[minSize, maxSize]`, so a single huge outlier can never
8093
+ * blow a node up past `maxSize`. All `SetNodeSize` commands are wrapped in a
8094
+ * single labeled transaction — one undo step. Emits `"style:changed"`.
7782
8095
  *
7783
8096
  * @param property - Name of the node property to use for size mapping.
7784
- * @param options - Output size range and optional category filter.
8097
+ * @param options - Output size range, normalization scale, optional category filter.
7785
8098
  * @returns Resolves once all nodes have been resized and the event emitted.
7786
8099
  *
7787
8100
  * @example
7788
8101
  * ```ts
7789
- * await api.style.sizeNodesByProperty("weight", { minSize: 5, maxSize: 40 });
8102
+ * // Heavy-tailed data (1 … 10000): log keeps the middle visible.
8103
+ * await api.style.sizeNodesByProperty("weight", { minSize: 5, maxSize: 40, scale: "log" });
7790
8104
  * ```
7791
8105
  */
7792
8106
  sizeNodesByProperty(property: string, options?: SizeMappingOptions): Promise<void>;
@@ -7808,7 +8122,7 @@ declare class StyleApi {
7808
8122
  * Assign or clear the icon for a single node.
7809
8123
  *
7810
8124
  * Pass `null` to remove the icon. Recorded in history as `"SetNodeIcon"`.
7811
- * Resets `store._lastTransactionVersion` to `-1` so the render loop
8125
+ * Invalidates the store's transaction version so the render loop
7812
8126
  * re-resolves icon UVs on the next frame.
7813
8127
  * Does not emit `"style:changed"`.
7814
8128
  *
@@ -7827,7 +8141,7 @@ declare class StyleApi {
7827
8141
  * Assign the same icon to all nodes belonging to the given category.
7828
8142
  *
7829
8143
  * All `SetNodeIcon` commands are wrapped in a single labeled transaction —
7830
- * one undo step. Resets `store._lastTransactionVersion` to `-1` to force
8144
+ * one undo step. Invalidates the store's transaction version to force
7831
8145
  * icon UV re-resolution on the next render frame.
7832
8146
  * Emits `"style:changed"`.
7833
8147
  *
@@ -8012,6 +8326,17 @@ declare class StyleApi {
8012
8326
  * ```
8013
8327
  */
8014
8328
  setCaptions(options: CaptionOptions): Promise<void>;
8329
+ /**
8330
+ * Mirror a setCaptions() request into the VisualMapper's per-category
8331
+ * `captionConfig` — the same surface the legend's Caption tab writes. This is
8332
+ * what actually makes captions render: TextLayer's caption build short-circuits
8333
+ * to the VisualMapper config whenever any category has config (e.g. after a
8334
+ * color-by-property), so feeding only a layer `property` prop would be ignored.
8335
+ *
8336
+ * With no `category`, applies to every node category currently in the graph.
8337
+ * With no `property`, clears the caption on the targeted categories.
8338
+ */
8339
+ private _applyCaptionsToVisualMapper;
8015
8340
  /**
8016
8341
  * Set the global scale factor applied to all caption text.
8017
8342
  *
@@ -10525,7 +10850,18 @@ declare class EmphasisApi {
10525
10850
  private effectManager;
10526
10851
  private hoverEmphasis;
10527
10852
  private nextId;
10528
- constructor(store: GraphStore, effectManager: EffectManager, hoverEmphasis?: HoverEmphasisController | null);
10853
+ private interaction;
10854
+ private _clickDimEnabled;
10855
+ private _clickDimUnsub;
10856
+ private _clickDimAnchor;
10857
+ constructor(store: GraphStore, effectManager: EffectManager, hoverEmphasis?: HoverEmphasisController | null, interaction?: InteractionManager | null);
10858
+ /**
10859
+ * Wire (or rewire) the {@link InteractionManager}. Called by
10860
+ * `RenderEngineApi.wireInteraction` once the React component mounts and the
10861
+ * real interaction manager exists. Re-installs the click-dim listener if the
10862
+ * feature is currently enabled.
10863
+ */
10864
+ wireInteraction(interaction: InteractionManager | null): void;
10529
10865
  /**
10530
10866
  * Start a path highlight effect that sequentially illuminates nodes and edges along a path.
10531
10867
  *
@@ -10599,33 +10935,41 @@ declare class EmphasisApi {
10599
10935
  */
10600
10936
  stopAll(type?: EmphasisType): void;
10601
10937
  /**
10602
- * Enable or disable the hover-DIM feature (fade everything outside the
10603
- * hovered node's 1-hop neighborhood).
10938
+ * Enable or disable **click-DIM**: the engine listens for clicks and runs a
10939
+ * focus-and-context dim so the clicked target stands out.
10940
+ *
10941
+ * - Click a **node** → keep that node + its 1-hop neighborhood (nodes AND
10942
+ * the connecting edges) bright; fade everything else.
10943
+ * - Click an **edge** → keep the edge's two endpoint nodes (and the edge)
10944
+ * bright; fade everything else — same focus treatment as a node.
10945
+ * - Click the **same target** again, or click the **background** → clear.
10604
10946
  *
10605
10947
  * **Independent of the hover ring.** The ring/halo is governed by
10606
10948
  * {@link setEmphasisGlowEnabled} (on by default); this switch only controls
10607
- * the dimming of non-neighbors. Default `false` — dim is opt-in.
10949
+ * the click-driven dim. Default `false` — opt-in.
10608
10950
  *
10609
- * When enabled, hovering a node dims all other nodes and edges except the
10610
- * hovered node, its 1-hop neighbors, and the connecting edges. When
10611
- * disabled, hovering still shows the ring (if glow is on) but fades nothing.
10951
+ * Dimming is applied with {@link focusContext} (direct opacity), which
10952
+ * renders reliably even when the force layout has settled and the render
10953
+ * loop is idle. Requires a wired {@link InteractionManager} (present once
10954
+ * the canvas is mounted); enabling before that is fine — the listener is
10955
+ * installed when interaction is wired.
10612
10956
  *
10613
10957
  * Not undoable. Not recorded in history.
10614
10958
  *
10615
- * @param enabled - `true` to enable hover dimming, `false` to disable.
10959
+ * @param enabled - `true` to enable click dimming, `false` to disable.
10616
10960
  */
10617
- setHoverDimEnabled(enabled: boolean): void;
10961
+ setClickDimEnabled(enabled: boolean): void;
10962
+ /** Returns whether click-dim is currently enabled. */
10963
+ isClickDimEnabled(): boolean;
10964
+ /** (Re)subscribe the click listener. Safe to call repeatedly. */
10965
+ private _installClickDim;
10966
+ private _uninstallClickDim;
10967
+ private _onClickDim;
10968
+ private _clearClickDim;
10618
10969
  /**
10619
- * @deprecated Legacy name for {@link setHoverDimEnabled} — historically this
10620
- * was the single master switch that coupled dim and glow. It now controls
10621
- * only the dim feature (the ring is governed by
10622
- * {@link setEmphasisGlowEnabled}). Prefer `setHoverDimEnabled`.
10623
- *
10624
- * @param enabled - `true` to enable hover dimming, `false` to disable.
10625
- */
10626
- setHoverEnabled(enabled: boolean): void;
10627
- /**
10628
- * Set the opacity of dimmed nodes and edges during hover emphasis.
10970
+ * Set the opacity of dimmed nodes and edges during a PROGRAMMATIC dim
10971
+ * (trace / {@link dimExcept} / {@link dimNeighborhood}). Hover itself never
10972
+ * dims — the hover-dim feature was deleted.
10629
10973
  *
10630
10974
  * Clamped to `[0, 1]`. Default `0.15` (i.e. dimmed elements render at 15%
10631
10975
  * of their normal opacity). A value of `0` makes non-kept elements fully
@@ -10654,11 +10998,10 @@ declare class EmphasisApi {
10654
10998
  * Enable or disable the hover RING (node halo + edge tube glow). Default
10655
10999
  * `true` — the ring shows on hover out of the box.
10656
11000
  *
10657
- * **Independent of the dim feature** ({@link setHoverDimEnabled}). In
10658
- * glow-only mode (dim off) the ring is drawn on the hovered node alone; when
10659
- * dim is also on, it extends to the kept set (1-hop neighbors), the same way
10660
- * trace emphasis lights up its whole keep set. Does not affect the dim
10661
- * opacity controlled by {@link setHoverDimOpacity}.
11001
+ * **Independent of the dim feature** ({@link setClickDimEnabled}). The ring
11002
+ * is drawn on the hovered node alone; hover never dims (the hover-dim
11003
+ * feature was deleted). Does not affect the dim opacity used by trace dim
11004
+ * ({@link setHoverDimOpacity}).
10662
11005
  *
10663
11006
  * Not undoable. Not recorded in history.
10664
11007
  *
@@ -10685,15 +11028,6 @@ declare class EmphasisApi {
10685
11028
  * default, values above `1` intensify.
10686
11029
  */
10687
11030
  setEmphasisHaloStrength(strength: number): void;
10688
- /**
10689
- * Returns whether the hover-DIM feature is enabled.
10690
- *
10691
- * @returns `true` if hover dimming will fire on hover-enter; `false`
10692
- * otherwise (the ring may still show — see {@link setEmphasisGlowEnabled}).
10693
- * Also returns `false` when no {@link HoverEmphasisController} is wired
10694
- * (the API was constructed without a controller).
10695
- */
10696
- isHoverEnabled(): boolean;
10697
11031
  /**
10698
11032
  * Programmatic dim. Apply an arbitrary keep set — every node / edge
10699
11033
  * outside it fades out via the same per-instance shader path that
@@ -12464,7 +12798,14 @@ declare class GroupsApi {
12464
12798
  * Dissolve a group: remove the group metadata while leaving its member
12465
12799
  * nodes in the graph.
12466
12800
  *
12467
- * Not undoable. Emits `"group:dissolved"`.
12801
+ * If the group is currently collapsed it is expanded first (restoring
12802
+ * member visibility, the anchor's visuals, and removing aggregated
12803
+ * virtual edges) — `GroupManager.dissolveGroup` only deletes metadata,
12804
+ * so dissolving a collapsed group directly would leave members
12805
+ * permanently hidden.
12806
+ *
12807
+ * Not undoable. Emits `"group:dissolved"` (and `"group:expanded"` first
12808
+ * when the group was collapsed).
12468
12809
  *
12469
12810
  * @param groupId - ID of the group to dissolve.
12470
12811
  */
@@ -12708,6 +13049,24 @@ interface SlippyMapGlobeConfig {
12708
13049
  minLevel?: number;
12709
13050
  maxLevel?: number;
12710
13051
  mercatorProjection?: boolean;
13052
+ /**
13053
+ * Anisotropic filtering level applied to every tile texture. Sharpens tiles
13054
+ * viewed at grazing angles (the globe's silhouette). Three.js clamps this to
13055
+ * the GPU's max, so passing a high value (e.g. 16) is safe. Default: 16.
13056
+ */
13057
+ anisotropy?: number;
13058
+ /**
13059
+ * Render a fresnel atmosphere shell around the globe (the soft rim glow).
13060
+ * Default: true.
13061
+ */
13062
+ atmosphere?: boolean;
13063
+ /** Atmosphere glow color. Default: 0x4d7fc4 (cool blue). */
13064
+ atmosphereColor?: number | string;
13065
+ /**
13066
+ * Atmosphere shell thickness as a fraction of the globe radius. The shell
13067
+ * sphere is rendered at radius * (1 + altitude). Default: 0.15.
13068
+ */
13069
+ atmosphereAltitude?: number;
12711
13070
  }
12712
13071
  declare class SlippyMapGlobe extends Group {
12713
13072
  private _radius;
@@ -12718,10 +13077,40 @@ declare class SlippyMapGlobe extends Group {
12718
13077
  private _isInView;
12719
13078
  private _camera?;
12720
13079
  private _innerBackLayer;
13080
+ private _anisotropy;
13081
+ private _atmosphere?;
13082
+ /**
13083
+ * Tiles whose texture has just loaded and are fading in (opacity 0→1). A new
13084
+ * finer-level tile cross-dissolves over the coarse tile beneath it instead of
13085
+ * hard-popping in, which removes the visible "tile switching" when zooming
13086
+ * the whole-globe view (where the entire hemisphere re-tiles at once).
13087
+ */
13088
+ private _fadingTiles;
13089
+ /** Request a re-render (so fades animate under on-demand rendering). */
13090
+ private _invalidate?;
12721
13091
  minLevel: number;
12722
13092
  maxLevel: number;
12723
13093
  thresholds: number[];
13094
+ /**
13095
+ * Degrees of arc per tile-geometry segment. Lower = finer tessellation, so
13096
+ * the per-vertex Mercator UV warp is sampled more densely and big (low-zoom)
13097
+ * tiles render coastlines at the correct latitude instead of a coarse
13098
+ * piecewise-linear approximation. 2° keeps even a 60°-tall level-2 tile
13099
+ * geodetically accurate.
13100
+ */
12724
13101
  curvatureResolution: number;
13102
+ /**
13103
+ * Bias added to the camera-distance-derived tile zoom level. Kept at 0:
13104
+ * sharpness now comes from the @2x retina tile provider (512px tiles), which
13105
+ * already gives level-N the texel density of level-(N+1) WITHOUT quadrupling
13106
+ * the tile count. A positive bias on top of retina was redundant — it loaded
13107
+ * one level finer than needed (4× more tiles, each 4× the pixels, each built
13108
+ * with a fresh SphereGeometry + Mercator UV warp on the main thread), which
13109
+ * is what caused the zoom-time loading stutter. Coastline *position* accuracy
13110
+ * (the geo-node alignment) is provided by `curvatureResolution`, not by this
13111
+ * bias, so it stays correct at 0.
13112
+ */
13113
+ lodBias: number;
12725
13114
  tileMargin: number;
12726
13115
  constructor(radius: number, config?: SlippyMapGlobeConfig);
12727
13116
  get tileUrl(): TileUrlFn | undefined;
@@ -12738,6 +13127,31 @@ declare class SlippyMapGlobe extends Group {
12738
13127
  get level(): number;
12739
13128
  set level(level: number);
12740
13129
  get radius(): number;
13130
+ /**
13131
+ * Provide a render-invalidation callback so freshly-loaded tiles can animate
13132
+ * their fade-in even when the scene is otherwise idle (on-demand rendering).
13133
+ */
13134
+ setInvalidate(fn: (() => void) | undefined): void;
13135
+ /**
13136
+ * Advance the opacity of any tiles currently fading in. Called once per frame
13137
+ * from updatePov. Self-schedules the next frame via `_invalidate` while any
13138
+ * fade is still in progress.
13139
+ */
13140
+ private _updateTileFades;
13141
+ /** Whether the atmosphere shell is currently present. */
13142
+ get hasAtmosphere(): boolean;
13143
+ /**
13144
+ * Toggle / restyle the atmosphere glow at runtime.
13145
+ * Pass `enabled: false` to remove it.
13146
+ */
13147
+ setAtmosphere(opts?: {
13148
+ enabled?: boolean;
13149
+ color?: number | string;
13150
+ altitude?: number;
13151
+ coefficient?: number;
13152
+ power?: number;
13153
+ }): void;
13154
+ private _buildAtmosphere;
12741
13155
  updatePov(camera?: Camera): void;
12742
13156
  clearTiles(): void;
12743
13157
  private _buildMetaLevel;
@@ -12804,6 +13218,19 @@ interface EnableMapOptions {
12804
13218
  /** Auto-fit view to all nodes on enable. Default: true. */
12805
13219
  autoFit?: boolean;
12806
13220
  }
13221
+ interface DisableMapOptions {
13222
+ /**
13223
+ * @internal — layer-swap confirmation token.
13224
+ *
13225
+ * When the outgoing auto map layer's unmount cleanup fires as part of a
13226
+ * 2D↔3D layer swap (FlatLayer↔GlobeLayer while the map stays active), it
13227
+ * carries the token returned by the {@link MapApi.beginLayerSwap} call that
13228
+ * armed the swap. `disableMap` suppresses its teardown only when this token
13229
+ * matches the pending one. Genuine "Hide Map" calls must NOT pass a token —
13230
+ * they always tear down.
13231
+ */
13232
+ swapToken?: number;
13233
+ }
12807
13234
  /**
12808
13235
  * How to resolve which node properties carry latitude / longitude.
12809
13236
  * - `'auto'`: search common names (`lat`, `latitude`, `lng`, `lon`, `long`,
@@ -13029,22 +13456,28 @@ declare class MapApi {
13029
13456
  private _autoFitDuration;
13030
13457
  private _autoFitDebounceMs;
13031
13458
  private _transitioning;
13032
- private _inLayerSwap;
13033
- private _layerSwapArmedAt;
13034
- private static readonly LAYER_SWAP_SUPPRESS_WINDOW_MS;
13035
- private _elevation;
13036
- private _appliedElevation;
13459
+ private _pendingSwapToken;
13460
+ private _nextSwapToken;
13037
13461
  /**
13038
- * Subsystem-owned bookkeeping: tracks the geo nodes Map ITSELF pinned
13039
- * via applyGeoLayout. Excludes nodes that were already pinned before
13040
- * applyGeoLayout ran (e.g. user pin, drag pin). Used by releaseGeoLayout
13041
- * / disableMap to only un-pin Map's own contributions, so leaving map
13042
- * mode does not clobber prior pin state.
13462
+ * Per-node map bookkeeping — the SINGLE source of truth for:
13463
+ *
13464
+ * - `elevation`: desired elevation offset above the map surface
13465
+ * (cleared on disableMap full teardown);
13466
+ * - `appliedElevation`: elevation already baked into the position buffer
13467
+ * (tracks what `_reapplyElevationFor` has written);
13468
+ * - `pinnedByMap`: subsystem-owned pin bookkeeping — true for the geo
13469
+ * nodes Map ITSELF pinned via applyGeoLayout. Excludes nodes that were
13470
+ * already pinned before applyGeoLayout ran (e.g. user pin, drag pin).
13471
+ * Used by releaseGeoLayout / disableMap to only un-pin Map's own
13472
+ * contributions, so leaving map mode does not clobber prior pin state.
13473
+ * See docs/superpowers/specs/2026-05-14-pin-redesign-legacy-semantics.md
13474
+ * for the "subsystem-owned bookkeeping" rationale.
13043
13475
  *
13044
- * See docs/superpowers/specs/2026-05-14-pin-redesign-legacy-semantics.md
13045
- * for the "subsystem-owned bookkeeping" rationale.
13476
+ * There is exactly ONE reset path: `_mapNodeState.clear()` — called from
13477
+ * disableMap's full teardown and the graph:dataReset handler, clearing all
13478
+ * three facets atomically.
13046
13479
  */
13047
- private _geoPinnedIds;
13480
+ private readonly _mapNodeState;
13048
13481
  /**
13049
13482
  * Coordinate provider. Initialized with scale=1 (raw earth meters) but
13050
13483
  * **rebuilt in {@link enableMap}** to use the active map's scale
@@ -13056,6 +13489,19 @@ declare class MapApi {
13056
13489
  */
13057
13490
  private _defaultCoordProvider;
13058
13491
  constructor(store: GraphStore, executor: CommandExecutor, events: EventBus);
13492
+ /** Get-or-create the bookkeeping record for a node. */
13493
+ private _nodeState;
13494
+ /** Drop a node's record once every facet is back to its default. */
13495
+ private _pruneNodeState;
13496
+ /** Ids with a desired elevation offset recorded. */
13497
+ private _idsWithElevation;
13498
+ /** Forget all baked-in elevation tracking (the offsets themselves stay). */
13499
+ private _clearAppliedElevation;
13500
+ /** Whether applyGeoLayout pinned at least one node that is still tracked. */
13501
+ private _hasMapPinnedNodes;
13502
+ private get _elevation();
13503
+ private get _appliedElevation();
13504
+ private get _geoPinnedIds();
13059
13505
  /**
13060
13506
  * Pre-register all built-in providers: 13 free (from FREE_PROVIDER_META)
13061
13507
  * and 3 Mapbox factory-based providers.
@@ -13149,28 +13595,39 @@ declare class MapApi {
13149
13595
  */
13150
13596
  enableMap(options?: EnableMapOptions): Promise<void>;
13151
13597
  /**
13152
- * Mark that the NEXT `disableMap()` is part of a 2D↔3D layer swap
13153
- * (FlatLayer↔GlobeLayer), not a real map-off, so that single call skips its
13154
- * teardown (and crucially its geo unpin). Call this immediately before
13155
- * swapping the auto map layer while the map stays active.
13598
+ * Arm a 2D↔3D layer swap (FlatLayer↔GlobeLayer): the `disableMap()` fired
13599
+ * by the OUTGOING layer's unmount cleanup is part of the swap, not a real
13600
+ * map-off, so it must skip its teardown (and crucially its geo unpin).
13601
+ * Call this immediately before swapping the auto map layer while the map
13602
+ * stays active, and thread the returned token into that one consuming
13603
+ * `disableMap({ swapToken })` call.
13156
13604
  *
13157
- * Self-limiting: the flag is consumed by the next `disableMap()`, cleared by
13158
- * any `enableMap()` (the incoming layer's mount), AND time-boxed — see
13159
- * `LAYER_SWAP_SUPPRESS_WINDOW_MS`. The time box guarantees a flag that was
13160
- * armed but never consumed (layer updated in place rather than
13161
- * unmount→remount) cannot linger to swallow a later genuine "Hide Map".
13605
+ * Token confirmation makes the suppression self-limiting without any time
13606
+ * box: only a `disableMap` that carries the matching pending token is
13607
+ * suppressed (and consumes the token); `disableMap()` calls without a
13608
+ * token — every genuine user "Hide Map" — always tear down, so a pending
13609
+ * token that was armed but never consumed (layer updated in place rather
13610
+ * than unmount→remount) cannot linger to swallow one. The pending token is
13611
+ * also cleared by any `enableMap()` (the incoming layer's mount).
13162
13612
  *
13163
- * @internal — used by GraphContext's auto-map-layer effect.
13613
+ * @returns the swap token to pass to the consuming `disableMap` call.
13614
+ *
13615
+ * @internal — used by GraphContext's auto-map-layer effect, threaded to
13616
+ * the layers via their `swapTokenRef` prop.
13164
13617
  */
13165
- beginLayerSwap(): void;
13618
+ beginLayerSwap(): number;
13166
13619
  /**
13167
13620
  * Disable map mode and restore the scene to its pre-map state.
13168
13621
  *
13169
13622
  * Phase 1: records state and emits event. Scene teardown is Phase 2/3.
13170
13623
  *
13171
13624
  * Emits `"map:disabled"`.
13625
+ *
13626
+ * @param options.swapToken `@internal` layer-swap confirmation token — see
13627
+ * {@link beginLayerSwap} and {@link DisableMapOptions}. Calls without a
13628
+ * token (the public "Hide Map" path) always perform the full teardown.
13172
13629
  */
13173
- disableMap(): void;
13630
+ disableMap(options?: DisableMapOptions): void;
13174
13631
  /**
13175
13632
  * Re-enable + reheat the live force layout so released nodes re-flow.
13176
13633
  *
@@ -14113,6 +14570,260 @@ declare class HoverApi {
14113
14570
  get(): HoverTarget | null;
14114
14571
  }
14115
14572
 
14573
+ /**
14574
+ * Layer.ts — Engine Layer Standard contract for @kineviz/gl.
14575
+ *
14576
+ * A "Layer" is a pluggable rendering unit. It owns a {@link LayerRenderer}
14577
+ * (the imperative Three.js side) plus a thin React wrapper that mounts it as a
14578
+ * `<GraphCanvas>` child. Layers only ever touch the narrow {@link LayerContext}
14579
+ * surface below — never engine internals — so adding a feature is "add a layer",
14580
+ * not "edit engine core".
14581
+ *
14582
+ * See LAYER_STANDARD.md (this folder) for conventions and reference
14583
+ * implementations (GlobeLayer / FlatLayer / AxisLayer).
14584
+ */
14585
+
14586
+ /**
14587
+ * The narrow context surface handed to a layer. This is intentionally a strict
14588
+ * subset of the full GraphContext value: layers receive only what they need to
14589
+ * render, never the engine's mutable internals.
14590
+ */
14591
+ interface LayerContext {
14592
+ /** The group ALL layer objects must be added to (never `scene`). */
14593
+ cloudScene: THREE$1.Group;
14594
+ /** The (stationary) engine camera. Read-only for layers. */
14595
+ camera: THREE$1.PerspectiveCamera;
14596
+ /** Graph data + selection/visibility/position state. */
14597
+ store: GraphStore;
14598
+ /** Icon atlas manager. May be `null` early in mount — always guard. */
14599
+ iconAtlasManager: IconAtlasManager | null;
14600
+ /** Request a render. Call after any visual mutation. */
14601
+ invalidate: () => void;
14602
+ /** Whether map (inverse-zoom) mode is active. */
14603
+ isMapMode: boolean;
14604
+ /** Current globe radius in scene units. `0` = flat/planar (no sphere). */
14605
+ sphereRadius: number;
14606
+ /**
14607
+ * Compute a non-colliding `renderOrder` for one of the reserved bands.
14608
+ * See {@link renderOrderForSlot}.
14609
+ */
14610
+ renderOrder: (slot: "underlay" | "overlay" | "top", offset?: number) => number;
14611
+ /**
14612
+ * Current drawing-buffer size in device pixels. Needed by billboard layers
14613
+ * to size screen-space quads (mirrors the engine's `resolution` uniform).
14614
+ * Returns `{1,1}` before the renderer exists; read it each frame.
14615
+ */
14616
+ getDrawingBufferSize: () => {
14617
+ width: number;
14618
+ height: number;
14619
+ };
14620
+ /**
14621
+ * Current render opacity of an edge (`1` = full, `<1` = dimmed). Reflects
14622
+ * focus/context dimming (`emphasis.focusContext`), collapsed groups, etc.
14623
+ * A plug-in layer reads this each frame to follow the same dim state as the
14624
+ * core node/edge clouds — e.g. a marker travelling a dimmed edge fades with
14625
+ * it. Returns `1` for unknown edges.
14626
+ */
14627
+ getEdgeOpacity: (edgeId: string) => number;
14628
+ /**
14629
+ * Current render opacity of a node (`1` = full, `<1` = dimmed). Same dim
14630
+ * sources as {@link getEdgeOpacity}. Returns `1` for unknown nodes.
14631
+ */
14632
+ getNodeOpacity: (nodeId: string) => number;
14633
+ }
14634
+ /**
14635
+ * The imperative contract a layer's renderer must implement. `Config` is the
14636
+ * layer's domain-agnostic configuration object (no business params).
14637
+ */
14638
+ interface LayerRenderer<Config = unknown> {
14639
+ /** Create Three.js objects and add them to `ctx.cloudScene`. */
14640
+ mount(ctx: LayerContext): void;
14641
+ /** Apply a new config. Called whenever the config identity changes. */
14642
+ update?(config: Config): void;
14643
+ /**
14644
+ * Per-frame tick. `dt` is seconds since the previous frame.
14645
+ * Return `true` to request another frame (engine will `invalidate()`).
14646
+ */
14647
+ frame?(dt: number, ctx: LayerContext): boolean | void;
14648
+ /** Called synchronously when map mode toggles or the globe radius changes. */
14649
+ onMapMode?(enabled: boolean, sphereRadius: number): void;
14650
+ /** Remove objects and free all resources (geometry/material/textures). */
14651
+ dispose(): void;
14652
+ }
14653
+ /**
14654
+ * Reserved render-order bands. Indices `-1 / 0 / 1` are owned by the core
14655
+ * clouds (edges / arrows / nodes respectively) and are NEVER returned here.
14656
+ *
14657
+ * - `underlay` → `[-50, -10]` (behind the graph; e.g. map tiles, axis walls)
14658
+ * - `overlay` → `[2, 98]` (in front of the graph; e.g. badges, halos)
14659
+ * - `top` → `[100, +∞)` (always-on-top HUD/gizmo overlays)
14660
+ *
14661
+ * @param slot the band to target
14662
+ * @param offset intra-band offset (clamped per band; `top` is unbounded above)
14663
+ */
14664
+ declare function renderOrderForSlot(slot: "underlay" | "overlay" | "top", offset?: number): number;
14665
+
14666
+ /**
14667
+ * MarkerRenderer — a cloud of icon billboards that travel along graph edges
14668
+ * (e.g. a plane flying a route on the globe).
14669
+ *
14670
+ * Each {@link MarkerSpec} binds a marker to an edge id; every frame the marker's
14671
+ * phase advances `dt / durationMs` and its world position is interpolated along
14672
+ * the edge — great-circle `slerp` in globe mode (lifted slightly off the surface
14673
+ * so it "flies above" the tiles) or a straight `lerp` in flat mode. Markers are
14674
+ * screen-space billboards sized in device pixels, optionally rotated to face the
14675
+ * path tangent and tinted via an SDF icon atlas glyph.
14676
+ *
14677
+ * Rendering: NON-instanced. Each marker is 4 vertices (a quad); per-marker data
14678
+ * (center / size / color / rotation / iconUV) is written to all 4 of its vertices
14679
+ * as ordinary per-vertex attributes. The bundled three (r121) does not reliably
14680
+ * deliver per-instance attributes to a custom ShaderMaterial, so instancing is
14681
+ * avoided; with a few thousand markers max the per-vertex cost is negligible.
14682
+ */
14683
+
14684
+ /** Per-marker configuration. Domain-agnostic — no business params. */
14685
+ interface MarkerSpec {
14686
+ /** Edge whose endpoints the marker travels between. */
14687
+ edgeId: string;
14688
+ /**
14689
+ * Stable identity used to preserve animation phase when the markers array is
14690
+ * re-passed (adding/removing/restyling markers over time). Defaults to
14691
+ * `edgeId`. Give distinct keys if multiple markers share one edge.
14692
+ */
14693
+ key?: string;
14694
+ /** Icon name resolved via `iconAtlasManager.ensureIcon`; omitted → soft dot/triangle. */
14695
+ icon?: string;
14696
+ /** 0..1 rgb tint; default `[0.5, 0.8, 1.0]`. */
14697
+ color?: [number, number, number];
14698
+ /** Device-px diameter; default `24`. */
14699
+ size?: number;
14700
+ /** Time to traverse the edge once, ms; default `4000`. */
14701
+ durationMs?: number;
14702
+ /**
14703
+ * Initial phase 0..1 applied the FIRST time this marker (by `key`) appears —
14704
+ * lets planes start mid-route so a fleet doesn't all leave the origin at
14705
+ * once. Ignored on later updates (the live phase is preserved instead).
14706
+ */
14707
+ phaseOffset?: number;
14708
+ /** Rotate icon to the path tangent; default `false`. */
14709
+ orientToPath?: boolean;
14710
+ /** Radians added to the tangent angle (align the glyph); default `0`. */
14711
+ iconAngleOffset?: number;
14712
+ /**
14713
+ * No-icon head shape. `"dart"` (default) is the directional triangle;
14714
+ * `"comet"` is a radially symmetric glow head (white-hot core + tinted halo)
14715
+ * for meteor/threat-map styling — pair it with `trailLength`. Ignored when
14716
+ * `icon` is set.
14717
+ */
14718
+ shape?: "dart" | "comet";
14719
+ /**
14720
+ * Comet-trail length as a fraction of the full path (0..1); default `0`
14721
+ * (no trail). The trail is a tapered, fading ribbon sampled along the actual
14722
+ * path behind the head — on the globe it bends with the great-circle arc.
14723
+ * Trail width derives from `size`. At most 256 markers render trails per
14724
+ * layer (slots beyond that draw the head only).
14725
+ */
14726
+ trailLength?: number;
14727
+ }
14728
+ interface MarkerRendererConfig {
14729
+ markers: MarkerSpec[];
14730
+ }
14731
+ declare class MarkerRenderer implements LayerRenderer<MarkerRendererConfig> {
14732
+ private readonly maxMarkers;
14733
+ private ctx;
14734
+ private geometry;
14735
+ private material;
14736
+ private mesh;
14737
+ private markers;
14738
+ private positions;
14739
+ private aCenter;
14740
+ private aSize;
14741
+ private aColor;
14742
+ private aRotation;
14743
+ private aIconUV;
14744
+ private aOpacity;
14745
+ private aShape;
14746
+ private trailGeometry;
14747
+ private trailMaterial;
14748
+ private trailMesh;
14749
+ private tPos;
14750
+ private tTangent;
14751
+ private tSide;
14752
+ private tT;
14753
+ private tColor;
14754
+ private tWidth;
14755
+ private tOpacity;
14756
+ private readonly trailSamples;
14757
+ private readonly scratchSrc;
14758
+ private readonly scratchTgt;
14759
+ private readonly scratchA;
14760
+ private readonly scratchB;
14761
+ mount(ctx: LayerContext): void;
14762
+ update(config: MarkerRendererConfig): void;
14763
+ frame(dt: number, ctx: LayerContext): boolean;
14764
+ onMapMode(_enabled: boolean, _sphereRadius: number): void;
14765
+ dispose(): void;
14766
+ /** World-space point on the current marker's path at param `t` (scratchSrc/Tgt set by caller). */
14767
+ private pathPoint;
14768
+ }
14769
+
14770
+ /**
14771
+ * One scheduled traveler along an edge. Domain-neutral: a "flight" is any thing
14772
+ * that departs at `departT` and is in transit for `durFrac` of the loop.
14773
+ */
14774
+ interface FlightSpec {
14775
+ edgeId: string;
14776
+ /** Departure phase within the loop, 0..1. */
14777
+ departT: number;
14778
+ /** Fraction of the loop the traveler is in transit, 0..1. */
14779
+ durFrac: number;
14780
+ /** ms to traverse the edge once (drives MarkerRenderer phase advance). */
14781
+ durationMs?: number;
14782
+ icon?: string;
14783
+ shape?: 'dart' | 'comet';
14784
+ trailLength?: number;
14785
+ color?: [number, number, number];
14786
+ size?: number;
14787
+ orientToPath?: boolean;
14788
+ iconAngleOffset?: number;
14789
+ /** Stable identity; defaults to edgeId. */
14790
+ key?: string;
14791
+ }
14792
+ /**
14793
+ * Given all flights and the current loop phase T (0..1), return the MarkerSpecs
14794
+ * for flights currently in transit. phaseOffset places a flight already underway
14795
+ * mid-route so a fleet doesn't all leave the origin at once.
14796
+ */
14797
+ declare function computeAirborne(flights: FlightSpec[], T: number): MarkerSpec[];
14798
+
14799
+ type MarkerHandle = number;
14800
+ interface MarkersSnapshot {
14801
+ mode: 'idle' | 'static' | 'flights';
14802
+ staticMarkers: MarkerSpec[];
14803
+ flights: FlightSpec[];
14804
+ loopMs: number;
14805
+ handle: MarkerHandle;
14806
+ }
14807
+ /**
14808
+ * Data-driven markers that travel along edges (planes, packets, attack meteors).
14809
+ * Holds config only; the persistent MarkersBridge owns the per-frame clock and
14810
+ * drives the MarkerRenderer. Generic — no aviation semantics.
14811
+ */
14812
+ declare class MarkersApi {
14813
+ private snapshot;
14814
+ private listeners;
14815
+ private nextHandle;
14816
+ subscribe: (cb: () => void) => (() => void);
14817
+ getSnapshot: () => MarkersSnapshot;
14818
+ set(specs: MarkerSpec[]): void;
14819
+ flights(flights: FlightSpec[], opts?: {
14820
+ loopMs?: number;
14821
+ }): MarkerHandle;
14822
+ clear(): void;
14823
+ stop(handle: MarkerHandle): void;
14824
+ private emit;
14825
+ }
14826
+
14116
14827
  /**
14117
14828
  * Construction options for {@link RenderEngineApi}.
14118
14829
  */
@@ -14125,10 +14836,11 @@ interface ApiOptions {
14125
14836
  /** Initial dimension at construction time. Pass 2 when the host starts in 2D mode so that
14126
14837
  * getDimensions() immediately agrees with the renderer. Defaults to 3 for backwards compat. */
14127
14838
  initialDimensions?: 2 | 3;
14128
- /** Optional: the hover-neighbor-highlight controller owned by RenderRuntime.
14129
- * When provided, exposes EmphasisApi.setHoverEnabled / setHoverDimOpacity /
14130
- * setHoverDuration / isHoverEnabled to the host. When omitted, those four
14131
- * methods no-op and `isHoverEnabled()` returns `false`. */
14839
+ /** Optional: the hover-ring controller owned by RenderRuntime. When
14840
+ * provided, exposes EmphasisApi.setHoverDimOpacity / setHoverDuration /
14841
+ * setEmphasisGlow* and the trace-dim methods to the host. When omitted,
14842
+ * those methods no-op. (Hover-dim was deleted — hover only draws the ring;
14843
+ * dim comes from click dim / trace.) */
14132
14844
  hoverEmphasis?: HoverEmphasisController | null;
14133
14845
  }
14134
14846
  /**
@@ -14218,6 +14930,8 @@ declare class RenderEngineApi$1 {
14218
14930
  readonly hover: HoverApi;
14219
14931
  /** Data-driven color and reveal overlay effects (heat diffusion, property color, cluster reveal). */
14220
14932
  readonly overlays: OverlaysApi;
14933
+ /** Data-driven markers that animate along edges (planes, packets, meteors). */
14934
+ readonly markers: MarkersApi;
14221
14935
  /** Timeline-driven graph event playback effects. */
14222
14936
  readonly playback: PlaybackApi;
14223
14937
  /** Viewport chrome controls: minimap, theme, 2D/3D mode, and screenshot. */
@@ -14242,6 +14956,10 @@ declare class RenderEngineApi$1 {
14242
14956
  readonly debug: DebugApi;
14243
14957
  private executor;
14244
14958
  private effectManager;
14959
+ /** Filter manager owned by this API instance; disposed in dispose(). */
14960
+ private _filterManager;
14961
+ /** EventBus unsubscribe handles for the filter listeners (see constructor). */
14962
+ private _filterUnsubscribes;
14245
14963
  /** Current engine dimension (2 or 3). Initialized from ApiOptions.initialDimensions (defaults to 3).
14246
14964
  * Owned exclusively by setDimensions() after construction. */
14247
14965
  private _currentDimensions;
@@ -14266,14 +14984,28 @@ declare class RenderEngineApi$1 {
14266
14984
  */
14267
14985
  constructor(store: GraphStore, interaction: InteractionManager | null, options?: ApiOptions);
14268
14986
  /**
14269
- * §5.3. Batches a series of API calls. Phase 0: passthrough.
14270
- * Phase 1 will suspend eventBus emissions and renderer invalidation for
14271
- * the duration of fn, resuming on `.finally()` for async fns.
14272
- *
14273
- * The signature accepts sync or async fns so Phase 1 can upgrade the body
14274
- * without a breaking API change.
14275
- */
14276
- batch<T>(fn: () => T | Promise<T>): T | Promise<T>;
14987
+ * §5.3. Batches a series of API calls: event-bus emissions raised inside
14988
+ * `fn` are buffered and flushed (in emission order) after `fn` returns —
14989
+ * subscribers see one burst at the end instead of interleaved
14990
+ * notifications. For async `fn`, the flush happens after the returned
14991
+ * promise settles. The flush always runs, even when `fn` throws or the
14992
+ * promise rejects. Nested `batch()` calls coalesce into the outermost
14993
+ * flush.
14994
+ *
14995
+ * Note: this batches **event delivery** only. Store mutations and
14996
+ * renderer invalidation still happen eagerly inside `fn`; suspending
14997
+ * renderer invalidation remains future work.
14998
+ *
14999
+ * @param fn - Sync or async function performing the batched API calls.
15000
+ * @param options.dedupeEvents - When true, only the last buffered
15001
+ * emission per event key is delivered on flush (coalescing for
15002
+ * "state changed"-style events). Defaults to false — additive events
15003
+ * such as `nodes:added` carry distinct payloads per emission, so
15004
+ * dropping earlier ones loses data.
15005
+ */
15006
+ batch<T>(fn: () => T | Promise<T>, options?: {
15007
+ dedupeEvents?: boolean;
15008
+ }): T | Promise<T>;
14277
15009
  /**
14278
15010
  * Late-bind the InteractionManager to sub-APIs that need it.
14279
15011
  *
@@ -14398,7 +15130,7 @@ interface ToolItemParent extends ToolItemBase {
14398
15130
  pinnable?: boolean;
14399
15131
  /** When true, clicking child items does NOT close the popover */
14400
15132
  keepOpen?: boolean;
14401
- renderPinnedPanel?: (ctx: ToolbarContext) => React.ReactNode;
15133
+ renderPinnedPanel?: (ctx: ToolbarContext) => React__default.ReactNode;
14402
15134
  }
14403
15135
  interface ToolItemToggle extends ToolItemBase {
14404
15136
  kind: 'toggle';
@@ -14484,7 +15216,7 @@ interface ToolbarProps extends ToolbarControlledProps {
14484
15216
  api?: RenderEngineApi;
14485
15217
  theme?: 'dark' | 'light';
14486
15218
  }
14487
- declare function Toolbar(props: ToolbarProps): React.ReactElement;
15219
+ declare function Toolbar(props: ToolbarProps): React__default.ReactElement;
14488
15220
 
14489
15221
  /**
14490
15222
  * Partial Toolbar configuration. Any Toolbar prop can be overridden;
@@ -14569,6 +15301,7 @@ declare function mapboxDark(accessToken: string): TileUrlFn;
14569
15301
  declare const MapTileProviders: {
14570
15302
  readonly cartoDark: TileUrlFn;
14571
15303
  readonly cartoDarkNoLabels: TileUrlFn;
15304
+ readonly cartoDarkNoLabelsRetina: TileUrlFn;
14572
15305
  readonly cartoLight: TileUrlFn;
14573
15306
  readonly cartoLightNoLabels: TileUrlFn;
14574
15307
  readonly cartoVoyager: TileUrlFn;
@@ -14577,6 +15310,7 @@ declare const MapTileProviders: {
14577
15310
  readonly googleHybrid: TileUrlFn;
14578
15311
  readonly googleRoads: TileUrlFn;
14579
15312
  readonly googleTerrain: TileUrlFn;
15313
+ readonly vectorDark: TileUrlFn;
14580
15314
  readonly esriWorldImagery: TileUrlFn;
14581
15315
  readonly esriWorldTopo: TileUrlFn;
14582
15316
  readonly stamenToner: TileUrlFn;
@@ -14587,7 +15321,7 @@ declare const MapTileProviders: {
14587
15321
  readonly mapboxDark: typeof mapboxDark;
14588
15322
  };
14589
15323
  /** Provider names for free (no API key) providers — usable in Storybook selectors */
14590
- type FreeProviderName = "cartoDark" | "cartoDarkNoLabels" | "cartoLight" | "cartoLightNoLabels" | "cartoVoyager" | "openStreetMap" | "googleSatellite" | "googleHybrid" | "googleRoads" | "googleTerrain" | "esriWorldImagery" | "esriWorldTopo" | "stamenToner" | "stamenWatercolor" | "stadiaAlidadeDark";
15324
+ type FreeProviderName = "cartoDark" | "cartoDarkNoLabels" | "cartoDarkNoLabelsRetina" | "cartoLight" | "cartoLightNoLabels" | "cartoVoyager" | "vectorDark" | "openStreetMap" | "googleSatellite" | "googleHybrid" | "googleRoads" | "googleTerrain" | "esriWorldImagery" | "esriWorldTopo" | "stamenToner" | "stamenWatercolor" | "stadiaAlidadeDark";
14591
15325
  /** Metadata for each free provider (for UI display) */
14592
15326
  declare const FREE_PROVIDER_META: Record<FreeProviderName, {
14593
15327
  name: string;
@@ -14725,16 +15459,14 @@ interface PinnedState {
14725
15459
  }
14726
15460
 
14727
15461
  /**
14728
- * Access the `RenderEngineApi` instance from the nearest `<GraphRenderer>`
14729
- * ancestor. Throws if called outside a GraphRenderer subtree.
14730
- */
14731
- declare function useRenderEngineApi(): RenderEngineApi$1;
14732
- /**
14733
- * Same as `useRenderEngineApi` but returns `null` when called outside a
14734
- * `<GraphRenderer>` subtree. Use this in optional overlays that can degrade
14735
- * gracefully when the engine isn't mounted yet.
15462
+ * graph-context/types.ts — type and constant declarations extracted verbatim
15463
+ * from GraphContext.tsx (GraphContext split Phase 1, Task 2).
15464
+ *
15465
+ * Contains no runtime imports (all imports are type-only); the only runtime
15466
+ * values are the `GraphThemes` / `DEFAULT_THEME_TO_PROVIDER` /
15467
+ * `DEFAULT_FORCE_LAYOUT_CONFIG` constants. Must never import from
15468
+ * `../GraphContext` (no cycles).
14736
15469
  */
14737
- declare function useOptionalRenderEngineApi(): RenderEngineApi$1 | null;
14738
15470
 
14739
15471
  /** GPU Layout Controller interface for position texture integration */
14740
15472
  interface LayoutControllerInterface {
@@ -14799,9 +15531,9 @@ interface GraphContextValue {
14799
15531
  /** Container element */
14800
15532
  container: HTMLElement | null;
14801
15533
  /** Layout controller for external access */
14802
- layoutController?: LayoutControllerInterface;
15534
+ readonly layoutController?: LayoutControllerInterface;
14803
15535
  /** Layout position provider */
14804
- layoutPositionProvider?: PositionProvider;
15536
+ readonly layoutPositionProvider?: PositionProvider;
14805
15537
  /** Register a child node renderer (for render loop coordination) */
14806
15538
  registerNodeRenderer: (renderer: GPUNodeRenderer | null) => void;
14807
15539
  /** Register a child edge renderer (for render loop coordination) */
@@ -14813,11 +15545,11 @@ interface GraphContextValue {
14813
15545
  /** Register a callback invoked synchronously when map mode changes */
14814
15546
  registerMapModeCallback: (id: string, callback: ((enabled: boolean, sphereRadius?: number, damping?: number) => void) | null) => void;
14815
15547
  /** Whether map mode is active (inverse-zoom damping enabled) */
14816
- isMapMode: boolean;
15548
+ readonly isMapMode: boolean;
14817
15549
  /** Current map damping value (0=constant size, 1=full perspective). */
14818
- mapDamping: number;
15550
+ readonly mapDamping: number;
14819
15551
  /** Current sphereRadius for globe map mode (0 = flat). Tracked so picker re-sync can preserve globe state. */
14820
- mapSphereRadius: number;
15552
+ readonly mapSphereRadius: number;
14821
15553
  /** Set map mode on all renderers. sphereRadius > 0 enables globe arc edges. damping: 0=constant size, 1=full perspective. */
14822
15554
  setMapMode: (enabled: boolean, sphereRadius?: number, damping?: number) => void;
14823
15555
  /**
@@ -14842,19 +15574,19 @@ interface GraphContextValue {
14842
15574
  */
14843
15575
  registerMapMaxGrowthCallback: (id: string, cb: ((value: number) => void) | null) => void;
14844
15576
  /** Icon atlas manager (created internally from iconFonts prop) */
14845
- iconAtlasManager: IconAtlasManager | null;
15577
+ readonly iconAtlasManager: IconAtlasManager | null;
14846
15578
  /** Image atlas manager (created internally for node images) */
14847
- imageAtlasManager: ImageAtlasManager | null;
15579
+ readonly imageAtlasManager: ImageAtlasManager | null;
14848
15580
  /** Shared SDF glyph atlas manager (for BadgeCloud and TagCloud decoration text) */
14849
- glyphAtlasManager: GlyphAtlasManager | null;
15581
+ readonly glyphAtlasManager: GlyphAtlasManager | null;
14850
15582
  /** Resolved theme configuration */
14851
- theme: GraphThemeConfig;
15583
+ readonly theme: GraphThemeConfig;
14852
15584
  /** Global text scale for node labels */
14853
- textScale: number;
15585
+ readonly textScale: number;
14854
15586
  /** Global text scale for edge labels */
14855
- edgeTextScale: number;
15587
+ readonly edgeTextScale: number;
14856
15588
  /** Whether the scene is in 3D mode. When false, rotation is disabled and view is flat. */
14857
- is3D: boolean;
15589
+ readonly is3D: boolean;
14858
15590
  /** Switch between 2D and 3D mode. Disables rotation and resets view angle in 2D. */
14859
15591
  setIs3D: (is3D: boolean) => void;
14860
15592
  /**
@@ -14864,46 +15596,8 @@ interface GraphContextValue {
14864
15596
  * GlobeLayer; engine-internal code that needs the active projection
14865
15597
  * should also read from here.
14866
15598
  */
14867
- effectiveMapProjection: MapProjection;
15599
+ readonly effectiveMapProjection: MapProjection;
14868
15600
  }
14869
- declare const GraphContext: React.Context<GraphContextValue>;
14870
-
14871
- /**
14872
- * Hook to access the graph context
14873
- */
14874
- declare function useGraph(): GraphContextValue;
14875
- /**
14876
- * Hook to access the graph store
14877
- */
14878
- declare function useGraphStore(): GraphStore;
14879
- /**
14880
- * Hook that re-renders when store version changes
14881
- */
14882
- declare function useGraphVersion(): number;
14883
- /**
14884
- * Hook to access the Three.js scene
14885
- */
14886
- declare function useScene(): THREE$1.Scene;
14887
- /**
14888
- * Hook to access the camera
14889
- */
14890
- declare function useCamera(): THREE$1.PerspectiveCamera;
14891
- /**
14892
- * Hook to access the cloudScene group
14893
- * Renderers should add objects to cloudScene, not scene directly
14894
- */
14895
- declare function useCloudScene(): THREE$1.Group;
14896
- /**
14897
- * Hook to access the interaction manager
14898
- */
14899
- declare function useInteraction(): InteractionManager | null;
14900
- /**
14901
- * Hook to access 3D mode state and setter
14902
- */
14903
- declare function useIs3D(): {
14904
- is3D: boolean;
14905
- setIs3D: (is3D: boolean) => void;
14906
- };
14907
15601
  interface GraphThemeConfig {
14908
15602
  /** Canvas background color (hex number) */
14909
15603
  background: number;
@@ -15369,19 +16063,21 @@ interface GraphRendererProps {
15369
16063
  minimapVisible?: boolean;
15370
16064
  }) => void;
15371
16065
  /**
15372
- * Hover-DIM: when true, hovering a node or edge fades all OTHER instances
15373
- * (and their labels) to make the local neighborhood stand out. Default:
15374
- * `false` — dim is opt-in.
16066
+ * Click-DIM: when true, clicking a node or edge fades all OTHER instances
16067
+ * (and their labels) to make the local neighborhood stand out. Clicking a
16068
+ * node keeps it + its 1-hop neighborhood bright; clicking an edge keeps its
16069
+ * two endpoints bright; clicking the same target again, or the background,
16070
+ * clears. Default: `true` — pass `clickDim={false}` to opt out.
15375
16071
  *
15376
16072
  * **Independent of the hover ring.** The ring/halo on the hovered node is
15377
16073
  * governed separately and is on by default (see the engine's `glowEnabled`,
15378
- * `api.emphasis.setEmphasisGlowEnabled`). Setting `hoverDim` only toggles the
15379
- * dimming of non-neighbors. Equivalent to
15380
- * `api.emphasis.setHoverDimEnabled(value)`.
16074
+ * `api.emphasis.setEmphasisGlowEnabled`). Setting `clickDim` only toggles the
16075
+ * click-driven dimming of non-neighbors. Equivalent to
16076
+ * `api.emphasis.setClickDimEnabled(value)`.
15381
16077
  *
15382
16078
  * @category Global visual scalars
15383
16079
  */
15384
- hoverDim?: boolean;
16080
+ clickDim?: boolean;
15385
16081
  /**
15386
16082
  * Fired when the user clicks a node.
15387
16083
  * Payload includes nodeId, canvas pixel position, world-space [x,y,z],
@@ -15797,13 +16493,151 @@ interface EdgeCloudConfig extends Partial<GPUEdgeRendererConfig> {
15797
16493
  /** Dash ratio */
15798
16494
  dashRatio?: number;
15799
16495
  }
16496
+
16497
+ declare const GraphContext: React.Context<GraphContextValue>;
16498
+
16499
+ /**
16500
+ * ViewStateStore — external store for GraphContext's reactive view state
16501
+ * (contextValue identity redesign, see
16502
+ * notes/specs/2026-06-11-contextvalue-identity-redesign.md).
16503
+ *
16504
+ * The single source of truth for the reactive view state: consumers
16505
+ * subscribe via `useSyncExternalStore`, and the identity-stable context
16506
+ * handle's getters read it live. The snapshot is replaced immutably on
16507
+ * change (unchanged fields keep reference identity), so per-field reads
16508
+ * bail out via `Object.is`. Notification is synchronous; React 18 batching
16509
+ * coalesces same-flush patches into one re-render per subscriber.
16510
+ */
16511
+
16512
+ interface GraphViewState {
16513
+ isMapMode: boolean;
16514
+ mapDamping: number;
16515
+ mapSphereRadius: number;
16516
+ is3D: boolean;
16517
+ effectiveMapProjection: MapProjection;
16518
+ theme: GraphThemeConfig;
16519
+ textScale: number;
16520
+ edgeTextScale: number;
16521
+ iconAtlasManager: IconAtlasManager | null;
16522
+ imageAtlasManager: ImageAtlasManager | null;
16523
+ glyphAtlasManager: GlyphAtlasManager | null;
16524
+ layoutController: LayoutControllerInterface | undefined;
16525
+ layoutPositionProvider: PositionProvider | undefined;
16526
+ }
16527
+
16528
+ /**
16529
+ * graph-context/hooks.ts — the consumer hooks for GraphContext:
16530
+ * - `useGraphHandle()` — the identity-stable context handle (never re-renders
16531
+ * on view-state changes);
16532
+ * - per-field view-state hooks (`useViewStateField` and the named wrappers:
16533
+ * `useIsMapMode`, `useMapDamping`, `useTheme`, `useTextScales`,
16534
+ * `useAtlasManagers`, `useLayoutController`, …) backed by
16535
+ * `useSyncExternalStore` on the ViewStateStore;
16536
+ * - compat `useGraph()` (handle + re-render on any view-state change) and
16537
+ * the version hooks (`useGraphVersion`, `useGraphIconVersion`) plus the
16538
+ * scene/camera/interaction accessors.
16539
+ *
16540
+ * Must never import from `../GraphContext` (no cycles); the context object
16541
+ * comes from `./context` and `GraphContextValue` from `./types`.
16542
+ */
16543
+
16544
+ /**
16545
+ * Stable engine handle — identity never changes for the engine's lifetime,
16546
+ * and reading it does NOT subscribe to reactive view-state changes.
16547
+ * Use for store/scene/camera/renderer/methods-only consumers.
16548
+ */
16549
+ declare function useGraphHandle(): GraphContextValue;
16550
+ /** Subscribe to a single reactive view-state field. */
16551
+ declare function useViewStateField<K extends keyof GraphViewState>(key: K): GraphViewState[K];
16552
+ declare function useIsMapMode(): boolean;
16553
+ declare function useMapDamping(): number;
16554
+ declare function useMapSphereRadius(): number;
16555
+ declare function useTheme(): GraphThemeConfig;
16556
+ declare function useEffectiveMapProjection(): MapProjection;
16557
+ /**
16558
+ * NOTE: the returned object is a fresh allocation each render — destructure
16559
+ * the fields into effect dep arrays; never depend on the object itself.
16560
+ */
16561
+ declare function useTextScales(): {
16562
+ textScale: number;
16563
+ edgeTextScale: number;
16564
+ };
16565
+ /**
16566
+ * NOTE: the returned object is a fresh allocation each render — destructure
16567
+ * the fields into effect dep arrays; never depend on the object itself.
16568
+ */
16569
+ declare function useAtlasManagers(): {
16570
+ iconAtlasManager: IconAtlasManager | null;
16571
+ imageAtlasManager: ImageAtlasManager | null;
16572
+ glyphAtlasManager: GlyphAtlasManager | null;
16573
+ };
16574
+ declare function useLayoutController(): LayoutControllerInterface | undefined;
16575
+ declare function useLayoutPositionProvider(): PositionProvider | undefined;
16576
+ /**
16577
+ * Compat hook: returns the stable handle AND re-renders on ANY reactive
16578
+ * view-state change (subscription keyed on snapshot identity). Prefer
16579
+ * useGraphHandle() + per-field hooks in new code.
16580
+ */
16581
+ declare function useGraph(): GraphContextValue;
16582
+ /**
16583
+ * Hook to access the graph store
16584
+ * (stable field — reads the handle, no reactive re-renders)
16585
+ */
16586
+ declare function useGraphStore(): GraphStore;
16587
+ /**
16588
+ * Hook that re-renders when store version changes
16589
+ */
16590
+ declare function useGraphVersion(): number;
16591
+ /**
16592
+ * Hook to access the Three.js scene
16593
+ * (stable field — reads the handle, no reactive re-renders)
16594
+ */
16595
+ declare function useScene(): THREE$1.Scene;
16596
+ /**
16597
+ * Hook to access the camera
16598
+ * (stable field — reads the handle, no reactive re-renders)
16599
+ */
16600
+ declare function useCamera(): THREE$1.PerspectiveCamera;
16601
+ /**
16602
+ * Hook to access the cloudScene group
16603
+ * Renderers should add objects to cloudScene, not scene directly
16604
+ * (stable field — reads the handle, no reactive re-renders)
16605
+ */
16606
+ declare function useCloudScene(): THREE$1.Group;
16607
+ /**
16608
+ * Hook to access the interaction manager
16609
+ * (stable field — reads the handle, no reactive re-renders)
16610
+ */
16611
+ declare function useInteraction(): InteractionManager | null;
16612
+ /**
16613
+ * Hook to access 3D mode state and setter.
16614
+ * Re-renders only on `is3D` changes (per-field subscription); the setter is
16615
+ * the handle's stable method.
16616
+ */
16617
+ declare function useIs3D(): {
16618
+ is3D: boolean;
16619
+ setIs3D: (is3D: boolean) => void;
16620
+ };
16621
+
16622
+ /**
16623
+ * Access the `RenderEngineApi` instance from the nearest `<GraphRenderer>`
16624
+ * ancestor. Throws if called outside a GraphRenderer subtree.
16625
+ */
16626
+ declare function useRenderEngineApi(): RenderEngineApi$1;
16627
+ /**
16628
+ * Same as `useRenderEngineApi` but returns `null` when called outside a
16629
+ * `<GraphRenderer>` subtree. Use this in optional overlays that can degrade
16630
+ * gracefully when the engine isn't mounted yet.
16631
+ */
16632
+ declare function useOptionalRenderEngineApi(): RenderEngineApi$1 | null;
16633
+
15800
16634
  /**
15801
16635
  * GraphRenderer - Main container component for graph rendering
15802
16636
  *
15803
16637
  * Sets up Three.js scene, renderer, and camera.
15804
16638
  * Provides context for child components.
15805
16639
  */
15806
- declare function GraphRenderer({ container: containerProp, className, style, backgroundColor, antialias, pixelRatio, children, store: storeProp, controls: controlsProp, enableControl, drag: dragProp, enableDrag, controlConfig, cameraZ, initialPosition, onReady, apiRef, apiOptions, nodeCloud, edgeCloud, node: nodeProp, edge: edgeProp, caption: captionProp, edgeCaption: edgeCaptionProp, data: dataProp, minimap: minimapProp, map: mapProp, toolbar: toolbarProp, legend: legendProp, layoutController, forceLayout, autoStartLayout, iconFonts, theme, mapProvider, textScale: textScaleProp, edgeTextScale: edgeTextScaleProp, is3D: is3DProp, defaultDim, mapProjection: mapProjectionProp, onThemeChange, onViewChange, hoverDim, onNodeClick, onNodeDoubleClick, onEdgeClick, onEdgeDoubleClick, onBackgroundClick, onNodeContextMenu, onEdgeContextMenu, onBackgroundContextMenu, onNodeHover, onEdgeHover, onNodeDragStart, onNodeDrag, onNodeDragEnd, onDestroy, onError, onDelta, onLayoutStart, onLayoutEnd, onLayoutProgress, onAlgorithmStart, onAlgorithmEnd, onAlgorithmError, onAlgorithmProgress, onHistoryChange, onStyleChange, selection, defaultSelection, onSelectionChange, hidden, defaultHidden, onVisibilityChange, defaultIs3D, onIs3DChange, defaultTheme, defaultViewState, viewState, onViewStateChange, hoveredId, onHoverChange, pinned, defaultPinned, onPinnedChange, }: GraphRendererProps): react_jsx_runtime.JSX.Element;
16640
+ declare function GraphRenderer({ container: containerProp, className, style, backgroundColor, antialias, pixelRatio, children, store: storeProp, controls: controlsProp, enableControl, drag: dragProp, enableDrag, controlConfig, cameraZ, initialPosition, onReady, apiRef, apiOptions, nodeCloud, edgeCloud, node: nodeProp, edge: edgeProp, caption: captionProp, edgeCaption: edgeCaptionProp, data: dataProp, minimap: minimapProp, map: mapProp, toolbar: toolbarProp, legend: legendProp, layoutController, forceLayout, autoStartLayout, iconFonts, theme, mapProvider, textScale: textScaleProp, edgeTextScale: edgeTextScaleProp, is3D: is3DProp, defaultDim, mapProjection: mapProjectionProp, onThemeChange, onViewChange, clickDim, onNodeClick, onNodeDoubleClick, onEdgeClick, onEdgeDoubleClick, onBackgroundClick, onNodeContextMenu, onEdgeContextMenu, onBackgroundContextMenu, onNodeHover, onEdgeHover, onNodeDragStart, onNodeDrag, onNodeDragEnd, onDestroy, onError, onDelta, onLayoutStart, onLayoutEnd, onLayoutProgress, onAlgorithmStart, onAlgorithmEnd, onAlgorithmError, onAlgorithmProgress, onHistoryChange, onStyleChange, selection, defaultSelection, onSelectionChange, hidden, defaultHidden, onVisibilityChange, defaultIs3D, onIs3DChange, defaultTheme, defaultViewState, viewState, onViewStateChange, hoveredId, onHoverChange, pinned, defaultPinned, onPinnedChange, }: GraphRendererProps): react_jsx_runtime.JSX.Element;
15807
16641
 
15808
16642
  /** GraphCanvas — alias for GraphRenderer (used in new layer system API) */
15809
16643
  declare const GraphCanvas: typeof GraphRenderer;
@@ -16084,6 +16918,16 @@ declare class EdgeTextCloud {
16084
16918
  * 2. Calculate rotation to follow edge direction (screen-space, never upside down)
16085
16919
  * 3. Center text horizontally on the edge
16086
16920
  */
16921
+ /**
16922
+ * Cull cache: skips the per-item bezier/angle math and the glyph re-layout
16923
+ * (setEntries) when neither the view nor the items changed since the last
16924
+ * updateTexts(). See cullCache.ts and the matching gate in TextCloud.
16925
+ */
16926
+ private _cullCache;
16927
+ /** Reused buffer for the view signature (no per-frame allocation). */
16928
+ private _viewSigValues;
16929
+ /** Collect every non-item input of updateTexts() into a flat numeric array. */
16930
+ private _fillViewSignature;
16087
16931
  updateTexts(items: EdgeTextItem[]): void;
16088
16932
  /** Called each frame */
16089
16933
  update(): void;
@@ -16250,10 +17094,28 @@ interface GlobeLayerProps {
16250
17094
  visible?: boolean;
16251
17095
  /** GlobeControl config overrides (rotation speed, zoom speed, zoom range) */
16252
17096
  controlConfig?: GlobeControlConfig;
17097
+ /**
17098
+ * Render a soft fresnel atmosphere glow around the globe's silhouette.
17099
+ * Default: true.
17100
+ */
17101
+ atmosphere?: boolean;
17102
+ /** Atmosphere glow color (CSS string or hex number). Default: cool blue. */
17103
+ atmosphereColor?: number | string;
16253
17104
  /** Callback when globe is created. Receives the SlippyMapGlobe instance. */
16254
17105
  onReady?: (globe: SlippyMapGlobe) => void;
17106
+ /**
17107
+ * @internal — layer-swap confirmation token slot, set by GraphContext's
17108
+ * auto-map-layer effect (`map.beginLayerSwap()`) right before a 2D↔3D
17109
+ * FlatLayer↔GlobeLayer swap. The unmount cleanup consumes the token and
17110
+ * passes it to `disableMap({ swapToken })` so MapApi suppresses the
17111
+ * teardown (the map stays active across the swap). Hosts mounting the
17112
+ * layer manually should not set this.
17113
+ */
17114
+ swapTokenRef?: {
17115
+ current: number | null;
17116
+ };
16255
17117
  }
16256
- declare function GlobeLayer({ radius, tileUrl, tileProvider, minLevel, maxLevel, mercatorProjection, autoFit, visible, controlConfig, onReady, }: GlobeLayerProps): react_jsx_runtime.JSX.Element;
17118
+ declare function GlobeLayer({ radius, tileUrl, tileProvider, minLevel, maxLevel, mercatorProjection, autoFit, visible, controlConfig, atmosphere, atmosphereColor, onReady, swapTokenRef, }: GlobeLayerProps): react_jsx_runtime.JSX.Element;
16257
17119
 
16258
17120
  /**
16259
17121
  * SlippyMapFlat — Tiled raster map on a flat 2D plane (Web Mercator).
@@ -16395,8 +17257,19 @@ interface FlatLayerProps {
16395
17257
  visible?: boolean;
16396
17258
  /** Called once after the SlippyMapFlat instance has been created. */
16397
17259
  onReady?: (flat: SlippyMapFlat) => void;
17260
+ /**
17261
+ * @internal — layer-swap confirmation token slot, set by GraphContext's
17262
+ * auto-map-layer effect (`map.beginLayerSwap()`) right before a 2D↔3D
17263
+ * FlatLayer↔GlobeLayer swap. The unmount cleanup consumes the token and
17264
+ * passes it to `disableMap({ swapToken })` so MapApi suppresses the
17265
+ * teardown (the map stays active across the swap). Hosts mounting the
17266
+ * layer manually should not set this.
17267
+ */
17268
+ swapTokenRef?: {
17269
+ current: number | null;
17270
+ };
16398
17271
  }
16399
- declare function FlatLayer({ mapSize, tileUrl, tileProvider, minLevel, maxLevel, autoFit, visible, onReady, }: FlatLayerProps): react_jsx_runtime.JSX.Element;
17272
+ declare function FlatLayer({ mapSize, tileUrl, tileProvider, minLevel, maxLevel, autoFit, visible, onReady, swapTokenRef, }: FlatLayerProps): react_jsx_runtime.JSX.Element;
16400
17273
 
16401
17274
  /**
16402
17275
  * useInvalidate - Hook for triggering render invalidation
@@ -16468,6 +17341,55 @@ interface LayerOptions<T = any> {
16468
17341
  * @param deps Additional dependencies that trigger re-initialization
16469
17342
  */
16470
17343
  declare function useLayer<T = any>(options: LayerOptions<T>, deps?: any[]): void;
17344
+ /**
17345
+ * useEngineLayer — generic React wrapper for a {@link LayerRenderer}.
17346
+ *
17347
+ * Mirrors GlobeLayer's lifecycle (construct on mount, register frame +
17348
+ * map-mode callbacks, dispose on unmount) but is fully generic over the
17349
+ * renderer and its config. A typical layer is now ~5 lines:
17350
+ *
17351
+ * ```tsx
17352
+ * export function MyLayer(props: MyLayerProps) {
17353
+ * const config = { ...props };
17354
+ * useEngineLayer("my-layer", () => new MyRenderer(), config, [], { frame: true });
17355
+ * return null;
17356
+ * }
17357
+ * ```
17358
+ *
17359
+ * @param name stable id used for frame / map-mode callback registration
17360
+ * @param factory creates the renderer (called once per construct effect)
17361
+ * @param config domain-agnostic config; `update()` runs when its identity changes
17362
+ * @param deps construct-effect deps (re-creates the renderer when they change)
17363
+ * @param opts `{ frame: true }` to register a per-frame tick
17364
+ */
17365
+ declare function useEngineLayer<Config, R extends LayerRenderer<Config>>(name: string, factory: () => R, config: Config, deps: unknown[], opts?: {
17366
+ frame?: boolean;
17367
+ }): void;
17368
+
17369
+ /**
17370
+ * MarkerLayer — a pluggable layer that animates icon markers traveling along
17371
+ * edges (e.g. a plane flying a route on the globe, a packet on a link).
17372
+ *
17373
+ * Conforms to the Engine Layer Standard (see LAYER_STANDARD.md): it is a thin
17374
+ * React wrapper over {@link MarkerRenderer} (a {@link LayerRenderer}) mounted via
17375
+ * {@link useEngineLayer}. Config is domain-agnostic — callers map their own
17376
+ * business data (flight times, cruise speed, …) into the generic `durationMs`.
17377
+ *
17378
+ * ```tsx
17379
+ * <GraphCanvas is3D map={{ tileProvider: "cartoDarkNoLabels" }} nodeCloud edgeCloud>
17380
+ * <MarkerLayer markers={flights.map(f => ({
17381
+ * edgeId: f.id, icon: "plane", orientToPath: true,
17382
+ * durationMs: f.distanceKm / CRUISE_KMH * 3600 * 1000 / TIME_COMPRESS,
17383
+ * }))} />
17384
+ * </GraphCanvas>
17385
+ * ```
17386
+ */
17387
+
17388
+ interface MarkerLayerProps {
17389
+ /** The markers to animate. Each rides one edge from source → target. */
17390
+ markers: MarkerSpec[];
17391
+ }
17392
+ declare function MarkerLayer({ markers }: MarkerLayerProps): null;
16471
17393
 
16472
17394
  interface QuickCreatePanelProps {
16473
17395
  /** The result from EdgeCreateHandler */
@@ -16537,7 +17459,7 @@ interface PitchToggleButtonProps {
16537
17459
  *
16538
17460
  * Hidden when no RenderEngineApi is available in context.
16539
17461
  */
16540
- declare function PitchToggleButton({ container, obliqueDegrees, durationMs, }: PitchToggleButtonProps): React.ReactPortal;
17462
+ declare function PitchToggleButton({ container, obliqueDegrees, durationMs, }: PitchToggleButtonProps): React__default.ReactPortal | null;
16541
17463
 
16542
17464
  /** Minimal interface for geo-three MapView — avoids the geo-three package dependency. */
16543
17465
  interface MapViewLike$1 extends Object3D {
@@ -16783,6 +17705,42 @@ declare function cartesian2Polar({ x, y, z }: {
16783
17705
  declare function deg2Rad(deg: number): number;
16784
17706
  declare function rad2Deg(rad: number): number;
16785
17707
 
17708
+ /**
17709
+ * Vector tile provider — a self-contained, offline basemap.
17710
+ *
17711
+ * Instead of fetching raster imagery from a third-party tile server, this draws
17712
+ * each web-mercator tile's country polygons + graticule onto a canvas from a
17713
+ * world outline that is BUNDLED with the engine (`world-rings.json`), and hands
17714
+ * the globe/flat map a `data:` URL. Result: a clean flat-shaded vector earth
17715
+ * with zero network dependency. The same low-detail outline renders at every
17716
+ * zoom, so zooming in keeps the vector look (it adds no new detail) — pair it
17717
+ * with a low `maxLevel` on the map, or swap to a raster provider past a zoom.
17718
+ *
17719
+ * The returned function matches {@link TileUrlFn}, so it drops straight into the
17720
+ * map config's `tileUrl`, e.g. `map={{ tileUrl: createVectorTileProvider() }}`.
17721
+ */
17722
+
17723
+ /** Colours + graticule spacing for {@link createVectorTileProvider}. */
17724
+ interface VectorTileStyle {
17725
+ /** Ocean / background fill. Default `"#0b1a2e"`. */
17726
+ ocean?: string;
17727
+ /** Land fill. Default `"#1c3147"`. */
17728
+ land?: string;
17729
+ /** Country outline stroke. Default `"#315a80"`. Pass `""` to omit. */
17730
+ border?: string;
17731
+ /** Graticule (lat/lng grid) stroke. Default `"#1a3a55"`. Pass `""` to omit. */
17732
+ grid?: string;
17733
+ /** Graticule spacing in degrees. Default `15`. `0` disables the grid. */
17734
+ gridStepDeg?: number;
17735
+ }
17736
+ /**
17737
+ * Build a vector basemap tile function from the bundled world outline.
17738
+ * Tiles are rendered on demand and cached for the life of the function.
17739
+ */
17740
+ declare function createVectorTileProvider(style?: VectorTileStyle): TileUrlFn;
17741
+ /** Ready-made dark vector basemap (default style). Use as `tileProvider: "vectorDark"`. */
17742
+ declare const vectorDark: TileUrlFn;
17743
+
16786
17744
  /**
16787
17745
  * fitBounds — Calculate initial camera/cloudScene position to fit all data nodes in view.
16788
17746
  *
@@ -17529,8 +18487,8 @@ declare function detectDateProperty(values: PropertyValue[], sampleSize?: number
17529
18487
 
17530
18488
  declare class GroupHitTest {
17531
18489
  private groups;
17532
- constructor(groups: Map<string, GroupState> | null);
17533
- setGroups(groups: Map<string, GroupState> | null): void;
18490
+ constructor(groups: ReadonlyMap<string, GroupState> | null);
18491
+ setGroups(groups: ReadonlyMap<string, GroupState> | null): void;
17534
18492
  testPoint(worldX: number, worldY: number, worldZ: number): string | null;
17535
18493
  }
17536
18494
 
@@ -17575,7 +18533,7 @@ declare class GPUGroupRingRenderer {
17575
18533
  private strokeWidthBuffer;
17576
18534
  constructor(scene: THREE$1.Object3D);
17577
18535
  private createGeometry;
17578
- update(groups: Map<string, GroupState>): void;
18536
+ update(groups: ReadonlyMap<string, GroupState>): void;
17579
18537
  dispose(): void;
17580
18538
  }
17581
18539
 
@@ -17585,7 +18543,7 @@ declare class GroupSphereRenderer {
17585
18543
  private sharedGeo;
17586
18544
  private sharedEdgesGeo;
17587
18545
  constructor(scene: THREE$1.Object3D);
17588
- update(groups: Map<string, GroupState>): void;
18546
+ update(groups: ReadonlyMap<string, GroupState>): void;
17589
18547
  dispose(): void;
17590
18548
  }
17591
18549
 
@@ -17708,4 +18666,4 @@ declare function createDefaultRegistry(): ToolRegistry$1;
17708
18666
 
17709
18667
  declare function useToolbarState(initialState?: Partial<ToolbarState>): Required<ToolbarControlledProps>;
17710
18668
 
17711
- export { ANCHOR_OFFSETS, ANCHOR_RADIUS_PX, type ActiveTween, type AggregateConfig, type AggregateOptions, type AggregatedEdge, type AggregatedEdgeTarget, type AlgorithmInfo, type AnimateOptions, type AnimationEasingType, AnimationManager, type AnyPickResult, type GraphSnapshot as ApiGraphSnapshot, type ApiOptions, type ApiStyleRule, type ApplyGeoLayoutOptions, type ApplyGeoLayoutResult, AxisLayer, type AxisLayerProps, type BackgroundPickResult, type BackgroundPointerEvent, type BadgeSpec, type BufferTextSource, type BuildGeoPositionProviderOptions, type BuildGeoPositionProviderResult, CPULayoutProviderAdapter, CPUPositionProvider, CameraApi, type CameraPositionSource, CameraTween, type CameraTweenTarget, type CanvasEvent, type CapabilityState, type CaptionOptions, type CaptionProps, type CascadeHighlightConfig, CascadeHighlightEffect, type CategoricalFilter, type Category, type ClusterRevealConfig, ClusterRevealEffect, CollectionManager, type CollectionState, type ColorMappingOptions, type ColorValue, type ColumnMapping, type Command, type ConfigSource, type ConflictReport, ContextMenuManager, ContextMenuOverlay, type ContextMenuOverlayProps, type ContextMenuState, type CursorStyle, type CurveParams, DEFAULT_DOCK_POSITIONS, DEFAULT_FORCE_LAYOUT_CONFIG, DEFAULT_INTERACTION_CONFIG, DEFAULT_SHORTCUTS, DEFAULT_THEME_TO_PROVIDER, type DateGranularity, type DateRangeSpec, type DecorationAnchor, type DefaultMenuActions, type DegreeSpec, type DirtyFlag, type DockRegistry, type DragEndEvent, DragHandler, type DragHandlerConfig, type DragMoveEvent, DragPositionsCommand, type DragStartEvent, type DragState, EASINGS, type EasingFn, type EdgeCaptionProps, EdgeClassifier, EdgeCloud, type EdgeCloudConfig, type EdgeCloudProps, type EdgeCreateCallback, EdgeCreateHandler, type EdgeCreateHandlerConfig, type EdgeCreateResult, type EdgeDefinition, type EdgeDrawConfig, EdgeDrawEffect, type EdgeEvent, type EdgeFilter, type EdgeFilterCommonSpec, type EdgeFlowConfig, EdgeFlowEffect, type EdgeGlowConfig, EdgeGlowEffect, type EdgeInput, type EdgeLike, type EdgePickResult, type EdgePointerEvent, type EdgePredicateFn, type EdgeProps, EdgeQuery, type EdgeRenderInfo, type EdgeRenderState, type EdgeSelector, type EdgeShape, EdgeTextCloud, type EdgeTextCloudConfig, type EdgeTextItem, EdgeTextLayer, type EdgeTextLayerProps, type EdgeType, EdgesApi, type Effect, EffectManager, type ElementDefinition, type ElementState, type EnableMapOptions, type EngineCapabilities, type ErrorContext, type EventMap, type ExtractConfig, type ExtractOptions, FREE_PROVIDER_META, FilterApi, type FilterConfig, type FilterEntry, type FilterGroup, type FilterHandle, type FilterMatchCount, type FilterPreset, type FilterPublicType, type FilterResult, type FilterResultCallback, type FilterTarget, FlatLayer, type FlatLayerProps, FlowsApi, type FlyToBoundsOptions, type FlyToGeoOptions, type FlyToOptions, type FocusContextConfig, FocusContextEffect, type ForceLayoutConfig, type FreeProviderName, GPUEdgeRenderer, type GPUEdgeRendererConfig, GPUGroupRingRenderer, GPULayoutProviderAdapter, GPUNodeRenderer, type GPUNodeRendererConfig, GPUPositionProvider, type GeoBounds, type GeoPosition, type GeoSearchResult, type GeocoderDescriptor, GlobeControl, type GlobeControlConfig, GlobeLayer, type GlobeLayerProps, GraphCanvas, type GraphCanvasProps, GraphContext, type GraphContextValue, GraphControl, type GraphControlConfig, type GraphEvent, type GraphEventHandler, type GraphEventType, type GraphFilterAPI, GraphFilterManager, GraphRenderer, type GraphRendererConfig, type GraphRendererProps, GraphStore, type GraphThemeConfig, type GraphThemeKey, GraphThemes, GroupCloud, GroupHitTest, GroupManager, type GroupOptions, type GroupSnapshot, type GroupSpec, GroupSphereRenderer, type GroupState, GroupsApi, type HeatDiffusionConfig, HeatDiffusionEffect, type HiddenState, HistoryApi, type HistoryChangeInfo, type HoverChangeEvent, HoverHandler, type HoverHandlerConfig, type HoverState, type HoverTarget, type IconAtlasConfig, IconAtlasManager, type IconEntry, type IconFontConfigExt, type IconSpec, type ImageArrayConfig, ImageAtlasManager, type ImageEntry, type ImageMappingOptions, type InteractionConfig, InteractionManager, type InteractionManagerConfig, type KeyBinding, KeyboardShortcutManager, type KeyboardShortcutManagerConfig, type LabelPosition$1 as LabelPosition, type LayerOptions, LayoutApi, type LayoutControllerInterface, type LayoutEndInfo, type LayoutEngine, type LayoutReadback, type LayoutRuntime, type LayoutRuntimeEventMap, LayoutRuntimeImpl, type LayoutRuntimeSnapshot, LegendPanel, type LegendPanelProps, type LinkConfig, type LinkOptions, MAX_BADGE_TEXT_CHARS, type MSDFFont, type MSDFGlyph, MapApi, type MapConfig, MapCoordinateProvider, type MapMode, type MapTileProvider, type MapTileProviderDescriptor, MapTileProviders, MapTransition, type MapTransitionConfig, type MapTransitionMode, type MatchSpec, type MenuContext, type MenuGroup, type MenuItem, type MergeConfig, type MergeOptions, type MetricPulseConfig, MetricPulseEffect, type MinimapConfig, MinimapLayer, type MinimapLayerProps, NOMINATIM_BASE_URL, type NodeBreatheConfig, NodeBreatheEffect, NodeCloud, type NodeCloudConfig, type NodeCloudProps, type NodeDefinition, type NodeDragEvent, type NodeEntranceConfig, NodeEntranceEffect, type NodeEvent, type NodeFilter, type NodeFilterCommonSpec, NodeInfoManager, NodeInfoPanel, type NodeInfoPanelProps, type NodeInfoState, type NodeInput, type NodeLike, type NodePickResult, type NodePointerEvent, type NodePredicateFn, type NodeProps, NodeQuery, type NodeRenderState, type NodeRippleConfig, NodeRippleEffect, type NodeSelector, type NodeSizeConfig, NodeSizeService, NodesApi, type ParsedDate, type ParsedSelector, type PathHighlightConfig, PathHighlightEffect, type PickResult, type PickType, Picker, PickerUtils, type PinnedState, PitchToggleButton, type PitchToggleButtonProps, type Platform, PlatformAdapter, type PlaybackConfig, type PlaybackOptions, type PluginInstallContext, type PointerEventBase, type PointerModifiers, type PositionMode, type PositionProvider, type PredicateFilter, type PropertyColorConfig, PropertyColorEffect, PropertyTween, type PropertyTweenConfig, QuickCreatePanel, type QuickCreatePanelProps, type RGB, type RangeFilter, type RangeSpec, type RelationshipType, type RenderBackendType, RenderEngineApi$1 as RenderEngineApi, EventBus as RenderEventBus, type ResolvedMenuItem, type ResolvedMenuSection, ScaledLODRadial, type SchemaCallbacks, type Scope, type ScreenshotOptions, type SearchOptions, SelectionApi, type SelectionChangeEvent, SelectionManager, type SelectionMode$1 as SelectionMode, type SelectionState, SelfLoopCloud, type SelfLoopCloudConfig, SetPositionsCommand, type ShortcutCategory, type ShortcutCommand, type ShortcutCommandDefinition, type ShortcutConfig, type ShortcutOptions, type SizeMappingOptions, type SkillContext, type SkillDef, type SkillInput, type SkillResult, SkillsApi, SlippyMapFlat, type SlippyMapFlatConfig, SlippyMapGlobe, type SlippyMapGlobeConfig, type SnapshotDiff, StaticPositionProvider, StyleApi, StyleMapper, type StyleRule, type Stylesheet$1 as Stylesheet, Stylesheet as StylesheetEngine, type TagId, type TagSpec, type TextAlign, TextCloud, type TextCloudConfig, type TextItem, TextLayer, type TextLayerProps, type TileUrlFn, type TimelineEvent, type TimelineReplayConfig, TimelineReplayEffect, type ToolItem, type ToolItemAction, type ToolItemParent, type ToolItemToggle, type ToolPriority, ToolRegistry$1 as ToolRegistry, type ToolSeparator, Toolbar, type ToolbarAction, type ToolbarContext, type ToolbarControlledProps, type ToolbarPlugin, type ToolbarProps, type ToolbarState, type TopologyFilter, TransformApi, type TransformResult, type TransitionOptions, type TransitionPhase, type Unsubscribe$1 as Unsubscribe, type UpdateStrategy$1 as UpdateStrategy, UpdateStrategy as UpdateStrategyImpl, type UserShortcutConfig, type ViewEvent, type ViewEventHandler, type ViewEventType, type ViewInfo, type ViewRegistrationOptions, ViewRegistry, type ViewState, VisualMapper, advanceByGranularity, arrowFragmentShader, arrowVertexShader, cartesian2Polar, createDefaultItems, createDefaultRegistry, createEdgeTextCloud, createTextCloud, defaultEdgeStyles, defaultNodeStyles, defaultStylesheet, deg2Rad, detectDateProperty, dirtyFlagToAttributes, divergingColorScale, edgeFragmentShader, edgeVertexShader, findFirstImage, fitBounds, formatDate, getAttributesToUpdate, getBaseWorldRadius, getColorScheme, getEdgeClassifier, getGlobalViewRegistry, getNodeShaderSize, getNodeShaderSizeByValue, getNodeWorldRadius, getNodeWorldRadiusBySize, getProviderTileUrl, getScaleFn, hexToRgb, isImageUrl, nextGranularity, nodeFragmentShader, nodeVertexShader, nominatimGeocoder, normalizeEdgeIds, normalizeNodeIds, ordinalColorScale, parseDate, parseNominatim, pickingFragmentShader, pickingVertexShader, polar2Cartesian, prevGranularity, rad2Deg, requiresStructureRebuild, resetGlobalViewRegistry, resolveCaptionText, resolveNodeTitle, selfLoopFragmentShader, selfLoopVertexShader, sequentialColorScale, setLicenseKey, sqrtScale, thresholdColorScale, truncateToGranularity, useCamera, useCloudScene, useGraph, useGraphFilter, useGraphStore, useGraphVersion, useInteraction, useInvalidate, useIs3D, useLayer, useOptionalRenderEngineApi, useRenderEngineApi, useScene, useToolbarState };
18669
+ export { ANCHOR_OFFSETS, ANCHOR_RADIUS_PX, type ActiveTween, type AggregateConfig, type AggregateOptions, type AggregatedEdge, type AggregatedEdgeTarget, type AlgorithmInfo, type AnimateOptions, type AnimationEasingType, AnimationManager, type AnyPickResult, type GraphSnapshot as ApiGraphSnapshot, type ApiOptions, type ApiStyleRule, type ApplyGeoLayoutOptions, type ApplyGeoLayoutResult, AxisLayer, type AxisLayerProps, type BackgroundPickResult, type BackgroundPointerEvent, type BadgeSpec, type BufferTextSource, type BuildGeoPositionProviderOptions, type BuildGeoPositionProviderResult, CPULayoutProviderAdapter, CPUPositionProvider, CameraApi, type CameraPositionSource, CameraTween, type CameraTweenTarget, type CanvasEvent, type CapabilityState, type CaptionOptions, type CaptionProps, type CascadeHighlightConfig, CascadeHighlightEffect, type CategoricalFilter, type Category, type ClusterRevealConfig, ClusterRevealEffect, CollectionManager, type CollectionState, type ColorMappingOptions, type ColorValue, type ColumnMapping, type Command, type ConfigSource, type ConflictReport, ContextMenuManager, ContextMenuOverlay, type ContextMenuOverlayProps, type ContextMenuState, type CursorStyle, type CurveParams, DEFAULT_DOCK_POSITIONS, DEFAULT_FORCE_LAYOUT_CONFIG, DEFAULT_INTERACTION_CONFIG, DEFAULT_SHORTCUTS, DEFAULT_THEME_TO_PROVIDER, type DateGranularity, type DateRangeSpec, type DecorationAnchor, type DefaultMenuActions, type DegreeSpec, type DirtyFlag, type DisableMapOptions, type DockRegistry, type DragEndEvent, DragHandler, type DragHandlerConfig, type DragMoveEvent, DragPositionsCommand, type DragStartEvent, type DragState, EASINGS, type EasingFn, type EdgeCaptionProps, EdgeClassifier, EdgeCloud, type EdgeCloudConfig, type EdgeCloudProps, type EdgeCreateCallback, EdgeCreateHandler, type EdgeCreateHandlerConfig, type EdgeCreateResult, type EdgeDefinition, type EdgeDrawConfig, EdgeDrawEffect, type EdgeEvent, type EdgeFilter, type EdgeFilterCommonSpec, type EdgeFlowConfig, EdgeFlowEffect, type EdgeGlowConfig, EdgeGlowEffect, type EdgeInput, type EdgeLike, type EdgePickResult, type EdgePointerEvent, type EdgePredicateFn, type EdgeProps, EdgeQuery, type EdgeRenderInfo, type EdgeRenderState, type EdgeSelector, type EdgeShape, EdgeTextCloud, type EdgeTextCloudConfig, type EdgeTextItem, EdgeTextLayer, type EdgeTextLayerProps, type EdgeType, EdgesApi, type Effect, EffectManager, type ElementDefinition, type ElementState, type EnableMapOptions, type EngineCapabilities, type ErrorContext, type EventMap, type ExtractConfig, type ExtractOptions, FREE_PROVIDER_META, FilterApi, type FilterConfig, type FilterEntry, type FilterGroup, type FilterHandle, type FilterMatchCount, type FilterPreset, type FilterPublicType, type FilterResult, type FilterResultCallback, type FilterTarget, FlatLayer, type FlatLayerProps, type FlightSpec, FlowsApi, type FlyToBoundsOptions, type FlyToGeoOptions, type FlyToOptions, type FocusContextConfig, FocusContextEffect, type ForceLayoutConfig, type FreeProviderName, GPUEdgeRenderer, type GPUEdgeRendererConfig, GPUGroupRingRenderer, GPULayoutProviderAdapter, GPUNodeRenderer, type GPUNodeRendererConfig, GPUPositionProvider, type GeoBounds, type GeoPosition, type GeoSearchResult, type GeocoderDescriptor, GlobeControl, type GlobeControlConfig, GlobeLayer, type GlobeLayerProps, GraphCanvas, type GraphCanvasProps, GraphContext, type GraphContextValue, GraphControl, type GraphControlConfig, type GraphEvent, type GraphEventHandler, type GraphEventType, type GraphFilterAPI, GraphFilterManager, GraphRenderer, type GraphRendererConfig, type GraphRendererProps, GraphStore, type GraphThemeConfig, type GraphThemeKey, GraphThemes, type GraphViewState, GroupCloud, GroupHitTest, GroupManager, type GroupOptions, type GroupSnapshot, type GroupSpec, GroupSphereRenderer, type GroupState, GroupsApi, type HeatDiffusionConfig, HeatDiffusionEffect, type HiddenState, HistoryApi, type HistoryChangeInfo, type HoverChangeEvent, HoverHandler, type HoverHandlerConfig, type HoverState, type HoverTarget, type IconAtlasConfig, IconAtlasManager, type IconEntry, type IconFontConfigExt, type IconSpec, type ImageArrayConfig, ImageAtlasManager, type ImageEntry, type ImageMappingOptions, type InteractionConfig, InteractionManager, type InteractionManagerConfig, type KeyBinding, KeyboardShortcutManager, type KeyboardShortcutManagerConfig, type LabelPosition$1 as LabelPosition, type LayerContext, type LayerOptions, type LayerRenderer, LayoutApi, type LayoutControllerInterface, type LayoutEndInfo, type LayoutEngine, type LayoutReadback, type LayoutRuntime, type LayoutRuntimeEventMap, LayoutRuntimeImpl, type LayoutRuntimeSnapshot, LegendPanel, type LegendPanelProps, type LinkConfig, type LinkOptions, MAX_BADGE_TEXT_CHARS, type MSDFFont, type MSDFGlyph, MapApi, type MapConfig, MapCoordinateProvider, type MapMode, type MapTileProvider, type MapTileProviderDescriptor, MapTileProviders, MapTransition, type MapTransitionConfig, type MapTransitionMode, MarkerLayer, type MarkerLayerProps, MarkerRenderer, type MarkerRendererConfig, type MarkerSpec, type MatchSpec, type MenuContext, type MenuGroup, type MenuItem, type MergeConfig, type MergeOptions, type MetricPulseConfig, MetricPulseEffect, type MinimapConfig, MinimapLayer, type MinimapLayerProps, NOMINATIM_BASE_URL, type NodeBreatheConfig, NodeBreatheEffect, NodeCloud, type NodeCloudConfig, type NodeCloudProps, type NodeDefinition, type NodeDragEvent, type NodeEntranceConfig, NodeEntranceEffect, type NodeEvent, type NodeFilter, type NodeFilterCommonSpec, NodeInfoManager, NodeInfoPanel, type NodeInfoPanelProps, type NodeInfoState, type NodeInput, type NodeLike, type NodePickResult, type NodePointerEvent, type NodePredicateFn, type NodeProps, NodeQuery, type NodeRenderState, type NodeRippleConfig, NodeRippleEffect, type NodeSelector, type NodeSizeConfig, NodeSizeService, NodesApi, type ParsedDate, type ParsedSelector, type PathHighlightConfig, PathHighlightEffect, type PickResult, type PickType, Picker, PickerUtils, type PinnedState, PitchToggleButton, type PitchToggleButtonProps, type Platform, PlatformAdapter, type PlaybackConfig, type PlaybackOptions, type PluginInstallContext, type PointerEventBase, type PointerModifiers, type PositionMode, type PositionProvider, type PredicateFilter, type PropertyColorConfig, PropertyColorEffect, PropertyTween, type PropertyTweenConfig, QuickCreatePanel, type QuickCreatePanelProps, type RGB, type RangeFilter, type RangeSpec, type RelationshipType, type RenderBackendType, RenderEngineApi$1 as RenderEngineApi, EventBus as RenderEventBus, type ResolvedMenuItem, type ResolvedMenuSection, ScaledLODRadial, type SchemaCallbacks, type Scope, type ScreenshotOptions, type SearchOptions, SelectionApi, type SelectionChangeEvent, SelectionManager, type SelectionMode$1 as SelectionMode, type SelectionState, SelfLoopCloud, type SelfLoopCloudConfig, SetPositionsCommand, type ShortcutCategory, type ShortcutCommand, type ShortcutCommandDefinition, type ShortcutConfig, type ShortcutOptions, type SizeMappingOptions, type SkillContext, type SkillDef, type SkillInput, type SkillResult, SkillsApi, SlippyMapFlat, type SlippyMapFlatConfig, SlippyMapGlobe, type SlippyMapGlobeConfig, type SnapshotDiff, StaticPositionProvider, StyleApi, StyleMapper, type StyleRule, type Stylesheet$1 as Stylesheet, Stylesheet as StylesheetEngine, type TagId, type TagSpec, type TextAlign, TextCloud, type TextCloudConfig, type TextItem, TextLayer, type TextLayerProps, type TileUrlFn, type TimelineEvent, type TimelineReplayConfig, TimelineReplayEffect, type ToolItem, type ToolItemAction, type ToolItemParent, type ToolItemToggle, type ToolPriority, ToolRegistry$1 as ToolRegistry, type ToolSeparator, Toolbar, type ToolbarAction, type ToolbarContext, type ToolbarControlledProps, type ToolbarPlugin, type ToolbarProps, type ToolbarState, type TopologyFilter, TransformApi, type TransformResult, type TransitionOptions, type TransitionPhase, type Unsubscribe$1 as Unsubscribe, type UpdateStrategy$1 as UpdateStrategy, UpdateStrategy as UpdateStrategyImpl, type UserShortcutConfig, type VectorTileStyle, type ViewEvent, type ViewEventHandler, type ViewEventType, type ViewInfo, type ViewRegistrationOptions, ViewRegistry, type ViewState, VisualMapper, advanceByGranularity, arrowFragmentShader, arrowVertexShader, cartesian2Polar, computeAirborne, createDefaultItems, createDefaultRegistry, createEdgeTextCloud, createTextCloud, createVectorTileProvider, defaultEdgeStyles, defaultNodeStyles, defaultStylesheet, deg2Rad, detectDateProperty, dirtyFlagToAttributes, divergingColorScale, edgeFragmentShader, edgeVertexShader, findFirstImage, fitBounds, formatDate, getAttributesToUpdate, getBaseWorldRadius, getColorScheme, getEdgeClassifier, getGlobalViewRegistry, getNodeShaderSize, getNodeShaderSizeByValue, getNodeWorldRadius, getNodeWorldRadiusBySize, getProviderTileUrl, getScaleFn, hexToRgb, isImageUrl, nextGranularity, nodeFragmentShader, nodeVertexShader, nominatimGeocoder, normalizeEdgeIds, normalizeNodeIds, ordinalColorScale, parseDate, parseNominatim, pickingFragmentShader, pickingVertexShader, polar2Cartesian, prevGranularity, rad2Deg, renderOrderForSlot, requiresStructureRebuild, resetGlobalViewRegistry, resolveCaptionText, resolveNodeTitle, selfLoopFragmentShader, selfLoopVertexShader, sequentialColorScale, setLicenseKey, sqrtScale, thresholdColorScale, truncateToGranularity, useAtlasManagers, useCamera, useCloudScene, useEffectiveMapProjection, useEngineLayer, useGraph, useGraphFilter, useGraphHandle, useGraphStore, useGraphVersion, useInteraction, useInvalidate, useIs3D, useIsMapMode, useLayer, useLayoutController, useLayoutPositionProvider, useMapDamping, useMapSphereRadius, useOptionalRenderEngineApi, useRenderEngineApi, useScene, useTextScales, useTheme, useToolbarState, useViewStateField, vectorDark };