@mechane-ai/elements 0.46.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 +306 -33
- package/dist/ai.js +4 -4
- package/dist/catalog.json +2382 -33
- package/dist/categorical-values-DdfGIowV.js +107 -0
- package/dist/cells--Bd1fQFR.js +384 -0
- package/dist/chart-link-AE_xuxiP.js +35 -0
- package/dist/chart-tones-ei3BC2AL.js +27 -0
- package/dist/charts/cartesian.js +1 -2958
- package/dist/charts/cells.js +1 -0
- package/dist/charts/comparison.js +1 -0
- package/dist/charts/distribution.js +1 -781
- package/dist/charts/figure.js +3404 -0
- package/dist/charts/graph.js +1 -655
- package/dist/charts/hierarchy.js +1 -121
- package/dist/charts/image.js +1 -0
- package/dist/charts/matrix.js +3 -644
- 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 -266
- package/dist/charts/transforms.js +677 -0
- package/dist/charts/trend.js +1 -0
- package/dist/charts.js +8 -3
- package/dist/collections.js +1 -2195
- package/dist/color-legend-CIo7DhXB.js +62 -0
- 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 -810
- package/dist/heatmap-scale-Zte6Ya-g.js +20 -0
- package/dist/image-grid-CVA4SOy_.js +598 -0
- 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/locate-Bcg3QcP4.js +11 -0
- 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 +5 -5
- package/dist/packages/charts/src/cartesian/reference-lines.d.ts +25 -18
- package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +30 -25
- 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 +60 -36
- package/dist/packages/charts/src/cartesian/value-labels.d.ts +22 -0
- package/dist/packages/charts/src/categorical-values.d.ts +1 -1
- 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 +14 -7
- 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-link.d.ts +56 -0
- package/dist/packages/charts/src/chart.d.ts +0 -8
- 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 +15 -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 -2
- 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 +24 -13
- 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/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/path-BglsXpnO.js +59 -0
- 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-DcqtSgzb.js +124 -0
- 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-DVHlknB6.js → src-CExIrXPC.js} +169 -193
- package/dist/src-D5NXRJZe.js +2195 -0
- package/dist/src-DIS0YOj0.js +44 -0
- package/dist/styles2.css +453 -62
- 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 -4
- package/recipes/allocation-report.tsx +15 -7
- package/skills/extend-elements/SKILL.md +60 -0
- package/skills/review-elements/SKILL.md +43 -1
- package/skills/upgrade-elements/SKILL.md +3 -1
- package/skills/upgrade-elements/references/releases.md +184 -0
- package/skills/use-elements/SKILL.md +19 -13
- package/skills/use-elements/references/charts.md +362 -41
- package/skills/use-elements/references/figures.md +173 -0
- package/skills/use-elements/references/kits.md +198 -0
- package/dist/categorical-values-BXi-rJuv.js +0 -74
- package/dist/chart-data-CIJVWCYt.js +0 -21
- package/dist/chart-frame-BaxKn_MB.js +0 -236
- package/dist/chart-input-Bm82_9Rd.js +0 -22
- package/dist/chart-theme-4zprJ3rW.js +0 -404
- package/dist/plot-width-v2c_rA20.js +0 -63
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# Kits
|
|
2
|
+
|
|
3
|
+
A kit is a small set of domain components built from the chart families. A kit chooses which figures answer a domain
|
|
4
|
+
question, arranges them, shares one tone scope and one linked inspection between them, and writes the words. It adds no
|
|
5
|
+
marks, colors or axes.
|
|
6
|
+
|
|
7
|
+
Import a kit from `@mechane-ai/elements/kits/<kit>`. Every component of the training, operations, evaluation and
|
|
8
|
+
interpretability kits:
|
|
9
|
+
|
|
10
|
+
- takes `locale` and declared formats, never pre-formatted numbers;
|
|
11
|
+
- takes the state it shows as a value with a change callback, such as `selected` with `onSelectedChange`;
|
|
12
|
+
- takes its visible words as `labels`, a partial object with English defaults;
|
|
13
|
+
- handles `status`, empty and invalid input, and refuses bad input with a sentence;
|
|
14
|
+
- computes nothing. The application supplies means, intervals, ranks and deltas, or calls
|
|
15
|
+
`@mechane-ai/elements/charts/transforms` first. A list may sort and filter the rows it is given.
|
|
16
|
+
|
|
17
|
+
The explainers kit takes content slots, not data, and its pieces take only what they need. The rules are
|
|
18
|
+
[contract 141](https://github.com/mechane-ai/mechane/blob/main/workspaces/core/.contracts/141-ui-domain-kits/CONTRACT.md).
|
|
19
|
+
|
|
20
|
+
| Kit | Entry | Use it for |
|
|
21
|
+
| ---------------- | ------------------------ | -------------------------------------------------------------------------- |
|
|
22
|
+
| Explainers | `/kits/explainers` | A long page whose prose, figures and diagrams point at each other. |
|
|
23
|
+
| Training | `/kits/training` | Watching and comparing training runs. |
|
|
24
|
+
| Operations | `/kits/operations` | The health, budgets and events of a service. |
|
|
25
|
+
| Evaluation | `/kits/evaluation` | Ranking and comparing models on benchmarks. |
|
|
26
|
+
| Interpretability | `/kits/interpretability` | Reading learned features, attribution, attention, logit lens and steering. |
|
|
27
|
+
|
|
28
|
+
## Explainers
|
|
29
|
+
|
|
30
|
+
For a paper-like page. Give every thing one id and every figure one `id` in the explainer's list.
|
|
31
|
+
|
|
32
|
+
- `Explainer` takes `figures`, the ids of every numbered figure in reading order, and the article as `children`.
|
|
33
|
+
- `NumberedFigure` takes `id`, `caption` and a chart or diagram as `children`. It shows "Figure 2".
|
|
34
|
+
- `FigureReference` takes `to`, a figure id, and writes "Figure 2" as a link.
|
|
35
|
+
- `Term` takes `inspects`, an id the figures use, and words. Hovering or focusing it highlights that record in every
|
|
36
|
+
`ChartLink` figure.
|
|
37
|
+
- `DiagramPart` takes `inspects`, a `label` and SVG shapes, so a hand-drawn diagram links to the figures both ways.
|
|
38
|
+
- `BoundValue` is a number in a sentence the reader changes in place. It takes `value` with `onValueChange` or
|
|
39
|
+
`defaultValue`, `min`, `max`, `step`, optional `scale` (`'linear'` or `'log'`), `locale`, `format` and `label`.
|
|
40
|
+
- `StorySteps` walks through `steps` (`id`, `title`, `body`, optional `inspected`) beside the figures it takes as
|
|
41
|
+
`children`. It takes `step` with `onStepChange` or `defaultStep`, a `label` that names the walk, and `labels` for the
|
|
42
|
+
words of its controls. Each step points the linked figures at its `inspected` record.
|
|
43
|
+
|
|
44
|
+
The application supplies the prose, the figures and the ids. Put a `ChartLink` and a `ToneScope` around the article.
|
|
45
|
+
|
|
46
|
+
## Training
|
|
47
|
+
|
|
48
|
+
For runs of one experiment. A run keeps one id and one hue in the dashboard, the table and every chart.
|
|
49
|
+
|
|
50
|
+
- `RunDashboard` draws one `CurveChart` panel per metric with one step cursor. It takes `runs`, `metrics`, `series`
|
|
51
|
+
(metric id, then run id, then points in increasing step), a step axis `x`, `selected` with `onSelectedChange`, and
|
|
52
|
+
`hidden` with `onHiddenChange`.
|
|
53
|
+
- `RunTable` is the table and the legend. It takes `title`, `runs`, `columns` for settings, `metrics` as `bar` or
|
|
54
|
+
`spark` columns, `selected`, `hidden`, `sort` with `onSortChange` and `showOnlyDifferences`. Pressing a row asks to
|
|
55
|
+
focus the run, or to clear the focus when it is already focused, so `onSelectedChange` receives an id or `null`.
|
|
56
|
+
- `RunsOverview` shows a whole sweep as gray lines with one highlighted run and a median band. Use it when there are
|
|
57
|
+
more runs than hues. It takes `runs`, `x`, `y`, `summary` and `summaryText`.
|
|
58
|
+
|
|
59
|
+
A `RunRecord` is `{ id, label, state, detail?, tone? }`, with `state` one of `running`, `finished`, `failed` or
|
|
60
|
+
`stopped`. `runLimits.runs` is 12. The application supplies the prepared curves, smoothed or not, the settings per run
|
|
61
|
+
and the final results. It holds selection, hiding and sorting.
|
|
62
|
+
|
|
63
|
+
## Operations
|
|
64
|
+
|
|
65
|
+
For a service in production.
|
|
66
|
+
|
|
67
|
+
- `ServiceHealth` shows the service state in words, headline tiles with a trend, and time-series panels on one shared
|
|
68
|
+
time axis. It takes `service`, `indicators`, `charts`, `timestampUnit`, `timeFormat` and `locale`. Give a chart series
|
|
69
|
+
the same `id` as its indicator and the two share a hue.
|
|
70
|
+
- `BudgetBoard` shows objectives and budgets as bars against targets. It takes `groups` of rows that share a unit, each
|
|
71
|
+
with a `value` axis, and `selected` with `onSelectedChange`.
|
|
72
|
+
- `IncidentTimeline` shows deploys, alerts and incidents in three lanes over a `window`. It takes `events`, a
|
|
73
|
+
`timeFormat` that names its time zone, and `selected` with `onSelectedChange`.
|
|
74
|
+
|
|
75
|
+
The application judges every state and writes its words. Nothing here works out health from a number or a color.
|
|
76
|
+
|
|
77
|
+
## Evaluation
|
|
78
|
+
|
|
79
|
+
For models compared on benchmarks. Every model has one id, `EvaluationModel` `{ id, label, detail?, tone? }`.
|
|
80
|
+
|
|
81
|
+
- `Leaderboard` is a ranked table of models over measure columns. A column has a `kind` of `score`, `interval`,
|
|
82
|
+
`change`, `trend` or `heat`, a `format`, `isHigherBetter` and, except for `change`, a shared `domain`. It takes
|
|
83
|
+
`models`, `columns`, `rows`, `sort` with `onSortChange` and `selected` with `onSelectedChange`. Here `selected` is the
|
|
84
|
+
list of checked model ids, and the rows have no checkboxes without the callback. `leaderboardLimits` is 100 models and
|
|
85
|
+
10 columns.
|
|
86
|
+
- `ScoreBreakdown` shows one benchmark by category with a dot per model and an optional interval. It takes `models`,
|
|
87
|
+
`categories`, `scores`, `value` and `selected`.
|
|
88
|
+
- `ModelComparison` shows two models head to head: a dumbbell per benchmark and a table of differences. It takes `a`,
|
|
89
|
+
`b`, `rows`, `value`, `isHigherBetter` and `differenceFormat`. Each difference is B minus A.
|
|
90
|
+
|
|
91
|
+
A score is a number, an estimate with its interval `{ value, low, high }`, or `null` where it was not measured. The
|
|
92
|
+
application supplies the ranks, intervals, differences and tests. Resting on a leaderboard row marks that model in the
|
|
93
|
+
linked figures.
|
|
94
|
+
|
|
95
|
+
## Interpretability
|
|
96
|
+
|
|
97
|
+
For reading what a model learned and how it computes an answer. A feature, such as a sparse autoencoder latent, keeps
|
|
98
|
+
one id in the list, the card, the map and the attribution graph, so resting on it in one place lights it in the others.
|
|
99
|
+
A kit that holds several figures shares one tone scope and one chart link. The application supplies every activation,
|
|
100
|
+
attribution, attention weight and decoded layer. No component runs a model. A `FeatureSummary` is
|
|
101
|
+
`{ id, label, source?, explanation?, frequency? }`, and `featureLimits` is 5000 features and 8 search matches. Each
|
|
102
|
+
change callback receives `details` with a `reason` of `press`, `input` or `imperative`.
|
|
103
|
+
|
|
104
|
+
- `FeatureCard` answers "what is this feature?": its name, id and explanation, how often it fires, the contexts that
|
|
105
|
+
activate it most, and the output tokens it promotes and suppresses. It takes `feature` and, each optional, `density`
|
|
106
|
+
(`bins`, a `value` axis and a `count` axis), `examples` (`examples`, a `domain`, `valueFormat`, optional `palette` and
|
|
107
|
+
`context`) and `logits` (`tokens` of `{ id, token, value }` and a `value` axis). It leaves out what is absent. Use
|
|
108
|
+
`size="compact"` in grids and side panels, `actions` for controls beside the name, and `frequencyFormat` for the
|
|
109
|
+
share. It owns no state.
|
|
110
|
+
- `FeatureList` answers "which features exist, and which one should I open?" as a sortable, searchable table. Each row
|
|
111
|
+
is a `FeatureSummary` with optional `maxActivation` and a `profile`, one value per layer. It takes `title`,
|
|
112
|
+
`features`, `frequencyDomain` (starts at zero), `frequencyFormat`, `activationFormat` and optional `profileDomain`.
|
|
113
|
+
The application holds `selected` with `onSelectedChange`, `query` with `onQueryChange` and `sort` with `onSortChange`.
|
|
114
|
+
It filters and sorts the rows it is given, and refuses duplicate ids.
|
|
115
|
+
- `AttributionWorkbench` answers "which features carry the answer from the prompt to the output?" It is an
|
|
116
|
+
`AttributionGraph` beside a panel for the node in focus. It takes the graph's props (`title`, `locale`, `layers`,
|
|
117
|
+
`nodes`, `edges`, `weightLabel`, `weightFormat`, and optional `valueLabel`, `valueFormat` and `direction`) and
|
|
118
|
+
`details`, a `FeatureCardData` per node id. The application holds `selected` with `onSelectedChange` and `pinned` with
|
|
119
|
+
`onPinnedChange`. Pointing at a node shows its card, pressing keeps it, and pinning builds a subgraph. A key of
|
|
120
|
+
`details` that is not a node is refused.
|
|
121
|
+
- `AttentionHeadGrid` answers "what does each head look at?" One attention pattern per head over the same tokens and the
|
|
122
|
+
same 0 to 1 scale, with the selected head enlarged beside the lines from each token. It takes `title`, `tokens`,
|
|
123
|
+
`heads` (`id`, `label`, optional `description`, `weights` with null for a masked pair), `mask` of `none` or `causal`,
|
|
124
|
+
and `minPanelWidth`. The application holds `selected` (the enlarged head) with `onSelectedChange` and `pair`, the
|
|
125
|
+
token pair every head marks, with `onPairChange`. Its id is `matrixCellId(destination, source)`: the token that
|
|
126
|
+
attends, then the token attended to. Left out, `pair` is kept by the grid. It draws at most 32 heads
|
|
127
|
+
(`attentionHeadLimits`). Weights show where a head reads from, not what it computes.
|
|
128
|
+
- `LogitLens` answers "at which layer does the answer form?" A grid of the model's top next-token guess at every layer
|
|
129
|
+
and prompt position, shaded by probability, and a curve of chosen tokens by layer for the selected position. It takes
|
|
130
|
+
`title`, `columns` (the prompt tokens), `layers` (`id`, `label`, `depth`), `cells` (the top prediction and probability
|
|
131
|
+
per layer and position), optional `tracks` (`id`, `columnId`, `token` and one probability per layer) and
|
|
132
|
+
`valueFormat`. The application holds `selected`, a cell id from `tokenGridCellId(layerId, columnId)`, with
|
|
133
|
+
`onSelectedChange`, and decodes every layer.
|
|
134
|
+
- `EmbeddingAtlas` answers "where is a feature on the map, and what is it?" An `EmbeddingMap` with a search box, a list
|
|
135
|
+
of matches and a card for the open feature. It takes the map's props (`title`, `points`, `groups`, `x`, `y` and the
|
|
136
|
+
others), `landmarks` (`id`, `x`, `y`) and `details`, a `FeatureCardData` per landmark id. The application holds
|
|
137
|
+
`query` with `onQueryChange` and `selected` with `onSelectedChange`, and projects the points. A landmark with no
|
|
138
|
+
details is refused.
|
|
139
|
+
- `SteeringPanel` answers "what does the model do when I change a feature's strength?" A slider per feature beside
|
|
140
|
+
next-token predictions, with a tick for each token before steering, and optionally the text before and after. It takes
|
|
141
|
+
`title`, `features` (`id`, `label`, `min`, `max`, `step`, optional `neutral` and `description`), `values` by feature
|
|
142
|
+
id, `predictions` (each with a `baseline`), and optional `prompt`, `completions` (`baseline`, `steered`) and
|
|
143
|
+
`strengthFormat`. The application holds `values` with `onValuesChange`, which Reset also calls with every neutral
|
|
144
|
+
strength, and generates the outputs for the current setting.
|
|
145
|
+
|
|
146
|
+
```tsx
|
|
147
|
+
import { FeatureCard, FeatureList } from '@mechane-ai/elements/kits/interpretability';
|
|
148
|
+
|
|
149
|
+
<FeatureList
|
|
150
|
+
title="Layer 20 features"
|
|
151
|
+
locale="en-US"
|
|
152
|
+
features={[
|
|
153
|
+
{ id: 'f-1', label: 'Golden Gate Bridge', frequency: 0.0004, maxActivation: 9.2 },
|
|
154
|
+
{ id: 'f-2', label: 'Suspension bridges', frequency: 0.0011, maxActivation: 6.8 },
|
|
155
|
+
]}
|
|
156
|
+
frequencyDomain={[0, 0.002]}
|
|
157
|
+
frequencyFormat={{ style: 'percent', maximumFractionDigits: 2 }}
|
|
158
|
+
activationFormat={{ maximumFractionDigits: 1 }}
|
|
159
|
+
selected={openFeature}
|
|
160
|
+
onSelectedChange={(id) => setOpenFeature(id)}
|
|
161
|
+
/>;
|
|
162
|
+
|
|
163
|
+
<FeatureCard locale="en-US" size="compact" feature={{ id: 'f-1', label: 'Golden Gate Bridge', frequency: 0.0004 }} />;
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Put a kit on a page
|
|
167
|
+
|
|
168
|
+
The dashboard and the table each keep a tone scope over `runs`, so a run has one hue in both. The application holds
|
|
169
|
+
selection and hiding and passes them to both.
|
|
170
|
+
|
|
171
|
+
```tsx
|
|
172
|
+
import { RunDashboard, RunTable } from '@mechane-ai/elements/kits/training';
|
|
173
|
+
|
|
174
|
+
<>
|
|
175
|
+
<RunDashboard
|
|
176
|
+
title="Validation"
|
|
177
|
+
locale="en-US"
|
|
178
|
+
runs={runs}
|
|
179
|
+
metrics={metrics}
|
|
180
|
+
series={series}
|
|
181
|
+
x={{ label: 'Training step', format: { maximumFractionDigits: 0 } }}
|
|
182
|
+
selected={selected}
|
|
183
|
+
onSelectedChange={(id) => setSelected(id)}
|
|
184
|
+
hidden={hidden}
|
|
185
|
+
onHiddenChange={(ids) => setHidden(ids)}
|
|
186
|
+
hasLegend={false}
|
|
187
|
+
/>
|
|
188
|
+
<RunTable
|
|
189
|
+
title="Runs"
|
|
190
|
+
locale="en-US"
|
|
191
|
+
runs={runs}
|
|
192
|
+
selected={selected}
|
|
193
|
+
onSelectedChange={(id) => setSelected(id)}
|
|
194
|
+
hidden={hidden}
|
|
195
|
+
onHiddenChange={(ids) => setHidden(ids)}
|
|
196
|
+
/>
|
|
197
|
+
</>;
|
|
198
|
+
```
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { c as e, l as t } from "./src-DVHlknB6.js";
|
|
2
|
-
import { n } from "./chart-input-Bm82_9Rd.js";
|
|
3
|
-
import { n as r, r as i } from "./plot-width-v2c_rA20.js";
|
|
4
|
-
import * as a from "@stylexjs/stylex";
|
|
5
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
-
// packages/charts/src/categorical-values.tsx
|
|
7
|
-
var c = {
|
|
8
|
-
kzqmXN: "x1xc55vz",
|
|
9
|
-
kZKoxP: "xdk7pt",
|
|
10
|
-
kmuXW: "x2lah0s",
|
|
11
|
-
kGVxlE: "x1iotiob",
|
|
12
|
-
$$css: !0
|
|
13
|
-
}, l = { swatch: (e, t) => [
|
|
14
|
-
c,
|
|
15
|
-
{
|
|
16
|
-
kWkggS: e == null ? e : "xl8spv7",
|
|
17
|
-
$$css: !0
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"--x-backgroundColor": e ?? void 0,
|
|
21
|
-
"--x-boxShadow": `inset 0 0 0 1px ${t}` == null ? void 0 : `inset 0 0 0 1px ${t}`
|
|
22
|
-
}
|
|
23
|
-
] }, u = {
|
|
24
|
-
items: 200,
|
|
25
|
-
series: 12
|
|
26
|
-
}, d = [
|
|
27
|
-
"series1",
|
|
28
|
-
"series2",
|
|
29
|
-
"series3",
|
|
30
|
-
"series4",
|
|
31
|
-
"series5",
|
|
32
|
-
"series6"
|
|
33
|
-
];
|
|
34
|
-
function f(e, t) {
|
|
35
|
-
return e ?? d[t % d.length] ?? "series1";
|
|
36
|
-
}
|
|
37
|
-
function p(e) {
|
|
38
|
-
if (e.length > u.items) return `Choose a window with at most ${u.items} items.`;
|
|
39
|
-
if (!n(e)) return "Every breakdown item needs a unique identifier.";
|
|
40
|
-
if (e.some((e) => e.value !== null && (!Number.isFinite(e.value) || e.value < 0))) return "Breakdown values must be finite and nonnegative, or explicitly missing.";
|
|
41
|
-
if (!Number.isFinite(e.reduce((e, t) => e + (t.value ?? 0), 0))) return "The sum of recorded values must be finite.";
|
|
42
|
-
}
|
|
43
|
-
function m(e) {
|
|
44
|
-
return e.map((e) => ({
|
|
45
|
-
id: e.id,
|
|
46
|
-
label: `${e.label}: ${e.valueLabel}`
|
|
47
|
-
}));
|
|
48
|
-
}
|
|
49
|
-
function h({ title: n, items: c, view: u }) {
|
|
50
|
-
return /* @__PURE__ */ o(i, {
|
|
51
|
-
title: n,
|
|
52
|
-
items: m(c),
|
|
53
|
-
view: u,
|
|
54
|
-
children: /* @__PURE__ */ o("ul", {
|
|
55
|
-
className: "xrvj5dj x1ghz6dp x1717udv xe8uvvx",
|
|
56
|
-
children: c.map((n) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ s(r, {
|
|
57
|
-
id: n.id,
|
|
58
|
-
label: `${n.label}: ${n.valueLabel}`,
|
|
59
|
-
view: u,
|
|
60
|
-
children: [/* @__PURE__ */ s("span", {
|
|
61
|
-
className: "x78zum5 x6s0dn4 x1hnptsi x1slnebi xeuugli",
|
|
62
|
-
children: [/* @__PURE__ */ o("span", {
|
|
63
|
-
"aria-hidden": !0,
|
|
64
|
-
...a.props(l.swatch(e[n.tone], t[n.tone]))
|
|
65
|
-
}), n.label]
|
|
66
|
-
}), /* @__PURE__ */ o("span", {
|
|
67
|
-
className: "x153jb6y xp4054r xeuugli x193iq5w",
|
|
68
|
-
children: n.valueLabel
|
|
69
|
-
})]
|
|
70
|
-
}) }, n.id))
|
|
71
|
-
})
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
export { p as a, f as i, m as n, u as r, h as t };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./accessibility-P89UG9-r.js";
|
|
2
|
-
import * as t from "@stylexjs/stylex";
|
|
3
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
// packages/charts/src/chart-data.tsx
|
|
5
|
-
function i({ label: i, columns: a, rows: o }) {
|
|
6
|
-
return /* @__PURE__ */ n("div", {
|
|
7
|
-
...t.props(e.hidden),
|
|
8
|
-
children: /* @__PURE__ */ r("table", { children: [
|
|
9
|
-
/* @__PURE__ */ n("caption", { children: i }),
|
|
10
|
-
/* @__PURE__ */ n("thead", { children: /* @__PURE__ */ n("tr", { children: a.map((e) => /* @__PURE__ */ n("th", {
|
|
11
|
-
scope: "col",
|
|
12
|
-
children: e.label
|
|
13
|
-
}, e.id)) }) }),
|
|
14
|
-
/* @__PURE__ */ n("tbody", { children: o.map((e) => /* @__PURE__ */ n("tr", { children: a.map((t, r) => r === 0 ? /* @__PURE__ */ n("th", {
|
|
15
|
-
scope: "row",
|
|
16
|
-
children: e.values[r]
|
|
17
|
-
}, t.id) : /* @__PURE__ */ n("td", { children: e.values[r] }, t.id)) }, e.id)) })
|
|
18
|
-
] })
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
export { i as t };
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { u as e } from "./src-CpdJlDhO.js";
|
|
2
|
-
import { c as t, g as n, l as r, p as i } from "./src-DVHlknB6.js";
|
|
3
|
-
import * as a from "@stylexjs/stylex";
|
|
4
|
-
import { mergeProps as o } from "@ui-sdk/react/primitive";
|
|
5
|
-
import { Children as s, useId as c } from "react";
|
|
6
|
-
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
|
-
// packages/charts/src/chart-heading.tsx
|
|
8
|
-
var f = { root: {
|
|
9
|
-
k1C7PZ: "x8zbtdt",
|
|
10
|
-
khm7nJ: "x1gkm1c7",
|
|
11
|
-
kMwMTN: "xbixft",
|
|
12
|
-
kMv6JI: "x1hz01jw",
|
|
13
|
-
kGuDYH: "xtqrqnz",
|
|
14
|
-
kLWn49: "x1778rvt",
|
|
15
|
-
$$css: !0
|
|
16
|
-
} };
|
|
17
|
-
function p({ title: t, id: n, meta: r, actions: i }) {
|
|
18
|
-
let o = s.toArray(r).length > 0, c = s.toArray(i).length > 0, l = o || c, p = o && /* @__PURE__ */ u("div", {
|
|
19
|
-
...a.props(e.meta),
|
|
20
|
-
children: r
|
|
21
|
-
}), m = c && /* @__PURE__ */ u("div", {
|
|
22
|
-
...a.props(e.actions),
|
|
23
|
-
children: i
|
|
24
|
-
});
|
|
25
|
-
return /* @__PURE__ */ d("div", {
|
|
26
|
-
...a.props(e.row, e.reportRow, f.root),
|
|
27
|
-
children: [/* @__PURE__ */ u("p", {
|
|
28
|
-
id: n,
|
|
29
|
-
...a.props(e.title),
|
|
30
|
-
children: t
|
|
31
|
-
}), l && /* @__PURE__ */ d("div", {
|
|
32
|
-
...a.props(e.trailing),
|
|
33
|
-
children: [p, m]
|
|
34
|
-
})]
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
// packages/charts/src/chart-series-marker.tsx
|
|
38
|
-
var m = {
|
|
39
|
-
kGVxlE: "x1iotiob",
|
|
40
|
-
$$css: !0
|
|
41
|
-
}, h = {
|
|
42
|
-
root: {
|
|
43
|
-
k1xSpc: "x3nfvp2",
|
|
44
|
-
kGNEyG: "x6s0dn4",
|
|
45
|
-
kjj79g: "xl56j7k",
|
|
46
|
-
kmuXW: "x2lah0s",
|
|
47
|
-
$$css: !0
|
|
48
|
-
},
|
|
49
|
-
color: (e) => [{
|
|
50
|
-
kMwMTN: e == null ? e : "x14rh7hd",
|
|
51
|
-
$$css: !0
|
|
52
|
-
}, { "--x-color": e ?? void 0 }],
|
|
53
|
-
icon: {
|
|
54
|
-
kzqmXN: "x1kky2od",
|
|
55
|
-
kZKoxP: "xlup9mm",
|
|
56
|
-
$$css: !0
|
|
57
|
-
},
|
|
58
|
-
swatch: {
|
|
59
|
-
kzqmXN: "x1xc55vz",
|
|
60
|
-
kZKoxP: "xdk7pt",
|
|
61
|
-
kWkggS: "xtwfq29",
|
|
62
|
-
$$css: !0
|
|
63
|
-
},
|
|
64
|
-
edge: (e) => [m, { "--x-boxShadow": `inset 0 0 0 1px ${e}` == null ? void 0 : `inset 0 0 0 1px ${e}` }],
|
|
65
|
-
transparent: {
|
|
66
|
-
kWkggS: "xjbqb8w",
|
|
67
|
-
$$css: !0
|
|
68
|
-
}
|
|
69
|
-
}, g = 8, _ = .3;
|
|
70
|
-
function v({ shape: e }) {
|
|
71
|
-
switch (e) {
|
|
72
|
-
case "line": return /* @__PURE__ */ u("path", {
|
|
73
|
-
d: "M0 4 H8",
|
|
74
|
-
stroke: "currentColor",
|
|
75
|
-
strokeWidth: 2
|
|
76
|
-
});
|
|
77
|
-
case "band": return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("rect", {
|
|
78
|
-
width: 8,
|
|
79
|
-
height: 8,
|
|
80
|
-
fill: "currentColor",
|
|
81
|
-
opacity: _
|
|
82
|
-
}), /* @__PURE__ */ u("path", {
|
|
83
|
-
d: "M0 4 H8",
|
|
84
|
-
stroke: "currentColor",
|
|
85
|
-
strokeWidth: 1.5
|
|
86
|
-
})] });
|
|
87
|
-
case "tick": return /* @__PURE__ */ u("path", {
|
|
88
|
-
d: "M0 4 H8",
|
|
89
|
-
stroke: "currentColor",
|
|
90
|
-
strokeWidth: 3
|
|
91
|
-
});
|
|
92
|
-
case "range": return /* @__PURE__ */ u("path", {
|
|
93
|
-
d: "M1.5 0.75 H6.5 M4 0.75 V7.25 M1.5 7.25 H6.5",
|
|
94
|
-
stroke: "currentColor",
|
|
95
|
-
strokeWidth: 1.5,
|
|
96
|
-
fill: "none"
|
|
97
|
-
});
|
|
98
|
-
case "dashed": return /* @__PURE__ */ u("path", {
|
|
99
|
-
d: "M0 4 H3 M5 4 H8",
|
|
100
|
-
stroke: "currentColor",
|
|
101
|
-
strokeWidth: 1.5
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
function y({ tone: e, shape: n = "swatch", children: i }) {
|
|
106
|
-
let o = s.toArray(i).length > 0, c = !o && n !== "swatch", l = o || n === "swatch" ? i : /* @__PURE__ */ u("svg", {
|
|
107
|
-
width: g,
|
|
108
|
-
height: g,
|
|
109
|
-
viewBox: `0 0 ${g} ${g}`,
|
|
110
|
-
focusable: "false",
|
|
111
|
-
className: "x1lliihq x1xc55vz xdk7pt x1rea2x4",
|
|
112
|
-
children: /* @__PURE__ */ u(v, { shape: n })
|
|
113
|
-
});
|
|
114
|
-
return /* @__PURE__ */ u("span", {
|
|
115
|
-
"aria-hidden": !0,
|
|
116
|
-
inert: !0,
|
|
117
|
-
...a.props(h.root, h.color(t[e]), o ? h.icon : h.swatch, c && h.transparent, !o && !c && h.edge(r[e])),
|
|
118
|
-
children: l
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
// packages/charts/src/chart-series-summary.tsx
|
|
122
|
-
function b({ series: e, values: t }) {
|
|
123
|
-
return Object.keys(t).length === e.length && e.every((e) => Object.hasOwn(t, e.id)) ? /* @__PURE__ */ u("dl", {
|
|
124
|
-
"aria-label": "Period summary",
|
|
125
|
-
className: "x78zum5 x1a02dak xaml1ju x1ghz6dp xeuugli",
|
|
126
|
-
children: e.map((e, n) => /* @__PURE__ */ d("div", {
|
|
127
|
-
...{
|
|
128
|
-
0: { className: "xeuugli" },
|
|
129
|
-
1: { className: "xeuugli xo02m6d xpilrb4 x1t7ytsu x97x49r" }
|
|
130
|
-
}[n > 0 | 0],
|
|
131
|
-
children: [/* @__PURE__ */ d("dt", {
|
|
132
|
-
className: "x78zum5 x6s0dn4 xunmzkg x153jb6y xy8obcc",
|
|
133
|
-
children: [/* @__PURE__ */ u(y, {
|
|
134
|
-
tone: e.tone,
|
|
135
|
-
shape: e.shape
|
|
136
|
-
}), e.label]
|
|
137
|
-
}), /* @__PURE__ */ u("dd", {
|
|
138
|
-
className: "x1ghz6dp xbixft x71lla1 xgkpprq xk4h15q x1wjjqco xss6m8b xj0a0fe",
|
|
139
|
-
children: t[e.id] === void 0 ? /* @__PURE__ */ u(i, { width: "6ch" }) : t[e.id]
|
|
140
|
-
})]
|
|
141
|
-
}, e.id))
|
|
142
|
-
}) : /* @__PURE__ */ u(n, {
|
|
143
|
-
hasError: !0,
|
|
144
|
-
children: "Period values must match the chart series identifiers."
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
// packages/charts/src/chart-frame.tsx
|
|
148
|
-
function x({ title: t, description: n, children: r, actions: i, footer: f, report: m, series: h = [], figure: g = {} }) {
|
|
149
|
-
let _ = c();
|
|
150
|
-
if (m !== void 0) {
|
|
151
|
-
let e = m.seriesValues === void 0 ? m.summary : /* @__PURE__ */ u(b, {
|
|
152
|
-
series: h,
|
|
153
|
-
values: m.seriesValues
|
|
154
|
-
}), a = e != null && e !== !1, c = s.toArray([m.actions, i]).length > 0, v = /* @__PURE__ */ d(l, { children: [m.actions, i] });
|
|
155
|
-
return /* @__PURE__ */ d("figure", {
|
|
156
|
-
...o(g, { "aria-labelledby": _ }, { className: "xeuugli x1ghz6dp xbixft xpvm0e4 x1hz01jw xtqrqnz xj57cvi x1778rvt xmkeg23 x1y0btm7 x1ey3b81" }),
|
|
157
|
-
children: [/* @__PURE__ */ u("figcaption", { children: /* @__PURE__ */ u(p, {
|
|
158
|
-
id: _,
|
|
159
|
-
title: t,
|
|
160
|
-
meta: m.meta,
|
|
161
|
-
actions: c && v
|
|
162
|
-
}) }), /* @__PURE__ */ d("div", {
|
|
163
|
-
className: "xeuugli xg7ukam",
|
|
164
|
-
children: [
|
|
165
|
-
a && /* @__PURE__ */ u("div", {
|
|
166
|
-
className: "x1xxlxpq xeuugli",
|
|
167
|
-
children: e
|
|
168
|
-
}),
|
|
169
|
-
n !== void 0 && /* @__PURE__ */ u("p", {
|
|
170
|
-
className: "x1ghz6dp x1c87qhr x153jb6y xy8obcc xas2l8k",
|
|
171
|
-
children: n
|
|
172
|
-
}),
|
|
173
|
-
r,
|
|
174
|
-
f !== void 0 && /* @__PURE__ */ u("div", {
|
|
175
|
-
className: "x1xxf3xd xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
176
|
-
children: f
|
|
177
|
-
})
|
|
178
|
-
]
|
|
179
|
-
})]
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
return /* @__PURE__ */ d("figure", {
|
|
183
|
-
...o(g, { "aria-labelledby": _ }, { className: "xeuugli x1ghz6dp xbixft xpvm0e4 x1hz01jw xtqrqnz xj57cvi x1778rvt" }),
|
|
184
|
-
children: [
|
|
185
|
-
/* @__PURE__ */ d("figcaption", {
|
|
186
|
-
className: "x78zum5 x1a02dak x1qughib x7a106z x1n8ia3y x1wv5www",
|
|
187
|
-
children: [/* @__PURE__ */ d("div", {
|
|
188
|
-
className: "x1cqoux5 xeuugli xj0a0fe",
|
|
189
|
-
children: [/* @__PURE__ */ u("p", {
|
|
190
|
-
id: _,
|
|
191
|
-
className: "x1ghz6dp x12myhf4 x1778rvt x1b5ytql",
|
|
192
|
-
children: t
|
|
193
|
-
}), n !== void 0 && /* @__PURE__ */ u("p", {
|
|
194
|
-
className: "x1ghz6dp x1c87qhr x153jb6y xy8obcc xas2l8k",
|
|
195
|
-
children: n
|
|
196
|
-
})]
|
|
197
|
-
}), i !== void 0 && /* @__PURE__ */ u("div", {
|
|
198
|
-
...a.props(e.actions),
|
|
199
|
-
children: i
|
|
200
|
-
})]
|
|
201
|
-
}),
|
|
202
|
-
r,
|
|
203
|
-
f !== void 0 && /* @__PURE__ */ u("div", {
|
|
204
|
-
className: "x1xxf3xd xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
205
|
-
children: f
|
|
206
|
-
})
|
|
207
|
-
]
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
function S({ items: e, label: t = "Legend", isScrollable: n = !1 }) {
|
|
211
|
-
return /* @__PURE__ */ u("ul", {
|
|
212
|
-
"aria-label": t,
|
|
213
|
-
...{
|
|
214
|
-
0: { className: "x78zum5 x1a02dak x8zbtdt x1gkm1c7 xe8uvvx x1ghz6dp x1717udv x153jb6y x1hz01jw xy8obcc xas2l8k" },
|
|
215
|
-
1: { className: "x78zum5 x8zbtdt x1gkm1c7 xe8uvvx x1ghz6dp x1717udv x153jb6y x1hz01jw xy8obcc xas2l8k xozqiw3 xw2csxc x1mqbd49" }
|
|
216
|
-
}[!!n | 0],
|
|
217
|
-
children: e.map((e) => /* @__PURE__ */ d("li", {
|
|
218
|
-
...{
|
|
219
|
-
0: { className: "x3nfvp2 x6s0dn4 xunmzkg xeuugli x193iq5w xj0a0fe" },
|
|
220
|
-
1: { className: "x3nfvp2 x6s0dn4 xunmzkg xeuugli xj0a0fe x2lah0s x1x1rfll xuxw1ft" }
|
|
221
|
-
}[!!n | 0],
|
|
222
|
-
children: [/* @__PURE__ */ u(y, {
|
|
223
|
-
tone: e.tone,
|
|
224
|
-
shape: e.shape
|
|
225
|
-
}), e.label]
|
|
226
|
-
}, e.id))
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
function C({ children: e, id: t }) {
|
|
230
|
-
return /* @__PURE__ */ u("p", {
|
|
231
|
-
id: t,
|
|
232
|
-
className: "x1ghz6dp xeuugli x1mqbd49 xbixft xy8obcc xas2l8k xss6m8b xj0a0fe",
|
|
233
|
-
children: e
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
export { y as i, S as n, C as r, x as t };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { g as e } from "./src-DVHlknB6.js";
|
|
2
|
-
import { t } from "./chart-frame-BaxKn_MB.js";
|
|
3
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
// packages/charts/src/chart-input.tsx
|
|
5
|
-
function r(e) {
|
|
6
|
-
return Number.isFinite(e[0]) && Number.isFinite(e[1]) && Number.isFinite(e[1] - e[0]) && e[0] < e[1];
|
|
7
|
-
}
|
|
8
|
-
function i(e) {
|
|
9
|
-
return new Set(e.map((e) => e.id)).size === e.length;
|
|
10
|
-
}
|
|
11
|
-
function a({ title: r, description: i, message: a, report: o }) {
|
|
12
|
-
return /* @__PURE__ */ n(t, {
|
|
13
|
-
title: r,
|
|
14
|
-
description: i,
|
|
15
|
-
report: o,
|
|
16
|
-
children: /* @__PURE__ */ n(e, {
|
|
17
|
-
hasError: !0,
|
|
18
|
-
children: a
|
|
19
|
-
})
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
export { i as n, r, a as t };
|