@reicek/neataptic-ts 0.1.25 → 0.1.26

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 (210) hide show
  1. package/.github/copilot-instructions.md +11 -0
  2. package/.github/skills/trace-analyzer-extension/SKILL.md +3 -3
  3. package/.github/skills/trace-analyzer-extension/assets/extension-checklist.md +1 -1
  4. package/.github/skills/trace-analyzer-extension/references/analyzer-extension-workflow.md +1 -1
  5. package/.github/skills/trace-audit-reporting/SKILL.md +3 -3
  6. package/.github/skills/trace-audit-reporting/references/trace-analysis-workflow.md +1 -1
  7. package/package.json +19 -13
  8. package/plans/Flappy_Bird_Folder_Documentation_Pass.md +4 -4
  9. package/plans/README.md +24 -0
  10. package/plans/Roadmap.md +62 -40
  11. package/plans/analyze-trace-solid-split.plans.md +66 -0
  12. package/plans/architecture-solid-split.plans.md +9 -15
  13. package/plans/asciiMaze-typescript-repair.plans.md +1 -1
  14. package/plans/generate-docs-solid-split.plans.md +87 -0
  15. package/plans/methods-docs.plans.md +25 -1
  16. package/plans/methods-solid-split.plans.md +14 -14
  17. package/plans/neat-docs.plans.md +9 -1
  18. package/plans/neat-test-surface-repair.plans.md +1 -1
  19. package/plans/render-docs-html-solid-split.plans.md +68 -0
  20. package/plans/src-no-explicit-any-cleanup.plans.md +1 -1
  21. package/plans/utils-docs.plans.md +6 -1
  22. package/scripts/analyze-trace/analyze-trace.analysis.ts +479 -0
  23. package/scripts/analyze-trace/analyze-trace.constants.ts +35 -0
  24. package/scripts/analyze-trace/analyze-trace.io.ts +69 -0
  25. package/scripts/analyze-trace/analyze-trace.report.ts +100 -0
  26. package/scripts/analyze-trace/analyze-trace.shared.ts +116 -0
  27. package/scripts/analyze-trace/analyze-trace.ts +45 -0
  28. package/scripts/analyze-trace/analyze-trace.types.ts +72 -0
  29. package/scripts/assets/theme.css +80 -23
  30. package/scripts/copy-examples.ts +239 -0
  31. package/scripts/export-onnx.ts +223 -0
  32. package/scripts/generate-bench-tables.ts +378 -37
  33. package/scripts/generate-docs/generate-docs.constants.ts +107 -0
  34. package/scripts/generate-docs/generate-docs.order.ts +355 -0
  35. package/scripts/generate-docs/generate-docs.state.ts +31 -0
  36. package/scripts/generate-docs/generate-docs.targets.ts +165 -0
  37. package/scripts/generate-docs/generate-docs.ts +63 -0
  38. package/scripts/generate-docs/generate-docs.types.ts +112 -0
  39. package/scripts/generate-docs/output/generate-docs.output.folder-index.utils.ts +167 -0
  40. package/scripts/generate-docs/output/generate-docs.output.ordering.utils.ts +353 -0
  41. package/scripts/generate-docs/output/generate-docs.output.readme.utils.ts +420 -0
  42. package/scripts/generate-docs/output/generate-docs.output.ts +123 -0
  43. package/scripts/generate-docs/output/generate-docs.output.warnings.utils.ts +219 -0
  44. package/scripts/generate-docs/symbols/generate-docs.symbols.collection.utils.ts +365 -0
  45. package/scripts/generate-docs/symbols/generate-docs.symbols.jsdoc.utils.ts +373 -0
  46. package/scripts/generate-docs/symbols/generate-docs.symbols.normalize.utils.ts +155 -0
  47. package/scripts/generate-docs/symbols/generate-docs.symbols.render.utils.ts +149 -0
  48. package/scripts/generate-docs/symbols/generate-docs.symbols.signature.utils.ts +289 -0
  49. package/scripts/generate-docs/symbols/generate-docs.symbols.ts +11 -0
  50. package/scripts/mermaid-cli.mjs +102 -22
  51. package/scripts/mermaid-cli.ts +736 -0
  52. package/scripts/render-docs-html/render-docs-html.assets.ts +54 -0
  53. package/scripts/render-docs-html/render-docs-html.mermaid.ts +245 -0
  54. package/scripts/{render-docs-html.sidebar.ts → render-docs-html/render-docs-html.navigation.ts} +141 -144
  55. package/scripts/render-docs-html/render-docs-html.pages.ts +333 -0
  56. package/scripts/render-docs-html/render-docs-html.shared.ts +333 -0
  57. package/scripts/render-docs-html/render-docs-html.types.ts +42 -0
  58. package/scripts/render-docs-html.ts +23 -587
  59. package/scripts/run-docs.ts +238 -0
  60. package/scripts/write-dist-docs-pkg.ts +40 -0
  61. package/src/README.md +75 -75
  62. package/src/architecture/connection/README.md +5 -5
  63. package/src/architecture/layer/README.md +508 -508
  64. package/src/architecture/network/README.md +1458 -1458
  65. package/src/architecture/network/activate/README.md +694 -694
  66. package/src/architecture/network/bootstrap/README.md +77 -77
  67. package/src/architecture/network/connect/README.md +74 -74
  68. package/src/architecture/network/deterministic/README.md +135 -135
  69. package/src/architecture/network/evolve/README.md +364 -364
  70. package/src/architecture/network/gating/README.md +130 -130
  71. package/src/architecture/network/genetic/README.md +399 -399
  72. package/src/architecture/network/mutate/README.md +897 -897
  73. package/src/architecture/network/onnx/README.md +720 -720
  74. package/src/architecture/network/onnx/export/README.md +728 -728
  75. package/src/architecture/network/onnx/export/layers/README.md +450 -450
  76. package/src/architecture/network/onnx/import/README.md +618 -618
  77. package/src/architecture/network/onnx/schema/README.md +32 -32
  78. package/src/architecture/network/prune/README.md +245 -245
  79. package/src/architecture/network/remove/README.md +135 -135
  80. package/src/architecture/network/runtime/README.md +106 -106
  81. package/src/architecture/network/serialize/README.md +542 -542
  82. package/src/architecture/network/slab/README.md +608 -608
  83. package/src/architecture/network/standalone/README.md +212 -212
  84. package/src/architecture/network/stats/README.md +84 -84
  85. package/src/architecture/network/topology/README.md +465 -465
  86. package/src/architecture/network/training/README.md +200 -200
  87. package/src/architecture/node/README.md +5 -5
  88. package/src/architecture/nodePool/README.md +14 -14
  89. package/src/methods/README.md +99 -99
  90. package/src/methods/activation/README.md +189 -189
  91. package/src/methods/cost/README.md +131 -131
  92. package/src/methods/rate/README.md +86 -86
  93. package/src/multithreading/README.md +77 -77
  94. package/src/multithreading/workers/browser/README.md +8 -8
  95. package/src/multithreading/workers/node/README.md +8 -8
  96. package/src/neat/README.md +148 -148
  97. package/src/neat/adaptive/README.md +120 -120
  98. package/src/neat/adaptive/acceptance/README.md +40 -40
  99. package/src/neat/adaptive/complexity/README.md +137 -137
  100. package/src/neat/adaptive/core/README.md +197 -197
  101. package/src/neat/adaptive/lineage/README.md +90 -90
  102. package/src/neat/adaptive/mutation/README.md +284 -284
  103. package/src/neat/compat/README.md +43 -43
  104. package/src/neat/compat/core/README.md +90 -90
  105. package/src/neat/diversity/README.md +35 -35
  106. package/src/neat/diversity/core/README.md +88 -88
  107. package/src/neat/evaluate/README.md +85 -85
  108. package/src/neat/evaluate/auto-distance/README.md +75 -75
  109. package/src/neat/evaluate/entropy-compat/README.md +37 -37
  110. package/src/neat/evaluate/entropy-sharing/README.md +43 -43
  111. package/src/neat/evaluate/fitness/README.md +23 -23
  112. package/src/neat/evaluate/novelty/README.md +120 -120
  113. package/src/neat/evaluate/objectives/README.md +17 -17
  114. package/src/neat/evaluate/shared/README.md +94 -94
  115. package/src/neat/evolve/README.md +96 -96
  116. package/src/neat/evolve/adaptive/README.md +60 -60
  117. package/src/neat/evolve/objectives/README.md +63 -63
  118. package/src/neat/evolve/offspring/README.md +56 -56
  119. package/src/neat/evolve/population/README.md +171 -171
  120. package/src/neat/evolve/runtime/README.md +79 -79
  121. package/src/neat/evolve/speciation/README.md +74 -74
  122. package/src/neat/evolve/warnings/README.md +10 -10
  123. package/src/neat/export/README.md +114 -114
  124. package/src/neat/helpers/README.md +50 -50
  125. package/src/neat/init/README.md +9 -9
  126. package/src/neat/lineage/core/README.md +101 -101
  127. package/src/neat/multiobjective/category/README.md +74 -74
  128. package/src/neat/multiobjective/crowding/README.md +272 -272
  129. package/src/neat/multiobjective/dominance/README.md +171 -171
  130. package/src/neat/multiobjective/fronts/README.md +68 -68
  131. package/src/neat/multiobjective/metrics/README.md +43 -43
  132. package/src/neat/multiobjective/objectives/README.md +31 -31
  133. package/src/neat/multiobjective/shared/README.md +27 -27
  134. package/src/neat/mutation/README.md +97 -97
  135. package/src/neat/mutation/add-conn/README.md +115 -115
  136. package/src/neat/mutation/add-node/README.md +126 -126
  137. package/src/neat/mutation/flow/README.md +149 -149
  138. package/src/neat/mutation/repair/README.md +185 -185
  139. package/src/neat/mutation/select/README.md +117 -117
  140. package/src/neat/mutation/shared/README.md +32 -32
  141. package/src/neat/objectives/README.md +25 -25
  142. package/src/neat/objectives/core/README.md +67 -67
  143. package/src/neat/pruning/README.md +40 -40
  144. package/src/neat/pruning/core/README.md +171 -171
  145. package/src/neat/pruning/facade/README.md +32 -32
  146. package/src/neat/rng/README.md +104 -104
  147. package/src/neat/rng/core/README.md +137 -137
  148. package/src/neat/rng/facade/README.md +50 -50
  149. package/src/neat/selection/README.md +111 -111
  150. package/src/neat/selection/core/README.md +227 -227
  151. package/src/neat/selection/facade/README.md +61 -61
  152. package/src/neat/shared/README.md +163 -163
  153. package/src/neat/speciation/README.md +31 -31
  154. package/src/neat/speciation/threshold/README.md +35 -35
  155. package/src/neat/species/README.md +25 -25
  156. package/src/neat/species/core/README.md +20 -20
  157. package/src/neat/species/core/shared/README.md +18 -18
  158. package/src/neat/species/history/context/README.md +22 -22
  159. package/src/neat/telemetry/accessors/README.md +58 -58
  160. package/src/neat/telemetry/exports/README.md +233 -233
  161. package/src/neat/telemetry/facade/README.md +252 -252
  162. package/src/neat/telemetry/facade/archive/README.md +57 -57
  163. package/src/neat/telemetry/facade/buffer/README.md +43 -43
  164. package/src/neat/telemetry/facade/lineage/README.md +12 -12
  165. package/src/neat/telemetry/facade/objectives/README.md +44 -44
  166. package/src/neat/telemetry/facade/runtime/README.md +26 -26
  167. package/src/neat/telemetry/facade/species/README.md +27 -27
  168. package/src/neat/telemetry/metrics/README.md +696 -696
  169. package/src/neat/telemetry/recorder/README.md +57 -57
  170. package/src/neat/telemetry/types/README.md +32 -32
  171. package/src/neat/topology-intent/README.md +75 -75
  172. package/src/utils/README.md +193 -193
  173. package/test/examples/asciiMaze/browser-entry/README.md +92 -92
  174. package/test/examples/asciiMaze/dashboardManager/README.md +109 -109
  175. package/test/examples/asciiMaze/dashboardManager/telemetry/README.md +28 -28
  176. package/test/examples/asciiMaze/evolutionEngine/README.md +1527 -1527
  177. package/test/examples/asciiMaze/mazeMovement/README.md +105 -105
  178. package/test/examples/asciiMaze/mazeMovement/finalization/README.md +16 -16
  179. package/test/examples/asciiMaze/mazeMovement/policy/README.md +57 -57
  180. package/test/examples/asciiMaze/mazeMovement/runtime/README.md +52 -52
  181. package/test/examples/asciiMaze/mazeMovement/shaping/README.md +46 -46
  182. package/test/examples/flappy_bird/browser-entry/README.md +508 -508
  183. package/test/examples/flappy_bird/browser-entry/host/README.md +101 -101
  184. package/test/examples/flappy_bird/browser-entry/host/resize/README.md +144 -144
  185. package/test/examples/flappy_bird/browser-entry/network-view/README.md +194 -194
  186. package/test/examples/flappy_bird/browser-entry/playback/README.md +278 -278
  187. package/test/examples/flappy_bird/browser-entry/playback/background/README.md +129 -129
  188. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/README.md +502 -502
  189. package/test/examples/flappy_bird/browser-entry/playback/frame-render/README.md +139 -139
  190. package/test/examples/flappy_bird/browser-entry/playback/snapshot/README.md +10 -10
  191. package/test/examples/flappy_bird/browser-entry/playback/trail/README.md +43 -43
  192. package/test/examples/flappy_bird/browser-entry/playback/worker-channel/README.md +30 -30
  193. package/test/examples/flappy_bird/browser-entry/runtime/README.md +59 -59
  194. package/test/examples/flappy_bird/browser-entry/visualization/README.md +276 -276
  195. package/test/examples/flappy_bird/browser-entry/worker-channel/README.md +16 -16
  196. package/test/examples/flappy_bird/constants/README.md +1070 -1070
  197. package/test/examples/flappy_bird/environment/README.md +22 -22
  198. package/test/examples/flappy_bird/evaluation/README.md +32 -32
  199. package/test/examples/flappy_bird/evaluation/rollout/README.md +141 -141
  200. package/test/examples/flappy_bird/flappy-evolution-worker/README.md +425 -425
  201. package/test/examples/flappy_bird/simulation-shared/README.md +170 -170
  202. package/test/examples/flappy_bird/simulation-shared/observation/README.md +109 -109
  203. package/test/examples/flappy_bird/trainer/README.md +325 -325
  204. package/test/examples/flappy_bird/trainer/evaluation/README.md +74 -74
  205. package/scripts/analyze-trace.ts +0 -590
  206. package/scripts/copy-examples.mjs +0 -114
  207. package/scripts/export-onnx.mjs +0 -86
  208. package/scripts/generate-bench-tables.mjs +0 -182
  209. package/scripts/generate-docs.ts +0 -2900
  210. package/scripts/write-dist-docs-pkg.mjs +0 -16
