@graphty/graphty-element 2.5.2 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/ai.js +3 -3
  2. package/dist/catalog.d.ts +16 -0
  3. package/dist/catalog.js +34 -32
  4. package/dist/chunks/{AiManager-CrbvKdEK.js → AiManager-4iQpsJW1.js} +4 -4
  5. package/dist/chunks/{DataSource-qU-nLhXN.js → DataSource-BL2UzPff.js} +2 -2
  6. package/dist/chunks/GraphSession-BhuHSXIo.js +12819 -0
  7. package/dist/chunks/{GraphtyLogger-DOTwCiMR.js → GraphtyLogger-B_O67a6c.js} +1 -1
  8. package/dist/chunks/{VoiceInputAdapter-D4NrRL_1.js → VoiceInputAdapter-Cc6mHXTI.js} +1 -1
  9. package/dist/chunks/{XRPivotCameraController-Uqa47vmo.js → XRPivotCameraController-BLa89LXn.js} +2 -2
  10. package/dist/chunks/{algorithms-D-ab-Auu.js → algorithms-BJ6DQMOe.js} +931 -781
  11. package/dist/chunks/{capability-check-Vw3IcqiE.js → capability-check-Am2zliFj.js} +1 -1
  12. package/dist/chunks/{detect-B4Qrw976.js → detect-fyuVnlCT.js} +1 -1
  13. package/dist/chunks/{format-detection-r2IfNFXO.js → format-detection-BHwrAVzW.js} +1 -1
  14. package/dist/chunks/{index-J9MgLio9.js → index-BkBLbvui.js} +2691 -2434
  15. package/dist/chunks/optionsFromZod-CKMYSwTz.js +3636 -0
  16. package/dist/chunks/{paletteRegistry-Kt-6CeoN.js → paletteRegistry-BCFSwJGK.js} +224 -189
  17. package/dist/chunks/parse-BMTqt4SS.js +3658 -0
  18. package/dist/chunks/{types-C_c53VgR.js → types-DFchv4Ny.js} +4 -1
  19. package/dist/custom-elements.json +1 -1
  20. package/dist/extend.d.ts +10 -8
  21. package/dist/extend.js +6 -6
  22. package/dist/graphty-catalog.json +75 -38
  23. package/dist/graphty.bundle.js +55368 -48970
  24. package/dist/graphty.js +19 -19
  25. package/dist/index.d.ts +1 -1
  26. package/dist/logging.js +2 -2
  27. package/dist/schema.d.ts +15 -1
  28. package/dist/schema.js +1 -1
  29. package/dist/session.d.ts +30 -7
  30. package/dist/session.js +40 -37
  31. package/dist/src/Graph.d.ts +35 -7
  32. package/dist/src/acceleration/types.d.ts +79 -43
  33. package/dist/src/algorithms/Algorithm.d.ts +52 -4
  34. package/dist/src/algorithms/BFSAlgorithm.d.ts +3 -0
  35. package/dist/src/algorithms/BellmanFordAlgorithm.d.ts +3 -0
  36. package/dist/src/algorithms/BetweennessCentralityAlgorithm.d.ts +3 -0
  37. package/dist/src/algorithms/BipartiteMatchingAlgorithm.d.ts +3 -0
  38. package/dist/src/algorithms/ClosenessCentralityAlgorithm.d.ts +3 -0
  39. package/dist/src/algorithms/ConnectedComponentsAlgorithm.d.ts +4 -1
  40. package/dist/src/algorithms/DFSAlgorithm.d.ts +3 -0
  41. package/dist/src/algorithms/DegreeAlgorithm.d.ts +3 -0
  42. package/dist/src/algorithms/DijkstraAlgorithm.d.ts +6 -0
  43. package/dist/src/algorithms/EigenvectorCentralityAlgorithm.d.ts +2 -0
  44. package/dist/src/algorithms/FloydWarshallAlgorithm.d.ts +3 -0
  45. package/dist/src/algorithms/GirvanNewmanAlgorithm.d.ts +3 -0
  46. package/dist/src/algorithms/HITSAlgorithm.d.ts +3 -0
  47. package/dist/src/algorithms/KCoreAlgorithm.d.ts +3 -0
  48. package/dist/src/algorithms/KatzCentralityAlgorithm.d.ts +3 -0
  49. package/dist/src/algorithms/KruskalAlgorithm.d.ts +4 -1
  50. package/dist/src/algorithms/LabelPropagationAlgorithm.d.ts +3 -0
  51. package/dist/src/algorithms/LeidenAlgorithm.d.ts +3 -0
  52. package/dist/src/algorithms/LinkPredictionAlgorithm.d.ts +4 -1
  53. package/dist/src/algorithms/LouvainAlgorithm.d.ts +3 -0
  54. package/dist/src/algorithms/MaxFlowAlgorithm.d.ts +3 -0
  55. package/dist/src/algorithms/MinCutAlgorithm.d.ts +3 -0
  56. package/dist/src/algorithms/PageRankAlgorithm.d.ts +3 -0
  57. package/dist/src/algorithms/PrimAlgorithm.d.ts +3 -0
  58. package/dist/src/algorithms/StronglyConnectedComponentsAlgorithm.d.ts +3 -0
  59. package/dist/src/algorithms/input/ScopedInput.d.ts +185 -0
  60. package/dist/src/algorithms/input/derivedInputs.d.ts +199 -0
  61. package/dist/src/algorithms/input/maskBack.d.ts +37 -0
  62. package/dist/src/algorithms/metrics/MetricAlgorithm.d.ts +3 -3
  63. package/dist/src/algorithms/results/DeclaredAlgorithm.d.ts +4 -3
  64. package/dist/src/algorithms/results/types.d.ts +28 -6
  65. package/dist/src/algorithms/utils/communityUtils.d.ts +0 -48
  66. package/dist/src/algorithms/utils/graphUtils.d.ts +2 -68
  67. package/dist/src/algorithms/utils/snapshotGraph.d.ts +3 -1
  68. package/dist/src/catalog/algorithms.d.ts +3 -0
  69. package/dist/src/catalog/layouts.d.ts +2 -0
  70. package/dist/src/catalog/sets/canonical.d.ts +68 -0
  71. package/dist/src/catalog/sets/hash.d.ts +126 -0
  72. package/dist/src/catalog/sets/parse.d.ts +115 -0
  73. package/dist/src/catalog/types.d.ts +329 -8
  74. package/dist/src/data/GraphStore.d.ts +73 -1
  75. package/dist/src/data/edgeIdentity.d.ts +202 -1
  76. package/dist/src/data/ingest.d.ts +3 -1
  77. package/dist/src/data/report.d.ts +20 -0
  78. package/dist/src/graphty-element.d.ts +42 -6
  79. package/dist/src/layout/D3GraphLayoutEngine.d.ts +11 -0
  80. package/dist/src/layout/LayoutEngine.d.ts +56 -0
  81. package/dist/src/layout/NGraphLayoutEngine.d.ts +10 -0
  82. package/dist/src/layout/SimulationLayoutEngine.d.ts +11 -0
  83. package/dist/src/managers/AlgorithmManager.d.ts +8 -0
  84. package/dist/src/managers/DataManager.d.ts +11 -0
  85. package/dist/src/managers/LayoutManager.d.ts +126 -2
  86. package/dist/src/managers/StatsManager.d.ts +1 -0
  87. package/dist/src/session/GraphSession.d.ts +48 -0
  88. package/dist/src/session/attributes.d.ts +121 -1
  89. package/dist/src/session/cost/estimate.d.ts +20 -0
  90. package/dist/src/session/cost/index.d.ts +1 -1
  91. package/dist/src/session/planning.d.ts +32 -2
  92. package/dist/src/session/query.d.ts +7 -0
  93. package/dist/src/session/results/ResultsApi.d.ts +14 -1
  94. package/dist/src/session/runs/Run.d.ts +65 -4
  95. package/dist/src/session/runs/RunsApi.d.ts +58 -2
  96. package/dist/src/session/runs/runId.d.ts +55 -6
  97. package/dist/src/session/runs/types.d.ts +36 -8
  98. package/dist/src/session/scope/ElementMask.d.ts +14 -1
  99. package/dist/src/session/scope/ScopeApi.d.ts +160 -31
  100. package/dist/src/session/scope/index.d.ts +1 -1
  101. package/dist/src/session/selection/SelectionApi.d.ts +15 -10
  102. package/dist/src/session/selection/index.d.ts +1 -1
  103. package/dist/src/session/selection/targets.d.ts +6 -7
  104. package/dist/src/session/sets/SetsApi.d.ts +110 -0
  105. package/dist/src/session/sets/algebra.d.ts +124 -0
  106. package/dist/src/session/sets/cache.d.ts +197 -0
  107. package/dist/src/session/sets/captures.d.ts +83 -0
  108. package/dist/src/session/sets/dependencies.d.ts +167 -0
  109. package/dist/src/session/sets/layers.d.ts +101 -0
  110. package/dist/src/session/sets/notify.d.ts +122 -0
  111. package/dist/src/session/sets/offers.d.ts +103 -0
  112. package/dist/src/session/sets/path.d.ts +37 -0
  113. package/dist/src/session/sets/prepare.d.ts +209 -0
  114. package/dist/src/session/sets/resolve.d.ts +311 -0
  115. package/dist/src/session/sets/signature.d.ts +77 -0
  116. package/dist/src/session/sets/status.d.ts +98 -0
  117. package/dist/src/session/sets/store.d.ts +196 -0
  118. package/dist/src/session/sets/types.d.ts +386 -0
  119. package/dist/src/session/styles/Layer.d.ts +9 -2
  120. package/dist/src/session/styles/StylesApi.d.ts +5 -2
  121. package/dist/src/session/styles/explain.d.ts +5 -2
  122. package/dist/src/session/styles/predicate.d.ts +41 -2
  123. package/dist/src/session/styles/repaint.d.ts +19 -0
  124. package/dist/src/session/styles/selector.d.ts +16 -5
  125. package/dist/src/session/types.d.ts +18 -0
  126. package/dist/src/session/visibility/VisibilityApi.d.ts +47 -3
  127. package/dist/src/session/visibility/filter.d.ts +86 -51
  128. package/dist/src/session/visibility/index.d.ts +1 -1
  129. package/dist/src/testing/fakeAccelerator.d.ts +5 -0
  130. package/dist/src/utils/queue-migration.d.ts +17 -0
  131. package/package.json +15 -9
  132. package/dist/chunks/GraphSession-DuAhRgCd.js +0 -8622
  133. package/dist/chunks/optionsFromZod-B9RncoTX.js +0 -2578
  134. package/dist/chunks/scales-CJCRwi2J.js +0 -3220
  135. package/dist/src/algorithms/utils/index.d.ts +0 -6
