@mechane-ai/elements 0.46.0 → 0.48.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 (419) hide show
  1. package/README.md +590 -34
  2. package/bin/mechane-elements-catalog.mjs +104 -12
  3. package/dist/ai.js +4 -4
  4. package/dist/article-BXZr10QQ.js +1904 -0
  5. package/dist/article.js +1 -0
  6. package/dist/catalog.json +3696 -33
  7. package/dist/categorical-values-BpVq8cFj.js +107 -0
  8. package/dist/cells-xVmnQ9oQ.js +384 -0
  9. package/dist/chart-link-AE_xuxiP.js +35 -0
  10. package/dist/chart-tones-ei3BC2AL.js +27 -0
  11. package/dist/charts/cartesian.js +1 -2958
  12. package/dist/charts/cells.js +1 -0
  13. package/dist/charts/comparison.js +1 -0
  14. package/dist/charts/distribution.js +1 -781
  15. package/dist/charts/figure.js +3404 -0
  16. package/dist/charts/graph.js +1 -655
  17. package/dist/charts/hierarchy.js +1 -121
  18. package/dist/charts/image.js +1 -0
  19. package/dist/charts/matrix.js +4 -644
  20. package/dist/charts/plot.js +15 -0
  21. package/dist/charts/relationship.js +1 -0
  22. package/dist/charts/text.js +1 -0
  23. package/dist/charts/timeline.js +1 -266
  24. package/dist/charts/transforms.js +677 -0
  25. package/dist/charts/trend.js +1 -0
  26. package/dist/charts.js +8 -3
  27. package/dist/clock-DSm5lkNE.js +16 -0
  28. package/dist/collections.js +1 -2195
  29. package/dist/color-legend-CIo7DhXB.js +62 -0
  30. package/dist/dates-Cww8UR_n.js +810 -0
  31. package/dist/describe-lesson-BmREzDpt.js +175 -0
  32. package/dist/dumbbell-plot-DQdTxDeO.js +509 -0
  33. package/dist/embedding-map-CF-J-8JW.js +1929 -0
  34. package/dist/feedback.js +1 -1
  35. package/dist/figure-format-B8kRZMlo.js +36 -0
  36. package/dist/figure-frame-BJ3REgTA.js +270 -0
  37. package/dist/forms/dates.js +1 -810
  38. package/dist/forms.js +1 -1
  39. package/dist/heatmap-scale-Zte6Ya-g.js +20 -0
  40. package/dist/image-grid-Dl2sjIMB.js +598 -0
  41. package/dist/kits/evaluation.js +431 -0
  42. package/dist/kits/interpretability.js +1033 -0
  43. package/dist/kits/operations.js +239 -0
  44. package/dist/kits/training.js +335 -0
  45. package/dist/label-place-Z0fryBZb.js +42 -0
  46. package/dist/lesson/agent.js +811 -0
  47. package/dist/lesson/spec.js +661 -0
  48. package/dist/lesson.js +5 -0
  49. package/dist/locate-Bcg3QcP4.js +11 -0
  50. package/dist/mdx.js +227 -0
  51. package/dist/packages/charts/src/cartesian/bar-chart.d.ts +40 -21
  52. package/dist/packages/charts/src/cartesian/bar-data.d.ts +15 -4
  53. package/dist/packages/charts/src/cartesian/bar-overlays.d.ts +7 -3
  54. package/dist/packages/charts/src/cartesian/breakdown-bar.d.ts +10 -8
  55. package/dist/packages/charts/src/cartesian/bridge-chart.d.ts +20 -16
  56. package/dist/packages/charts/src/cartesian/bridge-data.d.ts +5 -4
  57. package/dist/packages/charts/src/cartesian/composition-bars.d.ts +8 -4
  58. package/dist/packages/charts/src/cartesian/index.d.ts +5 -5
  59. package/dist/packages/charts/src/cartesian/reference-lines.d.ts +25 -18
  60. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +30 -25
  61. package/dist/packages/charts/src/cartesian/sparkline.d.ts +14 -2
  62. package/dist/packages/charts/src/cartesian/time-series-bands.d.ts +3 -2
  63. package/dist/packages/charts/src/cartesian/time-series-data.d.ts +12 -2
  64. package/dist/packages/charts/src/cartesian/time-series-line.d.ts +2 -2
  65. package/dist/packages/charts/src/cartesian/time-series-overlays.d.ts +6 -4
  66. package/dist/packages/charts/src/cartesian/time-series.d.ts +60 -36
  67. package/dist/packages/charts/src/cartesian/value-labels.d.ts +22 -0
  68. package/dist/packages/charts/src/categorical-values.d.ts +1 -1
  69. package/dist/packages/charts/src/cells/bar-cell.d.ts +13 -0
  70. package/dist/packages/charts/src/cells/cell-layout.d.ts +81 -0
  71. package/dist/packages/charts/src/cells/change-cell.d.ts +17 -0
  72. package/dist/packages/charts/src/cells/heat-cell.d.ts +19 -0
  73. package/dist/packages/charts/src/cells/index.d.ts +11 -0
  74. package/dist/packages/charts/src/cells/interval-cell.d.ts +16 -0
  75. package/dist/packages/charts/src/cells/spark-cell.d.ts +22 -0
  76. package/dist/packages/charts/src/chart-frame.d.ts +14 -7
  77. package/dist/packages/charts/src/chart-grid.d.ts +19 -0
  78. package/dist/packages/charts/src/chart-input.d.ts +1 -9
  79. package/dist/packages/charts/src/chart-link.d.ts +56 -0
  80. package/dist/packages/charts/src/chart.d.ts +0 -8
  81. package/dist/packages/charts/src/comparison/bullet-bar.d.ts +34 -0
  82. package/dist/packages/charts/src/comparison/comparison-plot.d.ts +54 -0
  83. package/dist/packages/charts/src/comparison/dot-plot.d.ts +41 -0
  84. package/dist/packages/charts/src/comparison/dumbbell-plot.d.ts +33 -0
  85. package/dist/packages/charts/src/comparison/index.d.ts +6 -0
  86. package/dist/packages/charts/src/distribution/box-plot.d.ts +40 -0
  87. package/dist/packages/charts/src/distribution/distribution-input.d.ts +5 -3
  88. package/dist/packages/charts/src/distribution/distribution-plot.d.ts +28 -161
  89. package/dist/packages/charts/src/distribution/ecdf.d.ts +16 -15
  90. package/dist/packages/charts/src/distribution/group-plot-input.d.ts +35 -0
  91. package/dist/packages/charts/src/distribution/group-plot-layout.d.ts +79 -0
  92. package/dist/packages/charts/src/distribution/group-plot.d.ts +73 -0
  93. package/dist/packages/charts/src/distribution/histogram.d.ts +16 -16
  94. package/dist/packages/charts/src/distribution/index.d.ts +11 -0
  95. package/dist/packages/charts/src/distribution/interval-plot.d.ts +16 -13
  96. package/dist/packages/charts/src/distribution/ranked-bars.d.ts +17 -14
  97. package/dist/packages/charts/src/distribution/ridgeline.d.ts +34 -0
  98. package/dist/packages/charts/src/distribution/strip-plot.d.ts +37 -0
  99. package/dist/packages/charts/src/distribution/violin-plot.d.ts +34 -0
  100. package/dist/packages/charts/src/figure/figure-format.d.ts +34 -0
  101. package/dist/packages/charts/src/figure/figure-frame.d.ts +47 -0
  102. package/dist/packages/charts/src/figure/figure-props.d.ts +54 -0
  103. package/dist/packages/charts/src/figure/tone-scope.d.ts +32 -0
  104. package/dist/packages/charts/src/graph/attribution-graph.d.ts +62 -0
  105. package/dist/packages/charts/src/graph/attribution-layout.d.ts +88 -0
  106. package/dist/packages/charts/src/graph/flow-diagram.d.ts +14 -15
  107. package/dist/packages/charts/src/graph/flow-layout.d.ts +4 -2
  108. package/dist/packages/charts/src/graph/graph-canvas.d.ts +33 -0
  109. package/dist/packages/charts/src/graph/index.d.ts +6 -2
  110. package/dist/packages/charts/src/graph/relation-graph.d.ts +24 -13
  111. package/dist/packages/charts/src/graph/tree-diagram.d.ts +41 -0
  112. package/dist/packages/charts/src/graph/tree-layout.d.ts +71 -0
  113. package/dist/packages/charts/src/hierarchy/area-mark.d.ts +17 -0
  114. package/dist/packages/charts/src/hierarchy/icicle.d.ts +35 -0
  115. package/dist/packages/charts/src/hierarchy/index.d.ts +2 -0
  116. package/dist/packages/charts/src/hierarchy/partition-layout.d.ts +25 -0
  117. package/dist/packages/charts/src/hierarchy/treemap-layout.d.ts +26 -0
  118. package/dist/packages/charts/src/hierarchy/treemap.d.ts +11 -9
  119. package/dist/packages/charts/src/image/attribution-legend.d.ts +13 -0
  120. package/dist/packages/charts/src/image/attribution-overlay.d.ts +50 -0
  121. package/dist/packages/charts/src/image/attribution-ramp.d.ts +16 -0
  122. package/dist/packages/charts/src/image/image-atlas.d.ts +37 -0
  123. package/dist/packages/charts/src/image/image-fill.d.ts +9 -0
  124. package/dist/packages/charts/src/image/image-grid.d.ts +26 -0
  125. package/dist/packages/charts/src/image/image-input.d.ts +27 -0
  126. package/dist/packages/charts/src/image/image-tile.d.ts +27 -0
  127. package/dist/packages/charts/src/image/index.d.ts +7 -0
  128. package/dist/packages/charts/src/index.d.ts +15 -1
  129. package/dist/packages/charts/src/matrix/attention-matrix.d.ts +41 -0
  130. package/dist/packages/charts/src/matrix/calendar-heatmap.d.ts +37 -0
  131. package/dist/packages/charts/src/matrix/color-legend.d.ts +9 -2
  132. package/dist/packages/charts/src/matrix/confusion-matrix.d.ts +36 -0
  133. package/dist/packages/charts/src/matrix/correlation-matrix.d.ts +34 -0
  134. package/dist/packages/charts/src/matrix/heatmap-scale.d.ts +8 -2
  135. package/dist/packages/charts/src/matrix/index.d.ts +15 -3
  136. package/dist/packages/charts/src/matrix/matrix-cells.d.ts +27 -3
  137. package/dist/packages/charts/src/matrix/matrix-figure.d.ts +50 -0
  138. package/dist/packages/charts/src/matrix/matrix-mark.d.ts +34 -0
  139. package/dist/packages/charts/src/matrix/matrix-presets.d.ts +20 -0
  140. package/dist/packages/charts/src/matrix/matrix-range.d.ts +45 -0
  141. package/dist/packages/charts/src/matrix/matrix-strip.d.ts +13 -14
  142. package/dist/packages/charts/src/matrix/matrix-types.d.ts +40 -0
  143. package/dist/packages/charts/src/matrix/matrix.d.ts +13 -11
  144. package/dist/packages/charts/src/matrix/token-heatmap.d.ts +16 -10
  145. package/dist/packages/charts/src/plot/contours.d.ts +45 -0
  146. package/dist/packages/charts/src/plot/index.d.ts +49 -0
  147. package/dist/packages/charts/src/plot/label-place.d.ts +35 -0
  148. package/dist/packages/charts/src/plot/locate.d.ts +18 -0
  149. package/dist/packages/charts/src/plot/path.d.ts +39 -0
  150. package/dist/packages/charts/src/plot/plot-axes.d.ts +20 -0
  151. package/dist/packages/charts/src/plot/plot-layout.d.ts +221 -0
  152. package/dist/packages/charts/src/plot/plot-marks.d.ts +128 -0
  153. package/dist/packages/charts/src/plot/plot-surface.d.ts +32 -0
  154. package/dist/packages/charts/src/plot/render/density-layer.d.ts +17 -0
  155. package/dist/packages/charts/src/plot/render/hit-index.d.ts +37 -0
  156. package/dist/packages/charts/src/plot/render/plot-viewport.d.ts +39 -0
  157. package/dist/packages/charts/src/plot/render/point-layer.d.ts +41 -0
  158. package/dist/packages/charts/src/plot/render/theme-colors.d.ts +15 -0
  159. package/dist/packages/charts/src/plot/scale.d.ts +48 -0
  160. package/dist/packages/charts/src/plot/ticks.d.ts +34 -0
  161. package/dist/packages/charts/src/plot-width.d.ts +3 -2
  162. package/dist/packages/charts/src/relationship/contour-plot.d.ts +61 -0
  163. package/dist/packages/charts/src/relationship/density-map.d.ts +45 -0
  164. package/dist/packages/charts/src/relationship/embedding-map.d.ts +75 -0
  165. package/dist/packages/charts/src/relationship/index.d.ts +11 -0
  166. package/dist/packages/charts/src/relationship/level-legend.d.ts +11 -0
  167. package/dist/packages/charts/src/relationship/measures.d.ts +85 -0
  168. package/dist/packages/charts/src/relationship/parallel-coordinates.d.ts +30 -0
  169. package/dist/packages/charts/src/relationship/range-controls.d.ts +20 -0
  170. package/dist/packages/charts/src/relationship/scatter-matrix.d.ts +20 -0
  171. package/dist/packages/charts/src/spec/chart-guide.d.ts +21 -0
  172. package/dist/packages/charts/src/spec/figure-registry.d.ts +44 -0
  173. package/dist/packages/charts/src/spec/figure-spec.d.ts +147 -0
  174. package/dist/packages/charts/src/spec/figure-text.d.ts +8 -0
  175. package/dist/packages/charts/src/spec/figure.d.ts +12 -0
  176. package/dist/packages/charts/src/spec/guide-data.d.ts +85 -0
  177. package/dist/packages/charts/src/spec/index.d.ts +10 -0
  178. package/dist/packages/charts/src/spec/validate-figure.d.ts +15 -0
  179. package/dist/packages/charts/src/text/index.d.ts +11 -0
  180. package/dist/packages/charts/src/text/token-examples.d.ts +42 -0
  181. package/dist/packages/charts/src/text/token-grid.d.ts +47 -0
  182. package/dist/packages/charts/src/text/token-links.d.ts +49 -0
  183. package/dist/packages/charts/src/text/token-predictions.d.ts +38 -0
  184. package/dist/packages/charts/src/text/token-scale.d.ts +20 -0
  185. package/dist/packages/charts/src/text/token-text.d.ts +39 -0
  186. package/dist/packages/charts/src/timeline/event-strip.d.ts +70 -0
  187. package/dist/packages/charts/src/timeline/index.d.ts +3 -1
  188. package/dist/packages/charts/src/timeline/waterfall.d.ts +24 -13
  189. package/dist/packages/charts/src/transforms/bins.d.ts +91 -0
  190. package/dist/packages/charts/src/transforms/density.d.ts +53 -0
  191. package/dist/packages/charts/src/transforms/fits.d.ts +50 -0
  192. package/dist/packages/charts/src/transforms/index.d.ts +19 -0
  193. package/dist/packages/charts/src/transforms/matrices.d.ts +49 -0
  194. package/dist/packages/charts/src/transforms/quantiles.d.ts +96 -0
  195. package/dist/packages/charts/src/transforms/ranks.d.ts +44 -0
  196. package/dist/packages/charts/src/transforms/runs.d.ts +47 -0
  197. package/dist/packages/charts/src/transforms/sampling.d.ts +75 -0
  198. package/dist/packages/charts/src/transforms/smoothing.d.ts +41 -0
  199. package/dist/packages/charts/src/transforms/values.d.ts +70 -0
  200. package/dist/packages/charts/src/trend/bump-chart.d.ts +33 -0
  201. package/dist/packages/charts/src/trend/column-figure.d.ts +38 -0
  202. package/dist/packages/charts/src/trend/column-positions.d.ts +21 -0
  203. package/dist/packages/charts/src/trend/curve-chart.d.ts +69 -0
  204. package/dist/packages/charts/src/trend/end-labels.d.ts +40 -0
  205. package/dist/packages/charts/src/trend/horizon-chart.d.ts +37 -0
  206. package/dist/packages/charts/src/trend/index.d.ts +10 -0
  207. package/dist/packages/charts/src/trend/line-locate.d.ts +21 -0
  208. package/dist/packages/charts/src/trend/runs-chart.d.ts +50 -0
  209. package/dist/packages/charts/src/trend/slope-chart.d.ts +35 -0
  210. package/dist/packages/kits/src/evaluation/evaluation-data.d.ts +31 -0
  211. package/dist/packages/kits/src/evaluation/index.d.ts +8 -0
  212. package/dist/packages/kits/src/evaluation/leaderboard-cells.d.ts +62 -0
  213. package/dist/packages/kits/src/evaluation/leaderboard.d.ts +59 -0
  214. package/dist/packages/kits/src/evaluation/model-comparison.d.ts +59 -0
  215. package/dist/packages/kits/src/evaluation/score-breakdown.d.ts +33 -0
  216. package/dist/packages/kits/src/interpretability/attention-head-grid.d.ts +56 -0
  217. package/dist/packages/kits/src/interpretability/attribution-workbench.d.ts +29 -0
  218. package/dist/packages/kits/src/interpretability/embedding-atlas.d.ts +41 -0
  219. package/dist/packages/kits/src/interpretability/feature-card.d.ts +33 -0
  220. package/dist/packages/kits/src/interpretability/feature-list.d.ts +51 -0
  221. package/dist/packages/kits/src/interpretability/feature-logits.d.ts +23 -0
  222. package/dist/packages/kits/src/interpretability/features.d.ts +70 -0
  223. package/dist/packages/kits/src/interpretability/index.d.ts +16 -0
  224. package/dist/packages/kits/src/interpretability/kit-styles.d.ts +118 -0
  225. package/dist/packages/kits/src/interpretability/logit-lens.d.ts +50 -0
  226. package/dist/packages/kits/src/interpretability/node-panel.d.ts +32 -0
  227. package/dist/packages/kits/src/interpretability/shared-link.d.ts +8 -0
  228. package/dist/packages/kits/src/interpretability/steering-panel.d.ts +52 -0
  229. package/dist/packages/kits/src/operations/budget-board.d.ts +49 -0
  230. package/dist/packages/kits/src/operations/incident-timeline.d.ts +30 -0
  231. package/dist/packages/kits/src/operations/index.d.ts +6 -0
  232. package/dist/packages/kits/src/operations/service-health.d.ts +66 -0
  233. package/dist/packages/kits/src/training/index.d.ts +8 -0
  234. package/dist/packages/kits/src/training/run-dashboard.d.ts +49 -0
  235. package/dist/packages/kits/src/training/run-legend.d.ts +21 -0
  236. package/dist/packages/kits/src/training/run-marker.d.ts +5 -0
  237. package/dist/packages/kits/src/training/run-state.d.ts +7 -0
  238. package/dist/packages/kits/src/training/run-table.d.ts +63 -0
  239. package/dist/packages/kits/src/training/runs-overview.d.ts +20 -0
  240. package/dist/packages/kits/src/training/runs.d.ts +34 -0
  241. package/dist/packages/teaching/src/agent/index.d.ts +11 -0
  242. package/dist/packages/teaching/src/agent/learner-trace.d.ts +84 -0
  243. package/dist/packages/teaching/src/agent/lesson-bridge.d.ts +59 -0
  244. package/dist/packages/teaching/src/agent/lesson-tour.d.ts +63 -0
  245. package/dist/packages/teaching/src/agent/tutor-tools.d.ts +86 -0
  246. package/dist/packages/teaching/src/article/article-checks.d.ts +9 -0
  247. package/dist/packages/teaching/src/article/article-context.d.ts +49 -0
  248. package/dist/packages/teaching/src/article/article-error.d.ts +12 -0
  249. package/dist/packages/teaching/src/article/article-labels.d.ts +54 -0
  250. package/dist/packages/teaching/src/article/article-layout.stylex.d.ts +14 -0
  251. package/dist/packages/teaching/src/article/article-outline.d.ts +9 -0
  252. package/dist/packages/teaching/src/article/article.d.ts +42 -0
  253. package/dist/packages/teaching/src/article/beat-steps.d.ts +18 -0
  254. package/dist/packages/teaching/src/article/beat.d.ts +16 -0
  255. package/dist/packages/teaching/src/article/challenge.d.ts +29 -0
  256. package/dist/packages/teaching/src/article/exercise-styles.d.ts +76 -0
  257. package/dist/packages/teaching/src/article/figure.d.ts +51 -0
  258. package/dist/packages/teaching/src/article/index.d.ts +31 -0
  259. package/dist/packages/teaching/src/article/lesson-values.d.ts +5 -0
  260. package/dist/packages/teaching/src/article/linked-target.d.ts +22 -0
  261. package/dist/packages/teaching/src/article/notes.d.ts +36 -0
  262. package/dist/packages/teaching/src/article/outline-types.d.ts +73 -0
  263. package/dist/packages/teaching/src/article/predict.d.ts +58 -0
  264. package/dist/packages/teaching/src/article/progress-store.d.ts +64 -0
  265. package/dist/packages/teaching/src/article/scrolly.d.ts +26 -0
  266. package/dist/packages/teaching/src/article/term.d.ts +35 -0
  267. package/dist/packages/teaching/src/article/tex.d.ts +12 -0
  268. package/dist/packages/teaching/src/article/view-essay.d.ts +13 -0
  269. package/dist/packages/teaching/src/article/view-present.d.ts +8 -0
  270. package/dist/packages/teaching/src/article/view-sheet.d.ts +7 -0
  271. package/dist/packages/teaching/src/article/view-static.d.ts +7 -0
  272. package/dist/packages/teaching/src/article/walk.d.ts +34 -0
  273. package/dist/packages/teaching/src/lesson/bound-value.d.ts +29 -0
  274. package/dist/packages/teaching/src/lesson/define-lesson.d.ts +136 -0
  275. package/dist/packages/teaching/src/lesson/index.d.ts +24 -0
  276. package/dist/packages/teaching/src/lesson/inline-choice.d.ts +12 -0
  277. package/dist/packages/teaching/src/lesson/lesson-context.d.ts +18 -0
  278. package/dist/packages/teaching/src/lesson/lesson-error.d.ts +12 -0
  279. package/dist/packages/teaching/src/lesson/lesson-locale.d.ts +4 -0
  280. package/dist/packages/teaching/src/lesson/lesson-persistence.d.ts +17 -0
  281. package/dist/packages/teaching/src/lesson/lesson-player.d.ts +51 -0
  282. package/dist/packages/teaching/src/lesson/lesson-store.d.ts +84 -0
  283. package/dist/packages/teaching/src/lesson/lesson.d.ts +39 -0
  284. package/dist/packages/teaching/src/lesson/param-controls.d.ts +14 -0
  285. package/dist/packages/teaching/src/lesson/param.d.ts +34 -0
  286. package/dist/packages/teaching/src/lesson/playback.d.ts +42 -0
  287. package/dist/packages/teaching/src/lesson/transport.d.ts +19 -0
  288. package/dist/packages/teaching/src/lesson/use-lesson.d.ts +36 -0
  289. package/dist/packages/teaching/src/mdx/essay-components.d.ts +79 -0
  290. package/dist/packages/teaching/src/mdx/essay-markdown.d.ts +41 -0
  291. package/dist/packages/teaching/src/mdx/essay.d.ts +32 -0
  292. package/dist/packages/teaching/src/mdx/index.d.ts +9 -0
  293. package/dist/packages/teaching/src/mdx/requested-view.d.ts +6 -0
  294. package/dist/packages/teaching/src/scene/flow/flow-layout.d.ts +38 -0
  295. package/dist/packages/teaching/src/scene/flow/flow-pulse.d.ts +16 -0
  296. package/dist/packages/teaching/src/scene/flow/scene-flow.d.ts +81 -0
  297. package/dist/packages/teaching/src/scene/index.d.ts +77 -0
  298. package/dist/packages/teaching/src/scene/morph/morph-scope.d.ts +28 -0
  299. package/dist/packages/teaching/src/scene/plane/plane-hit.d.ts +22 -0
  300. package/dist/packages/teaching/src/scene/plane/plane-label.d.ts +23 -0
  301. package/dist/packages/teaching/src/scene/plane/plane-labels.d.ts +42 -0
  302. package/dist/packages/teaching/src/scene/plane/plane-math.d.ts +45 -0
  303. package/dist/packages/teaching/src/scene/plane/scene-axes.d.ts +30 -0
  304. package/dist/packages/teaching/src/scene/plane/scene-curve.d.ts +42 -0
  305. package/dist/packages/teaching/src/scene/plane/scene-point.d.ts +59 -0
  306. package/dist/packages/teaching/src/scene/plane/scene-projection.d.ts +27 -0
  307. package/dist/packages/teaching/src/scene/plane/scene-region.d.ts +38 -0
  308. package/dist/packages/teaching/src/scene/plane/scene-rule.d.ts +35 -0
  309. package/dist/packages/teaching/src/scene/plane/scene-vector.d.ts +39 -0
  310. package/dist/packages/teaching/src/scene/scene-bracket.d.ts +24 -0
  311. package/dist/packages/teaching/src/scene/scene-callout.d.ts +26 -0
  312. package/dist/packages/teaching/src/scene/scene-context.d.ts +179 -0
  313. package/dist/packages/teaching/src/scene/scene-custom.d.ts +31 -0
  314. package/dist/packages/teaching/src/scene/scene-geometry.d.ts +181 -0
  315. package/dist/packages/teaching/src/scene/scene-group.d.ts +28 -0
  316. package/dist/packages/teaching/src/scene/scene-highlight.d.ts +19 -0
  317. package/dist/packages/teaching/src/scene/scene-layer.d.ts +16 -0
  318. package/dist/packages/teaching/src/scene/scene-node.d.ts +67 -0
  319. package/dist/packages/teaching/src/scene/scene-obstacles.d.ts +27 -0
  320. package/dist/packages/teaching/src/scene/scene-registry.d.ts +79 -0
  321. package/dist/packages/teaching/src/scene/scene-stagger.d.ts +43 -0
  322. package/dist/packages/teaching/src/scene/scene-style.d.ts +14 -0
  323. package/dist/packages/teaching/src/scene/scene-validate.d.ts +65 -0
  324. package/dist/packages/teaching/src/scene/scene-wire.d.ts +45 -0
  325. package/dist/packages/teaching/src/scene/scene.d.ts +36 -0
  326. package/dist/packages/teaching/src/scene/shapes/cell-color.d.ts +11 -0
  327. package/dist/packages/teaching/src/scene/shapes/cell-grid.d.ts +69 -0
  328. package/dist/packages/teaching/src/scene/shapes/scene-card.d.ts +114 -0
  329. package/dist/packages/teaching/src/scene/shapes/scene-cells.d.ts +84 -0
  330. package/dist/packages/teaching/src/scene/shapes/scene-slot.d.ts +37 -0
  331. package/dist/packages/teaching/src/scene/shapes/scene-stack.d.ts +46 -0
  332. package/dist/packages/teaching/src/scene/shapes/scene-token.d.ts +63 -0
  333. package/dist/packages/teaching/src/scene/shapes/scene-tokens.d.ts +40 -0
  334. package/dist/packages/teaching/src/scene/shapes/stack-book.d.ts +35 -0
  335. package/dist/packages/teaching/src/scene/shapes/stack-layout.d.ts +63 -0
  336. package/dist/packages/teaching/src/scene/shapes/token-layout.d.ts +39 -0
  337. package/dist/packages/teaching/src/spec/advice.d.ts +23 -0
  338. package/dist/packages/teaching/src/spec/chart-names.d.ts +2 -0
  339. package/dist/packages/teaching/src/spec/describe-lesson.d.ts +85 -0
  340. package/dist/packages/teaching/src/spec/explainer-guide.d.ts +21 -0
  341. package/dist/packages/teaching/src/spec/findings.d.ts +39 -0
  342. package/dist/packages/teaching/src/spec/index.d.ts +14 -0
  343. package/dist/packages/teaching/src/spec/lesson-plan.d.ts +43 -0
  344. package/dist/packages/teaching/src/spec/validate-plan.d.ts +11 -0
  345. package/dist/packages/teaching/src/time/clock.d.ts +7 -0
  346. package/dist/packages/teaching/src/time/tween.d.ts +19 -0
  347. package/dist/packages/teaching/src/time/use-tween.d.ts +6 -0
  348. package/dist/param-CqKUTHaO.js +450 -0
  349. package/dist/path-BglsXpnO.js +59 -0
  350. package/dist/plot-axes-DJkLW4wk.js +100 -0
  351. package/dist/plot-layout-CZVSJ-le.js +912 -0
  352. package/dist/plot-marks-uozcbOIX.js +229 -0
  353. package/dist/plot-surface-CbVBvgqZ.js +51 -0
  354. package/dist/plot-width-DcqtSgzb.js +124 -0
  355. package/dist/point-layer-C-EYETAt.js +655 -0
  356. package/dist/reference-lines-BDcttOp0.js +82 -0
  357. package/dist/scale-C2xgZyZN.js +63 -0
  358. package/dist/scene-0z2gbaDE.js +4938 -0
  359. package/dist/scene.js +1 -0
  360. package/dist/slope-chart-BKVEAVCs.js +1279 -0
  361. package/dist/{src-1EHkSFS-.js → src-BD6xlvDt.js} +2 -2
  362. package/dist/{src-DVHlknB6.js → src-CExIrXPC.js} +169 -193
  363. package/dist/src-DIS0YOj0.js +44 -0
  364. package/dist/src-Dcfq8vE4.js +2195 -0
  365. package/dist/styles2.css +907 -59
  366. package/dist/time-series-BgzGNOk0.js +2670 -0
  367. package/dist/token-heatmap-BrW1OsKD.js +1354 -0
  368. package/dist/token-predictions-yerq_Oet.js +1093 -0
  369. package/dist/tone-scope-DKiSw-JR.js +32 -0
  370. package/dist/transport-BJweqDPj.js +715 -0
  371. package/dist/tree-diagram-D09BRqE-.js +1629 -0
  372. package/dist/treemap-CW4WsJNL.js +472 -0
  373. package/dist/use-tween-5HZ55_9d.js +72 -0
  374. package/dist/values-963L6n1m.js +65 -0
  375. package/dist/violin-plot-DrtPZ1-T.js +1292 -0
  376. package/dist/waterfall-DYLSnGjm.js +576 -0
  377. package/package.json +78 -4
  378. package/recipes/allocation-report.tsx +15 -7
  379. package/recipes/counting-cards.tsx +656 -0
  380. package/recipes/explorable-essay.tsx +172 -0
  381. package/skills/extend-elements/SKILL.md +81 -0
  382. package/skills/plan-lesson/SKILL.md +86 -0
  383. package/skills/plan-lesson/references/plan-format.md +114 -0
  384. package/skills/plan-lesson/references/worked-plan.md +171 -0
  385. package/skills/review-elements/SKILL.md +47 -3
  386. package/skills/review-explainer/SKILL.md +97 -0
  387. package/skills/upgrade-elements/SKILL.md +3 -1
  388. package/skills/upgrade-elements/references/releases.md +249 -0
  389. package/skills/use-elements/SKILL.md +22 -14
  390. package/skills/use-elements/references/charts.md +362 -41
  391. package/skills/use-elements/references/figures.md +173 -0
  392. package/skills/use-elements/references/kits.md +180 -0
  393. package/skills/use-elements/references/teaching.md +36 -0
  394. package/skills/write-explainer/SKILL.md +112 -0
  395. package/skills/write-explainer/references/article.md +164 -0
  396. package/skills/write-explainer/references/lesson.md +148 -0
  397. package/skills/write-explainer/references/mdx.md +78 -0
  398. package/skills/write-explainer/references/scene-parts.md +273 -0
  399. package/skills/write-explainer/references/scene.md +168 -0
  400. package/skills/write-explainer/references/tutor.md +104 -0
  401. package/skills/write-explainer/references/worked-essay.md +459 -0
  402. package/templates/essay/AGENTS.md +14 -0
  403. package/templates/essay/README.md +59 -0
  404. package/templates/essay/index.html +17 -0
  405. package/templates/essay/package.template.json +21 -0
  406. package/templates/essay/plan.json +96 -0
  407. package/templates/essay/src/essay.mdx +97 -0
  408. package/templates/essay/src/figures.tsx +92 -0
  409. package/templates/essay/src/lesson.ts +83 -0
  410. package/templates/essay/src/main.tsx +53 -0
  411. package/templates/essay/src/mdx.d.ts +7 -0
  412. package/templates/essay/tsconfig.template.json +15 -0
  413. package/templates/essay/vite.config.template.txt +8 -0
  414. package/dist/categorical-values-BXi-rJuv.js +0 -74
  415. package/dist/chart-data-CIJVWCYt.js +0 -21
  416. package/dist/chart-frame-BaxKn_MB.js +0 -236
  417. package/dist/chart-input-Bm82_9Rd.js +0 -22
  418. package/dist/chart-theme-4zprJ3rW.js +0 -404
  419. package/dist/plot-width-v2c_rA20.js +0 -63