@@ -78,14 +78,6 @@ one consistent view of the active network range.
78
78
 
79
79
  Pixel side length for dotted negative-connection square markers.
80
80
 
81
- ### FLAPPY_NETWORK_DOTTED_CONNECTION_SQUARE_SIDE_PX
82
-
83
- Pixel side length for dotted negative-connection square markers.
84
-
85
- ### FLAPPY_NETWORK_ENABLED_CONNECTION_ALPHA
86
-
87
- Stroke alpha used for enabled connection lines.
88
-
89
81
  ### FLAPPY_NETWORK_DISABLED_CONNECTION_ALPHA
90
82
 
91
83
  Stroke alpha used for disabled connection lines.
@@ -94,6 +86,14 @@ Stroke alpha used for disabled connection lines.
94
86
 
95
87
  Dash pattern used for disabled positive connection lines.
96
88
 
89
+ ### FLAPPY_NETWORK_DOTTED_CONNECTION_ALIGNMENT_EPSILON
90
+
91
+ Tiny alignment epsilon to stabilize axis-aligned dot centering.
92
+
93
+ ### FLAPPY_NETWORK_DOTTED_CONNECTION_SQUARE_SIDE_PX
94
+
95
+ Pixel side length for dotted negative-connection square markers.
96
+
97
97
  ### FLAPPY_NETWORK_DOTTED_CONNECTION_STEP_COMPACT_RATIO
