src/app.ts
Props and state
Props are{ title, dashboardUrl? }. State is { ranges, updatedAt? } with at most 6 ranges, each
{ label, metrics, chart? }:
metrics: at most 6 of{ label, value, format?, unit?, currency?, delta?, trend? }, as onMetric.chart:{ kind, title, series, format?, unit?, currency? }, as onChart.
format. A currency value needs a
currency code, a unit only goes with plain numbers, and percents are fractions: 0.08 shows as
8%. A delta is a number plus goodWhen. With percent: true its value is a fraction too, so
{ value: 0.08, percent: true, goodWhen: "up" } reads “+8%” and counts as good.
One range shows directly; several ranges show as tabs. The panel has no actions: push new state with
reintersect.blocks.update(Revenue, blockId, { state }) when your numbers change. The dashboard
link is the panel’s only button, so it’s the primary one.
Labels
empty, updated, dashboard, summary.