@@ -0,0 +1,62 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ValueFormat } from '../../../charts/src/index.ts';
3
+ import type { ScoreInterval } from './evaluation-data.ts';
4
+ /** How a leaderboard column draws its measure. */
5
+ export type LeaderboardColumnKind = 'score' | 'interval' | 'change' | 'trend' | 'heat';
6
+ type ColumnBase = {
7
+ readonly id: string;
8
+ /** The measure with its unit, as the header shows it: "Reasoning accuracy". */
9
+ readonly label: string;
10
+ /** How every value in the column is written. */
11
+ readonly format: ValueFormat;
12
+ /** Whether a larger value is better. It sets which value is marked best and what a rise means in a change column. */
13
+ readonly isHigherBetter: boolean;
14
+ /** The column's width in pixels. Each kind has a default that fits its graphic and text. */
15
+ readonly width?: number | undefined;
16
+ /** True to hide the column on a narrow screen. */
17
+ readonly isSecondary?: boolean | undefined;
18
+ };
19
+ /**
20
+ * One measure of the leaderboard: `score` is a bar from zero, `interval` an estimate with its interval, and `trend` a
21
+ * small line of recent values ranked by the last. The `heat` kind is a shaded number and the `change` kind a signed
22
+ * change with an arrow. Every kind but `change` draws on the column's `domain`, the same for every row.
23
+ */
24
+ export type LeaderboardColumn = (ColumnBase & {
25
+ readonly kind: 'score' | 'interval' | 'trend';
26
+ readonly domain: readonly [number, number];
27
+ }) | (ColumnBase & {
28
+ readonly kind: 'heat';
29
+ readonly domain: readonly [number, number];
30
+ /** `sequential` deepens one hue with the value; `diverging` uses two hues around zero. Defaults to sequential. */
31
+ readonly palette?: 'sequential' | 'diverging' | undefined;
32
+ }) | (ColumnBase & {
33
+ readonly kind: 'change';
34
+ });
35
+ /**
36
+ * A model's value in one column. It is a number for `score`, `heat` and `change`, an estimate with its interval for
37
+ * `interval`, the recent values in order for `trend`, or null where it was not measured.
38
+ */
39
+ export type LeaderboardValue = number | ScoreInterval | ReadonlyArray<number | null> | null;
40
+ export declare const columnWidths: {
41
+ readonly score: 160;
42
+ readonly interval: 300;
43
+ readonly change: 128;
44
+ readonly trend: 160;
45
+ readonly heat: 112;
46
+ };
47
+ /** The sentence that says why a value does not fit its column, or undefined when it does. */
48
+ export declare function valueKindProblem(column: LeaderboardColumn, value: LeaderboardValue): string | undefined;
49
+ /** The number a row is ranked by in a column: the value, the estimate, or the last recorded trend value. */
50
+ export declare function rankedValue(value: LeaderboardValue): number | null;
51
+ export type MeasureCellProps = {
52
+ readonly column: LeaderboardColumn;
53
+ readonly value: LeaderboardValue;
54
+ readonly model: string;
55
+ readonly locale: string;
56
+ readonly isBest: boolean;
57
+ /** The words a screen reader hears after the best value. */
58
+ readonly bestLabel: string;
59
+ };
60
+ /** One measure of one model, drawn by its column's kind. The best value of the column is set in bold and named. */
61
+ export declare function MeasureCell({ isBest, bestLabel, ...cell }: MeasureCellProps): ReactNode;
62
+ export {};
@@ -0,0 +1,59 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { FigureProps } from '../../../charts/src/index.ts';
3
+ import type { DataTableSelectionDetails, DataTableSort, DataTableSortDetails } from '../../../collections/src/index.ts';
4
+ import type { EvaluationModel } from './evaluation-data.ts';
5
+ import type { LeaderboardColumn, LeaderboardValue } from './leaderboard-cells.tsx';
6
+ /** One model's results: its values by column id. A column left out reads as not measured. */
7
+ export type LeaderboardRow = {
8
+ /** The id of a model in `models`. */
9
+ readonly model: string;
10
+ /** The model's place as the application ranked it. Ties may share a rank. */
11
+ readonly rank?: number | undefined;
12
+ readonly values: Readonly<Record<string, LeaderboardValue>>;
13
+ };
14
+ /** The words the leaderboard shows that are not data. */
15
+ export type LeaderboardLabels = {
16
+ readonly model: string;
17
+ readonly rank: string;
18
+ /** Heard by a screen reader after the best value of a column. */
19
+ readonly best: string;
20
+ readonly bestNote: string;
21
+ readonly higherIsBetter: string;
22
+ readonly lowerIsBetter: string;
23
+ /** Starts the name of a row's checkbox: "Select Atlas 13B". */
24
+ readonly select: string;
25
+ };
26
+ export type LeaderboardProps = FigureProps & {
27
+ /**
28
+ * Every model the page shows, in the order their hues are assigned. The table keeps one tone scope over them, so a
29
+ * figure under a `ToneScope` with the same ids shows each model in the same hue.
30
+ */
31
+ readonly models: ReadonlyArray<EvaluationModel>;
32
+ readonly columns: ReadonlyArray<LeaderboardColumn>;
33
+ /** One row per model with results, in the application's order. */
34
+ readonly rows: ReadonlyArray<LeaderboardRow>;
35
+ /**
36
+ * The column the rows are ordered by. Absent keeps the order given, which is the rank order. Missing values sort
37
+ * last.
38
+ */
39
+ readonly sort?: DataTableSort | undefined;
40
+ /** Hears a press on a sortable header. Without it the headers do not sort. */
41
+ readonly onSortChange?: ((sort: DataTableSort | undefined, details: DataTableSortDetails) => void) | undefined;
42
+ /** The ids of the checked models. */
43
+ readonly selected?: ReadonlyArray<string> | undefined;
44
+ /** Hears a press on a row's checkbox. Without it the rows have no checkboxes. */
45
+ readonly onSelectedChange?: ((selected: ReadonlyArray<string>, details: DataTableSelectionDetails) => void) | undefined;
46
+ readonly labels?: Partial<LeaderboardLabels> | undefined;
47
+ };
48
+ /** The most models and measure columns a leaderboard shows. Larger input is refused. */
49
+ export declare const leaderboardLimits: {
50
+ readonly models: 100;
51
+ readonly columns: 10;
52
+ };
53
+ /**
54
+ * A ranked table of models over benchmarks, as an evaluation paper or dashboard shows it, where the application owns
55
+ * the order, the sort and the checked models. Each measure column draws its values with a table cell graphic on one
56
+ * shared scale and writes the exact value beside it. The best value of each column is set in bold and named for screen
57
+ * readers, and inside a `ChartLink`, resting on a row marks it in the linked figures.
58
+ */
59
+ export declare function Leaderboard(props: LeaderboardProps): ReactNode;
@@ -0,0 +1,59 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { FigureProps, FigureSelectionProps, PlotAxis, PlotHeight, ValueFormat } from '../../../charts/src/index.ts';
3
+ import type { EvaluationModel } from './evaluation-data.ts';
4
+ /** One benchmark in a head-to-head comparison. */
5
+ export type ComparisonRow = {
6
+ readonly id: string;
7
+ readonly label: string;
8
+ /** Model A's score, or null where it was not measured. */
9
+ readonly a: number | null;
10
+ /** Model B's score, or null where it was not measured. */
11
+ readonly b: number | null;
12
+ /** B minus A, as the application estimated it, such as a paired mean. Null where it could not be computed. */
13
+ readonly difference: number | null;
14
+ /** The bounds the application computed around the difference, such as a 95% interval. */
15
+ readonly interval?: {
16
+ readonly low: number;
17
+ readonly high: number;
18
+ } | undefined;
19
+ /** The application's test of the difference. Absent reads as "not tested". */
20
+ readonly isSignificant?: boolean | undefined;
21
+ /** A short remark in words: "Fewer than 200 items" or "B was tuned on a related set". */
22
+ readonly note?: string | undefined;
23
+ };
24
+ /** The words the comparison shows that are not data. */
25
+ export type ModelComparisonLabels = {
26
+ /** Starts the table's caption: "Differences, Cirrus 34B minus Atlas 70B". */
27
+ readonly caption: string;
28
+ readonly benchmark: string;
29
+ readonly difference: string;
30
+ readonly interval: string;
31
+ readonly reading: string;
32
+ /** Follows the leading model's name in a significant row: "Atlas 13B ahead". */
33
+ readonly ahead: string;
34
+ readonly unclear: string;
35
+ readonly untested: string;
36
+ readonly noInterval: string;
37
+ };
38
+ export type ModelComparisonProps = FigureProps & FigureSelectionProps & {
39
+ /** The reference model, drawn first. */
40
+ readonly a: EvaluationModel;
41
+ /** The model compared with it. Differences are B minus A. */
42
+ readonly b: EvaluationModel;
43
+ readonly rows: ReadonlyArray<ComparisonRow>;
44
+ /** The measured axis of both scores. */
45
+ readonly value: PlotAxis;
46
+ /** Whether a larger score is better. It sets which model a difference favors and the hue of the change. */
47
+ readonly isHigherBetter: boolean;
48
+ /** How the differences are written. Defaults to the axis format with a sign. */
49
+ readonly differenceFormat?: ValueFormat | undefined;
50
+ readonly height?: PlotHeight | undefined;
51
+ readonly labels?: Partial<ModelComparisonLabels> | undefined;
52
+ };
53
+ /**
54
+ * Two models head to head across benchmarks: a dumbbell of A against B per benchmark, then a table of differences, each
55
+ * with its interval and a test in words. Model A is the reference, every difference is B minus A, and each model keeps
56
+ * its hue from an enclosing tone scope. Resting on a table row marks the benchmark in the plot and the other way round,
57
+ * and the application supplies every score, difference and test.
58
+ */
59
+ export declare function ModelComparison(props: ModelComparisonProps): ReactNode;
@@ -0,0 +1,33 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { FigureProps, FigureSelectionProps, PlotAxis, PlotHeight } from '../../../charts/src/index.ts';
3
+ import type { EvaluationModel, ScoreValue } from './evaluation-data.ts';
4
+ /** One model's scores on the benchmark's categories, by category id. A category left out reads as not measured. */
5
+ export type ModelScores = {
6
+ /** The id of a model in `models`. */
7
+ readonly model: string;
8
+ readonly values: Readonly<Record<string, ScoreValue>>;
9
+ };
10
+ export type ScoreBreakdownProps = FigureProps & FigureSelectionProps & {
11
+ /**
12
+ * Every model the page names, for their labels and pinned hues. Only models with scores are drawn. Under a
13
+ * `ToneScope` each model keeps the hue it has elsewhere on the page.
14
+ */
15
+ readonly models: ReadonlyArray<EvaluationModel>;
16
+ /** The categories or tasks of the benchmark, listed down the side in the order given. */
17
+ readonly categories: ReadonlyArray<{
18
+ readonly id: string;
19
+ readonly label: string;
20
+ }>;
21
+ /** The models drawn, in legend order. */
22
+ readonly scores: ReadonlyArray<ModelScores>;
23
+ /** The measured axis. Position carries the score, so it need not start at zero. */
24
+ readonly value: PlotAxis;
25
+ readonly height?: PlotHeight | undefined;
26
+ };
27
+ /**
28
+ * One benchmark broken down by category, with a dot per model on each row and an optional interval behind it, for
29
+ * showing under a leaderboard where models differ. Inside a `ChartLink`, pointing the link at a model, such as by
30
+ * resting on its leaderboard row, keeps that model at full strength and fades the others. The one model then reads
31
+ * across every category.
32
+ */
33
+ export declare function ScoreBreakdown(props: ScoreBreakdownProps): ReactNode;
@@ -0,0 +1,56 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { FigureProps } from '../../../charts/src/index.ts';
3
+ import type { AttentionToken } from '../../../charts/src/matrix/index.ts';
4
+ import type { InterpretabilityChangeDetails } from './features.ts';
5
+ /** One attention head: its name and its attention pattern over the shared tokens. */
6
+ export type AttentionHead = {
7
+ readonly id: string;
8
+ /** "Layer 5 · head 1". */
9
+ readonly label: string;
10
+ /** A short note on what the head appears to do: "Attends to the previous token". */
11
+ readonly description?: string | undefined;
12
+ /**
13
+ * Weights in [0, 1] as a model computes them: one line per destination (the token that attends), one weight per
14
+ * source (the token attended to), in token order. Null marks a masked or unrecorded pair.
15
+ */
16
+ readonly weights: ReadonlyArray<ReadonlyArray<number | null>>;
17
+ };
18
+ /** The words around the heads. Each has an English default. */
19
+ export type AttentionHeadGridLabels = {
20
+ readonly inspect: string;
21
+ readonly inspecting: string;
22
+ readonly heads: string;
23
+ readonly links: string;
24
+ readonly linksDescription: string;
25
+ readonly weight: string;
26
+ };
27
+ export type AttentionHeadGridProps = Pick<FigureProps, 'title' | 'description' | 'locale' | 'status' | 'coverage' | 'source'> & {
28
+ /** The sequence every head attends over, as both sources and destinations. */
29
+ readonly tokens: ReadonlyArray<AttentionToken>;
30
+ readonly heads: ReadonlyArray<AttentionHead>;
31
+ /** `causal` draws each pair where a token would read a later token as masked. Their weights must be null. */
32
+ readonly mask?: 'none' | 'causal' | undefined;
33
+ /** The head shown enlarged, with its links. Absent or null enlarges the first head. */
34
+ readonly selected?: string | null | undefined;
35
+ readonly onSelectedChange?: ((id: string, details: InterpretabilityChangeDetails) => void) | undefined;
36
+ /**
37
+ * The pair marked in every head, as `matrixCellId(destination, source)`: the token that attends, then the token
38
+ * attended to. Every head shows it, and pointing at a pair in one head marks it in every head.
39
+ */
40
+ readonly pair?: string | null | undefined;
41
+ readonly onPairChange?: ((id: string, details: InterpretabilityChangeDetails) => void) | undefined;
42
+ /** The narrowest a small head panel may be, in CSS pixels. */
43
+ readonly minPanelWidth?: number | undefined;
44
+ readonly labels?: Partial<AttentionHeadGridLabels> | undefined;
45
+ };
46
+ /** The most heads the grid draws at once. Supply one layer, or the heads a study is about. */
47
+ export declare const attentionHeadLimits: {
48
+ readonly heads: 32;
49
+ };
50
+ /**
51
+ * Attention heads as small multiples, the way circuit papers compare them: one color-only attention pattern per head
52
+ * over the same tokens and the same 0 to 1 color scale. The selected head is drawn large, beside the lines from each
53
+ * token to the tokens it attends to. Attention weights describe where a head reads from, and are not by themselves an
54
+ * explanation of what it computes.
55
+ */
56
+ export declare function AttentionHeadGrid({ title, description, locale, status, coverage, source, tokens, heads, mask, selected, onSelectedChange, pair, onPairChange, minPanelWidth, labels: given, }: AttentionHeadGridProps): ReactNode;
@@ -0,0 +1,29 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { AttributionGraphProps } from '../../../charts/src/graph/index.ts';
3
+ import type { FeatureCardData, InterpretabilityChangeDetails } from './features.ts';
4
+ import type { NodePanelLabels } from './node-panel.tsx';
5
+ export type AttributionWorkbenchLabels = NodePanelLabels;
6
+ export type AttributionWorkbenchProps = Omit<AttributionGraphProps, 'selected' | 'onSelectedChange' | 'pinned' | 'onPinnedChange'> & {
7
+ /**
8
+ * What the panel shows for each feature node, keyed by node id. A node without an entry shows its name only. The
9
+ * application supplies a card for each feature node.
10
+ */
11
+ readonly details: Readonly<Record<string, FeatureCardData>>;
12
+ /** The node the reader opened. It stays in the panel while nothing else is pointed at. */
13
+ readonly selected?: string | null | undefined;
14
+ readonly onSelectedChange?: ((id: string, details: InterpretabilityChangeDetails) => void) | undefined;
15
+ /**
16
+ * The nodes pinned to build a subgraph, in the order they were pinned. The application holds the selection and the
17
+ * pins.
18
+ */
19
+ readonly pinned?: ReadonlyArray<string> | undefined;
20
+ readonly onPinnedChange?: ((ids: ReadonlyArray<string>, details: InterpretabilityChangeDetails) => void) | undefined;
21
+ readonly labels?: Partial<AttributionWorkbenchLabels> | undefined;
22
+ };
23
+ /**
24
+ * An attribution graph beside a panel for the node in focus, the way circuit-tracing tools present a traced prompt.
25
+ * Point at a node to read its feature card; press it to keep it in the panel; pin nodes to build a subgraph and step
26
+ * between them. The graph and the panel share one chart link, so a feature list or map on the same page lights the same
27
+ * node.
28
+ */
29
+ export declare function AttributionWorkbench({ details, selected, onSelectedChange, pinned, onPinnedChange, labels: given, ...graph }: AttributionWorkbenchProps): ReactNode;
@@ -0,0 +1,41 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { EmbeddingMapProps } from '../../../charts/src/relationship/index.ts';
3
+ import type { FeatureCardLabels } from './feature-card.tsx';
4
+ import type { FeatureCardData, InterpretabilityChangeDetails } from './features.ts';
5
+ /** The words beside the map. Each has an English default. */
6
+ export type EmbeddingAtlasLabels = {
7
+ readonly search: string;
8
+ readonly searchDescription: string;
9
+ readonly matches: string;
10
+ readonly noMatches: string;
11
+ readonly more: string;
12
+ readonly hint: string;
13
+ readonly card: Partial<FeatureCardLabels>;
14
+ };
15
+ export type EmbeddingAtlasProps = Omit<EmbeddingMapProps, 'selected' | 'onSelectedChange' | 'landmarks'> & {
16
+ /**
17
+ * The features a reader can find, each placed on the map as a labelled landmark. Its card data comes from `details`
18
+ * under the same id.
19
+ */
20
+ readonly landmarks: ReadonlyArray<{
21
+ readonly id: string;
22
+ readonly x: number;
23
+ readonly y: number;
24
+ }>;
25
+ /** Each findable feature's card: its name, explanation and any charts. Keyed by landmark id. */
26
+ readonly details: Readonly<Record<string, FeatureCardData>>;
27
+ /** The search text. Only matching landmarks stay labelled on the map. */
28
+ readonly query?: string | undefined;
29
+ readonly onQueryChange?: ((query: string, details: InterpretabilityChangeDetails) => void) | undefined;
30
+ /** The feature whose card is open beside the map. */
31
+ readonly selected?: string | null | undefined;
32
+ readonly onSelectedChange?: ((id: string, details: InterpretabilityChangeDetails) => void) | undefined;
33
+ readonly labels?: Partial<EmbeddingAtlasLabels> | undefined;
34
+ };
35
+ /**
36
+ * A map of features, such as a projection of decoder directions, with a search over the labelled features beside it.
37
+ * Typing narrows the labels on the map and lists the matches; resting on a match lights its label; pressing one, or its
38
+ * label on the map, opens its card. The application projects the points, holds the search text and the selection, and
39
+ * supplies the cards.
40
+ */
41
+ export declare function EmbeddingAtlas({ landmarks, details, query, onQueryChange, selected, onSelectedChange, labels: given, ...map }: EmbeddingAtlasProps): ReactNode;
@@ -0,0 +1,33 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { FigureStatus, ValueFormat } from '../../../charts/src/index.ts';
3
+ import type { FeatureLogitLabels } from './feature-logits.tsx';
4
+ import type { FeatureCardData } from './features.ts';
5
+ /** How much of a feature a card shows: a compact card for grids and side panels, or the full card for a detail page. */
6
+ export type FeatureCardSize = 'compact' | 'full';
7
+ /** The words on a feature card. Each has an English default. */
8
+ export type FeatureCardLabels = FeatureLogitLabels & {
9
+ readonly density: string;
10
+ readonly densityDescription: string;
11
+ readonly examples: string;
12
+ readonly examplesDescription: string;
13
+ readonly activation: string;
14
+ readonly frequency: string;
15
+ readonly noData: string;
16
+ };
17
+ export type FeatureCardProps = FeatureCardData & {
18
+ readonly locale: string;
19
+ readonly status?: FigureStatus | undefined;
20
+ /** Use `compact` in grids and side panels, and `full` on a feature's own page. */
21
+ readonly size?: FeatureCardSize | undefined;
22
+ /** How the activation frequency is written. Absent writes a percent with two significant digits. */
23
+ readonly frequencyFormat?: ValueFormat | undefined;
24
+ /** Controls beside the feature's name, such as a pin or a link to its page. */
25
+ readonly actions?: ReactNode;
26
+ readonly labels?: Partial<FeatureCardLabels> | undefined;
27
+ };
28
+ /**
29
+ * One learned feature at a glance, as interpretability papers and feature browsers show it. The card shows its name, id
30
+ * and explanation, how often it fires and how strongly, the contexts that activate it most, and the output tokens it
31
+ * promotes and suppresses. Supply only the parts you have, and the card leaves out the rest.
32
+ */
33
+ export declare function FeatureCard({ feature, density, examples, logits, locale, status, size, frequencyFormat, actions, labels: given, }: FeatureCardProps): ReactNode;
@@ -0,0 +1,51 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { FigureStatus, NumericDomain, ValueFormat } from '../../../charts/src/index.ts';
3
+ import type { DataTableSort } from '../../../collections/src/index.ts';
4
+ import type { FeatureSummary, InterpretabilityChangeDetails } from './features.ts';
5
+ /** One row of the list: a feature with the measures the application computed for it. */
6
+ export type FeatureListRow = FeatureSummary & {
7
+ /** The largest activation seen, or null where it was not measured. */
8
+ readonly maxActivation?: number | null | undefined;
9
+ /** The feature's activation at each layer, in `layers` order, for a tiny curve. */
10
+ readonly profile?: ReadonlyArray<number | null> | undefined;
11
+ };
12
+ /** The words in the list. Each has an English default. */
13
+ export type FeatureListLabels = {
14
+ readonly feature: string;
15
+ readonly frequency: string;
16
+ readonly maxActivation: string;
17
+ readonly profile: string;
18
+ readonly search: string;
19
+ readonly searchPlaceholder: string;
20
+ readonly empty: string;
21
+ readonly noMatches: string;
22
+ };
23
+ export type FeatureListProps = {
24
+ /** The table's caption, which names it for assistive technology. */
25
+ readonly title: string;
26
+ readonly locale: string;
27
+ readonly status?: FigureStatus | undefined;
28
+ readonly features: ReadonlyArray<FeatureListRow>;
29
+ /** The scale every frequency bar shares. It starts at zero. */
30
+ readonly frequencyDomain: NumericDomain;
31
+ readonly frequencyFormat: ValueFormat;
32
+ readonly activationFormat: ValueFormat;
33
+ /** The scale every layer profile shares. Leave it out, with the profiles, to drop the column. */
34
+ readonly profileDomain?: NumericDomain | undefined;
35
+ /** The feature the reader opened. Pressing a row asks to open it. */
36
+ readonly selected?: string | null | undefined;
37
+ readonly onSelectedChange?: ((id: string, details: InterpretabilityChangeDetails) => void) | undefined;
38
+ /** The search text. The list shows the features whose label, id or explanation contains it. */
39
+ readonly query?: string | undefined;
40
+ readonly onQueryChange?: ((query: string, details: InterpretabilityChangeDetails) => void) | undefined;
41
+ readonly sort?: DataTableSort | undefined;
42
+ readonly onSortChange?: ((sort: DataTableSort | undefined) => void) | undefined;
43
+ readonly labels?: Partial<FeatureListLabels> | undefined;
44
+ };
45
+ /**
46
+ * Many features as a sortable, searchable table, as a feature browser lists a dictionary, where the application holds
47
+ * the open feature, search text and sort, and supplies every measure. Each row names the feature and shows how often it
48
+ * fires as a bar, its largest activation and, when supplied, a tiny curve of its activation by layer. Pressing a row
49
+ * opens the feature, and resting on a row lights it in linked figures.
50
+ */
51
+ export declare function FeatureList({ title, locale, status, features, frequencyDomain, frequencyFormat, activationFormat, profileDomain, selected, onSelectedChange, query, onQueryChange, sort, onSortChange, labels: given, }: FeatureListProps): ReactNode;
@@ -0,0 +1,23 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { FigureStatus } from '../../../charts/src/index.ts';
3
+ import type { FeatureLogits } from './features.ts';
4
+ /** The words around the promoted and suppressed tokens. */
5
+ export type FeatureLogitLabels = {
6
+ readonly promotes: string;
7
+ readonly suppresses: string;
8
+ readonly logitsDescription: string;
9
+ };
10
+ type FeatureLogitsProps = {
11
+ readonly logits: FeatureLogits;
12
+ readonly locale: string;
13
+ readonly status?: FigureStatus | undefined;
14
+ readonly isCompact: boolean;
15
+ readonly labels: FeatureLogitLabels;
16
+ };
17
+ /**
18
+ * What the feature does to the output: the tokens whose logits it raises, in the positive hue, and the tokens it
19
+ * lowers, in the negative hue. Both bar lists share one magnitude, so a long bar means the same in each. The compact
20
+ * form writes the leading tokens as text.
21
+ */
22
+ export declare function FeatureLogitBars({ logits, locale, status, isCompact, labels }: FeatureLogitsProps): ReactNode;
23
+ export {};
@@ -0,0 +1,70 @@
1
+ import type { HistogramBin } from '../../../charts/src/distribution/index.ts';
2
+ import type { NumericDomain, PlotAxis, ValueFormat } from '../../../charts/src/index.ts';
3
+ import type { TokenExample, TokenPalette } from '../../../charts/src/text/index.ts';
4
+ /** Why an interpretability view asks for a change: a press, a typed or dragged input, or an agent's call. */
5
+ export type InterpretabilityChangeDetails = {
6
+ readonly reason: 'press' | 'input' | 'imperative';
7
+ readonly event?: Event | undefined;
8
+ };
9
+ /** What names a learned feature, such as a sparse autoencoder latent, wherever it appears. */
10
+ export type FeatureSummary = {
11
+ /** The feature's id. It is the same in the list, the card, the map and the attribution graph. */
12
+ readonly id: string;
13
+ /** The short human name: "Golden Gate Bridge". */
14
+ readonly label: string;
15
+ /** Where the feature lives, such as "Layer 20 · 65k dictionary". */
16
+ readonly source?: string | undefined;
17
+ /** What the feature appears to detect, in a sentence or two, written by a person or a model. */
18
+ readonly explanation?: string | undefined;
19
+ /** The share of tokens on which the feature is active, between 0 and 1, or null where it was not measured. */
20
+ readonly frequency?: number | null | undefined;
21
+ };
22
+ /** How often the feature reaches each activation: prepared histogram bins over the activation axis. */
23
+ export type FeatureDensity = {
24
+ readonly bins: ReadonlyArray<HistogramBin>;
25
+ readonly value: PlotAxis;
26
+ readonly count: PlotAxis;
27
+ };
28
+ /** The contexts that activate the feature most, ranked by the application, with one color scale. */
29
+ export type FeatureExamples = {
30
+ readonly examples: ReadonlyArray<TokenExample>;
31
+ readonly domain: NumericDomain;
32
+ /** Absent shades activations in one hue. */
33
+ readonly palette?: TokenPalette | undefined;
34
+ readonly valueFormat: ValueFormat;
35
+ /** Tokens shown on each side of each example's peak. Every example then needs a `peakIndex`. */
36
+ readonly context?: number | undefined;
37
+ };
38
+ /** One output token and the feature's direct effect on its logit: positive promotes it, negative suppresses it. */
39
+ export type FeatureLogit = {
40
+ readonly id: string;
41
+ readonly token: string;
42
+ readonly value: number;
43
+ };
44
+ /** The tokens the feature pushes up and down, each list in the order the application ranked it. */
45
+ export type FeatureLogits = {
46
+ readonly tokens: ReadonlyArray<FeatureLogit>;
47
+ /** The effect's axis: its label and format. A domain, when given, must hold zero. */
48
+ readonly value: PlotAxis;
49
+ };
50
+ /** Everything a feature card can show. Each part is optional; the card leaves out what is absent. */
51
+ export type FeatureCardData = {
52
+ readonly feature: FeatureSummary;
53
+ readonly density?: FeatureDensity | undefined;
54
+ readonly examples?: FeatureExamples | undefined;
55
+ readonly logits?: FeatureLogits | undefined;
56
+ };
57
+ /** The most features a list, a map's search or a workbench takes. */
58
+ export declare const featureLimits: {
59
+ readonly features: 5000;
60
+ readonly matches: 8;
61
+ };
62
+ /** True when the query is empty or a feature's label, id or explanation contains it, ignoring case. */
63
+ export declare function matchesQuery(feature: FeatureSummary, query: string): boolean;
64
+ /** The first id that appears twice, or undefined. */
65
+ export declare function repeatedFeatureId(ids: ReadonlyArray<string>): string | undefined;
66
+ /**
67
+ * Hands the row or item a reader rests on to the enclosing chart link. A feature lit in a list or a search is then lit
68
+ * in the map or graph beside it. Moving away clears only an id this view set, and outside a link it does nothing.
69
+ */
70
+ export declare function useFeatureHighlight(ids: ReadonlyArray<string>): (id: string | undefined) => void;
@@ -0,0 +1,16 @@
1
+ export type { AttentionHead, AttentionHeadGridLabels, AttentionHeadGridProps } from './attention-head-grid.tsx';
2
+ export { AttentionHeadGrid, attentionHeadLimits } from './attention-head-grid.tsx';
3
+ export type { AttributionWorkbenchLabels, AttributionWorkbenchProps } from './attribution-workbench.tsx';
4
+ export { AttributionWorkbench } from './attribution-workbench.tsx';
5
+ export type { EmbeddingAtlasLabels, EmbeddingAtlasProps } from './embedding-atlas.tsx';
6
+ export { EmbeddingAtlas } from './embedding-atlas.tsx';
7
+ export type { FeatureCardLabels, FeatureCardProps, FeatureCardSize } from './feature-card.tsx';
8
+ export { FeatureCard } from './feature-card.tsx';
9
+ export type { FeatureListLabels, FeatureListProps, FeatureListRow } from './feature-list.tsx';
10
+ export { FeatureList } from './feature-list.tsx';
11
+ export type { FeatureCardData, FeatureDensity, FeatureExamples, FeatureLogit, FeatureLogits, FeatureSummary, InterpretabilityChangeDetails, } from './features.ts';
12
+ export { featureLimits } from './features.ts';
13
+ export type { LensLayer, LensTrack, LogitLensLabels, LogitLensProps } from './logit-lens.tsx';
14
+ export { LogitLens } from './logit-lens.tsx';
15
+ export type { SteeringCompletions, SteeringFeature, SteeringPanelLabels, SteeringPanelProps, } from './steering-panel.tsx';
16
+ export { SteeringPanel } from './steering-panel.tsx';