98
98
 
99
99
  Spacing multiplier used to tighten square-dot trail cadence.
@@ -102,57 +102,53 @@ Spacing multiplier used to tighten square-dot trail cadence.
102
102
 
103
103
  Line-width multiplier used to scale dotted-step spacing.
104
104
 
105
- ### FLAPPY_NETWORK_DOTTED_CONNECTION_ALIGNMENT_EPSILON
105
+ ### FLAPPY_NETWORK_ENABLED_CONNECTION_ALPHA
106
106
 
107
- Tiny alignment epsilon to stabilize axis-aligned dot centering.
107
+ Stroke alpha used for enabled connection lines.
108
108
 
109
- ### FLAPPY_NETWORK_HIDDEN_NODE_VERTICAL_PADDING_PX
109
+ ### FLAPPY_NETWORK_HEADER_LINE_HEIGHT_PX
110
110
 
111
- Extra vertical padding reserved for hidden-node labels inside rectangles.
111
+ Vertical spacing between multiline header rows.
112
112
 
113
- ### FLAPPY_NETWORK_OUTPUT_NODE_STROKE_WIDTH_PX
113
+ ### FLAPPY_NETWORK_HEADER_PADDING_PX
114
114
 
115
- Stroke width used for emphasized output nodes.
115
+ Left and top padding used by the network header block.
116
116
 
117
117
  ### FLAPPY_NETWORK_HIDDEN_NODE_STROKE_WIDTH_PX
118
118
 
119
119
  Stroke width used for hidden and input nodes.
120
120
 
121
- ### FLAPPY_NETWORK_OUTPUT_NODE_SHADOW_BLUR_PX
122
-
123
- Glow blur radius used for output-node emphasis.
124
-
125
- ### FLAPPY_NETWORK_MIN_RENDER_NODE_HEIGHT_PX
121
+ ### FLAPPY_NETWORK_HIDDEN_NODE_VERTICAL_PADDING_PX
126
122
 
127
- Minimum render height for any node rectangle.
123
+ Extra vertical padding reserved for hidden-node labels inside rectangles.
128
124
 
129
- ### FLAPPY_NETWORK_OUTPUT_NODE_HEIGHT_REDUCTION_PX
125
+ ### FLAPPY_NETWORK_LEGEND_ARCHITECTURE_GAP_PX
130
126
 
131
- Height reduction applied to output-node rectangles for tighter framing.
127
+ Gap between architecture text and the legend container.
132
128
 
133
- ### FLAPPY_NETWORK_HEADER_PADDING_PX
129
+ ### FLAPPY_NETWORK_LEGEND_BIAS_LABEL_X_PX
134
130
 
135
- Left and top padding used by the network header block.
131
+ Label x-position for bias legend row text.
136
132
 
137
- ### FLAPPY_NETWORK_HEADER_LINE_HEIGHT_PX
133
+ ### FLAPPY_NETWORK_LEGEND_BIAS_SWATCH_SIZE_PX
138
134
 
139
- Vertical spacing between multiline header rows.
135
+ Side length for bias legend color swatches.
140
136
 
