@mechane-ai/elements 0.45.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +353 -50
- package/bin/mechane-elements-catalog.mjs +42 -4
- package/dist/ai.js +268 -202
- package/dist/catalog.json +2480 -71
- package/dist/categorical-values-DdfGIowV.js +107 -0
- package/dist/cells--Bd1fQFR.js +384 -0
- package/dist/chart-cursor-1mFd48Jc.js +23 -0
- package/dist/chart-link-AE_xuxiP.js +35 -0
- package/dist/chart-tones-ei3BC2AL.js +27 -0
- package/dist/charts/cartesian.js +1 -2792
- package/dist/charts/cells.js +1 -0
- package/dist/charts/comparison.js +1 -0
- package/dist/charts/distribution.js +1 -709
- package/dist/charts/figure.js +3404 -0
- package/dist/charts/graph.js +1 -641
- package/dist/charts/hierarchy.js +1 -112
- package/dist/charts/image.js +1 -0
- package/dist/charts/matrix.js +3 -637
- package/dist/charts/plot.js +15 -0
- package/dist/charts/relationship.js +1 -0
- package/dist/charts/text.js +1 -0
- package/dist/charts/timeline.js +1 -233
- package/dist/charts/transforms.js +677 -0
- package/dist/charts/trend.js +1 -0
- package/dist/charts.js +8 -3
- package/dist/{code-block-Cpfr7B6a.js → code-block-DioAM2bZ.js} +67 -52
- package/dist/collections.js +1 -1735
- package/dist/color-legend-CIo7DhXB.js +62 -0
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +67 -66
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +2 -2
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-CGeFFb9F.js → content-link-NWuHp5rC.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/csp.js +6 -11
- package/dist/dates-Cww8UR_n.js +810 -0
- package/dist/dumbbell-plot-B2ZTgQaI.js +508 -0
- package/dist/embedding-map-CGM_k6lC.js +1929 -0
- package/dist/feedback.js +1 -1
- package/dist/figure-format-B8kRZMlo.js +36 -0
- package/dist/figure-frame-wRkIEAwe.js +270 -0
- package/dist/forms/dates.js +1 -750
- package/dist/{forms-DeU0Tiv3.js → forms-CEbwzlRR.js} +50 -41
- package/dist/forms.js +3 -3
- package/dist/heatmap-scale-Zte6Ya-g.js +20 -0
- package/dist/image-grid-CVA4SOy_.js +598 -0
- package/dist/index.js +1 -1
- package/dist/kits/evaluation.js +431 -0
- package/dist/kits/explainers.js +452 -0
- package/dist/kits/interpretability.js +1033 -0
- package/dist/kits/operations.js +239 -0
- package/dist/kits/training.js +335 -0
- package/dist/label-place-Z0fryBZb.js +42 -0
- package/dist/layout.js +207 -207
- package/dist/locate-Bcg3QcP4.js +11 -0
- package/dist/navigation.js +4 -3
- package/dist/packages/ai/src/conversation.d.ts +2 -0
- package/dist/packages/ai/src/prompt-input.d.ts +7 -2
- package/dist/packages/charts/src/cartesian/bar-chart.d.ts +40 -21
- package/dist/packages/charts/src/cartesian/bar-data.d.ts +15 -4
- package/dist/packages/charts/src/cartesian/bar-overlays.d.ts +7 -3
- package/dist/packages/charts/src/cartesian/breakdown-bar.d.ts +10 -8
- package/dist/packages/charts/src/cartesian/bridge-chart.d.ts +20 -16
- package/dist/packages/charts/src/cartesian/bridge-data.d.ts +5 -4
- package/dist/packages/charts/src/cartesian/composition-bars.d.ts +8 -4
- package/dist/packages/charts/src/cartesian/index.d.ts +6 -5
- package/dist/packages/charts/src/cartesian/reference-lines.d.ts +25 -18
- package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +37 -26
- package/dist/packages/charts/src/cartesian/sparkline.d.ts +14 -2
- package/dist/packages/charts/src/cartesian/time-series-bands.d.ts +3 -2
- package/dist/packages/charts/src/cartesian/time-series-data.d.ts +12 -2
- package/dist/packages/charts/src/cartesian/time-series-line.d.ts +2 -2
- package/dist/packages/charts/src/cartesian/time-series-overlays.d.ts +6 -4
- package/dist/packages/charts/src/cartesian/time-series.d.ts +61 -27
- package/dist/packages/charts/src/cartesian/value-labels.d.ts +22 -0
- package/dist/packages/charts/src/categorical-values.d.ts +15 -10
- package/dist/packages/charts/src/cells/bar-cell.d.ts +13 -0
- package/dist/packages/charts/src/cells/cell-layout.d.ts +81 -0
- package/dist/packages/charts/src/cells/change-cell.d.ts +17 -0
- package/dist/packages/charts/src/cells/heat-cell.d.ts +19 -0
- package/dist/packages/charts/src/cells/index.d.ts +11 -0
- package/dist/packages/charts/src/cells/interval-cell.d.ts +16 -0
- package/dist/packages/charts/src/cells/spark-cell.d.ts +22 -0
- package/dist/packages/charts/src/chart-frame.d.ts +17 -12
- package/dist/packages/charts/src/chart-grid.d.ts +19 -0
- package/dist/packages/charts/src/chart-input.d.ts +1 -9
- package/dist/packages/charts/src/chart-inspection.d.ts +1 -2
- package/dist/packages/charts/src/chart-link.d.ts +56 -0
- package/dist/packages/charts/src/chart-range.d.ts +33 -0
- package/dist/packages/charts/src/chart-rows.d.ts +20 -0
- package/dist/packages/charts/src/chart-theme.d.ts +17 -0
- package/dist/packages/charts/src/chart.d.ts +73 -0
- package/dist/packages/charts/src/comparison/bullet-bar.d.ts +34 -0
- package/dist/packages/charts/src/comparison/comparison-plot.d.ts +54 -0
- package/dist/packages/charts/src/comparison/dot-plot.d.ts +41 -0
- package/dist/packages/charts/src/comparison/dumbbell-plot.d.ts +33 -0
- package/dist/packages/charts/src/comparison/index.d.ts +6 -0
- package/dist/packages/charts/src/distribution/box-plot.d.ts +40 -0
- package/dist/packages/charts/src/distribution/distribution-input.d.ts +5 -3
- package/dist/packages/charts/src/distribution/distribution-plot.d.ts +28 -161
- package/dist/packages/charts/src/distribution/ecdf.d.ts +16 -15
- package/dist/packages/charts/src/distribution/group-plot-input.d.ts +35 -0
- package/dist/packages/charts/src/distribution/group-plot-layout.d.ts +79 -0
- package/dist/packages/charts/src/distribution/group-plot.d.ts +73 -0
- package/dist/packages/charts/src/distribution/histogram.d.ts +16 -16
- package/dist/packages/charts/src/distribution/index.d.ts +11 -0
- package/dist/packages/charts/src/distribution/interval-plot.d.ts +16 -13
- package/dist/packages/charts/src/distribution/ranked-bars.d.ts +17 -14
- package/dist/packages/charts/src/distribution/ridgeline.d.ts +34 -0
- package/dist/packages/charts/src/distribution/strip-plot.d.ts +37 -0
- package/dist/packages/charts/src/distribution/violin-plot.d.ts +34 -0
- package/dist/packages/charts/src/figure/figure-format.d.ts +34 -0
- package/dist/packages/charts/src/figure/figure-frame.d.ts +47 -0
- package/dist/packages/charts/src/figure/figure-props.d.ts +54 -0
- package/dist/packages/charts/src/figure/tone-scope.d.ts +32 -0
- package/dist/packages/charts/src/graph/attribution-graph.d.ts +62 -0
- package/dist/packages/charts/src/graph/attribution-layout.d.ts +88 -0
- package/dist/packages/charts/src/graph/flow-diagram.d.ts +14 -15
- package/dist/packages/charts/src/graph/flow-layout.d.ts +4 -2
- package/dist/packages/charts/src/graph/graph-canvas.d.ts +33 -0
- package/dist/packages/charts/src/graph/index.d.ts +6 -2
- package/dist/packages/charts/src/graph/relation-graph.d.ts +24 -13
- package/dist/packages/charts/src/graph/tree-diagram.d.ts +41 -0
- package/dist/packages/charts/src/graph/tree-layout.d.ts +71 -0
- package/dist/packages/charts/src/hierarchy/area-mark.d.ts +17 -0
- package/dist/packages/charts/src/hierarchy/icicle.d.ts +35 -0
- package/dist/packages/charts/src/hierarchy/index.d.ts +2 -0
- package/dist/packages/charts/src/hierarchy/partition-layout.d.ts +25 -0
- package/dist/packages/charts/src/hierarchy/treemap-layout.d.ts +26 -0
- package/dist/packages/charts/src/hierarchy/treemap.d.ts +11 -9
- package/dist/packages/charts/src/image/attribution-legend.d.ts +13 -0
- package/dist/packages/charts/src/image/attribution-overlay.d.ts +50 -0
- package/dist/packages/charts/src/image/attribution-ramp.d.ts +16 -0
- package/dist/packages/charts/src/image/image-atlas.d.ts +37 -0
- package/dist/packages/charts/src/image/image-fill.d.ts +9 -0
- package/dist/packages/charts/src/image/image-grid.d.ts +26 -0
- package/dist/packages/charts/src/image/image-input.d.ts +27 -0
- package/dist/packages/charts/src/image/image-tile.d.ts +27 -0
- package/dist/packages/charts/src/image/index.d.ts +7 -0
- package/dist/packages/charts/src/index.d.ts +16 -1
- package/dist/packages/charts/src/matrix/attention-matrix.d.ts +41 -0
- package/dist/packages/charts/src/matrix/calendar-heatmap.d.ts +37 -0
- package/dist/packages/charts/src/matrix/color-legend.d.ts +9 -2
- package/dist/packages/charts/src/matrix/confusion-matrix.d.ts +36 -0
- package/dist/packages/charts/src/matrix/correlation-matrix.d.ts +34 -0
- package/dist/packages/charts/src/matrix/heatmap-scale.d.ts +8 -2
- package/dist/packages/charts/src/matrix/index.d.ts +14 -3
- package/dist/packages/charts/src/matrix/matrix-cells.d.ts +27 -3
- package/dist/packages/charts/src/matrix/matrix-figure.d.ts +50 -0
- package/dist/packages/charts/src/matrix/matrix-mark.d.ts +34 -0
- package/dist/packages/charts/src/matrix/matrix-presets.d.ts +20 -0
- package/dist/packages/charts/src/matrix/matrix-range.d.ts +45 -0
- package/dist/packages/charts/src/matrix/matrix-strip.d.ts +13 -14
- package/dist/packages/charts/src/matrix/matrix-types.d.ts +40 -0
- package/dist/packages/charts/src/matrix/matrix.d.ts +13 -11
- package/dist/packages/charts/src/matrix/token-heatmap.d.ts +16 -10
- package/dist/packages/charts/src/plot/contours.d.ts +45 -0
- package/dist/packages/charts/src/plot/index.d.ts +49 -0
- package/dist/packages/charts/src/plot/label-place.d.ts +35 -0
- package/dist/packages/charts/src/plot/locate.d.ts +18 -0
- package/dist/packages/charts/src/plot/path.d.ts +39 -0
- package/dist/packages/charts/src/plot/plot-axes.d.ts +20 -0
- package/dist/packages/charts/src/plot/plot-layout.d.ts +221 -0
- package/dist/packages/charts/src/plot/plot-marks.d.ts +124 -0
- package/dist/packages/charts/src/plot/plot-surface.d.ts +32 -0
- package/dist/packages/charts/src/plot/render/density-layer.d.ts +17 -0
- package/dist/packages/charts/src/plot/render/hit-index.d.ts +37 -0
- package/dist/packages/charts/src/plot/render/plot-viewport.d.ts +39 -0
- package/dist/packages/charts/src/plot/render/point-layer.d.ts +41 -0
- package/dist/packages/charts/src/plot/render/theme-colors.d.ts +15 -0
- package/dist/packages/charts/src/plot/scale.d.ts +48 -0
- package/dist/packages/charts/src/plot/ticks.d.ts +34 -0
- package/dist/packages/charts/src/plot-width.d.ts +3 -3
- package/dist/packages/charts/src/relationship/contour-plot.d.ts +61 -0
- package/dist/packages/charts/src/relationship/density-map.d.ts +45 -0
- package/dist/packages/charts/src/relationship/embedding-map.d.ts +75 -0
- package/dist/packages/charts/src/relationship/index.d.ts +11 -0
- package/dist/packages/charts/src/relationship/level-legend.d.ts +11 -0
- package/dist/packages/charts/src/relationship/measures.d.ts +85 -0
- package/dist/packages/charts/src/relationship/parallel-coordinates.d.ts +30 -0
- package/dist/packages/charts/src/relationship/range-controls.d.ts +20 -0
- package/dist/packages/charts/src/relationship/scatter-matrix.d.ts +20 -0
- package/dist/packages/charts/src/spec/chart-guide.d.ts +21 -0
- package/dist/packages/charts/src/spec/figure-registry.d.ts +44 -0
- package/dist/packages/charts/src/spec/figure-spec.d.ts +147 -0
- package/dist/packages/charts/src/spec/figure-text.d.ts +8 -0
- package/dist/packages/charts/src/spec/figure.d.ts +12 -0
- package/dist/packages/charts/src/spec/guide-data.d.ts +85 -0
- package/dist/packages/charts/src/spec/index.d.ts +10 -0
- package/dist/packages/charts/src/spec/validate-figure.d.ts +15 -0
- package/dist/packages/charts/src/text/index.d.ts +11 -0
- package/dist/packages/charts/src/text/token-examples.d.ts +42 -0
- package/dist/packages/charts/src/text/token-grid.d.ts +47 -0
- package/dist/packages/charts/src/text/token-links.d.ts +49 -0
- package/dist/packages/charts/src/text/token-predictions.d.ts +38 -0
- package/dist/packages/charts/src/text/token-scale.d.ts +20 -0
- package/dist/packages/charts/src/text/token-text.d.ts +39 -0
- package/dist/packages/charts/src/timeline/event-strip.d.ts +70 -0
- package/dist/packages/charts/src/timeline/index.d.ts +3 -1
- package/dist/packages/charts/src/timeline/waterfall.d.ts +29 -14
- package/dist/packages/charts/src/transforms/bins.d.ts +91 -0
- package/dist/packages/charts/src/transforms/density.d.ts +53 -0
- package/dist/packages/charts/src/transforms/fits.d.ts +50 -0
- package/dist/packages/charts/src/transforms/index.d.ts +19 -0
- package/dist/packages/charts/src/transforms/matrices.d.ts +49 -0
- package/dist/packages/charts/src/transforms/quantiles.d.ts +96 -0
- package/dist/packages/charts/src/transforms/ranks.d.ts +44 -0
- package/dist/packages/charts/src/transforms/runs.d.ts +47 -0
- package/dist/packages/charts/src/transforms/sampling.d.ts +75 -0
- package/dist/packages/charts/src/transforms/smoothing.d.ts +41 -0
- package/dist/packages/charts/src/transforms/values.d.ts +70 -0
- package/dist/packages/charts/src/trend/bump-chart.d.ts +33 -0
- package/dist/packages/charts/src/trend/column-figure.d.ts +38 -0
- package/dist/packages/charts/src/trend/column-positions.d.ts +21 -0
- package/dist/packages/charts/src/trend/curve-chart.d.ts +69 -0
- package/dist/packages/charts/src/trend/end-labels.d.ts +40 -0
- package/dist/packages/charts/src/trend/horizon-chart.d.ts +37 -0
- package/dist/packages/charts/src/trend/index.d.ts +10 -0
- package/dist/packages/charts/src/trend/line-locate.d.ts +21 -0
- package/dist/packages/charts/src/trend/runs-chart.d.ts +50 -0
- package/dist/packages/charts/src/trend/slope-chart.d.ts +35 -0
- package/dist/packages/collections/src/collection-controls.d.ts +5 -1
- package/dist/packages/collections/src/collection-filters.d.ts +4 -1
- package/dist/packages/collections/src/control-toolbar.d.ts +13 -0
- package/dist/packages/collections/src/data-table-layout.d.ts +78 -0
- package/dist/packages/collections/src/data-table-rows.d.ts +54 -0
- package/dist/packages/collections/src/data-table-styles.d.ts +340 -0
- package/dist/packages/collections/src/data-table-text.d.ts +13 -0
- package/dist/packages/collections/src/data-table-trigger.d.ts +23 -0
- package/dist/packages/collections/src/data-table.d.ts +3 -85
- package/dist/packages/collections/src/index.d.ts +11 -6
- package/dist/packages/collections/src/query-controls.d.ts +6 -2
- package/dist/packages/collections/src/table-results.d.ts +47 -13
- package/dist/packages/collections/src/timeline.d.ts +1 -0
- package/dist/packages/collections/src/use-collection-controls.d.ts +2 -1
- package/dist/packages/collections/src/use-table-window.d.ts +25 -0
- package/dist/packages/content/src/viewer.d.ts +8 -0
- package/dist/packages/core/src/disclosure.d.ts +9 -1
- package/dist/packages/core/src/index.d.ts +1 -0
- package/dist/packages/core/src/route-link.d.ts +11 -0
- package/dist/packages/forms/src/dates/date-inputs.d.ts +3 -1
- package/dist/packages/forms/src/file-picker.d.ts +15 -0
- package/dist/packages/forms/src/form-controls.d.ts +1 -6
- package/dist/packages/forms/src/forms.d.ts +4 -1
- package/dist/packages/forms/src/index.d.ts +4 -2
- package/dist/packages/forms/src/selection.d.ts +14 -0
- package/dist/packages/foundations/src/csp/index.d.ts +1 -1
- package/dist/packages/foundations/src/csp/provider.d.ts +7 -2
- package/dist/packages/kits/src/evaluation/evaluation-data.d.ts +31 -0
- package/dist/packages/kits/src/evaluation/index.d.ts +8 -0
- package/dist/packages/kits/src/evaluation/leaderboard-cells.d.ts +62 -0
- package/dist/packages/kits/src/evaluation/leaderboard.d.ts +59 -0
- package/dist/packages/kits/src/evaluation/model-comparison.d.ts +59 -0
- package/dist/packages/kits/src/evaluation/score-breakdown.d.ts +33 -0
- package/dist/packages/kits/src/explainers/bound-value.d.ts +29 -0
- package/dist/packages/kits/src/explainers/figures.d.ts +31 -0
- package/dist/packages/kits/src/explainers/index.d.ts +8 -0
- package/dist/packages/kits/src/explainers/linked-target.d.ts +22 -0
- package/dist/packages/kits/src/explainers/story-steps.d.ts +46 -0
- package/dist/packages/kits/src/explainers/term.d.ts +29 -0
- package/dist/packages/kits/src/interpretability/attention-head-grid.d.ts +56 -0
- package/dist/packages/kits/src/interpretability/attribution-workbench.d.ts +29 -0
- package/dist/packages/kits/src/interpretability/embedding-atlas.d.ts +41 -0
- package/dist/packages/kits/src/interpretability/feature-card.d.ts +33 -0
- package/dist/packages/kits/src/interpretability/feature-list.d.ts +51 -0
- package/dist/packages/kits/src/interpretability/feature-logits.d.ts +23 -0
- package/dist/packages/kits/src/interpretability/features.d.ts +70 -0
- package/dist/packages/kits/src/interpretability/index.d.ts +16 -0
- package/dist/packages/kits/src/interpretability/kit-styles.d.ts +118 -0
- package/dist/packages/kits/src/interpretability/logit-lens.d.ts +50 -0
- package/dist/packages/kits/src/interpretability/node-panel.d.ts +32 -0
- package/dist/packages/kits/src/interpretability/shared-link.d.ts +8 -0
- package/dist/packages/kits/src/interpretability/steering-panel.d.ts +52 -0
- package/dist/packages/kits/src/operations/budget-board.d.ts +49 -0
- package/dist/packages/kits/src/operations/incident-timeline.d.ts +30 -0
- package/dist/packages/kits/src/operations/index.d.ts +6 -0
- package/dist/packages/kits/src/operations/service-health.d.ts +66 -0
- package/dist/packages/kits/src/training/index.d.ts +8 -0
- package/dist/packages/kits/src/training/run-dashboard.d.ts +49 -0
- package/dist/packages/kits/src/training/run-legend.d.ts +21 -0
- package/dist/packages/kits/src/training/run-marker.d.ts +5 -0
- package/dist/packages/kits/src/training/run-state.d.ts +7 -0
- package/dist/packages/kits/src/training/run-table.d.ts +63 -0
- package/dist/packages/kits/src/training/runs-overview.d.ts +20 -0
- package/dist/packages/kits/src/training/runs.d.ts +34 -0
- package/dist/packages/navigation/src/index.d.ts +1 -1
- package/dist/path-BglsXpnO.js +59 -0
- package/dist/{pierre-diff-B3tD3-6z.js → pierre-diff-DlvjyuJn.js} +1 -1
- package/dist/plot-axes-DJkLW4wk.js +100 -0
- package/dist/plot-layout-BEuoOHbs.js +911 -0
- package/dist/plot-marks-A64v7aTw.js +226 -0
- package/dist/plot-surface-CJTIqtck.js +51 -0
- package/dist/{plot-width-CIqBiHcd.js → plot-width-DcqtSgzb.js} +22 -3
- package/dist/point-layer-C-EYETAt.js +655 -0
- package/dist/reference-lines-CWA8VeUR.js +82 -0
- package/dist/scale-C2xgZyZN.js +63 -0
- package/dist/slope-chart-DT22h_ym.js +1279 -0
- package/dist/{src-gqEebHEa.js → src-1EHkSFS-.js} +395 -274
- package/dist/{src-DBNncL7_.js → src-BPTDJqt0.js} +48 -68
- package/dist/{src-Dcs3SZ9V.js → src-CExIrXPC.js} +170 -194
- package/dist/src-CGc_hjxJ.js +409 -0
- package/dist/{src-DcW_gMX8.js → src-CpdJlDhO.js} +480 -362
- package/dist/src-D5NXRJZe.js +2195 -0
- package/dist/src-DIS0YOj0.js +44 -0
- package/dist/styles2.css +574 -161
- package/dist/time-series-IB3CB93O.js +2668 -0
- package/dist/token-heatmap-C00DnoNO.js +1354 -0
- package/dist/token-predictions-Cxx29iDr.js +1093 -0
- package/dist/tone-scope-DKiSw-JR.js +32 -0
- package/dist/tree-diagram-DsckNKaW.js +1629 -0
- package/dist/treemap-9_DpLCW9.js +472 -0
- package/dist/values-963L6n1m.js +65 -0
- package/dist/violin-plot-BhPHKXsN.js +1291 -0
- package/dist/waterfall-CGksuTy5.js +576 -0
- package/package.json +57 -7
- package/recipes/allocation-report.tsx +15 -7
- package/skills/extend-elements/SKILL.md +134 -0
- package/skills/review-elements/SKILL.md +118 -0
- package/skills/upgrade-elements/SKILL.md +36 -0
- package/skills/upgrade-elements/references/releases.md +242 -0
- package/skills/use-elements/SKILL.md +70 -13
- package/skills/use-elements/references/agent.md +57 -0
- package/skills/use-elements/references/charts.md +384 -0
- package/skills/use-elements/references/collections.md +89 -0
- package/skills/use-elements/references/conversations.md +47 -0
- package/skills/use-elements/references/figures.md +173 -0
- package/skills/use-elements/references/forms.md +81 -0
- package/skills/use-elements/references/kits.md +198 -0
- package/skills/use-elements/references/styling.md +70 -0
- package/skills/use-elements/references/workspace.md +3 -3
- package/dist/categorical-values-DZLGQVW1.js +0 -63
- package/dist/chart-frame-Ztktqs1b.js +0 -255
- package/dist/chart-input-BO3BqlFO.js +0 -22
- package/dist/chart-navigation-BAbb5PV9.js +0 -154
- package/dist/header-styles-COxCYFZx.js +0 -90
- package/dist/packages/charts/src/chart-navigation.d.ts +0 -39
- package/dist/packages/charts/src/chart-surface.d.ts +0 -27
- package/dist/packages/navigation/src/route-link.d.ts +0 -2
- package/dist/src-Bk7M67zy.js +0 -396
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { FigureProps, ValueFormat } from '../../../charts/src/index.ts';
|
|
3
|
+
import type { TokenGridCell, TokenGridColumn } from '../../../charts/src/text/index.ts';
|
|
4
|
+
import type { InterpretabilityChangeDetails } from './features.ts';
|
|
5
|
+
/** One layer the lens reads the residual stream at, from the first layer down to the last. */
|
|
6
|
+
export type LensLayer = {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly label: string;
|
|
9
|
+
/** The layer's number, the horizontal position of its point in the curve. */
|
|
10
|
+
readonly depth: number;
|
|
11
|
+
};
|
|
12
|
+
/** The probability of one chosen token at one position, read at each layer in `layers` order. */
|
|
13
|
+
export type LensTrack = {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
/** The prompt position, a column id. */
|
|
16
|
+
readonly columnId: string;
|
|
17
|
+
readonly token: string;
|
|
18
|
+
/** One value per layer, in layer order. Null where it was not read. */
|
|
19
|
+
readonly probabilities: ReadonlyArray<number | null>;
|
|
20
|
+
};
|
|
21
|
+
/** The words around the lens. Each has an English default. */
|
|
22
|
+
export type LogitLensLabels = {
|
|
23
|
+
readonly probability: string;
|
|
24
|
+
readonly layer: string;
|
|
25
|
+
readonly curveTitle: string;
|
|
26
|
+
readonly curveDescription: string;
|
|
27
|
+
readonly noPosition: string;
|
|
28
|
+
};
|
|
29
|
+
export type LogitLensProps = Pick<FigureProps, 'title' | 'description' | 'locale' | 'status' | 'coverage' | 'source' | 'transforms'> & {
|
|
30
|
+
/** The prompt's tokens, one column each. */
|
|
31
|
+
readonly columns: ReadonlyArray<TokenGridColumn>;
|
|
32
|
+
readonly layers: ReadonlyArray<LensLayer>;
|
|
33
|
+
/** The top prediction at each layer and position, with its probability. */
|
|
34
|
+
readonly cells: ReadonlyArray<TokenGridCell>;
|
|
35
|
+
/** The tokens to follow through the layers, for any positions the application chose. */
|
|
36
|
+
readonly tracks?: ReadonlyArray<LensTrack> | undefined;
|
|
37
|
+
/** How probabilities are written. Absent writes a percent. */
|
|
38
|
+
readonly valueFormat?: ValueFormat | undefined;
|
|
39
|
+
/** The cell in focus, as `tokenGridCellId(layerId, columnId)`. Its position's tracks are drawn as curves. */
|
|
40
|
+
readonly selected?: string | null | undefined;
|
|
41
|
+
readonly onSelectedChange?: ((id: string, details: InterpretabilityChangeDetails) => void) | undefined;
|
|
42
|
+
readonly labels?: Partial<LogitLensLabels> | undefined;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* A logit lens, as interpretability write-ups show one: the model's top next-token guess at every layer and prompt
|
|
46
|
+
* position, shaded by its probability. It shows a reader where in depth the answer forms. Selecting a cell draws, for
|
|
47
|
+
* that position, how the chosen tokens' probabilities change from layer to layer, while the application decodes every
|
|
48
|
+
* layer and supplies the cells and tracks.
|
|
49
|
+
*/
|
|
50
|
+
export declare function LogitLens({ columns, layers, cells, tracks, valueFormat, selected, onSelectedChange, labels: given, ...figure }: LogitLensProps): ReactNode;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AttributionNode } from '../../../charts/src/graph/index.ts';
|
|
3
|
+
import type { FigureStatus } from '../../../charts/src/index.ts';
|
|
4
|
+
import type { FeatureCardLabels } from './feature-card.tsx';
|
|
5
|
+
import type { FeatureCardData, InterpretabilityChangeDetails } from './features.ts';
|
|
6
|
+
/** The words in the workbench's side panel. */
|
|
7
|
+
export type NodePanelLabels = {
|
|
8
|
+
readonly hint: string;
|
|
9
|
+
readonly pinned: string;
|
|
10
|
+
readonly noPins: string;
|
|
11
|
+
readonly pin: string;
|
|
12
|
+
readonly unpin: string;
|
|
13
|
+
readonly noDetails: string;
|
|
14
|
+
readonly card: Partial<FeatureCardLabels>;
|
|
15
|
+
};
|
|
16
|
+
type NodePanelProps = {
|
|
17
|
+
readonly nodes: ReadonlyArray<AttributionNode>;
|
|
18
|
+
readonly details: Readonly<Record<string, FeatureCardData>>;
|
|
19
|
+
readonly locale: string;
|
|
20
|
+
readonly status?: FigureStatus | undefined;
|
|
21
|
+
readonly selected: string | null;
|
|
22
|
+
readonly pinned: ReadonlyArray<string>;
|
|
23
|
+
readonly onSelectedChange: (id: string, details: InterpretabilityChangeDetails) => void;
|
|
24
|
+
readonly onPinnedChange: (ids: ReadonlyArray<string>, details: InterpretabilityChangeDetails) => void;
|
|
25
|
+
readonly labels: NodePanelLabels;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The node in focus beside an attribution graph: the node the reader points at, else the selected node, else the last
|
|
29
|
+
* pinned one, as a compact feature card. Under it, the pinned nodes as buttons that select them.
|
|
30
|
+
*/
|
|
31
|
+
export declare function NodePanel({ nodes, details, locale, status, selected, pinned, onSelectedChange, onPinnedChange, labels, }: NodePanelProps): ReactNode;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Puts a kit view's figures in one chart link, unless the view already sits in a link the page shares. A list and a map
|
|
4
|
+
* on one page then light the same feature.
|
|
5
|
+
*/
|
|
6
|
+
export declare function SharedLink({ children }: {
|
|
7
|
+
readonly children: ReactNode;
|
|
8
|
+
}): ReactNode;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { FigureProps, ValueFormat } from '../../../charts/src/index.ts';
|
|
3
|
+
import type { TokenPrediction } from '../../../charts/src/text/index.ts';
|
|
4
|
+
import type { InterpretabilityChangeDetails } from './features.ts';
|
|
5
|
+
/** A feature the reader can steer with, and the range its strength may take. */
|
|
6
|
+
export type SteeringFeature = {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly label: string;
|
|
9
|
+
/** What steering with it should do: "Pulls the text toward the bridge". */
|
|
10
|
+
readonly description?: string | undefined;
|
|
11
|
+
readonly min: number;
|
|
12
|
+
readonly max: number;
|
|
13
|
+
readonly step: number;
|
|
14
|
+
/** The strength that leaves the model unchanged. Absent means 0. Reset returns every slider here. */
|
|
15
|
+
readonly neutral?: number | undefined;
|
|
16
|
+
};
|
|
17
|
+
/** The model's text continuation before and after steering, as the application generated them. */
|
|
18
|
+
export type SteeringCompletions = {
|
|
19
|
+
readonly baseline: string;
|
|
20
|
+
readonly steered: string;
|
|
21
|
+
};
|
|
22
|
+
/** The words in the panel. Each has an English default. */
|
|
23
|
+
export type SteeringPanelLabels = {
|
|
24
|
+
readonly controls: string;
|
|
25
|
+
readonly reset: string;
|
|
26
|
+
readonly prompt: string;
|
|
27
|
+
readonly predictions: string;
|
|
28
|
+
readonly predictionsDescription: string;
|
|
29
|
+
readonly baseline: string;
|
|
30
|
+
readonly steered: string;
|
|
31
|
+
};
|
|
32
|
+
export type SteeringPanelProps = Pick<FigureProps, 'title' | 'locale' | 'status' | 'source'> & {
|
|
33
|
+
readonly features: ReadonlyArray<SteeringFeature>;
|
|
34
|
+
/** The strength of each feature, keyed by feature id. A feature without a value sits at its neutral strength. */
|
|
35
|
+
readonly values: Readonly<Record<string, number>>;
|
|
36
|
+
readonly onValuesChange?: ((values: Readonly<Record<string, number>>, details: InterpretabilityChangeDetails) => void) | undefined;
|
|
37
|
+
/** How a strength is written beside its slider. */
|
|
38
|
+
readonly strengthFormat?: ValueFormat | undefined;
|
|
39
|
+
/** The prompt the outputs continue. */
|
|
40
|
+
readonly prompt?: string | undefined;
|
|
41
|
+
/** The next-token predictions with steering, each with its probability before steering as `baseline`. */
|
|
42
|
+
readonly predictions: ReadonlyArray<TokenPrediction>;
|
|
43
|
+
readonly completions?: SteeringCompletions | undefined;
|
|
44
|
+
readonly labels?: Partial<SteeringPanelLabels> | undefined;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Steering, as feature-steering demos show it: a slider per feature strength beside what the model does with that
|
|
48
|
+
* setting. It shows next-token predictions with ticks for the same tokens before steering and, when supplied, the text
|
|
49
|
+
* it continues with before and after. The kit never runs a model: the application holds the strengths, hears each
|
|
50
|
+
* change, and supplies the outputs for the current setting.
|
|
51
|
+
*/
|
|
52
|
+
export declare function SteeringPanel({ title, locale, status, source, features, values, onValuesChange, strengthFormat, prompt, predictions, completions, labels: given, }: SteeringPanelProps): ReactNode;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BulletRange } from '../../../charts/src/comparison/index.ts';
|
|
3
|
+
import type { FigureSelectionProps, FigureStatus, PlotAxis } from '../../../charts/src/index.ts';
|
|
4
|
+
/** How the row's state icon reads. The state itself is always written in words. */
|
|
5
|
+
export type BudgetTone = 'positive' | 'warning' | 'negative' | 'neutral';
|
|
6
|
+
/** One objective or budget: what was measured, what it is held against, and the application's verdict in words. */
|
|
7
|
+
export type BudgetRow = {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
/** The measured amount, or null where it was not measured. */
|
|
11
|
+
readonly value: number | null;
|
|
12
|
+
/** The objective or budget limit. */
|
|
13
|
+
readonly target: number;
|
|
14
|
+
/** Qualitative bands behind the bar, in increasing `upTo`. */
|
|
15
|
+
readonly ranges?: ReadonlyArray<BulletRange> | undefined;
|
|
16
|
+
/** The state in words, such as "Within budget" or "Budget spent". The application decides it. */
|
|
17
|
+
readonly state: string;
|
|
18
|
+
readonly tone: BudgetTone;
|
|
19
|
+
/** One sentence of evidence beside the state, such as "31% of the monthly budget left". */
|
|
20
|
+
readonly detail?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
/** Rows that share one measured axis and unit, such as every latency objective. */
|
|
23
|
+
export type BudgetGroup = {
|
|
24
|
+
readonly id: string;
|
|
25
|
+
readonly title: string;
|
|
26
|
+
readonly description?: string | undefined;
|
|
27
|
+
/** The measured axis of the group. It starts at zero. */
|
|
28
|
+
readonly value: PlotAxis;
|
|
29
|
+
readonly rows: ReadonlyArray<BudgetRow>;
|
|
30
|
+
};
|
|
31
|
+
/** The words BudgetBoard writes itself. Each has an English default. */
|
|
32
|
+
export type BudgetBoardLabels = {
|
|
33
|
+
readonly empty: string;
|
|
34
|
+
readonly duplicateIds: string;
|
|
35
|
+
readonly measured: string;
|
|
36
|
+
readonly target: string;
|
|
37
|
+
};
|
|
38
|
+
export type BudgetBoardProps = FigureSelectionProps & {
|
|
39
|
+
readonly groups: ReadonlyArray<BudgetGroup>;
|
|
40
|
+
readonly locale: string;
|
|
41
|
+
readonly status?: FigureStatus | undefined;
|
|
42
|
+
readonly labels?: Partial<BudgetBoardLabels> | undefined;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Service level objectives and budgets as bars against their targets, with the state of each written in words beside
|
|
46
|
+
* its name. Rows that share a unit go in one group and share an axis. The application supplies every value, target,
|
|
47
|
+
* range and verdict: a state is never worked out from a color or a number.
|
|
48
|
+
*/
|
|
49
|
+
export declare function BudgetBoard({ groups, locale, status, selected, onSelectedChange, labels, }: BudgetBoardProps): ReactNode;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { FigureProps, FigureSelectionProps } from '../../../charts/src/index.ts';
|
|
3
|
+
import type { EventStripTime } from '../../../charts/src/timeline/index.ts';
|
|
4
|
+
/** What kind of thing happened. Each kind has its own lane. */
|
|
5
|
+
export type OperationEventKind = 'deploy' | 'alert' | 'incident';
|
|
6
|
+
/** Something that happened to the service. */
|
|
7
|
+
export type OperationEvent = {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly kind: OperationEventKind;
|
|
10
|
+
readonly label: string;
|
|
11
|
+
/** When it started, in milliseconds since the epoch. */
|
|
12
|
+
readonly start: number;
|
|
13
|
+
/** When it ended, after `start`. Leave it out for an instant, such as a deploy or an alert. */
|
|
14
|
+
readonly end?: number | undefined;
|
|
15
|
+
/** One sentence of detail, such as the severity or the change. */
|
|
16
|
+
readonly detail?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
/** The lane names IncidentTimeline writes itself. Each has an English default. */
|
|
19
|
+
export type IncidentTimelineLabels = Readonly<Record<OperationEventKind, string>>;
|
|
20
|
+
export type IncidentTimelineProps = FigureProps & FigureSelectionProps & EventStripTime & {
|
|
21
|
+
readonly events: ReadonlyArray<OperationEvent>;
|
|
22
|
+
/** The first and last instant shown, in milliseconds. Use the range of the charts beside it. */
|
|
23
|
+
readonly window: readonly [start: number, end: number];
|
|
24
|
+
readonly labels?: Partial<IncidentTimelineLabels> | undefined;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Deploys, alerts and incidents in three lanes over the same time range as the charts. An instant is a dot and an
|
|
28
|
+
* interval a bar. The application owns the selected event and the time format, which names its time zone.
|
|
29
|
+
*/
|
|
30
|
+
export declare function IncidentTimeline({ events, window, labels, ...strip }: IncidentTimelineProps): ReactNode;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { BudgetBoardLabels, BudgetBoardProps, BudgetGroup, BudgetRow, BudgetTone } from './budget-board.tsx';
|
|
2
|
+
export { BudgetBoard } from './budget-board.tsx';
|
|
3
|
+
export type { IncidentTimelineLabels, IncidentTimelineProps, OperationEvent, OperationEventKind, } from './incident-timeline.tsx';
|
|
4
|
+
export { IncidentTimeline } from './incident-timeline.tsx';
|
|
5
|
+
export type { ServiceHealthLabels, ServiceHealthProps, ServiceIndicator, ServiceState } from './service-health.tsx';
|
|
6
|
+
export { ServiceHealth } from './service-health.tsx';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SmallMultiplesPanel, TimeSeriesPoint, TimestampUnit } from '../../../charts/src/cartesian/index.ts';
|
|
3
|
+
import type { FigureStatus, NumericDomain, PlotHeight, TimeFormat, ValueFormat } from '../../../charts/src/index.ts';
|
|
4
|
+
/** How the service is doing right now, as the application judged it. The kit never infers it from the numbers. */
|
|
5
|
+
export type ServiceState = 'healthy' | 'degraded' | 'down' | 'unknown';
|
|
6
|
+
/** One headline measure of the service, shown as a tile. */
|
|
7
|
+
export type ServiceIndicator = {
|
|
8
|
+
/** Also the id of the chart series that draws the same measure, so the tile and the chart share one hue. */
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly label: string;
|
|
11
|
+
/** The latest value, or null where it was not measured. */
|
|
12
|
+
readonly value: number | null;
|
|
13
|
+
readonly format: ValueFormat;
|
|
14
|
+
/** How the value moved, written beside it: the amount, how to write it, and what it is compared with. */
|
|
15
|
+
readonly change?: {
|
|
16
|
+
readonly value: number;
|
|
17
|
+
readonly format: ValueFormat;
|
|
18
|
+
readonly label: string;
|
|
19
|
+
} | undefined;
|
|
20
|
+
/** The level the measure is held against, such as "Objective". */
|
|
21
|
+
readonly target?: {
|
|
22
|
+
readonly value: number;
|
|
23
|
+
readonly label: string;
|
|
24
|
+
} | undefined;
|
|
25
|
+
/** A small line of recent values. `valueDomain` must contain every value. */
|
|
26
|
+
readonly trend?: {
|
|
27
|
+
readonly points: ReadonlyArray<TimeSeriesPoint>;
|
|
28
|
+
readonly valueDomain: NumericDomain;
|
|
29
|
+
readonly unit: string;
|
|
30
|
+
} | undefined;
|
|
31
|
+
};
|
|
32
|
+
/** The words ServiceHealth writes itself. Each has an English default. */
|
|
33
|
+
export type ServiceHealthLabels = {
|
|
34
|
+
readonly healthy: string;
|
|
35
|
+
readonly degraded: string;
|
|
36
|
+
readonly down: string;
|
|
37
|
+
readonly unknown: string;
|
|
38
|
+
readonly indicators: string;
|
|
39
|
+
readonly charts: string;
|
|
40
|
+
readonly trendSummary: string;
|
|
41
|
+
readonly duplicateIds: string;
|
|
42
|
+
};
|
|
43
|
+
export type ServiceHealthProps = {
|
|
44
|
+
readonly service: {
|
|
45
|
+
readonly id: string;
|
|
46
|
+
readonly label: string;
|
|
47
|
+
readonly state: ServiceState;
|
|
48
|
+
/** One sentence on why the service is in this state. */
|
|
49
|
+
readonly stateDetail?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
readonly indicators: ReadonlyArray<ServiceIndicator>;
|
|
52
|
+
/** Time-series panels on the same observation timestamps. They share one time axis and one inspected timestamp. */
|
|
53
|
+
readonly charts: ReadonlyArray<SmallMultiplesPanel>;
|
|
54
|
+
readonly timestampUnit: TimestampUnit;
|
|
55
|
+
readonly timeFormat: TimeFormat;
|
|
56
|
+
readonly locale: string;
|
|
57
|
+
readonly height?: PlotHeight | undefined;
|
|
58
|
+
readonly status?: FigureStatus | undefined;
|
|
59
|
+
readonly labels?: Partial<ServiceHealthLabels> | undefined;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* One service at a glance: its state in words, a row of headline tiles with their recent trend, and time-series panels
|
|
63
|
+
* on one shared time axis. The application judges the state and supplies every value; nothing here infers health from a
|
|
64
|
+
* number or a color. Name a chart series like its tile and the two share a hue.
|
|
65
|
+
*/
|
|
66
|
+
export declare function ServiceHealth({ service, indicators, charts, timestampUnit, timeFormat, locale, height, status, labels, }: ServiceHealthProps): ReactNode;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { MetricPoint, MetricSeries, RunDashboardLabels, RunDashboardProps, RunMetric } from './run-dashboard.tsx';
|
|
2
|
+
export { RunDashboard } from './run-dashboard.tsx';
|
|
3
|
+
export type { RunColumn, RunTableLabels, RunTableMetric, RunTableProps } from './run-table.tsx';
|
|
4
|
+
export { RunTable } from './run-table.tsx';
|
|
5
|
+
export type { RunsOverviewProps } from './runs-overview.tsx';
|
|
6
|
+
export { RunsOverview } from './runs-overview.tsx';
|
|
7
|
+
export type { RunChangeDetails, RunRecord, RunState, RunStateLabels } from './runs.ts';
|
|
8
|
+
export { runLimits, runStateLabels } from './runs.ts';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { FigureProps, PlotAxis, PlotHeight } from '../../../charts/src/index.ts';
|
|
3
|
+
import type { CurvePoint } from '../../../charts/src/trend/index.ts';
|
|
4
|
+
import type { RunLegendLabels } from './run-legend.tsx';
|
|
5
|
+
import type { RunChangeDetails, RunRecord } from './runs.ts';
|
|
6
|
+
/** One measure the dashboard draws in its own panel. */
|
|
7
|
+
export type RunMetric = {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly title: string;
|
|
10
|
+
/** The measure's axis: its label, format and, when it should stay fixed between reads, its domain. */
|
|
11
|
+
readonly y: PlotAxis;
|
|
12
|
+
/** One sentence under the panel title: what is measured and which direction is better. */
|
|
13
|
+
readonly description?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
/** One observation of a metric at a step. A null `y` is a step with no recording; the line breaks there. */
|
|
16
|
+
export type MetricPoint = Pick<CurvePoint, 'x' | 'y'>;
|
|
17
|
+
/** The curves to draw: metric id, then run id, then the run's observations in increasing step. */
|
|
18
|
+
export type MetricSeries = Readonly<Record<string, Readonly<Record<string, ReadonlyArray<MetricPoint>>>>>;
|
|
19
|
+
/** The words around the dashboard. Each has an English default. */
|
|
20
|
+
export type RunDashboardLabels = RunLegendLabels & {
|
|
21
|
+
readonly noRuns: string;
|
|
22
|
+
readonly allHidden: string;
|
|
23
|
+
};
|
|
24
|
+
export type RunDashboardProps = Pick<FigureProps, 'title' | 'description' | 'locale' | 'status' | 'coverage' | 'transforms'> & {
|
|
25
|
+
readonly runs: ReadonlyArray<RunRecord>;
|
|
26
|
+
readonly metrics: ReadonlyArray<RunMetric>;
|
|
27
|
+
readonly series: MetricSeries;
|
|
28
|
+
/** The step axis every panel shares. */
|
|
29
|
+
readonly x: PlotAxis;
|
|
30
|
+
/** The run in focus: its curves keep their hue and every other run turns gray. Null or absent focuses none. */
|
|
31
|
+
readonly selected?: string | null | undefined;
|
|
32
|
+
readonly onSelectedChange?: ((id: string | null, details: RunChangeDetails) => void) | undefined;
|
|
33
|
+
/** The ids of the runs toggled off. They leave the charts but keep their hue for when they come back. */
|
|
34
|
+
readonly hidden?: ReadonlyArray<string> | undefined;
|
|
35
|
+
readonly onHiddenChange?: ((ids: ReadonlyArray<string>, details: RunChangeDetails) => void) | undefined;
|
|
36
|
+
/** Shows a row of run chips above the panels. Turn it off when a `RunTable` is the legend. */
|
|
37
|
+
readonly hasLegend?: boolean | undefined;
|
|
38
|
+
readonly height?: PlotHeight | undefined;
|
|
39
|
+
/** The narrowest a panel may be, in CSS pixels. */
|
|
40
|
+
readonly minPanelWidth?: number | undefined;
|
|
41
|
+
readonly labels?: Partial<RunDashboardLabels> | undefined;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* A panel of curves per metric for a set of runs, as a training team watches them. It has one hue per run in every
|
|
45
|
+
* panel and one step cursor that moves in all panels together, and focusing a run turns the others gray. Hiding a run
|
|
46
|
+
* removes its curves, and the application holds both choices and supplies prepared series, smoothed or not, for every
|
|
47
|
+
* metric.
|
|
48
|
+
*/
|
|
49
|
+
export declare function RunDashboard({ title, description, locale, status, coverage, transforms, runs, metrics, series, x, selected, onSelectedChange, hidden, onHiddenChange, hasLegend, height, minPanelWidth, labels: given, }: RunDashboardProps): ReactNode;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { RunChangeDetails, RunRecord, RunState } from './runs.ts';
|
|
3
|
+
export type RunLegendLabels = {
|
|
4
|
+
readonly legend: string;
|
|
5
|
+
readonly hide: string;
|
|
6
|
+
readonly show: string;
|
|
7
|
+
readonly states: Readonly<Record<RunState, string>>;
|
|
8
|
+
};
|
|
9
|
+
export type RunLegendProps = {
|
|
10
|
+
readonly runs: ReadonlyArray<RunRecord>;
|
|
11
|
+
readonly selected: string | null;
|
|
12
|
+
readonly hidden: ReadonlyArray<string>;
|
|
13
|
+
readonly labels: RunLegendLabels;
|
|
14
|
+
readonly onSelectedChange?: ((id: string | null, details: RunChangeDetails) => void) | undefined;
|
|
15
|
+
readonly onHiddenChange?: ((ids: ReadonlyArray<string>, details: RunChangeDetails) => void) | undefined;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* One chip per run: pressing the name focuses the run in the charts, pressing the eye hides or shows its curves. The
|
|
19
|
+
* application holds both choices.
|
|
20
|
+
*/
|
|
21
|
+
export declare function RunLegend({ runs, selected, hidden, labels, onSelectedChange, onHiddenChange, }: RunLegendProps): ReactNode;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { RunState, RunStateLabels } from './runs.ts';
|
|
3
|
+
/** A run's state in words, with a small icon that never carries the meaning alone. */
|
|
4
|
+
export declare function RunStateText({ state, labels, }: {
|
|
5
|
+
readonly state: RunState;
|
|
6
|
+
readonly labels: RunStateLabels;
|
|
7
|
+
}): ReactNode;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { FigureProps, ValueFormat } from '../../../charts/src/index.ts';
|
|
3
|
+
import type { DataTableSort } from '../../../collections/src/index.ts';
|
|
4
|
+
import type { RunChangeDetails, RunRecord, RunStateLabels } from './runs.ts';
|
|
5
|
+
/** A setting of each run, such as its learning rate or optimizer. */
|
|
6
|
+
export type RunColumn = {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly label: string;
|
|
9
|
+
/** The setting's value per run id. A number is written with `format`; a missing run shows as unavailable. */
|
|
10
|
+
readonly values: Readonly<Record<string, string | number | boolean | null>>;
|
|
11
|
+
readonly format?: ValueFormat | undefined;
|
|
12
|
+
};
|
|
13
|
+
/** A final result of each run, drawn with the graphic that fits it. */
|
|
14
|
+
export type RunTableMetric = {
|
|
15
|
+
readonly id: string;
|
|
16
|
+
/** The column heading, with its direction: "Final loss, lower is better". */
|
|
17
|
+
readonly label: string;
|
|
18
|
+
readonly format: ValueFormat;
|
|
19
|
+
/** The scale every row shares. A bar's domain must include zero. */
|
|
20
|
+
readonly domain: readonly [minimum: number, maximum: number];
|
|
21
|
+
} & ({
|
|
22
|
+
readonly kind: 'bar';
|
|
23
|
+
readonly values: Readonly<Record<string, number | null>>;
|
|
24
|
+
} | {
|
|
25
|
+
readonly kind: 'spark';
|
|
26
|
+
readonly values: Readonly<Record<string, ReadonlyArray<number | null>>>;
|
|
27
|
+
});
|
|
28
|
+
/** The words in the table. Each has an English default. */
|
|
29
|
+
export type RunTableLabels = {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly state: string;
|
|
32
|
+
readonly states: RunStateLabels;
|
|
33
|
+
readonly yes: string;
|
|
34
|
+
readonly no: string;
|
|
35
|
+
readonly empty: string;
|
|
36
|
+
readonly showRun: string;
|
|
37
|
+
readonly focused: string;
|
|
38
|
+
};
|
|
39
|
+
export type RunTableProps = Pick<FigureProps, 'locale' | 'status'> & {
|
|
40
|
+
/** The table's caption, which names it for assistive technology. */
|
|
41
|
+
readonly title: string;
|
|
42
|
+
readonly runs: ReadonlyArray<RunRecord>;
|
|
43
|
+
readonly columns?: ReadonlyArray<RunColumn> | undefined;
|
|
44
|
+
readonly metrics?: ReadonlyArray<RunTableMetric> | undefined;
|
|
45
|
+
/** Hides the settings every run shares, so only what differs between runs is left. */
|
|
46
|
+
readonly showOnlyDifferences?: boolean | undefined;
|
|
47
|
+
/** The focused run. Pressing a row asks to focus it, or to clear the focus when it is already focused. */
|
|
48
|
+
readonly selected?: string | null | undefined;
|
|
49
|
+
readonly onSelectedChange?: ((id: string | null, details: RunChangeDetails) => void) | undefined;
|
|
50
|
+
/** The runs toggled off. A checked row is a run drawn in the dashboard. */
|
|
51
|
+
readonly hidden?: ReadonlyArray<string> | undefined;
|
|
52
|
+
readonly onHiddenChange?: ((ids: ReadonlyArray<string>, details: RunChangeDetails) => void) | undefined;
|
|
53
|
+
readonly sort?: DataTableSort | null | undefined;
|
|
54
|
+
readonly onSortChange?: ((sort: DataTableSort | undefined) => void) | undefined;
|
|
55
|
+
readonly labels?: Partial<RunTableLabels> | undefined;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The runs of an experiment as a table that is also the legend: each row carries the run's hue and its state in words.
|
|
59
|
+
* It shows the settings that differ between runs and the final results as bars or tiny curves, and settings every run
|
|
60
|
+
* shares are muted, or hidden with `showOnlyDifferences`. The checkboxes hide runs in a `RunDashboard` and pressing a
|
|
61
|
+
* row focuses a run, while the application supplies the values and holds selection, hiding and sorting.
|
|
62
|
+
*/
|
|
63
|
+
export declare function RunTable({ title, locale, status, runs, columns, metrics, showOnlyDifferences, selected, onSelectedChange, hidden, onHiddenChange, sort, onSortChange, labels: given, }: RunTableProps): ReactNode;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { FigureProps, FigureSelectionProps, PlotAxis, PlotHeight } from '../../../charts/src/index.ts';
|
|
3
|
+
import type { RunsSummary, TrainingRun } from '../../../charts/src/trend/index.ts';
|
|
4
|
+
export type RunsOverviewProps = FigureProps & FigureSelectionProps & {
|
|
5
|
+
/** Every run of the sweep with its curve of one metric. Each is a thin gray line until it is selected. */
|
|
6
|
+
readonly runs: ReadonlyArray<TrainingRun>;
|
|
7
|
+
readonly x: PlotAxis;
|
|
8
|
+
readonly y: PlotAxis;
|
|
9
|
+
/** The median and a band across runs, which the application computes. */
|
|
10
|
+
readonly summary?: RunsSummary | undefined;
|
|
11
|
+
/** A line the application writes under the plot: "48 runs · median final loss 2.13 · best run 17". */
|
|
12
|
+
readonly summaryText?: string | undefined;
|
|
13
|
+
readonly height?: PlotHeight | undefined;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A whole sweep at a glance: every run as a thin gray line, the selected run named in its hue, and a median with a band
|
|
17
|
+
* across all runs. Use it above a `RunTable` when there are too many runs to give each one a hue. The application holds
|
|
18
|
+
* the selection and computes the summary.
|
|
19
|
+
*/
|
|
20
|
+
export declare function RunsOverview({ summaryText, selected, ...chart }: RunsOverviewProps): ReactNode;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ChartTone } from '../../../charts/src/index.ts';
|
|
2
|
+
/** Where a run stands: still training, done, ended with an error, or stopped by a person. */
|
|
3
|
+
export type RunState = 'running' | 'finished' | 'failed' | 'stopped';
|
|
4
|
+
/** One training run. Its id is the same in the dashboard, the table and every chart, so a run keeps one hue. */
|
|
5
|
+
export type RunRecord = {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly label: string;
|
|
8
|
+
/** A short line under the name, such as the model and dataset. */
|
|
9
|
+
readonly detail?: string | undefined;
|
|
10
|
+
readonly state: RunState;
|
|
11
|
+
/** Pins the run's hue. Absent takes the next hue in the order the runs are listed. */
|
|
12
|
+
readonly tone?: ChartTone | undefined;
|
|
13
|
+
};
|
|
14
|
+
/** Why a run list or table changed: a press on a control, or a call such as an agent's step. */
|
|
15
|
+
export type RunChangeDetails = {
|
|
16
|
+
readonly reason: 'press' | 'imperative';
|
|
17
|
+
readonly event?: Event | undefined;
|
|
18
|
+
};
|
|
19
|
+
/** The words that name each state. */
|
|
20
|
+
export type RunStateLabels = Readonly<Record<RunState, string>>;
|
|
21
|
+
export declare const runStateLabels: {
|
|
22
|
+
readonly running: 'Running';
|
|
23
|
+
readonly finished: 'Finished';
|
|
24
|
+
readonly failed: 'Failed';
|
|
25
|
+
readonly stopped: 'Stopped';
|
|
26
|
+
};
|
|
27
|
+
/** The most runs the dashboard and table show. Each needs its own hue and a legend entry. */
|
|
28
|
+
export declare const runLimits: {
|
|
29
|
+
readonly runs: 12;
|
|
30
|
+
};
|
|
31
|
+
/** Why the runs cannot be shown, or undefined when they can. */
|
|
32
|
+
export declare function runsProblem(runs: ReadonlyArray<RunRecord>): string | undefined;
|
|
33
|
+
/** The hues the application pinned, keyed by run id, for a tone scope. */
|
|
34
|
+
export declare function pinnedTones(runs: ReadonlyArray<RunRecord>): Readonly<Record<string, ChartTone>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Kbd, Breadcrumb } from './navigation.tsx';
|
|
2
2
|
export type { PageNavigationItem, PageNavigationProps, PageNavigationPlaceholderProps } from './page-navigation.tsx';
|
|
3
3
|
export { PageNavigation, PageNavigationPlaceholder } from './page-navigation.tsx';
|
|
4
|
-
export { RouteLink } from '
|
|
4
|
+
export { RouteLink } from '../../core/src/index.ts';
|
|
5
5
|
export { SkipLink } from './skip-link.tsx';
|
|
6
6
|
export { Tabs } from './tabs.tsx';
|
|
7
7
|
export { ContentTabs } from './content-tabs.tsx';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
function e(e) {
|
|
2
|
+
return String(Math.round(e * 100) / 100);
|
|
3
|
+
}
|
|
4
|
+
function t(t) {
|
|
5
|
+
return `${e(t.x)},${e(t.y)}`;
|
|
6
|
+
}
|
|
7
|
+
function n(e, t) {
|
|
8
|
+
return e.flatMap((n, r) => {
|
|
9
|
+
let i = e[r - 1];
|
|
10
|
+
return t(n) && (i === void 0 || !t(i)) ? [r] : [];
|
|
11
|
+
}).map((n) => {
|
|
12
|
+
let r = e.findIndex((e, r) => r > n && !t(e));
|
|
13
|
+
return e.slice(n, r === -1 ? void 0 : r);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function r(n, r) {
|
|
17
|
+
return n.map((i, a) => n[a - 1] === void 0 ? t(i) : r === "step" ? `H${e(i.x)}V${e(i.y)}` : `L${t(i)}`).join("");
|
|
18
|
+
}
|
|
19
|
+
function i(e) {
|
|
20
|
+
return n(e, (e) => e.y !== null).map((e) => e.flatMap((e) => e.y === null ? [] : [{
|
|
21
|
+
x: e.x,
|
|
22
|
+
y: e.y
|
|
23
|
+
}]));
|
|
24
|
+
}
|
|
25
|
+
function a(e, t = "linear") {
|
|
26
|
+
return i(e).filter((e) => e.length > 1).map((e) => `M${r(e, t)}`).join("");
|
|
27
|
+
}
|
|
28
|
+
function o(e) {
|
|
29
|
+
return i(e).flatMap((e) => e.length === 1 ? e : []);
|
|
30
|
+
}
|
|
31
|
+
function s(e) {
|
|
32
|
+
return n(e, (e) => e.y0 !== null && e.y1 !== null).map((e) => {
|
|
33
|
+
let t = e.flatMap((e) => e.y1 === null ? [] : [{
|
|
34
|
+
x: e.x,
|
|
35
|
+
y: e.y1
|
|
36
|
+
}]), n = e.flatMap((e) => e.y0 === null ? [] : [{
|
|
37
|
+
x: e.x,
|
|
38
|
+
y: e.y0
|
|
39
|
+
}]).toReversed();
|
|
40
|
+
return `M${r(t, "linear")}L${r(n, "linear")}Z`;
|
|
41
|
+
}).join("");
|
|
42
|
+
}
|
|
43
|
+
var c = .5;
|
|
44
|
+
function l({ x1: n, y1: r, x2: i, y2: a, axis: o, shape: s = "curve" }) {
|
|
45
|
+
let l = t({
|
|
46
|
+
x: n,
|
|
47
|
+
y: r
|
|
48
|
+
}), u = t({
|
|
49
|
+
x: i,
|
|
50
|
+
y: a
|
|
51
|
+
});
|
|
52
|
+
if (o === "y") {
|
|
53
|
+
let t = e(r + (a - r) * c);
|
|
54
|
+
return s === "elbow" ? `M${l}V${t}H${e(i)}V${e(a)}` : `M${l}C${e(n)},${t} ${e(i)},${t} ${u}`;
|
|
55
|
+
}
|
|
56
|
+
let d = e(n + (i - n) * c);
|
|
57
|
+
return s === "elbow" ? `M${l}H${d}V${e(a)}H${e(i)}` : `M${l}C${d},${e(r)} ${d},${e(a)} ${u}`;
|
|
58
|
+
}
|
|
59
|
+
export { l as i, o as n, a as r, s as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
2
|
-
import { n as t, r as n } from "./code-block-
|
|
2
|
+
import { n as t, r as n } from "./code-block-DioAM2bZ.js";
|
|
3
3
|
import { t as r } from "./viewer-styles-DsFYri4K.js";
|
|
4
4
|
import * as i from "@stylexjs/stylex";
|
|
5
5
|
import { useCallback as a, useState as o } from "react";
|