@mechane-ai/elements 0.49.1 → 0.51.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/dist/catalog.json +21 -1
- package/dist/charts/cartesian.js +1 -1
- package/dist/charts/comparison.js +1 -1
- package/dist/charts/distribution.js +1 -1
- package/dist/charts/figure.js +12 -12
- package/dist/charts/graph.js +1 -1
- package/dist/charts/hierarchy.js +1 -1
- package/dist/charts/image.js +1 -1
- package/dist/charts/matrix.js +1 -1
- package/dist/charts/plot.js +1 -1
- package/dist/charts/relationship.js +1 -1
- package/dist/charts/text.js +1 -1
- package/dist/charts/timeline.js +1 -1
- package/dist/charts/trend.js +1 -1
- package/dist/collections.js +1 -1
- package/dist/{dumbbell-plot-B-Tn7ewW.js → dumbbell-plot-BC8d_IJy.js} +1 -1
- package/dist/{embedding-map-Bljn-A5q.js → embedding-map-Bj8krO-d.js} +1 -1
- package/dist/figure-frame-koVKcXph.js +323 -0
- package/dist/{image-grid-mrG5u9oE.js → image-grid-CLhol2jy.js} +1 -1
- package/dist/kits/evaluation.js +49 -47
- package/dist/kits/interpretability.js +7 -7
- package/dist/kits/operations.js +4 -4
- package/dist/kits/research.js +413 -265
- package/dist/kits/training.js +2 -2
- package/dist/layout.js +1 -1075
- package/dist/mdx.js +1 -1
- package/dist/packages/charts/src/chart-inspection.d.ts +4 -1
- package/dist/packages/collections/src/data-table-trigger.d.ts +2 -0
- package/dist/packages/kits/src/evaluation/leaderboard.d.ts +2 -0
- package/dist/packages/kits/src/research/collection-page.d.ts +63 -0
- package/dist/packages/kits/src/research/index.d.ts +2 -0
- package/dist/packages/kits/src/research/milestone-path.d.ts +1 -2
- package/dist/packages/kits/src/research/work-heartbeat.d.ts +4 -3
- package/dist/packages/layout/src/detail-page.d.ts +3 -1
- package/dist/{scene-BwJKueD6.js → scene-4ePpWdmE.js} +2 -2
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-CGTYbFxi.js → slope-chart-DWZIYDty.js} +1 -1
- package/dist/{src-B2rgpWap.js → src-DNclWY4V.js} +1 -1
- package/dist/src-DhWMspwr.js +1085 -0
- package/dist/styles2.css +8 -0
- package/dist/{time-series-Dh8y5ba0.js → time-series-CsngFxr1.js} +1 -1
- package/dist/{token-heatmap-BTrZ3-N4.js → token-heatmap-BQLIxPky.js} +1 -1
- package/dist/{token-predictions-CUe4junQ.js → token-predictions-C3B5L-eO.js} +1 -1
- package/dist/{tree-diagram-Dpqmo-fh.js → tree-diagram-Dau9jeXS.js} +1 -1
- package/dist/{treemap-BUSaVD3m.js → treemap-DWrMQndu.js} +1 -1
- package/dist/{violin-plot-BxaLwdRi.js → violin-plot-D05ODcyc.js} +1 -1
- package/dist/{waterfall-CcDMdKec.js → waterfall-BkLLv2Lm.js} +1 -1
- package/package.json +1 -1
- package/skills/review-elements/SKILL.md +14 -0
- package/skills/use-elements/SKILL.md +18 -16
- package/skills/use-elements/references/editorial-restraint.md +40 -0
- package/skills/use-elements/references/workspace.md +14 -8
- package/dist/figure-frame-CEijciL7.js +0 -289
package/dist/styles2.css
CHANGED
|
@@ -3733,6 +3733,10 @@
|
|
|
3733
3733
|
overscroll-behavior-y: contain;
|
|
3734
3734
|
}
|
|
3735
3735
|
|
|
3736
|
+
.x6i9wio {
|
|
3737
|
+
overscroll-behavior-y: none;
|
|
3738
|
+
}
|
|
3739
|
+
|
|
3736
3740
|
@container article (width >= 880px) {
|
|
3737
3741
|
.xgdeu5z.xgdeu5z {
|
|
3738
3742
|
padding: var(--x1qq5i99);
|
|
@@ -3771,6 +3775,10 @@
|
|
|
3771
3775
|
padding-bottom: var(--xjighox);
|
|
3772
3776
|
}
|
|
3773
3777
|
|
|
3778
|
+
.x1l52sgj {
|
|
3779
|
+
padding-bottom: var(--xnv5ly4);
|
|
3780
|
+
}
|
|
3781
|
+
|
|
3774
3782
|
.xmmm7uk {
|
|
3775
3783
|
padding-bottom: var(--xxhyxt);
|
|
3776
3784
|
}
|
|
@@ -10,7 +10,7 @@ import { a as E } from "./tone-scope-DKiSw-JR.js";
|
|
|
10
10
|
import { n as te, r as ne, t as D } from "./figure-format-B8kRZMlo.js";
|
|
11
11
|
import { a as O, i as k, o as A, r as j, t as re } from "./scale-C2xgZyZN.js";
|
|
12
12
|
import { t as ie } from "./chart-cursor-1mFd48Jc.js";
|
|
13
|
-
import { c as ae, i as M, l as oe, n as se, o as N, r as ce, s as P, t as le } from "./figure-frame-
|
|
13
|
+
import { c as ae, i as M, l as oe, n as se, o as N, r as ce, s as P, t as le } from "./figure-frame-koVKcXph.js";
|
|
14
14
|
import { n as F, t as I } from "./plot-width-D3hTycYX.js";
|
|
15
15
|
import { t as ue } from "./plot-axes-D5S9BnBa.js";
|
|
16
16
|
import { a as L, c as R, d as z, f as B, i as de, l as fe, n as V, o as pe, r as H, s as me, t as he } from "./plot-marks-FVsbFkUs.js";
|
|
@@ -3,7 +3,7 @@ import { d as t, l as n, s as r } from "./dates-ckJdYF7t.js";
|
|
|
3
3
|
import { A as i, D as a, E as o, M as s, O as c, S as l, a as u, j as d, k as f } from "./plot-layout-B2xRt-_k.js";
|
|
4
4
|
import { i as p } from "./chart-link-AE_xuxiP.js";
|
|
5
5
|
import { n as m, r as h } from "./figure-format-B8kRZMlo.js";
|
|
6
|
-
import { i as g, l as _, n as ee, r as te, t as ne } from "./figure-frame-
|
|
6
|
+
import { i as g, l as _, n as ee, r as te, t as ne } from "./figure-frame-koVKcXph.js";
|
|
7
7
|
import { n as v, t as re } from "./plot-width-D3hTycYX.js";
|
|
8
8
|
import { n as y, r as b, t as ie } from "./heatmap-scale-Zte6Ya-g.js";
|
|
9
9
|
import { t as ae } from "./color-legend-CIo7DhXB.js";
|
|
@@ -4,7 +4,7 @@ import { A as n, D as r, E as i, M as a, O as o, S as s, a as c, i as l, j as u,
|
|
|
4
4
|
import { i as ee } from "./chart-link-AE_xuxiP.js";
|
|
5
5
|
import { r as m } from "./figure-format-B8kRZMlo.js";
|
|
6
6
|
import { a as h, i as g, o as _ } from "./scale-C2xgZyZN.js";
|
|
7
|
-
import { i as te, l as ne, n as re, r as v, t as ie } from "./figure-frame-
|
|
7
|
+
import { i as te, l as ne, n as re, r as v, t as ie } from "./figure-frame-koVKcXph.js";
|
|
8
8
|
import { n as ae } from "./plot-width-D3hTycYX.js";
|
|
9
9
|
import { t as y } from "./plot-axes-D5S9BnBa.js";
|
|
10
10
|
import { c as b, f as x, r as S, u as C } from "./plot-marks-FVsbFkUs.js";
|
|
@@ -5,7 +5,7 @@ import { A as a, D as o, E as s, M as c, O as l, S as u, T as d, c as f, j as p,
|
|
|
5
5
|
import { i as h } from "./chart-link-AE_xuxiP.js";
|
|
6
6
|
import { a as g } from "./tone-scope-DKiSw-JR.js";
|
|
7
7
|
import { r as _ } from "./figure-format-B8kRZMlo.js";
|
|
8
|
-
import { i as v, l as y, n as b, r as x, t as S } from "./figure-frame-
|
|
8
|
+
import { i as v, l as y, n as b, r as x, t as S } from "./figure-frame-koVKcXph.js";
|
|
9
9
|
import { n as C, t as w } from "./plot-width-D3hTycYX.js";
|
|
10
10
|
import { a as T, c as E, p as D, u as O } from "./plot-marks-FVsbFkUs.js";
|
|
11
11
|
import { r as k } from "./plot-surface-0cKFwtws.js";
|
|
@@ -4,7 +4,7 @@ import { i as s, n as c, t as l } from "./categorical-values-BYP_R5gS.js";
|
|
|
4
4
|
import { i as u } from "./chart-link-AE_xuxiP.js";
|
|
5
5
|
import { a as d } from "./tone-scope-DKiSw-JR.js";
|
|
6
6
|
import { r as f } from "./figure-format-B8kRZMlo.js";
|
|
7
|
-
import { i as p, l as m, n as h, r as g, t as _ } from "./figure-frame-
|
|
7
|
+
import { i as p, l as m, n as h, r as g, t as _ } from "./figure-frame-koVKcXph.js";
|
|
8
8
|
import { n as v } from "./plot-width-D3hTycYX.js";
|
|
9
9
|
import { n as y, r as b } from "./plot-surface-0cKFwtws.js";
|
|
10
10
|
import * as x from "@stylexjs/stylex";
|
|
@@ -5,7 +5,7 @@ import { a as p } from "./tone-scope-DKiSw-JR.js";
|
|
|
5
5
|
import { r as m } from "./figure-format-B8kRZMlo.js";
|
|
6
6
|
import { a as h, o as g } from "./scale-C2xgZyZN.js";
|
|
7
7
|
import { t as _ } from "./chart-cursor-1mFd48Jc.js";
|
|
8
|
-
import { i as v, l as y, n as b, r as x, t as S } from "./figure-frame-
|
|
8
|
+
import { i as v, l as y, n as b, r as x, t as S } from "./figure-frame-koVKcXph.js";
|
|
9
9
|
import { n as C, t as w } from "./plot-width-D3hTycYX.js";
|
|
10
10
|
import { t as T } from "./plot-axes-D5S9BnBa.js";
|
|
11
11
|
import { a as E, f as D, l as O, r as k, s as A } from "./plot-marks-FVsbFkUs.js";
|
|
@@ -5,7 +5,7 @@ import { a as u } from "./tone-scope-DKiSw-JR.js";
|
|
|
5
5
|
import { n as d, r as f } from "./figure-format-B8kRZMlo.js";
|
|
6
6
|
import { a as p, o as m, r as ee } from "./scale-C2xgZyZN.js";
|
|
7
7
|
import { t as h } from "./chart-cursor-1mFd48Jc.js";
|
|
8
|
-
import { i as g, l as te, n as ne, r as re, t as _ } from "./figure-frame-
|
|
8
|
+
import { i as g, l as te, n as ne, r as re, t as _ } from "./figure-frame-koVKcXph.js";
|
|
9
9
|
import { n as ie } from "./plot-width-D3hTycYX.js";
|
|
10
10
|
import { t as v } from "./plot-axes-D5S9BnBa.js";
|
|
11
11
|
import { a as y, c as ae, f as oe, r as se } from "./plot-marks-FVsbFkUs.js";
|
package/package.json
CHANGED
|
@@ -116,5 +116,19 @@ and its readout.
|
|
|
116
116
|
overlap, the readout stays in view, and the plot does not scroll the page sideways.
|
|
117
117
|
- **No statistic in the chart.** The app computed every quantile, density, bin and fit, with a named transform.
|
|
118
118
|
|
|
119
|
+
## 9. Editorial restraint & layout defaults
|
|
120
|
+
|
|
121
|
+
- **Zero floating clutter on hover.** Hovering table rows must not pop tooltips over adjacent rows, and hovering charts
|
|
122
|
+
must use inline readouts that never obscure curves or clip at container edges.
|
|
123
|
+
- **Aligned gutters.** Every section heading aligns vertically with its body content (`PageSection` insets `summary` and
|
|
124
|
+
`children` automatically; `breakdown` and `CollectionPage` tables span full width edge-to-edge).
|
|
125
|
+
- **Zero card bloat.** Metrics use flat `MetricGrid`, lists use full-width `CollectionPage` / `DataTable`, and
|
|
126
|
+
documentation renders flat—not inside stacked bordered `Panel` cards.
|
|
127
|
+
- **Zero instructional slop.** Remove chart `description` text that explains how to hover/click or repeats the
|
|
128
|
+
title/legend/axes. Keep Overview focused on one glanceable metric strip and one primary visual.
|
|
129
|
+
- **Pinned shell & area-forking rail.** Scrolling `<main>` keeps the rail and sidebar fixed; rail icons fork top-level
|
|
130
|
+
areas rather than duplicating sidebar links; theme/environment controls live behind `railFooter` Settings with zero
|
|
131
|
+
`Sync` / `Refresh` clutter.
|
|
132
|
+
|
|
119
133
|
Not covered by this review: a real screen reader, a physical touch device and right-to-left text. Say so in the report
|
|
120
134
|
unless you ran them.
|
|
@@ -52,22 +52,24 @@ persistence and every asynchronous operation.
|
|
|
52
52
|
|
|
53
53
|
## Pick the component
|
|
54
54
|
|
|
55
|
-
| The page needs | Use
|
|
56
|
-
| ------------------------------------------------- |
|
|
57
|
-
| An app frame, a page, sections, a record page | `AppShell`, `PageLayout`, `PageSection`, `RecordPage`
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
| A
|
|
63
|
-
| A
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
| A
|
|
69
|
-
|
|
|
70
|
-
| A
|
|
55
|
+
| The page needs | Use | Read |
|
|
56
|
+
| ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
|
|
57
|
+
| An app frame, a page, sections, a record page | `AppShell`, `PageLayout`, `PageSection`, `RecordPage` | [workspace](references/workspace.md) |
|
|
58
|
+
| A searchable, filterable full-width table page | `CollectionPage` (wires top-bar search, filters, chips, shortcuts & optional inspector) | [workspace](references/workspace.md) |
|
|
59
|
+
| Records compared across columns, search, filters | `DataTable` with a `query` | [collections](references/collections.md) |
|
|
60
|
+
| A selected record's fields beside its list | `Inspector`, `Details` | [collections](references/collections.md) |
|
|
61
|
+
| Fields, choices, dates, files, a save | `Field`, the `/forms` controls, `FormActions`, `ConfirmButton` | [forms](references/forms.md) |
|
|
62
|
+
| A trend, comparison, distribution or relationship | One chart from a `/charts/*` entry | [charts](references/charts.md) |
|
|
63
|
+
| A figure an agent or a server writes as JSON | `Figure`, `validateFigureSpec`, `describeFigure` and `chartGuide` from `/charts/figure` | [figures](references/figures.md) |
|
|
64
|
+
| A run, evaluation, research, service or feature | A kit from `/kits/training`, `/kits/evaluation`, `/kits/research`, `/kits/operations`, `/kits/interpretability` | [kits](references/kits.md) |
|
|
65
|
+
| Page focus, zero-card layout, anti-slop copy | Flat `MetricGrid`, hairline sections, `CollectionPage`, concise titles | [editorial restraint](references/editorial-restraint.md) |
|
|
66
|
+
| An explorable essay, a lesson, a moving diagram | `/lesson`, `/scene`, `/article` and `/mdx`, planned with `/lesson/spec` | [teaching](references/teaching.md) |
|
|
67
|
+
| A first read, a refresh, an empty or failed read | `AsyncRegion`, `LoadingScope`, `EmptyState`, `Notice` | [reports](references/reports.md) |
|
|
68
|
+
| A command menu, a decision, an anchored panel | `Menu`, `AlertDialog`, `Dialog`, `Drawer`, `Popover`, `Tooltip` | the catalog |
|
|
69
|
+
| Route destinations or panels inside one view | `PageNavigation` for links, `Tabs` or `ContentTabs` for panels | [workspace](references/workspace.md) |
|
|
70
|
+
| A transcript, a prompt, tool activity, approvals | `Conversation`, `Message`, `PromptInput`, `Approval` | [conversations](references/conversations.md) |
|
|
71
|
+
| Markdown, source, a diff, a file tree, a log | `/content/markdown`, `/content/code`, `/content/diff`, `/content/tree`, `/content` | the catalog |
|
|
72
|
+
| A model or browser agent that reads and acts | `createAgent` and `registerTools` from `/agent` | [agent access](references/agent.md) |
|
|
71
73
|
|
|
72
74
|
## Start from a recipe
|
|
73
75
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Editorial restraint & Lego-block defaults
|
|
2
|
+
|
|
3
|
+
Elements apps are calm, hairline-divided analytical workspaces—not card grids or prose-heavy dashboards.
|
|
4
|
+
|
|
5
|
+
## One page, one question
|
|
6
|
+
|
|
7
|
+
- Give every route a single job.
|
|
8
|
+
- **Overview** answers _"Where do things stand?"_ with one flat `MetricGrid` and one primary visual (fitting cleanly on
|
|
9
|
+
a single desktop viewport). Move deep attribution charts, comparison tables, and logs onto dedicated routes or
|
|
10
|
+
`PageLayout.navigation` tabs.
|
|
11
|
+
- Prefer smaller, click-through pages and right-hand `Workbench` / `Drawer` inspectors over vertical stacks of four or
|
|
12
|
+
more charts.
|
|
13
|
+
|
|
14
|
+
## Zero-card default
|
|
15
|
+
|
|
16
|
+
- Place `MetricGrid`, charts, and Markdown directly inside `PageSection` (which supplies the standard gutter
|
|
17
|
+
automatically).
|
|
18
|
+
- Place tabular lists edge-to-edge using `CollectionPage` or `PageSection.breakdown`.
|
|
19
|
+
- Do **not** wrap metric strips, tables, list items, or documentation in bordered `Panel` cards. Hairline dividers and
|
|
20
|
+
consistent gutters already separate sections cleanly.
|
|
21
|
+
|
|
22
|
+
## Zero-slop copy budget
|
|
23
|
+
|
|
24
|
+
- Omit chart `description` unless it communicates non-obvious data provenance (sample window, split, or filter). Never
|
|
25
|
+
write UI instructions (`"Hover to inspect..."`, `"Click any cell..."`, `"Check rows to filter"`) or restate what the
|
|
26
|
+
title, axes, and legend already show (`"Dashed curve marks..."`, `"Higher is better..."`).
|
|
27
|
+
- Keep table rows scannable: concise single-line primary labels, short badge tokens, and tabular numbers. Put long prose
|
|
28
|
+
and raw metadata in the click-through inspector pane or drawer.
|
|
29
|
+
- Never show raw backend slugs (`w5_v3_d1536_t115...`) in primary labels; map them to short human labels and keep the
|
|
30
|
+
raw identifier in the inspector with `CopyValue`.
|
|
31
|
+
|
|
32
|
+
## Shell & collection Lego blocks
|
|
33
|
+
|
|
34
|
+
- **Area-forking rail:** Put top-level areas in `AppShell.rail` and Settings/account controls in `AppShell.railFooter`.
|
|
35
|
+
Swap `AppShell.sidebar` to show only the active area's pages—never duplicate every page on both the rail and sidebar.
|
|
36
|
+
- **No sync/status clutter:** Use silent background polling for live telemetry; omit manual `Sync` / `Refresh` buttons
|
|
37
|
+
and footer timestamp pills from primary pages. Keep theme and environment controls under Settings.
|
|
38
|
+
- **Use `CollectionPage` for tables:** One component gives you `PageLayout`, top-bar `Find in view` & `Filters` (`/` and
|
|
39
|
+
`⌘F`), `CollectionToolbar` filter chips, full-width `DataTable`, and an optional resizable `Workbench` inspector.
|
|
40
|
+
Never hand-wire search inputs or filter dropdowns in the page body.
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
# Workspace layout
|
|
2
2
|
|
|
3
|
-
Mount one `AppShell` around the
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Mount one `AppShell` around the router outlet. `AppShell` locks the viewport at `100dvh` with an independent scrolling
|
|
4
|
+
`<main>` column so the rail and sidebar stay pinned without custom CSS. Put top-level areas in `rail`, swap `sidebar` to
|
|
5
|
+
show only the active area's pages, and put Settings/account controls in `railFooter`. On a phone use the shell's drawer
|
|
6
|
+
and its navigation callback.
|
|
6
7
|
|
|
7
|
-
Use `
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Use `PageSection` for report sections: both `summary` and `children` receive the standard inset gutter automatically
|
|
9
|
+
(without double-padding if wrapped in `PageContent`), while `breakdown` renders edge-to-edge full width for a
|
|
10
|
+
`DataTable`. Use `DetailPage isWide` for a wide standalone working surface (it keeps the standard inset gutter by
|
|
11
|
+
default; pass `isBleed` only for an intentional zero-gutter canvas). Constrain prose and individual forms locally. Keep
|
|
12
|
+
a wide plot's horizontal scroll inside its figure. At a wide desktop viewport, compare the right edge of a report header
|
|
13
|
+
with its table and the edge of the pane.
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
Use `CollectionPage` from `/kits/research` for full-width searchable/filterable table pages. It wires `PageLayout`,
|
|
16
|
+
top-bar search & filter controls (`/` and `⌘F`), `CollectionToolbar` filter chips, full-width `DataTable`, and an
|
|
17
|
+
optional resizable `Workbench` inspector in one component. Never put inline search inputs or filter dropdowns in the
|
|
18
|
+
page body.
|
|
13
19
|
|
|
14
20
|
Use `SegmentedControl` from `/forms` to switch between a few views; one item is always checked. Use `ToggleGroup` for
|
|
15
21
|
independent pressed choices. Both size to their content. Put either beside an Elements field and select, compare their
|
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./tokens.stylex-dF5CACEJ.js";
|
|
2
|
-
import { t } from "./accessibility-P89UG9-r.js";
|
|
3
|
-
import { t as n } from "./src-9EJskqB_.js";
|
|
4
|
-
import { d as r, m as i, u as a } from "./src-npqwq3Sa.js";
|
|
5
|
-
import { T as o, b as s, c, w as l } from "./plot-layout-B2xRt-_k.js";
|
|
6
|
-
import * as u from "@stylexjs/stylex";
|
|
7
|
-
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
-
import { formatNumber as p } from "@ui-sdk/core/number";
|
|
9
|
-
// packages/charts/src/chart-data.tsx
|
|
10
|
-
function m({ label: e, columns: n, rows: r }) {
|
|
11
|
-
return /* @__PURE__ */ d("div", {
|
|
12
|
-
...u.props(t.hidden),
|
|
13
|
-
children: /* @__PURE__ */ f("table", { children: [
|
|
14
|
-
/* @__PURE__ */ d("caption", { children: e }),
|
|
15
|
-
/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: n.map((e) => /* @__PURE__ */ d("th", {
|
|
16
|
-
scope: "col",
|
|
17
|
-
children: e.label
|
|
18
|
-
}, e.id)) }) }),
|
|
19
|
-
/* @__PURE__ */ d("tbody", { children: r.map((e) => /* @__PURE__ */ d("tr", { children: n.map((t, n) => n === 0 ? /* @__PURE__ */ d("th", {
|
|
20
|
-
scope: "row",
|
|
21
|
-
children: e.values[n]
|
|
22
|
-
}, t.id) : /* @__PURE__ */ d("td", { children: e.values[n] }, t.id)) }, e.id)) })
|
|
23
|
-
] })
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
// packages/charts/src/chart-inspection.tsx
|
|
27
|
-
var h = {
|
|
28
|
-
kzqmXN: "x1xc55vz",
|
|
29
|
-
kZKoxP: "xdk7pt",
|
|
30
|
-
kmuXW: "x2lah0s",
|
|
31
|
-
$$css: !0
|
|
32
|
-
}, g = {
|
|
33
|
-
swatch: (e) => [
|
|
34
|
-
h,
|
|
35
|
-
{
|
|
36
|
-
kWkggS: e == null ? e : "xl8spv7",
|
|
37
|
-
$$css: !0
|
|
38
|
-
},
|
|
39
|
-
{ "--x-backgroundColor": e ?? void 0 }
|
|
40
|
-
],
|
|
41
|
-
inspector: {
|
|
42
|
-
k1xSpc: "xrvj5dj x1boff50",
|
|
43
|
-
kOIVth: "xunmzkg",
|
|
44
|
-
kVAEAm: "x10l6tqk",
|
|
45
|
-
k87sOh: "x1ridm32",
|
|
46
|
-
kB7OPa: "x9f619",
|
|
47
|
-
kfzvcC: "x47corl",
|
|
48
|
-
kmVPX3: "x69ldcm",
|
|
49
|
-
kMzoRj: "xmkeg23",
|
|
50
|
-
ksu8eU: "x1y0btm7",
|
|
51
|
-
kVAM5u: "x1ey3b81",
|
|
52
|
-
kaIpWk: "x1ok0vyi",
|
|
53
|
-
kGVxlE: "x1ghndwu",
|
|
54
|
-
kWkggS: "xpvm0e4",
|
|
55
|
-
kMwMTN: "xbixft",
|
|
56
|
-
kGuDYH: "xy8obcc",
|
|
57
|
-
kLWn49: "xas2l8k",
|
|
58
|
-
kcqcaj: "xss6m8b",
|
|
59
|
-
kHjlTd: "xj0a0fe",
|
|
60
|
-
$$css: !0
|
|
61
|
-
},
|
|
62
|
-
summaryInspector: {
|
|
63
|
-
k1xSpc: "xrvj5dj x1xnx9c1",
|
|
64
|
-
$$css: !0
|
|
65
|
-
},
|
|
66
|
-
position: (e, t) => [{
|
|
67
|
-
kbCHJM: e == null ? e : "xgq9j65",
|
|
68
|
-
kzqmXN: t == null ? t : "x5lhr3w",
|
|
69
|
-
$$css: !0
|
|
70
|
-
}, {
|
|
71
|
-
"--x-left": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e),
|
|
72
|
-
"--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
|
|
73
|
-
}]
|
|
74
|
-
}, _ = 4;
|
|
75
|
-
function v() {
|
|
76
|
-
return /* @__PURE__ */ d("ul", {
|
|
77
|
-
"aria-hidden": !0,
|
|
78
|
-
inert: !0,
|
|
79
|
-
className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k",
|
|
80
|
-
children: Array.from({ length: _ }, (t, n) => /* @__PURE__ */ f("li", {
|
|
81
|
-
className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe x1f394nn x43dure",
|
|
82
|
-
children: [/* @__PURE__ */ d("span", { ...u.props(g.swatch(e.line)) }), /* @__PURE__ */ f("span", {
|
|
83
|
-
className: "x1cqoux5 xeuugli",
|
|
84
|
-
children: [
|
|
85
|
-
/* @__PURE__ */ d(r, {}),
|
|
86
|
-
/* @__PURE__ */ d("span", {
|
|
87
|
-
className: "x1s85apg xannxpe",
|
|
88
|
-
children: /* @__PURE__ */ d(r, {})
|
|
89
|
-
}),
|
|
90
|
-
/* @__PURE__ */ d("span", {
|
|
91
|
-
className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b",
|
|
92
|
-
children: /* @__PURE__ */ d(r, {})
|
|
93
|
-
})
|
|
94
|
-
]
|
|
95
|
-
})]
|
|
96
|
-
}, n))
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
function y({ title: e, detail: t }) {
|
|
100
|
-
return t === void 0 ? e : /* @__PURE__ */ f("span", {
|
|
101
|
-
"aria-label": e,
|
|
102
|
-
className: "x1lliihq xb3r6kr xlyipyv xuxw1ft",
|
|
103
|
-
children: [/* @__PURE__ */ d("span", {
|
|
104
|
-
className: "xt0psk2 x1boff50",
|
|
105
|
-
children: e
|
|
106
|
-
}), /* @__PURE__ */ d("span", {
|
|
107
|
-
className: "x1s85apg xfodcyb",
|
|
108
|
-
children: t
|
|
109
|
-
})]
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
function b({ label: e, summary: t, rows: n, notes: r = [] }) {
|
|
113
|
-
if (e !== void 0) return [
|
|
114
|
-
e,
|
|
115
|
-
t,
|
|
116
|
-
...n.map((e) => `${e.label}: ${e.value}`),
|
|
117
|
-
...r
|
|
118
|
-
].filter((e) => e !== void 0).join(" · ");
|
|
119
|
-
}
|
|
120
|
-
function x({ id: e, label: t, summary: n, legend: r, layoutLegend: i, rows: a, x: s, width: c, offset: l = 16, notes: p = [], hasSeriesSummary: m = !1, hasLegend: h = !0 }) {
|
|
121
|
-
let _ = h && !m, v = Math.min(260, c), y = s > c / 2 ? s - v - l : s + l, x = Math.max(0, Math.min(c - v, y));
|
|
122
|
-
return /* @__PURE__ */ f("div", {
|
|
123
|
-
className: "xeuugli",
|
|
124
|
-
children: [
|
|
125
|
-
_ && /* @__PURE__ */ f("div", {
|
|
126
|
-
className: "xrvj5dj xeuugli",
|
|
127
|
-
children: [i !== void 0 && /* @__PURE__ */ d("ul", {
|
|
128
|
-
"aria-hidden": !0,
|
|
129
|
-
inert: !0,
|
|
130
|
-
className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k x15r89dc xlshs6z x47corl",
|
|
131
|
-
children: i.map((e) => /* @__PURE__ */ f("li", {
|
|
132
|
-
className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
|
|
133
|
-
children: [/* @__PURE__ */ d(o, {
|
|
134
|
-
tone: e.tone,
|
|
135
|
-
shape: e.shape
|
|
136
|
-
}), /* @__PURE__ */ f("span", {
|
|
137
|
-
className: "xeuugli",
|
|
138
|
-
children: [e.label, /* @__PURE__ */ d("span", { className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b" })]
|
|
139
|
-
})]
|
|
140
|
-
}, e.id))
|
|
141
|
-
}), /* @__PURE__ */ d("ul", {
|
|
142
|
-
"aria-label": "Legend",
|
|
143
|
-
className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k x15r89dc",
|
|
144
|
-
children: r.map((e) => /* @__PURE__ */ f("li", {
|
|
145
|
-
className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
|
|
146
|
-
children: [/* @__PURE__ */ d(o, {
|
|
147
|
-
tone: e.tone,
|
|
148
|
-
shape: e.shape
|
|
149
|
-
}), /* @__PURE__ */ f("span", {
|
|
150
|
-
className: "xeuugli",
|
|
151
|
-
children: [e.label, /* @__PURE__ */ d("span", {
|
|
152
|
-
className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b",
|
|
153
|
-
children: t === void 0 ? "" : a.find((t) => t.id === e.id)?.value ?? "—"
|
|
154
|
-
})]
|
|
155
|
-
})]
|
|
156
|
-
}, e.id))
|
|
157
|
-
})]
|
|
158
|
-
}),
|
|
159
|
-
/* @__PURE__ */ d("span", {
|
|
160
|
-
id: e,
|
|
161
|
-
className: "x10l6tqk x1i1rx1s xjm9jq1 x1717udv xb3r6kr x1hyvwdk xuxw1ft",
|
|
162
|
-
children: b({
|
|
163
|
-
label: t,
|
|
164
|
-
summary: n,
|
|
165
|
-
rows: a,
|
|
166
|
-
notes: p
|
|
167
|
-
})
|
|
168
|
-
}),
|
|
169
|
-
t !== void 0 && /* @__PURE__ */ d("div", {
|
|
170
|
-
"aria-hidden": !0,
|
|
171
|
-
className: "x1n2onr6 xqtp20y x1vjfegm",
|
|
172
|
-
children: /* @__PURE__ */ f("div", {
|
|
173
|
-
...u.props(g.inspector, !_ && g.summaryInspector, g.position(x, v)),
|
|
174
|
-
children: [
|
|
175
|
-
/* @__PURE__ */ f("div", {
|
|
176
|
-
className: "x78zum5 x1qughib x1hnptsi xk4h15q",
|
|
177
|
-
children: [/* @__PURE__ */ d("span", { children: t }), n !== void 0 && /* @__PURE__ */ d("span", { children: n })]
|
|
178
|
-
}),
|
|
179
|
-
/* @__PURE__ */ d("dl", {
|
|
180
|
-
className: "xrvj5dj xunmzkg x1ghz6dp",
|
|
181
|
-
children: a.map((e) => /* @__PURE__ */ f("div", {
|
|
182
|
-
className: "x78zum5 x1qughib x1pha0wt x1hnptsi",
|
|
183
|
-
children: [/* @__PURE__ */ f("dt", {
|
|
184
|
-
className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
|
|
185
|
-
children: [/* @__PURE__ */ d(o, {
|
|
186
|
-
tone: e.tone,
|
|
187
|
-
shape: e.shape
|
|
188
|
-
}), e.label]
|
|
189
|
-
}), /* @__PURE__ */ d("dd", {
|
|
190
|
-
className: "x1ghz6dp xuxw1ft",
|
|
191
|
-
children: e.value
|
|
192
|
-
})]
|
|
193
|
-
}, e.id))
|
|
194
|
-
}),
|
|
195
|
-
p.map((e) => /* @__PURE__ */ d("span", { children: e }, e))
|
|
196
|
-
]
|
|
197
|
-
})
|
|
198
|
-
})
|
|
199
|
-
]
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
// packages/charts/src/figure/figure-frame.tsx
|
|
203
|
-
var S = {
|
|
204
|
-
notation: "compact",
|
|
205
|
-
compactDisplay: "long"
|
|
206
|
-
}, C = 1e5;
|
|
207
|
-
function w(e, t) {
|
|
208
|
-
return p(e, t, e < C ? {} : S);
|
|
209
|
-
}
|
|
210
|
-
function T(e, t) {
|
|
211
|
-
return `${w(e.shown, t)} of ${w(e.total, t)} ${e.unit} shown`;
|
|
212
|
-
}
|
|
213
|
-
function E({ title: e, description: r, report: i, actions: a, locale: o, source: c, coverage: p, transforms: m = [], status: h = "ready", figure: g = {}, series: _, titleDetail: v, footer: b, seriesLegend: x, scaleLegend: S, children: C }) {
|
|
214
|
-
let w = l(), E = p !== void 0 && p.shown < p.total ? T(p, o) : void 0, D = [
|
|
215
|
-
w ? E : void 0,
|
|
216
|
-
c,
|
|
217
|
-
...m
|
|
218
|
-
].filter((e) => e !== void 0), O = w ? v : void 0, k = b !== void 0 || O !== void 0 || D.length > 0, A = /* @__PURE__ */ d(y, {
|
|
219
|
-
title: e,
|
|
220
|
-
detail: v
|
|
221
|
-
}), j = i === void 0 ? {} : { "data-figure-report": "" }, M = E === void 0 ? A : /* @__PURE__ */ f("span", {
|
|
222
|
-
className: "x3nfvp2 x1a02dak x1pha0wt xa2sdi0 x1gkm1c7",
|
|
223
|
-
children: [A, /* @__PURE__ */ d(n, { children: E })]
|
|
224
|
-
});
|
|
225
|
-
return /* @__PURE__ */ f(s, {
|
|
226
|
-
figure: {
|
|
227
|
-
...g,
|
|
228
|
-
...j,
|
|
229
|
-
"aria-busy": h !== "ready" || void 0
|
|
230
|
-
},
|
|
231
|
-
title: w ? /* @__PURE__ */ d("span", {
|
|
232
|
-
...u.props(t.hidden),
|
|
233
|
-
children: e
|
|
234
|
-
}) : M,
|
|
235
|
-
description: w ? void 0 : r,
|
|
236
|
-
report: i,
|
|
237
|
-
actions: a,
|
|
238
|
-
series: _,
|
|
239
|
-
seriesLegend: x,
|
|
240
|
-
scaleLegend: S,
|
|
241
|
-
footer: k ? /* @__PURE__ */ f("div", {
|
|
242
|
-
className: "xrvj5dj xunmzkg xeuugli",
|
|
243
|
-
children: [
|
|
244
|
-
O !== void 0 && /* @__PURE__ */ d("p", {
|
|
245
|
-
"aria-hidden": !0,
|
|
246
|
-
className: "x1s85apg xannxpe x1ghz6dp xbixft xj0a0fe",
|
|
247
|
-
children: O
|
|
248
|
-
}),
|
|
249
|
-
b,
|
|
250
|
-
D.length > 0 && /* @__PURE__ */ d("p", {
|
|
251
|
-
className: "x1ghz6dp xeuugli xj0a0fe",
|
|
252
|
-
children: D.join(" · ")
|
|
253
|
-
})
|
|
254
|
-
]
|
|
255
|
-
}) : void 0,
|
|
256
|
-
children: [w && r !== void 0 && /* @__PURE__ */ d("p", {
|
|
257
|
-
...u.props(t.hidden),
|
|
258
|
-
children: r
|
|
259
|
-
}), C]
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
function D({ children: e }) {
|
|
263
|
-
return /* @__PURE__ */ d("p", {
|
|
264
|
-
className: "x1ghz6dp x153jb6y xtqrqnz x1778rvt",
|
|
265
|
-
children: e
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
function O({ message: e, ...t }) {
|
|
269
|
-
return /* @__PURE__ */ d(E, {
|
|
270
|
-
...t,
|
|
271
|
-
status: "ready",
|
|
272
|
-
children: /* @__PURE__ */ d(i, {
|
|
273
|
-
hasError: !0,
|
|
274
|
-
children: e
|
|
275
|
-
})
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
function k({ height: e = "regular", ...t }) {
|
|
279
|
-
return /* @__PURE__ */ d("div", {
|
|
280
|
-
"aria-hidden": !0,
|
|
281
|
-
inert: !0,
|
|
282
|
-
children: /* @__PURE__ */ d(E, {
|
|
283
|
-
...t,
|
|
284
|
-
status: "loading",
|
|
285
|
-
children: /* @__PURE__ */ d(a, { height: c[e] })
|
|
286
|
-
})
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
export { T as a, b as c, k as i, m as l, E as n, x as o, O as r, v as s, D as t };
|