141
- ### FLAPPY_NETWORK_LEGEND_MIN_ARCHITECTURE_TOP_PX
137
+ ### FLAPPY_NETWORK_LEGEND_BIAS_SWATCH_X_PX
142
138
 
143
- Minimum top bound for architecture text above the legend box.
139
+ X-position for bias legend swatches.
144
140
 
145
- ### FLAPPY_NETWORK_LEGEND_ARCHITECTURE_GAP_PX
141
+ ### FLAPPY_NETWORK_LEGEND_BIAS_SWATCH_Y_PX
146
142
 
147
- Gap between architecture text and the legend container.
143
+ Y-position offset for bias legend swatches.
148
144
 
149
145
  ### FLAPPY_NETWORK_LEGEND_BOX_PADDING_PX
150
146
 
151
147
  Shared inner padding used by legend labels and swatches.
152
148
 
153
- ### FLAPPY_NETWORK_LEGEND_HEADER_TOP_PADDING_PX
149
+ ### FLAPPY_NETWORK_LEGEND_CONNECTION_LABEL_X_PX
154
150
 
155
- Top offset for the legend title inside the legend box.
151
+ Label x-position for connection legend row text.
156
152
 
157
153
  ### FLAPPY_NETWORK_LEGEND_CONNECTION_SAMPLE_END_X_PX
158
154
 
@@ -162,50 +158,48 @@ End x-position for connection sample lines in legend rows.
162
158
 
163
159
  Vertical offset for connection sample lines inside legend rows.
164
160
 
165
- ### FLAPPY_NETWORK_LEGEND_CONNECTION_LABEL_X_PX
161
+ ### FLAPPY_NETWORK_LEGEND_HEADER_TOP_PADDING_PX
166
162
 
167
- Label x-position for connection legend row text.
163
+ Top offset for the legend title inside the legend box.
168
164
 
169
- ### FLAPPY_NETWORK_LEGEND_BIAS_SWATCH_X_PX
165
+ ### FLAPPY_NETWORK_LEGEND_MIN_ARCHITECTURE_TOP_PX
170
166
 
171
- X-position for bias legend swatches.
167
+ Minimum top bound for architecture text above the legend box.
172
168
 
173
- ### FLAPPY_NETWORK_LEGEND_BIAS_SWATCH_Y_PX
169
+ ### FLAPPY_NETWORK_MIN_RENDER_NODE_HEIGHT_PX
174
170
 
175
- Y-position offset for bias legend swatches.
171
+ Minimum render height for any node rectangle.
176
172
 
177
- ### FLAPPY_NETWORK_LEGEND_BIAS_SWATCH_SIZE_PX
173
+ ### FLAPPY_NETWORK_OUTPUT_NODE_HEIGHT_REDUCTION_PX
178
174
 
179
- Side length for bias legend color swatches.
175
+ Height reduction applied to output-node rectangles for tighter framing.
180
176
 
181
- ### FLAPPY_NETWORK_LEGEND_BIAS_LABEL_X_PX
177
+ ### FLAPPY_NETWORK_OUTPUT_NODE_SHADOW_BLUR_PX
182
178
 
183
- Label x-position for bias legend row text.
179
+ Glow blur radius used for output-node emphasis.
180
+
181
+ ### FLAPPY_NETWORK_OUTPUT_NODE_STROKE_WIDTH_PX
182
+
183
+ Stroke width used for emphasized output nodes.
184
184
 
185
185
  ## browser-entry/visualization/visualization.draw.service.ts
186
186
 
187
- ### drawWeightedConnectionsLayer
187
+ ### drawBiasNodeScene
188
188
 
189
189
  ```ts
190
- drawWeightedConnectionsLayer(
190
+ drawBiasNodeScene(
191
191
  context: CanvasRenderingContext2D,
192
- runtimeConnections: VisualNetworkConnectionLike[],
193
- positionByNodeIndex: Map<number, PositionedNetworkNodeLike>,
194
- connectionScale: DynamicColorScale,
192
+ biasNodeScene: BiasNodeScene,
193
+ nodeWidthPx: number,
195
194
  ): void
196
195
  ```
197
196
 
198
- Draws weighted connection lines.
199
-
200
- Connection styling carries semantic meaning: color encodes magnitude and sign,
201
- while dash patterns and auxiliary marks help distinguish disabled or negative
202
- edges in a way that still reads quickly on a dense graph.
197
+ Draws a resolved node rectangle and optional bias label.
203
198
 
204
199
  Parameters:
205
200
  - `context` - - Render context.
206
- - `runtimeConnections` - - Runtime connection list.
207
- - `positionByNodeIndex` - - Node layout map.
208
- - `connectionScale` - - Dynamic connection color scale.
201
+ - `biasNodeScene` - - Paint-ready node scene.
202
+ - `nodeWidthPx` - - Shared node width.
209
203
 
210
204
  Returns: Nothing.
211
205
 
@@ -233,376 +227,382 @@ Parameters:
233
227
 
234
228
  Returns: Nothing.
235
229
 
236
- ### drawNetworkVisualizationHeader
230
+ ### drawLeftAlignedTextRows
237
231
 
238
232
  ```ts
239
- drawNetworkVisualizationHeader(
233
+ drawLeftAlignedTextRows(
240
234
  context: CanvasRenderingContext2D,
241
- architectureLabel: string,
235
+ request: { lines: string[]; leftPx: number; topPx: number; lineHeightPx: number; font: string; fillStyle: string; },
242
236
  ): void
243
237
  ```
244
238
 
245
- Draws network architecture header text.
246
-
247
- The header gives viewers a compact architecture summary before they inspect
248
- individual nodes and edges.
239
+ Draws multiline text rows aligned to a fixed left edge.
249
240
 
250
241
  Parameters:
251
242
  - `context` - - Render context.
252
- - `architectureLabel` - - Header label.
243
+ - `request` - - Multiline text draw request.
253
244
 
254
245
  Returns: Nothing.
255
246
 
256
- ### drawNetworkColorLegend
247
+ ### drawLegendArchitectureLabel
257
248
 
258
249
  ```ts
259
- drawNetworkColorLegend(
250
+ drawLegendArchitectureLabel(
260
251
  context: CanvasRenderingContext2D,
261
- architectureLabel: string,
262
- colorScales: NetworkVisualizationColorScales,
252
+ legendSceneContext: LegendSceneContext,
263
253
  ): void
264
254
  ```
265
255
 