package/dist/graphty.js CHANGED
@@ -1,17 +1,17 @@
1
- import { A as s, a as r, b as E, D as O, E as o, d as S, G as R, e as t, I as L, L as _, N as C, O as A, R as N, S as g, f as i, g as n, h as I, U as T, i as p } from "./chunks/index-J9MgLio9.js";
2
- import { L as d, S as G, a as f, r as y } from "./chunks/paletteRegistry-Kt-6CeoN.js";
3
- import { D as M, E as P } from "./chunks/DataSource-qU-nLhXN.js";
4
- import { I as m, J as U, p as c, q as x, A as u, C as B, x as V, r as H } from "./chunks/optionsFromZod-B9RncoTX.js";
5
- import { r as Y } from "./chunks/GraphtyLogger-DOTwCiMR.js";
6
- import { g as W, b as k, N as w, c as K, P as q, R as v, S as J, d as Q, e as X, f as j } from "./chunks/NodeStyle-CtmA7dXi.js";
1
+ import { A as s, a as r, b as E, D as O, E as o, d as S, G as R, e as t, I as L, L as _, N as C, O as A, R as N, S as g, f as i, g as n, h as T, U as I, i as p } from "./chunks/index-BkBLbvui.js";
2
+ import { L as d, S as G, a as f, r as y } from "./chunks/paletteRegistry-BCFSwJGK.js";
3
+ import { D as M, E as P } from "./chunks/DataSource-BL2UzPff.js";
4
+ import { T as h, U as m, p as c, q as x, A as u, C as B, x as V, r as H } from "./chunks/optionsFromZod-CKMYSwTz.js";
5
+ import { r as Y } from "./chunks/GraphtyLogger-B_O67a6c.js";
6
+ import { g as W, b as k, N as w, c as K, P as q, R as v, S as Q, d as X, e as j, f as z } from "./chunks/NodeStyle-CtmA7dXi.js";
7
7
  import { A as Z, a as $, G as aa, i as ea, b as sa } from "./chunks/pluginRegistry-Bs8bEkz9.js";
8
- import { B as Ea, a as Oa, b as oa, C as Sa, G as Ra, c as ta, I as La, O as _a, d as Ca, e as Aa, f as Na, P as ga, g as ia, h as na, R as Ia, T as Ta, i as pa, V as la, Y as da } from "./chunks/sequential-Zym81qm7.js";
8
+ import { B as Ea, a as Oa, b as oa, C as Sa, G as Ra, c as ta, I as La, O as _a, d as Ca, e as Aa, f as Na, P as ga, g as ia, h as na, R as Ta, T as Ia, i as pa, V as la, Y as da } from "./chunks/sequential-Zym81qm7.js";
9
9
  import { a as fa, G as ya, V as Da, i as Ma } from "./chunks/GraphStyle-Cwr55SAE.js";
