@modernrelay/orbit-core 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine.d.ts +1 -1
- package/dist/{index-CaIk2nit.d.ts → index-Bsx85b5l.d.ts} +4 -0
- package/dist/index.d.ts +119 -105
- package/dist/index.js +151 -20
- package/dist/index.js.map +1 -1
- package/dist/{lane-D425_qDJ.d.ts → lane-D7xtoPJy.d.ts} +1 -1
- package/dist/testing.d.ts +2 -2
- package/package.json +1 -1
package/dist/engine.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { aZ as BufferPatch, a9 as EngineBufferChannel, ac as EngineCapabilities, ab as EngineCommit, a_ as EngineConfigUpdate, a$ as EngineContextEvent, aY as EngineDiagnostic, E as EngineFactory, aW as EngineHostEvents, aX as FitViewOptions, aa as GraphEngine } from './index-
|
|
1
|
+
export { aZ as BufferPatch, a9 as EngineBufferChannel, ac as EngineCapabilities, ab as EngineCommit, a_ as EngineConfigUpdate, a$ as EngineContextEvent, aY as EngineDiagnostic, E as EngineFactory, aW as EngineHostEvents, aX as FitViewOptions, aa as GraphEngine } from './index-Bsx85b5l.js';
|
|
@@ -1519,6 +1519,10 @@ interface GraphEngine {
|
|
|
1519
1519
|
/** Replace the full pinned set; null/[] unpins all (idempotent). */
|
|
1520
1520
|
setPinnedIndices?(indices: readonly number[] | null): void;
|
|
1521
1521
|
getPositions(): Float32Array | null;
|
|
1522
|
+
/** Optional nonblocking snapshot for bounded overlay sampling. Returns an
|
|
1523
|
+
* owned buffer, or null when unavailable/invalidated by engine recovery.
|
|
1524
|
+
* Core stamps the request against its scene and render revision. */
|
|
1525
|
+
getPositionsAsync?(): Promise<Float32Array | null>;
|
|
1522
1526
|
destroy(): void;
|
|
1523
1527
|
}
|
|
1524
1528
|
/** Engine factory the host passes in; called once per instance mount. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { G as GraphSnapshot, A as AcceptedGraph, R as ResolvedGroup, a as GraphDiagnostic, b as GraphNode, c as AcceptedEdge, N as NodeId, M as MetaEdge, S as SceneFold, d as GroupSpec, e as GroupBySpec, f as SceneGroups, g as RenderScene, h as SceneLinkRef, i as ScenePointRef, j as Accessor, k as RevisionAwareService, l as RequestContext, m as SearchResult, V as ViewportState, n as SelectionState, o as SubgraphSpec, J as JsonValue, p as ExpansionService, P as PathService, q as ScaleLimits, r as ExpansionPage, s as GraphTheme, t as GraphStoreState, L as LabelPlacement, u as GraphHostUpdate, B as BeginIngestOptions, I as IngestSession, v as GraphEventName, w as GraphEventMap, x as GraphListenerControl, y as EdgeId, z as GraphPerfSnapshot, C as ResolvedCluster, D as ExpansionOptions, F as NeighborhoodOptions, H as NeighborhoodResult, K as PathOptions, O as PathResult, Q as PathOutcome, T as SearchActivation, U as CrossfilterSession, W as TimelinePlayback, X as Scale, Y as MetricName, Z as Revisions, _ as AccessibilityConfig, $ as ThemeInput, a0 as LabelConfig, a1 as IngestBatch, a2 as RevisionDimension, a3 as FilterSpec, a4 as FilterExpr, a5 as DimensionSpec, a6 as BrushState, a7 as DimensionSummary, a8 as DomainPolicy, a9 as EngineBufferChannel, ad as MetricColumn, ae as ColumnarGraphSnapshot, af as GraphSnapshotInput } from './index-
|
|
1
|
+
import { G as GraphSnapshot, A as AcceptedGraph, R as ResolvedGroup, a as GraphDiagnostic, b as GraphNode, c as AcceptedEdge, N as NodeId, M as MetaEdge, S as SceneFold, d as GroupSpec, e as GroupBySpec, f as SceneGroups, g as RenderScene, h as SceneLinkRef, i as ScenePointRef, j as Accessor, k as RevisionAwareService, l as RequestContext, m as SearchResult, V as ViewportState, n as SelectionState, o as SubgraphSpec, J as JsonValue, p as ExpansionService, P as PathService, q as ScaleLimits, r as ExpansionPage, s as GraphTheme, t as GraphStoreState, L as LabelPlacement, u as GraphHostUpdate, B as BeginIngestOptions, I as IngestSession, v as GraphEventName, w as GraphEventMap, x as GraphListenerControl, y as EdgeId, z as GraphPerfSnapshot, C as ResolvedCluster, D as ExpansionOptions, F as NeighborhoodOptions, H as NeighborhoodResult, K as PathOptions, O as PathResult, Q as PathOutcome, T as SearchActivation, U as CrossfilterSession, W as TimelinePlayback, X as Scale, Y as MetricName, Z as Revisions, _ as AccessibilityConfig, $ as ThemeInput, a0 as LabelConfig, a1 as IngestBatch, a2 as RevisionDimension, a3 as FilterSpec, a4 as FilterExpr, a5 as DimensionSpec, a6 as BrushState, a7 as DimensionSummary, a8 as DomainPolicy, a9 as EngineBufferChannel, ad as MetricColumn, ae as ColumnarGraphSnapshot, af as GraphSnapshotInput } from './index-Bsx85b5l.js';
|
|
2
2
|
import { EngineFactory, GraphEngine, EngineCommit, EngineCapabilities } from './engine.js';
|
|
3
|
-
export { ag as AppendReceipt, ah as CategoryBin, ai as ClusterSpec, aj as Column, ak as ColumnChange, al as DIAGNOSTIC_SAMPLE_CAP, am as DegradeEvent, an as DegradeStep, ao as DiagnosticCode, ap as DiagnosticSeverity, aq as DimensionKind, ar as ErrorPhase, as as ExpansionBatch, at as ExpansionProgress, au as ExpansionQuery, av as ExpansionResponse, aw as FilterMode, ax as FilterValue, ay as GraphEdge, az as GraphError, aA as GraphOperationError, aB as HistogramBin, aC as IngestCommitReceipt, aD as IngestSessionState, aE as InstanceStatus, aF as LayoutKind, aG as NodeEventPayload, aH as NodeVisibility, aI as OrbitOperationError, aJ as RelationshipOptions, aK as ResourceAdmissionReport, aL as ResourceDegradeStep, aM as SIMULATION_PRESETS, aN as SearchUnavailableReason, aO as SimulationConfig, aP as SimulationInput, aQ as SimulationPreset, aR as StringColumn, aS as graphErrorToError, aT as isFatalGraphError, aU as resolveSimulation, aV as resourceLimitFatal } from './index-
|
|
4
|
-
import { W as WorkerFactoryOption } from './lane-
|
|
5
|
-
export { C as ClusterDerivation, D as DEFAULT_CLUSTER_CENTER_RADIUS, a as DEFAULT_LAYOUT_SEED, E as EncodedStringTable, R as RequestClass, b as WorkerEntity, c as WorkerEnvelope, d as WorkerTransport, e as clusterCentroids, f as collectTransfers, g as decodeStringTable, h as deriveClusters, i as encodeStringTable, j as generateClusterCenters, k as judgeEpoch, r as resolveClusterCenters } from './lane-
|
|
3
|
+
export { ag as AppendReceipt, ah as CategoryBin, ai as ClusterSpec, aj as Column, ak as ColumnChange, al as DIAGNOSTIC_SAMPLE_CAP, am as DegradeEvent, an as DegradeStep, ao as DiagnosticCode, ap as DiagnosticSeverity, aq as DimensionKind, ar as ErrorPhase, as as ExpansionBatch, at as ExpansionProgress, au as ExpansionQuery, av as ExpansionResponse, aw as FilterMode, ax as FilterValue, ay as GraphEdge, az as GraphError, aA as GraphOperationError, aB as HistogramBin, aC as IngestCommitReceipt, aD as IngestSessionState, aE as InstanceStatus, aF as LayoutKind, aG as NodeEventPayload, aH as NodeVisibility, aI as OrbitOperationError, aJ as RelationshipOptions, aK as ResourceAdmissionReport, aL as ResourceDegradeStep, aM as SIMULATION_PRESETS, aN as SearchUnavailableReason, aO as SimulationConfig, aP as SimulationInput, aQ as SimulationPreset, aR as StringColumn, aS as graphErrorToError, aT as isFatalGraphError, aU as resolveSimulation, aV as resourceLimitFatal } from './index-Bsx85b5l.js';
|
|
4
|
+
import { W as WorkerFactoryOption } from './lane-D7xtoPJy.js';
|
|
5
|
+
export { C as ClusterDerivation, D as DEFAULT_CLUSTER_CENTER_RADIUS, a as DEFAULT_LAYOUT_SEED, E as EncodedStringTable, R as RequestClass, b as WorkerEntity, c as WorkerEnvelope, d as WorkerTransport, e as clusterCentroids, f as collectTransfers, g as decodeStringTable, h as deriveClusters, i as encodeStringTable, j as generateClusterCenters, k as judgeEpoch, r as resolveClusterCenters } from './lane-D7xtoPJy.js';
|
|
6
6
|
import { StoreApi } from 'zustand/vanilla';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -337,6 +337,111 @@ declare function projectSizes<T>(items: readonly T[], accessor: Accessor<T, numb
|
|
|
337
337
|
diagnostics: GraphDiagnostic[];
|
|
338
338
|
};
|
|
339
339
|
|
|
340
|
+
/**
|
|
341
|
+
* minimap / overview — CPU fallback lane.
|
|
342
|
+
*
|
|
343
|
+
* v0.9 trim: no engine exposes `capabilities.overviewPass` yet (cosmos has no
|
|
344
|
+
* second draw pass — matrix), so this controller IS the minimap thumbnail
|
|
345
|
+
* path: an O(n) CPU rasterization of the position mirror into a small
|
|
346
|
+
* RGBA dot field. It is a pure controller — no DOM, no canvas — the React
|
|
347
|
+
* component blits the returned `Uint8ClampedArray` into an `ImageData`/canvas
|
|
348
|
+
* and draws the viewport rectangle on top (O(1) from `getViewport`, fully
|
|
349
|
+
* decoupled from thumbnail refresh cadence).
|
|
350
|
+
*
|
|
351
|
+
* Refresh cadence: ≤ 2 Hz while the simulation is hot (positions
|
|
352
|
+
* change continuously on the GPU, so the epoch is ignored), ≤ 1 Hz after a
|
|
353
|
+
* change while idle, and ZERO work while idle with an unchanged positions
|
|
354
|
+
* epoch — `shouldRefresh` is the single throttle gate and latches its clock /
|
|
355
|
+
* epoch only when it answers true (a `true` must be followed by one
|
|
356
|
+
* `rasterize`).
|
|
357
|
+
*
|
|
358
|
+
* Orientation: minimap pixel y grows DOWNWARD while world (space) y grows
|
|
359
|
+
* upward — the same flip cosmos applies in its space→screen scale (dist
|
|
360
|
+
* `scalePointY.domain([S, 0])`), so the thumbnail visually matches the main
|
|
361
|
+
* canvas. `worldToMinimap`/`minimapToWorld` are exact inverses over the last
|
|
362
|
+
* rasterized bounds.
|
|
363
|
+
*/
|
|
364
|
+
/** Position mirror handed to the controller: interleaved x,y space coords. */
|
|
365
|
+
interface OverviewScene {
|
|
366
|
+
/** Interleaved `[x0, y0, x1, y1, …]`; may be longer than `count` pairs. */
|
|
367
|
+
positions: Float32Array;
|
|
368
|
+
/** Number of points (pairs) to read from `positions`. */
|
|
369
|
+
count: number;
|
|
370
|
+
}
|
|
371
|
+
/** Borrowed read-only view of the current scene's cached positions. The
|
|
372
|
+
* revision changes when the roster or positions change, including settling
|
|
373
|
+
* and dragging without a render revision. Do not mutate the position buffer. */
|
|
374
|
+
interface OverviewSnapshot extends OverviewScene {
|
|
375
|
+
readonly revision: number;
|
|
376
|
+
}
|
|
377
|
+
interface OverviewControllerOptions {
|
|
378
|
+
/** Latest scene snapshot, or null when nothing is loaded yet. */
|
|
379
|
+
getScene: () => OverviewScene | null;
|
|
380
|
+
/**
|
|
381
|
+
* Soft-filter visibility mask. Hidden points still rasterize (and still
|
|
382
|
+
* contribute to bounds — the thumbnail must not re-frame when a filter
|
|
383
|
+
* toggles) but at a dimmed alpha.
|
|
384
|
+
*/
|
|
385
|
+
getVisible?: (index: number) => boolean;
|
|
386
|
+
/** Square thumbnail edge in pixels. Default {@link OVERVIEW_SIZE_DEFAULT}. */
|
|
387
|
+
size?: number;
|
|
388
|
+
}
|
|
389
|
+
/** World-space extent of the last rasterization (finite positions only). */
|
|
390
|
+
interface OverviewBounds {
|
|
391
|
+
minX: number;
|
|
392
|
+
minY: number;
|
|
393
|
+
maxX: number;
|
|
394
|
+
maxY: number;
|
|
395
|
+
}
|
|
396
|
+
interface OverviewRaster {
|
|
397
|
+
/** RGBA, `size * size * 4` bytes — blit via `new ImageData(bitmap, size)`. */
|
|
398
|
+
bitmap: Uint8ClampedArray;
|
|
399
|
+
bounds: OverviewBounds;
|
|
400
|
+
}
|
|
401
|
+
/** Spec the CPU fallback rasterizes into a 256² target. */
|
|
402
|
+
declare const OVERVIEW_SIZE_DEFAULT = 256;
|
|
403
|
+
/** Hot-simulation refresh floor: ≤ 2 Hz. */
|
|
404
|
+
declare const OVERVIEW_HOT_INTERVAL_MS = 500;
|
|
405
|
+
/** Idle-after-change refresh floor: ≤ 1 Hz. */
|
|
406
|
+
declare const OVERVIEW_IDLE_INTERVAL_MS = 1000;
|
|
407
|
+
declare class OverviewController {
|
|
408
|
+
private readonly getScene;
|
|
409
|
+
private readonly getVisible;
|
|
410
|
+
readonly size: number;
|
|
411
|
+
/** Transform of the LAST rasterization; null until rasterize succeeds. */
|
|
412
|
+
private frame;
|
|
413
|
+
private lastRefreshMs;
|
|
414
|
+
private lastEpoch;
|
|
415
|
+
constructor(options: OverviewControllerOptions);
|
|
416
|
+
/**
|
|
417
|
+
* The single throttle gate (see module header). Latches `nowMs`/`epoch`
|
|
418
|
+
* when it returns true, so each `true` accounts for exactly one refresh:
|
|
419
|
+
*
|
|
420
|
+
* - hot (`simulationRunning`): time-gated only (≤ 2 Hz) — the epoch is
|
|
421
|
+
* ignored because positions change continuously without epoch advances;
|
|
422
|
+
* - idle: refresh only when the epoch ADVANCED since the last refresh,
|
|
423
|
+
* time-gated at ≤ 1 Hz;
|
|
424
|
+
* - idle + unchanged epoch: always false — zero work, forever.
|
|
425
|
+
*/
|
|
426
|
+
shouldRefresh(nowMs: number, simulationRunning: boolean, epoch: number): boolean;
|
|
427
|
+
/**
|
|
428
|
+
* Rasterizes the current scene into a fresh `size²` RGBA dot field: 1 px
|
|
429
|
+
* white dots whose alpha ACCUMULATES on overlap (heatmap-ish density),
|
|
430
|
+
* dimmed for mask-hidden points; NaN pairs are skipped.
|
|
431
|
+
* World bounds map into the thumbnail with a 5 % edge padding at a UNIFORM
|
|
432
|
+
* scale (aspect preserved, centered on the short axis) and a downward pixel
|
|
433
|
+
* y (see module header). Returns null when there is no scene or no point.
|
|
434
|
+
*/
|
|
435
|
+
rasterize(): OverviewRaster | null;
|
|
436
|
+
/**
|
|
437
|
+
* World (space) → minimap pixel coords over the LAST rasterized frame
|
|
438
|
+
* (fractional; callers round for pixel work). Null before any rasterize.
|
|
439
|
+
*/
|
|
440
|
+
worldToMinimap(x: number, y: number): [number, number] | null;
|
|
441
|
+
/** Exact inverse of {@link worldToMinimap}. Null before any rasterize. */
|
|
442
|
+
minimapToWorld(px: number, py: number): [number, number] | null;
|
|
443
|
+
}
|
|
444
|
+
|
|
340
445
|
/**
|
|
341
446
|
* search — the SearchService contract plus the built-in LOCAL indexed
|
|
342
447
|
* service.
|
|
@@ -1354,6 +1459,12 @@ interface GraphInstance<N = Record<string, unknown>, E = Record<string, unknown>
|
|
|
1354
1459
|
* null values; lazily computes the degree family on first use.
|
|
1355
1460
|
*/
|
|
1356
1461
|
getMetricValue(metric: MetricName, id: NodeId): number | null;
|
|
1462
|
+
/** Latest live position cache, falling back to reconciled positions before
|
|
1463
|
+
* the first sample. Pure read; buffers are borrowed and must not be mutated. */
|
|
1464
|
+
getOverviewScene(): OverviewSnapshot | null;
|
|
1465
|
+
/** Observe position/roster changes and request bounded live sampling while
|
|
1466
|
+
* mounted. Replays once; unsubscribe removes this consumer's demand. */
|
|
1467
|
+
subscribeOverview(listener: () => void): () => void;
|
|
1357
1468
|
getRevisions(): Revisions;
|
|
1358
1469
|
getDiagnostics(): readonly GraphDiagnostic[];
|
|
1359
1470
|
getNode(id: NodeId): GraphNode<N> | undefined;
|
|
@@ -1812,6 +1923,8 @@ declare class EdgePickingFacade {
|
|
|
1812
1923
|
*/
|
|
1813
1924
|
|
|
1814
1925
|
type EdgePairCounters = Map<NodeId, Map<NodeId, number>>;
|
|
1926
|
+
/** Take and advance the next parallel-edge ordinal for an exact endpoint tuple. */
|
|
1927
|
+
declare function nextSynthesizedEdgeId(counters: EdgePairCounters, source: NodeId, target: NodeId): EdgeId;
|
|
1815
1928
|
|
|
1816
1929
|
/**
|
|
1817
1930
|
* revisioned ingestion — pure session/overlay bookkeeping plus the
|
|
@@ -3145,105 +3258,6 @@ declare class MetricStore<N = Record<string, unknown>> {
|
|
|
3145
3258
|
private ensureDegrees;
|
|
3146
3259
|
}
|
|
3147
3260
|
|
|
3148
|
-
/**
|
|
3149
|
-
* minimap / overview — CPU fallback lane.
|
|
3150
|
-
*
|
|
3151
|
-
* v0.9 trim: no engine exposes `capabilities.overviewPass` yet (cosmos has no
|
|
3152
|
-
* second draw pass — matrix), so this controller IS the minimap thumbnail
|
|
3153
|
-
* path: an O(n) CPU rasterization of the position mirror into a small
|
|
3154
|
-
* RGBA dot field. It is a pure controller — no DOM, no canvas — the React
|
|
3155
|
-
* component blits the returned `Uint8ClampedArray` into an `ImageData`/canvas
|
|
3156
|
-
* and draws the viewport rectangle on top (O(1) from `getViewport`, fully
|
|
3157
|
-
* decoupled from thumbnail refresh cadence).
|
|
3158
|
-
*
|
|
3159
|
-
* Refresh cadence: ≤ 2 Hz while the simulation is hot (positions
|
|
3160
|
-
* change continuously on the GPU, so the epoch is ignored), ≤ 1 Hz after a
|
|
3161
|
-
* change while idle, and ZERO work while idle with an unchanged positions
|
|
3162
|
-
* epoch — `shouldRefresh` is the single throttle gate and latches its clock /
|
|
3163
|
-
* epoch only when it answers true (a `true` must be followed by one
|
|
3164
|
-
* `rasterize`).
|
|
3165
|
-
*
|
|
3166
|
-
* Orientation: minimap pixel y grows DOWNWARD while world (space) y grows
|
|
3167
|
-
* upward — the same flip cosmos applies in its space→screen scale (dist
|
|
3168
|
-
* `scalePointY.domain([S, 0])`), so the thumbnail visually matches the main
|
|
3169
|
-
* canvas. `worldToMinimap`/`minimapToWorld` are exact inverses over the last
|
|
3170
|
-
* rasterized bounds.
|
|
3171
|
-
*/
|
|
3172
|
-
/** Position mirror handed to the controller: interleaved x,y space coords. */
|
|
3173
|
-
interface OverviewScene {
|
|
3174
|
-
/** Interleaved `[x0, y0, x1, y1, …]`; may be longer than `count` pairs. */
|
|
3175
|
-
positions: Float32Array;
|
|
3176
|
-
/** Number of points (pairs) to read from `positions`. */
|
|
3177
|
-
count: number;
|
|
3178
|
-
}
|
|
3179
|
-
interface OverviewControllerOptions {
|
|
3180
|
-
/** Latest scene snapshot, or null when nothing is loaded yet. */
|
|
3181
|
-
getScene: () => OverviewScene | null;
|
|
3182
|
-
/**
|
|
3183
|
-
* Soft-filter visibility mask. Hidden points still rasterize (and still
|
|
3184
|
-
* contribute to bounds — the thumbnail must not re-frame when a filter
|
|
3185
|
-
* toggles) but at a dimmed alpha.
|
|
3186
|
-
*/
|
|
3187
|
-
getVisible?: (index: number) => boolean;
|
|
3188
|
-
/** Square thumbnail edge in pixels. Default {@link OVERVIEW_SIZE_DEFAULT}. */
|
|
3189
|
-
size?: number;
|
|
3190
|
-
}
|
|
3191
|
-
/** World-space extent of the last rasterization (finite positions only). */
|
|
3192
|
-
interface OverviewBounds {
|
|
3193
|
-
minX: number;
|
|
3194
|
-
minY: number;
|
|
3195
|
-
maxX: number;
|
|
3196
|
-
maxY: number;
|
|
3197
|
-
}
|
|
3198
|
-
interface OverviewRaster {
|
|
3199
|
-
/** RGBA, `size * size * 4` bytes — blit via `new ImageData(bitmap, size)`. */
|
|
3200
|
-
bitmap: Uint8ClampedArray;
|
|
3201
|
-
bounds: OverviewBounds;
|
|
3202
|
-
}
|
|
3203
|
-
/** Spec the CPU fallback rasterizes into a 256² target. */
|
|
3204
|
-
declare const OVERVIEW_SIZE_DEFAULT = 256;
|
|
3205
|
-
/** Hot-simulation refresh floor: ≤ 2 Hz. */
|
|
3206
|
-
declare const OVERVIEW_HOT_INTERVAL_MS = 500;
|
|
3207
|
-
/** Idle-after-change refresh floor: ≤ 1 Hz. */
|
|
3208
|
-
declare const OVERVIEW_IDLE_INTERVAL_MS = 1000;
|
|
3209
|
-
declare class OverviewController {
|
|
3210
|
-
private readonly getScene;
|
|
3211
|
-
private readonly getVisible;
|
|
3212
|
-
readonly size: number;
|
|
3213
|
-
/** Transform of the LAST rasterization; null until rasterize succeeds. */
|
|
3214
|
-
private frame;
|
|
3215
|
-
private lastRefreshMs;
|
|
3216
|
-
private lastEpoch;
|
|
3217
|
-
constructor(options: OverviewControllerOptions);
|
|
3218
|
-
/**
|
|
3219
|
-
* The single throttle gate (see module header). Latches `nowMs`/`epoch`
|
|
3220
|
-
* when it returns true, so each `true` accounts for exactly one refresh:
|
|
3221
|
-
*
|
|
3222
|
-
* - hot (`simulationRunning`): time-gated only (≤ 2 Hz) — the epoch is
|
|
3223
|
-
* ignored because positions change continuously without epoch advances;
|
|
3224
|
-
* - idle: refresh only when the epoch ADVANCED since the last refresh,
|
|
3225
|
-
* time-gated at ≤ 1 Hz;
|
|
3226
|
-
* - idle + unchanged epoch: always false — zero work, forever.
|
|
3227
|
-
*/
|
|
3228
|
-
shouldRefresh(nowMs: number, simulationRunning: boolean, epoch: number): boolean;
|
|
3229
|
-
/**
|
|
3230
|
-
* Rasterizes the current scene into a fresh `size²` RGBA dot field: 1 px
|
|
3231
|
-
* white dots whose alpha ACCUMULATES on overlap (heatmap-ish density),
|
|
3232
|
-
* dimmed for mask-hidden points; NaN pairs are skipped.
|
|
3233
|
-
* World bounds map into the thumbnail with a 5 % edge padding at a UNIFORM
|
|
3234
|
-
* scale (aspect preserved, centered on the short axis) and a downward pixel
|
|
3235
|
-
* y (see module header). Returns null when there is no scene or no point.
|
|
3236
|
-
*/
|
|
3237
|
-
rasterize(): OverviewRaster | null;
|
|
3238
|
-
/**
|
|
3239
|
-
* World (space) → minimap pixel coords over the LAST rasterized frame
|
|
3240
|
-
* (fractional; callers round for pixel work). Null before any rasterize.
|
|
3241
|
-
*/
|
|
3242
|
-
worldToMinimap(x: number, y: number): [number, number] | null;
|
|
3243
|
-
/** Exact inverse of {@link worldToMinimap}. Null before any rasterize. */
|
|
3244
|
-
minimapToWorld(px: number, py: number): [number, number] | null;
|
|
3245
|
-
}
|
|
3246
|
-
|
|
3247
3261
|
/**
|
|
3248
3262
|
* SVG export — the engine-free pure module.
|
|
3249
3263
|
*
|
|
@@ -3522,5 +3536,5 @@ declare function descriptorKey(accessor: FieldAccessor<unknown, unknown>): strin
|
|
|
3522
3536
|
*/
|
|
3523
3537
|
declare function evaluateFieldAccessor(accessor: FieldAccessor<unknown, unknown>, id: string, attrs: Readonly<Record<string, unknown>> | undefined): unknown;
|
|
3524
3538
|
|
|
3525
|
-
export { ATLAS_MAX_CONCURRENT_DEFAULT, ATLAS_MAX_ENTRIES_DEFAULT, ATLAS_MAX_RETRIES_DEFAULT, AcceptanceQueue, AcceptedEdge, AcceptedGraph, AccessibilityConfig, Accessor, BASE_PENDING_KEY, BRUSH_HISTORY_COALESCE_MS, BeginIngestOptions, BrushState, CATEGORICAL_PALETTE, ColumnarGraphSnapshot, CrossfilterSession, DEFAULT_BIN_COUNT, DIM_ALPHA_DEFAULT, DIVERGING_RANGE_DEFAULT, DimensionSpec, DimensionSummary, DomainPolicy, DomainStore, EDGE_PICK_TOLERANCE_PX, EdgeId, EdgePickingFacade, EngineBufferChannel, ExpansionOptions, ExpansionPage, ExpansionService, FilterExpr, FilterSpec, GRAPH_THEME_DARK, GRAPH_THEME_LIGHT, GraphDiagnostic, GraphEventMap, GraphEventName, GraphHostUpdate, GraphListenerControl, GraphNode, GraphPerfSnapshot, GraphSnapshot, GraphSnapshotInput, GraphStoreState, GraphTheme, GroupBySpec, GroupSpec, HISTORY_LIMIT_DEFAULT, HistoryKernel, INGEST_MAX_FLUSH_LATENCY_MS_DEFAULT, INGEST_MAX_PENDING_BYTES_DEFAULT, INGEST_OVERFLOW_FACTOR, ImageAtlasPipeline, IngestBatch, IngestSession, InvestigationError, JsonValue, LABEL_MAX_VISIBLE_CAP, LABEL_MAX_VISIBLE_DEFAULT, LabelConfig, LabelPlacement, LinkPickIndex, META_EDGE_MAX_WIDTH, MetaEdge, MetricColumn, MetricName, MetricStore, NeighborhoodOptions, NeighborhoodResult, NodeId, OVERVIEW_HOT_INTERVAL_MS, OVERVIEW_IDLE_INTERVAL_MS, OVERVIEW_SIZE_DEFAULT, OverviewController, PHYSICAL_DEFAULT_LINK_WIDTH, PHYSICAL_DEFAULT_POINT_SIZE, PathOptions, PathOutcome, PathResult, PathService, PendingExpansions, Reconciler, RenderScene, RequestContext, ResolvedCluster, ResolvedGroup, RevisionAwareService, RevisionDimension, Revisions, SEARCH_CACHE_LIMIT, SEARCH_LIMIT_DEFAULT, SEARCH_SCAN_CHUNK, SEARCH_SCORE_EXACT_ID, SEARCH_SCORE_ID_PREFIX, SEARCH_SCORE_SUBSTRING, SEARCH_SCORE_TOKEN_START_BONUS, SEQUENTIAL_RANGE_DEFAULT, SUPER_NODE_MAX_SIZE, SVG_MAX_ELEMENTS_DEFAULT, Scale, ScaleLimits, SceneFold, SceneGroups, SceneLinkRef, ScenePointRef, SearchActivation, SearchResult, SelectionState, SoftMask, SubgraphSpec, SvgBudgetError, TIMELINE_STEP_DEFAULT, TIMELINE_TICK_MS_DEFAULT, ThemeInput, TimelinePlayback, TypedColumnCrossfilter, VIEW_STATE_VERSION, ViewportState, WorkerFactoryOption, acceptColumnar, admitServiceResult, assertCapabilityMethodParity, baseFromAccepted, baseFromContribution, buildAcceptedAdjacency, buildAcceptedFromColumnar, buildAdjacency, canonicalFilterKey, canonicalJson, canonicalScaleKey, cascadeEdges, categoricalIndex, categoricalRows, coerceNumeric, coerceNumericInto, collapseParallelEdges, columnarArrayBuffers, compileEdgeFilter, compileNodeFilter, computeNumericDomain, createGraphInstance, createInvestigationSession, createLocalExpansionService, createLocalSearchService, createRequestContext, deriveGroupsByKey, descriptorKey, detachColumnarBuffers, divergingColor, escapeXml, estimateBatchBytes, evaluateFieldAccessor, evaluateFilterExpr, field, groupByDerivedId, groupSceneKey, interpolateColor, isColumnarSnapshot, isFieldAccessor, materializeColumnarSnapshot, medianLinkWidthPx, mergeDiagnostics, mergeModel, metaEdgePublicId, metaEdgeSceneKey, metaEdgeWidthFor, neighborsOf, newContribution, newStagingTallies, nextRequestId, normalizeCommitForCapabilities, parseColor, parseInvestigation, pointSegmentDistanceSquared, projectColors, projectSizes, renderSvg, resolveEnginePolicy, resolveFilterField, resolveManualGroups, resolveScope, resolveTheme, rewriteGroups, sameDataRef, sameGroupBySpec, sameGroupSpecArrays, sceneGroupsOf, sceneLinkRefAt, scenePointRefAt, selectLabelCandidates, sequentialColor, sequentialSize, serializeInvestigation, serviceCacheKey, sessionCommitDiagnostics, stageBatch, superNodeSizeFor, validateColumnarStructure, validateFieldAccessor, validateFilterExpr, validateGroupBySpec, validateGroupSpecs, validateSnapshot, validateViewState };
|
|
3526
|
-
export type { Adjacency, AdmitColumnsOptions, AdmitColumnsResult, AdmitServiceResultArgs, BrushDelta, CategoricalScale, ColumnarAcceptance, ColumnarIssue, CompiledFilter, CreateGraphInstanceOptions, CreateRequestContextArgs, CrossfilterStats, DescriptorIssue, DivergingScale, EdgePickRoute, EdgePickingFacadeOptions, EnginePolicy, EnginePolicyDegradation, ExpandNodeResult, ExpansionOverlayRecord, ExpansionRecord, FetchLike, FieldAccessor, FilterErrorAggregate, GraphInstance, GraphInvestigation, GraphServices, GraphViewState, GroupByDerivation, GroupRewrite, GroupValidationResult, HistoryCommand, HistoryDepths, HistoryKernelOptions, ImageAtlasBatch, ImageAtlasPipelineOptions, ImageDecode, ImageResolver, InvestigationExpansion, InvestigationExpansionOptions, InvestigationSession, InvestigationSessionOptions, InvestigationSessionState, InvestigationSource, LabelCandidate, LabelCandidateResult, LabelCandidateViewport, LabelSubscriptions, LinkPickGridSnapshot, LinkVisibilityMask, LocalExpansionBase, LocalSearchBase, LocalSearchService, MaskDrain, MaskSource, MergeBase, MergeResult, MetaEdgeRecord, MetricModelInput, OverviewBounds, OverviewControllerOptions, OverviewRaster, OverviewScene, ReconcileResult, RegisterExpansionResult, RenderSvgOptions, RequestContextHandle, RequestedEngineFeatures, ResolveDomainArgs, ResolvedScope, RevisionSnapshot, RowTally, SavedInvestigationPath, ScaleChannelInfo, ScaleInfoRow, SearchService, SelectLabelCandidatesArgs, SequentialScale, SerializableScale, SerializableTransform, ServiceCacheKeyArgs, SessionContribution, SetViewStateResult, StageResult, StagingTallies, StampedEdge, StampedNode, SuperNodeRecord, SvgScene, SvgSceneEdge, SvgSceneLabel, SvgSceneNode, TypedFieldPath, ViewBrushState, ViewLayoutSpec, ViewStateVerdict, ViewStyling };
|
|
3539
|
+
export { ATLAS_MAX_CONCURRENT_DEFAULT, ATLAS_MAX_ENTRIES_DEFAULT, ATLAS_MAX_RETRIES_DEFAULT, AcceptanceQueue, AcceptedEdge, AcceptedGraph, AccessibilityConfig, Accessor, BASE_PENDING_KEY, BRUSH_HISTORY_COALESCE_MS, BeginIngestOptions, BrushState, CATEGORICAL_PALETTE, ColumnarGraphSnapshot, CrossfilterSession, DEFAULT_BIN_COUNT, DIM_ALPHA_DEFAULT, DIVERGING_RANGE_DEFAULT, DimensionSpec, DimensionSummary, DomainPolicy, DomainStore, EDGE_PICK_TOLERANCE_PX, EdgeId, EdgePickingFacade, EngineBufferChannel, ExpansionOptions, ExpansionPage, ExpansionService, FilterExpr, FilterSpec, GRAPH_THEME_DARK, GRAPH_THEME_LIGHT, GraphDiagnostic, GraphEventMap, GraphEventName, GraphHostUpdate, GraphListenerControl, GraphNode, GraphPerfSnapshot, GraphSnapshot, GraphSnapshotInput, GraphStoreState, GraphTheme, GroupBySpec, GroupSpec, HISTORY_LIMIT_DEFAULT, HistoryKernel, INGEST_MAX_FLUSH_LATENCY_MS_DEFAULT, INGEST_MAX_PENDING_BYTES_DEFAULT, INGEST_OVERFLOW_FACTOR, ImageAtlasPipeline, IngestBatch, IngestSession, InvestigationError, JsonValue, LABEL_MAX_VISIBLE_CAP, LABEL_MAX_VISIBLE_DEFAULT, LabelConfig, LabelPlacement, LinkPickIndex, META_EDGE_MAX_WIDTH, MetaEdge, MetricColumn, MetricName, MetricStore, NeighborhoodOptions, NeighborhoodResult, NodeId, OVERVIEW_HOT_INTERVAL_MS, OVERVIEW_IDLE_INTERVAL_MS, OVERVIEW_SIZE_DEFAULT, OverviewController, PHYSICAL_DEFAULT_LINK_WIDTH, PHYSICAL_DEFAULT_POINT_SIZE, PathOptions, PathOutcome, PathResult, PathService, PendingExpansions, Reconciler, RenderScene, RequestContext, ResolvedCluster, ResolvedGroup, RevisionAwareService, RevisionDimension, Revisions, SEARCH_CACHE_LIMIT, SEARCH_LIMIT_DEFAULT, SEARCH_SCAN_CHUNK, SEARCH_SCORE_EXACT_ID, SEARCH_SCORE_ID_PREFIX, SEARCH_SCORE_SUBSTRING, SEARCH_SCORE_TOKEN_START_BONUS, SEQUENTIAL_RANGE_DEFAULT, SUPER_NODE_MAX_SIZE, SVG_MAX_ELEMENTS_DEFAULT, Scale, ScaleLimits, SceneFold, SceneGroups, SceneLinkRef, ScenePointRef, SearchActivation, SearchResult, SelectionState, SoftMask, SubgraphSpec, SvgBudgetError, TIMELINE_STEP_DEFAULT, TIMELINE_TICK_MS_DEFAULT, ThemeInput, TimelinePlayback, TypedColumnCrossfilter, VIEW_STATE_VERSION, ViewportState, WorkerFactoryOption, acceptColumnar, admitServiceResult, assertCapabilityMethodParity, baseFromAccepted, baseFromContribution, buildAcceptedAdjacency, buildAcceptedFromColumnar, buildAdjacency, canonicalFilterKey, canonicalJson, canonicalScaleKey, cascadeEdges, categoricalIndex, categoricalRows, coerceNumeric, coerceNumericInto, collapseParallelEdges, columnarArrayBuffers, compileEdgeFilter, compileNodeFilter, computeNumericDomain, createGraphInstance, createInvestigationSession, createLocalExpansionService, createLocalSearchService, createRequestContext, deriveGroupsByKey, descriptorKey, detachColumnarBuffers, divergingColor, escapeXml, estimateBatchBytes, evaluateFieldAccessor, evaluateFilterExpr, field, groupByDerivedId, groupSceneKey, interpolateColor, isColumnarSnapshot, isFieldAccessor, materializeColumnarSnapshot, medianLinkWidthPx, mergeDiagnostics, mergeModel, metaEdgePublicId, metaEdgeSceneKey, metaEdgeWidthFor, neighborsOf, newContribution, newStagingTallies, nextRequestId, nextSynthesizedEdgeId, normalizeCommitForCapabilities, parseColor, parseInvestigation, pointSegmentDistanceSquared, projectColors, projectSizes, renderSvg, resolveEnginePolicy, resolveFilterField, resolveManualGroups, resolveScope, resolveTheme, rewriteGroups, sameDataRef, sameGroupBySpec, sameGroupSpecArrays, sceneGroupsOf, sceneLinkRefAt, scenePointRefAt, selectLabelCandidates, sequentialColor, sequentialSize, serializeInvestigation, serviceCacheKey, sessionCommitDiagnostics, stageBatch, superNodeSizeFor, validateColumnarStructure, validateFieldAccessor, validateFilterExpr, validateGroupBySpec, validateGroupSpecs, validateSnapshot, validateViewState };
|
|
3540
|
+
export type { Adjacency, AdmitColumnsOptions, AdmitColumnsResult, AdmitServiceResultArgs, BrushDelta, CategoricalScale, ColumnarAcceptance, ColumnarIssue, CompiledFilter, CreateGraphInstanceOptions, CreateRequestContextArgs, CrossfilterStats, DescriptorIssue, DivergingScale, EdgePairCounters, EdgePickRoute, EdgePickingFacadeOptions, EnginePolicy, EnginePolicyDegradation, ExpandNodeResult, ExpansionOverlayRecord, ExpansionRecord, FetchLike, FieldAccessor, FilterErrorAggregate, GraphInstance, GraphInvestigation, GraphServices, GraphViewState, GroupByDerivation, GroupRewrite, GroupValidationResult, HistoryCommand, HistoryDepths, HistoryKernelOptions, ImageAtlasBatch, ImageAtlasPipelineOptions, ImageDecode, ImageResolver, InvestigationExpansion, InvestigationExpansionOptions, InvestigationSession, InvestigationSessionOptions, InvestigationSessionState, InvestigationSource, LabelCandidate, LabelCandidateResult, LabelCandidateViewport, LabelSubscriptions, LinkPickGridSnapshot, LinkVisibilityMask, LocalExpansionBase, LocalSearchBase, LocalSearchService, MaskDrain, MaskSource, MergeBase, MergeResult, MetaEdgeRecord, MetricModelInput, OverviewBounds, OverviewControllerOptions, OverviewRaster, OverviewScene, OverviewSnapshot, ReconcileResult, RegisterExpansionResult, RenderSvgOptions, RequestContextHandle, RequestedEngineFeatures, ResolveDomainArgs, ResolvedScope, RevisionSnapshot, RowTally, SavedInvestigationPath, ScaleChannelInfo, ScaleInfoRow, SearchService, SelectLabelCandidatesArgs, SequentialScale, SerializableScale, SerializableTransform, ServiceCacheKeyArgs, SessionContribution, SetViewStateResult, StageResult, StagingTallies, StampedEdge, StampedNode, SuperNodeRecord, SvgScene, SvgSceneEdge, SvgSceneLabel, SvgSceneNode, TypedFieldPath, ViewBrushState, ViewLayoutSpec, ViewStateVerdict, ViewStyling };
|
package/dist/index.js
CHANGED
|
@@ -6630,6 +6630,8 @@ var FRAME_PRESSURE_ENGAGE_MS = 40;
|
|
|
6630
6630
|
var FRAME_PRESSURE_CLEAR_MS = 28;
|
|
6631
6631
|
var LABEL_RERANK_THROTTLE_MS = 100;
|
|
6632
6632
|
var SIM_HOT_REFRESH_MS = 500;
|
|
6633
|
+
var ASYNC_POSITION_REFRESH_MS = 100;
|
|
6634
|
+
var ASYNC_POSITION_MAX_NODES = 1e4;
|
|
6633
6635
|
function sameIds(a, b) {
|
|
6634
6636
|
if (a === b) return true;
|
|
6635
6637
|
if (a.length !== b.length) return false;
|
|
@@ -6866,6 +6868,15 @@ function createGraphInstance(opts) {
|
|
|
6866
6868
|
const positionSubs = /* @__PURE__ */ new Set();
|
|
6867
6869
|
let currentPlacements = [];
|
|
6868
6870
|
let labelPositionCache = null;
|
|
6871
|
+
const overviewSubs = /* @__PURE__ */ new Set();
|
|
6872
|
+
let overviewSnapshot = null;
|
|
6873
|
+
let overviewScene = null;
|
|
6874
|
+
let overviewRevision = 0;
|
|
6875
|
+
let notifiedOverviewSnapshot;
|
|
6876
|
+
let overviewNotificationQueued = false;
|
|
6877
|
+
let positionGeneration = 0;
|
|
6878
|
+
let positionFlight = null;
|
|
6879
|
+
let positionClockMs = 0;
|
|
6869
6880
|
let frameCadence = 0;
|
|
6870
6881
|
let quiescenceAsserted = false;
|
|
6871
6882
|
let quiescenceTimer = null;
|
|
@@ -7063,6 +7074,7 @@ function createGraphInstance(opts) {
|
|
|
7063
7074
|
}
|
|
7064
7075
|
pendingHistoryDepths = null;
|
|
7065
7076
|
store.setState((prev) => ({ ...prev, ...patch }));
|
|
7077
|
+
scheduleOverviewNotification();
|
|
7066
7078
|
if (patch.visible !== void 0 || patch.nodeCount !== void 0) {
|
|
7067
7079
|
evaluateLadderCounts();
|
|
7068
7080
|
}
|
|
@@ -8461,7 +8473,7 @@ function createGraphInstance(opts) {
|
|
|
8461
8473
|
}
|
|
8462
8474
|
scopedAccepted = computeScopedAccepted();
|
|
8463
8475
|
const result = reconcileScene(scopedAccepted ?? accepted);
|
|
8464
|
-
|
|
8476
|
+
invalidatePositionCache();
|
|
8465
8477
|
adjacency = null;
|
|
8466
8478
|
sceneIncidence = null;
|
|
8467
8479
|
structuralChange = result.structuralChange;
|
|
@@ -9337,7 +9349,92 @@ function createGraphInstance(opts) {
|
|
|
9337
9349
|
...lastPointImageIndex !== null ? { pointImageIndex: lastPointImageIndex } : {}
|
|
9338
9350
|
};
|
|
9339
9351
|
}
|
|
9352
|
+
function invalidatePositionCache() {
|
|
9353
|
+
positionGeneration += 1;
|
|
9354
|
+
labelPositionCache = null;
|
|
9355
|
+
}
|
|
9356
|
+
function getOverviewScene() {
|
|
9357
|
+
if (destroyed || scene === null || scene.count === 0) {
|
|
9358
|
+
overviewSnapshot = null;
|
|
9359
|
+
overviewScene = scene;
|
|
9360
|
+
return null;
|
|
9361
|
+
}
|
|
9362
|
+
const positions = labelPositionCache ?? scene.positions;
|
|
9363
|
+
if (overviewScene !== scene || overviewSnapshot?.positions !== positions) {
|
|
9364
|
+
overviewScene = scene;
|
|
9365
|
+
overviewSnapshot = { positions, count: scene.count, revision: ++overviewRevision };
|
|
9366
|
+
}
|
|
9367
|
+
return overviewSnapshot;
|
|
9368
|
+
}
|
|
9369
|
+
function scheduleOverviewNotification() {
|
|
9370
|
+
if (destroyed || overviewSubs.size === 0 || overviewNotificationQueued) return;
|
|
9371
|
+
overviewNotificationQueued = true;
|
|
9372
|
+
queueMicrotask(() => {
|
|
9373
|
+
overviewNotificationQueued = false;
|
|
9374
|
+
if (destroyed) return;
|
|
9375
|
+
const next = getOverviewScene();
|
|
9376
|
+
if (notifiedOverviewSnapshot === next) return;
|
|
9377
|
+
notifiedOverviewSnapshot = next;
|
|
9378
|
+
for (const cb of Array.from(overviewSubs)) {
|
|
9379
|
+
try {
|
|
9380
|
+
cb();
|
|
9381
|
+
} catch {
|
|
9382
|
+
}
|
|
9383
|
+
}
|
|
9384
|
+
});
|
|
9385
|
+
}
|
|
9386
|
+
function subscribeOverview(cb) {
|
|
9387
|
+
if (destroyed) return () => {
|
|
9388
|
+
};
|
|
9389
|
+
overviewSubs.add(cb);
|
|
9390
|
+
try {
|
|
9391
|
+
cb();
|
|
9392
|
+
} catch {
|
|
9393
|
+
}
|
|
9394
|
+
sampleOverlayPositions(positionClockMs);
|
|
9395
|
+
return () => {
|
|
9396
|
+
overviewSubs.delete(cb);
|
|
9397
|
+
};
|
|
9398
|
+
}
|
|
9399
|
+
function sampleOverlayPositions(timeMs) {
|
|
9400
|
+
const s = session;
|
|
9401
|
+
const labelsActive = labelsEnabled();
|
|
9402
|
+
if (destroyed || s === null || !s.alive || scene === null || scene.count === 0 || layout !== "force" || store.getState().status !== "ready" || overviewSubs.size === 0 && !labelsActive) return;
|
|
9403
|
+
const issuedRender = store.getState().revisions.render;
|
|
9404
|
+
if (s.engine.appliedRevision() !== issuedRender) return;
|
|
9405
|
+
const asyncRead = scene.count <= ASYNC_POSITION_MAX_NODES ? s.engine.getPositionsAsync : void 0;
|
|
9406
|
+
const interval = asyncRead === void 0 || !labelsActive ? SIM_HOT_REFRESH_MS : ASYNC_POSITION_REFRESH_MS;
|
|
9407
|
+
if (positionFlight !== null || lastHotRefreshMs !== null && timeMs >= lastHotRefreshMs && timeMs - lastHotRefreshMs < interval) return;
|
|
9408
|
+
lastHotRefreshMs = timeMs;
|
|
9409
|
+
if (asyncRead === void 0) {
|
|
9410
|
+
const pos = s.engine.getPositions();
|
|
9411
|
+
if (pos !== null && pos.length === scene.count * 2) bankEnginePositions(pos);
|
|
9412
|
+
return;
|
|
9413
|
+
}
|
|
9414
|
+
const flight = {};
|
|
9415
|
+
positionFlight = flight;
|
|
9416
|
+
const issuedScene = scene;
|
|
9417
|
+
const issuedPins = store.getState().pins;
|
|
9418
|
+
const issuedGeneration = positionGeneration;
|
|
9419
|
+
let read;
|
|
9420
|
+
try {
|
|
9421
|
+
read = asyncRead.call(s.engine);
|
|
9422
|
+
} catch {
|
|
9423
|
+
positionFlight = null;
|
|
9424
|
+
return;
|
|
9425
|
+
}
|
|
9426
|
+
void read.then((pos) => {
|
|
9427
|
+
if (destroyed || session !== s || !s.alive || store.getState().status !== "ready" || scene !== issuedScene || store.getState().revisions.render !== issuedRender || s.engine.appliedRevision() !== issuedRender || store.getState().pins !== issuedPins || positionGeneration !== issuedGeneration || overviewSubs.size === 0 && !labelsEnabled() || pos === null || pos.length !== issuedScene.count * 2) return;
|
|
9428
|
+
bankEnginePositions(pos);
|
|
9429
|
+
projectPlacements(s.engine);
|
|
9430
|
+
notifyLabelSubs(positionSubs);
|
|
9431
|
+
}).catch(() => {
|
|
9432
|
+
}).finally(() => {
|
|
9433
|
+
if (positionFlight === flight) positionFlight = null;
|
|
9434
|
+
});
|
|
9435
|
+
}
|
|
9340
9436
|
function bankEnginePositions(pos) {
|
|
9437
|
+
positionGeneration += 1;
|
|
9341
9438
|
const pins = store.getState().pins;
|
|
9342
9439
|
if (pins.size > 0 && scene !== null) {
|
|
9343
9440
|
for (const [id, xy] of pins) {
|
|
@@ -9350,6 +9447,7 @@ function createGraphInstance(opts) {
|
|
|
9350
9447
|
}
|
|
9351
9448
|
reconciler.noteEnginePositions(pos);
|
|
9352
9449
|
labelPositionCache = pos;
|
|
9450
|
+
scheduleOverviewNotification();
|
|
9353
9451
|
}
|
|
9354
9452
|
function pushSelectionToEngine(eng, ids) {
|
|
9355
9453
|
const groupIds = store.getState().selection.groupIds;
|
|
@@ -10207,7 +10305,7 @@ function createGraphInstance(opts) {
|
|
|
10207
10305
|
const groupsResolutionChanged = refreshGroupsResolution();
|
|
10208
10306
|
const result = reconcileScene(scopedAccepted ?? p.merged);
|
|
10209
10307
|
const ingestScene = scene;
|
|
10210
|
-
|
|
10308
|
+
invalidatePositionCache();
|
|
10211
10309
|
const structuralChange = result.structuralChange;
|
|
10212
10310
|
const positionChange = result.positionChange;
|
|
10213
10311
|
dataDiags = p.merged.diagnostics;
|
|
@@ -11226,7 +11324,7 @@ function createGraphInstance(opts) {
|
|
|
11226
11324
|
}
|
|
11227
11325
|
scopedAccepted = computeScopedAccepted();
|
|
11228
11326
|
const result = reconcileScene(scopedAccepted ?? accepted);
|
|
11229
|
-
|
|
11327
|
+
invalidatePositionCache();
|
|
11230
11328
|
adjacency = null;
|
|
11231
11329
|
sceneIncidence = null;
|
|
11232
11330
|
hardScopeGen += 1;
|
|
@@ -11881,7 +11979,7 @@ function createGraphInstance(opts) {
|
|
|
11881
11979
|
}
|
|
11882
11980
|
if (dataChanged || scopeChanged) scopedAccepted = computeScopedAccepted();
|
|
11883
11981
|
const result = reconcileScene(scopedAccepted ?? accepted);
|
|
11884
|
-
|
|
11982
|
+
invalidatePositionCache();
|
|
11885
11983
|
adjacency = null;
|
|
11886
11984
|
sceneIncidence = null;
|
|
11887
11985
|
structuralChange = result.structuralChange;
|
|
@@ -11895,7 +11993,7 @@ function createGraphInstance(opts) {
|
|
|
11895
11993
|
if (!dataChanged && !scopeChanged && !groupsSceneDirty && !parallelSceneDirty && accepted !== null) {
|
|
11896
11994
|
bankReadyEnginePositions();
|
|
11897
11995
|
const result = reconcileScene(scopedAccepted ?? accepted);
|
|
11898
|
-
|
|
11996
|
+
invalidatePositionCache();
|
|
11899
11997
|
adjacency = null;
|
|
11900
11998
|
sceneIncidence = null;
|
|
11901
11999
|
structuralChange = structuralChange || result.structuralChange;
|
|
@@ -12575,6 +12673,14 @@ function createGraphInstance(opts) {
|
|
|
12575
12673
|
if (node === void 0) return;
|
|
12576
12674
|
const prevented = emit("nodeDragEnd", { node, x, y });
|
|
12577
12675
|
if (!prevented) writePin(node.id, [x, y]);
|
|
12676
|
+
else if (overviewSubs.size > 0 || labelsEnabled()) {
|
|
12677
|
+
const pos = s.engine.getPositions();
|
|
12678
|
+
if (pos !== null) {
|
|
12679
|
+
pos[2 * index] = x;
|
|
12680
|
+
pos[2 * index + 1] = y;
|
|
12681
|
+
bankEnginePositions(pos);
|
|
12682
|
+
}
|
|
12683
|
+
}
|
|
12578
12684
|
},
|
|
12579
12685
|
// Right-click or long-press → typed 'contextMenu' event. The
|
|
12580
12686
|
// core adds NO built-in follow-up — components own the menu.
|
|
@@ -12591,10 +12697,8 @@ function createGraphInstance(opts) {
|
|
|
12591
12697
|
},
|
|
12592
12698
|
/**
|
|
12593
12699
|
* Overlay scheduler tick (adapter activity clock). Per tick:
|
|
12594
|
-
* (1)
|
|
12595
|
-
*
|
|
12596
|
-
* tracked readback stalls ~18ms, so the lane NEVER reads back per
|
|
12597
|
-
* frame); (2) O(k) projection of the CURRENT candidate set through
|
|
12700
|
+
* (1) the shared position cache samples at most 10 Hz asynchronously
|
|
12701
|
+
* (2 Hz synchronous fallback), with one copy in flight; (2) O(k) projection of the CURRENT candidate set through
|
|
12598
12702
|
* spaceToScreen for the positions channel. No re-rank ever happens here.
|
|
12599
12703
|
*/
|
|
12600
12704
|
onFrame(timeMs) {
|
|
@@ -12633,13 +12737,8 @@ function createGraphInstance(opts) {
|
|
|
12633
12737
|
}
|
|
12634
12738
|
pressureSampler.resetCounters();
|
|
12635
12739
|
}
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
lastHotRefreshMs = timeMs;
|
|
12639
|
-
const pos = s.engine.getPositions();
|
|
12640
|
-
if (pos !== null) bankEnginePositions(pos);
|
|
12641
|
-
}
|
|
12642
|
-
}
|
|
12740
|
+
positionClockMs = timeMs;
|
|
12741
|
+
if (store.getState().simulationRunning) sampleOverlayPositions(timeMs);
|
|
12643
12742
|
if (positionSubs.size > 0 && currentPlacements.length > 0) {
|
|
12644
12743
|
projectPlacements(s.engine);
|
|
12645
12744
|
notifyLabelSubs(positionSubs);
|
|
@@ -12713,6 +12812,9 @@ function createGraphInstance(opts) {
|
|
|
12713
12812
|
if (!active()) return;
|
|
12714
12813
|
const status = store.getState().status;
|
|
12715
12814
|
if (ev.type === "lost") {
|
|
12815
|
+
positionGeneration += 1;
|
|
12816
|
+
positionFlight = null;
|
|
12817
|
+
lastHotRefreshMs = null;
|
|
12716
12818
|
if (status !== "ready") return;
|
|
12717
12819
|
engineDiags = [
|
|
12718
12820
|
...engineDiags,
|
|
@@ -12770,6 +12872,7 @@ function createGraphInstance(opts) {
|
|
|
12770
12872
|
const replayModel = renderModel();
|
|
12771
12873
|
if (replayModel !== null) {
|
|
12772
12874
|
reconcileScene(replayModel);
|
|
12875
|
+
invalidatePositionCache();
|
|
12773
12876
|
const replayScene = scene;
|
|
12774
12877
|
const phaseProjectStart = performance.now();
|
|
12775
12878
|
const commit = {
|
|
@@ -12868,6 +12971,9 @@ function createGraphInstance(opts) {
|
|
|
12868
12971
|
};
|
|
12869
12972
|
session = s;
|
|
12870
12973
|
const ownsMount = () => s.alive && !destroyed && session === s;
|
|
12974
|
+
positionGeneration += 1;
|
|
12975
|
+
positionFlight = null;
|
|
12976
|
+
positionClockMs = 0;
|
|
12871
12977
|
lastHotRefreshMs = null;
|
|
12872
12978
|
publish({ status: "mounting" });
|
|
12873
12979
|
mountPromise = s.engine.mount(container, createHostEvents(s)).then(() => {
|
|
@@ -12998,6 +13104,13 @@ function createGraphInstance(opts) {
|
|
|
12998
13104
|
cancelRerankTimer();
|
|
12999
13105
|
candidateSubs.clear();
|
|
13000
13106
|
positionSubs.clear();
|
|
13107
|
+
overviewSubs.clear();
|
|
13108
|
+
overviewSnapshot = null;
|
|
13109
|
+
notifiedOverviewSnapshot = null;
|
|
13110
|
+
overviewScene = null;
|
|
13111
|
+
labelPositionCache = null;
|
|
13112
|
+
positionGeneration += 1;
|
|
13113
|
+
positionFlight = null;
|
|
13001
13114
|
listeners.clear();
|
|
13002
13115
|
publish({ status: "destroyed" });
|
|
13003
13116
|
}
|
|
@@ -13396,7 +13509,7 @@ function createGraphInstance(opts) {
|
|
|
13396
13509
|
if (touched > 0) {
|
|
13397
13510
|
reconciler.noteEnginePositions(next);
|
|
13398
13511
|
scene = { ...scene, positions: next };
|
|
13399
|
-
|
|
13512
|
+
invalidatePositionCache();
|
|
13400
13513
|
const prevState = store.getState();
|
|
13401
13514
|
const nextRevisions = {
|
|
13402
13515
|
...prevState.revisions,
|
|
@@ -13982,7 +14095,17 @@ function createGraphInstance(opts) {
|
|
|
13982
14095
|
if (destroyed) return;
|
|
13983
14096
|
const eng = engineIfReady();
|
|
13984
14097
|
if (eng === null) return;
|
|
14098
|
+
const wasRunning = store.getState().simulationRunning;
|
|
14099
|
+
cancelSettleFollow();
|
|
13985
14100
|
eng.pause();
|
|
14101
|
+
if (wasRunning && layout === "force" && eng.appliedRevision() === store.getState().revisions.render && (overviewSubs.size > 0 || labelsEnabled())) {
|
|
14102
|
+
const pos = eng.getPositions();
|
|
14103
|
+
if (pos !== null) {
|
|
14104
|
+
bankEnginePositions(pos);
|
|
14105
|
+
projectPlacements(eng);
|
|
14106
|
+
notifyLabelSubs(positionSubs);
|
|
14107
|
+
}
|
|
14108
|
+
}
|
|
13986
14109
|
if (store.getState().simulationRunning) publish({ simulationRunning: false });
|
|
13987
14110
|
},
|
|
13988
14111
|
resumeSimulation: () => {
|
|
@@ -14011,6 +14134,8 @@ function createGraphInstance(opts) {
|
|
|
14011
14134
|
redo,
|
|
14012
14135
|
getScaleInfo,
|
|
14013
14136
|
getMetricValue,
|
|
14137
|
+
getOverviewScene,
|
|
14138
|
+
subscribeOverview,
|
|
14014
14139
|
getRevisions: () => store.getState().revisions,
|
|
14015
14140
|
getDiagnostics: () => store.getState().diagnostics,
|
|
14016
14141
|
getNode,
|
|
@@ -14609,7 +14734,10 @@ var OverviewController = class {
|
|
|
14609
14734
|
*/
|
|
14610
14735
|
rasterize() {
|
|
14611
14736
|
const scene = this.getScene();
|
|
14612
|
-
if (!scene || scene.count <= 0)
|
|
14737
|
+
if (!scene || scene.count <= 0) {
|
|
14738
|
+
this.frame = null;
|
|
14739
|
+
return null;
|
|
14740
|
+
}
|
|
14613
14741
|
const { positions, count } = scene;
|
|
14614
14742
|
const pairs = Math.min(count, Math.floor(positions.length / 2));
|
|
14615
14743
|
let minX = Infinity;
|
|
@@ -14625,7 +14753,10 @@ var OverviewController = class {
|
|
|
14625
14753
|
if (y < minY) minY = y;
|
|
14626
14754
|
if (y > maxY) maxY = y;
|
|
14627
14755
|
}
|
|
14628
|
-
if (!Number.isFinite(minX) || !Number.isFinite(minY))
|
|
14756
|
+
if (!Number.isFinite(minX) || !Number.isFinite(minY)) {
|
|
14757
|
+
this.frame = null;
|
|
14758
|
+
return null;
|
|
14759
|
+
}
|
|
14629
14760
|
const size = this.size;
|
|
14630
14761
|
const pad = size * PADDING_FRACTION;
|
|
14631
14762
|
const inner = size - 2 * pad;
|
|
@@ -14744,6 +14875,6 @@ function evaluateFieldAccessor(accessor, id, attrs) {
|
|
|
14744
14875
|
}
|
|
14745
14876
|
}
|
|
14746
14877
|
|
|
14747
|
-
export { ATLAS_MAX_CONCURRENT_DEFAULT, ATLAS_MAX_ENTRIES_DEFAULT, ATLAS_MAX_RETRIES_DEFAULT, AcceptanceQueue, BASE_PENDING_KEY, BRUSH_HISTORY_COALESCE_MS, CATEGORICAL_PALETTE, DEFAULT_BIN_COUNT, DIM_ALPHA_DEFAULT, DIVERGING_RANGE_DEFAULT, DomainStore, EDGE_PICK_TOLERANCE_PX, EdgePickingFacade, GRAPH_THEME_DARK, GRAPH_THEME_LIGHT, HISTORY_LIMIT_DEFAULT, HistoryKernel, INGEST_MAX_FLUSH_LATENCY_MS_DEFAULT, INGEST_MAX_PENDING_BYTES_DEFAULT, INGEST_OVERFLOW_FACTOR, ImageAtlasPipeline, InvestigationError, LABEL_MAX_VISIBLE_CAP, LABEL_MAX_VISIBLE_DEFAULT, LinkPickIndex, META_EDGE_MAX_WIDTH, MetricStore, OVERVIEW_HOT_INTERVAL_MS, OVERVIEW_IDLE_INTERVAL_MS, OVERVIEW_SIZE_DEFAULT, OrbitOperationError, OverviewController, PHYSICAL_DEFAULT_LINK_WIDTH, PHYSICAL_DEFAULT_POINT_SIZE, PendingExpansions, Reconciler, SEARCH_CACHE_LIMIT, SEARCH_LIMIT_DEFAULT, SEARCH_SCAN_CHUNK, SEARCH_SCORE_EXACT_ID, SEARCH_SCORE_ID_PREFIX, SEARCH_SCORE_SUBSTRING, SEARCH_SCORE_TOKEN_START_BONUS, SEQUENTIAL_RANGE_DEFAULT, SUPER_NODE_MAX_SIZE, SVG_MAX_ELEMENTS_DEFAULT, SoftMask, SvgBudgetError, TIMELINE_STEP_DEFAULT, TIMELINE_TICK_MS_DEFAULT, TypedColumnCrossfilter, VIEW_STATE_VERSION, admitServiceResult, assertCapabilityMethodParity, baseFromAccepted, baseFromContribution, buildAcceptedAdjacency, buildAcceptedFromColumnar, buildAdjacency, canonicalFilterKey, canonicalJson2 as canonicalJson, canonicalScaleKey, cascadeEdges, categoricalIndex, categoricalRows, coerceNumeric, coerceNumericInto, collapseParallelEdges, columnarArrayBuffers, compileEdgeFilter, compileNodeFilter, computeNumericDomain, createGraphInstance, createInvestigationSession, createLocalExpansionService, createLocalSearchService, createRequestContext, deriveGroupsByKey, descriptorKey, detachColumnarBuffers, divergingColor, escapeXml, estimateBatchBytes, evaluateFieldAccessor, evaluateFilterExpr, field, graphErrorToError, groupByDerivedId, groupSceneKey, interpolateColor, isColumnarSnapshot, isFatalGraphError, isFieldAccessor, materializeColumnarSnapshot, medianLinkWidthPx, mergeDiagnostics, mergeModel, metaEdgePublicId, metaEdgeSceneKey, metaEdgeWidthFor, neighborsOf, newContribution, newStagingTallies, nextRequestId, normalizeCommitForCapabilities, parseColor, parseInvestigation, pointSegmentDistanceSquared, projectColors, projectSizes, renderSvg, resolveEnginePolicy, resolveFilterField, resolveManualGroups, resolveScope, resolveTheme, resourceLimitFatal, rewriteGroups, sameDataRef, sameGroupBySpec, sameGroupSpecArrays, sceneGroupsOf, sceneLinkRefAt, scenePointRefAt, selectLabelCandidates, sequentialColor, sequentialSize, serializeInvestigation, serviceCacheKey, sessionCommitDiagnostics, stageBatch, superNodeSizeFor, validateColumnarStructure, validateFieldAccessor, validateFilterExpr, validateGroupBySpec, validateGroupSpecs, validateSnapshot, validateViewState };
|
|
14878
|
+
export { ATLAS_MAX_CONCURRENT_DEFAULT, ATLAS_MAX_ENTRIES_DEFAULT, ATLAS_MAX_RETRIES_DEFAULT, AcceptanceQueue, BASE_PENDING_KEY, BRUSH_HISTORY_COALESCE_MS, CATEGORICAL_PALETTE, DEFAULT_BIN_COUNT, DIM_ALPHA_DEFAULT, DIVERGING_RANGE_DEFAULT, DomainStore, EDGE_PICK_TOLERANCE_PX, EdgePickingFacade, GRAPH_THEME_DARK, GRAPH_THEME_LIGHT, HISTORY_LIMIT_DEFAULT, HistoryKernel, INGEST_MAX_FLUSH_LATENCY_MS_DEFAULT, INGEST_MAX_PENDING_BYTES_DEFAULT, INGEST_OVERFLOW_FACTOR, ImageAtlasPipeline, InvestigationError, LABEL_MAX_VISIBLE_CAP, LABEL_MAX_VISIBLE_DEFAULT, LinkPickIndex, META_EDGE_MAX_WIDTH, MetricStore, OVERVIEW_HOT_INTERVAL_MS, OVERVIEW_IDLE_INTERVAL_MS, OVERVIEW_SIZE_DEFAULT, OrbitOperationError, OverviewController, PHYSICAL_DEFAULT_LINK_WIDTH, PHYSICAL_DEFAULT_POINT_SIZE, PendingExpansions, Reconciler, SEARCH_CACHE_LIMIT, SEARCH_LIMIT_DEFAULT, SEARCH_SCAN_CHUNK, SEARCH_SCORE_EXACT_ID, SEARCH_SCORE_ID_PREFIX, SEARCH_SCORE_SUBSTRING, SEARCH_SCORE_TOKEN_START_BONUS, SEQUENTIAL_RANGE_DEFAULT, SUPER_NODE_MAX_SIZE, SVG_MAX_ELEMENTS_DEFAULT, SoftMask, SvgBudgetError, TIMELINE_STEP_DEFAULT, TIMELINE_TICK_MS_DEFAULT, TypedColumnCrossfilter, VIEW_STATE_VERSION, admitServiceResult, assertCapabilityMethodParity, baseFromAccepted, baseFromContribution, buildAcceptedAdjacency, buildAcceptedFromColumnar, buildAdjacency, canonicalFilterKey, canonicalJson2 as canonicalJson, canonicalScaleKey, cascadeEdges, categoricalIndex, categoricalRows, coerceNumeric, coerceNumericInto, collapseParallelEdges, columnarArrayBuffers, compileEdgeFilter, compileNodeFilter, computeNumericDomain, createGraphInstance, createInvestigationSession, createLocalExpansionService, createLocalSearchService, createRequestContext, deriveGroupsByKey, descriptorKey, detachColumnarBuffers, divergingColor, escapeXml, estimateBatchBytes, evaluateFieldAccessor, evaluateFilterExpr, field, graphErrorToError, groupByDerivedId, groupSceneKey, interpolateColor, isColumnarSnapshot, isFatalGraphError, isFieldAccessor, materializeColumnarSnapshot, medianLinkWidthPx, mergeDiagnostics, mergeModel, metaEdgePublicId, metaEdgeSceneKey, metaEdgeWidthFor, neighborsOf, newContribution, newStagingTallies, nextRequestId, nextSynthesizedEdgeId, normalizeCommitForCapabilities, parseColor, parseInvestigation, pointSegmentDistanceSquared, projectColors, projectSizes, renderSvg, resolveEnginePolicy, resolveFilterField, resolveManualGroups, resolveScope, resolveTheme, resourceLimitFatal, rewriteGroups, sameDataRef, sameGroupBySpec, sameGroupSpecArrays, sceneGroupsOf, sceneLinkRefAt, scenePointRefAt, selectLabelCandidates, sequentialColor, sequentialSize, serializeInvestigation, serviceCacheKey, sessionCommitDiagnostics, stageBatch, superNodeSizeFor, validateColumnarStructure, validateFieldAccessor, validateFilterExpr, validateGroupBySpec, validateGroupSpecs, validateSnapshot, validateViewState };
|
|
14748
14879
|
//# sourceMappingURL=index.js.map
|
|
14749
14880
|
//# sourceMappingURL=index.js.map
|