266
- Draws the color legend for connections and node bias values.
267
-
268
- This legend is what turns the panel from "colorful art" into an interpretable
269
- instrument: it tells the viewer what each weight and bias color actually
270
- means numerically.
256
+ Draws the architecture label block above the legend frame.
271
257
 
272
258
  Parameters:
273
259
  - `context` - - Render context.
274
- - `architectureLabel` - - Compact architecture description.
275
- - `colorScales` - - Connection and bias color scales.
260
+ - `legendSceneContext` - - Legend scene context.
276
261
 
277
262
  Returns: Nothing.
278
263
 
279
- ### resolveWeightedConnectionScene
264
+ ### drawLegendBiasRow
280
265
 
281
266
  ```ts
282
- resolveWeightedConnectionScene(
283
- runtimeConnection: VisualNetworkConnectionLike,
284
- positionByNodeIndex: Map<number, PositionedNetworkNodeLike>,
285
- connectionScale: DynamicColorScale,
286
- ): WeightedConnectionScene | undefined
267
+ drawLegendBiasRow(
268
+ context: CanvasRenderingContext2D,
269
+ legendSceneContext: LegendSceneContext,
270
+ biasLegendRow: ColorLegendRow,
271
+ biasRowTopPx: number,
272
+ ): void
287
273
  ```
288
274
 
289
- Resolves a renderable connection scene from runtime data and node positions.
275
+ Draws a single bias legend row.
290
276
 
291
277
  Parameters:
292
- - `runtimeConnection` - - Candidate runtime connection.
293
- - `positionByNodeIndex` - - Node layout map.
294
- - `connectionScale` - - Connection color scale.
278
+ - `context` - - Render context.
279
+ - `legendSceneContext` - - Legend scene context.
280
+ - `biasLegendRow` - - Legend row.
281
+ - `biasRowTopPx` - - Row top coordinate.
295
282
 
296
- Returns: Renderable connection scene, when both endpoint nodes exist.
283
+ Returns: Nothing.
297
284
 
298
- ### drawWeightedConnectionScene
285
+ ### drawLegendBiasSection
299
286
 
300
287
  ```ts
301
- drawWeightedConnectionScene(
288
+ drawLegendBiasSection(
302
289
  context: CanvasRenderingContext2D,
303
- weightedConnectionScene: WeightedConnectionScene,
290
+ legendSceneContext: LegendSceneContext,
304
291
  ): void
305
292
  ```
306
293
 
307
- Draws a previously resolved weighted connection scene.
294
+ Draws the bias legend section.
308
295
 
309
296
  Parameters:
310
297
  - `context` - - Render context.
311
- - `weightedConnectionScene` - - Render-ready connection scene.
298
+ - `legendSceneContext` - - Legend scene context.
312
299
 
313
300
  Returns: Nothing.
314
301
 
315
- ### resolveBiasNodeScene
302
+ ### drawLegendConnectionRow
316
303
 
317
304
  ```ts
318
- resolveBiasNodeScene(
305
+ drawLegendConnectionRow(
319
306
  context: CanvasRenderingContext2D,
320
- positionedNode: PositionedNetworkNodeLike,
321
- nodeDimensions: NetworkNodeDimensionsLike,
322
- halfNodeWidthPx: number,
323
- biasScale: DynamicColorScale,
324
- ): BiasNodeScene
307
+ legendSceneContext: LegendSceneContext,
308
+ connectionLegendRow: ColorLegendRow,
309
+ connectionRowTopPx: number,
310
+ ): void
325
311
  ```
326
312
 
327
- Resolves all paint attributes needed to render a single node.
313
+ Draws a single connection legend row.
328
314
 
329
315
  Parameters:
330
316
  - `context` - - Render context.
331
- - `positionedNode` - - Positioned node payload.
332
- - `nodeDimensions` - - Shared node dimensions.
333
- - `halfNodeWidthPx` - - Cached half node width.
334
- - `biasScale` - - Bias color scale.
317
+ - `legendSceneContext` - - Legend scene context.
318
+ - `connectionLegendRow` - - Legend row.
319
+ - `connectionRowTopPx` - - Row top coordinate.
335
320
 
336
- Returns: Paint-ready node scene.
321
+ Returns: Nothing.
337
322
 
338
- ### resolveBiasNodePaintStyle
323
+ ### drawLegendConnectionSection
339
324
 
340
325
  ```ts
341
- resolveBiasNodePaintStyle(
342
- positionedNode: PositionedNetworkNodeLike,
343
- biasScale: DynamicColorScale,
344
- ): BiasNodePaintStyle
326
+ drawLegendConnectionSection(
327
+ context: CanvasRenderingContext2D,
328
+ legendSceneContext: LegendSceneContext,
329
+ ): void
345
330
  ```
346
331
 
347
- Resolves node fill, stroke, and glow styling.
332
+ Draws the connection-weight legend section.
348
333
 
349
334
  Parameters:
350
- - `positionedNode` - - Positioned node payload.
351
- - `biasScale` - - Bias color scale.
335
+ - `context` - - Render context.
336
+ - `legendSceneContext` - - Legend scene context.
352
337
 
353
- Returns: Node paint style.
338
+ Returns: Nothing.
354
339
 
355
- ### resolveBiasNodeLabelMetrics
340
+ ### drawLegendFrame
356
341
 
357
342
  ```ts
358
- resolveBiasNodeLabelMetrics(
343
+ drawLegendFrame(
359
344
  context: CanvasRenderingContext2D,
360
- nodeLabel: string,
361
- nodeDimensions: NetworkNodeDimensionsLike,
362
- ): BiasNodeLabelMetrics
345
+ legendSceneContext: LegendSceneContext,
346
+ ): void
363
347
  ```
364
348
 
365
- Measures a bias label and resolves its font declaration.
349
+ Draws the legend container frame.
366
350
 
367
351
  Parameters:
368
352
  - `context` - - Render context.
369
- - `nodeLabel` - - Bias label string.
370
- - `nodeDimensions` - - Shared node dimensions.
353
+ - `legendSceneContext` - - Legend scene context.
371
354
 
372
- Returns: Measured label metrics.
355
+ Returns: Nothing.
373
356
 
374
- ### resolveBiasNodeHeightPx
357
+ ### drawLegendHeader
375
358
 
376
359
  ```ts
377
- resolveBiasNodeHeightPx(
378
- nodeDimensions: NetworkNodeDimensionsLike,
379
- biasNodeLabelMetrics: BiasNodeLabelMetrics,
380
- isOutputNode: boolean,
381
- ): number
360
+ drawLegendHeader(
361
+ context: CanvasRenderingContext2D,
362
+ legendSceneContext: LegendSceneContext,
363
+ ): void
382
364
  ```