10
- import { c as ha } from "./chunks/common-DWNKjpH_.js";
10
+ import { c as Ua } from "./chunks/common-DWNKjpH_.js";
11
11
  export {
12
12
  Z as ACCELERATION_ERROR_CODES,
13
- m as ACCELERATION_MIN_NODES_DEFAULT,
14
- U as ACCELERATION_MIN_NODES_KEY,
13
+ h as ACCELERATION_MIN_NODES_DEFAULT,
14
+ m as ACCELERATION_MIN_NODES_KEY,
15
15
  c as ACCELERATION_POLICIES,
16
16
  x as ACCELERATION_POLICY_DEFAULT,
17
17
  u as Algorithm,
@@ -54,26 +54,26 @@ export {
54
54
  ia as PLASMA_COLORS,
55
55
  na as PURPLE_GREEN_COLORS,
56
56
  q as PolyhedronType,
57
- Ia as RED_BLUE_COLORS,
57
+ Ta as RED_BLUE_COLORS,
58
58
  N as RenderManager,
59
59
  v as RichTextStyle,
60
- J as SHAPE_CONSTANTS,
60
+ Q as SHAPE_CONSTANTS,
61
61
  g as ScreenshotError,
62
62
  i as ScreenshotErrorCode,
63
63
  n as SelectionManager,
64
64
  G as SimpleLayoutConfig,
65
65
  f as SimpleLayoutEngine,
66
- I as StatsManager,
67
- Ta as TOL_MUTED_COLORS,
66
+ T as StatsManager,
67
+ Ia as TOL_MUTED_COLORS,
68
68
  pa as TOL_VIBRANT_COLORS,
69
- T as UpdateManager,
69
+ I as UpdateManager,
70
70
  Da as VIEW_MODE_VALUES,
71
71
  la as VIRIDIS_COLORS,
72
72
  da as YLORBR_COLORS,
73
- ha as colorToHex,
74
- Q as defaultEdgeStyle,
75
- X as defaultNodeStyle,
76
- j as defaultRichTextLabelStyle,
73
+ Ua as colorToHex,
74
+ X as defaultEdgeStyle,
75
+ j as defaultNodeStyle,
76
+ z as defaultRichTextLabelStyle,
77
77
  p as defaultXRConfig,
78
78
  V as isAccelerationPolicy,
79
79
  ea as isGraphtyError,
package/dist/index.d.ts CHANGED
@@ -61,7 +61,7 @@ export type { CameraStateChangedEvent, DataLoadingCompleteEvent, DataLoadingErro
61
61
  export type { Manager, ManagerConfig, ManagerContext, QueueableManager } from "./src/managers/index";
62
62
  export { AlgorithmManager, DataManager, EventManager, InputManager, LayoutManager, OperationQueueManager, RenderManager, SelectionManager, StatsManager, UpdateManager, } from "./src/managers/index";
63
63
  export type { GraphContext, GraphContextConfig } from "./src/managers/index";
64
- export type { QueueableOptions, RunAlgorithmOptions } from "./src/utils/queue-migration";
64
+ export type { QueueableOptions, RunAlgorithmOptions, SetLayoutOptions } from "./src/utils/queue-migration";
65
65
  export { EDGE_CONSTANTS, PolyhedronType, SHAPE_CONSTANTS } from "./src/constants/meshConstants";
66
66
  export { ScreenshotError, ScreenshotErrorCode } from "./src/screenshot/ScreenshotError";
67
67
  export type { CameraAnimationOptions, CameraState, ClipboardStatus, QualityEnhancementOptions, ScreenshotOptions, ScreenshotResult, } from "./src/screenshot/types";
package/dist/logging.js CHANGED
@@ -1,5 +1,5 @@
1
- import { d as c, p } from "./chunks/GraphtyLogger-DOTwCiMR.js";
2
- import { G, e as C, f as M, g as w, h as N, i as V, j as I, k as P, m as U, n as T, o as x } from "./chunks/GraphtyLogger-DOTwCiMR.js";
1
+ import { d as c, p } from "./chunks/GraphtyLogger-B_O67a6c.js";
2
+ import { G, e as C, f as M, g as w, h as N, i as V, j as I, k as P, m as U, n as T, o as x } from "./chunks/GraphtyLogger-B_O67a6c.js";
3
3
  const g = "graphty-element-logging-config";
4
4
  function O(t) {
5
5
  try {
package/dist/schema.d.ts CHANGED
@@ -19,7 +19,8 @@
19
19
  * Node-safety is enforced by a test: `test/packaging/node-safe-entries.test.ts` resolves this
20
20
  * module's import graph and fails if Babylon.js, Lit or a DOM global appears in it.
21
21
  */
22
- export type { Binding, BindingOverflow, Channel, ChannelValue, EdgeId, EdgeLinePattern, Encoding, LabelStyle, LayerId, LayerKind, LayerSource, LayerSpec, NodeId, Path, Query, ResultShape, Rgba, RunId, Scope, ScopeId, Selector, StaticStyle, StyleDocument, ThemeDescriptor, } from "./src/catalog/types";
22
+ import type { RuleTree, SelectionDirection } from "./src/catalog/types";
23
+ export type { Binding, BindingOverflow, Channel, ChannelValue, EdgeId, EdgeLinePattern, EdgeMember, EdgeReading, EdgeRef, Encoding, ItemKey, LabelStyle, LayerId, LayerKind, LayerSource, LayerSpec, NodeId, Path, PathKind, Query, ResultId, ResultItem, ResultShape, Rgba, RuleTree, RunId, Scope, ScopeId, ScopeInput, SelectionDirection, Selector, SetCombine, SetCreatedFrom, SetDefinition, SetDefinitionInput, SetId, SetOperand, StaticStyle, StyleDocument, ThemeDescriptor, } from "./src/catalog/types";
23
24
  export { isResultShape, RESULT_SHAPES } from "./src/catalog/types";
24
25
  export type { AdHocData, EdgeStyleConfig, GraphBackgroundConfig, GraphSelectionStyleConfig, GraphSelectionStyleInput, ImageData, NodeStyleConfig, RichTextStyleType, ViewMode, } from "./src/config/index";
25
26
  export { colorToHex, DEFAULT_SELECTION_STYLE, DEFAULT_VIEW_MODE, defaultEdgeStyle, defaultNodeStyle, defaultRichTextLabelStyle, EdgeArrowTypes, EdgeLineTypes, EdgeStyle, GraphBackground, GraphSelectionStyleOpts, isViewMode, NodeShapes, NodeStyle, RichTextStyle, VIEW_MODE_VALUES, } from "./src/config/index";
@@ -27,3 +28,16 @@ export * from "./src/config/palettes/index";
27
28
  export { areDistinguishableInGrayscale, colorDifference, isPaletteSafe, simulateDeuteranopia, simulateProtanopia, simulateTritanopia, toGrayscale, } from "./src/utils/styleHelpers/accessibility/colorblindSimulation";
28
29
  export type { RgbColor } from "./src/utils/styleHelpers/color/interpolation";
29
30
  export { hexToRgb, interpolatePalette, MISSING_DATA_COLOR } from "./src/utils/styleHelpers/color/interpolation";
31
+ /**
32
+ * A rule tree: what the visibility filter keeps.
33
+ * @deprecated Use {@link RuleTree}, the same type under the name the rule grammar uses: a rule
34
+ * tree is also what a rule set holds, not only what the visibility filter keeps. Removed in the
35
+ * major version that ships the project file.
36
+ */
37
+ export type Filter = RuleTree;
38
+ /**
39
+ * Which arcs a degree filter counts.
40
+ * @deprecated Use {@link SelectionDirection}, the same type under the name the rule grammar uses.
41
+ * Removed in the major version that ships the project file.
42
+ */
43
+ export type FilterDirection = SelectionDirection;
package/dist/schema.js CHANGED
@@ -1,4 +1,4 @@
1
- import { R as N, e as x } from "./chunks/types-C_c53VgR.js";
1
+ import { R as N, e as x } from "./chunks/types-DFchv4Ny.js";
2
2
  import { M as h, h as y, i as M } from "./chunks/interpolation-DY-PNpqX.js";
3
3
  import { B as D, a as U, b as B, C as P, G as H, c as V, I as w, O as $, d as F, e as W, f as Y, P as j, g as k, h as q, R as K, T as v, i as z, V as J, Y as Q } from "./chunks/sequential-Zym81qm7.js";
4
4
  import { D as Z, a as tt, G as nt, b as at, V as et, i as st } from "./chunks/GraphStyle-Cwr55SAE.js";
package/dist/session.d.ts CHANGED
@@ -54,6 +54,8 @@
54
54
  * Node-safety is enforced by a test: `test/packaging/node-safe-entries.test.ts` resolves this
55
55
  * module's import graph and fails if Babylon.js, Lit or a DOM global appears in it.
56
56
  */
57
+ import type { RuleTree, SelectionDirection } from "./src/catalog/types";
58
+ import type { SelectionOp } from "./src/session/selection";
57
59
  export type { ComponentStatistics, CreateGraphSessionOptions, EdgeRecord, GraphSession, GraphStatistics, NodeRecord, SessionAttributes, SessionCatalogApi, SessionConfig, SessionDataApi, SessionDataConfig, SessionEventMap, SessionGraphStore, SessionRecordSource, SessionRunsOptions, SessionStatus, StyleProblem, } from "./src/session";
58
60
  export { createGraphSession } from "./src/session";
59
61
  /**
@@ -79,23 +81,44 @@ export { recommendLayout } from "./src/session";
79
81
  export type { BatchResult, BatchStep, Caveats, EngineVersions, Precision, Progress, QueueEntry, QueuePolicy, ResolvedScope, Run, RunChange, RunDirection, RunExecutionContext, RunExecutor, RunOptions, RunOutcome, RunPhase, RunProgressReport, RunQueue, RunRecord, RunRemoval, RunsApi, RunScopeRecord, RunSpec, RunStatus, RunStyle, StaleNote, StartOptions, WeightMeaning, } from "./src/session/runs";
80
82
  export { isRunId, isRunStatus, isTerminalRunStatus, QUEUE_POLICIES, RUN_ID_PATTERN, RUN_PHASES, RUN_STATUSES, TERMINAL_RUN_STATUSES, } from "./src/session/runs";
81
83
  export type { Histogram, HistogramBin, HistogramBinning, HistogramOptions, Normalization, NumericColumnView, RankingEntry, ReadingOptions, ResultsApi, ResultSummary, RunRef, RunResult, SummaryEntry, SummaryGroup, TopRanking, } from "./src/session/results";
82
- export { defaultReading, RESULT_FIELD_NAMES, RESULT_ROOT, RESULT_SHAPE_CONTRACTS, resultPath } from "./src/session/results";
84
+ export { defaultReading, RESULT_FIELD_NAMES, RESULT_ROOT, RESULT_SHAPE_CONTRACTS, resultPath, } from "./src/session/results";
83
85
  export type { SavedScope, ScopeApi, ScopeCount, ScopeCountOptions } from "./src/session/scope";
84
86
  export { DEFAULT_SCOPE_SAMPLE } from "./src/session/scope";
85
- export type { SelectionApi, SelectionAttributeStatistics, SelectionCause, SelectionDelta, SelectionDirection, SelectionStatistics, SelectionTarget, SelectionTextMode, SetOp, } from "./src/session/selection";
87
+ export type { ElementSet, Memberships, SetChange, SetOffer, SetsApi, SetStatus, SetStatusReason, SetUser, } from "./src/session/sets/types";
88
+ export type { SelectionApi, SelectionAttributeStatistics, SelectionCause, SelectionDelta, SelectionDirection, SelectionOp, SelectionStatistics, SelectionTarget, SelectionTextMode, } from "./src/session/selection";
86
89
  export { DEFAULT_SELECTION_CAP, SET_OPS } from "./src/session/selection";
87
- export type { Filter, FilterDirection, FilterResult, TimeStep, TimeWindow, VisibilityApi, VisibilityChange, VisibilitySummary, } from "./src/session/visibility";
88
- export type { AlgorithmRunCommand, Plan, PlanBlock, PlanEffect, SessionCommand, } from "./src/session";
90
+ export type { FilterResult, RuleTree, TimeStep, TimeWindow, VisibilityApi, VisibilityChange, VisibilitySummary, } from "./src/session/visibility";
91
+ export type { AlgorithmRunCommand, Plan, PlanBlock, PlanEffect, SessionCommand } from "./src/session";
89
92
  export { isAlgorithmRunCommand } from "./src/session";
90
93
  export type { CostConfidence, CostEstimate, CostGateDecision, CostGateLimits, CostMeasurement, MachineCalibration, } from "./src/session/cost";
91
94
  export { DEFAULT_COST_GATE_LIMITS, DEFAULT_EXACT_COMPUTATION_CAP_SECONDS } from "./src/session/cost";
92
- export type { Binding, BindingOverflow, Channel, EdgeId, Encoding, FieldDescriptor, LayerId, LayerKind, LayerSource, LayerSpec, NodeId, Path, Query, QueryValidation, ResultShape, RunId, Scope, ScopeId, Selector, StaticStyle, StyleDocument, } from "./src/catalog/types";
95
+ export { parseScope, parseSetDefinition } from "./src/catalog/sets/parse";
96
+ export type { Binding, BindingOverflow, Channel, EdgeId, EdgeMember, EdgeReading, EdgeRef, Encoding, FieldDescriptor, ItemKey, LayerId, LayerKind, LayerSource, LayerSpec, NodeId, Path, PathKind, Query, QueryValidation, ResultId, ResultItem, ResultShape, RunId, Scope, ScopeId, ScopeInput, Selector, SetCombine, SetCreatedFrom, SetDefinition, SetDefinitionInput, SetId, SetOperand, StaticStyle, StyleDocument, } from "./src/catalog/types";
93
97
  export { isResultShape, RESULT_SHAPES } from "./src/catalog/types";
94
98
  export type { ChannelExplanation, ElementLayerSpec, EncodingRun, EncodingSpec, ExplainTarget, FieldWords, HighlightSpec, Layer, LayerPosition, LayerProblem, LegendBlock, LegendSwatch, RepaintReason, RepaintReport, SessionStylesApi, StyleChange, StyleContribution, StyleExplanation, StylesApi, TemplateOptions, TemplateReport, UnboundLayer, ValidationResult, } from "./src/session/styles";
95
99
  export { quotePath } from "./src/session/styles";
96
100
  export type { AccelerationCapabilities, AccelerationPolicy, AccelerationPrecision, AccelerationState, AccelerationStatus, AcceleratorDeviceInfo, Capabilities, CaptureCapability, GraphAccelerator, Limits, WorkerCapability, XrCapability, } from "./src/acceleration";
97
- export { ACCELERATION_POLICIES, ACCELERATION_POLICY_DEFAULT, isAccelerationPolicy, } from "./src/acceleration";
101
+ export { ACCELERATION_POLICIES, ACCELERATION_POLICY_DEFAULT, isAccelerationPolicy } from "./src/acceleration";
98
102
  export type { DefaultableLimits } from "./src/session";
99
103
  export { DEFAULT_LIMITS } from "./src/session";
100
104
  export type { AccelerationErrorCode, GraphtyErrorCode, GraphtyErrorInit, GraphtyErrorJson, GraphtyErrorSource, GraphtyErrorTarget, } from "./src/errors";
101
- export { ACCELERATION_ERROR_CODES, GRAPHTY_ERROR_CODES, GraphtyError, isGraphtyError, isGraphtyErrorCode } from "./src/errors";
105
+ export { ACCELERATION_ERROR_CODES, GRAPHTY_ERROR_CODES, GraphtyError, isGraphtyError, isGraphtyErrorCode, } from "./src/errors";
106
+ /**
107
+ * A rule tree: what the visibility filter keeps.
108
+ * @deprecated Use {@link RuleTree}, the same type under the name the rule grammar uses: a rule
109
+ * tree is also what a rule set holds, not only what the visibility filter keeps. Removed in the
110
+ * major version that ships the project file.
111
+ */
112
+ export type Filter = RuleTree;
113
+ /**
114
+ * Which arcs a degree filter counts.
115
+ * @deprecated Use {@link SelectionDirection}, the same type under the name the rule grammar uses.
116
+ * Removed in the major version that ships the project file.
117
+ */
118
+ export type FilterDirection = SelectionDirection;
119
+ /**
120
+ * What a mutation does with the elements a target named.
121
+ * @deprecated Use {@link SelectionOp}, the same type under a name that does not read as a set
122
+ * operation. Removed in the major version that ships the project file.
123
+ */
124
+ export type SetOp = SelectionOp;
package/dist/session.js CHANGED
@@ -1,9 +1,10 @@
1
- import { R, e as _ } from "./chunks/types-C_c53VgR.js";
2
- import { A as c, a as C, G as p, i as m, b as L } from "./chunks/pluginRegistry-Bs8bEkz9.js";
3
- import { p as O, q as U, R as I, t as P, u as y, w as N, x as D, y as w, z as v } from "./chunks/optionsFromZod-B9RncoTX.js";
4
- import { D as h } from "./chunks/GraphSession-DuAhRgCd.js";
5
- import { a as b, b as x, c as F, d as z, Q as M, R as k, e as H, f as Y, S as j, T as q, g as Q, i as X, h as B, j as J, k as K } from "./chunks/GraphSession-DuAhRgCd.js";
6
- import { L as s } from "./chunks/scales-CJCRwi2J.js";
1
+ import { L as s } from "./chunks/parse-BMTqt4SS.js";
2
+ import { p, a as R } from "./chunks/parse-BMTqt4SS.js";
3
+ import { R as c, e as A } from "./chunks/types-DFchv4Ny.js";
4
+ import { A as m, a as L, G as g, i as O, b as U } from "./chunks/pluginRegistry-Bs8bEkz9.js";
5
+ import { p as P, q as y, R as N, t as D, u as w, w as v, x as G, y as b, z as x } from "./chunks/optionsFromZod-CKMYSwTz.js";
6
+ import { D as h } from "./chunks/GraphSession-BhuHSXIo.js";
7
+ import { a as z, b as M, c as k, d as H, Q as Y, R as j, e as q, f as Q, S as X, T as B, g as J, i as K, h as V, j as W, k as Z } from "./chunks/GraphSession-BhuHSXIo.js";
7
8
  const u = [
8
9
  {
9
10
  id: "fixed",
@@ -49,37 +50,39 @@ function T(e, a = {}) {
49
50
  });
50
51
  }
51
52
  export {
52
- c as ACCELERATION_ERROR_CODES,
53
- O as ACCELERATION_POLICIES,
54
- U as ACCELERATION_POLICY_DEFAULT,
55
- b as DEFAULT_COST_GATE_LIMITS,
56
- x as DEFAULT_EXACT_COMPUTATION_CAP_SECONDS,
53
+ m as ACCELERATION_ERROR_CODES,
54
+ P as ACCELERATION_POLICIES,
55
+ y as ACCELERATION_POLICY_DEFAULT,
56
+ z as DEFAULT_COST_GATE_LIMITS,
57
+ M as DEFAULT_EXACT_COMPUTATION_CAP_SECONDS,
57
58
  h as DEFAULT_LIMITS,
58
- F as DEFAULT_SCOPE_SAMPLE,
59
- z as DEFAULT_SELECTION_CAP,
60
- C as GRAPHTY_ERROR_CODES,
61
- p as GraphtyError,
62
- M as QUEUE_POLICIES,
63
- I as RESULT_FIELD_NAMES,
64
- P as RESULT_ROOT,
65
- R as RESULT_SHAPES,
66
- y as RESULT_SHAPE_CONTRACTS,
67
- k as RUN_ID_PATTERN,
68
- H as RUN_PHASES,
69
- Y as RUN_STATUSES,
70
- j as SET_OPS,
71
- q as TERMINAL_RUN_STATUSES,
72
- Q as createGraphSession,
73
- N as defaultReading,
74
- D as isAccelerationPolicy,
75
- X as isAlgorithmRunCommand,
76
- m as isGraphtyError,
77
- L as isGraphtyErrorCode,
78
- _ as isResultShape,
79
- B as isRunId,
80
- J as isRunStatus,
81
- K as isTerminalRunStatus,
82
- w as quotePath,
59
+ k as DEFAULT_SCOPE_SAMPLE,
60
+ H as DEFAULT_SELECTION_CAP,
61
+ L as GRAPHTY_ERROR_CODES,
62
+ g as GraphtyError,
63
+ Y as QUEUE_POLICIES,
64
+ N as RESULT_FIELD_NAMES,
65
+ D as RESULT_ROOT,
66
+ c as RESULT_SHAPES,
67
+ w as RESULT_SHAPE_CONTRACTS,
68
+ j as RUN_ID_PATTERN,
69
+ q as RUN_PHASES,
70
+ Q as RUN_STATUSES,
71
+ X as SET_OPS,
72
+ B as TERMINAL_RUN_STATUSES,
73
+ J as createGraphSession,
74
+ v as defaultReading,
75
+ G as isAccelerationPolicy,
76
+ K as isAlgorithmRunCommand,
77
+ O as isGraphtyError,
78
+ U as isGraphtyErrorCode,
79
+ A as isResultShape,
80
+ V as isRunId,
81
+ W as isRunStatus,
82
+ Z as isTerminalRunStatus,
83
+ p as parseScope,
84
+ R as parseSetDefinition,
85
+ b as quotePath,
83
86
  T as recommendLayout,
84
- v as resultPath
87
+ x as resultPath
85
88
  };
@@ -9,7 +9,7 @@ import { VoiceInputAdapter } from "./ai/input/VoiceInputAdapter";
9
9
  import type { ApiKeyManager } from "./ai/keys";
10
10
  import type { CameraState } from "./camera/types.js";
11
11
  import { type CameraController, type CameraKey, CameraManager } from "./cameras/CameraManager";
12
- import type { AlgorithmKey, Scope } from "./catalog/types";
12
+ import type { AlgorithmKey, Scope, ScopeInput } from "./catalog/types";
13
13
  import { AdHocData, FetchEdgesFn, FetchNodesFn, type GraphBackgroundConfig, type GraphBehaviorConfig, type GraphSelectionStyleInput, type ViewMode, type XRConfig } from "./config";
14
14
  import { type PartialXRConfig } from "./config/xr-config-schema";
15
15
  import { EventOfType, EventType } from "./events";
@@ -19,10 +19,10 @@ import { Node } from "./Node";
19
19
  import type { ScreenshotOptions, ScreenshotResult } from "./screenshot/types.js";
20
20
  import { type GraphSession } from "./session";
21
21
  import type { Run, StartOptions } from "./session/runs";
22
- import type { SelectionDelta, SelectionTarget, SetOp } from "./session/selection";
22
+ import type { SelectionDelta, SelectionOp, SelectionTarget } from "./session/selection";
23
23
  import type { StyleSuggestion } from "./session/styles";
24
24
  import { Styles } from "./Styles";
25
- import type { QueueableOptions, RunAlgorithmOptions } from "./utils/queue-migration";
25
+ import type { QueueableOptions, RunAlgorithmOptions, SetLayoutOptions } from "./utils/queue-migration";
26
26
  import { XRSessionManager } from "./xr/XRSessionManager";
27
27
  /**
28
28
  * Main orchestrator class for graph visualization and interaction.
@@ -433,8 +433,10 @@ export declare class Graph implements GraphContext {
433
433
  * animate nodes from their current positions to new positions.
434
434
  * @param type - Layout algorithm name
435
435
  * @param opts - Layout-specific configuration options
436
- * @param options - Options for operation queue behavior
436
+ * @param options - Options for operation queue behavior, and `scope`: what the layout runs
437
+ * over (see {@link SetLayoutOptions.scope})
437
438
  * @returns Promise that resolves when layout is initialized
439
+ * @throws A `GraphtyError` with `E_UNSUPPORTED` for a scope on a layout that is not scoped.
438
440
  * @since 1.0.0
439
441
  * @see {@link waitForSettled} to wait for layout completion
440
442
  * @see {@link https://graphty.app/storybook/graphty-element/?path=/story/layout-3d--circular | 3D Layout Examples}
@@ -457,7 +459,26 @@ export declare class Graph implements GraphContext {
457
459
  * await graph.setLayout('circular', { radius: 5 });
458
460
  * ```
459
461
  */
460
- setLayout(type: string, opts?: object, options?: QueueableOptions): Promise<void>;
462
+ setLayout(type: string, opts?: object, options?: SetLayoutOptions): Promise<void>;
463
+ /**
464
+ * What layouts run over: the scope the running layout was given, carried to the next one.
465
+ * @returns The canonical scope, or undefined when layouts run over the whole graph.
466
+ * @since 2.5.0
467
+ */
468
+ getLayoutScope(): Scope | undefined;
469
+ /**
470
+ * Change what layouts run over, and restart the running layout over it.
471
+ *
472
+ * The scope is carried at once, so a layout set after this call runs over it too. It never
473
+ * refuses a scope that cannot be laid out -- one naming a removed set, or a running layout
474
+ * that is not scoped -- because it is not an explicit `setLayout`: such a scope is inactive,
475
+ * and the layout runs over the whole graph.
476
+ * @param scope - The scope; undefined or `"graph"` for the whole graph.
477
+ * @returns A promise that resolves once the running layout has restarted.
478
+ * @throws A `GraphtyError` with `E_BAD_COMMAND` when the value is not a scope.
479
+ * @since 2.5.0
480
+ */
481
+ setLayoutScope(scope: ScopeInput | undefined): Promise<void>;
461
482
  /**
462
483
  * Run a graph algorithm, addressed the 1.10 way.
463
484
  * @remarks
@@ -611,6 +632,13 @@ export declare class Graph implements GraphContext {
611
632
  * @param options - Queue options for operation ordering
612
633
  */
613
634
  removeNodes(nodeIds: (string | number)[], options?: QueueableOptions): Promise<void>;
635
+ /**
636
+ * Write each update into its node's attributes through the one attribute writer, so the
637
+ * revision of every field written moves. `id` is the address, not an attribute, and is not
638
+ * written.
639
+ * @param updates - the updates, each naming its node by `id`
640
+ */
641
+ private writeNodeUpdates;
614
642
  /**
615
643
  * Update node data for existing nodes in the graph.
616
644
  * @param updates - Array of update objects containing node ID and properties to update
@@ -927,7 +955,7 @@ export declare class Graph implements GraphContext {
927
955
  * does.
928
956
  * @returns What changed: what joined, what left, and what the selection holds now.
929
957
  */
930
- select(target: SelectionTarget, op?: SetOp): Promise<SelectionDelta>;
958
+ select(target: SelectionTarget, op?: SelectionOp): Promise<SelectionDelta>;
931
959
  /**
932
960
  * Set up a scene pointer observer to handle background clicks for deselection.
933
961
  * When the user clicks on an area with no node, the current selection is cleared.
@@ -1575,7 +1603,7 @@ export declare class Graph implements GraphContext {
1575
1603
  * `E_OPTION_RANGE`, exactly as `resolveCameraPreset` does.
1576
1604
  */
1577
1605
  applyCameraView(id: string, options?: {
1578
- scope?: Scope;
1606
+ scope?: ScopeInput;
1579
1607
  params?: Readonly<Record<string, unknown>>;
1580
1608
  } & import("./screenshot/types.js").CameraAnimationOptions): Promise<void>;
1581
1609
  /**
@@ -373,7 +373,7 @@ export declare const ACCELERATION_MIN_NODES_DEFAULT = 0;
373
373
  /**
374
374
  * Where and when the per-capability floors below were measured, as the plan's reason quotes it.
375
375
  */
376
- export declare const ACCELERATION_MIN_NODES_MEASUREMENT = "RTX 4070 SUPER, headless Chromium, 2026-09-25";
376
+ export declare const ACCELERATION_MIN_NODES_MEASUREMENT = "RTX 4070 SUPER, headless Chromium, 2026-09-27";
377
377
  /**
378
378
  * The node count below which the element declines the accelerator for one capability, when the
379
379
  * consumer has not set {@link ACCELERATION_MIN_NODES_KEY} themselves.
@@ -385,44 +385,81 @@ export declare const ACCELERATION_MIN_NODES_MEASUREMENT = "RTX 4070 SUPER, headl
385
385
  * before the device has started. One number cannot serve both, which is why the layout default
386
386
  * stays 0 and each algorithm capability the adapters route carries its own floor here.
387
387
  *
388
- * MEASURED, not guessed. `tmp/traversal-threshold/kernel-cpu-vs-gpu.ts` (the harness, kept
389
- * out of the tree) mounted `<graphty-element acceleration="required">` in headless Chromium on
390
- * the dev box (RTX 4070 SUPER through ANGLE's Vulkan backend, 2026-09-25, load average
391
- * 18 to 23), took the accelerator the element built, built seeded undirected graphs with ten
392
- * edges per node and integer weights 1..10 in the page, and timed the two dispatchers
393
- * `Algorithm.accelerated()` uses -- `accelerated(null)` for the CPU port and
394
- * `accelerated(narrowAlgorithms(accelerator))` for the device -- directly on the snapshot, so no
395
- * renderer frame is in the loop. Medians of nine warm calls after one cold call, in ms:
396
- *
397
- * | nodes / edges | BFS cpu | BFS gpu | sssp cpu | sssp gpu | pageRank cpu | pageRank gpu | components cpu | components gpu |
398
- * | ------------- | ------: | ------: | -------: | -------: | -----------: | -----------: | -------------: | -------------: |
399
- * | 1k / 10k | 0.1 | 7.8 | 0.3 | 7.3 | 0.7 | 3.0 | 0.2 | 3.9 |
400
- * | 5k / 50k | 0.6 | 8.8 | 1.6 | 7.9 | 5.3 | 2.9 | 1.2 | 5.3 |
401
- * | 10k / 100k | 1.0 | 7.5 | 2.8 | 7.2 | 4.6 | 2.9 | 2.3 | 7.4 |
402
- * | 20k / 200k | 1.7 | 9.1 | 3.8 | 13.5 | 16.2 | 3.0 | 4.8 | 7.5 |
403
- * | 50k / 500k | 5.7 | 13.0 | 25.8 | 27.6 | 50.3 | 4.3 | 11.6 | 7.8 |
404
- * | 100k / 1M | 9.8 | 17.3 | 30.4 | 49.2 | 67.4 | 5.6 | 16.2 | 8.6 |
405
- * | 200k / 2M | 17.6 | 23.2 | 73.0 | 79.6 | 148.3 | 10.5 | 29.9 | 11.5 |
406
- * | 500k / 5M | 88.3 | 33.6 | 343.8 | 150.3 | 523.0 | 36.1 | 99.7 | 20.9 |
407
- * | 1M / 10M | 250.9 | 24.2 | 1031.1 | 274.9 | 1762.4 | 17.5 | 215.7 | 43.2 |
408
- *
409
- * The two traversals were then measured twice more around their crossover, because the device's
410
- * time at one size moves with what else the box is doing (the first sweep's 200k row was taken
411
- * at a load average of 22.6, the repeats at about 18):
412
- *
413
- * | nodes / edges | BFS cpu | BFS gpu | sssp cpu | sssp gpu |
414
- * | ------------- | ------: | ------: | -------: | -------: |
415
- * | 100k / 1M | 7.4 | 9.5 | 26.9 | 20.9 |
416
- * | 200k / 2M | 15.6 | 10.1 | 66.3 | 37.8 |
417
- * | 200k / 2M | 17.8 | 11.0 | 70.6 | 42.5 |
418
- * | 300k / 3M | 35.2 | 13.3 | 129.2 | 77.1 |
419
- * | 300k / 3M | 34.4 | 18.9 | 129.8 | 65.2 |
420
- * | 400k / 4M | 63.3 | 30.7 | 226.6 | 128.2 |
421
- * | 500k / 5M | 93.1 | 32.5 | 361.9 | 200.0 |
422
- *
423
- * So: BFS loses at 100k in both runs and splits at 200k (one loss, two wins); Dijkstra splits at
424
- * both 100k and 200k; from 300k up the device wins every run of both by two to ten times.
425
- * PageRank wins from 5k and connected components from 50k, in the one run each was measured.
388
+ * MEASURED END TO END THROUGH THE ELEMENT, 2026-09-27, on the dev box (RTX 4070 SUPER through
389
+ * ANGLE's Vulkan backend, headless Chromium 143; the page reported the renderer as
390
+ * "ANGLE (NVIDIA, Vulkan 1.4.312 (NVIDIA GeForce RTX 4070 SUPER), NVIDIA)", so no software
391
+ * rasteriser is in these numbers). `<graphty-element acceleration="required">` was mounted with
392
+ * `layout="random"`, a seeded undirected graph was built in the page, and each capability was
393
+ * timed as `session.runs.start(...)` -- the call a consumer makes -- so the snapshot derivation,
394
+ * the dispatch and the publication of the result rows are all inside the number. The two arms
395
+ * were selected on ONE loaded element by flipping `acceleration-min-nodes` between 0 and
396
+ * 1,000,000,000: that threshold is the one gate that still sends `"required"` to the CPU port, so
397
+ * the accelerator stayed attached and the graph stayed resident across both arms, and a run whose
398
+ * `caveats.precision` did not read `f32` on the device arm and `f64` on the processor arm was
399
+ * rejected rather than counted.
400
+ *
401
+ * Medians of fifteen passes after one discarded pass of each arm, in ms, with the minimum of the
402
+ * fifteen beside it. Measured on a quiet box: the one-minute load average was 5.3 at the start and
403
+ * 3.2 at the end on 32 hardware threads, and a capability's fastest and slowest pass were usually
404
+ * within 10 percent of each other. An earlier sweep of the same code at load 55 to 74 read up to
405
+ * three times these absolute costs and landed on the same crossovers, because interleaving the
406
+ * arms put both under the same interference -- which is why a busy-box RATIO can be trusted where
407
+ * a busy-box millisecond cannot. Node counts above 10,000 carry 100,000 edges rather than ten per
408
+ * node, because 100,000 edges is the most the element will hold (see below):
409
+ *
410
+ * | nodes / edges | BFS cpu | BFS gpu | sssp cpu | sssp gpu | pageRank cpu | pageRank gpu | components cpu | components gpu |
411
+ * | ----------------- | ------: | ------: | -------: | -------: | -----------: | -----------: | -------------: | -------------: |
412
+ * | 1,000 / 10,000 | 4.7 | 11.3 | 5.5 | 11.6 | 5.3 | 7.8 | 4.4 | 9.5 |
413
+ * | 5,000 / 50,000 | 2.1 | 17.1 | 6.9 | 21.9 | 5.3 | 13.2 | 1.4 | 26.5 |
414
+ * | 10,000 / 100,000 | 3.9 | 18.0 | 14.6 | 32.8 | 11.3 | 19.4 | 2.6 | 23.9 |
415
+ * | 20,000 / 100,000 | 7.5 | 20.4 | 26.7 | 36.2 | 22.4 | 27.6 | 4.5 | 27.4 |
416
+ * | 50,000 / 100,000 | 22.5 | 41.7 | 27.7 | 40.4 | 73.6 | 59.3 | 9.5 | 35.3 |
417
+ *
418
+ * The same sizes by the minimum of the fifteen passes:
419
+ *
420
+ * | nodes / edges | BFS cpu | BFS gpu | sssp cpu | sssp gpu | pageRank cpu | pageRank gpu | components cpu | components gpu |
421
+ * | ----------------- | ------: | ------: | -------: | -------: | -----------: | -----------: | -------------: | -------------: |
422
+ * | 1,000 / 10,000 | 4.4 | 10.9 | 5.1 | 11.1 | 5.0 | 7.5 | 4.3 | 5.5 |
423
+ * | 5,000 / 50,000 | 1.8 | 14.0 | 6.4 | 20.4 | 4.6 | 11.7 | 1.3 | 25.2 |
424
+ * | 10,000 / 100,000 | 3.4 | 15.9 | 13.0 | 27.1 | 11.2 | 16.3 | 2.5 | 22.9 |
425
+ * | 20,000 / 100,000 | 7.0 | 19.0 | 17.2 | 27.7 | 22.0 | 24.4 | 4.2 | 24.5 |
426
+ * | 50,000 / 100,000 | 19.6 | 31.4 | 24.8 | 35.6 | 70.5 | 55.8 | 8.7 | 32.2 |
427
+ *
428
+ * WHAT THE ELEMENT CAN HOLD IS THE BINDING CONSTRAINT, and it is why four of the five rows above
429
+ * stop at 100,000 edges. `DEFAULT_LIMITS.renderCeiling` is 50,000 nodes and
430
+ * `DEFAULT_LIMITS.edgesDrawn` is 100,000 edges, and a load past either is REFUSED with
431
+ * `E_TOO_LARGE` rather than drawn badly. So the largest graph a consumer can put in front of
432
+ * these algorithms is 50,000 nodes with 100,000 edges -- or 10,000 nodes if the graph has the ten
433
+ * edges per node the sweep above uses for its smaller sizes. Sizes beyond that cannot be
434
+ * measured through the element, only through the package underneath it.
435
+ *
436
+ * ONLY PAGERANK CROSSES INSIDE WHAT THE ELEMENT CAN HOLD. It wins at 50,000 nodes by 1.24x on the
437
+ * medians and 1.26x on the minima, and loses at every smaller size, 20,000 included, where it
438
+ * reads 0.81x and 0.90x. That settles 20,000, which the busy-box sweep could not: three runs there
439
+ * disagreed at 1.09x, 0.94x and 0.86x, and the same sweep reported a tie at 10,000 on the minima
440
+ * that the quiet run shows was interference (0.69x). So 20,000 is below the floor and 50,000 is
441
+ * the floor. Breadth-first search, shortest paths and connected components lose at EVERY size the
442
+ * element can hold: the device's best showing is 0.54x for breadth-first search and 0.69x for
443
+ * shortest paths at 50,000 / 100,000, and connected components never gets past 0.46x on the
444
+ * medians because the processor implementation finishes a 50,000-node graph in 8.7 to 15.8 ms.
445
+ *
446
+ * The reason is a fixed cost, not a slow kernel. An accelerated call through the element never
447
+ * came back in less than about 5.5 ms at any size, and took 7.5 to 11 ms at the smallest, because
448
+ * each level of a traversal and each convergence test of an iterative algorithm is a readback, and
449
+ * a readback in Chromium is about 2 ms of round trip. The processor path pays no such floor: it
450
+ * answered in 1.3 ms at 5,000 nodes.
451
+ * Below the point where the processor's own work exceeds the device's round trips, the device
452
+ * cannot win however fast its arithmetic is.
453
+ *
454
+ * SO THREE OF THE FOUR FLOORS ARE ABOVE THE RENDER CEILING AND THOSE CAPABILITIES ARE NOT ROUTED
455
+ * TO THE DEVICE AT ALL TODAY. Their numbers are not from the sweep above -- it cannot reach them
456
+ * -- but from the crossovers measured on `@graphty/webgpu-graph-algorithms` itself with the graph
457
+ * resident, in `design/decisions/2026-09-26-which-algorithms-earn-the-gpu.md`: 141,000 nodes for
458
+ * breadth-first search, 107,000 for shortest paths and 132,000 for connected components. Those are
459
+ * floors for the KERNEL, and the element adds the readback round trips above to the device arm and
460
+ * a few milliseconds of result publication to both, so the element's true crossing is at or above
461
+ * each. Carrying them is what makes the element's behaviour and that record agree; raising the
462
+ * render ceiling (issue #419) is what would let any of the three be measured here and sharpened.
426
463
  *
427
464
  * A floor is the smallest measured size at which the device's median was at or below the CPU
428
465
  * port's IN EVERY RUN, so a size that won under one load and lost under another is below it. A
@@ -430,10 +467,9 @@ export declare const ACCELERATION_MIN_NODES_MEASUREMENT = "RTX 4070 SUPER, headl
430
467
  *
431
468
  * Two things the table does not cover. It is one card and one browser: a slower CPU or a
432
469
  * slower device moves the crossover, and a consumer who has measured their own machine sets
433
- * `acceleration.minNodes`, which replaces every floor here with their number. And it is the
434
- * kernel's time, not the run's: through the element a run also publishes its result rows,
435
- * which costs the same on either path and is why the element-level numbers in the issue read
436
- * higher on both sides.
470
+ * `acceleration.minNodes`, which replaces every floor here with their number. And a PageRank run
471
+ * that sets `personalization` or `initialRanks`, or runs over an undirected graph, takes the CPU
472
+ * implementation whatever the node count, so the floor never applies to it.
437
473
  *
438
474
  * Under `acceleration="required"` the floors do not apply: `"required"` is what a benchmark
439
475
  * runs under, and a benchmark of the small end of the curve has to reach the device.