383
365
 
384
- Resolves node rectangle height from label metrics and node role.
366
+ Draws the legend title row.
385
367
 
386
368
  Parameters:
387
- - `nodeDimensions` - - Shared node dimensions.
388
- - `biasNodeLabelMetrics` - - Measured label metrics.
389
- - `isOutputNode` - - Whether the node is an output node.
369
+ - `context` - - Render context.
370
+ - `legendSceneContext` - - Legend scene context.
390
371
 
391
- Returns: Render height for the node rectangle.
372
+ Returns: Nothing.
392
373
 
393
- ### drawBiasNodeScene
374
+ ### drawNetworkColorLegend
394
375
 
395
376
  ```ts
396
- drawBiasNodeScene(
377
+ drawNetworkColorLegend(
397
378
  context: CanvasRenderingContext2D,
398
- biasNodeScene: BiasNodeScene,
399
- nodeWidthPx: number,
379
+ architectureLabel: string,
380
+ colorScales: NetworkVisualizationColorScales,
400
381
  ): void
401
382
  ```
402
383
 
403
- Draws a resolved node rectangle and optional bias label.
384
+ Draws the color legend for connections and node bias values.
385
+
386
+ This legend is what turns the panel from "colorful art" into an interpretable
387
+ instrument: it tells the viewer what each weight and bias color actually
388
+ means numerically.
404
389
 
405
390
  Parameters:
406
391
  - `context` - - Render context.
407
- - `biasNodeScene` - - Paint-ready node scene.
408
- - `nodeWidthPx` - - Shared node width.
392
+ - `architectureLabel` - - Compact architecture description.
393
+ - `colorScales` - - Connection and bias color scales.
409
394
 
410
395
  Returns: Nothing.
411
396
 
412
- ### shouldHideNetworkColorLegend
397
+ ### drawNetworkVisualizationHeader
413
398
 
414
399
  ```ts
415
- shouldHideNetworkColorLegend(
400
+ drawNetworkVisualizationHeader(
416
401
  context: CanvasRenderingContext2D,
417
- ): boolean
402
+ architectureLabel: string,
403
+ ): void
418
404
  ```
419
405
 
420
- Determines whether the responsive viewport intentionally hides the overlay legend.
406
+ Draws network architecture header text.
407
+
408
+ The header gives viewers a compact architecture summary before they inspect
409
+ individual nodes and edges.
421
410
 
422
411
  Parameters:
423
412
  - `context` - - Render context.
413
+ - `architectureLabel` - - Header label.
424
414
 
425
- Returns: True when the legend should be omitted.
415
+ Returns: Nothing.
426
416
 
427
- ### resolveLegendSceneContext
417
+ ### drawSquareDottedConnection
428
418
 
429
419
  ```ts
430
- resolveLegendSceneContext(
420
+ drawSquareDottedConnection(
431
421
  context: CanvasRenderingContext2D,
432
- architectureLabel: string,
433
- colorScales: NetworkVisualizationColorScales,
434
- ): LegendSceneContext
422
+ input: { fromXPx: number; fromYPx: number; toXPx: number; toYPx: number; color: string; lineWidthPx: number; },
423
+ ): void
435
424
  ```
436
425
 
437
- Resolves the legend rows, layout, and architecture label bounds.
426
+ Draws a square-dotted connection stroke for negative weights.
438
427
 
439
428
  Parameters:
440
429
  - `context` - - Render context.
441
- - `architectureLabel` - - Multiline architecture label.
442
- - `colorScales` - - Connection and bias color scales.
430
+ - `input` - - Dotted-stroke endpoints and style.
443
431
 
444
- Returns: Legend scene context.
432
+ Returns: Nothing.
445
433
 
446
- ### drawLegendArchitectureLabel
434
+ ### drawWeightedConnectionScene
447
435
 
448
436
  ```ts
449
- drawLegendArchitectureLabel(
437
+ drawWeightedConnectionScene(
450
438
  context: CanvasRenderingContext2D,
451
- legendSceneContext: LegendSceneContext,
439
+ weightedConnectionScene: WeightedConnectionScene,
452
440
  ): void
453
441
  ```
454
442
 
455
- Draws the architecture label block above the legend frame.
443
+ Draws a previously resolved weighted connection scene.
456
444
 
457
445
  Parameters:
458
446
  - `context` - - Render context.
459
- - `legendSceneContext` - - Legend scene context.
447
+ - `weightedConnectionScene` - - Render-ready connection scene.
460
448
 
461
449
  Returns: Nothing.
462
450
 
463
- ### drawLegendFrame
451
+ ### drawWeightedConnectionsLayer
464
452
 
465
453
  ```ts
466
- drawLegendFrame(
454
+ drawWeightedConnectionsLayer(
467
455
  context: CanvasRenderingContext2D,
468
- legendSceneContext: LegendSceneContext,
456
+ runtimeConnections: VisualNetworkConnectionLike[],
457
+ positionByNodeIndex: Map<number, PositionedNetworkNodeLike>,
458
+ connectionScale: DynamicColorScale,
469
459
  ): void
470
460
  ```
471
461
 
472
- Draws the legend container frame.
462
+ Draws weighted connection lines.
463
+
464
+ Connection styling carries semantic meaning: color encodes magnitude and sign,
465
+ while dash patterns and auxiliary marks help distinguish disabled or negative
466
+ edges in a way that still reads quickly on a dense graph.
473
467
 
474
468
  Parameters:
475
469
  - `context` - - Render context.
476
- - `legendSceneContext` - - Legend scene context.
470
+ - `runtimeConnections` - - Runtime connection list.
471
+ - `positionByNodeIndex` - - Node layout map.
472
+ - `connectionScale` - - Dynamic connection color scale.
477
473
 
478
474
  Returns: Nothing.
479
475
 
480
- ### drawLegendHeader
476
+ ### resolveBiasNodeHeightPx
481
477
 
482
478
  ```ts
483
- drawLegendHeader(
484
- context: CanvasRenderingContext2D,
485
- legendSceneContext: LegendSceneContext,
486
- ): void
479
+ resolveBiasNodeHeightPx(
480
+ nodeDimensions: NetworkNodeDimensionsLike,
481
+ biasNodeLabelMetrics: BiasNodeLabelMetrics,
482
+ isOutputNode: boolean,
483
+ ): number
487
484
  ```
488
485
 
489
- Draws the legend title row.
486
+ Resolves node rectangle height from label metrics and node role.
490
487
 
491
488
  Parameters:
492
- - `context` - - Render context.
493
- - `legendSceneContext` - - Legend scene context.
489
+ - `nodeDimensions` - - Shared node dimensions.
490
+ - `biasNodeLabelMetrics` - - Measured label metrics.
491
+ - `isOutputNode` - - Whether the node is an output node.
494
492
 
495
- Returns: Nothing.
493
+ Returns: Render height for the node rectangle.
496
494
 
497
- ### drawLegendConnectionSection
495
+ ### resolveBiasNodeLabelMetrics
498
496
 
499
497
  ```ts
500
- drawLegendConnectionSection(
498
+ resolveBiasNodeLabelMetrics(
501
499
  context: CanvasRenderingContext2D,
502
- legendSceneContext: LegendSceneContext,
503
- ): void
500
+ nodeLabel: string,
501
+ nodeDimensions: NetworkNodeDimensionsLike,
502
+ ): BiasNodeLabelMetrics
504
503
  ```
505
504
 
506
- Draws the connection-weight legend section.
505
+ Measures a bias label and resolves its font declaration.
507
506
 
508
507
  Parameters:
509
508
  - `context` - - Render context.
510
- - `legendSceneContext` - - Legend scene context.
509
+ - `nodeLabel` - - Bias label string.
510
+ - `nodeDimensions` - - Shared node dimensions.
511
511
 
512
- Returns: Nothing.
512
+ Returns: Measured label metrics.
513
513
 
514
- ### drawLegendConnectionRow
514
+ ### resolveBiasNodePaintStyle
515
515
 
516
516
  ```ts
517
- drawLegendConnectionRow(
518
- context: CanvasRenderingContext2D,
519
- legendSceneContext: LegendSceneContext,
520
- connectionLegendRow: ColorLegendRow,
521
- connectionRowTopPx: number,
522
- ): void
517
+ resolveBiasNodePaintStyle(
518
+ positionedNode: PositionedNetworkNodeLike,
519
+ biasScale: DynamicColorScale,
520
+ ): BiasNodePaintStyle
523
521
  ```
524
522
 
525
- Draws a single connection legend row.
523
+ Resolves node fill, stroke, and glow styling.
526
524
 
527
525
  Parameters:
528
- - `context` - - Render context.
529
- - `legendSceneContext` - - Legend scene context.
530
- - `connectionLegendRow` - - Legend row.
531
- - `connectionRowTopPx` - - Row top coordinate.
526
+ - `positionedNode` - - Positioned node payload.
527
+ - `biasScale` - - Bias color scale.
532
528
 
533
- Returns: Nothing.
529
+ Returns: Node paint style.
534
530
 
535
- ### drawLegendBiasSection
531
+ ### resolveBiasNodeScene
536
532
 
537
533
  ```ts
538
- drawLegendBiasSection(
534
+ resolveBiasNodeScene(
539
535
  context: CanvasRenderingContext2D,
540
- legendSceneContext: LegendSceneContext,
541
- ): void
536
+ positionedNode: PositionedNetworkNodeLike,
537
+ nodeDimensions: NetworkNodeDimensionsLike,
538
+ halfNodeWidthPx: number,
539
+ biasScale: DynamicColorScale,
540
+ ): BiasNodeScene
542
541
  ```
543
542
 
544
- Draws the bias legend section.
543
+ Resolves all paint attributes needed to render a single node.
545
544
 
546
545
  Parameters:
547
546
  - `context` - - Render context.
548
- - `legendSceneContext` - - Legend scene context.
547
+ - `positionedNode` - - Positioned node payload.
548
+ - `nodeDimensions` - - Shared node dimensions.
549
+ - `halfNodeWidthPx` - - Cached half node width.
550
+ - `biasScale` - - Bias color scale.
549
551
 
550
- Returns: Nothing.
552
+ Returns: Paint-ready node scene.
551
553
 
552
- ### drawLegendBiasRow
554
+ ### resolveLegendSceneContext
553
555
 
554
556
  ```ts
555
- drawLegendBiasRow(
557
+ resolveLegendSceneContext(
556
558
  context: CanvasRenderingContext2D,
557
- legendSceneContext: LegendSceneContext,
558
- biasLegendRow: ColorLegendRow,
559
- biasRowTopPx: number,
560
- ): void
559
+ architectureLabel: string,
560
+ colorScales: NetworkVisualizationColorScales,
561
+ ): LegendSceneContext
561
562
  ```
562
563
 
563
- Draws a single bias legend row.
564
+ Resolves the legend rows, layout, and architecture label bounds.
564
565
 
565
566
  Parameters:
566
567
  - `context` - - Render context.
567
- - `legendSceneContext` - - Legend scene context.
568
- - `biasLegendRow` - - Legend row.
569
- - `biasRowTopPx` - - Row top coordinate.
568
+ - `architectureLabel` - - Multiline architecture label.
569
+ - `colorScales` - - Connection and bias color scales.
570
570
 
571
- Returns: Nothing.
571
+ Returns: Legend scene context.
572
572
 
573
- ### drawLeftAlignedTextRows
573
+ ### resolveWeightedConnectionScene
574
574
 
575
575
  ```ts
576
- drawLeftAlignedTextRows(
577
- context: CanvasRenderingContext2D,
578
- request: { lines: string[]; leftPx: number; topPx: number; lineHeightPx: number; font: string; fillStyle: string; },
579
- ): void
576
+ resolveWeightedConnectionScene(
577
+ runtimeConnection: VisualNetworkConnectionLike,
578
+ positionByNodeIndex: Map<number, PositionedNetworkNodeLike>,
579
+ connectionScale: DynamicColorScale,
580
+ ): WeightedConnectionScene | undefined
580
581
  ```
581
582
 
582
- Draws multiline text rows aligned to a fixed left edge.
583
+ Resolves a renderable connection scene from runtime data and node positions.
583
584
 
584
585
  Parameters:
585
- - `context` - - Render context.
586
- - `request` - - Multiline text draw request.
586
+ - `runtimeConnection` - - Candidate runtime connection.
587
+ - `positionByNodeIndex` - - Node layout map.
588
+ - `connectionScale` - - Connection color scale.
587
589
 
588
- Returns: Nothing.
590
+ Returns: Renderable connection scene, when both endpoint nodes exist.
589
591
 
590
- ### drawSquareDottedConnection
592
+ ### shouldHideNetworkColorLegend
591
593
 
592
594
  ```ts
593
- drawSquareDottedConnection(
595
+ shouldHideNetworkColorLegend(
594
596
  context: CanvasRenderingContext2D,
595
- input: { fromXPx: number; fromYPx: number; toXPx: number; toYPx: number; color: string; lineWidthPx: number; },
596
- ): void
597
+ ): boolean
597
598
  ```
598
599
 
599
- Draws a square-dotted connection stroke for negative weights.
600
+ Determines whether the responsive viewport intentionally hides the overlay legend.
600
601
 
601
602
  Parameters:
602
603
  - `context` - - Render context.
603
- - `input` - - Dotted-stroke endpoints and style.
604
604
 
605
- Returns: Nothing.
605
+ Returns: True when the legend should be omitted.
606
606
 
607
607
  ## browser-entry/visualization/visualization.legend.utils.ts
608
608
 
@@ -632,49 +632,49 @@ Parameters:
632
632
 
633
633
  Returns: Legend rows.
634
634
 
635
- ### resolveNetworkLegendLayout
635
+ ### resolveDefaultNetworkLegendLayout
636
636
 
637
637
  ```ts
638
- resolveNetworkLegendLayout(
638
+ resolveDefaultNetworkLegendLayout(
639
639
  context: CanvasRenderingContext2D,
640
- connectionLegendRows: ColorLegendRow[],
641
- biasLegendRows: ColorLegendRow[],
640
+ network: default | undefined,
642
641
  ): NetworkLegendLayout
643
642
  ```
644
643
 
645
- Resolves network legend layout from canvas constraints.
644
+ Resolves default legend layout from internal tier definitions.
646
645
 
647
- The legend layout adapts between regular and compact modes so the network
648
- panel can stay informative on smaller viewports without swallowing the whole
649
- canvas.
646
+ This convenience helper is used when the caller wants a layout driven by the
647
+ currently active network and does not need to assemble the intermediate rows
648
+ manually.
650
649
 
651
650
  Parameters:
652
651
  - `context` - - Render context.
653
- - `connectionLegendRows` - - Connection legend rows.
654
- - `biasLegendRows` - - Bias legend rows.
652
+ - `network` - - Active network instance.
655
653
 
656
- Returns: Computed legend layout.
654
+ Returns: Legend layout.
657
655
 
658
- ### resolveDefaultNetworkLegendLayout
656
+ ### resolveNetworkLegendLayout
659
657
 
660
658
  ```ts
661
- resolveDefaultNetworkLegendLayout(
659
+ resolveNetworkLegendLayout(
662
660
  context: CanvasRenderingContext2D,
663
- network: default | undefined,
661
+ connectionLegendRows: ColorLegendRow[],
662
+ biasLegendRows: ColorLegendRow[],
664
663
  ): NetworkLegendLayout
665
664
  ```
666
665
 
667
- Resolves default legend layout from internal tier definitions.
666
+ Resolves network legend layout from canvas constraints.
668
667
 
669
- This convenience helper is used when the caller wants a layout driven by the
670
- currently active network and does not need to assemble the intermediate rows
671
- manually.
668
+ The legend layout adapts between regular and compact modes so the network
669
+ panel can stay informative on smaller viewports without swallowing the whole
670
+ canvas.
672
671
 
673
672
  Parameters:
674
673
  - `context` - - Render context.
675
- - `network` - - Active network instance.
674
+ - `connectionLegendRows` - - Connection legend rows.
675
+ - `biasLegendRows` - - Bias legend rows.
676
676
 
677
- Returns: Legend layout.
677
+ Returns: Computed legend layout.
678
678
 
679
679
  ## browser-entry/visualization/visualization.colors.utils.ts
680
680
 
@@ -704,27 +704,23 @@ Parameters:
704
704
 
705
705
  Returns: Ordered tier list.
706
706
 
707
- ### resolveTierColor
707
+ ### resolveBiasRangeColor
708
708
 
709
709
  ```ts
710
- resolveTierColor(
711
- value: number,
712
- tiers: ColorTier[],
713
- aboveTierColor: string,
710
+ resolveBiasRangeColor(
711
+ nodeBias: number,
714
712
  ): string
715
713
  ```
716
714
 
717
- Resolves a color from ordered tier definitions.
715
+ Resolves bias color for a raw node bias.
718
716
 
719
- This is the final classification step that maps one numeric weight or bias to
720
- the swatch color the renderer should paint.
717
+ Bias colors follow the same diverging logic as connection colors so the legend
718
+ remains conceptually consistent across channels.
721
719
 
722
720
  Parameters:
723
- - `value` - - Numeric value to classify.
724
- - `tiers` - - Ordered tier list.
725
- - `aboveTierColor` - - Fallback color for values above the last tier.
721
+ - `nodeBias` - - Node bias.
726
722
 
727
- Returns: Resolved color string.
723
+ Returns: Tier color.
728
724
 
729
725
  ### resolveConnectionRangeColor
730
726
 
@@ -744,24 +740,6 @@ Parameters:
744
740
 
745
741
  Returns: Tier color.
746
742
 
747
- ### resolveBiasRangeColor
748
-
749
- ```ts
750
- resolveBiasRangeColor(
751
- nodeBias: number,
752
- ): string
753
- ```
754
-
755
- Resolves bias color for a raw node bias.
756
-
757
- Bias colors follow the same diverging logic as connection colors so the legend
758
- remains conceptually consistent across channels.
759
-
760
- Parameters:
761
- - `nodeBias` - - Node bias.
762
-
763
- Returns: Tier color.
764
-
765
743
  ### resolveNetworkVisualizationColorScales
766
744
 
767
745
  ```ts
@@ -781,6 +759,28 @@ Parameters:
781
759
 
782
760
  Returns: Dynamic scales used by graph drawing and legend rows.
783
761
 
762
+ ### resolveTierColor
763
+
764
+ ```ts
765
+ resolveTierColor(
766
+ value: number,
767
+ tiers: ColorTier[],
768
+ aboveTierColor: string,
769
+ ): string
770
+ ```
771
+
772
+ Resolves a color from ordered tier definitions.
773
+
774
+ This is the final classification step that maps one numeric weight or bias to
775
+ the swatch color the renderer should paint.
776
+
777
+ Parameters:
778
+ - `value` - - Numeric value to classify.
779
+ - `tiers` - - Ordered tier list.
780
+ - `aboveTierColor` - - Fallback color for values above the last tier.
781
+
782
+ Returns: Resolved color string.
783
+
784
784
  ## browser-entry/visualization/visualization.topology.utils.ts
785
785
 
786
786
  Shared topology formatting helpers used by network-view and visualization.